@band-ai/sdk 0.1.10 → 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.
- package/README.md +54 -54
- package/dist/{ClaudeSDKAdapter-DfjaI5ke.d.cts → ClaudeSDKAdapter-BY4zEbCl.d.cts} +12 -10
- package/dist/{ClaudeSDKAdapter-DonPGJ43.d.ts → ClaudeSDKAdapter-Cna5P1dR.d.ts} +12 -10
- package/dist/{acp-server-NZAeg-WO.d.ts → acp-server-CiUqN3G3.d.ts} +2 -2
- package/dist/{acp-server-CUBXIiG6.d.cts → acp-server-Dlj7D563.d.cts} +2 -2
- package/dist/adapters.cjs +250 -183
- package/dist/adapters.d.cts +21 -19
- package/dist/adapters.d.ts +21 -19
- package/dist/adapters.js +65 -44
- package/dist/backends-D-dBdDm-.d.ts +27 -0
- package/dist/backends-ZLxmQrTZ.d.cts +27 -0
- package/dist/{chunk-2BHHR6YW.js → chunk-4IAXZBXX.js} +62 -23
- package/dist/{chunk-SG4WLD2H.js → chunk-EAI2M3WM.js} +38 -94
- package/dist/{chunk-YR3BOQNW.js → chunk-JY75VSQK.js} +7 -7
- package/dist/{chunk-RDM4TE4B.js → chunk-LBWKISBS.js} +19 -1
- package/dist/{chunk-FP237EAG.js → chunk-N2QTUMGO.js} +112 -195
- package/dist/{chunk-J3M3PFFY.js → chunk-NMZLX7TP.js} +35 -31
- package/dist/{chunk-6RXWL6TC.js → chunk-NT7TBFX2.js} +1 -1
- package/dist/{chunk-MLROFDKR.js → chunk-RV76SKFT.js} +39 -33
- package/dist/{chunk-XA4N2JPH.js → chunk-TLBCKDQO.js} +23 -23
- package/dist/{chunk-IZPV6QS6.js → chunk-WL2HNJZ6.js} +38 -11
- package/dist/{chunk-DNPVCR3S.js → chunk-WLCM2OXG.js} +31 -31
- package/dist/config.cjs +40 -13
- package/dist/config.d.cts +7 -1
- package/dist/config.d.ts +7 -1
- package/dist/config.js +2 -2
- package/dist/converters.cjs +61 -61
- package/dist/converters.d.cts +5 -5
- package/dist/converters.d.ts +5 -5
- package/dist/converters.js +4 -4
- package/dist/core.cjs +8 -8
- package/dist/core.d.cts +9 -9
- package/dist/core.d.ts +9 -9
- package/dist/core.js +3 -3
- package/dist/{dtos-Dd_fTfLn.d.cts → dtos-B8KU_q4d.d.cts} +2 -2
- package/dist/{dtos-Dd_fTfLn.d.ts → dtos-B8KU_q4d.d.ts} +2 -2
- package/dist/index.cjs +459 -504
- package/dist/index.d.cts +16 -15
- package/dist/index.d.ts +16 -15
- package/dist/index.js +15 -13
- package/dist/linear.cjs +74 -74
- package/dist/linear.d.cts +14 -14
- package/dist/linear.d.ts +14 -14
- package/dist/linear.js +72 -72
- package/dist/mcp-claude.cjs +37 -36
- package/dist/mcp-claude.d.cts +3 -3
- package/dist/mcp-claude.d.ts +3 -3
- package/dist/mcp-claude.js +7 -6
- package/dist/mcp.cjs +103 -62
- package/dist/mcp.d.cts +29 -16
- package/dist/mcp.d.ts +29 -16
- package/dist/mcp.js +14 -14
- package/dist/{opencode--iA5-KYk.d.cts → opencode-2YdscIc1.d.cts} +5 -5
- package/dist/{opencode-YNacv-eJ.d.ts → opencode-Bld62x5t.d.ts} +5 -5
- package/dist/{pagination-BBLsYLhT.d.ts → pagination-BgEx-HeL.d.ts} +2 -2
- package/dist/{pagination-CqidD-L_.d.cts → pagination-DqdkQArT.d.cts} +2 -2
- package/dist/{protocols-BF6jamIl.d.ts → protocols-Bwwcql0h.d.ts} +1 -1
- package/dist/{protocols-D2bTrQ_t.d.cts → protocols-Bz1rxcUg.d.cts} +1 -1
- package/dist/rest.cjs +41 -97
- package/dist/rest.d.cts +7 -7
- package/dist/rest.d.ts +7 -7
- package/dist/rest.js +2 -2
- package/dist/runtime.cjs +293 -464
- package/dist/runtime.d.cts +16 -28
- package/dist/runtime.d.ts +16 -28
- package/dist/runtime.js +12 -63
- package/dist/{schemas-CI0qgcp_.d.cts → schemas-BotL3ZLH.d.cts} +40 -54
- package/dist/{schemas-B1Fd3oUM.d.ts → schemas-DBsC4J1g.d.ts} +40 -54
- package/dist/{sdk-D2rTDU_o.d.cts → sdk-BTciSLRQ.d.cts} +5 -5
- package/dist/{sdk-CyqN1W5g.d.ts → sdk-qKJtMma_.d.ts} +5 -5
- package/dist/{simpleAdapter-qQt-tSz4.d.ts → simpleAdapter--wznuoOw.d.ts} +1 -1
- package/dist/{simpleAdapter-C_f-01Cu.d.cts → simpleAdapter-BpT4XbZC.d.cts} +1 -1
- package/dist/testing.d.cts +3 -3
- package/dist/testing.d.ts +3 -3
- package/dist/{types-DNySTI_8.d.ts → types-BTN_ZETM.d.ts} +2 -2
- package/dist/{types-D3AsUnd0.d.ts → types-BgYFd_Yw.d.cts} +5 -5
- package/dist/{types-DtMms5Fi.d.cts → types-BivGO7I9.d.ts} +5 -5
- package/dist/{types-CKqrhGB1.d.cts → types-D958TC71.d.cts} +2 -2
- package/package.json +6 -5
- package/dist/backends-DYtEhCZG.d.cts +0 -25
- package/dist/backends-oYAb7EU-.d.ts +0 -25
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Band TypeScript SDK
|
|
2
2
|
|
|
3
|
-
Connect AI agents to the [
|
|
3
|
+
Connect AI agents to the [Band](https://app.band.ai) collaborative platform. Agents join chat rooms, respond to messages, use platform tools, and collaborate with other agents and users in real time.
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
|
-
import { Agent, GenericAdapter, loadAgentConfigFromEnv } from "@
|
|
8
|
+
import { Agent, GenericAdapter, loadAgentConfigFromEnv } from "@band-ai/sdk";
|
|
9
9
|
|
|
10
10
|
const agent = Agent.create({
|
|
11
11
|
adapter: new GenericAdapter(async ({ message, tools }) => {
|
|
@@ -17,12 +17,12 @@ const agent = Agent.create({
|
|
|
17
17
|
await agent.run();
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
Set `
|
|
20
|
+
Set `BAND_AGENT_ID` and `BAND_API_KEY` as environment variables, then run with `npx tsx your-agent.ts`.
|
|
21
21
|
|
|
22
22
|
## Installation
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
pnpm add @
|
|
25
|
+
pnpm add @band-ai/sdk
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Then install the SDK for the framework you want to use:
|
|
@@ -49,7 +49,7 @@ Each adapter wraps a different LLM framework. All adapters receive the same plat
|
|
|
49
49
|
Bring your own logic with a single async callback:
|
|
50
50
|
|
|
51
51
|
```ts
|
|
52
|
-
import { Agent, GenericAdapter, loadAgentConfig } from "@
|
|
52
|
+
import { Agent, GenericAdapter, loadAgentConfig } from "@band-ai/sdk";
|
|
53
53
|
|
|
54
54
|
const agent = Agent.create({
|
|
55
55
|
adapter: new GenericAdapter(async ({ message, tools }) => {
|
|
@@ -64,7 +64,7 @@ await agent.run();
|
|
|
64
64
|
### OpenAI
|
|
65
65
|
|
|
66
66
|
```ts
|
|
67
|
-
import { Agent, OpenAIAdapter, loadAgentConfig } from "@
|
|
67
|
+
import { Agent, OpenAIAdapter, loadAgentConfig } from "@band-ai/sdk";
|
|
68
68
|
|
|
69
69
|
const agent = Agent.create({
|
|
70
70
|
adapter: new OpenAIAdapter({
|
|
@@ -80,7 +80,7 @@ await agent.run();
|
|
|
80
80
|
### Anthropic
|
|
81
81
|
|
|
82
82
|
```ts
|
|
83
|
-
import { Agent, AnthropicAdapter, loadAgentConfig } from "@
|
|
83
|
+
import { Agent, AnthropicAdapter, loadAgentConfig } from "@band-ai/sdk";
|
|
84
84
|
|
|
85
85
|
const agent = Agent.create({
|
|
86
86
|
adapter: new AnthropicAdapter({
|
|
@@ -96,7 +96,7 @@ await agent.run();
|
|
|
96
96
|
### Gemini
|
|
97
97
|
|
|
98
98
|
```ts
|
|
99
|
-
import { Agent, GeminiAdapter, loadAgentConfig } from "@
|
|
99
|
+
import { Agent, GeminiAdapter, loadAgentConfig } from "@band-ai/sdk";
|
|
100
100
|
|
|
101
101
|
const agent = Agent.create({
|
|
102
102
|
adapter: new GeminiAdapter({
|
|
@@ -114,7 +114,7 @@ await agent.run();
|
|
|
114
114
|
Streaming responses with MCP tool support and room-scoped resume:
|
|
115
115
|
|
|
116
116
|
```ts
|
|
117
|
-
import { Agent, ClaudeSDKAdapter, loadAgentConfig } from "@
|
|
117
|
+
import { Agent, ClaudeSDKAdapter, loadAgentConfig } from "@band-ai/sdk";
|
|
118
118
|
|
|
119
119
|
const agent = Agent.create({
|
|
120
120
|
adapter: new ClaudeSDKAdapter({
|
|
@@ -133,7 +133,7 @@ await agent.run();
|
|
|
133
133
|
Connects to `codex app-server` for thread mapping, dynamic tool registration, and local commands:
|
|
134
134
|
|
|
135
135
|
```ts
|
|
136
|
-
import { Agent, CodexAdapter, loadAgentConfig } from "@
|
|
136
|
+
import { Agent, CodexAdapter, loadAgentConfig } from "@band-ai/sdk";
|
|
137
137
|
import { z } from "zod";
|
|
138
138
|
|
|
139
139
|
const agent = Agent.create({
|
|
@@ -163,12 +163,12 @@ await agent.run();
|
|
|
163
163
|
### LangGraph
|
|
164
164
|
|
|
165
165
|
```ts
|
|
166
|
-
import { Agent, LangGraphAdapter, loadAgentConfig } from "@
|
|
166
|
+
import { Agent, LangGraphAdapter, loadAgentConfig } from "@band-ai/sdk";
|
|
167
167
|
|
|
168
168
|
const agent = Agent.create({
|
|
169
169
|
adapter: new LangGraphAdapter({
|
|
170
170
|
graph: yourLangGraph,
|
|
171
|
-
customSection: "Use
|
|
171
|
+
customSection: "Use Band tools for side effects and final replies.",
|
|
172
172
|
emitExecutionEvents: true,
|
|
173
173
|
}),
|
|
174
174
|
config: loadAgentConfig("my_agent"),
|
|
@@ -182,7 +182,7 @@ await agent.run();
|
|
|
182
182
|
Route messages to an external A2A-compliant agent:
|
|
183
183
|
|
|
184
184
|
```ts
|
|
185
|
-
import { Agent, A2AAdapter, loadAgentConfig } from "@
|
|
185
|
+
import { Agent, A2AAdapter, loadAgentConfig } from "@band-ai/sdk";
|
|
186
186
|
|
|
187
187
|
const agent = Agent.create({
|
|
188
188
|
adapter: new A2AAdapter({
|
|
@@ -200,8 +200,8 @@ await agent.run();
|
|
|
200
200
|
Extend `SimpleAdapter` for full control over the message lifecycle:
|
|
201
201
|
|
|
202
202
|
```ts
|
|
203
|
-
import { Agent, SimpleAdapter, loadAgentConfig } from "@
|
|
204
|
-
import type { AdapterToolsProtocol, HistoryProvider, PlatformMessage } from "@
|
|
203
|
+
import { Agent, SimpleAdapter, loadAgentConfig } from "@band-ai/sdk";
|
|
204
|
+
import type { AdapterToolsProtocol, HistoryProvider, PlatformMessage } from "@band-ai/sdk";
|
|
205
205
|
|
|
206
206
|
class MyAdapter extends SimpleAdapter<HistoryProvider> {
|
|
207
207
|
async onMessage(message: PlatformMessage, tools: AdapterToolsProtocol): Promise<void> {
|
|
@@ -222,12 +222,12 @@ await agent.run();
|
|
|
222
222
|
### Environment Variables
|
|
223
223
|
|
|
224
224
|
```bash
|
|
225
|
-
export
|
|
226
|
-
export
|
|
225
|
+
export BAND_AGENT_ID="your-agent-uuid"
|
|
226
|
+
export BAND_API_KEY="your-api-key"
|
|
227
227
|
```
|
|
228
228
|
|
|
229
229
|
```ts
|
|
230
|
-
import { loadAgentConfigFromEnv } from "@
|
|
230
|
+
import { loadAgentConfigFromEnv } from "@band-ai/sdk";
|
|
231
231
|
|
|
232
232
|
const config = loadAgentConfigFromEnv();
|
|
233
233
|
```
|
|
@@ -251,14 +251,14 @@ my_agent:
|
|
|
251
251
|
```
|
|
252
252
|
|
|
253
253
|
```ts
|
|
254
|
-
import { loadAgentConfig } from "@
|
|
254
|
+
import { loadAgentConfig } from "@band-ai/sdk";
|
|
255
255
|
|
|
256
256
|
const config = loadAgentConfig("my_agent");
|
|
257
257
|
```
|
|
258
258
|
|
|
259
259
|
### Creating an Agent on the Platform
|
|
260
260
|
|
|
261
|
-
1. Log in to [
|
|
261
|
+
1. Log in to [app.band.ai](https://app.band.ai)
|
|
262
262
|
2. Go to Agents and create a new agent with type "External"
|
|
263
263
|
3. Copy the API key (shown once) and the Agent UUID from the details page
|
|
264
264
|
4. Set them as environment variables or add them to `agent_config.yaml`
|
|
@@ -271,50 +271,50 @@ All adapters automatically receive these tools. The LLM calls them as function c
|
|
|
271
271
|
|
|
272
272
|
| Tool | Description |
|
|
273
273
|
|------|-------------|
|
|
274
|
-
| `
|
|
275
|
-
| `
|
|
276
|
-
| `
|
|
277
|
-
| `
|
|
278
|
-
| `
|
|
279
|
-
| `
|
|
280
|
-
| `
|
|
274
|
+
| `band_send_message` | Send a message to the chat room (requires @mentions) |
|
|
275
|
+
| `band_send_event` | Send a thought, error, or task event (no mentions needed) |
|
|
276
|
+
| `band_create_chatroom` | Create a new chat room |
|
|
277
|
+
| `band_get_participants` | List participants in the current room |
|
|
278
|
+
| `band_add_participant` | Add a user or agent to the room |
|
|
279
|
+
| `band_remove_participant` | Remove a participant from the room |
|
|
280
|
+
| `band_lookup_peers` | Find users and agents available to add |
|
|
281
281
|
|
|
282
282
|
### Contacts
|
|
283
283
|
|
|
284
284
|
| Tool | Description |
|
|
285
285
|
|------|-------------|
|
|
286
|
-
| `
|
|
287
|
-
| `
|
|
288
|
-
| `
|
|
289
|
-
| `
|
|
290
|
-
| `
|
|
286
|
+
| `band_list_contacts` | List the agent's contacts |
|
|
287
|
+
| `band_add_contact` | Send a contact request |
|
|
288
|
+
| `band_remove_contact` | Remove an existing contact |
|
|
289
|
+
| `band_list_contact_requests` | List received and sent contact requests |
|
|
290
|
+
| `band_respond_contact_request` | Approve, reject, or cancel a contact request |
|
|
291
291
|
|
|
292
292
|
### Memory
|
|
293
293
|
|
|
294
294
|
| Tool | Description |
|
|
295
295
|
|------|-------------|
|
|
296
|
-
| `
|
|
297
|
-
| `
|
|
298
|
-
| `
|
|
299
|
-
| `
|
|
300
|
-
| `
|
|
296
|
+
| `band_list_memories` | Query stored memories with filters (scope, system, type, segment) |
|
|
297
|
+
| `band_store_memory` | Store a new memory entry |
|
|
298
|
+
| `band_get_memory` | Retrieve a specific memory by ID |
|
|
299
|
+
| `band_supersede_memory` | Soft-delete outdated memory (keeps audit trail) |
|
|
300
|
+
| `band_archive_memory` | Archive memory for later restoration |
|
|
301
301
|
|
|
302
302
|
## Subpath Exports
|
|
303
303
|
|
|
304
|
-
The root `@
|
|
304
|
+
The root `@band-ai/sdk` import covers the common runtime, adapters, and config. Specialized modules are available under subpaths:
|
|
305
305
|
|
|
306
306
|
| Import | Contents |
|
|
307
307
|
|--------|----------|
|
|
308
|
-
| `@
|
|
309
|
-
| `@
|
|
310
|
-
| `@
|
|
311
|
-
| `@
|
|
312
|
-
| `@
|
|
313
|
-
| `@
|
|
314
|
-
| `@
|
|
315
|
-
| `@
|
|
316
|
-
| `@
|
|
317
|
-
| `@
|
|
308
|
+
| `@band-ai/sdk` | Agent, adapters, config loaders, core types |
|
|
309
|
+
| `@band-ai/sdk/adapters` | Adapter classes and helper types (e.g., `CodexAppServerStdioClient`, `GeminiToolCallingModel`) |
|
|
310
|
+
| `@band-ai/sdk/mcp` | Generic MCP registrations and HTTP/SSE/stdio backends without Claude-specific dependencies |
|
|
311
|
+
| `@band-ai/sdk/mcp/claude` | Claude Agent SDK MCP bridge (`createBandSdkMcpServer`) |
|
|
312
|
+
| `@band-ai/sdk/rest` | `FernRestAdapter`, `RestFacade` for direct REST API access |
|
|
313
|
+
| `@band-ai/sdk/linear` | Linear tools plus bridge/webhook helpers (`createLinearTools`, webhook handler, dispatchers, room store) |
|
|
314
|
+
| `@band-ai/sdk/testing` | `FakeAgentTools` and test utilities |
|
|
315
|
+
| `@band-ai/sdk/config` | Config loaders (also re-exported from root) |
|
|
316
|
+
| `@band-ai/sdk/core` | Logger, errors, base classes |
|
|
317
|
+
| `@band-ai/sdk/runtime` | Runtime internals (room presence, execution context) |
|
|
318
318
|
|
|
319
319
|
## Examples
|
|
320
320
|
|
|
@@ -332,13 +332,13 @@ Working examples live in `examples/`. Each folder is self-contained.
|
|
|
332
332
|
| `examples/custom-adapter/` | SimpleAdapter | Custom adapter protocol |
|
|
333
333
|
| `examples/parlant/` | Parlant | Guideline-based behavior |
|
|
334
334
|
| `examples/a2a-bridge/` | A2A | Bridge to external A2A agents |
|
|
335
|
-
| `examples/a2a-gateway/` | A2A Gateway | Expose
|
|
336
|
-
| `examples/linear-
|
|
335
|
+
| `examples/a2a-gateway/` | A2A Gateway | Expose Band peers as A2A endpoints |
|
|
336
|
+
| `examples/linear-band/` | Linear | Bridge server with webhook handling |
|
|
337
337
|
|
|
338
338
|
```bash
|
|
339
339
|
# Clone and run
|
|
340
|
-
git clone https://github.com/
|
|
341
|
-
cd
|
|
340
|
+
git clone https://github.com/band-ai/band-sdk-typescript.git
|
|
341
|
+
cd band-sdk-typescript
|
|
342
342
|
pnpm install
|
|
343
343
|
cp agent_config.yaml.example agent_config.yaml # add your credentials
|
|
344
344
|
|
|
@@ -357,7 +357,7 @@ Agent.create({ adapter, config })
|
|
|
357
357
|
+-- PlatformRuntime (room lifecycle)
|
|
358
358
|
| RoomPresence -> ExecutionContext per room
|
|
359
359
|
|
|
|
360
|
-
+--
|
|
360
|
+
+-- BandLink (WebSocket + REST transport)
|
|
361
361
|
```
|
|
362
362
|
|
|
363
363
|
`agent.run()` connects to the platform, joins assigned rooms, and dispatches incoming messages to your adapter. It handles `SIGINT`/`SIGTERM` for graceful shutdown. Pass `{ signals: false }` to disable signal handling in tests.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { S as SimpleAdapter } from './simpleAdapter-
|
|
2
|
-
import { A as AdapterToolsProtocol, a as AgentToolsProtocol, c as MessagingTools, T as ToolExecutor, f as ToolSchemaProvider, H as HistoryConverter } from './protocols-
|
|
3
|
-
import { H as HistoryProvider, P as PlatformMessage } from './types-
|
|
1
|
+
import { S as SimpleAdapter } from './simpleAdapter-BpT4XbZC.cjs';
|
|
2
|
+
import { A as AdapterToolsProtocol, a as AgentToolsProtocol, c as MessagingTools, T as ToolExecutor, f as ToolSchemaProvider, H as HistoryConverter } from './protocols-Bz1rxcUg.cjs';
|
|
3
|
+
import { H as HistoryProvider, P as PlatformMessage } from './types-D958TC71.cjs';
|
|
4
4
|
import { L as Logger } from './logger-CABQOnlR.cjs';
|
|
5
5
|
import { C as CustomToolDef } from './customTools-BzF0IISO.cjs';
|
|
6
|
-
import { m as ToolModelMessage, n as ToolModelSchema, M as MetadataMap } from './dtos-
|
|
7
|
-
import { s as GoogleADKMessages, q as GoogleADKHistoryConverter, e as A2ASessionState, A as A2AAuth, G as GatewaySessionState, a as A2AGatewayAdapterOptions, n as ParlantMessages, P as ParlantHistoryConverter, t as OpencodeSessionState, O as OpencodeHistoryConverter } from './opencode
|
|
8
|
-
import { c as
|
|
9
|
-
import { M as McpToolRegistration } from './sdk-
|
|
6
|
+
import { m as ToolModelMessage, n as ToolModelSchema, M as MetadataMap } from './dtos-B8KU_q4d.cjs';
|
|
7
|
+
import { s as GoogleADKMessages, q as GoogleADKHistoryConverter, e as A2ASessionState, A as A2AAuth, G as GatewaySessionState, a as A2AGatewayAdapterOptions, n as ParlantMessages, P as ParlantHistoryConverter, t as OpencodeSessionState, O as OpencodeHistoryConverter } from './opencode-2YdscIc1.cjs';
|
|
8
|
+
import { c as createBandMcpBackend } from './backends-ZLxmQrTZ.cjs';
|
|
9
|
+
import { M as McpToolRegistration } from './sdk-BTciSLRQ.cjs';
|
|
10
10
|
|
|
11
11
|
type GenericAdapterHandler = (args: {
|
|
12
12
|
message: PlatformMessage;
|
|
@@ -177,7 +177,7 @@ interface CodexAdapterConfig {
|
|
|
177
177
|
customSection?: string;
|
|
178
178
|
/**
|
|
179
179
|
* Full system prompt override.
|
|
180
|
-
* When set, this bypasses the default
|
|
180
|
+
* When set, this bypasses the default Band prompt template + customSection.
|
|
181
181
|
*/
|
|
182
182
|
systemPrompt?: string;
|
|
183
183
|
experimentalApi?: boolean;
|
|
@@ -675,7 +675,7 @@ declare class A2AAdapter extends SimpleAdapter<A2ASessionState, MessagingTools>
|
|
|
675
675
|
}
|
|
676
676
|
|
|
677
677
|
declare class A2AGatewayAdapter extends SimpleAdapter<GatewaySessionState, MessagingTools> {
|
|
678
|
-
private readonly
|
|
678
|
+
private readonly bandRest;
|
|
679
679
|
private readonly gatewayUrl;
|
|
680
680
|
private readonly host;
|
|
681
681
|
private readonly port;
|
|
@@ -998,6 +998,7 @@ interface OpencodeClientLike {
|
|
|
998
998
|
registerMcpServer(input: {
|
|
999
999
|
name: string;
|
|
1000
1000
|
url: string;
|
|
1001
|
+
headers?: Record<string, string>;
|
|
1001
1002
|
}): Promise<Record<string, unknown>>;
|
|
1002
1003
|
deregisterMcpServer(name: string): Promise<void>;
|
|
1003
1004
|
iterEvents(): AsyncIterable<Record<string, unknown>>;
|
|
@@ -1090,6 +1091,7 @@ declare abstract class SdkOpencodeClientBase implements OpencodeClientLike {
|
|
|
1090
1091
|
registerMcpServer(input: {
|
|
1091
1092
|
name: string;
|
|
1092
1093
|
url: string;
|
|
1094
|
+
headers?: Record<string, string>;
|
|
1093
1095
|
}): Promise<Record<string, unknown>>;
|
|
1094
1096
|
deregisterMcpServer(name: string): Promise<void>;
|
|
1095
1097
|
iterEvents(): AsyncIterable<Record<string, unknown>>;
|
|
@@ -1138,7 +1140,7 @@ interface OpencodeAdapterOptions {
|
|
|
1138
1140
|
customTools?: CustomToolDef[];
|
|
1139
1141
|
historyConverter?: OpencodeHistoryConverter;
|
|
1140
1142
|
clientFactory?: (config: Required<OpencodeAdapterConfig>) => OpencodeClientLike;
|
|
1141
|
-
mcpBackendFactory?: typeof
|
|
1143
|
+
mcpBackendFactory?: typeof createBandMcpBackend;
|
|
1142
1144
|
logger?: Logger;
|
|
1143
1145
|
}
|
|
1144
1146
|
declare class OpencodeAdapter extends SimpleAdapter<OpencodeSessionState, AdapterToolsProtocol> {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { S as SimpleAdapter } from './simpleAdapter
|
|
2
|
-
import { A as AdapterToolsProtocol, a as AgentToolsProtocol, c as MessagingTools, T as ToolExecutor, f as ToolSchemaProvider, H as HistoryConverter } from './protocols-
|
|
3
|
-
import { H as HistoryProvider, P as PlatformMessage } from './types-
|
|
1
|
+
import { S as SimpleAdapter } from './simpleAdapter--wznuoOw.js';
|
|
2
|
+
import { A as AdapterToolsProtocol, a as AgentToolsProtocol, c as MessagingTools, T as ToolExecutor, f as ToolSchemaProvider, H as HistoryConverter } from './protocols-Bwwcql0h.js';
|
|
3
|
+
import { H as HistoryProvider, P as PlatformMessage } from './types-BTN_ZETM.js';
|
|
4
4
|
import { L as Logger } from './logger-CABQOnlR.js';
|
|
5
5
|
import { C as CustomToolDef } from './customTools-BzF0IISO.js';
|
|
6
|
-
import { m as ToolModelMessage, n as ToolModelSchema, M as MetadataMap } from './dtos-
|
|
7
|
-
import { s as GoogleADKMessages, q as GoogleADKHistoryConverter, e as A2ASessionState, A as A2AAuth, G as GatewaySessionState, a as A2AGatewayAdapterOptions, n as ParlantMessages, P as ParlantHistoryConverter, t as OpencodeSessionState, O as OpencodeHistoryConverter } from './opencode-
|
|
8
|
-
import { c as
|
|
9
|
-
import { M as McpToolRegistration } from './sdk-
|
|
6
|
+
import { m as ToolModelMessage, n as ToolModelSchema, M as MetadataMap } from './dtos-B8KU_q4d.js';
|
|
7
|
+
import { s as GoogleADKMessages, q as GoogleADKHistoryConverter, e as A2ASessionState, A as A2AAuth, G as GatewaySessionState, a as A2AGatewayAdapterOptions, n as ParlantMessages, P as ParlantHistoryConverter, t as OpencodeSessionState, O as OpencodeHistoryConverter } from './opencode-Bld62x5t.js';
|
|
8
|
+
import { c as createBandMcpBackend } from './backends-D-dBdDm-.js';
|
|
9
|
+
import { M as McpToolRegistration } from './sdk-qKJtMma_.js';
|
|
10
10
|
|
|
11
11
|
type GenericAdapterHandler = (args: {
|
|
12
12
|
message: PlatformMessage;
|
|
@@ -177,7 +177,7 @@ interface CodexAdapterConfig {
|
|
|
177
177
|
customSection?: string;
|
|
178
178
|
/**
|
|
179
179
|
* Full system prompt override.
|
|
180
|
-
* When set, this bypasses the default
|
|
180
|
+
* When set, this bypasses the default Band prompt template + customSection.
|
|
181
181
|
*/
|
|
182
182
|
systemPrompt?: string;
|
|
183
183
|
experimentalApi?: boolean;
|
|
@@ -675,7 +675,7 @@ declare class A2AAdapter extends SimpleAdapter<A2ASessionState, MessagingTools>
|
|
|
675
675
|
}
|
|
676
676
|
|
|
677
677
|
declare class A2AGatewayAdapter extends SimpleAdapter<GatewaySessionState, MessagingTools> {
|
|
678
|
-
private readonly
|
|
678
|
+
private readonly bandRest;
|
|
679
679
|
private readonly gatewayUrl;
|
|
680
680
|
private readonly host;
|
|
681
681
|
private readonly port;
|
|
@@ -998,6 +998,7 @@ interface OpencodeClientLike {
|
|
|
998
998
|
registerMcpServer(input: {
|
|
999
999
|
name: string;
|
|
1000
1000
|
url: string;
|
|
1001
|
+
headers?: Record<string, string>;
|
|
1001
1002
|
}): Promise<Record<string, unknown>>;
|
|
1002
1003
|
deregisterMcpServer(name: string): Promise<void>;
|
|
1003
1004
|
iterEvents(): AsyncIterable<Record<string, unknown>>;
|
|
@@ -1090,6 +1091,7 @@ declare abstract class SdkOpencodeClientBase implements OpencodeClientLike {
|
|
|
1090
1091
|
registerMcpServer(input: {
|
|
1091
1092
|
name: string;
|
|
1092
1093
|
url: string;
|
|
1094
|
+
headers?: Record<string, string>;
|
|
1093
1095
|
}): Promise<Record<string, unknown>>;
|
|
1094
1096
|
deregisterMcpServer(name: string): Promise<void>;
|
|
1095
1097
|
iterEvents(): AsyncIterable<Record<string, unknown>>;
|
|
@@ -1138,7 +1140,7 @@ interface OpencodeAdapterOptions {
|
|
|
1138
1140
|
customTools?: CustomToolDef[];
|
|
1139
1141
|
historyConverter?: OpencodeHistoryConverter;
|
|
1140
1142
|
clientFactory?: (config: Required<OpencodeAdapterConfig>) => OpencodeClientLike;
|
|
1141
|
-
mcpBackendFactory?: typeof
|
|
1143
|
+
mcpBackendFactory?: typeof createBandMcpBackend;
|
|
1142
1144
|
logger?: Logger;
|
|
1143
1145
|
}
|
|
1144
1146
|
declare class OpencodeAdapter extends SimpleAdapter<OpencodeSessionState, AdapterToolsProtocol> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HistoryConverter } from './protocols-
|
|
2
|
-
import { G as GatewaySessionState } from './opencode-
|
|
1
|
+
import { H as HistoryConverter } from './protocols-Bwwcql0h.js';
|
|
2
|
+
import { G as GatewaySessionState } from './opencode-Bld62x5t.js';
|
|
3
3
|
|
|
4
4
|
declare class GatewayHistoryConverter implements HistoryConverter<GatewaySessionState> {
|
|
5
5
|
convert(raw: Array<Record<string, unknown>>): GatewaySessionState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HistoryConverter } from './protocols-
|
|
2
|
-
import { G as GatewaySessionState } from './opencode
|
|
1
|
+
import { H as HistoryConverter } from './protocols-Bz1rxcUg.cjs';
|
|
2
|
+
import { G as GatewaySessionState } from './opencode-2YdscIc1.cjs';
|
|
3
3
|
|
|
4
4
|
declare class GatewayHistoryConverter implements HistoryConverter<GatewaySessionState> {
|
|
5
5
|
convert(raw: Array<Record<string, unknown>>): GatewaySessionState;
|