@onesi/genesis 0.1.13 → 0.2.1

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