@openma/deepseek-harness-acp 0.4.10-beta.2 → 0.4.10

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.
Files changed (2) hide show
  1. package/README.md +74 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -29,7 +29,7 @@ config options, slash commands, skills, and MCP servers. Credentials never
29
29
  touch your editor config — it reuses the key you saved in the dsh Web UI, or
30
30
  `dsh-acp login` saves one to the same store.
31
31
 
32
- ## Two ways to plug it in
32
+ ## Two entry points, one embeddable plugin
33
33
 
34
34
  | | **A · Standalone server** | **B · dsh profile plugin** |
35
35
  |---|---|---|
@@ -49,6 +49,11 @@ transport adapter. The TUI profile uses this path: it starts a separate TUI
49
49
  Client process and connects ACP over that process's standard stdin/stdout; it
50
50
  does not start `dsh-acp` or use an in-process Client stream.
51
51
 
52
+ The package is therefore not only a CLI wrapper. It is also the ACP surface
53
+ plugin used by other dsh applications: one Host composition can expose the
54
+ same sessions, tools, presets, skills, and persistence through a transport
55
+ chosen by the surface.
56
+
52
57
  ### A · Standalone server
53
58
 
54
59
  ```bash
@@ -94,6 +99,62 @@ product baseline as `dsh web`, with the module-reload watcher off. Extend the
94
99
  profile in `$DSH_HOME/profiles/acp/cordis.patch.yml` like any other dsh
95
100
  profile.
96
101
 
102
+ ## Plugin and extension model
103
+
104
+ There are two independent ways to extend an ACP-backed surface.
105
+
106
+ ### Extend the Host composition
107
+
108
+ The ACP adapter rides the Cordis tree that the profile already owns. Add dsh
109
+ plugins to that profile to change the agent composition instead of forking the
110
+ ACP server: providers and models join the live catalog, commands and skills
111
+ join the advertised session surface, tools and subagents appear through
112
+ standard `session/update`, and the same session persistence remains available
113
+ to every surface.
114
+
115
+ For applications embedding ACP, the public package entries are:
116
+
117
+ | Export | Role |
118
+ |---|---|
119
+ | `@openma/deepseek-harness-acp/plugin` | Complete Host-side surface plugin. It fills the ACP-required Host services that Base leaves to a surface and provides `ctx.acpServer`. It does not claim a transport. |
120
+ | `@openma/deepseek-harness-acp/server` | Lower-level transport-independent `acpServer` provider for a Host tree that already supplies the injected composition services. |
121
+ | `@openma/deepseek-harness-acp/stdio` | Standard profile adapter: connects `ctx.acpServer` to process stdin/stdout. |
122
+ | `@openma/deepseek-harness-acp/bridge` | Node stream adapter and compatibility entry for older profile patches. |
123
+
124
+ `ctx.acpServer.connect(stream)` creates a connection-owned bridge fiber over
125
+ the existing Host composition. The transport owner retains process, stream,
126
+ and TTY lifecycle; the ACP plugin retains session and agent semantics. This is
127
+ the shape used by
128
+ [`@openma/deepseek-harness-tui`](https://github.com/openma-ai/deepseek-harness-tui):
129
+ ACP stays on the Base Host tree while a separate TUI Client process owns its
130
+ own Cordis tree.
131
+
132
+ Adding a Cordis service does not automatically invent a wire method. Prefer a
133
+ standard ACP capability or event projection whenever one exists; add an
134
+ adapter only for behavior that must cross the client boundary.
135
+
136
+ ### Extend ACP without breaking ordinary clients
137
+
138
+ Optional wire behavior follows ACP's extension conventions:
139
+
140
+ 1. Advertise support in `initialize` metadata, with a namespaced and versioned
141
+ capability such as `_meta.dsh.cordis.protocol`.
142
+ 2. Carry annotations on standard messages in namespaced `_meta` fields when no
143
+ new request is needed.
144
+ 3. Name custom JSON-RPC requests and notifications with a leading underscore,
145
+ and send them only after both peers negotiated the matching capability.
146
+ 4. Keep the standard ACP path complete. A client that does not advertise an
147
+ extension must still get normal sessions, prompts, updates, cancellation,
148
+ auth, and config options.
149
+
150
+ The current package applies this pattern to the built-in `_dsh/cordis/*`
151
+ family used by the TUI for Client capability discovery, dynamic Package
152
+ lifecycle, and package-private Host/Client RPC. It is an explicit, versioned
153
+ extension—not a synchronization of Cordis plugin ids, fibers, or `inject`
154
+ across processes. The bridge's internal method registry is not currently a
155
+ public arbitrary-extension API; new extension families should first define a
156
+ stable capability, ownership, lifecycle, and fallback contract.
157
+
97
158
  ## Authentication
98
159
 
99
160
  No keys in editor config, no secrets pasted into chat. ACP clients follow
@@ -187,6 +248,18 @@ your @deepseek-ai/dsh installation (agent spine, llm, persistence, sandbox,
187
248
  tools, presets, skills, compaction, …)
188
249
  ```
189
250
 
251
+ When embedded by another surface, only the transport edge changes:
252
+
253
+ ```text
254
+ dsh Base Host Cordis tree
255
+ ├─ product plugins (agents, tools, skills, persistence, …)
256
+ └─ @openma/deepseek-harness-acp/plugin
257
+ └─ acpServer.connect(Stream)
258
+ │ standard ACP + negotiated extensions
259
+ ▼
260
+ surface-owned Client process
261
+ ```
262
+
190
263
  The bridge consumes the harness `session/event` firehose — the same
191
264
  append-only log persistence stores — so live streaming, history replay, and
192
265
  `session/list` agree by construction. All harness modules, including cordis
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.4.10-beta.2",
6
+ "version": "0.4.10",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/openma-ai/deepseek-harness-acp.git"