@genesislcap/ai-assistant 15.107.0 → 15.108.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/chat-driver.cjs +36 -3
- package/dist/chat-driver.cjs.map +2 -2
- package/dist/chat-driver.mjs +36 -3
- package/dist/chat-driver.mjs.map +2 -2
- package/dist/custom-elements.json +8 -0
- package/dist/dts/chat-driver-node.d.ts +1 -1
- package/dist/dts/chat-driver-node.d.ts.map +1 -1
- package/dist/dts/genesis/config.d.ts.map +1 -1
- package/dist/esm/genesis/config.js +1 -1
- package/dist/esm/genesis/consumes.js +1 -1
- package/dist/genesis-consumes.cjs +1 -1
- package/dist/genesis-consumes.cjs.map +2 -2
- package/dist/genesis-consumes.mjs +1 -1
- package/dist/genesis-consumes.mjs.map +2 -2
- package/docs/genesis.md +2 -2
- package/package.json +17 -17
- package/scripts/smoke-genesis-consumes-node.mjs +1 -1
|
@@ -623,6 +623,14 @@
|
|
|
623
623
|
"package": "@genesislcap/foundation-ai"
|
|
624
624
|
}
|
|
625
625
|
},
|
|
626
|
+
{
|
|
627
|
+
"kind": "js",
|
|
628
|
+
"name": "OpenAITierConfig",
|
|
629
|
+
"declaration": {
|
|
630
|
+
"name": "OpenAITierConfig",
|
|
631
|
+
"package": "@genesislcap/foundation-ai"
|
|
632
|
+
}
|
|
633
|
+
},
|
|
626
634
|
{
|
|
627
635
|
"kind": "js",
|
|
628
636
|
"name": "AnthropicUsageRecord",
|
|
@@ -25,7 +25,7 @@ export * from './config/define-stateful-agent';
|
|
|
25
25
|
export * from './config/fallback-agents';
|
|
26
26
|
export * from './headless';
|
|
27
27
|
export { AnthropicProvider, AnthropicTransport, GeminiProvider, GeminiTransport, OpenAIProvider, OpenAITransport, MutableAIProviderRegistry, SUPPORTED_ANTHROPIC_MODEL_IDS, SUPPORTED_GEMINI_MODEL_IDS, SUPPORTED_OPENAI_MODEL_IDS, DEFAULT_PROVIDER_REFUSED_MESSAGE, PROVIDER_REFUSED_CODE, ProviderRefusedError, AI_SERVICE_ACCESS_REFUSALS, AI_SERVICE_ERROR_CODES, AIServiceError, aiServiceAccessRefusalOf, aiServiceErrorCodeOf, DEFAULT_AI_SERVICE_ERROR_MESSAGES, isTerminalAIServiceRefusal, isObservableAIProviderRegistry, ANTHROPIC_CACHE_READ_MULTIPLIER, ANTHROPIC_CACHE_WRITE_1H_MULTIPLIER, ANTHROPIC_CACHE_WRITE_5M_MULTIPLIER, anthropicCacheReadMultiplierFor, ANTHROPIC_LONG_CONTEXT_THRESHOLD, anthropicRatesFor, anthropicTokenCost, GEMINI_CACHED_INPUT_MULTIPLIER, GEMINI_LONG_CONTEXT_THRESHOLD, geminiRatesFor, geminiTokenCost, OPENAI_CACHE_WRITE_12H_MULTIPLIER, OPENAI_CACHE_WRITE_30M_MULTIPLIER, OPENAI_LONG_CONTEXT_THRESHOLD, openaiRatesFor, openaiTokenCost, vendorOfModel, AI_TIER_IDS, AI_TIER_VENDORS, DEFAULT_AI_TIERS, resolveAITiers, } from '@genesislcap/foundation-ai';
|
|
28
|
-
export type { AggregateUsage, AIProvider, AIProviderRegistry, AIServiceAccessRefusal, AIServiceErrorCode, AIServiceRefusal, AnthropicModelId, CachePolicy, ChatAttachment, ChatFallback, ChatImageAttachment, ChatMessage, ChatRequestOptions, ChatTextAttachment, ChatThinkingPolicy, ChatToolChoice, ChatToolDefinition, ChatToolHandlers, ChatToolResult, GeminiModelId, OpenAIModelId, AITierId, AITierOverrides, AITiers, AITierVendor, AnthropicTierConfig, GeminiTierConfig, AnthropicUsageRecord, GeminiUsageRecord, OpenAIUsageRecord, TokenCost, TokenCostBreakdown, TokenRates, } from '@genesislcap/foundation-ai';
|
|
28
|
+
export type { AggregateUsage, AIProvider, AIProviderRegistry, AIServiceAccessRefusal, AIServiceErrorCode, AIServiceRefusal, AnthropicModelId, CachePolicy, ChatAttachment, ChatFallback, ChatImageAttachment, ChatMessage, ChatRequestOptions, ChatTextAttachment, ChatThinkingPolicy, ChatToolChoice, ChatToolDefinition, ChatToolHandlers, ChatToolResult, GeminiModelId, OpenAIModelId, AITierId, AITierOverrides, AITiers, AITierVendor, AnthropicTierConfig, GeminiTierConfig, OpenAITierConfig, AnthropicUsageRecord, GeminiUsageRecord, OpenAIUsageRecord, TokenCost, TokenCostBreakdown, TokenRates, } from '@genesislcap/foundation-ai';
|
|
29
29
|
export { addUsage, emptyUsage, messageUsage, sumUsage, totalTokens } from './utils/sum-usage';
|
|
30
30
|
export { usageRows } from './utils/usage-rows';
|
|
31
31
|
export type { UsageRow } from './utils/usage-rows';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-driver-node.d.ts","sourceRoot":"","sources":["../../src/chat-driver-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AAMzC,cAAc,YAAY,CAAC;AAS3B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EAGf,cAAc,EACd,eAAe,EACf,yBAAyB,EAKzB,6BAA6B,EAC7B,0BAA0B,EAC1B,0BAA0B,EAQ1B,gCAAgC,EAChC,qBAAqB,EACrB,oBAAoB,EAIpB,0BAA0B,EAC1B,sBAAsB,EACtB,cAAc,EACd,wBAAwB,EACxB,oBAAoB,EACpB,iCAAiC,EACjC,0BAA0B,EAC1B,8BAA8B,EAW9B,+BAA+B,EAC/B,mCAAmC,EACnC,mCAAmC,EACnC,+BAA+B,EAC/B,gCAAgC,EAChC,iBAAiB,EACjB,kBAAkB,EAClB,8BAA8B,EAC9B,6BAA6B,EAC7B,cAAc,EACd,eAAe,EACf,iCAAiC,EACjC,iCAAiC,EACjC,6BAA6B,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,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/B,MACA,MAAM,MAAM,KAAG,MAOf,CAAC;AAEJ;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI,EAC3C,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,EACjC,cAAc,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAA8B,GAC/D,MAAM,GAAG,SAAS,CAuFpB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,iFAAiF;IACjF,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,qEAAqE;IACrE,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,0DAA0D;IAC1D,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,oBAAoB,CAwF7E;AASD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,iBAAiB,GAAG,sBAAsB,CA6ChF"}
|
|
@@ -367,7 +367,7 @@ export function validateGenesisAiConfig(config) {
|
|
|
367
367
|
if (c.enabled !== true)
|
|
368
368
|
problems.push(`enabled must be true (got ${String(c.enabled)})`);
|
|
369
369
|
if (c.vendor !== undefined && !AI_TIER_VENDORS.includes(c.vendor)) {
|
|
370
|
-
problems.push(`unknown vendor '${String(c.vendor)}' (expected ${AI_TIER_VENDORS.join('
|
|
370
|
+
problems.push(`unknown vendor '${String(c.vendor)}' (expected ${AI_TIER_VENDORS.join(', ')})`);
|
|
371
371
|
}
|
|
372
372
|
if (c.tier !== undefined && !AI_TIER_IDS.includes(c.tier)) {
|
|
373
373
|
problems.push(`unknown tier '${String(c.tier)}' (expected ${AI_TIER_IDS.join(', ')})`);
|
|
@@ -38,7 +38,7 @@ export const GENESIS_AI_CONSUMES = Object.freeze({
|
|
|
38
38
|
'inputs',
|
|
39
39
|
'effects',
|
|
40
40
|
]),
|
|
41
|
-
vendors: Object.freeze(['anthropic', 'gemini']),
|
|
41
|
+
vendors: Object.freeze(['anthropic', 'gemini', 'openai']),
|
|
42
42
|
tiers: Object.freeze(['low', 'high', 'reasoning']),
|
|
43
43
|
shapes: Object.freeze(['row', 'key-row']),
|
|
44
44
|
});
|
|
@@ -38,7 +38,7 @@ var GENESIS_AI_CONSUMES = Object.freeze({
|
|
|
38
38
|
"inputs",
|
|
39
39
|
"effects"
|
|
40
40
|
]),
|
|
41
|
-
vendors: Object.freeze(["anthropic", "gemini"]),
|
|
41
|
+
vendors: Object.freeze(["anthropic", "gemini", "openai"]),
|
|
42
42
|
tiers: Object.freeze(["low", "high", "reasoning"]),
|
|
43
43
|
shapes: Object.freeze(["row", "key-row"])
|
|
44
44
|
});
|
|
@@ -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, the `vendor` and `tier` values it\n * accepts, and the row-action shapes it runs.\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 shapes: Object.freeze(['row', 'key-row'] 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,
|
|
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, the `vendor` and `tier` values it\n * accepts, and the row-action shapes it runs.\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', 'openai'] as const),\n tiers: Object.freeze(['low', 'high', 'reasoning'] as const),\n shapes: Object.freeze(['row', 'key-row'] 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,UAAU,QAAQ,CAAU;AAAA,EACjE,OAAO,OAAO,OAAO,CAAC,OAAO,QAAQ,WAAW,CAAU;AAAA,EAC1D,QAAQ,OAAO,OAAO,CAAC,OAAO,SAAS,CAAU;AACnD,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -15,7 +15,7 @@ var GENESIS_AI_CONSUMES = Object.freeze({
|
|
|
15
15
|
"inputs",
|
|
16
16
|
"effects"
|
|
17
17
|
]),
|
|
18
|
-
vendors: Object.freeze(["anthropic", "gemini"]),
|
|
18
|
+
vendors: Object.freeze(["anthropic", "gemini", "openai"]),
|
|
19
19
|
tiers: Object.freeze(["low", "high", "reasoning"]),
|
|
20
20
|
shapes: Object.freeze(["row", "key-row"])
|
|
21
21
|
});
|
|
@@ -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, the `vendor` and `tier` values it\n * accepts, and the row-action shapes it runs.\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 shapes: Object.freeze(['row', 'key-row'] 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,
|
|
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, the `vendor` and `tier` values it\n * accepts, and the row-action shapes it runs.\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', 'openai'] as const),\n tiers: Object.freeze(['low', 'high', 'reasoning'] as const),\n shapes: Object.freeze(['row', 'key-row'] 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,UAAU,QAAQ,CAAU;AAAA,EACjE,OAAO,OAAO,OAAO,CAAC,OAAO,QAAQ,WAAW,CAAU;AAAA,EAC1D,QAAQ,OAAO,OAAO,CAAC,OAAO,SAAS,CAAU;AACnD,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/docs/genesis.md
CHANGED
|
@@ -99,7 +99,7 @@ that table, unless asked), then the extensions' prompt.
|
|
|
99
99
|
|
|
100
100
|
| Field | Rule |
|
|
101
101
|
| -------------- | ------------------------------------------------------------------------------------------- |
|
|
102
|
-
| `vendor` |
|
|
102
|
+
| `vendor` | `anthropic`, `gemini` or `openai`. Defaults to `gemini`. |
|
|
103
103
|
| `tier` | `low`, `high` or `reasoning`. Defaults to `high`. |
|
|
104
104
|
| `name` | Unique; the tool name is the lowercased name (≤ 64 chars). `REQ_<NAME>` for a request, `EVENT_<NAME>` for an event, and for a query the dataserver query's own name in upper-case letters, digits and underscores. |
|
|
105
105
|
| `kind` | `request`, `event` or `query`. The kind decides which name rule applies, never the name: a query named `REQ_…` is still a query. |
|
|
@@ -137,7 +137,7 @@ GENESIS_AI_CONSUMES;
|
|
|
137
137
|
// kinds: ['request', 'event', 'query'],
|
|
138
138
|
// resourceFields: ['name', 'kind', 'op', 'context', 'maxRows', 'customCode', 'references',
|
|
139
139
|
// 'shape', 'entity', 'key', 'inputs', 'effects'],
|
|
140
|
-
// vendors: ['anthropic', 'gemini'],
|
|
140
|
+
// vendors: ['anthropic', 'gemini', 'openai'],
|
|
141
141
|
// tiers: ['low', 'high', 'reasoning'],
|
|
142
142
|
// shapes: ['row', 'key-row'],
|
|
143
143
|
// }
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/ai-assistant",
|
|
3
3
|
"description": "Genesis AI Assistant micro-frontend",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.108.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/dts/index.d.ts",
|
|
@@ -102,31 +102,31 @@
|
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@genesislcap/foundation-comms": "15.
|
|
106
|
-
"@genesislcap/foundation-testing": "15.
|
|
107
|
-
"@genesislcap/genx": "15.
|
|
108
|
-
"@genesislcap/ts-builder": "15.
|
|
109
|
-
"@genesislcap/uvu-playwright-builder": "15.
|
|
110
|
-
"@genesislcap/vite-builder": "15.
|
|
111
|
-
"@genesislcap/webpack-builder": "15.
|
|
105
|
+
"@genesislcap/foundation-comms": "15.108.0",
|
|
106
|
+
"@genesislcap/foundation-testing": "15.108.0",
|
|
107
|
+
"@genesislcap/genx": "15.108.0",
|
|
108
|
+
"@genesislcap/ts-builder": "15.108.0",
|
|
109
|
+
"@genesislcap/uvu-playwright-builder": "15.108.0",
|
|
110
|
+
"@genesislcap/vite-builder": "15.108.0",
|
|
111
|
+
"@genesislcap/webpack-builder": "15.108.0",
|
|
112
112
|
"@types/dompurify": "^3.0.5",
|
|
113
113
|
"@types/marked": "^5.0.2",
|
|
114
114
|
"esbuild": "0.25.12"
|
|
115
115
|
},
|
|
116
116
|
"dependencies": {
|
|
117
|
-
"@genesislcap/foundation-ai": "15.
|
|
118
|
-
"@genesislcap/foundation-logger": "15.
|
|
119
|
-
"@genesislcap/foundation-notifications": "15.
|
|
120
|
-
"@genesislcap/foundation-redux": "15.
|
|
121
|
-
"@genesislcap/foundation-ui": "15.
|
|
122
|
-
"@genesislcap/foundation-utils": "15.
|
|
123
|
-
"@genesislcap/rapid-design-system": "15.
|
|
124
|
-
"@genesislcap/web-core": "15.
|
|
117
|
+
"@genesislcap/foundation-ai": "15.108.0",
|
|
118
|
+
"@genesislcap/foundation-logger": "15.108.0",
|
|
119
|
+
"@genesislcap/foundation-notifications": "15.108.0",
|
|
120
|
+
"@genesislcap/foundation-redux": "15.108.0",
|
|
121
|
+
"@genesislcap/foundation-ui": "15.108.0",
|
|
122
|
+
"@genesislcap/foundation-utils": "15.108.0",
|
|
123
|
+
"@genesislcap/rapid-design-system": "15.108.0",
|
|
124
|
+
"@genesislcap/web-core": "15.108.0",
|
|
125
125
|
"dompurify": "^3.3.1",
|
|
126
126
|
"marked": "^17.0.3"
|
|
127
127
|
},
|
|
128
128
|
"peerDependencies": {
|
|
129
|
-
"@genesislcap/foundation-comms": "15.
|
|
129
|
+
"@genesislcap/foundation-comms": "15.108.0"
|
|
130
130
|
},
|
|
131
131
|
"peerDependenciesMeta": {
|
|
132
132
|
"@genesislcap/foundation-comms": {
|