feat(context): promote local Context Runtime profile to full active
Memind CI / Test, build, and release guards (push) Failing after 3m47s

Add CONTEXT_RUNTIME_ACTIVE_ENV bundle and zero-LLM active probe covering
MCP compact, zvec, and headroom proxy readiness while keeping memory
injection on shadow.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-09-10 09:41:55 +08:00
parent 3414ae42b1
commit b208c4d2bd
3 changed files with 114 additions and 15 deletions
+20 -15
View File
@@ -24,23 +24,25 @@ MEMIND_ZVEC_WORKSPACE_MODE=shadow
HEADROOM_OUTPUT_SHAPER=0
```
**混合晋升(逐项 active**:shadow 证据足够后,每次只改一个开关,例如:
```bash
MEMIND_MCP_COMPACT_MODE=active # 其余保持 shadow
```
验证:
```bash
node scripts/check-mcp-compactor-local.mjs
node scripts/check-mcp-compact-active-local.mjs
```
active 时 `tkmind-search` / `tkmind-excel` MCP 会暴露 `ctx_fetch`,大 payload 会被压缩为 handle。
Bundle 常量见 `context-runtime-profile.mjs``CONTEXT_RUNTIME_SHADOW_ENV`
## 本地 active 配置
五件套可全部 `active``CONTEXT_RUNTIME_ACTIVE_ENV`)。**memory injection 仍保持 shadow**`MEMORY_AGENT_INJECTION_MODE=shadow`,禁止 active injection)。
```bash
node scripts/check-context-runtime-active-local.mjs
# → CONTEXT_RUNTIME_ACTIVE_OK
```
| 开关 | active 行为 |
|------|-------------|
| MCP compact | 压缩大 tool 结果 + `ctx_fetch` |
| context budget | 编排注入按预算 dedupe/drop |
| recall fusion | 融合 recall 结果生效 |
| zvec workspace | code 任务附加 workspace 检索 |
| headroom | LLM 经 proxy(不可达 fail-open |
## 离线事件形状预览
不启动 Portal 也可查看 gateway 将 emit 的 shadow 事件:
@@ -78,6 +80,9 @@ node scripts/check-codebase-memory-mcp-local.mjs
# dsh CLI + dry-run launch plan(见 docs/dsh-executor-local.md,默认零 LLM
node scripts/check-dsh-executor-local.mjs
# Context Runtime active 五件套(零 LLM
node scripts/check-context-runtime-active-local.mjs
```
## Shadow Portal E2E1 轮,省 token 默认只验事件)