Teknium
2ee1cd1ebb
fix(gateway): accept -s/--checkpoints/--pass-session-id/--accept-hooks as session creation policy
...
These four launch options had no working path on the canonical gateway. Classic
`hermes chat` refused them and pointed users at `hermes --tui ...`. The Ink TUI sent
them in session.create, but CREATE_FIELDS rejected them (4001 invalid_params at the
canonical contract), and canonicalRequest threw before the session existed.
localCreationOptions read the documented, exported HERMES_ACCEPT_HOOKS=1, so with
that variable set no TUI session could be created at all. HERMES_TUI_PASS_SESSION_ID
was read by nothing and was silently dropped. On main the in-process TUI gateway and
cli.py applied all four, and tests/hermes_cli/test_cli_preloaded_skills.py covered
the -s preload. That test was deleted on the branch with no replacement.
All four options are now creation fields of the session that names them, applied
by the owner:
- skills: rendered once with build_preloaded_skills_prompt (off the owner loop,
only for a new session; a retried request_id resumes the frozen route) and stored
in the frozen LocalSessionPolicy.skills_prompt. The in-process turn appends it to
the ephemeral prompt and the managed worker passes it as ephemeral_system_prompt,
matching the CLI/TUI startup preload. A typo among good names is logged and
skipped, as on main. When no name resolves, creation is refused with unknown_skill.
A bypass (--safe-mode / --ignore-user-config) launch refuses -s because it must
not read the profile.
- checkpoints: folded into the frozen config's checkpoints.enabled, which the
in-process agent already reads through _checkpoint_agent_kwargs(policy config).
The managed worker now passes it too.
- pass_session_id: frozen in the request and passed to AIAgent (in-process and
managed), so "Session ID: <id>" rides the system prompt.
- accept_hooks: consents to the profile's configured shell hooks (per-user
allowlist, off-loop) and registers them on the owner, like the in-process
--accept-hooks. It is a no-op on a bypass launch, so an exported
HERMES_ACCEPT_HOOKS=1 cannot brick --safe-mode.
Classic `hermes chat` is a gateway client too: it forwards the same fields, plus
HERMES_ACCEPT_HOOKS=1 when that variable is exported, instead of refusing them.
The Ink TUI maps HERMES_TUI_SKILLS to a list and the flags to booleans, and the
pipe bootstrap stops leaking HERMES_TUI_CHECKPOINTS/HERMES_TUI_PASS_SESSION_ID into a
spawned daemon. The canonical contract (CanonicalCreateParams plus the generated
TS/OpenRPC) advertises the new fields.
Live proof: a real `python -m gateway.run` daemon on a fake home, a real WS
session.create per field, the real Ink mapping via tsx with HERMES_ACCEPT_HOOKS=1
exported, and a real turn against a loopback model. The skill body and
"Session ID: <id>" reach the model's system prompt, a write snapshots into the
checkpoint store (no snapshot without the flag), and the hook command lands in
the allowlist. A real `hermes chat -Q -q ... -s X --checkpoints --pass-session-id
--accept-hooks` exits 0 with the skill in its prompt. On the base, all of these
were refused with invalid_params, Ink threw, and classic chat exited 2.
Review: https://github.com/NousResearch/hermes-agent/pull/106742#pullrequestreview-5456384314
2026-10-08 09:10:37 -07:00
..
2026-10-08 09:10:27 -07:00
2026-10-06 20:11:00 -04:00
2026-10-07 20:37:24 +05:30
2026-10-06 14:23:00 -04:00
2026-10-07 18:11:16 -07:00
2026-10-07 23:44:55 -07:00
2026-10-06 06:22:29 -07:00
2026-10-07 07:18:58 -07:00
2026-10-06 06:21:57 -07:00
2026-10-07 06:15:58 -07:00
2026-10-06 14:24:24 -07:00
2026-10-06 04:36:02 -07:00
2026-10-06 06:22:29 -07:00
2026-09-28 10:21:41 -07:00
2026-10-07 04:51:23 -07:00
2026-10-06 03:44:49 -07:00
2026-10-07 23:42:23 +05:30
2026-10-06 23:14:10 +05:30
2026-10-05 15:36:14 -07:00
2026-10-05 16:37:14 -05:00
2026-10-07 09:59:11 -04:00
2026-10-05 15:36:14 -07:00
2026-10-05 15:36:14 -07:00
2026-10-07 14:19:47 -05:00
2026-10-05 22:38:27 -05:00
2026-09-28 12:43:03 -07:00
2026-10-06 23:14:10 +05:30
2026-10-07 09:59:11 -04:00
2026-10-05 23:33:41 -07:00
2026-10-05 15:36:14 -07:00
2026-10-07 14:19:47 -05:00
2026-10-07 10:57:35 -07:00
2026-10-07 10:57:34 -07:00
2026-10-07 10:57:35 -07:00
2026-10-06 14:22:13 -07:00
2026-09-29 07:44:13 +00:00
2026-10-05 17:34:36 -07:00
2026-09-25 14:22:12 -04:00
2026-10-07 02:29:54 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-27 18:19:17 +05:30
2026-10-06 14:22:13 -07:00
2026-10-07 10:57:34 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-10-08 00:49:32 -07:00
2026-10-08 00:49:32 -07:00
2026-10-06 15:15:06 -04:00
2026-09-29 23:54:34 +05:30
2026-10-06 14:24:24 -07:00
2026-10-06 14:22:13 -07:00
2026-10-02 22:47:50 -04:00
2026-10-06 14:22:13 -07:00
2026-10-05 10:20:42 -05:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-26 22:19:53 -05:00
2026-09-28 14:16:18 -07:00
2026-10-08 04:11:24 -07:00
2026-10-08 04:11:24 -07:00
2026-10-07 10:57:34 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-10-06 14:22:13 -07:00
2026-10-03 23:05:48 -07:00
2026-09-28 14:16:18 -07:00
2026-10-06 12:50:31 -07:00
2026-10-02 13:34:54 +05:30
2026-10-05 00:23:05 -07:00
2026-10-07 07:11:29 +05:30
2026-10-03 17:41:14 -04:00
2026-09-29 20:34:45 +05:30
2026-10-07 17:09:40 -07:00
2026-09-27 02:30:04 -07:00
2026-09-28 02:00:41 -07:00
2026-09-28 14:16:18 -07:00
2026-10-07 06:48:09 -07:00
2026-10-03 16:31:09 +05:30
2026-10-05 19:36:32 +05:30
2026-10-07 10:57:35 -07:00
2026-10-06 14:57:23 -05:00
2026-10-07 10:57:35 -07:00
2026-10-07 10:57:35 -07:00
2026-09-28 04:04:23 -07:00
2026-10-07 21:49:00 -07:00
2026-09-29 20:24:19 -04:00
2026-10-07 06:48:09 -07:00
2026-09-30 23:10:24 -05:00
2026-10-06 02:53:00 -07:00
2026-10-03 19:51:54 +05:30
2026-10-05 13:18:19 +05:30
2026-10-06 03:44:49 -07:00
2026-10-06 06:22:28 -07:00
2026-09-26 21:43:07 -05:00
2026-10-03 21:15:17 +05:30
2026-09-28 10:21:41 -07:00
2026-09-29 20:24:19 -04:00
2026-10-05 16:37:14 -05:00
2026-10-05 16:37:14 -05:00
2026-09-28 06:42:00 -07:00
2026-10-06 23:13:01 -07:00
2026-10-02 04:39:28 -07:00
2026-10-07 10:20:18 +05:30
2026-10-04 00:08:20 -07:00
2026-10-06 14:24:24 -07:00
2026-10-06 15:00:21 -05:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-29 07:44:13 +00:00
2026-10-07 12:26:42 +05:30
2026-10-08 09:10:26 -07:00
2026-10-08 09:10:37 -07:00
2026-10-08 09:10:27 -07:00
2026-09-27 01:04:39 +05:30
2026-10-06 14:23:00 -04:00
2026-10-06 14:24:39 -07:00
2026-10-03 21:57:13 -04:00
2026-09-28 13:30:57 -07:00
2026-10-06 21:58:29 -07:00
2026-10-06 16:21:15 -07:00
2026-10-06 14:24:39 -07:00
2026-10-08 09:10:28 -07:00
2026-10-07 15:19:43 -07:00
2026-10-07 10:57:34 -07:00
2026-10-06 06:18:39 -07:00
2026-10-06 14:24:24 -07:00
2026-10-06 04:36:02 -07:00
2026-10-07 07:18:58 -07:00
2026-10-03 20:44:07 +05:30
2026-10-04 13:50:13 -05:00
2026-10-02 20:51:34 +00:00
2026-09-28 10:21:41 -07:00
2026-09-28 12:43:03 -07:00
2026-10-01 04:50:26 -05:00
2026-10-06 12:28:00 -04:00
2026-09-28 10:21:41 -07:00
2026-10-07 17:21:31 -04:00
2026-10-07 17:21:31 -04:00
2026-10-07 17:21:31 -04:00
2026-10-07 10:57:35 -07:00
2026-10-06 16:31:34 -07:00
2026-10-07 11:48:04 -04:00
2026-10-07 15:22:46 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-10-03 16:31:23 +05:30
2026-10-07 11:19:10 +05:30
2026-09-27 11:19:14 -07:00
2026-09-28 03:37:09 -07:00
2026-09-28 03:37:09 -07:00
2026-10-06 15:15:06 -04:00
2026-10-07 10:57:34 -07:00
2026-10-07 11:19:10 +05:30
2026-10-07 11:19:10 +05:30
2026-10-06 16:21:16 -07:00
2026-10-08 04:19:43 -07:00
2026-09-28 12:24:52 -05:00
2026-10-06 03:44:49 -07:00
2026-09-25 14:22:12 -04:00
2026-09-25 14:22:12 -04:00
2026-10-06 21:58:23 -07:00
2026-10-06 04:36:02 -07:00
2026-10-06 14:23:00 -04:00
2026-09-25 16:28:14 -05:00
2026-10-06 05:44:21 -07:00
2026-10-06 06:22:27 -07:00
2026-10-06 06:18:39 -07:00
2026-10-03 23:05:48 -07:00
2026-09-29 15:45:52 +05:30
2026-10-07 01:35:11 -07:00
2026-10-07 10:57:35 -07:00
2026-10-08 09:10:26 -07:00
2026-10-08 09:10:28 -07:00
2026-10-07 11:38:21 +05:30
2026-10-06 11:10:43 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-26 17:04:25 -05:00
2026-10-05 16:06:32 -07:00
2026-10-02 04:39:28 -07:00
2026-10-05 00:22:31 -07:00
2026-10-06 14:57:23 -05:00
2026-09-28 05:37:55 -07:00
2026-10-07 20:56:29 -05:00
2026-09-28 12:43:03 -07:00
2026-09-28 12:43:03 -07:00
2026-10-03 22:32:13 -04:00
2026-10-05 23:33:41 -07:00
2026-10-07 17:04:44 -04:00
2026-10-02 22:40:31 -05:00
2026-10-07 17:12:40 -04:00
2026-10-06 17:22:46 -04:00
2026-10-08 00:18:12 +05:30
2026-10-04 00:10:54 +05:30
2026-10-06 23:14:10 +05:30
2026-09-28 10:21:41 -07:00
2026-10-06 02:53:56 -07:00
2026-09-28 10:21:41 -07:00
2026-10-06 15:15:06 -04:00
2026-09-28 10:21:41 -07:00
2026-10-04 00:08:20 -07:00
2026-10-03 10:26:12 -07:00
2026-10-01 10:46:45 -07:00
2026-09-28 10:21:41 -07:00
2026-10-08 04:07:30 -07:00
2026-10-03 10:15:11 -07:00
2026-10-03 10:15:11 -07:00
2026-10-03 10:15:11 -07:00
2026-10-03 10:15:11 -07:00
2026-10-07 01:01:14 +05:30
2026-10-03 10:15:11 -07:00
2026-10-03 10:15:11 -07:00
2026-09-28 12:43:03 -07:00
2026-10-03 13:34:08 -07:00
2026-10-04 17:53:20 -07:00
2026-09-28 14:16:18 -07:00
2026-10-07 19:29:35 +05:30
2026-10-06 14:23:00 -04:00
2026-10-05 17:24:40 -07:00
2026-10-08 04:12:02 -07:00
2026-10-07 00:03:01 -04:00
2026-10-06 11:10:43 -07:00
2026-10-08 04:12:02 -07:00
2026-10-03 10:15:11 -07:00
2026-10-08 03:40:04 -07:00
2026-10-07 16:57:01 -07:00
2026-10-08 04:12:02 -07:00
2026-10-07 16:01:10 -07:00
2026-10-05 17:20:30 -07:00
2026-10-07 10:57:35 -07:00
2026-10-05 17:11:30 -07:00
2026-10-05 17:34:36 -07:00
2026-10-05 20:07:25 +05:30
2026-10-05 17:20:30 -07:00
2026-09-25 14:22:12 -04:00
2026-10-06 11:10:43 -07:00
2026-09-25 14:22:12 -04:00
2026-10-07 10:57:35 -07:00
2026-10-01 16:22:28 +05:30
2026-10-01 22:35:29 -07:00
2026-10-05 16:41:08 -05:00
2026-10-04 00:08:20 -07:00
2026-10-02 01:29:41 -07:00
2026-09-28 10:21:41 -07:00
2026-10-07 06:04:27 +05:30
2026-10-07 10:57:35 -07:00
2026-09-28 04:04:23 -07:00
2026-10-07 17:09:40 -07:00
2026-10-07 11:27:35 +05:30
2026-09-29 20:57:57 -05:00
2026-10-05 16:42:57 -05:00
2026-10-06 12:46:06 -04:00
2026-09-27 02:30:04 -07:00
2026-09-28 12:43:03 -07:00
2026-10-06 14:24:24 -07:00
2026-09-27 03:41:42 -07:00
2026-10-06 14:25:21 -07:00
2026-10-06 14:25:21 -07:00
2026-10-07 06:48:09 -07:00
2026-10-06 16:21:16 -07:00
2026-09-28 04:44:29 -07:00
2026-09-28 03:34:07 -07:00
2026-09-28 10:21:41 -07:00
2026-10-05 12:37:47 +05:30
2026-10-03 23:28:02 +05:30
2026-09-26 20:40:40 -05:00
2026-10-06 14:24:24 -07:00
2026-09-27 02:30:04 -07:00
2026-09-28 15:54:01 +05:30
2026-10-06 14:24:24 -07:00
2026-09-27 20:49:04 +05:30
2026-10-06 14:24:24 -07:00
2026-10-07 19:22:43 +05:30
2026-10-06 14:24:24 -07:00
2026-10-04 00:08:20 -07:00
2026-09-28 12:33:01 -07:00
2026-10-02 02:58:18 +05:30
2026-10-06 14:24:24 -07:00
2026-10-06 11:10:43 -07:00
2026-09-25 20:00:57 -05:00
2026-09-28 10:21:41 -07:00
2026-09-28 14:16:18 -07:00
2026-10-07 17:13:11 -04:00
2026-09-28 21:02:35 -04:00
2026-10-07 04:39:00 -07:00
2026-10-01 22:35:29 -07:00
2026-09-25 14:22:12 -04:00
2026-09-28 10:21:41 -07:00
2026-09-29 15:28:19 -05:00
2026-10-01 22:03:11 -07:00
2026-09-27 07:43:23 -05:00
2026-10-06 14:24:24 -07:00
2026-09-28 19:02:20 +05:30
2026-09-28 10:21:41 -07:00
2026-09-27 02:30:04 -07:00
2026-09-28 14:16:18 -07:00
2026-09-26 17:09:16 -05:00
2026-10-06 22:01:38 -07:00
2026-10-06 12:08:49 -07:00
2026-10-06 12:08:49 -07:00
2026-10-03 16:29:54 +05:30
2026-10-06 21:58:27 -07:00
2026-10-02 18:06:40 +00:00
2026-09-27 14:09:15 -05:00
2026-10-06 04:36:02 -07:00
2026-10-07 06:15:58 -07:00
2026-10-07 06:15:58 -07:00
2026-10-07 10:57:35 -07:00
2026-09-26 20:07:47 +05:30
2026-10-06 04:36:02 -07:00
2026-10-06 06:21:10 -07:00
2026-10-06 03:44:49 -07:00
2026-10-07 04:39:00 -07:00
2026-10-07 06:15:58 -07:00
2026-10-06 14:24:24 -07:00
2026-10-06 06:27:57 -07:00
2026-10-07 04:39:00 -07:00
2026-10-06 03:44:49 -07:00
2026-10-07 06:15:58 -07:00
2026-10-07 04:39:00 -07:00
2026-10-07 06:15:58 -07:00
2026-10-07 07:33:34 -07:00
2026-10-07 04:39:00 -07:00
2026-10-06 06:22:28 -07:00
2026-10-06 04:36:02 -07:00
2026-10-06 06:18:39 -07:00
2026-10-06 03:44:49 -07:00
2026-10-06 06:22:29 -07:00
2026-10-06 03:44:49 -07:00
2026-10-07 23:07:43 -07:00
2026-09-28 05:33:25 -07:00
2026-10-07 04:39:00 -07:00
2026-10-07 06:15:58 -07:00
2026-09-27 14:09:15 -05:00
2026-10-06 03:44:49 -07:00
2026-10-06 14:23:00 -04:00
2026-10-06 04:36:02 -07:00
2026-10-07 07:18:58 -07:00
2026-10-06 12:50:31 -07:00
2026-10-06 11:15:27 -04:00
2026-10-07 17:13:11 -04:00
2026-09-28 10:21:41 -07:00
2026-10-06 12:59:08 -05:00
2026-10-06 14:24:24 -07:00
2026-10-07 10:57:34 -07:00
2026-10-06 16:21:16 -07:00
2026-10-07 01:35:11 -07:00
2026-10-06 12:27:22 -04:00
2026-10-07 17:09:40 -07:00
2026-10-06 12:30:01 -04:00
2026-10-06 17:22:39 -04:00
2026-10-06 14:24:24 -07:00
2026-10-01 23:27:08 -07:00
2026-10-04 00:08:20 -07:00
2026-10-05 15:36:14 -07:00
2026-10-03 19:51:54 +05:30
2026-10-07 23:44:55 -07:00
2026-10-07 23:44:55 -07:00
2026-10-06 04:36:02 -07:00
2026-10-06 14:24:24 -07:00
2026-10-02 02:54:18 +05:30
2026-09-28 10:21:41 -07:00
2026-10-02 10:42:07 -04:00
2026-10-06 21:52:50 -05:00
2026-10-02 10:42:07 -04:00
2026-10-03 22:03:44 +05:30
2026-10-07 10:57:34 -07:00