@genesislcap/ai-assistant 15.48.0 → 15.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-assistant.api.json +65 -0
- package/dist/ai-assistant.d.ts +35 -16
- package/dist/custom-elements.json +118 -2
- package/dist/dts/genesis/config.d.ts +31 -0
- package/dist/dts/genesis/config.d.ts.map +1 -1
- package/dist/dts/genesis/consumes.d.ts.map +1 -1
- package/dist/dts/genesis/index.d.ts +2 -2
- package/dist/dts/genesis/index.d.ts.map +1 -1
- package/dist/dts/genesis/reference-check.d.ts +4 -3
- package/dist/dts/genesis/reference-check.d.ts.map +1 -1
- package/dist/dts/genesis/reference-existence.d.ts +3 -3
- package/dist/dts/genesis/reference-existence.d.ts.map +1 -1
- package/dist/dts/genesis/review-model.d.ts +59 -4
- package/dist/dts/genesis/review-model.d.ts.map +1 -1
- package/dist/dts/genesis/types.d.ts +43 -0
- package/dist/dts/genesis/types.d.ts.map +1 -1
- package/dist/dts/genesis/write-commit.d.ts +2 -2
- package/dist/dts/genesis/write-commit.d.ts.map +1 -1
- package/dist/dts/genesis/write-op.d.ts +34 -0
- package/dist/dts/genesis/write-op.d.ts.map +1 -0
- package/dist/dts/genesis/write-outcome.d.ts +2 -2
- package/dist/dts/genesis/write-outcome.d.ts.map +1 -1
- package/dist/dts/genesis/write-payload.d.ts +3 -3
- package/dist/dts/genesis/write-payload.d.ts.map +1 -1
- package/dist/dts/genesis/write-plan.d.ts +18 -7
- package/dist/dts/genesis/write-plan.d.ts.map +1 -1
- package/dist/dts/genesis/write-review/write-review.d.ts +6 -0
- package/dist/dts/genesis/write-review/write-review.d.ts.map +1 -1
- package/dist/dts/genesis/write-review/write-review.styles.d.ts.map +1 -1
- package/dist/dts/genesis/write-review/write-review.template.d.ts.map +1 -1
- package/dist/dts/genesis/write-tools.d.ts +2 -2
- package/dist/dts/genesis/write-tools.d.ts.map +1 -1
- package/dist/dts/genesis/write-turn.d.ts +5 -3
- package/dist/dts/genesis/write-turn.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +16 -0
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/main.styles.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts +7 -4
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/esm/genesis/config.js +204 -5
- package/dist/esm/genesis/consumes.js +5 -0
- package/dist/esm/genesis/index.js +1 -1
- package/dist/esm/genesis/review-model.js +62 -10
- package/dist/esm/genesis/write-op.js +18 -0
- package/dist/esm/genesis/write-outcome.js +13 -6
- package/dist/esm/genesis/write-payload.js +22 -10
- package/dist/esm/genesis/write-plan.js +121 -12
- package/dist/esm/genesis/write-review/write-review.js +20 -1
- package/dist/esm/genesis/write-review/write-review.styles.js +14 -0
- package/dist/esm/genesis/write-review/write-review.template.js +25 -7
- package/dist/esm/genesis/write-tools.js +304 -74
- package/dist/esm/genesis/write-turn.js +9 -5
- package/dist/esm/main/main.js +21 -0
- package/dist/esm/main/main.styles.js +25 -0
- package/dist/esm/main/main.template.js +76 -34
- package/dist/genesis-consumes.cjs +6 -1
- package/dist/genesis-consumes.cjs.map +2 -2
- package/dist/genesis-consumes.mjs +6 -1
- package/dist/genesis-consumes.mjs.map +2 -2
- package/docs/genesis.md +171 -45
- package/docs/styling.md +130 -0
- package/package.json +17 -17
- package/scripts/smoke-genesis-consumes-node.mjs +14 -1
|
@@ -12198,6 +12198,36 @@
|
|
|
12198
12198
|
"isProtected": false,
|
|
12199
12199
|
"isAbstract": false
|
|
12200
12200
|
},
|
|
12201
|
+
{
|
|
12202
|
+
"kind": "Property",
|
|
12203
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#hasStepper:member",
|
|
12204
|
+
"docComment": "/**\n * Whether anything is slotted alongside the conversation.\n *\n * Drives the `conversation-has-stepper` part, which is what lets an app apply a side-by-side layout only when there is a second thing to lay out — a `flex-direction: row` that applied unconditionally would do nothing visible but would still be live CSS to reason about.\n */\n",
|
|
12205
|
+
"excerptTokens": [
|
|
12206
|
+
{
|
|
12207
|
+
"kind": "Content",
|
|
12208
|
+
"text": "get hasStepper(): "
|
|
12209
|
+
},
|
|
12210
|
+
{
|
|
12211
|
+
"kind": "Content",
|
|
12212
|
+
"text": "boolean"
|
|
12213
|
+
},
|
|
12214
|
+
{
|
|
12215
|
+
"kind": "Content",
|
|
12216
|
+
"text": ";"
|
|
12217
|
+
}
|
|
12218
|
+
],
|
|
12219
|
+
"isReadonly": true,
|
|
12220
|
+
"isOptional": false,
|
|
12221
|
+
"releaseTag": "Beta",
|
|
12222
|
+
"name": "hasStepper",
|
|
12223
|
+
"propertyTypeTokenRange": {
|
|
12224
|
+
"startIndex": 1,
|
|
12225
|
+
"endIndex": 2
|
|
12226
|
+
},
|
|
12227
|
+
"isStatic": false,
|
|
12228
|
+
"isProtected": false,
|
|
12229
|
+
"isAbstract": false
|
|
12230
|
+
},
|
|
12201
12231
|
{
|
|
12202
12232
|
"kind": "Property",
|
|
12203
12233
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#headerTitle:member",
|
|
@@ -16014,6 +16044,41 @@
|
|
|
16014
16044
|
"isProtected": false,
|
|
16015
16045
|
"isAbstract": false
|
|
16016
16046
|
},
|
|
16047
|
+
{
|
|
16048
|
+
"kind": "Property",
|
|
16049
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#stepperNodes:member",
|
|
16050
|
+
"docComment": "/**\n * Elements assigned to the `stepper` slot, tracked so the conversation container can say whether it is holding anything.\n *\n * Comment nodes and whitespace text are filtered out by the template's `slotted` filter, so an empty slot really is empty here and `hasStepper` does not go true for formatting whitespace.\n */\n",
|
|
16051
|
+
"excerptTokens": [
|
|
16052
|
+
{
|
|
16053
|
+
"kind": "Content",
|
|
16054
|
+
"text": "stepperNodes: "
|
|
16055
|
+
},
|
|
16056
|
+
{
|
|
16057
|
+
"kind": "Reference",
|
|
16058
|
+
"text": "Node",
|
|
16059
|
+
"canonicalReference": "!Node:interface"
|
|
16060
|
+
},
|
|
16061
|
+
{
|
|
16062
|
+
"kind": "Content",
|
|
16063
|
+
"text": "[]"
|
|
16064
|
+
},
|
|
16065
|
+
{
|
|
16066
|
+
"kind": "Content",
|
|
16067
|
+
"text": ";"
|
|
16068
|
+
}
|
|
16069
|
+
],
|
|
16070
|
+
"isReadonly": false,
|
|
16071
|
+
"isOptional": false,
|
|
16072
|
+
"releaseTag": "Beta",
|
|
16073
|
+
"name": "stepperNodes",
|
|
16074
|
+
"propertyTypeTokenRange": {
|
|
16075
|
+
"startIndex": 1,
|
|
16076
|
+
"endIndex": 3
|
|
16077
|
+
},
|
|
16078
|
+
"isStatic": false,
|
|
16079
|
+
"isProtected": false,
|
|
16080
|
+
"isAbstract": false
|
|
16081
|
+
},
|
|
16017
16082
|
{
|
|
16018
16083
|
"kind": "Property",
|
|
16019
16084
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#stopButtonVisible:member",
|
package/dist/ai-assistant.d.ts
CHANGED
|
@@ -1197,22 +1197,6 @@ export declare interface AssistantAppSettingsToggle {
|
|
|
1197
1197
|
*/
|
|
1198
1198
|
export declare const assistantSettingsSectionTitleStyles: ElementStyles;
|
|
1199
1199
|
|
|
1200
|
-
/**
|
|
1201
|
-
* Part names for one avatar element: the bare name, a role-level name, and — on the assistant
|
|
1202
|
-
* side, whose rows vary — the message type.
|
|
1203
|
-
*
|
|
1204
|
-
* The role-level name is the one an app usually wants. `messageType` splits the assistant across
|
|
1205
|
-
* `ai`, `ai-thinking`, `ai-function` and `interaction`, so without it "style the assistant's
|
|
1206
|
-
* avatar, not the user's" takes four selectors and silently misses any type added later.
|
|
1207
|
-
* `::part()` names cannot be chained, so each has to be a name of its own rather than a
|
|
1208
|
-
* combination. The user side needs no extra name — its role and its type are both `user`.
|
|
1209
|
-
*
|
|
1210
|
-
* Exported for the unit test that pins the vocabulary; not part of the element API.
|
|
1211
|
-
*
|
|
1212
|
-
* @internal
|
|
1213
|
-
*/
|
|
1214
|
-
export declare const avatarPartsFor: (base: string, type: string) => string;
|
|
1215
|
-
|
|
1216
1200
|
declare interface BaseAgentConfig {
|
|
1217
1201
|
/**
|
|
1218
1202
|
* Stable identity for this agent. Used for classifier routing, manual
|
|
@@ -3940,6 +3924,22 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
3940
3924
|
/** Rejection messages for files the last pick refused. */
|
|
3941
3925
|
get attachmentErrors(): string[];
|
|
3942
3926
|
set attachmentErrors(value: string[]);
|
|
3927
|
+
/**
|
|
3928
|
+
* Elements assigned to the `stepper` slot, tracked so the conversation container can say
|
|
3929
|
+
* whether it is holding anything.
|
|
3930
|
+
*
|
|
3931
|
+
* Comment nodes and whitespace text are filtered out by the template's `slotted` filter, so an
|
|
3932
|
+
* empty slot really is empty here and `hasStepper` does not go true for formatting whitespace.
|
|
3933
|
+
*/
|
|
3934
|
+
stepperNodes: Node[];
|
|
3935
|
+
/**
|
|
3936
|
+
* Whether anything is slotted alongside the conversation.
|
|
3937
|
+
*
|
|
3938
|
+
* Drives the `conversation-has-stepper` part, which is what lets an app apply a side-by-side
|
|
3939
|
+
* layout only when there is a second thing to lay out — a `flex-direction: row` that applied
|
|
3940
|
+
* unconditionally would do nothing visible but would still be live CSS to reason about.
|
|
3941
|
+
*/
|
|
3942
|
+
get hasStepper(): boolean;
|
|
3943
3943
|
/** Whether the loading spinner is currently visible. Controlled by the loading delay timer. */
|
|
3944
3944
|
showLoadingIndicator: boolean;
|
|
3945
3945
|
/** Bump to re-render app settings toggles when the host provider notifies a change. */
|
|
@@ -5857,6 +5857,25 @@ export declare function restoreMachine(machine: {
|
|
|
5857
5857
|
}) => void;
|
|
5858
5858
|
}, restored: unknown, key?: string): void;
|
|
5859
5859
|
|
|
5860
|
+
/**
|
|
5861
|
+
* The three names one element is exposed under: the bare name, a role-level name, and — on the
|
|
5862
|
+
* assistant side, whose rows vary — the message type. `rolePartsFor('avatar', 'ai-thinking')` is
|
|
5863
|
+
* `avatar avatar-assistant avatar-ai-thinking`.
|
|
5864
|
+
*
|
|
5865
|
+
* The role-level name is the one an app usually wants. `messageType` splits the assistant across
|
|
5866
|
+
* `ai`, `ai-thinking`, `ai-function` and `interaction`, so without it "style the assistant's
|
|
5867
|
+
* rows, not the user's" takes four selectors and silently misses any type added later.
|
|
5868
|
+
* `::part()` names cannot be chained, so each has to be a name of its own rather than a
|
|
5869
|
+
* combination. The user side needs no extra name — its role and its type are both `user`.
|
|
5870
|
+
*
|
|
5871
|
+
* Shared by the avatar and the message row so the two cannot drift.
|
|
5872
|
+
*
|
|
5873
|
+
* Exported for the unit test that pins the vocabulary; not part of the element API.
|
|
5874
|
+
*
|
|
5875
|
+
* @internal
|
|
5876
|
+
*/
|
|
5877
|
+
export declare const rolePartsFor: (base: string, type: string) => string;
|
|
5878
|
+
|
|
5860
5879
|
/**
|
|
5861
5880
|
* Why {@link OrchestratingDriver.classify} returned the agent it did — reported on the
|
|
5862
5881
|
* `routing.decided` timeline event.
|
|
@@ -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",
|
|
@@ -4216,6 +4287,24 @@
|
|
|
4216
4287
|
},
|
|
4217
4288
|
"description": "Rejection messages for files the last pick refused."
|
|
4218
4289
|
},
|
|
4290
|
+
{
|
|
4291
|
+
"kind": "field",
|
|
4292
|
+
"name": "stepperNodes",
|
|
4293
|
+
"type": {
|
|
4294
|
+
"text": "Node[]"
|
|
4295
|
+
},
|
|
4296
|
+
"default": "[]",
|
|
4297
|
+
"description": "Elements assigned to the `stepper` slot, tracked so the conversation container can say\nwhether it is holding anything.\n\nComment nodes and whitespace text are filtered out by the template's `slotted` filter, so an\nempty slot really is empty here and `hasStepper` does not go true for formatting whitespace."
|
|
4298
|
+
},
|
|
4299
|
+
{
|
|
4300
|
+
"kind": "field",
|
|
4301
|
+
"name": "hasStepper",
|
|
4302
|
+
"type": {
|
|
4303
|
+
"text": "boolean"
|
|
4304
|
+
},
|
|
4305
|
+
"description": "Whether anything is slotted alongside the conversation.\n\nDrives the `conversation-has-stepper` part, which is what lets an app apply a side-by-side\nlayout only when there is a second thing to lay out — a `flex-direction: row` that applied\nunconditionally would do nothing visible but would still be live CSS to reason about.",
|
|
4306
|
+
"readonly": true
|
|
4307
|
+
},
|
|
4219
4308
|
{
|
|
4220
4309
|
"kind": "field",
|
|
4221
4310
|
"name": "showLoadingIndicator",
|
|
@@ -15882,7 +15971,7 @@
|
|
|
15882
15971
|
{
|
|
15883
15972
|
"kind": "variable",
|
|
15884
15973
|
"name": "WriteReviewStyles",
|
|
15885
|
-
"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`"
|
|
15886
15975
|
}
|
|
15887
15976
|
],
|
|
15888
15977
|
"exports": [
|
|
@@ -15906,7 +15995,7 @@
|
|
|
15906
15995
|
"type": {
|
|
15907
15996
|
"text": "ViewTemplate<GenesisWriteReview>"
|
|
15908
15997
|
},
|
|
15909
|
-
"default": "html<GenesisWriteReview>`\n ${when(\n (x) => !!x.model,\n html<GenesisWriteReview>`\n <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`"
|
|
15910
15999
|
}
|
|
15911
16000
|
],
|
|
15912
16001
|
"exports": [
|
|
@@ -16034,6 +16123,33 @@
|
|
|
16034
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.",
|
|
16035
16124
|
"readonly": true
|
|
16036
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
|
+
},
|
|
16037
16153
|
{
|
|
16038
16154
|
"kind": "field",
|
|
16039
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,KAAK,iBAAiB,EAEtB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EAEpB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/genesis/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,iBAAiB,EAEtB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EAEpB,MAAM,SAAS,CAAC;AAGjB,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,GAAI,UAAU,iBAAiB,KAAG,OAG3D,CAAC;AAsBF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,cAAc,MAAM,KAAG,MAAoC,CAAC;AAEvF;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,SAAS,iBAAiB,EAAE,GAAG,iBAAiB,EAAE,CAe7F;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,GAAI,cAAc,MAAM,KAAG,cAAc,GAAG,SAGlE,CAAC;AAcF;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI,EAC3C,EAAE,GAAE,OAAsB,GACzB,MAAM,EAAE,CAwDV;AAqCD;;;;;;G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|
-
{"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,
|
|
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;
|
|
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,
|
|
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:
|
|
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:
|
|
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,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC7B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,
|
|
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,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC7B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAA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AAC;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 {
|
|
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:
|
|
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:
|
|
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;
|
|
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,mDAAmD;AACnD,eAAO,MAAM,o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