@tangle-network/agent-interface 0.33.0 → 0.35.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.
- package/dist/agent-candidate-code-schema.d.ts +0 -3
- package/dist/agent-candidate-execution-plan-schema.d.ts +11 -17
- package/dist/agent-candidate-lineage-schema.d.ts +2 -2
- package/dist/agent-candidate-outcome-schema.d.ts +4 -4
- package/dist/agent-candidate-profile-schema.d.ts +0 -3
- package/dist/agent-candidate-promotion-schema.d.ts +1418 -885
- package/dist/agent-candidate-promotion-schema.js +55 -346
- package/dist/agent-candidate-receipt-schema.d.ts +9 -11
- package/dist/agent-candidate-receipt-schema.js +1 -0
- package/dist/agent-candidate-schema.d.ts +0 -6
- package/dist/agent-candidate-schema.js +1 -3
- package/dist/agent-candidate.d.ts +15 -7
- package/dist/agent-execution-limits.d.ts +28 -0
- package/dist/agent-execution-limits.js +77 -0
- package/dist/agent-improvement-measurement-schema.d.ts +198 -0
- package/dist/agent-improvement-measurement-schema.js +349 -0
- package/dist/agent-improvement-source.d.ts +23 -0
- package/dist/agent-improvement-source.js +38 -0
- package/dist/agent-profile-improvement-schema.d.ts +1088 -0
- package/dist/agent-profile-improvement-schema.js +560 -0
- package/dist/agent-profile-improvement.d.ts +140 -0
- package/dist/agent-profile-improvement.js +1 -0
- package/dist/agent-profile.d.ts +2 -2
- package/dist/agent-profile.js +2 -2
- package/dist/harness-capabilities.d.ts +1 -1
- package/dist/harness-capabilities.js +9 -12
- package/dist/harness.d.ts +1 -10
- package/dist/harness.js +0 -13
- package/dist/index.d.ts +8 -1
- package/dist/index.js +6 -0
- package/dist/interaction.d.ts +0 -17
- package/dist/interaction.js +0 -23
- package/dist/number-validation.d.ts +1 -0
- package/dist/number-validation.js +4 -0
- package/dist/profile-schema.d.ts +0 -3
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentProfile, AgentProfileFileMount, AgentProfileHookCommand, AgentProfileMode, AgentProfileModelHints, AgentProfileResources, AgentSubagentProfile, ReasoningEffort } from "./agent-profile.js";
|
|
2
2
|
import type { HarnessType } from "./harness.js";
|
|
3
|
+
import type { AgentProfileImprovementMeasuredComparison } from "./agent-profile-improvement.js";
|
|
3
4
|
/** Full SHA-256 digest with an explicit algorithm prefix. */
|
|
4
5
|
export type Sha256Digest = `sha256:${string}`;
|
|
5
6
|
/** RFC 8785 JSON Canonicalization Scheme followed by SHA-256. */
|
|
@@ -657,6 +658,7 @@ export interface AgentCandidateRunReceipt {
|
|
|
657
658
|
endedAtMs: number;
|
|
658
659
|
durationMs: number;
|
|
659
660
|
};
|
|
661
|
+
steps: number;
|
|
660
662
|
memory: AgentCandidateMemoryReceipt;
|
|
661
663
|
trace: AgentCandidateTraceEvidence;
|
|
662
664
|
termination: AgentCandidateTermination;
|
|
@@ -672,11 +674,11 @@ export interface AgentCandidateExperimentMeasurement {
|
|
|
672
674
|
baseline: CandidateExecutionEvidence;
|
|
673
675
|
candidate: CandidateExecutionEvidence;
|
|
674
676
|
}
|
|
675
|
-
/**
|
|
676
|
-
export interface
|
|
677
|
-
kind:
|
|
678
|
-
experiment:
|
|
679
|
-
measurements:
|
|
677
|
+
/** Common measured result shared by sealed and normal-profile experiments. */
|
|
678
|
+
export interface AgentImprovementMeasuredComparisonBase<TExperiment, TMeasurement, TKind extends string> {
|
|
679
|
+
kind: TKind;
|
|
680
|
+
experiment: TExperiment;
|
|
681
|
+
measurements: TMeasurement[];
|
|
680
682
|
overall: {
|
|
681
683
|
name: "composite";
|
|
682
684
|
baseline: number;
|
|
@@ -776,6 +778,11 @@ export interface AgentImprovementMeasuredComparison {
|
|
|
776
778
|
[key: string]: AgentCandidateJsonValue;
|
|
777
779
|
};
|
|
778
780
|
}
|
|
781
|
+
/** Portable paired held-out comparison produced by a sealed candidate executor. */
|
|
782
|
+
export interface AgentImprovementMeasuredComparison extends AgentImprovementMeasuredComparisonBase<AgentCandidateExperiment, AgentCandidateExperimentMeasurement, "agent-improvement-measured-comparison"> {
|
|
783
|
+
}
|
|
784
|
+
/** A reviewable measured result can come from a sealed executor or a normal profile executor. */
|
|
785
|
+
export type AgentImprovementEvaluation = AgentImprovementMeasuredComparison | AgentProfileImprovementMeasuredComparison;
|
|
779
786
|
export interface AgentImprovementProposal {
|
|
780
787
|
kind: "agent-improvement-proposal";
|
|
781
788
|
runId: string;
|
|
@@ -784,7 +791,7 @@ export interface AgentImprovementProposal {
|
|
|
784
791
|
findings: {
|
|
785
792
|
[key: string]: AgentCandidateJsonValue;
|
|
786
793
|
}[];
|
|
787
|
-
evaluation:
|
|
794
|
+
evaluation: AgentImprovementEvaluation;
|
|
788
795
|
digest: Sha256Digest;
|
|
789
796
|
}
|
|
790
797
|
export type AgentImprovementReviewDecision = "approve" | "reject" | "request-changes";
|
|
@@ -813,7 +820,8 @@ export interface AgentImprovementActivation {
|
|
|
813
820
|
proposalDigest: Sha256Digest;
|
|
814
821
|
reviewDigest: Sha256Digest;
|
|
815
822
|
experimentDigest: Sha256Digest;
|
|
816
|
-
|
|
823
|
+
/** Exact proposed state, whether it is a sealed bundle or a normal profile. */
|
|
824
|
+
candidateDigest: Sha256Digest;
|
|
817
825
|
intent: AgentImprovementActivationIntent;
|
|
818
826
|
targets: [AgentImprovementActivationTarget, ...AgentImprovementActivationTarget[]];
|
|
819
827
|
fundingOwner: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { AgentCandidateExecutionLimits, AgentCandidateFixedSpend } from "./agent-candidate.js";
|
|
3
|
+
/** The observable execution facts required to prove a frozen limit was respected. */
|
|
4
|
+
export interface AgentExecutionLimitObservation {
|
|
5
|
+
durationMs: number;
|
|
6
|
+
steps: number;
|
|
7
|
+
usage: AgentCandidateFixedSpend;
|
|
8
|
+
}
|
|
9
|
+
export declare const agentExecutionLimitObservationSchema: z.ZodObject<{
|
|
10
|
+
durationMs: z.ZodNumber;
|
|
11
|
+
steps: z.ZodNumber;
|
|
12
|
+
usage: z.ZodObject<{
|
|
13
|
+
inputTokens: z.ZodNumber;
|
|
14
|
+
outputTokens: z.ZodNumber;
|
|
15
|
+
cachedInputTokens: z.ZodNumber;
|
|
16
|
+
reasoningTokens: z.ZodNumber;
|
|
17
|
+
modelCalls: z.ZodNumber;
|
|
18
|
+
costUsdNanos: z.ZodNumber;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
export interface RefineAgentExecutionWithinLimitsOptions {
|
|
22
|
+
pathPrefix?: (string | number)[];
|
|
23
|
+
usagePath?: (string | number)[];
|
|
24
|
+
}
|
|
25
|
+
/** Reject an execution record that cannot satisfy every limit it claims to use. */
|
|
26
|
+
export declare function assertAgentExecutionWithinLimits(limits: AgentCandidateExecutionLimits, observation: AgentExecutionLimitObservation): void;
|
|
27
|
+
/** Add schema issues instead of throwing when a receipt is parsed by Zod. */
|
|
28
|
+
export declare function refineAgentExecutionWithinLimits(limits: AgentCandidateExecutionLimits, observation: AgentExecutionLimitObservation, ctx: z.RefinementCtx, options?: RefineAgentExecutionWithinLimitsOptions): void;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { agentCandidateExecutionLimitsSchema } from "./agent-candidate-execution-plan-schema.js";
|
|
3
|
+
import { agentCandidateFixedSpendSchema } from "./agent-candidate-outcome-schema.js";
|
|
4
|
+
export const agentExecutionLimitObservationSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
durationMs: z.number().finite().nonnegative(),
|
|
7
|
+
steps: z.number().int().nonnegative().safe(),
|
|
8
|
+
usage: agentCandidateFixedSpendSchema,
|
|
9
|
+
})
|
|
10
|
+
.strict();
|
|
11
|
+
/** Reject an execution record that cannot satisfy every limit it claims to use. */
|
|
12
|
+
export function assertAgentExecutionWithinLimits(limits, observation) {
|
|
13
|
+
const parsedLimits = agentCandidateExecutionLimitsSchema.parse(limits);
|
|
14
|
+
const parsedObservation = agentExecutionLimitObservationSchema.parse(observation);
|
|
15
|
+
const violations = executionLimitViolations(parsedLimits, parsedObservation);
|
|
16
|
+
if (violations.length === 0)
|
|
17
|
+
return;
|
|
18
|
+
throw new Error(violations
|
|
19
|
+
.map((violation) => `execution ${violation.label} ${violation.actual} exceeds frozen limit ${violation.maximum}`)
|
|
20
|
+
.join("; "));
|
|
21
|
+
}
|
|
22
|
+
/** Add schema issues instead of throwing when a receipt is parsed by Zod. */
|
|
23
|
+
export function refineAgentExecutionWithinLimits(limits, observation, ctx, options = {}) {
|
|
24
|
+
const pathPrefix = options.pathPrefix ?? [];
|
|
25
|
+
const usagePath = options.usagePath ?? ["usage"];
|
|
26
|
+
for (const violation of executionLimitViolations(limits, observation)) {
|
|
27
|
+
const path = violation.path[0] === "usage"
|
|
28
|
+
? [...pathPrefix, ...usagePath, ...violation.path.slice(1)]
|
|
29
|
+
: [...pathPrefix, ...violation.path];
|
|
30
|
+
ctx.addIssue({
|
|
31
|
+
code: "custom",
|
|
32
|
+
path,
|
|
33
|
+
message: `execution ${violation.label} ${violation.actual} exceeds frozen limit ${violation.maximum}`,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function executionLimitViolations(limits, observation) {
|
|
38
|
+
const checks = [
|
|
39
|
+
{
|
|
40
|
+
path: ["timing", "durationMs"],
|
|
41
|
+
label: "durationMs",
|
|
42
|
+
actual: observation.durationMs,
|
|
43
|
+
maximum: limits.timeoutMs,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
path: ["steps"],
|
|
47
|
+
label: "steps",
|
|
48
|
+
actual: observation.steps,
|
|
49
|
+
maximum: limits.maxSteps,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
path: ["usage", "modelCalls"],
|
|
53
|
+
label: "modelCalls",
|
|
54
|
+
actual: observation.usage.modelCalls,
|
|
55
|
+
maximum: limits.maxModelCalls,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
path: ["usage", "inputTokens"],
|
|
59
|
+
label: "inputTokens",
|
|
60
|
+
actual: observation.usage.inputTokens,
|
|
61
|
+
maximum: limits.maxInputTokens,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
path: ["usage", "outputTokens"],
|
|
65
|
+
label: "outputTokens",
|
|
66
|
+
actual: observation.usage.outputTokens,
|
|
67
|
+
maximum: limits.maxOutputTokens,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
path: ["usage", "costUsdNanos"],
|
|
71
|
+
label: "costUsd",
|
|
72
|
+
actual: observation.usage.costUsdNanos / 1_000_000_000,
|
|
73
|
+
maximum: limits.maxCostUsd,
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
return checks.filter((check) => check.actual > check.maximum);
|
|
77
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { AgentCandidateEvaluationPolicy, AgentCandidateJsonValue, AgentImprovementMeasuredComparisonBase } from "./agent-candidate.js";
|
|
3
|
+
export declare const canonicalJsonSchema: z.ZodCustom<AgentCandidateJsonValue, AgentCandidateJsonValue>;
|
|
4
|
+
export declare const canonicalJsonObjectSchema: z.ZodRecord<z.ZodString, z.ZodCustom<AgentCandidateJsonValue, AgentCandidateJsonValue>>;
|
|
5
|
+
export declare const agentCandidateEvaluationPolicySchema: z.ZodObject<{
|
|
6
|
+
confidenceLevel: z.ZodNumber;
|
|
7
|
+
resamples: z.ZodNumber;
|
|
8
|
+
bootstrapSeed: z.ZodNumber;
|
|
9
|
+
deltaThreshold: z.ZodNumber;
|
|
10
|
+
minProductiveRuns: z.ZodNumber;
|
|
11
|
+
budgetUsd: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
criticalDimensions: z.ZodArray<z.ZodString>;
|
|
13
|
+
regressionTolerance: z.ZodNumber;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
export declare const measuredComparisonCommonShape: {
|
|
16
|
+
overall: z.ZodObject<{
|
|
17
|
+
direction: z.ZodLiteral<"higher-is-better">;
|
|
18
|
+
unit: z.ZodLiteral<"score">;
|
|
19
|
+
baseline: z.ZodNumber;
|
|
20
|
+
candidate: z.ZodNumber;
|
|
21
|
+
delta: z.ZodNumber;
|
|
22
|
+
confidenceInterval: z.ZodObject<{
|
|
23
|
+
level: z.ZodNumber;
|
|
24
|
+
lower: z.ZodNumber;
|
|
25
|
+
upper: z.ZodNumber;
|
|
26
|
+
method: z.ZodLiteral<"paired-bootstrap">;
|
|
27
|
+
statistic: z.ZodLiteral<"mean">;
|
|
28
|
+
resamples: z.ZodNumber;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
n: z.ZodNumber;
|
|
31
|
+
name: z.ZodLiteral<"composite">;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
objectives: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
34
|
+
kind: z.ZodLiteral<"objective">;
|
|
35
|
+
name: z.ZodString;
|
|
36
|
+
direction: z.ZodLiteral<"higher-is-better">;
|
|
37
|
+
unit: z.ZodLiteral<"score">;
|
|
38
|
+
baseline: z.ZodNumber;
|
|
39
|
+
candidate: z.ZodNumber;
|
|
40
|
+
delta: z.ZodNumber;
|
|
41
|
+
confidenceInterval: z.ZodObject<{
|
|
42
|
+
level: z.ZodNumber;
|
|
43
|
+
lower: z.ZodNumber;
|
|
44
|
+
upper: z.ZodNumber;
|
|
45
|
+
method: z.ZodLiteral<"paired-bootstrap">;
|
|
46
|
+
statistic: z.ZodLiteral<"mean">;
|
|
47
|
+
resamples: z.ZodNumber;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
n: z.ZodNumber;
|
|
50
|
+
availability: z.ZodLiteral<"measured">;
|
|
51
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
52
|
+
kind: z.ZodLiteral<"objective">;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
direction: z.ZodLiteral<"higher-is-better">;
|
|
55
|
+
unit: z.ZodLiteral<"score">;
|
|
56
|
+
availability: z.ZodLiteral<"unavailable">;
|
|
57
|
+
reason: z.ZodString;
|
|
58
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
59
|
+
kind: z.ZodLiteral<"dimension">;
|
|
60
|
+
objective: z.ZodString;
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
direction: z.ZodLiteral<"higher-is-better">;
|
|
63
|
+
unit: z.ZodLiteral<"score">;
|
|
64
|
+
baseline: z.ZodNumber;
|
|
65
|
+
candidate: z.ZodNumber;
|
|
66
|
+
delta: z.ZodNumber;
|
|
67
|
+
confidenceInterval: z.ZodObject<{
|
|
68
|
+
level: z.ZodNumber;
|
|
69
|
+
lower: z.ZodNumber;
|
|
70
|
+
upper: z.ZodNumber;
|
|
71
|
+
method: z.ZodLiteral<"paired-bootstrap">;
|
|
72
|
+
statistic: z.ZodLiteral<"mean">;
|
|
73
|
+
resamples: z.ZodNumber;
|
|
74
|
+
}, z.core.$strict>;
|
|
75
|
+
n: z.ZodNumber;
|
|
76
|
+
availability: z.ZodLiteral<"measured">;
|
|
77
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
78
|
+
kind: z.ZodLiteral<"dimension">;
|
|
79
|
+
objective: z.ZodString;
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
direction: z.ZodLiteral<"higher-is-better">;
|
|
82
|
+
unit: z.ZodLiteral<"score">;
|
|
83
|
+
availability: z.ZodLiteral<"unavailable">;
|
|
84
|
+
reason: z.ZodString;
|
|
85
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
86
|
+
kind: z.ZodLiteral<"cost">;
|
|
87
|
+
name: z.ZodLiteral<"cost">;
|
|
88
|
+
direction: z.ZodLiteral<"lower-is-better">;
|
|
89
|
+
unit: z.ZodLiteral<"usd">;
|
|
90
|
+
baseline: z.ZodNumber;
|
|
91
|
+
candidate: z.ZodNumber;
|
|
92
|
+
delta: z.ZodNumber;
|
|
93
|
+
confidenceInterval: z.ZodObject<{
|
|
94
|
+
level: z.ZodNumber;
|
|
95
|
+
lower: z.ZodNumber;
|
|
96
|
+
upper: z.ZodNumber;
|
|
97
|
+
method: z.ZodLiteral<"paired-bootstrap">;
|
|
98
|
+
statistic: z.ZodLiteral<"mean">;
|
|
99
|
+
resamples: z.ZodNumber;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
n: z.ZodNumber;
|
|
102
|
+
availability: z.ZodLiteral<"measured">;
|
|
103
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
104
|
+
kind: z.ZodLiteral<"latency">;
|
|
105
|
+
name: z.ZodLiteral<"latency">;
|
|
106
|
+
direction: z.ZodLiteral<"lower-is-better">;
|
|
107
|
+
unit: z.ZodLiteral<"milliseconds">;
|
|
108
|
+
baseline: z.ZodNumber;
|
|
109
|
+
candidate: z.ZodNumber;
|
|
110
|
+
delta: z.ZodNumber;
|
|
111
|
+
confidenceInterval: z.ZodObject<{
|
|
112
|
+
level: z.ZodNumber;
|
|
113
|
+
lower: z.ZodNumber;
|
|
114
|
+
upper: z.ZodNumber;
|
|
115
|
+
method: z.ZodLiteral<"paired-bootstrap">;
|
|
116
|
+
statistic: z.ZodLiteral<"mean">;
|
|
117
|
+
resamples: z.ZodNumber;
|
|
118
|
+
}, z.core.$strict>;
|
|
119
|
+
n: z.ZodNumber;
|
|
120
|
+
availability: z.ZodLiteral<"measured">;
|
|
121
|
+
}, z.core.$strict>]>>;
|
|
122
|
+
candidate: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
label: z.ZodOptional<z.ZodString>;
|
|
124
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
125
|
+
}, z.core.$strict>>;
|
|
126
|
+
decision: z.ZodObject<{
|
|
127
|
+
outcome: z.ZodEnum<{
|
|
128
|
+
ship: "ship";
|
|
129
|
+
hold: "hold";
|
|
130
|
+
need_more_work: "need_more_work";
|
|
131
|
+
model_ceiling: "model_ceiling";
|
|
132
|
+
arch_ceiling: "arch_ceiling";
|
|
133
|
+
}>;
|
|
134
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
135
|
+
contributingChecks: z.ZodArray<z.ZodObject<{
|
|
136
|
+
name: z.ZodString;
|
|
137
|
+
passed: z.ZodBoolean;
|
|
138
|
+
}, z.core.$strict>>;
|
|
139
|
+
}, z.core.$strict>;
|
|
140
|
+
power: z.ZodObject<{
|
|
141
|
+
sufficient: z.ZodBoolean;
|
|
142
|
+
n: z.ZodNumber;
|
|
143
|
+
minimumDetectableDelta: z.ZodNumber;
|
|
144
|
+
confidenceLevel: z.ZodNumber;
|
|
145
|
+
scaleAssumed: z.ZodBoolean;
|
|
146
|
+
sharedScorerChannel: z.ZodBoolean;
|
|
147
|
+
reason: z.ZodString;
|
|
148
|
+
}, z.core.$strict>;
|
|
149
|
+
provenance: z.ZodObject<{
|
|
150
|
+
kind: z.ZodLiteral<"agent-eval-loop">;
|
|
151
|
+
schema: z.ZodString;
|
|
152
|
+
runId: z.ZodString;
|
|
153
|
+
recordDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
154
|
+
baselineContentHash: z.ZodString;
|
|
155
|
+
candidateContentHash: z.ZodString;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
diff: z.ZodString;
|
|
158
|
+
evaluation: z.ZodObject<{
|
|
159
|
+
generationsExplored: z.ZodNumber;
|
|
160
|
+
searchDurationMs: z.ZodNumber;
|
|
161
|
+
executionDurationMs: z.ZodNumber;
|
|
162
|
+
durationMs: z.ZodNumber;
|
|
163
|
+
searchCostUsd: z.ZodNumber;
|
|
164
|
+
executionCostUsd: z.ZodNumber;
|
|
165
|
+
totalCostUsd: z.ZodNumber;
|
|
166
|
+
}, z.core.$strict>;
|
|
167
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<AgentCandidateJsonValue, AgentCandidateJsonValue>>>;
|
|
168
|
+
};
|
|
169
|
+
type MeasuredComparison = Pick<AgentImprovementMeasuredComparisonBase<unknown, unknown, string>, "overall" | "objectives" | "power" | "evaluation">;
|
|
170
|
+
interface MeasuredComparisonIdentity {
|
|
171
|
+
kind: string;
|
|
172
|
+
value: string;
|
|
173
|
+
path?: (string | number)[];
|
|
174
|
+
}
|
|
175
|
+
/** Keep receipt identity reuse rules identical across measured source formats. */
|
|
176
|
+
export declare function createMeasuredComparisonIdentityRegistry(options: {
|
|
177
|
+
ctx: z.RefinementCtx;
|
|
178
|
+
identityLabel: string;
|
|
179
|
+
}): (identities: readonly MeasuredComparisonIdentity[], fallbackPath: (string | number)[]) => void;
|
|
180
|
+
export declare function refineMeasuredComparisonSummary<TReceipt>(comparison: MeasuredComparison, policy: Pick<AgentCandidateEvaluationPolicy, "confidenceLevel" | "resamples">, expectedN: number, measurements: readonly {
|
|
181
|
+
baseline: TReceipt;
|
|
182
|
+
candidate: TReceipt;
|
|
183
|
+
}[], values: {
|
|
184
|
+
score(receipt: TReceipt): number;
|
|
185
|
+
dimension(receipt: TReceipt, name: string): number | undefined;
|
|
186
|
+
cost(receipt: TReceipt): number;
|
|
187
|
+
latency(receipt: TReceipt): number;
|
|
188
|
+
}, ctx: z.RefinementCtx): void;
|
|
189
|
+
export declare function refineEstimate(estimate: {
|
|
190
|
+
baseline: number;
|
|
191
|
+
candidate: number;
|
|
192
|
+
delta: number;
|
|
193
|
+
confidenceInterval: {
|
|
194
|
+
lower: number;
|
|
195
|
+
upper: number;
|
|
196
|
+
};
|
|
197
|
+
}, path: (string | number)[], ctx: z.RefinementCtx): void;
|
|
198
|
+
export {};
|