@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
package/dist/error/payload.js
CHANGED
|
@@ -107,6 +107,11 @@ const AuthAccountDeletedPublic = z.object({
|
|
|
107
107
|
status: z.literal(403).describe("Forbidden — the account exists and may not act. Not 404, because until the purge runs it can come back, and not 401, because signing in again cannot help."),
|
|
108
108
|
...publicFields
|
|
109
109
|
}).describe("The account is deleted and awaiting its purge (403).");
|
|
110
|
+
const AuthHandoffInvalidPublic = z.object({
|
|
111
|
+
code: z.literal("auth/handoff_invalid").describe("The one-time code a native app trades for its session after a redirect sign-in is spent, expired, was never issued, or came with the wrong verifier. One code for all four, so the answer says nothing about which codes exist or why a trade failed. The remedy is the same for each: sign in again."),
|
|
112
|
+
status: z.literal(400).describe("Bad Request — the code presented cannot be traded. Not 401: no credential was presented to refuse."),
|
|
113
|
+
...publicFields
|
|
114
|
+
}).describe("A sign-in handoff code that is spent, expired, unknown or presented with the wrong verifier (400).");
|
|
110
115
|
const NotFoundPublic = z.object({
|
|
111
116
|
code: z.literal("core/not_found").describe("The requested resource does not exist."),
|
|
112
117
|
status: z.literal(404).describe("Not Found."),
|
|
@@ -162,6 +167,16 @@ const WebhookUnverifiedPublic = z.object({
|
|
|
162
167
|
status: z.literal(401).describe("Unauthorized — the delivery did not prove its origin."),
|
|
163
168
|
...publicFields
|
|
164
169
|
}).describe("An inbound webhook failed its signature check (401).");
|
|
170
|
+
const PresenceTicketInvalidPublic = z.object({
|
|
171
|
+
code: z.literal("core/presence_ticket_invalid").describe("A presence socket was opened without a ticket this Worker accepts. Deliberately one code for every failing step — no ticket, a bad signature, an expired one, one already spent, or one minted for another room — so a caller holding a stolen ticket learns nothing about which check it tripped. `detail` names the step for the log, and the codec strips it."),
|
|
172
|
+
status: z.literal(401).describe("Unauthorized — mint a fresh ticket and open the socket with it."),
|
|
173
|
+
...publicFields
|
|
174
|
+
}).describe("A presence socket upgrade carried no valid ticket (401).");
|
|
175
|
+
const PresenceRoomFullPublic = z.object({
|
|
176
|
+
code: z.literal("core/presence_room_full").describe("A presence room already holds as many participants as its room kind allows."),
|
|
177
|
+
status: z.literal(409).describe("Conflict — the room is at its participant cap. Try again when someone leaves."),
|
|
178
|
+
...publicFields
|
|
179
|
+
}).describe("A presence room is at its participant cap (409).");
|
|
165
180
|
const CloudflareNotConfiguredPublic = z.object({
|
|
166
181
|
code: z.literal("cloudflare/not_configured").describe("The CF REST client is missing required configuration (token, account, or a resource id)."),
|
|
167
182
|
status: z.literal(500).describe("Internal Server Error — a configuration fault, not a client request."),
|
|
@@ -397,6 +412,21 @@ const LedgerInvalidAmountPublic = z.object({
|
|
|
397
412
|
status: z.literal(400).describe("Bad Request — the amount is not a positive integer."),
|
|
398
413
|
...publicFields
|
|
399
414
|
}).describe("An amount is not a positive integer (400).");
|
|
415
|
+
const LedgerEntryNotFoundPublic = z.object({
|
|
416
|
+
code: z.literal("ledger/entry_not_found").describe("No ledger entry with that reference exists on the account named. An entry on another account is answered the same way, so a reversal can never reach past the account its path names."),
|
|
417
|
+
status: z.literal(404).describe("Not Found."),
|
|
418
|
+
...publicFields
|
|
419
|
+
}).describe("A referenced ledger entry does not exist on that account (404).");
|
|
420
|
+
const LedgerEntryNotReversiblePublic = z.object({
|
|
421
|
+
code: z.literal("ledger/entry_not_reversible").describe("Only a credit or a debit reverses, and never one that is itself a reversal. A hold has release; a capture spends escrow and a transfer touches a second account, so both are refused. `params.kind` names the entry's kind, and `params.reverses` the entry a reversal reversed. Nothing was written."),
|
|
422
|
+
status: z.literal(409).describe("Conflict — the entry's kind does not reverse."),
|
|
423
|
+
...publicFields
|
|
424
|
+
}).describe("A ledger entry of a kind that does not reverse (409).");
|
|
425
|
+
const LedgerRefConflictPublic = z.object({
|
|
426
|
+
code: z.literal("ledger/ref_conflict").describe("The ref a control-plane write would be written under is already held by a different entry, so the write cannot be recorded and is not a replay either: a credit's or a debit's key already used for another account, the other act, another amount or a hold, or the derived ref of a reversal or a hold's resolution held by an unrelated entry. Nothing moved; the entry stays unreversed, or the hold stays open."),
|
|
427
|
+
status: z.literal(409).describe("Conflict — the ref belongs to another entry."),
|
|
428
|
+
...publicFields
|
|
429
|
+
}).describe("A write whose ref another entry already holds (409).");
|
|
400
430
|
const RatingUnknownAlgorithmPublic = z.object({
|
|
401
431
|
code: z.literal("rating/unknown_algorithm").describe("A game wires a rating algorithm id that no one registered. Algorithm ids come from the built-ins (`elo`/`glicko`/`trueskill`) or `registerRatingAlgorithm`, not the database."),
|
|
402
432
|
status: z.literal(400).describe("Bad Request — the adopter's config names an unregistered algorithm."),
|
|
@@ -427,6 +457,46 @@ const RatingRecordForbiddenPublic = z.object({
|
|
|
427
457
|
status: z.literal(403).describe("Forbidden — the caller may not record outcomes."),
|
|
428
458
|
...publicFields
|
|
429
459
|
}).describe("The caller lacks the scope to record a rated outcome (403).");
|
|
460
|
+
const ConsentUnknownPurposePublic = z.object({
|
|
461
|
+
code: z.literal("consent/unknown_purpose").describe("No consent purpose with that id is declared by a composed capability or in `consent({ purposes })`."),
|
|
462
|
+
status: z.literal(404).describe("Not Found."),
|
|
463
|
+
...publicFields
|
|
464
|
+
}).describe("A consent purpose that is not declared (404).");
|
|
465
|
+
const ConsentStaleNoticePublic = z.object({
|
|
466
|
+
code: z.literal("consent/stale_notice").describe("The grant names a notice version that is not the purpose's current one. A person agrees to the notice in force, so the screen showing an older one has to be reloaded."),
|
|
467
|
+
status: z.literal(409).describe("Conflict — the notice has moved on."),
|
|
468
|
+
...publicFields
|
|
469
|
+
}).describe("A grant against a notice version that is not current (409).");
|
|
470
|
+
const ConsentMethodBelowMinimumPublic = z.object({
|
|
471
|
+
code: z.literal("consent/method_below_minimum").describe("The grant was given by a method below the purpose's minimum — a click where the purpose needs a typed name, a drawn signature or a provider's envelope."),
|
|
472
|
+
status: z.literal(400).describe("Bad Request — the method is below the purpose's minimum."),
|
|
473
|
+
...publicFields
|
|
474
|
+
}).describe("A grant below the purpose's minimum method (400).");
|
|
475
|
+
const ConsentWithdrawalBelowGrantPublic = z.object({
|
|
476
|
+
code: z.literal("consent/withdrawal_below_grant").describe("The purpose requires a withdrawal at least at the grade of the grant it withdraws, as a HIPAA revocation must be in writing, and this one is below it."),
|
|
477
|
+
status: z.literal(400).describe("Bad Request — the withdrawal is below the grant's method."),
|
|
478
|
+
...publicFields
|
|
479
|
+
}).describe("A withdrawal below the grade its purpose requires (400).");
|
|
480
|
+
const ConsentEvidenceMissingPublic = z.object({
|
|
481
|
+
code: z.literal("consent/evidence_missing").describe("The method names evidence the request did not carry: a typed name for `typed`, a drawn image for `drawn`, a provider and envelope for `provider`, or the document a signed grant is given against."),
|
|
482
|
+
status: z.literal(400).describe("Bad Request — the evidence for the method is missing."),
|
|
483
|
+
...publicFields
|
|
484
|
+
}).describe("A grant or withdrawal missing the evidence its method needs (400).");
|
|
485
|
+
const ConsentExpiryPassedPublic = z.object({
|
|
486
|
+
code: z.literal("consent/expiry_passed").describe("The grant's expiry is not in the future, so it would answer no from the moment it was recorded."),
|
|
487
|
+
status: z.literal(400).describe("Bad Request — the expiry has already passed."),
|
|
488
|
+
...publicFields
|
|
489
|
+
}).describe("A grant whose expiry has already passed (400).");
|
|
490
|
+
const ConsentDocumentNotFoundPublic = z.object({
|
|
491
|
+
code: z.literal("consent/document_not_found").describe("No signed document with that content hash is kept."),
|
|
492
|
+
status: z.literal(404).describe("Not Found."),
|
|
493
|
+
...publicFields
|
|
494
|
+
}).describe("A signed document that is not kept (404).");
|
|
495
|
+
const ConsentEvidenceStoreMissingPublic = z.object({
|
|
496
|
+
code: z.literal("consent/evidence_store_missing").describe("A drawn signature or a provider's certificate is stored in R2, and the Worker has no `CONSENT_EVIDENCE` bucket bound. A binding we never got, so the answer is in this Worker's wiring."),
|
|
497
|
+
status: z.literal(500).describe("Internal Server Error — the evidence bucket is not bound."),
|
|
498
|
+
...publicFields
|
|
499
|
+
}).describe("The evidence bucket is not bound (500).");
|
|
430
500
|
const MatchmakingRoomNotFoundPublic = z.object({
|
|
431
501
|
code: z.literal("matchmaking/room_not_found").describe("No open room has that code — it never existed, expired, or was already used up."),
|
|
432
502
|
status: z.literal(404).describe("Not Found."),
|
|
@@ -829,6 +899,7 @@ const KitPublicErrorPayload = z.discriminatedUnion("code", [
|
|
|
829
899
|
AuthSessionNotFreshPublic,
|
|
830
900
|
AuthAccountSuspendedPublic,
|
|
831
901
|
AuthAccountDeletedPublic,
|
|
902
|
+
AuthHandoffInvalidPublic,
|
|
832
903
|
NotFoundPublic,
|
|
833
904
|
ConflictPublic,
|
|
834
905
|
RateLimitPublic,
|
|
@@ -840,6 +911,8 @@ const KitPublicErrorPayload = z.discriminatedUnion("code", [
|
|
|
840
911
|
UnknownWorkflowPublic,
|
|
841
912
|
WorkflowFailedPublic,
|
|
842
913
|
WebhookUnverifiedPublic,
|
|
914
|
+
PresenceTicketInvalidPublic,
|
|
915
|
+
PresenceRoomFullPublic,
|
|
843
916
|
CloudflareNotConfiguredPublic,
|
|
844
917
|
CloudflareRequestFailedPublic,
|
|
845
918
|
CloudflareInvalidResponsePublic,
|
|
@@ -887,12 +960,23 @@ const KitPublicErrorPayload = z.discriminatedUnion("code", [
|
|
|
887
960
|
LedgerInsufficientFundsPublic,
|
|
888
961
|
LedgerHoldNotOpenPublic,
|
|
889
962
|
LedgerInvalidAmountPublic,
|
|
963
|
+
LedgerEntryNotFoundPublic,
|
|
964
|
+
LedgerEntryNotReversiblePublic,
|
|
965
|
+
LedgerRefConflictPublic,
|
|
890
966
|
RatingUnknownAlgorithmPublic,
|
|
891
967
|
RatingUnsupportedPlayerCountPublic,
|
|
892
968
|
RatingInvalidParamsPublic,
|
|
893
969
|
RatingGameNotFoundPublic,
|
|
894
970
|
RatingPoolNotFoundPublic,
|
|
895
971
|
RatingRecordForbiddenPublic,
|
|
972
|
+
ConsentUnknownPurposePublic,
|
|
973
|
+
ConsentStaleNoticePublic,
|
|
974
|
+
ConsentMethodBelowMinimumPublic,
|
|
975
|
+
ConsentWithdrawalBelowGrantPublic,
|
|
976
|
+
ConsentEvidenceMissingPublic,
|
|
977
|
+
ConsentExpiryPassedPublic,
|
|
978
|
+
ConsentDocumentNotFoundPublic,
|
|
979
|
+
ConsentEvidenceStoreMissingPublic,
|
|
896
980
|
MatchmakingRoomNotFoundPublic,
|
|
897
981
|
MatchmakingRoomFullPublic,
|
|
898
982
|
MatchmakingInvalidCodePublic,
|
|
@@ -981,6 +1065,7 @@ const AuthProviderUnavailable = AuthProviderUnavailablePublic.extend(internalFie
|
|
|
981
1065
|
const AuthSessionNotFresh = AuthSessionNotFreshPublic.extend(internalFields).describe(AuthSessionNotFreshPublic.description ?? "");
|
|
982
1066
|
const AuthAccountSuspended = AuthAccountSuspendedPublic.extend(internalFields).describe(AuthAccountSuspendedPublic.description ?? "");
|
|
983
1067
|
const AuthAccountDeleted = AuthAccountDeletedPublic.extend(internalFields).describe(AuthAccountDeletedPublic.description ?? "");
|
|
1068
|
+
const AuthHandoffInvalid = AuthHandoffInvalidPublic.extend(internalFields).describe(AuthHandoffInvalidPublic.description ?? "");
|
|
984
1069
|
const NotFound = NotFoundPublic.extend(internalFields).describe(NotFoundPublic.description ?? "");
|
|
985
1070
|
const Conflict = ConflictPublic.extend(internalFields).describe(ConflictPublic.description ?? "");
|
|
986
1071
|
const RateLimit = RateLimitPublic.extend(internalFields).describe(RateLimitPublic.description ?? "");
|
|
@@ -992,6 +1077,8 @@ const MissingWorkflowBinding = MissingWorkflowBindingPublic.extend(internalField
|
|
|
992
1077
|
const UnknownWorkflow = UnknownWorkflowPublic.extend(internalFields).describe(UnknownWorkflowPublic.description ?? "");
|
|
993
1078
|
const WorkflowFailed = WorkflowFailedPublic.extend(internalFields).describe(WorkflowFailedPublic.description ?? "");
|
|
994
1079
|
const WebhookUnverified = WebhookUnverifiedPublic.extend(internalFields).describe(WebhookUnverifiedPublic.description ?? "");
|
|
1080
|
+
const PresenceTicketInvalid = PresenceTicketInvalidPublic.extend(internalFields).describe(PresenceTicketInvalidPublic.description ?? "");
|
|
1081
|
+
const PresenceRoomFull = PresenceRoomFullPublic.extend(internalFields).describe(PresenceRoomFullPublic.description ?? "");
|
|
995
1082
|
const CloudflareNotConfigured = CloudflareNotConfiguredPublic.extend(internalFields).describe(CloudflareNotConfiguredPublic.description ?? "");
|
|
996
1083
|
const CloudflareRequestFailed = CloudflareRequestFailedPublic.extend(internalFields).describe(CloudflareRequestFailedPublic.description ?? "");
|
|
997
1084
|
const CloudflareInvalidResponse = CloudflareInvalidResponsePublic.extend(internalFields).describe(CloudflareInvalidResponsePublic.description ?? "");
|
|
@@ -1039,12 +1126,23 @@ const LedgerHoldNotFound = LedgerHoldNotFoundPublic.extend(internalFields).descr
|
|
|
1039
1126
|
const LedgerInsufficientFunds = LedgerInsufficientFundsPublic.extend(internalFields).describe(LedgerInsufficientFundsPublic.description ?? "");
|
|
1040
1127
|
const LedgerHoldNotOpen = LedgerHoldNotOpenPublic.extend(internalFields).describe(LedgerHoldNotOpenPublic.description ?? "");
|
|
1041
1128
|
const LedgerInvalidAmount = LedgerInvalidAmountPublic.extend(internalFields).describe(LedgerInvalidAmountPublic.description ?? "");
|
|
1129
|
+
const LedgerEntryNotFound = LedgerEntryNotFoundPublic.extend(internalFields).describe(LedgerEntryNotFoundPublic.description ?? "");
|
|
1130
|
+
const LedgerEntryNotReversible = LedgerEntryNotReversiblePublic.extend(internalFields).describe(LedgerEntryNotReversiblePublic.description ?? "");
|
|
1131
|
+
const LedgerRefConflict = LedgerRefConflictPublic.extend(internalFields).describe(LedgerRefConflictPublic.description ?? "");
|
|
1042
1132
|
const RatingUnknownAlgorithm = RatingUnknownAlgorithmPublic.extend(internalFields).describe(RatingUnknownAlgorithmPublic.description ?? "");
|
|
1043
1133
|
const RatingUnsupportedPlayerCount = RatingUnsupportedPlayerCountPublic.extend(internalFields).describe(RatingUnsupportedPlayerCountPublic.description ?? "");
|
|
1044
1134
|
const RatingInvalidParams = RatingInvalidParamsPublic.extend(internalFields).describe(RatingInvalidParamsPublic.description ?? "");
|
|
1045
1135
|
const RatingGameNotFound = RatingGameNotFoundPublic.extend(internalFields).describe(RatingGameNotFoundPublic.description ?? "");
|
|
1046
1136
|
const RatingPoolNotFound = RatingPoolNotFoundPublic.extend(internalFields).describe(RatingPoolNotFoundPublic.description ?? "");
|
|
1047
1137
|
const RatingRecordForbidden = RatingRecordForbiddenPublic.extend(internalFields).describe(RatingRecordForbiddenPublic.description ?? "");
|
|
1138
|
+
const ConsentUnknownPurpose = ConsentUnknownPurposePublic.extend(internalFields).describe(ConsentUnknownPurposePublic.description ?? "");
|
|
1139
|
+
const ConsentStaleNotice = ConsentStaleNoticePublic.extend(internalFields).describe(ConsentStaleNoticePublic.description ?? "");
|
|
1140
|
+
const ConsentMethodBelowMinimum = ConsentMethodBelowMinimumPublic.extend(internalFields).describe(ConsentMethodBelowMinimumPublic.description ?? "");
|
|
1141
|
+
const ConsentWithdrawalBelowGrant = ConsentWithdrawalBelowGrantPublic.extend(internalFields).describe(ConsentWithdrawalBelowGrantPublic.description ?? "");
|
|
1142
|
+
const ConsentEvidenceMissing = ConsentEvidenceMissingPublic.extend(internalFields).describe(ConsentEvidenceMissingPublic.description ?? "");
|
|
1143
|
+
const ConsentExpiryPassed = ConsentExpiryPassedPublic.extend(internalFields).describe(ConsentExpiryPassedPublic.description ?? "");
|
|
1144
|
+
const ConsentDocumentNotFound = ConsentDocumentNotFoundPublic.extend(internalFields).describe(ConsentDocumentNotFoundPublic.description ?? "");
|
|
1145
|
+
const ConsentEvidenceStoreMissing = ConsentEvidenceStoreMissingPublic.extend(internalFields).describe(ConsentEvidenceStoreMissingPublic.description ?? "");
|
|
1048
1146
|
const MatchmakingRoomNotFound = MatchmakingRoomNotFoundPublic.extend(internalFields).describe(MatchmakingRoomNotFoundPublic.description ?? "");
|
|
1049
1147
|
const MatchmakingRoomFull = MatchmakingRoomFullPublic.extend(internalFields).describe(MatchmakingRoomFullPublic.description ?? "");
|
|
1050
1148
|
const MatchmakingInvalidCode = MatchmakingInvalidCodePublic.extend(internalFields).describe(MatchmakingInvalidCodePublic.description ?? "");
|
|
@@ -1138,6 +1236,7 @@ const KitErrorPayload = z.discriminatedUnion("code", [
|
|
|
1138
1236
|
AuthSessionNotFresh,
|
|
1139
1237
|
AuthAccountSuspended,
|
|
1140
1238
|
AuthAccountDeleted,
|
|
1239
|
+
AuthHandoffInvalid,
|
|
1141
1240
|
NotFound,
|
|
1142
1241
|
Conflict,
|
|
1143
1242
|
RateLimit,
|
|
@@ -1149,6 +1248,8 @@ const KitErrorPayload = z.discriminatedUnion("code", [
|
|
|
1149
1248
|
UnknownWorkflow,
|
|
1150
1249
|
WorkflowFailed,
|
|
1151
1250
|
WebhookUnverified,
|
|
1251
|
+
PresenceTicketInvalid,
|
|
1252
|
+
PresenceRoomFull,
|
|
1152
1253
|
CloudflareNotConfigured,
|
|
1153
1254
|
CloudflareRequestFailed,
|
|
1154
1255
|
CloudflareInvalidResponse,
|
|
@@ -1196,12 +1297,23 @@ const KitErrorPayload = z.discriminatedUnion("code", [
|
|
|
1196
1297
|
LedgerInsufficientFunds,
|
|
1197
1298
|
LedgerHoldNotOpen,
|
|
1198
1299
|
LedgerInvalidAmount,
|
|
1300
|
+
LedgerEntryNotFound,
|
|
1301
|
+
LedgerEntryNotReversible,
|
|
1302
|
+
LedgerRefConflict,
|
|
1199
1303
|
RatingUnknownAlgorithm,
|
|
1200
1304
|
RatingUnsupportedPlayerCount,
|
|
1201
1305
|
RatingInvalidParams,
|
|
1202
1306
|
RatingGameNotFound,
|
|
1203
1307
|
RatingPoolNotFound,
|
|
1204
1308
|
RatingRecordForbidden,
|
|
1309
|
+
ConsentUnknownPurpose,
|
|
1310
|
+
ConsentStaleNotice,
|
|
1311
|
+
ConsentMethodBelowMinimum,
|
|
1312
|
+
ConsentWithdrawalBelowGrant,
|
|
1313
|
+
ConsentEvidenceMissing,
|
|
1314
|
+
ConsentExpiryPassed,
|
|
1315
|
+
ConsentDocumentNotFound,
|
|
1316
|
+
ConsentEvidenceStoreMissing,
|
|
1205
1317
|
MatchmakingRoomNotFound,
|
|
1206
1318
|
MatchmakingRoomFull,
|
|
1207
1319
|
MatchmakingInvalidCode,
|
|
@@ -120,6 +120,28 @@ export declare class WebhookUnverifiedError extends PithyError {
|
|
|
120
120
|
cause?: unknown;
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* One code for every way a presence socket's ticket fails — missing, forged, expired, spent, or minted for
|
|
125
|
+
* another room. The step goes in `detail`, which the codec strips: a caller holding somebody else's ticket
|
|
126
|
+
* learns only that it no longer works.
|
|
127
|
+
*/
|
|
128
|
+
export declare class PresenceTicketInvalidError extends PithyError {
|
|
129
|
+
readonly payload: Extract<ErrorPayload, {
|
|
130
|
+
code: "core/presence_ticket_invalid";
|
|
131
|
+
}>;
|
|
132
|
+
constructor(args?: ErrorArgs, options?: {
|
|
133
|
+
cause?: unknown;
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/** A presence room is at the participant cap its room kind declares. */
|
|
137
|
+
export declare class PresenceRoomFullError extends PithyError {
|
|
138
|
+
readonly payload: Extract<ErrorPayload, {
|
|
139
|
+
code: "core/presence_room_full";
|
|
140
|
+
}>;
|
|
141
|
+
constructor(args?: ErrorArgs, options?: {
|
|
142
|
+
cause?: unknown;
|
|
143
|
+
});
|
|
144
|
+
}
|
|
123
145
|
export declare class ForbiddenError extends PithyError {
|
|
124
146
|
readonly payload: Extract<ErrorPayload, {
|
|
125
147
|
code: "auth/forbidden";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pithyError.d.ts","sourceRoot":"","sources":["../../src/error/pithyError.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;;;;;GAQG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAE/B;;;;;OAKG;IACH,YACE,OAAO,EAAE,YAAY,GAAG;QACtB,OAAO,EAAE,cAAc,CAAC;QACxB,MAAM,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;QACpC,MAAM,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;KACrC,EACD,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAM9B;CACF;AAED,4FAA4F;AAC5F,UAAU,SAAS;IACjB,iHAAiH;IACjH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,+GAA+G;IAC/G,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;;OAIG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,SAAiB,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE;QAA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GAAG,MAAM,CAEhD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGjD"}
|
package/dist/error/pithyError.js
CHANGED
|
@@ -123,6 +123,36 @@ var WebhookUnverifiedError = class extends PithyError {
|
|
|
123
123
|
}, options);
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
|
+
/**
|
|
127
|
+
* One code for every way a presence socket's ticket fails — missing, forged, expired, spent, or minted for
|
|
128
|
+
* another room. The step goes in `detail`, which the codec strips: a caller holding somebody else's ticket
|
|
129
|
+
* learns only that it no longer works.
|
|
130
|
+
*/
|
|
131
|
+
var PresenceTicketInvalidError = class extends PithyError {
|
|
132
|
+
constructor(args = {}, options) {
|
|
133
|
+
super({
|
|
134
|
+
code: "core/presence_ticket_invalid",
|
|
135
|
+
status: 401,
|
|
136
|
+
message: args.message ?? "That presence ticket is not valid.",
|
|
137
|
+
action: args.action ?? "Mint a fresh ticket and open the socket within 60 seconds.",
|
|
138
|
+
detail: args.detail,
|
|
139
|
+
params: args.params
|
|
140
|
+
}, options);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
/** A presence room is at the participant cap its room kind declares. */
|
|
144
|
+
var PresenceRoomFullError = class extends PithyError {
|
|
145
|
+
constructor(args = {}, options) {
|
|
146
|
+
super({
|
|
147
|
+
code: "core/presence_room_full",
|
|
148
|
+
status: 409,
|
|
149
|
+
message: args.message ?? "That room is full.",
|
|
150
|
+
action: args.action,
|
|
151
|
+
detail: args.detail,
|
|
152
|
+
params: args.params
|
|
153
|
+
}, options);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
126
156
|
var ForbiddenError = class extends PithyError {
|
|
127
157
|
constructor(args = {}, options) {
|
|
128
158
|
super({
|
|
@@ -257,4 +287,4 @@ function sentenceOf(error) {
|
|
|
257
287
|
return action ? `${messageOf(error)} ${action}` : messageOf(error);
|
|
258
288
|
}
|
|
259
289
|
//#endregion
|
|
260
|
-
export { ConflictError, ForbiddenError, InputRequiredError, InternalError, NotFoundError, PersonRequiredError, PithyError, PreconditionFailedError, RateLimitError, UnauthorizedError, UpstreamError, UpstreamTimeoutError, ValidationError, WebhookUnverifiedError, fromZodError, messageOf, sentenceOf };
|
|
290
|
+
export { ConflictError, ForbiddenError, InputRequiredError, InternalError, NotFoundError, PersonRequiredError, PithyError, PreconditionFailedError, PresenceRoomFullError, PresenceTicketInvalidError, RateLimitError, UnauthorizedError, UpstreamError, UpstreamTimeoutError, ValidationError, WebhookUnverifiedError, fromZodError, messageOf, sentenceOf };
|
package/dist/http/routeSpec.d.ts
CHANGED
|
@@ -37,6 +37,24 @@ export interface RouteResponse {
|
|
|
37
37
|
}
|
|
38
38
|
/** The HTTP methods an `app.all` route is documented under. OpenAPI has no "any method". */
|
|
39
39
|
export type DocumentedMethod = "get" | "post" | "put" | "patch" | "delete" | "head" | "options";
|
|
40
|
+
/**
|
|
41
|
+
* What a tool does beyond reading, which every non-`GET` tool must say (`docs/AGENT-ACCESS.md` §4).
|
|
42
|
+
*
|
|
43
|
+
* **A route is a tool only when it says so, and a non-`GET` says so louder.** One that sends mail, charges a card or
|
|
44
|
+
* deletes something is a tool an agent can call in a loop, so the effect is not inferred from the method: it is
|
|
45
|
+
* declared, it sets the tool's MCP annotations, it is written into the tool's description, and it is counted on the
|
|
46
|
+
* consent screen beside its capability.
|
|
47
|
+
*/
|
|
48
|
+
export declare const TOOL_EFFECTS: readonly ["writes", "sends", "charges", "deletes"];
|
|
49
|
+
export type ToolEffect = (typeof TOOL_EFFECTS)[number];
|
|
50
|
+
/**
|
|
51
|
+
* A route's opt-in to the app's MCP endpoint. `true` is a read, and only a `GET` may say it; anything else declares
|
|
52
|
+
* its {@link ToolEffect}. `createBackend` refuses a composition where either half is wrong — `describeRoute` cannot
|
|
53
|
+
* see the method it is mounted under, so the composition is the first place the pair can be checked.
|
|
54
|
+
*/
|
|
55
|
+
export type RouteTool = true | {
|
|
56
|
+
readonly effect: ToolEffect;
|
|
57
|
+
};
|
|
40
58
|
/** What a route is for, how its caller is verified, and what it returns. */
|
|
41
59
|
export interface RouteSpec {
|
|
42
60
|
/** One sentence, in the brand voice. The operation's title in the contract. */
|
|
@@ -58,8 +76,35 @@ export interface RouteSpec {
|
|
|
58
76
|
readonly responses: Readonly<Record<number, z.ZodType | RouteResponse>>;
|
|
59
77
|
/** For an `app.all` route only: the methods it is documented under. */
|
|
60
78
|
readonly methods?: readonly DocumentedMethod[];
|
|
79
|
+
/**
|
|
80
|
+
* The power a caller's role must hold to reach this route at all. **Declaring it installs the gate**: the
|
|
81
|
+
* same middleware that carries this spec refuses a caller whose acting organization's role does not hold it, so
|
|
82
|
+
* what the MCP endpoint filters `tools/list` on and what the route enforces are one value and cannot drift.
|
|
83
|
+
*
|
|
84
|
+
* A route whose access depends on the record — its owner may, a manager may — declares the power that lets a
|
|
85
|
+
* member reach it at all, and keeps its in-handler check. Absent, the route is gated by its other guards alone,
|
|
86
|
+
* and a tool for it is offered to every signed-in user the endpoint admits.
|
|
87
|
+
*/
|
|
88
|
+
readonly power?: string;
|
|
89
|
+
/**
|
|
90
|
+
* The route's permanent name within its capability, e.g. `threads.reply`. Its MCP tool is
|
|
91
|
+
* `<capability>_<operation>`, through the one normalizer the control-plane server's tools use. Unique within a
|
|
92
|
+
* capability, and never renamed once published: an agent references a tool by name.
|
|
93
|
+
*/
|
|
94
|
+
readonly operation?: string;
|
|
95
|
+
/**
|
|
96
|
+
* The route's opt-in to the app's MCP endpoint. Absent, the route is not a tool. See {@link RouteTool}.
|
|
97
|
+
*/
|
|
98
|
+
readonly tool?: RouteTool;
|
|
61
99
|
}
|
|
62
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* Declare what a route is for, how its caller is verified, and what it returns. See {@link RouteSpec}.
|
|
102
|
+
*
|
|
103
|
+
* With a {@link RouteSpec.power} it is also the route's power gate, read off the acting-organization seam the way
|
|
104
|
+
* every capability outside tenancy asks it. It sits first on the route line, so it answers an anonymous caller
|
|
105
|
+
* itself rather than assuming a guard below it will: a 401, because signing in might help, where a role that does
|
|
106
|
+
* not hold the power is a 403.
|
|
107
|
+
*/
|
|
63
108
|
export declare function describeRoute(spec: RouteSpec): MiddlewareHandler;
|
|
64
109
|
/** The spec a {@link describeRoute} middleware carries, or `undefined` for any other handler. */
|
|
65
110
|
export declare function routeSpecOf(handler: unknown): RouteSpec | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routeSpec.d.ts","sourceRoot":"","sources":["../../src/http/routeSpec.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"routeSpec.d.ts","sourceRoot":"","sources":["../../src/http/routeSpec.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,8GAA8G;AAC9G,eAAO,MAAM,UAAU,eAAgC,CAAC;AAExD,yGAAyG;AACzG,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kGAAkG;IAClG,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;IAC5B,gGAAgG;IAChG,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,4FAA4F;AAC5F,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhG;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY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|
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { ForbiddenError, UnauthorizedError } from "../error/pithyError.js";
|
|
3
4
|
//#region src/http/routeSpec.ts
|
|
4
5
|
/**
|
|
5
6
|
* The third half of a route declaration. `validate` says what a caller may send and the guards say who
|
|
@@ -24,12 +25,45 @@
|
|
|
24
25
|
*/
|
|
25
26
|
/** The key a {@link describeRoute} middleware carries its spec under. Global, so two copies of core agree. */
|
|
26
27
|
const ROUTE_SPEC = Symbol.for("pithy.routeSpec");
|
|
27
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* What a tool does beyond reading, which every non-`GET` tool must say (`docs/AGENT-ACCESS.md` §4).
|
|
30
|
+
*
|
|
31
|
+
* **A route is a tool only when it says so, and a non-`GET` says so louder.** One that sends mail, charges a card or
|
|
32
|
+
* deletes something is a tool an agent can call in a loop, so the effect is not inferred from the method: it is
|
|
33
|
+
* declared, it sets the tool's MCP annotations, it is written into the tool's description, and it is counted on the
|
|
34
|
+
* consent screen beside its capability.
|
|
35
|
+
*/
|
|
36
|
+
const TOOL_EFFECTS = [
|
|
37
|
+
"writes",
|
|
38
|
+
"sends",
|
|
39
|
+
"charges",
|
|
40
|
+
"deletes"
|
|
41
|
+
];
|
|
42
|
+
/**
|
|
43
|
+
* Declare what a route is for, how its caller is verified, and what it returns. See {@link RouteSpec}.
|
|
44
|
+
*
|
|
45
|
+
* With a {@link RouteSpec.power} it is also the route's power gate, read off the acting-organization seam the way
|
|
46
|
+
* every capability outside tenancy asks it. It sits first on the route line, so it answers an anonymous caller
|
|
47
|
+
* itself rather than assuming a guard below it will: a 401, because signing in might help, where a role that does
|
|
48
|
+
* not hold the power is a 403.
|
|
49
|
+
*/
|
|
28
50
|
function describeRoute(spec) {
|
|
29
|
-
const
|
|
51
|
+
const { power } = spec;
|
|
52
|
+
return Object.assign(power === void 0 ? async (_c, next) => {
|
|
53
|
+
await next();
|
|
54
|
+
} : async (c, next) => {
|
|
55
|
+
if (!c.var.auth) throw new UnauthorizedError({
|
|
56
|
+
message: "Authentication required.",
|
|
57
|
+
action: "Sign in and retry with a valid session or bearer token.",
|
|
58
|
+
detail: `describeRoute(power: ${power}) ran with no signed-in caller`
|
|
59
|
+
});
|
|
60
|
+
const acting = await c.var.actingOrganization();
|
|
61
|
+
if (acting === null || !acting.roleAllows(power)) throw new ForbiddenError({
|
|
62
|
+
message: `Your role does not allow \`${power}\`.`,
|
|
63
|
+
detail: acting === null ? `no organization is in force for user ${c.var.auth.userId}, so ${power} is not held` : `the role in organization ${acting.organizationId} does not hold ${power}`
|
|
64
|
+
});
|
|
30
65
|
await next();
|
|
31
|
-
};
|
|
32
|
-
return Object.assign(middleware, { [ROUTE_SPEC]: spec });
|
|
66
|
+
}, { [ROUTE_SPEC]: spec });
|
|
33
67
|
}
|
|
34
68
|
/** The spec a {@link describeRoute} middleware carries, or `undefined` for any other handler. */
|
|
35
69
|
function routeSpecOf(handler) {
|
|
@@ -37,4 +71,4 @@ function routeSpecOf(handler) {
|
|
|
37
71
|
return handler[ROUTE_SPEC];
|
|
38
72
|
}
|
|
39
73
|
//#endregion
|
|
40
|
-
export { ROUTE_SPEC, describeRoute, routeSpecOf };
|
|
74
|
+
export { ROUTE_SPEC, TOOL_EFFECTS, describeRoute, routeSpecOf };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/http/verification.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,+
|
|
1
|
+
{"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/http/verification.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,+JAciE,CAAC;AACnG,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { z } from "zod";
|
|
|
9
9
|
* strategy, so it is deliberately not listed here.)
|
|
10
10
|
*/
|
|
11
11
|
const VerificationStrategy = z.union([
|
|
12
|
-
z.literal("bearer").describe("
|
|
12
|
+
z.literal("bearer").describe("A session token via Authorization: Bearer, rotated before it expires; validated by @pithy-sh/auth."),
|
|
13
13
|
z.literal("session").describe("Cookie-based web session, CSRF-protected; validated by @pithy-sh/auth."),
|
|
14
14
|
z.literal("signed-webhook").describe("Inbound webhook, authenticated by the sender's own proof over the exact received bytes — one name over several mechanisms (an HMAC, a signed JWS chain, an OIDC token), because the sender chooses it. `requireSignedWebhook` (./signedWebhook) implements the timestamped-HMAC form; a rail whose sender proves it differently implements its own."),
|
|
15
15
|
z.literal("control-plane").describe("M2M admin via a customer-issued scoped credential; default-denied."),
|
|
@@ -83,7 +83,8 @@ export interface TranslatorInput {
|
|
|
83
83
|
readonly formattingLocale?: string;
|
|
84
84
|
/**
|
|
85
85
|
* The catalogs to walk, most-specific first. `@pithy-sh/i18n` passes adopter-locale, adopter-default,
|
|
86
|
-
* kit-locale,
|
|
86
|
+
* kit-locale, composed-locale, composed-default, composed English; a copied screen passes its own baked
|
|
87
|
+
* English and nothing else.
|
|
87
88
|
*/
|
|
88
89
|
readonly layers: readonly (MessageCatalog | undefined)[];
|
|
89
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translator.d.ts","sourceRoot":"","sources":["../../src/i18n/translator.ts"],"names":[],"mappings":"AAGA,OAAO,EAA8B,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAChG,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAE/D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;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AAM,CAAC;IAC/E,qGAAqG;IACrG,UAAU,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC;IAChF,gFAAgF;IAChF,kBAAkB,CAChB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,CAAC,sBAAsB,EACjC,OAAO,CAAC,EAAE,IAAI,CAAC,yBAAyB,GACvC,MAAM,CAAC;CACX;AAED,+GAA+G;AAC/G,MAAM,WAAW,eAAe;IAC9B,8CAA8C;IAC9C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,sFAAsF;IACtF,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,EAAE,CAAC;CAC1D;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,UAAU,CAgDnE;AAED,sGAAsG;AACtG,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,GAAE,MAAuB,GAAG,UAAU,CAEpG"}
|
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export { type AdminRouteDrift, missingAdminRoutes } from "./controlPlane/discove
|
|
|
28
28
|
export { type CapabilityHealth, type CapabilityHealthInput, type CapabilityHealthSource, capabilityHealthSources, defineCapabilityHealth, readCapabilityHealth, } from "./controlPlane/discovery/health";
|
|
29
29
|
export { CapabilityHealthReport, type CapabilityHealthWire, HealthCountNominal, HealthNominal, type HealthStanding, HealthSummary, HealthSummaryKey, HealthSummaryValue, HealthValueCost, HealthValueKind, healthAttention, healthReport, healthWire, type NamedHealthValue, namedHealthValues, standingOf, } from "./controlPlane/discovery/healthSummary";
|
|
30
30
|
export { requireControlPlane } from "./controlPlane/http/guard";
|
|
31
|
-
export { ANY_VERIFIED_CALLER, type ControlPlaneRequirement, ControlPlaneScope, KEYS_ROTATE_SCOPE, MANIFEST_READ_SCOPE, MIGRATIONS_READ_SCOPE, PRIVACY_READ_SCOPE, SEAM_SCOPES, } from "./controlPlane/scope/scope";
|
|
31
|
+
export { ANY_VERIFIED_CALLER, type ControlPlaneRequirement, ControlPlaneScope, ERASURE_READ_SCOPE, EVIDENCE_READ_SCOPE, KEYS_ROTATE_SCOPE, MANIFEST_READ_SCOPE, MIGRATIONS_READ_SCOPE, PRIVACY_READ_SCOPE, SEAM_SCOPES, } from "./controlPlane/scope/scope";
|
|
32
32
|
export { exportPublicJwk, type MintControlPlaneToken, mintControlPlaneToken } from "./controlPlane/token/mint";
|
|
33
33
|
export { CONTROL_PLANE_HEADER, CONTROL_PLANE_VERSION_CREATED_HEADER, CONTROL_PLANE_VERSION_HEADER, type WorkerBuild, workerBuildChanged, } from "./controlPlane/wire";
|
|
34
34
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACtG,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,YAAY,EACZ,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACzG,OAAO,EACL,+BAA+B,EAC/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AK,cAAc,EACnB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,YAAY,EACZ,UAAU,EACV,KAAK,gBAAgB,EACrB,iBAAiB,EACjB,UAAU,GACX,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,mBAAmB,EACnB,KAAK,uBAAuB,EAC5B,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,GACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,KAAK,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAI/G,OAAO,EACL,oBAAoB,EACpB,oCAAoC,EACpC,4BAA4B,EAC5B,KAAK,WAAW,EAChB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
import { ANY_VERIFIED_CALLER, ControlPlaneScope, KEYS_ROTATE_SCOPE, MANIFEST_READ_SCOPE, MIGRATIONS_READ_SCOPE, PRIVACY_READ_SCOPE, SEAM_SCOPES } from "./controlPlane/scope/scope.js";
|
|
4
|
-
import { ControlPlaneConfig } from "./controlPlane/config/config.js";
|
|
3
|
+
import { ANY_VERIFIED_CALLER, ControlPlaneScope, ERASURE_READ_SCOPE, EVIDENCE_READ_SCOPE, KEYS_ROTATE_SCOPE, MANIFEST_READ_SCOPE, MIGRATIONS_READ_SCOPE, PRIVACY_READ_SCOPE, SEAM_SCOPES } from "./controlPlane/scope/scope.js";
|
|
5
4
|
import { ControlPlaneConnection, Ed25519PublicJwk, RegisteredKey } from "./controlPlane/data/connection.js";
|
|
6
5
|
import { CONTROL_PLANE_CONNECTIONS_TABLE, controlPlaneDatabase } from "./controlPlane/data/tables.js";
|
|
6
|
+
import { ControlPlaneConfig } from "./controlPlane/config/config.js";
|
|
7
7
|
import { CapabilityHealthReport, HealthCountNominal, HealthNominal, HealthSummary, HealthSummaryKey, HealthSummaryValue, HealthValueCost, HealthValueKind, healthAttention, healthReport, healthWire, namedHealthValues, standingOf } from "./controlPlane/discovery/healthSummary.js";
|
|
8
8
|
import { capabilityHealthSources, defineCapabilityHealth, readCapabilityHealth } from "./controlPlane/discovery/health.js";
|
|
9
9
|
import { ControlPlaneAuditActions } from "./controlPlane/audit/actions.js";
|
|
@@ -16,4 +16,4 @@ import { CONTROL_PLANE_KV_BINDING } from "./controlPlane/replay/kvGuard.js";
|
|
|
16
16
|
import { CONTROLPLANE_MIGRATION_ORDER, controlplane, isControlPlaneCapability } from "./controlPlane/capability.js";
|
|
17
17
|
import { missingAdminRoutes } from "./controlPlane/discovery/drift.js";
|
|
18
18
|
import { exportPublicJwk, mintControlPlaneToken } from "./controlPlane/token/mint.js";
|
|
19
|
-
export { ANY_VERIFIED_CALLER, AdminRoute, CONTROLPLANE_MIGRATION_ORDER, CONTROL_PLANE_CONNECTIONS_TABLE, CONTROL_PLANE_HEADER, CONTROL_PLANE_KV_BINDING, CONTROL_PLANE_VERSION_CREATED_HEADER, CONTROL_PLANE_VERSION_HEADER, CapabilityDeclaration, CapabilityDescriptor, CapabilityHealthReport, ControlPlaneAuditActions, ControlPlaneConfig, ControlPlaneConnection, ControlPlaneContext, ControlPlaneManifest, ControlPlaneScope, Ed25519PublicJwk, HealthCountNominal, HealthNominal, HealthSummary, HealthSummaryKey, HealthSummaryValue, HealthValueCost, HealthValueKind, KEYS_ROTATE_SCOPE, MANIFEST_READ_SCOPE, MIGRATIONS_READ_SCOPE, ManifestConfigKey, ManifestConfigValue, ManifestConfigValues, PRIVACY_READ_SCOPE, RegisteredKey, SEAM_SCOPES, capabilityHealthSources, controlPlaneDatabase, controlplane, defineCapabilityHealth, defineManifestConfig, exportPublicJwk, healthAttention, healthReport, healthWire, isControlPlaneCapability, mintControlPlaneToken, missingAdminRoutes, namedConfigValues, namedHealthValues, readCapabilityHealth, requireControlPlane, standingOf, workerBuildChanged };
|
|
19
|
+
export { ANY_VERIFIED_CALLER, AdminRoute, CONTROLPLANE_MIGRATION_ORDER, CONTROL_PLANE_CONNECTIONS_TABLE, CONTROL_PLANE_HEADER, CONTROL_PLANE_KV_BINDING, CONTROL_PLANE_VERSION_CREATED_HEADER, CONTROL_PLANE_VERSION_HEADER, CapabilityDeclaration, CapabilityDescriptor, CapabilityHealthReport, ControlPlaneAuditActions, ControlPlaneConfig, ControlPlaneConnection, ControlPlaneContext, ControlPlaneManifest, ControlPlaneScope, ERASURE_READ_SCOPE, EVIDENCE_READ_SCOPE, Ed25519PublicJwk, HealthCountNominal, HealthNominal, HealthSummary, HealthSummaryKey, HealthSummaryValue, HealthValueCost, HealthValueKind, KEYS_ROTATE_SCOPE, MANIFEST_READ_SCOPE, MIGRATIONS_READ_SCOPE, ManifestConfigKey, ManifestConfigValue, ManifestConfigValues, PRIVACY_READ_SCOPE, RegisteredKey, SEAM_SCOPES, capabilityHealthSources, controlPlaneDatabase, controlplane, defineCapabilityHealth, defineManifestConfig, exportPublicJwk, healthAttention, healthReport, healthWire, isControlPlaneCapability, mintControlPlaneToken, missingAdminRoutes, namedConfigValues, namedHealthValues, readCapabilityHealth, requireControlPlane, standingOf, workerBuildChanged };
|