@adhdev/daemon-core 1.0.23 → 1.0.24
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-adapters/provider-cli-shared.d.ts +2 -0
- package/dist/commands/upgrade-helper.d.ts +8 -0
- package/dist/commands/windows-atomic-upgrade.d.ts +8 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +229 -79
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +185 -37
- package/dist/index.mjs.map +1 -1
- package/dist/providers/cli-provider-instance.d.ts +24 -0
- package/package.json +1 -1
- package/src/cli-adapters/provider-cli-shared.ts +109 -6
- package/src/commands/upgrade-helper.d.ts +3 -0
- package/src/commands/upgrade-helper.ts +35 -8
- package/src/commands/windows-atomic-upgrade.ts +26 -4
- package/src/index.ts +2 -1
- package/src/providers/cli-provider-instance.ts +86 -14
- package/src/session-host/managed-host.ts +47 -1
|
@@ -397,6 +397,8 @@ export declare function listCliScriptNames(scripts: CliScripts | undefined): str
|
|
|
397
397
|
export declare function buildCliScreenSnapshot(text: string): CliScreenSnapshot;
|
|
398
398
|
export declare const buildCliSpawnEnv: typeof sanitizeSpawnEnv;
|
|
399
399
|
export declare function computeTerminalQueryTail(buffer: string): string;
|
|
400
|
+
/** Test-only: reset the memoized npm-prefix so a test can re-stub `execSync`. */
|
|
401
|
+
export declare function __resetNpmPrefixCacheForTests(): void;
|
|
400
402
|
export declare function findBinary(name: string): string;
|
|
401
403
|
export declare function isScriptBinary(binaryPath: string): boolean;
|
|
402
404
|
export declare function looksLikeMachOOrElf(filePath: string): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ExecFileSyncOptions } from 'child_process';
|
|
2
|
+
export declare function resolveInstanceDir(configDir?: string): string;
|
|
2
3
|
export interface DaemonUpgradeHelperPayload {
|
|
3
4
|
packageName: string;
|
|
4
5
|
targetVersion: string;
|
|
@@ -30,6 +31,13 @@ export declare function resolveCurrentGlobalInstallSurface(options: {
|
|
|
30
31
|
nodeExecutable?: string;
|
|
31
32
|
platform?: NodeJS.Platform;
|
|
32
33
|
homeDir?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Per-instance base dir name under homeDir (`.adhdev` stable /
|
|
36
|
+
* `.adhdev-preview` preview). Defaults to the running daemon's config-dir
|
|
37
|
+
* basename via resolveInstanceDir(), so the legacy-prefix convergence checks
|
|
38
|
+
* scope to the correct instance's tools/node22 + npm-installs tree.
|
|
39
|
+
*/
|
|
40
|
+
instanceDir?: string;
|
|
33
41
|
}): CurrentGlobalInstallSurface;
|
|
34
42
|
export declare function buildPinnedGlobalInstallCommand(options: {
|
|
35
43
|
packageName: string;
|
|
@@ -32,12 +32,19 @@ export interface WindowsAtomicUpgradeResult {
|
|
|
32
32
|
stagedCliEntry: string;
|
|
33
33
|
daemonPid: number;
|
|
34
34
|
}
|
|
35
|
+
export declare const DEFAULT_INSTANCE_DIR = ".adhdev";
|
|
35
36
|
export declare function resolveWindowsInstallerLayout(options: {
|
|
36
37
|
homeDir: string;
|
|
37
38
|
installPrefix: string | null;
|
|
38
39
|
platform?: NodeJS.Platform;
|
|
40
|
+
/**
|
|
41
|
+
* Per-instance base dir name under homeDir (e.g. `.adhdev` for stable,
|
|
42
|
+
* `.adhdev-preview` for the coexisting preview install). Defaults to
|
|
43
|
+
* `.adhdev`, keeping the stable layout byte-for-byte identical to before.
|
|
44
|
+
*/
|
|
45
|
+
instanceDir?: string;
|
|
39
46
|
}): WindowsInstallerLayout | null;
|
|
40
|
-
export declare function findPortableNode22(homeDir: string, currentNode?: string): string | null;
|
|
47
|
+
export declare function findPortableNode22(homeDir: string, currentNode?: string, instanceDir?: string): string | null;
|
|
41
48
|
export declare function performWindowsAtomicUpgrade(options: WindowsAtomicUpgradeOptions): Promise<WindowsAtomicUpgradeResult>;
|
|
42
49
|
export declare function createDefaultWindowsAtomicHooks(options: {
|
|
43
50
|
packageName: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export type { SessionHostEndpoint } from '@adhdev/session-host-core';
|
|
|
24
24
|
export type SessionStatus = 'idle' | 'generating' | 'waiting_approval' | 'error' | 'stopped' | 'starting' | 'panel_hidden' | 'not_monitored' | 'disconnected';
|
|
25
25
|
export type RecentSessionBucket = 'needs_attention' | 'working' | 'task_complete' | 'idle';
|
|
26
26
|
export type { IDaemonCore, DaemonCoreOptions } from './daemon-core.js';
|
|
27
|
-
export { loadConfig, saveConfig, resetConfig, isSetupComplete, markSetupComplete, updateConfig, getDaemonDataDir } from './config/config.js';
|
|
27
|
+
export { loadConfig, saveConfig, resetConfig, isSetupComplete, markSetupComplete, updateConfig, getConfigDir, getDaemonDataDir } from './config/config.js';
|
|
28
28
|
export { getWorkspaceState } from './config/workspaces.js';
|
|
29
29
|
export { appendRecentActivity, getRecentActivity } from './config/recent-activity.js';
|
|
30
30
|
export type { RecentActivityEntry } from './config/recent-activity.js';
|
|
@@ -102,7 +102,7 @@ export { DaemonCommandHandler } from './commands/handler.js';
|
|
|
102
102
|
export type { CommandResult, CommandContext } from './commands/handler.js';
|
|
103
103
|
export { DaemonCommandRouter, readCachedInlineMeshActiveSessionDetails, resolveMeshNodeAttribution, buildMeshNodeDataFreshness, buildMeshNodeProbeFreshness, MESH_NODE_LIVE_TRUTH_MARKER } from './commands/router.js';
|
|
104
104
|
export type { CommandRouterDeps, CommandRouterResult } from './commands/router.js';
|
|
105
|
-
export { maybeRunDaemonUpgradeHelperFromEnv, spawnDetachedDaemonUpgradeHelper, resolveCurrentGlobalInstallSurface, buildPinnedGlobalInstallCommand, execNpmCommandSync, getNpmExecOptions, } from './commands/upgrade-helper.js';
|
|
105
|
+
export { maybeRunDaemonUpgradeHelperFromEnv, spawnDetachedDaemonUpgradeHelper, resolveCurrentGlobalInstallSurface, resolveInstanceDir, buildPinnedGlobalInstallCommand, execNpmCommandSync, getNpmExecOptions, } from './commands/upgrade-helper.js';
|
|
106
106
|
export type { DaemonUpgradeHelperPayload, CurrentGlobalInstallSurface, PinnedGlobalInstallCommand, NpmExecOptions, } from './commands/upgrade-helper.js';
|
|
107
107
|
export { DaemonStatusReporter } from './status/reporter.js';
|
|
108
108
|
export { buildSessionEntries, findCdpManager, hasCdpManager, isCdpConnected, isCoordinatorSpawnedHiddenWorker, resolveSurfaceHidden, resolveMuted, resolveSpawnedSessionHideMute } from './status/builders.js';
|