openpond-sdk 0.12.10 → 0.12.12

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 (91) hide show
  1. package/LEARNING.md +11 -0
  2. package/README.md +2 -0
  3. package/dist/advanced-refiner-evaluations.js +8 -8
  4. package/dist/candidate-evaluations.js +7 -7
  5. package/dist/{chunk-QQ444G6A.js → chunk-2LVR24GU.js} +2 -2
  6. package/dist/{chunk-5QMREXMU.js → chunk-7BYLH47N.js} +3 -3
  7. package/dist/{chunk-RYDUAY52.js → chunk-C3TS766N.js} +21 -74
  8. package/dist/chunk-C3TS766N.js.map +1 -0
  9. package/dist/{chunk-HDKP6KE2.js → chunk-C4W2MEFP.js} +2 -2
  10. package/dist/{chunk-XJKGCU2K.js → chunk-CNREFTAV.js} +2 -2
  11. package/dist/{chunk-UAYXORU5.js → chunk-GHPCQXG5.js} +2 -2
  12. package/dist/{chunk-WOD72SFI.js → chunk-GJRXJL6G.js} +3 -3
  13. package/dist/{chunk-GRQWKATA.js → chunk-HAQPGTQ4.js} +2 -2
  14. package/dist/{chunk-7WKCQ4V5.js → chunk-IFBCLRBM.js} +2 -2
  15. package/dist/chunk-IZ26ZCGU.js +65 -0
  16. package/dist/chunk-IZ26ZCGU.js.map +1 -0
  17. package/dist/{chunk-ICFFZ4WC.js → chunk-JBYFD3QS.js} +3 -3
  18. package/dist/{chunk-4L556MYM.js → chunk-JDQVAG3R.js} +3 -3
  19. package/dist/{chunk-7FYPFHCQ.js → chunk-K54BDIKL.js} +3 -3
  20. package/dist/{chunk-ESW25WSD.js → chunk-KOJC3TH4.js} +6 -6
  21. package/dist/{chunk-GIEST52U.js → chunk-LHHHJIDR.js} +2 -2
  22. package/dist/{chunk-FC56EMHT.js → chunk-NKF5NIML.js} +6 -6
  23. package/dist/{chunk-LKKKTBLL.js → chunk-O3NOGKMT.js} +2 -2
  24. package/dist/{chunk-XNRM3QGR.js → chunk-ORYA2G7S.js} +3 -3
  25. package/dist/{chunk-PT72OARU.js → chunk-RIN6Z56W.js} +5 -5
  26. package/dist/{chunk-LT2YQCZI.js → chunk-RLW4Y5ZV.js} +2 -2
  27. package/dist/{chunk-PKW3II5M.js → chunk-TLSP5JKG.js} +2 -2
  28. package/dist/{chunk-BQ2C2Y54.js → chunk-UOV2LEXS.js} +4 -4
  29. package/dist/{chunk-ZZZU6XER.js → chunk-UWY5PUHR.js} +2 -2
  30. package/dist/{chunk-DMN6EF3R.js → chunk-XMVSQIK4.js} +2 -2
  31. package/dist/{chunk-WEL535AI.js → chunk-XRBM6PBD.js} +4 -4
  32. package/dist/{chunk-2DK7UBAG.js → chunk-YIGFQWZV.js} +3 -3
  33. package/dist/{chunk-IIQENUOK.js → chunk-ZYDDHHZZ.js} +3 -3
  34. package/dist/connected-evidence.js +14 -14
  35. package/dist/dataset-workspaces.js +14 -14
  36. package/dist/experiment-evaluation-schedules.js +18 -18
  37. package/dist/experiment-improvements.js +8 -8
  38. package/dist/experiments.js +17 -17
  39. package/dist/index.js +26 -25
  40. package/dist/index.js.map +1 -1
  41. package/dist/learning.js +9 -7
  42. package/dist/learning.js.map +1 -1
  43. package/dist/model-projects.js +4 -4
  44. package/dist/model-starter-attempts.js +3 -3
  45. package/dist/model-starter-catalog.js +10 -10
  46. package/dist/model-starters.js +10 -10
  47. package/dist/model-taskset-runs.js +4 -4
  48. package/dist/post-training.js +7 -7
  49. package/dist/taskset-drafts.js +13 -13
  50. package/dist/taskset-packages.js +15 -15
  51. package/dist/tool-learning-local-store.js +160 -7
  52. package/dist/tool-learning-local-store.js.map +1 -1
  53. package/dist/tool-learning.js +519 -0
  54. package/dist/tool-learning.js.map +1 -1
  55. package/dist/training-bundle.js +11 -11
  56. package/dist/training.js +8 -8
  57. package/dist/types/packages/sdk/src/tool-learning-client.d.ts +1236 -0
  58. package/dist/types/packages/sdk/src/tool-learning-client.d.ts.map +1 -0
  59. package/dist/types/packages/sdk/src/tool-learning-episodes.d.ts +58 -0
  60. package/dist/types/packages/sdk/src/tool-learning-episodes.d.ts.map +1 -0
  61. package/dist/types/packages/sdk/src/tool-learning-local-store.d.ts +70 -2
  62. package/dist/types/packages/sdk/src/tool-learning-local-store.d.ts.map +1 -1
  63. package/dist/types/packages/sdk/src/tool-learning.d.ts +2 -0
  64. package/dist/types/packages/sdk/src/tool-learning.d.ts.map +1 -1
  65. package/package.json +1 -1
  66. package/dist/chunk-RYDUAY52.js.map +0 -1
  67. /package/dist/{chunk-QQ444G6A.js.map → chunk-2LVR24GU.js.map} +0 -0
  68. /package/dist/{chunk-5QMREXMU.js.map → chunk-7BYLH47N.js.map} +0 -0
  69. /package/dist/{chunk-HDKP6KE2.js.map → chunk-C4W2MEFP.js.map} +0 -0
  70. /package/dist/{chunk-XJKGCU2K.js.map → chunk-CNREFTAV.js.map} +0 -0
  71. /package/dist/{chunk-UAYXORU5.js.map → chunk-GHPCQXG5.js.map} +0 -0
  72. /package/dist/{chunk-WOD72SFI.js.map → chunk-GJRXJL6G.js.map} +0 -0
  73. /package/dist/{chunk-GRQWKATA.js.map → chunk-HAQPGTQ4.js.map} +0 -0
  74. /package/dist/{chunk-7WKCQ4V5.js.map → chunk-IFBCLRBM.js.map} +0 -0
  75. /package/dist/{chunk-ICFFZ4WC.js.map → chunk-JBYFD3QS.js.map} +0 -0
  76. /package/dist/{chunk-4L556MYM.js.map → chunk-JDQVAG3R.js.map} +0 -0
  77. /package/dist/{chunk-7FYPFHCQ.js.map → chunk-K54BDIKL.js.map} +0 -0
  78. /package/dist/{chunk-ESW25WSD.js.map → chunk-KOJC3TH4.js.map} +0 -0
  79. /package/dist/{chunk-GIEST52U.js.map → chunk-LHHHJIDR.js.map} +0 -0
  80. /package/dist/{chunk-FC56EMHT.js.map → chunk-NKF5NIML.js.map} +0 -0
  81. /package/dist/{chunk-LKKKTBLL.js.map → chunk-O3NOGKMT.js.map} +0 -0
  82. /package/dist/{chunk-XNRM3QGR.js.map → chunk-ORYA2G7S.js.map} +0 -0
  83. /package/dist/{chunk-PT72OARU.js.map → chunk-RIN6Z56W.js.map} +0 -0
  84. /package/dist/{chunk-LT2YQCZI.js.map → chunk-RLW4Y5ZV.js.map} +0 -0
  85. /package/dist/{chunk-PKW3II5M.js.map → chunk-TLSP5JKG.js.map} +0 -0
  86. /package/dist/{chunk-BQ2C2Y54.js.map → chunk-UOV2LEXS.js.map} +0 -0
  87. /package/dist/{chunk-ZZZU6XER.js.map → chunk-UWY5PUHR.js.map} +0 -0
  88. /package/dist/{chunk-DMN6EF3R.js.map → chunk-XMVSQIK4.js.map} +0 -0
  89. /package/dist/{chunk-WEL535AI.js.map → chunk-XRBM6PBD.js.map} +0 -0
  90. /package/dist/{chunk-2DK7UBAG.js.map → chunk-YIGFQWZV.js.map} +0 -0
  91. /package/dist/{chunk-IIQENUOK.js.map → chunk-ZYDDHHZZ.js.map} +0 -0
@@ -0,0 +1,1236 @@
1
+ import { z } from "zod";
2
+ import { ToolLearningInstallationUpdateSchema, type ToolLearningRegistration, type ToolEpisodeAppend, type ToolLearningConsultationRequest } from "@openpond/evals/tool-learning";
3
+ /** Prepare and retain this request privately before registration. Retrying the
4
+ * same bytes recovers issuance without storing plaintext on the host. */
5
+ export declare const ToolLearningRegistrationRequestSchema: z.ZodPreprocess<z.ZodObject<{
6
+ registration: z.ZodPreprocess<z.ZodObject<{
7
+ schemaVersion: z.ZodLiteral<"openpond.toolLearningRegistration.v1">;
8
+ operationId: z.ZodString;
9
+ installationId: z.ZodString;
10
+ projectId: z.ZodString;
11
+ machineSourceId: z.ZodString;
12
+ client: z.ZodEnum<{
13
+ claude_code: "claude_code";
14
+ codex: "codex";
15
+ opencode: "opencode";
16
+ openpond: "openpond";
17
+ }>;
18
+ clientVersion: z.ZodString;
19
+ adapterRelease: z.ZodObject<{
20
+ id: z.ZodString;
21
+ contentHash: z.ZodString;
22
+ }, z.core.$strict>;
23
+ collectionPolicy: z.ZodObject<{
24
+ revision: z.ZodNumber;
25
+ permittedTools: z.ZodArray<z.ZodString>;
26
+ workspaceRootHashes: z.ZodArray<z.ZodString>;
27
+ permittedFields: z.ZodArray<z.ZodEnum<{
28
+ action: "action";
29
+ artifact_reference: "artifact_reference";
30
+ intent: "intent";
31
+ result_excerpt: "result_excerpt";
32
+ state: "state";
33
+ }>>;
34
+ unchangedControls: z.ZodObject<{
35
+ numerator: z.ZodNumber;
36
+ denominator: z.ZodNumber;
37
+ }, z.core.$strict>;
38
+ maximumEventBytes: z.ZodNumber;
39
+ maximumEpisodeBytes: z.ZodNumber;
40
+ maximumEpisodeEvents: z.ZodNumber;
41
+ maximumQueueBytes: z.ZodNumber;
42
+ maximumQueueEvents: z.ZodNumber;
43
+ maximumQueueAgeSeconds: z.ZodNumber;
44
+ rawRetentionDays: z.ZodNumber;
45
+ purposes: z.ZodArray<z.ZodEnum<{
46
+ capture: "capture";
47
+ consultation: "consultation";
48
+ }>>;
49
+ modelUpdates: z.ZodLiteral<"requires_separate_review">;
50
+ variantGeneration: z.ZodLiteral<"disabled">;
51
+ }, z.core.$strict>;
52
+ }, z.core.$strict>>;
53
+ credential: z.ZodObject<{
54
+ apiKey: z.ZodString;
55
+ expiresAt: z.ZodISODateTime;
56
+ }, z.core.$strict>;
57
+ }, z.core.$strict>>;
58
+ export declare const ToolLearningProjectionRequestSchema: z.ZodPreprocess<z.ZodObject<{
59
+ operationId: z.ZodString;
60
+ expectedRevision: z.ZodNumber;
61
+ episodeId: z.ZodString;
62
+ failure: z.ZodObject<{
63
+ id: z.ZodString;
64
+ contentHash: z.ZodString;
65
+ }, z.core.$strict>;
66
+ recovery: z.ZodObject<{
67
+ id: z.ZodString;
68
+ contentHash: z.ZodString;
69
+ }, z.core.$strict>;
70
+ taskDefinition: z.ZodObject<{
71
+ id: z.ZodString;
72
+ contentHash: z.ZodString;
73
+ revision: z.ZodNumber;
74
+ }, z.core.$strict>;
75
+ familyKey: z.ZodString;
76
+ split: z.ZodLiteral<"train">;
77
+ proposedTarget: z.ZodDiscriminatedUnion<[z.ZodObject<{
78
+ decision: z.ZodLiteral<"proceed">;
79
+ }, z.core.$strict>, z.ZodObject<{
80
+ decision: z.ZodLiteral<"revise">;
81
+ issues: z.ZodArray<z.ZodObject<{
82
+ category: z.ZodString;
83
+ feedback: z.ZodString;
84
+ }, z.core.$strict>>;
85
+ }, z.core.$strict>, z.ZodObject<{
86
+ decision: z.ZodLiteral<"needs_context">;
87
+ missing: z.ZodArray<z.ZodObject<{
88
+ field: z.ZodString;
89
+ reason: z.ZodString;
90
+ }, z.core.$strict>>;
91
+ }, z.core.$strict>], "decision">;
92
+ saveToPrivateDataset: z.ZodLiteral<true>;
93
+ targetApproval: z.ZodLiteral<"pending_owner_review">;
94
+ }, z.core.$strict>>;
95
+ export declare const ToolLearningProjectionReceiptSchema: z.ZodPreprocess<z.ZodObject<{
96
+ installationId: z.ZodString;
97
+ projectId: z.ZodString;
98
+ operationId: z.ZodString;
99
+ source: z.ZodObject<{
100
+ id: z.ZodString;
101
+ contentHash: z.ZodString;
102
+ revision: z.ZodNumber;
103
+ }, z.core.$strict>;
104
+ evidence: z.ZodObject<{
105
+ id: z.ZodString;
106
+ contentHash: z.ZodString;
107
+ revision: z.ZodNumber;
108
+ }, z.core.$strict>;
109
+ originHash: z.ZodString;
110
+ requestHash: z.ZodString;
111
+ projectedAt: z.ZodISODateTime;
112
+ targetApproval: z.ZodLiteral<"pending_owner_review">;
113
+ learningEnrollment: z.ZodLiteral<false>;
114
+ }, z.core.$strict>>;
115
+ /** Explicit owner selection. Capturing events never authorizes inference spend. */
116
+ export declare const ToolLearningRoutingRequestSchema: z.ZodPreprocess<z.ZodObject<{
117
+ operationId: z.ZodString;
118
+ expectedRevision: z.ZodNumber;
119
+ state: z.ZodEnum<{
120
+ disabled: "disabled";
121
+ enabled: "enabled";
122
+ }>;
123
+ modelId: z.ZodString;
124
+ qualification: z.ZodDiscriminatedUnion<[z.ZodObject<{
125
+ kind: z.ZodLiteral<"integration">;
126
+ evaluationRunId: z.ZodString;
127
+ }, z.core.$strict>, z.ZodObject<{
128
+ kind: z.ZodLiteral<"learned">;
129
+ evaluationRunId: z.ZodString;
130
+ baselineRunId: z.ZodString;
131
+ trainingRunId: z.ZodString;
132
+ }, z.core.$strict>], "kind">;
133
+ capabilities: z.ZodArray<z.ZodObject<{
134
+ id: z.ZodString;
135
+ application: z.ZodString;
136
+ versions: z.ZodArray<z.ZodString>;
137
+ tools: z.ZodArray<z.ZodString>;
138
+ mode: z.ZodLiteral<"recovery">;
139
+ routingInstruction: z.ZodString;
140
+ }, z.core.$strict>>;
141
+ limits: z.ZodObject<{
142
+ maxOutputTokens: z.ZodNumber;
143
+ maximumCallUsd: z.ZodNumber;
144
+ maximumDayUsd: z.ZodNumber;
145
+ maximumSessionCalls: z.ZodNumber;
146
+ maximumDayCalls: z.ZodNumber;
147
+ }, z.core.$strict>;
148
+ }, z.core.$strict>>;
149
+ export declare const ToolLearningRoutingSchema: z.ZodPreprocess<z.ZodObject<{
150
+ installationId: z.ZodString;
151
+ scope: z.ZodObject<{
152
+ teamId: z.ZodString;
153
+ projectId: z.ZodString;
154
+ }, z.core.$strict>;
155
+ revision: z.ZodNumber;
156
+ operationId: z.ZodString;
157
+ requestHash: z.ZodString;
158
+ configuration: z.ZodPreprocess<z.ZodObject<{
159
+ operationId: z.ZodString;
160
+ expectedRevision: z.ZodNumber;
161
+ state: z.ZodEnum<{
162
+ disabled: "disabled";
163
+ enabled: "enabled";
164
+ }>;
165
+ modelId: z.ZodString;
166
+ qualification: z.ZodDiscriminatedUnion<[z.ZodObject<{
167
+ kind: z.ZodLiteral<"integration">;
168
+ evaluationRunId: z.ZodString;
169
+ }, z.core.$strict>, z.ZodObject<{
170
+ kind: z.ZodLiteral<"learned">;
171
+ evaluationRunId: z.ZodString;
172
+ baselineRunId: z.ZodString;
173
+ trainingRunId: z.ZodString;
174
+ }, z.core.$strict>], "kind">;
175
+ capabilities: z.ZodArray<z.ZodObject<{
176
+ id: z.ZodString;
177
+ application: z.ZodString;
178
+ versions: z.ZodArray<z.ZodString>;
179
+ tools: z.ZodArray<z.ZodString>;
180
+ mode: z.ZodLiteral<"recovery">;
181
+ routingInstruction: z.ZodString;
182
+ }, z.core.$strict>>;
183
+ limits: z.ZodObject<{
184
+ maxOutputTokens: z.ZodNumber;
185
+ maximumCallUsd: z.ZodNumber;
186
+ maximumDayUsd: z.ZodNumber;
187
+ maximumSessionCalls: z.ZodNumber;
188
+ maximumDayCalls: z.ZodNumber;
189
+ }, z.core.$strict>;
190
+ }, z.core.$strict>>;
191
+ modelRelease: z.ZodObject<{
192
+ id: z.ZodString;
193
+ contentHash: z.ZodString;
194
+ }, z.core.$strict>;
195
+ policySystemPrompt: z.ZodString;
196
+ capabilities: z.ZodArray<z.ZodObject<{
197
+ id: z.ZodString;
198
+ application: z.ZodString;
199
+ versions: z.ZodArray<z.ZodString>;
200
+ tools: z.ZodArray<z.ZodString>;
201
+ mode: z.ZodLiteral<"recovery">;
202
+ routingInstruction: z.ZodString;
203
+ qualification: z.ZodDiscriminatedUnion<[z.ZodObject<{
204
+ kind: z.ZodLiteral<"integration">;
205
+ receipt: z.ZodObject<{
206
+ id: z.ZodString;
207
+ contentHash: z.ZodString;
208
+ }, z.core.$strict>;
209
+ }, z.core.$strict>, z.ZodObject<{
210
+ kind: z.ZodLiteral<"learned">;
211
+ receipt: z.ZodObject<{
212
+ id: z.ZodString;
213
+ contentHash: z.ZodString;
214
+ }, z.core.$strict>;
215
+ trainingRun: z.ZodObject<{
216
+ id: z.ZodString;
217
+ contentHash: z.ZodString;
218
+ }, z.core.$strict>;
219
+ adapter: z.ZodObject<{
220
+ id: z.ZodString;
221
+ contentHash: z.ZodString;
222
+ }, z.core.$strict>;
223
+ evaluation: z.ZodObject<{
224
+ id: z.ZodString;
225
+ contentHash: z.ZodString;
226
+ }, z.core.$strict>;
227
+ activation: z.ZodObject<{
228
+ id: z.ZodString;
229
+ contentHash: z.ZodString;
230
+ }, z.core.$strict>;
231
+ }, z.core.$strict>], "kind">;
232
+ }, z.core.$strict>>;
233
+ updatedAt: z.ZodISODateTime;
234
+ }, z.core.$strict>>;
235
+ export declare function prepareToolLearningRegistration(registration: ToolLearningRegistration, expiresAt: string): {
236
+ registration: {
237
+ schemaVersion: "openpond.toolLearningRegistration.v1";
238
+ operationId: string;
239
+ installationId: string;
240
+ projectId: string;
241
+ machineSourceId: string;
242
+ client: "claude_code" | "codex" | "opencode" | "openpond";
243
+ clientVersion: string;
244
+ adapterRelease: {
245
+ id: string;
246
+ contentHash: string;
247
+ };
248
+ collectionPolicy: {
249
+ revision: number;
250
+ permittedTools: string[];
251
+ workspaceRootHashes: string[];
252
+ permittedFields: ("action" | "artifact_reference" | "intent" | "result_excerpt" | "state")[];
253
+ unchangedControls: {
254
+ numerator: number;
255
+ denominator: number;
256
+ };
257
+ maximumEventBytes: number;
258
+ maximumEpisodeBytes: number;
259
+ maximumEpisodeEvents: number;
260
+ maximumQueueBytes: number;
261
+ maximumQueueEvents: number;
262
+ maximumQueueAgeSeconds: number;
263
+ rawRetentionDays: number;
264
+ purposes: ("capture" | "consultation")[];
265
+ modelUpdates: "requires_separate_review";
266
+ variantGeneration: "disabled";
267
+ };
268
+ };
269
+ credential: {
270
+ apiKey: string;
271
+ expiresAt: string;
272
+ };
273
+ };
274
+ export declare class OpenPondToolLearningError extends Error {
275
+ readonly status: number;
276
+ readonly code: string;
277
+ constructor(status: number, code: string);
278
+ }
279
+ /** Owner credentials register/control installations. External hooks and MCP
280
+ * use only the separate installation credential returned by registration. */
281
+ type ToolLearningClientOptions = {
282
+ baseUrl: string;
283
+ apiKey: string;
284
+ teamId: string;
285
+ projectId: string;
286
+ fetch?: typeof globalThis.fetch;
287
+ };
288
+ export declare class OpenPondToolLearningClient {
289
+ #private;
290
+ constructor(options: ToolLearningClientOptions);
291
+ register(value: z.input<typeof ToolLearningRegistrationRequestSchema>, signal?: AbortSignal): Promise<{
292
+ installation: {
293
+ schemaVersion: "openpond.toolLearningInstallation.v1";
294
+ id: string;
295
+ revision: number;
296
+ scope: {
297
+ teamId: string;
298
+ projectId: string;
299
+ };
300
+ ownerUserId: string;
301
+ machineSourceId: string;
302
+ client: "claude_code" | "codex" | "opencode" | "openpond";
303
+ clientVersion: string;
304
+ adapterRelease: {
305
+ id: string;
306
+ contentHash: string;
307
+ };
308
+ state: "disabled" | "enabled" | "pending_client_trust" | "revoked";
309
+ collectionPolicy: {
310
+ revision: number;
311
+ permittedTools: string[];
312
+ workspaceRootHashes: string[];
313
+ permittedFields: ("action" | "artifact_reference" | "intent" | "result_excerpt" | "state")[];
314
+ unchangedControls: {
315
+ numerator: number;
316
+ denominator: number;
317
+ };
318
+ maximumEventBytes: number;
319
+ maximumEpisodeBytes: number;
320
+ maximumEpisodeEvents: number;
321
+ maximumQueueBytes: number;
322
+ maximumQueueEvents: number;
323
+ maximumQueueAgeSeconds: number;
324
+ rawRetentionDays: number;
325
+ purposes: ("capture" | "consultation")[];
326
+ modelUpdates: "requires_separate_review";
327
+ variantGeneration: "disabled";
328
+ };
329
+ collectionPolicyHash: string;
330
+ coverage: {
331
+ receipt: {
332
+ id: string;
333
+ contentHash: string;
334
+ } | null;
335
+ start: "documented" | "observed" | "unqualified" | "unsupported";
336
+ resume: "documented" | "observed" | "unqualified" | "unsupported";
337
+ compaction: "documented" | "observed" | "unqualified" | "unsupported";
338
+ executionFailure: "documented" | "observed" | "unqualified" | "unsupported";
339
+ processFailure: "documented" | "observed" | "unqualified" | "unsupported";
340
+ validationFailure: "documented" | "observed" | "unqualified" | "unsupported";
341
+ nestedCalls: "documented" | "observed" | "unqualified" | "unsupported";
342
+ contextRefresh: "revision_aware_turn" | "session_start" | "start_resume" | "start_resume_compaction" | "unqualified";
343
+ gaps: string[];
344
+ };
345
+ credential: {
346
+ id: string;
347
+ expiresAt: string;
348
+ revokedAt: string | null;
349
+ capabilities: ("consultation_read" | "consultation_submit" | "episode_append" | "manifest_read")[];
350
+ } | null;
351
+ createdAt: string;
352
+ updatedAt: string;
353
+ };
354
+ apiKey: string;
355
+ }>;
356
+ installation(id: string, signal?: AbortSignal): Promise<{
357
+ schemaVersion: "openpond.toolLearningInstallation.v1";
358
+ id: string;
359
+ revision: number;
360
+ scope: {
361
+ teamId: string;
362
+ projectId: string;
363
+ };
364
+ ownerUserId: string;
365
+ machineSourceId: string;
366
+ client: "claude_code" | "codex" | "opencode" | "openpond";
367
+ clientVersion: string;
368
+ adapterRelease: {
369
+ id: string;
370
+ contentHash: string;
371
+ };
372
+ state: "disabled" | "enabled" | "pending_client_trust" | "revoked";
373
+ collectionPolicy: {
374
+ revision: number;
375
+ permittedTools: string[];
376
+ workspaceRootHashes: string[];
377
+ permittedFields: ("action" | "artifact_reference" | "intent" | "result_excerpt" | "state")[];
378
+ unchangedControls: {
379
+ numerator: number;
380
+ denominator: number;
381
+ };
382
+ maximumEventBytes: number;
383
+ maximumEpisodeBytes: number;
384
+ maximumEpisodeEvents: number;
385
+ maximumQueueBytes: number;
386
+ maximumQueueEvents: number;
387
+ maximumQueueAgeSeconds: number;
388
+ rawRetentionDays: number;
389
+ purposes: ("capture" | "consultation")[];
390
+ modelUpdates: "requires_separate_review";
391
+ variantGeneration: "disabled";
392
+ };
393
+ collectionPolicyHash: string;
394
+ coverage: {
395
+ receipt: {
396
+ id: string;
397
+ contentHash: string;
398
+ } | null;
399
+ start: "documented" | "observed" | "unqualified" | "unsupported";
400
+ resume: "documented" | "observed" | "unqualified" | "unsupported";
401
+ compaction: "documented" | "observed" | "unqualified" | "unsupported";
402
+ executionFailure: "documented" | "observed" | "unqualified" | "unsupported";
403
+ processFailure: "documented" | "observed" | "unqualified" | "unsupported";
404
+ validationFailure: "documented" | "observed" | "unqualified" | "unsupported";
405
+ nestedCalls: "documented" | "observed" | "unqualified" | "unsupported";
406
+ contextRefresh: "revision_aware_turn" | "session_start" | "start_resume" | "start_resume_compaction" | "unqualified";
407
+ gaps: string[];
408
+ };
409
+ credential: {
410
+ id: string;
411
+ expiresAt: string;
412
+ revokedAt: string | null;
413
+ capabilities: ("consultation_read" | "consultation_submit" | "episode_append" | "manifest_read")[];
414
+ } | null;
415
+ createdAt: string;
416
+ updatedAt: string;
417
+ }>;
418
+ installations(after?: string, signal?: AbortSignal): Promise<{
419
+ items: {
420
+ schemaVersion: "openpond.toolLearningInstallation.v1";
421
+ id: string;
422
+ revision: number;
423
+ scope: {
424
+ teamId: string;
425
+ projectId: string;
426
+ };
427
+ ownerUserId: string;
428
+ machineSourceId: string;
429
+ client: "claude_code" | "codex" | "opencode" | "openpond";
430
+ clientVersion: string;
431
+ adapterRelease: {
432
+ id: string;
433
+ contentHash: string;
434
+ };
435
+ state: "disabled" | "enabled" | "pending_client_trust" | "revoked";
436
+ collectionPolicy: {
437
+ revision: number;
438
+ permittedTools: string[];
439
+ workspaceRootHashes: string[];
440
+ permittedFields: ("action" | "artifact_reference" | "intent" | "result_excerpt" | "state")[];
441
+ unchangedControls: {
442
+ numerator: number;
443
+ denominator: number;
444
+ };
445
+ maximumEventBytes: number;
446
+ maximumEpisodeBytes: number;
447
+ maximumEpisodeEvents: number;
448
+ maximumQueueBytes: number;
449
+ maximumQueueEvents: number;
450
+ maximumQueueAgeSeconds: number;
451
+ rawRetentionDays: number;
452
+ purposes: ("capture" | "consultation")[];
453
+ modelUpdates: "requires_separate_review";
454
+ variantGeneration: "disabled";
455
+ };
456
+ collectionPolicyHash: string;
457
+ coverage: {
458
+ receipt: {
459
+ id: string;
460
+ contentHash: string;
461
+ } | null;
462
+ start: "documented" | "observed" | "unqualified" | "unsupported";
463
+ resume: "documented" | "observed" | "unqualified" | "unsupported";
464
+ compaction: "documented" | "observed" | "unqualified" | "unsupported";
465
+ executionFailure: "documented" | "observed" | "unqualified" | "unsupported";
466
+ processFailure: "documented" | "observed" | "unqualified" | "unsupported";
467
+ validationFailure: "documented" | "observed" | "unqualified" | "unsupported";
468
+ nestedCalls: "documented" | "observed" | "unqualified" | "unsupported";
469
+ contextRefresh: "revision_aware_turn" | "session_start" | "start_resume" | "start_resume_compaction" | "unqualified";
470
+ gaps: string[];
471
+ };
472
+ credential: {
473
+ id: string;
474
+ expiresAt: string;
475
+ revokedAt: string | null;
476
+ capabilities: ("consultation_read" | "consultation_submit" | "episode_append" | "manifest_read")[];
477
+ } | null;
478
+ createdAt: string;
479
+ updatedAt: string;
480
+ }[];
481
+ nextCursor: string | null;
482
+ }>;
483
+ episodes(installationId: string, after?: string, signal?: AbortSignal): Promise<{
484
+ installationId: string;
485
+ scope: {
486
+ teamId: string;
487
+ projectId: string;
488
+ };
489
+ items: {
490
+ episodeId: string;
491
+ eventCount: number;
492
+ lastReceivedAt: string;
493
+ }[];
494
+ nextCursor: string | null;
495
+ learningEnrollment: false;
496
+ }>;
497
+ episode(installationId: string, episodeId: string, signal?: AbortSignal): Promise<{
498
+ installationId: string;
499
+ episodeId: string;
500
+ scope: {
501
+ teamId: string;
502
+ projectId: string;
503
+ };
504
+ events: ({
505
+ schemaVersion: "openpond.toolEpisodeEvent.v1";
506
+ operationId: string;
507
+ installationId: string;
508
+ episodeId: string;
509
+ eventId: string;
510
+ sessionId: string;
511
+ parentSessionId: string | null;
512
+ turnId: string | null;
513
+ callId: string;
514
+ occurredAt: string;
515
+ sequence: number;
516
+ adapterVersion: string;
517
+ sanitization: {
518
+ policyRevision: number;
519
+ policyHash: string;
520
+ redactedFields: number;
521
+ omittedFields: number;
522
+ truncated: boolean;
523
+ };
524
+ contentHash: string;
525
+ eventKind: "attempt";
526
+ payload: {
527
+ intent: string;
528
+ tool: {
529
+ name: string;
530
+ version: string | null;
531
+ server: string | null;
532
+ };
533
+ action: {
534
+ kind: "python";
535
+ code: string;
536
+ } | {
537
+ kind: "shell";
538
+ command: string;
539
+ shell: string;
540
+ } | {
541
+ kind: "tool_arguments";
542
+ arguments: Record<string, z.JSONType>;
543
+ } | {
544
+ kind: "edit";
545
+ patch: string;
546
+ baseFiles: {
547
+ path: string;
548
+ contentHash: string | null;
549
+ }[];
550
+ };
551
+ actionHash: string;
552
+ environment: {
553
+ application: string;
554
+ version: string;
555
+ state: Record<string, string | number | boolean | null>;
556
+ fingerprint: string;
557
+ };
558
+ contextAssets: {
559
+ id: string;
560
+ contentHash: string;
561
+ mediaType: "application/json" | "text/plain" | "text/x-diff" | "text/x-python";
562
+ sizeBytes: number;
563
+ purpose: "action" | "result" | "state" | "verification";
564
+ }[];
565
+ selection: {
566
+ kind: "eligible_attempt";
567
+ } | {
568
+ kind: "unchanged_control";
569
+ numerator: number;
570
+ denominator: number;
571
+ policyHash: string;
572
+ };
573
+ };
574
+ } | {
575
+ schemaVersion: "openpond.toolEpisodeEvent.v1";
576
+ operationId: string;
577
+ installationId: string;
578
+ episodeId: string;
579
+ eventId: string;
580
+ sessionId: string;
581
+ parentSessionId: string | null;
582
+ turnId: string | null;
583
+ callId: string;
584
+ occurredAt: string;
585
+ sequence: number;
586
+ adapterVersion: string;
587
+ sanitization: {
588
+ policyRevision: number;
589
+ policyHash: string;
590
+ redactedFields: number;
591
+ omittedFields: number;
592
+ truncated: boolean;
593
+ };
594
+ contentHash: string;
595
+ eventKind: "observation";
596
+ payload: {
597
+ attempt: {
598
+ id: string;
599
+ contentHash: string;
600
+ };
601
+ actionHash: string;
602
+ execution: "executed" | "not_executed" | "unknown";
603
+ sideEffects: "none" | "observed" | "possible" | "unknown";
604
+ resultExcerpt: string;
605
+ resultHash: string | null;
606
+ assets: {
607
+ id: string;
608
+ contentHash: string;
609
+ mediaType: "application/json" | "text/plain" | "text/x-diff" | "text/x-python";
610
+ sizeBytes: number;
611
+ purpose: "action" | "result" | "state" | "verification";
612
+ }[];
613
+ outcome: "succeeded";
614
+ exitCode: 0 | null;
615
+ } | {
616
+ attempt: {
617
+ id: string;
618
+ contentHash: string;
619
+ };
620
+ actionHash: string;
621
+ execution: "executed" | "not_executed" | "unknown";
622
+ sideEffects: "none" | "observed" | "possible" | "unknown";
623
+ resultExcerpt: string;
624
+ resultHash: string | null;
625
+ assets: {
626
+ id: string;
627
+ contentHash: string;
628
+ mediaType: "application/json" | "text/plain" | "text/x-diff" | "text/x-python";
629
+ sizeBytes: number;
630
+ purpose: "action" | "result" | "state" | "verification";
631
+ }[];
632
+ outcome: "failed";
633
+ classification: "authorization_denied" | "cancelled" | "execution_failure" | "infrastructure_failure" | "outcome_failure" | "process_failure" | "timeout" | "unknown_failure" | "validation_failure";
634
+ errorCode: string;
635
+ message: string;
636
+ exitCode: number | null;
637
+ } | {
638
+ attempt: {
639
+ id: string;
640
+ contentHash: string;
641
+ };
642
+ actionHash: string;
643
+ execution: "executed" | "not_executed" | "unknown";
644
+ sideEffects: "none" | "observed" | "possible" | "unknown";
645
+ resultExcerpt: string;
646
+ resultHash: string | null;
647
+ assets: {
648
+ id: string;
649
+ contentHash: string;
650
+ mediaType: "application/json" | "text/plain" | "text/x-diff" | "text/x-python";
651
+ sizeBytes: number;
652
+ purpose: "action" | "result" | "state" | "verification";
653
+ }[];
654
+ outcome: "incomplete";
655
+ reason: "completion_not_observed" | "coverage_gap" | "observer_restarted" | "transport_interrupted";
656
+ };
657
+ } | {
658
+ schemaVersion: "openpond.toolEpisodeEvent.v1";
659
+ operationId: string;
660
+ installationId: string;
661
+ episodeId: string;
662
+ eventId: string;
663
+ sessionId: string;
664
+ parentSessionId: string | null;
665
+ turnId: string | null;
666
+ callId: string;
667
+ occurredAt: string;
668
+ sequence: number;
669
+ adapterVersion: string;
670
+ sanitization: {
671
+ policyRevision: number;
672
+ policyHash: string;
673
+ redactedFields: number;
674
+ omittedFields: number;
675
+ truncated: boolean;
676
+ };
677
+ contentHash: string;
678
+ eventKind: "recovery_link";
679
+ payload: {
680
+ failedAttempt: {
681
+ id: string;
682
+ contentHash: string;
683
+ };
684
+ failedObservation: {
685
+ id: string;
686
+ contentHash: string;
687
+ };
688
+ replacementAttempt: {
689
+ id: string;
690
+ contentHash: string;
691
+ };
692
+ goalId: string;
693
+ basis: "artifact_lineage" | "explicit_relation" | "unverified";
694
+ attributionEvidence: {
695
+ id: string;
696
+ contentHash: string;
697
+ }[];
698
+ };
699
+ } | {
700
+ schemaVersion: "openpond.toolEpisodeEvent.v1";
701
+ operationId: string;
702
+ installationId: string;
703
+ episodeId: string;
704
+ eventId: string;
705
+ sessionId: string;
706
+ parentSessionId: string | null;
707
+ turnId: string | null;
708
+ callId: string;
709
+ occurredAt: string;
710
+ sequence: number;
711
+ adapterVersion: string;
712
+ sanitization: {
713
+ policyRevision: number;
714
+ policyHash: string;
715
+ redactedFields: number;
716
+ omittedFields: number;
717
+ truncated: boolean;
718
+ };
719
+ contentHash: string;
720
+ eventKind: "verification";
721
+ payload: {
722
+ attempt: {
723
+ id: string;
724
+ contentHash: string;
725
+ };
726
+ actionHash: string;
727
+ outcome: "failed" | "passed" | "unknown";
728
+ verifierRelease: {
729
+ id: string;
730
+ contentHash: string;
731
+ } | null;
732
+ verifierReceipt: {
733
+ id: string;
734
+ contentHash: string;
735
+ } | null;
736
+ environmentFingerprint: string;
737
+ resetStateHash: string | null;
738
+ outputArtifacts: {
739
+ id: string;
740
+ contentHash: string;
741
+ mediaType: "application/json" | "text/plain" | "text/x-diff" | "text/x-python";
742
+ sizeBytes: number;
743
+ purpose: "action" | "result" | "state" | "verification";
744
+ }[];
745
+ reason: string;
746
+ };
747
+ } | {
748
+ schemaVersion: "openpond.toolEpisodeEvent.v1";
749
+ operationId: string;
750
+ installationId: string;
751
+ episodeId: string;
752
+ eventId: string;
753
+ sessionId: string;
754
+ parentSessionId: string | null;
755
+ turnId: string | null;
756
+ callId: string;
757
+ occurredAt: string;
758
+ sequence: number;
759
+ adapterVersion: string;
760
+ sanitization: {
761
+ policyRevision: number;
762
+ policyHash: string;
763
+ redactedFields: number;
764
+ omittedFields: number;
765
+ truncated: boolean;
766
+ };
767
+ contentHash: string;
768
+ eventKind: "lineage";
769
+ payload: {
770
+ relation: "fork" | "reopen" | "split";
771
+ parentEpisode: {
772
+ id: string;
773
+ contentHash: string;
774
+ };
775
+ parentSessionId: string;
776
+ reason: string;
777
+ };
778
+ })[];
779
+ state: "ambiguous" | "awaiting_owner_review" | "incomplete";
780
+ assembly: {
781
+ state: "ambiguous" | "awaiting_owner_review" | "incomplete";
782
+ issues: ("completion_not_observed" | "conflicting_event" | "conflicting_observations" | "lineage_mismatch" | "missing_attempt" | "missing_observation" | "mixed_scope" | "reference_mismatch")[];
783
+ groups: {
784
+ key: string;
785
+ application: string;
786
+ applicationVersion: string;
787
+ tool: {
788
+ name: string;
789
+ version: string | null;
790
+ server: string | null;
791
+ };
792
+ environmentFingerprints: string[];
793
+ attempts: {
794
+ id: string;
795
+ contentHash: string;
796
+ }[];
797
+ }[];
798
+ };
799
+ verificationAuthority: "not_granted";
800
+ learningEnrollment: false;
801
+ }>;
802
+ purge(installationId: string, input: {
803
+ operationId: string;
804
+ expectedRevision: number;
805
+ }, signal?: AbortSignal): Promise<{
806
+ installationId: string;
807
+ operationId: string;
808
+ purgedEvents: number;
809
+ learningEnrollment: false;
810
+ }>;
811
+ project(installationId: string, value: z.input<typeof ToolLearningProjectionRequestSchema>, signal?: AbortSignal): Promise<{
812
+ installationId: string;
813
+ projectId: string;
814
+ operationId: string;
815
+ source: {
816
+ id: string;
817
+ contentHash: string;
818
+ revision: number;
819
+ };
820
+ evidence: {
821
+ id: string;
822
+ contentHash: string;
823
+ revision: number;
824
+ };
825
+ originHash: string;
826
+ requestHash: string;
827
+ projectedAt: string;
828
+ targetApproval: "pending_owner_review";
829
+ learningEnrollment: false;
830
+ }>;
831
+ setState(id: string, value: z.input<typeof ToolLearningInstallationUpdateSchema>, signal?: AbortSignal): Promise<{
832
+ schemaVersion: "openpond.toolLearningInstallation.v1";
833
+ id: string;
834
+ revision: number;
835
+ scope: {
836
+ teamId: string;
837
+ projectId: string;
838
+ };
839
+ ownerUserId: string;
840
+ machineSourceId: string;
841
+ client: "claude_code" | "codex" | "opencode" | "openpond";
842
+ clientVersion: string;
843
+ adapterRelease: {
844
+ id: string;
845
+ contentHash: string;
846
+ };
847
+ state: "disabled" | "enabled" | "pending_client_trust" | "revoked";
848
+ collectionPolicy: {
849
+ revision: number;
850
+ permittedTools: string[];
851
+ workspaceRootHashes: string[];
852
+ permittedFields: ("action" | "artifact_reference" | "intent" | "result_excerpt" | "state")[];
853
+ unchangedControls: {
854
+ numerator: number;
855
+ denominator: number;
856
+ };
857
+ maximumEventBytes: number;
858
+ maximumEpisodeBytes: number;
859
+ maximumEpisodeEvents: number;
860
+ maximumQueueBytes: number;
861
+ maximumQueueEvents: number;
862
+ maximumQueueAgeSeconds: number;
863
+ rawRetentionDays: number;
864
+ purposes: ("capture" | "consultation")[];
865
+ modelUpdates: "requires_separate_review";
866
+ variantGeneration: "disabled";
867
+ };
868
+ collectionPolicyHash: string;
869
+ coverage: {
870
+ receipt: {
871
+ id: string;
872
+ contentHash: string;
873
+ } | null;
874
+ start: "documented" | "observed" | "unqualified" | "unsupported";
875
+ resume: "documented" | "observed" | "unqualified" | "unsupported";
876
+ compaction: "documented" | "observed" | "unqualified" | "unsupported";
877
+ executionFailure: "documented" | "observed" | "unqualified" | "unsupported";
878
+ processFailure: "documented" | "observed" | "unqualified" | "unsupported";
879
+ validationFailure: "documented" | "observed" | "unqualified" | "unsupported";
880
+ nestedCalls: "documented" | "observed" | "unqualified" | "unsupported";
881
+ contextRefresh: "revision_aware_turn" | "session_start" | "start_resume" | "start_resume_compaction" | "unqualified";
882
+ gaps: string[];
883
+ };
884
+ credential: {
885
+ id: string;
886
+ expiresAt: string;
887
+ revokedAt: string | null;
888
+ capabilities: ("consultation_read" | "consultation_submit" | "episode_append" | "manifest_read")[];
889
+ } | null;
890
+ createdAt: string;
891
+ updatedAt: string;
892
+ }>;
893
+ append(value: ToolEpisodeAppend, signal?: AbortSignal): Promise<{
894
+ schemaVersion: "openpond.toolEpisodeAppendReceipt.v1";
895
+ operationId: string;
896
+ requestHash: string;
897
+ installationId: string;
898
+ teamId: string;
899
+ projectId: string;
900
+ receivedAt: string;
901
+ events: {
902
+ eventId: string;
903
+ contentHash: string;
904
+ state: "already_retained" | "privacy_rejected" | "retained";
905
+ receiptId: string;
906
+ reason: string | null;
907
+ }[];
908
+ learningEnrollment: false;
909
+ }>;
910
+ routing(installationId: string, signal?: AbortSignal): Promise<{
911
+ installationId: string;
912
+ scope: {
913
+ teamId: string;
914
+ projectId: string;
915
+ };
916
+ revision: number;
917
+ operationId: string;
918
+ requestHash: string;
919
+ configuration: {
920
+ operationId: string;
921
+ expectedRevision: number;
922
+ state: "disabled" | "enabled";
923
+ modelId: string;
924
+ qualification: {
925
+ kind: "integration";
926
+ evaluationRunId: string;
927
+ } | {
928
+ kind: "learned";
929
+ evaluationRunId: string;
930
+ baselineRunId: string;
931
+ trainingRunId: string;
932
+ };
933
+ capabilities: {
934
+ id: string;
935
+ application: string;
936
+ versions: string[];
937
+ tools: string[];
938
+ mode: "recovery";
939
+ routingInstruction: string;
940
+ }[];
941
+ limits: {
942
+ maxOutputTokens: number;
943
+ maximumCallUsd: number;
944
+ maximumDayUsd: number;
945
+ maximumSessionCalls: number;
946
+ maximumDayCalls: number;
947
+ };
948
+ };
949
+ modelRelease: {
950
+ id: string;
951
+ contentHash: string;
952
+ };
953
+ policySystemPrompt: string;
954
+ capabilities: {
955
+ id: string;
956
+ application: string;
957
+ versions: string[];
958
+ tools: string[];
959
+ mode: "recovery";
960
+ routingInstruction: string;
961
+ qualification: {
962
+ kind: "integration";
963
+ receipt: {
964
+ id: string;
965
+ contentHash: string;
966
+ };
967
+ } | {
968
+ kind: "learned";
969
+ receipt: {
970
+ id: string;
971
+ contentHash: string;
972
+ };
973
+ trainingRun: {
974
+ id: string;
975
+ contentHash: string;
976
+ };
977
+ adapter: {
978
+ id: string;
979
+ contentHash: string;
980
+ };
981
+ evaluation: {
982
+ id: string;
983
+ contentHash: string;
984
+ };
985
+ activation: {
986
+ id: string;
987
+ contentHash: string;
988
+ };
989
+ };
990
+ }[];
991
+ updatedAt: string;
992
+ }>;
993
+ configureRouting(installationId: string, value: z.input<typeof ToolLearningRoutingRequestSchema>, signal?: AbortSignal): Promise<{
994
+ installationId: string;
995
+ scope: {
996
+ teamId: string;
997
+ projectId: string;
998
+ };
999
+ revision: number;
1000
+ operationId: string;
1001
+ requestHash: string;
1002
+ configuration: {
1003
+ operationId: string;
1004
+ expectedRevision: number;
1005
+ state: "disabled" | "enabled";
1006
+ modelId: string;
1007
+ qualification: {
1008
+ kind: "integration";
1009
+ evaluationRunId: string;
1010
+ } | {
1011
+ kind: "learned";
1012
+ evaluationRunId: string;
1013
+ baselineRunId: string;
1014
+ trainingRunId: string;
1015
+ };
1016
+ capabilities: {
1017
+ id: string;
1018
+ application: string;
1019
+ versions: string[];
1020
+ tools: string[];
1021
+ mode: "recovery";
1022
+ routingInstruction: string;
1023
+ }[];
1024
+ limits: {
1025
+ maxOutputTokens: number;
1026
+ maximumCallUsd: number;
1027
+ maximumDayUsd: number;
1028
+ maximumSessionCalls: number;
1029
+ maximumDayCalls: number;
1030
+ };
1031
+ };
1032
+ modelRelease: {
1033
+ id: string;
1034
+ contentHash: string;
1035
+ };
1036
+ policySystemPrompt: string;
1037
+ capabilities: {
1038
+ id: string;
1039
+ application: string;
1040
+ versions: string[];
1041
+ tools: string[];
1042
+ mode: "recovery";
1043
+ routingInstruction: string;
1044
+ qualification: {
1045
+ kind: "integration";
1046
+ receipt: {
1047
+ id: string;
1048
+ contentHash: string;
1049
+ };
1050
+ } | {
1051
+ kind: "learned";
1052
+ receipt: {
1053
+ id: string;
1054
+ contentHash: string;
1055
+ };
1056
+ trainingRun: {
1057
+ id: string;
1058
+ contentHash: string;
1059
+ };
1060
+ adapter: {
1061
+ id: string;
1062
+ contentHash: string;
1063
+ };
1064
+ evaluation: {
1065
+ id: string;
1066
+ contentHash: string;
1067
+ };
1068
+ activation: {
1069
+ id: string;
1070
+ contentHash: string;
1071
+ };
1072
+ };
1073
+ }[];
1074
+ updatedAt: string;
1075
+ }>;
1076
+ manifest(installationId: string, signal?: AbortSignal): Promise<{
1077
+ schemaVersion: "openpond.toolLearningManifest.v1";
1078
+ installationId: string;
1079
+ scope: {
1080
+ teamId: string;
1081
+ projectId: string;
1082
+ };
1083
+ revision: number;
1084
+ contentHash: string;
1085
+ issuedAt: string;
1086
+ expiresAt: string;
1087
+ modelRelease: {
1088
+ id: string;
1089
+ contentHash: string;
1090
+ };
1091
+ responseSchema: "openpond.toolLearningDecision.v1";
1092
+ capabilities: {
1093
+ id: string;
1094
+ application: string;
1095
+ versions: string[];
1096
+ tools: string[];
1097
+ mode: "recovery";
1098
+ routingInstruction: string;
1099
+ qualification: {
1100
+ kind: "integration";
1101
+ receipt: {
1102
+ id: string;
1103
+ contentHash: string;
1104
+ };
1105
+ } | {
1106
+ kind: "learned";
1107
+ receipt: {
1108
+ id: string;
1109
+ contentHash: string;
1110
+ };
1111
+ trainingRun: {
1112
+ id: string;
1113
+ contentHash: string;
1114
+ };
1115
+ adapter: {
1116
+ id: string;
1117
+ contentHash: string;
1118
+ };
1119
+ evaluation: {
1120
+ id: string;
1121
+ contentHash: string;
1122
+ };
1123
+ activation: {
1124
+ id: string;
1125
+ contentHash: string;
1126
+ };
1127
+ };
1128
+ }[];
1129
+ }>;
1130
+ consult(value: ToolLearningConsultationRequest, signal?: AbortSignal): Promise<{
1131
+ operationId: string;
1132
+ installationId: string;
1133
+ capabilityId: string;
1134
+ manifestHash: string;
1135
+ modelRelease: {
1136
+ id: string;
1137
+ contentHash: string;
1138
+ };
1139
+ actionHash: string;
1140
+ contextHash: string;
1141
+ schemaVersion: "openpond.toolLearningDecision.v1";
1142
+ state: "completed";
1143
+ decision: {
1144
+ decision: "proceed";
1145
+ } | {
1146
+ decision: "revise";
1147
+ issues: {
1148
+ category: string;
1149
+ feedback: string;
1150
+ }[];
1151
+ } | {
1152
+ decision: "needs_context";
1153
+ missing: {
1154
+ field: string;
1155
+ reason: string;
1156
+ }[];
1157
+ };
1158
+ usageReceipt: {
1159
+ id: string;
1160
+ contentHash: string;
1161
+ };
1162
+ completedAt: string;
1163
+ } | {
1164
+ operationId: string;
1165
+ installationId: string;
1166
+ capabilityId: string;
1167
+ manifestHash: string;
1168
+ modelRelease: {
1169
+ id: string;
1170
+ contentHash: string;
1171
+ };
1172
+ actionHash: string;
1173
+ contextHash: string;
1174
+ schemaVersion: "openpond.toolLearningDecision.v1";
1175
+ state: "unavailable";
1176
+ reason: "budget_exhausted" | "cancelled" | "disabled" | "dispatch_uncertain" | "expired_manifest" | "invalid_output" | "revoked" | "timeout" | "unsupported_scope";
1177
+ usageReceipt: {
1178
+ id: string;
1179
+ contentHash: string;
1180
+ } | null;
1181
+ }>;
1182
+ consultation(value: ToolLearningConsultationRequest, signal?: AbortSignal): Promise<{
1183
+ operationId: string;
1184
+ installationId: string;
1185
+ capabilityId: string;
1186
+ manifestHash: string;
1187
+ modelRelease: {
1188
+ id: string;
1189
+ contentHash: string;
1190
+ };
1191
+ actionHash: string;
1192
+ contextHash: string;
1193
+ schemaVersion: "openpond.toolLearningDecision.v1";
1194
+ state: "completed";
1195
+ decision: {
1196
+ decision: "proceed";
1197
+ } | {
1198
+ decision: "revise";
1199
+ issues: {
1200
+ category: string;
1201
+ feedback: string;
1202
+ }[];
1203
+ } | {
1204
+ decision: "needs_context";
1205
+ missing: {
1206
+ field: string;
1207
+ reason: string;
1208
+ }[];
1209
+ };
1210
+ usageReceipt: {
1211
+ id: string;
1212
+ contentHash: string;
1213
+ };
1214
+ completedAt: string;
1215
+ } | {
1216
+ operationId: string;
1217
+ installationId: string;
1218
+ capabilityId: string;
1219
+ manifestHash: string;
1220
+ modelRelease: {
1221
+ id: string;
1222
+ contentHash: string;
1223
+ };
1224
+ actionHash: string;
1225
+ contextHash: string;
1226
+ schemaVersion: "openpond.toolLearningDecision.v1";
1227
+ state: "unavailable";
1228
+ reason: "budget_exhausted" | "cancelled" | "disabled" | "dispatch_uncertain" | "expired_manifest" | "invalid_output" | "revoked" | "timeout" | "unsupported_scope";
1229
+ usageReceipt: {
1230
+ id: string;
1231
+ contentHash: string;
1232
+ } | null;
1233
+ }>;
1234
+ }
1235
+ export {};
1236
+ //# sourceMappingURL=tool-learning-client.d.ts.map