@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/dist/mcp-claude.cjs
CHANGED
|
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/mcp/sdk.ts
|
|
21
21
|
var sdk_exports = {};
|
|
22
22
|
__export(sdk_exports, {
|
|
23
|
-
|
|
23
|
+
createBandSdkMcpServer: () => createBandSdkMcpServer
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(sdk_exports);
|
|
26
26
|
var import_claude_agent_sdk = require("@anthropic-ai/claude-agent-sdk");
|
|
@@ -91,9 +91,9 @@ var MEMORY_STATUSES = [
|
|
|
91
91
|
"active",
|
|
92
92
|
// Normal, visible memories
|
|
93
93
|
"superseded",
|
|
94
|
-
// Outdated; soft-deleted via
|
|
94
|
+
// Outdated; soft-deleted via band_supersede_memory
|
|
95
95
|
"archived",
|
|
96
|
-
// Hidden but preserved via
|
|
96
|
+
// Hidden but preserved via band_archive_memory
|
|
97
97
|
"all"
|
|
98
98
|
// Any status (no filter)
|
|
99
99
|
];
|
|
@@ -104,7 +104,7 @@ var MEMORY_STORE_SCOPE = namedValues(MEMORY_STORE_SCOPES);
|
|
|
104
104
|
|
|
105
105
|
// src/runtime/tools/schemas.ts
|
|
106
106
|
var TOOL_MODELS = {
|
|
107
|
-
|
|
107
|
+
band_send_message: {
|
|
108
108
|
description: "Send a message to the chat room. Use this to respond to users or other agents. Messages require at least one @mention in the mentions array. You MUST use this tool to communicate \u2014 plain text responses won't reach users. When delegating, send the full task context in this message instead of assuming hidden state.",
|
|
109
109
|
properties: {
|
|
110
110
|
content: {
|
|
@@ -120,7 +120,7 @@ var TOOL_MODELS = {
|
|
|
120
120
|
},
|
|
121
121
|
required: ["content", "mentions"]
|
|
122
122
|
},
|
|
123
|
-
|
|
123
|
+
band_send_event: {
|
|
124
124
|
description: "Send an event to the chat room. No mentions required. 'thought': Share your reasoning or plan BEFORE taking actions. Explain what you're about to do and why. 'error': Report an error or problem that occurred. 'task': Report task progress or completion status. Always send a thought before complex actions to keep users informed.",
|
|
125
125
|
properties: {
|
|
126
126
|
content: {
|
|
@@ -139,12 +139,12 @@ var TOOL_MODELS = {
|
|
|
139
139
|
},
|
|
140
140
|
required: ["content", "message_type"]
|
|
141
141
|
},
|
|
142
|
-
|
|
143
|
-
description: "Add a participant (agent or user) to the chat room by name. IMPORTANT: Use
|
|
142
|
+
band_add_participant: {
|
|
143
|
+
description: "Add a participant (agent or user) to the chat room by name. IMPORTANT: Use band_lookup_peers() first to find available agents. Pass the exact peer name from band_lookup_peers, not the handle. For normal delegation, omit role or use 'member'.",
|
|
144
144
|
properties: {
|
|
145
145
|
name: {
|
|
146
146
|
type: "string",
|
|
147
|
-
description: "Name of participant to add (must match a name from
|
|
147
|
+
description: "Name of participant to add (must match a name from band_lookup_peers)."
|
|
148
148
|
},
|
|
149
149
|
role: {
|
|
150
150
|
type: "string",
|
|
@@ -154,7 +154,7 @@ var TOOL_MODELS = {
|
|
|
154
154
|
},
|
|
155
155
|
required: ["name"]
|
|
156
156
|
},
|
|
157
|
-
|
|
157
|
+
band_remove_participant: {
|
|
158
158
|
description: "Remove a participant from the chat room by name.",
|
|
159
159
|
properties: {
|
|
160
160
|
name: {
|
|
@@ -164,12 +164,12 @@ var TOOL_MODELS = {
|
|
|
164
164
|
},
|
|
165
165
|
required: ["name"]
|
|
166
166
|
},
|
|
167
|
-
|
|
167
|
+
band_get_participants: {
|
|
168
168
|
description: "Get a list of all participants in the current chat room.",
|
|
169
169
|
properties: {},
|
|
170
170
|
required: []
|
|
171
171
|
},
|
|
172
|
-
|
|
172
|
+
band_lookup_peers: {
|
|
173
173
|
description: "List available peers (agents and users) that can be added to this room. Automatically excludes peers already in the room. Returns dict with 'peers' list and 'metadata' (page, page_size, total_count, total_pages). Use this to find specialized agents (e.g., Weather Agent) when you cannot answer a question directly.",
|
|
174
174
|
properties: {
|
|
175
175
|
page: {
|
|
@@ -184,7 +184,7 @@ var TOOL_MODELS = {
|
|
|
184
184
|
},
|
|
185
185
|
required: []
|
|
186
186
|
},
|
|
187
|
-
|
|
187
|
+
band_create_chatroom: {
|
|
188
188
|
description: "Create a new chat room for a specific task or conversation.",
|
|
189
189
|
properties: {
|
|
190
190
|
task_id: {
|
|
@@ -194,7 +194,7 @@ var TOOL_MODELS = {
|
|
|
194
194
|
},
|
|
195
195
|
required: []
|
|
196
196
|
},
|
|
197
|
-
|
|
197
|
+
band_list_contacts: {
|
|
198
198
|
description: "List agent's contacts with pagination.",
|
|
199
199
|
properties: {
|
|
200
200
|
page: {
|
|
@@ -211,7 +211,7 @@ var TOOL_MODELS = {
|
|
|
211
211
|
},
|
|
212
212
|
required: []
|
|
213
213
|
},
|
|
214
|
-
|
|
214
|
+
band_add_contact: {
|
|
215
215
|
description: "Send a contact request to add someone as a contact. Returns 'pending' when request is created. Returns 'approved' when inverse request existed and was auto-accepted.",
|
|
216
216
|
properties: {
|
|
217
217
|
handle: {
|
|
@@ -225,7 +225,7 @@ var TOOL_MODELS = {
|
|
|
225
225
|
},
|
|
226
226
|
required: ["handle"]
|
|
227
227
|
},
|
|
228
|
-
|
|
228
|
+
band_remove_contact: {
|
|
229
229
|
description: "Remove an existing contact by handle or ID.",
|
|
230
230
|
properties: {
|
|
231
231
|
handle: {
|
|
@@ -239,7 +239,7 @@ var TOOL_MODELS = {
|
|
|
239
239
|
},
|
|
240
240
|
required: []
|
|
241
241
|
},
|
|
242
|
-
|
|
242
|
+
band_list_contact_requests: {
|
|
243
243
|
description: "List both received and sent contact requests. Received requests are always filtered to pending status. Sent requests can be filtered by status.",
|
|
244
244
|
properties: {
|
|
245
245
|
page: {
|
|
@@ -261,7 +261,7 @@ var TOOL_MODELS = {
|
|
|
261
261
|
},
|
|
262
262
|
required: []
|
|
263
263
|
},
|
|
264
|
-
|
|
264
|
+
band_respond_contact_request: {
|
|
265
265
|
description: "Respond to a contact request. 'approve'/'reject': For requests you RECEIVED (handle = requester's handle). 'cancel': For requests you SENT (handle = recipient's handle).",
|
|
266
266
|
properties: {
|
|
267
267
|
action: {
|
|
@@ -280,7 +280,7 @@ var TOOL_MODELS = {
|
|
|
280
280
|
},
|
|
281
281
|
required: ["action"]
|
|
282
282
|
},
|
|
283
|
-
|
|
283
|
+
band_list_memories: {
|
|
284
284
|
description: "List memories accessible to the agent. Returns memories about the specified subject (cross-agent sharing) and organization-wide shared memories.",
|
|
285
285
|
properties: {
|
|
286
286
|
subject_id: {
|
|
@@ -325,7 +325,7 @@ var TOOL_MODELS = {
|
|
|
325
325
|
},
|
|
326
326
|
required: []
|
|
327
327
|
},
|
|
328
|
-
|
|
328
|
+
band_store_memory: {
|
|
329
329
|
description: "Store a new memory entry. The memory will be associated with the authenticated agent as the source. For subject-scoped memories, provide a subject_id. For organization-scoped memories, omit subject_id.",
|
|
330
330
|
properties: {
|
|
331
331
|
content: {
|
|
@@ -367,7 +367,7 @@ var TOOL_MODELS = {
|
|
|
367
367
|
},
|
|
368
368
|
required: ["content", "system", "type", "segment", "thought"]
|
|
369
369
|
},
|
|
370
|
-
|
|
370
|
+
band_get_memory: {
|
|
371
371
|
description: "Retrieve a specific memory by ID.",
|
|
372
372
|
properties: {
|
|
373
373
|
memory_id: {
|
|
@@ -377,7 +377,7 @@ var TOOL_MODELS = {
|
|
|
377
377
|
},
|
|
378
378
|
required: ["memory_id"]
|
|
379
379
|
},
|
|
380
|
-
|
|
380
|
+
band_supersede_memory: {
|
|
381
381
|
description: "Mark a memory as superseded (soft delete). Use when information is outdated or incorrect. The memory remains for audit trail but won't appear in normal queries. Only the source agent can supersede.",
|
|
382
382
|
properties: {
|
|
383
383
|
memory_id: {
|
|
@@ -387,7 +387,7 @@ var TOOL_MODELS = {
|
|
|
387
387
|
},
|
|
388
388
|
required: ["memory_id"]
|
|
389
389
|
},
|
|
390
|
-
|
|
390
|
+
band_archive_memory: {
|
|
391
391
|
description: "Archive a memory (hide but preserve). Use when memory is valid but not currently needed. Archived memories can be restored later by humans. Only the source agent can archive.",
|
|
392
392
|
properties: {
|
|
393
393
|
memory_id: {
|
|
@@ -400,18 +400,18 @@ var TOOL_MODELS = {
|
|
|
400
400
|
};
|
|
401
401
|
var ALL_TOOL_NAMES = new Set(Object.keys(TOOL_MODELS));
|
|
402
402
|
var MEMORY_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
403
|
-
"
|
|
404
|
-
"
|
|
405
|
-
"
|
|
406
|
-
"
|
|
407
|
-
"
|
|
403
|
+
"band_list_memories",
|
|
404
|
+
"band_store_memory",
|
|
405
|
+
"band_get_memory",
|
|
406
|
+
"band_supersede_memory",
|
|
407
|
+
"band_archive_memory"
|
|
408
408
|
]);
|
|
409
409
|
var CONTACT_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
410
|
-
"
|
|
411
|
-
"
|
|
412
|
-
"
|
|
413
|
-
"
|
|
414
|
-
"
|
|
410
|
+
"band_list_contacts",
|
|
411
|
+
"band_add_contact",
|
|
412
|
+
"band_remove_contact",
|
|
413
|
+
"band_list_contact_requests",
|
|
414
|
+
"band_respond_contact_request"
|
|
415
415
|
]);
|
|
416
416
|
var BASE_TOOL_NAMES = new Set(
|
|
417
417
|
[...ALL_TOOL_NAMES].filter((name) => !MEMORY_TOOL_NAMES.has(name))
|
|
@@ -419,7 +419,8 @@ var BASE_TOOL_NAMES = new Set(
|
|
|
419
419
|
var CHAT_TOOL_NAMES = new Set(
|
|
420
420
|
[...BASE_TOOL_NAMES].filter((name) => !CONTACT_TOOL_NAMES.has(name))
|
|
421
421
|
);
|
|
422
|
-
var MCP_TOOL_PREFIX = "
|
|
422
|
+
var MCP_TOOL_PREFIX = "mcp__band__";
|
|
423
|
+
var MCP_SERVER_NAME = "band";
|
|
423
424
|
function mcpToolNames(names) {
|
|
424
425
|
return [...names].sort((a, b) => a.localeCompare(b)).map((name) => `${MCP_TOOL_PREFIX}${name}`);
|
|
425
426
|
}
|
|
@@ -617,7 +618,7 @@ function jsonSchemaToZod(z2, schema) {
|
|
|
617
618
|
}
|
|
618
619
|
|
|
619
620
|
// src/mcp/sdk.ts
|
|
620
|
-
function
|
|
621
|
+
function createBandSdkMcpServer(options) {
|
|
621
622
|
const registrationOptions = {
|
|
622
623
|
enableMemoryTools: options.enableMemoryTools,
|
|
623
624
|
enableContactTools: true,
|
|
@@ -629,7 +630,7 @@ function createThenvoiSdkMcpServer(options) {
|
|
|
629
630
|
const contextCache = /* @__PURE__ */ new Map();
|
|
630
631
|
const MAX_CONTEXT_CACHE_ENTRIES = 100;
|
|
631
632
|
const serverConfig = (0, import_claude_agent_sdk.createSdkMcpServer)({
|
|
632
|
-
name:
|
|
633
|
+
name: MCP_SERVER_NAME,
|
|
633
634
|
tools: toolDefinitions
|
|
634
635
|
});
|
|
635
636
|
return {
|
|
@@ -849,5 +850,5 @@ function toSdkToolDefinition(registration) {
|
|
|
849
850
|
}
|
|
850
851
|
// Annotate the CommonJS export names for ESM import in node:
|
|
851
852
|
0 && (module.exports = {
|
|
852
|
-
|
|
853
|
+
createBandSdkMcpServer
|
|
853
854
|
});
|
package/dist/mcp-claude.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@anthropic-ai/claude-agent-sdk';
|
|
2
|
-
import './protocols-
|
|
3
|
-
export {
|
|
4
|
-
import './dtos-
|
|
2
|
+
import './protocols-Bz1rxcUg.cjs';
|
|
3
|
+
export { B as BandSdkMcpServer, C as CreateBandSdkMcpServerOptions, G as GetSystemPromptContextOptions, g as GetSystemPromptContextResult, h as createBandSdkMcpServer } from './sdk-BTciSLRQ.cjs';
|
|
4
|
+
import './dtos-B8KU_q4d.cjs';
|
package/dist/mcp-claude.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@anthropic-ai/claude-agent-sdk';
|
|
2
|
-
import './protocols-
|
|
3
|
-
export {
|
|
4
|
-
import './dtos-
|
|
2
|
+
import './protocols-Bwwcql0h.js';
|
|
3
|
+
export { B as BandSdkMcpServer, C as CreateBandSdkMcpServerOptions, G as GetSystemPromptContextOptions, g as GetSystemPromptContextResult, h as createBandSdkMcpServer } from './sdk-qKJtMma_.js';
|
|
4
|
+
import './dtos-B8KU_q4d.js';
|
package/dist/mcp-claude.js
CHANGED
|
@@ -3,12 +3,13 @@ import {
|
|
|
3
3
|
buildSingleContextRegistrations,
|
|
4
4
|
buildZodShape,
|
|
5
5
|
resolveSingleRoomTools
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NT7TBFX2.js";
|
|
7
7
|
import {
|
|
8
|
+
MCP_SERVER_NAME,
|
|
8
9
|
mcpToolNames
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RV76SKFT.js";
|
|
10
11
|
import "./chunk-3BKAC4OZ.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-JY75VSQK.js";
|
|
12
13
|
|
|
13
14
|
// src/mcp/sdk.ts
|
|
14
15
|
import {
|
|
@@ -16,7 +17,7 @@ import {
|
|
|
16
17
|
tool
|
|
17
18
|
} from "@anthropic-ai/claude-agent-sdk";
|
|
18
19
|
import { z } from "zod";
|
|
19
|
-
function
|
|
20
|
+
function createBandSdkMcpServer(options) {
|
|
20
21
|
const registrationOptions = {
|
|
21
22
|
enableMemoryTools: options.enableMemoryTools,
|
|
22
23
|
enableContactTools: true,
|
|
@@ -28,7 +29,7 @@ function createThenvoiSdkMcpServer(options) {
|
|
|
28
29
|
const contextCache = /* @__PURE__ */ new Map();
|
|
29
30
|
const MAX_CONTEXT_CACHE_ENTRIES = 100;
|
|
30
31
|
const serverConfig = createSdkMcpServer({
|
|
31
|
-
name:
|
|
32
|
+
name: MCP_SERVER_NAME,
|
|
32
33
|
tools: toolDefinitions
|
|
33
34
|
});
|
|
34
35
|
return {
|
|
@@ -247,5 +248,5 @@ function toSdkToolDefinition(registration) {
|
|
|
247
248
|
);
|
|
248
249
|
}
|
|
249
250
|
export {
|
|
250
|
-
|
|
251
|
+
createBandSdkMcpServer
|
|
251
252
|
};
|