feat(dev-tools): add shadow portal and dsh gateway local E2E scripts

Add events-only Context Runtime shadow portal verification to save LLM
tokens, wire Tool Gateway → dsh headless smoke, and document both flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-09-10 09:24:57 +08:00
parent 6d76618c0b
commit 257edb4917
5 changed files with 371 additions and 1 deletions
+26 -1
View File
@@ -962,7 +962,7 @@ Goose v1.49 本地 canary 收口、Context Runtime + Agent Harness 融合 Phase
审计日期:2026-09-10
分支 HEAD`47d0d2ac`
`origin/main` 对应提交:`47d0d2ac`(待 push
`origin/main` 对应提交:`938f6d6d`
### 原始用途
@@ -978,3 +978,28 @@ fusion-plan §6.6 本机开发工具:`codebase-memory-mcp` 本地安装验证
- 保留本地分支名用于审计追溯。
- **不要** merge、cherry-pick 或从该分支继续开发。
## `feature/dsh-executor-local-setup`
**状态:禁止再次引用。改动已提交并进入 `origin/main`,该分支保留仅用于只读追溯,不是待合并开发分支。**
审计日期:2026-09-10
分支 HEAD:(见 merge commit
`origin/main` 对应提交:(见 merge commit
### 原始用途
`@deepseek-ai/dsh@0.1.1-rc.2` 本机安装、check 脚本、Tool Gateway headless E2EContext Runtime shadow Portal E2Eevents-only 省 token)。
### 验证摘要
- `dsh --version`0.1.1-rc.2
- `node scripts/check-dsh-executor-local.mjs``DSH_EXECUTOR_CLI_OK` / dry-run OK
- `MEMIND_DSH_RUN_LIVE_SMOKE=1` headlessOK(列 3 文件)
- `MEMIND_TOOL_GATEWAY_DSH_ENABLED=1 node scripts/test-dsh-executor-gateway-e2e.mjs``DSH_GATEWAY_E2E_OK`
- Shadow Portal`force_deep_reasoning`run `2ca8be7b…`):`headroom_context_observed` + `context_budget_resolved``mode=shadow`
### 最终处置
- 保留本地分支名用于审计追溯。
- **不要** merge、cherry-pick 或从该分支继续开发。
+12
View File
@@ -64,6 +64,18 @@ node scripts/check-codebase-memory-mcp-local.mjs
node scripts/check-dsh-executor-local.mjs
```
## Shadow Portal E2E1 轮,省 token 默认只验事件)
Portal 需带 shadow 五件套(见上文)运行 `pnpm dev`
```bash
node scripts/run-context-runtime-shadow-portal-e2e.mjs
# 默认 CONTEXT_RUNTIME_SHADOW_EVENTS_ONLY=1:拿到 headroom/budget shadow 事件即停,不等 Goose 跑完
# 通过 → CONTEXT_RUNTIME_SHADOW_PORTAL_OK
```
`recall_fusion_resolved` 在 agent memory 关闭时可能缺失,脚本会 WARN 但不阻断。
## 用户自测清单(有 LLM 配额时)
1. 确认 **未设置** `GOOSE_V149_ALLOW_REAL_LLM=1` 除非你明确要跑 live smoke
+9
View File
@@ -62,6 +62,15 @@ node scripts/check-dsh-executor-local.mjs
- **预计超过 10k token 必须先经用户同意**
- 禁止循环重跑、禁止 unattended `check-goosed-v149-all` / phase3 聚合
## Tool Gateway E2E(一次 headless
```bash
MEMIND_TOOL_GATEWAY_DSH_ENABLED=1 node scripts/test-dsh-executor-gateway-e2e.mjs
# → DSH_GATEWAY_E2E_OK
```
路由 `repo_refactor``dsh`;会消耗 LLM token,须人工批准。
## headless 手动探针
```bash