@shapeshift-labs/frontier-lang-compiler 0.2.32 → 0.2.34

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.
package/README.md CHANGED
@@ -336,8 +336,10 @@ import {
336
336
  createCSharpRoslynNativeImporterAdapter,
337
337
  createGoAstNativeImporterAdapter,
338
338
  createJavaAstNativeImporterAdapter,
339
+ createKotlinPsiNativeImporterAdapter,
339
340
  createPythonAstNativeImporterAdapter,
340
341
  createRustSynNativeImporterAdapter,
342
+ createSwiftSyntaxNativeImporterAdapter,
341
343
  importNativeProject,
342
344
  runNativeImporterAdapter
343
345
  } from '@shapeshift-labs/frontier-lang-compiler';
@@ -366,6 +368,11 @@ const javaAstAdapter = createJavaAstNativeImporterAdapter({
366
368
  javaVersion: '21',
367
369
  sourceLevel: '21'
368
370
  });
371
+ const kotlinPsiAdapter = createKotlinPsiNativeImporterAdapter({
372
+ parserModule: hostKotlinPsiParser,
373
+ kotlinVersion: '2.1',
374
+ analysisApiEvidence: { hash: kotlinAnalysisApiIndexHash }
375
+ });
369
376
  const csharpRoslynAdapter = createCSharpRoslynNativeImporterAdapter({
370
377
  parserModule: hostRoslynParser,
371
378
  languageVersion: '12',
@@ -384,7 +391,7 @@ const imported = await runNativeImporterAdapter(babelAdapter, {
384
391
 
385
392
  const project = await importNativeProject({
386
393
  projectRoot: 'src',
387
- adapters: [babelAdapter, pythonAstAdapter, rustSynAdapter, clangAstAdapter, goAstAdapter, javaAstAdapter, csharpRoslynAdapter, swiftSyntaxAdapter],
394
+ adapters: [babelAdapter, pythonAstAdapter, rustSynAdapter, clangAstAdapter, goAstAdapter, javaAstAdapter, kotlinPsiAdapter, csharpRoslynAdapter, swiftSyntaxAdapter],
388
395
  sources: [
389
396
  { language: 'typescript', adapter: babelAdapter.id, sourcePath: 'src/todo.ts', sourceText },
390
397
  { language: 'python', adapter: pythonAstAdapter.id, sourcePath: 'tools/todo.py', sourceText: pythonSource },
@@ -392,6 +399,7 @@ const project = await importNativeProject({
392
399
  { language: 'c', adapter: clangAstAdapter.id, sourcePath: 'native/todo.c', sourceText: cSource },
393
400
  { language: 'go', adapter: goAstAdapter.id, sourcePath: 'cmd/todo/main.go', sourceText: goSource },
394
401
  { language: 'java', adapter: javaAstAdapter.id, sourcePath: 'src/main/java/Todo.java', sourceText: javaSource },
402
+ { language: 'kotlin', adapter: kotlinPsiAdapter.id, sourcePath: 'src/main/kotlin/Todo.kt', sourceText: kotlinSource },
395
403
  { language: 'csharp', adapter: csharpRoslynAdapter.id, sourcePath: 'src/Todo.cs', sourceText: csharpSource },
396
404
  { language: 'swift', adapter: swiftSyntaxAdapter.id, sourcePath: 'Sources/Todo.swift', sourceText: swiftSource }
397
405
  ]
@@ -417,6 +425,7 @@ The built-in adapter factories are dependency-light wrappers for caller-owned pa
417
425
  - `createClangAstNativeImporterAdapter`
418
426
  - `createGoAstNativeImporterAdapter`
419
427
  - `createJavaAstNativeImporterAdapter`
428
+ - `createKotlinPsiNativeImporterAdapter`
420
429
  - `createCSharpRoslynNativeImporterAdapter`
421
430
  - `createSwiftSyntaxNativeImporterAdapter`
422
431
  - `createTreeSitterNativeImporterAdapter`
@@ -456,8 +465,8 @@ The published Frontier package family is generated from one shared package catal
456
465
  - [`@shapeshift-labs/frontier-workflow`](https://www.npmjs.com/package/@shapeshift-labs/frontier-workflow): Serializable durable workflow/process manifests for Frontier apps, including steps, waits, approvals, timers, retries, expected patches, compensation, records, timelines, and registry graph output.
457
466
  - [`@shapeshift-labs/frontier-worker`](https://www.npmjs.com/package/@shapeshift-labs/frontier-worker): Serializable worker and edge task descriptors for Frontier apps, including queues, idempotency keys, retry and timeout policy, declared reads/writes/effects, snapshots, patch outputs, produced assets, execution records, logs, trace links, proof hashes, dedupe indexes, and registry graph output.
458
467
  - [`@shapeshift-labs/frontier-queue`](https://www.npmjs.com/package/@shapeshift-labs/frontier-queue): Serializable durable queue state, leases, retries, dedupe keys, patch-carrying jobs, dead-letter records, replay evidence, and queue inspection for Frontier apps.
459
- - [`@shapeshift-labs/frontier-swarm`](https://www.npmjs.com/package/@shapeshift-labs/frontier-swarm): Hierarchical swarm plans, lanes, compute profiles, ownership policy, semantic ownership regions, task queues, event streams, run records, merge bundles, merge indexes, queue overlays, merge admission, changed-path checks, and proof artifacts for Frontier agent work.
460
- - [`@shapeshift-labs/frontier-swarm-codex`](https://www.npmjs.com/package/@shapeshift-labs/frontier-swarm-codex): Node Codex CLI adapter for Frontier swarm plans, including prompt rendering, worktree and snapshot workspaces, Codex argument compatibility, browser resource allocation, JSONL capture, verification commands, pid-backed stop, collect/apply workflows, merge indexes, queue overlays, merge bundles, and result artifacts.
468
+ - [`@shapeshift-labs/frontier-swarm`](https://www.npmjs.com/package/@shapeshift-labs/frontier-swarm): Hierarchical swarm plans, lanes, compute profiles, ownership policy, semantic ownership regions, task queues, event streams, run records, merge bundles, merge indexes, queue overlays, merge admission, coordinator dashboards, changed-path checks, and proof artifacts for Frontier agent work.
469
+ - [`@shapeshift-labs/frontier-swarm-codex`](https://www.npmjs.com/package/@shapeshift-labs/frontier-swarm-codex): Node Codex CLI adapter for Frontier swarm plans, including prompt rendering, worktree and snapshot workspaces, Codex argument compatibility, browser resource allocation, JSONL capture, verification commands, pid-backed stop, collect/apply workflows, merge indexes, queue overlays, merge bundles, normalized job evidence, coordinator query artifacts, and result artifacts.
461
470
  - [`@shapeshift-labs/frontier-lang-kernel`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-kernel): Runtime-neutral semantic source graph, type/lattice/extern declarations, patch bundles, replay, hashing, evidence records, and merge-admission kernel for Frontier Lang.
462
471
  - [`@shapeshift-labs/frontier-lang-parser`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-parser): Dependency-light Frontier Lang parser for modules, entities, state, actions, effects, types, externs, targets, and lattice declarations.
463
472
  - [`@shapeshift-labs/frontier-lang-checker`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-checker): Checker and diagnostics for Frontier Lang semantic documents, including type symbols, effects, regions, lattice laws, CRDT metadata, and patch evidence.
@@ -466,6 +475,8 @@ The published Frontier package family is generated from one shared package catal
466
475
  - [`@shapeshift-labs/frontier-lang-rust`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-rust): Rust projection adapter for Frontier Lang semantic documents, including structs, aliases, and action stubs.
467
476
  - [`@shapeshift-labs/frontier-lang-python`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-python): Python projection adapter for Frontier Lang semantic documents, including dataclasses, typed patch records, and action stubs.
468
477
  - [`@shapeshift-labs/frontier-lang-c`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-c): C header projection adapter for Frontier Lang semantic documents, including structs and action prototypes.
478
+ - [`@shapeshift-labs/frontier-lang-swift`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-swift): Swift source-language importer package for Frontier Lang semantic documents, including package-level metadata, SwiftSyntax adapter helpers, native import results, and semantic sidecar generation for SwiftSyntax/SwiftParser-shaped syntax trees.
479
+ - [`@shapeshift-labs/frontier-lang-kotlin`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-kotlin): Kotlin PSI source-language importer package for Frontier Lang semantic documents, including package-level metadata, Kotlin PSI adapter helpers, native import results, and semantic sidecar generation for Kotlin PSI/KtFile-shaped syntax trees.
469
480
  - [`@shapeshift-labs/frontier-lang-java`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-java): Java source-language importer package for Frontier Lang semantic documents, including package-level metadata, Java AST adapter helpers, native import results, and semantic sidecar generation for javac/JDT/JavaParser-shaped ASTs.
470
481
  - [`@shapeshift-labs/frontier-lang-go`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-go): Go source-language importer package for Frontier Lang semantic documents, including package-level metadata, Go AST adapter helpers, native import results, and semantic sidecar generation for go/ast File or Package trees.
471
482
  - [`@shapeshift-labs/frontier-lang-csharp`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-csharp): C# Roslyn source-language importer package for Frontier Lang semantic documents, including package-level metadata, Roslyn adapter helpers, native import results, and semantic sidecar generation for SyntaxTree/SyntaxNode-shaped ASTs.
@@ -557,6 +568,8 @@ Package source repositories:
557
568
  - [`siliconjungle/-shapeshift-labs-frontier-lang-python`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-python)
558
569
  - [`siliconjungle/-shapeshift-labs-frontier-lang-c`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-c)
559
570
  - [`siliconjungle/-shapeshift-labs-frontier-lang-compiler`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-compiler)
571
+ - [`siliconjungle/-shapeshift-labs-frontier-lang-swift`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-swift)
572
+ - [`siliconjungle/-shapeshift-labs-frontier-lang-kotlin`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-kotlin)
560
573
  - [`siliconjungle/-shapeshift-labs-frontier-lang-java`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-java)
561
574
  - [`siliconjungle/-shapeshift-labs-frontier-lang-go`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-go)
562
575
  - [`siliconjungle/-shapeshift-labs-frontier-lang-csharp`](https://github.com/siliconjungle/-shapeshift-labs-frontier-lang-csharp)
package/bench/smoke.mjs CHANGED
@@ -7,8 +7,10 @@ import {
7
7
  createEstreeNativeImporterAdapter,
8
8
  createGoAstNativeImporterAdapter,
9
9
  createJavaAstNativeImporterAdapter,
10
+ createKotlinPsiNativeImporterAdapter,
10
11
  createNativeImportCoverageMatrix,
11
12
  createNativeParserAstFormatMatrix,
13
+ createNativeParserFeatureMatrix,
12
14
  createProjectionTargetLossMatrix,
13
15
  createNativeSourcePreservation,
14
16
  createPythonAstNativeImporterAdapter,
@@ -19,6 +21,7 @@ import {
19
21
  importExternalSemanticIndex,
20
22
  importNativeSource,
21
23
  projectNativeImportToSource,
24
+ queryNativeParserFeatureMatrix,
22
25
  runNativeImporterAdapter,
23
26
  summarizeNativeImportFeatureEvidence
24
27
  } from '../dist/index.js';
@@ -48,6 +51,7 @@ const compileDurationMs = performance.now() - start;
48
51
 
49
52
  const importStart = performance.now();
50
53
  const estreeAdapter = createEstreeNativeImporterAdapter();
54
+ const kotlinPsiAdapter = createKotlinPsiNativeImporterAdapter();
51
55
  let nativeSymbols = 0;
52
56
  const nativeImportResults = [];
53
57
  for (let index = 0; index < 150; index += 1) {
@@ -75,6 +79,37 @@ for (let index = 0; index < 150; index += 1) {
75
79
  nativeSymbols += imported.semanticIndex?.symbols?.length ?? 0;
76
80
  nativeImportResults.push(imported);
77
81
  }
82
+ for (let index = 0; index < 50; index += 1) {
83
+ const imported = await runNativeImporterAdapter(kotlinPsiAdapter, {
84
+ sourcePath: `src/bench-${index}.kt`,
85
+ sourceText: `package bench\nclass BenchKotlin${index}(val title: String) { fun render${index}() = title }\n`,
86
+ adapterOptions: {
87
+ ast: {
88
+ kind: 'KtFile',
89
+ packageDirective: { kind: 'KtPackageDirective', fqName: 'bench' },
90
+ declarations: [{
91
+ kind: 'KtClass',
92
+ name: `BenchKotlin${index}`,
93
+ declarations: [{
94
+ kind: 'KtPrimaryConstructor',
95
+ parameters: [{
96
+ kind: 'KtParameter',
97
+ name: 'title',
98
+ typeReference: { text: 'String' },
99
+ valOrVarKeyword: 'val'
100
+ }]
101
+ }, {
102
+ kind: 'KtNamedFunction',
103
+ name: `render${index}`,
104
+ bodyExpression: { kind: 'KtBlockExpression' }
105
+ }]
106
+ }]
107
+ }
108
+ }
109
+ });
110
+ nativeSymbols += imported.semanticIndex?.symbols?.length ?? 0;
111
+ nativeImportResults.push(imported);
112
+ }
78
113
  const importDurationMs = performance.now() - importStart;
79
114
 
80
115
  const matrixStart = performance.now();
@@ -84,10 +119,23 @@ const matrixDurationMs = performance.now() - matrixStart;
84
119
  const parserFormatMatrixStart = performance.now();
85
120
  const parserFormatMatrix = createNativeParserAstFormatMatrix({
86
121
  imports: nativeImportResults,
87
- adapters: [estreeAdapter, createPythonAstNativeImporterAdapter(), createRustSynNativeImporterAdapter(), createClangAstNativeImporterAdapter(), createGoAstNativeImporterAdapter(), createJavaAstNativeImporterAdapter(), createCSharpRoslynNativeImporterAdapter(), createSwiftSyntaxNativeImporterAdapter()]
122
+ adapters: [estreeAdapter, createPythonAstNativeImporterAdapter(), createRustSynNativeImporterAdapter(), createClangAstNativeImporterAdapter(), createGoAstNativeImporterAdapter(), createJavaAstNativeImporterAdapter(), kotlinPsiAdapter, createCSharpRoslynNativeImporterAdapter(), createSwiftSyntaxNativeImporterAdapter()]
88
123
  });
89
124
  const parserFormatMatrixDurationMs = performance.now() - parserFormatMatrixStart;
90
125
 
126
+ const parserFeatureMatrixStart = performance.now();
127
+ const parserFeatureMatrix = createNativeParserFeatureMatrix({
128
+ imports: nativeImportResults,
129
+ adapters: [estreeAdapter, createPythonAstNativeImporterAdapter(), createRustSynNativeImporterAdapter(), createClangAstNativeImporterAdapter(), createGoAstNativeImporterAdapter(), createJavaAstNativeImporterAdapter(), kotlinPsiAdapter, createCSharpRoslynNativeImporterAdapter(), createSwiftSyntaxNativeImporterAdapter()],
130
+ requiredFeatures: ['syntax', 'semantic', 'sourcePreservation']
131
+ });
132
+ const parserFeatureQuery = queryNativeParserFeatureMatrix(parserFeatureMatrix, {
133
+ language: 'javascript',
134
+ parser: 'estree',
135
+ requiredFeatures: ['syntax', 'semantic', 'sourcePreservation']
136
+ });
137
+ const parserFeatureMatrixDurationMs = performance.now() - parserFeatureMatrixStart;
138
+
91
139
  const projectionMatrixStart = performance.now();
92
140
  const projectionLossMatrix = createProjectionTargetLossMatrix({ imports: nativeImportResults });
93
141
  const projectionMatrixDurationMs = performance.now() - projectionMatrixStart;
@@ -233,7 +281,7 @@ console.log(JSON.stringify({
233
281
  compiles: 250,
234
282
  bytes,
235
283
  compileDurationMs: Number(compileDurationMs.toFixed(2)),
236
- nativeImports: 150,
284
+ nativeImports: nativeImportResults.length,
237
285
  nativeSymbols,
238
286
  nativeImportDurationMs: Number(importDurationMs.toFixed(2)),
239
287
  coverageMatrixLanguages: coverageMatrix.summary.languages,
@@ -247,6 +295,11 @@ console.log(JSON.stringify({
247
295
  parserFormatMatrixImports: parserFormatMatrix.summary.imports,
248
296
  parserFormatMatrixNativeAstNodes: parserFormatMatrix.summary.nativeAstNodes,
249
297
  parserFormatMatrixDurationMs: Number(parserFormatMatrixDurationMs.toFixed(2)),
298
+ parserFeatureMatrixParsers: parserFeatureMatrix.summary.parsers,
299
+ parserFeatureMatrixMergeReady: parserFeatureMatrix.summary.mergeReady,
300
+ parserFeatureMatrixSyntaxFull: parserFeatureMatrix.summary.byFeatureStatus.syntax?.full ?? 0,
301
+ parserFeatureQueryMergeReady: parserFeatureQuery.merge.mergeReady,
302
+ parserFeatureMatrixDurationMs: Number(parserFeatureMatrixDurationMs.toFixed(2)),
250
303
  projectionMatrixLanguages: projectionLossMatrix.summary.languages,
251
304
  projectionMatrixMissingAdapters: projectionLossMatrix.summary.missingAdapters,
252
305
  projectionMatrixUnsupportedTargetFeatures: projectionLossMatrix.summary.unsupportedTargetFeatures,
package/dist/index.d.ts CHANGED
@@ -318,6 +318,161 @@ export interface NativeParserAstFormatMatrixOptions {
318
318
  readonly generatedAt?: number;
319
319
  }
320
320
 
321
+ export type NativeParserFeatureCategory =
322
+ | 'syntax'
323
+ | 'semantic'
324
+ | 'type'
325
+ | 'controlFlow'
326
+ | 'macroMetaprogramming'
327
+ | 'sourcePreservation'
328
+ | string;
329
+
330
+ export type NativeParserFeatureCoverageStatus =
331
+ | 'full'
332
+ | 'partial'
333
+ | 'evidence-required'
334
+ | 'missing'
335
+ | 'blocked'
336
+ | 'not-applicable'
337
+ | string;
338
+
339
+ export interface NativeParserFeatureCoverage {
340
+ readonly category: NativeParserFeatureCategory;
341
+ readonly status: NativeParserFeatureCoverageStatus;
342
+ readonly readiness: SemanticMergeReadiness;
343
+ readonly mergeReady: boolean;
344
+ readonly supported: boolean;
345
+ readonly capabilities: Readonly<Record<string, unknown>>;
346
+ readonly gaps: readonly string[];
347
+ readonly lossKinds: Readonly<Record<string, number>>;
348
+ readonly reasons: readonly string[];
349
+ readonly notes: readonly string[];
350
+ }
351
+
352
+ export interface NativeParserFeatureCoverageMap {
353
+ readonly syntax: NativeParserFeatureCoverage;
354
+ readonly semantic: NativeParserFeatureCoverage;
355
+ readonly type: NativeParserFeatureCoverage;
356
+ readonly controlFlow: NativeParserFeatureCoverage;
357
+ readonly macroMetaprogramming: NativeParserFeatureCoverage;
358
+ readonly sourcePreservation: NativeParserFeatureCoverage;
359
+ readonly [category: string]: NativeParserFeatureCoverage;
360
+ }
361
+
362
+ export interface NativeParserFeatureMergeAssessment {
363
+ readonly mergeReady: boolean;
364
+ readonly readiness: SemanticMergeReadiness;
365
+ readonly requiredFeatures: readonly NativeParserFeatureCategory[];
366
+ readonly minimumReadiness: SemanticMergeReadiness;
367
+ readonly blockingFeatures: readonly NativeParserFeatureCategory[];
368
+ readonly reviewFeatures: readonly NativeParserFeatureCategory[];
369
+ readonly reasons: readonly string[];
370
+ }
371
+
372
+ export interface NativeParserFeatureParserRow {
373
+ readonly language: FrontierSourceLanguage | string;
374
+ readonly aliases: readonly string[];
375
+ readonly parser: string;
376
+ readonly parserFormat: string;
377
+ readonly parserAliases: readonly string[];
378
+ readonly parserAdapters: readonly string[];
379
+ readonly extensions: readonly string[];
380
+ readonly supportsLightweightScan: boolean;
381
+ readonly projectionTargets: readonly (FrontierCompileTarget | string)[];
382
+ readonly knownLossKinds: readonly NativeImportKnownLossKind[];
383
+ readonly defaultReadiness: SemanticMergeReadiness;
384
+ readonly notes: readonly string[];
385
+ readonly adapters: {
386
+ readonly total: number;
387
+ readonly ids: readonly string[];
388
+ readonly versions: readonly string[];
389
+ readonly exactness: readonly NativeImporterAdapterExactness[];
390
+ readonly coverage: NativeImporterAdapterCoverageAggregate;
391
+ };
392
+ readonly imports: {
393
+ readonly total: number;
394
+ readonly sourcePaths: readonly string[];
395
+ readonly readiness: SemanticMergeReadiness;
396
+ readonly readinessReasons: readonly string[];
397
+ readonly nativeAstNodes: number;
398
+ readonly symbols: number;
399
+ readonly references: number;
400
+ readonly types: number;
401
+ readonly controlFlow: number;
402
+ readonly sourceMaps: number;
403
+ readonly sourceMapMappings: number;
404
+ readonly losses: number;
405
+ readonly lossKinds: Readonly<Record<string, number>>;
406
+ readonly lossCategories: readonly NativeImportTaxonomyKind[];
407
+ readonly sourcePreservation: NativeImportSourcePreservationContract;
408
+ };
409
+ readonly features: NativeParserFeatureCoverageMap;
410
+ readonly merge: NativeParserFeatureMergeAssessment;
411
+ }
412
+
413
+ export interface NativeParserFeatureLanguageSummary {
414
+ readonly language: FrontierSourceLanguage | string;
415
+ readonly aliases: readonly string[];
416
+ readonly parserRows: number;
417
+ readonly parsers: readonly string[];
418
+ readonly imports: number;
419
+ readonly adapters: number;
420
+ readonly mergeReadyParsers: readonly string[];
421
+ readonly readiness: SemanticMergeReadiness;
422
+ }
423
+
424
+ export interface NativeParserFeatureMatrix {
425
+ readonly kind: 'frontier.lang.nativeParserFeatureMatrix';
426
+ readonly version: 1;
427
+ readonly generatedAt: number;
428
+ readonly parsers: readonly NativeParserFeatureParserRow[];
429
+ readonly languages: readonly NativeParserFeatureLanguageSummary[];
430
+ readonly summary: {
431
+ readonly languages: number;
432
+ readonly parsers: number;
433
+ readonly imports: number;
434
+ readonly adapters: number;
435
+ readonly mergeReady: number;
436
+ readonly byReadiness: Readonly<Record<SemanticMergeReadiness, number>>;
437
+ readonly byFeatureStatus: Readonly<Record<NativeParserFeatureCategory, Readonly<Record<NativeParserFeatureCoverageStatus, number>>>>;
438
+ readonly byFeatureReadiness: Readonly<Record<NativeParserFeatureCategory, Readonly<Record<SemanticMergeReadiness, number>>>>;
439
+ };
440
+ readonly metadata: {
441
+ readonly categories: readonly NativeParserFeatureCategory[];
442
+ readonly statuses: readonly NativeParserFeatureCoverageStatus[];
443
+ readonly requiredFeatures: readonly NativeParserFeatureCategory[];
444
+ readonly minimumReadiness: SemanticMergeReadiness;
445
+ readonly note: string;
446
+ };
447
+ }
448
+
449
+ export interface NativeParserFeatureMatrixOptions {
450
+ readonly languages?: readonly NativeImportLanguageProfile[];
451
+ readonly imports?: readonly NativeSourceImportResult[];
452
+ readonly adapters?: readonly NativeImporterAdapter[];
453
+ readonly requiredFeatures?: readonly NativeParserFeatureCategory[];
454
+ readonly minimumReadiness?: SemanticMergeReadiness;
455
+ readonly includeEmptyParsers?: boolean;
456
+ readonly generatedAt?: number;
457
+ }
458
+
459
+ export interface NativeParserFeatureMatrixQuery {
460
+ readonly language?: FrontierSourceLanguage | string;
461
+ readonly parser?: string;
462
+ readonly requiredFeatures?: readonly NativeParserFeatureCategory[];
463
+ readonly minimumReadiness?: SemanticMergeReadiness;
464
+ }
465
+
466
+ export interface NativeParserFeatureMatrixQueryResult {
467
+ readonly kind: 'frontier.lang.nativeParserFeatureQuery';
468
+ readonly version: 1;
469
+ readonly found: boolean;
470
+ readonly language?: FrontierSourceLanguage | string;
471
+ readonly parser?: string;
472
+ readonly row?: NativeParserFeatureParserRow;
473
+ readonly merge: NativeParserFeatureMergeAssessment;
474
+ }
475
+
321
476
  export interface NativeImporterAdapterCoverageAggregate {
322
477
  readonly total: number;
323
478
  readonly declared: Readonly<Record<string, number>>;
@@ -1497,6 +1652,45 @@ export interface JavaAstNativeImporterAdapterOptions {
1497
1652
  readonly maxNodes?: number;
1498
1653
  }
1499
1654
 
1655
+ export interface KotlinPsiNativeImporterAdapterOptions {
1656
+ readonly id?: string;
1657
+ readonly language?: FrontierSourceLanguage;
1658
+ readonly parser?: string;
1659
+ readonly version?: string;
1660
+ readonly capabilities?: readonly string[];
1661
+ readonly coverage?: NativeImporterAdapterCoverageInput;
1662
+ readonly supportedExtensions?: readonly string[];
1663
+ readonly diagnostics?: readonly NativeImporterAdapterDiagnostic[];
1664
+ readonly ast?: unknown;
1665
+ readonly nativeAst?: unknown;
1666
+ readonly ktFile?: unknown;
1667
+ readonly file?: unknown;
1668
+ readonly sourceFile?: unknown;
1669
+ readonly root?: unknown;
1670
+ readonly parse?: (sourceText: string, options: Record<string, unknown>) => unknown;
1671
+ readonly parserModule?: { readonly parse: (sourceText: string, options: Record<string, unknown>) => unknown };
1672
+ readonly kotlinPsi?: { readonly parse: (sourceText: string, options: Record<string, unknown>) => unknown };
1673
+ readonly kotlinCompiler?: { readonly parse: (sourceText: string, options: Record<string, unknown>) => unknown };
1674
+ readonly intellijPsi?: { readonly parse: (sourceText: string, options: Record<string, unknown>) => unknown };
1675
+ readonly parserOptions?: Record<string, unknown>;
1676
+ readonly kotlinVersion?: string;
1677
+ readonly languageVersion?: string;
1678
+ readonly apiVersion?: string;
1679
+ readonly script?: boolean;
1680
+ readonly generated?: boolean;
1681
+ readonly analysisApiEvidence?: unknown;
1682
+ readonly firEvidence?: unknown;
1683
+ readonly compilerPluginEvidence?: unknown;
1684
+ readonly kspEvidence?: unknown;
1685
+ readonly kaptEvidence?: unknown;
1686
+ readonly multiplatformEvidence?: unknown;
1687
+ readonly buildVariantEvidence?: unknown;
1688
+ readonly positionResolver?: (position: unknown) => unknown;
1689
+ readonly lineMap?: unknown;
1690
+ readonly includeAnnotations?: boolean;
1691
+ readonly maxNodes?: number;
1692
+ }
1693
+
1500
1694
  export interface CSharpRoslynNativeImporterAdapterOptions {
1501
1695
  readonly id?: string;
1502
1696
  readonly language?: FrontierSourceLanguage;
@@ -1903,6 +2097,8 @@ export declare const NativeImportTaxonomyKinds: readonly NativeImportTaxonomyKin
1903
2097
  export declare const NativeImportLossKinds: readonly NativeImportKnownLossKind[];
1904
2098
  export declare const NativeImportRegionTaxonomyKinds: readonly NativeImportRegionTaxonomyKind[];
1905
2099
  export declare const ProjectionTargetLossClasses: readonly ProjectionTargetLossClass[];
2100
+ export declare const NativeParserFeatureCategories: readonly NativeParserFeatureCategory[];
2101
+ export declare const NativeParserFeatureCoverageStatuses: readonly NativeParserFeatureCoverageStatus[];
1906
2102
  export declare const NativeImportReadinessBySeverity: Readonly<Record<NativeImportLossSummary['highestSeverity'], SemanticMergeReadiness>>;
1907
2103
  export declare const NativeImportFeatureEvidencePolicies: Readonly<Record<string, NativeImportFeatureEvidencePolicy>>;
1908
2104
  export declare const NativeImportLanguageProfiles: readonly NativeImportLanguageProfile[];
@@ -1926,6 +2122,8 @@ export declare function classifyNativeImportRoundtripReadiness(importResult: Nat
1926
2122
  export declare function createNativeImportCoverageMatrix(options?: NativeImportCoverageMatrixOptions): NativeImportCoverageMatrix;
1927
2123
  export declare function getNativeParserAstFormatProfile(format?: string): NativeParserAstFormatProfile | undefined;
1928
2124
  export declare function createNativeParserAstFormatMatrix(options?: NativeParserAstFormatMatrixOptions): NativeParserAstFormatMatrix;
2125
+ export declare function createNativeParserFeatureMatrix(options?: NativeParserFeatureMatrixOptions): NativeParserFeatureMatrix;
2126
+ export declare function queryNativeParserFeatureMatrix(matrixOrOptions?: NativeParserFeatureMatrix | NativeParserFeatureMatrixOptions, query?: NativeParserFeatureMatrixQuery): NativeParserFeatureMatrixQueryResult;
1929
2127
  export declare function createProjectionTargetLossMatrix(options?: ProjectionTargetLossMatrixOptions): ProjectionTargetLossMatrix;
1930
2128
  export declare function createNativeSourcePreservation(options: CreateNativeSourcePreservationOptions): NativeSourcePreservation;
1931
2129
  export declare function createSemanticImportSidecar(importResult: NativeSourceImportResult | NativeProjectImportResult, options?: SemanticImportSidecarOptions): SemanticImportSidecar;
@@ -1938,6 +2136,7 @@ export declare function createRustSynNativeImporterAdapter(options?: RustSynNati
1938
2136
  export declare function createClangAstNativeImporterAdapter(options?: ClangAstNativeImporterAdapterOptions): NativeImporterAdapter;
1939
2137
  export declare function createGoAstNativeImporterAdapter(options?: GoAstNativeImporterAdapterOptions): NativeImporterAdapter;
1940
2138
  export declare function createJavaAstNativeImporterAdapter(options?: JavaAstNativeImporterAdapterOptions): NativeImporterAdapter;
2139
+ export declare function createKotlinPsiNativeImporterAdapter(options?: KotlinPsiNativeImporterAdapterOptions): NativeImporterAdapter;
1941
2140
  export declare function createCSharpRoslynNativeImporterAdapter(options?: CSharpRoslynNativeImporterAdapterOptions): NativeImporterAdapter;
1942
2141
  export declare function createSwiftSyntaxNativeImporterAdapter(options?: SwiftSyntaxNativeImporterAdapterOptions): NativeImporterAdapter;
1943
2142
  export declare function createTreeSitterNativeImporterAdapter(options?: TreeSitterNativeImporterAdapterOptions): NativeImporterAdapter;