@elizaos/plugin-agent-orchestrator 2.0.0-beta.1 → 2.0.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -8
- package/README.md +102 -30
- package/docs/SUBAGENT_FLOW_AND_PARITY.md +138 -0
- package/docs/default-eliza-skills-and-agent-bridge-plan.md +9 -15
- package/docs/economics-goal-runbook.md +140 -0
- package/docs/multi-account-orchestration.md +76 -0
- package/docs/orchestrator-buildout-followups.md +124 -0
- package/docs/orchestrator-dashboard-task-widget-secrets-assessment.md +174 -0
- package/docs/orchestrator-dashboard-task-widget-secrets-design.md +301 -0
- package/docs/research/orchestrator-view-research-report.md +273 -0
- package/docs/sub-agent-routing.md +53 -23
- package/package.json +108 -25
- package/PROJECT.md +0 -119
- package/dist/browser/index.browser.js +0 -21051
- package/dist/browser/index.browser.js.map +0 -29
- package/dist/browser/index.d.ts +0 -2
- package/dist/cjs/index.d.ts +0 -2
- package/dist/cjs/index.node.cjs +0 -20491
- package/dist/cjs/index.node.js.map +0 -72
- package/dist/index.d.ts +0 -2
- package/dist/node/index.browser.d.ts +0 -3
- package/dist/node/index.browser.d.ts.map +0 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.d.ts.map +0 -1
- package/dist/node/index.node.d.ts +0 -4
- package/dist/node/index.node.d.ts.map +0 -1
- package/dist/node/index.node.js +0 -20471
- package/dist/node/index.node.js.map +0 -72
- package/dist/node/src/actions/cancel-task.d.ts +0 -3
- package/dist/node/src/actions/cancel-task.d.ts.map +0 -1
- package/dist/node/src/actions/coding-task-handlers.d.ts +0 -69
- package/dist/node/src/actions/coding-task-handlers.d.ts.map +0 -1
- package/dist/node/src/actions/coding-task-helpers.d.ts +0 -35
- package/dist/node/src/actions/coding-task-helpers.d.ts.map +0 -1
- package/dist/node/src/actions/common.d.ts +0 -56
- package/dist/node/src/actions/common.d.ts.map +0 -1
- package/dist/node/src/actions/create-task.d.ts +0 -8
- package/dist/node/src/actions/create-task.d.ts.map +0 -1
- package/dist/node/src/actions/eval-metadata.d.ts +0 -11
- package/dist/node/src/actions/eval-metadata.d.ts.map +0 -1
- package/dist/node/src/actions/finalize-workspace.d.ts +0 -11
- package/dist/node/src/actions/finalize-workspace.d.ts.map +0 -1
- package/dist/node/src/actions/list-agents.d.ts +0 -4
- package/dist/node/src/actions/list-agents.d.ts.map +0 -1
- package/dist/node/src/actions/manage-issues.d.ts +0 -11
- package/dist/node/src/actions/manage-issues.d.ts.map +0 -1
- package/dist/node/src/actions/provision-workspace.d.ts +0 -11
- package/dist/node/src/actions/provision-workspace.d.ts.map +0 -1
- package/dist/node/src/actions/sandbox-stub.d.ts +0 -21
- package/dist/node/src/actions/sandbox-stub.d.ts.map +0 -1
- package/dist/node/src/actions/send-to-agent.d.ts +0 -4
- package/dist/node/src/actions/send-to-agent.d.ts.map +0 -1
- package/dist/node/src/actions/spawn-agent.d.ts +0 -8
- package/dist/node/src/actions/spawn-agent.d.ts.map +0 -1
- package/dist/node/src/actions/stop-agent.d.ts +0 -4
- package/dist/node/src/actions/stop-agent.d.ts.map +0 -1
- package/dist/node/src/actions/task-control.d.ts +0 -3
- package/dist/node/src/actions/task-control.d.ts.map +0 -1
- package/dist/node/src/actions/task-history.d.ts +0 -3
- package/dist/node/src/actions/task-history.d.ts.map +0 -1
- package/dist/node/src/actions/task-share.d.ts +0 -3
- package/dist/node/src/actions/task-share.d.ts.map +0 -1
- package/dist/node/src/actions/task-thread-target.d.ts +0 -11
- package/dist/node/src/actions/task-thread-target.d.ts.map +0 -1
- package/dist/node/src/actions/tasks.d.ts +0 -88
- package/dist/node/src/actions/tasks.d.ts.map +0 -1
- package/dist/node/src/api/agent-routes.d.ts +0 -18
- package/dist/node/src/api/agent-routes.d.ts.map +0 -1
- package/dist/node/src/api/bridge-routes.d.ts +0 -32
- package/dist/node/src/api/bridge-routes.d.ts.map +0 -1
- package/dist/node/src/api/coordinator-routes.d.ts +0 -22
- package/dist/node/src/api/coordinator-routes.d.ts.map +0 -1
- package/dist/node/src/api/hook-routes.d.ts +0 -18
- package/dist/node/src/api/hook-routes.d.ts.map +0 -1
- package/dist/node/src/api/issue-routes.d.ts +0 -17
- package/dist/node/src/api/issue-routes.d.ts.map +0 -1
- package/dist/node/src/api/parent-context-routes.d.ts +0 -17
- package/dist/node/src/api/parent-context-routes.d.ts.map +0 -1
- package/dist/node/src/api/route-utils.d.ts +0 -18
- package/dist/node/src/api/route-utils.d.ts.map +0 -1
- package/dist/node/src/api/routes.d.ts +0 -23
- package/dist/node/src/api/routes.d.ts.map +0 -1
- package/dist/node/src/api/workspace-routes.d.ts +0 -17
- package/dist/node/src/api/workspace-routes.d.ts.map +0 -1
- package/dist/node/src/index.d.ts +0 -32
- package/dist/node/src/index.d.ts.map +0 -1
- package/dist/node/src/providers/action-examples.d.ts +0 -14
- package/dist/node/src/providers/action-examples.d.ts.map +0 -1
- package/dist/node/src/providers/active-sub-agents.d.ts +0 -15
- package/dist/node/src/providers/active-sub-agents.d.ts.map +0 -1
- package/dist/node/src/providers/active-workspace-context.d.ts +0 -13
- package/dist/node/src/providers/active-workspace-context.d.ts.map +0 -1
- package/dist/node/src/providers/available-agents.d.ts +0 -4
- package/dist/node/src/providers/available-agents.d.ts.map +0 -1
- package/dist/node/src/register-routes.d.ts +0 -11
- package/dist/node/src/register-routes.d.ts.map +0 -1
- package/dist/node/src/routes/coding-agents-fallback-routes.d.ts +0 -19
- package/dist/node/src/routes/coding-agents-fallback-routes.d.ts.map +0 -1
- package/dist/node/src/services/acp-service.d.ts +0 -61
- package/dist/node/src/services/acp-service.d.ts.map +0 -1
- package/dist/node/src/services/acpx-subprocess.d.ts +0 -3
- package/dist/node/src/services/acpx-subprocess.d.ts.map +0 -1
- package/dist/node/src/services/agent-credentials.d.ts +0 -23
- package/dist/node/src/services/agent-credentials.d.ts.map +0 -1
- package/dist/node/src/services/agent-metrics.d.ts +0 -30
- package/dist/node/src/services/agent-metrics.d.ts.map +0 -1
- package/dist/node/src/services/agent-selection.d.ts +0 -53
- package/dist/node/src/services/agent-selection.d.ts.map +0 -1
- package/dist/node/src/services/ansi-utils.d.ts +0 -64
- package/dist/node/src/services/ansi-utils.d.ts.map +0 -1
- package/dist/node/src/services/claude-code-skill-installer.d.ts +0 -33
- package/dist/node/src/services/claude-code-skill-installer.d.ts.map +0 -1
- package/dist/node/src/services/config-env.d.ts +0 -23
- package/dist/node/src/services/config-env.d.ts.map +0 -1
- package/dist/node/src/services/coordinator-event-normalizer.d.ts +0 -50
- package/dist/node/src/services/coordinator-event-normalizer.d.ts.map +0 -1
- package/dist/node/src/services/custom-validator-runner.d.ts +0 -66
- package/dist/node/src/services/custom-validator-runner.d.ts.map +0 -1
- package/dist/node/src/services/debug-capture.d.ts +0 -38
- package/dist/node/src/services/debug-capture.d.ts.map +0 -1
- package/dist/node/src/services/json-model-output.d.ts +0 -2
- package/dist/node/src/services/json-model-output.d.ts.map +0 -1
- package/dist/node/src/services/parent-agent-broker.d.ts +0 -21
- package/dist/node/src/services/parent-agent-broker.d.ts.map +0 -1
- package/dist/node/src/services/pty-auto-response.d.ts +0 -30
- package/dist/node/src/services/pty-auto-response.d.ts.map +0 -1
- package/dist/node/src/services/pty-init.d.ts +0 -55
- package/dist/node/src/services/pty-init.d.ts.map +0 -1
- package/dist/node/src/services/pty-service.d.ts +0 -218
- package/dist/node/src/services/pty-service.d.ts.map +0 -1
- package/dist/node/src/services/pty-session-io.d.ts +0 -49
- package/dist/node/src/services/pty-session-io.d.ts.map +0 -1
- package/dist/node/src/services/pty-spawn.d.ts +0 -104
- package/dist/node/src/services/pty-spawn.d.ts.map +0 -1
- package/dist/node/src/services/pty-types.d.ts +0 -94
- package/dist/node/src/services/pty-types.d.ts.map +0 -1
- package/dist/node/src/services/repo-input.d.ts +0 -16
- package/dist/node/src/services/repo-input.d.ts.map +0 -1
- package/dist/node/src/services/session-event-queue.d.ts +0 -25
- package/dist/node/src/services/session-event-queue.d.ts.map +0 -1
- package/dist/node/src/services/session-store.d.ts +0 -107
- package/dist/node/src/services/session-store.d.ts.map +0 -1
- package/dist/node/src/services/skill-callback-bridge.d.ts +0 -78
- package/dist/node/src/services/skill-callback-bridge.d.ts.map +0 -1
- package/dist/node/src/services/skill-essentials.d.ts +0 -16
- package/dist/node/src/services/skill-essentials.d.ts.map +0 -1
- package/dist/node/src/services/skill-lifeops-context-broker.d.ts +0 -20
- package/dist/node/src/services/skill-lifeops-context-broker.d.ts.map +0 -1
- package/dist/node/src/services/skill-manifest.d.ts +0 -48
- package/dist/node/src/services/skill-manifest.d.ts.map +0 -1
- package/dist/node/src/services/skill-recommender.d.ts +0 -51
- package/dist/node/src/services/skill-recommender.d.ts.map +0 -1
- package/dist/node/src/services/spawn-trajectory.d.ts +0 -23
- package/dist/node/src/services/spawn-trajectory.d.ts.map +0 -1
- package/dist/node/src/services/stall-classifier.d.ts +0 -69
- package/dist/node/src/services/stall-classifier.d.ts.map +0 -1
- package/dist/node/src/services/structured-proof-bridge.d.ts +0 -99
- package/dist/node/src/services/structured-proof-bridge.d.ts.map +0 -1
- package/dist/node/src/services/sub-agent-router.d.ts +0 -38
- package/dist/node/src/services/sub-agent-router.d.ts.map +0 -1
- package/dist/node/src/services/swarm-coordinator-prompts.d.ts +0 -93
- package/dist/node/src/services/swarm-coordinator-prompts.d.ts.map +0 -1
- package/dist/node/src/services/swarm-coordinator.d.ts +0 -473
- package/dist/node/src/services/swarm-coordinator.d.ts.map +0 -1
- package/dist/node/src/services/swarm-decision-loop.d.ts +0 -69
- package/dist/node/src/services/swarm-decision-loop.d.ts.map +0 -1
- package/dist/node/src/services/swarm-event-triage.d.ts +0 -49
- package/dist/node/src/services/swarm-event-triage.d.ts.map +0 -1
- package/dist/node/src/services/swarm-history.d.ts +0 -27
- package/dist/node/src/services/swarm-history.d.ts.map +0 -1
- package/dist/node/src/services/swarm-idle-watchdog.d.ts +0 -22
- package/dist/node/src/services/swarm-idle-watchdog.d.ts.map +0 -1
- package/dist/node/src/services/task-acceptance.d.ts +0 -8
- package/dist/node/src/services/task-acceptance.d.ts.map +0 -1
- package/dist/node/src/services/task-agent-auth.d.ts +0 -69
- package/dist/node/src/services/task-agent-auth.d.ts.map +0 -1
- package/dist/node/src/services/task-agent-frameworks.d.ts +0 -90
- package/dist/node/src/services/task-agent-frameworks.d.ts.map +0 -1
- package/dist/node/src/services/task-kind.d.ts +0 -3
- package/dist/node/src/services/task-kind.d.ts.map +0 -1
- package/dist/node/src/services/task-policy.d.ts +0 -17
- package/dist/node/src/services/task-policy.d.ts.map +0 -1
- package/dist/node/src/services/task-registry.d.ts +0 -550
- package/dist/node/src/services/task-registry.d.ts.map +0 -1
- package/dist/node/src/services/task-share.d.ts +0 -18
- package/dist/node/src/services/task-share.d.ts.map +0 -1
- package/dist/node/src/services/task-validation.d.ts +0 -69
- package/dist/node/src/services/task-validation.d.ts.map +0 -1
- package/dist/node/src/services/task-verifier-runner.d.ts +0 -5
- package/dist/node/src/services/task-verifier-runner.d.ts.map +0 -1
- package/dist/node/src/services/trajectory-context.d.ts +0 -73
- package/dist/node/src/services/trajectory-context.d.ts.map +0 -1
- package/dist/node/src/services/trajectory-feedback.d.ts +0 -53
- package/dist/node/src/services/trajectory-feedback.d.ts.map +0 -1
- package/dist/node/src/services/types.d.ts +0 -152
- package/dist/node/src/services/types.d.ts.map +0 -1
- package/dist/node/src/services/workspace-git-ops.d.ts +0 -28
- package/dist/node/src/services/workspace-git-ops.d.ts.map +0 -1
- package/dist/node/src/services/workspace-github.d.ts +0 -60
- package/dist/node/src/services/workspace-github.d.ts.map +0 -1
- package/dist/node/src/services/workspace-lifecycle.d.ts +0 -18
- package/dist/node/src/services/workspace-lifecycle.d.ts.map +0 -1
- package/dist/node/src/services/workspace-service.d.ts +0 -122
- package/dist/node/src/services/workspace-service.d.ts.map +0 -1
- package/dist/node/src/services/workspace-types.d.ts +0 -81
- package/dist/node/src/services/workspace-types.d.ts.map +0 -1
- package/dist/node/src/setup-routes.d.ts +0 -9
- package/dist/node/src/setup-routes.d.ts.map +0 -1
- package/dist/node/vitest.config.d.ts +0 -3
- package/dist/node/vitest.config.d.ts.map +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Sub-agent routing
|
|
2
2
|
|
|
3
|
-
> Canonical orchestration path for
|
|
4
|
-
>
|
|
5
|
-
> using the coordinator modules that ship in this package.
|
|
3
|
+
> Canonical orchestration path for ACP sub-agents. ACP-spawned sessions route
|
|
4
|
+
> through `AcpService` and `SubAgentRouter`.
|
|
6
5
|
|
|
7
6
|
## Goals
|
|
8
7
|
|
|
@@ -20,7 +19,7 @@
|
|
|
20
19
|
|
|
21
20
|
## Components
|
|
22
21
|
|
|
23
|
-
### `AcpService`
|
|
22
|
+
### `AcpService`
|
|
24
23
|
|
|
25
24
|
Spawn surface. TASKS op=create records origin context in
|
|
26
25
|
`session.metadata` at spawn time:
|
|
@@ -28,7 +27,14 @@ Spawn surface. TASKS op=create records origin context in
|
|
|
28
27
|
```ts
|
|
29
28
|
{
|
|
30
29
|
messageId: message.id, // parent message UUID
|
|
31
|
-
roomId: message.roomId
|
|
30
|
+
roomId: taskRoomId, // task-owner room, defaults to message.roomId
|
|
31
|
+
originRoomId: message.roomId,
|
|
32
|
+
taskRoomId,
|
|
33
|
+
worktreeRoomId,
|
|
34
|
+
swarmRooms: [
|
|
35
|
+
{ roomId: taskRoomId, roles: ["task"] },
|
|
36
|
+
{ roomId: worktreeRoomId, roles: ["worktree"] },
|
|
37
|
+
],
|
|
32
38
|
worldId: message.worldId,
|
|
33
39
|
userId: message.entityId,
|
|
34
40
|
label,
|
|
@@ -36,19 +42,19 @@ Spawn surface. TASKS op=create records origin context in
|
|
|
36
42
|
}
|
|
37
43
|
```
|
|
38
44
|
|
|
39
|
-
### `SubAgentRouter` (
|
|
45
|
+
### `SubAgentRouter` (`services/sub-agent-router.ts`)
|
|
40
46
|
|
|
41
47
|
Subscribes to `AcpService.onSessionEvent`. On `task_complete`, `error`, or
|
|
42
48
|
`blocked` (boundary events only — not streaming chunks), it:
|
|
43
49
|
|
|
44
|
-
1. Reads `session.metadata` for origin keys.
|
|
50
|
+
1. Reads `session.metadata` for origin and swarm-room keys.
|
|
45
51
|
2. Constructs a synthetic `Memory` with:
|
|
46
52
|
- `entityId` = a deterministic per-session sub-agent UUID derived locally
|
|
47
53
|
via SHA1 of `<runtime.agentId>:acpx:sub-agent:<sessionId>` (no runtime
|
|
48
54
|
dependency on `@elizaos/core`'s `createUniqueUuid` so the router stays
|
|
49
55
|
type-only on core),
|
|
50
56
|
- `agentId` = `runtime.agentId`,
|
|
51
|
-
- `roomId` =
|
|
57
|
+
- `roomId` = the selected swarm target room,
|
|
52
58
|
- `content.source` = `"sub_agent"`,
|
|
53
59
|
- `content.inReplyTo` = origin `messageId`,
|
|
54
60
|
- `content.metadata.subAgent*` carries the structured event
|
|
@@ -56,12 +62,19 @@ Subscribes to `AcpService.onSessionEvent`. On `task_complete`, `error`, or
|
|
|
56
62
|
`subAgentStatus`, `subAgentAgentType`, `subAgentRoundTrip`,
|
|
57
63
|
`subAgentRoundTripCap`, `subAgentCapExceeded`, `originUserId`,
|
|
58
64
|
`originMessageId`, `originSource`).
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
- `content.metadata.subAgentRoutingKind`,
|
|
66
|
+
`subAgentTargetRoomId`, `subAgentTargetRoomRole`,
|
|
67
|
+
`subAgentTargetRoomRoles`, `taskRoomId`, `worktreeRoomId`, and
|
|
68
|
+
`subAgentSwarmRooms` tell the main agent why this memory landed in
|
|
69
|
+
this room and which other swarm room(s) exist for the task.
|
|
70
|
+
3. Delivers via `runtime.messageService.handleMessage(runtime, memory, callback)`,
|
|
71
|
+
which also persists the memory. If `messageService` is unavailable, it
|
|
72
|
+
falls back to `runtime.createMemory(..., "messages")` plus
|
|
73
|
+
`MESSAGE_RECEIVED`.
|
|
74
|
+
|
|
75
|
+
For platform-originated tasks, the router builds a short-lived callback from
|
|
76
|
+
`runtime.sendMessageToTarget` so the planner's answer can return to the same
|
|
77
|
+
selected swarm room.
|
|
65
78
|
|
|
66
79
|
#### Why only boundary events
|
|
67
80
|
|
|
@@ -78,6 +91,26 @@ re-emitting the same `task_complete` payload posts once. A different
|
|
|
78
91
|
response payload posts again — that's "the sub-agent did more work and
|
|
79
92
|
reported a new state".
|
|
80
93
|
|
|
94
|
+
Swarm target rooms are also normalized before posting. `taskRoomId` is first,
|
|
95
|
+
`worktreeRoomId` is second, duplicate room IDs collapse into one target, and
|
|
96
|
+
the collapsed target keeps both roles (`["task", "worktree"]`). That means a
|
|
97
|
+
task room that is also the worktree coordination room gets one useful message
|
|
98
|
+
rather than two identical messages with ambiguous purpose.
|
|
99
|
+
|
|
100
|
+
#### Routing kinds
|
|
101
|
+
|
|
102
|
+
Most terminal events use `subAgentRoutingKind: "TASK_STATUS"` and fan out to
|
|
103
|
+
the normalized task/worktree swarm rooms. Two explicit coordination events are
|
|
104
|
+
targeted:
|
|
105
|
+
|
|
106
|
+
- `QUESTION_FOR_TASK_CREATOR` routes only to the task room and carries
|
|
107
|
+
`subAgentTargetRoomRole: "task"`.
|
|
108
|
+
- `AGENT_COORDINATION` routes to the worktree room when present, otherwise the
|
|
109
|
+
task room, and carries the selected target role.
|
|
110
|
+
|
|
111
|
+
`blocked` events default to `QUESTION_FOR_TASK_CREATOR` because the sub-agent
|
|
112
|
+
is waiting on human or parent-agent input.
|
|
113
|
+
|
|
81
114
|
#### Disable switch
|
|
82
115
|
|
|
83
116
|
`ACPX_SUB_AGENT_ROUTER_DISABLED=1` keeps the service registered but unbound
|
|
@@ -98,7 +131,7 @@ Set `ACPX_SUB_AGENT_ROUND_TRIP_CAP=N` in the runtime config to override.
|
|
|
98
131
|
The default of 32 is generous; a typical sub-agent task hits 1–5
|
|
99
132
|
round-trips before terminal completion.
|
|
100
133
|
|
|
101
|
-
### `activeSubAgentsProvider` (
|
|
134
|
+
### `activeSubAgentsProvider` (`providers/active-sub-agents.ts`)
|
|
102
135
|
|
|
103
136
|
Cache-friendly view of live sub-agent sessions. Filters to:
|
|
104
137
|
|
|
@@ -169,16 +202,13 @@ the most recent turn stays warm.
|
|
|
169
202
|
- Dedup prevents accidental double-injection from event re-emission.
|
|
170
203
|
- The round-trip cap (above) is the hard ceiling for ping-pong loops.
|
|
171
204
|
|
|
172
|
-
##
|
|
205
|
+
## ACP Boundary
|
|
173
206
|
|
|
174
|
-
`plugin-agent-orchestrator`
|
|
175
|
-
|
|
176
|
-
through `AcpService` bypass them entirely.
|
|
207
|
+
`plugin-agent-orchestrator` has a single task-agent transport: `AcpService`.
|
|
208
|
+
There is no PTY/coordinator fallback path.
|
|
177
209
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
`buildBlockedEventMessage`) is replaced by the main agent's normal action
|
|
181
|
-
selection over the synthetic Memory.
|
|
210
|
+
Autonomous follow-up decisions are handled by the main agent's normal action
|
|
211
|
+
selection over the synthetic Memory emitted by `SubAgentRouter`.
|
|
182
212
|
|
|
183
213
|
## Testing
|
|
184
214
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-agent-orchestrator",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Canonical ElizaOS plugin for spawning and orchestrating coding agents via
|
|
3
|
+
"version": "2.0.3-beta.2",
|
|
4
|
+
"description": "Canonical ElizaOS plugin for spawning and orchestrating coding agents via native Agent Client Protocol transports — combined with workspace lifecycle, GitHub integration, task share, runtime-driven sub-agent routing, and supporting services.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/node/index.node.js",
|
|
7
7
|
"module": "dist/node/index.node.js",
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
"./package.json": "./package.json",
|
|
16
16
|
".": {
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
|
+
"eliza-source": {
|
|
19
|
+
"types": "./src/index.ts",
|
|
20
|
+
"import": "./src/index.ts",
|
|
21
|
+
"default": "./src/index.ts"
|
|
22
|
+
},
|
|
18
23
|
"node": {
|
|
19
24
|
"types": "./dist/node/index.d.ts",
|
|
20
25
|
"import": "./dist/node/index.node.js",
|
|
@@ -26,6 +31,12 @@
|
|
|
26
31
|
},
|
|
27
32
|
"require": "./dist/cjs/index.node.cjs",
|
|
28
33
|
"default": "./dist/node/index.node.js"
|
|
34
|
+
},
|
|
35
|
+
"./*.css": "./dist/*.css",
|
|
36
|
+
"./*": {
|
|
37
|
+
"types": "./dist/*.d.ts",
|
|
38
|
+
"import": "./dist/*.js",
|
|
39
|
+
"default": "./dist/*.js"
|
|
29
40
|
}
|
|
30
41
|
},
|
|
31
42
|
"files": [
|
|
@@ -36,11 +47,15 @@
|
|
|
36
47
|
"LICENSE",
|
|
37
48
|
"docs"
|
|
38
49
|
],
|
|
39
|
-
"sideEffects":
|
|
50
|
+
"sideEffects": [
|
|
51
|
+
"./src/register-routes.ts",
|
|
52
|
+
"./src/register-routes.js",
|
|
53
|
+
"./dist/node/index.node.js",
|
|
54
|
+
"./dist/cjs/index.node.cjs"
|
|
55
|
+
],
|
|
40
56
|
"keywords": [
|
|
41
57
|
"elizaos",
|
|
42
58
|
"plugin",
|
|
43
|
-
"acpx",
|
|
44
59
|
"agent-client-protocol",
|
|
45
60
|
"coding-agent",
|
|
46
61
|
"subagent",
|
|
@@ -49,44 +64,42 @@
|
|
|
49
64
|
"author": "@stwd / 0xSolace",
|
|
50
65
|
"license": "MIT",
|
|
51
66
|
"engines": {
|
|
52
|
-
"node": ">=
|
|
67
|
+
"node": ">=24"
|
|
53
68
|
},
|
|
54
69
|
"peerDependencies": {
|
|
55
|
-
"@elizaos/core": "2.0.
|
|
56
|
-
"git-workspace-service": "0.4.5"
|
|
57
|
-
"pty-manager": "1.11.0"
|
|
70
|
+
"@elizaos/core": "2.0.3-beta.2",
|
|
71
|
+
"git-workspace-service": "0.4.5"
|
|
58
72
|
},
|
|
59
73
|
"dependencies": {
|
|
60
|
-
"@
|
|
74
|
+
"@octokit/rest": "^22.0.0",
|
|
61
75
|
"coding-agent-adapters": "0.16.3",
|
|
62
76
|
"drizzle-orm": "^0.45.1",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
77
|
+
"effect": "^3.21.1",
|
|
78
|
+
"smithers-orchestrator": "0.22.0"
|
|
65
79
|
},
|
|
66
80
|
"devDependencies": {
|
|
67
81
|
"@biomejs/biome": "^2.4.14",
|
|
68
82
|
"@electric-sql/pglite": "^0.4.0",
|
|
69
|
-
"@elizaos/core": "2.0.
|
|
83
|
+
"@elizaos/core": "2.0.3-beta.2",
|
|
70
84
|
"@types/bun": "^1.3.9",
|
|
71
85
|
"@types/node": "^25.2.3",
|
|
72
|
-
"bun-types": "1.3.
|
|
86
|
+
"bun-types": "1.3.14",
|
|
73
87
|
"git-workspace-service": "0.4.5",
|
|
74
|
-
"pty-manager": "1.11.0",
|
|
75
88
|
"typescript": "^6.0.3",
|
|
76
89
|
"vitest": "^4.0.0"
|
|
77
90
|
},
|
|
78
91
|
"scripts": {
|
|
79
|
-
"postinstall": "node ./scripts/ensure-node-pty.mjs",
|
|
80
92
|
"dev": "bun run build.ts --watch",
|
|
81
93
|
"clean": "rm -rf dist .turbo .turbo-tsconfig.json tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo",
|
|
82
94
|
"format": "bunx @biomejs/biome format --write .",
|
|
83
95
|
"format:check": "bunx @biomejs/biome format .",
|
|
84
96
|
"lint": "bunx @biomejs/biome check --write --unsafe .",
|
|
85
97
|
"lint:check": "bunx @biomejs/biome check . --no-errors-on-unmatched",
|
|
86
|
-
"typecheck": "
|
|
98
|
+
"typecheck": "tsgo --noEmit -p tsconfig.json",
|
|
87
99
|
"test": "bunx vitest run --config vitest.config.ts",
|
|
88
|
-
"test:unit": "bunx vitest run --config vitest.config.ts
|
|
89
|
-
"test:
|
|
100
|
+
"test:unit": "bunx vitest run --config vitest.config.ts __tests__/unit",
|
|
101
|
+
"test:e2e:manual": "node tests/e2e/acp-codex-smoke.mjs",
|
|
102
|
+
"test:e2e:multi-account": "bun --conditions=eliza-source scripts/compose-multi-account-e2e.ts",
|
|
90
103
|
"test:watch": "bunx vitest --config vitest.config.ts",
|
|
91
104
|
"build": "bun run build.ts",
|
|
92
105
|
"build:ts": "bun run build.ts"
|
|
@@ -99,41 +112,110 @@
|
|
|
99
112
|
"pluginParameters": {
|
|
100
113
|
"ELIZA_ACP_CLI": {
|
|
101
114
|
"type": "string",
|
|
102
|
-
"description": "Path or command name for the acpx
|
|
115
|
+
"description": "Path or command name for the legacy acpx command-wrapper transport when ELIZA_ACP_TRANSPORT=cli.",
|
|
103
116
|
"required": false,
|
|
104
117
|
"default": "acpx",
|
|
105
118
|
"sensitive": false
|
|
106
119
|
},
|
|
120
|
+
"ELIZA_ACP_TRANSPORT": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"description": "ACP transport mode. Native/direct uses the embedded TypeScript ACP client; cli/acpx keeps the legacy command-wrapper transport.",
|
|
123
|
+
"required": false,
|
|
124
|
+
"default": "native",
|
|
125
|
+
"sensitive": false
|
|
126
|
+
},
|
|
127
|
+
"ELIZA_ACP_DEFAULT_AGENT": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"description": "Default coding agent adapter for TASKS create/spawn_agent when the user or planner does not choose one. Supported defaults include elizaos, pi-agent, and opencode.",
|
|
130
|
+
"required": false,
|
|
131
|
+
"default": "elizaos",
|
|
132
|
+
"sensitive": false
|
|
133
|
+
},
|
|
134
|
+
"ELIZA_DEFAULT_AGENT_TYPE": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"description": "Compatibility alias for the default coding agent adapter. Use elizaos, pi-agent, or opencode to switch the default code agent from settings.",
|
|
137
|
+
"required": false,
|
|
138
|
+
"default": "elizaos",
|
|
139
|
+
"sensitive": false
|
|
140
|
+
},
|
|
141
|
+
"ELIZA_AGENT_SELECTION_STRATEGY": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"description": "Task-agent selection policy. fixed makes the configured default adapter authoritative; dynamic allows runtime selection when implemented.",
|
|
144
|
+
"required": false,
|
|
145
|
+
"default": "fixed",
|
|
146
|
+
"sensitive": false
|
|
147
|
+
},
|
|
148
|
+
"ELIZA_ELIZAOS_ACP_COMMAND": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"description": "Native ACP command used for ElizaOS coding-agent sessions when ELIZA_ACP_TRANSPORT=native.",
|
|
151
|
+
"required": false,
|
|
152
|
+
"default": "elizaos",
|
|
153
|
+
"sensitive": false
|
|
154
|
+
},
|
|
155
|
+
"ELIZA_PI_AGENT_ACP_COMMAND": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"description": "Native ACP command used for Pi Agent sessions when ELIZA_ACP_TRANSPORT=native.",
|
|
158
|
+
"required": false,
|
|
159
|
+
"default": "pi-agent",
|
|
160
|
+
"sensitive": false
|
|
161
|
+
},
|
|
162
|
+
"ELIZA_CODEX_ACP_COMMAND": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"description": "Native ACP command used for Codex sessions when ELIZA_ACP_TRANSPORT=native. Pin this in production to avoid implicit package upgrades.",
|
|
165
|
+
"required": false,
|
|
166
|
+
"default": "npx -y @zed-industries/codex-acp@0.14.0",
|
|
167
|
+
"sensitive": false
|
|
168
|
+
},
|
|
169
|
+
"ELIZA_CLAUDE_ACP_COMMAND": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"description": "Native ACP command used for Claude sessions when ELIZA_ACP_TRANSPORT=native. Pin this in production to avoid implicit package upgrades.",
|
|
172
|
+
"required": false,
|
|
173
|
+
"default": "npx -y @agentclientprotocol/claude-agent-acp@0.34.0",
|
|
174
|
+
"sensitive": false
|
|
175
|
+
},
|
|
176
|
+
"ELIZA_OPENCODE_ACP_COMMAND": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"description": "Native ACP command used for OpenCode sessions when ELIZA_ACP_TRANSPORT=native. Defaults to the bundled OpenCode shim when available, otherwise opencode acp.",
|
|
179
|
+
"required": false,
|
|
180
|
+
"sensitive": false
|
|
181
|
+
},
|
|
182
|
+
"ELIZA_ACP_FORMAT": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"description": "Agent Client Protocol event format expected from legacy transports.",
|
|
185
|
+
"required": false,
|
|
186
|
+
"default": "json",
|
|
187
|
+
"sensitive": false
|
|
188
|
+
},
|
|
107
189
|
"ACPX_DEFAULT_TIMEOUT_MS": {
|
|
108
190
|
"type": "number",
|
|
109
|
-
"description": "Default timeout in milliseconds for
|
|
191
|
+
"description": "Default timeout in milliseconds for ACP prompt/session calls when an action does not provide a timeout.",
|
|
110
192
|
"required": false,
|
|
111
193
|
"sensitive": false
|
|
112
194
|
},
|
|
113
195
|
"ACPX_APPROVE_ALL": {
|
|
114
196
|
"type": "boolean",
|
|
115
|
-
"description": "When true, defaults
|
|
197
|
+
"description": "When true, defaults ACP sessions to the approve-all approval preset unless an action overrides approvalPreset.",
|
|
116
198
|
"required": false,
|
|
117
199
|
"default": false,
|
|
118
200
|
"sensitive": false
|
|
119
201
|
},
|
|
120
202
|
"ACPX_FORMAT": {
|
|
121
203
|
"type": "string",
|
|
122
|
-
"description": "
|
|
204
|
+
"description": "Deprecated alias for ELIZA_ACP_FORMAT.",
|
|
123
205
|
"required": false,
|
|
124
206
|
"default": "json",
|
|
125
207
|
"sensitive": false
|
|
126
208
|
},
|
|
127
209
|
"ACPX_NO_TERMINAL": {
|
|
128
210
|
"type": "boolean",
|
|
129
|
-
"description": "When true, passes --no-terminal so coding agents communicate through ACP events rather than
|
|
211
|
+
"description": "When true, passes --no-terminal so coding agents communicate through ACP events rather than terminal UI.",
|
|
130
212
|
"required": false,
|
|
131
213
|
"default": true,
|
|
132
214
|
"sensitive": false
|
|
133
215
|
},
|
|
134
216
|
"ACPX_DEFAULT_CWD": {
|
|
135
217
|
"type": "string",
|
|
136
|
-
"description": "Default working directory for
|
|
218
|
+
"description": "Default working directory for ACP sessions when an action does not provide workdir.",
|
|
137
219
|
"required": false,
|
|
138
220
|
"sensitive": false
|
|
139
221
|
}
|
|
@@ -147,5 +229,6 @@
|
|
|
147
229
|
"platformDetails": {
|
|
148
230
|
"node": "Node.js subprocess integration available via exports.node; browser export is a compatibility shim for package resolution."
|
|
149
231
|
}
|
|
150
|
-
}
|
|
232
|
+
},
|
|
233
|
+
"gitHead": "82fe0f44215954c2417328203f5bd6510985c1fc"
|
|
151
234
|
}
|
package/PROJECT.md
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
# @elizaos/plugin-agent-orchestrator
|
|
2
|
-
|
|
3
|
-
ElizaOS plugin: acpx-backed task and subagent backend (wraps the `acpx` CLI to spawn coding agents). Sibling, not replacement, for `@elizaos/plugin-agent-orchestrator`. Distinct from `@elizaos/plugin-acp` (Shaw's ACP gateway client).
|
|
4
|
-
|
|
5
|
-
Drop-in compatible with `@elizaos/plugin-agent-orchestrator` (PTY-based). Uses
|
|
6
|
-
ACPX (Agent Client Protocol CLI) under the hood for structured streaming,
|
|
7
|
-
named sessions, cooperative cancel, and crash-resilient sessions.
|
|
8
|
-
|
|
9
|
-
## Why this exists
|
|
10
|
-
|
|
11
|
-
`plugin-agent-orchestrator` (sibling, PTY-based) maintains an entire
|
|
12
|
-
stall-classifier, ANSI-stripping, prompt-regex-dismissal, pty-state-capture
|
|
13
|
-
stack to extract structure out of terminal byte streams. The Agent Client Protocol (ACP) is the structured
|
|
14
|
-
protocol underneath, `tool_call`, `thinking`, `diff`, `done` events, typed
|
|
15
|
-
auth handshake, cooperative `session/cancel`. ACPX provides one CLI surface
|
|
16
|
-
across 15 Agent Client Protocol (ACP)-compatible coding agents (codex, claude-code, gemini, copilot,
|
|
17
|
-
cursor, droid, local Eliza-1 agents, etc).
|
|
18
|
-
|
|
19
|
-
This plugin is a sibling-not-replacement: deploys alongside
|
|
20
|
-
`plugin-agent-orchestrator`, exposes the same action names so users can switch
|
|
21
|
-
transports by swapping the plugin import.
|
|
22
|
-
|
|
23
|
-
## Goals
|
|
24
|
-
|
|
25
|
-
- Drop-in action surface compatible with `plugin-agent-orchestrator`
|
|
26
|
-
- ACPX subprocess transport (NDJSON streaming, no pty)
|
|
27
|
-
- Configurable cli binary (`ELIZA_ACP_CLI=acpx`, override possible)
|
|
28
|
-
- Persistent named sessions (eliza-runtime-table-backed)
|
|
29
|
-
- Cooperative cancel + crash reconnect
|
|
30
|
-
- 80%+ unit test coverage
|
|
31
|
-
- Parity smoke vs plugin-agent-orchestrator on at least codex
|
|
32
|
-
- Publishable to npm under `@elizaos`
|
|
33
|
-
|
|
34
|
-
## Non-goals
|
|
35
|
-
|
|
36
|
-
- Replace plugin-agent-orchestrator (sibling, not replacement)
|
|
37
|
-
- Git workspace provisioning (PROVISION_WORKSPACE / FINALIZE_WORKSPACE)
|
|
38
|
-
- Frontend xterm view
|
|
39
|
-
- Non-codex agent support in v0.1.0 (codex first; claude/gemini in 0.2.0+)
|
|
40
|
-
|
|
41
|
-
## Action surface
|
|
42
|
-
|
|
43
|
-
Match `plugin-agent-orchestrator` exactly:
|
|
44
|
-
|
|
45
|
-
| Action | Purpose |
|
|
46
|
-
|---|---|
|
|
47
|
-
| `SPAWN_AGENT` | Spawn an acpx coding-agent session |
|
|
48
|
-
| `SEND_TO_AGENT` | Send prompt or input to running session |
|
|
49
|
-
| `LIST_AGENTS` | List active sessions |
|
|
50
|
-
| `STOP_AGENT` | Terminate session via session/cancel |
|
|
51
|
-
| `CREATE_TASK` | Async task (spawn + first prompt + return when done) |
|
|
52
|
-
| `CANCEL_TASK` | Cooperative cancel |
|
|
53
|
-
|
|
54
|
-
## Provider
|
|
55
|
-
|
|
56
|
-
`availableAgents` provider exposes which Agent Client Protocol (ACP)-compatible agents are installed.
|
|
57
|
-
|
|
58
|
-
## Architecture
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
┌─────────────────────────┐
|
|
62
|
-
│ Eliza runtime │
|
|
63
|
-
│ ├─ actions (SPAWN, ..) │
|
|
64
|
-
│ └─ provider (available)│
|
|
65
|
-
└──────────┬──────────────┘
|
|
66
|
-
│
|
|
67
|
-
┌──────────v──────────────┐
|
|
68
|
-
│ AcpService │
|
|
69
|
-
│ - spawn `acpx` proc │
|
|
70
|
-
│ - parse NDJSON stream │
|
|
71
|
-
│ - emit typed events │
|
|
72
|
-
│ - cancel via session/ │
|
|
73
|
-
└──────────┬──────────────┘
|
|
74
|
-
│
|
|
75
|
-
┌──────────v──────────────┐
|
|
76
|
-
│ acpx (cli subprocess) │
|
|
77
|
-
│ --format json │
|
|
78
|
-
│ codex / claude / etc │
|
|
79
|
-
└─────────────────────────┘
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## Reference materials
|
|
83
|
-
|
|
84
|
-
- `acpx-docs/README.md`, acpx README
|
|
85
|
-
- `acpx-docs/docs_CLI.md`, full acpx CLI reference
|
|
86
|
-
- `acpx-docs/skills_acpx_SKILL.md`, skill reference
|
|
87
|
-
|
|
88
|
-
## Layout
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
src/
|
|
92
|
-
index.ts # plugin export
|
|
93
|
-
actions/
|
|
94
|
-
spawn-agent.ts
|
|
95
|
-
send-to-agent.ts
|
|
96
|
-
list-agents.ts
|
|
97
|
-
stop-agent.ts
|
|
98
|
-
create-task.ts
|
|
99
|
-
cancel-task.ts
|
|
100
|
-
providers/
|
|
101
|
-
available-agents.ts
|
|
102
|
-
services/
|
|
103
|
-
acp-service.ts # core ACPX wrapper
|
|
104
|
-
session-store.ts # persistent session state
|
|
105
|
-
types.ts # acpx event types
|
|
106
|
-
__tests__/
|
|
107
|
-
*.test.ts
|
|
108
|
-
docs/
|
|
109
|
-
sub-agent-routing.md
|
|
110
|
-
PROJECT.md # this file
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Status
|
|
114
|
-
|
|
115
|
-
🚧 Bootstrapping, wave A in progress.
|
|
116
|
-
|
|
117
|
-
## License
|
|
118
|
-
|
|
119
|
-
MIT
|