@ran-sh/dsh-crew 0.5.6 → 1.0.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/README.md +20 -7
- package/README.zh.md +18 -7
- package/docs/installation.md +1 -1
- package/docs/ui-surfaces.md +65 -46
- package/lib/client.js +565 -28
- package/official-web-bridge/lib/client.js +565 -28
- package/package.json +1 -1
- package/src/client/collapsible-sections.mjs +3 -2
- package/src/client/host-readiness.mjs +16 -3
- package/src/client/index.tsx +331 -54
- package/src/config-readiness.mjs +66 -5
- package/src/credential-lifecycle.mjs +73 -0
- package/src/credential-purge-adapters.mjs +127 -0
- package/src/credential-purge-state.mjs +59 -0
- package/src/credential-reference-inventory.mjs +78 -0
- package/src/dsh-cli-runtime.mjs +36 -9
- package/src/extension-contract.mjs +16 -10
- package/src/hub/index.mjs +1004 -438
- package/src/hub-client.mjs +25 -5
- package/src/hub-compatibility.mjs +23 -7
- package/src/install/install.mjs +4 -4
- package/src/install/npx-lifecycle.mjs +495 -134
- package/src/job-contracts.mjs +27 -6
- package/src/jobs.mjs +2 -4
- package/src/local-request-guard.mjs +60 -0
- package/src/mcp-runtime.mjs +7 -5
- package/src/model-routing.mjs +141 -49
- package/src/multimodal.mjs +0 -0
- package/src/official-web-bridge.mjs +248 -95
- package/src/policy.mjs +62 -31
- package/src/provider-config-scrub.mjs +71 -0
- package/src/provider-delete-adapters.mjs +451 -0
- package/src/provider-desired-state.mjs +37 -0
- package/src/provider-health.mjs +124 -0
- package/src/provider-inventory.mjs +132 -0
- package/src/provider-lifecycle-state.mjs +95 -0
- package/src/provider-lifecycle.mjs +214 -0
- package/src/provider-profile-store.mjs +171 -0
- package/src/readiness-matrix.mjs +11 -5
- package/src/removable-waiter.mjs +29 -0
- package/src/runtime-identity.mjs +66 -21
- package/src/runtime-readiness-snapshot.mjs +87 -0
- package/src/server.mjs +64 -21
- package/src/status-shard.mjs +13 -2
- package/src/workflow-runtime.mjs +44 -10
- package/windows/start-dsh-crew.cmd +3 -3
- package/windows/start-dsh-crew.ps1 +49 -5
package/package.json
CHANGED
|
@@ -15,7 +15,20 @@ function componentState(status, keys, { aligned = false } = {}) {
|
|
|
15
15
|
return ready ? READINESS_STATES.READY : READINESS_STATES.DEGRADED;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
function runtimeState(runtime) {
|
|
18
|
+
function runtimeState(runtime, readinessSnapshot) {
|
|
19
|
+
if (readinessSnapshot && typeof readinessSnapshot === 'object') {
|
|
20
|
+
const identity = readinessSnapshot.runtime;
|
|
21
|
+
if (!(identity?.execution_plane === 'hub-3210' && identity.profile === 'dsh-crew'
|
|
22
|
+
&& Number(identity.listen_port) === 3210 && typeof identity.runtime_id === 'string' && identity.runtime_id.trim())) {
|
|
23
|
+
return READINESS_STATES.UNAVAILABLE;
|
|
24
|
+
}
|
|
25
|
+
const row = Array.isArray(readinessSnapshot.readiness_matrix?.rows)
|
|
26
|
+
? readinessSnapshot.readiness_matrix.rows.find((entry) => entry?.id === 'hub_compatibility') : undefined;
|
|
27
|
+
if (row?.status === 'PASS') return READINESS_STATES.READY;
|
|
28
|
+
if (row?.status === 'FAIL') return READINESS_STATES.UNAVAILABLE;
|
|
29
|
+
if (row?.status === 'NOT_RUN' || row?.status === 'SKIP') return READINESS_STATES.DEGRADED;
|
|
30
|
+
return READINESS_STATES.UNKNOWN;
|
|
31
|
+
}
|
|
19
32
|
if (runtime === undefined) return READINESS_STATES.UNKNOWN;
|
|
20
33
|
if (runtime === null) return READINESS_STATES.UNAVAILABLE;
|
|
21
34
|
return runtime?.ok === true && runtime.service === 'dsh-crew-hub'
|
|
@@ -30,7 +43,7 @@ function bridgeState(surface) {
|
|
|
30
43
|
}
|
|
31
44
|
|
|
32
45
|
/** Project only structured, non-secret installer/runtime evidence. */
|
|
33
|
-
export function projectHostReadiness({ installStatus, runtime, surface } = {}) {
|
|
46
|
+
export function projectHostReadiness({ installStatus, runtime, surface, readinessSnapshot } = {}) {
|
|
34
47
|
const codex = installStatus?.codex;
|
|
35
48
|
const claude = installStatus?.claude;
|
|
36
49
|
const zcode = installStatus?.zcode;
|
|
@@ -40,7 +53,7 @@ export function projectHostReadiness({ installStatus, runtime, surface } = {}) {
|
|
|
40
53
|
{ id: 'ds_reviewer', state: componentState(codex, ['reviewer_role'], { aligned: true }) },
|
|
41
54
|
{ id: 'claude_plugin', state: componentState(claude, ['enabled', 'marketplace', 'snapshot', 'permissions']) },
|
|
42
55
|
{ id: 'zcode_mcp', state: componentState(zcode, ['mcp', 'policy', 'worker_agent', 'reviewer_agent', 'config_prompt', 'status_prompt', 'ownership']) },
|
|
43
|
-
{ id: 'crew_harness', state: runtimeState(runtime), detail: runtime?.runtime_version ?? null },
|
|
56
|
+
{ id: 'crew_harness', state: runtimeState(runtime, readinessSnapshot), detail: runtime?.runtime_version ?? null },
|
|
44
57
|
{ id: 'official_bridge', state: bridgeState(surface) },
|
|
45
58
|
];
|
|
46
59
|
}
|