@sessionbus/dsh 0.1.0-pre.2 → 0.1.0-pre.6
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 +25 -8
- package/install.mjs +5 -4
- package/package.json +2 -2
- package/plugin.cjs +7 -1
package/README.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# sessionbus for DSH
|
|
2
2
|
|
|
3
3
|
`@sessionbus/dsh` connects DSH roots to sessionbus and runs daemon-managed DSH lanes.
|
|
4
|
-
It depends on the exact `@sessionbus/kit`
|
|
4
|
+
It depends on the exact `@sessionbus/kit` version `0.5.5`.
|
|
5
5
|
It supports DeepSeek Harness `0.1.5-rc.2` and later; tested versions are
|
|
6
6
|
`0.1.5-rc.2`, `0.1.6-alpha.1`, and `0.1.6-alpha.2`.
|
|
7
7
|
A DSH profile must install every DSH package at one uniform DSH version; adding
|
|
8
8
|
one prerelease package can otherwise pull newer prereleases through DSH's caret peers.
|
|
9
|
+
The default single-tool permission grant relies on DSH's `tools/pre-execute`
|
|
10
|
+
waterfall, present since the `0.1.5-rc.2` peer floor.
|
|
9
11
|
`@sessionbus/dsh` is a pkg.pr.new preview until a separately reviewed trusted-
|
|
10
12
|
publishing workflow exists; its first registry version must be published manually
|
|
11
13
|
before trusted publishing can be configured.
|
|
@@ -13,12 +15,27 @@ The plugin reads the token once, deletes it from process.env, and retains it
|
|
|
13
15
|
nowhere in the plugin; DSH's immutable launch snapshot keeps it for the process
|
|
14
16
|
lifetime (trusted host).
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
See [Installing a DSH lane host](docs/HOST-INSTALL.md) for the complete
|
|
21
|
+
preflight, installation, verification, and rollback procedure.
|
|
22
|
+
|
|
23
|
+
Create the base-only lane profile for the package-owned `sessionbus-dsh`
|
|
24
|
+
product with:
|
|
17
25
|
|
|
18
26
|
```sh
|
|
19
27
|
dsh plugin --profile sessionbus add @sessionbus/dsh && dsh plugin --profile sessionbus exec sessionbus-dsh-install
|
|
20
28
|
```
|
|
21
29
|
|
|
30
|
+
On a host that already uses dashi, one product can own both peers and lanes:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
dsh plugin --profile sessionbus add @sessionbus/dsh && dsh plugin --profile sessionbus exec sessionbus-dsh-install --product dashi
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
In that form `SESSIONBUS_PRODUCTS` contains `dashi`, not `sessionbus-dsh`,
|
|
37
|
+
and the daemon maps it to `@antst/dashi-launcher`'s `dashi` bin.
|
|
38
|
+
|
|
22
39
|
Add the peer plugin to another profile, such as `web`, with:
|
|
23
40
|
|
|
24
41
|
```sh
|
|
@@ -34,12 +51,12 @@ operator-chosen identifier matching `^[a-z0-9][a-z0-9-]{0,31}$`.
|
|
|
34
51
|
Non-web profiles also receive the no-upload provider required by DSH's Session
|
|
35
52
|
Controller; ordinary text prompts work while file-upload receipts are rejected.
|
|
36
53
|
|
|
37
|
-
|
|
38
|
-
`sessionbus-dsh` bin.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
54
|
+
For the two-product form, register the daemon's `sessionbus-dsh` product as the
|
|
55
|
+
package's `sessionbus-dsh` bin. For the one-product form, register only `dashi`
|
|
56
|
+
as the `dashi` bin. Both launchers select the installed `sessionbus` profile
|
|
57
|
+
when given a launch token. Install the selected launcher alongside `dsh` at the
|
|
58
|
+
host level and put their shared `node_modules/.bin` on the daemon service's
|
|
59
|
+
`PATH`; the `dashi` launcher resolves its child `dsh` by name.
|
|
43
60
|
|
|
44
61
|
Uninstall without invoking DSH by running the installed bin from the profile:
|
|
45
62
|
|
package/install.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import path from "node:path";
|
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import { spawnSync } from "node:child_process";
|
|
8
8
|
|
|
9
|
-
const profilePatch = `- id: system-prompt
|
|
9
|
+
const profilePatch = (product) => `- id: system-prompt
|
|
10
10
|
config:
|
|
11
11
|
persona: >-
|
|
12
12
|
You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.
|
|
@@ -26,7 +26,7 @@ const profilePatch = `- id: system-prompt
|
|
|
26
26
|
- { id: session-controller, name: '@deepseek-ai/dsh-api-session-controller' }
|
|
27
27
|
- id: sessionbus
|
|
28
28
|
name: '@sessionbus/dsh'
|
|
29
|
-
config: { mode: lane, product:
|
|
29
|
+
config: { mode: lane, product: ${product} }
|
|
30
30
|
`;
|
|
31
31
|
const peerPatch = (product) => `- insert:
|
|
32
32
|
- { id: sessionbus, name: '@sessionbus/dsh', config: { product: ${product} } }
|
|
@@ -133,8 +133,9 @@ export function install(profileNames = [], options = {}) {
|
|
|
133
133
|
const root = options.root || path.dirname(fileURLToPath(import.meta.url));
|
|
134
134
|
const run = options.run || ((args) => spawnSync("dsh", args, { cwd: root, encoding: "utf8" }));
|
|
135
135
|
const names = [...new Set(profileNames.length ? profileNames : ["sessionbus"])];
|
|
136
|
+
const laneProduct = options.product ?? "sessionbus-dsh";
|
|
136
137
|
if (options.product !== undefined && (typeof options.product !== "string" || !productPattern.test(options.product))) throw new Error(`invalid product ${JSON.stringify(options.product)}; expected ^[a-z0-9][a-z0-9-]{0,31}$`);
|
|
137
|
-
if (names.includes("sessionbus") &&
|
|
138
|
+
if (names.includes("sessionbus") && !["sessionbus-dsh", "dashi"].includes(laneProduct)) throw new Error("the sessionbus profile product must be sessionbus-dsh or dashi");
|
|
138
139
|
if (names.some((name) => name !== "sessionbus") && options.product === undefined) throw new Error("--product is required for peer profiles");
|
|
139
140
|
for (const name of names) {
|
|
140
141
|
if (!validProfile(name)) throw new Error(`invalid profile name ${JSON.stringify(name)}`);
|
|
@@ -159,7 +160,7 @@ export function install(profileNames = [], options = {}) {
|
|
|
159
160
|
dsh: { profile: { bundles: ["@deepseek-ai/dsh-base"], patchReload: "startup" } },
|
|
160
161
|
};
|
|
161
162
|
writeChanged(manifestFile, `${JSON.stringify(manifest, null, 2)}\n`);
|
|
162
|
-
writeChanged(path.join(profile, "cordis.patch.yml"), profilePatch);
|
|
163
|
+
writeChanged(path.join(profile, "cordis.patch.yml"), profilePatch(laneProduct));
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sessionbus/dsh",
|
|
3
|
-
"version": "0.1.0-pre.
|
|
3
|
+
"version": "0.1.0-pre.6",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "plugin.cjs",
|
|
6
6
|
"exports": "./plugin.cjs",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@antst/dsh-file-uploads-none": "0.1.0-alpha.18",
|
|
17
|
-
"@sessionbus/kit": "0.
|
|
17
|
+
"@sessionbus/kit": "0.5.5"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@deepseek-ai/cordis": "^4.0.2",
|
package/plugin.cjs
CHANGED
|
@@ -313,6 +313,12 @@ function createRuntime(ctx, config, dependencies, prepared) {
|
|
|
313
313
|
assertKnownArguments(args, argumentsSchema);
|
|
314
314
|
return client.action(argumentsValue.action, args);
|
|
315
315
|
};
|
|
316
|
+
let removeGrant;
|
|
317
|
+
try {
|
|
318
|
+
// The peer floor guarantees this waterfall; this catch covers registration errors, not feature detection.
|
|
319
|
+
removeGrant = ctx.on("tools/pre-execute", async (execution, next) =>
|
|
320
|
+
execution.name === "sessionbus" ? { kind: "allow" } : next(), { prepend: true });
|
|
321
|
+
} catch (error) { throw new Error(`cannot grant sessionbus tool permission: ${clean(error)}`); }
|
|
316
322
|
const removeTool = ctx.tools.register(dependencies.defineTool({
|
|
317
323
|
name: "sessionbus",
|
|
318
324
|
description: "List, message, spawn and control Sessionbus sessions. Use trace mode off, events or content to configure live parent tracing for a direct child; spawn trace sets its initial mode.",
|
|
@@ -349,7 +355,7 @@ function createRuntime(ctx, config, dependencies, prepared) {
|
|
|
349
355
|
};
|
|
350
356
|
const removeReady = ctx.appReady.onReady(start);
|
|
351
357
|
const close = () => {
|
|
352
|
-
removeReady(); removeCreated(); removeDisposed(); removeTitle(); removeCommand(); removeTool();
|
|
358
|
+
removeReady(); removeCreated(); removeDisposed(); removeTitle(); removeCommand(); removeGrant(); removeTool();
|
|
353
359
|
for (const agent of peers.keys()) forget(agent);
|
|
354
360
|
worker?.shutdown(); native.removeEvents();
|
|
355
361
|
};
|