@routinecrew/routinecode 2.31.55 → 2.31.57
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.
- package/bin/prompt-vault.js +1 -1
- package/bin/rc-credit-turn.js +30 -10
- package/bin/rc-login.js +19 -1
- package/bin/setup.js +1 -1
- package/hooks/hooks-config.json +31 -4
- package/hooks/lib/anchors.json +523 -126
- package/hooks/lib/attest_reader.py +695 -0
- package/hooks/lib/cc-surface.json +71 -0
- package/hooks/lib/cc_compat_scan.py +321 -0
- package/hooks/lib/completion_log.py +130 -0
- package/hooks/lib/evidence.py +12 -0
- package/hooks/lib/secret_filter.py +17 -1
- package/hooks/post-edit-track.sh +35 -5
- package/hooks/post-tool-universal.sh +6 -0
- package/hooks/pre-account-guard.sh +8 -0
- package/hooks/pre-agent-spawn.mjs +1 -1
- package/hooks/pre-credit-guard.sh +12 -1
- package/hooks/pre-edit-snapshot.sh +29 -0
- package/hooks/pre-mark-complete.sh +170 -72
- package/hooks/session-start.sh +109 -5
- package/hooks/stop-claim-check.v3.sh +81 -0
- package/hooks/tests/gate-integration.test.sh +183 -2
- package/hooks/tests/mcp-name-wiring.test.sh +64 -0
- package/hooks/tests/stop-autoproceed.test.sh +60 -0
- package/mcp-db-manager/dist/analyzers/duplicate-detector.js +1 -1
- package/mcp-db-manager/dist/core/model-parser.js +1 -1
- package/mcp-db-manager/dist/core/schema-reader.js +1 -1
- package/mcp-db-manager/dist/executors/migration-executor.js +1 -1
- package/mcp-db-manager/dist/generators/migration-generator.js +1 -1
- package/mcp-db-manager/dist/index.js +1 -1
- package/mcp-db-manager/dist/validators/schema-validator.js +1 -1
- package/mcp-dev-tester/dist/analyzers/auth-diagnoser.js +1 -1
- package/mcp-dev-tester/dist/analyzers/backend-analyzer.js +1 -1
- package/mcp-dev-tester/dist/analyzers/endpoint-diagnoser.js +1 -1
- package/mcp-dev-tester/dist/analyzers/frontend-analyzer.js +1 -1
- package/mcp-dev-tester/dist/analyzers/runtime-diagnoser.js +1 -1
- package/mcp-dev-tester/dist/analyzers/type-comparator.js +1 -1
- package/mcp-dev-tester/dist/analyzers/validation-diagnoser.js +1 -1
- package/mcp-dev-tester/dist/attestation.d.ts +36 -0
- package/mcp-dev-tester/dist/attestation.d.ts.map +1 -0
- package/mcp-dev-tester/dist/attestation.js +1 -0
- package/mcp-dev-tester/dist/browser/playwright-manager.js +1 -1
- package/mcp-dev-tester/dist/browser/ui-tester.js +1 -1
- package/mcp-dev-tester/dist/config/project-config.js +1 -1
- package/mcp-dev-tester/dist/index.js +1 -1
- package/mcp-dev-tester/dist/testers/api-tester.js +1 -1
- package/mcp-doc-fetcher/dist/index.js +1 -1
- package/mcp-html-renderer/dist/index.js +1 -1
- package/mcp-html-renderer/dist/preview.js +1 -1
- package/mcp-html-renderer/dist/template-engine.js +1 -1
- package/mcp-intelligence/dist/concept-catalog.js +1 -1
- package/mcp-intelligence/dist/concept-server-proxy.js +1 -1
- package/mcp-intelligence/dist/config-auth.js +1 -1
- package/mcp-intelligence/dist/contracts.generated.js +1 -1
- package/mcp-intelligence/dist/domain-templates.js +1 -1
- package/mcp-intelligence/dist/grounding.js +1 -1
- package/mcp-intelligence/dist/handlers.js +1 -1
- package/mcp-intelligence/dist/index.js +1 -1
- package/mcp-intelligence/dist/intelligence-file.js +1 -1
- package/mcp-intelligence/dist/knowledge-critic.js +1 -1
- package/mcp-intelligence/dist/knowledge-handlers.js +1 -1
- package/mcp-intelligence/dist/mention-extractor.js +1 -1
- package/mcp-intelligence/dist/provenance.js +1 -1
- package/mcp-intelligence/dist/semantic-embedder.js +1 -1
- package/mcp-log-watcher/dist/config-auth.js +1 -1
- package/mcp-log-watcher/dist/file-watcher.js +1 -1
- package/mcp-log-watcher/dist/index.js +1 -1
- package/mcp-log-watcher/dist/known-solutions.js +1 -1
- package/mcp-log-watcher/dist/log-store.js +1 -1
- package/mcp-log-watcher/dist/websocket-server.js +1 -1
- package/mcp-plan-manager/dist/__tests__/plan-parser.test.js +1 -1
- package/mcp-plan-manager/dist/file-ops.js +1 -1
- package/mcp-plan-manager/dist/index.js +1 -1
- package/mcp-plan-manager/dist/plan-parser.js +1 -1
- package/mcp-project-context/dist/git-ops.js +1 -1
- package/mcp-project-context/dist/index.js +1 -1
- package/mcp-project-context/dist/project-analysis.js +1 -1
- package/mcp-routinecode/dist/agent-tracker.js +1 -1
- package/mcp-routinecode/dist/attestation.d.ts +37 -0
- package/mcp-routinecode/dist/attestation.js +1 -0
- package/mcp-routinecode/dist/blast-radius.js +1 -1
- package/mcp-routinecode/dist/changeset.d.ts +86 -0
- package/mcp-routinecode/dist/changeset.js +1 -0
- package/mcp-routinecode/dist/config-auth.js +1 -1
- package/mcp-routinecode/dist/contracts.generated.js +1 -1
- package/mcp-routinecode/dist/coverage.d.ts +49 -0
- package/mcp-routinecode/dist/coverage.js +1 -0
- package/mcp-routinecode/dist/explorer-advisor.js +1 -1
- package/mcp-routinecode/dist/failure-tracker.js +1 -1
- package/mcp-routinecode/dist/file-lock-registry.js +1 -1
- package/mcp-routinecode/dist/file-risk-scorer.js +1 -1
- package/mcp-routinecode/dist/index.js +1 -1
- package/mcp-routinecode/dist/known-solutions.js +1 -1
- package/mcp-routinecode/dist/ledger-miner.js +1 -1
- package/mcp-routinecode/dist/observed-draft.js +1 -1
- package/mcp-routinecode/dist/pattern-matcher.js +1 -1
- package/mcp-routinecode/dist/route-match.d.ts +24 -0
- package/mcp-routinecode/dist/route-match.js +1 -0
- package/mcp-routinecode/dist/routines.d.ts +1 -0
- package/mcp-routinecode/dist/routines.js +1 -1
- package/mcp-routinecode/dist/rule-engine.js +1 -1
- package/mcp-routinecode/dist/rule-promoter.js +1 -1
- package/mcp-routinecode/dist/telemetry-analyzer.js +1 -1
- package/mcp-routinecode/dist/test-runner.d.ts +66 -0
- package/mcp-routinecode/dist/test-runner.js +1 -0
- package/mcp-routinecode/dist/verification.d.ts +65 -0
- package/mcp-routinecode/dist/verification.js +0 -0
- package/mcp-routinecode/dist/viral-loop.js +1 -1
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"note": "routinecode가 의존하는 Claude Code 계약 표면. cc_compat_scan.py가 CHANGELOG 엔트리를 keywords로 매칭한다. severity_default는 키워드-only 추정이며 L2 reviewer가 override한다. 평문 유지(관측·탐지 전용, 게이트 로직 아님).",
|
|
4
|
+
"surfaces": [
|
|
5
|
+
{
|
|
6
|
+
"id": "hooks.events",
|
|
7
|
+
"keywords": ["sessionstart", "pretooluse", "posttooluse", "userpromptsubmit", "stop hook", "hook event", "hook matcher", "notification hook", "subagentstop", "precompact"],
|
|
8
|
+
"affects": ["hooks/*.sh", "hooks/hooks-config.json"],
|
|
9
|
+
"severity_default": "breaking",
|
|
10
|
+
"probe": "hook_input_schema"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "hooks.output_contract",
|
|
14
|
+
"keywords": ["systemmessage", "permissiondecision", "decision block", "hook output", "continue:false", "continue false", "hookspecificoutput", "additionalcontext", "suppressoutput"],
|
|
15
|
+
"affects": ["hooks/session-start.sh", "hooks/pre-credit-guard.sh", "hooks/pre-edit-check.sh", "hooks/pre-agent-spawn.sh", "hooks/pre-webfetch-guard.sh", "hooks/pre-secret-guard.sh"],
|
|
16
|
+
"severity_default": "breaking",
|
|
17
|
+
"probe": "hook_output_accepted"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "mcp.tool_naming",
|
|
21
|
+
"keywords": ["mcp__", "mcp tool", "tool name", "server prefix", "mcp server name"],
|
|
22
|
+
"affects": ["mcp-routinecode/src", "mcp-project-context/src", "plugin/routinecode-prompt.md"],
|
|
23
|
+
"severity_default": "breaking",
|
|
24
|
+
"probe": "mcp_alive_toolcount"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "mcp.protocol",
|
|
28
|
+
"keywords": ["mcp protocol", "modelcontextprotocol", "stdio transport", "mcp version", "mcp spec", "mcp sdk", "elicitation", "mcp resources"],
|
|
29
|
+
"affects": ["mcp-routinecode/package.json"],
|
|
30
|
+
"severity_default": "watch"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "agent.subagent_type",
|
|
34
|
+
"keywords": ["subagent_type", "agent tool", "subagent", "agent type", "task tool", "spawn agent"],
|
|
35
|
+
"affects": ["plugin/agents/*.md", "plugin/routinecode-prompt.md"],
|
|
36
|
+
"severity_default": "breaking",
|
|
37
|
+
"probe": "agent_registry"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "agent.definition_format",
|
|
41
|
+
"keywords": ["agent frontmatter", "agent definition", ".claude/agents", "agent md", "agent description"],
|
|
42
|
+
"affects": ["plugin/agents/*.md"],
|
|
43
|
+
"severity_default": "watch"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "trust.permissions",
|
|
47
|
+
"keywords": ["permission mode", "allowedtools", "settings.json", "trust", "sandbox", "bypasspermissions", "acceptedits", "permissions schema"],
|
|
48
|
+
"affects": ["bin/setup.js", "hooks/hooks-config.json"],
|
|
49
|
+
"severity_default": "watch",
|
|
50
|
+
"probe": "settings_schema"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "plugin.marketplace",
|
|
54
|
+
"keywords": ["plugin marketplace", "plugin install", "marketplace", "plugin registry", "/plugin"],
|
|
55
|
+
"affects": ["bin/setup.js"],
|
|
56
|
+
"severity_default": "breaking"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "skill.commands",
|
|
60
|
+
"keywords": ["slash command", "skill", "/command", "custom command", "skill frontmatter"],
|
|
61
|
+
"affects": ["plugin/commands", "plugin/skills"],
|
|
62
|
+
"severity_default": "info"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "update.mechanism",
|
|
66
|
+
"keywords": ["auto-update", "autoupdates", "claude update", "native installer", "installation method", "migrate installer"],
|
|
67
|
+
"affects": ["hooks/session-start.sh", "bin/setup.js"],
|
|
68
|
+
"severity_default": "watch"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Claude Code Compatibility Watch — scanner (L0 detect / L1 full).
|
|
3
|
+
|
|
4
|
+
평문 유지(관측·탐지 전용). 외부 의존 0 (stdlib urllib only).
|
|
5
|
+
|
|
6
|
+
--detect-only : 네트워크 0·token 0. running CC 버전 변화 탐지 + 캐시된 latestCC 대비 'behind' 판정.
|
|
7
|
+
변화/behind 있으면 1줄 메시지를 stdout 으로 방출(session-start 가 MESSAGES 에 합침).
|
|
8
|
+
--full : CHANGELOG fetch → lastVerified..running 엔트리를 cc-surface.json 키워드와 매칭.
|
|
9
|
+
무적중 → verified 승격. 적중 → pendingDelta + pending-triage. 백그라운드 전용.
|
|
10
|
+
|
|
11
|
+
상태 파일: ~/.routinecode/cc-compat.json (config.json 과 분리 — 재프로비저닝 시 유실 방지).
|
|
12
|
+
"""
|
|
13
|
+
import json
|
|
14
|
+
import os
|
|
15
|
+
import re
|
|
16
|
+
import sys
|
|
17
|
+
import time
|
|
18
|
+
import hashlib
|
|
19
|
+
import urllib.request
|
|
20
|
+
import urllib.error
|
|
21
|
+
|
|
22
|
+
HOME = os.path.expanduser("~")
|
|
23
|
+
STATE_PATH = os.path.join(HOME, ".routinecode", "cc-compat.json")
|
|
24
|
+
SURFACE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "cc-surface.json")
|
|
25
|
+
|
|
26
|
+
CHANGELOG_RAW = "https://raw.githubusercontent.com/anthropics/claude-code/main/CHANGELOG.md"
|
|
27
|
+
RELEASES_API = "https://api.github.com/repos/anthropics/claude-code/releases?per_page=30"
|
|
28
|
+
|
|
29
|
+
VER_RE = re.compile(r"(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.]+))?")
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def parse_ver(s):
|
|
33
|
+
if not s:
|
|
34
|
+
return None
|
|
35
|
+
m = VER_RE.search(s)
|
|
36
|
+
if not m:
|
|
37
|
+
return None
|
|
38
|
+
return (int(m.group(1)), int(m.group(2)), int(m.group(3)), m.group(4) or "")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def ver_tuple_cmp(a, b):
|
|
42
|
+
"""semver 비교. prerelease(-xxx)는 동일 x.y.z 에서 release 보다 낮게."""
|
|
43
|
+
if a is None or b is None:
|
|
44
|
+
return 0
|
|
45
|
+
base = ((a[0], a[1], a[2]), (b[0], b[1], b[2]))
|
|
46
|
+
if base[0] != base[1]:
|
|
47
|
+
return -1 if base[0] < base[1] else 1
|
|
48
|
+
# 같은 x.y.z: prerelease < release
|
|
49
|
+
ap, bp = a[3], b[3]
|
|
50
|
+
if ap == bp:
|
|
51
|
+
return 0
|
|
52
|
+
if ap == "":
|
|
53
|
+
return 1 # release > prerelease
|
|
54
|
+
if bp == "":
|
|
55
|
+
return -1
|
|
56
|
+
return -1 if ap < bp else 1
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def is_prerelease(s):
|
|
60
|
+
v = parse_ver(s)
|
|
61
|
+
return bool(v and v[3])
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def load_json(path, default):
|
|
65
|
+
try:
|
|
66
|
+
with open(path) as f:
|
|
67
|
+
return json.load(f)
|
|
68
|
+
except Exception:
|
|
69
|
+
return default
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def atomic_write(path, obj):
|
|
73
|
+
try:
|
|
74
|
+
d = os.path.dirname(path)
|
|
75
|
+
os.makedirs(d, exist_ok=True)
|
|
76
|
+
tmp = path + ".tmp"
|
|
77
|
+
with open(tmp, "w") as f:
|
|
78
|
+
json.dump(obj, f, indent=2, ensure_ascii=False)
|
|
79
|
+
os.replace(tmp, path)
|
|
80
|
+
os.chmod(path, 0o600)
|
|
81
|
+
except Exception:
|
|
82
|
+
pass
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def load_state():
|
|
86
|
+
return load_json(STATE_PATH, {})
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def surface_hash():
|
|
90
|
+
try:
|
|
91
|
+
with open(SURFACE_PATH, "rb") as f:
|
|
92
|
+
return "sha256:" + hashlib.sha256(f.read()).hexdigest()[:16]
|
|
93
|
+
except Exception:
|
|
94
|
+
return ""
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def running_cc():
|
|
98
|
+
return os.environ.get("CC_VER", "").strip()
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
# ---------------- detect-only (network 0) ----------------
|
|
102
|
+
def detect_only():
|
|
103
|
+
cc = running_cc()
|
|
104
|
+
if not parse_ver(cc):
|
|
105
|
+
return "" # 버전 모름 → 무음
|
|
106
|
+
st = load_state()
|
|
107
|
+
msgs = []
|
|
108
|
+
changed = False
|
|
109
|
+
|
|
110
|
+
# 최초 실행: 현 CC 를 호환으로 신뢰(오탐 방지)
|
|
111
|
+
if not st:
|
|
112
|
+
st = {
|
|
113
|
+
"lastVerified": cc, "lastSeen": cc, "latestCC": "",
|
|
114
|
+
"state": "verified", "ccBehind": False,
|
|
115
|
+
"pendingDelta": [], "suppress": [],
|
|
116
|
+
"surfaceRegistryHash": surface_hash(),
|
|
117
|
+
"lastScanAt": None, "backoffUntil": None,
|
|
118
|
+
}
|
|
119
|
+
atomic_write(STATE_PATH, st)
|
|
120
|
+
return ""
|
|
121
|
+
|
|
122
|
+
last_seen = st.get("lastSeen", "")
|
|
123
|
+
last_verified = st.get("lastVerified", "")
|
|
124
|
+
|
|
125
|
+
# running 버전 변화 탐지
|
|
126
|
+
if cc != last_seen:
|
|
127
|
+
st["lastSeen"] = cc
|
|
128
|
+
changed = True
|
|
129
|
+
# 레지스트리 자체가 바뀌었으면 재검증 강제
|
|
130
|
+
reg = surface_hash()
|
|
131
|
+
reg_changed = reg and reg != st.get("surfaceRegistryHash")
|
|
132
|
+
if reg_changed:
|
|
133
|
+
st["surfaceRegistryHash"] = reg
|
|
134
|
+
if cc != last_verified or reg_changed:
|
|
135
|
+
st["state"] = "detected"
|
|
136
|
+
msgs.append(f"Claude Code {cc} detected — compatibility scan queued")
|
|
137
|
+
else:
|
|
138
|
+
st["state"] = "verified" # 이전에 검증한 바로 그 버전으로 되돌아옴
|
|
139
|
+
|
|
140
|
+
# 미해결 pending 재방출(유실 방지)
|
|
141
|
+
state = st.get("state")
|
|
142
|
+
if not changed and state in ("pending-triage", "pending-fix"):
|
|
143
|
+
n = len(st.get("pendingDelta", []))
|
|
144
|
+
if state == "pending-fix":
|
|
145
|
+
msgs.append(f"⚠ CC {st.get('lastSeen')} BREAKING: {n} surface change(s) — run compatibility fix (/rc)")
|
|
146
|
+
else:
|
|
147
|
+
msgs.append(f"⚠ CC {st.get('lastSeen')}: {n} integration-surface change(s) need review (/rc)")
|
|
148
|
+
|
|
149
|
+
# 캐시된 latestCC 대비 behind 판정(네트워크 0)
|
|
150
|
+
latest = st.get("latestCC", "")
|
|
151
|
+
behind = bool(latest and ver_tuple_cmp(parse_ver(cc), parse_ver(latest)) < 0)
|
|
152
|
+
st["ccBehind"] = behind
|
|
153
|
+
if behind:
|
|
154
|
+
msgs.append(f"Claude Code update available: {cc} → {latest} (run: claude update)")
|
|
155
|
+
|
|
156
|
+
if changed or st.get("ccBehind") != behind:
|
|
157
|
+
atomic_write(STATE_PATH, st)
|
|
158
|
+
|
|
159
|
+
return " | ".join(msgs)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
# ---------------- full scan (background, network) ----------------
|
|
163
|
+
def fetch(url, timeout=6, accept=None):
|
|
164
|
+
headers = {"User-Agent": "routinecode-ccw"}
|
|
165
|
+
if accept:
|
|
166
|
+
headers["Accept"] = accept
|
|
167
|
+
req = urllib.request.Request(url, headers=headers)
|
|
168
|
+
with urllib.request.urlopen(req, timeout=timeout) as r:
|
|
169
|
+
return r.read().decode("utf-8", "replace")
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def parse_changelog(md):
|
|
173
|
+
"""'## x.y.z' 헤더 기준으로 {version: body} 반환. 헤더 못 찾으면 None(포맷 변경 신호)."""
|
|
174
|
+
blocks = {}
|
|
175
|
+
cur = None
|
|
176
|
+
buf = []
|
|
177
|
+
header_re = re.compile(r"^#{1,3}\s+v?(\d+\.\d+\.\d+(?:-[0-9A-Za-z.]+)?)")
|
|
178
|
+
for line in md.splitlines():
|
|
179
|
+
m = header_re.match(line.strip())
|
|
180
|
+
if m:
|
|
181
|
+
if cur:
|
|
182
|
+
blocks[cur] = "\n".join(buf)
|
|
183
|
+
cur = m.group(1)
|
|
184
|
+
buf = []
|
|
185
|
+
elif cur:
|
|
186
|
+
buf.append(line)
|
|
187
|
+
if cur:
|
|
188
|
+
blocks[cur] = "\n".join(buf)
|
|
189
|
+
return blocks if blocks else None
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def gather_entries():
|
|
193
|
+
"""(versions_blocks, latest_version). CHANGELOG → releases API 폴백."""
|
|
194
|
+
try:
|
|
195
|
+
md = fetch(CHANGELOG_RAW)
|
|
196
|
+
blocks = parse_changelog(md)
|
|
197
|
+
if blocks:
|
|
198
|
+
latest = max(blocks.keys(), key=lambda v: parse_ver(v) or (0, 0, 0, ""))
|
|
199
|
+
return blocks, latest, "changelog"
|
|
200
|
+
except Exception:
|
|
201
|
+
pass
|
|
202
|
+
# fallback: releases API
|
|
203
|
+
try:
|
|
204
|
+
data = json.loads(fetch(RELEASES_API, accept="application/vnd.github+json"))
|
|
205
|
+
blocks = {}
|
|
206
|
+
for rel in data:
|
|
207
|
+
tag = rel.get("tag_name") or rel.get("name") or ""
|
|
208
|
+
v = parse_ver(tag)
|
|
209
|
+
if v:
|
|
210
|
+
key = "%d.%d.%d" % (v[0], v[1], v[2])
|
|
211
|
+
if v[3]:
|
|
212
|
+
key += "-" + v[3]
|
|
213
|
+
blocks[key] = (rel.get("body") or "")
|
|
214
|
+
if blocks:
|
|
215
|
+
latest = max(blocks.keys(), key=lambda v: parse_ver(v) or (0, 0, 0, ""))
|
|
216
|
+
return blocks, latest, "releases"
|
|
217
|
+
except Exception:
|
|
218
|
+
pass
|
|
219
|
+
return None, None, None
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def match_surfaces(text):
|
|
223
|
+
surf = load_json(SURFACE_PATH, {}).get("surfaces", [])
|
|
224
|
+
low = text.lower()
|
|
225
|
+
hits = []
|
|
226
|
+
for s in surf:
|
|
227
|
+
for kw in s.get("keywords", []):
|
|
228
|
+
if kw.lower() in low:
|
|
229
|
+
hits.append({"surface": s["id"], "severity": s.get("severity_default", "watch"),
|
|
230
|
+
"keyword": kw, "affects": s.get("affects", [])})
|
|
231
|
+
break
|
|
232
|
+
return hits
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def full_scan():
|
|
236
|
+
cc = running_cc()
|
|
237
|
+
if not parse_ver(cc):
|
|
238
|
+
return
|
|
239
|
+
st = load_state()
|
|
240
|
+
if not st:
|
|
241
|
+
detect_only()
|
|
242
|
+
st = load_state()
|
|
243
|
+
|
|
244
|
+
now = time.time()
|
|
245
|
+
if st.get("backoffUntil") and now < st["backoffUntil"]:
|
|
246
|
+
return
|
|
247
|
+
|
|
248
|
+
blocks, latest, source = gather_entries()
|
|
249
|
+
if blocks is None:
|
|
250
|
+
# 포맷 변경/네트워크 실패 — fail-open, 백오프 후 재시도. 상태 안 올림.
|
|
251
|
+
st["backoffUntil"] = now + 6 * 3600
|
|
252
|
+
st["lastScanAt"] = now
|
|
253
|
+
atomic_write(STATE_PATH, st)
|
|
254
|
+
return
|
|
255
|
+
|
|
256
|
+
if latest:
|
|
257
|
+
st["latestCC"] = latest
|
|
258
|
+
st["ccBehind"] = ver_tuple_cmp(parse_ver(cc), parse_ver(latest)) < 0
|
|
259
|
+
|
|
260
|
+
last_verified = st.get("lastVerified", cc)
|
|
261
|
+
lv = parse_ver(last_verified)
|
|
262
|
+
cv = parse_ver(cc)
|
|
263
|
+
|
|
264
|
+
# lastVerified < v <= running 구간 엔트리 수집
|
|
265
|
+
delta = []
|
|
266
|
+
suppress = set(st.get("suppress", []))
|
|
267
|
+
for ver, body in blocks.items():
|
|
268
|
+
pv = parse_ver(ver)
|
|
269
|
+
if pv is None:
|
|
270
|
+
continue
|
|
271
|
+
if ver_tuple_cmp(pv, lv) <= 0:
|
|
272
|
+
continue
|
|
273
|
+
if ver_tuple_cmp(pv, cv) > 0:
|
|
274
|
+
continue # 아직 설치 안 된 미래 버전
|
|
275
|
+
if is_prerelease(ver):
|
|
276
|
+
continue # prerelease 는 WATCH 전용, 승격 트리거 제외
|
|
277
|
+
for h in match_surfaces(body):
|
|
278
|
+
key = f"{ver}:{h['surface']}"
|
|
279
|
+
if key in suppress:
|
|
280
|
+
continue
|
|
281
|
+
line = ""
|
|
282
|
+
for ln in body.splitlines():
|
|
283
|
+
if h["keyword"].lower() in ln.lower():
|
|
284
|
+
line = ln.strip()[:200]
|
|
285
|
+
break
|
|
286
|
+
delta.append({"version": ver, "surface": h["surface"],
|
|
287
|
+
"severity": h["severity"], "keyword": h["keyword"],
|
|
288
|
+
"affects": h["affects"], "line": line})
|
|
289
|
+
|
|
290
|
+
st["lastScanAt"] = now
|
|
291
|
+
st["backoffUntil"] = None
|
|
292
|
+
st["surfaceRegistryHash"] = surface_hash()
|
|
293
|
+
|
|
294
|
+
if delta:
|
|
295
|
+
st["pendingDelta"] = delta
|
|
296
|
+
has_breaking = any(d["severity"] == "breaking" for d in delta)
|
|
297
|
+
st["state"] = "pending-fix" if has_breaking else "pending-triage"
|
|
298
|
+
else:
|
|
299
|
+
# 구간에 표면 적중 없음 → 호환 검증 통과
|
|
300
|
+
st["pendingDelta"] = []
|
|
301
|
+
st["lastVerified"] = cc
|
|
302
|
+
st["state"] = "verified"
|
|
303
|
+
|
|
304
|
+
atomic_write(STATE_PATH, st)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
def main():
|
|
308
|
+
mode = sys.argv[1] if len(sys.argv) > 1 else "--detect-only"
|
|
309
|
+
try:
|
|
310
|
+
if mode == "--full":
|
|
311
|
+
full_scan()
|
|
312
|
+
else:
|
|
313
|
+
out = detect_only()
|
|
314
|
+
if out:
|
|
315
|
+
sys.stdout.write(out)
|
|
316
|
+
except Exception:
|
|
317
|
+
pass # fail-open: CCW 는 절대 세션을 방해하지 않는다
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
if __name__ == "__main__":
|
|
321
|
+
main()
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"""Completion log — 결함 유출률(escaped-defect rate) 실측의 원천 기록.
|
|
2
|
+
|
|
3
|
+
mark_task_complete 가 허용될 때마다 1행 append:
|
|
4
|
+
{v, taskId, ts(ms), tier, score, forcedPass, dims, files, preEditFailure, hadFailure}
|
|
5
|
+
|
|
6
|
+
- preEditFailure: 이 태스크 창에서 **첫 편집 전에** 이미 빌드/테스트 실패 attestation 이 있었는가
|
|
7
|
+
= "시작 시점 코드가 깨져 있었다" → 이 태스크가 고친 파일을 이전에 완료 처리한 태스크의 결함 유출 신호.
|
|
8
|
+
- 판정(유출 여부)은 mcp-routinecode verification.ts escapedDefectReport 가 수행.
|
|
9
|
+
fail-open: 어떤 오류도 게이트 판정에 영향을 주지 않는다.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import json
|
|
13
|
+
import os
|
|
14
|
+
import sys
|
|
15
|
+
import time
|
|
16
|
+
|
|
17
|
+
_HERE = os.path.dirname(os.path.abspath(__file__))
|
|
18
|
+
if _HERE not in sys.path:
|
|
19
|
+
sys.path.insert(0, _HERE)
|
|
20
|
+
|
|
21
|
+
WINDOW_MS = 7 * 24 * 3600 * 1000
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _kdir():
|
|
25
|
+
return os.environ.get('ROUTINECODE_KNOWLEDGE_DIR') or os.path.join(
|
|
26
|
+
os.path.expanduser('~'), '.routinecode', 'knowledge')
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _last_ts(log_path):
|
|
30
|
+
try:
|
|
31
|
+
with open(log_path, 'rb') as f:
|
|
32
|
+
f.seek(0, 2)
|
|
33
|
+
size = f.tell()
|
|
34
|
+
f.seek(max(0, size - 8192))
|
|
35
|
+
tail = f.read().decode('utf-8', 'ignore').strip().split('\n')
|
|
36
|
+
for line in reversed(tail):
|
|
37
|
+
try:
|
|
38
|
+
return int(json.loads(line).get('ts') or 0)
|
|
39
|
+
except Exception:
|
|
40
|
+
continue
|
|
41
|
+
except Exception:
|
|
42
|
+
pass
|
|
43
|
+
return 0
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _first_edit_ms(since_ms, files):
|
|
47
|
+
try:
|
|
48
|
+
from ledger_reader import query_evidence
|
|
49
|
+
rows = query_evidence(categories=['code_change'], since_ts_ns=since_ms * 1_000_000, limit=5000)
|
|
50
|
+
except Exception:
|
|
51
|
+
return None
|
|
52
|
+
fs = set(files)
|
|
53
|
+
ts = [r.get('ts_ns', 0) // 1_000_000 for r in rows
|
|
54
|
+
if not fs or (r.get('payload') or {}).get('file') in fs]
|
|
55
|
+
ts = [t for t in ts if t > 0]
|
|
56
|
+
return min(ts) if ts else None
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def record_completion(task_id, tier, tracker_path):
|
|
60
|
+
now = int(time.time() * 1000)
|
|
61
|
+
kdir = _kdir()
|
|
62
|
+
vdir = os.path.join(kdir, 'verification')
|
|
63
|
+
log_path = os.path.join(vdir, 'completions.jsonl')
|
|
64
|
+
|
|
65
|
+
files = []
|
|
66
|
+
try:
|
|
67
|
+
files = [f for f in json.load(open(tracker_path)).get('files', []) if isinstance(f, str)]
|
|
68
|
+
except Exception:
|
|
69
|
+
pass
|
|
70
|
+
|
|
71
|
+
prev = max(_last_ts(log_path), now - WINDOW_MS)
|
|
72
|
+
|
|
73
|
+
score = None
|
|
74
|
+
forced = False
|
|
75
|
+
dims = None
|
|
76
|
+
try:
|
|
77
|
+
v = json.load(open(os.path.join(vdir, f'development-{task_id}.json')))
|
|
78
|
+
from attest_reader import verify_state
|
|
79
|
+
if not verify_state(v):
|
|
80
|
+
raise ValueError('unsigned score file') # 위조 점수로 유출률 밴드 오염 방지
|
|
81
|
+
score = v.get('currentScore')
|
|
82
|
+
forced = bool(v.get('forcedPass'))
|
|
83
|
+
auto = [i for i in v.get('iterations', []) if i.get('autoScored')]
|
|
84
|
+
if auto:
|
|
85
|
+
dims = auto[-1].get('dimensions')
|
|
86
|
+
except Exception:
|
|
87
|
+
pass
|
|
88
|
+
|
|
89
|
+
# None = 판정 불가(ledger 없음) — 유출률 집계에서 unknown 으로 분리 (False 로 과소집계 방지)
|
|
90
|
+
pre_edit_failure = None
|
|
91
|
+
had_failure = False
|
|
92
|
+
try:
|
|
93
|
+
from attest_reader import read_attestations
|
|
94
|
+
dirs = {os.path.realpath(os.path.dirname(f)) for f in files}
|
|
95
|
+
|
|
96
|
+
def related(pd):
|
|
97
|
+
if not pd or not dirs:
|
|
98
|
+
return True
|
|
99
|
+
pd = os.path.realpath(pd)
|
|
100
|
+
return any(d == pd or d.startswith(pd + os.sep) or pd.startswith(d + os.sep) for d in dirs)
|
|
101
|
+
|
|
102
|
+
# 이 태스크가 고친 파일과 관련된 프로젝트의 실패만 (다른 레포 실패 혼입 방지)
|
|
103
|
+
fails = [a for a in read_attestations(since_ms=prev, kinds=['build', 'tests', 'typecheck'])
|
|
104
|
+
if a.get('success') is False and related(a.get('projectDir'))]
|
|
105
|
+
had_failure = bool(fails)
|
|
106
|
+
first_edit = _first_edit_ms(prev, files)
|
|
107
|
+
if first_edit is not None:
|
|
108
|
+
# 실행 시작 시각 기준 (ts 는 종료 시각)
|
|
109
|
+
pre_edit_failure = any(int((a.get('detail') or {}).get('startedAt') or a.get('ts', 0)) < first_edit for a in fails)
|
|
110
|
+
except Exception:
|
|
111
|
+
pass
|
|
112
|
+
|
|
113
|
+
row = {
|
|
114
|
+
'v': 1, 'taskId': task_id, 'ts': now, 'tier': tier,
|
|
115
|
+
'score': score, 'forcedPass': forced, 'dims': dims, 'files': files[:200],
|
|
116
|
+
'preEditFailure': pre_edit_failure, 'hadFailure': had_failure,
|
|
117
|
+
}
|
|
118
|
+
try:
|
|
119
|
+
os.makedirs(vdir, exist_ok=True)
|
|
120
|
+
with open(log_path, 'a', encoding='utf-8') as f:
|
|
121
|
+
f.write(json.dumps(row, ensure_ascii=False) + '\n')
|
|
122
|
+
except Exception:
|
|
123
|
+
pass
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
if __name__ == '__main__':
|
|
127
|
+
try:
|
|
128
|
+
record_completion(sys.argv[1], sys.argv[2], sys.argv[3])
|
|
129
|
+
except Exception:
|
|
130
|
+
pass
|
package/hooks/lib/evidence.py
CHANGED
|
@@ -168,6 +168,16 @@ BASH_COMMAND_DOMAIN = [
|
|
|
168
168
|
(re.compile(r'\bgh\s+pr\s+create\b', re.IGNORECASE), 'pr_create'),
|
|
169
169
|
]
|
|
170
170
|
|
|
171
|
+
def normalize_mcp_tool_name(name):
|
|
172
|
+
"""mcp__mcp-project-context__x → mcp__project_context__x (서버키 'mcp-*' 등록 세션 호환)."""
|
|
173
|
+
if isinstance(name, str) and name.startswith('mcp__mcp-'):
|
|
174
|
+
rest = name[len('mcp__mcp-'):]
|
|
175
|
+
srv, sep, tool = rest.partition('__')
|
|
176
|
+
if sep:
|
|
177
|
+
return 'mcp__' + srv.replace('-', '_') + '__' + tool
|
|
178
|
+
return name
|
|
179
|
+
|
|
180
|
+
|
|
171
181
|
# MCP tool name → domain mapping (언어 무관)
|
|
172
182
|
MCP_TOOL_DOMAIN = {
|
|
173
183
|
'mcp__routinecode__build_check': 'build_ok',
|
|
@@ -205,6 +215,8 @@ def _transcript_tool_evidence(entries, last_user_idx, last_asst_idx):
|
|
|
205
215
|
tool_input = block.get('input', {})
|
|
206
216
|
|
|
207
217
|
# MCP 도구는 이름만으로도 증거 승격 가능
|
|
218
|
+
# 대화형 세션 도구명 mcp__mcp-routinecode__x → 정규형 mcp__routinecode__x
|
|
219
|
+
tool_name = normalize_mcp_tool_name(tool_name)
|
|
208
220
|
if tool_name in MCP_TOOL_DOMAIN:
|
|
209
221
|
tool_id_to_domain[tool_id] = MCP_TOOL_DOMAIN[tool_name]
|
|
210
222
|
continue
|
|
@@ -292,6 +292,8 @@ CORE_PROTECTED_COMMAND_PATTERNS = [
|
|
|
292
292
|
# dd if=CORE / stdin redirect read (python3 - < file, node < file)
|
|
293
293
|
r'\bdd\s+[^|&;]*\bif=[^|&;]*routinecode[/\\](?:hooks|plugin|mcp-[\w.-]+|engine)',
|
|
294
294
|
r'(?:python3?|node|bash|sh|ruby|perl)\b[^|&;]*<\s*[^|&;]*routinecode[/\\](?:hooks|plugin|mcp-[\w.-]+[/\\]dist|engine)',
|
|
295
|
+
# 검증 증거(attestation) 위조 차단 — 서버가 직접 실행한 결과만 점수가 된다.
|
|
296
|
+
r'\bappendAttestation\b|\battestations\.jsonl\b|\battest[/\\]\.key\b',
|
|
295
297
|
]
|
|
296
298
|
|
|
297
299
|
|
|
@@ -1033,7 +1035,17 @@ def _core_path_verdict(path: str, policy: Policy) -> Tuple[bool, Optional[str]]:
|
|
|
1033
1035
|
matched = any(fnmatch.fnmatch(t, norm_rule) for t in targets) or \
|
|
1034
1036
|
any(fnmatch.fnmatch(b, norm_rule) for b in basenames)
|
|
1035
1037
|
if matched:
|
|
1036
|
-
|
|
1038
|
+
# 소스 CORE(hooks/plugin/engine): dev opt-in 또는 dev-소스 타깃이면 완화(개발자 무마찰).
|
|
1039
|
+
# 런타임 config CORE(~/.routinecode/*.json): 명시 dev 모드(_dev_mode)에서만 완화.
|
|
1040
|
+
# 근거 — 오너는 자기 셸에서 이 파일을 직접 읽으므로 에이전트 차단이 '방어하는 것이 없고'
|
|
1041
|
+
# 마찰만 만든다. _dev_mode()는 ROUTINECODE_DEV=1 ∧ 가드가 full-source 체크아웃에서
|
|
1042
|
+
# 실행 중일 때만 참(위조 불가 → dist 설치본 고객은 계속 하드블록). 완화해도 apiKey 등
|
|
1043
|
+
# 실제 시크릿 '값'은 값-스크럽 계층(redact_known_values/redact_path_values)이 API 전송
|
|
1044
|
+
# 전에 지우므로 유출 없음 → "참조·수정 허용, 값 노출 차단"으로 강등.
|
|
1045
|
+
if _is_runtime_config_rule(rule):
|
|
1046
|
+
if _dev_mode():
|
|
1047
|
+
continue
|
|
1048
|
+
elif _dev_mode() or _is_dev_source_path(real):
|
|
1037
1049
|
continue
|
|
1038
1050
|
return True, rule
|
|
1039
1051
|
return False, None
|
|
@@ -1046,6 +1058,10 @@ def _core_command_verdict(cmd: str, policy: Policy) -> Tuple[bool, Optional[str]
|
|
|
1046
1058
|
for raw_pat in policy.core_commands:
|
|
1047
1059
|
try:
|
|
1048
1060
|
if re.search(raw_pat, cmd, re.IGNORECASE):
|
|
1061
|
+
# .routinecode/ 리터럴을 건드리는 bash 명령은 dev 모드여도 계속 차단한다.
|
|
1062
|
+
# 이유: 값-스크럽(collect_protected_values)이 **-glob(.routinecode/*.json)을
|
|
1063
|
+
# 성능상 건너뛰어 bash stdout 에는 apiKey 백스톱이 없다. Read 는
|
|
1064
|
+
# redact_path_values(읽은 경로)가 값을 지우므로 path 쪽만 완화한다.
|
|
1049
1065
|
if _dev and not _touches_cfg:
|
|
1050
1066
|
continue
|
|
1051
1067
|
return True, raw_pat
|
package/hooks/post-edit-track.sh
CHANGED
|
@@ -6,13 +6,18 @@
|
|
|
6
6
|
# Phase 1 Sprint 2 (v2.11.0): Evidence Ledger dual-write 추가.
|
|
7
7
|
# Legacy edit-tracker.json 유지 + 새 ledger에도 기록.
|
|
8
8
|
|
|
9
|
-
INPUT=$(cat)
|
|
10
9
|
_HOOK_LIB_DIR="$(cd "$(dirname "$0")/lib" 2>/dev/null && pwd)"
|
|
10
|
+
# 입력은 임시 파일로 — 환경변수는 1MB 초과 Write 페이로드에서 E2BIG(조용한 미기록)
|
|
11
|
+
_RC_IN=$(mktemp "${TMPDIR:-/tmp}/rc-edit-XXXXXX") || exit 0
|
|
12
|
+
cat > "$_RC_IN"
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
import sys, os, json, hashlib
|
|
14
|
+
ROUTINECODE_HOOK_INPUT_FILE="$_RC_IN" _HOOK_LIB_DIR="$_HOOK_LIB_DIR" python3 - <<'PYEOF' 2>/dev/null
|
|
15
|
+
import sys, os, json, hashlib, time
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
try:
|
|
18
|
+
raw = open(os.environ.get('ROUTINECODE_HOOK_INPUT_FILE', ''), encoding='utf-8').read()
|
|
19
|
+
except Exception:
|
|
20
|
+
raw = ''
|
|
16
21
|
try:
|
|
17
22
|
inp = json.loads(raw)
|
|
18
23
|
except Exception:
|
|
@@ -31,7 +36,8 @@ tool_name = inp.get('tool_name', 'Edit')
|
|
|
31
36
|
session_id = inp.get('session_id') or 'unknown'
|
|
32
37
|
|
|
33
38
|
# ─── Legacy tracker (persistent path) ────────────────────────────
|
|
34
|
-
|
|
39
|
+
# 채점 MCP(ROUTINECODE_KNOWLEDGE_DIR)와 같은 위치에 기록
|
|
40
|
+
TRACKER_PATH = os.path.join(os.environ.get('ROUTINECODE_KNOWLEDGE_DIR') or os.path.expanduser('~/.routinecode/knowledge'), 'edit-tracker.json')
|
|
35
41
|
os.makedirs(os.path.dirname(TRACKER_PATH), exist_ok=True)
|
|
36
42
|
if file_path:
|
|
37
43
|
t = {'files': []}
|
|
@@ -44,6 +50,29 @@ if file_path:
|
|
|
44
50
|
t = {'files': []}
|
|
45
51
|
if file_path not in t['files']:
|
|
46
52
|
t['files'].append(file_path)
|
|
53
|
+
# 파일별 마지막 편집 시각(ms) — 채점기가 태스크 창(마지막 완료 이후)만 변경 집합으로 본다
|
|
54
|
+
if not isinstance(t.get('ts'), dict):
|
|
55
|
+
t['ts'] = {}
|
|
56
|
+
t['ts'][file_path] = int(time.time() * 1000)
|
|
57
|
+
# first = 태스크 창에서의 최초 편집 (덮어쓰지 않음) — 기준선 판정의 "첫 편집 전" 기준
|
|
58
|
+
if not isinstance(t.get('first'), dict):
|
|
59
|
+
t['first'] = {}
|
|
60
|
+
t['first'].setdefault(file_path, t['ts'][file_path])
|
|
61
|
+
# 태스크 창 시작 시점의 HEAD (레포별, 최초 1회) — 기준선/설정조작 판정의 기준 커밋.
|
|
62
|
+
# 커미터 날짜는 위조 가능하므로 시각이 아니라 sha 로 고정한다.
|
|
63
|
+
# 기준 HEAD 우선순위: task-heads.json(직전 완료·세션 시작 시점 기록) → 현재 HEAD.
|
|
64
|
+
try:
|
|
65
|
+
_lib = os.environ.get('_HOOK_LIB_DIR', '')
|
|
66
|
+
if _lib not in sys.path:
|
|
67
|
+
sys.path.insert(0, _lib)
|
|
68
|
+
from attest_reader import task_head_for
|
|
69
|
+
top, sha = task_head_for(os.path.dirname(file_path))
|
|
70
|
+
if top and sha:
|
|
71
|
+
if not isinstance(t.get('heads'), dict):
|
|
72
|
+
t['heads'] = {}
|
|
73
|
+
t['heads'].setdefault(top, sha)
|
|
74
|
+
except Exception:
|
|
75
|
+
pass
|
|
47
76
|
try:
|
|
48
77
|
json.dump(t, open(TRACKER_PATH, 'w'))
|
|
49
78
|
except Exception:
|
|
@@ -94,3 +123,4 @@ except Exception as e:
|
|
|
94
123
|
|
|
95
124
|
print('{"continue":true}')
|
|
96
125
|
PYEOF
|
|
126
|
+
rm -f "$_RC_IN"
|
|
@@ -29,6 +29,12 @@ TOOL_TO_SUBCATEGORY = {
|
|
|
29
29
|
'Glob': 'glob_match',
|
|
30
30
|
'Read': 'file_read',
|
|
31
31
|
}
|
|
32
|
+
# 대화형 세션 도구명 mcp__mcp-plan-manager__x → 정규형 mcp__plan_manager__x
|
|
33
|
+
if tool_name.startswith('mcp__mcp-'):
|
|
34
|
+
_rest = tool_name[len('mcp__mcp-'):]
|
|
35
|
+
_srv, _sep, _tool = _rest.partition('__')
|
|
36
|
+
if _sep:
|
|
37
|
+
tool_name = 'mcp__' + _srv.replace('-', '_') + '__' + _tool
|
|
32
38
|
subcategory = TOOL_TO_SUBCATEGORY.get(tool_name)
|
|
33
39
|
is_mcp_tool = tool_name.startswith('mcp__')
|
|
34
40
|
if not subcategory and not is_mcp_tool:
|