@ran-sh/dsh-crew 1.9.0 → 1.10.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.
- package/.claude-plugin/marketplace.json +16 -16
- package/.claude-plugin/plugin.json +14 -14
- 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 +126 -126
- 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 +116 -116
- package/agents/ds-flash.md +24 -24
- package/agents/ds-pro.md +24 -24
- package/agents/ds-reviewer.md +23 -23
- package/agents/ds-worker.md +23 -23
- package/bin/dsh-crew.mjs +16 -16
- package/codex/agents/ds-flash.toml +34 -34
- package/codex/agents/ds-pro.toml +34 -34
- package/codex/agents/ds-reviewer.toml +32 -32
- package/codex/agents/ds-worker.toml +32 -32
- package/codex/prompts/dsh-config.md +19 -19
- package/codex/prompts/dsh-status.md +5 -5
- package/commands/config.md +23 -23
- package/commands/off.md +5 -5
- package/commands/on.md +5 -5
- package/commands/status.md +9 -9
- package/cordis.patch.yml +4 -4
- package/docs/gpt-relay-extension.md +103 -103
- package/docs/installation.md +138 -138
- package/docs/job-contracts.md +103 -103
- package/docs/readiness-matrix.md +85 -85
- package/docs/ui-surfaces.md +107 -107
- package/official-web-bridge/cordis.patch.yml +4 -4
- package/official-web-bridge/entry.mjs +1 -1
- package/official-web-bridge/overlay-entry.mjs +59 -59
- package/official-web-bridge/package.json +25 -25
- package/package.json +3 -2
- package/scripts/build-client.mjs +49 -49
- 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/remove-legacy-official-bridge.ps1 +89 -89
- package/scripts/setup.mjs +393 -393
- package/scripts/smoke-real.mjs +110 -110
- package/scripts/smoke.mjs +78 -78
- package/scripts/verify-crew-ui-polish.mjs +145 -145
- package/scripts/verify-history-ui.mjs +97 -97
- package/scripts/verify-installer-fix.mjs +26 -26
- package/scripts/verify-npm-install.mjs +311 -311
- package/scripts/verify-official-bridge-e2e.mjs +192 -192
- package/src/adaptive-routing.mjs +260 -260
- package/src/client/activation-summary.tsx +64 -64
- package/src/client/collapsible-sections.mjs +55 -55
- package/src/client/history-panel.tsx +108 -108
- package/src/client/host-readiness.mjs +71 -71
- package/src/client/index.tsx +1711 -1711
- package/src/client/model-callability-view.mjs +17 -17
- package/src/client/panel-chrome.tsx +40 -40
- package/src/client/quick-entry.tsx +10 -10
- package/src/client/quick-panel.tsx +275 -275
- package/src/client/readiness-envelope.mjs +34 -34
- package/src/client/surface-detection.mjs +43 -43
- package/src/config-readiness.mjs +226 -226
- package/src/credential-reference.mjs +38 -38
- package/src/delivery.mjs +205 -205
- package/src/dsh-cli-runtime.mjs +1021 -1021
- package/src/dsh-cohort.mjs +20 -20
- package/src/extension-contract.mjs +104 -104
- package/src/failure-classification.mjs +201 -201
- package/src/history/admission-gate.mjs +67 -67
- package/src/history/archive-store.mjs +272 -272
- package/src/history/cleanup-plan.mjs +89 -89
- package/src/history/http.mjs +32 -32
- package/src/history/operation.mjs +86 -86
- package/src/history/runner-detach.mjs +34 -34
- package/src/history/runner.mjs +52 -52
- package/src/history/runtime.mjs +36 -36
- package/src/history/service.mjs +177 -177
- package/src/history/state.mjs +27 -27
- package/src/hub/entry.mjs +104 -104
- package/src/hub/index.mjs +2694 -2694
- package/src/hub-client.mjs +154 -154
- package/src/hub-compatibility.mjs +42 -42
- package/src/i18n.mjs +19 -19
- package/src/information-flow.mjs +67 -67
- package/src/install/cli.mjs +28 -28
- package/src/install/install-legacy.mjs +711 -711
- package/src/install/install.mjs +483 -483
- package/src/install/npx-lifecycle.mjs +3456 -3456
- package/src/install/official-frontend-assets.mjs +78 -78
- package/src/install/official-web.mjs +95 -95
- package/src/install/payload-content.mjs +88 -88
- package/src/install/windows-startup.mjs +236 -236
- package/src/install/windows-supervisor-adapter.mjs +443 -443
- package/src/install/windows-supervisor-lifecycle.mjs +782 -782
- package/src/install/zcode.mjs +397 -397
- package/src/job-contracts.mjs +255 -255
- package/src/local-request-guard.mjs +60 -60
- package/src/mcp-runtime.mjs +340 -340
- package/src/model-callability-contract.mjs +79 -79
- package/src/model-catalog.mjs +180 -180
- package/src/model-routing.mjs +586 -586
- package/src/model-schedule.mjs +207 -207
- package/src/official-web-bridge.mjs +447 -447
- package/src/policy.mjs +235 -235
- package/src/provider-delete-adapters.mjs +1934 -1934
- package/src/provider-health.mjs +130 -130
- package/src/provider-inventory.mjs +182 -182
- package/src/provider-layer-migration-adapters.mjs +759 -759
- package/src/provider-layer-migration.mjs +198 -198
- package/src/provider-lifecycle-state.mjs +103 -103
- package/src/provider-lifecycle.mjs +252 -252
- package/src/provider-profile-store.mjs +390 -390
- package/src/provider-settings-store.mjs +633 -633
- package/src/provider-store-lock.mjs +67 -67
- package/src/readiness-matrix.mjs +181 -181
- package/src/removable-waiter.mjs +29 -29
- package/src/role-profiles.mjs +107 -107
- package/src/runtime-controls.mjs +84 -84
- package/src/runtime-identity-contract.mjs +34 -34
- package/src/runtime-identity.mjs +235 -235
- package/src/runtime-readiness-snapshot.mjs +285 -285
- package/src/server.mjs +581 -581
- package/src/session-origins.mjs +60 -60
- package/src/standalone-sdk.mjs +23 -23
- package/src/status-shard.mjs +63 -63
- package/src/structured-error-code.mjs +38 -38
- package/src/supervisor/restart-request.mjs +256 -256
- package/src/workflow-runtime.mjs +739 -739
- package/src/workflow.mjs +155 -155
- package/src/workspace-audit.mjs +231 -231
- package/src/workspace-context.mjs +146 -146
- package/src/workspace-isolation.mjs +463 -455
- package/src/workspace-readiness.mjs +32 -32
- package/statusline/statusline.sh +14 -14
- package/statusline/worker-segment.sh +35 -35
- package/windows/start-dsh-crew.cmd +57 -57
- package/windows/start-dsh-crew.ps1 +1302 -1302
- package/windows/supervisor-control.ps1 +467 -467
- package/worker.cordis.yml +67 -67
- package/zcode/agents/ds-reviewer.md +31 -31
- package/zcode/agents/ds-worker.md +31 -31
- package/zcode/commands/dsh-config.md +17 -17
- package/zcode/commands/dsh-status.md +5 -5
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
// Read-only workspace preflight used by MCP and local HTTP readiness. It never
|
|
2
|
-
// changes branches, creates worktrees, or touches user files.
|
|
3
|
-
|
|
4
|
-
import { constants } from 'node:fs';
|
|
5
|
-
import { access as fsAccess } from 'node:fs/promises';
|
|
6
|
-
import { inspectRepository } from './workspace-isolation.mjs';
|
|
7
|
-
|
|
8
|
-
export async function assessWorkspaceReadiness({ cwd, inspect = inspectRepository, access = fsAccess } = {}) {
|
|
9
|
-
if (!cwd) return { ok: true, status: 'READY', reason_code: 'WORKSPACE_NOT_REQUESTED', repo_root: null, base_revision: null };
|
|
10
|
-
const repository = await inspect({ cwd });
|
|
11
|
-
if (!repository?.ok) {
|
|
12
|
-
return { ok: false, status: 'UNAVAILABLE', reason_code: repository?.reason ?? 'WORKSPACE_UNAVAILABLE' };
|
|
13
|
-
}
|
|
14
|
-
try {
|
|
15
|
-
await access(repository.repoRoot, constants.W_OK);
|
|
16
|
-
} catch {
|
|
17
|
-
return {
|
|
18
|
-
ok: true, status: 'READ_ONLY', reason_code: 'WORKSPACE_READ_ONLY',
|
|
19
|
-
repo_root: repository.repoRoot, base_revision: repository.baseRevision,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
if (repository.dirty === true) {
|
|
23
|
-
return {
|
|
24
|
-
ok: true, status: 'CONFLICT', reason_code: 'WORKSPACE_DIRTY',
|
|
25
|
-
repo_root: repository.repoRoot, base_revision: repository.baseRevision,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
ok: true, status: 'READY', reason_code: 'WORKSPACE_READY',
|
|
30
|
-
repo_root: repository.repoRoot, base_revision: repository.baseRevision,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
1
|
+
// Read-only workspace preflight used by MCP and local HTTP readiness. It never
|
|
2
|
+
// changes branches, creates worktrees, or touches user files.
|
|
3
|
+
|
|
4
|
+
import { constants } from 'node:fs';
|
|
5
|
+
import { access as fsAccess } from 'node:fs/promises';
|
|
6
|
+
import { inspectRepository } from './workspace-isolation.mjs';
|
|
7
|
+
|
|
8
|
+
export async function assessWorkspaceReadiness({ cwd, inspect = inspectRepository, access = fsAccess } = {}) {
|
|
9
|
+
if (!cwd) return { ok: true, status: 'READY', reason_code: 'WORKSPACE_NOT_REQUESTED', repo_root: null, base_revision: null };
|
|
10
|
+
const repository = await inspect({ cwd });
|
|
11
|
+
if (!repository?.ok) {
|
|
12
|
+
return { ok: false, status: 'UNAVAILABLE', reason_code: repository?.reason ?? 'WORKSPACE_UNAVAILABLE' };
|
|
13
|
+
}
|
|
14
|
+
try {
|
|
15
|
+
await access(repository.repoRoot, constants.W_OK);
|
|
16
|
+
} catch {
|
|
17
|
+
return {
|
|
18
|
+
ok: true, status: 'READ_ONLY', reason_code: 'WORKSPACE_READ_ONLY',
|
|
19
|
+
repo_root: repository.repoRoot, base_revision: repository.baseRevision,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
if (repository.dirty === true) {
|
|
23
|
+
return {
|
|
24
|
+
ok: true, status: 'CONFLICT', reason_code: 'WORKSPACE_DIRTY',
|
|
25
|
+
repo_root: repository.repoRoot, base_revision: repository.baseRevision,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
ok: true, status: 'READY', reason_code: 'WORKSPACE_READY',
|
|
30
|
+
repo_root: repository.repoRoot, base_revision: repository.baseRevision,
|
|
31
|
+
};
|
|
32
|
+
}
|
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
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
setlocal EnableExtensions
|
|
3
|
-
title DSH Crew Launcher
|
|
4
|
-
|
|
5
|
-
set "LAUNCH_REQUEST=%*"
|
|
6
|
-
set "LAUNCH_MODE=open"
|
|
7
|
-
set "LAUNCH_DIR=%~dp0"
|
|
8
|
-
|
|
9
|
-
if "%~1"=="" goto :run
|
|
10
|
-
if /i "%~1"=="--background" (
|
|
11
|
-
set "LAUNCH_MODE=background"
|
|
12
|
-
shift
|
|
13
|
-
goto :validate
|
|
14
|
-
)
|
|
15
|
-
if /i "%~1"=="--open" (
|
|
16
|
-
set "LAUNCH_MODE=open"
|
|
17
|
-
shift
|
|
18
|
-
goto :validate
|
|
19
|
-
)
|
|
20
|
-
if /i "%~1"=="--watch" (
|
|
21
|
-
set "LAUNCH_MODE=watch"
|
|
22
|
-
shift
|
|
23
|
-
goto :validate
|
|
24
|
-
)
|
|
25
|
-
if /i "%~1"=="--help" goto :help
|
|
26
|
-
goto :invalid_argument
|
|
27
|
-
|
|
28
|
-
:validate
|
|
29
|
-
if not "%~1"=="" goto :invalid_argument
|
|
30
|
-
|
|
31
|
-
:run
|
|
32
|
-
set "LAUNCH_HELPER=%LAUNCH_DIR%start-dsh-crew.ps1"
|
|
33
|
-
set "LAUNCH_LOG=%TEMP%\dsh-crew-launcher.log"
|
|
34
|
-
if not exist "%LAUNCH_HELPER%" (
|
|
35
|
-
>>"%LAUNCH_LOG%" echo [%date% %time%] ERROR Managed launcher helper is missing: %LAUNCH_HELPER%
|
|
36
|
-
echo ERROR: DSH Crew launcher helper is missing.
|
|
37
|
-
echo Repair it with: dsh-crew update
|
|
38
|
-
if /i "%LAUNCH_MODE%"=="open" pause
|
|
39
|
-
exit /b 1
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
powershell.exe -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "%LAUNCH_HELPER%" -Mode "%LAUNCH_MODE%"
|
|
43
|
-
set "LAUNCH_EXIT=%ERRORLEVEL%"
|
|
44
|
-
if not "%LAUNCH_EXIT%"=="0" if /i "%LAUNCH_MODE%"=="open" pause
|
|
45
|
-
exit /b %LAUNCH_EXIT%
|
|
46
|
-
|
|
47
|
-
:invalid_argument
|
|
48
|
-
echo ERROR: Unsupported launcher arguments: %LAUNCH_REQUEST%
|
|
49
|
-
echo Use --open, --background, or --watch.
|
|
50
|
-
exit /b 64
|
|
51
|
-
|
|
52
|
-
:help
|
|
53
|
-
echo Usage: %~nx0 [--open ^| --background ^| --watch]
|
|
54
|
-
echo --open Open official Harness on 3080, then start Crew silently on 3210.
|
|
55
|
-
echo --background Start the Crew-owned 3210 service silently.
|
|
56
|
-
echo --watch Keep the Crew-owned 3210 service healthy.
|
|
57
|
-
exit /b 0
|
|
1
|
+
@echo off
|
|
2
|
+
setlocal EnableExtensions
|
|
3
|
+
title DSH Crew Launcher
|
|
4
|
+
|
|
5
|
+
set "LAUNCH_REQUEST=%*"
|
|
6
|
+
set "LAUNCH_MODE=open"
|
|
7
|
+
set "LAUNCH_DIR=%~dp0"
|
|
8
|
+
|
|
9
|
+
if "%~1"=="" goto :run
|
|
10
|
+
if /i "%~1"=="--background" (
|
|
11
|
+
set "LAUNCH_MODE=background"
|
|
12
|
+
shift
|
|
13
|
+
goto :validate
|
|
14
|
+
)
|
|
15
|
+
if /i "%~1"=="--open" (
|
|
16
|
+
set "LAUNCH_MODE=open"
|
|
17
|
+
shift
|
|
18
|
+
goto :validate
|
|
19
|
+
)
|
|
20
|
+
if /i "%~1"=="--watch" (
|
|
21
|
+
set "LAUNCH_MODE=watch"
|
|
22
|
+
shift
|
|
23
|
+
goto :validate
|
|
24
|
+
)
|
|
25
|
+
if /i "%~1"=="--help" goto :help
|
|
26
|
+
goto :invalid_argument
|
|
27
|
+
|
|
28
|
+
:validate
|
|
29
|
+
if not "%~1"=="" goto :invalid_argument
|
|
30
|
+
|
|
31
|
+
:run
|
|
32
|
+
set "LAUNCH_HELPER=%LAUNCH_DIR%start-dsh-crew.ps1"
|
|
33
|
+
set "LAUNCH_LOG=%TEMP%\dsh-crew-launcher.log"
|
|
34
|
+
if not exist "%LAUNCH_HELPER%" (
|
|
35
|
+
>>"%LAUNCH_LOG%" echo [%date% %time%] ERROR Managed launcher helper is missing: %LAUNCH_HELPER%
|
|
36
|
+
echo ERROR: DSH Crew launcher helper is missing.
|
|
37
|
+
echo Repair it with: dsh-crew update
|
|
38
|
+
if /i "%LAUNCH_MODE%"=="open" pause
|
|
39
|
+
exit /b 1
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
powershell.exe -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "%LAUNCH_HELPER%" -Mode "%LAUNCH_MODE%"
|
|
43
|
+
set "LAUNCH_EXIT=%ERRORLEVEL%"
|
|
44
|
+
if not "%LAUNCH_EXIT%"=="0" if /i "%LAUNCH_MODE%"=="open" pause
|
|
45
|
+
exit /b %LAUNCH_EXIT%
|
|
46
|
+
|
|
47
|
+
:invalid_argument
|
|
48
|
+
echo ERROR: Unsupported launcher arguments: %LAUNCH_REQUEST%
|
|
49
|
+
echo Use --open, --background, or --watch.
|
|
50
|
+
exit /b 64
|
|
51
|
+
|
|
52
|
+
:help
|
|
53
|
+
echo Usage: %~nx0 [--open ^| --background ^| --watch]
|
|
54
|
+
echo --open Open official Harness on 3080, then start Crew silently on 3210.
|
|
55
|
+
echo --background Start the Crew-owned 3210 service silently.
|
|
56
|
+
echo --watch Keep the Crew-owned 3210 service healthy.
|
|
57
|
+
exit /b 0
|