Skip to content

Spaces: a bot drafts a live panel for Today, and a routine keeps it current - #302

Merged
promptclickrun merged 1 commit into
mainfrom
spaces
Nov 13, 2026
Merged

promptclickrun merged 1 commit into
mainfrom
spaces

Conversation

@promptclickrun

Copy link
Copy Markdown
Owner

Closes #301

A person cannot keep a live page from a bot on the app's home. This change adds spaces: a panel on the app's Today tab, a page behind it, and a routine that keeps both current.

How it works

  • bighelp_draft_space makes a draft from a chat: a card, an HTML app page and a routine. The draft card (space_draft) tells the person how often the space updates and if each update uses AI.
  • The plugin schedules nothing for a draft. spaces/add is the only path that creates the Hermes job, and only the app calls it.
  • A script routine is a no_agent Hermes job. Its shim calls spaces.run_scheduled, which runs the collector script of the bot and stores its JSON output. No model turn occurs. A test runs a real Hermes job with run_agent blocked and checks that the card changed.
  • An AI routine runs one time each hour at most.
  • bighelp_update_space and hermes bighelp space update change the card and the page data from a tool call or from a script.
  • Six routes serve the app: spaces/list, get, add, update, refresh and delete. Each mutation has an operationId, so a retry does nothing twice.
  • The feature is native-spaces-v1. It is in LATE_FEATURES, so apps that take 64 features do not lose one.

docs/SPACES.md has the full contract.

Trust boundary

This change adds a path that runs a script from a schedule. A review found a code injection in the first version of the shim. This change corrects it.

  • The shim contains no text from the model. It contains the profile, the space id and the plugin folder, and each one is a checked value written as a Python literal.
  • A collector must be a .py or .sh file in the working folder of the bot. The plugin does the same check at the draft, at Add and before each run. It refuses Hermes folders, the home of the bot and names that look like credentials.
  • Add records the SHA-256 of the collector. If the file changes, the routine stops with script_changed until the bot makes the draft again and the person adds it again.
  • The plugin starts the collector with an argument list and no shell. It has a time limit, an output limit and the environment that Hermes gives to cron scripts, without provider keys.
  • The app never receives the error output or a path of the computer. The first 400 characters of the error output go to the bot only.
  • A changed routine of a live space waits until the person adds it again.
  • A delete that cannot remove the Hermes job answers 503 and keeps the row, so a retry can complete it. The plugin records each job that it creates and removes jobs that no space owns.

Tests

  • tests/test_spaces.py, test_spaces_routine.py, test_spaces_tools.py and test_spaces_api.py are new. With the HTML app, card, context and telemetry suites, 340 tests pass on Python 3.14 with Hermes 0.23.1.
  • The full suite has 14 failures. The same 14 fail on main: 13 in test_native_startup_logging and 1 in test_registration.
  • The Hermes plugin scan of the release files gives safe, the same as main.

Not done

  • No test on Hermes 0.21.1 or 0.21.2. available() checks that create_job accepts no_agent and does not list the feature without it.
  • No test with a real gateway that ticks, and no test on Linux.
  • The recorded SHA-256 covers the collector file only. A file that the collector imports from the working folder can change. The bot can write that folder and can run commands, so this adds a schedule but no new access.
  • No release. The plugin version does not change.

Claude Fable 5.2 made this change in Claude Code.

🤖 Generated with Claude Code

…urrent

A space is a card, an HTML app page and a Hermes scheduled task that updates
both. Nothing is scheduled until the person adds the draft in the app. A script
routine is a no_agent job, so its updates use no AI. Six native routes serve
the app, behind native-spaces-v1.

Closes #301

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spaces: a bot makes a live panel for Today, and a routine keeps it current

1 participant