@wrongstack/core 0.283.1 → 0.284.0

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.
Files changed (78) hide show
  1. package/dist/{compactor-BxddyCFu.d.ts → compactor-DQLL4HTo.d.ts} +1 -1
  2. package/dist/{config-DkCbA3Bw.d.ts → config-MRqn1V-u.d.ts} +130 -22
  3. package/dist/coordination/index.d.ts +43 -20
  4. package/dist/coordination/index.js +1744 -912
  5. package/dist/coordination/index.js.map +1 -1
  6. package/dist/{default-config-Buho8yge.d.ts → default-config-B79_gJYv.d.ts} +7 -0
  7. package/dist/defaults/index.d.ts +25 -29
  8. package/dist/defaults/index.js +2546 -7396
  9. package/dist/defaults/index.js.map +1 -1
  10. package/dist/{director-state-B_GPa78Q.d.ts → director-state-CMS_bMs4.d.ts} +2 -0
  11. package/dist/{events-KmxSmvho.d.ts → events-Bgnh43r9.d.ts} +27 -10
  12. package/dist/execution/index.d.ts +15 -16
  13. package/dist/execution/index.js +534 -140
  14. package/dist/execution/index.js.map +1 -1
  15. package/dist/execution/prompt-enhancer.d.ts +1 -1
  16. package/dist/extension/index.d.ts +6 -6
  17. package/dist/{global-mailbox-rWVt8YlO.d.ts → global-mailbox-sZwyI6CS.d.ts} +13 -2
  18. package/dist/{goal-store-8owBXJT2.d.ts → goal-store-Datpp-ar.d.ts} +1 -1
  19. package/dist/hq/index.d.ts +6 -6
  20. package/dist/hq/index.js +58 -7
  21. package/dist/hq/index.js.map +1 -1
  22. package/dist/{index-BhCteHAF.d.ts → index--Gm41aBJ.d.ts} +26 -11
  23. package/dist/{index-BEFWNZYs.d.ts → index-CbyuOE5y.d.ts} +5 -1
  24. package/dist/index.d.ts +50 -1015
  25. package/dist/index.js +21028 -27775
  26. package/dist/index.js.map +1 -1
  27. package/dist/infrastructure/index.d.ts +9 -7
  28. package/dist/infrastructure/index.js +7 -2
  29. package/dist/infrastructure/index.js.map +1 -1
  30. package/dist/kernel/index.d.ts +11 -11
  31. package/dist/kernel/index.js.map +1 -1
  32. package/dist/{mcp-servers-BUx9A_AQ.d.ts → mcp-servers-DEV4s6Ks.d.ts} +3 -3
  33. package/dist/models/index.d.ts +4 -4
  34. package/dist/models/index.js +18 -3
  35. package/dist/models/index.js.map +1 -1
  36. package/dist/{agent-subagent-runner-BsuWhB28.d.ts → multi-agent-coordinator-4RCRZKjN.d.ts} +417 -9
  37. package/dist/{null-fleet-bus-D4e9R7Qc.d.ts → null-fleet-bus-CFoNVQEK.d.ts} +53 -12
  38. package/dist/observability/index.d.ts +3 -3
  39. package/dist/{parallel-eternal-engine-iY2uxocj.d.ts → parallel-eternal-engine-HUrtePLd.d.ts} +4 -5
  40. package/dist/{permission-B6YAtNFz.d.ts → permission-ByDKXEcG.d.ts} +1 -1
  41. package/dist/{pipeline-ixSFe5jg.d.ts → pipeline-DGDyIohT.d.ts} +28 -7
  42. package/dist/{provider-model-resolve-DIxKL_T-.d.ts → provider-model-resolve-o2hHLs79.d.ts} +3 -3
  43. package/dist/{provider-runner-oQhDaZmH.d.ts → provider-runner-ChL-kVg6.d.ts} +3 -3
  44. package/dist/{retry-policy-V67lBOJz.d.ts → retry-policy-CQ7KwXJa.d.ts} +2 -2
  45. package/dist/{secret-vault-D7jeyXUQ.d.ts → secret-vault-DxohkUBc.d.ts} +3 -2
  46. package/dist/security/index.d.ts +4 -4
  47. package/dist/security/index.js +232 -2
  48. package/dist/security/index.js.map +1 -1
  49. package/dist/{selector-Bx2HgUkU.d.ts → selector-D8O6B_Rm.d.ts} +1 -1
  50. package/dist/{session-event-bridge-Bkp7ORfc.d.ts → session-event-bridge-D_z_mBwk.d.ts} +3 -3
  51. package/dist/{session-reader-B-Fi9L6I.d.ts → session-reader-7Esxrkpw.d.ts} +1 -1
  52. package/dist/storage/index.d.ts +77 -39
  53. package/dist/storage/index.js +1223 -288
  54. package/dist/storage/index.js.map +1 -1
  55. package/dist/tasking/index.d.ts +124 -0
  56. package/dist/tasking/index.js +492 -0
  57. package/dist/tasking/index.js.map +1 -0
  58. package/dist/{todos-checkpoint-BwCrj4Cb.d.ts → todos-checkpoint-FY7PjmMx.d.ts} +13 -4
  59. package/dist/{tool-LVSLiE1s.d.ts → tool-BNlnIJvo.d.ts} +216 -17
  60. package/dist/{tool-executor-kElSEgO0.d.ts → tool-executor-CckSCM5E.d.ts} +12 -15
  61. package/dist/tools/index.d.ts +2 -2
  62. package/dist/tools/index.js.map +1 -1
  63. package/dist/types/index.d.ts +94 -19
  64. package/dist/types/index.js +76 -12
  65. package/dist/types/index.js.map +1 -1
  66. package/dist/utils/index.d.ts +44 -10
  67. package/dist/utils/index.js +106 -17
  68. package/dist/utils/index.js.map +1 -1
  69. package/dist/{worktree-manager-BjyAW30D.d.ts → worktree-manager-DzwxKE35.d.ts} +1 -1
  70. package/instructions/coordination/subagent-baseline.md +5 -0
  71. package/instructions/llm/autonomy-brain.md +3 -2
  72. package/instructions/system.md +4 -0
  73. package/package.json +10 -3
  74. package/dist/multi-agent-coordinator-CrjeTB9i.d.ts +0 -357
  75. package/dist/sdd/index.d.ts +0 -1993
  76. package/dist/sdd/index.js +0 -9500
  77. package/dist/sdd/index.js.map +0 -1
  78. package/dist/spec-TBi3Jr6T.d.ts +0 -78
@@ -1,4 +1,4 @@
1
- import { M as Message } from './tool-LVSLiE1s.js';
1
+ import { M as Message } from './tool-BNlnIJvo.js';
2
2
 
3
3
  /**
4
4
  * Result of LLM-driven message importance analysis.
@@ -1,4 +1,4 @@
1
- import { S as SessionEvent, b as SessionWriter } from './tool-LVSLiE1s.js';
1
+ import { S as SessionEvent, b as SessionWriter } from './tool-BNlnIJvo.js';
2
2
 
3
3
  type AuditLevel = 'minimal' | 'standard' | 'full';
4
4
  /**
@@ -46,12 +46,12 @@ interface SessionEventBridge {
46
46
  allows(type: SessionEvent['type']): boolean;
47
47
  }
48
48
  /** Core events that are always written regardless of auditLevel. */
49
- declare const CORE_RECONSTRUCT_EVENTS: Set<"tool_use" | "tool_result" | "error" | "session_start" | "session_resumed" | "user_input" | "llm_request" | "llm_response" | "compaction" | "session_end" | "mode_changed" | "task_created" | "task_updated" | "task_completed" | "task_failed" | "agent_spawned" | "agent_stopped" | "agent_error" | "spec_parsed" | "spec_analyzed" | "skill_activated" | "skill_deactivated" | "tool_call_start" | "tool_call_end" | "tool_progress" | "message_truncated" | "provider_retry" | "provider_error" | "checkpoint" | "file_snapshot" | "rewound" | "in_flight_start" | "in_flight_end" | "side_effect">;
49
+ declare const CORE_RECONSTRUCT_EVENTS: Set<"error" | "tool_use" | "tool_result" | "session_start" | "session_resumed" | "session_forked" | "user_input" | "llm_request" | "llm_response" | "context_snapshot" | "compaction" | "session_end" | "mode_changed" | "task_created" | "task_updated" | "task_completed" | "task_failed" | "agent_spawned" | "agent_stopped" | "agent_error" | "spec_parsed" | "spec_analyzed" | "skill_activated" | "skill_deactivated" | "tool_call_start" | "tool_call_end" | "tool_progress" | "message_truncated" | "provider_retry" | "provider_error" | "checkpoint" | "file_snapshot" | "file_observation" | "rewound" | "in_flight_start" | "in_flight_end" | "side_effect">;
50
50
  /**
51
51
  * Events that are considered "standard" audit detail.
52
52
  * These are lightweight and high-value for forensics.
53
53
  */
54
- declare const STANDARD_AUDIT_EVENTS: Set<"tool_use" | "tool_result" | "error" | "session_start" | "session_resumed" | "user_input" | "llm_request" | "llm_response" | "compaction" | "session_end" | "mode_changed" | "task_created" | "task_updated" | "task_completed" | "task_failed" | "agent_spawned" | "agent_stopped" | "agent_error" | "spec_parsed" | "spec_analyzed" | "skill_activated" | "skill_deactivated" | "tool_call_start" | "tool_call_end" | "tool_progress" | "message_truncated" | "provider_retry" | "provider_error" | "checkpoint" | "file_snapshot" | "rewound" | "in_flight_start" | "in_flight_end" | "side_effect">;
54
+ declare const STANDARD_AUDIT_EVENTS: Set<"error" | "tool_use" | "tool_result" | "session_start" | "session_resumed" | "session_forked" | "user_input" | "llm_request" | "llm_response" | "context_snapshot" | "compaction" | "session_end" | "mode_changed" | "task_created" | "task_updated" | "task_completed" | "task_failed" | "agent_spawned" | "agent_stopped" | "agent_error" | "spec_parsed" | "spec_analyzed" | "skill_activated" | "skill_deactivated" | "tool_call_start" | "tool_call_end" | "tool_progress" | "message_truncated" | "provider_retry" | "provider_error" | "checkpoint" | "file_snapshot" | "file_observation" | "rewound" | "in_flight_start" | "in_flight_end" | "side_effect">;
55
55
  /**
56
56
  * Create a safe, audit-level-aware bridge around a SessionWriter.
57
57
  *
@@ -1,4 +1,4 @@
1
- import { i as ContentBlock, S as SessionEvent, j as SessionMetadata, k as SessionStore } from './tool-LVSLiE1s.js';
1
+ import { i as ContentBlock, S as SessionEvent, j as SessionMetadata, k as SessionStore } from './tool-BNlnIJvo.js';
2
2
 
3
3
  type AttachmentKind = 'text' | 'image' | 'file';
4
4
  interface AttachmentMeta {
@@ -1,24 +1,24 @@
1
- import { M as MemoryBackend, j as FileMemoryBackendOptions } from '../todos-checkpoint-BwCrj4Cb.js';
2
- export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, F as FileMemoryBackend, k as MemoryStoreOptions, l as MigrationContext, m as MigrationResult, P as PersistedQueueItem, n as PlanFile, o as PlanItem, p as PlanTemplate, Q as QueueStore, R as RecoveryLock, q as RecoveryLockOptions, S as SessionAnalyzer, r as SessionStoreOptions, T as TodosCheckpointFile, s as addPlanItem, t as attachPlanCheckpoint, u as attachTodosCheckpoint, v as clearPlan, w as deriveTodosFromPlanItem, x as emptyPlan, y as formatPlan, z as formatPlanTemplates, B as getPlanTemplate, E as listPlanTemplates, G as loadPlan, H as loadTodosCheckpoint, I as mutatePlan, J as parseEntries, K as removePlanItem, L as runConfigMigrations, N as savePlan, O as saveTodosCheckpoint, U as setPlanItemStatus } from '../todos-checkpoint-BwCrj4Cb.js';
3
- import { E as EventBus, M as MemoryScope, b as MemoryEntry, c as MemoryStore } from '../events-KmxSmvho.js';
4
- import { i as AgentExtension, k as AfterRunHook } from '../index-BhCteHAF.js';
5
- import { c as Request, e as Response, P as Provider, S as SessionEvent, D as CompletedWorkEvidence } from '../tool-LVSLiE1s.js';
6
- import { P as ProviderConfig, a2 as SyncCategory, j as SyncConfig } from '../config-DkCbA3Bw.js';
1
+ import { M as MemoryBackend, j as FileMemoryBackendOptions } from '../todos-checkpoint-FY7PjmMx.js';
2
+ export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, F as FileMemoryBackend, k as MemoryStoreOptions, l as MigrationContext, m as MigrationResult, P as PersistedQueueItem, n as PlanFile, o as PlanItem, p as PlanTemplate, Q as QueueStore, R as RecoveryLock, q as RecoveryLockOptions, S as SessionAnalyzer, r as SessionStoreOptions, T as TodosCheckpointFile, s as addPlanItem, t as attachPlanCheckpoint, u as attachTodosCheckpoint, v as clearPlan, w as deriveTodosFromPlanItem, x as emptyPlan, y as formatPlan, z as formatPlanTemplates, B as getPlanTemplate, E as listPlanTemplates, G as loadPlan, H as loadTodosCheckpoint, I as mutatePlan, J as parseEntries, K as removePlanItem, L as runConfigMigrations, N as savePlan, O as saveTodosCheckpoint, U as setPlanItemStatus } from '../todos-checkpoint-FY7PjmMx.js';
3
+ import { c as Request, e as Response, W as WorkspaceCheckpointRef, w as WorkspaceMaterializationResult, P as Provider, S as SessionEvent, G as CompletedWorkEvidence } from '../tool-BNlnIJvo.js';
4
+ import { E as EventBus, M as MemoryScope, b as MemoryEntry, c as MemoryStore } from '../events-Bgnh43r9.js';
5
+ import { j as AgentExtension, l as AfterRunHook } from '../index--Gm41aBJ.js';
6
+ import { P as ProviderConfig, ab as SyncCategory, m as SyncConfig } from '../config-MRqn1V-u.js';
7
7
  import { S as SecretVault } from '../secret-vault-BAKpgFw_.js';
8
- export { D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from '../session-reader-B-Fi9L6I.js';
8
+ export { D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from '../session-reader-7Esxrkpw.js';
9
9
  import { b as SessionRegistry, A as AgentEntry } from '../session-registry-Dvg7i_IA.js';
10
10
  export { a as AgentLiveStatus, S as SessionLiveStatus, c as SessionRegistryEntry, g as getSessionRegistry, h as hasSessionRegistry } from '../session-registry-Dvg7i_IA.js';
11
11
  import { S as SessionRewinder, C as CheckpointInfo, a as RewindResultExtended } from '../session-rewinder-C9HnMkhP.js';
12
12
  import { T as TaskItem } from '../task-format-GX0B1mMC.js';
13
- export { a as DirectorStateCheckpoint, D as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from '../director-state-B_GPa78Q.js';
14
- export { G as GoalFile, J as JournalEntry, M as MAX_JOURNAL_ENTRIES, a as MAX_PROGRESS_HISTORY, P as ProgressSnapshot, b as appendJournal, e as emptyGoal, f as formatGoal, g as goalFilePath, l as loadGoal, p as parseProgressFromText, r as recordProgress, s as saveGoal, c as setProgress, d as summarizeUsage } from '../goal-store-8owBXJT2.js';
13
+ export { a as DirectorStateCheckpoint, D as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from '../director-state-CMS_bMs4.js';
14
+ export { G as GoalFile, J as JournalEntry, M as MAX_JOURNAL_ENTRIES, a as MAX_PROGRESS_HISTORY, P as ProgressSnapshot, b as appendJournal, e as emptyGoal, f as formatGoal, g as goalFilePath, l as loadGoal, p as parseProgressFromText, r as recordProgress, s as saveGoal, c as setProgress, d as summarizeUsage } from '../goal-store-Datpp-ar.js';
15
15
  import { a as PromptEntry } from '../prompt-DLd35n4Q.js';
16
16
  import { W as WstackPaths } from '../wstack-paths-C3K40Qst.js';
17
17
  import { S as SecretScrubber } from '../secret-scrubber-3MHDDAtm.js';
18
- export { A as AuditLevel, C as CORE_RECONSTRUCT_EVENTS, a as STANDARD_AUDIT_EVENTS, S as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from '../session-event-bridge-Bkp7ORfc.js';
19
- import '../permission-B6YAtNFz.js';
18
+ export { A as AuditLevel, C as CORE_RECONSTRUCT_EVENTS, a as STANDARD_AUDIT_EVENTS, S as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from '../session-event-bridge-D_z_mBwk.js';
19
+ import '../permission-ByDKXEcG.js';
20
20
  import '../logger-B63L5bTg.js';
21
- import '../pipeline-ixSFe5jg.js';
21
+ import '../pipeline-DGDyIohT.js';
22
22
  import '../mailbox-types-BGZWrYTJ.js';
23
23
  import '../observability-D-HZN_mF.js';
24
24
  import '../task-graph-CH3acNQ7.js';
@@ -181,6 +181,42 @@ declare class ReplayLogStore {
181
181
  private enqueue;
182
182
  }
183
183
 
184
+ interface CheckpointGitResult {
185
+ code: number;
186
+ stdout: string;
187
+ stderr: string;
188
+ /** Set when the runner discarded output after its safety limit. */
189
+ stdoutTruncated?: boolean | undefined;
190
+ stderrTruncated?: boolean | undefined;
191
+ }
192
+ interface SessionCheckpointCasOptions {
193
+ rootDir: string;
194
+ projectRoot: string;
195
+ runGit?: ((args: string[], cwd: string) => Promise<CheckpointGitResult>) | undefined;
196
+ }
197
+ /**
198
+ * Content-addressed workspace checkpoint store.
199
+ *
200
+ * A manifest references a Git base tree plus CAS blobs for every changed or
201
+ * untracked, non-ignored path. Applying it to a checkout at the same baseHead
202
+ * reproduces the checkpoint without touching the parent working tree.
203
+ */
204
+ declare class SessionCheckpointCas {
205
+ private readonly rootDir;
206
+ private readonly projectRoot;
207
+ private readonly runGit;
208
+ constructor(opts: SessionCheckpointCasOptions);
209
+ capture(_sessionId: string, _promptIndex: number): Promise<WorkspaceCheckpointRef | undefined>;
210
+ materialize(checkpoint: WorkspaceCheckpointRef, targetRoot: string): Promise<WorkspaceMaterializationResult>;
211
+ private objectPath;
212
+ private manifestPath;
213
+ private putBlob;
214
+ private putManifest;
215
+ private readBlob;
216
+ private loadManifest;
217
+ private safeOutputPath;
218
+ }
219
+
184
220
  /**
185
221
  * @deprecated Legacy helper kept for callers that still need filename-safe
186
222
  * labels. New session ids are opaque and do not include model/provider names.
@@ -508,19 +544,15 @@ declare class AnnotationsStore {
508
544
  * `SessionRecovery` is the read-side companion to the in-flight
509
545
  * marker mechanism. When the agent loop is running, it writes an
510
546
  * `in_flight_start` event at the current point in the log. On
511
- * clean shutdown, a matching `in_flight_end` follows. If the
512
- * process dies (crash, OOM, machine sleep, SIGKILL) the marker
513
- * is the last event in the file and `detectStale` flags the
514
- * session as "incomplete, can be resumed".
547
+ * clean shutdown, a matching `in_flight_end` follows. Provider and
548
+ * tool events may legitimately appear after the start marker, so
549
+ * recovery finds the latest lifecycle boundary rather than assuming
550
+ * the marker is literally the last JSONL record.
515
551
  *
516
- * Phase 1 of this feature is **detection only**. The actual
517
- * re-execution of incomplete work is a follow-up: it requires
518
- * tracking pending tool calls, mid-stream LLM responses, and
519
- * uncommitted file changes and re-running the agent loop from
520
- * the last `checkpoint` event. The detection layer is independent
521
- * and ships first because (a) it gives the user immediate
522
- * visibility into what died, and (b) it's the foundation for the
523
- * resume command and the CLI's "Incomplete sessions" surface.
552
+ * Detection is diagnostic only. Normal session resume reconstructs the
553
+ * conversation by replaying persisted JSONL events; it must not blindly
554
+ * re-execute tool calls after a crash. `recover()` exposes the tail after the
555
+ * last checkpoint so callers can explain which persisted work was in flight.
524
556
  *
525
557
  * Concurrency: pure read; no writes. Safe to call from multiple
526
558
  * processes simultaneously.
@@ -542,7 +574,7 @@ interface RecoveryPlan {
542
574
  stale: boolean;
543
575
  /** The last `checkpoint` event before the un-replayed work, or null. */
544
576
  lastCheckpoint: SessionEvent | null;
545
- /** All events after the last checkpoint (i.e. the work that needs re-execution). */
577
+ /** All persisted events after the last checkpoint (diagnostic in-flight tail). */
546
578
  pendingEvents: SessionEvent[];
547
579
  /** The dangling in_flight_start event, if any. */
548
580
  inFlightStart: SessionEvent | null;
@@ -551,31 +583,37 @@ interface RecoveryPlan {
551
583
  }
552
584
  /**
553
585
  * Result of `SessionRecovery.recover(sessionId)`. Distinct from
554
- * `StaleSession`: a session is "stale" if the last event is an
555
- * open marker, but a "recovery plan" can also be generated for
586
+ * `StaleSession`: a session is "stale" if its latest lifecycle
587
+ * boundary is an open marker, but a "recovery plan" can also be generated for
556
588
  * clean sessions whose last checkpoint is older than the
557
589
  * conversation history (e.g. a user-initiated "rewind to last
558
- * good state" flow). Phase 2 of idea #1: this returns the plan;
559
- * the actual kernel re-execution is a follow-up.
590
+ * good state" flow). This is a diagnostic plan, not authorization to replay
591
+ * external side effects.
560
592
  */
561
593
  declare class SessionRecovery {
562
594
  private readonly dir;
563
595
  /**
564
- * Scan a session log and return a `StaleSession` if and only
565
- * if the last event is an `in_flight_start` without a matching
566
- * `in_flight_end`. Returns `null` when:
596
+ * Scan a session log and return a `StaleSession` if and only if the newest
597
+ * lifecycle boundary is an `in_flight_start` without a later
598
+ * `in_flight_end`/`session_end`. Ordinary provider/tool events after the
599
+ * marker do not make the session clean. Returns `null` when:
567
600
  * - the log does not exist;
568
601
  * - the log is empty;
569
- * - the last event is `in_flight_end` (clean shutdown);
570
- * - the last event is something else (e.g. an unannotated
571
- * legacy log without in-flight markers).
602
+ * - the latest lifecycle boundary is `in_flight_end` or `session_end`;
603
+ * - there is no lifecycle boundary (legacy/pre-marker log).
604
+ *
605
+ * The reverse scanner is chunked and line-aware. It can cross arbitrarily
606
+ * large JSONL records (for example a large tool result) without imposing a
607
+ * fixed tail-size correctness limit. Clean logs normally return after the
608
+ * first chunk; stale logs continue counting lines so `eventCount` remains
609
+ * the documented total rather than a tail-only approximation.
572
610
  */
573
611
  detectStale(sessionId: string): Promise<StaleSession | null>;
574
612
  /**
575
613
  * Generate a recovery plan for a session. The plan describes
576
- * "what would be re-executed" if the user chose to resume
577
- * everything after the last `checkpoint` event, plus the
578
- * dangling in-flight marker if present.
614
+ * the persisted tail after the last checkpoint, plus the dangling in-flight
615
+ * marker if present. SessionStore.resume() independently reconstructs state
616
+ * from the journal and does not re-run these events as commands.
579
617
  *
580
618
  * Returns a non-null plan for ANY session that has at least
581
619
  * one event after a checkpoint (or, for legacy sessions, at
@@ -990,4 +1028,4 @@ declare class CloudSync {
990
1028
  private walkDir;
991
1029
  }
992
1030
 
993
- export { ALL_SYNC_CATEGORIES, AgentEntry, AgentStatusTracker, type AgentStatusTrackerOptions, type Annotation, AnnotationsStore, type AnnotationsStoreOptions, type AuditEntry, CloudSync, type CompletedWorkCheckpointFile, type ConsolidationOp, DefaultPromptStore, DefaultSessionRewinder, FileMemoryBackendOptions, FleetNotifier, type FleetNotifierOptions, GraphMemoryBackend, type GraphMemoryBackendOptions, INPUT_HISTORY_DEFAULT_MAX, InputHistoryStore, MemoryBackend, type MemoryConsolidatorOptions, PromptEntry, type PromptStore, type PromptUsage, PromptUsageStore, type ProviderConfigSnapshot, type RecoveryPlan, type ReplayEntry, ReplayLogStore, type ReplayLogStoreOptions, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, type SessionRewinderOptions, type StaleSession, SyncCategory, SyncConfig, type SyncResult, type TaskFile, ToolAuditLog, type ToolAuditLogOptions, type VerifyResult, type WatchProviderConfigOptions, emptyTaskFile, generateSessionId, loadCompletedWorkCheckpoint, loadTasks, migratePromptEntry, mutateTasks, promptChecksum, sanitizeModel, saveCompletedWorkCheckpoint, saveTasks, watchProviderConfig };
1031
+ export { ALL_SYNC_CATEGORIES, AgentEntry, AgentStatusTracker, type AgentStatusTrackerOptions, type Annotation, AnnotationsStore, type AnnotationsStoreOptions, type AuditEntry, type CheckpointGitResult, CloudSync, type CompletedWorkCheckpointFile, type ConsolidationOp, DefaultPromptStore, DefaultSessionRewinder, FileMemoryBackendOptions, FleetNotifier, type FleetNotifierOptions, GraphMemoryBackend, type GraphMemoryBackendOptions, INPUT_HISTORY_DEFAULT_MAX, InputHistoryStore, MemoryBackend, type MemoryConsolidatorOptions, PromptEntry, type PromptStore, type PromptUsage, PromptUsageStore, type ProviderConfigSnapshot, type RecoveryPlan, type ReplayEntry, ReplayLogStore, type ReplayLogStoreOptions, SessionCheckpointCas, type SessionCheckpointCasOptions, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, type SessionRewinderOptions, type StaleSession, SyncCategory, SyncConfig, type SyncResult, type TaskFile, ToolAuditLog, type ToolAuditLogOptions, type VerifyResult, type WatchProviderConfigOptions, emptyTaskFile, generateSessionId, loadCompletedWorkCheckpoint, loadTasks, migratePromptEntry, mutateTasks, promptChecksum, sanitizeModel, saveCompletedWorkCheckpoint, saveTasks, watchProviderConfig };