@openacp/cli 2026.331.5 → 2026.401.2
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/cli.js +4490 -2399
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +255 -166
- package/dist/index.js +1646 -2200
- package/dist/index.js.map +1 -1
- package/package.json +12 -3
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as zod from 'zod';
|
|
|
3
3
|
import { z, ZodSchema } from 'zod';
|
|
4
4
|
import { EventEmitter } from 'node:events';
|
|
5
5
|
import { SetSessionConfigOptionResponse, ListSessionsResponse, LoadSessionResponse, ForkSessionResponse, PromptResponse as PromptResponse$1 } from '@agentclientprotocol/sdk';
|
|
6
|
+
import { FastifyInstance, FastifyPluginAsync, preHandlerHookHandler, FastifyRequest, FastifyReply } from 'fastify';
|
|
6
7
|
import * as http from 'node:http';
|
|
7
8
|
|
|
8
9
|
type OutputMode = "low" | "medium" | "high";
|
|
@@ -138,15 +139,9 @@ type AgentEvent = {
|
|
|
138
139
|
title?: string;
|
|
139
140
|
updatedAt?: string;
|
|
140
141
|
_meta?: Record<string, unknown>;
|
|
141
|
-
} | {
|
|
142
|
-
type: "current_mode_update";
|
|
143
|
-
modeId: string;
|
|
144
142
|
} | {
|
|
145
143
|
type: "config_option_update";
|
|
146
144
|
options: ConfigOption[];
|
|
147
|
-
} | {
|
|
148
|
-
type: "model_update";
|
|
149
|
-
modelId: string;
|
|
150
145
|
} | {
|
|
151
146
|
type: "user_message_chunk";
|
|
152
147
|
content: string;
|
|
@@ -276,11 +271,22 @@ interface SessionRecord<P = Record<string, unknown>> {
|
|
|
276
271
|
lastActiveAt: string;
|
|
277
272
|
name?: string;
|
|
278
273
|
dangerousMode?: boolean;
|
|
274
|
+
clientOverrides?: {
|
|
275
|
+
bypassPermissions?: boolean;
|
|
276
|
+
};
|
|
279
277
|
outputMode?: OutputMode;
|
|
280
278
|
platform: P;
|
|
281
279
|
firstAgent?: string;
|
|
282
280
|
currentPromptCount?: number;
|
|
283
281
|
agentSwitchHistory?: AgentSwitchEntry[];
|
|
282
|
+
acpState?: {
|
|
283
|
+
configOptions?: ConfigOption[];
|
|
284
|
+
agentCapabilities?: AgentCapabilities;
|
|
285
|
+
currentMode?: string;
|
|
286
|
+
availableModes?: SessionMode[];
|
|
287
|
+
currentModel?: string;
|
|
288
|
+
availableModels?: ModelInfo[];
|
|
289
|
+
};
|
|
284
290
|
}
|
|
285
291
|
interface TelegramPlatformData {
|
|
286
292
|
topicId: number;
|
|
@@ -320,7 +326,7 @@ interface SessionModeState {
|
|
|
320
326
|
}
|
|
321
327
|
interface ConfigSelectChoice {
|
|
322
328
|
value: string;
|
|
323
|
-
|
|
329
|
+
name: string;
|
|
324
330
|
description?: string;
|
|
325
331
|
}
|
|
326
332
|
interface ConfigSelectGroup {
|
|
@@ -1060,6 +1066,8 @@ interface IChannelAdapter {
|
|
|
1060
1066
|
stripTTSBlock?(sessionId: string): Promise<void>;
|
|
1061
1067
|
sendSkillCommands?(sessionId: string, commands: AgentCommand[]): Promise<void>;
|
|
1062
1068
|
cleanupSkillCommands?(sessionId: string): Promise<void>;
|
|
1069
|
+
/** Flush skill commands that were queued before threadId was available */
|
|
1070
|
+
flushPendingSkillCommands?(sessionId: string): Promise<void>;
|
|
1063
1071
|
cleanupSessionState?(sessionId: string): Promise<void>;
|
|
1064
1072
|
}
|
|
1065
1073
|
/**
|
|
@@ -1200,6 +1208,13 @@ declare class AgentInstance extends TypedEmitter<AgentInstanceEvents> {
|
|
|
1200
1208
|
image?: boolean;
|
|
1201
1209
|
audio?: boolean;
|
|
1202
1210
|
};
|
|
1211
|
+
agentCapabilities?: AgentCapabilities;
|
|
1212
|
+
/** Preserved from newSession/resumeSession response for ACP state propagation */
|
|
1213
|
+
initialSessionResponse?: {
|
|
1214
|
+
modes?: unknown;
|
|
1215
|
+
configOptions?: unknown;
|
|
1216
|
+
models?: unknown;
|
|
1217
|
+
};
|
|
1203
1218
|
middlewareChain?: MiddlewareChain;
|
|
1204
1219
|
debugTracer: DebugTracer | null;
|
|
1205
1220
|
onPermissionRequest: (request: PermissionRequest) => Promise<string>;
|
|
@@ -1209,9 +1224,7 @@ declare class AgentInstance extends TypedEmitter<AgentInstanceEvents> {
|
|
|
1209
1224
|
static spawn(agentDef: AgentDefinition, workingDirectory: string, mcpServers?: McpServerConfig[]): Promise<AgentInstance>;
|
|
1210
1225
|
static resume(agentDef: AgentDefinition, workingDirectory: string, agentSessionId: string, mcpServers?: McpServerConfig[]): Promise<AgentInstance>;
|
|
1211
1226
|
private createClient;
|
|
1212
|
-
setMode(modeId: string): Promise<void>;
|
|
1213
1227
|
setConfigOption(configId: string, value: SetConfigOptionValue): Promise<SetSessionConfigOptionResponse>;
|
|
1214
|
-
setModel(modelId: string): Promise<void>;
|
|
1215
1228
|
listSessions(cwd?: string, cursor?: string): Promise<ListSessionsResponse>;
|
|
1216
1229
|
loadSession(sessionId: string, cwd: string, mcpServers?: McpServerConfig[]): Promise<LoadSessionResponse>;
|
|
1217
1230
|
authenticate(methodId: string): Promise<void>;
|
|
@@ -1240,7 +1253,8 @@ declare class AgentCatalog {
|
|
|
1240
1253
|
private store;
|
|
1241
1254
|
private registryAgents;
|
|
1242
1255
|
private cachePath;
|
|
1243
|
-
|
|
1256
|
+
private agentsDir;
|
|
1257
|
+
constructor(store?: AgentStore, cachePath?: string, agentsDir?: string);
|
|
1244
1258
|
load(): void;
|
|
1245
1259
|
fetchRegistry(): Promise<void>;
|
|
1246
1260
|
refreshRegistryIfStale(): Promise<void>;
|
|
@@ -1394,12 +1408,10 @@ declare class Session extends TypedEmitter<SessionEvents> {
|
|
|
1394
1408
|
name?: string;
|
|
1395
1409
|
createdAt: Date;
|
|
1396
1410
|
voiceMode: "off" | "next" | "on";
|
|
1397
|
-
dangerousMode: boolean;
|
|
1398
|
-
currentMode?: string;
|
|
1399
|
-
availableModes: SessionMode[];
|
|
1400
1411
|
configOptions: ConfigOption[];
|
|
1401
|
-
|
|
1402
|
-
|
|
1412
|
+
clientOverrides: {
|
|
1413
|
+
bypassPermissions?: boolean;
|
|
1414
|
+
};
|
|
1403
1415
|
agentCapabilities?: AgentCapabilities;
|
|
1404
1416
|
archiving: boolean;
|
|
1405
1417
|
promptCount: number;
|
|
@@ -1439,20 +1451,18 @@ declare class Session extends TypedEmitter<SessionEvents> {
|
|
|
1439
1451
|
private maybeTranscribeAudio;
|
|
1440
1452
|
private processTTSResponse;
|
|
1441
1453
|
private autoName;
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
configOptions?: ConfigOption[] | null;
|
|
1448
|
-
models?: SessionModelState | null;
|
|
1449
|
-
agentCapabilities?: AgentCapabilities | null;
|
|
1450
|
-
}): void;
|
|
1454
|
+
setInitialConfigOptions(options: ConfigOption[]): void;
|
|
1455
|
+
setAgentCapabilities(caps: AgentCapabilities | undefined): void;
|
|
1456
|
+
getConfigOption(id: string): ConfigOption | undefined;
|
|
1457
|
+
getConfigByCategory(category: string): ConfigOption | undefined;
|
|
1458
|
+
getConfigValue(id: string): string | undefined;
|
|
1451
1459
|
/** Set session name explicitly and emit 'named' event */
|
|
1452
1460
|
setName(name: string): void;
|
|
1453
|
-
updateMode(modeId: string): Promise<void>;
|
|
1454
1461
|
updateConfigOptions(options: ConfigOption[]): Promise<void>;
|
|
1455
|
-
|
|
1462
|
+
/** Snapshot of current ACP state for persistence */
|
|
1463
|
+
toAcpStateSnapshot(): NonNullable<SessionRecord["acpState"]>;
|
|
1464
|
+
/** Check if the agent supports a specific session capability */
|
|
1465
|
+
supportsCapability(cap: 'list' | 'fork' | 'close' | 'loadSession'): boolean;
|
|
1456
1466
|
/** Cancel the current prompt and clear the queue. Stays in active state. */
|
|
1457
1467
|
abortPrompt(): Promise<void>;
|
|
1458
1468
|
/** Search backward through agentSwitchHistory for the last entry matching agentName */
|
|
@@ -1802,22 +1812,12 @@ interface MiddlewarePayloadMap {
|
|
|
1802
1812
|
durationMs: number;
|
|
1803
1813
|
promptCount: number;
|
|
1804
1814
|
};
|
|
1805
|
-
'mode:beforeChange': {
|
|
1806
|
-
sessionId: string;
|
|
1807
|
-
fromMode: string | undefined;
|
|
1808
|
-
toMode: string;
|
|
1809
|
-
};
|
|
1810
1815
|
'config:beforeChange': {
|
|
1811
1816
|
sessionId: string;
|
|
1812
1817
|
configId: string;
|
|
1813
1818
|
oldValue: unknown;
|
|
1814
1819
|
newValue: unknown;
|
|
1815
1820
|
};
|
|
1816
|
-
'model:beforeChange': {
|
|
1817
|
-
sessionId: string;
|
|
1818
|
-
fromModel: string | undefined;
|
|
1819
|
-
toModel: string;
|
|
1820
|
-
};
|
|
1821
1821
|
'agent:beforeCancel': {
|
|
1822
1822
|
sessionId: string;
|
|
1823
1823
|
reason?: string;
|
|
@@ -1958,7 +1958,9 @@ interface EventBusEvents {
|
|
|
1958
1958
|
sessionId: string;
|
|
1959
1959
|
status?: SessionStatus;
|
|
1960
1960
|
name?: string;
|
|
1961
|
-
|
|
1961
|
+
clientOverrides?: {
|
|
1962
|
+
bypassPermissions?: boolean;
|
|
1963
|
+
};
|
|
1962
1964
|
}) => void;
|
|
1963
1965
|
"session:deleted": (data: {
|
|
1964
1966
|
sessionId: string;
|
|
@@ -2094,6 +2096,8 @@ declare class SessionBridge {
|
|
|
2094
2096
|
private wireAgentToSession;
|
|
2095
2097
|
private wireSessionToAdapter;
|
|
2096
2098
|
private handleAgentEvent;
|
|
2099
|
+
/** Persist current ACP state (configOptions, agentCapabilities) to session store as cache */
|
|
2100
|
+
private persistAcpState;
|
|
2097
2101
|
private wirePermissions;
|
|
2098
2102
|
private wireLifecycle;
|
|
2099
2103
|
}
|
|
@@ -2144,7 +2148,7 @@ declare class TunnelService {
|
|
|
2144
2148
|
private config;
|
|
2145
2149
|
private systemPort;
|
|
2146
2150
|
private startError;
|
|
2147
|
-
constructor(config: TunnelConfig, registryPath?: string);
|
|
2151
|
+
constructor(config: TunnelConfig, registryPath?: string, binDir?: string);
|
|
2148
2152
|
start(): Promise<string>;
|
|
2149
2153
|
stop(): Promise<void>;
|
|
2150
2154
|
addTunnel(port: number, opts?: {
|
|
@@ -2164,6 +2168,63 @@ declare class TunnelService {
|
|
|
2164
2168
|
outputUrl(entryId: string): string;
|
|
2165
2169
|
}
|
|
2166
2170
|
|
|
2171
|
+
interface ContextProvider {
|
|
2172
|
+
readonly name: string;
|
|
2173
|
+
isAvailable(repoPath: string): Promise<boolean>;
|
|
2174
|
+
listSessions(query: ContextQuery): Promise<SessionListResult>;
|
|
2175
|
+
buildContext(query: ContextQuery, options?: ContextOptions): Promise<ContextResult>;
|
|
2176
|
+
}
|
|
2177
|
+
interface ContextQuery {
|
|
2178
|
+
repoPath: string;
|
|
2179
|
+
type: "branch" | "commit" | "pr" | "latest" | "checkpoint" | "session";
|
|
2180
|
+
value: string;
|
|
2181
|
+
}
|
|
2182
|
+
interface ContextOptions {
|
|
2183
|
+
maxTokens?: number;
|
|
2184
|
+
limit?: number;
|
|
2185
|
+
/** When true, insert `## [agentName]` headers at agent boundaries in merged history */
|
|
2186
|
+
labelAgent?: boolean;
|
|
2187
|
+
}
|
|
2188
|
+
interface SessionInfo {
|
|
2189
|
+
checkpointId: string;
|
|
2190
|
+
sessionIndex: string;
|
|
2191
|
+
transcriptPath: string;
|
|
2192
|
+
createdAt: string;
|
|
2193
|
+
endedAt: string;
|
|
2194
|
+
branch: string;
|
|
2195
|
+
agent: string;
|
|
2196
|
+
turnCount: number;
|
|
2197
|
+
filesTouched: string[];
|
|
2198
|
+
sessionId: string;
|
|
2199
|
+
}
|
|
2200
|
+
interface SessionListResult {
|
|
2201
|
+
sessions: SessionInfo[];
|
|
2202
|
+
estimatedTokens: number;
|
|
2203
|
+
}
|
|
2204
|
+
type ContextMode = "full" | "balanced" | "compact";
|
|
2205
|
+
interface ContextResult {
|
|
2206
|
+
markdown: string;
|
|
2207
|
+
tokenEstimate: number;
|
|
2208
|
+
sessionCount: number;
|
|
2209
|
+
totalTurns: number;
|
|
2210
|
+
mode: ContextMode;
|
|
2211
|
+
truncated: boolean;
|
|
2212
|
+
timeRange: {
|
|
2213
|
+
start: string;
|
|
2214
|
+
end: string;
|
|
2215
|
+
};
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
declare class ContextManager {
|
|
2219
|
+
private providers;
|
|
2220
|
+
private cache;
|
|
2221
|
+
constructor(cachePath?: string);
|
|
2222
|
+
register(provider: ContextProvider): void;
|
|
2223
|
+
getProvider(repoPath: string): Promise<ContextProvider | null>;
|
|
2224
|
+
listSessions(query: ContextQuery): Promise<SessionListResult | null>;
|
|
2225
|
+
buildContext(query: ContextQuery, options?: ContextOptions): Promise<ContextResult | null>;
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2167
2228
|
interface SessionCreateParams {
|
|
2168
2229
|
channelId: string;
|
|
2169
2230
|
agentName: string;
|
|
@@ -2184,9 +2245,48 @@ declare class SessionFactory {
|
|
|
2184
2245
|
private eventBus;
|
|
2185
2246
|
private instanceRoot?;
|
|
2186
2247
|
middlewareChain?: MiddlewareChain;
|
|
2248
|
+
private resumeLocks;
|
|
2249
|
+
/** Injected by Core after construction — needed for lazy resume error feedback */
|
|
2250
|
+
adapters?: Map<string, IChannelAdapter>;
|
|
2251
|
+
/** Injected by Core after construction — needed for lazy resume store lookup */
|
|
2252
|
+
sessionStore?: SessionStore | null;
|
|
2253
|
+
/** Injected by Core — creates full session with thread + bridge + persist */
|
|
2254
|
+
createFullSession?: (params: SessionCreateParams & {
|
|
2255
|
+
threadId?: string;
|
|
2256
|
+
createThread?: boolean;
|
|
2257
|
+
}) => Promise<Session>;
|
|
2258
|
+
/** Injected by Core — needed for resolving default agent and workspace */
|
|
2259
|
+
configManager?: ConfigManager$1;
|
|
2260
|
+
/** Injected by Core — needed for resolving agent definitions */
|
|
2261
|
+
agentCatalog?: AgentCatalog;
|
|
2262
|
+
/** Injected by Core — needed for context-aware session creation */
|
|
2263
|
+
getContextManager?: () => ContextManager | undefined;
|
|
2187
2264
|
constructor(agentManager: AgentManager, sessionManager: SessionManager, speechServiceAccessor: SpeechService | (() => SpeechService), eventBus: EventBus, instanceRoot?: string | undefined);
|
|
2188
2265
|
private get speechService();
|
|
2189
2266
|
create(params: SessionCreateParams): Promise<Session>;
|
|
2267
|
+
/**
|
|
2268
|
+
* Get active session by thread, or attempt lazy resume from store.
|
|
2269
|
+
* Used by adapter command handlers and handleMessage().
|
|
2270
|
+
*/
|
|
2271
|
+
getOrResume(channelId: string, threadId: string): Promise<Session | null>;
|
|
2272
|
+
private lazyResume;
|
|
2273
|
+
handleNewSession(channelId: string, agentName?: string, workspacePath?: string, options?: {
|
|
2274
|
+
createThread?: boolean;
|
|
2275
|
+
}): Promise<Session>;
|
|
2276
|
+
/** NOTE: handleNewChat is currently dead code — never called outside core.ts itself.
|
|
2277
|
+
* Moving it anyway for completeness; can be removed in a future cleanup. */
|
|
2278
|
+
handleNewChat(channelId: string, currentThreadId: string): Promise<Session | null>;
|
|
2279
|
+
createSessionWithContext(params: {
|
|
2280
|
+
channelId: string;
|
|
2281
|
+
agentName: string;
|
|
2282
|
+
workingDirectory: string;
|
|
2283
|
+
contextQuery: ContextQuery;
|
|
2284
|
+
contextOptions?: ContextOptions;
|
|
2285
|
+
createThread?: boolean;
|
|
2286
|
+
}): Promise<{
|
|
2287
|
+
session: Session;
|
|
2288
|
+
contextResult: ContextResult | null;
|
|
2289
|
+
}>;
|
|
2190
2290
|
wireSideEffects(session: Session, deps: SideEffectDeps): void;
|
|
2191
2291
|
}
|
|
2192
2292
|
|
|
@@ -2304,63 +2404,6 @@ declare class LifecycleManager {
|
|
|
2304
2404
|
shutdown(): Promise<void>;
|
|
2305
2405
|
}
|
|
2306
2406
|
|
|
2307
|
-
interface ContextProvider {
|
|
2308
|
-
readonly name: string;
|
|
2309
|
-
isAvailable(repoPath: string): Promise<boolean>;
|
|
2310
|
-
listSessions(query: ContextQuery): Promise<SessionListResult>;
|
|
2311
|
-
buildContext(query: ContextQuery, options?: ContextOptions): Promise<ContextResult>;
|
|
2312
|
-
}
|
|
2313
|
-
interface ContextQuery {
|
|
2314
|
-
repoPath: string;
|
|
2315
|
-
type: "branch" | "commit" | "pr" | "latest" | "checkpoint" | "session";
|
|
2316
|
-
value: string;
|
|
2317
|
-
}
|
|
2318
|
-
interface ContextOptions {
|
|
2319
|
-
maxTokens?: number;
|
|
2320
|
-
limit?: number;
|
|
2321
|
-
/** When true, insert `## [agentName]` headers at agent boundaries in merged history */
|
|
2322
|
-
labelAgent?: boolean;
|
|
2323
|
-
}
|
|
2324
|
-
interface SessionInfo {
|
|
2325
|
-
checkpointId: string;
|
|
2326
|
-
sessionIndex: string;
|
|
2327
|
-
transcriptPath: string;
|
|
2328
|
-
createdAt: string;
|
|
2329
|
-
endedAt: string;
|
|
2330
|
-
branch: string;
|
|
2331
|
-
agent: string;
|
|
2332
|
-
turnCount: number;
|
|
2333
|
-
filesTouched: string[];
|
|
2334
|
-
sessionId: string;
|
|
2335
|
-
}
|
|
2336
|
-
interface SessionListResult {
|
|
2337
|
-
sessions: SessionInfo[];
|
|
2338
|
-
estimatedTokens: number;
|
|
2339
|
-
}
|
|
2340
|
-
type ContextMode = "full" | "balanced" | "compact";
|
|
2341
|
-
interface ContextResult {
|
|
2342
|
-
markdown: string;
|
|
2343
|
-
tokenEstimate: number;
|
|
2344
|
-
sessionCount: number;
|
|
2345
|
-
totalTurns: number;
|
|
2346
|
-
mode: ContextMode;
|
|
2347
|
-
truncated: boolean;
|
|
2348
|
-
timeRange: {
|
|
2349
|
-
start: string;
|
|
2350
|
-
end: string;
|
|
2351
|
-
};
|
|
2352
|
-
}
|
|
2353
|
-
|
|
2354
|
-
declare class ContextManager {
|
|
2355
|
-
private providers;
|
|
2356
|
-
private cache;
|
|
2357
|
-
constructor(cachePath?: string);
|
|
2358
|
-
register(provider: ContextProvider): void;
|
|
2359
|
-
getProvider(repoPath: string): Promise<ContextProvider | null>;
|
|
2360
|
-
listSessions(query: ContextQuery): Promise<SessionListResult | null>;
|
|
2361
|
-
buildContext(query: ContextQuery, options?: ContextOptions): Promise<ContextResult | null>;
|
|
2362
|
-
}
|
|
2363
|
-
|
|
2364
2407
|
interface InstanceContext {
|
|
2365
2408
|
id: string;
|
|
2366
2409
|
root: string;
|
|
@@ -2398,11 +2441,10 @@ declare class OpenACPCore {
|
|
|
2398
2441
|
requestRestart: (() => Promise<void>) | null;
|
|
2399
2442
|
private _tunnelService?;
|
|
2400
2443
|
private sessionStore;
|
|
2401
|
-
private resumeLocks;
|
|
2402
|
-
private switchingLocks;
|
|
2403
2444
|
eventBus: EventBus;
|
|
2404
2445
|
sessionFactory: SessionFactory;
|
|
2405
2446
|
readonly lifecycleManager: LifecycleManager;
|
|
2447
|
+
private agentSwitchHandler;
|
|
2406
2448
|
readonly instanceContext?: InstanceContext;
|
|
2407
2449
|
private getService;
|
|
2408
2450
|
get securityGuard(): SecurityGuard;
|
|
@@ -2461,13 +2503,7 @@ declare class OpenACPCore {
|
|
|
2461
2503
|
switchSessionAgent(sessionId: string, toAgent: string): Promise<{
|
|
2462
2504
|
resumed: boolean;
|
|
2463
2505
|
}>;
|
|
2464
|
-
private _doSwitchSessionAgent;
|
|
2465
|
-
/**
|
|
2466
|
-
* Get active session by thread, or attempt lazy resume from store.
|
|
2467
|
-
* Used by adapter command handlers that need a session but don't go through handleMessage().
|
|
2468
|
-
*/
|
|
2469
2506
|
getOrResumeSession(channelId: string, threadId: string): Promise<Session | null>;
|
|
2470
|
-
private lazyResume;
|
|
2471
2507
|
/** Create a SessionBridge for the given session and adapter */
|
|
2472
2508
|
createBridge(session: Session, adapter: IChannelAdapter): SessionBridge;
|
|
2473
2509
|
}
|
|
@@ -2636,6 +2672,114 @@ declare class FileService {
|
|
|
2636
2672
|
static extensionFromMime(mimeType: string): string;
|
|
2637
2673
|
}
|
|
2638
2674
|
|
|
2675
|
+
interface ApiConfig {
|
|
2676
|
+
port: number;
|
|
2677
|
+
host: string;
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
interface StoredToken {
|
|
2681
|
+
id: string;
|
|
2682
|
+
name: string;
|
|
2683
|
+
role: string;
|
|
2684
|
+
scopes?: string[];
|
|
2685
|
+
createdAt: string;
|
|
2686
|
+
refreshDeadline: string;
|
|
2687
|
+
lastUsedAt?: string;
|
|
2688
|
+
revoked: boolean;
|
|
2689
|
+
}
|
|
2690
|
+
interface CreateTokenOpts {
|
|
2691
|
+
role: string;
|
|
2692
|
+
name: string;
|
|
2693
|
+
expire: string;
|
|
2694
|
+
scopes?: string[];
|
|
2695
|
+
}
|
|
2696
|
+
|
|
2697
|
+
declare class TokenStore {
|
|
2698
|
+
private filePath;
|
|
2699
|
+
private tokens;
|
|
2700
|
+
private savePromise;
|
|
2701
|
+
private savePending;
|
|
2702
|
+
constructor(filePath: string);
|
|
2703
|
+
load(): Promise<void>;
|
|
2704
|
+
save(): Promise<void>;
|
|
2705
|
+
private scheduleSave;
|
|
2706
|
+
create(opts: CreateTokenOpts): StoredToken;
|
|
2707
|
+
get(id: string): StoredToken | undefined;
|
|
2708
|
+
revoke(id: string): void;
|
|
2709
|
+
list(): StoredToken[];
|
|
2710
|
+
private lastUsedSaveTimer;
|
|
2711
|
+
updateLastUsed(id: string): void;
|
|
2712
|
+
/** Wait for any in-flight save to complete */
|
|
2713
|
+
flush(): Promise<void>;
|
|
2714
|
+
destroy(): void;
|
|
2715
|
+
cleanup(): void;
|
|
2716
|
+
}
|
|
2717
|
+
|
|
2718
|
+
interface ApiServerOptions {
|
|
2719
|
+
port: number;
|
|
2720
|
+
host: string;
|
|
2721
|
+
getSecret: () => string;
|
|
2722
|
+
getJwtSecret: () => string;
|
|
2723
|
+
tokenStore: TokenStore;
|
|
2724
|
+
logger?: boolean;
|
|
2725
|
+
}
|
|
2726
|
+
interface ApiServerInstance {
|
|
2727
|
+
app: FastifyInstance;
|
|
2728
|
+
start(): Promise<{
|
|
2729
|
+
port: number;
|
|
2730
|
+
host: string;
|
|
2731
|
+
}>;
|
|
2732
|
+
stop(): Promise<void>;
|
|
2733
|
+
registerPlugin(prefix: string, plugin: FastifyPluginAsync, opts?: {
|
|
2734
|
+
auth?: boolean;
|
|
2735
|
+
}): void;
|
|
2736
|
+
}
|
|
2737
|
+
declare function createApiServer(options: ApiServerOptions): Promise<ApiServerInstance>;
|
|
2738
|
+
|
|
2739
|
+
interface ApiServerService {
|
|
2740
|
+
registerPlugin(prefix: string, plugin: FastifyPluginAsync, opts?: {
|
|
2741
|
+
auth?: boolean;
|
|
2742
|
+
}): void;
|
|
2743
|
+
authPreHandler: preHandlerHookHandler;
|
|
2744
|
+
requireScopes(...scopes: string[]): preHandlerHookHandler;
|
|
2745
|
+
requireRole(role: string): preHandlerHookHandler;
|
|
2746
|
+
getPort(): number;
|
|
2747
|
+
getBaseUrl(): string;
|
|
2748
|
+
getTunnelUrl(): string | null;
|
|
2749
|
+
}
|
|
2750
|
+
declare function createApiServerService(server: ApiServerInstance, getPort: () => number, getBaseUrl: () => string, getTunnelUrl: () => string | null, authPreHandler: preHandlerHookHandler): ApiServerService;
|
|
2751
|
+
|
|
2752
|
+
interface SessionStats {
|
|
2753
|
+
active: number;
|
|
2754
|
+
total: number;
|
|
2755
|
+
}
|
|
2756
|
+
declare class SSEManager {
|
|
2757
|
+
private eventBus;
|
|
2758
|
+
private getSessionStats;
|
|
2759
|
+
private startedAt;
|
|
2760
|
+
private sseConnections;
|
|
2761
|
+
private sseCleanupHandlers;
|
|
2762
|
+
private healthInterval?;
|
|
2763
|
+
private boundHandlers;
|
|
2764
|
+
constructor(eventBus: EventBus | undefined, getSessionStats: () => SessionStats, startedAt: number);
|
|
2765
|
+
setup(): void;
|
|
2766
|
+
handleRequest(req: http.IncomingMessage, res: http.ServerResponse): void;
|
|
2767
|
+
broadcast(event: string, data: unknown): void;
|
|
2768
|
+
/**
|
|
2769
|
+
* Returns a Fastify route handler that hijacks the response
|
|
2770
|
+
* and delegates to the raw http SSE handler.
|
|
2771
|
+
*/
|
|
2772
|
+
createFastifyHandler(): (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
|
|
2773
|
+
stop(): void;
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2776
|
+
declare class StaticServer {
|
|
2777
|
+
private uiDir;
|
|
2778
|
+
constructor(uiDir?: string);
|
|
2779
|
+
isAvailable(): boolean;
|
|
2780
|
+
serve(req: http.IncomingMessage, res: http.ServerResponse): boolean;
|
|
2781
|
+
}
|
|
2782
|
+
|
|
2639
2783
|
interface TopicInfo {
|
|
2640
2784
|
sessionId: string;
|
|
2641
2785
|
topicId: number | null;
|
|
@@ -2681,63 +2825,6 @@ declare class TopicManager {
|
|
|
2681
2825
|
private isSystemTopic;
|
|
2682
2826
|
}
|
|
2683
2827
|
|
|
2684
|
-
interface ApiConfig {
|
|
2685
|
-
port: number;
|
|
2686
|
-
host: string;
|
|
2687
|
-
}
|
|
2688
|
-
declare class ApiServer {
|
|
2689
|
-
private core;
|
|
2690
|
-
private config;
|
|
2691
|
-
private topicManager?;
|
|
2692
|
-
private server;
|
|
2693
|
-
private actualPort;
|
|
2694
|
-
private portFilePath;
|
|
2695
|
-
private startedAt;
|
|
2696
|
-
private secret;
|
|
2697
|
-
private secretFilePath;
|
|
2698
|
-
private sseManager;
|
|
2699
|
-
private staticServer;
|
|
2700
|
-
private router;
|
|
2701
|
-
constructor(core: OpenACPCore, config: ApiConfig, portFilePath?: string, topicManager?: TopicManager | undefined, secretFilePath?: string, uiDir?: string);
|
|
2702
|
-
start(): Promise<void>;
|
|
2703
|
-
stop(): Promise<void>;
|
|
2704
|
-
getPort(): number;
|
|
2705
|
-
getSecret(): string;
|
|
2706
|
-
private writePortFile;
|
|
2707
|
-
private removePortFile;
|
|
2708
|
-
private loadOrCreateSecret;
|
|
2709
|
-
private authenticate;
|
|
2710
|
-
private handleRequest;
|
|
2711
|
-
private sendJson;
|
|
2712
|
-
private readBody;
|
|
2713
|
-
}
|
|
2714
|
-
|
|
2715
|
-
interface SessionStats {
|
|
2716
|
-
active: number;
|
|
2717
|
-
total: number;
|
|
2718
|
-
}
|
|
2719
|
-
declare class SSEManager {
|
|
2720
|
-
private eventBus;
|
|
2721
|
-
private getSessionStats;
|
|
2722
|
-
private startedAt;
|
|
2723
|
-
private sseConnections;
|
|
2724
|
-
private sseCleanupHandlers;
|
|
2725
|
-
private healthInterval?;
|
|
2726
|
-
private boundHandlers;
|
|
2727
|
-
constructor(eventBus: EventBus | undefined, getSessionStats: () => SessionStats, startedAt: number);
|
|
2728
|
-
setup(): void;
|
|
2729
|
-
handleRequest(req: http.IncomingMessage, res: http.ServerResponse): void;
|
|
2730
|
-
broadcast(event: string, data: unknown): void;
|
|
2731
|
-
stop(): void;
|
|
2732
|
-
}
|
|
2733
|
-
|
|
2734
|
-
declare class StaticServer {
|
|
2735
|
-
private uiDir;
|
|
2736
|
-
constructor(uiDir?: string);
|
|
2737
|
-
isAvailable(): boolean;
|
|
2738
|
-
serve(req: http.IncomingMessage, res: http.ServerResponse): boolean;
|
|
2739
|
-
}
|
|
2740
|
-
|
|
2741
2828
|
declare class EntireProvider implements ContextProvider {
|
|
2742
2829
|
readonly name = "entire";
|
|
2743
2830
|
isAvailable(repoPath: string): Promise<boolean>;
|
|
@@ -3111,10 +3198,8 @@ interface ConfigManagerLike {
|
|
|
3111
3198
|
get(): Record<string, unknown>;
|
|
3112
3199
|
}
|
|
3113
3200
|
interface SessionManagerLike {
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
outputMode?: OutputMode;
|
|
3117
|
-
};
|
|
3201
|
+
getSessionRecord(id: string): {
|
|
3202
|
+
outputMode?: OutputMode;
|
|
3118
3203
|
} | undefined;
|
|
3119
3204
|
}
|
|
3120
3205
|
declare class OutputModeResolver {
|
|
@@ -3125,7 +3210,7 @@ declare class OutputModeResolver {
|
|
|
3125
3210
|
* OpenACP Product Guide — comprehensive reference for the AI assistant.
|
|
3126
3211
|
* The assistant reads this at runtime to answer user questions about features.
|
|
3127
3212
|
*/
|
|
3128
|
-
declare const PRODUCT_GUIDE = "\n# OpenACP \u2014 Product Guide\n\nOpenACP lets you chat with AI coding agents (like Claude Code) through messaging platforms (Telegram, Discord).\nYou type messages in your chat platform, the agent reads/writes/runs code in your project folder, and results stream back in real time.\n\n---\n\n## Quick Start\n\n1. Start OpenACP: `openacp` (or `openacp start` for background daemon)\n2. Open your messaging platform (Telegram group or Discord server) \u2014 you'll see the Assistant topic/thread\n3. Tap/click \uD83C\uDD95 New Session or type /new\n4. Pick an agent and a project folder\n5. Chat in the session topic/thread \u2014 the agent works on your code\n\n---\n\n## Core Concepts\n\n### Sessions\nA session = one conversation with one AI agent working in one project folder.\nEach session gets its own topic (Telegram) or forum thread (Discord). Chat there to give instructions to the agent.\n\n### Agents\nAn agent is an AI coding tool (e.g., Claude Code, Gemini, Cursor, Codex, etc.).\nOpenACP supports 28+ agents from the official ACP Registry (agentclientprotocol.com).\nYou can install multiple agents and choose which one to use per session.\nThe default agent is used when you don't specify one.\n\n### Agent Management\n- Browse agents: `/agents` in your chat platform or `openacp agents` in CLI\n- Install: tap the install button in /agents, or `openacp agents install <name>`\n- Uninstall: `openacp agents uninstall <name>`\n- Setup/login: `openacp agents run <name> -- <args>` (e.g., `openacp agents run gemini -- auth login`)\n- Details: `openacp agents info <name>` shows version, dependencies, and setup steps\n\nSome agents need additional setup before they can be used:\n- Claude: requires `claude login`\n- Gemini: requires `openacp agents run gemini -- auth login`\n- Codex: requires setting `OPENAI_API_KEY` environment variable\n- GitHub Copilot: requires `openacp agents run copilot -- auth login`\n\nAgents are installed in three ways depending on the agent:\n- **npx** \u2014 Node.js agents, downloaded automatically on first use\n- **uvx** \u2014 Python agents, downloaded automatically on first use\n- **binary** \u2014 Platform-specific binaries, downloaded to `~/.openacp/agents/`\n\n### Project Folder (Workspace)\nThe directory where the agent reads, writes, and runs code.\nWhen creating a session, you choose which folder the agent works in.\nYou can type a full path like `~/code/my-project` or just a name like `my-project` (it becomes `<base-dir>/my-project`).\n\n### System Topics\n- **Assistant** \u2014 Always-on helper that can answer questions, create sessions, check status, troubleshoot\n- **Notifications** \u2014 System alerts (permission requests, session errors, completions)\n\n---\n\n## Creating Sessions\n\n### From menu\nTap \uD83C\uDD95 New Session \u2192 choose agent (if multiple) \u2192 choose project folder \u2192 confirm\n\n### From command\n- `/new` \u2014 Interactive flow (asks agent + folder)\n- `/new claude ~/code/my-project` \u2014 Create directly with specific agent and folder\n\n### From Assistant topic\nJust ask: \"Create a session for my-project with claude\" \u2014 the assistant handles it\n\n### Quick new chat\n`/newchat` in a session topic \u2014 creates new session with same agent and folder as current one\n\n---\n\n## Working with Sessions\n\n### Chat\nType messages in the session topic. The agent responds with code changes, explanations, tool outputs.\n\n### What you see while the agent works\n- **\uD83D\uDCAD Thinking indicator** \u2014 Shows when the agent is reasoning, with elapsed time\n- **Text responses** \u2014 Streamed in real time, updated every few seconds\n- **Tool calls** \u2014 When the agent runs commands or edits files, you see tool name, input, status, and output\n- **\uD83D\uDCCB Plan card** \u2014 Visual task progress with completed/in-progress/pending items and progress bar\n- **\"View File\" / \"View Diff\" buttons** \u2014 Opens in browser with Monaco editor (requires tunnel)\n\n### Session lifecycle\n1. **Creating** \u2014 Topic created, agent spawning\n2. **Warming up** \u2014 Agent primes its cache (happens automatically, invisible to you)\n3. **Active** \u2014 Ready for your messages\n4. **Auto-naming** \u2014 After your first message, the session gets a descriptive name (agent summarizes in ~5 words). The topic title updates automatically.\n5. **Finished/Error** \u2014 Session completed or hit an error\n\n### Agent skills\nSome agents provide slash commands (e.g., /compact, /review). Available skills are pinned in the session topic.\n\n### Permission requests\nWhen the agent wants to run a command, it asks for permission.\nYou see buttons: \u2705 Allow, \u274C Reject (and sometimes \"Always Allow\").\nA notification also appears in the Notifications topic with a link to the request.\n\n### Dangerous mode\nAuto-approves ALL permission requests \u2014 the agent runs any command without asking.\n- Enable: `/enable_dangerous` or tap the \u2620\uFE0F button in the session\n- Disable: `/disable_dangerous` or tap the \uD83D\uDD10 button\n- \u26A0\uFE0F Use with caution \u2014 the agent can execute anything\n\n### Session timeout\nIdle sessions are automatically cancelled after a configurable timeout (default: 60 minutes).\nConfigure via `security.sessionTimeoutMinutes` in config.\n\n---\n\n## Session Transfer (Handoff)\n\n### Chat \u2192 Terminal\n1. Type `/handoff` in a session topic/thread\n2. You get a command like `claude --resume <SESSION_ID>`\n3. Copy and run it in your terminal \u2014 the session continues there with full conversation history\n\n### Terminal \u2192 Chat\n1. First time: run `openacp integrate claude` to install the handoff skill (one-time setup)\n2. In Claude Code, use the /openacp:handoff slash command\n3. The session appears as a new topic/thread and you can continue chatting there\n\n### How it works\n- The agent session ID is shared between platforms\n- Conversation history is preserved \u2014 pick up where you left off\n- The agent that supports resume (e.g., Claude with `--resume`) handles the actual transfer\n\n---\n\n## Managing Sessions\n\n### Status\n- `/status` \u2014 Shows active sessions count and details\n- Ask the Assistant: \"What sessions are running?\"\n\n### List all sessions\n- `/sessions` \u2014 Shows all sessions with status (active, finished, error)\n\n### Cancel\n- `/cancel` in a session topic \u2014 cancels that session\n- Ask the Assistant: \"Cancel the stuck session\"\n\n### Cleanup\n- From `/sessions` \u2192 tap cleanup buttons (finished, errors, all)\n- Ask the Assistant: \"Clean up old sessions\"\n\n---\n\n## Assistant Topic\n\nThe Assistant is an always-on AI helper in its own topic. It can:\n- Answer questions about OpenACP\n- Create sessions for you\n- Check status and health\n- Cancel sessions\n- Clean up old sessions\n- Troubleshoot issues\n- Manage configuration\n\nJust chat naturally: \"How do I create a session?\", \"What's the status?\", \"Something is stuck\"\n\n### Clear history\n`/clear` in the Assistant topic \u2014 resets the conversation\n\n---\n\n## System Commands\n\n| Command | Where | What it does |\n|---------|-------|-------------|\n| `/new [agent] [path]` | Anywhere | Create new session |\n| `/newchat` | Session topic | New session, same agent + folder |\n| `/cancel` | Session topic | Cancel current session |\n| `/status` | Anywhere | Show status |\n| `/sessions` | Anywhere | List all sessions |\n| `/agents` | Anywhere | Browse & install agents from ACP Registry |\n| `/install <name>` | Anywhere | Install an agent |\n| `/enable_dangerous` | Session topic | Auto-approve all permissions |\n| `/disable_dangerous` | Session topic | Restore permission prompts |\n| `/handoff` | Session topic | Transfer session to terminal |\n| `/clear` | Assistant topic | Clear assistant history |\n| `/menu` | Anywhere | Show action menu |\n| `/help` | Anywhere | Show help |\n| `/restart` | Anywhere | Restart OpenACP |\n| `/update` | Anywhere | Update to latest version |\n| `/integrate` | Anywhere | Manage agent integrations |\n\n---\n\n## Menu Buttons\n\n| Button | Action |\n|--------|--------|\n| \uD83C\uDD95 New Session | Create new session (interactive) |\n| \uD83D\uDCCB Sessions | List all sessions with cleanup options |\n| \uD83D\uDCCA Status | Show active/total session count |\n| \uD83E\uDD16 Agents | List available agents |\n| \uD83D\uDD17 Integrate | Manage agent integrations |\n| \u2753 Help | Show help text |\n| \uD83D\uDD04 Restart | Restart OpenACP |\n| \u2B06\uFE0F Update | Check and install updates |\n\n---\n\n## CLI Commands\n\n### Server\n- `openacp` \u2014 Start (uses configured mode: foreground or daemon)\n- `openacp start` \u2014 Start as background daemon\n- `openacp stop` \u2014 Stop daemon\n- `openacp status` \u2014 Show daemon status\n- `openacp logs` \u2014 Tail daemon logs\n- `openacp --foreground` \u2014 Force foreground mode (useful for debugging or containers)\n\n### Auto-start (run on boot)\n- macOS: installs a LaunchAgent in `~/Library/LaunchAgents/`\n- Linux: installs a systemd user service in `~/.config/systemd/user/`\n- Enabled automatically when you start the daemon. Remove with `openacp stop`.\n\n### Configuration\n- `openacp config` \u2014 Interactive config editor\n- `openacp reset` \u2014 Delete all data and start fresh\n\n### Agent Management (CLI)\n- `openacp agents` \u2014 List all agents (installed + available from ACP Registry)\n- `openacp agents install <name>` \u2014 Install an agent\n- `openacp agents uninstall <name>` \u2014 Remove an agent\n- `openacp agents info <name>` \u2014 Show details, dependencies, and setup guide\n- `openacp agents run <name> [-- args]` \u2014 Run agent CLI directly (for login, config, etc.)\n- `openacp agents refresh` \u2014 Force-refresh registry cache\n\n### Plugins\n- `openacp install <package>` \u2014 Install adapter plugin\n- `openacp uninstall <package>` \u2014 Remove adapter plugin\n- `openacp plugins` \u2014 List installed plugins\n\n### Integration\n- `openacp integrate <agent>` \u2014 Install agent integration (e.g., Claude handoff skill)\n- `openacp integrate <agent> --uninstall` \u2014 Remove integration\n\n### API (requires running daemon)\n`openacp api <command>` \u2014 Interact with running daemon:\n\n| Command | Description |\n|---------|-------------|\n| `status` | List active sessions |\n| `session <id>` | Session details |\n| `new <agent> <path>` | Create session |\n| `send <id> \"text\"` | Send prompt |\n| `cancel <id>` | Cancel session |\n| `dangerous <id> on/off` | Toggle dangerous mode |\n| `topics [--status x,y]` | List topics |\n| `delete-topic <id> [--force]` | Delete topic |\n| `cleanup [--status x,y]` | Cleanup old topics |\n| `agents` | List agents |\n| `health` | System health |\n| `config` | Show config |\n| `config set <key> <value>` | Update config |\n| `adapters` | List adapters |\n| `tunnel` | Tunnel status |\n| `notify \"message\"` | Send notification |\n| `version` | Daemon version |\n| `restart` | Restart daemon |\n\n---\n\n## File Viewer (Tunnel)\n\nWhen tunnel is enabled, file edits and diffs get \"View\" buttons that open in your browser:\n- **Monaco Editor** \u2014 Full VS Code editor with syntax highlighting\n- **Diff viewer** \u2014 Side-by-side or inline comparison\n- **Line highlighting** \u2014 Click lines to highlight\n- Dark/light theme toggle\n\n### Setup\nEnable in config: set `tunnel.enabled` to `true`.\nProviders: Cloudflare (default, free), ngrok, bore, Tailscale Funnel.\n\n### Port Tunneling\n\nExpose any local port (dev servers, APIs, etc.) to the internet:\n\n**CLI commands** (agent can call these directly):\n- `openacp tunnel add <port> --label <name>` \u2014 Create tunnel to a local port\n- `openacp tunnel list` \u2014 List active tunnels\n- `openacp tunnel stop <port>` \u2014 Stop a tunnel\n- `openacp tunnel stop-all` \u2014 Stop all user tunnels\n\n**Telegram commands**:\n- `/tunnel <port> [label]` \u2014 Create tunnel\n- `/tunnels` \u2014 List active tunnels\n- `/tunnel stop <port>` \u2014 Stop tunnel\n\nExample: after starting a dev server on port 3000, run `openacp tunnel add 3000 --label my-app` to get a public URL.\n\n---\n\n## Configuration\n\nConfig file: `~/.openacp/config.json`\n\n### Channels\n- **channels.telegram.botToken** \u2014 Your Telegram bot token\n- **channels.telegram.chatId** \u2014 Your Telegram supergroup ID\n- **channels.discord.botToken** \u2014 Your Discord bot token\n- **channels.discord.guildId** \u2014 Your Discord server (guild) ID\n\n### Agents\n- **defaultAgent** \u2014 Which agent to use by default\n- Agents are managed via `/agents` (Telegram) or `openacp agents` (CLI)\n- Installed agents are stored in `~/.openacp/agents.json`\n- Agent list is fetched from the ACP Registry CDN and cached locally (24h)\n\n### Workspace\n- **workspace.baseDir** \u2014 Base directory for project folders (default: `~/openacp-workspace`)\n\n### Security\n- **security.allowedUserIds** \u2014 Restrict who can use the bot (empty = everyone)\n- **security.maxConcurrentSessions** \u2014 Max parallel sessions (default: 5)\n- **security.sessionTimeoutMinutes** \u2014 Auto-cancel idle sessions (default: 60)\n\n### Tunnel / File Viewer\n- **tunnel.enabled** \u2014 Enable file viewer tunnel\n- **tunnel.provider** \u2014 Tunnel provider: cloudflare (default, free), ngrok, bore, tailscale\n- **tunnel.port** \u2014 Local port for tunnel server (default: 3100)\n- **tunnel.auth.enabled** \u2014 Enable authentication for tunnel URLs\n- **tunnel.auth.token** \u2014 Auth token for tunnel access\n- **tunnel.storeTtlMinutes** \u2014 How long viewer links stay cached (default: 60)\n\n### Logging\n- **logging.level** \u2014 Log level: silent, debug, info, warn, error, fatal (default: info)\n- **logging.logDir** \u2014 Log directory (default: `~/.openacp/logs`)\n- **logging.maxFileSize** \u2014 Max log file size before rotation\n- **logging.maxFiles** \u2014 Max number of rotated log files\n- **logging.sessionLogRetentionDays** \u2014 Auto-delete old session logs (default: 30)\n\n### Data Retention\n- **sessionStore.ttlDays** \u2014 How long session records persist (default: 30). Old records are cleaned up automatically.\n\n### Environment variables\nOverride config with env vars:\n- `OPENACP_TELEGRAM_BOT_TOKEN`\n- `OPENACP_TELEGRAM_CHAT_ID`\n- `OPENACP_DISCORD_BOT_TOKEN`\n- `OPENACP_DISCORD_GUILD_ID`\n- `OPENACP_DEFAULT_AGENT`\n- `OPENACP_RUN_MODE` \u2014 foreground or daemon\n- `OPENACP_API_PORT` \u2014 API server port (default: 21420)\n- `OPENACP_TUNNEL_ENABLED`\n- `OPENACP_TUNNEL_PORT`\n- `OPENACP_TUNNEL_PROVIDER`\n- `OPENACP_LOG_LEVEL`\n- `OPENACP_LOG_DIR`\n- `OPENACP_DEBUG` \u2014 Sets log level to debug\n\n---\n\n## Troubleshooting\n\n### Session stuck / not responding\n- Check status: ask Assistant \"Is anything stuck?\"\n- Cancel and create new: `/cancel` then `/new`\n- Check system health: Assistant can run health check\n\n### Agent not found\n- Check available agents: `/agents` or `openacp agents`\n- Install missing agent: `openacp agents install <name>`\n- Some agents need login first: `openacp agents info <name>` to see setup steps\n- Run agent CLI for setup: `openacp agents run <name> -- <args>`\n\n### Permission request not showing\n- Check Notifications topic for the alert\n- Try `/enable_dangerous` to auto-approve (if you trust the agent)\n\n### Session disappeared after restart\n- Sessions persist across restarts\n- Send a message in the old topic \u2014 it auto-resumes\n- If topic was deleted, the session record may still exist in status\n\n### Bot not responding at all\n- Check daemon: `openacp status`\n- Check logs: `openacp logs`\n- Restart: `openacp start` or `/restart`\n\n### Messages going to wrong topic\n- Each session is bound to a specific topic/thread\n- If you see messages appearing in the Assistant topic instead of the session topic, try creating a new session\n\n### Viewing logs\n- Session-specific logs: `~/.openacp/logs/sessions/`\n- System logs: `openacp logs` to tail live\n- Set `OPENACP_DEBUG=true` for verbose output\n\n---\n\n## Data & Storage\n\nAll data is stored in `~/.openacp/`:\n- `config.json` \u2014 Configuration\n- `agents.json` \u2014 Installed agents (managed by AgentCatalog)\n- `registry-cache.json` \u2014 Cached ACP Registry data (refreshes every 24h)\n- `agents/` \u2014 Downloaded binary agents\n- `sessions/` \u2014 Session records and state\n- `topics/` \u2014 Topic-to-session mappings\n- `logs/` \u2014 System and session logs\n- `plugins/` \u2014 Installed adapter plugins\n- `openacp.pid` \u2014 Daemon PID file\n\nSession records auto-cleanup: 30 days (configurable via `sessionStore.ttlDays`).\nSession logs auto-cleanup: 30 days (configurable via `logging.sessionLogRetentionDays`).\n";
|
|
3213
|
+
declare const PRODUCT_GUIDE = "\n# OpenACP \u2014 Product Guide\n\nOpenACP lets you chat with AI coding agents (like Claude Code) through messaging platforms (Telegram, Discord).\nYou type messages in your chat platform, the agent reads/writes/runs code in your project folder, and results stream back in real time.\n\n---\n\n## Quick Start\n\n1. Start OpenACP: `openacp` (or `openacp start` for background daemon)\n2. Open your messaging platform (Telegram group or Discord server) \u2014 you'll see the Assistant topic/thread\n3. Tap/click \uD83C\uDD95 New Session or type /new\n4. Pick an agent and a project folder\n5. Chat in the session topic/thread \u2014 the agent works on your code\n\n---\n\n## Core Concepts\n\n### Sessions\nA session = one conversation with one AI agent working in one project folder.\nEach session gets its own topic (Telegram) or forum thread (Discord). Chat there to give instructions to the agent.\n\n### Agents\nAn agent is an AI coding tool (e.g., Claude Code, Gemini, Cursor, Codex, etc.).\nOpenACP supports 28+ agents from the official ACP Registry (agentclientprotocol.com).\nYou can install multiple agents and choose which one to use per session.\nThe default agent is used when you don't specify one.\n\n### Agent Management\n- Browse agents: `/agents` in your chat platform or `openacp agents` in CLI\n- Install: tap the install button in /agents, or `openacp agents install <name>`\n- Uninstall: `openacp agents uninstall <name>`\n- Setup/login: `openacp agents run <name> -- <args>` (e.g., `openacp agents run gemini -- auth login`)\n- Details: `openacp agents info <name>` shows version, dependencies, and setup steps\n\nSome agents need additional setup before they can be used:\n- Claude: requires `claude login`\n- Gemini: requires `openacp agents run gemini -- auth login`\n- Codex: requires setting `OPENAI_API_KEY` environment variable\n- GitHub Copilot: requires `openacp agents run copilot -- auth login`\n\nAgents are installed in three ways depending on the agent:\n- **npx** \u2014 Node.js agents, downloaded automatically on first use\n- **uvx** \u2014 Python agents, downloaded automatically on first use\n- **binary** \u2014 Platform-specific binaries, downloaded to `~/.openacp/agents/`\n\n### Project Folder (Workspace)\nThe directory where the agent reads, writes, and runs code.\nWhen creating a session, you choose which folder the agent works in.\nYou can type a full path like `~/code/my-project` or just a name like `my-project` (it becomes `<base-dir>/my-project`).\n\n### System Topics\n- **Assistant** \u2014 Always-on helper that can answer questions, create sessions, check status, troubleshoot\n- **Notifications** \u2014 System alerts (permission requests, session errors, completions)\n\n---\n\n## Creating Sessions\n\n### From menu\nTap \uD83C\uDD95 New Session \u2192 choose agent (if multiple) \u2192 choose project folder \u2192 confirm\n\n### From command\n- `/new` \u2014 Interactive flow (asks agent + folder)\n- `/new claude ~/code/my-project` \u2014 Create directly with specific agent and folder\n\n### From Assistant topic\nJust ask: \"Create a session for my-project with claude\" \u2014 the assistant handles it\n\n### Quick new chat\n`/newchat` in a session topic \u2014 creates new session with same agent and folder as current one\n\n---\n\n## Working with Sessions\n\n### Chat\nType messages in the session topic. The agent responds with code changes, explanations, tool outputs.\n\n### What you see while the agent works\n- **\uD83D\uDCAD Thinking indicator** \u2014 Shows when the agent is reasoning, with elapsed time\n- **Text responses** \u2014 Streamed in real time, updated every few seconds\n- **Tool calls** \u2014 When the agent runs commands or edits files, you see tool name, input, status, and output\n- **\uD83D\uDCCB Plan card** \u2014 Visual task progress with completed/in-progress/pending items and progress bar\n- **\"View File\" / \"View Diff\" buttons** \u2014 Opens in browser with Monaco editor (requires tunnel)\n\n### Session lifecycle\n1. **Creating** \u2014 Topic created, agent spawning\n2. **Warming up** \u2014 Agent primes its cache (happens automatically, invisible to you)\n3. **Active** \u2014 Ready for your messages\n4. **Auto-naming** \u2014 After your first message, the session gets a descriptive name (agent summarizes in ~5 words). The topic title updates automatically.\n5. **Finished/Error** \u2014 Session completed or hit an error\n\n### Agent skills\nSome agents provide slash commands (e.g., /compact, /review). Available skills are pinned in the session topic.\n\n### Permission requests\nWhen the agent wants to run a command, it asks for permission.\nYou see buttons: \u2705 Allow, \u274C Reject (and sometimes \"Always Allow\").\nA notification also appears in the Notifications topic with a link to the request.\n\n### Bypass permissions\nAuto-approves ALL permission requests \u2014 the agent runs any command without asking.\n- Enable: `/enable_bypass` or tap the \u2620\uFE0F button in the session\n- Disable: `/disable_bypass` or tap the \uD83D\uDD10 button\n- \u26A0\uFE0F Use with caution \u2014 the agent can execute anything\n\n### Session timeout\nIdle sessions are automatically cancelled after a configurable timeout (default: 60 minutes).\nConfigure via `security.sessionTimeoutMinutes` in config.\n\n---\n\n## Session Transfer (Handoff)\n\n### Chat \u2192 Terminal\n1. Type `/handoff` in a session topic/thread\n2. You get a command like `claude --resume <SESSION_ID>`\n3. Copy and run it in your terminal \u2014 the session continues there with full conversation history\n\n### Terminal \u2192 Chat\n1. First time: run `openacp integrate claude` to install the handoff skill (one-time setup)\n2. In Claude Code, use the /openacp:handoff slash command\n3. The session appears as a new topic/thread and you can continue chatting there\n\n### How it works\n- The agent session ID is shared between platforms\n- Conversation history is preserved \u2014 pick up where you left off\n- The agent that supports resume (e.g., Claude with `--resume`) handles the actual transfer\n\n---\n\n## Managing Sessions\n\n### Status\n- `/status` \u2014 Shows active sessions count and details\n- Ask the Assistant: \"What sessions are running?\"\n\n### List all sessions\n- `/sessions` \u2014 Shows all sessions with status (active, finished, error)\n\n### Cancel\n- `/cancel` in a session topic \u2014 cancels that session\n- Ask the Assistant: \"Cancel the stuck session\"\n\n### Cleanup\n- From `/sessions` \u2192 tap cleanup buttons (finished, errors, all)\n- Ask the Assistant: \"Clean up old sessions\"\n\n---\n\n## Assistant Topic\n\nThe Assistant is an always-on AI helper in its own topic. It can:\n- Answer questions about OpenACP\n- Create sessions for you\n- Check status and health\n- Cancel sessions\n- Clean up old sessions\n- Troubleshoot issues\n- Manage configuration\n\nJust chat naturally: \"How do I create a session?\", \"What's the status?\", \"Something is stuck\"\n\n### Clear history\n`/clear` in the Assistant topic \u2014 resets the conversation\n\n---\n\n## System Commands\n\n| Command | Where | What it does |\n|---------|-------|-------------|\n| `/new [agent] [path]` | Anywhere | Create new session |\n| `/newchat` | Session topic | New session, same agent + folder |\n| `/cancel` | Session topic | Cancel current session |\n| `/status` | Anywhere | Show status |\n| `/sessions` | Anywhere | List all sessions |\n| `/agents` | Anywhere | Browse & install agents from ACP Registry |\n| `/install <name>` | Anywhere | Install an agent |\n| `/enable_bypass` | Session topic | Auto-approve all permissions |\n| `/disable_bypass` | Session topic | Restore permission prompts |\n| `/handoff` | Session topic | Transfer session to terminal |\n| `/clear` | Assistant topic | Clear assistant history |\n| `/menu` | Anywhere | Show action menu |\n| `/help` | Anywhere | Show help |\n| `/restart` | Anywhere | Restart OpenACP |\n| `/update` | Anywhere | Update to latest version |\n| `/integrate` | Anywhere | Manage agent integrations |\n\n---\n\n## Menu Buttons\n\n| Button | Action |\n|--------|--------|\n| \uD83C\uDD95 New Session | Create new session (interactive) |\n| \uD83D\uDCCB Sessions | List all sessions with cleanup options |\n| \uD83D\uDCCA Status | Show active/total session count |\n| \uD83E\uDD16 Agents | List available agents |\n| \uD83D\uDD17 Integrate | Manage agent integrations |\n| \u2753 Help | Show help text |\n| \uD83D\uDD04 Restart | Restart OpenACP |\n| \u2B06\uFE0F Update | Check and install updates |\n\n---\n\n## CLI Commands\n\n### Server\n- `openacp` \u2014 Start (uses configured mode: foreground or daemon)\n- `openacp start` \u2014 Start as background daemon\n- `openacp stop` \u2014 Stop daemon\n- `openacp status` \u2014 Show daemon status\n- `openacp logs` \u2014 Tail daemon logs\n- `openacp --foreground` \u2014 Force foreground mode (useful for debugging or containers)\n\n### Auto-start (run on boot)\n- macOS: installs a LaunchAgent in `~/Library/LaunchAgents/`\n- Linux: installs a systemd user service in `~/.config/systemd/user/`\n- Enabled automatically when you start the daemon. Remove with `openacp stop`.\n\n### Configuration\n- `openacp config` \u2014 Interactive config editor\n- `openacp reset` \u2014 Delete all data and start fresh\n\n### Agent Management (CLI)\n- `openacp agents` \u2014 List all agents (installed + available from ACP Registry)\n- `openacp agents install <name>` \u2014 Install an agent\n- `openacp agents uninstall <name>` \u2014 Remove an agent\n- `openacp agents info <name>` \u2014 Show details, dependencies, and setup guide\n- `openacp agents run <name> [-- args]` \u2014 Run agent CLI directly (for login, config, etc.)\n- `openacp agents refresh` \u2014 Force-refresh registry cache\n\n### Plugins\n- `openacp install <package>` \u2014 Install adapter plugin\n- `openacp uninstall <package>` \u2014 Remove adapter plugin\n- `openacp plugins` \u2014 List installed plugins\n\n### Integration\n- `openacp integrate <agent>` \u2014 Install agent integration (e.g., Claude handoff skill)\n- `openacp integrate <agent> --uninstall` \u2014 Remove integration\n\n### API (requires running daemon)\n`openacp api <command>` \u2014 Interact with running daemon:\n\n| Command | Description |\n|---------|-------------|\n| `status` | List active sessions |\n| `session <id>` | Session details |\n| `new <agent> <path>` | Create session |\n| `send <id> \"text\"` | Send prompt |\n| `cancel <id>` | Cancel session |\n| `bypass <id> on/off` | Toggle bypass permissions |\n| `topics [--status x,y]` | List topics |\n| `delete-topic <id> [--force]` | Delete topic |\n| `cleanup [--status x,y]` | Cleanup old topics |\n| `agents` | List agents |\n| `health` | System health |\n| `config` | Show config |\n| `config set <key> <value>` | Update config |\n| `adapters` | List adapters |\n| `tunnel` | Tunnel status |\n| `notify \"message\"` | Send notification |\n| `version` | Daemon version |\n| `restart` | Restart daemon |\n\n---\n\n## File Viewer (Tunnel)\n\nWhen tunnel is enabled, file edits and diffs get \"View\" buttons that open in your browser:\n- **Monaco Editor** \u2014 Full VS Code editor with syntax highlighting\n- **Diff viewer** \u2014 Side-by-side or inline comparison\n- **Line highlighting** \u2014 Click lines to highlight\n- Dark/light theme toggle\n\n### Setup\nEnable in config: set `tunnel.enabled` to `true`.\nProviders: Cloudflare (default, free), ngrok, bore, Tailscale Funnel.\n\n### Port Tunneling\n\nExpose any local port (dev servers, APIs, etc.) to the internet:\n\n**CLI commands** (agent can call these directly):\n- `openacp tunnel add <port> --label <name>` \u2014 Create tunnel to a local port\n- `openacp tunnel list` \u2014 List active tunnels\n- `openacp tunnel stop <port>` \u2014 Stop a tunnel\n- `openacp tunnel stop-all` \u2014 Stop all user tunnels\n\n**Telegram commands**:\n- `/tunnel <port> [label]` \u2014 Create tunnel\n- `/tunnels` \u2014 List active tunnels\n- `/tunnel stop <port>` \u2014 Stop tunnel\n\nExample: after starting a dev server on port 3000, run `openacp tunnel add 3000 --label my-app` to get a public URL.\n\n---\n\n## Configuration\n\nConfig file: `~/.openacp/config.json`\n\n### Channels\n- **channels.telegram.botToken** \u2014 Your Telegram bot token\n- **channels.telegram.chatId** \u2014 Your Telegram supergroup ID\n- **channels.discord.botToken** \u2014 Your Discord bot token\n- **channels.discord.guildId** \u2014 Your Discord server (guild) ID\n\n### Agents\n- **defaultAgent** \u2014 Which agent to use by default\n- Agents are managed via `/agents` (Telegram) or `openacp agents` (CLI)\n- Installed agents are stored in `~/.openacp/agents.json`\n- Agent list is fetched from the ACP Registry CDN and cached locally (24h)\n\n### Workspace\n- **workspace.baseDir** \u2014 Base directory for project folders (default: `~/openacp-workspace`)\n\n### Security\n- **security.allowedUserIds** \u2014 Restrict who can use the bot (empty = everyone)\n- **security.maxConcurrentSessions** \u2014 Max parallel sessions (default: 5)\n- **security.sessionTimeoutMinutes** \u2014 Auto-cancel idle sessions (default: 60)\n\n### Tunnel / File Viewer\n- **tunnel.enabled** \u2014 Enable file viewer tunnel\n- **tunnel.provider** \u2014 Tunnel provider: cloudflare (default, free), ngrok, bore, tailscale\n- **tunnel.port** \u2014 Local port for tunnel server (default: 3100)\n- **tunnel.auth.enabled** \u2014 Enable authentication for tunnel URLs\n- **tunnel.auth.token** \u2014 Auth token for tunnel access\n- **tunnel.storeTtlMinutes** \u2014 How long viewer links stay cached (default: 60)\n\n### Logging\n- **logging.level** \u2014 Log level: silent, debug, info, warn, error, fatal (default: info)\n- **logging.logDir** \u2014 Log directory (default: `~/.openacp/logs`)\n- **logging.maxFileSize** \u2014 Max log file size before rotation\n- **logging.maxFiles** \u2014 Max number of rotated log files\n- **logging.sessionLogRetentionDays** \u2014 Auto-delete old session logs (default: 30)\n\n### Data Retention\n- **sessionStore.ttlDays** \u2014 How long session records persist (default: 30). Old records are cleaned up automatically.\n\n### Environment variables\nOverride config with env vars:\n- `OPENACP_TELEGRAM_BOT_TOKEN`\n- `OPENACP_TELEGRAM_CHAT_ID`\n- `OPENACP_DISCORD_BOT_TOKEN`\n- `OPENACP_DISCORD_GUILD_ID`\n- `OPENACP_DEFAULT_AGENT`\n- `OPENACP_RUN_MODE` \u2014 foreground or daemon\n- `OPENACP_API_PORT` \u2014 API server port (default: 21420)\n- `OPENACP_TUNNEL_ENABLED`\n- `OPENACP_TUNNEL_PORT`\n- `OPENACP_TUNNEL_PROVIDER`\n- `OPENACP_LOG_LEVEL`\n- `OPENACP_LOG_DIR`\n- `OPENACP_DEBUG` \u2014 Sets log level to debug\n\n---\n\n## Troubleshooting\n\n### Session stuck / not responding\n- Check status: ask Assistant \"Is anything stuck?\"\n- Cancel and create new: `/cancel` then `/new`\n- Check system health: Assistant can run health check\n\n### Agent not found\n- Check available agents: `/agents` or `openacp agents`\n- Install missing agent: `openacp agents install <name>`\n- Some agents need login first: `openacp agents info <name>` to see setup steps\n- Run agent CLI for setup: `openacp agents run <name> -- <args>`\n\n### Permission request not showing\n- Check Notifications topic for the alert\n- Try `/enable_bypass` to auto-approve (if you trust the agent)\n\n### Session disappeared after restart\n- Sessions persist across restarts\n- Send a message in the old topic \u2014 it auto-resumes\n- If topic was deleted, the session record may still exist in status\n\n### Bot not responding at all\n- Check daemon: `openacp status`\n- Check logs: `openacp logs`\n- Restart: `openacp start` or `/restart`\n\n### Messages going to wrong topic\n- Each session is bound to a specific topic/thread\n- If you see messages appearing in the Assistant topic instead of the session topic, try creating a new session\n\n### Viewing logs\n- Session-specific logs: `~/.openacp/logs/sessions/`\n- System logs: `openacp logs` to tail live\n- Set `OPENACP_DEBUG=true` for verbose output\n\n---\n\n## Data & Storage\n\nAll data is stored in `~/.openacp/`:\n- `config.json` \u2014 Configuration\n- `agents.json` \u2014 Installed agents (managed by AgentCatalog)\n- `registry-cache.json` \u2014 Cached ACP Registry data (refreshes every 24h)\n- `agents/` \u2014 Downloaded binary agents\n- `sessions/` \u2014 Session records and state\n- `topics/` \u2014 Topic-to-session mappings\n- `logs/` \u2014 System and session logs\n- `plugins/` \u2014 Installed adapter plugins\n- `openacp.pid` \u2014 Daemon PID file\n\nSession records auto-cleanup: 30 days (configurable via `sessionStore.ttlDays`).\nSession logs auto-cleanup: 30 days (configurable via `logging.sessionLogRetentionDays`).\n";
|
|
3129
3214
|
|
|
3130
3215
|
interface TelegramChannelConfig extends ChannelConfig {
|
|
3131
3216
|
botToken: string;
|
|
@@ -3156,6 +3241,8 @@ declare class TelegramAdapter extends MessagingAdapter {
|
|
|
3156
3241
|
private sessionTrackers;
|
|
3157
3242
|
private callbackCache;
|
|
3158
3243
|
private callbackCounter;
|
|
3244
|
+
/** Pending skill commands queued when session.threadId was not yet set */
|
|
3245
|
+
private _pendingSkillCommands;
|
|
3159
3246
|
private getThreadId;
|
|
3160
3247
|
private getOrCreateTracker;
|
|
3161
3248
|
constructor(core: OpenACPCore, config: TelegramChannelConfig, saveTopicIds?: (updates: {
|
|
@@ -3205,6 +3292,8 @@ declare class TelegramAdapter extends MessagingAdapter {
|
|
|
3205
3292
|
renameSessionThread(sessionId: string, newName: string): Promise<void>;
|
|
3206
3293
|
deleteSessionThread(sessionId: string): Promise<void>;
|
|
3207
3294
|
sendSkillCommands(sessionId: string, commands: AgentCommand[]): Promise<void>;
|
|
3295
|
+
/** Flush any skill commands that were queued before threadId was available */
|
|
3296
|
+
flushPendingSkillCommands(sessionId: string): Promise<void>;
|
|
3208
3297
|
private resolveSessionId;
|
|
3209
3298
|
private downloadTelegramFile;
|
|
3210
3299
|
private handleIncomingMedia;
|
|
@@ -3214,4 +3303,4 @@ declare class TelegramAdapter extends MessagingAdapter {
|
|
|
3214
3303
|
archiveSessionTopic(sessionId: string): Promise<void>;
|
|
3215
3304
|
}
|
|
3216
3305
|
|
|
3217
|
-
export { ActivityTracker, type AdapterCapabilities, type AgentCapabilities, AgentCatalog, type AgentCommand, type AgentDefinition, type AgentDistribution, type AgentEvent, AgentInstance, type AgentListItem, AgentManager, AgentStore, type AgentSwitchEntry, type ApiConfig,
|
|
3306
|
+
export { ActivityTracker, type AdapterCapabilities, type AgentCapabilities, AgentCatalog, type AgentCommand, type AgentDefinition, type AgentDistribution, type AgentEvent, AgentInstance, type AgentListItem, AgentManager, AgentStore, type AgentSwitchEntry, type ApiConfig, type ApiServerInstance, type ApiServerOptions, type ApiServerService, type Attachment, type AuthMethod, type AuthenticateRequest, type AvailabilityResult, BaseRenderer, type BridgeDeps, CONFIG_REGISTRY, ChannelAdapter, type ChannelConfig, type CleanupResult, type CommandArgs, type CommandDef, CommandRegistry, type CommandResponse, type Config, type ConfigFieldDef, ConfigManager$1 as ConfigManager, type ConfigOption, type ConfigSelectChoice, type ConfigSelectGroup, type ContentBlock, ContextManager, type ContextOptions, type ContextProvider, type ContextQuery, type ContextResult, type ContextService, type SessionInfo as ContextSessionInfo, type DeleteTopicResult, DisplaySpecBuilder, type DisplayVerbosity, DoctorEngine, type DoctorReport, DraftManager, EntireProvider, EventBus, type EventBusEvents, FileService, type FileServiceInterface, GroqSTT, type IChannelAdapter, type IRenderer, type IncomingMessage, type InstallContext, type InstallProgress, type InstallResult, type InstalledAgent, KIND_ICONS, type ListItem, type Logger$1 as Logger, type LoggingConfig, type McpServerConfig, type MenuOption, MessageTransformer, MessagingAdapter, type MessagingAdapterConfig, type MigrateContext, type ModelInfo, type NewSessionResponse, NotificationManager, type NotificationMessage, type NotificationService, OpenACPCore, type OpenACPPlugin, type OutgoingMessage, type OutputMode, OutputModeResolver, PRODUCT_GUIDE, type PendingFix, PermissionGate, type PermissionOption, type PermissionRequest, type PlanEntry, type PluginContext, type PluginPermission, type PluginStorage, PromptQueue, type PromptResponse, type RegistryAgent, type RegistryBinaryTarget, type RegistryDistribution, type RenderedMessage, SSEManager, STATUS_ICONS, type STTOptions, type STTProvider$1 as STTProvider, type STTResult, SecurityGuard, type SecurityService, SendQueue, Session, SessionBridge, type SessionCreateParams, type SessionEvents, SessionFactory, type SessionListItem, type SessionListResponse, type SessionListResult, SessionManager, type SessionMode, type SessionModeState, type SessionModelState, type SessionRecord, type SessionStatus, type SetConfigOptionValue, type SettingsAPI, type SideEffectDeps, type SpeechProviderConfig, SpeechService, type SpeechServiceConfig, type SpeechServiceInterface, StaticServer, StderrCapture, type StopReason, StreamAdapter, type TTSOptions, type TTSProvider$1 as TTSProvider, type TTSResult, TelegramAdapter, type TelegramPlatformData, type TerminalIO, ThoughtBuffer, type ThoughtDisplaySpec, type ToolCallMeta, ToolCallTracker, type ToolCardSnapshot, ToolCardState, type ToolCardStateConfig, type ToolDisplaySpec, type ToolEntry, ToolStateMap, type ToolUpdateMeta, type TopicInfo, TopicManager, type TunnelServiceInterface, TypedEmitter, type UsageConfig, type UsageRecord, type UsageRecordEvent, type UsageService, type ViewerLinks, cleanupOldSessionLogs, createApiServer, createApiServerService, createChildLogger, createSessionLogger, expandHome, extractContentText, formatTokens, formatToolSummary, formatToolTitle, getConfigValue, getFieldDef, getPidPath, getSafeFields, getStatus, initLogger, installAutoStart, isAutoStartInstalled, isAutoStartSupported, isHotReloadable, log, nodeToWebReadable, nodeToWebWritable, progressBar, resolveOptions, resolveToolIcon, runConfigEditor, setLogLevel, shutdownLogger, splitMessage, startDaemon, stopDaemon, stripCodeFences, truncateContent, uninstallAutoStart };
|