@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.
Files changed (47) hide show
  1. package/README.md +20 -7
  2. package/README.zh.md +18 -7
  3. package/docs/installation.md +1 -1
  4. package/docs/ui-surfaces.md +65 -46
  5. package/lib/client.js +565 -28
  6. package/official-web-bridge/lib/client.js +565 -28
  7. package/package.json +1 -1
  8. package/src/client/collapsible-sections.mjs +3 -2
  9. package/src/client/host-readiness.mjs +16 -3
  10. package/src/client/index.tsx +331 -54
  11. package/src/config-readiness.mjs +66 -5
  12. package/src/credential-lifecycle.mjs +73 -0
  13. package/src/credential-purge-adapters.mjs +127 -0
  14. package/src/credential-purge-state.mjs +59 -0
  15. package/src/credential-reference-inventory.mjs +78 -0
  16. package/src/dsh-cli-runtime.mjs +36 -9
  17. package/src/extension-contract.mjs +16 -10
  18. package/src/hub/index.mjs +1004 -438
  19. package/src/hub-client.mjs +25 -5
  20. package/src/hub-compatibility.mjs +23 -7
  21. package/src/install/install.mjs +4 -4
  22. package/src/install/npx-lifecycle.mjs +495 -134
  23. package/src/job-contracts.mjs +27 -6
  24. package/src/jobs.mjs +2 -4
  25. package/src/local-request-guard.mjs +60 -0
  26. package/src/mcp-runtime.mjs +7 -5
  27. package/src/model-routing.mjs +141 -49
  28. package/src/multimodal.mjs +0 -0
  29. package/src/official-web-bridge.mjs +248 -95
  30. package/src/policy.mjs +62 -31
  31. package/src/provider-config-scrub.mjs +71 -0
  32. package/src/provider-delete-adapters.mjs +451 -0
  33. package/src/provider-desired-state.mjs +37 -0
  34. package/src/provider-health.mjs +124 -0
  35. package/src/provider-inventory.mjs +132 -0
  36. package/src/provider-lifecycle-state.mjs +95 -0
  37. package/src/provider-lifecycle.mjs +214 -0
  38. package/src/provider-profile-store.mjs +171 -0
  39. package/src/readiness-matrix.mjs +11 -5
  40. package/src/removable-waiter.mjs +29 -0
  41. package/src/runtime-identity.mjs +66 -21
  42. package/src/runtime-readiness-snapshot.mjs +87 -0
  43. package/src/server.mjs +64 -21
  44. package/src/status-shard.mjs +13 -2
  45. package/src/workflow-runtime.mjs +44 -10
  46. package/windows/start-dsh-crew.cmd +3 -3
  47. package/windows/start-dsh-crew.ps1 +49 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ran-sh/dsh-crew",
3
- "version": "0.5.6",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "main": "./src/hub/entry.mjs",
6
6
  "bin": {
@@ -8,8 +8,9 @@ export const SETTINGS_SECTION_IDS = Object.freeze([
8
8
  'dispatch',
9
9
  'adaptive',
10
10
  'runtime',
11
- 'multimodal',
12
- 'providers',
11
+ 'multimodal',
12
+ 'harnessProviders',
13
+ 'providers',
13
14
  'jobs',
14
15
  ]);
15
16
 
@@ -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
  }