@openpond/evals 0.10.4 → 0.10.5

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/LEARNING.md CHANGED
@@ -232,6 +232,23 @@ owns it. Duplicate observations are idempotent, older decision revisions cannot
232
232
  overwrite newer ones, and contradictory observations at the same revision fail.
233
233
  This operation does not change the training parent or activate serving.
234
234
 
235
+ ### Policy readiness reads
236
+
237
+ `client.inspectPolicy({ id, revision, contentHash })` sends the read payload
238
+ `{ "action": "inspect_policy", "scope": "<profile-or-team>", "policy": { "id": "...", "revision": 1, "contentHash": "..." } }`.
239
+ The authenticated owner reads a scope-serialized snapshot of the current policy's
240
+ eligible, awaiting-review, excluded and consumed counts, chain identity, cooldown
241
+ and daily budget. It uses the same eligibility, complete batch validation and
242
+ budget accounting as manual or scheduled reservation. A stale policy reference is
243
+ rejected; source-only credentials cannot read it.
244
+
245
+ `canReserve` describes shared reservation readiness at `inspectedAt`. The actual
246
+ command rechecks current state and execution-owner preparation still validates
247
+ its training configuration. `blockers` explains unmet constraints. `counts: null`
248
+ means inspection could not count valid sources or supported admission, not that
249
+ the backlog is empty. Reads never write an iteration, timer fire, family
250
+ reservation, batch, consumption or operation record and never launch training.
251
+
235
252
  ### Durable learning schedules
236
253
 
237
254
  Policy publication atomically synchronizes a `schedule` resource. Enabling
@@ -4,6 +4,17 @@ import { learningRef, sameLearningRef } from "./contracts.js";
4
4
  import { LearningDomainError } from "./errors.js";
5
5
  import { requireLearningRelease, requireLearningResource } from "./repository.js";
6
6
  export async function sealLearningBatch(transaction, input, actorId, timestamp) {
7
+ const { batch, release, evidence, definition } = await prepareLearningBatch(transaction, input, actorId, timestamp);
8
+ for (const item of evidence) {
9
+ for (const reservation of taskFamilyReservations(item, definition))
10
+ await transaction.reserveFamilySplit(reservation.namespace, reservation.kind, reservation.key, reservation.split);
11
+ }
12
+ await transaction.put("batch", batch, 0, { parentId: definition.id });
13
+ await transaction.put("package", release, 0, { parentId: batch.id });
14
+ return [pointer("batch", batch), pointer("package", release)];
15
+ }
16
+ /** Performs the complete shared validation without reserving families or publishing resources. */
17
+ export async function prepareLearningBatch(transaction, input, actorId, timestamp) {
7
18
  const definition = await requireLearningRelease(transaction, "definition", input.taskDefinition);
8
19
  const binding = await requireLearningRelease(transaction, "binding", definition.rewardBinding);
9
20
  const rewards = await Promise.all(binding.sources.map((source) => requireLearningRelease(transaction, "reward", source.reward)));
@@ -26,13 +37,7 @@ export async function sealLearningBatch(transaction, input, actorId, timestamp)
26
37
  }
27
38
  const batch = sealTaskBatch({ id: input.batchId, definition, binding, rewards, purpose: input.purpose, evidence, decisions, priorSplits, actorId, now: timestamp });
28
39
  const release = compileTaskBatch({ batch, definition, binding, rewards, evidence, decisions });
29
- for (const item of evidence) {
30
- for (const reservation of taskFamilyReservations(item, definition))
31
- await transaction.reserveFamilySplit(reservation.namespace, reservation.kind, reservation.key, reservation.split);
32
- }
33
- await transaction.put("batch", batch, 0, { parentId: definition.id });
34
- await transaction.put("package", release, 0, { parentId: batch.id });
35
- return [pointer("batch", batch), pointer("package", release)];
40
+ return { batch, release, evidence, definition };
36
41
  }
37
42
  export async function requireCurrentLearningEvidence(transaction, ref) {
38
43
  const evidence = await requireLearningRelease(transaction, "evidence", ref);
@@ -19,3 +19,4 @@ export * from "./iteration-candidate-decision.js";
19
19
  export * from "./schedule-contracts.js";
20
20
  export * from "./schedule-service.js";
21
21
  export * from "./schedule-worker.js";
22
+ export * from "./policy-inspection.js";
@@ -0,0 +1,17 @@
1
+ /** Outstanding reservations survive midnight; settled spend belongs to its UTC day. */
2
+ export async function readLearningIterationBudget(transaction, chainId, now) {
3
+ const day = new Date(now).toISOString().slice(0, 10);
4
+ let reservedSpendUsd = 0;
5
+ let settledSpendUsd = 0;
6
+ let afterId;
7
+ do {
8
+ const page = await transaction.list("reservation", { parentId: chainId, limit: 100, ...(afterId ? { afterId } : {}) });
9
+ for (const { budget } of page.items) {
10
+ reservedSpendUsd += budget.reservedSpendUsd;
11
+ if (budget.settledAt && new Date(budget.settledAt).toISOString().slice(0, 10) === day)
12
+ settledSpendUsd += budget.settledSpendUsd;
13
+ }
14
+ afterId = page.nextCursor ?? undefined;
15
+ } while (afterId);
16
+ return { reservedSpendUsd, settledSpendUsd, committedSpendUsd: reservedSpendUsd + settledSpendUsd };
17
+ }
@@ -3,6 +3,7 @@ import { sealLearningBatch } from "./batch-service.js";
3
3
  import { LearningIterationSchema, learningRef, sameLearningRef } from "./contracts.js";
4
4
  import { LearningDomainError } from "./errors.js";
5
5
  import { inspectIterationEligibility, learningChainId, learningConsumptionId } from "./iteration-eligibility.js";
6
+ import { readLearningIterationBudget } from "./iteration-budget.js";
6
7
  import { LearningChainSchema, LearningConsumptionSchema, LearningIterationReservationSchema } from "./iteration-reservation-contracts.js";
7
8
  import { requireLearningRelease, requireLearningResource } from "./repository.js";
8
9
  /** The caller owns one scope-serialized transaction. This never submits a Job. */
@@ -89,18 +90,7 @@ export async function reserveLearningIteration(transaction, input, actorId, now)
89
90
  return [{ kind: "iteration", id, revision: 1 }, { kind: "reservation", id, revision: 1 }, ...pointers];
90
91
  }
91
92
  async function assertAvailableBudget(transaction, chainId, now, requested, maximum) {
92
- let committed = 0;
93
- let afterId;
94
- do {
95
- const page = await transaction.list("reservation", { parentId: chainId, limit: 100, ...(afterId ? { afterId } : {}) });
96
- for (const { budget } of page.items) {
97
- // Unsettled reservations carry across midnight and worker restarts.
98
- committed += budget.reservedSpendUsd;
99
- if (budget.settledAt && new Date(budget.settledAt).toISOString().slice(0, 10) === new Date(now).toISOString().slice(0, 10))
100
- committed += budget.settledSpendUsd;
101
- }
102
- afterId = page.nextCursor ?? undefined;
103
- } while (afterId);
104
- if (committed + requested > maximum)
93
+ const budget = await readLearningIterationBudget(transaction, chainId, now);
94
+ if (budget.committedSpendUsd + requested > maximum)
105
95
  throw new LearningDomainError("learning_daily_budget_exhausted", 409);
106
96
  }
@@ -0,0 +1,82 @@
1
+ import { ReleaseIdSchema, ReleaseTimestampSchema } from "@openpond/harness";
2
+ import { z } from "zod";
3
+ import { LearningRevisionRefSchema, learningRef, sameLearningRef } from "./contracts.js";
4
+ import { prepareLearningBatch } from "./batch-service.js";
5
+ import { LearningDomainError } from "./errors.js";
6
+ import { readLearningIterationBudget } from "./iteration-budget.js";
7
+ import { inspectIterationEligibility, learningChainId } from "./iteration-eligibility.js";
8
+ import { LearningChainSchema, LearningEligibilityCountsSchema } from "./iteration-reservation-contracts.js";
9
+ import { requireLearningRelease, requireLearningResource } from "./repository.js";
10
+ /** A scope-serialized snapshot of shared reservation readiness, not a Job guarantee.
11
+ * No iteration, timer, batch, consumption or operation record is written. */
12
+ export const LearningPolicyInspectionResultSchema = z.object({
13
+ policy: LearningRevisionRefSchema,
14
+ modelProjectId: ReleaseIdSchema,
15
+ inspectedAt: ReleaseTimestampSchema,
16
+ chain: LearningChainSchema.nullable(),
17
+ counts: LearningEligibilityCountsSchema.nullable(),
18
+ minimumApprovedExamples: z.number().int().positive(),
19
+ canReserve: z.boolean(),
20
+ blockers: z.array(z.object({ code: z.string().min(1).max(200), message: z.string().min(1).max(20_000) }).strict()).max(20),
21
+ cooldownUntil: ReleaseTimestampSchema.nullable(),
22
+ budget: z.object({
23
+ reservedSpendUsd: z.number().nonnegative(), settledSpendUsd: z.number().nonnegative(), committedSpendUsd: z.number().nonnegative(),
24
+ maximumIterationSpendUsd: z.number().nonnegative(), maximumDailySpendUsd: z.number().nonnegative(),
25
+ }).strict(),
26
+ }).strict();
27
+ export async function inspectLearningPolicy(transaction, reference, actorId, now) {
28
+ const policy = await requireLearningRelease(transaction, "policy", reference);
29
+ const current = await requireLearningResource(transaction, "policy", policy.id);
30
+ if (!sameLearningRef(learningRef(current), reference))
31
+ throw new LearningDomainError("learning_policy_revision_stale", 409);
32
+ const chainId = learningChainId(policy.modelProjectId);
33
+ const chain = await transaction.get("chain", chainId);
34
+ const budget = await readLearningIterationBudget(transaction, chainId, now);
35
+ const blockers = [];
36
+ const block = (code, message) => { blockers.push({ code, message }); };
37
+ if (!policy.enabled)
38
+ block("learning_policy_paused", "Learning is paused.");
39
+ if (policy.automation.accept || policy.automation.serve)
40
+ block("learning_automatic_acceptance_not_available", "Candidates require explicit acceptance and serving selection.");
41
+ if (chain?.activeIterationId)
42
+ block("learning_iteration_active", "An iteration is already active.");
43
+ const cooldownUntil = chain?.lastReservedAt && Date.parse(now) - Date.parse(chain.lastReservedAt) < policy.limits.cooldownSeconds * 1_000
44
+ ? new Date(Date.parse(chain.lastReservedAt) + policy.limits.cooldownSeconds * 1_000).toISOString() : null;
45
+ if (cooldownUntil)
46
+ block("learning_iteration_cooldown", "The training cooldown has not elapsed.");
47
+ if (budget.committedSpendUsd + policy.limits.maxIterationSpendUsd > policy.limits.maxDailySpendUsd) {
48
+ block("learning_daily_budget_exhausted", "The daily budget cannot cover another iteration's maximum spend.");
49
+ }
50
+ let counts = null;
51
+ try {
52
+ const eligibility = await inspectIterationEligibility(transaction, policy);
53
+ counts = eligibility.counts;
54
+ if (counts.eligible < policy.admission.minimumApprovedExamples) {
55
+ if (counts.awaitingReview > 0)
56
+ block("learning_waiting_for_review", "More approved tasks are required before training.");
57
+ else
58
+ block("learning_waiting_for_data", "More eligible new tasks are required before training.");
59
+ }
60
+ else {
61
+ await prepareLearningBatch(transaction, {
62
+ action: "seal_batch", operationId: "policy-inspection", batchId: "policy-inspection",
63
+ taskDefinition: policy.taskDefinition, purpose: eligibility.purpose,
64
+ evidence: eligibility.selected.map(item => learningRef(item.evidence)),
65
+ decisions: eligibility.selected.map(item => learningRef(item.decision)),
66
+ }, actorId, now);
67
+ }
68
+ }
69
+ catch (error) {
70
+ if (!(error instanceof LearningDomainError))
71
+ throw error;
72
+ // An unavailable count is not zero. Invalid sources or unsupported admission
73
+ // must remain visible while the Model's settings and history can still load.
74
+ block(error.code, error.message.slice(0, 20_000));
75
+ }
76
+ return LearningPolicyInspectionResultSchema.parse({
77
+ policy: learningRef(policy), modelProjectId: policy.modelProjectId, inspectedAt: now, chain,
78
+ counts, minimumApprovedExamples: policy.admission.minimumApprovedExamples, canReserve: blockers.length === 0,
79
+ blockers, cooldownUntil,
80
+ budget: { ...budget, maximumIterationSpendUsd: policy.limits.maxIterationSpendUsd, maximumDailySpendUsd: policy.limits.maxDailySpendUsd },
81
+ });
82
+ }
@@ -2,6 +2,7 @@ import { cancelLearningIterationReservation } from "./iteration-reservation-canc
2
2
  import { commandLearningIterationDispatch } from "./iteration-dispatch-commands.js";
3
3
  import { reserveLearningIteration } from "./iteration-reservation-service.js";
4
4
  import { synchronizeLearningSchedule } from "./schedule-service.js";
5
+ import { inspectLearningPolicy } from "./policy-inspection.js";
5
6
  import { requireCurrentLearningEvidence as currentEvidence, sealLearningBatch } from "./batch-service.js";
6
7
  import { saveAuthoringDraft, archiveAuthoringDraft, finalizeAuthoringDraft } from "./authoring-service.js";
7
8
  import { queueRewardCheck, cancelRewardCheck } from "./reward-check-service.js";
@@ -327,6 +328,11 @@ export function createLearningService(repository, options = {}) {
327
328
  }
328
329
  return {
329
330
  command,
331
+ async inspectPolicy(context, reference) {
332
+ authorizeRead(context);
333
+ const ref = LearningRevisionRefSchema.parse(reference);
334
+ return repository.transaction(context.scope, transaction => inspectLearningPolicy(transaction, ref, context.actor.id, now()));
335
+ },
330
336
  async inspectEvidence(context, reference) {
331
337
  authorizeRead(context);
332
338
  const ref = LearningRevisionRefSchema.parse(reference);
@@ -17,6 +17,7 @@ export function assertLearningRequestJson(raw) {
17
17
  /** Scope selection is never authorization; each host resolves its authenticated owner. */
18
18
  export const LearningCommandRequestSchema = z.object({ scope: ReleaseIdSchema, command: LearningCommandSchema }).strict();
19
19
  export const LearningReadRequestSchema = z.discriminatedUnion("action", [
20
+ z.object({ action: z.literal("inspect_policy"), scope: ReleaseIdSchema, policy: LearningRevisionRefSchema }).strict(),
20
21
  z.object({ action: z.literal("inspect_evidence"), scope: ReleaseIdSchema, evidence: LearningRevisionRefSchema }).strict(),
21
22
  z.object({ action: z.literal("get"), scope: ReleaseIdSchema, kind: LearningResourceKindSchema, id: ReleaseIdSchema, revision: z.number().int().positive().optional() }).strict(),
22
23
  z.object({ action: z.literal("list"), scope: ReleaseIdSchema, kind: LearningResourceKindSchema, parentId: ReleaseIdSchema.optional(), status: z.string().min(1).max(200).optional(), afterId: ReleaseIdSchema.optional(), limit: z.number().int().min(1).max(100).default(50) }).strict(),
@@ -4,5 +4,315 @@ import { type LearningResourcePointer, type LearningTransaction } from "./reposi
4
4
  export declare function sealLearningBatch(transaction: LearningTransaction, input: Extract<LearningCommand, {
5
5
  action: "seal_batch";
6
6
  }>, actorId: string, timestamp: string): Promise<LearningResourcePointer[]>;
7
+ /** Performs the complete shared validation without reserving families or publishing resources. */
8
+ export declare function prepareLearningBatch(transaction: LearningTransaction, input: Extract<LearningCommand, {
9
+ action: "seal_batch";
10
+ }>, actorId: string, timestamp: string): Promise<{
11
+ batch: {
12
+ schemaVersion: "openpond.taskBatch.v1";
13
+ id: string;
14
+ revision: 1;
15
+ taskDefinition: {
16
+ id: string;
17
+ contentHash: string;
18
+ revision: number;
19
+ };
20
+ rewardBinding: {
21
+ id: string;
22
+ contentHash: string;
23
+ revision: number;
24
+ };
25
+ purpose: "evaluation" | "supervised_training" | "reward_training";
26
+ examples: {
27
+ evidence: {
28
+ id: string;
29
+ contentHash: string;
30
+ revision: number;
31
+ };
32
+ decision: {
33
+ id: string;
34
+ contentHash: string;
35
+ revision: number;
36
+ };
37
+ familyKey: string;
38
+ inputHash: string;
39
+ split: "train" | "validation" | "test" | "frozen_eval";
40
+ }[];
41
+ sealedAt: string;
42
+ sealedBy: string;
43
+ contentHash: string;
44
+ };
45
+ release: {
46
+ schemaVersion: "openpond.tasksetRelease.v2";
47
+ id: string;
48
+ revision: number;
49
+ policy: {
50
+ policyVisibleFields: string[];
51
+ privilegedFields: string[];
52
+ hiddenGraderRefs: string[];
53
+ connectedAppScopes: string[];
54
+ };
55
+ environment: {
56
+ protocolVersion: "openpond.environment.v1";
57
+ kind: "text" | "agent" | "work" | "custom_program";
58
+ entrypoint: string;
59
+ stateful: boolean;
60
+ deterministicSeeds: boolean;
61
+ lifecycle: ("create" | "reset" | "step" | "collect" | "destroy")[];
62
+ networkPolicy: "none" | "declared_read_only" | "declared_scoped";
63
+ defaultTimeoutMs: number;
64
+ };
65
+ tools: {
66
+ name: string;
67
+ description: string;
68
+ inputSchema: Record<string, unknown>;
69
+ inputSchemaHash: string;
70
+ sideEffect: "read" | "write";
71
+ timeoutMs: number;
72
+ }[];
73
+ capabilities: {
74
+ id: string;
75
+ required: boolean;
76
+ scopes: string[];
77
+ portability: "portable" | "host_adapter" | "local_only" | "hosted_only";
78
+ }[];
79
+ tasks: {
80
+ id: string;
81
+ clusterKey: string;
82
+ split: "train" | "validation" | "test" | "frozen_eval";
83
+ input: Record<string, unknown>;
84
+ expectedOutput: Record<string, unknown> | null;
85
+ policyVisibleContext: Record<string, unknown>;
86
+ privilegedContextRef: string | null;
87
+ artifactRefs: {
88
+ id: string;
89
+ path: string;
90
+ contentHash: string;
91
+ sizeBytes: number;
92
+ mediaType: string;
93
+ visibility: "policy" | "verifier" | "host_private";
94
+ }[];
95
+ tags: string[];
96
+ requiredOutputs?: {
97
+ path: string;
98
+ mediaType: string;
99
+ schemaRef: {
100
+ id: string;
101
+ path: string;
102
+ contentHash: string;
103
+ sizeBytes: number;
104
+ mediaType: string;
105
+ visibility: "policy" | "verifier" | "host_private";
106
+ } | null;
107
+ maxBytes: number | null;
108
+ metadata: Record<string, unknown>;
109
+ }[] | undefined;
110
+ }[];
111
+ graders: ({
112
+ id: string;
113
+ version: string;
114
+ weight: number;
115
+ hardGate: boolean;
116
+ rewardEligible: boolean;
117
+ privileged: boolean;
118
+ kind: "content" | "schema" | "artifact" | "runtime_event" | "state";
119
+ config: Record<string, unknown>;
120
+ } | {
121
+ id: string;
122
+ version: string;
123
+ weight: number;
124
+ hardGate: boolean;
125
+ rewardEligible: boolean;
126
+ privileged: boolean;
127
+ kind: "model_judge";
128
+ rubricRef: {
129
+ id: string;
130
+ path: string;
131
+ contentHash: string;
132
+ sizeBytes: number;
133
+ mediaType: string;
134
+ visibility: "policy" | "verifier" | "host_private";
135
+ };
136
+ calibrationStatus: "pending" | "passed" | "failed";
137
+ model?: {
138
+ providerId: string;
139
+ modelId: string;
140
+ revision: string | null;
141
+ } | undefined;
142
+ temperature?: number | undefined;
143
+ } | {
144
+ id: string;
145
+ version: string;
146
+ weight: number;
147
+ hardGate: boolean;
148
+ rewardEligible: boolean;
149
+ privileged: boolean;
150
+ kind: "custom_verifier";
151
+ verifierRef: {
152
+ id: string;
153
+ path: string;
154
+ contentHash: string;
155
+ sizeBytes: number;
156
+ mediaType: string;
157
+ visibility: "policy" | "verifier" | "host_private";
158
+ };
159
+ timeoutMs: number;
160
+ networkPolicy: "none";
161
+ exportName?: string | undefined;
162
+ } | {
163
+ id: string;
164
+ version: string;
165
+ weight: number;
166
+ hardGate: boolean;
167
+ rewardEligible: boolean;
168
+ privileged: boolean;
169
+ kind: "human";
170
+ rubricRef: {
171
+ id: string;
172
+ path: string;
173
+ contentHash: string;
174
+ sizeBytes: number;
175
+ mediaType: string;
176
+ visibility: "policy" | "verifier" | "host_private";
177
+ };
178
+ reviewerRole: string;
179
+ })[];
180
+ metadata: Record<string, unknown>;
181
+ contentHash: string;
182
+ environmentRelease?: {
183
+ id: string;
184
+ contentHash: string;
185
+ } | undefined;
186
+ verifierSetRelease?: {
187
+ id: string;
188
+ contentHash: string;
189
+ } | undefined;
190
+ metrics?: {
191
+ schemaVersion: "openpond.tasksetMetricPolicy.v1";
192
+ primaryMetric: string;
193
+ aggregation: "mean_score" | "pass_rate" | "weighted_mean" | "custom";
194
+ missingReward: "zero" | "exclude";
195
+ customAggregator: {
196
+ module: string;
197
+ exportName: string;
198
+ contentHash: string;
199
+ timeoutMs: number;
200
+ networkPolicy: "none";
201
+ } | null;
202
+ taskWeights?: Record<string, number> | undefined;
203
+ } | undefined;
204
+ };
205
+ evidence: {
206
+ schemaVersion: "openpond.taskEvidence.v1";
207
+ id: string;
208
+ revision: number;
209
+ source: {
210
+ id: string;
211
+ contentHash: string;
212
+ revision: number;
213
+ };
214
+ submission: {
215
+ schemaVersion: "openpond.taskExample.v1";
216
+ sourceId: string;
217
+ idempotencyKey: string;
218
+ taskDefinition: {
219
+ id: string;
220
+ contentHash: string;
221
+ revision: number;
222
+ };
223
+ exampleId: string;
224
+ attemptId: string;
225
+ occurredAt: string;
226
+ familyKey: string | null;
227
+ split: "train" | "validation" | "test" | "frozen_eval";
228
+ input: Record<string, import("zod").JSONType>;
229
+ observedOutput: Record<string, import("zod").JSONType> | null;
230
+ expected: Record<string, import("zod").JSONType> | null;
231
+ evaluatorContext: Record<string, import("zod").JSONType> | null;
232
+ assets: {
233
+ id: string;
234
+ path: string;
235
+ contentHash: string;
236
+ sizeBytes: number;
237
+ mediaType: string;
238
+ visibility: "policy" | "verifier" | "host_private";
239
+ }[];
240
+ provenance: {
241
+ sourceRecordRef: string | null;
242
+ mappingHash: string | null;
243
+ };
244
+ };
245
+ supersedes: {
246
+ id: string;
247
+ contentHash: string;
248
+ revision: number;
249
+ } | null;
250
+ correctionFeedbackId: string | null;
251
+ receivedAt: string;
252
+ contentHash: string;
253
+ }[];
254
+ definition: {
255
+ schemaVersion: "openpond.taskDefinition.v1";
256
+ id: string;
257
+ revision: number;
258
+ name: string;
259
+ description: string;
260
+ instructions: string;
261
+ category: "custom" | "structured" | "question_answering" | "coding" | "tool_workflow";
262
+ familyNamespace: string;
263
+ inputSchema: Record<string, unknown>;
264
+ outputSchema: Record<string, unknown>;
265
+ rewardBinding: {
266
+ id: string;
267
+ contentHash: string;
268
+ revision: number;
269
+ };
270
+ harness: {
271
+ id: string;
272
+ contentHash: string;
273
+ } | null;
274
+ execution: {
275
+ policy: {
276
+ policyVisibleFields: string[];
277
+ privilegedFields: string[];
278
+ hiddenGraderRefs: string[];
279
+ connectedAppScopes: string[];
280
+ };
281
+ environment: {
282
+ protocolVersion: "openpond.environment.v1";
283
+ kind: "text" | "agent" | "work" | "custom_program";
284
+ entrypoint: string;
285
+ stateful: boolean;
286
+ deterministicSeeds: boolean;
287
+ lifecycle: ("create" | "reset" | "step" | "collect" | "destroy")[];
288
+ networkPolicy: "none" | "declared_read_only" | "declared_scoped";
289
+ defaultTimeoutMs: number;
290
+ };
291
+ tools: {
292
+ name: string;
293
+ description: string;
294
+ inputSchema: Record<string, unknown>;
295
+ inputSchemaHash: string;
296
+ sideEffect: "read" | "write";
297
+ timeoutMs: number;
298
+ }[];
299
+ capabilities: {
300
+ id: string;
301
+ required: boolean;
302
+ scopes: string[];
303
+ portability: "portable" | "host_adapter" | "local_only" | "hosted_only";
304
+ }[];
305
+ environmentRelease?: {
306
+ id: string;
307
+ contentHash: string;
308
+ } | undefined;
309
+ verifierSetRelease?: {
310
+ id: string;
311
+ contentHash: string;
312
+ } | undefined;
313
+ };
314
+ contentHash: string;
315
+ };
316
+ }>;
7
317
  export declare function requireCurrentLearningEvidence(transaction: LearningTransaction, ref: LearningRevisionRef): Promise<TaskEvidence>;
8
318
  //# sourceMappingURL=batch-service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"batch-service.d.ts","sourceRoot":"","sources":["../../../../../src/learning/batch-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgC,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAA8E,KAAK,uBAAuB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAErK,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,mBAAmB,EAAE,KAAK,EAAE,OAAO,CAAC,eAAe,EAAE;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CA2B3M;A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AAC,WAAW,EAAE,mBAAmB,EAAE,GAAG,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,CAKtI"}
@@ -19,4 +19,5 @@ export * from "./iteration-candidate-decision.js";
19
19
  export * from "./schedule-contracts.js";
20
20
  export * from "./schedule-service.js";
21
21
  export * from "./schedule-worker.js";
22
+ export * from "./policy-inspection.js";
22
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/learning/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/learning/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { LearningTransaction } from "./repository.js";
2
+ /** Outstanding reservations survive midnight; settled spend belongs to its UTC day. */
3
+ export declare function readLearningIterationBudget(transaction: LearningTransaction, chainId: string, now: string): Promise<{
4
+ reservedSpendUsd: number;
5
+ settledSpendUsd: number;
6
+ committedSpendUsd: number;
7
+ }>;
8
+ //# sourceMappingURL=iteration-budget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iteration-budget.d.ts","sourceRoot":"","sources":["../../../../../src/learning/iteration-budget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,uFAAuF;AACvF,wBAAsB,2BAA2B,CAAC,WAAW,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;;;;GAc/G"}
@@ -1 +1 @@
1
- {"version":3,"file":"iteration-reservation-service.d.ts","sourceRoot":"","sources":["../../../../../src/learning/iteration-reservation-service.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAmD,KAAK,uBAAuB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE1I,KAAK,cAAc,GAAG,OAAO,CAAC,eAAe,EAAE;IAAE,MAAM,EAAE,mBAAmB,CAAA;CAAE,CAAC,CAAC;AAEhF,kFAAkF;AAClF,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,mBAAmB,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CA0ExK"}
1
+ {"version":3,"file":"iteration-reservation-service.d.ts","sourceRoot":"","sources":["../../../../../src/learning/iteration-reservation-service.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAmD,KAAK,uBAAuB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE1I,KAAK,cAAc,GAAG,OAAO,CAAC,eAAe,EAAE;IAAE,MAAM,EAAE,mBAAmB,CAAA;CAAE,CAAC,CAAC;AAEhF,kFAAkF;AAClF,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,mBAAmB,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CA0ExK"}
@@ -0,0 +1,47 @@
1
+ import { z } from "zod";
2
+ import { LearningRevisionRefSchema } from "./contracts.js";
3
+ import { type LearningTransaction } from "./repository.js";
4
+ /** A scope-serialized snapshot of shared reservation readiness, not a Job guarantee.
5
+ * No iteration, timer, batch, consumption or operation record is written. */
6
+ export declare const LearningPolicyInspectionResultSchema: z.ZodObject<{
7
+ policy: z.ZodObject<{
8
+ id: z.ZodString;
9
+ contentHash: z.ZodString;
10
+ revision: z.ZodNumber;
11
+ }, z.core.$strict>;
12
+ modelProjectId: z.ZodString;
13
+ inspectedAt: z.ZodString;
14
+ chain: z.ZodNullable<z.ZodObject<{
15
+ schemaVersion: z.ZodLiteral<"openpond.learningChain.v1">;
16
+ id: z.ZodString;
17
+ revision: z.ZodNumber;
18
+ modelProjectId: z.ZodString;
19
+ activeIterationId: z.ZodNullable<z.ZodString>;
20
+ latestIterationId: z.ZodString;
21
+ lastReservedAt: z.ZodNullable<z.ZodString>;
22
+ updatedAt: z.ZodString;
23
+ }, z.core.$strict>>;
24
+ counts: z.ZodNullable<z.ZodObject<{
25
+ eligible: z.ZodNumber;
26
+ awaitingReview: z.ZodNumber;
27
+ excluded: z.ZodNumber;
28
+ consumed: z.ZodNumber;
29
+ }, z.core.$strict>>;
30
+ minimumApprovedExamples: z.ZodNumber;
31
+ canReserve: z.ZodBoolean;
32
+ blockers: z.ZodArray<z.ZodObject<{
33
+ code: z.ZodString;
34
+ message: z.ZodString;
35
+ }, z.core.$strict>>;
36
+ cooldownUntil: z.ZodNullable<z.ZodString>;
37
+ budget: z.ZodObject<{
38
+ reservedSpendUsd: z.ZodNumber;
39
+ settledSpendUsd: z.ZodNumber;
40
+ committedSpendUsd: z.ZodNumber;
41
+ maximumIterationSpendUsd: z.ZodNumber;
42
+ maximumDailySpendUsd: z.ZodNumber;
43
+ }, z.core.$strict>;
44
+ }, z.core.$strict>;
45
+ export type LearningPolicyInspectionResult = z.infer<typeof LearningPolicyInspectionResultSchema>;
46
+ export declare function inspectLearningPolicy(transaction: LearningTransaction, reference: z.infer<typeof LearningRevisionRefSchema>, actorId: string, now: string): Promise<LearningPolicyInspectionResult>;
47
+ //# sourceMappingURL=policy-inspection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-inspection.d.ts","sourceRoot":"","sources":["../../../../../src/learning/policy-inspection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAgC,MAAM,gBAAgB,CAAC;AAMzF,OAAO,EAAmD,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE5G;6EAC6E;AAC7E,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBActC,CAAC;AACZ,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG,wBAAsB,qBAAqB,CAAC,WAAW,EAAE,mBAAmB,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,8BAA8B,CAAC,CA6CzM"}
@@ -17,6 +17,45 @@ export declare function createLearningService(repository: LearningRepository, op
17
17
  now?: () => string;
18
18
  }): {
19
19
  command: (context: LearningServiceContext, raw: unknown) => Promise<LearningOperationResult>;
20
+ inspectPolicy(context: LearningServiceContext, reference: LearningRevisionRef): Promise<{
21
+ policy: {
22
+ id: string;
23
+ contentHash: string;
24
+ revision: number;
25
+ };
26
+ modelProjectId: string;
27
+ inspectedAt: string;
28
+ chain: {
29
+ schemaVersion: "openpond.learningChain.v1";
30
+ id: string;
31
+ revision: number;
32
+ modelProjectId: string;
33
+ activeIterationId: string | null;
34
+ latestIterationId: string;
35
+ lastReservedAt: string | null;
36
+ updatedAt: string;
37
+ } | null;
38
+ counts: {
39
+ eligible: number;
40
+ awaitingReview: number;
41
+ excluded: number;
42
+ consumed: number;
43
+ } | null;
44
+ minimumApprovedExamples: number;
45
+ canReserve: boolean;
46
+ blockers: {
47
+ code: string;
48
+ message: string;
49
+ }[];
50
+ cooldownUntil: string | null;
51
+ budget: {
52
+ reservedSpendUsd: number;
53
+ settledSpendUsd: number;
54
+ committedSpendUsd: number;
55
+ maximumIterationSpendUsd: number;
56
+ maximumDailySpendUsd: number;
57
+ };
58
+ }>;
20
59
  inspectEvidence(context: LearningServiceContext, reference: LearningRevisionRef): Promise<{
21
60
  evidence: {
22
61
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../src/learning/service.ts"],"names":[],"mappings":"AAaA,OAAO,EAA+Q,KAAK,mBAAmB,EAAwC,MAAM,gBAAgB,CAAC;AAE7W,OAAO,EAAmH,KAAK,kBAAkB,E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EAAE,KAAK,oBAAoB,EAAgC,KAAK,qBAAqB,EAAE,KAAK,sBAAsB,EAA4B,MAAM,iBAAiB,CAAC;AAK5W,MAAM,MAAM,aAAa,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACtG,MAAM,MAAM,sBAAsB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,aAAa,CAAA;CAAE,CAAC;AAC7E,MAAM,MAAM,uBAAuB,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,sBAAsB,EAAE,CAAA;CAAE,CAAC;AAEnG,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,kBAAkB,EAAE,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAAO;uBAGxE,sBAAsB,OAAO,OAAO,KAAG,OAAO,CAAC,uBAAuB,CAAC;2BA0PxE,sBAAsB,aAAa,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAKpD,sBAAsB,aAAa,mBAAmB;;;;;;;;;;;;;QAS3E,CAAC,SAAS,oBAAoB,WAAW,sBAAsB,QAAQ,CAAC,MAAM,MAAM,aAAa,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;SAIxI,CAAC,SAAS,oBAAoB,WAAW,sBAAsB,QAAQ,CAAC,UAAS,OAAO,CAAC,qBAAqB,CAAC,GAAQ,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;EAMrK"}
@@ -1438,6 +1438,14 @@ export declare const LearningCommandRequestSchema: z.ZodObject<{
1438
1438
  }, z.core.$strict>]>;
1439
1439
  }, z.core.$strict>;
1440
1440
  export declare const LearningReadRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1441
+ action: z.ZodLiteral<"inspect_policy">;
1442
+ scope: z.ZodString;
1443
+ policy: z.ZodObject<{
1444
+ id: z.ZodString;
1445
+ contentHash: z.ZodString;
1446
+ revision: z.ZodNumber;
1447
+ }, z.core.$strict>;
1448
+ }, z.core.$strict>, z.ZodObject<{
1441
1449
  action: z.ZodLiteral<"inspect_evidence">;
1442
1450
  scope: z.ZodString;
1443
1451
  evidence: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../../../src/learning/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,mFAAmF;AACnF,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAG5D;AAED,0FAA0F;AAC1F,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAG/B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpond/evals",
3
- "version": "0.10.4",
3
+ "version": "0.10.5",
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",
@@ -0,0 +1,243 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "policy": {
6
+ "type": "object",
7
+ "properties": {
8
+ "id": {
9
+ "$ref": "#/$defs/__schema0"
10
+ },
11
+ "contentHash": {
12
+ "type": "string",
13
+ "pattern": "^[a-f0-9]{64}$"
14
+ },
15
+ "revision": {
16
+ "type": "integer",
17
+ "exclusiveMinimum": 0,
18
+ "maximum": 9007199254740991
19
+ }
20
+ },
21
+ "required": [
22
+ "id",
23
+ "contentHash",
24
+ "revision"
25
+ ],
26
+ "additionalProperties": false
27
+ },
28
+ "modelProjectId": {
29
+ "$ref": "#/$defs/__schema0"
30
+ },
31
+ "inspectedAt": {
32
+ "$ref": "#/$defs/__schema1"
33
+ },
34
+ "chain": {
35
+ "anyOf": [
36
+ {
37
+ "type": "object",
38
+ "properties": {
39
+ "schemaVersion": {
40
+ "type": "string",
41
+ "const": "openpond.learningChain.v1"
42
+ },
43
+ "id": {
44
+ "$ref": "#/$defs/__schema0"
45
+ },
46
+ "revision": {
47
+ "type": "integer",
48
+ "exclusiveMinimum": 0,
49
+ "maximum": 9007199254740991
50
+ },
51
+ "modelProjectId": {
52
+ "$ref": "#/$defs/__schema0"
53
+ },
54
+ "activeIterationId": {
55
+ "anyOf": [
56
+ {
57
+ "$ref": "#/$defs/__schema0"
58
+ },
59
+ {
60
+ "type": "null"
61
+ }
62
+ ]
63
+ },
64
+ "latestIterationId": {
65
+ "$ref": "#/$defs/__schema0"
66
+ },
67
+ "lastReservedAt": {
68
+ "anyOf": [
69
+ {
70
+ "$ref": "#/$defs/__schema1"
71
+ },
72
+ {
73
+ "type": "null"
74
+ }
75
+ ]
76
+ },
77
+ "updatedAt": {
78
+ "$ref": "#/$defs/__schema1"
79
+ }
80
+ },
81
+ "required": [
82
+ "schemaVersion",
83
+ "id",
84
+ "revision",
85
+ "modelProjectId",
86
+ "activeIterationId",
87
+ "latestIterationId",
88
+ "lastReservedAt",
89
+ "updatedAt"
90
+ ],
91
+ "additionalProperties": false
92
+ },
93
+ {
94
+ "type": "null"
95
+ }
96
+ ]
97
+ },
98
+ "counts": {
99
+ "anyOf": [
100
+ {
101
+ "type": "object",
102
+ "properties": {
103
+ "eligible": {
104
+ "type": "integer",
105
+ "minimum": 0,
106
+ "maximum": 9007199254740991
107
+ },
108
+ "awaitingReview": {
109
+ "type": "integer",
110
+ "minimum": 0,
111
+ "maximum": 9007199254740991
112
+ },
113
+ "excluded": {
114
+ "type": "integer",
115
+ "minimum": 0,
116
+ "maximum": 9007199254740991
117
+ },
118
+ "consumed": {
119
+ "type": "integer",
120
+ "minimum": 0,
121
+ "maximum": 9007199254740991
122
+ }
123
+ },
124
+ "required": [
125
+ "eligible",
126
+ "awaitingReview",
127
+ "excluded",
128
+ "consumed"
129
+ ],
130
+ "additionalProperties": false
131
+ },
132
+ {
133
+ "type": "null"
134
+ }
135
+ ]
136
+ },
137
+ "minimumApprovedExamples": {
138
+ "type": "integer",
139
+ "exclusiveMinimum": 0,
140
+ "maximum": 9007199254740991
141
+ },
142
+ "canReserve": {
143
+ "type": "boolean"
144
+ },
145
+ "blockers": {
146
+ "maxItems": 20,
147
+ "type": "array",
148
+ "items": {
149
+ "$ref": "#/$defs/__schema2"
150
+ }
151
+ },
152
+ "cooldownUntil": {
153
+ "anyOf": [
154
+ {
155
+ "$ref": "#/$defs/__schema1"
156
+ },
157
+ {
158
+ "type": "null"
159
+ }
160
+ ]
161
+ },
162
+ "budget": {
163
+ "type": "object",
164
+ "properties": {
165
+ "reservedSpendUsd": {
166
+ "type": "number",
167
+ "minimum": 0
168
+ },
169
+ "settledSpendUsd": {
170
+ "type": "number",
171
+ "minimum": 0
172
+ },
173
+ "committedSpendUsd": {
174
+ "type": "number",
175
+ "minimum": 0
176
+ },
177
+ "maximumIterationSpendUsd": {
178
+ "type": "number",
179
+ "minimum": 0
180
+ },
181
+ "maximumDailySpendUsd": {
182
+ "type": "number",
183
+ "minimum": 0
184
+ }
185
+ },
186
+ "required": [
187
+ "reservedSpendUsd",
188
+ "settledSpendUsd",
189
+ "committedSpendUsd",
190
+ "maximumIterationSpendUsd",
191
+ "maximumDailySpendUsd"
192
+ ],
193
+ "additionalProperties": false
194
+ }
195
+ },
196
+ "required": [
197
+ "policy",
198
+ "modelProjectId",
199
+ "inspectedAt",
200
+ "chain",
201
+ "counts",
202
+ "minimumApprovedExamples",
203
+ "canReserve",
204
+ "blockers",
205
+ "cooldownUntil",
206
+ "budget"
207
+ ],
208
+ "additionalProperties": false,
209
+ "$defs": {
210
+ "__schema0": {
211
+ "type": "string",
212
+ "minLength": 1,
213
+ "maxLength": 240
214
+ },
215
+ "__schema1": {
216
+ "type": "string",
217
+ "format": "date-time",
218
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
219
+ },
220
+ "__schema2": {
221
+ "type": "object",
222
+ "properties": {
223
+ "code": {
224
+ "type": "string",
225
+ "minLength": 1,
226
+ "maxLength": 200
227
+ },
228
+ "message": {
229
+ "type": "string",
230
+ "minLength": 1,
231
+ "maxLength": 20000
232
+ }
233
+ },
234
+ "required": [
235
+ "code",
236
+ "message"
237
+ ],
238
+ "additionalProperties": false
239
+ }
240
+ },
241
+ "$id": "urn:openpond:learning:v1:policy-inspection",
242
+ "$comment": "Generated from @openpond/evals. Cross-resource identity, authorization, idempotency, admission, grading and split constraints are enforced by the shared domain service in addition to this structural schema."
243
+ }
@@ -1,6 +1,27 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "oneOf": [
4
+ {
5
+ "type": "object",
6
+ "properties": {
7
+ "action": {
8
+ "type": "string",
9
+ "const": "inspect_policy"
10
+ },
11
+ "scope": {
12
+ "$ref": "#/$defs/__schema0"
13
+ },
14
+ "policy": {
15
+ "$ref": "#/$defs/__schema1"
16
+ }
17
+ },
18
+ "required": [
19
+ "action",
20
+ "scope",
21
+ "policy"
22
+ ],
23
+ "additionalProperties": false
24
+ },
4
25
  {
5
26
  "type": "object",
6
27
  "properties": {
@@ -12,27 +33,7 @@
12
33
  "$ref": "#/$defs/__schema0"
13
34
  },
14
35
  "evidence": {
15
- "type": "object",
16
- "properties": {
17
- "id": {
18
- "$ref": "#/$defs/__schema0"
19
- },
20
- "contentHash": {
21
- "type": "string",
22
- "pattern": "^[a-f0-9]{64}$"
23
- },
24
- "revision": {
25
- "type": "integer",
26
- "exclusiveMinimum": 0,
27
- "maximum": 9007199254740991
28
- }
29
- },
30
- "required": [
31
- "id",
32
- "contentHash",
33
- "revision"
34
- ],
35
- "additionalProperties": false
36
+ "$ref": "#/$defs/__schema1"
36
37
  }
37
38
  },
38
39
  "required": [
@@ -53,7 +54,7 @@
53
54
  "$ref": "#/$defs/__schema0"
54
55
  },
55
56
  "kind": {
56
- "$ref": "#/$defs/__schema1"
57
+ "$ref": "#/$defs/__schema2"
57
58
  },
58
59
  "id": {
59
60
  "$ref": "#/$defs/__schema0"
@@ -83,7 +84,7 @@
83
84
  "$ref": "#/$defs/__schema0"
84
85
  },
85
86
  "kind": {
86
- "$ref": "#/$defs/__schema1"
87
+ "$ref": "#/$defs/__schema2"
87
88
  },
88
89
  "parentId": {
89
90
  "$ref": "#/$defs/__schema0"
@@ -119,6 +120,29 @@
119
120
  "maxLength": 240
120
121
  },
121
122
  "__schema1": {
123
+ "type": "object",
124
+ "properties": {
125
+ "id": {
126
+ "$ref": "#/$defs/__schema0"
127
+ },
128
+ "contentHash": {
129
+ "type": "string",
130
+ "pattern": "^[a-f0-9]{64}$"
131
+ },
132
+ "revision": {
133
+ "type": "integer",
134
+ "exclusiveMinimum": 0,
135
+ "maximum": 9007199254740991
136
+ }
137
+ },
138
+ "required": [
139
+ "id",
140
+ "contentHash",
141
+ "revision"
142
+ ],
143
+ "additionalProperties": false
144
+ },
145
+ "__schema2": {
122
146
  "type": "string",
123
147
  "enum": [
124
148
  "draft",