@openpond/evals 0.4.2 → 0.5.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/CONTRACT.md +14 -0
- package/README.md +6 -1
- package/dist/artifact-verification.js +172 -0
- package/dist/builtin-benchmarks/harness-refiner.js +469 -24
- package/dist/execution-contracts.js +153 -0
- package/dist/execution-receipts.js +185 -0
- package/dist/graders.js +8 -2
- package/dist/index.js +5 -0
- package/dist/preferences.js +737 -0
- package/dist/rollouts.js +241 -0
- package/dist/tasksets.js +24 -0
- package/dist/types/artifact-verification.d.ts +31 -0
- package/dist/types/artifact-verification.d.ts.map +1 -0
- package/dist/types/builtin-benchmarks/harness-refiner.d.ts +22 -0
- package/dist/types/builtin-benchmarks/harness-refiner.d.ts.map +1 -1
- package/dist/types/conformance.d.ts +44 -0
- package/dist/types/conformance.d.ts.map +1 -1
- package/dist/types/evidence/conformance.d.ts +24 -24
- package/dist/types/evidence/contracts.d.ts +42 -42
- package/dist/types/execution-contracts.d.ts +806 -0
- package/dist/types/execution-contracts.d.ts.map +1 -0
- package/dist/types/execution-receipts.d.ts +55 -0
- package/dist/types/execution-receipts.d.ts.map +1 -0
- package/dist/types/graders.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/preferences.d.ts +535 -0
- package/dist/types/preferences.d.ts.map +1 -0
- package/dist/types/review-conformance.d.ts +20 -15
- package/dist/types/review-conformance.d.ts.map +1 -1
- package/dist/types/rollouts.d.ts +221 -0
- package/dist/types/rollouts.d.ts.map +1 -0
- package/dist/types/tasksets.d.ts +89 -0
- package/dist/types/tasksets.d.ts.map +1 -1
- package/package.json +9 -1
package/dist/rollouts.js
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ImmutableArtifactRefSchema, ImmutableReleaseRefSchema, MetadataSchema, ModelRefSchema, ReleaseHashSchema, ReleaseIdSchema, ReleaseTimestampSchema, contentHash, } from "@openpond/harness";
|
|
3
|
+
import { AttemptOutcomeClassSchema, FailureOwnerSchema, RewardReceiptSchema, ScoringStatusSchema, } from "./execution-contracts.js";
|
|
4
|
+
import { TaskSplitSchema } from "./tasksets.js";
|
|
5
|
+
import { AttemptReceiptSchema, verifyAttemptReceipt } from "./runs.js";
|
|
6
|
+
export const OptimizerTrainingSampleSchema = z
|
|
7
|
+
.object({
|
|
8
|
+
schemaVersion: z.literal("openpond.optimizerTrainingSample.v1"),
|
|
9
|
+
tokenIds: z.array(z.number().int().nonnegative()).min(2).max(32_768),
|
|
10
|
+
mask: z.array(z.boolean()).min(2).max(32_768),
|
|
11
|
+
logprobs: z.array(z.number().finite()).min(2).max(32_768),
|
|
12
|
+
temperatures: z.array(z.number().positive().finite()).min(2).max(32_768),
|
|
13
|
+
envName: z.string().trim().min(1).max(200),
|
|
14
|
+
modelRequestId: z.string().trim().min(1).max(1_000),
|
|
15
|
+
promptTokenCount: z.number().int().positive(),
|
|
16
|
+
completionTokenCount: z.number().int().positive(),
|
|
17
|
+
servedPolicyVersion: z.number().int().nonnegative(),
|
|
18
|
+
})
|
|
19
|
+
.strict()
|
|
20
|
+
.superRefine((sample, context) => {
|
|
21
|
+
const length = sample.tokenIds.length;
|
|
22
|
+
for (const [name, values] of [
|
|
23
|
+
["mask", sample.mask],
|
|
24
|
+
["logprobs", sample.logprobs],
|
|
25
|
+
["temperatures", sample.temperatures],
|
|
26
|
+
]) {
|
|
27
|
+
if (values.length !== length) {
|
|
28
|
+
context.addIssue({
|
|
29
|
+
code: "custom",
|
|
30
|
+
path: [name],
|
|
31
|
+
message: `${name} must align with tokenIds`,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (sample.promptTokenCount + sample.completionTokenCount !== length) {
|
|
36
|
+
context.addIssue({
|
|
37
|
+
code: "custom",
|
|
38
|
+
path: ["completionTokenCount"],
|
|
39
|
+
message: "prompt and completion token counts must span tokenIds",
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (sample.mask.filter((trainable) => !trainable).length !== sample.promptTokenCount) {
|
|
43
|
+
context.addIssue({
|
|
44
|
+
code: "custom",
|
|
45
|
+
path: ["mask"],
|
|
46
|
+
message: "promptTokenCount must equal the non-trainable mask count",
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (sample.mask.filter(Boolean).length !== sample.completionTokenCount) {
|
|
50
|
+
context.addIssue({
|
|
51
|
+
code: "custom",
|
|
52
|
+
path: ["mask"],
|
|
53
|
+
message: "completionTokenCount must equal the trainable mask count",
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
export const EnvironmentExecutionEvidenceSchema = z.object({
|
|
58
|
+
id: ReleaseIdSchema,
|
|
59
|
+
environmentRelease: ImmutableReleaseRefSchema,
|
|
60
|
+
status: z.enum(["completed", "failed", "timed_out", "cancelled"]),
|
|
61
|
+
startedAt: ReleaseTimestampSchema,
|
|
62
|
+
completedAt: ReleaseTimestampSchema,
|
|
63
|
+
traceRefs: z.array(ImmutableArtifactRefSchema).max(10_000),
|
|
64
|
+
metadata: MetadataSchema,
|
|
65
|
+
}).strict();
|
|
66
|
+
const RolloutRewardProjectionSchema = z.object({
|
|
67
|
+
receiptRef: ImmutableReleaseRefSchema,
|
|
68
|
+
status: ScoringStatusSchema,
|
|
69
|
+
value: z.number().min(0).max(1).nullable(),
|
|
70
|
+
learningEligible: z.boolean(),
|
|
71
|
+
passed: z.boolean(),
|
|
72
|
+
outcomeClass: AttemptOutcomeClassSchema,
|
|
73
|
+
failureOwner: FailureOwnerSchema.nullable(),
|
|
74
|
+
components: z.record(ReleaseIdSchema, z.number().min(0).max(1).nullable()),
|
|
75
|
+
}).strict();
|
|
76
|
+
const CanonicalRolloutRecordFieldsSchema = z.object({
|
|
77
|
+
schemaVersion: z.literal("openpond.canonicalRolloutRecord.v1"),
|
|
78
|
+
id: ReleaseIdSchema,
|
|
79
|
+
attemptRef: ImmutableReleaseRefSchema,
|
|
80
|
+
artifactManifestRef: ImmutableReleaseRefSchema,
|
|
81
|
+
tasksetRelease: ImmutableReleaseRefSchema,
|
|
82
|
+
environmentRelease: ImmutableReleaseRefSchema,
|
|
83
|
+
verifierSetRelease: ImmutableReleaseRefSchema,
|
|
84
|
+
harnessRelease: ImmutableReleaseRefSchema,
|
|
85
|
+
taskId: ReleaseIdSchema,
|
|
86
|
+
split: TaskSplitSchema,
|
|
87
|
+
model: ModelRefSchema,
|
|
88
|
+
seed: z.string().trim().min(1).max(500),
|
|
89
|
+
reward: RolloutRewardProjectionSchema,
|
|
90
|
+
traceRef: ImmutableArtifactRefSchema,
|
|
91
|
+
optimizerSample: OptimizerTrainingSampleSchema.nullable(),
|
|
92
|
+
environmentExecutions: z.array(EnvironmentExecutionEvidenceSchema).min(1).max(100_000),
|
|
93
|
+
startedAt: ReleaseTimestampSchema,
|
|
94
|
+
completedAt: ReleaseTimestampSchema,
|
|
95
|
+
metadata: MetadataSchema,
|
|
96
|
+
}).strict();
|
|
97
|
+
function validateCanonicalRolloutRecord(record, context) {
|
|
98
|
+
if (record.reward.status === "scored" && (record.reward.value === null || !record.reward.learningEligible)) {
|
|
99
|
+
context.addIssue({
|
|
100
|
+
code: "custom",
|
|
101
|
+
path: ["reward", "status"],
|
|
102
|
+
message: "A scored rollout requires a numeric, learning-eligible reward.",
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
if (record.reward.status === "unscorable" && (record.reward.value !== null || record.reward.learningEligible)) {
|
|
106
|
+
context.addIssue({
|
|
107
|
+
code: "custom",
|
|
108
|
+
path: ["reward", "status"],
|
|
109
|
+
message: "An unscorable rollout has no reward and cannot be learning-eligible.",
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
const CanonicalRolloutRecordBaseSchema = CanonicalRolloutRecordFieldsSchema
|
|
114
|
+
.superRefine(validateCanonicalRolloutRecord);
|
|
115
|
+
export const CanonicalRolloutRecordSchema = z.object({
|
|
116
|
+
...CanonicalRolloutRecordFieldsSchema.shape,
|
|
117
|
+
contentHash: ReleaseHashSchema,
|
|
118
|
+
}).strict().superRefine(validateCanonicalRolloutRecord);
|
|
119
|
+
export const RolloutQualificationSchema = z.object({
|
|
120
|
+
schemaVersion: z.literal("openpond.rolloutQualification.v1"),
|
|
121
|
+
rolloutCount: z.number().int().nonnegative(),
|
|
122
|
+
scoredCount: z.number().int().nonnegative(),
|
|
123
|
+
optimizerEligibleCount: z.number().int().nonnegative(),
|
|
124
|
+
unscorableCount: z.number().int().nonnegative(),
|
|
125
|
+
zeroRewardCount: z.number().int().nonnegative(),
|
|
126
|
+
rewardMean: z.number().min(0).max(1).nullable(),
|
|
127
|
+
rewardVariance: z.number().nonnegative().nullable(),
|
|
128
|
+
distinctRewardCount: z.number().int().nonnegative(),
|
|
129
|
+
eligibleForRl: z.boolean(),
|
|
130
|
+
reasons: z.array(z.string().trim().min(1).max(1_000)).max(100),
|
|
131
|
+
}).strict();
|
|
132
|
+
export function createCanonicalRolloutRecord(input) {
|
|
133
|
+
const attemptReceipt = AttemptReceiptSchema.parse(input.attemptReceipt);
|
|
134
|
+
if (!verifyAttemptReceipt(attemptReceipt)) {
|
|
135
|
+
throw new Error("Rollout Attempt Receipt failed content-hash verification.");
|
|
136
|
+
}
|
|
137
|
+
const rewardReceipt = RewardReceiptSchema.parse(input.rewardReceipt);
|
|
138
|
+
if (rewardReceipt.attemptRef.id !== attemptReceipt.id
|
|
139
|
+
|| rewardReceipt.attemptRef.contentHash !== attemptReceipt.contentHash) {
|
|
140
|
+
throw new Error("Rollout Attempt Receipt does not match its Reward Receipt.");
|
|
141
|
+
}
|
|
142
|
+
if (rewardReceipt.artifactManifestRef.id !== input.artifactManifestRef.id
|
|
143
|
+
|| rewardReceipt.artifactManifestRef.contentHash !== input.artifactManifestRef.contentHash) {
|
|
144
|
+
throw new Error("Rollout Artifact Manifest does not match its Reward Receipt.");
|
|
145
|
+
}
|
|
146
|
+
if (input.environmentExecutions.some((execution) => execution.environmentRelease.id !== input.environmentRelease.id
|
|
147
|
+
|| execution.environmentRelease.contentHash !== input.environmentRelease.contentHash)) {
|
|
148
|
+
throw new Error("Rollout Environment execution does not match its admitted Environment Release.");
|
|
149
|
+
}
|
|
150
|
+
const content = CanonicalRolloutRecordBaseSchema.parse({
|
|
151
|
+
schemaVersion: "openpond.canonicalRolloutRecord.v1",
|
|
152
|
+
id: input.id,
|
|
153
|
+
attemptRef: rewardReceipt.attemptRef,
|
|
154
|
+
artifactManifestRef: input.artifactManifestRef,
|
|
155
|
+
tasksetRelease: input.tasksetRelease,
|
|
156
|
+
environmentRelease: input.environmentRelease,
|
|
157
|
+
verifierSetRelease: rewardReceipt.verifierSetRef,
|
|
158
|
+
harnessRelease: input.harnessRelease,
|
|
159
|
+
taskId: input.taskId,
|
|
160
|
+
split: input.split,
|
|
161
|
+
model: input.model,
|
|
162
|
+
seed: input.seed,
|
|
163
|
+
reward: {
|
|
164
|
+
receiptRef: { id: rewardReceipt.id, contentHash: rewardReceipt.contentHash },
|
|
165
|
+
status: rewardReceipt.status,
|
|
166
|
+
value: rewardReceipt.reward,
|
|
167
|
+
learningEligible: rewardReceipt.learningEligible,
|
|
168
|
+
passed: rewardReceipt.passed,
|
|
169
|
+
outcomeClass: rewardReceipt.outcomeClass,
|
|
170
|
+
failureOwner: rewardReceipt.failureOwner,
|
|
171
|
+
components: Object.fromEntries(rewardReceipt.components.map((component) => [
|
|
172
|
+
component.verifierId,
|
|
173
|
+
component.rewardContribution,
|
|
174
|
+
])),
|
|
175
|
+
},
|
|
176
|
+
traceRef: input.traceRef,
|
|
177
|
+
optimizerSample: input.optimizerSample,
|
|
178
|
+
environmentExecutions: input.environmentExecutions,
|
|
179
|
+
startedAt: input.startedAt,
|
|
180
|
+
completedAt: input.completedAt,
|
|
181
|
+
metadata: input.metadata ?? {},
|
|
182
|
+
});
|
|
183
|
+
return CanonicalRolloutRecordSchema.parse({
|
|
184
|
+
...content,
|
|
185
|
+
contentHash: contentHash(content),
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
export function verifyCanonicalRolloutRecord(value) {
|
|
189
|
+
const parsed = CanonicalRolloutRecordSchema.safeParse(value);
|
|
190
|
+
if (!parsed.success)
|
|
191
|
+
return false;
|
|
192
|
+
const { contentHash: actual, ...content } = parsed.data;
|
|
193
|
+
const canonical = CanonicalRolloutRecordBaseSchema.safeParse(content);
|
|
194
|
+
return canonical.success && contentHash(canonical.data) === actual;
|
|
195
|
+
}
|
|
196
|
+
export function optimizerEligibleRollouts(records) {
|
|
197
|
+
return records.filter((record) => record.reward.status === "scored"
|
|
198
|
+
&& record.reward.learningEligible
|
|
199
|
+
&& record.reward.value !== null
|
|
200
|
+
&& record.optimizerSample !== null);
|
|
201
|
+
}
|
|
202
|
+
export function qualifyRolloutBatch(input) {
|
|
203
|
+
const records = input.records.map((record) => CanonicalRolloutRecordSchema.parse(record));
|
|
204
|
+
const scored = records.filter((record) => record.reward.status === "scored"
|
|
205
|
+
&& record.reward.learningEligible
|
|
206
|
+
&& record.reward.value !== null);
|
|
207
|
+
const optimizerEligible = optimizerEligibleRollouts(records);
|
|
208
|
+
const rewards = scored.map((record) => record.reward.value);
|
|
209
|
+
const mean = rewards.length
|
|
210
|
+
? rewards.reduce((total, reward) => total + reward, 0) / rewards.length
|
|
211
|
+
: null;
|
|
212
|
+
const variance = mean === null
|
|
213
|
+
? null
|
|
214
|
+
: rewards.reduce((total, reward) => total + (reward - mean) ** 2, 0) / rewards.length;
|
|
215
|
+
const distinctRewardCount = new Set(rewards.map((reward) => reward.toPrecision(12))).size;
|
|
216
|
+
const minimumScoredRollouts = input.minimumScoredRollouts ?? 2;
|
|
217
|
+
const minimumDistinctRewards = input.minimumDistinctRewards ?? 2;
|
|
218
|
+
const minimumRewardVariance = input.minimumRewardVariance ?? Number.EPSILON;
|
|
219
|
+
const reasons = [];
|
|
220
|
+
if (scored.length < minimumScoredRollouts)
|
|
221
|
+
reasons.push(`Requires at least ${minimumScoredRollouts} scored rollouts.`);
|
|
222
|
+
if (optimizerEligible.length !== scored.length)
|
|
223
|
+
reasons.push("Every scored rollout requires aligned optimizer token evidence.");
|
|
224
|
+
if (distinctRewardCount < minimumDistinctRewards)
|
|
225
|
+
reasons.push(`Requires at least ${minimumDistinctRewards} distinct reward values.`);
|
|
226
|
+
if (variance === null || variance < minimumRewardVariance)
|
|
227
|
+
reasons.push(`Reward variance must be at least ${minimumRewardVariance}.`);
|
|
228
|
+
return RolloutQualificationSchema.parse({
|
|
229
|
+
schemaVersion: "openpond.rolloutQualification.v1",
|
|
230
|
+
rolloutCount: records.length,
|
|
231
|
+
scoredCount: scored.length,
|
|
232
|
+
optimizerEligibleCount: optimizerEligible.length,
|
|
233
|
+
unscorableCount: records.length - scored.length,
|
|
234
|
+
zeroRewardCount: rewards.filter((reward) => reward === 0).length,
|
|
235
|
+
rewardMean: mean,
|
|
236
|
+
rewardVariance: variance,
|
|
237
|
+
distinctRewardCount,
|
|
238
|
+
eligibleForRl: reasons.length === 0,
|
|
239
|
+
reasons,
|
|
240
|
+
});
|
|
241
|
+
}
|
package/dist/tasksets.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { CapabilityRequirementSchema, ImmutableAssetRefSchema, MetadataSchema, ReleaseHashSchema, ReleaseIdSchema, ToolDeclarationSchema, assertContentHash, contentHash, } from "@openpond/harness";
|
|
3
3
|
export const TaskSplitSchema = z.enum(["train", "validation", "test", "frozen_eval"]);
|
|
4
|
+
export const RequiredOutputContractSchema = z.object({
|
|
5
|
+
path: z.string().trim().min(1).max(2_000).refine(safeRelativePath),
|
|
6
|
+
mediaType: z.string().trim().min(1).max(200),
|
|
7
|
+
schemaRef: ImmutableAssetRefSchema.nullable().default(null),
|
|
8
|
+
maxBytes: z.number().int().positive().max(250_000_000).nullable().default(null),
|
|
9
|
+
metadata: MetadataSchema,
|
|
10
|
+
}).strict();
|
|
4
11
|
export const PolicyBoundarySchema = z.object({
|
|
5
12
|
policyVisibleFields: z.array(ReleaseIdSchema).max(1_000).default([]),
|
|
6
13
|
privilegedFields: z.array(ReleaseIdSchema).max(1_000).default([]),
|
|
@@ -60,6 +67,7 @@ export const TaskRecordSchema = z.object({
|
|
|
60
67
|
policyVisibleContext: z.record(z.string(), z.unknown()).default({}),
|
|
61
68
|
privilegedContextRef: ReleaseIdSchema.nullable(),
|
|
62
69
|
artifactRefs: z.array(ImmutableAssetRefSchema).max(1_000).default([]),
|
|
70
|
+
requiredOutputs: z.array(RequiredOutputContractSchema).max(1_000).optional(),
|
|
63
71
|
tags: z.array(ReleaseIdSchema).max(100).default([]),
|
|
64
72
|
}).strict();
|
|
65
73
|
export const TasksetReleaseContentSchema = z.object({
|
|
@@ -68,10 +76,12 @@ export const TasksetReleaseContentSchema = z.object({
|
|
|
68
76
|
revision: z.number().int().positive(),
|
|
69
77
|
policy: PolicyBoundarySchema,
|
|
70
78
|
environment: EnvironmentContractSchema,
|
|
79
|
+
environmentRelease: z.object({ id: ReleaseIdSchema, contentHash: ReleaseHashSchema }).strict().optional(),
|
|
71
80
|
tools: z.array(ToolDeclarationSchema).max(200),
|
|
72
81
|
capabilities: z.array(CapabilityRequirementSchema).max(200),
|
|
73
82
|
tasks: z.array(TaskRecordSchema).min(1).max(1_000_000),
|
|
74
83
|
graders: z.array(GraderSpecSchema).min(1).max(1_000),
|
|
84
|
+
verifierSetRelease: z.object({ id: ReleaseIdSchema, contentHash: ReleaseHashSchema }).strict().optional(),
|
|
75
85
|
metadata: MetadataSchema,
|
|
76
86
|
}).strict();
|
|
77
87
|
export const TasksetReleaseSchema = TasksetReleaseContentSchema.extend({ contentHash: ReleaseHashSchema }).strict();
|
|
@@ -92,6 +102,14 @@ export function validateTasksetRelease(input) {
|
|
|
92
102
|
}
|
|
93
103
|
const taskset = parsed.data;
|
|
94
104
|
const issues = [];
|
|
105
|
+
if (Boolean(taskset.environmentRelease) !== Boolean(taskset.verifierSetRelease)) {
|
|
106
|
+
issues.push({
|
|
107
|
+
code: "execution_release_binding_incomplete",
|
|
108
|
+
severity: "error",
|
|
109
|
+
message: "A Taskset Release must bind both Environment and Verifier Set releases or neither during v2 migration.",
|
|
110
|
+
path: "environmentRelease",
|
|
111
|
+
});
|
|
112
|
+
}
|
|
95
113
|
const clusterSplits = new Map();
|
|
96
114
|
for (const task of taskset.tasks) {
|
|
97
115
|
const splits = clusterSplits.get(task.clusterKey) ?? new Set();
|
|
@@ -147,3 +165,9 @@ export function trainingPolicyTaskViews(taskset) {
|
|
|
147
165
|
.map(policyTaskView);
|
|
148
166
|
}
|
|
149
167
|
export { CapabilityRequirementSchema, ToolDeclarationSchema, } from "@openpond/harness";
|
|
168
|
+
function safeRelativePath(value) {
|
|
169
|
+
const normalized = value.replaceAll("\\", "/");
|
|
170
|
+
if (!normalized || normalized.startsWith("/") || normalized.includes("\0"))
|
|
171
|
+
return false;
|
|
172
|
+
return !normalized.split("/").some((part) => !part || part === "." || part === "..");
|
|
173
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ImmutableArtifactRef } from "@openpond/harness";
|
|
2
|
+
import { type ArtifactManifest, type RewardComponentReceipt } from "./execution-contracts.js";
|
|
3
|
+
import type { RequiredOutputContract } from "./tasksets.js";
|
|
4
|
+
export type CollectedArtifact = {
|
|
5
|
+
path: string;
|
|
6
|
+
artifact: ImmutableArtifactRef | null;
|
|
7
|
+
detectedMediaType: string | null;
|
|
8
|
+
status: "collected" | "failed";
|
|
9
|
+
parseStatus?: "not_requested" | "passed" | "failed";
|
|
10
|
+
schemaStatus?: "not_requested" | "passed" | "failed";
|
|
11
|
+
errorCode?: string | null;
|
|
12
|
+
failureOwner?: "policy" | "collector" | "environment" | null;
|
|
13
|
+
evidenceRefs?: ImmutableArtifactRef[];
|
|
14
|
+
metadata?: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
export declare function buildArtifactManifest(input: {
|
|
17
|
+
id: string;
|
|
18
|
+
attemptRef: {
|
|
19
|
+
id: string;
|
|
20
|
+
contentHash: string;
|
|
21
|
+
};
|
|
22
|
+
requiredOutputs: RequiredOutputContract[];
|
|
23
|
+
collectedArtifacts: CollectedArtifact[];
|
|
24
|
+
createdAt: string;
|
|
25
|
+
metadata?: Record<string, unknown>;
|
|
26
|
+
}): ArtifactManifest;
|
|
27
|
+
export declare function verifyRequiredOutputs(input: {
|
|
28
|
+
requiredOutputs: RequiredOutputContract[];
|
|
29
|
+
manifest: ArtifactManifest;
|
|
30
|
+
}): RewardComponentReceipt[];
|
|
31
|
+
//# sourceMappingURL=artifact-verification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-verification.d.ts","sourceRoot":"","sources":["../../../../src/artifact-verification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAGL,KAAK,gBAAgB,EAGrB,KAAK,sBAAsB,EAC5B,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC/B,WAAW,CAAC,EAAE,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACpD,YAAY,CAAC,EAAE,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACrD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,aAAa,GAAG,IAAI,CAAC;IAC7D,YAAY,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,eAAe,EAAE,sBAAsB,EAAE,CAAC;IAC1C,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,GAAG,gBAAgB,CAwEnB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,eAAe,EAAE,sBAAsB,EAAE,CAAC;IAC1C,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,GAAG,sBAAsB,EAAE,CAqC3B"}
|
|
@@ -49,6 +49,20 @@ export declare const harnessRefinerBenchmarkRelease: {
|
|
|
49
49
|
visibility: "policy" | "verifier" | "host_private";
|
|
50
50
|
}[];
|
|
51
51
|
tags: string[];
|
|
52
|
+
requiredOutputs?: {
|
|
53
|
+
path: string;
|
|
54
|
+
mediaType: string;
|
|
55
|
+
schemaRef: {
|
|
56
|
+
id: string;
|
|
57
|
+
path: string;
|
|
58
|
+
contentHash: string;
|
|
59
|
+
sizeBytes: number;
|
|
60
|
+
mediaType: string;
|
|
61
|
+
visibility: "policy" | "verifier" | "host_private";
|
|
62
|
+
} | null;
|
|
63
|
+
maxBytes: number | null;
|
|
64
|
+
metadata: Record<string, unknown>;
|
|
65
|
+
}[] | undefined;
|
|
52
66
|
}[];
|
|
53
67
|
graders: ({
|
|
54
68
|
id: string;
|
|
@@ -114,6 +128,14 @@ export declare const harnessRefinerBenchmarkRelease: {
|
|
|
114
128
|
})[];
|
|
115
129
|
metadata: Record<string, unknown>;
|
|
116
130
|
contentHash: string;
|
|
131
|
+
environmentRelease?: {
|
|
132
|
+
id: string;
|
|
133
|
+
contentHash: string;
|
|
134
|
+
} | undefined;
|
|
135
|
+
verifierSetRelease?: {
|
|
136
|
+
id: string;
|
|
137
|
+
contentHash: string;
|
|
138
|
+
} | undefined;
|
|
117
139
|
};
|
|
118
140
|
export declare const harnessRefinerBenchmarkAssets: Readonly<Record<string, string>>;
|
|
119
141
|
//# sourceMappingURL=harness-refiner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness-refiner.d.ts","sourceRoot":"","sources":["../../../../../src/builtin-benchmarks/harness-refiner.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,8BAA8B
|
|
1
|
+
{"version":3,"file":"harness-refiner.d.ts","sourceRoot":"","sources":["../../../../../src/builtin-benchmarks/harness-refiner.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqqD1C,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASzE,CAAC"}
|
|
@@ -159,6 +159,20 @@ export declare const genericToolConformance: {
|
|
|
159
159
|
visibility: "policy" | "verifier" | "host_private";
|
|
160
160
|
}[];
|
|
161
161
|
tags: string[];
|
|
162
|
+
requiredOutputs?: {
|
|
163
|
+
path: string;
|
|
164
|
+
mediaType: string;
|
|
165
|
+
schemaRef: {
|
|
166
|
+
id: string;
|
|
167
|
+
path: string;
|
|
168
|
+
contentHash: string;
|
|
169
|
+
sizeBytes: number;
|
|
170
|
+
mediaType: string;
|
|
171
|
+
visibility: "policy" | "verifier" | "host_private";
|
|
172
|
+
} | null;
|
|
173
|
+
maxBytes: number | null;
|
|
174
|
+
metadata: Record<string, unknown>;
|
|
175
|
+
}[] | undefined;
|
|
162
176
|
}[];
|
|
163
177
|
graders: ({
|
|
164
178
|
id: string;
|
|
@@ -224,6 +238,14 @@ export declare const genericToolConformance: {
|
|
|
224
238
|
})[];
|
|
225
239
|
metadata: Record<string, unknown>;
|
|
226
240
|
contentHash: string;
|
|
241
|
+
environmentRelease?: {
|
|
242
|
+
id: string;
|
|
243
|
+
contentHash: string;
|
|
244
|
+
} | undefined;
|
|
245
|
+
verifierSetRelease?: {
|
|
246
|
+
id: string;
|
|
247
|
+
contentHash: string;
|
|
248
|
+
} | undefined;
|
|
227
249
|
};
|
|
228
250
|
manifest: {
|
|
229
251
|
schemaVersion: "openpond.runManifest.v1";
|
|
@@ -426,6 +448,20 @@ export declare const marketingPortfolioConformance: {
|
|
|
426
448
|
visibility: "policy" | "verifier" | "host_private";
|
|
427
449
|
}[];
|
|
428
450
|
tags: string[];
|
|
451
|
+
requiredOutputs?: {
|
|
452
|
+
path: string;
|
|
453
|
+
mediaType: string;
|
|
454
|
+
schemaRef: {
|
|
455
|
+
id: string;
|
|
456
|
+
path: string;
|
|
457
|
+
contentHash: string;
|
|
458
|
+
sizeBytes: number;
|
|
459
|
+
mediaType: string;
|
|
460
|
+
visibility: "policy" | "verifier" | "host_private";
|
|
461
|
+
} | null;
|
|
462
|
+
maxBytes: number | null;
|
|
463
|
+
metadata: Record<string, unknown>;
|
|
464
|
+
}[] | undefined;
|
|
429
465
|
}[];
|
|
430
466
|
graders: ({
|
|
431
467
|
id: string;
|
|
@@ -491,6 +527,14 @@ export declare const marketingPortfolioConformance: {
|
|
|
491
527
|
})[];
|
|
492
528
|
metadata: Record<string, unknown>;
|
|
493
529
|
contentHash: string;
|
|
530
|
+
environmentRelease?: {
|
|
531
|
+
id: string;
|
|
532
|
+
contentHash: string;
|
|
533
|
+
} | undefined;
|
|
534
|
+
verifierSetRelease?: {
|
|
535
|
+
id: string;
|
|
536
|
+
contentHash: string;
|
|
537
|
+
} | undefined;
|
|
494
538
|
};
|
|
495
539
|
manifest: {
|
|
496
540
|
schemaVersion: "openpond.runManifest.v1";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conformance.d.ts","sourceRoot":"","sources":["../../../../src/conformance.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"conformance.d.ts","sourceRoot":"","sources":["../../../../src/conformance.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEjC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGxC,CAAC"}
|
|
@@ -9,9 +9,9 @@ export declare const completeWorkProcessTraceFixture: {
|
|
|
9
9
|
sequence: number;
|
|
10
10
|
timestamp: string;
|
|
11
11
|
layer: "agent" | "environment";
|
|
12
|
-
kind: "
|
|
12
|
+
kind: "validation" | "artifact" | "approval" | "tool" | "state_transition" | "question" | "cleanup";
|
|
13
13
|
action: "turn_started" | "turn_completed" | "turn_failed" | "turn_cancelled" | "turn_timed_out" | "tool_invoked" | "tool_completed" | "tool_failed" | "validation_completed" | "validation_failed" | "approval_requested" | "approval_resolved" | "question_asked" | "question_answered" | "question_dismissed" | "artifact_created" | "workspace_changed" | "environment_created" | "environment_reset" | "environment_destroyed" | "cleanup_completed" | "cleanup_failed";
|
|
14
|
-
status: "
|
|
14
|
+
status: "failed" | "completed" | "cancelled" | "started";
|
|
15
15
|
inputHash: string | null;
|
|
16
16
|
outputHash: string | null;
|
|
17
17
|
receiptHash: string | null;
|
|
@@ -25,14 +25,14 @@ export declare const completeWorkProcessTraceFixture: {
|
|
|
25
25
|
attributes: {
|
|
26
26
|
toolCategory: "agent" | "command" | "filesystem" | "source_control" | "browser" | "connected_app" | "sandbox" | "other" | null;
|
|
27
27
|
validationKind: "test" | "structural" | "visual" | "user_review" | "other" | null;
|
|
28
|
-
transitionState: "
|
|
28
|
+
transitionState: "failed" | "completed" | "cancelled" | "timeout" | "running" | null;
|
|
29
29
|
interventionOutcome: "requested" | "approved" | "denied" | "answered" | "dismissed" | null;
|
|
30
30
|
artifactCount: number;
|
|
31
31
|
exitCode: number | null;
|
|
32
32
|
durationMs: number | null;
|
|
33
33
|
cpuTimeMs: number | null;
|
|
34
34
|
memoryPeakBytes: number | null;
|
|
35
|
-
errorClass: "
|
|
35
|
+
errorClass: "validation" | "policy" | "unknown" | "environment" | "cancelled" | "timeout" | "infrastructure" | null;
|
|
36
36
|
};
|
|
37
37
|
}[];
|
|
38
38
|
contentHash: string;
|
|
@@ -70,8 +70,8 @@ export declare const completeWorkEvidenceFixture: {
|
|
|
70
70
|
};
|
|
71
71
|
inputHash: string;
|
|
72
72
|
terminal: {
|
|
73
|
-
status: "
|
|
74
|
-
failureClass: "unknown" | "policy_failure" | "environment_failure" | "
|
|
73
|
+
status: "failed" | "completed" | "cancelled" | "timeout";
|
|
74
|
+
failureClass: "unknown" | "policy_failure" | "environment_failure" | "cancelled" | "infrastructure_failure" | "timeout" | "validation_failure" | "model_failure" | null;
|
|
75
75
|
};
|
|
76
76
|
trace: {
|
|
77
77
|
sanitizedRef: {
|
|
@@ -186,9 +186,9 @@ export declare const incompleteWorkProcessTraceFixture: {
|
|
|
186
186
|
sequence: number;
|
|
187
187
|
timestamp: string;
|
|
188
188
|
layer: "agent" | "environment";
|
|
189
|
-
kind: "
|
|
189
|
+
kind: "validation" | "artifact" | "approval" | "tool" | "state_transition" | "question" | "cleanup";
|
|
190
190
|
action: "turn_started" | "turn_completed" | "turn_failed" | "turn_cancelled" | "turn_timed_out" | "tool_invoked" | "tool_completed" | "tool_failed" | "validation_completed" | "validation_failed" | "approval_requested" | "approval_resolved" | "question_asked" | "question_answered" | "question_dismissed" | "artifact_created" | "workspace_changed" | "environment_created" | "environment_reset" | "environment_destroyed" | "cleanup_completed" | "cleanup_failed";
|
|
191
|
-
status: "
|
|
191
|
+
status: "failed" | "completed" | "cancelled" | "started";
|
|
192
192
|
inputHash: string | null;
|
|
193
193
|
outputHash: string | null;
|
|
194
194
|
receiptHash: string | null;
|
|
@@ -202,14 +202,14 @@ export declare const incompleteWorkProcessTraceFixture: {
|
|
|
202
202
|
attributes: {
|
|
203
203
|
toolCategory: "agent" | "command" | "filesystem" | "source_control" | "browser" | "connected_app" | "sandbox" | "other" | null;
|
|
204
204
|
validationKind: "test" | "structural" | "visual" | "user_review" | "other" | null;
|
|
205
|
-
transitionState: "
|
|
205
|
+
transitionState: "failed" | "completed" | "cancelled" | "timeout" | "running" | null;
|
|
206
206
|
interventionOutcome: "requested" | "approved" | "denied" | "answered" | "dismissed" | null;
|
|
207
207
|
artifactCount: number;
|
|
208
208
|
exitCode: number | null;
|
|
209
209
|
durationMs: number | null;
|
|
210
210
|
cpuTimeMs: number | null;
|
|
211
211
|
memoryPeakBytes: number | null;
|
|
212
|
-
errorClass: "
|
|
212
|
+
errorClass: "validation" | "policy" | "unknown" | "environment" | "cancelled" | "timeout" | "infrastructure" | null;
|
|
213
213
|
};
|
|
214
214
|
}[];
|
|
215
215
|
contentHash: string;
|
|
@@ -308,8 +308,8 @@ export declare const invalidRawEvidenceFixture: {
|
|
|
308
308
|
};
|
|
309
309
|
inputHash: string;
|
|
310
310
|
terminal: {
|
|
311
|
-
status: "
|
|
312
|
-
failureClass: "unknown" | "policy_failure" | "environment_failure" | "
|
|
311
|
+
status: "failed" | "completed" | "cancelled" | "timeout";
|
|
312
|
+
failureClass: "unknown" | "policy_failure" | "environment_failure" | "cancelled" | "infrastructure_failure" | "timeout" | "validation_failure" | "model_failure" | null;
|
|
313
313
|
};
|
|
314
314
|
trace: {
|
|
315
315
|
sanitizedRef: {
|
|
@@ -392,9 +392,9 @@ export declare const workEvidenceConformance: {
|
|
|
392
392
|
sequence: number;
|
|
393
393
|
timestamp: string;
|
|
394
394
|
layer: "agent" | "environment";
|
|
395
|
-
kind: "
|
|
395
|
+
kind: "validation" | "artifact" | "approval" | "tool" | "state_transition" | "question" | "cleanup";
|
|
396
396
|
action: "turn_started" | "turn_completed" | "turn_failed" | "turn_cancelled" | "turn_timed_out" | "tool_invoked" | "tool_completed" | "tool_failed" | "validation_completed" | "validation_failed" | "approval_requested" | "approval_resolved" | "question_asked" | "question_answered" | "question_dismissed" | "artifact_created" | "workspace_changed" | "environment_created" | "environment_reset" | "environment_destroyed" | "cleanup_completed" | "cleanup_failed";
|
|
397
|
-
status: "
|
|
397
|
+
status: "failed" | "completed" | "cancelled" | "started";
|
|
398
398
|
inputHash: string | null;
|
|
399
399
|
outputHash: string | null;
|
|
400
400
|
receiptHash: string | null;
|
|
@@ -408,14 +408,14 @@ export declare const workEvidenceConformance: {
|
|
|
408
408
|
attributes: {
|
|
409
409
|
toolCategory: "agent" | "command" | "filesystem" | "source_control" | "browser" | "connected_app" | "sandbox" | "other" | null;
|
|
410
410
|
validationKind: "test" | "structural" | "visual" | "user_review" | "other" | null;
|
|
411
|
-
transitionState: "
|
|
411
|
+
transitionState: "failed" | "completed" | "cancelled" | "timeout" | "running" | null;
|
|
412
412
|
interventionOutcome: "requested" | "approved" | "denied" | "answered" | "dismissed" | null;
|
|
413
413
|
artifactCount: number;
|
|
414
414
|
exitCode: number | null;
|
|
415
415
|
durationMs: number | null;
|
|
416
416
|
cpuTimeMs: number | null;
|
|
417
417
|
memoryPeakBytes: number | null;
|
|
418
|
-
errorClass: "
|
|
418
|
+
errorClass: "validation" | "policy" | "unknown" | "environment" | "cancelled" | "timeout" | "infrastructure" | null;
|
|
419
419
|
};
|
|
420
420
|
}[];
|
|
421
421
|
contentHash: string;
|
|
@@ -453,8 +453,8 @@ export declare const workEvidenceConformance: {
|
|
|
453
453
|
};
|
|
454
454
|
inputHash: string;
|
|
455
455
|
terminal: {
|
|
456
|
-
status: "
|
|
457
|
-
failureClass: "unknown" | "policy_failure" | "environment_failure" | "
|
|
456
|
+
status: "failed" | "completed" | "cancelled" | "timeout";
|
|
457
|
+
failureClass: "unknown" | "policy_failure" | "environment_failure" | "cancelled" | "infrastructure_failure" | "timeout" | "validation_failure" | "model_failure" | null;
|
|
458
458
|
};
|
|
459
459
|
trace: {
|
|
460
460
|
sanitizedRef: {
|
|
@@ -625,9 +625,9 @@ export declare const workEvidenceConformance: {
|
|
|
625
625
|
sequence: number;
|
|
626
626
|
timestamp: string;
|
|
627
627
|
layer: "agent" | "environment";
|
|
628
|
-
kind: "
|
|
628
|
+
kind: "validation" | "artifact" | "approval" | "tool" | "state_transition" | "question" | "cleanup";
|
|
629
629
|
action: "turn_started" | "turn_completed" | "turn_failed" | "turn_cancelled" | "turn_timed_out" | "tool_invoked" | "tool_completed" | "tool_failed" | "validation_completed" | "validation_failed" | "approval_requested" | "approval_resolved" | "question_asked" | "question_answered" | "question_dismissed" | "artifact_created" | "workspace_changed" | "environment_created" | "environment_reset" | "environment_destroyed" | "cleanup_completed" | "cleanup_failed";
|
|
630
|
-
status: "
|
|
630
|
+
status: "failed" | "completed" | "cancelled" | "started";
|
|
631
631
|
inputHash: string | null;
|
|
632
632
|
outputHash: string | null;
|
|
633
633
|
receiptHash: string | null;
|
|
@@ -641,14 +641,14 @@ export declare const workEvidenceConformance: {
|
|
|
641
641
|
attributes: {
|
|
642
642
|
toolCategory: "agent" | "command" | "filesystem" | "source_control" | "browser" | "connected_app" | "sandbox" | "other" | null;
|
|
643
643
|
validationKind: "test" | "structural" | "visual" | "user_review" | "other" | null;
|
|
644
|
-
transitionState: "
|
|
644
|
+
transitionState: "failed" | "completed" | "cancelled" | "timeout" | "running" | null;
|
|
645
645
|
interventionOutcome: "requested" | "approved" | "denied" | "answered" | "dismissed" | null;
|
|
646
646
|
artifactCount: number;
|
|
647
647
|
exitCode: number | null;
|
|
648
648
|
durationMs: number | null;
|
|
649
649
|
cpuTimeMs: number | null;
|
|
650
650
|
memoryPeakBytes: number | null;
|
|
651
|
-
errorClass: "
|
|
651
|
+
errorClass: "validation" | "policy" | "unknown" | "environment" | "cancelled" | "timeout" | "infrastructure" | null;
|
|
652
652
|
};
|
|
653
653
|
}[];
|
|
654
654
|
contentHash: string;
|
|
@@ -691,8 +691,8 @@ export declare const workEvidenceConformance: {
|
|
|
691
691
|
};
|
|
692
692
|
inputHash: string;
|
|
693
693
|
terminal: {
|
|
694
|
-
status: "
|
|
695
|
-
failureClass: "unknown" | "policy_failure" | "environment_failure" | "
|
|
694
|
+
status: "failed" | "completed" | "cancelled" | "timeout";
|
|
695
|
+
failureClass: "unknown" | "policy_failure" | "environment_failure" | "cancelled" | "infrastructure_failure" | "timeout" | "validation_failure" | "model_failure" | null;
|
|
696
696
|
};
|
|
697
697
|
trace: {
|
|
698
698
|
sanitizedRef: {
|