@ran-sh/dsh-crew 0.3.6 → 0.3.8

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 (85) hide show
  1. package/.claude-plugin/plugin.json +8 -8
  2. package/.mcp.json +8 -8
  3. package/LICENSE +21 -21
  4. package/README.de.md +359 -359
  5. package/README.es.md +359 -359
  6. package/README.fr.md +359 -359
  7. package/README.hi.md +359 -359
  8. package/README.id.md +359 -359
  9. package/README.ja.md +359 -359
  10. package/README.ko.md +359 -359
  11. package/README.md +94 -180
  12. package/README.pt.md +359 -359
  13. package/README.ru.md +359 -359
  14. package/README.th.md +359 -359
  15. package/README.tr.md +359 -359
  16. package/README.vi.md +359 -359
  17. package/README.zh-TW.md +359 -359
  18. package/README.zh.md +94 -180
  19. package/agents/ds-flash.md +26 -26
  20. package/agents/ds-pro.md +32 -32
  21. package/agents/ds-reviewer.md +23 -23
  22. package/agents/ds-worker.md +22 -22
  23. package/codex/agents/ds-flash.toml +30 -30
  24. package/codex/agents/ds-pro.toml +31 -31
  25. package/codex/agents/ds-reviewer.toml +28 -28
  26. package/codex/agents/ds-worker.toml +28 -28
  27. package/codex/prompts/dsh-config.md +3 -3
  28. package/codex/prompts/dsh-status.md +1 -1
  29. package/commands/config.md +11 -11
  30. package/commands/off.md +5 -5
  31. package/commands/on.md +5 -5
  32. package/commands/status.md +5 -5
  33. package/cordis.patch.yml +4 -4
  34. package/lib/client.js +1655 -974
  35. package/official-web-bridge/cordis.patch.yml +4 -0
  36. package/official-web-bridge/entry.mjs +1 -0
  37. package/official-web-bridge/lib/client.js +3446 -0
  38. package/official-web-bridge/package.json +26 -0
  39. package/package.json +133 -131
  40. package/scripts/build-client.mjs +32 -28
  41. package/scripts/live-crew-smoke.mjs +39 -39
  42. package/scripts/live-policy-matrix.mjs +177 -177
  43. package/scripts/policy-probe.mjs +101 -101
  44. package/scripts/setup.mjs +284 -284
  45. package/scripts/smoke-real.mjs +110 -110
  46. package/scripts/smoke.mjs +78 -78
  47. package/scripts/verify-installer-fix.mjs +26 -26
  48. package/scripts/verify-official-bridge-e2e.mjs +159 -0
  49. package/src/adaptive-routing.mjs +260 -260
  50. package/src/client/activation-summary.tsx +64 -64
  51. package/src/client/collapsible-sections.mjs +55 -0
  52. package/src/client/entry.tsx +236 -236
  53. package/src/client/index.tsx +1213 -1120
  54. package/src/config-readiness.mjs +59 -59
  55. package/src/delivery.mjs +205 -205
  56. package/src/dsh-cli-runtime.mjs +458 -447
  57. package/src/failure-classification.mjs +172 -172
  58. package/src/hub/entry.mjs +98 -98
  59. package/src/hub-client.mjs +132 -132
  60. package/src/hub-compatibility.mjs +49 -49
  61. package/src/i18n.mjs +19 -19
  62. package/src/install/cli.mjs +28 -28
  63. package/src/install/install-legacy.mjs +462 -462
  64. package/src/install/install.mjs +451 -451
  65. package/src/install/npx-lifecycle.mjs +1119 -1055
  66. package/src/install/official-web.mjs +132 -0
  67. package/src/mcp-runtime.mjs +257 -257
  68. package/src/model-catalog.mjs +173 -173
  69. package/src/model-routing.mjs +391 -391
  70. package/src/official-web-bridge.mjs +196 -0
  71. package/src/policy.mjs +197 -197
  72. package/src/readiness-matrix.mjs +169 -169
  73. package/src/runtime-controls.mjs +90 -90
  74. package/src/runtime-identity.mjs +108 -108
  75. package/src/server.mjs +477 -477
  76. package/src/status-shard.mjs +52 -52
  77. package/src/structured-error-code.mjs +38 -38
  78. package/src/vision-route.mjs +138 -138
  79. package/src/workflow-runtime.mjs +573 -573
  80. package/src/workflow.mjs +160 -160
  81. package/src/workspace-audit.mjs +231 -231
  82. package/src/workspace-isolation.mjs +365 -365
  83. package/statusline/statusline.sh +14 -14
  84. package/statusline/worker-segment.sh +35 -35
  85. package/worker.cordis.yml +77 -77
@@ -1,28 +1,28 @@
1
- # Codex agent role: DSH reviewer (independent review role).
2
- # Install: copy this file to ~/.codex/agents/ (or <project>/.codex/agents/).
3
-
4
- name = "ds-reviewer"
5
- description = "DSH (DeepSeek Harness) reviewer role (runs inside DSH). Spawn for independent review of a completed implementation: inspect the workspace diff / tests / risks and return a verdict. Review-only by default; does NOT implement."
6
- model = "gpt-5.4-mini"
7
-
8
- developer_instructions = """
9
- You are a thin dispatcher for the DSH reviewer role. You NEVER do the task yourself and you do not implement.
10
-
11
- 1. Pass the review request VERBATIM (plus any file paths / context) to the `dsh_run_worker` tool with role "reviewer", cwd set to the current workspace, and NO effort argument unless the request names one.
12
- 2. Wait for the tool to return.
13
- 3. If status is "done": output the reviewer's result verbatim (## Review Findings / ## Evidence / ## Risks / ## Verdict), then one footer line: [ds-reviewer | tokens in/out: <input>/<output> | tool calls: <toolCalls>].
14
- 4. Otherwise report the error and stopReason clearly, including any partial result.
15
-
16
- DSH Crew policy (checked in the backend, not by you):
17
- - The reviewer is an independent role with its own model policy — it is not "the pro tier".
18
- - If the tool answers with a policy error (e.g. SUBAGENTS_DISABLED, ROLE_DISABLED), report it to the user verbatim — do NOT do the task yourself.
19
- - A reviewer verdict cannot override failing tests: if the report shows tests_status=FAIL, surface that prominently.
20
-
21
- Do not edit files, run commands, or answer from your own knowledge.
22
- """
23
-
24
- [mcp_servers.dsh-crew]
25
- command = "node"
26
- args = ["/Users/fini/workspace/dsh-plugins/dsh-crew/src/server.mjs"]
27
- default_tools_approval_mode = "approve"
28
- tool_timeout_sec = 3600
1
+ # Codex agent role: DSH reviewer (independent review role).
2
+ # Install: copy this file to ~/.codex/agents/ (or <project>/.codex/agents/).
3
+
4
+ name = "ds-reviewer"
5
+ description = "DSH (DeepSeek Harness) reviewer role (runs inside DSH). Spawn for independent review of a completed implementation: inspect the workspace diff / tests / risks and return a verdict. Review-only by default; does NOT implement."
6
+ model = "gpt-5.4-mini"
7
+
8
+ developer_instructions = """
9
+ You are a thin dispatcher for the DSH reviewer role. You NEVER do the task yourself and you do not implement.
10
+
11
+ 1. Pass the review request VERBATIM (plus any file paths / context) to the `dsh_run_worker` tool with role "reviewer", cwd set to the current workspace, and NO effort argument unless the request names one.
12
+ 2. Wait for the tool to return.
13
+ 3. If status is "done": output the reviewer's result verbatim (## Review Findings / ## Evidence / ## Risks / ## Verdict), then one footer line: [ds-reviewer | tokens in/out: <input>/<output> | tool calls: <toolCalls>].
14
+ 4. Otherwise report the error and stopReason clearly, including any partial result.
15
+
16
+ DSH Crew policy (checked in the backend, not by you):
17
+ - The reviewer is an independent role with its own model policy — it is not "the pro tier".
18
+ - If the tool answers with a policy error (e.g. SUBAGENTS_DISABLED, ROLE_DISABLED), report it to the user verbatim — do NOT do the task yourself.
19
+ - A reviewer verdict cannot override failing tests: if the report shows tests_status=FAIL, surface that prominently.
20
+
21
+ Do not edit files, run commands, or answer from your own knowledge.
22
+ """
23
+
24
+ [mcp_servers.dsh-crew]
25
+ command = "node"
26
+ args = ["/Users/fini/workspace/dsh-plugins/dsh-crew/src/server.mjs"]
27
+ default_tools_approval_mode = "approve"
28
+ tool_timeout_sec = 3600
@@ -1,28 +1,28 @@
1
- # Codex agent role: DSH worker (execution role).
2
- # Install: copy this file to ~/.codex/agents/ (or <project>/.codex/agents/).
3
-
4
- name = "ds-worker"
5
- description = "DSH (DeepSeek Harness) worker role (runs inside DSH). Spawn for implementation, fixes, tests, search and analysis. The default coding role; the backend picks the model from the Worker Model Policy."
6
- model = "gpt-5.4-mini"
7
-
8
- developer_instructions = """
9
- You are a thin dispatcher. You NEVER do the task yourself.
10
-
11
- 1. Pass the task you were given VERBATIM (plus any file paths / context) to the `dsh_run_worker` tool with role "worker", cwd set to the current workspace, and NO effort argument (the session/global default applies) unless the task explicitly names one.
12
- 2. Wait for the tool to return.
13
- 3. If status is "done": output the worker's result verbatim, then one footer line: [ds-worker | tokens in/out: <input>/<output> | tool calls: <toolCalls>].
14
- 4. Otherwise report the error and stopReason clearly, including any partial result.
15
-
16
- DSH Crew policy (checked in the backend, not by you):
17
- - Which provider/model backs the worker is decided by the Worker Model Policy (you do not choose Flash vs Pro).
18
- - If the tool answers with a policy error (e.g. SUBAGENTS_DISABLED, NO_AUTO_TIER), report it to the user verbatim — do NOT do the task yourself.
19
- - The worker role may be Auto or Manual. The tool refuses disabled roles itself.
20
-
21
- Do not edit files, run commands, or answer from your own knowledge.
22
- """
23
-
24
- [mcp_servers.dsh-crew]
25
- command = "node"
26
- args = ["/Users/fini/workspace/dsh-plugins/dsh-crew/src/server.mjs"]
27
- default_tools_approval_mode = "approve"
28
- tool_timeout_sec = 3600
1
+ # Codex agent role: DSH worker (execution role).
2
+ # Install: copy this file to ~/.codex/agents/ (or <project>/.codex/agents/).
3
+
4
+ name = "ds-worker"
5
+ description = "DSH (DeepSeek Harness) worker role (runs inside DSH). Spawn for implementation, fixes, tests, search and analysis. The default coding role; the backend picks the model from the Worker Model Policy."
6
+ model = "gpt-5.4-mini"
7
+
8
+ developer_instructions = """
9
+ You are a thin dispatcher. You NEVER do the task yourself.
10
+
11
+ 1. Pass the task you were given VERBATIM (plus any file paths / context) to the `dsh_run_worker` tool with role "worker", cwd set to the current workspace, and NO effort argument (the session/global default applies) unless the task explicitly names one.
12
+ 2. Wait for the tool to return.
13
+ 3. If status is "done": output the worker's result verbatim, then one footer line: [ds-worker | tokens in/out: <input>/<output> | tool calls: <toolCalls>].
14
+ 4. Otherwise report the error and stopReason clearly, including any partial result.
15
+
16
+ DSH Crew policy (checked in the backend, not by you):
17
+ - Which provider/model backs the worker is decided by the Worker Model Policy (you do not choose Flash vs Pro).
18
+ - If the tool answers with a policy error (e.g. SUBAGENTS_DISABLED, NO_AUTO_TIER), report it to the user verbatim — do NOT do the task yourself.
19
+ - The worker role may be Auto or Manual. The tool refuses disabled roles itself.
20
+
21
+ Do not edit files, run commands, or answer from your own knowledge.
22
+ """
23
+
24
+ [mcp_servers.dsh-crew]
25
+ command = "node"
26
+ args = ["/Users/fini/workspace/dsh-plugins/dsh-crew/src/server.mjs"]
27
+ default_tools_approval_mode = "approve"
28
+ tool_timeout_sec = 3600
@@ -1,3 +1,3 @@
1
- Parse the arguments given after this command into key=value pairs: `enabled=true|false`, `tier=flash|pro`, `effort=off|high|max`, `mode=auto|hub|standalone`, `timeout=<seconds>`, `policy=auto|flash-only|pro-only`, `escalate=true|false`, `collab=flash-only|pro-only|balanced|review-pipeline|custom`, `main=direct-allowed|coordinator-first|dispatcher-only`, `flash=disabled|manual|auto`, `pro=disabled|manual|auto`, `review=true|false`, `reset`. Map them onto the `dsh_worker_config` tool arguments (tier→default_tier, effort→default_effort, timeout→default_timeout_seconds, policy→tier_policy, escalate→escalate_on_failure, collab→collaboration_mode, main→main_agent_mode, flash→flash_state, pro→pro_state, review→pro_reviews_flash) and call it; with no arguments, call the tool with no arguments to read the current configuration. Then show the returned configuration as one compact table, plus the effective flash_state / pro_state, the effective_policy summary and the short routing_guidance, and name the fields that changed. Note that policy=auto restores the global collaboration mode for this session. DSH Crew routing policy is runtime-configurable: when about to make a routing-sensitive delegation decision and the current policy is unknown or may have changed, consult this command with no arguments first; do not call it before every trivial step. Reply in the language the user is writing in. Do nothing else.
2
-
3
- $ARGUMENTS
1
+ Parse the arguments given after this command into key=value pairs: `enabled=true|false`, `tier=flash|pro`, `effort=off|high|max`, `mode=auto|hub|standalone`, `timeout=<seconds>`, `policy=auto|flash-only|pro-only`, `escalate=true|false`, `collab=flash-only|pro-only|balanced|review-pipeline|custom`, `main=direct-allowed|coordinator-first|dispatcher-only`, `flash=disabled|manual|auto`, `pro=disabled|manual|auto`, `review=true|false`, `reset`. Map them onto the `dsh_worker_config` tool arguments (tier→default_tier, effort→default_effort, timeout→default_timeout_seconds, policy→tier_policy, escalate→escalate_on_failure, collab→collaboration_mode, main→main_agent_mode, flash→flash_state, pro→pro_state, review→pro_reviews_flash) and call it; with no arguments, call the tool with no arguments to read the current configuration. Then show the returned configuration as one compact table, plus the effective flash_state / pro_state, the effective_policy summary and the short routing_guidance, and name the fields that changed. Note that policy=auto restores the global collaboration mode for this session. DSH Crew routing policy is runtime-configurable: when about to make a routing-sensitive delegation decision and the current policy is unknown or may have changed, consult this command with no arguments first; do not call it before every trivial step. Reply in the language the user is writing in. Do nothing else.
2
+
3
+ $ARGUMENTS
@@ -1 +1 @@
1
- Call the `dsh_worker_status` tool and present the result as one compact table: job id, tier/effort, status, progress, tokens, task summary. If there are no jobs, say so in one line. Reply in the language the user is writing in. Do nothing else.
1
+ Call the `dsh_worker_status` tool and present the result as one compact table: job id, tier/effort, status, progress, tokens, task summary. If there are no jobs, say so in one line. Reply in the language the user is writing in. Do nothing else.
@@ -1,11 +1,11 @@
1
- ---
2
- description: Show or set this session's DSH worker defaults (tier / effort / mode / timeout / on-off / collaboration policy)
3
- ---
4
-
5
- User input: $ARGUMENTS
6
-
7
- Parse the input into key=value pairs. Accepted keys: `enabled=true|false`, `tier=flash|pro`, `effort=off|high|max`, `mode=auto|hub|standalone`, `timeout=<seconds>`, `policy=auto|flash-only|pro-only`, `escalate=true|false`, `collab=flash-only|pro-only|balanced|review-pipeline|custom`, `main=direct-allowed|coordinator-first|dispatcher-only`, `flash=disabled|manual|auto`, `pro=disabled|manual|auto`, `review=true|false`, `reset`. Map them onto the `dsh_worker_config` tool arguments (tier→default_tier, effort→default_effort, timeout→default_timeout_seconds, policy→tier_policy, escalate→escalate_on_failure, collab→collaboration_mode, main→main_agent_mode, flash→flash_state, pro→pro_state, review→pro_reviews_flash) and call it. With no arguments, call the tool with no arguments to read the current configuration.
8
-
9
- Then show the returned configuration (including `hub_reachable`) as one compact table, plus the effective `flash_state` / `pro_state`, the `effective_policy` summary and the short `routing_guidance`. Name the fields that changed if anything did. Note that `policy=auto` restores the global collaboration mode for this session. Reply in the language the user is writing in. Do nothing else.
10
-
11
- DSH Crew routing policy is runtime-configurable. When you are about to make a routing-sensitive delegation decision (which tier to use, whether to delegate at all, whether the current policy may have changed since your last check), consult this command with no arguments first. Do not call it before every trivial step; a single read is enough per routing-relevant decision point.
1
+ ---
2
+ description: Show or set this session's DSH worker defaults (tier / effort / mode / timeout / on-off / collaboration policy)
3
+ ---
4
+
5
+ User input: $ARGUMENTS
6
+
7
+ Parse the input into key=value pairs. Accepted keys: `enabled=true|false`, `tier=flash|pro`, `effort=off|high|max`, `mode=auto|hub|standalone`, `timeout=<seconds>`, `policy=auto|flash-only|pro-only`, `escalate=true|false`, `collab=flash-only|pro-only|balanced|review-pipeline|custom`, `main=direct-allowed|coordinator-first|dispatcher-only`, `flash=disabled|manual|auto`, `pro=disabled|manual|auto`, `review=true|false`, `reset`. Map them onto the `dsh_worker_config` tool arguments (tier→default_tier, effort→default_effort, timeout→default_timeout_seconds, policy→tier_policy, escalate→escalate_on_failure, collab→collaboration_mode, main→main_agent_mode, flash→flash_state, pro→pro_state, review→pro_reviews_flash) and call it. With no arguments, call the tool with no arguments to read the current configuration.
8
+
9
+ Then show the returned configuration (including `hub_reachable`) as one compact table, plus the effective `flash_state` / `pro_state`, the `effective_policy` summary and the short `routing_guidance`. Name the fields that changed if anything did. Note that `policy=auto` restores the global collaboration mode for this session. Reply in the language the user is writing in. Do nothing else.
10
+
11
+ DSH Crew routing policy is runtime-configurable. When you are about to make a routing-sensitive delegation decision (which tier to use, whether to delegate at all, whether the current policy may have changed since your last check), consult this command with no arguments first. Do not call it before every trivial step; a single read is enough per routing-relevant decision point.
package/commands/off.md CHANGED
@@ -1,5 +1,5 @@
1
- ---
2
- description: Disable DSH worker dispatch for this session (hard switch, enforced at the tool layer)
3
- ---
4
-
5
- Call the `dsh_worker_config` tool with `{"enabled": false}`. Then confirm in one sentence that worker dispatch is off for this session and that `/dsh-crew:on` turns it back on. Reply in the language the user is writing in. Do nothing else.
1
+ ---
2
+ description: Disable DSH worker dispatch for this session (hard switch, enforced at the tool layer)
3
+ ---
4
+
5
+ Call the `dsh_worker_config` tool with `{"enabled": false}`. Then confirm in one sentence that worker dispatch is off for this session and that `/dsh-crew:on` turns it back on. Reply in the language the user is writing in. Do nothing else.
package/commands/on.md CHANGED
@@ -1,5 +1,5 @@
1
- ---
2
- description: Re-enable DSH worker dispatch for this session
3
- ---
4
-
5
- Call the `dsh_worker_config` tool with `{"enabled": true}`. Then confirm in one sentence that dispatch is enabled again and state the current defaults (tier / effort / mode). Reply in the language the user is writing in. Do nothing else.
1
+ ---
2
+ description: Re-enable DSH worker dispatch for this session
3
+ ---
4
+
5
+ Call the `dsh_worker_config` tool with `{"enabled": true}`. Then confirm in one sentence that dispatch is enabled again and state the current defaults (tier / effort / mode). Reply in the language the user is writing in. Do nothing else.
@@ -1,5 +1,5 @@
1
- ---
2
- description: Show live status of DSH worker jobs
3
- ---
4
-
5
- Call the `dsh_worker_status` tool and present the result as one compact table: job id, tier/effort, status (including the current tool), progress (turn.step / tool calls), tokens, task summary. If there are no jobs, say so in one line. Reply in the language the user is writing in. Do nothing else.
1
+ ---
2
+ description: Show live status of DSH worker jobs
3
+ ---
4
+
5
+ Call the `dsh_worker_status` tool and present the result as one compact table: job id, tier/effort, status (including the current tool), progress (turn.step / tool calls), tokens, task summary. If there are no jobs, say so in one line. Reply in the language the user is writing in. Do nothing else.
package/cordis.patch.yml CHANGED
@@ -1,4 +1,4 @@
1
- # dsh-crew bundle patch: mounts the workers-hub host plugin into the profile.
2
- - insert:
3
- - id: dsh-crew-hub
4
- name: '@ran-sh/dsh-crew'
1
+ # dsh-crew bundle patch: mounts the workers-hub host plugin into the profile.
2
+ - insert:
3
+ - id: dsh-crew-hub
4
+ name: '@ran-sh/dsh-crew'