@wayai/cli 0.3.170 → 0.3.172

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 CHANGED
@@ -4776,6 +4776,11 @@ function readAgentSettingsModel(agentSettings) {
4776
4776
  const model = settings.model;
4777
4777
  return typeof model === "string" ? model : null;
4778
4778
  }
4779
+ function catalogToolSideEffects(toolName) {
4780
+ const sideEffects = CATALOG_SIDE_EFFECTS.get(toolName);
4781
+ if (sideEffects === void 0) return "unknown";
4782
+ return sideEffects ? "side_effects" : "none";
4783
+ }
4779
4784
  function resolveMonitorTrigger(monitorConfig) {
4780
4785
  if (!monitorConfig || typeof monitorConfig !== "object") return "idle";
4781
4786
  const raw = monitorConfig.trigger;
@@ -4800,6 +4805,60 @@ function monitorRuleKeysOffTrigger(monitorConfig) {
4800
4805
  const config = monitorConfig;
4801
4806
  return MONITOR_RULE_KEYS.filter((key) => config[key] !== void 0);
4802
4807
  }
4808
+ function monitorCallKeysOffTrigger(monitorConfig) {
4809
+ if (!monitorConfig || typeof monitorConfig !== "object") return [];
4810
+ if (resolveMonitorTrigger(monitorConfig) === "call_utterance") return [];
4811
+ const config = monitorConfig;
4812
+ return MONITOR_CALL_KEYS.filter((key) => config[key] !== void 0);
4813
+ }
4814
+ function callUtteranceConfidenceConditions(rule) {
4815
+ if (!rule || typeof rule !== "object" || Array.isArray(rule)) return [];
4816
+ const when = rule.when;
4817
+ if (!Array.isArray(when)) return [];
4818
+ return when.filter(isConfidenceCondition);
4819
+ }
4820
+ function isConfidenceCondition(condition) {
4821
+ if (!condition || typeof condition !== "object" || Array.isArray(condition)) return false;
4822
+ const { variable, operator, value } = condition;
4823
+ if (typeof variable !== "string" || variable.length <= CONFIDENCE_VARIABLE_SUFFIX.length) return false;
4824
+ if (!variable.endsWith(CONFIDENCE_VARIABLE_SUFFIX)) return false;
4825
+ const bar = numericBar(value);
4826
+ if (bar === null || bar < CALL_STEERING_MIN_CONFIDENCE) return false;
4827
+ if (operator === ">=") return bar <= 1;
4828
+ if (operator === ">") return bar < 1;
4829
+ return false;
4830
+ }
4831
+ function numericBar(value) {
4832
+ if (typeof value === "number") return Number.isFinite(value) ? value : null;
4833
+ if (typeof value !== "string" || value.trim() === "") return null;
4834
+ const parsed = Number(value);
4835
+ return Number.isFinite(parsed) ? parsed : null;
4836
+ }
4837
+ function callUtteranceRuleIssues(monitorConfig) {
4838
+ if (!monitorConfig || typeof monitorConfig !== "object") return [];
4839
+ if (resolveMonitorTrigger(monitorConfig) !== "call_utterance") return [];
4840
+ const config = monitorConfig;
4841
+ const issues = [];
4842
+ if (config.fallback !== void 0) {
4843
+ issues.push({ path: ["fallback"], message: CALL_UTTERANCE_FALLBACK_MESSAGE });
4844
+ }
4845
+ if (Array.isArray(config.flag_conditions) && config.flag_conditions.length > 0) {
4846
+ issues.push({ path: ["flag_conditions"], message: CALL_UTTERANCE_FLAG_CONDITIONS_MESSAGE });
4847
+ }
4848
+ if (Array.isArray(config.rules)) {
4849
+ config.rules.forEach((rule, index) => {
4850
+ if (callUtteranceConfidenceConditions(rule).length === 0) {
4851
+ issues.push({ path: ["rules", index, "when"], message: CALL_UTTERANCE_RULE_NOT_CONFIDENT_MESSAGE });
4852
+ }
4853
+ const action = rule && typeof rule === "object" ? rule.action : void 0;
4854
+ const { kind, note } = action && typeof action === "object" ? action : {};
4855
+ if (kind === "steer" && typeof note === "string" && note.trim() === "") {
4856
+ issues.push({ path: ["rules", index, "action", "note"], message: CALL_STEER_NOTE_BLANK_MESSAGE });
4857
+ }
4858
+ });
4859
+ }
4860
+ return issues;
4861
+ }
4803
4862
  function monitorRulesStructuredOutputMessage(trigger) {
4804
4863
  const [article, consequence] = trigger === "assistant_reply" ? ["an", "every reply is delivered unjudged"] : ["a", "none of their actions runs"];
4805
4864
  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.`;
@@ -4826,19 +4885,31 @@ function decodedMonitorConfig(value) {
4826
4885
  }
4827
4886
  }
4828
4887
  function monitorRuleActionKinds(trigger) {
4829
- return trigger === "assistant_reply" ? MONITOR_ASSISTANT_REPLY_ACTION_KINDS : MONITOR_USER_MESSAGE_ACTION_KINDS;
4888
+ if (trigger === "assistant_reply") return MONITOR_ASSISTANT_REPLY_ACTION_KINDS;
4889
+ if (trigger === "call_utterance") return MONITOR_CALL_UTTERANCE_ACTION_KINDS;
4890
+ return MONITOR_USER_MESSAGE_ACTION_KINDS;
4830
4891
  }
4831
4892
  function monitorActionKindMessage(kind, trigger) {
4832
4893
  const allowed = monitorRuleActionKinds(trigger).join(", ");
4833
4894
  if (trigger === "assistant_reply") {
4834
4895
  return `an assistant_reply rule cannot select "${kind}". Use one of: ${allowed}.`;
4835
4896
  }
4897
+ if (trigger === "call_utterance") {
4898
+ return `a call_utterance rule cannot select "${kind}": there is no drafted reply on a live call. Use one of: ${allowed}.`;
4899
+ }
4900
+ if (kind === "steer") {
4901
+ return `a monitor rule cannot select "steer": it speaks to a live call's voice, so only a call_utterance monitor can steer. Use one of: ${allowed}.`;
4902
+ }
4836
4903
  return `a monitor rule cannot select "${kind}": it acts before the reply exists. Use one of: ${allowed}.`;
4837
4904
  }
4838
4905
  function monitorRuleReentryTrack(toolName) {
4839
4906
  return MONITOR_RULE_REENTRY_TRACKS.get(toolName);
4840
4907
  }
4841
4908
  function monitorRuleToolNotAllowedMessage(toolName, trigger) {
4909
+ if (trigger === "call_utterance") {
4910
+ const callable2 = MONITOR_RULE_ALLOWED_NATIVE_TOOLS.filter((name) => !isCallRefusedToolName(name));
4911
+ return `a call_utterance rule cannot call "${toolName}": it acts on a live call without the caller confirming anything, so it may call only a tool with no side effects \u2014 ${callable2.join(", ")}, or this hub's own HTTP tools that only read (GET, HEAD or OPTIONS). MCP tools, and tools whose effects are unknown, are refused.`;
4912
+ }
4842
4913
  if (trigger === "assistant_reply" && isReplyGateRefusedToolName(toolName)) {
4843
4914
  return `an assistant_reply rule cannot call "${toolName}": the reply already exists when this monitor runs, so there is no turn left for it to act on. Put it on a user_message monitor instead, which runs before the answering agent.`;
4844
4915
  }
@@ -4848,9 +4919,13 @@ function monitorRuleToolNotAllowedMessage(toolName, trigger) {
4848
4919
  function isReplyGateRefusedToolName(toolName) {
4849
4920
  return monitorRuleReentryTrack(toolName) === "agent" || toolName === INSERT_NOTE_TOOL_NAME;
4850
4921
  }
4922
+ function isCallRefusedToolName(toolName) {
4923
+ return toolName === INSERT_NOTE_TOOL_NAME || catalogToolSideEffects(toolName) !== "none";
4924
+ }
4851
4925
  function isRefusedNativeToolName(toolName, trigger) {
4852
4926
  if (!NATIVE_TOOL_NAMES.has(toolName)) return false;
4853
4927
  if (!MONITOR_RULE_ALLOWED_NATIVE_TOOLS.includes(toolName)) return true;
4928
+ if (trigger === "call_utterance") return isCallRefusedToolName(toolName);
4854
4929
  return trigger === "assistant_reply" && isReplyGateRefusedToolName(toolName);
4855
4930
  }
4856
4931
  function monitorRuleActions(monitorConfig) {
@@ -4875,8 +4950,9 @@ function collectMonitorRuleIssues(monitorConfig) {
4875
4950
  if (offTrigger.length > 0) return offTrigger;
4876
4951
  const trigger = resolveMonitorTrigger(monitorConfig);
4877
4952
  const kinds = monitorRuleActionKinds(trigger);
4878
- const issues = [];
4953
+ const issues = callUtteranceRuleIssues(monitorConfig);
4879
4954
  for (const { action, path: path35 } of monitorRuleActions(monitorConfig)) {
4955
+ if (trigger === "call_utterance" && path35[0] === "fallback") continue;
4880
4956
  const kind = action.kind;
4881
4957
  if (typeof kind === "string" && !kinds.includes(kind)) {
4882
4958
  issues.push({ path: [...path35, "kind"], message: monitorActionKindMessage(kind, trigger) });
@@ -5375,6 +5451,17 @@ function evalInitialStateError(input) {
5375
5451
  }
5376
5452
  return null;
5377
5453
  }
5454
+ function evalNameError(name) {
5455
+ if (name === void 0) return null;
5456
+ if (typeof name === "string" && name.trim().length > 0) return null;
5457
+ return "eval name must be a non-blank string";
5458
+ }
5459
+ function refineEvalName(value, ctx) {
5460
+ const error = evalNameError(value.eval.eval_name);
5461
+ if (error) {
5462
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["eval", "eval_name"], message: error });
5463
+ }
5464
+ }
5378
5465
  function refineEvalMessageTextRole(value, ctx) {
5379
5466
  const error = evalInputRoleError(value.eval.message_text);
5380
5467
  if (error) {
@@ -5436,6 +5523,9 @@ function unprovenRunCount(counts) {
5436
5523
  function terminalRunCount(counts) {
5437
5524
  return counts.successful_runs + counts.failed_runs;
5438
5525
  }
5526
+ function spokenLineField(label, description) {
5527
+ return { type: "text", label, maxLength: SPOKEN_LINE_MAX_CHARS, default: "", description };
5528
+ }
5439
5529
  function refineHubAsCodeCustomTools(config, ctx) {
5440
5530
  const agents = config.agents;
5441
5531
  if (!Array.isArray(agents)) return;
@@ -5532,6 +5622,14 @@ function refineHubAsCodeEvals(config, ctx) {
5532
5622
  if (!Array.isArray(evals)) return;
5533
5623
  for (let e = 0; e < evals.length; e++) {
5534
5624
  const entry = evals[e];
5625
+ const nameError = evalNameError(entry?.name);
5626
+ if (nameError) {
5627
+ ctx.addIssue({
5628
+ code: external_exports.ZodIssueCode.custom,
5629
+ path: ["evals", e, "name"],
5630
+ message: `evals[${e}]: ${nameError}`
5631
+ });
5632
+ }
5535
5633
  const error = evalInputRoleError(entry?.input);
5536
5634
  if (error) {
5537
5635
  ctx.addIssue({
@@ -5802,8 +5900,12 @@ function refineHubAsCodeMonitorConfig(config, ctx) {
5802
5900
  message: MONITOR_INPUT_SHAPING_IDLE_MESSAGE
5803
5901
  });
5804
5902
  }
5903
+ for (const key of monitorCallKeysOffTrigger(monitorConfig)) {
5904
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: [...basePath, key], message: MONITOR_CALL_KEY_MESSAGE });
5905
+ }
5805
5906
  checkKeyValues(MONITOR_INPUT_SHAPING_KEYS, MONITOR_INPUT_SHAPING_SCHEMAS);
5806
5907
  checkKeyValues(MONITOR_RULE_KEYS, MONITOR_RULE_SCHEMAS);
5908
+ checkKeyValues(MONITOR_CALL_KEYS, MONITOR_CALL_SCHEMAS);
5807
5909
  for (const issue of collectMonitorRuleIssues(monitorConfig)) {
5808
5910
  ctx.addIssue({
5809
5911
  code: external_exports.ZodIssueCode.custom,
@@ -5854,18 +5956,7 @@ function refineHubAsCodeMonitorRulesOutput(config, ctx) {
5854
5956
  }
5855
5957
  });
5856
5958
  }
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, runJourneyQuery, 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, MAX_CALL_REQUEST_BODY_BYTES, hubScoped, callSummaryFields, callSummary, callIdParam, createCallBody, createCallResponse, callReadyBody, callHangupBody, callStatusQuery, MAX_REPORTED_DELEGATION_IDS, callDelegationId, callDelegationsBody, callResponse, TTS_VOICE_REPLY_ENABLED_FIELD, COPILOT_TRIGGER_FIELD, AUDIO_LANGUAGE_OPTIONS, whatsapp, instagram, resend, telegram, API_CHANNEL_DELIVERY_EVENTS, apiChannel, OPENAI_REASONING_MODELS, openai, anthropic, googleAiStudio, openRouter, xai, groqStt, openaiStt, elevenLabsStt, openaiTts, groqTts, elevenLabsTts, GEMINI_TTS_VOICES, googleTts, wayai, externalResources, restApiTool, mcpServer, e2b, CLAUDE_HARNESS_MODELS, CLAUDE_HARNESS_MODEL_OPTIONS, HARNESS_MCP_SERVERS_FIELD, HARNESS_EGRESS_FIELDS, claudeAgentSdk, claudeManagedAgents, rekorMemory, gptLive, CONNECTORS, evalCallInstant, EVAL_CALL_MIN_SECONDS, EVAL_CALL_MAX_SECONDS, hubScoped2, createEvalCallBody, createEvalCallResponse, evalCallConversationQuery, evalCallSpeaker, evalCallUtterance, evalCallTurn, evalCallRecordResponse, evalCallFinishResponse, 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, MAX_VOICE_CALL_MINUTE_OPS, voiceCallMinuteOps, 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;
5959
+ 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, CONFIDENCE_VARIABLE_SUFFIX, 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, CATALOG_SIDE_EFFECTS, 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, MONITOR_STEER_NOTE_MAX, monitorActionSchema, monitorRuleSchema, MONITOR_RULE_KEYS, MONITOR_RULE_SCHEMAS, MONITOR_RULE_TRIGGERS, MONITOR_RULE_TRIGGER_MESSAGE, CALL_UTTERANCE_SPEAKERS, callUtteranceSpeakerSchema, MONITOR_CALL_KEYS, MONITOR_CALL_SCHEMAS, MONITOR_CALL_KEY_MESSAGE, CALL_STEERING_MIN_CONFIDENCE, CALL_UTTERANCE_RULE_NOT_CONFIDENT_MESSAGE, CALL_UTTERANCE_FALLBACK_MESSAGE, CALL_UTTERANCE_FLAG_CONDITIONS_MESSAGE, CALL_STEER_NOTE_BLANK_MESSAGE, MONITOR_USER_MESSAGE_ACTION_KINDS, MONITOR_ASSISTANT_REPLY_ACTION_KINDS, MONITOR_CALL_UTTERANCE_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, runJourneyQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, EVAL_INITIAL_STATE_SCOPES, MAX_INITIAL_STATE_ENTRIES, evalInitialStateEntry, evalBody, EVAL_LIST_MAX_LIMIT, evalListLimit, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, EVAL_MAX_SELECTED_SCENARIOS, evalScenarioSelectionEntrySchema, evalScenarioSelectionSchema, sessionConfigSchema, createSessionBody, getSessionsQuery, getSessionResultsQuery, getSessionRunsQuery, evalAnalyticsQuery, getSessionCostQuery, compareSessionsQuery, evalsSqlBody, evalsSqlSchemaQuery, exportResultsQuery, validateEvalBody, hubAgentsQuery, createScenarioSetBody, updateScenarioSetBody, scenarioSetsHubQuery, createScenarioFromConversationBody, createJourneyFromConversationBody, 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, MAX_CALL_REQUEST_BODY_BYTES, hubScoped, callSummaryFields, callSummary, callIdParam, createCallBody, createCallResponse, callReadyBody, callHangupBody, callStatusQuery, MAX_REPORTED_DELEGATION_IDS, callDelegationId, callDelegationsBody, callResponse, MAX_CALL_RECORDING_GAPS, callRecordingGap, callRecordingNoteMetadata, TTS_VOICE_REPLY_ENABLED_FIELD, COPILOT_TRIGGER_FIELD, AUDIO_LANGUAGE_OPTIONS, whatsapp, instagram, resend, telegram, API_CHANNEL_DELIVERY_EVENTS, apiChannel, OPENAI_REASONING_MODELS, openai, anthropic, googleAiStudio, openRouter, xai, groqStt, openaiStt, elevenLabsStt, openaiTts, groqTts, elevenLabsTts, GEMINI_TTS_VOICES, googleTts, wayai, externalResources, restApiTool, mcpServer, e2b, CLAUDE_HARNESS_MODELS, CLAUDE_HARNESS_MODEL_OPTIONS, HARNESS_MCP_SERVERS_FIELD, HARNESS_EGRESS_FIELDS, claudeAgentSdk, claudeManagedAgents, rekorMemory, SPOKEN_LINE_MAX_CHARS, gptLive, CONNECTORS, evalCallInstant, EVAL_CALL_MIN_SECONDS, EVAL_CALL_MAX_SECONDS, EVAL_CALL_SPOKEN_LINE_MAX_CHARS, hubScoped2, createEvalCallBody, createEvalCallResponse, evalCallConversationQuery, evalCallSpeaker, evalCallUtterance, evalCallTurn, evalCallRecordResponse, evalCallFinishResponse, 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, MAX_VOICE_CALL_MINUTE_OPS, voiceCallMinuteOps, 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;
5869
5960
  var init_contracts = __esm({
5870
5961
  "../../packages/core/dist/contracts/index.js"() {
5871
5962
  "use strict";
@@ -6046,6 +6137,7 @@ var init_contracts = __esm({
6046
6137
  SUMMARIZATION_THRESHOLD_MAX = 1e6;
6047
6138
  PREVIOUS_CONVERSATIONS_MAX = 20;
6048
6139
  FLAG_CONDITION_OPERATORS = ["=", "!=", ">=", "<=", ">", "<"];
6140
+ CONFIDENCE_VARIABLE_SUFFIX = "_confidence";
6049
6141
  DECISION_SCORE_MIN_LEVELS = 2;
6050
6142
  DECISION_SCORE_MAX_LEVELS = 10;
6051
6143
  DECISIONS_MODEL_PREFIXES = ["typesafe/jev-", "jev-"];
@@ -6935,6 +7027,9 @@ var init_contracts = __esm({
6935
7027
  tool_instructions: schema.tool_instructions
6936
7028
  };
6937
7029
  });
7030
+ CATALOG_SIDE_EFFECTS = new Map(
7031
+ NATIVE_TOOLS.map((tool) => [tool.tool_name, tool.side_effects])
7032
+ );
6938
7033
  NATIVE_TOOL_NAMES = new Set(NATIVE_TOOLS.map((t) => t.tool_name));
6939
7034
  previousConversationsCountField = external_exports.number().int().min(0).max(PREVIOUS_CONVERSATIONS_MAX).nullable().optional();
6940
7035
  summarizationThresholdField = external_exports.number().int().min(SUMMARIZATION_THRESHOLD_MIN).max(SUMMARIZATION_THRESHOLD_MAX).nullable().optional();
@@ -6949,7 +7044,7 @@ var init_contracts = __esm({
6949
7044
  // fail on a hub configured through the other surface.
6950
7045
  value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()])
6951
7046
  });
6952
- MONITOR_TRIGGERS = ["idle", "user_message", "assistant_reply", "manual"];
7047
+ MONITOR_TRIGGERS = ["idle", "user_message", "assistant_reply", "manual", "call_utterance"];
6953
7048
  monitorTriggerSchema = external_exports.enum(MONITOR_TRIGGERS);
6954
7049
  MONITOR_FIRING_TRIGGERS = MONITOR_TRIGGERS.filter(isFiringTrigger);
6955
7050
  MONITOR_DELAY_SECONDS_MIN = 10;
@@ -6962,12 +7057,13 @@ var init_contracts = __esm({
6962
7057
  history_messages: monitorHistoryMessagesSchema.optional(),
6963
7058
  include_tool_results: monitorIncludeToolResultsSchema.optional()
6964
7059
  };
6965
- MONITOR_INPUT_SHAPING_IDLE_MESSAGE = "only a user_message, assistant_reply or manual monitor reads this \u2014 an idle monitor runs as a full turn and takes the ordinary history window";
7060
+ MONITOR_INPUT_SHAPING_IDLE_MESSAGE = "only a user_message, assistant_reply, manual or call_utterance monitor reads this \u2014 an idle monitor runs as a full turn and takes the ordinary history window";
6966
7061
  monitorArgumentSourceSchema = external_exports.union([
6967
7062
  external_exports.object({ from_variable: external_exports.string().min(1) }).strict(),
6968
7063
  external_exports.object({ const: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]) }).strict()
6969
7064
  ]);
6970
7065
  MONITOR_NOTE_TEMPLATE_MAX = 2e3;
7066
+ MONITOR_STEER_NOTE_MAX = 500;
6971
7067
  monitorActionSchema = external_exports.discriminatedUnion("kind", [
6972
7068
  external_exports.object({ kind: external_exports.literal("none") }).strict(),
6973
7069
  external_exports.object({
@@ -6976,7 +7072,8 @@ var init_contracts = __esm({
6976
7072
  args: external_exports.record(monitorArgumentSourceSchema).optional()
6977
7073
  }).strict(),
6978
7074
  external_exports.object({ kind: external_exports.literal("hold") }).strict(),
6979
- external_exports.object({ kind: external_exports.literal("rewrite"), note: external_exports.string().min(1).max(MONITOR_NOTE_TEMPLATE_MAX) }).strict()
7075
+ external_exports.object({ kind: external_exports.literal("rewrite"), note: external_exports.string().min(1).max(MONITOR_NOTE_TEMPLATE_MAX) }).strict(),
7076
+ external_exports.object({ kind: external_exports.literal("steer"), note: external_exports.string().min(1).max(MONITOR_STEER_NOTE_MAX) }).strict()
6980
7077
  ]);
6981
7078
  monitorRuleSchema = external_exports.object({
6982
7079
  when: external_exports.array(flagConditionSchema).min(1),
@@ -6987,10 +7084,23 @@ var init_contracts = __esm({
6987
7084
  rules: external_exports.array(monitorRuleSchema).optional(),
6988
7085
  fallback: monitorActionSchema.optional()
6989
7086
  };
6990
- MONITOR_RULE_TRIGGERS = ["user_message", "assistant_reply", "manual"];
6991
- MONITOR_RULE_TRIGGER_MESSAGE = "only a user_message, assistant_reply or manual monitor acts on rules \u2014 set one of those triggers, or remove this key. A manual monitor acts on its rules when another monitor runs it.";
7087
+ MONITOR_RULE_TRIGGERS = ["user_message", "assistant_reply", "manual", "call_utterance"];
7088
+ MONITOR_RULE_TRIGGER_MESSAGE = "only a user_message, assistant_reply, manual or call_utterance monitor acts on rules \u2014 set one of those triggers, or remove this key. A manual monitor acts on its rules when another monitor runs it.";
7089
+ CALL_UTTERANCE_SPEAKERS = ["caller", "voice", "both"];
7090
+ callUtteranceSpeakerSchema = external_exports.enum(CALL_UTTERANCE_SPEAKERS);
7091
+ MONITOR_CALL_KEYS = ["speaker"];
7092
+ MONITOR_CALL_SCHEMAS = {
7093
+ speaker: callUtteranceSpeakerSchema.optional()
7094
+ };
7095
+ MONITOR_CALL_KEY_MESSAGE = "only a call_utterance monitor reads this: it names whose speech on a live call a check waits for";
7096
+ CALL_STEERING_MIN_CONFIDENCE = 0.9;
7097
+ CALL_UTTERANCE_RULE_NOT_CONFIDENT_MESSAGE = `a call_utterance rule acts on a live call from a transcript that can be misheard, so it must be high-confidence: give it a condition on one of this monitor's "\u2026${CONFIDENCE_VARIABLE_SUFFIX}" variables with ">= ${CALL_STEERING_MIN_CONFIDENCE}" or a higher bar, up to 1.`;
7098
+ CALL_UTTERANCE_FALLBACK_MESSAGE = "a call_utterance monitor acts only when a high-confidence rule matches \u2014 a fallback would act on every check of the call. Remove it.";
7099
+ CALL_UTTERANCE_FLAG_CONDITIONS_MESSAGE = "a call_utterance monitor checks a live call every few seconds and does not flag the conversation. Remove its flag_conditions, or flag from a monitor on another trigger.";
7100
+ CALL_STEER_NOTE_BLANK_MESSAGE = "a steer's note is what the voice is told \u2014 write the instruction it should follow.";
6992
7101
  MONITOR_USER_MESSAGE_ACTION_KINDS = ["none", "call_tool"];
6993
7102
  MONITOR_ASSISTANT_REPLY_ACTION_KINDS = ["none", "call_tool", "hold", "rewrite"];
7103
+ MONITOR_CALL_UTTERANCE_ACTION_KINDS = ["none", "call_tool", "steer"];
6994
7104
  INSERT_NOTE_TOOL_NAME = "insert_note";
6995
7105
  RUN_MONITOR_TOOL_NAME = "run_monitor";
6996
7106
  MONITOR_RULE_ALLOWED_NATIVE_TOOLS = [
@@ -7011,6 +7121,7 @@ var init_contracts = __esm({
7011
7121
  trigger: monitorTriggerSchema.optional(),
7012
7122
  ...MONITOR_INPUT_SHAPING_SCHEMAS,
7013
7123
  ...MONITOR_RULE_SCHEMAS,
7124
+ ...MONITOR_CALL_SCHEMAS,
7014
7125
  flag_conditions: external_exports.array(flagConditionSchema).optional()
7015
7126
  }).passthrough().superRefine((config, ctx) => {
7016
7127
  if (monitorConfigNeedsDelay(config)) {
@@ -7027,6 +7138,9 @@ var init_contracts = __esm({
7027
7138
  message: MONITOR_INPUT_SHAPING_IDLE_MESSAGE
7028
7139
  });
7029
7140
  }
7141
+ for (const key of monitorCallKeysOffTrigger(config)) {
7142
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: [key], message: MONITOR_CALL_KEY_MESSAGE });
7143
+ }
7030
7144
  for (const issue of collectMonitorRuleIssues(config)) {
7031
7145
  ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: issue.path, message: issue.message });
7032
7146
  }
@@ -8227,12 +8341,9 @@ var init_contracts = __esm({
8227
8341
  scope: external_exports.enum(EVAL_INITIAL_STATE_SCOPES).default("user"),
8228
8342
  value: external_exports.record(external_exports.unknown())
8229
8343
  });
8230
- createEvalBody = external_exports.object({
8344
+ evalBody = external_exports.object({
8231
8345
  eval: external_exports.record(external_exports.unknown())
8232
- }).superRefine(refineEvalMessageTextRole).superRefine(refineEvalAttachments).superRefine(refineEvalInitialState);
8233
- updateEvalBody = external_exports.object({
8234
- eval: external_exports.record(external_exports.unknown())
8235
- }).superRefine(refineEvalMessageTextRole).superRefine(refineEvalAttachments).superRefine(refineEvalInitialState);
8346
+ }).superRefine(refineEvalName).superRefine(refineEvalMessageTextRole).superRefine(refineEvalAttachments).superRefine(refineEvalInitialState);
8236
8347
  EVAL_LIST_MAX_LIMIT = 1e3;
8237
8348
  evalListLimit = external_exports.string().regex(/^\d+$/).refine((v) => Number(v) <= EVAL_LIST_MAX_LIMIT, {
8238
8349
  message: `limit must be ${EVAL_LIST_MAX_LIMIT} or less`
@@ -8370,7 +8481,8 @@ var init_contracts = __esm({
8370
8481
  hub_id: external_exports.string().uuid(),
8371
8482
  conversation_id: external_exports.string().uuid(),
8372
8483
  scenario_set_id: external_exports.string().uuid(),
8373
- scenario_name: external_exports.string().min(1).max(200),
8484
+ // Becomes the created eval's `eval_name`, so it follows `evalNameError`.
8485
+ scenario_name: external_exports.string().max(200).refine((name) => evalNameError(name) === null, "scenario_name must be a non-blank string"),
8374
8486
  evaluator_instructions: external_exports.string().max(4e3).optional()
8375
8487
  });
8376
8488
  createJourneyFromConversationBody = external_exports.object({
@@ -8721,14 +8833,32 @@ var init_contracts = __esm({
8721
8833
  */
8722
8834
  conversation_id: external_exports.string().uuid().nullish().transform((v) => v ?? void 0),
8723
8835
  /** The browser's SDP offer, sent to the provider unchanged. */
8724
- sdp_offer: sdpOffer
8836
+ sdp_offer: sdpOffer,
8837
+ /**
8838
+ * The caller ACKNOWLEDGED THE RECORDING WARNING: before this create, their client showed
8839
+ * that the call will be recorded, and the caller chose to go on. A hub that records calls
8840
+ * records only a call whose create says so: a client that did not show the warning (one
8841
+ * that predates it, or one whose hub signal said the hub does not record) gets an
8842
+ * unrecorded call, never a recorded call its caller did not acknowledge. Absent: false.
8843
+ *
8844
+ * It replaces `plays_recording_notice` (the audio notice's flag), which no server reads any
8845
+ * more: a client that sends only that one gets an unrecorded call.
8846
+ */
8847
+ recording_warning_acknowledged: external_exports.boolean().optional()
8725
8848
  });
8726
8849
  createCallResponse = external_exports.object({
8727
8850
  call_id: external_exports.string().uuid(),
8728
8851
  /** The conversation the call is attached to: the one named, or else the caller's active one. */
8729
8852
  conversation_id: external_exports.string().uuid(),
8730
8853
  /** The provider's SDP answer, for the browser's `setRemoteDescription`. */
8731
- sdp_answer: sdpDescription
8854
+ sdp_answer: sdpDescription,
8855
+ /**
8856
+ * The call is recorded: its hub records calls and the create said the caller acknowledged
8857
+ * the recording warning. The client shows that the call is recorded for as long as it
8858
+ * lasts, and the recording starts only once `ready` arrives. Absent only from a server that
8859
+ * predates recording, which records nothing: absent means not recorded.
8860
+ */
8861
+ recorded: external_exports.boolean().optional()
8732
8862
  });
8733
8863
  callReadyBody = external_exports.object(hubScoped);
8734
8864
  callHangupBody = external_exports.object(hubScoped);
@@ -8742,6 +8872,24 @@ var init_contracts = __esm({
8742
8872
  callResponse = external_exports.object({
8743
8873
  call: callSummary
8744
8874
  });
8875
+ MAX_CALL_RECORDING_GAPS = 500;
8876
+ callRecordingGap = external_exports.object({
8877
+ start_ms: external_exports.number().int().nonnegative(),
8878
+ end_ms: external_exports.number().int().positive()
8879
+ }).refine((gap) => gap.end_ms > gap.start_ms, "A gap ends after it starts");
8880
+ callRecordingNoteMetadata = external_exports.object({
8881
+ call_id: external_exports.string().min(1),
8882
+ team_notice: external_exports.literal("call_recording"),
8883
+ recording: external_exports.object({
8884
+ /** The recording's `conversation_file` row, the note's one file. */
8885
+ file_id: external_exports.string().uuid(),
8886
+ /** When its first audio arrived: its time 0. */
8887
+ started_at: callInstant,
8888
+ duration_ms: external_exports.number().int().nonnegative(),
8889
+ /** Ascending and disjoint, each within the recording. */
8890
+ gaps: external_exports.array(callRecordingGap).max(MAX_CALL_RECORDING_GAPS)
8891
+ })
8892
+ });
8745
8893
  TTS_VOICE_REPLY_ENABLED_FIELD = {
8746
8894
  voice_reply_enabled: {
8747
8895
  type: "toggle",
@@ -9713,6 +9861,7 @@ var init_contracts = __esm({
9713
9861
  token_refresh_config: { api_key: { strategy: "none" } },
9714
9862
  connector_description: "Durable, shared cross-agent memory backed by a Rekor Base (S3-compatible). Harness agents mount it read-only or read-write; WayAI holds the credential and performs the signed I/O so it never enters the sandbox."
9715
9863
  };
9864
+ SPOKEN_LINE_MAX_CHARS = 300;
9716
9865
  gptLive = {
9717
9866
  connector_id: "01e7b19c-bc94-43f4-a780-ad5a22fb7127",
9718
9867
  service_name: "Openai",
@@ -9737,8 +9886,20 @@ var init_contracts = __esm({
9737
9886
  // The provider ends every session about 2 hours after it starts (`expires_at` is
9738
9887
  // start + 7,199 s), so 119 whole minutes is the most a call can last.
9739
9888
  max_call_minutes: { type: "number", label: "Maximum Call Length (minutes)", min: 1, max: 119, default: 10, description: "A call ends when it reaches this length." },
9740
- inactivity_timeout_seconds: { type: "number", label: "Inactivity Timeout (seconds)", min: 10, max: 600, default: 60, description: "A call ends after this many seconds in which neither side speaks." },
9741
- delegation_timeout_seconds: { type: "number", label: "Answer Timeout (seconds)", min: 5, max: 120, default: 30, description: "How long the voice waits for the hub's agent to answer one question before it gives up on that answer." }
9889
+ inactivity_timeout_seconds: { type: "number", label: "Inactivity Timeout (seconds)", min: 10, max: 600, default: 60, description: "A call ends after this many seconds in which neither side speaks. A wait for the hub's agent to answer, up to the answer timeout, does not count." },
9890
+ delegation_timeout_seconds: { type: "number", label: "Answer Timeout (seconds)", min: 5, max: 120, default: 30, description: "How long the voice waits for the hub's agent to answer one question before it gives up on that answer." },
9891
+ // The fixed lines the voice says (`call-texts.ts`), each the builder's wording when set.
9892
+ // Read by the call route (`resolveVoiceCallSettings`), clipped to `maxLength` again there,
9893
+ // and used as written: placeholders are not filled.
9894
+ greeting_text: spokenLineField("Greeting", "What the voice says when the call starts, in the call's language. Empty uses WayAI's greeting, which names the hub."),
9895
+ progress_cues: { type: "toggle", label: "Progress Cues", default: true, description: `While the hub's agent works on an answer, the voice says a short "still checking" line about 5 and 10 seconds after the caller stops speaking. Off: the wait is silent unless the voice's instructions fill it; the answer timeout line still plays.` },
9896
+ first_progress_cue_text: spokenLineField("First Progress Cue", "What the voice says about 5 seconds into a wait for an answer. Empty uses WayAI's line in the call's language."),
9897
+ second_progress_cue_text: spokenLineField("Second Progress Cue", "What the voice says about 10 seconds into a wait for an answer. Empty uses WayAI's line in the call's language."),
9898
+ please_repeat_text: spokenLineField("Please Repeat Line", "What the voice says when it has no words for the caller's question and asks them to repeat it. Empty uses WayAI's line in the call's language."),
9899
+ turn_failed_text: spokenLineField("Couldn't Get That Line", "What the voice says when the hub's agent could not produce an answer. Empty uses WayAI's apology in the call's language."),
9900
+ timed_out_text: spokenLineField("Answer Timeout Line", "What the voice says when an answer is not back within the answer timeout. Empty uses WayAI's apology in the call's language."),
9901
+ // Opt-in (D7): off unless turned on. Read by the call route (`resolveVoiceCallSettings`).
9902
+ record_calls: { type: "toggle", label: "Record Calls", default: false, description: "Keep each call's audio, both sides, as a recording your team can play from the conversation. Before a call starts, the caller is warned that it will be recorded and chooses whether to go on." }
9742
9903
  },
9743
9904
  channel_settings_schema: null,
9744
9905
  tool_settings_schema: null,
@@ -9749,7 +9910,7 @@ var init_contracts = __esm({
9749
9910
  }
9750
9911
  },
9751
9912
  token_refresh_config: { api_key: { strategy: "none" } },
9752
- connector_description: "Live voice calls on OpenAI GPT-Live: a voice that talks with callers and asks your hub's agent for every answer. Requires an OpenAI project API key."
9913
+ connector_description: "Live voice calls on OpenAI GPT-Live: a voice that talks with callers and asks your hub's agent for answers. Requires an OpenAI project API key."
9753
9914
  };
9754
9915
  CONNECTORS = [
9755
9916
  anthropic,
@@ -9785,6 +9946,10 @@ var init_contracts = __esm({
9785
9946
  0,
9786
9947
  ...CONNECTORS.filter((connector) => connector.connector_type === "Realtime").map((connector) => Number(connector.agent_settings_schema?.max_call_minutes?.max) || 0)
9787
9948
  );
9949
+ EVAL_CALL_SPOKEN_LINE_MAX_CHARS = Math.max(
9950
+ 0,
9951
+ ...CONNECTORS.filter((connector) => connector.connector_type === "Realtime").flatMap((connector) => Object.values(connector.agent_settings_schema ?? {})).filter((field) => field.type === "text").map((field) => Number(field.maxLength) || 0)
9952
+ );
9788
9953
  hubScoped2 = { hub_id: external_exports.string().uuid() };
9789
9954
  createEvalCallBody = external_exports.object({
9790
9955
  ...hubScoped2,
@@ -9813,7 +9978,15 @@ var init_contracts = __esm({
9813
9978
  * (`platform_config` `voice_call_minute_ops`); null when it could not be read. With one
9814
9979
  * operation per call turn, it is what a runner counts a live call's WayAI operations by.
9815
9980
  */
9816
- minute_price_ops: external_exports.number().int().nonnegative().nullable()
9981
+ minute_price_ops: external_exports.number().int().nonnegative().nullable(),
9982
+ /**
9983
+ * What the runner plans its waits by, as the call started with them: whether the voice fills
9984
+ * the wait for an answer with progress cues (its agent's `progress_cues`), and how long it
9985
+ * waits for one before its timeout line (`delegation_timeout_seconds`). With the cues off
9986
+ * the wait is silent, so a pause is no sign that the answer has been said.
9987
+ */
9988
+ progress_cues: external_exports.boolean(),
9989
+ delegation_timeout_seconds: external_exports.number().int().positive()
9817
9990
  });
9818
9991
  evalCallConversationQuery = external_exports.object({
9819
9992
  ...hubScoped2,
@@ -10749,9 +10922,6 @@ var init_contracts = __esm({
10749
10922
  adminOrgIdParam = external_exports.object({
10750
10923
  orgId: uuidSchema
10751
10924
  });
10752
- adminVoiceCallsOrgIdParam = external_exports.object({
10753
- orgId: uuidSchema.transform((id) => id.toLowerCase())
10754
- });
10755
10925
  adminOrgAdminIdParam = external_exports.object({
10756
10926
  orgId: uuidSchema,
10757
10927
  // `adminId` is a `member_grant.user_id`, which for a logged-in user is the
@@ -10852,11 +11022,9 @@ var init_contracts = __esm({
10852
11022
  */
10853
11023
  default_eval_retention_days: external_exports.number().int().min(0).max(MAX_EVAL_RETENTION_DAYS).optional(),
10854
11024
  /**
10855
- * The voice-calls kill switch, the platform half of the voice-calls rollout gate.
10856
- * 0 = off (the default: every voice-call surface stays dark for every org), 1 = on.
10857
- * On its own it opens nothing: an org must also be on `voice_calls_org_allowlist`,
10858
- * which this body cannot write (`PUT`/`DELETE /admin/voice-calls/allowlist/:orgId`
10859
- * change one org at a time). `wayai admin voice-calls enable|disable` flips this.
11025
+ * The voice-calls kill switch. 0 = off (the default: every voice-call surface stays dark
11026
+ * for every org), 1 = on (every org; a hub takes calls once it is configured for them).
11027
+ * `wayai admin voice-calls enable|disable` flips this.
10860
11028
  */
10861
11029
  voice_calls_enabled: external_exports.number().int().min(0).max(1).optional(),
10862
11030
  /** The voice-call meter's price (`voiceCallMinuteOps`). `wayai admin voice-calls price` sets it. */
@@ -10865,8 +11033,6 @@ var init_contracts = __esm({
10865
11033
  (data) => Object.keys(data).length > 0,
10866
11034
  { message: "No fields to update" }
10867
11035
  );
10868
- MAX_VOICE_CALLS_ALLOWLIST_ORGS = 200;
10869
- voiceCallsOrgAllowlistSchema = external_exports.array(uuidSchema).max(MAX_VOICE_CALLS_ALLOWLIST_ORGS);
10870
11036
  updateFreeOrgLimitBody = external_exports.object({
10871
11037
  max_free_orgs_override: external_exports.number().int().min(0).nullable()
10872
11038
  });
@@ -11827,20 +11993,6 @@ var init_api_client = __esm({
11827
11993
  async adminUpdateConfig(body) {
11828
11994
  return this.request("PATCH", "/api/admin/config", body);
11829
11995
  }
11830
- // Put one org on / take it off the voice-calls allowlist (platform-admin gated,
11831
- // idempotent). Used by `wayai admin voice-calls allow|deny --org`.
11832
- async adminAllowVoiceCallsOrg(orgId) {
11833
- return this.request(
11834
- "PUT",
11835
- `/api/admin/voice-calls/allowlist/${encodeURIComponent(orgId)}`
11836
- );
11837
- }
11838
- async adminDenyVoiceCallsOrg(orgId) {
11839
- return this.request(
11840
- "DELETE",
11841
- `/api/admin/voice-calls/allowlist/${encodeURIComponent(orgId)}`
11842
- );
11843
- }
11844
11996
  /**
11845
11997
  * Re-discover an MCP connection's tool/resource catalog (refreshes stale
11846
11998
  * input schemas that `push` leaves untouched). `connection` is the display
@@ -12789,6 +12941,11 @@ function readAgentSettingsModel2(agentSettings) {
12789
12941
  const model = settings.model;
12790
12942
  return typeof model === "string" ? model : null;
12791
12943
  }
12944
+ function catalogToolSideEffects2(toolName) {
12945
+ const sideEffects = CATALOG_SIDE_EFFECTS2.get(toolName);
12946
+ if (sideEffects === void 0) return "unknown";
12947
+ return sideEffects ? "side_effects" : "none";
12948
+ }
12792
12949
  function resolveMonitorTrigger2(monitorConfig) {
12793
12950
  if (!monitorConfig || typeof monitorConfig !== "object") return "idle";
12794
12951
  const raw = monitorConfig.trigger;
@@ -12813,6 +12970,60 @@ function monitorRuleKeysOffTrigger2(monitorConfig) {
12813
12970
  const config = monitorConfig;
12814
12971
  return MONITOR_RULE_KEYS2.filter((key) => config[key] !== void 0);
12815
12972
  }
12973
+ function monitorCallKeysOffTrigger2(monitorConfig) {
12974
+ if (!monitorConfig || typeof monitorConfig !== "object") return [];
12975
+ if (resolveMonitorTrigger2(monitorConfig) === "call_utterance") return [];
12976
+ const config = monitorConfig;
12977
+ return MONITOR_CALL_KEYS2.filter((key) => config[key] !== void 0);
12978
+ }
12979
+ function callUtteranceConfidenceConditions2(rule) {
12980
+ if (!rule || typeof rule !== "object" || Array.isArray(rule)) return [];
12981
+ const when = rule.when;
12982
+ if (!Array.isArray(when)) return [];
12983
+ return when.filter(isConfidenceCondition2);
12984
+ }
12985
+ function isConfidenceCondition2(condition) {
12986
+ if (!condition || typeof condition !== "object" || Array.isArray(condition)) return false;
12987
+ const { variable, operator, value } = condition;
12988
+ if (typeof variable !== "string" || variable.length <= CONFIDENCE_VARIABLE_SUFFIX2.length) return false;
12989
+ if (!variable.endsWith(CONFIDENCE_VARIABLE_SUFFIX2)) return false;
12990
+ const bar = numericBar2(value);
12991
+ if (bar === null || bar < CALL_STEERING_MIN_CONFIDENCE2) return false;
12992
+ if (operator === ">=") return bar <= 1;
12993
+ if (operator === ">") return bar < 1;
12994
+ return false;
12995
+ }
12996
+ function numericBar2(value) {
12997
+ if (typeof value === "number") return Number.isFinite(value) ? value : null;
12998
+ if (typeof value !== "string" || value.trim() === "") return null;
12999
+ const parsed = Number(value);
13000
+ return Number.isFinite(parsed) ? parsed : null;
13001
+ }
13002
+ function callUtteranceRuleIssues2(monitorConfig) {
13003
+ if (!monitorConfig || typeof monitorConfig !== "object") return [];
13004
+ if (resolveMonitorTrigger2(monitorConfig) !== "call_utterance") return [];
13005
+ const config = monitorConfig;
13006
+ const issues = [];
13007
+ if (config.fallback !== void 0) {
13008
+ issues.push({ path: ["fallback"], message: CALL_UTTERANCE_FALLBACK_MESSAGE2 });
13009
+ }
13010
+ if (Array.isArray(config.flag_conditions) && config.flag_conditions.length > 0) {
13011
+ issues.push({ path: ["flag_conditions"], message: CALL_UTTERANCE_FLAG_CONDITIONS_MESSAGE2 });
13012
+ }
13013
+ if (Array.isArray(config.rules)) {
13014
+ config.rules.forEach((rule, index) => {
13015
+ if (callUtteranceConfidenceConditions2(rule).length === 0) {
13016
+ issues.push({ path: ["rules", index, "when"], message: CALL_UTTERANCE_RULE_NOT_CONFIDENT_MESSAGE2 });
13017
+ }
13018
+ const action = rule && typeof rule === "object" ? rule.action : void 0;
13019
+ const { kind, note } = action && typeof action === "object" ? action : {};
13020
+ if (kind === "steer" && typeof note === "string" && note.trim() === "") {
13021
+ issues.push({ path: ["rules", index, "action", "note"], message: CALL_STEER_NOTE_BLANK_MESSAGE2 });
13022
+ }
13023
+ });
13024
+ }
13025
+ return issues;
13026
+ }
12816
13027
  function monitorRulesStructuredOutputMessage2(trigger) {
12817
13028
  const [article, consequence] = trigger === "assistant_reply" ? ["an", "every reply is delivered unjudged"] : ["a", "none of their actions runs"];
12818
13029
  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.`;
@@ -12839,19 +13050,31 @@ function decodedMonitorConfig2(value) {
12839
13050
  }
12840
13051
  }
12841
13052
  function monitorRuleActionKinds2(trigger) {
12842
- return trigger === "assistant_reply" ? MONITOR_ASSISTANT_REPLY_ACTION_KINDS2 : MONITOR_USER_MESSAGE_ACTION_KINDS2;
13053
+ if (trigger === "assistant_reply") return MONITOR_ASSISTANT_REPLY_ACTION_KINDS2;
13054
+ if (trigger === "call_utterance") return MONITOR_CALL_UTTERANCE_ACTION_KINDS2;
13055
+ return MONITOR_USER_MESSAGE_ACTION_KINDS2;
12843
13056
  }
12844
13057
  function monitorActionKindMessage2(kind, trigger) {
12845
13058
  const allowed = monitorRuleActionKinds2(trigger).join(", ");
12846
13059
  if (trigger === "assistant_reply") {
12847
13060
  return `an assistant_reply rule cannot select "${kind}". Use one of: ${allowed}.`;
12848
13061
  }
13062
+ if (trigger === "call_utterance") {
13063
+ return `a call_utterance rule cannot select "${kind}": there is no drafted reply on a live call. Use one of: ${allowed}.`;
13064
+ }
13065
+ if (kind === "steer") {
13066
+ return `a monitor rule cannot select "steer": it speaks to a live call's voice, so only a call_utterance monitor can steer. Use one of: ${allowed}.`;
13067
+ }
12849
13068
  return `a monitor rule cannot select "${kind}": it acts before the reply exists. Use one of: ${allowed}.`;
12850
13069
  }
12851
13070
  function monitorRuleReentryTrack2(toolName) {
12852
13071
  return MONITOR_RULE_REENTRY_TRACKS2.get(toolName);
12853
13072
  }
12854
13073
  function monitorRuleToolNotAllowedMessage2(toolName, trigger) {
13074
+ if (trigger === "call_utterance") {
13075
+ const callable2 = MONITOR_RULE_ALLOWED_NATIVE_TOOLS2.filter((name) => !isCallRefusedToolName2(name));
13076
+ return `a call_utterance rule cannot call "${toolName}": it acts on a live call without the caller confirming anything, so it may call only a tool with no side effects \u2014 ${callable2.join(", ")}, or this hub's own HTTP tools that only read (GET, HEAD or OPTIONS). MCP tools, and tools whose effects are unknown, are refused.`;
13077
+ }
12855
13078
  if (trigger === "assistant_reply" && isReplyGateRefusedToolName2(toolName)) {
12856
13079
  return `an assistant_reply rule cannot call "${toolName}": the reply already exists when this monitor runs, so there is no turn left for it to act on. Put it on a user_message monitor instead, which runs before the answering agent.`;
12857
13080
  }
@@ -12861,9 +13084,13 @@ function monitorRuleToolNotAllowedMessage2(toolName, trigger) {
12861
13084
  function isReplyGateRefusedToolName2(toolName) {
12862
13085
  return monitorRuleReentryTrack2(toolName) === "agent" || toolName === INSERT_NOTE_TOOL_NAME2;
12863
13086
  }
13087
+ function isCallRefusedToolName2(toolName) {
13088
+ return toolName === INSERT_NOTE_TOOL_NAME2 || catalogToolSideEffects2(toolName) !== "none";
13089
+ }
12864
13090
  function isRefusedNativeToolName2(toolName, trigger) {
12865
13091
  if (!NATIVE_TOOL_NAMES2.has(toolName)) return false;
12866
13092
  if (!MONITOR_RULE_ALLOWED_NATIVE_TOOLS2.includes(toolName)) return true;
13093
+ if (trigger === "call_utterance") return isCallRefusedToolName2(toolName);
12867
13094
  return trigger === "assistant_reply" && isReplyGateRefusedToolName2(toolName);
12868
13095
  }
12869
13096
  function monitorRuleActions2(monitorConfig) {
@@ -12888,8 +13115,9 @@ function collectMonitorRuleIssues2(monitorConfig) {
12888
13115
  if (offTrigger.length > 0) return offTrigger;
12889
13116
  const trigger = resolveMonitorTrigger2(monitorConfig);
12890
13117
  const kinds = monitorRuleActionKinds2(trigger);
12891
- const issues = [];
13118
+ const issues = callUtteranceRuleIssues2(monitorConfig);
12892
13119
  for (const { action, path: path35 } of monitorRuleActions2(monitorConfig)) {
13120
+ if (trigger === "call_utterance" && path35[0] === "fallback") continue;
12893
13121
  const kind = action.kind;
12894
13122
  if (typeof kind === "string" && !kinds.includes(kind)) {
12895
13123
  issues.push({ path: [...path35, "kind"], message: monitorActionKindMessage2(kind, trigger) });
@@ -13394,6 +13622,17 @@ function evalInitialStateError2(input) {
13394
13622
  }
13395
13623
  return null;
13396
13624
  }
13625
+ function evalNameError2(name) {
13626
+ if (name === void 0) return null;
13627
+ if (typeof name === "string" && name.trim().length > 0) return null;
13628
+ return "eval name must be a non-blank string";
13629
+ }
13630
+ function refineEvalName2(value, ctx) {
13631
+ const error = evalNameError2(value.eval.eval_name);
13632
+ if (error) {
13633
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["eval", "eval_name"], message: error });
13634
+ }
13635
+ }
13397
13636
  function refineEvalMessageTextRole2(value, ctx) {
13398
13637
  const error = evalInputRoleError2(value.eval.message_text);
13399
13638
  if (error) {
@@ -13446,6 +13685,9 @@ function collectTurnAttachmentHashes2(turn) {
13446
13685
  }
13447
13686
  return hashes;
13448
13687
  }
13688
+ function spokenLineField2(label, description) {
13689
+ return { type: "text", label, maxLength: SPOKEN_LINE_MAX_CHARS2, default: "", description };
13690
+ }
13449
13691
  function foldDiacritics(input) {
13450
13692
  return input.normalize("NFKD").replace(/[̀-ͯ]/g, "");
13451
13693
  }
@@ -13568,6 +13810,14 @@ function refineHubAsCodeEvals2(config, ctx) {
13568
13810
  if (!Array.isArray(evals)) return;
13569
13811
  for (let e = 0; e < evals.length; e++) {
13570
13812
  const entry = evals[e];
13813
+ const nameError = evalNameError2(entry?.name);
13814
+ if (nameError) {
13815
+ ctx.addIssue({
13816
+ code: external_exports.ZodIssueCode.custom,
13817
+ path: ["evals", e, "name"],
13818
+ message: `evals[${e}]: ${nameError}`
13819
+ });
13820
+ }
13571
13821
  const error = evalInputRoleError2(entry?.input);
13572
13822
  if (error) {
13573
13823
  ctx.addIssue({
@@ -13838,8 +14088,12 @@ function refineHubAsCodeMonitorConfig2(config, ctx) {
13838
14088
  message: MONITOR_INPUT_SHAPING_IDLE_MESSAGE2
13839
14089
  });
13840
14090
  }
14091
+ for (const key of monitorCallKeysOffTrigger2(monitorConfig)) {
14092
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: [...basePath, key], message: MONITOR_CALL_KEY_MESSAGE2 });
14093
+ }
13841
14094
  checkKeyValues(MONITOR_INPUT_SHAPING_KEYS2, MONITOR_INPUT_SHAPING_SCHEMAS2);
13842
14095
  checkKeyValues(MONITOR_RULE_KEYS2, MONITOR_RULE_SCHEMAS2);
14096
+ checkKeyValues(MONITOR_CALL_KEYS2, MONITOR_CALL_SCHEMAS2);
13843
14097
  for (const issue of collectMonitorRuleIssues2(monitorConfig)) {
13844
14098
  ctx.addIssue({
13845
14099
  code: external_exports.ZodIssueCode.custom,
@@ -13945,7 +14199,7 @@ function findStepBoundaries(transcript) {
13945
14199
  }
13946
14200
  return out;
13947
14201
  }
13948
- 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, runJourneyQuery2, 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, MAX_CALL_REQUEST_BODY_BYTES2, hubScoped3, callSummaryFields2, callSummary2, callIdParam2, createCallBody2, createCallResponse2, callReadyBody2, callHangupBody2, callStatusQuery2, MAX_REPORTED_DELEGATION_IDS2, callDelegationId2, callDelegationsBody2, callResponse2, TTS_VOICE_REPLY_ENABLED_FIELD2, COPILOT_TRIGGER_FIELD2, AUDIO_LANGUAGE_OPTIONS2, whatsapp2, instagram2, resend2, telegram2, API_CHANNEL_DELIVERY_EVENTS2, apiChannel2, OPENAI_REASONING_MODELS2, openai2, anthropic2, googleAiStudio2, openRouter2, xai2, groqStt2, openaiStt2, elevenLabsStt2, openaiTts2, groqTts2, elevenLabsTts2, GEMINI_TTS_VOICES2, googleTts2, wayai2, externalResources2, restApiTool2, mcpServer2, e2b2, CLAUDE_HARNESS_MODELS2, CLAUDE_HARNESS_MODEL_OPTIONS2, HARNESS_MCP_SERVERS_FIELD2, HARNESS_EGRESS_FIELDS2, claudeAgentSdk2, claudeManagedAgents2, rekorMemory2, gptLive2, CONNECTORS2, evalCallInstant2, EVAL_CALL_MIN_SECONDS2, EVAL_CALL_MAX_SECONDS2, hubScoped22, createEvalCallBody2, createEvalCallResponse2, evalCallConversationQuery2, evalCallSpeaker2, evalCallUtterance2, evalCallTurn2, evalCallRecordResponse2, evalCallFinishResponse2, 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, MAX_VOICE_CALL_MINUTE_OPS2, voiceCallMinuteOps2, 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;
14202
+ 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, CONFIDENCE_VARIABLE_SUFFIX2, 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, CATALOG_SIDE_EFFECTS2, 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, MONITOR_STEER_NOTE_MAX2, monitorActionSchema2, monitorRuleSchema2, MONITOR_RULE_KEYS2, MONITOR_RULE_SCHEMAS2, MONITOR_RULE_TRIGGERS2, MONITOR_RULE_TRIGGER_MESSAGE2, CALL_UTTERANCE_SPEAKERS2, callUtteranceSpeakerSchema2, MONITOR_CALL_KEYS2, MONITOR_CALL_SCHEMAS2, MONITOR_CALL_KEY_MESSAGE2, CALL_STEERING_MIN_CONFIDENCE2, CALL_UTTERANCE_RULE_NOT_CONFIDENT_MESSAGE2, CALL_UTTERANCE_FALLBACK_MESSAGE2, CALL_UTTERANCE_FLAG_CONDITIONS_MESSAGE2, CALL_STEER_NOTE_BLANK_MESSAGE2, MONITOR_USER_MESSAGE_ACTION_KINDS2, MONITOR_ASSISTANT_REPLY_ACTION_KINDS2, MONITOR_CALL_UTTERANCE_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, runJourneyQuery2, EVAL_INPUT_ROLES2, EVAL_INPUT_ROLE_LIST2, ROLE_ECHO_MAX2, EVAL_INITIAL_STATE_SCOPES2, MAX_INITIAL_STATE_ENTRIES2, evalInitialStateEntry2, evalBody2, 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, MAX_CALL_REQUEST_BODY_BYTES2, hubScoped3, callSummaryFields2, callSummary2, callIdParam2, createCallBody2, createCallResponse2, callReadyBody2, callHangupBody2, callStatusQuery2, MAX_REPORTED_DELEGATION_IDS2, callDelegationId2, callDelegationsBody2, callResponse2, MAX_CALL_RECORDING_GAPS2, callRecordingGap2, callRecordingNoteMetadata2, TTS_VOICE_REPLY_ENABLED_FIELD2, COPILOT_TRIGGER_FIELD2, AUDIO_LANGUAGE_OPTIONS2, whatsapp2, instagram2, resend2, telegram2, API_CHANNEL_DELIVERY_EVENTS2, apiChannel2, OPENAI_REASONING_MODELS2, openai2, anthropic2, googleAiStudio2, openRouter2, xai2, groqStt2, openaiStt2, elevenLabsStt2, openaiTts2, groqTts2, elevenLabsTts2, GEMINI_TTS_VOICES2, googleTts2, wayai2, externalResources2, restApiTool2, mcpServer2, e2b2, CLAUDE_HARNESS_MODELS2, CLAUDE_HARNESS_MODEL_OPTIONS2, HARNESS_MCP_SERVERS_FIELD2, HARNESS_EGRESS_FIELDS2, claudeAgentSdk2, claudeManagedAgents2, rekorMemory2, SPOKEN_LINE_MAX_CHARS2, gptLive2, CONNECTORS2, evalCallInstant2, EVAL_CALL_MIN_SECONDS2, EVAL_CALL_MAX_SECONDS2, EVAL_CALL_SPOKEN_LINE_MAX_CHARS2, hubScoped22, createEvalCallBody2, createEvalCallResponse2, evalCallConversationQuery2, evalCallSpeaker2, evalCallUtterance2, evalCallTurn2, evalCallRecordResponse2, evalCallFinishResponse2, 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, MAX_VOICE_CALL_MINUTE_OPS2, voiceCallMinuteOps2, 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;
13949
14203
  var init_dist = __esm({
13950
14204
  "../../packages/core/dist/index.js"() {
13951
14205
  "use strict";
@@ -14608,6 +14862,7 @@ var init_dist = __esm({
14608
14862
  SUMMARIZATION_THRESHOLD_MAX2 = 1e6;
14609
14863
  PREVIOUS_CONVERSATIONS_MAX2 = 20;
14610
14864
  FLAG_CONDITION_OPERATORS2 = ["=", "!=", ">=", "<=", ">", "<"];
14865
+ CONFIDENCE_VARIABLE_SUFFIX2 = "_confidence";
14611
14866
  DECISION_SCORE_MIN_LEVELS2 = 2;
14612
14867
  DECISION_SCORE_MAX_LEVELS2 = 10;
14613
14868
  DECISIONS_MODEL_PREFIXES2 = ["typesafe/jev-", "jev-"];
@@ -15497,6 +15752,9 @@ var init_dist = __esm({
15497
15752
  tool_instructions: schema.tool_instructions
15498
15753
  };
15499
15754
  });
15755
+ CATALOG_SIDE_EFFECTS2 = new Map(
15756
+ NATIVE_TOOLS2.map((tool) => [tool.tool_name, tool.side_effects])
15757
+ );
15500
15758
  NATIVE_TOOL_NAMES2 = new Set(NATIVE_TOOLS2.map((t) => t.tool_name));
15501
15759
  previousConversationsCountField2 = external_exports.number().int().min(0).max(PREVIOUS_CONVERSATIONS_MAX2).nullable().optional();
15502
15760
  summarizationThresholdField2 = external_exports.number().int().min(SUMMARIZATION_THRESHOLD_MIN2).max(SUMMARIZATION_THRESHOLD_MAX2).nullable().optional();
@@ -15511,7 +15769,7 @@ var init_dist = __esm({
15511
15769
  // fail on a hub configured through the other surface.
15512
15770
  value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()])
15513
15771
  });
15514
- MONITOR_TRIGGERS2 = ["idle", "user_message", "assistant_reply", "manual"];
15772
+ MONITOR_TRIGGERS2 = ["idle", "user_message", "assistant_reply", "manual", "call_utterance"];
15515
15773
  monitorTriggerSchema2 = external_exports.enum(MONITOR_TRIGGERS2);
15516
15774
  MONITOR_FIRING_TRIGGERS2 = MONITOR_TRIGGERS2.filter(isFiringTrigger2);
15517
15775
  MONITOR_DELAY_SECONDS_MIN2 = 10;
@@ -15524,12 +15782,13 @@ var init_dist = __esm({
15524
15782
  history_messages: monitorHistoryMessagesSchema2.optional(),
15525
15783
  include_tool_results: monitorIncludeToolResultsSchema2.optional()
15526
15784
  };
15527
- MONITOR_INPUT_SHAPING_IDLE_MESSAGE2 = "only a user_message, assistant_reply or manual monitor reads this \u2014 an idle monitor runs as a full turn and takes the ordinary history window";
15785
+ MONITOR_INPUT_SHAPING_IDLE_MESSAGE2 = "only a user_message, assistant_reply, manual or call_utterance monitor reads this \u2014 an idle monitor runs as a full turn and takes the ordinary history window";
15528
15786
  monitorArgumentSourceSchema2 = external_exports.union([
15529
15787
  external_exports.object({ from_variable: external_exports.string().min(1) }).strict(),
15530
15788
  external_exports.object({ const: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]) }).strict()
15531
15789
  ]);
15532
15790
  MONITOR_NOTE_TEMPLATE_MAX2 = 2e3;
15791
+ MONITOR_STEER_NOTE_MAX2 = 500;
15533
15792
  monitorActionSchema2 = external_exports.discriminatedUnion("kind", [
15534
15793
  external_exports.object({ kind: external_exports.literal("none") }).strict(),
15535
15794
  external_exports.object({
@@ -15538,7 +15797,8 @@ var init_dist = __esm({
15538
15797
  args: external_exports.record(monitorArgumentSourceSchema2).optional()
15539
15798
  }).strict(),
15540
15799
  external_exports.object({ kind: external_exports.literal("hold") }).strict(),
15541
- external_exports.object({ kind: external_exports.literal("rewrite"), note: external_exports.string().min(1).max(MONITOR_NOTE_TEMPLATE_MAX2) }).strict()
15800
+ external_exports.object({ kind: external_exports.literal("rewrite"), note: external_exports.string().min(1).max(MONITOR_NOTE_TEMPLATE_MAX2) }).strict(),
15801
+ external_exports.object({ kind: external_exports.literal("steer"), note: external_exports.string().min(1).max(MONITOR_STEER_NOTE_MAX2) }).strict()
15542
15802
  ]);
15543
15803
  monitorRuleSchema2 = external_exports.object({
15544
15804
  when: external_exports.array(flagConditionSchema2).min(1),
@@ -15549,10 +15809,23 @@ var init_dist = __esm({
15549
15809
  rules: external_exports.array(monitorRuleSchema2).optional(),
15550
15810
  fallback: monitorActionSchema2.optional()
15551
15811
  };
15552
- MONITOR_RULE_TRIGGERS2 = ["user_message", "assistant_reply", "manual"];
15553
- MONITOR_RULE_TRIGGER_MESSAGE2 = "only a user_message, assistant_reply or manual monitor acts on rules \u2014 set one of those triggers, or remove this key. A manual monitor acts on its rules when another monitor runs it.";
15812
+ MONITOR_RULE_TRIGGERS2 = ["user_message", "assistant_reply", "manual", "call_utterance"];
15813
+ MONITOR_RULE_TRIGGER_MESSAGE2 = "only a user_message, assistant_reply, manual or call_utterance monitor acts on rules \u2014 set one of those triggers, or remove this key. A manual monitor acts on its rules when another monitor runs it.";
15814
+ CALL_UTTERANCE_SPEAKERS2 = ["caller", "voice", "both"];
15815
+ callUtteranceSpeakerSchema2 = external_exports.enum(CALL_UTTERANCE_SPEAKERS2);
15816
+ MONITOR_CALL_KEYS2 = ["speaker"];
15817
+ MONITOR_CALL_SCHEMAS2 = {
15818
+ speaker: callUtteranceSpeakerSchema2.optional()
15819
+ };
15820
+ MONITOR_CALL_KEY_MESSAGE2 = "only a call_utterance monitor reads this: it names whose speech on a live call a check waits for";
15821
+ CALL_STEERING_MIN_CONFIDENCE2 = 0.9;
15822
+ CALL_UTTERANCE_RULE_NOT_CONFIDENT_MESSAGE2 = `a call_utterance rule acts on a live call from a transcript that can be misheard, so it must be high-confidence: give it a condition on one of this monitor's "\u2026${CONFIDENCE_VARIABLE_SUFFIX2}" variables with ">= ${CALL_STEERING_MIN_CONFIDENCE2}" or a higher bar, up to 1.`;
15823
+ CALL_UTTERANCE_FALLBACK_MESSAGE2 = "a call_utterance monitor acts only when a high-confidence rule matches \u2014 a fallback would act on every check of the call. Remove it.";
15824
+ CALL_UTTERANCE_FLAG_CONDITIONS_MESSAGE2 = "a call_utterance monitor checks a live call every few seconds and does not flag the conversation. Remove its flag_conditions, or flag from a monitor on another trigger.";
15825
+ CALL_STEER_NOTE_BLANK_MESSAGE2 = "a steer's note is what the voice is told \u2014 write the instruction it should follow.";
15554
15826
  MONITOR_USER_MESSAGE_ACTION_KINDS2 = ["none", "call_tool"];
15555
15827
  MONITOR_ASSISTANT_REPLY_ACTION_KINDS2 = ["none", "call_tool", "hold", "rewrite"];
15828
+ MONITOR_CALL_UTTERANCE_ACTION_KINDS2 = ["none", "call_tool", "steer"];
15556
15829
  INSERT_NOTE_TOOL_NAME2 = "insert_note";
15557
15830
  RUN_MONITOR_TOOL_NAME2 = "run_monitor";
15558
15831
  MONITOR_RULE_ALLOWED_NATIVE_TOOLS2 = [
@@ -15573,6 +15846,7 @@ var init_dist = __esm({
15573
15846
  trigger: monitorTriggerSchema2.optional(),
15574
15847
  ...MONITOR_INPUT_SHAPING_SCHEMAS2,
15575
15848
  ...MONITOR_RULE_SCHEMAS2,
15849
+ ...MONITOR_CALL_SCHEMAS2,
15576
15850
  flag_conditions: external_exports.array(flagConditionSchema2).optional()
15577
15851
  }).passthrough().superRefine((config, ctx) => {
15578
15852
  if (monitorConfigNeedsDelay2(config)) {
@@ -15589,6 +15863,9 @@ var init_dist = __esm({
15589
15863
  message: MONITOR_INPUT_SHAPING_IDLE_MESSAGE2
15590
15864
  });
15591
15865
  }
15866
+ for (const key of monitorCallKeysOffTrigger2(config)) {
15867
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: [key], message: MONITOR_CALL_KEY_MESSAGE2 });
15868
+ }
15592
15869
  for (const issue of collectMonitorRuleIssues2(config)) {
15593
15870
  ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: issue.path, message: issue.message });
15594
15871
  }
@@ -16785,12 +17062,9 @@ var init_dist = __esm({
16785
17062
  scope: external_exports.enum(EVAL_INITIAL_STATE_SCOPES2).default("user"),
16786
17063
  value: external_exports.record(external_exports.unknown())
16787
17064
  });
16788
- createEvalBody2 = external_exports.object({
16789
- eval: external_exports.record(external_exports.unknown())
16790
- }).superRefine(refineEvalMessageTextRole2).superRefine(refineEvalAttachments2).superRefine(refineEvalInitialState2);
16791
- updateEvalBody2 = external_exports.object({
17065
+ evalBody2 = external_exports.object({
16792
17066
  eval: external_exports.record(external_exports.unknown())
16793
- }).superRefine(refineEvalMessageTextRole2).superRefine(refineEvalAttachments2).superRefine(refineEvalInitialState2);
17067
+ }).superRefine(refineEvalName2).superRefine(refineEvalMessageTextRole2).superRefine(refineEvalAttachments2).superRefine(refineEvalInitialState2);
16794
17068
  EVAL_LIST_MAX_LIMIT2 = 1e3;
16795
17069
  evalListLimit2 = external_exports.string().regex(/^\d+$/).refine((v) => Number(v) <= EVAL_LIST_MAX_LIMIT2, {
16796
17070
  message: `limit must be ${EVAL_LIST_MAX_LIMIT2} or less`
@@ -16928,7 +17202,8 @@ var init_dist = __esm({
16928
17202
  hub_id: external_exports.string().uuid(),
16929
17203
  conversation_id: external_exports.string().uuid(),
16930
17204
  scenario_set_id: external_exports.string().uuid(),
16931
- scenario_name: external_exports.string().min(1).max(200),
17205
+ // Becomes the created eval's `eval_name`, so it follows `evalNameError`.
17206
+ scenario_name: external_exports.string().max(200).refine((name) => evalNameError2(name) === null, "scenario_name must be a non-blank string"),
16932
17207
  evaluator_instructions: external_exports.string().max(4e3).optional()
16933
17208
  });
16934
17209
  createJourneyFromConversationBody2 = external_exports.object({
@@ -17278,14 +17553,32 @@ var init_dist = __esm({
17278
17553
  */
17279
17554
  conversation_id: external_exports.string().uuid().nullish().transform((v) => v ?? void 0),
17280
17555
  /** The browser's SDP offer, sent to the provider unchanged. */
17281
- sdp_offer: sdpOffer2
17556
+ sdp_offer: sdpOffer2,
17557
+ /**
17558
+ * The caller ACKNOWLEDGED THE RECORDING WARNING: before this create, their client showed
17559
+ * that the call will be recorded, and the caller chose to go on. A hub that records calls
17560
+ * records only a call whose create says so: a client that did not show the warning (one
17561
+ * that predates it, or one whose hub signal said the hub does not record) gets an
17562
+ * unrecorded call, never a recorded call its caller did not acknowledge. Absent: false.
17563
+ *
17564
+ * It replaces `plays_recording_notice` (the audio notice's flag), which no server reads any
17565
+ * more: a client that sends only that one gets an unrecorded call.
17566
+ */
17567
+ recording_warning_acknowledged: external_exports.boolean().optional()
17282
17568
  });
17283
17569
  createCallResponse2 = external_exports.object({
17284
17570
  call_id: external_exports.string().uuid(),
17285
17571
  /** The conversation the call is attached to: the one named, or else the caller's active one. */
17286
17572
  conversation_id: external_exports.string().uuid(),
17287
17573
  /** The provider's SDP answer, for the browser's `setRemoteDescription`. */
17288
- sdp_answer: sdpDescription2
17574
+ sdp_answer: sdpDescription2,
17575
+ /**
17576
+ * The call is recorded: its hub records calls and the create said the caller acknowledged
17577
+ * the recording warning. The client shows that the call is recorded for as long as it
17578
+ * lasts, and the recording starts only once `ready` arrives. Absent only from a server that
17579
+ * predates recording, which records nothing: absent means not recorded.
17580
+ */
17581
+ recorded: external_exports.boolean().optional()
17289
17582
  });
17290
17583
  callReadyBody2 = external_exports.object(hubScoped3);
17291
17584
  callHangupBody2 = external_exports.object(hubScoped3);
@@ -17299,6 +17592,24 @@ var init_dist = __esm({
17299
17592
  callResponse2 = external_exports.object({
17300
17593
  call: callSummary2
17301
17594
  });
17595
+ MAX_CALL_RECORDING_GAPS2 = 500;
17596
+ callRecordingGap2 = external_exports.object({
17597
+ start_ms: external_exports.number().int().nonnegative(),
17598
+ end_ms: external_exports.number().int().positive()
17599
+ }).refine((gap) => gap.end_ms > gap.start_ms, "A gap ends after it starts");
17600
+ callRecordingNoteMetadata2 = external_exports.object({
17601
+ call_id: external_exports.string().min(1),
17602
+ team_notice: external_exports.literal("call_recording"),
17603
+ recording: external_exports.object({
17604
+ /** The recording's `conversation_file` row, the note's one file. */
17605
+ file_id: external_exports.string().uuid(),
17606
+ /** When its first audio arrived: its time 0. */
17607
+ started_at: callInstant2,
17608
+ duration_ms: external_exports.number().int().nonnegative(),
17609
+ /** Ascending and disjoint, each within the recording. */
17610
+ gaps: external_exports.array(callRecordingGap2).max(MAX_CALL_RECORDING_GAPS2)
17611
+ })
17612
+ });
17302
17613
  TTS_VOICE_REPLY_ENABLED_FIELD2 = {
17303
17614
  voice_reply_enabled: {
17304
17615
  type: "toggle",
@@ -18270,6 +18581,7 @@ var init_dist = __esm({
18270
18581
  token_refresh_config: { api_key: { strategy: "none" } },
18271
18582
  connector_description: "Durable, shared cross-agent memory backed by a Rekor Base (S3-compatible). Harness agents mount it read-only or read-write; WayAI holds the credential and performs the signed I/O so it never enters the sandbox."
18272
18583
  };
18584
+ SPOKEN_LINE_MAX_CHARS2 = 300;
18273
18585
  gptLive2 = {
18274
18586
  connector_id: "01e7b19c-bc94-43f4-a780-ad5a22fb7127",
18275
18587
  service_name: "Openai",
@@ -18294,8 +18606,20 @@ var init_dist = __esm({
18294
18606
  // The provider ends every session about 2 hours after it starts (`expires_at` is
18295
18607
  // start + 7,199 s), so 119 whole minutes is the most a call can last.
18296
18608
  max_call_minutes: { type: "number", label: "Maximum Call Length (minutes)", min: 1, max: 119, default: 10, description: "A call ends when it reaches this length." },
18297
- inactivity_timeout_seconds: { type: "number", label: "Inactivity Timeout (seconds)", min: 10, max: 600, default: 60, description: "A call ends after this many seconds in which neither side speaks." },
18298
- delegation_timeout_seconds: { type: "number", label: "Answer Timeout (seconds)", min: 5, max: 120, default: 30, description: "How long the voice waits for the hub's agent to answer one question before it gives up on that answer." }
18609
+ inactivity_timeout_seconds: { type: "number", label: "Inactivity Timeout (seconds)", min: 10, max: 600, default: 60, description: "A call ends after this many seconds in which neither side speaks. A wait for the hub's agent to answer, up to the answer timeout, does not count." },
18610
+ delegation_timeout_seconds: { type: "number", label: "Answer Timeout (seconds)", min: 5, max: 120, default: 30, description: "How long the voice waits for the hub's agent to answer one question before it gives up on that answer." },
18611
+ // The fixed lines the voice says (`call-texts.ts`), each the builder's wording when set.
18612
+ // Read by the call route (`resolveVoiceCallSettings`), clipped to `maxLength` again there,
18613
+ // and used as written: placeholders are not filled.
18614
+ greeting_text: spokenLineField2("Greeting", "What the voice says when the call starts, in the call's language. Empty uses WayAI's greeting, which names the hub."),
18615
+ progress_cues: { type: "toggle", label: "Progress Cues", default: true, description: `While the hub's agent works on an answer, the voice says a short "still checking" line about 5 and 10 seconds after the caller stops speaking. Off: the wait is silent unless the voice's instructions fill it; the answer timeout line still plays.` },
18616
+ first_progress_cue_text: spokenLineField2("First Progress Cue", "What the voice says about 5 seconds into a wait for an answer. Empty uses WayAI's line in the call's language."),
18617
+ second_progress_cue_text: spokenLineField2("Second Progress Cue", "What the voice says about 10 seconds into a wait for an answer. Empty uses WayAI's line in the call's language."),
18618
+ please_repeat_text: spokenLineField2("Please Repeat Line", "What the voice says when it has no words for the caller's question and asks them to repeat it. Empty uses WayAI's line in the call's language."),
18619
+ turn_failed_text: spokenLineField2("Couldn't Get That Line", "What the voice says when the hub's agent could not produce an answer. Empty uses WayAI's apology in the call's language."),
18620
+ timed_out_text: spokenLineField2("Answer Timeout Line", "What the voice says when an answer is not back within the answer timeout. Empty uses WayAI's apology in the call's language."),
18621
+ // Opt-in (D7): off unless turned on. Read by the call route (`resolveVoiceCallSettings`).
18622
+ record_calls: { type: "toggle", label: "Record Calls", default: false, description: "Keep each call's audio, both sides, as a recording your team can play from the conversation. Before a call starts, the caller is warned that it will be recorded and chooses whether to go on." }
18299
18623
  },
18300
18624
  channel_settings_schema: null,
18301
18625
  tool_settings_schema: null,
@@ -18306,7 +18630,7 @@ var init_dist = __esm({
18306
18630
  }
18307
18631
  },
18308
18632
  token_refresh_config: { api_key: { strategy: "none" } },
18309
- connector_description: "Live voice calls on OpenAI GPT-Live: a voice that talks with callers and asks your hub's agent for every answer. Requires an OpenAI project API key."
18633
+ connector_description: "Live voice calls on OpenAI GPT-Live: a voice that talks with callers and asks your hub's agent for answers. Requires an OpenAI project API key."
18310
18634
  };
18311
18635
  CONNECTORS2 = [
18312
18636
  anthropic2,
@@ -18342,6 +18666,10 @@ var init_dist = __esm({
18342
18666
  0,
18343
18667
  ...CONNECTORS2.filter((connector) => connector.connector_type === "Realtime").map((connector) => Number(connector.agent_settings_schema?.max_call_minutes?.max) || 0)
18344
18668
  );
18669
+ EVAL_CALL_SPOKEN_LINE_MAX_CHARS2 = Math.max(
18670
+ 0,
18671
+ ...CONNECTORS2.filter((connector) => connector.connector_type === "Realtime").flatMap((connector) => Object.values(connector.agent_settings_schema ?? {})).filter((field) => field.type === "text").map((field) => Number(field.maxLength) || 0)
18672
+ );
18345
18673
  hubScoped22 = { hub_id: external_exports.string().uuid() };
18346
18674
  createEvalCallBody2 = external_exports.object({
18347
18675
  ...hubScoped22,
@@ -18370,7 +18698,15 @@ var init_dist = __esm({
18370
18698
  * (`platform_config` `voice_call_minute_ops`); null when it could not be read. With one
18371
18699
  * operation per call turn, it is what a runner counts a live call's WayAI operations by.
18372
18700
  */
18373
- minute_price_ops: external_exports.number().int().nonnegative().nullable()
18701
+ minute_price_ops: external_exports.number().int().nonnegative().nullable(),
18702
+ /**
18703
+ * What the runner plans its waits by, as the call started with them: whether the voice fills
18704
+ * the wait for an answer with progress cues (its agent's `progress_cues`), and how long it
18705
+ * waits for one before its timeout line (`delegation_timeout_seconds`). With the cues off
18706
+ * the wait is silent, so a pause is no sign that the answer has been said.
18707
+ */
18708
+ progress_cues: external_exports.boolean(),
18709
+ delegation_timeout_seconds: external_exports.number().int().positive()
18374
18710
  });
18375
18711
  evalCallConversationQuery2 = external_exports.object({
18376
18712
  ...hubScoped22,
@@ -19306,9 +19642,6 @@ var init_dist = __esm({
19306
19642
  adminOrgIdParam2 = external_exports.object({
19307
19643
  orgId: uuidSchema2
19308
19644
  });
19309
- adminVoiceCallsOrgIdParam2 = external_exports.object({
19310
- orgId: uuidSchema2.transform((id) => id.toLowerCase())
19311
- });
19312
19645
  adminOrgAdminIdParam2 = external_exports.object({
19313
19646
  orgId: uuidSchema2,
19314
19647
  // `adminId` is a `member_grant.user_id`, which for a logged-in user is the
@@ -19409,11 +19742,9 @@ var init_dist = __esm({
19409
19742
  */
19410
19743
  default_eval_retention_days: external_exports.number().int().min(0).max(MAX_EVAL_RETENTION_DAYS2).optional(),
19411
19744
  /**
19412
- * The voice-calls kill switch, the platform half of the voice-calls rollout gate.
19413
- * 0 = off (the default: every voice-call surface stays dark for every org), 1 = on.
19414
- * On its own it opens nothing: an org must also be on `voice_calls_org_allowlist`,
19415
- * which this body cannot write (`PUT`/`DELETE /admin/voice-calls/allowlist/:orgId`
19416
- * change one org at a time). `wayai admin voice-calls enable|disable` flips this.
19745
+ * The voice-calls kill switch. 0 = off (the default: every voice-call surface stays dark
19746
+ * for every org), 1 = on (every org; a hub takes calls once it is configured for them).
19747
+ * `wayai admin voice-calls enable|disable` flips this.
19417
19748
  */
19418
19749
  voice_calls_enabled: external_exports.number().int().min(0).max(1).optional(),
19419
19750
  /** The voice-call meter's price (`voiceCallMinuteOps`). `wayai admin voice-calls price` sets it. */
@@ -19422,8 +19753,6 @@ var init_dist = __esm({
19422
19753
  (data) => Object.keys(data).length > 0,
19423
19754
  { message: "No fields to update" }
19424
19755
  );
19425
- MAX_VOICE_CALLS_ALLOWLIST_ORGS2 = 200;
19426
- voiceCallsOrgAllowlistSchema2 = external_exports.array(uuidSchema2).max(MAX_VOICE_CALLS_ALLOWLIST_ORGS2);
19427
19756
  updateFreeOrgLimitBody2 = external_exports.object({
19428
19757
  max_free_orgs_override: external_exports.number().int().min(0).nullable()
19429
19758
  });
@@ -29856,13 +30185,13 @@ var init_call_media = __esm({
29856
30185
  await waitFor(() => this.voice.onsetAfter(afterMs) !== null || abort(), timeoutMs, this.clock);
29857
30186
  return this.voice.onsetAfter(afterMs);
29858
30187
  }
29859
- async waitForVoiceDone(sinceMs, quietMs, timeoutMs, abort = () => false) {
30188
+ async waitForVoiceDone(sinceMs, quietMs, timeoutMs, abort = () => false, notBeforeMs = Number.NEGATIVE_INFINITY) {
29860
30189
  const done = () => {
29861
- if (this.voice.onsetAfter(sinceMs - 1) === null) return false;
30190
+ if (this.clock.now() < notBeforeMs || this.voice.onsetAfter(sinceMs - 1) === null) return false;
29862
30191
  const quiet = this.voice.quietSince();
29863
30192
  return quiet !== null && quiet > sinceMs && this.clock.now() - quiet >= quietMs;
29864
30193
  };
29865
- await waitFor(() => done() || abort(), timeoutMs, this.clock);
30194
+ await waitFor(() => done() || abort(), timeoutMs + Math.max(0, notBeforeMs - this.clock.now()), this.clock);
29866
30195
  return done();
29867
30196
  }
29868
30197
  delegationsSeen() {
@@ -30789,6 +31118,10 @@ async function runOneCall(options, run, clips) {
30789
31118
  result.call_id = created.call_id;
30790
31119
  result.conversation_id = created.conversation_id;
30791
31120
  log(`run ${run}: call ${created.call_id} placed (at most ${created.max_call_seconds} s)`);
31121
+ const silentWaitMs = created.progress_cues === false ? created.delegation_timeout_seconds * 1e3 + timings.silentWaitMarginMs : null;
31122
+ if (silentWaitMs !== null) {
31123
+ log(`run ${run}: progress cues are off: each delegated answer is awaited up to its ${created.delegation_timeout_seconds} s timeout`);
31124
+ }
30792
31125
  await port.connect(created.sdp_answer);
30793
31126
  const connectedAt = clock.now();
30794
31127
  await api.readyEvalCall(created.call_id, hubId);
@@ -30810,6 +31143,10 @@ async function runOneCall(options, run, clips) {
30810
31143
  if (reason) result.stopped_by = reason;
30811
31144
  return reason !== null;
30812
31145
  };
31146
+ const waitForAnswer = (lineEnd, delegated) => {
31147
+ const notBeforeMs = delegated && silentWaitMs !== null ? lineEnd + silentWaitMs : void 0;
31148
+ return port.waitForVoiceDone(lineEnd, quietAfter(delegated), timings.answerDoneTimeoutMs, stop, notBeforeMs);
31149
+ };
30813
31150
  await port.waitForVoiceDone(connectedAt, timings.ownAnswerQuietMs, timings.greetingTimeoutMs, stop);
30814
31151
  let previousEnd = connectedAt;
30815
31152
  let previousDelegated = false;
@@ -30819,7 +31156,7 @@ async function runOneCall(options, run, clips) {
30819
31156
  const onset2 = await port.waitForVoiceOnset(previousEnd, timings.answerOnsetTimeoutMs, stop);
30820
31157
  if (onset2 !== null) await clock.sleep(Math.max(0, onset2 + timings.interruptAfterMs - clock.now()));
30821
31158
  } else if (i > 0) {
30822
- await port.waitForVoiceDone(previousEnd, quietAfter(previousDelegated), timings.answerDoneTimeoutMs, stop);
31159
+ await waitForAnswer(previousEnd, previousDelegated);
30823
31160
  }
30824
31161
  if (stop()) break;
30825
31162
  const span = await port.play(clips[i], stop);
@@ -30831,7 +31168,7 @@ async function runOneCall(options, run, clips) {
30831
31168
  previousDelegated = line.expect_delegation;
30832
31169
  }
30833
31170
  if (!result.stopped_by) {
30834
- await port.waitForVoiceDone(previousEnd, quietAfter(previousDelegated), timings.answerDoneTimeoutMs, stop);
31171
+ await waitForAnswer(previousEnd, previousDelegated);
30835
31172
  }
30836
31173
  if (result.stopped_by) {
30837
31174
  result.status = "stopped";
@@ -30924,11 +31261,12 @@ async function runCallEvalSuite(options) {
30924
31261
  cost: { provider_usd: ledger.spentUsd, operations: ledger.spentOperations }
30925
31262
  };
30926
31263
  }
30927
- var systemRunnerClock, DEFAULT_RUNNER_TIMINGS, RECORD_SETTLE_TIMEOUT_MS, RECORD_POLL_MS;
31264
+ var systemRunnerClock, LONGEST_SPOKEN_LINE_MS, DEFAULT_RUNNER_TIMINGS, RECORD_SETTLE_TIMEOUT_MS, RECORD_POLL_MS;
30928
31265
  var init_runner = __esm({
30929
31266
  "src/lib/call-eval/runner.ts"() {
30930
31267
  "use strict";
30931
31268
  init_dist();
31269
+ init_contracts();
30932
31270
  init_errors2();
30933
31271
  init_cost_cap();
30934
31272
  init_score();
@@ -30936,11 +31274,13 @@ var init_runner = __esm({
30936
31274
  now: () => Date.now(),
30937
31275
  sleep: (ms) => new Promise((resolve10) => setTimeout(resolve10, ms))
30938
31276
  };
31277
+ LONGEST_SPOKEN_LINE_MS = Math.ceil(EVAL_CALL_SPOKEN_LINE_MAX_CHARS / 15) * 1e3;
30939
31278
  DEFAULT_RUNNER_TIMINGS = {
30940
- greetingTimeoutMs: 2e4,
31279
+ greetingTimeoutMs: 2e4 + LONGEST_SPOKEN_LINE_MS,
30941
31280
  answerOnsetTimeoutMs: 2e4,
30942
- answerDoneTimeoutMs: 45e3,
31281
+ answerDoneTimeoutMs: 45e3 + 2 * LONGEST_SPOKEN_LINE_MS,
30943
31282
  delegatedAnswerQuietMs: 5500,
31283
+ silentWaitMarginMs: 3e3,
30944
31284
  ownAnswerQuietMs: 2e3,
30945
31285
  interruptAfterMs: 1e3
30946
31286
  };
@@ -33451,12 +33791,6 @@ async function adminCommand(args2) {
33451
33791
  case "status":
33452
33792
  await runVoiceCallsStatus(flagArgs);
33453
33793
  return;
33454
- case "allow":
33455
- await runVoiceCallsAllowlist(true, flagArgs);
33456
- return;
33457
- case "deny":
33458
- await runVoiceCallsAllowlist(false, flagArgs);
33459
- return;
33460
33794
  case "price":
33461
33795
  await runVoiceCallsPrice(flagArgs);
33462
33796
  return;
@@ -34050,9 +34384,7 @@ async function runHarnessMassDestroy(flagArgs) {
34050
34384
  function rejectPlatformGateFlags(gate, sub, flagArgs) {
34051
34385
  if (flagArgs.length === 0) return;
34052
34386
  console.error(`Unknown flag: ${flagArgs[0]}`);
34053
- console.error(
34054
- 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.`
34055
- );
34387
+ console.error(`The ${gate.label} is platform-wide; there is no --org/--hub layer.`);
34056
34388
  console.error(`wayai admin ${gate.group} ${sub}`);
34057
34389
  process.exit(1);
34058
34390
  }
@@ -34104,17 +34436,14 @@ async function runHarnessToggle(enable, flagArgs) {
34104
34436
  async function runVoiceCallsToggle(enable, flagArgs) {
34105
34437
  await runPlatformGateToggle(VOICE_CALLS_GATE, enable, flagArgs);
34106
34438
  if (enable) {
34107
- console.log("Only orgs on the allowlist get voice-call surfaces; `wayai admin voice-calls status` lists them.");
34439
+ console.log("Every org's hubs get voice-call surfaces once configured for them.");
34108
34440
  } else {
34109
- console.log("Every voice-call surface is dark for every org. The allowlist is kept.");
34441
+ console.log("Every voice-call surface is dark for every org.");
34110
34442
  }
34111
34443
  console.log(VOICE_CALLS_PROPAGATION_NOTE);
34112
34444
  }
34113
34445
  async function runVoiceCallsStatus(flagArgs) {
34114
34446
  const data = await runPlatformGateStatus(VOICE_CALLS_GATE, flagArgs);
34115
- const orgIds = parseVoiceCallsOrgAllowlist(data.voice_calls_org_allowlist);
34116
- console.log(`voice_calls_org_allowlist: ${orgIds.length} org(s)${orgIds.length === 0 ? " (none)" : ""}`);
34117
- for (const orgId of orgIds) console.log(` ${orgId}`);
34118
34447
  console.log(voiceCallPriceLine(data));
34119
34448
  }
34120
34449
  function voiceCallPriceLine(data) {
@@ -34154,45 +34483,6 @@ async function runVoiceCallsPrice(flagArgs) {
34154
34483
  console.log(VOICE_CALLS_PROPAGATION_NOTE);
34155
34484
  }
34156
34485
  }
34157
- async function runVoiceCallsAllowlist(allow, flagArgs) {
34158
- const usage3 = `wayai admin voice-calls ${allow ? "allow" : "deny"} --org <org_id>`;
34159
- let orgId;
34160
- for (let i = 0; i < flagArgs.length; i++) {
34161
- if (flagArgs[i] === "--org") {
34162
- orgId = requireFlagValue(flagArgs, i + 1, "--org");
34163
- i++;
34164
- } else {
34165
- console.error(`Unknown flag: ${flagArgs[i]}`);
34166
- console.error(usage3);
34167
- process.exit(1);
34168
- }
34169
- }
34170
- if (!orgId) {
34171
- console.error("--org <org_id> is required");
34172
- console.error(usage3);
34173
- process.exit(1);
34174
- }
34175
- const { config, accessToken } = await requireAuth();
34176
- const client = new ApiClient({ apiUrl: config.api_url, accessToken });
34177
- let data;
34178
- try {
34179
- data = (allow ? await client.adminAllowVoiceCallsOrg(orgId) : await client.adminDenyVoiceCallsOrg(orgId)).data;
34180
- } catch (err) {
34181
- if (err instanceof ApiError && err.status === 409) {
34182
- console.error(`Refused: ${err.body || err.message}`);
34183
- process.exit(1);
34184
- }
34185
- exitOnApiError(err);
34186
- throw err;
34187
- }
34188
- const verb = allow ? "ALLOWED" : "DENIED";
34189
- const note = data.changed ? "" : allow ? " (already on the allowlist)" : " (was not on the allowlist)";
34190
- console.log(`Org ${data.org_id} ${verb} for voice calls${note}. Allowlist: ${data.org_ids.length} org(s).`);
34191
- if (allow) {
34192
- console.log("It gets voice-call surfaces only while the kill switch is on (`wayai admin voice-calls status`).");
34193
- }
34194
- if (data.changed) console.log(VOICE_CALLS_PROPAGATION_NOTE);
34195
- }
34196
34486
  function requireFlagValue(flagArgs, index, flag) {
34197
34487
  const v = flagArgs[index];
34198
34488
  if (v === void 0 || v === "" || v.startsWith("--")) {
@@ -34633,11 +34923,9 @@ Usage:
34633
34923
  wayai admin harness mass-destroy --all | --org <org_id> | --hub <hub_id> [--dry-run] [--yes] [--json]
34634
34924
  Reap every live harness sandbox/token/slot in scope (run --dry-run first to see the blast radius)
34635
34925
 
34636
- wayai admin voice-calls enable Flip the platform voice_calls_enabled kill switch ON (allowlisted orgs only)
34926
+ wayai admin voice-calls enable Flip the platform voice_calls_enabled kill switch ON (every org)
34637
34927
  wayai admin voice-calls disable Flip it OFF: every voice-call surface goes dark for every org
34638
- wayai admin voice-calls status Print the kill switch and the org allowlist
34639
- wayai admin voice-calls allow --org <org_id> Put one org on the voice-calls allowlist
34640
- wayai admin voice-calls deny --org <org_id> Take one org off the voice-calls allowlist
34928
+ wayai admin voice-calls status Print the kill switch and the call price
34641
34929
  wayai admin voice-calls price [--ops-per-minute <n>]
34642
34930
  Print, or set, the operations a call bills per connected minute (default 0)
34643
34931
 
@@ -34697,13 +34985,11 @@ Sources:
34697
34985
  sandbox/token/slot that is live NOW (scope: --hub < --org < --all, prefer
34698
34986
  the narrowest). Run \`mass-destroy --dry-run\` first to see the blast
34699
34987
  radius.
34700
- voice-calls The voice-calls rollout gate, default-deny on both layers. An org gets
34701
- voice-call surfaces only while the PLATFORM-wide voice_calls_enabled
34702
- switch is on (\`enable\`/\`disable\`) AND the org is on the allowlist
34703
- (\`allow\`/\`deny --org\`, one org at a time, idempotent). \`disable\` darkens
34704
- every org and keeps the list. \`price\` is the call meter's price in
34705
- operations per connected call-minute (0 until set). Changes land within
34706
- about 60 s.
34988
+ voice-calls The voice-calls gate, default-deny: the PLATFORM-wide voice_calls_enabled
34989
+ switch (\`enable\`/\`disable\`). While it is on, every org's hubs get
34990
+ voice-call surfaces once configured for them; \`disable\` darkens every
34991
+ org. \`price\` is the call meter's price in operations per connected
34992
+ call-minute (0 until set). Changes land within about 60 s.
34707
34993
 
34708
34994
  Types (do): ${VALID_TYPES.join(" | ")}
34709
34995
  Tables (analytics): ${VALID_ANALYTICS_TABLES.join(" | ")}
@@ -34765,8 +35051,7 @@ var init_admin = __esm({
34765
35051
  group: "voice-calls",
34766
35052
  key: "voice_calls_enabled",
34767
35053
  label: "voice-calls kill switch",
34768
- displayName: "Voice calls",
34769
- orgLayerCommand: "wayai admin voice-calls allow|deny --org <org_id>"
35054
+ displayName: "Voice calls"
34770
35055
  };
34771
35056
  VOICE_CALLS_PROPAGATION_NOTE = "Takes effect within about 60 s (the platform-config cache is dropped; KV deletes propagate eventually).";
34772
35057
  VALID_NOTICE_SEVERITIES = ["critical", "warn", "info"];