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