@haverstack/core 0.34.0 → 0.37.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 (48) hide show
  1. package/README.md +1 -1
  2. package/dist/access.d.ts +39 -34
  3. package/dist/access.d.ts.map +1 -1
  4. package/dist/access.js +94 -68
  5. package/dist/access.js.map +1 -1
  6. package/dist/changes.d.ts +22 -33
  7. package/dist/changes.d.ts.map +1 -1
  8. package/dist/changes.js +34 -48
  9. package/dist/changes.js.map +1 -1
  10. package/dist/combine.d.ts.map +1 -1
  11. package/dist/combine.js +7 -0
  12. package/dist/combine.js.map +1 -1
  13. package/dist/grants.d.ts +78 -33
  14. package/dist/grants.d.ts.map +1 -1
  15. package/dist/grants.js +164 -72
  16. package/dist/grants.js.map +1 -1
  17. package/dist/index.d.ts +3 -2
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/query-validation.d.ts +20 -1
  21. package/dist/query-validation.d.ts.map +1 -1
  22. package/dist/query-validation.js +107 -3
  23. package/dist/query-validation.js.map +1 -1
  24. package/dist/record-changes.d.ts +71 -63
  25. package/dist/record-changes.d.ts.map +1 -1
  26. package/dist/record-changes.js +129 -85
  27. package/dist/record-changes.js.map +1 -1
  28. package/dist/scoped-stack.d.ts +127 -117
  29. package/dist/scoped-stack.d.ts.map +1 -1
  30. package/dist/scoped-stack.js +222 -189
  31. package/dist/scoped-stack.js.map +1 -1
  32. package/dist/stack.d.ts +180 -160
  33. package/dist/stack.d.ts.map +1 -1
  34. package/dist/stack.js +293 -229
  35. package/dist/stack.js.map +1 -1
  36. package/dist/testing.d.ts +3 -8
  37. package/dist/testing.d.ts.map +1 -1
  38. package/dist/testing.js +42 -49
  39. package/dist/testing.js.map +1 -1
  40. package/dist/types.d.ts +128 -101
  41. package/dist/types.d.ts.map +1 -1
  42. package/dist/types.js.map +1 -1
  43. package/dist/validate.d.ts.map +1 -1
  44. package/dist/validate.js +0 -2
  45. package/dist/validate.js.map +1 -1
  46. package/dist/wire-record.d.ts.map +1 -1
  47. package/dist/wire-record.js.map +1 -1
  48. package/package.json +1 -1
package/dist/stack.d.ts CHANGED
@@ -13,8 +13,8 @@
13
13
  *
14
14
  * Apps should never talk to a StackAdapter directly.
15
15
  */
16
- import type { StackRecord, StackType, TypeSchema, TypeId, StackAdapter, StackQuery, QueryResult, Association, Permission, Migration, RecordVersion, StackFeatures, GrantAction, AttachmentContent, FileId, EntityId, AppId, TokenSession, ActorOptions, RecordChange, RecordChanges, SubscribeOptions, Unsubscribe, JournalQuery, RecordJournalEntry } from './types.js';
17
- import type { GrantTarget } from './grants.js';
16
+ import type { StackRecord, StackType, TypeSchema, TypeId, StackAdapter, StackQuery, QueryResult, AuthorityAssociation, DataAssociation, Migration, RecordVersion, StackFeatures, GrantAction, AttachmentContent, FileId, EntityId, AppId, TokenSession, ActorOptions, RecordChange, RecordChanges, SubscribeOptions, Unsubscribe, JournalQuery, RecordJournalEntry } from './types.js';
17
+ import type { GrantQuery, GrantTarget } from './grants.js';
18
18
  import { ScopedStack } from './scoped-stack.js';
19
19
  export type CreateRecordOptions = {
20
20
  /**
@@ -34,8 +34,8 @@ export type CreateRecordOptions = {
34
34
  * reconstructing a delegated write. See StackRecord.principalId.
35
35
  */
36
36
  principalId?: EntityId;
37
- permissions?: Permission[];
38
- associations?: Association[];
37
+ permissions?: AuthorityAssociation[];
38
+ associations?: DataAssociation[];
39
39
  /**
40
40
  * Create the record already unlisted, so the create event itself is
41
41
  * withheld from the feed — there is no window where the record exists
@@ -46,16 +46,11 @@ export type CreateRecordOptions = {
46
46
  };
47
47
  /**
48
48
  * CreateRecordOptions extended with createdAt/updatedAt, for backdating a
49
- * record's clock fields on import (e.g. migrating an existing archive with
50
- * its original dates). Accepted unconditionally by unscoped Stack.create().
51
- * ScopedStack.create() accepts the same two fields, but only from the
52
- * stack owner acting alone (undelegated, authenticated as themselves) — a
53
- * grantee, or a delegated app acting for the owner, is refused, since
54
- * either could otherwise forge a sort position the same way a raw `id`
55
- * could. A server built on ScopedStack inherits this automatically: an
56
- * owner-authenticated `POST /records` may carry both fields; anyone else's
57
- * request has them ignored, as before. See docs/spec/data-model.md §
58
- * Record IDs and docs/spec/wire-format.md § Records.
49
+ * record's clock fields on import. Unscoped Stack.create() accepts them
50
+ * unconditionally; ScopedStack.create() only from the stack owner acting
51
+ * alone, since a grantee or a delegated app could otherwise forge a sort
52
+ * position the same way a raw `id` could.
53
+ * See docs/spec/data-model.md § Record IDs.
59
54
  */
60
55
  export type BackdatableCreateRecordOptions = CreateRecordOptions & {
61
56
  /**
@@ -154,6 +149,21 @@ export type DeleteResult = {
154
149
  */
155
150
  referencedFileIds: FileId[];
156
151
  };
152
+ /**
153
+ * What deleteAndReturn() reports back — DeleteResult plus the record itself,
154
+ * captured inside the same atomic operation as the destroy rather than a
155
+ * read beforehand. See Stack.deleteAndReturn().
156
+ */
157
+ export type DeleteAndReturnResult = DeleteResult & {
158
+ /**
159
+ * The record as it stood at the moment of deletion: immediately before
160
+ * destruction for a hard delete, or the resulting tombstone for a soft
161
+ * delete. Null only for the hard-delete no-op — there was nothing to
162
+ * delete, and nothing to report; every other outcome throws instead of
163
+ * returning null (see Stack.delete()'s own no-op cases).
164
+ */
165
+ record: StackRecord | null;
166
+ };
157
167
  export type DefineTypeOptions = {
158
168
  migratesFrom?: TypeId;
159
169
  };
@@ -181,8 +191,9 @@ export interface StackClient {
181
191
  getOwnerEntity(): Promise<StackRecord | null>;
182
192
  /**
183
193
  * Apply a change set: any combination of content patch, `parentId`,
184
- * `permissions`, `associations` and `unlisted`, in one atomic write
185
- * producing one version. Keys are read for presence, so `unlisted: false`
194
+ * `permissions`, `associations` and `unlisted`, in one atomic write —
195
+ * producing one version where it names `contentPatch`, and none where it
196
+ * doesn't. Keys are read for presence, so `unlisted: false`
186
197
  * and `parentId: null` are changes; a change set naming no key at all is
187
198
  * a StackQueryError. Under ScopedStack each key carries its own gate and
188
199
  * one refused key refuses the call.
@@ -193,14 +204,29 @@ export interface StackClient {
193
204
  patchContent(id: string, patch: Record<string, unknown | null>, opts?: IfVersionOptions): Promise<StackRecord>;
194
205
  /**
195
206
  * Add an association. Never bumps `version`/`updatedAt` and takes no
196
- * `ifVersion` — a set-add composes correctly regardless of write order,
197
- * so it needs no OCC precondition. See docs/spec/versioning.md § Version
198
- * history.
207
+ * `ifVersion` — a set-add composes regardless of write order.
208
+ * See docs/spec/versioning.md § Version history.
199
209
  */
200
- associate(id: string, association: Association): Promise<StackRecord>;
210
+ associate(id: string, association: DataAssociation): Promise<StackRecord>;
201
211
  /** Remove an association. Never bumps `version`/`updatedAt` — see associate(). */
202
- dissociate(id: string, association: Association): Promise<StackRecord>;
212
+ dissociate(id: string, association: DataAssociation): Promise<StackRecord>;
213
+ /**
214
+ * Extend who reaches a record by one element — the record-level mirror of
215
+ * the type-level `grant()`, and the amending spelling of the
216
+ * `permissions` key, which replaces the whole set. No-bump, like
217
+ * associate(). See docs/spec/access-control.md § Record-level permissions.
218
+ */
219
+ grantAccess(id: string, permission: AuthorityAssociation): Promise<StackRecord>;
220
+ /** Withdraw one element of who reaches a record — see grantAccess(). */
221
+ revokeAccess(id: string, permission: AuthorityAssociation): Promise<StackRecord>;
203
222
  delete(id: string, opts?: DeleteRecordOptions): Promise<DeleteResult>;
223
+ /**
224
+ * delete(), plus the record it acted on — read and destroyed as one
225
+ * atomic operation, so a caller that needs the record for its own
226
+ * response (e.g. a server building a hard delete's body) never opens a
227
+ * gap between reading it and destroying it. See Stack.deleteAndReturn().
228
+ */
229
+ deleteAndReturn(id: string, opts?: DeleteRecordOptions): Promise<DeleteAndReturnResult>;
204
230
  undelete(id: string, opts?: IfVersionOptions): Promise<StackRecord>;
205
231
  getVersions(id: string): Promise<RecordVersion[]>;
206
232
  getVersion(id: string, version: number): Promise<RecordVersion | null>;
@@ -400,20 +426,14 @@ export declare class Stack implements StackClient {
400
426
  */
401
427
  get(id: string, opts?: GetRecordOptions): Promise<StackRecord | null>;
402
428
  /**
403
- * Apply a change set — content patch, `parentId`, `permissions`,
404
- * `associations`, `unlisted`, in any combination — as one atomic write
405
- * producing one version and one snapshot. Keys are read for presence, so
406
- * `unlisted: false` and `parentId: null` are changes.
429
+ * Apply a change set as one atomic write — see the StackClient
430
+ * declaration above for what it accepts. Atomicity is what it is for: a
431
+ * publish is one act, so nothing it names may half-land.
407
432
  *
408
- * Every key present is checked against the record as it stands, and a
409
- * change set already satisfied in all of them writes nothing and returns
410
- * the record unchanged. The ops the change event carries are derived
411
- * from that same comparison, so naming an aspect without moving it is
412
- * never reported as moving it.
413
- *
414
- * Content is validated against the record's *current* stored type and
415
- * `typeId` never changes (see docs/spec/data-model.md § Type
416
- * migrations). See docs/spec/data-model.md § Mutations.
433
+ * Every key present is checked against the record as it stands, and a set
434
+ * already satisfied in all of them writes nothing. Content is validated
435
+ * against the record's *current* stored type; `typeId` never changes here.
436
+ * See docs/spec/data-model.md § Mutations.
417
437
  */
418
438
  mutate(id: string, changes: RecordChanges, opts?: IfVersionOptions & ActorOptions): Promise<StackRecord>;
419
439
  /**
@@ -435,53 +455,58 @@ export declare class Stack implements StackClient {
435
455
  */
436
456
  private validateChangeSet;
437
457
  /**
438
- * Refuse a write that would leave a `_group` Record with no `admin` on
439
- * its roster. Asked of the roster the write would *produce* — the one
440
- * place a change-set check reads the post-state rather than the
441
- * pre-state, because the rule is about what is left behind rather than
442
- * what the caller named.
458
+ * Refuse a write that would leave a `_group` Record with no `admin` on its
459
+ * roster. Asked of the roster the write would *produce*, which is the
460
+ * whole of the self-removal question: an admin removing themselves passes
461
+ * while another remains and is refused when they are the last, without
462
+ * either case naming who is going.
443
463
  *
444
- * That framing is the whole of the self-removal question: an `admin`
445
- * removing themselves passes while another remains and is refused when
446
- * they are the last, and neither case needs to know whose entry went.
447
- *
448
- * Lives here rather than in `ScopedStack` deliberately. Who may write a
449
- * `_group` is a permission question and belongs to the gate up there;
450
- * this is an integrity constraint on the Record, so it binds every
451
- * requester — the stack owner included, who would otherwise be the hole
452
- * that stops anything downstream relying on the invariant.
453
- * See docs/spec/identity.md § Group.
464
+ * An integrity constraint on the Record, not a permission question, so it
465
+ * lives here rather than in `ScopedStack` and binds every requester — the
466
+ * stack owner included. See docs/spec/identity.md § Group.
454
467
  */
455
468
  private assertGroupAdminRemains;
456
469
  /**
457
- * Add an association to a record. Never bumps `version`/`updatedAt` and
458
- * never snapshots — a set-add composes correctly regardless of write
459
- * order, so it needs neither the OCC `ifVersion` guards content,
460
- * `parentId` and `permissions`, nor the rollback history that guards.
461
- * See docs/spec/versioning.md § Version history.
470
+ * Add an association to a record — no-bump and no snapshot, per the
471
+ * StackClient declaration above.
462
472
  *
463
473
  * An association the record already holds, saying the same thing, is a
464
474
  * no-op; one matching an existing association's identity but naming a
465
475
  * different `attachmentRecordId` — or none, which clears the one stored —
466
- * re-points that association in place, rather than adding a second
467
- * reference to the same file. The emitted event's `associationsAdded`
468
- * carries the association as it now stands either way; what a re-point
469
- * overwrote is kept only by the journal, on that entry's `repoint`. See
470
- * docs/spec/events.md § The event shape and docs/spec/journal.md
471
- * § The entry. Returns the record as it now stands — unchanged on a
472
- * no-op.
473
- */
474
- associate(id: string, association: Association, opts?: ActorOptions): Promise<StackRecord>;
475
- /**
476
- * Remove an association from a record. Never bumps `version`/`updatedAt`
477
- * — see associate(). Matched by kind, label, and payload. No-op if not
478
- * found. The emitted event's `associationsRemoved` names the association
479
- * by identity only — an attachment's `attachmentRecordId` is not
480
- * repeated there, since it no longer describes anything current, and the
481
- * journal is where it survives. See docs/spec/events.md § The event
482
- * shape. Returns the record as it now stands — unchanged on a no-op.
483
- */
484
- dissociate(id: string, association: Association, opts?: ActorOptions): Promise<StackRecord>;
476
+ * re-points it in place rather than adding a second reference to the same
477
+ * file. What a re-point overwrote is kept only by the journal, on that
478
+ * entry's `repoint`. See docs/spec/journal.md § The entry.
479
+ */
480
+ associate(id: string, association: DataAssociation, opts?: ActorOptions): Promise<StackRecord>;
481
+ /**
482
+ * Remove an association from a record — see associate(). Matched by kind,
483
+ * label and payload; a no-op if not found. The emitted event names the
484
+ * association by identity only, since an attachment's
485
+ * `attachmentRecordId` describes nothing current once it is gone; the
486
+ * journal is where it survives.
487
+ */
488
+ dissociate(id: string, association: DataAssociation, opts?: ActorOptions): Promise<StackRecord>;
489
+ /**
490
+ * Extend who reaches a record by one element. The spelling that survives
491
+ * two admins sharing a record at once: a `permissions` key write replaces
492
+ * the whole set, so the later of two concurrent ones drops what the
493
+ * earlier granted. No-bump, like associate(); an element the record
494
+ * already carries is a no-op.
495
+ */
496
+ grantAccess(id: string, permission: AuthorityAssociation, opts?: ActorOptions): Promise<StackRecord>;
497
+ /**
498
+ * Withdraw one element of who reaches a record — see grantAccess() for
499
+ * why this is a verb rather than a key write. An element the record does
500
+ * not carry is a no-op. Returns the record as it now stands.
501
+ */
502
+ revokeAccess(id: string, permission: AuthorityAssociation, opts?: ActorOptions): Promise<StackRecord>;
503
+ /**
504
+ * Hold a permission set to the cross-element invariant — see
505
+ * validatePermissions() in access.ts for why it reads the post-state.
506
+ */
507
+ private assertPermissionSet;
508
+ /** The record, or the not-found refusal every mutating verb owes. */
509
+ private requireRecord;
485
510
  /**
486
511
  * The checks a *caller-named* destination owes, before the cycle walk:
487
512
  * `parentId` is a real, well-formed record id. Format first, so a
@@ -496,24 +521,18 @@ export declare class Stack implements StackClient {
496
521
  private assertParentExists;
497
522
  /**
498
523
  * Refuse an edge that would make a record its own ancestor — asked at
499
- * every site that adds one: a change set naming `parentId`, a restore
500
- * putting a container back, and a create naming both its own id and a parent. Nothing
501
- * downstream (a generator deriving a page path, a folder view) is
502
- * written to survive a cycle.
524
+ * every site that adds one. Nothing downstream (a generator deriving a
525
+ * page path, a folder view) is written to survive a cycle.
503
526
  *
504
- * Walks with the unscoped adapter deliberately: a walk that skipped the
505
- * links a requester cannot read would let a cycle be assembled through
506
- * them and break the invariant for every reader. The walk is bounded
507
- * because a chain long enough to exhaust it is already pathological.
527
+ * Walks with the unscoped adapter: a walk that skipped the links a
528
+ * requester cannot read would let a cycle be assembled through them and
529
+ * break the invariant for every reader.
508
530
  *
509
531
  * Read-then-write, so two moves racing on opposite ends of one chain can
510
- * both pass — closing that means the invariant lives in the adapter,
511
- * where the write is atomic, which puts a graph constraint in the
512
- * storage contract every adapter then implements. Same deferral as
513
- * checkBindingUnique() above. Consumers that walk `parentId` should
514
- * carry a visited set rather than trust this alone; MAX_PARENT_DEPTH is
515
- * the same posture applied here.
516
- * See docs/spec/data-model.md § Reparenting.
532
+ * both pass — the same deferral as checkBindingUnique() above, since
533
+ * closing it would put a graph constraint in the storage contract.
534
+ * Consumers walking `parentId` should carry a visited set rather than
535
+ * trust this alone. See docs/spec/data-model.md § Reparenting.
517
536
  */
518
537
  private assertNoParentCycle;
519
538
  /**
@@ -528,8 +547,23 @@ export declare class Stack implements StackClient {
528
547
  * destroys the only rows naming them, so a caller who means to erase the
529
548
  * bytes too has nowhere else to read the argument from afterwards. See
530
549
  * docs/spec/attachments.md § A purge strands the bytes it referenced.
550
+ *
551
+ * deleteAndReturn() is this plus the record itself; reach for that
552
+ * instead when the caller needs the record too — building a response
553
+ * body from a separate read beforehand is exactly the race and the extra
554
+ * round trip it exists to remove.
531
555
  */
532
556
  delete(id: string, opts?: DeleteRecordOptions & ActorOptions): Promise<DeleteResult>;
557
+ /**
558
+ * delete(), reporting the record it acted on alongside the files it
559
+ * stranded: as it stood immediately before destruction for a hard
560
+ * delete, or as the resulting tombstone for a soft delete. Both are
561
+ * captured inside the same write that destroys or tombstones the record,
562
+ * never a read beforehand — a read-then-delete would leave a window
563
+ * where a concurrent write can land, get destroyed or overwritten by
564
+ * this call, and never appear in the record this returns.
565
+ */
566
+ deleteAndReturn(id: string, opts?: DeleteRecordOptions & ActorOptions): Promise<DeleteAndReturnResult>;
533
567
  /**
534
568
  * The files a record references, by the same definition
535
569
  * deleteAttachment() and the garbage sweep use: attachment associations
@@ -561,18 +595,12 @@ export declare class Stack implements StackClient {
561
595
  private resolveBaseIdFilter;
562
596
  getVersions(id: string): Promise<RecordVersion[]>;
563
597
  /**
564
- * A record's change journal, oldest first — what moved, who moved it,
565
- * and the association deltas nothing else retains. The mutation
566
- * surface's read, on the same footing as getVersions(): a log of who
567
- * changed what, gated on current read access, would make a record's past
568
- * exactly as reachable as its present. `ScopedStack` applies that gate;
569
- * this layer is unscoped and trusted by definition.
598
+ * A record's change journal, oldest first — what moved, who moved it, and
599
+ * the association deltas nothing else retains. `ScopedStack` applies the
600
+ * mutate-surface gate; this layer is unscoped and trusted by definition.
570
601
  *
571
- * An adapter with no journal to read refuses rather than answering an
572
- * empty log — "nothing changed" and "this stack does not remember" are
573
- * not the same answer, and a caller reconstructing an association's
574
- * history cannot tell them apart. A record that isn't there is
575
- * StackNotFoundError for the same reason, a purged one included.
602
+ * A record that isn't there is StackNotFoundError, a purged one included:
603
+ * a destroyed log and an empty one are not the same answer.
576
604
  * See docs/spec/journal.md § Reading it.
577
605
  */
578
606
  getJournal(id: string, query?: JournalQuery): Promise<RecordJournalEntry[]>;
@@ -580,30 +608,20 @@ export declare class Stack implements StackClient {
580
608
  /**
581
609
  * Restore a record to a previous version by creating a new version —
582
610
  * never rewrites history. The snapshot is validated against its own
583
- * stored typeId (not the record's current type), restores `parentId`
584
- * (absent on the snapshot is the root, so a restore always settles
585
- * containment), and restores neither associations nor permissions. See
586
- * docs/spec/versioning.md § Restore semantics.
611
+ * stored typeId, and puts back `content` and `typeId` alone: a snapshot
612
+ * carries nothing else. See docs/spec/versioning.md § Restore semantics.
587
613
  */
588
614
  restoreVersion(id: string, version: number, opts?: IfVersionOptions & ActorOptions): Promise<StackRecord>;
589
615
  /**
590
- * Commit a per-record migration: replace `content` and `typeId` together
591
- * in one step, validated against `toTypeId`'s schema exactly as
592
- * create()/mutate() validate against a type's schema. The single-record
593
- * counterpart to migrateAll() — content here is supplied by the caller
594
- * (computed client-side by the type's owning app, per
595
- * docs/spec/wire-format.md § Migration commit) rather than a registered
596
- * Migration function. Snapshots the prior state to version history, same
597
- * as mutate()/restoreVersion(), and takes the same optional `ifVersion`
598
- * precondition every version-bumping mutation takes — checked atomically
599
- * at the adapter, not here (see docs/spec/versioning.md § Optimistic
600
- * concurrency).
616
+ * Commit a per-record migration — the single-record counterpart to
617
+ * migrateAll(), with `content` supplied by the caller rather than by a
618
+ * registered Migration function. See docs/spec/wire-format.md § Migration
619
+ * commit.
601
620
  *
602
621
  * Because `content` is a full replacement written under a new `typeId`,
603
622
  * this is create-shaped at the destination *and* update-shaped over the
604
- * record as it stands, so it owes both sets of integrity checks — the
605
- * binding rules, the attachment rules, and `_config`'s. Missing either
606
- * half would make migrate a second, unguarded write path to the same
623
+ * record as it stands, so it owes both sets of integrity checks. Missing
624
+ * either half would make migrate a second, unguarded write path to a
607
625
  * state create()/mutate() refuse to reach.
608
626
  */
609
627
  commitMigration(id: string, toTypeId: TypeId, content: Record<string, unknown>, opts?: IfVersionOptions & ActorOptions): Promise<StackRecord>;
@@ -633,18 +651,14 @@ export declare class Stack implements StackClient {
633
651
  */
634
652
  private checkBindingsOnUpdate;
635
653
  /**
636
- * Bindings across a migration. `content` is a full replacement rather
637
- * than a patch, so there is no "field absent from the patch" case to
638
- * exempt: every binding field either keeps its value, moves to a new
639
- * one, or is shed by omission — and immutability refuses the last two
640
- * whichever family they happen in. Asked across the union of the two
641
- * families' binding fields, so a card can neither shed its DID by
642
- * migrating out of `_entity`/`_app` nor pick one up on the way in.
654
+ * Bindings across a migration. `content` is a full replacement, so every
655
+ * binding field either keeps its value, moves to a new one, or is shed by
656
+ * omission — and immutability refuses the last two. Asked across the
657
+ * union of both families' binding fields, so a card can neither shed its
658
+ * DID by migrating out of `_entity`/`_app` nor pick one up on the way in.
643
659
  *
644
- * Uniqueness is asked only of the destination family, which is where the
645
- * record's claim lives once the write lands, and excludes the record
646
- * itself — re-sending the value it already holds claims nothing.
647
- * See docs/spec/identity.md § DID bindings.
660
+ * Uniqueness is asked only of the destination family, excluding the
661
+ * record itself. See docs/spec/identity.md § DID bindings.
648
662
  */
649
663
  private checkBindingsOnMigrate;
650
664
  /**
@@ -653,16 +667,10 @@ export declare class Stack implements StackClient {
653
667
  * claiming one value would leave that lookup without a single answer, and
654
668
  * ambiguity is all an impersonating card needs. Enforced here rather than
655
669
  * by schema, since uniqueness is a property of the set, not of the value.
656
- * Called by the paths that can introduce a binding: create and update.
657
670
  *
658
- * Short-circuits on the first clash rather than materialising the family,
659
- * so a stack whose `_entity` family is larger than a single scan settles
660
- * the common case — the value is already taken — without walking the rest.
661
- *
662
- * Read-then-write, so two creates racing on one value can both pass.
663
- * Closing that properly means a unique index over a JSON field, which
664
- * each adapter would enforce separately — a decision about where
665
- * uniqueness lives, not a local fix.
671
+ * Read-then-write, so two creates racing on one value can both pass:
672
+ * closing that means a unique index over a JSON field, which is a
673
+ * decision about where uniqueness lives rather than a local fix.
666
674
  * See docs/spec/identity.md § DID bindings.
667
675
  */
668
676
  private checkBindingUnique;
@@ -826,9 +834,10 @@ export declare class Stack implements StackClient {
826
834
  assertOpen(): void;
827
835
  /**
828
836
  * Create _grant records authorizing entities to act on records of
829
- * specific types; null target writes a default grant (any authenticated
830
- * entity); `{ groupId }` targets a `_group` Record's roster instead of a
831
- * single entity.
837
+ * specific types. The target is the grantee the record carries:
838
+ * `{ kind: 'entity' }` for one DID, `{ kind: 'group' }` for a `_group`
839
+ * Record's roster at a role, `{ kind: 'authenticated' }` for any
840
+ * authenticated entity.
832
841
  *
833
842
  * Granting an **app** a `-own` action does not contain it the way the
834
843
  * suffix suggests: when that app acts for someone, `-own` is read as the
@@ -838,32 +847,44 @@ export declare class Stack implements StackClient {
838
847
  * needs, not the suffix that looks narrowest. See
839
848
  * docs/spec/access-control.md § Delegation: principal and subject.
840
849
  *
841
- * The grantee lives in content.granteeEntityId / content.granteeGroupId,
842
- * not record.entityId. See docs/spec/access-control.md § Type-level
843
- * grants.
850
+ * The grantee lives in content.grantee, not record.entityId. See
851
+ * docs/spec/access-control.md § Type-level grants.
844
852
  */
845
853
  grant(target: GrantTarget, grants: Array<{
846
854
  actions: GrantAction[];
847
855
  typeId: TypeId;
848
856
  }>): Promise<StackRecord[]>;
849
857
  /**
850
- * List _grant records. Omit `target` for all grants; pass null for only
851
- * default grants; pass `{ groupId }` for grants naming that exact group;
852
- * pass a specific entityId for the grants that currently apply to that
853
- * entity (ones naming them, ones naming a group they belong to, plus
854
- * every default grant) — the same resolution hasGrant() uses.
858
+ * List _grant records. Omit `query` for all grants;
859
+ * `{ kind: 'authenticated' }` for only default grants;
860
+ * `{ kind: 'group' }` for grants naming that exact group and role, or
861
+ * `role: 'any'` for every grant naming the group;
862
+ * `{ kind: 'entity' }` for the grants that currently apply to that entity
863
+ * (ones naming them, ones naming a group they belong to at a role they
864
+ * hold, plus every default grant) — the same resolution hasGrant() uses.
865
+ *
866
+ * Every arm but `entity` answers identity — what `grant()` would have
867
+ * written with the same argument. The `entity` arm answers coverage, so
868
+ * its result is not a preview of what `revoke()` would withdraw.
869
+ * See docs/spec/access-control.md § Type-level grants.
855
870
  */
856
- listGrants(target?: GrantTarget): Promise<StackRecord[]>;
871
+ listGrants(query?: GrantQuery): Promise<StackRecord[]>;
857
872
  /**
858
873
  * The inverse of grant(): soft-deletes _grant records matching `target`
859
- * (null for default grants) and each `{ typeId, actions }` pair, at the
860
- * same granularity grant() writes. A soft delete like any other — the
861
- * owner can undelete a revocation.
874
+ * and each `{ typeId, actions }` pair, at the same granularity grant()
875
+ * writes — the grantee is matched whole, role included. A soft delete
876
+ * like any other — the owner can undelete a revocation.
877
+ *
878
+ * Returns the grants it withdrew, as they stood, so a revocation that
879
+ * matched nothing says so rather than passing in silence. An empty result
880
+ * is not an error — a grant already withdrawn or never written is the
881
+ * ordinary case, and re-running a revocation has to stay safe.
882
+ * See docs/spec/access-control.md § Type-level grants.
862
883
  */
863
884
  revoke(target: GrantTarget, grants: Array<{
864
885
  actions: GrantAction[];
865
886
  typeId: TypeId;
866
- }>): Promise<void>;
887
+ }>): Promise<StackRecord[]>;
867
888
  /**
868
889
  * Validates the whole grant batch before any record is created, so a bad
869
890
  * entry fails clean rather than leaving a partial set written. Actions
@@ -891,13 +912,12 @@ export declare class Stack implements StackClient {
891
912
  private writeOptions;
892
913
  /**
893
914
  * Snapshot of a record's prior state, passed with the mutating adapter
894
- * call so snapshot and mutation land in one atomic write. `parentId` is
895
- * always present (`null` where the record has none) so restore can
896
- * distinguish "at the root" from a snapshot that omits the key entirely
897
- * ("leave as-is"). Never carries `associations` — associate()/
898
- * dissociate() don't bump, so no version ever snapshots the association
899
- * set, and there is nothing for a restore to roll back to. See
900
- * docs/spec/versioning.md § Version history.
915
+ * call so snapshot and mutation land in one atomic write. Carries what
916
+ * only a snapshot preserves: `content` and the `typeId` it is read
917
+ * under. Containment, listing and associations — the authority ones
918
+ * among them — are all kept by the journal instead, so no version ever
919
+ * snapshots them and there is nothing for a restore to roll them back
920
+ * to. See docs/spec/versioning.md § Version history.
901
921
  */
902
922
  private buildVersionSnapshot;
903
923
  }
@@ -1 +1 @@
1
- {"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../src/stack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA2BH,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,MAAM,EACN,YAAY,EACZ,UAAU,EAEV,WAAW,EACX,WAAW,EACX,UAAU,EACV,SAAS,EAET,aAAa,EACb,aAAa,EACb,WAAW,EAEX,iBAAiB,EACjB,MAAM,EAEN,QAAQ,EAER,KAAK,EAEL,YAAY,EACZ,YAAY,EAEZ,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAiCpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA4B/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAqChD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;;OAKG;IACH,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