dsh-loadout 0.12.4 → 0.12.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/CHANGELOG.md CHANGED
@@ -2,7 +2,19 @@
2
2
 
3
3
  「装备栏」是一个 DeepSeek Harness 插件:给每个对话选一套工具(套装),只把用得上的工具投给模型。
4
4
 
5
- ## 0.12.4(本地测试版,未发布)
5
+ ## 0.12.6
6
+
7
+ - **发布流水线失败的那次补上**:0.12.5 的 `npm publish --provenance` 在 sigstore 里报了 `TLOG_CREATE_ENTRY_ERROR (409) an equivalent entry already exists in the transparency log`——包本身没进 registry(`latest` 仍是 0.12.4),是可信日志去重把这一版挡了下来。`publish.yml` 现在多两层兜底:先看这个版本是不是其实已经到 registry 了(到了就算成功),否则去掉 `--provenance` 再发一次,并留下 warning;正常路径仍然带 provenance。
8
+ - 这一版内容与 0.12.5 相同(只是版本号 + 上面这条流水线兜底)。
9
+
10
+ ## 0.12.5
11
+
12
+ - **把开发期探针从发布包里清掉**:`scripts/*-probe.mjs` 六个脚本(agent-probe / agent-lookup-probe / attribution-probe / cmd-probe / dock-probe / slots-probe)都是当时读 `app.asar` 用的一次性工具,里面硬编码了本机绝对路径,却因为 `files: scripts/*.mjs` 一直被塞进 npm 包。现在它们从仓库和包里一起消失,包里只剩三套自检。
13
+ - 市场条目的注释指向 `docs/RELEASING.md`(原来指向已删除的 `RELEASE.md`)。
14
+ - `publish.yml` 的说明改成事实:npm 已不发经典 token,需要 granular token + Bypass 2FA。
15
+ - `index.js` 里那个用来让 `restrict()` 报错的哨兵工具名从 `__dsh_plugin_kits_probe__` 改成 `__dsh_loadout_probe__`(旧包名残留,纯内部字符串,无行为变化)。
16
+ - README 补一句 `scripts/install.ps1` 的定位:没有 `dsh` CLI 时的链接安装,等价于 `install_bundle`。
17
+ ## 0.12.4
6
18
 
7
19
  - **重名当场说清楚**:新建/编辑套装时,输入框下方直接给出原因——「「仅聊天」是预置套装(标识 chat),不能用这个名字」,或是「已经有叫「我的套」的套装了」。占用时保存按钮置灰,不用等提交后才失败。
8
20
  - 说明重名判定:名字先 trim + NFKC + 转小写,然后同时比对**自建套装的 name 与 title**、**预置套装的 name(稳定标识)与 title(界面显示)**、以及保留字(全部 / 仅内置 / all / default…)。所以预置显示「仅聊天」时,chat 依然被占用——chat 是它的标识。
package/README.en.md CHANGED
@@ -43,6 +43,8 @@ Letting Harness install it is the same as the third form:
43
43
  plugin_manager action=install_bundle target=<absolute path to this directory>
44
44
  ```
45
45
 
46
+ Without the dsh CLI you can use `scripts/install.ps1`: it creates the junction link and writes the profile manifest, the same thing `install_bundle` does. Its `-Copy` switch goes back to a copied install — avoid it unless you know why you want one.
47
+
46
48
  Restart the app afterwards: host plugins have no hot reload, and the UI needs at least a refresh.
47
49
 
48
50
  ### Why not copy the files
@@ -63,7 +65,7 @@ node scripts/client-smoke.mjs # browser bundle: menu and settings panel render
63
65
  - **Settings → Loadout**: manage kits, edit notes, choose the new-conversation default.
64
66
  - `/kit <name>`: switch from the message box.
65
67
 
66
- Settings has no conversation of its own, so it only decides *where new conversations start* — use the header button to change the current one. In the default list, `All` / `Built-in only` and kits are the same kind of card: each can copy its switch command or be set as default. **My kits** starts collapsed and shows only the current default; open it to see the rest. A saved kit can be **edited** on its card: the form opens under that card, and you either overwrite it (conversations already using it switch immediately) or save as a new kit.
68
+ Settings has no conversation of its own, so it only decides *where new conversations start* — use the header button to change the current one. In the default list, `All` / `Built-in only` and kits are the same kind of card: each can copy its switch command or be set as default. **My kits** starts collapsed and shows only the current default, with the same + New kit action right under it; open it to see the rest. A saved kit can be **edited** on its card: the form opens under that card, and you either overwrite it (conversations already using it switch immediately) or save as a new kit.
67
69
 
68
70
  ### Shipped presets (five, read-only)
69
71
  Five read-only presets. Editing one forks it into one of your kits.
@@ -85,7 +87,7 @@ Five read-only presets. Editing one forks it into one of your kits.
85
87
  ## Upgrading
86
88
 
87
89
  - 0.11.x → 0.12.x: same package name; install over it. The store migrates to `schema: 2` once, with a `loadout.json.v1.bak-<ts>` backup, and every existing conversation is pinned to 全部 so a default change cannot reach back into it.
88
- - 0.4.x → 0.11.x: the package was renamed from `dsh-plugin-kits`; remove the old one first:
90
+ - 0.4.x → 0.12.x: the package was renamed from `dsh-plugin-kits`; remove the old one first:
89
91
 
90
92
  ```text
91
93
  plugin_manager action=remove_bundle target=dsh-plugin-kits
package/README.md CHANGED
@@ -44,6 +44,8 @@ dsh plugin --profile desktop add link:<本目录绝对路径>
44
44
  plugin_manager action=install_bundle target=<本目录绝对路径>
45
45
  ```
46
46
 
47
+ 没有 dsh CLI 的机器上,可以用 `scripts/install.ps1`:它建 junction 链接并写 profile manifest,等价于 `install_bundle`;`-Copy` 会退回拷贝安装,除非你清楚后果,否则别用。
48
+
47
49
  装完重启应用:宿主插件没有热重载,界面至少刷新一次。
48
50
 
49
51
  ### 为什么不能复制文件
@@ -64,7 +66,7 @@ node scripts/client-smoke.mjs # 浏览器 bundle:菜单与设置页渲染
64
66
  - 设置 → 装备栏:管理套装、改备注、选新对话默认套装。
65
67
  - `/kit <名字>`:在对话里直接切换。
66
68
 
67
- 设置页没有自己的对话,所以它只管「新对话从哪套开始」,不切换当前对话——当前对话请在标题栏里切。默认列表里「全部 / 仅内置」和套装是同一种卡片:都能「复制切换命令」或「设为默认」;「我的套装」默认折叠,只显示当前默认的那一个,点开才列出全部。已经保存的套装可以在卡片上「编辑」:改动就在那张卡片下面展开,「覆盖保存」(正在用它的对话立刻按新工具集走)或「另存为新套装」。
69
+ 设置页没有自己的对话,所以它只管「新对话从哪套开始」,不切换当前对话——当前对话请在标题栏里切。默认列表里「全部 / 仅内置」和套装是同一种卡片:都能「复制切换命令」或「设为默认」;「我的套装」默认折叠,只显示当前默认的那一个(这一行下面始终留着「+ 新建套装」),点开才列出全部。已经保存的套装可以在卡片上「编辑」:改动就在那张卡片下面展开,「覆盖保存」(正在用它的对话立刻按新工具集走)或「另存为新套装」。
68
70
 
69
71
  ### 预置套装(五套,只读)
70
72
 
@@ -101,8 +103,8 @@ node scripts/client-smoke.mjs # 浏览器 bundle:菜单与设置页渲染
101
103
 
102
104
  ## 升级
103
105
 
104
- - 0.5.x → 0.9.x:包名没变(`dsh-loadout`),直接 `plugin_manager install_bundle` 覆盖即可;套装数据在 `~/.dsh/loadout.json`,不动。
105
- - 0.4.x → 0.9.x:包名从 `dsh-plugin-kits` 改成 `dsh-loadout`,先卸旧的再装新的:
106
+ - 0.5.x → 0.12.x:包名没变(`dsh-loadout`),直接 `plugin_manager install_bundle` 覆盖即可;套装数据在 `~/.dsh/loadout.json`,第一次启动会迁移到 `schema: 2`(旧文件备份为 `.v1.bak-<时间戳>`)。
107
+ - 0.4.x → 0.12.x:包名从 `dsh-plugin-kits` 改成 `dsh-loadout`,先卸旧的再装新的:
106
108
 
107
109
  ```text
108
110
  plugin_manager action=remove_bundle target=dsh-plugin-kits
package/index.js CHANGED
@@ -1238,7 +1238,7 @@ export function apply(ctx, config = {}) {
1238
1238
  }
1239
1239
  try {
1240
1240
  // A rejected restriction names every global tool it knows about.
1241
- tools.restrict({ deny: ['__dsh_plugin_kits_probe__'] })
1241
+ tools.restrict({ deny: ['__dsh_loadout_probe__'] })
1242
1242
  } catch (error) {
1243
1243
  const message = String(error instanceof Error ? error.message : error)
1244
1244
  const match = /known global tools: ([^;]+)/u.exec(message)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-loadout",
3
- "version": "0.12.4",
3
+ "version": "0.12.6",
4
4
  "description": "Loadout for DeepSeek Harness: group tools into kits, keep only the current kit's tools visible in each conversation, and manage everything from a settings panel.",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -1,24 +0,0 @@
1
- /**
2
- * Is there a host service that maps a session id to its live agent?
3
- */
4
- import { readFileSync, readdirSync } from 'node:fs'
5
-
6
- const BASE = 'C:/Users/JungleYXu/AppData/Local/Programs/DeepSeek Harness/resources/app.asar/dsh/node_modules/@deepseek-ai'
7
- const packages = readdirSync(BASE)
8
- const pattern = /agentFor|bySession|sessionAgent|agentOf|resolveAgent/g
9
-
10
- for (const name of packages) {
11
- if (!name.startsWith('dsh-')) continue
12
- let text
13
- try {
14
- text = readFileSync(`${BASE}/${name}/lib/index.js`, 'utf8')
15
- } catch {
16
- continue
17
- }
18
- const hits = [...new Set([...text.matchAll(pattern)].map((m) => m[0]))]
19
- if (hits.length === 0) continue
20
- const index = text.search(pattern)
21
- console.log(`\n### ${name} :: ${hits.join(', ')}`)
22
- console.log(text.slice(Math.max(0, index - 200), index + 260).replace(/\s+/g, ' '))
23
- }
24
-
@@ -1,25 +0,0 @@
1
- /**
2
- * How does host code get a session id from an agent object?
3
- */
4
- import { readFileSync } from 'node:fs'
5
-
6
- const BASE = 'C:/Users/JungleYXu/AppData/Local/Programs/DeepSeek Harness/resources/app.asar/dsh/node_modules/@deepseek-ai'
7
- const files = [
8
- 'dsh-tools/lib/index.js',
9
- 'dsh-agent/lib/index.js',
10
- 'dsh-session/lib/index.js',
11
- 'dsh-subagent/lib/index.js',
12
- ]
13
-
14
- for (const rel of files) {
15
- let text
16
- try {
17
- text = readFileSync(`${BASE}/${rel}`, 'utf8')
18
- } catch (error) {
19
- console.log(`skip ${rel}: ${error.code}`)
20
- continue
21
- }
22
- const hits = [...text.matchAll(/agent\.session[A-Za-z]*/g)].map((m) => m[0])
23
- const unique = [...new Set(hits)]
24
- console.log(`${rel} -> ${unique.join(', ') || '(none)'}`)
25
- }
@@ -1,91 +0,0 @@
1
- /**
2
- * Offline probe: does the package-name heuristic actually recover the plugins
3
- * that own the host-registered tools? Prints the derived index and the mapping
4
- * for a list of real tool names, so the heuristic can be checked before the app
5
- * is restarted.
6
- *
7
- * ELECTRON_RUN_AS_NODE=1 "DeepSeek Harness.exe" scripts/attribution-probe.mjs
8
- */
9
- import { existsSync, readFileSync, readdirSync } from 'node:fs'
10
- import { homedir } from 'node:os'
11
- import { join } from 'node:path'
12
-
13
- const BUILTIN_PREFIXES = new Set([
14
- 'todo', 'web', 'kit', 'agent', 'work', 'read', 'write', 'edit', 'glob', 'grep',
15
- 'ask', 'present', 'skill', 'workflow', 'subagent', 'send', 'list', 'interrupt',
16
- 'job', 'schedule', 'create', 'get', 'update', 'exit', 'compress', 'decompress',
17
- 'search', 'load', 'working',
18
- ])
19
-
20
- const NAME_NOISE = new Set([
21
- 'core', 'tools', 'tool', 'client', 'server', 'shared', 'common', 'plugin', 'plugins',
22
- 'dsh', 'ui', 'web', 'harness', 'extension', 'preset', 'settings', 'sidebar', 'runtime',
23
- ])
24
-
25
- const SELF = 'dsh-loadout'
26
-
27
- const REAL_GLOBAL_TOOLS = [
28
- 'kit_list', 'kit_apply', 'kit_create', 'kit_set_tools', 'kit_set_default', 'kit_delete',
29
- 'modlens_read_image',
30
- 'weknora_list_knowledge_bases', 'weknora_search', 'weknora_read_document', 'weknora_ask',
31
- 'hindsight_sync_status', 'hindsight_diagnose', 'hindsight_search_knowledge_pages',
32
- 'hindsight_list_knowledge_pages', 'hindsight_read_knowledge_page', 'hindsight_reflect',
33
- 'hindsight_capture_initiative', 'hindsight_ingest_document',
34
- 'working_directory',
35
- 'vision_describe', 'vision_bootstrap', 'vision_materialize', 'vision_ground', 'vision_detect',
36
- 'vision_crop', 'vision_present', 'vision_pixel_diff', 'vision_colors', 'vision_ocr',
37
- 'vision_long_screenshot_ocr', 'vision_trace', 'vision_extract_foreground', 'vision_html_screenshot',
38
- 'list_mcp_resources', 'list_mcp_resource_templates', 'read_mcp_resource',
39
- 'compress', 'decompress', 'search_context',
40
- 'acp_status', 'acp_cache', 'acp_read_original_image',
41
- 'load_workspace_dependencies',
42
- ]
43
-
44
- function profilePackages() {
45
- const root = join(homedir(), '.dsh', 'profiles')
46
- const names = new Set()
47
- for (const entry of readdirSync(root)) {
48
- const file = join(root, entry, 'package.json')
49
- if (!existsSync(file)) continue
50
- const parsed = JSON.parse(readFileSync(file, 'utf8'))
51
- for (const name of Object.keys(parsed.dependencies ?? {})) names.add(name)
52
- for (const bundle of parsed?.dsh?.profile?.bundles ?? []) if (typeof bundle === 'string') names.add(bundle)
53
- }
54
- return [...names]
55
- }
56
-
57
- function buildIndex(packages) {
58
- const index = new Map()
59
- for (const packageName of packages) {
60
- const base = packageName.replace(/^@[^/]+\//, '')
61
- if (base === SELF) continue
62
- const stripped = base.replace(/^dsh-/, '').replace(/^plugin-/, '')
63
- const tokens = [stripped, ...stripped.split('-')]
64
- .map((token) => token.toLowerCase())
65
- .filter((token) => token.length >= 3 && !NAME_NOISE.has(token) && !BUILTIN_PREFIXES.has(token))
66
- for (const token of tokens) if (!index.has(token)) index.set(token, { id: token, title: stripped, packageName: base })
67
- }
68
- return index
69
- }
70
-
71
- const packages = profilePackages()
72
- const index = buildIndex(packages)
73
- console.log(`profile packages: ${packages.length}`)
74
- console.log(`tokens: ${[...index.keys()].sort().join(', ')}`)
75
- console.log('')
76
- const grouped = new Map()
77
- const orphan = []
78
- for (const toolName of REAL_GLOBAL_TOOLS) {
79
- const cut = toolName.indexOf('_')
80
- const prefix = cut > 0 ? toolName.slice(0, cut).toLowerCase() : ''
81
- const owner = prefix === '' || BUILTIN_PREFIXES.has(prefix) ? undefined : index.get(prefix)
82
- if (owner === undefined) { orphan.push(toolName); continue }
83
- if (!grouped.has(owner.title)) grouped.set(owner.title, [])
84
- grouped.get(owner.title).push(toolName)
85
- }
86
- for (const [title, tools] of [...grouped.entries()].sort()) {
87
- console.log(`${title} (${tools.length})`)
88
- console.log(` ${tools.join(', ')}`)
89
- }
90
- console.log('')
91
- console.log(`built-in / unattributed (${orphan.length}): ${orphan.join(', ')}`)
@@ -1,30 +0,0 @@
1
- /**
2
- * What can a client plugin do with the command system, and how is a session id
3
- * exposed to a session-scoped slot?
4
- */
5
- import { readFileSync } from 'node:fs'
6
-
7
- const BASE = 'C:/Users/JungleYXu/AppData/Local/Programs/DeepSeek Harness/resources/app.asar/dsh/node_modules/@deepseek-ai'
8
-
9
- function show(rel, pattern, width = 260, limit = 6) {
10
- let text
11
- try {
12
- text = readFileSync(`${BASE}/${rel}`, 'utf8')
13
- } catch (error) {
14
- console.log(`skip ${rel}: ${error.code}`)
15
- return
16
- }
17
- console.log(`\n##### ${rel}`)
18
- let index = text.search(pattern)
19
- let shown = 0
20
- while (index !== -1 && shown < limit) {
21
- console.log('...' + text.slice(Math.max(0, index - 80), index + width).replace(/\s+/g, ' '))
22
- index = text.slice(index + 1).search(pattern)
23
- if (index !== -1) index += 1
24
- shown += 1
25
- }
26
- }
27
-
28
- show('dsh-client-ui-commands/lib/client.js', /submitCommand|runCommand|executeCommand/)
29
- show('dsh-client-commands/lib/index.js', /^\s*(run|execute|dispatch|submit)\(|exports\.(run|execute|dispatch|submit)/, 200, 8)
30
- show('dsh-client-ui-conversation/lib/client.js', /inject: \(sessionId\) =>/, 700, 2)
@@ -1,53 +0,0 @@
1
- /**
2
- * Look at how the shipped bundles use the composer-area slots, so the kit bar
3
- * can plug into a real surface with real props.
4
- */
5
- import { readFileSync, readdirSync } from 'node:fs'
6
-
7
- const BASE = 'C:/Users/JungleYXu/AppData/Local/Programs/DeepSeek Harness/resources/app.asar/dsh/node_modules/@deepseek-ai'
8
-
9
- function files(pkg) {
10
- const out = []
11
- const walk = (dir, depth) => {
12
- if (depth > 3) return
13
- let names = []
14
- try {
15
- names = readdirSync(dir)
16
- } catch {
17
- return
18
- }
19
- for (const name of names) {
20
- if (name === 'node_modules') continue
21
- const full = `${dir}/${name}`
22
- if (name.endsWith('.js') || name.endsWith('.d.ts')) out.push(full)
23
- else if (!name.includes('.')) walk(full, depth + 1)
24
- }
25
- }
26
- walk(`${BASE}/${pkg}`, 0)
27
- return out
28
- }
29
-
30
- const targets = ['composer.dock', 'conversation.composer', 'session.header.utilities', 'shell.overlay']
31
- const pkgs = readdirSync(BASE).filter((n) => n.startsWith('dsh-client-ui'))
32
-
33
- for (const pkg of pkgs) {
34
- for (const file of files(pkg)) {
35
- let text
36
- try {
37
- text = readFileSync(file, 'utf8')
38
- } catch {
39
- continue
40
- }
41
- for (const target of targets) {
42
- let index = text.indexOf(target)
43
- let shown = 0
44
- while (index !== -1 && shown < 2) {
45
- const start = Math.max(0, index - 320)
46
- console.log(`\n=== ${pkg}/${file.split('/').slice(-2).join('/')} :: ${target}`)
47
- console.log(text.slice(start, index + 320).replace(/\s+/g, ' '))
48
- index = text.indexOf(target, index + 1)
49
- shown += 1
50
- }
51
- }
52
- }
53
- }
@@ -1,59 +0,0 @@
1
- /**
2
- * Find real slot names in the shipped client bundles.
3
- * Electron's fs is asar-aware, so archive-internal paths start with '/'.
4
- */
5
- import { readFileSync, readdirSync, statSync } from 'node:fs'
6
-
7
- const ROOT = '/dsh/node_modules/@deepseek-ai'
8
- const found = new Map()
9
-
10
- function safeReaddir(dir) {
11
- try {
12
- return readdirSync(dir, { withFileTypes: false })
13
- } catch {
14
- try {
15
- return readdirSync(dir)
16
- } catch {
17
- return []
18
- }
19
- }
20
- }
21
-
22
- const packages = safeReaddir(ROOT).filter((name) => name.startsWith('dsh-client-ui') || name.startsWith('dsh-client-'))
23
- console.log(`packages: ${packages.length}`)
24
-
25
- const pattern = /["']((?:shell|conversation|settings|sidebar|composer|workspace|agent|home|chat|message|session)\.[a-zA-Z.]+)["']/g
26
-
27
- function scan(dir, depth) {
28
- if (depth > 3) return
29
- for (const entry of safeReaddir(dir)) {
30
- const full = `${dir}/${entry}`
31
- let isDir = false
32
- try {
33
- isDir = statSync(full).isDirectory()
34
- } catch {
35
- continue
36
- }
37
- if (isDir) {
38
- if (entry === 'node_modules') continue
39
- scan(full, depth + 1)
40
- continue
41
- }
42
- if (!entry.endsWith('.js')) continue
43
- let text
44
- try {
45
- text = readFileSync(full, 'utf8')
46
- } catch {
47
- continue
48
- }
49
- for (const match of text.matchAll(pattern)) {
50
- const slot = match[1]
51
- if (slot.split('.').length < 2) continue
52
- found.set(slot, (found.get(slot) ?? 0) + 1)
53
- }
54
- }
55
- }
56
-
57
- for (const name of packages) scan(`${ROOT}/${name}`, 0)
58
-
59
- for (const [slot, count] of [...found.entries()].sort()) console.log(`${slot}\t${count}`)