@elaraai/e3-types 1.0.79 → 1.0.80

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 (153) hide show
  1. package/README.md +1 -1
  2. package/dist/src/api.d.ts +569 -36
  3. package/dist/src/api.d.ts.map +1 -1
  4. package/dist/src/api.js +257 -32
  5. package/dist/src/api.js.map +1 -1
  6. package/dist/src/collection-manifest.d.ts +37 -0
  7. package/dist/src/collection-manifest.d.ts.map +1 -0
  8. package/dist/src/collection-manifest.js +37 -0
  9. package/dist/src/collection-manifest.js.map +1 -0
  10. package/dist/src/dataflow.d.ts +264 -19
  11. package/dist/src/dataflow.d.ts.map +1 -1
  12. package/dist/src/dataflow.js +156 -15
  13. package/dist/src/dataflow.js.map +1 -1
  14. package/dist/src/dataflow.spec.js +184 -27
  15. package/dist/src/dataflow.spec.js.map +1 -1
  16. package/dist/src/dataset-blob.d.ts +75 -15
  17. package/dist/src/dataset-blob.d.ts.map +1 -1
  18. package/dist/src/dataset-blob.js +95 -28
  19. package/dist/src/dataset-blob.js.map +1 -1
  20. package/dist/src/dataset-blob.spec.d.ts +6 -0
  21. package/dist/src/dataset-blob.spec.d.ts.map +1 -0
  22. package/dist/src/dataset-blob.spec.js +92 -0
  23. package/dist/src/dataset-blob.spec.js.map +1 -0
  24. package/dist/src/dataset-ref.d.ts +5 -4
  25. package/dist/src/dataset-ref.d.ts.map +1 -1
  26. package/dist/src/dataset-ref.js +5 -4
  27. package/dist/src/dataset-ref.js.map +1 -1
  28. package/dist/src/environment.d.ts +3 -2
  29. package/dist/src/environment.d.ts.map +1 -1
  30. package/dist/src/environment.js +3 -2
  31. package/dist/src/environment.js.map +1 -1
  32. package/dist/src/execution.d.ts +112 -18
  33. package/dist/src/execution.d.ts.map +1 -1
  34. package/dist/src/execution.js +174 -45
  35. package/dist/src/execution.js.map +1 -1
  36. package/dist/src/execution.spec.d.ts +6 -0
  37. package/dist/src/execution.spec.d.ts.map +1 -0
  38. package/dist/src/execution.spec.js +108 -0
  39. package/dist/src/execution.spec.js.map +1 -0
  40. package/dist/src/function.d.ts +14 -12
  41. package/dist/src/function.d.ts.map +1 -1
  42. package/dist/src/function.js +17 -32
  43. package/dist/src/function.js.map +1 -1
  44. package/dist/src/index.d.ts +16 -12
  45. package/dist/src/index.d.ts.map +1 -1
  46. package/dist/src/index.js +25 -20
  47. package/dist/src/index.js.map +1 -1
  48. package/dist/src/lock.d.ts +68 -22
  49. package/dist/src/lock.d.ts.map +1 -1
  50. package/dist/src/lock.js +33 -22
  51. package/dist/src/lock.js.map +1 -1
  52. package/dist/src/names.d.ts +21 -0
  53. package/dist/src/names.d.ts.map +1 -0
  54. package/dist/src/names.js +31 -0
  55. package/dist/src/names.js.map +1 -0
  56. package/dist/src/package.d.ts +11 -78
  57. package/dist/src/package.d.ts.map +1 -1
  58. package/dist/src/package.js +13 -66
  59. package/dist/src/package.js.map +1 -1
  60. package/dist/src/record.d.ts +582 -18
  61. package/dist/src/record.d.ts.map +1 -1
  62. package/dist/src/record.js +405 -7
  63. package/dist/src/record.js.map +1 -1
  64. package/dist/src/{stream.spec.d.ts → record.spec.d.ts} +1 -1
  65. package/dist/src/record.spec.d.ts.map +1 -0
  66. package/dist/src/record.spec.js +143 -0
  67. package/dist/src/record.spec.js.map +1 -0
  68. package/dist/src/release.d.ts +36 -0
  69. package/dist/src/release.d.ts.map +1 -0
  70. package/dist/src/release.js +71 -0
  71. package/dist/src/release.js.map +1 -0
  72. package/dist/src/release.spec.d.ts +6 -0
  73. package/dist/src/release.spec.d.ts.map +1 -0
  74. package/dist/src/release.spec.js +42 -0
  75. package/dist/src/release.spec.js.map +1 -0
  76. package/dist/src/repository.d.ts +64 -0
  77. package/dist/src/repository.d.ts.map +1 -0
  78. package/dist/src/repository.js +49 -0
  79. package/dist/src/repository.js.map +1 -0
  80. package/dist/src/runner.d.ts +16 -62
  81. package/dist/src/runner.d.ts.map +1 -1
  82. package/dist/src/runner.js +16 -79
  83. package/dist/src/runner.js.map +1 -1
  84. package/dist/src/runner.spec.js +11 -85
  85. package/dist/src/runner.spec.js.map +1 -1
  86. package/dist/src/structure.d.ts +0 -57
  87. package/dist/src/structure.d.ts.map +1 -1
  88. package/dist/src/structure.js +0 -3
  89. package/dist/src/structure.js.map +1 -1
  90. package/dist/src/task.d.ts +210 -318
  91. package/dist/src/task.d.ts.map +1 -1
  92. package/dist/src/task.js +117 -472
  93. package/dist/src/task.js.map +1 -1
  94. package/dist/src/task.spec.js +62 -154
  95. package/dist/src/task.spec.js.map +1 -1
  96. package/dist/src/transfer.d.ts +16 -22
  97. package/dist/src/transfer.d.ts.map +1 -1
  98. package/dist/src/transfer.js +16 -22
  99. package/dist/src/transfer.js.map +1 -1
  100. package/dist/src/transfer.spec.js +4 -34
  101. package/dist/src/transfer.spec.js.map +1 -1
  102. package/dist/src/unit-plan.d.ts +130 -0
  103. package/dist/src/unit-plan.d.ts.map +1 -0
  104. package/dist/src/unit-plan.js +107 -0
  105. package/dist/src/unit-plan.js.map +1 -0
  106. package/dist/src/unit-plan.spec.d.ts +6 -0
  107. package/dist/src/unit-plan.spec.d.ts.map +1 -0
  108. package/dist/src/unit-plan.spec.js +29 -0
  109. package/dist/src/unit-plan.spec.js.map +1 -0
  110. package/dist/src/workspace.d.ts +22 -11
  111. package/dist/src/workspace.d.ts.map +1 -1
  112. package/dist/src/workspace.js +10 -11
  113. package/dist/src/workspace.js.map +1 -1
  114. package/package.json +3 -3
  115. package/src/api.ts +276 -32
  116. package/src/collection-manifest.ts +53 -0
  117. package/src/dataflow.spec.ts +223 -31
  118. package/src/dataflow.ts +183 -26
  119. package/src/dataset-blob.spec.ts +117 -0
  120. package/src/dataset-blob.ts +157 -21
  121. package/src/dataset-ref.ts +5 -4
  122. package/src/environment.ts +3 -2
  123. package/src/execution.spec.ts +114 -0
  124. package/src/execution.ts +175 -51
  125. package/src/function.ts +19 -32
  126. package/src/index.ts +122 -39
  127. package/src/lock.ts +39 -22
  128. package/src/names.ts +39 -0
  129. package/src/package.ts +15 -71
  130. package/src/record.spec.ts +195 -0
  131. package/src/record.ts +489 -7
  132. package/src/release.spec.ts +47 -0
  133. package/src/release.ts +69 -0
  134. package/src/repository.ts +67 -0
  135. package/src/runner.spec.ts +11 -94
  136. package/src/runner.ts +16 -80
  137. package/src/structure.ts +0 -8
  138. package/src/task.spec.ts +67 -188
  139. package/src/task.ts +140 -522
  140. package/src/transfer.spec.ts +4 -51
  141. package/src/transfer.ts +16 -22
  142. package/src/unit-plan.spec.ts +31 -0
  143. package/src/unit-plan.ts +121 -0
  144. package/src/workspace.ts +13 -11
  145. package/dist/src/stream.d.ts +0 -97
  146. package/dist/src/stream.d.ts.map +0 -1
  147. package/dist/src/stream.js +0 -134
  148. package/dist/src/stream.js.map +0 -1
  149. package/dist/src/stream.spec.d.ts.map +0 -1
  150. package/dist/src/stream.spec.js +0 -60
  151. package/dist/src/stream.spec.js.map +0 -1
  152. package/src/stream.spec.ts +0 -88
  153. package/src/stream.ts +0 -170
@@ -10,12 +10,13 @@
10
10
  * a content-addressed commit object, so a record's history is a git-style chain
11
11
  * — the audit trail of who changed what, when, superseding which state.
12
12
  *
13
- * The record's current state is an ordinary `value` dataset ref (its `hash`
14
- * points at the plain state blob), so every existing read path — task inputs,
15
- * `e3 get`, the UI `Data.bind` read — works on records unchanged. Only the
16
- * write protocol differs.
13
+ * The record's current state is an ordinary `value` dataset ref. Its `hash`
14
+ * names the state or, once the record declares an index, a `$record` state
15
+ * naming it, and every read path resolves it, so task inputs, `e3 get` and the
16
+ * UI `Data.bind` read work on records unchanged. Only the write protocol
17
+ * differs.
17
18
  */
18
- import { StructType, StringType, OptionType, DateTimeType, ArrayType, DictType, ValueTypeOf } from '@elaraai/east';
19
+ import { ArrayType, BooleanType, DateTimeType, DictType, FunctionType, NullType, OptionType, StringType, StructType, VariantType, type EastType, type EastTypeValue, type PatchTypeOf, type ValueTypeOf } from '@elaraai/east';
19
20
  /**
20
21
  * A single commit in a record's history.
21
22
  *
@@ -37,9 +38,58 @@ export declare const RecordCommitType: StructType<{
37
38
  readonly actor: StringType;
38
39
  /** Commit wall-clock time. */
39
40
  readonly at: DateTimeType;
41
+ /** The mutation delta this commit applied: one sorted collection of the
42
+ * primary and index changes, addressed by key. History then shows WHAT
43
+ * changed without diffing two states, and an undo can be synthesised from
44
+ * it. No state depends on it — every state past and present reads
45
+ * identically if every delta were deleted — but it is a collection like any
46
+ * other, a manifest naming segment objects, so a collector walks it as a
47
+ * value rather than marking it as a leaf the way it marks `args`. */
48
+ readonly delta: OptionType<StringType>;
40
49
  }>;
41
50
  export type RecordCommitType = typeof RecordCommitType;
42
51
  export type RecordCommit = ValueTypeOf<typeof RecordCommitType>;
52
+ /**
53
+ * Decode a `RecordCommit`.
54
+ *
55
+ * @remarks
56
+ * Stored state, so it changes by hard cutover: a repository an older e3 wrote
57
+ * is re-created rather than read, and this says so.
58
+ *
59
+ * @param data - the stored bytes
60
+ * @returns the commit
61
+ * @throws {Error} When the bytes are not a current commit — one an older e3
62
+ * wrote, whose repository is re-created.
63
+ */
64
+ export declare function decodeRecordCommit(data: Uint8Array): RecordCommit;
65
+ /**
66
+ * How a mutation says what it changed.
67
+ *
68
+ * - `reduce` — `(State, …Args) => State`, the original surface. Its body and
69
+ * its diff see the whole state, so its RUNNER cost stays O(state); only its
70
+ * write, on a Dict or Set record, is O(touched).
71
+ * - `edit` — `(State, …Args, Edit) => Null`, the lazy write: the body reads the
72
+ * state it is given, lazily, and writes through an `edit` capability, so the
73
+ * body reads only the entries it touches and the commit rewrites only the
74
+ * segments they live in. The state reaches the runner as its manifest, the
75
+ * segments linked, so nothing on the way reads it whole either.
76
+ * - `patch` — no body; the argument is `PatchType(State)`. What an interactive
77
+ * edit from a view sends. On a record with no index a patch of per-key
78
+ * changes runs nothing at all, the only write whose cost is independent of
79
+ * the record's size.
80
+ *
81
+ * @remarks
82
+ * A variant, so a mutation object decodes only with one of these: a form this
83
+ * e3 does not know is refused where the object is read, not run as another.
84
+ */
85
+ export declare const MutationFormType: VariantType<{
86
+ readonly edit: NullType;
87
+ readonly patch: NullType;
88
+ readonly reduce: NullType;
89
+ }>;
90
+ export type MutationFormType = typeof MutationFormType;
91
+ /** A {@link MutationFormType} by its name, as the SDK's definitions carry it. */
92
+ export type MutationForm = ValueTypeOf<typeof MutationFormType>['type'];
43
93
  /**
44
94
  * A mutation: the write half of the function machinery (CQRS — `e3.function`
45
95
  * is the read/query half). A mutation is a pure East reducer
@@ -51,15 +101,15 @@ export declare const MutationObjectType: StructType<{
51
101
  /** Hash of the encoded EastIR bundle (encodeEastIR), like a function's bodyIr. */
52
102
  readonly bodyIr: StringType;
53
103
  /** The EXTRA positional parameter types after the state parameter. */
54
- readonly argTypes: ArrayType<import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
55
- readonly Never: import("@elaraai/east").NullType;
56
- readonly Null: import("@elaraai/east").NullType;
57
- readonly Boolean: import("@elaraai/east").NullType;
58
- readonly Integer: import("@elaraai/east").NullType;
59
- readonly Float: import("@elaraai/east").NullType;
60
- readonly String: import("@elaraai/east").NullType;
61
- readonly DateTime: import("@elaraai/east").NullType;
62
- readonly Blob: import("@elaraai/east").NullType;
104
+ readonly argTypes: ArrayType<import("@elaraai/east").RecursiveType<VariantType<{
105
+ readonly Never: NullType;
106
+ readonly Null: NullType;
107
+ readonly Boolean: NullType;
108
+ readonly Integer: NullType;
109
+ readonly Float: NullType;
110
+ readonly String: NullType;
111
+ readonly DateTime: NullType;
112
+ readonly Blob: NullType;
63
113
  readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
64
114
  readonly Array: import("@elaraai/east").RecursiveTypeMarker;
65
115
  readonly Set: import("@elaraai/east").RecursiveTypeMarker;
@@ -75,7 +125,7 @@ export declare const MutationObjectType: StructType<{
75
125
  readonly name: StringType;
76
126
  readonly type: import("@elaraai/east").RecursiveTypeMarker;
77
127
  }>>;
78
- readonly Recursive: import("@elaraai/east").VariantType<{
128
+ readonly Recursive: VariantType<{
79
129
  readonly ref: import("@elaraai/east").IntegerType;
80
130
  readonly wrapper: StructType<{
81
131
  readonly id: import("@elaraai/east").IntegerType;
@@ -93,8 +143,8 @@ export declare const MutationObjectType: StructType<{
93
143
  readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
94
144
  readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
95
145
  }>>>;
96
- /** Author-chosen runtime; resolved to argv by runnerToArgv. */
97
- readonly runner: import("@elaraai/east").VariantType<{
146
+ /** Author-chosen runtime the mutation's unit runs on. */
147
+ readonly runner: VariantType<{
98
148
  readonly east_node: StructType<{
99
149
  readonly platforms: ArrayType<StringType>;
100
150
  }>;
@@ -108,19 +158,533 @@ export declare const MutationObjectType: StructType<{
108
158
  readonly command: ArrayType<StringType>;
109
159
  }>;
110
160
  }>;
161
+ /** Which write form this is — see {@link MutationFormType}. */
162
+ readonly form: VariantType<{
163
+ readonly edit: NullType;
164
+ readonly patch: NullType;
165
+ readonly reduce: NullType;
166
+ }>;
167
+ /** Hash of the generated program's IR bundle: the one thing that actually
168
+ * runs, whatever the form. For the `patch` form `bodyIr` names it too,
169
+ * there being no author body. */
170
+ readonly programIr: StringType;
111
171
  }>;
112
172
  export type MutationObjectType = typeof MutationObjectType;
113
173
  export type MutationObject = ValueTypeOf<typeof MutationObjectType>;
174
+ /**
175
+ * Decode a `MutationObject`.
176
+ *
177
+ * @remarks
178
+ * A package-borne wire, so it changes by hard cutover: a package exported by
179
+ * an older SDK is re-exported with the current one, and this says so.
180
+ *
181
+ * @param data - the stored bytes
182
+ * @returns the mutation object
183
+ * @throws {Error} When the bytes are not a current mutation object — a package
184
+ * exported by an older SDK, which is re-exported with the current one.
185
+ */
186
+ export declare function decodeMutationObject(data: Uint8Array): MutationObject;
187
+ /**
188
+ * A secondary index over a record: an East function of an entry, and the
189
+ * collection it builds.
190
+ *
191
+ * An index is a second canonical collection whose sort order IS the query
192
+ * order, stored as a segment manifest exactly like the primary and maintained
193
+ * inside the same commit — so a view by an attribute of the row, or by a
194
+ * related entity a row names many of, is a page rather than a scan.
195
+ *
196
+ * The functions are pure for the reason a reducer is: they run again on every
197
+ * commit and in every bulk build, and a maintained index must equal a rebuilt
198
+ * one to the byte.
199
+ */
200
+ export declare const RecordIndexObjectType: StructType<{
201
+ /** Hash of the encoded EastIR bundle: `(K, V) -> IK`, or `-> Set<IK>` when
202
+ * {@link multi}. */
203
+ readonly keyIr: StringType;
204
+ /** Declared with `keys` (a Set return) rather than `key`: one entry per
205
+ * element, so a row that names five resources appears under five keys. */
206
+ readonly multi: BooleanType;
207
+ /** Hash of the covering projection's IR bundle, `(K, V) -> P`; none when the
208
+ * index carries no value and `P` is Null. */
209
+ readonly valueIr: OptionType<StringType>;
210
+ /** `IK` — the index key an entry sorts under. */
211
+ readonly keyType: import("@elaraai/east").RecursiveType<VariantType<{
212
+ readonly Never: NullType;
213
+ readonly Null: NullType;
214
+ readonly Boolean: NullType;
215
+ readonly Integer: NullType;
216
+ readonly Float: NullType;
217
+ readonly String: NullType;
218
+ readonly DateTime: NullType;
219
+ readonly Blob: NullType;
220
+ readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
221
+ readonly Array: import("@elaraai/east").RecursiveTypeMarker;
222
+ readonly Set: import("@elaraai/east").RecursiveTypeMarker;
223
+ readonly Dict: StructType<{
224
+ readonly key: import("@elaraai/east").RecursiveTypeMarker;
225
+ readonly value: import("@elaraai/east").RecursiveTypeMarker;
226
+ }>;
227
+ readonly Struct: ArrayType<StructType<{
228
+ readonly name: StringType;
229
+ readonly type: import("@elaraai/east").RecursiveTypeMarker;
230
+ }>>;
231
+ readonly Variant: ArrayType<StructType<{
232
+ readonly name: StringType;
233
+ readonly type: import("@elaraai/east").RecursiveTypeMarker;
234
+ }>>;
235
+ readonly Recursive: VariantType<{
236
+ readonly ref: import("@elaraai/east").IntegerType;
237
+ readonly wrapper: StructType<{
238
+ readonly id: import("@elaraai/east").IntegerType;
239
+ readonly inner: import("@elaraai/east").RecursiveTypeMarker;
240
+ }>;
241
+ }>;
242
+ readonly Function: StructType<{
243
+ readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
244
+ readonly output: import("@elaraai/east").RecursiveTypeMarker;
245
+ }>;
246
+ readonly AsyncFunction: StructType<{
247
+ readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
248
+ readonly output: import("@elaraai/east").RecursiveTypeMarker;
249
+ }>;
250
+ readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
251
+ readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
252
+ }>>;
253
+ /** `P` — the covering projection's type; Null when there is none. */
254
+ readonly valueType: import("@elaraai/east").RecursiveType<VariantType<{
255
+ readonly Never: NullType;
256
+ readonly Null: NullType;
257
+ readonly Boolean: NullType;
258
+ readonly Integer: NullType;
259
+ readonly Float: NullType;
260
+ readonly String: NullType;
261
+ readonly DateTime: NullType;
262
+ readonly Blob: NullType;
263
+ readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
264
+ readonly Array: import("@elaraai/east").RecursiveTypeMarker;
265
+ readonly Set: import("@elaraai/east").RecursiveTypeMarker;
266
+ readonly Dict: StructType<{
267
+ readonly key: import("@elaraai/east").RecursiveTypeMarker;
268
+ readonly value: import("@elaraai/east").RecursiveTypeMarker;
269
+ }>;
270
+ readonly Struct: ArrayType<StructType<{
271
+ readonly name: StringType;
272
+ readonly type: import("@elaraai/east").RecursiveTypeMarker;
273
+ }>>;
274
+ readonly Variant: ArrayType<StructType<{
275
+ readonly name: StringType;
276
+ readonly type: import("@elaraai/east").RecursiveTypeMarker;
277
+ }>>;
278
+ readonly Recursive: VariantType<{
279
+ readonly ref: import("@elaraai/east").IntegerType;
280
+ readonly wrapper: StructType<{
281
+ readonly id: import("@elaraai/east").IntegerType;
282
+ readonly inner: import("@elaraai/east").RecursiveTypeMarker;
283
+ }>;
284
+ }>;
285
+ readonly Function: StructType<{
286
+ readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
287
+ readonly output: import("@elaraai/east").RecursiveTypeMarker;
288
+ }>;
289
+ readonly AsyncFunction: StructType<{
290
+ readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
291
+ readonly output: import("@elaraai/east").RecursiveTypeMarker;
292
+ }>;
293
+ readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
294
+ readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
295
+ }>>;
296
+ /** Hash of the generated build program's IR bundle: `(piece, emit) =>
297
+ * Null`, which emits the index entries of a piece of the primary, in any
298
+ * order. */
299
+ readonly buildIr: StringType;
300
+ /** Author-chosen runtime the index's functions run on. */
301
+ readonly runner: VariantType<{
302
+ readonly east_node: StructType<{
303
+ readonly platforms: ArrayType<StringType>;
304
+ }>;
305
+ readonly east_py: StructType<{
306
+ readonly platforms: ArrayType<StringType>;
307
+ }>;
308
+ readonly east_c: StructType<{
309
+ readonly platforms: ArrayType<StringType>;
310
+ }>;
311
+ readonly custom: StructType<{
312
+ readonly command: ArrayType<StringType>;
313
+ }>;
314
+ }>;
315
+ }>;
316
+ export type RecordIndexObjectType = typeof RecordIndexObjectType;
317
+ export type RecordIndexObject = ValueTypeOf<typeof RecordIndexObjectType>;
318
+ /**
319
+ * How a migration says what it changes.
320
+ *
321
+ * - `value` — `(Old) => New`, the whole state: one unit, whose runner opens the
322
+ * state lazily, so it costs what the body reads.
323
+ * - `rows` — a Dict's rows, `(K, V1) => V2` with the keys unchanged, or an
324
+ * Array's elements, `(T1) => T2` in order: a task split over the state, a
325
+ * piece at a time.
326
+ * - `rekey` — a Dict's entries, `(K1, V1) => { key: K2, value: V2 }`, or a
327
+ * Set's elements, `(T1) => T2`: the same split task, whose pieces' outputs
328
+ * merge by key. Two rows landing on one key fail, naming it; two elements
329
+ * landing on one are one element.
330
+ *
331
+ * @remarks
332
+ * A variant, so a migration object decodes only with one of these: a deploy
333
+ * never runs a step of a form it does not know as another.
334
+ */
335
+ export declare const MigrationFormType: VariantType<{
336
+ readonly rekey: NullType;
337
+ readonly rows: NullType;
338
+ readonly value: NullType;
339
+ }>;
340
+ export type MigrationFormType = typeof MigrationFormType;
341
+ /** A {@link MigrationFormType} by its name, as the SDK's definitions carry it. */
342
+ export type MigrationForm = ValueTypeOf<typeof MigrationFormType>['type'];
343
+ /**
344
+ * A migration: one step of a record's declared chain, which a deploy runs over
345
+ * a workspace's state that has not applied it.
346
+ *
347
+ * @remarks
348
+ * A step changes the record's type, or keeps the type and changes its values.
349
+ * The chain is the record object's `migrations`, in order, and a workspace's
350
+ * record ref names the steps it has applied by name, never by this object's
351
+ * hash: the hash covers the step's IR, which carries source locations and
352
+ * changes with the SDK that exported it, so an unchanged step would read as
353
+ * edited.
354
+ */
355
+ export declare const MigrationObjectType: StructType<{
356
+ /** Which form this is — see {@link MigrationFormType}. */
357
+ readonly form: VariantType<{
358
+ readonly rekey: NullType;
359
+ readonly rows: NullType;
360
+ readonly value: NullType;
361
+ }>;
362
+ /** The record's type before the step. */
363
+ readonly from: import("@elaraai/east").RecursiveType<VariantType<{
364
+ readonly Never: NullType;
365
+ readonly Null: NullType;
366
+ readonly Boolean: NullType;
367
+ readonly Integer: NullType;
368
+ readonly Float: NullType;
369
+ readonly String: NullType;
370
+ readonly DateTime: NullType;
371
+ readonly Blob: NullType;
372
+ readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
373
+ readonly Array: import("@elaraai/east").RecursiveTypeMarker;
374
+ readonly Set: import("@elaraai/east").RecursiveTypeMarker;
375
+ readonly Dict: StructType<{
376
+ readonly key: import("@elaraai/east").RecursiveTypeMarker;
377
+ readonly value: import("@elaraai/east").RecursiveTypeMarker;
378
+ }>;
379
+ readonly Struct: ArrayType<StructType<{
380
+ readonly name: StringType;
381
+ readonly type: import("@elaraai/east").RecursiveTypeMarker;
382
+ }>>;
383
+ readonly Variant: ArrayType<StructType<{
384
+ readonly name: StringType;
385
+ readonly type: import("@elaraai/east").RecursiveTypeMarker;
386
+ }>>;
387
+ readonly Recursive: VariantType<{
388
+ readonly ref: import("@elaraai/east").IntegerType;
389
+ readonly wrapper: StructType<{
390
+ readonly id: import("@elaraai/east").IntegerType;
391
+ readonly inner: import("@elaraai/east").RecursiveTypeMarker;
392
+ }>;
393
+ }>;
394
+ readonly Function: StructType<{
395
+ readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
396
+ readonly output: import("@elaraai/east").RecursiveTypeMarker;
397
+ }>;
398
+ readonly AsyncFunction: StructType<{
399
+ readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
400
+ readonly output: import("@elaraai/east").RecursiveTypeMarker;
401
+ }>;
402
+ readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
403
+ readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
404
+ }>>;
405
+ /** The record's type after it. */
406
+ readonly to: import("@elaraai/east").RecursiveType<VariantType<{
407
+ readonly Never: NullType;
408
+ readonly Null: NullType;
409
+ readonly Boolean: NullType;
410
+ readonly Integer: NullType;
411
+ readonly Float: NullType;
412
+ readonly String: NullType;
413
+ readonly DateTime: NullType;
414
+ readonly Blob: NullType;
415
+ readonly Ref: import("@elaraai/east").RecursiveTypeMarker;
416
+ readonly Array: import("@elaraai/east").RecursiveTypeMarker;
417
+ readonly Set: import("@elaraai/east").RecursiveTypeMarker;
418
+ readonly Dict: StructType<{
419
+ readonly key: import("@elaraai/east").RecursiveTypeMarker;
420
+ readonly value: import("@elaraai/east").RecursiveTypeMarker;
421
+ }>;
422
+ readonly Struct: ArrayType<StructType<{
423
+ readonly name: StringType;
424
+ readonly type: import("@elaraai/east").RecursiveTypeMarker;
425
+ }>>;
426
+ readonly Variant: ArrayType<StructType<{
427
+ readonly name: StringType;
428
+ readonly type: import("@elaraai/east").RecursiveTypeMarker;
429
+ }>>;
430
+ readonly Recursive: VariantType<{
431
+ readonly ref: import("@elaraai/east").IntegerType;
432
+ readonly wrapper: StructType<{
433
+ readonly id: import("@elaraai/east").IntegerType;
434
+ readonly inner: import("@elaraai/east").RecursiveTypeMarker;
435
+ }>;
436
+ }>;
437
+ readonly Function: StructType<{
438
+ readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
439
+ readonly output: import("@elaraai/east").RecursiveTypeMarker;
440
+ }>;
441
+ readonly AsyncFunction: StructType<{
442
+ readonly inputs: ArrayType<import("@elaraai/east").RecursiveTypeMarker>;
443
+ readonly output: import("@elaraai/east").RecursiveTypeMarker;
444
+ }>;
445
+ readonly Vector: import("@elaraai/east").RecursiveTypeMarker;
446
+ readonly Matrix: import("@elaraai/east").RecursiveTypeMarker;
447
+ }>>;
448
+ /** Hash of the author's function's IR bundle, which a `value` step runs. */
449
+ readonly bodyIr: StringType;
450
+ /** Hash of the generated program's IR bundle, `(piece, emit) => Null`,
451
+ * which a `rows` or `rekey` step runs over each piece of the state; empty
452
+ * for a `value` step. */
453
+ readonly programIr: StringType;
454
+ /** Author-chosen runtime the step runs on. */
455
+ readonly runner: VariantType<{
456
+ readonly east_node: StructType<{
457
+ readonly platforms: ArrayType<StringType>;
458
+ }>;
459
+ readonly east_py: StructType<{
460
+ readonly platforms: ArrayType<StringType>;
461
+ }>;
462
+ readonly east_c: StructType<{
463
+ readonly platforms: ArrayType<StringType>;
464
+ }>;
465
+ readonly custom: StructType<{
466
+ readonly command: ArrayType<StringType>;
467
+ }>;
468
+ }>;
469
+ }>;
470
+ export type MigrationObjectType = typeof MigrationObjectType;
471
+ export type MigrationObject = ValueTypeOf<typeof MigrationObjectType>;
472
+ /**
473
+ * Decode a `MigrationObject`.
474
+ *
475
+ * @remarks
476
+ * A package-borne wire, so it changes by hard cutover: a package exported by
477
+ * an older SDK is re-exported with the current one, and this says so.
478
+ *
479
+ * @param data - the stored bytes
480
+ * @returns the migration object
481
+ * @throws {Error} When the bytes are not a current migration object — a
482
+ * package exported by an older SDK, which is re-exported with the current
483
+ * one.
484
+ */
485
+ export declare function decodeMigrationObject(data: Uint8Array): MigrationObject;
114
486
  /**
115
487
  * Record object stored in the object store, referenced by name from
116
- * `PackageObject.records`. Carries the record's dataset path and its mutations.
488
+ * `PackageObject.records`. Carries the record's dataset path, its mutations,
489
+ * its secondary indexes and its migration chain.
117
490
  */
118
491
  export declare const RecordObjectType: StructType<{
119
492
  /** refPath of the record's dataset, e.g. `records/orders`. */
120
493
  readonly path: StringType;
121
494
  /** Mutations by name -> MutationObject hash. */
122
495
  readonly mutations: DictType<StringType, StringType>;
496
+ /** Secondary indexes by name -> RecordIndexObject hash. */
497
+ readonly indexes: DictType<StringType, StringType>;
498
+ /** The declared migration chain, in order: each step's name, an identifier
499
+ * unique on the record, and its MigrationObject hash. Empty when the
500
+ * record declares none. */
501
+ readonly migrations: ArrayType<StructType<{
502
+ readonly name: StringType;
503
+ readonly migration: StringType;
504
+ }>>;
123
505
  }>;
124
506
  export type RecordObjectType = typeof RecordObjectType;
125
507
  export type RecordObject = ValueTypeOf<typeof RecordObjectType>;
508
+ /**
509
+ * Decode a `RecordObject`.
510
+ *
511
+ * @remarks
512
+ * A package-borne wire, so it changes by hard cutover: a package exported by
513
+ * an older SDK is re-exported with the current one, and this says so.
514
+ *
515
+ * @param data - the stored bytes
516
+ * @returns the record object
517
+ * @throws {Error} When the bytes are not a current record object — a package
518
+ * exported by an older SDK, which is re-exported with the current one.
519
+ */
520
+ export declare function decodeRecordObject(data: Uint8Array): RecordObject;
521
+ /** The `kind` tag a record's state object carries once the record has an
522
+ * index: what tells a reader that the ref names a table of manifests rather
523
+ * than one of them. */
524
+ export declare const RECORD_STATE_KIND = "$record";
525
+ /**
526
+ * A record's state when it has secondary indexes: one small object naming the
527
+ * primary's manifest and every index's.
528
+ *
529
+ * @remarks
530
+ * One state object, one commit, one conditional ref write — so the primary and
531
+ * every index are consistent at every commit, history carries them, reading at
532
+ * an older commit resolves them, compaction keeps them by copying one hash,
533
+ * and the collector walks them. A record with no index keeps the plain
534
+ * manifest, so this is additive: the door that resolves a record's state
535
+ * accepts either.
536
+ */
537
+ export declare const RecordStateType: StructType<{
538
+ /** Always {@link RECORD_STATE_KIND}. */
539
+ readonly kind: StringType;
540
+ /** CollectionManifest hash of the primary. */
541
+ readonly primary: StringType;
542
+ /** Index name -> the manifest it is held in and the index object it was
543
+ * built under. Deploy compares the second against the package's to decide
544
+ * whether an index is built, dropped or kept. */
545
+ readonly indexes: DictType<StringType, StructType<{
546
+ /** CollectionManifest hash of the index collection. */
547
+ readonly manifest: StringType;
548
+ /** RecordIndexObject hash the index was built under. */
549
+ readonly index: StringType;
550
+ }>>;
551
+ }>;
552
+ export type RecordStateType = typeof RecordStateType;
553
+ export type RecordState = ValueTypeOf<typeof RecordStateType>;
554
+ /**
555
+ * Whether a decoded object is a record's `$record` state.
556
+ *
557
+ * @remarks
558
+ * Matched on the exact field set plus the tag, as every object recognizer is:
559
+ * a record's own state is an arbitrary user struct flowing through the same
560
+ * dispatch, and misreading one as a state table would probe its fields as
561
+ * object hashes.
562
+ *
563
+ * @param typeValue - the object's decoded root type
564
+ * @param value - the decoded value, when the tag is to be checked too
565
+ * @returns whether the object is a record state
566
+ */
567
+ export declare function isRecordStateType(typeValue: EastTypeValue, value?: unknown): boolean;
568
+ /**
569
+ * The collection an index is held in: `Dict<{ik, k}, P>`.
570
+ *
571
+ * @remarks
572
+ * `ik` first, so every entry with one index key is a contiguous run — ordered
573
+ * by primary key inside it — and a RANGE of index keys is one contiguous run
574
+ * too. `k` makes the entry unique and gives the run its inner order.
575
+ *
576
+ * @param keyType - the record's primary key type, `K`
577
+ * @param indexKeyType - the index key the function computes, `IK`
578
+ * @param valueType - the covering projection's type, `P`
579
+ * @returns the index collection's East type
580
+ */
581
+ export declare function indexCollectionType(keyType: EastType, indexKeyType: EastType, valueType: EastType): EastType;
582
+ /**
583
+ * The op type of one target's changes: what one touched key carries.
584
+ *
585
+ * @remarks
586
+ * Exactly the op type of that target's own `PatchType`, which is what makes
587
+ * applying a delta's run for one target literally
588
+ * `applyFor(targetType)(segment, variant('patch', ops))` — `ConflictError` and
589
+ * all — rather than a second apply implementation that could disagree with the
590
+ * first.
591
+ *
592
+ * @param collectionType - the target's collection type (a Dict or a Set)
593
+ * @returns the op variant for one key of it
594
+ * @throws {Error} When the type is not a Dict or a Set — the kinds whose
595
+ * patches are sparse and addressed by key.
596
+ */
597
+ export declare function patchOpsType(collectionType: EastType): EastType;
598
+ /** One target of a mutation delta: its name, its key and its op type. */
599
+ export interface DeltaTarget {
600
+ /** `primary`, or an index name. */
601
+ name: string;
602
+ /** The key the target is addressed by — `K` for the primary, `{ik, k}` for
603
+ * an index. */
604
+ keyType: EastType;
605
+ /** The target's own collection type, whose patch ops the arm carries. */
606
+ collectionType: EastType;
607
+ }
608
+ /**
609
+ * The case of a mutation delta that says the write went stale: its key says
610
+ * what went stale, in words, and its op is Null.
611
+ *
612
+ * @remarks
613
+ * A write reaches the record two ways — the program emits a delta and the
614
+ * engine applies it, or the engine applies the client's patch directly — and
615
+ * both meet the same situation: an op that disagrees with the state it lands
616
+ * on. The apply reports it as a conflict, which a caller retries. A program
617
+ * that meets it — a patch whose `before` the record no longer holds, an
618
+ * update of a row that no longer matches, a delete of a key the record does
619
+ * not hold — emits one of these rather than failing, which a caller would not
620
+ * retry. The name sorts before every target's, since index names are
621
+ * identifiers, so a stale delta says so in its first entry.
622
+ */
623
+ export declare const DELTA_CONFLICT = "$conflict";
624
+ /**
625
+ * The type of a mutation delta: every target's changes in ONE sorted
626
+ * collection.
627
+ *
628
+ * @remarks
629
+ * One variant case per target — `primary` plus one per declared index, which
630
+ * is why `primary` is a reserved index name — and {@link DELTA_CONFLICT}, which
631
+ * sorts first. Canonical order puts every target's ops in one contiguous run,
632
+ * in that target's own key order, so the apply takes the delta one target at
633
+ * a time, a segment at a time, and a delta is a pageable collection like any
634
+ * other.
635
+ *
636
+ * Derived on demand and never stored as a type: a delta blob is
637
+ * self-describing, and deriving it means it cannot drift from the record's
638
+ * declarations.
639
+ *
640
+ * @param targets - the primary and each index, in canonical case order
641
+ * @returns `Dict<DeltaKey, DeltaOp>`
642
+ */
643
+ export declare function mutationDeltaType(targets: readonly DeltaTarget[]): EastType;
644
+ /**
645
+ * The `edit` capability an edit-form mutation writes through.
646
+ *
647
+ * @remarks
648
+ * An edit body reads the state it is given — lazily, the frozen pager-backed
649
+ * value every runner already serves — and writes through these three
650
+ * functions; it never returns a state, so its commit rewrites only the
651
+ * segments the entries it touched live in.
652
+ *
653
+ * Repeated edits of one key fold: `set` after anything is that `set`; `update`
654
+ * after `set` applies to the set value; `update` after `update` composes;
655
+ * `delete` after anything is `delete`. A `set` of the value the state already
656
+ * holds is no change, and a `delete` or `update` of a key the state does not
657
+ * hold is a conflict naming the key, as an apply's would be.
658
+ *
659
+ * The Dict overload carries the struct's shape into TypeScript, so a body that
660
+ * declares `editTypeOf(record.type)` as its last parameter gets `edit.set`,
661
+ * `edit.delete` and `edit.update` typed against the record's own key and row.
662
+ *
663
+ * @param recordType - the record's state type, a Dict
664
+ * @returns the struct of edit functions
665
+ * @throws {Error} When the record's root is not a Dict.
666
+ */
667
+ export declare function editTypeOf<K extends EastType, V extends EastType>(recordType: DictType<K, V>): StructType<{
668
+ set: FunctionType<[K, V], NullType>;
669
+ delete: FunctionType<[K], NullType>;
670
+ update: FunctionType<[K, PatchTypeOf<V>], NullType>;
671
+ }>;
672
+ export declare function editTypeOf(recordType: EastType): EastType;
673
+ /**
674
+ * One window of an index read: an ORDERED array, never a dict.
675
+ *
676
+ * @remarks
677
+ * A Dict value re-sorts by its own key, which would throw away the index order
678
+ * the page was asked for — so the wire type of an index window is positional,
679
+ * in index order, carrying every key the client may need. Whatever renders an
680
+ * index-ordered view consumes this shape; it is a contract the data layer sets
681
+ * and the UI meets, not the reverse.
682
+ *
683
+ * @param keyType - the record's primary key type, `K`
684
+ * @param indexKeyType - the index key, `IK`
685
+ * @param valueType - the covering projection's type, `P`
686
+ * @param rowType - the record's row type, `V`
687
+ * @returns the window's East type
688
+ */
689
+ export declare function indexWindowType(keyType: EastType, indexKeyType: EastType, valueType: EastType, rowType: EastType): EastType;
126
690
  //# sourceMappingURL=record.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../src/record.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAgB,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjI;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB;IAC3B,yDAAyD;;IAEzD,6EAA6E;;IAE7E,4EAA4E;;IAE5E,iFAAiF;;IAEjF,2EAA2E;;IAE3E,8BAA8B;;EAE9B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC;AACvD,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;IAC7B,kFAAkF;;IAElF,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEtE,+DAA+D;;;;;;;;;;;;;;;EAE/D,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC;AAC3D,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,gBAAgB;IAC3B,8DAA8D;;IAE9D,gDAAgD;;EAEhD,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC;AACvD,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../src/record.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAA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