@fractary/faber-cli 1.3.6 → 1.3.7

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.
@@ -39,6 +39,7 @@ export function createPlanCommand() {
39
39
  * Main execution logic for plan command
40
40
  */
41
41
  async function executePlanCommand(options) {
42
+ console.error('[DEBUG] Starting executePlanCommand');
42
43
  const outputFormat = options.json ? 'json' : options.output || 'text';
43
44
  // Validate arguments
44
45
  if (!options.workId && !options.workLabel) {
@@ -48,9 +49,13 @@ async function executePlanCommand(options) {
48
49
  throw new Error('Cannot use both --work-id and --work-label at the same time');
49
50
  }
50
51
  // Initialize clients
52
+ console.error('[DEBUG] Loading config...');
51
53
  const config = await ConfigManager.load();
54
+ console.error('[DEBUG] Creating RepoClient...');
52
55
  const repoClient = await RepoClient.create(config);
56
+ console.error('[DEBUG] Creating AnthropicClient...');
53
57
  const anthropicClient = new AnthropicClient(config);
58
+ console.error('[DEBUG] Clients initialized');
54
59
  if (outputFormat === 'text') {
55
60
  console.log(chalk.blue('FABER CLI - Workflow Planning'));
56
61
  console.log(chalk.gray('═'.repeat(50)));
@@ -133,11 +138,13 @@ async function executePlanCommand(options) {
133
138
  // Step 4: Plan each issue
134
139
  if (outputFormat === 'text') {
135
140
  console.log(chalk.cyan('\n→ Planning workflows...'));
141
+ process.stdout.write(''); // Force flush
136
142
  }
137
143
  const results = [];
138
144
  for (const issue of issuesWithWorkflows) {
139
145
  if (outputFormat === 'text') {
140
146
  console.log(chalk.gray(`\n[${results.length + 1}/${issuesWithWorkflows.length}] Issue #${issue.number}: ${issue.title}`));
147
+ process.stdout.write(''); // Force flush
141
148
  }
142
149
  try {
143
150
  const result = await planSingleIssue(issue, config, repoClient, anthropicClient, options, outputFormat);
@@ -263,6 +270,7 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
263
270
  // Generate plan via Anthropic API
264
271
  if (outputFormat === 'text') {
265
272
  console.log(chalk.gray(' → Generating plan...'));
273
+ process.stdout.write(''); // Force flush
266
274
  }
267
275
  const plan = await anthropicClient.generatePlan({
268
276
  workflow: issue.workflow,
@@ -275,6 +283,7 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
275
283
  if (!options.noBranch) {
276
284
  if (outputFormat === 'text') {
277
285
  console.log(chalk.gray(` → Creating branch: ${branch}...`));
286
+ process.stdout.write(''); // Force flush
278
287
  }
279
288
  await repoClient.createBranch(branch);
280
289
  }
@@ -283,6 +292,7 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
283
292
  if (!options.noWorktree) {
284
293
  if (outputFormat === 'text') {
285
294
  console.log(chalk.gray(` → Creating worktree: ${worktree}...`));
295
+ process.stdout.write(''); // Force flush
286
296
  }
287
297
  const worktreeResult = await repoClient.createWorktree({
288
298
  workId: issue.number.toString(),
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC;;GAEG;AACH,wBAAgB,cAAc,IAAI,OAAO,CA4IxC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC;;GAEG;AACH,wBAAgB,cAAc,IAAI,OAAO,CA4IxC"}
package/dist/index.js CHANGED
@@ -15,6 +15,11 @@ import { createLogsCommand } from './commands/logs/index.js';
15
15
  import { createInitCommand } from './commands/init.js';
16
16
  import { createPlanCommand } from './commands/plan/index.js';
17
17
  import { createAuthCommand } from './commands/auth/index.js';
18
+ // Force unbuffered output to prevent buffering issues in terminals
19
+ if (process.stdout.isTTY) {
20
+ process.stdout._handle?.setBlocking?.(true);
21
+ }
22
+ console.error('[DEBUG] CLI starting, args:', process.argv);
18
23
  const version = '1.3.2';
19
24
  /**
20
25
  * Create and configure the main CLI program
@@ -139,8 +144,11 @@ export function createFaberCLI() {
139
144
  const isMainModule = import.meta.url === `file://${process.argv[1]}` ||
140
145
  process.argv[1]?.endsWith('fractary-faber');
141
146
  if (isMainModule) {
147
+ console.error('[DEBUG] Creating CLI program');
142
148
  const program = createFaberCLI();
149
+ console.error('[DEBUG] Parsing argv');
143
150
  program.parse(process.argv);
151
+ console.error('[DEBUG] Parse complete');
144
152
  // Show help if no command provided
145
153
  if (!process.argv.slice(2).length) {
146
154
  program.outputHelp();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fractary/faber-cli",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "FABER CLI - Command-line interface for FABER development toolkit",
5
5
  "main": "dist/index.js",
6
6
  "bin": {