@wayai/cli 0.3.267 → 0.3.268
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 +46 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12768,7 +12768,7 @@ var init_chunk_2ISUBJG7 = __esm({
|
|
|
12768
12768
|
}
|
|
12769
12769
|
});
|
|
12770
12770
|
|
|
12771
|
-
// ../../packages/core/dist/chunk-
|
|
12771
|
+
// ../../packages/core/dist/chunk-ICE6SQZO.js
|
|
12772
12772
|
function describeRole(role) {
|
|
12773
12773
|
if (typeof role === "string") {
|
|
12774
12774
|
return JSON.stringify(role.length > ROLE_ECHO_MAX ? `${role.slice(0, ROLE_ECHO_MAX)}\u2026` : role);
|
|
@@ -12859,26 +12859,16 @@ function evalInitialStateError(input) {
|
|
|
12859
12859
|
function evalPersonIssue(input) {
|
|
12860
12860
|
const record = asEvalInputRecord(input);
|
|
12861
12861
|
if (record === null) return null;
|
|
12862
|
+
if (record.customer_contact_id !== void 0) return { key: "customer_contact_id", message: EVAL_PERSON_ALIAS_REFUSED };
|
|
12862
12863
|
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
|
-
};
|
|
12877
|
-
}
|
|
12878
|
-
if (declaresAlias && !evalCustomerContactIdAliasSchema.safeParse(alias).success) {
|
|
12879
|
-
return { key: "customer_contact_id", message: "customer_contact_id must be a contact id (a UUID) or a person id (prs_\u2026)" };
|
|
12864
|
+
if (person === void 0 || person === null) return null;
|
|
12865
|
+
if (Array.isArray(person) && person.includes("*")) {
|
|
12866
|
+
return { key: "person", message: 'person never holds "*": declare the person ids the runs are for' };
|
|
12880
12867
|
}
|
|
12881
|
-
return null
|
|
12868
|
+
return evalPersonSchema.safeParse(person).success ? null : {
|
|
12869
|
+
key: "person",
|
|
12870
|
+
message: `person must be a list of 1 to ${EVAL_PERSON_MAX} person ids (prs_\u2026) or contact ids (lowercase UUIDs), each once`
|
|
12871
|
+
};
|
|
12882
12872
|
}
|
|
12883
12873
|
function evalNameError(name) {
|
|
12884
12874
|
if (name === void 0) return null;
|
|
@@ -12956,9 +12946,9 @@ function unprovenRunCount(counts) {
|
|
|
12956
12946
|
function terminalRunCount(counts) {
|
|
12957
12947
|
return counts.successful_runs + counts.failed_runs;
|
|
12958
12948
|
}
|
|
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-
|
|
12949
|
+
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;
|
|
12950
|
+
var init_chunk_ICE6SQZO = __esm({
|
|
12951
|
+
"../../packages/core/dist/chunk-ICE6SQZO.js"() {
|
|
12962
12952
|
"use strict";
|
|
12963
12953
|
init_chunk_2YEGUQR7();
|
|
12964
12954
|
init_chunk_4D6K4P4K();
|
|
@@ -12999,7 +12989,8 @@ var init_chunk_TUTMG367 = __esm({
|
|
|
12999
12989
|
});
|
|
13000
12990
|
EVAL_PERSON_MAX = REKOR_MAX_PERSON_IDS;
|
|
13001
12991
|
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
|
-
|
|
12992
|
+
EVAL_PERSON_ALIAS_RETIRED = "customer_contact_id is no longer accepted: declare person: [<id>] instead";
|
|
12993
|
+
EVAL_PERSON_ALIAS_REFUSED = `${EVAL_PERSON_ALIAS_RETIRED} (@wayai/cli 0.3.265 or later reads it)`;
|
|
13003
12994
|
evalBody = external_exports.object({
|
|
13004
12995
|
eval: external_exports.record(external_exports.unknown())
|
|
13005
12996
|
}).superRefine(refineEvalName).superRefine(refineEvalMessageTextRole).superRefine(refineEvalAttachments).superRefine(refineEvalInitialState).superRefine(refineEvalPerson);
|
|
@@ -14030,7 +14021,7 @@ var init_chunk_TU4Y4MEX = __esm({
|
|
|
14030
14021
|
}
|
|
14031
14022
|
});
|
|
14032
14023
|
|
|
14033
|
-
// ../../packages/core/dist/chunk-
|
|
14024
|
+
// ../../packages/core/dist/chunk-KY3JYP4A.js
|
|
14034
14025
|
function refineHubAsCodeCustomTools(config, ctx) {
|
|
14035
14026
|
const agents = config.agents;
|
|
14036
14027
|
if (!Array.isArray(agents)) return;
|
|
@@ -14640,12 +14631,12 @@ function skillSectionsAsResources(scope) {
|
|
|
14640
14631
|
};
|
|
14641
14632
|
}
|
|
14642
14633
|
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-
|
|
14634
|
+
var init_chunk_KY3JYP4A = __esm({
|
|
14635
|
+
"../../packages/core/dist/chunk-KY3JYP4A.js"() {
|
|
14645
14636
|
"use strict";
|
|
14646
14637
|
init_chunk_SARVKRZB();
|
|
14647
14638
|
init_chunk_HRKVCI5A();
|
|
14648
|
-
|
|
14639
|
+
init_chunk_ICE6SQZO();
|
|
14649
14640
|
init_chunk_LBDH7LCG();
|
|
14650
14641
|
init_chunk_4LXDRTO4();
|
|
14651
14642
|
init_chunk_TU4Y4MEX();
|
|
@@ -16228,10 +16219,10 @@ var init_contracts = __esm({
|
|
|
16228
16219
|
init_chunk_E4DIIOOE();
|
|
16229
16220
|
init_chunk_7CYHPF35();
|
|
16230
16221
|
init_chunk_BPCNB5RT();
|
|
16231
|
-
|
|
16222
|
+
init_chunk_KY3JYP4A();
|
|
16232
16223
|
init_chunk_SARVKRZB();
|
|
16233
16224
|
init_chunk_HRKVCI5A();
|
|
16234
|
-
|
|
16225
|
+
init_chunk_ICE6SQZO();
|
|
16235
16226
|
init_chunk_2YEGUQR7();
|
|
16236
16227
|
init_chunk_4D6K4P4K();
|
|
16237
16228
|
init_chunk_LBDH7LCG();
|
|
@@ -21549,6 +21540,23 @@ var init_pages2 = __esm({
|
|
|
21549
21540
|
}
|
|
21550
21541
|
});
|
|
21551
21542
|
|
|
21543
|
+
// ../../packages/core/dist/contracts/evals.js
|
|
21544
|
+
var init_evals = __esm({
|
|
21545
|
+
"../../packages/core/dist/contracts/evals.js"() {
|
|
21546
|
+
"use strict";
|
|
21547
|
+
init_chunk_ICE6SQZO();
|
|
21548
|
+
init_chunk_2YEGUQR7();
|
|
21549
|
+
init_chunk_4D6K4P4K();
|
|
21550
|
+
init_chunk_4LXDRTO4();
|
|
21551
|
+
init_chunk_WTOA3ANF();
|
|
21552
|
+
init_chunk_KB5RK3RP();
|
|
21553
|
+
init_chunk_2ISUBJG7();
|
|
21554
|
+
init_chunk_HZ6CADSY();
|
|
21555
|
+
init_chunk_MIWZOSPI();
|
|
21556
|
+
init_chunk_YROEDMVZ();
|
|
21557
|
+
}
|
|
21558
|
+
});
|
|
21559
|
+
|
|
21552
21560
|
// src/lib/parser.ts
|
|
21553
21561
|
import * as fs14 from "fs";
|
|
21554
21562
|
import * as path17 from "path";
|
|
@@ -21825,23 +21833,22 @@ function parseVariablesMap(raw, label2) {
|
|
|
21825
21833
|
}
|
|
21826
21834
|
return vars;
|
|
21827
21835
|
}
|
|
21828
|
-
function parseFixtureField(raw, label2, key
|
|
21836
|
+
function parseFixtureField(raw, label2, key) {
|
|
21829
21837
|
if (raw === void 0 || raw === null) return void 0;
|
|
21830
21838
|
if (typeof raw !== "string") {
|
|
21831
|
-
throw expected(`${label2}: "${key}" must be a string (
|
|
21839
|
+
throw expected(`${label2}: "${key}" must be a string (the Rekor fixture name).`);
|
|
21832
21840
|
}
|
|
21833
21841
|
const trimmed = raw.trim();
|
|
21834
21842
|
return trimmed.length > 0 ? trimmed : void 0;
|
|
21835
21843
|
}
|
|
21836
21844
|
function parsePersonFields(data, label2) {
|
|
21837
|
-
|
|
21838
|
-
|
|
21845
|
+
if (data.customer_contact_id !== void 0) {
|
|
21846
|
+
throw expected(`${label2}: ${EVAL_PERSON_ALIAS_RETIRED}.`);
|
|
21847
|
+
}
|
|
21848
|
+
if (data.person === void 0 || data.person === null) return {};
|
|
21839
21849
|
if (!Array.isArray(data.person) || !data.person.every((id) => typeof id === "string")) {
|
|
21840
21850
|
throw expected(`${label2}: "person" must be a list of ids (person ids or contact ids).`);
|
|
21841
21851
|
}
|
|
21842
|
-
if (alias) {
|
|
21843
|
-
throw expected(`${label2}: declare "person" or "customer_contact_id" (its deprecated alias), not both.`);
|
|
21844
|
-
}
|
|
21845
21852
|
return { person: data.person };
|
|
21846
21853
|
}
|
|
21847
21854
|
function scanJourneyYamlFiles(hubFolder, bytesByHash, unreadable) {
|
|
@@ -22028,6 +22035,7 @@ var init_parser = __esm({
|
|
|
22028
22035
|
init_eval_attachments();
|
|
22029
22036
|
init_call_openings();
|
|
22030
22037
|
init_pages2();
|
|
22038
|
+
init_evals();
|
|
22031
22039
|
init_expected();
|
|
22032
22040
|
init_fs_safety();
|
|
22033
22041
|
NOT_A_YAML_OBJECT = "not a YAML object";
|
|
@@ -30757,7 +30765,7 @@ async function evalsSqlSubcommand(args2) {
|
|
|
30757
30765
|
}
|
|
30758
30766
|
printQueryRows(result.data);
|
|
30759
30767
|
}
|
|
30760
|
-
var
|
|
30768
|
+
var init_evals2 = __esm({
|
|
30761
30769
|
"src/commands/evals.ts"() {
|
|
30762
30770
|
"use strict";
|
|
30763
30771
|
init_auth();
|
|
@@ -42683,7 +42691,7 @@ async function main() {
|
|
|
42683
42691
|
break;
|
|
42684
42692
|
}
|
|
42685
42693
|
case "evals": {
|
|
42686
|
-
const { evalsCommand: evalsCommand2 } = await Promise.resolve().then(() => (
|
|
42694
|
+
const { evalsCommand: evalsCommand2 } = await Promise.resolve().then(() => (init_evals2(), evals_exports));
|
|
42687
42695
|
await evalsCommand2(args);
|
|
42688
42696
|
break;
|
|
42689
42697
|
}
|