@ran-sh/dsh-crew 0.5.5 → 0.5.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/README.md +14 -7
- package/README.zh.md +12 -7
- package/docs/installation.md +1 -1
- package/docs/ui-surfaces.md +65 -46
- package/lib/client.js +345 -22
- package/official-web-bridge/lib/client.js +345 -22
- package/package.json +1 -1
- package/src/client/collapsible-sections.mjs +3 -2
- package/src/client/index.tsx +227 -51
- package/src/config-readiness.mjs +56 -5
- package/src/extension-contract.mjs +9 -5
- package/src/hub/index.mjs +854 -445
- package/src/hub-client.mjs +24 -4
- package/src/hub-compatibility.mjs +23 -7
- package/src/install/install.mjs +4 -4
- package/src/install/npx-lifecycle.mjs +254 -87
- package/src/job-contracts.mjs +19 -3
- 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 +242 -84
- package/src/policy.mjs +62 -31
- package/src/provider-config-scrub.mjs +71 -0
- package/src/provider-delete-adapters.mjs +424 -0
- package/src/provider-health.mjs +124 -0
- package/src/provider-inventory.mjs +132 -0
- package/src/provider-lifecycle-state.mjs +81 -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 +43 -13
- package/src/server.mjs +34 -16
- 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/README.md
CHANGED
|
@@ -17,8 +17,9 @@ dsh-crew integrate
|
|
|
17
17
|
dsh-crew status
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
Open <http://127.0.0.1:3080> for the daily console. On Windows, installation
|
|
21
|
-
also registers login startup for the
|
|
20
|
+
Open <http://127.0.0.1:3080> for the daily console. On Windows, installation
|
|
21
|
+
also registers login startup for the 3080 console; its official bridge starts
|
|
22
|
+
and owns the isolated 3210 Harness backend.
|
|
22
23
|
|
|
23
24
|
| Surface | Purpose |
|
|
24
25
|
| --- | --- |
|
|
@@ -41,14 +42,20 @@ silently falling back.
|
|
|
41
42
|
## Useful commands
|
|
42
43
|
|
|
43
44
|
```bash
|
|
44
|
-
dsh-crew inspect # live capabilities and readiness
|
|
45
|
-
dsh-crew jobs list # jobs and Result Contracts
|
|
46
|
-
dsh-crew
|
|
45
|
+
dsh-crew inspect # live capabilities and readiness
|
|
46
|
+
dsh-crew jobs list # jobs and Result Contracts
|
|
47
|
+
dsh-crew providers list # 3210 Harness provider inventory (secret-free)
|
|
48
|
+
dsh-crew providers probe <provider-id>
|
|
49
|
+
dsh-crew providers delete-plan <provider-id> --replacement-default <provider-id>
|
|
50
|
+
dsh-crew providers delete <provider-id> --plan <plan-id> --expected-revision <sha256> --confirm
|
|
51
|
+
dsh-crew update # update and repair enabled integrations
|
|
47
52
|
dsh-crew uninstall # remove managed files, keep backups/config
|
|
48
53
|
```
|
|
49
54
|
|
|
50
|
-
The runtime is isolated under `~/.config/dsh-crew/harness` with `profile: dsh-crew`;
|
|
51
|
-
the official `web` profile receives only the 3080 bridge.
|
|
55
|
+
The runtime is isolated under `~/.config/dsh-crew/harness` with `profile: dsh-crew`;
|
|
56
|
+
the official `web` profile receives only the 3080 bridge.
|
|
57
|
+
All production Worker/Reviewer model calls are executed by the isolated 3210
|
|
58
|
+
Crew Harness; 3080 is a control-plane bridge only.
|
|
52
59
|
|
|
53
60
|
## Legacy launcher migration
|
|
54
61
|
|
package/README.zh.md
CHANGED
|
@@ -16,8 +16,8 @@ dsh-crew integrate
|
|
|
16
16
|
dsh-crew status
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
打开 <http://127.0.0.1:3080> 进入日常控制台。Windows 安装会注册当前用户的
|
|
20
|
-
|
|
19
|
+
打开 <http://127.0.0.1:3080> 进入日常控制台。Windows 安装会注册当前用户的
|
|
20
|
+
登录启动项,先启动 3080 控制台,再由官方桥接启动并监管隔离的 3210 Harness。
|
|
21
21
|
|
|
22
22
|
| 界面 | 用途 |
|
|
23
23
|
| --- | --- |
|
|
@@ -38,14 +38,19 @@ dsh-crew status
|
|
|
38
38
|
## 常用命令
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
dsh-crew inspect # 实时能力与就绪度
|
|
42
|
-
dsh-crew jobs list # 任务与 Result Contract
|
|
43
|
-
dsh-crew
|
|
41
|
+
dsh-crew inspect # 实时能力与就绪度
|
|
42
|
+
dsh-crew jobs list # 任务与 Result Contract
|
|
43
|
+
dsh-crew providers list # 3210 Harness Provider 清单(不含密钥)
|
|
44
|
+
dsh-crew providers probe <provider-id>
|
|
45
|
+
dsh-crew providers delete-plan <provider-id> --replacement-default <provider-id>
|
|
46
|
+
dsh-crew providers delete <provider-id> --plan <plan-id> --expected-revision <sha256> --confirm
|
|
47
|
+
dsh-crew update # 更新并修复已启用集成
|
|
44
48
|
dsh-crew uninstall # 移除受管文件,保留配置/备份
|
|
45
49
|
```
|
|
46
50
|
|
|
47
|
-
运行时隔离在 `~/.config/dsh-crew/harness`,使用 `profile: dsh-crew`;官方 `web` profile
|
|
48
|
-
只接收 3080 轻量桥接。
|
|
51
|
+
运行时隔离在 `~/.config/dsh-crew/harness`,使用 `profile: dsh-crew`;官方 `web` profile
|
|
52
|
+
只接收 3080 轻量桥接。
|
|
53
|
+
生产 Worker/Reviewer 的模型调用全部由隔离的 3210 Crew Harness 执行,3080 仅作为控制面桥接。
|
|
49
54
|
|
|
50
55
|
## 旧启动器迁移
|
|
51
56
|
|
package/docs/installation.md
CHANGED
|
@@ -31,7 +31,7 @@ node scripts/setup.mjs status
|
|
|
31
31
|
| Windows login startup | `DSH Crew.vbs`, `start-dsh-crew.cmd`, and `start-dsh-crew.ps1` | Only DSH Crew-owned files are removed; foreign pre-existing content at those exact paths is preserved or fails closed |
|
|
32
32
|
| Official 3080 UI | Optional lightweight bridge after `integrate` | `detach` removes the bridge; a backup is kept |
|
|
33
33
|
|
|
34
|
-
The Windows login launcher starts the official UI on 3080 and the isolated Crew backend on 3210. It does not open a browser and does not store credentials.
|
|
34
|
+
The Windows login launcher starts the official UI on 3080. The 3080 bridge then starts and owns the isolated Crew backend on 3210, so provider restart/rollback operations have one verifiable supervisor. It does not open a browser and does not store credentials.
|
|
35
35
|
|
|
36
36
|
ZCode uses `~/.zcode/cli/config.json` when it already has native MCP servers. If
|
|
37
37
|
that native list is empty, the installer uses `~/.agents/mcp.json`; unrelated
|
package/docs/ui-surfaces.md
CHANGED
|
@@ -1,46 +1,65 @@
|
|
|
1
|
-
# 3080 and 3210 UI responsibilities
|
|
2
|
-
|
|
3
|
-
DSH Crew deliberately presents two different user experiences from one shared
|
|
4
|
-
client build.
|
|
5
|
-
|
|
6
|
-
## 3080: daily Crew control plane
|
|
7
|
-
|
|
8
|
-
The official Harness `web` profile on `127.0.0.1:3080` owns day-to-day Crew
|
|
9
|
-
management:
|
|
10
|
-
|
|
11
|
-
- Crew workflow and global enablement
|
|
12
|
-
- Worker and Reviewer policy
|
|
13
|
-
- model priority, fallback, review, and adaptive routing
|
|
14
|
-
- runtime and activation-boundary information
|
|
15
|
-
- Codex, Claude, and ZCode installation actions and structured readiness
|
|
16
|
-
- task status and bounded model-invocation summaries
|
|
17
|
-
- the link to the underlying 3210 Crew Harness
|
|
18
|
-
|
|
19
|
-
The lightweight official-web bridge keeps these requests same-origin and
|
|
20
|
-
proxies only the `/_dsh/dsh-crew/*` contract to the isolated backend.
|
|
21
|
-
|
|
22
|
-
## 3210: isolated native Harness
|
|
23
|
-
|
|
24
|
-
The Crew-owned `dsh-crew` profile on `127.0.0.1:3210` owns model execution and
|
|
25
|
-
low-level Harness configuration. Its native Harness menus remain the place for
|
|
26
|
-
Providers, Harness Models, Agent presets, and native runtime settings.
|
|
27
|
-
|
|
28
|
-
The DSH Crew settings entry on this surface is intentionally diagnostics-only:
|
|
29
|
-
it shows bounded runtime identity and a link back to 3080. It does not duplicate
|
|
30
|
-
Worker/Reviewer policy, host integrations, tasks, or orchestration controls.
|
|
31
|
-
|
|
32
|
-
## Surface detection and failure behavior
|
|
33
|
-
|
|
34
|
-
The client does not infer responsibility from a hard-coded browser port. It
|
|
35
|
-
uses two same-origin, structured signals:
|
|
36
|
-
|
|
37
|
-
1. `/_dsh/dsh-crew/bridge-status` identifies the official bridge control plane.
|
|
38
|
-
2. `/_dsh/dsh-crew/runtime` identifies the native Crew-owned runtime.
|
|
39
|
-
|
|
40
|
-
The bridge signal wins on 3080 because the proxied runtime response correctly
|
|
41
|
-
describes the 3210 backend. If neither contract can be verified, the client
|
|
42
|
-
fails closed to the minimal diagnostics view. Missing evidence never enables
|
|
43
|
-
the full control plane and never becomes `READY`.
|
|
44
|
-
|
|
45
|
-
The split changes presentation only. Crew state, credentials, routing policy,
|
|
46
|
-
and model execution remain isolated under the Crew-owned home and profile.
|
|
1
|
+
# 3080 and 3210 UI responsibilities
|
|
2
|
+
|
|
3
|
+
DSH Crew deliberately presents two different user experiences from one shared
|
|
4
|
+
client build.
|
|
5
|
+
|
|
6
|
+
## 3080: daily Crew control plane
|
|
7
|
+
|
|
8
|
+
The official Harness `web` profile on `127.0.0.1:3080` owns day-to-day Crew
|
|
9
|
+
management:
|
|
10
|
+
|
|
11
|
+
- Crew workflow and global enablement
|
|
12
|
+
- Worker and Reviewer policy
|
|
13
|
+
- model priority, fallback, review, and adaptive routing
|
|
14
|
+
- runtime and activation-boundary information
|
|
15
|
+
- Codex, Claude, and ZCode installation actions and structured readiness
|
|
16
|
+
- task status and bounded model-invocation summaries
|
|
17
|
+
- the link to the underlying 3210 Crew Harness
|
|
18
|
+
|
|
19
|
+
The lightweight official-web bridge keeps these requests same-origin and
|
|
20
|
+
proxies only the `/_dsh/dsh-crew/*` contract to the isolated backend.
|
|
21
|
+
|
|
22
|
+
## 3210: isolated native Harness
|
|
23
|
+
|
|
24
|
+
The Crew-owned `dsh-crew` profile on `127.0.0.1:3210` owns model execution and
|
|
25
|
+
low-level Harness configuration. Its native Harness menus remain the place for
|
|
26
|
+
Providers, Harness Models, Agent presets, and native runtime settings.
|
|
27
|
+
|
|
28
|
+
The DSH Crew settings entry on this surface is intentionally diagnostics-only:
|
|
29
|
+
it shows bounded runtime identity and a link back to 3080. It does not duplicate
|
|
30
|
+
Worker/Reviewer policy, host integrations, tasks, or orchestration controls.
|
|
31
|
+
|
|
32
|
+
## Surface detection and failure behavior
|
|
33
|
+
|
|
34
|
+
The client does not infer responsibility from a hard-coded browser port. It
|
|
35
|
+
uses two same-origin, structured signals:
|
|
36
|
+
|
|
37
|
+
1. `/_dsh/dsh-crew/bridge-status` identifies the official bridge control plane.
|
|
38
|
+
2. `/_dsh/dsh-crew/runtime` identifies the native Crew-owned runtime.
|
|
39
|
+
|
|
40
|
+
The bridge signal wins on 3080 because the proxied runtime response correctly
|
|
41
|
+
describes the 3210 backend. If neither contract can be verified, the client
|
|
42
|
+
fails closed to the minimal diagnostics view. Missing evidence never enables
|
|
43
|
+
the full control plane and never becomes `READY`.
|
|
44
|
+
|
|
45
|
+
The split changes presentation only. Crew state, credentials, routing policy,
|
|
46
|
+
and model execution remain isolated under the Crew-owned home and profile.
|
|
47
|
+
|
|
48
|
+
## Local trust model
|
|
49
|
+
|
|
50
|
+
Both surfaces listen on loopback only and share one request guard
|
|
51
|
+
(`src/local-request-guard.mjs`). A request is trusted when it proves, in
|
|
52
|
+
order: (1) the TCP peer is a loopback address, (2) the `Host` header names a
|
|
53
|
+
loopback host, (3) browser fetch-metadata (`Sec-Fetch-Site`) is `same-origin`
|
|
54
|
+
or absent/`none`, and (4) when an `Origin` header is present it names a
|
|
55
|
+
loopback host — on the 3080 bridge the `Origin` authority must additionally
|
|
56
|
+
equal the request authority, while the 3210 hub accepts any loopback origin
|
|
57
|
+
because the 3080 panel calls it cross-port.
|
|
58
|
+
|
|
59
|
+
There is deliberately no bearer token: every process running as the local
|
|
60
|
+
user is inside the trust boundary and may control Crew. The guards keep
|
|
61
|
+
off-machine browsers, DNS-rebinding pages, and cross-machine proxies out;
|
|
62
|
+
they do not authenticate local users. If a deployment ever needs to separate
|
|
63
|
+
local principals, add a per-install random token to state-changing calls and
|
|
64
|
+
inject it server-side in the bridge — do not use browser `Origin` as
|
|
65
|
+
authentication.
|