refactor(routes): 更新 rules-routes 和 claude-routes 使用 $PROTO $TMPL

- rules-routes.ts: 替换 4 处 $(cat ...) 模板引用为 $PROTO $TMPL
- claude-routes.ts: 替换 2 处 $(cat ...) 模板引用为 $PROTO $TMPL
- 添加 loadProtocol/loadTemplate 导入
- 在 executeCliTool 调用中添加 rulesEnv 参数

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
catlog22
2026-01-17 19:40:28 +08:00
parent f14418603a
commit 1f87ca0be3
4 changed files with 65 additions and 24 deletions

View File

@@ -1149,7 +1149,7 @@ async function executeCliTool(
duration_ms: duration,
output: newTurnOutput,
parsedOutput: flattenOutputUnits(allOutputUnits, {
excludeTypes: ['stderr', 'progress', 'metadata', 'system']
excludeTypes: ['stderr', 'progress', 'metadata', 'system', 'tool_call']
})
};