@band-ai/sdk 0.1.6 → 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 +372 -0
- package/dist/{ClaudeSDKAdapter-CRq4R-WB.d.cts → ClaudeSDKAdapter-BY4zEbCl.d.cts} +14 -10
- package/dist/{ClaudeSDKAdapter-BHOkjN3X.d.ts → ClaudeSDKAdapter-Cna5P1dR.d.ts} +14 -10
- package/dist/{acp-server-B1Da7L6u.d.ts → acp-server-CiUqN3G3.d.ts} +2 -2
- package/dist/{acp-server-BdRz9_UN.d.cts → acp-server-Dlj7D563.d.cts} +2 -2
- package/dist/adapters.cjs +734 -279
- 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-MSL6CWHY.js → chunk-4IAXZBXX.js} +77 -37
- package/dist/{chunk-SG4WLD2H.js → chunk-EAI2M3WM.js} +38 -94
- package/dist/{chunk-YR3BOQNW.js → chunk-JY75VSQK.js} +7 -7
- package/dist/{chunk-INA6YZTZ.js → chunk-LBWKISBS.js} +51 -31
- package/dist/{chunk-I5EZG52P.js → chunk-N2QTUMGO.js} +532 -327
- package/dist/{chunk-RHVH2GZR.js → chunk-NMZLX7TP.js} +110 -56
- package/dist/{chunk-EDPKUUJL.js → chunk-NT7TBFX2.js} +9 -1
- package/dist/{chunk-GVEQ3RAH.js → chunk-RV76SKFT.js} +169 -54
- package/dist/{chunk-W5NDZSYE.js → chunk-TLBCKDQO.js} +23 -23
- package/dist/chunk-US226AS4.js +130 -0
- package/dist/{chunk-IZPV6QS6.js → chunk-WL2HNJZ6.js} +38 -11
- package/dist/chunk-WLCM2OXG.js +181 -0
- 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 +491 -35
- package/dist/converters.d.cts +5 -5
- package/dist/converters.d.ts +5 -5
- package/dist/converters.js +4 -3
- package/dist/core.cjs +53 -10
- package/dist/core.d.cts +10 -9
- package/dist/core.d.ts +10 -9
- package/dist/core.js +8 -4
- package/dist/disconnectReason-IuADl6TH.d.cts +34 -0
- package/dist/disconnectReason-IuADl6TH.d.ts +34 -0
- package/dist/{dtos-DUpbIu8k.d.ts → dtos-B8KU_q4d.d.cts} +26 -6
- package/dist/{dtos-DUpbIu8k.d.cts → dtos-B8KU_q4d.d.ts} +26 -6
- package/dist/index.cjs +1510 -735
- package/dist/index.d.cts +18 -16
- package/dist/index.d.ts +18 -16
- package/dist/index.js +21 -13
- package/dist/linear.cjs +1044 -112
- package/dist/linear.d.cts +146 -16
- package/dist/linear.d.ts +146 -16
- package/dist/linear.js +1031 -110
- package/dist/mcp-claude.cjs +338 -66
- package/dist/mcp-claude.d.cts +3 -3
- package/dist/mcp-claude.d.ts +3 -3
- package/dist/mcp-claude.js +215 -16
- package/dist/mcp.cjs +414 -105
- package/dist/mcp.d.cts +29 -16
- package/dist/mcp.d.ts +29 -16
- package/dist/mcp.js +14 -14
- package/dist/{opencode-BBcDchcN.d.cts → opencode-2YdscIc1.d.cts} +5 -5
- package/dist/{opencode-DthQQUsZ.d.ts → opencode-Bld62x5t.d.ts} +5 -5
- package/dist/{pagination-CcDkVFxK.d.ts → pagination-BgEx-HeL.d.ts} +2 -2
- package/dist/{pagination-BPiys10t.d.cts → pagination-DqdkQArT.d.cts} +2 -2
- package/dist/{protocols-DrhzOH6K.d.ts → protocols-Bwwcql0h.d.ts} +1 -1
- package/dist/{protocols-CInhtFpA.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 +998 -620
- package/dist/runtime.d.cts +22 -29
- package/dist/runtime.d.ts +22 -29
- package/dist/runtime.js +19 -67
- package/dist/{schemas-BpEBkq5V.d.cts → schemas-BotL3ZLH.d.cts} +51 -56
- package/dist/{schemas-vos1AaBc.d.ts → schemas-DBsC4J1g.d.ts} +51 -56
- package/dist/{sdk-CwTAxhwI.d.cts → sdk-BTciSLRQ.d.cts} +35 -5
- package/dist/{sdk-CcnQ5OUC.d.ts → sdk-qKJtMma_.d.ts} +35 -5
- package/dist/{simpleAdapter-9OE_p6QW.d.ts → simpleAdapter--wznuoOw.d.ts} +1 -1
- package/dist/{simpleAdapter-DqhvjsGr.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-7jVzOeOP.d.ts → types-BTN_ZETM.d.ts} +2 -2
- package/dist/{types-CxII3XkA.d.ts → types-BgYFd_Yw.d.cts} +5 -5
- package/dist/{types-CSHFipIc.d.cts → types-BivGO7I9.d.ts} +5 -5
- package/dist/{types-CovcHpYf.d.cts → types-D958TC71.d.cts} +2 -2
- package/package.json +25 -23
- package/dist/backends-CzDbiQar.d.ts +0 -20
- package/dist/backends-SVMT-7l4.d.cts +0 -20
- package/dist/chunk-SFVKOEQH.js +0 -103
|
@@ -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,16 +38,46 @@ 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
|
+
/**
|
|
44
|
+
* Returns the tools for a given room. In single-room mode (`multiRoom: false`),
|
|
45
|
+
* called once during init with `""` — must return the tools instance regardless of the argument.
|
|
46
|
+
*/
|
|
43
47
|
getToolsForRoom: (roomId: string) => AdapterToolsProtocol | undefined;
|
|
44
48
|
additionalTools?: McpToolRegistration[];
|
|
49
|
+
multiRoom?: boolean;
|
|
45
50
|
}
|
|
46
|
-
interface
|
|
51
|
+
interface GetSystemPromptContextResult {
|
|
52
|
+
roomId: string;
|
|
53
|
+
roomTitle: string | null;
|
|
54
|
+
agent: {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
handle: string | null;
|
|
58
|
+
description: string | null;
|
|
59
|
+
};
|
|
60
|
+
participants: Array<{
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
type: string;
|
|
64
|
+
handle: string | null;
|
|
65
|
+
isSelf: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
mentionFormat: string;
|
|
68
|
+
warnings: string[];
|
|
69
|
+
markdown: string;
|
|
70
|
+
}
|
|
71
|
+
interface GetSystemPromptContextOptions {
|
|
72
|
+
ttlMs?: number;
|
|
73
|
+
}
|
|
74
|
+
interface BandSdkMcpServer {
|
|
47
75
|
serverConfig: McpSdkServerConfigWithInstance;
|
|
48
76
|
allowedTools: string[];
|
|
49
77
|
toolDefinitions: Array<SdkMcpToolDefinition<any>>;
|
|
78
|
+
getSystemPromptContext(roomId: string, options?: GetSystemPromptContextOptions): Promise<string>;
|
|
79
|
+
getSystemPromptContextData(roomId: string, options?: GetSystemPromptContextOptions): Promise<GetSystemPromptContextResult>;
|
|
50
80
|
}
|
|
51
|
-
declare function
|
|
81
|
+
declare function createBandSdkMcpServer(options: CreateBandSdkMcpServerOptions): BandSdkMcpServer;
|
|
52
82
|
|
|
53
|
-
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,16 +38,46 @@ 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
|
+
/**
|
|
44
|
+
* Returns the tools for a given room. In single-room mode (`multiRoom: false`),
|
|
45
|
+
* called once during init with `""` — must return the tools instance regardless of the argument.
|
|
46
|
+
*/
|
|
43
47
|
getToolsForRoom: (roomId: string) => AdapterToolsProtocol | undefined;
|
|
44
48
|
additionalTools?: McpToolRegistration[];
|
|
49
|
+
multiRoom?: boolean;
|
|
45
50
|
}
|
|
46
|
-
interface
|
|
51
|
+
interface GetSystemPromptContextResult {
|
|
52
|
+
roomId: string;
|
|
53
|
+
roomTitle: string | null;
|
|
54
|
+
agent: {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
handle: string | null;
|
|
58
|
+
description: string | null;
|
|
59
|
+
};
|
|
60
|
+
participants: Array<{
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
type: string;
|
|
64
|
+
handle: string | null;
|
|
65
|
+
isSelf: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
mentionFormat: string;
|
|
68
|
+
warnings: string[];
|
|
69
|
+
markdown: string;
|
|
70
|
+
}
|
|
71
|
+
interface GetSystemPromptContextOptions {
|
|
72
|
+
ttlMs?: number;
|
|
73
|
+
}
|
|
74
|
+
interface BandSdkMcpServer {
|
|
47
75
|
serverConfig: McpSdkServerConfigWithInstance;
|
|
48
76
|
allowedTools: string[];
|
|
49
77
|
toolDefinitions: Array<SdkMcpToolDefinition<any>>;
|
|
78
|
+
getSystemPromptContext(roomId: string, options?: GetSystemPromptContextOptions): Promise<string>;
|
|
79
|
+
getSystemPromptContextData(roomId: string, options?: GetSystemPromptContextOptions): Promise<GetSystemPromptContextResult>;
|
|
50
80
|
}
|
|
51
|
-
declare function
|
|
81
|
+
declare function createBandSdkMcpServer(options: CreateBandSdkMcpServerOptions): BandSdkMcpServer;
|
|
52
82
|
|
|
53
|
-
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,11 +1,11 @@
|
|
|
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",
|
|
8
|
-
"url": "git+https://github.com/
|
|
8
|
+
"url": "git+https://github.com/band-ai/band-sdk-typescript.git",
|
|
9
9
|
"directory": "packages/sdk"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
@@ -81,13 +81,15 @@
|
|
|
81
81
|
"typecheck": "tsc --noEmit",
|
|
82
82
|
"lint": "eslint .",
|
|
83
83
|
"clean": "rm -rf dist",
|
|
84
|
-
"dev: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"
|
|
85
86
|
},
|
|
86
87
|
"engines": {
|
|
87
|
-
"node": ">=22"
|
|
88
|
+
"node": ">=22.12"
|
|
88
89
|
},
|
|
89
90
|
"dependencies": {
|
|
90
|
-
"@
|
|
91
|
+
"@band-ai/band-sdk-core": "2.0.0",
|
|
92
|
+
"@band-ai/rest-client": "0.0.118",
|
|
91
93
|
"js-yaml": "^4.1.1",
|
|
92
94
|
"phoenix": "^1.8.4",
|
|
93
95
|
"ws": "^8.19.0",
|
|
@@ -95,23 +97,23 @@
|
|
|
95
97
|
"zod-to-json-schema": "^3.25.1"
|
|
96
98
|
},
|
|
97
99
|
"peerDependencies": {
|
|
98
|
-
"@a2a-js/sdk": "
|
|
99
|
-
"@agentclientprotocol/sdk": "
|
|
100
|
-
"@anthropic-ai/claude-agent-sdk": "
|
|
101
|
-
"@anthropic-ai/sdk": "
|
|
102
|
-
"@google/adk": "
|
|
103
|
-
"@google/genai": "
|
|
104
|
-
"@langchain/core": "
|
|
105
|
-
"@langchain/langgraph": "
|
|
106
|
-
"@linear/sdk": "
|
|
107
|
-
"@letta-ai/letta-client": "
|
|
108
|
-
"@modelcontextprotocol/sdk": "
|
|
109
|
-
"@openai/codex-sdk": "
|
|
110
|
-
"@opencode-ai/sdk": "
|
|
111
|
-
"ai": "
|
|
112
|
-
"express": "
|
|
113
|
-
"openai": "
|
|
114
|
-
"parlant-client": "
|
|
100
|
+
"@a2a-js/sdk": ">=0.3.10",
|
|
101
|
+
"@agentclientprotocol/sdk": ">=0.16.1",
|
|
102
|
+
"@anthropic-ai/claude-agent-sdk": ">=0.2.63",
|
|
103
|
+
"@anthropic-ai/sdk": ">=0.78.0",
|
|
104
|
+
"@google/adk": ">=0.5.0",
|
|
105
|
+
"@google/genai": ">=1.44.0",
|
|
106
|
+
"@langchain/core": ">=1.1.31",
|
|
107
|
+
"@langchain/langgraph": ">=1.2.0",
|
|
108
|
+
"@linear/sdk": ">=76.0.0",
|
|
109
|
+
"@letta-ai/letta-client": ">=1.7.0",
|
|
110
|
+
"@modelcontextprotocol/sdk": ">=1.10.0",
|
|
111
|
+
"@openai/codex-sdk": ">=0.107.0",
|
|
112
|
+
"@opencode-ai/sdk": ">=1.3.0",
|
|
113
|
+
"ai": ">=6.0.137",
|
|
114
|
+
"express": ">=5.2.1",
|
|
115
|
+
"openai": ">=6.27.0",
|
|
116
|
+
"parlant-client": ">=3.2.0"
|
|
115
117
|
},
|
|
116
118
|
"peerDependenciesMeta": {
|
|
117
119
|
"@a2a-js/sdk": {
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { A as AdapterToolsProtocol } from './protocols-DrhzOH6K.js';
|
|
2
|
-
import { M as McpToolRegistration, T as ThenvoiSdkMcpServer } from './sdk-CcnQ5OUC.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
|
-
getToolsForRoom: (roomId: string) => AdapterToolsProtocol | undefined;
|
|
15
|
-
additionalTools?: McpToolRegistration[];
|
|
16
|
-
}
|
|
17
|
-
declare function createThenvoiMcpBackend(options: CreateThenvoiMcpBackendOptions): Promise<ThenvoiMcpBackend>;
|
|
18
|
-
declare function getThenvoiSdkMcpServerConfig(backend: ThenvoiMcpBackend): ThenvoiSdkMcpServer["serverConfig"];
|
|
19
|
-
|
|
20
|
-
export { type CreateThenvoiMcpBackendOptions as C, type ThenvoiMcpBackend as T, type ThenvoiMcpBackendKind as a, createThenvoiMcpBackend as c, getThenvoiSdkMcpServerConfig as g };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { A as AdapterToolsProtocol } from './protocols-CInhtFpA.cjs';
|
|
2
|
-
import { M as McpToolRegistration, T as ThenvoiSdkMcpServer } from './sdk-CwTAxhwI.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
|
-
getToolsForRoom: (roomId: string) => AdapterToolsProtocol | undefined;
|
|
15
|
-
additionalTools?: McpToolRegistration[];
|
|
16
|
-
}
|
|
17
|
-
declare function createThenvoiMcpBackend(options: CreateThenvoiMcpBackendOptions): Promise<ThenvoiMcpBackend>;
|
|
18
|
-
declare function getThenvoiSdkMcpServerConfig(backend: ThenvoiMcpBackend): ThenvoiSdkMcpServer["serverConfig"];
|
|
19
|
-
|
|
20
|
-
export { type CreateThenvoiMcpBackendOptions as C, type ThenvoiMcpBackend as T, type ThenvoiMcpBackendKind as a, createThenvoiMcpBackend as c, getThenvoiSdkMcpServerConfig as g };
|
package/dist/chunk-SFVKOEQH.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
// src/runtime/prompts.ts
|
|
2
|
-
var BASE_INSTRUCTIONS = `
|
|
3
|
-
## Environment
|
|
4
|
-
|
|
5
|
-
Multi-participant chat. Messages show sender: [Name]: content.
|
|
6
|
-
Messages prefixed with [System]: are platform updates (participant changes, contact updates, etc.) \u2014 not messages from users.
|
|
7
|
-
Use \`thenvoi_send_message(content, mentions)\` to respond. Plain text output is not delivered.
|
|
8
|
-
Mentions use handles: @<username> for users, @<username>/<agent-name> for agents.
|
|
9
|
-
|
|
10
|
-
## CRITICAL: Delegate When You Cannot Help Directly
|
|
11
|
-
|
|
12
|
-
You have NO internet access and NO real-time data. When asked about weather, news, stock prices,
|
|
13
|
-
or any current information you cannot answer directly:
|
|
14
|
-
|
|
15
|
-
1. Call \`thenvoi_lookup_peers()\` to find available specialized agents
|
|
16
|
-
2. If a relevant agent exists, call \`thenvoi_add_participant(name)\` to add them
|
|
17
|
-
3. Ask that agent using \`thenvoi_send_message(question, mentions=[agent_handle])\`
|
|
18
|
-
4. Wait for their response and relay it back to the user
|
|
19
|
-
|
|
20
|
-
NEVER say "I can't do that" without first checking if another agent can help via \`thenvoi_lookup_peers()\`.
|
|
21
|
-
|
|
22
|
-
## CRITICAL: Do NOT Remove Agents Automatically
|
|
23
|
-
|
|
24
|
-
After adding an agent to help with a task:
|
|
25
|
-
1. Ask your question and wait for their response
|
|
26
|
-
2. Relay their response back to the original requester
|
|
27
|
-
3. **Do NOT remove the agent** - they stay silent unless mentioned and may be useful for follow-ups
|
|
28
|
-
|
|
29
|
-
Only remove agents if the user explicitly requests it.
|
|
30
|
-
|
|
31
|
-
## CRITICAL: Always Relay Information Back to the Requester
|
|
32
|
-
|
|
33
|
-
When someone asks you to get information from another agent:
|
|
34
|
-
1. Ask the other agent for the information
|
|
35
|
-
2. When you receive the response, IMMEDIATELY relay it back to the ORIGINAL REQUESTER
|
|
36
|
-
3. Do NOT just thank the helper agent - the requester is waiting for their answer!
|
|
37
|
-
|
|
38
|
-
## IMPORTANT: Always Share Your Thinking
|
|
39
|
-
|
|
40
|
-
You MUST call \`thenvoi_send_event(content, message_type="thought")\` BEFORE every action.
|
|
41
|
-
This is required so users can see your reasoning process.
|
|
42
|
-
|
|
43
|
-
## Examples
|
|
44
|
-
|
|
45
|
-
### Simple question - answer directly
|
|
46
|
-
[John Doe]: What's 2+2?
|
|
47
|
-
-> thenvoi_send_event("Simple arithmetic, answering directly.", message_type="thought")
|
|
48
|
-
-> thenvoi_send_message("4", mentions=["@john"])
|
|
49
|
-
|
|
50
|
-
### User asks about weather (you cannot answer directly)
|
|
51
|
-
[John Doe]: What's the weather in Tokyo?
|
|
52
|
-
-> thenvoi_send_event("I can't check weather directly. Looking for a Weather Agent.", message_type="thought")
|
|
53
|
-
-> thenvoi_lookup_peers()
|
|
54
|
-
-> thenvoi_send_event("Found Weather Agent. Adding to room.", message_type="thought")
|
|
55
|
-
-> thenvoi_add_participant("Weather Agent")
|
|
56
|
-
-> thenvoi_send_message("What's the weather in Tokyo?", mentions=["@john/weather-agent"])
|
|
57
|
-
|
|
58
|
-
[Weather Agent]: Tokyo is 15\xB0C and cloudy.
|
|
59
|
-
-> thenvoi_send_event("Got weather response. Relaying back to John Doe.", message_type="thought")
|
|
60
|
-
-> thenvoi_send_message("The weather in Tokyo is 15\xB0C and cloudy.", mentions=["@john"])
|
|
61
|
-
|
|
62
|
-
### No suitable agent available
|
|
63
|
-
[John Doe]: What's the stock price of AAPL?
|
|
64
|
-
-> thenvoi_send_event("I can't check stock prices. Looking for a Stock Agent.", message_type="thought")
|
|
65
|
-
-> thenvoi_lookup_peers()
|
|
66
|
-
-> thenvoi_send_event("No stock agent available. Must inform user.", message_type="thought")
|
|
67
|
-
-> thenvoi_send_message("I don't have access to stock prices, and there's no specialized agent available to help with that.", mentions=["@john"])
|
|
68
|
-
|
|
69
|
-
### Follow-up question in same conversation
|
|
70
|
-
[John Doe]: What about London?
|
|
71
|
-
-> thenvoi_send_event("Follow-up weather question. Asking Weather Agent.", message_type="thought")
|
|
72
|
-
-> thenvoi_send_message("What's the weather in London?", mentions=["@john/weather-agent"])
|
|
73
|
-
|
|
74
|
-
[Weather Agent]: London is 8\xB0C and rainy.
|
|
75
|
-
-> thenvoi_send_event("Got London weather. Relaying to John Doe.", message_type="thought")
|
|
76
|
-
-> thenvoi_send_message("London is 8\xB0C and rainy.", mentions=["@john"])
|
|
77
|
-
`;
|
|
78
|
-
var TEMPLATES = {
|
|
79
|
-
default: `You are {agent_name}, {agent_description}.
|
|
80
|
-
|
|
81
|
-
{custom_section}
|
|
82
|
-
` + BASE_INSTRUCTIONS
|
|
83
|
-
};
|
|
84
|
-
function renderSystemPrompt(options) {
|
|
85
|
-
const agentName = options?.agentName ?? "Agent";
|
|
86
|
-
const agentDescription = options?.agentDescription ?? "An AI assistant";
|
|
87
|
-
const customSection = options?.customSection ?? "";
|
|
88
|
-
const includeBaseInstructions = options?.includeBaseInstructions ?? true;
|
|
89
|
-
if (!includeBaseInstructions) {
|
|
90
|
-
return `You are ${agentName}, ${agentDescription}.
|
|
91
|
-
|
|
92
|
-
${customSection}`.trim();
|
|
93
|
-
}
|
|
94
|
-
const template = options?.template ?? "default";
|
|
95
|
-
const templateString = TEMPLATES[template] ?? TEMPLATES.default;
|
|
96
|
-
return templateString.replaceAll("{agent_name}", agentName).replaceAll("{agent_description}", agentDescription).replaceAll("{custom_section}", customSection);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export {
|
|
100
|
-
BASE_INSTRUCTIONS,
|
|
101
|
-
TEMPLATES,
|
|
102
|
-
renderSystemPrompt
|
|
103
|
-
};
|