@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
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { h as AgentToolsCapabilities, g as PlatformMessageLike, A as AdapterToolsProtocol, e as Preprocessor, F as FrameworkAdapter, i as PreprocessorContext } from './protocols-
|
|
2
|
-
import { f as PlatformEvent, P as PlatformMessage, e as ConversationContext, S as SessionConfig, c as ContactEventConfig, A as AgentConfig, C as ContactEvent, a as AgentInput } from './types-
|
|
3
|
-
import { M as MetadataMap, P as ParticipantRecord } from './dtos-
|
|
1
|
+
import { h as AgentToolsCapabilities, g as PlatformMessageLike, A as AdapterToolsProtocol, e as Preprocessor, F as FrameworkAdapter, i as PreprocessorContext } from './protocols-Bwwcql0h.js';
|
|
2
|
+
import { f as PlatformEvent, P as PlatformMessage, e as ConversationContext, S as SessionConfig, c as ContactEventConfig, A as AgentConfig, C as ContactEvent, a as AgentInput } from './types-BTN_ZETM.js';
|
|
3
|
+
import { M as MetadataMap, P as ParticipantRecord } from './dtos-B8KU_q4d.js';
|
|
4
4
|
import { L as Logger } from './logger-CABQOnlR.js';
|
|
5
|
-
import {
|
|
6
|
-
import { P as PaginationOptions } from './pagination-
|
|
5
|
+
import { B as BandLinkRestApi, b as RestRequestOptions, P as PaginatedResponse, e as AgentToolsRestApi } from './types-BivGO7I9.js';
|
|
6
|
+
import { P as PaginationOptions } from './pagination-BgEx-HeL.js';
|
|
7
7
|
import { W as WebSocketConflictPolicy, b as WebSocketDisconnectReason } from './disconnectReason-IuADl6TH.js';
|
|
8
|
+
import { RetryTracker } from '@band-ai/band-sdk-core';
|
|
8
9
|
|
|
9
10
|
interface TopicHandlers {
|
|
10
11
|
[event: string]: (payload: Record<string, unknown>) => Promise<void> | void;
|
|
@@ -18,12 +19,12 @@ interface StreamingTransport {
|
|
|
18
19
|
isConnected(): boolean;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
interface
|
|
22
|
+
interface BandLinkOptions {
|
|
22
23
|
agentId: string;
|
|
23
24
|
apiKey: string;
|
|
24
25
|
wsUrl?: string;
|
|
25
26
|
restUrl?: string;
|
|
26
|
-
restApi?:
|
|
27
|
+
restApi?: BandLinkRestApi;
|
|
27
28
|
transport?: StreamingTransport;
|
|
28
29
|
logger?: Logger;
|
|
29
30
|
capabilities?: Partial<AgentToolsCapabilities>;
|
|
@@ -33,12 +34,12 @@ declare function deriveDefaultRestUrl(wsUrl: string): string;
|
|
|
33
34
|
interface MessageMarkOptions {
|
|
34
35
|
bestEffort?: boolean;
|
|
35
36
|
}
|
|
36
|
-
declare class
|
|
37
|
+
declare class BandLink implements AsyncIterable<PlatformEvent> {
|
|
37
38
|
readonly agentId: string;
|
|
38
39
|
private readonly apiKey;
|
|
39
40
|
readonly wsUrl: string;
|
|
40
41
|
readonly restUrl: string;
|
|
41
|
-
readonly rest:
|
|
42
|
+
readonly rest: BandLinkRestApi;
|
|
42
43
|
readonly capabilities: AgentToolsCapabilities;
|
|
43
44
|
private readonly logger;
|
|
44
45
|
private readonly transport;
|
|
@@ -48,7 +49,7 @@ declare class ThenvoiLink implements AsyncIterable<PlatformEvent> {
|
|
|
48
49
|
private connected;
|
|
49
50
|
private lastDisconnectReason;
|
|
50
51
|
private terminalDisconnectError;
|
|
51
|
-
constructor(options:
|
|
52
|
+
constructor(options: BandLinkOptions);
|
|
52
53
|
isConnected(): boolean;
|
|
53
54
|
getDisconnectReason(): WebSocketDisconnectReason | null;
|
|
54
55
|
connect(): Promise<void>;
|
|
@@ -79,21 +80,6 @@ declare class ThenvoiLink implements AsyncIterable<PlatformEvent> {
|
|
|
79
80
|
private emit;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
declare class MessageRetryTracker {
|
|
83
|
-
private readonly maxRetriesValue;
|
|
84
|
-
private readonly maxTracked;
|
|
85
|
-
private attempts;
|
|
86
|
-
private failed;
|
|
87
|
-
constructor(maxRetries?: number, maxTracked?: number);
|
|
88
|
-
get maxRetries(): number;
|
|
89
|
-
isPermanentlyFailed(messageId: string): boolean;
|
|
90
|
-
recordAttempt(messageId: string): [number, boolean];
|
|
91
|
-
markSuccess(messageId: string): void;
|
|
92
|
-
markPermanentlyFailed(messageId: string): void;
|
|
93
|
-
private evictMapIfNeeded;
|
|
94
|
-
private evictSetIfNeeded;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
83
|
type ExecutionState = "starting" | "idle" | "processing";
|
|
98
84
|
interface ExecutionContextLink {
|
|
99
85
|
rest: AgentToolsRestApi;
|
|
@@ -118,11 +104,10 @@ declare class ExecutionContext {
|
|
|
118
104
|
private readonly history;
|
|
119
105
|
private messageIds;
|
|
120
106
|
private readonly dedupCache;
|
|
121
|
-
private
|
|
107
|
+
private readonly roster;
|
|
122
108
|
private readonly tools;
|
|
123
109
|
private readonly adapterTools;
|
|
124
110
|
private participantsMessage;
|
|
125
|
-
private lastSentParticipantIds;
|
|
126
111
|
private contactsMessage;
|
|
127
112
|
private contextCache;
|
|
128
113
|
private contextCacheExpiresAt;
|
|
@@ -133,7 +118,7 @@ declare class ExecutionContext {
|
|
|
133
118
|
constructor(options: ExecutionContextOptions);
|
|
134
119
|
get state(): ExecutionState;
|
|
135
120
|
setState(state: ExecutionState): void;
|
|
136
|
-
getRetryTracker():
|
|
121
|
+
getRetryTracker(): RetryTracker;
|
|
137
122
|
get isLlmInitialized(): boolean;
|
|
138
123
|
markLlmInitialized(): void;
|
|
139
124
|
injectSystemMessage(message: string): void;
|
|
@@ -143,14 +128,13 @@ declare class ExecutionContext {
|
|
|
143
128
|
recordMessage(message: PlatformMessage): void;
|
|
144
129
|
getRawHistory(): MetadataMap[];
|
|
145
130
|
setParticipants(participants: ParticipantRecord[]): void;
|
|
146
|
-
addParticipant(participant: ParticipantRecord): void;
|
|
131
|
+
addParticipant(participant: Partial<ParticipantRecord> & Pick<ParticipantRecord, "id">): void;
|
|
147
132
|
removeParticipant(participantId: string): void;
|
|
148
133
|
setContactsMessage(message: string | null): void;
|
|
149
134
|
consumeParticipantsMessage(): string | null;
|
|
150
135
|
consumeContactsMessage(): string | null;
|
|
151
136
|
getHydratedHistory(excludeMessageId?: string): Promise<MetadataMap[]>;
|
|
152
137
|
hydrateContext(forceRefresh?: boolean): Promise<ConversationContext>;
|
|
153
|
-
private replaceParticipants;
|
|
154
138
|
private buildLocalContext;
|
|
155
139
|
private loadParticipants;
|
|
156
140
|
private loadHydratedMessages;
|
|
@@ -167,8 +151,8 @@ interface PlatformRuntimeOptions {
|
|
|
167
151
|
apiKey: string;
|
|
168
152
|
wsUrl?: string;
|
|
169
153
|
restUrl?: string;
|
|
170
|
-
link?:
|
|
171
|
-
linkOptions?: Omit<
|
|
154
|
+
link?: BandLink;
|
|
155
|
+
linkOptions?: Omit<BandLinkOptions, "agentId" | "apiKey">;
|
|
172
156
|
preprocessor?: Preprocessor<PlatformEvent>;
|
|
173
157
|
sessionConfig?: SessionConfig;
|
|
174
158
|
contactConfig?: ContactEventConfig;
|
|
@@ -209,7 +193,7 @@ declare class PlatformRuntime {
|
|
|
209
193
|
private _agentDescription;
|
|
210
194
|
private contactsSubscribed;
|
|
211
195
|
constructor(options: PlatformRuntimeOptions);
|
|
212
|
-
get link():
|
|
196
|
+
get link(): BandLink;
|
|
213
197
|
get name(): string;
|
|
214
198
|
get agentId(): string;
|
|
215
199
|
get description(): string;
|
|
@@ -227,7 +211,7 @@ declare class PlatformRuntime {
|
|
|
227
211
|
}
|
|
228
212
|
|
|
229
213
|
interface AgentRuntimeOptions {
|
|
230
|
-
link:
|
|
214
|
+
link: BandLink;
|
|
231
215
|
agentId: string;
|
|
232
216
|
onExecute: (context: ExecutionContext, event: PlatformEvent) => Promise<void>;
|
|
233
217
|
onSessionCleanup?: (roomId: string) => Promise<void>;
|
|
@@ -293,7 +277,7 @@ declare class DefaultPreprocessor implements Preprocessor<PlatformEvent> {
|
|
|
293
277
|
}
|
|
294
278
|
|
|
295
279
|
declare const TOOL_MODELS: {
|
|
296
|
-
readonly
|
|
280
|
+
readonly band_send_message: {
|
|
297
281
|
readonly description: string;
|
|
298
282
|
readonly properties: {
|
|
299
283
|
readonly content: {
|
|
@@ -311,7 +295,7 @@ declare const TOOL_MODELS: {
|
|
|
311
295
|
};
|
|
312
296
|
readonly required: readonly ["content", "mentions"];
|
|
313
297
|
};
|
|
314
|
-
readonly
|
|
298
|
+
readonly band_send_event: {
|
|
315
299
|
readonly description: string;
|
|
316
300
|
readonly properties: {
|
|
317
301
|
readonly content: {
|
|
@@ -330,12 +314,12 @@ declare const TOOL_MODELS: {
|
|
|
330
314
|
};
|
|
331
315
|
readonly required: readonly ["content", "message_type"];
|
|
332
316
|
};
|
|
333
|
-
readonly
|
|
317
|
+
readonly band_add_participant: {
|
|
334
318
|
readonly description: string;
|
|
335
319
|
readonly properties: {
|
|
336
320
|
readonly name: {
|
|
337
321
|
readonly type: "string";
|
|
338
|
-
readonly description: "Name of participant to add (must match a name from
|
|
322
|
+
readonly description: "Name of participant to add (must match a name from band_lookup_peers).";
|
|
339
323
|
};
|
|
340
324
|
readonly role: {
|
|
341
325
|
readonly type: "string";
|
|
@@ -345,7 +329,7 @@ declare const TOOL_MODELS: {
|
|
|
345
329
|
};
|
|
346
330
|
readonly required: readonly ["name"];
|
|
347
331
|
};
|
|
348
|
-
readonly
|
|
332
|
+
readonly band_remove_participant: {
|
|
349
333
|
readonly description: "Remove a participant from the chat room by name.";
|
|
350
334
|
readonly properties: {
|
|
351
335
|
readonly name: {
|
|
@@ -355,12 +339,12 @@ declare const TOOL_MODELS: {
|
|
|
355
339
|
};
|
|
356
340
|
readonly required: readonly ["name"];
|
|
357
341
|
};
|
|
358
|
-
readonly
|
|
342
|
+
readonly band_get_participants: {
|
|
359
343
|
readonly description: "Get a list of all participants in the current chat room.";
|
|
360
344
|
readonly properties: {};
|
|
361
345
|
readonly required: readonly [];
|
|
362
346
|
};
|
|
363
|
-
readonly
|
|
347
|
+
readonly band_lookup_peers: {
|
|
364
348
|
readonly description: string;
|
|
365
349
|
readonly properties: {
|
|
366
350
|
readonly page: {
|
|
@@ -375,7 +359,7 @@ declare const TOOL_MODELS: {
|
|
|
375
359
|
};
|
|
376
360
|
readonly required: readonly [];
|
|
377
361
|
};
|
|
378
|
-
readonly
|
|
362
|
+
readonly band_create_chatroom: {
|
|
379
363
|
readonly description: "Create a new chat room for a specific task or conversation.";
|
|
380
364
|
readonly properties: {
|
|
381
365
|
readonly task_id: {
|
|
@@ -385,7 +369,7 @@ declare const TOOL_MODELS: {
|
|
|
385
369
|
};
|
|
386
370
|
readonly required: readonly [];
|
|
387
371
|
};
|
|
388
|
-
readonly
|
|
372
|
+
readonly band_list_contacts: {
|
|
389
373
|
readonly description: "List agent's contacts with pagination.";
|
|
390
374
|
readonly properties: {
|
|
391
375
|
readonly page: {
|
|
@@ -402,7 +386,7 @@ declare const TOOL_MODELS: {
|
|
|
402
386
|
};
|
|
403
387
|
readonly required: readonly [];
|
|
404
388
|
};
|
|
405
|
-
readonly
|
|
389
|
+
readonly band_add_contact: {
|
|
406
390
|
readonly description: string;
|
|
407
391
|
readonly properties: {
|
|
408
392
|
readonly handle: {
|
|
@@ -416,7 +400,7 @@ declare const TOOL_MODELS: {
|
|
|
416
400
|
};
|
|
417
401
|
readonly required: readonly ["handle"];
|
|
418
402
|
};
|
|
419
|
-
readonly
|
|
403
|
+
readonly band_remove_contact: {
|
|
420
404
|
readonly description: "Remove an existing contact by handle or ID.";
|
|
421
405
|
readonly properties: {
|
|
422
406
|
readonly handle: {
|
|
@@ -430,7 +414,7 @@ declare const TOOL_MODELS: {
|
|
|
430
414
|
};
|
|
431
415
|
readonly required: readonly [];
|
|
432
416
|
};
|
|
433
|
-
readonly
|
|
417
|
+
readonly band_list_contact_requests: {
|
|
434
418
|
readonly description: string;
|
|
435
419
|
readonly properties: {
|
|
436
420
|
readonly page: {
|
|
@@ -452,7 +436,7 @@ declare const TOOL_MODELS: {
|
|
|
452
436
|
};
|
|
453
437
|
readonly required: readonly [];
|
|
454
438
|
};
|
|
455
|
-
readonly
|
|
439
|
+
readonly band_respond_contact_request: {
|
|
456
440
|
readonly description: string;
|
|
457
441
|
readonly properties: {
|
|
458
442
|
readonly action: {
|
|
@@ -471,7 +455,7 @@ declare const TOOL_MODELS: {
|
|
|
471
455
|
};
|
|
472
456
|
readonly required: readonly ["action"];
|
|
473
457
|
};
|
|
474
|
-
readonly
|
|
458
|
+
readonly band_list_memories: {
|
|
475
459
|
readonly description: string;
|
|
476
460
|
readonly properties: {
|
|
477
461
|
readonly subject_id: {
|
|
@@ -516,7 +500,7 @@ declare const TOOL_MODELS: {
|
|
|
516
500
|
};
|
|
517
501
|
readonly required: readonly [];
|
|
518
502
|
};
|
|
519
|
-
readonly
|
|
503
|
+
readonly band_store_memory: {
|
|
520
504
|
readonly description: string;
|
|
521
505
|
readonly properties: {
|
|
522
506
|
readonly content: {
|
|
@@ -558,7 +542,7 @@ declare const TOOL_MODELS: {
|
|
|
558
542
|
};
|
|
559
543
|
readonly required: readonly ["content", "system", "type", "segment", "thought"];
|
|
560
544
|
};
|
|
561
|
-
readonly
|
|
545
|
+
readonly band_get_memory: {
|
|
562
546
|
readonly description: "Retrieve a specific memory by ID.";
|
|
563
547
|
readonly properties: {
|
|
564
548
|
readonly memory_id: {
|
|
@@ -568,7 +552,7 @@ declare const TOOL_MODELS: {
|
|
|
568
552
|
};
|
|
569
553
|
readonly required: readonly ["memory_id"];
|
|
570
554
|
};
|
|
571
|
-
readonly
|
|
555
|
+
readonly band_supersede_memory: {
|
|
572
556
|
readonly description: string;
|
|
573
557
|
readonly properties: {
|
|
574
558
|
readonly memory_id: {
|
|
@@ -578,7 +562,7 @@ declare const TOOL_MODELS: {
|
|
|
578
562
|
};
|
|
579
563
|
readonly required: readonly ["memory_id"];
|
|
580
564
|
};
|
|
581
|
-
readonly
|
|
565
|
+
readonly band_archive_memory: {
|
|
582
566
|
readonly description: string;
|
|
583
567
|
readonly properties: {
|
|
584
568
|
readonly memory_id: {
|
|
@@ -594,8 +578,10 @@ declare const MEMORY_TOOL_NAMES: Set<string>;
|
|
|
594
578
|
declare const CONTACT_TOOL_NAMES: Set<string>;
|
|
595
579
|
declare const BASE_TOOL_NAMES: Set<string>;
|
|
596
580
|
declare const CHAT_TOOL_NAMES: Set<string>;
|
|
597
|
-
declare const MCP_TOOL_PREFIX = "
|
|
581
|
+
declare const MCP_TOOL_PREFIX = "mcp__band__";
|
|
582
|
+
/** The single Band MCP server name; owns every server-name default and integration. */
|
|
583
|
+
declare const MCP_SERVER_NAME = "band";
|
|
598
584
|
declare function mcpToolNames(names: Set<string>): string[];
|
|
599
585
|
declare function getToolDescription(name: string): string;
|
|
600
586
|
|
|
601
|
-
export { AgentRuntime as A,
|
|
587
|
+
export { AgentRuntime as A, BandLink as B, CHAT_TOOL_NAMES as C, DefaultPreprocessor as D, type ExecutionContextOptions as E, MCP_SERVER_NAME as M, PlatformRuntime as P, TOOL_MODELS as T, type PlatformRuntimeOptions as a, MCP_TOOL_PREFIX as b, ExecutionContext as c, deriveDefaultRestUrl as d, ALL_TOOL_NAMES as e, BASE_TOOL_NAMES as f, CONTACT_TOOL_NAMES as g, type ExecutionState as h, MEMORY_TOOL_NAMES as i, getToolDescription as j, mcpToolNames as m };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { McpSdkServerConfigWithInstance, SdkMcpToolDefinition } from '@anthropic-ai/claude-agent-sdk';
|
|
2
|
-
import { A as AdapterToolsProtocol } from './protocols-
|
|
2
|
+
import { A as AdapterToolsProtocol } from './protocols-Bz1rxcUg.cjs';
|
|
3
3
|
|
|
4
4
|
interface McpToolRegistration {
|
|
5
5
|
name: string;
|
|
@@ -38,7 +38,7 @@ declare function buildSingleContextRegistrations(tools: AdapterToolsProtocol, op
|
|
|
38
38
|
declare function successResult(value: unknown): McpToolResult;
|
|
39
39
|
declare function errorResult(message: string): McpToolResult;
|
|
40
40
|
|
|
41
|
-
interface
|
|
41
|
+
interface CreateBandSdkMcpServerOptions {
|
|
42
42
|
enableMemoryTools: boolean;
|
|
43
43
|
/**
|
|
44
44
|
* Returns the tools for a given room. In single-room mode (`multiRoom: false`),
|
|
@@ -71,13 +71,13 @@ interface GetSystemPromptContextResult {
|
|
|
71
71
|
interface GetSystemPromptContextOptions {
|
|
72
72
|
ttlMs?: number;
|
|
73
73
|
}
|
|
74
|
-
interface
|
|
74
|
+
interface BandSdkMcpServer {
|
|
75
75
|
serverConfig: McpSdkServerConfigWithInstance;
|
|
76
76
|
allowedTools: string[];
|
|
77
77
|
toolDefinitions: Array<SdkMcpToolDefinition<any>>;
|
|
78
78
|
getSystemPromptContext(roomId: string, options?: GetSystemPromptContextOptions): Promise<string>;
|
|
79
79
|
getSystemPromptContextData(roomId: string, options?: GetSystemPromptContextOptions): Promise<GetSystemPromptContextResult>;
|
|
80
80
|
}
|
|
81
|
-
declare function
|
|
81
|
+
declare function createBandSdkMcpServer(options: CreateBandSdkMcpServerOptions): BandSdkMcpServer;
|
|
82
82
|
|
|
83
|
-
export { type
|
|
83
|
+
export { type BandSdkMcpServer as B, type CreateBandSdkMcpServerOptions as C, type GetSystemPromptContextOptions as G, type McpToolRegistration as M, type BuildRegistrationsOptions as a, type McpToolInputSchema as b, type McpToolResult as c, buildRoomScopedRegistrations as d, buildSingleContextRegistrations as e, errorResult as f, type GetSystemPromptContextResult as g, createBandSdkMcpServer as h, successResult as s };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { McpSdkServerConfigWithInstance, SdkMcpToolDefinition } from '@anthropic-ai/claude-agent-sdk';
|
|
2
|
-
import { A as AdapterToolsProtocol } from './protocols-
|
|
2
|
+
import { A as AdapterToolsProtocol } from './protocols-Bwwcql0h.js';
|
|
3
3
|
|
|
4
4
|
interface McpToolRegistration {
|
|
5
5
|
name: string;
|
|
@@ -38,7 +38,7 @@ declare function buildSingleContextRegistrations(tools: AdapterToolsProtocol, op
|
|
|
38
38
|
declare function successResult(value: unknown): McpToolResult;
|
|
39
39
|
declare function errorResult(message: string): McpToolResult;
|
|
40
40
|
|
|
41
|
-
interface
|
|
41
|
+
interface CreateBandSdkMcpServerOptions {
|
|
42
42
|
enableMemoryTools: boolean;
|
|
43
43
|
/**
|
|
44
44
|
* Returns the tools for a given room. In single-room mode (`multiRoom: false`),
|
|
@@ -71,13 +71,13 @@ interface GetSystemPromptContextResult {
|
|
|
71
71
|
interface GetSystemPromptContextOptions {
|
|
72
72
|
ttlMs?: number;
|
|
73
73
|
}
|
|
74
|
-
interface
|
|
74
|
+
interface BandSdkMcpServer {
|
|
75
75
|
serverConfig: McpSdkServerConfigWithInstance;
|
|
76
76
|
allowedTools: string[];
|
|
77
77
|
toolDefinitions: Array<SdkMcpToolDefinition<any>>;
|
|
78
78
|
getSystemPromptContext(roomId: string, options?: GetSystemPromptContextOptions): Promise<string>;
|
|
79
79
|
getSystemPromptContextData(roomId: string, options?: GetSystemPromptContextOptions): Promise<GetSystemPromptContextResult>;
|
|
80
80
|
}
|
|
81
|
-
declare function
|
|
81
|
+
declare function createBandSdkMcpServer(options: CreateBandSdkMcpServerOptions): BandSdkMcpServer;
|
|
82
82
|
|
|
83
|
-
export { type
|
|
83
|
+
export { type BandSdkMcpServer as B, type CreateBandSdkMcpServerOptions as C, type GetSystemPromptContextOptions as G, type McpToolRegistration as M, type BuildRegistrationsOptions as a, type McpToolInputSchema as b, type McpToolResult as c, buildRoomScopedRegistrations as d, buildSingleContextRegistrations as e, errorResult as f, type GetSystemPromptContextResult as g, createBandSdkMcpServer as h, successResult as s };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AdapterToolsProtocol, F as FrameworkAdapter, H as HistoryConverter, g as PlatformMessageLike, b as FrameworkAdapterInput } from './protocols-
|
|
1
|
+
import { A as AdapterToolsProtocol, F as FrameworkAdapter, H as HistoryConverter, g as PlatformMessageLike, b as FrameworkAdapterInput } from './protocols-Bwwcql0h.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Base class for framework adapters that process one message at a time.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AdapterToolsProtocol, F as FrameworkAdapter, H as HistoryConverter, g as PlatformMessageLike, b as FrameworkAdapterInput } from './protocols-
|
|
1
|
+
import { A as AdapterToolsProtocol, F as FrameworkAdapter, H as HistoryConverter, g as PlatformMessageLike, b as FrameworkAdapterInput } from './protocols-Bz1rxcUg.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Base class for framework adapters that process one message at a time.
|
package/dist/testing.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as AdapterToolsProtocol, d as PeerLookupTools, C as ContactTools, M as MemoryTools, h as AgentToolsCapabilities } from './protocols-
|
|
2
|
-
import { a as MentionInput, M as MetadataMap, T as ToolOperationResult, P as ParticipantRecord, c as PaginatedList, d as PeerRecord, b as ToolSchemaRecord, L as ListContactsArgs, C as ContactRecord, A as AddContactArgs, R as RemoveContactArgs, e as ListContactRequestsArgs, f as ContactRequestsResult, g as RespondContactRequestArgs, h as ListMemoriesArgs, i as MemoryRecord, S as StoreMemoryArgs } from './dtos-
|
|
3
|
-
import { R as RestApi } from './types-
|
|
1
|
+
import { A as AdapterToolsProtocol, d as PeerLookupTools, C as ContactTools, M as MemoryTools, h as AgentToolsCapabilities } from './protocols-Bz1rxcUg.cjs';
|
|
2
|
+
import { a as MentionInput, M as MetadataMap, T as ToolOperationResult, P as ParticipantRecord, c as PaginatedList, d as PeerRecord, b as ToolSchemaRecord, L as ListContactsArgs, C as ContactRecord, A as AddContactArgs, R as RemoveContactArgs, e as ListContactRequestsArgs, f as ContactRequestsResult, g as RespondContactRequestArgs, h as ListMemoriesArgs, i as MemoryRecord, S as StoreMemoryArgs } from './dtos-B8KU_q4d.cjs';
|
|
3
|
+
import { R as RestApi } from './types-BgYFd_Yw.cjs';
|
|
4
4
|
|
|
5
5
|
interface CapturedMessage {
|
|
6
6
|
content: string;
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as AdapterToolsProtocol, d as PeerLookupTools, C as ContactTools, M as MemoryTools, h as AgentToolsCapabilities } from './protocols-
|
|
2
|
-
import { a as MentionInput, M as MetadataMap, T as ToolOperationResult, P as ParticipantRecord, c as PaginatedList, d as PeerRecord, b as ToolSchemaRecord, L as ListContactsArgs, C as ContactRecord, A as AddContactArgs, R as RemoveContactArgs, e as ListContactRequestsArgs, f as ContactRequestsResult, g as RespondContactRequestArgs, h as ListMemoriesArgs, i as MemoryRecord, S as StoreMemoryArgs } from './dtos-
|
|
3
|
-
import { R as RestApi } from './types-
|
|
1
|
+
import { A as AdapterToolsProtocol, d as PeerLookupTools, C as ContactTools, M as MemoryTools, h as AgentToolsCapabilities } from './protocols-Bwwcql0h.js';
|
|
2
|
+
import { a as MentionInput, M as MetadataMap, T as ToolOperationResult, P as ParticipantRecord, c as PaginatedList, d as PeerRecord, b as ToolSchemaRecord, L as ListContactsArgs, C as ContactRecord, A as AddContactArgs, R as RemoveContactArgs, e as ListContactRequestsArgs, f as ContactRequestsResult, g as RespondContactRequestArgs, h as ListMemoriesArgs, i as MemoryRecord, S as StoreMemoryArgs } from './dtos-B8KU_q4d.js';
|
|
3
|
+
import { R as RestApi } from './types-BivGO7I9.js';
|
|
4
4
|
|
|
5
5
|
interface CapturedMessage {
|
|
6
6
|
content: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { P as ParticipantRecord } from './dtos-
|
|
3
|
-
import { g as PlatformMessageLike, A as AdapterToolsProtocol, b as FrameworkAdapterInput, H as HistoryConverter } from './protocols-
|
|
2
|
+
import { P as ParticipantRecord } from './dtos-B8KU_q4d.js';
|
|
3
|
+
import { g as PlatformMessageLike, A as AdapterToolsProtocol, b as FrameworkAdapterInput, H as HistoryConverter } from './protocols-Bwwcql0h.js';
|
|
4
4
|
|
|
5
5
|
declare const messageCreatedPayloadSchema: z.ZodObject<{
|
|
6
6
|
id: z.ZodString;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as ToolOperationResult, M as MetadataMap, j as MentionReference, c as PaginatedList, d as PeerRecord, L as ListContactsArgs, C as ContactRecord, A as AddContactArgs, R as RemoveContactArgs, e as ListContactRequestsArgs, f as ContactRequestsResult, g as RespondContactRequestArgs, h as ListMemoriesArgs, i as MemoryRecord, S as StoreMemoryArgs, k as ContactRequestAction, l as PaginationMetadataLike } from './dtos-
|
|
1
|
+
import { T as ToolOperationResult, M as MetadataMap, j as MentionReference, c as PaginatedList, d as PeerRecord, L as ListContactsArgs, C as ContactRecord, A as AddContactArgs, R as RemoveContactArgs, e as ListContactRequestsArgs, f as ContactRequestsResult, g as RespondContactRequestArgs, h as ListMemoriesArgs, i as MemoryRecord, S as StoreMemoryArgs, k as ContactRequestAction, l as PaginationMetadataLike } from './dtos-B8KU_q4d.cjs';
|
|
2
2
|
|
|
3
3
|
interface RestRequestOptions {
|
|
4
4
|
maxRetries?: number;
|
|
@@ -121,10 +121,10 @@ interface MessageQueueRestApi {
|
|
|
121
121
|
}, _options?: RestRequestOptions): Promise<PlatformChatMessage | null>;
|
|
122
122
|
}
|
|
123
123
|
type AgentToolsRestApi = ChatMessagingRestApi & ChatRoomRestApi & ParticipantRestApi & PeerLookupRestApi & ContactRestApi & MemoryRestApi & ContextRestApi & MessageQueueRestApi;
|
|
124
|
-
type
|
|
125
|
-
interface RestApi extends
|
|
124
|
+
type BandLinkRestApi = AgentProfileRestApi & MessageLifecycleRestApi & AgentToolsRestApi & ChatListingRestApi;
|
|
125
|
+
interface RestApi extends BandLinkRestApi {
|
|
126
126
|
}
|
|
127
|
-
interface
|
|
127
|
+
interface FernBandClientLike {
|
|
128
128
|
agentApiIdentity?: {
|
|
129
129
|
getAgentMe(options?: RestRequestOptions): Promise<unknown>;
|
|
130
130
|
};
|
|
@@ -328,4 +328,4 @@ interface FernThenvoiClientLike {
|
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
export { type AgentIdentity as A, type ChatParticipant as C, DEFAULT_REQUEST_OPTIONS as D, type
|
|
331
|
+
export { type AgentIdentity as A, type BandLinkRestApi as B, type ChatParticipant as C, DEFAULT_REQUEST_OPTIONS as D, type FernBandClientLike as F, type PaginatedResponse as P, type RestApi as R, type PaginationMetadata as a, type RestRequestOptions as b, type PlatformChatMessage as c, type ChatMessageMention as d, type AgentToolsRestApi as e, type ChatMessagingRestApi as f, type ChatRoomRestApi as g, type ContactRestApi as h };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as ToolOperationResult, M as MetadataMap, j as MentionReference, c as PaginatedList, d as PeerRecord, L as ListContactsArgs, C as ContactRecord, A as AddContactArgs, R as RemoveContactArgs, e as ListContactRequestsArgs, f as ContactRequestsResult, g as RespondContactRequestArgs, h as ListMemoriesArgs, i as MemoryRecord, S as StoreMemoryArgs, k as ContactRequestAction, l as PaginationMetadataLike } from './dtos-
|
|
1
|
+
import { T as ToolOperationResult, M as MetadataMap, j as MentionReference, c as PaginatedList, d as PeerRecord, L as ListContactsArgs, C as ContactRecord, A as AddContactArgs, R as RemoveContactArgs, e as ListContactRequestsArgs, f as ContactRequestsResult, g as RespondContactRequestArgs, h as ListMemoriesArgs, i as MemoryRecord, S as StoreMemoryArgs, k as ContactRequestAction, l as PaginationMetadataLike } from './dtos-B8KU_q4d.js';
|
|
2
2
|
|
|
3
3
|
interface RestRequestOptions {
|
|
4
4
|
maxRetries?: number;
|
|
@@ -121,10 +121,10 @@ interface MessageQueueRestApi {
|
|
|
121
121
|
}, _options?: RestRequestOptions): Promise<PlatformChatMessage | null>;
|
|
122
122
|
}
|
|
123
123
|
type AgentToolsRestApi = ChatMessagingRestApi & ChatRoomRestApi & ParticipantRestApi & PeerLookupRestApi & ContactRestApi & MemoryRestApi & ContextRestApi & MessageQueueRestApi;
|
|
124
|
-
type
|
|
125
|
-
interface RestApi extends
|
|
124
|
+
type BandLinkRestApi = AgentProfileRestApi & MessageLifecycleRestApi & AgentToolsRestApi & ChatListingRestApi;
|
|
125
|
+
interface RestApi extends BandLinkRestApi {
|
|
126
126
|
}
|
|
127
|
-
interface
|
|
127
|
+
interface FernBandClientLike {
|
|
128
128
|
agentApiIdentity?: {
|
|
129
129
|
getAgentMe(options?: RestRequestOptions): Promise<unknown>;
|
|
130
130
|
};
|
|
@@ -328,4 +328,4 @@ interface FernThenvoiClientLike {
|
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
export { type AgentIdentity as A, type ChatParticipant as C, DEFAULT_REQUEST_OPTIONS as D, type
|
|
331
|
+
export { type AgentIdentity as A, type BandLinkRestApi as B, type ChatParticipant as C, DEFAULT_REQUEST_OPTIONS as D, type FernBandClientLike as F, type PaginatedResponse as P, type RestApi as R, type PaginationMetadata as a, type RestRequestOptions as b, type PlatformChatMessage as c, type ChatMessageMention as d, type AgentToolsRestApi as e, type ChatMessagingRestApi as f, type ChatRoomRestApi as g, type ContactRestApi as h };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { P as ParticipantRecord } from './dtos-
|
|
3
|
-
import { g as PlatformMessageLike, A as AdapterToolsProtocol, b as FrameworkAdapterInput, H as HistoryConverter } from './protocols-
|
|
2
|
+
import { P as ParticipantRecord } from './dtos-B8KU_q4d.cjs';
|
|
3
|
+
import { g as PlatformMessageLike, A as AdapterToolsProtocol, b as FrameworkAdapterInput, H as HistoryConverter } from './protocols-Bz1rxcUg.cjs';
|
|
4
4
|
|
|
5
5
|
declare const messageCreatedPayloadSchema: z.ZodObject<{
|
|
6
6
|
id: z.ZodString;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@band-ai/sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Band TypeScript SDK core runtime",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -81,14 +81,15 @@
|
|
|
81
81
|
"typecheck": "tsc --noEmit",
|
|
82
82
|
"lint": "eslint .",
|
|
83
83
|
"clean": "rm -rf dist",
|
|
84
|
-
"dev:linear": "tsx examples/linear-
|
|
85
|
-
"start:linear": "tsx examples/linear-
|
|
84
|
+
"dev:linear": "tsx --env-file-if-exists=.env.local examples/linear-band/linear-band-bridge-server.ts",
|
|
85
|
+
"start:linear": "tsx examples/linear-band/linear-band-bridge-server.ts"
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|
|
88
88
|
"node": ">=22.12"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
|
-
"@
|
|
91
|
+
"@band-ai/band-sdk-core": "2.0.0",
|
|
92
|
+
"@band-ai/rest-client": "0.0.118",
|
|
92
93
|
"js-yaml": "^4.1.1",
|
|
93
94
|
"phoenix": "^1.8.4",
|
|
94
95
|
"ws": "^8.19.0",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { A as AdapterToolsProtocol } from './protocols-D2bTrQ_t.cjs';
|
|
2
|
-
import { M as McpToolRegistration, T as ThenvoiSdkMcpServer } from './sdk-D2rTDU_o.cjs';
|
|
3
|
-
|
|
4
|
-
type ThenvoiMcpBackendKind = "sdk" | "http" | "sse" | "stdio";
|
|
5
|
-
interface ThenvoiMcpBackend {
|
|
6
|
-
kind: ThenvoiMcpBackendKind;
|
|
7
|
-
server: unknown;
|
|
8
|
-
allowedTools: string[];
|
|
9
|
-
stop(): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
interface CreateThenvoiMcpBackendOptions {
|
|
12
|
-
kind: ThenvoiMcpBackendKind;
|
|
13
|
-
enableMemoryTools: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Returns the tools for a given room. In single-room mode (`multiRoom: false`),
|
|
16
|
-
* called once during init with `""` — must return the tools instance regardless of the argument.
|
|
17
|
-
*/
|
|
18
|
-
getToolsForRoom: (roomId: string) => AdapterToolsProtocol | undefined;
|
|
19
|
-
additionalTools?: McpToolRegistration[];
|
|
20
|
-
multiRoom?: boolean;
|
|
21
|
-
}
|
|
22
|
-
declare function createThenvoiMcpBackend(options: CreateThenvoiMcpBackendOptions): Promise<ThenvoiMcpBackend>;
|
|
23
|
-
declare function getThenvoiSdkMcpServerConfig(backend: ThenvoiMcpBackend): ThenvoiSdkMcpServer["serverConfig"];
|
|
24
|
-
|
|
25
|
-
export { type CreateThenvoiMcpBackendOptions as C, type ThenvoiMcpBackend as T, type ThenvoiMcpBackendKind as a, createThenvoiMcpBackend as c, getThenvoiSdkMcpServerConfig as g };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { A as AdapterToolsProtocol } from './protocols-BF6jamIl.js';
|
|
2
|
-
import { M as McpToolRegistration, T as ThenvoiSdkMcpServer } from './sdk-CyqN1W5g.js';
|
|
3
|
-
|
|
4
|
-
type ThenvoiMcpBackendKind = "sdk" | "http" | "sse" | "stdio";
|
|
5
|
-
interface ThenvoiMcpBackend {
|
|
6
|
-
kind: ThenvoiMcpBackendKind;
|
|
7
|
-
server: unknown;
|
|
8
|
-
allowedTools: string[];
|
|
9
|
-
stop(): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
interface CreateThenvoiMcpBackendOptions {
|
|
12
|
-
kind: ThenvoiMcpBackendKind;
|
|
13
|
-
enableMemoryTools: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Returns the tools for a given room. In single-room mode (`multiRoom: false`),
|
|
16
|
-
* called once during init with `""` — must return the tools instance regardless of the argument.
|
|
17
|
-
*/
|
|
18
|
-
getToolsForRoom: (roomId: string) => AdapterToolsProtocol | undefined;
|
|
19
|
-
additionalTools?: McpToolRegistration[];
|
|
20
|
-
multiRoom?: boolean;
|
|
21
|
-
}
|
|
22
|
-
declare function createThenvoiMcpBackend(options: CreateThenvoiMcpBackendOptions): Promise<ThenvoiMcpBackend>;
|
|
23
|
-
declare function getThenvoiSdkMcpServerConfig(backend: ThenvoiMcpBackend): ThenvoiSdkMcpServer["serverConfig"];
|
|
24
|
-
|
|
25
|
-
export { type CreateThenvoiMcpBackendOptions as C, type ThenvoiMcpBackend as T, type ThenvoiMcpBackendKind as a, createThenvoiMcpBackend as c, getThenvoiSdkMcpServerConfig as g };
|