@beeos-ai/bma-sdk 0.0.0-stage → 0.3.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.
package/README.md CHANGED
@@ -1,3 +1,49 @@
1
- # Temporary Holding Version
1
+ # @beeos-ai/bma-sdk
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ TypeScript client for the BMA REST API, generated from
4
+ [`contracts/bma/rest.openapi.yaml`](../contracts/bma/rest.openapi.yaml), plus
5
+ the BMA extensions to the Anthropic Managed Agents API.
6
+
7
+ ```ts
8
+ import { BmaClient, unwrap } from "@beeos-ai/bma-sdk";
9
+
10
+ const bma = new BmaClient({ baseUrl: "https://host/api/v1", token: process.env.BMA_TOKEN! });
11
+ const path = { orgID: "org_...", projectID: "proj_...", agentID: "agt_..." };
12
+
13
+ const { session } = unwrap(
14
+ await bma.rest.POST("/orgs/{orgID}/projects/{projectID}/agents/{agentID}/sessions", {
15
+ params: { path },
16
+ body: { idempotency_key: "task-1", model_override: { model: "deepseek-flash", expires_with_session: true /* ... */ } },
17
+ }),
18
+ );
19
+ await bma.rest.POST("/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs", {
20
+ params: { path, query: { session_id: session.id } },
21
+ body: { content_blocks: [{ type: "text", text: "Start." }] },
22
+ });
23
+ for await (const frame of bma.streamEvents({ ...path, sessionId: session.id })) {
24
+ console.log(frame.event, frame.sequence);
25
+ }
26
+ ```
27
+
28
+ `bma.rest` is a fully typed [openapi-fetch](https://openapi-ts.dev/openapi-fetch/)
29
+ client for every contract operation. `streamEvents` parses the SSE stream and
30
+ `downloadArtifact` verifies the artifact size and sha256 digest.
31
+
32
+ ## BMA extensions to the Anthropic facade
33
+
34
+ Use the official Anthropic SDK for `/v1/agents`, `/v1/environments`,
35
+ `/v1/sessions` and events. The routes BMA adds live in a separate entry point:
36
+
37
+ ```ts
38
+ import { FacadeExtensionsClient, bmaSequence } from "@beeos-ai/bma-sdk/facade-extensions";
39
+
40
+ const ext = new FacadeExtensionsClient({ baseUrl: "https://host", apiKey: key, projectId: "proj_..." });
41
+ const ticket = await ext.getSessionDesktopStream(sessionId, { desktopSessionId, origin: location.origin });
42
+ await ext.uploadSessionFile(sessionId, new Blob([bytes]), "report.pdf");
43
+ const page = await ext.listSessionFiles(sessionId, { limit: 100 });
44
+ ```
45
+
46
+ It also exports the extension field types `ModelConfigOverride`
47
+ (`agent.model.api_url/api_key/api_format`), `MCPServerBMAAuth`
48
+ (`mcp_servers[].bma_auth`), `IDEMPOTENCY_KEY_HEADER`, and `bmaSequence(event)`
49
+ for `bma_sequence` resume cursors.
@@ -0,0 +1,52 @@
1
+ import { type Client } from "openapi-fetch";
2
+ import type { components, paths } from "./generated/facade-extensions.js";
3
+ export type { paths as FacadeExtensionPaths };
4
+ export type DesktopStream = components["schemas"]["DesktopStream"];
5
+ export type SessionFile = components["schemas"]["SessionFile"];
6
+ export type SessionFilePage = components["schemas"]["SessionFilePage"];
7
+ /** BMA extension: session `agent.model` object with a write-only credential override. */
8
+ export type ModelConfigOverride = components["schemas"]["ModelConfigOverride"];
9
+ /** BMA extension: `mcp_servers[].bma_auth`. */
10
+ export type MCPServerBMAAuth = components["schemas"]["MCPServerBMAAuth"];
11
+ /** BMA extension header forwarded on session create and send-events. */
12
+ export declare const IDEMPOTENCY_KEY_HEADER = "Idempotency-Key";
13
+ /**
14
+ * Returns the BMA extension `bma_sequence` of a facade session event, or
15
+ * undefined for preview and synthetic events. Send it as `Last-Event-ID` to
16
+ * resume `GET /v1/sessions/{id}/events/stream`.
17
+ */
18
+ export declare function bmaSequence(event: unknown): number | undefined;
19
+ export interface FacadeExtensionsOptions {
20
+ /** BMA organization API key (sent as x-api-key). */
21
+ apiKey: string;
22
+ /** Facade origin, without /v1 (for example https://api.bma.beeos.ai). */
23
+ baseUrl: string;
24
+ /** Project to operate in (x-bma-project-id); required for multi-project keys. */
25
+ projectId?: string;
26
+ fetch?: typeof globalThis.fetch;
27
+ }
28
+ /** An Anthropic-style error envelope returned by a facade extension route. */
29
+ export declare class FacadeApiError extends Error {
30
+ readonly status: number;
31
+ readonly type: string;
32
+ readonly code?: string;
33
+ constructor(status: number, body: unknown);
34
+ }
35
+ /** Client for the BMA extension routes of the Anthropic-compatible facade. */
36
+ export declare class FacadeExtensionsClient {
37
+ readonly raw: Client<paths>;
38
+ constructor(options: FacadeExtensionsOptions);
39
+ /** BMA extension: GET /v1/sessions/{session_id}/desktop/stream. */
40
+ getSessionDesktopStream(sessionId: string, options: {
41
+ desktopSessionId: string;
42
+ ttlSeconds?: number;
43
+ origin?: string;
44
+ }): Promise<DesktopStream>;
45
+ /** BMA extension: POST /v1/sessions/{session_id}/files (multipart, at most 8 MiB). */
46
+ uploadSessionFile(sessionId: string, file: Blob, filename: string): Promise<SessionFile>;
47
+ /** BMA extension: GET /v1/sessions/{session_id}/files. */
48
+ listSessionFiles(sessionId: string, options?: {
49
+ limit?: number;
50
+ page?: string;
51
+ }): Promise<SessionFilePage>;
52
+ }
@@ -0,0 +1,90 @@
1
+ // BMA extensions to the Anthropic Managed Agents API.
2
+ //
3
+ // The standard facade routes (/v1/agents, /v1/environments, /v1/sessions,
4
+ // events, events/stream, /v1/memory_stores) are served by the official
5
+ // Anthropic SDKs pointed at a BMA deployment. Everything in this module is a
6
+ // BMA extension that is NOT part of the Anthropic contract. Types come from
7
+ // src/generated/facade-extensions.ts, generated from
8
+ // contracts/bma/facade-extensions.openapi.yaml.
9
+ import createClient from "openapi-fetch";
10
+ /** BMA extension header forwarded on session create and send-events. */
11
+ export const IDEMPOTENCY_KEY_HEADER = "Idempotency-Key";
12
+ /**
13
+ * Returns the BMA extension `bma_sequence` of a facade session event, or
14
+ * undefined for preview and synthetic events. Send it as `Last-Event-ID` to
15
+ * resume `GET /v1/sessions/{id}/events/stream`.
16
+ */
17
+ export function bmaSequence(event) {
18
+ const value = event?.bma_sequence;
19
+ return typeof value === "number" && Number.isSafeInteger(value) && value > 0 ? value : undefined;
20
+ }
21
+ /** An Anthropic-style error envelope returned by a facade extension route. */
22
+ export class FacadeApiError extends Error {
23
+ status;
24
+ type;
25
+ code;
26
+ constructor(status, body) {
27
+ const error = (body?.error ?? {});
28
+ const type = typeof error.type === "string" ? error.type : "api_error";
29
+ const message = typeof error.message === "string" && error.message !== "" ? error.message : `HTTP ${status}`;
30
+ super(`bma facade: HTTP ${status} ${type}: ${message}`);
31
+ this.name = "FacadeApiError";
32
+ this.status = status;
33
+ this.type = type;
34
+ this.code = typeof error.code === "string" ? error.code : undefined;
35
+ }
36
+ }
37
+ function check(result) {
38
+ if (result.response.ok)
39
+ return result.data;
40
+ throw new FacadeApiError(result.response.status, result.error);
41
+ }
42
+ /** Client for the BMA extension routes of the Anthropic-compatible facade. */
43
+ export class FacadeExtensionsClient {
44
+ raw;
45
+ constructor(options) {
46
+ const apiKey = options.apiKey?.trim();
47
+ if (!apiKey)
48
+ throw new Error("bma facade: apiKey is required");
49
+ const baseUrl = options.baseUrl?.trim().replace(/\/+$/, "");
50
+ if (!baseUrl)
51
+ throw new Error("bma facade: baseUrl is required");
52
+ if (baseUrl.endsWith("/v1"))
53
+ throw new Error("bma facade: baseUrl must be the origin without /v1");
54
+ const headers = { "x-api-key": apiKey };
55
+ if (options.projectId)
56
+ headers["x-bma-project-id"] = options.projectId;
57
+ this.raw = createClient({ baseUrl, headers, fetch: options.fetch ?? globalThis.fetch });
58
+ }
59
+ /** BMA extension: GET /v1/sessions/{session_id}/desktop/stream. */
60
+ async getSessionDesktopStream(sessionId, options) {
61
+ return check(await this.raw.GET("/v1/sessions/{session_id}/desktop/stream", {
62
+ params: {
63
+ path: { session_id: sessionId },
64
+ query: {
65
+ desktop_session_id: options.desktopSessionId,
66
+ ttl_seconds: options.ttlSeconds,
67
+ origin: options.origin,
68
+ },
69
+ },
70
+ }));
71
+ }
72
+ /** BMA extension: POST /v1/sessions/{session_id}/files (multipart, at most 8 MiB). */
73
+ async uploadSessionFile(sessionId, file, filename) {
74
+ const form = new FormData();
75
+ form.append("file", file, filename);
76
+ return check(await this.raw.POST("/v1/sessions/{session_id}/files", {
77
+ params: { path: { session_id: sessionId } },
78
+ // The generated body type is the schema object; the wire body is FormData.
79
+ body: form,
80
+ bodySerializer: (body) => body,
81
+ }));
82
+ }
83
+ /** BMA extension: GET /v1/sessions/{session_id}/files. */
84
+ async listSessionFiles(sessionId, options = {}) {
85
+ return check(await this.raw.GET("/v1/sessions/{session_id}/files", {
86
+ params: { path: { session_id: sessionId }, query: { limit: options.limit, page: options.page } },
87
+ }));
88
+ }
89
+ }
90
+ //# sourceMappingURL=facade-extensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"facade-extensions.js","sourceRoot":"","sources":["../src/facade-extensions.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,EAAE;AACF,0EAA0E;AAC1E,uEAAuE;AACvE,6EAA6E;AAC7E,4EAA4E;AAC5E,qDAAqD;AACrD,gDAAgD;AAChD,OAAO,YAA6B,MAAM,eAAe,CAAC;AAY1D,wEAAwE;AACxE,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AAExD;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,MAAM,KAAK,GAAI,KAA2C,EAAE,YAAY,CAAC;IACzE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACnG,CAAC;AAYD,8EAA8E;AAC9E,MAAM,OAAO,cAAe,SAAQ,KAAK;IAC9B,MAAM,CAAS;IACf,IAAI,CAAS;IACb,IAAI,CAAU;IAEvB,YAAY,MAAc,EAAE,IAAa;QACvC,MAAM,KAAK,GAAG,CAAE,IAAmC,EAAE,KAAK,IAAI,EAAE,CAA0D,CAAC;QAC3H,MAAM,IAAI,GAAG,OAAO,KAAK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,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAA2B;SACtD,CAAC,CACH,CAAC;IACJ,CAAC;IAED,0DAA0D;IAC1D,KAAK,CAAC,gBAAgB,CAAC,SAAiB,EAAE,UAA6C,EAAE;QACvF,OAAO,KAAK,CACV,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,iCAAiC,EAAE;YACpD,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE;SACjG,CAAC,CACH,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,272 @@
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
+ }
55
+ export type webhooks = Record<string, never>;
56
+ export interface components {
57
+ schemas: {
58
+ DesktopStream: {
59
+ /** @constant */
60
+ type: "bma.desktop_stream";
61
+ session_id: string;
62
+ desktop_session_id: string;
63
+ machine_id: string;
64
+ /** @description WebSocket endpoint the ticket belongs to. */
65
+ url: string;
66
+ /** @description Single-use credential. Treat as a secret. */
67
+ ticket: string;
68
+ subprotocol: string;
69
+ /** Format: date-time */
70
+ expires_at: string;
71
+ permissions: string[];
72
+ };
73
+ SessionFile: {
74
+ /** @description Opaque, stable file id. */
75
+ id: string;
76
+ /** @constant */
77
+ type: "file";
78
+ filename: string;
79
+ /** @description Derived from the filename extension; advisory. */
80
+ mime_type: string;
81
+ /** Format: int64 */
82
+ size_bytes: number;
83
+ /** Format: date-time */
84
+ created_at: string;
85
+ };
86
+ SessionFilePage: {
87
+ data: components["schemas"]["SessionFile"][];
88
+ next_page: string | null;
89
+ };
90
+ ErrorEnvelope: {
91
+ /** @constant */
92
+ type: "error";
93
+ error: {
94
+ type: string;
95
+ message: string;
96
+ code?: string;
97
+ };
98
+ };
99
+ /**
100
+ * @description Session `agent.model` object with the BMA credential override. The
101
+ * `api_*` fields are write-only and never echoed. `api_url` and
102
+ * `api_format` are required when `api_key` is set.
103
+ */
104
+ ModelConfigOverride: {
105
+ id: string;
106
+ effort?: string | null;
107
+ inference_geo?: string | null;
108
+ speed?: string | null;
109
+ api_url?: string;
110
+ api_key?: string;
111
+ api_format?: string;
112
+ };
113
+ /**
114
+ * @description `mcp_servers[].bma_auth` binds an MCP server to a BMA project secret.
115
+ * `service` and `region` are required for, and only allowed with,
116
+ * `type: sigv4`.
117
+ */
118
+ MCPServerBMAAuth: {
119
+ /** @enum {string} */
120
+ type: "bearer" | "oauth" | "sigv4";
121
+ secret_id: string;
122
+ service?: string;
123
+ region?: string;
124
+ };
125
+ /**
126
+ * Format: int64
127
+ * @description `bma_sequence` on session events: the durable BMA agent-event sequence
128
+ * the event was projected from. Absent on preview and synthetic events.
129
+ * Resume a stream by sending it as `Last-Event-ID`.
130
+ */
131
+ BMASequence: number;
132
+ };
133
+ responses: {
134
+ /** @description Anthropic error envelope. */
135
+ Error: {
136
+ headers: {
137
+ [name: string]: unknown;
138
+ };
139
+ content: {
140
+ "application/json": components["schemas"]["ErrorEnvelope"];
141
+ };
142
+ };
143
+ };
144
+ parameters: {
145
+ SessionID: string;
146
+ /**
147
+ * @description Project to operate in. Required when the key can read more than one
148
+ * project and the deployment has no default project.
149
+ * `anthropic-workspace-id` is accepted as an alias.
150
+ */
151
+ ProjectID: string;
152
+ /**
153
+ * @description Replay key forwarded to BMA on `POST /v1/sessions` and
154
+ * `POST /v1/sessions/{id}/events`. 1-255 characters, no surrounding
155
+ * whitespace.
156
+ */
157
+ IdempotencyKey: string;
158
+ };
159
+ requestBodies: never;
160
+ headers: never;
161
+ pathItems: never;
162
+ }
163
+ export type $defs = Record<string, never>;
164
+ export interface operations {
165
+ getSessionDesktopStream: {
166
+ parameters: {
167
+ query: {
168
+ desktop_session_id: string;
169
+ /** @description Ticket lifetime. Omit for the native default. */
170
+ ttl_seconds?: number;
171
+ /** @description Browser origin the ticket is bound to. Defaults to the request `Origin` header. */
172
+ origin?: string;
173
+ };
174
+ header?: {
175
+ /**
176
+ * @description Project to operate in. Required when the key can read more than one
177
+ * project and the deployment has no default project.
178
+ * `anthropic-workspace-id` is accepted as an alias.
179
+ */
180
+ "x-bma-project-id"?: components["parameters"]["ProjectID"];
181
+ };
182
+ path: {
183
+ session_id: components["parameters"]["SessionID"];
184
+ };
185
+ cookie?: never;
186
+ };
187
+ requestBody?: never;
188
+ responses: {
189
+ /** @description Desktop watch ticket. */
190
+ 200: {
191
+ headers: {
192
+ [name: string]: unknown;
193
+ };
194
+ content: {
195
+ "application/json": components["schemas"]["DesktopStream"];
196
+ };
197
+ };
198
+ default: components["responses"]["Error"];
199
+ };
200
+ };
201
+ listSessionFiles: {
202
+ parameters: {
203
+ query?: {
204
+ limit?: number;
205
+ /** @description Opaque cursor from `next_page`. */
206
+ page?: string;
207
+ };
208
+ header?: {
209
+ /**
210
+ * @description Project to operate in. Required when the key can read more than one
211
+ * project and the deployment has no default project.
212
+ * `anthropic-workspace-id` is accepted as an alias.
213
+ */
214
+ "x-bma-project-id"?: components["parameters"]["ProjectID"];
215
+ };
216
+ path: {
217
+ session_id: components["parameters"]["SessionID"];
218
+ };
219
+ cookie?: never;
220
+ };
221
+ requestBody?: never;
222
+ responses: {
223
+ /** @description One page of session files ordered by filename. */
224
+ 200: {
225
+ headers: {
226
+ [name: string]: unknown;
227
+ };
228
+ content: {
229
+ "application/json": components["schemas"]["SessionFilePage"];
230
+ };
231
+ };
232
+ default: components["responses"]["Error"];
233
+ };
234
+ };
235
+ uploadSessionFile: {
236
+ parameters: {
237
+ query?: never;
238
+ header?: {
239
+ /**
240
+ * @description Project to operate in. Required when the key can read more than one
241
+ * project and the deployment has no default project.
242
+ * `anthropic-workspace-id` is accepted as an alias.
243
+ */
244
+ "x-bma-project-id"?: components["parameters"]["ProjectID"];
245
+ };
246
+ path: {
247
+ session_id: components["parameters"]["SessionID"];
248
+ };
249
+ cookie?: never;
250
+ };
251
+ requestBody: {
252
+ content: {
253
+ "multipart/form-data": {
254
+ /** Format: binary */
255
+ file: string;
256
+ };
257
+ };
258
+ };
259
+ responses: {
260
+ /** @description The stored file. */
261
+ 200: {
262
+ headers: {
263
+ [name: string]: unknown;
264
+ };
265
+ content: {
266
+ "application/json": components["schemas"]["SessionFile"];
267
+ };
268
+ };
269
+ default: components["responses"]["Error"];
270
+ };
271
+ };
272
+ }
@@ -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"}