Add exit codes 13 and 14 for config validation and safety blocks
The classifier only matched English usage wording, so every Chinese-language
usage error, every enterprise-selection failure, and every Zod/SyntaxError
fell through to exit 1 ("upstream failure"), while environment safety guards
were reported as exit 2 or 1. Add two semantic codes:
- 13 (validationError): well-formed command, unusable value — missing --corp,
unparseable enterprise JSON, missing required parameter, ambiguous webhook
channel selection.
- 14 (safetyBlocked): the target environment forbids the action — replaying
into production, regression outside a test tenant.
classifyCliError now recognises Chinese usage wording, enterprise-selection
phrasing, local file problems, Zod issue lists (structural, not textual) and
SyntaxError; English Usage:/Unknown-command stays 2, domain failures and
quality gates stay 1. Docs (AGENTS, cli-protocol, skill cli.md) and the exit
code assertions follow.
This commit is contained in:
1 parent
5f4906758e
commit
66eb81f3d1
12 files changed
+177
-134
No files matched your search
@@ -5,6 +5,8 @@ export {
|
||||
CliError,
|
||||
PayloadTooLargeError,
|
||||
usageError,
|
||||
validationError,
|
||||
safetyBlocked,
|
||||
confirmationRequired,
|
||||
classifyCliError
|
||||
} from "../core/errors.js";
|
||||
Reference in new issue
Block a user