@wayai/cli 0.3.78 → 0.3.80

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
@@ -7415,7 +7415,7 @@ var init_dist = __esm({
7415
7415
  });
7416
7416
  reportSourceSchema = external_exports.enum(["sentry", "cli", "review", "security_audit"]);
7417
7417
  intakeReportSourceSchema = external_exports.enum(["cli", "review", "security_audit"]);
7418
- reportClassificationSchema = external_exports.enum(["bug", "flaky_test", "security"]);
7418
+ reportClassificationSchema = external_exports.enum(["bug", "flaky_test", "security", "enhancement"]);
7419
7419
  reportStatusSchema = external_exports.enum([
7420
7420
  "pending",
7421
7421
  "grouped",
@@ -10193,6 +10193,9 @@ function buildEvalYamlObject(evalEntry, slug) {
10193
10193
  if (evalEntry.history && evalEntry.history.length > 0) {
10194
10194
  out.history = evalEntry.history;
10195
10195
  }
10196
+ if (evalEntry.variables && Object.keys(evalEntry.variables).length > 0) {
10197
+ out.variables = evalEntry.variables;
10198
+ }
10196
10199
  out.input = evalEntry.input;
10197
10200
  out.expected = evalEntry.expected;
10198
10201
  if (evalEntry.evaluator_instructions) {
@@ -10389,6 +10392,9 @@ function buildJourneyYamlObject(journeyEntry, slug) {
10389
10392
  if (journeyEntry.evaluator_instructions) {
10390
10393
  out.evaluator_instructions = journeyEntry.evaluator_instructions;
10391
10394
  }
10395
+ if (journeyEntry.variables && Object.keys(journeyEntry.variables).length > 0) {
10396
+ out.variables = journeyEntry.variables;
10397
+ }
10392
10398
  if (journeyEntry.transcript && journeyEntry.transcript.length > 0) {
10393
10399
  out.transcript = journeyEntry.transcript;
10394
10400
  }
@@ -10665,8 +10671,19 @@ function parseEvalYaml(filePath, relPath, setName) {
10665
10671
  if (typeof data.evaluator_instructions === "string") {
10666
10672
  evalEntry.evaluator_instructions = data.evaluator_instructions;
10667
10673
  }
10674
+ const variables = parseVariablesMap(data.variables, `Eval "${evalName}" in ${relPath}`);
10675
+ if (variables) evalEntry.variables = variables;
10668
10676
  return evalEntry;
10669
10677
  }
10678
+ function parseVariablesMap(raw, label) {
10679
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) return void 0;
10680
+ const vars = raw;
10681
+ if (Object.keys(vars).length === 0) return void 0;
10682
+ if (!Object.values(vars).every((v) => Array.isArray(v))) {
10683
+ throw expected(`${label}: "variables" must be a map of arrays (variables.<name>: [ ... ]).`);
10684
+ }
10685
+ return vars;
10686
+ }
10670
10687
  function scanJourneyYamlFiles(hubFolder) {
10671
10688
  const journeysDir = path12.join(hubFolder, "journeys");
10672
10689
  if (!fs10.existsSync(journeysDir)) return [];
@@ -10735,6 +10752,8 @@ function parseJourneyYaml(filePath, relPath) {
10735
10752
  if (data.step_config && typeof data.step_config === "object" && !Array.isArray(data.step_config)) {
10736
10753
  journeyEntry.step_config = data.step_config;
10737
10754
  }
10755
+ const variables = parseVariablesMap(data.variables, `Journey "${journeyName}" in ${relPath}`);
10756
+ if (variables) journeyEntry.variables = variables;
10738
10757
  return journeyEntry;
10739
10758
  }
10740
10759
  function scanAgentYamlFiles(hubFolder) {
@@ -13927,7 +13946,7 @@ var init_contracts = __esm({
13927
13946
  });
13928
13947
  reportSourceSchema2 = external_exports.enum(["sentry", "cli", "review", "security_audit"]);
13929
13948
  intakeReportSourceSchema2 = external_exports.enum(["cli", "review", "security_audit"]);
13930
- reportClassificationSchema2 = external_exports.enum(["bug", "flaky_test", "security"]);
13949
+ reportClassificationSchema2 = external_exports.enum(["bug", "flaky_test", "security", "enhancement"]);
13931
13950
  reportStatusSchema2 = external_exports.enum([
13932
13951
  "pending",
13933
13952
  "grouped",
@@ -19370,7 +19389,7 @@ async function reportCreateCommand(args2) {
19370
19389
  console.error("");
19371
19390
  console.error("Optional:");
19372
19391
  console.error(" --source <value> Origin: cli (default) | review | security_audit");
19373
- console.error(" --classification <value> Nature: bug (default) | flaky_test | security");
19392
+ console.error(" --classification <value> Nature: bug (default) | flaky_test | security | enhancement");
19374
19393
  console.error(' --dedup-key <text> Stable dedup key (e.g. "<file>::<test>")');
19375
19394
  console.error(" --hub <uuid> Hub ID (optional context for the bug report)");
19376
19395
  console.error(" --conversation <uuid> Conversation ID");