@band-ai/sdk 0.1.10 → 0.2.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 -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 +387 -238
- package/dist/adapters.d.cts +36 -21
- package/dist/adapters.d.ts +36 -21
- package/dist/adapters.js +168 -65
- 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/adapters.d.cts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { A as A2AAdapter, a as A2AAdapterOptions, K as A2AClientFactory, M as A2AClientLike, b as A2AGatewayAdapter, c as AnthropicAdapter, d as AnthropicAdapterOptions, N as AnthropicClientFactory, Q as AnthropicToolCallingModel, R as AnthropicToolCallingModelOptions, C as CODEX_REASONING_EFFORTS, e as CODEX_REASONING_SUMMARIES, f as CODEX_WEB_SEARCH_MODES, g as ClaudePermissionMode, h as ClaudeSDKAdapter, i as ClaudeSDKAdapterOptions, S as ClaudeSDKQuery, U as ClaudeSDKQueryParams, j as CodexAdapter, k as CodexAdapterConfig, W as CodexAppServerStdioClient, l as CodexApprovalPolicy, X as CodexClientLike, Y as CodexJsonRpcError, m as CodexReasoningEffort, n as CodexReasoningSummary, o as CodexSandboxMode, p as CodexWebSearchMode, Z as DynamicToolCallParams, _ as DynamicToolCallResponse, $ as DynamicToolSpec, G as GeminiAdapter, q as GeminiAdapterOptions, a0 as GeminiClientFactory, a1 as GeminiToolCallingModel, a2 as GeminiToolCallingModelOptions, r as GenericAdapter, s as GenericAdapterHandler, t as GoogleADKAdapter, u as GoogleADKAdapterOptions, a3 as HttpOpencodeClient, a4 as HttpOpencodeClientOptions, a5 as HttpStatusError, L as LangGraphAdapter, v as LangGraphAdapterOptions, w as LangGraphGraph, x as LettaAdapter, y as LettaAdapterOptions, a6 as LettaAgentCreateParams, a7 as LettaClientFactory, a8 as LettaClientLike, a9 as LettaHistoryConverter, aa as LettaMessage, ab as LettaMessageCreateParams, ac as LettaMessages, ad as LettaRequestOptions, ae as LettaResponse, af as LettaResponseMessage, O as OpenAIAdapter, z as OpenAIAdapterOptions, ag as OpenAIClientFactory, ah as OpenAIToolCallingModel, ai as OpenAIToolCallingModelOptions, B as OpencodeAdapter, D as OpencodeAdapterConfig, E as OpencodeApprovalMode, F as OpencodeApprovalReply, aj as OpencodeClientLike, H as OpencodeQuestionMode, P as ParlantAdapter, I as ParlantAdapterOptions, ak as ParlantClientFactory, al as ParlantClientLike, am as ToolCall, an as ToolCallingAdapter, ao as ToolCallingAdapterOptions, T as ToolCallingModel, ap as ToolCallingModelRequest, aq as ToolCallingResponse, ar as ToolResult, as as TurnStartParams, V as VercelAISDKAdapter, J as VercelAISDKAdapterOptions, at as VercelAISDKToolCallingModel, au as VercelAISDKToolCallingModelOptions, av as runSingleToolRound } from './ClaudeSDKAdapter-
|
|
1
|
+
export { A as A2AAdapter, a as A2AAdapterOptions, K as A2AClientFactory, M as A2AClientLike, b as A2AGatewayAdapter, c as AnthropicAdapter, d as AnthropicAdapterOptions, N as AnthropicClientFactory, Q as AnthropicToolCallingModel, R as AnthropicToolCallingModelOptions, C as CODEX_REASONING_EFFORTS, e as CODEX_REASONING_SUMMARIES, f as CODEX_WEB_SEARCH_MODES, g as ClaudePermissionMode, h as ClaudeSDKAdapter, i as ClaudeSDKAdapterOptions, S as ClaudeSDKQuery, U as ClaudeSDKQueryParams, j as CodexAdapter, k as CodexAdapterConfig, W as CodexAppServerStdioClient, l as CodexApprovalPolicy, X as CodexClientLike, Y as CodexJsonRpcError, m as CodexReasoningEffort, n as CodexReasoningSummary, o as CodexSandboxMode, p as CodexWebSearchMode, Z as DynamicToolCallParams, _ as DynamicToolCallResponse, $ as DynamicToolSpec, G as GeminiAdapter, q as GeminiAdapterOptions, a0 as GeminiClientFactory, a1 as GeminiToolCallingModel, a2 as GeminiToolCallingModelOptions, r as GenericAdapter, s as GenericAdapterHandler, t as GoogleADKAdapter, u as GoogleADKAdapterOptions, a3 as HttpOpencodeClient, a4 as HttpOpencodeClientOptions, a5 as HttpStatusError, L as LangGraphAdapter, v as LangGraphAdapterOptions, w as LangGraphGraph, x as LettaAdapter, y as LettaAdapterOptions, a6 as LettaAgentCreateParams, a7 as LettaClientFactory, a8 as LettaClientLike, a9 as LettaHistoryConverter, aa as LettaMessage, ab as LettaMessageCreateParams, ac as LettaMessages, ad as LettaRequestOptions, ae as LettaResponse, af as LettaResponseMessage, O as OpenAIAdapter, z as OpenAIAdapterOptions, ag as OpenAIClientFactory, ah as OpenAIToolCallingModel, ai as OpenAIToolCallingModelOptions, B as OpencodeAdapter, D as OpencodeAdapterConfig, E as OpencodeApprovalMode, F as OpencodeApprovalReply, aj as OpencodeClientLike, H as OpencodeQuestionMode, P as ParlantAdapter, I as ParlantAdapterOptions, ak as ParlantClientFactory, al as ParlantClientLike, am as ToolCall, an as ToolCallingAdapter, ao as ToolCallingAdapterOptions, T as ToolCallingModel, ap as ToolCallingModelRequest, aq as ToolCallingResponse, ar as ToolResult, as as TurnStartParams, V as VercelAISDKAdapter, J as VercelAISDKAdapterOptions, at as VercelAISDKToolCallingModel, au as VercelAISDKToolCallingModelOptions, av as runSingleToolRound } from './ClaudeSDKAdapter-BY4zEbCl.cjs';
|
|
2
2
|
import * as _agentclientprotocol_sdk from '@agentclientprotocol/sdk';
|
|
3
|
-
import { Client, ClientSideConnection, McpServer, ClientCapabilities, SessionMode, AgentSideConnection, SessionModeState, Agent, InitializeResponse, Implementation, Stream, InitializeRequest, LoadSessionRequest, LoadSessionResponse, ListSessionsRequest, ListSessionsResponse, ForkSessionRequest, ForkSessionResponse, ResumeSessionRequest, ResumeSessionResponse, SetSessionModeRequest, SetSessionModeResponse, SetSessionModelRequest, SetSessionModelResponse, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, AuthenticateRequest, AuthenticateResponse, PromptRequest, PromptResponse } from '@agentclientprotocol/sdk';
|
|
4
|
-
import { A as ACPClientSessionState, a as ACPServerSessionState } from './acp-server-
|
|
5
|
-
export { G as GatewayHistoryConverter } from './acp-server-
|
|
6
|
-
import { S as SimpleAdapter } from './simpleAdapter-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { Client, ClientSideConnection, McpServer, ClientCapabilities, RequestPermissionRequest, SessionMode, AgentSideConnection, SessionModeState, Agent, InitializeResponse, Implementation, Stream, InitializeRequest, LoadSessionRequest, LoadSessionResponse, ListSessionsRequest, ListSessionsResponse, ForkSessionRequest, ForkSessionResponse, ResumeSessionRequest, ResumeSessionResponse, SetSessionModeRequest, SetSessionModeResponse, SetSessionModelRequest, SetSessionModelResponse, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, AuthenticateRequest, AuthenticateResponse, PromptRequest, PromptResponse } from '@agentclientprotocol/sdk';
|
|
4
|
+
import { A as ACPClientSessionState, a as ACPServerSessionState } from './acp-server-Dlj7D563.cjs';
|
|
5
|
+
export { G as GatewayHistoryConverter } from './acp-server-Dlj7D563.cjs';
|
|
6
|
+
import { S as SimpleAdapter } from './simpleAdapter-BpT4XbZC.cjs';
|
|
7
|
+
import { L as Logger } from './logger-CABQOnlR.cjs';
|
|
8
|
+
import { A as AdapterToolsProtocol, c as MessagingTools } from './protocols-Bz1rxcUg.cjs';
|
|
9
|
+
import { P as PlatformMessage } from './types-D958TC71.cjs';
|
|
10
|
+
import { M as McpToolRegistration } from './sdk-BTciSLRQ.cjs';
|
|
11
|
+
import { R as RestApi } from './types-BgYFd_Yw.cjs';
|
|
12
|
+
import { b as GatewayServerLike, c as GatewayServerOptions } from './opencode-2YdscIc1.cjs';
|
|
13
|
+
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 './opencode-2YdscIc1.cjs';
|
|
14
14
|
import './customTools-BzF0IISO.cjs';
|
|
15
15
|
import 'zod';
|
|
16
|
-
import './dtos-
|
|
17
|
-
import './backends-
|
|
16
|
+
import './dtos-B8KU_q4d.cjs';
|
|
17
|
+
import './backends-ZLxmQrTZ.cjs';
|
|
18
18
|
import '@anthropic-ai/claude-agent-sdk';
|
|
19
19
|
|
|
20
20
|
declare class GatewayServer implements GatewayServerLike {
|
|
@@ -52,6 +52,9 @@ interface ACPClientAdapterOptions {
|
|
|
52
52
|
additionalMcpTools?: McpToolRegistration[];
|
|
53
53
|
clientCapabilities?: ClientCapabilities;
|
|
54
54
|
connectionFactory?: ACPClientConnectionFactory;
|
|
55
|
+
resolvePermission?: (request: RequestPermissionRequest, signal: AbortSignal) => Promise<string | undefined>;
|
|
56
|
+
permissionTimeoutMs?: number;
|
|
57
|
+
logger?: Logger;
|
|
55
58
|
}
|
|
56
59
|
declare class ACPClientAdapter extends SimpleAdapter<ACPClientSessionState, AdapterToolsProtocol> {
|
|
57
60
|
private readonly command;
|
|
@@ -68,7 +71,12 @@ declare class ACPClientAdapter extends SimpleAdapter<ACPClientSessionState, Adap
|
|
|
68
71
|
private readonly roomTools;
|
|
69
72
|
private readonly activeSessions;
|
|
70
73
|
private readonly bootstrappedSessions;
|
|
74
|
+
private readonly pendingPermissions;
|
|
75
|
+
private readonly resolvePermission?;
|
|
76
|
+
private readonly permissionTimeoutMs;
|
|
77
|
+
private readonly logger;
|
|
71
78
|
private backend;
|
|
79
|
+
private backendPromise;
|
|
72
80
|
private client;
|
|
73
81
|
private connectionHandle;
|
|
74
82
|
private connection;
|
|
@@ -92,13 +100,20 @@ declare class ACPClientAdapter extends SimpleAdapter<ACPClientSessionState, Adap
|
|
|
92
100
|
private tryRestoreSession;
|
|
93
101
|
private buildSessionMcpServers;
|
|
94
102
|
private getOrCreateBackend;
|
|
103
|
+
private createBackend;
|
|
95
104
|
private buildSystemContext;
|
|
96
105
|
private handlePermissionRequest;
|
|
106
|
+
private toResponse;
|
|
107
|
+
private resolveManually;
|
|
108
|
+
private trackPending;
|
|
109
|
+
private untrackPending;
|
|
110
|
+
private cancelPendingPermissions;
|
|
111
|
+
private cancelAllPendingPermissions;
|
|
97
112
|
private flushChunks;
|
|
98
113
|
}
|
|
99
114
|
|
|
100
|
-
interface
|
|
101
|
-
|
|
115
|
+
interface BandACPServerAdapterOptions {
|
|
116
|
+
bandRest: RestApi;
|
|
102
117
|
maxSessions?: number;
|
|
103
118
|
responseTimeoutMs?: number;
|
|
104
119
|
promptCompletionGraceMs?: number;
|
|
@@ -106,8 +121,8 @@ interface ThenvoiACPServerAdapterOptions {
|
|
|
106
121
|
modeToPeer?: Record<string, string>;
|
|
107
122
|
slashCommands?: Record<string, string>;
|
|
108
123
|
}
|
|
109
|
-
declare class
|
|
110
|
-
private readonly
|
|
124
|
+
declare class BandACPServerAdapter extends SimpleAdapter<ACPServerSessionState, MessagingTools> {
|
|
125
|
+
private readonly bandRest;
|
|
111
126
|
private readonly maxSessions;
|
|
112
127
|
private readonly responseTimeoutMs;
|
|
113
128
|
private readonly promptCompletionGraceMs;
|
|
@@ -124,7 +139,7 @@ declare class ThenvoiACPServerAdapter extends SimpleAdapter<ACPServerSessionStat
|
|
|
124
139
|
private sessionsInFlight;
|
|
125
140
|
private readonly router;
|
|
126
141
|
private readonly pushHandler;
|
|
127
|
-
constructor(options:
|
|
142
|
+
constructor(options: BandACPServerAdapterOptions);
|
|
128
143
|
bindConnection(connection: AgentSideConnection | null): void;
|
|
129
144
|
getConnection(): AgentSideConnection | null;
|
|
130
145
|
hasSession(sessionId: string): boolean;
|
|
@@ -190,7 +205,7 @@ declare class ACPServer implements Agent {
|
|
|
190
205
|
private readonly agentInfo;
|
|
191
206
|
private readonly extensionHandler;
|
|
192
207
|
private connection;
|
|
193
|
-
constructor(adapter:
|
|
208
|
+
constructor(adapter: BandACPServerAdapter, options?: ACPServerOptions);
|
|
194
209
|
connectStream(stream: Stream): Promise<AgentSideConnection>;
|
|
195
210
|
connectStdio(options?: {
|
|
196
211
|
stdin?: NodeJS.ReadableStream;
|
|
@@ -214,4 +229,4 @@ declare class ACPServer implements Agent {
|
|
|
214
229
|
extNotification(method: string, params: Record<string, unknown>): Promise<void>;
|
|
215
230
|
}
|
|
216
231
|
|
|
217
|
-
export { ACPClientAdapter, type ACPClientAdapterOptions, ACPServer, type ACPServerOptions,
|
|
232
|
+
export { ACPClientAdapter, type ACPClientAdapterOptions, ACPServer, type ACPServerOptions, BandACPServerAdapter, type BandACPServerAdapterOptions, GatewayServer, GatewayServerLike, GatewayServerOptions, createGatewayServer };
|
package/dist/adapters.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { A as A2AAdapter, a as A2AAdapterOptions, K as A2AClientFactory, M as A2AClientLike, b as A2AGatewayAdapter, c as AnthropicAdapter, d as AnthropicAdapterOptions, N as AnthropicClientFactory, Q as AnthropicToolCallingModel, R as AnthropicToolCallingModelOptions, C as CODEX_REASONING_EFFORTS, e as CODEX_REASONING_SUMMARIES, f as CODEX_WEB_SEARCH_MODES, g as ClaudePermissionMode, h as ClaudeSDKAdapter, i as ClaudeSDKAdapterOptions, S as ClaudeSDKQuery, U as ClaudeSDKQueryParams, j as CodexAdapter, k as CodexAdapterConfig, W as CodexAppServerStdioClient, l as CodexApprovalPolicy, X as CodexClientLike, Y as CodexJsonRpcError, m as CodexReasoningEffort, n as CodexReasoningSummary, o as CodexSandboxMode, p as CodexWebSearchMode, Z as DynamicToolCallParams, _ as DynamicToolCallResponse, $ as DynamicToolSpec, G as GeminiAdapter, q as GeminiAdapterOptions, a0 as GeminiClientFactory, a1 as GeminiToolCallingModel, a2 as GeminiToolCallingModelOptions, r as GenericAdapter, s as GenericAdapterHandler, t as GoogleADKAdapter, u as GoogleADKAdapterOptions, a3 as HttpOpencodeClient, a4 as HttpOpencodeClientOptions, a5 as HttpStatusError, L as LangGraphAdapter, v as LangGraphAdapterOptions, w as LangGraphGraph, x as LettaAdapter, y as LettaAdapterOptions, a6 as LettaAgentCreateParams, a7 as LettaClientFactory, a8 as LettaClientLike, a9 as LettaHistoryConverter, aa as LettaMessage, ab as LettaMessageCreateParams, ac as LettaMessages, ad as LettaRequestOptions, ae as LettaResponse, af as LettaResponseMessage, O as OpenAIAdapter, z as OpenAIAdapterOptions, ag as OpenAIClientFactory, ah as OpenAIToolCallingModel, ai as OpenAIToolCallingModelOptions, B as OpencodeAdapter, D as OpencodeAdapterConfig, E as OpencodeApprovalMode, F as OpencodeApprovalReply, aj as OpencodeClientLike, H as OpencodeQuestionMode, P as ParlantAdapter, I as ParlantAdapterOptions, ak as ParlantClientFactory, al as ParlantClientLike, am as ToolCall, an as ToolCallingAdapter, ao as ToolCallingAdapterOptions, T as ToolCallingModel, ap as ToolCallingModelRequest, aq as ToolCallingResponse, ar as ToolResult, as as TurnStartParams, V as VercelAISDKAdapter, J as VercelAISDKAdapterOptions, at as VercelAISDKToolCallingModel, au as VercelAISDKToolCallingModelOptions, av as runSingleToolRound } from './ClaudeSDKAdapter-
|
|
1
|
+
export { A as A2AAdapter, a as A2AAdapterOptions, K as A2AClientFactory, M as A2AClientLike, b as A2AGatewayAdapter, c as AnthropicAdapter, d as AnthropicAdapterOptions, N as AnthropicClientFactory, Q as AnthropicToolCallingModel, R as AnthropicToolCallingModelOptions, C as CODEX_REASONING_EFFORTS, e as CODEX_REASONING_SUMMARIES, f as CODEX_WEB_SEARCH_MODES, g as ClaudePermissionMode, h as ClaudeSDKAdapter, i as ClaudeSDKAdapterOptions, S as ClaudeSDKQuery, U as ClaudeSDKQueryParams, j as CodexAdapter, k as CodexAdapterConfig, W as CodexAppServerStdioClient, l as CodexApprovalPolicy, X as CodexClientLike, Y as CodexJsonRpcError, m as CodexReasoningEffort, n as CodexReasoningSummary, o as CodexSandboxMode, p as CodexWebSearchMode, Z as DynamicToolCallParams, _ as DynamicToolCallResponse, $ as DynamicToolSpec, G as GeminiAdapter, q as GeminiAdapterOptions, a0 as GeminiClientFactory, a1 as GeminiToolCallingModel, a2 as GeminiToolCallingModelOptions, r as GenericAdapter, s as GenericAdapterHandler, t as GoogleADKAdapter, u as GoogleADKAdapterOptions, a3 as HttpOpencodeClient, a4 as HttpOpencodeClientOptions, a5 as HttpStatusError, L as LangGraphAdapter, v as LangGraphAdapterOptions, w as LangGraphGraph, x as LettaAdapter, y as LettaAdapterOptions, a6 as LettaAgentCreateParams, a7 as LettaClientFactory, a8 as LettaClientLike, a9 as LettaHistoryConverter, aa as LettaMessage, ab as LettaMessageCreateParams, ac as LettaMessages, ad as LettaRequestOptions, ae as LettaResponse, af as LettaResponseMessage, O as OpenAIAdapter, z as OpenAIAdapterOptions, ag as OpenAIClientFactory, ah as OpenAIToolCallingModel, ai as OpenAIToolCallingModelOptions, B as OpencodeAdapter, D as OpencodeAdapterConfig, E as OpencodeApprovalMode, F as OpencodeApprovalReply, aj as OpencodeClientLike, H as OpencodeQuestionMode, P as ParlantAdapter, I as ParlantAdapterOptions, ak as ParlantClientFactory, al as ParlantClientLike, am as ToolCall, an as ToolCallingAdapter, ao as ToolCallingAdapterOptions, T as ToolCallingModel, ap as ToolCallingModelRequest, aq as ToolCallingResponse, ar as ToolResult, as as TurnStartParams, V as VercelAISDKAdapter, J as VercelAISDKAdapterOptions, at as VercelAISDKToolCallingModel, au as VercelAISDKToolCallingModelOptions, av as runSingleToolRound } from './ClaudeSDKAdapter-Cna5P1dR.js';
|
|
2
2
|
import * as _agentclientprotocol_sdk from '@agentclientprotocol/sdk';
|
|
3
|
-
import { Client, ClientSideConnection, McpServer, ClientCapabilities, SessionMode, AgentSideConnection, SessionModeState, Agent, InitializeResponse, Implementation, Stream, InitializeRequest, LoadSessionRequest, LoadSessionResponse, ListSessionsRequest, ListSessionsResponse, ForkSessionRequest, ForkSessionResponse, ResumeSessionRequest, ResumeSessionResponse, SetSessionModeRequest, SetSessionModeResponse, SetSessionModelRequest, SetSessionModelResponse, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, AuthenticateRequest, AuthenticateResponse, PromptRequest, PromptResponse } from '@agentclientprotocol/sdk';
|
|
4
|
-
import { A as ACPClientSessionState, a as ACPServerSessionState } from './acp-server-
|
|
5
|
-
export { G as GatewayHistoryConverter } from './acp-server-
|
|
6
|
-
import { S as SimpleAdapter } from './simpleAdapter
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { Client, ClientSideConnection, McpServer, ClientCapabilities, RequestPermissionRequest, SessionMode, AgentSideConnection, SessionModeState, Agent, InitializeResponse, Implementation, Stream, InitializeRequest, LoadSessionRequest, LoadSessionResponse, ListSessionsRequest, ListSessionsResponse, ForkSessionRequest, ForkSessionResponse, ResumeSessionRequest, ResumeSessionResponse, SetSessionModeRequest, SetSessionModeResponse, SetSessionModelRequest, SetSessionModelResponse, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, AuthenticateRequest, AuthenticateResponse, PromptRequest, PromptResponse } from '@agentclientprotocol/sdk';
|
|
4
|
+
import { A as ACPClientSessionState, a as ACPServerSessionState } from './acp-server-CiUqN3G3.js';
|
|
5
|
+
export { G as GatewayHistoryConverter } from './acp-server-CiUqN3G3.js';
|
|
6
|
+
import { S as SimpleAdapter } from './simpleAdapter--wznuoOw.js';
|
|
7
|
+
import { L as Logger } from './logger-CABQOnlR.js';
|
|
8
|
+
import { A as AdapterToolsProtocol, c as MessagingTools } from './protocols-Bwwcql0h.js';
|
|
9
|
+
import { P as PlatformMessage } from './types-BTN_ZETM.js';
|
|
10
|
+
import { M as McpToolRegistration } from './sdk-qKJtMma_.js';
|
|
11
|
+
import { R as RestApi } from './types-BivGO7I9.js';
|
|
12
|
+
import { b as GatewayServerLike, c as GatewayServerOptions } from './opencode-Bld62x5t.js';
|
|
13
|
+
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 './opencode-Bld62x5t.js';
|
|
14
14
|
import './customTools-BzF0IISO.js';
|
|
15
15
|
import 'zod';
|
|
16
|
-
import './dtos-
|
|
17
|
-
import './backends-
|
|
16
|
+
import './dtos-B8KU_q4d.js';
|
|
17
|
+
import './backends-D-dBdDm-.js';
|
|
18
18
|
import '@anthropic-ai/claude-agent-sdk';
|
|
19
19
|
|
|
20
20
|
declare class GatewayServer implements GatewayServerLike {
|
|
@@ -52,6 +52,9 @@ interface ACPClientAdapterOptions {
|
|
|
52
52
|
additionalMcpTools?: McpToolRegistration[];
|
|
53
53
|
clientCapabilities?: ClientCapabilities;
|
|
54
54
|
connectionFactory?: ACPClientConnectionFactory;
|
|
55
|
+
resolvePermission?: (request: RequestPermissionRequest, signal: AbortSignal) => Promise<string | undefined>;
|
|
56
|
+
permissionTimeoutMs?: number;
|
|
57
|
+
logger?: Logger;
|
|
55
58
|
}
|
|
56
59
|
declare class ACPClientAdapter extends SimpleAdapter<ACPClientSessionState, AdapterToolsProtocol> {
|
|
57
60
|
private readonly command;
|
|
@@ -68,7 +71,12 @@ declare class ACPClientAdapter extends SimpleAdapter<ACPClientSessionState, Adap
|
|
|
68
71
|
private readonly roomTools;
|
|
69
72
|
private readonly activeSessions;
|
|
70
73
|
private readonly bootstrappedSessions;
|
|
74
|
+
private readonly pendingPermissions;
|
|
75
|
+
private readonly resolvePermission?;
|
|
76
|
+
private readonly permissionTimeoutMs;
|
|
77
|
+
private readonly logger;
|
|
71
78
|
private backend;
|
|
79
|
+
private backendPromise;
|
|
72
80
|
private client;
|
|
73
81
|
private connectionHandle;
|
|
74
82
|
private connection;
|
|
@@ -92,13 +100,20 @@ declare class ACPClientAdapter extends SimpleAdapter<ACPClientSessionState, Adap
|
|
|
92
100
|
private tryRestoreSession;
|
|
93
101
|
private buildSessionMcpServers;
|
|
94
102
|
private getOrCreateBackend;
|
|
103
|
+
private createBackend;
|
|
95
104
|
private buildSystemContext;
|
|
96
105
|
private handlePermissionRequest;
|
|
106
|
+
private toResponse;
|
|
107
|
+
private resolveManually;
|
|
108
|
+
private trackPending;
|
|
109
|
+
private untrackPending;
|
|
110
|
+
private cancelPendingPermissions;
|
|
111
|
+
private cancelAllPendingPermissions;
|
|
97
112
|
private flushChunks;
|
|
98
113
|
}
|
|
99
114
|
|
|
100
|
-
interface
|
|
101
|
-
|
|
115
|
+
interface BandACPServerAdapterOptions {
|
|
116
|
+
bandRest: RestApi;
|
|
102
117
|
maxSessions?: number;
|
|
103
118
|
responseTimeoutMs?: number;
|
|
104
119
|
promptCompletionGraceMs?: number;
|
|
@@ -106,8 +121,8 @@ interface ThenvoiACPServerAdapterOptions {
|
|
|
106
121
|
modeToPeer?: Record<string, string>;
|
|
107
122
|
slashCommands?: Record<string, string>;
|
|
108
123
|
}
|
|
109
|
-
declare class
|
|
110
|
-
private readonly
|
|
124
|
+
declare class BandACPServerAdapter extends SimpleAdapter<ACPServerSessionState, MessagingTools> {
|
|
125
|
+
private readonly bandRest;
|
|
111
126
|
private readonly maxSessions;
|
|
112
127
|
private readonly responseTimeoutMs;
|
|
113
128
|
private readonly promptCompletionGraceMs;
|
|
@@ -124,7 +139,7 @@ declare class ThenvoiACPServerAdapter extends SimpleAdapter<ACPServerSessionStat
|
|
|
124
139
|
private sessionsInFlight;
|
|
125
140
|
private readonly router;
|
|
126
141
|
private readonly pushHandler;
|
|
127
|
-
constructor(options:
|
|
142
|
+
constructor(options: BandACPServerAdapterOptions);
|
|
128
143
|
bindConnection(connection: AgentSideConnection | null): void;
|
|
129
144
|
getConnection(): AgentSideConnection | null;
|
|
130
145
|
hasSession(sessionId: string): boolean;
|
|
@@ -190,7 +205,7 @@ declare class ACPServer implements Agent {
|
|
|
190
205
|
private readonly agentInfo;
|
|
191
206
|
private readonly extensionHandler;
|
|
192
207
|
private connection;
|
|
193
|
-
constructor(adapter:
|
|
208
|
+
constructor(adapter: BandACPServerAdapter, options?: ACPServerOptions);
|
|
194
209
|
connectStream(stream: Stream): Promise<AgentSideConnection>;
|
|
195
210
|
connectStdio(options?: {
|
|
196
211
|
stdin?: NodeJS.ReadableStream;
|
|
@@ -214,4 +229,4 @@ declare class ACPServer implements Agent {
|
|
|
214
229
|
extNotification(method: string, params: Record<string, unknown>): Promise<void>;
|
|
215
230
|
}
|
|
216
231
|
|
|
217
|
-
export { ACPClientAdapter, type ACPClientAdapterOptions, ACPServer, type ACPServerOptions,
|
|
232
|
+
export { ACPClientAdapter, type ACPClientAdapterOptions, ACPServer, type ACPServerOptions, BandACPServerAdapter, type BandACPServerAdapterOptions, GatewayServer, GatewayServerLike, GatewayServerOptions, createGatewayServer };
|