@beeos-ai/bma-dsh-acp 0.2.0 → 0.2.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 +4 -4
- package/lib/agent.js +3 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ It has no DSH dependency of its own (test `pins`), runs the shared conformance s
|
|
|
7
7
|
## Install and run (npm)
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npx --yes @beeos-ai/bma-dsh-acp@0.2.
|
|
10
|
+
npx --yes @beeos-ai/bma-dsh-acp@0.2.1 # one-off; or: npm install -g @beeos-ai/bma-dsh-acp
|
|
11
11
|
BMA_DSH_ACP_HOME=$HOME/.bma-dsh-acp bma-dsh-acp # ACP (JSON-RPC, newline-delimited) on stdin/stdout
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -29,10 +29,10 @@ Using it from the BMA executor SDK (`bma-executor-sdk`, Go `ACPAgent`; the SDK n
|
|
|
29
29
|
|
|
30
30
|
```go
|
|
31
31
|
agent, err := bmaexecutor.NewACPAgent(ctx, bmaexecutor.ACPAgentOptions{
|
|
32
|
-
// installed once with `npm install -g @beeos-ai/bma-dsh-acp@0.2.
|
|
32
|
+
// installed once with `npm install -g @beeos-ai/bma-dsh-acp@0.2.1` (the `bma-dsh-acp` bin of that prefix):
|
|
33
33
|
Command: []string{"/usr/local/bin/bma-dsh-acp"},
|
|
34
34
|
// or fetched on first use (slow first start; the cache keeps it afterwards):
|
|
35
|
-
// Command: []string{"/usr/local/bin/npx", "--yes", "@beeos-ai/bma-dsh-acp@0.2.
|
|
35
|
+
// Command: []string{"/usr/local/bin/npx", "--yes", "@beeos-ai/bma-dsh-acp@0.2.1"},
|
|
36
36
|
StateDir: stateDir, // becomes BMA_DSH_ACP_HOME
|
|
37
37
|
Core: core,
|
|
38
38
|
Upstream: bmaexecutor.ACPModelUpstream{BaseURL: "https://api.example.com/v1", Model: "my-model"},
|
|
@@ -52,7 +52,7 @@ Standard ACP v1 (`@agentclientprotocol/sdk`), plus BMA additions under the `bma`
|
|
|
52
52
|
| tool call | `tool_call` (`kind`, full `rawInput`, `_meta.bma {name, permission}`) → `session/request_permission` (full input; `allow_once` / `reject_once`) when the policy says ask → request `_bma/tools/call {sessionId, toolCallId, name, input}` → `{text, isError, images?: [{mimeType, data}]}` (the client runs it; images are shown to the model after the tool message, as a user message — Chat Completions tool messages carry text only) → `tool_call_update` completed/failed with the result |
|
|
53
53
|
| `session/cancel` | the turn ends with `stopReason: cancelled`; a pending permission or tool call is abandoned (`$/cancel_request` is sent for it) |
|
|
54
54
|
| stops | `output_limit_reached` → `stopReason: max_tokens` + `_meta.bma {stopCode, detail}`; `context_too_large`, `model_stream_idle` → JSON-RPC error `-32603` with `data.bma {stopCode, detail}`; other failures → `-32603` |
|
|
55
|
-
| `session/close` | releases the session (its JSONL stays
|
|
55
|
+
| `session/close` | releases the session's agent scope (its memory; its JSONL stays, so `session/load` brings the whole conversation back); advertised as `agentCapabilities.sessionCapabilities.close`. A client that keeps many sessions (the executor SDK's `ACPAgent` keeps at most `MaxResidentSessions` and closes the least recently used idle one) is what bounds the memory of this process: it holds every session that was opened and not closed. Closing a session that is not open answers `-32002`, which the ACP SDK treats as closed |
|
|
56
56
|
|
|
57
57
|
Sessions share one DSH kernel in the process; each session is its own agent scope (conversation, tool catalog, model route, permissions): session-level isolation, not one DSH context per session.
|
|
58
58
|
|
package/lib/agent.js
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
// initialize capabilities + _meta.bma facts (dsh version, tools, streaming, permission relay);
|
|
5
5
|
// request _meta.bma.hostTools adds the client machine's own tools to the six
|
|
6
6
|
// session/new | load createSession | resumeSession (+ history replay); _meta.bma carries the model route
|
|
7
|
+
// session/close releases the session's agent scope (memory); its JSONL stays for session/load. Advertised as
|
|
8
|
+
// sessionCapabilities.close, so a client can keep many sessions by closing the least recently used
|
|
7
9
|
// session/set_mode per-session tool policy (default | accept_edits)
|
|
8
10
|
// session/prompt submitInput: deltas -> agent_*_chunk (messageId), durable -> _bma/message
|
|
9
11
|
// tool call tool_call -> [request_permission] -> _bma/tools/call (client runs it) -> tool_call_update
|
|
@@ -86,7 +88,7 @@ export class DshAcpShell {
|
|
|
86
88
|
this.registerTools();
|
|
87
89
|
return {
|
|
88
90
|
protocolVersion: PROTOCOL_VERSION,
|
|
89
|
-
agentCapabilities: { loadSession: true, promptCapabilities: { image: this.imageInput, audio: false, embeddedContext: false }, mcpCapabilities: { http: false, sse: false } },
|
|
91
|
+
agentCapabilities: { loadSession: true, sessionCapabilities: { close: {} }, promptCapabilities: { image: this.imageInput, audio: false, embeddedContext: false }, mcpCapabilities: { http: false, sse: false } },
|
|
90
92
|
agentInfo: { name: "bma-dsh-acp", title: "BMA DSH", version: VERSION },
|
|
91
93
|
authMethods: [],
|
|
92
94
|
_meta: { [META]: { dsh: DSH_VERSION, tools: TOOL_NAMES, hostTools: this.hostTools.map((t) => t.name), streaming: "token", permissionRelay: "full", modes: Object.keys(MODES) } },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beeos-ai/bma-dsh-acp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "bma-dsh-acp: the shared DSH adapter served as an Agent Client Protocol (stdio) agent, driven by the BMA executor's ACP client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@agentclientprotocol/sdk": "2.2.0",
|
|
29
29
|
"zod": "4.6.7",
|
|
30
|
-
"@beeos-ai/bma-dsh-adapter": "0.2.
|
|
30
|
+
"@beeos-ai/bma-dsh-adapter": "0.2.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"esbuild": "0.28.2"
|