Commit 256589b
fix(auto-config): include all 14 tools in PERPLEXITY-MCP rules block
The auto-managed PERPLEXITY-MCP-START/END block in CLAUDE.md,
AGENTS.md, GEMINI.md, and other rules-format IDE targets listed only
10 tools. The mcp-server actually registers 14 tools in
packages/mcp-server/src/tools.ts. Missing from the rules block:
- perplexity_export (tools.ts:647)
- perplexity_sync_cloud (tools.ts:687)
- perplexity_hydrate_cloud_entry (tools.ts:720)
- perplexity_doctor (tools.ts:852)
The fix is in the WRITER source -- hand-edits to the .md files would
just be re-overwritten on the next "Configure for All" run. Approach:
extracted the tool catalog into a new exported PERPLEXITY_TOOL_CATALOG
constant (still hardcoded -- adding the 4 missing entries -- but now
data instead of inline strings) and rewrote getPerplexityRulesContent
to render the bullet list from it. Also exported
getPerplexityRulesContent so tests can call it directly.
A dynamic-from-tools.ts approach was considered but rejected because
tools.ts imports the MCP SDK and heavy native deps that would pollute
the extension typecheck path. Instead, the new test parses tools.ts
with a regex (enabledTools\.has\("(perplexity_[a-z_]+)"\)) at test
time and asserts the catalog matches the registered set -- preventing
future drift without runtime coupling between the extension and
mcp-server packages.
Tests added (packages/extension/tests/auto-config.tool-catalog.test.ts,
7 assertions):
- registered-count sanity floor (>= 14)
- every-registered-in-catalog (the staleness check)
- no-phantom-tools in catalog
- no-duplicates in catalog
- every-name-in-rendered-block
- marker-pair wraps the block correctly
- every-summary non-empty
Validation:
- npm run typecheck: clean across 4 packages.
- npm run build: clean.
- npm run test:coverage: 119 files / 1037 pass / 2 skip / 0 fail
(full count includes Slice 3's tests committed in 0a003f3).
NOTE: the impl agent self-reported a `git stash` baseline-check
during execution and reversed it via `stash pop`. The post-pop
worktree was independently verified by the parent before this
commit -- only the two scoped files are modified, and gates pass
cleanly.
The CLAUDE.md / AGENTS.md / GEMINI.md files in users' workspaces
will pick up the new tool entries on their next "Configure for All"
invocation. No action required by users beyond running that command.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c2c5f45 commit 256589b
2 files changed
Lines changed: 126 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1260 | 1260 | | |
1261 | 1261 | | |
1262 | 1262 | | |
1263 | | - | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
1264 | 1298 | | |
1265 | 1299 | | |
1266 | 1300 | | |
1267 | 1301 | | |
1268 | 1302 | | |
1269 | 1303 | | |
1270 | | - | |
1271 | | - | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
1278 | | - | |
1279 | | - | |
| 1304 | + | |
1280 | 1305 | | |
1281 | 1306 | | |
1282 | 1307 | | |
| |||
Lines changed: 90 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
0 commit comments