@guuey/threads 0.31.1 → 0.33.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/dist/seal.js ADDED
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Sealed conversations: how a reader tells which messages of a thread the
3
+ * app's operator may not read.
4
+ *
5
+ * A thread may carry seal intervals ({@link ThreadRow.sealIntervals}). Each
6
+ * one covers the messages from `fromSeq` to `toSeq`, both inclusive; an
7
+ * interval without `toSeq` is still open, so it also covers every message
8
+ * written after it. The writer records the intervals in the same atomic
9
+ * update that allocates a message's seq, so a boundary always falls between
10
+ * two messages.
11
+ *
12
+ * The rules every reader applies:
13
+ *
14
+ * - no `sealIntervals` attribute: a legacy thread, wholly readable;
15
+ * - a well-formed list: a message is sealed when any interval covers its seq;
16
+ * - an attribute that is present but not a well-formed list: the reader
17
+ * cannot tell which messages it covers, so the WHOLE thread reads as
18
+ * sealed (fail closed, never open).
19
+ *
20
+ * The functions here are pure. They take the stored attribute as it came off
21
+ * the row, so a reader never trusts a shape it did not check.
22
+ */
23
+ import { createHash } from "node:crypto";
24
+ function isSeq(value) {
25
+ return typeof value === "number" && Number.isInteger(value) && value >= 1;
26
+ }
27
+ function readInterval(value) {
28
+ if (typeof value !== "object" || value === null || Array.isArray(value))
29
+ return undefined;
30
+ if (!("fromSeq" in value))
31
+ return undefined;
32
+ const fromSeq = value.fromSeq;
33
+ if (!isSeq(fromSeq))
34
+ return undefined;
35
+ const toSeq = "toSeq" in value ? value.toSeq : undefined;
36
+ if (toSeq === undefined)
37
+ return { fromSeq };
38
+ if (!isSeq(toSeq) || toSeq < fromSeq)
39
+ return undefined;
40
+ return { fromSeq, toSeq };
41
+ }
42
+ /**
43
+ * Check a stored `sealIntervals` attribute. Absent (`undefined` or `null`) is
44
+ * a legacy thread; anything else must be an array of well-formed intervals,
45
+ * or the whole thread reads as sealed.
46
+ */
47
+ export function readSealState(stored) {
48
+ if (stored === undefined || stored === null)
49
+ return { kind: "none" };
50
+ if (!Array.isArray(stored))
51
+ return { kind: "unreadable" };
52
+ const intervals = [];
53
+ for (const entry of stored) {
54
+ const interval = readInterval(entry);
55
+ if (interval === undefined)
56
+ return { kind: "unreadable" };
57
+ intervals.push(interval);
58
+ }
59
+ return { kind: "intervals", intervals };
60
+ }
61
+ /** Whether the message at `seq` is sealed under `state`. */
62
+ export function isSeqSealed(state, seq) {
63
+ if (state.kind === "none")
64
+ return false;
65
+ if (state.kind === "unreadable")
66
+ return true;
67
+ return state.intervals.some((interval) => seq >= interval.fromSeq && (interval.toSeq === undefined || seq <= interval.toSeq));
68
+ }
69
+ /**
70
+ * Whether ANY part of the thread is, or was, sealed. A copy built from the
71
+ * whole conversation (a model-written summary, a report) is refused when this
72
+ * is true, since it may carry sealed messages whatever message triggered it.
73
+ */
74
+ export function hasSealedPart(state) {
75
+ if (state.kind === "none")
76
+ return false;
77
+ if (state.kind === "unreadable")
78
+ return true;
79
+ return state.intervals.length > 0;
80
+ }
81
+ /**
82
+ * The digest a writer stores beside a preview (`lastMessagePreviewDigest`), in
83
+ * the same update that sets the preview and its source seq. It binds the seq to
84
+ * the text: a writer that replaces the preview without stamping its seq (one
85
+ * from before the stamp) leaves a digest that no longer matches, so a reader
86
+ * cannot mistake the old seq for the new text's source.
87
+ */
88
+ export function previewDigest(preview) {
89
+ return createHash("sha256").update(preview, "utf8").digest("hex").slice(0, 32);
90
+ }
91
+ /**
92
+ * The preview an operator-side reader may show: the stored preview, or `''`
93
+ * when the message it was taken from is sealed. On a thread with any sealed
94
+ * part, a preview whose source the reader cannot place is withheld too: no
95
+ * recorded seq, or a digest absent or not matching the stored text (an older
96
+ * writer replaced the text and left the previous seq beside it). A thread with
97
+ * no sealed part shows its preview as stored.
98
+ *
99
+ * One case reads as placed though it is not: an older writer that stored the
100
+ * very same text again. The text is then that of the stamped, readable
101
+ * message, so nothing new is shown.
102
+ */
103
+ export function readableThreadPreview(row) {
104
+ const preview = row.lastMessagePreview ?? "";
105
+ if (preview.length === 0)
106
+ return "";
107
+ const state = readSealState(row.sealIntervals);
108
+ if (!hasSealedPart(state))
109
+ return preview;
110
+ const source = row.lastMessagePreviewSeq;
111
+ if (!isSeq(source))
112
+ return "";
113
+ if (row.lastMessagePreviewDigest !== previewDigest(preview))
114
+ return "";
115
+ return isSeqSealed(state, source) ? "" : preview;
116
+ }
117
+ /** {@link readSealState} over a typed {@link ThreadRow}. */
118
+ export function threadSealState(row) {
119
+ return readSealState(row.sealIntervals);
120
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * guuey#2120 — the thread snapshot is planned against the store's
3
+ * {@link RowBudget} before a turn writes any row, the way guuey#1794 plans the
4
+ * rows. A snapshot carrying a value its store cannot hold used to fail
5
+ * `putSnapshot` AFTER the rows were written: the turn's sentinel was already
6
+ * claimed, so the snapshot was never retried, and a `workingState` value the
7
+ * next turn re-wrote failed every later snapshot too.
8
+ *
9
+ * The plan never fails. What cannot be stored is left out, and said so:
10
+ *
11
+ * - a `workingState` carrying a number the store cannot hold is refused as
12
+ * one update: the snapshot keeps the state the turn was seeded with;
13
+ * - a thread-memory element carrying such a number is left out;
14
+ * - over the size budget, the turn's working state is refused first (it is
15
+ * one opaque blob) when the seeded state is smaller, so the swap shrinks
16
+ * the row; then the thread-memory records this turn wrote or
17
+ * changed are left out, largest first. A record stored unchanged from the
18
+ * prior snapshot, and every carried element, stays: they were stored before.
19
+ * - a snapshot that still does not fit is not written; the prior one stands.
20
+ *
21
+ * Pure: no I/O. Counts only in the report, never a value.
22
+ */
23
+ import type { AgMemoryRecord, JsonValue } from "@silverprotocol/core";
24
+ import type { RowBudget, ThreadSnapshotRow } from "./rows.js";
25
+ /** Why part of a snapshot was not stored: a number its store cannot hold, or its size. */
26
+ export type SnapshotRefusalReason = "number" | "size";
27
+ /** What a planned snapshot left out (guuey#2120). Counts only. */
28
+ export interface SnapshotRefusal {
29
+ /**
30
+ * The turn's working state was not stored, and why. The snapshot keeps the
31
+ * state the turn was seeded with ({@link PlanSnapshotInput.priorWorkingState}),
32
+ * or none when it had none.
33
+ */
34
+ state?: SnapshotRefusalReason;
35
+ /** Thread-memory elements left out because they carried a number the store cannot hold. */
36
+ memoryNumber: number;
37
+ /** Thread-memory records this turn wrote, left out so the snapshot fits. */
38
+ memorySize: number;
39
+ /** True when the snapshot could not fit even so and is not written: the prior snapshot stands. */
40
+ notWritten: boolean;
41
+ }
42
+ export interface PlanSnapshotInput {
43
+ /** The snapshot the turn would write. */
44
+ row: ThreadSnapshotRow;
45
+ /** The working state the turn was seeded with; absent = none. */
46
+ priorWorkingState?: JsonValue;
47
+ /** The thread records the turn was seeded with (`keepUnchangedThreadMemory` keeps an unchanged one by identity). */
48
+ priorThreadMemory?: readonly AgMemoryRecord[];
49
+ }
50
+ export interface PlannedSnapshot {
51
+ /** The snapshot to write, or `undefined` when it cannot be stored at all. */
52
+ row: ThreadSnapshotRow | undefined;
53
+ /** Set when anything was left out. */
54
+ refusal?: SnapshotRefusal;
55
+ }
56
+ /**
57
+ * Plan `input.row` under `budget` (see the module comment). Without a budget
58
+ * the row is returned as it is.
59
+ */
60
+ export declare function planSnapshot(input: PlanSnapshotInput, budget: RowBudget | undefined): PlannedSnapshot;
61
+ //# sourceMappingURL=snapshot-plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot-plan.d.ts","sourceRoot":"","sources":["../src/snapshot-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9D,0FAA0F;AAC1F,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEtD,kEAAkE;AAClE,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,2FAA2F;IAC3F,YAAY,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,kGAAkG;IAClG,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,GAAG,EAAE,iBAAiB,CAAC;IACvB,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,oHAAoH;IACpH,iBAAiB,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,GAAG,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACnC,sCAAsC;IACtC,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAQD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,eAAe,CA4DrG"}
@@ -0,0 +1,71 @@
1
+ import { carriesUnfitNumber, jsonEqual } from "./fold-rows.js";
2
+ /** `row` with `workingState` set to `state`, or without it when `state` is undefined. */
3
+ function withState(row, state) {
4
+ const { workingState: _dropped, ...rest } = row;
5
+ return state === undefined ? rest : { ...rest, workingState: state };
6
+ }
7
+ /**
8
+ * Plan `input.row` under `budget` (see the module comment). Without a budget
9
+ * the row is returned as it is.
10
+ */
11
+ export function planSnapshot(input, budget) {
12
+ if (budget === undefined)
13
+ return { row: input.row };
14
+ const fits = budget.numberFits;
15
+ const unfit = (value) => fits !== undefined && carriesUnfitNumber(value, fits);
16
+ // The seeded state was read back from the store, so it can be stored; the
17
+ // check only keeps a binding that held an unfit one from writing it again.
18
+ const prior = unfit(input.priorWorkingState) ? undefined : input.priorWorkingState;
19
+ let state;
20
+ let row = input.row;
21
+ if (row.workingState !== undefined && unfit(row.workingState)) {
22
+ state = "number";
23
+ row = withState(row, prior);
24
+ }
25
+ let memoryNumber = 0;
26
+ const threadMemory = row.threadMemory.filter((rec) => {
27
+ if (!unfit(rec))
28
+ return true;
29
+ memoryNumber++;
30
+ return false;
31
+ });
32
+ const carried = (row.carriedThreadMemory ?? []).filter((el) => {
33
+ if (!unfit(el))
34
+ return true;
35
+ memoryNumber++;
36
+ return false;
37
+ });
38
+ const { carriedThreadMemory: _carried, ...rest } = row;
39
+ row = { ...rest, threadMemory, ...(carried.length > 0 ? { carriedThreadMemory: carried } : {}) };
40
+ let memorySize = 0;
41
+ if (budget.bytesOf(row) > budget.maxBytes && state === undefined && !jsonEqual(row.workingState, prior)) {
42
+ // Only a swap that shrinks the row: a prior state larger than this turn's
43
+ // would grow it, drop more records than needed and lose a state that fits.
44
+ const swapped = withState(row, prior);
45
+ if (budget.bytesOf(swapped) < budget.bytesOf(row)) {
46
+ state = "size";
47
+ row = swapped;
48
+ }
49
+ }
50
+ if (budget.bytesOf(row) > budget.maxBytes) {
51
+ const seeded = new Set(input.priorThreadMemory ?? []);
52
+ const written = row.threadMemory
53
+ .filter((rec) => !seeded.has(rec))
54
+ .map((rec) => ({ rec, bytes: budget.bytesOf({ threadId: "", userId: "", updatedAt: "", threadMemory: [rec] }) }))
55
+ .sort((a, b) => b.bytes - a.bytes);
56
+ for (const { rec } of written) {
57
+ memorySize++;
58
+ row = { ...row, threadMemory: row.threadMemory.filter((r) => r !== rec) };
59
+ if (budget.bytesOf(row) <= budget.maxBytes)
60
+ break;
61
+ }
62
+ }
63
+ const notWritten = budget.bytesOf(row) > budget.maxBytes;
64
+ const refused = state !== undefined || memoryNumber > 0 || memorySize > 0 || notWritten;
65
+ return {
66
+ row: notWritten ? undefined : row,
67
+ ...(refused
68
+ ? { refusal: { ...(state !== undefined ? { state } : {}), memoryNumber, memorySize, notWritten } }
69
+ : {}),
70
+ };
71
+ }
package/dist/store.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import type { AgMemoryRecord, AgReduceResult, JsonValue } from "@silverprotocol/core";
2
- import type { ThreadMessageEvent, StoredHistoryMessage, ThreadMessageKind, ThreadMessageRole, ThreadPersistencePort, ThreadSnapshotRow, TurnOrigin, ClientClass } from "./rows.js";
2
+ import { type ElidedField, type ElisionReason, type RefusedRowKind } from "./fold-rows.js";
3
+ import { type SnapshotRefusal } from "./snapshot-plan.js";
4
+ import { type TapLabels } from "@guuey/mcp-apps-host/narrowing";
5
+ import type { ThreadMessageEvent, StoredHistoryMessage, ThreadMessageKind, ThreadMessageRole, ThreadClosure, ThreadPersistencePort, ThreadSnapshotRow, TurnOrigin, ClientClass, ThreadInputKind } from "./rows.js";
3
6
  export interface EnsureThreadInput {
4
7
  /** Client-supplied thread id (localStorage). Absent on first contact. */
5
8
  threadId?: string;
@@ -35,10 +38,21 @@ export interface AppendMessageInput {
35
38
  event?: ThreadMessageEvent;
36
39
  /** A user row's origin (see {@link ThreadMessageRow.turnOrigin}); carried verbatim. */
37
40
  turnOrigin?: TurnOrigin;
41
+ /** guuey#2549: a user row whose empty text means its content rode on the page context; carried verbatim. */
42
+ inputKind?: ThreadInputKind;
38
43
  /** A `card_action` user row's answered card session id; carried verbatim. */
39
44
  answeredCardSessionId?: string;
40
45
  /** A user row's client class (see {@link ThreadMessageRow.clientClass}); carried verbatim. */
41
46
  clientClass?: ClientClass;
47
+ /**
48
+ * A card-action user row's tap labels (see {@link ThreadMessageRow.tapLabels}).
49
+ * The store re-judges them by the writer contract (`writeTapLabels`) before
50
+ * it writes: a list the contract refuses is not stored (the row lands
51
+ * without the key, so it draws the continuation copy), and an admitted one is
52
+ * stored as the writer's fresh copy. The reader contract is a display guard,
53
+ * never a store's check.
54
+ */
55
+ tapLabels?: TapLabels;
42
56
  }
43
57
  export interface AppendMessageResult {
44
58
  seq: number;
@@ -77,7 +91,55 @@ export interface AppendFoldInput {
77
91
  * the fold's rebuild of it. Absent = the fold's records as they are.
78
92
  */
79
93
  priorThreadMemory?: readonly AgMemoryRecord[];
94
+ /**
95
+ * guuey#2120: the prior snapshot's `workingState`: the state the reducer was
96
+ * seeded with. When the turn's state cannot be stored (a number its store
97
+ * cannot hold, or a snapshot over the row budget), the snapshot keeps this
98
+ * one instead and the result reports `refusedSnapshot.state`. Absent = none.
99
+ */
100
+ priorWorkingState?: JsonValue;
101
+ /**
102
+ * guuey#1794: what to store when a row of this turn cannot be stored even
103
+ * with its tool-call values elided: it does not fit the store's row budget,
104
+ * or it carries a number the store cannot hold. Given, the turn is stored
105
+ * as ONE agent row carrying this text and the failure code
106
+ * `stored_turn_too_large` or `stored_turn_unstorable_number` (under the
107
+ * turn sentinel, so the turn is final), and the result reports
108
+ * `unstorable`. Absent, `appendFold` throws the refusal
109
+ * ({@link StoredRowTooLargeError} or `StoredRowUnstorableNumberError`).
110
+ * Either way no other row of the turn is written.
111
+ */
112
+ unstorableNotice?: {
113
+ text: string;
114
+ };
80
115
  }
116
+ /** One value stored as the elided marker (guuey#1794); see {@link ElidedField}. */
117
+ export interface ElidedToolInput {
118
+ /** The seq of the message row that carries the marker. */
119
+ seq: number;
120
+ toolCallId: string;
121
+ /** The tool's name (for a `uiData` elision, the name its card row stores). */
122
+ name: string;
123
+ field: ElidedField;
124
+ reason: ElisionReason;
125
+ /** UTF-8 length of the elided value's JSON. */
126
+ bytes: number;
127
+ }
128
+ /** The turn was stored as its one failure row (see {@link AppendFoldInput.unstorableNotice}). */
129
+ export type AppendFoldUnstorable = {
130
+ /** The failure row's seq. */
131
+ seq: number;
132
+ /** The first row that could not be stored. */
133
+ rowKind: RefusedRowKind;
134
+ index: number;
135
+ } & ({
136
+ reason: 'size';
137
+ /** That row as its store measured it. */
138
+ bytes: number;
139
+ maxBytes: number;
140
+ } | {
141
+ reason: 'number';
142
+ });
81
143
  export interface AppendFoldResult {
82
144
  messageSeqs: number[];
83
145
  artifactSeqs: number[];
@@ -88,7 +150,26 @@ export interface AppendFoldResult {
88
150
  * WHOLE fold-persist was short-circuited (no rows written this call).
89
151
  */
90
152
  deduped: boolean;
153
+ /**
154
+ * Values stored as the elided marker so their rows fit (tool-call inputs, and
155
+ * tool-result UI resources a card row of the turn carries); `[]` when none.
156
+ */
157
+ elidedToolInputs: ElidedToolInput[];
158
+ /** Set when the turn was stored as its one failure row instead of its rows. */
159
+ unstorable?: AppendFoldUnstorable;
160
+ /**
161
+ * guuey#2120: set when part of the turn's snapshot could not be stored and
162
+ * was left out (planned before any row was written; see `planSnapshot`).
163
+ */
164
+ refusedSnapshot?: SnapshotRefusal;
91
165
  }
166
+ /** The failure code of a turn stored as one row because it could not fit (guuey#1794). */
167
+ export declare const STORED_TURN_TOO_LARGE_CODE = "stored_turn_too_large";
168
+ /**
169
+ * The failure code of a turn stored as one row because a row of it carried a
170
+ * number its store cannot hold, outside any tool-call value (guuey#1794).
171
+ */
172
+ export declare const STORED_TURN_UNSTORABLE_NUMBER_CODE = "stored_turn_unstorable_number";
92
173
  export declare class ThreadStore {
93
174
  private readonly db;
94
175
  constructor(db: ThreadPersistencePort);
@@ -105,6 +186,9 @@ export declare class ThreadStore {
105
186
  * continues on a new conversation) AND safe — the caller never sees another
106
187
  * user's thread, and there's no existence oracle. The pod never honours a
107
188
  * client-chosen id, so squatting is impossible.
189
+ *
190
+ * A CLOSED thread ({@link ThreadRow.closedAt}) is answered the same way: it
191
+ * takes no new message, so a send on it starts a new conversation.
108
192
  */
109
193
  ensureThread(input: EnsureThreadInput): Promise<string>;
110
194
  /**
@@ -113,9 +197,24 @@ export declare class ThreadStore {
113
197
  * exposed for doors that must BIND a client-echoed thread to the verified
114
198
  * caller without minting anything (the pod's consent-answer door binds a
115
199
  * `once` grant to a thread this way — guuey#207). No existence oracle: a
116
- * missing thread and another user's thread are the same `false`.
200
+ * missing thread and another user's thread are the same `false`, and so is
201
+ * a closed one: nothing binds to a conversation that has ended.
117
202
  */
118
203
  ownsThread(threadId: string, userId: string): Promise<boolean>;
204
+ /**
205
+ * Whether this binding can close a thread ({@link ThreadPersistencePort.closeThread}
206
+ * present). A caller that writes something before closing (a closing
207
+ * message) reads this first, so a binding that cannot close is left as it was.
208
+ */
209
+ canCloseThreads(): boolean;
210
+ /**
211
+ * End the conversation (see {@link ThreadRow.closedAt}): `closed` when this
212
+ * call closed it, `already_closed` when it was closed before (the first
213
+ * closure is kept), `unsupported` when the binding cannot close
214
+ * ({@link ThreadPersistencePort.closeThread} absent; nothing changes).
215
+ * Rejects for a missing thread or a store failure.
216
+ */
217
+ closeThread(threadId: string, closure: ThreadClosure): Promise<"closed" | "already_closed" | "unsupported">;
119
218
  /** Prior messages for the thread (seq-ASC, capped to the most recent N). */
120
219
  loadHistory(threadId: string, limit?: number): Promise<StoredHistoryMessage[]>;
121
220
  /**
@@ -143,7 +242,36 @@ export declare class ThreadStore {
143
242
  * Durable (non-thread) memory is logged-and-dropped in v1. `skipSnapshot`
144
243
  * suppresses the snapshot upsert so a degraded/parked fold never overwrites
145
244
  * a good snapshot.
245
+ *
246
+ * The snapshot is planned with the rows, before any row is written
247
+ * (guuey#2120): a working state its store cannot hold is refused (the
248
+ * snapshot keeps `priorWorkingState`), and a memory element that cannot be
249
+ * stored is left out, reported as `refusedSnapshot`. The snapshot write is
250
+ * never the write that fails after the turn's rows landed.
146
251
  */
147
252
  appendFold(input: AppendFoldInput): Promise<AppendFoldResult>;
253
+ /**
254
+ * The snapshot a fold persists (working state + thread memory + last turn),
255
+ * planned under the store's row budget (guuey#2120). Writes nothing.
256
+ * `row` is undefined when `skipSnapshot` is set or the snapshot cannot be
257
+ * stored at all.
258
+ */
259
+ private planFoldSnapshot;
260
+ /** Write a planned snapshot, stamped now (the same length as the provisional stamp it was measured with). */
261
+ private writeSnapshot;
262
+ /**
263
+ * The turn's one row when a row of it cannot be stored: the caller's notice
264
+ * text, under the turn sentinel (so a retry short-circuits and the turn is
265
+ * final), carrying the failure code readers classify as a failed turn
266
+ * (`stored_turn_too_large` with the counts, or `stored_turn_unstorable_number`).
267
+ * No other row of the turn is written.
268
+ */
269
+ private writeUnstorableMarker;
270
+ /**
271
+ * Build every row a fold writes, in write order, with a provisional seq and
272
+ * timestamp, bounded by the store's row budget (throws a
273
+ * {@link StoredRowRefusal} when one cannot be stored). Writes nothing.
274
+ */
275
+ private planFoldRows;
148
276
  }
149
277
  //# sourceMappingURL=store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAWtF,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EAEjB,qBAAqB,EAErB,iBAAiB,EACjB,UAAU,EACV,WAAW,EACZ,MAAM,WAAW,CAAC;AAOnB,MAAM,WAAW,iBAAiB;IAChC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,iBAAiB,CAAC;IACxB,yEAAyE;IACzE,OAAO,EAAE,OAAO,CAAC;IACjB,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,uFAAuF;IACvF,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,6EAA6E;IAC7E,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,8FAA8F;IAC9F,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAA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