@onesi/genesis 0.1.13 → 0.2.0

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 (69) hide show
  1. package/README.md +1 -1
  2. package/dist/auto.d.ts +1010 -0
  3. package/dist/auto.js +125 -0
  4. package/dist/beacons.d.ts +42 -0
  5. package/dist/beacons.js +71 -0
  6. package/dist/blinds-owner-enrollment.d.ts +109 -0
  7. package/dist/blinds-owner-enrollment.js +21 -2
  8. package/dist/client.d.ts +3 -19947
  9. package/dist/client.js +124 -17
  10. package/dist/errors.js +1 -1
  11. package/dist/flares.d.ts +32 -0
  12. package/dist/flares.js +5 -0
  13. package/dist/fleets.d.ts +32 -0
  14. package/dist/fleets.js +59 -6
  15. package/dist/flocks.d.ts +285 -1
  16. package/dist/flocks.js +59 -0
  17. package/dist/foundry.d.ts +424 -0
  18. package/dist/foundry.js +133 -0
  19. package/dist/garden.d.ts +754 -0
  20. package/dist/garden.js +76 -0
  21. package/dist/gateway.d.ts +365 -0
  22. package/dist/gateway.js +82 -0
  23. package/dist/gears.d.ts +121 -2
  24. package/dist/gears.js +24 -2
  25. package/dist/generated/operations.d.ts +3 -19948
  26. package/dist/generated/operations.js +54590 -13302
  27. package/dist/generated/schema.d.ts +69793 -17548
  28. package/dist/genesis.d.ts +7908 -1260
  29. package/dist/genesis.js +90 -25
  30. package/dist/genesis.openapi.json +109121 -29920
  31. package/dist/henry.d.ts +202 -1
  32. package/dist/henry.js +223 -0
  33. package/dist/hives-environment.d.ts +9 -0
  34. package/dist/hives-environment.js +22 -0
  35. package/dist/hives-node.js +3 -0
  36. package/dist/hives-operations.d.ts +114 -0
  37. package/dist/hives-operations.js +2 -0
  38. package/dist/hives-platform.d.ts +149 -0
  39. package/dist/hives-platform.js +183 -0
  40. package/dist/hives-sse.d.ts +24 -0
  41. package/dist/hives-sse.js +111 -0
  42. package/dist/iam-directory.d.ts +8 -0
  43. package/dist/iam-directory.js +23 -0
  44. package/dist/iam.d.ts +391 -0
  45. package/dist/iam.js +92 -0
  46. package/dist/idempotency.d.ts +3 -0
  47. package/dist/idempotency.js +22 -0
  48. package/dist/index.d.ts +18 -4
  49. package/dist/index.js +16 -4
  50. package/dist/instances.d.ts +177 -2
  51. package/dist/instances.js +37 -5
  52. package/dist/minds-agent.d.ts +28 -0
  53. package/dist/minds-agent.js +53 -10
  54. package/dist/minds-engine.d.ts +394 -0
  55. package/dist/minds-engine.js +555 -0
  56. package/dist/minds.d.ts +109 -1
  57. package/dist/minds.js +49 -14
  58. package/dist/orgs.d.ts +405 -0
  59. package/dist/orgs.js +63 -0
  60. package/dist/runner.d.ts +4 -0
  61. package/dist/runner.js +1 -0
  62. package/dist/scopes.d.ts +310 -0
  63. package/dist/scopes.js +40 -0
  64. package/dist/taps.d.ts +118 -0
  65. package/dist/taps.js +45 -0
  66. package/dist/traces.d.ts +574 -0
  67. package/dist/traces.js +97 -0
  68. package/dist/types.d.ts +12 -1
  69. package/package.json +1 -1
@@ -0,0 +1,424 @@
1
+ import type { GenesisClient } from './client.js';
2
+ import type { OperationInput as In } from './types.js';
3
+ /** Foundry through the gateway (gateway/src/foundry-native.ts). Inference, receipts and key info are delegated for a
4
+ * login session; an org API key gets 403 FOUNDRY_HUMAN_SESSION_REQUIRED until Foundry admits key principals. A One app
5
+ * sign-in (`pf_one`) gets the prepaid child, which Foundry admits only for chat, responses, embeddings and messages;
6
+ * `universal`, `routing`, `tools`, `workloads`, `generation` and `keys.current` work today with a Console login (`pf_console`). Registry reads are public. Key writes are gateway-native and need an idempotency key.
7
+ * Canonical model ids are `vendor/name`: their `/` is sent as a path separator. */
8
+ export declare function foundryModule(client: GenesisClient): {
9
+ /** Anthropic Messages (Foundry /api/v1/messages). */
10
+ messages: (body: In<"foundry_createMessage">["body"]) => Promise<{
11
+ id: string;
12
+ model?: string;
13
+ content: {
14
+ [key: string]: unknown;
15
+ }[];
16
+ usage?: import("./index.js").components["schemas"]["Foundry.Usage"];
17
+ foundry?: import("./index.js").components["schemas"]["Foundry.RequestMetadata"];
18
+ } & {
19
+ [key: string]: unknown;
20
+ }>;
21
+ responses: (body: In<"foundry_createResponse">["body"]) => Promise<{
22
+ id: string;
23
+ object?: string;
24
+ model?: string;
25
+ output?: {
26
+ [key: string]: unknown;
27
+ }[];
28
+ usage?: import("./index.js").components["schemas"]["Foundry.Usage"];
29
+ foundry?: import("./index.js").components["schemas"]["Foundry.RequestMetadata"];
30
+ } & {
31
+ [key: string]: unknown;
32
+ }>;
33
+ rerank: (body: In<"foundry_createRerank">["body"]) => Promise<unknown>;
34
+ images: {
35
+ create: (body: In<"foundry_createImage">["body"]) => Promise<unknown>;
36
+ models: () => Promise<{
37
+ data: {
38
+ [key: string]: unknown;
39
+ }[];
40
+ } & {
41
+ [key: string]: unknown;
42
+ }>;
43
+ };
44
+ transcribe: (body: In<"foundry_createAudioTranscription">["body"]) => Promise<unknown>;
45
+ receipts: {
46
+ get: (receipt_id: string) => Promise<{
47
+ version?: string;
48
+ receipt_id: string;
49
+ request_id: string;
50
+ model_id?: string;
51
+ provider_id?: string;
52
+ lane?: "pay_as_you_go" | "subscription_entitled" | "byok";
53
+ usage?: import("./index.js").components["schemas"]["Foundry.Usage"];
54
+ signature?: string;
55
+ } & {
56
+ [key: string]: unknown;
57
+ }>;
58
+ byRequest: (request_id: string) => Promise<{
59
+ version?: string;
60
+ receipt_id: string;
61
+ request_id: string;
62
+ model_id?: string;
63
+ provider_id?: string;
64
+ lane?: "pay_as_you_go" | "subscription_entitled" | "byok";
65
+ usage?: import("./index.js").components["schemas"]["Foundry.Usage"];
66
+ signature?: string;
67
+ } & {
68
+ [key: string]: unknown;
69
+ }>;
70
+ verificationKey: () => Promise<{
71
+ [key: string]: unknown;
72
+ }>;
73
+ };
74
+ keys: {
75
+ list: () => Promise<{
76
+ [key: string]: unknown;
77
+ }>;
78
+ create: (body: In<"foundry_createApiKey">["body"], idempotencyKey: string) => Promise<{
79
+ [key: string]: unknown;
80
+ }>;
81
+ delete: (key_id: string, idempotencyKey: string) => Promise<{
82
+ [key: string]: unknown;
83
+ }>;
84
+ rotate: (key_id: string, idempotencyKey: string) => Promise<{
85
+ [key: string]: unknown;
86
+ }>;
87
+ /** The Foundry credential the call carried (through the gateway: your login's delegated identity). */
88
+ current: () => Promise<{
89
+ [key: string]: unknown;
90
+ }>;
91
+ };
92
+ reporting: {
93
+ requestLogs: (q?: In<"foundry_listRequestLogs">) => Promise<{
94
+ data: {
95
+ id: string;
96
+ timestamp: string;
97
+ model: string;
98
+ provider: string;
99
+ status: number;
100
+ prompt_tokens: number;
101
+ completion_tokens: number;
102
+ total_tokens: number;
103
+ latency_ms: number;
104
+ estimated_cost_microdollars: number;
105
+ }[];
106
+ scope: import("./index.js").components["schemas"]["Foundry.ReportingScope"];
107
+ meta: {
108
+ limit: number;
109
+ offset: number;
110
+ total_count: number;
111
+ has_more: boolean;
112
+ };
113
+ }>;
114
+ providerCredentials: () => Promise<{
115
+ data: {
116
+ object: "provider_credential_summary";
117
+ source: string;
118
+ generated_at: string;
119
+ complete: boolean;
120
+ consistency: string;
121
+ configuration_only: boolean;
122
+ health_verified: boolean;
123
+ execution_verified: boolean;
124
+ default_credential_mode: string;
125
+ credential_count: number;
126
+ enabled_credential_count: number;
127
+ credentials: {
128
+ provider_id: string;
129
+ enabled?: boolean;
130
+ created_at: string;
131
+ updated_at: string;
132
+ credential_mode: "platform" | "prefer_byok" | "require_byok";
133
+ }[];
134
+ policies: {
135
+ provider_id: string;
136
+ enabled?: boolean;
137
+ created_at: string;
138
+ updated_at: string;
139
+ credential_mode: "platform" | "prefer_byok" | "require_byok";
140
+ }[];
141
+ };
142
+ scope: import("./index.js").components["schemas"]["Foundry.ReportingScope"];
143
+ }>;
144
+ };
145
+ /** Refused to every caller today: Foundry gates these on its `admin` scope (403 SCOPE_MISSING). */
146
+ activity: {
147
+ list: (q?: In<"foundry_getActivity">) => Promise<{
148
+ [key: string]: unknown;
149
+ }>;
150
+ export: (q?: In<"foundry_exportActivity">) => Promise<{
151
+ [key: string]: unknown;
152
+ }>;
153
+ };
154
+ analytics: {
155
+ meta: () => Promise<{
156
+ [key: string]: unknown;
157
+ }>;
158
+ query: (body: In<"foundry_queryAnalytics">["body"]) => Promise<{
159
+ [key: string]: unknown;
160
+ }>;
161
+ };
162
+ /** Foundry universal API (/foundry/v1/*): `infer` for any modality, or a task wrapper. Paid. */
163
+ universal: {
164
+ infer: (body: In<"foundry_createInference">["body"]) => Promise<{
165
+ [key: string]: unknown;
166
+ }>;
167
+ /** Server-sent events: the raw Response. */
168
+ inferStream: (body: In<"foundry_streamInference">["body"]) => Promise<unknown>;
169
+ classify: (body: In<"foundry_classifyText">["body"]) => Promise<{
170
+ [key: string]: unknown;
171
+ }>;
172
+ detect: (body: In<"foundry_detectObjects">["body"]) => Promise<{
173
+ [key: string]: unknown;
174
+ }>;
175
+ segment: (body: In<"foundry_segmentImage">["body"]) => Promise<{
176
+ [key: string]: unknown;
177
+ }>;
178
+ embed: (body: In<"foundry_embedTexts">["body"]) => Promise<{
179
+ [key: string]: unknown;
180
+ }>;
181
+ transcribe: (body: In<"foundry_transcribeAudio">["body"]) => Promise<{
182
+ [key: string]: unknown;
183
+ }>;
184
+ speak: (body: In<"foundry_synthesizeSpeech">["body"]) => Promise<{
185
+ [key: string]: unknown;
186
+ }>;
187
+ generateImage: (body: In<"foundry_generateImage">["body"]) => Promise<{
188
+ [key: string]: unknown;
189
+ }>;
190
+ predict: (body: In<"foundry_predictTabular">["body"]) => Promise<{
191
+ [key: string]: unknown;
192
+ }>;
193
+ forecast: (body: In<"foundry_forecastSeries">["body"]) => Promise<{
194
+ [key: string]: unknown;
195
+ }>;
196
+ recommend: (body: In<"foundry_recommendItems">["body"]) => Promise<{
197
+ [key: string]: unknown;
198
+ }>;
199
+ annotate: (body: In<"foundry_annotateText">["body"]) => Promise<{
200
+ [key: string]: unknown;
201
+ }>;
202
+ summarize: (body: In<"foundry_summarizeText">["body"]) => Promise<{
203
+ [key: string]: unknown;
204
+ }>;
205
+ };
206
+ /** Routing preview, explanation and eval planning: compute only. */
207
+ routing: {
208
+ preview: (body: In<"foundry_previewRoute">["body"]) => Promise<{
209
+ candidates?: {
210
+ [key: string]: unknown;
211
+ }[];
212
+ selected?: {
213
+ [key: string]: unknown;
214
+ };
215
+ executable?: boolean;
216
+ billing_lane?: string;
217
+ } & {
218
+ [key: string]: unknown;
219
+ }>;
220
+ explain: (id: string) => Promise<{
221
+ [key: string]: unknown;
222
+ }>;
223
+ evals: {
224
+ plan: (body: In<"foundry_planRoutingEval">["body"]) => Promise<{
225
+ [key: string]: unknown;
226
+ }>;
227
+ dispatchPlan: (body: In<"foundry_dispatchRoutingEvalPlan">["body"]) => Promise<{
228
+ [key: string]: unknown;
229
+ }>;
230
+ aggregateDispatch: (body: In<"foundry_aggregateRoutingEvalDispatch">["body"]) => Promise<{
231
+ [key: string]: unknown;
232
+ }>;
233
+ aggregatePlanned: (body: In<"foundry_aggregatePlannedRoutingEval">["body"]) => Promise<{
234
+ [key: string]: unknown;
235
+ }>;
236
+ aggregate: (body: In<"foundry_aggregateRoutingEval">["body"]) => Promise<{
237
+ [key: string]: unknown;
238
+ }>;
239
+ claimReadiness: (body: In<"foundry_checkRoutingEvalClaimReadiness">["body"]) => Promise<{
240
+ [key: string]: unknown;
241
+ }>;
242
+ };
243
+ };
244
+ /** Cost and model comparison estimates: compute only, no provider call. */
245
+ tools: {
246
+ costEstimate: (body: In<"foundry_estimateCost">["body"]) => Promise<{
247
+ [key: string]: unknown;
248
+ }>;
249
+ compare: (body: In<"foundry_compareModels">["body"]) => Promise<{
250
+ [key: string]: unknown;
251
+ }>;
252
+ benchmark: (body: In<"foundry_benchmarkModels">["body"]) => Promise<{
253
+ [key: string]: unknown;
254
+ }>;
255
+ };
256
+ workloads: {
257
+ status: (workload_id: string) => Promise<{
258
+ [key: string]: unknown;
259
+ }>;
260
+ terminate: (workload_id: string) => Promise<{
261
+ [key: string]: unknown;
262
+ }>;
263
+ };
264
+ /** OpenRouter-style generation lookup by request id; content and feedback need Foundry `admin` (refused today). */
265
+ generation: {
266
+ get: (id: string) => Promise<{
267
+ data: {
268
+ id?: string;
269
+ request_id?: string;
270
+ model?: string;
271
+ provider_name?: string;
272
+ is_byok?: boolean;
273
+ total_cost?: number;
274
+ foundry_receipt?: import("./index.js").components["schemas"]["Foundry.JsonObject"];
275
+ } & {
276
+ [key: string]: unknown;
277
+ };
278
+ } & {
279
+ [key: string]: unknown;
280
+ }>;
281
+ content: (id: string) => Promise<{
282
+ [key: string]: unknown;
283
+ }>;
284
+ feedback: (body: In<"foundry_submitGenerationFeedback">["body"]) => Promise<{
285
+ [key: string]: unknown;
286
+ }>;
287
+ };
288
+ batches: {
289
+ create: (body: In<"foundry_createBatch">["body"]) => Promise<{
290
+ id: string;
291
+ status: string;
292
+ endpoint?: string;
293
+ input_file_id?: string;
294
+ output_file_id?: string | null;
295
+ request_counts?: {
296
+ [key: string]: unknown;
297
+ };
298
+ metadata?: {
299
+ [key: string]: unknown;
300
+ };
301
+ } & {
302
+ [key: string]: unknown;
303
+ }>;
304
+ get: (batch_id: string) => Promise<{
305
+ id: string;
306
+ status: string;
307
+ endpoint?: string;
308
+ input_file_id?: string;
309
+ output_file_id?: string | null;
310
+ request_counts?: {
311
+ [key: string]: unknown;
312
+ };
313
+ metadata?: {
314
+ [key: string]: unknown;
315
+ };
316
+ } & {
317
+ [key: string]: unknown;
318
+ }>;
319
+ };
320
+ };
321
+ /** Public registry reads, V1 and paginated V2. */
322
+ export declare function foundryRegistry(client: GenesisClient): {
323
+ models: (q?: In<"foundry_listRegistryModels">) => Promise<{
324
+ [key: string]: unknown;
325
+ }>;
326
+ model: (canonical_model_id: string) => Promise<{
327
+ [key: string]: unknown;
328
+ }>;
329
+ offers: (canonical_model_id: string) => Promise<{
330
+ [key: string]: unknown;
331
+ }>;
332
+ dossier: (canonical_model_id: string) => Promise<{
333
+ [key: string]: unknown;
334
+ }>;
335
+ benchmarks: (canonical_model_id: string) => Promise<{
336
+ [key: string]: unknown;
337
+ }>;
338
+ sources: (canonical_model_id: string) => Promise<{
339
+ [key: string]: unknown;
340
+ }>;
341
+ providers: () => Promise<{
342
+ [key: string]: unknown;
343
+ }>;
344
+ provider: (provider_id: string) => Promise<{
345
+ [key: string]: unknown;
346
+ }>;
347
+ providerDossier: (provider_id: string) => Promise<{
348
+ [key: string]: unknown;
349
+ }>;
350
+ facets: () => Promise<{
351
+ [key: string]: unknown;
352
+ }>;
353
+ modelBase: () => Promise<{
354
+ [key: string]: unknown;
355
+ }>;
356
+ modelBaseReleases: () => Promise<{
357
+ [key: string]: unknown;
358
+ }>;
359
+ labs: () => Promise<{
360
+ [key: string]: unknown;
361
+ }>;
362
+ lab: (lab_id: string) => Promise<{
363
+ [key: string]: unknown;
364
+ }>;
365
+ compare: (q?: In<"foundry_compareRegistryModels">) => Promise<{
366
+ [key: string]: unknown;
367
+ }>;
368
+ v2: {
369
+ models: (q?: In<"foundry_listRegistryModelsV2">) => Promise<{
370
+ [key: string]: unknown;
371
+ }>;
372
+ model: (canonical_model_id: string) => Promise<{
373
+ [key: string]: unknown;
374
+ }>;
375
+ dossier: (canonical_model_id: string) => Promise<{
376
+ [key: string]: unknown;
377
+ }>;
378
+ providers: (q?: In<"foundry_listRegistryProvidersV2">) => Promise<{
379
+ [key: string]: unknown;
380
+ }>;
381
+ provider: (provider_id: string) => Promise<{
382
+ [key: string]: unknown;
383
+ }>;
384
+ facets: () => Promise<{
385
+ [key: string]: unknown;
386
+ }>;
387
+ modelBase: () => Promise<{
388
+ [key: string]: unknown;
389
+ }>;
390
+ modelBaseReleases: () => Promise<{
391
+ [key: string]: unknown;
392
+ }>;
393
+ labs: (q?: In<"foundry_listRegistryLabsV2">) => Promise<{
394
+ [key: string]: unknown;
395
+ }>;
396
+ lab: (lab_id: string) => Promise<{
397
+ [key: string]: unknown;
398
+ }>;
399
+ compare: () => Promise<{
400
+ [key: string]: unknown;
401
+ }>;
402
+ benchmarks: (q?: In<"foundry_listRegistryBenchmarksV2">) => Promise<{
403
+ version: 2;
404
+ snapshot: {
405
+ [key: string]: unknown;
406
+ };
407
+ data: import("./index.js").components["schemas"]["Foundry.PublicBenchmarkV2"][];
408
+ count: number;
409
+ page: {
410
+ count: number;
411
+ total: number;
412
+ limit: number;
413
+ next_cursor?: string | null;
414
+ has_more: boolean;
415
+ };
416
+ }>;
417
+ sources: (q?: In<"foundry_listRegistrySourcesV2">) => Promise<{
418
+ [key: string]: unknown;
419
+ }>;
420
+ provenance: (q?: In<"foundry_listRegistryProvenanceV2">) => Promise<{
421
+ [key: string]: unknown;
422
+ }>;
423
+ };
424
+ };
@@ -0,0 +1,133 @@
1
+ import { idempotencyHeaders } from './idempotency.js';
2
+ /** Foundry through the gateway (gateway/src/foundry-native.ts). Inference, receipts and key info are delegated for a
3
+ * login session; an org API key gets 403 FOUNDRY_HUMAN_SESSION_REQUIRED until Foundry admits key principals. A One app
4
+ * sign-in (`pf_one`) gets the prepaid child, which Foundry admits only for chat, responses, embeddings and messages;
5
+ * `universal`, `routing`, `tools`, `workloads`, `generation` and `keys.current` work today with a Console login (`pf_console`). Registry reads are public. Key writes are gateway-native and need an idempotency key.
6
+ * Canonical model ids are `vendor/name`: their `/` is sent as a path separator. */
7
+ export function foundryModule(client) {
8
+ const key = (id, k) => ({ headers: idempotencyHeaders(id, k) });
9
+ return {
10
+ /** Anthropic Messages (Foundry /api/v1/messages). */
11
+ messages: (body) => client.request('foundry_createMessage', { body }),
12
+ responses: (body) => client.request('foundry_createResponse', { body }),
13
+ rerank: (body) => client.request('foundry_createRerank', { body }),
14
+ images: {
15
+ create: (body) => client.request('foundry_createImage', { body }),
16
+ models: () => client.request('foundry_listImageModels'),
17
+ },
18
+ transcribe: (body) => client.request('foundry_createAudioTranscription', { body }),
19
+ receipts: {
20
+ get: (receipt_id) => client.request('foundry_getGenerationReceipt', { receipt_id }),
21
+ byRequest: (request_id) => client.request('foundry_getGenerationReceiptByRequest', { request_id }),
22
+ verificationKey: () => client.request('foundry_getReceiptVerificationKey'),
23
+ },
24
+ keys: {
25
+ list: () => client.request('foundry_listApiKeys'),
26
+ create: async (body, idempotencyKey) => client.request('foundry_createApiKey', { body }, key('foundry_createApiKey', idempotencyKey)),
27
+ delete: async (key_id, idempotencyKey) => client.request('foundry_deleteApiKey', { key_id }, key('foundry_deleteApiKey', idempotencyKey)),
28
+ rotate: async (key_id, idempotencyKey) => client.request('foundry_rotateApiKey', { key_id }, key('foundry_rotateApiKey', idempotencyKey)),
29
+ /** The Foundry credential the call carried (through the gateway: your login's delegated identity). */
30
+ current: () => client.request('foundry_getCurrentApiKey'),
31
+ },
32
+ reporting: {
33
+ requestLogs: (q = {}) => client.request('foundry_listRequestLogs', q),
34
+ providerCredentials: () => client.request('foundry_getProviderCredentialSummary'),
35
+ },
36
+ /** Refused to every caller today: Foundry gates these on its `admin` scope (403 SCOPE_MISSING). */
37
+ activity: {
38
+ list: (q = {}) => client.request('foundry_getActivity', q),
39
+ export: (q = {}) => client.request('foundry_exportActivity', q),
40
+ },
41
+ analytics: {
42
+ meta: () => client.request('foundry_getAnalyticsMeta'),
43
+ query: (body) => client.request('foundry_queryAnalytics', { body }),
44
+ },
45
+ /** Foundry universal API (/foundry/v1/*): `infer` for any modality, or a task wrapper. Paid. */
46
+ universal: {
47
+ infer: (body) => client.request('foundry_createInference', { body }),
48
+ /** Server-sent events: the raw Response. */
49
+ inferStream: (body) => client.request('foundry_streamInference', { body }),
50
+ classify: (body) => client.request('foundry_classifyText', { body }),
51
+ detect: (body) => client.request('foundry_detectObjects', { body }),
52
+ segment: (body) => client.request('foundry_segmentImage', { body }),
53
+ embed: (body) => client.request('foundry_embedTexts', { body }),
54
+ transcribe: (body) => client.request('foundry_transcribeAudio', { body }),
55
+ speak: (body) => client.request('foundry_synthesizeSpeech', { body }),
56
+ generateImage: (body) => client.request('foundry_generateImage', { body }),
57
+ predict: (body) => client.request('foundry_predictTabular', { body }),
58
+ forecast: (body) => client.request('foundry_forecastSeries', { body }),
59
+ recommend: (body) => client.request('foundry_recommendItems', { body }),
60
+ annotate: (body) => client.request('foundry_annotateText', { body }),
61
+ summarize: (body) => client.request('foundry_summarizeText', { body }),
62
+ },
63
+ /** Routing preview, explanation and eval planning: compute only. */
64
+ routing: {
65
+ preview: (body) => client.request('foundry_previewRoute', { body }),
66
+ explain: (id) => client.request('foundry_explainRoutingInvocation', { id }),
67
+ evals: {
68
+ plan: (body) => client.request('foundry_planRoutingEval', { body }),
69
+ dispatchPlan: (body) => client.request('foundry_dispatchRoutingEvalPlan', { body }),
70
+ aggregateDispatch: (body) => client.request('foundry_aggregateRoutingEvalDispatch', { body }),
71
+ aggregatePlanned: (body) => client.request('foundry_aggregatePlannedRoutingEval', { body }),
72
+ aggregate: (body) => client.request('foundry_aggregateRoutingEval', { body }),
73
+ claimReadiness: (body) => client.request('foundry_checkRoutingEvalClaimReadiness', { body }),
74
+ },
75
+ },
76
+ /** Cost and model comparison estimates: compute only, no provider call. */
77
+ tools: {
78
+ costEstimate: (body) => client.request('foundry_estimateCost', { body }),
79
+ compare: (body) => client.request('foundry_compareModels', { body }),
80
+ benchmark: (body) => client.request('foundry_benchmarkModels', { body }),
81
+ },
82
+ workloads: {
83
+ status: (workload_id) => client.request('foundry_getWorkloadStatus', { workload_id }),
84
+ terminate: (workload_id) => client.request('foundry_terminateWorkload', { workload_id }),
85
+ },
86
+ /** OpenRouter-style generation lookup by request id; content and feedback need Foundry `admin` (refused today). */
87
+ generation: {
88
+ get: (id) => client.request('foundry_getGeneration', { id }),
89
+ content: (id) => client.request('foundry_getGenerationContent', { id }),
90
+ feedback: (body) => client.request('foundry_submitGenerationFeedback', { body }),
91
+ },
92
+ batches: {
93
+ create: (body) => client.request('foundry_createBatch', { body }),
94
+ get: (batch_id) => client.request('foundry_getBatch', { batch_id }),
95
+ },
96
+ };
97
+ }
98
+ /** Public registry reads, V1 and paginated V2. */
99
+ export function foundryRegistry(client) {
100
+ return {
101
+ models: (q = {}) => client.request('foundry_listRegistryModels', q),
102
+ model: (canonical_model_id) => client.request('foundry_getRegistryModel', { canonical_model_id }),
103
+ offers: (canonical_model_id) => client.request('foundry_listModelOffers', { canonical_model_id }),
104
+ dossier: (canonical_model_id) => client.request('foundry_getModelDossier', { canonical_model_id }),
105
+ benchmarks: (canonical_model_id) => client.request('foundry_listModelBenchmarks', { canonical_model_id }),
106
+ sources: (canonical_model_id) => client.request('foundry_listModelSources', { canonical_model_id }),
107
+ providers: () => client.request('foundry_listRegistryProviders'),
108
+ provider: (provider_id) => client.request('foundry_getRegistryProvider', { provider_id }),
109
+ providerDossier: (provider_id) => client.request('foundry_getProviderDossier', { provider_id }),
110
+ facets: () => client.request('foundry_listRegistryFacets'),
111
+ modelBase: () => client.request('foundry_getCurrentModelBase'),
112
+ modelBaseReleases: () => client.request('foundry_listModelBaseReleases'),
113
+ labs: () => client.request('foundry_listRegistryLabs'),
114
+ lab: (lab_id) => client.request('foundry_getRegistryLab', { lab_id }),
115
+ compare: (q = {}) => client.request('foundry_compareRegistryModels', q),
116
+ v2: {
117
+ models: (q = {}) => client.request('foundry_listRegistryModelsV2', q),
118
+ model: (canonical_model_id) => client.request('foundry_getRegistryModelV2', { canonical_model_id }),
119
+ dossier: (canonical_model_id) => client.request('foundry_getModelDossierV2', { canonical_model_id }),
120
+ providers: (q = {}) => client.request('foundry_listRegistryProvidersV2', q),
121
+ provider: (provider_id) => client.request('foundry_getProviderDossierV2', { provider_id }),
122
+ facets: () => client.request('foundry_listRegistryFacetsV2'),
123
+ modelBase: () => client.request('foundry_getCurrentModelBaseV2'),
124
+ modelBaseReleases: () => client.request('foundry_listModelBaseReleasesV2'),
125
+ labs: (q = {}) => client.request('foundry_listRegistryLabsV2', q),
126
+ lab: (lab_id) => client.request('foundry_getRegistryLabV2', { lab_id }),
127
+ compare: () => client.request('foundry_compareRegistryModelsV2'),
128
+ benchmarks: (q = {}) => client.request('foundry_listRegistryBenchmarksV2', q),
129
+ sources: (q = {}) => client.request('foundry_listRegistrySourcesV2', q),
130
+ provenance: (q = {}) => client.request('foundry_listRegistryProvenanceV2', q),
131
+ },
132
+ };
133
+ }