@openpond/evals 0.11.12 → 0.11.13

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
@@ -182,3 +182,7 @@ numeric or Boolean feedback contribute. Failed, cancelled, absent or ungraded
182
182
  cases never become zero-valued measurements. Categorical feedback remains
183
183
  inspectable without a numeric delta. This operation reads retained evidence and
184
184
  has no execution, grading or billing authority.
185
+
186
+ ## Retained Profile case evidence
187
+
188
+ Profile execution may return an installation-owned `retainedEvidenceRef` with its exact session and turn identities. The runner validates it and binds it into immutable receipt metadata. A reference grants no access: the installation resolves it through its owner-scoped store and checks the source, member, output and trace hashes before inspection. Full outputs and bounded trace pages stay separate from private grading inputs. Missing historic references remain unavailable rather than reconstructed from a newer source.
@@ -4,6 +4,13 @@ import { aggregateTasksetRunReceipts, assertTasksetMetricSource } from "./metric
4
4
  import { createAttemptReceipt, verifyAttemptReceipt } from "./runs.js";
5
5
  import { assertProfileEvaluationRunAdmission } from "./taskset-run-contract.js";
6
6
  import { policyTaskView } from "./tasksets.js";
7
+ import { z } from "zod";
8
+ /** An installation-owned policy trace. Access remains with that installation;
9
+ * the immutable receipt binds the reference without copying private graders. */
10
+ export const ProfileEvaluationEvidenceRefSchema = z.object({
11
+ sessionId: z.string().trim().min(1).max(500),
12
+ turnId: z.string().trim().min(1).max(500),
13
+ }).strict();
7
14
  /** The installation owns execution, tools, approvals and storage. This runner
8
15
  * owns frozen population dispatch and private grading for both Desktop and web. */
9
16
  export async function executeProfileEvaluationRun(input) {
@@ -78,6 +85,9 @@ export async function executeProfileEvaluationRun(input) {
78
85
  sourceRevision: source.sourceRevision,
79
86
  definitionHash: source.definitionHash,
80
87
  environmentHash: source.environmentHash,
88
+ ...(execution.retainedEvidenceRef ? {
89
+ retainedEvidenceRef: ProfileEvaluationEvidenceRefSchema.parse(execution.retainedEvidenceRef),
90
+ } : {}),
81
91
  },
82
92
  });
83
93
  await input.saveReceipt(receipt);
@@ -5,6 +5,13 @@ import { type AttemptReceipt } from "./runs.js";
5
5
  import { type TasksetRunManifest } from "./taskset-run-contract.js";
6
6
  import { policyTaskView, type TasksetRelease } from "./tasksets.js";
7
7
  import type { ProfileEvaluationCatalog, ProfileEvaluationRunSource } from "./profile-evaluations.js";
8
+ import { z } from "zod";
9
+ /** An installation-owned policy trace. Access remains with that installation;
10
+ * the immutable receipt binds the reference without copying private graders. */
11
+ export declare const ProfileEvaluationEvidenceRefSchema: z.ZodObject<{
12
+ sessionId: z.ZodString;
13
+ turnId: z.ZodString;
14
+ }, z.core.$strict>;
8
15
  type PolicyTask = ReturnType<typeof policyTaskView>;
9
16
  /** The installation owns execution, tools, approvals and storage. This runner
10
17
  * owns frozen population dispatch and private grading for both Desktop and web. */
@@ -20,6 +27,7 @@ export declare function executeProfileEvaluationRun(input: {
20
27
  }) => Promise<{
21
28
  evidence: AttemptEvidence;
22
29
  traceHash: string;
30
+ retainedEvidenceRef?: z.infer<typeof ProfileEvaluationEvidenceRefSchema>;
23
31
  artifactRefs: ImmutableArtifactRef[];
24
32
  startedAt: string;
25
33
  completedAt: string;
@@ -1 +1 @@
1
- {"version":3,"file":"profile-evaluation-execution.d.ts","sourceRoot":"","sources":["../../../../src/profile-evaluation-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEvG,OAAO,EAAsC,KAAK,eAAe,EAAE,KAAK,oBAAoB,EAAE,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1J,OAAO,EAA0D,KAAK,qBAAqB,EAAE,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC5I,OAAO,EAA8C,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAC5F,OAAO,EAAuC,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,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AAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,GAAG,OAAO,CAAC;IACV,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC,CA2FD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpond/evals",
3
- "version": "0.11.12",
3
+ "version": "0.11.13",
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",