@wrongstack/core 0.302.0 → 0.303.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.
- package/README.md +1 -1
- package/dist/agent-status-tracker.d.ts +6 -2
- package/dist/chronicle/index.js +1949 -1671
- package/dist/chronicle/metrics-store.d.ts +14 -0
- package/dist/chronicle/project-server-protocol.d.ts +13 -0
- package/dist/chronicle/project-server.js +1756 -1573
- package/dist/chronicle/rollup-adapter.d.ts +2 -0
- package/dist/chronicle/sqlite-journal.d.ts +59 -0
- package/dist/coordination/agents/index.js +4313 -3516
- package/dist/coordination/agents/project-agent-auto-optimize.d.ts +116 -0
- package/dist/coordination/agents/project-agent-capture-window.d.ts +29 -0
- package/dist/coordination/agents/project-agent-config-io.d.ts +11 -0
- package/dist/coordination/agents/project-agent-consolidation.d.ts +29 -2
- package/dist/coordination/agents/project-agent-files.d.ts +12 -3
- package/dist/coordination/agents/project-agent-identity-types.d.ts +4 -0
- package/dist/coordination/agents/project-agent-identity.d.ts +22 -9
- package/dist/coordination/agents/project-agent-learning-entries.d.ts +8 -2
- package/dist/coordination/agents/project-agent-learning-structured.d.ts +27 -1
- package/dist/coordination/agents/project-agent-optimizer.d.ts +49 -0
- package/dist/coordination/agents/project-agent-skill-layer.d.ts +101 -0
- package/dist/coordination/agents/role-skills.d.ts +11 -1
- package/dist/coordination/index.d.ts +1 -1
- package/dist/coordination/index.js +4927 -3589
- package/dist/coordination/mail-tools.d.ts +3 -3
- package/dist/core/context.d.ts +4 -0
- package/dist/core/continue-intent.d.ts +2 -0
- package/dist/core/conversation-state.d.ts +5 -0
- package/dist/core/index.js +129 -19
- package/dist/defaults/index.js +1620 -768
- package/dist/execution/index.js +2941 -2630
- package/dist/goal/index.js +7 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +12269 -9212
- package/dist/infrastructure/index.js +722 -672
- package/dist/kernel/events/agent-events.d.ts +28 -0
- package/dist/kernel/events/memory-events.d.ts +62 -0
- package/dist/plugin/index.js +2167 -1986
- package/dist/security/index.js +69 -3
- package/dist/security/kanban-boundary.d.ts +5 -1
- package/dist/session-catalog/client.d.ts +62 -0
- package/dist/session-catalog/endpoint.d.ts +6 -0
- package/dist/session-catalog/index.d.ts +6 -0
- package/dist/session-catalog/index.js +2000 -0
- package/dist/session-catalog/project-server.d.ts +3 -0
- package/dist/session-catalog/project-server.js +1861 -0
- package/dist/session-catalog/protocol.d.ts +284 -0
- package/dist/session-catalog/registry.d.ts +59 -0
- package/dist/session-catalog/store.d.ts +71 -0
- package/dist/storage/index.d.ts +42 -38
- package/dist/storage/index.js +13896 -12931
- package/dist/storage/plan-store.d.ts +1 -1
- package/dist/storage/session-event-bridge.d.ts +2 -2
- package/dist/storage/session-store.d.ts +6 -0
- package/dist/tasking/index.js +5 -0
- package/dist/tools/index.js +2832 -2606
- package/dist/types/config/root.d.ts +11 -1
- package/dist/types/config/skills-fleet-brain.d.ts +34 -0
- package/dist/types/config/ui.d.ts +14 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/context-evidence.d.ts +2 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +20 -0
- package/dist/types/messages.d.ts +8 -0
- package/dist/types/multi-agent.d.ts +7 -0
- package/dist/types/session.d.ts +19 -0
- package/dist/types/task-graph.d.ts +2 -0
- package/dist/types/tool-executor.d.ts +2 -0
- package/dist/utils/context-evidence.d.ts +13 -1
- package/dist/utils/index.js +29 -2
- package/instructions/system-lite.md +23 -8
- package/instructions/system-pro.md +29 -9
- package/instructions/system.md +29 -9
- package/package.json +7 -3
- package/skills/wrongstack-kanban/SKILL.md +39 -8
|
@@ -0,0 +1,284 @@
|
|
|
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
|
+
/**
|
|
80
|
+
* NOTE: adding a field to any `args` below also requires adding it to
|
|
81
|
+
* `OPERATION_KEYS` in `project-server.ts` — the daemon validates every
|
|
82
|
+
* request against that allowlist and rejects unknown fields at runtime,
|
|
83
|
+
* which TypeScript cannot catch.
|
|
84
|
+
*/
|
|
85
|
+
export interface SessionCatalogOperations {
|
|
86
|
+
ping: {
|
|
87
|
+
args: Record<string, never>;
|
|
88
|
+
result: SessionCatalogHealth;
|
|
89
|
+
};
|
|
90
|
+
claim_new: {
|
|
91
|
+
args: {
|
|
92
|
+
entry: SessionRegistryEntry;
|
|
93
|
+
ownerInstanceId: string;
|
|
94
|
+
leaseMs?: number;
|
|
95
|
+
};
|
|
96
|
+
result: SessionLeaseCredential;
|
|
97
|
+
};
|
|
98
|
+
reconnect_lease: {
|
|
99
|
+
args: SessionLeaseCredential;
|
|
100
|
+
result: SessionLeaseCredential;
|
|
101
|
+
};
|
|
102
|
+
reserve_resume: {
|
|
103
|
+
args: {
|
|
104
|
+
targetSessionId: string;
|
|
105
|
+
requesterInstanceId: string;
|
|
106
|
+
currentSessionId?: string;
|
|
107
|
+
reservationMs?: number;
|
|
108
|
+
};
|
|
109
|
+
result: ResumeReservation;
|
|
110
|
+
};
|
|
111
|
+
activate_reservation: {
|
|
112
|
+
args: {
|
|
113
|
+
reservation: ResumeReservation;
|
|
114
|
+
entry: SessionRegistryEntry;
|
|
115
|
+
leaseMs?: number;
|
|
116
|
+
};
|
|
117
|
+
result: SessionLeaseCredential;
|
|
118
|
+
};
|
|
119
|
+
cancel_reservation: {
|
|
120
|
+
args: {
|
|
121
|
+
reservationId: string;
|
|
122
|
+
requesterInstanceId: string;
|
|
123
|
+
};
|
|
124
|
+
result: void;
|
|
125
|
+
};
|
|
126
|
+
heartbeat: {
|
|
127
|
+
args: {
|
|
128
|
+
credential: SessionLeaseCredential;
|
|
129
|
+
status?: SessionRegistryEntry['status'];
|
|
130
|
+
};
|
|
131
|
+
result: SessionLeaseCredential;
|
|
132
|
+
};
|
|
133
|
+
publish_agents: {
|
|
134
|
+
args: {
|
|
135
|
+
credential: SessionLeaseCredential;
|
|
136
|
+
revision: number;
|
|
137
|
+
agents: SessionRegistryEntry['agents'];
|
|
138
|
+
};
|
|
139
|
+
result: {
|
|
140
|
+
accepted: boolean;
|
|
141
|
+
revision: number;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
mark_closing: {
|
|
145
|
+
args: {
|
|
146
|
+
credential: SessionLeaseCredential;
|
|
147
|
+
};
|
|
148
|
+
result: void;
|
|
149
|
+
};
|
|
150
|
+
release: {
|
|
151
|
+
args: {
|
|
152
|
+
credential: SessionLeaseCredential;
|
|
153
|
+
};
|
|
154
|
+
result: void;
|
|
155
|
+
};
|
|
156
|
+
list_live: {
|
|
157
|
+
args: Record<string, never>;
|
|
158
|
+
result: SessionRegistryEntry[];
|
|
159
|
+
};
|
|
160
|
+
get_live: {
|
|
161
|
+
args: {
|
|
162
|
+
sessionId: string;
|
|
163
|
+
};
|
|
164
|
+
result: SessionRegistryEntry | null;
|
|
165
|
+
};
|
|
166
|
+
subscribe: {
|
|
167
|
+
args: {
|
|
168
|
+
cursor?: number;
|
|
169
|
+
};
|
|
170
|
+
result: {
|
|
171
|
+
instanceId: string;
|
|
172
|
+
sequence: number;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
unsubscribe: {
|
|
176
|
+
args: Record<string, never>;
|
|
177
|
+
result: void;
|
|
178
|
+
};
|
|
179
|
+
upsert_summary: {
|
|
180
|
+
args: {
|
|
181
|
+
summary: SessionSummary;
|
|
182
|
+
transcriptRelativePath?: string;
|
|
183
|
+
summaryRelativePath?: string;
|
|
184
|
+
};
|
|
185
|
+
result: CatalogSessionRecord;
|
|
186
|
+
};
|
|
187
|
+
list_catalog: {
|
|
188
|
+
args: {
|
|
189
|
+
limit?: number;
|
|
190
|
+
search?: string;
|
|
191
|
+
};
|
|
192
|
+
result: CatalogSessionRecord[];
|
|
193
|
+
};
|
|
194
|
+
resolve_id: {
|
|
195
|
+
args: {
|
|
196
|
+
query: string;
|
|
197
|
+
};
|
|
198
|
+
result: string;
|
|
199
|
+
};
|
|
200
|
+
get_summary: {
|
|
201
|
+
args: {
|
|
202
|
+
sessionId: string;
|
|
203
|
+
};
|
|
204
|
+
result: CatalogSessionRecord | null;
|
|
205
|
+
};
|
|
206
|
+
rename: {
|
|
207
|
+
args: {
|
|
208
|
+
sessionId: string;
|
|
209
|
+
name: string;
|
|
210
|
+
};
|
|
211
|
+
result: CatalogSessionRecord;
|
|
212
|
+
};
|
|
213
|
+
acquire_maintenance: {
|
|
214
|
+
args: {
|
|
215
|
+
sessionId: string;
|
|
216
|
+
operation: MaintenanceLease['operation'];
|
|
217
|
+
holderId: string;
|
|
218
|
+
leaseMs?: number;
|
|
219
|
+
/** Caller's OS pid. The server runs in the detached catalog daemon, so
|
|
220
|
+
* it cannot use its own `process.pid` to recognise the session owner. */
|
|
221
|
+
holderPid?: number;
|
|
222
|
+
};
|
|
223
|
+
result: MaintenanceLease;
|
|
224
|
+
};
|
|
225
|
+
release_maintenance: {
|
|
226
|
+
args: {
|
|
227
|
+
lease: MaintenanceLease;
|
|
228
|
+
};
|
|
229
|
+
result: void;
|
|
230
|
+
};
|
|
231
|
+
delete: {
|
|
232
|
+
args: {
|
|
233
|
+
sessionId: string;
|
|
234
|
+
lease: MaintenanceLease;
|
|
235
|
+
};
|
|
236
|
+
result: void;
|
|
237
|
+
};
|
|
238
|
+
prune: {
|
|
239
|
+
args: {
|
|
240
|
+
maxAgeDays: number;
|
|
241
|
+
holderId: string;
|
|
242
|
+
};
|
|
243
|
+
result: number;
|
|
244
|
+
};
|
|
245
|
+
rebuild_catalog: {
|
|
246
|
+
args: Record<string, never>;
|
|
247
|
+
result: {
|
|
248
|
+
indexed: number;
|
|
249
|
+
damaged: number;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
export type SessionCatalogOperationName = keyof SessionCatalogOperations;
|
|
254
|
+
export type SessionCatalogClientMessage = {
|
|
255
|
+
type: 'request';
|
|
256
|
+
id: number;
|
|
257
|
+
op: SessionCatalogOperationName;
|
|
258
|
+
args: unknown;
|
|
259
|
+
authToken?: string;
|
|
260
|
+
} | {
|
|
261
|
+
type: 'shutdown';
|
|
262
|
+
id: number;
|
|
263
|
+
reason?: string;
|
|
264
|
+
authToken?: string;
|
|
265
|
+
};
|
|
266
|
+
export type SessionCatalogServerMessage = ({
|
|
267
|
+
type: 'hello';
|
|
268
|
+
} & SessionCatalogServerInfo) | {
|
|
269
|
+
type: 'event';
|
|
270
|
+
event: SessionCatalogEvent;
|
|
271
|
+
} | {
|
|
272
|
+
type: 'response';
|
|
273
|
+
id: number;
|
|
274
|
+
ok: true;
|
|
275
|
+
result: unknown;
|
|
276
|
+
} | {
|
|
277
|
+
type: 'response';
|
|
278
|
+
id: number;
|
|
279
|
+
ok: false;
|
|
280
|
+
error: string;
|
|
281
|
+
errorName?: string;
|
|
282
|
+
};
|
|
283
|
+
export declare function encodeSessionCatalogMessage(message: object): string;
|
|
284
|
+
//# 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,71 @@
|
|
|
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
|
+
/**
|
|
21
|
+
* True when `sessionId` has a live `session_leases` row owned by a
|
|
22
|
+
* different OS process than the *caller*. Used by
|
|
23
|
+
* `acquireMaintenance` to distinguish "another running wstack" (which
|
|
24
|
+
* must be fenced off) from "this very TUI owning its own session"
|
|
25
|
+
* (which is allowed to claim a non-destructive maintenance lease on
|
|
26
|
+
* its own transcript).
|
|
27
|
+
*
|
|
28
|
+
* `callerPid` must be the pid of the process that asked for the lease,
|
|
29
|
+
* NOT `process.pid`. In the built runtime this store lives inside the
|
|
30
|
+
* detached project-catalog daemon, so `process.pid` is the daemon's and
|
|
31
|
+
* would mark every lease — including the caller's own session — foreign,
|
|
32
|
+
* making `/clear` and `/rewind` fail with "Session … is live". Callers
|
|
33
|
+
* that run the store in-process may omit it.
|
|
34
|
+
*/
|
|
35
|
+
private foreignLiveLease;
|
|
36
|
+
private verifyCredential;
|
|
37
|
+
private createLease;
|
|
38
|
+
claimNew(entry: SessionRegistryEntry, ownerInstanceId: string, leaseMs?: number): SessionLeaseCredential;
|
|
39
|
+
reconnectLease(credential: SessionLeaseCredential): SessionLeaseCredential;
|
|
40
|
+
reserveResume(targetSessionId: string, requesterInstanceId: string, currentSessionId?: string, reservationMs?: number): ResumeReservation;
|
|
41
|
+
activateReservation(reservation: ResumeReservation, entry: SessionRegistryEntry, leaseMs?: number): SessionLeaseCredential;
|
|
42
|
+
cancelReservation(reservationId: string, requesterInstanceId: string): void;
|
|
43
|
+
heartbeat(credential: SessionLeaseCredential, status?: SessionRegistryEntry['status']): SessionLeaseCredential;
|
|
44
|
+
publishAgents(credential: SessionLeaseCredential, revision: number, agents: SessionRegistryEntry['agents']): {
|
|
45
|
+
accepted: boolean;
|
|
46
|
+
revision: number;
|
|
47
|
+
};
|
|
48
|
+
markClosing(credential: SessionLeaseCredential): void;
|
|
49
|
+
release(credential: SessionLeaseCredential): void;
|
|
50
|
+
listLive(): SessionRegistryEntry[];
|
|
51
|
+
getLive(sessionId: string): SessionRegistryEntry | null;
|
|
52
|
+
private containedPath;
|
|
53
|
+
upsertSummary(summary: SessionSummary, transcriptRelativePath?: string, summaryRelativePath?: string): CatalogSessionRecord;
|
|
54
|
+
private catalogRecord;
|
|
55
|
+
listCatalog(limit?: number, search?: string): CatalogSessionRecord[];
|
|
56
|
+
getSummary(sessionId: string): CatalogSessionRecord | null;
|
|
57
|
+
resolveId(query: string): string;
|
|
58
|
+
rename(sessionId: string, name: string): Promise<CatalogSessionRecord>;
|
|
59
|
+
acquireMaintenance(sessionId: string, operation: MaintenanceLease['operation'], holderId: string, leaseMs?: number, holderPid?: number): MaintenanceLease;
|
|
60
|
+
releaseMaintenance(lease: MaintenanceLease): void;
|
|
61
|
+
delete(sessionId: string, lease: MaintenanceLease): void;
|
|
62
|
+
prune(maxAgeDays: number, holderId: string): number;
|
|
63
|
+
rebuildCatalog(): {
|
|
64
|
+
indexed: number;
|
|
65
|
+
damaged: number;
|
|
66
|
+
};
|
|
67
|
+
private walkFiles;
|
|
68
|
+
private summarizeTranscript;
|
|
69
|
+
health(base: Omit<SessionCatalogHealth, 'catalogRows' | 'damagedRows' | 'liveLeases' | 'reservations' | 'maintenanceLeases' | 'generation' | 'lastReconciliation'>): SessionCatalogHealth;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=store.d.ts.map
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
|
|
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 {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export type
|
|
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 {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
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 {
|
|
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 {
|
|
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
|