@ran-sh/dsh-crew 0.3.1 → 0.3.2

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 (78) hide show
  1. package/.claude-plugin/marketplace.json +17 -17
  2. package/.claude-plugin/plugin.json +8 -8
  3. package/.mcp.json +8 -8
  4. package/LICENSE +21 -21
  5. package/README.de.md +359 -359
  6. package/README.es.md +359 -359
  7. package/README.fr.md +359 -359
  8. package/README.hi.md +359 -359
  9. package/README.id.md +359 -359
  10. package/README.ja.md +359 -359
  11. package/README.ko.md +359 -359
  12. package/README.md +140 -140
  13. package/README.pt.md +359 -359
  14. package/README.ru.md +359 -359
  15. package/README.th.md +359 -359
  16. package/README.tr.md +359 -359
  17. package/README.vi.md +359 -359
  18. package/README.zh-TW.md +359 -359
  19. package/README.zh.md +140 -140
  20. package/agents/ds-flash.md +26 -26
  21. package/agents/ds-pro.md +32 -32
  22. package/agents/ds-reviewer.md +23 -23
  23. package/agents/ds-worker.md +22 -22
  24. package/codex/agents/ds-flash.toml +30 -30
  25. package/codex/agents/ds-pro.toml +31 -31
  26. package/codex/agents/ds-reviewer.toml +28 -28
  27. package/codex/agents/ds-worker.toml +28 -28
  28. package/codex/prompts/dsh-config.md +3 -3
  29. package/codex/prompts/dsh-status.md +1 -1
  30. package/commands/config.md +11 -11
  31. package/commands/off.md +5 -5
  32. package/commands/on.md +5 -5
  33. package/commands/status.md +5 -5
  34. package/cordis.patch.yml +4 -4
  35. package/lib/client.js +2765 -2765
  36. package/package.json +127 -127
  37. package/scripts/build-client.mjs +28 -28
  38. package/scripts/live-crew-smoke.mjs +39 -39
  39. package/scripts/live-policy-matrix.mjs +177 -177
  40. package/scripts/policy-probe.mjs +101 -101
  41. package/scripts/setup.mjs +295 -294
  42. package/scripts/smoke-real.mjs +110 -110
  43. package/scripts/smoke.mjs +78 -78
  44. package/scripts/verify-installer-fix.mjs +26 -26
  45. package/scripts/verify-npm-install.mjs +297 -276
  46. package/src/adaptive-routing.mjs +260 -260
  47. package/src/client/activation-summary.tsx +64 -64
  48. package/src/client/entry.tsx +236 -236
  49. package/src/client/index.tsx +1120 -1120
  50. package/src/config-readiness.mjs +59 -59
  51. package/src/delivery.mjs +205 -205
  52. package/src/dsh-cli-runtime.mjs +435 -251
  53. package/src/failure-classification.mjs +172 -172
  54. package/src/hub/entry.mjs +98 -98
  55. package/src/hub-client.mjs +132 -132
  56. package/src/hub-compatibility.mjs +49 -49
  57. package/src/i18n.mjs +19 -19
  58. package/src/install/cli.mjs +28 -28
  59. package/src/install/install-legacy.mjs +460 -460
  60. package/src/install/install.mjs +451 -451
  61. package/src/mcp-runtime.mjs +257 -257
  62. package/src/model-catalog.mjs +173 -173
  63. package/src/model-routing.mjs +391 -391
  64. package/src/policy.mjs +197 -197
  65. package/src/readiness-matrix.mjs +169 -169
  66. package/src/runtime-controls.mjs +90 -90
  67. package/src/runtime-identity.mjs +108 -108
  68. package/src/server.mjs +477 -477
  69. package/src/status-shard.mjs +52 -52
  70. package/src/structured-error-code.mjs +38 -38
  71. package/src/vision-route.mjs +138 -138
  72. package/src/workflow-runtime.mjs +573 -567
  73. package/src/workflow.mjs +160 -160
  74. package/src/workspace-audit.mjs +231 -231
  75. package/src/workspace-isolation.mjs +365 -306
  76. package/statusline/statusline.sh +14 -14
  77. package/statusline/worker-segment.sh +35 -35
  78. 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'