@agentproto/adapter-mastra-agent 0.4.2 → 0.5.1
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/README.md +17 -6
- package/dist/chunk-6ILIPWNM.mjs +2095 -0
- package/dist/chunk-6ILIPWNM.mjs.map +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/index.d.ts +504 -114
- package/dist/index.mjs +15 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -5
- package/dist/chunk-ZVLJDGI4.mjs +0 -602
- package/dist/chunk-ZVLJDGI4.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -20,10 +20,10 @@ agentproto-mastra acp --model anthropic/claude-opus-4-8
|
|
|
20
20
|
AGENT.md ──parseAgentManifest──▶ AgentHandle
|
|
21
21
|
│ buildMastraAgent (@agentproto/mastra)
|
|
22
22
|
▼
|
|
23
|
-
|
|
24
|
-
│
|
|
23
|
+
Mastra AgentController
|
|
24
|
+
│ AgentControllerEvent subscription
|
|
25
25
|
▼
|
|
26
|
-
MastraAcpAgent (src/acp-host.ts) ──agent_message_chunk──▶ ACP client
|
|
26
|
+
MastraAcpAgent (src/acp-host.ts) ──agent_message_chunk / tool_call ──▶ ACP client
|
|
27
27
|
▲
|
|
28
28
|
@agentclientprotocol/sdk AgentSideConnection (stdio)
|
|
29
29
|
```
|
|
@@ -33,6 +33,16 @@ AGENT.md ──parseAgentManifest──▶ AgentHandle
|
|
|
33
33
|
spawn environment. Default: `openrouter/z-ai/glm-5.2`.
|
|
34
34
|
- **Agent** — pass `--agent ./path/AGENT.md` (or `AGENTPROTO_MASTRA_AGENT_FILE`)
|
|
35
35
|
to run a custom agent; omit for a built-in coding default.
|
|
36
|
+
- **Modes** — the default agent runs a `plan` → `build` → `review` cycle via
|
|
37
|
+
Mastra's `AgentController`. A custom `AGENT.md` can override the modes with a
|
|
38
|
+
`## Modes` section; `submit_plan` gates the transition from plan to build.
|
|
39
|
+
- **Daemon integration** — when spawned by the agentproto daemon, the adapter
|
|
40
|
+
discovers it via `DaemonClient` and a `SignalProvider` pushes session lifecycle
|
|
41
|
+
events (turn-end, errors, permissions, child-session exits) plus workspace git
|
|
42
|
+
state into the agent thread.
|
|
43
|
+
- **Tool approvals / suspension** — workspace tools can surface a
|
|
44
|
+
`session/request_permission` round-trip through the ACP host, and suspended
|
|
45
|
+
tools resume once the host responds.
|
|
36
46
|
|
|
37
47
|
## Workspace tools
|
|
38
48
|
|
|
@@ -73,6 +83,7 @@ across spawns), overridable with `AGENTPROTO_MASTRA_MEMORY_DB`. A custom
|
|
|
73
83
|
Streaming conversation + workspace tools (edit/run) + SQLite memory, with tool
|
|
74
84
|
activity surfaced live: each tool the agent runs is relayed to the host as an
|
|
75
85
|
ACP `tool_call` (status `in_progress`) and then a `tool_call_update` (status
|
|
76
|
-
`completed`/`failed` with the raw output) — read
|
|
77
|
-
mapped in `src/tool-call-map.ts`.
|
|
78
|
-
|
|
86
|
+
`completed`/`failed` with the raw output) — read from the `AgentController`
|
|
87
|
+
event subscription and mapped in `src/tool-call-map.ts`. The adapter also
|
|
88
|
+
supports plan/build/review modes, tool-approval round-trips, and session resume
|
|
89
|
+
via the ACP `session/load` flow.
|