@beeos-ai/bma-sdk 0.0.0-stage → 0.4.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.
@@ -0,0 +1,507 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ "/v1/sessions/{session_id}/desktop/stream": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ /**
14
+ * Mint a desktop watch ticket for a session (BMA extension)
15
+ * @description Returns a short-lived, single-use, origin-bound watch ticket and the
16
+ * WebSocket endpoint of the desktop session attached to the session's
17
+ * machine. The browser connects to `url` with `subprotocol` and the
18
+ * ticket; the tenant API key never reaches the browser.
19
+ */
20
+ get: operations["getSessionDesktopStream"];
21
+ put?: never;
22
+ post?: never;
23
+ delete?: never;
24
+ options?: never;
25
+ head?: never;
26
+ patch?: never;
27
+ trace?: never;
28
+ };
29
+ "/v1/sessions/{session_id}/files": {
30
+ parameters: {
31
+ query?: never;
32
+ header?: never;
33
+ path?: never;
34
+ cookie?: never;
35
+ };
36
+ /** List files uploaded into the session (BMA extension) */
37
+ get: operations["listSessionFiles"];
38
+ put?: never;
39
+ /**
40
+ * Upload one file into the session (BMA extension)
41
+ * @description Stores one multipart file (at most 8 MiB, non-empty, bare filename) in
42
+ * the session's read_write memory store under the session's own
43
+ * directory. Create-only: an existing filename is a 409
44
+ * `file_already_exists`. A session without a read_write memory store is a
45
+ * 409 `session_files_unavailable`.
46
+ */
47
+ post: operations["uploadSessionFile"];
48
+ delete?: never;
49
+ options?: never;
50
+ head?: never;
51
+ patch?: never;
52
+ trace?: never;
53
+ };
54
+ "/v1/sessions/{session_id}/files/{file_id}/content": {
55
+ parameters: {
56
+ query?: never;
57
+ header?: never;
58
+ path?: never;
59
+ cookie?: never;
60
+ };
61
+ /**
62
+ * Download one session file (BMA extension)
63
+ * @description Streams one file's bytes. `file_id` is the `id` returned by the upload
64
+ * or list operations. The response carries `Content-Type`,
65
+ * `Content-Length` and `Content-Disposition` when known, and
66
+ * `X-BMA-File-Digest` with the sha256 of the bytes. A file of another
67
+ * session, or an unknown id, is a 404 `not_found_error`.
68
+ */
69
+ get: operations["downloadSessionFile"];
70
+ put?: never;
71
+ post?: never;
72
+ delete?: never;
73
+ options?: never;
74
+ head?: never;
75
+ patch?: never;
76
+ trace?: never;
77
+ };
78
+ "/v1/sessions/{session_id}/resources": {
79
+ parameters: {
80
+ query?: never;
81
+ header?: never;
82
+ path?: never;
83
+ cookie?: never;
84
+ };
85
+ /** List the session's mounted file resources (BMA extension) */
86
+ get: operations["listSessionResources"];
87
+ put?: never;
88
+ /**
89
+ * Mount one project file into the session (BMA extension)
90
+ * @description Mounts an uploaded project file by reference. The Anthropic contract
91
+ * mounts files through `resources` on `POST /v1/sessions`; this extension
92
+ * mounts into an existing session. The file is read-only at `mount_path`
93
+ * (default `/mnt/session/uploads/<file_id>`), and the response `file_id`
94
+ * is the session instance created for the mount, not the project file's
95
+ * own id.
96
+ */
97
+ post: operations["addSessionResource"];
98
+ delete?: never;
99
+ options?: never;
100
+ head?: never;
101
+ patch?: never;
102
+ trace?: never;
103
+ };
104
+ "/v1/sessions/{session_id}/resources/{resource_id}": {
105
+ parameters: {
106
+ query?: never;
107
+ header?: never;
108
+ path?: never;
109
+ cookie?: never;
110
+ };
111
+ get?: never;
112
+ put?: never;
113
+ post?: never;
114
+ /**
115
+ * Unmount one file resource from the session (BMA extension)
116
+ * @description Removes the mount and releases the session instance. The project file
117
+ * itself is kept; other sessions that mounted it keep their instances.
118
+ */
119
+ delete: operations["deleteSessionResource"];
120
+ options?: never;
121
+ head?: never;
122
+ patch?: never;
123
+ trace?: never;
124
+ };
125
+ }
126
+ export type webhooks = Record<string, never>;
127
+ export interface components {
128
+ schemas: {
129
+ DesktopStream: {
130
+ /** @constant */
131
+ type: "bma.desktop_stream";
132
+ session_id: string;
133
+ desktop_session_id: string;
134
+ machine_id: string;
135
+ /** @description WebSocket endpoint the ticket belongs to. */
136
+ url: string;
137
+ /** @description Single-use credential. Treat as a secret. */
138
+ ticket: string;
139
+ subprotocol: string;
140
+ /** Format: date-time */
141
+ expires_at: string;
142
+ permissions: string[];
143
+ };
144
+ SessionFile: {
145
+ /** @description Opaque, stable file id. */
146
+ id: string;
147
+ /** @constant */
148
+ type: "file";
149
+ filename: string;
150
+ /** @description Derived from the filename extension; advisory. */
151
+ mime_type: string;
152
+ /** Format: int64 */
153
+ size_bytes: number;
154
+ /** Format: date-time */
155
+ created_at: string;
156
+ };
157
+ SessionFilePage: {
158
+ data: components["schemas"]["SessionFile"][];
159
+ next_page: string | null;
160
+ };
161
+ FileResourceParams: {
162
+ /** @enum {string} */
163
+ type: "file";
164
+ /** @description The project file (`file_...`) to mount. */
165
+ file_id: string;
166
+ /**
167
+ * @description Absolute path below `/mnt/session/uploads` the session's tools read
168
+ * the file at. A path outside it is placed under it. Defaults to
169
+ * `/mnt/session/uploads/<file_id>`.
170
+ */
171
+ mount_path?: string | null;
172
+ };
173
+ FileResource: {
174
+ /** @description Opaque, stable resource id. */
175
+ id: string;
176
+ /** @enum {string} */
177
+ type: "file";
178
+ /** @description The session instance created for the mount. */
179
+ file_id: string;
180
+ mount_path: string;
181
+ /** Format: date-time */
182
+ created_at: string;
183
+ /** Format: date-time */
184
+ updated_at: string;
185
+ };
186
+ FileResourcePage: {
187
+ data: components["schemas"]["FileResource"][];
188
+ };
189
+ DeletedSessionResource: {
190
+ id: string;
191
+ /** @enum {string} */
192
+ type: "session_resource_deleted";
193
+ };
194
+ ErrorEnvelope: {
195
+ /** @constant */
196
+ type: "error";
197
+ error: {
198
+ type: string;
199
+ message: string;
200
+ code?: string;
201
+ };
202
+ };
203
+ /**
204
+ * @description Session `agent.model` object with the BMA credential override. The
205
+ * `api_*` fields are write-only and never echoed. `api_url` and
206
+ * `api_format` are required when `api_key` is set.
207
+ */
208
+ ModelConfigOverride: {
209
+ id: string;
210
+ effort?: string | null;
211
+ inference_geo?: string | null;
212
+ speed?: string | null;
213
+ api_url?: string;
214
+ api_key?: string;
215
+ api_format?: string;
216
+ };
217
+ /**
218
+ * @description `mcp_servers[].bma_auth` binds an MCP server to a BMA project secret.
219
+ * `service` and `region` are required for, and only allowed with,
220
+ * `type: sigv4`.
221
+ */
222
+ MCPServerBMAAuth: {
223
+ /** @enum {string} */
224
+ type: "bearer" | "oauth" | "sigv4";
225
+ secret_id: string;
226
+ service?: string;
227
+ region?: string;
228
+ };
229
+ /**
230
+ * Format: int64
231
+ * @description `bma_sequence` on session events: the durable BMA agent-event sequence
232
+ * the event was projected from. Absent on preview and synthetic events.
233
+ * Resume a stream by sending it as `Last-Event-ID`.
234
+ */
235
+ BMASequence: number;
236
+ };
237
+ responses: {
238
+ /** @description Anthropic error envelope. */
239
+ Error: {
240
+ headers: {
241
+ [name: string]: unknown;
242
+ };
243
+ content: {
244
+ "application/json": components["schemas"]["ErrorEnvelope"];
245
+ };
246
+ };
247
+ };
248
+ parameters: {
249
+ SessionID: string;
250
+ /**
251
+ * @description Project to operate in. Required when the key can read more than one
252
+ * project and the deployment has no default project.
253
+ * `anthropic-workspace-id` is accepted as an alias.
254
+ */
255
+ ProjectID: string;
256
+ /**
257
+ * @description Replay key forwarded to BMA on `POST /v1/sessions` and
258
+ * `POST /v1/sessions/{id}/events`. 1-255 characters, no surrounding
259
+ * whitespace.
260
+ */
261
+ IdempotencyKey: string;
262
+ };
263
+ requestBodies: never;
264
+ headers: never;
265
+ pathItems: never;
266
+ }
267
+ export type $defs = Record<string, never>;
268
+ export interface operations {
269
+ getSessionDesktopStream: {
270
+ parameters: {
271
+ query: {
272
+ desktop_session_id: string;
273
+ /** @description Ticket lifetime. Omit for the native default. */
274
+ ttl_seconds?: number;
275
+ /** @description Browser origin the ticket is bound to. Defaults to the request `Origin` header. */
276
+ origin?: string;
277
+ };
278
+ header?: {
279
+ /**
280
+ * @description Project to operate in. Required when the key can read more than one
281
+ * project and the deployment has no default project.
282
+ * `anthropic-workspace-id` is accepted as an alias.
283
+ */
284
+ "x-bma-project-id"?: components["parameters"]["ProjectID"];
285
+ };
286
+ path: {
287
+ session_id: components["parameters"]["SessionID"];
288
+ };
289
+ cookie?: never;
290
+ };
291
+ requestBody?: never;
292
+ responses: {
293
+ /** @description Desktop watch ticket. */
294
+ 200: {
295
+ headers: {
296
+ [name: string]: unknown;
297
+ };
298
+ content: {
299
+ "application/json": components["schemas"]["DesktopStream"];
300
+ };
301
+ };
302
+ default: components["responses"]["Error"];
303
+ };
304
+ };
305
+ listSessionFiles: {
306
+ parameters: {
307
+ query?: {
308
+ limit?: number;
309
+ /** @description Opaque cursor from `next_page`. */
310
+ page?: string;
311
+ };
312
+ header?: {
313
+ /**
314
+ * @description Project to operate in. Required when the key can read more than one
315
+ * project and the deployment has no default project.
316
+ * `anthropic-workspace-id` is accepted as an alias.
317
+ */
318
+ "x-bma-project-id"?: components["parameters"]["ProjectID"];
319
+ };
320
+ path: {
321
+ session_id: components["parameters"]["SessionID"];
322
+ };
323
+ cookie?: never;
324
+ };
325
+ requestBody?: never;
326
+ responses: {
327
+ /** @description One page of session files ordered by filename. */
328
+ 200: {
329
+ headers: {
330
+ [name: string]: unknown;
331
+ };
332
+ content: {
333
+ "application/json": components["schemas"]["SessionFilePage"];
334
+ };
335
+ };
336
+ default: components["responses"]["Error"];
337
+ };
338
+ };
339
+ uploadSessionFile: {
340
+ parameters: {
341
+ query?: never;
342
+ header?: {
343
+ /**
344
+ * @description Project to operate in. Required when the key can read more than one
345
+ * project and the deployment has no default project.
346
+ * `anthropic-workspace-id` is accepted as an alias.
347
+ */
348
+ "x-bma-project-id"?: components["parameters"]["ProjectID"];
349
+ };
350
+ path: {
351
+ session_id: components["parameters"]["SessionID"];
352
+ };
353
+ cookie?: never;
354
+ };
355
+ requestBody: {
356
+ content: {
357
+ "multipart/form-data": {
358
+ /** Format: binary */
359
+ file: string;
360
+ };
361
+ };
362
+ };
363
+ responses: {
364
+ /** @description The stored file. */
365
+ 200: {
366
+ headers: {
367
+ [name: string]: unknown;
368
+ };
369
+ content: {
370
+ "application/json": components["schemas"]["SessionFile"];
371
+ };
372
+ };
373
+ default: components["responses"]["Error"];
374
+ };
375
+ };
376
+ downloadSessionFile: {
377
+ parameters: {
378
+ query?: never;
379
+ header?: {
380
+ /**
381
+ * @description Project to operate in. Required when the key can read more than one
382
+ * project and the deployment has no default project.
383
+ * `anthropic-workspace-id` is accepted as an alias.
384
+ */
385
+ "x-bma-project-id"?: components["parameters"]["ProjectID"];
386
+ };
387
+ path: {
388
+ session_id: components["parameters"]["SessionID"];
389
+ file_id: string;
390
+ };
391
+ cookie?: never;
392
+ };
393
+ requestBody?: never;
394
+ responses: {
395
+ /** @description The file bytes. */
396
+ 200: {
397
+ headers: {
398
+ /** @description sha256 of the response body. */
399
+ "X-BMA-File-Digest"?: string;
400
+ /** @description Suggested download filename. */
401
+ "Content-Disposition"?: string;
402
+ [name: string]: unknown;
403
+ };
404
+ content: {
405
+ "application/octet-stream": string;
406
+ };
407
+ };
408
+ default: components["responses"]["Error"];
409
+ };
410
+ };
411
+ listSessionResources: {
412
+ parameters: {
413
+ query?: never;
414
+ header?: {
415
+ /**
416
+ * @description Project to operate in. Required when the key can read more than one
417
+ * project and the deployment has no default project.
418
+ * `anthropic-workspace-id` is accepted as an alias.
419
+ */
420
+ "x-bma-project-id"?: components["parameters"]["ProjectID"];
421
+ };
422
+ path: {
423
+ session_id: components["parameters"]["SessionID"];
424
+ };
425
+ cookie?: never;
426
+ };
427
+ requestBody?: never;
428
+ responses: {
429
+ /** @description The session's mounted file resources. */
430
+ 200: {
431
+ headers: {
432
+ [name: string]: unknown;
433
+ };
434
+ content: {
435
+ "application/json": components["schemas"]["FileResourcePage"];
436
+ };
437
+ };
438
+ default: components["responses"]["Error"];
439
+ };
440
+ };
441
+ addSessionResource: {
442
+ parameters: {
443
+ query?: never;
444
+ header?: {
445
+ /**
446
+ * @description Project to operate in. Required when the key can read more than one
447
+ * project and the deployment has no default project.
448
+ * `anthropic-workspace-id` is accepted as an alias.
449
+ */
450
+ "x-bma-project-id"?: components["parameters"]["ProjectID"];
451
+ };
452
+ path: {
453
+ session_id: components["parameters"]["SessionID"];
454
+ };
455
+ cookie?: never;
456
+ };
457
+ requestBody: {
458
+ content: {
459
+ "application/json": components["schemas"]["FileResourceParams"];
460
+ };
461
+ };
462
+ responses: {
463
+ /** @description The mounted resource. */
464
+ 200: {
465
+ headers: {
466
+ [name: string]: unknown;
467
+ };
468
+ content: {
469
+ "application/json": components["schemas"]["FileResource"];
470
+ };
471
+ };
472
+ default: components["responses"]["Error"];
473
+ };
474
+ };
475
+ deleteSessionResource: {
476
+ parameters: {
477
+ query?: never;
478
+ header?: {
479
+ /**
480
+ * @description Project to operate in. Required when the key can read more than one
481
+ * project and the deployment has no default project.
482
+ * `anthropic-workspace-id` is accepted as an alias.
483
+ */
484
+ "x-bma-project-id"?: components["parameters"]["ProjectID"];
485
+ };
486
+ path: {
487
+ session_id: components["parameters"]["SessionID"];
488
+ /** @description The `id` of the mounted resource. */
489
+ resource_id: string;
490
+ };
491
+ cookie?: never;
492
+ };
493
+ requestBody?: never;
494
+ responses: {
495
+ /** @description The resource was removed. */
496
+ 200: {
497
+ headers: {
498
+ [name: string]: unknown;
499
+ };
500
+ content: {
501
+ "application/json": components["schemas"]["DeletedSessionResource"];
502
+ };
503
+ };
504
+ default: components["responses"]["Error"];
505
+ };
506
+ };
507
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=facade-extensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"facade-extensions.js","sourceRoot":"","sources":["../../src/generated/facade-extensions.ts"],"names":[],"mappings":"AAAA;;;GAGG"}