Skip to content

feat: give the omp assistant host tools to manage omp-web - #6

Merged
danielglh merged 3 commits into
mainfrom
feat/assistant-host-tools
Aug 27, 2026
Merged

feat: give the omp assistant host tools to manage omp-web#6
danielglh merged 3 commits into
mainfrom
feat/assistant-host-tools

Conversation

@danielglh

Copy link
Copy Markdown
Owner

Delivers roadmap item 1 (plan recorded in #4).

What the assistant can now do

Assistant-kind sessions announce a management toolset to their agent right
after spawn (set_host_tools):

  • omp_web_list_sessions — every web session: name, status, cwd, id, kind
  • omp_web_create_session — spawn a new coding session (cwd required; optional
    name + initial prompt, which is delivered like any prompt)
  • omp_web_delete_session — stop and remove a session's data
  • omp_web_stop_session — stop an agent without deleting

Invocations arrive as host_tool_call frames; the SessionManager intercepts
them before clients or the replay buffer ever see them, runs them against
its own registry/process management, and answers with host_tool_result.
Guards refuse deleting/stopping the assistant's own hosting session.

Implementation notes

  • Dispatch lives in its own module (host-tools.ts) with a duck-typed manager
    so it stays unit-testable without processes.
  • The bundled mock RPC host now speaks the sub-protocol: records the announced
    toolset, announces registration as a notice, auto-invokes the first tool once
    after setup (like an eager agent) and echoes results as notices.
  • ⚠️ Wire shapes for host_tool_call/host_tool_result follow this bridge's
    existing conventions; verify once against a real omp install before relying
    on the feature outside mock/dev environments.

Tests

  • 8 dispatcher unit tests: tool-set contract, list/create/stop/delete happy
    paths, argument validation, self-deletion/self-stop protection, unknown tools
  • 3 integration tests over the mock bridge: toolset announcement, interception
    (no raw call frames reach clients), result answer delivery

Server suite: 91 → 105 tests; overall line coverage ~96.5%.

Docs: README features note the assistant's session-management abilities;
roadmap item checked off.

Assistant-kind sessions now announce a management toolset to their agent via
set_host_tools after spawn: list sessions, and create / stop / delete them.
When the agent invokes one of these (host_tool_call), the manager intercepts
the frame before it reaches clients or the replay buffer, runs it against its
own registry/process management, and answers with host_tool_result. Guards
prevent the assistant from deleting or stopping its own hosting session.

The bundled mock RPC host now speaks the sub-protocol too: it records the
announced toolset, announces registration as a notice, auto-invokes the first
tool once (like an eager agent) and echoes results as notices — which the
integration tests assert end-to-end.

Wire shapes for host_tool_call/result follow the bridge's existing
conventions; verify once against a real omp install before relying on the
feature outside mock/dev.

Docs: README notes the assistant's session-management abilities; roadmap
item checked off.

Server suite grows to 105 tests (+8 dispatcher unit tests +3 integration);
line coverage holds at ~96.5% overall with new code at 96%.
@danielglh
danielglh merged commit f03e300 into main Aug 27, 2026
1 check passed
@danielglh
danielglh deleted the feat/assistant-host-tools branch August 27, 2026 07:48
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.

1 participant