@colbymchenry/codegraph-darwin-arm64 0.9.4 → 0.9.6

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 (199) 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/db/queries.d.ts +1 -0
  4. package/lib/dist/db/queries.d.ts.map +1 -1
  5. package/lib/dist/db/queries.js +31 -3
  6. package/lib/dist/db/queries.js.map +1 -1
  7. package/lib/dist/extraction/grammars.d.ts +1 -1
  8. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  9. package/lib/dist/extraction/grammars.js +29 -1
  10. package/lib/dist/extraction/grammars.js.map +1 -1
  11. package/lib/dist/extraction/index.d.ts +15 -2
  12. package/lib/dist/extraction/index.d.ts.map +1 -1
  13. package/lib/dist/extraction/index.js +170 -78
  14. package/lib/dist/extraction/index.js.map +1 -1
  15. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  16. package/lib/dist/extraction/languages/c-cpp.js +45 -0
  17. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  18. package/lib/dist/extraction/languages/csharp.d.ts.map +1 -1
  19. package/lib/dist/extraction/languages/csharp.js +2 -1
  20. package/lib/dist/extraction/languages/csharp.js.map +1 -1
  21. package/lib/dist/extraction/languages/go.d.ts.map +1 -1
  22. package/lib/dist/extraction/languages/go.js +12 -0
  23. package/lib/dist/extraction/languages/go.js.map +1 -1
  24. package/lib/dist/extraction/languages/index.d.ts.map +1 -1
  25. package/lib/dist/extraction/languages/index.js +2 -0
  26. package/lib/dist/extraction/languages/index.js.map +1 -1
  27. package/lib/dist/extraction/languages/objc.d.ts +3 -0
  28. package/lib/dist/extraction/languages/objc.d.ts.map +1 -0
  29. package/lib/dist/extraction/languages/objc.js +133 -0
  30. package/lib/dist/extraction/languages/objc.js.map +1 -0
  31. package/lib/dist/extraction/mybatis-extractor.d.ts +48 -0
  32. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -0
  33. package/lib/dist/extraction/mybatis-extractor.js +198 -0
  34. package/lib/dist/extraction/mybatis-extractor.js.map +1 -0
  35. package/lib/dist/extraction/tree-sitter-types.d.ts +4 -0
  36. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  37. package/lib/dist/extraction/tree-sitter.d.ts +33 -0
  38. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  39. package/lib/dist/extraction/tree-sitter.js +351 -14
  40. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  41. package/lib/dist/index.d.ts +21 -2
  42. package/lib/dist/index.d.ts.map +1 -1
  43. package/lib/dist/index.js +53 -1
  44. package/lib/dist/index.js.map +1 -1
  45. package/lib/dist/installer/index.d.ts +1 -1
  46. package/lib/dist/installer/index.js +3 -3
  47. package/lib/dist/installer/index.js.map +1 -1
  48. package/lib/dist/installer/instructions-template.d.ts +2 -2
  49. package/lib/dist/installer/instructions-template.d.ts.map +1 -1
  50. package/lib/dist/installer/instructions-template.js +1 -1
  51. package/lib/dist/installer/targets/antigravity.d.ts +57 -0
  52. package/lib/dist/installer/targets/antigravity.d.ts.map +1 -0
  53. package/lib/dist/installer/targets/antigravity.js +307 -0
  54. package/lib/dist/installer/targets/antigravity.js.map +1 -0
  55. package/lib/dist/installer/targets/gemini.d.ts +26 -0
  56. package/lib/dist/installer/targets/gemini.d.ts.map +1 -0
  57. package/lib/dist/installer/targets/gemini.js +165 -0
  58. package/lib/dist/installer/targets/gemini.js.map +1 -0
  59. package/lib/dist/installer/targets/hermes.d.ts.map +1 -1
  60. package/lib/dist/installer/targets/hermes.js +57 -3
  61. package/lib/dist/installer/targets/hermes.js.map +1 -1
  62. package/lib/dist/installer/targets/kiro.d.ts +27 -0
  63. package/lib/dist/installer/targets/kiro.d.ts.map +1 -0
  64. package/lib/dist/installer/targets/kiro.js +196 -0
  65. package/lib/dist/installer/targets/kiro.js.map +1 -0
  66. package/lib/dist/installer/targets/registry.d.ts.map +1 -1
  67. package/lib/dist/installer/targets/registry.js +6 -0
  68. package/lib/dist/installer/targets/registry.js.map +1 -1
  69. package/lib/dist/installer/targets/types.d.ts +1 -1
  70. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  71. package/lib/dist/mcp/daemon-paths.d.ts +46 -0
  72. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -0
  73. package/lib/dist/mcp/daemon-paths.js +125 -0
  74. package/lib/dist/mcp/daemon-paths.js.map +1 -0
  75. package/lib/dist/mcp/daemon.d.ts +161 -0
  76. package/lib/dist/mcp/daemon.d.ts.map +1 -0
  77. package/lib/dist/mcp/daemon.js +403 -0
  78. package/lib/dist/mcp/daemon.js.map +1 -0
  79. package/lib/dist/mcp/engine.d.ts +100 -0
  80. package/lib/dist/mcp/engine.d.ts.map +1 -0
  81. package/lib/dist/mcp/engine.js +291 -0
  82. package/lib/dist/mcp/engine.js.map +1 -0
  83. package/lib/dist/mcp/index.d.ts +64 -53
  84. package/lib/dist/mcp/index.d.ts.map +1 -1
  85. package/lib/dist/mcp/index.js +307 -387
  86. package/lib/dist/mcp/index.js.map +1 -1
  87. package/lib/dist/mcp/proxy.d.ts +46 -0
  88. package/lib/dist/mcp/proxy.d.ts.map +1 -0
  89. package/lib/dist/mcp/proxy.js +276 -0
  90. package/lib/dist/mcp/proxy.js.map +1 -0
  91. package/lib/dist/mcp/server-instructions.d.ts +1 -1
  92. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  93. package/lib/dist/mcp/server-instructions.js +1 -1
  94. package/lib/dist/mcp/session.d.ts +67 -0
  95. package/lib/dist/mcp/session.d.ts.map +1 -0
  96. package/lib/dist/mcp/session.js +276 -0
  97. package/lib/dist/mcp/session.js.map +1 -0
  98. package/lib/dist/mcp/tools.d.ts +49 -0
  99. package/lib/dist/mcp/tools.d.ts.map +1 -1
  100. package/lib/dist/mcp/tools.js +253 -17
  101. package/lib/dist/mcp/tools.js.map +1 -1
  102. package/lib/dist/mcp/transport.d.ts +111 -29
  103. package/lib/dist/mcp/transport.d.ts.map +1 -1
  104. package/lib/dist/mcp/transport.js +181 -71
  105. package/lib/dist/mcp/transport.js.map +1 -1
  106. package/lib/dist/mcp/version.d.ts +19 -0
  107. package/lib/dist/mcp/version.d.ts.map +1 -0
  108. package/lib/dist/mcp/version.js +71 -0
  109. package/lib/dist/mcp/version.js.map +1 -0
  110. package/lib/dist/resolution/callback-synthesizer.d.ts +3 -2
  111. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  112. package/lib/dist/resolution/callback-synthesizer.js +351 -3
  113. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  114. package/lib/dist/resolution/frameworks/expo-modules.d.ts +3 -0
  115. package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
  116. package/lib/dist/resolution/frameworks/expo-modules.js +143 -0
  117. package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -0
  118. package/lib/dist/resolution/frameworks/fabric.d.ts +3 -0
  119. package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -0
  120. package/lib/dist/resolution/frameworks/fabric.js +354 -0
  121. package/lib/dist/resolution/frameworks/fabric.js.map +1 -0
  122. package/lib/dist/resolution/frameworks/index.d.ts +4 -0
  123. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  124. package/lib/dist/resolution/frameworks/index.js +21 -1
  125. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  126. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  127. package/lib/dist/resolution/frameworks/java.js +270 -1
  128. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  129. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
  130. package/lib/dist/resolution/frameworks/nestjs.js +324 -0
  131. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  132. package/lib/dist/resolution/frameworks/react-native.d.ts +3 -0
  133. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -0
  134. package/lib/dist/resolution/frameworks/react-native.js +360 -0
  135. package/lib/dist/resolution/frameworks/react-native.js.map +1 -0
  136. package/lib/dist/resolution/frameworks/swift-objc.d.ts +37 -0
  137. package/lib/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
  138. package/lib/dist/resolution/frameworks/swift-objc.js +252 -0
  139. package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -0
  140. package/lib/dist/resolution/go-module.d.ts +26 -0
  141. package/lib/dist/resolution/go-module.d.ts.map +1 -0
  142. package/lib/dist/resolution/go-module.js +78 -0
  143. package/lib/dist/resolution/go-module.js.map +1 -0
  144. package/lib/dist/resolution/import-resolver.d.ts +18 -0
  145. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  146. package/lib/dist/resolution/import-resolver.js +538 -4
  147. package/lib/dist/resolution/import-resolver.js.map +1 -1
  148. package/lib/dist/resolution/index.d.ts +10 -0
  149. package/lib/dist/resolution/index.d.ts.map +1 -1
  150. package/lib/dist/resolution/index.js +102 -0
  151. package/lib/dist/resolution/index.js.map +1 -1
  152. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  153. package/lib/dist/resolution/name-matcher.js +212 -0
  154. package/lib/dist/resolution/name-matcher.js.map +1 -1
  155. package/lib/dist/resolution/swift-objc-bridge.d.ts +134 -0
  156. package/lib/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
  157. package/lib/dist/resolution/swift-objc-bridge.js +256 -0
  158. package/lib/dist/resolution/swift-objc-bridge.js.map +1 -0
  159. package/lib/dist/resolution/types.d.ts +29 -0
  160. package/lib/dist/resolution/types.d.ts.map +1 -1
  161. package/lib/dist/sync/index.d.ts +3 -1
  162. package/lib/dist/sync/index.d.ts.map +1 -1
  163. package/lib/dist/sync/index.js +8 -1
  164. package/lib/dist/sync/index.js.map +1 -1
  165. package/lib/dist/sync/watcher.d.ts +119 -7
  166. package/lib/dist/sync/watcher.d.ts.map +1 -1
  167. package/lib/dist/sync/watcher.js +243 -37
  168. package/lib/dist/sync/watcher.js.map +1 -1
  169. package/lib/dist/sync/worktree.d.ts +54 -0
  170. package/lib/dist/sync/worktree.d.ts.map +1 -0
  171. package/lib/dist/sync/worktree.js +136 -0
  172. package/lib/dist/sync/worktree.js.map +1 -0
  173. package/lib/dist/types.d.ts +1 -1
  174. package/lib/dist/types.d.ts.map +1 -1
  175. package/lib/dist/types.js +3 -0
  176. package/lib/dist/types.js.map +1 -1
  177. package/lib/node_modules/.package-lock.json +29 -1
  178. package/lib/node_modules/chokidar/LICENSE +21 -0
  179. package/lib/node_modules/chokidar/README.md +305 -0
  180. package/lib/node_modules/chokidar/esm/handler.d.ts +90 -0
  181. package/lib/node_modules/chokidar/esm/handler.js +629 -0
  182. package/lib/node_modules/chokidar/esm/index.d.ts +215 -0
  183. package/lib/node_modules/chokidar/esm/index.js +798 -0
  184. package/lib/node_modules/chokidar/esm/package.json +1 -0
  185. package/lib/node_modules/chokidar/handler.d.ts +90 -0
  186. package/lib/node_modules/chokidar/handler.js +635 -0
  187. package/lib/node_modules/chokidar/index.d.ts +215 -0
  188. package/lib/node_modules/chokidar/index.js +804 -0
  189. package/lib/node_modules/chokidar/package.json +69 -0
  190. package/lib/node_modules/readdirp/LICENSE +21 -0
  191. package/lib/node_modules/readdirp/README.md +120 -0
  192. package/lib/node_modules/readdirp/esm/index.d.ts +108 -0
  193. package/lib/node_modules/readdirp/esm/index.js +257 -0
  194. package/lib/node_modules/readdirp/esm/package.json +1 -0
  195. package/lib/node_modules/readdirp/index.d.ts +108 -0
  196. package/lib/node_modules/readdirp/index.js +263 -0
  197. package/lib/node_modules/readdirp/package.json +70 -0
  198. package/lib/package.json +2 -1
  199. package/package.json +1 -1
@@ -0,0 +1,256 @@
1
+ "use strict";
2
+ /**
3
+ * Swift ↔ Objective-C bridging rules.
4
+ *
5
+ * Apple's auto-bridging mechanism exposes Swift declarations to the ObjC
6
+ * runtime under a deterministic selector name. The full rule set:
7
+ * https://developer.apple.com/documentation/swift/importing-swift-into-objective-c
8
+ *
9
+ * This module is **pure name math** — given a Swift declaration's base name
10
+ * + parameter external labels (or the raw signature text), produce the
11
+ * bridged ObjC selector(s); given an ObjC selector, produce the
12
+ * candidate Swift base names. No graph/DB access here.
13
+ *
14
+ * Used by `frameworks/swift-objc.ts` (the framework resolver that wires
15
+ * the rules into the resolution pipeline) and by its tests.
16
+ *
17
+ * ─── Bridging cheat sheet ───────────────────────────────────────────────
18
+ *
19
+ * Swift declaration ObjC selector
20
+ * ───────────────────────────────────────── ─────────────────────────
21
+ * func play() play
22
+ * func play(_ song: String) play:
23
+ * func play(song: String) playWithSong:
24
+ * func play(_ song: String, by artist: String) play:by:
25
+ * func play(song: String, by artist: String) playWithSong:by:
26
+ * init(name: String) initWithName:
27
+ * init(name: String, age: Int) initWithName:age:
28
+ * var name: String (getter / setter) name / setName:
29
+ * @objc(custom:) func f(_ x: Int) custom: (literal override)
30
+ *
31
+ * The reverse direction (ObjC → Swift) collapses the bridge: a Swift call
32
+ * site for `play(song:)` reaches us as the bare base name `play` (Swift's
33
+ * tree-sitter call_expression strips parameter labels from the callee
34
+ * name). So `swiftBaseNamesForObjcSelector('playWithSong:')` returns
35
+ * `['play']` — the resolver looks up Swift methods named `play`.
36
+ */
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.objcSelectorForSwiftMethod = objcSelectorForSwiftMethod;
39
+ exports.objcSelectorForSwiftInit = objcSelectorForSwiftInit;
40
+ exports.objcAccessorsForSwiftProperty = objcAccessorsForSwiftProperty;
41
+ exports.swiftBaseNamesForObjcSelector = swiftBaseNamesForObjcSelector;
42
+ exports.detectExplicitObjcName = detectExplicitObjcName;
43
+ exports.isObjcExposed = isObjcExposed;
44
+ /**
45
+ * Capitalize the first character of a string. Used for the "With"-prefix
46
+ * form on the first selector keyword when the Swift declaration has an
47
+ * explicit first-parameter label (e.g. `func play(song:)` → `playWithSong:`).
48
+ */
49
+ function capFirst(s) {
50
+ return s.length > 0 ? s.charAt(0).toUpperCase() + s.slice(1) : s;
51
+ }
52
+ /**
53
+ * Lowercase the first character. Used in reverse: `setName:` setter ↔
54
+ * Swift property `name`.
55
+ */
56
+ function lowerFirst(s) {
57
+ return s.length > 0 ? s.charAt(0).toLowerCase() + s.slice(1) : s;
58
+ }
59
+ /**
60
+ * Compute the auto-bridged ObjC selector for a Swift method declaration.
61
+ *
62
+ * @param baseName The Swift method's base name (e.g. `play`).
63
+ * @param externalLabels Parameter EXTERNAL labels in declaration order;
64
+ * `null` for a `_` (unlabeled) parameter.
65
+ * `[]` for a no-parameter method.
66
+ * @param explicitObjcName If `@objc(customSel:)` was specified, the
67
+ * literal selector — short-circuits the rule
68
+ * and is returned as-is.
69
+ * @returns The ObjC selector (e.g. `playWithSong:by:`), or `null` if it
70
+ * can't be determined.
71
+ *
72
+ * **Method rules:**
73
+ * - No params → base name (no colons)
74
+ * - Single param, `_` label → `baseName:`
75
+ * - Single param, explicit label `L` → `baseNameWithL:`
76
+ * - Multi-param, `_` first label → `baseName:label2:label3:`
77
+ * - Multi-param, explicit first label `L1` → `baseNameWithL1:label2:label3:`
78
+ *
79
+ * Initializer rules are handled by `objcSelectorForSwiftInit`.
80
+ */
81
+ function objcSelectorForSwiftMethod(baseName, externalLabels, explicitObjcName) {
82
+ if (!baseName)
83
+ return null;
84
+ if (explicitObjcName)
85
+ return explicitObjcName;
86
+ if (externalLabels.length === 0) {
87
+ return baseName;
88
+ }
89
+ const [first, ...rest] = externalLabels;
90
+ // Single param: "_" → "base:" ; "label" → "baseWithLabel:"
91
+ // Multi-param mirrors the same first-keyword formation, then appends each
92
+ // subsequent label as its own keyword. A `null` later label is invalid
93
+ // ObjC (no way to express unlabeled middle params) — keep as `:` to be safe.
94
+ const firstKeyword = first === null || first === undefined || first === '_' || first === ''
95
+ ? `${baseName}:`
96
+ : `${baseName}With${capFirst(first)}:`;
97
+ const restKeywords = rest.map((l) => `${l ?? ''}:`).join('');
98
+ return firstKeyword + restKeywords;
99
+ }
100
+ /**
101
+ * Compute the bridged ObjC selector for a Swift `init(...)` declaration.
102
+ *
103
+ * **Init rules** (different from regular methods — Apple always uses
104
+ * `initWith` regardless of whether the first label is `_`):
105
+ * - `init()` → `init`
106
+ * - `init(_ name: String)` → `initWithName:` (uses the INTERNAL
107
+ * name when external is `_`, per Apple's
108
+ * bridging conventions)
109
+ * - `init(name: String)` → `initWithName:`
110
+ * - `init(name: String, age: Int)` → `initWithName:age:`
111
+ *
112
+ * For the `_` case we need the internal (second identifier) name —
113
+ * passed via `internalNames`.
114
+ */
115
+ function objcSelectorForSwiftInit(externalLabels, internalNames, explicitObjcName) {
116
+ if (explicitObjcName)
117
+ return explicitObjcName;
118
+ if (externalLabels.length === 0) {
119
+ return 'init';
120
+ }
121
+ const [firstExt, ...restExt] = externalLabels;
122
+ const [firstInt] = internalNames;
123
+ // Use the internal name when external is "_"; ObjC needs *some* keyword,
124
+ // and Swift's auto-bridger uses the parameter's local name in this case.
125
+ const firstLabel = firstExt === null || firstExt === '_' || firstExt === ''
126
+ ? firstInt
127
+ : firstExt;
128
+ if (!firstLabel)
129
+ return null;
130
+ const firstKeyword = `initWith${capFirst(firstLabel)}:`;
131
+ const restKeywords = restExt
132
+ .map((label, idx) => {
133
+ const internal = internalNames[idx + 1];
134
+ const name = label && label !== '_' ? label : internal ?? '';
135
+ return `${name}:`;
136
+ })
137
+ .join('');
138
+ return firstKeyword + restKeywords;
139
+ }
140
+ /**
141
+ * Compute the bridged ObjC getter + setter for a Swift `@objc` property.
142
+ *
143
+ * - `var name: String` → getter `name`, setter `setName:`
144
+ * - `var isReady: Bool` → getter `isReady`, setter `setIsReady:`
145
+ * (no special `is` handling — Swift's `isReady` stays as `isReady` in ObjC;
146
+ * `@objc(name:)` overrides if a Cocoa-style getter `isReady` / setter
147
+ * `setReady:` pairing is needed — that's the responsibility of the
148
+ * declaration's `@objc(customGetter)` annotation, which we surface via
149
+ * `explicitObjcName`.)
150
+ */
151
+ function objcAccessorsForSwiftProperty(swiftName, explicitObjcName) {
152
+ if (!swiftName)
153
+ return null;
154
+ // The override syntax `@objc(customGetterName)` re-points the GETTER only;
155
+ // the setter still follows the `setX:` rule but is keyed off the override.
156
+ // (`@objc(getX:setY:)` is not currently supported — that's a rarer
157
+ // shape; can extend later if a real codebase needs it.)
158
+ const getter = explicitObjcName ?? swiftName;
159
+ return {
160
+ getter,
161
+ setter: `set${capFirst(getter)}:`,
162
+ };
163
+ }
164
+ /**
165
+ * Reverse: from an ObjC selector, return the candidate Swift base names
166
+ * the resolver should try when looking for the bridged Swift declaration.
167
+ *
168
+ * Examples:
169
+ * `play` → ['play']
170
+ * `play:` → ['play']
171
+ * `playWithSong:` → ['play', 'playWithSong']
172
+ * `play:by:` → ['play']
173
+ * `playWithSong:by:` → ['play', 'playWithSong']
174
+ * `initWithName:` → ['init'] (init is its own base name)
175
+ * `initWithName:age:` → ['init']
176
+ * `setName:` → ['name', 'setName'] (could be a setter OR a regular func)
177
+ * `tableView:didSel…:` → ['tableView']
178
+ *
179
+ * Returns multiple candidates because the bare base name is ambiguous —
180
+ * `playWithSong:` could correspond to either `func play(song:)` or
181
+ * `func playWithSong(_ x:)` (a Swift method literally named that with a
182
+ * `_` first label). The resolver tries each.
183
+ */
184
+ function swiftBaseNamesForObjcSelector(selector) {
185
+ if (!selector)
186
+ return [];
187
+ // Strip trailing colons and split into keywords.
188
+ const keywords = selector.replace(/:+$/g, '').split(':');
189
+ const firstKeyword = keywords[0];
190
+ if (!firstKeyword)
191
+ return [];
192
+ const candidates = new Set();
193
+ // Always a candidate: the raw first keyword. Covers
194
+ // `play:` → `play`
195
+ // `play:by:` → `play`
196
+ // `playWithSong:` → `playWithSong` (a literal Swift name)
197
+ // `tableView:...:` → `tableView`
198
+ candidates.add(firstKeyword);
199
+ // `initWith<X>:` and `initWith<X>:<more>:` always reduce to `init`.
200
+ if (firstKeyword.startsWith('initWith')) {
201
+ candidates.add('init');
202
+ }
203
+ // Preposition-prefix patterns: `<base>(With|For|By|In|On|At|From|To|Of|As)<Cap>:`
204
+ // covers both Swift's @objc EXPORT rule (always "With") and Cocoa's
205
+ // IMPORTED selectors which use other prepositions natively (e.g.
206
+ // `objectForKey:`, `stringWithFormat:`, `compareTo:`,
207
+ // `imageNamed:inBundle:`). Strip to recover the Swift base name a caller
208
+ // would use (e.g. `object`, `string`, `compare`, `image`).
209
+ const prepositionMatch = firstKeyword.match(/^([a-z][a-zA-Z0-9]*?)(?:With|For|By|In|On|At|From|To|Of|As)[A-Z]/);
210
+ if (prepositionMatch && prepositionMatch[1]) {
211
+ candidates.add(prepositionMatch[1]);
212
+ }
213
+ // `setX:` could be a property setter — the Swift property is `x` (lowercase).
214
+ // Only fires for the obvious shape: `set` + capital letter + ':' (one param).
215
+ if (keywords.length === 1 &&
216
+ /^set[A-Z]/.test(firstKeyword) &&
217
+ selector.endsWith(':')) {
218
+ const propName = lowerFirst(firstKeyword.slice(3));
219
+ if (propName)
220
+ candidates.add(propName);
221
+ }
222
+ return Array.from(candidates);
223
+ }
224
+ /**
225
+ * Detect whether a Swift method `@objc` declaration uses the `@objc(custom:)`
226
+ * override form, returning the literal selector when present.
227
+ *
228
+ * Regex-based scan over the small chunk of source preceding the declaration —
229
+ * tree-sitter would be more precise but this is only consulted as a fallback
230
+ * when the structured AST isn't available (e.g. resolver-time lookups
231
+ * via `context.readFile`).
232
+ *
233
+ * Returns `null` when the declaration is plain `@objc` (no override) or has
234
+ * no `@objc` attribute at all.
235
+ */
236
+ function detectExplicitObjcName(sourceSlice) {
237
+ // `@objc(customName:)` or `@objc(custom:name:)` — the parens contents are
238
+ // the literal ObjC selector. Whitespace permitted.
239
+ const m = sourceSlice.match(/@objc\s*\(\s*([^)\s]+)\s*\)/);
240
+ return m && m[1] ? m[1] : null;
241
+ }
242
+ /**
243
+ * Detect whether a Swift declaration is `@objc`-exposed by scanning the
244
+ * source slice that precedes it. Returns true for explicit `@objc`,
245
+ * `@objc(custom:)`, or membership in a `@objcMembers` class (caller's
246
+ * responsibility to pass class-level context if relevant).
247
+ *
248
+ * `@nonobjc` returns false even if `@objc` also appears (per Swift's rule
249
+ * that `@nonobjc` opts out of class-level `@objcMembers`).
250
+ */
251
+ function isObjcExposed(sourceSlice) {
252
+ if (/@nonobjc\b/.test(sourceSlice))
253
+ return false;
254
+ return /@objc\b/.test(sourceSlice);
255
+ }
256
+ //# sourceMappingURL=swift-objc-bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swift-objc-bridge.js","sourceRoot":"","sources":["../../src/resolution/swift-objc-bridge.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;;AAyCH,gEAwBC;AAiBD,4DA8BC;AAaD,sEAcC;AAsBD,sEA+CC;AAcD,wDAKC;AAWD,sCAGC;AA/OD;;;;GAIG;AACH,SAAS,QAAQ,CAAC,CAAS;IACzB,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,0BAA0B,CACxC,QAAgB,EAChB,cAAiC,EACjC,gBAAgC;IAEhC,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3B,IAAI,gBAAgB;QAAE,OAAO,gBAAgB,CAAC;IAE9C,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,C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AAC;IACjD,OAAO,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC"}
@@ -86,6 +86,14 @@ export interface ResolutionContext {
86
86
  * compile without modification; production resolver implements it.
87
87
  */
88
88
  getProjectAliases?(): import('./path-aliases').AliasMap | null;
89
+ /**
90
+ * Go module info from `go.mod` at the project root. Returns `null`
91
+ * when the project has no `go.mod` (non-Go projects, pre-modules
92
+ * Go code, or projects whose modules live in subdirectories). Used
93
+ * by the Go branch of import resolution to distinguish in-module
94
+ * cross-package imports from third-party packages.
95
+ */
96
+ getGoModule?(): import('./go-module').GoModule | null;
89
97
  /**
90
98
  * Re-exports declared by a file (`export { x } from './other'`,
91
99
  * `export * from './other'`). Empty array when the file has none.
@@ -102,6 +110,13 @@ export interface ResolutionContext {
102
110
  * without modification.
103
111
  */
104
112
  listDirectories?(relativePath: string): string[];
113
+ /**
114
+ * C/C++ include search directories (relative to project root),
115
+ * extracted from compile_commands.json or discovered by heuristic.
116
+ * Used by resolveCppIncludePath to search -I directories when
117
+ * relative resolution fails. Optional so existing callers compile.
118
+ */
119
+ getCppIncludeDirs?(): string[];
105
120
  }
106
121
  /**
107
122
  * Result of framework-specific file extraction.
@@ -141,6 +156,20 @@ export interface FrameworkResolver {
141
156
  * pipeline; the framework's own `resolve()` is one of the strategies tried.
142
157
  */
143
158
  extract?(filePath: string, content: string): FrameworkExtractionResult;
159
+ /**
160
+ * Cross-file finalization pass, called once after all per-file extraction
161
+ * completes (and again on every incremental sync). Used by frameworks where
162
+ * a symbol's final representation depends on a sibling file the per-file
163
+ * `extract()` never saw — e.g. NestJS's `RouterModule.register([...])`
164
+ * sets route prefixes for controllers declared elsewhere.
165
+ *
166
+ * Implementations return route/etc. nodes with mutated fields (typically
167
+ * `name`); the orchestrator persists each via `updateNode`. The node `id`
168
+ * MUST be preserved so existing edges (route → handler, etc.) stay intact;
169
+ * `qualifiedName` SHOULD be preserved so the pass stays idempotent — a
170
+ * second run can recover the original in-file form from `qualifiedName`.
171
+ */
172
+ postExtract?(context: ResolutionContext): Node[];
144
173
  }
145
174
  /**
146
175
  * Import mapping from a file
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/resolution/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,qDAAqD;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,wBAAwB;IACxB,aAAa,EAAE,QAAQ,CAAC;IACxB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,QAAQ,EAAE,QAAQ,CAAC;IACnB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,oCAAoC;IACpC,QAAQ,EAAE,aAAa,CAAC;IACxB,4BAA4B;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,UAAU,EAAE,aAAa,GAAG,QAAQ,GAAG,gBAAgB,GAAG,WAAW,GAAG,OAAO,GAAG,iBAAiB,GAAG,WAAW,CAAC;CACnH;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,2CAA2C;IAC3C,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,iBAAiB;IACjB,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,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MAAM,CAAC;CAChB,GACD;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -8,10 +8,12 @@
8
8
  * - FileWatcher: Debounced fs.watch that auto-triggers sync on file changes
9
9
  * - Watch policy: decides when the watcher must be disabled (e.g. WSL2 /mnt)
10
10
  * - Git sync hooks: opt-in commit/merge/checkout hooks when watching is off
11
+ * - Git worktree awareness: detect when a query borrows another tree's index
11
12
  * - Content hashing for change detection (in extraction module)
12
13
  * - Incremental reindexing (in extraction module)
13
14
  */
14
- export { FileWatcher, WatchOptions } from './watcher';
15
+ export { FileWatcher, WatchOptions, PendingFile, LockUnavailableError } from './watcher';
15
16
  export { watchDisabledReason, detectWsl } from './watch-policy';
16
17
  export { installGitSyncHook, removeGitSyncHook, isSyncHookInstalled, isGitRepo, DEFAULT_SYNC_HOOKS, type GitHookName, type GitHookResult, } from './git-hooks';
18
+ export { gitWorktreeRoot, detectWorktreeIndexMismatch, worktreeMismatchWarning, worktreeMismatchNotice, type WorktreeIndexMismatch, } from './worktree';
17
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,kBAAkB,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,kBAAkB,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,YAAY,CAAC"}
@@ -9,13 +9,15 @@
9
9
  * - FileWatcher: Debounced fs.watch that auto-triggers sync on file changes
10
10
  * - Watch policy: decides when the watcher must be disabled (e.g. WSL2 /mnt)
11
11
  * - Git sync hooks: opt-in commit/merge/checkout hooks when watching is off
12
+ * - Git worktree awareness: detect when a query borrows another tree's index
12
13
  * - Content hashing for change detection (in extraction module)
13
14
  * - Incremental reindexing (in extraction module)
14
15
  */
15
16
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.DEFAULT_SYNC_HOOKS = exports.isGitRepo = exports.isSyncHookInstalled = exports.removeGitSyncHook = exports.installGitSyncHook = exports.detectWsl = exports.watchDisabledReason = exports.FileWatcher = void 0;
17
+ exports.worktreeMismatchNotice = exports.worktreeMismatchWarning = exports.detectWorktreeIndexMismatch = exports.gitWorktreeRoot = exports.DEFAULT_SYNC_HOOKS = exports.isGitRepo = exports.isSyncHookInstalled = exports.removeGitSyncHook = exports.installGitSyncHook = exports.detectWsl = exports.watchDisabledReason = exports.LockUnavailableError = exports.FileWatcher = void 0;
17
18
  var watcher_1 = require("./watcher");
18
19
  Object.defineProperty(exports, "FileWatcher", { enumerable: true, get: function () { return watcher_1.FileWatcher; } });
20
+ Object.defineProperty(exports, "LockUnavailableError", { enumerable: true, get: function () { return watcher_1.LockUnavailableError; } });
19
21
  var watch_policy_1 = require("./watch-policy");
20
22
  Object.defineProperty(exports, "watchDisabledReason", { enumerable: true, get: function () { return watch_policy_1.watchDisabledReason; } });
21
23
  Object.defineProperty(exports, "detectWsl", { enumerable: true, get: function () { return watch_policy_1.detectWsl; } });
@@ -25,4 +27,9 @@ Object.defineProperty(exports, "removeGitSyncHook", { enumerable: true, get: fun
25
27
  Object.defineProperty(exports, "isSyncHookInstalled", { enumerable: true, get: function () { return git_hooks_1.isSyncHookInstalled; } });
26
28
  Object.defineProperty(exports, "isGitRepo", { enumerable: true, get: function () { return git_hooks_1.isGitRepo; } });
27
29
  Object.defineProperty(exports, "DEFAULT_SYNC_HOOKS", { enumerable: true, get: function () { return git_hooks_1.DEFAULT_SYNC_HOOKS; } });
30
+ var worktree_1 = require("./worktree");
31
+ Object.defineProperty(exports, "gitWorktreeRoot", { enumerable: true, get: function () { return worktree_1.gitWorktreeRoot; } });
32
+ Object.defineProperty(exports, "detectWorktreeIndexMismatch", { enumerable: true, get: function () { return worktree_1.detectWorktreeIndexMismatch; } });
33
+ Object.defineProperty(exports, "worktreeMismatchWarning", { enumerable: true, get: function () { return worktree_1.worktreeMismatchWarning; } });
34
+ Object.defineProperty(exports, "worktreeMismatchNotice", { enumerable: true, get: function () { return worktree_1.worktreeMismatchNotice; } });
28
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAEH,qCAAsD;AAA7C,sGAAA,WAAW,OAAA;AACpB,+CAAgE;AAAvD,mHAAA,mBAAmB,OAAA;AAAE,yGAAA,SAAS,OAAA;AACvC,yCAQqB;AAPnB,+GAAA,kBAAkB,OAAA;AAClB,8GAAA,iBAAiB,OAAA;AACjB,gHAAA,mBAAmB,OAAA;AACnB,sGAAA,SAAS,OAAA;AACT,+GAAA,kBAAkB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,qCAAyF;AAAhF,sGAAA,WAAW,OAAA;AAA6B,+GAAA,oBAAoB,OAAA;AACrE,+CAAgE;AAAvD,mHAAA,mBAAmB,OAAA;AAAE,yGAAA,SAAS,OAAA;AACvC,yCAQqB;AAPnB,+GAAA,kBAAkB,OAAA;AAClB,8GAAA,iBAAiB,OAAA;AACjB,gHAAA,mBAAmB,OAAA;AACnB,sGAAA,SAAS,OAAA;AACT,+GAAA,kBAAkB,OAAA;AAIpB,uCAMoB;AALlB,2GAAA,eAAe,OAAA;AACf,uHAAA,2BAA2B,OAAA;AAC3B,mHAAA,uBAAuB,OAAA;AACvB,kHAAA,sBAAsB,OAAA"}
@@ -1,11 +1,17 @@
1
1
  /**
2
2
  * File Watcher
3
3
  *
4
- * Watches the project directory for file changes and triggers
5
- * debounced sync operations to keep the code graph up-to-date.
4
+ * Watches the project directory for file changes and triggers debounced sync
5
+ * operations to keep the code graph up-to-date.
6
6
  *
7
- * Uses Node.js native fs.watch with recursive mode (macOS FSEvents,
8
- * Windows ReadDirectoryChangesW, Linux inotify on Node 19+).
7
+ * Uses chokidar, whose `ignored` callback filters directories BEFORE they are
8
+ * watched so we never register inotify watches on excluded trees like
9
+ * node_modules/, dist/, .git/ (fixes #276: recursive fs.watch exhausted the
10
+ * kernel watch budget on large repos). The ignore decision reuses the indexer's
11
+ * `buildDefaultIgnore` (built-in default-ignore dirs + the project's .gitignore)
12
+ * so the watcher watches exactly the set the indexer indexes — in particular,
13
+ * node_modules/build/cache dirs are excluded even when the repo has no
14
+ * .gitignore (#407), which a .gitignore-only filter would miss.
9
15
  */
10
16
  /**
11
17
  * Options for the file watcher
@@ -29,22 +35,83 @@ export interface WatchOptions {
29
35
  */
30
36
  onSyncError?: (error: Error) => void;
31
37
  }
38
+ /**
39
+ * Thrown by a `syncFn` to signal that the underlying sync couldn't acquire
40
+ * the cross-process write lock (#449). The watcher treats this as "no
41
+ * progress" — preserves `pendingFiles`, skips `onSyncComplete`, and the
42
+ * `finally` block reschedules. Quiet (debug-only) because a long-running
43
+ * external indexer can hit this every debounce cycle.
44
+ */
45
+ export declare class LockUnavailableError extends Error {
46
+ constructor(message?: string);
47
+ }
48
+ /**
49
+ * Per-file pending entry — tracks a source file the watcher saw an event for
50
+ * but hasn't yet synced into the index. Exposed via {@link FileWatcher.getPendingFiles}
51
+ * so MCP tool responses can mark stale results without forcing a wait.
52
+ */
53
+ export interface PendingFile {
54
+ /** Project-relative POSIX path (e.g. "src/foo.ts"). */
55
+ path: string;
56
+ /** Wall-clock ms at the first event we saw for this path since the last sync. */
57
+ firstSeenMs: number;
58
+ /** Wall-clock ms at the most recent event we saw for this path. */
59
+ lastSeenMs: number;
60
+ /**
61
+ * True when a sync is currently in flight that began AFTER this file's most
62
+ * recent event — i.e. the next successful sync will pick it up. False when
63
+ * the file is still in the debounce window (no sync running yet).
64
+ */
65
+ indexing: boolean;
66
+ }
32
67
  /**
33
68
  * FileWatcher monitors a project directory for changes and triggers
34
69
  * debounced sync operations via a provided callback.
35
70
  *
36
71
  * Design goals:
37
- * - Minimal resource usage (native OS file events, no polling)
72
+ * - Minimal resource usage (chokidar filters excluded directories before
73
+ * registering an inotify watch — see module docs / #276)
38
74
  * - Debounced to avoid thrashing on rapid saves
39
75
  * - Filters to supported source files by extension
40
- * - Ignores .codegraph/ directory changes
76
+ * - Ignores .codegraph/ and .git/ regardless of .gitignore
77
+ * - Tracks per-file pending state so MCP tools can flag stale results
78
+ * without blocking on a sync (issue #403)
41
79
  */
42
80
  export declare class FileWatcher {
43
81
  private watcher;
44
82
  private debounceTimer;
45
- private hasChanges;
83
+ /**
84
+ * Files seen by the watcher since the last successful sync — populated on
85
+ * every chokidar event, cleared at the start of a sync, and re-populated by
86
+ * events that arrive mid-sync (or restored on sync failure). Keyed by the
87
+ * same project-relative POSIX path the rest of the codebase uses, so a
88
+ * caller can intersect tool-response file paths against this map cheaply.
89
+ */
90
+ private pendingFiles;
91
+ /**
92
+ * Wall-clock ms at which the in-flight sync began. Combined with
93
+ * {@link pendingFiles}'s `lastSeenMs`, this distinguishes "still in the
94
+ * debounce window" (lastSeen > syncStarted, sync hasn't started yet for
95
+ * this edit) from "currently being indexed" (lastSeen <= syncStarted).
96
+ */
97
+ private syncStartedMs;
46
98
  private syncing;
47
99
  private stopped;
100
+ /**
101
+ * False until chokidar fires its `ready` event. Gates `pendingFiles`
102
+ * insertion so the initial crawl's `add` events (one per pre-existing
103
+ * source file) don't pollute the per-file staleness signal. The events
104
+ * still flow into `scheduleSync()` to preserve the previous "initial
105
+ * scan triggers a reconciling sync" behavior.
106
+ */
107
+ private chokidarReady;
108
+ /**
109
+ * Callbacks that resolve when chokidar fires `ready`. Used by tests (and
110
+ * any production caller that cares about a clean baseline) to deterministically
111
+ * gate on the end of the initial scan instead of guessing at a sleep duration.
112
+ */
113
+ private readyWaiters;
114
+ private ignoreMatcher;
48
115
  private readonly projectRoot;
49
116
  private readonly debounceMs;
50
117
  private readonly syncFn;
@@ -59,6 +126,14 @@ export declare class FileWatcher {
59
126
  * Returns true if watching started successfully, false otherwise.
60
127
  */
61
128
  start(): boolean;
129
+ /** Our own dirs are always ignored, regardless of .gitignore. */
130
+ private isAlwaysIgnored;
131
+ /**
132
+ * chokidar `ignored` predicate — true for any path that should NOT be watched.
133
+ * Uses chokidar's provided `stats` to decide directory-vs-file so a dir-only
134
+ * rule like `build/` matches, without an extra `statSync` per path.
135
+ */
136
+ private shouldIgnore;
62
137
  /**
63
138
  * Stop watching for file changes.
64
139
  */
@@ -67,13 +142,50 @@ export declare class FileWatcher {
67
142
  * Whether the watcher is currently active.
68
143
  */
69
144
  isActive(): boolean;
145
+ /**
146
+ * Resolves once chokidar has fired its `ready` event (or immediately if
147
+ * it has already done so). Useful for tests that need a deterministic
148
+ * boundary before asserting on `pendingFiles` — guessing a sleep duration
149
+ * is flaky under load because chokidar can take longer than expected to
150
+ * finish its initial crawl on slow filesystems / parallel test runs.
151
+ *
152
+ * Production callers don't need this: `pendingFiles` is read continuously,
153
+ * the staleness banner is always correct (empty or populated), and the
154
+ * initial-scan window is a small one-time startup cost.
155
+ */
156
+ waitUntilReady(timeoutMs?: number): Promise<void>;
70
157
  /**
71
158
  * Schedule a debounced sync.
72
159
  */
73
160
  private scheduleSync;
74
161
  /**
75
162
  * Flush pending changes by running sync.
163
+ *
164
+ * pendingFiles is NOT cleared at the start of sync — entries are removed
165
+ * only after sync commits successfully, and only for entries whose
166
+ * lastSeenMs <= syncStartedMs. That way, a query that arrives mid-sync
167
+ * still sees the affected files marked stale (the DB hasn't been updated
168
+ * yet), and an event that lands mid-sync persists into the follow-up.
169
+ *
170
+ * On sync failure pendingFiles is left untouched — every edit is still
171
+ * unindexed, and the rescheduled sync will absorb the same set next time.
76
172
  */
77
173
  private flush;
174
+ /**
175
+ * Snapshot of files seen by the watcher since the last successful sync.
176
+ *
177
+ * Used by MCP tool responses to mark stale results without blocking on a
178
+ * sync: a tool that returns a hit in `src/foo.ts` while `src/foo.ts` is in
179
+ * this list tells the agent "Read this file directly, the index lags."
180
+ *
181
+ * `indexing` is true when a sync is currently in flight whose start time is
182
+ * AFTER this file's most recent event — i.e. that sync will absorb the
183
+ * edit. False means the file is still inside the debounce window and no
184
+ * sync has started yet (a follow-up call a few hundred ms later may show
185
+ * `indexing: true` or the file may have left the list entirely).
186
+ *
187
+ * Cheap: O(pendingFiles.size), no I/O, no locks.
188
+ */
189
+ getPendingFiles(): PendingFile[];
78
190
  }
79
191
  //# sourceMappingURL=watcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"watcher.d.ts","sourceRoot":"","sources":["../../src/sync/watcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CA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