@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/runtime.d.cts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { c as ContactEventConfig, g as MessageEvent, C as ContactEvent, f as PlatformEvent, P as PlatformMessage } from './types-
|
|
2
|
-
export { A as AgentConfig, b as ContactEventCallback, d as ContactEventStrategy, e as ConversationContext, H as HistoryProvider, M as MessageHandler, h as SYNTHETIC_CONTACT_EVENTS_SENDER_ID, i as SYNTHETIC_CONTACT_EVENTS_SENDER_NAME, j as SYNTHETIC_SENDER_TYPE, S as SessionConfig, k as ensureHandlePrefix } from './types-
|
|
1
|
+
import { c as ContactEventConfig, g as MessageEvent, C as ContactEvent, f as PlatformEvent, P as PlatformMessage } from './types-D958TC71.cjs';
|
|
2
|
+
export { A as AgentConfig, b as ContactEventCallback, d as ContactEventStrategy, e as ConversationContext, H as HistoryProvider, M as MessageHandler, h as SYNTHETIC_CONTACT_EVENTS_SENDER_ID, i as SYNTHETIC_CONTACT_EVENTS_SENDER_NAME, j as SYNTHETIC_SENDER_TYPE, S as SessionConfig, k as ensureHandlePrefix } from './types-D958TC71.cjs';
|
|
3
3
|
import { L as Logger } from './logger-CABQOnlR.cjs';
|
|
4
|
-
import { A as AdapterToolsProtocol, a as AgentToolsProtocol, h as AgentToolsCapabilities, C as ContactTools } from './protocols-
|
|
5
|
-
import { e as AgentToolsRestApi, f as ChatMessagingRestApi, g as ChatRoomRestApi, h as ContactRestApi } from './types-
|
|
6
|
-
import {
|
|
7
|
-
export { e as ALL_TOOL_NAMES, A as AgentRuntime,
|
|
8
|
-
import { M as MetadataMap,
|
|
4
|
+
import { A as AdapterToolsProtocol, a as AgentToolsProtocol, h as AgentToolsCapabilities, C as ContactTools } from './protocols-Bz1rxcUg.cjs';
|
|
5
|
+
import { e as AgentToolsRestApi, f as ChatMessagingRestApi, g as ChatRoomRestApi, h as ContactRestApi } from './types-BgYFd_Yw.cjs';
|
|
6
|
+
import { B as BandLink, c as ExecutionContext } from './schemas-BotL3ZLH.cjs';
|
|
7
|
+
export { e as ALL_TOOL_NAMES, A as AgentRuntime, f as BASE_TOOL_NAMES, C as CHAT_TOOL_NAMES, g as CONTACT_TOOL_NAMES, D as DefaultPreprocessor, E as ExecutionContextOptions, h as ExecutionState, M as MCP_SERVER_NAME, b as MCP_TOOL_PREFIX, i as MEMORY_TOOL_NAMES, P as PlatformRuntime, T as TOOL_MODELS, j as getToolDescription, m as mcpToolNames } from './schemas-BotL3ZLH.cjs';
|
|
8
|
+
import { M as MetadataMap, a as MentionInput, T as ToolOperationResult, c as PaginatedList, d as PeerRecord, P as ParticipantRecord, 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, m as ToolModelMessage } from './dtos-B8KU_q4d.cjs';
|
|
9
|
+
import { ParticipantRoster } from '@band-ai/band-sdk-core';
|
|
10
|
+
export { ParticipantRoster, RetryTracker } from '@band-ai/band-sdk-core';
|
|
9
11
|
import 'zod';
|
|
10
|
-
import './pagination-
|
|
12
|
+
import './pagination-DqdkQArT.cjs';
|
|
11
13
|
import './disconnectReason-IuADl6TH.cjs';
|
|
12
14
|
|
|
13
|
-
declare const HUB_ROOM_SYSTEM_PROMPT = "## OVERRIDE: Contact Management Mode\n\nThis is your CONTACTS HUB - a dedicated room for managing contact requests.\n\n**IMPORTANT: Do NOT delegate or add participants here.** You handle contact events DIRECTLY using the contact tools below. Do NOT call
|
|
15
|
+
declare const HUB_ROOM_SYSTEM_PROMPT = "## OVERRIDE: Contact Management Mode\n\nThis is your CONTACTS HUB - a dedicated room for managing contact requests.\n\n**IMPORTANT: Do NOT delegate or add participants here.** You handle contact events DIRECTLY using the contact tools below. Do NOT call band_lookup_peers() or band_add_participant() in this room.\n\n## Your Role\n\n1. **Review incoming contact requests** - When you see a [Contact Request] message, evaluate it\n2. **Take action** - Use the contact tools to respond:\n - `band_respond_contact_request(action=\"approve\", request_id=\"...\")` to accept\n - `band_respond_contact_request(action=\"reject\", request_id=\"...\")` to decline\n3. **Report your decision** - Send a thought event explaining what you did\n\n## Example\n\n[Contact Events]: [Contact Request] Alice (@alice) wants to connect.\nRequest ID: abc-123\n\nYour response:\n1. band_send_event(\"Received contact request from Alice. Approving.\", message_type=\"thought\")\n2. band_respond_contact_request(action=\"approve\", request_id=\"abc-123\")\n3. band_send_event(\"Approved contact request from Alice (@alice)\", message_type=\"thought\")\n\n## Contact Tools (use these, NOT participant tools)\n- `band_respond_contact_request(action, request_id)` - Approve/reject requests\n- `band_list_contact_requests()` - List pending requests\n- `band_list_contacts()` - List current contacts";
|
|
14
16
|
type ContactHandlerRestApi = Partial<AgentToolsRestApi> & Pick<ChatMessagingRestApi, "createChatEvent"> & Pick<ChatRoomRestApi, "createChat"> & Partial<Pick<ContactRestApi, "listContactRequests">>;
|
|
15
17
|
interface ContactEventHandlerOptions {
|
|
16
18
|
config: ContactEventConfig;
|
|
@@ -55,7 +57,7 @@ declare class ContactEventHandler {
|
|
|
55
57
|
type ExecutionHandler = (context: ExecutionContext, event: PlatformEvent) => Promise<void>;
|
|
56
58
|
interface ExecutionOptions {
|
|
57
59
|
roomId: string;
|
|
58
|
-
link:
|
|
60
|
+
link: BandLink;
|
|
59
61
|
context: ExecutionContext;
|
|
60
62
|
onExecute: ExecutionHandler;
|
|
61
63
|
onFailure?: (error: unknown, event: PlatformEvent) => void | Promise<void>;
|
|
@@ -98,7 +100,7 @@ declare class Execution {
|
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
interface RoomPresenceOptions {
|
|
101
|
-
link:
|
|
103
|
+
link: BandLink;
|
|
102
104
|
roomFilter?: (room: MetadataMap) => boolean;
|
|
103
105
|
autoSubscribeExistingRooms?: boolean;
|
|
104
106
|
logger?: Logger;
|
|
@@ -132,14 +134,14 @@ declare class RoomPresence {
|
|
|
132
134
|
interface AgentToolsOptions {
|
|
133
135
|
roomId: string;
|
|
134
136
|
rest: AgentToolsRestApi;
|
|
135
|
-
|
|
137
|
+
roster?: ParticipantRoster;
|
|
136
138
|
capabilities?: Partial<AgentToolsCapabilities>;
|
|
137
139
|
}
|
|
138
140
|
declare class AgentTools implements AgentToolsProtocol {
|
|
139
141
|
readonly roomId: string;
|
|
140
142
|
readonly capabilities: Readonly<AgentToolsCapabilities>;
|
|
141
143
|
private readonly rest;
|
|
142
|
-
private
|
|
144
|
+
private readonly roster;
|
|
143
145
|
private readonly adapterTools;
|
|
144
146
|
private readonly toolHandlers;
|
|
145
147
|
constructor(options: AgentToolsOptions);
|
|
@@ -176,7 +178,6 @@ declare class AgentTools implements AgentToolsProtocol {
|
|
|
176
178
|
private resolveMentions;
|
|
177
179
|
private lookupPeerByName;
|
|
178
180
|
private normalizeMentionHandle;
|
|
179
|
-
private replaceParticipants;
|
|
180
181
|
private buildAdapterTools;
|
|
181
182
|
private bindAdapterToolMethod;
|
|
182
183
|
private buildToolHandlers;
|
|
@@ -240,19 +241,6 @@ interface RenderSystemPromptOptions {
|
|
|
240
241
|
}
|
|
241
242
|
declare function renderSystemPrompt(options?: RenderSystemPromptOptions): string;
|
|
242
243
|
|
|
243
|
-
declare class ParticipantTracker {
|
|
244
|
-
private participantsList;
|
|
245
|
-
private lastSent;
|
|
246
|
-
private loaded;
|
|
247
|
-
get participants(): Array<Record<string, unknown>>;
|
|
248
|
-
get isLoaded(): boolean;
|
|
249
|
-
setLoaded(participants: Array<Record<string, unknown>>): void;
|
|
250
|
-
add(participant: Record<string, unknown>): boolean;
|
|
251
|
-
remove(participantId: string): boolean;
|
|
252
|
-
changed(): boolean;
|
|
253
|
-
markSent(): void;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
244
|
interface StoppableAgent {
|
|
257
245
|
stop(timeoutMs?: number | null): Promise<boolean>;
|
|
258
246
|
run(options?: {
|
|
@@ -278,4 +266,4 @@ declare class GracefulShutdown {
|
|
|
278
266
|
}
|
|
279
267
|
declare function runWithGracefulShutdown(agent: StoppableAgent, options?: GracefulShutdownOptions): Promise<void>;
|
|
280
268
|
|
|
281
|
-
export { AgentTools, BASE_INSTRUCTIONS, CHAT_EVENT_TYPES, CHAT_MESSAGE_TYPES, type ChatEventType, type ChatMessageType, ContactEventConfig, ContactEventHandler, ContactToolsImpl, Execution, ExecutionContext, type ExecutionHandler, GracefulShutdown, HUB_ROOM_SYSTEM_PROMPT, MEMORY_SECTION,
|
|
269
|
+
export { AgentTools, BASE_INSTRUCTIONS, CHAT_EVENT_TYPES, CHAT_MESSAGE_TYPES, type ChatEventType, type ChatMessageType, ContactEventConfig, ContactEventHandler, ContactToolsImpl, Execution, ExecutionContext, type ExecutionHandler, GracefulShutdown, HUB_ROOM_SYSTEM_PROMPT, MEMORY_SECTION, PlatformMessage, type RenderSystemPromptOptions, RoomPresence, TEMPLATES, assertChatEventType, buildParticipantsMessage, formatHistoryForLlm, formatMessageForLlm, isChatEventType, renderSystemPrompt, replaceUuidMentions, runWithGracefulShutdown };
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { c as ContactEventConfig, g as MessageEvent, C as ContactEvent, f as PlatformEvent, P as PlatformMessage } from './types-
|
|
2
|
-
export { A as AgentConfig, b as ContactEventCallback, d as ContactEventStrategy, e as ConversationContext, H as HistoryProvider, M as MessageHandler, h as SYNTHETIC_CONTACT_EVENTS_SENDER_ID, i as SYNTHETIC_CONTACT_EVENTS_SENDER_NAME, j as SYNTHETIC_SENDER_TYPE, S as SessionConfig, k as ensureHandlePrefix } from './types-
|
|
1
|
+
import { c as ContactEventConfig, g as MessageEvent, C as ContactEvent, f as PlatformEvent, P as PlatformMessage } from './types-BTN_ZETM.js';
|
|
2
|
+
export { A as AgentConfig, b as ContactEventCallback, d as ContactEventStrategy, e as ConversationContext, H as HistoryProvider, M as MessageHandler, h as SYNTHETIC_CONTACT_EVENTS_SENDER_ID, i as SYNTHETIC_CONTACT_EVENTS_SENDER_NAME, j as SYNTHETIC_SENDER_TYPE, S as SessionConfig, k as ensureHandlePrefix } from './types-BTN_ZETM.js';
|
|
3
3
|
import { L as Logger } from './logger-CABQOnlR.js';
|
|
4
|
-
import { A as AdapterToolsProtocol, a as AgentToolsProtocol, h as AgentToolsCapabilities, C as ContactTools } from './protocols-
|
|
5
|
-
import { e as AgentToolsRestApi, f as ChatMessagingRestApi, g as ChatRoomRestApi, h as ContactRestApi } from './types-
|
|
6
|
-
import {
|
|
7
|
-
export { e as ALL_TOOL_NAMES, A as AgentRuntime,
|
|
8
|
-
import { M as MetadataMap,
|
|
4
|
+
import { A as AdapterToolsProtocol, a as AgentToolsProtocol, h as AgentToolsCapabilities, C as ContactTools } from './protocols-Bwwcql0h.js';
|
|
5
|
+
import { e as AgentToolsRestApi, f as ChatMessagingRestApi, g as ChatRoomRestApi, h as ContactRestApi } from './types-BivGO7I9.js';
|
|
6
|
+
import { B as BandLink, c as ExecutionContext } from './schemas-DBsC4J1g.js';
|
|
7
|
+
export { e as ALL_TOOL_NAMES, A as AgentRuntime, f as BASE_TOOL_NAMES, C as CHAT_TOOL_NAMES, g as CONTACT_TOOL_NAMES, D as DefaultPreprocessor, E as ExecutionContextOptions, h as ExecutionState, M as MCP_SERVER_NAME, b as MCP_TOOL_PREFIX, i as MEMORY_TOOL_NAMES, P as PlatformRuntime, T as TOOL_MODELS, j as getToolDescription, m as mcpToolNames } from './schemas-DBsC4J1g.js';
|
|
8
|
+
import { M as MetadataMap, a as MentionInput, T as ToolOperationResult, c as PaginatedList, d as PeerRecord, P as ParticipantRecord, 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, m as ToolModelMessage } from './dtos-B8KU_q4d.js';
|
|
9
|
+
import { ParticipantRoster } from '@band-ai/band-sdk-core';
|
|
10
|
+
export { ParticipantRoster, RetryTracker } from '@band-ai/band-sdk-core';
|
|
9
11
|
import 'zod';
|
|
10
|
-
import './pagination-
|
|
12
|
+
import './pagination-BgEx-HeL.js';
|
|
11
13
|
import './disconnectReason-IuADl6TH.js';
|
|
12
14
|
|
|
13
|
-
declare const HUB_ROOM_SYSTEM_PROMPT = "## OVERRIDE: Contact Management Mode\n\nThis is your CONTACTS HUB - a dedicated room for managing contact requests.\n\n**IMPORTANT: Do NOT delegate or add participants here.** You handle contact events DIRECTLY using the contact tools below. Do NOT call
|
|
15
|
+
declare const HUB_ROOM_SYSTEM_PROMPT = "## OVERRIDE: Contact Management Mode\n\nThis is your CONTACTS HUB - a dedicated room for managing contact requests.\n\n**IMPORTANT: Do NOT delegate or add participants here.** You handle contact events DIRECTLY using the contact tools below. Do NOT call band_lookup_peers() or band_add_participant() in this room.\n\n## Your Role\n\n1. **Review incoming contact requests** - When you see a [Contact Request] message, evaluate it\n2. **Take action** - Use the contact tools to respond:\n - `band_respond_contact_request(action=\"approve\", request_id=\"...\")` to accept\n - `band_respond_contact_request(action=\"reject\", request_id=\"...\")` to decline\n3. **Report your decision** - Send a thought event explaining what you did\n\n## Example\n\n[Contact Events]: [Contact Request] Alice (@alice) wants to connect.\nRequest ID: abc-123\n\nYour response:\n1. band_send_event(\"Received contact request from Alice. Approving.\", message_type=\"thought\")\n2. band_respond_contact_request(action=\"approve\", request_id=\"abc-123\")\n3. band_send_event(\"Approved contact request from Alice (@alice)\", message_type=\"thought\")\n\n## Contact Tools (use these, NOT participant tools)\n- `band_respond_contact_request(action, request_id)` - Approve/reject requests\n- `band_list_contact_requests()` - List pending requests\n- `band_list_contacts()` - List current contacts";
|
|
14
16
|
type ContactHandlerRestApi = Partial<AgentToolsRestApi> & Pick<ChatMessagingRestApi, "createChatEvent"> & Pick<ChatRoomRestApi, "createChat"> & Partial<Pick<ContactRestApi, "listContactRequests">>;
|
|
15
17
|
interface ContactEventHandlerOptions {
|
|
16
18
|
config: ContactEventConfig;
|
|
@@ -55,7 +57,7 @@ declare class ContactEventHandler {
|
|
|
55
57
|
type ExecutionHandler = (context: ExecutionContext, event: PlatformEvent) => Promise<void>;
|
|
56
58
|
interface ExecutionOptions {
|
|
57
59
|
roomId: string;
|
|
58
|
-
link:
|
|
60
|
+
link: BandLink;
|
|
59
61
|
context: ExecutionContext;
|
|
60
62
|
onExecute: ExecutionHandler;
|
|
61
63
|
onFailure?: (error: unknown, event: PlatformEvent) => void | Promise<void>;
|
|
@@ -98,7 +100,7 @@ declare class Execution {
|
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
interface RoomPresenceOptions {
|
|
101
|
-
link:
|
|
103
|
+
link: BandLink;
|
|
102
104
|
roomFilter?: (room: MetadataMap) => boolean;
|
|
103
105
|
autoSubscribeExistingRooms?: boolean;
|
|
104
106
|
logger?: Logger;
|
|
@@ -132,14 +134,14 @@ declare class RoomPresence {
|
|
|
132
134
|
interface AgentToolsOptions {
|
|
133
135
|
roomId: string;
|
|
134
136
|
rest: AgentToolsRestApi;
|
|
135
|
-
|
|
137
|
+
roster?: ParticipantRoster;
|
|
136
138
|
capabilities?: Partial<AgentToolsCapabilities>;
|
|
137
139
|
}
|
|
138
140
|
declare class AgentTools implements AgentToolsProtocol {
|
|
139
141
|
readonly roomId: string;
|
|
140
142
|
readonly capabilities: Readonly<AgentToolsCapabilities>;
|
|
141
143
|
private readonly rest;
|
|
142
|
-
private
|
|
144
|
+
private readonly roster;
|
|
143
145
|
private readonly adapterTools;
|
|
144
146
|
private readonly toolHandlers;
|
|
145
147
|
constructor(options: AgentToolsOptions);
|
|
@@ -176,7 +178,6 @@ declare class AgentTools implements AgentToolsProtocol {
|
|
|
176
178
|
private resolveMentions;
|
|
177
179
|
private lookupPeerByName;
|
|
178
180
|
private normalizeMentionHandle;
|
|
179
|
-
private replaceParticipants;
|
|
180
181
|
private buildAdapterTools;
|
|
181
182
|
private bindAdapterToolMethod;
|
|
182
183
|
private buildToolHandlers;
|
|
@@ -240,19 +241,6 @@ interface RenderSystemPromptOptions {
|
|
|
240
241
|
}
|
|
241
242
|
declare function renderSystemPrompt(options?: RenderSystemPromptOptions): string;
|
|
242
243
|
|
|
243
|
-
declare class ParticipantTracker {
|
|
244
|
-
private participantsList;
|
|
245
|
-
private lastSent;
|
|
246
|
-
private loaded;
|
|
247
|
-
get participants(): Array<Record<string, unknown>>;
|
|
248
|
-
get isLoaded(): boolean;
|
|
249
|
-
setLoaded(participants: Array<Record<string, unknown>>): void;
|
|
250
|
-
add(participant: Record<string, unknown>): boolean;
|
|
251
|
-
remove(participantId: string): boolean;
|
|
252
|
-
changed(): boolean;
|
|
253
|
-
markSent(): void;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
244
|
interface StoppableAgent {
|
|
257
245
|
stop(timeoutMs?: number | null): Promise<boolean>;
|
|
258
246
|
run(options?: {
|
|
@@ -278,4 +266,4 @@ declare class GracefulShutdown {
|
|
|
278
266
|
}
|
|
279
267
|
declare function runWithGracefulShutdown(agent: StoppableAgent, options?: GracefulShutdownOptions): Promise<void>;
|
|
280
268
|
|
|
281
|
-
export { AgentTools, BASE_INSTRUCTIONS, CHAT_EVENT_TYPES, CHAT_MESSAGE_TYPES, type ChatEventType, type ChatMessageType, ContactEventConfig, ContactEventHandler, ContactToolsImpl, Execution, ExecutionContext, type ExecutionHandler, GracefulShutdown, HUB_ROOM_SYSTEM_PROMPT, MEMORY_SECTION,
|
|
269
|
+
export { AgentTools, BASE_INSTRUCTIONS, CHAT_EVENT_TYPES, CHAT_MESSAGE_TYPES, type ChatEventType, type ChatMessageType, ContactEventConfig, ContactEventHandler, ContactToolsImpl, Execution, ExecutionContext, type ExecutionHandler, GracefulShutdown, HUB_ROOM_SYSTEM_PROMPT, MEMORY_SECTION, PlatformMessage, type RenderSystemPromptOptions, RoomPresence, TEMPLATES, assertChatEventType, buildParticipantsMessage, formatHistoryForLlm, formatMessageForLlm, isChatEventType, renderSystemPrompt, replaceUuidMentions, runWithGracefulShutdown };
|
package/dist/runtime.js
CHANGED
|
@@ -8,13 +8,12 @@ import {
|
|
|
8
8
|
ExecutionContext,
|
|
9
9
|
GracefulShutdown,
|
|
10
10
|
HUB_ROOM_SYSTEM_PROMPT,
|
|
11
|
-
MessageRetryTracker,
|
|
12
11
|
PlatformRuntime,
|
|
13
12
|
hydrateTrackedRooms,
|
|
14
13
|
runWithGracefulShutdown,
|
|
15
14
|
trackRoomJoin,
|
|
16
15
|
trackRoomLeave
|
|
17
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-N2QTUMGO.js";
|
|
18
17
|
import {
|
|
19
18
|
HistoryProvider,
|
|
20
19
|
SYNTHETIC_CONTACT_EVENTS_SENDER_ID,
|
|
@@ -25,13 +24,13 @@ import {
|
|
|
25
24
|
formatHistoryForLlm,
|
|
26
25
|
formatMessageForLlm,
|
|
27
26
|
replaceUuidMentions
|
|
28
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-LBWKISBS.js";
|
|
29
28
|
import {
|
|
30
29
|
BASE_INSTRUCTIONS,
|
|
31
30
|
MEMORY_SECTION,
|
|
32
31
|
TEMPLATES,
|
|
33
32
|
renderSystemPrompt
|
|
34
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-WLCM2OXG.js";
|
|
35
34
|
import {
|
|
36
35
|
ALL_TOOL_NAMES,
|
|
37
36
|
BASE_TOOL_NAMES,
|
|
@@ -39,6 +38,7 @@ import {
|
|
|
39
38
|
CHAT_MESSAGE_TYPES,
|
|
40
39
|
CHAT_TOOL_NAMES,
|
|
41
40
|
CONTACT_TOOL_NAMES,
|
|
41
|
+
MCP_SERVER_NAME,
|
|
42
42
|
MCP_TOOL_PREFIX,
|
|
43
43
|
MEMORY_TOOL_NAMES,
|
|
44
44
|
TOOL_MODELS,
|
|
@@ -46,17 +46,17 @@ import {
|
|
|
46
46
|
getToolDescription,
|
|
47
47
|
isChatEventType,
|
|
48
48
|
mcpToolNames
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-RV76SKFT.js";
|
|
50
50
|
import "./chunk-US226AS4.js";
|
|
51
51
|
import {
|
|
52
52
|
DEFAULT_REQUEST_OPTIONS
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-EAI2M3WM.js";
|
|
54
54
|
import "./chunk-ZZJRRBPQ.js";
|
|
55
55
|
import "./chunk-3BKAC4OZ.js";
|
|
56
56
|
import {
|
|
57
57
|
NoopLogger
|
|
58
58
|
} from "./chunk-OD2G5LFQ.js";
|
|
59
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-JY75VSQK.js";
|
|
60
60
|
|
|
61
61
|
// src/runtime/rooms/RoomPresence.ts
|
|
62
62
|
var RoomPresence = class {
|
|
@@ -179,60 +179,8 @@ var RoomPresence = class {
|
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
181
|
|
|
182
|
-
// src/runtime/
|
|
183
|
-
|
|
184
|
-
participantsList = [];
|
|
185
|
-
lastSent = null;
|
|
186
|
-
loaded = false;
|
|
187
|
-
get participants() {
|
|
188
|
-
return [...this.participantsList];
|
|
189
|
-
}
|
|
190
|
-
get isLoaded() {
|
|
191
|
-
return this.loaded;
|
|
192
|
-
}
|
|
193
|
-
setLoaded(participants) {
|
|
194
|
-
this.participantsList = participants.map((participant) => ({ ...participant }));
|
|
195
|
-
this.loaded = true;
|
|
196
|
-
}
|
|
197
|
-
add(participant) {
|
|
198
|
-
if (this.participantsList.some((entry) => entry.id === participant.id)) {
|
|
199
|
-
return false;
|
|
200
|
-
}
|
|
201
|
-
this.participantsList.push({
|
|
202
|
-
id: participant.id,
|
|
203
|
-
name: participant.name,
|
|
204
|
-
type: participant.type,
|
|
205
|
-
handle: participant.handle
|
|
206
|
-
});
|
|
207
|
-
return true;
|
|
208
|
-
}
|
|
209
|
-
remove(participantId) {
|
|
210
|
-
const before = this.participantsList.length;
|
|
211
|
-
this.participantsList = this.participantsList.filter(
|
|
212
|
-
(participant) => participant.id !== participantId
|
|
213
|
-
);
|
|
214
|
-
return this.participantsList.length < before;
|
|
215
|
-
}
|
|
216
|
-
changed() {
|
|
217
|
-
if (!this.lastSent) {
|
|
218
|
-
return true;
|
|
219
|
-
}
|
|
220
|
-
const oldIds = new Set(this.lastSent.map((participant) => participant.id));
|
|
221
|
-
const newIds = new Set(this.participantsList.map((participant) => participant.id));
|
|
222
|
-
if (oldIds.size !== newIds.size) {
|
|
223
|
-
return true;
|
|
224
|
-
}
|
|
225
|
-
for (const id of oldIds) {
|
|
226
|
-
if (!newIds.has(id)) {
|
|
227
|
-
return true;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
return false;
|
|
231
|
-
}
|
|
232
|
-
markSent() {
|
|
233
|
-
this.lastSent = this.participantsList.map((participant) => ({ ...participant }));
|
|
234
|
-
}
|
|
235
|
-
};
|
|
182
|
+
// src/runtime/index.ts
|
|
183
|
+
import { ParticipantRoster, RetryTracker } from "@band-ai/band-sdk-core";
|
|
236
184
|
export {
|
|
237
185
|
ALL_TOOL_NAMES,
|
|
238
186
|
AgentRuntime,
|
|
@@ -251,12 +199,13 @@ export {
|
|
|
251
199
|
GracefulShutdown,
|
|
252
200
|
HUB_ROOM_SYSTEM_PROMPT,
|
|
253
201
|
HistoryProvider,
|
|
202
|
+
MCP_SERVER_NAME,
|
|
254
203
|
MCP_TOOL_PREFIX,
|
|
255
204
|
MEMORY_SECTION,
|
|
256
205
|
MEMORY_TOOL_NAMES,
|
|
257
|
-
|
|
258
|
-
ParticipantTracker,
|
|
206
|
+
ParticipantRoster,
|
|
259
207
|
PlatformRuntime,
|
|
208
|
+
RetryTracker,
|
|
260
209
|
RoomPresence,
|
|
261
210
|
SYNTHETIC_CONTACT_EVENTS_SENDER_ID,
|
|
262
211
|
SYNTHETIC_CONTACT_EVENTS_SENDER_NAME,
|
|
@@ -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-Bz1rxcUg.cjs';
|
|
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-D958TC71.cjs';
|
|
3
|
+
import { M as MetadataMap, P as ParticipantRecord } from './dtos-B8KU_q4d.cjs';
|
|
4
4
|
import { L as Logger } from './logger-CABQOnlR.cjs';
|
|
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-BgYFd_Yw.cjs';
|
|
6
|
+
import { P as PaginationOptions } from './pagination-DqdkQArT.cjs';
|
|
7
7
|
import { W as WebSocketConflictPolicy, b as WebSocketDisconnectReason } from './disconnectReason-IuADl6TH.cjs';
|
|
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 };
|