feat(agents): agent platform — registry, activity hooks, harness allowlist#118
Closed
yyovil wants to merge 1 commit into
Closed
feat(agents): agent platform — registry, activity hooks, harness allowlist#118yyovil wants to merge 1 commit into
yyovil wants to merge 1 commit into
Conversation
…wlist Introduces the shared platform that per-agent adapters plug into, wired for the three shipped harnesses (claude-code, codex, opencode): - adapters/agent/registry: single source of truth for shipped adapters (Constructors), consumed by the daemon to resolve a session's harness. - adapters/agent/activitydispatch + 'ao hooks' command: maps an agent's native hook callbacks onto AO activity states (active/idle/waiting/...). - claudecode/codex/opencode: emit SessionStart/UserPromptSubmit/Stop activity. - HTTP + OpenAPI: report session activity state. - db: single migration widening sessions.harness to all shipped harnesses, so adding an adapter needs no further migration. - domain: harness constants + --agent alias for 'ao spawn'. Adding a new agent is now one adapter package plus a line in Constructors(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
c929644 to
31fdf0e
Compare
Collaborator
Author
|
Superseded by #119 — recreating in-upstream so the adapter stack can base off it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent platform (base of a stacked series)
This is the root PR of a stack. It lands the shared platform that every
per-agent adapter plugs into; each subsequent PR in the stack adds one agent
adapter on top of this.
Wired here for the three already-shipped harnesses —
claude-code,codex,opencode.What's in it
adapters/agent/registry— single source of truth for the shippedadapters (
Constructors()); the daemon resolves a session's harness throughit. Adding an agent becomes one line here.
adapters/agent/activitydispatch+ theao hookscommand — maps anagent's native hook callbacks onto AO activity states
(
active/idle/waiting_input/…).SessionStart/UserPromptSubmit/Stopactivity through the dispatcher.sessions.harnessto all shippedharnesses at once, replacing what was an 18-migration chain where each step
textually depended on the previous one's output (and silently no-op'd if
merged out of order). New adapters now need no further migration.
--agentalias forao spawn.Why a stack
The per-agent adapters are independent packages, but they all register through
the same handful of files (
Constructors(), the activity dispatcher, theharness allowlist). Landing the platform once, then stacking one adapter per PR,
keeps each adapter reviewable in isolation without a tangle of migration-order
and merge hazards.
Testing
go build/go vet/go test ./...green, except the pre-existingTestSessionStreamsRealZellijPaneintegration test, which fails only on theknown environmental zellij IPC-socket-path-too-long issue (long macOS
$TMPDIR)— unrelated to this change.
🤖 Generated with Claude Code