@genesislcap/ai-assistant 15.108.0 → 15.109.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 +410 -4
- package/dist/ai-assistant.d.ts +121 -2
- package/dist/chat-driver.cjs +33 -15
- package/dist/chat-driver.cjs.map +2 -2
- package/dist/chat-driver.mjs +33 -15
- package/dist/chat-driver.mjs.map +2 -2
- package/dist/custom-elements.json +767 -566
- package/dist/dts/components/chat-driver/chat-driver.d.ts +9 -0
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +2 -0
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
- package/dist/dts/components/settings-modal/settings-modal.d.ts +2 -0
- package/dist/dts/components/settings-modal/settings-modal.d.ts.map +1 -1
- package/dist/dts/components/settings-modal/settings-modal.styles.d.ts.map +1 -1
- package/dist/dts/components/settings-modal/settings-modal.template.d.ts +1 -0
- package/dist/dts/components/settings-modal/settings-modal.template.d.ts.map +1 -1
- package/dist/dts/genesis/register-genesis-assistant.d.ts +24 -0
- package/dist/dts/genesis/register-genesis-assistant.d.ts.map +1 -1
- package/dist/dts/genesis/types.d.ts +8 -2
- package/dist/dts/genesis/types.d.ts.map +1 -1
- package/dist/dts/genesis/vendor-follower.d.ts +86 -0
- package/dist/dts/genesis/vendor-follower.d.ts.map +1 -0
- package/dist/dts/genesis/vendor-pick.d.ts +36 -0
- package/dist/dts/genesis/vendor-pick.d.ts.map +1 -0
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/main/budget-controller.d.ts +6 -0
- package/dist/dts/main/budget-controller.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +30 -0
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/vendor-picker-controller.d.ts +89 -0
- package/dist/dts/main/vendor-picker-controller.d.ts.map +1 -0
- package/dist/dts/provider/ai-provider-switcher.d.ts +22 -1
- package/dist/dts/provider/ai-provider-switcher.d.ts.map +1 -1
- package/dist/dts/provider/tiered-provider-switcher.d.ts +39 -2
- package/dist/dts/provider/tiered-provider-switcher.d.ts.map +1 -1
- package/dist/esm/chat-driver-node.js +1 -1
- package/dist/esm/components/chat-driver/chat-driver.js +3 -2
- package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +1 -0
- package/dist/esm/components/settings-modal/settings-modal.js +4 -1
- package/dist/esm/components/settings-modal/settings-modal.styles.js +59 -0
- package/dist/esm/components/settings-modal/settings-modal.template.js +54 -1
- package/dist/esm/genesis/register-genesis-assistant.js +72 -7
- package/dist/esm/genesis/vendor-follower.js +149 -0
- package/dist/esm/genesis/vendor-pick.js +67 -0
- package/dist/esm/main/budget-controller.js +11 -9
- package/dist/esm/main/main.js +57 -0
- package/dist/esm/main/vendor-picker-controller.js +141 -0
- package/dist/esm/provider/tiered-provider-switcher.js +54 -1
- package/docs/genesis.md +35 -1
- package/package.json +17 -17
package/dist/chat-driver.mjs
CHANGED
|
@@ -4826,31 +4826,46 @@ var AI_TIER_VENDORS = ["anthropic", "gemini", "openai"];
|
|
|
4826
4826
|
var AI_STALL_TIMEOUT_MS = 6e4;
|
|
4827
4827
|
var AI_NO_RESPONSE_TIMEOUT_MS = 3e5;
|
|
4828
4828
|
var DEFAULT_AI_TIERS = Object.freeze({
|
|
4829
|
+
// The Claude 5.5 family, as Genesis Create runs it (GENC-1665). All three think by default and
|
|
4830
|
+
// replay that thinking under preserved thinking, so the transport sends `thinking.block_binding`
|
|
4831
|
+
// and its `anthropic-beta: thinking-binding-controls-2026-08-01` header on every adaptive turn,
|
|
4832
|
+
// through a `serverEndpoint` too: a proxy in front of these tiers has to forward that header,
|
|
4833
|
+
// or each such turn is a 400. Every model here has a documented 128K output ceiling.
|
|
4829
4834
|
anthropic: Object.freeze({
|
|
4835
|
+
// A lighter-loop tier that never emits a whole file. 32K rather than Haiku 4.5's 16K because
|
|
4836
|
+
// Haiku 5.5 thinks by default (effort `medium`) and bills that thinking out of `max_tokens`,
|
|
4837
|
+
// where 4.5 did not think and 16K was all answer. $0.10 / $0.50 per MTok up to 100K prompt
|
|
4838
|
+
// tokens ($0.50 / $2.50 above), against Haiku 4.5's $1 / $5.
|
|
4830
4839
|
low: Object.freeze({
|
|
4831
|
-
model: "claude-haiku-
|
|
4832
|
-
maxTokens:
|
|
4840
|
+
model: "claude-haiku-5-5",
|
|
4841
|
+
maxTokens: 32e3,
|
|
4833
4842
|
stallTimeoutMs: AI_STALL_TIMEOUT_MS,
|
|
4834
4843
|
timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
|
|
4835
4844
|
}),
|
|
4836
|
-
// The heavy tier: whole-file writes, and adaptive thinking out of the same budget
|
|
4837
|
-
//
|
|
4838
|
-
//
|
|
4845
|
+
// The heavy tier: whole-file writes, and adaptive thinking out of the same budget wherever a
|
|
4846
|
+
// caller leaves thinking on — hence the full 128K ceiling rather than a figure that only fits
|
|
4847
|
+
// one of the two. A `thinkingPolicy: 'off'` turn spends all of it on output: Sonnet 5.5
|
|
4848
|
+
// rejects `disabled`, so the transport turns thinking off with `between_tools` (short progress
|
|
4849
|
+
// notes between tool calls, no extended thinking, and no `block_binding`, which it rejects).
|
|
4850
|
+
// Same $2 / $10 as Sonnet 5, cache reads at $0.10. It rejects a forced `tool_choice`; the
|
|
4851
|
+
// transport downgrades one to `auto` plus an instruction.
|
|
4839
4852
|
high: Object.freeze({
|
|
4840
|
-
model: "claude-sonnet-5",
|
|
4853
|
+
model: "claude-sonnet-5-5",
|
|
4841
4854
|
maxTokens: 128e3,
|
|
4842
4855
|
stallTimeoutMs: AI_STALL_TIMEOUT_MS,
|
|
4843
4856
|
timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
|
|
4844
4857
|
}),
|
|
4845
|
-
//
|
|
4846
|
-
// `
|
|
4847
|
-
//
|
|
4848
|
-
//
|
|
4849
|
-
//
|
|
4850
|
-
//
|
|
4858
|
+
// Judgement calls rather than whole-file writes, but Opus 5.5 ALWAYS thinks (`disabled` is a
|
|
4859
|
+
// 400 at every effort; `'off'` drops it to effort `low` instead) and the thinking comes out of
|
|
4860
|
+
// this same budget before the answer is written. Opus 4.8's 32K was sized for a model that did
|
|
4861
|
+
// not think unless asked; Create saw a thinking reasoning tier spend all of 32K and end at
|
|
4862
|
+
// `max_tokens` with no tool call (GENC-1789), so this gets the full 128K. `max_tokens` is only
|
|
4863
|
+
// a cap: a turn that stops short of it bills nothing extra. Cheaper than Opus 4.8 ($4 / $20
|
|
4864
|
+
// against $5 / $25), with native structured output, and like Sonnet 5.5 it rejects a forced
|
|
4865
|
+
// `tool_choice`.
|
|
4851
4866
|
reasoning: Object.freeze({
|
|
4852
|
-
model: "claude-opus-
|
|
4853
|
-
maxTokens:
|
|
4867
|
+
model: "claude-opus-5-5",
|
|
4868
|
+
maxTokens: 128e3,
|
|
4854
4869
|
stallTimeoutMs: AI_STALL_TIMEOUT_MS,
|
|
4855
4870
|
timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
|
|
4856
4871
|
})
|
|
@@ -8514,6 +8529,7 @@ var ChatDriver = class _ChatDriver extends EventTarget {
|
|
|
8514
8529
|
deferAgentRelease = false,
|
|
8515
8530
|
activityBus = NOOP_ACTIVITY_BUS,
|
|
8516
8531
|
budgetExhaustedMessage,
|
|
8532
|
+
vendorSwitchPlace = "in Settings",
|
|
8517
8533
|
providerRefusedMessage,
|
|
8518
8534
|
aiServiceErrorMessages
|
|
8519
8535
|
} = config;
|
|
@@ -8523,6 +8539,7 @@ var ChatDriver = class _ChatDriver extends EventTarget {
|
|
|
8523
8539
|
this.deferAgentRelease = deferAgentRelease;
|
|
8524
8540
|
this.activityBus = activityBus;
|
|
8525
8541
|
this.budgetExhaustedMessageOverride = budgetExhaustedMessage;
|
|
8542
|
+
this.vendorSwitchPlace = vendorSwitchPlace;
|
|
8526
8543
|
this.providerRefusedMessageOverride = providerRefusedMessage;
|
|
8527
8544
|
this.aiServiceErrorMessagesOverride = aiServiceErrorMessages;
|
|
8528
8545
|
if (typeof toolHandlers === "function") {
|
|
@@ -8724,7 +8741,7 @@ var ChatDriver = class _ChatDriver extends EventTarget {
|
|
|
8724
8741
|
if (this.budgetExhaustedMessageOverride != null) return this.budgetExhaustedMessageOverride;
|
|
8725
8742
|
if (wall?.otherVendorAvailable !== true) return TURN_FAILURE_EXITS.budgetExhausted.copy;
|
|
8726
8743
|
const subject = wall?.vendorLabel ? `${wall.vendorLabel}'s AI usage limit` : "your AI usage limit";
|
|
8727
|
-
return `You've reached ${subject}. Switch to another AI provider
|
|
8744
|
+
return `You've reached ${subject}. Switch to another AI provider ${this.vendorSwitchPlace} to keep going, or contact your administrator to raise it.`;
|
|
8728
8745
|
}
|
|
8729
8746
|
/**
|
|
8730
8747
|
* Record a message the user sent and then stopped before any turn took it: during an
|
|
@@ -11711,6 +11728,7 @@ var OrchestratingDriver = class _OrchestratingDriver extends BaseDriverDecorator
|
|
|
11711
11728
|
sessionKey: options.sessionKey ?? "",
|
|
11712
11729
|
activityBus: options.activityBus,
|
|
11713
11730
|
budgetExhaustedMessage: options.budgetExhaustedMessage,
|
|
11731
|
+
vendorSwitchPlace: options.vendorSwitchPlace,
|
|
11714
11732
|
aiServiceErrorMessages: options.aiServiceErrorMessages,
|
|
11715
11733
|
// A release can hand back to a waiting caller, so this driver acts on the flag itself.
|
|
11716
11734
|
deferAgentRelease: true
|