specrune-dsh-host 0.0.0-stage → 0.9.0
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/LICENSE +21 -0
- package/agents/specrune-check.md +40 -0
- package/agents/specrune-implement.md +39 -0
- package/agents/specrune-research.md +44 -0
- package/bin/specrune-dsh.mjs +13 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/locate.js +82 -0
- package/package.json +45 -4
- package/panel/README.md +54 -0
- package/panel/lib/client.js +3235 -0
- package/panel/lib/index.js +1371 -0
- package/panel/locale/en.json +6 -0
- package/panel/locale/zh.json +6 -0
- package/panel/package.json +34 -0
- package/panel/test/package.test.mjs +54 -0
- package/panel/test/source.test.mjs +456 -0
- package/panel_follow.js +25 -0
- package/plugin.js +873 -0
- package/src/install.mjs +930 -0
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 jsfaint
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specrune-check
|
|
3
|
+
description: Review agent for the SpecRune workflow. Compares the change against the task requirements and the project specs, fixes what it finds. Never commits.
|
|
4
|
+
tools: read, write, edit, bash, find, grep
|
|
5
|
+
---
|
|
6
|
+
# Check Agent
|
|
7
|
+
|
|
8
|
+
You are the review agent inside a SpecRune workflow.
|
|
9
|
+
|
|
10
|
+
## You are already the sub-agent
|
|
11
|
+
|
|
12
|
+
The main session dispatched you; do the review and fixes yourself. Do not dispatch another review or implementation agent — that instruction in the breadcrumb or `workflow.md` is for the main session. Report work beyond a review's scope instead of spawning help.
|
|
13
|
+
|
|
14
|
+
## Load your skill first
|
|
15
|
+
|
|
16
|
+
Before reviewing, load the `specrune-review` skill, plus any skills named in your dispatch prompt. It is the authority for the review checklist; this template only adds role boundaries.
|
|
17
|
+
|
|
18
|
+
Use your host's skill tool when it has one. If it does not, read each skill file directly: `.agents/skills/<name>/SKILL.md` in the project, or `~/.agents/skills/<name>/SKILL.md` globally. If any is unavailable, report `<name> skill unavailable` and stop before reviewing.
|
|
19
|
+
|
|
20
|
+
Use the task path from the parent's prompt or curated context. Do not infer it from your child session, environment, or another session. If `check.jsonl` or the task artifacts are missing, report the gap before reviewing.
|
|
21
|
+
|
|
22
|
+
## What to read first
|
|
23
|
+
|
|
24
|
+
The current diff, then the task's `prd.md`, `design.md` / `implement.md` when present, and every spec and research file in `check.jsonl`. Your curated context should contain copies; if it does not, report the gap before reviewing.
|
|
25
|
+
|
|
26
|
+
## What to look for, in order
|
|
27
|
+
|
|
28
|
+
1. Regressed behavior and quietly dropped requirements.
|
|
29
|
+
2. Project-spec or platform-contract violations.
|
|
30
|
+
3. Logic changes with no test, or a test too weak to catch the bug.
|
|
31
|
+
4. Assumptions about paths, shells, encodings, or line endings that only hold locally.
|
|
32
|
+
5. Research conclusions used against their card: `INCONCLUSIVE` as established, `NOT_FOUND` papered over, or a stale `revision` without re-verification.
|
|
33
|
+
|
|
34
|
+
## What to do
|
|
35
|
+
|
|
36
|
+
Fix mechanical and local issues in scope; for design or judgment calls, report the evidence and stop. Re-run the focused lint, typecheck, and tests.
|
|
37
|
+
|
|
38
|
+
## Report
|
|
39
|
+
|
|
40
|
+
Report what you fixed, which files changed, and what you verified. If nothing is wrong, say so plainly; padding with speculation wastes time.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specrune-implement
|
|
3
|
+
description: Implementation agent for the SpecRune workflow. Reads the task's requirements and curated specs, then writes the code. Never commits.
|
|
4
|
+
tools: read, write, edit, bash, find, grep
|
|
5
|
+
---
|
|
6
|
+
# Implement Agent
|
|
7
|
+
|
|
8
|
+
You are the implementation agent inside a SpecRune workflow.
|
|
9
|
+
|
|
10
|
+
## You are already the sub-agent
|
|
11
|
+
|
|
12
|
+
The main session dispatched you; do the work yourself. Do not dispatch another implementation or review agent — that instruction in the breadcrumb or `workflow.md` is for the main session. Report work beyond one agent instead of spawning help.
|
|
13
|
+
|
|
14
|
+
## Load your skill first
|
|
15
|
+
|
|
16
|
+
Before reading code or editing, load the `specrune-before-dev` skill, plus any skills named in your dispatch prompt. It is the authority for the pre-implementation procedure; this template only adds role boundaries.
|
|
17
|
+
|
|
18
|
+
Use your host's skill tool when it has one. If it does not, read each skill file directly: `.agents/skills/<name>/SKILL.md` in the project, or `~/.agents/skills/<name>/SKILL.md` globally. If any is unavailable, report `<name> skill unavailable` and stop before editing.
|
|
19
|
+
|
|
20
|
+
Your curated context should already contain the task artifacts and `implement.jsonl` files. Do not assume the parent's conversation is available. If they are missing or incomplete, report the gap before editing; do not guess the requirements.
|
|
21
|
+
|
|
22
|
+
## What to read first
|
|
23
|
+
|
|
24
|
+
Read the task's `prd.md`, `design.md` / `implement.md` when present, then every spec and research file in `implement.jsonl`. Your curated context should contain copies; if it does not, report the gap before editing.
|
|
25
|
+
|
|
26
|
+
## What to do
|
|
27
|
+
|
|
28
|
+
Follow existing patterns; implement the change; run focused lint, typecheck, and tests; report what changed and what you verified.
|
|
29
|
+
|
|
30
|
+
Before editing, state the change boundary: the behavior gap, where it lives, the files you expect to change, what you will not do, and how you will show behavior did not change. If the scope is larger than the dispatch, say so before continuing.
|
|
31
|
+
|
|
32
|
+
## Never do
|
|
33
|
+
|
|
34
|
+
`git commit`, `git push`, `git merge` — committing belongs to the session owner.
|
|
35
|
+
|
|
36
|
+
## Working rules
|
|
37
|
+
|
|
38
|
+
- Read adjacent code and tests first; stay inside this task's scope; do not revert work you did not write. Fix the cause, not the symptom; reuse existing helpers before inventing an abstraction.
|
|
39
|
+
- Research files open with an evidence card (`status` / `sources` / `revision`). `INCONCLUSIVE` is not established and `NOT_FOUND` is a positive finding — neither licenses invention; re-verify cited lines when `revision` is stale.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specrune-research
|
|
3
|
+
description: Investigation agent for the SpecRune workflow. Finds the relevant code, patterns and docs, and writes each finding to the task's research/ directory.
|
|
4
|
+
tools: read, write, bash, find, grep
|
|
5
|
+
---
|
|
6
|
+
# Research Agent
|
|
7
|
+
|
|
8
|
+
You are the investigation agent inside a SpecRune workflow.
|
|
9
|
+
|
|
10
|
+
## Progressive disclosure
|
|
11
|
+
|
|
12
|
+
The research context is a navigation map, not preloaded bodies. Start from its paths and titles, read relevant contracts, then trace code and tests. Skip specs that are merely listed. `kind: navigation` entries record delivered pointers, not files read; a body intentionally not preloaded is not a dropped candidate. Search `.specrune/spec/` when incomplete. Record the sources the conclusions actually use in the evidence card; the ledger records delivery, not reading.
|
|
13
|
+
|
|
14
|
+
If no navigation was delivered, run `specrune context compile --role research` and read the JSON `context` field. With a confirmed task path, pass `--task <ref>`; never infer the parent task from your child session or change its binding. Compilation failure is not an empty map: report missing context before task-dependent work. Without a task, a self-contained question may still be investigated.
|
|
15
|
+
|
|
16
|
+
## Task and report
|
|
17
|
+
|
|
18
|
+
Confirm the task from the parent's explicit path or the host-delivered task; `task current` may verify a delivered identity but never replaces the parent's. Report disagreement before task-dependent work.
|
|
19
|
+
|
|
20
|
+
Write findings before reporting — an in-conversation-only finding disappears at the next compaction. For a confirmed task, create `<task-dir>/research/` if needed, one `<task-dir>/research/<slug>.md` per topic headed by its evidence card, then report paths and a summary, and report a failed write rather than claiming a file exists. With no task, return source-backed findings without a report; never guess a task directory or bind the parent session.
|
|
21
|
+
|
|
22
|
+
## Evidence card
|
|
23
|
+
|
|
24
|
+
Every report file opens with this YAML header:
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
status: VERIFIED # VERIFIED | INCONCLUSIVE | NOT_FOUND
|
|
28
|
+
sources: # files the conclusion actually rests on
|
|
29
|
+
- path: core/internal/specrune/context.go
|
|
30
|
+
lines: 654-682
|
|
31
|
+
- path: https://github.com/<org>/<repo>/blob/<rev>/<path>
|
|
32
|
+
revision: a1b2c3d # git rev at investigation time
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
- `VERIFIED` — you read the evidence; `sources` is mandatory.
|
|
36
|
+
- `INCONCLUSIVE` — the evidence does not settle the question.
|
|
37
|
+
- `NOT_FOUND` — the thing genuinely is not there.
|
|
38
|
+
- External repo? `sources[].path` may be an `http(s)://` permalink embedding the rev; `revision` then records that repo's rev (req:sessions-memory#session-record-authoritative; the doctor skips URL checks).
|
|
39
|
+
|
|
40
|
+
Pick exactly one. No `sources` entry means it is not a fact: cite, downgrade, or drop it — never dress a guess up as a conclusion. Cite `file:line` so a stale reference can be re-located from `revision`.
|
|
41
|
+
|
|
42
|
+
## Stay in your lane
|
|
43
|
+
|
|
44
|
+
Write only a plain `<slug>.md` report under this task's `research/` — no subdirectories, and never copy source into the task directory; cite it by `file:line` plus the `revision` in the card. Do not edit code, specs, platform config, or task files; patching is no longer investigating.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// specrune-dsh 的可执行入口。
|
|
3
|
+
//
|
|
4
|
+
// 包内只有这一个 bin:安装器负责把宿主桥落到 DSH 的中立目录并挂 profile,
|
|
5
|
+
// 不在 postinstall 里做任何事(pnpm 10 默认拦截依赖的生命周期脚本)。
|
|
6
|
+
// 共享核心缺失(旧版 specrune)等启动错误只打印可操作消息,不甩模块堆栈。
|
|
7
|
+
try {
|
|
8
|
+
const { main } = await import("../src/install.mjs");
|
|
9
|
+
process.exitCode = await main(process.argv.slice(2));
|
|
10
|
+
} catch (err) {
|
|
11
|
+
process.stderr.write(`specrune-dsh: ${err?.message ?? err}\n`);
|
|
12
|
+
process.exitCode = 1;
|
|
13
|
+
}
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/locate.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// CLI 二进制定位。与宿主桥 plugin.js 同一契约,独立成文件是为了让上游的
|
|
2
|
+
// plugin.js 只留一行 import。
|
|
3
|
+
//
|
|
4
|
+
// 顺序(双分发形态并存:壳注入的 SPECRUNE_BIN_APP 只在 Harness 壳里存在,
|
|
5
|
+
// 纯插件形态从 SPECRUNE_BIN 起;链本身不区分形态):
|
|
6
|
+
// ① SPECRUNE_BIN —— 本地开发期覆盖(go build 产物);
|
|
7
|
+
// ② 同目录 bin/specrune[.exe] —— 安装器从插件依赖里复制到中立目录的自带
|
|
8
|
+
// CLI。插件就从中立目录运行(profile 里是 symlink),同目录命中说明这
|
|
9
|
+
// 一份与插件代际锁死,宿主看不到 profile 的 node_modules 时也能用;
|
|
10
|
+
// ③ npm 平台包 —— 实装形态:插件包 dependencies 引 specrune,平台包
|
|
11
|
+
// (pnpm 按 os/cpu 自动选,hoisted 平铺在 profile node_modules)纯 fs
|
|
12
|
+
// 向上查找定位。命中即实装,未命中即 link/开发形态——这一档同时就是
|
|
13
|
+
// 「实装 vs link」的自检,不需要单独探测安装形态;
|
|
14
|
+
// ④ $DSH_HOME/specrune/bin/specrune —— 旧版 init --dsh 中立目录留下的二进制;
|
|
15
|
+
// ⑤ PATH 裸名兜底。
|
|
16
|
+
// 顺序治理「PATH 漂到旧版 CLI」的实害(本机三 CLI 并存曾致 init 成功报失败)。
|
|
17
|
+
// ② 排在 ③ 前:中立目录那份由本次安装器写入,与插件同代;市场实装的平台包
|
|
18
|
+
// 反而可能是另一代(叠加态)。
|
|
19
|
+
|
|
20
|
+
import { existsSync } from "node:fs";
|
|
21
|
+
import { dirname, join } from "node:path";
|
|
22
|
+
import { fileURLToPath } from "node:url";
|
|
23
|
+
|
|
24
|
+
// 平台映射表是 npm/cli/lib/launcher.js TARGETS 的镜像,那边是唯一出处。
|
|
25
|
+
const NPM_PLATFORM_PACKAGES = {
|
|
26
|
+
"linux-x64": "specrune-linux-x64",
|
|
27
|
+
"linux-arm64": "specrune-linux-arm64",
|
|
28
|
+
"darwin-x64": "specrune-darwin-x64",
|
|
29
|
+
"darwin-arm64": "specrune-darwin-arm64",
|
|
30
|
+
"win32-x64": "specrune-windows-x64",
|
|
31
|
+
"win32-arm64": "specrune-windows-arm64",
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// 同目录自带的二进制:安装器把它写到 <neutral>/bin,本文件也在 <neutral>。
|
|
35
|
+
// 用 import.meta.url 的 dirname 而不是 DSH_HOME 拼路径——profile 里是 symlink,
|
|
36
|
+
// 解析后的真实位置就是中立目录,跟着模块走比猜环境变量可靠。
|
|
37
|
+
export function locateViaBundledBinary() {
|
|
38
|
+
const binName = process.platform === "win32" ? "specrune.exe" : "specrune";
|
|
39
|
+
const bin = join(dirname(fileURLToPath(import.meta.url)), "bin", binName);
|
|
40
|
+
try {
|
|
41
|
+
return existsSync(bin) ? bin : "";
|
|
42
|
+
} catch {
|
|
43
|
+
return "";
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// 不用 createRequire().resolve:DSH host 是 Electron main(asar 感知模块系统),
|
|
48
|
+
// 对裸包名子路径 resolve 抛 "Invalid URL"(10-30 探针实录,panel 半侧同款)。
|
|
49
|
+
// 纯 fs 向上查找 node_modules/<pkg>/bin。
|
|
50
|
+
export function locateViaNpmPackage() {
|
|
51
|
+
const pkg = NPM_PLATFORM_PACKAGES[`${process.platform}-${process.arch}`];
|
|
52
|
+
if (!pkg) return "";
|
|
53
|
+
const binName = process.platform === "win32" ? "specrune.exe" : "specrune";
|
|
54
|
+
for (let dir = dirname(fileURLToPath(import.meta.url)); ; dir = dirname(dir)) {
|
|
55
|
+
const bin = join(dir, "node_modules", pkg, "bin", binName);
|
|
56
|
+
if (existsSync(bin)) return bin;
|
|
57
|
+
const parent = dirname(dir);
|
|
58
|
+
if (parent === dir) return "";
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// 按上面的顺序逐档探测;全不命中交回 PATH 裸名,由 spawn 报 ENOENT。
|
|
63
|
+
export function locateSpecruneBinary() {
|
|
64
|
+
const fromApp = (process.env["SPECRUNE_BIN_APP"] || "").trim();
|
|
65
|
+
if (fromApp) return fromApp;
|
|
66
|
+
const fromEnv = (process.env["SPECRUNE_BIN"] || "").trim();
|
|
67
|
+
if (fromEnv) return fromEnv;
|
|
68
|
+
const viaBundled = locateViaBundledBinary();
|
|
69
|
+
if (viaBundled) return viaBundled;
|
|
70
|
+
const viaNpm = locateViaNpmPackage();
|
|
71
|
+
if (viaNpm) return viaNpm;
|
|
72
|
+
const home = (process.env["DSH_HOME"] || "").trim();
|
|
73
|
+
if (home) {
|
|
74
|
+
const bundled = join(home, "specrune", "bin", process.platform === "win32" ? "specrune.exe" : "specrune");
|
|
75
|
+
try {
|
|
76
|
+
if (existsSync(bundled)) return bundled;
|
|
77
|
+
} catch {
|
|
78
|
+
/* 探测失败落 PATH */
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return process.platform === "win32" ? "specrune.exe" : "specrune";
|
|
82
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specrune-dsh-host",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "SpecRune 宿主桥:逐轮上下文注入 + specrune 子代理 provider(implement/check/research)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "plugin.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"specrune-dsh": "bin/specrune-dsh.mjs"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin",
|
|
12
|
+
"src",
|
|
13
|
+
"agents",
|
|
14
|
+
"plugin.js",
|
|
15
|
+
"locate.js",
|
|
16
|
+
"panel_follow.js",
|
|
17
|
+
"locale",
|
|
18
|
+
"panel"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=20"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"specrune": "^0.9.0"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"test": "node --test"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/jsfaint/SpecRune.git",
|
|
32
|
+
"directory": "plugins/dsh"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/jsfaint/SpecRune#readme",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/jsfaint/SpecRune/issues"
|
|
37
|
+
},
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"keywords": [
|
|
40
|
+
"specrune",
|
|
41
|
+
"dsh",
|
|
42
|
+
"deepseek-harness",
|
|
43
|
+
"plugin",
|
|
44
|
+
"spec-driven",
|
|
45
|
+
"workflow"
|
|
46
|
+
]
|
|
47
|
+
}
|
package/panel/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# specrune-panel
|
|
2
|
+
|
|
3
|
+
SpecRune 的 DSH 工作区面板:任务看板、任务详情(产物/上下文/调研)、项目接入
|
|
4
|
+
(初始化/导入/克隆/新建/登记)与 worktree 管理。
|
|
5
|
+
|
|
6
|
+
面板是 DSH 客户端插件包,由 `specrune-dsh` 安装器装配到 DSH 的机器级中立目录,
|
|
7
|
+
不由项目自己的 `specrune init` 写入。
|
|
8
|
+
|
|
9
|
+
## 安装
|
|
10
|
+
|
|
11
|
+
插件包自带 specrune CLI,不需要另装:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm i -g specrune-dsh-host
|
|
15
|
+
specrune-dsh install # 默认 profile:desktop
|
|
16
|
+
specrune-dsh install --profile work
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
不要用 `npx specrune-dsh install`:npx 在临时目录里运行,装出来的中立目录
|
|
20
|
+
会随缓存清理而失效。
|
|
21
|
+
|
|
22
|
+
安装器会:
|
|
23
|
+
|
|
24
|
+
1. 把宿主桥与面板源码落到 `<DSH_HOME>/specrune/`(默认 `~/.dsh/specrune/`);
|
|
25
|
+
2. 把插件依赖里的平台二进制复制到 `<DSH_HOME>/specrune/bin/specrune[.exe]`;
|
|
26
|
+
3. 在 profile 的 `cordis.patch.yml` 受管块里写入 `- id: specrune-panel`;
|
|
27
|
+
4. 在 profile 目录执行 `pnpm add specrune-dsh-host@link:<中立目录> specrune-panel@link:<中立目录>/panel`。
|
|
28
|
+
|
|
29
|
+
卸载走同一个入口:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
specrune-dsh uninstall
|
|
33
|
+
specrune-dsh status --json # links.host / links.panel 分别报告
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 双半侧
|
|
37
|
+
|
|
38
|
+
| 文件 | 运行位置 | 职责 |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `lib/client.js` | 浏览器(DSH 客户端) | 工作区页面 bundle;`window.__ModuleLoader__` 入口 |
|
|
41
|
+
| `lib/index.js` | 宿主(DSH Electron main) | `/specrune/*` HTTP 路由,经 `ctx.subprocess` 调 `specrune` CLI 与 `git` |
|
|
42
|
+
|
|
43
|
+
`package.json` 的 `dsh.client` 是 DSH 加载浏览器半侧的契约入口;`exports["./client"]`
|
|
44
|
+
指向同一个 bundle。`lib/index.js` 由 DSH 按包名加载(profile 受管块的 `name` 是裸包名)。
|
|
45
|
+
|
|
46
|
+
## 迁移说明
|
|
47
|
+
|
|
48
|
+
- 面板源码原先内嵌在 Go 资产(`core/internal/specrune/dshplatform/panel/`)里,
|
|
49
|
+
由 CLI 的 `init --dsh` 铺进项目/机器目录。现在唯一源码是 `plugins/dsh/panel/`,
|
|
50
|
+
Go 侧不再持有这份代码(P3c 下线旧资产)。
|
|
51
|
+
- 已安装的旧版本可继续用 `specrune-dsh uninstall` 清掉中立目录与 profile 受管块;
|
|
52
|
+
在此之前按本文重新安装即可切到新布局。
|
|
53
|
+
- 面板本身的产品行为与路由集合未变;本包相对 PR #84 只修了参数校验与 base 记录
|
|
54
|
+
清理的 bug。
|