gitnexus 1.6.12-rc.2 → 1.6.12-rc.21

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 (188) hide show
  1. package/dist/_shared/graph/types.d.ts +1 -1
  2. package/dist/_shared/graph/types.d.ts.map +1 -1
  3. package/dist/_shared/language-detection.d.ts.map +1 -1
  4. package/dist/_shared/language-detection.js +2 -0
  5. package/dist/_shared/language-detection.js.map +1 -1
  6. package/dist/_shared/languages.d.ts +1 -0
  7. package/dist/_shared/languages.d.ts.map +1 -1
  8. package/dist/_shared/languages.js +1 -0
  9. package/dist/_shared/languages.js.map +1 -1
  10. package/dist/_shared/lbug/schema-constants.d.ts +1 -1
  11. package/dist/_shared/lbug/schema-constants.d.ts.map +1 -1
  12. package/dist/_shared/lbug/schema-constants.js +2 -0
  13. package/dist/_shared/lbug/schema-constants.js.map +1 -1
  14. package/dist/_shared/scope-resolution/language-classification.d.ts +2 -1
  15. package/dist/_shared/scope-resolution/language-classification.d.ts.map +1 -1
  16. package/dist/_shared/scope-resolution/language-classification.js +3 -1
  17. package/dist/_shared/scope-resolution/language-classification.js.map +1 -1
  18. package/dist/_shared/scope-resolution/registries/class-registry.d.ts +3 -3
  19. package/dist/_shared/scope-resolution/registries/class-registry.js +3 -3
  20. package/dist/_shared/scope-resolution/registries/context.d.ts.map +1 -1
  21. package/dist/_shared/scope-resolution/registries/context.js +2 -0
  22. package/dist/_shared/scope-resolution/registries/context.js.map +1 -1
  23. package/dist/_shared/scope-resolution/resolve-type-ref.d.ts.map +1 -1
  24. package/dist/_shared/scope-resolution/resolve-type-ref.js +2 -0
  25. package/dist/_shared/scope-resolution/resolve-type-ref.js.map +1 -1
  26. package/dist/cli/analyze-config.d.ts +2 -2
  27. package/dist/cli/analyze-config.js +10 -33
  28. package/dist/cli/doctor.js +6 -4
  29. package/dist/cli/eval-server.js +13 -1
  30. package/dist/cli/i18n/en.d.ts +4 -2
  31. package/dist/cli/i18n/en.js +4 -2
  32. package/dist/cli/i18n/resources.d.ts +6 -2
  33. package/dist/cli/i18n/zh-CN.d.ts +2 -0
  34. package/dist/cli/i18n/zh-CN.js +4 -2
  35. package/dist/core/analysis-feature-registry.d.ts +1 -1
  36. package/dist/core/analysis-feature-registry.js +2 -0
  37. package/dist/core/auto-sync/starter.js +2 -2
  38. package/dist/core/embeddings/ast-utils.js +8 -3
  39. package/dist/core/embeddings/chunker.js +67 -10
  40. package/dist/core/embeddings/embedding-pipeline.d.ts +1 -1
  41. package/dist/core/embeddings/embedding-pipeline.js +1 -1
  42. package/dist/core/embeddings/structural-extractor.js +2 -2
  43. package/dist/core/embeddings/types.d.ts +4 -2
  44. package/dist/core/embeddings/types.js +18 -0
  45. package/dist/core/git-ref.d.ts +22 -0
  46. package/dist/core/git-ref.js +114 -0
  47. package/dist/core/git-staleness.js +14 -0
  48. package/dist/core/group/extractors/graphql-extractor.d.ts +1 -1
  49. package/dist/core/group/extractors/graphql-extractor.js +149 -13
  50. package/dist/core/group/extractors/manifest-extractor.d.ts +1 -1
  51. package/dist/core/group/extractors/manifest-extractor.js +2 -2
  52. package/dist/core/ingestion/call-extractors/zig-static-gating.d.ts +5 -8
  53. package/dist/core/ingestion/content-language-classification.d.ts +10 -0
  54. package/dist/core/ingestion/content-language-classification.js +30 -0
  55. package/dist/core/ingestion/filesystem-walker.d.ts +1 -0
  56. package/dist/core/ingestion/filesystem-walker.js +1 -1
  57. package/dist/core/ingestion/import-resolvers/node-workspace-packages.js +3 -2
  58. package/dist/core/ingestion/language-config.d.ts +82 -13
  59. package/dist/core/ingestion/language-config.js +217 -13
  60. package/dist/core/ingestion/language-provider.d.ts +88 -1
  61. package/dist/core/ingestion/languages/index.d.ts +7 -0
  62. package/dist/core/ingestion/languages/index.js +30 -1
  63. package/dist/core/ingestion/languages/objective-c/analysis-features.d.ts +10 -0
  64. package/dist/core/ingestion/languages/objective-c/analysis-features.js +19 -0
  65. package/dist/core/ingestion/languages/objective-c/compilation-unit-siblings.d.ts +13 -0
  66. package/dist/core/ingestion/languages/objective-c/compilation-unit-siblings.js +124 -0
  67. package/dist/core/ingestion/languages/objective-c/facts.d.ts +148 -0
  68. package/dist/core/ingestion/languages/objective-c/facts.js +1150 -0
  69. package/dist/core/ingestion/languages/objective-c/import-target.d.ts +11 -0
  70. package/dist/core/ingestion/languages/objective-c/import-target.js +122 -0
  71. package/dist/core/ingestion/languages/objective-c/macro-marker-preprocess.d.ts +24 -0
  72. package/dist/core/ingestion/languages/objective-c/macro-marker-preprocess.js +261 -0
  73. package/dist/core/ingestion/languages/objective-c/resolution-config.d.ts +41 -0
  74. package/dist/core/ingestion/languages/objective-c/resolution-config.js +282 -0
  75. package/dist/core/ingestion/languages/objective-c/scope-resolver.d.ts +2 -0
  76. package/dist/core/ingestion/languages/objective-c/scope-resolver.js +503 -0
  77. package/dist/core/ingestion/languages/objective-c.d.ts +2 -0
  78. package/dist/core/ingestion/languages/objective-c.js +300 -0
  79. package/dist/core/ingestion/languages/typescript/query.d.ts +31 -0
  80. package/dist/core/ingestion/languages/typescript/query.js +7 -1
  81. package/dist/core/ingestion/languages/typescript/tsconfig.js +3 -2
  82. package/dist/core/ingestion/languages/typescript.js +1 -1
  83. package/dist/core/ingestion/languages/zig/query.d.ts +26 -0
  84. package/dist/core/ingestion/languages/zig/query.js +61 -1
  85. package/dist/core/ingestion/languages/zig/range-binding.d.ts +8 -0
  86. package/dist/core/ingestion/languages/zig/range-binding.js +24 -0
  87. package/dist/core/ingestion/languages/zig/scope-resolver.d.ts +3 -2
  88. package/dist/core/ingestion/languages/zig/scope-resolver.js +18 -5
  89. package/dist/core/ingestion/languages/zig/this-alias-bindings.d.ts +58 -0
  90. package/dist/core/ingestion/languages/zig/this-alias-bindings.js +176 -0
  91. package/dist/core/ingestion/languages/zig/workspace-static-gating.d.ts +8 -0
  92. package/dist/core/ingestion/languages/zig/workspace-static-gating.js +82 -0
  93. package/dist/core/ingestion/model/registration-table.d.ts +3 -3
  94. package/dist/core/ingestion/model/registration-table.js +9 -5
  95. package/dist/core/ingestion/model/symbol-table.d.ts +1 -1
  96. package/dist/core/ingestion/model/symbol-table.js +2 -0
  97. package/dist/core/ingestion/model/type-registry.d.ts +1 -1
  98. package/dist/core/ingestion/parsing-processor.d.ts +22 -6
  99. package/dist/core/ingestion/parsing-processor.js +39 -20
  100. package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +9 -1
  101. package/dist/core/ingestion/pipeline-phases/parse-impl.js +307 -96
  102. package/dist/core/ingestion/pipeline-phases/parse-round-budget.d.ts +42 -0
  103. package/dist/core/ingestion/pipeline-phases/parse-round-budget.js +50 -0
  104. package/dist/core/ingestion/pipeline-phases/parse.d.ts +7 -1
  105. package/dist/core/ingestion/scope-extractor.js +4 -0
  106. package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +13 -0
  107. package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +2 -0
  108. package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +2 -0
  109. package/dist/core/ingestion/scope-resolution/passes/property-dispatch.d.ts +78 -5
  110. package/dist/core/ingestion/scope-resolution/passes/property-dispatch.js +262 -7
  111. package/dist/core/ingestion/scope-resolution/pipeline/phase.js +5 -2
  112. package/dist/core/ingestion/scope-resolution/pipeline/registry.js +2 -0
  113. package/dist/core/ingestion/scope-resolution/pipeline/run.js +10 -1
  114. package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +39 -3
  115. package/dist/core/ingestion/scope-resolution/scope/walkers.js +82 -3
  116. package/dist/core/ingestion/scope-resolution/value-ref-edges.d.ts +14 -0
  117. package/dist/core/ingestion/scope-resolution/value-ref-edges.js +14 -0
  118. package/dist/core/ingestion/tree-sitter-queries.js +2 -0
  119. package/dist/core/ingestion/utils/symbol-labels.js +2 -0
  120. package/dist/core/ingestion/workers/parse-worker.d.ts +1 -1
  121. package/dist/core/ingestion/workers/parse-worker.js +63 -3
  122. package/dist/core/ingestion/workers/worker-pool.d.ts +56 -2
  123. package/dist/core/ingestion/workers/worker-pool.js +117 -26
  124. package/dist/core/lbug/csv-generator.js +2 -0
  125. package/dist/core/lbug/schema.d.ts +3 -1
  126. package/dist/core/lbug/schema.js +27 -0
  127. package/dist/core/search/fts-indexes.js +13 -4
  128. package/dist/core/search/fts-schema.js +2 -0
  129. package/dist/core/tree-sitter/parser-loader.js +10 -0
  130. package/dist/core/tree-sitter/vendored-grammars.d.ts +1 -1
  131. package/dist/core/tree-sitter/vendored-grammars.js +2 -1
  132. package/dist/mcp/local/local-backend.d.ts +33 -0
  133. package/dist/mcp/local/local-backend.js +166 -5
  134. package/dist/mcp/tools.js +6 -4
  135. package/dist/server/analyze-job.d.ts +19 -1
  136. package/dist/server/analyze-job.js +14 -3
  137. package/dist/server/analyze-launch.d.ts +14 -0
  138. package/dist/server/analyze-launch.js +59 -14
  139. package/dist/server/analyze-worker-ipc.d.ts +6 -5
  140. package/dist/server/analyze-worker-ipc.js +4 -0
  141. package/dist/server/api.js +68 -21
  142. package/dist/server/git-clone.d.ts +38 -5
  143. package/dist/server/git-clone.js +216 -38
  144. package/dist/server/repo-projection.d.ts +88 -0
  145. package/dist/server/repo-projection.js +53 -0
  146. package/dist/storage/file-lock.js +5 -3
  147. package/dist/storage/parse-cache.js +32 -1
  148. package/dist/storage/parsedfile-store.js +53 -1
  149. package/dist/storage/v8-sidecar.d.ts +11 -0
  150. package/dist/storage/v8-sidecar.js +15 -7
  151. package/dist/utils/process-identity.d.ts +13 -0
  152. package/dist/utils/process-identity.js +18 -0
  153. package/package.json +1 -1
  154. package/scripts/build-tree-sitter-grammars.cjs +4 -3
  155. package/vendor/tree-sitter-objc/LICENSE +21 -0
  156. package/vendor/tree-sitter-objc/README.md +18 -0
  157. package/vendor/tree-sitter-objc/binding.gyp +35 -0
  158. package/vendor/tree-sitter-objc/bindings/node/binding.cc +19 -0
  159. package/vendor/tree-sitter-objc/bindings/node/binding_test.js +9 -0
  160. package/vendor/tree-sitter-objc/bindings/node/index.d.ts +27 -0
  161. package/vendor/tree-sitter-objc/bindings/node/index.js +11 -0
  162. package/vendor/tree-sitter-objc/grammar.js +1286 -0
  163. package/vendor/tree-sitter-objc/package.json +56 -0
  164. package/vendor/tree-sitter-objc/prebuilds/SHA256SUMS +6 -0
  165. package/vendor/tree-sitter-objc/prebuilds/darwin-arm64/tree-sitter-objc.node +0 -0
  166. package/vendor/tree-sitter-objc/prebuilds/darwin-x64/tree-sitter-objc.node +0 -0
  167. package/vendor/tree-sitter-objc/prebuilds/linux-arm64/tree-sitter-objc.node +0 -0
  168. package/vendor/tree-sitter-objc/prebuilds/linux-x64/tree-sitter-objc.node +0 -0
  169. package/vendor/tree-sitter-objc/prebuilds/win32-arm64/tree-sitter-objc.node +0 -0
  170. package/vendor/tree-sitter-objc/prebuilds/win32-x64/tree-sitter-objc.node +0 -0
  171. package/vendor/tree-sitter-objc/queries/folds.scm +20 -0
  172. package/vendor/tree-sitter-objc/queries/highlights.scm +216 -0
  173. package/vendor/tree-sitter-objc/queries/indents.scm +1 -0
  174. package/vendor/tree-sitter-objc/queries/injections.scm +10 -0
  175. package/vendor/tree-sitter-objc/queries/locals.scm +1 -0
  176. package/vendor/tree-sitter-objc/src/grammar.json +16292 -0
  177. package/vendor/tree-sitter-objc/src/node-types.json +7524 -0
  178. package/vendor/tree-sitter-objc/src/parser.c +684023 -0
  179. package/vendor/tree-sitter-objc/src/tree_sitter/alloc.h +54 -0
  180. package/vendor/tree-sitter-objc/src/tree_sitter/array.h +291 -0
  181. package/vendor/tree-sitter-objc/src/tree_sitter/parser.h +266 -0
  182. package/vendor/tree-sitter-objc/tree-sitter-objc.wasm +0 -0
  183. package/vendor/tree-sitter-objc/tree-sitter.json +38 -0
  184. package/web/assets/{agent-BMRqXorA.js → agent-C2n33ANd.js} +1 -1
  185. package/web/assets/{index-Dj3vQOHK.js → index-CHJoW_P1.js} +18 -18
  186. package/web/assets/src-jc8Ffy3T.js +1 -0
  187. package/web/index.html +2 -2
  188. package/web/assets/src-Df5C1Nz4.js +0 -1
@@ -7,7 +7,7 @@
7
7
  * 3. Add one line to the `providers` table below
8
8
  * 4. Run `tsc --noEmit` to verify
9
9
  */
10
- import { SupportedLanguages, isBladeTemplateFilename } from '../../../_shared/index.js';
10
+ import { SupportedLanguages, getLanguageFromFilename, isBladeTemplateFilename, } from '../../../_shared/index.js';
11
11
  import { typescriptProvider, javascriptProvider } from './typescript.js';
12
12
  import { pythonProvider } from './python.js';
13
13
  import { javaProvider } from './java.js';
@@ -16,6 +16,7 @@ import { goProvider } from './go.js';
16
16
  import { rustProvider } from './rust.js';
17
17
  import { csharpProvider } from './csharp.js';
18
18
  import { cProvider, cppProvider } from './c-cpp.js';
19
+ import { objectiveCProvider } from './objective-c.js';
19
20
  import { phpProvider } from './php.js';
20
21
  import { rubyProvider } from './ruby.js';
21
22
  import { swiftProvider } from './swift.js';
@@ -34,6 +35,7 @@ export const providers = {
34
35
  [SupportedLanguages.CSharp]: csharpProvider,
35
36
  [SupportedLanguages.C]: cProvider,
36
37
  [SupportedLanguages.CPlusPlus]: cppProvider,
38
+ [SupportedLanguages.ObjectiveC]: objectiveCProvider,
37
39
  [SupportedLanguages.PHP]: phpProvider,
38
40
  [SupportedLanguages.Ruby]: rubyProvider,
39
41
  [SupportedLanguages.Swift]: swiftProvider,
@@ -63,3 +65,30 @@ export function getProviderForFile(filePath) {
63
65
  const basename = filePath.slice(filePath.lastIndexOf('/') + 1);
64
66
  return extensionMap.get(ext) ?? extensionMap.get(basename) ?? null;
65
67
  }
68
+ /** Return the provider whose content classifier confidently claims this file. */
69
+ export function getProviderForFileContent(filePath, content) {
70
+ if (isBladeTemplateFilename(filePath))
71
+ return null;
72
+ for (const provider of Object.values(providers)) {
73
+ if (provider.classifyFileContent?.(filePath, content) === true)
74
+ return provider;
75
+ }
76
+ const byExtension = getProviderForFile(filePath);
77
+ if (byExtension)
78
+ return byExtension;
79
+ // Filename-only languages (Rakefile, Gemfile, …) live in
80
+ // getLanguageFromFilename, not provider.extensions.
81
+ const filenameLang = getLanguageFromFilename(filePath);
82
+ return filenameLang === null ? null : providers[filenameLang];
83
+ }
84
+ /** True when at least one provider wants source text before language bucketing. */
85
+ export function needsContentLanguageClassification(filePath) {
86
+ if (isBladeTemplateFilename(filePath))
87
+ return false;
88
+ return Object.values(providers).some((provider) => provider.classifyFileContent !== undefined &&
89
+ provider.shouldClassifyFileContent?.(filePath) === true);
90
+ }
91
+ /** Return the effective language for a file, optionally using source content. */
92
+ export function getLanguageForFileContent(filePath, content) {
93
+ return getProviderForFileContent(filePath, content)?.id ?? null;
94
+ }
@@ -0,0 +1,10 @@
1
+ import type { AnalysisFeatureDescriptor } from '../../../analysis-features.js';
2
+ /**
3
+ * Durable metadata stamp for Objective-C semantic indexing. The feature id
4
+ * carries provider and grammar versions verbatim so a semantic identity/edge
5
+ * change records the exact producer in index metadata and forces a full rebuild.
6
+ *
7
+ * `.h` is included only as a path-level rebuild predicate; content classification
8
+ * still decides whether a header is actually parsed as Objective-C.
9
+ */
10
+ export declare const OBJECTIVE_C_PROVIDER_FEATURE: AnalysisFeatureDescriptor;
@@ -0,0 +1,19 @@
1
+ import { OBJECTIVE_C_GRAMMAR_PACKAGE, OBJECTIVE_C_GRAMMAR_VERSION, OBJECTIVE_C_PROVIDER_VERSION, } from './facts.js';
2
+ function isObjectiveCProviderCandidatePath(filePath) {
3
+ const normalized = filePath.replaceAll('\\', '/').toLowerCase();
4
+ return normalized.endsWith('.m') || normalized.endsWith('.mm') || normalized.endsWith('.h');
5
+ }
6
+ /**
7
+ * Durable metadata stamp for Objective-C semantic indexing. The feature id
8
+ * carries provider and grammar versions verbatim so a semantic identity/edge
9
+ * change records the exact producer in index metadata and forces a full rebuild.
10
+ *
11
+ * `.h` is included only as a path-level rebuild predicate; content classification
12
+ * still decides whether a header is actually parsed as Objective-C.
13
+ */
14
+ export const OBJECTIVE_C_PROVIDER_FEATURE = {
15
+ id: `objective-c.provider-${OBJECTIVE_C_PROVIDER_VERSION}.` +
16
+ `${OBJECTIVE_C_GRAMMAR_PACKAGE}-${OBJECTIVE_C_GRAMMAR_VERSION}`,
17
+ version: 1,
18
+ appliesTo: (filePaths) => filePaths.some(isObjectiveCProviderCandidatePath),
19
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Header / implementation visibility for `populateNamespaceSiblings`.
3
+ *
4
+ * Objective-C has no Java package or C# namespace. The compilation unit is
5
+ * the workspace analog: `Foo.h` + `Foo.m` in the same directory, and files
6
+ * that declare or implement the same class / protocol, see each other's
7
+ * top-level defs without a second `#import` of a sibling they already share.
8
+ * Bindings go through the append-only `bindingAugmentations` channel
9
+ * (`origin: 'namespace'`), matching Swift / Go.
10
+ */
11
+ import type { ParsedFile } from '../../../../_shared/index.js';
12
+ import type { ScopeResolutionIndexes } from '../../model/scope-resolution-indexes.js';
13
+ export declare function populateObjectiveCCompilationUnitSiblings(parsedFiles: readonly ParsedFile[], indexes: ScopeResolutionIndexes): void;
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Header / implementation visibility for `populateNamespaceSiblings`.
3
+ *
4
+ * Objective-C has no Java package or C# namespace. The compilation unit is
5
+ * the workspace analog: `Foo.h` + `Foo.m` in the same directory, and files
6
+ * that declare or implement the same class / protocol, see each other's
7
+ * top-level defs without a second `#import` of a sibling they already share.
8
+ * Bindings go through the append-only `bindingAugmentations` channel
9
+ * (`origin: 'namespace'`), matching Swift / Go.
10
+ */
11
+ import { isInternalObjectiveCFunctionDef, objectiveCFactsFromParsedFiles, } from './facts.js';
12
+ export function populateObjectiveCCompilationUnitSiblings(parsedFiles, indexes) {
13
+ const groups = new Map();
14
+ const byPath = new Map();
15
+ for (const parsed of parsedFiles) {
16
+ byPath.set(parsed.filePath, parsed);
17
+ const stemKey = compilationUnitStemKey(parsed.filePath);
18
+ if (stemKey !== undefined)
19
+ appendGroup(groups, stemKey, parsed);
20
+ }
21
+ const internalFunctionIds = new Set();
22
+ for (const fact of objectiveCFactsFromParsedFiles(parsedFiles)) {
23
+ const parsed = byPath.get(fact.filePath);
24
+ if (parsed !== undefined) {
25
+ for (const container of fact.containers) {
26
+ appendGroup(groups, `type:${typeVisibilityKey(container)}`, parsed);
27
+ }
28
+ }
29
+ for (const fn of fact.functions) {
30
+ if (fn.linkage === 'internal')
31
+ internalFunctionIds.add(fn.nodeId);
32
+ }
33
+ }
34
+ const augmentations = indexes.bindingAugmentations;
35
+ for (const group of groups.values()) {
36
+ if (group.length < 2)
37
+ continue;
38
+ const unique = uniqueFiles(group);
39
+ if (unique.length < 2)
40
+ continue;
41
+ for (const receiver of unique) {
42
+ const receiverModule = indexes.moduleScopes.byFilePath.get(receiver.filePath);
43
+ if (receiverModule === undefined)
44
+ continue;
45
+ for (const source of unique) {
46
+ if (source.filePath === receiver.filePath)
47
+ continue;
48
+ for (const def of source.localDefs) {
49
+ if (internalFunctionIds.has(def.nodeId) || isInternalObjectiveCFunctionDef(def)) {
50
+ continue;
51
+ }
52
+ const name = siblingBindingName(def);
53
+ if (name === '')
54
+ continue;
55
+ const bucket = getAugmentationBucket(augmentations, receiverModule, name);
56
+ if (bucket.some((binding) => binding.def.nodeId === def.nodeId))
57
+ continue;
58
+ bucket.push({ def, origin: 'namespace' });
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ function compilationUnitStemKey(filePath) {
65
+ const normalized = filePath.replaceAll('\\', '/');
66
+ const slash = normalized.lastIndexOf('/');
67
+ const base = slash === -1 ? normalized : normalized.slice(slash + 1);
68
+ const ext = extensionOf(base);
69
+ if (ext !== '.h' && ext !== '.m' && ext !== '.mm')
70
+ return undefined;
71
+ const dir = slash === -1 ? '' : normalized.slice(0, slash);
72
+ return `stem:${dir}/${base.slice(0, -ext.length)}`;
73
+ }
74
+ /** Class/category/extension files share one group; a same-named protocol does not. */
75
+ function typeVisibilityKey(container) {
76
+ if (container.kind === 'category' || container.kind === 'extension') {
77
+ return `class:${container.hostClass ?? container.name}`;
78
+ }
79
+ return `${container.kind}:${container.name}`;
80
+ }
81
+ function siblingBindingName(def) {
82
+ const qualified = def.qualifiedName ?? '';
83
+ if (qualified.startsWith('objc:')) {
84
+ const colon = qualified.lastIndexOf(':');
85
+ return colon === -1 ? qualified : qualified.slice(colon + 1);
86
+ }
87
+ return qualified.split('.').pop() ?? qualified;
88
+ }
89
+ function extensionOf(fileName) {
90
+ const dot = fileName.lastIndexOf('.');
91
+ return dot === -1 ? '' : fileName.slice(dot).toLowerCase();
92
+ }
93
+ function appendGroup(groups, key, parsed) {
94
+ const bucket = groups.get(key);
95
+ if (bucket === undefined) {
96
+ groups.set(key, [parsed]);
97
+ return;
98
+ }
99
+ bucket.push(parsed);
100
+ }
101
+ function uniqueFiles(group) {
102
+ const seen = new Set();
103
+ const out = [];
104
+ for (const parsed of group) {
105
+ if (seen.has(parsed.filePath))
106
+ continue;
107
+ seen.add(parsed.filePath);
108
+ out.push(parsed);
109
+ }
110
+ return out;
111
+ }
112
+ function getAugmentationBucket(augmentations, scopeId, name) {
113
+ let scopeBindings = augmentations.get(scopeId);
114
+ if (scopeBindings === undefined) {
115
+ scopeBindings = new Map();
116
+ augmentations.set(scopeId, scopeBindings);
117
+ }
118
+ let bucket = scopeBindings.get(name);
119
+ if (bucket === undefined) {
120
+ bucket = [];
121
+ scopeBindings.set(name, bucket);
122
+ }
123
+ return bucket;
124
+ }
@@ -0,0 +1,148 @@
1
+ import type { CaptureMatch, ParsedFile } from '../../../../_shared/index.js';
2
+ import type Parser from 'tree-sitter';
3
+ import type { ProviderSemanticGraph } from '../../language-provider.js';
4
+ import { type SyntaxNode } from '../../utils/ast-helpers.js';
5
+ export declare const OBJECTIVE_C_PROVIDER_VERSION = "0.1.8";
6
+ export declare const OBJECTIVE_C_GRAMMAR_PACKAGE = "tree-sitter-objc";
7
+ export declare const OBJECTIVE_C_GRAMMAR_VERSION = "3.0.2";
8
+ export type ObjCMethodKind = '-' | '+';
9
+ export type ObjCContainerKind = 'class' | 'protocol' | 'category' | 'extension';
10
+ export interface ObjCTypeInfo {
11
+ readonly kind: 'class' | 'protocol' | 'dynamic' | 'class-object' | 'unknown';
12
+ readonly name?: string;
13
+ readonly raw: string;
14
+ }
15
+ export interface ObjCContainerFact {
16
+ readonly kind: ObjCContainerKind;
17
+ readonly declarationRole: 'interface' | 'implementation';
18
+ readonly name: string;
19
+ readonly qualifiedName: string;
20
+ readonly nodeId: string;
21
+ readonly label: 'Class' | 'Protocol' | 'Category';
22
+ readonly filePath: string;
23
+ readonly startLine: number;
24
+ readonly endLine: number;
25
+ readonly superclass?: string;
26
+ readonly protocols: readonly string[];
27
+ readonly hostClass?: string;
28
+ readonly categoryName?: string;
29
+ }
30
+ export interface ObjCMethodFact {
31
+ readonly name: string;
32
+ readonly selector: string;
33
+ readonly methodKind: ObjCMethodKind;
34
+ readonly ownerQualifiedName: string;
35
+ readonly ownerName: string;
36
+ readonly ownerKind: ObjCContainerKind;
37
+ readonly hostClass?: string;
38
+ readonly qualifiedName: string;
39
+ readonly nodeId: string;
40
+ readonly filePath: string;
41
+ readonly startLine: number;
42
+ readonly endLine: number;
43
+ readonly declarationRole: 'declaration' | 'implementation';
44
+ readonly returnType?: string;
45
+ readonly parameterTypes: readonly string[];
46
+ readonly parameterNames: readonly string[];
47
+ }
48
+ export interface ObjCMemberFact {
49
+ readonly kind: 'property' | 'ivar';
50
+ readonly name: string;
51
+ readonly qualifiedName: string;
52
+ readonly nodeId: string;
53
+ readonly ownerQualifiedName: string;
54
+ readonly ownerName: string;
55
+ readonly ownerKind: ObjCContainerKind;
56
+ readonly ownerLabel: 'Class' | 'Protocol' | 'Category';
57
+ readonly hostClass?: string;
58
+ readonly declaredType?: string;
59
+ readonly filePath: string;
60
+ readonly startLine: number;
61
+ readonly endLine: number;
62
+ }
63
+ export interface ObjCFunctionFact {
64
+ readonly name: string;
65
+ readonly linkage: 'external' | 'internal';
66
+ readonly qualifiedName: string;
67
+ readonly nodeId: string;
68
+ readonly filePath: string;
69
+ readonly startLine: number;
70
+ readonly endLine: number;
71
+ readonly returnType?: string;
72
+ readonly parameterTypes: readonly string[];
73
+ }
74
+ export interface ObjCImportFact {
75
+ readonly kind: 'import' | 'include' | 'module';
76
+ readonly raw: string;
77
+ readonly targetRaw: string;
78
+ readonly filePath: string;
79
+ readonly startLine: number;
80
+ readonly endLine: number;
81
+ }
82
+ export interface ObjCMessageFact {
83
+ readonly selector: string;
84
+ readonly receiverText: string;
85
+ readonly receiverKind: 'self' | 'super' | 'class' | 'local' | 'property' | 'ivar' | 'dynamic' | 'unknown';
86
+ readonly receiverType?: ObjCTypeInfo;
87
+ /** Member name retained when its type must be resolved across files. */
88
+ readonly receiverMemberName?: string;
89
+ readonly sourceMethodQualifiedName: string;
90
+ readonly sourceMethodId: string;
91
+ readonly sourceOwnerQualifiedName: string;
92
+ readonly sourceOwnerName: string;
93
+ readonly sourceMethodKind: ObjCMethodKind;
94
+ readonly filePath: string;
95
+ readonly startLine: number;
96
+ readonly startCol: number;
97
+ }
98
+ export interface ObjCUnresolvedMessageFact {
99
+ readonly selector: string;
100
+ readonly receiverText: string;
101
+ readonly reason: string;
102
+ readonly sourceMethodQualifiedName: string;
103
+ readonly sourceMethodId: string;
104
+ readonly filePath: string;
105
+ readonly startLine: number;
106
+ readonly startCol: number;
107
+ }
108
+ export interface ObjCFileFacts {
109
+ readonly providerVersion: string;
110
+ readonly grammarPackage: string;
111
+ readonly grammarVersion: string;
112
+ readonly filePath: string;
113
+ readonly containers: readonly ObjCContainerFact[];
114
+ readonly methods: readonly ObjCMethodFact[];
115
+ readonly members: readonly ObjCMemberFact[];
116
+ readonly functions: readonly ObjCFunctionFact[];
117
+ readonly imports: readonly ObjCImportFact[];
118
+ readonly messages: readonly ObjCMessageFact[];
119
+ readonly unresolvedMessages: readonly ObjCUnresolvedMessageFact[];
120
+ }
121
+ export interface ObjCCaptureSideChannel {
122
+ readonly kind: 'objective-c';
123
+ readonly facts: ObjCFileFacts;
124
+ }
125
+ export declare function setObjectiveCFileFacts(facts: ObjCFileFacts): void;
126
+ export declare function getObjectiveCFileFacts(filePath: string): ObjCFileFacts | undefined;
127
+ /** Drop process-local facts before a new workspace pass (Java/Kotlin analog). */
128
+ export declare function clearObjectiveCFileFacts(): void;
129
+ export declare function collectObjectiveCCaptureSideChannel(filePath: string): ObjCCaptureSideChannel | undefined;
130
+ export declare function applyObjectiveCCaptureSideChannel(parsed: ParsedFile): void;
131
+ export declare function objectiveCFactsFromParsedFiles(parsedFiles: readonly ParsedFile[]): ObjCFileFacts[];
132
+ export declare const objcClassQualifiedName: (name: string) => string;
133
+ export declare const objcProtocolQualifiedName: (name: string) => string;
134
+ export declare const objcCategoryQualifiedName: (hostClass: string, categoryName: string) => string;
135
+ export declare const objcMethodQualifiedName: (ownerQualifiedName: string, methodKind: ObjCMethodKind, selector: string) => string;
136
+ export declare const objcPropertyQualifiedName: (ownerQualifiedName: string, name: string) => string;
137
+ export declare const objcIvarQualifiedName: (ownerQualifiedName: string, name: string) => string;
138
+ export declare const objcFunctionQualifiedName: (name: string, linkage?: "external" | "internal", filePath?: string) => string;
139
+ /** True for C functions this provider models as translation-unit local. */
140
+ export declare function isInternalObjectiveCFunctionDef(def: {
141
+ readonly nodeId?: string;
142
+ readonly qualifiedName?: string;
143
+ }): boolean;
144
+ export declare const objcUnresolvedMessageQualifiedName: (filePath: string, startLine: number, startCol: number, selector: string) => string;
145
+ export declare function parseObjCType(raw: string | undefined): ObjCTypeInfo | undefined;
146
+ export declare function collectObjectiveCFacts(tree: Parser.Tree, filePath: string): ObjCFileFacts;
147
+ export declare function buildObjectiveCSemanticGraph(facts: ObjCFileFacts): ProviderSemanticGraph;
148
+ export declare function buildObjectiveCScopeCaptures(facts: ObjCFileFacts, root: SyntaxNode): readonly CaptureMatch[];