@meridianlabs/log-viewer 0.3.249 → 0.3.250
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/lib/{AsciinemaPlayerImpl-qGoigKMF.js → AsciinemaPlayerImpl-Dy5o19PX.js} +18 -4
- package/lib/{AsciinemaPlayerImpl-qGoigKMF.js.map → AsciinemaPlayerImpl-Dy5o19PX.js.map} +1 -1
- package/lib/e2e/fixtures/handlers.d.ts.map +1 -1
- package/lib/e2e/log-list-find.spec.d.ts +2 -0
- package/lib/e2e/log-list-find.spec.d.ts.map +1 -0
- package/lib/e2e/message-deeplink.spec.d.ts +2 -0
- package/lib/e2e/message-deeplink.spec.d.ts.map +1 -0
- package/lib/e2e/turn-navigation.spec.d.ts +2 -0
- package/lib/e2e/turn-navigation.spec.d.ts.map +1 -0
- package/lib/index.js +39481 -34229
- package/lib/index.js.map +1 -1
- package/lib/src/app/log-list/LogsPanel.d.ts.map +1 -1
- package/lib/src/app/log-list/ViewerOptionsPopover.d.ts.map +1 -1
- package/lib/src/app/log-list/fileLogItem.d.ts +37 -0
- package/lib/src/app/log-list/fileLogItem.d.ts.map +1 -0
- package/lib/src/app/log-list/grid/LogListGrid.d.ts +11 -0
- package/lib/src/app/log-list/grid/LogListGrid.d.ts.map +1 -1
- package/lib/src/app/log-list/grid/columns/hooks.d.ts +6 -0
- package/lib/src/app/log-list/grid/columns/hooks.d.ts.map +1 -1
- package/lib/src/app/log-list/grid/logListRow.d.ts +5 -0
- package/lib/src/app/log-list/grid/logListRow.d.ts.map +1 -0
- package/lib/src/app/log-list/grid/useLogListData.d.ts +29 -11
- package/lib/src/app/log-list/grid/useLogListData.d.ts.map +1 -1
- package/lib/src/app/log-list/listing/applyListingQuery.d.ts +8 -0
- package/lib/src/app/log-list/listing/applyListingQuery.d.ts.map +1 -1
- package/lib/src/app/log-list/listing/planner.d.ts +10 -0
- package/lib/src/app/log-list/listing/planner.d.ts.map +1 -0
- package/lib/src/app/log-list/listing/types.d.ts +1 -9
- package/lib/src/app/log-list/listing/types.d.ts.map +1 -1
- package/lib/src/app/log-list/listing/useLogsListingQuery.d.ts +92 -7
- package/lib/src/app/log-list/listing/useLogsListingQuery.d.ts.map +1 -1
- package/lib/src/app/log-list/useLogsOverview.d.ts +18 -0
- package/lib/src/app/log-list/useLogsOverview.d.ts.map +1 -0
- package/lib/src/app/log-view/tabs/ModelsTab.d.ts.map +1 -1
- package/lib/src/app/navbar/ApplicationNavbar.d.ts +2 -0
- package/lib/src/app/navbar/ApplicationNavbar.d.ts.map +1 -1
- package/lib/src/app/navbar/Navbar.d.ts +4 -0
- package/lib/src/app/navbar/Navbar.d.ts.map +1 -1
- package/lib/src/app/routing/AppRouter.d.ts.map +1 -1
- package/lib/src/app/routing/RouteDispatcher.d.ts +1 -0
- package/lib/src/app/routing/RouteDispatcher.d.ts.map +1 -1
- package/lib/src/app/routing/SamplesRouter.d.ts.map +1 -1
- package/lib/src/app/routing/TasksRouter.d.ts.map +1 -1
- package/lib/src/app/routing/sampleNavigation.d.ts +1 -0
- package/lib/src/app/routing/sampleNavigation.d.ts.map +1 -1
- package/lib/src/app/routing/url.d.ts +12 -0
- package/lib/src/app/routing/url.d.ts.map +1 -1
- package/lib/src/app/samples/InlineSampleDisplay.d.ts.map +1 -1
- package/lib/src/app/samples/SampleDetailComponent.d.ts +4 -26
- package/lib/src/app/samples/SampleDetailComponent.d.ts.map +1 -1
- package/lib/src/app/samples/SampleDisplay.d.ts.map +1 -1
- package/lib/src/app/samples/SampleNavbar.d.ts +34 -0
- package/lib/src/app/samples/SampleNavbar.d.ts.map +1 -0
- package/lib/src/app/samples/SampleRetriedErrors.d.ts +3 -1
- package/lib/src/app/samples/SampleRetriedErrors.d.ts.map +1 -1
- package/lib/src/app/samples/event/SampleEventView.d.ts +11 -0
- package/lib/src/app/samples/event/SampleEventView.d.ts.map +1 -0
- package/lib/src/app/samples/retry-display/RetryTerminalAnchor.d.ts +3 -0
- package/lib/src/app/samples/retry-display/RetryTerminalAnchor.d.ts.map +1 -1
- package/lib/src/app/samples/scans/scanReferencePreviews.d.ts.map +1 -1
- package/lib/src/app/samples/transcript/TranscriptPanel.d.ts +18 -1
- package/lib/src/app/samples/transcript/TranscriptPanel.d.ts.map +1 -1
- package/lib/src/app/samples/transcript/chunked/ChunkedRowView.d.ts +18 -0
- package/lib/src/app/samples/transcript/chunked/ChunkedRowView.d.ts.map +1 -0
- package/lib/src/app/samples/transcript/chunked/ChunkedTranscriptPanel.d.ts +25 -0
- package/lib/src/app/samples/transcript/chunked/ChunkedTranscriptPanel.d.ts.map +1 -0
- package/lib/src/app/samples/transcript/chunked/mainViewOutline.d.ts +46 -0
- package/lib/src/app/samples/transcript/chunked/mainViewOutline.d.ts.map +1 -0
- package/lib/src/app/samples/transcript/chunked/useChunkedRows.d.ts +21 -0
- package/lib/src/app/samples/transcript/chunked/useChunkedRows.d.ts.map +1 -0
- package/lib/src/app/shared/data-grid/findMatches.d.ts +8 -4
- package/lib/src/app/shared/data-grid/findMatches.d.ts.map +1 -1
- package/lib/src/client/api/client-api.d.ts.map +1 -1
- package/lib/src/client/api/types.d.ts +7 -0
- package/lib/src/client/api/types.d.ts.map +1 -1
- package/lib/src/client/api/view-server/api-view-server.d.ts.map +1 -1
- package/lib/src/client/database/listing.d.ts +23 -0
- package/lib/src/client/database/listing.d.ts.map +1 -0
- package/lib/src/client/remote/remoteLogFile.d.ts +13 -0
- package/lib/src/client/remote/remoteLogFile.d.ts.map +1 -1
- package/lib/src/client/remote/remotePendingSampleData.d.ts.map +1 -1
- package/lib/src/components/DownloadButton.d.ts.map +1 -1
- package/lib/src/components/LinkButton.d.ts.map +1 -1
- package/lib/src/components/MessageBand.d.ts.map +1 -1
- package/lib/src/constants.d.ts +1 -0
- package/lib/src/constants.d.ts.map +1 -1
- package/lib/src/log_data/chunked/chunkStore.d.ts +85 -0
- package/lib/src/log_data/chunked/chunkStore.d.ts.map +1 -0
- package/lib/src/log_data/chunked/chunkedSample.d.ts +30 -0
- package/lib/src/log_data/chunked/chunkedSample.d.ts.map +1 -0
- package/lib/src/log_data/chunked/cursor.d.ts +35 -0
- package/lib/src/log_data/chunked/cursor.d.ts.map +1 -0
- package/lib/src/log_data/chunked/decode.d.ts +55 -0
- package/lib/src/log_data/chunked/decode.d.ts.map +1 -0
- package/lib/src/log_data/chunked/format.d.ts +39 -0
- package/lib/src/log_data/chunked/format.d.ts.map +1 -0
- package/lib/src/log_data/chunked/index.d.ts +17 -0
- package/lib/src/log_data/chunked/index.d.ts.map +1 -0
- package/lib/src/log_data/chunked/log.d.ts +14 -0
- package/lib/src/log_data/chunked/log.d.ts.map +1 -0
- package/lib/src/log_data/chunked/outlineRows.d.ts +33 -0
- package/lib/src/log_data/chunked/outlineRows.d.ts.map +1 -0
- package/lib/src/log_data/chunked/pyTimestamp.d.ts +23 -0
- package/lib/src/log_data/chunked/pyTimestamp.d.ts.map +1 -0
- package/lib/src/log_data/chunked/rowSpace.d.ts +53 -0
- package/lib/src/log_data/chunked/rowSpace.d.ts.map +1 -0
- package/lib/src/log_data/chunked/skeleton.d.ts +49 -0
- package/lib/src/log_data/chunked/skeleton.d.ts.map +1 -0
- package/lib/src/log_data/chunked/skeletonIndex.d.ts +23 -0
- package/lib/src/log_data/chunked/skeletonIndex.d.ts.map +1 -0
- package/lib/src/log_data/chunked/syntheticEvents.d.ts +9 -0
- package/lib/src/log_data/chunked/syntheticEvents.d.ts.map +1 -0
- package/lib/src/log_data/chunked/types.d.ts +104 -0
- package/lib/src/log_data/chunked/types.d.ts.map +1 -0
- package/lib/src/log_data/chunkedAttachments.d.ts +20 -0
- package/lib/src/log_data/chunkedAttachments.d.ts.map +1 -0
- package/lib/src/log_data/chunkedHydrate.d.ts +25 -0
- package/lib/src/log_data/chunkedHydrate.d.ts.map +1 -0
- package/lib/src/log_data/chunkedMessages.d.ts +28 -0
- package/lib/src/log_data/chunkedMessages.d.ts.map +1 -0
- package/lib/src/log_data/chunkedSampleQuery.d.ts +40 -0
- package/lib/src/log_data/chunkedSampleQuery.d.ts.map +1 -0
- package/lib/src/log_data/databaseListings.d.ts +14 -0
- package/lib/src/log_data/databaseListings.d.ts.map +1 -0
- package/lib/src/log_data/index.d.ts +6 -0
- package/lib/src/log_data/index.d.ts.map +1 -1
- package/lib/src/log_data/logsContent.d.ts +12 -4
- package/lib/src/log_data/logsContent.d.ts.map +1 -1
- package/lib/src/log_data/logsListingRead.d.ts +59 -0
- package/lib/src/log_data/logsListingRead.d.ts.map +1 -0
- package/lib/src/log_data/sampleData.d.ts +11 -1
- package/lib/src/log_data/sampleData.d.ts.map +1 -1
- package/lib/src/state/sampleSlice.d.ts +0 -1
- package/lib/src/state/sampleSlice.d.ts.map +1 -1
- package/lib/src/utils/uri.d.ts +2 -0
- package/lib/src/utils/uri.d.ts.map +1 -1
- package/lib/styles/index.css +4278 -3474
- package/package.json +13 -16
- package/lib/src/components/LargeModal.d.ts +0 -30
- package/lib/src/components/LargeModal.d.ts.map +0 -1
- package/lib/src/utils/json-worker.d.ts +0 -13
- package/lib/src/utils/json-worker.d.ts.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChatMessage } from '@tsmono/inspect-common';
|
|
2
|
+
import { SequenceReader, EntryByteSource } from './chunkStore';
|
|
3
|
+
import { SkeletonIndex } from './skeletonIndex';
|
|
4
|
+
import { ChunkedEvent, ChunkedSampleShell, EventChunkStats, SampleSkeleton } from './types';
|
|
5
|
+
export interface ChunkedSample {
|
|
6
|
+
shell: ChunkedSampleShell;
|
|
7
|
+
skeleton: SampleSkeleton;
|
|
8
|
+
skel: SkeletonIndex;
|
|
9
|
+
stats: EventChunkStats[];
|
|
10
|
+
events: SequenceReader<ChunkedEvent>;
|
|
11
|
+
messages: SequenceReader<ChatMessage>;
|
|
12
|
+
calls: SequenceReader<unknown>;
|
|
13
|
+
attachments: SequenceReader<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Resolve an event uuid to its ordinal via `events/uuids.json` (fetched
|
|
16
|
+
* lazily, once). Undefined for unknown uuids — including every uuid on a
|
|
17
|
+
* log converted before the sidecar existed.
|
|
18
|
+
*/
|
|
19
|
+
uuidToOrdinal: (uuid: string) => Promise<number | undefined>;
|
|
20
|
+
/** Fetch `metadata.json` (undefined when the sample has no metadata). */
|
|
21
|
+
readMetadata?: () => Promise<Record<string, unknown>>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Open a chunked sample. `entryNames` is the log's central-directory name
|
|
25
|
+
* set — the persisted chunk layout (per-sequence starts) plus optional
|
|
26
|
+
* metadata detection; the three parsed artifacts — shell, skeleton,
|
|
27
|
+
* stats — are fetched in parallel.
|
|
28
|
+
*/
|
|
29
|
+
export declare const openChunkedSample: (source: EntryByteSource, entryNames: ReadonlySet<string>, id: string | number, epoch: number, byteBudget?: number) => Promise<ChunkedSample>;
|
|
30
|
+
//# sourceMappingURL=chunkedSample.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunkedSample.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/chunkedSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAEL,cAAc,EACd,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AAWtB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,eAAe,EAEf,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,cAAc,CAAC;IACzB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,MAAM,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IACrC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACtC,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAC/B,WAAW,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACpC;;;;OAIG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7D,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACvD;AAoBD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,eAAe,EACvB,YAAY,WAAW,CAAC,MAAM,CAAC,EAC/B,IAAI,MAAM,GAAG,MAAM,EACnB,OAAO,MAAM,EACb,aAAa,MAAM,KAClB,OAAO,CAAC,aAAa,CA4EvB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SequenceReader } from './chunkStore';
|
|
2
|
+
import { ChunkedEvent, EventChunkStats } from './types';
|
|
3
|
+
export interface OrdinalEvent {
|
|
4
|
+
ordinal: number;
|
|
5
|
+
ev: ChunkedEvent;
|
|
6
|
+
}
|
|
7
|
+
export declare class FilteredCursor {
|
|
8
|
+
private store;
|
|
9
|
+
private stats;
|
|
10
|
+
/**
|
|
11
|
+
* Survival predicate over event type; span_begin/span_end are the
|
|
12
|
+
* caller's job to force-include (structure drives the walk).
|
|
13
|
+
*/
|
|
14
|
+
private survives;
|
|
15
|
+
private buffer;
|
|
16
|
+
private from;
|
|
17
|
+
private exhausted;
|
|
18
|
+
constructor(store: SequenceReader<ChunkedEvent>, stats: readonly EventChunkStats[], start: number,
|
|
19
|
+
/**
|
|
20
|
+
* Survival predicate over event type; span_begin/span_end are the
|
|
21
|
+
* caller's job to force-include (structure drives the walk).
|
|
22
|
+
*/
|
|
23
|
+
survives: (type: string) => boolean);
|
|
24
|
+
get done(): boolean;
|
|
25
|
+
private chunkSurvivorCount;
|
|
26
|
+
statsFor(chunkIdx: number): EventChunkStats | undefined;
|
|
27
|
+
chunkIndexOf(ordinal: number): number;
|
|
28
|
+
chunkBounds(chunkIdx: number): [number, number];
|
|
29
|
+
private refill;
|
|
30
|
+
peek(): Promise<OrdinalEvent | null>;
|
|
31
|
+
next(): Promise<OrdinalEvent | null>;
|
|
32
|
+
/** Jump to `ordinal`: advance in-buffer if already buffered, else drop and refetch. */
|
|
33
|
+
seek(ordinal: number): void;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE7D,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,YAAY,CAAC;CAClB;AAKD,qBAAa,cAAc;IAMvB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,KAAK;IAEb;;;OAGG;IACH,OAAO,CAAC,QAAQ;IAZlB,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,SAAS,CAAS;gBAGhB,KAAK,EAAE,cAAc,CAAC,YAAY,CAAC,EACnC,KAAK,EAAE,SAAS,eAAe,EAAE,EACzC,KAAK,EAAE,MAAM;IACb;;;OAGG;IACK,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO;IAK7C,IAAI,IAAI,IAAI,OAAO,CAElB;IAED,OAAO,CAAC,kBAAkB;IAW1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAIvD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIrC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;YAIjC,MAAM;IAuBd,IAAI,IAAI,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAOpC,IAAI,IAAI,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAQ1C,uFAAuF;IACvF,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAc5B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { SequenceReader } from './chunkStore';
|
|
2
|
+
import { SkeletonIndex } from './skeletonIndex';
|
|
3
|
+
import { ChunkedEvent, EventChunkStats, SkeletonSpan } from './types';
|
|
4
|
+
export type ViewRow = {
|
|
5
|
+
kind: "span";
|
|
6
|
+
ordinal: number;
|
|
7
|
+
depth: number;
|
|
8
|
+
spanIdx: number;
|
|
9
|
+
span: SkeletonSpan;
|
|
10
|
+
collapsed: boolean;
|
|
11
|
+
} | {
|
|
12
|
+
kind: "event";
|
|
13
|
+
ordinal: number;
|
|
14
|
+
depth: number;
|
|
15
|
+
ev: ChunkedEvent;
|
|
16
|
+
} | {
|
|
17
|
+
kind: "run";
|
|
18
|
+
ordinal: number;
|
|
19
|
+
depth: number;
|
|
20
|
+
runType: string;
|
|
21
|
+
count: number;
|
|
22
|
+
extent: [number, number];
|
|
23
|
+
sample: ChunkedEvent;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Event types whose consecutive same-span occurrences merge into one row.
|
|
27
|
+
* Binding constraint (spec): run membership must be decidable from type +
|
|
28
|
+
* span facts available in chunk stats — never from event payload contents.
|
|
29
|
+
*/
|
|
30
|
+
export declare const RUN_TYPES: ReadonlySet<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Structural marker types: span begin/end pairs and legacy step begin/end
|
|
33
|
+
* pairs (the skeleton folds steps into span-table entries — one contract,
|
|
34
|
+
* no legacy carve-out). Structure drives the walk and is only conditionally
|
|
35
|
+
* a row, never subject to the user's filter.
|
|
36
|
+
*/
|
|
37
|
+
export declare const STRUCTURAL_TYPES: ReadonlySet<string>;
|
|
38
|
+
export interface DecodeCtx {
|
|
39
|
+
events: SequenceReader<ChunkedEvent>;
|
|
40
|
+
stats: readonly EventChunkStats[];
|
|
41
|
+
skel: SkeletonIndex;
|
|
42
|
+
isCollapsed: (spanId: string) => boolean;
|
|
43
|
+
/** User event-type filter (structure types are force-included separately). */
|
|
44
|
+
visible: (type: string) => boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Decode view rows for ordinals `[startOrd, endOrd)`. Rows whose decode
|
|
48
|
+
* unit starts in-range are emitted even if (via seeks or runs) they extend
|
|
49
|
+
* past `endOrd`. `headRunContinues` — the caller detected (from the
|
|
50
|
+
* previous chunk's stats) that `startOrd` begins mid-run; leading run
|
|
51
|
+
* events are consumed rowless (the row belongs to the chunk where the run
|
|
52
|
+
* starts).
|
|
53
|
+
*/
|
|
54
|
+
export declare function decodeRange(ctx: DecodeCtx, startOrd: number, endOrd: number, headRunContinues: boolean): Promise<ViewRow[]>;
|
|
55
|
+
//# sourceMappingURL=decode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/decode.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE3E,MAAM,MAAM,OAAO,GACf;IACE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB,GACD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,YAAY,CAAA;CAAE,GACnE;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEN;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,CAAwB,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAI/C,CAAC;AAQH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IACrC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;IAClC,IAAI,EAAE,aAAa,CAAC;IACpB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IACzC,8EAA8E;IAC9E,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACpC;AAED;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,SAAS,EACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,OAAO,GACxB,OAAO,CAAC,OAAO,EAAE,CAAC,CA+EpB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { SequenceName } from './types';
|
|
2
|
+
export declare const SHELL_JSON = "sample.json";
|
|
3
|
+
export declare const METADATA_JSON = "metadata.json";
|
|
4
|
+
export declare const SKELETON_JSON = "skeleton.json";
|
|
5
|
+
export declare const STATS_JSON = "stats.json";
|
|
6
|
+
export declare const UUIDS_JSON = "uuids.json";
|
|
7
|
+
/** `samples/{id}_epoch_{epoch}` — the per-sample prefix (no trailing slash). */
|
|
8
|
+
export declare const samplePrefix: (id: string | number, epoch: number) => string;
|
|
9
|
+
/** Today's monolith sample entry name (`samples/{id}_epoch_{epoch}.json`). */
|
|
10
|
+
export declare const monolithEntryName: (id: string | number, epoch: number) => string;
|
|
11
|
+
export declare const shellEntryName: (id: string | number, epoch: number) => string;
|
|
12
|
+
export declare const metadataEntryName: (id: string | number, epoch: number) => string;
|
|
13
|
+
export declare const skeletonEntryName: (id: string | number, epoch: number) => string;
|
|
14
|
+
export declare const statsEntryName: (id: string | number, epoch: number) => string;
|
|
15
|
+
/** Event uuids in ordinal order (position = ordinal), lazily fetched. */
|
|
16
|
+
export declare const uuidsEntryName: (id: string | number, epoch: number) => string;
|
|
17
|
+
/** `{prefix}/{sequence}/{start}.json` — chunk holding items from `start`. */
|
|
18
|
+
export declare const chunkEntryName: (id: string | number, epoch: number, sequence: SequenceName, start: number) => string;
|
|
19
|
+
export type SampleShape = "monolith" | "chunked";
|
|
20
|
+
/**
|
|
21
|
+
* Classify a sample's on-disk shape from zip entry names (the central
|
|
22
|
+
* directory). Structural per-sample dispatch: one log may mix shapes.
|
|
23
|
+
* Returns undefined when the sample has no entries at all.
|
|
24
|
+
*/
|
|
25
|
+
export declare const classifySampleShape: (entryNames: ReadonlySet<string>, id: string | number, epoch: number) => SampleShape | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Chunk start indexes for a sequence, recovered from central-directory
|
|
28
|
+
* entry names. Ascending; empty sequences have no chunk entries at all.
|
|
29
|
+
* Non-numeric stems are skipped (`events/` also holds `stats.json`).
|
|
30
|
+
*/
|
|
31
|
+
export declare const sequenceChunkStarts: (entryNames: ReadonlySet<string>, id: string | number, epoch: number, sequence: SequenceName) => number[];
|
|
32
|
+
/** Bounds-checked index (an out-of-range index is a coding error). */
|
|
33
|
+
export declare const at: <T>(items: readonly T[], i: number) => T;
|
|
34
|
+
/**
|
|
35
|
+
* Index of the chunk holding item `i`: greatest start ≤ i (binary search
|
|
36
|
+
* over ascending starts). Callers must ensure `0 ≤ i <` the sequence count.
|
|
37
|
+
*/
|
|
38
|
+
export declare const chunkIndexOf: (starts: readonly number[], i: number) => number;
|
|
39
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,eAAO,MAAM,UAAU,gBAAgB,CAAC;AACxC,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,gFAAgF;AAChF,eAAO,MAAM,YAAY,GAAI,IAAI,MAAM,GAAG,MAAM,EAAE,OAAO,MAAM,KAAG,MAC3B,CAAC;AAExC,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,GAAI,IAAI,MAAM,GAAG,MAAM,EAAE,OAAO,MAAM,KAAG,MACpC,CAAC;AAEpC,eAAO,MAAM,cAAc,GAAI,IAAI,MAAM,GAAG,MAAM,EAAE,OAAO,MAAM,KAAG,MACxB,CAAC;AAE7C,eAAO,MAAM,iBAAiB,GAAI,IAAI,MAAM,GAAG,MAAM,EAAE,OAAO,MAAM,KAAG,MACxB,CAAC;AAEhD,eAAO,MAAM,iBAAiB,GAAI,IAAI,MAAM,GAAG,MAAM,EAAE,OAAO,MAAM,KAAG,MACxB,CAAC;AAEhD,eAAO,MAAM,cAAc,GAAI,IAAI,MAAM,GAAG,MAAM,EAAE,OAAO,MAAM,KAAG,MACjB,CAAC;AAEpD,yEAAyE;AACzE,eAAO,MAAM,cAAc,GAAI,IAAI,MAAM,GAAG,MAAM,EAAE,OAAO,MAAM,KAAG,MACjB,CAAC;AAEpD,6EAA6E;AAC7E,eAAO,MAAM,cAAc,GACzB,IAAI,MAAM,GAAG,MAAM,EACnB,OAAO,MAAM,EACb,UAAU,YAAY,EACtB,OAAO,MAAM,KACZ,MAAgE,CAAC;AAEpE,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC9B,YAAY,WAAW,CAAC,MAAM,CAAC,EAC/B,IAAI,MAAM,GAAG,MAAM,EACnB,OAAO,MAAM,KACZ,WAAW,GAAG,SAKA,CAAC;AAElB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC9B,YAAY,WAAW,CAAC,MAAM,CAAC,EAC/B,IAAI,MAAM,GAAG,MAAM,EACnB,OAAO,MAAM,EACb,UAAU,YAAY,KACrB,MAAM,EAYR,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,EAAE,GAAI,CAAC,EAAE,OAAO,SAAS,CAAC,EAAE,EAAE,GAAG,MAAM,KAAG,CAMtD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,SAAS,MAAM,EAAE,EAAE,GAAG,MAAM,KAAG,MASnE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Headless data layer for chunked-format samples
|
|
3
|
+
* (design/large-samples.md in the inspect_ai repo). Framework-free: no
|
|
4
|
+
* React, no react-query — the viewer integration layers those on top.
|
|
5
|
+
*/
|
|
6
|
+
export { openChunkedSample, type ChunkedSample } from './chunkedSample';
|
|
7
|
+
export { ChunkByteStore, SequenceReader, type EntryByteSource, } from './chunkStore';
|
|
8
|
+
export { FilteredCursor, type OrdinalEvent } from './cursor';
|
|
9
|
+
export { RUN_TYPES, STRUCTURAL_TYPES, decodeRange, type DecodeCtx, type ViewRow, } from './decode';
|
|
10
|
+
export { classifySampleShape, monolithEntryName, samplePrefix, shellEntryName, type SampleShape, } from './format';
|
|
11
|
+
export { sampleSkeleton, type SkeletonEvent, type SkeletonPolicy, } from './skeleton';
|
|
12
|
+
export { candidateOutlineRows, defaultCollapsedSpanIds, type CollapseState, type OutlineRow, } from './outlineRows';
|
|
13
|
+
export { SkeletonIndex } from './skeletonIndex';
|
|
14
|
+
export { syntheticEventsFromSkeleton, type SyntheticStream, } from './syntheticEvents';
|
|
15
|
+
export { RowSpace, type RowSlot } from './rowSpace';
|
|
16
|
+
export type { ChunkedEvent, ChunkedSampleShell, EventChunkStats, EventStats, SampleSkeleton, SequenceName, SkeletonNotable, SkeletonSpan, } from './types';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EACL,cAAc,EACd,cAAc,EACd,KAAK,eAAe,GACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,KAAK,SAAS,EACd,KAAK,OAAO,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,KAAK,WAAW,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,2BAA2B,EAC3B,KAAK,eAAe,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AACpD,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,cAAc,EACd,YAAY,EACZ,eAAe,EACf,YAAY,GACb,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unconditional console logging for the chunked read path: every member
|
|
3
|
+
* fetch/cache-hit/eviction, chunk parse, sidecar read, attachment
|
|
4
|
+
* resolution, and row materialization, for confirming windowed-read
|
|
5
|
+
* behavior while browsing. Deliberately NOT the gated `createLogger` —
|
|
6
|
+
* the chunked path is dev-phase (only the hidden converter produces
|
|
7
|
+
* chunked logs), and the point is to see the reads in any build. Dial
|
|
8
|
+
* back to `createLogger("chunked")` before the format ships by default.
|
|
9
|
+
*/
|
|
10
|
+
export declare const log: {
|
|
11
|
+
info: (message: string) => void;
|
|
12
|
+
debug: (message: string) => void;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/log.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,GAAG;oBACE,MAAM,KAAG,IAAI;qBAGZ,MAAM,KAAG,IAAI;CAG/B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SampleSkeleton } from './types';
|
|
2
|
+
/** One outline row (the Python `OutlineRow` NamedTuple, plus `spanId`). */
|
|
3
|
+
export interface OutlineRow {
|
|
4
|
+
kind: "span" | "turns" | "scoring" | "event";
|
|
5
|
+
depth: number;
|
|
6
|
+
name?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Sequence index of the row's anchor event (absent only for synthetic
|
|
10
|
+
* rows whose subtree holds no indexed events).
|
|
11
|
+
*/
|
|
12
|
+
anchor?: number;
|
|
13
|
+
/** Merged item count (turns / scoring rows). */
|
|
14
|
+
total?: number;
|
|
15
|
+
/**
|
|
16
|
+
* The skeleton span's id (span rows only) — keys collapse state. Absent
|
|
17
|
+
* on the synthetic sample_init wrapper row, which has no skeleton span.
|
|
18
|
+
*/
|
|
19
|
+
spanId?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Collapse state: a preset, or a set of span identities (span ids; legacy
|
|
23
|
+
* steps use the skeleton convention `step-<begin index>`).
|
|
24
|
+
*/
|
|
25
|
+
export type CollapseState = "default" | "expanded" | "collapsed" | ReadonlySet<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Span ids the default-collapse policy collapses — for seeding transcript
|
|
28
|
+
* collapse state to match `candidateOutlineRows(skeleton, "default")`.
|
|
29
|
+
*/
|
|
30
|
+
export declare const defaultCollapsedSpanIds: (skeleton: SampleSkeleton) => Set<string>;
|
|
31
|
+
/** Outline rows derived from the skeleton alone. */
|
|
32
|
+
export declare const candidateOutlineRows: (skeleton: SampleSkeleton, collapse?: CollapseState) => OutlineRow[];
|
|
33
|
+
//# sourceMappingURL=outlineRows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outlineRows.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/outlineRows.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAiC,MAAM,SAAS,CAAC;AAK7E,2EAA2E;AAC3E,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GACvB,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAkN7D;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAClC,UAAU,cAAc,KACvB,GAAG,CAAC,MAAM,CAC4D,CAAC;AAE1E,oDAAoD;AACpD,eAAO,MAAM,oBAAoB,GAC/B,UAAU,cAAc,EACxB,WAAU,aAAyB,KAClC,UAAU,EAkIZ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Timestamp twin of the Python skeleton producer's datetime handling.
|
|
3
|
+
*
|
|
4
|
+
* `Event.timestamp` is a `UtcDatetime`: every parsed timestamp is coerced to
|
|
5
|
+
* UTC (offset-less strings are treated as UTC), and the producer emits
|
|
6
|
+
* `datetime.isoformat()` of the UTC datetime — no fraction when microseconds
|
|
7
|
+
* are zero, otherwise six digits, offset always `+00:00`. The producer also
|
|
8
|
+
* compares timestamps at microsecond precision, beyond JS `Date`, so we
|
|
9
|
+
* carry a microsecond epoch.
|
|
10
|
+
*/
|
|
11
|
+
export interface PyTimestamp {
|
|
12
|
+
/** Microseconds since the Unix epoch (instant, for comparisons). */
|
|
13
|
+
epochUs: number;
|
|
14
|
+
/** Python `datetime.isoformat()` rendering of the UTC datetime. */
|
|
15
|
+
iso: string;
|
|
16
|
+
}
|
|
17
|
+
/** Parse an ISO-8601 timestamp; offset-less values are treated as UTC. */
|
|
18
|
+
export declare const parsePyTimestamp: (value: string) => PyTimestamp;
|
|
19
|
+
/** Python `datetime.isoformat()` of a UTC microsecond epoch. */
|
|
20
|
+
export declare const formatPyTimestamp: (epochUs: number) => string;
|
|
21
|
+
/** Later of two timestamps (Python `max` — ties keep the first argument). */
|
|
22
|
+
export declare const maxPyTimestamp: (a: PyTimestamp, b: PyTimestamp) => PyTimestamp;
|
|
23
|
+
//# sourceMappingURL=pyTimestamp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pyTimestamp.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/pyTimestamp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,WAAW;IAC1B,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,GAAG,EAAE,MAAM,CAAC;CACb;AAKD,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,KAAG,WAwBhD,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,MAUnD,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,cAAc,GAAI,GAAG,WAAW,EAAE,GAAG,WAAW,KAAG,WACjC,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { SequenceReader } from './chunkStore';
|
|
2
|
+
import { DecodeCtx, ViewRow } from './decode';
|
|
3
|
+
import { SkeletonIndex } from './skeletonIndex';
|
|
4
|
+
import { ChunkedEvent, EventChunkStats } from './types';
|
|
5
|
+
export type RowSlot = {
|
|
6
|
+
kind: "row";
|
|
7
|
+
row: ViewRow;
|
|
8
|
+
globalIndex: number;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "placeholder";
|
|
11
|
+
chunkIdx: number;
|
|
12
|
+
estOrdinal: number;
|
|
13
|
+
globalIndex: number;
|
|
14
|
+
};
|
|
15
|
+
export declare class RowSpace {
|
|
16
|
+
private events;
|
|
17
|
+
private stats;
|
|
18
|
+
private skel;
|
|
19
|
+
private visible;
|
|
20
|
+
readonly chunkRows: number[];
|
|
21
|
+
readonly exact: boolean[];
|
|
22
|
+
private materializedRows;
|
|
23
|
+
private inflight;
|
|
24
|
+
private prefix;
|
|
25
|
+
version: number;
|
|
26
|
+
private listeners;
|
|
27
|
+
/** Merged elided ordinal ranges `[lo, hi]` (collapsed span interiors). */
|
|
28
|
+
private elision;
|
|
29
|
+
constructor(events: SequenceReader<ChunkedEvent>, stats: readonly EventChunkStats[], skel: SkeletonIndex, collapsed: ReadonlySet<string>, visible: (type: string) => boolean);
|
|
30
|
+
onChange(fn: () => void): () => void;
|
|
31
|
+
get total(): number;
|
|
32
|
+
private chunkBounds;
|
|
33
|
+
private elidedOverlap;
|
|
34
|
+
private fullyElided;
|
|
35
|
+
private estimateChunk;
|
|
36
|
+
private recompute;
|
|
37
|
+
slotAt(globalIndex: number): RowSlot;
|
|
38
|
+
/**
|
|
39
|
+
* The ordinal anchor: map an event ordinal to its global row index.
|
|
40
|
+
*
|
|
41
|
+
* Two accepted one-row inaccuracies on materialized chunks: an ordinal
|
|
42
|
+
* covered by a run row that STARTS in the previous chunk anchors one row
|
|
43
|
+
* late (the containing run row lives in that chunk), and an ordinal past
|
|
44
|
+
* the chunk's last row (e.g. a trailing span_end) clamps backward to it.
|
|
45
|
+
*/
|
|
46
|
+
rowIndexForOrdinal(ordinal: number): number;
|
|
47
|
+
isMaterialized(chunkIdx: number): boolean;
|
|
48
|
+
/** Decode a chunk's window and correct its row count; idempotent. */
|
|
49
|
+
materialize(chunkIdx: number, ctx: DecodeCtx): Promise<void>;
|
|
50
|
+
private doMaterialize;
|
|
51
|
+
get materializedCount(): number;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=rowSpace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rowSpace.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/rowSpace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,OAAO,EACb,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAK7D,MAAM,MAAM,OAAO,GACf;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAClD;IACE,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEN,qBAAa,QAAQ;IAiBjB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,IAAI;IAEZ,OAAO,CAAC,OAAO;IApBjB,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC;IAK1B,OAAO,CAAC,gBAAgB,CAAgC;IACxD,OAAO,CAAC,QAAQ,CAAoC;IACpD,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,SAAK;IACZ,OAAO,CAAC,SAAS,CAAyB;IAE1C,0EAA0E;IAC1E,OAAO,CAAC,OAAO,CAA0B;gBAG/B,MAAM,EAAE,cAAc,CAAC,YAAY,CAAC,EACpC,KAAK,EAAE,SAAS,eAAe,EAAE,EACjC,IAAI,EAAE,aAAa,EAC3B,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,EACtB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO;IA8B5C,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAOpC,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,aAAa;IA6BrB,OAAO,CAAC,SAAS;IASjB,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IA0BpC;;;;;;;OAOG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAgB3C,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIzC,qEAAqE;IACrE,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;YAc9C,aAAa;IAiC3B,IAAI,iBAAiB,IAAI,MAAM,CAE9B;CACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { SampleSkeleton } from './types';
|
|
2
|
+
export declare const DEFAULT_NOTABLE_CAP = 1000;
|
|
3
|
+
export declare const DEFAULT_ESCAPE_HATCH_EVENTS = 1000;
|
|
4
|
+
/**
|
|
5
|
+
* Event types persisted as notables (ratified, not a policy knob): a
|
|
6
|
+
* model-event notable would break the per-span accounting invariant
|
|
7
|
+
* `sum(gap_models) + sum(child span models) == models`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const NOTABLE_TYPES: ReadonlySet<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Writer-policy knobs for skeleton production. Policy, not contract: knobs
|
|
12
|
+
* change which spans/notables are persisted, never the schema.
|
|
13
|
+
*/
|
|
14
|
+
export interface SkeletonPolicy {
|
|
15
|
+
/** Per-type first-N cap on persisted notables. */
|
|
16
|
+
notable_cap?: number;
|
|
17
|
+
/**
|
|
18
|
+
* A leaf tool span with at least this many descendant events is included
|
|
19
|
+
* despite the leaf-tool exclusion (fetch elision + outline presence for
|
|
20
|
+
* monster tool spans).
|
|
21
|
+
*/
|
|
22
|
+
escape_hatch_events?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The event fields the producer reads. `Event` union members satisfy this
|
|
26
|
+
* structurally; fixture events parsed from JSON do too.
|
|
27
|
+
*/
|
|
28
|
+
export interface SkeletonEvent {
|
|
29
|
+
event: string;
|
|
30
|
+
span_id?: string | null;
|
|
31
|
+
timestamp: string;
|
|
32
|
+
working_start: number;
|
|
33
|
+
/** Span id (span begin/end events). */
|
|
34
|
+
id?: string | null;
|
|
35
|
+
parent_id?: string | null;
|
|
36
|
+
name?: string | null;
|
|
37
|
+
type?: string | null;
|
|
38
|
+
/** Step action (legacy step events). */
|
|
39
|
+
action?: string | null;
|
|
40
|
+
checkpoint_id?: number | null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Produce the structural skeleton for an event sequence. Pure and
|
|
44
|
+
* deterministic: the same events (and policy) always yield the same
|
|
45
|
+
* skeleton. Legacy step begin/end pairs map to span-table entries — one
|
|
46
|
+
* skeleton contract, no legacy carve-out.
|
|
47
|
+
*/
|
|
48
|
+
export declare const sampleSkeleton: (events: readonly SkeletonEvent[], policy?: SkeletonPolicy) => SampleSkeleton;
|
|
49
|
+
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/skeleton.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,cAAc,EAAiC,MAAM,SAAS,CAAC;AAE7E,eAAO,MAAM,mBAAmB,OAAO,CAAC;AACxC,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,CAG5C,CAAC;AAEH;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AA6BD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GACzB,QAAQ,SAAS,aAAa,EAAE,EAChC,SAAQ,cAAmB,KAC1B,cA4DF,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SampleSkeleton, SkeletonSpan } from './types';
|
|
2
|
+
export declare class SkeletonIndex {
|
|
3
|
+
readonly skeleton: SampleSkeleton;
|
|
4
|
+
readonly spans: SkeletonSpan[];
|
|
5
|
+
readonly childrenOf: number[][];
|
|
6
|
+
readonly roots: number[];
|
|
7
|
+
readonly spanIds: ReadonlySet<string>;
|
|
8
|
+
private byBegin;
|
|
9
|
+
constructor(skeleton: SampleSkeleton);
|
|
10
|
+
/** Span whose begin event sits at `ordinal` (undefined: dissolved span). */
|
|
11
|
+
spanAtBegin(ordinal: number): number | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Structural ancestor stack (outermost first) containing `ordinal` —
|
|
14
|
+
* answered entirely from extents; the span_begin events need never be
|
|
15
|
+
* fetched. Interleaved-span extent overlap: first containing child wins
|
|
16
|
+
* (tolerated per spec; correctness comes from span_id on fetched events).
|
|
17
|
+
*/
|
|
18
|
+
spanStackAt(ordinal: number): number[];
|
|
19
|
+
depthAt(ordinal: number): number;
|
|
20
|
+
/** Does an expanded span have anything to show under the current filter? */
|
|
21
|
+
hasVisibleContents(spanIdx: number, visibleTypes: (type: string) => boolean): boolean;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=skeletonIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeletonIndex.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/skeletonIndex.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5D,qBAAa,aAAa;IAOZ,QAAQ,CAAC,QAAQ,EAAE,cAAc;IAN7C,QAAQ,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO,CAAC,OAAO,CAA6B;gBAEvB,QAAQ,EAAE,cAAc;IAe7C,4EAA4E;IAC5E,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIhD;;;;;OAKG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;IAgBtC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIhC,4EAA4E;IAC5E,kBAAkB,CAChB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GACtC,OAAO;CAcX"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Event } from '@tsmono/inspect-common/types';
|
|
2
|
+
import { SampleSkeleton } from './types';
|
|
3
|
+
export interface SyntheticStream {
|
|
4
|
+
events: Event[];
|
|
5
|
+
/** Synthetic event uuid -> ordinal in the real event sequence. */
|
|
6
|
+
ordinals: ReadonlyMap<string, number>;
|
|
7
|
+
}
|
|
8
|
+
export declare const syntheticEventsFromSkeleton: (skel: SampleSkeleton) => SyntheticStream;
|
|
9
|
+
//# sourceMappingURL=syntheticEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syntheticEvents.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/syntheticEvents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAiC,MAAM,SAAS,CAAC;AAE7E,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,kEAAkE;IAClE,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAaD,eAAO,MAAM,2BAA2B,GACtC,MAAM,cAAc,KACnB,eAkTF,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Event, Timeline } from '@tsmono/inspect-common';
|
|
2
|
+
export type SequenceName = "messages" | "events" | "calls" | "attachments";
|
|
3
|
+
export declare const SEQUENCE_NAMES: readonly SequenceName[];
|
|
4
|
+
/**
|
|
5
|
+
* The sample shell (`sample.json`): every EvalSample field except the
|
|
6
|
+
* token-linear sequences and metadata, plus `message_refs`. Sequence items
|
|
7
|
+
* are fetched separately by range — the chunk layout is never persisted
|
|
8
|
+
* here; it's recovered from central-directory entry names (`format.ts`).
|
|
9
|
+
* The shell is cheap by construction.
|
|
10
|
+
*/
|
|
11
|
+
export interface ChunkedSampleShell {
|
|
12
|
+
id: string | number;
|
|
13
|
+
epoch: number;
|
|
14
|
+
/** Final conversation as half-open ranges into the messages sequence. */
|
|
15
|
+
message_refs: [number, number][];
|
|
16
|
+
/** Producer-authored timelines (EvalSample.timelines, carried verbatim). */
|
|
17
|
+
timelines?: Timeline[];
|
|
18
|
+
/** Remaining EvalSample shell fields (input, target, scores, store, ...). */
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
export interface SkeletonCounts {
|
|
22
|
+
events: number;
|
|
23
|
+
models: number;
|
|
24
|
+
}
|
|
25
|
+
/** One structural span (span begin/end pair or legacy step pair). */
|
|
26
|
+
export interface SkeletonSpan {
|
|
27
|
+
/** Span id (legacy steps: synthesized as `step-<begin index>`). */
|
|
28
|
+
id: string;
|
|
29
|
+
/** Index of parent span in the spans array (absent at root). */
|
|
30
|
+
parent?: number;
|
|
31
|
+
name: string;
|
|
32
|
+
/** Span type (solver | agent | subtask | scorer | tool | ...). */
|
|
33
|
+
type?: string;
|
|
34
|
+
/** Sequence index of the span begin event. */
|
|
35
|
+
begin: number;
|
|
36
|
+
/** [first, last] descendant event index (parallel spans may overlap). */
|
|
37
|
+
extent: [number, number];
|
|
38
|
+
/** [start, end] ISO timestamps. */
|
|
39
|
+
t: [string, string];
|
|
40
|
+
/** [start, end] working time. */
|
|
41
|
+
working: [number, number];
|
|
42
|
+
/** Descendant event count (incl. nested spans and begin/end markers). */
|
|
43
|
+
events: number;
|
|
44
|
+
/** Descendant model-event count. */
|
|
45
|
+
models: number;
|
|
46
|
+
/**
|
|
47
|
+
* Model events strictly between consecutive items, where items are
|
|
48
|
+
* direct-child structural spans + persisted notables merged in sequence
|
|
49
|
+
* order (`length == items + 1`). Additive: suppressing an item row means
|
|
50
|
+
* summing its adjacent gaps.
|
|
51
|
+
*/
|
|
52
|
+
gap_models: number[];
|
|
53
|
+
/**
|
|
54
|
+
* Direct-child event-type counts, sparse. Includes events of excluded
|
|
55
|
+
* (dissolved) leaf tool spans; excludes structural markers of structural
|
|
56
|
+
* children.
|
|
57
|
+
*/
|
|
58
|
+
children: Record<string, number>;
|
|
59
|
+
}
|
|
60
|
+
/** A persisted notable event. */
|
|
61
|
+
export interface SkeletonNotable {
|
|
62
|
+
/** Sequence index of the event. */
|
|
63
|
+
i: number;
|
|
64
|
+
/** Index of the directly containing span row (absent at root level). */
|
|
65
|
+
span?: number;
|
|
66
|
+
type: string;
|
|
67
|
+
/** Checkpoint id (checkpoint events only). */
|
|
68
|
+
checkpoint_id?: number;
|
|
69
|
+
}
|
|
70
|
+
/** Span-proportional structural skeleton of a sample's event sequence. */
|
|
71
|
+
export interface SampleSkeleton {
|
|
72
|
+
version: number;
|
|
73
|
+
counts: SkeletonCounts;
|
|
74
|
+
spans: SkeletonSpan[];
|
|
75
|
+
notables: SkeletonNotable[];
|
|
76
|
+
/** Per-type count of notables omitted past the cap, sparse. */
|
|
77
|
+
overflow: Record<string, number>;
|
|
78
|
+
}
|
|
79
|
+
/** First/last event of a chunk (`span_id` absent at root level). */
|
|
80
|
+
export interface ChunkEdgeEvent {
|
|
81
|
+
type: string;
|
|
82
|
+
span_id?: string;
|
|
83
|
+
}
|
|
84
|
+
/** Per-chunk entry in the events stats sidecar. */
|
|
85
|
+
export interface EventChunkStats {
|
|
86
|
+
/** Chunk start index (== the chunk entry name). */
|
|
87
|
+
start: number;
|
|
88
|
+
/** Sparse per-chunk event-type counts. */
|
|
89
|
+
type_counts: Record<string, number>;
|
|
90
|
+
first: ChunkEdgeEvent;
|
|
91
|
+
last: ChunkEdgeEvent;
|
|
92
|
+
}
|
|
93
|
+
/** The events stats sidecar (`events/stats.json`). */
|
|
94
|
+
export interface EventStats {
|
|
95
|
+
version: number;
|
|
96
|
+
chunks: EventChunkStats[];
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* An event as parsed from a chunk. Chunk JSON is the serialized `Event`
|
|
100
|
+
* union; ModelEvents additionally carry range-encoded `input_refs` /
|
|
101
|
+
* `call.call_refs` in place of inline copies.
|
|
102
|
+
*/
|
|
103
|
+
export type ChunkedEvent = Event;
|
|
104
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/log_data/chunked/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAC;AAE3E,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAKjD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACjC,4EAA4E;IAC5E,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,6EAA6E;IAC7E,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qEAAqE;AACrE,MAAM,WAAW,YAAY;IAC3B,mEAAmE;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,mCAAmC;IACnC,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpB,iCAAiC;IACjC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,iCAAiC;AACjC,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,CAAC,EAAE,MAAM,CAAC;IACV,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,0EAA0E;AAC1E,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,oEAAoE;AACpE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,mDAAmD;AACnD,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,KAAK,EAAE,cAAc,CAAC;IACtB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,sDAAsD;AACtD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SequenceReader, ChunkedEvent, ChunkedSample } from './chunked';
|
|
2
|
+
/**
|
|
3
|
+
* Substitute every attachment ref in `items` from the sample's attachments
|
|
4
|
+
* sequence (fetches dedup through the shared chunk-byte store). `label`
|
|
5
|
+
* names the batch in the read log.
|
|
6
|
+
*/
|
|
7
|
+
export declare const withAttachmentsResolved: <T>(items: T[], chunked: ChunkedSample, label: string) => Promise<T[]>;
|
|
8
|
+
/**
|
|
9
|
+
* Warm the attachment chunks `items` reference without resolving (the
|
|
10
|
+
* parsed-chunk and byte caches make the later `withAttachmentsResolved`
|
|
11
|
+
* pass a cache hit). Lets callers overlap attachment downloads with
|
|
12
|
+
* whatever else they're still fetching.
|
|
13
|
+
*/
|
|
14
|
+
export declare const prefetchAttachments: <T>(items: T[], chunked: ChunkedSample) => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* The sample's events reader with attachment refs resolved per chunk.
|
|
17
|
+
* Chunk-level caching means each chunk resolves once.
|
|
18
|
+
*/
|
|
19
|
+
export declare const resolvedEventsReader: (chunked: ChunkedSample) => SequenceReader<ChunkedEvent>;
|
|
20
|
+
//# sourceMappingURL=chunkedAttachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunkedAttachments.d.ts","sourceRoot":"","sources":["../../../src/log_data/chunkedAttachments.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,aAAa,EACnB,MAAM,WAAW,CAAC;AAoCnB;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAAU,CAAC,EAC7C,OAAO,CAAC,EAAE,EACV,SAAS,aAAa,EACtB,OAAO,MAAM,KACZ,OAAO,CAAC,CAAC,EAAE,CAmBb,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAU,CAAC,EACzC,OAAO,CAAC,EAAE,EACV,SAAS,aAAa,KACrB,OAAO,CAAC,IAAI,CAMd,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,aAAa,KACrB,cAAc,CAAC,YAAY,CAG3B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EvalSample } from '@tsmono/inspect-common/types';
|
|
2
|
+
import { LogZipAccess } from '../client/remote/remoteLogFile';
|
|
3
|
+
import { ChunkedSample } from './chunked';
|
|
4
|
+
/**
|
|
5
|
+
* Full-download size gate for timeline'd chunked samples
|
|
6
|
+
* (`TIMELINE_HYDRATION_BYTES` in the spec's named-constants table).
|
|
7
|
+
*/
|
|
8
|
+
export declare const TIMELINE_HYDRATION_BYTES: number;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the sample needs legacy-pipeline fidelity (producer timelines or
|
|
11
|
+
* branch/anchor events) and is small enough to download whole. Both checks
|
|
12
|
+
* are free: shell + stats are already parsed, sizes come from the central
|
|
13
|
+
* directory.
|
|
14
|
+
*/
|
|
15
|
+
export declare const shouldFullyHydrate: (chunked: ChunkedSample, zip: LogZipAccess) => boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Download all four sequences and reassemble the monolith `EvalSample`
|
|
18
|
+
* shape: the message sequence doubles as the `events_data` pool (indices
|
|
19
|
+
* preserved by the converter), `message_refs` rebuild the final
|
|
20
|
+
* conversation, and attachments become an index-keyed map. `resolveSample`
|
|
21
|
+
* then expands pool refs and resolves `attachment://<index>` refs exactly
|
|
22
|
+
* as it does for monolith samples.
|
|
23
|
+
*/
|
|
24
|
+
export declare const hydrateFullSample: (chunked: ChunkedSample) => Promise<EvalSample>;
|
|
25
|
+
//# sourceMappingURL=chunkedHydrate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunkedHydrate.d.ts","sourceRoot":"","sources":["../../../src/log_data/chunkedHydrate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAG7D;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAAmB,CAAC;AAmBzD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,aAAa,EACtB,KAAK,YAAY,KAChB,OAgBF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,aAAa,KACrB,OAAO,CAAC,UAAU,CAwBpB,CAAC"}
|