@fractary/faber-cli 1.5.25 → 1.5.26

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 CHANGED
@@ -52,7 +52,6 @@ See [GitHub App Setup Guide](../docs/github-app-setup.md) for detailed manual in
52
52
  ### 3. Initialize a FABER project
53
53
 
54
54
  ```bash
55
- fractary-faber configure
56
55
  fractary-faber config init
57
56
  fractary-faber config init --autonomy guarded
58
57
  ```
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/plan/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqDpC;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAqB3C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/plan/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsDpC;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAqB3C"}
@@ -10,6 +10,7 @@ import { RepoClient } from '../../lib/repo-client.js';
10
10
  import { ConfigManager } from '../../lib/config.js';
11
11
  import { prompt } from '../../utils/prompt.js';
12
12
  import { validateWorkIds, validateLabels, validateWorkflowName, validatePlanId, } from '../../utils/validation.js';
13
+ import { getRunDir, getPlanPath } from '@fractary/faber';
13
14
  import fs from 'fs/promises';
14
15
  import path from 'path';
15
16
  /**
@@ -391,12 +392,9 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
391
392
  if (!options.noWorktree) {
392
393
  // Validate plan ID format (prevent path traversal via malicious plan IDs)
393
394
  validatePlanId(planId);
394
- const planDir = path.join(worktreePath, '.fractary', 'plans');
395
- await fs.mkdir(planDir, { recursive: true });
396
- // Construct and validate path
397
- const planPath = path.join(planDir, `${planId}.json`);
398
- // Note: path.join automatically normalizes and prevents basic traversal,
399
- // but we validate the plan ID format as an additional layer of defense
395
+ const runDir = getRunDir(planId, worktreePath);
396
+ await fs.mkdir(runDir, { recursive: true });
397
+ const planPath = getPlanPath(planId, worktreePath);
400
398
  await fs.writeFile(planPath, JSON.stringify(plan, null, 2));
401
399
  if (outputFormat === 'text') {
402
400
  console.log(chalk.gray(` → Plan written to ${planPath}`));
@@ -486,7 +484,7 @@ function generatePlanComment(plan, workflow, worktreePath, planId, issueNumber)
486
484
  }
487
485
  comment += `---\n\n`;
488
486
  comment += `### Plan Location\n\n`;
489
- const planPath = `${worktreePath}/.fractary/plans/${planId}.json`;
487
+ const planPath = `${worktreePath}/.fractary/faber/runs/${planId}/plan.json`;
490
488
  comment += `| File | Path |\n`;
491
489
  comment += `|------|------|\n`;
492
490
  comment += `| Plan | \`${planPath}\` |\n\n`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fractary/faber-cli",
3
- "version": "1.5.25",
3
+ "version": "1.5.26",
4
4
  "description": "FABER CLI - Command-line interface for FABER development toolkit",
5
5
  "main": "dist/index.js",
6
6
  "bin": {