workflow-agent-cli 2.22.7 → 2.22.8

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/cli/index.js CHANGED
@@ -5444,9 +5444,15 @@ async function solutionCaptureCommand(options) {
5444
5444
  p11.cancel("Solution not saved");
5445
5445
  process.exit(0);
5446
5446
  }
5447
- await store.saveSolution(pattern);
5447
+ const saveResult = await store.saveSolution(pattern);
5448
+ if (!saveResult.success) {
5449
+ console.error(chalk18.red(`
5450
+ \u2717 Failed to save solution: ${saveResult.error}
5451
+ `));
5452
+ process.exit(1);
5453
+ }
5448
5454
  console.log(chalk18.green(`
5449
- \u2713 Solution saved with ID: ${pattern.id}
5455
+ \u2713 Solution saved: .workflow/patterns/solutions/${pattern.id}.json
5450
5456
  `));
5451
5457
  } catch (error) {
5452
5458
  spinner10.stop("Analysis failed");
@@ -5795,13 +5801,35 @@ async function solutionCreateCommand(options) {
5795
5801
  name,
5796
5802
  description,
5797
5803
  category,
5798
- keywords,
5804
+ tags: keywords.map((k) => ({ name: k, category })),
5805
+ problem: {
5806
+ description,
5807
+ keywords,
5808
+ symptoms: [],
5809
+ impact: "To be documented",
5810
+ errorPatterns: []
5811
+ },
5799
5812
  implementation: {
5800
- files: [],
5813
+ files: [
5814
+ {
5815
+ path: "placeholder.ts",
5816
+ purpose: "Placeholder - add actual files with solution capture",
5817
+ role: "service",
5818
+ content: "",
5819
+ exports: [],
5820
+ imports: [],
5821
+ lineCount: 1
5822
+ }
5823
+ ],
5801
5824
  dependencies: [],
5802
5825
  devDependencies: [],
5803
5826
  envVars: []
5804
5827
  },
5828
+ architecture: {
5829
+ entryPoints: [],
5830
+ dataFlow: "To be documented",
5831
+ keyDecisions: []
5832
+ },
5805
5833
  compatibility: {
5806
5834
  framework,
5807
5835
  frameworkVersion: ">=1.0.0",
@@ -5815,13 +5843,21 @@ async function solutionCreateCommand(options) {
5815
5843
  failures: 0,
5816
5844
  successRate: 0
5817
5845
  },
5846
+ relatedPatterns: [],
5847
+ source: "manual",
5818
5848
  isPrivate: true,
5819
5849
  createdAt: now,
5820
5850
  updatedAt: now
5821
5851
  };
5822
- await store.saveSolution(solution);
5852
+ const saveResult = await store.saveSolution(solution);
5853
+ if (!saveResult.success) {
5854
+ console.error(chalk18.red(`
5855
+ \u2717 Failed to save solution: ${saveResult.error}
5856
+ `));
5857
+ process.exit(1);
5858
+ }
5823
5859
  console.log(chalk18.green("\n\u2713 Solution pattern created!\n"));
5824
- console.log(chalk18.dim(` ID: ${solution.id}`));
5860
+ console.log(chalk18.dim(` Path: .workflow/patterns/solutions/${solution.id}.json`));
5825
5861
  console.log(chalk18.dim(` Name: ${name}`));
5826
5862
  console.log(chalk18.dim(` Category: ${category}`));
5827
5863
  console.log(chalk18.dim(`
@@ -5989,7 +6025,11 @@ async function solutionImportCommand(file, options) {
5989
6025
  skipped++;
5990
6026
  continue;
5991
6027
  }
5992
- await store.saveSolution(solution);
6028
+ const saveResult = await store.saveSolution(solution);
6029
+ if (!saveResult.success) {
6030
+ console.log(chalk18.red(` \u2717 Failed to import: ${solution.name} - ${saveResult.error}`));
6031
+ continue;
6032
+ }
5993
6033
  console.log(chalk18.green(` \u2713 Imported: ${solution.name}`));
5994
6034
  imported++;
5995
6035
  }