@ran-sh/dsh-crew 0.3.5 → 0.3.7
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/.claude-plugin/plugin.json +8 -8
- package/.mcp.json +8 -8
- package/LICENSE +21 -21
- package/README.de.md +359 -359
- package/README.es.md +359 -359
- package/README.fr.md +359 -359
- package/README.hi.md +359 -359
- package/README.id.md +359 -359
- package/README.ja.md +359 -359
- package/README.ko.md +359 -359
- package/README.md +125 -180
- package/README.pt.md +359 -359
- package/README.ru.md +359 -359
- package/README.th.md +359 -359
- package/README.tr.md +359 -359
- package/README.vi.md +359 -359
- package/README.zh-TW.md +359 -359
- package/README.zh.md +125 -180
- package/agents/ds-flash.md +26 -26
- package/agents/ds-pro.md +32 -32
- package/agents/ds-reviewer.md +23 -23
- package/agents/ds-worker.md +22 -22
- package/codex/agents/ds-flash.toml +30 -30
- package/codex/agents/ds-pro.toml +31 -31
- package/codex/agents/ds-reviewer.toml +28 -28
- package/codex/agents/ds-worker.toml +28 -28
- package/codex/prompts/dsh-config.md +3 -3
- package/codex/prompts/dsh-status.md +1 -1
- package/commands/config.md +11 -11
- package/commands/off.md +5 -5
- package/commands/on.md +5 -5
- package/commands/status.md +5 -5
- package/cordis.patch.yml +4 -4
- package/lib/client.js +3446 -2765
- package/package.json +131 -131
- package/scripts/build-client.mjs +28 -28
- package/scripts/live-crew-smoke.mjs +39 -39
- package/scripts/live-policy-matrix.mjs +177 -177
- package/scripts/policy-probe.mjs +101 -101
- package/scripts/setup.mjs +284 -284
- package/scripts/smoke-real.mjs +110 -110
- package/scripts/smoke.mjs +78 -78
- package/scripts/verify-installer-fix.mjs +26 -26
- package/src/adaptive-routing.mjs +260 -260
- package/src/client/activation-summary.tsx +64 -64
- package/src/client/collapsible-sections.mjs +55 -0
- package/src/client/entry.tsx +236 -236
- package/src/client/index.tsx +1213 -1120
- package/src/config-readiness.mjs +59 -59
- package/src/delivery.mjs +205 -205
- package/src/dsh-cli-runtime.mjs +239 -239
- package/src/failure-classification.mjs +172 -172
- package/src/hub/entry.mjs +98 -98
- package/src/hub-client.mjs +132 -132
- package/src/hub-compatibility.mjs +49 -49
- package/src/i18n.mjs +19 -19
- package/src/install/cli.mjs +28 -28
- package/src/install/install-legacy.mjs +462 -462
- package/src/install/install.mjs +451 -451
- package/src/install/npx-lifecycle.mjs +1055 -1019
- package/src/mcp-runtime.mjs +257 -257
- package/src/model-catalog.mjs +173 -173
- package/src/model-routing.mjs +391 -391
- package/src/policy.mjs +197 -197
- package/src/readiness-matrix.mjs +169 -169
- package/src/runtime-controls.mjs +90 -90
- package/src/runtime-identity.mjs +108 -108
- package/src/server.mjs +477 -477
- package/src/status-shard.mjs +52 -52
- package/src/structured-error-code.mjs +38 -38
- package/src/vision-route.mjs +138 -138
- package/src/workflow-runtime.mjs +573 -573
- package/src/workflow.mjs +160 -160
- package/src/workspace-audit.mjs +231 -231
- package/src/workspace-isolation.mjs +365 -365
- package/statusline/statusline.sh +14 -14
- package/statusline/worker-segment.sh +35 -35
- package/worker.cordis.yml +77 -77
package/statusline/statusline.sh
CHANGED
|
@@ -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
|