@wayai/cli 0.3.77 → 0.3.79
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 +20 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -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) {
|
|
@@ -20118,7 +20137,7 @@ Commands:
|
|
|
20118
20137
|
use <hub> Bind this worktree to a specific hub (UUID or folder name)
|
|
20119
20138
|
migrate Move a legacy repo to the wayai-ws/{hubs,org} layout
|
|
20120
20139
|
unbind Clear the worktree hub binding
|
|
20121
|
-
send-message Send a test message to a preview
|
|
20140
|
+
send-message Send a test message to a hub (preview or production)
|
|
20122
20141
|
conversations List or inspect conversations
|
|
20123
20142
|
analytics Show analytics summary and metrics (use \`analytics query\` for structured ClickHouse queries)
|
|
20124
20143
|
delete-history Delete your conversations on a hub (--conversation-id <id> for just one)
|