@wayai/cli 0.3.124 → 0.3.126

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
@@ -4862,6 +4862,9 @@ function refineToolConfig(value, ctx) {
4862
4862
  }
4863
4863
  }
4864
4864
  }
4865
+ function isIsoTimestamp(value) {
4866
+ return typeof value === "string" && ISO_UTC_RE.test(value);
4867
+ }
4865
4868
  function describeRole(role) {
4866
4869
  if (typeof role === "string") {
4867
4870
  return JSON.stringify(role.length > ROLE_ECHO_MAX ? `${role.slice(0, ROLE_ECHO_MAX)}\u2026` : role);
@@ -5325,7 +5328,7 @@ function refineHubAsCodeDelegation(config, ctx) {
5325
5328
  });
5326
5329
  });
5327
5330
  }
5328
- 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, 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, 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, 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, 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, analyticsSqlTable, 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_FIXTURE_NAME_MAX_LENGTH, evalFixtureOverrideSchema, runSessionQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, EVAL_INITIAL_STATE_SCOPES, MAX_INITIAL_STATE_ENTRIES, evalInitialStateEntry, createEvalBody, updateEvalBody, 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, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, activityQuery, deletionModeSchema, deletionRequestBody, templateLocaleSchema, TEMPLATE_SLUG_REGEX, templateSlugSchema, templateStatusSchema, templateFileMapSchema, TEMPLATE_INSTANCE_ID_KEYS, TEMPLATE_OPAQUE_BLOB_KEYS, TEMPLATE_AUTHOR_DATA_KEYS, templateTextSchema, templateUsesEntrySchema, templateUsesSchema, templateYamlLocaleEntry, templateYamlWayaiBlock, templateTagsSchema, templateYamlSchema, templateHeroSchema, templatePushLocaleSchema, templatePushBody, templateListQuery, templateSlugParam, templateDetailQuery, courseQuizScoreSchema, upsertCourseLessonBody, linkCourseCapstoneBody, 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, 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, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetBody, 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, 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, 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, ADMIN_SKILL_NAME_REGEX, adminSkillNameParam;
5331
+ 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, 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, 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, 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, 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, analyticsSqlTable, analyticsSqlSchemaQuery, EVAL_PACING_PRESET_NAMES, PACING_INTERVAL_MIN_MS, PACING_INTERVAL_MAX_MS, EVAL_RUN_DEADLINE_MIN_MS, EVAL_RUN_DEADLINE_MAX_MS, ISO_UTC_RE, paginationSchema2, evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, evalDateContextSchema, EVAL_FIXTURE_NAME_MAX_LENGTH, evalFixtureOverrideSchema, runSessionQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, EVAL_INITIAL_STATE_SCOPES, MAX_INITIAL_STATE_ENTRIES, evalInitialStateEntry, createEvalBody, updateEvalBody, 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, evalSessionConfigResponseSchema, evalSessionResponseSchema, getConversationsQuery, getMessagesQuery, appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, activityQuery, deletionModeSchema, deletionRequestBody, templateLocaleSchema, TEMPLATE_SLUG_REGEX, templateSlugSchema, templateStatusSchema, templateFileMapSchema, TEMPLATE_INSTANCE_ID_KEYS, TEMPLATE_OPAQUE_BLOB_KEYS, TEMPLATE_AUTHOR_DATA_KEYS, templateTextSchema, templateUsesEntrySchema, templateUsesSchema, templateYamlLocaleEntry, templateYamlWayaiBlock, templateTagsSchema, templateYamlSchema, templateHeroSchema, templatePushLocaleSchema, templatePushBody, templateListQuery, templateSlugParam, templateDetailQuery, courseQuizScoreSchema, upsertCourseLessonBody, linkCourseCapstoneBody, 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, 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, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetBody, 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, 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, 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, ADMIN_SKILL_NAME_REGEX, adminSkillNameParam;
5329
5332
  var init_contracts = __esm({
5330
5333
  "../../packages/core/dist/contracts/index.js"() {
5331
5334
  "use strict";
@@ -6593,6 +6596,7 @@ var init_contracts = __esm({
6593
6596
  PACING_INTERVAL_MAX_MS = 6e4;
6594
6597
  EVAL_RUN_DEADLINE_MIN_MS = 1e3;
6595
6598
  EVAL_RUN_DEADLINE_MAX_MS = 18e5;
6599
+ ISO_UTC_RE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
6596
6600
  paginationSchema2 = external_exports.object({
6597
6601
  limit: external_exports.number().int().positive().max(1e3).default(50),
6598
6602
  offset: external_exports.number().int().min(0).default(0)
@@ -6609,6 +6613,18 @@ var init_contracts = __esm({
6609
6613
  hubIdQuery = external_exports.object({
6610
6614
  hub_id: external_exports.string().uuid()
6611
6615
  });
6616
+ evalDateContextSchema = external_exports.object({
6617
+ base_time: timestampSchema.refine(isIsoTimestamp, "Expected a canonical ISO timestamp"),
6618
+ timezone: external_exports.string().min(1).refine((timezone) => {
6619
+ try {
6620
+ new Intl.DateTimeFormat("en-US", { timeZone: timezone }).format(0);
6621
+ return true;
6622
+ } catch {
6623
+ return false;
6624
+ }
6625
+ }, "Expected an IANA timezone"),
6626
+ locale: external_exports.enum(SUPPORTED_LOCALES)
6627
+ }).strict();
6612
6628
  EVAL_FIXTURE_NAME_MAX_LENGTH = 200;
6613
6629
  evalFixtureOverrideSchema = external_exports.string().trim().min(1).max(EVAL_FIXTURE_NAME_MAX_LENGTH);
6614
6630
  runSessionQuery = hubIdQuery.extend({
@@ -6658,22 +6674,19 @@ var init_contracts = __esm({
6658
6674
  );
6659
6675
  sessionConfigSchema = external_exports.object({
6660
6676
  pacing: pacingConfigSchema.optional(),
6677
+ // Server-owned immutable clock.
6678
+ date_context: external_exports.never().optional(),
6679
+ date_context_claimed: external_exports.never().optional(),
6680
+ seed_cleanup: external_exports.never().optional(),
6661
6681
  // Per-run finalization deadline for the HubDO watchdog (gh #2591). A started
6662
6682
  // run idle past this many ms is reaped to `failed`. Omitted → backend default
6663
6683
  // (`EVAL_DEFAULT_RUN_DEADLINE_MS`).
6664
6684
  run_deadline_ms: external_exports.number().int().min(EVAL_RUN_DEADLINE_MIN_MS).max(EVAL_RUN_DEADLINE_MAX_MS).optional(),
6665
- // Resolved seed context (gh #3090), written server-side at reset-before time
6666
- // once the fixture RESET against Rekor succeeds. Read back on every terminal
6667
- // path (completed / cancelled / deleted / watchdog-reaped) to CLEAR the fixture
6668
- // durably — survives a DO restart, so a watchdog-only finalize can still clean up.
6669
- seed: external_exports.object({
6670
- fixture: external_exports.string(),
6671
- target_base: external_exports.string().nullable().optional(),
6672
- connection_id: external_exports.string().nullable().optional()
6673
- }).optional()
6685
+ seed: external_exports.never().optional()
6674
6686
  }).passthrough();
6675
6687
  createSessionBody = external_exports.object({
6676
6688
  session: external_exports.object({
6689
+ session_name: external_exports.string().trim().min(1),
6677
6690
  session_config: sessionConfigSchema.optional()
6678
6691
  }).passthrough()
6679
6692
  });
@@ -6807,6 +6820,41 @@ var init_contracts = __esm({
6807
6820
  fixture: fixtureField.nullable().optional(),
6808
6821
  target_base: fixtureField.nullable().optional()
6809
6822
  });
6823
+ evalSessionConfigResponseSchema = external_exports.object({
6824
+ agent: external_exports.custom().optional(),
6825
+ scenario_set_id: external_exports.string().optional().catch(void 0),
6826
+ date_context: evalDateContextSchema.optional().catch(void 0),
6827
+ /** Resolved server-side seed attribution. */
6828
+ seed: external_exports.object({
6829
+ fixture: external_exports.string(),
6830
+ target_base: external_exports.string().nullable().optional(),
6831
+ connection_id: external_exports.string().nullable().optional()
6832
+ }).optional(),
6833
+ // Internal lifecycle fields: never expose them as response data.
6834
+ date_context_claimed: external_exports.unknown().optional().transform(() => void 0),
6835
+ seed_cleanup: external_exports.unknown().optional().transform(() => void 0),
6836
+ pacing: pacingConfigSchema.optional().catch(void 0)
6837
+ }).passthrough();
6838
+ evalSessionResponseSchema = external_exports.object({
6839
+ eval_session_id: external_exports.string(),
6840
+ created_at: timestampSchema,
6841
+ updated_at: timestampSchema,
6842
+ hub_id: external_exports.string(),
6843
+ session_name: external_exports.string(),
6844
+ session_description: external_exports.string().optional(),
6845
+ session_status: external_exports.enum(["draft", "agents_responding", "awaiting_review", "completed", "failed", "cancelled"]),
6846
+ started_at: timestampSchema.optional(),
6847
+ completed_at: timestampSchema.optional(),
6848
+ total_evals: external_exports.number(),
6849
+ total_runs: external_exports.number(),
6850
+ successful_runs: external_exports.number(),
6851
+ failed_runs: external_exports.number(),
6852
+ created_by: external_exports.string(),
6853
+ /** Optional — sessions created pre-PR2 may not have this. */
6854
+ scenario_set_id: external_exports.string().nullable().optional(),
6855
+ /** Launch-time snapshot. */
6856
+ session_config: evalSessionConfigResponseSchema.optional()
6857
+ }).passthrough();
6810
6858
  getConversationsQuery = external_exports.object({
6811
6859
  nav_item: external_exports.enum(["chat", "task", "support", "chat_task"]),
6812
6860
  hub_team_user_id: external_exports.string().optional(),
@@ -8311,7 +8359,13 @@ var init_contracts = __esm({
8311
8359
  limit: external_exports.coerce.number().int().min(1).max(200).optional(),
8312
8360
  offset: external_exports.coerce.number().int().min(0).optional(),
8313
8361
  /** ISO 8601 lower bound on created_at. */
8314
- since: external_exports.string().datetime().optional()
8362
+ since: external_exports.string().datetime().optional(),
8363
+ /**
8364
+ * ISO 8601 lower bound on resolution time — "what did we resolve recently", which `since`
8365
+ * (a created_at filter) cannot answer for a long-lived report resolved yesterday. Implies
8366
+ * a terminal status (`addressed`/`dismissed`) and orders on that same axis.
8367
+ */
8368
+ resolved_since: external_exports.string().datetime().optional()
8315
8369
  });
8316
8370
  GITHUB_ISSUE_URL_REGEX = /^https:\/\/github\.com\/[^/]+\/[^/]+\/issues\/\d+(?:[/?#]|$)/;
8317
8371
  githubIssueUrlSchema = external_exports.string().url().refine((u) => GITHUB_ISSUE_URL_REGEX.test(u), {
@@ -8873,6 +8927,11 @@ var init_api_client = __esm({
8873
8927
  if (fixture) params.set("fixture", fixture);
8874
8928
  return this.request("POST", `/api/evals/sessions/${sessionId}/run?${params.toString()}`);
8875
8929
  }
8930
+ /** Cancel a running eval session. A session that already finished is left unchanged. */
8931
+ async stopEvalSession(hubId, sessionId) {
8932
+ const params = new URLSearchParams({ hub_id: hubId });
8933
+ return this.request("POST", `/api/evals/sessions/${sessionId}/stop?${params.toString()}`);
8934
+ }
8876
8935
  async getEvalSessionDetails(hubId, sessionId) {
8877
8936
  const params = new URLSearchParams({ hub_id: hubId });
8878
8937
  return this.request("GET", `/api/evals/sessions/${sessionId}?${params.toString()}`);
@@ -9075,6 +9134,7 @@ var init_api_client = __esm({
9075
9134
  if (params.limit != null) qs.set("limit", String(params.limit));
9076
9135
  if (params.offset != null) qs.set("offset", String(params.offset));
9077
9136
  if (params.since) qs.set("since", params.since);
9137
+ if (params.resolved_since) qs.set("resolved_since", params.resolved_since);
9078
9138
  const suffix = qs.toString();
9079
9139
  return this.request("GET", `/api/admin/reports${suffix ? "?" + suffix : ""}`);
9080
9140
  }
@@ -9277,6 +9337,43 @@ var init_api_client = __esm({
9277
9337
  }
9278
9338
  });
9279
9339
 
9340
+ // src/lib/errors.ts
9341
+ function extractApiMessage(err) {
9342
+ if (err instanceof ApiError) {
9343
+ try {
9344
+ const parsed = JSON.parse(err.body);
9345
+ if (parsed.message) return parsed.message;
9346
+ if (parsed.error) return parsed.error;
9347
+ } catch {
9348
+ }
9349
+ return err.body || err.message;
9350
+ }
9351
+ return err instanceof Error ? err.message : String(err);
9352
+ }
9353
+ function friendlyHint(err) {
9354
+ if (isNetworkError(err)) {
9355
+ return "Couldn't reach WayAI \u2014 check your network connection and try again.";
9356
+ }
9357
+ if (!(err instanceof ApiError)) return null;
9358
+ if (err.body.includes("FREE_PLAN_RESTRICTION")) {
9359
+ return "Publishing to production requires a paid plan. Upgrade your organization to publish or sync.";
9360
+ }
9361
+ const { status } = err;
9362
+ if (status === 401) return "Your session may have expired. Run `wayai login` to re-authenticate.";
9363
+ if (status === 402) return "Quota exceeded for your plan. Review usage or upgrade your plan.";
9364
+ if (status === 403) return "Access denied. Your token may lack permission for this hub or resource.";
9365
+ if (status === 429) return "Rate limited. Wait a moment and try again.";
9366
+ if (status >= 500) return "WayAI server error \u2014 likely temporary. Try again shortly.";
9367
+ return null;
9368
+ }
9369
+ var init_errors2 = __esm({
9370
+ "src/lib/errors.ts"() {
9371
+ "use strict";
9372
+ init_api_client();
9373
+ init_network_error();
9374
+ }
9375
+ });
9376
+
9280
9377
  // ../../packages/core/dist/index.js
9281
9378
  function isPublicIdentifier(value) {
9282
9379
  return UUID_RE.test(value) || HEX_RE.test(value) || WORKOS_ID_RE.test(value);
@@ -9556,6 +9653,9 @@ function refineToolConfig2(value, ctx) {
9556
9653
  }
9557
9654
  }
9558
9655
  }
9656
+ function isIsoTimestamp2(value) {
9657
+ return typeof value === "string" && ISO_UTC_RE2.test(value);
9658
+ }
9559
9659
  function describeRole2(role) {
9560
9660
  if (typeof role === "string") {
9561
9661
  return JSON.stringify(role.length > ROLE_ECHO_MAX2 ? `${role.slice(0, ROLE_ECHO_MAX2)}\u2026` : role);
@@ -10054,7 +10154,7 @@ function findStepBoundaries(transcript) {
10054
10154
  }
10055
10155
  return out;
10056
10156
  }
10057
- 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_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, 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, 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, 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, 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, analyticsSqlTable2, 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_FIXTURE_NAME_MAX_LENGTH2, evalFixtureOverrideSchema2, runSessionQuery2, EVAL_INPUT_ROLES2, EVAL_INPUT_ROLE_LIST2, ROLE_ECHO_MAX2, EVAL_INITIAL_STATE_SCOPES2, MAX_INITIAL_STATE_ENTRIES2, evalInitialStateEntry2, createEvalBody2, updateEvalBody2, 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, apiChannelMessage2, apiChannelMessageBody2, appMessageBody2, appMessageResponse2, updateUserBody2, updateProfileBody2, pathnameRegex2, updatePreferencesBody2, registerPushTokenBody2, deletePushTokenQuery2, activityQuery2, deletionModeSchema2, deletionRequestBody2, templateLocaleSchema2, TEMPLATE_SLUG_REGEX2, templateSlugSchema2, templateStatusSchema2, templateFileMapSchema2, templateTextSchema2, templateUsesEntrySchema2, templateUsesSchema2, templateYamlLocaleEntry2, templateYamlWayaiBlock2, templateTagsSchema2, templateYamlSchema2, templateHeroSchema2, templatePushLocaleSchema2, templatePushBody2, templateListQuery2, templateSlugParam2, templateDetailQuery2, courseQuizScoreSchema2, upsertCourseLessonBody2, linkCourseCapstoneBody2, 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, 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, adminPlanIdParam2, adminOrganizationsQuery2, adminUserSearchQuery2, kanbanSlugMigrationQuery2, adjustQuotaBody2, updatePlanBody2, addAdminUserBody2, updatePlatformConfigBody2, updateFreeOrgLimitBody2, adminScopedTargetBody2, 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, 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, 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, ADMIN_SKILL_NAME_REGEX2, adminSkillNameParam2, WAYAI_WORKSPACE_LAYOUT;
10157
+ 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_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, 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, 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, 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, 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, analyticsSqlTable2, analyticsSqlSchemaQuery2, EVAL_PACING_PRESET_NAMES2, PACING_INTERVAL_MIN_MS2, PACING_INTERVAL_MAX_MS2, EVAL_RUN_DEADLINE_MIN_MS2, EVAL_RUN_DEADLINE_MAX_MS2, ISO_UTC_RE2, paginationSchema22, evalIdParam2, sessionIdParam2, scenarioSetIdParam2, hubIdQuery2, evalDateContextSchema2, EVAL_FIXTURE_NAME_MAX_LENGTH2, evalFixtureOverrideSchema2, runSessionQuery2, EVAL_INPUT_ROLES2, EVAL_INPUT_ROLE_LIST2, ROLE_ECHO_MAX2, EVAL_INITIAL_STATE_SCOPES2, MAX_INITIAL_STATE_ENTRIES2, evalInitialStateEntry2, createEvalBody2, updateEvalBody2, 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, evalSessionConfigResponseSchema2, evalSessionResponseSchema2, getConversationsQuery2, getMessagesQuery2, appMessageSenderType2, appMessageReceiverType2, apiChannelMessage2, apiChannelMessageBody2, appMessageBody2, appMessageResponse2, updateUserBody2, updateProfileBody2, pathnameRegex2, updatePreferencesBody2, registerPushTokenBody2, deletePushTokenQuery2, activityQuery2, deletionModeSchema2, deletionRequestBody2, templateLocaleSchema2, TEMPLATE_SLUG_REGEX2, templateSlugSchema2, templateStatusSchema2, templateFileMapSchema2, templateTextSchema2, templateUsesEntrySchema2, templateUsesSchema2, templateYamlLocaleEntry2, templateYamlWayaiBlock2, templateTagsSchema2, templateYamlSchema2, templateHeroSchema2, templatePushLocaleSchema2, templatePushBody2, templateListQuery2, templateSlugParam2, templateDetailQuery2, courseQuizScoreSchema2, upsertCourseLessonBody2, linkCourseCapstoneBody2, 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, 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, adminPlanIdParam2, adminOrganizationsQuery2, adminUserSearchQuery2, kanbanSlugMigrationQuery2, adjustQuotaBody2, updatePlanBody2, addAdminUserBody2, updatePlatformConfigBody2, updateFreeOrgLimitBody2, adminScopedTargetBody2, 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, 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, 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, ADMIN_SKILL_NAME_REGEX2, adminSkillNameParam2, WAYAI_WORKSPACE_LAYOUT;
10058
10158
  var init_dist = __esm({
10059
10159
  "../../packages/core/dist/index.js"() {
10060
10160
  "use strict";
@@ -11479,6 +11579,7 @@ var init_dist = __esm({
11479
11579
  PACING_INTERVAL_MAX_MS2 = 6e4;
11480
11580
  EVAL_RUN_DEADLINE_MIN_MS2 = 1e3;
11481
11581
  EVAL_RUN_DEADLINE_MAX_MS2 = 18e5;
11582
+ ISO_UTC_RE2 = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
11482
11583
  paginationSchema22 = external_exports.object({
11483
11584
  limit: external_exports.number().int().positive().max(1e3).default(50),
11484
11585
  offset: external_exports.number().int().min(0).default(0)
@@ -11495,6 +11596,18 @@ var init_dist = __esm({
11495
11596
  hubIdQuery2 = external_exports.object({
11496
11597
  hub_id: external_exports.string().uuid()
11497
11598
  });
11599
+ evalDateContextSchema2 = external_exports.object({
11600
+ base_time: timestampSchema2.refine(isIsoTimestamp2, "Expected a canonical ISO timestamp"),
11601
+ timezone: external_exports.string().min(1).refine((timezone) => {
11602
+ try {
11603
+ new Intl.DateTimeFormat("en-US", { timeZone: timezone }).format(0);
11604
+ return true;
11605
+ } catch {
11606
+ return false;
11607
+ }
11608
+ }, "Expected an IANA timezone"),
11609
+ locale: external_exports.enum(SUPPORTED_LOCALES2)
11610
+ }).strict();
11498
11611
  EVAL_FIXTURE_NAME_MAX_LENGTH2 = 200;
11499
11612
  evalFixtureOverrideSchema2 = external_exports.string().trim().min(1).max(EVAL_FIXTURE_NAME_MAX_LENGTH2);
11500
11613
  runSessionQuery2 = hubIdQuery2.extend({
@@ -11544,22 +11657,19 @@ var init_dist = __esm({
11544
11657
  );
11545
11658
  sessionConfigSchema2 = external_exports.object({
11546
11659
  pacing: pacingConfigSchema2.optional(),
11660
+ // Server-owned immutable clock.
11661
+ date_context: external_exports.never().optional(),
11662
+ date_context_claimed: external_exports.never().optional(),
11663
+ seed_cleanup: external_exports.never().optional(),
11547
11664
  // Per-run finalization deadline for the HubDO watchdog (gh #2591). A started
11548
11665
  // run idle past this many ms is reaped to `failed`. Omitted → backend default
11549
11666
  // (`EVAL_DEFAULT_RUN_DEADLINE_MS`).
11550
11667
  run_deadline_ms: external_exports.number().int().min(EVAL_RUN_DEADLINE_MIN_MS2).max(EVAL_RUN_DEADLINE_MAX_MS2).optional(),
11551
- // Resolved seed context (gh #3090), written server-side at reset-before time
11552
- // once the fixture RESET against Rekor succeeds. Read back on every terminal
11553
- // path (completed / cancelled / deleted / watchdog-reaped) to CLEAR the fixture
11554
- // durably — survives a DO restart, so a watchdog-only finalize can still clean up.
11555
- seed: external_exports.object({
11556
- fixture: external_exports.string(),
11557
- target_base: external_exports.string().nullable().optional(),
11558
- connection_id: external_exports.string().nullable().optional()
11559
- }).optional()
11668
+ seed: external_exports.never().optional()
11560
11669
  }).passthrough();
11561
11670
  createSessionBody2 = external_exports.object({
11562
11671
  session: external_exports.object({
11672
+ session_name: external_exports.string().trim().min(1),
11563
11673
  session_config: sessionConfigSchema2.optional()
11564
11674
  }).passthrough()
11565
11675
  });
@@ -11693,6 +11803,41 @@ var init_dist = __esm({
11693
11803
  fixture: fixtureField2.nullable().optional(),
11694
11804
  target_base: fixtureField2.nullable().optional()
11695
11805
  });
11806
+ evalSessionConfigResponseSchema2 = external_exports.object({
11807
+ agent: external_exports.custom().optional(),
11808
+ scenario_set_id: external_exports.string().optional().catch(void 0),
11809
+ date_context: evalDateContextSchema2.optional().catch(void 0),
11810
+ /** Resolved server-side seed attribution. */
11811
+ seed: external_exports.object({
11812
+ fixture: external_exports.string(),
11813
+ target_base: external_exports.string().nullable().optional(),
11814
+ connection_id: external_exports.string().nullable().optional()
11815
+ }).optional(),
11816
+ // Internal lifecycle fields: never expose them as response data.
11817
+ date_context_claimed: external_exports.unknown().optional().transform(() => void 0),
11818
+ seed_cleanup: external_exports.unknown().optional().transform(() => void 0),
11819
+ pacing: pacingConfigSchema2.optional().catch(void 0)
11820
+ }).passthrough();
11821
+ evalSessionResponseSchema2 = external_exports.object({
11822
+ eval_session_id: external_exports.string(),
11823
+ created_at: timestampSchema2,
11824
+ updated_at: timestampSchema2,
11825
+ hub_id: external_exports.string(),
11826
+ session_name: external_exports.string(),
11827
+ session_description: external_exports.string().optional(),
11828
+ session_status: external_exports.enum(["draft", "agents_responding", "awaiting_review", "completed", "failed", "cancelled"]),
11829
+ started_at: timestampSchema2.optional(),
11830
+ completed_at: timestampSchema2.optional(),
11831
+ total_evals: external_exports.number(),
11832
+ total_runs: external_exports.number(),
11833
+ successful_runs: external_exports.number(),
11834
+ failed_runs: external_exports.number(),
11835
+ created_by: external_exports.string(),
11836
+ /** Optional — sessions created pre-PR2 may not have this. */
11837
+ scenario_set_id: external_exports.string().nullable().optional(),
11838
+ /** Launch-time snapshot. */
11839
+ session_config: evalSessionConfigResponseSchema2.optional()
11840
+ }).passthrough();
11696
11841
  getConversationsQuery2 = external_exports.object({
11697
11842
  nav_item: external_exports.enum(["chat", "task", "support", "chat_task"]),
11698
11843
  hub_team_user_id: external_exports.string().optional(),
@@ -13139,7 +13284,13 @@ var init_dist = __esm({
13139
13284
  limit: external_exports.coerce.number().int().min(1).max(200).optional(),
13140
13285
  offset: external_exports.coerce.number().int().min(0).optional(),
13141
13286
  /** ISO 8601 lower bound on created_at. */
13142
- since: external_exports.string().datetime().optional()
13287
+ since: external_exports.string().datetime().optional(),
13288
+ /**
13289
+ * ISO 8601 lower bound on resolution time — "what did we resolve recently", which `since`
13290
+ * (a created_at filter) cannot answer for a long-lived report resolved yesterday. Implies
13291
+ * a terminal status (`addressed`/`dismissed`) and orders on that same axis.
13292
+ */
13293
+ resolved_since: external_exports.string().datetime().optional()
13143
13294
  });
13144
13295
  GITHUB_ISSUE_URL_REGEX2 = /^https:\/\/github\.com\/[^/]+\/[^/]+\/issues\/\d+(?:[/?#]|$)/;
13145
13296
  githubIssueUrlSchema2 = external_exports.string().url().refine((u) => GITHUB_ISSUE_URL_REGEX2.test(u), {
@@ -19663,6 +19814,126 @@ var init_evals = __esm({
19663
19814
  }
19664
19815
  });
19665
19816
 
19817
+ // src/lib/eval-session-control.ts
19818
+ function formatEvalSessionStopCommand(sessionId, hubId) {
19819
+ return `wayai eval session stop ${sessionId} --hub ${hubId}`;
19820
+ }
19821
+ function formatEvalResultsCommand(sessionId, hubId) {
19822
+ return `wayai eval-results --session ${sessionId} --hub ${hubId}`;
19823
+ }
19824
+ function classifyStopOutcome(response) {
19825
+ return response.data.stopped ? { kind: "cancelled" } : { kind: "already_finished", status: response.data.session.session_status };
19826
+ }
19827
+ function isTerminalStopFailure(err) {
19828
+ return err instanceof ApiError && err.status >= 400 && err.status < 500 && err.status !== 408 && err.status !== 429;
19829
+ }
19830
+ async function stopEvalSessionWithRetries(stop, opts = {}) {
19831
+ const attempts = opts.attempts ?? STOP_ATTEMPTS;
19832
+ const attemptTimeoutMs = opts.attemptTimeoutMs ?? STOP_ATTEMPT_TIMEOUT_MS;
19833
+ const backoffMs = opts.backoffMs ?? STOP_BACKOFF_MS;
19834
+ const sleep2 = opts.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
19835
+ let lastError = new Error("Stop was never attempted");
19836
+ for (let attempt = 1; attempt <= attempts; attempt++) {
19837
+ let timeout;
19838
+ try {
19839
+ return await Promise.race([
19840
+ stop(),
19841
+ new Promise((_resolve, reject) => {
19842
+ timeout = setTimeout(
19843
+ () => reject(new Error(`Stop attempt ${attempt} timed out after ${attemptTimeoutMs}ms`)),
19844
+ attemptTimeoutMs
19845
+ );
19846
+ })
19847
+ ]);
19848
+ } catch (err) {
19849
+ lastError = err;
19850
+ if (isTerminalStopFailure(err)) break;
19851
+ } finally {
19852
+ if (timeout !== void 0) clearTimeout(timeout);
19853
+ }
19854
+ const delay2 = backoffMs[attempt - 1];
19855
+ if (attempt < attempts && delay2) await sleep2(delay2);
19856
+ }
19857
+ throw lastError;
19858
+ }
19859
+ function installEvalSignalHandlers(input) {
19860
+ const exit = input.exit ?? ((code) => process.exit(code));
19861
+ const manualStopCommand = formatEvalSessionStopCommand(input.sessionId, input.hubId);
19862
+ let signalCount = 0;
19863
+ let disposed = false;
19864
+ let settle;
19865
+ const settled = new Promise((resolve6) => {
19866
+ settle = resolve6;
19867
+ });
19868
+ const listeners = /* @__PURE__ */ new Map();
19869
+ const dispose = () => {
19870
+ if (disposed) return;
19871
+ disposed = true;
19872
+ for (const [signal, listener] of listeners) process.off(signal, listener);
19873
+ };
19874
+ const finish = (exitCode) => {
19875
+ dispose();
19876
+ settle();
19877
+ exit(exitCode);
19878
+ };
19879
+ const handle = (signal) => {
19880
+ signalCount += 1;
19881
+ const signalExitCode = SIGNAL_EXIT_CODE[signal];
19882
+ if (signalCount > 1) {
19883
+ console.error("\nSecond signal received; exiting immediately. The remote eval session may still be running.");
19884
+ console.error(`Run: ${manualStopCommand}`);
19885
+ finish(signalExitCode);
19886
+ return;
19887
+ }
19888
+ console.error(`
19889
+ ${signal} received; stopping remote eval session ${input.sessionId}...`);
19890
+ void stopEvalSessionWithRetries(input.stop).then((response) => {
19891
+ if (signalCount > 1) return;
19892
+ const outcome = classifyStopOutcome(response);
19893
+ if (outcome.kind === "already_finished") {
19894
+ console.error(`Session had already finished (${outcome.status}) \u2014 nothing was cancelled.`);
19895
+ console.error(`See its results: ${formatEvalResultsCommand(input.sessionId, input.hubId)}`);
19896
+ } else {
19897
+ console.error("Remote session cancellation requested.");
19898
+ console.error("A turn already in progress may still be finishing \u2014 wait for it before starting another run.");
19899
+ }
19900
+ finish(signalExitCode);
19901
+ }).catch((err) => {
19902
+ if (signalCount > 1) return;
19903
+ console.error(`Failed to confirm remote cancellation: ${extractApiMessage(err)}`);
19904
+ console.error(`The session may still be running. Run: ${manualStopCommand}`);
19905
+ finish(1);
19906
+ });
19907
+ };
19908
+ for (const signal of HANDLED_SIGNALS) {
19909
+ const listener = () => handle(signal);
19910
+ listeners.set(signal, listener);
19911
+ process.on(signal, listener);
19912
+ }
19913
+ return {
19914
+ manualStopCommand,
19915
+ async interrupted() {
19916
+ if (signalCount === 0) return false;
19917
+ await settled;
19918
+ return true;
19919
+ },
19920
+ dispose
19921
+ };
19922
+ }
19923
+ var SIGNAL_EXIT_CODE, HANDLED_SIGNALS, STOP_ATTEMPTS, STOP_ATTEMPT_TIMEOUT_MS, STOP_BACKOFF_MS;
19924
+ var init_eval_session_control = __esm({
19925
+ "src/lib/eval-session-control.ts"() {
19926
+ "use strict";
19927
+ init_api_client();
19928
+ init_errors2();
19929
+ SIGNAL_EXIT_CODE = { SIGINT: 130, SIGTERM: 143, SIGHUP: 129 };
19930
+ HANDLED_SIGNALS = Object.keys(SIGNAL_EXIT_CODE);
19931
+ STOP_ATTEMPTS = 3;
19932
+ STOP_ATTEMPT_TIMEOUT_MS = 1e4;
19933
+ STOP_BACKOFF_MS = [500, 1e3];
19934
+ }
19935
+ });
19936
+
19666
19937
  // src/commands/run-eval.ts
19667
19938
  var run_eval_exports = {};
19668
19939
  __export(run_eval_exports, {
@@ -19749,6 +20020,31 @@ async function runEvalCommand(args2) {
19749
20020
  const sessionName = `CLI run ${now.toISOString().slice(0, 16).replace("T", " ")}`;
19750
20021
  const createResult = await client.createEvalSession(hubId, sessionName, scenarioSetId, pacing);
19751
20022
  const sessionId = createResult.data.session.eval_session_id;
20023
+ const signalController = installEvalSignalHandlers({
20024
+ hubId,
20025
+ sessionId,
20026
+ stop: () => client.stopEvalSession(hubId, sessionId)
20027
+ });
20028
+ try {
20029
+ await pollEvalSession({
20030
+ client,
20031
+ hubId,
20032
+ sessionId,
20033
+ sessionName,
20034
+ pacing,
20035
+ fixtureOverride,
20036
+ noWait,
20037
+ timeoutSeconds,
20038
+ signal: signalController
20039
+ });
20040
+ } finally {
20041
+ signalController.dispose();
20042
+ }
20043
+ }
20044
+ async function pollEvalSession(input) {
20045
+ const { client, hubId, sessionId, sessionName, pacing, fixtureOverride, noWait, timeoutSeconds } = input;
20046
+ const signalController = input.signal;
20047
+ const manualStopCommand = signalController.manualStopCommand;
19752
20048
  console.log(`Created session: ${sessionName} (${sessionId})`);
19753
20049
  if (pacing) {
19754
20050
  const desc = pacing.preset === "custom" ? `custom (${pacing.custom_interval_ms}ms/run)` : pacing.preset;
@@ -19761,21 +20057,27 @@ async function runEvalCommand(args2) {
19761
20057
  console.log(`Fixture: ${seed.fixture}${seed.target_base ? ` (base: ${seed.target_base})` : ""}`);
19762
20058
  }
19763
20059
  } catch (err) {
20060
+ if (await signalController.interrupted()) return;
19764
20061
  console.error(`
19765
20062
  Failed to start session: ${extractApiMessage(err)}`);
20063
+ console.error(`Session ID: ${sessionId}`);
20064
+ console.error(`Stop it if it started anyway: ${manualStopCommand}`);
19766
20065
  process.exit(1);
19767
20066
  }
20067
+ if (await signalController.interrupted()) return;
19768
20068
  console.log("Session started");
19769
20069
  if (noWait) {
19770
20070
  console.log(`
19771
20071
  Session ID: ${sessionId}`);
19772
20072
  console.log("Use `wayai eval-results --session " + sessionId + "` to check results.");
20073
+ console.log(`Stop it early with: ${manualStopCommand}`);
19773
20074
  return;
19774
20075
  }
19775
20076
  const deadline = Date.now() + timeoutSeconds * 1e3;
19776
20077
  let consecutivePollErrors = 0;
19777
20078
  while (Date.now() < deadline) {
19778
20079
  await sleep(POLL_INTERVAL_MS);
20080
+ if (await signalController.interrupted()) return;
19779
20081
  let details;
19780
20082
  try {
19781
20083
  details = await client.getEvalSessionDetails(hubId, sessionId);
@@ -19785,7 +20087,8 @@ Session ID: ${sessionId}`);
19785
20087
  console.error(`
19786
20088
 
19787
20089
  Lost connection to the eval session: ${extractApiMessage(err)}`);
19788
- console.error(`The session may still be running. Check results: wayai eval-results --session ${sessionId}`);
20090
+ console.error(`The session may still be running. Stop it with: ${manualStopCommand}`);
20091
+ console.error(`Check results: wayai eval-results --session ${sessionId}`);
19789
20092
  process.exit(1);
19790
20093
  }
19791
20094
  continue;
@@ -19795,6 +20098,7 @@ Lost connection to the eval session: ${extractApiMessage(err)}`);
19795
20098
  const totalRuns = results.reduce((sum, r) => sum + r.total_runs, 0);
19796
20099
  const completedRuns = results.reduce((sum, r) => sum + r.successful_runs + r.failed_runs, 0);
19797
20100
  if (TERMINAL_STATUSES.has(session.session_status)) {
20101
+ if (await signalController.interrupted()) return;
19798
20102
  console.log("");
19799
20103
  console.log(`Session ${session.session_status}: ${session.session_name} (${session.eval_session_id})
19800
20104
  `);
@@ -19816,6 +20120,7 @@ Could not load failure details (${extractApiMessage(err)}).`);
19816
20120
  console.log(`
19817
20121
 
19818
20122
  Timeout after ${timeoutSeconds}s. Session is still running.`);
20123
+ console.log(`Stop it with: ${manualStopCommand}`);
19819
20124
  console.log(`Check results: wayai eval-results --session ${sessionId}`);
19820
20125
  }
19821
20126
  function sleep(ms) {
@@ -19842,18 +20147,6 @@ function parsePacing(raw) {
19842
20147
  }
19843
20148
  return { preset: value };
19844
20149
  }
19845
- function extractApiMessage(err) {
19846
- if (err instanceof ApiError) {
19847
- try {
19848
- const parsed = JSON.parse(err.body);
19849
- if (parsed.message) return parsed.message;
19850
- if (parsed.error) return parsed.error;
19851
- } catch {
19852
- }
19853
- return err.body || err.message;
19854
- }
19855
- return err instanceof Error ? err.message : String(err);
19856
- }
19857
20150
  var TERMINAL_STATUSES, POLL_INTERVAL_MS, DEFAULT_TIMEOUT_S, MAX_CONSECUTIVE_POLL_ERRORS;
19858
20151
  var init_run_eval = __esm({
19859
20152
  "src/commands/run-eval.ts"() {
@@ -19862,9 +20155,11 @@ var init_run_eval = __esm({
19862
20155
  init_repo_config();
19863
20156
  init_workspace();
19864
20157
  init_api_client();
20158
+ init_errors2();
19865
20159
  init_eval_format();
19866
20160
  init_dist();
19867
20161
  init_contracts();
20162
+ init_eval_session_control();
19868
20163
  TERMINAL_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "cancelled", "awaiting_review"]);
19869
20164
  POLL_INTERVAL_MS = 3e3;
19870
20165
  DEFAULT_TIMEOUT_S = 600;
@@ -20243,6 +20538,54 @@ var init_journey_capture = __esm({
20243
20538
  }
20244
20539
  });
20245
20540
 
20541
+ // src/commands/eval-session-stop.ts
20542
+ var eval_session_stop_exports = {};
20543
+ __export(eval_session_stop_exports, {
20544
+ evalSessionStopCommand: () => evalSessionStopCommand
20545
+ });
20546
+ async function evalSessionStopCommand(args2) {
20547
+ const hubId = resolveActiveHubId(args2);
20548
+ const { config, accessToken } = await requireAuth();
20549
+ requireRepoConfig();
20550
+ const sessionId = args2.find((arg) => !arg.startsWith("-"));
20551
+ if (!sessionId) {
20552
+ console.error("Usage: wayai eval session stop <session_id> [--hub <id>]");
20553
+ process.exit(1);
20554
+ }
20555
+ if (!UUID_RE2.test(sessionId)) {
20556
+ console.error(`Invalid session id: ${sessionId}`);
20557
+ process.exit(1);
20558
+ }
20559
+ const client = new ApiClient({ apiUrl: config.api_url, accessToken });
20560
+ try {
20561
+ const outcome = classifyStopOutcome(await client.stopEvalSession(hubId, sessionId));
20562
+ if (outcome.kind === "already_finished") {
20563
+ console.log(`Eval session ${sessionId} had already finished (${outcome.status}) \u2014 nothing was cancelled.`);
20564
+ console.log(`See its results: ${formatEvalResultsCommand(sessionId, hubId)}`);
20565
+ } else {
20566
+ console.log(`Cancellation requested for eval session ${sessionId}.`);
20567
+ console.log("A turn already in progress may still be finishing \u2014 wait for it before starting another run.");
20568
+ }
20569
+ } catch (err) {
20570
+ if (err instanceof ApiError && err.status === 404) {
20571
+ console.error(`Eval session not found: ${sessionId}`);
20572
+ process.exit(1);
20573
+ }
20574
+ throw err;
20575
+ }
20576
+ }
20577
+ var init_eval_session_stop = __esm({
20578
+ "src/commands/eval-session-stop.ts"() {
20579
+ "use strict";
20580
+ init_auth();
20581
+ init_repo_config();
20582
+ init_workspace();
20583
+ init_api_client();
20584
+ init_eval_session_control();
20585
+ init_utils();
20586
+ }
20587
+ });
20588
+
20246
20589
  // src/commands/eval-session-delete.ts
20247
20590
  var eval_session_delete_exports = {};
20248
20591
  __export(eval_session_delete_exports, {
@@ -20348,6 +20691,11 @@ async function evalCommand(args2) {
20348
20691
  }
20349
20692
  case "session": {
20350
20693
  const [sessionSub, ...sessionRest] = rest;
20694
+ if (sessionSub === "stop") {
20695
+ const { evalSessionStopCommand: evalSessionStopCommand2 } = await Promise.resolve().then(() => (init_eval_session_stop(), eval_session_stop_exports));
20696
+ await evalSessionStopCommand2(sessionRest);
20697
+ return;
20698
+ }
20351
20699
  if (sessionSub === "delete") {
20352
20700
  const { evalSessionDeleteCommand: evalSessionDeleteCommand2 } = await Promise.resolve().then(() => (init_eval_session_delete(), eval_session_delete_exports));
20353
20701
  await evalSessionDeleteCommand2(sessionRest);
@@ -20381,6 +20729,8 @@ Subcommands:
20381
20729
  exchange as a scenario YAML in evals/.
20382
20730
  journey capture <conversation_id> Capture a real conversation's FULL
20383
20731
  transcript as a platform-managed journey.
20732
+ session stop <session_id> Cancel a running eval session (e.g. one
20733
+ left behind by an interrupted run-eval).
20384
20734
  session delete <session_id> Delete one eval session (and its
20385
20735
  conversations). Destructive, irreversible.
20386
20736
  session delete --all Delete every eval session on the hub.
@@ -20402,6 +20752,7 @@ Examples:
20402
20752
  wayai eval capture 11111111-2222-3333-4444-555555555555
20403
20753
  wayai eval capture <conv_id> --set regression-suite --name "Cancel order"
20404
20754
  wayai eval journey capture <conv_id> --name "Refund happy path"
20755
+ wayai eval session stop 11111111-2222-3333-4444-555555555555
20405
20756
  wayai eval session delete 11111111-2222-3333-4444-555555555555
20406
20757
  wayai eval session delete --all -y
20407
20758
 
@@ -23265,7 +23616,8 @@ async function runReportList(flagArgs) {
23265
23616
  source: flags.source,
23266
23617
  limit: flags.limit ? Number(flags.limit) : void 0,
23267
23618
  offset: flags.offset ? Number(flags.offset) : void 0,
23268
- since: flags.since
23619
+ since: flags.since,
23620
+ resolved_since: flags["resolved-since"]
23269
23621
  });
23270
23622
  if (flags.json === "true") {
23271
23623
  console.log(JSON.stringify(result, null, 2));
@@ -23556,7 +23908,10 @@ Usage:
23556
23908
 
23557
23909
  wayai admin observability <hub_id> <conversation_id> [--message-id X] [--json]
23558
23910
 
23559
- wayai admin report list [--status STATUS] [--source SOURCE] [--limit N] [--offset N] [--since ISO] [--json]
23911
+ wayai admin report list [--status STATUS] [--source SOURCE] [--limit N] [--offset N] [--since ISO] [--resolved-since ISO] [--json]
23912
+ --since filters/orders on created_at (when it was filed);
23913
+ --resolved-since on resolved_at (what we resolved recently \u2014
23914
+ selects terminal rows on its own, no --status needed).
23560
23915
  wayai admin report show <report_id>
23561
23916
  wayai admin report group <canonical_id> <member_id> [<member_id> ...]
23562
23917
  wayai admin report ungroup <member_id>
@@ -23861,6 +24216,8 @@ ${alertSummary}` : alertSummary;
23861
24216
  });
23862
24217
  if (result.created) {
23863
24218
  console.log(`Report submitted: ${result.report_id}`);
24219
+ } else if (result.recurrence?.reopened) {
24220
+ console.log(`Report reopened \u2014 this was resolved before and has recurred: ${result.report_id}`);
23864
24221
  } else {
23865
24222
  console.log(`Report merged with existing: ${result.report_id}`);
23866
24223
  }
@@ -24167,34 +24524,13 @@ var init_update = __esm({
24167
24524
 
24168
24525
  // src/index.ts
24169
24526
  init_sentry();
24527
+ init_errors2();
24528
+ init_mask_secrets();
24529
+ init_utils();
24170
24530
  import { readFileSync as readFileSync21 } from "fs";
24171
24531
  import { fileURLToPath as fileURLToPath2 } from "url";
24172
24532
  import { dirname as dirname9, join as join28 } from "path";
24173
24533
 
24174
- // src/lib/errors.ts
24175
- init_api_client();
24176
- init_network_error();
24177
- function friendlyHint(err) {
24178
- if (isNetworkError(err)) {
24179
- return "Couldn't reach WayAI \u2014 check your network connection and try again.";
24180
- }
24181
- if (!(err instanceof ApiError)) return null;
24182
- if (err.body.includes("FREE_PLAN_RESTRICTION")) {
24183
- return "Publishing to production requires a paid plan. Upgrade your organization to publish or sync.";
24184
- }
24185
- const { status } = err;
24186
- if (status === 401) return "Your session may have expired. Run `wayai login` to re-authenticate.";
24187
- if (status === 402) return "Quota exceeded for your plan. Review usage or upgrade your plan.";
24188
- if (status === 403) return "Access denied. Your token may lack permission for this hub or resource.";
24189
- if (status === 429) return "Rate limited. Wait a moment and try again.";
24190
- if (status >= 500) return "WayAI server error \u2014 likely temporary. Try again shortly.";
24191
- return null;
24192
- }
24193
-
24194
- // src/index.ts
24195
- init_mask_secrets();
24196
- init_utils();
24197
-
24198
24534
  // src/lib/version-refresh.ts
24199
24535
  init_version_cache();
24200
24536
  init_skill_version();
@@ -24603,6 +24939,7 @@ Commands:
24603
24939
  run-eval Run all enabled evals and show results
24604
24940
  eval-results View results from a completed eval session
24605
24941
  eval capture Capture a real conversation as a scenario YAML
24942
+ eval session stop Cancel a running eval session (recovery for an interrupted run-eval)
24606
24943
  eval session delete Delete one eval session (\`--all\` for every session on the hub)
24607
24944
  sync-skills Sync skills to Anthropic/OpenAI provider connections
24608
24945
  sync-mcp Re-discover an MCP connection's tools (refresh stale schemas)