@colbymchenry/codegraph-darwin-x64 0.9.4 → 0.9.5

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.
Files changed (137) hide show
  1. package/lib/dist/bin/codegraph.js +12 -0
  2. package/lib/dist/bin/codegraph.js.map +1 -1
  3. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  4. package/lib/dist/extraction/grammars.js +14 -1
  5. package/lib/dist/extraction/grammars.js.map +1 -1
  6. package/lib/dist/extraction/index.d.ts +15 -2
  7. package/lib/dist/extraction/index.d.ts.map +1 -1
  8. package/lib/dist/extraction/index.js +170 -78
  9. package/lib/dist/extraction/index.js.map +1 -1
  10. package/lib/dist/extraction/languages/index.d.ts.map +1 -1
  11. package/lib/dist/extraction/languages/index.js +2 -0
  12. package/lib/dist/extraction/languages/index.js.map +1 -1
  13. package/lib/dist/extraction/languages/objc.d.ts +3 -0
  14. package/lib/dist/extraction/languages/objc.d.ts.map +1 -0
  15. package/lib/dist/extraction/languages/objc.js +133 -0
  16. package/lib/dist/extraction/languages/objc.js.map +1 -0
  17. package/lib/dist/extraction/tree-sitter-types.d.ts +4 -0
  18. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  19. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  20. package/lib/dist/extraction/tree-sitter.js +82 -5
  21. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  22. package/lib/dist/index.d.ts +21 -2
  23. package/lib/dist/index.d.ts.map +1 -1
  24. package/lib/dist/index.js +33 -0
  25. package/lib/dist/index.js.map +1 -1
  26. package/lib/dist/installer/instructions-template.d.ts +2 -2
  27. package/lib/dist/installer/instructions-template.d.ts.map +1 -1
  28. package/lib/dist/installer/instructions-template.js +1 -1
  29. package/lib/dist/mcp/daemon-paths.d.ts +46 -0
  30. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -0
  31. package/lib/dist/mcp/daemon-paths.js +125 -0
  32. package/lib/dist/mcp/daemon-paths.js.map +1 -0
  33. package/lib/dist/mcp/daemon.d.ts +161 -0
  34. package/lib/dist/mcp/daemon.d.ts.map +1 -0
  35. package/lib/dist/mcp/daemon.js +403 -0
  36. package/lib/dist/mcp/daemon.js.map +1 -0
  37. package/lib/dist/mcp/engine.d.ts +100 -0
  38. package/lib/dist/mcp/engine.d.ts.map +1 -0
  39. package/lib/dist/mcp/engine.js +291 -0
  40. package/lib/dist/mcp/engine.js.map +1 -0
  41. package/lib/dist/mcp/index.d.ts +64 -53
  42. package/lib/dist/mcp/index.d.ts.map +1 -1
  43. package/lib/dist/mcp/index.js +307 -387
  44. package/lib/dist/mcp/index.js.map +1 -1
  45. package/lib/dist/mcp/proxy.d.ts +46 -0
  46. package/lib/dist/mcp/proxy.d.ts.map +1 -0
  47. package/lib/dist/mcp/proxy.js +276 -0
  48. package/lib/dist/mcp/proxy.js.map +1 -0
  49. package/lib/dist/mcp/server-instructions.d.ts +1 -1
  50. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  51. package/lib/dist/mcp/server-instructions.js +1 -1
  52. package/lib/dist/mcp/session.d.ts +67 -0
  53. package/lib/dist/mcp/session.d.ts.map +1 -0
  54. package/lib/dist/mcp/session.js +276 -0
  55. package/lib/dist/mcp/session.js.map +1 -0
  56. package/lib/dist/mcp/tools.d.ts +49 -0
  57. package/lib/dist/mcp/tools.d.ts.map +1 -1
  58. package/lib/dist/mcp/tools.js +239 -14
  59. package/lib/dist/mcp/tools.js.map +1 -1
  60. package/lib/dist/mcp/transport.d.ts +111 -29
  61. package/lib/dist/mcp/transport.d.ts.map +1 -1
  62. package/lib/dist/mcp/transport.js +181 -71
  63. package/lib/dist/mcp/transport.js.map +1 -1
  64. package/lib/dist/mcp/version.d.ts +19 -0
  65. package/lib/dist/mcp/version.d.ts.map +1 -0
  66. package/lib/dist/mcp/version.js +71 -0
  67. package/lib/dist/mcp/version.js.map +1 -0
  68. package/lib/dist/resolution/callback-synthesizer.d.ts +3 -2
  69. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  70. package/lib/dist/resolution/callback-synthesizer.js +274 -3
  71. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  72. package/lib/dist/resolution/frameworks/expo-modules.d.ts +3 -0
  73. package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
  74. package/lib/dist/resolution/frameworks/expo-modules.js +143 -0
  75. package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -0
  76. package/lib/dist/resolution/frameworks/fabric.d.ts +3 -0
  77. package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -0
  78. package/lib/dist/resolution/frameworks/fabric.js +354 -0
  79. package/lib/dist/resolution/frameworks/fabric.js.map +1 -0
  80. package/lib/dist/resolution/frameworks/index.d.ts +4 -0
  81. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  82. package/lib/dist/resolution/frameworks/index.js +21 -1
  83. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  84. package/lib/dist/resolution/frameworks/react-native.d.ts +3 -0
  85. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -0
  86. package/lib/dist/resolution/frameworks/react-native.js +360 -0
  87. package/lib/dist/resolution/frameworks/react-native.js.map +1 -0
  88. package/lib/dist/resolution/frameworks/swift-objc.d.ts +37 -0
  89. package/lib/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
  90. package/lib/dist/resolution/frameworks/swift-objc.js +252 -0
  91. package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -0
  92. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  93. package/lib/dist/resolution/import-resolver.js +1 -0
  94. package/lib/dist/resolution/import-resolver.js.map +1 -1
  95. package/lib/dist/resolution/swift-objc-bridge.d.ts +134 -0
  96. package/lib/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
  97. package/lib/dist/resolution/swift-objc-bridge.js +256 -0
  98. package/lib/dist/resolution/swift-objc-bridge.js.map +1 -0
  99. package/lib/dist/sync/index.d.ts +3 -1
  100. package/lib/dist/sync/index.d.ts.map +1 -1
  101. package/lib/dist/sync/index.js +7 -1
  102. package/lib/dist/sync/index.js.map +1 -1
  103. package/lib/dist/sync/watcher.d.ts +109 -7
  104. package/lib/dist/sync/watcher.d.ts.map +1 -1
  105. package/lib/dist/sync/watcher.js +215 -33
  106. package/lib/dist/sync/watcher.js.map +1 -1
  107. package/lib/dist/sync/worktree.d.ts +54 -0
  108. package/lib/dist/sync/worktree.d.ts.map +1 -0
  109. package/lib/dist/sync/worktree.js +136 -0
  110. package/lib/dist/sync/worktree.js.map +1 -0
  111. package/lib/dist/types.d.ts +1 -1
  112. package/lib/dist/types.d.ts.map +1 -1
  113. package/lib/dist/types.js +1 -0
  114. package/lib/dist/types.js.map +1 -1
  115. package/lib/node_modules/.package-lock.json +29 -1
  116. package/lib/node_modules/chokidar/LICENSE +21 -0
  117. package/lib/node_modules/chokidar/README.md +305 -0
  118. package/lib/node_modules/chokidar/esm/handler.d.ts +90 -0
  119. package/lib/node_modules/chokidar/esm/handler.js +629 -0
  120. package/lib/node_modules/chokidar/esm/index.d.ts +215 -0
  121. package/lib/node_modules/chokidar/esm/index.js +798 -0
  122. package/lib/node_modules/chokidar/esm/package.json +1 -0
  123. package/lib/node_modules/chokidar/handler.d.ts +90 -0
  124. package/lib/node_modules/chokidar/handler.js +635 -0
  125. package/lib/node_modules/chokidar/index.d.ts +215 -0
  126. package/lib/node_modules/chokidar/index.js +804 -0
  127. package/lib/node_modules/chokidar/package.json +69 -0
  128. package/lib/node_modules/readdirp/LICENSE +21 -0
  129. package/lib/node_modules/readdirp/README.md +120 -0
  130. package/lib/node_modules/readdirp/esm/index.d.ts +108 -0
  131. package/lib/node_modules/readdirp/esm/index.js +257 -0
  132. package/lib/node_modules/readdirp/esm/package.json +1 -0
  133. package/lib/node_modules/readdirp/index.d.ts +108 -0
  134. package/lib/node_modules/readdirp/index.js +263 -0
  135. package/lib/node_modules/readdirp/package.json +70 -0
  136. package/lib/package.json +2 -1
  137. package/package.json +1 -1
@@ -18,11 +18,11 @@ export declare const CODEGRAPH_SECTION_END = "<!-- CODEGRAPH_END -->";
18
18
  * instructions file. Includes the start/end markers so the section
19
19
  * can be detected and replaced on re-install.
20
20
  */
21
- export declare const INSTRUCTIONS_TEMPLATE = "<!-- CODEGRAPH_START -->\n## CodeGraph\n\nThis project has a CodeGraph MCP server (`codegraph_*` tools) configured. CodeGraph is a tree-sitter-parsed knowledge graph of every symbol, edge, and file. Reads are sub-millisecond and return structural information grep cannot.\n\n### When to prefer codegraph over native search\n\nUse codegraph for **structural** questions \u2014 what calls what, what would break, where is X defined, what is X's signature. Use native grep/read only for **literal text** queries (string contents, comments, log messages) or after you already have a specific file open.\n\n| Question | Tool |\n|---|---|\n| \"Where is X defined?\" / \"Find symbol named X\" | `codegraph_search` |\n| \"What calls function Y?\" | `codegraph_callers` |\n| \"What does Y call?\" | `codegraph_callees` |\n| \"How does X reach/become Y? / trace the flow from X to Y\" | `codegraph_trace` (one call = the whole path, incl. callback/React/JSX dynamic hops) |\n| \"What would break if I changed Z?\" | `codegraph_impact` |\n| \"Show me Y's signature / source / docstring\" | `codegraph_node` |\n| \"Give me focused context for a task/area\" | `codegraph_context` |\n| \"See several related symbols' source at once\" | `codegraph_explore` |\n| \"What files exist under path/\" | `codegraph_files` |\n| \"Is the index healthy?\" | `codegraph_status` |\n\n### Rules of thumb\n\n- **Answer directly \u2014 don't delegate exploration.** For \"how does X work\" / architecture questions, answer with 2-3 codegraph calls: `codegraph_context` first, then ONE `codegraph_explore` for the source of the symbols it surfaces. For a specific **flow** (\"how does X reach Y\") start with `codegraph_trace` from\u2192to \u2014 one call returns the whole path with dynamic hops bridged \u2014 then ONE `codegraph_explore` for the bodies; don't rebuild the path with `codegraph_search` + `codegraph_callers`. Codegraph IS the pre-built index, so spawning a separate file-reading sub-task/agent \u2014 or running a grep + read loop \u2014 repeats work codegraph already did and costs more for the same answer.\n- **Trust codegraph results.** They come from a full AST parse. Do NOT re-verify them with grep \u2014 that's slower, less accurate, and wastes context.\n- **Don't grep first** when looking up a symbol by name. `codegraph_search` is faster and returns kind + location + signature in one call.\n- **Don't chain `codegraph_search` + `codegraph_node`** when you just want context \u2014 `codegraph_context` is one call.\n- **Don't loop `codegraph_node` over many symbols** \u2014 one `codegraph_explore` call returns several symbols' source grouped in a single capped call, while each separate node/Read call re-reads the whole context and costs far more.\n- **Index lag**: the file watcher debounces ~500ms behind writes; don't re-query immediately after editing a file in the same turn.\n\n### If `.codegraph/` doesn't exist\n\nThe MCP server returns \"not initialized.\" Ask the user: *\"I notice this project doesn't have CodeGraph initialized. Want me to run `codegraph init -i` to build the index?\"*\n<!-- CODEGRAPH_END -->";
21
+ export declare const INSTRUCTIONS_TEMPLATE = "<!-- CODEGRAPH_START -->\n## CodeGraph\n\nThis project has a CodeGraph MCP server (`codegraph_*` tools) configured. CodeGraph is a tree-sitter-parsed knowledge graph of every symbol, edge, and file. Reads are sub-millisecond and return structural information grep cannot.\n\n### When to prefer codegraph over native search\n\nUse codegraph for **structural** questions \u2014 what calls what, what would break, where is X defined, what is X's signature. Use native grep/read only for **literal text** queries (string contents, comments, log messages) or after you already have a specific file open.\n\n| Question | Tool |\n|---|---|\n| \"Where is X defined?\" / \"Find symbol named X\" | `codegraph_search` |\n| \"What calls function Y?\" | `codegraph_callers` |\n| \"What does Y call?\" | `codegraph_callees` |\n| \"How does X reach/become Y? / trace the flow from X to Y\" | `codegraph_trace` (one call = the whole path, incl. callback/React/JSX dynamic hops) |\n| \"What would break if I changed Z?\" | `codegraph_impact` |\n| \"Show me Y's signature / source / docstring\" | `codegraph_node` |\n| \"Give me focused context for a task/area\" | `codegraph_context` |\n| \"See several related symbols' source at once\" | `codegraph_explore` |\n| \"What files exist under path/\" | `codegraph_files` |\n| \"Is the index healthy?\" | `codegraph_status` |\n\n### Rules of thumb\n\n- **Answer directly \u2014 don't delegate exploration.** For \"how does X work\" / architecture questions, answer with 2-3 codegraph calls: `codegraph_context` first, then ONE `codegraph_explore` for the source of the symbols it surfaces. For a specific **flow** (\"how does X reach Y\") start with `codegraph_trace` from\u2192to \u2014 one call returns the whole path with dynamic hops bridged \u2014 then ONE `codegraph_explore` for the bodies; don't rebuild the path with `codegraph_search` + `codegraph_callers`. Codegraph IS the pre-built index, so spawning a separate file-reading sub-task/agent \u2014 or running a grep + read loop \u2014 repeats work codegraph already did and costs more for the same answer.\n- **Trust codegraph results.** They come from a full AST parse. Do NOT re-verify them with grep \u2014 that's slower, less accurate, and wastes context.\n- **Don't grep first** when looking up a symbol by name. `codegraph_search` is faster and returns kind + location + signature in one call.\n- **Don't chain `codegraph_search` + `codegraph_node`** when you just want context \u2014 `codegraph_context` is one call.\n- **Don't loop `codegraph_node` over many symbols** \u2014 one `codegraph_explore` call returns several symbols' source grouped in a single capped call, while each separate node/Read call re-reads the whole context and costs far more.\n- **Index lag \u2014 check the staleness banner, don't guess a wait.** When a codegraph response starts with \"\u26A0\uFE0F Some files referenced below were edited since the last index sync\u2026\", the listed files are pending re-index \u2014 Read those specific files for accurate content. Files NOT in that banner are fresh and codegraph is authoritative for them. `codegraph_status` also lists pending files under \"Pending sync\".\n\n### If `.codegraph/` doesn't exist\n\nThe MCP server returns \"not initialized.\" Ask the user: *\"I notice this project doesn't have CodeGraph initialized. Want me to run `codegraph init -i` to build the index?\"*\n<!-- CODEGRAPH_END -->";
22
22
  /**
23
23
  * Backwards-compat alias. Existing downstream code may import
24
24
  * `CLAUDE_MD_TEMPLATE` from this module via the re-export shim in
25
25
  * `claude-md-template.ts`.
26
26
  */
27
- export declare const CLAUDE_MD_TEMPLATE = "<!-- CODEGRAPH_START -->\n## CodeGraph\n\nThis project has a CodeGraph MCP server (`codegraph_*` tools) configured. CodeGraph is a tree-sitter-parsed knowledge graph of every symbol, edge, and file. Reads are sub-millisecond and return structural information grep cannot.\n\n### When to prefer codegraph over native search\n\nUse codegraph for **structural** questions \u2014 what calls what, what would break, where is X defined, what is X's signature. Use native grep/read only for **literal text** queries (string contents, comments, log messages) or after you already have a specific file open.\n\n| Question | Tool |\n|---|---|\n| \"Where is X defined?\" / \"Find symbol named X\" | `codegraph_search` |\n| \"What calls function Y?\" | `codegraph_callers` |\n| \"What does Y call?\" | `codegraph_callees` |\n| \"How does X reach/become Y? / trace the flow from X to Y\" | `codegraph_trace` (one call = the whole path, incl. callback/React/JSX dynamic hops) |\n| \"What would break if I changed Z?\" | `codegraph_impact` |\n| \"Show me Y's signature / source / docstring\" | `codegraph_node` |\n| \"Give me focused context for a task/area\" | `codegraph_context` |\n| \"See several related symbols' source at once\" | `codegraph_explore` |\n| \"What files exist under path/\" | `codegraph_files` |\n| \"Is the index healthy?\" | `codegraph_status` |\n\n### Rules of thumb\n\n- **Answer directly \u2014 don't delegate exploration.** For \"how does X work\" / architecture questions, answer with 2-3 codegraph calls: `codegraph_context` first, then ONE `codegraph_explore` for the source of the symbols it surfaces. For a specific **flow** (\"how does X reach Y\") start with `codegraph_trace` from\u2192to \u2014 one call returns the whole path with dynamic hops bridged \u2014 then ONE `codegraph_explore` for the bodies; don't rebuild the path with `codegraph_search` + `codegraph_callers`. Codegraph IS the pre-built index, so spawning a separate file-reading sub-task/agent \u2014 or running a grep + read loop \u2014 repeats work codegraph already did and costs more for the same answer.\n- **Trust codegraph results.** They come from a full AST parse. Do NOT re-verify them with grep \u2014 that's slower, less accurate, and wastes context.\n- **Don't grep first** when looking up a symbol by name. `codegraph_search` is faster and returns kind + location + signature in one call.\n- **Don't chain `codegraph_search` + `codegraph_node`** when you just want context \u2014 `codegraph_context` is one call.\n- **Don't loop `codegraph_node` over many symbols** \u2014 one `codegraph_explore` call returns several symbols' source grouped in a single capped call, while each separate node/Read call re-reads the whole context and costs far more.\n- **Index lag**: the file watcher debounces ~500ms behind writes; don't re-query immediately after editing a file in the same turn.\n\n### If `.codegraph/` doesn't exist\n\nThe MCP server returns \"not initialized.\" Ask the user: *\"I notice this project doesn't have CodeGraph initialized. Want me to run `codegraph init -i` to build the index?\"*\n<!-- CODEGRAPH_END -->";
27
+ export declare const CLAUDE_MD_TEMPLATE = "<!-- CODEGRAPH_START -->\n## CodeGraph\n\nThis project has a CodeGraph MCP server (`codegraph_*` tools) configured. CodeGraph is a tree-sitter-parsed knowledge graph of every symbol, edge, and file. Reads are sub-millisecond and return structural information grep cannot.\n\n### When to prefer codegraph over native search\n\nUse codegraph for **structural** questions \u2014 what calls what, what would break, where is X defined, what is X's signature. Use native grep/read only for **literal text** queries (string contents, comments, log messages) or after you already have a specific file open.\n\n| Question | Tool |\n|---|---|\n| \"Where is X defined?\" / \"Find symbol named X\" | `codegraph_search` |\n| \"What calls function Y?\" | `codegraph_callers` |\n| \"What does Y call?\" | `codegraph_callees` |\n| \"How does X reach/become Y? / trace the flow from X to Y\" | `codegraph_trace` (one call = the whole path, incl. callback/React/JSX dynamic hops) |\n| \"What would break if I changed Z?\" | `codegraph_impact` |\n| \"Show me Y's signature / source / docstring\" | `codegraph_node` |\n| \"Give me focused context for a task/area\" | `codegraph_context` |\n| \"See several related symbols' source at once\" | `codegraph_explore` |\n| \"What files exist under path/\" | `codegraph_files` |\n| \"Is the index healthy?\" | `codegraph_status` |\n\n### Rules of thumb\n\n- **Answer directly \u2014 don't delegate exploration.** For \"how does X work\" / architecture questions, answer with 2-3 codegraph calls: `codegraph_context` first, then ONE `codegraph_explore` for the source of the symbols it surfaces. For a specific **flow** (\"how does X reach Y\") start with `codegraph_trace` from\u2192to \u2014 one call returns the whole path with dynamic hops bridged \u2014 then ONE `codegraph_explore` for the bodies; don't rebuild the path with `codegraph_search` + `codegraph_callers`. Codegraph IS the pre-built index, so spawning a separate file-reading sub-task/agent \u2014 or running a grep + read loop \u2014 repeats work codegraph already did and costs more for the same answer.\n- **Trust codegraph results.** They come from a full AST parse. Do NOT re-verify them with grep \u2014 that's slower, less accurate, and wastes context.\n- **Don't grep first** when looking up a symbol by name. `codegraph_search` is faster and returns kind + location + signature in one call.\n- **Don't chain `codegraph_search` + `codegraph_node`** when you just want context \u2014 `codegraph_context` is one call.\n- **Don't loop `codegraph_node` over many symbols** \u2014 one `codegraph_explore` call returns several symbols' source grouped in a single capped call, while each separate node/Read call re-reads the whole context and costs far more.\n- **Index lag \u2014 check the staleness banner, don't guess a wait.** When a codegraph response starts with \"\u26A0\uFE0F Some files referenced below were edited since the last index sync\u2026\", the listed files are pending re-index \u2014 Read those specific files for accurate content. Files NOT in that banner are fresh and codegraph is authoritative for them. `codegraph_status` also lists pending files under \"Pending sync\".\n\n### If `.codegraph/` doesn't exist\n\nThe MCP server returns \"not initialized.\" Ask the user: *\"I notice this project doesn't have CodeGraph initialized. Want me to run `codegraph init -i` to build the index?\"*\n<!-- CODEGRAPH_END -->";
28
28
  //# sourceMappingURL=instructions-template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions-template.d.ts","sourceRoot":"","sources":["../../src/installer/instructions-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,uBAAuB,6BAA6B,CAAC;AAClE,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,yjGAkCT,CAAC;AAE1B;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,yjGAAwB,CAAC"}
1
+ {"version":3,"file":"instructions-template.d.ts","sourceRoot":"","sources":["../../src/installer/instructions-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,uBAAuB,6BAA6B,CAAC;AAClE,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,y2GAkCT,CAAC;AAE1B;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,y2GAAwB,CAAC"}
@@ -50,7 +50,7 @@ Use codegraph for **structural** questions — what calls what, what would break
50
50
  - **Don't grep first** when looking up a symbol by name. \`codegraph_search\` is faster and returns kind + location + signature in one call.
51
51
  - **Don't chain \`codegraph_search\` + \`codegraph_node\`** when you just want context — \`codegraph_context\` is one call.
52
52
  - **Don't loop \`codegraph_node\` over many symbols** — one \`codegraph_explore\` call returns several symbols' source grouped in a single capped call, while each separate node/Read call re-reads the whole context and costs far more.
53
- - **Index lag**: the file watcher debounces ~500ms behind writes; don't re-query immediately after editing a file in the same turn.
53
+ - **Index lag check the staleness banner, don't guess a wait.** When a codegraph response starts with "⚠️ Some files referenced below were edited since the last index sync…", the listed files are pending re-index Read those specific files for accurate content. Files NOT in that banner are fresh and codegraph is authoritative for them. \`codegraph_status\` also lists pending files under "Pending sync".
54
54
 
55
55
  ### If \`.codegraph/\` doesn't exist
56
56
 
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Daemon socket + lockfile path helpers — issue #411.
3
+ *
4
+ * One shared `codegraph serve --mcp` daemon per project root means we need a
5
+ * stable, project-keyed rendezvous between cooperating processes. The IPC
6
+ * surface area is just two file paths:
7
+ *
8
+ * - `daemon.sock` — Unix domain socket / named pipe the daemon listens on.
9
+ * - `daemon.pid` — atomic-create lockfile holding the daemon's pid + version.
10
+ *
11
+ * Both live under `.codegraph/` so the project-scoped uninstall (`codegraph
12
+ * uninit`) sweeps them up for free.
13
+ *
14
+ * Special-case: Unix domain socket paths have a hard length limit (~104 on
15
+ * macOS, ~108 on Linux); when the in-project path exceeds it we fall back to
16
+ * an absolute-path hash under `os.tmpdir()`. The pidfile always stays in the
17
+ * project (it doesn't have a length limit) — and acts as the authoritative
18
+ * pointer to the socket path the daemon chose.
19
+ */
20
+ /**
21
+ * Compute the socket / named-pipe path the daemon should listen on (and the
22
+ * proxy should connect to) for `projectRoot`. Deterministic given a project
23
+ * root, so independent processes converge without coordination.
24
+ */
25
+ export declare function getDaemonSocketPath(projectRoot: string): string;
26
+ /** Absolute path to the daemon pid lockfile for `projectRoot`. */
27
+ export declare function getDaemonPidPath(projectRoot: string): string;
28
+ /** Structured contents of the pid lockfile. */
29
+ export interface DaemonLockInfo {
30
+ pid: number;
31
+ version: string;
32
+ socketPath: string;
33
+ startedAt: number;
34
+ }
35
+ /**
36
+ * Serialize a {@link DaemonLockInfo} for writing to the pidfile. JSON for
37
+ * human readability — operators occasionally `cat` this when debugging.
38
+ */
39
+ export declare function encodeLockInfo(info: DaemonLockInfo): string;
40
+ /**
41
+ * Parse a pidfile body. Tolerant of old-format pidfiles (plain decimal pid) so
42
+ * a 0.10.x daemon doesn't trip over a 0.9.x lockfile if that ever happens —
43
+ * we treat such a lockfile as "process is unknown version, refuse to share."
44
+ */
45
+ export declare function decodeLockInfo(raw: string): DaemonLockInfo | null;
46
+ //# sourceMappingURL=daemon-paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daemon-paths.d.ts","sourceRoot":"","sources":["../../src/mcp/daemon-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAeH;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAS/D;AAED,kEAAkE;AAClE,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,+CAA+C;AAC/C,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAuBjE"}
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ /**
3
+ * Daemon socket + lockfile path helpers — issue #411.
4
+ *
5
+ * One shared `codegraph serve --mcp` daemon per project root means we need a
6
+ * stable, project-keyed rendezvous between cooperating processes. The IPC
7
+ * surface area is just two file paths:
8
+ *
9
+ * - `daemon.sock` — Unix domain socket / named pipe the daemon listens on.
10
+ * - `daemon.pid` — atomic-create lockfile holding the daemon's pid + version.
11
+ *
12
+ * Both live under `.codegraph/` so the project-scoped uninstall (`codegraph
13
+ * uninit`) sweeps them up for free.
14
+ *
15
+ * Special-case: Unix domain socket paths have a hard length limit (~104 on
16
+ * macOS, ~108 on Linux); when the in-project path exceeds it we fall back to
17
+ * an absolute-path hash under `os.tmpdir()`. The pidfile always stays in the
18
+ * project (it doesn't have a length limit) — and acts as the authoritative
19
+ * pointer to the socket path the daemon chose.
20
+ */
21
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ var desc = Object.getOwnPropertyDescriptor(m, k);
24
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
25
+ desc = { enumerable: true, get: function() { return m[k]; } };
26
+ }
27
+ Object.defineProperty(o, k2, desc);
28
+ }) : (function(o, m, k, k2) {
29
+ if (k2 === undefined) k2 = k;
30
+ o[k2] = m[k];
31
+ }));
32
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
33
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
34
+ }) : function(o, v) {
35
+ o["default"] = v;
36
+ });
37
+ var __importStar = (this && this.__importStar) || (function () {
38
+ var ownKeys = function(o) {
39
+ ownKeys = Object.getOwnPropertyNames || function (o) {
40
+ var ar = [];
41
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
42
+ return ar;
43
+ };
44
+ return ownKeys(o);
45
+ };
46
+ return function (mod) {
47
+ if (mod && mod.__esModule) return mod;
48
+ var result = {};
49
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
50
+ __setModuleDefault(result, mod);
51
+ return result;
52
+ };
53
+ })();
54
+ Object.defineProperty(exports, "__esModule", { value: true });
55
+ exports.getDaemonSocketPath = getDaemonSocketPath;
56
+ exports.getDaemonPidPath = getDaemonPidPath;
57
+ exports.encodeLockInfo = encodeLockInfo;
58
+ exports.decodeLockInfo = decodeLockInfo;
59
+ const crypto = __importStar(require("crypto"));
60
+ const os = __importStar(require("os"));
61
+ const path = __importStar(require("path"));
62
+ const directory_1 = require("../directory");
63
+ /** Soft upper bound for in-project socket paths. */
64
+ const POSIX_SOCKET_PATH_LIMIT = 100;
65
+ /** Short stable identifier for a project root — used in tmpdir/pipe names. */
66
+ function projectHash(projectRoot) {
67
+ return crypto.createHash('sha256').update(path.resolve(projectRoot)).digest('hex').slice(0, 16);
68
+ }
69
+ /**
70
+ * Compute the socket / named-pipe path the daemon should listen on (and the
71
+ * proxy should connect to) for `projectRoot`. Deterministic given a project
72
+ * root, so independent processes converge without coordination.
73
+ */
74
+ function getDaemonSocketPath(projectRoot) {
75
+ if (process.platform === 'win32') {
76
+ return `\\\\.\\pipe\\codegraph-${projectHash(projectRoot)}`;
77
+ }
78
+ const inProject = path.join((0, directory_1.getCodeGraphDir)(projectRoot), 'daemon.sock');
79
+ if (inProject.length <= POSIX_SOCKET_PATH_LIMIT)
80
+ return inProject;
81
+ // Long project paths (deep monorepos, Bazel out dirs) need tmpdir fallback
82
+ // or `bind` returns EADDRINUSE / ENAMETOOLONG. Hash keeps it project-scoped.
83
+ return path.join(os.tmpdir(), `codegraph-${projectHash(projectRoot)}.sock`);
84
+ }
85
+ /** Absolute path to the daemon pid lockfile for `projectRoot`. */
86
+ function getDaemonPidPath(projectRoot) {
87
+ return path.join((0, directory_1.getCodeGraphDir)(projectRoot), 'daemon.pid');
88
+ }
89
+ /**
90
+ * Serialize a {@link DaemonLockInfo} for writing to the pidfile. JSON for
91
+ * human readability — operators occasionally `cat` this when debugging.
92
+ */
93
+ function encodeLockInfo(info) {
94
+ return JSON.stringify(info, null, 2) + '\n';
95
+ }
96
+ /**
97
+ * Parse a pidfile body. Tolerant of old-format pidfiles (plain decimal pid) so
98
+ * a 0.10.x daemon doesn't trip over a 0.9.x lockfile if that ever happens —
99
+ * we treat such a lockfile as "process is unknown version, refuse to share."
100
+ */
101
+ function decodeLockInfo(raw) {
102
+ const trimmed = raw.trim();
103
+ if (!trimmed)
104
+ return null;
105
+ try {
106
+ const parsed = JSON.parse(trimmed);
107
+ if (parsed &&
108
+ typeof parsed.pid === 'number' &&
109
+ typeof parsed.version === 'string' &&
110
+ typeof parsed.socketPath === 'string' &&
111
+ typeof parsed.startedAt === 'number') {
112
+ return parsed;
113
+ }
114
+ return null;
115
+ }
116
+ catch {
117
+ // Fall through to legacy plain-pid handling.
118
+ }
119
+ const pid = Number(trimmed);
120
+ if (Number.isFinite(pid) && pid > 0) {
121
+ return { pid, version: 'unknown', socketPath: '', startedAt: 0 };
122
+ }
123
+ return null;
124
+ }
125
+ //# sourceMappingURL=daemon-paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daemon-paths.js","sourceRoot":"","sources":["../../src/mcp/daemon-paths.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBH,kDASC;AAGD,4CAEC;AAcD,wCAEC;AAOD,wCAuBC;AA9ED,+CAAiC;AACjC,uCAAyB;AACzB,2CAA6B;AAC7B,4CAA+C;AAE/C,oDAAoD;AACpD,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAEpC,8EAA8E;AAC9E,SAAS,WAAW,CAAC,WAAmB;IACtC,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClG,CAAC;AAED;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,WAAmB;IACrD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,OAAO,0BAA0B,WAAW,CAAC,WAAW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AG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC5B,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;QACpC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACnE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,161 @@
1
+ /**
2
+ * Shared MCP daemon — issue #411.
3
+ *
4
+ * One detached `codegraph serve --mcp` daemon process per project root,
5
+ * accepting N concurrent MCP clients over a Unix-domain socket (or named pipe
6
+ * on Windows). Each incoming connection gets its own {@link MCPSession}; all
7
+ * sessions share a single {@link MCPEngine}, which means a single file watcher
8
+ * (one inotify set), a single SQLite connection (one WAL writer), and a single
9
+ * tree-sitter warm-up — paid once, amortized across every agent talking to the
10
+ * project.
11
+ *
12
+ * Lifecycle (see also `./index.ts` and `./proxy.ts`):
13
+ * - The daemon is spawned **detached** (its own session/process group, stdio
14
+ * decoupled) by the first launcher that finds no daemon running. It is NOT
15
+ * a child of any MCP host, so closing one terminal / Ctrl-C'ing one session
16
+ * can't take it down and sever the others. That's why this process has no
17
+ * PPID watchdog: it deliberately outlives every individual client.
18
+ * - Every MCP host talks to the daemon through a thin `proxy` process (the
19
+ * thing the host actually spawned). The proxy keeps the #277 PPID watchdog,
20
+ * so a SIGKILL'd host still reaps its proxy promptly; the proxy's socket
21
+ * close then decrements the daemon's refcount.
22
+ * - When the last client disconnects the daemon lingers for
23
+ * `CODEGRAPH_DAEMON_IDLE_TIMEOUT_MS` (default 300s) so back-to-back agent
24
+ * runs in the same project don't repay startup, then exits cleanly. This is
25
+ * what keeps a single-agent session from leaking a daemon forever (#277).
26
+ *
27
+ * What this file owns:
28
+ * - Listening on the daemon socket and spawning per-connection sessions.
29
+ * - The handshake "hello" line that lets a proxy verify it found a
30
+ * same-version daemon before piping any JSON-RPC through it.
31
+ * - The lockfile (`.codegraph/daemon.pid`) competing daemons arbitrate
32
+ * against — atomic `O_EXCL` create with the full record written in the same
33
+ * breath (no empty-file window) + cleanup on exit.
34
+ * - Reference counting + idle timeout.
35
+ * - Graceful shutdown on SIGTERM/SIGINT and idle exit.
36
+ *
37
+ * What this file does NOT own:
38
+ * - The proxy side (`./proxy.ts`).
39
+ * - The decision of *whether* to run as daemon at all — that's `MCPServer`.
40
+ * - The MCP protocol state machine — that's `./session.ts`.
41
+ */
42
+ import { DaemonLockInfo } from './daemon-paths';
43
+ /** Bytes/parse-window for an oversized hello line — bounded against a malicious peer. */
44
+ declare const MAX_HELLO_LINE_BYTES = 4096;
45
+ /**
46
+ * Wire format for the one-shot hello line the daemon emits on every new
47
+ * connection. Versioned with the package's own semver so a 0.9.x proxy never
48
+ * pipes through a 0.10.x daemon (or vice-versa) — the proxy falls back to
49
+ * direct mode on mismatch rather than risk subtle wire incompatibilities.
50
+ */
51
+ export interface DaemonHello {
52
+ codegraph: string;
53
+ pid: number;
54
+ socketPath: string;
55
+ protocol: 1;
56
+ }
57
+ export interface DaemonStartResult {
58
+ /** Always-non-null for a successfully-started daemon. */
59
+ socketPath: string;
60
+ /** Lockfile contents as written. */
61
+ lock: DaemonLockInfo;
62
+ }
63
+ /**
64
+ * Run as the shared daemon for `projectRoot`. Resolves once the socket is
65
+ * listening. The Daemon owns the socket, the engine, and the lockfile until
66
+ * `stop()` is called or it exits on idle/signal.
67
+ *
68
+ * Race-safe: callers must first call `tryAcquireDaemonLock(projectRoot)` and
69
+ * only construct a Daemon if they got the lock (`kind: 'acquired'`). The atomic
70
+ * `O_EXCL` create inside the acquire helper — which now also writes the full
71
+ * record before returning — is the only synchronization between competing
72
+ * daemons.
73
+ */
74
+ export declare class Daemon {
75
+ private projectRoot;
76
+ private server;
77
+ private clients;
78
+ private idleTimer;
79
+ private idleTimeoutMs;
80
+ private engine;
81
+ private stopping;
82
+ private socketPath;
83
+ private pidPath;
84
+ constructor(projectRoot: string, opts?: {
85
+ idleTimeoutMs?: number;
86
+ });
87
+ /**
88
+ * Bind the socket, kick off engine init, and register signal handlers. The
89
+ * lockfile body was already written atomically by `tryAcquireDaemonLock`, so
90
+ * there is nothing to write here. The promise resolves once the server is
91
+ * listening — the daemon then sticks around until idle/shutdown.
92
+ */
93
+ start(): Promise<DaemonStartResult>;
94
+ /** Currently-connected client count. Exposed for tests / status output. */
95
+ getClientCount(): number;
96
+ /** The socket path the daemon is (or will be) listening on. */
97
+ getSocketPath(): string;
98
+ /** Graceful shutdown: close all sessions, the engine, and clean up the lock. */
99
+ stop(reason?: string): Promise<void>;
100
+ private handleConnection;
101
+ private dropClient;
102
+ private armIdleTimer;
103
+ private disarmIdleTimer;
104
+ private cleanupLockfile;
105
+ }
106
+ /**
107
+ * Result of `tryAcquireDaemonLock`. Either we got the lockfile (caller becomes
108
+ * the daemon), or it already existed (caller should connect to the existing
109
+ * daemon as a proxy, or — if the holder is dead — clear it and retry).
110
+ */
111
+ export type AcquireResult = {
112
+ kind: 'acquired';
113
+ pidPath: string;
114
+ info: DaemonLockInfo;
115
+ } | {
116
+ kind: 'taken';
117
+ existing: DaemonLockInfo | null;
118
+ pidPath: string;
119
+ };
120
+ /**
121
+ * Atomically create the daemon pidfile with its full record already in place.
122
+ * Returns either an `acquired` result (the caller is the daemon-elect and may
123
+ * construct a {@link Daemon}) or a `taken` result.
124
+ *
125
+ * must-fix 1 (issue #411 review): the lockfile must appear in ONE atomic step,
126
+ * already complete — never empty, even momentarily. The first attempt at this
127
+ * (`O_EXCL` create then a separate `writeSync`) left a microsecond window where
128
+ * the file existed but was empty; under concurrent daemon startup a third
129
+ * candidate could read that empty file, decode it as `null`, and `unlink` the
130
+ * winner's lock → two daemons (two watchers, two writers). The window was
131
+ * normally too small to hit, but the chokidar watcher's extra startup time made
132
+ * concurrent daemons overlap enough to reproduce it reliably.
133
+ *
134
+ * The fix writes the complete record to a private temp file, then hard-links it
135
+ * into place: `link()` is atomic AND exclusive (EEXIST if the target exists), so
136
+ * the pidfile becomes visible in one step already containing a full record.
137
+ * Whoever links first wins; everyone else gets EEXIST and reads a complete file.
138
+ * There is no empty-file window at all.
139
+ */
140
+ export declare function tryAcquireDaemonLock(projectRoot: string): AcquireResult;
141
+ /**
142
+ * Remove a stale pidfile, but only if it still names a dead process. Re-reads
143
+ * the file immediately before unlinking so we never delete a lock that a live
144
+ * daemon (re)acquired in the meantime.
145
+ *
146
+ * must-fix 1 (issue #411 review): the original unconditionally `unlink`'d,
147
+ * which let a racing candidate delete a healthy daemon's lock. Passing
148
+ * `expectedDeadPid` (the pid the caller believed was dead) makes the clear a
149
+ * compare-and-delete: bail if the file now holds a different pid, or any live
150
+ * pid. Returns true when the stale lock is gone (or was already gone).
151
+ */
152
+ export declare function clearStaleDaemonLock(pidPath: string, expectedDeadPid?: number): boolean;
153
+ /**
154
+ * Probe whether `pid` is currently alive (signal-0). Treats EPERM as alive on
155
+ * every platform (the process exists, it's just not ours to signal) so we never
156
+ * mistake a live daemon for a dead one and clear its lock.
157
+ */
158
+ export declare function isProcessAlive(pid: number): boolean;
159
+ /** Exported for test stubs that need to bound the hello-line read. */
160
+ export { MAX_HELLO_LINE_BYTES };
161
+ //# sourceMappingURL=daemon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../../src/mcp/daemon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAQH,OAAO,EACL,cAAc,EAKf,MAAM,gBAAgB,CAAC;AAMxB,yFAAyF;AACzF,QAAA,MAAM,oBAAoB,OAAO,CAAC;AAElC;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,CAAC,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,yD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