@microdelta/history 0.0.0 → 0.2.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.
Files changed (79) hide show
  1. package/README.md +30 -4
  2. package/dist/api/history.alpha.d.ts +3 -0
  3. package/dist/api/history.beta.d.ts +3 -0
  4. package/dist/api/history.conformance.store.alpha.d.ts +3 -0
  5. package/dist/api/history.conformance.store.beta.d.ts +3 -0
  6. package/dist/api/history.conformance.store.public.d.ts +3 -0
  7. package/dist/api/history.conformance.store.raw.alpha.d.ts +215 -0
  8. package/dist/api/history.conformance.store.raw.beta.d.ts +215 -0
  9. package/dist/api/history.conformance.store.raw.public.d.ts +215 -0
  10. package/dist/api/history.conformance.store.raw.untrimmed.d.ts +215 -0
  11. package/dist/api/history.conformance.store.untrimmed.d.ts +3 -0
  12. package/dist/api/history.public.d.ts +3 -0
  13. package/dist/api/history.root.raw.alpha.d.ts +1371 -0
  14. package/dist/api/history.root.raw.beta.d.ts +425 -0
  15. package/dist/api/history.root.raw.public.d.ts +425 -0
  16. package/dist/api/history.root.raw.untrimmed.d.ts +1372 -0
  17. package/dist/api/history.shared.alpha.d.ts +1402 -0
  18. package/dist/api/history.shared.beta.d.ts +456 -0
  19. package/dist/api/history.shared.public.d.ts +456 -0
  20. package/dist/api/history.shared.untrimmed.d.ts +1403 -0
  21. package/dist/api/history.untrimmed.d.ts +3 -0
  22. package/dist/api/tsdoc-metadata.json +11 -0
  23. package/dist/src/completed-results.d.ts +99 -0
  24. package/dist/src/completed-results.d.ts.map +1 -0
  25. package/dist/src/completed-results.js +2 -0
  26. package/dist/src/completed-results.js.map +1 -0
  27. package/dist/src/durable/contracts.d.ts +612 -0
  28. package/dist/src/durable/contracts.d.ts.map +1 -0
  29. package/dist/src/durable/contracts.js +2 -0
  30. package/dist/src/durable/contracts.js.map +1 -0
  31. package/dist/src/durable/errors.d.ts +94 -0
  32. package/dist/src/durable/errors.d.ts.map +1 -0
  33. package/dist/src/durable/errors.js +118 -0
  34. package/dist/src/durable/errors.js.map +1 -0
  35. package/dist/src/durable/index.d.ts +9 -0
  36. package/dist/src/durable/index.d.ts.map +1 -0
  37. package/dist/src/durable/index.js +770 -0
  38. package/dist/src/durable/index.js.map +1 -0
  39. package/dist/src/durable/journal.d.ts +53 -0
  40. package/dist/src/durable/journal.d.ts.map +1 -0
  41. package/dist/src/durable/journal.js +174 -0
  42. package/dist/src/durable/journal.js.map +1 -0
  43. package/dist/src/durable/locator.d.ts +31 -0
  44. package/dist/src/durable/locator.d.ts.map +1 -0
  45. package/dist/src/durable/locator.js +50 -0
  46. package/dist/src/durable/locator.js.map +1 -0
  47. package/dist/src/durable/records.d.ts +40 -0
  48. package/dist/src/durable/records.d.ts.map +1 -0
  49. package/dist/src/durable/records.js +74 -0
  50. package/dist/src/durable/records.js.map +1 -0
  51. package/dist/src/durable/schema.d.ts +37 -0
  52. package/dist/src/durable/schema.d.ts.map +1 -0
  53. package/dist/src/durable/schema.js +335 -0
  54. package/dist/src/durable/schema.js.map +1 -0
  55. package/dist/src/durable/selected-index.d.ts +94 -0
  56. package/dist/src/durable/selected-index.d.ts.map +1 -0
  57. package/dist/src/durable/selected-index.js +594 -0
  58. package/dist/src/durable/selected-index.js.map +1 -0
  59. package/dist/src/index.d.ts +28 -0
  60. package/dist/src/index.d.ts.map +1 -0
  61. package/dist/src/index.js +15 -0
  62. package/dist/src/index.js.map +1 -0
  63. package/dist/src/store/index.d.ts +128 -0
  64. package/dist/src/store/index.d.ts.map +1 -0
  65. package/dist/src/store/index.js +33 -0
  66. package/dist/src/store/index.js.map +1 -0
  67. package/dist/src/store/memory/index.d.ts +24 -0
  68. package/dist/src/store/memory/index.d.ts.map +1 -0
  69. package/dist/src/store/memory/index.js +162 -0
  70. package/dist/src/store/memory/index.js.map +1 -0
  71. package/dist/src/types.d.ts +100 -0
  72. package/dist/src/types.d.ts.map +1 -0
  73. package/dist/src/types.js +2 -0
  74. package/dist/src/types.js.map +1 -0
  75. package/dist/test/conformance/store/index.d.ts +34 -0
  76. package/dist/test/conformance/store/index.d.ts.map +1 -0
  77. package/dist/test/conformance/store/index.js +368 -0
  78. package/dist/test/conformance/store/index.js.map +1 -0
  79. package/package.json +48 -8
@@ -0,0 +1,612 @@
1
+ /**
2
+ * Contracts of History's durable authority: the one consistency owner for
3
+ * immutable completed results, attempt history, the single logical writer,
4
+ * atomic publication, current pointers, separate acceptance records, recorded
5
+ * promotions and Run Supervision's operation journal (PUB-001, ARC-007,
6
+ * RUN-011/012/017). These are project-private alpha shapes. They carry
7
+ * Resolution's provenance and evidence, promotion evidence and Supervision's
8
+ * journal records as versioned opaque records and never interpret Definition,
9
+ * Tracking, Resolution or Supervision meaning; deciding whether a result is
10
+ * currently acceptable remains Resolution's responsibility, and deciding what
11
+ * an operation or deferral means remains Supervision's.
12
+ *
13
+ * Every durable record belongs to exactly one environment namespace of one
14
+ * analysis: attempts, completed results, current heads, acceptance records,
15
+ * promotion records and journal records. Nothing recorded in one environment
16
+ * satisfies a lookup in another, except a completed result that an explicit
17
+ * promotion record names for that other environment (RUN-017).
18
+ * @packageDocumentation
19
+ */
20
+ import type { IClockCapability, ISha256Capability, ISqliteCapability } from '@microdelta/machine';
21
+ import type { ICompletedNavigationReader, ICompletedResultReader, ICompletedResultReference } from '../completed-results.js';
22
+ /**
23
+ * The analysis and environment that scope every subject, attempt and result
24
+ * within one logical store. The same subject text in another analysis or
25
+ * environment is a different scoped subject (RES-001/002). Both are complete
26
+ * opaque non-empty strings compared by exact equality. An environment is a
27
+ * namespace within one store (RUN-017): a trial and a production run of the
28
+ * same analysis use different environments of the same file, selected per
29
+ * call rather than process-wide.
30
+ * @alpha
31
+ */
32
+ export interface IHistoryScope {
33
+ /** The analysis whose history this is. */
34
+ readonly analysis: string;
35
+ /** The logical environment within that analysis. */
36
+ readonly environment: string;
37
+ }
38
+ /**
39
+ * One scoped subject: the author's complete opaque subject string inside its
40
+ * analysis/environment scope. History never derives, prefixes or reinterprets
41
+ * the subject; it identifies a history of work, not one exact result.
42
+ * @alpha
43
+ */
44
+ export interface IScopedSubject extends IHistoryScope {
45
+ /** The author's complete subject string, compared by exact string equality. */
46
+ readonly subject: string;
47
+ }
48
+ /**
49
+ * A scoped subject narrowed to one compatibility group (REUSE-008): a positive
50
+ * safe integer chosen by the author per memoized step. Candidate lookup filters
51
+ * by it before Resolution validates current evidence.
52
+ * @alpha
53
+ */
54
+ export interface IVersionedSubject extends IScopedSubject {
55
+ /** The positive safe-integer compatibility group. */
56
+ readonly version: number;
57
+ }
58
+ /**
59
+ * A versioned record whose meaning another owner defines, such as
60
+ * Resolution's execution provenance, current acceptance evidence or an
61
+ * attempt's failure evidence. History validates only that the format tag is a
62
+ * non-empty string, the format version is a positive safe integer and the
63
+ * content is supported Value data; it stores the content in canonical MDS1
64
+ * form and returns it decoded and frozen, never interpreting it.
65
+ * @alpha
66
+ */
67
+ export interface IVersionedRecord {
68
+ /** The owner-defined format identity, for example a Resolution schema name. */
69
+ readonly format: string;
70
+ /** The owner-defined positive safe-integer version of that format. */
71
+ readonly formatVersion: number;
72
+ /** Supported Value data; its meaning belongs to the format's owner. */
73
+ readonly content: unknown;
74
+ }
75
+ /**
76
+ * Proof of current single-logical-writer ownership. The holder is an opaque
77
+ * caller identity; the fence is the store-wide token issued at acquisition,
78
+ * which only increases; `expiresAt` is the lease boundary in History's
79
+ * clock domain (epoch milliseconds). Presenting a lease authorizes storage
80
+ * mutation only while holder, fence and unexpired lease still match the durable
81
+ * writer state; it never authorizes author execution.
82
+ * @alpha
83
+ */
84
+ export interface IWriterLease {
85
+ /** The opaque identity that acquired the lease. */
86
+ readonly holder: string;
87
+ /** The fencing token issued for this acquisition. */
88
+ readonly fence: number;
89
+ /** The first effective time at which the lease is no longer valid. */
90
+ readonly expiresAt: number;
91
+ }
92
+ /**
93
+ * Storage contention on a lease operation: another connection, possibly in
94
+ * another process, held SQLite's write lock past the host's bounded busy wait,
95
+ * so History could not decide and changed nothing, not even the clock
96
+ * high-water. It is a fact about storage, never about ownership (PUB-005): it
97
+ * neither grants nor refuses, and whether to try again is the caller's policy.
98
+ * @alpha
99
+ */
100
+ export interface IWriterContention {
101
+ /** History could not take SQLite's write lock in time. */
102
+ readonly kind: 'contended';
103
+ /**
104
+ * The writer recorded at that moment, read without the write lock: its
105
+ * holder, fence and expiry as stored, whether or not the lease has expired.
106
+ * Undefined when no holder is recorded, or when that read was itself busy;
107
+ * History never guesses a holder.
108
+ */
109
+ readonly writer: IWriterLease | undefined;
110
+ /** The host's diagnostic of the contention; it carries no stored values. */
111
+ readonly detail: string;
112
+ }
113
+ /**
114
+ * The outcome of asking for the single logical writer. `held` reports an
115
+ * observed unexpired holder, not a failed compare-and-swap (PUB-005), and
116
+ * grants nothing; `contended` reports that storage was too busy to decide.
117
+ * @alpha
118
+ */
119
+ export type IWriterAcquisition = {
120
+ /** The caller now owns the store's writer lease. */
121
+ readonly kind: 'acquired';
122
+ /** The new lease with its freshly issued fence. */
123
+ readonly lease: IWriterLease;
124
+ } | {
125
+ /** Another unexpired holder owns the store. */
126
+ readonly kind: 'held';
127
+ /** The observed holder identity. */
128
+ readonly holder: string;
129
+ /** When that holder's lease expires, in History's clock domain. */
130
+ readonly expiresAt: number;
131
+ } | IWriterContention;
132
+ /**
133
+ * The outcome of renewing a lease the caller holds: `renewed` with the later
134
+ * expiry, or `contended` when storage was too busy to decide, in which case
135
+ * the lease is exactly as it was and is neither renewed nor refused. A stale
136
+ * or expired lease is not an outcome but a refusal (`StaleWriterError`).
137
+ * @alpha
138
+ */
139
+ export type IWriterRenewal = {
140
+ /** The lease was extended. */
141
+ readonly kind: 'renewed';
142
+ /** The same holder and fence with the new expiry. */
143
+ readonly lease: IWriterLease;
144
+ } | IWriterContention;
145
+ /** A request for the writer lease. @alpha */
146
+ export interface IWriterAcquisitionRequest {
147
+ /** The opaque non-empty identity of the prospective holder. */
148
+ readonly holder: string;
149
+ /** Positive safe-integer lease duration in milliseconds. */
150
+ readonly leaseMilliseconds: number;
151
+ }
152
+ /**
153
+ * Identifies one admitted execution for allocation or recovery. The attempt
154
+ * key is a stable caller-derived identity for exactly one execution, scoped by
155
+ * logical store, analysis, environment and subject; it is not a subject-level
156
+ * cache key. The intent digest is an opaque digest Resolution computes from
157
+ * the complete invocation it intends to run; History compares it only for
158
+ * exact equality, so a reused key with a different intent is a conflict.
159
+ * @alpha
160
+ */
161
+ export interface IAttemptRequest extends IVersionedSubject {
162
+ /** The stable key of one admitted execution. */
163
+ readonly attemptKey: string;
164
+ /** Resolution's opaque digest of that execution's complete intent. */
165
+ readonly intentDigest: string;
166
+ }
167
+ /**
168
+ * Durable attempt lifecycle. `allocated` and `staged` are incomplete;
169
+ * `completed` produced exactly one published result; `failed` and
170
+ * `interrupted` ended without a result. Staged content is attempt evidence,
171
+ * never a completed result.
172
+ * @alpha
173
+ */
174
+ export type IAttemptState = 'allocated' | 'staged' | 'completed' | 'failed' | 'interrupted';
175
+ /**
176
+ * One durable attempt as History records it. The attempt identity is issued
177
+ * from a store-wide counter that never reissues a value, including after
178
+ * abandonment or process death (PUB-003).
179
+ * @alpha
180
+ */
181
+ export interface IAttemptRecord extends IAttemptRequest {
182
+ /** The never-reused store-wide attempt identity. */
183
+ readonly attemptId: number;
184
+ /** The current lifecycle state. */
185
+ readonly state: IAttemptState;
186
+ /** The fence of the lease that allocated this attempt. */
187
+ readonly allocatedFence: number;
188
+ /** The fence that completed, failed or interrupted it; null while incomplete. */
189
+ readonly endedFence: number | null;
190
+ /** The exact completed result, present only in the `completed` state. */
191
+ readonly result: ICompletedResultReference | null;
192
+ /** Owner-defined evidence of a failed or interrupted attempt, otherwise null. */
193
+ readonly outcome: IVersionedRecord | null;
194
+ }
195
+ /**
196
+ * Candidate content for an allocated attempt. The payload must be supported
197
+ * Value data with a record or array root; the provenance is Resolution's
198
+ * versioned record; dependencies are exact references to completed results in
199
+ * the same store and scope that this execution consumed.
200
+ * @alpha
201
+ */
202
+ export interface IStageRequest {
203
+ /** The allocated attempt to stage. */
204
+ readonly attemptId: number;
205
+ /** The author result data, copied into canonical MDS1 form. */
206
+ readonly payload: unknown;
207
+ /** Resolution's execution provenance for this attempt. */
208
+ readonly provenance: IVersionedRecord;
209
+ /** Exact completed results this execution depends on, in the caller's order. */
210
+ readonly dependencies: readonly ICompletedResultReference[];
211
+ }
212
+ /** Ends an incomplete attempt without a result, preserving its evidence. @alpha */
213
+ export interface IAbandonRequest {
214
+ /** The incomplete attempt to end. */
215
+ readonly attemptId: number;
216
+ /** Whether execution failed or was interrupted. */
217
+ readonly outcome: 'failed' | 'interrupted';
218
+ /** Owner-defined evidence of what happened. */
219
+ readonly evidence: IVersionedRecord;
220
+ }
221
+ /**
222
+ * Read-only recovery of one identified execution. Recovery reports what
223
+ * durably happened and never executes, publishes or records acceptance:
224
+ * `absent` means the key was never allocated in this scope, `incomplete` an
225
+ * allocated or staged attempt, `unsuccessful` a failed or interrupted one and
226
+ * `completed` the exact result that execution published.
227
+ * @alpha
228
+ */
229
+ export type IRecoveryOutcome = {
230
+ readonly kind: 'absent';
231
+ } | {
232
+ readonly kind: 'incomplete';
233
+ readonly attempt: IAttemptRecord;
234
+ } | {
235
+ readonly kind: 'unsuccessful';
236
+ readonly attempt: IAttemptRecord;
237
+ } | {
238
+ readonly kind: 'completed';
239
+ readonly attempt: IAttemptRecord;
240
+ /** The exact result that this identified execution published. */
241
+ readonly reference: ICompletedResultReference;
242
+ };
243
+ /**
244
+ * Framework metadata of one immutable completed result, readable without
245
+ * loading its author payload. Provenance and dependencies are the historical
246
+ * truth recorded at publication; later acceptance never rewrites them (RES-007).
247
+ * @alpha
248
+ */
249
+ export interface ICompletedEnvelope extends IVersionedSubject {
250
+ /** The exact scoped reference of this result. */
251
+ readonly reference: ICompletedResultReference;
252
+ /** The attempt that produced this result; a result has exactly one. */
253
+ readonly attemptId: number;
254
+ /** Store-wide publication order; later publications have larger values. */
255
+ readonly publication: number;
256
+ /** The supported Value snapshot encoding of the stored payload. */
257
+ readonly encoding: 'MDS1';
258
+ /** Resolution's execution provenance, decoded and frozen. */
259
+ readonly provenance: IVersionedRecord;
260
+ /** Exact completed results this execution depended on, in recorded order. */
261
+ readonly dependencies: readonly ICompletedResultReference[];
262
+ }
263
+ /**
264
+ * Records that an existing completed result was accepted by a current
265
+ * verification. It needs writer ownership to write, but no attempt: a valid
266
+ * hit claims no execution. The evidence names the current dependencies the
267
+ * verification followed, which may differ from the original provenance.
268
+ * @alpha
269
+ */
270
+ export interface IAcceptanceRequest {
271
+ /** The exact completed result that was accepted. */
272
+ readonly reference: ICompletedResultReference;
273
+ /** Resolution's versioned acceptance evidence. */
274
+ readonly evidence: IVersionedRecord;
275
+ /**
276
+ * Exact completed results the current verification followed. Each must be
277
+ * admissible in the accepting environment: published there, or named by a
278
+ * promotion into it.
279
+ */
280
+ readonly dependencies: readonly ICompletedResultReference[];
281
+ /**
282
+ * The environment, within the result's analysis, whose current verification
283
+ * accepted the result. It is always explicit and never inferred from the
284
+ * reference: the caller names its own run environment. It may be the
285
+ * environment that published the result, or another environment into which
286
+ * a recorded promotion admits the result. The acceptance then belongs to
287
+ * that environment's namespace alone and never satisfies a lookup in any
288
+ * other environment.
289
+ */
290
+ readonly environment: string;
291
+ }
292
+ /** One immutable current-acceptance record, separate from the result it names. @alpha */
293
+ export interface IAcceptanceRecord {
294
+ /** Store-wide never-reused acceptance identity, increasing in record order. */
295
+ readonly acceptanceId: number;
296
+ /** The accepted exact result. */
297
+ readonly reference: ICompletedResultReference;
298
+ /** The environment namespace whose verification recorded this acceptance. */
299
+ readonly environment: string;
300
+ /** The writer fence under which the acceptance was recorded. */
301
+ readonly fence: number;
302
+ /** Resolution's acceptance evidence, decoded and frozen. */
303
+ readonly evidence: IVersionedRecord;
304
+ /** Exact results the verification followed, in recorded order. */
305
+ readonly dependencies: readonly ICompletedResultReference[];
306
+ }
307
+ /**
308
+ * Result of regenerating a completed result's selected index from its stored
309
+ * canonical payload and comparing it with the stored index.
310
+ * @alpha
311
+ */
312
+ export type IResultVerification = {
313
+ readonly kind: 'consistent';
314
+ } | {
315
+ readonly kind: 'inconsistent';
316
+ readonly detail: string;
317
+ };
318
+ /**
319
+ * Asks History to admit exact completed results of other environments into
320
+ * one target environment of the same analysis (RUN-017). A trial result
321
+ * satisfies a production lookup only through such a recorded promotion. The
322
+ * target names where the results are admitted; each reference keeps naming
323
+ * its own publishing environment. The evidence is the promoter's versioned
324
+ * record of who promoted what and why; History stores it opaquely.
325
+ * @alpha
326
+ */
327
+ export interface IPromotionRequest {
328
+ /** The analysis and environment the results are admitted into. */
329
+ readonly target: IHistoryScope;
330
+ /**
331
+ * Distinct exact completed results of the target's analysis, none published
332
+ * in the target environment, in the promoter's order.
333
+ */
334
+ readonly references: readonly ICompletedResultReference[];
335
+ /** The promoter's versioned evidence for this promotion. */
336
+ readonly evidence: IVersionedRecord;
337
+ }
338
+ /**
339
+ * One immutable promotion record. It admits the named results as candidates,
340
+ * dependencies and acceptance targets in its target environment and changes
341
+ * nothing else: each result keeps its exact reference, envelope, provenance
342
+ * and acceptances, and no current head moves in any environment. The target
343
+ * environment's later verifications record their own acceptances.
344
+ * @alpha
345
+ */
346
+ export interface IPromotionRecord {
347
+ /** Store-wide never-reused promotion identity, increasing in record order. */
348
+ readonly promotionId: number;
349
+ /** The analysis and environment the results were admitted into. */
350
+ readonly target: IHistoryScope;
351
+ /** The writer fence under which the promotion was recorded. */
352
+ readonly fence: number;
353
+ /** The promoter's evidence, decoded and frozen. */
354
+ readonly evidence: IVersionedRecord;
355
+ /** The admitted exact results, each in its own publishing scope, in recorded order. */
356
+ readonly references: readonly ICompletedResultReference[];
357
+ }
358
+ /**
359
+ * Selects promotion records into one target environment, optionally only
360
+ * those naming one exact result.
361
+ * @alpha
362
+ */
363
+ export interface IPromotionQuery {
364
+ /** The analysis and environment whose admitting promotions to read. */
365
+ readonly target: IHistoryScope;
366
+ /** When present, only promotions that name this exact result. */
367
+ readonly reference?: ICompletedResultReference;
368
+ }
369
+ /**
370
+ * One owner-defined journal record format and the exact format versions a
371
+ * journal port can read and write. A format is only a record's version tag:
372
+ * it never identifies a record or its collection. History compares the tag
373
+ * and versions for exact equality and never interprets the content.
374
+ * @alpha
375
+ */
376
+ export interface IJournalFormat {
377
+ /** The owner-defined non-empty format identity. */
378
+ readonly format: string;
379
+ /** The positive safe-integer versions of that format this port understands. */
380
+ readonly versions: readonly number[];
381
+ }
382
+ /**
383
+ * The formats a journal port is bound to. A stored record of an undeclared
384
+ * format or version is refused rather than returned or overwritten, so a
385
+ * caller never acts on, or clobbers, a record it does not understand.
386
+ * @alpha
387
+ */
388
+ export interface IJournalDeclaration {
389
+ /** At least one declared format, each format named once. */
390
+ readonly formats: readonly IJournalFormat[];
391
+ }
392
+ /**
393
+ * Locates one journal record: its environment namespace, owner-named
394
+ * collection and owner-defined key. The record's identity is exactly this
395
+ * address; its format tag may change between revisions only by
396
+ * compare-and-set.
397
+ * @alpha
398
+ */
399
+ export interface IJournalAddress extends IHistoryScope {
400
+ /** The owner-named non-empty collection, such as Supervision's operations. */
401
+ readonly collection: string;
402
+ /** The owner-defined non-empty key, unique within the namespace and collection. */
403
+ readonly key: string;
404
+ }
405
+ /**
406
+ * Selects every record of one collection in one environment namespace.
407
+ * @alpha
408
+ */
409
+ export interface IJournalQuery extends IHistoryScope {
410
+ /** The owner-named collection to list. */
411
+ readonly collection: string;
412
+ }
413
+ /**
414
+ * One compare-and-set write of a journal commit. The expected revision is the
415
+ * revision the caller last read at this address; `0` asserts that the key has
416
+ * never been written in the collection, under any format. The record's
417
+ * format and version are its version tag and must be declared by the port.
418
+ * @alpha
419
+ */
420
+ export interface IJournalWrite {
421
+ /** The owner-named non-empty collection. */
422
+ readonly collection: string;
423
+ /** The owner-defined non-empty key. */
424
+ readonly key: string;
425
+ /** The current revision the write replaces, or `0` for a new key. */
426
+ readonly expectedRevision: number;
427
+ /** The new owner-defined record. */
428
+ readonly record: IVersionedRecord;
429
+ }
430
+ /**
431
+ * One atomic journal commit in one environment namespace: every write lands
432
+ * in the same transaction, or none does.
433
+ * @alpha
434
+ */
435
+ export interface IJournalCommit extends IHistoryScope {
436
+ /** At least one write, each collection and key pair at most once. */
437
+ readonly writes: readonly IJournalWrite[];
438
+ }
439
+ /**
440
+ * One immutable revision of a journal record. Revisions of an address start
441
+ * at 1 and increase by one per committed write; earlier revisions are retained
442
+ * and never rewritten.
443
+ * @alpha
444
+ */
445
+ export interface IJournalRecord extends IHistoryScope {
446
+ /** The owner-named collection. */
447
+ readonly collection: string;
448
+ /** The owner-defined key. */
449
+ readonly key: string;
450
+ /** This revision's number within its address, starting at 1. */
451
+ readonly revision: number;
452
+ /** Store-wide never-reused journal write identity, increasing in commit order. */
453
+ readonly sequence: number;
454
+ /** The writer fence under which this revision was committed. */
455
+ readonly fence: number;
456
+ /** The owner-defined record, decoded and frozen, with this revision's version tag. */
457
+ readonly record: IVersionedRecord;
458
+ }
459
+ /**
460
+ * Run Supervision's operation journal, stored by History (RUN-011/012). It
461
+ * keeps owner-defined operation and deferral records, such as an intent
462
+ * committed before a send or a "not before" deferral, atomically and under
463
+ * writer fencing, without interpreting them: History owns only namespacing,
464
+ * collections, revisions, fencing and the declared-version check. A commit
465
+ * needs the current writer lease and checks holder, fence and unexpired lease
466
+ * in the same transaction as its compare-and-set checks and writes; reads
467
+ * need no lease and never see an uncommitted write.
468
+ * @alpha
469
+ */
470
+ export interface IOperationJournal {
471
+ /** The frozen formats and versions this port was opened with. */
472
+ readonly formats: readonly IJournalFormat[];
473
+ /**
474
+ * Commit every write in one transaction. The whole commit is refused,
475
+ * unchanged, for a stale lease, an undeclared format or version, a current
476
+ * revision whose stored format or version this port does not understand
477
+ * (checked first, since such a caller cannot have read it), or an expected
478
+ * revision that is not the address's current revision.
479
+ */
480
+ commit(lease: IWriterLease, request: IJournalCommit): readonly IJournalRecord[];
481
+ /** The current revision at one address, or undefined if the key was never written there. */
482
+ read(address: IJournalAddress): IJournalRecord | undefined;
483
+ /** The current revision of every key in one collection, in order of first write. */
484
+ list(query: IJournalQuery): readonly IJournalRecord[];
485
+ }
486
+ /**
487
+ * Host capabilities and identity for opening a durable History store. Node
488
+ * access stays behind the injected SQLite and clock capabilities. The logical
489
+ * store identity is independent of the file location: a moved file keeps its
490
+ * identity, and a file holding another logical store is rejected.
491
+ * @alpha
492
+ */
493
+ export interface IDurableHistoryOptions {
494
+ /** Opens the persistent SQLite file; History owns every statement and schema. */
495
+ readonly sqlite: ISqliteCapability;
496
+ /** Supplies wall-clock observations for History's lease policy. */
497
+ readonly clock: IClockCapability;
498
+ /** Computes content fingerprints for the selected index. */
499
+ readonly sha256: ISha256Capability;
500
+ /** The host location of the SQLite file, passed only to `sqlite`. */
501
+ readonly location: string;
502
+ /** The logical store identity this file must hold, or is created to hold. */
503
+ readonly logicalStore: string;
504
+ }
505
+ /**
506
+ * History's durable authority over one logical store. Every mutation except
507
+ * acquisition requires the current writer lease and checks holder, fence and
508
+ * unexpired lease inside its own transaction. Exact reads never consult a
509
+ * current pointer, and a missing or wrong-scope reference is an integrity
510
+ * failure, never a miss to be repaired by recomputation.
511
+ *
512
+ * Clock policy: each holder operation evaluates time as the larger of the
513
+ * host reading and a persisted store-wide high-water, then persists that value,
514
+ * including when the operation is rejected. Backward host movement therefore
515
+ * delays expiry and a forward jump can expire a lease early; neither lets an
516
+ * old fence act after a successor acquires, because every successor receives a
517
+ * larger fence. A host reading that is not a nonnegative safe integer fails
518
+ * the operation without any change. This is a local single-file policy, not a
519
+ * distributed-time or liveness guarantee.
520
+ *
521
+ * Storage contention: every mutation, including acquisition, is one IMMEDIATE
522
+ * SQLite transaction. When another connection, possibly in another process,
523
+ * holds SQLite's write lock past the host's bounded busy wait, nothing
524
+ * changes. Acquisition and renewal, the lease operations a waiter repeats,
525
+ * report it as their `contended` outcome ({@link IWriterContention}), so
526
+ * contention is never mistaken for ownership or staleness (PUB-005). Any other
527
+ * operation fails with Machine's `SqliteBusyError`. Whether to try again is
528
+ * always the caller's policy, never History's.
529
+ * @alpha
530
+ */
531
+ export interface IDurableHistory {
532
+ /** The logical store identity this authority holds. */
533
+ readonly logicalStore: string;
534
+ /** Exact selected reads over completed results, answered from their generated index. */
535
+ readonly reader: ICompletedResultReader & ICompletedNavigationReader;
536
+ /**
537
+ * Acquire the single logical writer, or report the observed unexpired
538
+ * holder, or report storage contention with the recorded writer. Any other
539
+ * failure, such as damaged storage or an unusable clock, is thrown.
540
+ */
541
+ acquireWriter(request: IWriterAcquisitionRequest): IWriterAcquisition;
542
+ /**
543
+ * Extend a still-valid lease, or report storage contention, which leaves the
544
+ * lease as it was. A stale or expired lease is rejected with
545
+ * `StaleWriterError`. Only the expiry changes: the durable fence is left as
546
+ * it is, never rewritten from the presented lease.
547
+ */
548
+ renewWriter(lease: IWriterLease, leaseMilliseconds: number): IWriterRenewal;
549
+ /** End a still-valid lease; the durable fence is left as it is, so the next grant still advances it. */
550
+ releaseWriter(lease: IWriterLease): void;
551
+ /** Inspect the recorded holder, if any, without granting authority. */
552
+ currentWriter(): IWriterLease | undefined;
553
+ /**
554
+ * Durably allocate one attempt in its own commit before any staging. The
555
+ * same key with the same intent returns the existing attempt in whatever
556
+ * state it reached; the same key with a different intent or version rejects.
557
+ */
558
+ allocateAttempt(lease: IWriterLease, request: IAttemptRequest): IAttemptRecord;
559
+ /** Persist candidate content for an allocated attempt without publishing it. */
560
+ stageAttempt(lease: IWriterLease, request: IStageRequest): IAttemptRecord;
561
+ /**
562
+ * In one commit, install the staged payload, its generated selected index
563
+ * and fingerprints, provenance, dependencies, the completed attempt state
564
+ * and the scoped current pointer. Publishing an already completed attempt
565
+ * returns its existing reference.
566
+ */
567
+ publishAttempt(lease: IWriterLease, attemptId: number): ICompletedResultReference;
568
+ /** End an incomplete attempt as failed or interrupted, retaining its evidence. */
569
+ abandonAttempt(lease: IWriterLease, request: IAbandonRequest): IAttemptRecord;
570
+ /** Report what durably happened to one identified execution, read-only. */
571
+ recoverAttempt(request: IAttemptRequest): IRecoveryOutcome;
572
+ /**
573
+ * Completed results admissible for one scoped subject and version, latest
574
+ * publication first: those published in the subject's environment and those
575
+ * a recorded promotion admits into it. A promoted result keeps its own exact
576
+ * reference and envelope scope; nothing from any other environment appears.
577
+ */
578
+ findCandidates(subject: IVersionedSubject): readonly ICompletedEnvelope[];
579
+ /**
580
+ * The scoped subject's latest publication in its own environment, if any;
581
+ * never rewound by acceptance and never moved by a promotion.
582
+ */
583
+ readCurrent(subject: IScopedSubject): ICompletedResultReference | undefined;
584
+ /** Read one exact result's metadata without loading its payload. */
585
+ readEnvelope(reference: ICompletedResultReference): ICompletedEnvelope;
586
+ /** Regenerate and compare one exact result's index from its canonical payload. */
587
+ verifyResult(reference: ICompletedResultReference): IResultVerification;
588
+ /** Record a current acceptance of an existing result without touching it or the current pointer. */
589
+ recordAcceptance(lease: IWriterLease, request: IAcceptanceRequest): IAcceptanceRecord;
590
+ /**
591
+ * Acceptance records naming one exact result that were recorded in the
592
+ * named environment, in record order. The environment is always explicit:
593
+ * the publishing environment, or one a promotion admits the result into.
594
+ */
595
+ readAcceptances(reference: ICompletedResultReference, environment: string): readonly IAcceptanceRecord[];
596
+ /**
597
+ * In one commit, record a promotion that admits exact results of other
598
+ * environments into the target environment. Nothing already recorded changes.
599
+ */
600
+ promoteResults(lease: IWriterLease, request: IPromotionRequest): IPromotionRecord;
601
+ /** Promotion records into one environment, in record order. */
602
+ readPromotions(query: IPromotionQuery): readonly IPromotionRecord[];
603
+ /**
604
+ * Open Run Supervision's operation journal over this store, bound to the
605
+ * declared record formats and versions. The port shares this authority's
606
+ * connection, writer lease and lifetime.
607
+ */
608
+ openJournal(declaration: IJournalDeclaration): IOperationJournal;
609
+ /** Release the SQLite file; later calls fail. */
610
+ close(): void;
611
+ }
612
+ //# sourceMappingURL=contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/durable/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,E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1
+ export {};
2
+ //# sourceMappingURL=contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../src/durable/contracts.ts"],"names":[],"mappings":""}