pi-tuck 1.0.1 → 1.0.4

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 (50) hide show
  1. package/CHANGELOG.md +65 -3
  2. package/README.md +138 -57
  3. package/dist/index.d.ts +2 -1
  4. package/dist/index.js +7 -4
  5. package/dist/src/budget.d.ts +17 -4
  6. package/dist/src/budget.js +33 -10
  7. package/dist/src/build-id.d.ts +1 -1
  8. package/dist/src/build-id.js +1 -1
  9. package/dist/src/compaction.d.ts +7 -0
  10. package/dist/src/compaction.js +32 -16
  11. package/dist/src/diagnostics.d.ts +2 -1
  12. package/dist/src/omissions.d.ts +1 -1
  13. package/dist/src/omissions.js +8 -8
  14. package/dist/src/tuck/core/brief.d.ts +13 -43
  15. package/dist/src/tuck/core/brief.js +41 -255
  16. package/dist/src/tuck/core/filter-noise.js +2 -1
  17. package/dist/src/tuck/core/format.d.ts +2 -6
  18. package/dist/src/tuck/core/format.js +4 -10
  19. package/dist/src/tuck/core/normalize.js +22 -50
  20. package/dist/src/tuck/core/shrink.d.ts +33 -0
  21. package/dist/src/tuck/core/shrink.js +218 -0
  22. package/dist/src/tuck/core/summarize.d.ts +15 -7
  23. package/dist/src/tuck/core/summarize.js +17 -22
  24. package/dist/src/tuck/core/transcript.d.ts +24 -13
  25. package/dist/src/tuck/core/transcript.js +251 -83
  26. package/dist/src/tuck/types.d.ts +4 -21
  27. package/dist/src/tuck.d.ts +8 -10
  28. package/dist/src/tuck.js +23 -25
  29. package/index.ts +8 -5
  30. package/package.json +1 -1
  31. package/src/budget.ts +29 -9
  32. package/src/build-id.ts +1 -1
  33. package/src/compaction.ts +33 -14
  34. package/src/diagnostics.ts +1 -1
  35. package/src/omissions.ts +8 -8
  36. package/src/tuck/core/brief.ts +48 -265
  37. package/src/tuck/core/filter-noise.ts +2 -1
  38. package/src/tuck/core/format.ts +4 -11
  39. package/src/tuck/core/normalize.ts +21 -50
  40. package/src/tuck/core/shrink.ts +217 -0
  41. package/src/tuck/core/summarize.ts +26 -24
  42. package/src/tuck/core/transcript.ts +238 -82
  43. package/src/tuck/types.ts +9 -20
  44. package/src/tuck.ts +30 -32
  45. package/dist/src/tuck/core/brief-meter.d.ts +0 -42
  46. package/dist/src/tuck/core/brief-meter.js +0 -273
  47. package/dist/src/tuck/core/rank.d.ts +0 -42
  48. package/dist/src/tuck/core/rank.js +0 -292
  49. package/src/tuck/core/brief-meter.ts +0 -235
  50. package/src/tuck/core/rank.ts +0 -331
@@ -0,0 +1,218 @@
1
+ import { blockRecords, decorateRecord, isDialogue, isOmittable, omissionRecord } from "./brief.js";
2
+ import { DIALOGUE_SUFFIX } from "./format.js";
3
+ import { orderByOriginalSource } from "./source-order.js";
4
+ import { serializeRecord, serializeTranscript, TRANSCRIPT_HEADER } from "./transcript.js";
5
+ const ROLES = ["user", "assistant", "notice"];
6
+ /** The lossy variants of a unit, least clipped first: the words kept from the start of its text and from its end. */
7
+ const TIERS = {
8
+ assistant: [[80, 120], [40, 40], [16, 0]],
9
+ user: [[256, 0], [64, 0], [24, 0]],
10
+ notice: [[256, 0]],
11
+ };
12
+ const TOOLS_OMITTED = { kind: "omission", reason: "Historical tool actions and observations omitted; read original sources with tuck_recall" };
13
+ const rendered = (records) => ({ records, cost: records.reduce((n, r) => n + serializeRecord(r).length + 1, 0) });
14
+ const WHOLE = { drop: 0, tier: 0, end: 0 };
15
+ /** The units of one role in chronological order, with each variant's cost summed over every prefix. */
16
+ const createLane = (role, units, mandatory, decorate) => {
17
+ const n = units.length;
18
+ const records = (block, clip) => rendered(blockRecords(block, mandatory, clip).map(decorate));
19
+ const prefix = (level) => { const sums = new Float64Array(n + 1); level.forEach((r, i) => sums[i + 1] = sums[i] + r.cost); return sums; };
20
+ const levels = [units.map(block => records(block))];
21
+ const sums = [prefix(levels[0])];
22
+ // A clip keeps whole passages, so a unit that is one long sentence, code block or JSON region can keep no text at all. Such a clip renders
23
+ // nothing and its unit is counted in the role's one omission notice, like a dropped unit: a notice per empty clip would cost more than text.
24
+ const NONE = { records: [], cost: 0 };
25
+ const emptied = [new Uint8Array(n)];
26
+ const emptyCounts = [new Int32Array(n + 1)];
27
+ /** Level t holds each unit's tier-t variant. A clip that would not make the unit smaller is not taken, so sizes never grow with t. */
28
+ const level = (t) => {
29
+ while (levels.length <= t) {
30
+ const previous = levels[levels.length - 1], wasEmpty = emptied[emptied.length - 1], clip = TIERS[role][levels.length - 1];
31
+ const empty = new Uint8Array(n);
32
+ const next = units.map((block, i) => {
33
+ if (wasEmpty[i]) {
34
+ empty[i] = 1;
35
+ return previous[i];
36
+ }
37
+ const clipped = records(block, clip);
38
+ if (role !== "notice" && isOmittable(block, mandatory) && !clipped.records.some(record => record.kind === "excerpt")) {
39
+ empty[i] = 1;
40
+ return NONE;
41
+ }
42
+ return clipped.cost < previous[i].cost ? clipped : previous[i];
43
+ });
44
+ const counts = new Int32Array(n + 1);
45
+ empty.forEach((e, i) => counts[i + 1] = counts[i] + e);
46
+ levels.push(next);
47
+ sums.push(prefix(next));
48
+ emptied.push(empty);
49
+ emptyCounts.push(counts);
50
+ }
51
+ return levels[t];
52
+ };
53
+ const sum = (t) => { level(t); return sums[t]; };
54
+ // The notice for a dropped prefix of p units: how many unselected text blocks, the first locators, and whether some have none.
55
+ let tally;
56
+ /** The notice for the units a setting omits: the dropped prefix, and the clips in [drop, end) that kept no text. */
57
+ const omission = ({ drop, tier, end }) => {
58
+ if (role === "notice")
59
+ return undefined;
60
+ if (!tally) {
61
+ tally = { counts: new Int32Array(n + 1), unlocated: new Uint8Array(n + 1), smallest: new Array(n + 1) };
62
+ let smallest = [], count = 0, unlocated = 0;
63
+ tally.smallest[0] = smallest;
64
+ units.forEach((block, i) => {
65
+ if (isOmittable(block, mandatory)) {
66
+ count++;
67
+ const source = block.sourceIndex;
68
+ if (source === undefined)
69
+ unlocated = 1;
70
+ else if (!smallest.includes(source) && (smallest.length < 9 || source < smallest[8])) {
71
+ smallest = [...smallest, source].sort((a, b) => a - b).slice(0, 9);
72
+ }
73
+ }
74
+ tally.counts[i + 1] = count;
75
+ tally.unlocated[i + 1] = unlocated;
76
+ tally.smallest[i + 1] = smallest;
77
+ });
78
+ }
79
+ let count = tally.counts[drop], unlocated = tally.unlocated[drop] === 1, sources = tally.smallest[drop];
80
+ if (end > drop && tier > 0) {
81
+ level(tier);
82
+ const empty = emptied[tier], counts = emptyCounts[tier];
83
+ count += counts[end] - counts[drop];
84
+ if (counts[end] > counts[drop]) {
85
+ // Text blocks of one message share a locator: collect distinct ones, enough to tell whether the shown list is complete.
86
+ const extra = new Set();
87
+ for (let i = drop; i < end && (extra.size < 9 || !unlocated); i++)
88
+ if (empty[i]) {
89
+ const source = units[i].sourceIndex;
90
+ if (source === undefined)
91
+ unlocated = true;
92
+ else if (extra.size < 9)
93
+ extra.add(source);
94
+ }
95
+ sources = [...new Set([...sources, ...extra])].sort((a, b) => a - b).slice(0, 9);
96
+ }
97
+ }
98
+ return count ? decorate(omissionRecord(role, count, sources, unlocated)) : undefined;
99
+ };
100
+ const omissionCosts = new Map();
101
+ const omissionCost = (setting) => {
102
+ const key = `${setting.drop}:${setting.tier}:${setting.end}`;
103
+ let cost = omissionCosts.get(key);
104
+ if (cost === undefined) {
105
+ const record = omission(setting);
106
+ omissionCosts.set(key, cost = record ? rendered([record]).cost : 0);
107
+ }
108
+ return cost;
109
+ };
110
+ return {
111
+ n, level, sum, omission,
112
+ cost: ({ drop, tier, end }) => sums[0][n] - sums[0][Math.max(drop, end)] + (end > drop ? sum(tier)[end] - sum(tier)[drop] : 0) + omissionCost({ drop, tier, end }),
113
+ };
114
+ };
115
+ /** The units of a dialogue and what any configuration of them renders, by arithmetic over per-unit lengths or as the summary text. */
116
+ const createDialogue = (input) => {
117
+ const dialogue = input.blocks.filter(isDialogue);
118
+ const times = dialogue.find(block => block.sourceTimes)?.sourceTimes;
119
+ const decorate = (record) => decorateRecord(record, times);
120
+ const lanes = Object.fromEntries(ROLES.map(role => [role, createLane(role, dialogue.filter(block => block.kind === role), input.mandatorySourceIndices, decorate)]));
121
+ const seen = { user: 0, assistant: 0, notice: 0 };
122
+ const order = dialogue.map(block => ({ role: block.kind, i: seen[block.kind]++ }));
123
+ const tools = input.blocks.length > dialogue.length ? rendered([TOOLS_OMITTED]) : undefined;
124
+ const overhead = TRANSCRIPT_HEADER.length + DIALOGUE_SUFFIX.length;
125
+ /** The length of the summary text of a configuration: its header, one line per record, and the closing section; 0 when it has no record. */
126
+ const size = (config) => {
127
+ const cost = ROLES.reduce((n, role) => n + lanes[role].cost(config[role]), tools?.cost ?? 0);
128
+ return cost === 0 ? 0 : overhead + cost;
129
+ };
130
+ const text = (config) => {
131
+ const records = [];
132
+ for (const { role, i } of order) {
133
+ const { drop, tier, end } = config[role];
134
+ if (i >= drop)
135
+ records.push(...lanes[role].level(i < end ? tier : 0)[i].records);
136
+ }
137
+ for (const role of ROLES) {
138
+ const record = lanes[role].omission(config[role]);
139
+ if (record)
140
+ records.push(record);
141
+ }
142
+ if (tools)
143
+ records.push(...tools.records);
144
+ orderByOriginalSource(records, input.sourceIndices, input.sourceEntryIds);
145
+ return records.length ? serializeTranscript(records) + DIALOGUE_SUFFIX : "";
146
+ };
147
+ return { lanes, size, text };
148
+ };
149
+ /** The whole pre-cut dialogue: user, assistant and notice records; tool actions and observations are omitted. "" when it renders nothing. */
150
+ export const wholeDialogue = (input) => {
151
+ const { text } = createDialogue(input);
152
+ return text({ user: WHOLE, assistant: WHOLE, notice: WHOLE });
153
+ };
154
+ /**
155
+ * The same dialogue shrunk until its summary text is at most `limit` characters, oldest first. The first configuration that fits wins:
156
+ * A. the newest k assistant units whole, the older ones clipped to tier 1, 2, 3 (the largest k that fits, for each tier in turn);
157
+ * B. the newest assistant units that fit a third of the limit whole, the older ones at tier 3 with the oldest d dropped;
158
+ * C. the newest assistant units that fit a third of the limit at tier 3, the rest dropped; then the oldest u user units clipped to tier 1, 2, 3;
159
+ * D. every user unit at tier 3, the oldest dropped;
160
+ * E. the oldest notices dropped, then the oldest of the remaining assistant units.
161
+ * Every step is a one-parameter family whose size is read from prefix sums of the per-unit lengths, so a step costs O(units). A notice is clipped
162
+ * to its one tier in every configuration but the whole dialogue. The size is arithmetic over unit lengths; the rendered text has the last say:
163
+ * a configuration whose text is over the limit is passed over.
164
+ */
165
+ export const shrinkDialogue = (input, limit) => {
166
+ const { lanes, size, text } = createDialogue(input);
167
+ const { user, assistant, notice } = lanes;
168
+ const clipped = { drop: 0, tier: 1, end: notice.n };
169
+ const found = (step, config) => {
170
+ const length = size(config);
171
+ if (length > limit)
172
+ return undefined;
173
+ const summary = text(config);
174
+ return summary.length <= limit ? { text: summary, step, size: length } : undefined;
175
+ };
176
+ const gone = (lane) => ({ drop: lane.n, tier: 3, end: lane.n });
177
+ const tiers = [1, 2, 3];
178
+ let hit = found("whole", { user: WHOLE, assistant: WHOLE, notice: WHOLE });
179
+ if (hit)
180
+ return hit;
181
+ for (const t of tiers)
182
+ for (let k = assistant.n; k >= 0; k--)
183
+ if (hit = found(`A${t}`, { user: WHOLE, assistant: { drop: 0, tier: t, end: assistant.n - k }, notice: clipped }))
184
+ return hit;
185
+ // The newest assistant units that fit a third of the limit whole are kept until users have given way: B clips and drops only older ones.
186
+ // A clip can keep no text at all, so the third is sized on whole units; when the newest alone is over the third, it keeps its largest clip
187
+ // that fits and still has text.
188
+ let kept = 0;
189
+ while (kept < assistant.n && assistant.sum(0)[assistant.n] - assistant.sum(0)[kept] > limit / 3)
190
+ kept++;
191
+ let recent = { drop: kept, tier: 3, end: kept };
192
+ if (kept === assistant.n && assistant.n > 0)
193
+ for (const t of tiers) {
194
+ const cost = assistant.level(t)[assistant.n - 1].cost;
195
+ if (cost > 0 && cost <= limit / 3) {
196
+ recent = { drop: assistant.n - 1, tier: t, end: assistant.n };
197
+ break;
198
+ }
199
+ }
200
+ for (let d = 0; d <= recent.drop; d++)
201
+ if (hit = found("B", { user: WHOLE, assistant: { ...recent, drop: d }, notice: clipped }))
202
+ return hit;
203
+ // From here users give way, and the assistant keeps only that recent third.
204
+ for (const t of tiers)
205
+ for (let u = 0; u <= user.n; u++)
206
+ if (hit = found(`C${t}`, { user: { drop: 0, tier: t, end: u }, assistant: recent, notice: clipped }))
207
+ return hit;
208
+ for (let d = 0; d <= user.n; d++)
209
+ if (hit = found("D", { user: { drop: d, tier: 3, end: user.n }, assistant: recent, notice: clipped }))
210
+ return hit;
211
+ for (let d = 0; d <= notice.n; d++)
212
+ if (hit = found("E1", { user: gone(user), assistant: recent, notice: { drop: d, tier: 1, end: notice.n } }))
213
+ return hit;
214
+ for (let d = recent.drop; d <= assistant.n; d++)
215
+ if (hit = found("E2", { user: gone(user), assistant: { ...recent, drop: d }, notice: gone(notice) }))
216
+ return hit;
217
+ return { text: "", step: "none", size: 0 };
218
+ };
@@ -1,8 +1,7 @@
1
1
  import type { CompilerMessage } from "../types.js";
2
- import { type BriefRankingOptions } from "./rank.js";
3
- export interface RankedCompileInput {
2
+ export interface CompileInput {
4
3
  messages: CompilerMessage[];
5
- /** Eligible original branch only; receipt identity/order, not extra ranked content. */
4
+ /** Eligible original branch only: receipt identity and order. */
6
5
  receiptContext?: {
7
6
  messages: CompilerMessage[];
8
7
  sourceIndices: Array<number | undefined>;
@@ -12,10 +11,19 @@ export interface RankedCompileInput {
12
11
  /** Actual native entry IDs parallel to originals, not inferred from text. */
13
12
  sourceEntryIds?: readonly string[];
14
13
  sourceTimes?: readonly import("./source-time.js").SourceTime[];
15
- ranking?: BriefRankingOptions;
14
+ ranking?: {
15
+ /** The complete serialized length a summary of the dialogue may have, header and closing section included. */
16
+ maxBriefChars?: number;
17
+ /** Full sources rendered separately by the caller: they render as nothing here. */
18
+ mandatorySourceIndices?: ReadonlySet<number>;
19
+ };
16
20
  }
17
- /** Select eligible originals once. No inferred state or prior-view merging. */
18
- export declare const compileRanked: (input: RankedCompileInput) => string;
19
21
  /** The whole pre-cut dialogue: user, assistant and notice records; tool actions and observations are omitted.
20
22
  * This disposable view grants neither present authority nor native tool execution. */
21
- export declare const compileDialogue: (input: RankedCompileInput) => string;
23
+ export declare const compileDialogue: (input: CompileInput) => string;
24
+ /** The dialogue shrunk to `ranking.maxBriefChars`, oldest assistant text first (see `shrinkDialogue`); "" when nothing fits. */
25
+ export declare const compileShrunkDialogue: (input: CompileInput & {
26
+ ranking: {
27
+ maxBriefChars: number;
28
+ };
29
+ }) => string;
@@ -1,27 +1,22 @@
1
- import { orderByOriginalSource } from "./source-order.js";
2
1
  import { normalize } from "./normalize.js";
3
2
  import { filterNoise } from "./filter-noise.js";
4
- import { compileBrief, planBrief, buildBriefRecords } from "./brief.js";
5
- import { DIALOGUE_SUFFIX, RANKED_SUFFIX } from "./format.js";
6
- import { parseRecords, serializeTranscript } from "./transcript.js";
7
- import { selectRankedBriefBlocks } from "./rank.js";
8
- /** Select eligible originals once. No inferred state or prior-view merging. */
9
- export const compileRanked = (input) => {
10
- const blocks = filterNoise(normalize(input.messages, input.sourceIndices, input.receiptContext, input.sourceEntryIds, input.sourceTimes));
11
- const selected = selectRankedBriefBlocks(blocks, input.ranking);
12
- const transcript = serializeTranscript(parseRecords(compileBrief(selected)));
13
- return transcript ? transcript + RANKED_SUFFIX : "";
3
+ import { shrinkDialogue, wholeDialogue } from "./shrink.js";
4
+ // A cut offers the whole dialogue and then, when it does not fit, the shrunk one, from the same input: normalize it once. The blocks are
5
+ // never mutated, and keeping the same objects also keeps their cached passage analyses.
6
+ const inputs = new WeakMap();
7
+ const dialogueInput = (input) => {
8
+ let prepared = inputs.get(input);
9
+ if (!prepared)
10
+ inputs.set(input, prepared = {
11
+ blocks: filterNoise(normalize(input.messages, input.sourceIndices, input.receiptContext, input.sourceEntryIds, input.sourceTimes)),
12
+ mandatorySourceIndices: input.ranking?.mandatorySourceIndices,
13
+ sourceIndices: input.sourceIndices ?? input.messages.map((_, index) => index),
14
+ sourceEntryIds: input.sourceEntryIds,
15
+ });
16
+ return prepared;
14
17
  };
15
18
  /** The whole pre-cut dialogue: user, assistant and notice records; tool actions and observations are omitted.
16
19
  * This disposable view grants neither present authority nor native tool execution. */
17
- export const compileDialogue = (input) => {
18
- const originals = filterNoise(normalize(input.messages, input.sourceIndices, input.receiptContext, input.sourceEntryIds, input.sourceTimes));
19
- const blocks = originals.filter(block => ["user", "assistant", "notice"].includes(block.kind));
20
- planBrief(blocks, new Set(blocks), originals, input.ranking?.mandatorySourceIndices);
21
- const records = buildBriefRecords(blocks);
22
- if (blocks.length < originals.length)
23
- records.push({ kind: "omission",
24
- reason: "Historical tool actions and observations omitted; read original sources with tuck_recall" });
25
- orderByOriginalSource(records, input.sourceIndices ?? input.messages.map((_, index) => index), input.sourceEntryIds);
26
- return records.length ? serializeTranscript(records) + DIALOGUE_SUFFIX : "";
27
- };
20
+ export const compileDialogue = (input) => wholeDialogue(dialogueInput(input));
21
+ /** The dialogue shrunk to `ranking.maxBriefChars`, oldest assistant text first (see `shrinkDialogue`); "" when nothing fits. */
22
+ export const compileShrunkDialogue = (input) => shrinkDialogue(dialogueInput(input), input.ranking.maxBriefChars).text;
@@ -24,6 +24,7 @@ interface RecordFields {
24
24
  count?: number;
25
25
  title?: string;
26
26
  }
27
+ /** The tool_call, tool_receipt, tool_excerpt and bash kinds are v1 only: summaries saved by earlier builds hold them, and this build no longer writes them. */
27
28
  export type TranscriptRecord = RecordFields & ({
28
29
  kind: "excerpt";
29
30
  role: "user" | "assistant" | "custom";
@@ -73,23 +74,33 @@ export type TranscriptRecord = RecordFields & ({
73
74
  title: string;
74
75
  text: string;
75
76
  });
76
- export declare const TRANSCRIPT_HEADER = "TUCK-TRANSCRIPT/1";
77
- export declare const TRANSCRIPT_UNIT_CHARACTERS = 120;
78
- /** UTF-16 serialized characters, including JSON escapes, labels and framing. */
79
- export declare const lineUnits: (characters: number) => number;
80
- export declare const transcriptUnits: (text: string) => number;
81
- export declare const serializeRecords: (records: TranscriptRecord[]) => string;
82
- export declare const serializeTranscript: (records: TranscriptRecord[]) => string;
77
+ /** The format this build writes. */
78
+ export declare const TRANSCRIPT_HEADER = "TUCK-TRANSCRIPT/2";
79
+ /** The format of 1.0.x summaries: one JSON object per line. Read, never written. */
80
+ export declare const TRANSCRIPT_HEADER_V1 = "TUCK-TRANSCRIPT/1";
81
+ /** The header of summaries saved before the rename to pi-tuck: the v1 format. */
82
+ export declare const LEGACY_TRANSCRIPT_HEADER = "VCC-TRANSCRIPT/1";
83
+ export type TranscriptVersion = 1 | 2;
84
+ /** The header a summary of `version` is written with; a legacy one is rewritten as v1. */
85
+ export declare const transcriptHeader: (version: TranscriptVersion) => string;
83
86
  /** Starts a summary's closing section, after the record lines. */
84
87
  export declare const CLOSING_SEPARATOR = "\n\n---\n\n";
85
- /** A summary in this format, split by structure: each record is one JSON line, so the first blank line after the header starts the
86
- * closing section. Any closing wording, from this build or an earlier one, is accepted; the records are returned byte for byte. */
88
+ /** A summary in either format, split by structure: each record is one line, and no record line is empty, so the first blank line after the
89
+ * header starts the closing section. Any closing wording, from this build or an earlier one, is accepted; the records are returned byte
90
+ * for byte, with the format their header names. */
87
91
  export declare const splitSummary: (summary: string) => {
88
92
  body: string;
89
93
  closing: string;
94
+ version: TranscriptVersion;
90
95
  } | undefined;
91
- /** The header of summaries saved before the rename to pi-tuck. */
92
- export declare const LEGACY_TRANSCRIPT_HEADER = "VCC-TRANSCRIPT/1";
93
- /** Accept our explicit record protocol only. Never recover roles from payload text. */
94
- export declare const parseRecords: (text: string) => TranscriptRecord[];
96
+ /** The length of `text` as a record line carries it: one character more for each "\", line feed and carriage return. */
97
+ export declare const escapedLength: (text: string) => number;
98
+ /** One record as a line of TUCK-TRANSCRIPT/2 (without its newline). The records this build emits only: a record whose fields the grammar
99
+ * cannot carry exactly is refused, never written lossily. */
100
+ export declare const serializeRecord: (record: TranscriptRecord) => string;
101
+ export declare const serializeRecords: (records: TranscriptRecord[]) => string;
102
+ export declare const serializeTranscript: (records: TranscriptRecord[]) => string;
103
+ /** Accept our explicit record protocol only. Never recover roles from payload text. `version` is the summary header's: v1 reads one JSON
104
+ * object per line, v2 the lines described above. Left out, it is taken from the first line, which a v1 record always begins with "{" and a v2 never. */
105
+ export declare const parseRecords: (text: string, version?: TranscriptVersion) => TranscriptRecord[];
95
106
  export {};