@beeos-ai/bma-sdk 0.4.0 → 0.4.2
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 +13 -1
- package/dist/generated/rest.d.ts +200 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
# @beeos-ai/bma-sdk
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@beeos-ai/bma-sdk)
|
|
4
|
+
|
|
3
5
|
TypeScript client for the BMA REST API, generated from
|
|
4
6
|
[`contracts/bma/rest.openapi.yaml`](../contracts/bma/rest.openapi.yaml), plus
|
|
5
7
|
the BMA extensions to the Anthropic Managed Agents API.
|
|
6
8
|
|
|
9
|
+
| | |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| Version | 0.4.2 (tag `v0.4.2`), see [CHANGELOG](../CHANGELOG.md) |
|
|
12
|
+
| Contract | BMA REST snapshot recorded in [`contracts/bma/lock.json`](../contracts/bma/lock.json) |
|
|
13
|
+
| Node.js | 20 or newer; ESM, depends on `openapi-fetch` |
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install @beeos-ai/bma-sdk@0.4.2
|
|
17
|
+
```
|
|
18
|
+
|
|
7
19
|
```ts
|
|
8
20
|
import { BmaClient, unwrap } from "@beeos-ai/bma-sdk";
|
|
9
21
|
|
|
@@ -49,4 +61,4 @@ It also exports the extension field types `ModelConfigOverride`
|
|
|
49
61
|
for `bma_sequence` resume cursors.
|
|
50
62
|
|
|
51
63
|
The executor protocol (executor, harness and agent ends) is the separate
|
|
52
|
-
package [`@beeos-ai/bma-executor-sdk`](
|
|
64
|
+
package [`@beeos-ai/bma-executor-sdk`](https://github.com/beeos-ai/bma-executor-sdk/tree/main/typescript).
|
package/dist/generated/rest.d.ts
CHANGED
|
@@ -1801,6 +1801,37 @@ export interface paths {
|
|
|
1801
1801
|
patch: operations["PatchAgentModelOverride"];
|
|
1802
1802
|
trace?: never;
|
|
1803
1803
|
};
|
|
1804
|
+
"/orgs/{orgID}/projects/{projectID}/agents/{agentID}/executor-binding": {
|
|
1805
|
+
parameters: {
|
|
1806
|
+
query?: never;
|
|
1807
|
+
header?: never;
|
|
1808
|
+
path: {
|
|
1809
|
+
/** @description Organization ID (org_...). */
|
|
1810
|
+
orgID: string;
|
|
1811
|
+
/** @description Project ID (proj_...). */
|
|
1812
|
+
projectID: string;
|
|
1813
|
+
/** @description Agent ID (agt_...). */
|
|
1814
|
+
agentID: string;
|
|
1815
|
+
};
|
|
1816
|
+
cookie?: never;
|
|
1817
|
+
};
|
|
1818
|
+
/**
|
|
1819
|
+
* Read the agent executor binding
|
|
1820
|
+
* @description Returns the bound machine and the agent capability its executor last registered.
|
|
1821
|
+
*/
|
|
1822
|
+
get: operations["GetAgentExecutorBinding"];
|
|
1823
|
+
/**
|
|
1824
|
+
* Run the agent on an agent executor
|
|
1825
|
+
* @description Binds the agent to a machine whose executor runs a complete local agent (Executor Protocol capability agent). Session input then becomes turn.start / turn.input on that executor, session cancel turn.cancel and session archive session.close; the BMA harness does not run the agent's sessions. Input queues while the executor is offline.
|
|
1826
|
+
*/
|
|
1827
|
+
put: operations["PutAgentExecutorBinding"];
|
|
1828
|
+
post?: never;
|
|
1829
|
+
delete?: never;
|
|
1830
|
+
options?: never;
|
|
1831
|
+
head?: never;
|
|
1832
|
+
patch?: never;
|
|
1833
|
+
trace?: never;
|
|
1834
|
+
};
|
|
1804
1835
|
"/orgs/{orgID}/projects/{projectID}/agents/{agentID}/sessions/{sessionID}/model-override": {
|
|
1805
1836
|
parameters: {
|
|
1806
1837
|
query?: never;
|
|
@@ -4547,13 +4578,39 @@ export interface components {
|
|
|
4547
4578
|
};
|
|
4548
4579
|
AgentConfigDefinitionMCPServer: {
|
|
4549
4580
|
auth?: components["schemas"]["AgentConfigDefinitionMCPAuth"];
|
|
4581
|
+
/** @description Who connects the MCP server. `service` (the default) is connected by the harness through `url`; `environment` is started or connected by the executor from `transport`, in the executor's credential scope. */
|
|
4582
|
+
connection_origin?: components["schemas"]["MCPConnectionOrigin"];
|
|
4550
4583
|
default_enabled?: boolean | null;
|
|
4551
4584
|
deferred?: boolean;
|
|
4552
4585
|
permission?: components["schemas"]["AgentConfigDefinitionToolPermission"];
|
|
4553
4586
|
tools?: {
|
|
4554
4587
|
[key: string]: components["schemas"]["AgentConfigDefinitionMCPTool"];
|
|
4555
4588
|
};
|
|
4556
|
-
|
|
4589
|
+
transport?: components["schemas"]["AgentConfigDefinitionMCPTransport"];
|
|
4590
|
+
url?: string;
|
|
4591
|
+
};
|
|
4592
|
+
/**
|
|
4593
|
+
* @description Who connects an MCP server. `environment` means the executor starts or connects it in its own credential scope; `service` means the harness connects it and keeps its credentials.
|
|
4594
|
+
* @enum {string}
|
|
4595
|
+
*/
|
|
4596
|
+
MCPConnectionOrigin: "service" | "environment";
|
|
4597
|
+
/**
|
|
4598
|
+
* @description Transport of an MCP server.
|
|
4599
|
+
* @enum {string}
|
|
4600
|
+
*/
|
|
4601
|
+
MCPTransportType: "stdio" | "http";
|
|
4602
|
+
/** @description Transport of an environment-origin MCP server. stdio requires `command`; http requires `url`. No shell is involved: `command` is one executable token. `env` values that name a secret stay references; the executor resolves them in its own credential scope. */
|
|
4603
|
+
AgentConfigDefinitionMCPTransport: {
|
|
4604
|
+
type: components["schemas"]["MCPTransportType"];
|
|
4605
|
+
command?: string;
|
|
4606
|
+
args?: string[];
|
|
4607
|
+
cwd?: string;
|
|
4608
|
+
env?: {
|
|
4609
|
+
[key: string]: string;
|
|
4610
|
+
};
|
|
4611
|
+
timeout_ms?: number;
|
|
4612
|
+
command_sha256?: string;
|
|
4613
|
+
url?: string;
|
|
4557
4614
|
};
|
|
4558
4615
|
AgentConfigDefinitionMCPServers: {
|
|
4559
4616
|
[key: string]: components["schemas"]["AgentConfigDefinitionMCPServer"];
|
|
@@ -6069,7 +6126,9 @@ export interface components {
|
|
|
6069
6126
|
read_only?: boolean;
|
|
6070
6127
|
};
|
|
6071
6128
|
CompiledMCPServer: {
|
|
6072
|
-
url
|
|
6129
|
+
url?: string;
|
|
6130
|
+
connection_origin?: components["schemas"]["MCPConnectionOrigin"];
|
|
6131
|
+
transport?: components["schemas"]["CompiledMCPTransport"];
|
|
6073
6132
|
auth?: components["schemas"]["CompiledMCPAuth"];
|
|
6074
6133
|
default_enabled: boolean;
|
|
6075
6134
|
permission: components["schemas"]["ToolPermissionSelection"];
|
|
@@ -6078,6 +6137,19 @@ export interface components {
|
|
|
6078
6137
|
[key: string]: components["schemas"]["CompiledMCPTool"];
|
|
6079
6138
|
};
|
|
6080
6139
|
};
|
|
6140
|
+
/** @description Transport of an environment-origin MCP server. */
|
|
6141
|
+
CompiledMCPTransport: {
|
|
6142
|
+
type: components["schemas"]["MCPTransportType"];
|
|
6143
|
+
command?: string;
|
|
6144
|
+
args?: string[];
|
|
6145
|
+
cwd?: string;
|
|
6146
|
+
env?: {
|
|
6147
|
+
[key: string]: string;
|
|
6148
|
+
};
|
|
6149
|
+
timeout_ms?: number;
|
|
6150
|
+
command_sha256?: string;
|
|
6151
|
+
url?: string;
|
|
6152
|
+
};
|
|
6081
6153
|
CompiledMCPAuth: components["schemas"]["CompiledMCPAuthBearer"] | components["schemas"]["CompiledMCPAuthOAuth"] | components["schemas"]["CompiledMCPAuthSigV4"];
|
|
6082
6154
|
CompiledMCPAuthBearer: {
|
|
6083
6155
|
/**
|
|
@@ -6714,6 +6786,20 @@ export interface components {
|
|
|
6714
6786
|
/** Format: date-time */
|
|
6715
6787
|
revoked_at?: string;
|
|
6716
6788
|
};
|
|
6789
|
+
AgentExecutorBindingInput: {
|
|
6790
|
+
machine_id: components["schemas"]["MachineID"];
|
|
6791
|
+
};
|
|
6792
|
+
AgentExecutorBinding: {
|
|
6793
|
+
agent_id: components["schemas"]["AgentID"];
|
|
6794
|
+
machine_id: components["schemas"]["MachineID"];
|
|
6795
|
+
/** @description capabilities.agent from the machine executor's latest executor.register, or null before an agent executor has registered. */
|
|
6796
|
+
capability: {
|
|
6797
|
+
[key: string]: unknown;
|
|
6798
|
+
} | null;
|
|
6799
|
+
};
|
|
6800
|
+
AgentExecutorBindingEnvelope: {
|
|
6801
|
+
executor_binding: components["schemas"]["AgentExecutorBinding"];
|
|
6802
|
+
};
|
|
6717
6803
|
AgentModelOverrideEnvelope: {
|
|
6718
6804
|
model_override: components["schemas"]["AgentModelOverride"];
|
|
6719
6805
|
};
|
|
@@ -6937,6 +7023,30 @@ export interface components {
|
|
|
6937
7023
|
content_blocks: components["schemas"]["ToolResultContentBlock"][];
|
|
6938
7024
|
created_at: components["schemas"]["Timestamp"];
|
|
6939
7025
|
};
|
|
7026
|
+
/** @description An Anthropic-shaped session event reported by an agent executor (Executor Protocol capability agent), or a user.tool_confirmation the platform wrote when an executor interaction was answered. */
|
|
7027
|
+
ExecutorEvent: {
|
|
7028
|
+
id: components["schemas"]["AgentEventID"];
|
|
7029
|
+
org_id: components["schemas"]["OrganizationID"];
|
|
7030
|
+
project_id: components["schemas"]["ProjectID"];
|
|
7031
|
+
agent_id: components["schemas"]["AgentID"];
|
|
7032
|
+
turn_id: components["schemas"]["AgentTurnID"];
|
|
7033
|
+
turn_sequence: components["schemas"]["AgentSequence"];
|
|
7034
|
+
/** @enum {boolean} */
|
|
7035
|
+
is_opening_event: false;
|
|
7036
|
+
sequence: components["schemas"]["AgentSequence"];
|
|
7037
|
+
/**
|
|
7038
|
+
* @description discriminator enum property added by openapi-typescript
|
|
7039
|
+
* @enum {string}
|
|
7040
|
+
*/
|
|
7041
|
+
event_kind: "executor_event";
|
|
7042
|
+
/** @description Executor-assigned event id; agent.tool_result.tool_use_id refers to the agent.tool_use event by this id. */
|
|
7043
|
+
executor_event_id: string;
|
|
7044
|
+
/** @description The event as reported, with its Anthropic type (agent.message, agent.tool_use, session.status_idle, ...). */
|
|
7045
|
+
event: {
|
|
7046
|
+
[key: string]: unknown;
|
|
7047
|
+
};
|
|
7048
|
+
created_at: components["schemas"]["Timestamp"];
|
|
7049
|
+
};
|
|
6940
7050
|
ContextCheckpointEvent: {
|
|
6941
7051
|
id: components["schemas"]["AgentEventID"];
|
|
6942
7052
|
org_id: components["schemas"]["OrganizationID"];
|
|
@@ -6999,7 +7109,7 @@ export interface components {
|
|
|
6999
7109
|
event: "tool_call_update";
|
|
7000
7110
|
data: components["schemas"]["ToolCallUpdate"];
|
|
7001
7111
|
};
|
|
7002
|
-
AgentEvent: components["schemas"]["AgentInputEvent"] | components["schemas"]["ModelOutputEvent"] | components["schemas"]["ToolResultEvent"] | components["schemas"]["ContextCheckpointEvent"];
|
|
7112
|
+
AgentEvent: components["schemas"]["AgentInputEvent"] | components["schemas"]["ModelOutputEvent"] | components["schemas"]["ToolResultEvent"] | components["schemas"]["ContextCheckpointEvent"] | components["schemas"]["ExecutorEvent"];
|
|
7003
7113
|
ModelOutputTextStreamBlock: {
|
|
7004
7114
|
/**
|
|
7005
7115
|
* @description discriminator enum property added by openapi-typescript
|
|
@@ -7235,6 +7345,8 @@ export interface components {
|
|
|
7235
7345
|
org_id: components["schemas"]["OrganizationID"];
|
|
7236
7346
|
project_id: components["schemas"]["ProjectID"];
|
|
7237
7347
|
agent_id: components["schemas"]["AgentID"];
|
|
7348
|
+
/** @description For an approval raised by an agent executor, the id of the agent.tool_use event it refers to (tool_call_id then identifies the approval itself). Absent for native tool calls. */
|
|
7349
|
+
tool_use_id?: string;
|
|
7238
7350
|
/** @description The tool call that is waiting on this interaction — the guarded tool for a permission, or the ask_question call for a question. */
|
|
7239
7351
|
tool_call_id: components["schemas"]["ToolCallID"];
|
|
7240
7352
|
/** @description The tool whose invocation a permission interaction guards. Present only when interaction_kind is permission. */
|
|
@@ -7798,6 +7910,11 @@ export interface components {
|
|
|
7798
7910
|
* @description Days a machine stays paused before it is archived. An archived machine is restored on the next access. Requires pause_after_idle_minutes.
|
|
7799
7911
|
*/
|
|
7800
7912
|
archive_after_paused_days?: number;
|
|
7913
|
+
/**
|
|
7914
|
+
* Format: int32
|
|
7915
|
+
* @description Delete a paused machine once it is this many days old, counted from the machine's creation (for a session machine, the session's start); activity does not extend it. A session that receives input after its machine was deleted gets a fresh machine. Requires pause_after_idle_minutes; cannot be combined with archive_after_paused_days.
|
|
7916
|
+
*/
|
|
7917
|
+
delete_after_paused_days?: number;
|
|
7801
7918
|
metadata?: components["schemas"]["MachineMetadata"];
|
|
7802
7919
|
};
|
|
7803
7920
|
UpdateMachinePoolRequest: {
|
|
@@ -7885,6 +8002,11 @@ export interface components {
|
|
|
7885
8002
|
* @description Days a machine stays paused before it is archived. Null clears it; omitted leaves it unchanged. Requires pause_after_idle_minutes.
|
|
7886
8003
|
*/
|
|
7887
8004
|
archive_after_paused_days?: number | null;
|
|
8005
|
+
/**
|
|
8006
|
+
* Format: int32
|
|
8007
|
+
* @description Delete a paused machine once it is this many days old, counted from the machine's creation. Null clears it; omitted leaves it unchanged. Requires pause_after_idle_minutes; cannot be combined with archive_after_paused_days.
|
|
8008
|
+
*/
|
|
8009
|
+
delete_after_paused_days?: number | null;
|
|
7888
8010
|
metadata?: components["schemas"]["MachineMetadata"];
|
|
7889
8011
|
};
|
|
7890
8012
|
MachinePool: {
|
|
@@ -7954,6 +8076,11 @@ export interface components {
|
|
|
7954
8076
|
* @description Days a machine stays paused before it is archived, or null when the pool does not archive.
|
|
7955
8077
|
*/
|
|
7956
8078
|
archive_after_paused_days: number | null;
|
|
8079
|
+
/**
|
|
8080
|
+
* Format: int32
|
|
8081
|
+
* @description Age in days, counted from the machine's creation, after which a paused machine is deleted, or null when the pool keeps paused machines.
|
|
8082
|
+
*/
|
|
8083
|
+
delete_after_paused_days: number | null;
|
|
7957
8084
|
metadata: components["schemas"]["Metadata"];
|
|
7958
8085
|
created_at: components["schemas"]["Timestamp"];
|
|
7959
8086
|
updated_at: components["schemas"]["Timestamp"];
|
|
@@ -12886,6 +13013,76 @@ export interface operations {
|
|
|
12886
13013
|
"5XX": components["responses"]["ServerError"];
|
|
12887
13014
|
};
|
|
12888
13015
|
};
|
|
13016
|
+
GetAgentExecutorBinding: {
|
|
13017
|
+
parameters: {
|
|
13018
|
+
query?: never;
|
|
13019
|
+
header?: never;
|
|
13020
|
+
path: {
|
|
13021
|
+
/** @description Organization ID (org_...). */
|
|
13022
|
+
orgID: string;
|
|
13023
|
+
/** @description Project ID (proj_...). */
|
|
13024
|
+
projectID: string;
|
|
13025
|
+
/** @description Agent ID (agt_...). */
|
|
13026
|
+
agentID: string;
|
|
13027
|
+
};
|
|
13028
|
+
cookie?: never;
|
|
13029
|
+
};
|
|
13030
|
+
requestBody?: never;
|
|
13031
|
+
responses: {
|
|
13032
|
+
/** @description Agent executor binding. */
|
|
13033
|
+
200: {
|
|
13034
|
+
headers: {
|
|
13035
|
+
[name: string]: unknown;
|
|
13036
|
+
};
|
|
13037
|
+
content: {
|
|
13038
|
+
"application/json": components["schemas"]["AgentExecutorBindingEnvelope"];
|
|
13039
|
+
};
|
|
13040
|
+
};
|
|
13041
|
+
400: components["responses"]["BadRequest"];
|
|
13042
|
+
401: components["responses"]["Unauthorized"];
|
|
13043
|
+
403: components["responses"]["Forbidden"];
|
|
13044
|
+
404: components["responses"]["NotFound"];
|
|
13045
|
+
"4XX": components["responses"]["ClientError"];
|
|
13046
|
+
"5XX": components["responses"]["ServerError"];
|
|
13047
|
+
};
|
|
13048
|
+
};
|
|
13049
|
+
PutAgentExecutorBinding: {
|
|
13050
|
+
parameters: {
|
|
13051
|
+
query?: never;
|
|
13052
|
+
header?: never;
|
|
13053
|
+
path: {
|
|
13054
|
+
/** @description Organization ID (org_...). */
|
|
13055
|
+
orgID: string;
|
|
13056
|
+
/** @description Project ID (proj_...). */
|
|
13057
|
+
projectID: string;
|
|
13058
|
+
/** @description Agent ID (agt_...). */
|
|
13059
|
+
agentID: string;
|
|
13060
|
+
};
|
|
13061
|
+
cookie?: never;
|
|
13062
|
+
};
|
|
13063
|
+
requestBody: {
|
|
13064
|
+
content: {
|
|
13065
|
+
"application/json": components["schemas"]["AgentExecutorBindingInput"];
|
|
13066
|
+
};
|
|
13067
|
+
};
|
|
13068
|
+
responses: {
|
|
13069
|
+
/** @description The agent runs on the machine's agent executor. */
|
|
13070
|
+
200: {
|
|
13071
|
+
headers: {
|
|
13072
|
+
[name: string]: unknown;
|
|
13073
|
+
};
|
|
13074
|
+
content: {
|
|
13075
|
+
"application/json": components["schemas"]["AgentExecutorBindingEnvelope"];
|
|
13076
|
+
};
|
|
13077
|
+
};
|
|
13078
|
+
400: components["responses"]["BadRequest"];
|
|
13079
|
+
401: components["responses"]["Unauthorized"];
|
|
13080
|
+
403: components["responses"]["Forbidden"];
|
|
13081
|
+
404: components["responses"]["NotFound"];
|
|
13082
|
+
"4XX": components["responses"]["ClientError"];
|
|
13083
|
+
"5XX": components["responses"]["ServerError"];
|
|
13084
|
+
};
|
|
13085
|
+
};
|
|
12889
13086
|
GetAgentSessionModelOverride: {
|
|
12890
13087
|
parameters: {
|
|
12891
13088
|
query?: never;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type { components, operations, paths };
|
|
|
4
4
|
export type Schemas = components["schemas"];
|
|
5
5
|
/** Hosted BMA API root, including the /v1 prefix. */
|
|
6
6
|
export declare const DEFAULT_BASE_URL = "https://api.bma.beeos.ai/v1";
|
|
7
|
-
export declare const SDK_VERSION = "0.4.
|
|
7
|
+
export declare const SDK_VERSION = "0.4.2";
|
|
8
8
|
export interface BmaClientOptions {
|
|
9
9
|
/** BMA personal or organization bearer token. */
|
|
10
10
|
token: string;
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import createClient from "openapi-fetch";
|
|
7
7
|
/** Hosted BMA API root, including the /v1 prefix. */
|
|
8
8
|
export const DEFAULT_BASE_URL = "https://api.bma.beeos.ai/v1";
|
|
9
|
-
export const SDK_VERSION = "0.4.
|
|
9
|
+
export const SDK_VERSION = "0.4.2";
|
|
10
10
|
/** A non-2xx response from the BMA API. */
|
|
11
11
|
export class BmaApiError extends Error {
|
|
12
12
|
status;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beeos-ai/bma-sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "TypeScript client for the BMA REST API and the BMA extensions to the Anthropic Managed Agents API.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/beeos-ai/bma-
|
|
8
|
+
"url": "git+https://github.com/beeos-ai/bma-sdk.git",
|
|
9
9
|
"directory": "typescript"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|