@genesislcap/ai-assistant 15.49.0 → 15.50.0-BACE-0.1

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 (52) hide show
  1. package/dist/custom-elements.json +100 -2
  2. package/dist/dts/genesis/config.d.ts +31 -0
  3. package/dist/dts/genesis/config.d.ts.map +1 -1
  4. package/dist/dts/genesis/consumes.d.ts.map +1 -1
  5. package/dist/dts/genesis/index.d.ts +2 -2
  6. package/dist/dts/genesis/index.d.ts.map +1 -1
  7. package/dist/dts/genesis/reference-check.d.ts +4 -3
  8. package/dist/dts/genesis/reference-check.d.ts.map +1 -1
  9. package/dist/dts/genesis/reference-existence.d.ts +3 -3
  10. package/dist/dts/genesis/reference-existence.d.ts.map +1 -1
  11. package/dist/dts/genesis/review-model.d.ts +59 -4
  12. package/dist/dts/genesis/review-model.d.ts.map +1 -1
  13. package/dist/dts/genesis/types.d.ts +43 -0
  14. package/dist/dts/genesis/types.d.ts.map +1 -1
  15. package/dist/dts/genesis/write-commit.d.ts +2 -2
  16. package/dist/dts/genesis/write-commit.d.ts.map +1 -1
  17. package/dist/dts/genesis/write-op.d.ts +34 -0
  18. package/dist/dts/genesis/write-op.d.ts.map +1 -0
  19. package/dist/dts/genesis/write-outcome.d.ts +2 -2
  20. package/dist/dts/genesis/write-outcome.d.ts.map +1 -1
  21. package/dist/dts/genesis/write-payload.d.ts +3 -3
  22. package/dist/dts/genesis/write-payload.d.ts.map +1 -1
  23. package/dist/dts/genesis/write-plan.d.ts +18 -7
  24. package/dist/dts/genesis/write-plan.d.ts.map +1 -1
  25. package/dist/dts/genesis/write-review/write-review.d.ts +6 -0
  26. package/dist/dts/genesis/write-review/write-review.d.ts.map +1 -1
  27. package/dist/dts/genesis/write-review/write-review.styles.d.ts.map +1 -1
  28. package/dist/dts/genesis/write-review/write-review.template.d.ts.map +1 -1
  29. package/dist/dts/genesis/write-tools.d.ts +2 -2
  30. package/dist/dts/genesis/write-tools.d.ts.map +1 -1
  31. package/dist/dts/genesis/write-turn.d.ts +5 -3
  32. package/dist/dts/genesis/write-turn.d.ts.map +1 -1
  33. package/dist/esm/genesis/config.js +204 -5
  34. package/dist/esm/genesis/consumes.js +5 -0
  35. package/dist/esm/genesis/index.js +1 -1
  36. package/dist/esm/genesis/review-model.js +62 -10
  37. package/dist/esm/genesis/write-op.js +18 -0
  38. package/dist/esm/genesis/write-outcome.js +13 -6
  39. package/dist/esm/genesis/write-payload.js +22 -10
  40. package/dist/esm/genesis/write-plan.js +121 -12
  41. package/dist/esm/genesis/write-review/write-review.js +20 -1
  42. package/dist/esm/genesis/write-review/write-review.styles.js +14 -0
  43. package/dist/esm/genesis/write-review/write-review.template.js +25 -7
  44. package/dist/esm/genesis/write-tools.js +304 -74
  45. package/dist/esm/genesis/write-turn.js +9 -5
  46. package/dist/genesis-consumes.cjs +6 -1
  47. package/dist/genesis-consumes.cjs.map +2 -2
  48. package/dist/genesis-consumes.mjs +6 -1
  49. package/dist/genesis-consumes.mjs.map +2 -2
  50. package/docs/genesis.md +171 -45
  51. package/package.json +17 -17
  52. package/scripts/smoke-genesis-consumes-node.mjs +14 -1
@@ -2004,6 +2004,39 @@
2004
2004
  ],
2005
2005
  "description": "The model-facing tool name for a resource. Deterministic and collision-free (resource names\nare unique), and trivially mapped back to the resource in a debug log. What the tool is FOR\nreaches the model through its description, not its name."
2006
2006
  },
2007
+ {
2008
+ "kind": "function",
2009
+ "name": "rowActionProblem",
2010
+ "return": {
2011
+ "type": {
2012
+ "text": "string | undefined"
2013
+ }
2014
+ },
2015
+ "parameters": [
2016
+ {
2017
+ "name": "resource",
2018
+ "type": {
2019
+ "text": "Partial<GenesisAiResource> | null"
2020
+ }
2021
+ },
2022
+ {
2023
+ "name": "requestNames",
2024
+ "type": {
2025
+ "text": "ReadonlySet<string>"
2026
+ },
2027
+ "description": "The request resources whose rows can be read. A row action reads its rows\nthrough `REQ_<entity>`, and without one there is no row to review."
2028
+ },
2029
+ {
2030
+ "name": "whyNotReadable",
2031
+ "default": "notReadableReason({})",
2032
+ "type": {
2033
+ "text": "(name: string) => string"
2034
+ },
2035
+ "description": "Why a request is not among `requestNames`, when the caller knows: it was\nleft out, has no read tool, or is a query. Without it, the request is said to be missing."
2036
+ }
2037
+ ],
2038
+ "description": "What is wrong with a resource's row-action fields (contracts C-18.7.2), if anything."
2039
+ },
2007
2040
  {
2008
2041
  "kind": "function",
2009
2042
  "name": "validateGenesisAiConfig",
@@ -2066,6 +2099,14 @@
2066
2099
  "module": "src/genesis/config.ts"
2067
2100
  }
2068
2101
  },
2102
+ {
2103
+ "kind": "js",
2104
+ "name": "rowActionProblem",
2105
+ "declaration": {
2106
+ "name": "rowActionProblem",
2107
+ "module": "src/genesis/config.ts"
2108
+ }
2109
+ },
2069
2110
  {
2070
2111
  "kind": "js",
2071
2112
  "name": "validateGenesisAiConfig",
@@ -2240,6 +2281,14 @@
2240
2281
  "module": "./config"
2241
2282
  }
2242
2283
  },
2284
+ {
2285
+ "kind": "js",
2286
+ "name": "rowActionProblem",
2287
+ "declaration": {
2288
+ "name": "rowActionProblem",
2289
+ "module": "./config"
2290
+ }
2291
+ },
2243
2292
  {
2244
2293
  "kind": "js",
2245
2294
  "name": "GENESIS_AI_CONSUMES",
@@ -2512,6 +2561,22 @@
2512
2561
  "module": "./types"
2513
2562
  }
2514
2563
  },
2564
+ {
2565
+ "kind": "js",
2566
+ "name": "GenesisRowEffect",
2567
+ "declaration": {
2568
+ "name": "GenesisRowEffect",
2569
+ "module": "./types"
2570
+ }
2571
+ },
2572
+ {
2573
+ "kind": "js",
2574
+ "name": "GenesisRowInput",
2575
+ "declaration": {
2576
+ "name": "GenesisRowInput",
2577
+ "module": "./types"
2578
+ }
2579
+ },
2515
2580
  {
2516
2581
  "kind": "js",
2517
2582
  "name": "RegisterGenesisAssistantOptions",
@@ -2948,6 +3013,12 @@
2948
3013
  "declarations": [],
2949
3014
  "exports": []
2950
3015
  },
3016
+ {
3017
+ "kind": "javascript-module",
3018
+ "path": "src/genesis/write-op.ts",
3019
+ "declarations": [],
3020
+ "exports": []
3021
+ },
2951
3022
  {
2952
3023
  "kind": "javascript-module",
2953
3024
  "path": "src/genesis/write-outcome.ts",
@@ -15900,7 +15971,7 @@
15900
15971
  {
15901
15972
  "kind": "variable",
15902
15973
  "name": "WriteReviewStyles",
15903
- "default": "css`\n :host {\n display: block;\n font: inherit;\n\n /* The diff tints — see the diff rules below for why they are backgrounds only. */\n --write-review-added: color-mix(in srgb, var(--success-fill-rest, #2da44e) 18%, transparent);\n --write-review-removed: color-mix(in srgb, var(--error-fill-rest, #cf222e) 18%, transparent);\n }\n\n /*\n * The review mounts inside the chat bubble's dialog content, which is overflow: hidden — so a\n * wide event's columns were CLIPPED rather than pushed off screen, with no scrollbar to say\n * anything was missing. A user approving values they cannot see is the failure this whole\n * component exists to prevent, so the table scrolls within itself.\n */\n .scroller {\n overflow-x: auto;\n max-width: 100%;\n }\n\n table {\n border-collapse: collapse;\n width: 100%;\n }\n\n th,\n td {\n border-bottom: calc(var(--stroke-width, 1) * 1px) solid var(--neutral-stroke-rest);\n padding: calc(var(--design-unit, 4) * 1px) calc(var(--design-unit, 4) * 2px);\n text-align: left;\n }\n\n /* A heading is a column name: kept on one line. */\n th {\n white-space: nowrap;\n }\n\n /*\n * A value is never clipped. Every character stays on screen.\n *\n * Clipping was the first bound, and the wrong one: 24ch with an ellipsis cut the END of every\n * cell, which in a changed cell is the NEW value, so the user approved a value they never saw.\n * No cell is safe to clip either. An insert has no pre-image, so none of its cells is\n * \"changed\", and every one of them is a value being written; a delete's cells are the record\n * being removed; and a title attribute holding the full text reaches nobody on a keyboard or a\n * touch screen.\n *\n * A SHORT value stays whole on one line, and the table scrolls. Wrapping every cell broke a\n * short value mid-token in a squeezed table — \"101.\" over \"2345\" — and the first line could\n * pass for the whole value.\n *\n * A LONG value (review-model marks it) wraps within a bound. With no bound at all, one long\n * value (a NOTE another user wrote) widened its column until the changed one sat out of view,\n * behind a scrollbar an overlay-scrollbar platform does not draw until you scroll.\n */\n td {\n white-space: nowrap;\n }\n\n td.long {\n white-space: normal;\n overflow-wrap: anywhere;\n\n /*\n * A floor as well as a ceiling. With only the ceiling, a squeezed table shrank a long value's\n * column to a sliver (a 100-character note became 22 lines of a few characters each) while\n * the one-line cells kept their width. The table scrolls instead.\n */\n min-width: 20ch;\n max-width: 40ch;\n }\n\n /*\n * The two marks this table carries — \"this field is changing\" and \"this field decides which\n * record disappears\" — were weight, colour and a strike-through only. None of that reaches\n * somebody using a screen reader, who is the one approver with no other way to tell, so each\n * mark has words as well.\n */\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n }\n\n /*\n * A delete shows the whole record and sends its key alone, so the fields that actually decide\n * which record disappears are marked. Not colour alone — an underline carries to a user who\n * cannot distinguish it.\n */\n td.identifying {\n font-weight: 600;\n text-decoration: underline;\n }\n\n /*\n * The diff, the way a code review shows one: what goes is tinted as removed and struck through,\n * what comes in is tinted as added and bold. Only the BACKGROUND is tinted, at low alpha, from\n * the theme's own success and error tokens (with fallbacks, as foundation-forms does), and the\n * text keeps the normal foreground colour: coloured text on a coloured ground is where contrast\n * fails, dark mode first. The tint is never the only signal. Strike-through, weight, the visible\n * + and − marks and the spoken \"was\" and \"now\" all carry the same thing without colour.\n */\n\n /* The mark a user's eye needs: this field is being changed. */\n td.changed {\n font-weight: 600;\n }\n\n /* On its own line above the new value, so neither can push the other out of view. */\n td.changed .was {\n display: block;\n font-weight: 400;\n text-decoration: line-through;\n background: var(--write-review-removed);\n }\n\n td.changed .now {\n display: block;\n background: var(--write-review-added);\n }\n\n /* Room inside the tint, so the − and + do not sit on its edge. */\n td.changed .was,\n td.changed .now {\n padding-inline: calc(var(--design-unit, 4) * 1px);\n }\n\n /*\n * A row that will not be written is never tinted, not even inside a cell. For a refused row\n * review-model already gives it no changed cells, and this is the second guard. For a row the\n * resolved review did not approve, the − and + stay as the record of what was proposed, but\n * without the tint that says it will happen.\n */\n tr.refused td.changed .was,\n tr.refused td.changed .now,\n tr.unwritten td.changed .was,\n tr.unwritten td.changed .now {\n background: none;\n }\n\n /* A whole row coming in, or going. A refused row is neither, and keeps its muted look. */\n tr.added td {\n background: var(--write-review-added);\n }\n\n tr.removed td {\n background: var(--write-review-removed);\n }\n\n /*\n * A closed review's row that was not approved says so in words — without them, a denied modify\n * read in greyscale or by a screen reader exactly like an approved one. An approved row says what\n * came of it the same way, once the write tool has recorded that (written, not written\n * because the user stopped, or its own reason).\n */\n .not-written,\n .fate {\n margin-inline-start: calc(var(--design-unit, 4) * 1.5px);\n font-size: var(--type-ramp-minus-1-font-size, 0.875em);\n color: var(--neutral-foreground-hint);\n }\n\n /* The empty placeholder: a style no row text can take, so a literal \"(blank)\" cannot pass for it. */\n .blank {\n font-style: italic;\n font-weight: 400;\n color: var(--neutral-foreground-hint);\n }\n\n .mark {\n font-weight: 600;\n padding-inline-end: calc(var(--design-unit, 4) * 1px);\n user-select: none;\n }\n\n /* The row's + or − sits beside its checkbox, not on the baseline under it (where − reads as _). */\n td.select {\n white-space: nowrap;\n }\n\n td.select rapid-checkbox,\n td.select .mark {\n vertical-align: middle;\n }\n\n /* A gap from the checkbox, so the mark reads as the row's sign rather than part of the box. */\n td.select .mark {\n margin-inline-start: calc(var(--design-unit, 4) * 1.5px);\n }\n\n /* The strike-through belongs to the value, not to its − mark. */\n td.changed .was .mark {\n display: inline-block;\n text-decoration: none;\n }\n\n tr.refused {\n color: var(--neutral-foreground-hint);\n }\n\n /* A refusal is a sentence, and it spans the table: it wraps rather than running off it. */\n .problems {\n color: var(--error-fill-rest, #c00);\n white-space: normal;\n }\n\n .actions {\n display: flex;\n gap: calc(var(--design-unit, 4) * 2px);\n margin-top: calc(var(--design-unit, 4) * 2px);\n }\n\n /* The change request takes the width the buttons leave it. */\n .change-request {\n flex: 1 1 24ch;\n }\n\n /* The outcome's live region is always there; while the review is open it takes no room. */\n .closed:empty {\n margin: 0;\n }\n\n /* The count sits at the foot of the field, beside it rather than in its way. */\n .remaining {\n align-self: flex-end;\n white-space: nowrap;\n font-size: var(--type-ramp-minus-1-font-size, 0.875em);\n color: var(--neutral-foreground-hint);\n }\n`"
15974
+ "default": "css`\n :host {\n display: block;\n font: inherit;\n\n /* The diff tints — see the diff rules below for why they are backgrounds only. */\n --write-review-added: color-mix(in srgb, var(--success-fill-rest, #2da44e) 18%, transparent);\n --write-review-removed: color-mix(in srgb, var(--error-fill-rest, #cf222e) 18%, transparent);\n }\n\n /*\n * The review mounts inside the chat bubble's dialog content, which is overflow: hidden — so a\n * wide event's columns were CLIPPED rather than pushed off screen, with no scrollbar to say\n * anything was missing. A user approving values they cannot see is the failure this whole\n * component exists to prevent, so the table scrolls within itself.\n */\n .scroller {\n overflow-x: auto;\n max-width: 100%;\n }\n\n table {\n border-collapse: collapse;\n width: 100%;\n }\n\n th,\n td {\n border-bottom: calc(var(--stroke-width, 1) * 1px) solid var(--neutral-stroke-rest);\n padding: calc(var(--design-unit, 4) * 1px) calc(var(--design-unit, 4) * 2px);\n text-align: left;\n }\n\n /* A heading is a column name: kept on one line. */\n th {\n white-space: nowrap;\n }\n\n /*\n * A value is never clipped. Every character stays on screen.\n *\n * Clipping was the first bound, and the wrong one: 24ch with an ellipsis cut the END of every\n * cell, which in a changed cell is the NEW value, so the user approved a value they never saw.\n * No cell is safe to clip either. An insert has no pre-image, so none of its cells is\n * \"changed\", and every one of them is a value being written; a delete's cells are the record\n * being removed; and a title attribute holding the full text reaches nobody on a keyboard or a\n * touch screen.\n *\n * A SHORT value stays whole on one line, and the table scrolls. Wrapping every cell broke a\n * short value mid-token in a squeezed table — \"101.\" over \"2345\" — and the first line could\n * pass for the whole value.\n *\n * A LONG value (review-model marks it) wraps within a bound. With no bound at all, one long\n * value (a NOTE another user wrote) widened its column until the changed one sat out of view,\n * behind a scrollbar an overlay-scrollbar platform does not draw until you scroll.\n */\n td {\n white-space: nowrap;\n }\n\n td.long {\n white-space: normal;\n overflow-wrap: anywhere;\n\n /*\n * A floor as well as a ceiling. With only the ceiling, a squeezed table shrank a long value's\n * column to a sliver (a 100-character note became 22 lines of a few characters each) while\n * the one-line cells kept their width. The table scrolls instead.\n */\n min-width: 20ch;\n max-width: 40ch;\n }\n\n /*\n * The two marks this table carries — \"this field is changing\" and \"this field decides which\n * record disappears\" — were weight, colour and a strike-through only. None of that reaches\n * somebody using a screen reader, who is the one approver with no other way to tell, so each\n * mark has words as well.\n */\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n }\n\n /*\n * A delete shows the whole record and sends its key alone, so the fields that actually decide\n * which record disappears are marked. Not colour alone — an underline carries to a user who\n * cannot distinguish it.\n */\n td.identifying {\n font-weight: 600;\n text-decoration: underline;\n }\n\n /*\n * The diff, the way a code review shows one: what goes is tinted as removed and struck through,\n * what comes in is tinted as added and bold. Only the BACKGROUND is tinted, at low alpha, from\n * the theme's own success and error tokens (with fallbacks, as foundation-forms does), and the\n * text keeps the normal foreground colour: coloured text on a coloured ground is where contrast\n * fails, dark mode first. The tint is never the only signal. Strike-through, weight, the visible\n * + and − marks and the spoken \"was\" and \"now\" all carry the same thing without colour.\n */\n\n /* The mark a user's eye needs: this field is being changed. */\n td.changed {\n font-weight: 600;\n }\n\n /* On its own line above the new value, so neither can push the other out of view. */\n td.changed .was {\n display: block;\n font-weight: 400;\n text-decoration: line-through;\n background: var(--write-review-removed);\n }\n\n td.changed .now {\n display: block;\n background: var(--write-review-added);\n }\n\n /* Room inside the tint, so the − and + do not sit on its edge. */\n td.changed .was,\n td.changed .now {\n padding-inline: calc(var(--design-unit, 4) * 1px);\n }\n\n /*\n * A row that will not be written is never tinted, not even inside a cell. For a refused row\n * review-model already gives it no changed cells, and this is the second guard. For a row the\n * resolved review did not approve, the − and + stay as the record of what was proposed, but\n * without the tint that says it will happen.\n */\n tr.refused td.changed .was,\n tr.refused td.changed .now,\n tr.unwritten td.changed .was,\n tr.unwritten td.changed .now {\n background: none;\n }\n\n /* A whole row coming in, or going. A refused row is neither, and keeps its muted look. */\n tr.added td {\n background: var(--write-review-added);\n }\n\n tr.removed td {\n background: var(--write-review-removed);\n }\n\n /*\n * A closed review's row that was not approved says so in words — without them, a denied modify\n * read in greyscale or by a screen reader exactly like an approved one. An approved row says what\n * came of it the same way, once the write tool has recorded that (written, not written\n * because the user stopped, or its own reason).\n */\n .not-written,\n .fate {\n margin-inline-start: calc(var(--design-unit, 4) * 1.5px);\n font-size: var(--type-ramp-minus-1-font-size, 0.875em);\n color: var(--neutral-foreground-hint);\n }\n\n /*\n * A row action's input is what its handler is given, not a change to the row, so it is labelled\n * rather than marked as a diff. The label is text, so it reaches a screen reader as well.\n */\n .input-mark {\n font-style: italic;\n color: var(--neutral-foreground-hint);\n padding-inline-end: calc(var(--design-unit, 4) * 1px);\n }\n\n .row-action p {\n margin-block: calc(var(--design-unit, 4) * 1px);\n }\n\n /* The empty placeholder: a style no row text can take, so a literal \"(blank)\" cannot pass for it. */\n .blank {\n font-style: italic;\n font-weight: 400;\n color: var(--neutral-foreground-hint);\n }\n\n .mark {\n font-weight: 600;\n padding-inline-end: calc(var(--design-unit, 4) * 1px);\n user-select: none;\n }\n\n /* The row's + or − sits beside its checkbox, not on the baseline under it (where − reads as _). */\n td.select {\n white-space: nowrap;\n }\n\n td.select rapid-checkbox,\n td.select .mark {\n vertical-align: middle;\n }\n\n /* A gap from the checkbox, so the mark reads as the row's sign rather than part of the box. */\n td.select .mark {\n margin-inline-start: calc(var(--design-unit, 4) * 1.5px);\n }\n\n /* The strike-through belongs to the value, not to its − mark. */\n td.changed .was .mark {\n display: inline-block;\n text-decoration: none;\n }\n\n tr.refused {\n color: var(--neutral-foreground-hint);\n }\n\n /* A refusal is a sentence, and it spans the table: it wraps rather than running off it. */\n .problems {\n color: var(--error-fill-rest, #c00);\n white-space: normal;\n }\n\n .actions {\n display: flex;\n gap: calc(var(--design-unit, 4) * 2px);\n margin-top: calc(var(--design-unit, 4) * 2px);\n }\n\n /* The change request takes the width the buttons leave it. */\n .change-request {\n flex: 1 1 24ch;\n }\n\n /* The outcome's live region is always there; while the review is open it takes no room. */\n .closed:empty {\n margin: 0;\n }\n\n /* The count sits at the foot of the field, beside it rather than in its way. */\n .remaining {\n align-self: flex-end;\n white-space: nowrap;\n font-size: var(--type-ramp-minus-1-font-size, 0.875em);\n color: var(--neutral-foreground-hint);\n }\n`"
15904
15975
  }
15905
15976
  ],
15906
15977
  "exports": [
@@ -15924,7 +15995,7 @@
15924
15995
  "type": {
15925
15996
  "text": "ViewTemplate<GenesisWriteReview>"
15926
15997
  },
15927
- "default": "html<GenesisWriteReview>`\n ${when(\n (x) => !!x.model,\n html<GenesisWriteReview>`\n <p>\n ${(x) => x.model?.op} ${(x) => x.model?.rows.length} row(s) in ${(x) => x.model?.resource}.\n Nothing is written until you choose rows and select Write.\n </p>\n ${when(\n (x) => !!x.customCodeLine,\n html<GenesisWriteReview>`\n <p class=\"custom-code\" id=\"${CUSTOM_CODE_LINE_ID}\">${(x) => x.customCodeLine}</p>\n `,\n )}\n <div class=\"scroller\">\n <table\n aria-label=\"Rows to be written to ${(x) => x.model?.resource}\"\n aria-describedby=\"${(x) => (x.customCodeLine ? CUSTOM_CODE_LINE_ID : undefined)}\"\n >\n <thead>\n <tr>\n <th>\n <rapid-checkbox\n aria-label=\"Select all rows\"\n :checked=\"${(x) => x.allSelected}\"\n ?disabled=\"${(x) => x.settled || !x.model?.selectable.length}\"\n @change=\"${(x, c) => x.setAll(checkedOf(c.event))}\"\n ></rapid-checkbox>\n </th>\n ${repeat(\n (x) => x.model?.columns ?? [],\n html<ReviewColumn>`\n <th>${(c) => c.label}</th>\n `,\n )}\n </tr>\n </thead>\n <tbody>${repeat((x) => x.model?.rows ?? [], row)}</tbody>\n </table>\n </div>\n <div class=\"actions\">\n ${when(\n (x) => !x.asking,\n html<GenesisWriteReview>`\n <rapid-button\n appearance=\"accent\"\n ?disabled=\"${(x) => !x.writable}\"\n @click=\"${(x) => x.write()}\"\n >\n Write ${(x) => (x.rowsSelected ? `${x.rowsSelected} row(s)` : '')}\n </rapid-button>\n <rapid-button\n class=\"ask\"\n ?disabled=\"${(x) => x.settled}\"\n @click=\"${(x) => x.startAsking()}\"\n >\n Ask for changes\n </rapid-button>\n <rapid-button ?disabled=\"${(x) => x.settled}\" @click=\"${(x) => x.deny()}\">\n Deny\n </rapid-button>\n `,\n )}\n ${when(\n (x) => x.asking,\n html<GenesisWriteReview>`\n <rapid-text-area\n class=\"change-request\"\n :value=\"${(x) => x.changeText}\"\n ?readonly=\"${(x) => x.settled}\"\n maxlength=\"${() => MAX_FEEDBACK_CHARS}\"\n @input=\"${(x, c) => {\n x.setChangeText((c.event.target as HTMLTextAreaElement).value);\n return true;\n }}\"\n >\n What should change?\n </rapid-text-area>\n <span class=\"remaining\">${(x) => x.charactersLeft} characters left</span>\n <rapid-button\n class=\"send\"\n appearance=\"accent\"\n ?disabled=\"${(x) => !x.canSendChanges}\"\n @click=\"${(x) => x.sendChanges()}\"\n >\n Send\n </rapid-button>\n <rapid-button class=\"back\" ?disabled=\"${(x) => x.settled}\" @click=\"${(x) => x.back()}\">\n Back\n </rapid-button>\n `,\n )}\n </div>\n `,\n )}\n ${\n /* A live region, and there from the start: a screen reader announces a change to one it\n already knows, and a region added with its text already in it was not announced at all.\n Empty while the review is open; filled by sayOutcome, which also decides when. Focusable\n from script only, so focus can land on the outcome after an answer. */ ''\n }\n <p class=\"closed\" role=\"status\" tabindex=\"-1\">${(x) => x.announcement}</p>\n`"
15998
+ "default": "html<GenesisWriteReview>`\n ${when(\n (x) => !!x.model,\n html<GenesisWriteReview>`\n ${when(\n (x) => !x.rowActionHeading,\n html<GenesisWriteReview>`\n <p>\n ${(x) => x.model?.op} ${(x) => x.model?.rows.length} row(s) in\n ${(x) => x.model?.resource}. Nothing is written until you choose rows and select Write.\n </p>\n `,\n )}\n ${when(\n (x) => !!x.rowActionHeading,\n html<GenesisWriteReview>`\n <p class=\"row-action-heading\">${(x) => x.rowActionHeading}</p>\n <div class=\"row-action\" id=\"${ROW_ACTION_LINES_ID}\">\n ${repeat(\n (x) => x.rowActionLines,\n html<string>`\n <p>${(x) => x}</p>\n `,\n )}\n </div>\n `,\n )}\n ${when(\n (x) => !!x.customCodeLine,\n html<GenesisWriteReview>`\n <p class=\"custom-code\" id=\"${CUSTOM_CODE_LINE_ID}\">${(x) => x.customCodeLine}</p>\n `,\n )}\n <div class=\"scroller\">\n <table\n aria-label=\"${(x) => x.tableLabel}\"\n aria-describedby=\"${(x) =>\n x.customCodeLine\n ? CUSTOM_CODE_LINE_ID\n : x.rowActionHeading\n ? ROW_ACTION_LINES_ID\n : undefined}\"\n >\n <thead>\n <tr>\n <th>\n <rapid-checkbox\n aria-label=\"Select all rows\"\n :checked=\"${(x) => x.allSelected}\"\n ?disabled=\"${(x) => x.settled || !x.model?.selectable.length}\"\n @change=\"${(x, c) => x.setAll(checkedOf(c.event))}\"\n ></rapid-checkbox>\n </th>\n ${repeat(\n (x) => x.model?.columns ?? [],\n html<ReviewColumn>`\n <th>${(c) => c.label}</th>\n `,\n )}\n </tr>\n </thead>\n <tbody>${repeat((x) => x.model?.rows ?? [], row)}</tbody>\n </table>\n </div>\n <div class=\"actions\">\n ${when(\n (x) => !x.asking,\n html<GenesisWriteReview>`\n <rapid-button\n appearance=\"accent\"\n ?disabled=\"${(x) => !x.writable}\"\n @click=\"${(x) => x.write()}\"\n >\n Write ${(x) => (x.rowsSelected ? `${x.rowsSelected} row(s)` : '')}\n </rapid-button>\n <rapid-button\n class=\"ask\"\n ?disabled=\"${(x) => x.settled}\"\n @click=\"${(x) => x.startAsking()}\"\n >\n Ask for changes\n </rapid-button>\n <rapid-button ?disabled=\"${(x) => x.settled}\" @click=\"${(x) => x.deny()}\">\n Deny\n </rapid-button>\n `,\n )}\n ${when(\n (x) => x.asking,\n html<GenesisWriteReview>`\n <rapid-text-area\n class=\"change-request\"\n :value=\"${(x) => x.changeText}\"\n ?readonly=\"${(x) => x.settled}\"\n maxlength=\"${() => MAX_FEEDBACK_CHARS}\"\n @input=\"${(x, c) => {\n x.setChangeText((c.event.target as HTMLTextAreaElement).value);\n return true;\n }}\"\n >\n What should change?\n </rapid-text-area>\n <span class=\"remaining\">${(x) => x.charactersLeft} characters left</span>\n <rapid-button\n class=\"send\"\n appearance=\"accent\"\n ?disabled=\"${(x) => !x.canSendChanges}\"\n @click=\"${(x) => x.sendChanges()}\"\n >\n Send\n </rapid-button>\n <rapid-button class=\"back\" ?disabled=\"${(x) => x.settled}\" @click=\"${(x) => x.back()}\">\n Back\n </rapid-button>\n `,\n )}\n </div>\n `,\n )}\n ${\n /* A live region, and there from the start: a screen reader announces a change to one it\n already knows, and a region added with its text already in it was not announced at all.\n Empty while the review is open; filled by sayOutcome, which also decides when. Focusable\n from script only, so focus can land on the outcome after an answer. */ ''\n }\n <p class=\"closed\" role=\"status\" tabindex=\"-1\">${(x) => x.announcement}</p>\n`"
15928
15999
  }
15929
16000
  ],
15930
16001
  "exports": [
@@ -16052,6 +16123,33 @@
16052
16123
  "description": "What the review says about custom code the event runs, or `''` when it runs none. Read from\nthe model, which history keeps, so it is there whether the review is open, resolved or\nre-mounted. Not repeated in the closed summary: the resolved review still shows it, and the\nsummary's live region would announce it as though code had run.",
16053
16124
  "readonly": true
16054
16125
  },
16126
+ {
16127
+ "kind": "field",
16128
+ "name": "rowActionHeading",
16129
+ "type": {
16130
+ "text": "string"
16131
+ },
16132
+ "description": "A row action's header, or `''` for any other write: see `rowActionHeading`.",
16133
+ "readonly": true
16134
+ },
16135
+ {
16136
+ "kind": "field",
16137
+ "name": "tableLabel",
16138
+ "type": {
16139
+ "text": "string"
16140
+ },
16141
+ "description": "The table's accessible name. A run's names its handler and table, as its header does.",
16142
+ "readonly": true
16143
+ },
16144
+ {
16145
+ "kind": "field",
16146
+ "name": "rowActionLines",
16147
+ "type": {
16148
+ "text": "string[]"
16149
+ },
16150
+ "description": "The lines under a row action's header, from the model, so a re-mount says them too.",
16151
+ "readonly": true
16152
+ },
16055
16153
  {
16056
16154
  "kind": "field",
16057
16155
  "name": "answered",
@@ -58,6 +58,37 @@ export declare const opFromName: (resourceName: string) => GenesisEventOp | unde
58
58
  * @internal
59
59
  */
60
60
  export declare function referencesProblems(resource: Partial<GenesisAiResource> | null, op?: unknown): string[];
61
+ /**
62
+ * Why a request a row action needs is not readable, from what the caller knows about it: in the
63
+ * config with no read tool, in the config but left out, or a query. Failing all three it is missing.
64
+ * The validator and the write tools say it the same way, through this.
65
+ *
66
+ * @internal
67
+ */
68
+ export declare const notReadableReason: ({ unreadable, leftOut, queries, }: {
69
+ unreadable?: ReadonlySet<string>;
70
+ leftOut?: ReadonlySet<string>;
71
+ queries?: ReadonlySet<string>;
72
+ }) => (name: string) => string;
73
+ /**
74
+ * What is wrong with a resource's row-action fields (contracts C-18.7.2), if anything.
75
+ *
76
+ * @remarks
77
+ * One rule, three callers: the validator, and the write tools when a tool is defined and when it
78
+ * is called, because the write tools are exported and a direct call never reaches the validator.
79
+ *
80
+ * A custom event with no `shape` has no problem here: the write tools refuse it, as they refuse
81
+ * every custom event that is not a row action. A later change of meaning has to arrive as a new
82
+ * `shape` value, never as a new key on an old one, so a key this version has no place for is a
83
+ * problem rather than something to skip.
84
+ *
85
+ * @param requestNames - The request resources whose rows can be read. A row action reads its rows
86
+ * through `REQ_<entity>`, and without one there is no row to review.
87
+ * @param whyNotReadable - Why a request is not among `requestNames`, when the caller knows: it was
88
+ * left out, has no read tool, or is a query. Without it, the request is said to be missing.
89
+ * @beta
90
+ */
91
+ export declare function rowActionProblem(resource: Partial<GenesisAiResource> | null, requestNames: ReadonlySet<string>, whyNotReadable?: (name: string) => string): string | undefined;
61
92
  /**
62
93
  * A resource the validator left out, and why.
63
94
  *
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/genesis/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAA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AAE,iBAahC,CAAC"}
1
+ {"version":3,"file":"consumes.d.ts","sourceRoot":"","sources":["../../../src/genesis/consumes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,mBAAmB,EAAE,iBAkBhC,CAAC"}
@@ -11,7 +11,7 @@
11
11
  * @beta
12
12
  */
13
13
  export { GENESIS_AGENT_NAME, registerGenesisAssistant } from './register-genesis-assistant';
14
- export { customCodeOf } from './config';
14
+ export { customCodeOf, rowActionProblem } from './config';
15
15
  export { GENESIS_AI_CONSUMES } from './consumes';
16
16
  export { validateGenesisAiConfig } from './config';
17
17
  export type { DroppedResource, GenesisAiConfigCheck } from './config';
@@ -23,5 +23,5 @@ export { GENESIS_WRITE_REVIEW, GenesisWriteReview } from './write-review/write-r
23
23
  export type { GenesisChangeRequest, GenesisReviewPayload, GenesisWriteReviewCompletedEventDetail, } from './review-payload';
24
24
  export type { GenesisReadResult, GenesisResourceTools, GenesisResourceToolsOptions, GenesisToolError, } from './resource-tools';
25
25
  export { GENESIS_EVENT_OPS } from './types';
26
- export type { GenesisAiConfig, GenesisAiConsumes, GenesisAiResource, GenesisAssistantExtensions, GenesisAssistantRegistration, GenesisCustomCode, GenesisCustomCodeCheck, GenesisEventOp, GenesisReference, GenesisResourceKind, RegisterGenesisAssistantOptions, } from './types';
26
+ export type { GenesisAiConfig, GenesisAiConsumes, GenesisAiResource, GenesisAssistantExtensions, GenesisAssistantRegistration, GenesisCustomCode, GenesisCustomCodeCheck, GenesisEventOp, GenesisReference, GenesisResourceKind, GenesisRowEffect, GenesisRowInput, RegisterGenesisAssistantOptions, } from './types';
27
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/genesis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACtE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,YAAY,EACV,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACvF,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,sCAAsC,GACvC,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,4BAA4B,EAC5B,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/genesis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACtE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,YAAY,EACV,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACvF,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,sCAAsC,GACvC,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,4BAA4B,EAC5B,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,+BAA+B,GAChC,MAAM,SAAS,CAAC"}
@@ -2,7 +2,8 @@ import type { Connect } from '@genesislcap/foundation-comms';
2
2
  import { type GenesisFilterField } from './criteria';
3
3
  import type { GenesisEventField } from './event-fields';
4
4
  import { type GenesisRowSource, type RequestRowSourceOptions } from './row-source';
5
- import type { GenesisAiResource, GenesisEventOp, GenesisReference } from './types';
5
+ import type { GenesisAiResource, GenesisReference } from './types';
6
+ import type { AnyWriteOp } from './write-op';
6
7
  /** One declared reference, and whether it can be checked. */
7
8
  export type ReferenceGate = {
8
9
  status: 'checkable';
@@ -67,7 +68,7 @@ export interface ReferenceOutcome {
67
68
  *
68
69
  * @internal
69
70
  */
70
- export declare function referenceOutcome(op: GenesisEventOp, fields: readonly GenesisEventField[], gates: readonly ReferenceGate[]): ReferenceOutcome;
71
+ export declare function referenceOutcome(op: AnyWriteOp, fields: readonly GenesisEventField[], gates: readonly ReferenceGate[]): ReferenceOutcome;
71
72
  /**
72
73
  * The reference gate for one set of write tools: whether each of a write's declared references can
73
74
  * be checked, and what that means for its tool. A target read is described once, however many
@@ -75,7 +76,7 @@ export declare function referenceOutcome(op: GenesisEventOp, fields: readonly Ge
75
76
  *
76
77
  * @internal
77
78
  */
78
- export declare function createReferenceGate(requestNames: ReadonlySet<string>, timeouts?: RequestRowSourceOptions['timeouts']): (resource: GenesisAiResource, op: GenesisEventOp, fields: readonly GenesisEventField[], connect: Connect) => Promise<ReferenceOutcome>;
79
+ export declare function createReferenceGate(requestNames: ReadonlySet<string>, timeouts?: RequestRowSourceOptions['timeouts']): (resource: GenesisAiResource, op: AnyWriteOp, fields: readonly GenesisEventField[], connect: Connect) => Promise<ReferenceOutcome>;
79
80
  /** What an insert says about a value it cannot check. */
80
81
  export declare const notAcceptedHere: (field: string, { resource, reason }: UncheckedField) => string;
81
82
  /** What a modify says about a new value it cannot check. */
@@ -1 +1 @@
1
- {"version":3,"file":"reference-check.d.ts","sourceRoot":"","sources":["../../../src/genesis/reference-check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD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AgB;IAC/B,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC/C,sCAAsC;IACtC,SAAS,EAAE,SAAS,OAAO,CAAC,aAAa,EAAE;QAAE,MAAM,EAAE,WAAW,CAAA;KAAE,CAAC,EAAE,CAAC;CACvE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,UAAU,EACd,MAAM,EAAE,SAAS,iBAAiB,EAAE,EACpC,KAAK,EAAE,SAAS,aAAa,EAAE,GAC9B,gBAAgB,CA4BlB;AAQD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,EACjC,QAAQ,CAAC,EAAE,uBAAuB,CAAC,UAAU,CAAC,IAY5C,UAAU,iBAAiB,EAC3B,IAAI,UAAU,EACd,QAAQ,SAAS,iBAAiB,EAAE,EACpC,SAAS,OAAO,KACf,OAAO,CAAC,gBAAgB,CAAC,CAQ7B;AAED,yDAAyD;AACzD,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,EAAE,sBAAsB,cAAc,KAAG,MAEpB,CAAC;AAEnE,4DAA4D;AAC5D,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,EAAE,sBAAsB,cAAc,KAAG,MAEpB,CAAC"}
@@ -2,7 +2,7 @@ import type { Connect } from '@genesislcap/foundation-comms';
2
2
  import type { GenesisEventField } from './event-fields';
3
3
  import { type ReferenceGate } from './reference-check';
4
4
  import type { GenesisKeyCheck } from './row-source';
5
- import type { GenesisEventOp } from './types';
5
+ import type { AnyWriteOp } from './write-op';
6
6
  /** The most distinct values one call may check. */
7
7
  export declare const MAX_REFERENCE_CHECKS = 50;
8
8
  type Checkable = Extract<ReferenceGate, {
@@ -46,7 +46,7 @@ export interface ReferenceAsk {
46
46
  *
47
47
  * @internal
48
48
  */
49
- export declare function asksOf(row: RowForCheck, op: GenesisEventOp, fields: readonly GenesisEventField[], checkable: readonly Checkable[]): {
49
+ export declare function asksOf(row: RowForCheck, op: AnyWriteOp, fields: readonly GenesisEventField[], checkable: readonly Checkable[]): {
50
50
  asks: ReferenceAsk[];
51
51
  problems: string[];
52
52
  };
@@ -79,7 +79,7 @@ export type ReferenceCheck = {
79
79
  * @internal
80
80
  */
81
81
  export declare function checkReferences(rows: readonly RowForCheck[], options: {
82
- op: GenesisEventOp;
82
+ op: AnyWriteOp;
83
83
  fields: readonly GenesisEventField[];
84
84
  checkable: readonly Checkable[];
85
85
  connect: Connect;
@@ -1 +1 @@
1
- {"version":3,"file":"reference-existence.d.ts","sourceRoot":"","sources":["../../../src/genesis/reference-existence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,KAAK,aAAa,EAAW,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAQ9C,mDAAmD;AACnD,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAMvC,KAAK,SAAS,GAAG,OAAO,CAAC,aAAa,EAAE;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,CAAC,CAAC;AAEjE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,SAAS,SAAS,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAcrF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,SAAS,SAAS,EAAE,GAAG,MAAM,GAAG,SAAS,CAU/E;AAED,qEAAqE;AACrE,MAAM,WAAW,WAAW;IAC1B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G;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,SAAS,WAAW,EAAE,EAC5B,OAAO,EAAE;IACP,EAAE,EAAE,cAAc,CAAC;IACnB,MAAM,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACrC,SAAS,EAAE,SAAS,SAAS,EAAE,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GACA,OAAO,CAAC,cAAc,CAAC,CAsCzB;AAED,sDAAsD;AACtD,MAAM,MAAM,aAAa,GACrB;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACnB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7C;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,SAAS,YAAY,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAiCzF;AAED,kEAAkE;AAClE,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,WAAW,EACzD,MAAM,SAAS,CAAC,EAAE,EAClB,UAAU,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,KACtC,CAAC,EAIA,CAAC"}
1
+ {"version":3,"file":"reference-existence.d.ts","sourceRoot":"","sources":["../../../src/genesis/reference-existence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,KAAK,aAAa,EAAW,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAO7C,mDAA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AAC,KACtC,CAAC,EAIA,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type { InteractionResult } from '@genesislcap/foundation-ai';
2
- import type { GenesisCustomCode, GenesisEventOp } from './types';
2
+ import type { GenesisCustomCode } from './types';
3
+ import type { AnyWriteOp } from './write-op';
3
4
  import type { GenesisWriteRowStatus } from './write-tools';
4
5
  export type { GenesisChangeRequest, GenesisReviewPayload } from './review-payload';
5
6
  /**
@@ -39,6 +40,16 @@ export interface ReviewCell {
39
40
  * that decides which record disappears is the one thing the approver cannot see.
40
41
  */
41
42
  identifying: boolean;
43
+ /**
44
+ * What an identifying cell says it identifies, when it is not the row being removed: a row
45
+ * action's key names the row its handler runs on.
46
+ */
47
+ identifies?: string;
48
+ /**
49
+ * True on a row action's input: shown as what the handler is given, never as a change from the
50
+ * row, because the handler's code, not the input, decides what the row becomes.
51
+ */
52
+ input?: true;
42
53
  /**
43
54
  * True when either side of the cell is long enough to be wrapped rather than kept on one line.
44
55
  * See {@link LONG_VALUE}.
@@ -87,7 +98,7 @@ export interface ReviewColumn {
87
98
  /** @internal */
88
99
  export interface ReviewModel {
89
100
  resource: string;
90
- op: GenesisEventOp;
101
+ op: AnyWriteOp;
91
102
  /**
92
103
  * The table's columns, and the order every row's cells are in.
93
104
  *
@@ -112,7 +123,46 @@ export interface ReviewModel {
112
123
  * the reload of a review that has already resolved.
113
124
  */
114
125
  customCode?: GenesisCustomCode;
126
+ /**
127
+ * What a row action's review says in place of an op: the handler it runs, its table, and the
128
+ * writes its code made. Kept on the model for the reason customCode is.
129
+ */
130
+ rowAction?: ReviewRowAction;
131
+ }
132
+ /**
133
+ * What a row action's review says about it (contracts C-18.7.7).
134
+ *
135
+ * @internal
136
+ */
137
+ export interface ReviewRowAction {
138
+ /** The handler's own name, without `EVENT_`. */
139
+ handler: string;
140
+ entity: string;
141
+ /** What the handler's code wrote when the app was generated, in code order. */
142
+ effects: Array<{
143
+ op: 'modify' | 'insert';
144
+ table: string;
145
+ }>;
115
146
  }
147
+ /**
148
+ * The header of a row action's review. It names the handler and its table, and never the op: the
149
+ * write is the handler's, not a modify, and `row-action` is the bridge's own word.
150
+ *
151
+ * @internal
152
+ */
153
+ export declare const rowActionHeading: (rowAction: ReviewRowAction, rows: number) => string;
154
+ /**
155
+ * The lines under a row action's header: what its code wrote, that the row is shown as it is, and
156
+ * that the app may do more in response (contracts C-18.7.7 as C-18.R amends it).
157
+ *
158
+ * @remarks
159
+ * Dated to generation, because an exported app's code can change after it. The effects are what
160
+ * the code does, in its order, not a summary, and the last line is there because consolidators and
161
+ * the app's own logic can react to these writes, which no review here can see.
162
+ *
163
+ * @internal
164
+ */
165
+ export declare const rowActionLines: (rowAction: ReviewRowAction) => string[];
116
166
  /**
117
167
  * The line a review shows when the event runs custom code: that the code can do more than the
118
168
  * row shown, and what the generator found it can also write to.
@@ -125,7 +175,7 @@ export interface ReviewModel {
125
175
  *
126
176
  * @internal
127
177
  */
128
- export declare function customCodeLine(op: GenesisEventOp, customCode: GenesisCustomCode): string;
178
+ export declare function customCodeLine(op: AnyWriteOp, customCode: GenesisCustomCode): string;
129
179
  /**
130
180
  * A value as a person should read it.
131
181
  *
@@ -158,7 +208,7 @@ export declare function displayValue(value: unknown, type?: string): string;
158
208
  */
159
209
  export declare function buildReviewModel(options: {
160
210
  resource: string;
161
- op: GenesisEventOp;
211
+ op: AnyWriteOp;
162
212
  /** The event's own fields, for labels and for the type that decides how a value is shown. */
163
213
  fields?: ReadonlyArray<{
164
214
  name: string;
@@ -179,6 +229,11 @@ export declare function buildReviewModel(options: {
179
229
  }>;
180
230
  /** The event's customCode, as `customCodeOf` read it. */
181
231
  customCode?: GenesisCustomCode;
232
+ /** A row action's facts, and its key and inputs, which mark its cells. Row actions only. */
233
+ rowAction?: ReviewRowAction & {
234
+ key: readonly string[];
235
+ inputs: readonly string[];
236
+ };
182
237
  }): ReviewModel;
183
238
  /**
184
239
  * The selection a freshly opened review starts with: none.
@@ -1 +1 @@
1
- {"version":3,"file":"review-model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wBAAgB,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,CA2BnE"}
@@ -52,6 +52,49 @@ export interface GenesisAiResource {
52
52
  * had no fields for the table, and then nothing is checked. `[]` declares none.
53
53
  */
54
54
  references?: GenesisReference[];
55
+ /**
56
+ * Custom events only: the one kind of custom handler this version can run, a ROW ACTION. Its
57
+ * handler loads one existing row of `entity` by its primary key, changes it, and may insert rows
58
+ * into other tables. The generator sets it only when it could prove that from the handler's code
59
+ * (contracts C-18.3). Without it a custom event gets no tool.
60
+ */
61
+ shape?: 'row';
62
+ /**
63
+ * A row action's own table, whose rows are read through `REQ_<entity>`. Accepted on any resource,
64
+ * and used only with `shape`.
65
+ */
66
+ entity?: string;
67
+ /**
68
+ * The table's primary-key fields, in key order: what a row action's handler looks its row up by,
69
+ * and the only fields a modify or a delete names its row by (contracts C-19). On no other op.
70
+ */
71
+ key?: string[];
72
+ /** The fields a row action's handler reads beyond its key. Every one must be sent. */
73
+ inputs?: GenesisRowInput[];
74
+ /**
75
+ * Each write a row action's handler makes, in code order: exactly one modify of `entity`, and any
76
+ * inserts into other tables. The review shows them as what the code wrote when the app was made.
77
+ */
78
+ effects?: GenesisRowEffect[];
79
+ }
80
+ /**
81
+ * One field a row action's handler reads beyond its key.
82
+ *
83
+ * @beta
84
+ */
85
+ export interface GenesisRowInput {
86
+ field: string;
87
+ /** Always true in this version: no input may be left out. */
88
+ required: true;
89
+ }
90
+ /**
91
+ * One write a row action's handler makes.
92
+ *
93
+ * @beta
94
+ */
95
+ export interface GenesisRowEffect {
96
+ op: 'modify' | 'insert';
97
+ table: string;
55
98
  }
56
99
  /**
57
100
  * What the app generator found an event's custom code can write to, beyond the row it saves.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/genesis/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,YAAY,EACZ,kBAAkB,EA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C,6EAA6E;IAC7E,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -1,5 +1,5 @@
1
1
  import type { Connect } from '@genesislcap/foundation-comms';
2
- import type { GenesisEventOp } from './types';
2
+ import type { AnyWriteOp } from './write-op';
3
3
  import { type GenesisWriteOutcome } from './write-outcome';
4
4
  /**
5
5
  * Commits the rows a user selected in the review — and only those, exactly as they were shown.
@@ -29,7 +29,7 @@ export interface CommitOptions {
29
29
  connect: Connect;
30
30
  eventName: string;
31
31
  /** The event's op: what a refusal means depends on it (see mapWriteReply's options). */
32
- op: GenesisEventOp;
32
+ op: AnyWriteOp;
33
33
  /** Why the user approved it, composed by the bridge and sent as the event's `REASON`. */
34
34
  reason?: string;
35
35
  timeoutMs?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"write-commit.d.ts","sourceRoot":"","sources":["../../../src/genesis/write-commit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAG7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,eAAe;IAC9B,2FAA2F;IAC3F,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,gBAAgB;AAChB,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,EAAE,EAAE,cAAc,CAAC;IACnB,yF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AE,EAChC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,SAA6B,EAAE,EAAE,aAAa,GAC/E,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAyD7B"}
@@ -0,0 +1,34 @@
1
+ import type { GenesisEventOp } from './types';
2
+ /**
3
+ * What a write tool does: an event's own op, or a row action, which runs a custom event's handler
4
+ * on one existing row (contracts C-18.7). `custom` is not one: a custom event either proves a row
5
+ * action or gets no tool.
6
+ *
7
+ * @internal
8
+ */
9
+ export type WritableOp = Exclude<GenesisEventOp, 'custom'> | 'row-action';
10
+ /**
11
+ * Any op a write path may be asked about: the config's, or the one a write tool decided on.
12
+ *
13
+ * @internal
14
+ */
15
+ export type AnyWriteOp = GenesisEventOp | WritableOp;
16
+ /**
17
+ * Whether a write reads its row before the review, and again before it commits.
18
+ *
19
+ * @remarks
20
+ * Every place that asks this asks it here. A row action reads its row like a modify, and a site
21
+ * left asking "modify or delete" would treat one like an insert: no row read, no merge, no
22
+ * staleness check before the commit.
23
+ *
24
+ * @internal
25
+ */
26
+ export declare const readsRow: (op: AnyWriteOp | undefined) => boolean;
27
+ /**
28
+ * How a model-facing sentence names one write: "a modify", "a delete", or, for a row action, "a run
29
+ * of this handler". The op's own name is never put in front of the model: `row-action` is ours.
30
+ *
31
+ * @internal
32
+ */
33
+ export declare const aWrite: (op: AnyWriteOp | undefined) => string;
34
+ //# sourceMappingURL=write-op.d.ts.map