@openpond/evals 0.12.3 → 0.12.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.
Files changed (53) hide show
  1. package/LEARNING.md +43 -0
  2. package/dist/javascript-isolate-process-entry.js +4 -1
  3. package/dist/javascript-isolate-process-source.js +1 -1
  4. package/dist/javascript-isolate-process.js +36 -2
  5. package/dist/javascript-isolate.js +8 -2
  6. package/dist/javascript-verifier-node.js +1 -0
  7. package/dist/javascript-verifier-worker-source.js +1 -1
  8. package/dist/learning/index.js +1 -0
  9. package/dist/learning/iteration-dispatch-commands.js +1 -1
  10. package/dist/learning/iteration-dispatch-contracts.js +27 -0
  11. package/dist/learning/iteration-dispatch-deferral.js +28 -0
  12. package/dist/learning/iteration-dispatch-worker.js +34 -5
  13. package/dist/tool-learning/actions.js +62 -0
  14. package/dist/tool-learning/consultation.js +198 -0
  15. package/dist/tool-learning/episodes.js +284 -0
  16. package/dist/tool-learning/index.js +6 -0
  17. package/dist/tool-learning/installations.js +151 -0
  18. package/dist/tool-learning/policy.js +38 -0
  19. package/dist/tool-learning/primitives.js +87 -0
  20. package/dist/types/javascript-isolate-process.d.ts +7 -0
  21. package/dist/types/javascript-isolate-process.d.ts.map +1 -1
  22. package/dist/types/javascript-isolate.d.ts +3 -1
  23. package/dist/types/javascript-isolate.d.ts.map +1 -1
  24. package/dist/types/javascript-verifier-node.d.ts +1 -0
  25. package/dist/types/javascript-verifier-node.d.ts.map +1 -1
  26. package/dist/types/learning/index.d.ts +1 -0
  27. package/dist/types/learning/index.d.ts.map +1 -1
  28. package/dist/types/learning/iteration-dispatch-contracts.d.ts +45 -0
  29. package/dist/types/learning/iteration-dispatch-contracts.d.ts.map +1 -1
  30. package/dist/types/learning/iteration-dispatch-deferral.d.ts +71 -0
  31. package/dist/types/learning/iteration-dispatch-deferral.d.ts.map +1 -0
  32. package/dist/types/learning/iteration-dispatch-worker.d.ts +7 -2
  33. package/dist/types/learning/iteration-dispatch-worker.d.ts.map +1 -1
  34. package/dist/types/learning/repository.d.ts +20 -0
  35. package/dist/types/learning/repository.d.ts.map +1 -1
  36. package/dist/types/learning/transport.d.ts +20 -0
  37. package/dist/types/learning/transport.d.ts.map +1 -1
  38. package/dist/types/tool-learning/actions.d.ts +54 -0
  39. package/dist/types/tool-learning/actions.d.ts.map +1 -0
  40. package/dist/types/tool-learning/consultation.d.ts +229 -0
  41. package/dist/types/tool-learning/consultation.d.ts.map +1 -0
  42. package/dist/types/tool-learning/episodes.d.ts +1058 -0
  43. package/dist/types/tool-learning/episodes.d.ts.map +1 -0
  44. package/dist/types/tool-learning/index.d.ts +7 -0
  45. package/dist/types/tool-learning/index.d.ts.map +1 -0
  46. package/dist/types/tool-learning/installations.d.ts +296 -0
  47. package/dist/types/tool-learning/installations.d.ts.map +1 -0
  48. package/dist/types/tool-learning/policy.d.ts +3 -0
  49. package/dist/types/tool-learning/policy.d.ts.map +1 -0
  50. package/dist/types/tool-learning/primitives.d.ts +73 -0
  51. package/dist/types/tool-learning/primitives.d.ts.map +1 -0
  52. package/package.json +5 -1
  53. package/schemas/learning/v1/dispatch.schema.json +100 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"episodes.d.ts","sourceRoot":"","sources":["../../../src/tool-learning/episodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2CjC,CAAC;AAEL,eAAO,MAAM,4BAA4B;;;;;;;;;;EAUvC,CAAC;AAUH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAkErC,CAAC;AAEL,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;kBAsBtC,CAAC;AAEL;kFACkF;AAClF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsBtC,CAAC;AAqBL,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAsClC,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAUrE;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAwBnC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;kBAyBhC,CAAC;AACZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./primitives.js";
2
+ export * from "./actions.js";
3
+ export * from "./episodes.js";
4
+ export * from "./installations.js";
5
+ export * from "./consultation.js";
6
+ export * from "./policy.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tool-learning/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
@@ -0,0 +1,296 @@
1
+ import { z } from "zod";
2
+ export declare const ToolLearningCapturePolicySchema: z.ZodObject<{
3
+ revision: z.ZodNumber;
4
+ permittedTools: z.ZodArray<z.ZodString>;
5
+ workspaceRootHashes: z.ZodArray<z.ZodString>;
6
+ permittedFields: z.ZodArray<z.ZodEnum<{
7
+ action: "action";
8
+ artifact_reference: "artifact_reference";
9
+ intent: "intent";
10
+ result_excerpt: "result_excerpt";
11
+ state: "state";
12
+ }>>;
13
+ unchangedControls: z.ZodObject<{
14
+ numerator: z.ZodNumber;
15
+ denominator: z.ZodNumber;
16
+ }, z.core.$strict>;
17
+ maximumEventBytes: z.ZodNumber;
18
+ maximumEpisodeBytes: z.ZodNumber;
19
+ maximumEpisodeEvents: z.ZodNumber;
20
+ maximumQueueBytes: z.ZodNumber;
21
+ maximumQueueEvents: z.ZodNumber;
22
+ maximumQueueAgeSeconds: z.ZodNumber;
23
+ rawRetentionDays: z.ZodNumber;
24
+ purposes: z.ZodArray<z.ZodEnum<{
25
+ capture: "capture";
26
+ consultation: "consultation";
27
+ }>>;
28
+ modelUpdates: z.ZodLiteral<"requires_separate_review">;
29
+ variantGeneration: z.ZodLiteral<"disabled">;
30
+ }, z.core.$strict>;
31
+ export declare const ToolLearningCoverageSchema: z.ZodObject<{
32
+ receipt: z.ZodNullable<z.ZodObject<{
33
+ id: z.ZodString;
34
+ contentHash: z.ZodString;
35
+ }, z.core.$strict>>;
36
+ start: z.ZodEnum<{
37
+ documented: "documented";
38
+ observed: "observed";
39
+ unqualified: "unqualified";
40
+ unsupported: "unsupported";
41
+ }>;
42
+ resume: z.ZodEnum<{
43
+ documented: "documented";
44
+ observed: "observed";
45
+ unqualified: "unqualified";
46
+ unsupported: "unsupported";
47
+ }>;
48
+ compaction: z.ZodEnum<{
49
+ documented: "documented";
50
+ observed: "observed";
51
+ unqualified: "unqualified";
52
+ unsupported: "unsupported";
53
+ }>;
54
+ executionFailure: z.ZodEnum<{
55
+ documented: "documented";
56
+ observed: "observed";
57
+ unqualified: "unqualified";
58
+ unsupported: "unsupported";
59
+ }>;
60
+ processFailure: z.ZodEnum<{
61
+ documented: "documented";
62
+ observed: "observed";
63
+ unqualified: "unqualified";
64
+ unsupported: "unsupported";
65
+ }>;
66
+ validationFailure: z.ZodEnum<{
67
+ documented: "documented";
68
+ observed: "observed";
69
+ unqualified: "unqualified";
70
+ unsupported: "unsupported";
71
+ }>;
72
+ nestedCalls: z.ZodEnum<{
73
+ documented: "documented";
74
+ observed: "observed";
75
+ unqualified: "unqualified";
76
+ unsupported: "unsupported";
77
+ }>;
78
+ contextRefresh: z.ZodEnum<{
79
+ revision_aware_turn: "revision_aware_turn";
80
+ session_start: "session_start";
81
+ start_resume: "start_resume";
82
+ start_resume_compaction: "start_resume_compaction";
83
+ unqualified: "unqualified";
84
+ }>;
85
+ gaps: z.ZodArray<z.ZodString>;
86
+ }, z.core.$strict>;
87
+ export declare const ToolLearningRegistrationSchema: z.ZodPreprocess<z.ZodObject<{
88
+ schemaVersion: z.ZodLiteral<"openpond.toolLearningRegistration.v1">;
89
+ operationId: z.ZodString;
90
+ installationId: z.ZodString;
91
+ projectId: z.ZodString;
92
+ machineSourceId: z.ZodString;
93
+ client: z.ZodEnum<{
94
+ claude_code: "claude_code";
95
+ codex: "codex";
96
+ opencode: "opencode";
97
+ openpond: "openpond";
98
+ }>;
99
+ clientVersion: z.ZodString;
100
+ adapterRelease: z.ZodObject<{
101
+ id: z.ZodString;
102
+ contentHash: z.ZodString;
103
+ }, z.core.$strict>;
104
+ collectionPolicy: z.ZodObject<{
105
+ revision: z.ZodNumber;
106
+ permittedTools: z.ZodArray<z.ZodString>;
107
+ workspaceRootHashes: z.ZodArray<z.ZodString>;
108
+ permittedFields: z.ZodArray<z.ZodEnum<{
109
+ action: "action";
110
+ artifact_reference: "artifact_reference";
111
+ intent: "intent";
112
+ result_excerpt: "result_excerpt";
113
+ state: "state";
114
+ }>>;
115
+ unchangedControls: z.ZodObject<{
116
+ numerator: z.ZodNumber;
117
+ denominator: z.ZodNumber;
118
+ }, z.core.$strict>;
119
+ maximumEventBytes: z.ZodNumber;
120
+ maximumEpisodeBytes: z.ZodNumber;
121
+ maximumEpisodeEvents: z.ZodNumber;
122
+ maximumQueueBytes: z.ZodNumber;
123
+ maximumQueueEvents: z.ZodNumber;
124
+ maximumQueueAgeSeconds: z.ZodNumber;
125
+ rawRetentionDays: z.ZodNumber;
126
+ purposes: z.ZodArray<z.ZodEnum<{
127
+ capture: "capture";
128
+ consultation: "consultation";
129
+ }>>;
130
+ modelUpdates: z.ZodLiteral<"requires_separate_review">;
131
+ variantGeneration: z.ZodLiteral<"disabled">;
132
+ }, z.core.$strict>;
133
+ }, z.core.$strict>>;
134
+ /** Status deliberately exposes capability/expiry metadata, never the credential. */
135
+ export declare const ToolLearningInstallationSchema: z.ZodObject<{
136
+ schemaVersion: z.ZodLiteral<"openpond.toolLearningInstallation.v1">;
137
+ id: z.ZodString;
138
+ revision: z.ZodNumber;
139
+ scope: z.ZodObject<{
140
+ teamId: z.ZodString;
141
+ projectId: z.ZodString;
142
+ }, z.core.$strict>;
143
+ ownerUserId: z.ZodString;
144
+ machineSourceId: z.ZodString;
145
+ client: z.ZodEnum<{
146
+ claude_code: "claude_code";
147
+ codex: "codex";
148
+ opencode: "opencode";
149
+ openpond: "openpond";
150
+ }>;
151
+ clientVersion: z.ZodString;
152
+ adapterRelease: z.ZodObject<{
153
+ id: z.ZodString;
154
+ contentHash: z.ZodString;
155
+ }, z.core.$strict>;
156
+ state: z.ZodEnum<{
157
+ disabled: "disabled";
158
+ enabled: "enabled";
159
+ pending_client_trust: "pending_client_trust";
160
+ revoked: "revoked";
161
+ }>;
162
+ collectionPolicy: z.ZodObject<{
163
+ revision: z.ZodNumber;
164
+ permittedTools: z.ZodArray<z.ZodString>;
165
+ workspaceRootHashes: z.ZodArray<z.ZodString>;
166
+ permittedFields: z.ZodArray<z.ZodEnum<{
167
+ action: "action";
168
+ artifact_reference: "artifact_reference";
169
+ intent: "intent";
170
+ result_excerpt: "result_excerpt";
171
+ state: "state";
172
+ }>>;
173
+ unchangedControls: z.ZodObject<{
174
+ numerator: z.ZodNumber;
175
+ denominator: z.ZodNumber;
176
+ }, z.core.$strict>;
177
+ maximumEventBytes: z.ZodNumber;
178
+ maximumEpisodeBytes: z.ZodNumber;
179
+ maximumEpisodeEvents: z.ZodNumber;
180
+ maximumQueueBytes: z.ZodNumber;
181
+ maximumQueueEvents: z.ZodNumber;
182
+ maximumQueueAgeSeconds: z.ZodNumber;
183
+ rawRetentionDays: z.ZodNumber;
184
+ purposes: z.ZodArray<z.ZodEnum<{
185
+ capture: "capture";
186
+ consultation: "consultation";
187
+ }>>;
188
+ modelUpdates: z.ZodLiteral<"requires_separate_review">;
189
+ variantGeneration: z.ZodLiteral<"disabled">;
190
+ }, z.core.$strict>;
191
+ collectionPolicyHash: z.ZodString;
192
+ coverage: z.ZodObject<{
193
+ receipt: z.ZodNullable<z.ZodObject<{
194
+ id: z.ZodString;
195
+ contentHash: z.ZodString;
196
+ }, z.core.$strict>>;
197
+ start: z.ZodEnum<{
198
+ documented: "documented";
199
+ observed: "observed";
200
+ unqualified: "unqualified";
201
+ unsupported: "unsupported";
202
+ }>;
203
+ resume: z.ZodEnum<{
204
+ documented: "documented";
205
+ observed: "observed";
206
+ unqualified: "unqualified";
207
+ unsupported: "unsupported";
208
+ }>;
209
+ compaction: z.ZodEnum<{
210
+ documented: "documented";
211
+ observed: "observed";
212
+ unqualified: "unqualified";
213
+ unsupported: "unsupported";
214
+ }>;
215
+ executionFailure: z.ZodEnum<{
216
+ documented: "documented";
217
+ observed: "observed";
218
+ unqualified: "unqualified";
219
+ unsupported: "unsupported";
220
+ }>;
221
+ processFailure: z.ZodEnum<{
222
+ documented: "documented";
223
+ observed: "observed";
224
+ unqualified: "unqualified";
225
+ unsupported: "unsupported";
226
+ }>;
227
+ validationFailure: z.ZodEnum<{
228
+ documented: "documented";
229
+ observed: "observed";
230
+ unqualified: "unqualified";
231
+ unsupported: "unsupported";
232
+ }>;
233
+ nestedCalls: z.ZodEnum<{
234
+ documented: "documented";
235
+ observed: "observed";
236
+ unqualified: "unqualified";
237
+ unsupported: "unsupported";
238
+ }>;
239
+ contextRefresh: z.ZodEnum<{
240
+ revision_aware_turn: "revision_aware_turn";
241
+ session_start: "session_start";
242
+ start_resume: "start_resume";
243
+ start_resume_compaction: "start_resume_compaction";
244
+ unqualified: "unqualified";
245
+ }>;
246
+ gaps: z.ZodArray<z.ZodString>;
247
+ }, z.core.$strict>;
248
+ credential: z.ZodNullable<z.ZodObject<{
249
+ id: z.ZodString;
250
+ expiresAt: z.ZodString;
251
+ revokedAt: z.ZodNullable<z.ZodString>;
252
+ capabilities: z.ZodArray<z.ZodEnum<{
253
+ consultation_read: "consultation_read";
254
+ consultation_submit: "consultation_submit";
255
+ episode_append: "episode_append";
256
+ manifest_read: "manifest_read";
257
+ }>>;
258
+ }, z.core.$strict>>;
259
+ createdAt: z.ZodString;
260
+ updatedAt: z.ZodString;
261
+ }, z.core.$strict>;
262
+ export declare const ToolLearningInstallationUpdateSchema: z.ZodObject<{
263
+ operationId: z.ZodString;
264
+ expectedRevision: z.ZodNumber;
265
+ state: z.ZodEnum<{
266
+ disabled: "disabled";
267
+ enabled: "enabled";
268
+ revoked: "revoked";
269
+ }>;
270
+ }, z.core.$strict>;
271
+ export declare const ToolEpisodeOriginSchema: z.ZodObject<{
272
+ schemaVersion: z.ZodLiteral<"openpond.toolEpisodeOrigin.v1">;
273
+ installationId: z.ZodString;
274
+ projectId: z.ZodString;
275
+ ownerUserId: z.ZodString;
276
+ episode: z.ZodObject<{
277
+ id: z.ZodString;
278
+ contentHash: z.ZodString;
279
+ }, z.core.$strict>;
280
+ event: z.ZodObject<{
281
+ id: z.ZodString;
282
+ contentHash: z.ZodString;
283
+ }, z.core.$strict>;
284
+ appendReceipt: z.ZodObject<{
285
+ id: z.ZodString;
286
+ contentHash: z.ZodString;
287
+ }, z.core.$strict>;
288
+ purpose: z.ZodLiteral<"private_dataset_evidence">;
289
+ trainingConsent: z.ZodLiteral<"not_granted">;
290
+ }, z.core.$strict>;
291
+ export type ToolLearningCapturePolicy = z.infer<typeof ToolLearningCapturePolicySchema>;
292
+ export type ToolLearningCoverage = z.infer<typeof ToolLearningCoverageSchema>;
293
+ export type ToolLearningRegistration = z.infer<typeof ToolLearningRegistrationSchema>;
294
+ export type ToolLearningInstallation = z.infer<typeof ToolLearningInstallationSchema>;
295
+ export type ToolEpisodeOrigin = z.infer<typeof ToolEpisodeOriginSchema>;
296
+ //# sourceMappingURL=installations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installations.d.ts","sourceRoot":"","sources":["../../../src/tool-learning/installations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyDxC,CAAC;AAEL,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2BnC,CAAC;AAEL,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAe1C,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgChC,CAAC;AAEZ,eAAO,MAAM,oCAAoC;;;;;;;;kBAMtC,CAAC;AAEZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;kBAYzB,CAAC;AAEZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Shared local-persistence/intake boundary. A hash alone does not grant consent. */
2
+ export declare function assertToolEpisodeCapturePolicy(eventValue: unknown, policyValue: unknown): void;
3
+ //# sourceMappingURL=policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../src/tool-learning/policy.ts"],"names":[],"mappings":"AAIA,qFAAqF;AACrF,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,GAAG,IAAI,CAyC9F"}
@@ -0,0 +1,73 @@
1
+ import { z } from "zod";
2
+ export declare const TOOL_LEARNING_LIMITS: Readonly<{
3
+ eventBytes: 65536;
4
+ actionBytes: 16384;
5
+ resultBytes: 8192;
6
+ stateBytes: 8192;
7
+ eventsPerAppend: 32;
8
+ eventsPerEpisode: 256;
9
+ episodeBytes: 2097152;
10
+ assetBytes: 1048576;
11
+ assetsPerEpisode: 16;
12
+ queueBytes: 52428800;
13
+ queueEvents: 5000;
14
+ queueAgeSeconds: 86400;
15
+ capabilities: 32;
16
+ consultationRounds: 3;
17
+ consultationBytes: 65536;
18
+ manifestSeconds: 300;
19
+ }>;
20
+ export declare const ToolLearningIdSchema: z.ZodString;
21
+ export declare const ToolLearningHashSchema: z.ZodString;
22
+ export declare const ToolLearningTimestampSchema: z.ZodString;
23
+ export declare const ToolLearningClientSchema: z.ZodEnum<{
24
+ claude_code: "claude_code";
25
+ codex: "codex";
26
+ opencode: "opencode";
27
+ openpond: "openpond";
28
+ }>;
29
+ export declare const ToolLearningRefSchema: z.ZodObject<{
30
+ id: z.ZodString;
31
+ contentHash: z.ZodString;
32
+ }, z.core.$strict>;
33
+ export declare const ToolLearningScopeSchema: z.ZodObject<{
34
+ teamId: z.ZodString;
35
+ projectId: z.ZodString;
36
+ }, z.core.$strict>;
37
+ /** Run the existing non-recursive JSON bound before Zod traverses producer data. */
38
+ export declare function boundedToolLearningSchema<T extends z.ZodType>(schema: T, maximumBytes: number): z.ZodPreprocess<T>;
39
+ export declare function toolLearningText(maximumBytes: number): z.ZodString;
40
+ export declare const ToolLearningStateSchema: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
41
+ export declare const ToolLearningEnvironmentSchema: z.ZodObject<{
42
+ application: z.ZodString;
43
+ version: z.ZodString;
44
+ state: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
45
+ fingerprint: z.ZodString;
46
+ }, z.core.$strict>;
47
+ export declare const ToolLearningAssetSchema: z.ZodObject<{
48
+ id: z.ZodString;
49
+ contentHash: z.ZodString;
50
+ mediaType: z.ZodEnum<{
51
+ "application/json": "application/json";
52
+ "text/plain": "text/plain";
53
+ "text/x-diff": "text/x-diff";
54
+ "text/x-python": "text/x-python";
55
+ }>;
56
+ sizeBytes: z.ZodNumber;
57
+ purpose: z.ZodEnum<{
58
+ action: "action";
59
+ result: "result";
60
+ state: "state";
61
+ verification: "verification";
62
+ }>;
63
+ }, z.core.$strict>;
64
+ export declare const ToolLearningSanitizationSchema: z.ZodObject<{
65
+ policyRevision: z.ZodNumber;
66
+ policyHash: z.ZodString;
67
+ redactedFields: z.ZodNumber;
68
+ omittedFields: z.ZodNumber;
69
+ truncated: z.ZodBoolean;
70
+ }, z.core.$strict>;
71
+ /** Hash only the validated public envelope; no raw hook/transcript data enters it. */
72
+ export declare function toolLearningContentHash(value: unknown, maximumBytes?: 65536): string;
73
+ //# sourceMappingURL=primitives.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../src/tool-learning/primitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;EAiB/B,CAAC;AAEH,eAAO,MAAM,oBAAoB,aAAkB,CAAC;AACpD,eAAO,MAAM,sBAAsB,aAAoB,CAAC;AACxD,eAAO,MAAM,2BAA2B,aAAyB,CAAC;AAClE,eAAO,MAAM,wBAAwB;;;;;EAA2D,CAAC;AACjG,eAAO,MAAM,qBAAqB;;;kBAEvB,CAAC;AACZ,eAAO,MAAM,uBAAuB;;;kBAEzB,CAAC;AAEZ,oFAAoF;AACpF,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,sBAa7F;AAED,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,eAQpD;AAED,eAAO,MAAM,uBAAuB,qHAQnC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;kBAO/B,CAAC;AAEZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;kBAQzB,CAAC;AAEZ,eAAO,MAAM,8BAA8B;;;;;;kBAQhC,CAAC;AAEZ,sFAAsF;AACtF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,EACd,YAAY,QAAkC,UAI/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpond/evals",
3
- "version": "0.12.3",
3
+ "version": "0.12.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",
@@ -151,6 +151,10 @@
151
151
  "./learning/reward-calibration-closure": {
152
152
  "types": "./dist/types/learning/reward-calibration-closure.d.ts",
153
153
  "import": "./dist/learning/reward-calibration-closure.js"
154
+ },
155
+ "./tool-learning": {
156
+ "types": "./dist/types/tool-learning/index.d.ts",
157
+ "import": "./dist/tool-learning/index.js"
154
158
  }
155
159
  },
156
160
  "publishConfig": {
@@ -59,9 +59,15 @@
59
59
  "nextAttemptAt": {
60
60
  "$ref": "#/$defs/__schema19"
61
61
  },
62
- "lastError": {
62
+ "admission": {
63
63
  "$ref": "#/$defs/__schema20"
64
64
  },
65
+ "lastSubmissionDeferral": {
66
+ "$ref": "#/$defs/__schema21"
67
+ },
68
+ "lastError": {
69
+ "$ref": "#/$defs/__schema22"
70
+ },
65
71
  "createdAt": {
66
72
  "$ref": "#/$defs/__schema10"
67
73
  },
@@ -322,6 +328,99 @@
322
328
  ]
323
329
  },
324
330
  "__schema20": {
331
+ "anyOf": [
332
+ {
333
+ "oneOf": [
334
+ {
335
+ "type": "object",
336
+ "properties": {
337
+ "status": {
338
+ "type": "string",
339
+ "const": "ready"
340
+ }
341
+ },
342
+ "required": [
343
+ "status"
344
+ ],
345
+ "additionalProperties": false
346
+ },
347
+ {
348
+ "type": "object",
349
+ "properties": {
350
+ "status": {
351
+ "type": "string",
352
+ "const": "deferred"
353
+ },
354
+ "retryAt": {
355
+ "$ref": "#/$defs/__schema10"
356
+ },
357
+ "reason": {
358
+ "type": "string",
359
+ "minLength": 1,
360
+ "maxLength": 2000
361
+ }
362
+ },
363
+ "required": [
364
+ "status",
365
+ "retryAt",
366
+ "reason"
367
+ ],
368
+ "additionalProperties": false
369
+ }
370
+ ]
371
+ },
372
+ {
373
+ "type": "null"
374
+ }
375
+ ]
376
+ },
377
+ "__schema21": {
378
+ "type": "object",
379
+ "properties": {
380
+ "scope": {
381
+ "$ref": "#/$defs/__schema1"
382
+ },
383
+ "dispatchId": {
384
+ "$ref": "#/$defs/__schema1"
385
+ },
386
+ "submissionHash": {
387
+ "type": "string",
388
+ "pattern": "^[a-f0-9]{64}$"
389
+ },
390
+ "leaseGeneration": {
391
+ "type": "integer",
392
+ "exclusiveMinimum": 0,
393
+ "maximum": 9007199254740991
394
+ },
395
+ "status": {
396
+ "type": "string",
397
+ "const": "deferred"
398
+ },
399
+ "retryAt": {
400
+ "$ref": "#/$defs/__schema10"
401
+ },
402
+ "reason": {
403
+ "type": "string",
404
+ "minLength": 1,
405
+ "maxLength": 2000
406
+ },
407
+ "receipt": {
408
+ "$ref": "#/$defs/__schema12"
409
+ }
410
+ },
411
+ "required": [
412
+ "scope",
413
+ "dispatchId",
414
+ "submissionHash",
415
+ "leaseGeneration",
416
+ "status",
417
+ "retryAt",
418
+ "reason",
419
+ "receipt"
420
+ ],
421
+ "additionalProperties": false
422
+ },
423
+ "__schema22": {
325
424
  "anyOf": [
326
425
  {
327
426
  "type": "string",