@tangle-network/agent-interface 0.25.0 → 0.26.1
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 +2 -2
- package/dist/agent-candidate-artifact-schema.d.ts +5 -5
- package/dist/agent-candidate-artifact-schema.js +30 -5
- package/dist/agent-candidate-code-schema.d.ts +3 -3
- package/dist/agent-candidate-execution-plan-schema.d.ts +149 -46
- package/dist/agent-candidate-execution-plan-schema.js +81 -9
- package/dist/agent-candidate-lineage-schema.d.ts +90 -3
- package/dist/agent-candidate-lineage-schema.js +17 -3
- package/dist/agent-candidate-outcome-schema.d.ts +259 -395
- package/dist/agent-candidate-outcome-schema.js +75 -64
- package/dist/agent-candidate-promotion-schema.d.ts +2708 -0
- package/dist/agent-candidate-promotion-schema.js +409 -0
- package/dist/agent-candidate-receipt-schema.d.ts +238 -1333
- package/dist/agent-candidate-receipt-schema.js +7 -116
- package/dist/agent-candidate-schema-common.d.ts +2 -0
- package/dist/agent-candidate-schema-common.js +8 -0
- package/dist/agent-candidate-schema.d.ts +94 -7
- package/dist/agent-candidate-schema.js +1 -1
- package/dist/agent-candidate.d.ts +251 -87
- package/dist/agent-candidate.test-fixture.d.ts +45 -11
- package/dist/agent-candidate.test-fixture.js +46 -12
- package/dist/agent-profile.js +5 -20
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +3 -2
|
@@ -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
|
-
/**
|
|
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
|
-
|
|
201
|
-
|
|
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
|
|
255
|
-
schemaVersion:
|
|
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
|
|
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
|
|
301
|
-
schemaVersion:
|
|
316
|
+
export interface AgentCandidateWorkspaceManifestMaterial {
|
|
317
|
+
schemaVersion: 2;
|
|
302
318
|
kind: "agent-candidate-workspace-manifest";
|
|
303
319
|
files: Array<{
|
|
304
320
|
path: string;
|
|
305
|
-
|
|
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:
|
|
329
|
+
schemaVersion: 2;
|
|
313
330
|
kind: "agent-candidate-workspace-snapshot";
|
|
314
331
|
digest: Sha256Digest;
|
|
315
|
-
material:
|
|
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
|
|
369
|
-
schemaVersion:
|
|
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
|
-
|
|
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: {
|
|
@@ -453,14 +485,26 @@ export interface AgentCandidateProfilePlanEvidence {
|
|
|
453
485
|
schemaVersion: 1;
|
|
454
486
|
kind: "agent-profile-workspace-plan";
|
|
455
487
|
digest: Sha256Digest;
|
|
456
|
-
material:
|
|
488
|
+
material: AgentCandidateProfilePlanMaterial;
|
|
457
489
|
artifact: AgentCandidateCapturedArtifact;
|
|
458
490
|
}
|
|
459
|
-
|
|
491
|
+
/** Exact native profile files and the canonical plan that activated them. */
|
|
492
|
+
export interface AgentCandidateProfileActivation {
|
|
460
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;
|
|
461
505
|
kind: "agent-candidate-execution-plan";
|
|
462
506
|
digest: Sha256Digest;
|
|
463
|
-
material:
|
|
507
|
+
material: AgentCandidateExecutionPlanMaterial;
|
|
464
508
|
artifact: AgentCandidateCapturedArtifact;
|
|
465
509
|
}
|
|
466
510
|
export interface AgentCandidateTraceEvidence {
|
|
@@ -469,10 +513,6 @@ export interface AgentCandidateTraceEvidence {
|
|
|
469
513
|
eventCount: number;
|
|
470
514
|
modelCallCount: number;
|
|
471
515
|
}
|
|
472
|
-
export interface AgentCandidateModelUsage {
|
|
473
|
-
resolved: AgentCandidateResolvedModel;
|
|
474
|
-
usage: AgentCandidateSpend;
|
|
475
|
-
}
|
|
476
516
|
export type AgentCandidateMemoryReceipt = {
|
|
477
517
|
mode: "disabled";
|
|
478
518
|
} | {
|
|
@@ -484,8 +524,8 @@ export type AgentCandidateMemoryReceipt = {
|
|
|
484
524
|
afterState: AgentCandidateWorkspaceSnapshotEvidence;
|
|
485
525
|
};
|
|
486
526
|
/** Proof emitted after a runtime materializes, but before it executes, a bundle. */
|
|
487
|
-
export interface
|
|
488
|
-
schemaVersion:
|
|
527
|
+
export interface AgentCandidateMaterializationReceipt {
|
|
528
|
+
schemaVersion: 2;
|
|
489
529
|
kind: "agent-candidate-materialization";
|
|
490
530
|
digestAlgorithm: AgentCandidateDigestAlgorithm;
|
|
491
531
|
bundleDigest: Sha256Digest;
|
|
@@ -508,7 +548,6 @@ export interface AgentCandidateMaterializationReceiptV1 {
|
|
|
508
548
|
entrypoint?: AgentCandidateEntrypointReceipt;
|
|
509
549
|
digest: Sha256Digest;
|
|
510
550
|
}
|
|
511
|
-
export type AgentCandidateMaterializationReceipt = AgentCandidateMaterializationReceiptV1;
|
|
512
551
|
/** How an execution ended, independent of whether protected evidence capture completed. */
|
|
513
552
|
export type AgentCandidateTermination = {
|
|
514
553
|
kind: "exit";
|
|
@@ -523,52 +562,187 @@ export type AgentCandidateTermination = {
|
|
|
523
562
|
kind: "cancelled";
|
|
524
563
|
};
|
|
525
564
|
/** Proof emitted after the exact materialized plan finishes executing. */
|
|
526
|
-
export interface
|
|
527
|
-
schemaVersion:
|
|
565
|
+
export interface AgentCandidateRunReceipt {
|
|
566
|
+
schemaVersion: 3;
|
|
528
567
|
kind: "agent-candidate-run";
|
|
529
568
|
digestAlgorithm: AgentCandidateDigestAlgorithm;
|
|
530
569
|
bundleDigest: Sha256Digest;
|
|
531
570
|
materializationReceiptDigest: Sha256Digest;
|
|
532
571
|
executionPlanDigest: Sha256Digest;
|
|
533
572
|
memory: AgentCandidateMemoryReceipt;
|
|
534
|
-
usage: AgentCandidateSpend;
|
|
535
|
-
modelUsage: AgentCandidateModelUsage;
|
|
536
573
|
trace: AgentCandidateTraceEvidence;
|
|
537
574
|
termination: AgentCandidateTermination;
|
|
575
|
+
executorCapture: AgentCandidateArtifactRef;
|
|
576
|
+
modelSettlement: AgentCandidateModelSettlementEvidence;
|
|
577
|
+
taskOutcome: AgentCandidateTaskOutcomeEvidence;
|
|
578
|
+
benchmarkResult: AgentCandidateBenchmarkResultEvidence;
|
|
579
|
+
digest: Sha256Digest;
|
|
580
|
+
}
|
|
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;
|
|
538
727
|
digest: Sha256Digest;
|
|
539
728
|
}
|
|
540
|
-
/** One
|
|
729
|
+
/** One router-authored model call in a terminal settlement. */
|
|
541
730
|
export interface AgentCandidateModelSettlementCall {
|
|
542
731
|
callId: string;
|
|
732
|
+
generationId: string;
|
|
543
733
|
traceSpanId: string;
|
|
734
|
+
status: "succeeded" | "failed";
|
|
544
735
|
model: string;
|
|
736
|
+
startedAtMs: number;
|
|
737
|
+
endedAtMs: number;
|
|
545
738
|
inputTokens: number;
|
|
546
739
|
outputTokens: number;
|
|
547
740
|
cachedInputTokens: number;
|
|
548
741
|
reasoningTokens: number;
|
|
549
742
|
costUsdNanos: number;
|
|
550
743
|
}
|
|
551
|
-
/**
|
|
552
|
-
export interface
|
|
553
|
-
generationId: string;
|
|
554
|
-
status: "succeeded" | "failed";
|
|
555
|
-
startedAtMs: number;
|
|
556
|
-
endedAtMs: number;
|
|
557
|
-
}
|
|
558
|
-
/** Canonical model-access ledger after the evaluator has revoked the grant. */
|
|
559
|
-
export interface AgentCandidateModelSettlementMaterialV1 {
|
|
560
|
-
schemaVersion: 1;
|
|
561
|
-
kind: "agent-candidate-model-settlement-material";
|
|
562
|
-
executionPlanDigest: Sha256Digest;
|
|
563
|
-
preparationId: string;
|
|
564
|
-
grantDigest: Sha256Digest;
|
|
565
|
-
closed: true;
|
|
566
|
-
resolved: AgentCandidateResolvedModel;
|
|
567
|
-
calls: AgentCandidateModelSettlementCall[];
|
|
568
|
-
usage: AgentCandidateFixedSpend;
|
|
569
|
-
}
|
|
570
|
-
/** Canonical ledger whose LLM spans can be reproduced only from router facts. */
|
|
571
|
-
export interface AgentCandidateModelSettlementMaterialV2 {
|
|
744
|
+
/** Canonical model-access ledger after the evaluator has revoked access. */
|
|
745
|
+
export interface AgentCandidateModelSettlementMaterial {
|
|
572
746
|
schemaVersion: 2;
|
|
573
747
|
kind: "agent-candidate-model-settlement-material";
|
|
574
748
|
executionPlanDigest: Sha256Digest;
|
|
@@ -576,12 +750,11 @@ export interface AgentCandidateModelSettlementMaterialV2 {
|
|
|
576
750
|
grantDigest: Sha256Digest;
|
|
577
751
|
closed: true;
|
|
578
752
|
resolved: AgentCandidateResolvedModel;
|
|
579
|
-
calls:
|
|
753
|
+
calls: AgentCandidateModelSettlementCall[];
|
|
580
754
|
usage: AgentCandidateFixedSpend;
|
|
581
755
|
}
|
|
582
|
-
export type AgentCandidateModelSettlementMaterial = AgentCandidateModelSettlementMaterialV1 | AgentCandidateModelSettlementMaterialV2;
|
|
583
756
|
export interface AgentCandidateModelSettlementEvidence {
|
|
584
|
-
schemaVersion:
|
|
757
|
+
schemaVersion: 2;
|
|
585
758
|
kind: "agent-candidate-model-settlement";
|
|
586
759
|
digest: Sha256Digest;
|
|
587
760
|
material: AgentCandidateModelSettlementMaterial;
|
|
@@ -594,24 +767,31 @@ export interface AgentCandidateRepositoryState {
|
|
|
594
767
|
commit: string;
|
|
595
768
|
tree: string;
|
|
596
769
|
}
|
|
597
|
-
/** Canonical
|
|
598
|
-
export interface
|
|
599
|
-
schemaVersion:
|
|
770
|
+
/** Canonical result captured by the evaluator after one candidate task. */
|
|
771
|
+
export interface AgentCandidateTaskOutcomeMaterial {
|
|
772
|
+
schemaVersion: 2;
|
|
600
773
|
kind: "agent-candidate-task-outcome-material";
|
|
601
774
|
executionPlanDigest: Sha256Digest;
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
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;
|
|
607
787
|
artifact: AgentCandidateArtifactRef;
|
|
608
788
|
};
|
|
609
789
|
}
|
|
610
790
|
export interface AgentCandidateTaskOutcomeEvidence {
|
|
611
|
-
schemaVersion:
|
|
791
|
+
schemaVersion: 2;
|
|
612
792
|
kind: "agent-candidate-task-outcome";
|
|
613
793
|
digest: Sha256Digest;
|
|
614
|
-
material:
|
|
794
|
+
material: AgentCandidateTaskOutcomeMaterial;
|
|
615
795
|
artifact: AgentCandidateCapturedArtifact;
|
|
616
796
|
}
|
|
617
797
|
export interface AgentCandidateBenchmarkDimension {
|
|
@@ -619,7 +799,7 @@ export interface AgentCandidateBenchmarkDimension {
|
|
|
619
799
|
score: number;
|
|
620
800
|
}
|
|
621
801
|
/** Canonical executable-grade result for one task outcome. */
|
|
622
|
-
export interface
|
|
802
|
+
export interface AgentCandidateBenchmarkResultMaterial {
|
|
623
803
|
schemaVersion: 1;
|
|
624
804
|
kind: "agent-candidate-benchmark-result-material";
|
|
625
805
|
executionPlanDigest: Sha256Digest;
|
|
@@ -645,24 +825,8 @@ export interface AgentCandidateBenchmarkResultEvidence {
|
|
|
645
825
|
schemaVersion: 1;
|
|
646
826
|
kind: "agent-candidate-benchmark-result";
|
|
647
827
|
digest: Sha256Digest;
|
|
648
|
-
material:
|
|
828
|
+
material: AgentCandidateBenchmarkResultMaterial;
|
|
649
829
|
artifact: AgentCandidateCapturedArtifact;
|
|
650
830
|
}
|
|
651
|
-
/**
|
|
652
|
-
* Terminal candidate receipt with lossless spend, exact repository output,
|
|
653
|
-
* and executable benchmark evidence. V1 fields remain present for consumers
|
|
654
|
-
* that have not yet adopted the stronger evidence surfaces.
|
|
655
|
-
*/
|
|
656
|
-
export interface AgentCandidateRunReceiptV2 extends Omit<AgentCandidateRunReceiptV1, "schemaVersion"> {
|
|
657
|
-
schemaVersion: 2;
|
|
658
|
-
fixedUsage: AgentCandidateFixedSpend;
|
|
659
|
-
modelSettlement: AgentCandidateModelSettlementEvidence;
|
|
660
|
-
taskOutcome: AgentCandidateTaskOutcomeEvidence;
|
|
661
|
-
benchmarkResult: AgentCandidateBenchmarkResultEvidence;
|
|
662
|
-
}
|
|
663
|
-
/** Backward-compatible V1 receipt name. */
|
|
664
|
-
export type AgentCandidateRunReceipt = AgentCandidateRunReceiptV1;
|
|
665
|
-
/** Explicit parser target for consumers that accept both receipt generations. */
|
|
666
|
-
export type AgentCandidateRunReceiptAnyVersion = AgentCandidateRunReceiptV1 | AgentCandidateRunReceiptV2;
|
|
667
831
|
/** Declare a candidate bundle while retaining literal inference. */
|
|
668
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:
|
|
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:
|
|
84
|
+
schemaVersion: 2;
|
|
85
85
|
kind: "agent-candidate-workspace-snapshot";
|
|
86
86
|
digest: `sha256:${string}`;
|
|
87
87
|
material: {
|
|
88
|
-
schemaVersion:
|
|
88
|
+
schemaVersion: 2;
|
|
89
89
|
kind: "agent-candidate-workspace-manifest";
|
|
90
90
|
files: {
|
|
91
91
|
path: string;
|
|
92
|
-
mode:
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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:
|
|
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:
|
|
72
|
+
schemaVersion: 2,
|
|
73
73
|
kind: "agent-candidate-workspace-snapshot",
|
|
74
74
|
digest: candidateSha("c"),
|
|
75
75
|
material: {
|
|
76
|
-
schemaVersion:
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
116
|
-
|
|
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: {
|