@fractary/faber-cli 1.5.7 → 1.5.9
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/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -5
- package/dist/lib/anthropic-client.js +2 -2
- package/package.json +3 -1
- package/schemas/plan.schema.json +230 -0
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAMH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC;;GAEG;AACH,wBAAgB,cAAc,IAAI,OAAO,CA0KxC"}
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
* Binary: fractary-faber
|
|
6
6
|
* Entry point for the FABER command-line interface
|
|
7
7
|
*/
|
|
8
|
+
// Load .env file from current working directory before anything else
|
|
9
|
+
import dotenv from 'dotenv';
|
|
10
|
+
dotenv.config();
|
|
8
11
|
import { Command } from 'commander';
|
|
9
12
|
import chalk from 'chalk';
|
|
10
13
|
import { createRunCommand, createStatusCommand, createResumeCommand, createPauseCommand, createRecoverCommand, createCleanupCommand } from './commands/workflow/index.js';
|
|
@@ -20,8 +23,7 @@ import { createAuthCommand } from './commands/auth/index.js';
|
|
|
20
23
|
if (process.stdout.isTTY) {
|
|
21
24
|
process.stdout._handle?.setBlocking?.(true);
|
|
22
25
|
}
|
|
23
|
-
|
|
24
|
-
const version = '1.5.7';
|
|
26
|
+
const version = '1.5.9';
|
|
25
27
|
/**
|
|
26
28
|
* Create and configure the main CLI program
|
|
27
29
|
*/
|
|
@@ -169,11 +171,8 @@ export function createFaberCLI() {
|
|
|
169
171
|
const isMainModule = import.meta.url === `file://${process.argv[1]}` ||
|
|
170
172
|
process.argv[1]?.endsWith('fractary-faber');
|
|
171
173
|
if (isMainModule) {
|
|
172
|
-
console.error('[DEBUG] Creating CLI program');
|
|
173
174
|
const program = createFaberCLI();
|
|
174
|
-
console.error('[DEBUG] Parsing argv');
|
|
175
175
|
program.parse(process.argv);
|
|
176
|
-
console.error('[DEBUG] Parse complete');
|
|
177
176
|
// Show help if no command provided
|
|
178
177
|
if (!process.argv.slice(2).length) {
|
|
179
178
|
program.outputHelp();
|
|
@@ -36,8 +36,8 @@ export class AnthropicClient {
|
|
|
36
36
|
return; // Already loaded
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
|
-
// Schema
|
|
40
|
-
const schemaPath = path.resolve(__dirname, '
|
|
39
|
+
// Schema bundled with CLI package (cli/schemas/plan.schema.json)
|
|
40
|
+
const schemaPath = path.resolve(__dirname, '../../schemas/plan.schema.json');
|
|
41
41
|
const schemaContent = await fs.readFile(schemaPath, 'utf8');
|
|
42
42
|
this.planSchema = JSON.parse(schemaContent);
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fractary/faber-cli",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.9",
|
|
4
4
|
"description": "FABER CLI - Command-line interface for FABER development toolkit",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"type": "module",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
|
+
"schemas",
|
|
12
13
|
"README.md",
|
|
13
14
|
"LICENSE"
|
|
14
15
|
],
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
"ajv": "^8.12.0",
|
|
42
43
|
"chalk": "^5.0.0",
|
|
43
44
|
"commander": "^12.0.0",
|
|
45
|
+
"dotenv": "^16.4.5",
|
|
44
46
|
"js-yaml": "^4.1.0"
|
|
45
47
|
},
|
|
46
48
|
"devDependencies": {
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/fractary/faber/main/plugins/faber/config/schemas/plan.schema.json",
|
|
4
|
+
"title": "FABER Plan Schema",
|
|
5
|
+
"description": "JSON Schema for FABER workflow plans generated by CLI or Claude plugin",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["plan_id", "created_by", "created_at", "workflow", "phases"],
|
|
8
|
+
"additionalProperties": true,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"format": "uri",
|
|
13
|
+
"description": "JSON Schema reference for IDE validation"
|
|
14
|
+
},
|
|
15
|
+
"plan_id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^fractary-faber-[0-9]+-[0-9]{8}-[0-9]{6}$",
|
|
18
|
+
"description": "Unique plan identifier (format: fractary-faber-{work-id}-{YYYYMMDD}-{HHMMSS})",
|
|
19
|
+
"examples": ["fractary-faber-258-20260106-143022"]
|
|
20
|
+
},
|
|
21
|
+
"created_by": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"enum": ["cli", "claude", "api"],
|
|
24
|
+
"description": "Tool that created the plan"
|
|
25
|
+
},
|
|
26
|
+
"cli_version": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
|
|
29
|
+
"description": "Version of CLI that created the plan (if created_by: cli)",
|
|
30
|
+
"examples": ["3.4.0"]
|
|
31
|
+
},
|
|
32
|
+
"created_at": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"format": "date-time",
|
|
35
|
+
"description": "ISO 8601 timestamp when plan was created"
|
|
36
|
+
},
|
|
37
|
+
"issue": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"required": ["source", "id"],
|
|
40
|
+
"description": "Issue metadata - links plan to originating work item",
|
|
41
|
+
"properties": {
|
|
42
|
+
"source": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"enum": ["github", "jira", "linear", "manual"],
|
|
45
|
+
"description": "Issue tracking system"
|
|
46
|
+
},
|
|
47
|
+
"id": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "Issue identifier (e.g., issue number)"
|
|
50
|
+
},
|
|
51
|
+
"url": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"format": "uri",
|
|
54
|
+
"description": "Full URL to issue"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"branch": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "Git branch name for this workflow (e.g., feature/258)"
|
|
61
|
+
},
|
|
62
|
+
"worktree": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "Git worktree path (e.g., ~/.claude-worktrees/fractary-myproject-258)"
|
|
65
|
+
},
|
|
66
|
+
"workflow": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "Workflow type identifier (e.g., etl, bugfix, core)"
|
|
69
|
+
},
|
|
70
|
+
"overall_complexity": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"enum": ["low", "medium", "high"],
|
|
73
|
+
"description": "Overall estimated complexity"
|
|
74
|
+
},
|
|
75
|
+
"estimated_phases": {
|
|
76
|
+
"type": "integer",
|
|
77
|
+
"minimum": 1,
|
|
78
|
+
"description": "Estimated number of phases to complete"
|
|
79
|
+
},
|
|
80
|
+
"special_considerations": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
"description": "Special notes or warnings for this workflow"
|
|
86
|
+
},
|
|
87
|
+
"phases": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"description": "Ordered list of workflow phases",
|
|
90
|
+
"items": {
|
|
91
|
+
"$ref": "#/definitions/phase"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"metadata": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"description": "Additional metadata (flexible)",
|
|
97
|
+
"properties": {
|
|
98
|
+
"org": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"description": "GitHub organization"
|
|
101
|
+
},
|
|
102
|
+
"project": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "Project/repository name"
|
|
105
|
+
},
|
|
106
|
+
"subproject": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"description": "Subproject identifier (optional)"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"autonomy": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"enum": ["supervised", "assisted", "autonomous", "guarded"],
|
|
115
|
+
"description": "Autonomy level for workflow execution"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"definitions": {
|
|
119
|
+
"phase": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"required": ["phase", "description", "steps"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"phase": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"description": "Phase identifier (e.g., frame, architect, build, evaluate, release)"
|
|
126
|
+
},
|
|
127
|
+
"description": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"description": "What this phase accomplishes"
|
|
130
|
+
},
|
|
131
|
+
"steps": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"description": "Specific steps for this phase",
|
|
134
|
+
"items": {
|
|
135
|
+
"$ref": "#/definitions/step"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"success_criteria": {
|
|
139
|
+
"type": "array",
|
|
140
|
+
"description": "Criteria to verify phase completion",
|
|
141
|
+
"items": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"complexity": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"enum": ["low", "medium", "high"],
|
|
148
|
+
"description": "Phase complexity estimate"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"step": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"required": ["action"],
|
|
155
|
+
"properties": {
|
|
156
|
+
"action": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"description": "Specific action to take"
|
|
159
|
+
},
|
|
160
|
+
"details": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"description": "Additional context or requirements"
|
|
163
|
+
},
|
|
164
|
+
"command": {
|
|
165
|
+
"type": ["string", "null"],
|
|
166
|
+
"description": "Shell command to execute (optional)"
|
|
167
|
+
},
|
|
168
|
+
"prompt": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"description": "LLM prompt for this step (optional)"
|
|
171
|
+
},
|
|
172
|
+
"artifacts": {
|
|
173
|
+
"type": "object",
|
|
174
|
+
"description": "Expected artifacts from this step"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"examples": [
|
|
180
|
+
{
|
|
181
|
+
"plan_id": "fractary-faber-258-20260106-143022",
|
|
182
|
+
"created_by": "cli",
|
|
183
|
+
"cli_version": "3.4.0",
|
|
184
|
+
"created_at": "2026-01-06T14:30:22Z",
|
|
185
|
+
"issue": {
|
|
186
|
+
"source": "github",
|
|
187
|
+
"id": "258",
|
|
188
|
+
"url": "https://github.com/fractary/myproject/issues/258"
|
|
189
|
+
},
|
|
190
|
+
"branch": "feature/258",
|
|
191
|
+
"worktree": "~/.claude-worktrees/fractary-myproject-258",
|
|
192
|
+
"workflow": "etl",
|
|
193
|
+
"overall_complexity": "medium",
|
|
194
|
+
"estimated_phases": 5,
|
|
195
|
+
"phases": [
|
|
196
|
+
{
|
|
197
|
+
"phase": "frame",
|
|
198
|
+
"description": "Understand requirements and plan approach",
|
|
199
|
+
"steps": [
|
|
200
|
+
{
|
|
201
|
+
"action": "Read issue description and extract requirements",
|
|
202
|
+
"details": "Identify data source, target format, and validation rules"
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"success_criteria": [
|
|
206
|
+
"Requirements documented",
|
|
207
|
+
"Data source identified"
|
|
208
|
+
],
|
|
209
|
+
"complexity": "low"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"phase": "architect",
|
|
213
|
+
"description": "Design ETL pipeline architecture",
|
|
214
|
+
"steps": [
|
|
215
|
+
{
|
|
216
|
+
"action": "Design data transformation logic",
|
|
217
|
+
"details": "Map source fields to target schema"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"success_criteria": [
|
|
221
|
+
"Architecture documented",
|
|
222
|
+
"Data flow mapped"
|
|
223
|
+
],
|
|
224
|
+
"complexity": "medium"
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
"autonomy": "supervised"
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
}
|