@interop/was-client 0.100.1 → 0.101.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 (58) hide show
  1. package/README.md +41 -9
  2. package/dist/Collection.d.ts +21 -5
  3. package/dist/Collection.d.ts.map +1 -1
  4. package/dist/Collection.js +38 -31
  5. package/dist/Collection.js.map +1 -1
  6. package/dist/Space.d.ts +94 -22
  7. package/dist/Space.d.ts.map +1 -1
  8. package/dist/Space.js +162 -79
  9. package/dist/Space.js.map +1 -1
  10. package/dist/WasClient.d.ts.map +1 -1
  11. package/dist/WasClient.js +2 -3
  12. package/dist/WasClient.js.map +1 -1
  13. package/dist/edv/EdvCodec.d.ts.map +1 -1
  14. package/dist/edv/EdvCodec.js +7 -4
  15. package/dist/edv/EdvCodec.js.map +1 -1
  16. package/dist/edv/docCipher.js +2 -2
  17. package/dist/edv/docCipher.js.map +1 -1
  18. package/dist/internal/codec.d.ts +11 -1
  19. package/dist/internal/codec.d.ts.map +1 -1
  20. package/dist/internal/codec.js +11 -1
  21. package/dist/internal/codec.js.map +1 -1
  22. package/dist/internal/describe.d.ts +6 -0
  23. package/dist/internal/describe.d.ts.map +1 -1
  24. package/dist/internal/describe.js +18 -1
  25. package/dist/internal/describe.js.map +1 -1
  26. package/dist/internal/grant.js +1 -1
  27. package/dist/internal/grant.js.map +1 -1
  28. package/dist/internal/indexSchema.d.ts +19 -4
  29. package/dist/internal/indexSchema.d.ts.map +1 -1
  30. package/dist/internal/indexSchema.js +33 -6
  31. package/dist/internal/indexSchema.js.map +1 -1
  32. package/dist/internal/paths.d.ts +7 -3
  33. package/dist/internal/paths.d.ts.map +1 -1
  34. package/dist/internal/paths.js +7 -3
  35. package/dist/internal/paths.js.map +1 -1
  36. package/dist/internal/request.d.ts +47 -14
  37. package/dist/internal/request.d.ts.map +1 -1
  38. package/dist/internal/request.js +64 -44
  39. package/dist/internal/request.js.map +1 -1
  40. package/dist/internal/revoke.d.ts +1 -65
  41. package/dist/internal/revoke.d.ts.map +1 -1
  42. package/dist/internal/revoke.js +5 -136
  43. package/dist/internal/revoke.js.map +1 -1
  44. package/dist/internal/rootCapability.d.ts +66 -0
  45. package/dist/internal/rootCapability.d.ts.map +1 -0
  46. package/dist/internal/rootCapability.js +144 -0
  47. package/dist/internal/rootCapability.js.map +1 -0
  48. package/dist/internal/withCodec.d.ts +19 -4
  49. package/dist/internal/withCodec.d.ts.map +1 -1
  50. package/dist/internal/withCodec.js +18 -2
  51. package/dist/internal/withCodec.js.map +1 -1
  52. package/dist/internal/write.js +13 -9
  53. package/dist/internal/write.js.map +1 -1
  54. package/dist/paths.d.ts +5 -3
  55. package/dist/paths.d.ts.map +1 -1
  56. package/dist/paths.js +5 -3
  57. package/dist/paths.js.map +1 -1
  58. package/package.json +1 -1
package/dist/Space.d.ts CHANGED
@@ -336,9 +336,18 @@ export declare class Space {
336
336
  * in the peer Space and its `allowedAction` lies within `GET` and `HEAD`),
337
337
  * the peer's `fromSpace` URL, this Space's `toSpace` URL, the `role`
338
338
  * (`source`), and an optional `collections` list naming what to pull (absent
339
- * means every Collection). Controller-only: the server answers a delegated
340
- * capability with the masked 404, so open the handle with the controller's
341
- * authority.
339
+ * means every Collection).
340
+ *
341
+ * Authority on the replicas route: every method on it (`GET`, `POST`,
342
+ * `PUT`, `DELETE`) takes the controller's own capability, or a delegated
343
+ * capability whose chain roots in this Space's root capability. A delegated
344
+ * `POST` may only name a `fromSpace` the Space already has a registration
345
+ * for. Any other caller gets the masked 404, and so does every delegated
346
+ * caller on a server that still treats the route as controller-only.
347
+ * `fromCapability` refuses a grant whose target is the reserved `replicas`
348
+ * sub-resource (`{spaceUrl}replicas`), so a holder of such a grant opens
349
+ * the handle with `was.space(id, { capability })` (or
350
+ * `was.spaceAt(url, { capability })`) and calls the replica methods on it.
342
351
  *
343
352
  * Returns the stored record, as the server serves it back. The registration
344
353
  * is per-server state: it is not replicated or exported, and deleting the
@@ -359,20 +368,21 @@ export declare class Space {
359
368
  /**
360
369
  * Lists this Space's replica registrations (`GET /space/:id/replicas`): the
361
370
  * unpaginated `{ url, totalItems, items }` listing, each item a full
362
- * registration with its pull capability. Controller-only, like the records
363
- * it lists; returns `null` if the Space is missing or the caller is not its
364
- * controller (404 conflation caveat). A 2xx with no JSON body throws
365
- * `WasServerError` rather than reading as an empty listing.
371
+ * registration with its pull capability. Takes the authority
372
+ * {@link registerReplica} describes; returns `null` if the Space is
373
+ * missing or the caller holds none (404 conflation caveat). A 2xx with no
374
+ * JSON body throws `WasServerError` rather than reading as an empty
375
+ * listing.
366
376
  *
367
377
  * @returns {Promise<ReplicaListing | null>}
368
378
  */
369
379
  replicas(): Promise<ReplicaListing | null>;
370
380
  /**
371
381
  * Reads one replica registration by id
372
- * (`GET /space/:id/replicas/:replicaId`). Controller-only; returns `null`
373
- * if the registration or the Space is missing, or the caller is not the
374
- * controller (404 conflation caveat). A 2xx with no JSON body throws
375
- * `WasServerError`.
382
+ * (`GET /space/:id/replicas/:replicaId`). Takes the authority
383
+ * {@link registerReplica} describes; returns `null` if the registration or
384
+ * the Space is missing, or the caller holds none (404 conflation caveat).
385
+ * A 2xx with no JSON body throws `WasServerError`.
376
386
  *
377
387
  * @param replicaId {string}
378
388
  * @returns {Promise<ReplicaRegistration | null>}
@@ -382,12 +392,13 @@ export declare class Space {
382
392
  * Removes a replica registration (`DELETE /space/:id/replicas/:replicaId`)
383
393
  * and reports the server's answer. The data already pulled under it stays.
384
394
  *
385
- * Controller-only, and the server answers a delegated capability with the
386
- * same masked 404 as an absent registration, so the 404 is not swallowed as
387
- * success the way an idempotent delete would: `'not-found'` means "absent
388
- * or refused", and only a caller with its own prior discovery (a
389
- * {@link replica} read under the same authority) may read it as absence. A
390
- * caller that wants removing twice to be a no-op ignores the outcome.
395
+ * Takes the authority {@link registerReplica} describes, and the server
396
+ * answers a caller without it with the same masked 404 as an absent
397
+ * registration, so the 404 is not swallowed as success the way an
398
+ * idempotent delete would: `'not-found'` means "absent or refused", and
399
+ * only a caller with its own prior discovery (a {@link replica} read under
400
+ * the same authority) may read it as absence. A caller that wants removing
401
+ * twice to be a no-op ignores the outcome.
391
402
  *
392
403
  * The server refuses with `ConflictError` (409, `replica-refused`) when the
393
404
  * registration is the one that maps this Space's did:webvh controller,
@@ -403,16 +414,77 @@ export declare class Space {
403
414
  /**
404
415
  * Reads the pull loop's runtime state for one registration
405
416
  * (`GET /space/:id/replicas/:replicaId/status`): the loop `state` (`idle`,
406
- * `pulling`, `backing-off`, `stalled`), its cycle timestamps, and one entry
407
- * per Collection with its own `state` and, while stalled, a `stall` naming
408
- * the `ReplicaStallReason` and when it began. Uncacheable and controller-
409
- * only; returns `null` (and throws on a bodiless 2xx) on the same terms as
410
- * {@link replica}.
417
+ * `pulling`, `paused`, `backing-off`, `stalled`), its cycle timestamps, and
418
+ * one entry per Collection with its own `state` and, while stalled, a
419
+ * `stall` naming the `ReplicaStallReason` and when it began. `paused` means
420
+ * the registration carries `pausedAt` ({@link pauseReplica}), and no cycle
421
+ * runs until {@link resumeReplica} clears it. Uncacheable; takes the
422
+ * authority {@link registerReplica} describes, and returns `null` (and
423
+ * throws on a bodiless 2xx) on the same terms as {@link replica}.
411
424
  *
412
425
  * @param replicaId {string}
413
426
  * @returns {Promise<ReplicaStatus | null>}
414
427
  */
415
428
  replicaStatus(replicaId: string): Promise<ReplicaStatus | null>;
429
+ /**
430
+ * Pauses a registration's pull loop: a `PUT` of the stored registration at
431
+ * `/space/:id/replicas/:replicaId` with `pausedAt` set. The server writes
432
+ * its own time into `pausedAt` (the value sent is ignored) and keeps it
433
+ * while the registration stays paused, so pausing twice changes nothing.
434
+ * {@link replicaStatus} reads `paused` from then on, the data already
435
+ * pulled stays, and the registration keeps its `id` and its checkpoint, so
436
+ * a {@link resumeReplica} continues where the loop stopped. Stopping a
437
+ * replica pauses it rather than removing the registration, which the
438
+ * server refuses for the one mapping this Space's did:webvh controller.
439
+ *
440
+ * A compare-and-swap: the registration is read with its `ETag`, changed,
441
+ * and written back under `If-Match`, rebasing on a write that lands in
442
+ * between and surfacing `PreconditionFailedError` (412,
443
+ * `precondition-failed`) only if it keeps losing the race. Throws
444
+ * `NotFoundError` when the read gets the masked 404 (the registration is
445
+ * absent, or the caller holds no authority on the route): a `PUT` there
446
+ * would register a new replica, which a pause never means to. Takes the
447
+ * authority {@link registerReplica} describes.
448
+ *
449
+ * @param replicaId {string}
450
+ * @returns {Promise<void>}
451
+ */
452
+ pauseReplica(replicaId: string): Promise<void>;
453
+ /**
454
+ * Resumes a paused registration's pull loop: a `PUT` of the stored
455
+ * registration with `pausedAt` omitted. The loop wakes at once, continuing
456
+ * from the checkpoint the pause left. Resuming a registration that is not
457
+ * paused changes nothing. Same compare-and-swap and errors as
458
+ * {@link pauseReplica}.
459
+ *
460
+ * @param replicaId {string}
461
+ * @returns {Promise<void>}
462
+ */
463
+ resumeReplica(replicaId: string): Promise<void>;
464
+ /**
465
+ * Replaces a registration's pull capability in place: a `PUT` of the
466
+ * stored registration with the new `capability`, every other member as
467
+ * stored (`pausedAt` included, so a paused registration stays paused). The
468
+ * registration keeps its `id`, its loop and its checkpoint, which a
469
+ * deregister-and-register would lose. A pull grant dies with the signer
470
+ * that delegated it, so this is the call to make before that signer is
471
+ * withdrawn.
472
+ *
473
+ * The new capability passes the peer checks a {@link registerReplica}
474
+ * does: it is `ConflictError` (409, `replica-refused`) when its controller
475
+ * is not the server's DID, its chain does not root in `fromSpace`, or the
476
+ * peer cannot be read under it, and `ValidationError` (400,
477
+ * `invalid-request-body`, pointer `#/capability`) when it is malformed. A
478
+ * capability equal to the stored one is accepted without a peer read. Same
479
+ * compare-and-swap and errors as {@link pauseReplica}.
480
+ *
481
+ * @param replicaId {string}
482
+ * @param capability {IDelegatedZcap} the new pull capability: delegated
483
+ * to the server's DID, rooted in the peer Space, `allowedAction` within
484
+ * `GET` and `HEAD`
485
+ * @returns {Promise<void>}
486
+ */
487
+ replaceReplicaCapability(replicaId: string, capability: IDelegatedZcap): Promise<void>;
416
488
  /**
417
489
  * Delegates access to this space. Prefills the grant `target` with this
418
490
  * space's URL (and the bound `capability`, if any, for re-delegation).
@@ -1 +1 @@
1
- {"version":3,"file":"Space.d.ts","sourceRoot":"","sources":["../src/Space.ts"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAG1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAiBlE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,KAAK,EACL,WAAW,EACX,OAAO,EACP,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,gBAAgB,EACjB,MAAM,YAAY,CAAA;AAyGnB,qBAAa,KAAK;;IAChB;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAA;IAM/B;;;;;;;;;OASG;gBACS,EACV,OAAO,EACP,QAAQ,EACR,UAAU,EACV,UAAU,EACX,EAAE;QACD,OAAO,EAAE,aAAa,CAAA;QACtB,QAAQ,EAAE,MAAM,CAAA;QAChB,UAAU,CAAC,EAAE,KAAK,CAAA;QAClB,UAAU,CAAC,EAAE,kBAAkB,CAAA;KAChC;IAmBD;;;;;;OAMG;IACG,QAAQ,IAAI,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAO/C;;;;;;;;;OASG;IACG,gBAAgB,IAAI,OAAO,CAAC;QAChC,WAAW,EAAE,aAAa,CAAA;QAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,GAAG,IAAI,CAAC;IAQT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,YAAY,IAAI,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAUzD;;;;;OAKG;IACG,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC;IAoB1D;;;;;;;;;;;OAWG;IACG,SAAS,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAOjD;;;;;;;;;OASG;IACG,iBAAiB,IAAI,OAAO,CAAC;QACjC,MAAM,EAAE,cAAc,CAAA;QACtB,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,GAAG,IAAI,CAAC;IAOT;;;;;;;;;;;;;;OAcG;IACG,SAAS,CACb,MAAM,EAAE,cAAc,EACtB,EAAE,OAAO,EAAE,WAAW,EAAE,GAAE,iBAAsB,GAC/C,OAAO,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAU7B;;;;;;OAMG;IACG,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IAOlC;;;;;;;;;;OAUG;IACG,SAAS,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,GAAE,iBAAsB,GAAG,OAAO,CAAC;QACzE,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAC;IASF;;;;;;;;;;;;OAYG;IACG,WAAW,CAAC,EAAE,OAAO,EAAE,GAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC;QACjE,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAC;IAQF;;;;;OAKG;IACG,OAAO,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;CAMzC"}
package/dist/Space.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { canonicalSpaceUrl, spaceIdOfCanonicalUrl, spaceMetaUrl, spaceExportUrl, spaceImportUrl, spaceBackendsUrl, registeredBackendUrl, spaceQuotasUrl, spacePolicyUrl, spaceLinksetUrl, spaceReplicasUrl, replicaRegistrationUrl, replicaStatusUrl } from './internal/paths.js';
2
2
  import { assertNotReserved } from './internal/reserved.js';
3
- import { composeAndSwap } from './internal/cas.js';
3
+ import { compareAndSwap, composeAndSwap } from './internal/cas.js';
4
4
  import { collectionWritableFields, unreadableDescriptionError } from './internal/describe.js';
5
5
  import { delegateGrantAt } from './internal/grant.js';
6
6
  import { submitRevocation } from './internal/revoke.js';
7
- import { send, readData, readDataWithEtag } from './internal/request.js';
7
+ import { send, readData, readDataWithEtag, missingJsonBodyError } from './internal/request.js';
8
8
  import { readEtag, writeHeaders } from './internal/conditional.js';
9
9
  import { collectWalk, signedPageWalk, walkPagesOrEmpty } from './internal/pagination.js';
10
10
  import { NotFoundError, WasServerError } from './errors.js';
@@ -32,58 +32,6 @@ function spaceMetadataBody({ id, name, controller, type }) {
32
32
  ...(type !== undefined && { type })
33
33
  };
34
34
  }
35
- /**
36
- * The error for a successful response that carried no parsed JSON body where
37
- * one is required. The request layer parses a body into `data` only for a JSON
38
- * content type, so naming the content type the server sent points at the
39
- * cause (a mislabeled or body-less 2xx).
40
- *
41
- * @param options {object}
42
- * @param options.response {HttpResponse | null}
43
- * @param options.operation {string} the request, as the message's subject
44
- * @param options.expected {string} what the body should have carried
45
- * @returns {WasServerError}
46
- */
47
- function missingJsonBodyError({ response, operation, expected }) {
48
- const contentType = response?.headers.get('content-type') ?? 'no content-type';
49
- return new WasServerError(`${operation} response carried no JSON body (the server sent ` +
50
- `${contentType}); expected ${expected}.`);
51
- }
52
- /**
53
- * A controller-only `GET` of a replica record: `null` on the masked 404
54
- * (missing, or the caller is not the controller), the parsed body otherwise.
55
- * Unlike `readData`, a 2xx with no JSON body is a server fault
56
- * (`WasServerError`), so a misbehaving server is not read as "nothing
57
- * registered".
58
- *
59
- * @param context {ClientContext}
60
- * @param options {object}
61
- * @param options.url {string}
62
- * @param [options.capability] {IZcap}
63
- * @param options.expected {string} what the body should have carried, for
64
- * the error message
65
- * @returns {Promise<T | null>}
66
- */
67
- async function readReplicaRecord(context, { url, capability, expected }) {
68
- const response = await send(context, {
69
- url,
70
- method: 'GET',
71
- capability,
72
- read: true
73
- });
74
- if (response === null) {
75
- return null;
76
- }
77
- const record = dataOrNull(response);
78
- if (record === null) {
79
- throw missingJsonBodyError({
80
- response,
81
- operation: 'Replica read',
82
- expected
83
- });
84
- }
85
- return record;
86
- }
87
35
  export class Space {
88
36
  /**
89
37
  * The Space's absolute URL in canonical (trailing-slash) form, as the
@@ -624,9 +572,18 @@ export class Space {
624
572
  * in the peer Space and its `allowedAction` lies within `GET` and `HEAD`),
625
573
  * the peer's `fromSpace` URL, this Space's `toSpace` URL, the `role`
626
574
  * (`source`), and an optional `collections` list naming what to pull (absent
627
- * means every Collection). Controller-only: the server answers a delegated
628
- * capability with the masked 404, so open the handle with the controller's
629
- * authority.
575
+ * means every Collection).
576
+ *
577
+ * Authority on the replicas route: every method on it (`GET`, `POST`,
578
+ * `PUT`, `DELETE`) takes the controller's own capability, or a delegated
579
+ * capability whose chain roots in this Space's root capability. A delegated
580
+ * `POST` may only name a `fromSpace` the Space already has a registration
581
+ * for. Any other caller gets the masked 404, and so does every delegated
582
+ * caller on a server that still treats the route as controller-only.
583
+ * `fromCapability` refuses a grant whose target is the reserved `replicas`
584
+ * sub-resource (`{spaceUrl}replicas`), so a holder of such a grant opens
585
+ * the handle with `was.space(id, { capability })` (or
586
+ * `was.spaceAt(url, { capability })`) and calls the replica methods on it.
630
587
  *
631
588
  * Returns the stored record, as the server serves it back. The registration
632
589
  * is per-server state: it is not replicated or exported, and deleting the
@@ -663,15 +620,16 @@ export class Space {
663
620
  /**
664
621
  * Lists this Space's replica registrations (`GET /space/:id/replicas`): the
665
622
  * unpaginated `{ url, totalItems, items }` listing, each item a full
666
- * registration with its pull capability. Controller-only, like the records
667
- * it lists; returns `null` if the Space is missing or the caller is not its
668
- * controller (404 conflation caveat). A 2xx with no JSON body throws
669
- * `WasServerError` rather than reading as an empty listing.
623
+ * registration with its pull capability. Takes the authority
624
+ * {@link registerReplica} describes; returns `null` if the Space is
625
+ * missing or the caller holds none (404 conflation caveat). A 2xx with no
626
+ * JSON body throws `WasServerError` rather than reading as an empty
627
+ * listing.
670
628
  *
671
629
  * @returns {Promise<ReplicaListing | null>}
672
630
  */
673
631
  async replicas() {
674
- return readReplicaRecord(this.#context, {
632
+ return readData(this.#context, {
675
633
  url: spaceReplicasUrl({ spaceUrl: this.url }),
676
634
  capability: this.#capability,
677
635
  expected: 'the replica listing'
@@ -679,16 +637,16 @@ export class Space {
679
637
  }
680
638
  /**
681
639
  * Reads one replica registration by id
682
- * (`GET /space/:id/replicas/:replicaId`). Controller-only; returns `null`
683
- * if the registration or the Space is missing, or the caller is not the
684
- * controller (404 conflation caveat). A 2xx with no JSON body throws
685
- * `WasServerError`.
640
+ * (`GET /space/:id/replicas/:replicaId`). Takes the authority
641
+ * {@link registerReplica} describes; returns `null` if the registration or
642
+ * the Space is missing, or the caller holds none (404 conflation caveat).
643
+ * A 2xx with no JSON body throws `WasServerError`.
686
644
  *
687
645
  * @param replicaId {string}
688
646
  * @returns {Promise<ReplicaRegistration | null>}
689
647
  */
690
648
  async replica(replicaId) {
691
- return readReplicaRecord(this.#context, {
649
+ return readData(this.#context, {
692
650
  url: replicaRegistrationUrl({ spaceUrl: this.url, replicaId }),
693
651
  capability: this.#capability,
694
652
  expected: 'the replica registration'
@@ -698,12 +656,13 @@ export class Space {
698
656
  * Removes a replica registration (`DELETE /space/:id/replicas/:replicaId`)
699
657
  * and reports the server's answer. The data already pulled under it stays.
700
658
  *
701
- * Controller-only, and the server answers a delegated capability with the
702
- * same masked 404 as an absent registration, so the 404 is not swallowed as
703
- * success the way an idempotent delete would: `'not-found'` means "absent
704
- * or refused", and only a caller with its own prior discovery (a
705
- * {@link replica} read under the same authority) may read it as absence. A
706
- * caller that wants removing twice to be a no-op ignores the outcome.
659
+ * Takes the authority {@link registerReplica} describes, and the server
660
+ * answers a caller without it with the same masked 404 as an absent
661
+ * registration, so the 404 is not swallowed as success the way an
662
+ * idempotent delete would: `'not-found'` means "absent or refused", and
663
+ * only a caller with its own prior discovery (a {@link replica} read under
664
+ * the same authority) may read it as absence. A caller that wants removing
665
+ * twice to be a no-op ignores the outcome.
707
666
  *
708
667
  * The server refuses with `ConflictError` (409, `replica-refused`) when the
709
668
  * registration is the one that maps this Space's did:webvh controller,
@@ -725,22 +684,146 @@ export class Space {
725
684
  /**
726
685
  * Reads the pull loop's runtime state for one registration
727
686
  * (`GET /space/:id/replicas/:replicaId/status`): the loop `state` (`idle`,
728
- * `pulling`, `backing-off`, `stalled`), its cycle timestamps, and one entry
729
- * per Collection with its own `state` and, while stalled, a `stall` naming
730
- * the `ReplicaStallReason` and when it began. Uncacheable and controller-
731
- * only; returns `null` (and throws on a bodiless 2xx) on the same terms as
732
- * {@link replica}.
687
+ * `pulling`, `paused`, `backing-off`, `stalled`), its cycle timestamps, and
688
+ * one entry per Collection with its own `state` and, while stalled, a
689
+ * `stall` naming the `ReplicaStallReason` and when it began. `paused` means
690
+ * the registration carries `pausedAt` ({@link pauseReplica}), and no cycle
691
+ * runs until {@link resumeReplica} clears it. Uncacheable; takes the
692
+ * authority {@link registerReplica} describes, and returns `null` (and
693
+ * throws on a bodiless 2xx) on the same terms as {@link replica}.
733
694
  *
734
695
  * @param replicaId {string}
735
696
  * @returns {Promise<ReplicaStatus | null>}
736
697
  */
737
698
  async replicaStatus(replicaId) {
738
- return readReplicaRecord(this.#context, {
699
+ return readData(this.#context, {
739
700
  url: replicaStatusUrl({ spaceUrl: this.url, replicaId }),
740
701
  capability: this.#capability,
741
702
  expected: 'the pull loop status'
742
703
  });
743
704
  }
705
+ /**
706
+ * Pauses a registration's pull loop: a `PUT` of the stored registration at
707
+ * `/space/:id/replicas/:replicaId` with `pausedAt` set. The server writes
708
+ * its own time into `pausedAt` (the value sent is ignored) and keeps it
709
+ * while the registration stays paused, so pausing twice changes nothing.
710
+ * {@link replicaStatus} reads `paused` from then on, the data already
711
+ * pulled stays, and the registration keeps its `id` and its checkpoint, so
712
+ * a {@link resumeReplica} continues where the loop stopped. Stopping a
713
+ * replica pauses it rather than removing the registration, which the
714
+ * server refuses for the one mapping this Space's did:webvh controller.
715
+ *
716
+ * A compare-and-swap: the registration is read with its `ETag`, changed,
717
+ * and written back under `If-Match`, rebasing on a write that lands in
718
+ * between and surfacing `PreconditionFailedError` (412,
719
+ * `precondition-failed`) only if it keeps losing the race. Throws
720
+ * `NotFoundError` when the read gets the masked 404 (the registration is
721
+ * absent, or the caller holds no authority on the route): a `PUT` there
722
+ * would register a new replica, which a pause never means to. Takes the
723
+ * authority {@link registerReplica} describes.
724
+ *
725
+ * @param replicaId {string}
726
+ * @returns {Promise<void>}
727
+ */
728
+ async pauseReplica(replicaId) {
729
+ await this.#replaceReplica({
730
+ replicaId,
731
+ change: stored => ({ ...stored, pausedAt: new Date().toISOString() })
732
+ });
733
+ }
734
+ /**
735
+ * Resumes a paused registration's pull loop: a `PUT` of the stored
736
+ * registration with `pausedAt` omitted. The loop wakes at once, continuing
737
+ * from the checkpoint the pause left. Resuming a registration that is not
738
+ * paused changes nothing. Same compare-and-swap and errors as
739
+ * {@link pauseReplica}.
740
+ *
741
+ * @param replicaId {string}
742
+ * @returns {Promise<void>}
743
+ */
744
+ async resumeReplica(replicaId) {
745
+ await this.#replaceReplica({
746
+ replicaId,
747
+ change: ({ pausedAt: _pausedAt, ...resumed }) => resumed
748
+ });
749
+ }
750
+ /**
751
+ * Replaces a registration's pull capability in place: a `PUT` of the
752
+ * stored registration with the new `capability`, every other member as
753
+ * stored (`pausedAt` included, so a paused registration stays paused). The
754
+ * registration keeps its `id`, its loop and its checkpoint, which a
755
+ * deregister-and-register would lose. A pull grant dies with the signer
756
+ * that delegated it, so this is the call to make before that signer is
757
+ * withdrawn.
758
+ *
759
+ * The new capability passes the peer checks a {@link registerReplica}
760
+ * does: it is `ConflictError` (409, `replica-refused`) when its controller
761
+ * is not the server's DID, its chain does not root in `fromSpace`, or the
762
+ * peer cannot be read under it, and `ValidationError` (400,
763
+ * `invalid-request-body`, pointer `#/capability`) when it is malformed. A
764
+ * capability equal to the stored one is accepted without a peer read. Same
765
+ * compare-and-swap and errors as {@link pauseReplica}.
766
+ *
767
+ * @param replicaId {string}
768
+ * @param capability {IDelegatedZcap} the new pull capability: delegated
769
+ * to the server's DID, rooted in the peer Space, `allowedAction` within
770
+ * `GET` and `HEAD`
771
+ * @returns {Promise<void>}
772
+ */
773
+ async replaceReplicaCapability(replicaId, capability) {
774
+ await this.#replaceReplica({
775
+ replicaId,
776
+ change: stored => ({ ...stored, capability })
777
+ });
778
+ }
779
+ /**
780
+ * The compare-and-swap behind {@link pauseReplica}, {@link resumeReplica}
781
+ * and {@link replaceReplicaCapability}: the shared `compareAndSwap` loop
782
+ * over a store whose read is the registration `GET` with its `ETag` and
783
+ * whose replace is the `PUT` under `If-Match`. The loop refuses a read
784
+ * that served no `ETag` with `NotSupportedError` rather than writing
785
+ * unconditionally. The body goes back as read, stamp members included: the
786
+ * server ignores them in a write body. The masked 404 on the read is
787
+ * `NotFoundError`, since a `PUT` at an absent registration would create
788
+ * one and none of the three means to.
789
+ *
790
+ * @param options {object}
791
+ * @param options.replicaId {string}
792
+ * @param options.change {function} `(stored) => record`, the registration
793
+ * to write
794
+ * @returns {Promise<void>}
795
+ */
796
+ async #replaceReplica({ replicaId, change }) {
797
+ const url = replicaRegistrationUrl({ spaceUrl: this.url, replicaId });
798
+ await compareAndSwap({
799
+ store: {
800
+ read: async () => {
801
+ const read = await readDataWithEtag(this.#context, {
802
+ url,
803
+ capability: this.#capability,
804
+ expected: 'the replica registration'
805
+ });
806
+ if (read === null) {
807
+ throw new NotFoundError(`Replica registration "${replicaId}" was not found at "${url}", ` +
808
+ 'or the caller holds no authority on the replicas route, so ' +
809
+ 'it cannot be changed.', { status: 404, requestUrl: url });
810
+ }
811
+ return { value: read.data, etag: read.etag };
812
+ },
813
+ replace: async (value, { ifMatch }) => {
814
+ await send(this.#context, {
815
+ url,
816
+ method: 'PUT',
817
+ capability: this.#capability,
818
+ json: value,
819
+ headers: writeHeaders({ precondition: { ifMatch } })
820
+ });
821
+ }
822
+ },
823
+ mutate: change,
824
+ operation: `Replica registration "${replicaId}" change`
825
+ });
826
+ }
744
827
  /**
745
828
  * Delegates access to this space. Prefills the grant `target` with this
746
829
  * space's URL (and the bound `capability`, if any, for re-delegation).
package/dist/Space.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Space.js","sourceRoot":"","sources":["../src/Space.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAElE,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,EACjB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAC3E,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EAChB,MAAM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OAAO,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAmC/B;;;;;;;;;;;;;OAaG;IACG,oBAAoB,CAAC,EACzB,aAAa,EACd,EAAE;QACD,aAAa,EAAE,MAAM,CAAA;KACtB,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC;IAI3C;;;;;;;;;;OAUG;IACI,yBAAyB,CAAC,EAC/B,aAAa,EACd,EAAE;QACD,aAAa,EAAE,MAAM,CAAA;KACtB,GAAG,cAAc,CAAC,uBAAuB,CAAC;IAI3C;;;;;;;;;;OAUG;IACI,yBAAyB,CAAC,EAC/B,aAAa,EACd,EAAE;QACD,aAAa,EAAE,MAAM,CAAA;KACtB,GAAG,cAAc,CAAC,eAAe,CAAC;IAInC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,cAAc,CACZ,IAAI,EAAE,KAAK,EACX,EAAE,UAAU,EAAE,GAAE;QAAE,UAAU,CAAC,EAAE,kBAAkB,CAAA;KAAO,GACvD,KAAK,GAAG,UAAU,GAAG,QAAQ;IAkEhC;;;;;;;;;;;;;OAaG;IACG,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;IAI3D;;;;;;;;;;;;;;;;OAgBG;IACG,MAAM,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAOjD;;;;;;;;;;;OAWG;IACG,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;CAG5D"}
package/dist/WasClient.js CHANGED
@@ -4,7 +4,8 @@ import { send, rawRequest, unsignedRequest } from './internal/request.js';
4
4
  import { parseResource, readJsonData } from './internal/content.js';
5
5
  import { buildPageWalk, collectPages, collectWalk, signedPageWalk, walkItems, walkPagesOrEmpty } from './internal/pagination.js';
6
6
  import { delegateGrant } from './internal/grant.js';
7
- import { spaceUrlOf, submitRevocation } from './internal/revoke.js';
7
+ import { submitRevocation } from './internal/revoke.js';
8
+ import { spaceUrlOf } from './internal/rootCapability.js';
8
9
  import { Memo } from './internal/memo.js';
9
10
  import { discoverService, readServiceDescription, selectServiceVersion } from './internal/service.js';
10
11
  import { IncompatibleServerError, NotSupportedError, ValidationError, WasServerError } from './errors.js';
@@ -504,8 +505,6 @@ export class WasClient {
504
505
  method: 'GET',
505
506
  read: true
506
507
  });
507
- // An unsigned response is a raw `fetch` `Response` (no pre-parsed
508
- // `data`), so the page body is read via `readJsonData`.
509
508
  return pageResponse === null
510
509
  ? null
511
510
  : (await readJsonData(pageResponse));