@wayai/cli 0.3.267 → 0.3.269
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 +57 -44
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7334,10 +7334,10 @@ var init_chunk_S5SVBLGT = __esm({
|
|
|
7334
7334
|
}
|
|
7335
7335
|
});
|
|
7336
7336
|
|
|
7337
|
-
// ../../packages/core/dist/chunk-
|
|
7338
|
-
var PERSON_LINKS_MAX, PERSON_DENY_PAGE_MAX, personParam, personLinkParam, deniedPersonParam, listDeniedPersonsQuery;
|
|
7339
|
-
var
|
|
7340
|
-
"../../packages/core/dist/chunk-
|
|
7337
|
+
// ../../packages/core/dist/chunk-YNK5TWWS.js
|
|
7338
|
+
var PERSON_LINKS_MAX, PERSON_DENY_PAGE_MAX, personParam, personLinkParam, deniedPersonParam, listDeniedPersonsQuery, conversationCustomerPersonParam;
|
|
7339
|
+
var init_chunk_YNK5TWWS = __esm({
|
|
7340
|
+
"../../packages/core/dist/chunk-YNK5TWWS.js"() {
|
|
7341
7341
|
"use strict";
|
|
7342
7342
|
init_chunk_2YEGUQR7();
|
|
7343
7343
|
init_chunk_S5SVBLGT();
|
|
@@ -7357,6 +7357,10 @@ var init_chunk_L4SFHNKQ = __esm({
|
|
|
7357
7357
|
cursor: personIdSchema.optional(),
|
|
7358
7358
|
limit: external_exports.coerce.number().int().min(1).max(PERSON_DENY_PAGE_MAX).default(50)
|
|
7359
7359
|
});
|
|
7360
|
+
conversationCustomerPersonParam = external_exports.object({
|
|
7361
|
+
hubId: external_exports.string().uuid(),
|
|
7362
|
+
conversationId: external_exports.string().uuid()
|
|
7363
|
+
});
|
|
7360
7364
|
}
|
|
7361
7365
|
});
|
|
7362
7366
|
|
|
@@ -12768,7 +12772,7 @@ var init_chunk_2ISUBJG7 = __esm({
|
|
|
12768
12772
|
}
|
|
12769
12773
|
});
|
|
12770
12774
|
|
|
12771
|
-
// ../../packages/core/dist/chunk-
|
|
12775
|
+
// ../../packages/core/dist/chunk-ICE6SQZO.js
|
|
12772
12776
|
function describeRole(role) {
|
|
12773
12777
|
if (typeof role === "string") {
|
|
12774
12778
|
return JSON.stringify(role.length > ROLE_ECHO_MAX ? `${role.slice(0, ROLE_ECHO_MAX)}\u2026` : role);
|
|
@@ -12859,26 +12863,16 @@ function evalInitialStateError(input) {
|
|
|
12859
12863
|
function evalPersonIssue(input) {
|
|
12860
12864
|
const record = asEvalInputRecord(input);
|
|
12861
12865
|
if (record === null) return null;
|
|
12866
|
+
if (record.customer_contact_id !== void 0) return { key: "customer_contact_id", message: EVAL_PERSON_ALIAS_REFUSED };
|
|
12862
12867
|
const person = record.person;
|
|
12863
|
-
|
|
12864
|
-
|
|
12865
|
-
|
|
12866
|
-
if (declaresPerson && declaresAlias) {
|
|
12867
|
-
return { key: "person", message: "declare person or customer_contact_id (its deprecated alias), not both" };
|
|
12868
|
-
}
|
|
12869
|
-
if (declaresPerson) {
|
|
12870
|
-
if (Array.isArray(person) && person.includes("*")) {
|
|
12871
|
-
return { key: "person", message: 'person never holds "*": declare the person ids the runs are for' };
|
|
12872
|
-
}
|
|
12873
|
-
return evalPersonSchema.safeParse(person).success ? null : {
|
|
12874
|
-
key: "person",
|
|
12875
|
-
message: `person must be a list of 1 to ${EVAL_PERSON_MAX} person ids (prs_\u2026) or contact ids (lowercase UUIDs), each once`
|
|
12876
|
-
};
|
|
12868
|
+
if (person === void 0 || person === null) return null;
|
|
12869
|
+
if (Array.isArray(person) && person.includes("*")) {
|
|
12870
|
+
return { key: "person", message: 'person never holds "*": declare the person ids the runs are for' };
|
|
12877
12871
|
}
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12872
|
+
return evalPersonSchema.safeParse(person).success ? null : {
|
|
12873
|
+
key: "person",
|
|
12874
|
+
message: `person must be a list of 1 to ${EVAL_PERSON_MAX} person ids (prs_\u2026) or contact ids (lowercase UUIDs), each once`
|
|
12875
|
+
};
|
|
12882
12876
|
}
|
|
12883
12877
|
function evalNameError(name) {
|
|
12884
12878
|
if (name === void 0) return null;
|
|
@@ -12956,9 +12950,9 @@ function unprovenRunCount(counts) {
|
|
|
12956
12950
|
function terminalRunCount(counts) {
|
|
12957
12951
|
return counts.successful_runs + counts.failed_runs;
|
|
12958
12952
|
}
|
|
12959
|
-
var evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, EVAL_FIXTURE_NAME_MAX_LENGTH, evalFixtureOverrideSchema, runSessionQuery, runJourneyQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, EVAL_INITIAL_STATE_SCOPES, MAX_INITIAL_STATE_ENTRIES, evalInitialStateEntry, EVAL_PERSON_MAX, evalPersonSchema,
|
|
12960
|
-
var
|
|
12961
|
-
"../../packages/core/dist/chunk-
|
|
12953
|
+
var evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, EVAL_FIXTURE_NAME_MAX_LENGTH, evalFixtureOverrideSchema, runSessionQuery, runJourneyQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, EVAL_INITIAL_STATE_SCOPES, MAX_INITIAL_STATE_ENTRIES, evalInitialStateEntry, EVAL_PERSON_MAX, evalPersonSchema, EVAL_PERSON_ALIAS_RETIRED, EVAL_PERSON_ALIAS_REFUSED, evalBody, EVAL_LIST_MAX_LIMIT, evalListLimit, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, EVAL_MAX_SELECTED_SCENARIOS, evalScenarioSelectionEntrySchema, evalScenarioSelectionSchema, sessionConfigSchema, createSessionBody, getSessionsQuery, getSessionResultsQuery, getSessionRunsQuery, evalAnalyticsQuery, getSessionCostQuery, compareSessionsQuery, evalsSqlBody, evalsSqlSchemaQuery, exportResultsQuery, validateEvalBody, hubAgentsQuery, createScenarioSetBody, updateScenarioSetBody, scenarioSetsHubQuery, createScenarioFromConversationBody, createJourneyFromConversationBody, evalAttachmentRef, turnMayCarryAttachments, ATTACHMENTS_USER_ONLY_MESSAGE, journeyIdParam, journeyToolCallSchema, journeyTurnSchema, journeyStepOverrideSchema, fixtureField, createJourneyBody, updateJourneyBody, evalSessionConfigResponseSchema, evalSessionResponseSchema, evalSessionListConfigSchema, evalSessionListItemSchema, seedReleaseStatusSchema, EVAL_SESSION_NOT_QUIESCENT;
|
|
12954
|
+
var init_chunk_ICE6SQZO = __esm({
|
|
12955
|
+
"../../packages/core/dist/chunk-ICE6SQZO.js"() {
|
|
12962
12956
|
"use strict";
|
|
12963
12957
|
init_chunk_2YEGUQR7();
|
|
12964
12958
|
init_chunk_4D6K4P4K();
|
|
@@ -12999,7 +12993,8 @@ var init_chunk_TUTMG367 = __esm({
|
|
|
12999
12993
|
});
|
|
13000
12994
|
EVAL_PERSON_MAX = REKOR_MAX_PERSON_IDS;
|
|
13001
12995
|
evalPersonSchema = external_exports.array(personIdSchema).min(1).max(EVAL_PERSON_MAX).refine((ids) => new Set(ids).size === ids.length, { message: "Each person id is declared once" });
|
|
13002
|
-
|
|
12996
|
+
EVAL_PERSON_ALIAS_RETIRED = "customer_contact_id is no longer accepted: declare person: [<id>] instead";
|
|
12997
|
+
EVAL_PERSON_ALIAS_REFUSED = `${EVAL_PERSON_ALIAS_RETIRED} (@wayai/cli 0.3.265 or later reads it)`;
|
|
13003
12998
|
evalBody = external_exports.object({
|
|
13004
12999
|
eval: external_exports.record(external_exports.unknown())
|
|
13005
13000
|
}).superRefine(refineEvalName).superRefine(refineEvalMessageTextRole).superRefine(refineEvalAttachments).superRefine(refineEvalInitialState).superRefine(refineEvalPerson);
|
|
@@ -14030,7 +14025,7 @@ var init_chunk_TU4Y4MEX = __esm({
|
|
|
14030
14025
|
}
|
|
14031
14026
|
});
|
|
14032
14027
|
|
|
14033
|
-
// ../../packages/core/dist/chunk-
|
|
14028
|
+
// ../../packages/core/dist/chunk-KY3JYP4A.js
|
|
14034
14029
|
function refineHubAsCodeCustomTools(config, ctx) {
|
|
14035
14030
|
const agents = config.agents;
|
|
14036
14031
|
if (!Array.isArray(agents)) return;
|
|
@@ -14640,12 +14635,12 @@ function skillSectionsAsResources(scope) {
|
|
|
14640
14635
|
};
|
|
14641
14636
|
}
|
|
14642
14637
|
var MAX_10MB_BASE64_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_CARRIERS, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES, MAX_RESOURCE_ENCODED_BYTES, MAX_HUB_AS_CODE_RESOURCES, MAX_HUB_AS_CODE_RESOURCE_FILES, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES, MAX_CI_CONFIG_BODY_BYTES, MAX_HUB_AS_CODE_PAGE_MANIFEST_CHARS, hubAsCodePagesSchema, MAX_CALL_OPENING_CARRIERS, MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, boundedHubAsCodeResourcesSchema, isPlainObject, MIN_SKILLS_LAYOUT_CLI, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, CI_APPLY_ENTITY_KINDS, CI_APPLY_OPERATIONS, ciApplyErrorBaseSchema, ciApplyErrorSchema, ciSyncCountSchema, ciSyncChangesSchema, ciSyncWarningSchema, ciSyncResponseSchema;
|
|
14643
|
-
var
|
|
14644
|
-
"../../packages/core/dist/chunk-
|
|
14638
|
+
var init_chunk_KY3JYP4A = __esm({
|
|
14639
|
+
"../../packages/core/dist/chunk-KY3JYP4A.js"() {
|
|
14645
14640
|
"use strict";
|
|
14646
14641
|
init_chunk_SARVKRZB();
|
|
14647
14642
|
init_chunk_HRKVCI5A();
|
|
14648
|
-
|
|
14643
|
+
init_chunk_ICE6SQZO();
|
|
14649
14644
|
init_chunk_LBDH7LCG();
|
|
14650
14645
|
init_chunk_4LXDRTO4();
|
|
14651
14646
|
init_chunk_TU4Y4MEX();
|
|
@@ -16200,7 +16195,7 @@ var init_contracts = __esm({
|
|
|
16200
16195
|
init_chunk_VEERWOZ6();
|
|
16201
16196
|
init_chunk_ZXK6N2HN();
|
|
16202
16197
|
init_chunk_Y7CFCYX4();
|
|
16203
|
-
|
|
16198
|
+
init_chunk_YNK5TWWS();
|
|
16204
16199
|
init_chunk_YUZFHVB2();
|
|
16205
16200
|
init_chunk_I3O2RACG();
|
|
16206
16201
|
init_chunk_34LE6P7E();
|
|
@@ -16228,10 +16223,10 @@ var init_contracts = __esm({
|
|
|
16228
16223
|
init_chunk_E4DIIOOE();
|
|
16229
16224
|
init_chunk_7CYHPF35();
|
|
16230
16225
|
init_chunk_BPCNB5RT();
|
|
16231
|
-
|
|
16226
|
+
init_chunk_KY3JYP4A();
|
|
16232
16227
|
init_chunk_SARVKRZB();
|
|
16233
16228
|
init_chunk_HRKVCI5A();
|
|
16234
|
-
|
|
16229
|
+
init_chunk_ICE6SQZO();
|
|
16235
16230
|
init_chunk_2YEGUQR7();
|
|
16236
16231
|
init_chunk_4D6K4P4K();
|
|
16237
16232
|
init_chunk_LBDH7LCG();
|
|
@@ -21549,6 +21544,23 @@ var init_pages2 = __esm({
|
|
|
21549
21544
|
}
|
|
21550
21545
|
});
|
|
21551
21546
|
|
|
21547
|
+
// ../../packages/core/dist/contracts/evals.js
|
|
21548
|
+
var init_evals = __esm({
|
|
21549
|
+
"../../packages/core/dist/contracts/evals.js"() {
|
|
21550
|
+
"use strict";
|
|
21551
|
+
init_chunk_ICE6SQZO();
|
|
21552
|
+
init_chunk_2YEGUQR7();
|
|
21553
|
+
init_chunk_4D6K4P4K();
|
|
21554
|
+
init_chunk_4LXDRTO4();
|
|
21555
|
+
init_chunk_WTOA3ANF();
|
|
21556
|
+
init_chunk_KB5RK3RP();
|
|
21557
|
+
init_chunk_2ISUBJG7();
|
|
21558
|
+
init_chunk_HZ6CADSY();
|
|
21559
|
+
init_chunk_MIWZOSPI();
|
|
21560
|
+
init_chunk_YROEDMVZ();
|
|
21561
|
+
}
|
|
21562
|
+
});
|
|
21563
|
+
|
|
21552
21564
|
// src/lib/parser.ts
|
|
21553
21565
|
import * as fs14 from "fs";
|
|
21554
21566
|
import * as path17 from "path";
|
|
@@ -21825,23 +21837,22 @@ function parseVariablesMap(raw, label2) {
|
|
|
21825
21837
|
}
|
|
21826
21838
|
return vars;
|
|
21827
21839
|
}
|
|
21828
|
-
function parseFixtureField(raw, label2, key
|
|
21840
|
+
function parseFixtureField(raw, label2, key) {
|
|
21829
21841
|
if (raw === void 0 || raw === null) return void 0;
|
|
21830
21842
|
if (typeof raw !== "string") {
|
|
21831
|
-
throw expected(`${label2}: "${key}" must be a string (
|
|
21843
|
+
throw expected(`${label2}: "${key}" must be a string (the Rekor fixture name).`);
|
|
21832
21844
|
}
|
|
21833
21845
|
const trimmed = raw.trim();
|
|
21834
21846
|
return trimmed.length > 0 ? trimmed : void 0;
|
|
21835
21847
|
}
|
|
21836
21848
|
function parsePersonFields(data, label2) {
|
|
21837
|
-
|
|
21838
|
-
|
|
21849
|
+
if (data.customer_contact_id !== void 0) {
|
|
21850
|
+
throw expected(`${label2}: ${EVAL_PERSON_ALIAS_RETIRED}.`);
|
|
21851
|
+
}
|
|
21852
|
+
if (data.person === void 0 || data.person === null) return {};
|
|
21839
21853
|
if (!Array.isArray(data.person) || !data.person.every((id) => typeof id === "string")) {
|
|
21840
21854
|
throw expected(`${label2}: "person" must be a list of ids (person ids or contact ids).`);
|
|
21841
21855
|
}
|
|
21842
|
-
if (alias) {
|
|
21843
|
-
throw expected(`${label2}: declare "person" or "customer_contact_id" (its deprecated alias), not both.`);
|
|
21844
|
-
}
|
|
21845
21856
|
return { person: data.person };
|
|
21846
21857
|
}
|
|
21847
21858
|
function scanJourneyYamlFiles(hubFolder, bytesByHash, unreadable) {
|
|
@@ -22028,6 +22039,7 @@ var init_parser = __esm({
|
|
|
22028
22039
|
init_eval_attachments();
|
|
22029
22040
|
init_call_openings();
|
|
22030
22041
|
init_pages2();
|
|
22042
|
+
init_evals();
|
|
22031
22043
|
init_expected();
|
|
22032
22044
|
init_fs_safety();
|
|
22033
22045
|
NOT_A_YAML_OBJECT = "not a YAML object";
|
|
@@ -23508,6 +23520,7 @@ function historyQuery(opts) {
|
|
|
23508
23520
|
if (opts.limit) qs.set("limit", opts.limit);
|
|
23509
23521
|
if (opts.offset) qs.set("offset", opts.offset);
|
|
23510
23522
|
if (opts.diff) qs.set("diff", "true");
|
|
23523
|
+
if (opts.recordType) qs.set("record_type", opts.recordType);
|
|
23511
23524
|
const q = qs.toString();
|
|
23512
23525
|
return q ? `?${q}` : "";
|
|
23513
23526
|
}
|
|
@@ -30757,7 +30770,7 @@ async function evalsSqlSubcommand(args2) {
|
|
|
30757
30770
|
}
|
|
30758
30771
|
printQueryRows(result.data);
|
|
30759
30772
|
}
|
|
30760
|
-
var
|
|
30773
|
+
var init_evals2 = __esm({
|
|
30761
30774
|
"src/commands/evals.ts"() {
|
|
30762
30775
|
"use strict";
|
|
30763
30776
|
init_auth();
|
|
@@ -41757,7 +41770,7 @@ function buildRecordsCommand() {
|
|
|
41757
41770
|
});
|
|
41758
41771
|
records.command("history <id>").description(
|
|
41759
41772
|
"View the change history (audit log) for a record \u2014 every version, who changed it, and when"
|
|
41760
|
-
).option("--limit <n>", "Max results").option("--offset <n>", "Pagination offset").option("--diff", "Include field-level diffs between versions").action(async function(id, opts) {
|
|
41773
|
+
).option("--limit <n>", "Max results").option("--offset <n>", "Pagination offset").option("--diff", "Include field-level diffs between versions").option("--record-type <type>", "The record's record_type (required when records of several types share the id)").action(async function(id, opts) {
|
|
41761
41774
|
const base = pathSegment(requireBase(this), "--base");
|
|
41762
41775
|
const client = await createDataClient();
|
|
41763
41776
|
printOutput(
|
|
@@ -42683,7 +42696,7 @@ async function main() {
|
|
|
42683
42696
|
break;
|
|
42684
42697
|
}
|
|
42685
42698
|
case "evals": {
|
|
42686
|
-
const { evalsCommand: evalsCommand2 } = await Promise.resolve().then(() => (
|
|
42699
|
+
const { evalsCommand: evalsCommand2 } = await Promise.resolve().then(() => (init_evals2(), evals_exports));
|
|
42687
42700
|
await evalsCommand2(args);
|
|
42688
42701
|
break;
|
|
42689
42702
|
}
|