@usenaive-sdk/cli 0.12.5 → 0.13.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/README.md +69 -6
- package/dist/client.d.ts +48 -0
- package/dist/client.js +199 -27
- package/dist/client.js.map +1 -1
- package/dist/commands/aeo.js +58 -23
- package/dist/commands/aeo.js.map +1 -1
- package/dist/commands/app-data.js +29 -11
- package/dist/commands/app-data.js.map +1 -1
- package/dist/commands/approvals.js +142 -9
- package/dist/commands/approvals.js.map +1 -1
- package/dist/commands/apps.d.ts +7 -0
- package/dist/commands/apps.js +255 -18
- package/dist/commands/apps.js.map +1 -1
- package/dist/commands/audio.d.ts +9 -0
- package/dist/commands/audio.js +391 -0
- package/dist/commands/audio.js.map +1 -0
- package/dist/commands/auth.d.ts +1 -0
- package/dist/commands/auth.js +47 -19
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/billing.js +9 -9
- package/dist/commands/billing.js.map +1 -1
- package/dist/commands/brain.js +813 -54
- package/dist/commands/brain.js.map +1 -1
- package/dist/commands/browser.js +8 -8
- package/dist/commands/browser.js.map +1 -1
- package/dist/commands/business.js +117 -16
- package/dist/commands/business.js.map +1 -1
- package/dist/commands/clone.js +8 -4
- package/dist/commands/clone.js.map +1 -1
- package/dist/commands/companies.d.ts +8 -0
- package/dist/commands/companies.js +137 -47
- package/dist/commands/companies.js.map +1 -1
- package/dist/commands/company-data.d.ts +2 -0
- package/dist/commands/company-data.js +168 -0
- package/dist/commands/company-data.js.map +1 -0
- package/dist/commands/compute.js +295 -18
- package/dist/commands/compute.js.map +1 -1
- package/dist/commands/connections.d.ts +6 -0
- package/dist/commands/connections.js +42 -2
- package/dist/commands/connections.js.map +1 -1
- package/dist/commands/domains.js +63 -19
- package/dist/commands/domains.js.map +1 -1
- package/dist/commands/ecommerce.js +19 -9
- package/dist/commands/ecommerce.js.map +1 -1
- package/dist/commands/email.js +56 -9
- package/dist/commands/email.js.map +1 -1
- package/dist/commands/formation.js +5 -5
- package/dist/commands/formation.js.map +1 -1
- package/dist/commands/identity.js +4 -3
- package/dist/commands/identity.js.map +1 -1
- package/dist/commands/images.js +86 -12
- package/dist/commands/images.js.map +1 -1
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.js +44 -36
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/jobs.js +1 -0
- package/dist/commands/jobs.js.map +1 -1
- package/dist/commands/legacy-auth.d.ts +27 -0
- package/dist/commands/legacy-auth.js +64 -0
- package/dist/commands/legacy-auth.js.map +1 -0
- package/dist/commands/llm.js +14 -1
- package/dist/commands/llm.js.map +1 -1
- package/dist/commands/login.js +2 -0
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.d.ts +7 -0
- package/dist/commands/logout.js +55 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/media.js +3 -3
- package/dist/commands/media.js.map +1 -1
- package/dist/commands/mobile.d.ts +2 -0
- package/dist/commands/mobile.js +42 -1
- package/dist/commands/mobile.js.map +1 -1
- package/dist/commands/payments.js +1 -1
- package/dist/commands/people.d.ts +2 -0
- package/dist/commands/people.js +197 -0
- package/dist/commands/people.js.map +1 -0
- package/dist/commands/phone.js +40 -83
- package/dist/commands/phone.js.map +1 -1
- package/dist/commands/projects.d.ts +13 -0
- package/dist/commands/projects.js +220 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/commands/register.js +13 -5
- package/dist/commands/register.js.map +1 -1
- package/dist/commands/sandbox.d.ts +2 -0
- package/dist/commands/sandbox.js +558 -0
- package/dist/commands/sandbox.js.map +1 -0
- package/dist/commands/search.js +27 -13
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/seo.js +16 -8
- package/dist/commands/seo.js.map +1 -1
- package/dist/commands/sessions.d.ts +6 -0
- package/dist/commands/sessions.js +109 -0
- package/dist/commands/sessions.js.map +1 -0
- package/dist/commands/social-data.d.ts +2 -0
- package/dist/commands/social-data.js +245 -0
- package/dist/commands/social-data.js.map +1 -0
- package/dist/commands/social.js +9 -7
- package/dist/commands/social.js.map +1 -1
- package/dist/commands/tasks.js +9 -0
- package/dist/commands/tasks.js.map +1 -1
- package/dist/commands/teams.d.ts +69 -0
- package/dist/commands/teams.js +503 -0
- package/dist/commands/teams.js.map +1 -0
- package/dist/commands/up.d.ts +150 -0
- package/dist/commands/up.js +465 -15
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/usage.js +15 -4
- package/dist/commands/usage.js.map +1 -1
- package/dist/commands/use.d.ts +9 -0
- package/dist/commands/use.js +76 -11
- package/dist/commands/use.js.map +1 -1
- package/dist/commands/users.d.ts +8 -0
- package/dist/commands/users.js +28 -9
- package/dist/commands/users.js.map +1 -1
- package/dist/commands/vault.js +31 -1
- package/dist/commands/vault.js.map +1 -1
- package/dist/commands/verification.js +1 -1
- package/dist/commands/verification.js.map +1 -1
- package/dist/commands/video.js +118 -19
- package/dist/commands/video.js.map +1 -1
- package/dist/commands/wallet.js +3 -3
- package/dist/commands/wallet.js.map +1 -1
- package/dist/commands/whoami.js +17 -1
- package/dist/commands/whoami.js.map +1 -1
- package/dist/config.d.ts +16 -1
- package/dist/config.js +15 -1
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +250 -24
- package/dist/index.js.map +1 -1
- package/dist/lib/brain-select.d.ts +193 -0
- package/dist/lib/brain-select.js +403 -0
- package/dist/lib/brain-select.js.map +1 -0
- package/dist/lib/cli-validation.d.ts +12 -0
- package/dist/lib/cli-validation.js +46 -0
- package/dist/lib/cli-validation.js.map +1 -0
- package/dist/lib/deprecation.d.ts +158 -0
- package/dist/lib/deprecation.js +140 -0
- package/dist/lib/deprecation.js.map +1 -0
- package/dist/lib/duration.d.ts +8 -0
- package/dist/lib/duration.js +11 -0
- package/dist/lib/duration.js.map +1 -0
- package/dist/lib/http-response.d.ts +11 -0
- package/dist/lib/http-response.js +96 -0
- package/dist/lib/http-response.js.map +1 -0
- package/dist/lib/pricing.d.ts +132 -0
- package/dist/lib/pricing.js +148 -0
- package/dist/lib/pricing.js.map +1 -0
- package/dist/lib/stream-frames.d.ts +114 -0
- package/dist/lib/stream-frames.js +169 -0
- package/dist/lib/stream-frames.js.map +1 -0
- package/dist/lib/teams-catalog.d.ts +141 -0
- package/dist/lib/teams-catalog.js +765 -0
- package/dist/lib/teams-catalog.js.map +1 -0
- package/dist/lib/unknown-command.d.ts +55 -1
- package/dist/lib/unknown-command.js +113 -0
- package/dist/lib/unknown-command.js.map +1 -1
- package/dist/output.d.ts +127 -5
- package/dist/output.js +189 -12
- package/dist/output.js.map +1 -1
- package/package.json +3 -3
- package/dist/commands/link.d.ts +0 -3
- package/dist/commands/link.js +0 -91
- package/dist/commands/link.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teams-catalog.js","sourceRoot":"","sources":["../../src/lib/teams-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAuEH,gFAAgF;AAChF,iFAAiF;AACjF,iFAAiF;AACjF,gFAAgF;AAEhF,MAAM,MAAM,GAAa;IACvB,IAAI,EAAE,gBAAgB;IACtB,GAAG,EAAE,QAAQ;IACb,QAAQ,EAAE,gEAAgE;IAC1E,EAAE,EAAE,OAAO;CACZ,CAAC;AACF,MAAM,KAAK,GAAa,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAChH,MAAM,MAAM,GAAa,EAAE,IAAI,EAAE,mBAAmB,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;AACjH,MAAM,IAAI,GAAa,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,0CAA0C,EAAE,EAAE,EAAE,OAAO,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I,CAAC,MAAM,CAAC,CAAC;QAC9D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,WAAW,CAAC,eAAe,EAAE,CAAC,GAAG,KAAK,SAAS,6BAA6B,KAAK,iBAAiB,CAAC,CAAC;QAChH,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,WAAW,CACnB,eAAe,EAAE,CAAC,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,6CAA6C,CACrH,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED;kFACkF;AAClF,MAAM,UAAU,KAAK,CAAC,GAAW;IAC/B,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,GAAW;IAChC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
1
2
|
import type { NextStep } from "../output.js";
|
|
2
3
|
/** Structured error emitted when commander sees a command it doesn't recognize. */
|
|
3
4
|
export interface UnknownCommandError {
|
|
4
5
|
success: false;
|
|
5
6
|
action: "unknown_command";
|
|
6
7
|
error: {
|
|
7
|
-
code: "cli_outdated";
|
|
8
|
+
code: "cli_outdated" | "unknown_subcommand";
|
|
8
9
|
message: string;
|
|
9
10
|
};
|
|
10
11
|
recovery_steps: NextStep[];
|
|
@@ -15,3 +16,56 @@ export interface UnknownCommandError {
|
|
|
15
16
|
* 0.11.0) gets a `cli_outdated` JSON object instead of commander's raw stderr.
|
|
16
17
|
*/
|
|
17
18
|
export declare function buildUnknownCommandError(command: string, currentVersion: string): UnknownCommandError;
|
|
19
|
+
/**
|
|
20
|
+
* Build the agent-native error for an unknown SUBcommand of a known group
|
|
21
|
+
* (e.g. `naive trading market-data`). Unlike a bare unknown top-level command,
|
|
22
|
+
* we know the valid siblings, so we list them — the most useful recovery for a
|
|
23
|
+
* mistyped/renamed subcommand. See findUnknownSubcommand for why this is needed
|
|
24
|
+
* (N10): commander's `--help` option otherwise prints the parent's help and exits
|
|
25
|
+
* 0, masking the mistake.
|
|
26
|
+
*/
|
|
27
|
+
export declare function buildUnknownSubcommandError(group: string, unknown: string, validSubs: string[], currentVersion: string): UnknownCommandError;
|
|
28
|
+
/**
|
|
29
|
+
* Pre-scan raw argv against the built command tree and return the first operand
|
|
30
|
+
* that lands on a command GROUP but is not one of its subcommands — i.e. a
|
|
31
|
+
* mistyped/unknown subcommand.
|
|
32
|
+
*
|
|
33
|
+
* WHY (N10): commander already errors on an unknown subcommand (exit 1) — EXCEPT
|
|
34
|
+
* when `--help`/`-h` is present, where its help option fires on the parent and
|
|
35
|
+
* exits 0, silently printing the wrong (parent) help. Running this before
|
|
36
|
+
* `program.parse()` lets us surface a real "unknown command" error consistently,
|
|
37
|
+
* with or without `--help`.
|
|
38
|
+
*
|
|
39
|
+
* A "group" is a NON-ROOT command that has subcommands and declares no positional
|
|
40
|
+
* args of its own (trading, images, email, …). Leaf commands that take a positional
|
|
41
|
+
* (`images generate <prompt>`) are left to commander — the first operand there is
|
|
42
|
+
* legitimate input, not a subcommand.
|
|
43
|
+
*
|
|
44
|
+
* 🔴 A VALUE-TAKING OPTION'S VALUE IS NOT A SUBCOMMAND (NV-064). This walk used
|
|
45
|
+
* to skip the token starting with `-` and then read the NEXT token as a
|
|
46
|
+
* subcommand name. The docstring claimed that was safe — "the only program-level
|
|
47
|
+
* options are booleans" and "leaf-command option values never reach the
|
|
48
|
+
* group-flagging branch" — and it is false for a command that is a group
|
|
49
|
+
* (`commands.length > 0`), declares its own `<value>` options, and registers no
|
|
50
|
+
* positional. `jobs` is exactly that shape, so on published CLI 0.13.0:
|
|
51
|
+
*
|
|
52
|
+
* naive jobs --json -> the listing
|
|
53
|
+
* naive jobs --limit 5 --json -> unknown_subcommand '5'
|
|
54
|
+
* naive jobs --status completed --json -> unknown_subcommand 'completed'
|
|
55
|
+
*
|
|
56
|
+
* Both broken forms are what `commands/jobs.ts` help text documents as the
|
|
57
|
+
* primary usage, and the failure happens before `program.parse()` — no API key,
|
|
58
|
+
* no network. `brain` has the same shape and would acquire the bug on the day it
|
|
59
|
+
* ships. So the walk now consumes an option's value, and stops at `--`.
|
|
60
|
+
*
|
|
61
|
+
* The ROOT program is deliberately excluded: an unknown TOP-LEVEL command
|
|
62
|
+
* (`naive bogus`) is handled by commander's `command:*` listener as a
|
|
63
|
+
* `cli_outdated` error (it may exist in a newer CLI) — a different, and more apt,
|
|
64
|
+
* message than "unknown subcommand". Only unrecognized children of a real group
|
|
65
|
+
* are our concern here.
|
|
66
|
+
*/
|
|
67
|
+
export declare function findUnknownSubcommand(program: Command, argv: string[]): {
|
|
68
|
+
group: string;
|
|
69
|
+
unknown: string;
|
|
70
|
+
validSubs: string[];
|
|
71
|
+
} | null;
|
|
@@ -16,4 +16,117 @@ export function buildUnknownCommandError(command, currentVersion) {
|
|
|
16
16
|
],
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Build the agent-native error for an unknown SUBcommand of a known group
|
|
21
|
+
* (e.g. `naive trading market-data`). Unlike a bare unknown top-level command,
|
|
22
|
+
* we know the valid siblings, so we list them — the most useful recovery for a
|
|
23
|
+
* mistyped/renamed subcommand. See findUnknownSubcommand for why this is needed
|
|
24
|
+
* (N10): commander's `--help` option otherwise prints the parent's help and exits
|
|
25
|
+
* 0, masking the mistake.
|
|
26
|
+
*/
|
|
27
|
+
export function buildUnknownSubcommandError(group, unknown, validSubs, currentVersion) {
|
|
28
|
+
return {
|
|
29
|
+
success: false,
|
|
30
|
+
action: "unknown_command",
|
|
31
|
+
error: {
|
|
32
|
+
code: "unknown_subcommand",
|
|
33
|
+
message: `Unknown subcommand '${unknown}' for 'naive ${group}'. ` +
|
|
34
|
+
`Valid subcommands: ${validSubs.join(", ")}. ` +
|
|
35
|
+
`(CLI v${currentVersion}; a newer subcommand may exist in a later version.)`,
|
|
36
|
+
},
|
|
37
|
+
recovery_steps: [
|
|
38
|
+
{ command: `naive ${group} --help`, description: `List all '${group}' subcommands and their flags` },
|
|
39
|
+
...(validSubs.length > 0
|
|
40
|
+
? [{ command: `naive ${group} ${validSubs[0]}`, description: "Run a valid subcommand" }]
|
|
41
|
+
: []),
|
|
42
|
+
{ command: "npm i -g @usenaive-sdk/cli@latest", description: "Update the CLI if the subcommand should exist" },
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Does `tok` name an option that consumes the NEXT argv token?
|
|
48
|
+
*
|
|
49
|
+
* Asked of the command being walked and of the root program, because commander
|
|
50
|
+
* resolves a flag against both. `--opt=value` carries its own value, so it never
|
|
51
|
+
* consumes the next token.
|
|
52
|
+
*/
|
|
53
|
+
function consumesNextToken(cmd, program, tok) {
|
|
54
|
+
if (tok.includes("="))
|
|
55
|
+
return false;
|
|
56
|
+
for (const source of cmd === program ? [program] : [cmd, program]) {
|
|
57
|
+
for (const option of source.options) {
|
|
58
|
+
if (option.short === tok || option.long === tok)
|
|
59
|
+
return option.required || option.optional;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Pre-scan raw argv against the built command tree and return the first operand
|
|
66
|
+
* that lands on a command GROUP but is not one of its subcommands — i.e. a
|
|
67
|
+
* mistyped/unknown subcommand.
|
|
68
|
+
*
|
|
69
|
+
* WHY (N10): commander already errors on an unknown subcommand (exit 1) — EXCEPT
|
|
70
|
+
* when `--help`/`-h` is present, where its help option fires on the parent and
|
|
71
|
+
* exits 0, silently printing the wrong (parent) help. Running this before
|
|
72
|
+
* `program.parse()` lets us surface a real "unknown command" error consistently,
|
|
73
|
+
* with or without `--help`.
|
|
74
|
+
*
|
|
75
|
+
* A "group" is a NON-ROOT command that has subcommands and declares no positional
|
|
76
|
+
* args of its own (trading, images, email, …). Leaf commands that take a positional
|
|
77
|
+
* (`images generate <prompt>`) are left to commander — the first operand there is
|
|
78
|
+
* legitimate input, not a subcommand.
|
|
79
|
+
*
|
|
80
|
+
* 🔴 A VALUE-TAKING OPTION'S VALUE IS NOT A SUBCOMMAND (NV-064). This walk used
|
|
81
|
+
* to skip the token starting with `-` and then read the NEXT token as a
|
|
82
|
+
* subcommand name. The docstring claimed that was safe — "the only program-level
|
|
83
|
+
* options are booleans" and "leaf-command option values never reach the
|
|
84
|
+
* group-flagging branch" — and it is false for a command that is a group
|
|
85
|
+
* (`commands.length > 0`), declares its own `<value>` options, and registers no
|
|
86
|
+
* positional. `jobs` is exactly that shape, so on published CLI 0.13.0:
|
|
87
|
+
*
|
|
88
|
+
* naive jobs --json -> the listing
|
|
89
|
+
* naive jobs --limit 5 --json -> unknown_subcommand '5'
|
|
90
|
+
* naive jobs --status completed --json -> unknown_subcommand 'completed'
|
|
91
|
+
*
|
|
92
|
+
* Both broken forms are what `commands/jobs.ts` help text documents as the
|
|
93
|
+
* primary usage, and the failure happens before `program.parse()` — no API key,
|
|
94
|
+
* no network. `brain` has the same shape and would acquire the bug on the day it
|
|
95
|
+
* ships. So the walk now consumes an option's value, and stops at `--`.
|
|
96
|
+
*
|
|
97
|
+
* The ROOT program is deliberately excluded: an unknown TOP-LEVEL command
|
|
98
|
+
* (`naive bogus`) is handled by commander's `command:*` listener as a
|
|
99
|
+
* `cli_outdated` error (it may exist in a newer CLI) — a different, and more apt,
|
|
100
|
+
* message than "unknown subcommand". Only unrecognized children of a real group
|
|
101
|
+
* are our concern here.
|
|
102
|
+
*/
|
|
103
|
+
export function findUnknownSubcommand(program, argv) {
|
|
104
|
+
let cmd = program;
|
|
105
|
+
for (let i = 0; i < argv.length; i++) {
|
|
106
|
+
const tok = argv[i];
|
|
107
|
+
// Everything after `--` is an operand by definition — never a subcommand.
|
|
108
|
+
if (tok === "--")
|
|
109
|
+
return null;
|
|
110
|
+
if (tok.startsWith("-")) {
|
|
111
|
+
if (consumesNextToken(cmd, program, tok))
|
|
112
|
+
i++;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
const sub = cmd.commands.find((c) => c.name() === tok || c.aliases().includes(tok));
|
|
116
|
+
if (sub) {
|
|
117
|
+
cmd = sub;
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
const isGroup = cmd !== program && cmd.commands.length > 0 && cmd.registeredArguments.length === 0;
|
|
121
|
+
if (isGroup) {
|
|
122
|
+
return {
|
|
123
|
+
group: cmd.name(),
|
|
124
|
+
unknown: tok,
|
|
125
|
+
validSubs: cmd.commands.map((c) => c.name()).filter((n) => n !== "help"),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
19
132
|
//# sourceMappingURL=unknown-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unknown-command.js","sourceRoot":"","sources":["../../src/lib/unknown-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unknown-command.js","sourceRoot":"","sources":["../../src/lib/unknown-command.ts"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAAe,EACf,cAAsB;IAEtB,OAAO;QACL,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,iBAAiB;QACzB,KAAK,EAAE;YACL,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,oBAAoB,OAAO,yBAAyB,cAAc,8CAA8C;SAC1H;QACD,cAAc,EAAE;YACd,EAAE,O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Z,SAAS,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC;aACzE,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/output.d.ts
CHANGED
|
@@ -13,6 +13,27 @@ export interface NextStep {
|
|
|
13
13
|
description: string;
|
|
14
14
|
when?: string;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* The SINGLE derivation point for the human-readable "Cost:" hint (N7). Reads
|
|
18
|
+
* the authoritative `credits_used` off a response/result object — the exact
|
|
19
|
+
* number the API billed and dropped from the balance — and formats it so the
|
|
20
|
+
* hint can NEVER drift from what was actually charged. Previously commands
|
|
21
|
+
* hardcoded strings like "Cost: 1 credit" while the API charged 10; deriving
|
|
22
|
+
* from the response is the only way to keep them in lockstep.
|
|
23
|
+
*
|
|
24
|
+
* Returns undefined when there is nothing (yet) to charge — the field is
|
|
25
|
+
* absent, or a job is still queued/processing/failed (credits_used is null) —
|
|
26
|
+
* so callers can spread it into a hints array and no line appears.
|
|
27
|
+
*/
|
|
28
|
+
export declare function creditCostHint(result: unknown): string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The submit-time counterpart of creditCostHint (N6). Reads a job-submission
|
|
31
|
+
* response's `estimated_credits` — the API's pre-flight quote, derived from the
|
|
32
|
+
* SAME getFalPrice() + usdToCredits() source that settles the final charge — so
|
|
33
|
+
* a customer sees the spend before and at submit, and the echoed number tracks
|
|
34
|
+
* what will actually be billed. Returns undefined when no estimate is present.
|
|
35
|
+
*/
|
|
36
|
+
export declare function creditEstimateHint(result: unknown): string | undefined;
|
|
16
37
|
/** Non-fatal "a newer CLI is available" nudge, attached to the next agentOutput. */
|
|
17
38
|
export interface UpdateInfo {
|
|
18
39
|
current: string;
|
|
@@ -20,6 +41,34 @@ export interface UpdateInfo {
|
|
|
20
41
|
update_command: string;
|
|
21
42
|
note: string;
|
|
22
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* The machine half of the deprecation notice (06 §1.9 / §1.10.5). The human half
|
|
46
|
+
* is a stderr banner; this rides the STDOUT envelope so stdout stays
|
|
47
|
+
* JSON.parse-able and an agent can branch on it without scraping stderr.
|
|
48
|
+
*
|
|
49
|
+
* `replacement` is a CLOSED union on purpose (R-7): a capability that is simply
|
|
50
|
+
* gone renders as `{kind:"gap", because}` and cannot be rendered as an empty
|
|
51
|
+
* string, so the reason is required by the type rather than by review.
|
|
52
|
+
*
|
|
53
|
+
* `sunset` is likewise closed — `"frozen"` or a date. There is no "removal TBD".
|
|
54
|
+
*/
|
|
55
|
+
export interface DeprecationNotice {
|
|
56
|
+
id: string;
|
|
57
|
+
subject: string;
|
|
58
|
+
status: "deprecated" | "retired";
|
|
59
|
+
replacement: {
|
|
60
|
+
kind: "use";
|
|
61
|
+
what: string;
|
|
62
|
+
} | {
|
|
63
|
+
kind: "gap";
|
|
64
|
+
because: string;
|
|
65
|
+
};
|
|
66
|
+
since: string;
|
|
67
|
+
sunset: "frozen" | {
|
|
68
|
+
on: string;
|
|
69
|
+
};
|
|
70
|
+
guide: string;
|
|
71
|
+
}
|
|
23
72
|
export interface AgentOutput {
|
|
24
73
|
success: boolean;
|
|
25
74
|
action: string;
|
|
@@ -29,9 +78,22 @@ export interface AgentOutput {
|
|
|
29
78
|
related_commands?: string[];
|
|
30
79
|
help_markdown?: string;
|
|
31
80
|
update?: UpdateInfo;
|
|
81
|
+
deprecation?: DeprecationNotice;
|
|
82
|
+
}
|
|
83
|
+
export interface AgentErrorDetails {
|
|
84
|
+
code?: string;
|
|
85
|
+
message?: string;
|
|
86
|
+
hint?: string;
|
|
87
|
+
http_status?: number;
|
|
88
|
+
body_snippet?: string;
|
|
89
|
+
[key: string]: unknown;
|
|
32
90
|
}
|
|
33
91
|
/** Stash a pending update notice for the next agentOutput call (client layer → output). */
|
|
34
92
|
export declare function setPendingUpdate(info: UpdateInfo | undefined): void;
|
|
93
|
+
/** Stash a pending deprecation notice for the next agentOutput call. */
|
|
94
|
+
export declare function setPendingDeprecation(notice: DeprecationNotice | undefined): void;
|
|
95
|
+
/** Test seam: read the pending notice without emitting it. */
|
|
96
|
+
export declare function peekPendingDeprecation(): DeprecationNotice | undefined;
|
|
35
97
|
export declare function agentOutput(opts: {
|
|
36
98
|
action: string;
|
|
37
99
|
result: unknown;
|
|
@@ -40,13 +102,73 @@ export declare function agentOutput(opts: {
|
|
|
40
102
|
related_commands?: string[];
|
|
41
103
|
help_markdown?: string;
|
|
42
104
|
}): void;
|
|
105
|
+
/**
|
|
106
|
+
* `agentOutput` plus an explicit process exit code — the mechanism behind the
|
|
107
|
+
* exit-code ladder of 06 §1.3. Exit 2 is "success, and a diff exists"
|
|
108
|
+
* (terraform's `-detailed-exitcode`); exit 3 is "success, and the terminal state
|
|
109
|
+
* is not success" — a CI script reading 0 as "the work is done" would otherwise
|
|
110
|
+
* count an `unverified` task as a pass.
|
|
111
|
+
*
|
|
112
|
+
* It sets `process.exitCode` rather than calling `process.exit()`: the payload it
|
|
113
|
+
* just wrote may still be buffered when stdout is a pipe, and `process.exit()`
|
|
114
|
+
* truncates it. Setting the code lets Node drain and then exit with it.
|
|
115
|
+
*/
|
|
116
|
+
export declare function agentOutputExit(opts: {
|
|
117
|
+
action: string;
|
|
118
|
+
result: unknown;
|
|
119
|
+
next_steps: NextStep[];
|
|
120
|
+
hints?: string[];
|
|
121
|
+
related_commands?: string[];
|
|
122
|
+
help_markdown?: string;
|
|
123
|
+
exitCode?: 0 | 2 | 3;
|
|
124
|
+
}): void;
|
|
125
|
+
/**
|
|
126
|
+
* THE FAILURE ENVELOPE GOES TO STDOUT, on the same channel as the success one.
|
|
127
|
+
*
|
|
128
|
+
* This used to be `console.error`, and stdout was zero bytes on every failure —
|
|
129
|
+
* so `naive <anything> --json | jq` and any agent reading stdout saw NOTHING when
|
|
130
|
+
* a command failed, including the `recovery_steps` that are its only route out.
|
|
131
|
+
*
|
|
132
|
+
* That contradicted the split the rest of this CLI is built on: stdout is THE
|
|
133
|
+
* machine document, stderr is human noise. update-notifier is stderr-only "so it
|
|
134
|
+
* never pollutes the JSON on stdout" (index.ts); the human-mode tip above is
|
|
135
|
+
* stderr "without polluting stdout (stays parseable JSON)"; a deprecation notice
|
|
136
|
+
* rides "the STDOUT envelope so stdout stays JSON.parse-able and an agent can
|
|
137
|
+
* branch on it without scraping stderr" (DeprecationNotice, above). The
|
|
138
|
+
* `unhandledRejection` net in index.ts exists in so many words because "an agent
|
|
139
|
+
* parsing stdout would get nothing it can act on" — and then emitted here, to
|
|
140
|
+
* stderr, so it did not deliver the thing it was written to deliver.
|
|
141
|
+
*
|
|
142
|
+
* Written ONCE, not to both channels: `2>&1` is the common way an agent harness
|
|
143
|
+
* merges these, and a second copy would put two JSON documents in one stream and
|
|
144
|
+
* break the single-document invariant that makes stdout `JSON.parse`-able.
|
|
145
|
+
*
|
|
146
|
+
* `success: false` is in the envelope and the exit code is still 1, so nothing
|
|
147
|
+
* downstream has to guess whether stdout is data — it must branch on `success`
|
|
148
|
+
* either way, exactly as it already does for the success envelope.
|
|
149
|
+
*
|
|
150
|
+
* HUMAN mode is unchanged: a red ✗ line is a diagnostic for a person, and those
|
|
151
|
+
* belong on stderr.
|
|
152
|
+
*/
|
|
43
153
|
export declare function agentError(opts: {
|
|
44
154
|
action: string;
|
|
45
|
-
error:
|
|
46
|
-
code?: string;
|
|
47
|
-
message?: string;
|
|
48
|
-
hint?: string;
|
|
49
|
-
};
|
|
155
|
+
error: AgentErrorDetails;
|
|
50
156
|
recovery_steps: NextStep[];
|
|
51
157
|
}): void;
|
|
158
|
+
/**
|
|
159
|
+
* 06 §1.8 — when a response body carries a governance `verdict`, the DECISION
|
|
160
|
+
* POINT knows the recovery and the CLI's local `switch (code)` does not. The
|
|
161
|
+
* whole point of the denial envelope is that a model recovers instead of
|
|
162
|
+
* looping, and a hand-written table that overwrites the server's steps defeats
|
|
163
|
+
* it. So: a body with a `verdict` and a well-formed `recovery[]` renders the
|
|
164
|
+
* server's steps verbatim, and `getRecoverySteps` is not consulted.
|
|
165
|
+
*
|
|
166
|
+
* Both gates are required. `verdict` alone with no recovery falls back (the
|
|
167
|
+
* server said nothing actionable); `recovery` alone with no verdict is ignored,
|
|
168
|
+
* so this cannot become a way for any endpoint to rewrite the CLI's advice.
|
|
169
|
+
* Each step is validated field by field — an entry that is not
|
|
170
|
+
* `{command:string, description:string}` is dropped rather than printed as
|
|
171
|
+
* `undefined`.
|
|
172
|
+
*/
|
|
173
|
+
export declare function serverRecoverySteps(data: unknown): NextStep[] | undefined;
|
|
52
174
|
export declare function formatApiError(action: string, data: unknown): void;
|
package/dist/output.js
CHANGED
|
@@ -116,6 +116,40 @@ function renderHumanError(o) {
|
|
|
116
116
|
if (o.error.hint)
|
|
117
117
|
w(chalk.dim(" hint: " + o.error.hint) + "\n");
|
|
118
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* The SINGLE derivation point for the human-readable "Cost:" hint (N7). Reads
|
|
121
|
+
* the authoritative `credits_used` off a response/result object — the exact
|
|
122
|
+
* number the API billed and dropped from the balance — and formats it so the
|
|
123
|
+
* hint can NEVER drift from what was actually charged. Previously commands
|
|
124
|
+
* hardcoded strings like "Cost: 1 credit" while the API charged 10; deriving
|
|
125
|
+
* from the response is the only way to keep them in lockstep.
|
|
126
|
+
*
|
|
127
|
+
* Returns undefined when there is nothing (yet) to charge — the field is
|
|
128
|
+
* absent, or a job is still queued/processing/failed (credits_used is null) —
|
|
129
|
+
* so callers can spread it into a hints array and no line appears.
|
|
130
|
+
*/
|
|
131
|
+
export function creditCostHint(result) {
|
|
132
|
+
const raw = result?.credits_used;
|
|
133
|
+
if (typeof raw !== "number" || !Number.isFinite(raw) || raw <= 0)
|
|
134
|
+
return undefined;
|
|
135
|
+
// Trim binary float noise (e.g. 0.30000000000000004) without inventing precision.
|
|
136
|
+
const credits = Math.round(raw * 10000) / 10000;
|
|
137
|
+
return `Cost: ${credits} ${credits === 1 ? "credit" : "credits"}`;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* The submit-time counterpart of creditCostHint (N6). Reads a job-submission
|
|
141
|
+
* response's `estimated_credits` — the API's pre-flight quote, derived from the
|
|
142
|
+
* SAME getFalPrice() + usdToCredits() source that settles the final charge — so
|
|
143
|
+
* a customer sees the spend before and at submit, and the echoed number tracks
|
|
144
|
+
* what will actually be billed. Returns undefined when no estimate is present.
|
|
145
|
+
*/
|
|
146
|
+
export function creditEstimateHint(result) {
|
|
147
|
+
const raw = result?.estimated_credits;
|
|
148
|
+
if (typeof raw !== "number" || !Number.isFinite(raw) || raw <= 0)
|
|
149
|
+
return undefined;
|
|
150
|
+
const credits = Math.round(raw * 10000) / 10000;
|
|
151
|
+
return `Estimated cost: ${credits} ${credits === 1 ? "credit" : "credits"} (charged only on successful completion)`;
|
|
152
|
+
}
|
|
119
153
|
// A pending, non-fatal update notice discovered by the client layer (from the
|
|
120
154
|
// server version handshake). It rides along on the next successful agentOutput
|
|
121
155
|
// and is cleared once emitted, so it surfaces exactly once per command.
|
|
@@ -124,11 +158,41 @@ let _pendingUpdate;
|
|
|
124
158
|
export function setPendingUpdate(info) {
|
|
125
159
|
_pendingUpdate = info;
|
|
126
160
|
}
|
|
161
|
+
// The same one-shot mechanism for a deprecation notice, set by lib/deprecation.ts
|
|
162
|
+
// from a commander preAction hook. It rides the next successful envelope and is
|
|
163
|
+
// cleared once emitted, so it appears exactly once per command.
|
|
164
|
+
let _pendingDeprecation;
|
|
165
|
+
/** Stash a pending deprecation notice for the next agentOutput call. */
|
|
166
|
+
export function setPendingDeprecation(notice) {
|
|
167
|
+
_pendingDeprecation = notice;
|
|
168
|
+
}
|
|
169
|
+
/** Test seam: read the pending notice without emitting it. */
|
|
170
|
+
export function peekPendingDeprecation() {
|
|
171
|
+
return _pendingDeprecation;
|
|
172
|
+
}
|
|
127
173
|
export function agentOutput(opts) {
|
|
128
|
-
|
|
174
|
+
agentOutputExit(opts);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* `agentOutput` plus an explicit process exit code — the mechanism behind the
|
|
178
|
+
* exit-code ladder of 06 §1.3. Exit 2 is "success, and a diff exists"
|
|
179
|
+
* (terraform's `-detailed-exitcode`); exit 3 is "success, and the terminal state
|
|
180
|
+
* is not success" — a CI script reading 0 as "the work is done" would otherwise
|
|
181
|
+
* count an `unverified` task as a pass.
|
|
182
|
+
*
|
|
183
|
+
* It sets `process.exitCode` rather than calling `process.exit()`: the payload it
|
|
184
|
+
* just wrote may still be buffered when stdout is a pipe, and `process.exit()`
|
|
185
|
+
* truncates it. Setting the code lets Node drain and then exit with it.
|
|
186
|
+
*/
|
|
187
|
+
export function agentOutputExit(opts) {
|
|
188
|
+
// Consume any pending notices first (so they're cleared even in human mode),
|
|
129
189
|
// then take the human-mode early return.
|
|
130
190
|
const update = _pendingUpdate;
|
|
131
191
|
_pendingUpdate = undefined;
|
|
192
|
+
const deprecation = _pendingDeprecation;
|
|
193
|
+
_pendingDeprecation = undefined;
|
|
194
|
+
if (opts.exitCode)
|
|
195
|
+
process.exitCode = opts.exitCode;
|
|
132
196
|
if (humanMode()) {
|
|
133
197
|
renderHuman(opts);
|
|
134
198
|
return;
|
|
@@ -142,10 +206,39 @@ export function agentOutput(opts) {
|
|
|
142
206
|
...(opts.related_commands && { related_commands: opts.related_commands }),
|
|
143
207
|
...(opts.help_markdown && { help_markdown: opts.help_markdown }),
|
|
144
208
|
...(update && { update }),
|
|
209
|
+
...(deprecation && { deprecation }),
|
|
145
210
|
};
|
|
146
211
|
console.log(JSON.stringify(output, null, 2));
|
|
147
212
|
maybeDiscoveryHint();
|
|
148
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* THE FAILURE ENVELOPE GOES TO STDOUT, on the same channel as the success one.
|
|
216
|
+
*
|
|
217
|
+
* This used to be `console.error`, and stdout was zero bytes on every failure —
|
|
218
|
+
* so `naive <anything> --json | jq` and any agent reading stdout saw NOTHING when
|
|
219
|
+
* a command failed, including the `recovery_steps` that are its only route out.
|
|
220
|
+
*
|
|
221
|
+
* That contradicted the split the rest of this CLI is built on: stdout is THE
|
|
222
|
+
* machine document, stderr is human noise. update-notifier is stderr-only "so it
|
|
223
|
+
* never pollutes the JSON on stdout" (index.ts); the human-mode tip above is
|
|
224
|
+
* stderr "without polluting stdout (stays parseable JSON)"; a deprecation notice
|
|
225
|
+
* rides "the STDOUT envelope so stdout stays JSON.parse-able and an agent can
|
|
226
|
+
* branch on it without scraping stderr" (DeprecationNotice, above). The
|
|
227
|
+
* `unhandledRejection` net in index.ts exists in so many words because "an agent
|
|
228
|
+
* parsing stdout would get nothing it can act on" — and then emitted here, to
|
|
229
|
+
* stderr, so it did not deliver the thing it was written to deliver.
|
|
230
|
+
*
|
|
231
|
+
* Written ONCE, not to both channels: `2>&1` is the common way an agent harness
|
|
232
|
+
* merges these, and a second copy would put two JSON documents in one stream and
|
|
233
|
+
* break the single-document invariant that makes stdout `JSON.parse`-able.
|
|
234
|
+
*
|
|
235
|
+
* `success: false` is in the envelope and the exit code is still 1, so nothing
|
|
236
|
+
* downstream has to guess whether stdout is data — it must branch on `success`
|
|
237
|
+
* either way, exactly as it already does for the success envelope.
|
|
238
|
+
*
|
|
239
|
+
* HUMAN mode is unchanged: a red ✗ line is a diagnostic for a person, and those
|
|
240
|
+
* belong on stderr.
|
|
241
|
+
*/
|
|
149
242
|
export function agentError(opts) {
|
|
150
243
|
if (humanMode()) {
|
|
151
244
|
renderHumanError(opts);
|
|
@@ -157,25 +250,82 @@ export function agentError(opts) {
|
|
|
157
250
|
error: opts.error,
|
|
158
251
|
recovery_steps: opts.recovery_steps,
|
|
159
252
|
};
|
|
160
|
-
console.
|
|
253
|
+
console.log(JSON.stringify(output, null, 2));
|
|
161
254
|
process.exit(1);
|
|
162
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* 06 §1.8 — when a response body carries a governance `verdict`, the DECISION
|
|
258
|
+
* POINT knows the recovery and the CLI's local `switch (code)` does not. The
|
|
259
|
+
* whole point of the denial envelope is that a model recovers instead of
|
|
260
|
+
* looping, and a hand-written table that overwrites the server's steps defeats
|
|
261
|
+
* it. So: a body with a `verdict` and a well-formed `recovery[]` renders the
|
|
262
|
+
* server's steps verbatim, and `getRecoverySteps` is not consulted.
|
|
263
|
+
*
|
|
264
|
+
* Both gates are required. `verdict` alone with no recovery falls back (the
|
|
265
|
+
* server said nothing actionable); `recovery` alone with no verdict is ignored,
|
|
266
|
+
* so this cannot become a way for any endpoint to rewrite the CLI's advice.
|
|
267
|
+
* Each step is validated field by field — an entry that is not
|
|
268
|
+
* `{command:string, description:string}` is dropped rather than printed as
|
|
269
|
+
* `undefined`.
|
|
270
|
+
*/
|
|
271
|
+
export function serverRecoverySteps(data) {
|
|
272
|
+
if (typeof data !== "object" || data === null)
|
|
273
|
+
return undefined;
|
|
274
|
+
const body = data;
|
|
275
|
+
const verdict = body.verdict ?? body.error?.verdict;
|
|
276
|
+
if (typeof verdict !== "string" || verdict.length === 0)
|
|
277
|
+
return undefined;
|
|
278
|
+
const raw = body.recovery ?? body.error?.recovery;
|
|
279
|
+
if (!Array.isArray(raw))
|
|
280
|
+
return undefined;
|
|
281
|
+
const steps = [];
|
|
282
|
+
for (const entry of raw) {
|
|
283
|
+
if (typeof entry !== "object" || entry === null)
|
|
284
|
+
continue;
|
|
285
|
+
const { command, description, when } = entry;
|
|
286
|
+
if (typeof command !== "string" || typeof description !== "string")
|
|
287
|
+
continue;
|
|
288
|
+
steps.push({ command, description, ...(typeof when === "string" && { when }) });
|
|
289
|
+
}
|
|
290
|
+
return steps.length > 0 ? steps : undefined;
|
|
291
|
+
}
|
|
163
292
|
export function formatApiError(action, data) {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
293
|
+
// Accept Naive `{ error: { code, message } }`, proxy shapes where `error` is a
|
|
294
|
+
// string (Supabase Storage), or a bare `{ message }` — never collapse to opaque
|
|
295
|
+
// `unknown` when the upstream already said something useful.
|
|
296
|
+
const payload = data && typeof data === "object" ? data : null;
|
|
297
|
+
const rawError = payload?.error;
|
|
298
|
+
let details;
|
|
299
|
+
if (rawError && typeof rawError === "object" && !Array.isArray(rawError)) {
|
|
300
|
+
details = rawError;
|
|
171
301
|
}
|
|
172
|
-
else {
|
|
302
|
+
else if (typeof rawError === "string" && rawError) {
|
|
303
|
+
const message = typeof payload?.message === "string" && payload.message ? payload.message : rawError;
|
|
304
|
+
details = { code: "upstream_error", message };
|
|
305
|
+
}
|
|
306
|
+
else if (typeof payload?.message === "string" && payload.message) {
|
|
307
|
+
details = { code: "upstream_error", message: payload.message };
|
|
308
|
+
}
|
|
309
|
+
if (details) {
|
|
173
310
|
agentError({
|
|
174
311
|
action,
|
|
175
|
-
error:
|
|
176
|
-
|
|
312
|
+
error: details,
|
|
313
|
+
// A governance denial carries its own recovery — the DECISION POINT knows
|
|
314
|
+
// the way out and this local table does not. Server steps win when both
|
|
315
|
+
// gates in serverRecoverySteps() are satisfied.
|
|
316
|
+
recovery_steps: serverRecoverySteps(data) ?? getRecoverySteps(details.code),
|
|
177
317
|
});
|
|
318
|
+
return;
|
|
178
319
|
}
|
|
320
|
+
agentError({
|
|
321
|
+
action,
|
|
322
|
+
error: {
|
|
323
|
+
code: "unknown",
|
|
324
|
+
message: "Unexpected error response",
|
|
325
|
+
body_snippet: data == null ? undefined : JSON.stringify(data).slice(0, 300),
|
|
326
|
+
},
|
|
327
|
+
recovery_steps: getRecoverySteps("unknown"),
|
|
328
|
+
});
|
|
179
329
|
}
|
|
180
330
|
function getRecoverySteps(code) {
|
|
181
331
|
switch (code) {
|
|
@@ -220,6 +370,18 @@ function getRecoverySteps(code) {
|
|
|
220
370
|
{ command: "naive voice list", description: "Check the voice's tier/status" },
|
|
221
371
|
{ command: "# the requested tier has no clone", description: "Use the voice's native tier, or have an admin re-clone for that tier in Studio" },
|
|
222
372
|
];
|
|
373
|
+
// Transport-level failure: the gateway returned a non-JSON body (502/503/504
|
|
374
|
+
// HTML page). Idempotent GETs were already retried in the client; a failed POST
|
|
375
|
+
// (e.g. llm chat) is NOT auto-retried to avoid a double-charge — the user retries.
|
|
376
|
+
case "upstream_error":
|
|
377
|
+
return [
|
|
378
|
+
{ command: "# retry — gateway timeouts (502/504) are usually transient", description: "Re-run your command in a moment" },
|
|
379
|
+
{ command: "naive status", description: "Check API connectivity" },
|
|
380
|
+
{
|
|
381
|
+
command: 'naive report "<what failed>" --command "<the command you ran>" --kind error',
|
|
382
|
+
description: "Report it to the naive team if it persists",
|
|
383
|
+
},
|
|
384
|
+
];
|
|
223
385
|
// Genuinely-broken-on-our-side codes — these are worth reporting (unlike the
|
|
224
386
|
// self-correctable cases above). Retry first (often transient), then report.
|
|
225
387
|
case "provider_error":
|
|
@@ -231,9 +393,24 @@ function getRecoverySteps(code) {
|
|
|
231
393
|
description: "Report it to the naive team if it persists",
|
|
232
394
|
},
|
|
233
395
|
];
|
|
396
|
+
// Opaque / unexpected failures (non-JSON gateway body already mapped, or API
|
|
397
|
+
// returned an untyped error). Agents only file tickets when recovery_steps
|
|
398
|
+
// tell them to — without this, `unknown` silently becomes "check status".
|
|
399
|
+
case "unknown":
|
|
400
|
+
return [
|
|
401
|
+
{ command: "naive status", description: "Check API connectivity and auth status" },
|
|
402
|
+
{
|
|
403
|
+
command: 'naive report "<what failed — paste the error JSON>" --command "<the command you ran>" --kind error',
|
|
404
|
+
description: "File a tracked report — unexpected errors are product bugs until proven otherwise",
|
|
405
|
+
},
|
|
406
|
+
];
|
|
234
407
|
default:
|
|
235
408
|
return [
|
|
236
409
|
{ command: "naive status", description: "Check API connectivity and auth status" },
|
|
410
|
+
{
|
|
411
|
+
command: 'naive report "<what failed — paste the error JSON>" --command "<the command you ran>" --kind error',
|
|
412
|
+
description: "If this is not a credits/auth/invalid-input issue you can fix yourself, report it",
|
|
413
|
+
},
|
|
237
414
|
];
|
|
238
415
|
}
|
|
239
416
|
}
|