@fractary/faber-cli 1.5.15 → 1.5.18

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.
@@ -403,7 +403,7 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
403
403
  }
404
404
  }
405
405
  // Generate detailed comment for GitHub issue
406
- const planSummary = generatePlanComment(plan, issue.workflow, worktreePath, planId);
406
+ const planSummary = generatePlanComment(plan, issue.workflow, worktreePath, planId, issue.number);
407
407
  // Update GitHub issue with plan_id
408
408
  if (outputFormat === 'text') {
409
409
  console.log(chalk.gray(` → Updating GitHub issue...`));
@@ -446,7 +446,7 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
446
446
  /**
447
447
  * Generate a detailed plan comment for GitHub issue
448
448
  */
449
- function generatePlanComment(plan, workflow, worktreePath, planId) {
449
+ function generatePlanComment(plan, workflow, worktreePath, planId, issueNumber) {
450
450
  let comment = `🤖 **Workflow Plan Created**\n\n`;
451
451
  comment += `**Plan ID:** \`${planId}\`\n`;
452
452
  comment += `**Workflow:** \`${workflow}\`\n`;
@@ -486,14 +486,17 @@ function generatePlanComment(plan, workflow, worktreePath, planId) {
486
486
  }
487
487
  comment += `---\n\n`;
488
488
  comment += `### Plan Location\n\n`;
489
- comment += `\`\`\`\n${worktreePath}/.fractary/plans/${planId}.json\n\`\`\`\n\n`;
489
+ const planPath = `${worktreePath}/.fractary/plans/${planId}.json`;
490
+ comment += `| File | Path |\n`;
491
+ comment += `|------|------|\n`;
492
+ comment += `| Plan | \`${planPath}\` |\n\n`;
490
493
  comment += `### Next Steps\n\n`;
491
494
  comment += `Execute the workflow plan:\n\n`;
492
495
  comment += `\`\`\`bash\n`;
493
496
  comment += `cd ${worktreePath}\n`;
494
497
  comment += `claude\n`;
495
498
  comment += `# Then in Claude Code:\n`;
496
- comment += `/fractary-faber:workflow-run ${plan.issue_number || ''}\n`;
499
+ comment += `/fractary-faber:workflow-run ${issueNumber}\n`;
497
500
  comment += `\`\`\`\n`;
498
501
  return comment;
499
502
  }
@@ -7,6 +7,9 @@
7
7
  * All run files are stored in: .fractary/faber/runs/{run_id}/
8
8
  * - plan.json: The execution plan
9
9
  * - state.json: The workflow state
10
+ *
11
+ * Active workflow tracking: .fractary/faber/runs/.active-run-id
12
+ * - Contains the run ID of the currently active workflow in this worktree
10
13
  */
11
14
  import { Command } from 'commander';
12
15
  export declare function createRunsCommand(): Command;
@@ -1 +1 @@
1
- {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/commands/runs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,wBAAgB,iBAAiB,IAAI,OAAO,CAkH3C"}
1
+ {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/commands/runs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,wBAAgB,iBAAiB,IAAI,OAAO,CA0I3C"}
@@ -7,9 +7,12 @@
7
7
  * All run files are stored in: .fractary/faber/runs/{run_id}/
8
8
  * - plan.json: The execution plan
9
9
  * - state.json: The workflow state
10
+ *
11
+ * Active workflow tracking: .fractary/faber/runs/.active-run-id
12
+ * - Contains the run ID of the currently active workflow in this worktree
10
13
  */
11
14
  import { Command } from 'commander';
12
- import { FABER_RUNS_DIR, getRunsDir, getRunDir, getPlanPath, getStatePath, RELATIVE_PATHS, } from '@fractary/faber';
15
+ import { FABER_RUNS_DIR, ACTIVE_RUN_ID_FILE, getRunsDir, getRunDir, getPlanPath, getStatePath, getActiveRunIdPath, RELATIVE_PATHS, } from '@fractary/faber';
13
16
  export function createRunsCommand() {
14
17
  const runsCmd = new Command('runs')
15
18
  .description('Query FABER run paths');
@@ -107,6 +110,29 @@ export function createRunsCommand() {
107
110
  process.exit(1);
108
111
  }
109
112
  });
113
+ runsCmd
114
+ .command('active-run-id-path')
115
+ .description('Show active run ID file path')
116
+ .option('--relative', 'Output relative path instead of absolute')
117
+ .option('--json', 'Output as JSON')
118
+ .action((options) => {
119
+ try {
120
+ const absPath = getActiveRunIdPath();
121
+ if (options.json) {
122
+ console.log(JSON.stringify({
123
+ absolute: absPath,
124
+ relative: ACTIVE_RUN_ID_FILE,
125
+ }, null, 2));
126
+ }
127
+ else {
128
+ console.log(options.relative ? ACTIVE_RUN_ID_FILE : absPath);
129
+ }
130
+ }
131
+ catch (error) {
132
+ console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
133
+ process.exit(1);
134
+ }
135
+ });
110
136
  runsCmd
111
137
  .command('paths')
112
138
  .description('Show all path templates')
@@ -117,10 +143,11 @@ export function createRunsCommand() {
117
143
  }
118
144
  else {
119
145
  console.log('FABER Run Path Templates:');
120
- console.log(` Runs Directory: ${RELATIVE_PATHS.RUNS_DIR}`);
121
- console.log(` Run Directory: ${RELATIVE_PATHS.RUN_DIR_TEMPLATE}`);
122
- console.log(` Plan File: ${RELATIVE_PATHS.PLAN_PATH_TEMPLATE}`);
123
- console.log(` State File: ${RELATIVE_PATHS.STATE_PATH_TEMPLATE}`);
146
+ console.log(` Runs Directory: ${RELATIVE_PATHS.RUNS_DIR}`);
147
+ console.log(` Run Directory: ${RELATIVE_PATHS.RUN_DIR_TEMPLATE}`);
148
+ console.log(` Plan File: ${RELATIVE_PATHS.PLAN_PATH_TEMPLATE}`);
149
+ console.log(` State File: ${RELATIVE_PATHS.STATE_PATH_TEMPLATE}`);
150
+ console.log(` Active Run ID File: ${RELATIVE_PATHS.ACTIVE_RUN_ID_FILE}`);
124
151
  }
125
152
  });
126
153
  return runsCmd;
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import { createRunsCommand } from './commands/runs.js';
24
24
  if (process.stdout.isTTY) {
25
25
  process.stdout._handle?.setBlocking?.(true);
26
26
  }
27
- const version = '1.5.15';
27
+ const version = '1.5.18';
28
28
  /**
29
29
  * Create and configure the main CLI program
30
30
  */
@@ -10,7 +10,7 @@ interface GeneratePlanInput {
10
10
  issueDescription: string;
11
11
  issueNumber: number;
12
12
  }
13
- interface WorkflowPlan {
13
+ export interface WorkflowPlan {
14
14
  plan_id: string;
15
15
  created_by: string;
16
16
  cli_version: string;
@@ -1 +1 @@
1
- {"version":3,"file":"anthropic-client.d.ts","sourceRoot":"","sources":["../../src/lib/anthropic-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAK5D,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,UAAU,CAAM;gBAEZ,MAAM,EAAE,iBAAiB;IAiBrC;;OAEG;YACW,cAAc;IAiB5B;;OAEG;IACH,OAAO,CAAC,YAAY;IAepB;;OAEG;IACG,YAAY,CAAC,KAA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iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC;IA8DnE;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAqD/B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAgB/B;;OAEG;YACW,eAAe;CAqB9B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fractary/faber-cli",
3
- "version": "1.5.15",
3
+ "version": "1.5.18",
4
4
  "description": "FABER CLI - Command-line interface for FABER development toolkit",
5
5
  "main": "dist/index.js",
6
6
  "bin": {