@pithy-sh/core 0.13.0 → 0.14.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.
- package/README.md +54 -0
- package/dist/audit/auditEvent.js +1 -1
- package/dist/audit/chain.d.ts +289 -0
- package/dist/audit/chain.d.ts.map +1 -0
- package/dist/audit/chain.js +400 -0
- package/dist/audit/citations.d.ts +52 -0
- package/dist/audit/citations.d.ts.map +1 -0
- package/dist/audit/citations.js +13 -0
- package/dist/capability/bindings.d.ts +22 -0
- package/dist/capability/bindings.d.ts.map +1 -1
- package/dist/capability/bindings.js +32 -2
- package/dist/capability/capability.d.ts +123 -16
- package/dist/capability/capability.d.ts.map +1 -1
- package/dist/capability/capability.js +17 -2
- package/dist/capability/erasure.d.ts +75 -0
- package/dist/capability/erasure.d.ts.map +1 -0
- package/dist/capability/erasure.js +2 -0
- package/dist/capability/manifest.d.ts +5 -0
- package/dist/capability/manifest.d.ts.map +1 -1
- package/dist/capability/personColumns.d.ts +28 -0
- package/dist/capability/personColumns.d.ts.map +1 -0
- package/dist/capability/personColumns.js +66 -0
- package/dist/capability/personRows.d.ts +62 -0
- package/dist/capability/personRows.d.ts.map +1 -0
- package/dist/capability/personRows.js +59 -0
- package/dist/capability/purge.d.ts +86 -19
- package/dist/capability/purge.d.ts.map +1 -1
- package/dist/capability/purge.js +83 -5
- package/dist/capability/settings.d.ts +10 -0
- package/dist/capability/settings.d.ts.map +1 -1
- package/dist/capability/vectorIndex.d.ts +36 -0
- package/dist/capability/vectorIndex.d.ts.map +1 -0
- package/dist/capability/vectorIndex.js +25 -0
- package/dist/cli/commandCatalog.generated.d.ts +433 -3
- package/dist/cli/commandCatalog.generated.d.ts.map +1 -1
- package/dist/cli/commandCatalog.generated.js +449 -2
- package/dist/cli/commandFacts.d.ts +8 -5
- package/dist/cli/commandFacts.d.ts.map +1 -1
- package/dist/cli/commandFacts.js +12 -3
- package/dist/consent/purpose.d.ts +70 -0
- package/dist/consent/purpose.d.ts.map +1 -0
- package/dist/consent/purpose.js +97 -0
- package/dist/consent/reader.d.ts +99 -0
- package/dist/consent/reader.d.ts.map +1 -0
- package/dist/consent/reader.js +33 -0
- package/dist/controlPlane/audit/actions.d.ts +15 -4
- package/dist/controlPlane/audit/actions.d.ts.map +1 -1
- package/dist/controlPlane/audit/actions.js +16 -5
- package/dist/controlPlane/capability.d.ts +10 -0
- package/dist/controlPlane/capability.d.ts.map +1 -1
- package/dist/controlPlane/capability.js +56 -8
- package/dist/controlPlane/context.d.ts +4 -0
- package/dist/controlPlane/context.d.ts.map +1 -1
- package/dist/controlPlane/context.js +3 -2
- package/dist/controlPlane/data/connection.d.ts +21 -2
- package/dist/controlPlane/data/connection.d.ts.map +1 -1
- package/dist/controlPlane/data/connection.js +13 -4
- package/dist/controlPlane/data/connections.d.ts +94 -0
- package/dist/controlPlane/data/connections.d.ts.map +1 -0
- package/dist/controlPlane/data/connections.js +151 -0
- package/dist/controlPlane/data/hold.d.ts +46 -0
- package/dist/controlPlane/data/hold.d.ts.map +1 -0
- package/dist/controlPlane/data/hold.js +36 -0
- package/dist/controlPlane/data/oidcTrust.d.ts +122 -0
- package/dist/controlPlane/data/oidcTrust.d.ts.map +1 -0
- package/dist/controlPlane/data/oidcTrust.js +173 -0
- package/dist/controlPlane/data/tables.d.ts +4 -0
- package/dist/controlPlane/data/tables.d.ts.map +1 -1
- package/dist/controlPlane/data/tables.js +9 -4
- package/dist/controlPlane/data/trustFirstCall.d.ts +16 -0
- package/dist/controlPlane/data/trustFirstCall.d.ts.map +1 -0
- package/dist/controlPlane/data/trustFirstCall.js +25 -0
- package/dist/controlPlane/discovery/adminRoute.d.ts +165 -2
- package/dist/controlPlane/discovery/adminRoute.d.ts.map +1 -1
- package/dist/controlPlane/discovery/adminRoute.js +32 -8
- package/dist/controlPlane/discovery/routeInput.d.ts +23 -0
- package/dist/controlPlane/discovery/routeInput.d.ts.map +1 -0
- package/dist/controlPlane/discovery/routeInput.js +80 -0
- package/dist/controlPlane/discovery/toolName.d.ts +21 -0
- package/dist/controlPlane/discovery/toolName.d.ts.map +1 -0
- package/dist/controlPlane/discovery/toolName.js +25 -0
- package/dist/controlPlane/erasure/attest.d.ts +78 -0
- package/dist/controlPlane/erasure/attest.d.ts.map +1 -0
- package/dist/controlPlane/erasure/attest.js +164 -0
- package/dist/controlPlane/erasure/read.d.ts +39 -0
- package/dist/controlPlane/erasure/read.d.ts.map +1 -0
- package/dist/controlPlane/erasure/read.js +140 -0
- package/dist/controlPlane/error/errors.d.ts +61 -2
- package/dist/controlPlane/error/errors.d.ts.map +1 -1
- package/dist/controlPlane/error/errors.js +13 -0
- package/dist/controlPlane/evidence/derive.d.ts +124 -0
- package/dist/controlPlane/evidence/derive.d.ts.map +1 -0
- package/dist/controlPlane/evidence/derive.js +343 -0
- package/dist/controlPlane/evidence/mapping.d.ts +85 -0
- package/dist/controlPlane/evidence/mapping.d.ts.map +1 -0
- package/dist/controlPlane/evidence/mapping.js +114 -0
- package/dist/controlPlane/evidence/pack.d.ts +46 -0
- package/dist/controlPlane/evidence/pack.d.ts.map +1 -0
- package/dist/controlPlane/evidence/pack.js +124 -0
- package/dist/controlPlane/http/connections.d.ts +96 -0
- package/dist/controlPlane/http/connections.d.ts.map +1 -0
- package/dist/controlPlane/http/connections.js +109 -0
- package/dist/controlPlane/http/guard.d.ts +23 -2
- package/dist/controlPlane/http/guard.d.ts.map +1 -1
- package/dist/controlPlane/http/guard.js +69 -12
- package/dist/controlPlane/http/handlers.d.ts +212 -10
- package/dist/controlPlane/http/handlers.d.ts.map +1 -1
- package/dist/controlPlane/http/handlers.js +117 -26
- package/dist/controlPlane/http/holds.d.ts +57 -0
- package/dist/controlPlane/http/holds.d.ts.map +1 -0
- package/dist/controlPlane/http/holds.js +98 -0
- package/dist/controlPlane/http/presence.d.ts +27 -0
- package/dist/controlPlane/http/presence.d.ts.map +1 -0
- package/dist/controlPlane/http/presence.js +67 -0
- package/dist/controlPlane/http/processing.d.ts +73 -0
- package/dist/controlPlane/http/processing.d.ts.map +1 -0
- package/dist/controlPlane/http/processing.js +17 -0
- package/dist/controlPlane/http/responses.d.ts +927 -3
- package/dist/controlPlane/http/responses.d.ts.map +1 -1
- package/dist/controlPlane/http/responses.js +283 -7
- package/dist/controlPlane/http/routes.d.ts +12 -2
- package/dist/controlPlane/http/routes.d.ts.map +1 -1
- package/dist/controlPlane/http/routes.js +182 -5
- package/dist/controlPlane/http/schemas.d.ts +63 -0
- package/dist/controlPlane/http/schemas.d.ts.map +1 -1
- package/dist/controlPlane/http/schemas.js +39 -1
- package/dist/controlPlane/http/verify.d.ts.map +1 -1
- package/dist/controlPlane/http/verify.js +13 -1
- package/dist/controlPlane/http/verifyTrust.d.ts +76 -0
- package/dist/controlPlane/http/verifyTrust.d.ts.map +1 -0
- package/dist/controlPlane/http/verifyTrust.js +75 -0
- package/dist/controlPlane/migrations/0004_connection_trusts.d.ts +15 -0
- package/dist/controlPlane/migrations/0004_connection_trusts.d.ts.map +1 -0
- package/dist/controlPlane/migrations/0004_connection_trusts.js +23 -0
- package/dist/controlPlane/migrations/0005_holds.d.ts +12 -0
- package/dist/controlPlane/migrations/0005_holds.d.ts.map +1 -0
- package/dist/controlPlane/migrations/0005_holds.js +26 -0
- package/dist/controlPlane/processing/derive.d.ts +77 -0
- package/dist/controlPlane/processing/derive.d.ts.map +1 -0
- package/dist/controlPlane/processing/derive.js +206 -0
- package/dist/controlPlane/processing/read.d.ts +10 -0
- package/dist/controlPlane/processing/read.d.ts.map +1 -0
- package/dist/controlPlane/processing/read.js +89 -0
- package/dist/controlPlane/scope/kind.d.ts +46 -0
- package/dist/controlPlane/scope/kind.d.ts.map +1 -0
- package/dist/controlPlane/scope/kind.js +52 -0
- package/dist/controlPlane/scope/scope.d.ts +58 -3
- package/dist/controlPlane/scope/scope.d.ts.map +1 -1
- package/dist/controlPlane/scope/scope.js +59 -4
- package/dist/controlPlane/token/jws.js +1 -1
- package/dist/controlPlane/token/mint.js +1 -1
- package/dist/controlPlane/wire.d.ts +23 -0
- package/dist/controlPlane/wire.d.ts.map +1 -1
- package/dist/controlPlane/wire.js +24 -1
- package/dist/createBackend.d.ts +13 -0
- package/dist/createBackend.d.ts.map +1 -1
- package/dist/createBackend.js +11 -3
- package/dist/createEntrypoint.d.ts +7 -0
- package/dist/createEntrypoint.d.ts.map +1 -1
- package/dist/createEntrypoint.js +4 -0
- package/dist/error/http.d.ts +168 -0
- package/dist/error/http.d.ts.map +1 -1
- package/dist/error/payload.d.ts +336 -0
- package/dist/error/payload.d.ts.map +1 -1
- package/dist/error/payload.js +112 -0
- package/dist/error/pithyError.d.ts +22 -0
- package/dist/error/pithyError.d.ts.map +1 -1
- package/dist/error/pithyError.js +31 -1
- package/dist/http/routeSpec.d.ts +46 -1
- package/dist/http/routeSpec.d.ts.map +1 -1
- package/dist/http/routeSpec.js +39 -5
- package/dist/http/verification.d.ts.map +1 -1
- package/dist/http/verification.js +1 -1
- package/dist/i18n/translator.d.ts +2 -1
- package/dist/i18n/translator.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/logger/record.d.ts +98 -0
- package/dist/logger/record.d.ts.map +1 -1
- package/dist/mcp/annotations.d.ts +20 -0
- package/dist/mcp/annotations.d.ts.map +1 -0
- package/dist/mcp/annotations.js +23 -0
- package/dist/mcp/tools.d.ts +75 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +118 -0
- package/dist/openapi/document.d.ts.map +1 -1
- package/dist/openapi/document.js +8 -26
- package/dist/openapi/operations.d.ts +35 -0
- package/dist/openapi/operations.d.ts.map +1 -0
- package/dist/openapi/operations.js +37 -0
- package/dist/presence/channel.d.ts +11 -0
- package/dist/presence/channel.d.ts.map +1 -0
- package/dist/presence/channel.js +65 -0
- package/dist/presence/declaration.d.ts +154 -0
- package/dist/presence/declaration.d.ts.map +1 -0
- package/dist/presence/declaration.js +164 -0
- package/dist/presence/durableObject.d.ts +61 -0
- package/dist/presence/durableObject.d.ts.map +1 -0
- package/dist/presence/durableObject.js +257 -0
- package/dist/presence/frames.d.ts +166 -0
- package/dist/presence/frames.d.ts.map +1 -0
- package/dist/presence/frames.js +90 -0
- package/dist/presence/http/guard.d.ts +11 -0
- package/dist/presence/http/guard.d.ts.map +1 -0
- package/dist/presence/http/guard.js +20 -0
- package/dist/presence/http/responses.d.ts +31 -0
- package/dist/presence/http/responses.d.ts.map +1 -0
- package/dist/presence/http/responses.js +34 -0
- package/dist/presence/http/routes.d.ts +24 -0
- package/dist/presence/http/routes.d.ts.map +1 -0
- package/dist/presence/http/routes.js +127 -0
- package/dist/presence/http/schemas.d.ts +29 -0
- package/dist/presence/http/schemas.d.ts.map +1 -0
- package/dist/presence/http/schemas.js +28 -0
- package/dist/presence/names.d.ts +23 -0
- package/dist/presence/names.d.ts.map +1 -0
- package/dist/presence/names.js +22 -0
- package/dist/presence/room.d.ts +95 -0
- package/dist/presence/room.d.ts.map +1 -0
- package/dist/presence/room.js +105 -0
- package/dist/presence/ticket.d.ts +55 -0
- package/dist/presence/ticket.d.ts.map +1 -0
- package/dist/presence/ticket.js +109 -0
- package/dist/privacy/classify.js +1 -1
- package/dist/privacy/encrypted.js +1 -1
- package/dist/processing/activity.d.ts +134 -0
- package/dist/processing/activity.d.ts.map +1 -0
- package/dist/processing/activity.js +161 -0
- package/dist/processing/composed.d.ts +18 -0
- package/dist/processing/composed.d.ts.map +1 -0
- package/dist/processing/composed.js +28 -0
- package/dist/processing/vocabulary.d.ts +26 -0
- package/dist/processing/vocabulary.d.ts.map +1 -0
- package/dist/processing/vocabulary.js +35 -0
- package/dist/queue/consumer.d.ts +59 -0
- package/dist/queue/consumer.d.ts.map +1 -0
- package/dist/queue/consumer.js +46 -0
- package/dist/retention/composed.d.ts +37 -0
- package/dist/retention/composed.d.ts.map +1 -0
- package/dist/retention/composed.js +66 -0
- package/dist/retention/holds.d.ts +61 -0
- package/dist/retention/holds.d.ts.map +1 -0
- package/dist/retention/holds.js +107 -0
- package/dist/retention/holdsPurge.d.ts +22 -0
- package/dist/retention/holdsPurge.d.ts.map +1 -0
- package/dist/retention/holdsPurge.js +50 -0
- package/dist/retention/policy.d.ts +132 -0
- package/dist/retention/policy.d.ts.map +1 -0
- package/dist/retention/policy.js +197 -0
- package/dist/session/rotated.d.ts +34 -0
- package/dist/session/rotated.d.ts.map +1 -0
- package/dist/session/rotated.js +25 -0
- package/dist/test-utils/connectionFixtures.d.ts +13 -0
- package/dist/test-utils/connectionFixtures.d.ts.map +1 -0
- package/dist/test-utils/connectionFixtures.js +58 -0
- package/dist/test-utils/interleave.d.ts +12 -0
- package/dist/test-utils/interleave.d.ts.map +1 -0
- package/dist/test-utils/interleave.js +26 -0
- package/dist/testWorker.d.ts +8 -0
- package/dist/testWorker.d.ts.map +1 -0
- package/dist/testWorker.js +9 -0
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +1 -1
- package/dist/workflow/dispatchRoute.js +1 -1
- package/package.json +1 -1
- package/src/audit/auditEvent.ts +1 -1
- package/src/audit/chain.ts +551 -0
- package/src/audit/citations.ts +63 -0
- package/src/capability/bindings.ts +61 -0
- package/src/capability/capability.ts +156 -19
- package/src/capability/erasure.ts +82 -0
- package/src/capability/personColumns.ts +83 -0
- package/src/capability/personRows.ts +125 -0
- package/src/capability/purge.ts +158 -21
- package/src/capability/settings.ts +7 -0
- package/src/capability/vectorIndex.ts +60 -0
- package/src/cli/commandCatalog.generated.ts +482 -2
- package/src/cli/commandFacts.ts +12 -3
- package/src/cloudflare-test.d.ts +3 -1
- package/src/consent/purpose.ts +160 -0
- package/src/consent/reader.ts +134 -0
- package/src/controlPlane/audit/actions.ts +15 -4
- package/src/controlPlane/capability.ts +99 -20
- package/src/controlPlane/context.ts +10 -2
- package/src/controlPlane/data/connection.ts +16 -2
- package/src/controlPlane/data/connections.ts +231 -0
- package/src/controlPlane/data/hold.ts +52 -0
- package/src/controlPlane/data/oidcTrust.ts +249 -0
- package/src/controlPlane/data/tables.ts +7 -0
- package/src/controlPlane/data/trustFirstCall.ts +37 -0
- package/src/controlPlane/discovery/adminRoute.ts +71 -9
- package/src/controlPlane/discovery/routeInput.ts +86 -0
- package/src/controlPlane/discovery/toolName.ts +23 -0
- package/src/controlPlane/erasure/attest.ts +205 -0
- package/src/controlPlane/erasure/read.ts +169 -0
- package/src/controlPlane/error/errors.ts +69 -2
- package/src/controlPlane/evidence/derive.ts +426 -0
- package/src/controlPlane/evidence/mapping.ts +118 -0
- package/src/controlPlane/evidence/pack.ts +190 -0
- package/src/controlPlane/http/connections.ts +129 -0
- package/src/controlPlane/http/guard.ts +118 -9
- package/src/controlPlane/http/handlers.ts +172 -40
- package/src/controlPlane/http/holds.ts +108 -0
- package/src/controlPlane/http/presence.ts +71 -0
- package/src/controlPlane/http/processing.ts +19 -0
- package/src/controlPlane/http/responses.ts +590 -7
- package/src/controlPlane/http/routes.ts +302 -3
- package/src/controlPlane/http/schemas.ts +126 -0
- package/src/controlPlane/http/verify.ts +19 -2
- package/src/controlPlane/http/verifyTrust.ts +176 -0
- package/src/controlPlane/migrations/0004_connection_trusts.ts +30 -0
- package/src/controlPlane/migrations/0005_holds.ts +40 -0
- package/src/controlPlane/processing/derive.ts +359 -0
- package/src/controlPlane/processing/read.ts +102 -0
- package/src/controlPlane/scope/kind.ts +63 -0
- package/src/controlPlane/scope/scope.ts +65 -3
- package/src/controlPlane/wire.ts +26 -0
- package/src/createBackend.ts +31 -6
- package/src/createEntrypoint.ts +17 -0
- package/src/error/payload.ts +234 -0
- package/src/error/pithyError.ts +42 -0
- package/src/http/routeSpec.ts +75 -5
- package/src/http/verification.ts +3 -1
- package/src/i18n/translator.ts +2 -1
- package/src/index.ts +2 -0
- package/src/mcp/annotations.ts +38 -0
- package/src/mcp/tools.ts +220 -0
- package/src/openapi/document.ts +8 -28
- package/src/openapi/operations.ts +62 -0
- package/src/presence/channel.ts +46 -0
- package/src/presence/declaration.ts +283 -0
- package/src/presence/durableObject.ts +287 -0
- package/src/presence/frames.ts +153 -0
- package/src/presence/http/guard.ts +23 -0
- package/src/presence/http/responses.ts +63 -0
- package/src/presence/http/routes.ts +165 -0
- package/src/presence/http/schemas.ts +39 -0
- package/src/presence/names.ts +45 -0
- package/src/presence/room.ts +145 -0
- package/src/presence/ticket.ts +145 -0
- package/src/processing/activity.ts +289 -0
- package/src/processing/composed.ts +33 -0
- package/src/processing/vocabulary.ts +43 -0
- package/src/queue/consumer.ts +104 -0
- package/src/retention/composed.ts +75 -0
- package/src/retention/holds.ts +175 -0
- package/src/retention/holdsPurge.ts +50 -0
- package/src/retention/policy.ts +305 -0
- package/src/session/rotated.ts +53 -0
- package/src/test-utils/connectionFixtures.ts +58 -0
- package/src/test-utils/interleave.ts +31 -0
- package/src/testWorker.ts +13 -0
- package/src/version.generated.ts +1 -1
|
@@ -41,14 +41,14 @@ const MANIFEST_READ_SCOPE = "manifest:read";
|
|
|
41
41
|
const KEYS_ROTATE_SCOPE = "keys:rotate";
|
|
42
42
|
/**
|
|
43
43
|
* Read where each database this Worker binds stands: what is applied, what is pending, what is undeclared,
|
|
44
|
-
* and which run put it there
|
|
44
|
+
* and which run put it there. Read-only by construction — every route behind it is a `GET`, and
|
|
45
45
|
* nothing over the seam runs, reverses or resets a migration. The two migration health keys on the seam's
|
|
46
46
|
* manifest entry sit behind it too, so a connection without it gets no number rather than a zero.
|
|
47
47
|
*/
|
|
48
48
|
const MIGRATIONS_READ_SCOPE = "migrations:read";
|
|
49
49
|
/**
|
|
50
50
|
* Read this Worker's full privacy inventory: every storage schema holding a marked field, each marked field's
|
|
51
|
-
* path, its class, and where it is stored
|
|
51
|
+
* path, its class, and where it is stored. Read-only — the one route behind it is a `GET`.
|
|
52
52
|
*
|
|
53
53
|
* **Its own scope rather than `manifest:read`**, because field names are the kind of thing an adopter may
|
|
54
54
|
* reasonably withhold from a client that has no business seeing them. The manifest's privacy block carries
|
|
@@ -56,10 +56,65 @@ const MIGRATIONS_READ_SCOPE = "migrations:read";
|
|
|
56
56
|
*/
|
|
57
57
|
const PRIVACY_READ_SCOPE = "privacy:read";
|
|
58
58
|
/**
|
|
59
|
+
* Read this Worker's evidence pack: the SOC 2 and ISO 27001 evidence it derives from its own declarations.
|
|
60
|
+
* Read-only — the one route behind it is a `GET`, and it performs nothing it reports on.
|
|
61
|
+
*
|
|
62
|
+
* **Its own scope**, because the pack reads across the seam: every connection's principal, kind, purpose and
|
|
63
|
+
* grant, and every route's verification. It never widens another scope. A fact a capability keeps behind its own
|
|
64
|
+
* read — migration counts behind {@link MIGRATIONS_READ_SCOPE}, a capability's health behind that capability's
|
|
65
|
+
* scope — stays behind it, and a connection without that scope gets `not-derivable` naming it.
|
|
66
|
+
*/
|
|
67
|
+
const EVIDENCE_READ_SCOPE = "evidence:read";
|
|
68
|
+
/**
|
|
69
|
+
* Read the erasure attestation: one subject's purge, or every purge in a period, with the audit events that
|
|
70
|
+
* record each step. Read-only — both routes behind it are `GET`s — and kind `reads`.
|
|
71
|
+
*
|
|
72
|
+
* **Its own scope**, because it answers across subjects: which accounts and organizations were deleted, by which
|
|
73
|
+
* kind of actor and why. It carries nothing about a person beyond the id the lifecycle trail already keeps, and it
|
|
74
|
+
* never widens `audit:events:read`: it cites an event by id and chain position, never its contents.
|
|
75
|
+
*/
|
|
76
|
+
const ERASURE_READ_SCOPE = "erasure:read";
|
|
77
|
+
/**
|
|
78
|
+
* Read the record of processing activities, GDPR Article 30: each activity's purpose, data classes, legal basis,
|
|
79
|
+
* recipients, retention and measures, and every gap. Read-only — the one route behind it is a `GET` — and kind
|
|
80
|
+
* `reads`.
|
|
81
|
+
*
|
|
82
|
+
* **Its own scope**, because it reads across the Worker: every activity, the consent counts behind each consent
|
|
83
|
+
* basis, and where each stored class sits. It never widens another: the measures carry the evidence pack's states
|
|
84
|
+
* only for a connection that also holds {@link EVIDENCE_READ_SCOPE}, and a gap names a stored table or field only for
|
|
85
|
+
* one that also holds {@link PRIVACY_READ_SCOPE}. Without it, a gap names the capability and the class.
|
|
86
|
+
*/
|
|
87
|
+
const PROCESSING_READ_SCOPE = "processing:read";
|
|
88
|
+
/**
|
|
89
|
+
* Place and release a legal hold on a user, an organization or a tenant's audit trail. A write — both routes
|
|
90
|
+
* behind it are `POST`s — and kind `writes`, so `pithy dashboard connect` offers it and never grants it by default.
|
|
91
|
+
*
|
|
92
|
+
* **It can only preserve.** A hold suspends purges, prunes and inactivity deletions; releasing one returns the subject
|
|
93
|
+
* to the policy the Worker deploys with. No route behind it, or anywhere, shortens a retention.
|
|
94
|
+
*/
|
|
95
|
+
const RETENTION_HOLD_SCOPE = "retention:hold";
|
|
96
|
+
/**
|
|
97
|
+
* Read the legal holds: every hold, standing or released, with who placed it and why. Read-only — the one
|
|
98
|
+
* route behind it is a `GET` — and kind `reads`. The manifest's count of standing holds sits behind it too:
|
|
99
|
+
* `activeHolds`, in the health of the `controlplane` entry.
|
|
100
|
+
*/
|
|
101
|
+
const RETENTION_READ_SCOPE = "retention:read";
|
|
102
|
+
/**
|
|
103
|
+
* List every connection bound to this Worker's environment: who authorized it, what kind of client it is for, its purpose, its
|
|
104
|
+
* credential kinds, its grant and when it was registered or revoked. Kind `reads`. Never key material.
|
|
105
|
+
*/
|
|
106
|
+
const CONNECTIONS_READ_SCOPE = "connections:read";
|
|
107
|
+
/**
|
|
108
|
+
* Revoke every key and trust another connection in this Worker's environment holds, with a reason. Kind
|
|
109
|
+
* `credentials`. Refused on the caller's own connection, which ends through `disconnect`.
|
|
110
|
+
*/
|
|
111
|
+
const CONNECTIONS_REVOKE_SCOPE = "connections:revoke";
|
|
112
|
+
/**
|
|
59
113
|
* The seam's base grant — what `pithy dashboard connect` grants whatever the Worker composes. Ping is absent
|
|
60
114
|
* because it is not grantable; see {@link ANY_VERIFIED_CALLER}.
|
|
61
115
|
*
|
|
62
|
-
* **
|
|
116
|
+
* **The seam's reads are absent on purpose** — {@link MIGRATIONS_READ_SCOPE}, {@link PRIVACY_READ_SCOPE},
|
|
117
|
+
* {@link EVIDENCE_READ_SCOPE}, {@link ERASURE_READ_SCOPE}, {@link PROCESSING_READ_SCOPE}. Each is a read —
|
|
63
118
|
* every route requiring it is a `GET` — so `connect` derives it from the seam's `adminRoutes` the way it
|
|
64
119
|
* derives every capability's reads. The base exists for `keys:rotate`, which is not a read and would
|
|
65
120
|
* otherwise drop out.
|
|
@@ -83,4 +138,4 @@ function scopeCovers(required, presented, granted) {
|
|
|
83
138
|
return granted.includes(required);
|
|
84
139
|
}
|
|
85
140
|
//#endregion
|
|
86
|
-
export { ANY_VERIFIED_CALLER, ControlPlaneScope, KEYS_ROTATE_SCOPE, MANIFEST_READ_SCOPE, MIGRATIONS_READ_SCOPE, PRIVACY_READ_SCOPE, SEAM_SCOPES, scopeCovers };
|
|
141
|
+
export { ANY_VERIFIED_CALLER, CONNECTIONS_READ_SCOPE, CONNECTIONS_REVOKE_SCOPE, ControlPlaneScope, ERASURE_READ_SCOPE, EVIDENCE_READ_SCOPE, KEYS_ROTATE_SCOPE, MANIFEST_READ_SCOPE, MIGRATIONS_READ_SCOPE, PRIVACY_READ_SCOPE, PROCESSING_READ_SCOPE, RETENTION_HOLD_SCOPE, RETENTION_READ_SCOPE, SEAM_SCOPES, scopeCovers };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
import { ControlPlaneClaims, ControlPlaneJwsHeader } from "./claims.js";
|
|
4
3
|
import { ControlPlaneInvalidCredentialError } from "../error/errors.js";
|
|
5
4
|
import { base64UrlDecode } from "./base64url.js";
|
|
5
|
+
import { ControlPlaneClaims, ControlPlaneJwsHeader } from "./claims.js";
|
|
6
6
|
//#region src/controlPlane/token/jws.ts
|
|
7
7
|
/**
|
|
8
8
|
* Split a compact JWS, decode it, and validate both segments through their schemas.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
import { ControlPlaneClaims } from "./claims.js";
|
|
4
3
|
import { base64UrlEncode } from "./base64url.js";
|
|
4
|
+
import { ControlPlaneClaims } from "./claims.js";
|
|
5
5
|
import { sha256Base64Url } from "./digest.js";
|
|
6
6
|
//#region src/controlPlane/token/mint.ts
|
|
7
7
|
/** Base64url a UTF-8 JSON serialization — the encoding both JWS segments use. */
|
|
@@ -30,6 +30,29 @@
|
|
|
30
30
|
* carrying that header, so a management call would drag the whole auth stack in. See `http/verify.ts`.
|
|
31
31
|
*/
|
|
32
32
|
export declare const CONTROL_PLANE_HEADER = "pithy-control-plane";
|
|
33
|
+
/**
|
|
34
|
+
* The header a workload presents its OIDC token on, when it calls under a trust rather than a key (#722,
|
|
35
|
+
* `docs/AGENT-ACCESS.md` §6.2).
|
|
36
|
+
*
|
|
37
|
+
* Not `Authorization`, for the same reason as {@link CONTROL_PLANE_HEADER}, and not that header either: a call
|
|
38
|
+
* presents exactly one credential, and two names make "which one is this" a question the verifier never has
|
|
39
|
+
* to guess at. The token is the provider's own, verified per call; nothing is exchanged for it.
|
|
40
|
+
*/
|
|
41
|
+
export declare const CONTROL_PLANE_OIDC_HEADER = "pithy-control-plane-oidc";
|
|
42
|
+
/**
|
|
43
|
+
* The header naming which of this environment's trusts an OIDC call claims, by its id — the way a token's
|
|
44
|
+
* `kid` names a key. Read before the token is verified, so it selects and grants nothing: the trust's issuer,
|
|
45
|
+
* audience and claims are what the token is then held to.
|
|
46
|
+
*/
|
|
47
|
+
export declare const CONTROL_PLANE_TRUST_HEADER = "pithy-control-plane-trust";
|
|
48
|
+
/**
|
|
49
|
+
* The header naming the one scope an OIDC call exercises.
|
|
50
|
+
*
|
|
51
|
+
* A signed control-plane token names its scope inside the signature. A provider's identity token cannot — it
|
|
52
|
+
* proves **who**, never **what** — so the call names it out loud, and the seam checks it against the
|
|
53
|
+
* connection's grant exactly as it checks a token's. A call that names none is refused.
|
|
54
|
+
*/
|
|
55
|
+
export declare const CONTROL_PLANE_SCOPE_HEADER = "pithy-control-plane-scope";
|
|
33
56
|
/**
|
|
34
57
|
* The response header carrying the build that answered a control-plane call.
|
|
35
58
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../src/controlPlane/wire.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;AAE1D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,4BAA4B,yBAAyB,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,oCAAoC,iCAAiC,CAAC;AAEnF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,uFAAuF;IACvF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,+FAA+F;IAC/F,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAEnF"}
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../src/controlPlane/wire.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,6BAA6B,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,8BAA8B,CAAC;AAEtE;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,8BAA8B,CAAC;AAEtE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,4BAA4B,yBAAyB,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,oCAAoC,iCAAiC,CAAC;AAEnF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,uFAAuF;IACvF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,+FAA+F;IAC/F,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAEnF"}
|
|
@@ -32,6 +32,29 @@
|
|
|
32
32
|
*/
|
|
33
33
|
const CONTROL_PLANE_HEADER = "pithy-control-plane";
|
|
34
34
|
/**
|
|
35
|
+
* The header a workload presents its OIDC token on, when it calls under a trust rather than a key (#722,
|
|
36
|
+
* `docs/AGENT-ACCESS.md` §6.2).
|
|
37
|
+
*
|
|
38
|
+
* Not `Authorization`, for the same reason as {@link CONTROL_PLANE_HEADER}, and not that header either: a call
|
|
39
|
+
* presents exactly one credential, and two names make "which one is this" a question the verifier never has
|
|
40
|
+
* to guess at. The token is the provider's own, verified per call; nothing is exchanged for it.
|
|
41
|
+
*/
|
|
42
|
+
const CONTROL_PLANE_OIDC_HEADER = "pithy-control-plane-oidc";
|
|
43
|
+
/**
|
|
44
|
+
* The header naming which of this environment's trusts an OIDC call claims, by its id — the way a token's
|
|
45
|
+
* `kid` names a key. Read before the token is verified, so it selects and grants nothing: the trust's issuer,
|
|
46
|
+
* audience and claims are what the token is then held to.
|
|
47
|
+
*/
|
|
48
|
+
const CONTROL_PLANE_TRUST_HEADER = "pithy-control-plane-trust";
|
|
49
|
+
/**
|
|
50
|
+
* The header naming the one scope an OIDC call exercises.
|
|
51
|
+
*
|
|
52
|
+
* A signed control-plane token names its scope inside the signature. A provider's identity token cannot — it
|
|
53
|
+
* proves **who**, never **what** — so the call names it out loud, and the seam checks it against the
|
|
54
|
+
* connection's grant exactly as it checks a token's. A call that names none is refused.
|
|
55
|
+
*/
|
|
56
|
+
const CONTROL_PLANE_SCOPE_HEADER = "pithy-control-plane-scope";
|
|
57
|
+
/**
|
|
35
58
|
* The response header carrying the build that answered a control-plane call.
|
|
36
59
|
*
|
|
37
60
|
* Set on every control-plane response — allowed and denied alike, and on every capability's admin
|
|
@@ -122,4 +145,4 @@ function differs(before, after) {
|
|
|
122
145
|
return before !== after;
|
|
123
146
|
}
|
|
124
147
|
//#endregion
|
|
125
|
-
export { CONTROL_PLANE_HEADER, CONTROL_PLANE_VERSION_CREATED_HEADER, CONTROL_PLANE_VERSION_HEADER, workerBuildChanged };
|
|
148
|
+
export { CONTROL_PLANE_HEADER, CONTROL_PLANE_OIDC_HEADER, CONTROL_PLANE_SCOPE_HEADER, CONTROL_PLANE_TRUST_HEADER, CONTROL_PLANE_VERSION_CREATED_HEADER, CONTROL_PLANE_VERSION_HEADER, workerBuildChanged };
|
package/dist/createBackend.d.ts
CHANGED
|
@@ -30,6 +30,19 @@ export interface CreateBackendOptions<Caps extends readonly Capability[], App ex
|
|
|
30
30
|
* absent — e.g. a non-provisioned local run. Falls through to `unknown` when neither is present.
|
|
31
31
|
*/
|
|
32
32
|
env?: string;
|
|
33
|
+
/**
|
|
34
|
+
* How long this Worker keeps deleted accounts, the audit trail and each class of personal data — the
|
|
35
|
+
* `retention` block of the Worker's `pithy.config.ts`, which `createEntrypoint(config)` hands through. Parsed and
|
|
36
|
+
* resolved here, at assembly, so a block that does not parse, or keeps a floored audit action under the floor,
|
|
37
|
+
* refuses to deploy. See `retention/policy.ts`.
|
|
38
|
+
*/
|
|
39
|
+
retention?: unknown;
|
|
40
|
+
/**
|
|
41
|
+
* The adopter's own processing activities, and the legal bases they state for a capability's — the `processing`
|
|
42
|
+
* block of the Worker's `pithy.config.ts`. Resolved here over what this Worker composes, so a block that does not
|
|
43
|
+
* parse, or overrides an activity nothing declares, refuses to deploy. See `processing/activity.ts`.
|
|
44
|
+
*/
|
|
45
|
+
processing?: unknown;
|
|
33
46
|
}
|
|
34
47
|
/** The Hono env `createBackend` returns — `db`/`kv`/`workflows` typed precisely from the merged capabilities. */
|
|
35
48
|
type BackendEnv<Caps extends readonly Capability[]> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBackend.d.ts","sourceRoot":"","sources":["../src/createBackend.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EAEpB,SAAS,EACV,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EAAqC,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAMtF,OAAO,EAA8B,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE9E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createBackend.d.ts","sourceRoot":"","sources":["../src/createBackend.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EAEpB,SAAS,EACV,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EAAqC,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAMtF,OAAO,EAA8B,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE9E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAY9C,OAAO,EAA2B,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGvF,oGAAoG;AACpG,MAAM,WAAW,oBAAoB,CAAC,IAAI,SAAS,SAAS,UAAU,EAAE,EAAE,GA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SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAqNrF"}
|
package/dist/createBackend.js
CHANGED
|
@@ -7,10 +7,14 @@ import { pithyCommandOf } from "./cli/command.js";
|
|
|
7
7
|
import { BindingSpec } from "./capability/bindings.js";
|
|
8
8
|
import { recordComposition } from "./capability/composition.js";
|
|
9
9
|
import { validateBindings } from "./capability/validateBindings.js";
|
|
10
|
+
import { recordRouteGroups } from "./openapi/routeGroups.js";
|
|
11
|
+
import { describeRoute } from "./http/routeSpec.js";
|
|
12
|
+
import { registerPresenceRoutes } from "./presence/http/routes.js";
|
|
10
13
|
import { refuseEncryptedKvStores } from "./privacy/encryptedColumns.js";
|
|
14
|
+
import { effectiveRetention, recordRetention } from "./retention/composed.js";
|
|
11
15
|
import { workerVersion } from "./worker/identity.js";
|
|
12
|
-
import { describeRoute } from "./http/routeSpec.js";
|
|
13
16
|
import { buildDbRegistry, composeDatabases } from "./data/databases.js";
|
|
17
|
+
import { effectiveProcessing, recordProcessing } from "./processing/composed.js";
|
|
14
18
|
import { isControlPlaneCapability } from "./controlPlane/capability.js";
|
|
15
19
|
import { allowedOriginSet, corsSurface, registerControlPlaneCors } from "./controlPlane/http/cors.js";
|
|
16
20
|
import { registerReadinessGuards } from "./controlPlane/http/readiness.js";
|
|
@@ -20,7 +24,7 @@ import { catalogFor, composeMessages } from "./i18n/registry.js";
|
|
|
20
24
|
import { buildKvRegistry, composeKv } from "./kv/namespaces.js";
|
|
21
25
|
import { bindRequestContext, createWorkerLogger } from "./logger/worker.js";
|
|
22
26
|
import { loggingErrorHandler } from "./logger/errorHandler.js";
|
|
23
|
-
import {
|
|
27
|
+
import { assertToolDeclarations } from "./mcp/tools.js";
|
|
24
28
|
import { HEALTH_PATH } from "./worker/health.js";
|
|
25
29
|
import { registeredWorkflowBinding } from "./workflow/bindings.js";
|
|
26
30
|
import { buildWorkflowDispatcher } from "./workflow/dispatch.js";
|
|
@@ -96,6 +100,8 @@ function createBackend(options) {
|
|
|
96
100
|
});
|
|
97
101
|
for (const cap of all) cap.compose?.({ capabilities: all });
|
|
98
102
|
recordComposition(all);
|
|
103
|
+
recordRetention(effectiveRetention(options.retention, all));
|
|
104
|
+
recordProcessing(effectiveProcessing(options.processing, all));
|
|
99
105
|
const databases = composeDatabases(all);
|
|
100
106
|
const messages = composeMessages(all);
|
|
101
107
|
const defaultTranslator = bakedTranslator(catalogFor(messages, "en"));
|
|
@@ -162,7 +168,7 @@ function createBackend(options) {
|
|
|
162
168
|
* The path is `worker/health.ts`'s, not a literal here. Three other sites need the same string — the
|
|
163
169
|
* CLI's route allowlist, `pithy deploy`'s post-deploy probe, and the bare home screen a no-auth
|
|
164
170
|
* scaffold seeds — and that last one is in somebody else's repository, rendering nothing but this
|
|
165
|
-
* request's answer
|
|
171
|
+
* request's answer.
|
|
166
172
|
*
|
|
167
173
|
* The version is what turns `pithy deploy`'s post-deploy check from a liveness probe into an
|
|
168
174
|
* assertion. `status: "ok"` at the declared domain proves *a* Worker is there; it does not prove it is
|
|
@@ -198,12 +204,14 @@ function createBackend(options) {
|
|
|
198
204
|
for (const cap of all) {
|
|
199
205
|
const start = app.routes.length;
|
|
200
206
|
cap.routes?.(app);
|
|
207
|
+
if (cap.presence && cap.presence.rooms.length > 0) registerPresenceRoutes(app, cap.presence);
|
|
201
208
|
groups.push({
|
|
202
209
|
tag: cap.name,
|
|
203
210
|
routes: app.routes.slice(start)
|
|
204
211
|
});
|
|
205
212
|
}
|
|
206
213
|
recordRouteGroups(app, groups);
|
|
214
|
+
assertToolDeclarations(groups);
|
|
207
215
|
return app;
|
|
208
216
|
}
|
|
209
217
|
//#endregion
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import type { ExecutionContext, ForwardableEmailMessage } from "@cloudflare/workers-types";
|
|
4
4
|
import type { Capability } from "./capability/capability";
|
|
5
5
|
import { type CreateBackendOptions } from "./createBackend";
|
|
6
|
+
import { type QueueBatch } from "./queue/consumer";
|
|
6
7
|
/**
|
|
7
8
|
* A deployable Worker entrypoint: `fetch`, the single inbound `email` handler the runtime permits
|
|
8
9
|
* per Worker, and the single `scheduled` handler it permits for cron triggers. `createBackend`
|
|
@@ -49,6 +50,12 @@ export interface PithyEntrypoint {
|
|
|
49
50
|
* tested in staging.
|
|
50
51
|
*/
|
|
51
52
|
scheduled?: (controller: unknown, env: Record<string, unknown>, ctx: ExecutionContext) => Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* The Worker `queue` handler — hands each composed capability the messages of a batch that name it (#824).
|
|
55
|
+
* **Present only when at least one capability consumes a queue**, for `email`'s reason: an inert handler would
|
|
56
|
+
* acknowledge every message delivered to it and drop it.
|
|
57
|
+
*/
|
|
58
|
+
queue?: (batch: QueueBatch, env: Record<string, unknown>, ctx: ExecutionContext) => Promise<void>;
|
|
52
59
|
}
|
|
53
60
|
/**
|
|
54
61
|
* Assemble capabilities into a Worker entrypoint object — `{ fetch, email }`. Use this instead of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEntrypoint.d.ts","sourceRoot":"","sources":["../src/createEntrypoint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,KAAK,EAAE,UAAU,EAA0B,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,KAAK,oBAAoB,EAAiB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createEntrypoint.d.ts","sourceRoot":"","sources":["../src/createEntrypoint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,OAAO,KAAK,EAAE,UAAU,EAA0B,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,KAAK,oBAAoB,EAAiB,MAAM,iBAAiB,CAAC;AAE3E,OAAO,EAAmD,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC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-Identifier: MIT
|
|
3
|
+
import { createWorkerLogger } from "./logger/worker.js";
|
|
3
4
|
import { triggerWorkflow } from "./workflow/dispatch.js";
|
|
4
5
|
import { composeWorkflows, scheduledWorkflows } from "./workflow/register.js";
|
|
5
6
|
import { createBackend } from "./createBackend.js";
|
|
7
|
+
import { dispatchQueueBatch } from "./queue/consumer.js";
|
|
6
8
|
import { withLocalServices } from "./worker/serviceLoopback.js";
|
|
7
9
|
//#region src/createEntrypoint.ts
|
|
8
10
|
/** The cron expression a `scheduled` event fired for, or `undefined` when the event names none. */
|
|
@@ -52,6 +54,8 @@ function createEntrypoint(options) {
|
|
|
52
54
|
}
|
|
53
55
|
if (failures[0] !== void 0) throw failures[0];
|
|
54
56
|
};
|
|
57
|
+
const consumers = new Map(all.flatMap((cap) => cap.queue ? [[cap.name, cap.queue]] : []));
|
|
58
|
+
if (consumers.size > 0) entrypoint.queue = (batch, env, ctx) => dispatchQueueBatch(batch, consumers, withLocalServices(env), ctx, createWorkerLogger({ name: "queue" }));
|
|
55
59
|
if (handlers.length > 0) entrypoint.email = async (message, given, ctx) => {
|
|
56
60
|
const env = withLocalServices(given);
|
|
57
61
|
if (handlers.length === 1) {
|
package/dist/error/http.d.ts
CHANGED
|
@@ -78,6 +78,11 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
78
78
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
79
79
|
code: z.ZodLiteral<"auth/account_deleted">;
|
|
80
80
|
status: z.ZodLiteral<403>;
|
|
81
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
82
|
+
message: z.ZodString;
|
|
83
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
84
|
+
code: z.ZodLiteral<"auth/handoff_invalid">;
|
|
85
|
+
status: z.ZodLiteral<400>;
|
|
81
86
|
}, z.core.$strip>, z.ZodObject<{
|
|
82
87
|
message: z.ZodString;
|
|
83
88
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -133,6 +138,16 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
133
138
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
134
139
|
code: z.ZodLiteral<"core/webhook_unverified">;
|
|
135
140
|
status: z.ZodLiteral<401>;
|
|
141
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
+
message: z.ZodString;
|
|
143
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
144
|
+
code: z.ZodLiteral<"core/presence_ticket_invalid">;
|
|
145
|
+
status: z.ZodLiteral<401>;
|
|
146
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
147
|
+
message: z.ZodString;
|
|
148
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
149
|
+
code: z.ZodLiteral<"core/presence_room_full">;
|
|
150
|
+
status: z.ZodLiteral<409>;
|
|
136
151
|
}, z.core.$strip>, z.ZodObject<{
|
|
137
152
|
message: z.ZodString;
|
|
138
153
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -368,6 +383,21 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
368
383
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
369
384
|
code: z.ZodLiteral<"ledger/invalid_amount">;
|
|
370
385
|
status: z.ZodLiteral<400>;
|
|
386
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
387
|
+
message: z.ZodString;
|
|
388
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
389
|
+
code: z.ZodLiteral<"ledger/entry_not_found">;
|
|
390
|
+
status: z.ZodLiteral<404>;
|
|
391
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
392
|
+
message: z.ZodString;
|
|
393
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
394
|
+
code: z.ZodLiteral<"ledger/entry_not_reversible">;
|
|
395
|
+
status: z.ZodLiteral<409>;
|
|
396
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
397
|
+
message: z.ZodString;
|
|
398
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
399
|
+
code: z.ZodLiteral<"ledger/ref_conflict">;
|
|
400
|
+
status: z.ZodLiteral<409>;
|
|
371
401
|
}, z.core.$strip>, z.ZodObject<{
|
|
372
402
|
message: z.ZodString;
|
|
373
403
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -398,6 +428,46 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
398
428
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
399
429
|
code: z.ZodLiteral<"rating/record_forbidden">;
|
|
400
430
|
status: z.ZodLiteral<403>;
|
|
431
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
432
|
+
message: z.ZodString;
|
|
433
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
434
|
+
code: z.ZodLiteral<"consent/unknown_purpose">;
|
|
435
|
+
status: z.ZodLiteral<404>;
|
|
436
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
437
|
+
message: z.ZodString;
|
|
438
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
439
|
+
code: z.ZodLiteral<"consent/stale_notice">;
|
|
440
|
+
status: z.ZodLiteral<409>;
|
|
441
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
442
|
+
message: z.ZodString;
|
|
443
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
444
|
+
code: z.ZodLiteral<"consent/method_below_minimum">;
|
|
445
|
+
status: z.ZodLiteral<400>;
|
|
446
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
447
|
+
message: z.ZodString;
|
|
448
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
449
|
+
code: z.ZodLiteral<"consent/withdrawal_below_grant">;
|
|
450
|
+
status: z.ZodLiteral<400>;
|
|
451
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
452
|
+
message: z.ZodString;
|
|
453
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
454
|
+
code: z.ZodLiteral<"consent/evidence_missing">;
|
|
455
|
+
status: z.ZodLiteral<400>;
|
|
456
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
457
|
+
message: z.ZodString;
|
|
458
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
459
|
+
code: z.ZodLiteral<"consent/expiry_passed">;
|
|
460
|
+
status: z.ZodLiteral<400>;
|
|
461
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
462
|
+
message: z.ZodString;
|
|
463
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
464
|
+
code: z.ZodLiteral<"consent/document_not_found">;
|
|
465
|
+
status: z.ZodLiteral<404>;
|
|
466
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
467
|
+
message: z.ZodString;
|
|
468
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
469
|
+
code: z.ZodLiteral<"consent/evidence_store_missing">;
|
|
470
|
+
status: z.ZodLiteral<500>;
|
|
401
471
|
}, z.core.$strip>, z.ZodObject<{
|
|
402
472
|
message: z.ZodString;
|
|
403
473
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -865,6 +935,13 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
865
935
|
detail: z.ZodOptional<z.ZodString>;
|
|
866
936
|
code: z.ZodLiteral<"auth/account_deleted">;
|
|
867
937
|
status: z.ZodLiteral<403>;
|
|
938
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
939
|
+
message: z.ZodString;
|
|
940
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
941
|
+
action: z.ZodOptional<z.ZodString>;
|
|
942
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
943
|
+
code: z.ZodLiteral<"auth/handoff_invalid">;
|
|
944
|
+
status: z.ZodLiteral<400>;
|
|
868
945
|
}, z.core.$strip>, z.ZodObject<{
|
|
869
946
|
message: z.ZodString;
|
|
870
947
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -942,6 +1019,20 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
942
1019
|
detail: z.ZodOptional<z.ZodString>;
|
|
943
1020
|
code: z.ZodLiteral<"core/webhook_unverified">;
|
|
944
1021
|
status: z.ZodLiteral<401>;
|
|
1022
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1023
|
+
message: z.ZodString;
|
|
1024
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1025
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1026
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1027
|
+
code: z.ZodLiteral<"core/presence_ticket_invalid">;
|
|
1028
|
+
status: z.ZodLiteral<401>;
|
|
1029
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1030
|
+
message: z.ZodString;
|
|
1031
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1032
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1033
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1034
|
+
code: z.ZodLiteral<"core/presence_room_full">;
|
|
1035
|
+
status: z.ZodLiteral<409>;
|
|
945
1036
|
}, z.core.$strip>, z.ZodObject<{
|
|
946
1037
|
message: z.ZodString;
|
|
947
1038
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -1271,6 +1362,27 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
1271
1362
|
detail: z.ZodOptional<z.ZodString>;
|
|
1272
1363
|
code: z.ZodLiteral<"ledger/invalid_amount">;
|
|
1273
1364
|
status: z.ZodLiteral<400>;
|
|
1365
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1366
|
+
message: z.ZodString;
|
|
1367
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1368
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1369
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1370
|
+
code: z.ZodLiteral<"ledger/entry_not_found">;
|
|
1371
|
+
status: z.ZodLiteral<404>;
|
|
1372
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1373
|
+
message: z.ZodString;
|
|
1374
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1375
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1376
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1377
|
+
code: z.ZodLiteral<"ledger/entry_not_reversible">;
|
|
1378
|
+
status: z.ZodLiteral<409>;
|
|
1379
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1380
|
+
message: z.ZodString;
|
|
1381
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1382
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1383
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1384
|
+
code: z.ZodLiteral<"ledger/ref_conflict">;
|
|
1385
|
+
status: z.ZodLiteral<409>;
|
|
1274
1386
|
}, z.core.$strip>, z.ZodObject<{
|
|
1275
1387
|
message: z.ZodString;
|
|
1276
1388
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -1313,6 +1425,62 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
1313
1425
|
detail: z.ZodOptional<z.ZodString>;
|
|
1314
1426
|
code: z.ZodLiteral<"rating/record_forbidden">;
|
|
1315
1427
|
status: z.ZodLiteral<403>;
|
|
1428
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1429
|
+
message: z.ZodString;
|
|
1430
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1431
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1432
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1433
|
+
code: z.ZodLiteral<"consent/unknown_purpose">;
|
|
1434
|
+
status: z.ZodLiteral<404>;
|
|
1435
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1436
|
+
message: z.ZodString;
|
|
1437
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1438
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1439
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1440
|
+
code: z.ZodLiteral<"consent/stale_notice">;
|
|
1441
|
+
status: z.ZodLiteral<409>;
|
|
1442
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1443
|
+
message: z.ZodString;
|
|
1444
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1445
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1446
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1447
|
+
code: z.ZodLiteral<"consent/method_below_minimum">;
|
|
1448
|
+
status: z.ZodLiteral<400>;
|
|
1449
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1450
|
+
message: z.ZodString;
|
|
1451
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1452
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1453
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1454
|
+
code: z.ZodLiteral<"consent/withdrawal_below_grant">;
|
|
1455
|
+
status: z.ZodLiteral<400>;
|
|
1456
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1457
|
+
message: z.ZodString;
|
|
1458
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1459
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1460
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1461
|
+
code: z.ZodLiteral<"consent/evidence_missing">;
|
|
1462
|
+
status: z.ZodLiteral<400>;
|
|
1463
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1464
|
+
message: z.ZodString;
|
|
1465
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1466
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1467
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1468
|
+
code: z.ZodLiteral<"consent/expiry_passed">;
|
|
1469
|
+
status: z.ZodLiteral<400>;
|
|
1470
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1471
|
+
message: z.ZodString;
|
|
1472
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1473
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1474
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1475
|
+
code: z.ZodLiteral<"consent/document_not_found">;
|
|
1476
|
+
status: z.ZodLiteral<404>;
|
|
1477
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1478
|
+
message: z.ZodString;
|
|
1479
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1480
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1481
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1482
|
+
code: z.ZodLiteral<"consent/evidence_store_missing">;
|
|
1483
|
+
status: z.ZodLiteral<500>;
|
|
1316
1484
|
}, z.core.$strip>, z.ZodObject<{
|
|
1317
1485
|
message: z.ZodString;
|
|
1318
1486
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
package/dist/error/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/error/http.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAA4B,UAAU,EAAmB,MAAM,cAAc,CAAC;AAErF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/error/http.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAA4B,UAAU,EAAmB,MAAM,cAAc,CAAC;AAErF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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