pipework 0.69.0 → 0.71.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 (59) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/REFERENCE.md +74 -5
  3. package/dist/REFERENCE.md +124 -2
  4. package/dist/core/config/schema.js +2 -2
  5. package/dist/core/config/schema.js.map +1 -1
  6. package/dist/data/migrate/internal-definitions.d.ts.map +1 -1
  7. package/dist/data/migrate/internal-definitions.js +4 -2
  8. package/dist/data/migrate/internal-definitions.js.map +1 -1
  9. package/dist/infra/access-links/index.d.ts +1 -0
  10. package/dist/infra/access-links/index.d.ts.map +1 -1
  11. package/dist/infra/access-links/namespace.d.ts +24 -0
  12. package/dist/infra/access-links/namespace.d.ts.map +1 -1
  13. package/dist/infra/access-links/namespace.js +23 -0
  14. package/dist/infra/access-links/namespace.js.map +1 -1
  15. package/dist/infra/access-links/person-check.d.ts +45 -0
  16. package/dist/infra/access-links/person-check.d.ts.map +1 -0
  17. package/dist/infra/access-links/person-check.js +128 -0
  18. package/dist/infra/access-links/person-check.js.map +1 -0
  19. package/dist/infra/access-links/schema.d.ts +8 -0
  20. package/dist/infra/access-links/schema.d.ts.map +1 -1
  21. package/dist/infra/access-links/schema.js +7 -1
  22. package/dist/infra/access-links/schema.js.map +1 -1
  23. package/dist/infra/email/audit.d.ts +2 -2
  24. package/dist/infra/email/audit.d.ts.map +1 -1
  25. package/dist/infra/email/audit.js +3 -3
  26. package/dist/infra/email/audit.js.map +1 -1
  27. package/dist/infra/email/inbound.d.ts +199 -0
  28. package/dist/infra/email/inbound.d.ts.map +1 -0
  29. package/dist/infra/email/inbound.js +451 -0
  30. package/dist/infra/email/inbound.js.map +1 -0
  31. package/dist/infra/email/index.d.ts +1 -0
  32. package/dist/infra/email/index.d.ts.map +1 -1
  33. package/dist/infra/email/index.js +1 -0
  34. package/dist/infra/email/index.js.map +1 -1
  35. package/dist/infra/email/mail.d.ts +14 -1
  36. package/dist/infra/email/mail.d.ts.map +1 -1
  37. package/dist/infra/email/mail.js +39 -3
  38. package/dist/infra/email/mail.js.map +1 -1
  39. package/dist/infra/email/mime.d.ts +38 -0
  40. package/dist/infra/email/mime.d.ts.map +1 -0
  41. package/dist/infra/email/mime.js +474 -0
  42. package/dist/infra/email/mime.js.map +1 -0
  43. package/dist/infra/email/namespace.d.ts +8 -1
  44. package/dist/infra/email/namespace.d.ts.map +1 -1
  45. package/dist/infra/email/namespace.js +8 -1
  46. package/dist/infra/email/namespace.js.map +1 -1
  47. package/dist/infra/email/providers.d.ts +3 -1
  48. package/dist/infra/email/providers.d.ts.map +1 -1
  49. package/dist/infra/email/providers.js +8 -3
  50. package/dist/infra/email/providers.js.map +1 -1
  51. package/dist/infra/email/schema.d.ts +109 -0
  52. package/dist/infra/email/schema.d.ts.map +1 -1
  53. package/dist/infra/email/schema.js +39 -1
  54. package/dist/infra/email/schema.js.map +1 -1
  55. package/dist/infra/email/sns.d.ts +14 -0
  56. package/dist/infra/email/sns.d.ts.map +1 -1
  57. package/dist/infra/email/sns.js +37 -23
  58. package/dist/infra/email/sns.js.map +1 -1
  59. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.71.0
4
+
5
+ **Schema note: blueprint `email: {}` adds `pipework_email_inbound` and, to `pipework_email_messages`, `conversation_id` and `in_reply_to_inbound` (both nullable, `conversation_id` indexed) to generated migrations; not tenant-scoped. Run `pipework generate` and `pipework migrate` to add them.**
6
+
7
+ - **New: `mail.inbound` receives email as a capability.** With `mail.sesReceipt` (SES stores the raw message in S3 and notifies a signed SNS topic; the notification is verified with the same checks as `mail.snsWebhook`) each message is recorded once, then a job fetches it, parses it (from, to, cc, subject, text, HTML, attachments, Message-ID, In-Reply-To, References; no new dependency) and calls the app's `onMessage` with a conversation id: a reply is matched by In-Reply-To/References to an earlier received message, or to a message sent with `mail.send(..., { conversationId })`. Attachments are stored as the resolved tenant's files (`storage`), SES's spam, virus, SPF, DKIM and DMARC verdicts are kept, a handler error retries without storing twice, each message is a trace step, and `sweep()` deletes raw copies after `rawRetentionDays` (30). `mail.inboundFolder` is the development stand-in: `.eml` files dropped in a folder are received by `scan()`.
8
+ - **New: `mail.send` takes `conversationId` and `inReplyTo`.** A message sent as a reply carries `In-Reply-To` and `References` (over SES in `Content.Simple.Headers`; the dev stand-in writes them to its file) and joins the conversation of the message it answers.
9
+
10
+ ## 0.70.0
11
+
12
+ **Schema note: blueprint `accessLinks: {}` adds `access_link_check_spent` (`challenge` primary key, `expires_at`) to generated migrations; not tenant-scoped, no row-level security. Run `pipework generate` and `pipework migrate` to add it.**
13
+
14
+ - **New: `accessLinks.personCheck({ secret, ... })` is a self-hosted person check for access links, with no third-party script.** Proof-of-work challenges in the ALTCHA format (so the self-hosted ALTCHA widget, with its keyboard and screen-reader checkbox, solves them) are bound to a link code and an expiry and HMAC-signed. `verify(code, solution)` accepts a solution once across all processes and returns a short-lived signed pass, or `null` for anything malformed, tampered, expired, for another link or already used; `check` registers under `checks` so the pass is the proof for a `requireChecks` entry at `beginUse`. `personCheck.solve` solves a challenge for tests. The secret must be 32 bytes or more and the same in every process.
15
+
3
16
  ## 0.69.0
4
17
 
5
18
  **Schema note: blueprint `alerts: {}` adds `pipework_alerts`, `pipework_alert_deliveries` and `pipework_alert_source_state` to generated migrations; not tenant-scoped. Run `pipework generate` and `pipework migrate` to add them.**
package/REFERENCE.md CHANGED
@@ -1143,15 +1143,15 @@ Signs a payload with HMAC for outbound delivery — returns body, signature, tim
1143
1143
 
1144
1144
  ## mail — Transactional Email
1145
1145
 
1146
- Mail namespace — transactional email through a job queue, SES v2 or a dev stand-in, bounce and complaint suppression.
1146
+ Mail namespace — email through a job queue, SES v2 or a dev stand-in, bounce and complaint suppression, and receiving.
1147
1147
 
1148
- Opt in with blueprint `email: {}`; the generated migration adds `pipework_email_messages` (`key` unique, `to_address`, `template`, `data`, `status` `queued | sending | sent | suppressed | failed`, `provider_message_id`, `error`, `trace_id`, `created_at`, `sent_at`, `sending_at`) and `pipework_email_suppressions` (`address` primary key, lowercased; `reason` `bounce | complaint`; `detail`; `created_at`), both `IF NOT EXISTS` and not tenant-scoped.
1148
+ Opt in with blueprint `email: {}`; the generated migration adds `pipework_email_messages` (`key` unique, `to_address`, `template`, `data`, `status` `queued | sending | sent | suppressed | failed`, `provider_message_id`, `error`, `trace_id`, `created_at`, `sent_at`, `sending_at`) and `pipework_email_suppressions` (`address` primary key, lowercased; `reason` `bounce | complaint`; `detail`; `created_at`), both `IF NOT EXISTS` and not tenant-scoped. `pipework_email_messages` also has `conversation_id` and `in_reply_to_inbound`. Receiving adds `pipework_email_inbound` (see `mail.inbound`).
1149
1149
 
1150
1150
  ### `mail.create`
1151
1151
 
1152
1152
  Creates the transactional email interface: `send(db, { to, template, data, key })` in the caller's transaction, and the `jobs` that deliver.
1153
1153
 
1154
- `mail.create({ provider, templates, from, queue, configurationSet?, environment?, sendingStaleSeconds? })` returns `{ send, jobs }`. `templates` is `{ [name]: (data) => { subject, text, html? } }`; `send` checks the template name and the data type. `send(db, ...)` inserts the message row (`ON CONFLICT (key) DO NOTHING`) and enqueues a `pipework.email.send` job on `queue` in the same `db`, so the caller's rollback drops both; it returns `{ messageId, queued }`, with `queued: false` and the earlier id when the key was used. Spread `mail.jobs` into the worker surface's `jobs` (on the same queue). The job skips a message already `sent`, `suppressed` or `failed`, marks an address on the suppression list `suppressed` without calling the provider, and otherwise renders, sends and marks `sent`. A provider error returns the row to `queued` with `error` set and rethrows, so the queue retries per its `maxAttempts`; if it gives up, the row keeps the error. A template that is missing or throws marks the row `failed` without retrying. The job claims the message with a conditional update (`queued`, or `sending` for longer than `sendingStaleSeconds`, default 600), so a reaper re-run of a job still in flight does not call the provider; a run that cannot claim returns and logs at info. Residual window: a crash mid-send leaves the message `sending` for the stale window, after which a retry may send it once more; likewise if the provider accepted the message and the process died before the row was marked `sent`. SES v2 has no idempotency token. The job runs in the trace of the flow that called `send` (`continueFlow`); the delivery is the step `pipework/email:deliver`, with `Email:sent`, `Email:suppressed` or `Email:failed` audit records under it. Message bodies and template data are never logged. `create` throws when `environment` is `production` and the provider is the stand-in; the job checks the instance's environment too.
1154
+ `mail.create({ provider, templates, from, queue, configurationSet?, environment?, sendingStaleSeconds? })` returns `{ send, jobs }`. `send(db, { to, template, data, key, conversationId?, inReplyTo? })`: `conversationId` (a UUID) puts the message in a conversation, so a received reply threads there; `inReplyTo` is a received message's id (`ReceivedEmail.id`): the sent message carries `In-Reply-To: <its Message-ID>` and `References` (its references plus its Message-ID, at most 20 ids and about 900 characters, oldest dropped first), and joins its conversation when `conversationId` is not given (an unknown id is a 422). Over SES the headers go in `Content.Simple.Headers`. `templates` is `{ [name]: (data) => { subject, text, html? } }`; `send` checks the template name and the data type. `send(db, ...)` inserts the message row (`ON CONFLICT (key) DO NOTHING`) and enqueues a `pipework.email.send` job on `queue` in the same `db`, so the caller's rollback drops both; it returns `{ messageId, queued }`, with `queued: false` and the earlier id when the key was used. Spread `mail.jobs` into the worker surface's `jobs` (on the same queue). The job skips a message already `sent`, `suppressed` or `failed`, marks an address on the suppression list `suppressed` without calling the provider, and otherwise renders, sends and marks `sent`. A provider error returns the row to `queued` with `error` set and rethrows, so the queue retries per its `maxAttempts`; if it gives up, the row keeps the error. A template that is missing or throws marks the row `failed` without retrying. The job claims the message with a conditional update (`queued`, or `sending` for longer than `sendingStaleSeconds`, default 600), so a reaper re-run of a job still in flight does not call the provider; a run that cannot claim returns and logs at info. Residual window: a crash mid-send leaves the message `sending` for the stale window, after which a retry may send it once more; likewise if the provider accepted the message and the process died before the row was marked `sent`. SES v2 has no idempotency token. The job runs in the trace of the flow that called `send` (`continueFlow`); the delivery is the step `pipework/email:deliver`, with `Email:sent`, `Email:suppressed` or `Email:failed` audit records under it. Message bodies and template data are never logged. `create` throws when `environment` is `production` and the provider is the stand-in; the job checks the instance's environment too.
1155
1155
 
1156
1156
  ### `mail.ses`
1157
1157
 
@@ -1163,7 +1163,7 @@ Amazon SES v2 provider, SigV4-signed without the AWS SDK.
1163
1163
 
1164
1164
  Development provider that writes each message to a file instead of sending; refused in production.
1165
1165
 
1166
- `mail.devStandIn({ dir })` writes `<dir>/<messageId>.json` (`from`, `to`, `subject`, `text`, `html`) and logs one line with the address and file path.
1166
+ `mail.devStandIn({ dir })` writes `<dir>/<messageId>.json` (`from`, `to`, `subject`, `text`, `html`, and `headers` for a reply) and logs one line with the address and file path.
1167
1167
 
1168
1168
  ### `mail.snsWebhook`
1169
1169
 
@@ -1171,15 +1171,46 @@ Inbound handler for SES bounce and complaint events delivered through SNS; suppr
1171
1171
 
1172
1172
  `mail.snsWebhook({ path, topicArns, region?, fetchCert?, confirm? })` returns a public POST handler for an SNS HTTP/S subscription to the SES event topic. `topicArns` is required: after the signature verifies, a message whose `TopicArn` is not listed is refused with 401, before a subscription is confirmed or an event processed (SNS signs every topic, so anyone could otherwise subscribe the endpoint to their own topic and forge bounces). Every message's signature (SignatureVersion 1 or 2) is verified against the certificate at `SigningCertURL`, which must be `https://sns.<region>.amazonaws.com/...pem` (any AWS region when `region` is omitted); otherwise the answer is 401. A `SubscriptionConfirmation` is confirmed by fetching its `SubscribeURL` (same host rule). A `Notification` with a permanent bounce or a complaint puts each recipient on `pipework_email_suppressions`; a transient or undetermined bounce is logged only. Each is the step `pipework/email:notification` with an `Email:bounce` or `Email:complaint` audit record (`entity_id` the message id when found by `provider_message_id`; `after` has `address`, `bounceType`, `suppressed`, `messageTraceId`, the trace of the original send). A suppression logs a warning `email suppressed`; the alert condition (#458) is not built yet. SES events delivered through EventBridge are not supported. `fetchCert` and `confirm` replace the default HTTP fetches (for tests).
1173
1173
 
1174
+ ### `mail.inbound`
1175
+
1176
+ Receiving email: `inbound({ source, queue, onMessage, ... })` returns `{ webhook, jobs, scan, sweep, get }`; messages arrive parsed, threaded into conversations, attachments stored as tenant files.
1177
+
1178
+ `mail.inbound({ source, queue, onMessage, storage?, resolveTenant?, rawRetentionDays? = 30, maxRawBytes? = 41943040, environment? })`. Needs blueprint `email: {}`: the table `pipework_email_inbound` (`source_id` unique, `source` `ses | folder`, `raw_location`, `raw_expires_at`, `raw_deleted_at`, `status` `received | processed | failed`, `error`, `message_id_header`, `in_reply_to`, `references`, `from_address`, `subject`, `conversation_id`, `tenant_id`, `verdicts`, `recipients`, `attachment_files`, `received_at`, `processed_at`, `trace_id`; `references`, `recipients` and `attachment_files` are jsonb arrays). Not tenant-scoped (the row exists before a tenant is known). It holds no bodies: the raw message is the copy, deleted by `sweep` after `rawRetentionDays`.
1179
+
1180
+ `webhook({ path })` (SES source) returns a public POST handler: the SNS message is verified exactly as for `mail.snsWebhook` (signature, certificate host, `topicArns`; 401 otherwise, nothing recorded), then one `pipework_email_inbound` row keyed by SES's `mail.messageId` and one `pipework.email.receive` job are written in one transaction; the same notification again adds nothing. A notification that is not `Received`, or whose receipt action is not `S3`, is answered 200 and ignored. Spread `jobs` into the worker surface's `jobs` (same queue).
1181
+
1182
+ The receive job (trace step `pipework/email:receive`, `EmailInbound:received` audit record on success) reads the raw message from the source (over `maxRawBytes`: row `failed`, no handler call, no retry), parses it, assigns the conversation, calls `resolveTenant(email)` (`null` = none; it runs before threading and gets the message without `conversationId`, `isNewConversation` or `tenantId`), threads, stores attachments with `storage.putFor(tenant, ...)` when both `storage` and a tenant exist (otherwise `attachments[].file` is `null`, metadata kept), and calls `onMessage(email)`. A throw, or a failure reading the raw message, rethrows so the queue retries (set `maxAttempts`); the retry sees the same message, and attachments stored by the earlier attempt are reused, not stored again. A raw message that is definitely gone (S3 `NoSuchKey`, a missing file) marks the row `failed` at once, with no retry. `onMessage` is called at least once per message: a retry after a handler error, or a job re-run after a crash, calls it again with the same `id`, so make it idempotent on `id`.
1183
+
1184
+ `ReceivedEmail`: `{ id, conversationId, isNewConversation, tenantId, messageId, inReplyTo, references, from: {address, name}, to[], cc[], replyTo[], subject, date, text, html, attachments: [{ filename, mediaType, size, sha256, contentId, inline, file: StoredFile | null }], verdicts: { spam, virus, spf, dkim, dmarc } | null, recipients }`. Message ids are without angle brackets; `from` has empty strings when the message has no readable From; `verdicts` values are SES's `PASS`, `FAIL`, `GRAY`, `PROCESSING_FAILED` (`null` for the folder stand-in).
1185
+
1186
+ Threading: the ids of In-Reply-To then References are matched, first match winning, to (a) an earlier received message's Message-ID, or (b) for an id `<X@...amazonses.com>`, a sent message whose `provider_message_id` is `X` and which has a `conversation_id` (set by `mail.send`). No match: a new conversation id and `isNewConversation: true`. Ids are compared exactly (case-sensitive). A received message is matched only when its `tenant_id` equals the tenant `resolveTenant` named for this message or either is null; a sent message's conversation is refused when it holds a received message of another tenant (a forged In-Reply-To cannot join another tenant's conversation). Threading is not authentication: Message-IDs are not secret and From is forgeable, so before attaching a message to a conversation's participants the app checks `from` against them and the DKIM and DMARC verdicts.
1187
+
1188
+ Parsing is hand-written and never throws: RFC 2047 encoded words, RFC 2231 filenames, quoted-printable and base64, charsets known to `TextDecoder` (utf-8 fallback), nested multipart with missing boundaries, `message/rfc822` kept as one attachment.
1189
+
1190
+ `sweep({ limit? = 500 })` (for a cron; needs a Flow) deletes raw copies past `raw_expires_at` and sets `raw_deleted_at`; returns `{ deleted, failed }`. `scan()` (folder source; needs a Flow) receives each `.eml` in the folder; `get(id)` returns the row's metadata (needs a Flow).
1191
+
1192
+ ### `mail.sesReceipt`
1193
+
1194
+ Inbound source: SES receipt rule storing raw messages in S3 and notifying a signed SNS topic.
1195
+
1196
+ `mail.sesReceipt({ bucket, topicArns, region?, fetchCert?, confirm? })`. `bucket` is a `StorageBackend` over the receipt bucket with no prefix (`storage.s3({ bucket, region, credentials })`); the receive job reads, and `sweep` deletes, the object named by the S3 action's `objectKey`. The receipt rule needs an S3 action that also publishes to an SNS topic listed in `topicArns`.
1197
+
1198
+ ### `mail.inboundFolder`
1199
+
1200
+ Inbound development source: `.eml` files dropped in a folder, received by `scan()`; refused in production.
1201
+
1202
+ `mail.inboundFolder({ dir })`. `scan()` copies each `*.eml` in `dir` to `dir/received/<sha-prefix>-<name>` (the raw copy until `sweep`), records it and enqueues the receive job, then removes the original; the same bytes dropped again are counted as `duplicates` and not received twice. `mail.inbound` throws when `environment` is `production`.
1203
+
1174
1204
  ## accessLinks — Access Links
1175
1205
 
1176
1206
  Short, revocable bearer links to a tenant's resource, for people with no account ("a public link that never expires", "a link for John that works once"). A tenant creates a link; anyone holding the code can resolve it on a public route with no tenant and no auth in the Flow; a use counts only when the app confirms it completed.
1177
1207
 
1178
- Opt in with blueprint `accessLinks: {}`. The generated migration then includes three tables:
1208
+ Opt in with blueprint `accessLinks: {}`. The generated migration then includes four tables:
1179
1209
 
1180
1210
  - `access_link_code` — `code` (primary key), `tenant_id`, `link_id`, `created_at`. Not tenant-scoped, no row-level security: it maps a code to its tenant so a request that has no tenant can find where to look, and holds nothing else.
1181
1211
  - `access_link` — one row per link (target, permissions, note, expiry, `max_uses`, `require_checks`, `check_data`, revoked). Tenant-scoped; forced RLS.
1182
1212
  - `access_link_use` — one row per use (kind, status `pending | completed | abandoned`, `reserved_until`, client, location, `detail` jsonb, `claimed_at`). Tenant-scoped; forced RLS.
1213
+ - `access_link_check_spent` — `challenge` (primary key), `expires_at`: the person-check solutions already accepted. Not tenant-scoped, no row-level security.
1183
1214
 
1184
1215
  ### `accessLinks.create`
1185
1216
 
@@ -1255,6 +1286,44 @@ const preview = fitting.public().route('POST', '/s/preview')
1255
1286
  })
1256
1287
  ```
1257
1288
 
1289
+ ### `accessLinks.personCheck`
1290
+
1291
+ `accessLinks.personCheck({ secret, maxNumber?, challengeMs?, passMs?, database? })` returns a `PersonCheck`: a self-hosted "is this a person" check for `requireChecks`, with no third-party script. It uses proof-of-work in the ALTCHA challenge format (algorithm `SHA-256`; fields `challenge`, `maxnumber`, `salt`, `signature`), so the ALTCHA widget (MIT; serve its script yourself) solves it in the background with no puzzle, and falls back to a keyboard and screen-reader checkbox. pipework does not ship the widget.
1292
+
1293
+ | field | meaning |
1294
+ |---|---|
1295
+ | `secret` | String or Buffer, 32 bytes or more, the same in every process. Shorter throws at creation; there is no random fallback, because a per-process secret breaks passes across processes. Read it in your config and pass it in. Challenge and pass keys are derived from it per purpose. |
1296
+ | `maxNumber` | The largest number the browser may have to try; the work is half this on average. Default 100 000; 1 to 10 000 000. |
1297
+ | `challengeMs` | How long a challenge can be solved for. Default 10 minutes. |
1298
+ | `passMs` | How long a pass is good for. Default 30 minutes. |
1299
+ | `database` | The database holding `access_link_check_spent`; default the default database. |
1300
+
1301
+ - `challenge(code)` — a `PersonChallenge` for the widget. Its salt is `<random hex>?expires=<unix seconds>&link=<code>`, so the challenge is bound to one link code and an expiry; the signature is an HMAC of the challenge.
1302
+ - `verify(code, solution)` — `solution` is the widget's base64 payload (`{ algorithm, challenge, number, salt, signature, took }`). Returns `{ pass, expiresAt }`, or `null` for anything else: not a string, not base64 or JSON, wrong types, a negative or non-integer `number`, a bad signature, a wrong number, an expired challenge, a challenge made for another code, or a solution already used. It never throws on bad input. A solution is accepted once across all processes: the challenge is inserted into `access_link_check_spent` with `ON CONFLICT DO NOTHING` on the owner connection (`pipe.system()`), so of any number of racing verifies exactly one gets a pass. Rows are kept until an hour past the challenge's expiry and pruned (up to 100 per call) by later verifies. Needs a Flow.
1303
+ - `check` — an `AccessLinkCheck`: true when `proof` is a pass string with a valid signature, not expired, issued for this link's code. The pass is `base64url(JSON {code, exp}).base64url(HMAC)`.
1304
+ - `accessLinks.personCheck.solve(challenge)` — solves a challenge in code and returns the widget-format solution. For tests: it does the work the browser would.
1305
+
1306
+ ```ts
1307
+ const person = accessLinks.personCheck({ secret: appConfig.linkSecret })
1308
+ const links = accessLinks.create({ permissions: ['view'], checks: { person: person.check } })
1309
+ await links.link({ target, permissions: ['view'], requireChecks: ['person'] })
1310
+
1311
+ // Public route 1: the widget's challengeurl.
1312
+ const challenge = fitting.public().route('GET', '/s/:code/challenge')
1313
+ .fit(async ({ params }) => person.challenge(params.code))
1314
+
1315
+ // Public route 2: the widget's payload in, a pass out.
1316
+ const verify = fitting.public().route('POST', '/s/verify')
1317
+ .input(schema.check.object({ code: schema.check.string(), payload: schema.check.string() }))
1318
+ .fit(async ({ input }) => {
1319
+ const passed = await person.verify(input.code, input.payload)
1320
+ return passed ?? { error: 'not-verified' }
1321
+ })
1322
+
1323
+ // Later: begin the use with the pass.
1324
+ await links.beginUse(code, { kind: 'view', proof: { person: pass } })
1325
+ ```
1326
+
1258
1327
  ## credits — Prepaid Usage Credits
1259
1328
 
1260
1329
  Prepaid credits per tenant, like CI minutes: a subscription grants an allocation each period, packs are bought on top, and work draws them down. Every grant has its own expiry; spending draws the soonest-expiring grant first. A job reserves before it starts, settles the actual amount when it ends, and releases on failure. Units are whole numbers (safe integers, bigint in SQL); the app decides what one unit is.
package/dist/REFERENCE.md CHANGED
@@ -25,8 +25,12 @@
25
25
  - [valve](#valve)
26
26
  - [vector — Vector & Full-Text Search](#vector-vector-full-text-search)
27
27
  - [accessLinks](#accesslinks)
28
+ - [alerts](#alerts)
28
29
  - [audit — Audit Logging](#audit-audit-logging)
29
30
  - [cache — Caching](#cache-caching)
31
+ - [credits](#credits)
32
+ - [mail](#mail)
33
+ - [storage](#storage)
30
34
  - [webhook — Inbound & Outbound Webhooks](#webhook-inbound-outbound-webhooks)
31
35
  - [behavior — Resource Decorators](#behavior-resource-decorators)
32
36
  - [fitting — Dependency Injection](#fitting-dependency-injection)
@@ -632,6 +636,14 @@ Base error class with code, statusCode, and suggestion fields.
632
636
 
633
637
  429 — too many attempts; carries `retryAfterSeconds`, sent as a `Retry-After` header.
634
638
 
639
+ ### `errors.PayloadTooLarge`
640
+
641
+ 413 — request body over the route's size limit.
642
+
643
+ ### `errors.UnsupportedMediaType`
644
+
645
+ 415 — request body media type not accepted by the route.
646
+
635
647
  ## lifecycle — Startup & Shutdown
636
648
 
637
649
  Application lifecycle namespace — startup orchestration with hooks and timeouts.
@@ -1087,6 +1099,44 @@ Access links namespace — short revocable bearer links to a tenant's resource.
1087
1099
 
1088
1100
  Creates an access-link handle: tenant-scoped management plus the public resolve / beginUse / completeUse / abandonUse.
1089
1101
 
1102
+ ### `accessLinks.personCheck`
1103
+
1104
+ A self-hosted person check for `requireChecks`: ALTCHA-format proof-of-work challenges bound to a link code
1105
+ and an expiry, HMAC-signed with `secret` (32 bytes or more, the same in every process). A solution is accepted
1106
+ once across all processes (`access_link_check_spent`, in the `accessLinks` tables) and yields a short-lived
1107
+ signed pass that is the proof for the link's check at `beginUse`. `personCheck.solve(challenge)` solves a
1108
+ challenge in code, for tests.
1109
+
1110
+ The app writes two public routes: GET returns `check.challenge(code)` for the widget (`challengeurl`, or
1111
+ `challengejson`); POST gives `check.verify(code, payload)` the widget's payload and returns the pass, or refuses
1112
+ when it is `null`. The page carries the ALTCHA widget (MIT; serve its script yourself, no third party sees the
1113
+ visitor), which solves in the background and falls back to a keyboard and screen-reader checkbox. pipework
1114
+ does not ship the widget.
1115
+
1116
+ ```ts
1117
+ const person = accessLinks.personCheck({ secret: config.linkSecret })
1118
+ const links = accessLinks.create({ permissions: ['view'], checks: { person: person.check } })
1119
+ await links.link({ target, permissions: ['view'], requireChecks: ['person'] })
1120
+ // public route: begin with the pass the visitor got from POST
1121
+ await links.beginUse(code, { kind: 'view', proof: { person: pass } })
1122
+ ```
1123
+
1124
+ ## alerts
1125
+
1126
+ Alerts namespace — raise and resolve keyed conditions, grouped, delivered to sinks through an outbox, traced.
1127
+
1128
+ ### `alerts.create`
1129
+
1130
+ Creates an alerts handle.
1131
+
1132
+ ### `alerts.webhook`
1133
+
1134
+ A sink that POSTs the alert as signed JSON to a URL.
1135
+
1136
+ ### `alerts.memory`
1137
+
1138
+ A sink that keeps deliveries in `.delivered`, for tests.
1139
+
1090
1140
  ## audit — Audit Logging
1091
1141
 
1092
1142
  Audit logging namespace — structured audit trail for data changes.
@@ -1123,6 +1173,62 @@ Creates a single-key cache with TTL, a loader function, and invalidation.
1123
1173
 
1124
1174
  Creates a per-tenant cache — each tenant gets its own TTL and loader keyed by tenant ID.
1125
1175
 
1176
+ ## credits
1177
+
1178
+ Credits namespace — prepaid usage credits per tenant: expiring grants, reserve / settle / release by job.
1179
+
1180
+ ### `credits.create`
1181
+
1182
+ Creates a credits handle.
1183
+
1184
+ ## mail
1185
+
1186
+ Mail namespace — email through a job queue, SES v2 or a dev stand-in, bounce and complaint suppression, and receiving.
1187
+
1188
+ ### `mail.create`
1189
+
1190
+ Creates the mail interface: `send(db, { to, template, data, key })` in the caller's transaction, and the `jobs` that deliver.
1191
+
1192
+ ### `mail.ses`
1193
+
1194
+ Amazon SES v2 provider, SigV4-signed without the AWS SDK.
1195
+
1196
+ ### `mail.devStandIn`
1197
+
1198
+ Development provider that writes each message to a file instead of sending; refused in production.
1199
+
1200
+ ### `mail.snsWebhook`
1201
+
1202
+ Inbound handler for SES bounce and complaint events delivered through SNS; suppresses the address.
1203
+
1204
+ ### `mail.inbound`
1205
+
1206
+ Receiving email: `inbound({ source, queue, onMessage, ... })` returns `{ webhook, jobs, scan, sweep, get }`; messages arrive parsed, threaded into conversations, attachments stored as tenant files.
1207
+
1208
+ ### `mail.sesReceipt`
1209
+
1210
+ Inbound source: SES receipt rule storing raw messages in S3 and notifying a signed SNS topic.
1211
+
1212
+ ### `mail.inboundFolder`
1213
+
1214
+ Inbound development source: `.eml` files dropped in a folder, received by `scan()`; refused in production.
1215
+
1216
+ ## storage
1217
+
1218
+ Storage namespace — tenant-scoped, content-addressed file storage with signed URLs and retention.
1219
+
1220
+ ### `storage.create`
1221
+
1222
+ Creates a storage handle over a backend.
1223
+
1224
+ ### `storage.s3`
1225
+
1226
+ S3-compatible backend (AWS S3, MinIO, R2): SigV4 over `fetch`, multipart streaming upload, optional server-side encryption.
1227
+
1228
+ ### `storage.local`
1229
+
1230
+ Local-disk backend for development and tests; refused in production.
1231
+
1126
1232
  ## webhook — Inbound & Outbound Webhooks
1127
1233
 
1128
1234
  Webhook namespace — inbound verification, outbound delivery with retries, HMAC signing.
@@ -1215,7 +1321,7 @@ Creates a Flow for test isolation with optional auth and tenant overrides.
1215
1321
 
1216
1322
  ## http — Server
1217
1323
 
1218
- HTTP server namespace — managed by manifold.start(), not directly accessible.
1324
+ HTTP namespace: `http.file()` builds a file response; the server itself is managed by manifold.start().
1219
1325
 
1220
1326
  ### Types
1221
1327
 
@@ -1243,7 +1349,7 @@ interface RateLimitConfig
1243
1349
  interface InjectOptions
1244
1350
  ```
1245
1351
 
1246
- **`InjectResponse`** — Response from server.inject() — statusCode, headers, body, json() helper.
1352
+ **`InjectResponse`** — Response from server.inject() — statusCode, headers, body, rawPayload, json() helper.
1247
1353
 
1248
1354
  ```typescript
1249
1355
  interface InjectResponse
@@ -1273,6 +1379,22 @@ interface ErrorResponse
1273
1379
  interface PipeworkServer
1274
1380
  ```
1275
1381
 
1382
+ **`FileResponseInit`** — What `http.file()` takes.
1383
+
1384
+ ```typescript
1385
+ interface FileResponseInit
1386
+ ```
1387
+
1388
+ **`FileResponse`**
1389
+
1390
+ A file for a route to answer with, made by `http.file()`. Return it from a
1391
+ handler declared with `.file()`; it is sent as the response body, streamed
1392
+ when `body` is a Readable.
1393
+
1394
+ ```typescript
1395
+ interface FileResponse
1396
+ ```
1397
+
1276
1398
  **`HttpRequest`** — Fastify request with pipework extensions — req.id (UUID), typed headers, client address (`ip`, `ips`).
1277
1399
 
1278
1400
  ```typescript
@@ -217,14 +217,14 @@ export const trunkConfigSchema = z.object({
217
217
  trace: traceSchema.optional().describe('Trace substrate retention and partitioning'),
218
218
  audit: auditSchema.optional().describe('Audit substrate retention; independent of trace storage'),
219
219
  valve: valveSchema.optional().describe('Valve substrate — opts the valve_crossing ledger table into generated migrations'),
220
- accessLinks: accessLinksSchema.optional().describe('Access links — opts the access_link_code, access_link and access_link_use tables into generated migrations'),
220
+ accessLinks: accessLinksSchema.optional().describe('Access links — opts the access_link_code, access_link, access_link_use and access_link_check_spent tables into generated migrations'),
221
221
  credits: creditsSchema.optional().describe('Prepaid usage credits — opts the credit_grant, credit_reservation, credit_draw and credit_ledger tables into generated migrations'),
222
222
  alerts: alertsSchema.optional().describe('Alerts — opts the pipework_alerts, pipework_alert_deliveries and pipework_alert_source_state tables into generated migrations'),
223
223
  storage: storageSchema.optional().describe('File storage — opts the storage_file table into generated migrations'),
224
224
  sessions: sessionsSchema.optional().describe('Sessions — opts the pipework_refresh_tokens and pipework_auth_versions tables into generated migrations'),
225
225
  orgs: orgsSchema.optional().describe('Multi-org — opts the pipework_user_orgs table into generated migrations'),
226
226
  passwords: passwordsSchema.optional().describe('Password sign-in — opts the pipework_signin_attempts table into generated migrations'),
227
- email: emailSchema.optional().describe('Transactional email — opts the pipework_email_messages and pipework_email_suppressions tables into generated migrations'),
227
+ email: emailSchema.optional().describe('Email — opts the pipework_email_messages, pipework_email_suppressions and pipework_email_inbound tables into generated migrations'),
228
228
  fastPath: fastPathSchema.optional().describe('Opt-in fast path for `check` / `test` — affected-scoped, tier-trimmed iteration'),
229
229
  observability: observabilitySchema.optional(),
230
230
  env: z.record(z.string(), envVarDefSchema).optional().describe('Declared environment variables — the canonical home for runtime config (ports, service tokens, '
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/core/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAG1B,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;IACnF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2FAA2F,CAAC;IACpI,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sFAAsF,CAAC;IAChI,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sNAAsN,CAAC;IAC9P,UAAU,EAAE,CAAC,CA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E,UAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yEAAyE,CAAC;IAC/G,SAAS,EAAE,eAAe,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sFAAsF,CAAC;IACtI,KAAK,EAAE,WAAW,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mIAAmI,CAAC;IAC3K,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iFAAiF,CAAC;IAC/H,aAAa,EAAE,mBAAmB,CAAC,QAAQ,EAAE;IAC7C,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,eAAe,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC5D,iGAAiG;UAC/F,uGAAuG;UACvG,2FAA2F,CAC9F;CACF,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"internal-definitions.d.ts","sourceRoot":"","sources":["../../../src/data/migrate/internal-definitions.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAE5D,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE;IAAE,iBAAiB,EAAE,OAAO,CAAA;CAAE,GACtC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA4FlC"}
1
+ {"version":3,"file":"internal-definitions.d.ts","sourceRoot":"","sources":["../../../src/data/migrate/internal-definitions.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAE5D,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE;IAAE,iBAAiB,EAAE,OAAO,CAAA;CAAE,GACtC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA8FlC"}
@@ -28,10 +28,11 @@ export async function loadInternalDefinitions(blueprint, options) {
28
28
  result['__pipework_valve_crossing'] = valveCrossing;
29
29
  }
30
30
  if (blueprint.accessLinks !== undefined) {
31
- const { accessLinkCode, accessLink, accessLinkUse } = await import('../../infra/access-links/schema.js');
31
+ const { accessLinkCode, accessLink, accessLinkUse, accessLinkCheckSpent } = await import('../../infra/access-links/schema.js');
32
32
  result['__pipework_access_link_code'] = accessLinkCode;
33
33
  result['__pipework_access_link'] = accessLink;
34
34
  result['__pipework_access_link_use'] = accessLinkUse;
35
+ result['__pipework_access_link_check_spent'] = accessLinkCheckSpent;
35
36
  }
36
37
  if (blueprint.credits !== undefined) {
37
38
  const { creditGrant, creditReservation, creditDraw, creditLedger } = await import('../../infra/credits/schema.js');
@@ -64,9 +65,10 @@ export async function loadInternalDefinitions(blueprint, options) {
64
65
  result['__pipework_signin_attempts'] = signinAttempts;
65
66
  }
66
67
  if (blueprint.email !== undefined) {
67
- const { emailMessages, emailSuppressions } = await import('../../infra/email/schema.js');
68
+ const { emailMessages, emailSuppressions, emailInbound } = await import('../../infra/email/schema.js');
68
69
  result['__pipework_email_messages'] = emailMessages;
69
70
  result['__pipework_email_suppressions'] = emailSuppressions;
71
+ result['__pipework_email_inbound'] = emailInbound;
70
72
  }
71
73
  // Queue tables register at createQueue() time (worker surfaces create their
72
74
  // queue at construction, so config discovery populates the registry before
@@ -1 +1 @@
1
- {"version":3,"file":"internal-definitions.js","sourceRoot":"","sources":["../../../src/data/migrate/internal-definitions.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,8EAA8E;AAC9E,gFAAgF;AAChF,6EAA6E;AAC7E,+EAA+E;AAC/E,0EAA0E;AAC1E,0EAA0E;AAI1E,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,SAAoB,EACpB,OAAuC;IAEvC,IAAI,CAAC,OAAO,CAAC,iBAAiB;QAAE,OAAO,EAAE,CAAA;IAEzC,MAAM,MAAM,GAA4B,EAAE,CAAA;IAE1C,IAAI,SAAS,CAAC,KAAK,KAAK,SAAS,EA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AAE,EAAE,CAAC;QACpD,MAAM,CAAC,oBAAoB,IAAI,EAAE,CAAC,GAAG,UAAU,CAAA;IACjD,CAAC;IAED,uEAAuE;IACvE,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,MAAM,CAAC,qCAAqC,CAAC,CAAA;IACpF,KAAK,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,oBAAoB,EAAE,EAAE,CAAC;QACxD,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC,GAAG,UAAU,CAAA;IAC3C,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -2,4 +2,5 @@ export { createAccessLinks } from './handle.js';
2
2
  export type { AccessLinks, AccessLinksConfig, AccessLink, PublicLink, AccessLinkUse, AccessLinkTarget, AccessLinkCheck, AccessLinkCheckArgs, LinkOptions, ResolveResult, BeginUseResult, CompleteUseResult, AbandonUseResult, } from './handle.js';
3
3
  export type { CodeConfig } from './code.js';
4
4
  export type { RateLimitConfig } from './rate-limit.js';
5
+ export type { PersonCheck, PersonCheckConfig, PersonChallenge, PersonPass } from './person-check.js';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/infra/access-links/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,YAAY,EACV,WAAW,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EACvF,eAAe,EAAE,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAChF,iBAAiB,EAAE,gBAAgB,GACpC,MAAM,aAAa,CAAA;AACpB,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC3C,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/infra/access-links/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,YAAY,EACV,WAAW,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EACvF,eAAe,EAAE,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAChF,iBAAiB,EAAE,gBAAgB,GACpC,MAAM,aAAa,CAAA;AACpB,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC3C,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtD,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA"}
@@ -3,5 +3,29 @@ import { createAccessLinks } from './handle.js';
3
3
  export declare const accessLinks: {
4
4
  /** Creates an access-link handle: tenant-scoped management plus the public resolve / beginUse / completeUse / abandonUse. */
5
5
  readonly create: typeof createAccessLinks;
6
+ /**
7
+ * A self-hosted person check for `requireChecks`: ALTCHA-format proof-of-work challenges bound to a link code
8
+ * and an expiry, HMAC-signed with `secret` (32 bytes or more, the same in every process). A solution is accepted
9
+ * once across all processes (`access_link_check_spent`, in the `accessLinks` tables) and yields a short-lived
10
+ * signed pass that is the proof for the link's check at `beginUse`. `personCheck.solve(challenge)` solves a
11
+ * challenge in code, for tests.
12
+ *
13
+ * The app writes two public routes: GET returns `check.challenge(code)` for the widget (`challengeurl`, or
14
+ * `challengejson`); POST gives `check.verify(code, payload)` the widget's payload and returns the pass, or refuses
15
+ * when it is `null`. The page carries the ALTCHA widget (MIT; serve its script yourself, no third party sees the
16
+ * visitor), which solves in the background and falls back to a keyboard and screen-reader checkbox. pipework
17
+ * does not ship the widget.
18
+ *
19
+ * ```ts
20
+ * const person = accessLinks.personCheck({ secret: config.linkSecret })
21
+ * const links = accessLinks.create({ permissions: ['view'], checks: { person: person.check } })
22
+ * await links.link({ target, permissions: ['view'], requireChecks: ['person'] })
23
+ * // public route: begin with the pass the visitor got from POST
24
+ * await links.beginUse(code, { kind: 'view', proof: { person: pass } })
25
+ * ```
26
+ */
27
+ readonly personCheck: ((config: import("./person-check.js").PersonCheckConfig) => import("./person-check.js").PersonCheck) & {
28
+ solve: (c: import("./person-check.js").PersonChallenge) => string;
29
+ };
6
30
  };
7
31
  //# sourceMappingURL=namespace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"namespace.d.ts","sourceRoot":"","sources":["../../../src/infra/access-links/namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/C,oFAAoF;AACpF,eAAO,MAAM,WAAW;IACtB,6HAA6H;;CAErH,CAAA"}
1
+ {"version":3,"file":"namespace.d.ts","sourceRoot":"","sources":["../../../src/infra/access-links/namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAG/C,oFAAoF;AACpF,eAAO,MAAM,WAAW;IACtB,6HAA6H;;IAE7H;;;;;;;;;;;;;;;;;;;;OAoBG;;;;CAEK,CAAA"}
@@ -1,7 +1,30 @@
1
1
  import { createAccessLinks } from './handle.js';
2
+ import { personCheck } from './person-check.js';
2
3
  /** Access links namespace — short revocable bearer links to a tenant's resource. */
3
4
  export const accessLinks = {
4
5
  /** Creates an access-link handle: tenant-scoped management plus the public resolve / beginUse / completeUse / abandonUse. */
5
6
  create: createAccessLinks,
7
+ /**
8
+ * A self-hosted person check for `requireChecks`: ALTCHA-format proof-of-work challenges bound to a link code
9
+ * and an expiry, HMAC-signed with `secret` (32 bytes or more, the same in every process). A solution is accepted
10
+ * once across all processes (`access_link_check_spent`, in the `accessLinks` tables) and yields a short-lived
11
+ * signed pass that is the proof for the link's check at `beginUse`. `personCheck.solve(challenge)` solves a
12
+ * challenge in code, for tests.
13
+ *
14
+ * The app writes two public routes: GET returns `check.challenge(code)` for the widget (`challengeurl`, or
15
+ * `challengejson`); POST gives `check.verify(code, payload)` the widget's payload and returns the pass, or refuses
16
+ * when it is `null`. The page carries the ALTCHA widget (MIT; serve its script yourself, no third party sees the
17
+ * visitor), which solves in the background and falls back to a keyboard and screen-reader checkbox. pipework
18
+ * does not ship the widget.
19
+ *
20
+ * ```ts
21
+ * const person = accessLinks.personCheck({ secret: config.linkSecret })
22
+ * const links = accessLinks.create({ permissions: ['view'], checks: { person: person.check } })
23
+ * await links.link({ target, permissions: ['view'], requireChecks: ['person'] })
24
+ * // public route: begin with the pass the visitor got from POST
25
+ * await links.beginUse(code, { kind: 'view', proof: { person: pass } })
26
+ * ```
27
+ */
28
+ personCheck,
6
29
  };
7
30
  //# sourceMappingURL=namespace.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"namespace.js","sourceRoot":"","sources":["../../../src/infra/access-links/namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/C,oFAAoF;AACpF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,6HAA6H;IAC7H,MAAM,EAAE,iBAAiB;CACjB,CAAA"}
1
+ {"version":3,"file":"namespace.js","sourceRoot":"","sources":["../../../src/infra/access-links/namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,oFAAoF;AACpF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,6HAA6H;IAC7H,MAAM,EAAE,iBAAiB;IACzB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW;CACH,CAAA"}
@@ -0,0 +1,45 @@
1
+ import type { AccessLinkCheck } from './handle.js';
2
+ /** A proof-of-work challenge in the shape the ALTCHA widget takes. */
3
+ export interface PersonChallenge {
4
+ readonly algorithm: 'SHA-256';
5
+ readonly challenge: string;
6
+ readonly maxnumber: number;
7
+ readonly salt: string;
8
+ readonly signature: string;
9
+ }
10
+ export interface PersonCheckConfig {
11
+ /** Signs challenges and passes; 32 bytes or more, the same in every process. */
12
+ readonly secret: string | Buffer;
13
+ /** The largest number the browser may have to try; the work is half this on average. Default 100_000; 1 to 10_000_000. */
14
+ readonly maxNumber?: number;
15
+ /** How long a challenge can be solved for. Default 10 minutes. */
16
+ readonly challengeMs?: number;
17
+ /** How long a pass is good for. Default 30 minutes. */
18
+ readonly passMs?: number;
19
+ /** Database holding `access_link_check_spent`; default the default database. */
20
+ readonly database?: string;
21
+ }
22
+ export interface PersonPass {
23
+ readonly pass: string;
24
+ readonly expiresAt: Date;
25
+ }
26
+ export interface PersonCheck {
27
+ /** A challenge for one link's code, for the widget. */
28
+ challenge(code: string): PersonChallenge;
29
+ /**
30
+ * Accepts a widget solution (its base64 payload) for `code` once, across processes, and returns a pass;
31
+ * `null` for anything else: malformed, tampered, expired, for another link, or already spent. Never throws on bad input.
32
+ * Needs a Flow (it records the spent solution through `pipe.system()`).
33
+ */
34
+ verify(code: string, solution: unknown): Promise<PersonPass | null>;
35
+ /** The `AccessLinkCheck` to register under a name in `accessLinks.create({ checks })`: the proof is a pass issued for this link. */
36
+ readonly check: AccessLinkCheck;
37
+ }
38
+ declare function createPersonCheck(config: PersonCheckConfig): PersonCheck;
39
+ /** Solves a challenge the way the widget does and returns its base64 payload. For tests: it does the work the browser would. */
40
+ declare function solvePersonChallenge(c: PersonChallenge): string;
41
+ export declare const personCheck: typeof createPersonCheck & {
42
+ solve: typeof solvePersonChallenge;
43
+ };
44
+ export {};
45
+ //# sourceMappingURL=person-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"person-check.d.ts","sourceRoot":"","sources":["../../../src/infra/access-links/person-check.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAOlD,sEAAsE;AACtE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CA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