@peterwangze/claude-trigger-router 1.17.0 → 1.19.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.
@@ -118,7 +118,7 @@ Router: {}
118
118
  相关状态接口:
119
119
 
120
120
  - `GET /api/service-info`
121
- - `GET /api/remote-status`
121
+ - `GET /api/remote-status`:本地 thin proxy 的远程 discovery / availability 摘要,包含远端 ready、远端模型数、upstream 服务数、客户端下一步和 service-scope 边界
122
122
  - `GET /api/registration`
123
123
  - `GET /api/governance/health`
124
124
 
@@ -293,7 +293,7 @@ Governance:
293
293
  - 当前角色:本地代理或远程路由服务
294
294
  - 当前监听地址,以及 server/cloud 模式下远程客户端应使用的 `ANTHROPIC_BASE_URL`
295
295
  - 当前鉴权状态、bootstrap key 和 active managed key 摘要
296
- - 如果启用了 `Runtime.remote_service`,会探测远程服务是否 reachable / ready
296
+ - 如果启用了 `Runtime.remote_service`,会探测远程服务是否 reachable / ready、输出 service-scope discovery 边界,并在可达时显示远端注册模型数和 upstream 服务数
297
297
 
298
298
  如果远程客户端配置没有本地 `Models`,doctor 会跳过本地模型探测,不会再询问是否探测 `0` 个模型。
299
299
 
@@ -302,10 +302,10 @@ Governance:
302
302
  - 本地服务 ready 状态和端口
303
303
  - `Runtime.mode` 与服务角色
304
304
  - 监听地址、维护入口和远程客户端连接建议
305
- - 远程服务状态摘要
305
+ - 远程服务状态摘要、remote discovery 和 remote availability
306
306
  - Registration 模型和上游服务摘要
307
307
 
308
- 这些信息来自现有 `/api/service-info` 和 `/api/remote-status`,不会引入新的平行运行时。启用 `Runtime.remote_service` 时,`/api/remote-status` 还会只读同步远端 `/api/registration` 的脱敏摘要,用于显示远端注册模型数和 upstream 服务数;它不会把远端注册写回本地配置。
308
+ 这些信息来自现有 `/api/service-info` 和 `/api/remote-status`,不会引入新的平行运行时。启用 `Runtime.remote_service` 时,`/api/remote-status` 还会只读同步远端 `/api/registration` 的脱敏摘要,用于显示远端注册模型数、upstream 服务数、模型 ID 和客户端下一步;它不会把远端注册写回本地配置,也不表示已经支持节点/集群编排。
309
309
 
310
310
  维护者工作台还会展示治理 Health 摘要。它来自 `/api/governance/health`,同样也包含在 `/api/governance/metrics` 的 `health` 字段里:
311
311
 
@@ -0,0 +1,49 @@
1
+ # Release notes v1.18.0
2
+
3
+ `v1.18.0` 定位为“治理观测运营化增强版”。这个版本不改变默认路由运行时语义,而是把维护者已经能看到的 trace、metrics、pool health、key quota 和 guardrail 信号继续收敛成可排序、可行动、可在 Web UI 中快速扫描的运营闭环。
4
+
5
+ ## 本次闭环
6
+
7
+ 1. Routing outcome scorecard
8
+ - `/api/governance/metrics` 新增 `outcomeScorecard`。
9
+ - route reason、final model、semantic intent 三类 outcome 会按 priority score 排序。
10
+ - scorecard 同时结合 model switch、alignment、cascade、latency、quality evidence 和 task comparison,给出 status、evidence、action 和 configPath。
11
+ - CSV export 同步包含 scorecard 摘要和条目。
12
+
13
+ 2. Operations risk
14
+ - `/api/service-info` 新增 `operations` 汇总。
15
+ - model pool health 与 managed key quota 不再只分散在两个表格中,而是合并为统一 status 和 actions。
16
+ - `/ui` 维护者工作台新增 Operations risk 面板。
17
+
18
+ 3. Guardrail summary
19
+ - `/api/governance/metrics` 新增 `guardrails` 汇总。
20
+ - 输入侧 prompt injection / secret exfiltration 和输出侧 placeholder / tool error 会按 code、severity、count、rate 和 action 汇总。
21
+ - `/ui` 维护者工作台新增 Guardrail summary 面板。
22
+
23
+ 4. Web UI 功能审视与视觉设计优化
24
+ - 维护者工作台顶部新增 decision rail。
25
+ - Operations、Guardrails 和 Outcome 三类运营信号先汇总为状态和下一步动作,再进入明细表。
26
+ - decision rail 在桌面保持三列,在移动端回落单列,并纳入 DOM/style/browser smoke 看护。
27
+
28
+ ## 发布边界
29
+
30
+ - 不改变 SmartRouter 默认运行时语义。
31
+ - 不新增新的模型调度策略或远程部署形态。
32
+ - 不新增平行观测结构;新增汇总均复用现有 trace、metrics、service-info、pool health、auth quota 和 UI contract。
33
+ - 后续部署形态与远程接入收敛进入 v1.19.0。
34
+
35
+ ## 发布前验证
36
+
37
+ 本版本发布前至少执行:
38
+
39
+ ```bash
40
+ npx vitest --run src/deploy-assets.test.ts
41
+ npm run test:ui
42
+ npm run test:ui:browser
43
+ npm run test:e2e:cli:entry
44
+ npm run test:route-ux
45
+ npm run build
46
+ npm run release:verify
47
+ ```
48
+
49
+ 其中 `release:verify` 仍是最终发布门禁。
@@ -0,0 +1,45 @@
1
+ # Release notes v1.19.0
2
+
3
+ `v1.19.0` 定位为“部署形态与远程接入收敛版”。这个版本不新增托管控制面或集群调度,而是在现有 local thin proxy、server profile、remote status 和 registration 基础上,让远程客户端与服务维护者更清楚地判断连到谁、远端是否 ready、有哪些模型可用,以及失败后该找谁处理。
4
+
5
+ ## 本次闭环
6
+
7
+ 1. Remote service discovery
8
+ - `/api/remote-status` 新增 `discovery` 摘要。
9
+ - 远端 service-info、registration、当前 runtime role 和失败状态会被合并为 `disabled / misconfigured / unreachable / not_ctr_service / not_ready / ready`。
10
+ - boundary 明确保持 service 级,`nodeOrchestration`、`clusterOrchestration` 和 `configWriteback` 均为 `unsupported`。
11
+ - `/ui` Role & connection guide 新增 remote discovery 状态和动作提示。
12
+
13
+ 2. Remote availability
14
+ - `/api/remote-status` 新增 `availability` 摘要。
15
+ - 远端 ready、registration 可用性、远端模型数、upstream 服务数、模型 ID、upstream service ID、客户端下一步和维护者动作进入同一运营状态。
16
+ - `/ui` 同步展示 remote availability,并把 client next steps 合并到 remote discovery 动作列表。
17
+
18
+ 3. Server/client guidance alignment
19
+ - README、configuration guide、server maintainer guide 和 remote client guide 已同步 remote discovery / availability、service-scope 边界和 `client + read-only` key 口径。
20
+ - `ctr doctor` 远程客户端路径新增 service-scope discovery 和远端注册摘要输出。
21
+ - `ctr setup` 远程路径下一步新增 `/api/remote-status` discovery/availability 观测提示。
22
+
23
+ ## 发布边界
24
+
25
+ - 不新增完整 cloud/托管控制面。
26
+ - 不新增节点/集群编排、多活调度或远端配置写回。
27
+ - 不改变远程模型调用转发语义;本地 `ctr` 仍作为 thin proxy 转发 `/v1/messages` 与 `/v1/chat/completions`。
28
+ - 后续发布与进展治理可持续化进入 v1.20.0。
29
+
30
+ ## 发布前验证
31
+
32
+ 本版本发布前至少执行:
33
+
34
+ ```bash
35
+ npx vitest --run src/service-health.test.ts src/server.test.ts
36
+ npx vitest --run src/ui/workbench.dom.test.ts
37
+ npx vitest --run src/doctor/index.test.ts src/setup/index.test.ts src/deploy-assets.test.ts
38
+ npm run test:ui:browser
39
+ npm run test:e2e:cli:entry
40
+ npm run test:route-ux
41
+ npm run build
42
+ npm run release:verify
43
+ ```
44
+
45
+ 其中 `release:verify` 仍是最终发布门禁。
package/docs/releasing.md CHANGED
@@ -7,7 +7,7 @@
7
7
  - `Release Check`:在 PR、`master` push 和手动触发时执行发布前检查
8
8
  - `Publish Package`:在版本 tag、GitHub Release 或手动触发时执行正式发布
9
9
 
10
- 本次 `v1.17.0` minor release 的优先级是 UI 双层工作台收敛。发布检查需要优先保护既有 `setup / start / status / code / doctor / ui` 入口主路径,以及 fresh setup、远程转发、配置保存、鉴权、route preview 可读解释、`/v1/messages` 流式即时透传、上游中途断流的可读 SSE error、远程中转客户端断开取消上游、结构化 API error 返回不回退、`/ui` 角色化入口不漂移、trace evidence detail 可达和真实浏览器布局不横向溢出。
10
+ 本次 `v1.19.0` minor release 的优先级是部署形态与远程接入收敛。发布检查需要优先保护既有 `setup / start / status / code / doctor / ui` 入口主路径,以及 fresh setup、远程转发、配置保存、鉴权、route preview 可读解释、`/v1/messages` 流式即时透传、上游中途断流的可读 SSE error、远程中转客户端断开取消上游、结构化 API error 返回不回退、`/ui` 角色化入口不漂移、remote discovery、remote availability、远端 registration 摘要、server/client 角色口径、trace evidence detail 可达和真实浏览器布局不横向溢出。
11
11
 
12
12
  ## 一次性准备
13
13
 
@@ -26,24 +26,26 @@
26
26
 
27
27
  1. 更新版本号
28
28
  - `vX.Y.0` 这类 minor release 还需要同步更新版本依赖用例、README 发布定位和对应 release notes。
29
- - 本次 `v1.17.0` 的发布边界以 `docs/release-notes-v1.17.0.md` 为准:主打 UI 双层工作台收敛、角色化设计 contracttrace evidence detailCSS/JS helper 收口和真实浏览器 smoke。
29
+ - 本次 `v1.19.0` 的发布边界以 `docs/release-notes-v1.19.0.md` 为准:主打部署形态与远程接入收敛、remote discoveryremote availabilityserver/client guidance alignment 和真实浏览器 smoke。
30
30
  2. 本地先执行发布包验证:
31
31
 
32
32
  ```bash
33
33
  npm run release:verify
34
34
  ```
35
35
 
36
- v1.17.0 期间建议在正式 `release:verify` 前额外跑一次 UI 与用户入口专项:
36
+ v1.19.0 期间建议在正式 `release:verify` 前额外跑一次远程接入与 UI 专项:
37
37
 
38
38
  ```bash
39
39
  npx vitest --run src/deploy-assets.test.ts
40
+ npx vitest --run src/service-health.test.ts src/server.test.ts
41
+ npx vitest --run src/doctor/index.test.ts src/setup/index.test.ts
40
42
  npm run test:ui
41
43
  npm run test:ui:browser
42
44
  npm run test:e2e:cli:entry
43
45
  npm run test:route-ux
44
46
  ```
45
47
 
46
- 这条专项把 README/发布说明入口、`/ui` 角色化第一屏、trace evidence detail、真实浏览器桌面/移动布局、help/setup/doctor/code/ui 短入口、setup fresh、remote client、server deployment、route preview、即时流式输出、上游断流可读 error、远程中转取消和结构化 API error 串成同一个发布前门禁。它关注用户能直接感知的“能不能进入、会不会卡住、错误能不能读懂、路由选择能不能预期、页面会不会溢出”,不是只检查内部函数返回。
48
+ 这条专项把 README/发布说明入口、`/ui` 角色化第一屏、remote discovery、remote availability、远端 registration 摘要、server/client 角色口径、trace evidence detail、真实浏览器桌面/移动布局、help/setup/doctor/code/ui 短入口、setup fresh、remote client、server deployment、route preview、即时流式输出、上游断流可读 error、远程中转取消和结构化 API error 串成同一个发布前门禁。它关注用户能直接感知的“能不能进入、会不会卡住、错误能不能读懂、远端是否可用、页面会不会溢出”,不是只检查内部函数返回。
47
49
 
48
50
  v1.12.0 期间建议在正式 `release:verify` 前额外跑一次流式稳定专项:
49
51
 
@@ -46,7 +46,9 @@ ctr status
46
46
  ctr ui
47
47
  ```
48
48
 
49
- `doctor` checks the configured remote service and reports whether it is reachable and ready. `status` shows the local role and remote-service connection hint. `ui` shows remote health through `/api/remote-status`, including the remote server's redacted registration summary when `/api/registration` is reachable.
49
+ `doctor` checks the configured remote service and reports whether it is reachable and ready. It also prints the service-scope discovery boundary and a redacted remote registration summary when `/api/registration` is reachable.
50
+
51
+ `status` shows the local role and remote-service connection hint. `ui` shows remote health through `/api/remote-status`, including remote discovery, availability, remote model count, upstream service count and client next steps. This is still a service-level contract; it does not mean node/cluster orchestration, hosted cloud control plane or remote config writeback is supported.
50
52
 
51
53
  ## Use with Claude Code through local ctr
52
54
 
@@ -25,6 +25,8 @@ Edit `Models[].key`, `Models[].api`, `Models[].interface` and `Models[].model` b
25
25
 
26
26
  `GET /api/service-info` returns the same security policy and a deployment checklist so maintainers can verify the live service before sharing the URL.
27
27
 
28
+ Remote clients read `GET /api/remote-status` from their local thin proxy. That response now includes discovery and availability summaries so clients can see the remote service role, service-scope boundary, remote model count, upstream service count and next steps without receiving secrets. Keep `/api/registration` redacted and treat it as an observability source, not remote config writeback.
29
+
28
30
  ## 2. Diagnose and start
29
31
 
30
32
  ```bash
@@ -103,3 +105,5 @@ curl -H "Authorization: Bearer $CTR_ADMIN_KEY" http://127.0.0.1:5678/api/service
103
105
  ```
104
106
 
105
107
  For model pools, use `GET /api/models/pool-health` for current health and `POST /api/models/pool-health/probe` for an operator-triggered lightweight reachability probe. The probe does not send a model request; it uses `HEAD` against enabled endpoints, records latency for reachable endpoints, and records failures into the existing cooldown/circuit breaker state.
108
+
109
+ This server profile still does not provide node/cluster orchestration or a hosted cloud control plane. If remote clients report missing expected models in availability, inspect `Registration.models`, `Registration.upstream_services` and model pool health on this server.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peterwangze/claude-trigger-router",
3
- "version": "1.17.0",
3
+ "version": "1.19.0",
4
4
  "description": "Intelligent trigger-based router for Claude Code with automatic task type detection and model routing",
5
5
  "bin": {
6
6
  "ctr": "dist/cli.js"