dsh-multi-folder 0.3.0 → 0.3.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/docs/design.md +12 -1
- package/lib/index.js +12 -2
- package/package.json +1 -1
package/docs/design.md
CHANGED
|
@@ -165,6 +165,17 @@ opens its own **sessionless** endpoints on the shared `/api` RPC channel:
|
|
|
165
165
|
- the next boundary consumes it — `agent/pre-step` prepends it to the entering
|
|
166
166
|
message batch, or `tools/post-execute` attaches it as `additionalContexts` —
|
|
167
167
|
whichever fires first. No turn is ever interrupted.
|
|
168
|
+
- the notice's `source` declares a **producer-owned kind**
|
|
169
|
+
(`kind: 'plugin:dsh-multi-folder'`, `form: 'notice'`, `summary`). Session
|
|
170
|
+
format v4 admitted only the retired catch-all wrapper `kind: 'plugin'` for
|
|
171
|
+
nothing: `sessionFormatCatalog.encodeCurrentEvent` — which the JSONL writer
|
|
172
|
+
runs on every appended event — throws
|
|
173
|
+
`format v4 message requires a producer-owned source kind` for it, failing the
|
|
174
|
+
run the moment a notice is logged. `plugin:<plugin>` is the spelling the
|
|
175
|
+
format's v3→v4 migration itself produces for a non-first-party producer
|
|
176
|
+
(`session-format-v3-to-v4/src/sources.ts`), so it is also what this plugin's
|
|
177
|
+
older logs migrate to. The `workdir` diagnosis attached at a tool-call
|
|
178
|
+
boundary is built by the same function and fixed with it.
|
|
168
179
|
|
|
169
180
|
## Client
|
|
170
181
|
|
|
@@ -370,7 +381,7 @@ window.__ModuleLoader__.load({
|
|
|
370
381
|
`test/smoke-host.mjs`, `test/intercept.mjs`, and `test/smoke-client.mjs` run without
|
|
371
382
|
the DSH runtime using mock services and a React shim. They cover interception,
|
|
372
383
|
canonicalization, the config guard, both notification channels, notice
|
|
373
|
-
gating, command flows, the panel's session-switch/caching behavior, the
|
|
384
|
+
gating and the producer-owned notice source kind v4 admits, command flows, the panel's session-switch/caching behavior, the
|
|
374
385
|
sessionless remote contribution shape and behavior (list/add/set/remove,
|
|
375
386
|
idempotence, sanitization, error prefixing, cross-channel cache coherence),
|
|
376
387
|
the owned browser's host half (`browse` filtering/sorting/hidden flags, the
|
package/lib/index.js
CHANGED
|
@@ -443,13 +443,23 @@ export function apply(ctx) {
|
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
// -------------------------------------------------------- notice channel
|
|
446
|
+
// A message's `source.kind` must be a PRODUCER-OWNED kind. Session format v4
|
|
447
|
+
// retired the catch-all `{ kind: 'plugin', plugin: X }` wrapper: the durable
|
|
448
|
+
// log's encoder refuses it with
|
|
449
|
+
// `format v4 message requires a producer-owned source kind`, which surfaces
|
|
450
|
+
// as a failed run the moment a notice is appended. First-party producers name
|
|
451
|
+
// themselves (`plan-mode`, `tool-jobs`, `model-selection`); the format's
|
|
452
|
+
// v3→v4 migration maps every other plugin's legacy wrapper to
|
|
453
|
+
// `plugin:<plugin>` (`session-format-v3-to-v4/sources.ts`), so an external
|
|
454
|
+
// plugin's canonical spelling is that same namespaced kind — and our own
|
|
455
|
+
// earlier logs, which used the retired wrapper, migrate to exactly it.
|
|
456
|
+
const NOTICE_SOURCE_KIND = 'plugin:' + name
|
|
446
457
|
const noticeMessage = (text) => ({
|
|
447
458
|
id: 'mf-note-' + (++noteSeq),
|
|
448
459
|
role: 'user',
|
|
449
460
|
content: [{ type: 'text', text }],
|
|
450
461
|
source: {
|
|
451
|
-
kind:
|
|
452
|
-
plugin: name,
|
|
462
|
+
kind: NOTICE_SOURCE_KIND,
|
|
453
463
|
form: 'notice',
|
|
454
464
|
summary: String(text).split('\n')[0].slice(0, 120),
|
|
455
465
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-multi-folder",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "DeepSeek Harness plugin: secondary working directories for a project. The agent keeps the primary workspace as cwd, gains equal write/exec permissions on configured secondary directories under workspace-write mode, and is notified of configuration changes at the next message boundary. Configurable from the session header AND from the session-creation page (before the first message) through a sessionless multiFolder remote API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh-plugin",
|