@wayai/cli 0.3.46 → 0.3.48
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 +381 -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
|
// ---------------------------------------------------------------------------
|
|
@@ -5028,10 +5031,60 @@ function slugifyKebab(input, maxLength = 64) {
|
|
|
5028
5031
|
if (typeof input !== "string") return "";
|
|
5029
5032
|
return foldDiacritics(input).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").slice(0, maxLength).replace(/^-|-$/g, "");
|
|
5030
5033
|
}
|
|
5034
|
+
function ensureUniqueSlug(slug, used) {
|
|
5035
|
+
if (!used.has(slug)) {
|
|
5036
|
+
used.add(slug);
|
|
5037
|
+
return slug;
|
|
5038
|
+
}
|
|
5039
|
+
for (let i = 2; i < 1e6; i++) {
|
|
5040
|
+
const suffix = `_${i}`;
|
|
5041
|
+
const baseLen = Math.max(1, 50 - suffix.length);
|
|
5042
|
+
const candidate = `${slug.slice(0, baseLen)}${suffix}`;
|
|
5043
|
+
if (!used.has(candidate)) {
|
|
5044
|
+
used.add(candidate);
|
|
5045
|
+
return candidate;
|
|
5046
|
+
}
|
|
5047
|
+
}
|
|
5048
|
+
throw new Error(`slug collision space exhausted for "${slug}"`);
|
|
5049
|
+
}
|
|
5031
5050
|
function slugifySkillName(name) {
|
|
5032
5051
|
return slugifyKebab(name, 64);
|
|
5033
5052
|
}
|
|
5034
|
-
|
|
5053
|
+
function findStepBoundaries(transcript) {
|
|
5054
|
+
const out = [];
|
|
5055
|
+
const n = transcript.length;
|
|
5056
|
+
let i = 0;
|
|
5057
|
+
while (i < n) {
|
|
5058
|
+
if (transcript[i].role !== "assistant") {
|
|
5059
|
+
i++;
|
|
5060
|
+
continue;
|
|
5061
|
+
}
|
|
5062
|
+
let triggerIdx = -1;
|
|
5063
|
+
for (let j = i - 1; j >= 0; j--) {
|
|
5064
|
+
if (transcript[j].role === "user") {
|
|
5065
|
+
triggerIdx = j;
|
|
5066
|
+
break;
|
|
5067
|
+
}
|
|
5068
|
+
}
|
|
5069
|
+
let runEnd = i;
|
|
5070
|
+
while (runEnd + 1 < n && (transcript[runEnd + 1].role === "assistant" || transcript[runEnd + 1].role === "tool")) {
|
|
5071
|
+
runEnd++;
|
|
5072
|
+
}
|
|
5073
|
+
let concludingIdx = -1;
|
|
5074
|
+
for (let j = runEnd; j >= i; j--) {
|
|
5075
|
+
if (transcript[j].role === "assistant") {
|
|
5076
|
+
concludingIdx = j;
|
|
5077
|
+
break;
|
|
5078
|
+
}
|
|
5079
|
+
}
|
|
5080
|
+
if (triggerIdx !== -1 && concludingIdx !== -1) {
|
|
5081
|
+
out.push({ triggerIdx, concludingIdx });
|
|
5082
|
+
}
|
|
5083
|
+
i = runEnd + 1;
|
|
5084
|
+
}
|
|
5085
|
+
return out;
|
|
5086
|
+
}
|
|
5087
|
+
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
5088
|
var init_dist = __esm({
|
|
5036
5089
|
"../../packages/core/dist/index.js"() {
|
|
5037
5090
|
"use strict";
|
|
@@ -6184,6 +6237,46 @@ var init_dist = __esm({
|
|
|
6184
6237
|
scenario_name: external_exports.string().min(1).max(200),
|
|
6185
6238
|
evaluator_instructions: external_exports.string().max(4e3).optional()
|
|
6186
6239
|
});
|
|
6240
|
+
createJourneyFromConversationBody = external_exports.object({
|
|
6241
|
+
hub_id: external_exports.string().uuid(),
|
|
6242
|
+
conversation_id: external_exports.string().uuid(),
|
|
6243
|
+
journey_name: external_exports.string().min(1).max(200),
|
|
6244
|
+
evaluator_instructions: external_exports.string().max(4e3).optional()
|
|
6245
|
+
});
|
|
6246
|
+
journeyIdParam = external_exports.object({ id: external_exports.string().uuid() });
|
|
6247
|
+
journeyToolCallSchema = external_exports.object({
|
|
6248
|
+
id: external_exports.string(),
|
|
6249
|
+
type: external_exports.literal("function"),
|
|
6250
|
+
function: external_exports.object({ name: external_exports.string(), arguments: external_exports.string() })
|
|
6251
|
+
});
|
|
6252
|
+
journeyTurnSchema = external_exports.object({
|
|
6253
|
+
role: external_exports.enum(["system", "user", "assistant", "tool"]),
|
|
6254
|
+
content: external_exports.string().nullable().optional(),
|
|
6255
|
+
tool_calls: external_exports.array(journeyToolCallSchema).optional(),
|
|
6256
|
+
tool_call_id: external_exports.string().optional(),
|
|
6257
|
+
step_id: external_exports.string().optional()
|
|
6258
|
+
});
|
|
6259
|
+
journeyStepOverrideSchema = external_exports.object({
|
|
6260
|
+
number_of_runs: external_exports.number().int().positive().max(100).optional(),
|
|
6261
|
+
evaluator_instructions: external_exports.string().max(4e3).nullable().optional()
|
|
6262
|
+
});
|
|
6263
|
+
createJourneyBody = external_exports.object({
|
|
6264
|
+
hub_id: external_exports.string().uuid(),
|
|
6265
|
+
journey_name: external_exports.string().min(1).max(200),
|
|
6266
|
+
responder_agent_id: external_exports.string().uuid(),
|
|
6267
|
+
transcript: external_exports.array(journeyTurnSchema).default([]),
|
|
6268
|
+
step_config: external_exports.record(journeyStepOverrideSchema).optional(),
|
|
6269
|
+
evaluator_instructions: external_exports.string().max(4e3).optional()
|
|
6270
|
+
});
|
|
6271
|
+
updateJourneyBody = external_exports.object({
|
|
6272
|
+
hub_id: external_exports.string().uuid(),
|
|
6273
|
+
journey_name: external_exports.string().min(1).max(200).optional(),
|
|
6274
|
+
responder_agent_id: external_exports.string().uuid().optional(),
|
|
6275
|
+
transcript: external_exports.array(journeyTurnSchema).optional(),
|
|
6276
|
+
step_config: external_exports.record(journeyStepOverrideSchema).optional(),
|
|
6277
|
+
evaluator_instructions: external_exports.string().max(4e3).nullable().optional(),
|
|
6278
|
+
enabled: external_exports.boolean().optional()
|
|
6279
|
+
});
|
|
6187
6280
|
getConversationsQuery = external_exports.object({
|
|
6188
6281
|
nav_item: external_exports.enum(["chat", "task", "support", "chat_task"]),
|
|
6189
6282
|
hub_team_user_id: external_exports.string().optional(),
|
|
@@ -6700,8 +6793,6 @@ var init_dist = __esm({
|
|
|
6700
6793
|
user_email: external_exports.string().email("user_email must be a valid email address")
|
|
6701
6794
|
});
|
|
6702
6795
|
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
6796
|
free_plan_max_free_orgs_per_user: external_exports.number().int().min(0).optional(),
|
|
6706
6797
|
/** Kill switch for admin debug-read endpoints. 0 = off, 1 = on. */
|
|
6707
6798
|
debug_read_enabled: external_exports.number().int().min(0).max(1).optional()
|
|
@@ -6983,7 +7074,7 @@ var init_dist = __esm({
|
|
|
6983
7074
|
external_exports.object({
|
|
6984
7075
|
target: external_exports.literal("escalated"),
|
|
6985
7076
|
gh_issue_url: githubIssueUrlSchema,
|
|
6986
|
-
ai_verdict: external_exports.string().max(
|
|
7077
|
+
ai_verdict: external_exports.string().max(2e3).optional()
|
|
6987
7078
|
}),
|
|
6988
7079
|
external_exports.object({
|
|
6989
7080
|
target: external_exports.literal("shipped"),
|
|
@@ -6995,7 +7086,7 @@ var init_dist = __esm({
|
|
|
6995
7086
|
external_exports.object({
|
|
6996
7087
|
target: external_exports.literal("dismissed"),
|
|
6997
7088
|
dismissal_reason: external_exports.string().min(1).max(1e3),
|
|
6998
|
-
ai_verdict: external_exports.string().max(
|
|
7089
|
+
ai_verdict: external_exports.string().max(2e3).optional(),
|
|
6999
7090
|
final: external_exports.boolean().optional()
|
|
7000
7091
|
})
|
|
7001
7092
|
]);
|
|
@@ -9433,6 +9524,7 @@ function writeHubFolder(hubFolder, payload) {
|
|
|
9433
9524
|
}
|
|
9434
9525
|
writeResourceFiles(hubFolder, payload.resources || []);
|
|
9435
9526
|
writeEvalYamlFiles(hubFolder, payload.evals || []);
|
|
9527
|
+
writeJourneyYamlFiles(hubFolder, payload.journeys || []);
|
|
9436
9528
|
}
|
|
9437
9529
|
function buildYamlPayload(payload) {
|
|
9438
9530
|
const result = {
|
|
@@ -9559,6 +9651,60 @@ function cleanEvalOrphans(evalsDir, writtenRelPaths) {
|
|
|
9559
9651
|
}
|
|
9560
9652
|
}
|
|
9561
9653
|
}
|
|
9654
|
+
function buildJourneyYamlObject(journeyEntry, slug) {
|
|
9655
|
+
const out = {};
|
|
9656
|
+
if (journeyEntry.id) out.id = journeyEntry.id;
|
|
9657
|
+
if (journeyEntry.name !== slug) out.name = journeyEntry.name;
|
|
9658
|
+
out.agent = journeyEntry.agent;
|
|
9659
|
+
if (journeyEntry.agent_id) out.agent_id = journeyEntry.agent_id;
|
|
9660
|
+
if (journeyEntry.enabled === false) {
|
|
9661
|
+
out.enabled = false;
|
|
9662
|
+
}
|
|
9663
|
+
if (journeyEntry.evaluator_instructions) {
|
|
9664
|
+
out.evaluator_instructions = journeyEntry.evaluator_instructions;
|
|
9665
|
+
}
|
|
9666
|
+
if (journeyEntry.transcript && journeyEntry.transcript.length > 0) {
|
|
9667
|
+
out.transcript = journeyEntry.transcript;
|
|
9668
|
+
}
|
|
9669
|
+
if (journeyEntry.step_config && Object.keys(journeyEntry.step_config).length > 0) {
|
|
9670
|
+
out.step_config = journeyEntry.step_config;
|
|
9671
|
+
}
|
|
9672
|
+
return out;
|
|
9673
|
+
}
|
|
9674
|
+
function writeJourneyYamlFiles(hubFolder, journeys) {
|
|
9675
|
+
const journeysDir = path11.join(hubFolder, "journeys");
|
|
9676
|
+
if (journeys.length === 0) {
|
|
9677
|
+
if (fs9.existsSync(journeysDir)) {
|
|
9678
|
+
cleanJourneyOrphans(journeysDir, /* @__PURE__ */ new Set());
|
|
9679
|
+
try {
|
|
9680
|
+
if (fs9.readdirSync(journeysDir).length === 0) fs9.rmdirSync(journeysDir);
|
|
9681
|
+
} catch {
|
|
9682
|
+
}
|
|
9683
|
+
}
|
|
9684
|
+
return;
|
|
9685
|
+
}
|
|
9686
|
+
if (!fs9.existsSync(journeysDir)) {
|
|
9687
|
+
fs9.mkdirSync(journeysDir, { recursive: true });
|
|
9688
|
+
}
|
|
9689
|
+
const writtenFiles = /* @__PURE__ */ new Set();
|
|
9690
|
+
const usedSlugs = /* @__PURE__ */ new Set();
|
|
9691
|
+
for (const journeyEntry of journeys) {
|
|
9692
|
+
const slug = ensureUniqueSlug(slugify(journeyEntry.name), usedSlugs);
|
|
9693
|
+
const fileName = `${slug}.yaml`;
|
|
9694
|
+
const yamlContent = yaml4.dump(buildJourneyYamlObject(journeyEntry, slug), YAML_DUMP_OPTIONS);
|
|
9695
|
+
fs9.writeFileSync(path11.join(journeysDir, fileName), yamlContent, "utf-8");
|
|
9696
|
+
writtenFiles.add(fileName);
|
|
9697
|
+
}
|
|
9698
|
+
cleanJourneyOrphans(journeysDir, writtenFiles);
|
|
9699
|
+
}
|
|
9700
|
+
function cleanJourneyOrphans(journeysDir, writtenFiles) {
|
|
9701
|
+
const entries = fs9.readdirSync(journeysDir, { withFileTypes: true });
|
|
9702
|
+
for (const entry of entries) {
|
|
9703
|
+
if (entry.isFile() && entry.name.endsWith(".yaml") && !writtenFiles.has(entry.name)) {
|
|
9704
|
+
fs9.unlinkSync(path11.join(journeysDir, entry.name));
|
|
9705
|
+
}
|
|
9706
|
+
}
|
|
9707
|
+
}
|
|
9562
9708
|
function writeResourceFiles(hubFolder, resources) {
|
|
9563
9709
|
const resourcesDir = path11.join(hubFolder, "resources");
|
|
9564
9710
|
const currentSlugs = /* @__PURE__ */ new Set();
|
|
@@ -9581,6 +9727,7 @@ var YAML_DUMP_OPTIONS;
|
|
|
9581
9727
|
var init_yaml_writer = __esm({
|
|
9582
9728
|
"src/lib/yaml-writer.ts"() {
|
|
9583
9729
|
"use strict";
|
|
9730
|
+
init_dist();
|
|
9584
9731
|
init_utils();
|
|
9585
9732
|
init_resource_files();
|
|
9586
9733
|
YAML_DUMP_OPTIONS = {
|
|
@@ -9702,6 +9849,10 @@ function parseHubFolder(hubFolder, opts) {
|
|
|
9702
9849
|
if (evals.length > 0) {
|
|
9703
9850
|
payload.evals = evals;
|
|
9704
9851
|
}
|
|
9852
|
+
const journeys = scanJourneyYamlFiles(hubFolder);
|
|
9853
|
+
if (journeys.length > 0) {
|
|
9854
|
+
payload.journeys = journeys;
|
|
9855
|
+
}
|
|
9705
9856
|
return payload;
|
|
9706
9857
|
}
|
|
9707
9858
|
function scanEvalYamlFiles(hubFolder) {
|
|
@@ -9790,6 +9941,76 @@ function parseEvalYaml(filePath, relPath, setName) {
|
|
|
9790
9941
|
}
|
|
9791
9942
|
return evalEntry;
|
|
9792
9943
|
}
|
|
9944
|
+
function scanJourneyYamlFiles(hubFolder) {
|
|
9945
|
+
const journeysDir = path12.join(hubFolder, "journeys");
|
|
9946
|
+
if (!fs10.existsSync(journeysDir)) return [];
|
|
9947
|
+
const journeys = [];
|
|
9948
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9949
|
+
const entries = fs10.readdirSync(journeysDir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
|
|
9950
|
+
for (const entry of entries) {
|
|
9951
|
+
if (entry.isDirectory()) {
|
|
9952
|
+
throw expected(
|
|
9953
|
+
`Subfolders are not supported under journeys/: ${path12.relative(hubFolder, path12.join(journeysDir, entry.name))}. A journey owns its own managed scenario set \u2014 put each journey in a single journeys/<slug>.yaml file.`
|
|
9954
|
+
);
|
|
9955
|
+
}
|
|
9956
|
+
if (!entry.isFile() || !entry.name.endsWith(".yaml")) continue;
|
|
9957
|
+
const journeyEntry = parseJourneyYaml(path12.join(journeysDir, entry.name), `journeys/${entry.name}`);
|
|
9958
|
+
if (!journeyEntry) continue;
|
|
9959
|
+
if (seen.has(journeyEntry.name)) {
|
|
9960
|
+
throw expected(
|
|
9961
|
+
`Duplicate journey: "${journeyEntry.name}" (in ${entry.name}). Each journey name must be unique.`
|
|
9962
|
+
);
|
|
9963
|
+
}
|
|
9964
|
+
seen.add(journeyEntry.name);
|
|
9965
|
+
journeys.push(journeyEntry);
|
|
9966
|
+
}
|
|
9967
|
+
return journeys;
|
|
9968
|
+
}
|
|
9969
|
+
function parseJourneyYaml(filePath, relPath) {
|
|
9970
|
+
const content = fs10.readFileSync(filePath, "utf-8");
|
|
9971
|
+
let raw;
|
|
9972
|
+
try {
|
|
9973
|
+
raw = yaml5.load(content);
|
|
9974
|
+
} catch (err) {
|
|
9975
|
+
if (err instanceof yaml5.YAMLException) {
|
|
9976
|
+
throw expected(`Invalid YAML in ${relPath}: ${err.message}`);
|
|
9977
|
+
}
|
|
9978
|
+
throw err;
|
|
9979
|
+
}
|
|
9980
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
9981
|
+
console.warn(` Warning: skipping ${relPath} (not a YAML object)`);
|
|
9982
|
+
return null;
|
|
9983
|
+
}
|
|
9984
|
+
const data = raw;
|
|
9985
|
+
const fileSlug = path12.basename(filePath, ".yaml");
|
|
9986
|
+
const journeyName = typeof data.name === "string" && data.name.trim().length > 0 ? data.name : fileSlug;
|
|
9987
|
+
if (typeof data.agent !== "string" || data.agent.trim().length === 0) {
|
|
9988
|
+
throw expected(`Journey "${journeyName}" in ${relPath}: missing required field "agent" (string).`);
|
|
9989
|
+
}
|
|
9990
|
+
if (data.transcript !== void 0 && !Array.isArray(data.transcript)) {
|
|
9991
|
+
throw expected(`Journey "${journeyName}" in ${relPath}: "transcript" must be an array.`);
|
|
9992
|
+
}
|
|
9993
|
+
if (data.step_config !== void 0 && (typeof data.step_config !== "object" || Array.isArray(data.step_config) || data.step_config === null)) {
|
|
9994
|
+
throw expected(`Journey "${journeyName}" in ${relPath}: "step_config" must be an object keyed by step_id.`);
|
|
9995
|
+
}
|
|
9996
|
+
const journeyEntry = {
|
|
9997
|
+
name: journeyName,
|
|
9998
|
+
agent: data.agent
|
|
9999
|
+
};
|
|
10000
|
+
if (typeof data.id === "string") journeyEntry.id = data.id;
|
|
10001
|
+
if (typeof data.agent_id === "string") journeyEntry.agent_id = data.agent_id;
|
|
10002
|
+
if (data.enabled === false) journeyEntry.enabled = false;
|
|
10003
|
+
if (typeof data.evaluator_instructions === "string") {
|
|
10004
|
+
journeyEntry.evaluator_instructions = data.evaluator_instructions;
|
|
10005
|
+
}
|
|
10006
|
+
if (Array.isArray(data.transcript)) {
|
|
10007
|
+
journeyEntry.transcript = data.transcript;
|
|
10008
|
+
}
|
|
10009
|
+
if (data.step_config && typeof data.step_config === "object" && !Array.isArray(data.step_config)) {
|
|
10010
|
+
journeyEntry.step_config = data.step_config;
|
|
10011
|
+
}
|
|
10012
|
+
return journeyEntry;
|
|
10013
|
+
}
|
|
9793
10014
|
function scanAgentYamlFiles(hubFolder) {
|
|
9794
10015
|
const agentsDir = path12.join(hubFolder, "agents");
|
|
9795
10016
|
if (!fs10.existsSync(agentsDir)) return [];
|
|
@@ -10104,6 +10325,12 @@ Sync complete. Preview hub: ${result.preview_hub_id}`);
|
|
|
10104
10325
|
if (c.states_created > 0) parts.push(`${c.states_created} state(s) created`);
|
|
10105
10326
|
if (c.states_updated > 0) parts.push(`${c.states_updated} state(s) updated`);
|
|
10106
10327
|
if (c.states_deleted > 0) parts.push(`${c.states_deleted} state(s) deleted`);
|
|
10328
|
+
if (c.evals_created > 0) parts.push(`${c.evals_created} eval(s) created`);
|
|
10329
|
+
if (c.evals_updated > 0) parts.push(`${c.evals_updated} eval(s) updated`);
|
|
10330
|
+
if (c.evals_deleted > 0) parts.push(`${c.evals_deleted} eval(s) deleted`);
|
|
10331
|
+
if (c.journeys_created > 0) parts.push(`${c.journeys_created} journey(s) created`);
|
|
10332
|
+
if (c.journeys_updated > 0) parts.push(`${c.journeys_updated} journey(s) updated`);
|
|
10333
|
+
if (c.journeys_deleted > 0) parts.push(`${c.journeys_deleted} journey(s) deleted`);
|
|
10107
10334
|
if (c.teams_created > 0) parts.push(`${c.teams_created} team(s) created`);
|
|
10108
10335
|
if (c.teams_updated > 0) parts.push(`${c.teams_updated} team(s) updated`);
|
|
10109
10336
|
if (c.teams_deleted > 0) parts.push(`${c.teams_deleted} team(s) deleted`);
|
|
@@ -11901,6 +12128,78 @@ var init_eval_capture = __esm({
|
|
|
11901
12128
|
}
|
|
11902
12129
|
});
|
|
11903
12130
|
|
|
12131
|
+
// src/commands/journey-capture.ts
|
|
12132
|
+
var journey_capture_exports = {};
|
|
12133
|
+
__export(journey_capture_exports, {
|
|
12134
|
+
journeyCaptureCommand: () => journeyCaptureCommand
|
|
12135
|
+
});
|
|
12136
|
+
function parseArgs9(args2) {
|
|
12137
|
+
if (args2.length === 0 || args2[0].startsWith("-")) {
|
|
12138
|
+
console.error("Usage: wayai eval journey capture <conversation_id> [--name <journey_name>] [--instructions <text>]");
|
|
12139
|
+
process.exit(1);
|
|
12140
|
+
}
|
|
12141
|
+
const conversationId = args2[0];
|
|
12142
|
+
if (!UUID_RE.test(conversationId)) {
|
|
12143
|
+
console.error(`Invalid conversation ID "${conversationId}". Expected a UUID.`);
|
|
12144
|
+
process.exit(1);
|
|
12145
|
+
}
|
|
12146
|
+
let journeyName = null;
|
|
12147
|
+
let evaluatorInstructions = null;
|
|
12148
|
+
for (let i = 1; i < args2.length; i++) {
|
|
12149
|
+
const arg = args2[i];
|
|
12150
|
+
if (arg === "--name") {
|
|
12151
|
+
journeyName = args2[++i] ?? "";
|
|
12152
|
+
if (!journeyName) {
|
|
12153
|
+
console.error("--name requires a value.");
|
|
12154
|
+
process.exit(1);
|
|
12155
|
+
}
|
|
12156
|
+
} else if (arg === "--instructions") {
|
|
12157
|
+
evaluatorInstructions = args2[++i] ?? "";
|
|
12158
|
+
if (!evaluatorInstructions) {
|
|
12159
|
+
console.error("--instructions requires a value.");
|
|
12160
|
+
process.exit(1);
|
|
12161
|
+
}
|
|
12162
|
+
} else {
|
|
12163
|
+
console.error(`Unknown argument: ${arg}`);
|
|
12164
|
+
process.exit(1);
|
|
12165
|
+
}
|
|
12166
|
+
}
|
|
12167
|
+
return { conversationId, journeyName, evaluatorInstructions };
|
|
12168
|
+
}
|
|
12169
|
+
async function journeyCaptureCommand(args2) {
|
|
12170
|
+
const hubId = resolveActiveHubId(args2);
|
|
12171
|
+
const parsed = parseArgs9(args2);
|
|
12172
|
+
const { config, accessToken } = await requireAuth();
|
|
12173
|
+
requireRepoConfig();
|
|
12174
|
+
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
12175
|
+
const journeyName = parsed.journeyName ?? `Journey ${parsed.conversationId.slice(0, 8)}`;
|
|
12176
|
+
console.log(`Capturing conversation ${parsed.conversationId} as a journey...`);
|
|
12177
|
+
const result = await client.createJourneyFromConversation({
|
|
12178
|
+
hub_id: hubId,
|
|
12179
|
+
conversation_id: parsed.conversationId,
|
|
12180
|
+
journey_name: journeyName,
|
|
12181
|
+
...parsed.evaluatorInstructions ? { evaluator_instructions: parsed.evaluatorInstructions } : {}
|
|
12182
|
+
});
|
|
12183
|
+
const journey = result.data.journey;
|
|
12184
|
+
const stepCount = findStepBoundaries(journey.transcript).length;
|
|
12185
|
+
console.log(`
|
|
12186
|
+
Created journey "${journey.journey_name}"`);
|
|
12187
|
+
console.log(` id: ${journey.journey_id}`);
|
|
12188
|
+
console.log(` steps: ${stepCount}`);
|
|
12189
|
+
console.log("\nThe journey and its eval steps are on the platform. Run `wayai run-eval` to evaluate it.");
|
|
12190
|
+
}
|
|
12191
|
+
var init_journey_capture = __esm({
|
|
12192
|
+
"src/commands/journey-capture.ts"() {
|
|
12193
|
+
"use strict";
|
|
12194
|
+
init_auth();
|
|
12195
|
+
init_repo_config();
|
|
12196
|
+
init_api_client();
|
|
12197
|
+
init_workspace();
|
|
12198
|
+
init_utils();
|
|
12199
|
+
init_dist();
|
|
12200
|
+
}
|
|
12201
|
+
});
|
|
12202
|
+
|
|
11904
12203
|
// src/commands/eval.ts
|
|
11905
12204
|
var eval_exports = {};
|
|
11906
12205
|
__export(eval_exports, {
|
|
@@ -11918,6 +12217,18 @@ async function evalCommand(args2) {
|
|
|
11918
12217
|
await evalCaptureCommand2(rest);
|
|
11919
12218
|
return;
|
|
11920
12219
|
}
|
|
12220
|
+
case "journey": {
|
|
12221
|
+
const [journeySub, ...journeyRest] = rest;
|
|
12222
|
+
if (journeySub === "capture") {
|
|
12223
|
+
const { journeyCaptureCommand: journeyCaptureCommand2 } = await Promise.resolve().then(() => (init_journey_capture(), journey_capture_exports));
|
|
12224
|
+
await journeyCaptureCommand2(journeyRest);
|
|
12225
|
+
return;
|
|
12226
|
+
}
|
|
12227
|
+
console.error(`Unknown eval journey subcommand: ${journeySub ?? "(none)"}`);
|
|
12228
|
+
printHelp();
|
|
12229
|
+
process.exit(1);
|
|
12230
|
+
return;
|
|
12231
|
+
}
|
|
11921
12232
|
case "help":
|
|
11922
12233
|
case "--help":
|
|
11923
12234
|
case "-h":
|
|
@@ -11937,20 +12248,29 @@ Usage:
|
|
|
11937
12248
|
wayai eval <subcommand> [options]
|
|
11938
12249
|
|
|
11939
12250
|
Subcommands:
|
|
11940
|
-
capture <conversation_id>
|
|
11941
|
-
|
|
12251
|
+
capture <conversation_id> Capture a real conversation's last
|
|
12252
|
+
exchange as a scenario YAML in evals/.
|
|
12253
|
+
journey capture <conversation_id> Capture a real conversation's FULL
|
|
12254
|
+
transcript as a platform-managed journey.
|
|
11942
12255
|
|
|
11943
|
-
Capture flags:
|
|
12256
|
+
Capture flags (scenario):
|
|
11944
12257
|
--set <name> Scenario set folder (created if missing). Default: "Default".
|
|
11945
12258
|
--name <eval_name> Scenario name. Default: derived from conversation ID.
|
|
11946
12259
|
--instructions <text> Evaluator instructions for the scoring agent.
|
|
11947
12260
|
|
|
12261
|
+
Journey capture flags:
|
|
12262
|
+
--name <journey_name> Journey name. Default: derived from conversation ID.
|
|
12263
|
+
--instructions <text> Default evaluator instructions for the journey's steps.
|
|
12264
|
+
|
|
11948
12265
|
Examples:
|
|
11949
12266
|
wayai eval capture 11111111-2222-3333-4444-555555555555
|
|
11950
12267
|
wayai eval capture <conv_id> --set regression-suite --name "Cancel order"
|
|
12268
|
+
wayai eval journey capture <conv_id> --name "Refund happy path"
|
|
11951
12269
|
|
|
11952
12270
|
Authoring evals (create/update/delete) is file-driven \u2014 edit YAML in
|
|
11953
|
-
evals/ and run \`wayai push\`.
|
|
12271
|
+
evals/ and run \`wayai push\`. Capture commands are for production replay only.
|
|
12272
|
+
A journey owns its scenario set + steps, so it is platform-managed (no local
|
|
12273
|
+
file) \u2014 run \`wayai pull\` to bring it down if you want it in the workspace.
|
|
11954
12274
|
`.trim());
|
|
11955
12275
|
}
|
|
11956
12276
|
var init_eval = __esm({
|
|
@@ -12243,7 +12563,7 @@ function refineHubAsCodeKanbanStatuses2(config, ctx) {
|
|
|
12243
12563
|
}
|
|
12244
12564
|
}
|
|
12245
12565
|
}
|
|
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;
|
|
12566
|
+
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
12567
|
var init_contracts = __esm({
|
|
12248
12568
|
"../../packages/core/dist/contracts/index.js"() {
|
|
12249
12569
|
"use strict";
|
|
@@ -13321,6 +13641,46 @@ var init_contracts = __esm({
|
|
|
13321
13641
|
scenario_name: external_exports.string().min(1).max(200),
|
|
13322
13642
|
evaluator_instructions: external_exports.string().max(4e3).optional()
|
|
13323
13643
|
});
|
|
13644
|
+
createJourneyFromConversationBody2 = external_exports.object({
|
|
13645
|
+
hub_id: external_exports.string().uuid(),
|
|
13646
|
+
conversation_id: external_exports.string().uuid(),
|
|
13647
|
+
journey_name: external_exports.string().min(1).max(200),
|
|
13648
|
+
evaluator_instructions: external_exports.string().max(4e3).optional()
|
|
13649
|
+
});
|
|
13650
|
+
journeyIdParam2 = external_exports.object({ id: external_exports.string().uuid() });
|
|
13651
|
+
journeyToolCallSchema2 = external_exports.object({
|
|
13652
|
+
id: external_exports.string(),
|
|
13653
|
+
type: external_exports.literal("function"),
|
|
13654
|
+
function: external_exports.object({ name: external_exports.string(), arguments: external_exports.string() })
|
|
13655
|
+
});
|
|
13656
|
+
journeyTurnSchema2 = external_exports.object({
|
|
13657
|
+
role: external_exports.enum(["system", "user", "assistant", "tool"]),
|
|
13658
|
+
content: external_exports.string().nullable().optional(),
|
|
13659
|
+
tool_calls: external_exports.array(journeyToolCallSchema2).optional(),
|
|
13660
|
+
tool_call_id: external_exports.string().optional(),
|
|
13661
|
+
step_id: external_exports.string().optional()
|
|
13662
|
+
});
|
|
13663
|
+
journeyStepOverrideSchema2 = external_exports.object({
|
|
13664
|
+
number_of_runs: external_exports.number().int().positive().max(100).optional(),
|
|
13665
|
+
evaluator_instructions: external_exports.string().max(4e3).nullable().optional()
|
|
13666
|
+
});
|
|
13667
|
+
createJourneyBody2 = external_exports.object({
|
|
13668
|
+
hub_id: external_exports.string().uuid(),
|
|
13669
|
+
journey_name: external_exports.string().min(1).max(200),
|
|
13670
|
+
responder_agent_id: external_exports.string().uuid(),
|
|
13671
|
+
transcript: external_exports.array(journeyTurnSchema2).default([]),
|
|
13672
|
+
step_config: external_exports.record(journeyStepOverrideSchema2).optional(),
|
|
13673
|
+
evaluator_instructions: external_exports.string().max(4e3).optional()
|
|
13674
|
+
});
|
|
13675
|
+
updateJourneyBody2 = external_exports.object({
|
|
13676
|
+
hub_id: external_exports.string().uuid(),
|
|
13677
|
+
journey_name: external_exports.string().min(1).max(200).optional(),
|
|
13678
|
+
responder_agent_id: external_exports.string().uuid().optional(),
|
|
13679
|
+
transcript: external_exports.array(journeyTurnSchema2).optional(),
|
|
13680
|
+
step_config: external_exports.record(journeyStepOverrideSchema2).optional(),
|
|
13681
|
+
evaluator_instructions: external_exports.string().max(4e3).nullable().optional(),
|
|
13682
|
+
enabled: external_exports.boolean().optional()
|
|
13683
|
+
});
|
|
13324
13684
|
getConversationsQuery2 = external_exports.object({
|
|
13325
13685
|
nav_item: external_exports.enum(["chat", "task", "support", "chat_task"]),
|
|
13326
13686
|
hub_team_user_id: external_exports.string().optional(),
|
|
@@ -13837,8 +14197,6 @@ var init_contracts = __esm({
|
|
|
13837
14197
|
user_email: external_exports.string().email("user_email must be a valid email address")
|
|
13838
14198
|
});
|
|
13839
14199
|
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
14200
|
free_plan_max_free_orgs_per_user: external_exports.number().int().min(0).optional(),
|
|
13843
14201
|
/** Kill switch for admin debug-read endpoints. 0 = off, 1 = on. */
|
|
13844
14202
|
debug_read_enabled: external_exports.number().int().min(0).max(1).optional()
|
|
@@ -14120,7 +14478,7 @@ var init_contracts = __esm({
|
|
|
14120
14478
|
external_exports.object({
|
|
14121
14479
|
target: external_exports.literal("escalated"),
|
|
14122
14480
|
gh_issue_url: githubIssueUrlSchema2,
|
|
14123
|
-
ai_verdict: external_exports.string().max(
|
|
14481
|
+
ai_verdict: external_exports.string().max(2e3).optional()
|
|
14124
14482
|
}),
|
|
14125
14483
|
external_exports.object({
|
|
14126
14484
|
target: external_exports.literal("shipped"),
|
|
@@ -14132,7 +14490,7 @@ var init_contracts = __esm({
|
|
|
14132
14490
|
external_exports.object({
|
|
14133
14491
|
target: external_exports.literal("dismissed"),
|
|
14134
14492
|
dismissal_reason: external_exports.string().min(1).max(1e3),
|
|
14135
|
-
ai_verdict: external_exports.string().max(
|
|
14493
|
+
ai_verdict: external_exports.string().max(2e3).optional(),
|
|
14136
14494
|
final: external_exports.boolean().optional()
|
|
14137
14495
|
})
|
|
14138
14496
|
]);
|
|
@@ -15003,9 +15361,9 @@ var init_credential_utils = __esm({
|
|
|
15003
15361
|
var create_credential_exports = {};
|
|
15004
15362
|
__export(create_credential_exports, {
|
|
15005
15363
|
createCredentialCommand: () => createCredentialCommand,
|
|
15006
|
-
parseArgs: () =>
|
|
15364
|
+
parseArgs: () => parseArgs10
|
|
15007
15365
|
});
|
|
15008
|
-
function
|
|
15366
|
+
function parseArgs10(args2) {
|
|
15009
15367
|
let name;
|
|
15010
15368
|
let type;
|
|
15011
15369
|
let orgId;
|
|
@@ -15033,7 +15391,7 @@ function parseArgs9(args2) {
|
|
|
15033
15391
|
return { name, type, orgId, description, tags: splitTagRefs(tags), environment, stdin };
|
|
15034
15392
|
}
|
|
15035
15393
|
async function createCredentialCommand(args2) {
|
|
15036
|
-
const parsed =
|
|
15394
|
+
const parsed = parseArgs10(args2);
|
|
15037
15395
|
if (!parsed.name) {
|
|
15038
15396
|
console.error("Missing required flag: --name <credential-name>");
|
|
15039
15397
|
console.error('Usage: wayai create-credential --name "openai-key" --type "Bearer Token"');
|
|
@@ -15140,10 +15498,10 @@ var init_create_credential = __esm({
|
|
|
15140
15498
|
// src/commands/update-credential.ts
|
|
15141
15499
|
var update_credential_exports = {};
|
|
15142
15500
|
__export(update_credential_exports, {
|
|
15143
|
-
parseArgs: () =>
|
|
15501
|
+
parseArgs: () => parseArgs11,
|
|
15144
15502
|
updateCredentialCommand: () => updateCredentialCommand
|
|
15145
15503
|
});
|
|
15146
|
-
function
|
|
15504
|
+
function parseArgs11(args2) {
|
|
15147
15505
|
let name;
|
|
15148
15506
|
let rename;
|
|
15149
15507
|
let orgId;
|
|
@@ -15176,7 +15534,7 @@ function parseArgs10(args2) {
|
|
|
15176
15534
|
return { name, rename, orgId, description, tags: splitTagRefs(tags), hasTagFlag, environment, stdin, secretPrompt };
|
|
15177
15535
|
}
|
|
15178
15536
|
async function updateCredentialCommand(args2) {
|
|
15179
|
-
const parsed =
|
|
15537
|
+
const parsed = parseArgs11(args2);
|
|
15180
15538
|
if (!parsed.name) {
|
|
15181
15539
|
console.error("Missing required flag: --name <credential-name>");
|
|
15182
15540
|
console.error('Usage: wayai update-credential --name "my-key" --stdin');
|
|
@@ -15535,9 +15893,9 @@ var init_org = __esm({
|
|
|
15535
15893
|
var list_exports = {};
|
|
15536
15894
|
__export(list_exports, {
|
|
15537
15895
|
listCommand: () => listCommand,
|
|
15538
|
-
parseArgs: () =>
|
|
15896
|
+
parseArgs: () => parseArgs12
|
|
15539
15897
|
});
|
|
15540
|
-
function
|
|
15898
|
+
function parseArgs12(args2) {
|
|
15541
15899
|
let orgId;
|
|
15542
15900
|
let json = false;
|
|
15543
15901
|
for (let i = 0; i < args2.length; i++) {
|
|
@@ -15550,7 +15908,7 @@ function parseArgs11(args2) {
|
|
|
15550
15908
|
return { orgId, json };
|
|
15551
15909
|
}
|
|
15552
15910
|
async function listCommand(args2) {
|
|
15553
|
-
const { orgId, json } =
|
|
15911
|
+
const { orgId, json } = parseArgs12(args2);
|
|
15554
15912
|
const { config, accessToken } = await requireAuth();
|
|
15555
15913
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
15556
15914
|
const { organizations } = await client.organizations();
|