@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,14 +1,14 @@
1
- #!/bin/bash
2
- # dsh-crew statusline: prepends the live worker-pool segment (merged from
3
- # all status shards) to a basic statusline. For claude-hud users prefer
4
- # wiring worker-segment.sh via --extra-cmd instead (cli.mjs hud does this).
5
-
6
- input=$(cat)
7
- model=$(echo "$input" | jq -r '.model.display_name // .model.id // "?"')
8
- dir=$(basename "$(echo "$input" | jq -r '.workspace.current_dir // "."')")
9
-
10
- segment=$("$(dirname "$0")/worker-segment.sh")
11
-
12
- line="[$model] $dir"
13
- [ -n "$segment" ] && line="$segment | $line"
14
- echo "$line"
1
+ #!/bin/bash
2
+ # dsh-crew statusline: prepends the live worker-pool segment (merged from
3
+ # all status shards) to a basic statusline. For claude-hud users prefer
4
+ # wiring worker-segment.sh via --extra-cmd instead (cli.mjs hud does this).
5
+
6
+ input=$(cat)
7
+ model=$(echo "$input" | jq -r '.model.display_name // .model.id // "?"')
8
+ dir=$(basename "$(echo "$input" | jq -r '.workspace.current_dir // "."')")
9
+
10
+ segment=$("$(dirname "$0")/worker-segment.sh")
11
+
12
+ line="[$model] $dir"
13
+ [ -n "$segment" ] && line="$segment | $line"
14
+ echo "$line"
@@ -1,35 +1,35 @@
1
- #!/bin/bash
2
- # Compact DSH worker segment for claude-hud --extra-cmd (or any statusline).
3
- # Merges all fresh status shards (~/.config/dsh-crew/status.d/*.json plus
4
- # the legacy status.json during transition) so workers dispatched by ANY
5
- # orchestrator on this machine are visible. Running jobs show tier, elapsed,
6
- # and tokens; idle with history shows "⚙dsh ✓N"; no jobs prints nothing.
7
- # Override the shard dir with $DSH_CREW_STATUS_DIR (mainly for tests).
8
-
9
- dir="${DSH_CREW_STATUS_DIR:-$HOME/.config/dsh-crew}"
10
- files=()
11
- for f in "$dir"/status.d/*.json "$dir"/status.json; do
12
- [ -f "$f" ] && files+=("$f")
13
- done
14
- [ ${#files[@]} -eq 0 ] && exit 0
15
-
16
- jq -rs --argjson now "$(date +%s)" '
17
- def ktok: if . >= 1000 then ((. / 100 | floor) / 10 | tostring) + "k" else tostring end;
18
- def ts: sub("\\.[0-9]+Z$"; "Z") | fromdateiso8601;
19
- def elapsed: ($now - (.startedAt | ts)) as $s
20
- | if $s >= 60 then (($s / 60) | floor | tostring) + "m" + (($s % 60) | tostring) + "s"
21
- else ($s | tostring) + "s" end;
22
- [.[] | select((.updatedAt | ts) > ($now - 1800)) | .jobs[]] as $all
23
- | ($all | unique_by(.id)) as $jobs
24
- | [$jobs[] | select(.status == "running")] as $r
25
- | ([$jobs[] | select(.status == "done")] | length) as $d
26
- | ([$jobs[] | select(.status == "failed" or .status == "cancelled")] | length) as $f
27
- | if (($r | length) + $d + $f) == 0 then "" else
28
- "⚙dsh"
29
- + (if ($r | length) > 0 then
30
- " " + (($r | length) | tostring) + "▶"
31
- + ($r | map(.tier + " " + elapsed + " " + (.tokens.input | ktok) + "/" + (.tokens.output | ktok)) | join(" · "))
32
- else "" end)
33
- + (if $d > 0 then " ✓" + ($d | tostring) else "" end)
34
- + (if $f > 0 then " ✗" + ($f | tostring) else "" end)
35
- end' "${files[@]}" 2>/dev/null
1
+ #!/bin/bash
2
+ # Compact DSH worker segment for claude-hud --extra-cmd (or any statusline).
3
+ # Merges all fresh status shards (~/.config/dsh-crew/status.d/*.json plus
4
+ # the legacy status.json during transition) so workers dispatched by ANY
5
+ # orchestrator on this machine are visible. Running jobs show tier, elapsed,
6
+ # and tokens; idle with history shows "⚙dsh ✓N"; no jobs prints nothing.
7
+ # Override the shard dir with $DSH_CREW_STATUS_DIR (mainly for tests).
8
+
9
+ dir="${DSH_CREW_STATUS_DIR:-$HOME/.config/dsh-crew}"
10
+ files=()
11
+ for f in "$dir"/status.d/*.json "$dir"/status.json; do
12
+ [ -f "$f" ] && files+=("$f")
13
+ done
14
+ [ ${#files[@]} -eq 0 ] && exit 0
15
+
16
+ jq -rs --argjson now "$(date +%s)" '
17
+ def ktok: if . >= 1000 then ((. / 100 | floor) / 10 | tostring) + "k" else tostring end;
18
+ def ts: sub("\\.[0-9]+Z$"; "Z") | fromdateiso8601;
19
+ def elapsed: ($now - (.startedAt | ts)) as $s
20
+ | if $s >= 60 then (($s / 60) | floor | tostring) + "m" + (($s % 60) | tostring) + "s"
21
+ else ($s | tostring) + "s" end;
22
+ [.[] | select((.updatedAt | ts) > ($now - 1800)) | .jobs[]] as $all
23
+ | ($all | unique_by(.id)) as $jobs
24
+ | [$jobs[] | select(.status == "running")] as $r
25
+ | ([$jobs[] | select(.status == "done")] | length) as $d
26
+ | ([$jobs[] | select(.status == "failed" or .status == "cancelled")] | length) as $f
27
+ | if (($r | length) + $d + $f) == 0 then "" else
28
+ "⚙dsh"
29
+ + (if ($r | length) > 0 then
30
+ " " + (($r | length) | tostring) + "▶"
31
+ + ($r | map(.tier + " " + elapsed + " " + (.tokens.input | ktok) + "/" + (.tokens.output | ktok)) | join(" · "))
32
+ else "" end)
33
+ + (if $d > 0 then " ✓" + ($d | tostring) else "" end)
34
+ + (if $f > 0 then " ✗" + ($f | tostring) else "" end)
35
+ end' "${files[@]}" 2>/dev/null
package/worker.cordis.yml CHANGED
@@ -1,77 +1,77 @@
1
- # dsh-crew: unattended coding-worker composition for dsh-jsonrpc-agent.
2
- # stdout is reserved for JSON-RPC frames; never add a console logger here.
3
- # Model/provider arrive per process via the SDK initialize handshake.
4
-
5
- - id: sdk-jsonrpc-server
6
- name: '@deepseek-ai/dsh-sdk-jsonrpc-server'
7
- config:
8
- maxTokensAsSuccess: true
9
-
10
- - id: llm-deepseek
11
- name: '@deepseek-ai/dsh-llm-deepseek'
12
- config:
13
- apiKeyEnv: DEEPSEEK_API_KEY
14
- thinking: enabled
15
- reasoningEffort: !!js process.env.DSH_REASONING_EFFORT ?? 'high'
16
-
17
- - id: sandbox
18
- name: '@deepseek-ai/dsh-sandbox-local'
19
-
20
- - id: sandbox-policy
21
- name: '@deepseek-ai/dsh-sandbox-policy'
22
- config:
23
- mode: !!js process.env.DSH_SANDBOX_MODE ?? 'workspace-write'
24
- workspaceRoot: !!js process.env.DSH_CWD ?? process.cwd()
25
-
26
- - id: subprocess
27
- name: '@deepseek-ai/dsh-subprocess-local'
28
-
29
- - id: bash
30
- name: '@deepseek-ai/dsh-bash-local'
31
- config:
32
- cwd: !!js process.env.DSH_CWD ?? process.cwd()
33
- timeoutMs: 300000
34
-
35
- - id: agent-spine
36
- name: '@deepseek-ai/dsh-agent-spine-demo'
37
- config:
38
- persona: !!js process.env.DSH_SYSTEM_PROMPT ?? 'You are a focused coding worker. Complete the assigned task, then summarize what you did in your final message.'
39
- workspaceContext: false
40
- skills:
41
- enabled: false
42
- toolBash:
43
- enableRunInBackground: false
44
- toolJobs: false
45
-
46
- - id: fs-local
47
- name: '@deepseek-ai/dsh-fs-local'
48
- config:
49
- cwd: !!js process.env.DSH_CWD ?? process.cwd()
50
-
51
- - id: fs-observation-policy
52
- name: '@deepseek-ai/dsh-fs-observation-policy'
53
-
54
- - id: tool-fs
55
- name: '@deepseek-ai/dsh-tool-fs'
56
-
57
- - id: tool-todo
58
- name: '@deepseek-ai/dsh-tool-todo'
59
- config:
60
- allowParallelInProgress: true
61
-
62
- - id: sessions
63
- name: '@deepseek-ai/dsh-session-persistence-jsonl'
64
- config:
65
- root: !!js process.env.DSH_SESSION_ROOT ?? './.sessions'
66
- compression: zstd
67
-
68
- - id: token-meter
69
- name: '@deepseek-ai/dsh-token-meter'
70
-
71
- - id: compaction-basic
72
- name: '@deepseek-ai/dsh-compaction-basic'
73
- config:
74
- thresholdRatio: 0.8
75
- retainRatio: 0.16
76
- maxTokens: 8192
77
- compactionRetries: 1
1
+ # dsh-crew: unattended coding-worker composition for dsh-jsonrpc-agent.
2
+ # stdout is reserved for JSON-RPC frames; never add a console logger here.
3
+ # Model/provider arrive per process via the SDK initialize handshake.
4
+
5
+ - id: sdk-jsonrpc-server
6
+ name: '@deepseek-ai/dsh-sdk-jsonrpc-server'
7
+ config:
8
+ maxTokensAsSuccess: true
9
+
10
+ - id: llm-deepseek
11
+ name: '@deepseek-ai/dsh-llm-deepseek'
12
+ config:
13
+ apiKeyEnv: DEEPSEEK_API_KEY
14
+ thinking: enabled
15
+ reasoningEffort: !!js process.env.DSH_REASONING_EFFORT ?? 'high'
16
+
17
+ - id: sandbox
18
+ name: '@deepseek-ai/dsh-sandbox-local'
19
+
20
+ - id: sandbox-policy
21
+ name: '@deepseek-ai/dsh-sandbox-policy'
22
+ config:
23
+ mode: !!js process.env.DSH_SANDBOX_MODE ?? 'workspace-write'
24
+ workspaceRoot: !!js process.env.DSH_CWD ?? process.cwd()
25
+
26
+ - id: subprocess
27
+ name: '@deepseek-ai/dsh-subprocess-local'
28
+
29
+ - id: bash
30
+ name: '@deepseek-ai/dsh-bash-local'
31
+ config:
32
+ cwd: !!js process.env.DSH_CWD ?? process.cwd()
33
+ timeoutMs: 300000
34
+
35
+ - id: agent-spine
36
+ name: '@deepseek-ai/dsh-agent-spine-demo'
37
+ config:
38
+ persona: !!js process.env.DSH_SYSTEM_PROMPT ?? 'You are a focused coding worker. Complete the assigned task, then summarize what you did in your final message.'
39
+ workspaceContext: false
40
+ skills:
41
+ enabled: false
42
+ toolBash:
43
+ enableRunInBackground: false
44
+ toolJobs: false
45
+
46
+ - id: fs-local
47
+ name: '@deepseek-ai/dsh-fs-local'
48
+ config:
49
+ cwd: !!js process.env.DSH_CWD ?? process.cwd()
50
+
51
+ - id: fs-observation-policy
52
+ name: '@deepseek-ai/dsh-fs-observation-policy'
53
+
54
+ - id: tool-fs
55
+ name: '@deepseek-ai/dsh-tool-fs'
56
+
57
+ - id: tool-todo
58
+ name: '@deepseek-ai/dsh-tool-todo'
59
+ config:
60
+ allowParallelInProgress: true
61
+
62
+ - id: sessions
63
+ name: '@deepseek-ai/dsh-session-persistence-jsonl'
64
+ config:
65
+ root: !!js process.env.DSH_SESSION_ROOT ?? './.sessions'
66
+ compression: zstd
67
+
68
+ - id: token-meter
69
+ name: '@deepseek-ai/dsh-token-meter'
70
+
71
+ - id: compaction-basic
72
+ name: '@deepseek-ai/dsh-compaction-basic'
73
+ config:
74
+ thresholdRatio: 0.8
75
+ retainRatio: 0.16
76
+ maxTokens: 8192
77
+ compactionRetries: 1