feat: structured telemetry metrics, strict MCP config mode, and PermissionDecision types - #263
Open
raymondginger2018-sudo wants to merge 7 commits into
Conversation
raymondginger2018-sudo
force-pushed
the
feat/jul26-metrics-strict-mcp
branch
from
July 30, 2026 05:08
42681eb to
3cdaaa3
Compare
added 3 commits
July 31, 2026 09:02
1. 自动错误修复循环 (Auto Error Fix Loop) - bash-handler.ts: 命令失败时自动提取关键错误行 - session.ts: 检测工具执行失败,自动注入修复提醒 2. Plan → Execute → Verify 内置循环 - prompt.ts: 新增 AGENTIC_BEHAVIOR_PROMPT 系统提示 - 告诉 LLM 先规划、再执行、每步验证、失败必修 3. 错误输出结构化增强 - 失败命令的输出自动包裹 <error_analysis> 标签 - LLM 放弃修复时自动注入 [Auto Error Fix] 提醒 - 最多重试 3 轮,仍失败则向用户解释
.agentic-snapshot/ 包含: - README.md: 恢复指南(Git / 脚本 / npm link 三种方式) - restore-agentic.bat: 一键恢复脚本 - .gitignore: 不跟踪构建产物 备份的 dist 文件存储在本地 .agentic-snapshot/*.js, 不会被 git 跟踪,需要手动保留或从 git 提交还原源码。
借鉴 OpenAI Codex CLI 架构精华,四大模块升级: 1. Permission Profile:结构化权限系统 - Managed / Unrestricted / Legacy 三模式 - 路径级 ACL(read/write/deny + glob 匹配) - 内置 STRICT_SANDBOX / DEFAULT_DEV 预置 Profile 2. SQLite 统一状态管理 - 4 张表:session_logs / token_budget / permission_audit / checkpoints - json_extract 结构化查询 - 自动持久化 + 7 天清理 3. Job 队列引擎 - SpawnRequest->SpawnReady->ExitPayload 三阶段协议 - 指数退避重试 + 并发控制 - 全局单例 getGlobalJobQueue() 4. Skill 标准化 - Codex 兼容 SKILL.md frontmatter 解析 - agent.dependencies / interface / policy 声明 - skillPolicyToProfile() 自动权限转换 测试:38/38 全部通过
raymondginger2018-sudo
force-pushed
the
feat/jul26-metrics-strict-mcp
branch
from
July 31, 2026 01:02
3cdaaa3 to
566efa3
Compare
added 2 commits
July 31, 2026 09:15
…ermissionDecision types - feat(telemetry): Add PermissionDecisionMetrics and ToolUsageMetrics types - feat(telemetry): Implement in-memory metrics store (per-session, non-persistent) - feat(telemetry): Export recordPermissionDecision, recordToolUsage, getSessionMetrics - feat(mcp-manager): Add strict MCP config mode with command allowlist validation - feat(mcp-manager): Support setStrictMode() for upstream --strict-mcp-config - feat(session): Wire strictMcpConfig from settings to McpManager - feat(settings): Add strictMcpConfig option to DeepcodingSettings schema - refactor: Re-export new telemetry types from core/index.ts Upstream reference: Claude Code --strict-mcp-config flag
raymondginger2018-sudo
force-pushed
the
feat/jul26-metrics-strict-mcp
branch
from
July 31, 2026 01:15
566efa3 to
dd7b915
Compare
PR lessweb#263 修复,使 npm run check 全绿: - permissions.ts: 移除残留的 merge conflict marker (>>>>>>> 行) - exec-runner.ts: describePermissionScope switch 补 default 分支 - session.ts: 替换 no-explicit-any 类型断言 - tests: 补齐 strictMcpConfig/compressThreshold 必填字段 - vscode-ide-companion: tsconfig include core 的 sql.js.d.ts 声明 - 全部文件过 Prettier 格式
Author
|
👋 Hi maintainers, this PR has been fixed and is ready for review. Issues resolved in the latest update (7e67acd):
Status: Happy to address any feedback. Thanks! 🙏 |
Author
|
@qorzj The CI workflow for this PR is stuck in action_required -- GitHub requires a maintainer to approve running Actions on fork pull requests (main branch CI runs fine, only fork PRs need approval). All code has been verified locally (npm run check passes, no conflicts, mergeable=True). Could you please Approve and run workflows on this PR? After approval the CI will pass and the status will become clean. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds structured observability and security hardening features.
Key Changes
Structured Telemetry Metrics
Strict MCP Config Mode