super-dsh 0.3.0-a → 0.3.0-c
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/bundles/better-dsh.tgz +0 -0
- package/bundles/manifest.json +2 -2
- package/node_modules/better-dsh/dsh-docs/baseline.md +13 -0
- package/node_modules/better-dsh/dsh-docs/subsystems/invariants.md +3 -0
- package/node_modules/better-dsh/dsh-docs/subsystems/invariants.zh.md +3 -0
- package/node_modules/better-dsh/lib/bundle-delivery.d.ts +1 -1
- package/node_modules/better-dsh/lib/bundle-delivery.js +4 -1
- package/node_modules/better-dsh/package.json +1 -5
- package/package.json +2 -2
- package/superd-hub/dist/spawn-world.js +2 -5
- package/superd-hub/dist/world-resolution.d.ts +6 -0
- package/superd-hub/dist/world-resolution.js +39 -0
package/bundles/better-dsh.tgz
CHANGED
|
Binary file
|
package/bundles/manifest.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"companions": [
|
|
3
3
|
{
|
|
4
4
|
"name": "better-dsh",
|
|
5
|
-
"version": "0.3.0-
|
|
5
|
+
"version": "0.3.0-c",
|
|
6
6
|
"tarball": "./better-dsh.tgz",
|
|
7
|
-
"sha256": "
|
|
7
|
+
"sha256": "a9287af10438fc48ca32a048392cf5192f5cef864fe152eb2b50c99e58061563"
|
|
8
8
|
}
|
|
9
9
|
]
|
|
10
10
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# DSH runtime compatibility
|
|
2
|
+
|
|
3
|
+
Better Dash and Super Dash use the same DSH host APIs. The verified upstream source baseline for this alignment is `dsh-v0.2.1-alpha.1` (`5badb15009ae1756c3afe0ae0cef1faafc290ccc`). The pages in this directory include older official reference snapshots; check this baseline before using an API described by a snapshot.
|
|
4
|
+
|
|
5
|
+
On `0.2.1-alpha.1`:
|
|
6
|
+
|
|
7
|
+
- The runtime `dsh-invariants` plugin, `ctx.invariants`, and companion `./invariant` exports are removed. The archived invariant reference does not define an available extension API.
|
|
8
|
+
- Plugin subpaths provide display text through `<specifier>/locale/en.json` and localized sibling exports, and icons through `<specifier>/icon`. Subpaths do not read a separate `package.json`.
|
|
9
|
+
- Composer statistics use separate `activity` and `usage` entries.
|
|
10
|
+
- The native Plugin Manager refreshes profile package resolution when bundles are installed, enabled, disabled or removed. Replacing installed package code still requires a restart.
|
|
11
|
+
- Automation is part of the Web composition. Reminder tools depend on agent mode; they are absent in Minimal mode and subagents.
|
|
12
|
+
|
|
13
|
+
See the [official release notes](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.2.1-alpha.1) and the actual host package exports for the complete interface contract.
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Runtime Invariants
|
|
2
2
|
|
|
3
|
+
> DSH `0.2.1-alpha.1` removes this plugin and all companion `./invariant` exports. This page is an older reference snapshot; use the [runtime compatibility baseline](../baseline.md) for the current host contract.
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
English | [中文](invariants.zh.md)
|
|
4
7
|
|
|
5
8
|
[dsh-invariants](../../packages/runtime-diagnostics/invariants) is the configurable registry service (`ctx.invariants`) for package-owned runtime invariant checks. It is one support-group package, not a three-package capability seam, and not part of the agent-loop spine: the registry owns selection, name reservation, child-fiber lifecycle, and package-attributed failure, while every workspace package publishes a `./invariant` companion plugin that registers checks under its exact npm package name. What a check may assert — authoritative event streams or mutable data, never service or method presence — is the runtime-invariants convention in [AGENTS.md](../../AGENTS.md#conventions); the registry design is owned by the [invariant-service Agent Note](../../.agents/notes/implemented/architecture/2026-07-19-package-owned-invariant-service.md).
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# 运行时不变式
|
|
2
2
|
|
|
3
|
+
> DSH `0.2.1-alpha.1` 已移除此插件及所有配套 `./invariant` 导出。本页保留旧版参考快照;当前宿主契约见[运行时兼容基线](../baseline.md)。
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
[English](invariants.md) | 中文
|
|
4
7
|
|
|
5
8
|
[dsh-invariants](../../packages/runtime-diagnostics/invariants) 是面向包自有运行时不变式检查的可配置注册表服务(`ctx.invariants`)。它是一个 support 组的包,不是三包能力 seam,也不属于 agent loop(智能体循环)主干:注册表拥有选择逻辑、名称保留、子 fiber 生命周期和归因到包的失败,而每个工作区包发布一个 `./invariant` 配套插件,以自己确切的 npm 包名注册检查。检查可以断言什么(权威事件流或可变数据,绝不是服务或方法是否存在)是 [AGENTS.md](../../AGENTS.md#conventions) 中的运行时不变式约定;注册表设计由[不变式服务 Agent Note](../../.agents/notes/implemented/architecture/2026-07-19-package-owned-invariant-service.zh.md)规定。
|
|
@@ -4,11 +4,14 @@ import { mkdir, readFile, realpath, rename, rm, writeFile } from "node:fs/promis
|
|
|
4
4
|
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { withFileLock, writeFileAtomic } from "@deepseek-ai/dsh-atomic-write";
|
|
7
|
+
import * as AppBoot from "@deepseek-ai/dsh-app-boot";
|
|
7
8
|
|
|
8
9
|
//#region src/bundle-delivery.ts
|
|
9
10
|
const name = "dashr-bundle-delivery";
|
|
10
11
|
const inject = ["profileContext", "appReady"];
|
|
11
12
|
const hash = (bytes) => createHash("sha256").update(bytes).digest("hex");
|
|
13
|
+
const nativePackages = AppBoot.PluginPackages?.prototype;
|
|
14
|
+
const restartForPromotion = nativePackages !== void 0 && typeof Reflect.get(nativePackages, "refresh") === "function";
|
|
12
15
|
const json = async (path$1) => JSON.parse(await readFile(path$1, "utf8"));
|
|
13
16
|
async function optionalJson(path$1) {
|
|
14
17
|
try {
|
|
@@ -152,7 +155,7 @@ async function reconcileBundledDelivery(profile, signal) {
|
|
|
152
155
|
await writeFileAtomic(receiptPath, JSON.stringify(receipts) + "\n", { mode: 384 });
|
|
153
156
|
if (disposition === "companion-removed") continue;
|
|
154
157
|
result.installed.push(`${item.name}@${item.version}`);
|
|
155
|
-
result.restartRequired ||= priorSpec !== void 0;
|
|
158
|
+
result.restartRequired ||= priorSpec !== void 0 || restartForPromotion;
|
|
156
159
|
}
|
|
157
160
|
}
|
|
158
161
|
return result;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-dsh",
|
|
3
|
-
"version": "0.3.0-
|
|
3
|
+
"version": "0.3.0-c",
|
|
4
4
|
"description": "Make your dsh ready for serious coding tasks. (Tools x Schemas)^REPL. `skill://`, `ctx://`, `agent://`, `dvc://`, `dsh://`, IPython REPL, Context as Variables, cross compactions recallable, full context revive. `hash-edit`, `dvc://browser`, subagent as function, workflow as function.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -144,7 +144,6 @@
|
|
|
144
144
|
"@deepseek-ai/dsh-fs-local": ">=0.1.5-0 <0.3.0-0",
|
|
145
145
|
"@deepseek-ai/dsh-home-paths": ">=0.1.5-0 <0.3.0-0",
|
|
146
146
|
"@deepseek-ai/dsh-host-webserver": ">=0.1.5-0 <0.3.0-0",
|
|
147
|
-
"@deepseek-ai/dsh-invariants": ">=0.1.5-0 <0.3.0-0",
|
|
148
147
|
"@deepseek-ai/dsh-llm": ">=0.1.5-0 <0.3.0-0",
|
|
149
148
|
"@deepseek-ai/dsh-llm-retry": ">=0.1.5-0 <0.3.0-0",
|
|
150
149
|
"@deepseek-ai/dsh-persona": ">=0.1.5-0 <0.3.0-0",
|
|
@@ -228,9 +227,6 @@
|
|
|
228
227
|
"@deepseek-ai/dsh-home-paths": {
|
|
229
228
|
"optional": true
|
|
230
229
|
},
|
|
231
|
-
"@deepseek-ai/dsh-invariants": {
|
|
232
|
-
"optional": true
|
|
233
|
-
},
|
|
234
230
|
"@deepseek-ai/dsh-llm": {
|
|
235
231
|
"optional": true
|
|
236
232
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-dsh",
|
|
3
|
-
"version": "0.3.0-
|
|
3
|
+
"version": "0.3.0-c",
|
|
4
4
|
"description": "Super D for the DeepSeek Harness (DSH) — one dsh plugin that mounts the superd hub (runtime selector, roster, per-runtime agents) and joins local foreign-agent runtimes (OMP, Codex, Claude, Pi, Hermes, Antigravity) into the DSH Web UI. Each runtime keeps its native home and session store; the hub only bridges.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"better-dsh": "0.3.0-
|
|
86
|
+
"better-dsh": "0.3.0-c",
|
|
87
87
|
"@earendil-works/pi-coding-agent": "0.84.2",
|
|
88
88
|
"zod": "4.4.3",
|
|
89
89
|
"@modelcontextprotocol/sdk": "^1.29.0"
|
|
@@ -28,6 +28,7 @@ import { entryListSchema } from '@deepseek-ai/cordis-plugin-include';
|
|
|
28
28
|
import { existsSync, writeFileSync, readFileSync, readdirSync, realpathSync } from 'node:fs';
|
|
29
29
|
import { join } from 'node:path';
|
|
30
30
|
import { superdTrustedHosts } from './world-mount.js';
|
|
31
|
+
import { widenWorldResolution } from './world-resolution.js';
|
|
31
32
|
/**
|
|
32
33
|
* Republish the host's live resolution with THIS world added as a linked
|
|
33
34
|
* root (spec §2.1, contract-legal form): `profilesDir`/`profileDir` are
|
|
@@ -97,11 +98,7 @@ async function publishWorldInHostResolutionTurn(packages, launcher, opts, worldP
|
|
|
97
98
|
if (!publishedRoots.has(rootName)) {
|
|
98
99
|
publishedRoots.set(rootName, { name: rootName, realPath: opts.home });
|
|
99
100
|
}
|
|
100
|
-
packages.replace({
|
|
101
|
-
...base,
|
|
102
|
-
entries: [...base.entries, ...publishedEntries.values()],
|
|
103
|
-
linkedRoots: [...base.linkedRoots, ...publishedRoots.values()],
|
|
104
|
-
});
|
|
101
|
+
packages.replace(widenWorldResolution(base, { installAnchor: launcher.installAnchor, home: launcher.home, profileDir: profile.dir }, publishedEntries.values(), publishedRoots.values()));
|
|
105
102
|
}
|
|
106
103
|
/** Bare package name of a module specifier (`@scope/pkg/sub` → `@scope/pkg`). */
|
|
107
104
|
function barePackageNameOf(specifier) {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ProfileRuntimeResolution, RuntimeResolution } from '@deepseek-ai/dsh-app-boot';
|
|
2
|
+
type ResolutionSource = ConstructorParameters<typeof ProfileRuntimeResolution>[0];
|
|
3
|
+
type WorldEntry = RuntimeResolution['entries'][number];
|
|
4
|
+
type WorldRoot = RuntimeResolution['linkedRoots'][number];
|
|
5
|
+
export declare function widenWorldResolution(base: RuntimeResolution, source: ResolutionSource, entries: Iterable<WorldEntry>, linkedRoots: Iterable<WorldRoot>): RuntimeResolution;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Preserve the host's native package refresh while retaining world import roots. */
|
|
2
|
+
import * as AppBoot from '@deepseek-ai/dsh-app-boot';
|
|
3
|
+
/** A native recomputable generation with the worlds' additional mappings. */
|
|
4
|
+
const WorldRuntimeResolution = typeof AppBoot.ProfileRuntimeResolution === 'function'
|
|
5
|
+
? class WorldRuntimeResolution extends AppBoot.ProfileRuntimeResolution {
|
|
6
|
+
// The parent freezes `this`; private slots still accept constructor values.
|
|
7
|
+
#source;
|
|
8
|
+
#worldEntries;
|
|
9
|
+
#worldRoots;
|
|
10
|
+
constructor(base, source, entries, roots) {
|
|
11
|
+
const names = new Set(base.entries.map((entry) => entry.name));
|
|
12
|
+
const rootNames = new Set(base.linkedRoots.map((root) => root.name));
|
|
13
|
+
super(source, {
|
|
14
|
+
...base,
|
|
15
|
+
// A package now supplied by the native table owns its own mapping.
|
|
16
|
+
entries: Object.freeze([...base.entries, ...entries.filter((entry) => !names.has(entry.name))]),
|
|
17
|
+
linkedRoots: Object.freeze([...base.linkedRoots, ...roots.filter((root) => !rootNames.has(root.name))]),
|
|
18
|
+
});
|
|
19
|
+
this.#source = source;
|
|
20
|
+
this.#worldEntries = entries;
|
|
21
|
+
this.#worldRoots = roots;
|
|
22
|
+
}
|
|
23
|
+
async computeLatestResolution() {
|
|
24
|
+
// Recompute native mappings from disk, then widen the successor again.
|
|
25
|
+
// Keeping only world additions prevents removed native packages lingering.
|
|
26
|
+
return new WorldRuntimeResolution(await super.computeLatestResolution(), this.#source, this.#worldEntries, this.#worldRoots);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
: undefined;
|
|
30
|
+
export function widenWorldResolution(base, source, entries, linkedRoots) {
|
|
31
|
+
const worldEntries = Object.freeze([...entries]);
|
|
32
|
+
const worldRoots = Object.freeze([...linkedRoots]);
|
|
33
|
+
// Earlier supported hosts expose data generations and have no refresh API.
|
|
34
|
+
// Keep that contract without evaluating a class extending a missing export.
|
|
35
|
+
if (WorldRuntimeResolution === undefined) {
|
|
36
|
+
return { ...base, entries: [...base.entries, ...worldEntries], linkedRoots: [...base.linkedRoots, ...worldRoots] };
|
|
37
|
+
}
|
|
38
|
+
return new WorldRuntimeResolution(base, Object.freeze({ ...source }), worldEntries, worldRoots);
|
|
39
|
+
}
|