@genesislcap/ai-assistant 15.40.0 → 15.42.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 +409 -9
- package/dist/ai-assistant.d.ts +196 -6
- package/dist/chat-driver.cjs +682 -140
- package/dist/chat-driver.cjs.map +3 -3
- package/dist/chat-driver.mjs +675 -140
- package/dist/chat-driver.mjs.map +3 -3
- package/dist/custom-elements.json +1007 -436
- package/dist/dts/chat-driver-node.d.ts +2 -2
- package/dist/dts/chat-driver-node.d.ts.map +1 -1
- package/dist/dts/components/ai-driver/ai-driver.d.ts +4 -0
- package/dist/dts/components/ai-driver/ai-driver.d.ts.map +1 -1
- package/dist/dts/components/chat-driver/chat-driver.d.ts +121 -4
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/chat-driver/interaction-controller.d.ts.map +1 -1
- package/dist/dts/components/chat-driver/turn-failures.d.ts +7 -1
- package/dist/dts/components/chat-driver/turn-failures.d.ts.map +1 -1
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +3 -1
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
- package/dist/dts/genesis/index.d.ts +2 -1
- package/dist/dts/genesis/index.d.ts.map +1 -1
- package/dist/dts/genesis/register-genesis-assistant.d.ts +21 -0
- package/dist/dts/genesis/register-genesis-assistant.d.ts.map +1 -1
- package/dist/dts/genesis/review-model.d.ts +40 -0
- package/dist/dts/genesis/review-model.d.ts.map +1 -1
- package/dist/dts/genesis/review-payload.d.ts +47 -0
- package/dist/dts/genesis/review-payload.d.ts.map +1 -0
- package/dist/dts/genesis/write-review/write-review.d.ts +75 -11
- 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 +49 -0
- package/dist/dts/genesis/write-tools.d.ts.map +1 -1
- package/dist/dts/genesis/write-turn.d.ts +114 -0
- package/dist/dts/genesis/write-turn.d.ts.map +1 -0
- package/dist/dts/index.d.ts +2 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/main/budget-controller.d.ts +12 -2
- package/dist/dts/main/budget-controller.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +33 -6
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/react.d.ts +2 -1
- package/dist/dts/state/ai-assistant-slice.d.ts +15 -0
- package/dist/dts/state/ai-assistant-slice.d.ts.map +1 -1
- package/dist/dts/state/session-store.d.ts +1 -0
- package/dist/dts/state/session-store.d.ts.map +1 -1
- package/dist/dts/suggestions/generate-suggestions.d.ts.map +1 -1
- package/dist/dts/utils/history-transform.d.ts.map +1 -1
- package/dist/esm/chat-driver-node.js +5 -1
- package/dist/esm/components/chat-driver/chat-driver.js +431 -92
- package/dist/esm/components/chat-driver/interaction-controller.js +25 -2
- package/dist/esm/components/chat-driver/turn-failures.js +9 -2
- package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +30 -4
- package/dist/esm/genesis/register-genesis-assistant.js +38 -2
- package/dist/esm/genesis/review-model.js +47 -1
- package/dist/esm/genesis/review-payload.js +18 -0
- package/dist/esm/genesis/write-review/write-review.js +225 -40
- package/dist/esm/genesis/write-review/write-review.styles.js +18 -0
- package/dist/esm/genesis/write-review/write-review.template.js +46 -22
- package/dist/esm/genesis/write-tools.js +321 -49
- package/dist/esm/genesis/write-turn.js +110 -0
- package/dist/esm/main/budget-controller.js +39 -5
- package/dist/esm/main/main.js +45 -23
- package/dist/esm/state/ai-assistant-slice.js +11 -1
- package/dist/esm/state/debug-event-log.js +1 -1
- package/dist/esm/suggestions/generate-suggestions.js +4 -1
- package/dist/esm/utils/history-transform.js +7 -1
- package/dist/react.cjs +14 -2
- package/dist/react.mjs +14 -2
- package/docs/genesis.md +120 -3
- package/docs/migration-GENC-1464.md +12 -2
- package/docs/sub_agent.md +21 -4
- package/package.json +18 -18
- package/scripts/smoke-chat-driver-node.mjs +15 -0
package/dist/ai-assistant.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import type { AggregateUsage } from '@genesislcap/foundation-ai';
|
|
|
3
3
|
import { AIProviderRegistry } from '@genesislcap/foundation-ai';
|
|
4
4
|
import type { AIProviderRegistryStatusEntry } from '@genesislcap/foundation-ai';
|
|
5
5
|
import { AIProviderType } from '@genesislcap/foundation-ai';
|
|
6
|
+
import { AIServiceError } from '@genesislcap/foundation-ai';
|
|
7
|
+
import type { AIServiceRefusal } from '@genesislcap/foundation-ai';
|
|
6
8
|
import { AITierId } from '@genesislcap/foundation-ai';
|
|
7
9
|
import { AITiers } from '@genesislcap/foundation-ai';
|
|
8
10
|
import { AITierVendor } from '@genesislcap/foundation-ai';
|
|
@@ -753,6 +755,10 @@ export declare interface AiDriver extends EventTarget {
|
|
|
753
755
|
* user message. Used by `OrchestratingDriver` on agent handoffs — the
|
|
754
756
|
* handoff context is already in history; `transientPrimer` is injected as
|
|
755
757
|
* an invisible one-shot message for this call only.
|
|
758
|
+
*
|
|
759
|
+
* A handoff continues the same user message, so tool handlers keep its
|
|
760
|
+
* `turnSignal`. A continuation after the user stopped that message is not
|
|
761
|
+
* part of it, and gets a fresh one.
|
|
756
762
|
*/
|
|
757
763
|
continueFromHistory(transientPrimer?: ChatMessage[]): Promise<ChatDriverResult>;
|
|
758
764
|
/**
|
|
@@ -1004,6 +1010,12 @@ export declare interface AIProviderSwitcher {
|
|
|
1004
1010
|
*/
|
|
1005
1011
|
export declare const AIProviderSwitcher: InterfaceSymbol<AIProviderSwitcher>;
|
|
1006
1012
|
|
|
1013
|
+
/** What a child's AI service refusal carries up to its parent (GENC-1611). */
|
|
1014
|
+
declare type AIServiceWall = {
|
|
1015
|
+
code: AIServiceRefusal;
|
|
1016
|
+
vendor?: AIProviderType;
|
|
1017
|
+
};
|
|
1018
|
+
|
|
1007
1019
|
/**
|
|
1008
1020
|
* All available animation names, derived from the registry.
|
|
1009
1021
|
*
|
|
@@ -1494,6 +1506,13 @@ export declare const BLOCKED_BANNER_ID = "blocked-banner";
|
|
|
1494
1506
|
*/
|
|
1495
1507
|
export declare const blockedBannerClasses: (x: FoundationAiAssistant) => string;
|
|
1496
1508
|
|
|
1509
|
+
/**
|
|
1510
|
+
* Why the assistant is blocked, as the composer placeholder needs to know it (GENC-1611).
|
|
1511
|
+
*
|
|
1512
|
+
* @beta
|
|
1513
|
+
*/
|
|
1514
|
+
export declare type BlockedCause = 'budget' | 'other';
|
|
1515
|
+
|
|
1497
1516
|
/**
|
|
1498
1517
|
* The `budget` payload carried on a `'budget-exhausted'` {@link ChatDriverResult}.
|
|
1499
1518
|
* Derived from the type rather than restated so the two cannot drift.
|
|
@@ -1738,6 +1757,21 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
1738
1757
|
private turnCancelled;
|
|
1739
1758
|
/** Detaches the lifecycle→turn abort link at turn end; set by `beginTurn`. */
|
|
1740
1759
|
private unlinkLifecycleFromTurn?;
|
|
1760
|
+
/**
|
|
1761
|
+
* The scope tool handlers see as `turnSignal`: one USER MESSAGE. Minted by `sendMessage`, so a
|
|
1762
|
+
* handoff's `continueFromHistory` — a new `turnController`, but the same message — keeps it,
|
|
1763
|
+
* and a sub-agent inherits it (`inheritedTurnSignal`). Aborted by `cancel()` and by a dispose.
|
|
1764
|
+
* `continueFromHistory` mints one only when the message it would continue was stopped.
|
|
1765
|
+
*
|
|
1766
|
+
* Kept apart from `turnController`, which is per REQUEST and restarts on every continuation: a
|
|
1767
|
+
* handler that remembers something "for the rest of the turn" (the write tools' deny lock) keyed
|
|
1768
|
+
* on that one was reset by every handoff inside a single message.
|
|
1769
|
+
*/
|
|
1770
|
+
private messageController;
|
|
1771
|
+
/** Detaches the lifecycle→message abort link; replaced by the next `beginMessage`. */
|
|
1772
|
+
private unlinkLifecycleFromMessage?;
|
|
1773
|
+
/** A sub-agent runs inside its parent's message: the parent's `turnSignal`, handed down. */
|
|
1774
|
+
private inheritedTurnSignal?;
|
|
1741
1775
|
/**
|
|
1742
1776
|
* Active agent's provider selector (static name or per-turn resolver).
|
|
1743
1777
|
* `undefined` means "use the registry default".
|
|
@@ -1871,6 +1905,29 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
1871
1905
|
private providerRefusedThisTurn;
|
|
1872
1906
|
/** The refusal detail latched off a sub-agent's failure, for the parent's own result. */
|
|
1873
1907
|
private providerRefusedDetail?;
|
|
1908
|
+
/** Host overrides for the AI service error sentences (`ChatDriverConfig.aiServiceErrorMessages`). */
|
|
1909
|
+
private readonly aiServiceErrorMessagesOverride?;
|
|
1910
|
+
/**
|
|
1911
|
+
* A sub-agent was refused by the AI service this turn in a way that stops this driver too
|
|
1912
|
+
* (GENC-1611): a service-wide code, from the vendor this driver calls. Sub-agent path only, like
|
|
1913
|
+
* `providerRefusedThisTurn`; this driver's own refusal returns straight out of the catch.
|
|
1914
|
+
*/
|
|
1915
|
+
private aiServiceErrorThisTurn;
|
|
1916
|
+
/** The refusal latched off that sub-agent's failure, first one wins. */
|
|
1917
|
+
private aiServiceWall?;
|
|
1918
|
+
/**
|
|
1919
|
+
* Where a sub-agent sends the code of a refusal it absorbed: its parent, and from there up to the
|
|
1920
|
+
* driver whose transcript the user sees.
|
|
1921
|
+
*/
|
|
1922
|
+
private hostAIServiceNotice?;
|
|
1923
|
+
/** Codes a child's refusal was already shown for during this user message. */
|
|
1924
|
+
private aiServiceNoticesShown;
|
|
1925
|
+
/**
|
|
1926
|
+
* Notices waiting for the tool batch to end. Written mid-batch they would sit between the
|
|
1927
|
+
* assistant's tool calls and their results, where a later sub-agent's primer would pick up the
|
|
1928
|
+
* unanswered calls.
|
|
1929
|
+
*/
|
|
1930
|
+
private aiServiceNoticesQueued;
|
|
1874
1931
|
/**
|
|
1875
1932
|
* Set the moment a budget wall is observed anywhere in this turn — this
|
|
1876
1933
|
* driver's own 402, or a sub-agent's (which surfaces here only as a
|
|
@@ -1922,10 +1979,24 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
1922
1979
|
/**
|
|
1923
1980
|
* Stop the current turn (user "stop" button). Aborts the in-flight provider
|
|
1924
1981
|
* request immediately; if a tool is mid-execution it runs to completion and
|
|
1925
|
-
* the loop bails at the next boundary (tools are atomic).
|
|
1926
|
-
* The driver stays usable for the
|
|
1982
|
+
* the loop bails at the next boundary (tools are atomic). When idle it only ends
|
|
1983
|
+
* the message (see below) and appends nothing. The driver stays usable for the
|
|
1984
|
+
* next message.
|
|
1927
1985
|
*/
|
|
1928
1986
|
cancel(): void;
|
|
1987
|
+
/**
|
|
1988
|
+
* Start a fresh per-MESSAGE scope for tool handlers (see `messageController`). Chained to
|
|
1989
|
+
* `lifecycleController` so a dispose aborts it; the link lives until the next message, because
|
|
1990
|
+
* a handoff continues this one.
|
|
1991
|
+
*/
|
|
1992
|
+
private beginMessage;
|
|
1993
|
+
/**
|
|
1994
|
+
* Makes this (sub-agent) driver's handlers see the parent message's `turnSignal` instead of one
|
|
1995
|
+
* of their own: a delegation is part of the message that made it.
|
|
1996
|
+
*
|
|
1997
|
+
* @internal
|
|
1998
|
+
*/
|
|
1999
|
+
inheritTurnSignal(signal: AbortSignal): void;
|
|
1929
2000
|
/**
|
|
1930
2001
|
* Start a fresh per-turn abort scope. Chains `lifecycleController` into the
|
|
1931
2002
|
* new `turnController` so a dispose mid-turn also aborts the request.
|
|
@@ -1986,6 +2057,16 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
1986
2057
|
* @internal
|
|
1987
2058
|
*/
|
|
1988
2059
|
private budgetExhaustedBubble;
|
|
2060
|
+
/**
|
|
2061
|
+
* Record a message the user sent and then stopped before any turn took it: during an
|
|
2062
|
+
* orchestrator's first classify, or its first agent's install. Only an optimistic
|
|
2063
|
+
* `history-updated` had shown it, so it vanished on the next update, and from a reload. Appended
|
|
2064
|
+
* here with the "Stopped." marker a stopped turn leaves, as `reportBudgetExhausted` appends a
|
|
2065
|
+
* message the budget wall kept from its turn.
|
|
2066
|
+
*
|
|
2067
|
+
* @internal
|
|
2068
|
+
*/
|
|
2069
|
+
reportStoppedBeforeTurn(userMessage: ChatMessage): void;
|
|
1989
2070
|
reportBudgetExhausted(e: BudgetExhaustedError, pendingUserMessage?: ChatMessage): ChatDriverResult;
|
|
1990
2071
|
/**
|
|
1991
2072
|
* The sentence shown when the upstream provider refuses (GENC-1506).
|
|
@@ -1996,6 +2077,50 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
1996
2077
|
* has gone unpaid — so there is nothing here to compose. A host override wins verbatim.
|
|
1997
2078
|
*/
|
|
1998
2079
|
private providerRefusedBubble;
|
|
2080
|
+
/**
|
|
2081
|
+
* A terminal AI service error hit **outside** the tool loop — `OrchestratingDriver`'s classification
|
|
2082
|
+
* phase (GENC-1611). The same log line, debug-log entry, sentence and result as the in-loop branch.
|
|
2083
|
+
*
|
|
2084
|
+
* @param pendingUserMessage - the user's message when it has NOT been appended yet, for the reason
|
|
2085
|
+
* `reportBudgetExhausted` gives.
|
|
2086
|
+
*/
|
|
2087
|
+
reportAIServiceError(e: AIServiceError, pendingUserMessage?: ChatMessage): ChatDriverResult;
|
|
2088
|
+
/**
|
|
2089
|
+
* The sentence for an AI service error code (GENC-1611): the host's override, else the default.
|
|
2090
|
+
* Never the service's own text, which goes to the console only.
|
|
2091
|
+
*/
|
|
2092
|
+
private aiServiceErrorBubble;
|
|
2093
|
+
/**
|
|
2094
|
+
* Shows a sub-agent's AI-service refusal that the turn went on without, once per code in a user
|
|
2095
|
+
* message: the user's sentence with the host's overrides, never the service's text. A sub-agent
|
|
2096
|
+
* passes it up to the driver the user sees.
|
|
2097
|
+
*/
|
|
2098
|
+
private noticeAIServiceRefusal;
|
|
2099
|
+
/**
|
|
2100
|
+
* Writes the notices queued during a tool batch, once its results are in the history, or before
|
|
2101
|
+
* the failure when the batch threw. A code counts as shown only once written.
|
|
2102
|
+
*/
|
|
2103
|
+
private flushAIServiceNotices;
|
|
2104
|
+
/** Ends the turn on an AI service error: logged with the service's text, shown without it. */
|
|
2105
|
+
private endTurnWithAIServiceError;
|
|
2106
|
+
/**
|
|
2107
|
+
* Whether this user message already showed the sentence for `code`, so a turn-ending failure
|
|
2108
|
+
* does not show it twice. Marks it shown otherwise. Only the driver the user sees keeps count.
|
|
2109
|
+
*/
|
|
2110
|
+
private aiServiceSentenceShown;
|
|
2111
|
+
/**
|
|
2112
|
+
* Whether a sub-agent hit a wall this turn that stops this driver too. A handoff goes on past an
|
|
2113
|
+
* AI-service wall: the next agent may use another vendor, and if it uses this one its own call
|
|
2114
|
+
* meets the wall and says so.
|
|
2115
|
+
*/
|
|
2116
|
+
private subAgentWallThisTurn;
|
|
2117
|
+
/**
|
|
2118
|
+
* Ends the turn when a sub-agent hit a wall this turn that stops this driver too: the provider
|
|
2119
|
+
* refusing the account, the AI service (GENC-1611), or the budget. Checked before each model call,
|
|
2120
|
+
* and again right after a tool batch, before a handoff or the iteration cap can report the turn as
|
|
2121
|
+
* something else.
|
|
2122
|
+
*/
|
|
2123
|
+
private endTurnOnSubAgentWall;
|
|
1999
2124
|
/** The typed failure reason on a loop result, or `undefined` for a clean turn / handoff. */
|
|
2000
2125
|
private static failureReasonOf;
|
|
2001
2126
|
/**
|
|
@@ -2120,6 +2245,7 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
2120
2245
|
reason: SubAgentFailureReason;
|
|
2121
2246
|
budget?: BudgetDetail;
|
|
2122
2247
|
providerRefused?: ProviderRefusedDetail;
|
|
2248
|
+
aiServiceError?: AIServiceWall;
|
|
2123
2249
|
} | undefined;
|
|
2124
2250
|
/**
|
|
2125
2251
|
* Record a sub-agent failure reason (first one wins). No-op for top-level
|
|
@@ -2544,6 +2670,11 @@ export declare interface ChatDriverConfig {
|
|
|
2544
2670
|
* it is already safe for a white-labelled deployment.
|
|
2545
2671
|
*/
|
|
2546
2672
|
providerRefusedMessage?: string;
|
|
2673
|
+
/**
|
|
2674
|
+
* Replaces the transcript sentence for any of the AI service's error codes or access refusals
|
|
2675
|
+
* (GENC-1611) — see `DEFAULT_AI_SERVICE_ERROR_MESSAGES`. A code with no entry keeps the default.
|
|
2676
|
+
*/
|
|
2677
|
+
aiServiceErrorMessages?: Partial<Record<AIServiceRefusal, string>>;
|
|
2547
2678
|
}
|
|
2548
2679
|
|
|
2549
2680
|
export { ChatFallback }
|
|
@@ -3157,6 +3288,14 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
3157
3288
|
* `ChatConfig` lives in `foundation-ai`.
|
|
3158
3289
|
*/
|
|
3159
3290
|
persistence: SessionPersistenceConfig;
|
|
3291
|
+
/**
|
|
3292
|
+
* Replaces the transcript sentence shown when the app's AI service refuses a request with one of
|
|
3293
|
+
* `AI_SERVICE_ERROR_CODES`, or its router with one of `AI_SERVICE_ACCESS_REFUSALS` (GENC-1611), per
|
|
3294
|
+
* code; a code with no entry keeps
|
|
3295
|
+
* `DEFAULT_AI_SERVICE_ERROR_MESSAGES`. Read when the driver is created, so set it before the
|
|
3296
|
+
* element connects.
|
|
3297
|
+
*/
|
|
3298
|
+
aiServiceErrorMessages?: Partial<Record<AIServiceRefusal, string>>;
|
|
3160
3299
|
/**
|
|
3161
3300
|
* Resolved agent picker mode from `chatConfig.picker.mode`. Defaults to
|
|
3162
3301
|
* `'disabled'`.
|
|
@@ -3381,7 +3520,10 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
3381
3520
|
* / "New chat", not a pop-in/out. It stays set until the host writes
|
|
3382
3521
|
* `false` — because nothing the user can do inside the assistant refills a
|
|
3383
3522
|
* budget. Hosts typically set it from their own pre-flight budget check on
|
|
3384
|
-
* mount, and clear it once a later check shows headroom again.
|
|
3523
|
+
* mount, and clear it once a later check shows headroom again. Such a host
|
|
3524
|
+
* should use `setBlocked(true, reason, { cause: 'budget' })`: a plain
|
|
3525
|
+
* `blocked = true` is taken for a budget wall only while per-vendor budget
|
|
3526
|
+
* walls cover every vendor the assistant can reach (GENC-1611).
|
|
3385
3527
|
*
|
|
3386
3528
|
* The driver also latches it automatically when a turn ends with the
|
|
3387
3529
|
* `'budget-exhausted'` failure reason — off the `tool-loop-end` activity bus
|
|
@@ -3617,15 +3759,21 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
3617
3759
|
* Equivalent to the {@link FoundationAiAssistant.blocked} setter, plus the
|
|
3618
3760
|
* reason in one atomic write.
|
|
3619
3761
|
*
|
|
3620
|
-
* Blocking writes the **vendor-agnostic** block
|
|
3621
|
-
* pot means — and does not populate
|
|
3762
|
+
* Blocking writes the **vendor-agnostic** block and does not populate
|
|
3622
3763
|
* {@link FoundationAiAssistant.blockedVendors}. Unblocking clears the
|
|
3623
3764
|
* per-vendor walls as well, so a host asserting "the wall is gone" after its
|
|
3624
3765
|
* own pre-flight cannot be silently overruled by a driver latch it never saw.
|
|
3625
3766
|
*
|
|
3767
|
+
* `options.cause` says why (GENC-1611). Pass `'budget'` for a spend wall, so the composer reads
|
|
3768
|
+
* "AI usage limit reached"; any other block reads "Assistant unavailable". Omitted, a block keeps
|
|
3769
|
+
* the cause it already has, and a new one reads as a budget wall only while per-vendor budget walls
|
|
3770
|
+
* cover every vendor the assistant can reach.
|
|
3771
|
+
*
|
|
3626
3772
|
* @beta
|
|
3627
3773
|
*/
|
|
3628
|
-
setBlocked(blocked: boolean, reason?: string | null
|
|
3774
|
+
setBlocked(blocked: boolean, reason?: string | null, options?: {
|
|
3775
|
+
cause?: BlockedCause;
|
|
3776
|
+
}): void;
|
|
3629
3777
|
/**
|
|
3630
3778
|
* Copy shown in the blocked banner — the host's override, else copy composed
|
|
3631
3779
|
* from the walled vendors, else the default. See
|
|
@@ -4181,6 +4329,16 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
4181
4329
|
private startLoadingTimer;
|
|
4182
4330
|
private clearLoadingTimer;
|
|
4183
4331
|
private stopLoadingTimer;
|
|
4332
|
+
/**
|
|
4333
|
+
* The loading indicator for a turn that is running: shown, unless the turn is parked on the
|
|
4334
|
+
* user.
|
|
4335
|
+
*
|
|
4336
|
+
* @remarks
|
|
4337
|
+
* Only a *pending* interaction means the assistant is blocked waiting on the user. Once it's
|
|
4338
|
+
* resolved — or for any normal step — the assistant is computing again, so the indicator should
|
|
4339
|
+
* resume (e.g. while it works out the next planning question after the user answers a widget).
|
|
4340
|
+
*/
|
|
4341
|
+
private syncLoadingIndicator;
|
|
4184
4342
|
/** Called when the user clicks the popout button. */
|
|
4185
4343
|
handlePopout(): void;
|
|
4186
4344
|
/** Returns a cache key for this instance, or undefined if the component has no identity. */
|
|
@@ -4934,9 +5092,39 @@ export declare class FoundationAiPopoutManager extends GenesisElement {
|
|
|
4934
5092
|
*/
|
|
4935
5093
|
export declare const friendlyFallbackAgent: FallbackAgentConfig;
|
|
4936
5094
|
|
|
5095
|
+
/**
|
|
5096
|
+
* What the user sends with "Ask for changes".
|
|
5097
|
+
*
|
|
5098
|
+
* @beta
|
|
5099
|
+
*/
|
|
5100
|
+
export declare interface GenesisChangeRequest {
|
|
5101
|
+
/** What the user typed: the change they want made before they will approve. */
|
|
5102
|
+
changes: string;
|
|
5103
|
+
/**
|
|
5104
|
+
* The rows the user had ticked when they asked, by the review's own row indexes. Context for
|
|
5105
|
+
* the next proposal, and NOT an approval: nothing is written on a change request.
|
|
5106
|
+
*/
|
|
5107
|
+
rowsTicked?: number[];
|
|
5108
|
+
}
|
|
5109
|
+
|
|
4937
5110
|
/** Genesis G-mark — opt-in assistant avatar (the default before the sparkle mark). */
|
|
4938
5111
|
export declare const genesisIconSvg = "<svg viewBox=\"-4 0 30 26\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M18.7702 23.0437C18.7702 22.4675 18.8526 21.8089 19.0995 21.3149C19.3465 20.7386 19.6758 20.2447 20.0874 19.833C20.4991 19.4214 20.993 19.0921 21.5693 18.8451C22.1456 18.5982 22.7219 18.5158 23.2981 18.5158H25.9326V11.6828H19.1819V14.3172C19.1819 15.5521 18.6879 16.7047 17.8647 17.5279C17.0414 18.3512 15.8888 18.8451 14.7363 18.9275H6.7507V6.99025H16.4651V0.157227H3.54C2.63442 0.157227 1.72884 0.568855 1.07023 1.22746C0.411628 1.88606 0 2.79165 0 3.77955V22.2205C0 23.1261 0.411628 24.0316 1.07023 24.7726C1.72884 25.4312 2.63442 25.8428 3.54 25.8428H18.7702V23.0437Z\" fill=\"currentColor\"/></svg>";
|
|
4939
5112
|
|
|
5113
|
+
/**
|
|
5114
|
+
* What the write review resolves with: the chosen row indexes on an approval, a change request
|
|
5115
|
+
* when the user asks for changes, nothing at all on a denial.
|
|
5116
|
+
*
|
|
5117
|
+
* @beta
|
|
5118
|
+
*/
|
|
5119
|
+
export declare type GenesisReviewPayload = number[] | GenesisChangeRequest;
|
|
5120
|
+
|
|
5121
|
+
/**
|
|
5122
|
+
* The detail of the write review's `interaction-completed` event.
|
|
5123
|
+
*
|
|
5124
|
+
* @beta
|
|
5125
|
+
*/
|
|
5126
|
+
export declare type GenesisWriteReviewCompletedEventDetail = InteractionResult<GenesisReviewPayload>;
|
|
5127
|
+
|
|
4940
5128
|
/**
|
|
4941
5129
|
* Returns the active `FoundationAiPopoutManager` instance, or `undefined` if none is mounted.
|
|
4942
5130
|
* Import this in pages to call `registerDockProvider` / `deregisterDockProvider`.
|
|
@@ -5194,6 +5382,8 @@ export declare class OrchestratingDriver extends EventTarget implements AiDriver
|
|
|
5194
5382
|
activityBus?: ActivityBus;
|
|
5195
5383
|
/** Budget-wall transcript copy, passed through to the inner ChatDriver (GENC-1464). */
|
|
5196
5384
|
budgetExhaustedMessage?: string;
|
|
5385
|
+
/** AI service error copy, passed through to the inner ChatDriver (GENC-1611). */
|
|
5386
|
+
aiServiceErrorMessages?: Partial<Record<AIServiceRefusal, string>>;
|
|
5197
5387
|
});
|
|
5198
5388
|
resolveInteraction(interactionId: string, result: unknown): void;
|
|
5199
5389
|
/** Delegated for the same reason as `resolveInteraction`: the history that owns the
|