@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 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
- Mastra Agent.stream()
24
- text deltas
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 off Mastra's `fullStream` and
77
- mapped in `src/tool-call-map.ts`. So a host (codex/claude-code/an IDE) shows the
78
- "🔧 run_command: …" feed, not just the final prose.
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.