@band-ai/sdk 0.1.2 → 0.1.6
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/dist/{CodexAdapter-A1k_LMdZ.d.ts → ClaudeSDKAdapter-BHOkjN3X.d.ts} +222 -222
- package/dist/{CodexAdapter-BbZD-nBd.d.cts → ClaudeSDKAdapter-CRq4R-WB.d.cts} +222 -222
- package/dist/adapters.cjs +375 -275
- package/dist/adapters.d.cts +21 -21
- package/dist/adapters.d.ts +21 -21
- package/dist/adapters.js +1512 -13
- package/dist/{backends-C4n6cKOf.d.ts → backends-CzDbiQar.d.ts} +1 -1
- package/dist/{backends-BnOLsG7w.d.cts → backends-SVMT-7l4.d.cts} +1 -1
- package/dist/chunk-FYVLUGW7.js +59 -0
- package/dist/{chunk-6AJA2OPC.js → chunk-I5EZG52P.js} +11 -4
- package/dist/{chunk-NIAQBANR.js → chunk-MSL6CWHY.js} +1 -1
- package/dist/{chunk-A3TDK6GP.js → chunk-RHVH2GZR.js} +4589 -5993
- package/dist/{chunk-FUODYQRE.js → chunk-W5NDZSYE.js} +2 -59
- package/dist/converters.d.cts +1 -1
- package/dist/converters.d.ts +1 -1
- package/dist/converters.js +5 -3
- package/dist/index.cjs +7161 -7116
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -6
- package/dist/mcp-claude.cjs +4 -6
- package/dist/mcp-claude.d.cts +1 -1
- package/dist/mcp-claude.d.ts +1 -1
- package/dist/mcp-claude.js +47 -5
- package/dist/mcp.d.cts +3 -3
- package/dist/mcp.d.ts +3 -3
- package/dist/mcp.js +1 -1
- package/dist/runtime.cjs +11 -4
- package/dist/runtime.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-5CXIMAH2.js +0 -52
- package/dist/chunk-LY55KYVI.js +0 -0
- package/dist/sdk-HJUVSSWA.js +0 -10
- package/dist/{history-ByessXNq.d.ts → acp-server-B1Da7L6u.d.ts} +4 -4
- package/dist/{history-i6yN7neC.d.cts → acp-server-BdRz9_UN.d.cts} +4 -4
- /package/dist/{claude-CcnQ5OUC.d.ts → sdk-CcnQ5OUC.d.ts} +0 -0
- /package/dist/{claude-CwTAxhwI.d.cts → sdk-CwTAxhwI.d.cts} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { S as SimpleAdapter } from './simpleAdapter-DqhvjsGr.cjs';
|
|
2
|
-
import { A as AdapterToolsProtocol, c as MessagingTools, T as ToolExecutor, f as ToolSchemaProvider, H as HistoryConverter
|
|
2
|
+
import { A as AdapterToolsProtocol, a as AgentToolsProtocol, c as MessagingTools, T as ToolExecutor, f as ToolSchemaProvider, H as HistoryConverter } from './protocols-CInhtFpA.cjs';
|
|
3
3
|
import { H as HistoryProvider, P as PlatformMessage } from './types-CovcHpYf.cjs';
|
|
4
4
|
import { L as Logger } from './logger-CABQOnlR.cjs';
|
|
5
5
|
import { C as CustomToolDef } from './customTools-BzF0IISO.cjs';
|
|
6
6
|
import { m as ToolModelMessage, n as ToolModelSchema, M as MetadataMap } from './dtos-DUpbIu8k.cjs';
|
|
7
7
|
import { s as GoogleADKMessages, q as GoogleADKHistoryConverter, e as A2ASessionState, A as A2AAuth, G as GatewaySessionState, a as A2AGatewayAdapterOptions, n as ParlantMessages, P as ParlantHistoryConverter, t as OpencodeSessionState, O as OpencodeHistoryConverter } from './opencode-BBcDchcN.cjs';
|
|
8
|
-
import { c as createThenvoiMcpBackend } from './backends-
|
|
9
|
-
import { M as McpToolRegistration } from './
|
|
8
|
+
import { c as createThenvoiMcpBackend } from './backends-SVMT-7l4.cjs';
|
|
9
|
+
import { M as McpToolRegistration } from './sdk-CwTAxhwI.cjs';
|
|
10
10
|
|
|
11
11
|
type GenericAdapterHandler = (args: {
|
|
12
12
|
message: PlatformMessage;
|
|
@@ -28,6 +28,225 @@ declare class GenericAdapter extends SimpleAdapter<HistoryProvider> {
|
|
|
28
28
|
}): Promise<void>;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
32
|
+
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
33
|
+
[key: string]: JsonValue;
|
|
34
|
+
};
|
|
35
|
+
type RequestId = number | string;
|
|
36
|
+
type CodexApprovalPolicy = "never" | "on-request" | "on-failure" | "untrusted" | {
|
|
37
|
+
reject: {
|
|
38
|
+
sandbox_approval: boolean;
|
|
39
|
+
rules: boolean;
|
|
40
|
+
mcp_elicitations: boolean;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
type CodexSandboxMode = "read-only" | "workspace-write" | "danger-full-access";
|
|
44
|
+
type CodexReasoningSummary = "auto" | "concise" | "detailed" | "none";
|
|
45
|
+
interface DynamicToolSpec {
|
|
46
|
+
name: string;
|
|
47
|
+
description: string;
|
|
48
|
+
inputSchema: JsonValue;
|
|
49
|
+
}
|
|
50
|
+
interface InitializeParams {
|
|
51
|
+
clientInfo: {
|
|
52
|
+
name: string;
|
|
53
|
+
title: string;
|
|
54
|
+
version: string;
|
|
55
|
+
};
|
|
56
|
+
capabilities: {
|
|
57
|
+
experimentalApi: boolean;
|
|
58
|
+
optOutNotificationMethods?: string[] | null;
|
|
59
|
+
} | null;
|
|
60
|
+
}
|
|
61
|
+
interface TextUserInput {
|
|
62
|
+
type: "text";
|
|
63
|
+
text: string;
|
|
64
|
+
}
|
|
65
|
+
interface LocalImageUserInput {
|
|
66
|
+
type: "local_image";
|
|
67
|
+
path: string;
|
|
68
|
+
}
|
|
69
|
+
type UserInput = TextUserInput | LocalImageUserInput;
|
|
70
|
+
interface TurnStartParams {
|
|
71
|
+
threadId: string;
|
|
72
|
+
input: UserInput[];
|
|
73
|
+
cwd?: string | null;
|
|
74
|
+
approvalPolicy?: CodexApprovalPolicy | null;
|
|
75
|
+
model?: string | null;
|
|
76
|
+
effort?: "none" | "low" | "medium" | "high" | "xhigh" | null;
|
|
77
|
+
summary?: CodexReasoningSummary | null;
|
|
78
|
+
}
|
|
79
|
+
interface DynamicToolCallParams {
|
|
80
|
+
threadId: string;
|
|
81
|
+
turnId: string;
|
|
82
|
+
callId: string;
|
|
83
|
+
tool: string;
|
|
84
|
+
arguments: JsonValue;
|
|
85
|
+
}
|
|
86
|
+
interface DynamicToolCallOutputContentItem {
|
|
87
|
+
type: "inputText" | "inputImage";
|
|
88
|
+
text?: string;
|
|
89
|
+
imageUrl?: string;
|
|
90
|
+
}
|
|
91
|
+
interface DynamicToolCallResponse {
|
|
92
|
+
contentItems: DynamicToolCallOutputContentItem[];
|
|
93
|
+
success: boolean;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
interface CodexRpcRequestEvent {
|
|
97
|
+
kind: "request";
|
|
98
|
+
id: RequestId;
|
|
99
|
+
method: string;
|
|
100
|
+
params: unknown;
|
|
101
|
+
}
|
|
102
|
+
interface CodexRpcNotificationEvent {
|
|
103
|
+
kind: "notification";
|
|
104
|
+
method: string;
|
|
105
|
+
params: unknown;
|
|
106
|
+
}
|
|
107
|
+
type CodexRpcEvent = CodexRpcRequestEvent | CodexRpcNotificationEvent;
|
|
108
|
+
interface CodexClientLike {
|
|
109
|
+
connect(): Promise<void>;
|
|
110
|
+
initialize(params: InitializeParams): Promise<void>;
|
|
111
|
+
request<TResult>(method: string, params?: Record<string, unknown>): Promise<TResult>;
|
|
112
|
+
notify(method: string, params?: Record<string, unknown>): Promise<void>;
|
|
113
|
+
respond(requestId: RequestId, result: Record<string, unknown> | DynamicToolCallResponse): Promise<void>;
|
|
114
|
+
respondError(requestId: RequestId, code: number, message: string, data?: unknown): Promise<void>;
|
|
115
|
+
recvEvent(timeoutMs?: number): Promise<CodexRpcEvent>;
|
|
116
|
+
close(): Promise<void>;
|
|
117
|
+
}
|
|
118
|
+
declare class CodexJsonRpcError extends Error {
|
|
119
|
+
readonly code: number;
|
|
120
|
+
readonly data: unknown;
|
|
121
|
+
constructor(code: number, message: string, data?: unknown);
|
|
122
|
+
}
|
|
123
|
+
declare class CodexAppServerStdioClient implements CodexClientLike {
|
|
124
|
+
private readonly command;
|
|
125
|
+
private readonly cwd?;
|
|
126
|
+
private readonly env?;
|
|
127
|
+
private readonly logger;
|
|
128
|
+
private process;
|
|
129
|
+
private stdoutLines;
|
|
130
|
+
private events;
|
|
131
|
+
private waiters;
|
|
132
|
+
private pending;
|
|
133
|
+
private nextRequestId;
|
|
134
|
+
private closed;
|
|
135
|
+
constructor(options?: {
|
|
136
|
+
command?: readonly string[];
|
|
137
|
+
cwd?: string;
|
|
138
|
+
env?: Record<string, string>;
|
|
139
|
+
logger?: Logger;
|
|
140
|
+
});
|
|
141
|
+
connect(): Promise<void>;
|
|
142
|
+
initialize(params: InitializeParams): Promise<void>;
|
|
143
|
+
request<TResult>(method: string, params?: Record<string, unknown>): Promise<TResult>;
|
|
144
|
+
notify(method: string, params?: Record<string, unknown>): Promise<void>;
|
|
145
|
+
respond(requestId: RequestId, result: Record<string, unknown> | DynamicToolCallResponse): Promise<void>;
|
|
146
|
+
respondError(requestId: RequestId, code: number, message: string, data?: unknown): Promise<void>;
|
|
147
|
+
recvEvent(timeoutMs?: number): Promise<CodexRpcEvent>;
|
|
148
|
+
close(): Promise<void>;
|
|
149
|
+
private sendJson;
|
|
150
|
+
private handleLine;
|
|
151
|
+
private pushEvent;
|
|
152
|
+
private removeWaiter;
|
|
153
|
+
private failAll;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
declare const CODEX_WEB_SEARCH_MODES: readonly ["disabled", "cached", "live"];
|
|
157
|
+
type CodexWebSearchMode = (typeof CODEX_WEB_SEARCH_MODES)[number];
|
|
158
|
+
declare const CODEX_REASONING_SUMMARIES: readonly ["auto", "concise", "detailed", "none"];
|
|
159
|
+
declare const CODEX_REASONING_EFFORTS: readonly ["low", "medium", "high", "xhigh"];
|
|
160
|
+
type CodexReasoningEffort = (typeof CODEX_REASONING_EFFORTS)[number];
|
|
161
|
+
interface CodexAdapterConfig {
|
|
162
|
+
model?: string;
|
|
163
|
+
cwd?: string;
|
|
164
|
+
approvalPolicy?: CodexApprovalPolicy;
|
|
165
|
+
sandboxMode?: CodexSandboxMode;
|
|
166
|
+
reasoningEffort?: CodexReasoningEffort;
|
|
167
|
+
reasoningSummary?: CodexReasoningSummary;
|
|
168
|
+
networkAccessEnabled?: boolean;
|
|
169
|
+
webSearchMode?: CodexWebSearchMode;
|
|
170
|
+
skipGitRepoCheck?: boolean;
|
|
171
|
+
enableExecutionReporting?: boolean;
|
|
172
|
+
emitThoughtEvents?: boolean;
|
|
173
|
+
maxHistoryMessages?: number;
|
|
174
|
+
enableLocalCommands?: boolean;
|
|
175
|
+
includeBaseInstructions?: boolean;
|
|
176
|
+
debug?: boolean;
|
|
177
|
+
customSection?: string;
|
|
178
|
+
/**
|
|
179
|
+
* Full system prompt override.
|
|
180
|
+
* When set, this bypasses the default Thenvoi prompt template + customSection.
|
|
181
|
+
*/
|
|
182
|
+
systemPrompt?: string;
|
|
183
|
+
experimentalApi?: boolean;
|
|
184
|
+
fallbackSendAgentText?: boolean;
|
|
185
|
+
clientName?: string;
|
|
186
|
+
clientTitle?: string;
|
|
187
|
+
clientVersion?: string;
|
|
188
|
+
turnTimeoutMs?: number;
|
|
189
|
+
codexCommand?: readonly string[];
|
|
190
|
+
codexEnv?: Record<string, string>;
|
|
191
|
+
}
|
|
192
|
+
interface CodexFactory {
|
|
193
|
+
(): Promise<CodexClientLike>;
|
|
194
|
+
}
|
|
195
|
+
interface CodexAdapterOptions {
|
|
196
|
+
config?: CodexAdapterConfig;
|
|
197
|
+
customTools?: CustomToolDef[];
|
|
198
|
+
includeMemoryTools?: boolean;
|
|
199
|
+
factory?: CodexFactory;
|
|
200
|
+
logger?: Logger;
|
|
201
|
+
}
|
|
202
|
+
declare class CodexAdapter extends SimpleAdapter<HistoryProvider, AgentToolsProtocol> {
|
|
203
|
+
private readonly baseConfig;
|
|
204
|
+
private readonly roomConfigOverrides;
|
|
205
|
+
private readonly customTools;
|
|
206
|
+
private readonly customToolIndex;
|
|
207
|
+
private readonly includeMemoryTools;
|
|
208
|
+
private readonly factoryOverride?;
|
|
209
|
+
private readonly logger;
|
|
210
|
+
private readonly debugEnabled;
|
|
211
|
+
private client;
|
|
212
|
+
private clientPromise;
|
|
213
|
+
private lastInitFailure;
|
|
214
|
+
private readonly roomThreadIds;
|
|
215
|
+
private readonly roomThreadInitPromises;
|
|
216
|
+
private readonly needsHistoryInjection;
|
|
217
|
+
private systemPrompt;
|
|
218
|
+
constructor(options?: CodexAdapterOptions);
|
|
219
|
+
onStarted(agentName: string, agentDescription: string): Promise<void>;
|
|
220
|
+
onMessage(message: PlatformMessage, tools: AgentToolsProtocol, history: HistoryProvider, participantsMessage: string | null, contactsMessage: string | null, context: {
|
|
221
|
+
isSessionBootstrap: boolean;
|
|
222
|
+
roomId: string;
|
|
223
|
+
}): Promise<void>;
|
|
224
|
+
onCleanup(roomId: string): Promise<void>;
|
|
225
|
+
onRuntimeStop(): Promise<void>;
|
|
226
|
+
private getConfig;
|
|
227
|
+
private ensureSystemPrompt;
|
|
228
|
+
private ensureClient;
|
|
229
|
+
private resetClient;
|
|
230
|
+
private debug;
|
|
231
|
+
private getOrCreateThread;
|
|
232
|
+
private buildThreadStartParams;
|
|
233
|
+
private buildThreadResumeParams;
|
|
234
|
+
private buildThreadConfigOverrides;
|
|
235
|
+
private buildDynamicTools;
|
|
236
|
+
private buildTurnInput;
|
|
237
|
+
private formatHistoryContext;
|
|
238
|
+
private sendThreadMappingEvent;
|
|
239
|
+
private handleServerRequest;
|
|
240
|
+
private emitItemCompletedEvents;
|
|
241
|
+
private extractToolItem;
|
|
242
|
+
private extractThoughtText;
|
|
243
|
+
private emitTurnOutcome;
|
|
244
|
+
private extractTurnError;
|
|
245
|
+
private currentMention;
|
|
246
|
+
private handleLocalCommand;
|
|
247
|
+
private safeSendEvent;
|
|
248
|
+
}
|
|
249
|
+
|
|
31
250
|
interface ToolCall {
|
|
32
251
|
id: string;
|
|
33
252
|
name: string;
|
|
@@ -1056,223 +1275,4 @@ declare class ClaudeSDKAdapter extends SimpleAdapter<HistoryProvider, AdapterToo
|
|
|
1056
1275
|
private reportSessionId;
|
|
1057
1276
|
}
|
|
1058
1277
|
|
|
1059
|
-
type JsonPrimitive = string | number | boolean | null;
|
|
1060
|
-
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
1061
|
-
[key: string]: JsonValue;
|
|
1062
|
-
};
|
|
1063
|
-
type RequestId = number | string;
|
|
1064
|
-
type CodexApprovalPolicy = "never" | "on-request" | "on-failure" | "untrusted" | {
|
|
1065
|
-
reject: {
|
|
1066
|
-
sandbox_approval: boolean;
|
|
1067
|
-
rules: boolean;
|
|
1068
|
-
mcp_elicitations: boolean;
|
|
1069
|
-
};
|
|
1070
|
-
};
|
|
1071
|
-
type CodexSandboxMode = "read-only" | "workspace-write" | "danger-full-access";
|
|
1072
|
-
type CodexReasoningSummary = "auto" | "concise" | "detailed" | "none";
|
|
1073
|
-
interface DynamicToolSpec {
|
|
1074
|
-
name: string;
|
|
1075
|
-
description: string;
|
|
1076
|
-
inputSchema: JsonValue;
|
|
1077
|
-
}
|
|
1078
|
-
interface InitializeParams {
|
|
1079
|
-
clientInfo: {
|
|
1080
|
-
name: string;
|
|
1081
|
-
title: string;
|
|
1082
|
-
version: string;
|
|
1083
|
-
};
|
|
1084
|
-
capabilities: {
|
|
1085
|
-
experimentalApi: boolean;
|
|
1086
|
-
optOutNotificationMethods?: string[] | null;
|
|
1087
|
-
} | null;
|
|
1088
|
-
}
|
|
1089
|
-
interface TextUserInput {
|
|
1090
|
-
type: "text";
|
|
1091
|
-
text: string;
|
|
1092
|
-
}
|
|
1093
|
-
interface LocalImageUserInput {
|
|
1094
|
-
type: "local_image";
|
|
1095
|
-
path: string;
|
|
1096
|
-
}
|
|
1097
|
-
type UserInput = TextUserInput | LocalImageUserInput;
|
|
1098
|
-
interface TurnStartParams {
|
|
1099
|
-
threadId: string;
|
|
1100
|
-
input: UserInput[];
|
|
1101
|
-
cwd?: string | null;
|
|
1102
|
-
approvalPolicy?: CodexApprovalPolicy | null;
|
|
1103
|
-
model?: string | null;
|
|
1104
|
-
effort?: "none" | "low" | "medium" | "high" | "xhigh" | null;
|
|
1105
|
-
summary?: CodexReasoningSummary | null;
|
|
1106
|
-
}
|
|
1107
|
-
interface DynamicToolCallParams {
|
|
1108
|
-
threadId: string;
|
|
1109
|
-
turnId: string;
|
|
1110
|
-
callId: string;
|
|
1111
|
-
tool: string;
|
|
1112
|
-
arguments: JsonValue;
|
|
1113
|
-
}
|
|
1114
|
-
interface DynamicToolCallOutputContentItem {
|
|
1115
|
-
type: "inputText" | "inputImage";
|
|
1116
|
-
text?: string;
|
|
1117
|
-
imageUrl?: string;
|
|
1118
|
-
}
|
|
1119
|
-
interface DynamicToolCallResponse {
|
|
1120
|
-
contentItems: DynamicToolCallOutputContentItem[];
|
|
1121
|
-
success: boolean;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
interface CodexRpcRequestEvent {
|
|
1125
|
-
kind: "request";
|
|
1126
|
-
id: RequestId;
|
|
1127
|
-
method: string;
|
|
1128
|
-
params: unknown;
|
|
1129
|
-
}
|
|
1130
|
-
interface CodexRpcNotificationEvent {
|
|
1131
|
-
kind: "notification";
|
|
1132
|
-
method: string;
|
|
1133
|
-
params: unknown;
|
|
1134
|
-
}
|
|
1135
|
-
type CodexRpcEvent = CodexRpcRequestEvent | CodexRpcNotificationEvent;
|
|
1136
|
-
interface CodexClientLike {
|
|
1137
|
-
connect(): Promise<void>;
|
|
1138
|
-
initialize(params: InitializeParams): Promise<void>;
|
|
1139
|
-
request<TResult>(method: string, params?: Record<string, unknown>): Promise<TResult>;
|
|
1140
|
-
notify(method: string, params?: Record<string, unknown>): Promise<void>;
|
|
1141
|
-
respond(requestId: RequestId, result: Record<string, unknown> | DynamicToolCallResponse): Promise<void>;
|
|
1142
|
-
respondError(requestId: RequestId, code: number, message: string, data?: unknown): Promise<void>;
|
|
1143
|
-
recvEvent(timeoutMs?: number): Promise<CodexRpcEvent>;
|
|
1144
|
-
close(): Promise<void>;
|
|
1145
|
-
}
|
|
1146
|
-
declare class CodexJsonRpcError extends Error {
|
|
1147
|
-
readonly code: number;
|
|
1148
|
-
readonly data: unknown;
|
|
1149
|
-
constructor(code: number, message: string, data?: unknown);
|
|
1150
|
-
}
|
|
1151
|
-
declare class CodexAppServerStdioClient implements CodexClientLike {
|
|
1152
|
-
private readonly command;
|
|
1153
|
-
private readonly cwd?;
|
|
1154
|
-
private readonly env?;
|
|
1155
|
-
private readonly logger;
|
|
1156
|
-
private process;
|
|
1157
|
-
private stdoutLines;
|
|
1158
|
-
private events;
|
|
1159
|
-
private waiters;
|
|
1160
|
-
private pending;
|
|
1161
|
-
private nextRequestId;
|
|
1162
|
-
private closed;
|
|
1163
|
-
constructor(options?: {
|
|
1164
|
-
command?: readonly string[];
|
|
1165
|
-
cwd?: string;
|
|
1166
|
-
env?: Record<string, string>;
|
|
1167
|
-
logger?: Logger;
|
|
1168
|
-
});
|
|
1169
|
-
connect(): Promise<void>;
|
|
1170
|
-
initialize(params: InitializeParams): Promise<void>;
|
|
1171
|
-
request<TResult>(method: string, params?: Record<string, unknown>): Promise<TResult>;
|
|
1172
|
-
notify(method: string, params?: Record<string, unknown>): Promise<void>;
|
|
1173
|
-
respond(requestId: RequestId, result: Record<string, unknown> | DynamicToolCallResponse): Promise<void>;
|
|
1174
|
-
respondError(requestId: RequestId, code: number, message: string, data?: unknown): Promise<void>;
|
|
1175
|
-
recvEvent(timeoutMs?: number): Promise<CodexRpcEvent>;
|
|
1176
|
-
close(): Promise<void>;
|
|
1177
|
-
private sendJson;
|
|
1178
|
-
private handleLine;
|
|
1179
|
-
private pushEvent;
|
|
1180
|
-
private removeWaiter;
|
|
1181
|
-
private failAll;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
declare const CODEX_WEB_SEARCH_MODES: readonly ["disabled", "cached", "live"];
|
|
1185
|
-
type CodexWebSearchMode = (typeof CODEX_WEB_SEARCH_MODES)[number];
|
|
1186
|
-
declare const CODEX_REASONING_SUMMARIES: readonly ["auto", "concise", "detailed", "none"];
|
|
1187
|
-
declare const CODEX_REASONING_EFFORTS: readonly ["low", "medium", "high", "xhigh"];
|
|
1188
|
-
type CodexReasoningEffort = (typeof CODEX_REASONING_EFFORTS)[number];
|
|
1189
|
-
interface CodexAdapterConfig {
|
|
1190
|
-
model?: string;
|
|
1191
|
-
cwd?: string;
|
|
1192
|
-
approvalPolicy?: CodexApprovalPolicy;
|
|
1193
|
-
sandboxMode?: CodexSandboxMode;
|
|
1194
|
-
reasoningEffort?: CodexReasoningEffort;
|
|
1195
|
-
reasoningSummary?: CodexReasoningSummary;
|
|
1196
|
-
networkAccessEnabled?: boolean;
|
|
1197
|
-
webSearchMode?: CodexWebSearchMode;
|
|
1198
|
-
skipGitRepoCheck?: boolean;
|
|
1199
|
-
enableExecutionReporting?: boolean;
|
|
1200
|
-
emitThoughtEvents?: boolean;
|
|
1201
|
-
maxHistoryMessages?: number;
|
|
1202
|
-
enableLocalCommands?: boolean;
|
|
1203
|
-
includeBaseInstructions?: boolean;
|
|
1204
|
-
debug?: boolean;
|
|
1205
|
-
customSection?: string;
|
|
1206
|
-
/**
|
|
1207
|
-
* Full system prompt override.
|
|
1208
|
-
* When set, this bypasses the default Thenvoi prompt template + customSection.
|
|
1209
|
-
*/
|
|
1210
|
-
systemPrompt?: string;
|
|
1211
|
-
experimentalApi?: boolean;
|
|
1212
|
-
fallbackSendAgentText?: boolean;
|
|
1213
|
-
clientName?: string;
|
|
1214
|
-
clientTitle?: string;
|
|
1215
|
-
clientVersion?: string;
|
|
1216
|
-
turnTimeoutMs?: number;
|
|
1217
|
-
codexCommand?: readonly string[];
|
|
1218
|
-
codexEnv?: Record<string, string>;
|
|
1219
|
-
}
|
|
1220
|
-
interface CodexFactory {
|
|
1221
|
-
(): Promise<CodexClientLike>;
|
|
1222
|
-
}
|
|
1223
|
-
interface CodexAdapterOptions {
|
|
1224
|
-
config?: CodexAdapterConfig;
|
|
1225
|
-
customTools?: CustomToolDef[];
|
|
1226
|
-
includeMemoryTools?: boolean;
|
|
1227
|
-
factory?: CodexFactory;
|
|
1228
|
-
logger?: Logger;
|
|
1229
|
-
}
|
|
1230
|
-
declare class CodexAdapter extends SimpleAdapter<HistoryProvider, AgentToolsProtocol> {
|
|
1231
|
-
private readonly baseConfig;
|
|
1232
|
-
private readonly roomConfigOverrides;
|
|
1233
|
-
private readonly customTools;
|
|
1234
|
-
private readonly customToolIndex;
|
|
1235
|
-
private readonly includeMemoryTools;
|
|
1236
|
-
private readonly factoryOverride?;
|
|
1237
|
-
private readonly logger;
|
|
1238
|
-
private readonly debugEnabled;
|
|
1239
|
-
private client;
|
|
1240
|
-
private clientPromise;
|
|
1241
|
-
private lastInitFailure;
|
|
1242
|
-
private readonly roomThreadIds;
|
|
1243
|
-
private readonly roomThreadInitPromises;
|
|
1244
|
-
private readonly needsHistoryInjection;
|
|
1245
|
-
private systemPrompt;
|
|
1246
|
-
constructor(options?: CodexAdapterOptions);
|
|
1247
|
-
onStarted(agentName: string, agentDescription: string): Promise<void>;
|
|
1248
|
-
onMessage(message: PlatformMessage, tools: AgentToolsProtocol, history: HistoryProvider, participantsMessage: string | null, contactsMessage: string | null, context: {
|
|
1249
|
-
isSessionBootstrap: boolean;
|
|
1250
|
-
roomId: string;
|
|
1251
|
-
}): Promise<void>;
|
|
1252
|
-
onCleanup(roomId: string): Promise<void>;
|
|
1253
|
-
onRuntimeStop(): Promise<void>;
|
|
1254
|
-
private getConfig;
|
|
1255
|
-
private ensureSystemPrompt;
|
|
1256
|
-
private ensureClient;
|
|
1257
|
-
private resetClient;
|
|
1258
|
-
private debug;
|
|
1259
|
-
private getOrCreateThread;
|
|
1260
|
-
private buildThreadStartParams;
|
|
1261
|
-
private buildThreadResumeParams;
|
|
1262
|
-
private buildThreadConfigOverrides;
|
|
1263
|
-
private buildDynamicTools;
|
|
1264
|
-
private buildTurnInput;
|
|
1265
|
-
private formatHistoryContext;
|
|
1266
|
-
private sendThreadMappingEvent;
|
|
1267
|
-
private handleServerRequest;
|
|
1268
|
-
private emitItemCompletedEvents;
|
|
1269
|
-
private extractToolItem;
|
|
1270
|
-
private extractThoughtText;
|
|
1271
|
-
private emitTurnOutcome;
|
|
1272
|
-
private extractTurnError;
|
|
1273
|
-
private currentMention;
|
|
1274
|
-
private handleLocalCommand;
|
|
1275
|
-
private safeSendEvent;
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
1278
|
export { type DynamicToolSpec as $, A2AAdapter as A, OpencodeAdapter as B, CODEX_REASONING_EFFORTS as C, type OpencodeAdapterConfig as D, type OpencodeApprovalMode as E, type OpencodeApprovalReply as F, GeminiAdapter as G, type OpencodeQuestionMode as H, type ParlantAdapterOptions as I, type VercelAISDKAdapterOptions as J, type A2AClientFactory as K, LangGraphAdapter as L, type A2AClientLike as M, type AnthropicClientFactory as N, OpenAIAdapter as O, ParlantAdapter as P, AnthropicToolCallingModel as Q, type AnthropicToolCallingModelOptions as R, type ClaudeSDKQuery as S, type ToolCallingModel as T, type ClaudeSDKQueryParams as U, VercelAISDKAdapter as V, CodexAppServerStdioClient as W, type CodexClientLike as X, CodexJsonRpcError as Y, type DynamicToolCallParams as Z, type DynamicToolCallResponse as _, type A2AAdapterOptions as a, type GeminiClientFactory as a0, GeminiToolCallingModel as a1, type GeminiToolCallingModelOptions as a2, HttpOpencodeClient as a3, type HttpOpencodeClientOptions as a4, HttpStatusError as a5, type LettaAgentCreateParams as a6, type LettaClientFactory as a7, type LettaClientLike as a8, LettaHistoryConverter as a9, type LettaMessage as aa, type LettaMessageCreateParams as ab, type LettaMessages as ac, type LettaRequestOptions as ad, type LettaResponse as ae, type LettaResponseMessage as af, type OpenAIClientFactory as ag, OpenAIToolCallingModel as ah, type OpenAIToolCallingModelOptions as ai, type OpencodeClientLike as aj, type ParlantClientFactory as ak, type ParlantClientLike as al, type ToolCall as am, ToolCallingAdapter as an, type ToolCallingAdapterOptions as ao, type ToolCallingModelRequest as ap, type ToolCallingResponse as aq, type ToolResult as ar, type TurnStartParams as as, VercelAISDKToolCallingModel as at, type VercelAISDKToolCallingModelOptions as au, runSingleToolRound as av, A2AGatewayAdapter as b, AnthropicAdapter as c, type AnthropicAdapterOptions as d, CODEX_REASONING_SUMMARIES as e, CODEX_WEB_SEARCH_MODES as f, type ClaudePermissionMode as g, ClaudeSDKAdapter as h, type ClaudeSDKAdapterOptions as i, CodexAdapter as j, type CodexAdapterConfig as k, type CodexApprovalPolicy as l, type CodexReasoningEffort as m, type CodexReasoningSummary as n, type CodexSandboxMode as o, type CodexWebSearchMode as p, type GeminiAdapterOptions as q, GenericAdapter as r, type GenericAdapterHandler as s, GoogleADKAdapter as t, type GoogleADKAdapterOptions as u, type LangGraphAdapterOptions as v, type LangGraphGraph as w, LettaAdapter as x, type LettaAdapterOptions as y, type OpenAIAdapterOptions as z };
|