@adhdev/daemon-core 0.7.5 → 0.7.7
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/index.d.mts +164 -38
- package/dist/index.d.ts +164 -38
- package/dist/index.js +4051 -2547
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3696 -2192
- package/dist/index.mjs.map +1 -1
- package/dist/{normalize-tKg8IiDk.d.mts → normalize-auJAPmKy.d.mts} +669 -629
- package/dist/{normalize-tKg8IiDk.d.ts → normalize-auJAPmKy.d.ts} +669 -629
- package/dist/status/normalize.d.mts +1 -1
- package/dist/status/normalize.d.ts +1 -1
- package/package.json +5 -1
- package/src/agent-stream/forward.ts +6 -0
- package/src/boot/daemon-lifecycle.ts +7 -4
- package/src/cli-adapter-types.ts +2 -0
- package/src/cli-adapters/provider-cli-adapter.ts +148 -11
- package/src/cli-adapters/pty-transport.ts +100 -0
- package/src/cli-adapters/session-host-transport.ts +392 -0
- package/src/cli-adapters/terminal-backends/ghostty-vt-backend.ts +126 -0
- package/src/cli-adapters/terminal-backends/types.ts +17 -0
- package/src/cli-adapters/terminal-backends/xterm-backend.ts +87 -0
- package/src/cli-adapters/terminal-screen.ts +40 -53
- package/src/commands/cli-manager.ts +184 -55
- package/src/config/config.d.ts +116 -0
- package/src/config/workspace-activity.d.ts +22 -0
- package/src/config/workspaces.d.ts +84 -0
- package/src/daemon/dev-auto-implement.ts +1087 -0
- package/src/daemon/dev-cdp-handlers.ts +1003 -0
- package/src/daemon/dev-cli-debug.ts +288 -0
- package/src/daemon/dev-server-types.ts +45 -0
- package/src/daemon/dev-server.ts +121 -1698
- package/src/index.ts +5 -1
- package/src/providers/cli-provider-instance.ts +13 -1
- package/src/providers/contracts.d.ts +408 -0
- package/src/providers/contracts.ts +9 -0
- package/src/providers/extension-provider-instance.ts +50 -10
- package/src/providers/provider-instance-manager.ts +48 -10
- package/src/providers/provider-instance.d.ts +142 -0
- package/src/providers/provider-instance.ts +23 -1
- package/src/shared-types.d.ts +157 -0
- package/src/shared-types.ts +14 -0
- package/src/status/builders.ts +6 -0
- package/src/status/normalize.d.ts +14 -0
- package/src/types.d.ts +127 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { S as StatusResponse, D as DaemonEvent, C as CommandResult$2, a as SessionEntry, P as ProviderCategory, b as ProviderModule, R as ResolvedProvider, c as ProviderSettingSchema, d as CdpTargetFilter, e as ProviderInstance, I as InstanceContext, f as ProviderState, g as ProviderEvent, h as SessionTransport, i as StatusReportPayload, A as AvailableProviderInfo, j as
|
|
2
|
-
export {
|
|
1
|
+
import { S as StatusResponse, D as DaemonEvent, C as CommandResult$2, a as SessionEntry, P as ProviderCategory, b as ProviderModule, R as ResolvedProvider, c as ProviderSettingSchema, d as CdpTargetFilter, e as ProviderInstance, I as InstanceContext, f as ProviderState, g as ProviderEvent, h as SessionTransport, i as StatusReportPayload, A as AvailableProviderInfo, j as ProviderResumeCapability, k as AcpProviderState, l as ContentBlock } from './normalize-auJAPmKy.mjs';
|
|
2
|
+
export { m as AcpConfigOption, n as AcpMode, o as ActiveChatData, p as AgentEntry, q as AgentSessionStream, r as ChatMessage, s as CliProviderState, t as DetectedIde, u as DetectedIdeInfo, E as ExtensionInfo, v as ExtensionProviderState, w as IdeProviderState, M as MachineInfo, x as ManagedStatus, y as ProviderConfig, z as ProviderErrorReason, B as ProviderInfo, F as ProviderStatus, G as SessionCapability, H as SessionKind, J as SystemInfo, W as WorkspaceActivity, K as WorkspaceEntry, L as addCliHistory, N as getWorkspaceActivity, O as getWorkspaceState, Q as isManagedStatusWaiting, T as isManagedStatusWorking, U as isSetupComplete, V as loadConfig, X as markSetupComplete, Y as normalizeActiveChatData, Z as normalizeManagedStatus, _ as resetConfig, $ as saveConfig, a0 as updateConfig } from './normalize-auJAPmKy.mjs';
|
|
3
|
+
import * as child_process from 'child_process';
|
|
4
|
+
import { ChildProcess } from 'child_process';
|
|
5
|
+
import * as http from 'http';
|
|
6
|
+
import { SessionHostEndpoint, SessionHostCategory } from '@adhdev/session-host-core';
|
|
3
7
|
|
|
4
8
|
/**
|
|
5
9
|
* DaemonCore — Core daemon orchestrator interface
|
|
@@ -596,6 +600,9 @@ declare class ProviderInstanceManager {
|
|
|
596
600
|
* Instance remove
|
|
597
601
|
*/
|
|
598
602
|
removeInstance(id: string): void;
|
|
603
|
+
removeByCategory(category: 'cli' | 'ide' | 'extension' | 'acp', options?: {
|
|
604
|
+
dispose?: boolean;
|
|
605
|
+
}): number;
|
|
599
606
|
/**
|
|
600
607
|
* Import by Instance ID
|
|
601
608
|
*/
|
|
@@ -631,6 +638,7 @@ declare class ProviderInstanceManager {
|
|
|
631
638
|
onEvent(listener: (event: ProviderEvent & {
|
|
632
639
|
providerType: string;
|
|
633
640
|
}) => void): void;
|
|
641
|
+
private emitPendingEvents;
|
|
634
642
|
/**
|
|
635
643
|
* Forward event to specific Instance
|
|
636
644
|
*/
|
|
@@ -1052,6 +1060,10 @@ declare class ExtensionProviderInstance implements ProviderInstance {
|
|
|
1052
1060
|
private monitor;
|
|
1053
1061
|
private instanceId;
|
|
1054
1062
|
private ideType;
|
|
1063
|
+
private chatId;
|
|
1064
|
+
private chatTitle;
|
|
1065
|
+
private agentName;
|
|
1066
|
+
private extensionId;
|
|
1055
1067
|
constructor(provider: ProviderModule);
|
|
1056
1068
|
init(context: InstanceContext): Promise<void>;
|
|
1057
1069
|
onTick(): Promise<void>;
|
|
@@ -1063,6 +1075,7 @@ declare class ExtensionProviderInstance implements ProviderInstance {
|
|
|
1063
1075
|
private detectTransition;
|
|
1064
1076
|
private pushEvent;
|
|
1065
1077
|
private flushEvents;
|
|
1078
|
+
private resolveChatTitle;
|
|
1066
1079
|
}
|
|
1067
1080
|
|
|
1068
1081
|
/**
|
|
@@ -1301,7 +1314,9 @@ interface CliAdapter {
|
|
|
1301
1314
|
sendMessage(text: string): Promise<void>;
|
|
1302
1315
|
getStatus(): any;
|
|
1303
1316
|
getPartialResponse(): string;
|
|
1317
|
+
saveAndStop?(): Promise<void>;
|
|
1304
1318
|
shutdown(): void;
|
|
1319
|
+
detach?(): void;
|
|
1305
1320
|
cancel(): void;
|
|
1306
1321
|
isProcessing(): boolean;
|
|
1307
1322
|
isReady(): boolean;
|
|
@@ -1312,6 +1327,50 @@ interface CliAdapter {
|
|
|
1312
1327
|
resize?(cols: number, rows: number): void;
|
|
1313
1328
|
}
|
|
1314
1329
|
|
|
1330
|
+
interface PtySpawnOptions {
|
|
1331
|
+
cwd: string;
|
|
1332
|
+
env: Record<string, string>;
|
|
1333
|
+
cols: number;
|
|
1334
|
+
rows: number;
|
|
1335
|
+
}
|
|
1336
|
+
interface PtyRuntimeWriteOwner {
|
|
1337
|
+
clientId: string;
|
|
1338
|
+
ownerType: 'agent' | 'user';
|
|
1339
|
+
}
|
|
1340
|
+
interface PtyRuntimeClientInfo {
|
|
1341
|
+
clientId: string;
|
|
1342
|
+
type: 'daemon' | 'web' | 'local-terminal';
|
|
1343
|
+
readOnly: boolean;
|
|
1344
|
+
}
|
|
1345
|
+
interface PtyRuntimeMetadata {
|
|
1346
|
+
runtimeId: string;
|
|
1347
|
+
runtimeKey?: string;
|
|
1348
|
+
displayName?: string;
|
|
1349
|
+
workspaceLabel?: string;
|
|
1350
|
+
writeOwner?: PtyRuntimeWriteOwner | null;
|
|
1351
|
+
attachedClients?: PtyRuntimeClientInfo[];
|
|
1352
|
+
}
|
|
1353
|
+
interface PtyRuntimeTransport {
|
|
1354
|
+
readonly pid: number;
|
|
1355
|
+
readonly ready: Promise<void>;
|
|
1356
|
+
write(data: string): void;
|
|
1357
|
+
resize(cols: number, rows: number): void;
|
|
1358
|
+
kill(): void;
|
|
1359
|
+
clearBuffer?(): void;
|
|
1360
|
+
detach?(): void;
|
|
1361
|
+
getMetadata?(): PtyRuntimeMetadata | null;
|
|
1362
|
+
onData(callback: (data: string) => void): void;
|
|
1363
|
+
onExit(callback: (info: {
|
|
1364
|
+
exitCode: number;
|
|
1365
|
+
}) => void): void;
|
|
1366
|
+
}
|
|
1367
|
+
interface PtyTransportFactory {
|
|
1368
|
+
spawn(command: string, args: string[], options: PtySpawnOptions): PtyRuntimeTransport;
|
|
1369
|
+
}
|
|
1370
|
+
declare class NodePtyTransportFactory implements PtyTransportFactory {
|
|
1371
|
+
spawn(command: string, args: string[], options: PtySpawnOptions): PtyRuntimeTransport;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1315
1374
|
/**
|
|
1316
1375
|
* DaemonCliManager — CLI session creation, management, and command handling
|
|
1317
1376
|
*
|
|
@@ -1332,11 +1391,31 @@ interface CliManagerDeps {
|
|
|
1332
1391
|
/** InstanceManager — register in CLI unified status */
|
|
1333
1392
|
getInstanceManager(): ProviderInstanceManager | null;
|
|
1334
1393
|
getSessionRegistry?(): SessionRegistry | null;
|
|
1394
|
+
createPtyTransportFactory?: (params: CliTransportFactoryParams) => PtyTransportFactory | null;
|
|
1395
|
+
listHostedCliRuntimes?: () => Promise<HostedCliRuntimeDescriptor[]>;
|
|
1335
1396
|
}
|
|
1336
1397
|
type CommandResult = {
|
|
1337
1398
|
success: boolean;
|
|
1338
1399
|
[key: string]: unknown;
|
|
1339
1400
|
};
|
|
1401
|
+
interface CliTransportFactoryParams {
|
|
1402
|
+
runtimeId: string;
|
|
1403
|
+
providerType: string;
|
|
1404
|
+
workspace: string;
|
|
1405
|
+
cliArgs?: string[];
|
|
1406
|
+
attachExisting?: boolean;
|
|
1407
|
+
}
|
|
1408
|
+
interface HostedCliRuntimeDescriptor {
|
|
1409
|
+
runtimeId: string;
|
|
1410
|
+
runtimeKey?: string;
|
|
1411
|
+
displayName?: string;
|
|
1412
|
+
workspaceLabel?: string;
|
|
1413
|
+
lifecycle?: 'starting' | 'running' | 'stopping' | 'stopped' | 'failed' | 'interrupted';
|
|
1414
|
+
recoveryState?: string | null;
|
|
1415
|
+
cliType: string;
|
|
1416
|
+
workspace: string;
|
|
1417
|
+
cliArgs?: string[];
|
|
1418
|
+
}
|
|
1340
1419
|
declare class DaemonCliManager {
|
|
1341
1420
|
readonly adapters: Map<string, CliAdapter>;
|
|
1342
1421
|
private deps;
|
|
@@ -1344,10 +1423,16 @@ declare class DaemonCliManager {
|
|
|
1344
1423
|
constructor(deps: CliManagerDeps, providerLoader: ProviderLoader);
|
|
1345
1424
|
getCliKey(cliType: string, dir: string): string;
|
|
1346
1425
|
private persistRecentDir;
|
|
1426
|
+
private getTransportFactory;
|
|
1347
1427
|
private createAdapter;
|
|
1428
|
+
private startCliExitMonitor;
|
|
1429
|
+
private registerCliInstance;
|
|
1348
1430
|
startSession(cliType: string, workingDir: string, cliArgs?: string[], initialModel?: string): Promise<void>;
|
|
1349
1431
|
stopSession(key: string): Promise<void>;
|
|
1432
|
+
stopSessionWithMode(key: string, mode: 'hard' | 'save'): Promise<void>;
|
|
1350
1433
|
shutdownAll(): void;
|
|
1434
|
+
detachAll(): void;
|
|
1435
|
+
restoreHostedSessions(records?: HostedCliRuntimeDescriptor[]): Promise<number>;
|
|
1351
1436
|
/**
|
|
1352
1437
|
* Search for CLI adapter. Priority order:
|
|
1353
1438
|
* 0. sessionId (UUID direct match)
|
|
@@ -1782,6 +1867,7 @@ interface CliScripts {
|
|
|
1782
1867
|
/** Parse approval modal from PTY output → ModalInfo | null */
|
|
1783
1868
|
parseApproval?: (input: {
|
|
1784
1869
|
buffer: string;
|
|
1870
|
+
screenText?: string;
|
|
1785
1871
|
rawBuffer?: string;
|
|
1786
1872
|
tail: string;
|
|
1787
1873
|
}) => {
|
|
@@ -1834,6 +1920,7 @@ interface CliProviderModule {
|
|
|
1834
1920
|
/** Output settle debounce before evaluating status (default 300ms) */
|
|
1835
1921
|
outputSettle?: number;
|
|
1836
1922
|
};
|
|
1923
|
+
resume?: ProviderResumeCapability;
|
|
1837
1924
|
}
|
|
1838
1925
|
declare class ProviderCliAdapter implements CliAdapter {
|
|
1839
1926
|
private extraArgs;
|
|
@@ -1842,6 +1929,7 @@ declare class ProviderCliAdapter implements CliAdapter {
|
|
|
1842
1929
|
workingDir: string;
|
|
1843
1930
|
private provider;
|
|
1844
1931
|
private ptyProcess;
|
|
1932
|
+
private transportFactory;
|
|
1845
1933
|
private messages;
|
|
1846
1934
|
private committedMessages;
|
|
1847
1935
|
private structuredMessages;
|
|
@@ -1902,7 +1990,7 @@ declare class ProviderCliAdapter implements CliAdapter {
|
|
|
1902
1990
|
private readonly sendKey;
|
|
1903
1991
|
private readonly submitStrategy;
|
|
1904
1992
|
private static readonly SCRIPT_STATUS_DEBOUNCE_MS;
|
|
1905
|
-
constructor(provider: CliProviderModule, workingDir: string, extraArgs?: string[]);
|
|
1993
|
+
constructor(provider: CliProviderModule, workingDir: string, extraArgs?: string[], transportFactory?: PtyTransportFactory);
|
|
1906
1994
|
/** Inject CLI scripts after construction (e.g. when resolved by ProviderLoader) */
|
|
1907
1995
|
setCliScripts(scripts: CliScripts): void;
|
|
1908
1996
|
setServerConn(serverConn: any): void;
|
|
@@ -1913,6 +2001,7 @@ declare class ProviderCliAdapter implements CliAdapter {
|
|
|
1913
2001
|
private handleOutput;
|
|
1914
2002
|
private scheduleSettle;
|
|
1915
2003
|
private armApprovalExitTimeout;
|
|
2004
|
+
private looksLikeVisibleIdlePrompt;
|
|
1916
2005
|
private evaluateSettled;
|
|
1917
2006
|
private finishResponse;
|
|
1918
2007
|
private commitCurrentTranscript;
|
|
@@ -1934,8 +2023,12 @@ declare class ProviderCliAdapter implements CliAdapter {
|
|
|
1934
2023
|
resolveAction(data: any): Promise<void>;
|
|
1935
2024
|
sendMessage(text: string): Promise<void>;
|
|
1936
2025
|
getPartialResponse(): string;
|
|
2026
|
+
getRuntimeMetadata(): PtyRuntimeMetadata | null;
|
|
1937
2027
|
cancel(): void;
|
|
2028
|
+
saveAndStop(): Promise<void>;
|
|
2029
|
+
private waitForStopped;
|
|
1938
2030
|
shutdown(): void;
|
|
2031
|
+
detach(): void;
|
|
1939
2032
|
clearHistory(): void;
|
|
1940
2033
|
isProcessing(): boolean;
|
|
1941
2034
|
isReady(): boolean;
|
|
@@ -1970,7 +2063,7 @@ declare class CliProviderInstance implements ProviderInstance {
|
|
|
1970
2063
|
private lastApprovalEventAt;
|
|
1971
2064
|
private historyWriter;
|
|
1972
2065
|
readonly instanceId: string;
|
|
1973
|
-
constructor(provider: ProviderModule, workingDir: string, cliArgs?: string[], instanceId?: string);
|
|
2066
|
+
constructor(provider: ProviderModule, workingDir: string, cliArgs?: string[], instanceId?: string, transportFactory?: PtyTransportFactory);
|
|
1974
2067
|
init(context: InstanceContext): Promise<void>;
|
|
1975
2068
|
onTick(): Promise<void>;
|
|
1976
2069
|
getState(): ProviderState;
|
|
@@ -2088,35 +2181,52 @@ declare class AcpProviderInstance implements ProviderInstance {
|
|
|
2088
2181
|
}
|
|
2089
2182
|
|
|
2090
2183
|
/**
|
|
2091
|
-
*
|
|
2092
|
-
*
|
|
2093
|
-
* Enabled with `adhdev daemon --dev`
|
|
2094
|
-
* Port: 19280 (fixed)
|
|
2095
|
-
*
|
|
2096
|
-
* API list:
|
|
2097
|
-
* GET /api/providers — loaded provider list
|
|
2098
|
-
* POST /api/providers/:type/script — specific script execute
|
|
2099
|
-
* POST /api/cdp/evaluate — Execute JS expression
|
|
2100
|
-
* POST /api/cdp/dom/query — Test selector
|
|
2101
|
-
* GET /api/cdp/screenshot — screenshot
|
|
2102
|
-
* POST /api/scripts/run — Execute provider script (name + params)
|
|
2103
|
-
* GET /api/status — All status (CDP connection, provider etc)
|
|
2184
|
+
* Context passed from the main DevServer to handler modules.
|
|
2185
|
+
* Provides access to shared dependencies and utility methods.
|
|
2104
2186
|
*/
|
|
2187
|
+
interface DevServerContext {
|
|
2188
|
+
readonly providerLoader: ProviderLoader;
|
|
2189
|
+
readonly cdpManagers: Map<string, DaemonCdpManager>;
|
|
2190
|
+
readonly instanceManager: ProviderInstanceManager | null;
|
|
2191
|
+
readonly cliManager: DaemonCliManager | null;
|
|
2192
|
+
getCdp(ideType?: string): DaemonCdpManager | null;
|
|
2193
|
+
json(res: http.ServerResponse, status: number, data: any): void;
|
|
2194
|
+
readBody(req: http.IncomingMessage): Promise<any>;
|
|
2195
|
+
log(msg: string): void;
|
|
2196
|
+
autoImplSSEClients: http.ServerResponse[];
|
|
2197
|
+
sendAutoImplSSE(msg: {
|
|
2198
|
+
event: string;
|
|
2199
|
+
data: any;
|
|
2200
|
+
}): void;
|
|
2201
|
+
autoImplStatus: {
|
|
2202
|
+
running: boolean;
|
|
2203
|
+
type: string | null;
|
|
2204
|
+
progress: any[];
|
|
2205
|
+
};
|
|
2206
|
+
autoImplProcess: child_process.ChildProcess | null;
|
|
2207
|
+
sendCliSSE(data: any): void;
|
|
2208
|
+
findProviderDir(type: string): string | null;
|
|
2209
|
+
getLatestScriptVersionDir(scriptsDir: string): string | null;
|
|
2210
|
+
}
|
|
2105
2211
|
|
|
2106
|
-
declare class DevServer {
|
|
2212
|
+
declare class DevServer implements DevServerContext {
|
|
2107
2213
|
private server;
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2214
|
+
providerLoader: ProviderLoader;
|
|
2215
|
+
cdpManagers: Map<string, DaemonCdpManager>;
|
|
2216
|
+
instanceManager: ProviderInstanceManager | null;
|
|
2217
|
+
cliManager: DaemonCliManager | null;
|
|
2112
2218
|
private logFn;
|
|
2113
2219
|
private sseClients;
|
|
2114
2220
|
private watchScriptPath;
|
|
2115
2221
|
private watchScriptName;
|
|
2116
2222
|
private watchTimer;
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2223
|
+
autoImplProcess: ChildProcess | null;
|
|
2224
|
+
autoImplSSEClients: http.ServerResponse[];
|
|
2225
|
+
autoImplStatus: {
|
|
2226
|
+
running: boolean;
|
|
2227
|
+
type: string | null;
|
|
2228
|
+
progress: any[];
|
|
2229
|
+
};
|
|
2120
2230
|
private cliSSEClients;
|
|
2121
2231
|
constructor(options: {
|
|
2122
2232
|
providerLoader: ProviderLoader;
|
|
@@ -2125,7 +2235,7 @@ declare class DevServer {
|
|
|
2125
2235
|
cliManager?: DaemonCliManager;
|
|
2126
2236
|
logFn?: (msg: string) => void;
|
|
2127
2237
|
});
|
|
2128
|
-
|
|
2238
|
+
log(msg: string): void;
|
|
2129
2239
|
private readonly routes;
|
|
2130
2240
|
private matchRoute;
|
|
2131
2241
|
private getEndpointList;
|
|
@@ -2151,7 +2261,7 @@ declare class DevServer {
|
|
|
2151
2261
|
private handleWatchStart;
|
|
2152
2262
|
private handleWatchStop;
|
|
2153
2263
|
/** Find the provider directory on disk */
|
|
2154
|
-
|
|
2264
|
+
findProviderDir(type: string): string | null;
|
|
2155
2265
|
/** GET /api/providers/:type/files — list all files in provider directory */
|
|
2156
2266
|
private handleListFiles;
|
|
2157
2267
|
/** GET /api/providers/:type/file?path=scripts.js — read a file */
|
|
@@ -2174,26 +2284,25 @@ declare class DevServer {
|
|
|
2174
2284
|
private handleFindCommon;
|
|
2175
2285
|
private handleFindByText;
|
|
2176
2286
|
private handleDomContext;
|
|
2177
|
-
|
|
2178
|
-
private resolveAutoImplReference;
|
|
2179
|
-
private getLatestScriptVersionDir;
|
|
2287
|
+
getLatestScriptVersionDir(scriptsDir: string): string | null;
|
|
2180
2288
|
private resolveAutoImplWritableProviderDir;
|
|
2181
|
-
private loadAutoImplReferenceScripts;
|
|
2182
2289
|
private handleAutoImplement;
|
|
2183
2290
|
private buildAutoImplPrompt;
|
|
2184
2291
|
private buildCliAutoImplPrompt;
|
|
2185
2292
|
private handleAutoImplSSE;
|
|
2186
2293
|
private handleAutoImplCancel;
|
|
2187
|
-
|
|
2294
|
+
sendAutoImplSSE(msg: {
|
|
2295
|
+
event: string;
|
|
2296
|
+
data: any;
|
|
2297
|
+
}): void;
|
|
2188
2298
|
/** Get CDP manager — matching IDE when ideType specified, first connected one otherwise.
|
|
2189
2299
|
* DevServer is a debugging tool so first-connected fallback is acceptable,
|
|
2190
2300
|
* but callers should pass ideType when possible. */
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2301
|
+
getCdp(ideType?: string): DaemonCdpManager | null;
|
|
2302
|
+
json(res: http.ServerResponse, status: number, data: any): void;
|
|
2303
|
+
readBody(req: http.IncomingMessage): Promise<any>;
|
|
2194
2304
|
/** GET /api/cli/status — list all running CLI/ACP instances with state */
|
|
2195
2305
|
private handleCliStatus;
|
|
2196
|
-
private findCliTarget;
|
|
2197
2306
|
/** POST /api/cli/launch — launch a CLI agent { type, workingDir?, args? } */
|
|
2198
2307
|
private handleCliLaunch;
|
|
2199
2308
|
/** POST /api/cli/send — send message to a running CLI { type, text } */
|
|
@@ -2202,7 +2311,7 @@ declare class DevServer {
|
|
|
2202
2311
|
private handleCliStop;
|
|
2203
2312
|
/** GET /api/cli/events — SSE stream of CLI status events */
|
|
2204
2313
|
private handleCliSSE;
|
|
2205
|
-
|
|
2314
|
+
sendCliSSE(data: any): void;
|
|
2206
2315
|
/** GET /api/cli/debug/:type — full internal debug state of a CLI adapter */
|
|
2207
2316
|
private handleCliDebug;
|
|
2208
2317
|
/** POST /api/cli/resolve — resolve an approval modal { type, buttonIndex } */
|
|
@@ -2211,6 +2320,23 @@ declare class DevServer {
|
|
|
2211
2320
|
private handleCliRaw;
|
|
2212
2321
|
}
|
|
2213
2322
|
|
|
2323
|
+
interface SessionHostPtyTransportFactoryOptions {
|
|
2324
|
+
endpoint?: SessionHostEndpoint;
|
|
2325
|
+
appName?: string;
|
|
2326
|
+
clientId: string;
|
|
2327
|
+
runtimeId: string;
|
|
2328
|
+
providerType: string;
|
|
2329
|
+
category?: SessionHostCategory;
|
|
2330
|
+
workspace: string;
|
|
2331
|
+
meta?: Record<string, unknown>;
|
|
2332
|
+
attachExisting?: boolean;
|
|
2333
|
+
}
|
|
2334
|
+
declare class SessionHostPtyTransportFactory implements PtyTransportFactory {
|
|
2335
|
+
private readonly options;
|
|
2336
|
+
constructor(options: SessionHostPtyTransportFactoryOptions);
|
|
2337
|
+
spawn(command: string, args: string[], spawnOptions: PtySpawnOptions): PtyRuntimeTransport;
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2214
2340
|
/**
|
|
2215
2341
|
* ADHDev Launcher — Extension Installer
|
|
2216
2342
|
*
|
|
@@ -2341,4 +2467,4 @@ declare function startDaemonDevSupport(options: DaemonDevSupportOptions): Promis
|
|
|
2341
2467
|
*/
|
|
2342
2468
|
declare function shutdownDaemonComponents(components: DaemonComponents): Promise<void>;
|
|
2343
2469
|
|
|
2344
|
-
export { AcpProviderInstance, AcpProviderState, AgentStreamPoller, type AgentStreamPollerDeps, AvailableProviderInfo, CdpDomHandlers, type CdpInitializerConfig, type CdpScannerOptions, type CdpSetupContext, CdpTargetFilter, type CliAdapter, CliProviderInstance, type CommandContext, type CommandResult$1 as CommandResult, type CommandRouterDeps, type CommandRouterResult, CommandResult$2 as CoreCommandResult, DAEMON_WS_PATH, DEFAULT_DAEMON_PORT, DaemonAgentStreamManager, DaemonCdpInitializer, DaemonCdpManager, DaemonCdpScanner, DaemonCliManager, DaemonCommandHandler, DaemonCommandRouter, type DaemonComponents, type DaemonCoreOptions, type DaemonDevSupportOptions, DaemonEvent, type DaemonInitConfig, DaemonStatusReporter, DevServer, type HostMemorySnapshot, type IDEInfo, type IDaemonCore, IdeProviderInstance, type ExtensionInfo as InstallerExtensionInfo, LOG, type LogEntry, type LogLevel, ProviderCliAdapter, ProviderInstanceManager, ProviderLoader, ProviderModule, type ProviderVersionInfo, type ScopedLogger, SessionEntry, SessionTransport, type SetupIdeInstanceOptions, StatusReportPayload, StatusResponse, type StatusSnapshot, type StatusSnapshotOptions, VersionArchive, type VersionHistory, buildSessionEntries, buildStatusSnapshot, connectCdpManager, detectAllVersions, detectCLIs, detectIDEs, findCdpManager, forwardAgentStreamsToIdeInstance, getAIExtensions, getAvailableIdeIds, getHostMemorySnapshot, getLogLevel, getRecentCommands, getRecentLogs, hasCdpManager, initDaemonComponents, installExtensions, installGlobalInterceptor, isCdpConnected, isExtensionInstalled, isIdeRunning, killIdeProcess, launchIDE, launchWithCdp, logCommand, probeCdpPort, readChatHistory, registerExtensionProviders, setLogLevel, setupIdeInstance, shutdownDaemonComponents, startDaemonDevSupport };
|
|
2470
|
+
export { AcpProviderInstance, AcpProviderState, AgentStreamPoller, type AgentStreamPollerDeps, AvailableProviderInfo, CdpDomHandlers, type CdpInitializerConfig, type CdpScannerOptions, type CdpSetupContext, CdpTargetFilter, type CliAdapter, CliProviderInstance, type CliTransportFactoryParams, type CommandContext, type CommandResult$1 as CommandResult, type CommandRouterDeps, type CommandRouterResult, CommandResult$2 as CoreCommandResult, DAEMON_WS_PATH, DEFAULT_DAEMON_PORT, DaemonAgentStreamManager, DaemonCdpInitializer, DaemonCdpManager, DaemonCdpScanner, DaemonCliManager, DaemonCommandHandler, DaemonCommandRouter, type DaemonComponents, type DaemonCoreOptions, type DaemonDevSupportOptions, DaemonEvent, type DaemonInitConfig, DaemonStatusReporter, DevServer, type HostMemorySnapshot, type HostedCliRuntimeDescriptor, type IDEInfo, type IDaemonCore, IdeProviderInstance, type ExtensionInfo as InstallerExtensionInfo, LOG, type LogEntry, type LogLevel, NodePtyTransportFactory, ProviderCliAdapter, ProviderInstanceManager, ProviderLoader, ProviderModule, ProviderResumeCapability, type ProviderVersionInfo, type PtyRuntimeTransport, type PtySpawnOptions, type PtyTransportFactory, type ScopedLogger, SessionEntry, SessionHostPtyTransportFactory, SessionTransport, type SetupIdeInstanceOptions, StatusReportPayload, StatusResponse, type StatusSnapshot, type StatusSnapshotOptions, VersionArchive, type VersionHistory, buildSessionEntries, buildStatusSnapshot, connectCdpManager, detectAllVersions, detectCLIs, detectIDEs, findCdpManager, forwardAgentStreamsToIdeInstance, getAIExtensions, getAvailableIdeIds, getHostMemorySnapshot, getLogLevel, getRecentCommands, getRecentLogs, hasCdpManager, initDaemonComponents, installExtensions, installGlobalInterceptor, isCdpConnected, isExtensionInstalled, isIdeRunning, killIdeProcess, launchIDE, launchWithCdp, logCommand, probeCdpPort, readChatHistory, registerExtensionProviders, setLogLevel, setupIdeInstance, shutdownDaemonComponents, startDaemonDevSupport };
|