@tangle-network/agent-interface 0.24.0 → 0.26.0

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.
@@ -4,6 +4,10 @@ import type { HarnessType } from "./harness.js";
4
4
  export type Sha256Digest = `sha256:${string}`;
5
5
  /** RFC 8785 JSON Canonicalization Scheme followed by SHA-256. */
6
6
  export type AgentCandidateDigestAlgorithm = "rfc8785-sha256";
7
+ /** Finite, acyclic JSON accepted by canonical candidate documents. */
8
+ export type AgentCandidateJsonValue = null | boolean | number | string | AgentCandidateJsonValue[] | {
9
+ [key: string]: AgentCandidateJsonValue;
10
+ };
7
11
  export interface AgentCandidateS3Locator {
8
12
  kind: "s3";
9
13
  bucket: string;
@@ -195,10 +199,23 @@ export interface AgentCandidateExecution {
195
199
  candidateSecrets: "disabled";
196
200
  };
197
201
  }
198
- /** Optional immutable knowledge snapshot mounted with the profile. */
202
+ /** Exact frozen knowledge candidate admitted only through an approved review. */
203
+ export interface AgentCandidateKnowledgeRef {
204
+ schemaVersion: 1;
205
+ kind: "knowledge-improvement-candidate";
206
+ runId: string;
207
+ candidateId: string;
208
+ goalHash: Sha256Digest;
209
+ baseHash: Sha256Digest;
210
+ candidateHash: Sha256Digest;
211
+ evidenceHash: Sha256Digest;
212
+ promotionPlanHash: Sha256Digest;
213
+ }
199
214
  export interface AgentCandidateKnowledge {
200
- snapshotId: string;
201
- manifest: AgentCandidateArtifactRef;
215
+ candidate: AgentCandidateKnowledgeRef;
216
+ snapshot: AgentCandidateWorkspaceSnapshotEvidence;
217
+ retrievalConfig?: AgentCandidateCapturedArtifact;
218
+ evaluation: AgentCandidateCapturedArtifact;
202
219
  }
203
220
  /** Memory is absent or freshly evaluator-scoped to exactly one task. */
204
221
  export type AgentCandidateMemoryPolicy = {
@@ -251,8 +268,8 @@ export interface AgentCandidateLineage {
251
268
  * runtime integrity verifier before materialization; the carried digest and all
252
269
  * artifact hashes are untrusted until recomputed.
253
270
  */
254
- export interface AgentCandidateBundleV1 {
255
- schemaVersion: 1;
271
+ export interface AgentCandidateBundle {
272
+ schemaVersion: 2;
256
273
  kind: "agent-candidate-bundle";
257
274
  digestAlgorithm: AgentCandidateDigestAlgorithm;
258
275
  profile: AgentCandidateProfile;
@@ -263,7 +280,6 @@ export interface AgentCandidateBundleV1 {
263
280
  lineage: AgentCandidateLineage;
264
281
  digest: Sha256Digest;
265
282
  }
266
- export type AgentCandidateBundle = AgentCandidateBundleV1;
267
283
  export interface AgentCandidateEntrypointReceipt {
268
284
  path: string;
269
285
  sha256: Sha256Digest;
@@ -282,7 +298,7 @@ export interface AgentCandidateResolvedModel {
282
298
  reasoningEffort: ReasoningEffort;
283
299
  }
284
300
  /** Canonical, digest-free profile-plan identity document. */
285
- export interface AgentCandidateProfilePlanMaterialV1 {
301
+ export interface AgentCandidateProfilePlanMaterial {
286
302
  version: 1;
287
303
  harness: HarnessType;
288
304
  files: Array<{
@@ -297,22 +313,23 @@ export interface AgentCandidateProfilePlanMaterialV1 {
297
313
  reason: string;
298
314
  }>;
299
315
  }
300
- export interface AgentCandidateWorkspaceManifestMaterialV1 {
301
- schemaVersion: 1;
316
+ export interface AgentCandidateWorkspaceManifestMaterial {
317
+ schemaVersion: 2;
302
318
  kind: "agent-candidate-workspace-manifest";
303
319
  files: Array<{
304
320
  path: string;
305
- mode: 0o644 | 0o755;
321
+ /** Exact regular-file permission bits, excluding file-type and special bits. */
322
+ mode: number;
306
323
  sha256: Sha256Digest;
307
324
  byteLength: number;
308
325
  }>;
309
326
  }
310
327
  /** Content-addressed manifest of every file uploaded to one workspace. */
311
328
  export interface AgentCandidateWorkspaceSnapshotEvidence {
312
- schemaVersion: 1;
329
+ schemaVersion: 2;
313
330
  kind: "agent-candidate-workspace-snapshot";
314
331
  digest: Sha256Digest;
315
- material: AgentCandidateWorkspaceManifestMaterialV1;
332
+ material: AgentCandidateWorkspaceManifestMaterial;
316
333
  manifest: AgentCandidateCapturedArtifact;
317
334
  archive: AgentCandidateCapturedArtifact;
318
335
  }
@@ -359,14 +376,33 @@ export type AgentCandidateModelAccessNetwork = {
359
376
  mode: "gateway-only";
360
377
  domains: string[];
361
378
  };
379
+ /** Optional source repository identity for a signed benchmark task. */
380
+ export interface AgentCandidateTaskRepository {
381
+ identity: string;
382
+ rootIdentity: string;
383
+ baseCommit: string;
384
+ baseTree: string;
385
+ }
386
+ /** Bounded media contract for one exact non-workspace task result. */
387
+ export interface AgentCandidateTaskOutputSpec {
388
+ /** Evaluator-declared label; the bound grader verifies the bytes match it. */
389
+ mediaType: string;
390
+ maxBytes: number;
391
+ }
392
+ /** Exact result shape the evaluator must capture after one candidate task. */
393
+ export type AgentCandidateTaskOutcomeSpec = {
394
+ kind: "workspace";
395
+ } | ({
396
+ kind: "output";
397
+ } & AgentCandidateTaskOutputSpec);
362
398
  /**
363
399
  * Canonical, digest-free per-task execution identity document.
364
400
  *
365
401
  * RFC 8785 serialization of this material is stored verbatim by the receipt;
366
402
  * its raw SHA-256 is the execution-plan digest.
367
403
  */
368
- export interface AgentCandidateExecutionPlanMaterialV1 {
369
- schemaVersion: 1;
404
+ export interface AgentCandidateExecutionPlanMaterial {
405
+ schemaVersion: 2;
370
406
  kind: "agent-candidate-execution-plan-material";
371
407
  bundleDigest: Sha256Digest;
372
408
  executionId: string;
@@ -382,12 +418,8 @@ export interface AgentCandidateExecutionPlanMaterialV1 {
382
418
  byteLength: number;
383
419
  delivery: AgentCandidateInstructionDelivery;
384
420
  };
385
- repository: {
386
- identity: string;
387
- rootIdentity: string;
388
- baseCommit: string;
389
- baseTree: string;
390
- };
421
+ repository?: AgentCandidateTaskRepository;
422
+ outcome: AgentCandidateTaskOutcomeSpec;
391
423
  workspace: AgentCandidateWorkspaceSnapshotEvidence;
392
424
  };
393
425
  workspaces: {
@@ -430,6 +462,12 @@ export interface AgentCandidateExecutionPlanMaterialV1 {
430
462
  requested: string;
431
463
  }>;
432
464
  };
465
+ /** Exact evaluator grader implementation admitted for this plan. */
466
+ grader: {
467
+ name: string;
468
+ version: string;
469
+ artifact: AgentCandidateArtifactRef;
470
+ };
433
471
  launch: {
434
472
  executable: string;
435
473
  args: AgentCandidateConfigValue[];
@@ -447,14 +485,26 @@ export interface AgentCandidateProfilePlanEvidence {
447
485
  schemaVersion: 1;
448
486
  kind: "agent-profile-workspace-plan";
449
487
  digest: Sha256Digest;
450
- material: AgentCandidateProfilePlanMaterialV1;
488
+ material: AgentCandidateProfilePlanMaterial;
451
489
  artifact: AgentCandidateCapturedArtifact;
452
490
  }
453
- export interface AgentCandidateExecutionPlanEvidence {
491
+ /** Exact native profile files and the canonical plan that activated them. */
492
+ export interface AgentCandidateProfileActivation {
454
493
  schemaVersion: 1;
494
+ kind: "agent-candidate-profile-activation";
495
+ profilePlan: AgentCandidateProfilePlanEvidence;
496
+ files: Array<{
497
+ path: string;
498
+ mode: number;
499
+ content: string;
500
+ }>;
501
+ digest: Sha256Digest;
502
+ }
503
+ export interface AgentCandidateExecutionPlanEvidence {
504
+ schemaVersion: 2;
455
505
  kind: "agent-candidate-execution-plan";
456
506
  digest: Sha256Digest;
457
- material: AgentCandidateExecutionPlanMaterialV1;
507
+ material: AgentCandidateExecutionPlanMaterial;
458
508
  artifact: AgentCandidateCapturedArtifact;
459
509
  }
460
510
  export interface AgentCandidateTraceEvidence {
@@ -463,10 +513,6 @@ export interface AgentCandidateTraceEvidence {
463
513
  eventCount: number;
464
514
  modelCallCount: number;
465
515
  }
466
- export interface AgentCandidateModelUsage {
467
- resolved: AgentCandidateResolvedModel;
468
- usage: AgentCandidateSpend;
469
- }
470
516
  export type AgentCandidateMemoryReceipt = {
471
517
  mode: "disabled";
472
518
  } | {
@@ -478,8 +524,8 @@ export type AgentCandidateMemoryReceipt = {
478
524
  afterState: AgentCandidateWorkspaceSnapshotEvidence;
479
525
  };
480
526
  /** Proof emitted after a runtime materializes, but before it executes, a bundle. */
481
- export interface AgentCandidateMaterializationReceiptV1 {
482
- schemaVersion: 1;
527
+ export interface AgentCandidateMaterializationReceipt {
528
+ schemaVersion: 2;
483
529
  kind: "agent-candidate-materialization";
484
530
  digestAlgorithm: AgentCandidateDigestAlgorithm;
485
531
  bundleDigest: Sha256Digest;
@@ -502,7 +548,6 @@ export interface AgentCandidateMaterializationReceiptV1 {
502
548
  entrypoint?: AgentCandidateEntrypointReceipt;
503
549
  digest: Sha256Digest;
504
550
  }
505
- export type AgentCandidateMaterializationReceipt = AgentCandidateMaterializationReceiptV1;
506
551
  /** How an execution ended, independent of whether protected evidence capture completed. */
507
552
  export type AgentCandidateTermination = {
508
553
  kind: "exit";
@@ -517,52 +562,187 @@ export type AgentCandidateTermination = {
517
562
  kind: "cancelled";
518
563
  };
519
564
  /** Proof emitted after the exact materialized plan finishes executing. */
520
- export interface AgentCandidateRunReceiptV1 {
521
- schemaVersion: 1;
565
+ export interface AgentCandidateRunReceipt {
566
+ schemaVersion: 3;
522
567
  kind: "agent-candidate-run";
523
568
  digestAlgorithm: AgentCandidateDigestAlgorithm;
524
569
  bundleDigest: Sha256Digest;
525
570
  materializationReceiptDigest: Sha256Digest;
526
571
  executionPlanDigest: Sha256Digest;
527
572
  memory: AgentCandidateMemoryReceipt;
528
- usage: AgentCandidateSpend;
529
- modelUsage: AgentCandidateModelUsage;
530
573
  trace: AgentCandidateTraceEvidence;
531
574
  termination: AgentCandidateTermination;
575
+ executorCapture: AgentCandidateArtifactRef;
576
+ modelSettlement: AgentCandidateModelSettlementEvidence;
577
+ taskOutcome: AgentCandidateTaskOutcomeEvidence;
578
+ benchmarkResult: AgentCandidateBenchmarkResultEvidence;
532
579
  digest: Sha256Digest;
533
580
  }
534
- /** One evaluator-mediated model call in a terminal settlement. */
581
+ export type AgentImprovementSurface = "prompt" | "skills" | "tools" | "mcp" | "hooks" | "subagents" | "agent-profile" | "memory" | "code" | "knowledge";
582
+ /** Portable paired held-out comparison produced by an evaluation package. */
583
+ export interface AgentImprovementMeasuredComparison {
584
+ schemaVersion: 1;
585
+ kind: "agent-improvement-measured-comparison";
586
+ benchmark: {
587
+ name: string;
588
+ version: string;
589
+ splitDigest: Sha256Digest;
590
+ };
591
+ baselineProfileDigest: Sha256Digest;
592
+ candidateBundleDigest: Sha256Digest;
593
+ overall: {
594
+ name: "composite";
595
+ baseline: number;
596
+ candidate: number;
597
+ delta: number;
598
+ confidenceInterval: {
599
+ level: number;
600
+ lower: number;
601
+ upper: number;
602
+ method: "paired-bootstrap";
603
+ statistic: "mean";
604
+ resamples: number;
605
+ };
606
+ n: number;
607
+ direction: "higher-is-better";
608
+ unit: "score";
609
+ };
610
+ objectives: Array<({
611
+ kind: "objective";
612
+ name: string;
613
+ direction: "higher-is-better";
614
+ unit: "score";
615
+ } | {
616
+ kind: "dimension";
617
+ objective: string;
618
+ name: string;
619
+ direction: "higher-is-better";
620
+ unit: "score";
621
+ } | {
622
+ kind: "cost";
623
+ name: "cost";
624
+ direction: "lower-is-better";
625
+ unit: "usd";
626
+ } | {
627
+ kind: "latency";
628
+ name: "latency";
629
+ direction: "lower-is-better";
630
+ unit: "milliseconds";
631
+ }) & ({
632
+ availability: "measured";
633
+ baseline: number;
634
+ candidate: number;
635
+ delta: number;
636
+ confidenceInterval: {
637
+ level: number;
638
+ lower: number;
639
+ upper: number;
640
+ method: "paired-bootstrap";
641
+ statistic: "mean";
642
+ resamples: number;
643
+ };
644
+ n: number;
645
+ } | {
646
+ availability: "unavailable";
647
+ reason: string;
648
+ })>;
649
+ candidate?: {
650
+ label?: string;
651
+ rationale?: string;
652
+ };
653
+ decision: {
654
+ outcome: "ship" | "hold" | "need_more_work" | "model_ceiling" | "arch_ceiling";
655
+ reasons: string[];
656
+ contributingChecks: Array<{
657
+ name: string;
658
+ passed: boolean;
659
+ }>;
660
+ };
661
+ power: {
662
+ sufficient: boolean;
663
+ n: number;
664
+ minimumDetectableDelta: number;
665
+ confidenceLevel: number;
666
+ scaleAssumed: boolean;
667
+ sharedScorerChannel: boolean;
668
+ reason: string;
669
+ };
670
+ provenance: {
671
+ kind: "agent-eval-loop";
672
+ schema: string;
673
+ runId: string;
674
+ recordDigest: Sha256Digest;
675
+ baselineContentHash: string;
676
+ candidateContentHash: string;
677
+ };
678
+ diff: string;
679
+ evaluation: {
680
+ generationsExplored: number;
681
+ durationMs: number;
682
+ totalCostUsd: number;
683
+ };
684
+ metadata?: {
685
+ [key: string]: AgentCandidateJsonValue;
686
+ };
687
+ }
688
+ export interface AgentImprovementProposal {
689
+ schemaVersion: 1;
690
+ kind: "agent-improvement-proposal";
691
+ runId: string;
692
+ changedSurfaces: [AgentImprovementSurface, ...AgentImprovementSurface[]];
693
+ proposedAt: string;
694
+ baselineProfile: AgentProfile;
695
+ findings: {
696
+ [key: string]: AgentCandidateJsonValue;
697
+ }[];
698
+ evaluation: AgentImprovementMeasuredComparison;
699
+ candidateBundle: AgentCandidateBundle;
700
+ digest: Sha256Digest;
701
+ }
702
+ export type AgentImprovementReviewDecision = "approve" | "reject" | "request-changes";
703
+ /** Human or tenant-policy decision bound to one exact proposal. */
704
+ export interface AgentImprovementReview {
705
+ schemaVersion: 1;
706
+ kind: "agent-improvement-review";
707
+ proposalDigest: Sha256Digest;
708
+ candidateBundleDigest: Sha256Digest;
709
+ decision: AgentImprovementReviewDecision;
710
+ reviewedBy: string;
711
+ reviewedAt: string;
712
+ reason: string;
713
+ feedback?: string;
714
+ digest: Sha256Digest;
715
+ }
716
+ /** Successful post-approval execution, carrying the exact Runtime receipt. */
717
+ export interface CandidateExecutionEvidence {
718
+ schemaVersion: 1;
719
+ kind: "agent-candidate-execution-evidence";
720
+ proposalDigest: Sha256Digest;
721
+ reviewDigest: Sha256Digest;
722
+ executionId: string;
723
+ succeeded: true;
724
+ materializationReceipt: AgentCandidateMaterializationReceipt;
725
+ profileActivation: AgentCandidateProfileActivation;
726
+ receipt: AgentCandidateRunReceipt;
727
+ digest: Sha256Digest;
728
+ }
729
+ /** One router-authored model call in a terminal settlement. */
535
730
  export interface AgentCandidateModelSettlementCall {
536
731
  callId: string;
732
+ generationId: string;
537
733
  traceSpanId: string;
734
+ status: "succeeded" | "failed";
538
735
  model: string;
736
+ startedAtMs: number;
737
+ endedAtMs: number;
539
738
  inputTokens: number;
540
739
  outputTokens: number;
541
740
  cachedInputTokens: number;
542
741
  reasoningTokens: number;
543
742
  costUsdNanos: number;
544
743
  }
545
- /** Router-authored call identity, timing, and terminal status. */
546
- export interface AgentCandidateModelSettlementCallV2 extends AgentCandidateModelSettlementCall {
547
- generationId: string;
548
- status: "succeeded" | "failed";
549
- startedAtMs: number;
550
- endedAtMs: number;
551
- }
552
- /** Canonical model-access ledger after the evaluator has revoked the grant. */
553
- export interface AgentCandidateModelSettlementMaterialV1 {
554
- schemaVersion: 1;
555
- kind: "agent-candidate-model-settlement-material";
556
- executionPlanDigest: Sha256Digest;
557
- preparationId: string;
558
- grantDigest: Sha256Digest;
559
- closed: true;
560
- resolved: AgentCandidateResolvedModel;
561
- calls: AgentCandidateModelSettlementCall[];
562
- usage: AgentCandidateFixedSpend;
563
- }
564
- /** Canonical ledger whose LLM spans can be reproduced only from router facts. */
565
- export interface AgentCandidateModelSettlementMaterialV2 {
744
+ /** Canonical model-access ledger after the evaluator has revoked access. */
745
+ export interface AgentCandidateModelSettlementMaterial {
566
746
  schemaVersion: 2;
567
747
  kind: "agent-candidate-model-settlement-material";
568
748
  executionPlanDigest: Sha256Digest;
@@ -570,12 +750,11 @@ export interface AgentCandidateModelSettlementMaterialV2 {
570
750
  grantDigest: Sha256Digest;
571
751
  closed: true;
572
752
  resolved: AgentCandidateResolvedModel;
573
- calls: AgentCandidateModelSettlementCallV2[];
753
+ calls: AgentCandidateModelSettlementCall[];
574
754
  usage: AgentCandidateFixedSpend;
575
755
  }
576
- export type AgentCandidateModelSettlementMaterial = AgentCandidateModelSettlementMaterialV1 | AgentCandidateModelSettlementMaterialV2;
577
756
  export interface AgentCandidateModelSettlementEvidence {
578
- schemaVersion: 1;
757
+ schemaVersion: 2;
579
758
  kind: "agent-candidate-model-settlement";
580
759
  digest: Sha256Digest;
581
760
  material: AgentCandidateModelSettlementMaterial;
@@ -588,24 +767,31 @@ export interface AgentCandidateRepositoryState {
588
767
  commit: string;
589
768
  tree: string;
590
769
  }
591
- /** Canonical repository result produced by the candidate on one task. */
592
- export interface AgentCandidateTaskOutcomeMaterialV1 {
593
- schemaVersion: 1;
770
+ /** Canonical result captured by the evaluator after one candidate task. */
771
+ export interface AgentCandidateTaskOutcomeMaterial {
772
+ schemaVersion: 2;
594
773
  kind: "agent-candidate-task-outcome-material";
595
774
  executionPlanDigest: Sha256Digest;
596
- baseRepository: AgentCandidateRepositoryState;
597
- resultRepository: AgentCandidateRepositoryState;
598
- afterState: AgentCandidateWorkspaceSnapshotEvidence;
599
- gitDiff: {
600
- format: "git-diff-binary";
775
+ outcome: {
776
+ kind: "workspace";
777
+ baseRepository: AgentCandidateRepositoryState;
778
+ resultRepository: AgentCandidateRepositoryState;
779
+ afterState: AgentCandidateWorkspaceSnapshotEvidence;
780
+ gitDiff: {
781
+ format: "git-diff-binary";
782
+ artifact: AgentCandidateArtifactRef;
783
+ };
784
+ } | {
785
+ kind: "output";
786
+ spec: AgentCandidateTaskOutputSpec;
601
787
  artifact: AgentCandidateArtifactRef;
602
788
  };
603
789
  }
604
790
  export interface AgentCandidateTaskOutcomeEvidence {
605
- schemaVersion: 1;
791
+ schemaVersion: 2;
606
792
  kind: "agent-candidate-task-outcome";
607
793
  digest: Sha256Digest;
608
- material: AgentCandidateTaskOutcomeMaterialV1;
794
+ material: AgentCandidateTaskOutcomeMaterial;
609
795
  artifact: AgentCandidateCapturedArtifact;
610
796
  }
611
797
  export interface AgentCandidateBenchmarkDimension {
@@ -613,7 +799,7 @@ export interface AgentCandidateBenchmarkDimension {
613
799
  score: number;
614
800
  }
615
801
  /** Canonical executable-grade result for one task outcome. */
616
- export interface AgentCandidateBenchmarkResultMaterialV1 {
802
+ export interface AgentCandidateBenchmarkResultMaterial {
617
803
  schemaVersion: 1;
618
804
  kind: "agent-candidate-benchmark-result-material";
619
805
  executionPlanDigest: Sha256Digest;
@@ -639,24 +825,8 @@ export interface AgentCandidateBenchmarkResultEvidence {
639
825
  schemaVersion: 1;
640
826
  kind: "agent-candidate-benchmark-result";
641
827
  digest: Sha256Digest;
642
- material: AgentCandidateBenchmarkResultMaterialV1;
828
+ material: AgentCandidateBenchmarkResultMaterial;
643
829
  artifact: AgentCandidateCapturedArtifact;
644
830
  }
645
- /**
646
- * Terminal candidate receipt with lossless spend, exact repository output,
647
- * and executable benchmark evidence. V1 fields remain present for consumers
648
- * that have not yet adopted the stronger evidence surfaces.
649
- */
650
- export interface AgentCandidateRunReceiptV2 extends Omit<AgentCandidateRunReceiptV1, "schemaVersion"> {
651
- schemaVersion: 2;
652
- fixedUsage: AgentCandidateFixedSpend;
653
- modelSettlement: AgentCandidateModelSettlementEvidence;
654
- taskOutcome: AgentCandidateTaskOutcomeEvidence;
655
- benchmarkResult: AgentCandidateBenchmarkResultEvidence;
656
- }
657
- /** Backward-compatible V1 receipt name. */
658
- export type AgentCandidateRunReceipt = AgentCandidateRunReceiptV1;
659
- /** Explicit parser target for consumers that accept both receipt generations. */
660
- export type AgentCandidateRunReceiptAnyVersion = AgentCandidateRunReceiptV1 | AgentCandidateRunReceiptV2;
661
831
  /** Declare a candidate bundle while retaining literal inference. */
662
832
  export declare function defineAgentCandidateBundle<T extends AgentCandidateBundle>(bundle: T): T;
@@ -1,7 +1,7 @@
1
1
  export declare const candidateSha: (digit: string) => `sha256:${string}`;
2
2
  export declare const candidateGit: (digit: string) => string;
3
3
  export declare function candidateFixture(): {
4
- schemaVersion: 1;
4
+ schemaVersion: 2;
5
5
  kind: "agent-candidate-bundle";
6
6
  digestAlgorithm: "rfc8785-sha256";
7
7
  profile: {
@@ -81,15 +81,15 @@ export declare function candidateFixture(): {
81
81
  };
82
82
  };
83
83
  workspace: {
84
- schemaVersion: 1;
84
+ schemaVersion: 2;
85
85
  kind: "agent-candidate-workspace-snapshot";
86
86
  digest: `sha256:${string}`;
87
87
  material: {
88
- schemaVersion: 1;
88
+ schemaVersion: 2;
89
89
  kind: "agent-candidate-workspace-manifest";
90
90
  files: {
91
91
  path: string;
92
- mode: 493;
92
+ mode: number;
93
93
  sha256: `sha256:${string}`;
94
94
  byteLength: number;
95
95
  }[];
@@ -114,14 +114,48 @@ export declare function candidateFixture(): {
114
114
  };
115
115
  };
116
116
  knowledge: {
117
- snapshotId: string;
118
- manifest: {
119
- locator: {
120
- kind: "s3";
121
- bucket: string;
122
- key: string;
123
- region: string;
117
+ candidate: {
118
+ schemaVersion: 1;
119
+ kind: "knowledge-improvement-candidate";
120
+ runId: string;
121
+ candidateId: string;
122
+ goalHash: `sha256:${string}`;
123
+ baseHash: `sha256:${string}`;
124
+ candidateHash: `sha256:${string}`;
125
+ evidenceHash: `sha256:${string}`;
126
+ promotionPlanHash: `sha256:${string}`;
127
+ };
128
+ snapshot: {
129
+ schemaVersion: 2;
130
+ kind: "agent-candidate-workspace-snapshot";
131
+ digest: `sha256:${string}`;
132
+ material: {
133
+ schemaVersion: 2;
134
+ kind: "agent-candidate-workspace-manifest";
135
+ files: never[];
124
136
  };
137
+ manifest: {
138
+ encoding: "base64";
139
+ content: string;
140
+ sha256: `sha256:${string}`;
141
+ byteLength: number;
142
+ };
143
+ archive: {
144
+ encoding: "base64";
145
+ content: string;
146
+ sha256: `sha256:${string}`;
147
+ byteLength: number;
148
+ };
149
+ };
150
+ retrievalConfig: {
151
+ encoding: "base64";
152
+ content: string;
153
+ sha256: `sha256:${string}`;
154
+ byteLength: number;
155
+ };
156
+ evaluation: {
157
+ encoding: "base64";
158
+ content: string;
125
159
  sha256: `sha256:${string}`;
126
160
  byteLength: number;
127
161
  };
@@ -3,7 +3,7 @@ export const candidateSha = (digit) => `sha256:${digit.repeat(64)}`;
3
3
  export const candidateGit = (digit) => digit.repeat(40);
4
4
  export function candidateFixture() {
5
5
  return defineAgentCandidateBundle({
6
- schemaVersion: 1,
6
+ schemaVersion: 2,
7
7
  kind: "agent-candidate-bundle",
8
8
  digestAlgorithm: "rfc8785-sha256",
9
9
  profile: {
@@ -69,11 +69,11 @@ export function candidateFixture() {
69
69
  container: { image: "node:22", indexDigest: candidateSha("6") },
70
70
  },
71
71
  workspace: {
72
- schemaVersion: 1,
72
+ schemaVersion: 2,
73
73
  kind: "agent-candidate-workspace-snapshot",
74
74
  digest: candidateSha("c"),
75
75
  material: {
76
- schemaVersion: 1,
76
+ schemaVersion: 2,
77
77
  kind: "agent-candidate-workspace-manifest",
78
78
  files: [
79
79
  {
@@ -104,16 +104,50 @@ export function candidateFixture() {
104
104
  },
105
105
  },
106
106
  knowledge: {
107
- snapshotId: "knowledge-17",
108
- manifest: {
109
- locator: {
110
- kind: "s3",
111
- bucket: "agent-candidate-artifacts",
112
- key: "knowledge/knowledge-17.json",
113
- region: "us-east-1",
107
+ candidate: {
108
+ schemaVersion: 1,
109
+ kind: "knowledge-improvement-candidate",
110
+ runId: "knowledge-run-17",
111
+ candidateId: "knowledge-17",
112
+ goalHash: candidateSha("5"),
113
+ baseHash: candidateSha("6"),
114
+ candidateHash: candidateSha("7"),
115
+ evidenceHash: candidateSha("8"),
116
+ promotionPlanHash: candidateSha("9"),
117
+ },
118
+ snapshot: {
119
+ schemaVersion: 2,
120
+ kind: "agent-candidate-workspace-snapshot",
121
+ digest: candidateSha("7"),
122
+ material: {
123
+ schemaVersion: 2,
124
+ kind: "agent-candidate-workspace-manifest",
125
+ files: [],
126
+ },
127
+ manifest: {
128
+ encoding: "base64",
129
+ content: "e30=",
130
+ sha256: candidateSha("7"),
131
+ byteLength: 2,
114
132
  },
115
- sha256: candidateSha("7"),
116
- byteLength: 42,
133
+ archive: {
134
+ encoding: "base64",
135
+ content: "e30=",
136
+ sha256: candidateSha("8"),
137
+ byteLength: 2,
138
+ },
139
+ },
140
+ retrievalConfig: {
141
+ encoding: "base64",
142
+ content: "e30=",
143
+ sha256: candidateSha("9"),
144
+ byteLength: 2,
145
+ },
146
+ evaluation: {
147
+ encoding: "base64",
148
+ content: "e30=",
149
+ sha256: candidateSha("a"),
150
+ byteLength: 2,
117
151
  },
118
152
  },
119
153
  memory: {