@hydra-acp/cli 0.1.112 → 0.1.114
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/dist/cli.js +356 -356
- package/dist/index.d.ts +24 -0
- package/dist/index.js +84 -84
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2396,6 +2396,15 @@ interface HistoryEntry {
|
|
|
2396
2396
|
params: unknown;
|
|
2397
2397
|
recordedAt: number;
|
|
2398
2398
|
}
|
|
2399
|
+
interface ArchiveLineCount {
|
|
2400
|
+
index: number;
|
|
2401
|
+
path: string;
|
|
2402
|
+
lineCount: number;
|
|
2403
|
+
}
|
|
2404
|
+
interface RecallEntry {
|
|
2405
|
+
entryId: number;
|
|
2406
|
+
entry: HistoryEntry;
|
|
2407
|
+
}
|
|
2399
2408
|
interface HistoryStoreOptions {
|
|
2400
2409
|
maxEntries?: number;
|
|
2401
2410
|
archiveMaxBytes?: number;
|
|
@@ -2407,19 +2416,28 @@ declare class HistoryStore {
|
|
|
2407
2416
|
private archiveMaxBytes;
|
|
2408
2417
|
private archiveTiers;
|
|
2409
2418
|
private nextArchiveIndex;
|
|
2419
|
+
private archiveLineCounts;
|
|
2410
2420
|
constructor(options?: HistoryStoreOptions);
|
|
2411
2421
|
append(sessionId: string, entry: HistoryEntry): Promise<void>;
|
|
2412
2422
|
rewrite(sessionId: string, entries: HistoryEntry[]): Promise<void>;
|
|
2413
2423
|
compact(sessionId: string, maxEntries: number): Promise<void>;
|
|
2414
2424
|
private spillToArchive;
|
|
2425
|
+
private sealArchive;
|
|
2415
2426
|
private resolveNextArchiveIndex;
|
|
2416
2427
|
private enforceArchiveTierCap;
|
|
2428
|
+
private unlinkArchive;
|
|
2417
2429
|
private listArchiveIndices;
|
|
2418
2430
|
listArchives(sessionId: string): Promise<Array<{
|
|
2419
2431
|
index: number;
|
|
2420
2432
|
path: string;
|
|
2421
2433
|
}>>;
|
|
2422
2434
|
loadArchives(sessionId: string): Promise<HistoryEntry[]>;
|
|
2435
|
+
streamFile(filePath: string): AsyncGenerator<HistoryEntry>;
|
|
2436
|
+
getArchiveLineCounts(sessionId: string): Promise<ArchiveLineCount[]>;
|
|
2437
|
+
private hydrateEntry;
|
|
2438
|
+
iterRecallNewestFirst(sessionId: string): AsyncGenerator<RecallEntry>;
|
|
2439
|
+
rangeSlice(sessionId: string, fromEntryId: number, toEntryId: number): Promise<RecallEntry[]>;
|
|
2440
|
+
getRecallTotalCount(sessionId: string): Promise<number>;
|
|
2423
2441
|
load(sessionId: string, opts?: {
|
|
2424
2442
|
tools?: "inline" | "references";
|
|
2425
2443
|
maxEntries?: number;
|
|
@@ -3147,6 +3165,12 @@ declare class Session {
|
|
|
3147
3165
|
}): Promise<void>;
|
|
3148
3166
|
private _hasOpenToolCall;
|
|
3149
3167
|
getHistorySnapshot(tools?: "inline" | "references"): Promise<CachedNotification[]>;
|
|
3168
|
+
iterRecallNewestFirst(): AsyncGenerator<{
|
|
3169
|
+
entryId: number;
|
|
3170
|
+
entry: CachedNotification;
|
|
3171
|
+
}>;
|
|
3172
|
+
getRecallTotalCount(): Promise<number>;
|
|
3173
|
+
sliceRecallHistory(fromEntryId: number, toEntryId: number): Promise<CachedNotification[]>;
|
|
3150
3174
|
onBroadcast(handler: (entry: CachedNotification) => void): () => void;
|
|
3151
3175
|
broadcastClientUpdate(update: Record<string, unknown>): void;
|
|
3152
3176
|
broadcastCompactionPhase(update: Record<string, unknown>): void;
|