Skip to content

feat(server): agent runtime core — provider seam, Claude Code provider, command dispatcher - #10

Merged
johnnyhuy merged 2 commits into
mainfrom
feat/agent-runtime-core
Aug 5, 2026
Merged

feat(server): agent runtime core — provider seam, Claude Code provider, command dispatcher#10
johnnyhuy merged 2 commits into
mainfrom
feat/agent-runtime-core

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

Summary

  • Provider seam (server/agent/agent-sdk-types.ts): AgentClient / AgentSession / PersistenceHandle per docs/providers.md, plus a disk-backed HandleStore (<supaplaneHome>/agents/<sanitized-cwd>/<session-id>.json) for cross-restart resume.
  • Agent manager: provider registry, Supaplane session ids, event stamping/forwarding, status bookkeeping, clean disposal on daemon stop.
  • Claude Code provider: first real provider via @anthropic-ai/claude-agent-sdk — streaming-input query(), async prompt queue, init handshake captures upstream session id, resume support, modes → permission modes, tool-call normaliser mapping SDK messages to AgentEvents.
  • Command dispatcher + workspace registry: session.start/resume/send/abort and workspace.open/refresh now run end-to-end; unimplemented commands return explicit error frames instead of silence; hello_ack advertises actually-registered providers.
  • Daemon E2E tests (daemon-e2e/): real daemon + real SupaplaneClient + fake provider covering the full session lifecycle, plus unit tests for the tool-call mapper and handle store.

Consequences

  • New dependency: @anthropic-ai/claude-agent-sdk in @echohello/server.
  • Real Claude sessions require the claude CLI on PATH; permission prompts are not yet surfaced (permission.resolve still a stub).

Testing

  • bun run typecheck clean, bun run lint 0 errors
  • 24/24 server tests pass, including 5 new daemon E2E lifecycle tests

johnnyhuyand others added 2 commits August 6, 2026 08:35
AgentClient/AgentSession/PersistenceHandle seam under server/agent,
disk-backed handle store for cross-restart resume, agent-manager for
session lifecycle + event stamping, and the first provider: Claude Code
via @anthropic-ai/claude-agent-sdk with a tool-call normaliser.
Co-authored-by: opencode-agent <hello@sst.dev>
session.start/resume/send/abort and workspace.open/refresh now run
end-to-end; unimplemented commands return explicit error frames;
hello_ack advertises actually-registered providers. Adds daemon E2E
tests with a fake provider covering the full session lifecycle.
Co-authored-by: opencode-agent <hello@sst.dev>
@johnnyhuy
johnnyhuy merged commit eb0eafa into mainAug 5, 2026
johnnyhuy added a commit that referenced this pull request Aug 9, 2026
…r, command dispatcher (#10)
* feat(server): agent provider seam + Claude Code provider
AgentClient/AgentSession/PersistenceHandle seam under server/agent,
disk-backed handle store for cross-restart resume, agent-manager for
session lifecycle + event stamping, and the first provider: Claude Code
via @anthropic-ai/claude-agent-sdk with a tool-call normaliser.
Co-authored-by: opencode-agent <hello@sst.dev>
* feat(server): wire command dispatcher + workspace registry into daemon
session.start/resume/send/abort and workspace.open/refresh now run
end-to-end; unimplemented commands return explicit error frames;
hello_ack advertises actually-registered providers. Adds daemon E2E
tests with a fake provider covering the full session lifecycle.
Co-authored-by: opencode-agent <hello@sst.dev>
---------
Co-authored-by: opencode-agent <hello@sst.dev>
johnnyhuy added a commit that referenced this pull request Aug 9, 2026
…r, command dispatcher (#10)
* feat(server): agent provider seam + Claude Code provider
AgentClient/AgentSession/PersistenceHandle seam under server/agent,
disk-backed handle store for cross-restart resume, agent-manager for
session lifecycle + event stamping, and the first provider: Claude Code
via @anthropic-ai/claude-agent-sdk with a tool-call normaliser.
Co-authored-by: opencode-agent <hello@sst.dev>
* feat(server): wire command dispatcher + workspace registry into daemon
session.start/resume/send/abort and workspace.open/refresh now run
end-to-end; unimplemented commands return explicit error frames;
hello_ack advertises actually-registered providers. Adds daemon E2E
tests with a fake provider covering the full session lifecycle.
Co-authored-by: opencode-agent <hello@sst.dev>
---------
Co-authored-by: opencode-agent <hello@sst.dev>
johnnyhuy added a commit that referenced this pull request Aug 9, 2026
…r, command dispatcher (#10)
* feat(server): agent provider seam + Claude Code provider
AgentClient/AgentSession/PersistenceHandle seam under server/agent,
disk-backed handle store for cross-restart resume, agent-manager for
session lifecycle + event stamping, and the first provider: Claude Code
via @anthropic-ai/claude-agent-sdk with a tool-call normaliser.
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
* feat(server): wire command dispatcher + workspace registry into daemon
session.start/resume/send/abort and workspace.open/refresh now run
end-to-end; unimplemented commands return explicit error frames;
hello_ack advertises actually-registered providers. Adds daemon E2E
tests with a fake provider covering the full session lifecycle.
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
---------
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
johnnyhuy added a commit that referenced this pull request Aug 9, 2026
…r, command dispatcher (#10)
* feat(server): agent provider seam + Claude Code provider
AgentClient/AgentSession/PersistenceHandle seam under server/agent,
disk-backed handle store for cross-restart resume, agent-manager for
session lifecycle + event stamping, and the first provider: Claude Code
via @anthropic-ai/claude-agent-sdk with a tool-call normaliser.
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
* feat(server): wire command dispatcher + workspace registry into daemon
session.start/resume/send/abort and workspace.open/refresh now run
end-to-end; unimplemented commands return explicit error frames;
hello_ack advertises actually-registered providers. Adds daemon E2E
tests with a fake provider covering the full session lifecycle.
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
---------
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
This was referenced Aug 9, 2026
Sign up for freeto 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

@johnnyhuy