workflow-agent-cli 2.14.0 → 2.15.0

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
@@ -5739,11 +5739,63 @@ async function learnListCommand(options) {
5739
5739
  const stats = await store.getStats();
5740
5740
  const totalPatterns = stats.totalFixes + stats.totalBlueprints;
5741
5741
  const totalDeprecated = stats.deprecatedFixes + stats.deprecatedBlueprints;
5742
+ const totalInvalid = stats.invalidFixes + stats.invalidBlueprints + stats.invalidSolutions;
5742
5743
  console.log(chalk16.dim("\u2501".repeat(40)));
5743
5744
  console.log(chalk16.dim(`Total: ${totalPatterns} patterns`));
5744
5745
  console.log(chalk16.dim(` Fix Patterns: ${stats.totalFixes}`));
5745
5746
  console.log(chalk16.dim(` Blueprints: ${stats.totalBlueprints}`));
5746
5747
  console.log(chalk16.dim(` Deprecated: ${totalDeprecated}`));
5748
+ if (totalInvalid > 0) {
5749
+ console.log(
5750
+ chalk16.yellow(
5751
+ `
5752
+ \u26A0\uFE0F ${totalInvalid} pattern(s) failed schema validation and were skipped:`
5753
+ )
5754
+ );
5755
+ console.log(
5756
+ chalk16.dim(` Fix patterns: ${stats.invalidFixes} invalid`)
5757
+ );
5758
+ console.log(
5759
+ chalk16.dim(` Blueprints: ${stats.invalidBlueprints} invalid`)
5760
+ );
5761
+ console.log(
5762
+ chalk16.dim(` Solutions: ${stats.invalidSolutions} invalid`)
5763
+ );
5764
+ const validationErrors = store.getValidationErrors();
5765
+ if (validationErrors.length > 0) {
5766
+ console.log(chalk16.yellow("\n Validation errors:"));
5767
+ for (const err of validationErrors.slice(0, 5)) {
5768
+ console.log(chalk16.dim(` \u2022 ${err.file}: ${err.error}`));
5769
+ if (err.details && err.details.length > 0) {
5770
+ for (const detail of err.details.slice(0, 3)) {
5771
+ console.log(chalk16.dim(` - ${detail}`));
5772
+ }
5773
+ if (err.details.length > 3) {
5774
+ console.log(
5775
+ chalk16.dim(` ... and ${err.details.length - 3} more`)
5776
+ );
5777
+ }
5778
+ }
5779
+ }
5780
+ if (validationErrors.length > 5) {
5781
+ console.log(
5782
+ chalk16.dim(
5783
+ ` ... and ${validationErrors.length - 5} more errors`
5784
+ )
5785
+ );
5786
+ }
5787
+ }
5788
+ console.log(
5789
+ chalk16.dim(
5790
+ "\n Tip: Invalid patterns may be missing required fields. Use the PatternStore API"
5791
+ )
5792
+ );
5793
+ console.log(
5794
+ chalk16.dim(
5795
+ " to create patterns instead of writing JSON files directly."
5796
+ )
5797
+ );
5798
+ }
5747
5799
  console.log("");
5748
5800
  }
5749
5801
  async function learnApplyCommand(patternId, options) {