dsh-tower 0.0.0-stage → 1.1.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/CHANGELOG.md +65 -0
- package/LICENSE +21 -0
- package/README.md +159 -2
- package/README.zh.md +160 -0
- package/cordis.patch.yml +23 -0
- package/icon.svg +7 -0
- package/index.js +296 -0
- package/lib/git.js +144 -0
- package/lib/modeStore.js +68 -0
- package/lib/store.js +123 -0
- package/lib/tools.js +801 -0
- package/lib/tower.js +1507 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +53 -4
- package/worker.js +41 -0
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tower",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "DSH-native Tower: mission planning, worktree isolation, review-gated merges, and a human-owned Tower mode.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Loui Finn",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"dsh",
|
|
10
|
+
"dsh-plugin",
|
|
11
|
+
"deepseek-harness",
|
|
12
|
+
"tower",
|
|
13
|
+
"multi-agent",
|
|
14
|
+
"worktree",
|
|
15
|
+
"code-review"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/louifinn/dsh-tower.git"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/louifinn/dsh-tower#readme",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/louifinn/dsh-tower/issues"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=22"
|
|
27
|
+
},
|
|
28
|
+
"exports": {
|
|
29
|
+
".": "./index.js",
|
|
30
|
+
"./worker": "./worker.js",
|
|
31
|
+
"./locale/*.json": "./locale/*.json",
|
|
32
|
+
"./icon": "./icon.svg"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"index.js",
|
|
36
|
+
"worker.js",
|
|
37
|
+
"lib/*.js",
|
|
38
|
+
"cordis.patch.yml",
|
|
39
|
+
"locale/*.json",
|
|
40
|
+
"icon.svg",
|
|
41
|
+
"README.md",
|
|
42
|
+
"README.zh.md",
|
|
43
|
+
"CHANGELOG.md",
|
|
44
|
+
"LICENSE"
|
|
45
|
+
],
|
|
46
|
+
"dsh": {
|
|
47
|
+
"bundle": {
|
|
48
|
+
"patch": "./cordis.patch.yml"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"test": "node --test tests/*.test.mjs",
|
|
53
|
+
"test:watch": "node --test --watch tests/*.test.mjs"
|
|
54
|
+
}
|
|
55
|
+
}
|
package/worker.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// tower-worker preset policy: narrow the visible tool surface and state the protocol.
|
|
2
|
+
export const name = 'dsh-tower/worker'
|
|
3
|
+
export const inject = ['tools', 'systemPrompt']
|
|
4
|
+
|
|
5
|
+
const ALLOW = [
|
|
6
|
+
'read',
|
|
7
|
+
'write',
|
|
8
|
+
'edit',
|
|
9
|
+
'glob',
|
|
10
|
+
'grep',
|
|
11
|
+
'pwsh',
|
|
12
|
+
'tower_mission',
|
|
13
|
+
'tower_status',
|
|
14
|
+
'tower_send',
|
|
15
|
+
'tower_inbox',
|
|
16
|
+
'tower_complete',
|
|
17
|
+
'tower_finding',
|
|
18
|
+
'tower_review',
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
const PROTOCOL = [
|
|
22
|
+
'You are a Tower worker in a DeepSeek Harness Tower workspace.',
|
|
23
|
+
'Work only inside the git worktree named in your briefing; never modify the main checkout.',
|
|
24
|
+
'Commit your work on the mission branch. Update the mission as you go with tower_mission',
|
|
25
|
+
'(task_done, blocker, status), and put the full handoff in your final message: what changed,',
|
|
26
|
+
'every file path, how you verified it, and anything left undone.',
|
|
27
|
+
'Do not spawn other agents and do not merge branches; the tower owns integration.',
|
|
28
|
+
].join(' ')
|
|
29
|
+
|
|
30
|
+
export function apply(ctx) {
|
|
31
|
+
try {
|
|
32
|
+
ctx.tools.restrict({ allow: ALLOW })
|
|
33
|
+
} catch {
|
|
34
|
+
// a composition without the tool registry still gets the protocol text
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
ctx.systemPrompt.section({ name: 'tower:worker-protocol', order: 12000, text: PROTOCOL })
|
|
38
|
+
} catch {
|
|
39
|
+
// prompt assembly remains valid without the section
|
|
40
|
+
}
|
|
41
|
+
}
|