dsh-tower 2.4.1 → 2.5.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.
Files changed (82) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/COMPATIBILITY.md +2 -0
  3. package/CONTRIBUTING.md +11 -5
  4. package/GLOSSARY.md +67 -0
  5. package/README.md +6 -0
  6. package/app/archive.js +16 -1
  7. package/app/board.js +16 -1
  8. package/app/gate.js +14 -0
  9. package/app/spawn-prechecks.js +18 -3
  10. package/cordis.patch.yml +27 -8
  11. package/docs/adr/0004-surface-budget.md +10 -4
  12. package/docs/adr/0005-component-surface.md +166 -0
  13. package/docs/architecture/overview.md +47 -20
  14. package/docs/guide/install-upgrade-migration.md +21 -0
  15. package/docs/guide/quickstart.md +71 -0
  16. package/docs/guide/release.md +60 -19
  17. package/docs/reference/component-surface.md +29 -17
  18. package/docs/reference/config.generated.md +4 -7
  19. package/docs/reference/config.md +7 -5
  20. package/docs/reference/doctor.md +11 -5
  21. package/docs/reference/surface-budget.md +29 -11
  22. package/docs/reference/tools.generated.md +1 -1
  23. package/docs/reference/tools.md +2 -2
  24. package/docs/zh/guide/install-upgrade-migration.md +1 -1
  25. package/docs/zh/reference/config.md +7 -5
  26. package/docs/zh/reference/doctor.md +7 -2
  27. package/docs/zh/reference/tools.md +3 -2
  28. package/domain/component-rules.js +216 -0
  29. package/domain/components.js +169 -49
  30. package/domain/config/schema.js +46 -23
  31. package/domain/gate.js +17 -2
  32. package/domain/scope.js +176 -5
  33. package/domain/surface.js +21 -7
  34. package/host/capability-archive.js +18 -0
  35. package/host/capability-board.js +18 -0
  36. package/host/capability-registry.js +4 -0
  37. package/host/doctor.js +50 -5
  38. package/host/preset-reviewer.js +27 -0
  39. package/host/preset-worker.js +32 -0
  40. package/host/presets.js +17 -0
  41. package/host/tool-registry.js +21 -4
  42. package/index.js +17 -6
  43. package/locale/archive/en.json +6 -0
  44. package/locale/archive/zh.json +6 -0
  45. package/locale/batch/en.json +1 -1
  46. package/locale/batch/zh.json +1 -1
  47. package/locale/board/en.json +6 -0
  48. package/locale/board/zh.json +6 -0
  49. package/locale/en.json +41 -21
  50. package/locale/hmr/en.json +2 -2
  51. package/locale/hmr/zh.json +1 -1
  52. package/locale/import/en.json +1 -1
  53. package/locale/import/zh.json +1 -1
  54. package/locale/leases/en.json +2 -2
  55. package/locale/leases/zh.json +2 -2
  56. package/locale/preset-reviewer/en.json +6 -0
  57. package/locale/preset-reviewer/zh.json +6 -0
  58. package/locale/preset-worker/en.json +6 -0
  59. package/locale/preset-worker/zh.json +6 -0
  60. package/locale/skills/en.json +1 -1
  61. package/locale/skills/zh.json +1 -1
  62. package/locale/tests/en.json +2 -2
  63. package/locale/tests/zh.json +2 -2
  64. package/locale/zh.json +40 -20
  65. package/package.json +15 -2
  66. package/scripts/check-components.mjs +642 -42
  67. package/scripts/check-pack.mjs +7 -3
  68. package/scripts/component-surface.json +87 -29
  69. package/scripts/generate-capability-locale.mjs +100 -21
  70. package/scripts/mount-smoke/probe.mjs +33 -3
  71. package/scripts/mount-smoke/surface.mjs +144 -1
  72. package/scripts/mount-smoke.mjs +24 -4
  73. package/scripts/pack-manifest.txt +15 -0
  74. package/scripts/release-notes.mjs +256 -0
  75. package/scripts/surface-baseline.json +32 -3
  76. package/scripts/surface-baseline.mjs +15 -5
  77. package/skills.js +4 -1
  78. package/tools/complete.js +3 -1
  79. package/tools/spawn.js +5 -5
  80. package/tools/test.js +7 -7
  81. package/ui-bundle/locale/en.json +1 -1
  82. package/ui-bundle/locale/zh.json +1 -1
package/tools/spawn.js CHANGED
@@ -24,8 +24,8 @@ import { buildAgentOptions, buildSpawnBriefing, waitForSpawnResult } from '../ap
24
24
  * recordSpawnThrottle: any,
25
25
  * recordSpawnSuccess: any,
26
26
  * runMissionDiscovery: any,
27
- * textOf: any,
28
- * inspectLeases: any,
27
+ * textOf: any, inspectLeases: any,
28
+ * leaseComponent?: () => { enabled: boolean, reason: string },
29
29
  * }} deps
30
30
  */
31
31
  export function registerSpawnTool(ctx, deps) {
@@ -71,6 +71,8 @@ export function registerSpawnTool(ctx, deps) {
71
71
  })
72
72
  const { subagents, provider } = await precheckSpawnServices({
73
73
  tower, ctx, config, preset, actor, exec, inspectLeases: deps.inspectLeases,
74
+ // #131: the app layer only needs the row fact; the root owns the registry.
75
+ leaseComponent: deps.leaseComponent,
74
76
  })
75
77
 
76
78
  const provisioned = await tower.provision({
@@ -134,9 +136,7 @@ export function registerSpawnTool(ctx, deps) {
134
136
  if (classifyError(error).retryable === true) {
135
137
  recordSpawnThrottle(tower.root, config.spawn.maxLiveWorkers)
136
138
  }
137
- // The child may already be running even when recordSpawn failed: stop
138
- // it and mark the reserved entry failed so it cannot keep writing
139
- // unobserved.
139
+ // The child may already be running: stop it and fail the reserved entry.
140
140
  if (agentId) {
141
141
  try {
142
142
  await Promise.resolve(subagents.interrupt(agentId, { kind: 'ancestor', agent: exec.agent }))
package/tools/test.js CHANGED
@@ -37,13 +37,13 @@ export function registerTestTool(ctx, deps) {
37
37
  await tower.assertWorktree(context.mission.worktree)
38
38
  const discovery = await runMissionDiscovery(tower, context.mission)
39
39
  if (!discovery.configured) {
40
- return {
41
- ok: false,
42
- configured: false,
43
- error: discovery.error ?? 'tower.testDiscovery is not configured in the worktree package.json',
44
- tests: [],
45
- commands: [],
46
- }
40
+ // #136: the `tower-tests` row is the switch. When the row is off, say so
41
+ // and say how to turn it back on; never report the repository as
42
+ // "not configured" for a component cause.
43
+ const error = discovery.disabledBy
44
+ ? `test discovery is unavailable: ${discovery.reason ?? `disabled by component ${discovery.disabledBy}`}; enable the ${discovery.disabledBy} component in the plugin page and restart DSH`
45
+ : discovery.error ?? 'tower.testDiscovery is not configured in the worktree package.json'
46
+ return { ok: false, configured: false, error, tests: [], commands: [] }
47
47
  }
48
48
  const receipt = discovery.receipt
49
49
  return {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Tower UI",
4
- "description": "Shows Tower tool cards, a composer-dock tower summary, and a transient Tower status strip."
4
+ "description": "Adds Tower cards for tool results, a compact status summary above the message box, and a short status strip, in the web client. When off: The web interface piece is not loaded: no Tower cards, status summary or status strip. The Tower host, missions, state and the board keep working."
5
5
  }
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Tower 界面",
4
- "description": "显示 Tower 工具卡片、输入框区域的 Tower 状态摘要,以及短暂的 Tower 状态提示条。"
4
+ "description": "在 Web 客户端中显示 Tower 工具结果卡片、输入框上方的简要状态摘要,以及简短的状态提示条。关闭后:界面插件不再加载,不再有 Tower 卡片、状态摘要或提示条。Tower 核心、任务线、状态与看板继续工作。"
5
5
  }
6
6
  }