@wayai/cli 0.3.46 → 0.3.47
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 +229 -23
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -363,6 +363,9 @@ var init_api_client = __esm({
|
|
|
363
363
|
async createScenarioFromConversation(input) {
|
|
364
364
|
return this.request("POST", "/api/evals/scenarios/from-conversation", input);
|
|
365
365
|
}
|
|
366
|
+
async createJourneyFromConversation(input) {
|
|
367
|
+
return this.request("POST", "/api/evals/journeys/from-conversation", input);
|
|
368
|
+
}
|
|
366
369
|
// ---------------------------------------------------------------------------
|
|
367
370
|
// Analytics
|
|
368
371
|
// ---------------------------------------------------------------------------
|
|
@@ -5031,7 +5034,41 @@ function slugifyKebab(input, maxLength = 64) {
|
|
|
5031
5034
|
function slugifySkillName(name) {
|
|
5032
5035
|
return slugifyKebab(name, 64);
|
|
5033
5036
|
}
|
|
5034
|
-
|
|
5037
|
+
function findStepBoundaries(transcript) {
|
|
5038
|
+
const out = [];
|
|
5039
|
+
const n = transcript.length;
|
|
5040
|
+
let i = 0;
|
|
5041
|
+
while (i < n) {
|
|
5042
|
+
if (transcript[i].role !== "assistant") {
|
|
5043
|
+
i++;
|
|
5044
|
+
continue;
|
|
5045
|
+
}
|
|
5046
|
+
let triggerIdx = -1;
|
|
5047
|
+
for (let j = i - 1; j >= 0; j--) {
|
|
5048
|
+
if (transcript[j].role === "user") {
|
|
5049
|
+
triggerIdx = j;
|
|
5050
|
+
break;
|
|
5051
|
+
}
|
|
5052
|
+
}
|
|
5053
|
+
let runEnd = i;
|
|
5054
|
+
while (runEnd + 1 < n && (transcript[runEnd + 1].role === "assistant" || transcript[runEnd + 1].role === "tool")) {
|
|
5055
|
+
runEnd++;
|
|
5056
|
+
}
|
|
5057
|
+
let concludingIdx = -1;
|
|
5058
|
+
for (let j = runEnd; j >= i; j--) {
|
|
5059
|
+
if (transcript[j].role === "assistant") {
|
|
5060
|
+
concludingIdx = j;
|
|
5061
|
+
break;
|
|
5062
|
+
}
|
|
5063
|
+
}
|
|
5064
|
+
if (triggerIdx !== -1 && concludingIdx !== -1) {
|
|
5065
|
+
out.push({ triggerIdx, concludingIdx });
|
|
5066
|
+
}
|
|
5067
|
+
i = runEnd + 1;
|
|
5068
|
+
}
|
|
5069
|
+
return out;
|
|
5070
|
+
}
|
|
5071
|
+
var APP_ERROR_BRAND, AppError, LLM_RATE_LIMIT_BRAND, LlmRateLimitError, LLM_PROVIDER_HTTP_BRAND, LlmProviderHttpError, ExternalServiceError, CHANNEL_PROVIDER_HTTP_BRAND, ChannelProviderHttpError, MEDIA_PROVIDER_HTTP_BRAND, MediaProviderHttpError, AUTH_TYPE, ORG_CREDENTIAL_AUTH_TYPES, AUTH_TYPE_DISPLAY, LEGACY_AUTH_TYPE_MAP, VALID_AUTH_TYPES, AGENT_ROLES, SAFE_USER_ID_REGEX, uuidSchema, paginationSchema, timestampSchema, idParamSchema, primaryRegionSchema, placementSourceSchema, orgIdParam, orgAdminIdParam, createOrganizationBody, updateOrganizationBody, addOrgAdminBody, SUMMARIZATION_THRESHOLD_MIN, SUMMARIZATION_THRESHOLD_MAX, summarizationThresholdField, monitorConfigField, agentIdParam, listAgentsQuery, agentConnectionsQuery, createAgentBody, updateAgentBody, SLUG_REGEX, slugSchema, INVISIBLE_NAME_CHARS, MAX_KANBAN_STATUSES, MAX_FOLLOWUPS_PER_STATUS, MAX_ADDITIONAL_CONTEXT_SCHEMA_BYTES, RESERVED_TEMPLATE_DUMP_NAME, kanbanStatusSlugSchema, followupSchema, EXCLUSIVE_FLAG_PAIRS, kanbanStatusSchema, kanbanStatusesArraySchema, hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, createHubBody, updateHubBody, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, claimCodeChannelParam, claimCodeDeleteParam, connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, registerWhatsappQuery, registerWhatsappBody, retryProvisioningQuery, resendDomainStatusQuery, PLACEHOLDER_TOKENS, ALLOWED_TYPES, SUBSCHEMA_OBJECT_KEYWORDS, SUBSCHEMA_LIST_KEYWORDS, SUBSCHEMA_MAP_KEYWORDS, MAX_SCHEMA_DEPTH, toolIdParam, listToolsQuery, toolAgentQuery, deleteToolQuery, toolConnectionsQuery, nativeToolIdSchema, addNativeToolBody, addMcpToolBody, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody, initialValueCreateSchema, initialValueUpdateSchema, stateIdParam, listStatesQuery, stateNameSchema, createStateBody, updateStateBody, reorderStatesBody, orgTagIdParam, listOrgTagsQuery, createOrgTagBody, updateOrgTagBody, orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody, orgResourceIdParam, orgResourceFileIdParam, orgResourceFolderIdParam, hubOrgResourceParam, listOrgResourcesQuery, orgIdQuery, createOrgResourceBody, updateOrgResourceBody, createOrgResourceFolderBody, updateOrgResourceFolderBody, uploadOrgResourceFileBody, updateOrgResourceFileBody, uploadOrgSkillZipBody, linkOrgResourceBody, resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery, navItemSchema, hubCountResetBody, navItemCountResetBody, typingBody, analyticsHubIdParam, analyticsVariableIdParam, updateVariablePinBody, updateAnalyticsViewBody, NUMERIC_FILTER_OPS, TEXT_FILTER_OPS, CATEGORICAL_FILTER_OPS, VARIABLE_FILTER_OPS, STRUCTURED_QUERY_OPS, STRUCTURED_QUERY_AGGREGATIONS, filterValueSchema, conversationsBody, analyticsConversationIdParam, messagesQuery, conversationDetailDataQuery, analyticsDataBody, structuredQueryBody, analyticsSqlBody, analyticsSqlSchemaQuery, PACING_INTERVAL_MIN_MS, PACING_INTERVAL_MAX_MS, EVAL_RUN_DEADLINE_MIN_MS, EVAL_RUN_DEADLINE_MAX_MS, paginationSchema2, evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, createEvalBody, updateEvalBody, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, sessionConfigSchema, createSessionBody, getSessionsQuery, getSessionResultsQuery, getSessionRunsQuery, evalAnalyticsQuery, getSessionCostQuery, compareSessionsQuery, evalsSqlBody, evalsSqlSchemaQuery, exportResultsQuery, validateEvalBody, hubAgentsQuery, createScenarioSetBody, updateScenarioSetBody, scenarioSetsHubQuery, createScenarioFromConversationBody, createJourneyFromConversationBody, journeyIdParam, journeyToolCallSchema, journeyTurnSchema, journeyStepOverrideSchema, createJourneyBody, updateJourneyBody, getConversationsQuery, getMessagesQuery, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, activityQuery, deletionModeSchema, deletionRequestBody, archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams, conversationIdParam, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, sendMessageBody, listConversationsQuery, getConversationDetailParams, getConversationDetailQuery, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody, billingOrgIdParam, subscriptionItemParams, spendCapBody, growthPacksBody, portalSessionBody, checkoutSessionBody, updateBillingCurrencyBody, invoicesQuery, downloadBody, uploadQuery, signUrlBody, completionsBody, outboundSchemaQuery, templateIdParam, listTemplatesQuery, deleteTemplateQuery, templateStatusQuery, createTemplateBody, updateTemplateBody, submitTemplateBody, testTemplateBody, contactIdParam, listContactsQuery, createContactBody, updateContactBody, listIdParam, listListsQuery, listListContactsQuery, createListBody, updateListBody, addListContactsBody, removeListContactsBody, scheduleIdParam, listSchedulesQuery, listExecutionsQuery, createScheduleBody, updateScheduleBody, uuidPattern, ciUuidSchema, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, updatePlatformConfigBody, updateFreeOrgLimitBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysQuery, dataExplorerKvKeyParam, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteQuery, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, dataExplorerDebugDoType, DEBUG_READ_MAX_LIMIT, DEBUG_READ_DEFAULT_LIMIT, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, debugHubConvParam, debugMessageIdQuery, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, browserParams, browserFoldersQuery, browserFilesQuery, stateOperationBody, conversationListResourcesQuery, conversationReadResourceQuery, listPendingSchedulesQuery, listHubAggregateSchedulesQuery, reportSourceSchema, intakeReportSourceSchema, reportClassificationSchema, reportStatusSchema, reportLocaleSchema, reportMessageAuthorRoleSchema, sentryRefStatusSchema, createReportBody, editReportBody, contestReportBody, reporterListQuery, listReportsQuery, GITHUB_ISSUE_URL_REGEX, githubIssueUrlSchema, transitionReportBody, groupReportsBody, holdReportBody, clickhouseReadyResponse, bootstrapQuery, requestSnapshotChunkMessage, MAX_NAME_LENGTH, MAX_VALUE_LENGTH, MAX_TAGS, MAX_TAG_LENGTH, MAX_SCOPE_HUBS, MAX_SCOPE_TAGS, vaultSecretScopeSchema, vaultCreateBody, vaultUpdateBody, PERMISSIONS, MAX_NAME_LENGTH2, MAX_HUBS_PER_GRANT, MAX_HUB_TAGS_PER_GRANT, MAX_GRANTS, permissionEnum, grantScopeSchema, grantSchema, createTokenBody, tokenOrgIdParam, tokenGrantScopeSchema, tokenGrantSchema, tokenMetadataSchema, listTokensResponse, createTokenResponse, orgTokenSummarySchema, listOrgTokensResponse, invitePreviewQuery, invitePreviewResponse, discordTier, discordBillingCycle, discordMetadata, discordOAuthStartResponse, discordOAuthFinalizeBody, discordOAuthFinalizeResponse, discordDisconnectResponse, jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse, hubAlertsParam, hubAlertSeverity, hubAlert, hubAlertsListResponse, noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema, WAYAI_WORKSPACE_LAYOUT, MAX_RESOURCE_FILE_SIZE;
|
|
5035
5072
|
var init_dist = __esm({
|
|
5036
5073
|
"../../packages/core/dist/index.js"() {
|
|
5037
5074
|
"use strict";
|
|
@@ -6184,6 +6221,46 @@ var init_dist = __esm({
|
|
|
6184
6221
|
scenario_name: external_exports.string().min(1).max(200),
|
|
6185
6222
|
evaluator_instructions: external_exports.string().max(4e3).optional()
|
|
6186
6223
|
});
|
|
6224
|
+
createJourneyFromConversationBody = external_exports.object({
|
|
6225
|
+
hub_id: external_exports.string().uuid(),
|
|
6226
|
+
conversation_id: external_exports.string().uuid(),
|
|
6227
|
+
journey_name: external_exports.string().min(1).max(200),
|
|
6228
|
+
evaluator_instructions: external_exports.string().max(4e3).optional()
|
|
6229
|
+
});
|
|
6230
|
+
journeyIdParam = external_exports.object({ id: external_exports.string().uuid() });
|
|
6231
|
+
journeyToolCallSchema = external_exports.object({
|
|
6232
|
+
id: external_exports.string(),
|
|
6233
|
+
type: external_exports.literal("function"),
|
|
6234
|
+
function: external_exports.object({ name: external_exports.string(), arguments: external_exports.string() })
|
|
6235
|
+
});
|
|
6236
|
+
journeyTurnSchema = external_exports.object({
|
|
6237
|
+
role: external_exports.enum(["system", "user", "assistant", "tool"]),
|
|
6238
|
+
content: external_exports.string().nullable().optional(),
|
|
6239
|
+
tool_calls: external_exports.array(journeyToolCallSchema).optional(),
|
|
6240
|
+
tool_call_id: external_exports.string().optional(),
|
|
6241
|
+
step_id: external_exports.string().optional()
|
|
6242
|
+
});
|
|
6243
|
+
journeyStepOverrideSchema = external_exports.object({
|
|
6244
|
+
number_of_runs: external_exports.number().int().positive().max(100).optional(),
|
|
6245
|
+
evaluator_instructions: external_exports.string().max(4e3).nullable().optional()
|
|
6246
|
+
});
|
|
6247
|
+
createJourneyBody = external_exports.object({
|
|
6248
|
+
hub_id: external_exports.string().uuid(),
|
|
6249
|
+
journey_name: external_exports.string().min(1).max(200),
|
|
6250
|
+
responder_agent_id: external_exports.string().uuid(),
|
|
6251
|
+
transcript: external_exports.array(journeyTurnSchema).default([]),
|
|
6252
|
+
step_config: external_exports.record(journeyStepOverrideSchema).optional(),
|
|
6253
|
+
evaluator_instructions: external_exports.string().max(4e3).optional()
|
|
6254
|
+
});
|
|
6255
|
+
updateJourneyBody = external_exports.object({
|
|
6256
|
+
hub_id: external_exports.string().uuid(),
|
|
6257
|
+
journey_name: external_exports.string().min(1).max(200).optional(),
|
|
6258
|
+
responder_agent_id: external_exports.string().uuid().optional(),
|
|
6259
|
+
transcript: external_exports.array(journeyTurnSchema).optional(),
|
|
6260
|
+
step_config: external_exports.record(journeyStepOverrideSchema).optional(),
|
|
6261
|
+
evaluator_instructions: external_exports.string().max(4e3).nullable().optional(),
|
|
6262
|
+
enabled: external_exports.boolean().optional()
|
|
6263
|
+
});
|
|
6187
6264
|
getConversationsQuery = external_exports.object({
|
|
6188
6265
|
nav_item: external_exports.enum(["chat", "task", "support", "chat_task"]),
|
|
6189
6266
|
hub_team_user_id: external_exports.string().optional(),
|
|
@@ -6700,8 +6777,6 @@ var init_dist = __esm({
|
|
|
6700
6777
|
user_email: external_exports.string().email("user_email must be a valid email address")
|
|
6701
6778
|
});
|
|
6702
6779
|
updatePlatformConfigBody = external_exports.object({
|
|
6703
|
-
free_plan_message_allowance: external_exports.number().int().min(0).optional(),
|
|
6704
|
-
free_plan_reset_type: external_exports.string().optional(),
|
|
6705
6780
|
free_plan_max_free_orgs_per_user: external_exports.number().int().min(0).optional(),
|
|
6706
6781
|
/** Kill switch for admin debug-read endpoints. 0 = off, 1 = on. */
|
|
6707
6782
|
debug_read_enabled: external_exports.number().int().min(0).max(1).optional()
|
|
@@ -6983,7 +7058,7 @@ var init_dist = __esm({
|
|
|
6983
7058
|
external_exports.object({
|
|
6984
7059
|
target: external_exports.literal("escalated"),
|
|
6985
7060
|
gh_issue_url: githubIssueUrlSchema,
|
|
6986
|
-
ai_verdict: external_exports.string().max(
|
|
7061
|
+
ai_verdict: external_exports.string().max(2e3).optional()
|
|
6987
7062
|
}),
|
|
6988
7063
|
external_exports.object({
|
|
6989
7064
|
target: external_exports.literal("shipped"),
|
|
@@ -6995,7 +7070,7 @@ var init_dist = __esm({
|
|
|
6995
7070
|
external_exports.object({
|
|
6996
7071
|
target: external_exports.literal("dismissed"),
|
|
6997
7072
|
dismissal_reason: external_exports.string().min(1).max(1e3),
|
|
6998
|
-
ai_verdict: external_exports.string().max(
|
|
7073
|
+
ai_verdict: external_exports.string().max(2e3).optional(),
|
|
6999
7074
|
final: external_exports.boolean().optional()
|
|
7000
7075
|
})
|
|
7001
7076
|
]);
|
|
@@ -11901,6 +11976,78 @@ var init_eval_capture = __esm({
|
|
|
11901
11976
|
}
|
|
11902
11977
|
});
|
|
11903
11978
|
|
|
11979
|
+
// src/commands/journey-capture.ts
|
|
11980
|
+
var journey_capture_exports = {};
|
|
11981
|
+
__export(journey_capture_exports, {
|
|
11982
|
+
journeyCaptureCommand: () => journeyCaptureCommand
|
|
11983
|
+
});
|
|
11984
|
+
function parseArgs9(args2) {
|
|
11985
|
+
if (args2.length === 0 || args2[0].startsWith("-")) {
|
|
11986
|
+
console.error("Usage: wayai eval journey capture <conversation_id> [--name <journey_name>] [--instructions <text>]");
|
|
11987
|
+
process.exit(1);
|
|
11988
|
+
}
|
|
11989
|
+
const conversationId = args2[0];
|
|
11990
|
+
if (!UUID_RE.test(conversationId)) {
|
|
11991
|
+
console.error(`Invalid conversation ID "${conversationId}". Expected a UUID.`);
|
|
11992
|
+
process.exit(1);
|
|
11993
|
+
}
|
|
11994
|
+
let journeyName = null;
|
|
11995
|
+
let evaluatorInstructions = null;
|
|
11996
|
+
for (let i = 1; i < args2.length; i++) {
|
|
11997
|
+
const arg = args2[i];
|
|
11998
|
+
if (arg === "--name") {
|
|
11999
|
+
journeyName = args2[++i] ?? "";
|
|
12000
|
+
if (!journeyName) {
|
|
12001
|
+
console.error("--name requires a value.");
|
|
12002
|
+
process.exit(1);
|
|
12003
|
+
}
|
|
12004
|
+
} else if (arg === "--instructions") {
|
|
12005
|
+
evaluatorInstructions = args2[++i] ?? "";
|
|
12006
|
+
if (!evaluatorInstructions) {
|
|
12007
|
+
console.error("--instructions requires a value.");
|
|
12008
|
+
process.exit(1);
|
|
12009
|
+
}
|
|
12010
|
+
} else {
|
|
12011
|
+
console.error(`Unknown argument: ${arg}`);
|
|
12012
|
+
process.exit(1);
|
|
12013
|
+
}
|
|
12014
|
+
}
|
|
12015
|
+
return { conversationId, journeyName, evaluatorInstructions };
|
|
12016
|
+
}
|
|
12017
|
+
async function journeyCaptureCommand(args2) {
|
|
12018
|
+
const hubId = resolveActiveHubId(args2);
|
|
12019
|
+
const parsed = parseArgs9(args2);
|
|
12020
|
+
const { config, accessToken } = await requireAuth();
|
|
12021
|
+
requireRepoConfig();
|
|
12022
|
+
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
12023
|
+
const journeyName = parsed.journeyName ?? `Journey ${parsed.conversationId.slice(0, 8)}`;
|
|
12024
|
+
console.log(`Capturing conversation ${parsed.conversationId} as a journey...`);
|
|
12025
|
+
const result = await client.createJourneyFromConversation({
|
|
12026
|
+
hub_id: hubId,
|
|
12027
|
+
conversation_id: parsed.conversationId,
|
|
12028
|
+
journey_name: journeyName,
|
|
12029
|
+
...parsed.evaluatorInstructions ? { evaluator_instructions: parsed.evaluatorInstructions } : {}
|
|
12030
|
+
});
|
|
12031
|
+
const journey = result.data.journey;
|
|
12032
|
+
const stepCount = findStepBoundaries(journey.transcript).length;
|
|
12033
|
+
console.log(`
|
|
12034
|
+
Created journey "${journey.journey_name}"`);
|
|
12035
|
+
console.log(` id: ${journey.journey_id}`);
|
|
12036
|
+
console.log(` steps: ${stepCount}`);
|
|
12037
|
+
console.log("\nThe journey and its eval steps are on the platform. Run `wayai run-eval` to evaluate it.");
|
|
12038
|
+
}
|
|
12039
|
+
var init_journey_capture = __esm({
|
|
12040
|
+
"src/commands/journey-capture.ts"() {
|
|
12041
|
+
"use strict";
|
|
12042
|
+
init_auth();
|
|
12043
|
+
init_repo_config();
|
|
12044
|
+
init_api_client();
|
|
12045
|
+
init_workspace();
|
|
12046
|
+
init_utils();
|
|
12047
|
+
init_dist();
|
|
12048
|
+
}
|
|
12049
|
+
});
|
|
12050
|
+
|
|
11904
12051
|
// src/commands/eval.ts
|
|
11905
12052
|
var eval_exports = {};
|
|
11906
12053
|
__export(eval_exports, {
|
|
@@ -11918,6 +12065,18 @@ async function evalCommand(args2) {
|
|
|
11918
12065
|
await evalCaptureCommand2(rest);
|
|
11919
12066
|
return;
|
|
11920
12067
|
}
|
|
12068
|
+
case "journey": {
|
|
12069
|
+
const [journeySub, ...journeyRest] = rest;
|
|
12070
|
+
if (journeySub === "capture") {
|
|
12071
|
+
const { journeyCaptureCommand: journeyCaptureCommand2 } = await Promise.resolve().then(() => (init_journey_capture(), journey_capture_exports));
|
|
12072
|
+
await journeyCaptureCommand2(journeyRest);
|
|
12073
|
+
return;
|
|
12074
|
+
}
|
|
12075
|
+
console.error(`Unknown eval journey subcommand: ${journeySub ?? "(none)"}`);
|
|
12076
|
+
printHelp();
|
|
12077
|
+
process.exit(1);
|
|
12078
|
+
return;
|
|
12079
|
+
}
|
|
11921
12080
|
case "help":
|
|
11922
12081
|
case "--help":
|
|
11923
12082
|
case "-h":
|
|
@@ -11937,20 +12096,29 @@ Usage:
|
|
|
11937
12096
|
wayai eval <subcommand> [options]
|
|
11938
12097
|
|
|
11939
12098
|
Subcommands:
|
|
11940
|
-
capture <conversation_id>
|
|
11941
|
-
|
|
12099
|
+
capture <conversation_id> Capture a real conversation's last
|
|
12100
|
+
exchange as a scenario YAML in evals/.
|
|
12101
|
+
journey capture <conversation_id> Capture a real conversation's FULL
|
|
12102
|
+
transcript as a platform-managed journey.
|
|
11942
12103
|
|
|
11943
|
-
Capture flags:
|
|
12104
|
+
Capture flags (scenario):
|
|
11944
12105
|
--set <name> Scenario set folder (created if missing). Default: "Default".
|
|
11945
12106
|
--name <eval_name> Scenario name. Default: derived from conversation ID.
|
|
11946
12107
|
--instructions <text> Evaluator instructions for the scoring agent.
|
|
11947
12108
|
|
|
12109
|
+
Journey capture flags:
|
|
12110
|
+
--name <journey_name> Journey name. Default: derived from conversation ID.
|
|
12111
|
+
--instructions <text> Default evaluator instructions for the journey's steps.
|
|
12112
|
+
|
|
11948
12113
|
Examples:
|
|
11949
12114
|
wayai eval capture 11111111-2222-3333-4444-555555555555
|
|
11950
12115
|
wayai eval capture <conv_id> --set regression-suite --name "Cancel order"
|
|
12116
|
+
wayai eval journey capture <conv_id> --name "Refund happy path"
|
|
11951
12117
|
|
|
11952
12118
|
Authoring evals (create/update/delete) is file-driven \u2014 edit YAML in
|
|
11953
|
-
evals/ and run \`wayai push\`.
|
|
12119
|
+
evals/ and run \`wayai push\`. Capture commands are for production replay only.
|
|
12120
|
+
A journey owns its scenario set + steps, so it is platform-managed (no local
|
|
12121
|
+
file) \u2014 run \`wayai pull\` to bring it down if you want it in the workspace.
|
|
11954
12122
|
`.trim());
|
|
11955
12123
|
}
|
|
11956
12124
|
var init_eval = __esm({
|
|
@@ -12243,7 +12411,7 @@ function refineHubAsCodeKanbanStatuses2(config, ctx) {
|
|
|
12243
12411
|
}
|
|
12244
12412
|
}
|
|
12245
12413
|
}
|
|
12246
|
-
var uuidSchema2, paginationSchema3, timestampSchema2, idParamSchema2, primaryRegionSchema2, placementSourceSchema2, orgIdParam2, orgAdminIdParam2, createOrganizationBody2, updateOrganizationBody2, addOrgAdminBody2, AUTH_TYPE2, ORG_CREDENTIAL_AUTH_TYPES2, AUTH_TYPE_DISPLAY2, LEGACY_AUTH_TYPE_MAP2, VALID_AUTH_TYPES2, AGENT_ROLES2, SAFE_USER_ID_REGEX2, SUMMARIZATION_THRESHOLD_MIN2, SUMMARIZATION_THRESHOLD_MAX2, summarizationThresholdField2, monitorConfigField2, agentIdParam2, listAgentsQuery2, agentConnectionsQuery2, createAgentBody2, updateAgentBody2, SLUG_REGEX2, slugSchema2, INVISIBLE_NAME_CHARS2, MAX_KANBAN_STATUSES2, MAX_FOLLOWUPS_PER_STATUS2, MAX_ADDITIONAL_CONTEXT_SCHEMA_BYTES2, RESERVED_TEMPLATE_DUMP_NAME2, kanbanStatusSlugSchema2, followupSchema2, EXCLUSIVE_FLAG_PAIRS2, kanbanStatusSchema2, kanbanStatusesArraySchema2, hubIdParam2, hubAdminIdParam2, hubUserIdParam2, hubIdentityIdParam2, hubTeamIdParam2, hubTeamUserDeleteParam2, hubSchemaQuery2, createHubBody2, updateHubBody2, addHubAdminBody2, addHubIdentityAuthorizationBody2, contactDecisionBody2, approveContactBody2, listContactAccessQuery2, createHubTeamBody2, updateHubTeamBody2, addHubTeamUserBody2, reassignHubUserBody2, replicatePreviewBody2, claimCodeChannelParam2, claimCodeDeleteParam2, connectionIdParam2, connectorIdParam2, listConnectionsQuery2, deleteConnectionQuery2, addConnectionBody2, editConnectionBody2, registerWhatsappQuery2, registerWhatsappBody2, retryProvisioningQuery2, resendDomainStatusQuery2, PLACEHOLDER_TOKENS2, ALLOWED_TYPES2, SUBSCHEMA_OBJECT_KEYWORDS2, SUBSCHEMA_LIST_KEYWORDS2, SUBSCHEMA_MAP_KEYWORDS2, MAX_SCHEMA_DEPTH2, toolIdParam2, listToolsQuery2, toolAgentQuery2, deleteToolQuery2, toolConnectionsQuery2, nativeToolIdSchema2, addNativeToolBody2, addMcpToolBody2, createCustomToolBody2, updateCustomToolBody2, updateToolExecutionConfigBody2, initialValueCreateSchema2, initialValueUpdateSchema2, stateIdParam2, listStatesQuery2, stateNameSchema2, createStateBody2, updateStateBody2, reorderStatesBody2, orgTagIdParam2, listOrgTagsQuery2, createOrgTagBody2, updateOrgTagBody2, orgCredentialIdParam2, listOrgCredentialsQuery2, createOrgCredentialBody2, updateOrgCredentialBody2, orgResourceIdParam2, orgResourceFileIdParam2, orgResourceFolderIdParam2, hubOrgResourceParam2, listOrgResourcesQuery2, orgIdQuery2, createOrgResourceBody2, updateOrgResourceBody2, createOrgResourceFolderBody2, updateOrgResourceFolderBody2, uploadOrgResourceFileBody2, updateOrgResourceFileBody2, uploadOrgSkillZipBody2, linkOrgResourceBody2, resourceIdParam2, listResourcesQuery2, createResourceBody2, updateResourceBody2, syncSkillsBody2, resourceFileIdParam2, listResourceFilesQuery2, createResourceFileBody2, updateResourceFileBody2, uploadResourceFileBody2, uploadSkillZipBody2, resourceFolderIdParam2, listResourceFoldersQuery2, createResourceFolderBody2, updateResourceFolderBody2, agentResourceQuery2, hubResourceQuery2, linkAgentResourceBody2, updateAgentResourceBody2, unlinkAgentResourceQuery2, navItemSchema2, hubCountResetBody2, navItemCountResetBody2, typingBody2, analyticsHubIdParam2, analyticsVariableIdParam2, updateVariablePinBody2, updateAnalyticsViewBody2, NUMERIC_FILTER_OPS2, TEXT_FILTER_OPS2, CATEGORICAL_FILTER_OPS2, VARIABLE_FILTER_OPS2, STRUCTURED_QUERY_OPS2, STRUCTURED_QUERY_AGGREGATIONS2, filterValueSchema2, conversationsBody2, analyticsConversationIdParam2, messagesQuery2, conversationDetailDataQuery2, analyticsDataBody2, structuredQueryBody2, analyticsSqlBody2, analyticsSqlSchemaQuery2, PACING_INTERVAL_MIN_MS2, PACING_INTERVAL_MAX_MS2, EVAL_RUN_DEADLINE_MIN_MS2, EVAL_RUN_DEADLINE_MAX_MS2, paginationSchema22, evalIdParam2, sessionIdParam2, scenarioSetIdParam2, hubIdQuery2, createEvalBody2, updateEvalBody2, getEvalsQuery2, toggleEvalBody2, bulkToggleEvalsBody2, pacingConfigSchema2, sessionConfigSchema2, createSessionBody2, getSessionsQuery2, getSessionResultsQuery2, getSessionRunsQuery2, evalAnalyticsQuery2, getSessionCostQuery2, compareSessionsQuery2, evalsSqlBody2, evalsSqlSchemaQuery2, exportResultsQuery2, validateEvalBody2, hubAgentsQuery2, createScenarioSetBody2, updateScenarioSetBody2, scenarioSetsHubQuery2, createScenarioFromConversationBody2, getConversationsQuery2, getMessagesQuery2, updateUserBody2, updateProfileBody2, pathnameRegex2, updatePreferencesBody2, registerPushTokenBody2, deletePushTokenQuery2, activityQuery2, deletionModeSchema2, deletionRequestBody2, archiveHubIdParam2, archiveConversationParams2, archiveListQuery2, archiveMessageObservabilityParams2, conversationIdParam2, claimBody2, releaseBody2, transferBody2, closeBody2, additionalContextPayloadSchema2, kanbanUpdateBody2, observabilityParams2, observabilityListParams2, deleteUserConversationsBody2, sendMessageBody2, listConversationsQuery2, getConversationDetailParams2, getConversationDetailQuery2, listWhatsAppTemplatesQuery2, sendWhatsAppTemplateBody2, billingOrgIdParam2, subscriptionItemParams2, spendCapBody2, growthPacksBody2, portalSessionBody2, checkoutSessionBody2, updateBillingCurrencyBody2, invoicesQuery2, downloadBody2, uploadQuery2, signUrlBody2, completionsBody2, outboundSchemaQuery2, templateIdParam2, listTemplatesQuery2, deleteTemplateQuery2, templateStatusQuery2, createTemplateBody2, updateTemplateBody2, submitTemplateBody2, testTemplateBody2, contactIdParam2, listContactsQuery2, createContactBody2, updateContactBody2, listIdParam2, listListsQuery2, listListContactsQuery2, createListBody2, updateListBody2, addListContactsBody2, removeListContactsBody2, scheduleIdParam2, listSchedulesQuery2, listExecutionsQuery2, createScheduleBody2, updateScheduleBody2, uuidPattern2, ciUuidSchema2, hubAsCodeConfigSchema2, ciPullHubIdParam2, ciBranchParam2, ciPullQuery2, ciHubsQuery2, ciLookupQuery2, ciBranchesQuery2, ciSyncBody2, ciPushBody2, ciDiffBody2, ciPublishBody2, ciPublishPreviewBody2, ciSyncMcpBody2, ciOrgResourcesParam2, orgResourcesConfigSchema2, ciOrgResourcesPushBody2, ciOrgResourcesDiffBody2, adminOrgIdParam2, adminOrgAdminIdParam2, adminUserIdParam2, adminPlanIdParam2, adminOrganizationsQuery2, adminUserSearchQuery2, kanbanSlugMigrationQuery2, adjustQuotaBody2, updatePlanBody2, addAdminUserBody2, updatePlatformConfigBody2, updateFreeOrgLimitBody2, updatePricingPlanBody2, dataExplorerSearchQuery2, dataExplorerOrgIdParam2, dataExplorerHubIdParam2, dataExplorerConvIdParam2, dataExplorerDoInstancesQuery2, dataExplorerNsIdParam2, dataExplorerKvKeysQuery2, dataExplorerKvKeyParam2, uuidOrHexId2, dataExplorerDeleteOrgParam2, dataExplorerDeleteHubParam2, dataExplorerDeleteConvParam2, dataExplorerDeleteUserParam2, dataExplorerDeleteQuery2, dataExplorerKvDeleteQuery2, pitrDoNamespace2, pitrBookmarkParam2, pitrRestoreBody2, healthSamplingTriggerBody2, dataExplorerDebugDoType2, DEBUG_READ_MAX_LIMIT2, DEBUG_READ_DEFAULT_LIMIT2, DEBUG_DO_HEX_PREFIX2, debugDoEntityId2, debugTableName2, dataExplorerDebugTablesParam2, dataExplorerDebugRowsParam2, dataExplorerDebugRowsQuery2, dataExplorerDebugAnalyticsTable2, debugUuid2, dataExplorerDebugAnalyticsRowsParam2, dataExplorerDebugAnalyticsRowsQuery2, debugHubConvParam2, debugMessageIdQuery2, whatsappCallbackBody2, authMeResponse2, wsTicketResponse2, sessionCheckResponse2, logoutResponse2, magicCodeSendBody2, magicCodeSendResponse2, magicCodeVerifyBody2, magicCodeVerifyResponse2, browserParams2, browserFoldersQuery2, browserFilesQuery2, stateOperationBody2, conversationListResourcesQuery2, conversationReadResourceQuery2, listPendingSchedulesQuery2, listHubAggregateSchedulesQuery2, reportSourceSchema2, intakeReportSourceSchema2, reportClassificationSchema2, reportStatusSchema2, reportLocaleSchema2, reportMessageAuthorRoleSchema2, sentryRefStatusSchema2, createReportBody2, editReportBody2, contestReportBody2, reporterListQuery2, listReportsQuery2, GITHUB_ISSUE_URL_REGEX2, githubIssueUrlSchema2, transitionReportBody2, groupReportsBody2, holdReportBody2, clickhouseReadyResponse2, bootstrapQuery2, requestSnapshotChunkMessage2, MAX_NAME_LENGTH3, MAX_VALUE_LENGTH2, MAX_TAGS2, MAX_TAG_LENGTH2, MAX_SCOPE_HUBS2, MAX_SCOPE_TAGS2, vaultSecretScopeSchema2, vaultCreateBody2, vaultUpdateBody2, PERMISSIONS2, MAX_NAME_LENGTH22, MAX_HUBS_PER_GRANT2, MAX_HUB_TAGS_PER_GRANT2, MAX_GRANTS2, permissionEnum2, grantScopeSchema2, grantSchema2, createTokenBody2, tokenOrgIdParam2, tokenGrantScopeSchema2, tokenGrantSchema2, tokenMetadataSchema2, listTokensResponse2, createTokenResponse2, orgTokenSummarySchema2, listOrgTokensResponse2, invitePreviewQuery2, invitePreviewResponse2, discordTier2, discordBillingCycle2, discordMetadata2, discordOAuthStartResponse2, discordOAuthFinalizeBody2, discordOAuthFinalizeResponse2, discordDisconnectResponse2, jsonSchemaSchema2, hubUserIdentity2, stateValueEntry2, getHubUserContextResponse2, updateHubUserBody2, updateHubUserResponse2, unlockHubUserNameResponse2, stateResetParams2, stateResetResponse2, hubAlertsParam2, hubAlertSeverity2, hubAlert2, hubAlertsListResponse2, noticeSeveritySchema2, noticeStatusSchema2, NOTICE_SCOPE_REGEX2, noticeScopeSchema2, noticeLinkSchema2, createNoticeBody2, updateNoticeBody2, listNoticesQuery2, noticeIdParamSchema2;
|
|
12414
|
+
var uuidSchema2, paginationSchema3, timestampSchema2, idParamSchema2, primaryRegionSchema2, placementSourceSchema2, orgIdParam2, orgAdminIdParam2, createOrganizationBody2, updateOrganizationBody2, addOrgAdminBody2, AUTH_TYPE2, ORG_CREDENTIAL_AUTH_TYPES2, AUTH_TYPE_DISPLAY2, LEGACY_AUTH_TYPE_MAP2, VALID_AUTH_TYPES2, AGENT_ROLES2, SAFE_USER_ID_REGEX2, SUMMARIZATION_THRESHOLD_MIN2, SUMMARIZATION_THRESHOLD_MAX2, summarizationThresholdField2, monitorConfigField2, agentIdParam2, listAgentsQuery2, agentConnectionsQuery2, createAgentBody2, updateAgentBody2, SLUG_REGEX2, slugSchema2, INVISIBLE_NAME_CHARS2, MAX_KANBAN_STATUSES2, MAX_FOLLOWUPS_PER_STATUS2, MAX_ADDITIONAL_CONTEXT_SCHEMA_BYTES2, RESERVED_TEMPLATE_DUMP_NAME2, kanbanStatusSlugSchema2, followupSchema2, EXCLUSIVE_FLAG_PAIRS2, kanbanStatusSchema2, kanbanStatusesArraySchema2, hubIdParam2, hubAdminIdParam2, hubUserIdParam2, hubIdentityIdParam2, hubTeamIdParam2, hubTeamUserDeleteParam2, hubSchemaQuery2, createHubBody2, updateHubBody2, addHubAdminBody2, addHubIdentityAuthorizationBody2, contactDecisionBody2, approveContactBody2, listContactAccessQuery2, createHubTeamBody2, updateHubTeamBody2, addHubTeamUserBody2, reassignHubUserBody2, replicatePreviewBody2, claimCodeChannelParam2, claimCodeDeleteParam2, connectionIdParam2, connectorIdParam2, listConnectionsQuery2, deleteConnectionQuery2, addConnectionBody2, editConnectionBody2, registerWhatsappQuery2, registerWhatsappBody2, retryProvisioningQuery2, resendDomainStatusQuery2, PLACEHOLDER_TOKENS2, ALLOWED_TYPES2, SUBSCHEMA_OBJECT_KEYWORDS2, SUBSCHEMA_LIST_KEYWORDS2, SUBSCHEMA_MAP_KEYWORDS2, MAX_SCHEMA_DEPTH2, toolIdParam2, listToolsQuery2, toolAgentQuery2, deleteToolQuery2, toolConnectionsQuery2, nativeToolIdSchema2, addNativeToolBody2, addMcpToolBody2, createCustomToolBody2, updateCustomToolBody2, updateToolExecutionConfigBody2, initialValueCreateSchema2, initialValueUpdateSchema2, stateIdParam2, listStatesQuery2, stateNameSchema2, createStateBody2, updateStateBody2, reorderStatesBody2, orgTagIdParam2, listOrgTagsQuery2, createOrgTagBody2, updateOrgTagBody2, orgCredentialIdParam2, listOrgCredentialsQuery2, createOrgCredentialBody2, updateOrgCredentialBody2, orgResourceIdParam2, orgResourceFileIdParam2, orgResourceFolderIdParam2, hubOrgResourceParam2, listOrgResourcesQuery2, orgIdQuery2, createOrgResourceBody2, updateOrgResourceBody2, createOrgResourceFolderBody2, updateOrgResourceFolderBody2, uploadOrgResourceFileBody2, updateOrgResourceFileBody2, uploadOrgSkillZipBody2, linkOrgResourceBody2, resourceIdParam2, listResourcesQuery2, createResourceBody2, updateResourceBody2, syncSkillsBody2, resourceFileIdParam2, listResourceFilesQuery2, createResourceFileBody2, updateResourceFileBody2, uploadResourceFileBody2, uploadSkillZipBody2, resourceFolderIdParam2, listResourceFoldersQuery2, createResourceFolderBody2, updateResourceFolderBody2, agentResourceQuery2, hubResourceQuery2, linkAgentResourceBody2, updateAgentResourceBody2, unlinkAgentResourceQuery2, navItemSchema2, hubCountResetBody2, navItemCountResetBody2, typingBody2, analyticsHubIdParam2, analyticsVariableIdParam2, updateVariablePinBody2, updateAnalyticsViewBody2, NUMERIC_FILTER_OPS2, TEXT_FILTER_OPS2, CATEGORICAL_FILTER_OPS2, VARIABLE_FILTER_OPS2, STRUCTURED_QUERY_OPS2, STRUCTURED_QUERY_AGGREGATIONS2, filterValueSchema2, conversationsBody2, analyticsConversationIdParam2, messagesQuery2, conversationDetailDataQuery2, analyticsDataBody2, structuredQueryBody2, analyticsSqlBody2, analyticsSqlSchemaQuery2, PACING_INTERVAL_MIN_MS2, PACING_INTERVAL_MAX_MS2, EVAL_RUN_DEADLINE_MIN_MS2, EVAL_RUN_DEADLINE_MAX_MS2, paginationSchema22, evalIdParam2, sessionIdParam2, scenarioSetIdParam2, hubIdQuery2, createEvalBody2, updateEvalBody2, getEvalsQuery2, toggleEvalBody2, bulkToggleEvalsBody2, pacingConfigSchema2, sessionConfigSchema2, createSessionBody2, getSessionsQuery2, getSessionResultsQuery2, getSessionRunsQuery2, evalAnalyticsQuery2, getSessionCostQuery2, compareSessionsQuery2, evalsSqlBody2, evalsSqlSchemaQuery2, exportResultsQuery2, validateEvalBody2, hubAgentsQuery2, createScenarioSetBody2, updateScenarioSetBody2, scenarioSetsHubQuery2, createScenarioFromConversationBody2, createJourneyFromConversationBody2, journeyIdParam2, journeyToolCallSchema2, journeyTurnSchema2, journeyStepOverrideSchema2, createJourneyBody2, updateJourneyBody2, getConversationsQuery2, getMessagesQuery2, updateUserBody2, updateProfileBody2, pathnameRegex2, updatePreferencesBody2, registerPushTokenBody2, deletePushTokenQuery2, activityQuery2, deletionModeSchema2, deletionRequestBody2, archiveHubIdParam2, archiveConversationParams2, archiveListQuery2, archiveMessageObservabilityParams2, conversationIdParam2, claimBody2, releaseBody2, transferBody2, closeBody2, additionalContextPayloadSchema2, kanbanUpdateBody2, observabilityParams2, observabilityListParams2, deleteUserConversationsBody2, sendMessageBody2, listConversationsQuery2, getConversationDetailParams2, getConversationDetailQuery2, listWhatsAppTemplatesQuery2, sendWhatsAppTemplateBody2, billingOrgIdParam2, subscriptionItemParams2, spendCapBody2, growthPacksBody2, portalSessionBody2, checkoutSessionBody2, updateBillingCurrencyBody2, invoicesQuery2, downloadBody2, uploadQuery2, signUrlBody2, completionsBody2, outboundSchemaQuery2, templateIdParam2, listTemplatesQuery2, deleteTemplateQuery2, templateStatusQuery2, createTemplateBody2, updateTemplateBody2, submitTemplateBody2, testTemplateBody2, contactIdParam2, listContactsQuery2, createContactBody2, updateContactBody2, listIdParam2, listListsQuery2, listListContactsQuery2, createListBody2, updateListBody2, addListContactsBody2, removeListContactsBody2, scheduleIdParam2, listSchedulesQuery2, listExecutionsQuery2, createScheduleBody2, updateScheduleBody2, uuidPattern2, ciUuidSchema2, hubAsCodeConfigSchema2, ciPullHubIdParam2, ciBranchParam2, ciPullQuery2, ciHubsQuery2, ciLookupQuery2, ciBranchesQuery2, ciSyncBody2, ciPushBody2, ciDiffBody2, ciPublishBody2, ciPublishPreviewBody2, ciSyncMcpBody2, ciOrgResourcesParam2, orgResourcesConfigSchema2, ciOrgResourcesPushBody2, ciOrgResourcesDiffBody2, adminOrgIdParam2, adminOrgAdminIdParam2, adminUserIdParam2, adminPlanIdParam2, adminOrganizationsQuery2, adminUserSearchQuery2, kanbanSlugMigrationQuery2, adjustQuotaBody2, updatePlanBody2, addAdminUserBody2, updatePlatformConfigBody2, updateFreeOrgLimitBody2, updatePricingPlanBody2, dataExplorerSearchQuery2, dataExplorerOrgIdParam2, dataExplorerHubIdParam2, dataExplorerConvIdParam2, dataExplorerDoInstancesQuery2, dataExplorerNsIdParam2, dataExplorerKvKeysQuery2, dataExplorerKvKeyParam2, uuidOrHexId2, dataExplorerDeleteOrgParam2, dataExplorerDeleteHubParam2, dataExplorerDeleteConvParam2, dataExplorerDeleteUserParam2, dataExplorerDeleteQuery2, dataExplorerKvDeleteQuery2, pitrDoNamespace2, pitrBookmarkParam2, pitrRestoreBody2, healthSamplingTriggerBody2, dataExplorerDebugDoType2, DEBUG_READ_MAX_LIMIT2, DEBUG_READ_DEFAULT_LIMIT2, DEBUG_DO_HEX_PREFIX2, debugDoEntityId2, debugTableName2, dataExplorerDebugTablesParam2, dataExplorerDebugRowsParam2, dataExplorerDebugRowsQuery2, dataExplorerDebugAnalyticsTable2, debugUuid2, dataExplorerDebugAnalyticsRowsParam2, dataExplorerDebugAnalyticsRowsQuery2, debugHubConvParam2, debugMessageIdQuery2, whatsappCallbackBody2, authMeResponse2, wsTicketResponse2, sessionCheckResponse2, logoutResponse2, magicCodeSendBody2, magicCodeSendResponse2, magicCodeVerifyBody2, magicCodeVerifyResponse2, browserParams2, browserFoldersQuery2, browserFilesQuery2, stateOperationBody2, conversationListResourcesQuery2, conversationReadResourceQuery2, listPendingSchedulesQuery2, listHubAggregateSchedulesQuery2, reportSourceSchema2, intakeReportSourceSchema2, reportClassificationSchema2, reportStatusSchema2, reportLocaleSchema2, reportMessageAuthorRoleSchema2, sentryRefStatusSchema2, createReportBody2, editReportBody2, contestReportBody2, reporterListQuery2, listReportsQuery2, GITHUB_ISSUE_URL_REGEX2, githubIssueUrlSchema2, transitionReportBody2, groupReportsBody2, holdReportBody2, clickhouseReadyResponse2, bootstrapQuery2, requestSnapshotChunkMessage2, MAX_NAME_LENGTH3, MAX_VALUE_LENGTH2, MAX_TAGS2, MAX_TAG_LENGTH2, MAX_SCOPE_HUBS2, MAX_SCOPE_TAGS2, vaultSecretScopeSchema2, vaultCreateBody2, vaultUpdateBody2, PERMISSIONS2, MAX_NAME_LENGTH22, MAX_HUBS_PER_GRANT2, MAX_HUB_TAGS_PER_GRANT2, MAX_GRANTS2, permissionEnum2, grantScopeSchema2, grantSchema2, createTokenBody2, tokenOrgIdParam2, tokenGrantScopeSchema2, tokenGrantSchema2, tokenMetadataSchema2, listTokensResponse2, createTokenResponse2, orgTokenSummarySchema2, listOrgTokensResponse2, invitePreviewQuery2, invitePreviewResponse2, discordTier2, discordBillingCycle2, discordMetadata2, discordOAuthStartResponse2, discordOAuthFinalizeBody2, discordOAuthFinalizeResponse2, discordDisconnectResponse2, jsonSchemaSchema2, hubUserIdentity2, stateValueEntry2, getHubUserContextResponse2, updateHubUserBody2, updateHubUserResponse2, unlockHubUserNameResponse2, stateResetParams2, stateResetResponse2, hubAlertsParam2, hubAlertSeverity2, hubAlert2, hubAlertsListResponse2, noticeSeveritySchema2, noticeStatusSchema2, NOTICE_SCOPE_REGEX2, noticeScopeSchema2, noticeLinkSchema2, createNoticeBody2, updateNoticeBody2, listNoticesQuery2, noticeIdParamSchema2;
|
|
12247
12415
|
var init_contracts = __esm({
|
|
12248
12416
|
"../../packages/core/dist/contracts/index.js"() {
|
|
12249
12417
|
"use strict";
|
|
@@ -13321,6 +13489,46 @@ var init_contracts = __esm({
|
|
|
13321
13489
|
scenario_name: external_exports.string().min(1).max(200),
|
|
13322
13490
|
evaluator_instructions: external_exports.string().max(4e3).optional()
|
|
13323
13491
|
});
|
|
13492
|
+
createJourneyFromConversationBody2 = external_exports.object({
|
|
13493
|
+
hub_id: external_exports.string().uuid(),
|
|
13494
|
+
conversation_id: external_exports.string().uuid(),
|
|
13495
|
+
journey_name: external_exports.string().min(1).max(200),
|
|
13496
|
+
evaluator_instructions: external_exports.string().max(4e3).optional()
|
|
13497
|
+
});
|
|
13498
|
+
journeyIdParam2 = external_exports.object({ id: external_exports.string().uuid() });
|
|
13499
|
+
journeyToolCallSchema2 = external_exports.object({
|
|
13500
|
+
id: external_exports.string(),
|
|
13501
|
+
type: external_exports.literal("function"),
|
|
13502
|
+
function: external_exports.object({ name: external_exports.string(), arguments: external_exports.string() })
|
|
13503
|
+
});
|
|
13504
|
+
journeyTurnSchema2 = external_exports.object({
|
|
13505
|
+
role: external_exports.enum(["system", "user", "assistant", "tool"]),
|
|
13506
|
+
content: external_exports.string().nullable().optional(),
|
|
13507
|
+
tool_calls: external_exports.array(journeyToolCallSchema2).optional(),
|
|
13508
|
+
tool_call_id: external_exports.string().optional(),
|
|
13509
|
+
step_id: external_exports.string().optional()
|
|
13510
|
+
});
|
|
13511
|
+
journeyStepOverrideSchema2 = external_exports.object({
|
|
13512
|
+
number_of_runs: external_exports.number().int().positive().max(100).optional(),
|
|
13513
|
+
evaluator_instructions: external_exports.string().max(4e3).nullable().optional()
|
|
13514
|
+
});
|
|
13515
|
+
createJourneyBody2 = external_exports.object({
|
|
13516
|
+
hub_id: external_exports.string().uuid(),
|
|
13517
|
+
journey_name: external_exports.string().min(1).max(200),
|
|
13518
|
+
responder_agent_id: external_exports.string().uuid(),
|
|
13519
|
+
transcript: external_exports.array(journeyTurnSchema2).default([]),
|
|
13520
|
+
step_config: external_exports.record(journeyStepOverrideSchema2).optional(),
|
|
13521
|
+
evaluator_instructions: external_exports.string().max(4e3).optional()
|
|
13522
|
+
});
|
|
13523
|
+
updateJourneyBody2 = external_exports.object({
|
|
13524
|
+
hub_id: external_exports.string().uuid(),
|
|
13525
|
+
journey_name: external_exports.string().min(1).max(200).optional(),
|
|
13526
|
+
responder_agent_id: external_exports.string().uuid().optional(),
|
|
13527
|
+
transcript: external_exports.array(journeyTurnSchema2).optional(),
|
|
13528
|
+
step_config: external_exports.record(journeyStepOverrideSchema2).optional(),
|
|
13529
|
+
evaluator_instructions: external_exports.string().max(4e3).nullable().optional(),
|
|
13530
|
+
enabled: external_exports.boolean().optional()
|
|
13531
|
+
});
|
|
13324
13532
|
getConversationsQuery2 = external_exports.object({
|
|
13325
13533
|
nav_item: external_exports.enum(["chat", "task", "support", "chat_task"]),
|
|
13326
13534
|
hub_team_user_id: external_exports.string().optional(),
|
|
@@ -13837,8 +14045,6 @@ var init_contracts = __esm({
|
|
|
13837
14045
|
user_email: external_exports.string().email("user_email must be a valid email address")
|
|
13838
14046
|
});
|
|
13839
14047
|
updatePlatformConfigBody2 = external_exports.object({
|
|
13840
|
-
free_plan_message_allowance: external_exports.number().int().min(0).optional(),
|
|
13841
|
-
free_plan_reset_type: external_exports.string().optional(),
|
|
13842
14048
|
free_plan_max_free_orgs_per_user: external_exports.number().int().min(0).optional(),
|
|
13843
14049
|
/** Kill switch for admin debug-read endpoints. 0 = off, 1 = on. */
|
|
13844
14050
|
debug_read_enabled: external_exports.number().int().min(0).max(1).optional()
|
|
@@ -14120,7 +14326,7 @@ var init_contracts = __esm({
|
|
|
14120
14326
|
external_exports.object({
|
|
14121
14327
|
target: external_exports.literal("escalated"),
|
|
14122
14328
|
gh_issue_url: githubIssueUrlSchema2,
|
|
14123
|
-
ai_verdict: external_exports.string().max(
|
|
14329
|
+
ai_verdict: external_exports.string().max(2e3).optional()
|
|
14124
14330
|
}),
|
|
14125
14331
|
external_exports.object({
|
|
14126
14332
|
target: external_exports.literal("shipped"),
|
|
@@ -14132,7 +14338,7 @@ var init_contracts = __esm({
|
|
|
14132
14338
|
external_exports.object({
|
|
14133
14339
|
target: external_exports.literal("dismissed"),
|
|
14134
14340
|
dismissal_reason: external_exports.string().min(1).max(1e3),
|
|
14135
|
-
ai_verdict: external_exports.string().max(
|
|
14341
|
+
ai_verdict: external_exports.string().max(2e3).optional(),
|
|
14136
14342
|
final: external_exports.boolean().optional()
|
|
14137
14343
|
})
|
|
14138
14344
|
]);
|
|
@@ -15003,9 +15209,9 @@ var init_credential_utils = __esm({
|
|
|
15003
15209
|
var create_credential_exports = {};
|
|
15004
15210
|
__export(create_credential_exports, {
|
|
15005
15211
|
createCredentialCommand: () => createCredentialCommand,
|
|
15006
|
-
parseArgs: () =>
|
|
15212
|
+
parseArgs: () => parseArgs10
|
|
15007
15213
|
});
|
|
15008
|
-
function
|
|
15214
|
+
function parseArgs10(args2) {
|
|
15009
15215
|
let name;
|
|
15010
15216
|
let type;
|
|
15011
15217
|
let orgId;
|
|
@@ -15033,7 +15239,7 @@ function parseArgs9(args2) {
|
|
|
15033
15239
|
return { name, type, orgId, description, tags: splitTagRefs(tags), environment, stdin };
|
|
15034
15240
|
}
|
|
15035
15241
|
async function createCredentialCommand(args2) {
|
|
15036
|
-
const parsed =
|
|
15242
|
+
const parsed = parseArgs10(args2);
|
|
15037
15243
|
if (!parsed.name) {
|
|
15038
15244
|
console.error("Missing required flag: --name <credential-name>");
|
|
15039
15245
|
console.error('Usage: wayai create-credential --name "openai-key" --type "Bearer Token"');
|
|
@@ -15140,10 +15346,10 @@ var init_create_credential = __esm({
|
|
|
15140
15346
|
// src/commands/update-credential.ts
|
|
15141
15347
|
var update_credential_exports = {};
|
|
15142
15348
|
__export(update_credential_exports, {
|
|
15143
|
-
parseArgs: () =>
|
|
15349
|
+
parseArgs: () => parseArgs11,
|
|
15144
15350
|
updateCredentialCommand: () => updateCredentialCommand
|
|
15145
15351
|
});
|
|
15146
|
-
function
|
|
15352
|
+
function parseArgs11(args2) {
|
|
15147
15353
|
let name;
|
|
15148
15354
|
let rename;
|
|
15149
15355
|
let orgId;
|
|
@@ -15176,7 +15382,7 @@ function parseArgs10(args2) {
|
|
|
15176
15382
|
return { name, rename, orgId, description, tags: splitTagRefs(tags), hasTagFlag, environment, stdin, secretPrompt };
|
|
15177
15383
|
}
|
|
15178
15384
|
async function updateCredentialCommand(args2) {
|
|
15179
|
-
const parsed =
|
|
15385
|
+
const parsed = parseArgs11(args2);
|
|
15180
15386
|
if (!parsed.name) {
|
|
15181
15387
|
console.error("Missing required flag: --name <credential-name>");
|
|
15182
15388
|
console.error('Usage: wayai update-credential --name "my-key" --stdin');
|
|
@@ -15535,9 +15741,9 @@ var init_org = __esm({
|
|
|
15535
15741
|
var list_exports = {};
|
|
15536
15742
|
__export(list_exports, {
|
|
15537
15743
|
listCommand: () => listCommand,
|
|
15538
|
-
parseArgs: () =>
|
|
15744
|
+
parseArgs: () => parseArgs12
|
|
15539
15745
|
});
|
|
15540
|
-
function
|
|
15746
|
+
function parseArgs12(args2) {
|
|
15541
15747
|
let orgId;
|
|
15542
15748
|
let json = false;
|
|
15543
15749
|
for (let i = 0; i < args2.length; i++) {
|
|
@@ -15550,7 +15756,7 @@ function parseArgs11(args2) {
|
|
|
15550
15756
|
return { orgId, json };
|
|
15551
15757
|
}
|
|
15552
15758
|
async function listCommand(args2) {
|
|
15553
|
-
const { orgId, json } =
|
|
15759
|
+
const { orgId, json } = parseArgs12(args2);
|
|
15554
15760
|
const { config, accessToken } = await requireAuth();
|
|
15555
15761
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
15556
15762
|
const { organizations } = await client.organizations();
|