@indorania/contracts 0.1.0 → 0.1.1-alpha.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 (40) hide show
  1. package/README.md +196 -117
  2. package/dist/common.d.ts +2 -0
  3. package/dist/common.d.ts.map +1 -1
  4. package/dist/common.js +2 -0
  5. package/dist/common.js.map +1 -1
  6. package/dist/document.js +14 -14
  7. package/dist/op.d.ts +5 -0
  8. package/dist/op.d.ts.map +1 -1
  9. package/dist/op.js +11 -1
  10. package/dist/op.js.map +1 -1
  11. package/dist/routes/asks.d.ts +67 -0
  12. package/dist/routes/asks.d.ts.map +1 -1
  13. package/dist/routes/asks.js +93 -5
  14. package/dist/routes/asks.js.map +1 -1
  15. package/dist/routes/integration.d.ts +2 -0
  16. package/dist/routes/integration.d.ts.map +1 -1
  17. package/dist/routes/integration.js +8 -7
  18. package/dist/routes/integration.js.map +1 -1
  19. package/dist/routes/presentations.d.ts +18 -0
  20. package/dist/routes/presentations.d.ts.map +1 -1
  21. package/dist/routes/presentations.js +16 -4
  22. package/dist/routes/presentations.js.map +1 -1
  23. package/dist/routes/sessions.d.ts +37 -0
  24. package/dist/routes/sessions.d.ts.map +1 -1
  25. package/dist/routes/sessions.js +45 -10
  26. package/dist/routes/sessions.js.map +1 -1
  27. package/dist/routes/standing.d.ts.map +1 -1
  28. package/dist/routes/standing.js +6 -4
  29. package/dist/routes/standing.js.map +1 -1
  30. package/dist/routes/thank-yous.d.ts +4 -0
  31. package/dist/routes/thank-yous.d.ts.map +1 -1
  32. package/dist/routes/thank-yous.js +37 -7
  33. package/dist/routes/thank-yous.js.map +1 -1
  34. package/dist/versions.d.ts +12 -4
  35. package/dist/versions.d.ts.map +1 -1
  36. package/dist/versions.js +12 -4
  37. package/dist/versions.js.map +1 -1
  38. package/openapi/2026-09-25.json +781 -43
  39. package/openapi/versions.json +1 -1
  40. package/package.json +7 -3
package/README.md CHANGED
@@ -1,117 +1,196 @@
1
- # @indorania/contracts
2
-
3
- The platform contract — every route, schema, error, dated version and webhook that a member or an outside issuer builds against (ECOSYSTEM decision 47, PLATFORM-SESSIONS PL-4). **One contract:** a member integrates exactly as a stranger would.
4
-
5
- **Status:** version 0.1.0, the package's first version. API version `2026-09-25` is still labelled **preview** in its document (`x-indorania-version-status`). By the founder's rule of 2026-09-25 (see **Versions**), publishing this package is that version's first release, so treat it as released — changes by addition only — even though the label has not yet been changed to `released`. 55 operations and 2 webhooks are wired in `apps/api`. **27 are built** (PL-7, 2026-09-26): the version list and the documents, accounts and organisations, houses, seats, entitlements, capabilities and sections, the integration's own side, the encrypted backup, the trust list and the webhook keys, and the guest countersign. The other 28 answer `501 not_built` and name, as `x-indorania-pending`, the session that builds them: PL-8. PL-7 added five operations to the preview — `createIntegration` and the guest's own four (`openGuestLink`, `submitGuestAcceptance`, `getGuestPage`, `getCeremonyModule`) — and `did`, `review` and `clientId` to three shapes; a preview may be corrected in place, and the pinned hash moved with it.
6
-
7
- ## What is here
8
-
9
- | Path | What |
10
- |---|---|
11
- | `openapi/2026-09-25.json` | The generated OpenAPI 3.1 document, committed. **This is the contract.** |
12
- | `openapi/versions.json` | Every version: its status, and the SHA-256 of its document's exact bytes |
13
- | `src/routes/*.ts` | The Zod schemas and operations, one file per resource. The source of the document |
14
- | `src/versions.ts` | The dated-version registry and the version-change layer |
15
- | `src/constitution/` | The lints, as checks over an OpenAPI document or a table model (`@indorania/contracts/constitution`) |
16
- | `src/webhooks.ts` | The reference signer and verifier for webhooks (`@indorania/contracts/webhooks`) |
17
- | `node/` | A Node resolve hook for a defect in the published kernel — see **The kernel** below |
18
-
19
- ```sh
20
- pnpm --filter @indorania/contracts build # emit dist/, regenerate openapi/
21
- pnpm --filter @indorania/contracts check # the committed documents equal the schemas
22
- pnpm --filter @indorania/contracts lint # the constitution, over every committed document
23
- pnpm --filter @indorania/contracts test
24
- ```
25
-
26
- ## Using it: install the package, or vendor the document
27
-
28
- Install `@indorania/contracts` from npm, or **vendor the OpenAPI file, pinned by version and hash** — the file is `openapi/<version>.json` in this package. Never path-link it (ECOSYSTEM d10, d19):
29
-
30
- 1. Copy `openapi/<version>.json` into your repository, byte for byte, with LF line endings. In `.gitattributes`: `<path> text eol=lf`.
31
- 2. Record the version and the `sha256` from `openapi/versions.json`.
32
- 3. In your CI, recompute the file's SHA-256 and fail if it differs.
33
-
34
- A preview's hash changes whenever it is corrected. A released version's hash changes only when something is added to it.
35
-
36
- ## Versions
37
-
38
- - **Where the version lives.** The URL carries the major version (`/v1`). Every request speaks a dated version: send `Indorania-Version: YYYY-MM-DD`, or your organisation's or integration's pinned version applies. With neither, the request is refused (`400 version_required`). Webhooks reach you in your pinned version.
39
- - **Preview.** A version is a preview until its first release, when the founder publishes this package or a member first vendors the document (founder decision, 2026-09-25). Until then it may still be corrected in place.
40
- - **Released.** Inside a released version, changes are additive only: new operations, new optional fields, new enum values, new problem codes. Treat anything unknown gracefully. Any other change is a new dated version. Its `VersionChange` translates requests up and responses and webhooks down, so a pinned caller never sees it.
41
- - **Not built yet:** an automated additive-only check, and the change of `2026-09-25`'s label from `preview` to `released`.
42
- - **Exempt from dated versions:**
43
- - the OpenID4VCI and OpenID4VP endpoints — their standards version them, and a stranger's wallet never sends our header
44
- - documents that describe themselves: the trust list, the webhook keys, the version list, and these documents
45
-
46
- ## Errors
47
-
48
- Errors are RFC 9457 problem details, served as `application/problem+json`:
49
- - `type` is `https://kashscript.com/indorania/problems/<code>`. It is an identifier and is never fetched.
50
- - `code` is stable and machine-readable.
51
- - `errors[]` carries `{path, message, rule}`. `rule` names a published rule when one is broken — for example an ask's `R8-no-improvement-item` or `FORBIDDEN-NEED`, or a house's `OPEN-DOOR`.
52
-
53
- ## Idempotency
54
-
55
- Every change made through this API carries an `Idempotency-Key`: IETF draft-07, a quoted string, and the bare form is also accepted. A UUID is right. Keys are kept 24 hours:
56
-
57
- | When | Answer |
58
- |---|---|
59
- | no key | 400 `idempotency_key_required` |
60
- | the same key and body again | the first answer again |
61
- | the same key with another body | 422 `idempotency_key_reused` |
62
- | the same key while the first request still runs | 409 `idempotency_in_progress` |
63
-
64
- Standard-protocol endpoints rely on their own single-use code or nonce, and webhooks rely on `webhook-id`. Every mutation declares which, as `x-indorania-idempotency`. **The requirement is enforced, and storage and replay are built (PL-7):** a change's key is kept 24 hours under a hash of its caller, so nothing that names the caller is stored.
65
-
66
- ## Webhooks, both directions
67
-
68
- Standard Webhooks 1.0.0, scheme `v1a` (Ed25519):
69
- - **Signing.** The signature covers `webhook-id.webhook-timestamp.body`, over the body's exact bytes. It has a 300-second tolerance. The payload is `{type, timestamp, data}`.
70
- - **Keys.** Indorania signs with the keys at `GET /v1/webhook-keys`, a JWKS. An integration signs its deliveries — `POST /v1/integration/predicate-answers` — with a key it registered.
71
- - **Rotation.** During a rotation a message carries one signature per key, and any one valid signature is enough.
72
-
73
- `@indorania/contracts/webhooks` has the reference `signWebhook` and `verifyWebhook`, with a fixed test vector (`test/webhooks.test.ts`).
74
-
75
- ## Who calls
76
-
77
- | Scheme | Who | How |
78
- |---|---|---|
79
- | `seat` | a staff login, acting through a seat in an organisation | an OIDC access token: authorization code with PKCE, after a passkey sign-in (ADR-0002) |
80
- | `integration` | a member's or an outside issuer's system | client-credentials bearer, via a `private_key_jwt` assertion (RFC 7523) |
81
- | `personAccount` | a person's optional account | a passkey, and the bearer session token it gives; reaches `/v1/backup` only (ADR-0001, ADR-0002) |
82
- | `relationshipProof` | a person's wallet, with no account | a DPoP proof (RFC 9449) signed by the relationship key |
83
- | `webhookSignature` | a webhook, either way | Standard Webhooks `v1a` |
84
- | none | the ask library, the trust list, standing rules, an invitation (by its join secret), OID4VCI and OID4VP | public |
85
-
86
- ## What the contract never does
87
-
88
- These are checked by `pnpm lint`, which runs in CI, over every committed document and over `@indorania/db`'s tables. Each rule has a test that plants a violation and expects it caught.
89
-
90
- - no origin, ethnicity, sect, caste or descent field (d36)
91
- - nothing joins a person across relationships. Person-side identifiers are one component, `RelationshipId` (a `did:kash` relationship key), one at a time and never listed (d41, d47(g))
92
- - nothing lists a house's members, or the houses a person is in (d47(c)). Staff are **seats**, and a house's members are never modelled
93
- - only allowlisted reads return lists, and none is searched or filtered (d41)
94
- - entitlements carry capacity, never a meter (d50)
95
- - a decline has no endpoint, state or field (d49(a))
96
- - no member is named in structure. Members appear as the capabilities `visits` · `money` · `work` (edge 7)
97
- - no score, rank, percentage or balance, and nothing on a thank-you adds up
98
- - no private key, secret or seed in any field
99
-
100
- ## Decisions this contract makes
101
-
102
- - **The handoff registration registers an issuer, never an offer.** An issuer registers its OpenID4VCI credential issuer, what it issues, and its signing keys. Wallets redeem offers at the issuer's own host, so no third party learns a relationship key (holder contract §1).
103
- - **Answers take one of two paths:**
104
- - A person answers in their wallet, over OpenID4VP, to a presentation request.
105
- - An organisation answers from its own book: the platform calls the predicate-answer webhook of the integration running that book.
106
- Only a *yes* reaches a verifier.
107
- - **A person's account is one encrypted blob** that binds nothing (ADR-0001, `docs/adr/`).
108
-
109
- ## The kernel
110
-
111
- The ask schema is built from `@kashscript/attest@0.2.0-alpha.1`'s exported constants, and a publish is checked by attest's own `validateAsk`. Session profiles, the receipt format and the trust-list type come from attest too. That package's tarball ships no `specs/` and no `ask.schema.json`, so its constants are the one published source.
112
-
113
- **A defect, verified 2026-09-25:** attest (0.1.8 and 0.2.0-alpha.1) and identity-core (0.3.1) ship ES modules whose relative imports have no extension. Their `.d.ts` files do too.
114
- - **Runtime.** Plain Node cannot load them. Anything here that runs under Node loads `node/register.mjs` first (`node --import @indorania/contracts/node/register …`), which retries those imports with `.js`, for `@kashscript/*` packages only.
115
- - **Types.** This package typechecks with `moduleResolution: "Bundler"`, because `NodeNext` sees no exports.
116
-
117
- Delete the hook when KashScript republishes with `.js` specifiers.
1
+ # @indorania/contracts
2
+
3
+ The platform contract — every route, schema, error, dated version and webhook that a member or an outside issuer builds against (ECOSYSTEM decision 47, PLATFORM-SESSIONS PL-4). **One contract:** a member integrates exactly as a stranger would.
4
+
5
+ **Status (2026-09-27):** **0.1.0 is on npm** as `latest` (published 2026-09-26; 55 operations). The source here is **0.1.1-alpha.0, unpublished** — PL-8's additions, 60 operations, which the founder publishes under the `alpha` tag. API version `2026-09-25` is **preview** (`x-indorania-version-status`) and stays preview until Milestone A — see **When 2026-09-25 becomes released**; until then the practice is **changes by addition only**. **60 operations and 2 webhooks are wired in `apps/api`, and all 60 are built**; none answers `501 not_built`, and `x-indorania-pending` is null everywhere.
6
+ - PL-7 (in place, while it was a preview) built 27 and added five operations and three shapes' fields.
7
+ - PL-8 (2026-09-26, by addition only) built the other 33 — asks, presentation requests, standing, sessions, thank-yous, OpenID4VCI and the integration's webhooks — and added five operations: `getAskAnswer`, `reportExcessiveAsk`, `getAskReports`, `withdrawThankYou`, `getStatusList` (public, exempt from dated versions, because its URL lives inside credentials). New optional fields: `SessionOpen.signer` and `.role`, `SessionTerms.role`, `PresentationRequestCreate.role` and `.expiresInSec`, `PresentationResult.predicates[].status`, `PredicateAnswerResult.need`; and an optional `Indorania-Organisation` header on seat operations whose path names no organisation. `needs` stays; nothing was removed or renamed.
8
+
9
+ ## What is here
10
+
11
+ | Path | What |
12
+ |---|---|
13
+ | `openapi/2026-09-25.json` | The generated OpenAPI 3.1 document, committed. **This is the contract.** |
14
+ | `openapi/versions.json` | Every version: its status, and the SHA-256 of its document's exact bytes |
15
+ | `src/routes/*.ts` | The Zod schemas and operations, one file per resource. The source of the document |
16
+ | `src/versions.ts` | The dated-version registry and the version-change layer |
17
+ | `src/constitution/` | The lints, as checks over an OpenAPI document or a table model (`@indorania/contracts/constitution`) |
18
+ | `src/webhooks.ts` | The reference signer and verifier for webhooks (`@indorania/contracts/webhooks`) |
19
+ | `node/` | A Node resolve hook for a defect in the published kernel — see **The kernel** below. It ships, and plain-Node members need it |
20
+ | `smoke/` | Not published. The smoke that `pnpm pack:check contracts --clean-room` runs against the packed tarball, in a folder outside every repository |
21
+
22
+ ```sh
23
+ pnpm --filter @indorania/contracts build # emit dist/, regenerate openapi/
24
+ pnpm --filter @indorania/contracts check # the committed documents equal the schemas
25
+ pnpm --filter @indorania/contracts lint # the constitution, over every committed document
26
+ pnpm --filter @indorania/contracts test
27
+ pnpm pack:check contracts --clean-room # from the repo root: what would ship, then a stranger's install and smoke
28
+ ```
29
+
30
+ ## Using it: install the package, or vendor the document
31
+
32
+ Install `@indorania/contracts` from npm, or **vendor the OpenAPI file, pinned by version and hash** — the file is `openapi/<version>.json` in this package. Never path-link it (ECOSYSTEM d10, d19):
33
+
34
+ 1. Copy `openapi/<version>.json` into your repository, byte for byte, with LF line endings. In `.gitattributes`: `<path> text eol=lf`.
35
+ 2. Record the version and the `sha256` from `openapi/versions.json`.
36
+ 3. In your CI, recompute the file's SHA-256 and fail if it differs.
37
+
38
+ A preview's hash changes whenever it is corrected. A released version's hash changes only when something is added to it.
39
+
40
+ ## Install and pin
41
+
42
+ ```sh
43
+ npm install --save-exact @indorania/contracts@0.1.1-alpha.0 # or: pnpm add -E · bun add -E
44
+ ```
45
+
46
+ - **Pin the exact version, never a range.** A correction to a published version is a new version — npm never lets one be republished — so during the alpha a correction is `0.1.1-alpha.1`, and so on, under the `alpha` tag. See **The two version numbers**.
47
+ - **ES modules only, Node 22 or later.** Verified on Node 22.14 and Bun 1.2.22. **Deno is not verified:** it was not installed where this was checked, so `npm:@indorania/contracts@<version>` has not been tried. If it fails there, copy the types beside the function instead.
48
+ - **On plain Node, load the kernel hook:** `node --import @indorania/contracts/node/register your-file.mjs`. Verified 2026-09-27 on the packed tarball: with it the smoke passes; without it Node stops with `ERR_MODULE_NOT_FOUND`, because `@kashscript/attest` ships ES modules whose relative imports have no extension (see **The kernel**). Bun needs no flag.
49
+ - **zod is a dependency, `^4.6.5`.** A member on zod 4.6.5 or later shares one copy once its package manager dedupes (`pnpm dedupe`, `npm dedupe`). A member on **zod 3** still installs — npm nests a private zod 4 — but cannot compose this package's schemas into its own zod-3 objects: call `.parse` or `.safeParse` on them directly. Importing the package also extends zod's prototype with `.openapi()` (that is what `@asteasolutions/zod-to-openapi` does), on whichever copy it resolves. It is a dependency and not a peer on purpose: a required peer of zod 4 would fail the install of any member still on zod 3. Measured 2026-09-27, installing the packed tarball beside each: zod 3.23.8 at the root → installs, with zod 4.6.5 nested inside this package; zod 4.6.5 → one copy; zod 4.3.0 → installs, with 4.6.5 nested (two copies); the smoke passed in all three.
50
+ - **Expect a second copy of `@kashscript/attest`.** This package pins `0.2.0-alpha.1` exactly; a member on attest 0.1.x has both.
51
+ - **TypeScript.** The packed types compile under `moduleResolution: "bundler"` and `"nodenext"` — measured 2026-09-27 with TypeScript 5.9.3, with `skipLibCheck` on and off (Bundler and NodeNext both), with `types: []` and `lib: ["ES2022", "DOM"]`. The declaration files import their siblings with a `.ts` extension (`"./op.ts"`); recent TypeScript resolves that to the sibling `.d.ts`, and an older one may not — not measured.
52
+ - **Webhook keys are not in the package.** See **Webhooks, both directions**.
53
+
54
+ ## The two version numbers
55
+
56
+ A package has two numbers, and they move independently. **The package's semver** (`0.1.1-alpha.0`) says what is in the tarball. **The API's dated version** (`2026-09-25`) says which contract a caller speaks — the `Indorania-Version` header — and changes only when a change could be noticed by a caller pinned to an older one.
57
+
58
+ | Package | npm tag | API dated version | Its document | SHA-256 of `openapi/2026-09-25.json` | What it holds |
59
+ |---|---|---|---|---|---|
60
+ | `0.1.0` | `latest` | `2026-09-25` | `preview` | `e881701fcc4eaf8c58b47f942a31954375fefe79fdc7947f905b140075c73d5c` | 55 operations, 2 webhooks: the contract as published on 2026-09-26. **Read from the published tarball**, not from the source |
61
+ | `0.1.1-alpha.0` | `alpha`, once published | `2026-09-25` | `preview` | `febb702050e787b86e83ba4b8554a06a6c2f7b2ec4bbee768ecba47ac5d37a78` | 60 operations, 2 webhooks: PL-8's additions, by addition only (see **Status**). Unpublished |
62
+
63
+ A row's hash is the SHA-256 of the document's exact bytes — the value `openapi/versions.json` holds inside that same package. **The document changed between the rows because PL-8 added to it, and both are `2026-09-25`.** That is why the package number moves and the dated number does not.
64
+
65
+ The rule:
66
+
67
+ - **An additive change inside a dated version** — a new operation, a new optional field, a new enum value, a new problem code — is a **patch** bump (`0.1.0` → `0.1.1`).
68
+ - **A new dated version** — any change that is not additive, with its `VersionChange` — is a **minor** bump (`0.1.x` → `0.2.0`). While the package is `0.x`, a minor bump is the one that may break code compiled against the schemas, because the exported schemas describe the latest dated version.
69
+ - A change that touches only the package — a fix in the reference signer, this README — is a patch bump too.
70
+ - **Members pin the exact package version** (`--save-exact`), so a change reaches them when they choose it.
71
+
72
+ ## When 2026-09-25 becomes released
73
+
74
+ **Decision, 2026-09-27: hold at `preview` until Milestone A.**
75
+
76
+ - PL-8's additions ship as an **alpha**, under the `alpha` tag. Members pin that exact version.
77
+ - `2026-09-25` is flipped to `released` — and `latest` moves off `0.1.0` — only after **the simulation passes with the real members**, who will by then have exercised the contract, **and `@kashscript/attest` 0.2.0 is stable**. This package pins attest `0.2.0-alpha.1` exactly, so a `latest` release would drag a prerelease into every member.
78
+ - Until then the practice is **additions only**, which PL-8 already followed. The difference from `released` is that the label allows a correction in place, and only if the founder decides to make one.
79
+ - **What this supersedes.** The rule of 2026-09-25 said a version is released when the founder publishes this package or a member first vendors its document. `0.1.0` was published on 2026-09-26, so by that rule `2026-09-25` was already released. The decision above amends the rule: publishing `0.1.0` is treated as an early package publish and not as the API's release.
80
+ - **What this does not undo.** `0.1.0` is on `latest`, and it pins attest `0.2.0-alpha.1` exactly, so a plain `npm install @indorania/contracts` already installs a prerelease of the kernel. A new version cannot change that. Install the exact alpha you mean to use.
81
+ - **Not built yet:** an automated additive-only check. Until it exists, "additions only" is kept by review.
82
+
83
+ ## Versions
84
+
85
+ - **Where the version lives.** The URL carries the major version (`/v1`). Every request speaks a dated version: send `Indorania-Version: YYYY-MM-DD`, or your organisation's or integration's pinned version applies. With neither, the request is refused (`400 version_required`). Webhooks reach you in your pinned version.
86
+ - **Preview.** A version is a preview until the founder releases it, which waits for Milestone A — **When 2026-09-25 becomes released**, decision 2026-09-27. Until then it may still be corrected in place, though the practice is additions only. *(Superseded 2026-09-27: the rule of 2026-09-25, that publishing this package or a member's first vendoring released a version.)*
87
+ - **Released.** Inside a released version, changes are additive only: new operations, new optional fields, new enum values, new problem codes. Treat anything unknown gracefully. Any other change is a new dated version. Its `VersionChange` translates requests up and responses and webhooks down, so a pinned caller never sees it.
88
+ - **Not built yet:** an automated additive-only check, and the change of `2026-09-25`'s label from `preview` to `released`.
89
+ - **Exempt from dated versions:**
90
+ - the OpenID4VCI and OpenID4VP endpoints — their standards version them, and a stranger's wallet never sends our header
91
+ - documents that describe themselves: the trust list, the webhook keys, the version list, and these documents
92
+
93
+ ## Errors
94
+
95
+ Errors are RFC 9457 problem details, served as `application/problem+json`:
96
+ - `type` is `https://kashscript.com/indorania/problems/<code>`. It is an identifier and is never fetched.
97
+ - `code` is stable and machine-readable.
98
+ - `errors[]` carries `{path, message, rule}`. `rule` names a published rule when one is broken — for example an ask's `R8-no-improvement-item` or `FORBIDDEN-NEED`, or a house's `OPEN-DOOR`.
99
+
100
+ ### Version errors: "upgrade" or "bug"?
101
+
102
+ Both are `400`, `application/problem+json`. These are the exact bodies (`instance` is `urn:uuid:` and the request's id):
103
+
104
+ ```json
105
+ {"type":"https://kashscript.com/indorania/problems/version_required","title":"Say which API version you speak","status":400,"code":"version_required","detail":"Send Indorania-Version: YYYY-MM-DD, or pin a version on your organisation and send none.","instance":"urn:uuid:…"}
106
+ {"type":"https://kashscript.com/indorania/problems/version_unknown","title":"That API version does not exist","status":400,"code":"version_unknown","detail":"Known versions: 2026-09-25.","instance":"urn:uuid:…"}
107
+ ```
108
+
109
+ | You see | It means | What to do |
110
+ |---|---|---|
111
+ | `version_required` | The request named no version, and neither your organisation nor your integration has one pinned | **Your bug.** Send `Indorania-Version`, or pin a version |
112
+ | `version_unknown`, and the version you sent is **not** in `GET /v1/versions` | A typo, or that version has left the registry | **Upgrade.** `detail` lists the known versions; so does `GET /v1/versions`. Move your pin to one of them |
113
+ | `version_unknown`, and the version you sent **is** in `GET /v1/versions` | Should never happen | **Ours.** Report it |
114
+
115
+ **There is no "retired" state and no `Sunset` header today.** A version that is retired is simply removed from the registry, and from then on it answers `version_unknown` — the same answer as a typo. Nothing warns a caller beforehand, so a retirement has to be announced outside the API. A retirement signal would be a change to the version registry, which is not built.
116
+
117
+ ## Idempotency
118
+
119
+ Every change made through this API carries an `Idempotency-Key`: IETF draft-07, a quoted string, and the bare form is also accepted. A UUID is right. Keys are kept 24 hours:
120
+
121
+ | When | Answer |
122
+ |---|---|
123
+ | no key | 400 `idempotency_key_required` |
124
+ | the same key and body again | the first answer again |
125
+ | the same key with another body | 422 `idempotency_key_reused` |
126
+ | the same key while the first request still runs | 409 `idempotency_in_progress` |
127
+
128
+ Standard-protocol endpoints rely on their own single-use code or nonce, and webhooks rely on `webhook-id`. Every mutation declares which, as `x-indorania-idempotency`. **The requirement is enforced, and storage and replay are built (PL-7):** a change's key is kept 24 hours under a hash of its caller, so nothing that names the caller is stored.
129
+
130
+ ## Webhooks, both directions
131
+
132
+ Standard Webhooks 1.0.0, scheme `v1a` (Ed25519):
133
+ - **Signing.** The signature covers `webhook-id.webhook-timestamp.body`, over the body's exact bytes. It has a 300-second tolerance. The payload is `{type, timestamp, data}`.
134
+ - **Keys.** Indorania signs with the keys at `GET /v1/webhook-keys`, a JWKS. An integration signs its deliveries — `POST /v1/integration/predicate-answers` — with a key it registered.
135
+ - **Rotation.** During a rotation a message carries one signature per key, and any one valid signature is enough.
136
+
137
+ **The keys are not in this package.** Fetch them, so a rotation reaches you without a new release:
138
+
139
+ 1. `GET /v1/webhook-keys` — public, and exempt from dated versions. It answers a JWKS of Ed25519 public keys, `{"keys":[{"kty":"OKP","crv":"Ed25519","x":"…","kid":"…"}]}`.
140
+ 2. Import each with `importVerifyKey` and keep them in memory, by `kid`.
141
+ 3. Verify with `verifyWebhook({ headers, body, keys })`. Pass the **raw body text exactly as received** — never a re-serialised parse — and the three `webhook-*` headers. The tolerance is 300 seconds.
142
+ 4. If a message verifies under none of your keys, fetch the list **once**, replace your cache, and try again. Do not fetch on every message. A rotation lists two keys for a while, and each message carries a signature per key.
143
+ 5. Process each `webhook-id` once: it is the idempotency key.
144
+
145
+ `@indorania/contracts/webhooks` has the reference `signWebhook` and `verifyWebhook`, with a fixed test vector (`test/webhooks.test.ts`).
146
+
147
+ ## Who calls
148
+
149
+ | Scheme | Who | How |
150
+ |---|---|---|
151
+ | `seat` | a staff login, acting through a seat in an organisation | an OIDC access token: authorization code with PKCE, after a passkey sign-in (ADR-0002) |
152
+ | `integration` | a member's or an outside issuer's system | client-credentials bearer, via a `private_key_jwt` assertion (RFC 7523) |
153
+ | `personAccount` | a person's optional account | a passkey, and the bearer session token it gives; reaches `/v1/backup` only (ADR-0001, ADR-0002) |
154
+ | `relationshipProof` | a person's wallet, with no account | a DPoP proof (RFC 9449, EdDSA) signed by the relationship key: `htm` and `htu` match, `iat` within 60 s, each `jti` once. Never logged. Consent to a session and a request for standing use it |
155
+ | `webhookSignature` | a webhook, either way | Standard Webhooks `v1a` |
156
+ | none | the ask library, the trust list, standing rules, an invitation (by its join secret), OID4VCI and OID4VP | public |
157
+
158
+ ## What the contract never does
159
+
160
+ These are checked by `pnpm lint`, which runs in CI, over every committed document and over `@indorania/db`'s tables. Each rule has a test that plants a violation and expects it caught.
161
+
162
+ - no origin, ethnicity, sect, caste or descent field (d36)
163
+ - nothing joins a person across relationships. Person-side identifiers are one component, `RelationshipId` (a `did:kash` relationship key), one at a time and never listed (d41, d47(g))
164
+ - nothing lists a house's members, or the houses a person is in (d47(c)). Staff are **seats**, and a house's members are never modelled
165
+ - only allowlisted reads return lists, and none is searched or filtered (d41)
166
+ - entitlements carry capacity, never a meter (d50)
167
+ - a decline has no endpoint, state or field (d49(a))
168
+ - no member is named in structure. Members appear as the capabilities `visits` · `money` · `work` (edge 7)
169
+ - no score, rank, percentage or balance, and nothing on a thank-you adds up
170
+ - no private key, secret or seed in any field
171
+
172
+ ## Decisions this contract makes
173
+
174
+ - **The handoff registration registers an issuer, never an offer.** An issuer registers its OpenID4VCI credential issuer, what it issues, and its signing keys. Wallets redeem offers at the issuer's own host, so no third party learns a relationship key (holder contract §1).
175
+ - **Answers take one of two paths:**
176
+ - A person answers in their wallet, over OpenID4VP, to a presentation request.
177
+ - An organisation answers from its own book: the platform calls the predicate-answer webhook of the integration running that book.
178
+ Only a *yes* reaches a verifier, and it is read by answer id (`getAskAnswer`), never by list.
179
+ - **A standing item is the registered predicate credential**, its rule `standing:<slug>`, signed by the platform's standing key and named on its trust list for that type; no new type is registered (ADR-0004).
180
+ - **A session's establishment side is signed only by a signer the organisation's own integration registered** (`SessionOpen.signer`); the platform holds no key that can sign a line (ADR-0004).
181
+ - **A thank-you's role** (`venue | payer | employer | client | third-party`) is the giver's own statement, shown to the person; payer, employer, client and an unstated role are refused (d49 power × sight).
182
+ - **A person's account is one encrypted blob** that binds nothing (ADR-0001, `docs/adr/`).
183
+
184
+ ## The kernel
185
+
186
+ The ask schema is built from `@kashscript/attest@0.2.0-alpha.1`'s exported constants, and a publish is checked by attest's own `validateAsk`. Session profiles, the receipt format and the trust-list type come from attest too. That package's tarball ships no `specs/` and no `ask.schema.json`, so its constants are the one published source.
187
+
188
+ **A defect, verified 2026-09-25:** attest (0.1.8 and 0.2.0-alpha.1) and identity-core (0.3.1) ship ES modules whose relative imports have no extension. Their `.d.ts` files do too.
189
+ - **Runtime.** Plain Node cannot load them. Anything here that runs under Node loads `node/register.mjs` first (`node --import @indorania/contracts/node/register …`), which retries those imports with `.js`, for `@kashscript/*` packages only.
190
+ - **Types.** This package typechecks with `moduleResolution: "Bundler"`, because `NodeNext` sees no exports.
191
+
192
+ Delete the hook when KashScript republishes with `.js` specifiers.
193
+
194
+ **Measured on the packed tarball, 2026-09-27** (`pnpm pack:check contracts --clean-room`, in a folder outside every repository, with no npm login):
195
+ - **Runtime.** Plain Node needs the hook (without it: `ERR_MODULE_NOT_FOUND`); Bun does not. The check prints a note if the run without the hook ever passes — that is the signal to delete the hook and take `node/` out of `files`.
196
+ - **Types.** The smoke's ten-line file compiles clean under Bundler and under NodeNext, with `skipLibCheck` on and off. The note above about NodeNext concerns this workspace's own typecheck, which resolves the kernel's declarations in place; the packed types did not hit it on the entry points the smoke touches. Other entry points were not measured.
package/dist/common.d.ts CHANGED
@@ -13,6 +13,7 @@ export declare const ID_PREFIXES: {
13
13
  readonly answer: "ans";
14
14
  readonly thankYou: "ty";
15
15
  readonly book: "book";
16
+ readonly statusList: "sl";
16
17
  };
17
18
  export type IdPrefix = (typeof ID_PREFIXES)[keyof typeof ID_PREFIXES];
18
19
  export declare function newId(prefix: IdPrefix): string;
@@ -24,6 +25,7 @@ export declare const SessionId: z.ZodString;
24
25
  export declare const PresentationRequestId: z.ZodString;
25
26
  export declare const AnswerId: z.ZodString;
26
27
  export declare const ThankYouId: z.ZodString;
28
+ export declare const StatusListId: z.ZodString;
27
29
  export declare const BookRef: z.ZodString;
28
30
  /**
29
31
  * The only person-side identifier in this contract (ECOSYSTEM d41, d47(g)). A person is known to
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAQ7B,eAAO,MAAM,WAAW;;;;;;;;;;CAUd,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEtE,wBAAgB,KAAK,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,CAU9C;AASD,eAAO,MAAM,cAAc,aAA6F,CAAC;AACzH,eAAO,MAAM,MAAM,aAAwI,CAAC;AAC5J,eAAO,MAAM,OAAO,aAAyD,CAAC;AAC9E,eAAO,MAAM,aAAa,aAA+I,CAAC;AAC1K,eAAO,MAAM,SAAS,aAAoG,CAAC;AAC3H,eAAO,MAAM,qBAAqB,aAAiH,CAAC;AACpJ,eAAO,MAAM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AG,MAAM,OAAO,QAAQ,CAAC;AAEhD,eAAO,MAAM,aAAa;;;;kBAMf,CAAC;AAEZ,eAAO,MAAM,OAAO;;;;;;;;;;;;iBAahB,CAAC;AAEL,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAC9C,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,wBAAgB,OAAO,CACrB,IAAI,EAAE,WAAW,EACjB,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,aAAa,EAAE,CAAA;CAAO,GAC1E,OAAO,CAWT;AAID,eAAO,MAAM,SAAS;;;kBAKX,CAAC;AAEZ,wBAAgB,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM;;;mBAQ9D"}
package/dist/common.js CHANGED
@@ -17,6 +17,7 @@ export const ID_PREFIXES = {
17
17
  answer: "ans",
18
18
  thankYou: "ty",
19
19
  book: "book",
20
+ statusList: "sl",
20
21
  };
21
22
  export function newId(prefix) {
22
23
  const bytes = crypto.getRandomValues(new Uint8Array(16));
@@ -44,6 +45,7 @@ export const SessionId = idSchema("ses", "SessionId", "One session: one encounte
44
45
  export const PresentationRequestId = idSchema("preq", "PresentationRequestId", "One presentation request, minted for one encounter and used once.");
45
46
  export const AnswerId = idSchema("ans", "AnswerId", "One organisation's answer to an ask, routed to the book that answers it.");
46
47
  export const ThankYouId = idSchema("ty", "ThankYouId", "One thank-you, as its issuer knows it: an offer and a status index, never the person.");
48
+ export const StatusListId = idSchema("sl", "StatusListId", "One issuer's status list: one bit per record it issued, most of them unused, so no index stands out.");
47
49
  export const BookRef = idSchema("book", "BookRef", "An organisation's book at one integration. Pairwise: each integration sees its own reference, so no two integrations can match an organisation by it.");
48
50
  /**
49
51
  * The only person-side identifier in this contract (ECOSYSTEM d41, d47(g)). A person is known to
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAE7B,kGAAkG;AAClG,8FAA8F;AAC9F,qEAAqE;AAErE,MAAM,SAAS,GAAG,kCAAkC,CAAC;AAErD,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,YAAY,EAAE,KAAK;IACnB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,KAAK;IACd,mBAAmB,EAAE,MAAM;IAC3B,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,MAAM;CACJ,CAAC;AAIX,MAAM,UAAU,KAAK,CAAC,MAAgB;IACpC,MAAM,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IACzD,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;QAC1C,IAAI,KAAK,EAAE,CAAC;IACd,CAAC;IACD,OAAO,GAAG,MAAM,IAAI,GAAG,EAAE,CAAC;AAC5B,CAAC;AAED,SAAS,QAAQ,CAAC,MAAgB,EAAE,EAAU,EAAE,WAAmB;IACjE,OAAO,CAAC;SAC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AAC,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAChG,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;CAChH,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,UAAU,MAAM,CAAsB,IAAO,EAAE,EAAU;IAC7D,OAAO,CAAC;SACL,MAAM,CAAC;QACN,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;QACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,yDAAyD,EAAE,CAAC;KAC7G,CAAC;SACD,MAAM,EAAE;SACR,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAClB,CAAC"}
package/dist/document.js CHANGED
@@ -68,20 +68,20 @@ const SECURITY_SCHEMES = {
68
68
  description: "The access token /v1/issuance/token returned for a pre-authorized code (OpenID4VCI 1.0).",
69
69
  },
70
70
  };
71
- const DESCRIPTION = `The platform contract that every member, and any outside issuer, builds against (ECOSYSTEM decision 47). A member integrates exactly as a stranger would.
72
-
73
- **Versions.** The URL carries the major version (\`/v1\`). Every request speaks a dated version: send \`Indorania-Version: YYYY-MM-DD\`, or your organisation's or integration's pinned version applies; with neither, the request is refused. Inside a released version, changes are additive only — new operations, new optional fields, new enum values, new problem codes — so treat anything unknown gracefully. Any other change is a new dated version, and the platform translates between the two. A version is a **preview** until its first release, and may still change in place.
74
-
75
- **Exempt from dated versions:** the OpenID4VCI and OpenID4VP endpoints, which their standards version, and documents that describe themselves: the trust list, the webhook keys, the version list, and these documents.
76
-
77
- **Errors** are RFC 9457 problem details (\`application/problem+json\`), each with a stable \`code\`.
78
-
79
- **Idempotency.** Every change made through this API carries an \`Idempotency-Key\` (IETF draft-07). Without one it is refused (400). The same key and body get the first answer again for 24 hours; the same key with another body is refused (422); a key still running is refused (409). Protocol endpoints rely on their own single-use code or nonce, and webhooks on \`webhook-id\`.
80
-
81
- **Webhooks,** in both directions: Standard Webhooks 1.0.0, v1a (Ed25519), with a 300-second tolerance.
82
-
83
- **What it never does.** No endpoint lists a house's members, answers "everything matching X", records a decline, meters records, scores a person, or joins a person across relationships: person-side identifiers are relationship identifiers, one at a time. Lints check this document for all of it.
84
-
71
+ const DESCRIPTION = `The platform contract that every member, and any outside issuer, builds against (ECOSYSTEM decision 47). A member integrates exactly as a stranger would.
72
+
73
+ **Versions.** The URL carries the major version (\`/v1\`). Every request speaks a dated version: send \`Indorania-Version: YYYY-MM-DD\`, or your organisation's or integration's pinned version applies; with neither, the request is refused. Inside a released version, changes are additive only — new operations, new optional fields, new enum values, new problem codes — so treat anything unknown gracefully. Any other change is a new dated version, and the platform translates between the two. A version is a **preview** until its first release, and may still change in place.
74
+
75
+ **Exempt from dated versions:** the OpenID4VCI and OpenID4VP endpoints, which their standards version, and documents that describe themselves: the trust list, the webhook keys, issuers' status lists, the version list, and these documents.
76
+
77
+ **Errors** are RFC 9457 problem details (\`application/problem+json\`), each with a stable \`code\`.
78
+
79
+ **Idempotency.** Every change made through this API carries an \`Idempotency-Key\` (IETF draft-07). Without one it is refused (400). The same key and body get the first answer again for 24 hours; the same key with another body is refused (422); a key still running is refused (409). Protocol endpoints rely on their own single-use code or nonce, and webhooks on \`webhook-id\`.
80
+
81
+ **Webhooks,** in both directions: Standard Webhooks 1.0.0, v1a (Ed25519), with a 300-second tolerance.
82
+
83
+ **What it never does.** No endpoint lists a house's members, answers "everything matching X", records a decline, meters records, scores a person, or joins a person across relationships: person-side identifiers are relationship identifiers, one at a time. Lints check this document for all of it.
84
+
85
85
  **Status.** Every operation marked \`x-indorania-pending\` is wired but not built, and answers 501 \`not_built\`. No host serves this API yet, and nothing it serves reaches real society before ECOSYSTEM decision 30's gate.`;
86
86
  export function generateDocument(version = latestVersion()) {
87
87
  const registry = new OpenAPIRegistry();
package/dist/op.d.ts CHANGED
@@ -82,6 +82,11 @@ export interface Operation {
82
82
  export declare const VersionHeader: z.ZodOptional<z.ZodString>;
83
83
  /** IETF draft-ietf-httpapi-idempotency-key-header-07: a quoted Structured-Field string. The bare form is also accepted. */
84
84
  export declare const IdempotencyKeyHeader: z.ZodString;
85
+ /**
86
+ * For a staff login that holds seats in more than one organisation: which one this request acts for.
87
+ * Operations whose path names the organisation (`{orgId}`) take it from the path instead.
88
+ */
89
+ export declare const OrganisationHeader: z.ZodOptional<z.ZodString>;
85
90
  export declare const WebhookHeaders: {
86
91
  readonly "webhook-id": z.ZodString;
87
92
  readonly "webhook-timestamp": z.ZodString;
package/dist/op.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"op.d.ts","sourceRoot":"","sources":["../src/op.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAGlE,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAE7B,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;CAgBP,CAAC;AAEX,MAAM,MAAM,GAAG,GAAG,MAAM,OAAO,IAAI,CAAC;AACpC,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,aAAa,GAAG,eAAe,GAAG,mBAAmB,GAAG,kBAAkB,GAAG,eAAe,CAAC;AAC3H,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAC7C,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,UAAU,GAAG,YAAY,CAAC;AAC5D,MAAM,MAAM,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEjE,KAAK,KAAK,GAAG,kBAAkB,GAAG,m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1
+ import { OrganisationId, Problem } from "./common.js";
2
2
  import { VERSION_PATTERN } from "./versions.js";
3
3
  import { z } from "./zod.js";
4
4
  export const TAGS = {
@@ -34,6 +34,14 @@ export const IdempotencyKeyHeader = z
34
34
  id: "IdempotencyKey",
35
35
  description: "A fresh random value (a UUID) per change. Kept 24 hours: a retry with the same key and body gets the first answer; the same key with another body is refused (422); a key still running is refused (409).",
36
36
  });
37
+ /**
38
+ * For a staff login that holds seats in more than one organisation: which one this request acts for.
39
+ * Operations whose path names the organisation (`{orgId}`) take it from the path instead.
40
+ */
41
+ export const OrganisationHeader = OrganisationId.optional().meta({
42
+ id: "IndoraniaOrganisation",
43
+ description: "Which of your organisations this request acts for. Needed only when your login holds seats in more than one; an integration always acts for its own.",
44
+ });
37
45
  export const WebhookHeaders = {
38
46
  "webhook-id": z.string().min(1).max(255).meta({ id: "WebhookId", description: "Standard Webhooks 1.0.0. Unique per message; it is also the idempotency key." }),
39
47
  "webhook-timestamp": z.string().regex(/^\d{1,12}$/).meta({ id: "WebhookTimestamp", description: "Unix seconds. Refused if more than 300 seconds from the receiver's clock." }),
@@ -62,6 +70,8 @@ export function operation(spec) {
62
70
  headers["idempotency-key"] = IdempotencyKeyHeader;
63
71
  if (spec.idempotency === "webhook-id")
64
72
  Object.assign(headers, WebhookHeaders);
73
+ if (spec.auth.includes("seat") && !spec.path.includes("{orgId}"))
74
+ headers["indorania-organisation"] = OrganisationHeader;
65
75
  Object.assign(headers, spec.headers ?? {});
66
76
  const request = {};
67
77
  if (spec.params)
package/dist/op.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"op.js","sourceRoot":"","sources":["../src/op.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAE7B,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,I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