@interop/was-client 0.68.0 → 0.70.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 (73) hide show
  1. package/README.md +26 -0
  2. package/dist/Collection.d.ts.map +1 -1
  3. package/dist/Collection.js +2 -2
  4. package/dist/Collection.js.map +1 -1
  5. package/dist/Space.d.ts +8 -2
  6. package/dist/Space.d.ts.map +1 -1
  7. package/dist/Space.js +19 -4
  8. package/dist/Space.js.map +1 -1
  9. package/dist/WasClient.d.ts +4 -0
  10. package/dist/WasClient.d.ts.map +1 -1
  11. package/dist/WasClient.js +18 -6
  12. package/dist/WasClient.js.map +1 -1
  13. package/dist/edv/EdvCodec.d.ts +56 -74
  14. package/dist/edv/EdvCodec.d.ts.map +1 -1
  15. package/dist/edv/EdvCodec.js +12 -118
  16. package/dist/edv/EdvCodec.js.map +1 -1
  17. package/dist/edv/WasTransport.d.ts +1 -1
  18. package/dist/edv/WasTransport.d.ts.map +1 -1
  19. package/dist/edv/WasTransport.js +1 -1
  20. package/dist/edv/WasTransport.js.map +1 -1
  21. package/dist/edv/core.d.ts +81 -0
  22. package/dist/edv/core.d.ts.map +1 -0
  23. package/dist/edv/core.js +74 -0
  24. package/dist/edv/core.js.map +1 -0
  25. package/dist/edv/docCipher.d.ts.map +1 -1
  26. package/dist/edv/docCipher.js +16 -8
  27. package/dist/edv/docCipher.js.map +1 -1
  28. package/dist/edv/encryption.d.ts +71 -0
  29. package/dist/edv/encryption.d.ts.map +1 -0
  30. package/dist/edv/encryption.js +92 -0
  31. package/dist/edv/encryption.js.map +1 -0
  32. package/dist/edv/index.d.ts +17 -58
  33. package/dist/edv/index.d.ts.map +1 -1
  34. package/dist/edv/index.js +20 -51
  35. package/dist/edv/index.js.map +1 -1
  36. package/dist/edv/transportFactory.d.ts +17 -0
  37. package/dist/edv/transportFactory.d.ts.map +1 -0
  38. package/dist/edv/transportFactory.js +32 -0
  39. package/dist/edv/transportFactory.js.map +1 -0
  40. package/dist/index.d.ts +7 -1
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/internal/codec.js +2 -1
  43. package/dist/internal/codec.js.map +1 -1
  44. package/dist/internal/describe.d.ts +1 -43
  45. package/dist/internal/describe.d.ts.map +1 -1
  46. package/dist/internal/describe.js +23 -28
  47. package/dist/internal/describe.js.map +1 -1
  48. package/dist/internal/grant.d.ts +2 -0
  49. package/dist/internal/grant.d.ts.map +1 -1
  50. package/dist/internal/grant.js +11 -0
  51. package/dist/internal/grant.js.map +1 -1
  52. package/dist/internal/meta.d.ts +22 -0
  53. package/dist/internal/meta.d.ts.map +1 -1
  54. package/dist/internal/meta.js +40 -4
  55. package/dist/internal/meta.js.map +1 -1
  56. package/dist/internal/paths.d.ts +9 -2
  57. package/dist/internal/paths.d.ts.map +1 -1
  58. package/dist/internal/paths.js +9 -2
  59. package/dist/internal/paths.js.map +1 -1
  60. package/dist/internal/request.d.ts +8 -1
  61. package/dist/internal/request.d.ts.map +1 -1
  62. package/dist/internal/request.js.map +1 -1
  63. package/dist/paths.d.ts +1 -0
  64. package/dist/paths.d.ts.map +1 -1
  65. package/dist/sync/index.d.ts +17 -8
  66. package/dist/sync/index.d.ts.map +1 -1
  67. package/dist/sync/index.js +17 -8
  68. package/dist/sync/index.js.map +1 -1
  69. package/dist/sync/predicates.d.ts +24 -11
  70. package/dist/sync/predicates.d.ts.map +1 -1
  71. package/dist/sync/predicates.js +24 -11
  72. package/dist/sync/predicates.js.map +1 -1
  73. package/package.json +9 -3
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EACL,SAAS,EACT,SAAS,EACT,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,cAAc,EACd,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EACL,SAAS,EACT,SAAS,EACT,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,cAAc,EACd,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACvE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA"}
@@ -13,6 +13,11 @@
13
13
  * - `createPlaintextDocCipher` / `isEncryptedEnvelope` -- the identity cipher
14
14
  * for a plaintext content-addressed collection, and the envelope predicate,
15
15
  * both free of the `@interop/was-client/edv` crypto graph.
16
+ * - `requireResourceId` -- the guard both built-in ciphers run first, exported
17
+ * so a consumer writing its own `DocCipher` refuses a missing resource id
18
+ * the same way instead of hand-rolling the check. It raises a
19
+ * `ValidationError`, which reports a caller passing no id rather than a
20
+ * condition to classify and recover from, so no predicate ships for it.
16
21
  * - `ensureSpaceAndCollection` / `ensureSpace` -- idempotent Space +
17
22
  * Collection provisioning, and its Space half alone (ensure the Space once,
18
23
  * then thread the returned description through every collection).
@@ -20,10 +25,11 @@
20
25
  * `isUnknownEpochError` / `isKeyUnwrapError` / `isIntegrityError` /
21
26
  * `isNotSupportedError` -- the classification contract for the signals
22
27
  * below. A consumer matches by `err.name` and never with `instanceof`,
23
- * because every one of these errors is raised inside a seam the app injects
24
- * (the port, the caller's `DocCipher`) and that seam can resolve to a second
25
- * copy of this package. Reading a property off the matched value, such as
26
- * `status` on an auth error, is the intended shape.
28
+ * because these errors are raised inside a seam the app injects (the port,
29
+ * the caller's `DocCipher`) and that seam can resolve to a second copy of
30
+ * this package. The affordance gate is raised outside a seam but matched the
31
+ * same way, so the rule has no exceptions. Reading a property off the
32
+ * matched value, such as `status` on an auth error, is the intended shape.
27
33
  *
28
34
  * The 412 conflict / 404 not-found port signals (`WasSyncConflictError` /
29
35
  * `WasSyncNotFoundError`), and the opt-in revoked-access signal
@@ -38,16 +44,19 @@
38
44
  * (`IntegrityError`: the stored body does not verify against the resource id
39
45
  * it was read under). `EncryptionError`, the fail-closed umbrella both
40
46
  * `KeyUnwrapError` and `IntegrityError` fall under, rides along. So does the
41
- * affordance gate (`NotSupportedError`), which a guarded write raises before
42
- * any request when the read it is pinned to returned no `ETag` validator -- a
43
- * permanent refusal, so a replication driver stops rather than retries.
47
+ * affordance gate (`NotSupportedError`), a permanent refusal raised before any
48
+ * request: by a guarded write whose pinned read returned no `ETag` validator
49
+ * (`/log`, `/edv`, and the client's own content-addressed store), and by a
50
+ * cipher handed a chunked envelope it has no route to (`/edv`). This subpath
51
+ * raises it on neither a push nor a pull, and is where the predicate for it
52
+ * ships, so a consumer of those entries can match it by name too.
44
53
  * The classes are exported
45
54
  * for construction and for a caller inside one resolved copy; across a package
46
55
  * boundary the predicates are the contract
47
56
  * (`decisions/0001-cross-package-errors-match-by-name.md`).
48
57
  */
49
58
  export { createWasSyncPort, KEY_EPOCH_HEADER, parseEtag } from './port.js';
50
- export { httpStatus as errorStatus, errorMessage } from '../errors.js';
59
+ export { httpStatus as errorStatus, errorMessage, requireResourceId } from '../errors.js';
51
60
  export { contentCid, cidFrom, deriveSpaceId } from './cid.js';
52
61
  export { isEncryptedEnvelope } from './envelope.js';
53
62
  export { createPlaintextDocCipher } from './plaintextCipher.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAI1E,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,cAAc,CAAA;AAErB,YAAY,EACV,IAAI,EACJ,cAAc,EACd,OAAO,EACP,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,UAAU,EACV,WAAW,EACX,SAAS,EACV,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAI1E,OAAO,EACL,UAAU,IAAI,WAAW,EACzB,YAAY,EACZ,iBAAiB,EAClB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,cAAc,CAAA;AAErB,YAAY,EACV,IAAI,EACJ,cAAc,EACd,OAAO,EACP,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,UAAU,EACV,WAAW,EACX,SAAS,EACV,MAAM,YAAY,CAAA"}
@@ -13,6 +13,11 @@
13
13
  * - `createPlaintextDocCipher` / `isEncryptedEnvelope` -- the identity cipher
14
14
  * for a plaintext content-addressed collection, and the envelope predicate,
15
15
  * both free of the `@interop/was-client/edv` crypto graph.
16
+ * - `requireResourceId` -- the guard both built-in ciphers run first, exported
17
+ * so a consumer writing its own `DocCipher` refuses a missing resource id
18
+ * the same way instead of hand-rolling the check. It raises a
19
+ * `ValidationError`, which reports a caller passing no id rather than a
20
+ * condition to classify and recover from, so no predicate ships for it.
16
21
  * - `ensureSpaceAndCollection` / `ensureSpace` -- idempotent Space +
17
22
  * Collection provisioning, and its Space half alone (ensure the Space once,
18
23
  * then thread the returned description through every collection).
@@ -20,10 +25,11 @@
20
25
  * `isUnknownEpochError` / `isKeyUnwrapError` / `isIntegrityError` /
21
26
  * `isNotSupportedError` -- the classification contract for the signals
22
27
  * below. A consumer matches by `err.name` and never with `instanceof`,
23
- * because every one of these errors is raised inside a seam the app injects
24
- * (the port, the caller's `DocCipher`) and that seam can resolve to a second
25
- * copy of this package. Reading a property off the matched value, such as
26
- * `status` on an auth error, is the intended shape.
28
+ * because these errors are raised inside a seam the app injects (the port,
29
+ * the caller's `DocCipher`) and that seam can resolve to a second copy of
30
+ * this package. The affordance gate is raised outside a seam but matched the
31
+ * same way, so the rule has no exceptions. Reading a property off the
32
+ * matched value, such as `status` on an auth error, is the intended shape.
27
33
  *
28
34
  * The 412 conflict / 404 not-found port signals (`WasSyncConflictError` /
29
35
  * `WasSyncNotFoundError`), and the opt-in revoked-access signal
@@ -38,9 +44,12 @@
38
44
  * (`IntegrityError`: the stored body does not verify against the resource id
39
45
  * it was read under). `EncryptionError`, the fail-closed umbrella both
40
46
  * `KeyUnwrapError` and `IntegrityError` fall under, rides along. So does the
41
- * affordance gate (`NotSupportedError`), which a guarded write raises before
42
- * any request when the read it is pinned to returned no `ETag` validator -- a
43
- * permanent refusal, so a replication driver stops rather than retries.
47
+ * affordance gate (`NotSupportedError`), a permanent refusal raised before any
48
+ * request: by a guarded write whose pinned read returned no `ETag` validator
49
+ * (`/log`, `/edv`, and the client's own content-addressed store), and by a
50
+ * cipher handed a chunked envelope it has no route to (`/edv`). This subpath
51
+ * raises it on neither a push nor a pull, and is where the predicate for it
52
+ * ships, so a consumer of those entries can match it by name too.
44
53
  * The classes are exported
45
54
  * for construction and for a caller inside one resolved copy; across a package
46
55
  * boundary the predicates are the contract
@@ -50,7 +59,7 @@ export { createWasSyncPort, KEY_EPOCH_HEADER, parseEtag } from './port.js';
50
59
  // The sync subpath's names for the client's own error accessors, so a
51
60
  // sync-only consumer reads a raw ky/ezcap failure without importing the core
52
61
  // entry.
53
- export { httpStatus as errorStatus, errorMessage } from '../errors.js';
62
+ export { httpStatus as errorStatus, errorMessage, requireResourceId } from '../errors.js';
54
63
  export { contentCid, cidFrom, deriveSpaceId } from './cid.js';
55
64
  export { isEncryptedEnvelope } from './envelope.js';
56
65
  export { createPlaintextDocCipher } from './plaintextCipher.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAC1E,sEAAsE;AACtE,6EAA6E;AAC7E,SAAS;AACT,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,cAAc,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAC1E,sEAAsE;AACtE,6EAA6E;AAC7E,SAAS;AACT,OAAO,EACL,UAAU,IAAI,WAAW,EACzB,YAAY,EACZ,iBAAiB,EAClB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,cAAc,CAAA"}
@@ -6,10 +6,13 @@
6
6
  * meet: the port's two wire signals (`WasSyncConflictError` /
7
7
  * `WasSyncNotFoundError`), its opt-in revoked-access signal
8
8
  * (`WasSyncAuthError`), the cipher's two no-key signals (the stale-descriptor
9
- * `UnknownEpochError` and the not-a-recipient `KeyUnwrapError`), its tamper
10
- * signal (`IntegrityError`), and the client's affordance gate
11
- * (`NotSupportedError`), raised before the request when the operation cannot
12
- * be carried out as asked.
9
+ * `UnknownEpochError` and the not-a-recipient `KeyUnwrapError`), and its
10
+ * tamper signal (`IntegrityError`).
11
+ *
12
+ * `isNotSupportedError` rides along for the client's affordance gate. That
13
+ * refusal belongs to the rest of the package rather than to this subpath,
14
+ * which raises it on neither a push nor a pull. The predicate's own doc says
15
+ * where it does come from.
13
16
  *
14
17
  * They live beside the classes that assign the names they match (`errors.ts`)
15
18
  * because every one of those errors is raised inside a seam the consuming app
@@ -99,13 +102,23 @@ export declare function isKeyUnwrapError(err: unknown): boolean;
99
102
  export declare function isIntegrityError(err: unknown): boolean;
100
103
  /**
101
104
  * Whether an error is the client's affordance-gate refusal
102
- * (`NotSupportedError`): the operation cannot be carried out as asked. On a
103
- * replication path it is the guarded write refused because the read it is
104
- * pinned to returned no `ETag` validator, and a chunked envelope a cipher was
105
- * built with no route to. Permanent, and the one refusal a replication driver
106
- * must NOT retry: nothing about a later attempt changes the answer, so a retry
107
- * loop would re-send the same batch forever. Raised before the request, so the
108
- * matched value carries no `status`.
105
+ * (`NotSupportedError`): the operation cannot be carried out as asked.
106
+ * Permanent, since nothing about a later attempt changes the answer. Raised
107
+ * before the request, so the matched value carries no `status`.
108
+ *
109
+ * It takes two forms. A guarded write refuses when the read it is pinned to
110
+ * returned no `ETag` validator, so the write would go out unconditionally;
111
+ * every such gate builds the error through `unenforcedPreconditionError`, in
112
+ * `log/logStore.ts`, `edv/logGovernedDescriptorStore.ts` and
113
+ * `internal/cas.ts`. A cipher refuses a chunked envelope it was built with no
114
+ * route to, in `edv/EdvCodec.ts` and `edv/WasTransport.ts`.
115
+ *
116
+ * Neither form arises on this subpath. Conditional writes are a baseline
117
+ * server requirement, so the sync port passes `ifMatch` / `ifNoneMatch`
118
+ * through with no gate in front of them, and it moves stored bodies verbatim
119
+ * without the codec. The predicate is exported here so a consumer of `/log` or
120
+ * `/edv` can classify the refusal by the same `err.name` rule as every other
121
+ * signal, not because a replication driver can meet it.
109
122
  *
110
123
  * @param err {unknown} the caught error
111
124
  * @returns {boolean}
@@ -1 +1 @@
1
- {"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../src/sync/predicates.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAaH;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAErD;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEtD;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEtD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEzD"}
1
+ {"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../src/sync/predicates.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAaH;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAErD;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEtD;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEtD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEzD"}
@@ -6,10 +6,13 @@
6
6
  * meet: the port's two wire signals (`WasSyncConflictError` /
7
7
  * `WasSyncNotFoundError`), its opt-in revoked-access signal
8
8
  * (`WasSyncAuthError`), the cipher's two no-key signals (the stale-descriptor
9
- * `UnknownEpochError` and the not-a-recipient `KeyUnwrapError`), its tamper
10
- * signal (`IntegrityError`), and the client's affordance gate
11
- * (`NotSupportedError`), raised before the request when the operation cannot
12
- * be carried out as asked.
9
+ * `UnknownEpochError` and the not-a-recipient `KeyUnwrapError`), and its
10
+ * tamper signal (`IntegrityError`).
11
+ *
12
+ * `isNotSupportedError` rides along for the client's affordance gate. That
13
+ * refusal belongs to the rest of the package rather than to this subpath,
14
+ * which raises it on neither a push nor a pull. The predicate's own doc says
15
+ * where it does come from.
13
16
  *
14
17
  * They live beside the classes that assign the names they match (`errors.ts`)
15
18
  * because every one of those errors is raised inside a seam the consuming app
@@ -121,13 +124,23 @@ export function isIntegrityError(err) {
121
124
  }
122
125
  /**
123
126
  * Whether an error is the client's affordance-gate refusal
124
- * (`NotSupportedError`): the operation cannot be carried out as asked. On a
125
- * replication path it is the guarded write refused because the read it is
126
- * pinned to returned no `ETag` validator, and a chunked envelope a cipher was
127
- * built with no route to. Permanent, and the one refusal a replication driver
128
- * must NOT retry: nothing about a later attempt changes the answer, so a retry
129
- * loop would re-send the same batch forever. Raised before the request, so the
130
- * matched value carries no `status`.
127
+ * (`NotSupportedError`): the operation cannot be carried out as asked.
128
+ * Permanent, since nothing about a later attempt changes the answer. Raised
129
+ * before the request, so the matched value carries no `status`.
130
+ *
131
+ * It takes two forms. A guarded write refuses when the read it is pinned to
132
+ * returned no `ETag` validator, so the write would go out unconditionally;
133
+ * every such gate builds the error through `unenforcedPreconditionError`, in
134
+ * `log/logStore.ts`, `edv/logGovernedDescriptorStore.ts` and
135
+ * `internal/cas.ts`. A cipher refuses a chunked envelope it was built with no
136
+ * route to, in `edv/EdvCodec.ts` and `edv/WasTransport.ts`.
137
+ *
138
+ * Neither form arises on this subpath. Conditional writes are a baseline
139
+ * server requirement, so the sync port passes `ifMatch` / `ifNoneMatch`
140
+ * through with no gate in front of them, and it moves stored bodies verbatim
141
+ * without the codec. The predicate is exported here so a consumer of `/log` or
142
+ * `/edv` can classify the refusal by the same `err.name` rule as every other
143
+ * signal, not because a replication driver can meet it.
131
144
  *
132
145
  * @param err {unknown} the caught error
133
146
  * @returns {boolean}
@@ -1 +1 @@
1
- {"version":3,"file":"predicates.js","sourceRoot":"","sources":["../../src/sync/predicates.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;GAMG;AACH,SAAS,MAAM,CAAC,GAAY;IAC1B,OAAQ,GAAiC,EAAE,IAAI,CAAA;AACjD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,sBAAsB,CAAA;AAC/C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,sBAAsB,CAAA;AAC/C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,GAAY;IAC1C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,kBAAkB,CAAA;AAC3C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,mBAAmB,CAAA;AAC5C,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAA;AACzC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAA;AACzC,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,mBAAmB,CAAA;AAC5C,CAAC"}
1
+ {"version":3,"file":"predicates.js","sourceRoot":"","sources":["../../src/sync/predicates.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;;;;GAMG;AACH,SAAS,MAAM,CAAC,GAAY;IAC1B,OAAQ,GAAiC,EAAE,IAAI,CAAA;AACjD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,sBAAsB,CAAA;AAC/C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,sBAAsB,CAAA;AAC/C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,GAAY;IAC1C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,kBAAkB,CAAA;AAC3C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,mBAAmB,CAAA;AAC5C,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAA;AACzC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAA;AACzC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,mBAAmB,CAAA;AAC5C,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@interop/was-client",
3
3
  "description": "A developer-friendly client for Wallet Attached Storage (WAS) servers.",
4
- "version": "0.68.0",
4
+ "version": "0.70.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "pnpm run clear && tsc",
@@ -37,6 +37,12 @@
37
37
  "import": "./dist/edv/index.js",
38
38
  "default": "./dist/edv/index.js"
39
39
  },
40
+ "./edv/core": {
41
+ "types": "./dist/edv/core.d.ts",
42
+ "react-native": "./dist/edv/core.js",
43
+ "import": "./dist/edv/core.js",
44
+ "default": "./dist/edv/core.js"
45
+ },
40
46
  "./paths": {
41
47
  "types": "./dist/paths.d.ts",
42
48
  "react-native": "./dist/paths.js",
@@ -70,12 +76,12 @@
70
76
  "@interop/capability-agent": "^0.2.0",
71
77
  "@interop/data-integrity-core": "^8.7.1",
72
78
  "@interop/ed25519-signature": "^7.2.2",
73
- "@interop/edv-client": "^17.8.4",
79
+ "@interop/edv-client": "^17.9.0",
74
80
  "@interop/ezcap": "^7.4.9",
75
81
  "@interop/http-client": "^1.0.5",
76
82
  "@interop/minimal-cipher": "^7.10.2",
77
83
  "@interop/storage-core": "^0.18.0",
78
- "@interop/vh-resource-log": "^0.5.1",
84
+ "@interop/vh-resource-log": "^0.5.2",
79
85
  "@interop/x25519-key-agreement-key": "^5.4.0",
80
86
  "@noble/hashes": "^2.3.0",
81
87
  "@scure/base": "^2.3.0",