@adhdev/daemon-core 0.9.82-rc.447 → 0.9.82-rc.449

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.
@@ -38,6 +38,16 @@ export interface CliTransportFactoryParams {
38
38
  cliArgs?: string[];
39
39
  providerSessionId?: string;
40
40
  attachExisting?: boolean;
41
+ /**
42
+ * Launch-time record meta (meshNodeId / meshNodeFor / launchedByCoordinator /
43
+ * autoLaunchedForQueueTaskId). Defense-in-depth for SESSION-ACCUMULATION-LEAK:
44
+ * a session-host factory impl SHOULD seed the create_session record with this
45
+ * so the node binding is present the instant the record exists, rather than
46
+ * relying solely on the post-spawn updateRuntimeMeta round-trip. Optional and
47
+ * additive — factory impls that ignore it keep the prior behavior; the
48
+ * post-spawn WTDISPATCH stamp in register() still runs as the primary path.
49
+ */
50
+ initialMeta?: Record<string, unknown>;
41
51
  }
42
52
  export interface HostedCliRuntimeDescriptor {
43
53
  runtimeId: string;
@@ -94,6 +94,16 @@ export interface MedFamilyContext {
94
94
  dryRun?: boolean;
95
95
  source?: 'mesh_cleanup_sessions' | 'mesh_remove_node' | 'magi_session_cleanup';
96
96
  requireAutoLaunchedForTaskIds?: Record<string, string>;
97
+ /**
98
+ * Opt-in orphan reclaim (default false). When true, a workspace-only live
99
+ * session (no node binding) OR a session bound to a node that no longer
100
+ * exists in `liveMeshNodeIds` is stopped instead of skipped — reclaims the
101
+ * SESSION-ACCUMULATION-LEAK orphans. `liveMeshNodeIds` is the current mesh's
102
+ * node id set; a session whose meshNodeId is still present is treated as an
103
+ * active sibling and left alone.
104
+ */
105
+ reclaimOrphans?: boolean;
106
+ liveMeshNodeIds?: string[];
97
107
  }) => Promise<{
98
108
  success: boolean;
99
109
  [key: string]: unknown;
package/dist/index.d.ts CHANGED
@@ -151,6 +151,8 @@ export type { HostedCliRuntimeDescriptor, CliTransportFactoryParams } from './co
151
151
  export { DEFAULT_SESSION_HOST_APP_NAME, DEFAULT_STANDALONE_SESSION_HOST_APP_NAME, resolveSessionHostAppName, resolveSessionHostAppNameResolution, } from './session-host/app-name.js';
152
152
  export type { SessionHostAppNameResolution } from './session-host/app-name.js';
153
153
  export { ensureSessionHostReady, listHostedCliRuntimes } from './session-host/runtime-support.js';
154
+ export { createManagedSessionHost } from './session-host/managed-host.js';
155
+ export type { ManagedSessionHost, ManagedSessionHostOptions } from './session-host/managed-host.js';
154
156
  export { getSessionHostRecoveryLabel, getSessionHostSurfaceKind, isSessionHostLiveRuntime, isSessionHostRecoverySnapshot, partitionSessionHostDiagnosticsSessions, partitionSessionHostRecords, } from './session-host/runtime-surface.js';
155
157
  export type { SessionHostSurfaceKind, SessionHostSurfaceRecordLike } from './session-host/runtime-surface.js';
156
158
  export { shouldAutoRestoreHostedSessionsOnStartup } from './session-host/startup-restore-policy.js';