@ai-matrx/records 0.99.31 → 0.99.32

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 (70) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{client-Dthx26hr.d.ts → client-CrwedBYU.d.ts} +8 -8
  3. package/dist/{client-B7KEs9hi.d.cts → client-D1EwyWfh.d.cts} +8 -8
  4. package/dist/core/index.d.cts +16 -35
  5. package/dist/core/index.d.ts +16 -35
  6. package/dist/data/index.d.cts +11 -11
  7. package/dist/data/index.d.ts +11 -11
  8. package/dist/{declareTable-enQs2N0E.d.cts → declareTable-BIIt0Wqt.d.cts} +3 -3
  9. package/dist/{declareTable-CvBu5dTJ.d.ts → declareTable-CC5rTTIA.d.ts} +3 -3
  10. package/dist/{doors-KbjyhBW-.d.cts → doors-D1yAs0a0.d.cts} +1 -1
  11. package/dist/{doors-C2-sFvAk.d.ts → doors-D2z3kH2i.d.ts} +1 -1
  12. package/dist/entity/index.d.cts +7 -7
  13. package/dist/entity/index.d.ts +7 -7
  14. package/dist/{field-ppX29ddi.d.cts → field-B8loYt-A.d.cts} +1 -1
  15. package/dist/{field-BHlhq24W.d.ts → field-DaE90BZ7.d.ts} +1 -1
  16. package/dist/forms/index.d.cts +3 -3
  17. package/dist/forms/index.d.ts +3 -3
  18. package/dist/index.d.cts +13 -13
  19. package/dist/index.d.ts +13 -13
  20. package/dist/memory/index.d.cts +7 -7
  21. package/dist/memory/index.d.ts +7 -7
  22. package/dist/{objectOrganization-DtR3lWG2.d.ts → objectOrganization-D1ox3gUx.d.ts} +1 -1
  23. package/dist/{objectOrganization-Cu73SBxH.d.cts → objectOrganization-DazBoDAq.d.cts} +1 -1
  24. package/dist/{port-Bk7TG0aE.d.ts → port-D6wepPvr.d.ts} +3 -3
  25. package/dist/{port-rqQEGhew.d.cts → port-O-UdH1HS.d.cts} +3 -3
  26. package/dist/{portal-DmxuUr2f.d.ts → portal-CAssJHRZ.d.ts} +1 -1
  27. package/dist/{portal-ffH13fsE.d.cts → portal-L_mN8l9P.d.cts} +1 -1
  28. package/dist/{ports-BCNNghmf.d.ts → ports-CmmvR8OI.d.ts} +2 -2
  29. package/dist/{ports-iATV-A2v.d.cts → ports-alv3bgKY.d.cts} +2 -2
  30. package/dist/questions/index.d.cts +9 -9
  31. package/dist/questions/index.d.ts +9 -9
  32. package/dist/realtime/index.d.cts +3 -3
  33. package/dist/realtime/index.d.ts +3 -3
  34. package/dist/{record-C8q21jjB.d.cts → record-CTgSgWe3.d.cts} +1 -1
  35. package/dist/{record-C8q21jjB.d.ts → record-CTgSgWe3.d.ts} +1 -1
  36. package/dist/{relation-Bwp8iuei.d.cts → relation-BjjjXyqn.d.cts} +2 -2
  37. package/dist/{relation-Bsjwkn6N.d.ts → relation-T4biacnz.d.ts} +2 -2
  38. package/dist/results/index.cjs +245 -0
  39. package/dist/results/index.cjs.map +1 -0
  40. package/dist/results/index.d.cts +24 -0
  41. package/dist/results/index.d.ts +24 -0
  42. package/dist/results/index.js +222 -0
  43. package/dist/results/index.js.map +1 -0
  44. package/dist/{rule-BQwUtKk5.d.cts → rule-49jO7lN-.d.cts} +1 -1
  45. package/dist/{rule-cGqclk_0.d.ts → rule-DzNj0QvN.d.ts} +1 -1
  46. package/dist/scopes/index.d.cts +3 -3
  47. package/dist/scopes/index.d.ts +3 -3
  48. package/dist/search/index.d.cts +1 -1
  49. package/dist/search/index.d.ts +1 -1
  50. package/dist/setup/index.d.cts +12 -12
  51. package/dist/setup/index.d.ts +12 -12
  52. package/dist/{subscription-eNzL9scc.d.ts → subscription-Bp1RSb6p.d.ts} +2 -2
  53. package/dist/{subscription-Ba8RKtPA.d.cts → subscription-CuaGi3lC.d.cts} +2 -2
  54. package/dist/templates/index.d.cts +10 -10
  55. package/dist/templates/index.d.ts +10 -10
  56. package/dist/typed-table/index.d.cts +10 -10
  57. package/dist/typed-table/index.d.ts +10 -10
  58. package/dist/{types-C4XCuv8O.d.cts → types-B54BeQzf.d.cts} +2 -2
  59. package/dist/{types-BlzdL4Vd.d.cts → types-BWfL38XJ.d.cts} +2 -2
  60. package/dist/{types-BBR2NGqj.d.ts → types-BZcYXFK3.d.ts} +2 -2
  61. package/dist/{types-EKwXJfxY.d.cts → types-Bztv0-pH.d.cts} +2 -2
  62. package/dist/{types-CmkHpvll.d.ts → types-CjGuR5ks.d.ts} +2 -2
  63. package/dist/{types-CrkzINrb.d.ts → types-bN7dG2ji.d.ts} +2 -2
  64. package/dist/use-cases/index.d.cts +5 -5
  65. package/dist/use-cases/index.d.ts +5 -5
  66. package/dist/{validate-BKeBAVSi.d.cts → validate-8VBa2xIU.d.cts} +1 -1
  67. package/dist/{validate-BB6DWgCP.d.ts → validate-xBnply7J.d.ts} +1 -1
  68. package/dist/views/index.d.cts +9 -9
  69. package/dist/views/index.d.ts +9 -9
  70. package/package.json +15 -5
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/results.ts","../../src/core/pgError.ts"],"sourcesContent":["// src/results.ts — @ai-matrx/records\n//\n// THE NEVER-THROW RESULT ENVELOPE, and the refusal vocabulary behind it.\n//\n// This package's whole posture toward the store is in one sentence: THE CLIENT\n// MIRRORS THE STORE'S CONTRACT AND NEVER RE-IMPLEMENTS A RULE THE STORE\n// ENFORCES. When the store refuses, the client hands back the store's OWN\n// message, the store's OWN hint and the store's OWN SQLSTATE, under a code a\n// screen can branch on. It never rewrites the sentence, never swallows it, and\n// never invents a friendlier one — the store's refusals were written to be read\n// by a person, and a client that paraphrases them is lying about what happened.\n\nimport type { PerValueAccessWord } from \"./vocabulary\";\nimport type { Uuid } from \"./record\";\n\n/**\n * What KIND of refusal it was. The mapping from SQLSTATE to code lives in\n * `/core`, and it is checked against `STORE_REFUSAL_CODES` — the list of every\n * SQLSTATE the store's own bodies raise, generated from the live catalogue. A\n * code the store can raise and this union cannot name is a hole, and the\n * real-door suite fails on it.\n */\nexport type RecordsErrorCode =\n /** `PT409` — somebody else's write won. The record clock moved under you. */\n | \"stale_write\"\n /**\n * The call needs an organization and none was carried (the platform's `organization_required`; the entity\n * doors' MX002). Never resolved by guessing one: the person is shown their memberships and picks.\n */\n | \"organization_required\"\n /** `42501` — a door. Either the schema is revoked, or the store is switched off, or this principal may not pass. */\n | \"door\"\n /** `23514` — a Rule, a shape guard, or a validation the store enforces refused it. */\n | \"refused_by_rule\"\n /**\n * `22004` / `22023` / `22P02` — the call itself was malformed: a missing id, a\n * patch that is not an object, or a value that does not fit the type the\n * store holds for that Field. The store's own message names the value and the\n * type it could not be read as.\n */\n | \"invalid_argument\"\n /** `02000` — the record is not here (deleted, never existed, or another organization's). */\n | \"not_found\"\n /** `23503` — something it points at is not there. */\n | \"missing_reference\"\n /** `23505` — that thing is already here. */\n | \"already_exists\"\n /** `0A000` — the store does not do this yet, and says which part. */\n | \"not_supported\"\n /** `53400` / `22012` — the store ran out of something, or the arithmetic could not be done. */\n | \"store_limit\"\n /**\n * `40001` — the read-access snapshot this connection carries is older than a\n * write the reader has already observed, so the store refused to answer at\n * all rather than hand back something they just lost. Retry on a fresh\n * connection; it is the one refusal in this list that is worth repeating.\n */\n | \"stale_read\"\n /**\n * `57014` — the store cancelled the statement at its own timeout. Nothing was\n * refused on its merits and nothing was written; the same call can succeed on\n * a smaller page or a quieter moment. With `stale_read`, one of the only two\n * refusals in this list worth repeating.\n */\n | \"timed_out\"\n /**\n * THE DOOR THAT DOES NOT EXIST YET. Not an error condition in the database —\n * this package asked for a door that is not in the live catalogue, so it\n * refused to guess. `door_absent` always names the door and the lane that\n * owns it; it is never a silent no-op and never an empty list.\n */\n | \"door_absent\"\n /**\n * `PGRST202` / `PGRST205` — PostgREST could not find the function or the\n * schema. The database this client is pointed at is not serving the record\n * store: the schema is not exposed, or the grants are not there.\n */\n | \"store_not_served\"\n /**\n * `PT428` — the move was not refused and it did not happen: a stage gate whose\n * `on_fail` is `require_approval` filed a request with the people who can\n * answer it, and left the record exactly where it was. The store's own\n * sentence is the gate's own sentence, and the DETAIL carries the approval.\n *\n * It is the one code in this list that is not a failure. A screen that drew it\n * as one would tell somebody their work was rejected when it is being\n * considered; a screen that drew it as success would move the card while\n * somebody is still deciding. `custom.pipeline_move` answers an object on this\n * path rather than raising, so a caller only meets PT428 when the move went\n * through the ORDINARY write door — which is most of them.\n */\n | \"needs_approval\"\n /**\n * THE CALL NEVER REACHED THE STORE. Not a refusal — a transport failure: the\n * browser lost the network, the gateway answered with an HTTP status and no\n * body, the request was cancelled. supabase-js hands these back with an EMPTY\n * `code` (a `FetchError`) or with the HTTP status in it (`\"404\"`, `\"502\"`),\n * neither of which is a SQLSTATE, and until 2026-09-22 they all landed in\n * `internal` — which is the one classification that tells a screen nothing,\n * and which made the package print a sentence about ITSELF to the person\n * (lane TAILS-6). Nothing was written, and the same call can simply be made\n * again, which is what separates it from `internal`.\n */\n | \"unreachable\"\n /** Anything the mapper could not place. It still carries the store's own words. */\n | \"internal\";\n\n/** A refusal, in the store's own words. */\nexport interface RecordsError {\n code: RecordsErrorCode;\n /** THE STORE'S message, verbatim. Never paraphrased. */\n message: string;\n /** THE STORE'S hint, verbatim — this is where the remedy is written. */\n hint?: string;\n /** The SQLSTATE, so a caller can be exact when a code is not exact enough. */\n sqlstate?: string;\n /** Whatever the store put in DETAIL, parsed when it was json. */\n detail?: unknown;\n /**\n * TRUE when this package did not recognise the class it was handed, so a\n * caller can say so instead of reading the silence as \"handled\".\n *\n * 🚨 IT IS A FLAG AND A SEPARATE SENTENCE, NEVER AN APPENDIX TO `hint`\n * (lane TAILS-6, 2026-09-22). `mapPgError` used to append \"@ai-matrx/records\n * did not recognise SQLSTATE … from checklistTemplates\" ONTO `hint`, and\n * `hint` is the field every screen treats as THE REMEDY — the sentence a\n * person is told to act on. So a dropped connection on the Checklists tab\n * showed a plumbing company \"Something went wrong at our end\" over a line\n * about a TypeScript package and a SQLSTATE. A note this package writes about\n * ITSELF is for whoever debugs it and belongs nowhere a person reads.\n */\n unmapped?: boolean;\n /**\n * THIS PACKAGE'S OWN NOTE, for an engineer. Never the store's words and never\n * a person's: screens render it out of sight (a `title` attribute, a\n * screen-reader line) or not at all.\n */\n diagnostic?: string;\n}\n\nexport type RecordsResult<T> = { ok: true; data: T } | { ok: false; error: RecordsError };\n\n/** Narrowing helper for hosts compiled without `strictNullChecks`. */\nexport function isRecordsErr<T>(\n result: RecordsResult<T>,\n): result is { ok: false; error: RecordsError } {\n return result.ok === false;\n}\n\n/**\n * A result's data, or THROW its refusal as an `Error` carrying the store's sentence — for the places\n * a throw is the contract (a `createAsyncThunk` body, a loader whose caller catches and shows it).\n */\nexport function unwrapRecords<T>(result: RecordsResult<T>): T {\n if (result.ok) return result.data;\n throw new Error(result.error.message);\n}\n\nexport const ok = <T>(data: T): RecordsResult<T> => ({ ok: true, data });\nexport const err = <T>(error: RecordsError): RecordsResult<T> => ({ ok: false, error });\n\n/**\n * A `stale_write` carries everything the screen needs to show the conflict\n * rather than a toast: which version you wrote against, which one won, and the\n * value of every field you touched as it stands now. The store builds this and\n * this type is its shape — nothing is reconstructed on the client.\n */\nexport interface StaleWriteDetail {\n expected_version: number;\n current_version: number;\n contested_fields: Record<string, unknown>;\n}\n\n/** The parsed form of a `stale_write`, for `useRecordMutation`'s conflict state. */\nexport interface WriteConflict extends StaleWriteDetail {\n record_id: Uuid;\n /** The store's own sentence — what the screen shows. */\n message: string;\n /** The store's own remedy. */\n hint: string;\n}\n\n/**\n * The structural shape of a PostgREST failure as supabase-js resolves it: a\n * PLAIN OBJECT parsed from the response body, NOT an `Error`. Reading\n * `.message` off `instanceof Error` discards the real database message on every\n * genuine failure.\n */\nexport interface PgError {\n code?: string | null;\n message: string;\n details?: string | null;\n hint?: string | null;\n}\n\n/** What the validation mirror answers: the same sentence the trigger would raise. */\nexport interface PredictedRefusal {\n /** The field key the store would name, when it names one. */\n field_key?: string;\n /** The message the store's own body would raise, word for word. */\n message: string;\n hint?: string;\n /** The store's structured detail, when its refusal carries one (e.g. `{ example }`). */\n detail?: Record<string, unknown>;\n sqlstate: string;\n /**\n * Which of the store's bodies would raise it, so a reader can go and check\n * that this mirror still tells the truth.\n */\n predicted_by: string;\n}\n\n/** VAL-5 / VAL-6, named so a caller can say which word was the problem. */\nexport interface ForbiddenEnvelopeWord {\n field_key: string;\n word: PerValueAccessWord;\n}\n","// src/core/pgError.ts — @ai-matrx/records\n//\n// THE ONE FUNNEL from what the database said to what a caller reads. Every\n// method in this package's client goes through it, and it does exactly three\n// things: it classifies the SQLSTATE, it carries the store's message and hint\n// VERBATIM, and it parses the DETAIL when the store put json there.\n//\n// It never writes a sentence of its own about a refusal the store already\n// explained. The store's messages were written to be read by the person who hit\n// them — \"Someone else changed this record while you were working on it\" is the\n// screen's text, not a code the screen has to translate.\n\nimport type { PgError, RecordsError, RecordsErrorCode, StaleWriteDetail } from \"../results\";\n\n/**\n * SQLSTATE -> code. Every entry here answers one of the codes\n * `STORE_REFUSAL_CODES` reports the store raising; the real-door suite asserts\n * that this map covers all of them, so a new refusal class in the store shows\n * up as a red test rather than an `internal` in somebody's console.\n */\nconst BY_SQLSTATE: Record<string, RecordsErrorCode> = {\n PT409: \"stale_write\",\n \"42501\": \"door\",\n \"23514\": \"refused_by_rule\",\n \"22004\": \"invalid_argument\",\n \"22023\": \"invalid_argument\",\n // MX005 — a value the store cannot take as asked: since 2026-10-06 (AP-3 U3) a word that names more than one\n // choice or linked record raises it (it used to borrow PT409 and read as somebody else's write winning).\n MX005: \"invalid_argument\",\n // MXD01 — the held-change door tried the proposed values before filing an\n // approval request and the store refused them. Nothing is waiting for a\n // person to decide; correct the value before asking again, which is the same\n // caller-side condition as the other invalid-argument refusals.\n MXD01: \"invalid_argument\",\n // 22P02 — a value does not fit the type the store holds for it. The class is\n // real and was hit live: an organization whose copy of a package table grew\n // `status` as a uuid-valued Field was sent the text \"open\", and the store\n // answered `invalid input syntax for type uuid: \"open\"`. It is the CALL that\n // is wrong for the shape the store holds, which is what `invalid_argument`\n // already means — the store's own sentence names the value and the type.\n \"22P02\": \"invalid_argument\",\n // 42703 — a column that is not there. The store raises it from\n // `custom.entity_table`, which is asked for a column by NAME, so the class is\n // exactly \"the call named something the shape does not have\": the same thing\n // `invalid_argument` already means, and the store's own sentence names the\n // column. Added 2026-09-20 (lane FORMS) because the package's live-door suite\n // caught it raised by a door this package did not know about — which is the\n // suite working, and is why the map is a census rather than a guess.\n \"42703\": \"invalid_argument\",\n // 22007 — a date or a time the store could not read as one. It is raised by\n // `custom.dashboard_window_sql`, which is handed a window a caller wrote\n // (\"last 30 days\", a literal date), so the class is again \"the call named\n // something the shape does not accept\" and the store's own sentence names the\n // text it could not read. Added 2026-09-20 (lane SCREEN-BREAK) after the\n // live-door census caught it — the same way 42703 arrived, which is the\n // census working rather than a guess.\n \"22007\": \"invalid_argument\",\n // 22003 — a number the store could not hold at the size it was handed. It is\n // raised by `custom.context_resolve`, which is given a window or a depth a\n // caller wrote, so the class is the same one 22P02, 42703 and 22007 already\n // are: the CALL named a value the shape does not accept, and the store's own\n // sentence names the number and the range. Added 2026-09-20 (lane GRID-TWO)\n // when the live-door census caught the release gate red on it — which is the\n // census working, and the fourth time it has been the thing that found a new\n // refusal class rather than a person guessing one.\n \"22003\": \"invalid_argument\",\n // 42883 — `custom._template_call` (the template family, 2026-10-03) was handed a step that\n // names a door the store does not have, or an argument that door does not take. The TEMPLATE\n // named something the shape does not have — the same class 42703 is — and the store's own\n // sentence names the door or the argument. Caught by the live-door census on records 0.68.1's\n // tag, the eighth time the census found a class before a person did. (A bare 42883 on a door\n // this package itself asks for is still `door_absent`, mapped before this funnel in\n // `owedDoor`.)\n \"42883\": \"invalid_argument\",\n \"02000\": \"not_found\",\n // P0002 — `custom.inbox_snooze` / `custom.inbox_clear` (lane S5-PRIME-2, 2026-09-24): \"There is\n // nothing in your inbox with that id\". An invented id, another person's item and another\n // organization's all answer it alike, so it reads exactly as 02000 does: not found.\n \"P0002\": \"not_found\",\n \"23503\": \"missing_reference\",\n \"23505\": \"already_exists\",\n \"0A000\": \"not_supported\",\n \"53400\": \"store_limit\",\n \"22012\": \"store_limit\",\n // 54001 — `custom.record_delete` stops a cascade that nests past sixty-four\n // levels of containment, because that is a loop somebody built rather than a\n // hierarchy, and saying so beats recursing until the server runs out of\n // stack. It is a LIMIT of the store, and the store's own sentence names what\n // to do about it, so it reads as one.\n \"54001\": \"store_limit\",\n // 54000 — the grid primitives' organization ceilings (GRID-PRIMITIVES, 2026-09-23):\n // `custom.action_run` on a selection past its knob, `custom.table_decorate` past the\n // rule count, `custom.table_from_example` past `custom/example_rows_max`,\n // `custom.table_webhook_declare` past `custom/table_webhooks_max`, and\n // `custom.hub_changed_by`. Each names its knob in the hint and writes nothing, so it\n // reads exactly like 54001: a limit of the store, in the store's own sentence.\n \"54000\": \"store_limit\",\n // VIS: `custom.has_visibility_at` refuses to answer from a snapshot older\n // than a write this reader has already seen, rather than returning something\n // they just lost access to. It is retryable on a fresher connection, which is\n // a different instruction from every other refusal here.\n // 55000 — `custom.table_move` (SC-1', 2026-09-24) refuses a move the table's present state\n // does not allow: a destination that cannot take it, a table something else holds, contents\n // that point at themselves in a circle. The store's own sentence names the reason and nothing\n // moves, so it reads as a refusal on the merits. Caught by the live-door census on records\n // 0.58.3's tag, the seventh time the census found a class before a person did.\n \"55000\": \"refused_by_rule\",\n // 42P17 — a worked-out column that would read itself round a circle (STORE-TAILS-3,\n // 2026-09-25): `custom._field_reads_what_it_reads` refuses the declaration or edit that would\n // close the circle, naming every column in it, and `custom.far_value` refuses a circle stored\n // before that rule when a lookup or rollup is worked out. Refused on its merits, in the store's\n // own sentence, nothing written — so it reads as 55000 does.\n \"42P17\": \"refused_by_rule\",\n // P0001 — `custom.context_scope_write` (2026-10-03) refuses a scope whose parent breaks the\n // parent rule in the old trigger's own class and words (manager ruling H6). Refused on its\n // merits, nothing written. Caught by the live-door census on records 0.65.0's tag.\n P0001: \"refused_by_rule\",\n \"40001\": \"stale_read\",\n // 57014 — the store cancelled the statement at its own timeout. Like\n // `stale_read` and unlike every other refusal here, the call was never\n // refused on its merits: the same call on a smaller page, or once the\n // organization's kernel is not being rewritten, can succeed. It gets its own\n // code so a screen can offer \"try again\" honestly instead of showing a\n // failure sentence the caller cannot act on.\n \"57014\": \"timed_out\",\n // PostgREST's own two: the store is not being SERVED, which is a different\n // thing from the store refusing. `custom` absent from `pgrst.db_schemas`, or\n // the grants not copied, land here.\n PGRST202: \"store_not_served\",\n PGRST205: \"store_not_served\",\n PGRST301: \"door\",\n // PT428 — NOT A FAILURE, and the release gate's live census is what found it\n // missing: the store raises it and this package answered `internal`, which is\n // the one classification that tells a screen nothing. A stage gate whose\n // `on_fail` is `require_approval` files the request and leaves the record\n // where it was; the transaction is rolled back to the pipeline's own block, so\n // \"nothing was written\" is a fact rather than a promise. Landed by lane\n // STAGE-RULES; mapped here by STAGE-RULES-2 the day after, when the census\n // caught it — the sixth time that census has been the thing that found a\n // refusal class rather than a person guessing one.\n PT428: \"needs_approval\",\n};\n\n/** The SQLSTATEs this package claims to understand. Exported for the guard. */\nexport const MAPPED_SQLSTATES = Object.keys(BY_SQLSTATE);\n\nfunction parseDetail(details: string | null | undefined): unknown {\n if (!details) return undefined;\n const trimmed = details.trim();\n if (!trimmed.startsWith(\"{\") && !trimmed.startsWith(\"[\")) return details;\n try {\n return JSON.parse(trimmed) as unknown;\n } catch {\n return details;\n }\n}\n\n/**\n * A CODE THAT IS NOT A SQLSTATE AT ALL — so it is not read as one.\n *\n * A SQLSTATE is five characters. supabase-js puts something else in `code` in\n * exactly two situations, and BOTH of them mean the call never reached the\n * store rather than the store refusing it:\n *\n * `\"\"` a `FetchError` — no network, a cancelled request, CORS.\n * `\"404\"`… an HTTP status, when the gateway answered with no JSON body.\n *\n * Lane TAILS-6 (2026-09-22) found both landing in `internal`, which is the one\n * classification that tells a screen nothing: a person on the Checklists tab of\n * a plumbing company's jobs table was shown \"Something went wrong at our end\"\n * with nothing to do about it, over a sentence naming this package. They are\n * `unreachable`, which a screen can honestly offer \"try again\" for.\n */\nfunction isNotASqlstate(code: string | undefined): boolean {\n if (!code) return true;\n return /^[0-9]{3}$/.test(code);\n}\n\n/** Map a PostgREST/supabase-js failure into the package's refusal shape. */\nexport function mapPgError(error: PgError, where: string): RecordsError {\n // `code: \"\"` is supabase-js's own value for a transport failure, and `\"\"` is\n // not nullish — so it has to be emptied deliberately or it becomes a SQLSTATE\n // nobody can look up.\n const raw = error.code ?? undefined;\n const sqlstate = raw && raw !== \"\" ? raw : undefined;\n const mapped: RecordsError = {\n code: \"internal\",\n message: error.message,\n ...(error.hint ? { hint: error.hint } : {}),\n ...(sqlstate ? { sqlstate } : {}),\n };\n if (isNotASqlstate(sqlstate)) {\n mapped.code = \"unreachable\";\n } else {\n mapped.code = BY_SQLSTATE[sqlstate!] ?? \"internal\";\n }\n const detail = parseDetail(error.details);\n if (detail !== undefined) mapped.detail = detail;\n if (mapped.code === \"internal\") {\n // 🚨 THE NOTE GOES IN ITS OWN FIELD, NEVER ONTO `hint` (lane TAILS-6).\n // `hint` is THE REMEDY — the sentence screens hand a person to act on — so\n // a note this package writes about ITSELF being surprised belonged nowhere\n // near it. It is still said out loud, so nobody reads the silence as\n // \"handled\"; it is said to whoever debugs this and to nobody else.\n mapped.unmapped = true;\n mapped.diagnostic =\n `@ai-matrx/records did not recognise SQLSTATE ${sqlstate ?? \"(none)\"} from ${where}; ` +\n `the store's own message is the thing to act on.`;\n } else if (mapped.code === \"unreachable\") {\n mapped.unmapped = true;\n mapped.diagnostic =\n `@ai-matrx/records never reached the store from ${where}: ` +\n `${raw ? `the transport answered ${raw}` : \"no response\"} — ${error.message}`;\n // 🚨 THE ONE PLACE THIS PACKAGE WRITES A MESSAGE OF ITS OWN, and it is the\n // one place where there is no store message to carry: the store never\n // answered. `TypeError: Failed to fetch` is the browser talking to itself,\n // not a sentence anybody should read, so it goes to the engineer's line\n // above and the person gets what actually happened.\n mapped.message = \"We could not reach your data.\";\n // Whatever the transport said was never a remedy either.\n delete mapped.hint;\n }\n return mapped;\n}\n\n/**\n * Anything a host caught (a supabase-js error object, a thrown `Error`, a string) as the package's\n * refusal, through `mapPgError` — so a host service's `catch` speaks the same words as its doors.\n */\nexport function mapThrownError(thrown: unknown, where: string): RecordsError {\n const o = thrown && typeof thrown === \"object\" ? (thrown as { code?: unknown; message?: unknown; details?: unknown; hint?: unknown }) : {};\n const message = typeof o.message === \"string\" && o.message ? o.message : thrown == null ? \"Unknown error\" : String(thrown);\n const code = typeof o.code === \"string\" ? o.code : null;\n // A supabase-js answer (it carries a code) and a transport failure are the store's / the\n // network's; anything else a host threw is its own sentence and is kept as said.\n if (code !== null || (thrown instanceof TypeError && /fetch|network/i.test(message))) {\n return mapPgError(\n { code, message, details: typeof o.details === \"string\" ? o.details : null, hint: typeof o.hint === \"string\" ? o.hint : null },\n where,\n );\n }\n return {\n code: \"internal\",\n message,\n unmapped: true,\n diagnostic: `@ai-matrx/records: ${where} threw outside the store.`,\n };\n}\n\n/** Pull the conflict out of a `stale_write`, when the store sent one. */\nexport function staleWriteDetail(error: RecordsError): StaleWriteDetail | null {\n if (error.code !== \"stale_write\") return null;\n const detail = error.detail as Partial<StaleWriteDetail> | undefined;\n if (\n !detail ||\n typeof detail.expected_version !== \"number\" ||\n typeof detail.current_version !== \"number\"\n ) {\n return null;\n }\n return {\n expected_version: detail.expected_version,\n current_version: detail.current_version,\n contested_fields: detail.contested_fields ?? {},\n };\n}\n\n/**\n * HONEST-REFUSALS 1 — a member of an ARCHIVED organization is refused with the store's own sentence\n * (\"This organization is archived, …\") and DETAIL `organization_archived:<organization id>`. The sentence\n * and the restore hint ride `message` and `hint` verbatim like every refusal; this reads the organization out\n * so a screen can offer \"Restore\" (the owner's `iam.organization_restore` door) instead of a dead end.\n * Null for every other refusal, including the non-member's \"You are not a member of that organization\".\n */\nexport function archivedOrganizationId(error: RecordsError): string | null {\n if (error.code !== \"door\" || typeof error.detail !== \"string\") return null;\n const m = /^organization_archived:([0-9a-f-]{36})$/i.exec(error.detail.trim());\n return m ? m[1]! : null;\n}\n"],"mappings":"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","names":[]}
@@ -1,4 +1,4 @@
1
- import { U as Uuid, i as RuleNodeKind, j as RuleUse, h as Timestamp } from './record-C8q21jjB.cjs';
1
+ import { U as Uuid, i as RuleNodeKind, j as RuleUse, h as Timestamp } from './record-CTgSgWe3.cjs';
2
2
 
3
3
  /**
4
4
  * A rule expression as `custom.rule_eval` ACTUALLY evaluates it — read off the
@@ -1,4 +1,4 @@
1
- import { U as Uuid, i as RuleNodeKind, j as RuleUse, h as Timestamp } from './record-C8q21jjB.js';
1
+ import { U as Uuid, i as RuleNodeKind, j as RuleUse, h as Timestamp } from './record-CTgSgWe3.js';
2
2
 
3
3
  /**
4
4
  * A rule expression as `custom.rule_eval` ACTUALLY evaluates it — read off the
@@ -1,6 +1,6 @@
1
- import { S as Scope, C as ContextValue, a as ContextField, b as ContextFieldKind, c as ContextReference } from '../doors-KbjyhBW-.cjs';
2
- export { A as ARCHIVED_SCOPES_PAGE, d as ArchivedScope, e as ArchivedScopeType, f as CONTEXT_FIELD_KINDS, g as ContextFieldSpec, h as ContextPolicy, i as ContextSensitivity, j as ContextValueWrite, k as ContextValueWritten, F as FIELD_KERNEL_ID, l as FILE_KERNEL_ID, I as INCOMPLETE_SAVE_REFUSAL, m as IncompleteValue, R as ReadContextFileText, n as SCOPES_PER_CALL, o as SCOPES_PER_VALUES_CALL, p as SCOPE_TYPES_PER_FIELDS_CALL, q as SYSTEM_CONTEXT_TYPE_ID, r as ScopeDoorCall, s as ScopeDoors, t as ScopePage, u as ScopeSpec, v as ScopeTemplate, w as ScopeType, x as ScopeTypeLabel, y as ScopeTypeSkeleton, z as ScopeTypeSpec, B as ScopeTypeWithScopes, D as ScopeWithType, E as StoreSystemItemRow, G as StoreWholeValue, H as SystemContextField, J as SystemContextItemClass, T as TYPE_SCOPES_PAGE, K as TableTemplate, L as TableTemplateField, M as completeWholeValues, N as contextFieldFromStore, O as contextFieldKind, P as contextValueFromStore, Q as contextValueWrite, U as createScopeDoors, V as incompleteSaveRefusal, W as referenceFence, X as referencesFromFence, Y as referencesOf, Z as scopeFromStore, _ as scopeTypeFromStore, $ as scopeWithTypeFromStore, a0 as settingFromStore, a1 as systemContextFieldFromStore } from '../doors-KbjyhBW-.cjs';
3
- import { U as Uuid, R as RecordsResult } from '../record-C8q21jjB.cjs';
1
+ import { S as Scope, C as ContextValue, a as ContextField, b as ContextFieldKind, c as ContextReference } from '../doors-D1yAs0a0.cjs';
2
+ export { A as ARCHIVED_SCOPES_PAGE, d as ArchivedScope, e as ArchivedScopeType, f as CONTEXT_FIELD_KINDS, g as ContextFieldSpec, h as ContextPolicy, i as ContextSensitivity, j as ContextValueWrite, k as ContextValueWritten, F as FIELD_KERNEL_ID, l as FILE_KERNEL_ID, I as INCOMPLETE_SAVE_REFUSAL, m as IncompleteValue, R as ReadContextFileText, n as SCOPES_PER_CALL, o as SCOPES_PER_VALUES_CALL, p as SCOPE_TYPES_PER_FIELDS_CALL, q as SYSTEM_CONTEXT_TYPE_ID, r as ScopeDoorCall, s as ScopeDoors, t as ScopePage, u as ScopeSpec, v as ScopeTemplate, w as ScopeType, x as ScopeTypeLabel, y as ScopeTypeSkeleton, z as ScopeTypeSpec, B as ScopeTypeWithScopes, D as ScopeWithType, E as StoreSystemItemRow, G as StoreWholeValue, H as SystemContextField, J as SystemContextItemClass, T as TYPE_SCOPES_PAGE, K as TableTemplate, L as TableTemplateField, M as completeWholeValues, N as contextFieldFromStore, O as contextFieldKind, P as contextValueFromStore, Q as contextValueWrite, U as createScopeDoors, V as incompleteSaveRefusal, W as referenceFence, X as referencesFromFence, Y as referencesOf, Z as scopeFromStore, _ as scopeTypeFromStore, $ as scopeWithTypeFromStore, a0 as settingFromStore, a1 as systemContextFieldFromStore } from '../doors-D1yAs0a0.cjs';
3
+ import { U as Uuid, R as RecordsResult } from '../record-CTgSgWe3.cjs';
4
4
 
5
5
  /** An organization role, as `iam.organization_member` holds it. */
6
6
  type ScopeSeatRole = "owner" | "admin" | "member" | string;
@@ -1,6 +1,6 @@
1
- import { S as Scope, C as ContextValue, a as ContextField, b as ContextFieldKind, c as ContextReference } from '../doors-C2-sFvAk.js';
2
- export { A as ARCHIVED_SCOPES_PAGE, d as ArchivedScope, e as ArchivedScopeType, f as CONTEXT_FIELD_KINDS, g as ContextFieldSpec, h as ContextPolicy, i as ContextSensitivity, j as ContextValueWrite, k as ContextValueWritten, F as FIELD_KERNEL_ID, l as FILE_KERNEL_ID, I as INCOMPLETE_SAVE_REFUSAL, m as IncompleteValue, R as ReadContextFileText, n as SCOPES_PER_CALL, o as SCOPES_PER_VALUES_CALL, p as SCOPE_TYPES_PER_FIELDS_CALL, q as SYSTEM_CONTEXT_TYPE_ID, r as ScopeDoorCall, s as ScopeDoors, t as ScopePage, u as ScopeSpec, v as ScopeTemplate, w as ScopeType, x as ScopeTypeLabel, y as ScopeTypeSkeleton, z as ScopeTypeSpec, B as ScopeTypeWithScopes, D as ScopeWithType, E as StoreSystemItemRow, G as StoreWholeValue, H as SystemContextField, J as SystemContextItemClass, T as TYPE_SCOPES_PAGE, K as TableTemplate, L as TableTemplateField, M as completeWholeValues, N as contextFieldFromStore, O as contextFieldKind, P as contextValueFromStore, Q as contextValueWrite, U as createScopeDoors, V as incompleteSaveRefusal, W as referenceFence, X as referencesFromFence, Y as referencesOf, Z as scopeFromStore, _ as scopeTypeFromStore, $ as scopeWithTypeFromStore, a0 as settingFromStore, a1 as systemContextFieldFromStore } from '../doors-C2-sFvAk.js';
3
- import { U as Uuid, R as RecordsResult } from '../record-C8q21jjB.js';
1
+ import { S as Scope, C as ContextValue, a as ContextField, b as ContextFieldKind, c as ContextReference } from '../doors-D2z3kH2i.js';
2
+ export { A as ARCHIVED_SCOPES_PAGE, d as ArchivedScope, e as ArchivedScopeType, f as CONTEXT_FIELD_KINDS, g as ContextFieldSpec, h as ContextPolicy, i as ContextSensitivity, j as ContextValueWrite, k as ContextValueWritten, F as FIELD_KERNEL_ID, l as FILE_KERNEL_ID, I as INCOMPLETE_SAVE_REFUSAL, m as IncompleteValue, R as ReadContextFileText, n as SCOPES_PER_CALL, o as SCOPES_PER_VALUES_CALL, p as SCOPE_TYPES_PER_FIELDS_CALL, q as SYSTEM_CONTEXT_TYPE_ID, r as ScopeDoorCall, s as ScopeDoors, t as ScopePage, u as ScopeSpec, v as ScopeTemplate, w as ScopeType, x as ScopeTypeLabel, y as ScopeTypeSkeleton, z as ScopeTypeSpec, B as ScopeTypeWithScopes, D as ScopeWithType, E as StoreSystemItemRow, G as StoreWholeValue, H as SystemContextField, J as SystemContextItemClass, T as TYPE_SCOPES_PAGE, K as TableTemplate, L as TableTemplateField, M as completeWholeValues, N as contextFieldFromStore, O as contextFieldKind, P as contextValueFromStore, Q as contextValueWrite, U as createScopeDoors, V as incompleteSaveRefusal, W as referenceFence, X as referencesFromFence, Y as referencesOf, Z as scopeFromStore, _ as scopeTypeFromStore, $ as scopeWithTypeFromStore, a0 as settingFromStore, a1 as systemContextFieldFromStore } from '../doors-D2z3kH2i.js';
3
+ import { U as Uuid, R as RecordsResult } from '../record-CTgSgWe3.js';
4
4
 
5
5
  /** An organization role, as `iam.organization_member` holds it. */
6
6
  type ScopeSeatRole = "owner" | "admin" | "member" | string;
@@ -1,4 +1,4 @@
1
- import { U as Uuid, R as RecordsResult } from '../record-C8q21jjB.cjs';
1
+ import { U as Uuid, R as RecordsResult } from '../record-CTgSgWe3.cjs';
2
2
 
3
3
  declare const STORE_RECORD_SEARCH_MIN_CHARS = 2;
4
4
  /** One record the search door found. */
@@ -1,4 +1,4 @@
1
- import { U as Uuid, R as RecordsResult } from '../record-C8q21jjB.js';
1
+ import { U as Uuid, R as RecordsResult } from '../record-CTgSgWe3.js';
2
2
 
3
3
  declare const STORE_RECORD_SEARCH_MIN_CHARS = 2;
4
4
  /** One record the search door found. */
@@ -1,18 +1,18 @@
1
1
  import { RealtimeManager } from '@ai-matrx/data/realtime';
2
- import { R as RecordsClient } from '../client-B7KEs9hi.cjs';
3
- import { C as CreateEntityDataPortOptions, E as EntityDataPort } from '../port-rqQEGhew.cjs';
4
- import { R as RecordOrganizationPort, O as ObjectOrganizationAnswer } from '../objectOrganization-Cu73SBxH.cjs';
5
- import { a as RecordsConfig, b as RowAgentPort, c as RecordsErrorSink, d as RecordsDataSource, e as RecordsChangeSink, f as RowAgentTarget } from '../ports-iATV-A2v.cjs';
6
- import { U as Uuid, R as RecordsResult } from '../record-C8q21jjB.cjs';
2
+ import { R as RecordsClient } from '../client-D1EwyWfh.cjs';
3
+ import { C as CreateEntityDataPortOptions, E as EntityDataPort } from '../port-O-UdH1HS.cjs';
4
+ import { R as RecordOrganizationPort, O as ObjectOrganizationAnswer } from '../objectOrganization-DazBoDAq.cjs';
5
+ import { a as RecordsConfig, b as RowAgentPort, c as RecordsErrorSink, d as RecordsDataSource, e as RecordsChangeSink, f as RowAgentTarget } from '../ports-alv3bgKY.cjs';
6
+ import { U as Uuid, R as RecordsResult } from '../record-CTgSgWe3.cjs';
7
7
  import { RecordSearchRequest, RecordSearchHit, listStoreRecordCandidates } from '../search/index.cjs';
8
- import '../subscription-Ba8RKtPA.cjs';
9
- import '../rule-BQwUtKk5.cjs';
10
- import '../relation-Bwp8iuei.cjs';
11
- import '../field-ppX29ddi.cjs';
12
- import '../doors-KbjyhBW-.cjs';
13
- import '../portal-ffH13fsE.cjs';
8
+ import '../subscription-CuaGi3lC.cjs';
9
+ import '../rule-49jO7lN-.cjs';
10
+ import '../relation-BjjjXyqn.cjs';
11
+ import '../field-B8loYt-A.cjs';
12
+ import '../doors-D1yAs0a0.cjs';
13
+ import '../portal-L_mN8l9P.cjs';
14
14
  import '../table-kind/index.cjs';
15
- import '../types-C4XCuv8O.cjs';
15
+ import '../types-B54BeQzf.cjs';
16
16
 
17
17
  /** A signed-in database identity: the client every door and live change rides, and who it is. */
18
18
  interface RecordsSession {
@@ -1,18 +1,18 @@
1
1
  import { RealtimeManager } from '@ai-matrx/data/realtime';
2
- import { R as RecordsClient } from '../client-Dthx26hr.js';
3
- import { C as CreateEntityDataPortOptions, E as EntityDataPort } from '../port-Bk7TG0aE.js';
4
- import { R as RecordOrganizationPort, O as ObjectOrganizationAnswer } from '../objectOrganization-DtR3lWG2.js';
5
- import { a as RecordsConfig, b as RowAgentPort, c as RecordsErrorSink, d as RecordsDataSource, e as RecordsChangeSink, f as RowAgentTarget } from '../ports-BCNNghmf.js';
6
- import { U as Uuid, R as RecordsResult } from '../record-C8q21jjB.js';
2
+ import { R as RecordsClient } from '../client-CrwedBYU.js';
3
+ import { C as CreateEntityDataPortOptions, E as EntityDataPort } from '../port-D6wepPvr.js';
4
+ import { R as RecordOrganizationPort, O as ObjectOrganizationAnswer } from '../objectOrganization-D1ox3gUx.js';
5
+ import { a as RecordsConfig, b as RowAgentPort, c as RecordsErrorSink, d as RecordsDataSource, e as RecordsChangeSink, f as RowAgentTarget } from '../ports-CmmvR8OI.js';
6
+ import { U as Uuid, R as RecordsResult } from '../record-CTgSgWe3.js';
7
7
  import { RecordSearchRequest, RecordSearchHit, listStoreRecordCandidates } from '../search/index.js';
8
- import '../subscription-eNzL9scc.js';
9
- import '../rule-cGqclk_0.js';
10
- import '../relation-Bsjwkn6N.js';
11
- import '../field-BHlhq24W.js';
12
- import '../doors-C2-sFvAk.js';
13
- import '../portal-DmxuUr2f.js';
8
+ import '../subscription-Bp1RSb6p.js';
9
+ import '../rule-DzNj0QvN.js';
10
+ import '../relation-T4biacnz.js';
11
+ import '../field-DaE90BZ7.js';
12
+ import '../doors-D2z3kH2i.js';
13
+ import '../portal-CAssJHRZ.js';
14
14
  import '../table-kind/index.js';
15
- import '../types-CrkzINrb.js';
15
+ import '../types-bN7dG2ji.js';
16
16
 
17
17
  /** A signed-in database identity: the client every door and live change rides, and who it is. */
18
18
  interface RecordsSession {
@@ -1,5 +1,5 @@
1
- import { H as HiddenFieldNotice, U as Uuid, h as Timestamp } from './record-C8q21jjB.js';
2
- import { R as RuleExpression } from './rule-cGqclk_0.js';
1
+ import { H as HiddenFieldNotice, U as Uuid, h as Timestamp } from './record-CTgSgWe3.js';
2
+ import { R as RuleExpression } from './rule-DzNj0QvN.js';
3
3
 
4
4
  /** The measures the store offers. Asked of `custom.agg_operations()` at run time too. */
5
5
  type AggregateOperation = "count" | "sum" | "avg" | "min" | "max"
@@ -1,5 +1,5 @@
1
- import { H as HiddenFieldNotice, U as Uuid, h as Timestamp } from './record-C8q21jjB.cjs';
2
- import { R as RuleExpression } from './rule-BQwUtKk5.cjs';
1
+ import { H as HiddenFieldNotice, U as Uuid, h as Timestamp } from './record-CTgSgWe3.cjs';
2
+ import { R as RuleExpression } from './rule-49jO7lN-.cjs';
3
3
 
4
4
  /** The measures the store offers. Asked of `custom.agg_operations()` at run time too. */
5
5
  type AggregateOperation = "count" | "sum" | "avg" | "min" | "max"
@@ -1,13 +1,13 @@
1
- import { A as AgentSnapshotRow, T as TemplateSpec, a as TemplateTable, S as SharedBlockId, C as CapabilityWord, b as TemplateField, c as TemplateAgent, d as TemplateAutomation, e as TemplateBooking, f as TemplateChecklist, g as TemplateDashboard, h as TemplateDigest, i as TemplateDocument, j as TemplateDrillDown, k as TemplateDimensions, l as TemplateForm, m as TemplateNotification, n as TemplatePortal, o as TemplateRowAction, p as TemplateStageRules, q as TemplateView, r as TemplateMergeBinding, s as TemplateTryIt, t as TemplateWorkflow, u as TemplateFootprint, I as IndustryGroup, v as TemplateJob, w as TeachesFeature, x as TemplateViewKind, y as TemplateBookingWindow } from '../types-BlzdL4Vd.cjs';
2
- export { z as CAPABILITY_WORDS, B as CATALOGUE_QUOTAS, D as CATALOGUE_STATUSES, E as CHOICE_COLORS, F as CHOICE_COLORS_DISTINCT_UP_TO, G as CatalogueRow, H as CatalogueStatus, J as ChoiceColor, K as ConfidentialLevel, L as ConfidentialRequest, M as DEFAULT_TEMPLATE_AGENT, N as ENTITY_REFERENCE_KINDS, O as INDUSTRY_GROUPS, R as RELATIVE_DATE, P as RetiredId, Q as SHARED_BLOCKS, U as SHARED_BLOCK_IDS, V as STRENGTHS, W as SharedBlock, X as SharedBlockField, Y as SharedBlockUse, Z as Strength, _ as TABLE_KERNEL_ID, $ as TEACHES_FEATURES, a0 as TEMPLATE_AUDIENCES, a1 as TEMPLATE_EXTRA_KINDS, a2 as TEMPLATE_JOBS, a3 as TEMPLATE_REFERENCE_DATE, a4 as TEMPLATE_SPEC_VERSION, a5 as TEMPLATE_VIEW_KINDS, a6 as TemplateAgentQuestion, a7 as TemplateAgentVariable, a8 as TemplateAudience, a9 as TemplateCalendarView, aa as TemplateChecklistStep, ab as TemplateConfidential, ac as TemplateConfidentialReader, ad as TemplateDashboardBlock, ae as TemplateDimensionOverride, af as TemplateDrillPath, ag as TemplateExtra, ah as TemplateExtraAgent, ai as TemplateExtraAgentVariable, aj as TemplateExtraKind, ak as TemplateFormField, al as TemplateFoundation, am as TemplateGalleryView, an as TemplateGridView, ao as TemplateGuideStep, ap as TemplateKanbanView, aq as TemplateMeasureOverride, ar as TemplatePortalTable, as as TemplateProvenance, at as TemplateSource, au as TemplateTableSettings, av as TemplateTimelineView, aw as TemplateViewSort, ax as UseCaseSingulars, ay as WalkAction, az as WalkAssertion, aA as WalkImport, aB as WalkMove, aC as WalkStep, aD as confidentialPending, aE as confidentialRequests, aF as footprintOf, aG as membersAddRowsSteps, aH as tableSettingsProblems, aI as whenRule } from '../types-BlzdL4Vd.cjs';
3
- import { c as AggregateMeasure, b as AggregateFilter } from '../subscription-Ba8RKtPA.cjs';
4
- import { U as UseCase, o as UseCaseRelationship } from '../types-EKwXJfxY.cjs';
5
- import { U as UseCaseProblem } from '../validate-BKeBAVSi.cjs';
6
- export { R as RESOLVABLE_FIELD_TYPE_WORDS } from '../validate-BKeBAVSi.cjs';
7
- import { d as RecordsDataSource } from '../ports-iATV-A2v.cjs';
8
- import '../record-C8q21jjB.cjs';
9
- import '../rule-BQwUtKk5.cjs';
10
- import '../field-ppX29ddi.cjs';
1
+ import { A as AgentSnapshotRow, T as TemplateSpec, a as TemplateTable, S as SharedBlockId, C as CapabilityWord, b as TemplateField, c as TemplateAgent, d as TemplateAutomation, e as TemplateBooking, f as TemplateChecklist, g as TemplateDashboard, h as TemplateDigest, i as TemplateDocument, j as TemplateDrillDown, k as TemplateDimensions, l as TemplateForm, m as TemplateNotification, n as TemplatePortal, o as TemplateRowAction, p as TemplateStageRules, q as TemplateView, r as TemplateMergeBinding, s as TemplateTryIt, t as TemplateWorkflow, u as TemplateFootprint, I as IndustryGroup, v as TemplateJob, w as TeachesFeature, x as TemplateViewKind, y as TemplateBookingWindow } from '../types-BWfL38XJ.cjs';
2
+ export { z as CAPABILITY_WORDS, B as CATALOGUE_QUOTAS, D as CATALOGUE_STATUSES, E as CHOICE_COLORS, F as CHOICE_COLORS_DISTINCT_UP_TO, G as CatalogueRow, H as CatalogueStatus, J as ChoiceColor, K as ConfidentialLevel, L as ConfidentialRequest, M as DEFAULT_TEMPLATE_AGENT, N as ENTITY_REFERENCE_KINDS, O as INDUSTRY_GROUPS, R as RELATIVE_DATE, P as RetiredId, Q as SHARED_BLOCKS, U as SHARED_BLOCK_IDS, V as STRENGTHS, W as SharedBlock, X as SharedBlockField, Y as SharedBlockUse, Z as Strength, _ as TABLE_KERNEL_ID, $ as TEACHES_FEATURES, a0 as TEMPLATE_AUDIENCES, a1 as TEMPLATE_EXTRA_KINDS, a2 as TEMPLATE_JOBS, a3 as TEMPLATE_REFERENCE_DATE, a4 as TEMPLATE_SPEC_VERSION, a5 as TEMPLATE_VIEW_KINDS, a6 as TemplateAgentQuestion, a7 as TemplateAgentVariable, a8 as TemplateAudience, a9 as TemplateCalendarView, aa as TemplateChecklistStep, ab as TemplateConfidential, ac as TemplateConfidentialReader, ad as TemplateDashboardBlock, ae as TemplateDimensionOverride, af as TemplateDrillPath, ag as TemplateExtra, ah as TemplateExtraAgent, ai as TemplateExtraAgentVariable, aj as TemplateExtraKind, ak as TemplateFormField, al as TemplateFoundation, am as TemplateGalleryView, an as TemplateGridView, ao as TemplateGuideStep, ap as TemplateKanbanView, aq as TemplateMeasureOverride, ar as TemplatePortalTable, as as TemplateProvenance, at as TemplateSource, au as TemplateTableSettings, av as TemplateTimelineView, aw as TemplateViewSort, ax as UseCaseSingulars, ay as WalkAction, az as WalkAssertion, aA as WalkImport, aB as WalkMove, aC as WalkStep, aD as confidentialPending, aE as confidentialRequests, aF as footprintOf, aG as membersAddRowsSteps, aH as tableSettingsProblems, aI as whenRule } from '../types-BWfL38XJ.cjs';
3
+ import { c as AggregateMeasure, b as AggregateFilter } from '../subscription-CuaGi3lC.cjs';
4
+ import { U as UseCase, o as UseCaseRelationship } from '../types-Bztv0-pH.cjs';
5
+ import { U as UseCaseProblem } from '../validate-8VBa2xIU.cjs';
6
+ export { R as RESOLVABLE_FIELD_TYPE_WORDS } from '../validate-8VBa2xIU.cjs';
7
+ import { d as RecordsDataSource } from '../ports-alv3bgKY.cjs';
8
+ import '../record-CTgSgWe3.cjs';
9
+ import '../rule-49jO7lN-.cjs';
10
+ import '../field-B8loYt-A.cjs';
11
11
 
12
12
  /** The UTC offset ("-04:00") of a local wall-clock moment in an IANA zone. */
13
13
  declare function zoneOffset(localIso: string, timeZone: string): string;
@@ -1,13 +1,13 @@
1
- import { A as AgentSnapshotRow, T as TemplateSpec, a as TemplateTable, S as SharedBlockId, C as CapabilityWord, b as TemplateField, c as TemplateAgent, d as TemplateAutomation, e as TemplateBooking, f as TemplateChecklist, g as TemplateDashboard, h as TemplateDigest, i as TemplateDocument, j as TemplateDrillDown, k as TemplateDimensions, l as TemplateForm, m as TemplateNotification, n as TemplatePortal, o as TemplateRowAction, p as TemplateStageRules, q as TemplateView, r as TemplateMergeBinding, s as TemplateTryIt, t as TemplateWorkflow, u as TemplateFootprint, I as IndustryGroup, v as TemplateJob, w as TeachesFeature, x as TemplateViewKind, y as TemplateBookingWindow } from '../types-BBR2NGqj.js';
2
- export { z as CAPABILITY_WORDS, B as CATALOGUE_QUOTAS, D as CATALOGUE_STATUSES, E as CHOICE_COLORS, F as CHOICE_COLORS_DISTINCT_UP_TO, G as CatalogueRow, H as CatalogueStatus, J as ChoiceColor, K as ConfidentialLevel, L as ConfidentialRequest, M as DEFAULT_TEMPLATE_AGENT, N as ENTITY_REFERENCE_KINDS, O as INDUSTRY_GROUPS, R as RELATIVE_DATE, P as RetiredId, Q as SHARED_BLOCKS, U as SHARED_BLOCK_IDS, V as STRENGTHS, W as SharedBlock, X as SharedBlockField, Y as SharedBlockUse, Z as Strength, _ as TABLE_KERNEL_ID, $ as TEACHES_FEATURES, a0 as TEMPLATE_AUDIENCES, a1 as TEMPLATE_EXTRA_KINDS, a2 as TEMPLATE_JOBS, a3 as TEMPLATE_REFERENCE_DATE, a4 as TEMPLATE_SPEC_VERSION, a5 as TEMPLATE_VIEW_KINDS, a6 as TemplateAgentQuestion, a7 as TemplateAgentVariable, a8 as TemplateAudience, a9 as TemplateCalendarView, aa as TemplateChecklistStep, ab as TemplateConfidential, ac as TemplateConfidentialReader, ad as TemplateDashboardBlock, ae as TemplateDimensionOverride, af as TemplateDrillPath, ag as TemplateExtra, ah as TemplateExtraAgent, ai as TemplateExtraAgentVariable, aj as TemplateExtraKind, ak as TemplateFormField, al as TemplateFoundation, am as TemplateGalleryView, an as TemplateGridView, ao as TemplateGuideStep, ap as TemplateKanbanView, aq as TemplateMeasureOverride, ar as TemplatePortalTable, as as TemplateProvenance, at as TemplateSource, au as TemplateTableSettings, av as TemplateTimelineView, aw as TemplateViewSort, ax as UseCaseSingulars, ay as WalkAction, az as WalkAssertion, aA as WalkImport, aB as WalkMove, aC as WalkStep, aD as confidentialPending, aE as confidentialRequests, aF as footprintOf, aG as membersAddRowsSteps, aH as tableSettingsProblems, aI as whenRule } from '../types-BBR2NGqj.js';
3
- import { c as AggregateMeasure, b as AggregateFilter } from '../subscription-eNzL9scc.js';
4
- import { U as UseCase, o as UseCaseRelationship } from '../types-CmkHpvll.js';
5
- import { U as UseCaseProblem } from '../validate-BB6DWgCP.js';
6
- export { R as RESOLVABLE_FIELD_TYPE_WORDS } from '../validate-BB6DWgCP.js';
7
- import { d as RecordsDataSource } from '../ports-BCNNghmf.js';
8
- import '../record-C8q21jjB.js';
9
- import '../rule-cGqclk_0.js';
10
- import '../field-BHlhq24W.js';
1
+ import { A as AgentSnapshotRow, T as TemplateSpec, a as TemplateTable, S as SharedBlockId, C as CapabilityWord, b as TemplateField, c as TemplateAgent, d as TemplateAutomation, e as TemplateBooking, f as TemplateChecklist, g as TemplateDashboard, h as TemplateDigest, i as TemplateDocument, j as TemplateDrillDown, k as TemplateDimensions, l as TemplateForm, m as TemplateNotification, n as TemplatePortal, o as TemplateRowAction, p as TemplateStageRules, q as TemplateView, r as TemplateMergeBinding, s as TemplateTryIt, t as TemplateWorkflow, u as TemplateFootprint, I as IndustryGroup, v as TemplateJob, w as TeachesFeature, x as TemplateViewKind, y as TemplateBookingWindow } from '../types-BZcYXFK3.js';
2
+ export { z as CAPABILITY_WORDS, B as CATALOGUE_QUOTAS, D as CATALOGUE_STATUSES, E as CHOICE_COLORS, F as CHOICE_COLORS_DISTINCT_UP_TO, G as CatalogueRow, H as CatalogueStatus, J as ChoiceColor, K as ConfidentialLevel, L as ConfidentialRequest, M as DEFAULT_TEMPLATE_AGENT, N as ENTITY_REFERENCE_KINDS, O as INDUSTRY_GROUPS, R as RELATIVE_DATE, P as RetiredId, Q as SHARED_BLOCKS, U as SHARED_BLOCK_IDS, V as STRENGTHS, W as SharedBlock, X as SharedBlockField, Y as SharedBlockUse, Z as Strength, _ as TABLE_KERNEL_ID, $ as TEACHES_FEATURES, a0 as TEMPLATE_AUDIENCES, a1 as TEMPLATE_EXTRA_KINDS, a2 as TEMPLATE_JOBS, a3 as TEMPLATE_REFERENCE_DATE, a4 as TEMPLATE_SPEC_VERSION, a5 as TEMPLATE_VIEW_KINDS, a6 as TemplateAgentQuestion, a7 as TemplateAgentVariable, a8 as TemplateAudience, a9 as TemplateCalendarView, aa as TemplateChecklistStep, ab as TemplateConfidential, ac as TemplateConfidentialReader, ad as TemplateDashboardBlock, ae as TemplateDimensionOverride, af as TemplateDrillPath, ag as TemplateExtra, ah as TemplateExtraAgent, ai as TemplateExtraAgentVariable, aj as TemplateExtraKind, ak as TemplateFormField, al as TemplateFoundation, am as TemplateGalleryView, an as TemplateGridView, ao as TemplateGuideStep, ap as TemplateKanbanView, aq as TemplateMeasureOverride, ar as TemplatePortalTable, as as TemplateProvenance, at as TemplateSource, au as TemplateTableSettings, av as TemplateTimelineView, aw as TemplateViewSort, ax as UseCaseSingulars, ay as WalkAction, az as WalkAssertion, aA as WalkImport, aB as WalkMove, aC as WalkStep, aD as confidentialPending, aE as confidentialRequests, aF as footprintOf, aG as membersAddRowsSteps, aH as tableSettingsProblems, aI as whenRule } from '../types-BZcYXFK3.js';
3
+ import { c as AggregateMeasure, b as AggregateFilter } from '../subscription-Bp1RSb6p.js';
4
+ import { U as UseCase, o as UseCaseRelationship } from '../types-CjGuR5ks.js';
5
+ import { U as UseCaseProblem } from '../validate-xBnply7J.js';
6
+ export { R as RESOLVABLE_FIELD_TYPE_WORDS } from '../validate-xBnply7J.js';
7
+ import { d as RecordsDataSource } from '../ports-CmmvR8OI.js';
8
+ import '../record-CTgSgWe3.js';
9
+ import '../rule-DzNj0QvN.js';
10
+ import '../field-DaE90BZ7.js';
11
11
 
12
12
  /** The UTC offset ("-04:00") of a local wall-clock moment in an IANA zone. */
13
13
  declare function zoneOffset(localIso: string, timeZone: string): string;
@@ -1,13 +1,13 @@
1
- import { N as NewFieldSpec } from '../declareTable-enQs2N0E.cjs';
2
- import { U as Uuid, R as RecordsResult, k as RecordPageSort } from '../record-C8q21jjB.cjs';
3
- import { F as FieldDrift, R as RecordsClient, T as TableArchiveProgress } from '../client-B7KEs9hi.cjs';
4
- import '../field-ppX29ddi.cjs';
5
- import '../subscription-Ba8RKtPA.cjs';
6
- import '../rule-BQwUtKk5.cjs';
7
- import '../relation-Bwp8iuei.cjs';
8
- import '../ports-iATV-A2v.cjs';
9
- import '../doors-KbjyhBW-.cjs';
10
- import '../portal-ffH13fsE.cjs';
1
+ import { N as NewFieldSpec } from '../declareTable-BIIt0Wqt.cjs';
2
+ import { U as Uuid, R as RecordsResult, k as RecordPageSort } from '../record-CTgSgWe3.cjs';
3
+ import { F as FieldDrift, R as RecordsClient, T as TableArchiveProgress } from '../client-D1EwyWfh.cjs';
4
+ import '../field-B8loYt-A.cjs';
5
+ import '../subscription-CuaGi3lC.cjs';
6
+ import '../rule-49jO7lN-.cjs';
7
+ import '../relation-BjjjXyqn.cjs';
8
+ import '../ports-alv3bgKY.cjs';
9
+ import '../doors-D1yAs0a0.cjs';
10
+ import '../portal-L_mN8l9P.cjs';
11
11
  import '../table-kind/index.cjs';
12
12
 
13
13
  /** Where a declared field's value goes in the graduated table. */
@@ -1,13 +1,13 @@
1
- import { N as NewFieldSpec } from '../declareTable-CvBu5dTJ.js';
2
- import { U as Uuid, R as RecordsResult, k as RecordPageSort } from '../record-C8q21jjB.js';
3
- import { F as FieldDrift, R as RecordsClient, T as TableArchiveProgress } from '../client-Dthx26hr.js';
4
- import '../field-BHlhq24W.js';
5
- import '../subscription-eNzL9scc.js';
6
- import '../rule-cGqclk_0.js';
7
- import '../relation-Bsjwkn6N.js';
8
- import '../ports-BCNNghmf.js';
9
- import '../doors-C2-sFvAk.js';
10
- import '../portal-DmxuUr2f.js';
1
+ import { N as NewFieldSpec } from '../declareTable-CC5rTTIA.js';
2
+ import { U as Uuid, R as RecordsResult, k as RecordPageSort } from '../record-CTgSgWe3.js';
3
+ import { F as FieldDrift, R as RecordsClient, T as TableArchiveProgress } from '../client-CrwedBYU.js';
4
+ import '../field-DaE90BZ7.js';
5
+ import '../subscription-Bp1RSb6p.js';
6
+ import '../rule-DzNj0QvN.js';
7
+ import '../relation-T4biacnz.js';
8
+ import '../ports-CmmvR8OI.js';
9
+ import '../doors-D2z3kH2i.js';
10
+ import '../portal-CAssJHRZ.js';
11
11
  import '../table-kind/index.js';
12
12
 
13
13
  /** Where a declared field's value goes in the graduated table. */
@@ -1,5 +1,5 @@
1
- import { E as EntityRefWithWords } from './relation-Bwp8iuei.cjs';
2
- import { U as Uuid, R as RecordsResult } from './record-C8q21jjB.cjs';
1
+ import { E as EntityRefWithWords } from './relation-BjjjXyqn.cjs';
2
+ import { U as Uuid, R as RecordsResult } from './record-CTgSgWe3.cjs';
3
3
 
4
4
  /** §0. A link to any thing: `{token, id, label}`. A custom row's token is `record`. Every link reads as `EntityRef[]`. */
5
5
  type EntityRef = EntityRefWithWords;
@@ -1,5 +1,5 @@
1
- import { a as AggregateOperation, b as AggregateFilter, D as DashboardBlockKind, c as AggregateMeasure, A as AggregateBucket, S as SubscriptionCadence } from './subscription-Ba8RKtPA.cjs';
2
- import { U as UseCase, a as UseCaseTable, b as UseCaseField, c as UseCaseRow, d as UseCaseForm, e as UseCaseFormField, f as UseCaseNotificationTrigger, N as NotificationChannel, g as UseCaseProvenance } from './types-EKwXJfxY.cjs';
1
+ import { a as AggregateOperation, b as AggregateFilter, D as DashboardBlockKind, c as AggregateMeasure, A as AggregateBucket, S as SubscriptionCadence } from './subscription-CuaGi3lC.cjs';
2
+ import { U as UseCase, a as UseCaseTable, b as UseCaseField, c as UseCaseRow, d as UseCaseForm, e as UseCaseFormField, f as UseCaseNotificationTrigger, N as NotificationChannel, g as UseCaseProvenance } from './types-Bztv0-pH.cjs';
3
3
 
4
4
  declare const TABLE_KERNEL_ID = "11111111-0000-4000-8000-000000000001";
5
5
  type ConfidentialLevel = "viewer" | "commenter" | "editor";
@@ -1,5 +1,5 @@
1
- import { a as AggregateOperation, b as AggregateFilter, D as DashboardBlockKind, c as AggregateMeasure, A as AggregateBucket, S as SubscriptionCadence } from './subscription-eNzL9scc.js';
2
- import { U as UseCase, a as UseCaseTable, b as UseCaseField, c as UseCaseRow, d as UseCaseForm, e as UseCaseFormField, f as UseCaseNotificationTrigger, N as NotificationChannel, g as UseCaseProvenance } from './types-CmkHpvll.js';
1
+ import { a as AggregateOperation, b as AggregateFilter, D as DashboardBlockKind, c as AggregateMeasure, A as AggregateBucket, S as SubscriptionCadence } from './subscription-Bp1RSb6p.js';
2
+ import { U as UseCase, a as UseCaseTable, b as UseCaseField, c as UseCaseRow, d as UseCaseForm, e as UseCaseFormField, f as UseCaseNotificationTrigger, N as NotificationChannel, g as UseCaseProvenance } from './types-CjGuR5ks.js';
3
3
 
4
4
  declare const TABLE_KERNEL_ID = "11111111-0000-4000-8000-000000000001";
5
5
  type ConfidentialLevel = "viewer" | "commenter" | "editor";
@@ -1,5 +1,5 @@
1
- import { T as TableType, b as TableDisplay, S as StorageMode, F as FieldSource, C as ComputeOn, c as FieldSensitivity, d as ContextPolicy, e as RelationFlavor, f as RelationCardinality, O as OnDelete } from './record-C8q21jjB.cjs';
2
- import { a as FieldTypeWord, b as FieldRule } from './field-ppX29ddi.cjs';
1
+ import { T as TableType, b as TableDisplay, S as StorageMode, F as FieldSource, C as ComputeOn, c as FieldSensitivity, d as ContextPolicy, e as RelationFlavor, f as RelationCardinality, O as OnDelete } from './record-CTgSgWe3.cjs';
2
+ import { a as FieldTypeWord, b as FieldRule } from './field-B8loYt-A.cjs';
3
3
 
4
4
  /**
5
5
  * Who the data belongs to. A test organization is created under this name — the
@@ -1,5 +1,5 @@
1
- import { T as TableType, b as TableDisplay, S as StorageMode, F as FieldSource, C as ComputeOn, c as FieldSensitivity, d as ContextPolicy, e as RelationFlavor, f as RelationCardinality, O as OnDelete } from './record-C8q21jjB.js';
2
- import { a as FieldTypeWord, b as FieldRule } from './field-BHlhq24W.js';
1
+ import { T as TableType, b as TableDisplay, S as StorageMode, F as FieldSource, C as ComputeOn, c as FieldSensitivity, d as ContextPolicy, e as RelationFlavor, f as RelationCardinality, O as OnDelete } from './record-CTgSgWe3.js';
2
+ import { a as FieldTypeWord, b as FieldRule } from './field-DaE90BZ7.js';
3
3
 
4
4
  /**
5
5
  * Who the data belongs to. A test organization is created under this name — the
@@ -1,5 +1,5 @@
1
- import { E as EntityRefWithWords } from './relation-Bsjwkn6N.js';
2
- import { U as Uuid, R as RecordsResult } from './record-C8q21jjB.js';
1
+ import { E as EntityRefWithWords } from './relation-T4biacnz.js';
2
+ import { U as Uuid, R as RecordsResult } from './record-CTgSgWe3.js';
3
3
 
4
4
  /** §0. A link to any thing: `{token, id, label}`. A custom row's token is `record`. Every link reads as `EntityRef[]`. */
5
5
  type EntityRef = EntityRefWithWords;
@@ -1,8 +1,8 @@
1
- import { U as UseCase, h as UseCaseSummary } from '../types-EKwXJfxY.cjs';
2
- export { B as BusinessIdentity, F as FormAudience, N as NotificationChannel, P as PostalAddress, i as UseCaseDashboardQuestion, j as UseCaseDocumentTemplate, b as UseCaseField, d as UseCaseForm, e as UseCaseFormField, k as UseCaseMergeField, l as UseCaseNotificationRule, f as UseCaseNotificationTrigger, m as UseCasePipeline, n as UseCasePipelineStage, g as UseCaseProvenance, o as UseCaseRelationship, c as UseCaseRow, a as UseCaseTable } from '../types-EKwXJfxY.cjs';
3
- export { M as MIN_ROWS_IN_PRIMARY_TABLE, R as RESOLVABLE_FIELD_TYPE_WORDS, U as UseCaseProblem, a as UseCaseVerdict, b as assertUseCase, v as validateUseCase } from '../validate-BKeBAVSi.cjs';
4
- import '../record-C8q21jjB.cjs';
5
- import '../field-ppX29ddi.cjs';
1
+ import { U as UseCase, h as UseCaseSummary } from '../types-Bztv0-pH.cjs';
2
+ export { B as BusinessIdentity, F as FormAudience, N as NotificationChannel, P as PostalAddress, i as UseCaseDashboardQuestion, j as UseCaseDocumentTemplate, b as UseCaseField, d as UseCaseForm, e as UseCaseFormField, k as UseCaseMergeField, l as UseCaseNotificationRule, f as UseCaseNotificationTrigger, m as UseCasePipeline, n as UseCasePipelineStage, g as UseCaseProvenance, o as UseCaseRelationship, c as UseCaseRow, a as UseCaseTable } from '../types-Bztv0-pH.cjs';
3
+ export { M as MIN_ROWS_IN_PRIMARY_TABLE, R as RESOLVABLE_FIELD_TYPE_WORDS, U as UseCaseProblem, a as UseCaseVerdict, b as assertUseCase, v as validateUseCase } from '../validate-8VBa2xIU.cjs';
4
+ import '../record-CTgSgWe3.cjs';
5
+ import '../field-B8loYt-A.cjs';
6
6
 
7
7
  /** One banned pattern, with the reason and what to do instead. */
8
8
  interface PlaceholderPattern {
@@ -1,8 +1,8 @@
1
- import { U as UseCase, h as UseCaseSummary } from '../types-CmkHpvll.js';
2
- export { B as BusinessIdentity, F as FormAudience, N as NotificationChannel, P as PostalAddress, i as UseCaseDashboardQuestion, j as UseCaseDocumentTemplate, b as UseCaseField, d as UseCaseForm, e as UseCaseFormField, k as UseCaseMergeField, l as UseCaseNotificationRule, f as UseCaseNotificationTrigger, m as UseCasePipeline, n as UseCasePipelineStage, g as UseCaseProvenance, o as UseCaseRelationship, c as UseCaseRow, a as UseCaseTable } from '../types-CmkHpvll.js';
3
- export { M as MIN_ROWS_IN_PRIMARY_TABLE, R as RESOLVABLE_FIELD_TYPE_WORDS, U as UseCaseProblem, a as UseCaseVerdict, b as assertUseCase, v as validateUseCase } from '../validate-BB6DWgCP.js';
4
- import '../record-C8q21jjB.js';
5
- import '../field-BHlhq24W.js';
1
+ import { U as UseCase, h as UseCaseSummary } from '../types-CjGuR5ks.js';
2
+ export { B as BusinessIdentity, F as FormAudience, N as NotificationChannel, P as PostalAddress, i as UseCaseDashboardQuestion, j as UseCaseDocumentTemplate, b as UseCaseField, d as UseCaseForm, e as UseCaseFormField, k as UseCaseMergeField, l as UseCaseNotificationRule, f as UseCaseNotificationTrigger, m as UseCasePipeline, n as UseCasePipelineStage, g as UseCaseProvenance, o as UseCaseRelationship, c as UseCaseRow, a as UseCaseTable } from '../types-CjGuR5ks.js';
3
+ export { M as MIN_ROWS_IN_PRIMARY_TABLE, R as RESOLVABLE_FIELD_TYPE_WORDS, U as UseCaseProblem, a as UseCaseVerdict, b as assertUseCase, v as validateUseCase } from '../validate-xBnply7J.js';
4
+ import '../record-CTgSgWe3.js';
5
+ import '../field-DaE90BZ7.js';
6
6
 
7
7
  /** One banned pattern, with the reason and what to do instead. */
8
8
  interface PlaceholderPattern {
@@ -1,4 +1,4 @@
1
- import { U as UseCase } from './types-EKwXJfxY.cjs';
1
+ import { U as UseCase } from './types-Bztv0-pH.cjs';
2
2
 
3
3
  /**
4
4
  * Every word a `parityType` may be: the parity types, every kind the declaration door
@@ -1,4 +1,4 @@
1
- import { U as UseCase } from './types-CmkHpvll.js';
1
+ import { U as UseCase } from './types-CjGuR5ks.js';
2
2
 
3
3
  /**
4
4
  * Every word a `parityType` may be: the parity types, every kind the declaration door
@@ -1,12 +1,12 @@
1
- import { R as RuleExpression } from '../rule-BQwUtKk5.cjs';
2
- import { R as RecordFilter, d as SavedViewRow } from '../subscription-Ba8RKtPA.cjs';
3
- import { R as RecordsClient } from '../client-B7KEs9hi.cjs';
4
- import { U as Uuid, R as RecordsResult } from '../record-C8q21jjB.cjs';
5
- import '../relation-Bwp8iuei.cjs';
6
- import '../ports-iATV-A2v.cjs';
7
- import '../field-ppX29ddi.cjs';
8
- import '../doors-KbjyhBW-.cjs';
9
- import '../portal-ffH13fsE.cjs';
1
+ import { R as RuleExpression } from '../rule-49jO7lN-.cjs';
2
+ import { R as RecordFilter, d as SavedViewRow } from '../subscription-CuaGi3lC.cjs';
3
+ import { R as RecordsClient } from '../client-D1EwyWfh.cjs';
4
+ import { U as Uuid, R as RecordsResult } from '../record-CTgSgWe3.cjs';
5
+ import '../relation-BjjjXyqn.cjs';
6
+ import '../ports-alv3bgKY.cjs';
7
+ import '../field-B8loYt-A.cjs';
8
+ import '../doors-D1yAs0a0.cjs';
9
+ import '../portal-L_mN8l9P.cjs';
10
10
  import '../table-kind/index.cjs';
11
11
 
12
12
  /** A view's look as the store keeps it: one JSON object under `definition.presentation`. */
@@ -1,12 +1,12 @@
1
- import { R as RuleExpression } from '../rule-cGqclk_0.js';
2
- import { R as RecordFilter, d as SavedViewRow } from '../subscription-eNzL9scc.js';
3
- import { R as RecordsClient } from '../client-Dthx26hr.js';
4
- import { U as Uuid, R as RecordsResult } from '../record-C8q21jjB.js';
5
- import '../relation-Bsjwkn6N.js';
6
- import '../ports-BCNNghmf.js';
7
- import '../field-BHlhq24W.js';
8
- import '../doors-C2-sFvAk.js';
9
- import '../portal-DmxuUr2f.js';
1
+ import { R as RuleExpression } from '../rule-DzNj0QvN.js';
2
+ import { R as RecordFilter, d as SavedViewRow } from '../subscription-Bp1RSb6p.js';
3
+ import { R as RecordsClient } from '../client-CrwedBYU.js';
4
+ import { U as Uuid, R as RecordsResult } from '../record-CTgSgWe3.js';
5
+ import '../relation-T4biacnz.js';
6
+ import '../ports-CmmvR8OI.js';
7
+ import '../field-DaE90BZ7.js';
8
+ import '../doors-D2z3kH2i.js';
9
+ import '../portal-CAssJHRZ.js';
10
10
  import '../table-kind/index.js';
11
11
 
12
12
  /** A view's look as the store keeps it: one JSON object under `definition.presentation`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/records",
3
- "version": "0.99.31",
3
+ "version": "0.99.32",
4
4
  "description": "The headless client of the AI Matrx record store: the Table / Field / Rule / Record / Relation / Home types, the closed vocabularies and refusal codes read from the store itself, the typed calls over the store's doors and nothing else, the merge-field declaration, a validation mirror that predicts only what the store's own triggers refuse, and the never-throw result envelope. Zero React, zero DOM in the root and /core.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -225,6 +225,16 @@
225
225
  "default": "./dist/table-kind/index.cjs"
226
226
  }
227
227
  },
228
+ "./results": {
229
+ "import": {
230
+ "types": "./dist/results/index.d.ts",
231
+ "default": "./dist/results/index.js"
232
+ },
233
+ "require": {
234
+ "types": "./dist/results/index.d.cts",
235
+ "default": "./dist/results/index.cjs"
236
+ }
237
+ },
228
238
  "./first-page": {
229
239
  "import": {
230
240
  "types": "./dist/first-page/index.d.ts",
@@ -285,8 +295,8 @@
285
295
  "typescript": "^6.0.3",
286
296
  "vitest": "^5.0.1",
287
297
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
288
- "@ai-matrx/design-system": "0.86.2",
289
- "@ai-matrx/content-ir": "0.24.1"
298
+ "@ai-matrx/content-ir": "0.24.1",
299
+ "@ai-matrx/design-system": "0.86.2"
290
300
  },
291
301
  "publishConfig": {
292
302
  "access": "public",
@@ -297,8 +307,8 @@
297
307
  },
298
308
  "sideEffects": false,
299
309
  "dependencies": {
300
- "@ai-matrx/data": "latest",
301
310
  "@ai-matrx/kit": "latest",
311
+ "@ai-matrx/data": "latest",
302
312
  "@ai-matrx/print": "latest"
303
313
  },
304
314
  "matrx": {
@@ -342,5 +352,5 @@
342
352
  "describe-bench:run": "../../../.venv/bin/python scripts/describe-bench/score-env.py run",
343
353
  "describe-bench:arms": "../../../.venv/bin/python scripts/describe-bench/score-env.py arms"
344
354
  },
345
- "gitHead": "bfacbee0f5b772593eb696a1b957d681e1897402"
355
+ "gitHead": "ff7c99ff7526f2d8bdf98eaa43d6e8f8f1431c17"
346
356
  }