@wayai/cli 0.3.112 → 0.3.114

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
@@ -613,38 +613,6 @@ var init_api_client = __esm({
613
613
  async adminUpdateConfig(body) {
614
614
  return this.request("PATCH", "/api/admin/config", body);
615
615
  }
616
- // Flip the ORG-layer harness rollout gate (platform-admin gated — harness-agents
617
- // PR 2.9a-2 staged rollout). Used by `wayai admin harness enable|disable --org <id>`.
618
- async adminSetOrgHarness(orgId, enabled) {
619
- return this.request(
620
- "PATCH",
621
- `/api/admin/organizations/${encodeURIComponent(orgId)}/harness`,
622
- { harness_enabled: enabled }
623
- );
624
- }
625
- // Read the ORG-layer harness rollout gate. Used by `wayai admin harness status --org <id>`.
626
- async adminGetOrgHarness(orgId) {
627
- return this.request(
628
- "GET",
629
- `/api/admin/organizations/${encodeURIComponent(orgId)}/harness`
630
- );
631
- }
632
- // Flip the HUB-layer harness rollout gate (platform-admin gated — harness-agents
633
- // PR 2.9a-2 staged rollout). Used by `wayai admin harness enable|disable --hub <id>`.
634
- async adminSetHubHarness(hubId, enabled) {
635
- return this.request(
636
- "PATCH",
637
- `/api/admin/hubs/${encodeURIComponent(hubId)}/harness`,
638
- { harness_enabled: enabled }
639
- );
640
- }
641
- // Read the HUB-layer harness rollout gate. Used by `wayai admin harness status --hub <id>`.
642
- async adminGetHubHarness(hubId) {
643
- return this.request(
644
- "GET",
645
- `/api/admin/hubs/${encodeURIComponent(hubId)}/harness`
646
- );
647
- }
648
616
  /**
649
617
  * Re-discover an MCP connection's tool/resource catalog (refreshes stale
650
618
  * input schemas that `push` leaves untouched). `connection` is the display
@@ -5611,6 +5579,36 @@ function asEvalHistoryArray(history) {
5611
5579
  const value = parseMaybeJson(history);
5612
5580
  return Array.isArray(value) ? value : null;
5613
5581
  }
5582
+ function asEvalInitialStateArray(value) {
5583
+ const parsed = parseMaybeJson(value);
5584
+ return Array.isArray(parsed) ? parsed : null;
5585
+ }
5586
+ function evalInitialStateError(input) {
5587
+ const record = asEvalInputRecord(input);
5588
+ if (record === null) return null;
5589
+ const initialState = record.initial_state;
5590
+ if (initialState === void 0 || initialState === null) return null;
5591
+ const entries = asEvalInitialStateArray(initialState);
5592
+ if (!entries) return "initial_state must be an array";
5593
+ if (entries.length === 0) return null;
5594
+ if (entries.length > MAX_INITIAL_STATE_ENTRIES) {
5595
+ return `initial_state must have at most ${MAX_INITIAL_STATE_ENTRIES} entries`;
5596
+ }
5597
+ const seenSlugs = /* @__PURE__ */ new Set();
5598
+ for (let i = 0; i < entries.length; i++) {
5599
+ const parsed = evalInitialStateEntry.safeParse(entries[i]);
5600
+ if (!parsed.success) {
5601
+ const issue = parsed.error.issues[0];
5602
+ const path31 = issue?.path.join(".") || "?";
5603
+ return `initial_state[${i}].${path31} is invalid: ${issue?.message ?? "malformed"}`;
5604
+ }
5605
+ if (seenSlugs.has(parsed.data.slug)) {
5606
+ return `initial_state[${i}].slug "${parsed.data.slug}" is declared more than once`;
5607
+ }
5608
+ seenSlugs.add(parsed.data.slug);
5609
+ }
5610
+ return null;
5611
+ }
5614
5612
  function refineEvalMessageTextRole(value, ctx) {
5615
5613
  const error = evalInputRoleError(value.eval.message_text);
5616
5614
  if (error) {
@@ -5621,6 +5619,16 @@ function refineEvalMessageTextRole(value, ctx) {
5621
5619
  });
5622
5620
  }
5623
5621
  }
5622
+ function refineEvalInitialState(value, ctx) {
5623
+ const error = evalInitialStateError(value.eval);
5624
+ if (error) {
5625
+ ctx.addIssue({
5626
+ code: external_exports.ZodIssueCode.custom,
5627
+ path: ["eval", "initial_state"],
5628
+ message: error
5629
+ });
5630
+ }
5631
+ }
5624
5632
  function refineEvalAttachments(value, ctx) {
5625
5633
  const triggerError = evalTurnAttachmentsError(value.eval.message_text);
5626
5634
  if (triggerError) {
@@ -5784,6 +5792,14 @@ function refineHubAsCodeEvals(config, ctx) {
5784
5792
  message: `eval "${entry?.name ?? "<unnamed>"}": ${error}`
5785
5793
  });
5786
5794
  }
5795
+ const initialStateError = evalInitialStateError(entry);
5796
+ if (initialStateError) {
5797
+ ctx.addIssue({
5798
+ code: external_exports.ZodIssueCode.custom,
5799
+ path: ["evals", e, "initial_state"],
5800
+ message: `eval "${entry?.name ?? "<unnamed>"}": ${initialStateError}`
5801
+ });
5802
+ }
5787
5803
  }
5788
5804
  }
5789
5805
  function refineHubAsCodeEvalAttachments(config, ctx) {
@@ -5960,7 +5976,7 @@ function findStepBoundaries(transcript) {
5960
5976
  }
5961
5977
  return out;
5962
5978
  }
5963
- 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, AUTH_TYPE, ORG_CREDENTIAL_AUTH_TYPES, AUTH_TYPE_DISPLAY, LEGACY_AUTH_TYPE_MAP, VALID_AUTH_TYPES, AGENT_ROLES, SAFE_USER_ID_REGEX, SUPPORTED_LOCALES, 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, SUMMARIZATION_THRESHOLD_MIN, SUMMARIZATION_THRESHOLD_MAX, summarizationThresholdField, monitorConfigField, 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, followupSchema, EXCLUSIVE_FLAG_PAIRS, kanbanStatusSchema, kanbanStatusesArraySchema, laneSchema, lanesArraySchema, hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_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, 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, createOrgTagBody, updateOrgTagBody, orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody, orgResourceIdParam, orgResourceFileIdParam, orgResourceFolderIdParam, hubOrgResourceParam, listOrgResourcesQuery, orgIdQuery, createOrgResourceBody, updateOrgResourceBody, createOrgResourceFolderBody, updateOrgResourceFolderBody, uploadOrgResourceFileBody, updateOrgResourceFileBody, uploadOrgSkillZipBody, linkOrgResourceBody, resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery, navItemSchema, hubCountResetBody, navItemCountResetBody, typingBody, analyticsHubIdParam, analyticsVariableIdParam, updateVariablePinBody, updateAnalyticsViewBody, NUMERIC_FILTER_OPS, TEXT_FILTER_OPS, CATEGORICAL_FILTER_OPS, VARIABLE_FILTER_OPS, STRUCTURED_QUERY_OPS, STRUCTURED_QUERY_AGGREGATIONS, filterValueSchema, conversationsBody, analyticsConversationIdParam, messagesQuery, conversationDetailDataQuery, analyticsDataBody, structuredQueryBody, analyticsSqlBody, analyticsSqlSchemaQuery, EVAL_PACING_PRESET_NAMES, PACING_INTERVAL_MIN_MS, PACING_INTERVAL_MAX_MS, EVAL_RUN_DEADLINE_MIN_MS, EVAL_RUN_DEADLINE_MAX_MS, paginationSchema2, evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, createEvalBody, updateEvalBody, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, 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, getConversationsQuery, getMessagesQuery, appMessageSenderType, appMessageReceiverType, appMessageBody, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, activityQuery, deletionModeSchema, deletionRequestBody, archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams, conversationIdParam, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, sendMessageBody, listConversationsQuery, getConversationDetailParams, getConversationDetailQuery, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody, billingOrgIdParam, subscriptionItemParams, spendCapBody, growthPacksBody, portalSessionBody, checkoutSessionBody, updateBillingCurrencyBody, invoicesQuery, 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, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, boundedHubAsCodeResourcesSchema, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, adminPlanIdParam, adminHubIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, updatePlatformConfigBody, updateFreeOrgLimitBody, adminSetOrgHarnessBody, adminSetHubHarnessBody, adminScopedTargetBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysQuery, dataExplorerKvKeyParam, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteQuery, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, dataExplorerDebugDoType, DEBUG_READ_MAX_LIMIT, DEBUG_READ_DEFAULT_LIMIT, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, debugHubConvParam, debugMessageIdQuery, sandboxEgressPolicy, SANDBOX_EXEC_MAX_CMD_LENGTH, SANDBOX_EXEC_MAX_ALLOWLIST, SANDBOX_EXEC_MAX_TIMEOUT_MS, adminSandboxExecBody, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, 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, discordTier, discordBillingCycle, discordMetadata, discordOAuthStartResponse, discordOAuthFinalizeBody, discordOAuthFinalizeResponse, discordDisconnectResponse, jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse, hubAlertsParam, hubAlertSeverity, hubAlert, hubAlertsListResponse, noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema, templateLocaleSchema, TEMPLATE_SLUG_REGEX, templateSlugSchema, templateStatusSchema, templateFileMapSchema, templateTextSchema, templateUsesEntrySchema, templateUsesSchema, templateYamlLocaleEntry, templateYamlWayaiBlock, templateTagsSchema, templateYamlSchema, templateHeroSchema, templatePushLocaleSchema, templatePushBody, templateListQuery, templateSlugParam, templateDetailQuery, ADMIN_SKILL_NAME_REGEX, adminSkillNameParam, WAYAI_WORKSPACE_LAYOUT;
5979
+ 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, AUTH_TYPE, ORG_CREDENTIAL_AUTH_TYPES, AUTH_TYPE_DISPLAY, LEGACY_AUTH_TYPE_MAP, VALID_AUTH_TYPES, AGENT_ROLES, SAFE_USER_ID_REGEX, SUPPORTED_LOCALES, 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, SUMMARIZATION_THRESHOLD_MIN, SUMMARIZATION_THRESHOLD_MAX, summarizationThresholdField, monitorConfigField, 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, followupSchema, EXCLUSIVE_FLAG_PAIRS, kanbanStatusSchema, kanbanStatusesArraySchema, laneSchema, lanesArraySchema, hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_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, 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, createOrgTagBody, updateOrgTagBody, orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody, orgResourceIdParam, orgResourceFileIdParam, orgResourceFolderIdParam, hubOrgResourceParam, listOrgResourcesQuery, orgIdQuery, createOrgResourceBody, updateOrgResourceBody, createOrgResourceFolderBody, updateOrgResourceFolderBody, uploadOrgResourceFileBody, updateOrgResourceFileBody, uploadOrgSkillZipBody, linkOrgResourceBody, resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery, navItemSchema, hubCountResetBody, navItemCountResetBody, typingBody, analyticsHubIdParam, analyticsVariableIdParam, updateVariablePinBody, updateAnalyticsViewBody, NUMERIC_FILTER_OPS, TEXT_FILTER_OPS, CATEGORICAL_FILTER_OPS, VARIABLE_FILTER_OPS, STRUCTURED_QUERY_OPS, STRUCTURED_QUERY_AGGREGATIONS, filterValueSchema, conversationsBody, analyticsConversationIdParam, messagesQuery, conversationDetailDataQuery, analyticsDataBody, structuredQueryBody, analyticsSqlBody, analyticsSqlSchemaQuery, EVAL_PACING_PRESET_NAMES, PACING_INTERVAL_MIN_MS, PACING_INTERVAL_MAX_MS, EVAL_RUN_DEADLINE_MIN_MS, EVAL_RUN_DEADLINE_MAX_MS, paginationSchema2, evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, EVAL_INITIAL_STATE_SCOPES, MAX_INITIAL_STATE_ENTRIES, evalInitialStateEntry, createEvalBody, updateEvalBody, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, 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, getConversationsQuery, getMessagesQuery, appMessageSenderType, appMessageReceiverType, appMessageBody, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, activityQuery, deletionModeSchema, deletionRequestBody, archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams, conversationIdParam, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, sendMessageBody, listConversationsQuery, getConversationDetailParams, getConversationDetailQuery, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody, billingOrgIdParam, subscriptionItemParams, spendCapBody, growthPacksBody, portalSessionBody, checkoutSessionBody, updateBillingCurrencyBody, invoicesQuery, 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, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, boundedHubAsCodeResourcesSchema, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysQuery, dataExplorerKvKeyParam, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteQuery, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, dataExplorerDebugDoType, DEBUG_READ_MAX_LIMIT, DEBUG_READ_DEFAULT_LIMIT, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, debugHubConvParam, debugMessageIdQuery, sandboxEgressPolicy, SANDBOX_EXEC_MAX_CMD_LENGTH, SANDBOX_EXEC_MAX_ALLOWLIST, SANDBOX_EXEC_MAX_TIMEOUT_MS, adminSandboxExecBody, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, 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, discordTier, discordBillingCycle, discordMetadata, discordOAuthStartResponse, discordOAuthFinalizeBody, discordOAuthFinalizeResponse, discordDisconnectResponse, jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse, hubAlertsParam, hubAlertSeverity, hubAlert, hubAlertsListResponse, noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema, templateLocaleSchema, TEMPLATE_SLUG_REGEX, templateSlugSchema, templateStatusSchema, templateFileMapSchema, templateTextSchema, templateUsesEntrySchema, templateUsesSchema, templateYamlLocaleEntry, templateYamlWayaiBlock, templateTagsSchema, templateYamlSchema, templateHeroSchema, templatePushLocaleSchema, templatePushBody, templateListQuery, templateSlugParam, templateDetailQuery, ADMIN_SKILL_NAME_REGEX, adminSkillNameParam, WAYAI_WORKSPACE_LAYOUT;
5964
5980
  var init_dist = __esm({
5965
5981
  "../../packages/core/dist/index.js"() {
5966
5982
  "use strict";
@@ -6582,6 +6598,13 @@ var init_dist = __esm({
6582
6598
  language: external_exports.enum(["en", "pt", "es"]).optional(),
6583
6599
  access_request_message: external_exports.string().max(1e3).nullable().optional(),
6584
6600
  access_approval_role: external_exports.enum(["admin", "team"]).optional(),
6601
+ // AI-failure escalation. When an LLM provider outage persists past this many
6602
+ // minutes the conversation escalates to the team; null → code default. The two
6603
+ // message fields override the localized (hub.language) delay / hand-off notices;
6604
+ // null → localized default. Bounds validated here so out-of-range never persists.
6605
+ ai_failure_escalation_minutes: external_exports.number().int().min(1).max(60).nullable().optional(),
6606
+ ai_delay_message: external_exports.string().max(1e3).nullable().optional(),
6607
+ ai_handoff_message: external_exports.string().max(1e3).nullable().optional(),
6585
6608
  // Native-completion fallback connection for a degraded harness turn (PR 2.10b).
6586
6609
  // A NATIVE LLM (Agent) connection id on this hub; validated at set-time on the REST
6587
6610
  // PATCH (setup/hubs.ts rejects a non-existent / non-Agent / harness id) and re-checked
@@ -7288,12 +7311,19 @@ var init_dist = __esm({
7288
7311
  EVAL_INPUT_ROLES = ["user", "system"];
7289
7312
  EVAL_INPUT_ROLE_LIST = EVAL_INPUT_ROLES.map((r) => `"${r}"`).join(" or ");
7290
7313
  ROLE_ECHO_MAX = 40;
7314
+ EVAL_INITIAL_STATE_SCOPES = ["user"];
7315
+ MAX_INITIAL_STATE_ENTRIES = 20;
7316
+ evalInitialStateEntry = external_exports.object({
7317
+ slug: external_exports.string().min(1).max(200),
7318
+ scope: external_exports.enum(EVAL_INITIAL_STATE_SCOPES).default("user"),
7319
+ value: external_exports.record(external_exports.unknown())
7320
+ });
7291
7321
  createEvalBody = external_exports.object({
7292
7322
  eval: external_exports.record(external_exports.unknown())
7293
- }).superRefine(refineEvalMessageTextRole).superRefine(refineEvalAttachments);
7323
+ }).superRefine(refineEvalMessageTextRole).superRefine(refineEvalAttachments).superRefine(refineEvalInitialState);
7294
7324
  updateEvalBody = external_exports.object({
7295
7325
  eval: external_exports.record(external_exports.unknown())
7296
- }).superRefine(refineEvalMessageTextRole).superRefine(refineEvalAttachments);
7326
+ }).superRefine(refineEvalMessageTextRole).superRefine(refineEvalAttachments).superRefine(refineEvalInitialState);
7297
7327
  getEvalsQuery = external_exports.object({
7298
7328
  hub_id: external_exports.string().uuid(),
7299
7329
  agent_id: external_exports.string().uuid().optional(),
@@ -8110,9 +8140,6 @@ var init_dist = __esm({
8110
8140
  adminPlanIdParam = external_exports.object({
8111
8141
  planId: uuidSchema
8112
8142
  });
8113
- adminHubIdParam = external_exports.object({
8114
- hubId: uuidSchema
8115
- });
8116
8143
  adminOrganizationsQuery = external_exports.object({
8117
8144
  page: external_exports.coerce.number().int().min(1).default(1),
8118
8145
  limit: external_exports.coerce.number().int().min(1).max(100).default(20),
@@ -8140,10 +8167,11 @@ var init_dist = __esm({
8140
8167
  /** Kill switch for admin debug-read endpoints. 0 = off, 1 = on. */
8141
8168
  debug_read_enabled: external_exports.number().int().min(0).max(1).optional(),
8142
8169
  /**
8143
- * Harness-agents rollout gate + kill switch (harness-agents PR 2.9a/2.9b). 0 = off
8144
- * (default-deny — the per-turn kill switch aborts every harness turn on its next
8145
- * invocation), 1 = on. `wayai admin harness disable|enable` flips this. The DO's
8146
- * `updatePlatformConfig` allowlist already accepts it; this exposes it on the route.
8170
+ * The harness rollout gate + kill switch — the ONLY harness gate. 0 = off
8171
+ * (default-deny: agent create/update is refused AND the per-turn kill switch
8172
+ * aborts every harness turn on its next invocation), 1 = on. `wayai admin harness
8173
+ * disable|enable` flips this. The DO's `updatePlatformConfig` allowlist already
8174
+ * accepts it; this exposes it on the route.
8147
8175
  */
8148
8176
  harness_enabled: external_exports.number().int().min(0).max(1).optional()
8149
8177
  }).strip().refine(
@@ -8153,12 +8181,6 @@ var init_dist = __esm({
8153
8181
  updateFreeOrgLimitBody = external_exports.object({
8154
8182
  max_free_orgs_override: external_exports.number().int().min(0).nullable()
8155
8183
  });
8156
- adminSetOrgHarnessBody = external_exports.object({
8157
- harness_enabled: external_exports.number().int().min(0).max(1)
8158
- }).strict();
8159
- adminSetHubHarnessBody = external_exports.object({
8160
- harness_enabled: external_exports.number().int().min(0).max(1)
8161
- }).strict();
8162
8184
  adminScopedTargetBody = external_exports.object({
8163
8185
  scope: external_exports.enum(["all", "org", "hub"]),
8164
8186
  org_id: external_exports.string().uuid().optional(),
@@ -11603,6 +11625,36 @@ function asEvalHistoryArray2(history) {
11603
11625
  const value = parseMaybeJson2(history);
11604
11626
  return Array.isArray(value) ? value : null;
11605
11627
  }
11628
+ function asEvalInitialStateArray2(value) {
11629
+ const parsed = parseMaybeJson2(value);
11630
+ return Array.isArray(parsed) ? parsed : null;
11631
+ }
11632
+ function evalInitialStateError2(input) {
11633
+ const record = asEvalInputRecord2(input);
11634
+ if (record === null) return null;
11635
+ const initialState = record.initial_state;
11636
+ if (initialState === void 0 || initialState === null) return null;
11637
+ const entries = asEvalInitialStateArray2(initialState);
11638
+ if (!entries) return "initial_state must be an array";
11639
+ if (entries.length === 0) return null;
11640
+ if (entries.length > MAX_INITIAL_STATE_ENTRIES2) {
11641
+ return `initial_state must have at most ${MAX_INITIAL_STATE_ENTRIES2} entries`;
11642
+ }
11643
+ const seenSlugs = /* @__PURE__ */ new Set();
11644
+ for (let i = 0; i < entries.length; i++) {
11645
+ const parsed = evalInitialStateEntry2.safeParse(entries[i]);
11646
+ if (!parsed.success) {
11647
+ const issue = parsed.error.issues[0];
11648
+ const path31 = issue?.path.join(".") || "?";
11649
+ return `initial_state[${i}].${path31} is invalid: ${issue?.message ?? "malformed"}`;
11650
+ }
11651
+ if (seenSlugs.has(parsed.data.slug)) {
11652
+ return `initial_state[${i}].slug "${parsed.data.slug}" is declared more than once`;
11653
+ }
11654
+ seenSlugs.add(parsed.data.slug);
11655
+ }
11656
+ return null;
11657
+ }
11606
11658
  function refineEvalMessageTextRole2(value, ctx) {
11607
11659
  const error = evalInputRoleError2(value.eval.message_text);
11608
11660
  if (error) {
@@ -11613,6 +11665,16 @@ function refineEvalMessageTextRole2(value, ctx) {
11613
11665
  });
11614
11666
  }
11615
11667
  }
11668
+ function refineEvalInitialState2(value, ctx) {
11669
+ const error = evalInitialStateError2(value.eval);
11670
+ if (error) {
11671
+ ctx.addIssue({
11672
+ code: external_exports.ZodIssueCode.custom,
11673
+ path: ["eval", "initial_state"],
11674
+ message: error
11675
+ });
11676
+ }
11677
+ }
11616
11678
  function refineEvalAttachments2(value, ctx) {
11617
11679
  const triggerError = evalTurnAttachmentsError2(value.eval.message_text);
11618
11680
  if (triggerError) {
@@ -11750,6 +11812,14 @@ function refineHubAsCodeEvals2(config, ctx) {
11750
11812
  message: `eval "${entry?.name ?? "<unnamed>"}": ${error}`
11751
11813
  });
11752
11814
  }
11815
+ const initialStateError = evalInitialStateError2(entry);
11816
+ if (initialStateError) {
11817
+ ctx.addIssue({
11818
+ code: external_exports.ZodIssueCode.custom,
11819
+ path: ["evals", e, "initial_state"],
11820
+ message: `eval "${entry?.name ?? "<unnamed>"}": ${initialStateError}`
11821
+ });
11822
+ }
11753
11823
  }
11754
11824
  }
11755
11825
  function refineHubAsCodeEvalAttachments2(config, ctx) {
@@ -11917,7 +11987,7 @@ function isSanitizableSliceFile(path31) {
11917
11987
  function distinctUsesBackends(uses) {
11918
11988
  return [...new Set((uses ?? []).map((u) => u.backend))];
11919
11989
  }
11920
- var 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, AUTH_TYPE3, ORG_CREDENTIAL_AUTH_TYPES3, AUTH_TYPE_DISPLAY3, LEGACY_AUTH_TYPE_MAP3, VALID_AUTH_TYPES3, AGENT_ROLES2, SAFE_USER_ID_REGEX2, SUPPORTED_LOCALES2, SUMMARIZATION_THRESHOLD_MIN2, SUMMARIZATION_THRESHOLD_MAX2, summarizationThresholdField2, monitorConfigField2, 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, followupSchema2, EXCLUSIVE_FLAG_PAIRS2, kanbanStatusSchema2, kanbanStatusesArraySchema2, laneSchema2, lanesArraySchema2, hubIdParam2, hubAdminIdParam2, hubUserIdParam2, hubIdentityIdParam2, hubTeamIdParam2, hubTeamUserDeleteParam2, hubSchemaQuery2, PREVIEW_LABEL_MAX_LENGTH2, MAX_ENDED_INDEX_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, 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, createOrgTagBody2, updateOrgTagBody2, orgCredentialIdParam2, listOrgCredentialsQuery2, createOrgCredentialBody2, updateOrgCredentialBody2, orgResourceIdParam2, orgResourceFileIdParam2, orgResourceFolderIdParam2, hubOrgResourceParam2, listOrgResourcesQuery2, orgIdQuery2, createOrgResourceBody2, updateOrgResourceBody2, createOrgResourceFolderBody2, updateOrgResourceFolderBody2, uploadOrgResourceFileBody2, updateOrgResourceFileBody2, uploadOrgSkillZipBody2, linkOrgResourceBody2, resourceIdParam2, listResourcesQuery2, createResourceBody2, updateResourceBody2, syncSkillsBody2, resourceFileIdParam2, listResourceFilesQuery2, createResourceFileBody2, updateResourceFileBody2, uploadResourceFileBody2, uploadSkillZipBody2, resourceFolderIdParam2, listResourceFoldersQuery2, createResourceFolderBody2, updateResourceFolderBody2, agentResourceQuery2, hubResourceQuery2, linkAgentResourceBody2, updateAgentResourceBody2, unlinkAgentResourceQuery2, navItemSchema2, hubCountResetBody2, navItemCountResetBody2, typingBody2, analyticsHubIdParam2, analyticsVariableIdParam2, updateVariablePinBody2, updateAnalyticsViewBody2, NUMERIC_FILTER_OPS2, TEXT_FILTER_OPS2, CATEGORICAL_FILTER_OPS2, VARIABLE_FILTER_OPS2, STRUCTURED_QUERY_OPS2, STRUCTURED_QUERY_AGGREGATIONS2, filterValueSchema2, conversationsBody2, analyticsConversationIdParam2, messagesQuery2, conversationDetailDataQuery2, analyticsDataBody2, structuredQueryBody2, analyticsSqlBody2, analyticsSqlSchemaQuery2, EVAL_PACING_PRESET_NAMES2, PACING_INTERVAL_MIN_MS2, PACING_INTERVAL_MAX_MS2, EVAL_RUN_DEADLINE_MIN_MS2, EVAL_RUN_DEADLINE_MAX_MS2, paginationSchema22, evalIdParam2, sessionIdParam2, scenarioSetIdParam2, hubIdQuery2, EVAL_INPUT_ROLES2, EVAL_INPUT_ROLE_LIST2, ROLE_ECHO_MAX2, createEvalBody2, updateEvalBody2, getEvalsQuery2, toggleEvalBody2, bulkToggleEvalsBody2, pacingConfigSchema2, 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, getConversationsQuery2, getMessagesQuery2, appMessageSenderType2, appMessageReceiverType2, appMessageBody2, updateUserBody2, updateProfileBody2, pathnameRegex2, updatePreferencesBody2, registerPushTokenBody2, deletePushTokenQuery2, activityQuery2, deletionModeSchema2, deletionRequestBody2, archiveHubIdParam2, archiveConversationParams2, archiveListQuery2, archiveMessageObservabilityParams2, conversationIdParam2, claimBody2, releaseBody2, transferBody2, closeBody2, additionalContextPayloadSchema2, kanbanUpdateBody2, annotateConversationBody2, observabilityParams2, observabilityListParams2, deleteUserConversationsBody2, sendMessageBody2, listConversationsQuery2, getConversationDetailParams2, getConversationDetailQuery2, listWhatsAppTemplatesQuery2, sendWhatsAppTemplateBody2, billingOrgIdParam2, subscriptionItemParams2, spendCapBody2, growthPacksBody2, portalSessionBody2, checkoutSessionBody2, updateBillingCurrencyBody2, invoicesQuery2, 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, hubAsCodeResourceFileSchema2, hubAsCodeResourceSchema2, uuidPattern2, ciUuidSchema2, boundedHubAsCodeResourcesSchema2, hubAsCodeConfigSchema2, ciPullHubIdParam2, ciBranchParam2, ciPullQuery2, ciHubsQuery2, ciLookupQuery2, ciBranchesQuery2, ciSyncBody2, ciPushBody2, ciDiffBody2, ciPublishBody2, ciPublishPreviewBody2, ciSyncMcpBody2, ciOrgResourcesParam2, orgResourcesConfigSchema2, ciOrgResourcesPushBody2, ciOrgResourcesDiffBody2, adminOrgIdParam2, adminOrgAdminIdParam2, adminUserIdParam2, adminPlanIdParam2, adminHubIdParam2, adminOrganizationsQuery2, adminUserSearchQuery2, kanbanSlugMigrationQuery2, adjustQuotaBody2, updatePlanBody2, addAdminUserBody2, updatePlatformConfigBody2, updateFreeOrgLimitBody2, adminSetOrgHarnessBody2, adminSetHubHarnessBody2, adminScopedTargetBody2, updatePricingPlanBody2, dataExplorerSearchQuery2, dataExplorerOrgIdParam2, dataExplorerHubIdParam2, dataExplorerConvIdParam2, dataExplorerDoInstancesQuery2, dataExplorerNsIdParam2, dataExplorerKvKeysQuery2, dataExplorerKvKeyParam2, uuidOrHexId2, dataExplorerDeleteOrgParam2, dataExplorerDeleteHubParam2, dataExplorerDeleteConvParam2, dataExplorerDeleteUserParam2, dataExplorerDeleteQuery2, dataExplorerKvDeleteQuery2, pitrDoNamespace2, pitrBookmarkParam2, pitrRestoreBody2, healthSamplingTriggerBody2, dataExplorerDebugDoType2, DEBUG_READ_MAX_LIMIT2, DEBUG_READ_DEFAULT_LIMIT2, DEBUG_DO_HEX_PREFIX2, debugDoEntityId2, debugTableName2, dataExplorerDebugTablesParam2, dataExplorerDebugRowsParam2, dataExplorerDebugRowsQuery2, dataExplorerDebugAnalyticsTable2, debugUuid2, dataExplorerDebugAnalyticsRowsParam2, dataExplorerDebugAnalyticsRowsQuery2, debugHubConvParam2, debugMessageIdQuery2, sandboxEgressPolicy2, SANDBOX_EXEC_MAX_CMD_LENGTH2, SANDBOX_EXEC_MAX_ALLOWLIST2, SANDBOX_EXEC_MAX_TIMEOUT_MS2, adminSandboxExecBody2, whatsappCallbackBody2, authMeResponse2, wsTicketResponse2, sessionCheckResponse2, logoutResponse2, magicCodeSendBody2, magicCodeSendResponse2, magicCodeVerifyBody2, magicCodeVerifyResponse2, 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, discordTier2, discordBillingCycle2, discordMetadata2, discordOAuthStartResponse2, discordOAuthFinalizeBody2, discordOAuthFinalizeResponse2, discordDisconnectResponse2, jsonSchemaSchema2, hubUserIdentity2, stateValueEntry2, getHubUserContextResponse2, updateHubUserBody2, updateHubUserResponse2, unlockHubUserNameResponse2, stateResetParams2, stateResetResponse2, hubAlertsParam2, hubAlertSeverity2, hubAlert2, hubAlertsListResponse2, noticeSeveritySchema2, noticeStatusSchema2, NOTICE_SCOPE_REGEX2, noticeScopeSchema2, noticeLinkSchema2, createNoticeBody2, updateNoticeBody2, listNoticesQuery2, noticeIdParamSchema2, templateLocaleSchema2, TEMPLATE_SLUG_REGEX2, templateSlugSchema2, templateStatusSchema2, templateFileMapSchema2, TEMPLATE_INSTANCE_ID_KEYS, TEMPLATE_OPAQUE_BLOB_KEYS, TEMPLATE_AUTHOR_DATA_KEYS, templateTextSchema2, templateUsesEntrySchema2, templateUsesSchema2, templateYamlLocaleEntry2, templateYamlWayaiBlock2, templateTagsSchema2, templateYamlSchema2, templateHeroSchema2, templatePushLocaleSchema2, templatePushBody2, templateListQuery2, templateSlugParam2, templateDetailQuery2, ADMIN_SKILL_NAME_REGEX2, adminSkillNameParam2;
11990
+ var 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, AUTH_TYPE3, ORG_CREDENTIAL_AUTH_TYPES3, AUTH_TYPE_DISPLAY3, LEGACY_AUTH_TYPE_MAP3, VALID_AUTH_TYPES3, AGENT_ROLES2, SAFE_USER_ID_REGEX2, SUPPORTED_LOCALES2, SUMMARIZATION_THRESHOLD_MIN2, SUMMARIZATION_THRESHOLD_MAX2, summarizationThresholdField2, monitorConfigField2, 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, followupSchema2, EXCLUSIVE_FLAG_PAIRS2, kanbanStatusSchema2, kanbanStatusesArraySchema2, laneSchema2, lanesArraySchema2, hubIdParam2, hubAdminIdParam2, hubUserIdParam2, hubIdentityIdParam2, hubTeamIdParam2, hubTeamUserDeleteParam2, hubSchemaQuery2, PREVIEW_LABEL_MAX_LENGTH2, MAX_ENDED_INDEX_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, 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, createOrgTagBody2, updateOrgTagBody2, orgCredentialIdParam2, listOrgCredentialsQuery2, createOrgCredentialBody2, updateOrgCredentialBody2, orgResourceIdParam2, orgResourceFileIdParam2, orgResourceFolderIdParam2, hubOrgResourceParam2, listOrgResourcesQuery2, orgIdQuery2, createOrgResourceBody2, updateOrgResourceBody2, createOrgResourceFolderBody2, updateOrgResourceFolderBody2, uploadOrgResourceFileBody2, updateOrgResourceFileBody2, uploadOrgSkillZipBody2, linkOrgResourceBody2, resourceIdParam2, listResourcesQuery2, createResourceBody2, updateResourceBody2, syncSkillsBody2, resourceFileIdParam2, listResourceFilesQuery2, createResourceFileBody2, updateResourceFileBody2, uploadResourceFileBody2, uploadSkillZipBody2, resourceFolderIdParam2, listResourceFoldersQuery2, createResourceFolderBody2, updateResourceFolderBody2, agentResourceQuery2, hubResourceQuery2, linkAgentResourceBody2, updateAgentResourceBody2, unlinkAgentResourceQuery2, navItemSchema2, hubCountResetBody2, navItemCountResetBody2, typingBody2, analyticsHubIdParam2, analyticsVariableIdParam2, updateVariablePinBody2, updateAnalyticsViewBody2, NUMERIC_FILTER_OPS2, TEXT_FILTER_OPS2, CATEGORICAL_FILTER_OPS2, VARIABLE_FILTER_OPS2, STRUCTURED_QUERY_OPS2, STRUCTURED_QUERY_AGGREGATIONS2, filterValueSchema2, conversationsBody2, analyticsConversationIdParam2, messagesQuery2, conversationDetailDataQuery2, analyticsDataBody2, structuredQueryBody2, analyticsSqlBody2, analyticsSqlSchemaQuery2, EVAL_PACING_PRESET_NAMES2, PACING_INTERVAL_MIN_MS2, PACING_INTERVAL_MAX_MS2, EVAL_RUN_DEADLINE_MIN_MS2, EVAL_RUN_DEADLINE_MAX_MS2, paginationSchema22, evalIdParam2, sessionIdParam2, scenarioSetIdParam2, hubIdQuery2, EVAL_INPUT_ROLES2, EVAL_INPUT_ROLE_LIST2, ROLE_ECHO_MAX2, EVAL_INITIAL_STATE_SCOPES2, MAX_INITIAL_STATE_ENTRIES2, evalInitialStateEntry2, createEvalBody2, updateEvalBody2, getEvalsQuery2, toggleEvalBody2, bulkToggleEvalsBody2, pacingConfigSchema2, 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, getConversationsQuery2, getMessagesQuery2, appMessageSenderType2, appMessageReceiverType2, appMessageBody2, updateUserBody2, updateProfileBody2, pathnameRegex2, updatePreferencesBody2, registerPushTokenBody2, deletePushTokenQuery2, activityQuery2, deletionModeSchema2, deletionRequestBody2, archiveHubIdParam2, archiveConversationParams2, archiveListQuery2, archiveMessageObservabilityParams2, conversationIdParam2, claimBody2, releaseBody2, transferBody2, closeBody2, additionalContextPayloadSchema2, kanbanUpdateBody2, annotateConversationBody2, observabilityParams2, observabilityListParams2, deleteUserConversationsBody2, sendMessageBody2, listConversationsQuery2, getConversationDetailParams2, getConversationDetailQuery2, listWhatsAppTemplatesQuery2, sendWhatsAppTemplateBody2, billingOrgIdParam2, subscriptionItemParams2, spendCapBody2, growthPacksBody2, portalSessionBody2, checkoutSessionBody2, updateBillingCurrencyBody2, invoicesQuery2, 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, hubAsCodeResourceFileSchema2, hubAsCodeResourceSchema2, uuidPattern2, ciUuidSchema2, boundedHubAsCodeResourcesSchema2, hubAsCodeConfigSchema2, ciPullHubIdParam2, ciBranchParam2, ciPullQuery2, ciHubsQuery2, ciLookupQuery2, ciBranchesQuery2, ciSyncBody2, ciPushBody2, ciDiffBody2, ciPublishBody2, ciPublishPreviewBody2, ciSyncMcpBody2, ciOrgResourcesParam2, orgResourcesConfigSchema2, ciOrgResourcesPushBody2, ciOrgResourcesDiffBody2, adminOrgIdParam2, adminOrgAdminIdParam2, adminUserIdParam2, adminPlanIdParam2, adminOrganizationsQuery2, adminUserSearchQuery2, kanbanSlugMigrationQuery2, adjustQuotaBody2, updatePlanBody2, addAdminUserBody2, updatePlatformConfigBody2, updateFreeOrgLimitBody2, adminScopedTargetBody2, updatePricingPlanBody2, dataExplorerSearchQuery2, dataExplorerOrgIdParam2, dataExplorerHubIdParam2, dataExplorerConvIdParam2, dataExplorerDoInstancesQuery2, dataExplorerNsIdParam2, dataExplorerKvKeysQuery2, dataExplorerKvKeyParam2, uuidOrHexId2, dataExplorerDeleteOrgParam2, dataExplorerDeleteHubParam2, dataExplorerDeleteConvParam2, dataExplorerDeleteUserParam2, dataExplorerDeleteQuery2, dataExplorerKvDeleteQuery2, pitrDoNamespace2, pitrBookmarkParam2, pitrRestoreBody2, healthSamplingTriggerBody2, dataExplorerDebugDoType2, DEBUG_READ_MAX_LIMIT2, DEBUG_READ_DEFAULT_LIMIT2, DEBUG_DO_HEX_PREFIX2, debugDoEntityId2, debugTableName2, dataExplorerDebugTablesParam2, dataExplorerDebugRowsParam2, dataExplorerDebugRowsQuery2, dataExplorerDebugAnalyticsTable2, debugUuid2, dataExplorerDebugAnalyticsRowsParam2, dataExplorerDebugAnalyticsRowsQuery2, debugHubConvParam2, debugMessageIdQuery2, sandboxEgressPolicy2, SANDBOX_EXEC_MAX_CMD_LENGTH2, SANDBOX_EXEC_MAX_ALLOWLIST2, SANDBOX_EXEC_MAX_TIMEOUT_MS2, adminSandboxExecBody2, whatsappCallbackBody2, authMeResponse2, wsTicketResponse2, sessionCheckResponse2, logoutResponse2, magicCodeSendBody2, magicCodeSendResponse2, magicCodeVerifyBody2, magicCodeVerifyResponse2, 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, discordTier2, discordBillingCycle2, discordMetadata2, discordOAuthStartResponse2, discordOAuthFinalizeBody2, discordOAuthFinalizeResponse2, discordDisconnectResponse2, jsonSchemaSchema2, hubUserIdentity2, stateValueEntry2, getHubUserContextResponse2, updateHubUserBody2, updateHubUserResponse2, unlockHubUserNameResponse2, stateResetParams2, stateResetResponse2, hubAlertsParam2, hubAlertSeverity2, hubAlert2, hubAlertsListResponse2, noticeSeveritySchema2, noticeStatusSchema2, NOTICE_SCOPE_REGEX2, noticeScopeSchema2, noticeLinkSchema2, createNoticeBody2, updateNoticeBody2, listNoticesQuery2, noticeIdParamSchema2, templateLocaleSchema2, TEMPLATE_SLUG_REGEX2, templateSlugSchema2, templateStatusSchema2, templateFileMapSchema2, TEMPLATE_INSTANCE_ID_KEYS, TEMPLATE_OPAQUE_BLOB_KEYS, TEMPLATE_AUTHOR_DATA_KEYS, templateTextSchema2, templateUsesEntrySchema2, templateUsesSchema2, templateYamlLocaleEntry2, templateYamlWayaiBlock2, templateTagsSchema2, templateYamlSchema2, templateHeroSchema2, templatePushLocaleSchema2, templatePushBody2, templateListQuery2, templateSlugParam2, templateDetailQuery2, ADMIN_SKILL_NAME_REGEX2, adminSkillNameParam2;
11921
11991
  var init_contracts = __esm({
11922
11992
  "../../packages/core/dist/contracts/index.js"() {
11923
11993
  "use strict";
@@ -12382,6 +12452,13 @@ var init_contracts = __esm({
12382
12452
  language: external_exports.enum(["en", "pt", "es"]).optional(),
12383
12453
  access_request_message: external_exports.string().max(1e3).nullable().optional(),
12384
12454
  access_approval_role: external_exports.enum(["admin", "team"]).optional(),
12455
+ // AI-failure escalation. When an LLM provider outage persists past this many
12456
+ // minutes the conversation escalates to the team; null → code default. The two
12457
+ // message fields override the localized (hub.language) delay / hand-off notices;
12458
+ // null → localized default. Bounds validated here so out-of-range never persists.
12459
+ ai_failure_escalation_minutes: external_exports.number().int().min(1).max(60).nullable().optional(),
12460
+ ai_delay_message: external_exports.string().max(1e3).nullable().optional(),
12461
+ ai_handoff_message: external_exports.string().max(1e3).nullable().optional(),
12385
12462
  // Native-completion fallback connection for a degraded harness turn (PR 2.10b).
12386
12463
  // A NATIVE LLM (Agent) connection id on this hub; validated at set-time on the REST
12387
12464
  // PATCH (setup/hubs.ts rejects a non-existent / non-Agent / harness id) and re-checked
@@ -13088,12 +13165,19 @@ var init_contracts = __esm({
13088
13165
  EVAL_INPUT_ROLES2 = ["user", "system"];
13089
13166
  EVAL_INPUT_ROLE_LIST2 = EVAL_INPUT_ROLES2.map((r) => `"${r}"`).join(" or ");
13090
13167
  ROLE_ECHO_MAX2 = 40;
13168
+ EVAL_INITIAL_STATE_SCOPES2 = ["user"];
13169
+ MAX_INITIAL_STATE_ENTRIES2 = 20;
13170
+ evalInitialStateEntry2 = external_exports.object({
13171
+ slug: external_exports.string().min(1).max(200),
13172
+ scope: external_exports.enum(EVAL_INITIAL_STATE_SCOPES2).default("user"),
13173
+ value: external_exports.record(external_exports.unknown())
13174
+ });
13091
13175
  createEvalBody2 = external_exports.object({
13092
13176
  eval: external_exports.record(external_exports.unknown())
13093
- }).superRefine(refineEvalMessageTextRole2).superRefine(refineEvalAttachments2);
13177
+ }).superRefine(refineEvalMessageTextRole2).superRefine(refineEvalAttachments2).superRefine(refineEvalInitialState2);
13094
13178
  updateEvalBody2 = external_exports.object({
13095
13179
  eval: external_exports.record(external_exports.unknown())
13096
- }).superRefine(refineEvalMessageTextRole2).superRefine(refineEvalAttachments2);
13180
+ }).superRefine(refineEvalMessageTextRole2).superRefine(refineEvalAttachments2).superRefine(refineEvalInitialState2);
13097
13181
  getEvalsQuery2 = external_exports.object({
13098
13182
  hub_id: external_exports.string().uuid(),
13099
13183
  agent_id: external_exports.string().uuid().optional(),
@@ -13910,9 +13994,6 @@ var init_contracts = __esm({
13910
13994
  adminPlanIdParam2 = external_exports.object({
13911
13995
  planId: uuidSchema2
13912
13996
  });
13913
- adminHubIdParam2 = external_exports.object({
13914
- hubId: uuidSchema2
13915
- });
13916
13997
  adminOrganizationsQuery2 = external_exports.object({
13917
13998
  page: external_exports.coerce.number().int().min(1).default(1),
13918
13999
  limit: external_exports.coerce.number().int().min(1).max(100).default(20),
@@ -13940,10 +14021,11 @@ var init_contracts = __esm({
13940
14021
  /** Kill switch for admin debug-read endpoints. 0 = off, 1 = on. */
13941
14022
  debug_read_enabled: external_exports.number().int().min(0).max(1).optional(),
13942
14023
  /**
13943
- * Harness-agents rollout gate + kill switch (harness-agents PR 2.9a/2.9b). 0 = off
13944
- * (default-deny — the per-turn kill switch aborts every harness turn on its next
13945
- * invocation), 1 = on. `wayai admin harness disable|enable` flips this. The DO's
13946
- * `updatePlatformConfig` allowlist already accepts it; this exposes it on the route.
14024
+ * The harness rollout gate + kill switch — the ONLY harness gate. 0 = off
14025
+ * (default-deny: agent create/update is refused AND the per-turn kill switch
14026
+ * aborts every harness turn on its next invocation), 1 = on. `wayai admin harness
14027
+ * disable|enable` flips this. The DO's `updatePlatformConfig` allowlist already
14028
+ * accepts it; this exposes it on the route.
13947
14029
  */
13948
14030
  harness_enabled: external_exports.number().int().min(0).max(1).optional()
13949
14031
  }).strip().refine(
@@ -13953,12 +14035,6 @@ var init_contracts = __esm({
13953
14035
  updateFreeOrgLimitBody2 = external_exports.object({
13954
14036
  max_free_orgs_override: external_exports.number().int().min(0).nullable()
13955
14037
  });
13956
- adminSetOrgHarnessBody2 = external_exports.object({
13957
- harness_enabled: external_exports.number().int().min(0).max(1)
13958
- }).strict();
13959
- adminSetHubHarnessBody2 = external_exports.object({
13960
- harness_enabled: external_exports.number().int().min(0).max(1)
13961
- }).strict();
13962
14038
  adminScopedTargetBody2 = external_exports.object({
13963
14039
  scope: external_exports.enum(["all", "org", "hub"]),
13964
14040
  org_id: external_exports.string().uuid().optional(),
@@ -15394,8 +15470,35 @@ function parseEvalYaml(filePath, relPath, setName, hubFolder, bytesByHash) {
15394
15470
  if (fixture) evalEntry.fixture = fixture;
15395
15471
  const targetBase = parseFixtureField(data.target_base, `Eval "${evalName}" in ${relPath}`, "target_base");
15396
15472
  if (targetBase) evalEntry.target_base = targetBase;
15473
+ const initialState = parseInitialStateField(data.initial_state, `Eval "${evalName}" in ${relPath}`);
15474
+ if (initialState) evalEntry.initial_state = initialState;
15397
15475
  return evalEntry;
15398
15476
  }
15477
+ function parseInitialStateField(raw, label) {
15478
+ if (raw === void 0 || raw === null) return void 0;
15479
+ if (!Array.isArray(raw)) {
15480
+ throw expected(`${label}: "initial_state" must be a list of { slug, value } entries.`);
15481
+ }
15482
+ if (raw.length === 0) return void 0;
15483
+ const out = [];
15484
+ for (const entry of raw) {
15485
+ if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
15486
+ throw expected(`${label}: each "initial_state" entry must be an object with "slug" and "value".`);
15487
+ }
15488
+ const e = entry;
15489
+ if (typeof e.slug !== "string" || !e.slug.trim()) {
15490
+ throw expected(`${label}: an "initial_state" entry is missing a non-empty "slug".`);
15491
+ }
15492
+ if (e.scope !== void 0 && e.scope !== "user") {
15493
+ throw expected(`${label}: "initial_state" entry "${e.slug}" has unsupported scope "${String(e.scope)}" (only "user").`);
15494
+ }
15495
+ if (!e.value || typeof e.value !== "object" || Array.isArray(e.value)) {
15496
+ throw expected(`${label}: "initial_state" entry "${e.slug}" must have a "value" object.`);
15497
+ }
15498
+ out.push({ slug: e.slug.trim(), scope: "user", value: e.value });
15499
+ }
15500
+ return out;
15501
+ }
15399
15502
  function parseVariablesMap(raw, label) {
15400
15503
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) return void 0;
15401
15504
  const vars = raw;
@@ -15622,6 +15725,9 @@ function buildEvalYamlObject(evalEntry, slug) {
15622
15725
  if (evalEntry.variables && Object.keys(evalEntry.variables).length > 0) {
15623
15726
  out.variables = evalEntry.variables;
15624
15727
  }
15728
+ if (Array.isArray(evalEntry.initial_state) && evalEntry.initial_state.length > 0) {
15729
+ out.initial_state = evalEntry.initial_state;
15730
+ }
15625
15731
  assertAttachmentsAreLocalPaths(evalEntry.input, `eval "${evalEntry.name}" input`);
15626
15732
  out.input = evalEntry.input;
15627
15733
  out.expected = evalEntry.expected;
@@ -21926,97 +22032,49 @@ async function runHarnessMassDestroy(flagArgs) {
21926
22032
  );
21927
22033
  }
21928
22034
  }
21929
- function resolveHarnessLayer(flagArgs, usage3) {
21930
- let orgId;
21931
- let hubId;
21932
- for (let i = 0; i < flagArgs.length; i++) {
21933
- const arg = flagArgs[i];
21934
- switch (arg) {
21935
- case "--org":
21936
- orgId = requireFlagValue(flagArgs, ++i, "--org");
21937
- break;
21938
- case "--hub":
21939
- hubId = requireFlagValue(flagArgs, ++i, "--hub");
21940
- break;
21941
- default:
21942
- console.error(`Unknown flag: ${arg}`);
21943
- console.error(usage3);
21944
- process.exit(1);
21945
- }
21946
- }
21947
- if (orgId && hubId) {
21948
- console.error("Provide at most ONE of --org <org_id> or --hub <hub_id> (or neither for the platform layer).");
21949
- console.error(usage3);
21950
- process.exit(1);
21951
- }
21952
- if (orgId) return { kind: "org", orgId };
21953
- if (hubId) return { kind: "hub", hubId };
21954
- return { kind: "platform" };
22035
+ function rejectHarnessFlags(flagArgs, usage3) {
22036
+ if (flagArgs.length === 0) return;
22037
+ console.error(`Unknown flag: ${flagArgs[0]}`);
22038
+ console.error("The harness rollout gate is platform-wide; there is no --org/--hub layer.");
22039
+ console.error(usage3);
22040
+ process.exit(1);
21955
22041
  }
21956
22042
  async function runHarnessToggle(enable, flagArgs) {
21957
- const USAGE = "wayai admin harness enable|disable [--org <org_id> | --hub <hub_id>]";
21958
- const layer = resolveHarnessLayer(flagArgs, USAGE);
22043
+ const USAGE = "wayai admin harness enable|disable";
22044
+ rejectHarnessFlags(flagArgs, USAGE);
21959
22045
  const { config, accessToken } = await requireAuth();
21960
22046
  const client = new ApiClient({ apiUrl: config.api_url, accessToken });
21961
22047
  let value;
21962
- let scopeLabel;
21963
22048
  try {
21964
- if (layer.kind === "org") {
21965
- const res = await client.adminSetOrgHarness(layer.orgId, enable ? 1 : 0);
21966
- value = res.data.harness_enabled;
21967
- scopeLabel = `org ${layer.orgId}`;
21968
- } else if (layer.kind === "hub") {
21969
- const res = await client.adminSetHubHarness(layer.hubId, enable ? 1 : 0);
21970
- value = res.data.harness_enabled;
21971
- scopeLabel = `hub ${layer.hubId}`;
21972
- } else {
21973
- const res = await client.adminUpdateConfig({ harness_enabled: enable ? 1 : 0 });
21974
- value = res.data.harness_enabled;
21975
- scopeLabel = "platform";
21976
- }
22049
+ const res = await client.adminUpdateConfig({ harness_enabled: enable ? 1 : 0 });
22050
+ value = res.data.harness_enabled;
21977
22051
  } catch (err) {
21978
22052
  exitOnApiError(err);
21979
22053
  throw err;
21980
22054
  }
21981
22055
  const state = enable ? "ENABLED" : "DISABLED";
21982
- console.log(`Harness ${state} for ${scopeLabel} (harness_enabled=${value ?? (enable ? 1 : 0)}).`);
21983
- if (layer.kind === "platform") {
21984
- if (enable) {
21985
- console.log("New harness turns may run again (subject to each hub's + org's own flag).");
21986
- } else {
21987
- console.log("The per-turn kill switch now aborts every harness turn on its next invocation.");
21988
- console.log("Next: run `wayai admin harness mass-destroy --all --dry-run` to see what is still live, then reap it.");
21989
- }
22056
+ console.log(`Harness ${state} platform-wide (harness_enabled=${value ?? (enable ? 1 : 0)}).`);
22057
+ if (enable) {
22058
+ console.log("Harness agents may be created again and new harness turns may run.");
21990
22059
  } else {
21991
- console.log("Reminder: a harness agent is creatable only when the platform, org, AND hub flags are ALL on.");
22060
+ console.log("The per-turn kill switch now aborts every harness turn on its next invocation.");
22061
+ console.log("Next: run `wayai admin harness mass-destroy --all --dry-run` to see what is still live, then reap it.");
21992
22062
  }
21993
22063
  }
21994
22064
  async function runHarnessStatus(flagArgs) {
21995
- const USAGE = "wayai admin harness status [--org <org_id> | --hub <hub_id>]";
21996
- const layer = resolveHarnessLayer(flagArgs, USAGE);
22065
+ const USAGE = "wayai admin harness status";
22066
+ rejectHarnessFlags(flagArgs, USAGE);
21997
22067
  const { config, accessToken } = await requireAuth();
21998
22068
  const client = new ApiClient({ apiUrl: config.api_url, accessToken });
21999
22069
  let value = 0;
22000
- let scopeLabel;
22001
22070
  try {
22002
- if (layer.kind === "org") {
22003
- const res = await client.adminGetOrgHarness(layer.orgId);
22004
- value = res.data.harness_enabled;
22005
- scopeLabel = `org ${layer.orgId}`;
22006
- } else if (layer.kind === "hub") {
22007
- const res = await client.adminGetHubHarness(layer.hubId);
22008
- value = res.data.harness_enabled;
22009
- scopeLabel = `hub ${layer.hubId}`;
22010
- } else {
22011
- const res = await client.adminGetConfig();
22012
- value = res.data.harness_enabled ?? 0;
22013
- scopeLabel = "platform";
22014
- }
22071
+ const res = await client.adminGetConfig();
22072
+ value = res.data.harness_enabled ?? 0;
22015
22073
  } catch (err) {
22016
22074
  exitOnApiError(err);
22017
22075
  throw err;
22018
22076
  }
22019
- console.log(`harness_enabled (${scopeLabel}): ${value} (${value ? "ENABLED" : "DISABLED"})`);
22077
+ console.log(`harness_enabled (platform): ${value} (${value ? "ENABLED" : "DISABLED"})`);
22020
22078
  }
22021
22079
  function requireFlagValue(flagArgs, index, flag) {
22022
22080
  const v = flagArgs[index];
@@ -22450,12 +22508,9 @@ Usage:
22450
22508
  wayai admin hubs repair-team-orphans --all | --org <org_id> | --hub <hub_id> [--dry-run] [--yes] [--json]
22451
22509
  Purge hub_team_id references left dangling by a pre-cascade team deletion (silently empties a support agent's queue). Idempotent \u2014 run --dry-run first
22452
22510
 
22453
- wayai admin harness disable [--org <org_id> | --hub <hub_id>]
22454
- Flip harness_enabled OFF. No scope = platform (break-glass: per-turn kill switch aborts each harness turn on its next invocation); --org/--hub target that layer of the three-layer rollout gate
22455
- wayai admin harness enable [--org <org_id> | --hub <hub_id>]
22456
- Flip harness_enabled ON. No scope = platform; --org/--hub stage the org/hub layer (a harness agent is creatable only when platform AND org AND hub are ALL on)
22457
- wayai admin harness status [--org <org_id> | --hub <hub_id>]
22458
- Print the harness_enabled flag for the chosen layer (platform by default)
22511
+ wayai admin harness disable Flip the platform harness_enabled flag OFF (break-glass: blocks harness-agent writes and the per-turn kill switch aborts each harness turn on its next invocation)
22512
+ wayai admin harness enable Flip the platform harness_enabled flag ON
22513
+ wayai admin harness status Print the platform harness_enabled flag
22459
22514
  wayai admin harness mass-destroy --all | --org <org_id> | --hub <hub_id> [--dry-run] [--yes] [--json]
22460
22515
  Reap every live harness sandbox/token/slot in scope (run --dry-run first to see the blast radius)
22461
22516
 
@@ -22492,16 +22547,13 @@ Sources:
22492
22547
  command, and destroys it. Egress omitted \u21D2 deny-all (fail-closed); opt up
22493
22548
  with --egress + --allow. The E2B key never leaves the backend. Capped at
22494
22549
  20 execs/hour/user (the strictest tier \u2014 this is arbitrary code execution).
22495
- harness Incident response + staged rollout for harness agents. \`disable\`/\`enable\`
22496
- flip the harness_enabled flag; \`status\` prints it. With no scope they
22497
- target the PLATFORM flag (disable = break-glass: the per-turn kill switch
22498
- then aborts each harness turn on its next invocation). With --org <id> or
22499
- --hub <id> they target that layer of the three-layer rollout gate (PR
22500
- 2.9a-2): a harness agent is creatable only when platform AND org AND hub
22501
- are ALL on \u2014 flip platform on, then enable per org/hub to stage. The
22502
- per-turn kill switch stays platform-only. \`mass-destroy\` reaps every
22503
- harness sandbox/token/slot that is live NOW (scope: --hub < --org < --all,
22504
- prefer the narrowest). Run \`mass-destroy --dry-run\` first to see the blast
22550
+ harness Incident response for harness agents. \`disable\`/\`enable\` flip the single
22551
+ PLATFORM-wide harness_enabled flag; \`status\` prints it. That one flag both
22552
+ gates harness-agent create/update (default-deny, fail-closed) and drives
22553
+ the per-turn kill switch, so \`disable\` is the break-glass: each harness
22554
+ turn aborts on its next invocation. \`mass-destroy\` reaps every harness
22555
+ sandbox/token/slot that is live NOW (scope: --hub < --org < --all, prefer
22556
+ the narrowest). Run \`mass-destroy --dry-run\` first to see the blast
22505
22557
  radius. See docs/runbooks/harness-incident-response.md.
22506
22558
 
22507
22559
  Types (do): ${VALID_TYPES.join(" | ")}