@sdsrs/code-graph 0.99.0 → 0.99.1

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.
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "sdsrs"
6
6
  },
7
- "version": "0.99.0",
7
+ "version": "0.99.1",
8
8
  "keywords": [
9
9
  "code-graph",
10
10
  "ast",
@@ -309,8 +309,22 @@ function runMain() {
309
309
 
310
310
  // Only inject on hits — no-hits / unavailable / no-binary stay silent (the grep
311
311
  // already ran and produced its own output; a failed cg answer adds no value and
312
- // 0 hits ≠ proof of absence given regex-dialect differences).
313
- if (answer.status !== 'hits') return;
312
+ // 0 hits ≠ proof of absence given regex-dialect differences). But RECORD the
313
+ // skip (roadmap 2026-07-18 §1.6): without a record the funnel cannot tell
314
+ // "hook dark (binary missing)" from "ran, genuinely nothing" — the sibling
315
+ // hooks all record their non-answered paths. `fallthrough`+`reason` carry the
316
+ // status in the shapes the Rust aggregator already scores as inconclusive
317
+ // (`fallthrough:"no-hits"` / `reason:"unavailable"`); answered:false keeps it
318
+ // out of funnel arming and lands it in `inject_skipped`.
319
+ if (answer.status !== 'hits') {
320
+ recordRecommendation(root, {
321
+ hook: 'grep', action: 'inject', answered: false,
322
+ ...(pattern ? { pattern } : {}),
323
+ fallthrough: answer.status,
324
+ reason: answer.status,
325
+ });
326
+ return;
327
+ }
314
328
 
315
329
  recordRecommendation(root, {
316
330
  hook: 'grep', action: 'inject', answered: true,
@@ -376,6 +376,15 @@ function extractUnansweredTail(cmd) {
376
376
  // two lines, verbatim command so the model can re-issue without thinking.
377
377
  // Wording is path-neutral — it must stay true for BOTH the answered deny
378
378
  // ("grep half answered, tail wasn't") and the static fallback (nothing was).
379
+ // Head-line marker paired with the NOTE below: the NOTE sits at the END of a
380
+ // long deny message and Claude Code's transcript view folds long tool errors,
381
+ // so a human reading the truncated view saw a clean "answered" deny with no
382
+ // clue the compound's tail was dropped (2026-07-18: two such denies were
383
+ // misdiagnosed as product bugs). The model gets the full reason either way.
384
+ function tailFlagSuffix(tail) {
385
+ return tail ? ' (compound tail NOT run — see NOTE at end)' : '';
386
+ }
387
+
379
388
  function appendUnansweredTailNote(lines, tail) {
380
389
  if (!tail) return;
381
390
  const shown = tail.length > 300 ? tail.slice(0, 300) + '…' : tail;
@@ -538,7 +547,7 @@ function buildBlockReason(unansweredTail) {
538
547
  // permanent prefix (adopted in 8s, reused 11×, incl. on the exact identifier
539
548
  // searches this hook targets). The env opt-out stays documented in README.
540
549
  const lines = [
541
- '[code-graph] Raw `grep -rn` on indexed source — denied by code-graph hook.',
550
+ `[code-graph] Raw \`grep -rn\` on indexed source — denied by code-graph hook.${tailFlagSuffix(unansweredTail)}`,
542
551
  'Use the AST-aware equivalent (returns containing fn/module per hit, repo-wide):',
543
552
  ' code-graph-mcp grep "<pattern>" [paths...] # AST context per hit; -F literal, -i, -w, -l, -C N, --max-count 0',
544
553
  ' code-graph-mcp ast-search "<pattern>" --type fn # filter by node type',
@@ -558,7 +567,7 @@ function buildBlockReason(unansweredTail) {
558
567
  function buildBlockReasonWithAnswer(pattern, searchPath, answer, unansweredTail) {
559
568
  const cmdShown = `code-graph-mcp grep "${pattern}"${searchPath ? ` ${searchPath}` : ''}`;
560
569
  const lines = [
561
- '[code-graph] Raw `grep` on indexed source — denied; the AST-aware equivalent already ran for you:',
570
+ `[code-graph] Raw \`grep\` on indexed source — denied; the AST-aware equivalent already ran for you:${tailFlagSuffix(unansweredTail)}`,
562
571
  `$ ${cmdShown}`,
563
572
  answer.text,
564
573
  ];
@@ -584,7 +593,7 @@ function buildBlockReasonWithAnswer(pattern, searchPath, answer, unansweredTail)
584
593
  // `$ code-graph-mcp show <sym>` headers.
585
594
  function buildShowDenyReason(answer, unansweredTail) {
586
595
  const lines = [
587
- '[code-graph] Raw grep for symbol definitions — denied; here are the definitions from the AST index:',
596
+ `[code-graph] Raw grep for symbol definitions — denied; here are the definitions from the AST index:${tailFlagSuffix(unansweredTail)}`,
588
597
  answer.text,
589
598
  ];
590
599
  if (answer.truncated) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdsrs/code-graph",
3
- "version": "0.99.0",
3
+ "version": "0.99.1",
4
4
  "description": "MCP server that indexes codebases into an AST knowledge graph with semantic search, call graph traversal, and HTTP route tracing",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -36,10 +36,10 @@
36
36
  "node": ">=16"
37
37
  },
38
38
  "optionalDependencies": {
39
- "@sdsrs/code-graph-linux-x64": "0.99.0",
40
- "@sdsrs/code-graph-linux-arm64": "0.99.0",
41
- "@sdsrs/code-graph-darwin-x64": "0.99.0",
42
- "@sdsrs/code-graph-darwin-arm64": "0.99.0",
43
- "@sdsrs/code-graph-win32-x64": "0.99.0"
39
+ "@sdsrs/code-graph-linux-x64": "0.99.1",
40
+ "@sdsrs/code-graph-linux-arm64": "0.99.1",
41
+ "@sdsrs/code-graph-darwin-x64": "0.99.1",
42
+ "@sdsrs/code-graph-darwin-arm64": "0.99.1",
43
+ "@sdsrs/code-graph-win32-x64": "0.99.1"
44
44
  }
45
45
  }