@adhdev/daemon-core 0.8.75 → 0.8.77

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.
@@ -46,7 +46,7 @@ export declare class DaemonAgentStreamManager {
46
46
  /** Agent webview discovery + session connection */
47
47
  syncActiveSession(cdp: DaemonCdpManager, parentSessionId: string): Promise<void>;
48
48
  /** Collect active extension session state */
49
- collectActiveSession(cdp: DaemonCdpManager, parentSessionId: string): Promise<AgentStreamState | null>;
49
+ collectActiveSession(cdp: DaemonCdpManager, parentSessionId: string, attemptedSessionIds?: Set<string>, originSessionId?: string): Promise<AgentStreamState | null>;
50
50
  sendToSession(cdp: DaemonCdpManager, sessionId: string, text: string): Promise<boolean>;
51
51
  resolveSessionAction(cdp: DaemonCdpManager, sessionId: string, action: 'approve' | 'reject', button?: string): Promise<boolean>;
52
52
  newSession(cdp: DaemonCdpManager, sessionId: string): Promise<boolean>;
@@ -10,13 +10,21 @@
10
10
  * - DOM query
11
11
  */
12
12
  import type { CdpTargetFilter } from '../providers/contracts.js';
13
- interface CdpTarget {
13
+ export interface CdpTarget {
14
14
  id: string;
15
15
  type: string;
16
16
  title: string;
17
17
  url: string;
18
18
  webSocketDebuggerUrl: string;
19
19
  }
20
+ export declare function resolveCdpPageTarget(params: {
21
+ pages: CdpTarget[];
22
+ pinnedTargetId?: string | null;
23
+ previousPageTitle?: string | null;
24
+ }): {
25
+ target: CdpTarget | null;
26
+ retargeted: boolean;
27
+ };
20
28
  export interface AgentWebviewTarget {
21
29
  targetId: string;
22
30
  extensionId: string;
@@ -144,4 +152,3 @@ export declare class DaemonCdpManager {
144
152
  quality?: number;
145
153
  }): Promise<Buffer | null>;
146
154
  }
147
- export {};
@@ -0,0 +1,4 @@
1
+ export interface AsyncBatchOptions {
2
+ concurrency?: number;
3
+ }
4
+ export declare function runAsyncBatch<T>(items: Iterable<T>, worker: (item: T, index: number) => Promise<void>, options?: AsyncBatchOptions): Promise<void>;
@@ -18,6 +18,8 @@ export interface PtyRuntimeMetadata {
18
18
  runtimeKey?: string;
19
19
  displayName?: string;
20
20
  workspaceLabel?: string;
21
+ lifecycle?: string | null;
22
+ surfaceKind?: 'live_runtime' | 'recovery_snapshot' | 'inactive_record';
21
23
  writeOwner?: PtyRuntimeWriteOwner | null;
22
24
  attachedClients?: PtyRuntimeClientInfo[];
23
25
  restoredFromStorage?: boolean;
@@ -8,6 +8,7 @@
8
8
  * - Auto-rotation (delete files older than 30 days)
9
9
  * - Async/non-blocking (no impact on chat collection)
10
10
  */
11
+ export declare const SAVED_HISTORY_ROLLUP_THRESHOLD_BYTES: number;
11
12
  interface HistoryMessage {
12
13
  ts: string;
13
14
  receivedAt: number;
@@ -30,6 +31,7 @@ export interface SavedHistorySessionSummary {
30
31
  preview?: string;
31
32
  workspace?: string;
32
33
  }
34
+ export declare function shouldScheduleSavedHistoryRollup(totalBytes: number): boolean;
33
35
  export declare class ChatHistoryWriter {
34
36
  /** Last seen message count per agent (deduplication) */
35
37
  private lastSeenCounts;
package/dist/index.d.ts CHANGED
@@ -64,6 +64,8 @@ export { readChatHistory } from './config/chat-history.js';
64
64
  export { hashSignatureParts, buildChatMessageSignature, buildChatTailDeliverySignature, buildSessionModalDeliverySignature, } from './chat/chat-signatures.js';
65
65
  export type { ChatMessageSignatureInput, ChatTailDeliverySignatureInput, SessionModalDeliverySignatureInput, } from './chat/chat-signatures.js';
66
66
  export { normalizeChatTailActiveModal, normalizeSessionModalFields, prepareSessionChatTailUpdate, prepareSessionModalUpdate, } from './chat/subscription-updates.js';
67
+ export { runAsyncBatch } from './chat/async-batch.js';
68
+ export type { AsyncBatchOptions } from './chat/async-batch.js';
67
69
  export type { ChatTailSubscriptionCursor, PrepareSessionChatTailUpdateInput, PreparedSessionChatTailUpdate, PrepareSessionModalUpdateInput, PreparedSessionModalUpdate, SessionChatTailCommandResult, } from './chat/subscription-updates.js';
68
70
  export { DaemonAgentStreamManager } from './agent-stream/index.js';
69
71
  export { AgentStreamPoller } from './agent-stream/index.js';