@genesislcap/foundation-ai 15.40.0-canary.1 → 15.41.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/README.md +21 -0
- package/dist/dts/index.d.ts +2 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/transports/ai-service-error.d.ts +146 -0
- package/dist/dts/transports/ai-service-error.d.ts.map +1 -0
- package/dist/dts/transports/post-with-retry.d.ts.map +1 -1
- package/dist/dts/types/chat.types.d.ts +72 -11
- package/dist/dts/types/chat.types.d.ts.map +1 -1
- package/dist/esm/index.js +4 -0
- package/dist/esm/transports/ai-service-error.js +183 -0
- package/dist/esm/transports/post-with-retry.js +43 -5
- package/dist/foundation-ai.api.json +756 -37
- package/dist/foundation-ai.d.ts +198 -11
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -205,6 +205,27 @@ webHandlers("ai-service") {
|
|
|
205
205
|
|
|
206
206
|
Configure `OPENAI_API_KEY` on the server (env var, system config, or secrets manager). Do not expose it to the client.
|
|
207
207
|
|
|
208
|
+
### Error codes a proxy can send
|
|
209
|
+
|
|
210
|
+
The Anthropic and Gemini transports read a `code` from a proxy's JSON error body, `{ "code": "…", "error": "…" }`,
|
|
211
|
+
and act on it whatever the status:
|
|
212
|
+
|
|
213
|
+
- `NO_API_KEY`, `BAD_API_KEY`, `KEY_UNREADABLE`, `MODEL_NOT_ALLOWED`, `BAD_REQUEST`, `FALLBACKS_NOT_SUPPORTED`
|
|
214
|
+
and `REQUEST_TOO_LARGE` are configuration errors. The request is not retried, and `AIServiceError` is thrown.
|
|
215
|
+
- `VENDOR_UNREACHABLE` is retried like its status would be, and `AIServiceError` is thrown if it still fails.
|
|
216
|
+
- Any other code is handled by its status, as before.
|
|
217
|
+
- A 401 or 403 carrying the Genesis router's NACK (`MESSAGE_TYPE: 'MSG_NACK'`, an `ERROR` list), or an empty
|
|
218
|
+
body, is the app's router refusing the request before the proxy runs, with no session or without the
|
|
219
|
+
right. It throws `AIServiceError` with `SIGNED_OUT` or `ACCESS_DENIED`, from `AI_SERVICE_ACCESS_REFUSALS`,
|
|
220
|
+
which are not codes a proxy sends. Any other code-less 401 or 403 is handled by its status.
|
|
221
|
+
- A 413 with no `code` and an empty or non-JSON body is a size cap in front of the proxy. It throws
|
|
222
|
+
`AIServiceError` with `REQUEST_TOO_LARGE`, and is not retried.
|
|
223
|
+
- `AIServiceError.message` holds the vendor, status and code only. The proxy's own `error` text is on
|
|
224
|
+
`detail`, and is logged to the console.
|
|
225
|
+
|
|
226
|
+
`AI_SERVICE_ERROR_CODES` lists them, and `DEFAULT_AI_SERVICE_ERROR_MESSAGES` has what the assistant tells the user
|
|
227
|
+
for each. The `error` text is for the console only. A proxy should use these constants rather than restate them.
|
|
228
|
+
|
|
208
229
|
---
|
|
209
230
|
|
|
210
231
|
## Manual provider selection
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export { GeminiTransport, MalformedFunctionCallError } from './transports/gemini
|
|
|
10
10
|
export { DEFAULT_PROVIDER_REFUSED_MESSAGE, PROVIDER_REFUSED_CODE, ProviderRefusedError, } from './transports/provider-refused';
|
|
11
11
|
export type { ProviderRefusalKind } from './transports/provider-refused';
|
|
12
12
|
export { ContextOverflowError, contextOverflowOf, DEFAULT_CONTEXT_OVERFLOW_MESSAGE, } from './transports/context-overflow-error';
|
|
13
|
+
export { AI_SERVICE_ACCESS_REFUSALS, AI_SERVICE_ERROR_CODES, AIServiceError, aiServiceAccessRefusalOf, aiServiceErrorCodeOf, DEFAULT_AI_SERVICE_ERROR_MESSAGES, isTerminalAIServiceRefusal, } from './transports/ai-service-error';
|
|
14
|
+
export type { AIServiceAccessRefusal, AIServiceErrorCode, AIServiceRefusal, } from './transports/ai-service-error';
|
|
13
15
|
export { AI_TIER_IDS, AI_TIER_VENDORS, DEFAULT_AI_TIERS, resolveAITiers } from './tiers/ai-tiers';
|
|
14
16
|
export type { AITierId, AITierOverrides, AITiers, AITierVendor, AnthropicTierConfig, GeminiTierConfig, } from './tiers/ai-tiers';
|
|
15
17
|
export { buildTierProviders } from './tiers/build-tier-providers';
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,8BAA8B,EAC9B,yBAAyB,EACzB,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,UAAU,EACV,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,eAAe,CAAC;AAKvB,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC9F,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,gCAAgC,EAChC,gBAAgB,EAChB,aAAa,EACb,iBAAiB,GAClB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAK5F,OAAO,EACL,gCAAgC,EAChC,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,gCAAgC,GACjC,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,8BAA8B,EAC9B,yBAAyB,EACzB,e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AuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,YAAY,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC1E,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The AI SERVICE wall (GENC-1611) — the app's own chat endpoint refusing a request for a reason it
|
|
3
|
+
* names in the body's `code`, as distinct from the vendor refusing the account (`provider-refused`)
|
|
4
|
+
* or our spend budget (`budget-exhausted-error`).
|
|
5
|
+
*
|
|
6
|
+
* The codes are a contract with the servers that send them: a generated app's proxy
|
|
7
|
+
* (`/gwf/ai-service/<vendor>/chat`, from blank-app-seed) and Genesis Create's preview route. Keyed on
|
|
8
|
+
* the body's `code` rather than the status, because the status does not say what went wrong: the
|
|
9
|
+
* same missing key arrives as a `424` from the app's proxy and as a `503` from Create's, and `503`
|
|
10
|
+
* is on every retryable list.
|
|
11
|
+
*
|
|
12
|
+
* Lives beside its siblings for the same structural reason they do: it is raised from
|
|
13
|
+
* `post-with-retry.ts`, which both transports import.
|
|
14
|
+
*
|
|
15
|
+
* @packageDocumentation
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Every code an AI service may put in an error body. A code not listed here keeps the old,
|
|
19
|
+
* status-based handling: an unknown code must not become a silent dead end, or a retry loop.
|
|
20
|
+
*
|
|
21
|
+
* @beta
|
|
22
|
+
*/
|
|
23
|
+
export declare const AI_SERVICE_ERROR_CODES: Readonly<{
|
|
24
|
+
/** No API key is configured for the vendor. */
|
|
25
|
+
readonly NO_API_KEY: "NO_API_KEY";
|
|
26
|
+
/** The configured key has characters an API key cannot have. */
|
|
27
|
+
readonly BAD_API_KEY: "BAD_API_KEY";
|
|
28
|
+
/** An encrypted key could not be decrypted. */
|
|
29
|
+
readonly KEY_UNREADABLE: "KEY_UNREADABLE";
|
|
30
|
+
/** The request asked for a model the service does not allow. */
|
|
31
|
+
readonly MODEL_NOT_ALLOWED: "MODEL_NOT_ALLOWED";
|
|
32
|
+
/** The service refused the shape of the request. */
|
|
33
|
+
readonly BAD_REQUEST: "BAD_REQUEST";
|
|
34
|
+
/** The request named fallback models, which the service does not accept. */
|
|
35
|
+
readonly FALLBACKS_NOT_SUPPORTED: "FALLBACKS_NOT_SUPPORTED";
|
|
36
|
+
/** The request body is larger, or nested deeper, than the service accepts. */
|
|
37
|
+
readonly REQUEST_TOO_LARGE: "REQUEST_TOO_LARGE";
|
|
38
|
+
/** The service could not reach the vendor. The only code that is worth retrying. */
|
|
39
|
+
readonly VENDOR_UNREACHABLE: "VENDOR_UNREACHABLE";
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* One of {@link AI_SERVICE_ERROR_CODES}.
|
|
43
|
+
*
|
|
44
|
+
* @beta
|
|
45
|
+
*/
|
|
46
|
+
export type AIServiceErrorCode = (typeof AI_SERVICE_ERROR_CODES)[keyof typeof AI_SERVICE_ERROR_CODES];
|
|
47
|
+
/**
|
|
48
|
+
* The code, when it is one of {@link AI_SERVICE_ERROR_CODES}; otherwise `undefined`.
|
|
49
|
+
*
|
|
50
|
+
* @beta
|
|
51
|
+
*/
|
|
52
|
+
export declare function aiServiceErrorCodeOf(code: unknown): AIServiceErrorCode | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Refusals that come from the app's gateway, not from its AI service. The Genesis router turns a
|
|
55
|
+
* request away before the service runs: with no session (401) or without the right the endpoint
|
|
56
|
+
* demands (403). Its body is the router's own NACK, with no `code` a proxy would send, so these are
|
|
57
|
+
* kept out of {@link AI_SERVICE_ERROR_CODES}.
|
|
58
|
+
*
|
|
59
|
+
* @beta
|
|
60
|
+
*/
|
|
61
|
+
export declare const AI_SERVICE_ACCESS_REFUSALS: Readonly<{
|
|
62
|
+
/** 401: the request had no session. */
|
|
63
|
+
readonly SIGNED_OUT: "SIGNED_OUT";
|
|
64
|
+
/** 403: the user lacks the right the endpoint demands. */
|
|
65
|
+
readonly ACCESS_DENIED: "ACCESS_DENIED";
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* One of {@link AI_SERVICE_ACCESS_REFUSALS}.
|
|
69
|
+
*
|
|
70
|
+
* @beta
|
|
71
|
+
*/
|
|
72
|
+
export type AIServiceAccessRefusal = (typeof AI_SERVICE_ACCESS_REFUSALS)[keyof typeof AI_SERVICE_ACCESS_REFUSALS];
|
|
73
|
+
/**
|
|
74
|
+
* Everything the chat can tell the user about a refused request: a code the service sent, or an
|
|
75
|
+
* access refusal from in front of it.
|
|
76
|
+
*
|
|
77
|
+
* @beta
|
|
78
|
+
*/
|
|
79
|
+
export type AIServiceRefusal = AIServiceErrorCode | AIServiceAccessRefusal;
|
|
80
|
+
/**
|
|
81
|
+
* The access refusal behind a 401 or 403 from the app's router, which carries no `code`.
|
|
82
|
+
*
|
|
83
|
+
* Recognised by a positive signal only, like the rest of this module's family: the router's NACK,
|
|
84
|
+
* or an empty body. A vendor's own 401/403, a coded one, and anything else (an HTML page from a
|
|
85
|
+
* proxy in between, say) keep their own handling.
|
|
86
|
+
*
|
|
87
|
+
* @param bodyText - the raw response body, so an empty one can be told from one that isn't JSON.
|
|
88
|
+
* Left out, the body is unknown rather than empty, and only the router's NACK counts.
|
|
89
|
+
* @beta
|
|
90
|
+
*/
|
|
91
|
+
export declare function aiServiceAccessRefusalOf(status: number, payload: unknown, bodyText?: string): AIServiceAccessRefusal | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Whether a 413 is a size cap in front of the chat endpoint: no `code`, and a body that is empty or
|
|
94
|
+
* not JSON. The router's body cap (and a proxy such as nginx) refuses before the endpoint can answer
|
|
95
|
+
* with its own coded one. A 413 is never worth sending again, so it reads as `REQUEST_TOO_LARGE`.
|
|
96
|
+
*
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
export declare function isUncodedTooLarge(status: number, payload: unknown): boolean;
|
|
100
|
+
/** The router's own text off its NACK (`ERROR[0].TEXT`), for the console. */
|
|
101
|
+
export declare function routerRefusalDetailOf(payload: unknown): string | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* What the user sees for each code and access refusal. Written for the app's user, with a hint for
|
|
104
|
+
* whoever runs it, and never quoting the server: its text goes to the console only. A host can
|
|
105
|
+
* replace any of them (`aiServiceErrorMessages` on the assistant).
|
|
106
|
+
*
|
|
107
|
+
* @beta
|
|
108
|
+
*/
|
|
109
|
+
export declare const DEFAULT_AI_SERVICE_ERROR_MESSAGES: Readonly<Record<AIServiceRefusal, string>>;
|
|
110
|
+
/**
|
|
111
|
+
* Whether sending the same request again gets the same refusal. Every code but `VENDOR_UNREACHABLE`
|
|
112
|
+
* does, until someone changes the configuration or the user's session or rights.
|
|
113
|
+
*
|
|
114
|
+
* @beta
|
|
115
|
+
*/
|
|
116
|
+
export declare const isTerminalAIServiceRefusal: (code: AIServiceRefusal) => boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Thrown when the AI service answers with one of {@link AI_SERVICE_ERROR_CODES}, or the app's router
|
|
119
|
+
* refuses the request with one of {@link AI_SERVICE_ACCESS_REFUSALS}.
|
|
120
|
+
*
|
|
121
|
+
* All but `VENDOR_UNREACHABLE` are terminal: sending the same request again gets the same answer
|
|
122
|
+
* until someone changes the configuration, or the user's session or rights.
|
|
123
|
+
*
|
|
124
|
+
* @beta
|
|
125
|
+
*/
|
|
126
|
+
export declare class AIServiceError extends Error {
|
|
127
|
+
/** Vendor label of the transport that was refused (e.g. `'Gemini'`). */
|
|
128
|
+
readonly vendorLabel: string;
|
|
129
|
+
readonly code: AIServiceRefusal;
|
|
130
|
+
/** HTTP status, or the err frame's status on the framed path. */
|
|
131
|
+
readonly status: number;
|
|
132
|
+
/** The service's own message, for the console. Never shown to the user. */
|
|
133
|
+
readonly detail?: string;
|
|
134
|
+
constructor(
|
|
135
|
+
/** Vendor label of the transport that was refused (e.g. `'Gemini'`). */
|
|
136
|
+
vendorLabel: string, code: AIServiceRefusal,
|
|
137
|
+
/** HTTP status, or the err frame's status on the framed path. */
|
|
138
|
+
status: number,
|
|
139
|
+
/** The service's own message, for the console. Never shown to the user. */
|
|
140
|
+
detail?: string);
|
|
141
|
+
/** Whether sending the request again cannot help. */
|
|
142
|
+
get terminal(): boolean;
|
|
143
|
+
}
|
|
144
|
+
/** The service's own message off an error body or err frame, where both servers put it: `error`. */
|
|
145
|
+
export declare function aiServiceDetailOf(payload: unknown): string | undefined;
|
|
146
|
+
//# sourceMappingURL=ai-service-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-service-error.d.ts","sourceRoot":"","sources":["../../../src/transports/ai-service-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;IACjC,+CAA+C;;IAE/C,gEAAgE;;IAEhE,+CAA+C;;IAE/C,gEAAgE;;IAEhE,oDAAoD;;IAEpD,4EAA4E;;IAE5E,8EAA8E;;IAE9E,oFAAoF;;EAE3E,CAAC;AAEZ;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAC5B,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAIvE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAA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;IACvB,2EAA2E;IAClE,MAAM,CAAC,EAAE,MAAM;IAQ1B,qDAAqD;IACrD,IAAI,QAAQ,IAAI,OAAO,CAEtB;CACF;AAED,oGAAoG;AACpG,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAGtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-with-retry.d.ts","sourceRoot":"","sources":["../../../src/transports/post-with-retry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"post-with-retry.d.ts","sourceRoot":"","sources":["../../../src/transports/post-with-retry.ts"],"names":[],"mappings":"AAgCA;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,kBAAkB,CAAC;IAChC,uFAAuF;IACvF,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,4FAA4F;IAC5F,OAAO,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,YAAY,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,aAAa,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAID;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAsVnF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AIServiceRefusal } from '../transports/ai-service-error';
|
|
1
2
|
import type { AIProviderType } from './config.types';
|
|
2
3
|
/**
|
|
3
4
|
* Role of a message in a chat conversation.
|
|
@@ -674,6 +675,13 @@ export interface InteractionRequestOptions {
|
|
|
674
675
|
* means no timeout — the interaction waits indefinitely.
|
|
675
676
|
*/
|
|
676
677
|
timeoutMs?: number;
|
|
678
|
+
/**
|
|
679
|
+
* Closes the interaction when it aborts, exactly as an unanswered one closes at `timeoutMs`: the
|
|
680
|
+
* widget goes read-only and `requestInteraction` resolves with `status: 'timeout'`. A tool
|
|
681
|
+
* handler passes its `turnSignal`, so a user's Stop closes a widget left open instead of leaving
|
|
682
|
+
* the turn parked on it, and nothing the user clicks afterwards is taken as an answer.
|
|
683
|
+
*/
|
|
684
|
+
signal?: AbortSignal;
|
|
677
685
|
/**
|
|
678
686
|
* How the host frames this widget in the transcript — see
|
|
679
687
|
* {@link InteractionPresentation}. Defaults to `'label'` (the historical
|
|
@@ -711,9 +719,10 @@ export interface InteractionRequestOptions {
|
|
|
711
719
|
* So a handler that receives it will not be called a second time this turn, and
|
|
712
720
|
* the parent turn reports `'budget-exhausted'` in its own right.
|
|
713
721
|
*
|
|
714
|
-
* Recovery guidance differs sharply by reason — see `docs/sub_agent.md`.
|
|
715
|
-
* `budget_exhausted`
|
|
716
|
-
*
|
|
722
|
+
* Recovery guidance differs sharply by reason — see `docs/sub_agent.md`.
|
|
723
|
+
* `budget_exhausted`, `refusal`, `provider_refused`, `context_exhausted` and a
|
|
724
|
+
* `terminal` `ai_service_error` are terminal: retrying any of them with the same
|
|
725
|
+
* request just reproduces it. The rest are worth a retry or a question to the user.
|
|
717
726
|
*
|
|
718
727
|
* @beta
|
|
719
728
|
*/
|
|
@@ -726,13 +735,29 @@ export type SubAgentFailureReason = 'max_iterations' | 'malformed_tool_call' | '
|
|
|
726
735
|
*/
|
|
727
736
|
| 'provider_refused'
|
|
728
737
|
/**
|
|
729
|
-
* The sub-agent was stopped because continuing would have overrun the context
|
|
730
|
-
*
|
|
731
|
-
*
|
|
732
|
-
*
|
|
733
|
-
* wall.
|
|
738
|
+
* The sub-agent was stopped because continuing would have overrun the context window
|
|
739
|
+
* (GENC-1567). Re-invoking it with the same conversation stops it the same way. The parent's turn
|
|
740
|
+
* goes on, but it shares the conversation whose size caused this, so its own next model call is
|
|
741
|
+
* likely to stop on the same guard.
|
|
734
742
|
*/
|
|
735
|
-
| 'context_exhausted'
|
|
743
|
+
| 'context_exhausted'
|
|
744
|
+
/**
|
|
745
|
+
* The app's AI service refused the sub-agent's request (GENC-1611). The outcome carries the
|
|
746
|
+
* refusal's `code` and whether it is `terminal`: re-invoking the sub-agent with the same request
|
|
747
|
+
* gets the same refusal, so recover without calling it again. Only a `VENDOR_UNREACHABLE` refusal
|
|
748
|
+
* is not terminal. Even so, a refusal from your own vendor that is about the service (for example
|
|
749
|
+
* `VENDOR_UNREACHABLE`) still ends this turn; retry on the user's next message, not in the
|
|
750
|
+
* handler.
|
|
751
|
+
*
|
|
752
|
+
* **Terminal for the PARENT turn too only when** the refusal is about the service rather than the
|
|
753
|
+
* child's own request (a missing or unusable key, no session or no right, the vendor unreachable)
|
|
754
|
+
* and the child called the parent's own vendor, unless a completion or a handoff from the same
|
|
755
|
+
* batch goes on past it. Otherwise the parent is told and its turn goes on. The user is shown a
|
|
756
|
+
* key, access, model (`MODEL_NOT_ALLOWED`) or reachability refusal's sentence once per user
|
|
757
|
+
* message; `REQUEST_TOO_LARGE`, `BAD_REQUEST` and `FALLBACKS_NOT_SUPPORTED` are left to the parent
|
|
758
|
+
* and the console.
|
|
759
|
+
*/
|
|
760
|
+
| 'ai_service_error';
|
|
736
761
|
/**
|
|
737
762
|
* When a tool call's declared payload(s) become stale and should be condensed
|
|
738
763
|
* out of the to-model history. The kinds form a spectrum of widening staleness
|
|
@@ -870,6 +895,8 @@ export type ChatToolHandlers<TSubAgent extends {
|
|
|
870
895
|
* - `{ ok: false, reason }` — the run ended without completing (see
|
|
871
896
|
* {@link SubAgentFailureReason}). The parent handler decides how to
|
|
872
897
|
* recover — typically by returning the issue info to its own agent.
|
|
898
|
+
* With `reason: 'ai_service_error'` it also carries the refusal's `code`
|
|
899
|
+
* and whether it is `terminal`.
|
|
873
900
|
*
|
|
874
901
|
* Sub-agents run with tool use forced, so they can no longer end on a
|
|
875
902
|
* free-text turn; the previous string fallback has been removed.
|
|
@@ -878,10 +905,22 @@ export type ChatToolHandlers<TSubAgent extends {
|
|
|
878
905
|
ok: true;
|
|
879
906
|
result: T;
|
|
880
907
|
reason?: never;
|
|
908
|
+
code?: never;
|
|
909
|
+
terminal?: never;
|
|
910
|
+
} | {
|
|
911
|
+
ok: false;
|
|
912
|
+
result?: never;
|
|
913
|
+
reason: Exclude<SubAgentFailureReason, 'ai_service_error'>;
|
|
914
|
+
code?: never;
|
|
915
|
+
terminal?: never;
|
|
881
916
|
} | {
|
|
882
917
|
ok: false;
|
|
883
918
|
result?: never;
|
|
884
|
-
reason:
|
|
919
|
+
reason: 'ai_service_error';
|
|
920
|
+
/** The refusal's code. */
|
|
921
|
+
code: AIServiceRefusal;
|
|
922
|
+
/** Whether re-invoking it with the same request gets the same refusal. */
|
|
923
|
+
terminal: boolean;
|
|
885
924
|
}>;
|
|
886
925
|
/**
|
|
887
926
|
* Signal explicit completion from within a sub-agent tool handler.
|
|
@@ -928,6 +967,22 @@ export type ChatToolHandlers<TSubAgent extends {
|
|
|
928
967
|
* restores the content); non-idempotent tools must use `replaceWith`.
|
|
929
968
|
*/
|
|
930
969
|
condenseWhen: (policy: CondensePolicy) => void;
|
|
970
|
+
/**
|
|
971
|
+
* The current TURN's abort signal: one object for every tool call made while answering
|
|
972
|
+
* one user message, a new one for the next, and aborted when the user stops the turn or
|
|
973
|
+
* the view is disposed. One message includes an orchestrated handoff's continuation and a
|
|
974
|
+
* sub-agent the message delegates to: both see the same object, and a stop reaches both.
|
|
975
|
+
* A continuation after the user stopped the message is not part of it, and gets a new one.
|
|
976
|
+
*
|
|
977
|
+
* Two uses. A long-running handler can listen for it to stop early. And a handler that
|
|
978
|
+
* must remember something for the rest of the turn — a write the user denied, say — can
|
|
979
|
+
* key that state on this object (a `WeakMap`), which cannot collide the way a turn number
|
|
980
|
+
* would when several chat views share one set of handlers.
|
|
981
|
+
*
|
|
982
|
+
* Optional: a host that builds its own context may not supply it, and a handler relying on
|
|
983
|
+
* it must decide what its absence means.
|
|
984
|
+
*/
|
|
985
|
+
turnSignal?: AbortSignal;
|
|
931
986
|
}) => Promise<unknown>>;
|
|
932
987
|
/**
|
|
933
988
|
* Controls whether (and how) the model may call a tool on a given turn. Maps to
|
|
@@ -1215,7 +1270,13 @@ export type TurnFailureReason = 'exception' | 'malformed-function-call' | 'empty
|
|
|
1215
1270
|
* the edge rather than issuing a request the provider would reject, so the
|
|
1216
1271
|
* transcript stays intact and compaction is still possible.
|
|
1217
1272
|
*/
|
|
1218
|
-
| 'context-exhausted'
|
|
1273
|
+
| 'context-exhausted'
|
|
1274
|
+
/**
|
|
1275
|
+
* The app's AI service refused the request with one of `AI_SERVICE_ERROR_CODES` (GENC-1611): a
|
|
1276
|
+
* configuration error such as a missing API key, or the vendor still unreachable after the
|
|
1277
|
+
* retries. The transcript says what is wrong in words for the user.
|
|
1278
|
+
*/
|
|
1279
|
+
| 'ai-service-error';
|
|
1219
1280
|
/**
|
|
1220
1281
|
* The result returned by a driver after processing a user turn.
|
|
1221
1282
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.types.d.ts","sourceRoot":"","sources":["../../../src/types/chat.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,WAAW,GACX,QAAQ,GACR,MAAM,GACN,cAAc,GACd,gBAAgB,GAChB,mBAAmB,CAAC;AAExB;;;;GAIG;AACH,KAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MA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AC7D,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,iFAAiF;IACjF,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,gEAAgE;IAChE,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;OAOG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAC7B;IACE,gCAAgC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,+CAA+C;IAC/C,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB,GACD;IACE;;;OAGG;IACH,QAAQ,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -15,6 +15,10 @@ export { GeminiTransport, MalformedFunctionCallError } from './transports/gemini
|
|
|
15
15
|
// first reword.
|
|
16
16
|
export { DEFAULT_PROVIDER_REFUSED_MESSAGE, PROVIDER_REFUSED_CODE, ProviderRefusedError, } from './transports/provider-refused';
|
|
17
17
|
export { ContextOverflowError, contextOverflowOf, DEFAULT_CONTEXT_OVERFLOW_MESSAGE, } from './transports/context-overflow-error';
|
|
18
|
+
// The AI SERVICE wall (GENC-1611) — the codes an app's chat endpoint names its refusals with. The
|
|
19
|
+
// constants are the contract with the servers that send them (a generated app's proxy, Create's
|
|
20
|
+
// preview route), so they are exported rather than restated there.
|
|
21
|
+
export { AI_SERVICE_ACCESS_REFUSALS, AI_SERVICE_ERROR_CODES, AIServiceError, aiServiceAccessRefusalOf, aiServiceErrorCodeOf, DEFAULT_AI_SERVICE_ERROR_MESSAGES, isTerminalAIServiceRefusal, } from './transports/ai-service-error';
|
|
18
22
|
// The platform tier table (GENC-1610) — what a `low` / `high` / `reasoning` slot resolves to
|
|
19
23
|
// per vendor, including the Anthropic output ceiling and both timeout clocks. Named exports,
|
|
20
24
|
// and the data half is deliberately free of DOM and DI imports so it also rides the
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The AI SERVICE wall (GENC-1611) — the app's own chat endpoint refusing a request for a reason it
|
|
3
|
+
* names in the body's `code`, as distinct from the vendor refusing the account (`provider-refused`)
|
|
4
|
+
* or our spend budget (`budget-exhausted-error`).
|
|
5
|
+
*
|
|
6
|
+
* The codes are a contract with the servers that send them: a generated app's proxy
|
|
7
|
+
* (`/gwf/ai-service/<vendor>/chat`, from blank-app-seed) and Genesis Create's preview route. Keyed on
|
|
8
|
+
* the body's `code` rather than the status, because the status does not say what went wrong: the
|
|
9
|
+
* same missing key arrives as a `424` from the app's proxy and as a `503` from Create's, and `503`
|
|
10
|
+
* is on every retryable list.
|
|
11
|
+
*
|
|
12
|
+
* Lives beside its siblings for the same structural reason they do: it is raised from
|
|
13
|
+
* `post-with-retry.ts`, which both transports import.
|
|
14
|
+
*
|
|
15
|
+
* @packageDocumentation
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Every code an AI service may put in an error body. A code not listed here keeps the old,
|
|
19
|
+
* status-based handling: an unknown code must not become a silent dead end, or a retry loop.
|
|
20
|
+
*
|
|
21
|
+
* @beta
|
|
22
|
+
*/
|
|
23
|
+
export const AI_SERVICE_ERROR_CODES = Object.freeze({
|
|
24
|
+
/** No API key is configured for the vendor. */
|
|
25
|
+
NO_API_KEY: 'NO_API_KEY',
|
|
26
|
+
/** The configured key has characters an API key cannot have. */
|
|
27
|
+
BAD_API_KEY: 'BAD_API_KEY',
|
|
28
|
+
/** An encrypted key could not be decrypted. */
|
|
29
|
+
KEY_UNREADABLE: 'KEY_UNREADABLE',
|
|
30
|
+
/** The request asked for a model the service does not allow. */
|
|
31
|
+
MODEL_NOT_ALLOWED: 'MODEL_NOT_ALLOWED',
|
|
32
|
+
/** The service refused the shape of the request. */
|
|
33
|
+
BAD_REQUEST: 'BAD_REQUEST',
|
|
34
|
+
/** The request named fallback models, which the service does not accept. */
|
|
35
|
+
FALLBACKS_NOT_SUPPORTED: 'FALLBACKS_NOT_SUPPORTED',
|
|
36
|
+
/** The request body is larger, or nested deeper, than the service accepts. */
|
|
37
|
+
REQUEST_TOO_LARGE: 'REQUEST_TOO_LARGE',
|
|
38
|
+
/** The service could not reach the vendor. The only code that is worth retrying. */
|
|
39
|
+
VENDOR_UNREACHABLE: 'VENDOR_UNREACHABLE',
|
|
40
|
+
});
|
|
41
|
+
const KNOWN_CODES = new Set(Object.values(AI_SERVICE_ERROR_CODES));
|
|
42
|
+
/**
|
|
43
|
+
* The code, when it is one of {@link AI_SERVICE_ERROR_CODES}; otherwise `undefined`.
|
|
44
|
+
*
|
|
45
|
+
* @beta
|
|
46
|
+
*/
|
|
47
|
+
export function aiServiceErrorCodeOf(code) {
|
|
48
|
+
return typeof code === 'string' && KNOWN_CODES.has(code)
|
|
49
|
+
? code
|
|
50
|
+
: undefined;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Refusals that come from the app's gateway, not from its AI service. The Genesis router turns a
|
|
54
|
+
* request away before the service runs: with no session (401) or without the right the endpoint
|
|
55
|
+
* demands (403). Its body is the router's own NACK, with no `code` a proxy would send, so these are
|
|
56
|
+
* kept out of {@link AI_SERVICE_ERROR_CODES}.
|
|
57
|
+
*
|
|
58
|
+
* @beta
|
|
59
|
+
*/
|
|
60
|
+
export const AI_SERVICE_ACCESS_REFUSALS = Object.freeze({
|
|
61
|
+
/** 401: the request had no session. */
|
|
62
|
+
SIGNED_OUT: 'SIGNED_OUT',
|
|
63
|
+
/** 403: the user lacks the right the endpoint demands. */
|
|
64
|
+
ACCESS_DENIED: 'ACCESS_DENIED',
|
|
65
|
+
});
|
|
66
|
+
/** The router's statuses for no session, a missing right, and a body over its cap. */
|
|
67
|
+
const UNAUTHORIZED_STATUS = 401;
|
|
68
|
+
const FORBIDDEN_STATUS = 403;
|
|
69
|
+
const PAYLOAD_TOO_LARGE_STATUS = 413;
|
|
70
|
+
/** The Genesis router's own refusal: `{ MESSAGE_TYPE: 'MSG_NACK', ERROR: [...] }`. */
|
|
71
|
+
const isRouterNack = (payload) => {
|
|
72
|
+
if (!payload || typeof payload !== 'object')
|
|
73
|
+
return false;
|
|
74
|
+
const { MESSAGE_TYPE, ERROR } = payload;
|
|
75
|
+
return MESSAGE_TYPE === 'MSG_NACK' || Array.isArray(ERROR);
|
|
76
|
+
};
|
|
77
|
+
const hasCode = (payload) => (payload === null || payload === void 0 ? void 0 : payload.code) !== undefined;
|
|
78
|
+
/**
|
|
79
|
+
* The access refusal behind a 401 or 403 from the app's router, which carries no `code`.
|
|
80
|
+
*
|
|
81
|
+
* Recognised by a positive signal only, like the rest of this module's family: the router's NACK,
|
|
82
|
+
* or an empty body. A vendor's own 401/403, a coded one, and anything else (an HTML page from a
|
|
83
|
+
* proxy in between, say) keep their own handling.
|
|
84
|
+
*
|
|
85
|
+
* @param bodyText - the raw response body, so an empty one can be told from one that isn't JSON.
|
|
86
|
+
* Left out, the body is unknown rather than empty, and only the router's NACK counts.
|
|
87
|
+
* @beta
|
|
88
|
+
*/
|
|
89
|
+
export function aiServiceAccessRefusalOf(status, payload, bodyText) {
|
|
90
|
+
if (status !== UNAUTHORIZED_STATUS && status !== FORBIDDEN_STATUS)
|
|
91
|
+
return undefined;
|
|
92
|
+
if (hasCode(payload))
|
|
93
|
+
return undefined;
|
|
94
|
+
const emptyBody = typeof bodyText === 'string' && bodyText.trim() === '';
|
|
95
|
+
if (!isRouterNack(payload) && !emptyBody)
|
|
96
|
+
return undefined;
|
|
97
|
+
return status === UNAUTHORIZED_STATUS
|
|
98
|
+
? AI_SERVICE_ACCESS_REFUSALS.SIGNED_OUT
|
|
99
|
+
: AI_SERVICE_ACCESS_REFUSALS.ACCESS_DENIED;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Whether a 413 is a size cap in front of the chat endpoint: no `code`, and a body that is empty or
|
|
103
|
+
* not JSON. The router's body cap (and a proxy such as nginx) refuses before the endpoint can answer
|
|
104
|
+
* with its own coded one. A 413 is never worth sending again, so it reads as `REQUEST_TOO_LARGE`.
|
|
105
|
+
*
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
export function isUncodedTooLarge(status, payload) {
|
|
109
|
+
return status === PAYLOAD_TOO_LARGE_STATUS && payload === undefined;
|
|
110
|
+
}
|
|
111
|
+
/** The router's own text off its NACK (`ERROR[0].TEXT`), for the console. */
|
|
112
|
+
export function routerRefusalDetailOf(payload) {
|
|
113
|
+
var _a;
|
|
114
|
+
const errors = payload === null || payload === void 0 ? void 0 : payload.ERROR;
|
|
115
|
+
const text = Array.isArray(errors)
|
|
116
|
+
? (_a = errors[0]) === null || _a === void 0 ? void 0 : _a.TEXT
|
|
117
|
+
: undefined;
|
|
118
|
+
return typeof text === 'string' && text ? text : undefined;
|
|
119
|
+
}
|
|
120
|
+
const REFUSED_REQUEST = "The AI service refused the assistant's request. An administrator can find the details in the browser console.";
|
|
121
|
+
/**
|
|
122
|
+
* What the user sees for each code and access refusal. Written for the app's user, with a hint for
|
|
123
|
+
* whoever runs it, and never quoting the server: its text goes to the console only. A host can
|
|
124
|
+
* replace any of them (`aiServiceErrorMessages` on the assistant).
|
|
125
|
+
*
|
|
126
|
+
* @beta
|
|
127
|
+
*/
|
|
128
|
+
export const DEFAULT_AI_SERVICE_ERROR_MESSAGES = Object.freeze({
|
|
129
|
+
NO_API_KEY: "The assistant isn't set up yet. An administrator needs to add an API key for its AI service.",
|
|
130
|
+
BAD_API_KEY: "The assistant can't use its AI service key. An administrator needs to check the key.",
|
|
131
|
+
KEY_UNREADABLE: "The assistant can't read its AI service key. An administrator needs to check how the key is stored.",
|
|
132
|
+
MODEL_NOT_ALLOWED: "The assistant asked for an AI model this app doesn't allow. An administrator needs to check the app's allowed models.",
|
|
133
|
+
BAD_REQUEST: REFUSED_REQUEST,
|
|
134
|
+
// The assistant never sends fallbacks, so only a mismatched client can meet this one.
|
|
135
|
+
FALLBACKS_NOT_SUPPORTED: REFUSED_REQUEST,
|
|
136
|
+
REQUEST_TOO_LARGE: 'This request is too large to send. Start a new conversation or send a shorter message, and if you attached a file, try a smaller one.',
|
|
137
|
+
VENDOR_UNREACHABLE: "The AI service can't be reached right now. Please try again in a few minutes. If it keeps happening, tell an administrator.",
|
|
138
|
+
SIGNED_OUT: 'Your session has ended. Sign in again to use the assistant.',
|
|
139
|
+
ACCESS_DENIED: "You don't have access to the assistant. An administrator can give you access.",
|
|
140
|
+
});
|
|
141
|
+
/**
|
|
142
|
+
* Whether sending the same request again gets the same refusal. Every code but `VENDOR_UNREACHABLE`
|
|
143
|
+
* does, until someone changes the configuration or the user's session or rights.
|
|
144
|
+
*
|
|
145
|
+
* @beta
|
|
146
|
+
*/
|
|
147
|
+
export const isTerminalAIServiceRefusal = (code) => code !== AI_SERVICE_ERROR_CODES.VENDOR_UNREACHABLE;
|
|
148
|
+
/**
|
|
149
|
+
* Thrown when the AI service answers with one of {@link AI_SERVICE_ERROR_CODES}, or the app's router
|
|
150
|
+
* refuses the request with one of {@link AI_SERVICE_ACCESS_REFUSALS}.
|
|
151
|
+
*
|
|
152
|
+
* All but `VENDOR_UNREACHABLE` are terminal: sending the same request again gets the same answer
|
|
153
|
+
* until someone changes the configuration, or the user's session or rights.
|
|
154
|
+
*
|
|
155
|
+
* @beta
|
|
156
|
+
*/
|
|
157
|
+
export class AIServiceError extends Error {
|
|
158
|
+
constructor(
|
|
159
|
+
/** Vendor label of the transport that was refused (e.g. `'Gemini'`). */
|
|
160
|
+
vendorLabel, code,
|
|
161
|
+
/** HTTP status, or the err frame's status on the framed path. */
|
|
162
|
+
status,
|
|
163
|
+
/** The service's own message, for the console. Never shown to the user. */
|
|
164
|
+
detail) {
|
|
165
|
+
// Vendor, status and code only: `message` reaches logs and states that keep it (suggestions,
|
|
166
|
+
// routing), and the service's own text belongs to the console.
|
|
167
|
+
super(`${vendorLabel} AI service refused the request (${status} ${code})`);
|
|
168
|
+
this.vendorLabel = vendorLabel;
|
|
169
|
+
this.code = code;
|
|
170
|
+
this.status = status;
|
|
171
|
+
this.detail = detail;
|
|
172
|
+
this.name = 'AIServiceError';
|
|
173
|
+
}
|
|
174
|
+
/** Whether sending the request again cannot help. */
|
|
175
|
+
get terminal() {
|
|
176
|
+
return isTerminalAIServiceRefusal(this.code);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
/** The service's own message off an error body or err frame, where both servers put it: `error`. */
|
|
180
|
+
export function aiServiceDetailOf(payload) {
|
|
181
|
+
const error = payload === null || payload === void 0 ? void 0 : payload.error;
|
|
182
|
+
return typeof error === 'string' && error ? error : undefined;
|
|
183
|
+
}
|