@fractary/faber-cli 1.3.14 → 1.3.16

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.
@@ -346,6 +346,8 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
346
346
  console.log(chalk.gray(` → Plan written to ${planPath}`));
347
347
  }
348
348
  }
349
+ // Generate detailed comment for GitHub issue
350
+ const planSummary = generatePlanComment(plan, issue.workflow, worktreePath, planId);
349
351
  // Update GitHub issue with plan_id
350
352
  if (outputFormat === 'text') {
351
353
  console.log(chalk.gray(` → Updating GitHub issue...`));
@@ -353,7 +355,7 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
353
355
  try {
354
356
  await repoClient.updateIssue({
355
357
  id: issue.number.toString(),
356
- comment: `🤖 Workflow plan created: ${planId}`,
358
+ comment: planSummary,
357
359
  addLabel: 'faber:planned',
358
360
  });
359
361
  }
@@ -368,7 +370,7 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
368
370
  }
369
371
  await repoClient.updateIssue({
370
372
  id: issue.number.toString(),
371
- comment: `🤖 Workflow plan created: ${planId}`,
373
+ comment: planSummary,
372
374
  });
373
375
  }
374
376
  else {
@@ -385,6 +387,47 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
385
387
  worktree: worktreePath,
386
388
  };
387
389
  }
390
+ /**
391
+ * Generate a detailed plan comment for GitHub issue
392
+ */
393
+ function generatePlanComment(plan, workflow, worktreePath, planId) {
394
+ let comment = `🤖 **Workflow Plan Created**\n\n`;
395
+ comment += `**Plan ID:** \`${planId}\`\n`;
396
+ comment += `**Workflow:** \`${workflow}\`\n`;
397
+ // Add workflow inheritance info if available
398
+ if (plan.workflow_config?.inherits_from) {
399
+ comment += `**Inherits from:** \`${plan.workflow_config.inherits_from}\`\n`;
400
+ }
401
+ comment += `\n---\n\n`;
402
+ // Add plan summary by phase
403
+ if (plan.phases && Array.isArray(plan.phases)) {
404
+ comment += `### Workflow Phases\n\n`;
405
+ plan.phases.forEach((phase, index) => {
406
+ comment += `**${index + 1}. ${phase.name || phase.phase}**\n`;
407
+ if (phase.tasks && Array.isArray(phase.tasks)) {
408
+ phase.tasks.forEach((task) => {
409
+ comment += ` - ${task.description || task.name || task}\n`;
410
+ });
411
+ }
412
+ else if (phase.description) {
413
+ comment += ` - ${phase.description}\n`;
414
+ }
415
+ comment += `\n`;
416
+ });
417
+ }
418
+ comment += `---\n\n`;
419
+ comment += `### Plan Location\n\n`;
420
+ comment += `\`\`\`\n${worktreePath}/.fractary/plans/${planId}.json\n\`\`\`\n\n`;
421
+ comment += `### Next Steps\n\n`;
422
+ comment += `Execute the workflow plan:\n\n`;
423
+ comment += `\`\`\`bash\n`;
424
+ comment += `cd ${worktreePath}\n`;
425
+ comment += `claude\n`;
426
+ comment += `# Then in Claude Code:\n`;
427
+ comment += `/fractary-faber:workflow-run ${plan.issue_number || ''}\n`;
428
+ comment += `\`\`\`\n`;
429
+ return comment;
430
+ }
388
431
  /**
389
432
  * Get repository info from config
390
433
  */
@@ -268,8 +268,8 @@ export class GitHubAppAuth {
268
268
  }
269
269
  // Token refresh threshold (5 minutes before expiration)
270
270
  GitHubAppAuth.REFRESH_THRESHOLD_MS = 5 * 60 * 1000;
271
- // JWT validity period (10 minutes max for GitHub)
272
- GitHubAppAuth.JWT_EXPIRY_SECONDS = 600;
271
+ // JWT validity period (reduced to 5 minutes to handle clock skew)
272
+ GitHubAppAuth.JWT_EXPIRY_SECONDS = 300;
273
273
  // GitHub API base URL
274
274
  GitHubAppAuth.GITHUB_API_URL = 'https://api.github.com';
275
275
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fractary/faber-cli",
3
- "version": "1.3.14",
3
+ "version": "1.3.16",
4
4
  "description": "FABER CLI - Command-line interface for FABER development toolkit",
5
5
  "main": "dist/index.js",
6
6
  "bin": {