@openpond/evals 0.11.14 → 0.11.16

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 CHANGED
@@ -176,6 +176,15 @@ comparison requires equal dataset version, population, evaluators and execution
176
176
  contract. Harness comparison also requires the same component, evaluation
177
177
  definition and environment; candidate source/Harness revisions can differ.
178
178
 
179
+ Qualified shared executors may declare `execution.compatibility` with the same
180
+ protocol and target kind. For those pairs, comparison matches the package and
181
+ metric policy while retaining each exact `runtimeTargetHash` as placement
182
+ evidence. A missing declaration keeps the original exact-runtime comparison.
183
+ For Profile targets the identical package binds environment semantics, while
184
+ `source.environmentHash` retains the placement-specific preparation evidence.
185
+ The declaration must match the admitted target kind; it does not bypass dataset,
186
+ population, evaluator, component or definition checks.
187
+
179
188
  `compareExperiments` aligns cases and reports per-feedback eligibility, exclusion
180
189
  reasons and paired means/deltas. Only matching completed cases with scored
181
190
  numeric or Boolean feedback contribute. Failed, cancelled, absent or ungraded
@@ -2,6 +2,9 @@ import { z } from "zod";
2
2
  import { ImmutableArtifactRefSchema, ImmutableReleaseRefSchema, ReleaseHashSchema, ReleaseIdSchema, ReleaseTimestampSchema, assertContentHash, contentHash, } from "@openpond/harness";
3
3
  import { ProfileEvaluationRunSourceSchema } from "./profile-evaluations.js";
4
4
  import { FeedbackKeySchema } from "./rewards.js";
5
+ import { StandaloneHarnessExperimentSourceSchema } from "./harness-experiment-source.js";
6
+ export { StandaloneHarnessExperimentSourceSchema, STANDALONE_EXPERIMENT_MAX_POLICY_CALLS, STANDALONE_EXPERIMENT_READ_TOOLS, standaloneHarnessExperimentTools, harnessExperimentSourceRequiresProfile, harnessExperimentReadToolDeclarations, } from "./harness-experiment-source.js";
7
+ export { NativeHarnessExperimentEvidenceSchema, NativeHarnessExperimentAttemptContentSchema, NativeHarnessExperimentAttemptSchema, createNativeHarnessExperimentAttempt, verifyNativeHarnessExperimentAttempt, } from "./native-harness-experiment-attempt.js";
5
8
  const MoneySchema = z.number().finite().nonnegative();
6
9
  export const ExperimentTargetSchema = z.discriminatedUnion("kind", [
7
10
  z.object({
@@ -14,6 +17,11 @@ export const ExperimentTargetSchema = z.discriminatedUnion("kind", [
14
17
  source: ProfileEvaluationRunSourceSchema,
15
18
  model: z.object({ modelId: ReleaseIdSchema, configurationHash: ReleaseHashSchema }).strict(),
16
19
  }).strict(),
20
+ z.object({
21
+ kind: z.literal("agent"),
22
+ source: StandaloneHarnessExperimentSourceSchema,
23
+ model: z.object({ modelId: ReleaseIdSchema, configurationHash: ReleaseHashSchema }).strict(),
24
+ }).strict(),
17
25
  z.object({ kind: z.literal("fixture"), configurationHash: ReleaseHashSchema }).strict(),
18
26
  ]);
19
27
  export const ExperimentEvaluatorSchema = z.object({
@@ -51,7 +59,17 @@ export const ExperimentManifestContentSchema = z.object({
51
59
  maximumCostUsd: MoneySchema.nullable(),
52
60
  dataset: ImmutableReleaseRefSchema.extend({ revision: z.number().int().positive() }).strict(),
53
61
  target: ExperimentTargetSchema,
54
- execution: z.object({ packageHash: ReleaseHashSchema, runtimeTargetHash: ReleaseHashSchema, metricPolicyHash: ReleaseHashSchema }).strict().optional(),
62
+ execution: z.object({
63
+ packageHash: ReleaseHashSchema,
64
+ /** Exact placement/adapter evidence; retained even across compatible locations. */
65
+ runtimeTargetHash: ReleaseHashSchema,
66
+ metricPolicyHash: ReleaseHashSchema,
67
+ /** Only qualified shared executors declare this placement-independent protocol. */
68
+ compatibility: z.object({
69
+ protocol: z.literal("openpond.evaluation-execution.v1"),
70
+ targetKind: z.enum(["model", "agent", "harness", "fixture"]),
71
+ }).strict().optional(),
72
+ }).strict().optional(),
55
73
  lineage: z.object({
56
74
  definition: ImmutableReleaseRefSchema.extend({ revision: z.number().int().positive() }).strict().nullable(),
57
75
  execution: ImmutableReleaseRefSchema,
@@ -61,6 +79,8 @@ export const ExperimentManifestContentSchema = z.object({
61
79
  population: z.array(ExperimentCaseIdentitySchema).min(1).max(10_000),
62
80
  createdAt: ReleaseTimestampSchema,
63
81
  }).strict().superRefine((value, context) => {
82
+ if (value.execution?.compatibility && value.execution.compatibility.targetKind !== value.target.kind)
83
+ context.addIssue({ code: "custom", path: ["execution", "compatibility"], message: "Execution compatibility differs from its admitted target kind." });
64
84
  if (value.lineage && value.id !== (value.lineage.scoringPassId ?? value.lineage.execution.id))
65
85
  context.addIssue({ code: "custom", path: ["lineage"], message: "Experiment identity must match its execution or independent scoring pass." });
66
86
  if (new Set(value.population.map(experimentCaseKey)).size !== value.population.length)
@@ -172,14 +192,24 @@ export function compareExperiments(baseline, candidate) {
172
192
  reasons.push("different_dataset_version");
173
193
  if (baseline.manifest.target.kind !== candidate.manifest.target.kind)
174
194
  reasons.push("different_target_kind");
175
- if (contentHash(baseline.manifest.execution ?? null) !== contentHash(candidate.manifest.execution ?? null))
195
+ const executionContract = (manifest) => {
196
+ const execution = manifest.execution;
197
+ if (!execution?.compatibility)
198
+ return execution ?? null;
199
+ const { runtimeTargetHash: _placementEvidence, ...semantic } = execution;
200
+ return semantic;
201
+ };
202
+ if (contentHash(executionContract(baseline.manifest)) !== contentHash(executionContract(candidate.manifest)))
176
203
  reasons.push("different_execution_contract");
177
204
  if (baseline.manifest.target.kind === "harness" && candidate.manifest.target.kind === "harness") {
178
205
  const a = baseline.manifest.target.source;
179
206
  const b = candidate.manifest.target.source;
180
207
  if (a.profileId !== b.profileId || contentHash(a.target) !== contentHash(b.target))
181
208
  reasons.push("different_component");
182
- if (a.environmentHash !== b.environmentHash)
209
+ const sharedEnvironment = baseline.manifest.execution?.compatibility
210
+ && candidate.manifest.execution?.compatibility
211
+ && baseline.manifest.execution.packageHash === candidate.manifest.execution.packageHash;
212
+ if (a.environmentHash !== b.environmentHash && !sharedEnvironment)
183
213
  reasons.push("different_environment");
184
214
  if (a.definitionId !== b.definitionId || a.definitionHash !== b.definitionHash)
185
215
  reasons.push("different_evaluation_definition");
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ import { contentHash, ImmutableReleaseRefSchema, ReleaseHashSchema } from "@openpond/harness";
3
+ /** A standalone Agent/Harness closure has no incidental Profile binding.
4
+ * The execution host resolves and verifies these exact published bytes. */
5
+ export const StandaloneHarnessExperimentSourceSchema = z.object({
6
+ harnessRelease: ImmutableReleaseRefSchema,
7
+ agentSnapshot: ImmutableReleaseRefSchema,
8
+ sourcePackageHash: ReleaseHashSchema,
9
+ }).strict();
10
+ export const STANDALONE_EXPERIMENT_MAX_POLICY_CALLS = 64;
11
+ export function harnessExperimentSourceRequiresProfile(source) {
12
+ return [source.agentSnapshot.metadata, source.harnessRelease.metadata].some(metadata => typeof metadata.profileRepositoryId === "string" || metadata.profile !== undefined && metadata.profile !== null);
13
+ }
14
+ /** Qualified case-local implementations read this immutable closure or its
15
+ * retained context. Other capabilities need an independently admitted world. */
16
+ export const STANDALONE_EXPERIMENT_READ_TOOLS = new Set([
17
+ "harness_inspect", "skill_inspect", "profile_skill_read", "context_read",
18
+ ]);
19
+ export function standaloneHarnessExperimentTools(source) {
20
+ if (harnessExperimentSourceRequiresProfile(source))
21
+ throw new Error("This source is bound to a Profile; select Model + Harness + Profile.");
22
+ return harnessExperimentReadToolDeclarations(source);
23
+ }
24
+ /** Profile-owned callers must establish exact Profile authority first. This
25
+ * function qualifies only tools; it does not grant source or Profile access. */
26
+ export function harnessExperimentReadToolDeclarations(source) {
27
+ const required = source.agentSnapshot.capabilityRequirements.find(capability => capability.required);
28
+ if (required)
29
+ throw new Error(`Standalone Harness capability requires an admitted case environment: ${required.id}.`);
30
+ const declarations = new Map();
31
+ for (const declaration of [...source.agentSnapshot.toolDeclarations, ...source.harnessRelease.tools]) {
32
+ if (!STANDALONE_EXPERIMENT_READ_TOOLS.has(declaration.name) || declaration.sideEffect !== "read")
33
+ throw new Error(`Standalone Harness tool requires an admitted case environment: ${declaration.name}.`);
34
+ if (contentHash(declaration.inputSchema) !== declaration.inputSchemaHash)
35
+ throw new Error(`Standalone Harness tool schema differs from its declaration: ${declaration.name}.`);
36
+ const prior = declarations.get(declaration.name);
37
+ if (prior && contentHash(prior) !== contentHash(declaration))
38
+ throw new Error(`Standalone Harness has conflicting tool declarations: ${declaration.name}.`);
39
+ declarations.set(declaration.name, declaration);
40
+ }
41
+ return [...declarations.values()];
42
+ }
@@ -0,0 +1,68 @@
1
+ import { z } from "zod";
2
+ import { contentHash, ReleaseHashSchema, ReleaseTimestampSchema } from "@openpond/harness";
3
+ import { StandaloneHarnessExperimentSourceSchema } from "./harness-experiment-source.js";
4
+ import { assertBoundedTaskJson } from "./task-schema.js";
5
+ const EvidenceIdSchema = z.string().trim().min(1).max(200);
6
+ /** Owner-recorded native turn identities. Raw runtime events remain in the
7
+ * authorized execution store; this receipt retains their exact references. */
8
+ export const NativeHarnessExperimentEvidenceSchema = z.object({
9
+ sessionId: EvidenceIdSchema,
10
+ turnId: EvidenceIdSchema,
11
+ source: StandaloneHarnessExperimentSourceSchema,
12
+ admissionHash: ReleaseHashSchema,
13
+ modelConfigurationHash: ReleaseHashSchema,
14
+ traceHash: ReleaseHashSchema,
15
+ runtimeEventRefs: z.array(EvidenceIdSchema).max(10_000),
16
+ startedAt: ReleaseTimestampSchema,
17
+ completedAt: ReleaseTimestampSchema,
18
+ outputHash: ReleaseHashSchema,
19
+ partialOutputAvailable: z.boolean(),
20
+ }).strict().superRefine((value, context) => {
21
+ if (new Set(value.runtimeEventRefs).size !== value.runtimeEventRefs.length)
22
+ context.addIssue({ code: "custom", path: ["runtimeEventRefs"], message: "Native event references must be unique." });
23
+ if (Date.parse(value.completedAt) < Date.parse(value.startedAt))
24
+ context.addIssue({ code: "custom", path: ["completedAt"], message: "Native completion precedes its start." });
25
+ });
26
+ /** This qualified standalone contract is for text Datasets. A prepared task
27
+ * needs its independently qualified environment receipt, not a null snapshot
28
+ * presented as evidence that its environment ran. */
29
+ export const NativeHarnessExperimentAttemptContentSchema = z.object({
30
+ schemaVersion: z.literal("openpond.nativeHarnessExperimentAttempt.v1"),
31
+ taskId: z.string().min(1).max(500),
32
+ status: z.enum(["completed", "cancelled", "timed_out", "policy_failure"]),
33
+ output: z.string().max(8_388_608).nullable(),
34
+ error: z.string().max(2_000).nullable(),
35
+ messages: z.array(z.unknown()).max(4_002),
36
+ collected: z.boolean(),
37
+ environmentCleanupComplete: z.literal(true),
38
+ snapshot: z.null(),
39
+ native: NativeHarnessExperimentEvidenceSchema,
40
+ }).strict().superRefine((value, context) => {
41
+ const completed = value.status === "completed";
42
+ if (completed !== value.collected || completed !== (value.output !== null)
43
+ || completed !== (value.error === null))
44
+ context.addIssue({ code: "custom", message: "Native status, output, collection and error must agree." });
45
+ if (completed && (value.native.partialOutputAvailable || value.native.outputHash !== contentHash(value.output)))
46
+ context.addIssue({ code: "custom", path: ["native", "outputHash"], message: "Native output differs from its retained evidence." });
47
+ });
48
+ export const NativeHarnessExperimentAttemptSchema = NativeHarnessExperimentAttemptContentSchema
49
+ .extend({ contentHash: ReleaseHashSchema }).strict();
50
+ export function createNativeHarnessExperimentAttempt(input) {
51
+ assertBoundedTaskJson(input, 16_777_216);
52
+ const content = NativeHarnessExperimentAttemptContentSchema.parse(input);
53
+ return NativeHarnessExperimentAttemptSchema.parse({ ...content, contentHash: contentHash(content) });
54
+ }
55
+ /** Artifact access and trace ownership are enforced by the host. Verification
56
+ * binds the artifact bytes to that host's independently admitted case. */
57
+ export function verifyNativeHarnessExperimentAttempt(value, context) {
58
+ assertBoundedTaskJson(value, 16_777_216);
59
+ const result = NativeHarnessExperimentAttemptSchema.parse(value);
60
+ const { contentHash: hash, ...content } = result;
61
+ if (contentHash(content) !== hash || result.taskId !== context.taskId
62
+ || contentHash(result.native.source) !== contentHash(StandaloneHarnessExperimentSourceSchema.parse(context.source))
63
+ || result.native.admissionHash !== context.admissionHash
64
+ || result.native.modelConfigurationHash !== context.modelConfigurationHash
65
+ || result.native.traceHash !== context.traceHash)
66
+ throw new Error("Native Harness attempt differs from its admitted case or retained trace.");
67
+ return result;
68
+ }
@@ -1,4 +1,6 @@
1
1
  import { z } from "zod";
2
+ export { StandaloneHarnessExperimentSourceSchema, STANDALONE_EXPERIMENT_MAX_POLICY_CALLS, STANDALONE_EXPERIMENT_READ_TOOLS, standaloneHarnessExperimentTools, harnessExperimentSourceRequiresProfile, harnessExperimentReadToolDeclarations, type StandaloneHarnessExperimentSource, } from "./harness-experiment-source.js";
3
+ export { NativeHarnessExperimentEvidenceSchema, NativeHarnessExperimentAttemptContentSchema, NativeHarnessExperimentAttemptSchema, createNativeHarnessExperimentAttempt, verifyNativeHarnessExperimentAttempt, type NativeHarnessExperimentEvidence, type NativeHarnessExperimentAttempt, } from "./native-harness-experiment-attempt.js";
2
4
  export declare const ExperimentTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3
5
  kind: z.ZodLiteral<"model">;
4
6
  modelId: z.ZodString;
@@ -33,6 +35,23 @@ export declare const ExperimentTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
33
35
  modelId: z.ZodString;
34
36
  configurationHash: z.ZodString;
35
37
  }, z.core.$strict>;
38
+ }, z.core.$strict>, z.ZodObject<{
39
+ kind: z.ZodLiteral<"agent">;
40
+ source: z.ZodObject<{
41
+ harnessRelease: z.ZodObject<{
42
+ id: z.ZodString;
43
+ contentHash: z.ZodString;
44
+ }, z.core.$strict>;
45
+ agentSnapshot: z.ZodObject<{
46
+ id: z.ZodString;
47
+ contentHash: z.ZodString;
48
+ }, z.core.$strict>;
49
+ sourcePackageHash: z.ZodString;
50
+ }, z.core.$strict>;
51
+ model: z.ZodObject<{
52
+ modelId: z.ZodString;
53
+ configurationHash: z.ZodString;
54
+ }, z.core.$strict>;
36
55
  }, z.core.$strict>, z.ZodObject<{
37
56
  kind: z.ZodLiteral<"fixture">;
38
57
  configurationHash: z.ZodString;
@@ -105,6 +124,23 @@ export declare const ExperimentManifestContentSchema: z.ZodObject<{
105
124
  modelId: z.ZodString;
106
125
  configurationHash: z.ZodString;
107
126
  }, z.core.$strict>;
127
+ }, z.core.$strict>, z.ZodObject<{
128
+ kind: z.ZodLiteral<"agent">;
129
+ source: z.ZodObject<{
130
+ harnessRelease: z.ZodObject<{
131
+ id: z.ZodString;
132
+ contentHash: z.ZodString;
133
+ }, z.core.$strict>;
134
+ agentSnapshot: z.ZodObject<{
135
+ id: z.ZodString;
136
+ contentHash: z.ZodString;
137
+ }, z.core.$strict>;
138
+ sourcePackageHash: z.ZodString;
139
+ }, z.core.$strict>;
140
+ model: z.ZodObject<{
141
+ modelId: z.ZodString;
142
+ configurationHash: z.ZodString;
143
+ }, z.core.$strict>;
108
144
  }, z.core.$strict>, z.ZodObject<{
109
145
  kind: z.ZodLiteral<"fixture">;
110
146
  configurationHash: z.ZodString;
@@ -113,6 +149,15 @@ export declare const ExperimentManifestContentSchema: z.ZodObject<{
113
149
  packageHash: z.ZodString;
114
150
  runtimeTargetHash: z.ZodString;
115
151
  metricPolicyHash: z.ZodString;
152
+ compatibility: z.ZodOptional<z.ZodObject<{
153
+ protocol: z.ZodLiteral<"openpond.evaluation-execution.v1">;
154
+ targetKind: z.ZodEnum<{
155
+ agent: "agent";
156
+ model: "model";
157
+ fixture: "fixture";
158
+ harness: "harness";
159
+ }>;
160
+ }, z.core.$strict>>;
116
161
  }, z.core.$strict>>;
117
162
  lineage: z.ZodOptional<z.ZodObject<{
118
163
  definition: z.ZodNullable<z.ZodObject<{
@@ -194,6 +239,23 @@ export declare const ExperimentManifestSchema: z.ZodObject<{
194
239
  modelId: z.ZodString;
195
240
  configurationHash: z.ZodString;
196
241
  }, z.core.$strict>;
242
+ }, z.core.$strict>, z.ZodObject<{
243
+ kind: z.ZodLiteral<"agent">;
244
+ source: z.ZodObject<{
245
+ harnessRelease: z.ZodObject<{
246
+ id: z.ZodString;
247
+ contentHash: z.ZodString;
248
+ }, z.core.$strict>;
249
+ agentSnapshot: z.ZodObject<{
250
+ id: z.ZodString;
251
+ contentHash: z.ZodString;
252
+ }, z.core.$strict>;
253
+ sourcePackageHash: z.ZodString;
254
+ }, z.core.$strict>;
255
+ model: z.ZodObject<{
256
+ modelId: z.ZodString;
257
+ configurationHash: z.ZodString;
258
+ }, z.core.$strict>;
197
259
  }, z.core.$strict>, z.ZodObject<{
198
260
  kind: z.ZodLiteral<"fixture">;
199
261
  configurationHash: z.ZodString;
@@ -202,6 +264,15 @@ export declare const ExperimentManifestSchema: z.ZodObject<{
202
264
  packageHash: z.ZodString;
203
265
  runtimeTargetHash: z.ZodString;
204
266
  metricPolicyHash: z.ZodString;
267
+ compatibility: z.ZodOptional<z.ZodObject<{
268
+ protocol: z.ZodLiteral<"openpond.evaluation-execution.v1">;
269
+ targetKind: z.ZodEnum<{
270
+ agent: "agent";
271
+ model: "model";
272
+ fixture: "fixture";
273
+ harness: "harness";
274
+ }>;
275
+ }, z.core.$strict>>;
205
276
  }, z.core.$strict>>;
206
277
  lineage: z.ZodOptional<z.ZodObject<{
207
278
  definition: z.ZodNullable<z.ZodObject<{
@@ -550,6 +621,23 @@ export declare function verifyExperimentEvidence(input: {
550
621
  modelId: string;
551
622
  configurationHash: string;
552
623
  };
624
+ } | {
625
+ kind: "agent";
626
+ source: {
627
+ harnessRelease: {
628
+ id: string;
629
+ contentHash: string;
630
+ };
631
+ agentSnapshot: {
632
+ id: string;
633
+ contentHash: string;
634
+ };
635
+ sourcePackageHash: string;
636
+ };
637
+ model: {
638
+ modelId: string;
639
+ configurationHash: string;
640
+ };
553
641
  } | {
554
642
  kind: "fixture";
555
643
  configurationHash: string;
@@ -576,6 +664,10 @@ export declare function verifyExperimentEvidence(input: {
576
664
  packageHash: string;
577
665
  runtimeTargetHash: string;
578
666
  metricPolicyHash: string;
667
+ compatibility?: {
668
+ protocol: "openpond.evaluation-execution.v1";
669
+ targetKind: "agent" | "model" | "fixture" | "harness";
670
+ } | undefined;
579
671
  } | undefined;
580
672
  lineage?: {
581
673
  definition: {
@@ -1 +1 @@
1
- {"version":3,"file":"experiments.d.ts","sourceRoot":"","sources":["../../../../src/experiments.ts"],"names":[],"mappings":"AAAA,OAAO,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,EAAE,OAAO,GAAG,IAAI,CAAC;CACjC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOrF;AAED,iFAAiF;AACjF,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE;IAAE,QAAQ,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,EACpE,SAAS,EAAE;IAAE,QAAQ,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,GACpE,oBAAoB,CA+EtB"}
@@ -0,0 +1,35 @@
1
+ import { z } from "zod";
2
+ import { type AgentSnapshot, type HarnessRelease, type ToolDeclaration } from "@openpond/harness";
3
+ /** A standalone Agent/Harness closure has no incidental Profile binding.
4
+ * The execution host resolves and verifies these exact published bytes. */
5
+ export declare const StandaloneHarnessExperimentSourceSchema: z.ZodObject<{
6
+ harnessRelease: z.ZodObject<{
7
+ id: z.ZodString;
8
+ contentHash: z.ZodString;
9
+ }, z.core.$strict>;
10
+ agentSnapshot: z.ZodObject<{
11
+ id: z.ZodString;
12
+ contentHash: z.ZodString;
13
+ }, z.core.$strict>;
14
+ sourcePackageHash: z.ZodString;
15
+ }, z.core.$strict>;
16
+ export type StandaloneHarnessExperimentSource = z.infer<typeof StandaloneHarnessExperimentSourceSchema>;
17
+ export declare const STANDALONE_EXPERIMENT_MAX_POLICY_CALLS = 64;
18
+ export declare function harnessExperimentSourceRequiresProfile(source: {
19
+ agentSnapshot: AgentSnapshot;
20
+ harnessRelease: HarnessRelease;
21
+ }): boolean;
22
+ /** Qualified case-local implementations read this immutable closure or its
23
+ * retained context. Other capabilities need an independently admitted world. */
24
+ export declare const STANDALONE_EXPERIMENT_READ_TOOLS: ReadonlySet<string>;
25
+ export declare function standaloneHarnessExperimentTools(source: {
26
+ agentSnapshot: AgentSnapshot;
27
+ harnessRelease: HarnessRelease;
28
+ }): ToolDeclaration[];
29
+ /** Profile-owned callers must establish exact Profile authority first. This
30
+ * function qualifies only tools; it does not grant source or Profile access. */
31
+ export declare function harnessExperimentReadToolDeclarations(source: {
32
+ agentSnapshot: AgentSnapshot;
33
+ harnessRelease: HarnessRelease;
34
+ }): ToolDeclaration[];
35
+ //# sourceMappingURL=harness-experiment-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harness-experiment-source.d.ts","sourceRoot":"","sources":["../../../../src/harness-experiment-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA6D,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE7J;2EAC2E;AAC3E,eAAO,MAAM,uCAAuC;;;;;;;;;;kBAIzC,CAAC;AACZ,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC;AACxG,eAAO,MAAM,sCAAsC,KAAK,CAAC;AAEzD,wBAAgB,sCAAsC,CAAC,MAAM,EAAE;IAAE,aAAa,EAAE,aAAa,CAAC;IAAC,cAAc,EAAE,cAAc,CAAA;CAAE,GAAG,OAAO,CAGxI;AAED;gFACgF;AAChF,eAAO,MAAM,gCAAgC,EAAE,WAAW,CAAC,MAAM,CAE/D,CAAC;AAEH,wBAAgB,gCAAgC,CAAC,MAAM,EAAE;IACvD,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;CAChC,GAAG,eAAe,EAAE,CAIpB;AAED;gFACgF;AAChF,wBAAgB,qCAAqC,CAAC,MAAM,EAAE;IAC5D,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;CAChC,GAAG,eAAe,EAAE,CAepB"}
@@ -0,0 +1,122 @@
1
+ import { z } from "zod";
2
+ import { type StandaloneHarnessExperimentSource } from "./harness-experiment-source.js";
3
+ /** Owner-recorded native turn identities. Raw runtime events remain in the
4
+ * authorized execution store; this receipt retains their exact references. */
5
+ export declare const NativeHarnessExperimentEvidenceSchema: z.ZodObject<{
6
+ sessionId: z.ZodString;
7
+ turnId: z.ZodString;
8
+ source: z.ZodObject<{
9
+ harnessRelease: z.ZodObject<{
10
+ id: z.ZodString;
11
+ contentHash: z.ZodString;
12
+ }, z.core.$strict>;
13
+ agentSnapshot: z.ZodObject<{
14
+ id: z.ZodString;
15
+ contentHash: z.ZodString;
16
+ }, z.core.$strict>;
17
+ sourcePackageHash: z.ZodString;
18
+ }, z.core.$strict>;
19
+ admissionHash: z.ZodString;
20
+ modelConfigurationHash: z.ZodString;
21
+ traceHash: z.ZodString;
22
+ runtimeEventRefs: z.ZodArray<z.ZodString>;
23
+ startedAt: z.ZodString;
24
+ completedAt: z.ZodString;
25
+ outputHash: z.ZodString;
26
+ partialOutputAvailable: z.ZodBoolean;
27
+ }, z.core.$strict>;
28
+ export type NativeHarnessExperimentEvidence = z.infer<typeof NativeHarnessExperimentEvidenceSchema>;
29
+ /** This qualified standalone contract is for text Datasets. A prepared task
30
+ * needs its independently qualified environment receipt, not a null snapshot
31
+ * presented as evidence that its environment ran. */
32
+ export declare const NativeHarnessExperimentAttemptContentSchema: z.ZodObject<{
33
+ schemaVersion: z.ZodLiteral<"openpond.nativeHarnessExperimentAttempt.v1">;
34
+ taskId: z.ZodString;
35
+ status: z.ZodEnum<{
36
+ completed: "completed";
37
+ policy_failure: "policy_failure";
38
+ cancelled: "cancelled";
39
+ timed_out: "timed_out";
40
+ }>;
41
+ output: z.ZodNullable<z.ZodString>;
42
+ error: z.ZodNullable<z.ZodString>;
43
+ messages: z.ZodArray<z.ZodUnknown>;
44
+ collected: z.ZodBoolean;
45
+ environmentCleanupComplete: z.ZodLiteral<true>;
46
+ snapshot: z.ZodNull;
47
+ native: z.ZodObject<{
48
+ sessionId: z.ZodString;
49
+ turnId: z.ZodString;
50
+ source: z.ZodObject<{
51
+ harnessRelease: z.ZodObject<{
52
+ id: z.ZodString;
53
+ contentHash: z.ZodString;
54
+ }, z.core.$strict>;
55
+ agentSnapshot: z.ZodObject<{
56
+ id: z.ZodString;
57
+ contentHash: z.ZodString;
58
+ }, z.core.$strict>;
59
+ sourcePackageHash: z.ZodString;
60
+ }, z.core.$strict>;
61
+ admissionHash: z.ZodString;
62
+ modelConfigurationHash: z.ZodString;
63
+ traceHash: z.ZodString;
64
+ runtimeEventRefs: z.ZodArray<z.ZodString>;
65
+ startedAt: z.ZodString;
66
+ completedAt: z.ZodString;
67
+ outputHash: z.ZodString;
68
+ partialOutputAvailable: z.ZodBoolean;
69
+ }, z.core.$strict>;
70
+ }, z.core.$strict>;
71
+ export declare const NativeHarnessExperimentAttemptSchema: z.ZodObject<{
72
+ schemaVersion: z.ZodLiteral<"openpond.nativeHarnessExperimentAttempt.v1">;
73
+ taskId: z.ZodString;
74
+ status: z.ZodEnum<{
75
+ completed: "completed";
76
+ policy_failure: "policy_failure";
77
+ cancelled: "cancelled";
78
+ timed_out: "timed_out";
79
+ }>;
80
+ output: z.ZodNullable<z.ZodString>;
81
+ error: z.ZodNullable<z.ZodString>;
82
+ messages: z.ZodArray<z.ZodUnknown>;
83
+ collected: z.ZodBoolean;
84
+ environmentCleanupComplete: z.ZodLiteral<true>;
85
+ snapshot: z.ZodNull;
86
+ native: z.ZodObject<{
87
+ sessionId: z.ZodString;
88
+ turnId: z.ZodString;
89
+ source: z.ZodObject<{
90
+ harnessRelease: z.ZodObject<{
91
+ id: z.ZodString;
92
+ contentHash: z.ZodString;
93
+ }, z.core.$strict>;
94
+ agentSnapshot: z.ZodObject<{
95
+ id: z.ZodString;
96
+ contentHash: z.ZodString;
97
+ }, z.core.$strict>;
98
+ sourcePackageHash: z.ZodString;
99
+ }, z.core.$strict>;
100
+ admissionHash: z.ZodString;
101
+ modelConfigurationHash: z.ZodString;
102
+ traceHash: z.ZodString;
103
+ runtimeEventRefs: z.ZodArray<z.ZodString>;
104
+ startedAt: z.ZodString;
105
+ completedAt: z.ZodString;
106
+ outputHash: z.ZodString;
107
+ partialOutputAvailable: z.ZodBoolean;
108
+ }, z.core.$strict>;
109
+ contentHash: z.ZodString;
110
+ }, z.core.$strict>;
111
+ export type NativeHarnessExperimentAttempt = z.infer<typeof NativeHarnessExperimentAttemptSchema>;
112
+ export declare function createNativeHarnessExperimentAttempt(input: z.input<typeof NativeHarnessExperimentAttemptContentSchema>): NativeHarnessExperimentAttempt;
113
+ /** Artifact access and trace ownership are enforced by the host. Verification
114
+ * binds the artifact bytes to that host's independently admitted case. */
115
+ export declare function verifyNativeHarnessExperimentAttempt(value: unknown, context: {
116
+ taskId: string;
117
+ source: StandaloneHarnessExperimentSource;
118
+ admissionHash: string;
119
+ modelConfigurationHash: string;
120
+ traceHash: string;
121
+ }): NativeHarnessExperimentAttempt;
122
+ //# sourceMappingURL=native-harness-experiment-attempt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-harness-experiment-attempt.d.ts","sourceRoot":"","sources":["../../../../src/native-harness-experiment-attempt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAA2C,KAAK,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AAKjI;8EAC8E;AAC9E,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;kBAiBhD,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG;;qDAEqD;AACrD,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkBtD,CAAC;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBACK,CAAC;AACvD,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,GACjE,8BAA8B,CAIhC;AAED;0EAC0E;AAC1E,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,iCAAiC,CAAC;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,8BAA8B,CAWjC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpond/evals",
3
- "version": "0.11.14",
3
+ "version": "0.11.16",
4
4
  "description": "Portable Tasksets, graders, evaluation runs, receipts, conformance fixtures, and Work evidence for OpenPond Harnesses",
5
5
  "license": "MIT",
6
6
  "type": "module",