@blockrun/franklin 3.6.22 → 3.6.24
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.
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* - Auth errors (401) get special handling (token refresh, not retry)
|
|
7
7
|
* - EPIPE/connection reset handled as network errors (retryable)
|
|
8
8
|
*/
|
|
9
|
-
export type AgentErrorCategory = 'rate_limit' | 'payment' | 'network' | 'timeout' | 'context_limit' | 'overloaded' | 'server' | 'auth' | 'unknown';
|
|
9
|
+
export type AgentErrorCategory = 'rate_limit' | 'payment' | 'network' | 'timeout' | 'context_limit' | 'overloaded' | 'server' | 'auth' | 'schema' | 'unknown';
|
|
10
10
|
export interface AgentErrorInfo {
|
|
11
11
|
category: AgentErrorCategory;
|
|
12
|
-
label: 'RateLimit' | 'Payment' | 'Network' | 'Timeout' | 'Context' | 'Overloaded' | 'Server' | 'Auth' | 'Unknown';
|
|
12
|
+
label: 'RateLimit' | 'Payment' | 'Network' | 'Timeout' | 'Context' | 'Overloaded' | 'Server' | 'Auth' | 'Schema' | 'Unknown';
|
|
13
13
|
isTransient: boolean;
|
|
14
14
|
/** Max retries for this error type (overrides default). undefined = use default. */
|
|
15
15
|
maxRetries?: number;
|
|
@@ -103,6 +103,24 @@ export function classifyAgentError(message) {
|
|
|
103
103
|
suggestion: 'The model is overloaded. Try /model to switch, or wait and /retry.',
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
+
// Schema / tool-definition errors — NOT transient, retrying won't help.
|
|
107
|
+
// These can be wrapped in 5xx responses (e.g. '503: 400 Invalid schema'),
|
|
108
|
+
// so classify them BEFORE the generic server-error branch below.
|
|
109
|
+
if (includesAny(err, [
|
|
110
|
+
'invalid schema',
|
|
111
|
+
'array schema missing items',
|
|
112
|
+
'schema missing',
|
|
113
|
+
'invalid tool_use',
|
|
114
|
+
'invalid function',
|
|
115
|
+
'tool_use_id',
|
|
116
|
+
'unsupported parameter',
|
|
117
|
+
'invalid request',
|
|
118
|
+
])) {
|
|
119
|
+
return {
|
|
120
|
+
category: 'schema', label: 'Schema', isTransient: false, maxRetries: 0,
|
|
121
|
+
suggestion: 'Tool schema rejected by this model. Try /model to switch to a more permissive model (e.g. sonnet), or upgrade Franklin.',
|
|
122
|
+
};
|
|
123
|
+
}
|
|
106
124
|
if (includesAny(err, [
|
|
107
125
|
'500',
|
|
108
126
|
'502',
|
package/dist/ui/app.js
CHANGED
|
@@ -363,7 +363,9 @@ function RunCodeApp({ initialModel, workDir, walletAddress, walletBalance, chain
|
|
|
363
363
|
// Show user message in scrollback so the conversation is readable
|
|
364
364
|
setCommittedResponses(rs => [...rs, {
|
|
365
365
|
key: `user-${Date.now()}`,
|
|
366
|
-
|
|
366
|
+
// Gold matches the top of the Franklin banner gradient (#FFD700).
|
|
367
|
+
// Brand-consistent, readable on dark terminals, evokes $100-bill identity.
|
|
368
|
+
text: chalk.hex('#FFD700').bold('❯ ') + chalk.hex('#FFD700').bold(trimmed),
|
|
367
369
|
tokens: { input: 0, output: 0, calls: 0 },
|
|
368
370
|
cost: 0,
|
|
369
371
|
}]);
|
package/package.json
CHANGED