@codexa/cli 9.0.5 → 9.0.6
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/errors.ts +59 -0
- package/package.json +2 -1
package/errors.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codexa error hierarchy.
|
|
3
|
+
* Thrown instead of process.exit() on critical paths.
|
|
4
|
+
* Caught by wrapAction() in workflow.ts which prints the message and exits.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export class CodexaError extends Error {
|
|
8
|
+
readonly exitCode: number;
|
|
9
|
+
|
|
10
|
+
constructor(message: string, exitCode: number = 1) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.name = "CodexaError";
|
|
13
|
+
this.exitCode = exitCode;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface RecoverySuggestion {
|
|
18
|
+
diagnostic: string;
|
|
19
|
+
steps: string[];
|
|
20
|
+
command?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export class GateError extends CodexaError {
|
|
24
|
+
readonly gateName: string;
|
|
25
|
+
readonly resolution: string;
|
|
26
|
+
readonly recovery?: RecoverySuggestion;
|
|
27
|
+
|
|
28
|
+
constructor(reason: string, resolution: string, gateName?: string, recovery?: RecoverySuggestion) {
|
|
29
|
+
super(`BLOQUEADO: ${reason}\nResolva: ${resolution}`);
|
|
30
|
+
this.name = "GateError";
|
|
31
|
+
this.gateName = gateName || "";
|
|
32
|
+
this.resolution = resolution;
|
|
33
|
+
this.recovery = recovery;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class ValidationError extends CodexaError {
|
|
38
|
+
constructor(message: string) {
|
|
39
|
+
super(message, 2);
|
|
40
|
+
this.name = "ValidationError";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export class TaskStateError extends CodexaError {
|
|
45
|
+
constructor(message: string) {
|
|
46
|
+
super(message, 2);
|
|
47
|
+
this.name = "TaskStateError";
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export class KnowledgeBlockError extends CodexaError {
|
|
52
|
+
readonly unackedItems: any[];
|
|
53
|
+
|
|
54
|
+
constructor(message: string, unackedItems: any[]) {
|
|
55
|
+
super(message);
|
|
56
|
+
this.name = "KnowledgeBlockError";
|
|
57
|
+
this.unackedItems = unackedItems;
|
|
58
|
+
}
|
|
59
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codexa/cli",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.6",
|
|
4
4
|
"description": "Orchestrated workflow system for Claude Code - manages feature development through parallel subagents with structured phases, gates, and quality enforcement.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"workflow.ts",
|
|
11
|
+
"errors.ts",
|
|
11
12
|
"commands/",
|
|
12
13
|
"db/",
|
|
13
14
|
"gates/",
|