@genesislcap/ai-assistant 15.103.2 → 15.105.0-GENC-2037.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-assistant.api.json +121 -3
- package/dist/ai-assistant.d.ts +41 -1
- package/dist/chat-driver.cjs +77 -19
- package/dist/chat-driver.cjs.map +2 -2
- package/dist/chat-driver.mjs +77 -19
- package/dist/chat-driver.mjs.map +2 -2
- package/dist/custom-elements.json +1305 -1247
- package/dist/dts/autopilot/decision-message.d.ts.map +1 -1
- 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/dts/genesis/preview-vendor.d.ts +55 -0
- package/dist/dts/genesis/preview-vendor.d.ts.map +1 -0
- package/dist/dts/genesis/register-genesis-assistant.d.ts +12 -0
- package/dist/dts/genesis/register-genesis-assistant.d.ts.map +1 -1
- package/dist/dts/genesis/types.d.ts +4 -0
- package/dist/dts/genesis/types.d.ts.map +1 -1
- package/dist/dts/headless/describe-interaction.d.ts.map +1 -1
- package/dist/dts/headless/headless.types.d.ts +2 -0
- package/dist/dts/headless/headless.types.d.ts.map +1 -1
- package/dist/dts/headless-server/types.d.ts +1 -0
- package/dist/dts/headless-server/types.d.ts.map +1 -1
- package/dist/dts/provider/tiered-provider-switcher.d.ts +31 -1
- package/dist/dts/provider/tiered-provider-switcher.d.ts.map +1 -1
- package/dist/dts/state/decision-surface.d.ts.map +1 -1
- package/dist/dts/types/interaction-surface.d.ts +8 -0
- package/dist/dts/types/interaction-surface.d.ts.map +1 -1
- package/dist/esm/autopilot/decision-message.js +3 -2
- package/dist/esm/chat-driver-node.js +1 -1
- package/dist/esm/genesis/config.js +1 -1
- package/dist/esm/genesis/consumes.js +1 -1
- package/dist/esm/genesis/preview-vendor.js +120 -0
- package/dist/esm/genesis/register-genesis-assistant.js +36 -4
- package/dist/esm/headless/describe-interaction.js +1 -1
- package/dist/esm/headless-server/compact.js +1 -1
- package/dist/esm/provider/tiered-provider-switcher.js +53 -1
- package/dist/esm/state/decision-surface.js +7 -2
- 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/dist/headless-server.cjs +1 -1
- package/dist/headless-server.cjs.map +2 -2
- package/dist/headless-server.mjs +1 -1
- package/dist/headless-server.mjs.map +2 -2
- package/docs/genesis.md +15 -3
- package/package.json +17 -17
- package/scripts/smoke-genesis-consumes-node.mjs +1 -1
|
@@ -18917,7 +18917,7 @@
|
|
|
18917
18917
|
},
|
|
18918
18918
|
{
|
|
18919
18919
|
"kind": "Content",
|
|
18920
|
-
"text": "string | {\n readonly id?: string;\n readonly label: string;\n readonly unavailable?: () => string | undefined;\n}"
|
|
18920
|
+
"text": "string | {\n readonly id?: string;\n readonly label: string;\n readonly hint?: string;\n readonly unavailable?: () => string | undefined;\n}"
|
|
18921
18921
|
},
|
|
18922
18922
|
{
|
|
18923
18923
|
"kind": "Content",
|
|
@@ -19948,6 +19948,33 @@
|
|
|
19948
19948
|
"endIndex": 2
|
|
19949
19949
|
}
|
|
19950
19950
|
},
|
|
19951
|
+
{
|
|
19952
|
+
"kind": "PropertySignature",
|
|
19953
|
+
"canonicalReference": "@genesislcap/ai-assistant!DescribedAction#hint:member",
|
|
19954
|
+
"docComment": "/**\n * A sentence worth knowing before picking it. Only on a numbered option, when its widget gave one.\n */\n",
|
|
19955
|
+
"excerptTokens": [
|
|
19956
|
+
{
|
|
19957
|
+
"kind": "Content",
|
|
19958
|
+
"text": "readonly hint?: "
|
|
19959
|
+
},
|
|
19960
|
+
{
|
|
19961
|
+
"kind": "Content",
|
|
19962
|
+
"text": "string"
|
|
19963
|
+
},
|
|
19964
|
+
{
|
|
19965
|
+
"kind": "Content",
|
|
19966
|
+
"text": ";"
|
|
19967
|
+
}
|
|
19968
|
+
],
|
|
19969
|
+
"isReadonly": true,
|
|
19970
|
+
"isOptional": true,
|
|
19971
|
+
"releaseTag": "Beta",
|
|
19972
|
+
"name": "hint",
|
|
19973
|
+
"propertyTypeTokenRange": {
|
|
19974
|
+
"startIndex": 1,
|
|
19975
|
+
"endIndex": 2
|
|
19976
|
+
}
|
|
19977
|
+
},
|
|
19951
19978
|
{
|
|
19952
19979
|
"kind": "PropertySignature",
|
|
19953
19980
|
"canonicalReference": "@genesislcap/ai-assistant!DescribedAction#label:member",
|
|
@@ -43218,6 +43245,33 @@
|
|
|
43218
43245
|
"endIndex": 2
|
|
43219
43246
|
}
|
|
43220
43247
|
},
|
|
43248
|
+
{
|
|
43249
|
+
"kind": "PropertySignature",
|
|
43250
|
+
"canonicalReference": "@genesislcap/ai-assistant!SurfaceAction#hint:member",
|
|
43251
|
+
"docComment": "/**\n * A short-form option's hint, when its widget gave one: a sentence worth knowing before picking it.\n */\n",
|
|
43252
|
+
"excerptTokens": [
|
|
43253
|
+
{
|
|
43254
|
+
"kind": "Content",
|
|
43255
|
+
"text": "readonly hint?: "
|
|
43256
|
+
},
|
|
43257
|
+
{
|
|
43258
|
+
"kind": "Content",
|
|
43259
|
+
"text": "string"
|
|
43260
|
+
},
|
|
43261
|
+
{
|
|
43262
|
+
"kind": "Content",
|
|
43263
|
+
"text": ";"
|
|
43264
|
+
}
|
|
43265
|
+
],
|
|
43266
|
+
"isReadonly": true,
|
|
43267
|
+
"isOptional": true,
|
|
43268
|
+
"releaseTag": "Beta",
|
|
43269
|
+
"name": "hint",
|
|
43270
|
+
"propertyTypeTokenRange": {
|
|
43271
|
+
"startIndex": 1,
|
|
43272
|
+
"endIndex": 2
|
|
43273
|
+
}
|
|
43274
|
+
},
|
|
43221
43275
|
{
|
|
43222
43276
|
"kind": "PropertySignature",
|
|
43223
43277
|
"canonicalReference": "@genesislcap/ai-assistant!SurfaceAction#label:member",
|
|
@@ -44747,6 +44801,70 @@
|
|
|
44747
44801
|
"isAbstract": false,
|
|
44748
44802
|
"name": "adoptPersistedVendor"
|
|
44749
44803
|
},
|
|
44804
|
+
{
|
|
44805
|
+
"kind": "Method",
|
|
44806
|
+
"canonicalReference": "@genesislcap/ai-assistant!TieredAIProviderSwitcher#setAvailableVendors:member(1)",
|
|
44807
|
+
"docComment": "/**\n * Change which vendors are available, within the ones it was constructed with, and optionally which one is active — in one registry rebuild.\n *\n * @remarks\n *\n * For a host that learns at runtime which vendors its proxy can serve. Genesis Create's preview is the one today: the app is built before the user picks a vendor there, so it registers every vendor and narrows to the ones Create offers once it has asked. The standby entries follow the list, so the assistant's budget-wall banner offers a switch only to a vendor that can answer.\n *\n * `active` is adopted the way {@link TieredAIProviderSwitcher.adoptPersistedVendor} adopts a vendor: subscribers hear of a change, `onSwitch` does not fire. Left out, the active vendor stays when the new list keeps it and becomes the list's first when it does not.\n *\n * Ignored as a whole — nothing changes — when no listed vendor is one it was constructed with, or when `active` is not in the list. A call that changes neither the list nor the vendor leaves the registry alone, so a host may repeat it as often as it asks.\n */\n",
|
|
44808
|
+
"excerptTokens": [
|
|
44809
|
+
{
|
|
44810
|
+
"kind": "Content",
|
|
44811
|
+
"text": "setAvailableVendors(vendors: "
|
|
44812
|
+
},
|
|
44813
|
+
{
|
|
44814
|
+
"kind": "Content",
|
|
44815
|
+
"text": "readonly string[]"
|
|
44816
|
+
},
|
|
44817
|
+
{
|
|
44818
|
+
"kind": "Content",
|
|
44819
|
+
"text": ", active?: "
|
|
44820
|
+
},
|
|
44821
|
+
{
|
|
44822
|
+
"kind": "Content",
|
|
44823
|
+
"text": "string"
|
|
44824
|
+
},
|
|
44825
|
+
{
|
|
44826
|
+
"kind": "Content",
|
|
44827
|
+
"text": "): "
|
|
44828
|
+
},
|
|
44829
|
+
{
|
|
44830
|
+
"kind": "Content",
|
|
44831
|
+
"text": "void"
|
|
44832
|
+
},
|
|
44833
|
+
{
|
|
44834
|
+
"kind": "Content",
|
|
44835
|
+
"text": ";"
|
|
44836
|
+
}
|
|
44837
|
+
],
|
|
44838
|
+
"isStatic": false,
|
|
44839
|
+
"returnTypeTokenRange": {
|
|
44840
|
+
"startIndex": 5,
|
|
44841
|
+
"endIndex": 6
|
|
44842
|
+
},
|
|
44843
|
+
"releaseTag": "Beta",
|
|
44844
|
+
"isProtected": false,
|
|
44845
|
+
"overloadIndex": 1,
|
|
44846
|
+
"parameters": [
|
|
44847
|
+
{
|
|
44848
|
+
"parameterName": "vendors",
|
|
44849
|
+
"parameterTypeTokenRange": {
|
|
44850
|
+
"startIndex": 1,
|
|
44851
|
+
"endIndex": 2
|
|
44852
|
+
},
|
|
44853
|
+
"isOptional": false
|
|
44854
|
+
},
|
|
44855
|
+
{
|
|
44856
|
+
"parameterName": "active",
|
|
44857
|
+
"parameterTypeTokenRange": {
|
|
44858
|
+
"startIndex": 3,
|
|
44859
|
+
"endIndex": 4
|
|
44860
|
+
},
|
|
44861
|
+
"isOptional": true
|
|
44862
|
+
}
|
|
44863
|
+
],
|
|
44864
|
+
"isOptional": false,
|
|
44865
|
+
"isAbstract": false,
|
|
44866
|
+
"name": "setAvailableVendors"
|
|
44867
|
+
},
|
|
44750
44868
|
{
|
|
44751
44869
|
"kind": "Method",
|
|
44752
44870
|
"canonicalReference": "@genesislcap/ai-assistant!TieredAIProviderSwitcher#subscribe:member(1)",
|
|
@@ -44877,11 +44995,11 @@
|
|
|
44877
44995
|
{
|
|
44878
44996
|
"kind": "Property",
|
|
44879
44997
|
"canonicalReference": "@genesislcap/ai-assistant!TieredAIProviderSwitcher#vendors:member",
|
|
44880
|
-
"docComment": "",
|
|
44998
|
+
"docComment": "/**\n * The vendors it can switch between now: `vendors` as constructed, unless {@link TieredAIProviderSwitcher.setAvailableVendors} has narrowed them since.\n */\n",
|
|
44881
44999
|
"excerptTokens": [
|
|
44882
45000
|
{
|
|
44883
45001
|
"kind": "Content",
|
|
44884
|
-
"text": "
|
|
45002
|
+
"text": "get vendors(): "
|
|
44885
45003
|
},
|
|
44886
45004
|
{
|
|
44887
45005
|
"kind": "Content",
|
package/dist/ai-assistant.d.ts
CHANGED
|
@@ -4707,6 +4707,12 @@ export declare type DecisionOption = string | {
|
|
|
4707
4707
|
readonly id?: string;
|
|
4708
4708
|
/** The option's text, as the person sees it. */
|
|
4709
4709
|
readonly label: string;
|
|
4710
|
+
/**
|
|
4711
|
+
* A sentence worth knowing before picking the option, as the person reads it (e.g. a
|
|
4712
|
+
* tooltip). Shown with the option to whoever decides it, so the autopilot and the headless CLI
|
|
4713
|
+
* choose from more than the bare label. Plain text, static like the label.
|
|
4714
|
+
*/
|
|
4715
|
+
readonly hint?: string;
|
|
4710
4716
|
/**
|
|
4711
4717
|
* Why it cannot be chosen right now, or `undefined` when it can — the button's own guard (e.g.
|
|
4712
4718
|
* "2 validation errors" for a Continue that needs a validated handler). Read fresh every time.
|
|
@@ -4979,6 +4985,8 @@ export declare interface DescribedAction {
|
|
|
4979
4985
|
readonly name: string;
|
|
4980
4986
|
/** What the person would read on the button, when it differs from the name. */
|
|
4981
4987
|
readonly label?: string;
|
|
4988
|
+
/** A sentence worth knowing before picking it. Only on a numbered option, when its widget gave one. */
|
|
4989
|
+
readonly hint?: string;
|
|
4982
4990
|
/** What a full-form action does, as its widget wrote it. */
|
|
4983
4991
|
readonly description?: string;
|
|
4984
4992
|
/** Whether it can be taken now. */
|
|
@@ -10480,6 +10488,8 @@ export declare interface SurfaceAction {
|
|
|
10480
10488
|
readonly name: string;
|
|
10481
10489
|
/** The text the person sees for it, where it has one. */
|
|
10482
10490
|
readonly label?: string;
|
|
10491
|
+
/** A short-form option's hint, when its widget gave one: a sentence worth knowing before picking it. */
|
|
10492
|
+
readonly hint?: string;
|
|
10483
10493
|
/** Whether running it settles the interaction. Every short-form action does. */
|
|
10484
10494
|
readonly finishes: boolean;
|
|
10485
10495
|
/** Whether it can be run right now. */
|
|
@@ -10775,7 +10785,12 @@ export declare type ThinkingPolicyInput = ChatThinkingPolicy | ((ctx: SystemProm
|
|
|
10775
10785
|
* @beta
|
|
10776
10786
|
*/
|
|
10777
10787
|
export declare class TieredAIProviderSwitcher implements AIProviderSwitcher {
|
|
10778
|
-
|
|
10788
|
+
/**
|
|
10789
|
+
* The vendors it was constructed with: {@link TieredAIProviderSwitcher.setAvailableVendors}
|
|
10790
|
+
* chooses among these and never adds one.
|
|
10791
|
+
*/
|
|
10792
|
+
private readonly builtVendors;
|
|
10793
|
+
private _vendors;
|
|
10779
10794
|
private readonly options;
|
|
10780
10795
|
private readonly defaultTier;
|
|
10781
10796
|
private readonly registry;
|
|
@@ -10783,6 +10798,31 @@ export declare class TieredAIProviderSwitcher implements AIProviderSwitcher {
|
|
|
10783
10798
|
private _vendor;
|
|
10784
10799
|
constructor(options: TieredAIProviderSwitcherOptions);
|
|
10785
10800
|
get vendor(): AITierVendor;
|
|
10801
|
+
/**
|
|
10802
|
+
* The vendors it can switch between now: `vendors` as constructed, unless
|
|
10803
|
+
* {@link TieredAIProviderSwitcher.setAvailableVendors} has narrowed them since.
|
|
10804
|
+
*/
|
|
10805
|
+
get vendors(): readonly AITierVendor[];
|
|
10806
|
+
/**
|
|
10807
|
+
* Change which vendors are available, within the ones it was constructed with, and optionally
|
|
10808
|
+
* which one is active — in one registry rebuild.
|
|
10809
|
+
*
|
|
10810
|
+
* @remarks
|
|
10811
|
+
* For a host that learns at runtime which vendors its proxy can serve. Genesis Create's preview
|
|
10812
|
+
* is the one today: the app is built before the user picks a vendor there, so it registers every
|
|
10813
|
+
* vendor and narrows to the ones Create offers once it has asked. The standby entries follow
|
|
10814
|
+
* the list, so the assistant's budget-wall banner offers a switch only to a vendor that can
|
|
10815
|
+
* answer.
|
|
10816
|
+
*
|
|
10817
|
+
* `active` is adopted the way {@link TieredAIProviderSwitcher.adoptPersistedVendor} adopts a
|
|
10818
|
+
* vendor: subscribers hear of a change, `onSwitch` does not fire. Left out, the active vendor
|
|
10819
|
+
* stays when the new list keeps it and becomes the list's first when it does not.
|
|
10820
|
+
*
|
|
10821
|
+
* Ignored as a whole — nothing changes — when no listed vendor is one it was constructed with,
|
|
10822
|
+
* or when `active` is not in the list. A call that changes neither the list nor the vendor
|
|
10823
|
+
* leaves the registry alone, so a host may repeat it as often as it asks.
|
|
10824
|
+
*/
|
|
10825
|
+
setAvailableVendors(vendors: readonly string[], active?: string): void;
|
|
10786
10826
|
/**
|
|
10787
10827
|
* A user-driven switch: move the registry, then tell the app so it can persist the choice.
|
|
10788
10828
|
* An unknown vendor is ignored.
|
package/dist/chat-driver.cjs
CHANGED
|
@@ -4920,35 +4920,50 @@ var MutableAIProviderRegistry = class _MutableAIProviderRegistry {
|
|
|
4920
4920
|
|
|
4921
4921
|
// ../../foundation-ai/dist/esm/tiers/ai-tiers.js
|
|
4922
4922
|
var AI_TIER_IDS = ["low", "high", "reasoning"];
|
|
4923
|
-
var AI_TIER_VENDORS = ["anthropic", "gemini"];
|
|
4923
|
+
var AI_TIER_VENDORS = ["anthropic", "gemini", "openai"];
|
|
4924
4924
|
var AI_STALL_TIMEOUT_MS = 6e4;
|
|
4925
4925
|
var AI_NO_RESPONSE_TIMEOUT_MS = 3e5;
|
|
4926
4926
|
var DEFAULT_AI_TIERS = Object.freeze({
|
|
4927
|
+
// The Claude 5.5 family, as Genesis Create runs it (GENC-1665). All three think by default and
|
|
4928
|
+
// replay that thinking under preserved thinking, so the transport sends `thinking.block_binding`
|
|
4929
|
+
// and its `anthropic-beta: thinking-binding-controls-2026-08-01` header on every adaptive turn,
|
|
4930
|
+
// through a `serverEndpoint` too: a proxy in front of these tiers has to forward that header,
|
|
4931
|
+
// or each such turn is a 400. Every model here has a documented 128K output ceiling.
|
|
4927
4932
|
anthropic: Object.freeze({
|
|
4933
|
+
// A lighter-loop tier that never emits a whole file. 32K rather than Haiku 4.5's 16K because
|
|
4934
|
+
// Haiku 5.5 thinks by default (effort `medium`) and bills that thinking out of `max_tokens`,
|
|
4935
|
+
// where 4.5 did not think and 16K was all answer. $0.10 / $0.50 per MTok up to 100K prompt
|
|
4936
|
+
// tokens ($0.50 / $2.50 above), against Haiku 4.5's $1 / $5.
|
|
4928
4937
|
low: Object.freeze({
|
|
4929
|
-
model: "claude-haiku-
|
|
4930
|
-
maxTokens:
|
|
4938
|
+
model: "claude-haiku-5-5",
|
|
4939
|
+
maxTokens: 32e3,
|
|
4931
4940
|
stallTimeoutMs: AI_STALL_TIMEOUT_MS,
|
|
4932
4941
|
timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
|
|
4933
4942
|
}),
|
|
4934
|
-
// The heavy tier: whole-file writes, and adaptive thinking out of the same budget
|
|
4935
|
-
//
|
|
4936
|
-
//
|
|
4943
|
+
// The heavy tier: whole-file writes, and adaptive thinking out of the same budget wherever a
|
|
4944
|
+
// caller leaves thinking on — hence the full 128K ceiling rather than a figure that only fits
|
|
4945
|
+
// one of the two. A `thinkingPolicy: 'off'` turn spends all of it on output: Sonnet 5.5
|
|
4946
|
+
// rejects `disabled`, so the transport turns thinking off with `between_tools` (short progress
|
|
4947
|
+
// notes between tool calls, no extended thinking, and no `block_binding`, which it rejects).
|
|
4948
|
+
// Same $2 / $10 as Sonnet 5, cache reads at $0.10. It rejects a forced `tool_choice`; the
|
|
4949
|
+
// transport downgrades one to `auto` plus an instruction.
|
|
4937
4950
|
high: Object.freeze({
|
|
4938
|
-
model: "claude-sonnet-5",
|
|
4951
|
+
model: "claude-sonnet-5-5",
|
|
4939
4952
|
maxTokens: 128e3,
|
|
4940
4953
|
stallTimeoutMs: AI_STALL_TIMEOUT_MS,
|
|
4941
4954
|
timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
|
|
4942
4955
|
}),
|
|
4943
|
-
//
|
|
4944
|
-
// `
|
|
4945
|
-
//
|
|
4946
|
-
//
|
|
4947
|
-
//
|
|
4948
|
-
//
|
|
4956
|
+
// Judgement calls rather than whole-file writes, but Opus 5.5 ALWAYS thinks (`disabled` is a
|
|
4957
|
+
// 400 at every effort; `'off'` drops it to effort `low` instead) and the thinking comes out of
|
|
4958
|
+
// this same budget before the answer is written. Opus 4.8's 32K was sized for a model that did
|
|
4959
|
+
// not think unless asked; Create saw a thinking reasoning tier spend all of 32K and end at
|
|
4960
|
+
// `max_tokens` with no tool call (GENC-1789), so this gets the full 128K. `max_tokens` is only
|
|
4961
|
+
// a cap: a turn that stops short of it bills nothing extra. Cheaper than Opus 4.8 ($4 / $20
|
|
4962
|
+
// against $5 / $25), with native structured output, and like Sonnet 5.5 it rejects a forced
|
|
4963
|
+
// `tool_choice`.
|
|
4949
4964
|
reasoning: Object.freeze({
|
|
4950
|
-
model: "claude-opus-
|
|
4951
|
-
maxTokens:
|
|
4965
|
+
model: "claude-opus-5-5",
|
|
4966
|
+
maxTokens: 128e3,
|
|
4952
4967
|
stallTimeoutMs: AI_STALL_TIMEOUT_MS,
|
|
4953
4968
|
timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
|
|
4954
4969
|
})
|
|
@@ -4976,14 +4991,47 @@ var DEFAULT_AI_TIERS = Object.freeze({
|
|
|
4976
4991
|
stallTimeoutMs: AI_STALL_TIMEOUT_MS,
|
|
4977
4992
|
timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
|
|
4978
4993
|
})
|
|
4994
|
+
}),
|
|
4995
|
+
// NOT BENCHED. Proposed defaults picked by price and capability tier alone, so that a
|
|
4996
|
+
// generated app can name `vendor: 'openai'` at all; they have not been through the ui-builder
|
|
4997
|
+
// bench the Anthropic and Gemini rows came out of. Run that bench before treating these as a
|
|
4998
|
+
// platform decision, and move any row it disagrees with.
|
|
4999
|
+
//
|
|
5000
|
+
// No `maxTokens` on any row: `max_output_tokens` is optional on the Responses API and the
|
|
5001
|
+
// transport omits it when unset, so the model's own ceiling applies and a whole-file write is
|
|
5002
|
+
// not truncated the way Anthropic's 4096 default would truncate it.
|
|
5003
|
+
openai: Object.freeze({
|
|
5004
|
+
// The cheapest GPT-6 tier ($0.10 / $0.50), and one of the two that accepts reasoning
|
|
5005
|
+
// effort `none`, so a caller that turns thinking off gets no reasoning at all.
|
|
5006
|
+
low: Object.freeze({
|
|
5007
|
+
model: "gpt-6-luna",
|
|
5008
|
+
stallTimeoutMs: AI_STALL_TIMEOUT_MS,
|
|
5009
|
+
timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
|
|
5010
|
+
}),
|
|
5011
|
+
// $1 / $5, and it also accepts effort `none`, so tool loops that turn thinking off are not
|
|
5012
|
+
// forced to pay for it.
|
|
5013
|
+
high: Object.freeze({
|
|
5014
|
+
model: "gpt-6.1-terra",
|
|
5015
|
+
stallTimeoutMs: AI_STALL_TIMEOUT_MS,
|
|
5016
|
+
timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
|
|
5017
|
+
}),
|
|
5018
|
+
// $2 / $10 rather than gpt-6-astra's $10 / $50. It cannot turn reasoning off (`off` runs at
|
|
5019
|
+
// effort `low`), which suits a tier asked for judgement calls. Its transport warns on every
|
|
5020
|
+
// construction that it is the dearer model; that warning is expected here.
|
|
5021
|
+
reasoning: Object.freeze({
|
|
5022
|
+
model: "gpt-6.1-sol",
|
|
5023
|
+
stallTimeoutMs: AI_STALL_TIMEOUT_MS,
|
|
5024
|
+
timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
|
|
5025
|
+
})
|
|
4979
5026
|
})
|
|
4980
5027
|
});
|
|
4981
5028
|
function resolveAITiers(overrides) {
|
|
4982
|
-
if (!(overrides === null || overrides === void 0 ? void 0 : overrides.anthropic) && !(overrides === null || overrides === void 0 ? void 0 : overrides.gemini))
|
|
5029
|
+
if (!(overrides === null || overrides === void 0 ? void 0 : overrides.anthropic) && !(overrides === null || overrides === void 0 ? void 0 : overrides.gemini) && !(overrides === null || overrides === void 0 ? void 0 : overrides.openai))
|
|
4983
5030
|
return DEFAULT_AI_TIERS;
|
|
4984
5031
|
return Object.freeze({
|
|
4985
5032
|
anthropic: mergeVendor(DEFAULT_AI_TIERS.anthropic, overrides.anthropic),
|
|
4986
|
-
gemini: mergeVendor(DEFAULT_AI_TIERS.gemini, overrides.gemini)
|
|
5033
|
+
gemini: mergeVendor(DEFAULT_AI_TIERS.gemini, overrides.gemini),
|
|
5034
|
+
openai: mergeVendor(DEFAULT_AI_TIERS.openai, overrides.openai)
|
|
4987
5035
|
});
|
|
4988
5036
|
}
|
|
4989
5037
|
function mergeVendor(defaults, overrides) {
|
|
@@ -6649,7 +6697,12 @@ var IdleClock = class {
|
|
|
6649
6697
|
// src/state/decision-surface.ts
|
|
6650
6698
|
var SELECT_ACTION = "select";
|
|
6651
6699
|
var REPLY_ACTION = "reply";
|
|
6652
|
-
var normalise = (option) => typeof option === "string" ? { id: option, label: option } : {
|
|
6700
|
+
var normalise = (option) => typeof option === "string" ? { id: option, label: option } : {
|
|
6701
|
+
id: option.id ?? option.label,
|
|
6702
|
+
label: option.label,
|
|
6703
|
+
hint: option.hint,
|
|
6704
|
+
unavailable: option.unavailable
|
|
6705
|
+
};
|
|
6653
6706
|
var GENERIC_UNAVAILABLE = "not available in this state";
|
|
6654
6707
|
function unavailableReason(guard, ...args) {
|
|
6655
6708
|
if (!guard) return void 0;
|
|
@@ -6691,6 +6744,7 @@ function buildDecisionSurface(spec) {
|
|
|
6691
6744
|
return {
|
|
6692
6745
|
name: o.id,
|
|
6693
6746
|
label: o.label,
|
|
6747
|
+
...o.hint !== void 0 ? { hint: o.hint } : {},
|
|
6694
6748
|
finishes: true,
|
|
6695
6749
|
enabled: unavailable === void 0,
|
|
6696
6750
|
...unavailable !== void 0 ? { unavailable } : {}
|
|
@@ -12886,7 +12940,10 @@ function renderActions(actions, options = {}) {
|
|
|
12886
12940
|
lines.push(` reply({text}) \u2014 answer in your own words${unavailable}`);
|
|
12887
12941
|
} else {
|
|
12888
12942
|
numbering.push(action.name);
|
|
12889
|
-
|
|
12943
|
+
const hint = action.hint?.trim();
|
|
12944
|
+
lines.push(
|
|
12945
|
+
` [${numbering.length}] "${action.label ?? action.name}"${hint ? ` \u2014 ${hint}` : ""}${unavailable}`
|
|
12946
|
+
);
|
|
12890
12947
|
}
|
|
12891
12948
|
}
|
|
12892
12949
|
const allSettle = actions.every((a) => a.description === void 0);
|
|
@@ -13021,6 +13078,7 @@ var describeAction = (action, n) => ({
|
|
|
13021
13078
|
...n !== void 0 ? { n } : {},
|
|
13022
13079
|
name: action.name,
|
|
13023
13080
|
...action.label !== void 0 ? { label: action.label } : {},
|
|
13081
|
+
...action.hint !== void 0 ? { hint: action.hint } : {},
|
|
13024
13082
|
...action.description !== void 0 ? { description: action.description } : {},
|
|
13025
13083
|
enabled: action.enabled,
|
|
13026
13084
|
...action.unavailable !== void 0 ? { unavailable: action.unavailable } : {},
|