@wairon/cli 5.1.1-dev.62 → 5.1.1-dev.63

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/index.js CHANGED
@@ -11532,7 +11532,7 @@ function defaultTargetConfig(type) {
11532
11532
  enabled: true
11533
11533
  };
11534
11534
  }
11535
- var WAIRON_VERSION = "5.1.1-dev.62";
11535
+ var WAIRON_VERSION = "5.1.1-dev.63";
11536
11536
  var GITHUB_REPO = "SYW-Apps/Waffle-AIron";
11537
11537
  var ARCHITECT_AGENT_ID = "agent-architect";
11538
11538
  var ARCHITECT_TEMPLATE_ID = "architect";
@@ -25788,21 +25788,34 @@ function syncContextFiles() {
25788
25788
  }
25789
25789
 
25790
25790
  // src/core/status.ts
25791
- function getStatusReport(options = {}) {
25791
+ var asWritten = (text) => text;
25792
+ function fillDecor(decor) {
25793
+ return {
25794
+ structure: decor?.structure ?? asWritten,
25795
+ emphasis: decor?.emphasis ?? asWritten,
25796
+ layer: decor?.layer ?? ((_kind, text) => text),
25797
+ score: decor?.score ?? ((_pct, text) => text),
25798
+ draft: decor?.draft ?? asWritten,
25799
+ present: decor?.present ?? asWritten,
25800
+ missing: decor?.missing ?? asWritten
25801
+ };
25802
+ }
25803
+ function getStatusReport(options = {}, decor) {
25804
+ const mark = fillDecor(decor);
25792
25805
  scanAllSpecs({ recursive: options.recursive ?? true });
25793
25806
  const system = loadSystemSpec();
25794
25807
  const loaderErrors = getLoaderIssues();
25795
25808
  if (loaderErrors.length > 0) {
25796
25809
  let errText = "Failed to parse specification files:\n";
25797
25810
  for (const issue2 of loaderErrors) {
25798
- const prefix = issue2.specId ? `[${issue2.specId}] ` : "";
25811
+ const prefix = issue2.specId ? mark.structure(`[${issue2.specId}] `) : "";
25799
25812
  errText += `${prefix}[${issue2.code}] ${issue2.message}
25800
25813
  `;
25801
25814
  }
25802
- return errText;
25815
+ return { text: errText, failed: true };
25803
25816
  }
25804
25817
  if (!system) {
25805
- return "L0 System specification (system.yaml) is missing.";
25818
+ return { text: "L0 System specification (system.yaml) is missing.", failed: true };
25806
25819
  }
25807
25820
  let subsystems = loadSubsystemSpecs();
25808
25821
  let components = loadComponentSpecs();
@@ -25856,7 +25869,7 @@ function getStatusReport(options = {}) {
25856
25869
  };
25857
25870
  const totalSubsystemsScore = subsystems.reduce((acc, s) => acc + getSubsystemScore(s.id), 0);
25858
25871
  const systemScore = subsystems.length > 0 ? Math.round(totalSubsystemsScore / subsystems.length) : 0;
25859
- output += `\u25CF System: ${system.name} (${systemScore}% Complete)
25872
+ output += `${mark.layer("system", "\u25CF System:")} ${mark.emphasis(system.name)} ${mark.score(systemScore, `(${systemScore}% Complete)`)}
25860
25873
  `;
25861
25874
  for (let i = 0; i < subsystems.length; i++) {
25862
25875
  const sub = subsystems[i];
@@ -25864,8 +25877,8 @@ function getStatusReport(options = {}) {
25864
25877
  const subPrefix = isLastSub ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
25865
25878
  const subIndent = isLastSub ? " " : "\u2502 ";
25866
25879
  const subScore = getSubsystemScore(sub.id);
25867
- const subStatusStr = sub.status !== "complete" ? ` [${sub.status}]` : "";
25868
- output += `${subPrefix}[Subsystem] ${sub.id}${subStatusStr} (${subScore}%)
25880
+ const subStatusStr = sub.status !== "complete" ? mark.draft(` [${sub.status}]`) : "";
25881
+ output += `${mark.structure(subPrefix)}${mark.layer("subsystem", `[Subsystem] ${sub.id}`)}${subStatusStr} ${mark.score(subScore, `(${subScore}%)`)}
25869
25882
  `;
25870
25883
  const subComps = components.filter((c) => c.subsystem === sub.id);
25871
25884
  for (let j = 0; j < subComps.length; j++) {
@@ -25874,32 +25887,32 @@ function getStatusReport(options = {}) {
25874
25887
  const compPrefix = isLastComp ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
25875
25888
  const compIndent = isLastComp ? " " : "\u2502 ";
25876
25889
  const compScore = componentScores.get(comp.id) ?? 0;
25877
- const compStatusStr = comp.status !== "complete" ? ` [${comp.status}]` : "";
25878
- output += `${subIndent}${compPrefix}[Component: ${comp.componentType}] ${comp.id}${compStatusStr} (${compScore}%)
25890
+ const compStatusStr = comp.status !== "complete" ? mark.draft(` [${comp.status}]`) : "";
25891
+ output += `${mark.structure(subIndent + compPrefix)}${mark.layer("component", `[Component: ${comp.componentType}] ${comp.id}`)}${compStatusStr} ${mark.score(compScore, `(${compScore}%)`)}
25879
25892
  `;
25880
25893
  const intf = interfaces.find((inf) => inf.component === comp.id);
25881
25894
  const impl = implementations.find((im) => intf && im.contract === intf.id);
25882
25895
  const intfPrefix = intf && impl ? "\u251C\u2500\u2500 " : "\u2514\u2500\u2500 ";
25883
25896
  if (intf) {
25884
- const intfStatusStr = intf.status !== "complete" ? ` [${intf.status}]` : "";
25885
- output += `${subIndent}${compIndent}${intfPrefix}Interface: ${intf.id}${intfStatusStr} (${intf.methods.length} methods)
25897
+ const intfStatusStr = intf.status !== "complete" ? mark.draft(` [${intf.status}]`) : "";
25898
+ output += `${mark.structure(subIndent + compIndent + intfPrefix)}${mark.layer("interface", `Interface: ${intf.id}`)}${intfStatusStr} (${intf.methods.length} methods)
25886
25899
  `;
25887
25900
  } else {
25888
- output += `${subIndent}${compIndent}${intfPrefix}Interface: Missing (-30%)
25901
+ output += `${mark.structure(subIndent + compIndent + intfPrefix)}${mark.missing("Interface: Missing (-30%)")}
25889
25902
  `;
25890
25903
  }
25891
25904
  if (impl) {
25892
- const implStatusStr = impl.status !== "complete" ? ` [${impl.status}]` : "";
25905
+ const implStatusStr = impl.status !== "complete" ? mark.draft(` [${impl.status}]`) : "";
25893
25906
  const methodsWithOwnPath = impl.methods.filter((m) => m.sourcePath);
25894
25907
  let pathStr;
25895
25908
  if (impl.sourcePath) {
25896
- pathStr = pathExists(fromProjectRoot(impl.sourcePath)) ? ` -> ${impl.sourcePath}` : ` -> ${impl.sourcePath} (File Missing!)`;
25909
+ pathStr = pathExists(fromProjectRoot(impl.sourcePath)) ? mark.present(` -> ${impl.sourcePath}`) : mark.missing(` -> ${impl.sourcePath} (File Missing!)`);
25897
25910
  } else if (methodsWithOwnPath.length > 0) {
25898
25911
  pathStr = "";
25899
25912
  } else {
25900
- pathStr = " (No source path)";
25913
+ pathStr = mark.structure(" (No source path)");
25901
25914
  }
25902
- output += `${subIndent}${compIndent}\u2514\u2500\u2500 Implementation: ${impl.id}${implStatusStr}${pathStr}
25915
+ output += `${mark.structure(subIndent + compIndent + "\u2514\u2500\u2500 ")}${mark.layer("implementation", `Implementation: ${impl.id}`)}${implStatusStr}${pathStr}
25903
25916
  `;
25904
25917
  const methodIndent = `${subIndent}${compIndent} `;
25905
25918
  for (let k = 0; k < methodsWithOwnPath.length; k++) {
@@ -25907,17 +25920,17 @@ function getStatusReport(options = {}) {
25907
25920
  const isLastMethod = k === methodsWithOwnPath.length - 1;
25908
25921
  const methodPrefix = isLastMethod ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
25909
25922
  const methodPath = method.sourcePath;
25910
- const fileMissing = !pathExists(fromProjectRoot(methodPath));
25911
- output += `${methodIndent}${methodPrefix}method ${method.name} -> ${methodPath}${fileMissing ? " (File Missing!)" : ""}
25923
+ const methodLine = pathExists(fromProjectRoot(methodPath)) ? mark.present(`method ${method.name} -> ${methodPath}`) : mark.missing(`method ${method.name} -> ${methodPath} (File Missing!)`);
25924
+ output += `${mark.structure(methodIndent + methodPrefix)}${methodLine}
25912
25925
  `;
25913
25926
  }
25914
25927
  } else {
25915
- output += `${subIndent}${compIndent}\u2514\u2500\u2500 Implementation: Missing (-30%)
25928
+ output += `${mark.structure(subIndent + compIndent + "\u2514\u2500\u2500 ")}${mark.missing("Implementation: Missing (-30%)")}
25916
25929
  `;
25917
25930
  }
25918
25931
  }
25919
25932
  }
25920
- return output;
25933
+ return { text: output, failed: false };
25921
25934
  }
25922
25935
 
25923
25936
  // src/core/index.ts