@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
|
@@ -93,6 +93,23 @@ const baseStyles = css `
|
|
|
93
93
|
height: 100%;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
/* Holds the stepper slot and the scroll area, and nothing else, so a host can
|
|
97
|
+
lay those two out against each other without the splash, the chips, the
|
|
98
|
+
banner and the composer joining in.
|
|
99
|
+
|
|
100
|
+
Takes over the flex sizing .messages used to get straight from .chat-wrapper:
|
|
101
|
+
this container now claims the free space and passes it down. min-height: 0 is
|
|
102
|
+
needed on BOTH — without it here the container refuses to shrink below its
|
|
103
|
+
content and the composer's drag-to-resize pushes the conversation out of the
|
|
104
|
+
column instead of taking space from it. Exposed as part="conversation". */
|
|
105
|
+
.conversation {
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-direction: column;
|
|
108
|
+
flex: 1;
|
|
109
|
+
min-width: 0;
|
|
110
|
+
min-height: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
96
113
|
.messages {
|
|
97
114
|
flex: 1;
|
|
98
115
|
|
|
@@ -100,10 +117,18 @@ const baseStyles = css `
|
|
|
100
117
|
composer (drag-to-resize) takes space from here instead of overflowing
|
|
101
118
|
the column and clipping the input row's buttons. */
|
|
102
119
|
min-height: 0;
|
|
120
|
+
min-width: 0;
|
|
103
121
|
overflow-y: auto;
|
|
104
122
|
padding: 10px;
|
|
105
123
|
}
|
|
106
124
|
|
|
125
|
+
/* Slotted content sits in the light DOM, so a host styles its own element
|
|
126
|
+
directly — these are only the defaults that keep it from stretching or
|
|
127
|
+
collapsing oddly before the host says anything. */
|
|
128
|
+
::slotted([slot='stepper']) {
|
|
129
|
+
flex: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
107
132
|
/* Caps and centres the conversation column inside the (full-width) scroll
|
|
108
133
|
container, so the scrollbar stays at the panel edge while the messages sit
|
|
109
134
|
in a readable-width column. Exposed as part="messages-content" so a host
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* lines let the formatter inject whitespace between them.
|
|
16
16
|
*/
|
|
17
17
|
import { isChatToolCallUnknown } from '@genesislcap/foundation-ai';
|
|
18
|
-
import { classNames, html, ref, repeat, when } from '@genesislcap/web-core';
|
|
18
|
+
import { classNames, html, ref, repeat, slotted, when } from '@genesislcap/web-core';
|
|
19
19
|
import { MARKDOWN_EXPORTPARTS } from '../components/chat-markdown/chat-markdown';
|
|
20
20
|
import { SettingsModalTemplate } from '../components/settings-modal';
|
|
21
21
|
import { SUGGESTIONS_EXPORTPARTS } from '../suggestions/chat-suggestions';
|
|
@@ -68,20 +68,23 @@ const messageType = (m) => {
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
72
|
-
* side, whose rows vary — the message type.
|
|
71
|
+
* The three names one element is exposed under: the bare name, a role-level name, and — on the
|
|
72
|
+
* assistant side, whose rows vary — the message type. `rolePartsFor('avatar', 'ai-thinking')` is
|
|
73
|
+
* `avatar avatar-assistant avatar-ai-thinking`.
|
|
73
74
|
*
|
|
74
75
|
* The role-level name is the one an app usually wants. `messageType` splits the assistant across
|
|
75
76
|
* `ai`, `ai-thinking`, `ai-function` and `interaction`, so without it "style the assistant's
|
|
76
|
-
*
|
|
77
|
+
* rows, not the user's" takes four selectors and silently misses any type added later.
|
|
77
78
|
* `::part()` names cannot be chained, so each has to be a name of its own rather than a
|
|
78
79
|
* combination. The user side needs no extra name — its role and its type are both `user`.
|
|
79
80
|
*
|
|
81
|
+
* Shared by the avatar and the message row so the two cannot drift.
|
|
82
|
+
*
|
|
80
83
|
* Exported for the unit test that pins the vocabulary; not part of the element API.
|
|
81
84
|
*
|
|
82
85
|
* @internal
|
|
83
86
|
*/
|
|
84
|
-
export const
|
|
87
|
+
export const rolePartsFor = (base, type) => type === 'user' ? `${base} ${base}-user` : `${base} ${base}-assistant ${base}-${type}`;
|
|
85
88
|
// Avatar markup is owned by the component (`assistantIconSafe` / `userIconSafe`),
|
|
86
89
|
// which holds the sanitized SVG string for the default or any consumer override
|
|
87
90
|
// and is injected via `:innerHTML`. A raster `image-src` / `user-image-src`
|
|
@@ -104,13 +107,13 @@ const assistantAvatarMarkup = (parent, type) => parent.imageSrc
|
|
|
104
107
|
src="${() => parent.imageSrc}"
|
|
105
108
|
alt="Assistant"
|
|
106
109
|
class="avatar-img"
|
|
107
|
-
part="${() =>
|
|
110
|
+
part="${() => rolePartsFor('avatar-img', type)}"
|
|
108
111
|
/>
|
|
109
112
|
`
|
|
110
113
|
: html `
|
|
111
114
|
<span
|
|
112
115
|
class="avatar-icon"
|
|
113
|
-
part="${() =>
|
|
116
|
+
part="${() => rolePartsFor('avatar-icon', type)}"
|
|
114
117
|
:innerHTML="${() => parent.assistantIconSafe}"
|
|
115
118
|
></span>
|
|
116
119
|
`;
|
|
@@ -126,13 +129,13 @@ const userAvatarTemplate = html `
|
|
|
126
129
|
src="${() => parent.userImageSrc}"
|
|
127
130
|
alt="You"
|
|
128
131
|
class="avatar-img"
|
|
129
|
-
part="${() =>
|
|
132
|
+
part="${() => rolePartsFor('avatar-img', 'user')}"
|
|
130
133
|
/>
|
|
131
134
|
`
|
|
132
135
|
: html `
|
|
133
136
|
<span
|
|
134
137
|
class="avatar-icon"
|
|
135
|
-
part="${() =>
|
|
138
|
+
part="${() => rolePartsFor('avatar-icon', 'user')}"
|
|
136
139
|
:innerHTML="${() => parent.userIconSafe}"
|
|
137
140
|
></span>
|
|
138
141
|
`;
|
|
@@ -171,6 +174,25 @@ const messageParts = (m) => {
|
|
|
171
174
|
? `message message-interaction message-interaction-${interactionPresentation(m)}`
|
|
172
175
|
: `message message-${type}`;
|
|
173
176
|
};
|
|
177
|
+
/**
|
|
178
|
+
* Space-separated `part` names for a message ROW — the flex line that holds the avatar and the
|
|
179
|
+
* bubble together.
|
|
180
|
+
*
|
|
181
|
+
* `messageParts` covers the bubble, not the line it sits on, so everything the row owns was
|
|
182
|
+
* unreachable: its `flex-direction` (reversed for the user, a column for most interactions), its
|
|
183
|
+
* `gap` between avatar and bubble, its `align-items`, and its entrance animation. An app wanting
|
|
184
|
+
* to change the spacing of a conversation, or to drop the slide-in, had nothing to select.
|
|
185
|
+
*
|
|
186
|
+
* Names mirror `messageParts` exactly — same types, same interaction presentations — so the row
|
|
187
|
+
* and the bubble are selected the same way, with `message-row` where `message` would be.
|
|
188
|
+
*/
|
|
189
|
+
const messageRowParts = (m) => {
|
|
190
|
+
const type = messageType(m);
|
|
191
|
+
const names = rolePartsFor('message-row', type);
|
|
192
|
+
return type === 'interaction'
|
|
193
|
+
? `${names} message-row-interaction-${interactionPresentation(m)}`
|
|
194
|
+
: names;
|
|
195
|
+
};
|
|
174
196
|
/**
|
|
175
197
|
* The timestamp shown beside the sender name (GENC-1257).
|
|
176
198
|
*
|
|
@@ -574,10 +596,11 @@ ${(tc) => { var _a; return (((_a = tc.foldPath) === null || _a === void 0 ? void
|
|
|
574
596
|
${when((m) => m.role !== 'system-event' && m.role !== 'compacted-summary', html `
|
|
575
597
|
<div
|
|
576
598
|
class="message-row ${(m) => messageType(m)} ${(m) => m.interaction ? `present-${interactionPresentation(m)}` : ''}"
|
|
599
|
+
part="${(m) => messageRowParts(m)}"
|
|
577
600
|
>
|
|
578
601
|
<div
|
|
579
602
|
class="avatar ${(m) => messageType(m)}"
|
|
580
|
-
part="${(m) =>
|
|
603
|
+
part="${(m) => rolePartsFor('avatar', messageType(m))}"
|
|
581
604
|
>
|
|
582
605
|
${when(
|
|
583
606
|
// Keyed on messageType (not raw role) so a synthetic-user message,
|
|
@@ -945,37 +968,56 @@ ${(tc) => { var _a; return (((_a = tc.foldPath) === null || _a === void 0 ? void
|
|
|
945
968
|
<slot name="splash"></slot>
|
|
946
969
|
</div>
|
|
947
970
|
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
971
|
+
${
|
|
972
|
+
/* The conversation column: a slot for something alongside the messages (a stepper, in the
|
|
973
|
+
case this was built for) and the scroll area, and NOTHING else. The splash overlay, the
|
|
974
|
+
attachment chips, the blocked banner and the composer are all siblings of this container
|
|
975
|
+
rather than of the messages, so an app can set a flex direction here and get exactly two
|
|
976
|
+
boxes to lay out instead of the whole chat column.
|
|
977
|
+
|
|
978
|
+
Always rendered, slot filled or not: an empty slot contributes no box, so the column
|
|
979
|
+
behaves exactly as it did before this wrapper existed. */ ''}
|
|
980
|
+
<div
|
|
981
|
+
class="conversation"
|
|
982
|
+
part="${(x) => (x.hasStepper ? 'conversation conversation-has-stepper' : 'conversation')}"
|
|
983
|
+
>
|
|
984
|
+
<slot
|
|
985
|
+
name="stepper"
|
|
986
|
+
${slotted({ property: 'stepperNodes', filter: (n) => n.nodeType === Node.ELEMENT_NODE })}
|
|
987
|
+
></slot>
|
|
988
|
+
|
|
989
|
+
<div class="messages" part="messages" ${ref('messagesEl')}>
|
|
990
|
+
<div
|
|
991
|
+
class="messages-content ${(x) => `timestamps-${x.timestampDisplay}`}"
|
|
992
|
+
part="messages-content"
|
|
993
|
+
>
|
|
994
|
+
${when((x) => x.compacting, compactingTemplate)}
|
|
995
|
+
${when((x) => x.restoring, restoringTemplate)}
|
|
996
|
+
${repeat((x) => (x.compacting || x.restoring ? [] : x.visibleMessages), messageRowTemplate)}
|
|
997
|
+
${
|
|
957
998
|
/* GENC-1429: recycle:false so each pending interaction gets a FRESH wrapper. With
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
999
|
+
recycling, the trailing slot's wrapper is reused across interactions (e.g. a tool that
|
|
1000
|
+
shows the code-diff approval, then the preview-status card): the reused wrapper still
|
|
1001
|
+
carries the prior interaction's truthy `resolved` (bound last, after componentName/
|
|
1002
|
+
interactionId trigger the re-render), so the completion listener's `if (this.resolved)
|
|
1003
|
+
return` guard swallows the next auto-resolve widget's completion and the driver hangs
|
|
1004
|
+
awaiting it. A fresh wrapper starts with resolved=undefined, so the guard is correct. */ ''}
|
|
1005
|
+
${repeat((x) => x.activeInteractionRow, messageRowTemplate, { recycle: false })}
|
|
1006
|
+
${when((x) => x.liveSubAgentTrace.length > 0 && x.showToolCalls, liveSubAgentTraceTemplate)}
|
|
1007
|
+
${when((x) => {
|
|
967
1008
|
var _a;
|
|
968
1009
|
return x.showLoadingIndicator &&
|
|
969
1010
|
(((_a = x.chatConfig.ui) === null || _a === void 0 ? void 0 : _a.animations) == null ||
|
|
970
1011
|
LOADING_STYLE_ANIMATIONS.some((s) => x.enabledAnimations.includes(s)));
|
|
971
1012
|
}, html `
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1013
|
+
<div class="message-row ai" part="thinking ${rolePartsFor('message-row', 'ai')}">
|
|
1014
|
+
<div class="avatar ai" part="${rolePartsFor('avatar', 'ai')}">
|
|
1015
|
+
${(x) => assistantAvatarMarkup(x, 'ai')}
|
|
1016
|
+
</div>
|
|
1017
|
+
${(x) => selectThinkingTemplate(x)}
|
|
975
1018
|
</div>
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
`)}
|
|
1019
|
+
`)}
|
|
1020
|
+
</div>
|
|
979
1021
|
</div>
|
|
980
1022
|
</div>
|
|
981
1023
|
|
|
@@ -31,7 +31,12 @@ var GENESIS_AI_CONSUMES = Object.freeze({
|
|
|
31
31
|
"context",
|
|
32
32
|
"maxRows",
|
|
33
33
|
"customCode",
|
|
34
|
-
"references"
|
|
34
|
+
"references",
|
|
35
|
+
"shape",
|
|
36
|
+
"entity",
|
|
37
|
+
"key",
|
|
38
|
+
"inputs",
|
|
39
|
+
"effects"
|
|
35
40
|
]),
|
|
36
41
|
vendors: Object.freeze(["anthropic", "gemini"]),
|
|
37
42
|
tiers: Object.freeze(["low", "high", "reasoning"])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/genesis/consumes.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * What this version of the assistant reads from a generated AI config\n * (`@genesislcap/ai-assistant/genesis/consumes`).\n *\n * @remarks\n * Its own entry point, loadable in bare Node, because the seed's CI reads it in a Node step and\n * `./genesis` cannot be: that entry is bundler-target ESM, and its closure registers custom\n * elements, which need a DOM. So this module imports nothing at run time. A type from `./types`\n * is all it may take, and a test holds it to that. The Node build bundles it to\n * `dist/genesis-consumes.mjs` and `.cjs`, and a smoke test loads both without a DOM.\n *\n * @packageDocumentation\n * @beta\n */\nimport type { GenesisAiConsumes } from './types';\n\nexport type { GenesisAiConsumes } from './types';\n\n/**\n * What this version of the assistant reads from a generated AI config: the resource kinds it\n * accepts, the resource fields its validator or a tool reads, and the `vendor` and `tier` values\n * it accepts.\n *\n * @remarks\n * The generator must not emit what the installed assistant does not read, or a new kind is left out\n * and a new field ignored \u2014 and an older assistant used to block entirely on a kind it did not know.\n * Nothing in the generator can say which version will run its output. So the app's seed declares\n * what it expects, and the seed's CI checks that declaration against this constant, exported from\n * the version it installs. That makes this the single statement of what an assistant consumes, and\n * it carries no version number because it needs none.\n *\n * A test holds it to the code: its kinds are the ones validation accepts, and its fields are the\n * ones read. A change that teaches the validator a kind, or a tool a field, updates it in the same\n * commit.\n *\n * A resource this version does not read is only left out, but an unknown `vendor` or `tier` still\n * blocks the whole assistant, so those are here too. They are written out rather than imported\n * from foundation-ai, which this entry must not load; a test holds them equal to its\n * `AI_TIER_VENDORS` and `AI_TIER_IDS`, which the validator checks against.\n *\n * @beta\n */\nexport const GENESIS_AI_CONSUMES: GenesisAiConsumes = Object.freeze({\n kinds: Object.freeze(['request', 'event', 'query'] as const),\n resourceFields: Object.freeze([\n 'name',\n 'kind',\n 'op',\n 'context',\n 'maxRows',\n 'customCode',\n 'references',\n ] as const),\n vendors: Object.freeze(['anthropic', 'gemini'] as const),\n tiers: Object.freeze(['low', 'high', 'reasoning'] as const),\n});\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0CO,IAAM,sBAAyC,OAAO,OAAO;AAAA,EAClE,OAAO,OAAO,OAAO,CAAC,WAAW,SAAS,OAAO,CAAU;AAAA,EAC3D,gBAAgB,OAAO,OAAO;AAAA,IAC5B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAU;AAAA,EACV,SAAS,OAAO,OAAO,CAAC,aAAa,QAAQ,CAAU;AAAA,EACvD,OAAO,OAAO,OAAO,CAAC,OAAO,QAAQ,WAAW,CAAU;AAC5D,CAAC;",
|
|
4
|
+
"sourcesContent": ["/**\n * What this version of the assistant reads from a generated AI config\n * (`@genesislcap/ai-assistant/genesis/consumes`).\n *\n * @remarks\n * Its own entry point, loadable in bare Node, because the seed's CI reads it in a Node step and\n * `./genesis` cannot be: that entry is bundler-target ESM, and its closure registers custom\n * elements, which need a DOM. So this module imports nothing at run time. A type from `./types`\n * is all it may take, and a test holds it to that. The Node build bundles it to\n * `dist/genesis-consumes.mjs` and `.cjs`, and a smoke test loads both without a DOM.\n *\n * @packageDocumentation\n * @beta\n */\nimport type { GenesisAiConsumes } from './types';\n\nexport type { GenesisAiConsumes } from './types';\n\n/**\n * What this version of the assistant reads from a generated AI config: the resource kinds it\n * accepts, the resource fields its validator or a tool reads, and the `vendor` and `tier` values\n * it accepts.\n *\n * @remarks\n * The generator must not emit what the installed assistant does not read, or a new kind is left out\n * and a new field ignored \u2014 and an older assistant used to block entirely on a kind it did not know.\n * Nothing in the generator can say which version will run its output. So the app's seed declares\n * what it expects, and the seed's CI checks that declaration against this constant, exported from\n * the version it installs. That makes this the single statement of what an assistant consumes, and\n * it carries no version number because it needs none.\n *\n * A test holds it to the code: its kinds are the ones validation accepts, and its fields are the\n * ones read. A change that teaches the validator a kind, or a tool a field, updates it in the same\n * commit.\n *\n * A resource this version does not read is only left out, but an unknown `vendor` or `tier` still\n * blocks the whole assistant, so those are here too. They are written out rather than imported\n * from foundation-ai, which this entry must not load; a test holds them equal to its\n * `AI_TIER_VENDORS` and `AI_TIER_IDS`, which the validator checks against.\n *\n * @beta\n */\nexport const GENESIS_AI_CONSUMES: GenesisAiConsumes = Object.freeze({\n kinds: Object.freeze(['request', 'event', 'query'] as const),\n resourceFields: Object.freeze([\n 'name',\n 'kind',\n 'op',\n 'context',\n 'maxRows',\n 'customCode',\n 'references',\n 'shape',\n 'entity',\n 'key',\n 'inputs',\n 'effects',\n ] as const),\n vendors: Object.freeze(['anthropic', 'gemini'] as const),\n tiers: Object.freeze(['low', 'high', 'reasoning'] as const),\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0CO,IAAM,sBAAyC,OAAO,OAAO;AAAA,EAClE,OAAO,OAAO,OAAO,CAAC,WAAW,SAAS,OAAO,CAAU;AAAA,EAC3D,gBAAgB,OAAO,OAAO;AAAA,IAC5B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAU;AAAA,EACV,SAAS,OAAO,OAAO,CAAC,aAAa,QAAQ,CAAU;AAAA,EACvD,OAAO,OAAO,OAAO,CAAC,OAAO,QAAQ,WAAW,CAAU;AAC5D,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -8,7 +8,12 @@ var GENESIS_AI_CONSUMES = Object.freeze({
|
|
|
8
8
|
"context",
|
|
9
9
|
"maxRows",
|
|
10
10
|
"customCode",
|
|
11
|
-
"references"
|
|
11
|
+
"references",
|
|
12
|
+
"shape",
|
|
13
|
+
"entity",
|
|
14
|
+
"key",
|
|
15
|
+
"inputs",
|
|
16
|
+
"effects"
|
|
12
17
|
]),
|
|
13
18
|
vendors: Object.freeze(["anthropic", "gemini"]),
|
|
14
19
|
tiers: Object.freeze(["low", "high", "reasoning"])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/genesis/consumes.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * What this version of the assistant reads from a generated AI config\n * (`@genesislcap/ai-assistant/genesis/consumes`).\n *\n * @remarks\n * Its own entry point, loadable in bare Node, because the seed's CI reads it in a Node step and\n * `./genesis` cannot be: that entry is bundler-target ESM, and its closure registers custom\n * elements, which need a DOM. So this module imports nothing at run time. A type from `./types`\n * is all it may take, and a test holds it to that. The Node build bundles it to\n * `dist/genesis-consumes.mjs` and `.cjs`, and a smoke test loads both without a DOM.\n *\n * @packageDocumentation\n * @beta\n */\nimport type { GenesisAiConsumes } from './types';\n\nexport type { GenesisAiConsumes } from './types';\n\n/**\n * What this version of the assistant reads from a generated AI config: the resource kinds it\n * accepts, the resource fields its validator or a tool reads, and the `vendor` and `tier` values\n * it accepts.\n *\n * @remarks\n * The generator must not emit what the installed assistant does not read, or a new kind is left out\n * and a new field ignored \u2014 and an older assistant used to block entirely on a kind it did not know.\n * Nothing in the generator can say which version will run its output. So the app's seed declares\n * what it expects, and the seed's CI checks that declaration against this constant, exported from\n * the version it installs. That makes this the single statement of what an assistant consumes, and\n * it carries no version number because it needs none.\n *\n * A test holds it to the code: its kinds are the ones validation accepts, and its fields are the\n * ones read. A change that teaches the validator a kind, or a tool a field, updates it in the same\n * commit.\n *\n * A resource this version does not read is only left out, but an unknown `vendor` or `tier` still\n * blocks the whole assistant, so those are here too. They are written out rather than imported\n * from foundation-ai, which this entry must not load; a test holds them equal to its\n * `AI_TIER_VENDORS` and `AI_TIER_IDS`, which the validator checks against.\n *\n * @beta\n */\nexport const GENESIS_AI_CONSUMES: GenesisAiConsumes = Object.freeze({\n kinds: Object.freeze(['request', 'event', 'query'] as const),\n resourceFields: Object.freeze([\n 'name',\n 'kind',\n 'op',\n 'context',\n 'maxRows',\n 'customCode',\n 'references',\n ] as const),\n vendors: Object.freeze(['anthropic', 'gemini'] as const),\n tiers: Object.freeze(['low', 'high', 'reasoning'] as const),\n});\n"],
|
|
5
|
-
"mappings": ";AA0CO,IAAM,sBAAyC,OAAO,OAAO;AAAA,EAClE,OAAO,OAAO,OAAO,CAAC,WAAW,SAAS,OAAO,CAAU;AAAA,EAC3D,gBAAgB,OAAO,OAAO;AAAA,IAC5B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAU;AAAA,EACV,SAAS,OAAO,OAAO,CAAC,aAAa,QAAQ,CAAU;AAAA,EACvD,OAAO,OAAO,OAAO,CAAC,OAAO,QAAQ,WAAW,CAAU;AAC5D,CAAC;",
|
|
4
|
+
"sourcesContent": ["/**\n * What this version of the assistant reads from a generated AI config\n * (`@genesislcap/ai-assistant/genesis/consumes`).\n *\n * @remarks\n * Its own entry point, loadable in bare Node, because the seed's CI reads it in a Node step and\n * `./genesis` cannot be: that entry is bundler-target ESM, and its closure registers custom\n * elements, which need a DOM. So this module imports nothing at run time. A type from `./types`\n * is all it may take, and a test holds it to that. The Node build bundles it to\n * `dist/genesis-consumes.mjs` and `.cjs`, and a smoke test loads both without a DOM.\n *\n * @packageDocumentation\n * @beta\n */\nimport type { GenesisAiConsumes } from './types';\n\nexport type { GenesisAiConsumes } from './types';\n\n/**\n * What this version of the assistant reads from a generated AI config: the resource kinds it\n * accepts, the resource fields its validator or a tool reads, and the `vendor` and `tier` values\n * it accepts.\n *\n * @remarks\n * The generator must not emit what the installed assistant does not read, or a new kind is left out\n * and a new field ignored \u2014 and an older assistant used to block entirely on a kind it did not know.\n * Nothing in the generator can say which version will run its output. So the app's seed declares\n * what it expects, and the seed's CI checks that declaration against this constant, exported from\n * the version it installs. That makes this the single statement of what an assistant consumes, and\n * it carries no version number because it needs none.\n *\n * A test holds it to the code: its kinds are the ones validation accepts, and its fields are the\n * ones read. A change that teaches the validator a kind, or a tool a field, updates it in the same\n * commit.\n *\n * A resource this version does not read is only left out, but an unknown `vendor` or `tier` still\n * blocks the whole assistant, so those are here too. They are written out rather than imported\n * from foundation-ai, which this entry must not load; a test holds them equal to its\n * `AI_TIER_VENDORS` and `AI_TIER_IDS`, which the validator checks against.\n *\n * @beta\n */\nexport const GENESIS_AI_CONSUMES: GenesisAiConsumes = Object.freeze({\n kinds: Object.freeze(['request', 'event', 'query'] as const),\n resourceFields: Object.freeze([\n 'name',\n 'kind',\n 'op',\n 'context',\n 'maxRows',\n 'customCode',\n 'references',\n 'shape',\n 'entity',\n 'key',\n 'inputs',\n 'effects',\n ] as const),\n vendors: Object.freeze(['anthropic', 'gemini'] as const),\n tiers: Object.freeze(['low', 'high', 'reasoning'] as const),\n});\n"],
|
|
5
|
+
"mappings": ";AA0CO,IAAM,sBAAyC,OAAO,OAAO;AAAA,EAClE,OAAO,OAAO,OAAO,CAAC,WAAW,SAAS,OAAO,CAAU;AAAA,EAC3D,gBAAgB,OAAO,OAAO;AAAA,IAC5B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAU;AAAA,EACV,SAAS,OAAO,OAAO,CAAC,aAAa,QAAQ,CAAU;AAAA,EACvD,OAAO,OAAO,OAAO,CAAC,OAAO,QAAQ,WAAW,CAAU;AAC5D,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|