@easbot/acp 0.0.0-stage → 0.3.29
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/LICENSE +21 -0
- package/README.en.md +495 -0
- package/README.md +616 -2
- package/dist/chunks/bootstrap-5LQOAO3Q.cjs +1 -0
- package/dist/chunks/bootstrap-VXDGNMPK.mjs +1 -0
- package/dist/chunks/cache-EJ4Y2PSY.cjs +1 -0
- package/dist/chunks/cache-SOYLU2DS.mjs +1 -0
- package/dist/chunks/chunk-3OTURNTA.cjs +11 -0
- package/dist/chunks/chunk-CIOYWMQM.cjs +1 -0
- package/dist/chunks/chunk-DS4SO4NN.cjs +2 -0
- package/dist/chunks/chunk-ER7EK5Z3.mjs +8 -0
- package/dist/chunks/chunk-F44AHCPJ.cjs +8 -0
- package/dist/chunks/chunk-HA3RF4AE.cjs +1 -0
- package/dist/chunks/chunk-HQBRVVXS.mjs +1 -0
- package/dist/chunks/chunk-M2YU5LAI.cjs +1 -0
- package/dist/chunks/chunk-MFINI6BI.mjs +1 -0
- package/dist/chunks/chunk-PEMSMRYT.mjs +1 -0
- package/dist/chunks/chunk-RTXRNSMY.mjs +1 -0
- package/dist/chunks/chunk-SHXWJMFY.mjs +11 -0
- package/dist/chunks/chunk-UTBY7IJT.mjs +2 -0
- package/dist/chunks/chunk-Z4D2PWDQ.cjs +1 -0
- package/dist/chunks/cli-handler-2KK2I4DG.mjs +1 -0
- package/dist/chunks/cli-handler-EM2BY47U.cjs +1 -0
- package/dist/chunks/config-KX5CSYLV.mjs +1 -0
- package/dist/chunks/config-YIR7GKPG.cjs +1 -0
- package/dist/chunks/interfaces-6BMD3FTB.cjs +1 -0
- package/dist/chunks/interfaces-UB3BFHJN.mjs +1 -0
- package/dist/chunks/types-CHN33Z37.mjs +1 -0
- package/dist/chunks/types-XGBPFI7X.cjs +1 -0
- package/dist/cli.cjs +2 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.mjs +2 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +1247 -0
- package/dist/index.d.ts +1247 -0
- package/dist/index.mjs +1 -0
- package/package.json +87 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1247 @@
|
|
|
1
|
+
import { ACPInfoACPConfig, ACPClientConfig, ACPClientsConfig, ACPServerConfig as ACPServerConfig$1, IGlobal, IInstance, ChannelType } from '@easbot/types';
|
|
2
|
+
export { ACPAgentRuntimeConfig, ACPAgentRuntimeConfigSchema, ACPClientConfig, ACPClientConfigSchema, ACPClientsConfig, ACPClientsConfigSchema, ACPConnectionConfig, ACPConnectionConfigSchema, ACPHttpConnectionConfig, ACPHttpConnectionConfigSchema, ACPInfoACPClientsConfig, ACPInfoACPClientsConfigSchema, ACPInfoACPConfig, ACPInfoACPConfigSchema, ACPInfoACPServerConfig, ACPInfoACPServerConfigSchema, ACPModelConfig, ACPModelConfigSchema, ACPParsePartialConfig, ACPServerConfig, ACPServerConfigSchema, ACPStdioConnectionConfig, ACPStdioConnectionConfigSchema, ACPValidateConfig, ACPWebSocketConnectionConfig, ACPWebSocketConnectionConfigSchema, ACP_DEFAULT_CLIENT_CONFIG, ACP_DEFAULT_SERVER_CONFIG, ChannelType } from '@easbot/types';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
import { NameErrors as NameErrors$1, ACPSubscriber, EasServer } from '@easbot/utils';
|
|
5
|
+
export { ServiceError, ServiceError as ServiceErrorInstance } from '@easbot/utils';
|
|
6
|
+
import { EasbotClient, ContextMode } from '@easbot/sdk';
|
|
7
|
+
import { AvailableCommand, SessionConfigOption, SessionNotification, McpServer, Agent, AgentSideConnection, InitializeRequest, InitializeResponse, AuthenticateRequest, AuthenticateResponse, NewSessionRequest, NewSessionResponse, LoadSessionRequest, LoadSessionResponse, PromptRequest, PromptResponse, CancelNotification, ForkSessionRequest, ForkSessionResponse, ResumeSessionRequest, ResumeSessionResponse, ListSessionsRequest, ListSessionsResponse, SetSessionModeRequest, SetSessionModeResponse, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, CloseSessionRequest, CloseSessionResponse } from '@agentclientprotocol/sdk';
|
|
8
|
+
|
|
9
|
+
type TranslationResources = {
|
|
10
|
+
translation: Record<string, string>;
|
|
11
|
+
cli?: Record<string, string>;
|
|
12
|
+
marketplace?: Record<string, string>;
|
|
13
|
+
workflow?: Record<string, string>;
|
|
14
|
+
mcp?: Record<string, string>;
|
|
15
|
+
};
|
|
16
|
+
declare const languages: {
|
|
17
|
+
value: string;
|
|
18
|
+
name: string;
|
|
19
|
+
example: string;
|
|
20
|
+
supported: boolean;
|
|
21
|
+
}[];
|
|
22
|
+
declare const LanguagesSupported: string[];
|
|
23
|
+
declare const I18n: {
|
|
24
|
+
readonly defaultLocale: "zh-CN";
|
|
25
|
+
readonly timeZone: "Asia/Shanghai";
|
|
26
|
+
readonly locales: string[];
|
|
27
|
+
};
|
|
28
|
+
type Locale = (typeof I18n)['locales'][number];
|
|
29
|
+
type TypeWithI18N<T = string> = {
|
|
30
|
+
[K in Locale]?: T;
|
|
31
|
+
} & {
|
|
32
|
+
zh_CN?: T;
|
|
33
|
+
en_US?: T;
|
|
34
|
+
[key: string]: T | undefined;
|
|
35
|
+
};
|
|
36
|
+
declare const registerI18nResources: (locale: Locale, resources: TranslationResources) => TranslationResources;
|
|
37
|
+
declare const initI18n: (locale?: Locale) => {
|
|
38
|
+
locale: string;
|
|
39
|
+
resources: TranslationResources;
|
|
40
|
+
};
|
|
41
|
+
declare const changeI18nLanguage: (locale: Locale) => {
|
|
42
|
+
locale: string;
|
|
43
|
+
resources: TranslationResources;
|
|
44
|
+
};
|
|
45
|
+
declare const getRegisteredResources: (locale: Locale) => TranslationResources | undefined;
|
|
46
|
+
|
|
47
|
+
interface TranslateOptions {
|
|
48
|
+
locale?: Locale;
|
|
49
|
+
vars?: Record<string, any>;
|
|
50
|
+
fallback?: string;
|
|
51
|
+
}
|
|
52
|
+
declare const translate: (key: string, options?: TranslateOptions) => string;
|
|
53
|
+
declare const t: (key: string, options?: TranslateOptions) => string;
|
|
54
|
+
interface FormatLogOptions extends TranslateOptions {
|
|
55
|
+
context?: Record<string, any>;
|
|
56
|
+
}
|
|
57
|
+
declare const formatLog: (key: string, options?: FormatLogOptions) => {
|
|
58
|
+
message: string;
|
|
59
|
+
locale: string;
|
|
60
|
+
context: Record<string, any>;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
interface AcpConfigStateResult {
|
|
64
|
+
config: ACPInfoACPConfig;
|
|
65
|
+
directories: string[];
|
|
66
|
+
}
|
|
67
|
+
declare function loadConfig(): Promise<ACPInfoACPConfig>;
|
|
68
|
+
declare function getConfig(): ACPInfoACPConfig | null;
|
|
69
|
+
declare function isConfigLoaded(): boolean;
|
|
70
|
+
declare function clearConfigCache(): void;
|
|
71
|
+
declare function getConfigDirectory(): string;
|
|
72
|
+
declare function reloadConfig(): Promise<ACPInfoACPConfig>;
|
|
73
|
+
declare function getServerConfig(): Promise<ACPServerConfig$1>;
|
|
74
|
+
declare function getClientsConfig(): Promise<ACPClientsConfig>;
|
|
75
|
+
declare function getClientById(clientId: string): Promise<ACPClientConfig | undefined>;
|
|
76
|
+
declare function getDefaultClient(): Promise<ACPClientConfig | undefined>;
|
|
77
|
+
declare function getGatewayClientUrl(): Promise<string | undefined>;
|
|
78
|
+
|
|
79
|
+
declare const ACP_JSON_REL_PATH: readonly [".easbot", "acp.json"];
|
|
80
|
+
type StateResult = {
|
|
81
|
+
acpJson: ACPInfoACPConfig | undefined;
|
|
82
|
+
exists: boolean;
|
|
83
|
+
rootDir: string;
|
|
84
|
+
};
|
|
85
|
+
declare namespace AcpCache {
|
|
86
|
+
function state(): Promise<StateResult>;
|
|
87
|
+
function resetState(): void;
|
|
88
|
+
function init(): Promise<void>;
|
|
89
|
+
function getAcpJson(): Promise<Record<string, unknown> | undefined>;
|
|
90
|
+
function exists(): Promise<boolean>;
|
|
91
|
+
function getRootDir(): Promise<string>;
|
|
92
|
+
function writeAcpJson(partial: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
93
|
+
function getConfigPath(): Promise<string>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare const NameErrors: typeof NameErrors$1;
|
|
97
|
+
declare namespace AcpError {
|
|
98
|
+
const ConfigNotFoundError: {
|
|
99
|
+
new (data: {
|
|
100
|
+
message: string;
|
|
101
|
+
path: string;
|
|
102
|
+
}, options?: ErrorOptions): {
|
|
103
|
+
readonly name: "AcpConfigNotFoundError";
|
|
104
|
+
readonly data: {
|
|
105
|
+
message: string;
|
|
106
|
+
path: string;
|
|
107
|
+
};
|
|
108
|
+
schema(): z.ZodObject<{
|
|
109
|
+
name: z.ZodLiteral<"AcpConfigNotFoundError">;
|
|
110
|
+
data: z.ZodObject<{
|
|
111
|
+
message: z.ZodString;
|
|
112
|
+
path: z.ZodString;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
toObject(): {
|
|
116
|
+
name: "AcpConfigNotFoundError";
|
|
117
|
+
data: {
|
|
118
|
+
message: string;
|
|
119
|
+
path: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
message: string;
|
|
123
|
+
stack?: string;
|
|
124
|
+
cause?: unknown;
|
|
125
|
+
};
|
|
126
|
+
readonly Schema: z.ZodObject<{
|
|
127
|
+
name: z.ZodLiteral<"AcpConfigNotFoundError">;
|
|
128
|
+
data: z.ZodObject<{
|
|
129
|
+
message: z.ZodString;
|
|
130
|
+
path: z.ZodString;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
isInstance(input: any): input is InstanceType<any>;
|
|
134
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
135
|
+
readonly Unknown: {
|
|
136
|
+
new (data: {
|
|
137
|
+
message: string;
|
|
138
|
+
}, options?: ErrorOptions): {
|
|
139
|
+
readonly name: "UnknownError";
|
|
140
|
+
readonly data: {
|
|
141
|
+
message: string;
|
|
142
|
+
};
|
|
143
|
+
schema(): z.ZodObject<{
|
|
144
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
145
|
+
data: z.ZodObject<{
|
|
146
|
+
message: z.ZodString;
|
|
147
|
+
}, z.core.$strip>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
toObject(): {
|
|
150
|
+
name: "UnknownError";
|
|
151
|
+
data: {
|
|
152
|
+
message: string;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
message: string;
|
|
156
|
+
stack?: string;
|
|
157
|
+
cause?: unknown;
|
|
158
|
+
};
|
|
159
|
+
readonly Schema: z.ZodObject<{
|
|
160
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
161
|
+
data: z.ZodObject<{
|
|
162
|
+
message: z.ZodString;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
isInstance(input: any): input is {
|
|
166
|
+
readonly name: "UnknownError";
|
|
167
|
+
readonly data: {
|
|
168
|
+
message: string;
|
|
169
|
+
};
|
|
170
|
+
schema(): z.ZodObject<{
|
|
171
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
172
|
+
data: z.ZodObject<{
|
|
173
|
+
message: z.ZodString;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
toObject(): {
|
|
177
|
+
name: "UnknownError";
|
|
178
|
+
data: {
|
|
179
|
+
message: string;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
message: string;
|
|
183
|
+
stack?: string;
|
|
184
|
+
cause?: unknown;
|
|
185
|
+
};
|
|
186
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
187
|
+
readonly Unknown: any;
|
|
188
|
+
isError(error: unknown): error is Error;
|
|
189
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
190
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
191
|
+
stackTraceLimit: number;
|
|
192
|
+
};
|
|
193
|
+
isError(error: unknown): error is Error;
|
|
194
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
195
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
196
|
+
stackTraceLimit: number;
|
|
197
|
+
};
|
|
198
|
+
const ConfigValidationError: {
|
|
199
|
+
new (data: {
|
|
200
|
+
message: string;
|
|
201
|
+
path?: string | undefined;
|
|
202
|
+
}, options?: ErrorOptions): {
|
|
203
|
+
readonly name: "AcpConfigValidationError";
|
|
204
|
+
readonly data: {
|
|
205
|
+
message: string;
|
|
206
|
+
path?: string | undefined;
|
|
207
|
+
};
|
|
208
|
+
schema(): z.ZodObject<{
|
|
209
|
+
name: z.ZodLiteral<"AcpConfigValidationError">;
|
|
210
|
+
data: z.ZodObject<{
|
|
211
|
+
message: z.ZodString;
|
|
212
|
+
path: z.ZodOptional<z.ZodString>;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
toObject(): {
|
|
216
|
+
name: "AcpConfigValidationError";
|
|
217
|
+
data: {
|
|
218
|
+
message: string;
|
|
219
|
+
path?: string | undefined;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
message: string;
|
|
223
|
+
stack?: string;
|
|
224
|
+
cause?: unknown;
|
|
225
|
+
};
|
|
226
|
+
readonly Schema: z.ZodObject<{
|
|
227
|
+
name: z.ZodLiteral<"AcpConfigValidationError">;
|
|
228
|
+
data: z.ZodObject<{
|
|
229
|
+
message: z.ZodString;
|
|
230
|
+
path: z.ZodOptional<z.ZodString>;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
isInstance(input: any): input is InstanceType<any>;
|
|
234
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
235
|
+
readonly Unknown: {
|
|
236
|
+
new (data: {
|
|
237
|
+
message: string;
|
|
238
|
+
}, options?: ErrorOptions): {
|
|
239
|
+
readonly name: "UnknownError";
|
|
240
|
+
readonly data: {
|
|
241
|
+
message: string;
|
|
242
|
+
};
|
|
243
|
+
schema(): z.ZodObject<{
|
|
244
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
245
|
+
data: z.ZodObject<{
|
|
246
|
+
message: z.ZodString;
|
|
247
|
+
}, z.core.$strip>;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
toObject(): {
|
|
250
|
+
name: "UnknownError";
|
|
251
|
+
data: {
|
|
252
|
+
message: string;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
message: string;
|
|
256
|
+
stack?: string;
|
|
257
|
+
cause?: unknown;
|
|
258
|
+
};
|
|
259
|
+
readonly Schema: z.ZodObject<{
|
|
260
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
261
|
+
data: z.ZodObject<{
|
|
262
|
+
message: z.ZodString;
|
|
263
|
+
}, z.core.$strip>;
|
|
264
|
+
}, z.core.$strip>;
|
|
265
|
+
isInstance(input: any): input is {
|
|
266
|
+
readonly name: "UnknownError";
|
|
267
|
+
readonly data: {
|
|
268
|
+
message: string;
|
|
269
|
+
};
|
|
270
|
+
schema(): z.ZodObject<{
|
|
271
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
272
|
+
data: z.ZodObject<{
|
|
273
|
+
message: z.ZodString;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
}, z.core.$strip>;
|
|
276
|
+
toObject(): {
|
|
277
|
+
name: "UnknownError";
|
|
278
|
+
data: {
|
|
279
|
+
message: string;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
message: string;
|
|
283
|
+
stack?: string;
|
|
284
|
+
cause?: unknown;
|
|
285
|
+
};
|
|
286
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
287
|
+
readonly Unknown: any;
|
|
288
|
+
isError(error: unknown): error is Error;
|
|
289
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
290
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
291
|
+
stackTraceLimit: number;
|
|
292
|
+
};
|
|
293
|
+
isError(error: unknown): error is Error;
|
|
294
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
295
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
296
|
+
stackTraceLimit: number;
|
|
297
|
+
};
|
|
298
|
+
const ServerStartFailedError: {
|
|
299
|
+
new (data: {
|
|
300
|
+
message: string;
|
|
301
|
+
channel?: string | undefined;
|
|
302
|
+
port?: number | undefined;
|
|
303
|
+
code?: string | undefined;
|
|
304
|
+
}, options?: ErrorOptions): {
|
|
305
|
+
readonly name: "AcpServerStartFailedError";
|
|
306
|
+
readonly data: {
|
|
307
|
+
message: string;
|
|
308
|
+
channel?: string | undefined;
|
|
309
|
+
port?: number | undefined;
|
|
310
|
+
code?: string | undefined;
|
|
311
|
+
};
|
|
312
|
+
schema(): z.ZodObject<{
|
|
313
|
+
name: z.ZodLiteral<"AcpServerStartFailedError">;
|
|
314
|
+
data: z.ZodObject<{
|
|
315
|
+
message: z.ZodString;
|
|
316
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
317
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
318
|
+
code: z.ZodOptional<z.ZodString>;
|
|
319
|
+
}, z.core.$strip>;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
toObject(): {
|
|
322
|
+
name: "AcpServerStartFailedError";
|
|
323
|
+
data: {
|
|
324
|
+
message: string;
|
|
325
|
+
channel?: string | undefined;
|
|
326
|
+
port?: number | undefined;
|
|
327
|
+
code?: string | undefined;
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
message: string;
|
|
331
|
+
stack?: string;
|
|
332
|
+
cause?: unknown;
|
|
333
|
+
};
|
|
334
|
+
readonly Schema: z.ZodObject<{
|
|
335
|
+
name: z.ZodLiteral<"AcpServerStartFailedError">;
|
|
336
|
+
data: z.ZodObject<{
|
|
337
|
+
message: z.ZodString;
|
|
338
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
339
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
340
|
+
code: z.ZodOptional<z.ZodString>;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
}, z.core.$strip>;
|
|
343
|
+
isInstance(input: any): input is InstanceType<any>;
|
|
344
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
345
|
+
readonly Unknown: {
|
|
346
|
+
new (data: {
|
|
347
|
+
message: string;
|
|
348
|
+
}, options?: ErrorOptions): {
|
|
349
|
+
readonly name: "UnknownError";
|
|
350
|
+
readonly data: {
|
|
351
|
+
message: string;
|
|
352
|
+
};
|
|
353
|
+
schema(): z.ZodObject<{
|
|
354
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
355
|
+
data: z.ZodObject<{
|
|
356
|
+
message: z.ZodString;
|
|
357
|
+
}, z.core.$strip>;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
toObject(): {
|
|
360
|
+
name: "UnknownError";
|
|
361
|
+
data: {
|
|
362
|
+
message: string;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
message: string;
|
|
366
|
+
stack?: string;
|
|
367
|
+
cause?: unknown;
|
|
368
|
+
};
|
|
369
|
+
readonly Schema: z.ZodObject<{
|
|
370
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
371
|
+
data: z.ZodObject<{
|
|
372
|
+
message: z.ZodString;
|
|
373
|
+
}, z.core.$strip>;
|
|
374
|
+
}, z.core.$strip>;
|
|
375
|
+
isInstance(input: any): input is {
|
|
376
|
+
readonly name: "UnknownError";
|
|
377
|
+
readonly data: {
|
|
378
|
+
message: string;
|
|
379
|
+
};
|
|
380
|
+
schema(): z.ZodObject<{
|
|
381
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
382
|
+
data: z.ZodObject<{
|
|
383
|
+
message: z.ZodString;
|
|
384
|
+
}, z.core.$strip>;
|
|
385
|
+
}, z.core.$strip>;
|
|
386
|
+
toObject(): {
|
|
387
|
+
name: "UnknownError";
|
|
388
|
+
data: {
|
|
389
|
+
message: string;
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
message: string;
|
|
393
|
+
stack?: string;
|
|
394
|
+
cause?: unknown;
|
|
395
|
+
};
|
|
396
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
397
|
+
readonly Unknown: any;
|
|
398
|
+
isError(error: unknown): error is Error;
|
|
399
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
400
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
401
|
+
stackTraceLimit: number;
|
|
402
|
+
};
|
|
403
|
+
isError(error: unknown): error is Error;
|
|
404
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
405
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
406
|
+
stackTraceLimit: number;
|
|
407
|
+
};
|
|
408
|
+
const ClientConnectionFailedError: {
|
|
409
|
+
new (data: {
|
|
410
|
+
message: string;
|
|
411
|
+
clientId?: string | undefined;
|
|
412
|
+
channel?: string | undefined;
|
|
413
|
+
code?: string | undefined;
|
|
414
|
+
}, options?: ErrorOptions): {
|
|
415
|
+
readonly name: "AcpClientConnectionFailedError";
|
|
416
|
+
readonly data: {
|
|
417
|
+
message: string;
|
|
418
|
+
clientId?: string | undefined;
|
|
419
|
+
channel?: string | undefined;
|
|
420
|
+
code?: string | undefined;
|
|
421
|
+
};
|
|
422
|
+
schema(): z.ZodObject<{
|
|
423
|
+
name: z.ZodLiteral<"AcpClientConnectionFailedError">;
|
|
424
|
+
data: z.ZodObject<{
|
|
425
|
+
message: z.ZodString;
|
|
426
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
427
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
428
|
+
code: z.ZodOptional<z.ZodString>;
|
|
429
|
+
}, z.core.$strip>;
|
|
430
|
+
}, z.core.$strip>;
|
|
431
|
+
toObject(): {
|
|
432
|
+
name: "AcpClientConnectionFailedError";
|
|
433
|
+
data: {
|
|
434
|
+
message: string;
|
|
435
|
+
clientId?: string | undefined;
|
|
436
|
+
channel?: string | undefined;
|
|
437
|
+
code?: string | undefined;
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
message: string;
|
|
441
|
+
stack?: string;
|
|
442
|
+
cause?: unknown;
|
|
443
|
+
};
|
|
444
|
+
readonly Schema: z.ZodObject<{
|
|
445
|
+
name: z.ZodLiteral<"AcpClientConnectionFailedError">;
|
|
446
|
+
data: z.ZodObject<{
|
|
447
|
+
message: z.ZodString;
|
|
448
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
449
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
450
|
+
code: z.ZodOptional<z.ZodString>;
|
|
451
|
+
}, z.core.$strip>;
|
|
452
|
+
}, z.core.$strip>;
|
|
453
|
+
isInstance(input: any): input is InstanceType<any>;
|
|
454
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
455
|
+
readonly Unknown: {
|
|
456
|
+
new (data: {
|
|
457
|
+
message: string;
|
|
458
|
+
}, options?: ErrorOptions): {
|
|
459
|
+
readonly name: "UnknownError";
|
|
460
|
+
readonly data: {
|
|
461
|
+
message: string;
|
|
462
|
+
};
|
|
463
|
+
schema(): z.ZodObject<{
|
|
464
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
465
|
+
data: z.ZodObject<{
|
|
466
|
+
message: z.ZodString;
|
|
467
|
+
}, z.core.$strip>;
|
|
468
|
+
}, z.core.$strip>;
|
|
469
|
+
toObject(): {
|
|
470
|
+
name: "UnknownError";
|
|
471
|
+
data: {
|
|
472
|
+
message: string;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
message: string;
|
|
476
|
+
stack?: string;
|
|
477
|
+
cause?: unknown;
|
|
478
|
+
};
|
|
479
|
+
readonly Schema: z.ZodObject<{
|
|
480
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
481
|
+
data: z.ZodObject<{
|
|
482
|
+
message: z.ZodString;
|
|
483
|
+
}, z.core.$strip>;
|
|
484
|
+
}, z.core.$strip>;
|
|
485
|
+
isInstance(input: any): input is {
|
|
486
|
+
readonly name: "UnknownError";
|
|
487
|
+
readonly data: {
|
|
488
|
+
message: string;
|
|
489
|
+
};
|
|
490
|
+
schema(): z.ZodObject<{
|
|
491
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
492
|
+
data: z.ZodObject<{
|
|
493
|
+
message: z.ZodString;
|
|
494
|
+
}, z.core.$strip>;
|
|
495
|
+
}, z.core.$strip>;
|
|
496
|
+
toObject(): {
|
|
497
|
+
name: "UnknownError";
|
|
498
|
+
data: {
|
|
499
|
+
message: string;
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
message: string;
|
|
503
|
+
stack?: string;
|
|
504
|
+
cause?: unknown;
|
|
505
|
+
};
|
|
506
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
507
|
+
readonly Unknown: any;
|
|
508
|
+
isError(error: unknown): error is Error;
|
|
509
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
510
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
511
|
+
stackTraceLimit: number;
|
|
512
|
+
};
|
|
513
|
+
isError(error: unknown): error is Error;
|
|
514
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
515
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
516
|
+
stackTraceLimit: number;
|
|
517
|
+
};
|
|
518
|
+
const RpcParseFailedError: {
|
|
519
|
+
new (data: {
|
|
520
|
+
message: string;
|
|
521
|
+
frame?: string | undefined;
|
|
522
|
+
method?: string | undefined;
|
|
523
|
+
}, options?: ErrorOptions): {
|
|
524
|
+
readonly name: "AcpRpcParseFailedError";
|
|
525
|
+
readonly data: {
|
|
526
|
+
message: string;
|
|
527
|
+
frame?: string | undefined;
|
|
528
|
+
method?: string | undefined;
|
|
529
|
+
};
|
|
530
|
+
schema(): z.ZodObject<{
|
|
531
|
+
name: z.ZodLiteral<"AcpRpcParseFailedError">;
|
|
532
|
+
data: z.ZodObject<{
|
|
533
|
+
message: z.ZodString;
|
|
534
|
+
frame: z.ZodOptional<z.ZodString>;
|
|
535
|
+
method: z.ZodOptional<z.ZodString>;
|
|
536
|
+
}, z.core.$strip>;
|
|
537
|
+
}, z.core.$strip>;
|
|
538
|
+
toObject(): {
|
|
539
|
+
name: "AcpRpcParseFailedError";
|
|
540
|
+
data: {
|
|
541
|
+
message: string;
|
|
542
|
+
frame?: string | undefined;
|
|
543
|
+
method?: string | undefined;
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
message: string;
|
|
547
|
+
stack?: string;
|
|
548
|
+
cause?: unknown;
|
|
549
|
+
};
|
|
550
|
+
readonly Schema: z.ZodObject<{
|
|
551
|
+
name: z.ZodLiteral<"AcpRpcParseFailedError">;
|
|
552
|
+
data: z.ZodObject<{
|
|
553
|
+
message: z.ZodString;
|
|
554
|
+
frame: z.ZodOptional<z.ZodString>;
|
|
555
|
+
method: z.ZodOptional<z.ZodString>;
|
|
556
|
+
}, z.core.$strip>;
|
|
557
|
+
}, z.core.$strip>;
|
|
558
|
+
isInstance(input: any): input is InstanceType<any>;
|
|
559
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
560
|
+
readonly Unknown: {
|
|
561
|
+
new (data: {
|
|
562
|
+
message: string;
|
|
563
|
+
}, options?: ErrorOptions): {
|
|
564
|
+
readonly name: "UnknownError";
|
|
565
|
+
readonly data: {
|
|
566
|
+
message: string;
|
|
567
|
+
};
|
|
568
|
+
schema(): z.ZodObject<{
|
|
569
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
570
|
+
data: z.ZodObject<{
|
|
571
|
+
message: z.ZodString;
|
|
572
|
+
}, z.core.$strip>;
|
|
573
|
+
}, z.core.$strip>;
|
|
574
|
+
toObject(): {
|
|
575
|
+
name: "UnknownError";
|
|
576
|
+
data: {
|
|
577
|
+
message: string;
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
message: string;
|
|
581
|
+
stack?: string;
|
|
582
|
+
cause?: unknown;
|
|
583
|
+
};
|
|
584
|
+
readonly Schema: z.ZodObject<{
|
|
585
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
586
|
+
data: z.ZodObject<{
|
|
587
|
+
message: z.ZodString;
|
|
588
|
+
}, z.core.$strip>;
|
|
589
|
+
}, z.core.$strip>;
|
|
590
|
+
isInstance(input: any): input is {
|
|
591
|
+
readonly name: "UnknownError";
|
|
592
|
+
readonly data: {
|
|
593
|
+
message: string;
|
|
594
|
+
};
|
|
595
|
+
schema(): z.ZodObject<{
|
|
596
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
597
|
+
data: z.ZodObject<{
|
|
598
|
+
message: z.ZodString;
|
|
599
|
+
}, z.core.$strip>;
|
|
600
|
+
}, z.core.$strip>;
|
|
601
|
+
toObject(): {
|
|
602
|
+
name: "UnknownError";
|
|
603
|
+
data: {
|
|
604
|
+
message: string;
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
message: string;
|
|
608
|
+
stack?: string;
|
|
609
|
+
cause?: unknown;
|
|
610
|
+
};
|
|
611
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
612
|
+
readonly Unknown: any;
|
|
613
|
+
isError(error: unknown): error is Error;
|
|
614
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
615
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
616
|
+
stackTraceLimit: number;
|
|
617
|
+
};
|
|
618
|
+
isError(error: unknown): error is Error;
|
|
619
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
620
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
621
|
+
stackTraceLimit: number;
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
declare const ACP_BUSINESS_CODES: ReadonlySet<string>;
|
|
625
|
+
declare const ACP_BUSINESS_HINTS: Readonly<Record<string, string>>;
|
|
626
|
+
declare function registerBusinessErrors(): Promise<void>;
|
|
627
|
+
|
|
628
|
+
interface CommandHelp {
|
|
629
|
+
i18nKey: string;
|
|
630
|
+
name: string;
|
|
631
|
+
description: string;
|
|
632
|
+
group: 'lifecycle' | 'server' | 'external';
|
|
633
|
+
}
|
|
634
|
+
declare const COMMANDS_HELP: readonly CommandHelp[];
|
|
635
|
+
interface AcpCliDeps {
|
|
636
|
+
version: string;
|
|
637
|
+
cwd?: string;
|
|
638
|
+
locale?: string;
|
|
639
|
+
}
|
|
640
|
+
interface AcpCliResult {
|
|
641
|
+
code: number;
|
|
642
|
+
handled: boolean;
|
|
643
|
+
command: string | null;
|
|
644
|
+
}
|
|
645
|
+
declare function renderBanner(): void;
|
|
646
|
+
declare function renderHelp(): void;
|
|
647
|
+
declare function handleAcpCli(args: string[], deps?: AcpCliDeps): Promise<AcpCliResult>;
|
|
648
|
+
|
|
649
|
+
declare function setGlobalAdapter(global: IGlobal | null): void;
|
|
650
|
+
declare function resetGlobalAdapter(): void;
|
|
651
|
+
declare function getGlobal(): IGlobal;
|
|
652
|
+
declare function setInstanceAdapter(instance: IInstance | null): void;
|
|
653
|
+
declare function resetInstanceAdapter(): void;
|
|
654
|
+
declare function getInstance(): IInstance;
|
|
655
|
+
declare function setEasbotClientAdapter(client: EasbotClient | null): Promise<void>;
|
|
656
|
+
declare function resetEasbotClientAdapter(): Promise<void>;
|
|
657
|
+
declare function getSdk(): Promise<EasbotClient>;
|
|
658
|
+
declare function getHomeDir(): string;
|
|
659
|
+
declare function getXdgData(): string;
|
|
660
|
+
declare function getWorktree(): string;
|
|
661
|
+
declare function getProjectDirectory(): string;
|
|
662
|
+
|
|
663
|
+
interface ConnectionState {
|
|
664
|
+
localAgentId: string;
|
|
665
|
+
remoteAgentId: string;
|
|
666
|
+
connectionId: string;
|
|
667
|
+
sessionId: string;
|
|
668
|
+
localSessionId?: string;
|
|
669
|
+
baseUrl: string;
|
|
670
|
+
channel?: 'stdio' | 'http' | 'websocket';
|
|
671
|
+
historyScope: 'session' | 'peer' | 'global';
|
|
672
|
+
historyWindowSize?: number;
|
|
673
|
+
sessionSequence?: string[];
|
|
674
|
+
serviceGroup?: string;
|
|
675
|
+
degradePolicy?: 'polling_only' | 'streaming_first';
|
|
676
|
+
lastSeenMessageId?: string;
|
|
677
|
+
updatedAt: number;
|
|
678
|
+
status: 'active' | 'degraded' | 'closed';
|
|
679
|
+
subscriber?: ACPSubscriber;
|
|
680
|
+
availableCommands?: AvailableCommand[];
|
|
681
|
+
configOptions?: SessionConfigOption[];
|
|
682
|
+
currentModeId?: string;
|
|
683
|
+
remoteSessionStatus?: 'idle' | 'busy' | 'retry';
|
|
684
|
+
}
|
|
685
|
+
interface ConnectionResult {
|
|
686
|
+
connectionId: string;
|
|
687
|
+
sessionId: string;
|
|
688
|
+
localAgentId: string;
|
|
689
|
+
remoteAgentId: string;
|
|
690
|
+
baseUrl: string;
|
|
691
|
+
}
|
|
692
|
+
interface RoutingContext {
|
|
693
|
+
connectionId?: string;
|
|
694
|
+
localAgentId?: string;
|
|
695
|
+
remoteAgentId?: string;
|
|
696
|
+
baseUrl?: string;
|
|
697
|
+
sessionId?: string;
|
|
698
|
+
}
|
|
699
|
+
interface RoutingResult {
|
|
700
|
+
success: boolean;
|
|
701
|
+
connectionId?: string;
|
|
702
|
+
sessionId?: string;
|
|
703
|
+
localAgentId?: string;
|
|
704
|
+
remoteAgentId?: string;
|
|
705
|
+
baseUrl?: string;
|
|
706
|
+
error?: string;
|
|
707
|
+
}
|
|
708
|
+
interface HistoryContext {
|
|
709
|
+
scope: 'session' | 'peer' | 'global';
|
|
710
|
+
windowSize?: number;
|
|
711
|
+
currentSessionId: string;
|
|
712
|
+
remoteAgentId: string;
|
|
713
|
+
tokenBudget?: number;
|
|
714
|
+
}
|
|
715
|
+
interface ComposedContext {
|
|
716
|
+
messages: Array<{
|
|
717
|
+
id: string;
|
|
718
|
+
role: 'user' | 'assistant' | 'system';
|
|
719
|
+
content: string;
|
|
720
|
+
metadata?: Record<string, unknown>;
|
|
721
|
+
}>;
|
|
722
|
+
sourceSessions: string[];
|
|
723
|
+
totalTokens: number;
|
|
724
|
+
}
|
|
725
|
+
interface DegradationInfo {
|
|
726
|
+
mode: 'polling' | 'streaming';
|
|
727
|
+
reason: string;
|
|
728
|
+
timestamp: number;
|
|
729
|
+
}
|
|
730
|
+
interface ConnectionRegistryConfig {
|
|
731
|
+
defaultHistoryScope?: 'session' | 'peer' | 'global';
|
|
732
|
+
defaultHistoryWindowSize?: number;
|
|
733
|
+
defaultDegradePolicy?: 'polling_only' | 'streaming_first';
|
|
734
|
+
}
|
|
735
|
+
interface InteractionContext {
|
|
736
|
+
connectionId: string;
|
|
737
|
+
localSessionId: string;
|
|
738
|
+
baseUrl: string;
|
|
739
|
+
remoteAgentId?: string;
|
|
740
|
+
originalPrompt: string;
|
|
741
|
+
currentRound: number;
|
|
742
|
+
maxRounds: number;
|
|
743
|
+
unsubscribe?: () => void;
|
|
744
|
+
status: 'active' | 'completed' | 'error' | 'round_limit_exceeded';
|
|
745
|
+
startedAt: number;
|
|
746
|
+
updatedAt: number;
|
|
747
|
+
error?: string;
|
|
748
|
+
}
|
|
749
|
+
interface InteractionConfig {
|
|
750
|
+
maxRounds?: number;
|
|
751
|
+
autoUnsubscribe?: boolean;
|
|
752
|
+
}
|
|
753
|
+
interface InteractionMessage {
|
|
754
|
+
role: 'agent_interaction';
|
|
755
|
+
initiation: {
|
|
756
|
+
source: 'agent_tool_call';
|
|
757
|
+
prompt: string;
|
|
758
|
+
timestamp: number;
|
|
759
|
+
};
|
|
760
|
+
remoteAgent: {
|
|
761
|
+
baseUrl: string;
|
|
762
|
+
sessionId: string;
|
|
763
|
+
agentId?: string;
|
|
764
|
+
};
|
|
765
|
+
response: {
|
|
766
|
+
text: string;
|
|
767
|
+
tools?: Array<{
|
|
768
|
+
name: string;
|
|
769
|
+
status: 'completed' | 'failed';
|
|
770
|
+
output?: unknown;
|
|
771
|
+
}>;
|
|
772
|
+
metadata?: {
|
|
773
|
+
messageId?: string;
|
|
774
|
+
tokens?: {
|
|
775
|
+
input: number;
|
|
776
|
+
output: number;
|
|
777
|
+
total: number;
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
};
|
|
781
|
+
interactionStatus: {
|
|
782
|
+
currentRound: number;
|
|
783
|
+
maxRounds: number;
|
|
784
|
+
canContinue: boolean;
|
|
785
|
+
remainingRounds: number;
|
|
786
|
+
};
|
|
787
|
+
continuationHint?: string;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
declare namespace ServerConnectionRegistry {
|
|
791
|
+
type Registry = ConnectionRegistry;
|
|
792
|
+
function init(config?: ConnectionRegistryConfig): Promise<ConnectionRegistry>;
|
|
793
|
+
function connect(args: {
|
|
794
|
+
baseUrl: string;
|
|
795
|
+
localAgentId: string;
|
|
796
|
+
remoteAgentId: string;
|
|
797
|
+
remoteSessionId?: string;
|
|
798
|
+
localSessionId?: string;
|
|
799
|
+
}): Promise<ConnectionResult>;
|
|
800
|
+
function resolve(id: string): Promise<ConnectionState | undefined>;
|
|
801
|
+
function resolveSync(id: string): ConnectionState | undefined;
|
|
802
|
+
function close(connectionId: string): Promise<void>;
|
|
803
|
+
function markDegraded(connectionId: string, reason: string): Promise<void>;
|
|
804
|
+
function getConnectionsByLocalAgent(agentId: string): Promise<ConnectionState[]>;
|
|
805
|
+
function getConnectionsByService(baseUrl: string): Promise<ConnectionState[]>;
|
|
806
|
+
function getAllActiveConnections(): Promise<ConnectionState[]>;
|
|
807
|
+
function updateLastSeenMessageId(connectionId: string, messageId: string): Promise<void>;
|
|
808
|
+
function updateSessionUpdates(connectionId: string, updates: {
|
|
809
|
+
availableCommands?: AvailableCommand[];
|
|
810
|
+
configOptions?: SessionConfigOption[];
|
|
811
|
+
currentModeId?: string;
|
|
812
|
+
remoteSessionStatus?: 'idle' | 'busy' | 'retry';
|
|
813
|
+
}): Promise<void>;
|
|
814
|
+
function updateSessionUpdatesBySessionId(sessionId: string, updates: {
|
|
815
|
+
availableCommands?: AvailableCommand[];
|
|
816
|
+
configOptions?: SessionConfigOption[];
|
|
817
|
+
currentModeId?: string;
|
|
818
|
+
remoteSessionStatus?: 'idle' | 'busy' | 'retry';
|
|
819
|
+
}): Promise<void>;
|
|
820
|
+
function findConnectionIdBySubscriber(subscriber: unknown): string | undefined;
|
|
821
|
+
class ConnectionRegistry {
|
|
822
|
+
private readonly defaultHistoryScope;
|
|
823
|
+
private readonly defaultHistoryWindowSize;
|
|
824
|
+
private readonly defaultDegradePolicy;
|
|
825
|
+
private agentIndex;
|
|
826
|
+
private serviceIndex;
|
|
827
|
+
private connections;
|
|
828
|
+
static create(config?: ConnectionRegistryConfig): ConnectionRegistry;
|
|
829
|
+
private constructor();
|
|
830
|
+
connect(baseUrl: string, localAgentId: string, remoteAgentId: string, remoteSessionId?: string, localSessionId?: string): ConnectionResult;
|
|
831
|
+
resolve(id: string, createIfMissing?: boolean): ConnectionState | undefined;
|
|
832
|
+
closeConnection(connectionId: string): void;
|
|
833
|
+
markDegraded(connectionId: string, reason: string): void;
|
|
834
|
+
getConnectionsByAgent(agentId: string): ConnectionState[];
|
|
835
|
+
getConnectionsByService(baseUrl: string): ConnectionState[];
|
|
836
|
+
getAllActiveConnections(): ConnectionState[];
|
|
837
|
+
updateLastSeenMessageId(connectionId: string, messageId: string): void;
|
|
838
|
+
updateSessionUpdates(connectionId: string, updates: {
|
|
839
|
+
availableCommands?: AvailableCommand[];
|
|
840
|
+
configOptions?: SessionConfigOption[];
|
|
841
|
+
currentModeId?: string;
|
|
842
|
+
remoteSessionStatus?: 'idle' | 'busy' | 'retry';
|
|
843
|
+
}): void;
|
|
844
|
+
findConnectionIdBySubscriber(subscriber: unknown): string | undefined;
|
|
845
|
+
private generateConnectionId;
|
|
846
|
+
private generateShortId;
|
|
847
|
+
close(): Promise<void>;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
declare enum RoutingErrorCode {
|
|
852
|
+
EMPTY_CONTEXT = "EMPTY_CONTEXT",
|
|
853
|
+
AMBIGUOUS_ROUTE = "AMBIGUOUS_ROUTE",
|
|
854
|
+
NOT_FOUND = "NOT_FOUND",
|
|
855
|
+
CONNECTION_CLOSED = "CONNECTION_CLOSED",
|
|
856
|
+
MISSING_REQUIRED_PARAMS = "MISSING_REQUIRED_PARAMS"
|
|
857
|
+
}
|
|
858
|
+
declare class RoutingError extends Error {
|
|
859
|
+
readonly code: RoutingErrorCode;
|
|
860
|
+
readonly context?: RoutingContext | undefined;
|
|
861
|
+
constructor(code: RoutingErrorCode, message: string, context?: RoutingContext | undefined);
|
|
862
|
+
}
|
|
863
|
+
declare class SessionRouter {
|
|
864
|
+
static create(): SessionRouter;
|
|
865
|
+
protected constructor();
|
|
866
|
+
route(context: RoutingContext): RoutingResult;
|
|
867
|
+
routeOrThrow(context: RoutingContext): ConnectionState;
|
|
868
|
+
registerConnection(state: ConnectionState): RoutingResult;
|
|
869
|
+
unregisterConnection(connectionId: string): boolean;
|
|
870
|
+
private isValidContext;
|
|
871
|
+
private routeByConnectionId;
|
|
872
|
+
private routeByPeerAndBaseUrl;
|
|
873
|
+
private routeByBaseUrlAndSessionId;
|
|
874
|
+
protected getConnectionState(connectionId: string): ConnectionState | undefined;
|
|
875
|
+
protected getConnectionsByPeer(agentId: string): ConnectionState[];
|
|
876
|
+
protected getConnectionsByService(baseUrl: string): ConnectionState[];
|
|
877
|
+
private getErrorCode;
|
|
878
|
+
}
|
|
879
|
+
declare class RegistrySessionRouter extends SessionRouter {
|
|
880
|
+
private readonly registry;
|
|
881
|
+
static fromRegistry(registry: RegistrySessionRouter['registry']): RegistrySessionRouter;
|
|
882
|
+
protected constructor(registry: RegistrySessionRouter['registry']);
|
|
883
|
+
protected getConnectionState(connectionId: string): ConnectionState | undefined;
|
|
884
|
+
protected getConnectionsByPeer(agentId: string): ConnectionState[];
|
|
885
|
+
protected getConnectionsByService(baseUrl: string): ConnectionState[];
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
interface ACPConnection {
|
|
889
|
+
sessionUpdate(params: SessionNotification): Promise<void>;
|
|
890
|
+
requestPermission(params: ACPRequestPermissionParams): Promise<ACPRequestPermissionResponse>;
|
|
891
|
+
extMethod(method: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
892
|
+
extNotification(method: string, params: Record<string, unknown>): Promise<void>;
|
|
893
|
+
}
|
|
894
|
+
interface ACPRequestPermissionParams {
|
|
895
|
+
sessionId: string;
|
|
896
|
+
toolCall: {
|
|
897
|
+
callId: string;
|
|
898
|
+
status?: string;
|
|
899
|
+
title?: string;
|
|
900
|
+
rawInput?: unknown;
|
|
901
|
+
kind?: string;
|
|
902
|
+
locations?: string[];
|
|
903
|
+
};
|
|
904
|
+
options: Array<{
|
|
905
|
+
optionId: string;
|
|
906
|
+
name: string;
|
|
907
|
+
kind?: string;
|
|
908
|
+
}>;
|
|
909
|
+
}
|
|
910
|
+
interface ACPRequestPermissionResponse {
|
|
911
|
+
outcome: {
|
|
912
|
+
outcome: 'selected';
|
|
913
|
+
optionId: string;
|
|
914
|
+
} | {
|
|
915
|
+
outcome: 'cancelled';
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
declare class AcpEventBridge {
|
|
919
|
+
private sdk;
|
|
920
|
+
private connection;
|
|
921
|
+
private abortController;
|
|
922
|
+
private started;
|
|
923
|
+
private permissionQueues;
|
|
924
|
+
private readonly _messageMetaCache;
|
|
925
|
+
private permissionOptions;
|
|
926
|
+
private acpService?;
|
|
927
|
+
private _cachedPrimaryAgents;
|
|
928
|
+
constructor(sdk: EasbotClient, connection: ACPConnection);
|
|
929
|
+
setService(service: {
|
|
930
|
+
abortConnection?: () => void;
|
|
931
|
+
closeConnection?: () => void;
|
|
932
|
+
}): void;
|
|
933
|
+
start(): Promise<void>;
|
|
934
|
+
stop(): Promise<void>;
|
|
935
|
+
private runEventSubscription;
|
|
936
|
+
private handleEvent;
|
|
937
|
+
private handleSessionStatus;
|
|
938
|
+
private handleSessionDeleted;
|
|
939
|
+
private handlePermissionAsked;
|
|
940
|
+
private handleQuestionAsked;
|
|
941
|
+
private handleMessagePartUpdated;
|
|
942
|
+
private handleToolPart;
|
|
943
|
+
private handleTextPart;
|
|
944
|
+
private handleReasoningPart;
|
|
945
|
+
private handleStepFinishPart;
|
|
946
|
+
private getContextLimit;
|
|
947
|
+
private getMessageMeta;
|
|
948
|
+
private clearMessageMetaCache;
|
|
949
|
+
private shouldFilterAgent;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
type ServiceMode$1 = 'stdio' | 'http' | 'websocket';
|
|
953
|
+
|
|
954
|
+
declare enum AgentStatus {
|
|
955
|
+
INITIALIZING = "initializing",
|
|
956
|
+
READY = "ready",
|
|
957
|
+
RUNNING = "running",
|
|
958
|
+
STOPPED = "stopped",
|
|
959
|
+
ERROR = "error"
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
interface ACPConfig {
|
|
963
|
+
sdk: EasbotClient;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
interface AdapterSessionState {
|
|
967
|
+
id: string;
|
|
968
|
+
cwd: string;
|
|
969
|
+
mcpServers: McpServer[];
|
|
970
|
+
createdAt: Date;
|
|
971
|
+
model?: {
|
|
972
|
+
providerId: string;
|
|
973
|
+
modelId: string;
|
|
974
|
+
};
|
|
975
|
+
variant?: string;
|
|
976
|
+
modeId?: string;
|
|
977
|
+
contextMode?: ContextMode;
|
|
978
|
+
agent?: string;
|
|
979
|
+
}
|
|
980
|
+
declare class AdapterSessionManager {
|
|
981
|
+
private sessions;
|
|
982
|
+
private sdk;
|
|
983
|
+
constructor(sdk: EasbotClient);
|
|
984
|
+
tryGet(sessionId: string): AdapterSessionState | undefined;
|
|
985
|
+
create(sessionId: string, cwd: string, mcpServers: McpServer[], model?: AdapterSessionState['model']): Promise<AdapterSessionState>;
|
|
986
|
+
load(sessionId: string, cwd: string, mcpServers: McpServer[], model?: AdapterSessionState['model']): Promise<AdapterSessionState>;
|
|
987
|
+
get(sessionId: string): AdapterSessionState;
|
|
988
|
+
getModel(sessionId: string): {
|
|
989
|
+
providerId: string;
|
|
990
|
+
modelId: string;
|
|
991
|
+
} | undefined;
|
|
992
|
+
setModel(sessionId: string, model: AdapterSessionState['model']): AdapterSessionState;
|
|
993
|
+
getVariant(sessionId: string): string | undefined;
|
|
994
|
+
setVariant(sessionId: string, variant?: string): AdapterSessionState;
|
|
995
|
+
setMode(sessionId: string, modeId: string): AdapterSessionState;
|
|
996
|
+
setContextMode(sessionId: string, contextMode?: ContextMode): AdapterSessionState;
|
|
997
|
+
setAgent(sessionId: string, agent?: string): AdapterSessionState;
|
|
998
|
+
close(sessionId: string): boolean;
|
|
999
|
+
dispose(): void;
|
|
1000
|
+
resolveConnectionState(sessionId: string): ConnectionState | undefined;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
interface ACPServiceConfig {
|
|
1004
|
+
acp: ACPConfig;
|
|
1005
|
+
serviceMode: ServiceMode$1;
|
|
1006
|
+
channel: {
|
|
1007
|
+
type: ServiceMode$1;
|
|
1008
|
+
timeout?: number;
|
|
1009
|
+
retryCount?: number;
|
|
1010
|
+
};
|
|
1011
|
+
directory?: string;
|
|
1012
|
+
connectionRegistry?: ServerConnectionRegistry.Registry;
|
|
1013
|
+
sessionRouter?: SessionRouter;
|
|
1014
|
+
}
|
|
1015
|
+
declare abstract class ACPService implements Agent {
|
|
1016
|
+
protected config: ACPServiceConfig;
|
|
1017
|
+
protected readonly serviceMode: ServiceMode$1;
|
|
1018
|
+
protected connection: AgentSideConnection | undefined;
|
|
1019
|
+
protected sdk: EasbotClient;
|
|
1020
|
+
protected connectionRegistry: ServerConnectionRegistry.Registry | null;
|
|
1021
|
+
protected sessionRouter: SessionRouter | null;
|
|
1022
|
+
protected sessionManager: AdapterSessionManager;
|
|
1023
|
+
private executorInitialized;
|
|
1024
|
+
protected status: AgentStatus;
|
|
1025
|
+
constructor(connection: AgentSideConnection | undefined, config: ACPServiceConfig);
|
|
1026
|
+
protected initializeExecutor(): Promise<void>;
|
|
1027
|
+
protected setStatus(newStatus: AgentStatus, agentId?: string): void;
|
|
1028
|
+
protected getStatus(): AgentStatus;
|
|
1029
|
+
abstract initialize(params: InitializeRequest): Promise<InitializeResponse>;
|
|
1030
|
+
authenticate(params: AuthenticateRequest): Promise<undefined | AuthenticateResponse>;
|
|
1031
|
+
newSession(params: NewSessionRequest): Promise<NewSessionResponse>;
|
|
1032
|
+
loadSession(params: LoadSessionRequest): Promise<LoadSessionResponse>;
|
|
1033
|
+
prompt(params: PromptRequest): Promise<PromptResponse>;
|
|
1034
|
+
cancel(params: CancelNotification): Promise<void>;
|
|
1035
|
+
private parseUri;
|
|
1036
|
+
private sendUsageUpdate;
|
|
1037
|
+
sendAvailableCommandsUpdate(sessionId: string, directory?: string): Promise<void>;
|
|
1038
|
+
private sendConfigOptionUpdate;
|
|
1039
|
+
private sendCurrentModeUpdate;
|
|
1040
|
+
private getContextLimit;
|
|
1041
|
+
unstable_forkSession(params: ForkSessionRequest): Promise<ForkSessionResponse>;
|
|
1042
|
+
resumeSession(params: ResumeSessionRequest): Promise<ResumeSessionResponse>;
|
|
1043
|
+
listSessions(params: ListSessionsRequest): Promise<ListSessionsResponse>;
|
|
1044
|
+
setSessionMode(params: SetSessionModeRequest): Promise<SetSessionModeResponse>;
|
|
1045
|
+
setSessionConfigOption(params: SetSessionConfigOptionRequest): Promise<SetSessionConfigOptionResponse>;
|
|
1046
|
+
closeSession(params: CloseSessionRequest): Promise<CloseSessionResponse>;
|
|
1047
|
+
private buildSessionStateResponse;
|
|
1048
|
+
private parseModelSelection;
|
|
1049
|
+
setConnection(connection: AgentSideConnection): void;
|
|
1050
|
+
getConnection(): AgentSideConnection | undefined;
|
|
1051
|
+
setServerConnection(connection: any): void;
|
|
1052
|
+
abortConnection(): void;
|
|
1053
|
+
closeConnection(): void;
|
|
1054
|
+
getServerConnectionRegistry(): ServerConnectionRegistry.Registry | null;
|
|
1055
|
+
getSessionRouter(): SessionRouter | null;
|
|
1056
|
+
createConnection(baseUrl: string, localAgentId?: string, remoteAgentId?: string, sessionId?: string): {
|
|
1057
|
+
connectionId: string;
|
|
1058
|
+
sessionId: string;
|
|
1059
|
+
localAgentId: string;
|
|
1060
|
+
remoteAgentId: string;
|
|
1061
|
+
baseUrl: string;
|
|
1062
|
+
};
|
|
1063
|
+
routeToConnection(context: {
|
|
1064
|
+
connectionId?: string;
|
|
1065
|
+
remoteAgentId?: string;
|
|
1066
|
+
baseUrl?: string;
|
|
1067
|
+
sessionId?: string;
|
|
1068
|
+
}): Promise<{
|
|
1069
|
+
success: boolean;
|
|
1070
|
+
connectionId?: string;
|
|
1071
|
+
sessionId?: string;
|
|
1072
|
+
remoteAgentId?: string;
|
|
1073
|
+
baseUrl?: string;
|
|
1074
|
+
error?: string;
|
|
1075
|
+
}>;
|
|
1076
|
+
dispose(): Promise<void>;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
type ServiceMode = ChannelType;
|
|
1080
|
+
declare const ServiceMode: {
|
|
1081
|
+
readonly HTTP: ChannelType.HTTP;
|
|
1082
|
+
readonly STDIO: ChannelType.STDIO;
|
|
1083
|
+
readonly WEBSOCKET: ChannelType.WS;
|
|
1084
|
+
};
|
|
1085
|
+
type ServiceModeValue = (typeof ServiceMode)[keyof typeof ServiceMode];
|
|
1086
|
+
interface StdioChannelConfig {
|
|
1087
|
+
command: string;
|
|
1088
|
+
args: string[];
|
|
1089
|
+
}
|
|
1090
|
+
interface HttpChannelConfig {
|
|
1091
|
+
baseUrl: string;
|
|
1092
|
+
timeout?: number;
|
|
1093
|
+
}
|
|
1094
|
+
interface WebSocketChannelConfig {
|
|
1095
|
+
url: string;
|
|
1096
|
+
timeout?: number;
|
|
1097
|
+
batchSize?: number;
|
|
1098
|
+
batchInterval?: number;
|
|
1099
|
+
heartbeatInterval?: number;
|
|
1100
|
+
}
|
|
1101
|
+
interface ACPServerConfig {
|
|
1102
|
+
channel: ServiceMode;
|
|
1103
|
+
port?: number;
|
|
1104
|
+
hostname?: string;
|
|
1105
|
+
timeout?: number;
|
|
1106
|
+
stdio?: StdioChannelConfig;
|
|
1107
|
+
http?: HttpChannelConfig;
|
|
1108
|
+
ws?: WebSocketChannelConfig;
|
|
1109
|
+
historyScope?: 'session' | 'peer' | 'global';
|
|
1110
|
+
historyWindowSize?: number;
|
|
1111
|
+
degradePolicy?: 'polling_only' | 'streaming_first';
|
|
1112
|
+
sessionExpireMs?: number;
|
|
1113
|
+
}
|
|
1114
|
+
declare class ServiceModeConflictError extends Error {
|
|
1115
|
+
readonly conflictingModes: ServiceMode[];
|
|
1116
|
+
constructor(message: string, conflictingModes?: ServiceMode[]);
|
|
1117
|
+
getConflictingModesDescription(): string;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
declare function loadACPServerConfig(config: Partial<ACPServerConfig>): ACPServerConfig;
|
|
1121
|
+
declare function loadConfigFromEnv(): Partial<ACPServerConfig>;
|
|
1122
|
+
declare function applyEnvironmentOverrides(config: ACPServerConfig): ACPServerConfig;
|
|
1123
|
+
|
|
1124
|
+
interface ACPServerInstance {
|
|
1125
|
+
type: ServiceMode;
|
|
1126
|
+
server: unknown;
|
|
1127
|
+
agent: EasBotAgent;
|
|
1128
|
+
stop: () => Promise<void>;
|
|
1129
|
+
healthCheck: () => Promise<boolean>;
|
|
1130
|
+
}
|
|
1131
|
+
declare function startACPServer(agent: EasBotAgent, config?: Partial<ACPServerConfig>): Promise<ACPServerInstance>;
|
|
1132
|
+
declare function createACPServerInstance(config: ACPServerConfig): ACPServerInstance;
|
|
1133
|
+
|
|
1134
|
+
declare function startHttpServer(agent: EasBotAgent, config: ACPServerConfig): Promise<{
|
|
1135
|
+
server: EasServer;
|
|
1136
|
+
stop: () => Promise<void>;
|
|
1137
|
+
}>;
|
|
1138
|
+
|
|
1139
|
+
declare function startWebSocketServer(agent: EasBotAgent, config: ACPServerConfig): Promise<{
|
|
1140
|
+
server: EasServer;
|
|
1141
|
+
stop: () => Promise<void>;
|
|
1142
|
+
}>;
|
|
1143
|
+
|
|
1144
|
+
interface EventBroadcaster {
|
|
1145
|
+
broadcast: (sessionId: string, event: SessionNotification) => void;
|
|
1146
|
+
}
|
|
1147
|
+
declare class ServerAgentSideConnection implements ACPConnection {
|
|
1148
|
+
private broadcaster;
|
|
1149
|
+
private sessionIds;
|
|
1150
|
+
setBroadcaster(broadcaster: EventBroadcaster): void;
|
|
1151
|
+
addSession(sessionId: string): void;
|
|
1152
|
+
removeSession(sessionId: string): void;
|
|
1153
|
+
clearSessions(): void;
|
|
1154
|
+
getSessions(): string[];
|
|
1155
|
+
sessionUpdate(params: SessionNotification): Promise<void>;
|
|
1156
|
+
requestPermission(params: {
|
|
1157
|
+
sessionId: string;
|
|
1158
|
+
toolCall: {
|
|
1159
|
+
callId: string;
|
|
1160
|
+
};
|
|
1161
|
+
options: Array<{
|
|
1162
|
+
optionId: string;
|
|
1163
|
+
name: string;
|
|
1164
|
+
kind?: string;
|
|
1165
|
+
}>;
|
|
1166
|
+
}): Promise<{
|
|
1167
|
+
outcome: {
|
|
1168
|
+
outcome: 'selected';
|
|
1169
|
+
optionId: string;
|
|
1170
|
+
} | {
|
|
1171
|
+
outcome: 'cancelled';
|
|
1172
|
+
};
|
|
1173
|
+
}>;
|
|
1174
|
+
extMethod(method: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
1175
|
+
extNotification(method: string, params: Record<string, unknown>): Promise<void>;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
interface EasBotAgentConfig extends ACPServiceConfig {
|
|
1179
|
+
acpServerConfig?: ACPServerConfig$1;
|
|
1180
|
+
printLog?: boolean;
|
|
1181
|
+
stdioStream?: {
|
|
1182
|
+
stream: any;
|
|
1183
|
+
};
|
|
1184
|
+
}
|
|
1185
|
+
declare class EasBotAgent extends ACPService {
|
|
1186
|
+
private acpEventBridge;
|
|
1187
|
+
private server;
|
|
1188
|
+
private isAgentInitialized;
|
|
1189
|
+
static create(config: EasBotAgentConfig): Promise<EasBotAgent>;
|
|
1190
|
+
constructor(connection: AgentSideConnection | undefined, config: EasBotAgentConfig);
|
|
1191
|
+
initialize(params: InitializeRequest): Promise<InitializeResponse>;
|
|
1192
|
+
private initializeAgent;
|
|
1193
|
+
start(): Promise<void>;
|
|
1194
|
+
stop(): Promise<void>;
|
|
1195
|
+
private initializeAcpEventBridge;
|
|
1196
|
+
getServiceMode(): ServiceMode$1;
|
|
1197
|
+
getServerInstance(): ACPServerInstance | null;
|
|
1198
|
+
getSDK(): EasbotClient | null;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
interface AdapterBootstrapConfig {
|
|
1202
|
+
directory?: string;
|
|
1203
|
+
initModels?: boolean;
|
|
1204
|
+
printLogs?: boolean;
|
|
1205
|
+
logLevel?: 'DEBUG' | 'INFO' | 'WARN' | 'ERROR';
|
|
1206
|
+
channel?: ChannelType;
|
|
1207
|
+
}
|
|
1208
|
+
declare class AdapterEnvironmentInitializationError extends Error {
|
|
1209
|
+
readonly type: 'AdapterEnvironmentInitializationError';
|
|
1210
|
+
readonly stage: 'global' | 'log' | 'models' | 'handlers' | 'instance';
|
|
1211
|
+
readonly cause?: Error;
|
|
1212
|
+
constructor(message: string, stage: AdapterEnvironmentInitializationError['stage'], cause?: Error);
|
|
1213
|
+
}
|
|
1214
|
+
declare namespace EasbotAdapter {
|
|
1215
|
+
function resetState(): void;
|
|
1216
|
+
function init(config?: AdapterBootstrapConfig): Promise<void>;
|
|
1217
|
+
function destroy(): Promise<void>;
|
|
1218
|
+
function isInitialized(): Promise<boolean>;
|
|
1219
|
+
function setAgent(agent: unknown): Promise<void>;
|
|
1220
|
+
function getAgent<T = unknown>(): Promise<T | null>;
|
|
1221
|
+
function getServer<T = ACPServerInstance>(): Promise<T | null>;
|
|
1222
|
+
function getSDK(): Promise<EasbotClient | null>;
|
|
1223
|
+
function getACPConnection(): Promise<AgentSideConnection | null>;
|
|
1224
|
+
function getState(): Promise<{
|
|
1225
|
+
initialized: boolean;
|
|
1226
|
+
directory: string;
|
|
1227
|
+
activeChannel: ChannelType | null;
|
|
1228
|
+
hasSDK: boolean;
|
|
1229
|
+
hasAgent: boolean;
|
|
1230
|
+
hasACPConnection: boolean;
|
|
1231
|
+
hasServer: boolean;
|
|
1232
|
+
}>;
|
|
1233
|
+
function ensureACPService(config: ACPServerConfig$1): Promise<{
|
|
1234
|
+
sdk: EasbotClient;
|
|
1235
|
+
agent: EasBotAgent;
|
|
1236
|
+
server?: ACPServerInstance;
|
|
1237
|
+
}>;
|
|
1238
|
+
function ensureACPServiceStdio(config: {
|
|
1239
|
+
directory: string;
|
|
1240
|
+
}): Promise<{
|
|
1241
|
+
sdk: EasbotClient;
|
|
1242
|
+
agent: EasBotAgent;
|
|
1243
|
+
}>;
|
|
1244
|
+
}
|
|
1245
|
+
declare const AdapterBootstrap: typeof EasbotAdapter;
|
|
1246
|
+
|
|
1247
|
+
export { type ACPServerInstance, ACP_BUSINESS_CODES, ACP_BUSINESS_HINTS, ACP_JSON_REL_PATH, AcpCache, type AcpCliDeps, type AcpCliResult, type AcpConfigStateResult, AcpError, AcpEventBridge, AdapterBootstrap, type AdapterBootstrapConfig, AdapterEnvironmentInitializationError, AgentStatus, COMMANDS_HELP, type CommandHelp, type ComposedContext, type ConnectionRegistryConfig, type ConnectionResult, type ConnectionState, type DegradationInfo, EasBotAgent, type EasBotAgentConfig, EasbotAdapter, type FormatLogOptions, type HistoryContext, I18n, type InteractionConfig, type InteractionContext, type InteractionMessage, LanguagesSupported, type Locale, NameErrors, RegistrySessionRouter, type RoutingContext, RoutingError, RoutingErrorCode, type RoutingResult, ServerAgentSideConnection, ServerConnectionRegistry, ServiceMode, ServiceModeConflictError, type ServiceModeValue, SessionRouter, type TranslateOptions, type TranslationResources, type TypeWithI18N, applyEnvironmentOverrides, changeI18nLanguage, clearConfigCache, createACPServerInstance, formatLog, getClientById, getClientsConfig, getConfig, getConfigDirectory, getDefaultClient, getGatewayClientUrl, getGlobal, getHomeDir, getInstance, getProjectDirectory, getRegisteredResources, getSdk, getServerConfig, getWorktree, getXdgData, handleAcpCli, initI18n, isConfigLoaded, languages, loadACPServerConfig, loadConfig, loadConfigFromEnv, registerBusinessErrors, registerI18nResources, reloadConfig, renderBanner, renderHelp, resetEasbotClientAdapter, resetGlobalAdapter, resetInstanceAdapter, setEasbotClientAdapter, setGlobalAdapter, setInstanceAdapter, startACPServer, startHttpServer, startWebSocketServer, t, translate };
|