@openpond/evals 0.11.1 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -12,6 +12,9 @@ export * from "./metrics.js";
12
12
  export * from "./taskset-run-contract.js";
13
13
  export * from "./model-improvement-qualification.js";
14
14
  export * from "./preferences.js";
15
+ export * from "./profile-evaluations.js";
16
+ export * from "./profile-evaluation-comparisons.js";
17
+ export * from "./profile-evaluation-execution.js";
15
18
  export * from "./review-conformance.js";
16
19
  export * from "./rollouts.js";
17
20
  export * from "./telemetry.js";
@@ -0,0 +1,86 @@
1
+ import { z } from "zod";
2
+ import { ImmutableReleaseRefSchema, ReleaseHashSchema, ReleaseIdSchema, ReleaseTimestampSchema, assertContentHash, contentHash, } from "@openpond/harness";
3
+ import { assertTasksetMetricResult } from "./metric-policy.js";
4
+ import { ProfileEvaluationRunSourceSchema } from "./profile-evaluations.js";
5
+ import { TasksetRunManifestSchema } from "./taskset-run-contract.js";
6
+ export const ProfileEvaluationComparisonContentSchema = z.object({
7
+ schemaVersion: z.literal("openpond.profileEvaluationComparison.v1"),
8
+ id: ReleaseIdSchema,
9
+ tasksetRelease: ImmutableReleaseRefSchema,
10
+ populationHash: ReleaseHashSchema,
11
+ environmentHash: ReleaseHashSchema,
12
+ metricPolicyHash: ReleaseHashSchema,
13
+ limitsHash: ReleaseHashSchema,
14
+ members: z.array(z.object({
15
+ runManifest: ImmutableReleaseRefSchema,
16
+ metricResultHash: ReleaseHashSchema,
17
+ source: ProfileEvaluationRunSourceSchema,
18
+ policy: TasksetRunManifestSchema.shape.policy,
19
+ score: z.number().min(0).max(1).nullable(),
20
+ }).strict()).min(2).max(100),
21
+ createdAt: ReleaseTimestampSchema,
22
+ }).strict();
23
+ export const ProfileEvaluationComparisonSchema = ProfileEvaluationComparisonContentSchema.extend({
24
+ contentHash: ReleaseHashSchema,
25
+ }).strict();
26
+ /** Comparison membership is immutable and refers to existing run evidence.
27
+ * The same Taskset, population, environment, metric and limits are required;
28
+ * model and released Profile source may vary independently. */
29
+ export function createProfileEvaluationComparison(input) {
30
+ if (input.members.length < 2)
31
+ throw new Error("A comparison requires at least two runs.");
32
+ const parsed = input.members.map(({ manifest, result }) => {
33
+ TasksetRunManifestSchema.parse(manifest);
34
+ assertContentHash(manifest, "Taskset run manifest");
35
+ assertTasksetMetricResult(result);
36
+ if (!manifest.profileEvaluation || manifest.execution.kind !== "harness") {
37
+ throw new Error("Profile comparison requires released Profile evaluation runs.");
38
+ }
39
+ if (result.runManifest.id !== manifest.id || result.runManifest.contentHash !== manifest.contentHash
40
+ || result.tasksetRelease.id !== manifest.tasksetRelease.id
41
+ || result.tasksetRelease.contentHash !== manifest.tasksetRelease.contentHash
42
+ || result.policyHash !== contentHash(manifest.metricPolicy)) {
43
+ throw new Error("Profile comparison metric differs from its run manifest.");
44
+ }
45
+ return { manifest, result, source: manifest.profileEvaluation };
46
+ });
47
+ const baseline = parsed[0];
48
+ const populationHash = contentHash(baseline.manifest.population.map(({ taskId, seed, fixtureId }) => ({ taskId, seed, fixtureId })));
49
+ const metricPolicyHash = contentHash(baseline.manifest.metricPolicy);
50
+ const limitsHash = contentHash(baseline.manifest.limits);
51
+ const ids = new Set();
52
+ for (const member of parsed) {
53
+ if (ids.has(member.manifest.id))
54
+ throw new Error("Profile comparison repeats a run.");
55
+ ids.add(member.manifest.id);
56
+ if (member.manifest.tasksetRelease.id !== baseline.manifest.tasksetRelease.id
57
+ || member.manifest.tasksetRelease.contentHash !== baseline.manifest.tasksetRelease.contentHash
58
+ || contentHash(member.manifest.population.map(({ taskId, seed, fixtureId }) => ({ taskId, seed, fixtureId }))) !== populationHash
59
+ || member.source.environmentHash !== baseline.source.environmentHash
60
+ || contentHash(member.manifest.metricPolicy) !== metricPolicyHash
61
+ || contentHash(member.manifest.limits) !== limitsHash
62
+ || member.manifest.runtimeTarget.adapterId !== baseline.manifest.runtimeTarget.adapterId
63
+ || member.manifest.runtimeTarget.placement !== baseline.manifest.runtimeTarget.placement
64
+ || member.manifest.runtimeTarget.runtimeVersion !== baseline.manifest.runtimeTarget.runtimeVersion) {
65
+ throw new Error("Profile comparison runs differ in frozen tasks, environment, grading, limits, or runtime.");
66
+ }
67
+ }
68
+ const content = ProfileEvaluationComparisonContentSchema.parse({
69
+ schemaVersion: "openpond.profileEvaluationComparison.v1",
70
+ id: input.id,
71
+ tasksetRelease: baseline.manifest.tasksetRelease,
72
+ populationHash,
73
+ environmentHash: baseline.source.environmentHash,
74
+ metricPolicyHash,
75
+ limitsHash,
76
+ members: parsed.map(({ manifest, result, source }) => ({
77
+ runManifest: { id: manifest.id, contentHash: manifest.contentHash },
78
+ metricResultHash: result.contentHash,
79
+ source,
80
+ policy: manifest.policy,
81
+ score: result.value,
82
+ })),
83
+ createdAt: input.createdAt,
84
+ });
85
+ return ProfileEvaluationComparisonSchema.parse({ ...content, contentHash: contentHash(content) });
86
+ }
@@ -0,0 +1,76 @@
1
+ import { ImmutableArtifactRefSchema, contentHash } from "@openpond/harness";
2
+ import { gradeTaskEvidence } from "./graders.js";
3
+ import { aggregateTasksetRunReceipts, assertTasksetMetricSource } from "./metrics.js";
4
+ import { createAttemptReceipt } from "./runs.js";
5
+ import { assertProfileEvaluationRunAdmission } from "./taskset-run-contract.js";
6
+ import { policyTaskView } from "./tasksets.js";
7
+ /** The installation owns execution, tools, approvals and storage. This runner
8
+ * owns frozen population dispatch and private grading for both Desktop and web. */
9
+ export async function executeProfileEvaluationRun(input) {
10
+ assertProfileEvaluationRunAdmission(input.manifest, input.taskset, input.catalog);
11
+ assertTasksetMetricSource(input.taskset, input.metricSource);
12
+ const source = input.manifest.profileEvaluation;
13
+ const definition = input.catalog.definitions.find((item) => item.id === source.definitionId);
14
+ const tasks = new Map(input.taskset.tasks.map((task) => [task.id, task]));
15
+ const receipts = [];
16
+ const grades = [];
17
+ for (const member of input.manifest.population) {
18
+ input.signal?.throwIfAborted();
19
+ const task = tasks.get(member.taskId);
20
+ const execution = await input.execute({
21
+ task: policyTaskView(task), seed: member.seed, source,
22
+ ...(input.signal ? { signal: input.signal } : {}),
23
+ });
24
+ input.signal?.throwIfAborted();
25
+ const grade = await gradeTaskEvidence({
26
+ task, evidence: execution.evidence, graders: input.taskset.graders,
27
+ ...(input.modelJudge ? { modelJudge: input.modelJudge } : {}),
28
+ ...(input.customVerifier ? { customVerifier: input.customVerifier } : {}),
29
+ ...(input.signal ? { signal: input.signal } : {}),
30
+ });
31
+ const gradeRef = ImmutableArtifactRefSchema.parse(await input.saveGrade(grade));
32
+ if (gradeRef.contentHash !== grade.contentHash)
33
+ throw new Error("Stored Profile evaluation grade differs from its graded evidence.");
34
+ const failureClass = execution.failureClass ?? grade.failureClass;
35
+ const receipt = createAttemptReceipt({
36
+ schemaVersion: "openpond.attemptReceipt.v1",
37
+ id: member.receiptId,
38
+ runManifest: { id: input.manifest.id, contentHash: input.manifest.contentHash },
39
+ taskId: member.taskId,
40
+ seed: member.seed,
41
+ terminal: execution.terminal,
42
+ failureClass,
43
+ outputHash: execution.evidence.infrastructureError ? null : contentHash(execution.evidence.output),
44
+ traceHash: execution.traceHash,
45
+ artifactRefs: execution.artifactRefs,
46
+ graderEvidenceRefs: [gradeRef],
47
+ startedAt: execution.startedAt,
48
+ completedAt: execution.completedAt,
49
+ latencyMs: execution.latencyMs,
50
+ costUsd: execution.costUsd,
51
+ metadata: {
52
+ gradingRole: "evaluation",
53
+ score: grade.score,
54
+ passed: grade.passed,
55
+ rewardEligible: grade.rewardEligible,
56
+ sourceRevision: source.sourceRevision,
57
+ definitionHash: source.definitionHash,
58
+ environmentHash: source.environmentHash,
59
+ },
60
+ });
61
+ await input.saveReceipt(receipt);
62
+ grades.push(grade);
63
+ receipts.push(receipt);
64
+ }
65
+ const metric = await aggregateTasksetRunReceipts({
66
+ manifest: input.manifest, taskset: input.taskset, receipts,
67
+ ...(input.metricSource !== undefined ? { source: input.metricSource } : {}),
68
+ ...(input.signal ? { signal: input.signal } : {}),
69
+ }, input.metricExecutor);
70
+ const passRate = grades.filter((grade) => grade.passed).length / grades.length;
71
+ return {
72
+ receipts, grades, metric, passRate,
73
+ passed: passRate >= definition.criterion.minimumPassRate
74
+ && (!definition.criterion.requireComplete || receipts.every((receipt) => receipt.terminal)),
75
+ };
76
+ }
@@ -0,0 +1,153 @@
1
+ import { z } from "zod";
2
+ import { ImmutableReleaseRefSchema, ReleaseHashSchema, ReleaseIdSchema, contentHash, harnessSourcePackageFiles, loadReleasedProfileWorkflowCatalogAssets, sha256, validateHarnessSourcePackage, } from "@openpond/harness";
3
+ import { TaskSplitSchema } from "./tasksets.js";
4
+ const RelativePathSchema = z.string().min(1).max(2_000).refine((value) => !value.includes("\\") && !value.includes(":") && !value.startsWith("/")
5
+ && value.split("/").every((part) => part !== "" && part !== "." && part !== ".."), "evaluation paths must be portable and relative");
6
+ /** Portable selection only. Taskset releases own task data and graders; run
7
+ * manifests and evidence stay in the installation's evaluation store. */
8
+ export const ProfileEvaluationTargetSchema = z.discriminatedUnion("kind", [
9
+ z.object({ kind: z.literal("profile") }).strict(),
10
+ z.object({ kind: z.literal("workflow"), workflowId: ReleaseIdSchema }).strict(),
11
+ z.object({ kind: z.literal("skill"), skillPath: RelativePathSchema }).strict(),
12
+ z.object({ kind: z.literal("agent_action"), actionId: ReleaseIdSchema }).strict(),
13
+ ]);
14
+ export const ProfileEvaluationDefinitionSchema = z.object({
15
+ id: ReleaseIdSchema,
16
+ label: z.string().trim().min(1).max(240),
17
+ description: z.string().max(4_000),
18
+ target: ProfileEvaluationTargetSchema,
19
+ tasksetRelease: ImmutableReleaseRefSchema,
20
+ split: TaskSplitSchema,
21
+ taskIds: z.array(ReleaseIdSchema).min(1).max(100_000),
22
+ seeds: z.array(z.string().trim().min(1).max(500)).min(1).max(100),
23
+ criterion: z.object({
24
+ minimumPassRate: z.number().min(0).max(1),
25
+ requireComplete: z.boolean(),
26
+ }).strict(),
27
+ }).strict().superRefine((definition, context) => {
28
+ if (new Set(definition.taskIds).size !== definition.taskIds.length) {
29
+ context.addIssue({ code: "custom", path: ["taskIds"], message: "Evaluation task identities must be unique." });
30
+ }
31
+ if (new Set(definition.seeds).size !== definition.seeds.length) {
32
+ context.addIssue({ code: "custom", path: ["seeds"], message: "Evaluation seeds must be unique." });
33
+ }
34
+ });
35
+ export const ProfileEvaluationSuiteSchema = z.object({
36
+ id: ReleaseIdSchema,
37
+ label: z.string().trim().min(1).max(240),
38
+ scope: z.enum(["component", "profile"]),
39
+ definitionIds: z.array(ReleaseIdSchema).min(1).max(1_000),
40
+ }).strict();
41
+ export const ProfileEvaluationCatalogSchema = z.object({
42
+ schemaVersion: z.literal("openpond.profileEvaluations.v1"),
43
+ definitions: z.array(ProfileEvaluationDefinitionSchema).max(1_000),
44
+ suites: z.array(ProfileEvaluationSuiteSchema).max(100),
45
+ }).strict();
46
+ /** Added to a Taskset run manifest only when a Profile component supplies the
47
+ * candidate behavior. It does not change the Taskset's frozen cases/graders. */
48
+ export const ProfileEvaluationRunSourceSchema = z.object({
49
+ profileId: ReleaseIdSchema,
50
+ sourceRevision: z.string().trim().min(1).max(240),
51
+ harnessRelease: ImmutableReleaseRefSchema,
52
+ catalogHash: ReleaseHashSchema,
53
+ definitionId: ReleaseIdSchema,
54
+ definitionHash: ReleaseHashSchema,
55
+ target: ProfileEvaluationTargetSchema,
56
+ environmentHash: ReleaseHashSchema,
57
+ }).strict();
58
+ /** Validate component and suite references against the same Profile release. */
59
+ export function validateProfileEvaluationCatalog(input) {
60
+ const catalog = ProfileEvaluationCatalogSchema.parse(input.catalog);
61
+ const ids = new Set();
62
+ for (const definition of catalog.definitions) {
63
+ if (ids.has(definition.id))
64
+ throw new Error(`Duplicate Profile evaluation ${definition.id}.`);
65
+ ids.add(definition.id);
66
+ switch (definition.target.kind) {
67
+ case "workflow":
68
+ if (!input.workflowIds.has(definition.target.workflowId))
69
+ throw new Error(`Profile evaluation ${definition.id} references a missing workflow.`);
70
+ break;
71
+ case "skill":
72
+ if (!input.skillPaths.has(definition.target.skillPath))
73
+ throw new Error(`Profile evaluation ${definition.id} references a missing Skill.`);
74
+ break;
75
+ case "agent_action":
76
+ if (!input.actionIds.has(definition.target.actionId))
77
+ throw new Error(`Profile evaluation ${definition.id} references a missing Agent action.`);
78
+ break;
79
+ }
80
+ }
81
+ const suiteIds = new Set();
82
+ for (const suite of catalog.suites) {
83
+ if (suiteIds.has(suite.id))
84
+ throw new Error(`Duplicate Profile evaluation suite ${suite.id}.`);
85
+ suiteIds.add(suite.id);
86
+ if (new Set(suite.definitionIds).size !== suite.definitionIds.length)
87
+ throw new Error(`Profile evaluation suite ${suite.id} repeats a definition.`);
88
+ for (const definitionId of suite.definitionIds) {
89
+ if (!ids.has(definitionId))
90
+ throw new Error(`Profile evaluation suite ${suite.id} references missing definition ${definitionId}.`);
91
+ }
92
+ if (suite.scope === "profile" && suite.definitionIds.every((id) => catalog.definitions.find((definition) => definition.id === id)?.target.kind !== "profile")) {
93
+ throw new Error(`Profile evaluation suite ${suite.id} needs an end-to-end Profile definition.`);
94
+ }
95
+ }
96
+ return { catalog, contentHash: contentHash(catalog) };
97
+ }
98
+ export function resolveProfileEvaluationRunSource(input) {
99
+ const catalog = ProfileEvaluationCatalogSchema.parse(input.catalog);
100
+ const definition = catalog.definitions.find((candidate) => candidate.id === input.definitionId);
101
+ if (!definition)
102
+ throw new Error(`Profile evaluation ${input.definitionId} is absent from its catalog.`);
103
+ return ProfileEvaluationRunSourceSchema.parse({
104
+ profileId: input.profileId,
105
+ sourceRevision: input.sourceRevision,
106
+ harnessRelease: input.harnessRelease,
107
+ catalogHash: contentHash(catalog),
108
+ definitionId: definition.id,
109
+ definitionHash: contentHash(definition),
110
+ target: definition.target,
111
+ environmentHash: input.environmentHash,
112
+ });
113
+ }
114
+ /** Evaluation definitions are read from the verifier-only bytes of an exact
115
+ * released source package. The caller must never forward this asset to the
116
+ * model-visible policy surface. */
117
+ export function loadReleasedProfileEvaluationCatalog(value) {
118
+ const source = validateHarnessSourcePackage(value);
119
+ const files = harnessSourcePackageFiles(source);
120
+ const result = loadReleasedProfileEvaluationCatalogAssets({
121
+ agentSnapshot: source.agentSnapshot,
122
+ harnessRelease: source.harnessRelease,
123
+ catalogBytes: files.get("evals/catalog.json"),
124
+ workflowBytes: files.get("workflows/catalog.json"),
125
+ actionBytes: files.get("workflows/actions.json"),
126
+ });
127
+ return { ...result, harnessRelease: {
128
+ id: source.harnessRelease.id, contentHash: source.harnessRelease.contentHash,
129
+ } };
130
+ }
131
+ /** For a local release whose caller already verified its full file inventory. */
132
+ export function loadReleasedProfileEvaluationCatalogAssets(input) {
133
+ const asset = input.harnessRelease.files.find((file) => file.path === "evals/catalog.json");
134
+ const bytes = input.catalogBytes;
135
+ if (!asset || asset.visibility !== "verifier" || !bytes || sha256(bytes) !== asset.contentHash) {
136
+ throw new Error("Released Profile evaluation catalog is unavailable or not verifier-private.");
137
+ }
138
+ const workflows = input.workflowBytes || input.actionBytes
139
+ ? loadReleasedProfileWorkflowCatalogAssets({
140
+ agentSnapshot: input.agentSnapshot,
141
+ harnessRelease: input.harnessRelease,
142
+ catalogBytes: input.workflowBytes,
143
+ actionBytes: input.actionBytes,
144
+ })
145
+ : null;
146
+ const { catalog, contentHash: catalogHash } = validateProfileEvaluationCatalog({
147
+ catalog: JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes)),
148
+ workflowIds: new Set(workflows?.catalog.workflows.map((workflow) => workflow.id) ?? []),
149
+ skillPaths: new Set(input.agentSnapshot.skills.map((skill) => skill.path)),
150
+ actionIds: new Set(workflows?.actions.map((action) => action.id) ?? []),
151
+ });
152
+ return { catalog, catalogHash };
153
+ }
@@ -2,6 +2,7 @@ import { z } from "zod";
2
2
  import { assertContentHash, contentHash, ImmutableReleaseRefSchema, MetadataSchema, ModelRefSchema, ReleaseHashSchema, ReleaseIdSchema, ReleaseTimestampSchema } from "@openpond/harness";
3
3
  import { RunLimitsSchema, RuntimeTargetBindingSchema, verifyAttemptReceipt } from "./runs.js";
4
4
  import { TasksetMetricPolicySchema } from "./metric-policy.js";
5
+ import { ProfileEvaluationCatalogSchema, ProfileEvaluationRunSourceSchema } from "./profile-evaluations.js";
5
6
  import { assertTasksetRelease } from "./tasksets.js";
6
7
  /** A fixture check owns no model identity and cannot become a model evaluation. */
7
8
  export const TasksetRunPolicySchema = z.discriminatedUnion("kind", [
@@ -24,6 +25,7 @@ export const TasksetRunManifestContentSchema = z.object({
24
25
  tasksetRelease: ImmutableReleaseRefSchema,
25
26
  packageHash: ReleaseHashSchema,
26
27
  execution: TasksetRunExecutionSchema,
28
+ profileEvaluation: ProfileEvaluationRunSourceSchema.optional(),
27
29
  policy: TasksetRunPolicySchema,
28
30
  gradingRole: z.literal("evaluation"),
29
31
  metricPolicy: TasksetMetricPolicySchema,
@@ -37,6 +39,11 @@ export const TasksetRunManifestContentSchema = z.object({
37
39
  context.addIssue({ code: "custom", path: ["population"], message: "Run receipt identities must be unique." });
38
40
  if (value.population.some(member => (member.fixtureId !== null) !== (value.policy.kind === "fixture")))
39
41
  context.addIssue({ code: "custom", path: ["population"], message: "Only fixture runs require a fixture identity for every member." });
42
+ if (value.profileEvaluation && (value.execution.kind !== "harness"
43
+ || value.execution.harnessRelease.id !== value.profileEvaluation.harnessRelease.id
44
+ || value.execution.harnessRelease.contentHash !== value.profileEvaluation.harnessRelease.contentHash)) {
45
+ context.addIssue({ code: "custom", path: ["profileEvaluation"], message: "Profile evaluation must execute its exact bound Harness release." });
46
+ }
40
47
  });
41
48
  export const TasksetRunManifestSchema = TasksetRunManifestContentSchema.safeExtend({ contentHash: ReleaseHashSchema });
42
49
  export function createTasksetRunManifest(input) {
@@ -68,6 +75,39 @@ export function assertTasksetRunRelease(manifest, taskset) {
68
75
  || manifest.execution.policyHash !== contentHash(taskset.policy)))
69
76
  throw new Error("Taskset-owned execution differs from its pinned release.");
70
77
  }
78
+ /** Resolve the verifier-only definition before dispatch. A Profile run must
79
+ * evaluate exactly its declared frozen cases and seeds through its release. */
80
+ export function assertProfileEvaluationRunAdmission(manifest, taskset, catalogInput) {
81
+ assertTasksetRunRelease(manifest, taskset);
82
+ const catalog = ProfileEvaluationCatalogSchema.parse(catalogInput);
83
+ const source = manifest.profileEvaluation;
84
+ if (!source || manifest.execution.kind !== "harness" || manifest.policy.kind !== "model") {
85
+ throw new Error("Profile evaluation requires fresh model execution through its bound Harness.");
86
+ }
87
+ if (source.catalogHash !== contentHash(catalog))
88
+ throw new Error("Profile evaluation catalog differs from its pinned source.");
89
+ const definition = catalog.definitions.find((entry) => entry.id === source.definitionId);
90
+ if (!definition || source.definitionHash !== contentHash(definition)
91
+ || contentHash(source.target) !== contentHash(definition.target)) {
92
+ throw new Error("Profile evaluation definition differs from its pinned source.");
93
+ }
94
+ if (definition.tasksetRelease.id !== taskset.id || definition.tasksetRelease.contentHash !== taskset.contentHash) {
95
+ throw new Error("Profile evaluation Taskset differs from its pinned definition.");
96
+ }
97
+ if (definition.split === "train")
98
+ throw new Error("Profile evaluation cannot execute training cases.");
99
+ const tasks = new Map(taskset.tasks.map((task) => [task.id, task]));
100
+ if (definition.taskIds.some((id) => tasks.get(id)?.split !== definition.split)) {
101
+ throw new Error("Profile evaluation case is absent from its declared Taskset split.");
102
+ }
103
+ const expected = new Set(definition.taskIds.flatMap((taskId) => definition.seeds.map((seed) => JSON.stringify([taskId, seed]))));
104
+ const actual = new Set(manifest.population.map(({ taskId, seed }) => JSON.stringify([taskId, seed])));
105
+ if (manifest.population.some((member) => member.fixtureId !== null)
106
+ || actual.size !== expected.size || manifest.population.length !== expected.size
107
+ || [...actual].some((member) => !expected.has(member))) {
108
+ throw new Error("Profile evaluation population differs from its declared cases and seeds.");
109
+ }
110
+ }
71
111
  /** Complete runs cannot drop failed members, add convenient attempts or relabel
72
112
  * another task/seed's evidence. Ordering is always the admitted population's. */
73
113
  export function orderTasksetRunReceipts(manifest, receipts) {
@@ -12,6 +12,9 @@ export * from "./metrics.js";
12
12
  export * from "./taskset-run-contract.js";
13
13
  export * from "./model-improvement-qualification.js";
14
14
  export * from "./preferences.js";
15
+ export * from "./profile-evaluations.js";
16
+ export * from "./profile-evaluation-comparisons.js";
17
+ export * from "./profile-evaluation-execution.js";
15
18
  export * from "./review-conformance.js";
16
19
  export * from "./rollouts.js";
17
20
  export * from "./telemetry.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,135 @@
1
+ import { z } from "zod";
2
+ import { type TasksetMetricResult } from "./metric-policy.js";
3
+ import { type TasksetRunManifest } from "./taskset-run-contract.js";
4
+ export declare const ProfileEvaluationComparisonContentSchema: z.ZodObject<{
5
+ schemaVersion: z.ZodLiteral<"openpond.profileEvaluationComparison.v1">;
6
+ id: z.ZodString;
7
+ tasksetRelease: z.ZodObject<{
8
+ id: z.ZodString;
9
+ contentHash: z.ZodString;
10
+ }, z.core.$strict>;
11
+ populationHash: z.ZodString;
12
+ environmentHash: z.ZodString;
13
+ metricPolicyHash: z.ZodString;
14
+ limitsHash: z.ZodString;
15
+ members: z.ZodArray<z.ZodObject<{
16
+ runManifest: z.ZodObject<{
17
+ id: z.ZodString;
18
+ contentHash: z.ZodString;
19
+ }, z.core.$strict>;
20
+ metricResultHash: z.ZodString;
21
+ source: z.ZodObject<{
22
+ profileId: z.ZodString;
23
+ sourceRevision: z.ZodString;
24
+ harnessRelease: z.ZodObject<{
25
+ id: z.ZodString;
26
+ contentHash: z.ZodString;
27
+ }, z.core.$strict>;
28
+ catalogHash: z.ZodString;
29
+ definitionId: z.ZodString;
30
+ definitionHash: z.ZodString;
31
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
32
+ kind: z.ZodLiteral<"profile">;
33
+ }, z.core.$strict>, z.ZodObject<{
34
+ kind: z.ZodLiteral<"workflow">;
35
+ workflowId: z.ZodString;
36
+ }, z.core.$strict>, z.ZodObject<{
37
+ kind: z.ZodLiteral<"skill">;
38
+ skillPath: z.ZodString;
39
+ }, z.core.$strict>, z.ZodObject<{
40
+ kind: z.ZodLiteral<"agent_action">;
41
+ actionId: z.ZodString;
42
+ }, z.core.$strict>], "kind">;
43
+ environmentHash: z.ZodString;
44
+ }, z.core.$strict>;
45
+ policy: z.ZodDiscriminatedUnion<[z.ZodObject<{
46
+ kind: z.ZodLiteral<"model">;
47
+ model: z.ZodObject<{
48
+ provider: z.ZodString;
49
+ model: z.ZodString;
50
+ revision: z.ZodDefault<z.ZodNullable<z.ZodString>>;
51
+ artifactHash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
52
+ tokenizerRevision: z.ZodDefault<z.ZodNullable<z.ZodString>>;
53
+ chatTemplateHash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
54
+ }, z.core.$strict>;
55
+ configurationHash: z.ZodString;
56
+ }, z.core.$strict>, z.ZodObject<{
57
+ kind: z.ZodLiteral<"fixture">;
58
+ }, z.core.$strict>], "kind">;
59
+ score: z.ZodNullable<z.ZodNumber>;
60
+ }, z.core.$strict>>;
61
+ createdAt: z.ZodString;
62
+ }, z.core.$strict>;
63
+ export declare const ProfileEvaluationComparisonSchema: z.ZodObject<{
64
+ schemaVersion: z.ZodLiteral<"openpond.profileEvaluationComparison.v1">;
65
+ id: z.ZodString;
66
+ tasksetRelease: z.ZodObject<{
67
+ id: z.ZodString;
68
+ contentHash: z.ZodString;
69
+ }, z.core.$strict>;
70
+ populationHash: z.ZodString;
71
+ environmentHash: z.ZodString;
72
+ metricPolicyHash: z.ZodString;
73
+ limitsHash: z.ZodString;
74
+ members: z.ZodArray<z.ZodObject<{
75
+ runManifest: z.ZodObject<{
76
+ id: z.ZodString;
77
+ contentHash: z.ZodString;
78
+ }, z.core.$strict>;
79
+ metricResultHash: z.ZodString;
80
+ source: z.ZodObject<{
81
+ profileId: z.ZodString;
82
+ sourceRevision: z.ZodString;
83
+ harnessRelease: z.ZodObject<{
84
+ id: z.ZodString;
85
+ contentHash: z.ZodString;
86
+ }, z.core.$strict>;
87
+ catalogHash: z.ZodString;
88
+ definitionId: z.ZodString;
89
+ definitionHash: z.ZodString;
90
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
91
+ kind: z.ZodLiteral<"profile">;
92
+ }, z.core.$strict>, z.ZodObject<{
93
+ kind: z.ZodLiteral<"workflow">;
94
+ workflowId: z.ZodString;
95
+ }, z.core.$strict>, z.ZodObject<{
96
+ kind: z.ZodLiteral<"skill">;
97
+ skillPath: z.ZodString;
98
+ }, z.core.$strict>, z.ZodObject<{
99
+ kind: z.ZodLiteral<"agent_action">;
100
+ actionId: z.ZodString;
101
+ }, z.core.$strict>], "kind">;
102
+ environmentHash: z.ZodString;
103
+ }, z.core.$strict>;
104
+ policy: z.ZodDiscriminatedUnion<[z.ZodObject<{
105
+ kind: z.ZodLiteral<"model">;
106
+ model: z.ZodObject<{
107
+ provider: z.ZodString;
108
+ model: z.ZodString;
109
+ revision: z.ZodDefault<z.ZodNullable<z.ZodString>>;
110
+ artifactHash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
111
+ tokenizerRevision: z.ZodDefault<z.ZodNullable<z.ZodString>>;
112
+ chatTemplateHash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
113
+ }, z.core.$strict>;
114
+ configurationHash: z.ZodString;
115
+ }, z.core.$strict>, z.ZodObject<{
116
+ kind: z.ZodLiteral<"fixture">;
117
+ }, z.core.$strict>], "kind">;
118
+ score: z.ZodNullable<z.ZodNumber>;
119
+ }, z.core.$strict>>;
120
+ createdAt: z.ZodString;
121
+ contentHash: z.ZodString;
122
+ }, z.core.$strict>;
123
+ export type ProfileEvaluationComparison = z.infer<typeof ProfileEvaluationComparisonSchema>;
124
+ /** Comparison membership is immutable and refers to existing run evidence.
125
+ * The same Taskset, population, environment, metric and limits are required;
126
+ * model and released Profile source may vary independently. */
127
+ export declare function createProfileEvaluationComparison(input: {
128
+ id: string;
129
+ members: Array<{
130
+ manifest: TasksetRunManifest;
131
+ result: TasksetMetricResult;
132
+ }>;
133
+ createdAt: string;
134
+ }): ProfileEvaluationComparison;
135
+ //# sourceMappingURL=profile-evaluation-comparisons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-evaluation-comparisons.d.ts","sourceRoot":"","sources":["../../../../src/profile-evaluation-comparisons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzF,OAAO,EAA4B,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE9F,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgB1C,CAAC;AACZ,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAEnC,CAAC;AACZ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F;;+DAE+D;AAC/D,wBAAgB,iCAAiC,CAAC,KAAK,EAAE;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,kBAAkB,CAAC;QAAC,MAAM,EAAE,mBAAmB,CAAA;KAAE,CAAC,CAAC;IAC9E,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,2BAA2B,CAuD9B"}
@@ -0,0 +1,46 @@
1
+ import { type ImmutableArtifactRef } from "@openpond/harness";
2
+ import { type AttemptEvidence, type CustomVerifierRunner, type ModelJudgeRunner, type TaskGrade } from "./graders.js";
3
+ import { type TasksetMetricExecutor, type TasksetMetricResult } from "./metrics.js";
4
+ import { type AttemptReceipt } from "./runs.js";
5
+ import { type TasksetRunManifest } from "./taskset-run-contract.js";
6
+ import { policyTaskView, type TasksetRelease } from "./tasksets.js";
7
+ import type { ProfileEvaluationCatalog, ProfileEvaluationRunSource } from "./profile-evaluations.js";
8
+ type PolicyTask = ReturnType<typeof policyTaskView>;
9
+ /** The installation owns execution, tools, approvals and storage. This runner
10
+ * owns frozen population dispatch and private grading for both Desktop and web. */
11
+ export declare function executeProfileEvaluationRun(input: {
12
+ manifest: TasksetRunManifest;
13
+ taskset: TasksetRelease;
14
+ catalog: ProfileEvaluationCatalog;
15
+ execute: (member: {
16
+ task: PolicyTask;
17
+ seed: string;
18
+ source: ProfileEvaluationRunSource;
19
+ signal?: AbortSignal;
20
+ }) => Promise<{
21
+ evidence: AttemptEvidence;
22
+ traceHash: string;
23
+ artifactRefs: ImmutableArtifactRef[];
24
+ startedAt: string;
25
+ completedAt: string;
26
+ latencyMs: number;
27
+ costUsd: number | null;
28
+ terminal: boolean;
29
+ failureClass?: AttemptReceipt["failureClass"];
30
+ }>;
31
+ saveGrade: (grade: TaskGrade) => Promise<ImmutableArtifactRef>;
32
+ saveReceipt: (receipt: AttemptReceipt) => Promise<void>;
33
+ modelJudge?: ModelJudgeRunner;
34
+ customVerifier?: CustomVerifierRunner;
35
+ metricSource?: string;
36
+ metricExecutor?: TasksetMetricExecutor;
37
+ signal?: AbortSignal;
38
+ }): Promise<{
39
+ receipts: AttemptReceipt[];
40
+ grades: TaskGrade[];
41
+ metric: TasksetMetricResult;
42
+ passRate: number;
43
+ passed: boolean;
44
+ }>;
45
+ export {};
46
+ //# sourceMappingURL=profile-evaluation-execution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-evaluation-execution.d.ts","sourceRoot":"","sources":["../../../../src/profile-evaluation-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,oBAAoB,EAA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C,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC/D,WAAW,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,YAAY,CAAC,EAAE,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,CAkED"}
@@ -0,0 +1,176 @@
1
+ import { z } from "zod";
2
+ import { type AgentSnapshot, type HarnessRelease } from "@openpond/harness";
3
+ /** Portable selection only. Taskset releases own task data and graders; run
4
+ * manifests and evidence stay in the installation's evaluation store. */
5
+ export declare const ProfileEvaluationTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6
+ kind: z.ZodLiteral<"profile">;
7
+ }, z.core.$strict>, z.ZodObject<{
8
+ kind: z.ZodLiteral<"workflow">;
9
+ workflowId: z.ZodString;
10
+ }, z.core.$strict>, z.ZodObject<{
11
+ kind: z.ZodLiteral<"skill">;
12
+ skillPath: z.ZodString;
13
+ }, z.core.$strict>, z.ZodObject<{
14
+ kind: z.ZodLiteral<"agent_action">;
15
+ actionId: z.ZodString;
16
+ }, z.core.$strict>], "kind">;
17
+ export declare const ProfileEvaluationDefinitionSchema: z.ZodObject<{
18
+ id: z.ZodString;
19
+ label: z.ZodString;
20
+ description: z.ZodString;
21
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
22
+ kind: z.ZodLiteral<"profile">;
23
+ }, z.core.$strict>, z.ZodObject<{
24
+ kind: z.ZodLiteral<"workflow">;
25
+ workflowId: z.ZodString;
26
+ }, z.core.$strict>, z.ZodObject<{
27
+ kind: z.ZodLiteral<"skill">;
28
+ skillPath: z.ZodString;
29
+ }, z.core.$strict>, z.ZodObject<{
30
+ kind: z.ZodLiteral<"agent_action">;
31
+ actionId: z.ZodString;
32
+ }, z.core.$strict>], "kind">;
33
+ tasksetRelease: z.ZodObject<{
34
+ id: z.ZodString;
35
+ contentHash: z.ZodString;
36
+ }, z.core.$strict>;
37
+ split: z.ZodEnum<{
38
+ train: "train";
39
+ validation: "validation";
40
+ test: "test";
41
+ frozen_eval: "frozen_eval";
42
+ }>;
43
+ taskIds: z.ZodArray<z.ZodString>;
44
+ seeds: z.ZodArray<z.ZodString>;
45
+ criterion: z.ZodObject<{
46
+ minimumPassRate: z.ZodNumber;
47
+ requireComplete: z.ZodBoolean;
48
+ }, z.core.$strict>;
49
+ }, z.core.$strict>;
50
+ export declare const ProfileEvaluationSuiteSchema: z.ZodObject<{
51
+ id: z.ZodString;
52
+ label: z.ZodString;
53
+ scope: z.ZodEnum<{
54
+ profile: "profile";
55
+ component: "component";
56
+ }>;
57
+ definitionIds: z.ZodArray<z.ZodString>;
58
+ }, z.core.$strict>;
59
+ export declare const ProfileEvaluationCatalogSchema: z.ZodObject<{
60
+ schemaVersion: z.ZodLiteral<"openpond.profileEvaluations.v1">;
61
+ definitions: z.ZodArray<z.ZodObject<{
62
+ id: z.ZodString;
63
+ label: z.ZodString;
64
+ description: z.ZodString;
65
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
66
+ kind: z.ZodLiteral<"profile">;
67
+ }, z.core.$strict>, z.ZodObject<{
68
+ kind: z.ZodLiteral<"workflow">;
69
+ workflowId: z.ZodString;
70
+ }, z.core.$strict>, z.ZodObject<{
71
+ kind: z.ZodLiteral<"skill">;
72
+ skillPath: z.ZodString;
73
+ }, z.core.$strict>, z.ZodObject<{
74
+ kind: z.ZodLiteral<"agent_action">;
75
+ actionId: z.ZodString;
76
+ }, z.core.$strict>], "kind">;
77
+ tasksetRelease: z.ZodObject<{
78
+ id: z.ZodString;
79
+ contentHash: z.ZodString;
80
+ }, z.core.$strict>;
81
+ split: z.ZodEnum<{
82
+ train: "train";
83
+ validation: "validation";
84
+ test: "test";
85
+ frozen_eval: "frozen_eval";
86
+ }>;
87
+ taskIds: z.ZodArray<z.ZodString>;
88
+ seeds: z.ZodArray<z.ZodString>;
89
+ criterion: z.ZodObject<{
90
+ minimumPassRate: z.ZodNumber;
91
+ requireComplete: z.ZodBoolean;
92
+ }, z.core.$strict>;
93
+ }, z.core.$strict>>;
94
+ suites: z.ZodArray<z.ZodObject<{
95
+ id: z.ZodString;
96
+ label: z.ZodString;
97
+ scope: z.ZodEnum<{
98
+ profile: "profile";
99
+ component: "component";
100
+ }>;
101
+ definitionIds: z.ZodArray<z.ZodString>;
102
+ }, z.core.$strict>>;
103
+ }, z.core.$strict>;
104
+ export type ProfileEvaluationCatalog = z.infer<typeof ProfileEvaluationCatalogSchema>;
105
+ export type ProfileEvaluationDefinition = z.infer<typeof ProfileEvaluationDefinitionSchema>;
106
+ /** Added to a Taskset run manifest only when a Profile component supplies the
107
+ * candidate behavior. It does not change the Taskset's frozen cases/graders. */
108
+ export declare const ProfileEvaluationRunSourceSchema: z.ZodObject<{
109
+ profileId: z.ZodString;
110
+ sourceRevision: z.ZodString;
111
+ harnessRelease: z.ZodObject<{
112
+ id: z.ZodString;
113
+ contentHash: z.ZodString;
114
+ }, z.core.$strict>;
115
+ catalogHash: z.ZodString;
116
+ definitionId: z.ZodString;
117
+ definitionHash: z.ZodString;
118
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
119
+ kind: z.ZodLiteral<"profile">;
120
+ }, z.core.$strict>, z.ZodObject<{
121
+ kind: z.ZodLiteral<"workflow">;
122
+ workflowId: z.ZodString;
123
+ }, z.core.$strict>, z.ZodObject<{
124
+ kind: z.ZodLiteral<"skill">;
125
+ skillPath: z.ZodString;
126
+ }, z.core.$strict>, z.ZodObject<{
127
+ kind: z.ZodLiteral<"agent_action">;
128
+ actionId: z.ZodString;
129
+ }, z.core.$strict>], "kind">;
130
+ environmentHash: z.ZodString;
131
+ }, z.core.$strict>;
132
+ export type ProfileEvaluationRunSource = z.infer<typeof ProfileEvaluationRunSourceSchema>;
133
+ /** Validate component and suite references against the same Profile release. */
134
+ export declare function validateProfileEvaluationCatalog(input: {
135
+ catalog: unknown;
136
+ workflowIds: ReadonlySet<string>;
137
+ skillPaths: ReadonlySet<string>;
138
+ actionIds: ReadonlySet<string>;
139
+ }): {
140
+ catalog: ProfileEvaluationCatalog;
141
+ contentHash: string;
142
+ };
143
+ export declare function resolveProfileEvaluationRunSource(input: {
144
+ catalog: ProfileEvaluationCatalog;
145
+ definitionId: string;
146
+ profileId: string;
147
+ sourceRevision: string;
148
+ harnessRelease: {
149
+ id: string;
150
+ contentHash: string;
151
+ };
152
+ environmentHash: string;
153
+ }): ProfileEvaluationRunSource;
154
+ /** Evaluation definitions are read from the verifier-only bytes of an exact
155
+ * released source package. The caller must never forward this asset to the
156
+ * model-visible policy surface. */
157
+ export declare function loadReleasedProfileEvaluationCatalog(value: unknown): {
158
+ catalog: ProfileEvaluationCatalog;
159
+ catalogHash: string;
160
+ harnessRelease: {
161
+ id: string;
162
+ contentHash: string;
163
+ };
164
+ };
165
+ /** For a local release whose caller already verified its full file inventory. */
166
+ export declare function loadReleasedProfileEvaluationCatalogAssets(input: {
167
+ agentSnapshot: AgentSnapshot;
168
+ harnessRelease: HarnessRelease;
169
+ catalogBytes?: Uint8Array;
170
+ workflowBytes?: Uint8Array;
171
+ actionBytes?: Uint8Array;
172
+ }): {
173
+ catalog: ProfileEvaluationCatalog;
174
+ catalogHash: string;
175
+ };
176
+ //# sourceMappingURL=profile-evaluations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-evaluations.d.ts","sourceRoot":"","sources":["../../../../src/profile-evaluations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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E,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,0BAA0B,CAc7B;AAED;;mCAEmC;AACnC,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,OAAO,GAAG;IACpE,OAAO,EAAE,wBAAwB,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;CACrD,CAaA;AAED,iFAAiF;AACjF,wBAAgB,0CAA0C,CAAC,KAAK,EAAE;IAChE,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B,GAAG;IAAE,OAAO,EAAE,wBAAwB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAqB7D"}
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { type AttemptReceipt } from "./runs.js";
3
3
  import { type TasksetMetricPolicy } from "./metric-policy.js";
4
+ import { type ProfileEvaluationCatalog } from "./profile-evaluations.js";
4
5
  import { type TasksetRelease } from "./tasksets.js";
5
6
  /** A fixture check owns no model identity and cannot become a model evaluation. */
6
7
  export declare const TasksetRunPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -67,6 +68,30 @@ export declare const TasksetRunManifestContentSchema: z.ZodObject<{
67
68
  contentHash: z.ZodString;
68
69
  }, z.core.$strict>;
69
70
  }, z.core.$strict>], "kind">;
71
+ profileEvaluation: z.ZodOptional<z.ZodObject<{
72
+ profileId: z.ZodString;
73
+ sourceRevision: z.ZodString;
74
+ harnessRelease: z.ZodObject<{
75
+ id: z.ZodString;
76
+ contentHash: z.ZodString;
77
+ }, z.core.$strict>;
78
+ catalogHash: z.ZodString;
79
+ definitionId: z.ZodString;
80
+ definitionHash: z.ZodString;
81
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
82
+ kind: z.ZodLiteral<"profile">;
83
+ }, z.core.$strict>, z.ZodObject<{
84
+ kind: z.ZodLiteral<"workflow">;
85
+ workflowId: z.ZodString;
86
+ }, z.core.$strict>, z.ZodObject<{
87
+ kind: z.ZodLiteral<"skill">;
88
+ skillPath: z.ZodString;
89
+ }, z.core.$strict>, z.ZodObject<{
90
+ kind: z.ZodLiteral<"agent_action">;
91
+ actionId: z.ZodString;
92
+ }, z.core.$strict>], "kind">;
93
+ environmentHash: z.ZodString;
94
+ }, z.core.$strict>>;
70
95
  policy: z.ZodDiscriminatedUnion<[z.ZodObject<{
71
96
  kind: z.ZodLiteral<"model">;
72
97
  model: z.ZodObject<{
@@ -156,6 +181,30 @@ export declare const TasksetRunManifestSchema: z.ZodObject<{
156
181
  contentHash: z.ZodString;
157
182
  }, z.core.$strict>;
158
183
  }, z.core.$strict>], "kind">;
184
+ profileEvaluation: z.ZodOptional<z.ZodObject<{
185
+ profileId: z.ZodString;
186
+ sourceRevision: z.ZodString;
187
+ harnessRelease: z.ZodObject<{
188
+ id: z.ZodString;
189
+ contentHash: z.ZodString;
190
+ }, z.core.$strict>;
191
+ catalogHash: z.ZodString;
192
+ definitionId: z.ZodString;
193
+ definitionHash: z.ZodString;
194
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
195
+ kind: z.ZodLiteral<"profile">;
196
+ }, z.core.$strict>, z.ZodObject<{
197
+ kind: z.ZodLiteral<"workflow">;
198
+ workflowId: z.ZodString;
199
+ }, z.core.$strict>, z.ZodObject<{
200
+ kind: z.ZodLiteral<"skill">;
201
+ skillPath: z.ZodString;
202
+ }, z.core.$strict>, z.ZodObject<{
203
+ kind: z.ZodLiteral<"agent_action">;
204
+ actionId: z.ZodString;
205
+ }, z.core.$strict>], "kind">;
206
+ environmentHash: z.ZodString;
207
+ }, z.core.$strict>>;
159
208
  policy: z.ZodDiscriminatedUnion<[z.ZodObject<{
160
209
  kind: z.ZodLiteral<"model">;
161
210
  model: z.ZodObject<{
@@ -226,6 +275,9 @@ export declare function tasksetRunMetricPolicy(taskset: TasksetRelease): Taskset
226
275
  /** Admission verifies this before dispatch. Package byte verification belongs
227
276
  * to the package loader; this validates the release and population semantics. */
228
277
  export declare function assertTasksetRunRelease(manifest: TasksetRunManifest, taskset: TasksetRelease): void;
278
+ /** Resolve the verifier-only definition before dispatch. A Profile run must
279
+ * evaluate exactly its declared frozen cases and seeds through its release. */
280
+ export declare function assertProfileEvaluationRunAdmission(manifest: TasksetRunManifest, taskset: TasksetRelease, catalogInput: ProfileEvaluationCatalog): void;
229
281
  /** Complete runs cannot drop failed members, add convenient attempts or relabel
230
282
  * another task/seed's evidence. Ordering is always the admitted population's. */
231
283
  export declare function orderTasksetRunReceipts(manifest: TasksetRunManifest, receipts: AttemptReceipt[]): AttemptReceipt[];
@@ -1 +1 @@
1
- {"version":3,"file":"taskset-run-contract.d.ts","sourceRoot":"","sources":["../../../../src/taskset-run-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAqE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AACnH,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE1E,mFAAmF;AACnF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;4BAGjC,CAAC;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;4BAGpC,CAAC;AACH,eAAO,MAAM,sBAAsB;;;;;kBAKxB,CAAC;AAEZ,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuB1C,CAAC;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAiF,CAAC;AACvH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,GAAG,kBAAkB,CAGnH;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,cAAc,GAAG,mBAAmB,CAKnF;AAED;iFACiF;AACjF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CAcnG;AAED;+EAC+E;AAC/E,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,wBAAwB,GACrC,IAAI,CA4BN;AAED;iFACiF;AACjF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAclH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpond/evals",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
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",
@@ -158,7 +158,7 @@
158
158
  "zod": "^4.1.13"
159
159
  },
160
160
  "peerDependencies": {
161
- "@openpond/harness": "^0.2.0 || ^0.3.0"
161
+ "@openpond/harness": "^0.4.0"
162
162
  },
163
163
  "devDependencies": {
164
164
  "@openpond/harness": "workspace:*",