@pithy-sh/core 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/dist/audit/composed.d.ts +18 -0
  2. package/dist/audit/composed.d.ts.map +1 -0
  3. package/dist/audit/composed.js +28 -0
  4. package/dist/audit/recorder.d.ts +10 -2
  5. package/dist/audit/recorder.d.ts.map +1 -1
  6. package/dist/capability/capability.d.ts +23 -0
  7. package/dist/capability/capability.d.ts.map +1 -1
  8. package/dist/capability/capability.js +2 -0
  9. package/dist/capability/purge.d.ts +122 -0
  10. package/dist/capability/purge.d.ts.map +1 -0
  11. package/dist/capability/purge.js +131 -0
  12. package/dist/cli/commandCatalog.generated.d.ts +54 -2
  13. package/dist/cli/commandCatalog.generated.d.ts.map +1 -1
  14. package/dist/cli/commandCatalog.generated.js +61 -0
  15. package/dist/cli/commandFacts.d.ts +1 -0
  16. package/dist/cli/commandFacts.d.ts.map +1 -1
  17. package/dist/cli/commandFacts.js +1 -0
  18. package/dist/controlPlane/capability.d.ts.map +1 -1
  19. package/dist/controlPlane/capability.js +7 -0
  20. package/dist/controlPlane/data/connection.d.ts +2 -12
  21. package/dist/controlPlane/data/connection.d.ts.map +1 -1
  22. package/dist/controlPlane/data/connection.js +1 -1
  23. package/dist/controlPlane/discovery/adminRoute.d.ts +29 -0
  24. package/dist/controlPlane/discovery/adminRoute.d.ts.map +1 -1
  25. package/dist/controlPlane/discovery/adminRoute.js +3 -0
  26. package/dist/controlPlane/error/errors.d.ts +4 -3
  27. package/dist/controlPlane/error/errors.d.ts.map +1 -1
  28. package/dist/controlPlane/http/guard.d.ts.map +1 -1
  29. package/dist/controlPlane/http/guard.js +40 -1
  30. package/dist/controlPlane/http/handlers.d.ts +79 -0
  31. package/dist/controlPlane/http/handlers.d.ts.map +1 -1
  32. package/dist/controlPlane/http/handlers.js +37 -3
  33. package/dist/controlPlane/http/responses.d.ts +98 -0
  34. package/dist/controlPlane/http/responses.d.ts.map +1 -1
  35. package/dist/controlPlane/http/responses.js +41 -1
  36. package/dist/controlPlane/http/routes.d.ts +1 -0
  37. package/dist/controlPlane/http/routes.d.ts.map +1 -1
  38. package/dist/controlPlane/http/routes.js +17 -3
  39. package/dist/controlPlane/scope/scope.d.ts +13 -3
  40. package/dist/controlPlane/scope/scope.d.ts.map +1 -1
  41. package/dist/controlPlane/scope/scope.js +14 -4
  42. package/dist/createBackend.d.ts.map +1 -1
  43. package/dist/createBackend.js +2 -0
  44. package/dist/createEntrypoint.d.ts +7 -1
  45. package/dist/createEntrypoint.d.ts.map +1 -1
  46. package/dist/createEntrypoint.js +15 -5
  47. package/dist/crypto/envelope.d.ts +86 -0
  48. package/dist/crypto/envelope.d.ts.map +1 -0
  49. package/dist/crypto/envelope.js +129 -0
  50. package/dist/crypto/fieldKeys.d.ts +41 -0
  51. package/dist/crypto/fieldKeys.d.ts.map +1 -0
  52. package/dist/crypto/fieldKeys.js +56 -0
  53. package/dist/data/codecs.d.ts +23 -10
  54. package/dist/data/codecs.d.ts.map +1 -1
  55. package/dist/data/codecs.js +50 -36
  56. package/dist/error/extend.d.ts +6 -5
  57. package/dist/error/extend.d.ts.map +1 -1
  58. package/dist/error/http.d.ts +72 -0
  59. package/dist/error/http.d.ts.map +1 -1
  60. package/dist/error/payload.d.ts +144 -0
  61. package/dist/error/payload.d.ts.map +1 -1
  62. package/dist/error/payload.js +48 -0
  63. package/dist/error/pithyError.d.ts +18 -7
  64. package/dist/error/pithyError.d.ts.map +1 -1
  65. package/dist/error/pithyError.js +6 -0
  66. package/dist/http/validation.d.ts +11 -2
  67. package/dist/http/validation.d.ts.map +1 -1
  68. package/dist/http/validation.js +20 -3
  69. package/dist/index.d.ts +1 -1
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +2 -2
  72. package/dist/logger/logger.d.ts +12 -5
  73. package/dist/logger/logger.d.ts.map +1 -1
  74. package/dist/logger/record.d.ts +42 -0
  75. package/dist/logger/record.d.ts.map +1 -1
  76. package/dist/privacy/blindIndex.d.ts +27 -0
  77. package/dist/privacy/blindIndex.d.ts.map +1 -0
  78. package/dist/privacy/blindIndex.js +57 -0
  79. package/dist/privacy/classes.d.ts +142 -0
  80. package/dist/privacy/classes.d.ts.map +1 -0
  81. package/dist/privacy/classes.js +209 -0
  82. package/dist/privacy/classify.d.ts +336 -0
  83. package/dist/privacy/classify.d.ts.map +1 -0
  84. package/dist/privacy/classify.js +1024 -0
  85. package/dist/privacy/encrypted.d.ts +210 -0
  86. package/dist/privacy/encrypted.d.ts.map +1 -0
  87. package/dist/privacy/encrypted.js +350 -0
  88. package/dist/privacy/encryptedColumns.d.ts +64 -0
  89. package/dist/privacy/encryptedColumns.d.ts.map +1 -0
  90. package/dist/privacy/encryptedColumns.js +134 -0
  91. package/dist/privacy/fieldRotation.d.ts +34 -0
  92. package/dist/privacy/fieldRotation.d.ts.map +1 -0
  93. package/dist/privacy/fieldRotation.js +186 -0
  94. package/dist/privacy/inventory.d.ts +12 -0
  95. package/dist/privacy/inventory.d.ts.map +1 -0
  96. package/dist/privacy/inventory.js +154 -0
  97. package/dist/privacy/posture.d.ts +114 -0
  98. package/dist/privacy/posture.d.ts.map +1 -0
  99. package/dist/privacy/posture.js +136 -0
  100. package/dist/privacy/redact.d.ts +7 -0
  101. package/dist/privacy/redact.d.ts.map +1 -0
  102. package/dist/privacy/redact.js +404 -0
  103. package/dist/privacy/report.d.ts +58 -0
  104. package/dist/privacy/report.d.ts.map +1 -0
  105. package/dist/privacy/report.js +15 -0
  106. package/dist/privacy/retirement.d.ts +68 -0
  107. package/dist/privacy/retirement.d.ts.map +1 -0
  108. package/dist/privacy/retirement.js +72 -0
  109. package/dist/privacy/sealed.d.ts +87 -0
  110. package/dist/privacy/sealed.d.ts.map +1 -0
  111. package/dist/privacy/sealed.js +221 -0
  112. package/dist/privacy/types.d.ts +559 -0
  113. package/dist/privacy/types.d.ts.map +1 -0
  114. package/dist/privacy/types.js +2 -0
  115. package/dist/version.generated.d.ts +1 -1
  116. package/dist/version.generated.js +1 -1
  117. package/package.json +1 -1
  118. package/src/audit/composed.ts +30 -0
  119. package/src/audit/recorder.ts +10 -2
  120. package/src/capability/capability.ts +26 -0
  121. package/src/capability/purge.ts +187 -0
  122. package/src/cli/commandCatalog.generated.ts +65 -0
  123. package/src/cli/commandFacts.ts +1 -0
  124. package/src/controlPlane/capability.ts +11 -0
  125. package/src/controlPlane/discovery/adminRoute.ts +11 -0
  126. package/src/controlPlane/error/errors.ts +4 -3
  127. package/src/controlPlane/http/guard.ts +60 -1
  128. package/src/controlPlane/http/handlers.ts +57 -4
  129. package/src/controlPlane/http/responses.ts +100 -0
  130. package/src/controlPlane/http/routes.ts +31 -1
  131. package/src/controlPlane/scope/scope.ts +14 -3
  132. package/src/controlPlane/token/base64url.ts +1 -1
  133. package/src/createBackend.ts +4 -0
  134. package/src/createEntrypoint.ts +17 -2
  135. package/src/crypto/envelope.ts +196 -0
  136. package/src/crypto/fieldKeys.ts +76 -0
  137. package/src/data/codecs.ts +69 -37
  138. package/src/error/extend.ts +6 -5
  139. package/src/error/payload.ts +110 -0
  140. package/src/error/pithyError.ts +21 -7
  141. package/src/http/validation.ts +35 -3
  142. package/src/index.ts +1 -0
  143. package/src/logger/logger.ts +12 -5
  144. package/src/privacy/blindIndex.ts +81 -0
  145. package/src/privacy/classes.ts +277 -0
  146. package/src/privacy/classify.ts +1447 -0
  147. package/src/privacy/encrypted.ts +513 -0
  148. package/src/privacy/encryptedColumns.ts +185 -0
  149. package/src/privacy/fieldRotation.ts +234 -0
  150. package/src/privacy/inventory.ts +147 -0
  151. package/src/privacy/posture.ts +205 -0
  152. package/src/privacy/redact.ts +423 -0
  153. package/src/privacy/report.ts +64 -0
  154. package/src/privacy/retirement.ts +102 -0
  155. package/src/privacy/sealed.ts +323 -0
  156. package/src/privacy/types.ts +804 -0
  157. package/src/version.generated.ts +1 -1
@@ -0,0 +1,18 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
3
+ import type { Capability } from "../capability/capability";
4
+ import { type AuditEmit } from "./recorder";
5
+ /**
6
+ * The audit recorder for code with no request — a Workflow step (#622).
7
+ *
8
+ * A route records through `c.var.emit`. A Workflow has no `c`: the runtime constructs it with `env` and nothing
9
+ * else. So it finds the composed capability that declares {@link Capability.auditRecorder} — `@pithy-sh/audit`
10
+ * — and records through that, built over this run's env. With none composed it is {@link noopEmit}, exactly as
11
+ * `c.var.emit` is in a Worker that composes no audit, so a step can always record without asking first.
12
+ *
13
+ * **Non-fatal, whatever the recorder does.** The contract says a recorder never throws; this holds a recorder
14
+ * to it rather than trusting it, because what a step records has already happened and a throw here would turn
15
+ * it into a retried step.
16
+ */
17
+ export declare function composedAuditEmit(capabilities: readonly Capability[], env: Record<string, unknown>): AuditEmit;
18
+ //# sourceMappingURL=composed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composed.d.ts","sourceRoot":"","sources":["../../src/audit/composed.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,YAAY,CAAC;AAEtD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,SAAS,UAAU,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAW9G"}
@@ -0,0 +1,28 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
3
+ import { noopEmit } from "./recorder.js";
4
+ //#region src/audit/composed.ts
5
+ /**
6
+ * The audit recorder for code with no request — a Workflow step (#622).
7
+ *
8
+ * A route records through `c.var.emit`. A Workflow has no `c`: the runtime constructs it with `env` and nothing
9
+ * else. So it finds the composed capability that declares {@link Capability.auditRecorder} — `@pithy-sh/audit`
10
+ * — and records through that, built over this run's env. With none composed it is {@link noopEmit}, exactly as
11
+ * `c.var.emit` is in a Worker that composes no audit, so a step can always record without asking first.
12
+ *
13
+ * **Non-fatal, whatever the recorder does.** The contract says a recorder never throws; this holds a recorder
14
+ * to it rather than trusting it, because what a step records has already happened and a throw here would turn
15
+ * it into a retried step.
16
+ */
17
+ function composedAuditEmit(capabilities, env) {
18
+ const provider = capabilities.find((capability) => capability.auditRecorder !== void 0);
19
+ if (!provider?.auditRecorder) return noopEmit;
20
+ const record = provider.auditRecorder(env);
21
+ return async (event) => {
22
+ try {
23
+ await record(event);
24
+ } catch {}
25
+ };
26
+ }
27
+ //#endregion
28
+ export { composedAuditEmit };
@@ -1,6 +1,7 @@
1
1
  // SPDX-FileCopyrightText: 2026 Pithy
2
2
  // SPDX-License-Identifier: MIT
3
- import type { AuditEventInput } from "./auditEvent";
3
+ import type { Loggable } from "../privacy/types";
4
+ import type { AuditEventInput, AuditMetadata } from "./auditEvent";
4
5
  /**
5
6
  * The recorder seam. `emit()` on the request context (`c.var.emit`) takes one {@link AuditEventInput}
6
7
  * and durably records it. `@pithy-sh/audit`'s middleware replaces the default with a real D1-backed
@@ -10,8 +11,15 @@ import type { AuditEventInput } from "./auditEvent";
10
11
  * `emit()` is **non-fatal by contract**: it never throws and never rejects, so an audited action is
11
12
  * never broken by an audit write. The real recorder swallows and logs its own failures; the no-op
12
13
  * simply resolves.
14
+ *
15
+ * **`metadata` refuses a value marked with a privacy class** (#132). The trail is the longest-lived internal
16
+ * surface there is — a row in the adopter's D1 with no retention window — so a `pii()`/`phi()`/`secret()`/
17
+ * `pci()` value in it, or inside an object in it, is a compile error, by the same `Loggable` rule the logger
18
+ * applies. `AuditMetadata` the schema stays permissive: a stored row still parses.
13
19
  */
14
- export type AuditEmit = (event: AuditEventInput) => Promise<void>;
20
+ export type AuditEmit = <M extends AuditMetadata = AuditMetadata>(event: Omit<AuditEventInput, "metadata"> & {
21
+ metadata?: (M & Loggable<M>) | null | undefined;
22
+ }) => Promise<void>;
15
23
  /**
16
24
  * The default recorder when no audit capability is composed: accept the event and drop it. Resolves
17
25
  * without throwing, so calling `emit()` is always safe whether or not auditing is installed.
@@ -1 +1 @@
1
- {"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../src/audit/recorder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,SAA0B,CAAC"}
1
+ {"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../src/audit/recorder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEnE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,EAC9D,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,KAC3F,OAAO,CAAC,IAAI,CAAC,CAAC;AAEnB;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,SAA0B,CAAC"}
@@ -24,6 +24,7 @@ import type { SeedSet } from "../seed/seed";
24
24
  import type { WorkflowSpecMap } from "../workflow/spec";
25
25
  import { BindingSpec, type BindingSpecInput } from "./bindings";
26
26
  import type { ClientProjection, ClientProjectionContext } from "./client";
27
+ import { type PurgeContribution } from "./purge";
27
28
  import type { CapabilitySettings } from "./settings";
28
29
  /** Hono `Variables` every capability's routes are typed against. `createBackend` seeds these per request. */
29
30
  export interface PithyVars {
@@ -611,6 +612,17 @@ export interface Capability<Databases extends DatabaseSpecMap = DatabaseSpecMap,
611
612
  * capability that declares one (e.g. `@pithy-sh/email`'s bounce/complaint handler).
612
613
  */
613
614
  email?: CapabilityEmailHandler;
615
+ /**
616
+ * The audit recorder this capability provides **for code that has no request** — a Workflow step, which the
617
+ * runtime constructs with `env` and nothing else (#622). `@pithy-sh/audit` declares it; nothing else does.
618
+ *
619
+ * A route records through `c.var.emit`, which the same capability's middleware fills, and keeps doing that.
620
+ * This is the other door, for the purge that erases a deleted account: it runs in a Workflow and still owes
621
+ * the trail its event. `../audit/composed.ts` finds it among the composed capabilities, so a capability that
622
+ * audits from a step imports no audit package — principle 4, the same reason `c.var.emit` is a seam. Built
623
+ * from the env per call, like the request recorder is built per request. Non-fatal by the same contract.
624
+ */
625
+ auditRecorder?: (env: Record<string, unknown>) => AuditEmit;
614
626
  /**
615
627
  * Named D1 databases this capability contributes tables to (database name → {@link DatabaseSpec}).
616
628
  * `createBackend` merges every capability's slices per database (via `composeDatabases`) and serves
@@ -637,6 +649,17 @@ export interface Capability<Databases extends DatabaseSpecMap = DatabaseSpecMap,
637
649
  * time, and read by `pithy doctor`.
638
650
  */
639
651
  extensions?: readonly CapabilityExtension[];
652
+ /**
653
+ * How this capability erases one subject's rows when that subject is purged — see `./purge.ts`. Omit it
654
+ * when this capability holds nothing keyed to a person, which is the ordinary case.
655
+ *
656
+ * **The purge Workflow runs each composed contribution as its own step**, named for this capability, so a
657
+ * failure retries this capability alone and the steps that finished are not re-run. That is why there is
658
+ * at most one per subject here, and why `erase` must succeed when there is nothing left to erase.
659
+ * `defineCapability` refuses a contribution for a subject the kit does not know. An adopter declares one
660
+ * on their own `app` capability for their own tables, with the same types.
661
+ */
662
+ purge?: readonly PurgeContribution[];
640
663
  /**
641
664
  * The role powers this capability's own routes gate on, through the acting-organization seam —
642
665
  * `media:manage`, `storage:manage`. Omit it when a capability asks no power, which is the normal case.
@@ -1 +1 @@
1
- {"version":3,"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E3G;;;;;GAKG;AACH,KAAK,gBAAgB,CAAC,CAAC,IACrB,CAAC,SAAS,UAAU,CAAC,eAAe,EAAE,kBAAkB,EAAE,MAAM,IAAI,EAAE,MAAM,CAAC,CAAC,GAC1E;KAAG,GAAG,IAAI,MAAM,CAAC,GAAG,MAAM,IAAI,GAAG,IAAI,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;CAAE,GAC5E,KAAK,CAAC;AAEZ;;;;GAIG;AACH,KAAK,YAAY,CAAC,MAAM,EAAE,KAAK,IAC7B,mBAAmB,CAAC,MAAM,CAAC,SAAS,MAAM,MAAM,GAAG,CAAC,MAAM,SAAS,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC;AAEpH,sFAAsF;AACtF,MAAM,MAAM,eAAe,CAAC,IAAI,SAAS,SAAS,UAAU,EAAE,IAAI,YAAY,CAC5E,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EACzB,eAAe,CAChB,CAAC;AAEF,6FAA6F;AAC7F,MAAM,MAAM,kBAAkB,CAAC,IAAI,SAAS,SAAS,UAAU,EAAE,IAAI,YAAY,CAC/E,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAC1B,kBAAkB,CACnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,CAAC,IAAI,SAAS,SAAS,UAAU,EAAE,IAAI,YAAY,CACjF,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAC9B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACxB,CAAC"}
@@ -2,6 +2,7 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  import { BindingSpec } from "./bindings.js";
4
4
  import { declareRetained } from "../migrations/retainedDeclaration.js";
5
+ import { assertPurgeContributions } from "./purge.js";
5
6
  //#region src/capability/capability.ts
6
7
  /**
7
8
  * Author a capability. Parses each binding through `BindingSpec` — normalizing `optional`
@@ -11,6 +12,7 @@ import { declareRetained } from "../migrations/retainedDeclaration.js";
11
12
  */
12
13
  function defineCapability(input) {
13
14
  for (const spec of Object.values(input.databases ?? {})) if (spec.migrations && spec.retained) declareRetained(spec.migrations, spec.retained);
15
+ if (input.purge) assertPurgeContributions(input.name, input.purge);
14
16
  return {
15
17
  ...input,
16
18
  requiredBindings: input.requiredBindings.map((binding) => BindingSpec.parse(binding))
@@ -0,0 +1,122 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
3
+ import { z } from "zod";
4
+ /**
5
+ * How a capability says what erasing one subject means for its own rows — the purge contribution.
6
+ *
7
+ * ## Why a contribution, and not a cascade
8
+ *
9
+ * A hard delete has to reach rows that `@pithy-sh/media`, `@pithy-sh/support`, `@pithy-sh/testers` and the
10
+ * adopter's own tables hold, and no foreign key reaches across capabilities: each owns its tables, and none
11
+ * references another's. So the only party that knows how one person's rows are erased — deleted outright,
12
+ * or anonymized because a ledger must still add up — is the capability that owns them. It says so here,
13
+ * the way it states its migrations and its seeds, and the purge runs what was composed.
14
+ *
15
+ * ## One capability, one step
16
+ *
17
+ * The purge Workflow (#622) runs every composed contribution as **its own step**, named for the
18
+ * capability. A step that fails retries alone, and the ones that finished are not re-run — which is why a
19
+ * capability may declare at most one contribution per subject, and why every `erase` must be idempotent:
20
+ * a step is retried after a failure that may have come after its rows were already gone, and erasing
21
+ * nothing must then succeed.
22
+ *
23
+ * ## The same contribution answers an export (#622)
24
+ *
25
+ * An access request arrives before an erasure, not after. So a contribution may also say what this capability
26
+ * holds about the subject, on the read side: `export` answers one JSON object, and the control plane's export
27
+ * route assembles one document from every composed contribution, in the same order the purge runs them. A
28
+ * contribution with no `export` is listed as holding rows it did not say how to export, which is the honest
29
+ * answer and the one an operator can act on.
30
+ *
31
+ * ## An adopter declares one too
32
+ *
33
+ * On their own `app` capability, for their own tables, with the same types. The contract is exported for
34
+ * exactly that, and nothing distinguishes a kit contribution from theirs.
35
+ */
36
+ /**
37
+ * The kinds of subject a purge erases. Closed, so a typo is refused where it is written rather than becoming
38
+ * a contribution no purge ever asks for. `organization` joined with organization state (#623): a capability
39
+ * holding rows scoped to a tenant declares one for it, and the organization purge runs it.
40
+ */
41
+ export declare const PurgeSubject: z.ZodEnum<{
42
+ organization: "organization";
43
+ user: "user";
44
+ }>;
45
+ export type PurgeSubject = z.output<typeof PurgeSubject>;
46
+ /** What one step is handed: who is being erased, and this run's bindings. */
47
+ export interface PurgeContext {
48
+ /** The subject being erased — its kind, and its id in that kind's own table. */
49
+ readonly subject: {
50
+ readonly type: PurgeSubject;
51
+ readonly id: string;
52
+ };
53
+ /** The Worker's bindings for this run, from which the contribution opens its own database. */
54
+ readonly env: Record<string, unknown>;
55
+ }
56
+ /** One capability's answer to "how are this subject's rows erased". */
57
+ export interface PurgeContribution {
58
+ /** The kind of subject this erases. */
59
+ readonly subject: PurgeSubject;
60
+ /**
61
+ * One sentence on what is erased or anonymized — `Deletes the user's uploads and their stored bytes.`
62
+ * Recorded with the step that ran it, so the trail says what a purge did and not only that it ran.
63
+ */
64
+ readonly summary: string;
65
+ /**
66
+ * Erase or anonymize this subject's rows. **Idempotent**: run again after it succeeded, or after a failure
67
+ * that came once the rows were gone, it must succeed having found nothing to do. Throwing fails this step
68
+ * and only this step.
69
+ */
70
+ readonly erase: (context: PurgeContext) => Promise<void>;
71
+ /**
72
+ * What this capability holds about the subject, as one JSON object — the read side of `erase` (#622). It
73
+ * answers an access request, so it carries the subject's own data and never a credential: no session token,
74
+ * no provider token, no push token. Optional: a contribution without one is listed in the export as rows it
75
+ * erases and did not say how to export. A throw costs this capability's entry, never the document.
76
+ */
77
+ readonly export?: (context: PurgeContext) => Promise<Record<string, unknown>>;
78
+ }
79
+ /** One step of a purge: which capability it runs, and the contribution that capability declared. */
80
+ export interface PurgeStep {
81
+ /** The step's name — the capability's, so a retried step names who failed. */
82
+ readonly step: string;
83
+ /** The contribution this step runs. */
84
+ readonly contribution: PurgeContribution;
85
+ }
86
+ /**
87
+ * Refuse a capability's purge contributions that no purge could run as declared: an unknown subject, two for
88
+ * one subject, or one with nothing to record. Called by `defineCapability`, so the refusal names the capability
89
+ * where it is written rather than surfacing in a Workflow on the day somebody is deleted.
90
+ */
91
+ export declare function assertPurgeContributions(capability: string, contributions: readonly PurgeContribution[]): void;
92
+ /** The steps a purge of `subject` runs, in composition order — libraries first, the adopter's `app` last. */
93
+ export declare function purgeSteps(capabilities: readonly {
94
+ readonly name: string;
95
+ readonly purge?: readonly PurgeContribution[];
96
+ }[], subject: PurgeSubject): PurgeStep[];
97
+ /** What one step's export answered: its data, that it declared none, or that it could not be read. */
98
+ export type PurgeExportEntry = {
99
+ readonly capability: string;
100
+ readonly summary: string;
101
+ readonly state: "exported";
102
+ readonly data: Record<string, unknown>;
103
+ } | {
104
+ readonly capability: string;
105
+ readonly summary: string;
106
+ readonly state: "not_exported";
107
+ } | {
108
+ readonly capability: string;
109
+ readonly summary: string;
110
+ readonly state: "unavailable";
111
+ };
112
+ /**
113
+ * Read every step's export for one subject — the export document's body, in step order (#622).
114
+ *
115
+ * **Each read is guarded on its own and they run concurrently**, the shape the user pane's sub-reads have
116
+ * (#380): one capability whose table will not read costs its own entry as `unavailable`, and the rest of the
117
+ * document still answers the request. What the read threw is not carried — it names a query and a table, and
118
+ * the document crosses a trust boundary. An answer that is not one object is `unavailable` too, because the
119
+ * document promises an object per capability and a client validates it.
120
+ */
121
+ export declare function purgeExports(steps: readonly PurgeStep[], context: PurgeContext): Promise<PurgeExportEntry[]>;
122
+ //# sourceMappingURL=purge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"purge.d.ts","sourceRoot":"","sources":["../../src/capability/purge.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA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,KAAK,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAA;CAAE,EAAE,EACjG,OAAO,EAAE,YAAY,GACpB,SAAS,EAAE,CAOb;AAED,sGAAsG;AACtG,MAAM,MAAM,gBAAgB,GACxB;IACE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC,GACD;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;CAAE,GACzF;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;CAAE,CAAC;AAO7F;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAclH"}
@@ -0,0 +1,131 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
3
+ import { ValidationError } from "../error/pithyError.js";
4
+ import { z } from "zod";
5
+ //#region src/capability/purge.ts
6
+ /**
7
+ * How a capability says what erasing one subject means for its own rows — the purge contribution.
8
+ *
9
+ * ## Why a contribution, and not a cascade
10
+ *
11
+ * A hard delete has to reach rows that `@pithy-sh/media`, `@pithy-sh/support`, `@pithy-sh/testers` and the
12
+ * adopter's own tables hold, and no foreign key reaches across capabilities: each owns its tables, and none
13
+ * references another's. So the only party that knows how one person's rows are erased — deleted outright,
14
+ * or anonymized because a ledger must still add up — is the capability that owns them. It says so here,
15
+ * the way it states its migrations and its seeds, and the purge runs what was composed.
16
+ *
17
+ * ## One capability, one step
18
+ *
19
+ * The purge Workflow (#622) runs every composed contribution as **its own step**, named for the
20
+ * capability. A step that fails retries alone, and the ones that finished are not re-run — which is why a
21
+ * capability may declare at most one contribution per subject, and why every `erase` must be idempotent:
22
+ * a step is retried after a failure that may have come after its rows were already gone, and erasing
23
+ * nothing must then succeed.
24
+ *
25
+ * ## The same contribution answers an export (#622)
26
+ *
27
+ * An access request arrives before an erasure, not after. So a contribution may also say what this capability
28
+ * holds about the subject, on the read side: `export` answers one JSON object, and the control plane's export
29
+ * route assembles one document from every composed contribution, in the same order the purge runs them. A
30
+ * contribution with no `export` is listed as holding rows it did not say how to export, which is the honest
31
+ * answer and the one an operator can act on.
32
+ *
33
+ * ## An adopter declares one too
34
+ *
35
+ * On their own `app` capability, for their own tables, with the same types. The contract is exported for
36
+ * exactly that, and nothing distinguishes a kit contribution from theirs.
37
+ */
38
+ /**
39
+ * The kinds of subject a purge erases. Closed, so a typo is refused where it is written rather than becoming
40
+ * a contribution no purge ever asks for. `organization` joined with organization state (#623): a capability
41
+ * holding rows scoped to a tenant declares one for it, and the organization purge runs it.
42
+ */
43
+ const PurgeSubject = z.enum(["user", "organization"]).describe("The kind of subject a purge erases. `user` is one person's account in `@pithy-sh/auth`, identified by its user id. `organization` is one tenant in `@pithy-sh/organization`, identified by its organization id.");
44
+ /**
45
+ * Refuse a capability's purge contributions that no purge could run as declared: an unknown subject, two for
46
+ * one subject, or one with nothing to record. Called by `defineCapability`, so the refusal names the capability
47
+ * where it is written rather than surfacing in a Workflow on the day somebody is deleted.
48
+ */
49
+ function assertPurgeContributions(capability, contributions) {
50
+ const seen = /* @__PURE__ */ new Set();
51
+ for (const contribution of contributions) {
52
+ const subject = PurgeSubject.safeParse(contribution.subject);
53
+ if (!subject.success) throw new ValidationError({
54
+ message: `The ${capability} capability declares a purge for "${String(contribution.subject)}", which is not a subject a purge erases.`,
55
+ action: `Declare it for one of: ${PurgeSubject.options.join(", ")}.`
56
+ });
57
+ if (seen.has(subject.data)) throw new ValidationError({
58
+ message: `The ${capability} capability declares two purge contributions for ${subject.data}.`,
59
+ action: "Fold them into one: each capability is one step of the purge, and a retried step re-runs all of it."
60
+ });
61
+ seen.add(subject.data);
62
+ if (contribution.summary.trim() === "") throw new ValidationError({
63
+ message: `The ${capability} capability's ${subject.data} purge has no summary.`,
64
+ action: "Say in one sentence what it erases. The purge records it with the step."
65
+ });
66
+ if (contribution.export !== void 0 && typeof contribution.export !== "function") throw new ValidationError({
67
+ message: `The ${capability} capability's ${subject.data} purge has an export that is not a function.`,
68
+ action: "Give it an `export` that answers what this capability holds about the subject, or leave it out."
69
+ });
70
+ if (typeof contribution.erase !== "function") throw new ValidationError({
71
+ message: `The ${capability} capability's ${subject.data} purge has no erase function.`,
72
+ action: "Give it an `erase` that removes or anonymizes the subject's rows."
73
+ });
74
+ }
75
+ }
76
+ /** The steps a purge of `subject` runs, in composition order — libraries first, the adopter's `app` last. */
77
+ function purgeSteps(capabilities, subject) {
78
+ const steps = [];
79
+ for (const capability of capabilities) {
80
+ const contribution = capability.purge?.find((candidate) => candidate.subject === subject);
81
+ if (contribution) steps.push({
82
+ step: capability.name,
83
+ contribution
84
+ });
85
+ }
86
+ return steps;
87
+ }
88
+ /** Whether an export answered what the contract promises: one plain object. */
89
+ function isRecord(value) {
90
+ return typeof value === "object" && value !== null && !Array.isArray(value);
91
+ }
92
+ /**
93
+ * Read every step's export for one subject — the export document's body, in step order (#622).
94
+ *
95
+ * **Each read is guarded on its own and they run concurrently**, the shape the user pane's sub-reads have
96
+ * (#380): one capability whose table will not read costs its own entry as `unavailable`, and the rest of the
97
+ * document still answers the request. What the read threw is not carried — it names a query and a table, and
98
+ * the document crosses a trust boundary. An answer that is not one object is `unavailable` too, because the
99
+ * document promises an object per capability and a client validates it.
100
+ */
101
+ async function purgeExports(steps, context) {
102
+ return Promise.all(steps.map(async ({ step, contribution }) => {
103
+ const base = {
104
+ capability: step,
105
+ summary: contribution.summary
106
+ };
107
+ const read = contribution.export;
108
+ if (read === void 0) return {
109
+ ...base,
110
+ state: "not_exported"
111
+ };
112
+ try {
113
+ const data = await read(context);
114
+ return isRecord(data) ? {
115
+ ...base,
116
+ state: "exported",
117
+ data
118
+ } : {
119
+ ...base,
120
+ state: "unavailable"
121
+ };
122
+ } catch {
123
+ return {
124
+ ...base,
125
+ state: "unavailable"
126
+ };
127
+ }
128
+ }));
129
+ }
130
+ //#endregion
131
+ export { PurgeSubject, assertPurgeContributions, purgeExports, purgeSteps };
@@ -783,7 +783,7 @@ export declare const COMMANDS: {
783
783
  readonly required: false;
784
784
  readonly repeatable: false;
785
785
  readonly default: "welcome";
786
- readonly enum: readonly ["magicLink", "supportReply", "otp", "welcome", "securityAlert", "invite", "testerNudge", "passwordChanged", "operationalNotice", "newsletter", "leadCapture", "marketingCampaign"];
786
+ readonly enum: readonly ["magicLink", "supportReply", "otp", "welcome", "securityAlert", "invite", "testerNudge", "passwordChanged", "accountSuspended", "accountReinstated", "deletionScheduled", "deletionComplete", "organizationMemberAdded", "organizationMemberRemoved", "organizationOwnershipTransferred", "organizationSuspended", "organizationReinstated", "organizationDeletionScheduled", "operationalNotice", "newsletter", "leadCapture", "marketingCampaign"];
787
787
  };
788
788
  readonly "--from": {
789
789
  readonly type: "string";
@@ -1096,6 +1096,33 @@ export declare const COMMANDS: {
1096
1096
  };
1097
1097
  readonly groups: readonly [];
1098
1098
  };
1099
+ readonly "privacy enable": {
1100
+ readonly positionals: readonly [];
1101
+ readonly flags: {
1102
+ readonly "--class": {
1103
+ readonly type: "string";
1104
+ readonly required: false;
1105
+ readonly repeatable: true;
1106
+ };
1107
+ readonly "--json": {
1108
+ readonly type: "boolean";
1109
+ readonly required: false;
1110
+ readonly repeatable: false;
1111
+ };
1112
+ };
1113
+ readonly groups: readonly [];
1114
+ };
1115
+ readonly "privacy scan": {
1116
+ readonly positionals: readonly [];
1117
+ readonly flags: {
1118
+ readonly "--json": {
1119
+ readonly type: "boolean";
1120
+ readonly required: false;
1121
+ readonly repeatable: false;
1122
+ };
1123
+ };
1124
+ readonly groups: readonly [];
1125
+ };
1099
1126
  readonly provision: {
1100
1127
  readonly positionals: readonly [];
1101
1128
  readonly flags: {
@@ -1285,6 +1312,31 @@ export declare const COMMANDS: {
1285
1312
  };
1286
1313
  readonly groups: readonly [];
1287
1314
  };
1315
+ readonly "secrets retire-version": {
1316
+ readonly positionals: readonly [{
1317
+ readonly name: "version";
1318
+ readonly required: true;
1319
+ readonly variadic: false;
1320
+ }];
1321
+ readonly flags: {
1322
+ readonly "--env": {
1323
+ readonly type: "string";
1324
+ readonly required: false;
1325
+ readonly repeatable: false;
1326
+ };
1327
+ readonly "--past-guard": {
1328
+ readonly type: "boolean";
1329
+ readonly required: false;
1330
+ readonly repeatable: false;
1331
+ };
1332
+ readonly "--json": {
1333
+ readonly type: "boolean";
1334
+ readonly required: false;
1335
+ readonly repeatable: false;
1336
+ };
1337
+ };
1338
+ readonly groups: readonly [];
1339
+ };
1288
1340
  readonly "secrets rm": {
1289
1341
  readonly positionals: readonly [{
1290
1342
  readonly name: "name";
@@ -2433,5 +2485,5 @@ export declare const COMMANDS: {
2433
2485
  /** The flags every command takes, answered before any command runs. */
2434
2486
  export declare const GLOBAL_FLAGS: readonly ["--help", "--no-input", "--no-pretty", "--pithier", "--pithiest", "--pretty", "--version", "-h", "-v"];
2435
2487
  /** The groups, which only list their subcommands: a sentence may name one, and nobody runs one. */
2436
- export declare const GROUPS: readonly ["cloudflare", "dashboard", "docs", "email", "feature", "media", "payments", "secrets", "storage", "support", "testers", "token", "turnstile", "ui", "vector", "worker"];
2488
+ export declare const GROUPS: readonly ["cloudflare", "dashboard", "docs", "email", "feature", "media", "payments", "privacy", "secrets", "storage", "support", "testers", "token", "turnstile", "ui", "vector", "worker"];
2437
2489
  //# sourceMappingURL=commandCatalog.generated.d.ts.map