@shapeshift-labs/frontier-swarm 0.5.8 → 0.5.10
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 +63 -4
- package/benchmarks/package-bench.mjs +47 -0
- package/dist/index.d.ts +261 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +358 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ The published Frontier package family is generated from one shared package catal
|
|
|
45
45
|
- [`@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.
|
|
46
46
|
- [`@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.
|
|
47
47
|
- [`@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.
|
|
48
|
-
- [`@shapeshift-labs/frontier-lang-compiler`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-compiler): Compiler facade for Frontier Lang source documents, including parse, check, hash, diagnostics, projection to TypeScript, JavaScript, Rust, Python, and C, and native source-import adapters for semantic merge evidence.
|
|
48
|
+
- [`@shapeshift-labs/frontier-lang-compiler`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-compiler): Compiler facade for Frontier Lang source documents, including parse, check, hash, diagnostics, universal AST envelopes, proof/paradigm semantic summaries, projection to TypeScript, JavaScript, Rust, Python, and C, and native source-import adapters for semantic merge evidence.
|
|
49
49
|
- [`@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.
|
|
50
50
|
- [`@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.
|
|
51
51
|
- [`@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.
|
|
@@ -53,7 +53,7 @@ The published Frontier package family is generated from one shared package catal
|
|
|
53
53
|
- [`@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.
|
|
54
54
|
- [`@shapeshift-labs/frontier-lang-clang`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-clang): Clang AST source-language importer package for Frontier Lang semantic documents, including package-level metadata, Clang AST JSON adapter helpers, native import results, and semantic sidecar generation for C/C++ translation units.
|
|
55
55
|
- [`@shapeshift-labs/frontier-lang-cli`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang-cli): Command line interface for parsing, checking, hashing, and emitting Frontier Lang projects.
|
|
56
|
-
- [`@shapeshift-labs/frontier-lang`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang): Umbrella package for Frontier Lang kernel, parser, checker, and projection adapters.
|
|
56
|
+
- [`@shapeshift-labs/frontier-lang`](https://www.npmjs.com/package/@shapeshift-labs/frontier-lang): Umbrella package for Frontier Lang kernel, parser, checker, compiler facade, universal AST helpers, and projection adapters.
|
|
57
57
|
- [`@shapeshift-labs/frontier-kv`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv): Serializable in-memory key/value state for Frontier apps, including TTL, versioned compare-and-set, batched patch mutations, scans, watchers, snapshots, JSONL event evidence, and replay verification.
|
|
58
58
|
- [`@shapeshift-labs/frontier-kv-locks`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv-locks): Lease-style lock records on top of Frontier KV, including acquire, renew, release, fencing tokens, expiration, owner evidence, and replayable lock events.
|
|
59
59
|
- [`@shapeshift-labs/frontier-kv-rate-limit`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv-rate-limit): Patch-native rate limit buckets for Frontier KV, including fixed windows, sliding windows, token buckets, deterministic refill, consume evidence, and reset records.
|
|
@@ -282,7 +282,7 @@ The scale APIs are runtime-neutral and serializable:
|
|
|
282
282
|
- `createSwarmReviewPlan` samples or requires reviewer assignments,
|
|
283
283
|
- `createSwarmMergePlan` blocks jobs with failed checks, required reviews, ownership violations, or conflicting changed paths,
|
|
284
284
|
- job results include merge-readiness classification: `discovery-only`, `patch-candidate`, `verified-patch`, `rejected`, or `blocked`,
|
|
285
|
-
- job results, merge bundles, queue overlays, and merge indexes can carry `semanticImport` summaries for imported symbols, semantic ownership regions, proof/spec obligations, source projection/native compile readiness, and empty sidecar detection,
|
|
285
|
+
- job results, merge bundles, queue overlays, and merge indexes can carry `semanticImport` summaries for imported symbols, semantic ownership regions, proof/spec obligations, paradigm semantics/lowering records, source projection/native compile readiness, and empty sidecar detection,
|
|
286
286
|
- `ownershipRegions` allow hot files to be split into semantic regions such as `content.docs.*` or `adminSettings.quota.*`; merge conflict detection compares explicit changed regions when both sides report them and falls back to path conflicts when either side omits regions,
|
|
287
287
|
- `createSwarmMergeBundle` builds a compact worker `merge.json` shape with touched owned files, patch path, evidence, verification, queue items satisfied, risk, and disposition,
|
|
288
288
|
- `createSwarmQueueOverlay` and `deriveSwarmQueueStatus` keep central queue files immutable while deriving status from worker result overlays,
|
|
@@ -298,6 +298,7 @@ The scale APIs are runtime-neutral and serializable:
|
|
|
298
298
|
- `createSwarmContextPack` gives workers compact task context: relevant files, API maps, known failures, focused/oracle commands, expected evidence, exclusions, evidence schema, playbooks, and explicit dead ends to avoid,
|
|
299
299
|
- `createSwarmOracleCorpus` indexes deterministic reference artifacts such as traces, snapshots, classifications, expected outputs, or fixtures without assuming a project domain,
|
|
300
300
|
- `createSwarmReplayBundle`, `createSwarmParityOracle`, `createSwarmDivergenceReport`, `createSwarmObservabilityPoint`, `createSwarmWatchpointPlan`, and `createSwarmDebugHandoff` model the trace-to-debug workflow: replay finds the narrow window, watchpoints/debug handoff explain the state at that point,
|
|
301
|
+
- `createSwarmTraceShard`, `createSwarmTraceIndex`, and `querySwarmTraceIndex` turn worker trace findings into sortable evidence: row windows, source hypotheses, executable ownership regions, focused tests, reference evidence, and unresolved divergence signals,
|
|
301
302
|
- `createSwarmReferenceOraclePlan` and `createSwarmReferenceOracleResponse` describe reusable reference services for ports, migrations, parity checks, and cross-implementation comparisons,
|
|
302
303
|
- `createSwarmInstrumentationBudget`, `checkSwarmInstrumentationBudget`, and `createSwarmBottleneckReport` keep traces/logs useful without making instrumentation the bottleneck,
|
|
303
304
|
- `createSwarmEvidenceIndex` / `querySwarmEvidenceIndex` and `createSwarmBlackboard` / `querySwarmBlackboard` provide storage-neutral status surfaces for coordinator dashboards, accepted facts, known divergences, rejected theories, and active ownership,
|
|
@@ -305,6 +306,63 @@ The scale APIs are runtime-neutral and serializable:
|
|
|
305
306
|
- `createSwarmLanePlaybook` turns successful prior bundles into persistent lane-specific guidance with commands, hot paths, evidence patterns, and avoid-investigating notes,
|
|
306
307
|
- `decomposeSwarmFeature` creates an initial task queue for feature work across lanes.
|
|
307
308
|
|
|
309
|
+
## Trace Shards
|
|
310
|
+
|
|
311
|
+
Trace shards are the generic form of “the worker found the narrow window.” They are not emulator-specific: a row window can be CPU cycles, log rows, replay steps, API events, migration records, or UI interaction frames. The important part is that the shard connects evidence to source hypotheses and executable ownership regions.
|
|
312
|
+
|
|
313
|
+
```ts
|
|
314
|
+
import {
|
|
315
|
+
createSwarmCoordinatorDashboard,
|
|
316
|
+
createSwarmMergeBundle,
|
|
317
|
+
createSwarmTraceIndex,
|
|
318
|
+
createSwarmTraceShard,
|
|
319
|
+
querySwarmTraceIndex
|
|
320
|
+
} from '@shapeshift-labs/frontier-swarm';
|
|
321
|
+
|
|
322
|
+
const traceShard = createSwarmTraceShard({
|
|
323
|
+
jobId: 'runtime-worker-12',
|
|
324
|
+
lane: 'runtime',
|
|
325
|
+
subject: 'parser-port',
|
|
326
|
+
rowWindows: [{ start: 6240, end: 6250, firstDivergenceAt: 6243, deltaFields: ['result.value'] }],
|
|
327
|
+
hypotheses: [{
|
|
328
|
+
sourcePath: 'src/parser.ts',
|
|
329
|
+
symbol: 'parseExpression',
|
|
330
|
+
region: 'parser.expression',
|
|
331
|
+
confidence: 'high',
|
|
332
|
+
reason: 'reference trace diverges immediately after expression precedence handling'
|
|
333
|
+
}],
|
|
334
|
+
executableOwnershipRegions: [{
|
|
335
|
+
id: 'parser.expression',
|
|
336
|
+
sourcePath: 'src/parser.ts',
|
|
337
|
+
symbol: 'parseExpression',
|
|
338
|
+
affectedTests: ['npm run test:parser -- --case precedence'],
|
|
339
|
+
conflictingAssumptions: ['operators are parsed left-to-right']
|
|
340
|
+
}],
|
|
341
|
+
focusedTests: ['npm run test:parser -- --case precedence'],
|
|
342
|
+
referenceEvidence: [{ path: 'agent-runs/runtime-worker-12/reference-trace.jsonl', kind: 'trace' }]
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
const bundle = createSwarmMergeBundle({
|
|
346
|
+
result: {
|
|
347
|
+
jobId: 'runtime-worker-12',
|
|
348
|
+
status: 'verified',
|
|
349
|
+
changedPaths: ['src/parser.ts'],
|
|
350
|
+
changedRegions: ['parser.expression'],
|
|
351
|
+
verification: [{ status: 0 }]
|
|
352
|
+
},
|
|
353
|
+
patchPath: 'agent-runs/runtime-worker-12/changes.patch',
|
|
354
|
+
traceShards: [traceShard]
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
const traceIndex = createSwarmTraceIndex({ bundles: [bundle] });
|
|
358
|
+
const expressionFindings = querySwarmTraceIndex(traceIndex, { region: 'parser.expression', minConfidence: 0.9 });
|
|
359
|
+
|
|
360
|
+
const dashboard = createSwarmCoordinatorDashboard({ bundles: [bundle] });
|
|
361
|
+
const traceReadyJobs = dashboard.jobs.filter((job) => job.traceSummary?.shardCount);
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
Merge scoring uses trace shards as review evidence, not automatic correctness. Focused tests, reference evidence, and executable regions raise confidence; unresolved divergences and conflicting assumptions lower the score until a coordinator or review worker resolves them.
|
|
365
|
+
|
|
308
366
|
## Hierarchical Compute
|
|
309
367
|
|
|
310
368
|
Higher swarm layers can choose compute for lower layers without binding the core package to Codex or any other runtime. Compute resolution is deterministic:
|
|
@@ -337,6 +395,7 @@ That lets a parent swarm route implementation jobs to a deep model while evidenc
|
|
|
337
395
|
- `createSwarmPatchStackPlan`
|
|
338
396
|
- `createSwarmContextPack`, `createSwarmOracleCorpus`, `createSwarmLanePlaybook`
|
|
339
397
|
- `createSwarmReplayBundle`, `createSwarmParityOracle`, `createSwarmDivergenceReport`, `createSwarmObservabilityPoint`
|
|
398
|
+
- `createSwarmTraceShard`, `createSwarmTraceIndex`, `querySwarmTraceIndex`
|
|
340
399
|
- `createSwarmWatchpointPlan`, `createSwarmDebugHandoff`
|
|
341
400
|
- `createSwarmReferenceOraclePlan`, `createSwarmReferenceOracleResponse`
|
|
342
401
|
- `createSwarmInstrumentationBudget`, `checkSwarmInstrumentationBudget`, `createSwarmBottleneckReport`
|
|
@@ -362,7 +421,7 @@ Run the package-local benchmark:
|
|
|
362
421
|
npm run bench
|
|
363
422
|
```
|
|
364
423
|
|
|
365
|
-
The benchmark writes `benchmarks/results/frontier-swarm-package-bench-latest.json` when run from the monorepo. These are Frontier-only package measurements for plan creation, manifest validation, hierarchical compute resolution, ownership checks, scheduling/leases, adaptive load planning, queue snapshots, queue overlays, merge bundles, merge indexes, merge admission, hotspot reports, context packs, oracle corpora, replay/debug/evidence helper creation, lane playbooks, patch stack plans, event routing, run checkpoints, JSONL, and proof hashing.
|
|
424
|
+
The benchmark writes `benchmarks/results/frontier-swarm-package-bench-latest.json` when run from the monorepo. These are Frontier-only package measurements for plan creation, manifest validation, hierarchical compute resolution, ownership checks, scheduling/leases, adaptive load planning, queue snapshots, queue overlays, merge bundles, merge indexes, merge admission, hotspot reports, context packs, oracle corpora, replay/debug/evidence helper creation, trace index/query creation, lane playbooks, patch stack plans, event routing, run checkpoints, JSONL, and proof hashing.
|
|
366
425
|
|
|
367
426
|
## Source Repository
|
|
368
427
|
|
|
@@ -33,9 +33,12 @@ import {
|
|
|
33
33
|
createSwarmRun,
|
|
34
34
|
createSwarmRunCheckpoint,
|
|
35
35
|
createSwarmSchedule,
|
|
36
|
+
createSwarmTraceIndex,
|
|
37
|
+
createSwarmTraceShard,
|
|
36
38
|
decodeSwarmJsonl,
|
|
37
39
|
defineSwarmTasks,
|
|
38
40
|
encodeSwarmJsonl,
|
|
41
|
+
querySwarmTraceIndex,
|
|
39
42
|
routeSwarmEventToMailboxes,
|
|
40
43
|
resolveSwarmCompute,
|
|
41
44
|
validateSwarmManifest
|
|
@@ -169,6 +172,12 @@ const rows = [
|
|
|
169
172
|
const progress = createSwarmProgressModel({ items: [{ id: 'bench', status: 'accepted' }] });
|
|
170
173
|
return handoff.commands.length + evidence.summary.entryCount + blackboard.summary.entryCount + bottleneck.summary.kindCount + fixtures.summary.fixtureCount + progress.summary.acceptedCount;
|
|
171
174
|
}),
|
|
175
|
+
measure('trace-index-' + taskCount, 16, () => {
|
|
176
|
+
const traceBundles = makeTraceBundles(plan, 24, cursor++);
|
|
177
|
+
const traceIndex = createSwarmTraceIndex({ bundles: traceBundles, generatedAt: 7000 + cursor++ });
|
|
178
|
+
const query = querySwarmTraceIndex(traceIndex, { region: 'region.2', textIncludes: 'benchSymbol' });
|
|
179
|
+
return traceIndex.summary.shardCount + traceIndex.summary.executableOwnershipRegionCount + query.summary.shardCount;
|
|
180
|
+
}),
|
|
172
181
|
measure('lane-playbook-' + taskCount, 16, () => createSwarmLanePlaybook({
|
|
173
182
|
lane: 'runtime',
|
|
174
183
|
successfulBundles: bundles,
|
|
@@ -266,6 +275,44 @@ function makeBundles(plan, count) {
|
|
|
266
275
|
return bundles;
|
|
267
276
|
}
|
|
268
277
|
|
|
278
|
+
function makeTraceBundles(plan, count, offset = 0) {
|
|
279
|
+
const bundles = [];
|
|
280
|
+
for (let i = 0; i < Math.min(count, plan.jobs.length); i += 1) {
|
|
281
|
+
const job = plan.jobs[(i + offset) % plan.jobs.length];
|
|
282
|
+
const region = `region.${i % 8}`;
|
|
283
|
+
const traceShard = createSwarmTraceShard({
|
|
284
|
+
jobId: job.id,
|
|
285
|
+
lane: job.lane,
|
|
286
|
+
subject: 'bench-trace',
|
|
287
|
+
rowWindows: [{ start: i * 10, end: i * 10 + 4, rowCount: 5, firstDivergenceAt: i % 5 === 0 ? i * 10 + 2 : undefined, deltaFields: ['state.value'] }],
|
|
288
|
+
hypotheses: [{ sourcePath: job.task.targetRefs[0], symbol: `benchSymbol${i}`, region, confidence: i % 5 === 0 ? 'high' : 'medium' }],
|
|
289
|
+
executableOwnershipRegions: [{
|
|
290
|
+
id: region,
|
|
291
|
+
sourcePath: job.task.targetRefs[0],
|
|
292
|
+
symbol: `benchSymbol${i}`,
|
|
293
|
+
selectors: [`${region}.*`],
|
|
294
|
+
affectedTests: ['node trace-gate.mjs'],
|
|
295
|
+
riskLevel: i % 5 === 0 ? 'medium' : 'low'
|
|
296
|
+
}],
|
|
297
|
+
focusedTests: ['node trace-gate.mjs'],
|
|
298
|
+
referenceEvidence: [{ path: `agent-runs/bench/${job.id}/reference-trace.jsonl`, kind: 'trace' }]
|
|
299
|
+
});
|
|
300
|
+
bundles.push(createSwarmMergeBundle({
|
|
301
|
+
job,
|
|
302
|
+
result: {
|
|
303
|
+
jobId: job.id,
|
|
304
|
+
status: 'verified',
|
|
305
|
+
changedPaths: [job.task.targetRefs[0] ?? `src/runtime/file-${i}.ts`],
|
|
306
|
+
changedRegions: [region],
|
|
307
|
+
verification: [{ status: 0 }]
|
|
308
|
+
},
|
|
309
|
+
patchPath: `agent-runs/bench/${job.id}/changes.patch`,
|
|
310
|
+
traceShards: [traceShard]
|
|
311
|
+
}));
|
|
312
|
+
}
|
|
313
|
+
return bundles;
|
|
314
|
+
}
|
|
315
|
+
|
|
269
316
|
function measure(fixture, operationsPerRound, fn) {
|
|
270
317
|
const samples = [];
|
|
271
318
|
let checksum = 0;
|
package/dist/index.d.ts
CHANGED
|
@@ -53,6 +53,10 @@ export declare const FRONTIER_SWARM_PARITY_ORACLE_KIND = "frontier.swarm.parity-
|
|
|
53
53
|
export declare const FRONTIER_SWARM_PARITY_ORACLE_VERSION = 1;
|
|
54
54
|
export declare const FRONTIER_SWARM_DIVERGENCE_REPORT_KIND = "frontier.swarm.divergence-report";
|
|
55
55
|
export declare const FRONTIER_SWARM_DIVERGENCE_REPORT_VERSION = 1;
|
|
56
|
+
export declare const FRONTIER_SWARM_TRACE_SHARD_KIND = "frontier.swarm.trace-shard";
|
|
57
|
+
export declare const FRONTIER_SWARM_TRACE_SHARD_VERSION = 1;
|
|
58
|
+
export declare const FRONTIER_SWARM_TRACE_INDEX_KIND = "frontier.swarm.trace-index";
|
|
59
|
+
export declare const FRONTIER_SWARM_TRACE_INDEX_VERSION = 1;
|
|
56
60
|
export declare const FRONTIER_SWARM_OBSERVABILITY_POINT_KIND = "frontier.swarm.observability-point";
|
|
57
61
|
export declare const FRONTIER_SWARM_OBSERVABILITY_POINT_VERSION = 1;
|
|
58
62
|
export declare const FRONTIER_SWARM_WATCHPOINT_PLAN_KIND = "frontier.swarm.watchpoint-plan";
|
|
@@ -108,6 +112,7 @@ export type FrontierSwarmPatchStatus = 'unknown' | 'applies' | 'missing' | 'stal
|
|
|
108
112
|
export type FrontierSwarmQueueOverlayStatus = 'satisfied' | 'ready-to-apply' | 'needs-human-port' | 'failed-evidence' | 'stale-against-head' | 'discovery-only' | 'blocked' | 'rejected' | 'unknown' | string;
|
|
109
113
|
export type FrontierSwarmParityOracleStatus = 'pending' | 'passed' | 'failed' | 'blocked' | 'skipped' | string;
|
|
110
114
|
export type FrontierSwarmDivergenceSeverity = 'info' | 'warning' | 'error' | 'critical' | string;
|
|
115
|
+
export type FrontierSwarmTraceShardStatus = 'passed' | 'failed' | 'blocked' | 'unknown' | string;
|
|
111
116
|
export type FrontierSwarmWatchpointAction = 'break' | 'log' | 'capture' | 'handoff' | string;
|
|
112
117
|
export type FrontierSwarmBottleneckKind = 'correctness' | 'performance' | 'instrumentation-overhead' | 'missing-oracle' | 'flaky-harness' | 'blocked-dependency' | 'merge-review' | 'resource-capacity' | 'budget' | 'queue' | string;
|
|
113
118
|
export type FrontierSwarmConfidence = 'low' | 'medium' | 'high' | string;
|
|
@@ -1025,6 +1030,41 @@ export interface FrontierSwarmNativeCompileSummaryInput {
|
|
|
1025
1030
|
needsReview?: number;
|
|
1026
1031
|
blocked?: number;
|
|
1027
1032
|
}
|
|
1033
|
+
export interface FrontierSwarmParadigmSemanticsSummaryInput {
|
|
1034
|
+
total?: number;
|
|
1035
|
+
ids?: readonly string[];
|
|
1036
|
+
groups?: readonly string[];
|
|
1037
|
+
kinds?: readonly string[];
|
|
1038
|
+
evidence?: number;
|
|
1039
|
+
bindingScopes?: number;
|
|
1040
|
+
bindings?: number;
|
|
1041
|
+
patterns?: number;
|
|
1042
|
+
typeConstraints?: number;
|
|
1043
|
+
evaluationModels?: number;
|
|
1044
|
+
memoryLocations?: number;
|
|
1045
|
+
effectRegions?: number;
|
|
1046
|
+
controlRegions?: number;
|
|
1047
|
+
logicPrograms?: number;
|
|
1048
|
+
actorSystems?: number;
|
|
1049
|
+
stackEffects?: number;
|
|
1050
|
+
arrayShapes?: number;
|
|
1051
|
+
numericKernels?: number;
|
|
1052
|
+
dataflowNetworks?: number;
|
|
1053
|
+
clockModels?: number;
|
|
1054
|
+
objectModels?: number;
|
|
1055
|
+
macroExpansions?: number;
|
|
1056
|
+
reflectionBoundaries?: number;
|
|
1057
|
+
loweringRecords?: number;
|
|
1058
|
+
byGroup?: FrontierSwarmSemanticImportCounterInput;
|
|
1059
|
+
byKind?: FrontierSwarmSemanticImportCounterInput;
|
|
1060
|
+
hasRuntimeSemantics?: boolean;
|
|
1061
|
+
hasLogicSemantics?: boolean;
|
|
1062
|
+
hasStackSemantics?: boolean;
|
|
1063
|
+
hasArraySemantics?: boolean;
|
|
1064
|
+
hasMacroOrReflection?: boolean;
|
|
1065
|
+
hasLowering?: boolean;
|
|
1066
|
+
empty?: boolean;
|
|
1067
|
+
}
|
|
1028
1068
|
export interface FrontierSwarmSemanticImportSummaryInput {
|
|
1029
1069
|
total?: number;
|
|
1030
1070
|
selected?: number;
|
|
@@ -1040,6 +1080,7 @@ export interface FrontierSwarmSemanticImportSummaryInput {
|
|
|
1040
1080
|
semanticIndex?: FrontierSwarmSemanticIndexSummaryInput;
|
|
1041
1081
|
semanticSidecars?: FrontierSwarmSemanticSidecarSummaryInput;
|
|
1042
1082
|
proofSpec?: FrontierSwarmProofSpecSummaryInput;
|
|
1083
|
+
paradigmSemantics?: FrontierSwarmParadigmSemanticsSummaryInput;
|
|
1043
1084
|
sourceProjections?: FrontierSwarmSourceProjectionSummaryInput;
|
|
1044
1085
|
nativeCompiles?: FrontierSwarmNativeCompileSummaryInput;
|
|
1045
1086
|
readiness?: FrontierSwarmSemanticImportCounterInput;
|
|
@@ -1126,6 +1167,41 @@ export interface FrontierSwarmNativeCompileSummary {
|
|
|
1126
1167
|
needsReview: number;
|
|
1127
1168
|
blocked: number;
|
|
1128
1169
|
}
|
|
1170
|
+
export interface FrontierSwarmParadigmSemanticsSummary {
|
|
1171
|
+
total: number;
|
|
1172
|
+
ids: string[];
|
|
1173
|
+
groups: string[];
|
|
1174
|
+
kinds: string[];
|
|
1175
|
+
evidence: number;
|
|
1176
|
+
bindingScopes: number;
|
|
1177
|
+
bindings: number;
|
|
1178
|
+
patterns: number;
|
|
1179
|
+
typeConstraints: number;
|
|
1180
|
+
evaluationModels: number;
|
|
1181
|
+
memoryLocations: number;
|
|
1182
|
+
effectRegions: number;
|
|
1183
|
+
controlRegions: number;
|
|
1184
|
+
logicPrograms: number;
|
|
1185
|
+
actorSystems: number;
|
|
1186
|
+
stackEffects: number;
|
|
1187
|
+
arrayShapes: number;
|
|
1188
|
+
numericKernels: number;
|
|
1189
|
+
dataflowNetworks: number;
|
|
1190
|
+
clockModels: number;
|
|
1191
|
+
objectModels: number;
|
|
1192
|
+
macroExpansions: number;
|
|
1193
|
+
reflectionBoundaries: number;
|
|
1194
|
+
loweringRecords: number;
|
|
1195
|
+
byGroup: Record<string, number>;
|
|
1196
|
+
byKind: Record<string, number>;
|
|
1197
|
+
hasRuntimeSemantics: boolean;
|
|
1198
|
+
hasLogicSemantics: boolean;
|
|
1199
|
+
hasStackSemantics: boolean;
|
|
1200
|
+
hasArraySemantics: boolean;
|
|
1201
|
+
hasMacroOrReflection: boolean;
|
|
1202
|
+
hasLowering: boolean;
|
|
1203
|
+
empty: boolean;
|
|
1204
|
+
}
|
|
1129
1205
|
export interface FrontierSwarmSemanticImportSummary {
|
|
1130
1206
|
total: number;
|
|
1131
1207
|
selected: number;
|
|
@@ -1141,6 +1217,7 @@ export interface FrontierSwarmSemanticImportSummary {
|
|
|
1141
1217
|
semanticIndex: FrontierSwarmSemanticIndexSummary;
|
|
1142
1218
|
semanticSidecars: FrontierSwarmSemanticSidecarSummary;
|
|
1143
1219
|
proofSpec: FrontierSwarmProofSpecSummary;
|
|
1220
|
+
paradigmSemantics: FrontierSwarmParadigmSemanticsSummary;
|
|
1144
1221
|
sourceProjections: FrontierSwarmSourceProjectionSummary;
|
|
1145
1222
|
nativeCompiles: FrontierSwarmNativeCompileSummary;
|
|
1146
1223
|
readiness: Record<string, number>;
|
|
@@ -1233,6 +1310,7 @@ export interface FrontierSwarmMergeBundleInput {
|
|
|
1233
1310
|
branchName?: string;
|
|
1234
1311
|
commit?: string;
|
|
1235
1312
|
semanticImport?: FrontierSwarmSemanticImportSummaryInput;
|
|
1313
|
+
traceShards?: readonly (FrontierSwarmTraceShard | FrontierSwarmTraceShardInput)[];
|
|
1236
1314
|
metadata?: unknown;
|
|
1237
1315
|
generatedAt?: number;
|
|
1238
1316
|
}
|
|
@@ -1268,6 +1346,7 @@ export interface FrontierSwarmMergeBundle {
|
|
|
1268
1346
|
staleAgainstHead: boolean;
|
|
1269
1347
|
reasons: string[];
|
|
1270
1348
|
semanticImport?: FrontierSwarmSemanticImportSummary;
|
|
1349
|
+
traceShards: FrontierSwarmTraceShard[];
|
|
1271
1350
|
metadata?: JsonObject;
|
|
1272
1351
|
}
|
|
1273
1352
|
export interface FrontierSwarmQueueOverlayInput {
|
|
@@ -1808,6 +1887,166 @@ export interface FrontierSwarmDivergenceReport {
|
|
|
1808
1887
|
generatedAt: number;
|
|
1809
1888
|
metadata?: JsonObject;
|
|
1810
1889
|
}
|
|
1890
|
+
export interface FrontierSwarmTraceRowWindowInput {
|
|
1891
|
+
id?: string;
|
|
1892
|
+
title?: string;
|
|
1893
|
+
start?: number;
|
|
1894
|
+
end?: number;
|
|
1895
|
+
rowCount?: number;
|
|
1896
|
+
firstDivergenceAt?: number;
|
|
1897
|
+
deltaFields?: readonly string[];
|
|
1898
|
+
evidenceRefs?: readonly (string | FrontierSwarmNamedRefInput)[];
|
|
1899
|
+
metadata?: unknown;
|
|
1900
|
+
}
|
|
1901
|
+
export interface FrontierSwarmTraceRowWindow {
|
|
1902
|
+
id: string;
|
|
1903
|
+
title: string;
|
|
1904
|
+
start?: number;
|
|
1905
|
+
end?: number;
|
|
1906
|
+
rowCount?: number;
|
|
1907
|
+
firstDivergenceAt?: number;
|
|
1908
|
+
deltaFields: string[];
|
|
1909
|
+
evidenceRefs: FrontierSwarmNamedRef[];
|
|
1910
|
+
metadata?: JsonObject;
|
|
1911
|
+
}
|
|
1912
|
+
export interface FrontierSwarmTraceHypothesisInput {
|
|
1913
|
+
id?: string;
|
|
1914
|
+
title?: string;
|
|
1915
|
+
sourcePath?: string;
|
|
1916
|
+
line?: number;
|
|
1917
|
+
symbol?: string;
|
|
1918
|
+
region?: string;
|
|
1919
|
+
confidence?: FrontierSwarmConfidence;
|
|
1920
|
+
reason?: string;
|
|
1921
|
+
evidenceRefs?: readonly (string | FrontierSwarmNamedRefInput)[];
|
|
1922
|
+
metadata?: unknown;
|
|
1923
|
+
}
|
|
1924
|
+
export interface FrontierSwarmTraceHypothesis {
|
|
1925
|
+
id: string;
|
|
1926
|
+
title: string;
|
|
1927
|
+
sourcePath?: string;
|
|
1928
|
+
line?: number;
|
|
1929
|
+
symbol?: string;
|
|
1930
|
+
region?: string;
|
|
1931
|
+
confidence: FrontierSwarmConfidence;
|
|
1932
|
+
reason?: string;
|
|
1933
|
+
evidenceRefs: FrontierSwarmNamedRef[];
|
|
1934
|
+
metadata?: JsonObject;
|
|
1935
|
+
}
|
|
1936
|
+
export interface FrontierSwarmExecutableOwnershipRegionInput {
|
|
1937
|
+
id: string;
|
|
1938
|
+
kind?: string;
|
|
1939
|
+
sourcePath?: string;
|
|
1940
|
+
symbol?: string;
|
|
1941
|
+
selectors?: readonly string[];
|
|
1942
|
+
affectedTests?: readonly (string | FrontierSwarmCommandInput)[];
|
|
1943
|
+
conflictingAssumptions?: readonly string[];
|
|
1944
|
+
traceRefs?: readonly (string | FrontierSwarmNamedRefInput)[];
|
|
1945
|
+
riskLevel?: FrontierSwarmRiskLevel;
|
|
1946
|
+
metadata?: unknown;
|
|
1947
|
+
}
|
|
1948
|
+
export interface FrontierSwarmExecutableOwnershipRegion {
|
|
1949
|
+
id: string;
|
|
1950
|
+
kind: string;
|
|
1951
|
+
sourcePath?: string;
|
|
1952
|
+
symbol?: string;
|
|
1953
|
+
selectors: string[];
|
|
1954
|
+
affectedTests: FrontierSwarmCommand[];
|
|
1955
|
+
conflictingAssumptions: string[];
|
|
1956
|
+
traceRefs: FrontierSwarmNamedRef[];
|
|
1957
|
+
riskLevel: FrontierSwarmRiskLevel;
|
|
1958
|
+
metadata?: JsonObject;
|
|
1959
|
+
}
|
|
1960
|
+
export interface FrontierSwarmTraceShardInput {
|
|
1961
|
+
id?: string;
|
|
1962
|
+
jobId?: string;
|
|
1963
|
+
lane?: string;
|
|
1964
|
+
subject?: string;
|
|
1965
|
+
status?: FrontierSwarmTraceShardStatus;
|
|
1966
|
+
traceRefs?: readonly (string | FrontierSwarmNamedRefInput)[];
|
|
1967
|
+
divergence?: FrontierSwarmDivergenceReport | FrontierSwarmDivergenceReportInput;
|
|
1968
|
+
rowWindows?: readonly FrontierSwarmTraceRowWindowInput[];
|
|
1969
|
+
hypotheses?: readonly FrontierSwarmTraceHypothesisInput[];
|
|
1970
|
+
executableOwnershipRegions?: readonly FrontierSwarmExecutableOwnershipRegionInput[];
|
|
1971
|
+
focusedTests?: readonly (string | FrontierSwarmCommandInput)[];
|
|
1972
|
+
referenceEvidence?: readonly (string | FrontierSwarmNamedRefInput)[];
|
|
1973
|
+
generatedAt?: number;
|
|
1974
|
+
metadata?: unknown;
|
|
1975
|
+
}
|
|
1976
|
+
export interface FrontierSwarmTraceShard {
|
|
1977
|
+
kind: typeof FRONTIER_SWARM_TRACE_SHARD_KIND;
|
|
1978
|
+
version: typeof FRONTIER_SWARM_TRACE_SHARD_VERSION;
|
|
1979
|
+
id: string;
|
|
1980
|
+
jobId?: string;
|
|
1981
|
+
lane?: string;
|
|
1982
|
+
subject?: string;
|
|
1983
|
+
status: FrontierSwarmTraceShardStatus;
|
|
1984
|
+
traceRefs: FrontierSwarmNamedRef[];
|
|
1985
|
+
divergence?: FrontierSwarmDivergenceReport;
|
|
1986
|
+
rowWindows: FrontierSwarmTraceRowWindow[];
|
|
1987
|
+
hypotheses: FrontierSwarmTraceHypothesis[];
|
|
1988
|
+
executableOwnershipRegions: FrontierSwarmExecutableOwnershipRegion[];
|
|
1989
|
+
focusedTests: FrontierSwarmCommand[];
|
|
1990
|
+
referenceEvidence: FrontierSwarmNamedRef[];
|
|
1991
|
+
generatedAt: number;
|
|
1992
|
+
summary: {
|
|
1993
|
+
rowWindowCount: number;
|
|
1994
|
+
hypothesisCount: number;
|
|
1995
|
+
executableOwnershipRegionCount: number;
|
|
1996
|
+
focusedTestCount: number;
|
|
1997
|
+
referenceEvidenceCount: number;
|
|
1998
|
+
hasDivergence: boolean;
|
|
1999
|
+
};
|
|
2000
|
+
metadata?: JsonObject;
|
|
2001
|
+
}
|
|
2002
|
+
export interface FrontierSwarmTraceIndexInput {
|
|
2003
|
+
id?: string;
|
|
2004
|
+
shards?: readonly (FrontierSwarmTraceShard | FrontierSwarmTraceShardInput)[];
|
|
2005
|
+
bundles?: readonly FrontierSwarmMergeBundle[];
|
|
2006
|
+
generatedAt?: number;
|
|
2007
|
+
metadata?: unknown;
|
|
2008
|
+
}
|
|
2009
|
+
export interface FrontierSwarmTraceIndex {
|
|
2010
|
+
kind: typeof FRONTIER_SWARM_TRACE_INDEX_KIND;
|
|
2011
|
+
version: typeof FRONTIER_SWARM_TRACE_INDEX_VERSION;
|
|
2012
|
+
id: string;
|
|
2013
|
+
generatedAt: number;
|
|
2014
|
+
shards: FrontierSwarmTraceShard[];
|
|
2015
|
+
byJobId: Record<string, FrontierSwarmTraceShard[]>;
|
|
2016
|
+
bySubject: Record<string, FrontierSwarmTraceShard[]>;
|
|
2017
|
+
byRegion: Record<string, FrontierSwarmTraceShard[]>;
|
|
2018
|
+
bySourcePath: Record<string, FrontierSwarmTraceShard[]>;
|
|
2019
|
+
summary: {
|
|
2020
|
+
shardCount: number;
|
|
2021
|
+
rowWindowCount: number;
|
|
2022
|
+
hypothesisCount: number;
|
|
2023
|
+
executableOwnershipRegionCount: number;
|
|
2024
|
+
focusedTestCount: number;
|
|
2025
|
+
referenceEvidenceCount: number;
|
|
2026
|
+
divergenceCount: number;
|
|
2027
|
+
};
|
|
2028
|
+
metadata?: JsonObject;
|
|
2029
|
+
}
|
|
2030
|
+
export interface FrontierSwarmTraceIndexQuery {
|
|
2031
|
+
jobId?: string;
|
|
2032
|
+
lane?: string;
|
|
2033
|
+
subject?: string;
|
|
2034
|
+
region?: string;
|
|
2035
|
+
sourcePath?: string;
|
|
2036
|
+
status?: FrontierSwarmTraceShardStatus;
|
|
2037
|
+
minConfidence?: number;
|
|
2038
|
+
hasDivergence?: boolean;
|
|
2039
|
+
textIncludes?: string;
|
|
2040
|
+
}
|
|
2041
|
+
export interface FrontierSwarmTraceIndexQueryResult {
|
|
2042
|
+
shards: FrontierSwarmTraceShard[];
|
|
2043
|
+
summary: {
|
|
2044
|
+
shardCount: number;
|
|
2045
|
+
rowWindowCount: number;
|
|
2046
|
+
hypothesisCount: number;
|
|
2047
|
+
executableOwnershipRegionCount: number;
|
|
2048
|
+
};
|
|
2049
|
+
}
|
|
1811
2050
|
export interface FrontierSwarmWatchpointInput {
|
|
1812
2051
|
id?: string;
|
|
1813
2052
|
title?: string;
|
|
@@ -2566,6 +2805,7 @@ export interface FrontierSwarmCoordinatorDashboardInput {
|
|
|
2566
2805
|
mergeIndex?: FrontierSwarmMergeIndex;
|
|
2567
2806
|
queueOverlay?: FrontierSwarmQueueOverlay;
|
|
2568
2807
|
evidenceIndex?: FrontierSwarmEvidenceIndex;
|
|
2808
|
+
traceIndex?: FrontierSwarmTraceIndex;
|
|
2569
2809
|
admission?: FrontierSwarmMergeAdmission;
|
|
2570
2810
|
processes?: readonly FrontierSwarmCoordinatorProcessInput[];
|
|
2571
2811
|
generatedAt?: number;
|
|
@@ -2587,6 +2827,7 @@ export interface FrontierSwarmCoordinatorDashboard {
|
|
|
2587
2827
|
mergeIndex?: FrontierSwarmMergeIndex;
|
|
2588
2828
|
queueOverlay?: FrontierSwarmQueueOverlay;
|
|
2589
2829
|
evidenceIndex?: FrontierSwarmEvidenceIndex;
|
|
2830
|
+
traceIndex?: FrontierSwarmTraceIndex;
|
|
2590
2831
|
admission?: FrontierSwarmMergeAdmission;
|
|
2591
2832
|
summary: {
|
|
2592
2833
|
jobCount: number;
|
|
@@ -2597,10 +2838,23 @@ export interface FrontierSwarmCoordinatorDashboard {
|
|
|
2597
2838
|
duplicateGroupCount: number;
|
|
2598
2839
|
semanticSidecarCount: number;
|
|
2599
2840
|
semanticRegionCount: number;
|
|
2841
|
+
traceShardCount: number;
|
|
2842
|
+
traceDivergenceCount: number;
|
|
2843
|
+
executableOwnershipRegionCount: number;
|
|
2600
2844
|
averageMergeScore: number;
|
|
2601
2845
|
};
|
|
2602
2846
|
metadata?: JsonObject;
|
|
2603
2847
|
}
|
|
2848
|
+
export interface FrontierSwarmCoordinatorTraceSummary {
|
|
2849
|
+
shardCount: number;
|
|
2850
|
+
rowWindowCount: number;
|
|
2851
|
+
hypothesisCount: number;
|
|
2852
|
+
executableOwnershipRegionCount: number;
|
|
2853
|
+
focusedTestCount: number;
|
|
2854
|
+
referenceEvidenceCount: number;
|
|
2855
|
+
divergenceCount: number;
|
|
2856
|
+
openDivergenceCount: number;
|
|
2857
|
+
}
|
|
2604
2858
|
export interface FrontierSwarmCoordinatorJob {
|
|
2605
2859
|
jobId: string;
|
|
2606
2860
|
taskId?: string;
|
|
@@ -2632,6 +2886,7 @@ export interface FrontierSwarmCoordinatorJob {
|
|
|
2632
2886
|
requiredFailed: number;
|
|
2633
2887
|
};
|
|
2634
2888
|
semanticImport?: FrontierSwarmSemanticImportSummary;
|
|
2889
|
+
traceSummary?: FrontierSwarmCoordinatorTraceSummary;
|
|
2635
2890
|
generatedAt: number;
|
|
2636
2891
|
}
|
|
2637
2892
|
export interface FrontierSwarmCoordinatorDuplicateGroup {
|
|
@@ -2650,6 +2905,9 @@ export interface FrontierSwarmCoordinatorDashboardQuery {
|
|
|
2650
2905
|
region?: string;
|
|
2651
2906
|
hasSemanticImport?: boolean;
|
|
2652
2907
|
hasSemanticRegions?: boolean;
|
|
2908
|
+
hasTraceShards?: boolean;
|
|
2909
|
+
traceSubject?: string;
|
|
2910
|
+
traceRegion?: string;
|
|
2653
2911
|
staleAgainstHead?: boolean;
|
|
2654
2912
|
duplicateOnly?: boolean;
|
|
2655
2913
|
minMergeScore?: number;
|
|
@@ -2802,6 +3060,9 @@ export declare function createSwarmObservabilityPoint(input?: FrontierSwarmObser
|
|
|
2802
3060
|
export declare function createSwarmReplayBundle(input?: FrontierSwarmReplayBundleInput): FrontierSwarmReplayBundle;
|
|
2803
3061
|
export declare function createSwarmParityOracle(input?: FrontierSwarmParityOracleInput): FrontierSwarmParityOracle;
|
|
2804
3062
|
export declare function createSwarmDivergenceReport(input?: FrontierSwarmDivergenceReportInput): FrontierSwarmDivergenceReport;
|
|
3063
|
+
export declare function createSwarmTraceShard(input?: FrontierSwarmTraceShardInput): FrontierSwarmTraceShard;
|
|
3064
|
+
export declare function createSwarmTraceIndex(input?: FrontierSwarmTraceIndexInput): FrontierSwarmTraceIndex;
|
|
3065
|
+
export declare function querySwarmTraceIndex(index: FrontierSwarmTraceIndex, query?: FrontierSwarmTraceIndexQuery): FrontierSwarmTraceIndexQueryResult;
|
|
2805
3066
|
export declare function createSwarmWatchpointPlan(input?: FrontierSwarmWatchpointPlanInput): FrontierSwarmWatchpointPlan;
|
|
2806
3067
|
export declare function createSwarmDebugHandoff(input?: FrontierSwarmDebugHandoffInput): FrontierSwarmDebugHandoff;
|
|
2807
3068
|
export declare function createSwarmInstrumentationBudget(input?: FrontierSwarmInstrumentationBudgetInput): FrontierSwarmInstrumentationBudget;
|