@openpond/evals 0.11.13 → 0.11.15

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.
@@ -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({
@@ -12,6 +15,12 @@ export const ExperimentTargetSchema = z.discriminatedUnion("kind", [
12
15
  z.object({
13
16
  kind: z.literal("harness"),
14
17
  source: ProfileEvaluationRunSourceSchema,
18
+ model: z.object({ modelId: ReleaseIdSchema, configurationHash: ReleaseHashSchema }).strict(),
19
+ }).strict(),
20
+ z.object({
21
+ kind: z.literal("agent"),
22
+ source: StandaloneHarnessExperimentSourceSchema,
23
+ model: z.object({ modelId: ReleaseIdSchema, configurationHash: ReleaseHashSchema }).strict(),
15
24
  }).strict(),
16
25
  z.object({ kind: z.literal("fixture"), configurationHash: ReleaseHashSchema }).strict(),
17
26
  ]);
@@ -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;
@@ -29,6 +31,27 @@ export declare const ExperimentTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
29
31
  }, z.core.$strict>], "kind">;
30
32
  environmentHash: z.ZodString;
31
33
  }, z.core.$strict>;
34
+ model: z.ZodObject<{
35
+ modelId: z.ZodString;
36
+ configurationHash: z.ZodString;
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>;
32
55
  }, z.core.$strict>, z.ZodObject<{
33
56
  kind: z.ZodLiteral<"fixture">;
34
57
  configurationHash: z.ZodString;
@@ -97,6 +120,27 @@ export declare const ExperimentManifestContentSchema: z.ZodObject<{
97
120
  }, z.core.$strict>], "kind">;
98
121
  environmentHash: z.ZodString;
99
122
  }, z.core.$strict>;
123
+ model: z.ZodObject<{
124
+ modelId: z.ZodString;
125
+ configurationHash: z.ZodString;
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>;
100
144
  }, z.core.$strict>, z.ZodObject<{
101
145
  kind: z.ZodLiteral<"fixture">;
102
146
  configurationHash: z.ZodString;
@@ -182,6 +226,27 @@ export declare const ExperimentManifestSchema: z.ZodObject<{
182
226
  }, z.core.$strict>], "kind">;
183
227
  environmentHash: z.ZodString;
184
228
  }, z.core.$strict>;
229
+ model: z.ZodObject<{
230
+ modelId: z.ZodString;
231
+ configurationHash: z.ZodString;
232
+ }, z.core.$strict>;
233
+ }, z.core.$strict>, z.ZodObject<{
234
+ kind: z.ZodLiteral<"agent">;
235
+ source: z.ZodObject<{
236
+ harnessRelease: z.ZodObject<{
237
+ id: z.ZodString;
238
+ contentHash: z.ZodString;
239
+ }, z.core.$strict>;
240
+ agentSnapshot: z.ZodObject<{
241
+ id: z.ZodString;
242
+ contentHash: z.ZodString;
243
+ }, z.core.$strict>;
244
+ sourcePackageHash: z.ZodString;
245
+ }, z.core.$strict>;
246
+ model: z.ZodObject<{
247
+ modelId: z.ZodString;
248
+ configurationHash: z.ZodString;
249
+ }, z.core.$strict>;
185
250
  }, z.core.$strict>, z.ZodObject<{
186
251
  kind: z.ZodLiteral<"fixture">;
187
252
  configurationHash: z.ZodString;
@@ -534,6 +599,27 @@ export declare function verifyExperimentEvidence(input: {
534
599
  };
535
600
  environmentHash: string;
536
601
  };
602
+ model: {
603
+ modelId: string;
604
+ configurationHash: string;
605
+ };
606
+ } | {
607
+ kind: "agent";
608
+ source: {
609
+ harnessRelease: {
610
+ id: string;
611
+ contentHash: string;
612
+ };
613
+ agentSnapshot: {
614
+ id: string;
615
+ contentHash: string;
616
+ };
617
+ sourcePackageHash: string;
618
+ };
619
+ model: {
620
+ modelId: string;
621
+ configurationHash: string;
622
+ };
537
623
  } | {
538
624
  kind: "fixture";
539
625
  configurationHash: string;
@@ -1 +1 @@
1
- {"version":3,"file":"experiments.d.ts","sourceRoot":"","sources":["../../../../src/experiments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAWjC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;kBAepC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;kBAI9B,CAAC;AACZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,sBAAsB,GAAG,MAAM,CAG1E;AAED,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0B1C,CAAC;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAsF,CAAC;AAC5H,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E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AChC,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,CAsEtB"}
@@ -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.13",
3
+ "version": "0.11.15",
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",