@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
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { S as SimpleAdapter } from './simpleAdapter-
|
|
2
|
-
import { A as AdapterToolsProtocol,
|
|
3
|
-
import { H as HistoryProvider, P as PlatformMessage } from './types-
|
|
1
|
+
import { S as SimpleAdapter } from './simpleAdapter-D75rcz9n.cjs';
|
|
2
|
+
import { A as AdapterToolsProtocol, b as AgentToolsProtocol, e as MessagingTools, T as ToolExecutor, i as ToolSchemaProvider, H as HistoryConverter } from './protocols-CabgO52c.cjs';
|
|
3
|
+
import { H as HistoryProvider, P as PlatformMessage } from './types-DtcOLALn.cjs';
|
|
4
4
|
import { L as Logger } from './logger-CABQOnlR.cjs';
|
|
5
|
-
import { C as CustomToolDef } from './customTools-
|
|
6
|
-
import { m as ToolModelMessage, n as ToolModelSchema, M as MetadataMap } from './dtos-
|
|
7
|
-
import {
|
|
8
|
-
import { c as createBandMcpBackend } from './backends-
|
|
9
|
-
import { M as McpToolRegistration } from './sdk-
|
|
5
|
+
import { C as CustomToolDef } from './customTools-Bfecd0mJ.cjs';
|
|
6
|
+
import { m as ToolModelMessage, n as ToolModelSchema, M as MetadataMap } from './dtos-CjQsN1_h.cjs';
|
|
7
|
+
import { u as GoogleADKMessages, s as GoogleADKHistoryConverter, e as A2ASessionState, A as A2AAuth, G as GatewaySessionState, a as A2AGatewayAdapterOptions, n as ParlantMessages, P as ParlantHistoryConverter, C as ChatTurn, v as OpencodeSessionState, O as OpencodeHistoryConverter, r as ACPClientSessionState } from './acp-client-D-I_5lK-.cjs';
|
|
8
|
+
import { c as createBandMcpBackend } from './backends-Dh2WXcHQ.cjs';
|
|
9
|
+
import { M as McpToolRegistration } from './sdk-CXNqzoY1.cjs';
|
|
10
|
+
import { Client, ClientSideConnection, RequestPermissionRequest, McpServer, ClientCapabilities, SessionMode, SessionConfigOption, SessionConfigSelectOption } from '@agentclientprotocol/sdk';
|
|
10
11
|
|
|
11
12
|
type GenericAdapterHandler = (args: {
|
|
12
13
|
message: PlatformMessage;
|
|
@@ -20,6 +21,7 @@ type GenericAdapterHandler = (args: {
|
|
|
20
21
|
agentDescription: string;
|
|
21
22
|
}) => Promise<void>;
|
|
22
23
|
declare class GenericAdapter extends SimpleAdapter<HistoryProvider> {
|
|
24
|
+
protected readonly provider = "generic";
|
|
23
25
|
private readonly handler;
|
|
24
26
|
constructor(handler: GenericAdapterHandler);
|
|
25
27
|
onMessage(message: PlatformMessage, tools: AdapterToolsProtocol, history: HistoryProvider, participantsMessage: string | null, contactsMessage: string | null, context: {
|
|
@@ -108,7 +110,7 @@ type CodexRpcEvent = CodexRpcRequestEvent | CodexRpcNotificationEvent;
|
|
|
108
110
|
interface CodexClientLike {
|
|
109
111
|
connect(): Promise<void>;
|
|
110
112
|
initialize(params: InitializeParams): Promise<void>;
|
|
111
|
-
request<TResult>(method: string, params?: Record<string, unknown
|
|
113
|
+
request<TResult>(method: string, params?: Record<string, unknown>, timeoutMs?: number): Promise<TResult>;
|
|
112
114
|
notify(method: string, params?: Record<string, unknown>): Promise<void>;
|
|
113
115
|
respond(requestId: RequestId, result: Record<string, unknown> | DynamicToolCallResponse): Promise<void>;
|
|
114
116
|
respondError(requestId: RequestId, code: number, message: string, data?: unknown): Promise<void>;
|
|
@@ -140,7 +142,7 @@ declare class CodexAppServerStdioClient implements CodexClientLike {
|
|
|
140
142
|
});
|
|
141
143
|
connect(): Promise<void>;
|
|
142
144
|
initialize(params: InitializeParams): Promise<void>;
|
|
143
|
-
request<TResult>(method: string, params?: Record<string, unknown
|
|
145
|
+
request<TResult>(method: string, params?: Record<string, unknown>, timeoutMs?: number): Promise<TResult>;
|
|
144
146
|
notify(method: string, params?: Record<string, unknown>): Promise<void>;
|
|
145
147
|
respond(requestId: RequestId, result: Record<string, unknown> | DynamicToolCallResponse): Promise<void>;
|
|
146
148
|
respondError(requestId: RequestId, code: number, message: string, data?: unknown): Promise<void>;
|
|
@@ -200,6 +202,7 @@ interface CodexAdapterOptions {
|
|
|
200
202
|
logger?: Logger;
|
|
201
203
|
}
|
|
202
204
|
declare class CodexAdapter extends SimpleAdapter<HistoryProvider, AgentToolsProtocol> {
|
|
205
|
+
protected readonly provider = "codex";
|
|
203
206
|
private readonly baseConfig;
|
|
204
207
|
private readonly roomConfigOverrides;
|
|
205
208
|
private readonly customTools;
|
|
@@ -221,14 +224,21 @@ declare class CodexAdapter extends SimpleAdapter<HistoryProvider, AgentToolsProt
|
|
|
221
224
|
isSessionBootstrap: boolean;
|
|
222
225
|
roomId: string;
|
|
223
226
|
}): Promise<void>;
|
|
227
|
+
private ensureClientAndThread;
|
|
228
|
+
private startTurn;
|
|
229
|
+
private runEventLoop;
|
|
224
230
|
onCleanup(roomId: string): Promise<void>;
|
|
225
231
|
onRuntimeStop(): Promise<void>;
|
|
226
232
|
private getConfig;
|
|
227
233
|
private ensureSystemPrompt;
|
|
228
234
|
private ensureClient;
|
|
235
|
+
private takeClientForReset;
|
|
229
236
|
private resetClient;
|
|
237
|
+
private abandonClient;
|
|
238
|
+
private evictOnTransportFailure;
|
|
230
239
|
private debug;
|
|
231
240
|
private getOrCreateThread;
|
|
241
|
+
private assertCurrentClient;
|
|
232
242
|
private buildThreadStartParams;
|
|
233
243
|
private buildThreadResumeParams;
|
|
234
244
|
private buildThreadConfigOverrides;
|
|
@@ -241,9 +251,15 @@ declare class CodexAdapter extends SimpleAdapter<HistoryProvider, AgentToolsProt
|
|
|
241
251
|
private extractToolItem;
|
|
242
252
|
private extractThoughtText;
|
|
243
253
|
private emitTurnOutcome;
|
|
254
|
+
private reportAndDeliverTurnFailure;
|
|
244
255
|
private extractTurnError;
|
|
245
256
|
private currentMention;
|
|
246
257
|
private handleLocalCommand;
|
|
258
|
+
private handleHelpCommand;
|
|
259
|
+
private handleStatusCommand;
|
|
260
|
+
private handleModelCommand;
|
|
261
|
+
private handleModelListCommand;
|
|
262
|
+
private handleReasoningCommand;
|
|
247
263
|
private safeSendEvent;
|
|
248
264
|
}
|
|
249
265
|
|
|
@@ -280,6 +296,8 @@ interface ToolCallingModel {
|
|
|
280
296
|
interface ToolCallingAdapterOptions {
|
|
281
297
|
model: ToolCallingModel;
|
|
282
298
|
toolFormat: "openai" | "anthropic";
|
|
299
|
+
/** Passed through as `AgentFailure.provider` on a provider failure. Defaults to `DEFAULT_PROVIDER` when omitted. */
|
|
300
|
+
provider?: string;
|
|
283
301
|
systemPrompt?: string;
|
|
284
302
|
includeMemoryTools?: boolean;
|
|
285
303
|
maxToolRounds?: number;
|
|
@@ -291,6 +309,7 @@ type ToolCallingTools = MessagingTools & ToolExecutor & ToolSchemaProvider;
|
|
|
291
309
|
declare class ToolCallingAdapter extends SimpleAdapter<HistoryProvider, ToolCallingTools> {
|
|
292
310
|
private readonly model;
|
|
293
311
|
private readonly toolFormat;
|
|
312
|
+
protected readonly provider: string;
|
|
294
313
|
private readonly systemPrompt?;
|
|
295
314
|
private readonly includeMemoryTools;
|
|
296
315
|
private readonly maxToolRounds;
|
|
@@ -328,7 +347,7 @@ declare class VercelAISDKToolCallingModel implements ToolCallingModel {
|
|
|
328
347
|
complete(request: ToolCallingModelRequest): Promise<ToolCallingResponse>;
|
|
329
348
|
}
|
|
330
349
|
|
|
331
|
-
interface VercelAISDKAdapterOptions extends Omit<ToolCallingAdapterOptions, "toolFormat" | "model">, VercelAISDKToolCallingModelOptions {
|
|
350
|
+
interface VercelAISDKAdapterOptions extends Omit<ToolCallingAdapterOptions, "toolFormat" | "model" | "provider">, VercelAISDKToolCallingModelOptions {
|
|
332
351
|
}
|
|
333
352
|
declare class VercelAISDKAdapter extends ToolCallingAdapter {
|
|
334
353
|
constructor(options: VercelAISDKAdapterOptions);
|
|
@@ -367,7 +386,7 @@ declare class OpenAIToolCallingModel implements ToolCallingModel {
|
|
|
367
386
|
private getClient;
|
|
368
387
|
}
|
|
369
388
|
|
|
370
|
-
interface OpenAIAdapterOptions extends Omit<ToolCallingAdapterOptions, "toolFormat" | "model"> {
|
|
389
|
+
interface OpenAIAdapterOptions extends Omit<ToolCallingAdapterOptions, "toolFormat" | "model" | "provider"> {
|
|
371
390
|
model?: ToolCallingModel;
|
|
372
391
|
openAIModel?: string;
|
|
373
392
|
apiKey?: string;
|
|
@@ -405,7 +424,7 @@ declare class AnthropicToolCallingModel implements ToolCallingModel {
|
|
|
405
424
|
private getClient;
|
|
406
425
|
}
|
|
407
426
|
|
|
408
|
-
interface AnthropicAdapterOptions extends Omit<ToolCallingAdapterOptions, "toolFormat" | "model"> {
|
|
427
|
+
interface AnthropicAdapterOptions extends Omit<ToolCallingAdapterOptions, "toolFormat" | "model" | "provider"> {
|
|
409
428
|
model?: ToolCallingModel;
|
|
410
429
|
anthropicModel?: string;
|
|
411
430
|
apiKey?: string;
|
|
@@ -459,7 +478,7 @@ declare class GeminiToolCallingModel implements ToolCallingModel {
|
|
|
459
478
|
private ensurePartFactories;
|
|
460
479
|
}
|
|
461
480
|
|
|
462
|
-
interface GeminiAdapterOptions extends Omit<ToolCallingAdapterOptions, "toolFormat" | "model"> {
|
|
481
|
+
interface GeminiAdapterOptions extends Omit<ToolCallingAdapterOptions, "toolFormat" | "model" | "provider"> {
|
|
463
482
|
model?: ToolCallingModel;
|
|
464
483
|
geminiModel?: string;
|
|
465
484
|
apiKey?: string;
|
|
@@ -534,6 +553,7 @@ interface GoogleADKAdapterOptions {
|
|
|
534
553
|
sdkFactory?: () => Promise<GoogleAdkSdkLike>;
|
|
535
554
|
}
|
|
536
555
|
declare class GoogleADKAdapter extends SimpleAdapter<GoogleADKMessages, AdapterToolsProtocol> {
|
|
556
|
+
protected readonly provider = "google-adk";
|
|
537
557
|
private readonly model;
|
|
538
558
|
private readonly systemPromptOverride?;
|
|
539
559
|
private readonly customSection;
|
|
@@ -584,6 +604,7 @@ interface LangGraphAdapterOptions {
|
|
|
584
604
|
logger?: Logger;
|
|
585
605
|
}
|
|
586
606
|
declare class LangGraphAdapter extends SimpleAdapter<HistoryProvider, AdapterToolsProtocol> {
|
|
607
|
+
protected readonly provider = "langgraph";
|
|
587
608
|
private readonly llm?;
|
|
588
609
|
private readonly checkpointer?;
|
|
589
610
|
private readonly graph?;
|
|
@@ -646,6 +667,7 @@ type A2AClientFactory = (input: {
|
|
|
646
667
|
authHeaders: Record<string, string>;
|
|
647
668
|
}) => Promise<A2AClientLike>;
|
|
648
669
|
declare class A2AAdapter extends SimpleAdapter<A2ASessionState, MessagingTools> {
|
|
670
|
+
protected readonly provider = "a2a";
|
|
649
671
|
private readonly remoteUrl;
|
|
650
672
|
private readonly authHeaders;
|
|
651
673
|
private readonly streaming;
|
|
@@ -676,6 +698,7 @@ declare class A2AAdapter extends SimpleAdapter<A2ASessionState, MessagingTools>
|
|
|
676
698
|
}
|
|
677
699
|
|
|
678
700
|
declare class A2AGatewayAdapter extends SimpleAdapter<GatewaySessionState, MessagingTools> {
|
|
701
|
+
protected readonly provider = "a2a-gateway";
|
|
679
702
|
private readonly bandRest;
|
|
680
703
|
private readonly gatewayUrl;
|
|
681
704
|
private readonly host;
|
|
@@ -686,6 +709,7 @@ declare class A2AGatewayAdapter extends SimpleAdapter<GatewaySessionState, Messa
|
|
|
686
709
|
private readonly peerPageSize;
|
|
687
710
|
private readonly maxPeerPages;
|
|
688
711
|
private readonly serverFactory;
|
|
712
|
+
private readonly logger;
|
|
689
713
|
private readonly peersBySlug;
|
|
690
714
|
private readonly peersById;
|
|
691
715
|
private readonly contextToRoom;
|
|
@@ -774,6 +798,14 @@ interface ParlantAdapterOptions {
|
|
|
774
798
|
customSection?: string;
|
|
775
799
|
includeBaseInstructions?: boolean;
|
|
776
800
|
responseTimeoutSeconds?: number;
|
|
801
|
+
/**
|
|
802
|
+
* Most turns of prior conversation to replay into a new session.
|
|
803
|
+
* Defaults to 100. The value is a cap, not a toggle: `0` replays none.
|
|
804
|
+
*
|
|
805
|
+
* A reply is never replayed without the question it answers, so the result
|
|
806
|
+
* can be one turn shorter than the cap - and `1` replays nothing whenever
|
|
807
|
+
* the newest turn is an answer.
|
|
808
|
+
*/
|
|
777
809
|
maxHistoryMessages?: number;
|
|
778
810
|
historyConverter?: ParlantHistoryConverter;
|
|
779
811
|
clientFactory?: ParlantClientFactory;
|
|
@@ -781,6 +813,7 @@ interface ParlantAdapterOptions {
|
|
|
781
813
|
}
|
|
782
814
|
type ParlantClientFactory = () => Promise<ParlantClientLike>;
|
|
783
815
|
declare class ParlantAdapter extends SimpleAdapter<ParlantMessages, MessagingTools> {
|
|
816
|
+
protected readonly provider = "parlant";
|
|
784
817
|
private readonly environment;
|
|
785
818
|
private readonly baseUrl?;
|
|
786
819
|
private readonly agentId;
|
|
@@ -818,9 +851,7 @@ declare class ParlantAdapter extends SimpleAdapter<ParlantMessages, MessagingToo
|
|
|
818
851
|
private createClient;
|
|
819
852
|
}
|
|
820
853
|
|
|
821
|
-
interface LettaMessage {
|
|
822
|
-
role: "user" | "assistant";
|
|
823
|
-
content: string;
|
|
854
|
+
interface LettaMessage extends ChatTurn {
|
|
824
855
|
sender: string;
|
|
825
856
|
senderType: string;
|
|
826
857
|
}
|
|
@@ -922,6 +953,14 @@ interface LettaAdapterOptions {
|
|
|
922
953
|
systemPrompt?: string;
|
|
923
954
|
customSection?: string;
|
|
924
955
|
includeBaseInstructions?: boolean;
|
|
956
|
+
/**
|
|
957
|
+
* Most turns of prior conversation to replay into a new session.
|
|
958
|
+
* Defaults to 100. The value is a cap, not a toggle: `0` replays none.
|
|
959
|
+
*
|
|
960
|
+
* A reply is never replayed without the question it answers, so the result
|
|
961
|
+
* can be one turn shorter than the cap - and `1` replays nothing whenever
|
|
962
|
+
* the newest turn is an answer.
|
|
963
|
+
*/
|
|
925
964
|
maxHistoryMessages?: number;
|
|
926
965
|
emitReasoningEvents?: boolean;
|
|
927
966
|
historyConverter?: LettaHistoryConverter;
|
|
@@ -929,6 +968,7 @@ interface LettaAdapterOptions {
|
|
|
929
968
|
logger?: Logger;
|
|
930
969
|
}
|
|
931
970
|
declare class LettaAdapter extends SimpleAdapter<LettaMessages, AdapterToolsProtocol> {
|
|
971
|
+
protected readonly provider = "letta";
|
|
932
972
|
private readonly model;
|
|
933
973
|
private readonly lettaApiKey?;
|
|
934
974
|
private readonly lettaBaseUrl?;
|
|
@@ -1145,6 +1185,7 @@ interface OpencodeAdapterOptions {
|
|
|
1145
1185
|
logger?: Logger;
|
|
1146
1186
|
}
|
|
1147
1187
|
declare class OpencodeAdapter extends SimpleAdapter<OpencodeSessionState, AdapterToolsProtocol> {
|
|
1188
|
+
protected readonly provider = "opencode";
|
|
1148
1189
|
private readonly config;
|
|
1149
1190
|
private readonly customTools;
|
|
1150
1191
|
private readonly clientFactory;
|
|
@@ -1163,6 +1204,7 @@ declare class OpencodeAdapter extends SimpleAdapter<OpencodeSessionState, Adapte
|
|
|
1163
1204
|
isSessionBootstrap: boolean;
|
|
1164
1205
|
roomId: string;
|
|
1165
1206
|
}): Promise<void>;
|
|
1207
|
+
private startTurn;
|
|
1166
1208
|
onCleanup(roomId: string): Promise<void>;
|
|
1167
1209
|
private getOrCreateRoomState;
|
|
1168
1210
|
private ensureClientStarted;
|
|
@@ -1187,10 +1229,22 @@ declare class OpencodeAdapter extends SimpleAdapter<OpencodeSessionState, Adapte
|
|
|
1187
1229
|
private ensureSession;
|
|
1188
1230
|
private beginTurn;
|
|
1189
1231
|
private watchTurnCompletion;
|
|
1232
|
+
private handleTurnTimeout;
|
|
1233
|
+
private abortAndAbandonSession;
|
|
1234
|
+
private abandonSession;
|
|
1235
|
+
private handleSessionError;
|
|
1236
|
+
private reportTerminalFailure;
|
|
1190
1237
|
private releaseTurnWait;
|
|
1191
1238
|
private finishTurn;
|
|
1239
|
+
private failInteractivePromptDelivery;
|
|
1192
1240
|
private clearTurnState;
|
|
1193
1241
|
private emitSessionTaskEvent;
|
|
1242
|
+
/**
|
|
1243
|
+
* "blocked" and "empty" are both a no-op today, but `deliverFallbackText`
|
|
1244
|
+
* needs to tell them apart: only "empty" means the shared guard already
|
|
1245
|
+
* passed, so it's safe to go on and send its own fallback message.
|
|
1246
|
+
*/
|
|
1247
|
+
private flushTurnText;
|
|
1194
1248
|
private deliverFallbackText;
|
|
1195
1249
|
private reportToolCall;
|
|
1196
1250
|
private reportToolResult;
|
|
@@ -1200,7 +1254,7 @@ declare class OpencodeAdapter extends SimpleAdapter<OpencodeSessionState, Adapte
|
|
|
1200
1254
|
private parsePermissionReply;
|
|
1201
1255
|
private parseQuestionAnswers;
|
|
1202
1256
|
private formatQuestionPrompt;
|
|
1203
|
-
private
|
|
1257
|
+
private toAgentFailure;
|
|
1204
1258
|
private formatOpenCodeError;
|
|
1205
1259
|
}
|
|
1206
1260
|
|
|
@@ -1216,6 +1270,7 @@ interface ClaudeSDKMessageLike {
|
|
|
1216
1270
|
type: string;
|
|
1217
1271
|
session_id?: string;
|
|
1218
1272
|
subtype?: string;
|
|
1273
|
+
is_error?: boolean;
|
|
1219
1274
|
result?: unknown;
|
|
1220
1275
|
summary?: string;
|
|
1221
1276
|
message?: ClaudeAssistantMessage;
|
|
@@ -1252,6 +1307,7 @@ interface ClaudeSDKAdapterOptions {
|
|
|
1252
1307
|
logger?: Logger;
|
|
1253
1308
|
}
|
|
1254
1309
|
declare class ClaudeSDKAdapter extends SimpleAdapter<HistoryProvider, AdapterToolsProtocol> {
|
|
1310
|
+
protected readonly provider = "claude-sdk";
|
|
1255
1311
|
private readonly model;
|
|
1256
1312
|
private readonly customSection?;
|
|
1257
1313
|
private readonly includeBaseInstructions;
|
|
@@ -1276,8 +1332,182 @@ declare class ClaudeSDKAdapter extends SimpleAdapter<HistoryProvider, AdapterToo
|
|
|
1276
1332
|
roomId: string;
|
|
1277
1333
|
}): Promise<void>;
|
|
1278
1334
|
private doMessage;
|
|
1335
|
+
private startQuery;
|
|
1336
|
+
private consumeQueryEvents;
|
|
1279
1337
|
onCleanup(roomId: string): Promise<void>;
|
|
1280
1338
|
private reportSessionId;
|
|
1281
1339
|
}
|
|
1282
1340
|
|
|
1283
|
-
|
|
1341
|
+
interface ACPClientConnectionHandle {
|
|
1342
|
+
connection: ClientSideConnection;
|
|
1343
|
+
stop(): Promise<void>;
|
|
1344
|
+
}
|
|
1345
|
+
type ACPClientConnectionFactory = (client: Client, options: {
|
|
1346
|
+
command: string[];
|
|
1347
|
+
cwd?: string;
|
|
1348
|
+
env?: Record<string, string>;
|
|
1349
|
+
}) => Promise<ACPClientConnectionHandle>;
|
|
1350
|
+
type ACPPermissionRequest = RequestPermissionRequest & {
|
|
1351
|
+
roomId: string;
|
|
1352
|
+
};
|
|
1353
|
+
type ACPPermissionAbandonReason = "timeout" | "room-closed" | "adapter-stopped" | "connection-lost";
|
|
1354
|
+
type ACPPermissionEndReason = ACPPermissionAbandonReason | "settled" | "no-answer";
|
|
1355
|
+
|
|
1356
|
+
interface ACPModeRequest {
|
|
1357
|
+
roomId: string;
|
|
1358
|
+
sessionId: string;
|
|
1359
|
+
currentModeId: string;
|
|
1360
|
+
modes: readonly SessionMode[];
|
|
1361
|
+
}
|
|
1362
|
+
interface ACPModelRequest {
|
|
1363
|
+
roomId: string;
|
|
1364
|
+
sessionId: string;
|
|
1365
|
+
currentModelId: string;
|
|
1366
|
+
models: readonly SessionConfigSelectOption[];
|
|
1367
|
+
}
|
|
1368
|
+
interface ACPConfigRequest {
|
|
1369
|
+
roomId: string;
|
|
1370
|
+
sessionId: string;
|
|
1371
|
+
configOptions: readonly SessionConfigOption[];
|
|
1372
|
+
}
|
|
1373
|
+
type ACPConfigSelections = Readonly<Record<string, string | undefined>>;
|
|
1374
|
+
interface ACPClientAdapterBaseOptions {
|
|
1375
|
+
cwd?: string;
|
|
1376
|
+
env?: Record<string, string>;
|
|
1377
|
+
mcpServers?: McpServer[];
|
|
1378
|
+
authMethod?: string | null;
|
|
1379
|
+
enableMemoryTools?: boolean;
|
|
1380
|
+
enableMcpTools?: boolean;
|
|
1381
|
+
additionalMcpTools?: McpToolRegistration[];
|
|
1382
|
+
clientCapabilities?: ClientCapabilities;
|
|
1383
|
+
connectionFactory?: ACPClientConnectionFactory;
|
|
1384
|
+
resolvePermission?: (request: ACPPermissionRequest, signal: AbortSignal) => Promise<string | undefined>;
|
|
1385
|
+
permissionTimeoutMs?: number;
|
|
1386
|
+
turnTimeoutMs?: number;
|
|
1387
|
+
resolveSessionMode?: (request: ACPModeRequest, signal: AbortSignal) => Promise<string | undefined>;
|
|
1388
|
+
resolveSessionConfig?: (request: ACPConfigRequest, signal: AbortSignal) => Promise<ACPConfigSelections | undefined>;
|
|
1389
|
+
resolveSessionModel?: (request: ACPModelRequest, signal: AbortSignal) => Promise<string | undefined>;
|
|
1390
|
+
logger?: Logger;
|
|
1391
|
+
}
|
|
1392
|
+
interface ACPClientStdioOptions extends ACPClientAdapterBaseOptions {
|
|
1393
|
+
command: string | string[];
|
|
1394
|
+
host?: never;
|
|
1395
|
+
port?: never;
|
|
1396
|
+
}
|
|
1397
|
+
interface ACPClientTcpOptions extends ACPClientAdapterBaseOptions {
|
|
1398
|
+
command?: never;
|
|
1399
|
+
host: string;
|
|
1400
|
+
port: number;
|
|
1401
|
+
}
|
|
1402
|
+
type ACPClientAdapterOptions = ACPClientStdioOptions | ACPClientTcpOptions;
|
|
1403
|
+
declare class ACPClientAdapter extends SimpleAdapter<ACPClientSessionState, AdapterToolsProtocol> {
|
|
1404
|
+
protected readonly provider: string;
|
|
1405
|
+
private readonly command;
|
|
1406
|
+
private readonly cwd;
|
|
1407
|
+
private readonly env?;
|
|
1408
|
+
private readonly mcpServers;
|
|
1409
|
+
private readonly authMethod?;
|
|
1410
|
+
private readonly enableMemoryTools;
|
|
1411
|
+
private readonly enableMcpTools;
|
|
1412
|
+
private readonly additionalMcpTools;
|
|
1413
|
+
private readonly clientCapabilities?;
|
|
1414
|
+
private readonly connectionFactory?;
|
|
1415
|
+
private readonly tcpEndpoint;
|
|
1416
|
+
private readonly roomToSession;
|
|
1417
|
+
private readonly sessionToRoom;
|
|
1418
|
+
private readonly roomTools;
|
|
1419
|
+
private readonly activeSessions;
|
|
1420
|
+
private readonly bootstrappedSessions;
|
|
1421
|
+
private readonly abandonedSessions;
|
|
1422
|
+
private readonly pendingPermissions;
|
|
1423
|
+
private readonly sessionsInFlight;
|
|
1424
|
+
private readonly roomTurnLocks;
|
|
1425
|
+
private readonly roomGeneration;
|
|
1426
|
+
private readonly resolvePermission?;
|
|
1427
|
+
private readonly resolveSessionMode?;
|
|
1428
|
+
private readonly resolveSessionModel?;
|
|
1429
|
+
private readonly resolveSessionConfig?;
|
|
1430
|
+
private readonly permissionTimeoutMs;
|
|
1431
|
+
private readonly turnTimeoutMs;
|
|
1432
|
+
private readonly logger;
|
|
1433
|
+
private backend;
|
|
1434
|
+
private backendPromise;
|
|
1435
|
+
private client;
|
|
1436
|
+
private connectionHandle;
|
|
1437
|
+
private pendingConnectionStop;
|
|
1438
|
+
private connection;
|
|
1439
|
+
private connectionState;
|
|
1440
|
+
private started;
|
|
1441
|
+
private systemPrompt;
|
|
1442
|
+
private spawnPromise;
|
|
1443
|
+
private connectionGeneration;
|
|
1444
|
+
constructor(options: ACPClientAdapterOptions);
|
|
1445
|
+
onStarted(agentName: string, agentDescription: string): Promise<void>;
|
|
1446
|
+
onMessage(message: PlatformMessage, tools: AdapterToolsProtocol, history: ACPClientSessionState, participantsMessage: string | null, contactsMessage: string | null, context: {
|
|
1447
|
+
isSessionBootstrap: boolean;
|
|
1448
|
+
roomId: string;
|
|
1449
|
+
}): Promise<void>;
|
|
1450
|
+
private runTurn;
|
|
1451
|
+
private abandonTimedOutTurn;
|
|
1452
|
+
private withRoomTurnLock;
|
|
1453
|
+
onCleanup(roomId: string): Promise<void>;
|
|
1454
|
+
onRuntimeStop(): Promise<void>;
|
|
1455
|
+
stop(): Promise<void>;
|
|
1456
|
+
private rehydrate;
|
|
1457
|
+
private linkSession;
|
|
1458
|
+
private nextRoomGeneration;
|
|
1459
|
+
private isCurrentGeneration;
|
|
1460
|
+
private raceAgainstConnectionClose;
|
|
1461
|
+
private unlinkRoom;
|
|
1462
|
+
private unlinkOwner;
|
|
1463
|
+
private sessionKey;
|
|
1464
|
+
private ensureConnection;
|
|
1465
|
+
private spawnConnection;
|
|
1466
|
+
private getOrCreateSession;
|
|
1467
|
+
private establishSession;
|
|
1468
|
+
private configureSessionConfig;
|
|
1469
|
+
private linkOrAbandon;
|
|
1470
|
+
private configureSessionMode;
|
|
1471
|
+
private configureSessionModel;
|
|
1472
|
+
private resolveManualSelection;
|
|
1473
|
+
private tryRestoreSession;
|
|
1474
|
+
private buildSessionMcpServers;
|
|
1475
|
+
private getOrCreateBackend;
|
|
1476
|
+
private createBackend;
|
|
1477
|
+
private buildSystemContext;
|
|
1478
|
+
private routePermissionRequest;
|
|
1479
|
+
private handlePermissionRequest;
|
|
1480
|
+
private toResponse;
|
|
1481
|
+
private safeWarn;
|
|
1482
|
+
private resolveManually;
|
|
1483
|
+
private discardLateAnswer;
|
|
1484
|
+
private abandon;
|
|
1485
|
+
private trackPending;
|
|
1486
|
+
private untrackPending;
|
|
1487
|
+
private cancelPendingPermissions;
|
|
1488
|
+
private cancelAllPendingPermissions;
|
|
1489
|
+
private pruneConnectionGeneration;
|
|
1490
|
+
private flushChunks;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
declare const DEFAULT_OMP_ACP_COMMAND: readonly ["omp", "acp"];
|
|
1494
|
+
interface OmpACPAdapterOptions extends Omit<ACPClientStdioOptions, "command"> {
|
|
1495
|
+
command?: string | string[];
|
|
1496
|
+
}
|
|
1497
|
+
declare class OmpACPAdapter extends ACPClientAdapter {
|
|
1498
|
+
protected readonly provider = "omp-acp";
|
|
1499
|
+
constructor(options?: OmpACPAdapterOptions);
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
declare const DEFAULT_COPILOT_ACP_COMMAND: readonly ["copilot", "--acp", "--stdio"];
|
|
1503
|
+
interface CopilotACPStdioOptions extends Omit<ACPClientStdioOptions, "command"> {
|
|
1504
|
+
command?: string | string[];
|
|
1505
|
+
}
|
|
1506
|
+
type CopilotACPTcpOptions = ACPClientTcpOptions;
|
|
1507
|
+
type CopilotACPAdapterOptions = CopilotACPStdioOptions | CopilotACPTcpOptions;
|
|
1508
|
+
declare class CopilotACPAdapter extends ACPClientAdapter {
|
|
1509
|
+
protected readonly provider = "copilot-acp";
|
|
1510
|
+
constructor(options?: CopilotACPAdapterOptions);
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
export { type ToolCallingModel as $, A2AAdapter as A, type CopilotACPTcpOptions as B, CODEX_REASONING_EFFORTS as C, DEFAULT_COPILOT_ACP_COMMAND as D, DEFAULT_OMP_ACP_COMMAND as E, type GeminiAdapterOptions as F, GeminiAdapter as G, GenericAdapter as H, type GenericAdapterHandler as I, GoogleADKAdapter as J, type GoogleADKAdapterOptions as K, LangGraphAdapter as L, type LangGraphAdapterOptions as M, type LangGraphGraph as N, LettaAdapter as O, type LettaAdapterOptions as P, OmpACPAdapter as Q, type OmpACPAdapterOptions as R, OpenAIAdapter as S, type OpenAIAdapterOptions as T, OpencodeAdapter as U, type OpencodeAdapterConfig as V, type OpencodeApprovalMode as W, type OpencodeApprovalReply as X, type OpencodeQuestionMode as Y, ParlantAdapter as Z, type ParlantAdapterOptions as _, type A2AAdapterOptions as a, VercelAISDKAdapter as a0, type VercelAISDKAdapterOptions as a1, type A2AClientFactory as a2, type A2AClientLike as a3, type ACPPermissionAbandonReason as a4, type ACPPermissionEndReason as a5, type ACPPermissionRequest as a6, type AnthropicClientFactory as a7, AnthropicToolCallingModel as a8, type AnthropicToolCallingModelOptions as a9, type OpenAIToolCallingModelOptions as aA, type OpencodeClientLike as aB, type ParlantClientFactory as aC, type ParlantClientLike as aD, type ToolCall as aE, ToolCallingAdapter as aF, type ToolCallingAdapterOptions as aG, type ToolCallingModelRequest as aH, type ToolCallingResponse as aI, type ToolResult as aJ, type TurnStartParams as aK, VercelAISDKToolCallingModel as aL, type VercelAISDKToolCallingModelOptions as aM, runSingleToolRound as aN, type ClaudeSDKQuery as aa, type ClaudeSDKQueryParams as ab, CodexAppServerStdioClient as ac, type CodexClientLike as ad, CodexJsonRpcError as ae, type DynamicToolCallParams as af, type DynamicToolCallResponse as ag, type DynamicToolSpec as ah, type GeminiClientFactory as ai, GeminiToolCallingModel as aj, type GeminiToolCallingModelOptions as ak, HttpOpencodeClient as al, type HttpOpencodeClientOptions as am, HttpStatusError as an, type LettaAgentCreateParams as ao, type LettaClientFactory as ap, type LettaClientLike as aq, LettaHistoryConverter as ar, type LettaMessage as as, type LettaMessageCreateParams as at, type LettaMessages as au, type LettaRequestOptions as av, type LettaResponse as aw, type LettaResponseMessage as ax, type OpenAIClientFactory as ay, OpenAIToolCallingModel as az, A2AGatewayAdapter as b, ACPClientAdapter as c, type ACPClientAdapterBaseOptions as d, type ACPClientAdapterOptions as e, type ACPClientStdioOptions as f, type ACPClientTcpOptions as g, type ACPConfigRequest as h, type ACPConfigSelections as i, AnthropicAdapter as j, type AnthropicAdapterOptions as k, CODEX_REASONING_SUMMARIES as l, CODEX_WEB_SEARCH_MODES as m, type ClaudePermissionMode as n, ClaudeSDKAdapter as o, type ClaudeSDKAdapterOptions as p, CodexAdapter as q, type CodexAdapterConfig as r, type CodexApprovalPolicy as s, type CodexReasoningEffort as t, type CodexReasoningSummary as u, type CodexSandboxMode as v, type CodexWebSearchMode as w, CopilotACPAdapter as x, type CopilotACPAdapterOptions as y, type CopilotACPStdioOptions as z };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { H as HistoryConverter } from './protocols-
|
|
2
|
-
import { R as RestApi } from './types-
|
|
1
|
+
import { H as HistoryConverter } from './protocols-CabgO52c.cjs';
|
|
2
|
+
import { R as RestApi } from './types-42-HWeX8.cjs';
|
|
3
|
+
import { L as Logger } from './logger-CABQOnlR.cjs';
|
|
3
4
|
|
|
4
5
|
interface GoogleADKMessage {
|
|
5
6
|
role: "user" | "model";
|
|
@@ -118,6 +119,7 @@ interface GatewayServerOptions {
|
|
|
118
119
|
onRequest: (request: GatewayRequest) => AsyncIterable<GatewayA2AStatusUpdateEvent>;
|
|
119
120
|
onCancel?: (request: GatewayCancelRequest) => Promise<void>;
|
|
120
121
|
loadModules?: () => Promise<unknown>;
|
|
122
|
+
logger?: Logger;
|
|
121
123
|
}
|
|
122
124
|
type GatewayServerFactory = (options: GatewayServerOptions) => GatewayServerLike;
|
|
123
125
|
interface A2AGatewayAdapterOptions {
|
|
@@ -131,11 +133,21 @@ interface A2AGatewayAdapterOptions {
|
|
|
131
133
|
peerPageSize?: number;
|
|
132
134
|
maxPeerPages?: number;
|
|
133
135
|
serverFactory?: GatewayServerFactory;
|
|
136
|
+
logger?: Logger;
|
|
134
137
|
}
|
|
135
138
|
|
|
136
|
-
interface
|
|
139
|
+
interface ChatTurn {
|
|
137
140
|
role: "user" | "assistant";
|
|
138
141
|
content: string;
|
|
142
|
+
/**
|
|
143
|
+
* Display name of whoever produced the turn. Optional so a caller with no
|
|
144
|
+
* notion of per-turn identity still satisfies the constraint; both adapter
|
|
145
|
+
* message types supply it.
|
|
146
|
+
*/
|
|
147
|
+
sender?: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
interface ParlantMessage extends ChatTurn {
|
|
139
151
|
sender: string;
|
|
140
152
|
senderType: string;
|
|
141
153
|
}
|
|
@@ -156,4 +168,11 @@ declare class OpencodeHistoryConverter {
|
|
|
156
168
|
}
|
|
157
169
|
declare function extractOpencodeSessionId(raw: Array<Record<string, unknown>>): string | null;
|
|
158
170
|
|
|
159
|
-
|
|
171
|
+
interface ACPClientSessionState {
|
|
172
|
+
roomToSession: Record<string, string>;
|
|
173
|
+
}
|
|
174
|
+
declare class ACPClientHistoryConverter implements HistoryConverter<ACPClientSessionState> {
|
|
175
|
+
convert(raw: Array<Record<string, unknown>>): ACPClientSessionState;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export { type A2AAuth as A, type ChatTurn as C, type GatewaySessionState as G, OpencodeHistoryConverter as O, ParlantHistoryConverter as P, type A2AGatewayAdapterOptions as a, type GatewayServerLike as b, type GatewayServerOptions as c, A2AHistoryConverter as d, type A2ASessionState as e, type GatewayA2AMessage as f, type GatewayA2AStatusUpdateEvent as g, type GatewayCancelRequest as h, type GatewayPeer as i, type GatewayRequest as j, type GatewayServerFactory as k, type GatewayTaskState as l, type ParlantMessage as m, type ParlantMessages as n, type PendingA2ATask as o, buildA2AAuthHeaders as p, ACPClientHistoryConverter as q, type ACPClientSessionState as r, GoogleADKHistoryConverter as s, type GoogleADKMessage as t, type GoogleADKMessages as u, type OpencodeSessionState as v, extractGoogleAdkSessionId as w, extractOpencodeSessionId as x };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { H as HistoryConverter } from './protocols-
|
|
2
|
-
import { R as RestApi } from './types-
|
|
1
|
+
import { H as HistoryConverter } from './protocols-Dpci6uae.js';
|
|
2
|
+
import { R as RestApi } from './types-CjxZekMH.js';
|
|
3
|
+
import { L as Logger } from './logger-CABQOnlR.js';
|
|
3
4
|
|
|
4
5
|
interface GoogleADKMessage {
|
|
5
6
|
role: "user" | "model";
|
|
@@ -118,6 +119,7 @@ interface GatewayServerOptions {
|
|
|
118
119
|
onRequest: (request: GatewayRequest) => AsyncIterable<GatewayA2AStatusUpdateEvent>;
|
|
119
120
|
onCancel?: (request: GatewayCancelRequest) => Promise<void>;
|
|
120
121
|
loadModules?: () => Promise<unknown>;
|
|
122
|
+
logger?: Logger;
|
|
121
123
|
}
|
|
122
124
|
type GatewayServerFactory = (options: GatewayServerOptions) => GatewayServerLike;
|
|
123
125
|
interface A2AGatewayAdapterOptions {
|
|
@@ -131,11 +133,21 @@ interface A2AGatewayAdapterOptions {
|
|
|
131
133
|
peerPageSize?: number;
|
|
132
134
|
maxPeerPages?: number;
|
|
133
135
|
serverFactory?: GatewayServerFactory;
|
|
136
|
+
logger?: Logger;
|
|
134
137
|
}
|
|
135
138
|
|
|
136
|
-
interface
|
|
139
|
+
interface ChatTurn {
|
|
137
140
|
role: "user" | "assistant";
|
|
138
141
|
content: string;
|
|
142
|
+
/**
|
|
143
|
+
* Display name of whoever produced the turn. Optional so a caller with no
|
|
144
|
+
* notion of per-turn identity still satisfies the constraint; both adapter
|
|
145
|
+
* message types supply it.
|
|
146
|
+
*/
|
|
147
|
+
sender?: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
interface ParlantMessage extends ChatTurn {
|
|
139
151
|
sender: string;
|
|
140
152
|
senderType: string;
|
|
141
153
|
}
|
|
@@ -156,4 +168,11 @@ declare class OpencodeHistoryConverter {
|
|
|
156
168
|
}
|
|
157
169
|
declare function extractOpencodeSessionId(raw: Array<Record<string, unknown>>): string | null;
|
|
158
170
|
|
|
159
|
-
|
|
171
|
+
interface ACPClientSessionState {
|
|
172
|
+
roomToSession: Record<string, string>;
|
|
173
|
+
}
|
|
174
|
+
declare class ACPClientHistoryConverter implements HistoryConverter<ACPClientSessionState> {
|
|
175
|
+
convert(raw: Array<Record<string, unknown>>): ACPClientSessionState;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export { type A2AAuth as A, type ChatTurn as C, type GatewaySessionState as G, OpencodeHistoryConverter as O, ParlantHistoryConverter as P, type A2AGatewayAdapterOptions as a, type GatewayServerLike as b, type GatewayServerOptions as c, A2AHistoryConverter as d, type A2ASessionState as e, type GatewayA2AMessage as f, type GatewayA2AStatusUpdateEvent as g, type GatewayCancelRequest as h, type GatewayPeer as i, type GatewayRequest as j, type GatewayServerFactory as k, type GatewayTaskState as l, type ParlantMessage as m, type ParlantMessages as n, type PendingA2ATask as o, buildA2AAuthHeaders as p, ACPClientHistoryConverter as q, type ACPClientSessionState as r, GoogleADKHistoryConverter as s, type GoogleADKMessage as t, type GoogleADKMessages as u, type OpencodeSessionState as v, extractGoogleAdkSessionId as w, extractOpencodeSessionId as x };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { H as HistoryConverter } from './protocols-Dpci6uae.js';
|
|
2
|
+
import { G as GatewaySessionState } from './acp-client-DUXyczlF.js';
|
|
3
|
+
|
|
4
|
+
declare class GatewayHistoryConverter implements HistoryConverter<GatewaySessionState> {
|
|
5
|
+
convert(raw: Array<Record<string, unknown>>): GatewaySessionState;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ACPServerSessionState {
|
|
9
|
+
sessionToRoom: Record<string, string>;
|
|
10
|
+
sessionCwd: Record<string, string>;
|
|
11
|
+
sessionMcpServers: Record<string, Array<Record<string, unknown>>>;
|
|
12
|
+
}
|
|
13
|
+
declare class ACPServerHistoryConverter implements HistoryConverter<ACPServerSessionState> {
|
|
14
|
+
convert(raw: Array<Record<string, unknown>>): ACPServerSessionState;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { type ACPServerSessionState as A, GatewayHistoryConverter as G, ACPServerHistoryConverter as a };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { H as HistoryConverter } from './protocols-CabgO52c.cjs';
|
|
2
|
+
import { G as GatewaySessionState } from './acp-client-D-I_5lK-.cjs';
|
|
3
|
+
|
|
4
|
+
declare class GatewayHistoryConverter implements HistoryConverter<GatewaySessionState> {
|
|
5
|
+
convert(raw: Array<Record<string, unknown>>): GatewaySessionState;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ACPServerSessionState {
|
|
9
|
+
sessionToRoom: Record<string, string>;
|
|
10
|
+
sessionCwd: Record<string, string>;
|
|
11
|
+
sessionMcpServers: Record<string, Array<Record<string, unknown>>>;
|
|
12
|
+
}
|
|
13
|
+
declare class ACPServerHistoryConverter implements HistoryConverter<ACPServerSessionState> {
|
|
14
|
+
convert(raw: Array<Record<string, unknown>>): ACPServerSessionState;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { type ACPServerSessionState as A, GatewayHistoryConverter as G, ACPServerHistoryConverter as a };
|