@wayai/cli 0.3.166 → 0.3.168
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 +464 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4710,9 +4710,12 @@ function scoreLevels(minimum, levels) {
|
|
|
4710
4710
|
function isRecord(value) {
|
|
4711
4711
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4712
4712
|
}
|
|
4713
|
+
function normalizeDecisionsModelId(modelId) {
|
|
4714
|
+
return modelId.trim().toLowerCase();
|
|
4715
|
+
}
|
|
4713
4716
|
function isDecisionsModel(modelId) {
|
|
4714
4717
|
if (typeof modelId !== "string") return false;
|
|
4715
|
-
const normalized = modelId
|
|
4718
|
+
const normalized = normalizeDecisionsModelId(modelId);
|
|
4716
4719
|
return DECISIONS_MODEL_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
4717
4720
|
}
|
|
4718
4721
|
function checkDecisionsModelBinding(agent) {
|
|
@@ -4797,6 +4800,31 @@ function monitorRuleKeysOffTrigger(monitorConfig) {
|
|
|
4797
4800
|
const config = monitorConfig;
|
|
4798
4801
|
return MONITOR_RULE_KEYS.filter((key) => config[key] !== void 0);
|
|
4799
4802
|
}
|
|
4803
|
+
function monitorRulesStructuredOutputMessage(trigger) {
|
|
4804
|
+
const [article, consequence] = trigger === "assistant_reply" ? ["an", "every reply is delivered unjudged"] : ["a", "none of their actions runs"];
|
|
4805
|
+
return `${article} ${trigger} monitor with rules needs structured output: its rules read variables only a JSON answer carries, so on text output no rule can match and ${consequence}. Set response_format to json_schema (wayai push), or remove the rules.`;
|
|
4806
|
+
}
|
|
4807
|
+
function monitorRulesStructuredOutputRefusal(agent) {
|
|
4808
|
+
const trigger = refusedRulesTrigger(agent);
|
|
4809
|
+
return trigger === null ? null : monitorRulesStructuredOutputMessage(trigger);
|
|
4810
|
+
}
|
|
4811
|
+
function refusedRulesTrigger(agent) {
|
|
4812
|
+
if (agent.agent_role !== "monitor") return null;
|
|
4813
|
+
const config = decodedMonitorConfig(agent.monitor_config);
|
|
4814
|
+
const trigger = resolveMonitorTrigger(config);
|
|
4815
|
+
if (!MONITOR_RULE_TRIGGERS.includes(trigger)) return null;
|
|
4816
|
+
const rules = config.rules;
|
|
4817
|
+
if (!Array.isArray(rules) || rules.length === 0) return null;
|
|
4818
|
+
return agent.response_format === "json_schema" ? null : trigger;
|
|
4819
|
+
}
|
|
4820
|
+
function decodedMonitorConfig(value) {
|
|
4821
|
+
if (typeof value !== "string") return value;
|
|
4822
|
+
try {
|
|
4823
|
+
return JSON.parse(value);
|
|
4824
|
+
} catch {
|
|
4825
|
+
return null;
|
|
4826
|
+
}
|
|
4827
|
+
}
|
|
4800
4828
|
function monitorRuleActionKinds(trigger) {
|
|
4801
4829
|
return trigger === "assistant_reply" ? MONITOR_ASSISTANT_REPLY_ACTION_KINDS : MONITOR_USER_MESSAGE_ACTION_KINDS;
|
|
4802
4830
|
}
|
|
@@ -4945,6 +4973,10 @@ function refineDecisionsModelBinding(body, ctx) {
|
|
|
4945
4973
|
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["agent_settings", "model"], message: refusal2.message });
|
|
4946
4974
|
}
|
|
4947
4975
|
}
|
|
4976
|
+
function refineMonitorRulesStructuredOutput(body, ctx) {
|
|
4977
|
+
const refusal2 = monitorRulesStructuredOutputRefusal(body);
|
|
4978
|
+
if (refusal2) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["response_format"], message: refusal2 });
|
|
4979
|
+
}
|
|
4948
4980
|
function visibleLength(s) {
|
|
4949
4981
|
return s.replace(INVISIBLE_NAME_CHARS, "").length;
|
|
4950
4982
|
}
|
|
@@ -5791,7 +5823,7 @@ function refineHubAsCodeDecisionsModel(config, ctx) {
|
|
|
5791
5823
|
const refusal2 = checkDecisionsModelBinding({
|
|
5792
5824
|
model: readAgentSettingsModel(a.settings),
|
|
5793
5825
|
agent_role: a.role,
|
|
5794
|
-
response_format: responseFormat
|
|
5826
|
+
response_format: pushedResponseFormatColumn(responseFormat),
|
|
5795
5827
|
schema_json: responseFormat?.schema_json ?? null
|
|
5796
5828
|
});
|
|
5797
5829
|
if (refusal2) {
|
|
@@ -5803,7 +5835,37 @@ function refineHubAsCodeDecisionsModel(config, ctx) {
|
|
|
5803
5835
|
}
|
|
5804
5836
|
});
|
|
5805
5837
|
}
|
|
5806
|
-
var uuidSchema, paginationSchema, timestampSchema, idParamSchema, clientOptionalString, clientOptionalBoolean, clientOptionalNumber, messageAttachment, MAX_MESSAGE_BODY_BYTES, MAX_ATTACHMENTS_PER_MESSAGE, MAX_AUDIO_FILE_BASE64_BYTES, primaryRegionSchema, placementSourceSchema, orgIdParam, orgAdminIdParam, createOrganizationBody, updateOrganizationBody, addOrgAdminBody, AUTH_TYPE, ORG_CREDENTIAL_AUTH_TYPES, AUTH_TYPE_DISPLAY, LEGACY_AUTH_TYPE_MAP, VALID_AUTH_TYPES, AGENT_ROLES, SAFE_USER_ID_REGEX, SUPPORTED_LOCALES, SUMMARIZATION_THRESHOLD_MIN, SUMMARIZATION_THRESHOLD_MAX, PREVIOUS_CONVERSATIONS_MAX, FLAG_CONDITION_OPERATORS, DECISION_SCORE_MIN_LEVELS, DECISION_SCORE_MAX_LEVELS, DECISIONS_MODEL_PREFIXES, DECISION_CAPABLE_AGENT_ROLES, NATIVE_TOOL_SCHEMAS, WAYAI_CONNECTOR, BASE_NATIVE_TOOLS, NATIVE_TOOLS, NATIVE_TOOL_NAMES, previousConversationsCountField, summarizationThresholdField, flagConditionSchema, MONITOR_TRIGGERS, monitorTriggerSchema, MONITOR_FIRING_TRIGGERS, MONITOR_DELAY_SECONDS_MIN, MONITOR_IDLE_DELAY_REQUIRED_MESSAGE, MONITOR_HISTORY_MESSAGES_MAX, monitorHistoryMessagesSchema, monitorIncludeToolResultsSchema, MONITOR_INPUT_SHAPING_KEYS, MONITOR_INPUT_SHAPING_SCHEMAS, MONITOR_INPUT_SHAPING_IDLE_MESSAGE, monitorArgumentSourceSchema, MONITOR_NOTE_TEMPLATE_MAX, monitorActionSchema, monitorRuleSchema, MONITOR_RULE_KEYS, MONITOR_RULE_SCHEMAS, MONITOR_RULE_TRIGGERS, MONITOR_RULE_TRIGGER_MESSAGE, MONITOR_USER_MESSAGE_ACTION_KINDS, MONITOR_ASSISTANT_REPLY_ACTION_KINDS, INSERT_NOTE_TOOL_NAME, RUN_MONITOR_TOOL_NAME, MONITOR_RULE_ALLOWED_NATIVE_TOOLS, MONITOR_RULE_REENTRY_TOOLS, MONITOR_RULE_REENTRY_TRACKS, monitorConfigField, flagConditionsField, agentIdParam, listAgentsQuery, agentConnectionsQuery, createAgentBody, updateAgentBody, AGENT_PARAMETER_TYPES, AGENT_PARAMETER_NAME_REGEX, agentParameterCreateSchema, MAX_AGENT_PARAMETERS_PER_REQUEST, createAgentParametersBody, SLUG_REGEX, slugSchema, INVISIBLE_NAME_CHARS, MAX_KANBAN_STATUSES, MAX_FOLLOWUPS_PER_STATUS, MAX_LANES, MAX_ADDITIONAL_CONTEXT_SCHEMA_BYTES, RESERVED_TEMPLATE_DUMP_NAME, kanbanStatusSlugSchema, followupTypeSchema, EVENT_RELATIVE_FOLLOWUP_TYPES, followupTimeUnitSchema, followupIdSchema, SELECTABLE_FOLLOWUP_TYPES, MAX_LINKED_FOLLOWUP_TARGETS_PER_STATUS, followupSchema, MAX_OUTCOMES_PER_STATUS, kanbanOutcomeSchema, EXCLUSIVE_FLAG_PAIRS, kanbanStatusSchema, kanbanStatusesArraySchema, laneSchema, lanesArraySchema, hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, previewLabelField, createHubBody, updateHubBody, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam, connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, PRODUCTION_DIRECT_FIELDS, setProductionCredentialBody, 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, CONTEXT_BOUNDARIES, contextBoundarySchema, addNativeToolBody, addMcpToolBody, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody, initialValueCreateSchema, initialValueUpdateSchema, stateIdParam, listStatesQuery, stateNameSchema, createStateBody, updateStateBody, reorderStatesBody, variantAiModeSchema, experimentStatusSchema, overlayUpdateSchema, experimentIdParam, variantIdParam, listExperimentsQuery, listVariantsQuery, listOverridesQuery, deleteOverrideQuery, createExperimentBody, updateExperimentBody, setExperimentStatusBody, createVariantBody, updateVariantBody, upsertOverrideBody, orgTagIdParam, listOrgTagsQuery, ORG_TAG_NAME_REGEX, ORG_TAG_NAME_MAX_LENGTH, createOrgTagBody, updateOrgTagBody, orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody, BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery, 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, analyticsSqlTable, analyticsSqlSchemaQuery, EVAL_PACING_PRESET_NAMES, PACING_INTERVAL_MIN_MS, PACING_INTERVAL_MAX_MS, EVAL_MAX_RUNS_PER_SCENARIO, EVAL_RUN_DEADLINE_MIN_MS, EVAL_RUN_DEADLINE_MAX_MS, ISO_UTC_RE, paginationSchema2, evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, evalDateContextSchema, EVAL_FIXTURE_NAME_MAX_LENGTH, evalFixtureOverrideSchema, runSessionQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, EVAL_INITIAL_STATE_SCOPES, MAX_INITIAL_STATE_ENTRIES, evalInitialStateEntry, createEvalBody, updateEvalBody, EVAL_LIST_MAX_LIMIT, evalListLimit, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, EVAL_MAX_SELECTED_SCENARIOS, evalScenarioSelectionEntrySchema, evalScenarioSelectionSchema, sessionConfigSchema, createSessionBody, getSessionsQuery, getSessionResultsQuery, getSessionRunsQuery, evalAnalyticsQuery, getSessionCostQuery, compareSessionsQuery, evalsSqlBody, evalsSqlSchemaQuery, exportResultsQuery, validateEvalBody, hubAgentsQuery, createScenarioSetBody, updateScenarioSetBody, scenarioSetsHubQuery, createScenarioFromConversationBody, createJourneyFromConversationBody, EVAL_ATTACHMENT_HASH_REGEX, evalAttachmentRef, turnMayCarryAttachments, ATTACHMENTS_USER_ONLY_MESSAGE, journeyIdParam, journeyToolCallSchema, journeyTurnSchema, journeyStepOverrideSchema, fixtureField, createJourneyBody, updateJourneyBody, evalSessionConfigResponseSchema, evalSessionResponseSchema, evalSessionListConfigSchema, evalSessionListItemSchema, seedReleaseStatusSchema, EVAL_SESSION_NOT_QUIESCENT, getConversationsQuery, getMessagesQuery, appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, activityQuery, deletionModeSchema, deletionRequestBody, archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams, conversationIdParam, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody, copilotSuggestBody, copilotSuggestResponse, CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS, billingOrgIdParam, subscriptionItemParams, spendCapBody, growthPacksBody, portalSessionBody, checkoutSessionBody, updateBillingCurrencyBody, invoicesQuery, planKeySchema, billingStatusSchema, billingPlanTypeSchema, dataUsageCountersSchema, REKOR_ENTITLEMENT_CONTRACT_VERSION, entitlementProjectionSchema, rekorEntitlementRefreshMessageSchema, downloadBody, uploadQuery, signUrlBody, 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, MAX_RESOURCE_FILE_SIZE, MAX_10MB_BASE64_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_CARRIERS, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES, MAX_RESOURCE_ENCODED_BYTES, MAX_HUB_AS_CODE_RESOURCES, MAX_HUB_AS_CODE_RESOURCE_FILES, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES, MAX_CI_CONFIG_BODY_BYTES, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, boundedHubAsCodeResourcesSchema, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, CI_APPLY_ENTITY_KINDS, CI_APPLY_OPERATIONS, ciApplyErrorBaseSchema, ciApplyErrorSchema, ciSyncCountSchema, ciSyncChangesSchema, ciSyncWarningSchema, ciSyncResponseSchema, adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, PRICING_PLAN_ID_RE, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetBody, adminRepairLegacyOrgGrantsBody, adminRepairCompedPlansBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysBody, dataExplorerKvKeyBody, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteBody, 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, sandboxEgressPolicy, SANDBOX_EXEC_MAX_CMD_LENGTH, SANDBOX_EXEC_MAX_ALLOWLIST, SANDBOX_EXEC_MAX_TIMEOUT_MS, adminSandboxExecBody, META_ENTITY_ID_PATTERN, metaEntityId, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, passwordLoginBody, browserParams, browserFoldersQuery, browserFilesQuery, stateOperationBody, conversationListResourcesQuery, conversationReadResourceQuery, listPendingSchedulesQuery, listHubAggregateSchedulesQuery, reportSourceSchema, intakeReportSourceSchema, reportClassificationSchema, reportStatusSchema, reportLocaleSchema, reportMessageAuthorRoleSchema, reportMessageSchema, sentryRefStatusSchema, createReportBody, editReportBody, reporterReportSummarySchema, reporterListResponseSchema, getReportResponseSchema, reporterTransitionResponseSchema, 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, jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse, hubAlertsParam, hubAlertSeverity, hubAlert, hubAlertsListResponse, noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema, ADMIN_SKILL_NAME_REGEX, adminSkillNameParam, REKOR_ACTOR_TYPE_HEADER, REKOR_ACTOR_ID_HEADER, REKOR_ACTOR_LABEL_HEADER, REKOR_ACTOR_ORG_HEADER, REKOR_ACTOR_ADMIN_HEADER, REKOR_CLIENT_HEADER, REKOR_TOOL_ID_HEADER, REKOR_CLIENTS, rekorClientSchema, MAX_REKOR_TOOL_ID_LENGTH, rekorToolIdSchema, DATA_PROXY_MOUNT, DATA_PROXY_PREFIX, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, BASE_DESTRUCTION_MOUNT, BASE_DESTRUCTION_PREFIX, BASE_DESTRUCTION_CONFIRM_PATH, baseDestructionConfirmBody, BASE_DESTRUCTION_GRACE_MS, BASE_DESTRUCTION_CONFIRM_TTL_MS, BASE_DESTRUCTION_ORG_QUERY_PARAM, baseDestructionQuery, baseDestructionParam, baseDestructionInitiateBody, baseDestructionStatus, baseDestructionRequest, baseDestructionListResponse, baseDestructionInitiateResponse, baseDestructionConfirmResponse, baseDestructionCancelResponse, rekorBaseChangeMessageSchema;
|
|
5838
|
+
function pushedResponseFormatColumn(responseFormat) {
|
|
5839
|
+
return responseFormat ? "json_schema" : "text";
|
|
5840
|
+
}
|
|
5841
|
+
function refineHubAsCodeMonitorRulesOutput(config, ctx) {
|
|
5842
|
+
const agents = config?.agents;
|
|
5843
|
+
if (!Array.isArray(agents)) return;
|
|
5844
|
+
agents.forEach((agent, agentIndex) => {
|
|
5845
|
+
const a = agent;
|
|
5846
|
+
if (!a) return;
|
|
5847
|
+
const refusal2 = monitorRulesStructuredOutputRefusal({
|
|
5848
|
+
agent_role: a.role,
|
|
5849
|
+
response_format: pushedResponseFormatColumn(a.response_format),
|
|
5850
|
+
monitor_config: a.monitor_config
|
|
5851
|
+
});
|
|
5852
|
+
if (refusal2) {
|
|
5853
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["agents", agentIndex, "response_format"], message: refusal2 });
|
|
5854
|
+
}
|
|
5855
|
+
});
|
|
5856
|
+
}
|
|
5857
|
+
function parseVoiceCallsOrgAllowlist(raw) {
|
|
5858
|
+
if (typeof raw !== "string") return [];
|
|
5859
|
+
let value;
|
|
5860
|
+
try {
|
|
5861
|
+
value = JSON.parse(raw);
|
|
5862
|
+
} catch {
|
|
5863
|
+
return [];
|
|
5864
|
+
}
|
|
5865
|
+
const parsed = voiceCallsOrgAllowlistSchema.safeParse(value);
|
|
5866
|
+
return parsed.success ? parsed.data : [];
|
|
5867
|
+
}
|
|
5868
|
+
var uuidSchema, paginationSchema, timestampSchema, idParamSchema, clientOptionalString, clientOptionalBoolean, clientOptionalNumber, messageAttachment, MAX_MESSAGE_BODY_BYTES, MAX_ATTACHMENTS_PER_MESSAGE, MAX_AUDIO_FILE_BASE64_BYTES, primaryRegionSchema, placementSourceSchema, orgIdParam, orgAdminIdParam, createOrganizationBody, updateOrganizationBody, addOrgAdminBody, AUTH_TYPE, ORG_CREDENTIAL_AUTH_TYPES, AUTH_TYPE_DISPLAY, LEGACY_AUTH_TYPE_MAP, VALID_AUTH_TYPES, AGENT_ROLES, SAFE_USER_ID_REGEX, SUPPORTED_LOCALES, SUMMARIZATION_THRESHOLD_MIN, SUMMARIZATION_THRESHOLD_MAX, PREVIOUS_CONVERSATIONS_MAX, FLAG_CONDITION_OPERATORS, DECISION_SCORE_MIN_LEVELS, DECISION_SCORE_MAX_LEVELS, DECISIONS_MODEL_PREFIXES, DECISION_CAPABLE_AGENT_ROLES, NATIVE_TOOL_SCHEMAS, WAYAI_CONNECTOR, BASE_NATIVE_TOOLS, NATIVE_TOOLS, NATIVE_TOOL_NAMES, previousConversationsCountField, summarizationThresholdField, flagConditionSchema, MONITOR_TRIGGERS, monitorTriggerSchema, MONITOR_FIRING_TRIGGERS, MONITOR_DELAY_SECONDS_MIN, MONITOR_IDLE_DELAY_REQUIRED_MESSAGE, MONITOR_HISTORY_MESSAGES_MAX, monitorHistoryMessagesSchema, monitorIncludeToolResultsSchema, MONITOR_INPUT_SHAPING_KEYS, MONITOR_INPUT_SHAPING_SCHEMAS, MONITOR_INPUT_SHAPING_IDLE_MESSAGE, monitorArgumentSourceSchema, MONITOR_NOTE_TEMPLATE_MAX, monitorActionSchema, monitorRuleSchema, MONITOR_RULE_KEYS, MONITOR_RULE_SCHEMAS, MONITOR_RULE_TRIGGERS, MONITOR_RULE_TRIGGER_MESSAGE, MONITOR_USER_MESSAGE_ACTION_KINDS, MONITOR_ASSISTANT_REPLY_ACTION_KINDS, INSERT_NOTE_TOOL_NAME, RUN_MONITOR_TOOL_NAME, MONITOR_RULE_ALLOWED_NATIVE_TOOLS, MONITOR_RULE_REENTRY_TOOLS, MONITOR_RULE_REENTRY_TRACKS, monitorConfigField, flagConditionsField, agentIdParam, listAgentsQuery, agentConnectionsQuery, createAgentBody, updateAgentBody, AGENT_PARAMETER_TYPES, AGENT_PARAMETER_NAME_REGEX, agentParameterCreateSchema, MAX_AGENT_PARAMETERS_PER_REQUEST, createAgentParametersBody, SLUG_REGEX, slugSchema, INVISIBLE_NAME_CHARS, MAX_KANBAN_STATUSES, MAX_FOLLOWUPS_PER_STATUS, MAX_LANES, MAX_ADDITIONAL_CONTEXT_SCHEMA_BYTES, RESERVED_TEMPLATE_DUMP_NAME, kanbanStatusSlugSchema, followupTypeSchema, EVENT_RELATIVE_FOLLOWUP_TYPES, followupTimeUnitSchema, followupIdSchema, SELECTABLE_FOLLOWUP_TYPES, MAX_LINKED_FOLLOWUP_TARGETS_PER_STATUS, followupSchema, MAX_OUTCOMES_PER_STATUS, kanbanOutcomeSchema, EXCLUSIVE_FLAG_PAIRS, kanbanStatusSchema, kanbanStatusesArraySchema, laneSchema, lanesArraySchema, hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, previewLabelField, createHubBody, updateHubBody, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam, connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, PRODUCTION_DIRECT_FIELDS, setProductionCredentialBody, 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, CONTEXT_BOUNDARIES, contextBoundarySchema, addNativeToolBody, addMcpToolBody, createCustomToolBody, updateCustomToolBody, updateToolExecutionConfigBody, initialValueCreateSchema, initialValueUpdateSchema, stateIdParam, listStatesQuery, stateNameSchema, createStateBody, updateStateBody, reorderStatesBody, variantAiModeSchema, experimentStatusSchema, overlayUpdateSchema, experimentIdParam, variantIdParam, listExperimentsQuery, listVariantsQuery, listOverridesQuery, deleteOverrideQuery, createExperimentBody, updateExperimentBody, setExperimentStatusBody, createVariantBody, updateVariantBody, upsertOverrideBody, orgTagIdParam, listOrgTagsQuery, ORG_TAG_NAME_REGEX, ORG_TAG_NAME_MAX_LENGTH, createOrgTagBody, updateOrgTagBody, orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody, BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery, 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, analyticsSqlTable, analyticsSqlSchemaQuery, EVAL_PACING_PRESET_NAMES, PACING_INTERVAL_MIN_MS, PACING_INTERVAL_MAX_MS, EVAL_MAX_RUNS_PER_SCENARIO, EVAL_RUN_DEADLINE_MIN_MS, EVAL_RUN_DEADLINE_MAX_MS, ISO_UTC_RE, paginationSchema2, evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, evalDateContextSchema, EVAL_FIXTURE_NAME_MAX_LENGTH, evalFixtureOverrideSchema, runSessionQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, EVAL_INITIAL_STATE_SCOPES, MAX_INITIAL_STATE_ENTRIES, evalInitialStateEntry, createEvalBody, updateEvalBody, EVAL_LIST_MAX_LIMIT, evalListLimit, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, EVAL_MAX_SELECTED_SCENARIOS, evalScenarioSelectionEntrySchema, evalScenarioSelectionSchema, sessionConfigSchema, createSessionBody, getSessionsQuery, getSessionResultsQuery, getSessionRunsQuery, evalAnalyticsQuery, getSessionCostQuery, compareSessionsQuery, evalsSqlBody, evalsSqlSchemaQuery, exportResultsQuery, validateEvalBody, hubAgentsQuery, createScenarioSetBody, updateScenarioSetBody, scenarioSetsHubQuery, createScenarioFromConversationBody, createJourneyFromConversationBody, EVAL_ATTACHMENT_HASH_REGEX, evalAttachmentRef, turnMayCarryAttachments, ATTACHMENTS_USER_ONLY_MESSAGE, journeyIdParam, journeyToolCallSchema, journeyTurnSchema, journeyStepOverrideSchema, fixtureField, createJourneyBody, updateJourneyBody, evalSessionConfigResponseSchema, evalSessionResponseSchema, evalSessionListConfigSchema, evalSessionListItemSchema, seedReleaseStatusSchema, EVAL_SESSION_NOT_QUIESCENT, getConversationsQuery, getMessagesQuery, appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse, CALL_STATUSES, callStatus, CALL_END_REASONS, callEndReason, CALL_TRANSPORTS, callTransport, CALL_PARTICIPANT_TYPES, callParticipantType, callInstant, MAX_SDP_OFFER_LENGTH, sdpDescription, sdpOffer, hubScoped, callSummaryFields, callSummary, callIdParam, createCallBody, createCallResponse, callReadyBody, callHangupBody, callStatusQuery, callResponse, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, activityQuery, deletionModeSchema, deletionRequestBody, archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams, conversationIdParam, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody, copilotSuggestBody, copilotSuggestResponse, CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS, billingOrgIdParam, subscriptionItemParams, spendCapBody, growthPacksBody, portalSessionBody, checkoutSessionBody, updateBillingCurrencyBody, invoicesQuery, planKeySchema, billingStatusSchema, billingPlanTypeSchema, dataUsageCountersSchema, REKOR_ENTITLEMENT_CONTRACT_VERSION, entitlementProjectionSchema, rekorEntitlementRefreshMessageSchema, downloadBody, uploadQuery, signUrlBody, 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, MAX_RESOURCE_FILE_SIZE, MAX_10MB_BASE64_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_CARRIERS, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES, MAX_RESOURCE_ENCODED_BYTES, MAX_HUB_AS_CODE_RESOURCES, MAX_HUB_AS_CODE_RESOURCE_FILES, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES, MAX_CI_CONFIG_BODY_BYTES, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, boundedHubAsCodeResourcesSchema, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, CI_APPLY_ENTITY_KINDS, CI_APPLY_OPERATIONS, ciApplyErrorBaseSchema, ciApplyErrorSchema, ciSyncCountSchema, ciSyncChangesSchema, ciSyncWarningSchema, ciSyncResponseSchema, adminOrgIdParam, adminVoiceCallsOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, PRICING_PLAN_ID_RE, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, updatePlatformConfigBody, MAX_VOICE_CALLS_ALLOWLIST_ORGS, voiceCallsOrgAllowlistSchema, updateFreeOrgLimitBody, adminScopedTargetBody, adminRepairLegacyOrgGrantsBody, adminRepairCompedPlansBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysBody, dataExplorerKvKeyBody, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteBody, 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, sandboxEgressPolicy, SANDBOX_EXEC_MAX_CMD_LENGTH, SANDBOX_EXEC_MAX_ALLOWLIST, SANDBOX_EXEC_MAX_TIMEOUT_MS, adminSandboxExecBody, META_ENTITY_ID_PATTERN, metaEntityId, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, passwordLoginBody, browserParams, browserFoldersQuery, browserFilesQuery, stateOperationBody, conversationListResourcesQuery, conversationReadResourceQuery, listPendingSchedulesQuery, listHubAggregateSchedulesQuery, reportSourceSchema, intakeReportSourceSchema, reportClassificationSchema, reportStatusSchema, reportLocaleSchema, reportMessageAuthorRoleSchema, reportMessageSchema, sentryRefStatusSchema, createReportBody, editReportBody, reporterReportSummarySchema, reporterListResponseSchema, getReportResponseSchema, reporterTransitionResponseSchema, 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, jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse, hubAlertsParam, hubAlertSeverity, hubAlert, hubAlertsListResponse, noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema, ADMIN_SKILL_NAME_REGEX, adminSkillNameParam, REKOR_ACTOR_TYPE_HEADER, REKOR_ACTOR_ID_HEADER, REKOR_ACTOR_LABEL_HEADER, REKOR_ACTOR_ORG_HEADER, REKOR_ACTOR_ADMIN_HEADER, REKOR_CLIENT_HEADER, REKOR_TOOL_ID_HEADER, REKOR_CLIENTS, rekorClientSchema, MAX_REKOR_TOOL_ID_LENGTH, rekorToolIdSchema, DATA_PROXY_MOUNT, DATA_PROXY_PREFIX, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, BASE_DESTRUCTION_MOUNT, BASE_DESTRUCTION_PREFIX, BASE_DESTRUCTION_CONFIRM_PATH, baseDestructionConfirmBody, BASE_DESTRUCTION_GRACE_MS, BASE_DESTRUCTION_CONFIRM_TTL_MS, BASE_DESTRUCTION_ORG_QUERY_PARAM, baseDestructionQuery, baseDestructionParam, baseDestructionInitiateBody, baseDestructionStatus, baseDestructionRequest, baseDestructionListResponse, baseDestructionInitiateResponse, baseDestructionConfirmResponse, baseDestructionCancelResponse, rekorBaseChangeMessageSchema;
|
|
5807
5869
|
var init_contracts = __esm({
|
|
5808
5870
|
"../../packages/core/dist/contracts/index.js"() {
|
|
5809
5871
|
"use strict";
|
|
@@ -5859,6 +5921,7 @@ var init_contracts = __esm({
|
|
|
5859
5921
|
init_zod();
|
|
5860
5922
|
init_zod();
|
|
5861
5923
|
init_zod();
|
|
5924
|
+
init_zod();
|
|
5862
5925
|
uuidSchema = external_exports.string().uuid();
|
|
5863
5926
|
paginationSchema = external_exports.object({
|
|
5864
5927
|
limit: external_exports.coerce.number().int().min(1).max(100).default(50),
|
|
@@ -6985,7 +7048,10 @@ var init_contracts = __esm({
|
|
|
6985
7048
|
previous_conversations_count: previousConversationsCountField,
|
|
6986
7049
|
monitor_config: monitorConfigField,
|
|
6987
7050
|
flag_conditions: flagConditionsField
|
|
6988
|
-
}).passthrough().superRefine(
|
|
7051
|
+
}).passthrough().superRefine((body, ctx) => {
|
|
7052
|
+
refineDecisionsModelBinding(body, ctx);
|
|
7053
|
+
refineMonitorRulesStructuredOutput(body, ctx);
|
|
7054
|
+
});
|
|
6989
7055
|
updateAgentBody = external_exports.object({
|
|
6990
7056
|
additional_context_template: external_exports.string().max(2e4).optional(),
|
|
6991
7057
|
summarization_threshold_tokens: summarizationThresholdField,
|
|
@@ -8498,8 +8564,12 @@ var init_contracts = __esm({
|
|
|
8498
8564
|
name: clientOptionalString
|
|
8499
8565
|
}).optional(),
|
|
8500
8566
|
message: apiChannelMessage,
|
|
8501
|
-
// Idempotency key: maps to channel_message_sid
|
|
8502
|
-
//
|
|
8567
|
+
// Idempotency key: maps to channel_message_sid, deduped within one conversation
|
|
8568
|
+
// (ConversationDO.storeMessage). A retried POST resolves to the same conversation (a chat
|
|
8569
|
+
// hub's user, the external_ref, the conversation_id, or on a task hub with neither, this key
|
|
8570
|
+
// scoped by the sender), so it echoes the original message_id and skips billing / turn
|
|
8571
|
+
// dispatch. A failed store answers a retryable 503 only when this key is set; without it a
|
|
8572
|
+
// retry could store the message twice, so it answers 400.
|
|
8503
8573
|
client_message_id: external_exports.string().min(1).max(256).optional()
|
|
8504
8574
|
}).refine((b) => !(b.external_ref && b.conversation_id), {
|
|
8505
8575
|
message: "provide external_ref or conversation_id, not both",
|
|
@@ -8568,6 +8638,86 @@ var init_contracts = __esm({
|
|
|
8568
8638
|
deduped: external_exports.boolean().optional()
|
|
8569
8639
|
}).optional()
|
|
8570
8640
|
});
|
|
8641
|
+
CALL_STATUSES = ["connecting", "active", "ended"];
|
|
8642
|
+
callStatus = external_exports.enum(CALL_STATUSES);
|
|
8643
|
+
CALL_END_REASONS = [
|
|
8644
|
+
"caller_hangup",
|
|
8645
|
+
"connection_lost",
|
|
8646
|
+
"max_duration",
|
|
8647
|
+
"inactivity_timeout",
|
|
8648
|
+
"reply_gate_hold",
|
|
8649
|
+
"transferred_to_team",
|
|
8650
|
+
"team_takeover",
|
|
8651
|
+
"fail_safe_escalation",
|
|
8652
|
+
"access_not_approved",
|
|
8653
|
+
"ai_mode_changed",
|
|
8654
|
+
"conversation_closed",
|
|
8655
|
+
"channel_disabled",
|
|
8656
|
+
"voice_agent_disabled",
|
|
8657
|
+
"connection_disabled",
|
|
8658
|
+
"calls_disabled",
|
|
8659
|
+
"provider_error",
|
|
8660
|
+
"call_control_lost"
|
|
8661
|
+
];
|
|
8662
|
+
callEndReason = external_exports.enum(CALL_END_REASONS);
|
|
8663
|
+
CALL_TRANSPORTS = ["webrtc", "sip", "sfu"];
|
|
8664
|
+
callTransport = external_exports.enum(CALL_TRANSPORTS);
|
|
8665
|
+
CALL_PARTICIPANT_TYPES = ["user", "voice_agent", "team_member", "supervisor"];
|
|
8666
|
+
callParticipantType = external_exports.enum(CALL_PARTICIPANT_TYPES);
|
|
8667
|
+
callInstant = timestampSchema.refine(isIsoTimestamp, "Expected a canonical ISO timestamp");
|
|
8668
|
+
MAX_SDP_OFFER_LENGTH = 32 * 1024;
|
|
8669
|
+
sdpDescription = external_exports.string().regex(/^v=0\r?\n/, 'Expected an SDP description (starting with "v=0")');
|
|
8670
|
+
sdpOffer = sdpDescription.max(MAX_SDP_OFFER_LENGTH);
|
|
8671
|
+
hubScoped = { hub_id: external_exports.string().uuid() };
|
|
8672
|
+
callSummaryFields = {
|
|
8673
|
+
call_id: external_exports.string().uuid(),
|
|
8674
|
+
conversation_id: external_exports.string().uuid(),
|
|
8675
|
+
transport: callTransport,
|
|
8676
|
+
/** When the call was created. */
|
|
8677
|
+
started_at: callInstant
|
|
8678
|
+
};
|
|
8679
|
+
callSummary = external_exports.discriminatedUnion("status", [
|
|
8680
|
+
external_exports.object({
|
|
8681
|
+
...callSummaryFields,
|
|
8682
|
+
status: callStatus.exclude(["ended"]),
|
|
8683
|
+
ended_at: external_exports.null()
|
|
8684
|
+
}),
|
|
8685
|
+
external_exports.object({
|
|
8686
|
+
...callSummaryFields,
|
|
8687
|
+
status: external_exports.literal("ended"),
|
|
8688
|
+
ended_at: callInstant
|
|
8689
|
+
})
|
|
8690
|
+
]);
|
|
8691
|
+
callIdParam = external_exports.object({
|
|
8692
|
+
call_id: external_exports.string().uuid()
|
|
8693
|
+
});
|
|
8694
|
+
createCallBody = external_exports.object({
|
|
8695
|
+
...hubScoped,
|
|
8696
|
+
/**
|
|
8697
|
+
* Absent: the call starts a conversation. Present: the call joins that conversation,
|
|
8698
|
+
* which must be the caller's own.
|
|
8699
|
+
*
|
|
8700
|
+
* UUID-validated because conversation allocation treats a non-UUID id as absent: a
|
|
8701
|
+
* malformed id would skip the owner check and mint a new conversation instead of
|
|
8702
|
+
* being refused. An explicit `null` means absent.
|
|
8703
|
+
*/
|
|
8704
|
+
conversation_id: external_exports.string().uuid().nullish().transform((v) => v ?? void 0),
|
|
8705
|
+
/** The browser's SDP offer, sent to the provider unchanged. */
|
|
8706
|
+
sdp_offer: sdpOffer
|
|
8707
|
+
});
|
|
8708
|
+
createCallResponse = external_exports.object({
|
|
8709
|
+
call_id: external_exports.string().uuid(),
|
|
8710
|
+
/** The conversation the call is attached to — new when the request named none. */
|
|
8711
|
+
conversation_id: external_exports.string().uuid(),
|
|
8712
|
+
/** The provider's SDP answer, for the browser's `setRemoteDescription`. */
|
|
8713
|
+
sdp_answer: sdpDescription
|
|
8714
|
+
});
|
|
8715
|
+
callReadyBody = external_exports.object(hubScoped);
|
|
8716
|
+
callHangupBody = external_exports.object(hubScoped);
|
|
8717
|
+
callStatusQuery = external_exports.object(hubScoped);
|
|
8718
|
+
callResponse = external_exports.object({
|
|
8719
|
+
call: callSummary
|
|
8720
|
+
});
|
|
8571
8721
|
updateUserBody = external_exports.object({
|
|
8572
8722
|
user_language: external_exports.string().optional(),
|
|
8573
8723
|
ui_dark_mode: external_exports.boolean().optional(),
|
|
@@ -9276,6 +9426,7 @@ var init_contracts = __esm({
|
|
|
9276
9426
|
refineHubAsCodeFlagConditions(config, ctx);
|
|
9277
9427
|
refineHubAsCodeMonitorConfig(config, ctx);
|
|
9278
9428
|
refineHubAsCodeDecisionsModel(config, ctx);
|
|
9429
|
+
refineHubAsCodeMonitorRulesOutput(config, ctx);
|
|
9279
9430
|
});
|
|
9280
9431
|
ciPullHubIdParam = external_exports.object({
|
|
9281
9432
|
hub_id: ciUuidSchema
|
|
@@ -9441,6 +9592,9 @@ var init_contracts = __esm({
|
|
|
9441
9592
|
adminOrgIdParam = external_exports.object({
|
|
9442
9593
|
orgId: uuidSchema
|
|
9443
9594
|
});
|
|
9595
|
+
adminVoiceCallsOrgIdParam = external_exports.object({
|
|
9596
|
+
orgId: uuidSchema.transform((id) => id.toLowerCase())
|
|
9597
|
+
});
|
|
9444
9598
|
adminOrgAdminIdParam = external_exports.object({
|
|
9445
9599
|
orgId: uuidSchema,
|
|
9446
9600
|
// `adminId` is a `member_grant.user_id`, which for a logged-in user is the
|
|
@@ -9537,11 +9691,21 @@ var init_contracts = __esm({
|
|
|
9537
9691
|
* NOT NULL in the DDL, so the field is non-nullable here — clearing is not a
|
|
9538
9692
|
* state; setting 0 is.
|
|
9539
9693
|
*/
|
|
9540
|
-
default_eval_retention_days: external_exports.number().int().min(0).max(MAX_EVAL_RETENTION_DAYS).optional()
|
|
9694
|
+
default_eval_retention_days: external_exports.number().int().min(0).max(MAX_EVAL_RETENTION_DAYS).optional(),
|
|
9695
|
+
/**
|
|
9696
|
+
* The voice-calls kill switch, the platform half of the voice-calls rollout gate.
|
|
9697
|
+
* 0 = off (the default: every voice-call surface stays dark for every org), 1 = on.
|
|
9698
|
+
* On its own it opens nothing: an org must also be on `voice_calls_org_allowlist`,
|
|
9699
|
+
* which this body cannot write (`PUT`/`DELETE /admin/voice-calls/allowlist/:orgId`
|
|
9700
|
+
* change one org at a time). `wayai admin voice-calls enable|disable` flips this.
|
|
9701
|
+
*/
|
|
9702
|
+
voice_calls_enabled: external_exports.number().int().min(0).max(1).optional()
|
|
9541
9703
|
}).strip().refine(
|
|
9542
9704
|
(data) => Object.keys(data).length > 0,
|
|
9543
9705
|
{ message: "No fields to update" }
|
|
9544
9706
|
);
|
|
9707
|
+
MAX_VOICE_CALLS_ALLOWLIST_ORGS = 200;
|
|
9708
|
+
voiceCallsOrgAllowlistSchema = external_exports.array(uuidSchema).max(MAX_VOICE_CALLS_ALLOWLIST_ORGS);
|
|
9545
9709
|
updateFreeOrgLimitBody = external_exports.object({
|
|
9546
9710
|
max_free_orgs_override: external_exports.number().int().min(0).nullable()
|
|
9547
9711
|
});
|
|
@@ -10491,16 +10655,31 @@ var init_api_client = __esm({
|
|
|
10491
10655
|
async adminRepairLegacyOrgGrants(body) {
|
|
10492
10656
|
return this.request("POST", "/api/admin/organizations/repair-legacy-grants", body);
|
|
10493
10657
|
}
|
|
10494
|
-
// Read the platform config (platform-admin gated). Used by `wayai admin
|
|
10658
|
+
// Read the platform config (platform-admin gated). Used by every `wayai admin <gate>
|
|
10495
10659
|
// status` — grep `PlatformGate` in `commands/admin.ts` for the gates it serves.
|
|
10496
10660
|
async adminGetConfig() {
|
|
10497
10661
|
return this.request("GET", "/api/admin/config");
|
|
10498
10662
|
}
|
|
10499
10663
|
// Patch the platform config (platform-admin gated). Used by every `wayai admin
|
|
10500
|
-
// <gate> disable|enable` — `harness` flips `harness_enabled
|
|
10664
|
+
// <gate> disable|enable` — `harness` flips `harness_enabled`, `voice-calls` flips
|
|
10665
|
+
// `voice_calls_enabled`.
|
|
10501
10666
|
async adminUpdateConfig(body) {
|
|
10502
10667
|
return this.request("PATCH", "/api/admin/config", body);
|
|
10503
10668
|
}
|
|
10669
|
+
// Put one org on / take it off the voice-calls allowlist (platform-admin gated,
|
|
10670
|
+
// idempotent). Used by `wayai admin voice-calls allow|deny --org`.
|
|
10671
|
+
async adminAllowVoiceCallsOrg(orgId) {
|
|
10672
|
+
return this.request(
|
|
10673
|
+
"PUT",
|
|
10674
|
+
`/api/admin/voice-calls/allowlist/${encodeURIComponent(orgId)}`
|
|
10675
|
+
);
|
|
10676
|
+
}
|
|
10677
|
+
async adminDenyVoiceCallsOrg(orgId) {
|
|
10678
|
+
return this.request(
|
|
10679
|
+
"DELETE",
|
|
10680
|
+
`/api/admin/voice-calls/allowlist/${encodeURIComponent(orgId)}`
|
|
10681
|
+
);
|
|
10682
|
+
}
|
|
10504
10683
|
/**
|
|
10505
10684
|
* Re-discover an MCP connection's tool/resource catalog (refreshes stale
|
|
10506
10685
|
* input schemas that `push` leaves untouched). `connection` is the display
|
|
@@ -11350,9 +11529,12 @@ function scoreLevels2(minimum, levels) {
|
|
|
11350
11529
|
function isRecord3(value) {
|
|
11351
11530
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11352
11531
|
}
|
|
11532
|
+
function normalizeDecisionsModelId2(modelId) {
|
|
11533
|
+
return modelId.trim().toLowerCase();
|
|
11534
|
+
}
|
|
11353
11535
|
function isDecisionsModel2(modelId) {
|
|
11354
11536
|
if (typeof modelId !== "string") return false;
|
|
11355
|
-
const normalized = modelId
|
|
11537
|
+
const normalized = normalizeDecisionsModelId2(modelId);
|
|
11356
11538
|
return DECISIONS_MODEL_PREFIXES2.some((prefix) => normalized.startsWith(prefix));
|
|
11357
11539
|
}
|
|
11358
11540
|
function checkDecisionsModelBinding2(agent) {
|
|
@@ -11437,6 +11619,31 @@ function monitorRuleKeysOffTrigger2(monitorConfig) {
|
|
|
11437
11619
|
const config = monitorConfig;
|
|
11438
11620
|
return MONITOR_RULE_KEYS2.filter((key) => config[key] !== void 0);
|
|
11439
11621
|
}
|
|
11622
|
+
function monitorRulesStructuredOutputMessage2(trigger) {
|
|
11623
|
+
const [article, consequence] = trigger === "assistant_reply" ? ["an", "every reply is delivered unjudged"] : ["a", "none of their actions runs"];
|
|
11624
|
+
return `${article} ${trigger} monitor with rules needs structured output: its rules read variables only a JSON answer carries, so on text output no rule can match and ${consequence}. Set response_format to json_schema (wayai push), or remove the rules.`;
|
|
11625
|
+
}
|
|
11626
|
+
function monitorRulesStructuredOutputRefusal2(agent) {
|
|
11627
|
+
const trigger = refusedRulesTrigger2(agent);
|
|
11628
|
+
return trigger === null ? null : monitorRulesStructuredOutputMessage2(trigger);
|
|
11629
|
+
}
|
|
11630
|
+
function refusedRulesTrigger2(agent) {
|
|
11631
|
+
if (agent.agent_role !== "monitor") return null;
|
|
11632
|
+
const config = decodedMonitorConfig2(agent.monitor_config);
|
|
11633
|
+
const trigger = resolveMonitorTrigger2(config);
|
|
11634
|
+
if (!MONITOR_RULE_TRIGGERS2.includes(trigger)) return null;
|
|
11635
|
+
const rules = config.rules;
|
|
11636
|
+
if (!Array.isArray(rules) || rules.length === 0) return null;
|
|
11637
|
+
return agent.response_format === "json_schema" ? null : trigger;
|
|
11638
|
+
}
|
|
11639
|
+
function decodedMonitorConfig2(value) {
|
|
11640
|
+
if (typeof value !== "string") return value;
|
|
11641
|
+
try {
|
|
11642
|
+
return JSON.parse(value);
|
|
11643
|
+
} catch {
|
|
11644
|
+
return null;
|
|
11645
|
+
}
|
|
11646
|
+
}
|
|
11440
11647
|
function monitorRuleActionKinds2(trigger) {
|
|
11441
11648
|
return trigger === "assistant_reply" ? MONITOR_ASSISTANT_REPLY_ACTION_KINDS2 : MONITOR_USER_MESSAGE_ACTION_KINDS2;
|
|
11442
11649
|
}
|
|
@@ -11585,6 +11792,10 @@ function refineDecisionsModelBinding2(body, ctx) {
|
|
|
11585
11792
|
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["agent_settings", "model"], message: refusal2.message });
|
|
11586
11793
|
}
|
|
11587
11794
|
}
|
|
11795
|
+
function refineMonitorRulesStructuredOutput2(body, ctx) {
|
|
11796
|
+
const refusal2 = monitorRulesStructuredOutputRefusal2(body);
|
|
11797
|
+
if (refusal2) ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["response_format"], message: refusal2 });
|
|
11798
|
+
}
|
|
11588
11799
|
function visibleLength2(s) {
|
|
11589
11800
|
return s.replace(INVISIBLE_NAME_CHARS2, "").length;
|
|
11590
11801
|
}
|
|
@@ -12454,7 +12665,7 @@ function refineHubAsCodeDecisionsModel2(config, ctx) {
|
|
|
12454
12665
|
const refusal2 = checkDecisionsModelBinding2({
|
|
12455
12666
|
model: readAgentSettingsModel2(a.settings),
|
|
12456
12667
|
agent_role: a.role,
|
|
12457
|
-
response_format: responseFormat
|
|
12668
|
+
response_format: pushedResponseFormatColumn2(responseFormat),
|
|
12458
12669
|
schema_json: responseFormat?.schema_json ?? null
|
|
12459
12670
|
});
|
|
12460
12671
|
if (refusal2) {
|
|
@@ -12466,6 +12677,25 @@ function refineHubAsCodeDecisionsModel2(config, ctx) {
|
|
|
12466
12677
|
}
|
|
12467
12678
|
});
|
|
12468
12679
|
}
|
|
12680
|
+
function pushedResponseFormatColumn2(responseFormat) {
|
|
12681
|
+
return responseFormat ? "json_schema" : "text";
|
|
12682
|
+
}
|
|
12683
|
+
function refineHubAsCodeMonitorRulesOutput2(config, ctx) {
|
|
12684
|
+
const agents = config?.agents;
|
|
12685
|
+
if (!Array.isArray(agents)) return;
|
|
12686
|
+
agents.forEach((agent, agentIndex) => {
|
|
12687
|
+
const a = agent;
|
|
12688
|
+
if (!a) return;
|
|
12689
|
+
const refusal2 = monitorRulesStructuredOutputRefusal2({
|
|
12690
|
+
agent_role: a.role,
|
|
12691
|
+
response_format: pushedResponseFormatColumn2(a.response_format),
|
|
12692
|
+
monitor_config: a.monitor_config
|
|
12693
|
+
});
|
|
12694
|
+
if (refusal2) {
|
|
12695
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["agents", agentIndex, "response_format"], message: refusal2 });
|
|
12696
|
+
}
|
|
12697
|
+
});
|
|
12698
|
+
}
|
|
12469
12699
|
function identifyTokenType(token) {
|
|
12470
12700
|
if (token.startsWith("way_")) return "way_token";
|
|
12471
12701
|
if (token.startsWith("eyJ")) return "jwt";
|
|
@@ -12505,7 +12735,7 @@ function findStepBoundaries(transcript) {
|
|
|
12505
12735
|
}
|
|
12506
12736
|
return out;
|
|
12507
12737
|
}
|
|
12508
|
-
var UUID_RE, HEX_RE, WORKOS_ID_RE, OPAQUE_SECRET_RE, BASE64_SECRET_RE, BASE64_MARKER_RE, TOKEN_RE, SENSITIVE_FIELDS, SENSITIVE_KEY_ALTERNATION, SENSITIVE_KEY_PATTERN, JSON_CREDENTIAL_RE, QUERY_CREDENTIAL_RE, REDACTED, PROVIDER_TOKEN_RE, APP_ERROR_BRAND, AppError, LLM_RATE_LIMIT_BRAND, LlmRateLimitError, LLM_PROVIDER_HTTP_BRAND, LlmProviderHttpError, LLM_PROVIDER_CONTENT_BRAND, LlmProviderContentError, LLM_PROVIDER_TIMEOUT_BRAND, LlmProviderTimeoutError, ExternalServiceError, CHANNEL_PROVIDER_HTTP_BRAND, ChannelProviderHttpError, MEDIA_PROVIDER_HTTP_BRAND, MediaProviderHttpError, REKOR_ACTOR_TYPE_HEADER2, REKOR_ACTOR_ID_HEADER2, REKOR_ACTOR_LABEL_HEADER2, REKOR_ACTOR_ORG_HEADER2, REKOR_ACTOR_ADMIN_HEADER2, REKOR_CLIENT_HEADER2, REKOR_TOOL_ID_HEADER2, REKOR_CLIENTS2, rekorClientSchema2, MAX_REKOR_TOOL_ID_LENGTH2, rekorToolIdSchema2, DATA_PROXY_MOUNT2, DATA_PROXY_PREFIX2, DATA_PROXY_ORG_QUERY_PARAM2, MAX_PROVISIONING_BODY_BYTES2, dataProxyQuery2, rekorAttestation2, REQUIRED_REKOR_ATTESTATION_HEADERS2, BASE_DESTRUCTION_MOUNT2, BASE_DESTRUCTION_PREFIX2, BASE_DESTRUCTION_CONFIRM_PATH2, baseDestructionConfirmBody2, BASE_DESTRUCTION_GRACE_MS2, BASE_DESTRUCTION_CONFIRM_TTL_MS2, BASE_DESTRUCTION_ORG_QUERY_PARAM2, baseDestructionQuery2, baseDestructionParam2, baseDestructionInitiateBody2, baseDestructionStatus2, baseDestructionRequest2, baseDestructionListResponse2, baseDestructionInitiateResponse2, baseDestructionConfirmResponse2, baseDestructionCancelResponse2, ENDPOINT_CONFIGS, AUTH_TYPE2, ORG_CREDENTIAL_AUTH_TYPES2, AUTH_TYPE_DISPLAY2, LEGACY_AUTH_TYPE_MAP2, VALID_AUTH_TYPES2, AGENT_ROLES2, SAFE_USER_ID_REGEX2, SUPPORTED_LOCALES2, uuidSchema2, paginationSchema3, timestampSchema2, idParamSchema2, clientOptionalString2, clientOptionalBoolean2, clientOptionalNumber2, messageAttachment2, MAX_MESSAGE_BODY_BYTES2, MAX_ATTACHMENTS_PER_MESSAGE2, MAX_AUDIO_FILE_BASE64_BYTES2, primaryRegionSchema2, placementSourceSchema2, orgIdParam2, orgAdminIdParam2, createOrganizationBody2, updateOrganizationBody2, addOrgAdminBody2, SUMMARIZATION_THRESHOLD_MIN2, SUMMARIZATION_THRESHOLD_MAX2, PREVIOUS_CONVERSATIONS_MAX2, FLAG_CONDITION_OPERATORS2, DECISION_SCORE_MIN_LEVELS2, DECISION_SCORE_MAX_LEVELS2, DECISIONS_MODEL_PREFIXES2, DECISION_CAPABLE_AGENT_ROLES2, NATIVE_TOOL_SCHEMAS2, WAYAI_CONNECTOR2, BASE_NATIVE_TOOLS2, NATIVE_TOOLS2, NATIVE_TOOL_NAMES2, previousConversationsCountField2, summarizationThresholdField2, flagConditionSchema2, MONITOR_TRIGGERS2, monitorTriggerSchema2, MONITOR_FIRING_TRIGGERS2, MONITOR_DELAY_SECONDS_MIN2, MONITOR_IDLE_DELAY_REQUIRED_MESSAGE2, MONITOR_HISTORY_MESSAGES_MAX2, monitorHistoryMessagesSchema2, monitorIncludeToolResultsSchema2, MONITOR_INPUT_SHAPING_KEYS2, MONITOR_INPUT_SHAPING_SCHEMAS2, MONITOR_INPUT_SHAPING_IDLE_MESSAGE2, monitorArgumentSourceSchema2, MONITOR_NOTE_TEMPLATE_MAX2, monitorActionSchema2, monitorRuleSchema2, MONITOR_RULE_KEYS2, MONITOR_RULE_SCHEMAS2, MONITOR_RULE_TRIGGERS2, MONITOR_RULE_TRIGGER_MESSAGE2, MONITOR_USER_MESSAGE_ACTION_KINDS2, MONITOR_ASSISTANT_REPLY_ACTION_KINDS2, INSERT_NOTE_TOOL_NAME2, RUN_MONITOR_TOOL_NAME2, MONITOR_RULE_ALLOWED_NATIVE_TOOLS2, MONITOR_RULE_REENTRY_TOOLS2, MONITOR_RULE_REENTRY_TRACKS2, monitorConfigField2, flagConditionsField2, agentIdParam2, listAgentsQuery2, agentConnectionsQuery2, createAgentBody2, updateAgentBody2, AGENT_PARAMETER_TYPES2, AGENT_PARAMETER_NAME_REGEX2, agentParameterCreateSchema2, MAX_AGENT_PARAMETERS_PER_REQUEST2, createAgentParametersBody2, SLUG_REGEX2, slugSchema2, INVISIBLE_NAME_CHARS2, MAX_KANBAN_STATUSES2, MAX_FOLLOWUPS_PER_STATUS2, MAX_LANES2, MAX_ADDITIONAL_CONTEXT_SCHEMA_BYTES2, RESERVED_TEMPLATE_DUMP_NAME2, kanbanStatusSlugSchema2, followupTypeSchema2, EVENT_RELATIVE_FOLLOWUP_TYPES2, followupTimeUnitSchema2, followupIdSchema2, SELECTABLE_FOLLOWUP_TYPES2, MAX_LINKED_FOLLOWUP_TARGETS_PER_STATUS2, followupSchema2, MAX_OUTCOMES_PER_STATUS2, kanbanOutcomeSchema2, EXCLUSIVE_FLAG_PAIRS2, kanbanStatusSchema2, kanbanStatusesArraySchema2, laneSchema2, lanesArraySchema2, hubIdParam2, hubAdminIdParam2, hubUserIdParam2, hubIdentityIdParam2, hubTeamIdParam2, hubTeamUserDeleteParam2, hubSchemaQuery2, PREVIEW_LABEL_MAX_LENGTH2, MAX_ENDED_INDEX_RETENTION_DAYS2, MAX_EVAL_RETENTION_DAYS2, previewLabelField2, createHubBody2, updateHubBody2, addHubAdminBody2, addHubIdentityAuthorizationBody2, contactDecisionBody2, approveContactBody2, listContactAccessQuery2, createHubTeamBody2, updateHubTeamBody2, addHubTeamUserBody2, reassignHubUserBody2, replicatePreviewBody2, updateChannelTestIdentitiesBody2, claimCodeChannelParam2, claimCodeDeleteParam2, connectionIdParam2, connectorIdParam2, listConnectionsQuery2, deleteConnectionQuery2, addConnectionBody2, editConnectionBody2, PRODUCTION_DIRECT_FIELDS2, setProductionCredentialBody2, 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, CONTEXT_BOUNDARIES2, contextBoundarySchema2, addNativeToolBody2, addMcpToolBody2, createCustomToolBody2, updateCustomToolBody2, updateToolExecutionConfigBody2, initialValueCreateSchema2, initialValueUpdateSchema2, stateIdParam2, listStatesQuery2, stateNameSchema2, createStateBody2, updateStateBody2, reorderStatesBody2, variantAiModeSchema2, experimentStatusSchema2, overlayUpdateSchema2, experimentIdParam2, variantIdParam2, listExperimentsQuery2, listVariantsQuery2, listOverridesQuery2, deleteOverrideQuery2, createExperimentBody2, updateExperimentBody2, setExperimentStatusBody2, createVariantBody2, updateVariantBody2, upsertOverrideBody2, orgTagIdParam2, listOrgTagsQuery2, ORG_TAG_NAME_REGEX2, ORG_TAG_NAME_MAX_LENGTH2, createOrgTagBody2, updateOrgTagBody2, orgCredentialIdParam2, listOrgCredentialsQuery2, createOrgCredentialBody2, updateOrgCredentialBody2, BASE_CREDENTIAL_NAME_MAX2, baseCredentialNameSchema2, createBaseCredentialLinkBody2, baseCredentialLinkParams2, baseCredentialLinkQuery2, 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, analyticsSqlTable2, analyticsSqlSchemaQuery2, EVAL_PACING_PRESET_NAMES2, PACING_INTERVAL_MIN_MS2, PACING_INTERVAL_MAX_MS2, EVAL_MAX_RUNS_PER_SCENARIO2, EVAL_RUN_DEADLINE_MIN_MS2, EVAL_RUN_DEADLINE_MAX_MS2, ISO_UTC_RE2, paginationSchema22, evalIdParam2, sessionIdParam2, scenarioSetIdParam2, hubIdQuery2, evalDateContextSchema2, EVAL_FIXTURE_NAME_MAX_LENGTH2, evalFixtureOverrideSchema2, runSessionQuery2, EVAL_INPUT_ROLES2, EVAL_INPUT_ROLE_LIST2, ROLE_ECHO_MAX2, EVAL_INITIAL_STATE_SCOPES2, MAX_INITIAL_STATE_ENTRIES2, evalInitialStateEntry2, createEvalBody2, updateEvalBody2, EVAL_LIST_MAX_LIMIT2, evalListLimit2, getEvalsQuery2, toggleEvalBody2, bulkToggleEvalsBody2, pacingConfigSchema2, EVAL_MAX_SELECTED_SCENARIOS2, evalScenarioSelectionEntrySchema2, evalScenarioSelectionSchema2, sessionConfigSchema2, createSessionBody2, getSessionsQuery2, getSessionResultsQuery2, getSessionRunsQuery2, evalAnalyticsQuery2, getSessionCostQuery2, compareSessionsQuery2, evalsSqlBody2, evalsSqlSchemaQuery2, exportResultsQuery2, validateEvalBody2, hubAgentsQuery2, createScenarioSetBody2, updateScenarioSetBody2, scenarioSetsHubQuery2, createScenarioFromConversationBody2, createJourneyFromConversationBody2, EVAL_ATTACHMENT_HASH_REGEX2, evalAttachmentRef2, turnMayCarryAttachments2, ATTACHMENTS_USER_ONLY_MESSAGE2, journeyIdParam2, journeyToolCallSchema2, journeyTurnSchema2, journeyStepOverrideSchema2, fixtureField2, createJourneyBody2, updateJourneyBody2, evalSessionConfigResponseSchema2, evalSessionResponseSchema2, evalSessionListConfigSchema2, evalSessionListItemSchema2, seedReleaseStatusSchema2, getConversationsQuery2, getMessagesQuery2, appMessageSenderType2, appMessageReceiverType2, apiChannelMessage2, apiChannelMessageBody2, appMessageBody2, appMessageResponse2, updateUserBody2, updateProfileBody2, pathnameRegex2, updatePreferencesBody2, registerPushTokenBody2, deletePushTokenQuery2, activityQuery2, deletionModeSchema2, deletionRequestBody2, archiveHubIdParam2, archiveConversationParams2, archiveListQuery2, archiveMessageObservabilityParams2, conversationIdParam2, claimBody2, releaseBody2, transferBody2, closeBody2, additionalContextPayloadSchema2, kanbanUpdateBody2, annotateConversationBody2, observabilityParams2, observabilityListParams2, deleteUserConversationsBody2, deleteUserConversationsResponse2, sendMessageBody2, listConversationsQuery2, flagSourceSchema2, getConversationsResponse2, getConversationDetailParams2, getConversationDetailQuery2, getConversationDetailResponse2, listWhatsAppTemplatesQuery2, sendWhatsAppTemplateBody2, copilotSuggestBody2, copilotSuggestResponse2, CONSULT_THREAD_STATUSES2, consultThreadStatus2, CONSULT_THREAD_TITLE_MAX2, consultThreadTitle2, consultThreadSummary2, listConsultThreadsQuery2, listConsultThreadsResponse2, createConsultThreadBody2, createConsultThreadResponse2, consultThreadIdParam2, updateConsultThreadBody2, updateConsultThreadResponse2, CONSULT_AWAIT_TIMEOUT_MS2, billingOrgIdParam2, subscriptionItemParams2, spendCapBody2, growthPacksBody2, portalSessionBody2, checkoutSessionBody2, updateBillingCurrencyBody2, invoicesQuery2, planKeySchema2, billingStatusSchema2, billingPlanTypeSchema2, dataUsageCountersSchema2, REKOR_ENTITLEMENT_CONTRACT_VERSION2, entitlementProjectionSchema2, rekorEntitlementRefreshMessageSchema2, downloadBody2, uploadQuery2, signUrlBody2, 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, MAX_RESOURCE_FILE_SIZE2, MAX_10MB_BASE64_ENCODED_BYTES2, MAX_EVAL_ATTACHMENT_ENCODED_BYTES2, MAX_EVAL_ATTACHMENT_CARRIERS2, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES2, MAX_RESOURCE_ENCODED_BYTES2, MAX_HUB_AS_CODE_RESOURCES2, MAX_HUB_AS_CODE_RESOURCE_FILES2, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES2, MAX_CI_CONFIG_BODY_BYTES2, hubAsCodeStateSchema2, hubAsCodeResourceFileSchema2, hubAsCodeResourceSchema2, uuidPattern2, ciUuidSchema2, boundedHubAsCodeResourcesSchema2, hubAsCodeConfigSchema2, ciPullHubIdParam2, ciBranchParam2, ciPullQuery2, ciHubsQuery2, ciLookupQuery2, ciBranchesQuery2, ciSyncBody2, ciPushBody2, ciDiffBody2, ciPublishBody2, ciPublishPreviewBody2, ciSyncMcpBody2, ciOrgResourcesParam2, orgResourcesConfigSchema2, ciOrgResourcesPushBody2, ciOrgResourcesDiffBody2, CI_APPLY_ENTITY_KINDS2, CI_APPLY_OPERATIONS2, ciApplyErrorBaseSchema2, ciApplyErrorSchema2, ciSyncCountSchema2, ciSyncChangesSchema2, ciSyncWarningSchema2, ciSyncResponseSchema2, adminOrgIdParam2, adminOrgAdminIdParam2, adminUserIdParam2, PRICING_PLAN_ID_RE2, adminPlanIdParam2, adminOrganizationsQuery2, adminUserSearchQuery2, kanbanSlugMigrationQuery2, adjustQuotaBody2, updatePlanBody2, addAdminUserBody2, updatePlatformConfigBody2, updateFreeOrgLimitBody2, adminScopedTargetBody2, adminRepairLegacyOrgGrantsBody2, adminRepairCompedPlansBody2, updatePricingPlanBody2, dataExplorerSearchQuery2, dataExplorerOrgIdParam2, dataExplorerHubIdParam2, dataExplorerConvIdParam2, dataExplorerDoInstancesQuery2, dataExplorerNsIdParam2, dataExplorerKvKeysBody2, dataExplorerKvKeyBody2, uuidOrHexId2, dataExplorerDeleteOrgParam2, dataExplorerDeleteHubParam2, dataExplorerDeleteConvParam2, dataExplorerDeleteUserParam2, dataExplorerDeleteQuery2, dataExplorerKvDeleteBody2, 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, sandboxEgressPolicy2, SANDBOX_EXEC_MAX_CMD_LENGTH2, SANDBOX_EXEC_MAX_ALLOWLIST2, SANDBOX_EXEC_MAX_TIMEOUT_MS2, adminSandboxExecBody2, META_ENTITY_ID_PATTERN2, metaEntityId2, whatsappCallbackBody2, authMeResponse2, wsTicketResponse2, sessionCheckResponse2, logoutResponse2, magicCodeSendBody2, magicCodeSendResponse2, magicCodeVerifyBody2, magicCodeVerifyResponse2, passwordLoginBody2, browserParams2, browserFoldersQuery2, browserFilesQuery2, stateOperationBody2, conversationListResourcesQuery2, conversationReadResourceQuery2, listPendingSchedulesQuery2, listHubAggregateSchedulesQuery2, reportSourceSchema2, intakeReportSourceSchema2, reportClassificationSchema2, reportStatusSchema2, reportLocaleSchema2, reportMessageAuthorRoleSchema2, reportMessageSchema2, sentryRefStatusSchema2, createReportBody2, editReportBody2, reporterReportSummarySchema2, reporterListResponseSchema2, getReportResponseSchema2, reporterTransitionResponseSchema2, 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, jsonSchemaSchema2, hubUserIdentity2, stateValueEntry2, getHubUserContextResponse2, updateHubUserBody2, updateHubUserResponse2, unlockHubUserNameResponse2, stateResetParams2, stateResetResponse2, hubAlertsParam2, hubAlertSeverity2, hubAlert2, hubAlertsListResponse2, noticeSeveritySchema2, noticeStatusSchema2, NOTICE_SCOPE_REGEX2, noticeScopeSchema2, noticeLinkSchema2, createNoticeBody2, updateNoticeBody2, listNoticesQuery2, noticeIdParamSchema2, ADMIN_SKILL_NAME_REGEX2, adminSkillNameParam2, rekorBaseChangeMessageSchema2, WAYAI_WORKSPACE_LAYOUT, decisionAnswerSchema, decisionsResponseSchema;
|
|
12738
|
+
var UUID_RE, HEX_RE, WORKOS_ID_RE, OPAQUE_SECRET_RE, BASE64_SECRET_RE, BASE64_MARKER_RE, TOKEN_RE, SENSITIVE_FIELDS, SENSITIVE_KEY_ALTERNATION, SENSITIVE_KEY_PATTERN, JSON_CREDENTIAL_RE, QUERY_CREDENTIAL_RE, REDACTED, PROVIDER_TOKEN_RE, APP_ERROR_BRAND, AppError, LLM_RATE_LIMIT_BRAND, LlmRateLimitError, LLM_PROVIDER_HTTP_BRAND, LlmProviderHttpError, LLM_PROVIDER_CONTENT_BRAND, LlmProviderContentError, LLM_PROVIDER_TIMEOUT_BRAND, LlmProviderTimeoutError, ExternalServiceError, CHANNEL_PROVIDER_HTTP_BRAND, ChannelProviderHttpError, MEDIA_PROVIDER_HTTP_BRAND, MediaProviderHttpError, REKOR_ACTOR_TYPE_HEADER2, REKOR_ACTOR_ID_HEADER2, REKOR_ACTOR_LABEL_HEADER2, REKOR_ACTOR_ORG_HEADER2, REKOR_ACTOR_ADMIN_HEADER2, REKOR_CLIENT_HEADER2, REKOR_TOOL_ID_HEADER2, REKOR_CLIENTS2, rekorClientSchema2, MAX_REKOR_TOOL_ID_LENGTH2, rekorToolIdSchema2, DATA_PROXY_MOUNT2, DATA_PROXY_PREFIX2, DATA_PROXY_ORG_QUERY_PARAM2, MAX_PROVISIONING_BODY_BYTES2, dataProxyQuery2, rekorAttestation2, REQUIRED_REKOR_ATTESTATION_HEADERS2, BASE_DESTRUCTION_MOUNT2, BASE_DESTRUCTION_PREFIX2, BASE_DESTRUCTION_CONFIRM_PATH2, baseDestructionConfirmBody2, BASE_DESTRUCTION_GRACE_MS2, BASE_DESTRUCTION_CONFIRM_TTL_MS2, BASE_DESTRUCTION_ORG_QUERY_PARAM2, baseDestructionQuery2, baseDestructionParam2, baseDestructionInitiateBody2, baseDestructionStatus2, baseDestructionRequest2, baseDestructionListResponse2, baseDestructionInitiateResponse2, baseDestructionConfirmResponse2, baseDestructionCancelResponse2, ENDPOINT_CONFIGS, AUTH_TYPE2, ORG_CREDENTIAL_AUTH_TYPES2, AUTH_TYPE_DISPLAY2, LEGACY_AUTH_TYPE_MAP2, VALID_AUTH_TYPES2, AGENT_ROLES2, SAFE_USER_ID_REGEX2, SUPPORTED_LOCALES2, uuidSchema2, paginationSchema3, timestampSchema2, idParamSchema2, clientOptionalString2, clientOptionalBoolean2, clientOptionalNumber2, messageAttachment2, MAX_MESSAGE_BODY_BYTES2, MAX_ATTACHMENTS_PER_MESSAGE2, MAX_AUDIO_FILE_BASE64_BYTES2, primaryRegionSchema2, placementSourceSchema2, orgIdParam2, orgAdminIdParam2, createOrganizationBody2, updateOrganizationBody2, addOrgAdminBody2, SUMMARIZATION_THRESHOLD_MIN2, SUMMARIZATION_THRESHOLD_MAX2, PREVIOUS_CONVERSATIONS_MAX2, FLAG_CONDITION_OPERATORS2, DECISION_SCORE_MIN_LEVELS2, DECISION_SCORE_MAX_LEVELS2, DECISIONS_MODEL_PREFIXES2, DECISION_CAPABLE_AGENT_ROLES2, NATIVE_TOOL_SCHEMAS2, WAYAI_CONNECTOR2, BASE_NATIVE_TOOLS2, NATIVE_TOOLS2, NATIVE_TOOL_NAMES2, previousConversationsCountField2, summarizationThresholdField2, flagConditionSchema2, MONITOR_TRIGGERS2, monitorTriggerSchema2, MONITOR_FIRING_TRIGGERS2, MONITOR_DELAY_SECONDS_MIN2, MONITOR_IDLE_DELAY_REQUIRED_MESSAGE2, MONITOR_HISTORY_MESSAGES_MAX2, monitorHistoryMessagesSchema2, monitorIncludeToolResultsSchema2, MONITOR_INPUT_SHAPING_KEYS2, MONITOR_INPUT_SHAPING_SCHEMAS2, MONITOR_INPUT_SHAPING_IDLE_MESSAGE2, monitorArgumentSourceSchema2, MONITOR_NOTE_TEMPLATE_MAX2, monitorActionSchema2, monitorRuleSchema2, MONITOR_RULE_KEYS2, MONITOR_RULE_SCHEMAS2, MONITOR_RULE_TRIGGERS2, MONITOR_RULE_TRIGGER_MESSAGE2, MONITOR_USER_MESSAGE_ACTION_KINDS2, MONITOR_ASSISTANT_REPLY_ACTION_KINDS2, INSERT_NOTE_TOOL_NAME2, RUN_MONITOR_TOOL_NAME2, MONITOR_RULE_ALLOWED_NATIVE_TOOLS2, MONITOR_RULE_REENTRY_TOOLS2, MONITOR_RULE_REENTRY_TRACKS2, monitorConfigField2, flagConditionsField2, agentIdParam2, listAgentsQuery2, agentConnectionsQuery2, createAgentBody2, updateAgentBody2, AGENT_PARAMETER_TYPES2, AGENT_PARAMETER_NAME_REGEX2, agentParameterCreateSchema2, MAX_AGENT_PARAMETERS_PER_REQUEST2, createAgentParametersBody2, SLUG_REGEX2, slugSchema2, INVISIBLE_NAME_CHARS2, MAX_KANBAN_STATUSES2, MAX_FOLLOWUPS_PER_STATUS2, MAX_LANES2, MAX_ADDITIONAL_CONTEXT_SCHEMA_BYTES2, RESERVED_TEMPLATE_DUMP_NAME2, kanbanStatusSlugSchema2, followupTypeSchema2, EVENT_RELATIVE_FOLLOWUP_TYPES2, followupTimeUnitSchema2, followupIdSchema2, SELECTABLE_FOLLOWUP_TYPES2, MAX_LINKED_FOLLOWUP_TARGETS_PER_STATUS2, followupSchema2, MAX_OUTCOMES_PER_STATUS2, kanbanOutcomeSchema2, EXCLUSIVE_FLAG_PAIRS2, kanbanStatusSchema2, kanbanStatusesArraySchema2, laneSchema2, lanesArraySchema2, hubIdParam2, hubAdminIdParam2, hubUserIdParam2, hubIdentityIdParam2, hubTeamIdParam2, hubTeamUserDeleteParam2, hubSchemaQuery2, PREVIEW_LABEL_MAX_LENGTH2, MAX_ENDED_INDEX_RETENTION_DAYS2, MAX_EVAL_RETENTION_DAYS2, previewLabelField2, createHubBody2, updateHubBody2, addHubAdminBody2, addHubIdentityAuthorizationBody2, contactDecisionBody2, approveContactBody2, listContactAccessQuery2, createHubTeamBody2, updateHubTeamBody2, addHubTeamUserBody2, reassignHubUserBody2, replicatePreviewBody2, updateChannelTestIdentitiesBody2, claimCodeChannelParam2, claimCodeDeleteParam2, connectionIdParam2, connectorIdParam2, listConnectionsQuery2, deleteConnectionQuery2, addConnectionBody2, editConnectionBody2, PRODUCTION_DIRECT_FIELDS2, setProductionCredentialBody2, 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, CONTEXT_BOUNDARIES2, contextBoundarySchema2, addNativeToolBody2, addMcpToolBody2, createCustomToolBody2, updateCustomToolBody2, updateToolExecutionConfigBody2, initialValueCreateSchema2, initialValueUpdateSchema2, stateIdParam2, listStatesQuery2, stateNameSchema2, createStateBody2, updateStateBody2, reorderStatesBody2, variantAiModeSchema2, experimentStatusSchema2, overlayUpdateSchema2, experimentIdParam2, variantIdParam2, listExperimentsQuery2, listVariantsQuery2, listOverridesQuery2, deleteOverrideQuery2, createExperimentBody2, updateExperimentBody2, setExperimentStatusBody2, createVariantBody2, updateVariantBody2, upsertOverrideBody2, orgTagIdParam2, listOrgTagsQuery2, ORG_TAG_NAME_REGEX2, ORG_TAG_NAME_MAX_LENGTH2, createOrgTagBody2, updateOrgTagBody2, orgCredentialIdParam2, listOrgCredentialsQuery2, createOrgCredentialBody2, updateOrgCredentialBody2, BASE_CREDENTIAL_NAME_MAX2, baseCredentialNameSchema2, createBaseCredentialLinkBody2, baseCredentialLinkParams2, baseCredentialLinkQuery2, 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, analyticsSqlTable2, analyticsSqlSchemaQuery2, EVAL_PACING_PRESET_NAMES2, PACING_INTERVAL_MIN_MS2, PACING_INTERVAL_MAX_MS2, EVAL_MAX_RUNS_PER_SCENARIO2, EVAL_RUN_DEADLINE_MIN_MS2, EVAL_RUN_DEADLINE_MAX_MS2, ISO_UTC_RE2, paginationSchema22, evalIdParam2, sessionIdParam2, scenarioSetIdParam2, hubIdQuery2, evalDateContextSchema2, EVAL_FIXTURE_NAME_MAX_LENGTH2, evalFixtureOverrideSchema2, runSessionQuery2, EVAL_INPUT_ROLES2, EVAL_INPUT_ROLE_LIST2, ROLE_ECHO_MAX2, EVAL_INITIAL_STATE_SCOPES2, MAX_INITIAL_STATE_ENTRIES2, evalInitialStateEntry2, createEvalBody2, updateEvalBody2, EVAL_LIST_MAX_LIMIT2, evalListLimit2, getEvalsQuery2, toggleEvalBody2, bulkToggleEvalsBody2, pacingConfigSchema2, EVAL_MAX_SELECTED_SCENARIOS2, evalScenarioSelectionEntrySchema2, evalScenarioSelectionSchema2, sessionConfigSchema2, createSessionBody2, getSessionsQuery2, getSessionResultsQuery2, getSessionRunsQuery2, evalAnalyticsQuery2, getSessionCostQuery2, compareSessionsQuery2, evalsSqlBody2, evalsSqlSchemaQuery2, exportResultsQuery2, validateEvalBody2, hubAgentsQuery2, createScenarioSetBody2, updateScenarioSetBody2, scenarioSetsHubQuery2, createScenarioFromConversationBody2, createJourneyFromConversationBody2, EVAL_ATTACHMENT_HASH_REGEX2, evalAttachmentRef2, turnMayCarryAttachments2, ATTACHMENTS_USER_ONLY_MESSAGE2, journeyIdParam2, journeyToolCallSchema2, journeyTurnSchema2, journeyStepOverrideSchema2, fixtureField2, createJourneyBody2, updateJourneyBody2, evalSessionConfigResponseSchema2, evalSessionResponseSchema2, evalSessionListConfigSchema2, evalSessionListItemSchema2, seedReleaseStatusSchema2, getConversationsQuery2, getMessagesQuery2, appMessageSenderType2, appMessageReceiverType2, apiChannelMessage2, apiChannelMessageBody2, appMessageBody2, appMessageResponse2, CALL_STATUSES2, callStatus2, CALL_END_REASONS2, callEndReason2, CALL_TRANSPORTS2, callTransport2, CALL_PARTICIPANT_TYPES2, callParticipantType2, callInstant2, MAX_SDP_OFFER_LENGTH2, sdpDescription2, sdpOffer2, hubScoped2, callSummaryFields2, callSummary2, callIdParam2, createCallBody2, createCallResponse2, callReadyBody2, callHangupBody2, callStatusQuery2, callResponse2, updateUserBody2, updateProfileBody2, pathnameRegex2, updatePreferencesBody2, registerPushTokenBody2, deletePushTokenQuery2, activityQuery2, deletionModeSchema2, deletionRequestBody2, archiveHubIdParam2, archiveConversationParams2, archiveListQuery2, archiveMessageObservabilityParams2, conversationIdParam2, claimBody2, releaseBody2, transferBody2, closeBody2, additionalContextPayloadSchema2, kanbanUpdateBody2, annotateConversationBody2, observabilityParams2, observabilityListParams2, deleteUserConversationsBody2, deleteUserConversationsResponse2, sendMessageBody2, listConversationsQuery2, flagSourceSchema2, getConversationsResponse2, getConversationDetailParams2, getConversationDetailQuery2, getConversationDetailResponse2, listWhatsAppTemplatesQuery2, sendWhatsAppTemplateBody2, copilotSuggestBody2, copilotSuggestResponse2, CONSULT_THREAD_STATUSES2, consultThreadStatus2, CONSULT_THREAD_TITLE_MAX2, consultThreadTitle2, consultThreadSummary2, listConsultThreadsQuery2, listConsultThreadsResponse2, createConsultThreadBody2, createConsultThreadResponse2, consultThreadIdParam2, updateConsultThreadBody2, updateConsultThreadResponse2, CONSULT_AWAIT_TIMEOUT_MS2, billingOrgIdParam2, subscriptionItemParams2, spendCapBody2, growthPacksBody2, portalSessionBody2, checkoutSessionBody2, updateBillingCurrencyBody2, invoicesQuery2, planKeySchema2, billingStatusSchema2, billingPlanTypeSchema2, dataUsageCountersSchema2, REKOR_ENTITLEMENT_CONTRACT_VERSION2, entitlementProjectionSchema2, rekorEntitlementRefreshMessageSchema2, downloadBody2, uploadQuery2, signUrlBody2, 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, MAX_RESOURCE_FILE_SIZE2, MAX_10MB_BASE64_ENCODED_BYTES2, MAX_EVAL_ATTACHMENT_ENCODED_BYTES2, MAX_EVAL_ATTACHMENT_CARRIERS2, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES2, MAX_RESOURCE_ENCODED_BYTES2, MAX_HUB_AS_CODE_RESOURCES2, MAX_HUB_AS_CODE_RESOURCE_FILES2, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES2, MAX_CI_CONFIG_BODY_BYTES2, hubAsCodeStateSchema2, hubAsCodeResourceFileSchema2, hubAsCodeResourceSchema2, uuidPattern2, ciUuidSchema2, boundedHubAsCodeResourcesSchema2, hubAsCodeConfigSchema2, ciPullHubIdParam2, ciBranchParam2, ciPullQuery2, ciHubsQuery2, ciLookupQuery2, ciBranchesQuery2, ciSyncBody2, ciPushBody2, ciDiffBody2, ciPublishBody2, ciPublishPreviewBody2, ciSyncMcpBody2, ciOrgResourcesParam2, orgResourcesConfigSchema2, ciOrgResourcesPushBody2, ciOrgResourcesDiffBody2, CI_APPLY_ENTITY_KINDS2, CI_APPLY_OPERATIONS2, ciApplyErrorBaseSchema2, ciApplyErrorSchema2, ciSyncCountSchema2, ciSyncChangesSchema2, ciSyncWarningSchema2, ciSyncResponseSchema2, adminOrgIdParam2, adminVoiceCallsOrgIdParam2, adminOrgAdminIdParam2, adminUserIdParam2, PRICING_PLAN_ID_RE2, adminPlanIdParam2, adminOrganizationsQuery2, adminUserSearchQuery2, kanbanSlugMigrationQuery2, adjustQuotaBody2, updatePlanBody2, addAdminUserBody2, updatePlatformConfigBody2, MAX_VOICE_CALLS_ALLOWLIST_ORGS2, voiceCallsOrgAllowlistSchema2, updateFreeOrgLimitBody2, adminScopedTargetBody2, adminRepairLegacyOrgGrantsBody2, adminRepairCompedPlansBody2, updatePricingPlanBody2, dataExplorerSearchQuery2, dataExplorerOrgIdParam2, dataExplorerHubIdParam2, dataExplorerConvIdParam2, dataExplorerDoInstancesQuery2, dataExplorerNsIdParam2, dataExplorerKvKeysBody2, dataExplorerKvKeyBody2, uuidOrHexId2, dataExplorerDeleteOrgParam2, dataExplorerDeleteHubParam2, dataExplorerDeleteConvParam2, dataExplorerDeleteUserParam2, dataExplorerDeleteQuery2, dataExplorerKvDeleteBody2, 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, sandboxEgressPolicy2, SANDBOX_EXEC_MAX_CMD_LENGTH2, SANDBOX_EXEC_MAX_ALLOWLIST2, SANDBOX_EXEC_MAX_TIMEOUT_MS2, adminSandboxExecBody2, META_ENTITY_ID_PATTERN2, metaEntityId2, whatsappCallbackBody2, authMeResponse2, wsTicketResponse2, sessionCheckResponse2, logoutResponse2, magicCodeSendBody2, magicCodeSendResponse2, magicCodeVerifyBody2, magicCodeVerifyResponse2, passwordLoginBody2, browserParams2, browserFoldersQuery2, browserFilesQuery2, stateOperationBody2, conversationListResourcesQuery2, conversationReadResourceQuery2, listPendingSchedulesQuery2, listHubAggregateSchedulesQuery2, reportSourceSchema2, intakeReportSourceSchema2, reportClassificationSchema2, reportStatusSchema2, reportLocaleSchema2, reportMessageAuthorRoleSchema2, reportMessageSchema2, sentryRefStatusSchema2, createReportBody2, editReportBody2, reporterReportSummarySchema2, reporterListResponseSchema2, getReportResponseSchema2, reporterTransitionResponseSchema2, 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, jsonSchemaSchema2, hubUserIdentity2, stateValueEntry2, getHubUserContextResponse2, updateHubUserBody2, updateHubUserResponse2, unlockHubUserNameResponse2, stateResetParams2, stateResetResponse2, hubAlertsParam2, hubAlertSeverity2, hubAlert2, hubAlertsListResponse2, noticeSeveritySchema2, noticeStatusSchema2, NOTICE_SCOPE_REGEX2, noticeScopeSchema2, noticeLinkSchema2, createNoticeBody2, updateNoticeBody2, listNoticesQuery2, noticeIdParamSchema2, ADMIN_SKILL_NAME_REGEX2, adminSkillNameParam2, rekorBaseChangeMessageSchema2, WAYAI_WORKSPACE_LAYOUT, decisionAnswerSchema, decisionsResponseSchema;
|
|
12509
12739
|
var init_dist = __esm({
|
|
12510
12740
|
"../../packages/core/dist/index.js"() {
|
|
12511
12741
|
"use strict";
|
|
@@ -12562,6 +12792,7 @@ var init_dist = __esm({
|
|
|
12562
12792
|
init_zod();
|
|
12563
12793
|
init_zod();
|
|
12564
12794
|
init_zod();
|
|
12795
|
+
init_zod();
|
|
12565
12796
|
UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
12566
12797
|
HEX_RE = /^[0-9a-f]{16,}$/;
|
|
12567
12798
|
WORKOS_ID_RE = /^(?:user|org)_[0-9A-HJKMNP-TV-Z]{26}$/;
|
|
@@ -14142,7 +14373,10 @@ var init_dist = __esm({
|
|
|
14142
14373
|
previous_conversations_count: previousConversationsCountField2,
|
|
14143
14374
|
monitor_config: monitorConfigField2,
|
|
14144
14375
|
flag_conditions: flagConditionsField2
|
|
14145
|
-
}).passthrough().superRefine(
|
|
14376
|
+
}).passthrough().superRefine((body, ctx) => {
|
|
14377
|
+
refineDecisionsModelBinding2(body, ctx);
|
|
14378
|
+
refineMonitorRulesStructuredOutput2(body, ctx);
|
|
14379
|
+
});
|
|
14146
14380
|
updateAgentBody2 = external_exports.object({
|
|
14147
14381
|
additional_context_template: external_exports.string().max(2e4).optional(),
|
|
14148
14382
|
summarization_threshold_tokens: summarizationThresholdField2,
|
|
@@ -15650,8 +15884,12 @@ var init_dist = __esm({
|
|
|
15650
15884
|
name: clientOptionalString2
|
|
15651
15885
|
}).optional(),
|
|
15652
15886
|
message: apiChannelMessage2,
|
|
15653
|
-
// Idempotency key: maps to channel_message_sid
|
|
15654
|
-
//
|
|
15887
|
+
// Idempotency key: maps to channel_message_sid, deduped within one conversation
|
|
15888
|
+
// (ConversationDO.storeMessage). A retried POST resolves to the same conversation (a chat
|
|
15889
|
+
// hub's user, the external_ref, the conversation_id, or on a task hub with neither, this key
|
|
15890
|
+
// scoped by the sender), so it echoes the original message_id and skips billing / turn
|
|
15891
|
+
// dispatch. A failed store answers a retryable 503 only when this key is set; without it a
|
|
15892
|
+
// retry could store the message twice, so it answers 400.
|
|
15655
15893
|
client_message_id: external_exports.string().min(1).max(256).optional()
|
|
15656
15894
|
}).refine((b) => !(b.external_ref && b.conversation_id), {
|
|
15657
15895
|
message: "provide external_ref or conversation_id, not both",
|
|
@@ -15720,6 +15958,86 @@ var init_dist = __esm({
|
|
|
15720
15958
|
deduped: external_exports.boolean().optional()
|
|
15721
15959
|
}).optional()
|
|
15722
15960
|
});
|
|
15961
|
+
CALL_STATUSES2 = ["connecting", "active", "ended"];
|
|
15962
|
+
callStatus2 = external_exports.enum(CALL_STATUSES2);
|
|
15963
|
+
CALL_END_REASONS2 = [
|
|
15964
|
+
"caller_hangup",
|
|
15965
|
+
"connection_lost",
|
|
15966
|
+
"max_duration",
|
|
15967
|
+
"inactivity_timeout",
|
|
15968
|
+
"reply_gate_hold",
|
|
15969
|
+
"transferred_to_team",
|
|
15970
|
+
"team_takeover",
|
|
15971
|
+
"fail_safe_escalation",
|
|
15972
|
+
"access_not_approved",
|
|
15973
|
+
"ai_mode_changed",
|
|
15974
|
+
"conversation_closed",
|
|
15975
|
+
"channel_disabled",
|
|
15976
|
+
"voice_agent_disabled",
|
|
15977
|
+
"connection_disabled",
|
|
15978
|
+
"calls_disabled",
|
|
15979
|
+
"provider_error",
|
|
15980
|
+
"call_control_lost"
|
|
15981
|
+
];
|
|
15982
|
+
callEndReason2 = external_exports.enum(CALL_END_REASONS2);
|
|
15983
|
+
CALL_TRANSPORTS2 = ["webrtc", "sip", "sfu"];
|
|
15984
|
+
callTransport2 = external_exports.enum(CALL_TRANSPORTS2);
|
|
15985
|
+
CALL_PARTICIPANT_TYPES2 = ["user", "voice_agent", "team_member", "supervisor"];
|
|
15986
|
+
callParticipantType2 = external_exports.enum(CALL_PARTICIPANT_TYPES2);
|
|
15987
|
+
callInstant2 = timestampSchema2.refine(isIsoTimestamp2, "Expected a canonical ISO timestamp");
|
|
15988
|
+
MAX_SDP_OFFER_LENGTH2 = 32 * 1024;
|
|
15989
|
+
sdpDescription2 = external_exports.string().regex(/^v=0\r?\n/, 'Expected an SDP description (starting with "v=0")');
|
|
15990
|
+
sdpOffer2 = sdpDescription2.max(MAX_SDP_OFFER_LENGTH2);
|
|
15991
|
+
hubScoped2 = { hub_id: external_exports.string().uuid() };
|
|
15992
|
+
callSummaryFields2 = {
|
|
15993
|
+
call_id: external_exports.string().uuid(),
|
|
15994
|
+
conversation_id: external_exports.string().uuid(),
|
|
15995
|
+
transport: callTransport2,
|
|
15996
|
+
/** When the call was created. */
|
|
15997
|
+
started_at: callInstant2
|
|
15998
|
+
};
|
|
15999
|
+
callSummary2 = external_exports.discriminatedUnion("status", [
|
|
16000
|
+
external_exports.object({
|
|
16001
|
+
...callSummaryFields2,
|
|
16002
|
+
status: callStatus2.exclude(["ended"]),
|
|
16003
|
+
ended_at: external_exports.null()
|
|
16004
|
+
}),
|
|
16005
|
+
external_exports.object({
|
|
16006
|
+
...callSummaryFields2,
|
|
16007
|
+
status: external_exports.literal("ended"),
|
|
16008
|
+
ended_at: callInstant2
|
|
16009
|
+
})
|
|
16010
|
+
]);
|
|
16011
|
+
callIdParam2 = external_exports.object({
|
|
16012
|
+
call_id: external_exports.string().uuid()
|
|
16013
|
+
});
|
|
16014
|
+
createCallBody2 = external_exports.object({
|
|
16015
|
+
...hubScoped2,
|
|
16016
|
+
/**
|
|
16017
|
+
* Absent: the call starts a conversation. Present: the call joins that conversation,
|
|
16018
|
+
* which must be the caller's own.
|
|
16019
|
+
*
|
|
16020
|
+
* UUID-validated because conversation allocation treats a non-UUID id as absent: a
|
|
16021
|
+
* malformed id would skip the owner check and mint a new conversation instead of
|
|
16022
|
+
* being refused. An explicit `null` means absent.
|
|
16023
|
+
*/
|
|
16024
|
+
conversation_id: external_exports.string().uuid().nullish().transform((v) => v ?? void 0),
|
|
16025
|
+
/** The browser's SDP offer, sent to the provider unchanged. */
|
|
16026
|
+
sdp_offer: sdpOffer2
|
|
16027
|
+
});
|
|
16028
|
+
createCallResponse2 = external_exports.object({
|
|
16029
|
+
call_id: external_exports.string().uuid(),
|
|
16030
|
+
/** The conversation the call is attached to — new when the request named none. */
|
|
16031
|
+
conversation_id: external_exports.string().uuid(),
|
|
16032
|
+
/** The provider's SDP answer, for the browser's `setRemoteDescription`. */
|
|
16033
|
+
sdp_answer: sdpDescription2
|
|
16034
|
+
});
|
|
16035
|
+
callReadyBody2 = external_exports.object(hubScoped2);
|
|
16036
|
+
callHangupBody2 = external_exports.object(hubScoped2);
|
|
16037
|
+
callStatusQuery2 = external_exports.object(hubScoped2);
|
|
16038
|
+
callResponse2 = external_exports.object({
|
|
16039
|
+
call: callSummary2
|
|
16040
|
+
});
|
|
15723
16041
|
updateUserBody2 = external_exports.object({
|
|
15724
16042
|
user_language: external_exports.string().optional(),
|
|
15725
16043
|
ui_dark_mode: external_exports.boolean().optional(),
|
|
@@ -16428,6 +16746,7 @@ var init_dist = __esm({
|
|
|
16428
16746
|
refineHubAsCodeFlagConditions2(config, ctx);
|
|
16429
16747
|
refineHubAsCodeMonitorConfig2(config, ctx);
|
|
16430
16748
|
refineHubAsCodeDecisionsModel2(config, ctx);
|
|
16749
|
+
refineHubAsCodeMonitorRulesOutput2(config, ctx);
|
|
16431
16750
|
});
|
|
16432
16751
|
ciPullHubIdParam2 = external_exports.object({
|
|
16433
16752
|
hub_id: ciUuidSchema2
|
|
@@ -16593,6 +16912,9 @@ var init_dist = __esm({
|
|
|
16593
16912
|
adminOrgIdParam2 = external_exports.object({
|
|
16594
16913
|
orgId: uuidSchema2
|
|
16595
16914
|
});
|
|
16915
|
+
adminVoiceCallsOrgIdParam2 = external_exports.object({
|
|
16916
|
+
orgId: uuidSchema2.transform((id) => id.toLowerCase())
|
|
16917
|
+
});
|
|
16596
16918
|
adminOrgAdminIdParam2 = external_exports.object({
|
|
16597
16919
|
orgId: uuidSchema2,
|
|
16598
16920
|
// `adminId` is a `member_grant.user_id`, which for a logged-in user is the
|
|
@@ -16689,11 +17011,21 @@ var init_dist = __esm({
|
|
|
16689
17011
|
* NOT NULL in the DDL, so the field is non-nullable here — clearing is not a
|
|
16690
17012
|
* state; setting 0 is.
|
|
16691
17013
|
*/
|
|
16692
|
-
default_eval_retention_days: external_exports.number().int().min(0).max(MAX_EVAL_RETENTION_DAYS2).optional()
|
|
17014
|
+
default_eval_retention_days: external_exports.number().int().min(0).max(MAX_EVAL_RETENTION_DAYS2).optional(),
|
|
17015
|
+
/**
|
|
17016
|
+
* The voice-calls kill switch, the platform half of the voice-calls rollout gate.
|
|
17017
|
+
* 0 = off (the default: every voice-call surface stays dark for every org), 1 = on.
|
|
17018
|
+
* On its own it opens nothing: an org must also be on `voice_calls_org_allowlist`,
|
|
17019
|
+
* which this body cannot write (`PUT`/`DELETE /admin/voice-calls/allowlist/:orgId`
|
|
17020
|
+
* change one org at a time). `wayai admin voice-calls enable|disable` flips this.
|
|
17021
|
+
*/
|
|
17022
|
+
voice_calls_enabled: external_exports.number().int().min(0).max(1).optional()
|
|
16693
17023
|
}).strip().refine(
|
|
16694
17024
|
(data) => Object.keys(data).length > 0,
|
|
16695
17025
|
{ message: "No fields to update" }
|
|
16696
17026
|
);
|
|
17027
|
+
MAX_VOICE_CALLS_ALLOWLIST_ORGS2 = 200;
|
|
17028
|
+
voiceCallsOrgAllowlistSchema2 = external_exports.array(uuidSchema2).max(MAX_VOICE_CALLS_ALLOWLIST_ORGS2);
|
|
16697
17029
|
updateFreeOrgLimitBody2 = external_exports.object({
|
|
16698
17030
|
max_free_orgs_override: external_exports.number().int().min(0).nullable()
|
|
16699
17031
|
});
|
|
@@ -28837,6 +29169,32 @@ async function adminCommand(args2) {
|
|
|
28837
29169
|
process.exit(1);
|
|
28838
29170
|
}
|
|
28839
29171
|
}
|
|
29172
|
+
if (group === "voice-calls") {
|
|
29173
|
+
if (!sub) {
|
|
29174
|
+
printHelp2();
|
|
29175
|
+
process.exit(1);
|
|
29176
|
+
}
|
|
29177
|
+
switch (sub) {
|
|
29178
|
+
case "enable":
|
|
29179
|
+
await runVoiceCallsToggle(true, flagArgs);
|
|
29180
|
+
return;
|
|
29181
|
+
case "disable":
|
|
29182
|
+
await runVoiceCallsToggle(false, flagArgs);
|
|
29183
|
+
return;
|
|
29184
|
+
case "status":
|
|
29185
|
+
await runVoiceCallsStatus(flagArgs);
|
|
29186
|
+
return;
|
|
29187
|
+
case "allow":
|
|
29188
|
+
await runVoiceCallsAllowlist(true, flagArgs);
|
|
29189
|
+
return;
|
|
29190
|
+
case "deny":
|
|
29191
|
+
await runVoiceCallsAllowlist(false, flagArgs);
|
|
29192
|
+
return;
|
|
29193
|
+
default:
|
|
29194
|
+
printHelp2();
|
|
29195
|
+
process.exit(1);
|
|
29196
|
+
}
|
|
29197
|
+
}
|
|
28840
29198
|
printHelp2();
|
|
28841
29199
|
process.exit(1);
|
|
28842
29200
|
}
|
|
@@ -29422,7 +29780,9 @@ async function runHarnessMassDestroy(flagArgs) {
|
|
|
29422
29780
|
function rejectPlatformGateFlags(gate, sub, flagArgs) {
|
|
29423
29781
|
if (flagArgs.length === 0) return;
|
|
29424
29782
|
console.error(`Unknown flag: ${flagArgs[0]}`);
|
|
29425
|
-
console.error(
|
|
29783
|
+
console.error(
|
|
29784
|
+
gate.orgLayerCommand ? `The ${gate.label} is platform-wide; to target one org, use \`${gate.orgLayerCommand}\`.` : `The ${gate.label} is platform-wide; there is no --org/--hub layer.`
|
|
29785
|
+
);
|
|
29426
29786
|
console.error(`wayai admin ${gate.group} ${sub}`);
|
|
29427
29787
|
process.exit(1);
|
|
29428
29788
|
}
|
|
@@ -29445,21 +29805,25 @@ async function runPlatformGateStatus(gate, flagArgs) {
|
|
|
29445
29805
|
rejectPlatformGateFlags(gate, "status", flagArgs);
|
|
29446
29806
|
const { config, accessToken } = await requireAuth();
|
|
29447
29807
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
29448
|
-
let
|
|
29808
|
+
let data;
|
|
29449
29809
|
try {
|
|
29450
|
-
|
|
29451
|
-
value = readGateValue(res.data, gate.key) ?? 0;
|
|
29810
|
+
data = (await client.adminGetConfig()).data;
|
|
29452
29811
|
} catch (err) {
|
|
29453
29812
|
exitOnApiError(err);
|
|
29454
29813
|
throw err;
|
|
29455
29814
|
}
|
|
29815
|
+
const value = readGateValue(data, gate.key) ?? 0;
|
|
29456
29816
|
console.log(`${gate.key} (platform): ${value} (${value ? "ENABLED" : "DISABLED"})`);
|
|
29817
|
+
return data;
|
|
29457
29818
|
}
|
|
29458
|
-
async function
|
|
29459
|
-
rejectPlatformGateFlags(
|
|
29460
|
-
const value = await patchPlatformGate(
|
|
29819
|
+
async function runPlatformGateToggle(gate, enable, flagArgs) {
|
|
29820
|
+
rejectPlatformGateFlags(gate, "enable|disable", flagArgs);
|
|
29821
|
+
const value = await patchPlatformGate(gate, enable);
|
|
29461
29822
|
const state = enable ? "ENABLED" : "DISABLED";
|
|
29462
|
-
console.log(
|
|
29823
|
+
console.log(`${gate.displayName} ${state} platform-wide (${gate.key}=${value ?? (enable ? 1 : 0)}).`);
|
|
29824
|
+
}
|
|
29825
|
+
async function runHarnessToggle(enable, flagArgs) {
|
|
29826
|
+
await runPlatformGateToggle(HARNESS_GATE, enable, flagArgs);
|
|
29463
29827
|
if (enable) {
|
|
29464
29828
|
console.log("Harness agents may be created again and new harness turns may run.");
|
|
29465
29829
|
} else {
|
|
@@ -29467,6 +29831,60 @@ async function runHarnessToggle(enable, flagArgs) {
|
|
|
29467
29831
|
console.log("Next: run `wayai admin harness mass-destroy --all --dry-run` to see what is still live, then reap it.");
|
|
29468
29832
|
}
|
|
29469
29833
|
}
|
|
29834
|
+
async function runVoiceCallsToggle(enable, flagArgs) {
|
|
29835
|
+
await runPlatformGateToggle(VOICE_CALLS_GATE, enable, flagArgs);
|
|
29836
|
+
if (enable) {
|
|
29837
|
+
console.log("Only orgs on the allowlist get voice-call surfaces; `wayai admin voice-calls status` lists them.");
|
|
29838
|
+
} else {
|
|
29839
|
+
console.log("Every voice-call surface is dark for every org. The allowlist is kept.");
|
|
29840
|
+
}
|
|
29841
|
+
console.log(VOICE_CALLS_PROPAGATION_NOTE);
|
|
29842
|
+
}
|
|
29843
|
+
async function runVoiceCallsStatus(flagArgs) {
|
|
29844
|
+
const data = await runPlatformGateStatus(VOICE_CALLS_GATE, flagArgs);
|
|
29845
|
+
const orgIds = parseVoiceCallsOrgAllowlist(data.voice_calls_org_allowlist);
|
|
29846
|
+
console.log(`voice_calls_org_allowlist: ${orgIds.length} org(s)${orgIds.length === 0 ? " (none)" : ""}`);
|
|
29847
|
+
for (const orgId of orgIds) console.log(` ${orgId}`);
|
|
29848
|
+
}
|
|
29849
|
+
async function runVoiceCallsAllowlist(allow, flagArgs) {
|
|
29850
|
+
const usage3 = `wayai admin voice-calls ${allow ? "allow" : "deny"} --org <org_id>`;
|
|
29851
|
+
let orgId;
|
|
29852
|
+
for (let i = 0; i < flagArgs.length; i++) {
|
|
29853
|
+
if (flagArgs[i] === "--org") {
|
|
29854
|
+
orgId = requireFlagValue(flagArgs, i + 1, "--org");
|
|
29855
|
+
i++;
|
|
29856
|
+
} else {
|
|
29857
|
+
console.error(`Unknown flag: ${flagArgs[i]}`);
|
|
29858
|
+
console.error(usage3);
|
|
29859
|
+
process.exit(1);
|
|
29860
|
+
}
|
|
29861
|
+
}
|
|
29862
|
+
if (!orgId) {
|
|
29863
|
+
console.error("--org <org_id> is required");
|
|
29864
|
+
console.error(usage3);
|
|
29865
|
+
process.exit(1);
|
|
29866
|
+
}
|
|
29867
|
+
const { config, accessToken } = await requireAuth();
|
|
29868
|
+
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
29869
|
+
let data;
|
|
29870
|
+
try {
|
|
29871
|
+
data = (allow ? await client.adminAllowVoiceCallsOrg(orgId) : await client.adminDenyVoiceCallsOrg(orgId)).data;
|
|
29872
|
+
} catch (err) {
|
|
29873
|
+
if (err instanceof ApiError && err.status === 409) {
|
|
29874
|
+
console.error(`Refused: ${err.body || err.message}`);
|
|
29875
|
+
process.exit(1);
|
|
29876
|
+
}
|
|
29877
|
+
exitOnApiError(err);
|
|
29878
|
+
throw err;
|
|
29879
|
+
}
|
|
29880
|
+
const verb = allow ? "ALLOWED" : "DENIED";
|
|
29881
|
+
const note = data.changed ? "" : allow ? " (already on the allowlist)" : " (was not on the allowlist)";
|
|
29882
|
+
console.log(`Org ${data.org_id} ${verb} for voice calls${note}. Allowlist: ${data.org_ids.length} org(s).`);
|
|
29883
|
+
if (allow) {
|
|
29884
|
+
console.log("It gets voice-call surfaces only while the kill switch is on (`wayai admin voice-calls status`).");
|
|
29885
|
+
}
|
|
29886
|
+
if (data.changed) console.log(VOICE_CALLS_PROPAGATION_NOTE);
|
|
29887
|
+
}
|
|
29470
29888
|
function requireFlagValue(flagArgs, index, flag) {
|
|
29471
29889
|
const v = flagArgs[index];
|
|
29472
29890
|
if (v === void 0 || v === "" || v.startsWith("--")) {
|
|
@@ -29907,6 +30325,12 @@ Usage:
|
|
|
29907
30325
|
wayai admin harness mass-destroy --all | --org <org_id> | --hub <hub_id> [--dry-run] [--yes] [--json]
|
|
29908
30326
|
Reap every live harness sandbox/token/slot in scope (run --dry-run first to see the blast radius)
|
|
29909
30327
|
|
|
30328
|
+
wayai admin voice-calls enable Flip the platform voice_calls_enabled kill switch ON (allowlisted orgs only)
|
|
30329
|
+
wayai admin voice-calls disable Flip it OFF: every voice-call surface goes dark for every org
|
|
30330
|
+
wayai admin voice-calls status Print the kill switch and the org allowlist
|
|
30331
|
+
wayai admin voice-calls allow --org <org_id> Put one org on the voice-calls allowlist
|
|
30332
|
+
wayai admin voice-calls deny --org <org_id> Take one org off the voice-calls allowlist
|
|
30333
|
+
|
|
29910
30334
|
Sources:
|
|
29911
30335
|
do Live DO SQLite (existing conversation, hub config, etc.).
|
|
29912
30336
|
analytics ClickHouse projections (conversation, message, schedule_event).
|
|
@@ -29963,6 +30387,11 @@ Sources:
|
|
|
29963
30387
|
sandbox/token/slot that is live NOW (scope: --hub < --org < --all, prefer
|
|
29964
30388
|
the narrowest). Run \`mass-destroy --dry-run\` first to see the blast
|
|
29965
30389
|
radius.
|
|
30390
|
+
voice-calls The voice-calls rollout gate, default-deny on both layers. An org gets
|
|
30391
|
+
voice-call surfaces only while the PLATFORM-wide voice_calls_enabled
|
|
30392
|
+
switch is on (\`enable\`/\`disable\`) AND the org is on the allowlist
|
|
30393
|
+
(\`allow\`/\`deny --org\`, one org at a time, idempotent). \`disable\` darkens
|
|
30394
|
+
every org and keeps the list. Changes land within about 60 s.
|
|
29966
30395
|
|
|
29967
30396
|
Types (do): ${VALID_TYPES.join(" | ")}
|
|
29968
30397
|
Tables (analytics): ${VALID_ANALYTICS_TABLES.join(" | ")}
|
|
@@ -29999,7 +30428,7 @@ Audit + rate limit:
|
|
|
29999
30428
|
across all sources. Platform-admin grant required.
|
|
30000
30429
|
`.trim());
|
|
30001
30430
|
}
|
|
30002
|
-
var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, VALID_NOTICE_SEVERITIES;
|
|
30431
|
+
var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, VOICE_CALLS_GATE, VOICE_CALLS_PROPAGATION_NOTE, VALID_NOTICE_SEVERITIES;
|
|
30003
30432
|
var init_admin = __esm({
|
|
30004
30433
|
"src/commands/admin.ts"() {
|
|
30005
30434
|
"use strict";
|
|
@@ -30017,8 +30446,17 @@ var init_admin = __esm({
|
|
|
30017
30446
|
HARNESS_GATE = {
|
|
30018
30447
|
group: "harness",
|
|
30019
30448
|
key: "harness_enabled",
|
|
30020
|
-
label: "harness rollout gate"
|
|
30449
|
+
label: "harness rollout gate",
|
|
30450
|
+
displayName: "Harness"
|
|
30451
|
+
};
|
|
30452
|
+
VOICE_CALLS_GATE = {
|
|
30453
|
+
group: "voice-calls",
|
|
30454
|
+
key: "voice_calls_enabled",
|
|
30455
|
+
label: "voice-calls kill switch",
|
|
30456
|
+
displayName: "Voice calls",
|
|
30457
|
+
orgLayerCommand: "wayai admin voice-calls allow|deny --org <org_id>"
|
|
30021
30458
|
};
|
|
30459
|
+
VOICE_CALLS_PROPAGATION_NOTE = "Takes effect within about 60 s (the platform-config cache is dropped; KV deletes propagate eventually).";
|
|
30022
30460
|
VALID_NOTICE_SEVERITIES = ["critical", "warn", "info"];
|
|
30023
30461
|
}
|
|
30024
30462
|
});
|