@wrongstack/core 0.301.0 → 0.302.2

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 (44) hide show
  1. package/dist/agent-status-tracker.d.ts +6 -2
  2. package/dist/chronicle/index.js +1836 -1645
  3. package/dist/chronicle/metrics-store.d.ts +14 -0
  4. package/dist/chronicle/project-server-protocol.d.ts +13 -0
  5. package/dist/chronicle/project-server.js +1759 -1583
  6. package/dist/chronicle/rollup-adapter.d.ts +2 -0
  7. package/dist/chronicle/sqlite-journal.d.ts +59 -0
  8. package/dist/coordination/index.js +791 -249
  9. package/dist/coordination/mail-tools.d.ts +2 -2
  10. package/dist/core/continue-intent.d.ts +2 -0
  11. package/dist/core/conversation-state.d.ts +5 -0
  12. package/dist/core/index.js +120 -19
  13. package/dist/defaults/index.js +928 -374
  14. package/dist/execution/index.js +28 -11
  15. package/dist/index.d.ts +3 -1
  16. package/dist/index.js +8763 -6781
  17. package/dist/infrastructure/index.js +722 -672
  18. package/dist/kernel/events/memory-events.d.ts +62 -0
  19. package/dist/plugin/index.js +2154 -1979
  20. package/dist/session-catalog/client.d.ts +62 -0
  21. package/dist/session-catalog/endpoint.d.ts +6 -0
  22. package/dist/session-catalog/index.d.ts +6 -0
  23. package/dist/session-catalog/index.js +1978 -0
  24. package/dist/session-catalog/project-server.d.ts +3 -0
  25. package/dist/session-catalog/project-server.js +1838 -0
  26. package/dist/session-catalog/protocol.d.ts +275 -0
  27. package/dist/session-catalog/registry.d.ts +59 -0
  28. package/dist/session-catalog/store.d.ts +55 -0
  29. package/dist/session-registry-types.d.ts +17 -0
  30. package/dist/session-registry.d.ts +1 -1
  31. package/dist/storage/index.d.ts +42 -38
  32. package/dist/storage/index.js +14279 -13393
  33. package/dist/storage/session-event-bridge.d.ts +2 -2
  34. package/dist/storage/session-store.d.ts +6 -0
  35. package/dist/tools/index.js +8 -2
  36. package/dist/types/context-evidence.d.ts +2 -0
  37. package/dist/types/messages.d.ts +8 -0
  38. package/dist/types/session.d.ts +19 -0
  39. package/dist/utils/context-evidence.d.ts +13 -1
  40. package/dist/utils/index.js +26 -2
  41. package/instructions/system-lite.md +11 -2
  42. package/instructions/system-pro.md +14 -0
  43. package/instructions/system.md +14 -0
  44. package/package.json +7 -3
@@ -0,0 +1,275 @@
1
+ import type { SessionRegistryEntry } from '../session-registry-types.js';
2
+ import type { SessionSummary } from '../types/session.js';
3
+ export declare const SESSION_CATALOG_PROTOCOL_VERSION = 1;
4
+ export declare const SESSION_CATALOG_MAX_FRAME_CHARS: number;
5
+ export declare const SESSION_CATALOG_DEFAULT_LEASE_MS = 30000;
6
+ export declare const SESSION_CATALOG_DEFAULT_RESERVATION_MS = 15000;
7
+ export declare const SESSION_CATALOG_MAX_AGENTS = 128;
8
+ export interface SessionLeaseCredential {
9
+ sessionId: string;
10
+ leaseId: string;
11
+ leaseSecret: string;
12
+ ownerInstanceId: string;
13
+ expiresAt: number;
14
+ }
15
+ export interface ResumeReservation {
16
+ reservationId: string;
17
+ targetSessionId: string;
18
+ requesterInstanceId: string;
19
+ expiresAt: number;
20
+ }
21
+ export interface MaintenanceLease {
22
+ sessionId: string;
23
+ operation: 'delete' | 'prune' | 'clear' | 'truncate' | 'rewind' | 'repair';
24
+ holderId: string;
25
+ leaseId: string;
26
+ expiresAt: number;
27
+ }
28
+ export interface SessionCatalogServerInfo {
29
+ protocolVersion: number;
30
+ pid: number;
31
+ projectDir: string;
32
+ projectRoot: string;
33
+ endpoint: string;
34
+ databasePath: string;
35
+ instanceId: string;
36
+ startedAt: string;
37
+ }
38
+ export interface SessionCatalogHealth extends SessionCatalogServerInfo {
39
+ checkedAt: number;
40
+ uptimeMs: number;
41
+ clients: number;
42
+ activeRequests: number;
43
+ catalogRows: number;
44
+ damagedRows: number;
45
+ liveLeases: number;
46
+ reservations: number;
47
+ maintenanceLeases: number;
48
+ generation: number;
49
+ lastReconciliation?: string | undefined;
50
+ memory: {
51
+ rss: number;
52
+ heapUsed: number;
53
+ heapTotal: number;
54
+ external: number;
55
+ };
56
+ handles: number;
57
+ }
58
+ export interface SessionCatalogMetadata extends SessionCatalogServerInfo {
59
+ authToken: string;
60
+ }
61
+ export interface CatalogSessionRecord extends SessionSummary {
62
+ transcriptRelativePath: string;
63
+ summaryRelativePath: string;
64
+ transcriptSize: number;
65
+ transcriptMtimeMs: number;
66
+ summaryRevision: number;
67
+ indexedAt: string;
68
+ damaged: boolean;
69
+ }
70
+ export type SessionCatalogEventKind = 'session.claimed' | 'session.presence_changed' | 'session.closing' | 'session.released' | 'session.catalog_changed' | 'session.deleted' | 'session.rebuild_started' | 'session.rebuild_completed';
71
+ export interface SessionCatalogEvent {
72
+ instanceId: string;
73
+ sequence: number;
74
+ kind: SessionCatalogEventKind;
75
+ sessionId?: string | undefined;
76
+ generation: number;
77
+ at: string;
78
+ }
79
+ export interface SessionCatalogOperations {
80
+ ping: {
81
+ args: Record<string, never>;
82
+ result: SessionCatalogHealth;
83
+ };
84
+ claim_new: {
85
+ args: {
86
+ entry: SessionRegistryEntry;
87
+ ownerInstanceId: string;
88
+ leaseMs?: number;
89
+ };
90
+ result: SessionLeaseCredential;
91
+ };
92
+ reconnect_lease: {
93
+ args: SessionLeaseCredential;
94
+ result: SessionLeaseCredential;
95
+ };
96
+ reserve_resume: {
97
+ args: {
98
+ targetSessionId: string;
99
+ requesterInstanceId: string;
100
+ currentSessionId?: string;
101
+ reservationMs?: number;
102
+ };
103
+ result: ResumeReservation;
104
+ };
105
+ activate_reservation: {
106
+ args: {
107
+ reservation: ResumeReservation;
108
+ entry: SessionRegistryEntry;
109
+ leaseMs?: number;
110
+ };
111
+ result: SessionLeaseCredential;
112
+ };
113
+ cancel_reservation: {
114
+ args: {
115
+ reservationId: string;
116
+ requesterInstanceId: string;
117
+ };
118
+ result: void;
119
+ };
120
+ heartbeat: {
121
+ args: {
122
+ credential: SessionLeaseCredential;
123
+ status?: SessionRegistryEntry['status'];
124
+ };
125
+ result: SessionLeaseCredential;
126
+ };
127
+ publish_agents: {
128
+ args: {
129
+ credential: SessionLeaseCredential;
130
+ revision: number;
131
+ agents: SessionRegistryEntry['agents'];
132
+ };
133
+ result: {
134
+ accepted: boolean;
135
+ revision: number;
136
+ };
137
+ };
138
+ mark_closing: {
139
+ args: {
140
+ credential: SessionLeaseCredential;
141
+ };
142
+ result: void;
143
+ };
144
+ release: {
145
+ args: {
146
+ credential: SessionLeaseCredential;
147
+ };
148
+ result: void;
149
+ };
150
+ list_live: {
151
+ args: Record<string, never>;
152
+ result: SessionRegistryEntry[];
153
+ };
154
+ get_live: {
155
+ args: {
156
+ sessionId: string;
157
+ };
158
+ result: SessionRegistryEntry | null;
159
+ };
160
+ subscribe: {
161
+ args: {
162
+ cursor?: number;
163
+ };
164
+ result: {
165
+ instanceId: string;
166
+ sequence: number;
167
+ };
168
+ };
169
+ unsubscribe: {
170
+ args: Record<string, never>;
171
+ result: void;
172
+ };
173
+ upsert_summary: {
174
+ args: {
175
+ summary: SessionSummary;
176
+ transcriptRelativePath?: string;
177
+ summaryRelativePath?: string;
178
+ };
179
+ result: CatalogSessionRecord;
180
+ };
181
+ list_catalog: {
182
+ args: {
183
+ limit?: number;
184
+ search?: string;
185
+ };
186
+ result: CatalogSessionRecord[];
187
+ };
188
+ resolve_id: {
189
+ args: {
190
+ query: string;
191
+ };
192
+ result: string;
193
+ };
194
+ get_summary: {
195
+ args: {
196
+ sessionId: string;
197
+ };
198
+ result: CatalogSessionRecord | null;
199
+ };
200
+ rename: {
201
+ args: {
202
+ sessionId: string;
203
+ name: string;
204
+ };
205
+ result: CatalogSessionRecord;
206
+ };
207
+ acquire_maintenance: {
208
+ args: {
209
+ sessionId: string;
210
+ operation: MaintenanceLease['operation'];
211
+ holderId: string;
212
+ leaseMs?: number;
213
+ };
214
+ result: MaintenanceLease;
215
+ };
216
+ release_maintenance: {
217
+ args: {
218
+ lease: MaintenanceLease;
219
+ };
220
+ result: void;
221
+ };
222
+ delete: {
223
+ args: {
224
+ sessionId: string;
225
+ lease: MaintenanceLease;
226
+ };
227
+ result: void;
228
+ };
229
+ prune: {
230
+ args: {
231
+ maxAgeDays: number;
232
+ holderId: string;
233
+ };
234
+ result: number;
235
+ };
236
+ rebuild_catalog: {
237
+ args: Record<string, never>;
238
+ result: {
239
+ indexed: number;
240
+ damaged: number;
241
+ };
242
+ };
243
+ }
244
+ export type SessionCatalogOperationName = keyof SessionCatalogOperations;
245
+ export type SessionCatalogClientMessage = {
246
+ type: 'request';
247
+ id: number;
248
+ op: SessionCatalogOperationName;
249
+ args: unknown;
250
+ authToken?: string;
251
+ } | {
252
+ type: 'shutdown';
253
+ id: number;
254
+ reason?: string;
255
+ authToken?: string;
256
+ };
257
+ export type SessionCatalogServerMessage = ({
258
+ type: 'hello';
259
+ } & SessionCatalogServerInfo) | {
260
+ type: 'event';
261
+ event: SessionCatalogEvent;
262
+ } | {
263
+ type: 'response';
264
+ id: number;
265
+ ok: true;
266
+ result: unknown;
267
+ } | {
268
+ type: 'response';
269
+ id: number;
270
+ ok: false;
271
+ error: string;
272
+ errorName?: string;
273
+ };
274
+ export declare function encodeSessionCatalogMessage(message: object): string;
275
+ //# sourceMappingURL=protocol.d.ts.map
@@ -0,0 +1,59 @@
1
+ import type { AgentEntry, SessionRegistryEntry } from '../session-registry-types.js';
2
+ import type { ResumeReservation, SessionCatalogEvent } from './protocol.js';
3
+ export interface SessionResumeClaim {
4
+ reservation: ResumeReservation;
5
+ activate(entry: SessionRegistryRegistration): Promise<void>;
6
+ cancel(): Promise<void>;
7
+ }
8
+ export type SessionRegistryRegistration = Omit<SessionRegistryEntry, 'status' | 'lastHeartbeatAt' | 'agentCount' | 'agents'> & {
9
+ agents?: AgentEntry[] | undefined;
10
+ };
11
+ /**
12
+ * Compatibility facade for the project-scoped Session Catalog service.
13
+ *
14
+ * It deliberately preserves the former SessionRegistry method names so first-
15
+ * party surfaces can cut over without retaining the device-global JSON file as
16
+ * a second ownership authority.
17
+ */
18
+ export declare class ProjectSessionRegistry {
19
+ private readonly globalRoot;
20
+ private readonly instanceId;
21
+ private readonly clients;
22
+ private current;
23
+ private heartbeatTimer;
24
+ private agentRevision;
25
+ private pendingAgents;
26
+ private agentTimer;
27
+ private lastAgentWriteAt;
28
+ constructor(globalRoot: string);
29
+ private bindingKey;
30
+ private closeBinding;
31
+ private binding;
32
+ private fullEntry;
33
+ register(entry: SessionRegistryRegistration): Promise<void>;
34
+ /** Reserve before transcript hydration; activation swaps ownership only after the writer opened. */
35
+ reserveResume(target: {
36
+ sessionId: string;
37
+ projectSlug: string;
38
+ projectRoot: string;
39
+ }): Promise<SessionResumeClaim>;
40
+ updateAgents(agents: AgentEntry[]): Promise<void>;
41
+ private flushAgents;
42
+ markClosing(): Promise<void>;
43
+ unregister(): Promise<void>;
44
+ list(): Promise<SessionRegistryEntry[]>;
45
+ listByProject(projectSlug: string): Promise<SessionRegistryEntry[]>;
46
+ get(sessionId: string): Promise<SessionRegistryEntry | undefined>;
47
+ subscribeProject(projectSlug: string, projectRoot: string, listener: (event: SessionCatalogEvent) => void): Promise<() => Promise<void>>;
48
+ get registryPath(): string;
49
+ dispose(): Promise<void>;
50
+ /** Whether this facade currently owns a live session lease. */
51
+ ownsSession(): boolean;
52
+ private startHeartbeat;
53
+ private stopHeartbeat;
54
+ private cancelAgentTimer;
55
+ private heartbeat;
56
+ }
57
+ export declare function getProjectSessionRegistry(globalRoot?: string): ProjectSessionRegistry;
58
+ export declare function hasProjectSessionRegistry(globalRoot?: string): boolean;
59
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1,55 @@
1
+ import type { SessionRegistryEntry } from '../session-registry-types.js';
2
+ import type { SessionSummary } from '../types/session.js';
3
+ import type { CatalogSessionRecord, MaintenanceLease, ResumeReservation, SessionCatalogHealth, SessionLeaseCredential } from './protocol.js';
4
+ export declare class SessionCatalogStore {
5
+ readonly projectDir: string;
6
+ readonly databasePath: string;
7
+ readonly sessionsDir: string;
8
+ private db;
9
+ private readonly scrubber;
10
+ constructor(projectDir: string);
11
+ private configureDatabase;
12
+ close(): void;
13
+ private initialize;
14
+ private transaction;
15
+ private bumpGeneration;
16
+ generation(): number;
17
+ private reapExpired;
18
+ private maintenanceExists;
19
+ private leaseRow;
20
+ private verifyCredential;
21
+ private createLease;
22
+ claimNew(entry: SessionRegistryEntry, ownerInstanceId: string, leaseMs?: number): SessionLeaseCredential;
23
+ reconnectLease(credential: SessionLeaseCredential): SessionLeaseCredential;
24
+ reserveResume(targetSessionId: string, requesterInstanceId: string, currentSessionId?: string, reservationMs?: number): ResumeReservation;
25
+ activateReservation(reservation: ResumeReservation, entry: SessionRegistryEntry, leaseMs?: number): SessionLeaseCredential;
26
+ cancelReservation(reservationId: string, requesterInstanceId: string): void;
27
+ heartbeat(credential: SessionLeaseCredential, status?: SessionRegistryEntry['status']): SessionLeaseCredential;
28
+ publishAgents(credential: SessionLeaseCredential, revision: number, agents: SessionRegistryEntry['agents']): {
29
+ accepted: boolean;
30
+ revision: number;
31
+ };
32
+ markClosing(credential: SessionLeaseCredential): void;
33
+ release(credential: SessionLeaseCredential): void;
34
+ listLive(): SessionRegistryEntry[];
35
+ getLive(sessionId: string): SessionRegistryEntry | null;
36
+ private containedPath;
37
+ upsertSummary(summary: SessionSummary, transcriptRelativePath?: string, summaryRelativePath?: string): CatalogSessionRecord;
38
+ private catalogRecord;
39
+ listCatalog(limit?: number, search?: string): CatalogSessionRecord[];
40
+ getSummary(sessionId: string): CatalogSessionRecord | null;
41
+ resolveId(query: string): string;
42
+ rename(sessionId: string, name: string): Promise<CatalogSessionRecord>;
43
+ acquireMaintenance(sessionId: string, operation: MaintenanceLease['operation'], holderId: string, leaseMs?: number): MaintenanceLease;
44
+ releaseMaintenance(lease: MaintenanceLease): void;
45
+ delete(sessionId: string, lease: MaintenanceLease): void;
46
+ prune(maxAgeDays: number, holderId: string): number;
47
+ rebuildCatalog(): {
48
+ indexed: number;
49
+ damaged: number;
50
+ };
51
+ private walkFiles;
52
+ private summarizeTranscript;
53
+ health(base: Omit<SessionCatalogHealth, 'catalogRows' | 'damagedRows' | 'liveLeases' | 'reservations' | 'maintenanceLeases' | 'generation' | 'lastReconciliation'>): SessionCatalogHealth;
54
+ }
55
+ //# sourceMappingURL=store.d.ts.map
@@ -109,6 +109,21 @@ export interface AgentEntry {
109
109
  lastActivityAt: string;
110
110
  }
111
111
  export type SessionLiveStatus = 'active' | 'idle' | 'closing' | 'stale' | 'lost';
112
+ export interface SessionWebUIEndpointHint {
113
+ role: 'standalone' | 'parent-shell' | 'session-child';
114
+ surface: 'webui' | 'simpleui' | string;
115
+ host: string;
116
+ httpPort: number;
117
+ url: string;
118
+ /** Redundant owner PID used to cross-check against WebUI instance records. */
119
+ pid: number;
120
+ parentPid?: number | undefined;
121
+ parentShellId?: string | undefined;
122
+ runtimeId?: string | undefined;
123
+ attachable?: boolean | undefined;
124
+ protocolVersion?: number | undefined;
125
+ capabilities?: string[] | undefined;
126
+ }
112
127
  export interface SessionRegistryEntry {
113
128
  sessionId: string;
114
129
  projectSlug: string;
@@ -132,5 +147,7 @@ export interface SessionRegistryEntry {
132
147
  /** Count of tracked agents */
133
148
  agentCount: number;
134
149
  agents: AgentEntry[];
150
+ /** Optional WebUI endpoint hint. Session ownership remains keyed by `sessionId` + `pid`. */
151
+ webuiEndpoint?: SessionWebUIEndpointHint | undefined;
135
152
  }
136
153
  //# sourceMappingURL=session-registry-types.d.ts.map
@@ -13,7 +13,7 @@
13
13
  * @module session-registry
14
14
  */
15
15
  import type { AgentEntry, SessionRegistryEntry } from './session-registry-types.js';
16
- export type { AgentActivityTotals, AgentEntry, AgentLiveStatus, AgentRecentMail, AgentRecentTool, AgentTodoItem, SessionLiveStatus, SessionRegistryEntry, } from './session-registry-types.js';
16
+ export type { AgentActivityTotals, AgentEntry, AgentLiveStatus, AgentRecentMail, AgentRecentTool, AgentTodoItem, SessionLiveStatus, SessionRegistryEntry, SessionWebUIEndpointHint, } from './session-registry-types.js';
17
17
  export declare class SessionRegistry {
18
18
  private readonly filePath;
19
19
  private heartbeatTimer;
@@ -1,44 +1,48 @@
1
- export { DefaultSessionStore, type SessionStoreOptions, } from './session-store.js';
2
- export { SessionCheckpointCas, type CheckpointGitResult, type SessionCheckpointCasOptions, } from './session-checkpoint-cas.js';
3
- export { generateSessionId, sanitizeModel } from './session-id.js';
4
- export { resolveSessionId, sessionIdResolutionError, type SessionIdResolution, } from './session-id-resolver.js';
5
- export { QUEUE_MAX_BYTES, QUEUE_MAX_ITEM_BYTES, QUEUE_MAX_ITEMS, QueueStore, retainPersistedQueueItems, type PersistedQueueItem, } from './queue-store.js';
6
- export { DefaultAttachmentStore, type AttachmentStoreOptions, } from './attachment-store.js';
1
+ export { AgentStatusTracker, type AgentStatusTrackerOptions, } from '../agent-status-tracker.js';
2
+ export { FleetNotifier, type FleetNotifierOptions, } from '../fleet-notifier.js';
3
+ export { type CatalogSessionRecord, type MaintenanceLease, type ResumeReservation, type SessionCatalogHealth, SessionCatalogProjectClient, type SessionCatalogProjectClientOptions, type SessionLeaseCredential, type SessionResumeClaim, } from '../session-catalog/index.js';
4
+ export { getProjectSessionRegistry as getSessionRegistry, hasProjectSessionRegistry as hasSessionRegistry, ProjectSessionRegistry as SessionRegistry, } from '../session-catalog/registry.js';
5
+ export type { AgentEntry, AgentLiveStatus, SessionLiveStatus, SessionRegistryEntry, SessionWebUIEndpointHint, } from '../session-registry.js';
6
+ /** @deprecated Test/migration adapter; production ownership uses SessionRegistry above. */
7
+ export { SessionRegistry as LegacySessionRegistry } from '../session-registry.js';
8
+ export type { SyncCategory, SyncConfig } from '../types/config.js';
9
+ export type { DefaultSessionReaderOptions, SessionReader } from '../types/session-reader.js';
10
+ export { type Annotation, AnnotationsStore, type AnnotationsStoreOptions, } from './annotations-store.js';
11
+ export { type AttachmentStoreOptions, DefaultAttachmentStore, } from './attachment-store.js';
12
+ export { applyNamespacePayload, buildNamespacePayloads, CLOUD_SYNC_CONTRACT, CLOUD_SYNC_NAMESPACES, CloudConfigSync, type CloudConfigSyncDeps, type CloudConfigSyncSettings, type CloudSyncPassSummary, LOCAL_ONLY_TOP_LEVEL, NAMESPACE_SCHEMA_VERSIONS, stripSecretMaterial, } from './cloud-config-sync.js';
13
+ export { ALL_SYNC_CATEGORIES, CloudSync, type SyncResult, } from './cloud-sync.js';
14
+ export { type CompletedWorkCheckpointFile, loadCompletedWorkCheckpoint, saveCompletedWorkCheckpoint, } from './completed-work-checkpoint.js';
15
+ export { CONFIG_BEHAVIOR_DEFAULTS, type ConfigDefaultRepair, type ConfigDefaultRepairReport, type ConfigLoaderOptions, type ConfigSource, DefaultConfigLoader, repairConfigDefaults, } from './config-loader.js';
16
+ export { type ConfigMigration, ConfigMigrationError, DEFAULT_CONFIG_MIGRATIONS, type MigrationContext, type MigrationResult, runConfigMigrations, } from './config-migration.js';
17
+ export { DefaultConfigStore } from './config-store.js';
18
+ export { DirectorStateCheckpoint, type DirectorStateSnapshot, type DirectorSubagentState, type DirectorTaskState, loadDirectorState, } from './director-state.js';
19
+ export { applyGoalDeliverableCompletions, type CompletedGoalDeliverable, type CoordinateGoalIterationOptions, coordinateGoalIteration, type GoalCoordinationResult, isGoalDeliverableComplete, parseCompletedGoalDeliverables, recomputeGoalProgress, stripGoalDeliverableMarker, } from './goal-coordination.js';
20
+ export { createGoalKanbanBoard, deleteGoalKanbanBoard, findGoalBoardByTag, findGoalKanbanBoard, formatGoalAutonomyChoice, formatGoalEvent, formatGoalKanbanPreview, type GoalFileWithKanban, parseAutonomyChoice, } from './goal-kanban.js';
21
+ export { appendJournal, emptyGoal, formatGoal, type GoalFile, goalFilePath, type JournalEntry, loadGoal, MAX_JOURNAL_ENTRIES, MAX_PROGRESS_HISTORY, type ProgressSnapshot, parseProgressFromText, recordProgress, saveGoal, setProgress, summarizeUsage, } from './goal-store.js';
22
+ export { INPUT_HISTORY_DEFAULT_MAX, InputHistoryStore, } from './input-history-store.js';
7
23
  export { FileMemoryBackend, type FileMemoryBackendOptions, type MemoryBackend, parseEntries, } from './memory-backend.js';
24
+ export { type ConsolidationOp, type ConsolidatorSage, type MemoryConsolidatorOptions, SessionMemoryConsolidator, } from './memory-consolidator.js';
8
25
  export { GraphMemoryBackend, type GraphMemoryBackendOptions, } from './memory-graph-backend.js';
9
- export { SessionMemoryConsolidator, type MemoryConsolidatorOptions, type ConsolidationOp, type ConsolidatorSage, } from './memory-consolidator.js';
10
- export { DefaultConfigStore } from './config-store.js';
11
- export { readProviderSnapshot, watchProviderConfig, type ProviderConfigSnapshot, type WatchProviderConfigOptions, } from './provider-config-watcher.js';
12
- export { CONFIG_BEHAVIOR_DEFAULTS, type ConfigDefaultRepair, type ConfigDefaultRepairReport, type ConfigLoaderOptions, type ConfigSource, DefaultConfigLoader, repairConfigDefaults, } from './config-loader.js';
13
- export { runConfigMigrations, ConfigMigrationError, DEFAULT_CONFIG_MIGRATIONS, type ConfigMigration, type MigrationContext, type MigrationResult, } from './config-migration.js';
14
- export { RecoveryLock, type RecoveryLockOptions, type AbandonedSession, } from './recovery-lock.js';
15
- export { DefaultSessionReader } from './session-reader.js';
16
- export type { SessionReader, DefaultSessionReaderOptions } from '../types/session-reader.js';
17
- export { scrubPersistedSessionData, scrubPersistedSessionEvent, scrubPersistedSessionSummary, } from './session-read-scrubber.js';
18
- export { AnnotationsStore, type Annotation, type AnnotationsStoreOptions, } from './annotations-store.js';
19
- export { ReplayLogStore, type ReplayEntry, type ReplayLogStoreOptions, } from './replay-log-store.js';
20
- export { SessionRecovery, type StaleSession, type RecoveryPlan, } from './session-recovery.js';
21
- export { ToolAuditLog, type AuditEntry, type ToolAuditLogOptions, type VerifyResult, } from './tool-audit-log.js';
26
+ export { addPlanItem, attachPlanCheckpoint, clearPlan, deriveTodosFromPlanItem, emptyPlan, formatPlan, loadPlan, mutatePlan, type PlanFile, type PlanItem, removePlanItem, savePlan, setPlanItemStatus, } from './plan-store.js';
27
+ export { formatPlanTemplates, getPlanTemplate, listPlanTemplates, type PlanTemplate, } from './plan-templates.js';
28
+ export { DefaultPromptStore, migratePromptEntry, type PromptEntry, type PromptStore, promptChecksum, } from './prompt-store.js';
29
+ export { type PromptUsage, PromptUsageStore } from './prompt-usage-store.js';
30
+ export { type ProviderConfigSnapshot, readProviderSnapshot, type WatchProviderConfigOptions, watchProviderConfig, } from './provider-config-watcher.js';
31
+ export { type PersistedQueueItem, QUEUE_MAX_BYTES, QUEUE_MAX_ITEM_BYTES, QUEUE_MAX_ITEMS, QueueStore, retainPersistedQueueItems, } from './queue-store.js';
32
+ export { type AbandonedSession, RecoveryLock, type RecoveryLockOptions, } from './recovery-lock.js';
33
+ export { type ReplayEntry, ReplayLogStore, type ReplayLogStoreOptions, } from './replay-log-store.js';
22
34
  export { SessionAnalyzer } from './session-analyzer.js';
23
- export { SessionRegistry, getSessionRegistry, hasSessionRegistry, type SessionRegistryEntry, type AgentEntry, type AgentLiveStatus, type SessionLiveStatus, } from '../session-registry.js';
24
- export { AgentStatusTracker, type AgentStatusTrackerOptions, } from '../agent-status-tracker.js';
25
- export { FleetNotifier, type FleetNotifierOptions, } from '../fleet-notifier.js';
35
+ export { type CheckpointGitResult, SessionCheckpointCas, type SessionCheckpointCasOptions, } from './session-checkpoint-cas.js';
36
+ export { type AuditLevel, CORE_RECONSTRUCT_EVENTS, createSessionEventBridge, resolveAuditLevel, resolveSessionLoggingConfig, type SessionEventBridge, type SessionEventBridgeOptions, type SessionSamplingOptions, STANDARD_AUDIT_EVENTS, type ToolProgressSamplingOptions, } from './session-event-bridge.js';
37
+ export { generateSessionId, sanitizeModel } from './session-id.js';
38
+ export { resolveSessionId, type SessionIdResolution, sessionIdResolutionError, } from './session-id-resolver.js';
39
+ export { scrubPersistedSessionData, scrubPersistedSessionEvent, scrubPersistedSessionSummary, } from './session-read-scrubber.js';
40
+ export { DefaultSessionReader } from './session-reader.js';
41
+ export { type RecoveryPlan, SessionRecovery, type StaleSession, } from './session-recovery.js';
42
+ export { type ApplyRewindOptions, type ApplyRewindResult, applyRewindToConversation, type RewindableConversation, } from './session-rewind-apply.js';
26
43
  export { DefaultSessionRewinder, type SessionRewinderOptions, } from './session-rewinder.js';
27
- export { applyRewindToConversation, type ApplyRewindOptions, type ApplyRewindResult, type RewindableConversation, } from './session-rewind-apply.js';
44
+ export { DefaultSessionStore, type SessionStoreOptions, } from './session-store.js';
45
+ export { emptyTaskFile, loadTasks, mutateTasks, saveTasks, type TaskFile, } from './task-store.js';
28
46
  export { attachTodosCheckpoint, loadTodosCheckpoint, saveTodosCheckpoint, type TodosCheckpointFile, } from './todos-checkpoint.js';
29
- export { loadCompletedWorkCheckpoint, saveCompletedWorkCheckpoint, type CompletedWorkCheckpointFile, } from './completed-work-checkpoint.js';
30
- export { attachPlanCheckpoint, loadPlan, savePlan, emptyPlan, addPlanItem, removePlanItem, setPlanItemStatus, clearPlan, formatPlan, deriveTodosFromPlanItem, mutatePlan, type PlanItem, type PlanFile, } from './plan-store.js';
31
- export { listPlanTemplates, getPlanTemplate, formatPlanTemplates, type PlanTemplate, } from './plan-templates.js';
32
- export { loadTasks, saveTasks, emptyTaskFile, mutateTasks, type TaskFile, } from './task-store.js';
33
- export { DirectorStateCheckpoint, loadDirectorState, type DirectorStateSnapshot, type DirectorTaskState, type DirectorSubagentState, } from './director-state.js';
34
- export { loadGoal, saveGoal, emptyGoal, appendJournal, formatGoal, setProgress, recordProgress, parseProgressFromText, goalFilePath, summarizeUsage, MAX_JOURNAL_ENTRIES, MAX_PROGRESS_HISTORY, type GoalFile, type JournalEntry, type ProgressSnapshot, } from './goal-store.js';
35
- export { createGoalKanbanBoard, findGoalKanbanBoard, deleteGoalKanbanBoard, findGoalBoardByTag, formatGoalKanbanPreview, formatGoalEvent, formatGoalAutonomyChoice, parseAutonomyChoice, type GoalFileWithKanban, } from './goal-kanban.js';
36
- export { applyGoalDeliverableCompletions, coordinateGoalIteration, isGoalDeliverableComplete, parseCompletedGoalDeliverables, recomputeGoalProgress, stripGoalDeliverableMarker, type CompletedGoalDeliverable, type CoordinateGoalIterationOptions, type GoalCoordinationResult, } from './goal-coordination.js';
37
- export { DefaultPromptStore, migratePromptEntry, promptChecksum, type PromptStore, type PromptEntry, } from './prompt-store.js';
38
- export { PromptUsageStore, type PromptUsage } from './prompt-usage-store.js';
39
- export { InputHistoryStore, INPUT_HISTORY_DEFAULT_MAX, } from './input-history-store.js';
40
- export { CloudSync, type SyncResult, ALL_SYNC_CATEGORIES, } from './cloud-sync.js';
41
- export { applyNamespacePayload, buildNamespacePayloads, CLOUD_SYNC_CONTRACT, CLOUD_SYNC_NAMESPACES, CloudConfigSync, type CloudConfigSyncDeps, type CloudConfigSyncSettings, type CloudSyncPassSummary, LOCAL_ONLY_TOP_LEVEL, NAMESPACE_SCHEMA_VERSIONS, stripSecretMaterial, } from './cloud-config-sync.js';
42
- export { createSessionEventBridge, resolveAuditLevel, resolveSessionLoggingConfig, type SessionEventBridge, type AuditLevel, type SessionEventBridgeOptions, type SessionSamplingOptions, type ToolProgressSamplingOptions, CORE_RECONSTRUCT_EVENTS, STANDARD_AUDIT_EVENTS, } from './session-event-bridge.js';
43
- export type { SyncConfig, SyncCategory } from '../types/config.js';
47
+ export { type AuditEntry, ToolAuditLog, type ToolAuditLogOptions, type VerifyResult, } from './tool-audit-log.js';
44
48
  //# sourceMappingURL=index.d.ts.map