@adhdev/daemon-core 0.9.48 → 0.9.50
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-adapter-types.d.ts +1 -0
- package/dist/cli-adapters/provider-cli-adapter.d.ts +1 -0
- package/dist/commands/chat-commands.d.ts +9 -0
- package/dist/commands/upgrade-helper.d.ts +9 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.js +380 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +378 -23
- package/dist/index.mjs.map +1 -1
- package/node_modules/@adhdev/session-host-core/package.json +1 -1
- package/package.json +1 -1
- package/src/cli-adapter-types.ts +1 -0
- package/src/cli-adapters/provider-cli-adapter.ts +82 -0
- package/src/cli-adapters/provider-cli-shared.ts +6 -1
- package/src/commands/chat-commands.ts +271 -2
- package/src/commands/cli-manager.ts +4 -1
- package/src/commands/handler.ts +2 -0
- package/src/commands/router.ts +17 -8
- package/src/commands/upgrade-helper.ts +37 -15
- package/src/detection/cli-detector.ts +5 -1
- package/src/index.d.ts +2 -2
- package/src/index.ts +10 -7
- package/src/launch.ts +2 -2
- package/src/providers/acp-provider-instance.ts +1 -0
|
@@ -37,6 +37,7 @@ export interface CliAdapter {
|
|
|
37
37
|
sendMessage(text: string): Promise<void>;
|
|
38
38
|
getStatus(): CliAdapterStatus;
|
|
39
39
|
getScriptParsedStatus?(): unknown;
|
|
40
|
+
getDebugSnapshot?(): unknown;
|
|
40
41
|
invokeScript?(scriptName: string, args?: Record<string, unknown>): Promise<unknown>;
|
|
41
42
|
getPartialResponse(): string;
|
|
42
43
|
saveAndStop?(): Promise<void>;
|
|
@@ -211,6 +211,7 @@ export declare class ProviderCliAdapter implements CliAdapter {
|
|
|
211
211
|
private waitForEchoAndSubmit;
|
|
212
212
|
sendMessage(text: string): Promise<void>;
|
|
213
213
|
getPartialResponse(): string;
|
|
214
|
+
getDebugSnapshot(): Record<string, unknown>;
|
|
214
215
|
getRuntimeMetadata(): PtyRuntimeMetadata | null;
|
|
215
216
|
updateRuntimeMeta(meta: Record<string, unknown>, replace?: boolean): void;
|
|
216
217
|
cancel(): void;
|
|
@@ -6,6 +6,14 @@ import type { CommandResult, CommandHelpers } from './handler.js';
|
|
|
6
6
|
import type { ChatMessage } from '../types.js';
|
|
7
7
|
export declare const READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS = 25000;
|
|
8
8
|
export declare function collapseReplayDuplicatesFromReadChat(messages: ChatMessage[]): ChatMessage[];
|
|
9
|
+
interface DebugSanitizeOptions {
|
|
10
|
+
maxDepth?: number;
|
|
11
|
+
maxArrayLength?: number;
|
|
12
|
+
maxObjectKeys?: number;
|
|
13
|
+
maxStringLength?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function sanitizeDebugBundleValue(value: unknown, options?: DebugSanitizeOptions, depth?: number, keyHint?: string): unknown;
|
|
16
|
+
export declare function handleGetChatDebugBundle(h: CommandHelpers, args: any): Promise<CommandResult>;
|
|
9
17
|
export declare function handleChatHistory(h: CommandHelpers, args: any): Promise<CommandResult>;
|
|
10
18
|
export declare function handleReadChat(h: CommandHelpers, args: any): Promise<CommandResult>;
|
|
11
19
|
export declare function handleSendChat(h: CommandHelpers, args: any): Promise<CommandResult>;
|
|
@@ -16,3 +24,4 @@ export declare function handleSetMode(h: CommandHelpers, args: any): Promise<Com
|
|
|
16
24
|
export declare function handleChangeModel(h: CommandHelpers, args: any): Promise<CommandResult>;
|
|
17
25
|
export declare function handleSetThoughtLevel(h: CommandHelpers, args: any): Promise<CommandResult>;
|
|
18
26
|
export declare function handleResolveAction(h: CommandHelpers, args: any): Promise<CommandResult>;
|
|
27
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ExecFileSyncOptions } from 'child_process';
|
|
1
2
|
export interface DaemonUpgradeHelperPayload {
|
|
2
3
|
packageName: string;
|
|
3
4
|
targetVersion: string;
|
|
@@ -11,18 +12,18 @@ export interface CurrentGlobalInstallSurface {
|
|
|
11
12
|
npmArgsPrefix?: string[];
|
|
12
13
|
packageRoot: string | null;
|
|
13
14
|
installPrefix: string | null;
|
|
14
|
-
execOptions?:
|
|
15
|
-
shell: boolean;
|
|
16
|
-
};
|
|
15
|
+
execOptions?: NpmExecOptions;
|
|
17
16
|
}
|
|
18
17
|
export interface PinnedGlobalInstallCommand {
|
|
19
18
|
command: string;
|
|
20
19
|
args: string[];
|
|
21
20
|
surface: CurrentGlobalInstallSurface;
|
|
22
|
-
execOptions:
|
|
23
|
-
shell: boolean;
|
|
24
|
-
};
|
|
21
|
+
execOptions: NpmExecOptions;
|
|
25
22
|
}
|
|
23
|
+
export type NpmExecOptions = {
|
|
24
|
+
shell: boolean;
|
|
25
|
+
windowsHide?: boolean;
|
|
26
|
+
};
|
|
26
27
|
export declare function resolveCurrentGlobalInstallSurface(options: {
|
|
27
28
|
packageName: string;
|
|
28
29
|
currentCliPath?: string;
|
|
@@ -36,6 +37,8 @@ export declare function buildPinnedGlobalInstallCommand(options: {
|
|
|
36
37
|
nodeExecutable?: string;
|
|
37
38
|
platform?: NodeJS.Platform;
|
|
38
39
|
}): PinnedGlobalInstallCommand;
|
|
40
|
+
export declare function getNpmExecOptions(platform?: NodeJS.Platform): NpmExecOptions;
|
|
41
|
+
export declare function execNpmCommandSync(args: string[], options?: ExecFileSyncOptions, surface?: Pick<CurrentGlobalInstallSurface, 'npmExecutable' | 'npmArgsPrefix' | 'execOptions'>): Buffer | string;
|
|
39
42
|
export declare function stopSessionHostProcesses(appName: string): void;
|
|
40
43
|
export declare function spawnDetachedDaemonUpgradeHelper(payload: DaemonUpgradeHelperPayload): void;
|
|
41
44
|
export declare function maybeRunDaemonUpgradeHelperFromEnv(): Promise<boolean>;
|
package/dist/index.d.ts
CHANGED
|
@@ -42,8 +42,8 @@ export { DaemonCommandHandler } from './commands/handler.js';
|
|
|
42
42
|
export type { CommandResult, CommandContext } from './commands/handler.js';
|
|
43
43
|
export { DaemonCommandRouter } from './commands/router.js';
|
|
44
44
|
export type { CommandRouterDeps, CommandRouterResult } from './commands/router.js';
|
|
45
|
-
export { maybeRunDaemonUpgradeHelperFromEnv, spawnDetachedDaemonUpgradeHelper, resolveCurrentGlobalInstallSurface, buildPinnedGlobalInstallCommand, } from './commands/upgrade-helper.js';
|
|
46
|
-
export type { DaemonUpgradeHelperPayload, CurrentGlobalInstallSurface, PinnedGlobalInstallCommand, } from './commands/upgrade-helper.js';
|
|
45
|
+
export { maybeRunDaemonUpgradeHelperFromEnv, spawnDetachedDaemonUpgradeHelper, resolveCurrentGlobalInstallSurface, buildPinnedGlobalInstallCommand, execNpmCommandSync, getNpmExecOptions, } from './commands/upgrade-helper.js';
|
|
46
|
+
export type { DaemonUpgradeHelperPayload, CurrentGlobalInstallSurface, PinnedGlobalInstallCommand, NpmExecOptions, } from './commands/upgrade-helper.js';
|
|
47
47
|
export { DaemonStatusReporter } from './status/reporter.js';
|
|
48
48
|
export { buildSessionEntries, findCdpManager, hasCdpManager, isCdpConnected } from './status/builders.js';
|
|
49
49
|
export { buildStatusSnapshot, buildMachineInfo } from './status/snapshot.js';
|