@band-ai/sdk 0.3.4 → 0.4.1
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 -1
- package/dist/{ClaudeSDKAdapter-CXud2DBE.d.ts → CopilotACPAdapter-B_AVyAl6.d.ts} +249 -19
- package/dist/{ClaudeSDKAdapter-Cx6zhSaG.d.cts → CopilotACPAdapter-Clid9xGR.d.cts} +249 -19
- package/dist/{opencode-2YdscIc1.d.cts → acp-client-D-I_5lK-.d.cts} +23 -4
- package/dist/{opencode-Bld62x5t.d.ts → acp-client-DUXyczlF.d.ts} +23 -4
- package/dist/acp-server-BlcYMxKt.d.ts +17 -0
- package/dist/acp-server-CJhclo6P.d.cts +17 -0
- package/dist/adapters.cjs +2257 -969
- package/dist/adapters.d.cts +21 -132
- package/dist/adapters.d.ts +21 -132
- package/dist/adapters.js +26 -1922
- package/dist/{backends-D-dBdDm-.d.ts → backends-CgsPQa9B.d.ts} +2 -2
- package/dist/{backends-ZLxmQrTZ.d.cts → backends-Dh2WXcHQ.d.cts} +2 -2
- package/dist/{chunk-JY75VSQK.js → chunk-4OVNFDD7.js} +14 -1
- package/dist/chunk-6BE2EG5P.js +128 -0
- package/dist/{chunk-U6AFCLYZ.js → chunk-6TGXV5TE.js} +1824 -514
- package/dist/{chunk-OH6VVVKT.js → chunk-CBCHTTUY.js} +10 -0
- package/dist/{chunk-K5KAEYPF.js → chunk-HNWZZXAE.js} +288 -120
- package/dist/chunk-I34SXMTJ.js +6 -0
- package/dist/{chunk-XWHWJP4I.js → chunk-JDW5WSGF.js} +2 -2
- package/dist/{chunk-KXJ74J73.js → chunk-JIZE4EC6.js} +4 -10
- package/dist/chunk-OGOXY43L.js +119 -0
- package/dist/{chunk-W5IAI6Z4.js → chunk-OVXVZUPO.js} +5 -5
- package/dist/{chunk-YJ42AZO4.js → chunk-RJNJUISR.js} +5 -2
- package/dist/{chunk-MQY74R7D.js → chunk-SHZBLLDQ.js} +21 -9
- package/dist/{chunk-JADCAMZY.js → chunk-TGDDFBYS.js} +45 -0
- package/dist/{chunk-US226AS4.js → chunk-UENIC5FJ.js} +14 -11
- package/dist/{chunk-MQBBWYRP.js → chunk-UFO6XMCV.js} +3404 -572
- package/dist/{chunk-WA7CHXUS.js → chunk-UL3Y5C4J.js} +2 -2
- package/dist/{chunk-WL2HNJZ6.js → chunk-VOMJRQOM.js} +3 -3
- package/dist/{chunk-OD2G5LFQ.js → chunk-ZYOXI4JL.js} +41 -2
- package/dist/config.cjs +2 -12
- package/dist/config.js +2 -2
- package/dist/converters.cjs +36 -11
- package/dist/converters.d.cts +7 -5
- package/dist/converters.d.ts +7 -5
- package/dist/converters.js +11 -13
- package/dist/core.cjs +239 -5
- package/dist/core.d.cts +71 -6
- package/dist/core.d.ts +71 -6
- package/dist/core.js +31 -6
- package/dist/{customTools-BzF0IISO.d.cts → customTools-Bfecd0mJ.d.cts} +1 -1
- package/dist/{customTools-BzF0IISO.d.ts → customTools-Bfecd0mJ.d.ts} +1 -1
- package/dist/{disconnectReason-IuADl6TH.d.ts → disconnectReason-Cctmg1SN.d.cts} +1 -1
- package/dist/{disconnectReason-IuADl6TH.d.cts → disconnectReason-Cctmg1SN.d.ts} +1 -1
- package/dist/{dtos-B8KU_q4d.d.ts → dtos-CjQsN1_h.d.cts} +5 -12
- package/dist/{dtos-B8KU_q4d.d.cts → dtos-CjQsN1_h.d.ts} +5 -12
- package/dist/index.cjs +5289 -1474
- package/dist/index.d.cts +61 -22
- package/dist/index.d.ts +61 -22
- package/dist/index.js +151 -43
- package/dist/linear.cjs +45 -7
- package/dist/linear.d.cts +4 -3
- package/dist/linear.d.ts +4 -3
- package/dist/linear.js +10 -10
- package/dist/mcp-claude.cjs +11 -6
- package/dist/mcp-claude.d.cts +4 -3
- package/dist/mcp-claude.d.ts +4 -3
- package/dist/mcp-claude.js +4 -5
- package/dist/mcp.cjs +13 -7
- package/dist/mcp.d.cts +6 -5
- package/dist/mcp.d.ts +6 -5
- package/dist/mcp.js +5 -6
- package/dist/{pagination-DqdkQArT.d.cts → pagination-BZDhB_nO.d.cts} +2 -2
- package/dist/{pagination-BgEx-HeL.d.ts → pagination-CPz0J_vQ.d.ts} +2 -2
- package/dist/{protocols-Bz1rxcUg.d.cts → protocols-CabgO52c.d.cts} +38 -3
- package/dist/{protocols-Bwwcql0h.d.ts → protocols-Dpci6uae.d.ts} +38 -3
- package/dist/rest.cjs +43 -1
- package/dist/rest.d.cts +6 -5
- package/dist/rest.d.ts +6 -5
- package/dist/rest.js +6 -5
- package/dist/runtime.cjs +2113 -597
- package/dist/runtime.d.cts +44 -25
- package/dist/runtime.d.ts +44 -25
- package/dist/runtime.js +11 -11
- package/dist/{schemas-BgJhlqqO.d.cts → schemas-BKnh4fKR.d.cts} +209 -24
- package/dist/{schemas-C4mK1WSs.d.ts → schemas-CDa3V_I5.d.ts} +209 -24
- package/dist/{sdk-BTciSLRQ.d.cts → sdk-CXNqzoY1.d.cts} +1 -1
- package/dist/{sdk-qKJtMma_.d.ts → sdk-Cin80BTC.d.ts} +1 -1
- package/dist/{simpleAdapter-BpT4XbZC.d.cts → simpleAdapter-D75rcz9n.d.cts} +3 -1
- package/dist/{simpleAdapter--wznuoOw.d.ts → simpleAdapter-eLvsAQNo.d.ts} +3 -1
- package/dist/testing.cjs +25 -7
- package/dist/testing.d.cts +5 -3
- package/dist/testing.d.ts +5 -3
- package/dist/testing.js +9 -6
- package/dist/{types-BivGO7I9.d.ts → types-42-HWeX8.d.cts} +10 -4
- package/dist/types-CKU1N0SK.d.ts +137 -0
- package/dist/{types-BgYFd_Yw.d.cts → types-CjxZekMH.d.ts} +10 -4
- package/dist/types-DtcOLALn.d.cts +137 -0
- package/package.json +25 -26
- package/dist/acp-server-CiUqN3G3.d.ts +0 -24
- package/dist/acp-server-Dlj7D563.d.cts +0 -24
- package/dist/chunk-AVVDPXP4.js +0 -39
- package/dist/chunk-F63TPOI3.js +0 -29
- package/dist/chunk-V5TSWS7P.js +0 -62
- package/dist/types-BNNtOXu3.d.cts +0 -446
- package/dist/types-DFUtpxah.d.ts +0 -446
package/dist/adapters.d.cts
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
export { A as A2AAdapter, a as A2AAdapterOptions,
|
|
1
|
+
export { A as A2AAdapter, a as A2AAdapterOptions, a2 as A2AClientFactory, a3 as A2AClientLike, b as A2AGatewayAdapter, c as ACPClientAdapter, d as ACPClientAdapterBaseOptions, e as ACPClientAdapterOptions, f as ACPClientStdioOptions, g as ACPClientTcpOptions, h as ACPConfigRequest, i as ACPConfigSelections, a4 as ACPPermissionAbandonReason, a5 as ACPPermissionEndReason, a6 as ACPPermissionRequest, j as AnthropicAdapter, k as AnthropicAdapterOptions, a7 as AnthropicClientFactory, a8 as AnthropicToolCallingModel, a9 as AnthropicToolCallingModelOptions, C as CODEX_REASONING_EFFORTS, l as CODEX_REASONING_SUMMARIES, m as CODEX_WEB_SEARCH_MODES, n as ClaudePermissionMode, o as ClaudeSDKAdapter, p as ClaudeSDKAdapterOptions, aa as ClaudeSDKQuery, ab as ClaudeSDKQueryParams, q as CodexAdapter, r as CodexAdapterConfig, ac as CodexAppServerStdioClient, s as CodexApprovalPolicy, ad as CodexClientLike, ae as CodexJsonRpcError, t as CodexReasoningEffort, u as CodexReasoningSummary, v as CodexSandboxMode, w as CodexWebSearchMode, x as CopilotACPAdapter, y as CopilotACPAdapterOptions, z as CopilotACPStdioOptions, B as CopilotACPTcpOptions, D as DEFAULT_COPILOT_ACP_COMMAND, E as DEFAULT_OMP_ACP_COMMAND, af as DynamicToolCallParams, ag as DynamicToolCallResponse, ah as DynamicToolSpec, G as GeminiAdapter, F as GeminiAdapterOptions, ai as GeminiClientFactory, aj as GeminiToolCallingModel, ak as GeminiToolCallingModelOptions, H as GenericAdapter, I as GenericAdapterHandler, J as GoogleADKAdapter, K as GoogleADKAdapterOptions, al as HttpOpencodeClient, am as HttpOpencodeClientOptions, an as HttpStatusError, L as LangGraphAdapter, M as LangGraphAdapterOptions, N as LangGraphGraph, O as LettaAdapter, P as LettaAdapterOptions, ao as LettaAgentCreateParams, ap as LettaClientFactory, aq as LettaClientLike, ar as LettaHistoryConverter, as as LettaMessage, at as LettaMessageCreateParams, au as LettaMessages, av as LettaRequestOptions, aw as LettaResponse, ax as LettaResponseMessage, Q as OmpACPAdapter, R as OmpACPAdapterOptions, S as OpenAIAdapter, T as OpenAIAdapterOptions, ay as OpenAIClientFactory, az as OpenAIToolCallingModel, aA as OpenAIToolCallingModelOptions, U as OpencodeAdapter, V as OpencodeAdapterConfig, W as OpencodeApprovalMode, X as OpencodeApprovalReply, aB as OpencodeClientLike, Y as OpencodeQuestionMode, Z as ParlantAdapter, _ as ParlantAdapterOptions, aC as ParlantClientFactory, aD as ParlantClientLike, aE as ToolCall, aF as ToolCallingAdapter, aG as ToolCallingAdapterOptions, $ as ToolCallingModel, aH as ToolCallingModelRequest, aI as ToolCallingResponse, aJ as ToolResult, aK as TurnStartParams, a0 as VercelAISDKAdapter, a1 as VercelAISDKAdapterOptions, aL as VercelAISDKToolCallingModel, aM as VercelAISDKToolCallingModelOptions, aN as runSingleToolRound } from './CopilotACPAdapter-Clid9xGR.cjs';
|
|
2
2
|
import * as _agentclientprotocol_sdk from '@agentclientprotocol/sdk';
|
|
3
|
-
import {
|
|
4
|
-
import { A as
|
|
5
|
-
export { G as GatewayHistoryConverter } from './acp-server-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { P as PlatformMessage } from './types-
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
import './customTools-BzF0IISO.cjs';
|
|
3
|
+
import { SessionMode, AgentSideConnection, SessionModeState, McpServer, Agent, InitializeResponse, Implementation, Stream, InitializeRequest, LoadSessionRequest, LoadSessionResponse, ListSessionsRequest, ListSessionsResponse, ForkSessionRequest, ForkSessionResponse, ResumeSessionRequest, ResumeSessionResponse, SetSessionModeRequest, SetSessionModeResponse, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, AuthenticateRequest, AuthenticateResponse, PromptRequest, PromptResponse } from '@agentclientprotocol/sdk';
|
|
4
|
+
import { A as ACPServerSessionState } from './acp-server-CJhclo6P.cjs';
|
|
5
|
+
export { G as GatewayHistoryConverter } from './acp-server-CJhclo6P.cjs';
|
|
6
|
+
import { R as RestApi } from './types-42-HWeX8.cjs';
|
|
7
|
+
import { S as SimpleAdapter } from './simpleAdapter-D75rcz9n.cjs';
|
|
8
|
+
import { e as MessagingTools } from './protocols-CabgO52c.cjs';
|
|
9
|
+
import { P as PlatformMessage } from './types-DtcOLALn.cjs';
|
|
10
|
+
import { b as GatewayServerLike, c as GatewayServerOptions } from './acp-client-D-I_5lK-.cjs';
|
|
11
|
+
export { A as A2AAuth, a as A2AGatewayAdapterOptions, d as A2AHistoryConverter, e as A2ASessionState, f as GatewayA2AMessage, g as GatewayA2AStatusUpdateEvent, h as GatewayCancelRequest, i as GatewayPeer, j as GatewayRequest, k as GatewayServerFactory, G as GatewaySessionState, l as GatewayTaskState, P as ParlantHistoryConverter, m as ParlantMessage, n as ParlantMessages, o as PendingA2ATask, p as buildA2AAuthHeaders } from './acp-client-D-I_5lK-.cjs';
|
|
12
|
+
import './logger-CABQOnlR.cjs';
|
|
13
|
+
import './customTools-Bfecd0mJ.cjs';
|
|
15
14
|
import 'zod';
|
|
16
|
-
import './dtos-
|
|
17
|
-
import '
|
|
15
|
+
import './dtos-CjQsN1_h.cjs';
|
|
16
|
+
import '@band-ai/band-sdk-core';
|
|
17
|
+
import './backends-Dh2WXcHQ.cjs';
|
|
18
|
+
import './sdk-CXNqzoY1.cjs';
|
|
18
19
|
import '@anthropic-ai/claude-agent-sdk';
|
|
19
20
|
|
|
20
21
|
declare class GatewayServer implements GatewayServerLike {
|
|
21
22
|
private readonly options;
|
|
23
|
+
private readonly logger;
|
|
22
24
|
private server;
|
|
23
25
|
private started;
|
|
24
26
|
constructor(options: GatewayServerOptions);
|
|
@@ -31,119 +33,6 @@ declare class GatewayServer implements GatewayServerLike {
|
|
|
31
33
|
}
|
|
32
34
|
declare function createGatewayServer(options: GatewayServerOptions): GatewayServer;
|
|
33
35
|
|
|
34
|
-
interface ACPClientConnectionHandle {
|
|
35
|
-
connection: ClientSideConnection;
|
|
36
|
-
stop(): Promise<void>;
|
|
37
|
-
}
|
|
38
|
-
type ACPClientConnectionFactory = (client: Client, options: {
|
|
39
|
-
command: string[];
|
|
40
|
-
cwd?: string;
|
|
41
|
-
env?: Record<string, string>;
|
|
42
|
-
}) => Promise<ACPClientConnectionHandle>;
|
|
43
|
-
type ACPPermissionRequest = RequestPermissionRequest & {
|
|
44
|
-
roomId: string;
|
|
45
|
-
};
|
|
46
|
-
type ACPPermissionAbandonReason = "timeout" | "room-closed" | "adapter-stopped" | "connection-lost";
|
|
47
|
-
type ACPPermissionEndReason = ACPPermissionAbandonReason | "settled" | "no-answer";
|
|
48
|
-
|
|
49
|
-
interface ACPModeRequest {
|
|
50
|
-
roomId: string;
|
|
51
|
-
sessionId: string;
|
|
52
|
-
currentModeId: string;
|
|
53
|
-
modes: readonly SessionMode[];
|
|
54
|
-
}
|
|
55
|
-
interface ACPClientAdapterOptions {
|
|
56
|
-
command: string | string[];
|
|
57
|
-
cwd?: string;
|
|
58
|
-
env?: Record<string, string>;
|
|
59
|
-
mcpServers?: McpServer[];
|
|
60
|
-
authMethod?: string | null;
|
|
61
|
-
enableMemoryTools?: boolean;
|
|
62
|
-
enableMcpTools?: boolean;
|
|
63
|
-
additionalMcpTools?: McpToolRegistration[];
|
|
64
|
-
clientCapabilities?: ClientCapabilities;
|
|
65
|
-
connectionFactory?: ACPClientConnectionFactory;
|
|
66
|
-
resolvePermission?: (request: ACPPermissionRequest, signal: AbortSignal) => Promise<string | undefined>;
|
|
67
|
-
permissionTimeoutMs?: number;
|
|
68
|
-
resolveSessionMode?: (request: ACPModeRequest, signal: AbortSignal) => Promise<string | undefined>;
|
|
69
|
-
logger?: Logger;
|
|
70
|
-
}
|
|
71
|
-
declare class ACPClientAdapter extends SimpleAdapter<ACPClientSessionState, AdapterToolsProtocol> {
|
|
72
|
-
private readonly command;
|
|
73
|
-
private readonly cwd;
|
|
74
|
-
private readonly env?;
|
|
75
|
-
private readonly mcpServers;
|
|
76
|
-
private readonly authMethod?;
|
|
77
|
-
private readonly enableMemoryTools;
|
|
78
|
-
private readonly enableMcpTools;
|
|
79
|
-
private readonly additionalMcpTools;
|
|
80
|
-
private readonly clientCapabilities?;
|
|
81
|
-
private readonly connectionFactory;
|
|
82
|
-
private readonly roomToSession;
|
|
83
|
-
private readonly sessionToRoom;
|
|
84
|
-
private readonly roomTools;
|
|
85
|
-
private readonly activeSessions;
|
|
86
|
-
private readonly bootstrappedSessions;
|
|
87
|
-
private readonly pendingPermissions;
|
|
88
|
-
private readonly sessionsInFlight;
|
|
89
|
-
private readonly roomTurnLocks;
|
|
90
|
-
private readonly roomGeneration;
|
|
91
|
-
private readonly resolvePermission?;
|
|
92
|
-
private readonly resolveSessionMode?;
|
|
93
|
-
private readonly permissionTimeoutMs;
|
|
94
|
-
private readonly logger;
|
|
95
|
-
private backend;
|
|
96
|
-
private backendPromise;
|
|
97
|
-
private client;
|
|
98
|
-
private connectionHandle;
|
|
99
|
-
private connection;
|
|
100
|
-
private connectionState;
|
|
101
|
-
private started;
|
|
102
|
-
private systemPrompt;
|
|
103
|
-
private spawnPromise;
|
|
104
|
-
constructor(options: ACPClientAdapterOptions);
|
|
105
|
-
onStarted(agentName: string, agentDescription: string): Promise<void>;
|
|
106
|
-
onMessage(message: PlatformMessage, tools: AdapterToolsProtocol, history: ACPClientSessionState, participantsMessage: string | null, contactsMessage: string | null, context: {
|
|
107
|
-
isSessionBootstrap: boolean;
|
|
108
|
-
roomId: string;
|
|
109
|
-
}): Promise<void>;
|
|
110
|
-
private runTurn;
|
|
111
|
-
private withRoomTurnLock;
|
|
112
|
-
onCleanup(roomId: string): Promise<void>;
|
|
113
|
-
onRuntimeStop(): Promise<void>;
|
|
114
|
-
stop(): Promise<void>;
|
|
115
|
-
private rehydrate;
|
|
116
|
-
private linkSession;
|
|
117
|
-
private nextRoomGeneration;
|
|
118
|
-
private isCurrentGeneration;
|
|
119
|
-
private raceAgainstConnectionClose;
|
|
120
|
-
private unlinkRoom;
|
|
121
|
-
private ensureConnection;
|
|
122
|
-
private spawnConnection;
|
|
123
|
-
private getOrCreateSession;
|
|
124
|
-
private establishSession;
|
|
125
|
-
private linkOrAbandon;
|
|
126
|
-
private configureSessionMode;
|
|
127
|
-
private resolveSessionModeManually;
|
|
128
|
-
private tryRestoreSession;
|
|
129
|
-
private buildSessionMcpServers;
|
|
130
|
-
private getOrCreateBackend;
|
|
131
|
-
private createBackend;
|
|
132
|
-
private buildSystemContext;
|
|
133
|
-
private routePermissionRequest;
|
|
134
|
-
private handlePermissionRequest;
|
|
135
|
-
private toResponse;
|
|
136
|
-
private safeWarn;
|
|
137
|
-
private resolveManually;
|
|
138
|
-
private discardLateAnswer;
|
|
139
|
-
private abandon;
|
|
140
|
-
private trackPending;
|
|
141
|
-
private untrackPending;
|
|
142
|
-
private cancelPendingPermissions;
|
|
143
|
-
private cancelAllPendingPermissions;
|
|
144
|
-
private flushChunks;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
36
|
interface BandACPServerAdapterOptions {
|
|
148
37
|
bandRest: RestApi;
|
|
149
38
|
maxSessions?: number;
|
|
@@ -154,6 +43,7 @@ interface BandACPServerAdapterOptions {
|
|
|
154
43
|
slashCommands?: Record<string, string>;
|
|
155
44
|
}
|
|
156
45
|
declare class BandACPServerAdapter extends SimpleAdapter<ACPServerSessionState, MessagingTools> {
|
|
46
|
+
protected readonly provider = "acp-server";
|
|
157
47
|
private readonly bandRest;
|
|
158
48
|
private readonly maxSessions;
|
|
159
49
|
private readonly responseTimeoutMs;
|
|
@@ -249,10 +139,9 @@ declare class ACPServer implements Agent {
|
|
|
249
139
|
loadSession(params: LoadSessionRequest): Promise<LoadSessionResponse>;
|
|
250
140
|
listSessions(params: ListSessionsRequest): Promise<ListSessionsResponse>;
|
|
251
141
|
unstable_forkSession(params: ForkSessionRequest): Promise<ForkSessionResponse>;
|
|
252
|
-
|
|
253
|
-
|
|
142
|
+
resumeSession(params: ResumeSessionRequest): Promise<ResumeSessionResponse>;
|
|
143
|
+
closeSession(params: _agentclientprotocol_sdk.CloseSessionRequest): Promise<_agentclientprotocol_sdk.CloseSessionResponse>;
|
|
254
144
|
setSessionMode(params: SetSessionModeRequest): Promise<SetSessionModeResponse>;
|
|
255
|
-
unstable_setSessionModel(params: SetSessionModelRequest): Promise<SetSessionModelResponse>;
|
|
256
145
|
setSessionConfigOption(_params: SetSessionConfigOptionRequest): Promise<SetSessionConfigOptionResponse>;
|
|
257
146
|
authenticate(params: AuthenticateRequest): Promise<AuthenticateResponse>;
|
|
258
147
|
prompt(params: PromptRequest): Promise<PromptResponse>;
|
|
@@ -261,4 +150,4 @@ declare class ACPServer implements Agent {
|
|
|
261
150
|
extNotification(method: string, params: Record<string, unknown>): Promise<void>;
|
|
262
151
|
}
|
|
263
152
|
|
|
264
|
-
export {
|
|
153
|
+
export { ACPServer, type ACPServerOptions, BandACPServerAdapter, type BandACPServerAdapterOptions, GatewayServer, GatewayServerLike, GatewayServerOptions, createGatewayServer };
|
package/dist/adapters.d.ts
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
export { A as A2AAdapter, a as A2AAdapterOptions,
|
|
1
|
+
export { A as A2AAdapter, a as A2AAdapterOptions, a2 as A2AClientFactory, a3 as A2AClientLike, b as A2AGatewayAdapter, c as ACPClientAdapter, d as ACPClientAdapterBaseOptions, e as ACPClientAdapterOptions, f as ACPClientStdioOptions, g as ACPClientTcpOptions, h as ACPConfigRequest, i as ACPConfigSelections, a4 as ACPPermissionAbandonReason, a5 as ACPPermissionEndReason, a6 as ACPPermissionRequest, j as AnthropicAdapter, k as AnthropicAdapterOptions, a7 as AnthropicClientFactory, a8 as AnthropicToolCallingModel, a9 as AnthropicToolCallingModelOptions, C as CODEX_REASONING_EFFORTS, l as CODEX_REASONING_SUMMARIES, m as CODEX_WEB_SEARCH_MODES, n as ClaudePermissionMode, o as ClaudeSDKAdapter, p as ClaudeSDKAdapterOptions, aa as ClaudeSDKQuery, ab as ClaudeSDKQueryParams, q as CodexAdapter, r as CodexAdapterConfig, ac as CodexAppServerStdioClient, s as CodexApprovalPolicy, ad as CodexClientLike, ae as CodexJsonRpcError, t as CodexReasoningEffort, u as CodexReasoningSummary, v as CodexSandboxMode, w as CodexWebSearchMode, x as CopilotACPAdapter, y as CopilotACPAdapterOptions, z as CopilotACPStdioOptions, B as CopilotACPTcpOptions, D as DEFAULT_COPILOT_ACP_COMMAND, E as DEFAULT_OMP_ACP_COMMAND, af as DynamicToolCallParams, ag as DynamicToolCallResponse, ah as DynamicToolSpec, G as GeminiAdapter, F as GeminiAdapterOptions, ai as GeminiClientFactory, aj as GeminiToolCallingModel, ak as GeminiToolCallingModelOptions, H as GenericAdapter, I as GenericAdapterHandler, J as GoogleADKAdapter, K as GoogleADKAdapterOptions, al as HttpOpencodeClient, am as HttpOpencodeClientOptions, an as HttpStatusError, L as LangGraphAdapter, M as LangGraphAdapterOptions, N as LangGraphGraph, O as LettaAdapter, P as LettaAdapterOptions, ao as LettaAgentCreateParams, ap as LettaClientFactory, aq as LettaClientLike, ar as LettaHistoryConverter, as as LettaMessage, at as LettaMessageCreateParams, au as LettaMessages, av as LettaRequestOptions, aw as LettaResponse, ax as LettaResponseMessage, Q as OmpACPAdapter, R as OmpACPAdapterOptions, S as OpenAIAdapter, T as OpenAIAdapterOptions, ay as OpenAIClientFactory, az as OpenAIToolCallingModel, aA as OpenAIToolCallingModelOptions, U as OpencodeAdapter, V as OpencodeAdapterConfig, W as OpencodeApprovalMode, X as OpencodeApprovalReply, aB as OpencodeClientLike, Y as OpencodeQuestionMode, Z as ParlantAdapter, _ as ParlantAdapterOptions, aC as ParlantClientFactory, aD as ParlantClientLike, aE as ToolCall, aF as ToolCallingAdapter, aG as ToolCallingAdapterOptions, $ as ToolCallingModel, aH as ToolCallingModelRequest, aI as ToolCallingResponse, aJ as ToolResult, aK as TurnStartParams, a0 as VercelAISDKAdapter, a1 as VercelAISDKAdapterOptions, aL as VercelAISDKToolCallingModel, aM as VercelAISDKToolCallingModelOptions, aN as runSingleToolRound } from './CopilotACPAdapter-B_AVyAl6.js';
|
|
2
2
|
import * as _agentclientprotocol_sdk from '@agentclientprotocol/sdk';
|
|
3
|
-
import {
|
|
4
|
-
import { A as
|
|
5
|
-
export { G as GatewayHistoryConverter } from './acp-server-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { P as PlatformMessage } from './types-
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
import './customTools-BzF0IISO.js';
|
|
3
|
+
import { SessionMode, AgentSideConnection, SessionModeState, McpServer, Agent, InitializeResponse, Implementation, Stream, InitializeRequest, LoadSessionRequest, LoadSessionResponse, ListSessionsRequest, ListSessionsResponse, ForkSessionRequest, ForkSessionResponse, ResumeSessionRequest, ResumeSessionResponse, SetSessionModeRequest, SetSessionModeResponse, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, AuthenticateRequest, AuthenticateResponse, PromptRequest, PromptResponse } from '@agentclientprotocol/sdk';
|
|
4
|
+
import { A as ACPServerSessionState } from './acp-server-BlcYMxKt.js';
|
|
5
|
+
export { G as GatewayHistoryConverter } from './acp-server-BlcYMxKt.js';
|
|
6
|
+
import { R as RestApi } from './types-CjxZekMH.js';
|
|
7
|
+
import { S as SimpleAdapter } from './simpleAdapter-eLvsAQNo.js';
|
|
8
|
+
import { e as MessagingTools } from './protocols-Dpci6uae.js';
|
|
9
|
+
import { P as PlatformMessage } from './types-CKU1N0SK.js';
|
|
10
|
+
import { b as GatewayServerLike, c as GatewayServerOptions } from './acp-client-DUXyczlF.js';
|
|
11
|
+
export { A as A2AAuth, a as A2AGatewayAdapterOptions, d as A2AHistoryConverter, e as A2ASessionState, f as GatewayA2AMessage, g as GatewayA2AStatusUpdateEvent, h as GatewayCancelRequest, i as GatewayPeer, j as GatewayRequest, k as GatewayServerFactory, G as GatewaySessionState, l as GatewayTaskState, P as ParlantHistoryConverter, m as ParlantMessage, n as ParlantMessages, o as PendingA2ATask, p as buildA2AAuthHeaders } from './acp-client-DUXyczlF.js';
|
|
12
|
+
import './logger-CABQOnlR.js';
|
|
13
|
+
import './customTools-Bfecd0mJ.js';
|
|
15
14
|
import 'zod';
|
|
16
|
-
import './dtos-
|
|
17
|
-
import '
|
|
15
|
+
import './dtos-CjQsN1_h.js';
|
|
16
|
+
import '@band-ai/band-sdk-core';
|
|
17
|
+
import './backends-CgsPQa9B.js';
|
|
18
|
+
import './sdk-Cin80BTC.js';
|
|
18
19
|
import '@anthropic-ai/claude-agent-sdk';
|
|
19
20
|
|
|
20
21
|
declare class GatewayServer implements GatewayServerLike {
|
|
21
22
|
private readonly options;
|
|
23
|
+
private readonly logger;
|
|
22
24
|
private server;
|
|
23
25
|
private started;
|
|
24
26
|
constructor(options: GatewayServerOptions);
|
|
@@ -31,119 +33,6 @@ declare class GatewayServer implements GatewayServerLike {
|
|
|
31
33
|
}
|
|
32
34
|
declare function createGatewayServer(options: GatewayServerOptions): GatewayServer;
|
|
33
35
|
|
|
34
|
-
interface ACPClientConnectionHandle {
|
|
35
|
-
connection: ClientSideConnection;
|
|
36
|
-
stop(): Promise<void>;
|
|
37
|
-
}
|
|
38
|
-
type ACPClientConnectionFactory = (client: Client, options: {
|
|
39
|
-
command: string[];
|
|
40
|
-
cwd?: string;
|
|
41
|
-
env?: Record<string, string>;
|
|
42
|
-
}) => Promise<ACPClientConnectionHandle>;
|
|
43
|
-
type ACPPermissionRequest = RequestPermissionRequest & {
|
|
44
|
-
roomId: string;
|
|
45
|
-
};
|
|
46
|
-
type ACPPermissionAbandonReason = "timeout" | "room-closed" | "adapter-stopped" | "connection-lost";
|
|
47
|
-
type ACPPermissionEndReason = ACPPermissionAbandonReason | "settled" | "no-answer";
|
|
48
|
-
|
|
49
|
-
interface ACPModeRequest {
|
|
50
|
-
roomId: string;
|
|
51
|
-
sessionId: string;
|
|
52
|
-
currentModeId: string;
|
|
53
|
-
modes: readonly SessionMode[];
|
|
54
|
-
}
|
|
55
|
-
interface ACPClientAdapterOptions {
|
|
56
|
-
command: string | string[];
|
|
57
|
-
cwd?: string;
|
|
58
|
-
env?: Record<string, string>;
|
|
59
|
-
mcpServers?: McpServer[];
|
|
60
|
-
authMethod?: string | null;
|
|
61
|
-
enableMemoryTools?: boolean;
|
|
62
|
-
enableMcpTools?: boolean;
|
|
63
|
-
additionalMcpTools?: McpToolRegistration[];
|
|
64
|
-
clientCapabilities?: ClientCapabilities;
|
|
65
|
-
connectionFactory?: ACPClientConnectionFactory;
|
|
66
|
-
resolvePermission?: (request: ACPPermissionRequest, signal: AbortSignal) => Promise<string | undefined>;
|
|
67
|
-
permissionTimeoutMs?: number;
|
|
68
|
-
resolveSessionMode?: (request: ACPModeRequest, signal: AbortSignal) => Promise<string | undefined>;
|
|
69
|
-
logger?: Logger;
|
|
70
|
-
}
|
|
71
|
-
declare class ACPClientAdapter extends SimpleAdapter<ACPClientSessionState, AdapterToolsProtocol> {
|
|
72
|
-
private readonly command;
|
|
73
|
-
private readonly cwd;
|
|
74
|
-
private readonly env?;
|
|
75
|
-
private readonly mcpServers;
|
|
76
|
-
private readonly authMethod?;
|
|
77
|
-
private readonly enableMemoryTools;
|
|
78
|
-
private readonly enableMcpTools;
|
|
79
|
-
private readonly additionalMcpTools;
|
|
80
|
-
private readonly clientCapabilities?;
|
|
81
|
-
private readonly connectionFactory;
|
|
82
|
-
private readonly roomToSession;
|
|
83
|
-
private readonly sessionToRoom;
|
|
84
|
-
private readonly roomTools;
|
|
85
|
-
private readonly activeSessions;
|
|
86
|
-
private readonly bootstrappedSessions;
|
|
87
|
-
private readonly pendingPermissions;
|
|
88
|
-
private readonly sessionsInFlight;
|
|
89
|
-
private readonly roomTurnLocks;
|
|
90
|
-
private readonly roomGeneration;
|
|
91
|
-
private readonly resolvePermission?;
|
|
92
|
-
private readonly resolveSessionMode?;
|
|
93
|
-
private readonly permissionTimeoutMs;
|
|
94
|
-
private readonly logger;
|
|
95
|
-
private backend;
|
|
96
|
-
private backendPromise;
|
|
97
|
-
private client;
|
|
98
|
-
private connectionHandle;
|
|
99
|
-
private connection;
|
|
100
|
-
private connectionState;
|
|
101
|
-
private started;
|
|
102
|
-
private systemPrompt;
|
|
103
|
-
private spawnPromise;
|
|
104
|
-
constructor(options: ACPClientAdapterOptions);
|
|
105
|
-
onStarted(agentName: string, agentDescription: string): Promise<void>;
|
|
106
|
-
onMessage(message: PlatformMessage, tools: AdapterToolsProtocol, history: ACPClientSessionState, participantsMessage: string | null, contactsMessage: string | null, context: {
|
|
107
|
-
isSessionBootstrap: boolean;
|
|
108
|
-
roomId: string;
|
|
109
|
-
}): Promise<void>;
|
|
110
|
-
private runTurn;
|
|
111
|
-
private withRoomTurnLock;
|
|
112
|
-
onCleanup(roomId: string): Promise<void>;
|
|
113
|
-
onRuntimeStop(): Promise<void>;
|
|
114
|
-
stop(): Promise<void>;
|
|
115
|
-
private rehydrate;
|
|
116
|
-
private linkSession;
|
|
117
|
-
private nextRoomGeneration;
|
|
118
|
-
private isCurrentGeneration;
|
|
119
|
-
private raceAgainstConnectionClose;
|
|
120
|
-
private unlinkRoom;
|
|
121
|
-
private ensureConnection;
|
|
122
|
-
private spawnConnection;
|
|
123
|
-
private getOrCreateSession;
|
|
124
|
-
private establishSession;
|
|
125
|
-
private linkOrAbandon;
|
|
126
|
-
private configureSessionMode;
|
|
127
|
-
private resolveSessionModeManually;
|
|
128
|
-
private tryRestoreSession;
|
|
129
|
-
private buildSessionMcpServers;
|
|
130
|
-
private getOrCreateBackend;
|
|
131
|
-
private createBackend;
|
|
132
|
-
private buildSystemContext;
|
|
133
|
-
private routePermissionRequest;
|
|
134
|
-
private handlePermissionRequest;
|
|
135
|
-
private toResponse;
|
|
136
|
-
private safeWarn;
|
|
137
|
-
private resolveManually;
|
|
138
|
-
private discardLateAnswer;
|
|
139
|
-
private abandon;
|
|
140
|
-
private trackPending;
|
|
141
|
-
private untrackPending;
|
|
142
|
-
private cancelPendingPermissions;
|
|
143
|
-
private cancelAllPendingPermissions;
|
|
144
|
-
private flushChunks;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
36
|
interface BandACPServerAdapterOptions {
|
|
148
37
|
bandRest: RestApi;
|
|
149
38
|
maxSessions?: number;
|
|
@@ -154,6 +43,7 @@ interface BandACPServerAdapterOptions {
|
|
|
154
43
|
slashCommands?: Record<string, string>;
|
|
155
44
|
}
|
|
156
45
|
declare class BandACPServerAdapter extends SimpleAdapter<ACPServerSessionState, MessagingTools> {
|
|
46
|
+
protected readonly provider = "acp-server";
|
|
157
47
|
private readonly bandRest;
|
|
158
48
|
private readonly maxSessions;
|
|
159
49
|
private readonly responseTimeoutMs;
|
|
@@ -249,10 +139,9 @@ declare class ACPServer implements Agent {
|
|
|
249
139
|
loadSession(params: LoadSessionRequest): Promise<LoadSessionResponse>;
|
|
250
140
|
listSessions(params: ListSessionsRequest): Promise<ListSessionsResponse>;
|
|
251
141
|
unstable_forkSession(params: ForkSessionRequest): Promise<ForkSessionResponse>;
|
|
252
|
-
|
|
253
|
-
|
|
142
|
+
resumeSession(params: ResumeSessionRequest): Promise<ResumeSessionResponse>;
|
|
143
|
+
closeSession(params: _agentclientprotocol_sdk.CloseSessionRequest): Promise<_agentclientprotocol_sdk.CloseSessionResponse>;
|
|
254
144
|
setSessionMode(params: SetSessionModeRequest): Promise<SetSessionModeResponse>;
|
|
255
|
-
unstable_setSessionModel(params: SetSessionModelRequest): Promise<SetSessionModelResponse>;
|
|
256
145
|
setSessionConfigOption(_params: SetSessionConfigOptionRequest): Promise<SetSessionConfigOptionResponse>;
|
|
257
146
|
authenticate(params: AuthenticateRequest): Promise<AuthenticateResponse>;
|
|
258
147
|
prompt(params: PromptRequest): Promise<PromptResponse>;
|
|
@@ -261,4 +150,4 @@ declare class ACPServer implements Agent {
|
|
|
261
150
|
extNotification(method: string, params: Record<string, unknown>): Promise<void>;
|
|
262
151
|
}
|
|
263
152
|
|
|
264
|
-
export {
|
|
153
|
+
export { ACPServer, type ACPServerOptions, BandACPServerAdapter, type BandACPServerAdapterOptions, GatewayServer, GatewayServerLike, GatewayServerOptions, createGatewayServer };
|