dsh-taskbridge 1.7.0 → 1.8.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 +18 -0
- package/LICENSE +21 -21
- package/README.md +150 -289
- package/THIRD_PARTY_NOTICES.txt +23 -23
- package/antigravity/agents/dsh-taskbridge.md +31 -0
- package/antigravity/skills/dsh-taskbridge/SKILL.md +51 -0
- package/codex/dsh-taskbridge.toml +170 -627
- package/cordis.patch.yml +6 -6
- package/docs/INTRODUCTION.md +119 -295
- package/docs/INTRODUCTION.zh.md +134 -279
- package/docs/antigravity-integration.md +42 -0
- package/docs/auth-contract.md +138 -138
- package/docs/claude-code.md +6 -11
- package/docs/codex-integration.md +13 -2
- package/docs/contracts-stage-b.md +443 -443
- package/docs/plugin-market.md +30 -30
- package/docs/redaction-contract.md +170 -170
- package/docs/releases/1.7.0.zh.md +11 -11
- package/docs/releases/1.8.0.zh.md +16 -0
- package/docs/runtime-compatibility.md +1 -1
- package/docs/taskbridge-upgrade.md +28 -28
- package/docs/taskdispatch-upgrade.md +25 -25
- package/docs/workspace-contract.md +538 -538
- package/docs/workspace-grouping.md +126 -126
- package/icon.svg +1 -1
- package/lib/client.d.ts +733 -699
- package/lib/client.js +7 -7
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +149 -144
- package/src/antigravity/installer.js +1046 -0
- package/src/antigravity/seam.js +142 -0
- package/src/auth/fence.js +361 -361
- package/src/auth/grants.js +789 -789
- package/src/client/api.js +143 -0
- package/src/client/index.jsx +113 -3
- package/src/client/sidebar.jsx +862 -862
- package/src/client/styles.js +624 -624
- package/src/client/task-cleanup.js +304 -304
- package/src/client/task-records-table.jsx +217 -217
- package/src/client/task-view.js +307 -307
- package/src/client/workspace-groups.js +482 -482
- package/src/client/workspaces-browser.jsx +770 -770
- package/src/codex/agent-ownership.js +270 -270
- package/src/codex/installer.js +6 -0
- package/src/codex/toml.js +784 -784
- package/src/config/redact.js +245 -245
- package/src/config/store.js +186 -186
- package/src/credentials/seam.js +202 -202
- package/src/http/respond.js +6 -5
- package/src/http/user-plane.js +72 -0
- package/src/index.js +25 -0
- package/src/jobs/diagnostics.js +15 -15
- package/src/jobs/plan-store.js +1020 -1020
- package/src/jobs/review-note.js +63 -63
- package/src/jobs/task-descriptions.js +82 -82
- package/src/jobs/task-display.js +73 -73
- package/src/jobs/task-tree.js +786 -786
- package/src/jobs/title.js +134 -134
- package/src/mcp/continuation.js +317 -317
- package/src/mcp/server.js +12 -5
- package/src/model/connectivity.js +371 -371
- package/src/model/discovery.js +582 -582
- package/src/model/native-catalog.js +68 -68
- package/src/model/openai-adapter.js +671 -671
- package/src/model/probe.js +264 -264
- package/src/model/providers.js +756 -756
- package/src/model/routing.js +321 -321
- package/src/runtime/permissions.js +1619 -1619
- package/src/runtime/question-call.js +162 -162
- package/src/runtime/questions.js +909 -909
- package/src/runtime/worker-prompt.js +60 -53
- package/src/workspace/audit.js +775 -775
- package/src/workspace/preflight.js +424 -424
- package/src/workspace/worktrees.js +679 -679
|
@@ -1,53 +1,60 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build the delegation prompt for one task.
|
|
3
|
-
* @param {object} input - `taskId`, `prompt`, `workspacePath`, `isolation`, `diff`, `baseline`.
|
|
4
|
-
* @returns {string} assembled prompt.
|
|
5
|
-
*/
|
|
6
|
-
export function buildWorkerPrompt(input) {
|
|
7
|
-
const lines = [];
|
|
8
|
-
lines.push('You are a delegated implementation worker. Your work will be reviewed by the host.');
|
|
9
|
-
lines.push('');
|
|
10
|
-
lines.push(`Task id: ${input.taskId}`);
|
|
11
|
-
if (typeof input.workspacePath === 'string' && input.workspacePath !== '') {
|
|
12
|
-
lines.push(`Workspace: ${input.workspacePath}`);
|
|
13
|
-
}
|
|
14
|
-
lines.push(`Isolation: ${input.isolation ?? 'shared'}`);
|
|
15
|
-
lines.push('');
|
|
16
|
-
lines.push('## Task');
|
|
17
|
-
lines.push(String(input.prompt ?? '').trim());
|
|
18
|
-
lines.push('');
|
|
19
|
-
lines.push('## Working rules');
|
|
20
|
-
lines.push('-
|
|
21
|
-
|
|
22
|
-
lines.push('-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
lines.push('
|
|
27
|
-
lines.push('-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
lines.push('
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
+ '
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
+ '
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
+ '
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
+ '
|
|
44
|
-
lines.push(''
|
|
45
|
-
|
|
46
|
-
lines.push('
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Build the delegation prompt for one task.
|
|
3
|
+
* @param {object} input - `taskId`, `prompt`, `workspacePath`, `isolation`, `diff`, `baseline`.
|
|
4
|
+
* @returns {string} assembled prompt.
|
|
5
|
+
*/
|
|
6
|
+
export function buildWorkerPrompt(input) {
|
|
7
|
+
const lines = [];
|
|
8
|
+
lines.push('You are a delegated implementation worker. Your work will be reviewed by the host.');
|
|
9
|
+
lines.push('');
|
|
10
|
+
lines.push(`Task id: ${input.taskId}`);
|
|
11
|
+
if (typeof input.workspacePath === 'string' && input.workspacePath !== '') {
|
|
12
|
+
lines.push(`Workspace: ${input.workspacePath}`);
|
|
13
|
+
}
|
|
14
|
+
lines.push(`Isolation: ${input.isolation ?? 'shared'}`);
|
|
15
|
+
lines.push('');
|
|
16
|
+
lines.push('## Task');
|
|
17
|
+
lines.push(String(input.prompt ?? '').trim());
|
|
18
|
+
lines.push('');
|
|
19
|
+
lines.push('## Working rules');
|
|
20
|
+
lines.push('- Follow the assigned plan. Make routine choices within the packet. '
|
|
21
|
+
+ 'If a premise conflicts with the project, report what you verified and the affected step to the host before changing course.');
|
|
22
|
+
lines.push('- You may modify files only inside the workspace above.');
|
|
23
|
+
if (input.isolation === 'shared' || input.baseline?.dirtyBaseline === true) {
|
|
24
|
+
lines.push('- Preserve existing uncommitted changes and unrelated files in this checkout.');
|
|
25
|
+
}
|
|
26
|
+
lines.push('- Do not commit, push, tag, or rewrite git history.');
|
|
27
|
+
lines.push('- Do not read or print credentials, tokens, or .env contents.');
|
|
28
|
+
lines.push('- Do not install packages from the network unless the task explicitly requires it.');
|
|
29
|
+
lines.push('- Report what you changed and what you could not do. Do not claim checks you did not run.');
|
|
30
|
+
lines.push('');
|
|
31
|
+
lines.push('## Checks and extra permissions');
|
|
32
|
+
lines.push('- Read ordinary files and logs with the normal file tools and the ordinary workspace permission. '
|
|
33
|
+
+ 'Do not ask for elevated access merely to read a log, and do not use a sandbox escape as a substitute for '
|
|
34
|
+
+ 'a file tool.');
|
|
35
|
+
lines.push('- Run tests under the ordinary permission first. If a test fails for a CONCRETE environment reason '
|
|
36
|
+
+ '(a missing module, a denied pipe, an absent binary), keep that error text and report it rather than retrying '
|
|
37
|
+
+ 'the same command with more access.');
|
|
38
|
+
lines.push('- Ask for extra permission only for the one complete, bounded command that genuinely needs it, and say '
|
|
39
|
+
+ 'which error it resolves. A permission granted for one call never covers a later call, and it never widens '
|
|
40
|
+
+ 'the sandbox permanently.');
|
|
41
|
+
lines.push('- Run one combined test command, save its FULL stdout/stderr, its real exit code and a short summary '
|
|
42
|
+
+ '(for example into `.cache/`), and read that saved log afterwards with the file tools. Do not re-run a test '
|
|
43
|
+
+ 'merely to change a filter, a `Select-String` pattern or a `Select-Object -First N`: read the log instead.');
|
|
44
|
+
lines.push('- After reading temporary test logs you created (such as under `.cache/`), remove those untracked '
|
|
45
|
+
+ 'temporary log files before finishing so the delivery diff contains only intended task changes.');
|
|
46
|
+
lines.push('- A missing dependency is a fact to verify, not a reason to re-run the suite: check whether the module '
|
|
47
|
+
+ 'exists before concluding the test failed, and never use extra permission to paper over a module-not-found '
|
|
48
|
+
+ 'error.');
|
|
49
|
+
lines.push('- Fix a failing test before running the suite again. Report the tests you actually ran, their exit '
|
|
50
|
+
+ 'codes and their counts; if the worktree cannot provide a dependency, say so plainly instead of retrying.');
|
|
51
|
+
lines.push('');
|
|
52
|
+
lines.push('## Completion');
|
|
53
|
+
lines.push('When the task is complete, reply with a short summary, the files you changed, and any checks you actually ran with their results.');
|
|
54
|
+
lines.push('You cannot approve your own work; the host decides acceptance.');
|
|
55
|
+
if (input.baseline !== undefined && input.baseline !== null) {
|
|
56
|
+
lines.push('');
|
|
57
|
+
lines.push(`## Starting state: ${input.baseline.dirtyBaseline === true ? 'the workspace already had uncommitted changes' : 'the workspace was clean'}`);
|
|
58
|
+
}
|
|
59
|
+
return lines.join('\n');
|
|
60
|
+
}
|