Output of website/scripts/generate-skill-docs.py and
scripts/ci/prompt_surface.py render after the skill moves. The default
skills index loses 15 lines (14 skills leave the built-in set, three
become microsoft-office).
A plugin.yaml alone does not make an agent half: desktop-only catalog
plugins (agent-log, githermes, deepseek-whale) ship one beside
desktop/plugin.js as metadata, and the previous commit's rule would plan
an agent install for them that loads nothing. The old __init__.py
requirement was what kept them desktop-only.
Both inspectors now call a plugin.yaml folder an agent half when it has
an agent payload beside the manifest: __init__.py, a dashboard tab or
backend (dashboard/manifest.json), or a manifest-only language pack
(provides_locales plus locales/, the loader's own rule). plugin.json
stays an agent half on its own. The shared detection fixture gains the
cron-bulletin shape, a dashboard-only package, the desktop-only shape and
three language-pack cases; its existing cases are unchanged.
Co-authored-by: dandacompany <128420625+dandacompany@users.noreply.github.com>
`detectPluginComponents` (Electron) and `detect_components` (gateway) required
`plugin.yaml` AND `__init__.py` before calling a folder an agent half. Catalog
plugins that ship a `dashboard/plugin_api.py` backend and no `register(ctx)` —
hermes-cron-bulletin, iowap-hermes-integration and other unified packages — were
therefore reported as desktop-only:
- the install dialog planned the desktop half alone, so `installAgentHalf` never
ran: nothing landed on the backend (local or a remote gateway) and every
`ctx.rest` call answered 404 while the pane sat in the sidebar;
- a manifest-only package with no `desktop/plugin.js` was refused outright with
"No agent or desktop plugin artifacts found", although `hermes plugins
validate` admits it ("manifest-only plugin") and `hermes plugins install`
installs it.
A manifest is enough to mean "this folder is the agent-side package". Update both
inspectors and the fixture they share, and cover the Electron case.
The gateway inspection reported which halves a source ships but not the
commit it read, so for an unpinned Install from Git the reviewed tree and
the installed tree could differ if the source moved in between. Return
the inspected HEAD as `sha` (a catalog entry's is its reviewed pin) and
carry it through inspectAgentPlugin, so the install can be held to it the
way the native Desktop probe's will be. A cached answer keeps the sha it
read.
The component-detection rules now live in two inspectors (Python and
Electron). tests/fixtures/plugin_component_detection.json holds one set
of cases both run, registered as a shared fixture so editing it runs the
pytest and vitest consumers.
Delete the in-tree model-provider plugins plugins/model-providers/copilot/
(provider `copilot`: Copilot API via the GitHub->Copilot token exchange) and
plugins/model-providers/copilot-acp/ (provider `copilot-acp`: Copilot CLI over
ACP). Both ship as ONE plugin, `github-copilot`, in
NousResearch/hermes-labs-plugins; the LEFT_CORE row added before this commit
installs it for every profile that routes through copilot/copilot-acp, and
every "unknown provider" surface names `hermes plugins install
github-copilot`. Core keeps no Copilot code: the generic seams the plugins
fill stay, and agent/copilot_acp_client.py stays as the deprecated alias the
kimchi-acp catalog plugin subclasses (agent.acp_client.ACPClient is the
public base). This commit is revertible on its own: reverting it restores the
bundled providers (the labs plugin stays inert on a core that bundles them).
Test files that only tested the plugins move to the labs plugin's tests:
tests/plugins/model_providers/test_copilot_acp_client.py
tests/plugins/model_providers/test_copilot_acp_deprecation.py
tests/plugins/model_providers/test_copilot_auth.py
tests/plugins/model_providers/test_copilot_catalog_oauth_fallback.py
tests/plugins/model_providers/test_copilot_context.py
tests/plugins/model_providers/test_copilot_custom_model_ids.py
tests/plugins/model_providers/test_copilot_hosts.py
tests/plugins/model_providers/test_copilot_pool_exchange.py
tests/plugins/model_providers/test_copilot_profile.py
tests/plugins/model_providers/test_copilot_refresh_notice.py
tests/plugins/model_providers/test_copilot_setup.py
tests/plugins/model_providers/test_copilot_token_exchange.py
tests/agent/test_copilot_initiator.py
tests/agent/test_copilot_native_vision_headers.py
tests/hermes_cli/test_copilot_in_model_list.py
tests/hermes_cli/test_copilot_model_api_mode.py
tests/hermes_cli/test_copilot_runtime_api_mode.py
tests/hermes_cli/test_copilot_runtime_api_mode_stale.py
tests/hermes_cli/test_model_switch_copilot_api_mode.py
tests/e2e/core/providers/test_native_copilot_acp.py
tests/e2e/core/providers/test_native_copilot_acp_errors.py
tests/e2e/core/providers/test_native_copilot_acp_streaming.py
tests/fakes/providers/copilot_acp.py
Copilot-behaviour cases extracted from generic test files (same move):
test_credential_pool (Copilot pool seeding / gh / env suppression),
test_reasoning_carriers (Copilot carriers), test_run_agent (Copilot gpt-5
reasoning, xhigh), test_run_agent_codex_responses (Copilot 401 refresh),
test_codex_transport (Copilot reasoning), test_auxiliary_main_first (vision
headers), test_private_credential_writers (JWT store row),
test_provider_client_seam (copilot-acp client), test_provider_wire_snapshot
+ its fixture (copilot / github-models cells), test_api_key_providers,
test_auth_commands, test_credential_pool_off_loop (exchange single-flight),
test_external_process_auth_status (Copilot CLI token stores),
test_external_process_provider_seam, test_model_cache_fallback_rows,
test_model_validation, test_models_relay_base_url (copilot row),
test_multiplex_cli_cache_scope, test_provider_catalog, test_cold_start_gil_stall.
Tests that used Copilot only as an example provider now use a fake
ProviderProfile (or another in-tree provider) with the same assertions:
test_auxiliary_client, test_auxiliary_named_custom_providers,
test_init_fallback_on_exhausted_pool, test_intent_ack_continuation,
test_models_dev, test_turn_retry_state, test_one_turn_route_publish,
test_mcp_catalog_env_boundary, test_plugin_provider_picker_residue,
test_delegate_external_provider, test_delegation_profile_route,
test_overlay_slug_resolution, test_installed_plugin_discovery, plus the
generic halves of test_run_agent_codex_responses, test_codex_transport,
test_api_key_providers, test_external_process_auth_status and
test_model_cache_fallback_rows.
Teknium: the ElevenLabs variant of text_to_speech is where voice search belongs, not a
separate tts_voices tool. The ElevenLabs schema now carries voice_id plus a find_voices
object (text optional there); other providers' schema is byte-identical to main.
Live search findings folded in: the library is the default source and sorts by a year of
usage (most-used first); use_case (e.g. characters_animation) and sort filters; library
voices with a custom credit rate show credit_rate; the description tells the model the
library matches words literally, so a role word that finds nothing ('dwarf') falls back to
describing the sound ('gravelly old' + filters).
With tts.provider: elevenlabs, text_to_speech gains an optional voice_id and a new
tts_voices tool searches the user's account voices (/v2/voices) or the public
Voice Library (/v1/shared-voices) with query/gender/age/accent/language filters and
an opaque next_page cursor. Both are gated on the ElevenLabs provider (dynamic
schema override + check_fn), so every other provider's surface is unchanged. A
per-call voice_id never rewrites config; a stale one sent under another provider is
ignored with a warning.
Measured on a real config with an 832-tool Unreal MCP server plus blender (30) and
meshy (28): once the listing collapsed Unreal to its one summary line, every other
server stayed names-only, although their full lines fit the 4,000-token budget.
Step 3 of build_catalog_listing_with_form now retries the uncollapsed servers in
full form before names-only.
Two description fixes in the same block:
- one-tool groups drop their "<label> tools (1):" heading and render as bare lines
under the catalog header (placed first so they never read as members of the
group above);
- the connectors sentence no longer cites example apps (Gmail, Linear) the user
may not have connected. Hosted connector tools are never listed (tool_search
searches them remotely), so the sentence now says searches also cover the
user's connected app accounts and how their results are named.
Prompt-surface snapshot regenerated (stock CLI tools: 11,490 -> 11,468 tokens).
Greptile finding "Browser recommends a missing tool": the non-native
browser_exec header picked its vision_analyze pointer from
check_vision_requirements(), which reports whether a vision route exists,
not whether this session exposes the tool, so a session with `vision`
disabled was told to call a tool it does not have (tools/AGENTS.md:
cross-toolset references are added in get_tool_definitions()).
The header now states only the transport fact ("Screenshots are not
attached to this tool's results. Work text-first: ..."), still never
calling the model blind, and model_tools' browser_exec rewriter appends the
vision_analyze pointer when "vision_analyze" is in the session's available
set. The native header (screenshots ride back in the result) never gets it.
Prompt-surface fixtures re-rendered: the stock render has vision_analyze,
so browser_exec gains the pointer (+8 tokens per surface).
Maintainer-approved prompt-footprint trims (measured on the Nous endpoint, anthropic/claude-opus-5.5):
All sessions
- The [SKILL_PRUNED] "Skill Safety Rule" (126 tok) left the system prompt: markers only exist after a
compaction, so the compaction handoff now carries the rule whenever a marker survives in the
compacted transcript (context_compressor_tail.with_skill_safety_rule, applied in
_assemble_compressed for LLM and fallback summaries alike). The "## Pruned Skills" block drops
its own parenthetical, which the rule now covers. `hermes sessions repair-prompts` keyed its
"full build" detector on the rule's heading; it now keys on SKILLS_GUIDANCE (present in prompts
built before and after this change).
- The CLI/TUI cron "LOCAL-ONLY" caveat (154 tok) moved from the platform hints into
cronjob_manage's deliver description (a deferred tool: paid only when loaded).
- The Hermes help pointer no longer restates identity ("You run on Hermes Agent (by Nous
Research)") after SOUL.md's "You are Hermes Agent, built by Nous Research."; it now opens "For
help with Hermes Agent itself — ...", which still tells a custom persona what it runs on (22 tok).
One-shot sessions only (-q/--oneshot/-z, and gateway-owned `oneshot` policy sessions)
- No "## Mid-turn user steering" note (253 tok): nobody can steer a one-shot.
- No clarify tool (590 tok): ONESHOT_DISABLED_TOOLSETS is folded into session_disabled_toolsets
(oneshot=...), so the agent tool build, MCP refresh, the tool_search bridge, delegate children and
the gateway's session inventory / tool listings all drop it together. skill_manage stays.
- delegate_task without live control (425 tok): action/subagent_id/message and the
background-delivery paragraph are removed (children are joined inside the call), applied via
toolsets.agent_tool_surface at load and MCP refresh. The one-shot fact is frozen on the agent at
its first tool build so refreshes stay byte-stable.
Interactive tool schemas are byte-identical to main.
- A category holding one skill renders as a single top-level row
(" - computer-use: ...") instead of a header that repeats the name.
- Descriptions over SKILL_PROMPT_DESC_LIMIT (60) are clipped at a word
boundary, never mid-word; plugin skill rows are clipped too (they were
not at all). Snapshot v5 so cached mid-word clips are rebuilt.
- skill_manage rejects a description over 60 chars whenever the call
writes it (create, or an edit/patch that changes it); an unchanged legacy
description no longer blocks a body edit. The schema text says the limit
and that a description must not repeat the category name; skills/AGENTS.md,
hermes-agent-skill-authoring and the curator prompt match.
- test_authoring_standards reads the limit from SKILL_PROMPT_DESC_LIMIT so
the CI hardline and the index clip cannot drift apart.
- prompt_size and the skills-index turn delta read both row depths.
The schema said "use the qualified form 'plugin:skill'" while the skills
index lists plugin skills under a heading named plugin; models read the
word literally and prefixed it. Placeholders stop the bad call at its
source (+1 tool token); the prefix tolerance stays for older transcripts.
The deferred tool_search catalog shows each tool's first sentence clipped to
60 chars, so lines like 'image_generate: Generate high-quality images from
text prompts, or edit /…' hid that it edits with reference images on the
user's configured model. An agent skipped it and called FAL directly with a
hardcoded model.
- catalog line cap 60 -> 80 (CATALOG_SUMMARY_MAX_CHARS); every built-in
tool's first sentence now fits and leads with what it does
- image_generate/video_generate say they use the configured model;
image_generate says to use it rather than direct API calls/scripts
- web_search/web_extract/browser_exec name when to use each other
- drop a duplicated cronjob sentence and filler in skill_view/video_generate
- regenerate tests/fixtures/prompt_surface
hermes tools: the Camofox and separate Browser Use rows and the agent_browser,
browser_use_cli and camofox post-setup hooks are gone; Local Browser's hook is
chromium (pm.ensure("chromium"); Termux and the Docker image get a hint).
Provider picker logic keyed on browser.backend is removed. Doctor's agent-browser
rows become one Chromium row via chromium_executable(); doctor --live, Nous
subscription browser checks and setup summary rows follow.
Ten browser_* schemas leave every surface (cli.claude: 33 -> 23 tools,
-1735 est. tok, -1384 o200k tok per request); browser_cdp / browser_dialog
descriptions follow the session layer. System prompts unchanged.
Its one caller (tools/browser_tool_install.py) is now the frozen
old-updater stub, and the two bare_which sites the allowlist named there
are gone with it.
The Singularity/Apptainer backend (tools/environments/singularity.py) now ships
as the official 'singularity' plugin in NousResearch/hermes-official-plugins,
registered through the terminal-environment provider seam under the same
backend name and config keys (terminal.backend: singularity,
terminal.singularity_image / TERMINAL_SINGULARITY_IMAGE, terminal.container_*).
- 'singularity' leaves BUILTIN_BACKEND_NAMES so the plugin can register it;
every hardcoded classification set drops it (the provider declares
is_remote/is_container/supports_streams instead).
- LEFT_CORE gains a singularity row: homes whose terminal.backend (or .env
TERMINAL_ENV) is singularity get the catalog plugin once, on hermes update
or agent/gateway start. An unknown-backend error for 'singularity' names
the install command (new row field terminal_backend).
- A plugin backend receives its per-task '<backend>_image' override; batch
runs register one for the active backend.
- BaseEnvironment's sudo-probe knob is renamed _passwordless_sudo_probe_supported:
plugin backends set it, and the old spelling trips the install scanner.
- Core's scratch-dir disk warning and process-exit sweep were Singularity-only
and move to the plugin; the singularity setup row, dashboard probe/row and
config defaults/bridges go too. Docs point at the plugin.
gateway/platforms/signal{,_format,_rate_limit}.py -> plugins/platforms/signal/
(adapter.py + satellites, history-preserving renames). register(ctx) declares
the PlatformEntry hooks core used to hard-wire: requirements probe, config
gate (with the old 'SIGNAL_HTTP_URL or SIGNAL_ACCOUNT not configured' warning),
is_connected, allowlist/home env vars, max_message_length=8000, emoji, pii_safe,
allow_update_command. The out-of-process JSON-RPC sender (attachments still
ride the 'attachments' param, shared rate-limit scheduler) moves to
standalone.py as standalone_sender_fn; the setup wizard moves to setup.py as
setup_fn, unchanged flow. Tests repointed at the plugin path.
Co-authored-by: Karl Johannisson <karl.johannisson@gmail.com>
(cherry picked from commit eb9f7e730a39d702aea2505855631e3137ab509b)
gateway/platforms/whatsapp_cloud.py -> plugins/platforms/whatsapp_cloud/adapter.py and
hermes_cli/setup_whatsapp_cloud.py -> plugins/platforms/whatsapp_cloud/setup_wizard.py (git mv).
register(ctx) wires adapter_factory, check_fn, is_connected, required_env, install_hint,
setup_fn (the same wizard `hermes whatsapp-cloud` runs), allowed_users/allow_all env,
cron_deliver_env_var, label/emoji. gateway/platforms/whatsapp_common.py stays in core
(shared with the Baileys plugin and CLI helpers). Tests and docs point at the plugin path.
Co-authored-by: sprmn24 <oncuevtv@gmail.com>
(cherry picked from commit a3b08efc0249c2dcd3472e4a25addc3f3a2b0d5c)
375 commits from main (0e427d788d). 24 files conflicted; the resolutions that carry a decision:
- /initiate-setup: main removed the command (25bf722063). Its gateway rewrite, CLI handler and the
Desktop kickoff go with main; this branch's command-layer admission of it is dropped too
(gateway/session_commands.py _PROMPT_COMMANDS, its slash.exec test row, the parity doc row), and
the Desktop slash dispatcher loses the `hidden` option that only the kickoff used.
- Code this branch moved out of its old file, carrying main's edits to the moved copy:
first-contact notes (gateway/run_turn.py -> run_turn_prepare.py: no message/setup_command),
the TUI agent factory (tui_gateway/server.py -> agent_factory.py: onboarding toolsets at build,
setup_beat/set_theme lifecycle cards, no cli platform extras on a coding selection), the serve
lifespan (web_server.py -> web_server_app.py standalone_lifespan: first-install probe before the
state.db reconcile, onboarding due answer after the setup bootstrap), and the compression child
publish (the shared _publish_compression_child_on_conn reads the parent's model_config).
- agent/auxiliary_client.py: both import changes (_route_key from main; this branch's move of
_without_structured_output_format).
- Desktop: main's onboarding run (decideOnboarding, OnboardingEnd, card-waiting Send) replaces the
kickoff; this branch's prepared-submission slash path, request_id on session.create and
PreparedImageRecovery stay. Pool-limits imports are dropped (this branch removed the pool).
createBackendSessionForSend takes main's (preview, overrides) signature.
- ci.yaml detect job: main's `ref: inputs.commit` plus this branch's sparse checkout.
- package.json / lock: main's vitest 4.1.11 plus this branch's ws 8.21.1.
- Generated: gateway-contract.openrpc.json regenerated; parity doc regenerated.
_outside_package and _packaged_npx_entry call which() with an explicit
path= of the sealed payload's own dirs, never the ambient PATH, so the
managed-runtime ratchet's "no bare lookups" rule does not apply. Record
both sites and the node lookup, as the other PM-composed call sites are.
Google deprecated thinking_budget in favour of the thinking_level string enum, and
the sampling controls (temperature/top_p/top_k) are ignored (slated for removal)
from Gemini 3.6 onward.
- _build_gemini_thinking_config: the disable-reasoning path now sends
thinkingLevel "low" for Gemini 3+ (and the gemini-flash-latest alias) instead
of the deprecated thinkingBudget 0; Gemini 2.5 keeps thinkingBudget 0, which
it still documents. "low" is the lowest level the whole 3.x family accepts
(3.6's "minimal" 400s on 3.7+/3.1 Pro).
- _thinking_requests_output_headroom: hidden thoughts (includeThoughts false) no
longer request max-token headroom, so the disable path's small budgets (title
generation's 64 tokens) are preserved even though it now carries a
thinkingLevel.
- _fixed_temperature_for_model: new _is_gemini_sampling_deprecated() returns
OMIT_TEMPERATURE for Gemini 3.6+ so the aux callers
(oneshot/micro_compaction/side_question) stop sending a deprecated
temperature; older Gemini families keep it.
Static-verified (py_compile + import smoke test); unit tests and the provider
wire snapshot updated.
The desktop tool count in surfaces.json was taken from the base side while
the stack was rebased onto main, so it no longer matched the rendered tool
schemas (13914 vs 13912 tokens). Rendered with
scripts/ci/prompt_surface.py render on Linux; no other snapshot file changed.
set_theme (desktop_ui, deferred like apply_layout was) sets the accent,
light/dark mode and layout preset, or with `picker` shows an accent or
layout card and waits up to 300 s. apply_layout emitted a layout.apply
event and returned success whether or not the renderer applied anything;
set_theme asks the renderer through the theme.apply server request and
returns its answer, so an unknown preset or a chat that is not on screen
comes back as an error with the available ids.
theme.pick waits for a person; the backend tells a dismissed card
({cancelled}) from an expired one ({timed_out}). The tool description
lists the Simple and Advanced preset ids from one constant, which fixes
the old description that named neither sidebar preset. The layout.apply
event and its renderer handler are deleted with the tool.
215 commits from main (c70332f888). One textual conflict: the generated
apps/shared/src/gateway-contract.generated.ts, regenerated with scripts/gen_gateway_contracts.py
rather than hand-merged. Brings main's fix for the dated shared-metrics install-receipt test
(783637e370).
Dropping the replace action also dropped the only schema text that said
content is required. In a consolidation trial on Qwen3.8-27B, the model
then sent batch patch operations with old_text set to a whole entry and
no content, and repeated the call until the retry cap stopped it (4 of 14
consolidation runs). Both content descriptions, the top-level one and the
batch item's, now say the field is required. With the wording back, no run
has hit that loop so far (3 Qwen consolidation runs; 64/64 on Opus 4.8 and
on Opus 5.5). Cost: 15 tool-schema tokens per surface.
Previous merge base 3b63f7b0a4. Seven conflicts, all Desktop; each keeps
both sides' behaviour.
apps/desktop/src/app/chat/composer/hooks/use-composer-submit.ts
main: composer text answers ANY parked card through the new
store/parked-card-answers registry (answerParkedCard), so
answerSetupCard is no longer imported here.
branch: added `import type { BusyInputMode }` for the configured
busy-input mode.
merged: both imports kept; answerSetupCard dropped (main's registry
reaches it via clarify.ts answerClarifyText).
apps/desktop/src/app/chat/composer/hooks/use-composer-submit.test.tsx
main: "answers one question per submit while a busy turn waits"
now expects clarify.lock (no steer) and adds "brings the card
back when an earlier lock fails after the last answer cleared it".
branch: the old body of that test with onSteer(..., 'interrupt').
merged: main's body (main changed the contract: typed text is the
answer, not a steer); the branch's busyInputMode harness and
every other 'interrupt' assertion stay.
apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.ts
main: connectionRequestNoticeBody() (display card with no targets
falls back to connectors.title) + ConnectionRequest type import.
branch: handlePromptSettledEvent() for approval/clarify.settled.
merged: both functions, adjacent.
apps/desktop/src/app/session/hooks/use-session-actions/index.ts
main: moved desktopSessionCreateParams verbatim into
session-create-request.ts and imports it from there.
branch: added the resume-owner import block.
merged: resume-owner imports + `{ createGatewaySession,
desktopSessionCreateParams }` from session-create-request
(the branch's copy of the function was byte-identical to the
base and is removed by main's hunk).
apps/desktop/src/components/assistant-ui/clarify/pending.tsx
main: seenLocks state so a newly locked answer (composer text)
replaces the staged pick while a seen one leaves card edits.
branch: per-requestId card reset (submit latch + staged picks) when
the canonical gateway reuses the row for the next card.
merged: both; the card reset also clears seenLocks so the next
card's locks are treated as new.
apps/desktop/src/i18n/ja.ts, apps/desktop/src/i18n/ru.ts
main: jaConnectors / ruConnectors split files.
branch: jaBoot / ruBoot split files.
merged: union of imports (key spreads auto-merged).
Lost-line check: every non-blank line main added since 3b63f7b0a4
(79 files) is present in the merged tree.
Resolves the prompt-surface conflict by regenerating surfaces.json: main's
manage_connections description and this branch's memory schema both move
the per-surface tool_tokens totals (13,262 merged; main is at 13,339).
Found on the desktop pass: with "'connectors' pinned as Suggested",
GLM 5.2 called display with no connectors although the user named two,
then called status after Continue and printed the full catalogue. The
text now says to put slugs to suggest in 'connectors' and that the user
saw the list. Same length (about 65 tokens).
Sid's review of the display action:
- The display text in the manage_connections description is cut to about
60 tokens; every session (cron and messaging included) pays for it.
- "said" is removed from the wire (ConnectionAnswer), the backend, the
description, the receipt copy and the renderer. Nothing sent it; typed
answers for this card arrive with the composer registry later.
- The 300 s deadline now returns connected and newly_connected with
timed_out: true, so an app the user connected before walking away is
reported. The receipt names it.
Add action "display": on a desktop session the call opens an operation
with no targets, emits connection.request with display.suggested, and
holds the tool thread until Continue, a typed answer (said), the 300 s
deadline or /stop. It returns connected / newly_connected / suggested,
computed from the gateway list read at the start and at settle, or
{said} / {timed_out}. Off desktop it returns the status list and says
where to connect.
The card reuses the existing operation transport: connection.respond by
op_id settles it; ConnectionAnswer gains "said". Connecting from the
card runs the Connectors page's account operation, so the two never
share the session's one open slot. The managed_tools gate is unchanged.
The per-user-quota endpoint exposes no model listing to user tokens, so the
picker shows the hardcoded fallback list. Replace the older flash aliases with
the current models; lite stays last as the quota reserve.
replace overwrote the whole matched entry, and models used it as a
find-and-swap, wiping the sibling facts in multi-fact entries (NVIDIA:
19/40 tasks on Opus 4.8). patch does everything replace did (old_text =
the whole entry rewrites it) without that failure, so the tool now
offers add / patch / remove only.
- A replace call, single or inside a batch, is refused with a pointer to
patch and writes nothing. Writes staged for approval before this change
still pin, display and replay through the store's replace.
- The schema loses the replace warnings, explains patch once, and drops
the added target prose: target is already an enum in `required`, the
runtime refusal teaches a missing or nested target, and batch items now
set additionalProperties: false so a nested target cannot be expressed.
- Net tool tokens per session: 13,264 on main -> 13,188 (-76); the PR
head before this commit was 13,446.
- Model-facing hints that said "shorten (replace)" now say patch.
Reverses the whole-entry replace contract from #117952 by maintainer
decision; the tests that drove replace through the tool now drive patch,
and one new test pins the refusal.
The memory tool schema now requires a top-level target and offers patch,
so tools/memory.json and the tool_tokens counts in surfaces.json change
(+182 to +183 tokens per surface).
Conflicts (2 files, 1 hunk each); every main-side change is kept, ported to
where the branch moved the code:
hermes_cli/kanban_db.py (build_worker_context helpers _ctx_cap .. _ctx_comments)
main: f5a6651231c/d56e357556f coerce foreign/text timestamps on read; in
_ctx_role_history the "Recent work" stamp became
_ctx_stamp(_to_epoch(row['ended_at']) or 0, now) instead of int().
branch: moved the whole _ctx_* helper block into hermes_cli/kanban_db_context.py
(kanban_db.py imports it back), deleting it from kanban_db.py.
merged: kept the branch's deletion in kanban_db.py and applied main's change in
kanban_db_context.py::_ctx_role_history as
_ctx_stamp(_kb._to_epoch(row['ended_at']) or 0, now). Main's other
timestamp coercions in kanban_db.py (Task/Run/Comment/Attachment/Event
from_row, _TASK_EPOCH_COLUMNS, release_stale_claims,
_extend_live_stale_claim, task_age) auto-merged unchanged.
hermes_cli/web_server.py (_lifespan)
main: d7830c6f42 reworded one comment in the free-tier bootstrap block
("the ONE place its identity is created" -> "the one boot-time creator
of its identity"; guests are now also created on first connector use).
branch: moved _lifespan's body into hermes_cli/web_server_app.py::app_lifespan.
merged: kept the branch's relocation and applied main's comment rewording in
web_server_app.py.
Merge-induced health fix (no conflict marker; the combination tripped the ratchet):
apps/desktop/src/app/session/hooks/use-cwd-actions.ts::changeSessionCwd
main: 63ed3caa4ba/dbc538547fc grew the function (statusbar cwd change for the
focused chat / tile runtime ids) to CC 20.
branch: added the session_busy refusal mapping (sidebar.projects.moveBusy) in
its catch, +1 branch -> CC 21 > target 20 (scripts/check health blocking).
merged: both behaviours kept; the busy-error mapping moved verbatim into a
module-level cwdChangeError(err) helper. Health back to 0 blocking.
Check: every line main added between 1fd1827726 and 3b63f7b0a4 (317 files) is
present in the merged tree.
The stock prompt surface regrew ~3.4k tokens after the August diet, almost
all from features added straight into the never-deferred core. This takes
back the biggest pieces:
- browser_vault: the five eager browser_vault_* tools (list, fill, unlock,
save_login, enter_code) become one browser_vault tool with an action enum,
deferred behind tool_search by default. It still rides with the browser
(an empty vault keeps save_login reachable), so discovery holds; only a
catalog line is paid per request. Results and errors name the new actions;
the input-tool password note points at it through tool_call.
- terminal: schema re-dieted (1,136 -> 651 Qwen tokens). Description and
param docs no longer repeat each other; heartbeat / persist_on_release keep
their rules in one line each; process(...) references name process_manage.
- tool_search / tool_call: the keyword-query rule lives once, in the queries
param; description and connector hint trimmed.
- system prompt: the "Async handoff" block is removed. Its rule ships in the
delegate_task description and in the background dispatch result the model
reads at the moment it matters, and the polling loop it targeted is guarded
structurally (#124724).
Stock CLI surface (prompt-surface render, chars/4): 18,612 -> 16,524.
Fresh install, Qwen3 tokenizer: 14,962 -> 13,120 (Sep 7 post-diet: 11,595).
Live A/B harness: evals/prefix_rediet/.
Conflicts (5 files):
- gateway/run_notifications.py: main lifted completion ownership into a new
GatewayNotificationOwnershipMixin (run_notifications_ownership.py); the branch had lifted the
update watcher into GatewayUpdateNotificationsMixin. The mixin inherits both. Kept both sides
of the completion-event metadata (the branch's automation identities + local display card,
main's proven_session_id / completion_ids), and in the async-delegation group the branch's
authority admission runs first, then main's terminal-parent drop. Neither function main moved
was changed on the branch.
- gateway/run_turn.py: the branch moved _hmwa_resolve_session into run_turn_prepare.py; main's
one changed line there (the resolver receives the proven session id and completion ids) is
ported into run_turn_prepare.py.
- hermes_cli/subcommands/sessions.py: keep both main's lazy cmd_sessions and the branch's
rename/discard parser helper.
- ui-tui: keep both canonicalEn and connectorsEn catalogs; keep the branch's interfaces import
plus main's findSlashCommand import.