@wayai/cli 0.3.114 → 0.3.115
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 +474 -256
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5661,6 +5661,14 @@ function collectTurnAttachmentHashes(turn) {
|
|
|
5661
5661
|
}
|
|
5662
5662
|
return hashes;
|
|
5663
5663
|
}
|
|
5664
|
+
function isSafeTemplatePath(path31) {
|
|
5665
|
+
if (path31.length === 0 || path31.length > 300) return false;
|
|
5666
|
+
if (path31.startsWith("/") || path31.includes("\\")) return false;
|
|
5667
|
+
const segments = path31.split("/");
|
|
5668
|
+
return segments.every(
|
|
5669
|
+
(seg) => seg.length > 0 && seg !== "." && seg !== ".." && /^[A-Za-z0-9._-]+$/.test(seg)
|
|
5670
|
+
);
|
|
5671
|
+
}
|
|
5664
5672
|
function foldDiacritics(input) {
|
|
5665
5673
|
return input.normalize("NFKD").replace(/[̀-ͯ]/g, "");
|
|
5666
5674
|
}
|
|
@@ -5929,14 +5937,6 @@ function refineHubAsCodeResources(config, ctx) {
|
|
|
5929
5937
|
});
|
|
5930
5938
|
}
|
|
5931
5939
|
}
|
|
5932
|
-
function isSafeTemplatePath(path31) {
|
|
5933
|
-
if (path31.length === 0 || path31.length > 300) return false;
|
|
5934
|
-
if (path31.startsWith("/") || path31.includes("\\")) return false;
|
|
5935
|
-
const segments = path31.split("/");
|
|
5936
|
-
return segments.every(
|
|
5937
|
-
(seg) => seg.length > 0 && seg !== "." && seg !== ".." && /^[A-Za-z0-9._-]+$/.test(seg)
|
|
5938
|
-
);
|
|
5939
|
-
}
|
|
5940
5940
|
function identifyTokenType(token) {
|
|
5941
5941
|
if (token.startsWith("way_")) return "way_token";
|
|
5942
5942
|
if (token.startsWith("eyJ")) return "jwt";
|
|
@@ -5976,7 +5976,7 @@ function findStepBoundaries(transcript) {
|
|
|
5976
5976
|
}
|
|
5977
5977
|
return out;
|
|
5978
5978
|
}
|
|
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;
|
|
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, 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, 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, apiChannelMessage, apiChannelMessageBody, appMessageBody, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, activityQuery, deletionModeSchema, deletionRequestBody, templateLocaleSchema, TEMPLATE_SLUG_REGEX, templateSlugSchema, templateStatusSchema, templateFileMapSchema, 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, 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, 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, WAYAI_WORKSPACE_LAYOUT;
|
|
5980
5980
|
var init_dist = __esm({
|
|
5981
5981
|
"../../packages/core/dist/index.js"() {
|
|
5982
5982
|
"use strict";
|
|
@@ -6028,6 +6028,7 @@ var init_dist = __esm({
|
|
|
6028
6028
|
init_zod();
|
|
6029
6029
|
init_zod();
|
|
6030
6030
|
init_zod();
|
|
6031
|
+
init_zod();
|
|
6031
6032
|
UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
6032
6033
|
HEX_RE = /^[0-9a-f]{16,}$/;
|
|
6033
6034
|
WORKOS_ID_RE = /^(?:user|org)_[0-9A-HJKMNP-TV-Z]{26}$/;
|
|
@@ -6401,6 +6402,12 @@ var init_dist = __esm({
|
|
|
6401
6402
|
});
|
|
6402
6403
|
}
|
|
6403
6404
|
});
|
|
6405
|
+
MAX_OUTCOMES_PER_STATUS = 20;
|
|
6406
|
+
kanbanOutcomeSchema = external_exports.object({
|
|
6407
|
+
slug: kanbanStatusSlugSchema,
|
|
6408
|
+
name: external_exports.string().min(1, "name is required").max(100, "name must be 100 characters or fewer").refine((v) => visibleLength(v) > 0, "name must not be blank"),
|
|
6409
|
+
color: external_exports.string().optional()
|
|
6410
|
+
}).passthrough();
|
|
6404
6411
|
EXCLUSIVE_FLAG_PAIRS = [
|
|
6405
6412
|
["isInitialStatus", "triggersAgentResponse"],
|
|
6406
6413
|
["isInitialStatus", "allowsAgentUpdate"],
|
|
@@ -6436,7 +6443,10 @@ var init_dist = __esm({
|
|
|
6436
6443
|
* and is not exposed to agents. The cross-reference invariant (must point at a
|
|
6437
6444
|
* declared lane; the initial status must not have one) is enforced at the hub
|
|
6438
6445
|
* level via `validateLaneReferences` — this schema only sees the status array. */
|
|
6439
|
-
lane_slug: kanbanStatusSlugSchema.optional()
|
|
6446
|
+
lane_slug: kanbanStatusSlugSchema.optional(),
|
|
6447
|
+
/** Closing outcomes offered on the terminal transition. Only valid when
|
|
6448
|
+
* `isTerminalStatus === true` (enforced in the superRefine below). */
|
|
6449
|
+
outcomes: external_exports.array(kanbanOutcomeSchema).max(MAX_OUTCOMES_PER_STATUS, `outcomes must have at most ${MAX_OUTCOMES_PER_STATUS} entries`).optional()
|
|
6440
6450
|
}).passthrough().superRefine((status, ctx) => {
|
|
6441
6451
|
const label = status.name ? `"${status.name}"` : status.slug ? `"${status.slug}"` : "<unnamed>";
|
|
6442
6452
|
for (const [a, b] of EXCLUSIVE_FLAG_PAIRS) {
|
|
@@ -6473,6 +6483,33 @@ var init_dist = __esm({
|
|
|
6473
6483
|
});
|
|
6474
6484
|
}
|
|
6475
6485
|
}
|
|
6486
|
+
if (Array.isArray(status.outcomes) && status.outcomes.length > 0) {
|
|
6487
|
+
if (status.isTerminalStatus !== true) {
|
|
6488
|
+
ctx.addIssue({
|
|
6489
|
+
code: external_exports.ZodIssueCode.custom,
|
|
6490
|
+
path: ["outcomes"],
|
|
6491
|
+
message: `kanban status ${label}: outcomes are only allowed on the terminal status (set isTerminalStatus=true)`
|
|
6492
|
+
});
|
|
6493
|
+
}
|
|
6494
|
+
const seen = /* @__PURE__ */ new Map();
|
|
6495
|
+
status.outcomes.forEach((o, j) => {
|
|
6496
|
+
if (!o?.slug) return;
|
|
6497
|
+
const arr = seen.get(o.slug) ?? [];
|
|
6498
|
+
arr.push(j);
|
|
6499
|
+
seen.set(o.slug, arr);
|
|
6500
|
+
});
|
|
6501
|
+
for (const [slug, indices] of seen) {
|
|
6502
|
+
if (indices.length > 1) {
|
|
6503
|
+
for (const j of indices) {
|
|
6504
|
+
ctx.addIssue({
|
|
6505
|
+
code: external_exports.ZodIssueCode.custom,
|
|
6506
|
+
path: ["outcomes", j, "slug"],
|
|
6507
|
+
message: `kanban status ${label}: duplicate outcome slug "${slug}"`
|
|
6508
|
+
});
|
|
6509
|
+
}
|
|
6510
|
+
}
|
|
6511
|
+
}
|
|
6512
|
+
}
|
|
6476
6513
|
});
|
|
6477
6514
|
kanbanStatusesArraySchema = external_exports.array(kanbanStatusSchema).max(MAX_KANBAN_STATUSES, `kanban_statuses must have at most ${MAX_KANBAN_STATUSES} entries`).superRefine((statuses, ctx) => {
|
|
6478
6515
|
if (statuses.length === 0) return;
|
|
@@ -6493,6 +6530,17 @@ var init_dist = __esm({
|
|
|
6493
6530
|
});
|
|
6494
6531
|
}
|
|
6495
6532
|
}
|
|
6533
|
+
const terminalIndices = statuses.map((s, i) => ({ s, i })).filter(({ s }) => s.isTerminalStatus === true);
|
|
6534
|
+
if (terminalIndices.length > 1) {
|
|
6535
|
+
const slugs = terminalIndices.map(({ s }) => s.slug).join(", ");
|
|
6536
|
+
for (const { i } of terminalIndices) {
|
|
6537
|
+
ctx.addIssue({
|
|
6538
|
+
code: external_exports.ZodIssueCode.custom,
|
|
6539
|
+
path: [i, "isTerminalStatus"],
|
|
6540
|
+
message: `kanban_statuses: at most one status may have isTerminalStatus=true (found ${terminalIndices.length}: ${slugs})`
|
|
6541
|
+
});
|
|
6542
|
+
}
|
|
6543
|
+
}
|
|
6496
6544
|
const seenSlugs = /* @__PURE__ */ new Map();
|
|
6497
6545
|
statuses.forEach((s, i) => {
|
|
6498
6546
|
const key = s.slug;
|
|
@@ -6693,7 +6741,7 @@ var init_dist = __esm({
|
|
|
6693
6741
|
hub_id: uuidSchema,
|
|
6694
6742
|
sync_credentials_to_production: external_exports.boolean().optional()
|
|
6695
6743
|
}).passthrough();
|
|
6696
|
-
PRODUCTION_DIRECT_FIELDS = ["username", "api_key", "access_token", "password", "refresh_token", "webhook_secret_token"];
|
|
6744
|
+
PRODUCTION_DIRECT_FIELDS = ["username", "api_key", "access_token", "password", "refresh_token", "webhook_secret_token", "webhook_signing_secret"];
|
|
6697
6745
|
setProductionCredentialBody = external_exports.object({
|
|
6698
6746
|
hub_id: uuidSchema,
|
|
6699
6747
|
organization_credential_id: external_exports.string().nullable().optional(),
|
|
@@ -6703,7 +6751,8 @@ var init_dist = __esm({
|
|
|
6703
6751
|
access_token: external_exports.string().optional(),
|
|
6704
6752
|
password: external_exports.string().optional(),
|
|
6705
6753
|
refresh_token: external_exports.string().optional(),
|
|
6706
|
-
webhook_secret_token: external_exports.string().optional()
|
|
6754
|
+
webhook_secret_token: external_exports.string().optional(),
|
|
6755
|
+
webhook_signing_secret: external_exports.string().optional()
|
|
6707
6756
|
}).strict().superRefine((data, ctx) => {
|
|
6708
6757
|
const hasOrgLink = !!data.organization_credential_id || !!data.organization_credential_token_id;
|
|
6709
6758
|
const hasDirect = PRODUCTION_DIRECT_FIELDS.some((f) => data[f] != null);
|
|
@@ -7558,6 +7607,38 @@ var init_dist = __esm({
|
|
|
7558
7607
|
});
|
|
7559
7608
|
appMessageSenderType = external_exports.enum(["user", "team"]);
|
|
7560
7609
|
appMessageReceiverType = external_exports.enum(["user", "team", "agent", "assistant"]).transform((v) => v === "assistant" ? "agent" : v);
|
|
7610
|
+
apiChannelMessage = external_exports.object({
|
|
7611
|
+
text: clientOptionalString,
|
|
7612
|
+
attachments: external_exports.array(messageAttachment).max(MAX_ATTACHMENTS_PER_MESSAGE).nullish().transform((v) => v ?? void 0)
|
|
7613
|
+
}).refine((m) => m.text && m.text.length > 0 || m.attachments && m.attachments.length > 0, {
|
|
7614
|
+
message: "message must have text or at least one attachment"
|
|
7615
|
+
});
|
|
7616
|
+
apiChannelMessageBody = external_exports.object({
|
|
7617
|
+
// Correlation id (task hubs): new → new conversation, repeat → continue. min 1 so an
|
|
7618
|
+
// empty string can't masquerade as a ref. Mutually exclusive with conversation_id.
|
|
7619
|
+
external_ref: external_exports.string().min(1).max(256).optional(),
|
|
7620
|
+
// Continue a specific WayAI conversation (authorized against the hub/channel + owner).
|
|
7621
|
+
// UUID-validated here (unlike the app channel, whose client we control): allocation
|
|
7622
|
+
// only treats a UUID-shaped id as a provided conversation, so a malformed id would
|
|
7623
|
+
// otherwise skip the owner guard and silently MINT a new conversation instead of
|
|
7624
|
+
// rejecting. A format 400 is shape-only — not an existence oracle (a valid-but-unknown
|
|
7625
|
+
// UUID still collapses to the opaque authorization error downstream).
|
|
7626
|
+
conversation_id: external_exports.string().uuid().optional(),
|
|
7627
|
+
// On-behalf-of end-user identity. Absent → per-connection service principal (task-hub
|
|
7628
|
+
// only; chat hub rejects with 422 in the route).
|
|
7629
|
+
user: external_exports.object({
|
|
7630
|
+
id: external_exports.string().min(1),
|
|
7631
|
+
email: clientOptionalString,
|
|
7632
|
+
name: clientOptionalString
|
|
7633
|
+
}).optional(),
|
|
7634
|
+
message: apiChannelMessage,
|
|
7635
|
+
// Idempotency key: maps to channel_message_sid; a retried POST echoes the original
|
|
7636
|
+
// message_id and skips billing / turn dispatch (dedupe in ConversationDO.storeMessage).
|
|
7637
|
+
client_message_id: external_exports.string().min(1).max(256).optional()
|
|
7638
|
+
}).refine((b) => !(b.external_ref && b.conversation_id), {
|
|
7639
|
+
message: "provide external_ref or conversation_id, not both",
|
|
7640
|
+
path: ["external_ref"]
|
|
7641
|
+
});
|
|
7561
7642
|
appMessageBody = external_exports.object({
|
|
7562
7643
|
// Message content — three historical aliases. All optional: an attachment-only
|
|
7563
7644
|
// or voice-only message carries no text.
|
|
@@ -7633,6 +7714,95 @@ var init_dist = __esm({
|
|
|
7633
7714
|
/** Type-to-confirm value; must equal the user's email (constant-time compared). */
|
|
7634
7715
|
email_confirmation: external_exports.string().min(1).max(320)
|
|
7635
7716
|
});
|
|
7717
|
+
templateLocaleSchema = external_exports.enum(SUPPORTED_LOCALES);
|
|
7718
|
+
TEMPLATE_SLUG_REGEX = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
7719
|
+
templateSlugSchema = external_exports.string().regex(TEMPLATE_SLUG_REGEX, "slug must be lowercase alphanumeric with hyphens (max 63)");
|
|
7720
|
+
templateStatusSchema = external_exports.enum(["published", "draft", "internal"]);
|
|
7721
|
+
templateFileMapSchema = external_exports.record(external_exports.string()).refine((m) => Object.keys(m).every(isSafeTemplatePath), {
|
|
7722
|
+
message: 'file map contains an unsafe path (no absolute paths, "..", or backslashes)'
|
|
7723
|
+
});
|
|
7724
|
+
templateTextSchema = external_exports.object({
|
|
7725
|
+
metaTitle: external_exports.string().min(1).max(200),
|
|
7726
|
+
metaDescription: external_exports.string().max(1e3).default("")
|
|
7727
|
+
});
|
|
7728
|
+
templateUsesEntrySchema = external_exports.object({
|
|
7729
|
+
backend: templateSlugSchema,
|
|
7730
|
+
endpoint: templateSlugSchema
|
|
7731
|
+
});
|
|
7732
|
+
templateUsesSchema = external_exports.array(templateUsesEntrySchema).max(24).default([]);
|
|
7733
|
+
templateYamlLocaleEntry = templateTextSchema.extend({ source: external_exports.string().min(1) });
|
|
7734
|
+
templateYamlWayaiBlock = external_exports.object({
|
|
7735
|
+
installCommand: external_exports.string().min(1).max(300),
|
|
7736
|
+
locales: external_exports.record(templateLocaleSchema, templateYamlLocaleEntry)
|
|
7737
|
+
});
|
|
7738
|
+
templateTagsSchema = external_exports.array(external_exports.string().min(1).max(30)).max(12).default([]).transform((tags) => [...new Set(tags.map((t) => t.trim().toLowerCase()).filter(Boolean))]);
|
|
7739
|
+
templateYamlSchema = external_exports.object({
|
|
7740
|
+
slug: templateSlugSchema,
|
|
7741
|
+
category: external_exports.string().min(1).max(60),
|
|
7742
|
+
tags: templateTagsSchema,
|
|
7743
|
+
status: templateStatusSchema.default("draft"),
|
|
7744
|
+
order: external_exports.number().int().min(0).max(1e5).optional(),
|
|
7745
|
+
defaultLocale: templateLocaleSchema,
|
|
7746
|
+
hero: external_exports.string().optional(),
|
|
7747
|
+
// relative path to a hero image inside the template folder
|
|
7748
|
+
// The Rekor backend(s) this channel runs on (gh #2955). Locale-agnostic. The
|
|
7749
|
+
// cross-link + MCP endpoint are derived from each entry's slugs, never authored.
|
|
7750
|
+
uses: templateUsesSchema,
|
|
7751
|
+
// A WayAI template IS a WayAI channel — the wayai slice is required. (The old
|
|
7752
|
+
// Rekor-only store entry is gone: a pure Rekor backend lives only in Rekor's store.)
|
|
7753
|
+
wayai: templateYamlWayaiBlock
|
|
7754
|
+
}).refine((c) => Boolean(c.wayai.locales[c.defaultLocale]), {
|
|
7755
|
+
message: "`wayai.locales` must include the defaultLocale"
|
|
7756
|
+
});
|
|
7757
|
+
templateHeroSchema = external_exports.object({
|
|
7758
|
+
filename: external_exports.string().min(1).max(200).regex(/\.(png|jpe?g|webp|gif)$/i, "hero must be a raster image (png/jpg/webp/gif)"),
|
|
7759
|
+
dataBase64: external_exports.string().min(1).max(8e6)
|
|
7760
|
+
});
|
|
7761
|
+
templatePushLocaleSchema = external_exports.object({
|
|
7762
|
+
wayai: templateTextSchema.optional(),
|
|
7763
|
+
readmeMarkdown: external_exports.string().default(""),
|
|
7764
|
+
wayaiFiles: templateFileMapSchema.optional()
|
|
7765
|
+
});
|
|
7766
|
+
templatePushBody = external_exports.object({
|
|
7767
|
+
slug: templateSlugSchema,
|
|
7768
|
+
defaultLocale: templateLocaleSchema,
|
|
7769
|
+
common: external_exports.object({
|
|
7770
|
+
category: external_exports.string().min(1).max(60),
|
|
7771
|
+
tags: templateTagsSchema,
|
|
7772
|
+
status: templateStatusSchema,
|
|
7773
|
+
order: external_exports.number().int().min(0).max(1e5).default(0),
|
|
7774
|
+
// The WayAI install command (a WayAI template always has a wayai side). Kept
|
|
7775
|
+
// optional on the wire so a malformed manifest 400s on the field, not the body.
|
|
7776
|
+
installCommand: external_exports.string().min(1).max(300).optional(),
|
|
7777
|
+
hero: templateHeroSchema.optional(),
|
|
7778
|
+
// The channel→backend edge (gh #2955), locale-agnostic.
|
|
7779
|
+
uses: templateUsesSchema
|
|
7780
|
+
}),
|
|
7781
|
+
locales: external_exports.record(templateLocaleSchema, templatePushLocaleSchema)
|
|
7782
|
+
}).refine((b) => Boolean(b.locales[b.defaultLocale]), {
|
|
7783
|
+
message: "`locales` must include the defaultLocale"
|
|
7784
|
+
});
|
|
7785
|
+
templateListQuery = external_exports.object({ locale: templateLocaleSchema.optional() });
|
|
7786
|
+
templateSlugParam = external_exports.object({ slug: templateSlugSchema });
|
|
7787
|
+
templateDetailQuery = external_exports.object({ locale: templateLocaleSchema.optional() });
|
|
7788
|
+
courseQuizScoreSchema = external_exports.object({
|
|
7789
|
+
correct: external_exports.number().int().min(0).max(50),
|
|
7790
|
+
total: external_exports.number().int().min(1).max(50),
|
|
7791
|
+
/** Chosen choice index per question; -1 = unanswered. */
|
|
7792
|
+
answers: external_exports.array(external_exports.number().int().min(-1).max(50)).max(50).optional()
|
|
7793
|
+
});
|
|
7794
|
+
upsertCourseLessonBody = external_exports.object({
|
|
7795
|
+
quiz_passed: external_exports.boolean().optional(),
|
|
7796
|
+
quiz_score: courseQuizScoreSchema.optional(),
|
|
7797
|
+
content_version: external_exports.number().int().min(1)
|
|
7798
|
+
}).strict();
|
|
7799
|
+
linkCourseCapstoneBody = external_exports.object({
|
|
7800
|
+
hub_id: external_exports.string().min(1).max(128),
|
|
7801
|
+
// A capstone's slug IS a canonical template slug — reuse the one validator
|
|
7802
|
+
// the template pipeline (CLI, admin, gallery) already enforces, so course
|
|
7803
|
+
// linking can't drift from how real template slugs are shaped.
|
|
7804
|
+
template_slug: templateSlugSchema.optional()
|
|
7805
|
+
}).strict();
|
|
7636
7806
|
archiveHubIdParam = external_exports.object({
|
|
7637
7807
|
hubId: external_exports.string().uuid()
|
|
7638
7808
|
});
|
|
@@ -7726,7 +7896,10 @@ var init_dist = __esm({
|
|
|
7726
7896
|
user_id: external_exports.string().optional(),
|
|
7727
7897
|
scheduled_event_date: external_exports.string().optional(),
|
|
7728
7898
|
additional_context: additionalContextPayloadSchema.optional(),
|
|
7729
|
-
event_description: external_exports.string().optional()
|
|
7899
|
+
event_description: external_exports.string().optional(),
|
|
7900
|
+
// Closing outcome slug — required by the server only when the target is the
|
|
7901
|
+
// terminal status AND it declares `outcomes`. 50-char slug cap + headroom.
|
|
7902
|
+
outcome: external_exports.string().max(64).optional()
|
|
7730
7903
|
});
|
|
7731
7904
|
annotateConversationBody = external_exports.object({
|
|
7732
7905
|
hub_id: external_exports.string().uuid(),
|
|
@@ -8399,6 +8572,12 @@ var init_dist = __esm({
|
|
|
8399
8572
|
access_token: external_exports.string(),
|
|
8400
8573
|
refresh_token: external_exports.string()
|
|
8401
8574
|
});
|
|
8575
|
+
passwordLoginBody = external_exports.object({
|
|
8576
|
+
email: external_exports.string().email("Invalid email").max(254),
|
|
8577
|
+
// RFC 5321 max; bounds the request payload
|
|
8578
|
+
password: external_exports.string().min(1, "Password is required").max(128)
|
|
8579
|
+
// bound the payload; WorkOS validates
|
|
8580
|
+
});
|
|
8402
8581
|
browserParams = external_exports.object({
|
|
8403
8582
|
hubId: uuidSchema,
|
|
8404
8583
|
resourceId: uuidSchema
|
|
@@ -8840,77 +9019,6 @@ var init_dist = __esm({
|
|
|
8840
9019
|
offset: external_exports.coerce.number().int().min(0).optional()
|
|
8841
9020
|
});
|
|
8842
9021
|
noticeIdParamSchema = external_exports.object({ id: external_exports.string().min(1) });
|
|
8843
|
-
templateLocaleSchema = external_exports.enum(SUPPORTED_LOCALES);
|
|
8844
|
-
TEMPLATE_SLUG_REGEX = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
8845
|
-
templateSlugSchema = external_exports.string().regex(TEMPLATE_SLUG_REGEX, "slug must be lowercase alphanumeric with hyphens (max 63)");
|
|
8846
|
-
templateStatusSchema = external_exports.enum(["published", "draft", "internal"]);
|
|
8847
|
-
templateFileMapSchema = external_exports.record(external_exports.string()).refine((m) => Object.keys(m).every(isSafeTemplatePath), {
|
|
8848
|
-
message: 'file map contains an unsafe path (no absolute paths, "..", or backslashes)'
|
|
8849
|
-
});
|
|
8850
|
-
templateTextSchema = external_exports.object({
|
|
8851
|
-
metaTitle: external_exports.string().min(1).max(200),
|
|
8852
|
-
metaDescription: external_exports.string().max(1e3).default("")
|
|
8853
|
-
});
|
|
8854
|
-
templateUsesEntrySchema = external_exports.object({
|
|
8855
|
-
backend: templateSlugSchema,
|
|
8856
|
-
endpoint: templateSlugSchema
|
|
8857
|
-
});
|
|
8858
|
-
templateUsesSchema = external_exports.array(templateUsesEntrySchema).max(24).default([]);
|
|
8859
|
-
templateYamlLocaleEntry = templateTextSchema.extend({ source: external_exports.string().min(1) });
|
|
8860
|
-
templateYamlWayaiBlock = external_exports.object({
|
|
8861
|
-
installCommand: external_exports.string().min(1).max(300),
|
|
8862
|
-
locales: external_exports.record(templateLocaleSchema, templateYamlLocaleEntry)
|
|
8863
|
-
});
|
|
8864
|
-
templateTagsSchema = external_exports.array(external_exports.string().min(1).max(30)).max(12).default([]).transform((tags) => [...new Set(tags.map((t) => t.trim().toLowerCase()).filter(Boolean))]);
|
|
8865
|
-
templateYamlSchema = external_exports.object({
|
|
8866
|
-
slug: templateSlugSchema,
|
|
8867
|
-
category: external_exports.string().min(1).max(60),
|
|
8868
|
-
tags: templateTagsSchema,
|
|
8869
|
-
status: templateStatusSchema.default("draft"),
|
|
8870
|
-
order: external_exports.number().int().min(0).max(1e5).optional(),
|
|
8871
|
-
defaultLocale: templateLocaleSchema,
|
|
8872
|
-
hero: external_exports.string().optional(),
|
|
8873
|
-
// relative path to a hero image inside the template folder
|
|
8874
|
-
// The Rekor backend(s) this channel runs on (gh #2955). Locale-agnostic. The
|
|
8875
|
-
// cross-link + MCP endpoint are derived from each entry's slugs, never authored.
|
|
8876
|
-
uses: templateUsesSchema,
|
|
8877
|
-
// A WayAI template IS a WayAI channel — the wayai slice is required. (The old
|
|
8878
|
-
// Rekor-only store entry is gone: a pure Rekor backend lives only in Rekor's store.)
|
|
8879
|
-
wayai: templateYamlWayaiBlock
|
|
8880
|
-
}).refine((c) => Boolean(c.wayai.locales[c.defaultLocale]), {
|
|
8881
|
-
message: "`wayai.locales` must include the defaultLocale"
|
|
8882
|
-
});
|
|
8883
|
-
templateHeroSchema = external_exports.object({
|
|
8884
|
-
filename: external_exports.string().min(1).max(200).regex(/\.(png|jpe?g|webp|gif)$/i, "hero must be a raster image (png/jpg/webp/gif)"),
|
|
8885
|
-
dataBase64: external_exports.string().min(1).max(8e6)
|
|
8886
|
-
});
|
|
8887
|
-
templatePushLocaleSchema = external_exports.object({
|
|
8888
|
-
wayai: templateTextSchema.optional(),
|
|
8889
|
-
readmeMarkdown: external_exports.string().default(""),
|
|
8890
|
-
wayaiFiles: templateFileMapSchema.optional()
|
|
8891
|
-
});
|
|
8892
|
-
templatePushBody = external_exports.object({
|
|
8893
|
-
slug: templateSlugSchema,
|
|
8894
|
-
defaultLocale: templateLocaleSchema,
|
|
8895
|
-
common: external_exports.object({
|
|
8896
|
-
category: external_exports.string().min(1).max(60),
|
|
8897
|
-
tags: templateTagsSchema,
|
|
8898
|
-
status: templateStatusSchema,
|
|
8899
|
-
order: external_exports.number().int().min(0).max(1e5).default(0),
|
|
8900
|
-
// The WayAI install command (a WayAI template always has a wayai side). Kept
|
|
8901
|
-
// optional on the wire so a malformed manifest 400s on the field, not the body.
|
|
8902
|
-
installCommand: external_exports.string().min(1).max(300).optional(),
|
|
8903
|
-
hero: templateHeroSchema.optional(),
|
|
8904
|
-
// The channel→backend edge (gh #2955), locale-agnostic.
|
|
8905
|
-
uses: templateUsesSchema
|
|
8906
|
-
}),
|
|
8907
|
-
locales: external_exports.record(templateLocaleSchema, templatePushLocaleSchema)
|
|
8908
|
-
}).refine((b) => Boolean(b.locales[b.defaultLocale]), {
|
|
8909
|
-
message: "`locales` must include the defaultLocale"
|
|
8910
|
-
});
|
|
8911
|
-
templateListQuery = external_exports.object({ locale: templateLocaleSchema.optional() });
|
|
8912
|
-
templateSlugParam = external_exports.object({ slug: templateSlugSchema });
|
|
8913
|
-
templateDetailQuery = external_exports.object({ locale: templateLocaleSchema.optional() });
|
|
8914
9022
|
ADMIN_SKILL_NAME_REGEX = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
8915
9023
|
adminSkillNameParam = external_exports.object({
|
|
8916
9024
|
name: external_exports.string().regex(ADMIN_SKILL_NAME_REGEX, "invalid skill name")
|
|
@@ -11707,6 +11815,44 @@ function collectTurnAttachmentHashes2(turn) {
|
|
|
11707
11815
|
}
|
|
11708
11816
|
return hashes;
|
|
11709
11817
|
}
|
|
11818
|
+
function isSafeTemplatePath2(path31) {
|
|
11819
|
+
if (path31.length === 0 || path31.length > 300) return false;
|
|
11820
|
+
if (path31.startsWith("/") || path31.includes("\\")) return false;
|
|
11821
|
+
const segments = path31.split("/");
|
|
11822
|
+
return segments.every(
|
|
11823
|
+
(seg) => seg.length > 0 && seg !== "." && seg !== ".." && /^[A-Za-z0-9._-]+$/.test(seg)
|
|
11824
|
+
);
|
|
11825
|
+
}
|
|
11826
|
+
function dropTemplateKeys(value, drop) {
|
|
11827
|
+
if (Array.isArray(value)) return value.map((v) => dropTemplateKeys(v, drop));
|
|
11828
|
+
if (isPlainObject(value)) {
|
|
11829
|
+
const out = {};
|
|
11830
|
+
for (const [key, child] of Object.entries(value)) {
|
|
11831
|
+
if (drop.has(key)) continue;
|
|
11832
|
+
out[key] = TEMPLATE_OPAQUE_BLOB_KEYS.has(key) ? child : dropTemplateKeys(child, drop);
|
|
11833
|
+
}
|
|
11834
|
+
return out;
|
|
11835
|
+
}
|
|
11836
|
+
return value;
|
|
11837
|
+
}
|
|
11838
|
+
function stripTemplateInstanceIds(value) {
|
|
11839
|
+
return dropTemplateKeys(value, TEMPLATE_INSTANCE_ID_KEYS);
|
|
11840
|
+
}
|
|
11841
|
+
function excludeTemplateAuthorData(value) {
|
|
11842
|
+
return dropTemplateKeys(value, TEMPLATE_AUTHOR_DATA_KEYS);
|
|
11843
|
+
}
|
|
11844
|
+
function isPlainObject(value) {
|
|
11845
|
+
if (value === null || typeof value !== "object") return false;
|
|
11846
|
+
const proto = Object.getPrototypeOf(value);
|
|
11847
|
+
return proto === Object.prototype || proto === null;
|
|
11848
|
+
}
|
|
11849
|
+
function isSanitizableSliceFile(path31) {
|
|
11850
|
+
if (!/\.ya?ml$/i.test(path31)) return false;
|
|
11851
|
+
return path31 !== "resources" && !path31.startsWith("resources/");
|
|
11852
|
+
}
|
|
11853
|
+
function distinctUsesBackends(uses) {
|
|
11854
|
+
return [...new Set((uses ?? []).map((u) => u.backend))];
|
|
11855
|
+
}
|
|
11710
11856
|
function refineHubAsCodeCustomTools2(config, ctx) {
|
|
11711
11857
|
const agents = config.agents;
|
|
11712
11858
|
if (!Array.isArray(agents)) return;
|
|
@@ -11949,45 +12095,7 @@ function refineHubAsCodeResources2(config, ctx) {
|
|
|
11949
12095
|
});
|
|
11950
12096
|
}
|
|
11951
12097
|
}
|
|
11952
|
-
function isSafeTemplatePath2(path31) {
|
|
11953
|
-
if (path31.length === 0 || path31.length > 300) return false;
|
|
11954
|
-
if (path31.startsWith("/") || path31.includes("\\")) return false;
|
|
11955
|
-
const segments = path31.split("/");
|
|
11956
|
-
return segments.every(
|
|
11957
|
-
(seg) => seg.length > 0 && seg !== "." && seg !== ".." && /^[A-Za-z0-9._-]+$/.test(seg)
|
|
11958
|
-
);
|
|
11959
|
-
}
|
|
11960
|
-
function dropTemplateKeys(value, drop) {
|
|
11961
|
-
if (Array.isArray(value)) return value.map((v) => dropTemplateKeys(v, drop));
|
|
11962
|
-
if (isPlainObject(value)) {
|
|
11963
|
-
const out = {};
|
|
11964
|
-
for (const [key, child] of Object.entries(value)) {
|
|
11965
|
-
if (drop.has(key)) continue;
|
|
11966
|
-
out[key] = TEMPLATE_OPAQUE_BLOB_KEYS.has(key) ? child : dropTemplateKeys(child, drop);
|
|
11967
|
-
}
|
|
11968
|
-
return out;
|
|
11969
|
-
}
|
|
11970
|
-
return value;
|
|
11971
|
-
}
|
|
11972
|
-
function stripTemplateInstanceIds(value) {
|
|
11973
|
-
return dropTemplateKeys(value, TEMPLATE_INSTANCE_ID_KEYS);
|
|
11974
|
-
}
|
|
11975
|
-
function excludeTemplateAuthorData(value) {
|
|
11976
|
-
return dropTemplateKeys(value, TEMPLATE_AUTHOR_DATA_KEYS);
|
|
11977
|
-
}
|
|
11978
|
-
function isPlainObject(value) {
|
|
11979
|
-
if (value === null || typeof value !== "object") return false;
|
|
11980
|
-
const proto = Object.getPrototypeOf(value);
|
|
11981
|
-
return proto === Object.prototype || proto === null;
|
|
11982
|
-
}
|
|
11983
|
-
function isSanitizableSliceFile(path31) {
|
|
11984
|
-
if (!/\.ya?ml$/i.test(path31)) return false;
|
|
11985
|
-
return path31 !== "resources" && !path31.startsWith("resources/");
|
|
11986
|
-
}
|
|
11987
|
-
function distinctUsesBackends(uses) {
|
|
11988
|
-
return [...new Set((uses ?? []).map((u) => u.backend))];
|
|
11989
|
-
}
|
|
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;
|
|
12098
|
+
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, 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, 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, apiChannelMessage2, apiChannelMessageBody2, appMessageBody2, updateUserBody2, updateProfileBody2, pathnameRegex2, updatePreferencesBody2, registerPushTokenBody2, deletePushTokenQuery2, activityQuery2, deletionModeSchema2, deletionRequestBody2, 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, courseQuizScoreSchema2, upsertCourseLessonBody2, linkCourseCapstoneBody2, 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, 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;
|
|
11991
12099
|
var init_contracts = __esm({
|
|
11992
12100
|
"../../packages/core/dist/contracts/index.js"() {
|
|
11993
12101
|
"use strict";
|
|
@@ -12039,6 +12147,7 @@ var init_contracts = __esm({
|
|
|
12039
12147
|
init_zod();
|
|
12040
12148
|
init_zod();
|
|
12041
12149
|
init_zod();
|
|
12150
|
+
init_zod();
|
|
12042
12151
|
uuidSchema2 = external_exports.string().uuid();
|
|
12043
12152
|
paginationSchema3 = external_exports.object({
|
|
12044
12153
|
limit: external_exports.coerce.number().int().min(1).max(100).default(50),
|
|
@@ -12255,6 +12364,12 @@ var init_contracts = __esm({
|
|
|
12255
12364
|
});
|
|
12256
12365
|
}
|
|
12257
12366
|
});
|
|
12367
|
+
MAX_OUTCOMES_PER_STATUS2 = 20;
|
|
12368
|
+
kanbanOutcomeSchema2 = external_exports.object({
|
|
12369
|
+
slug: kanbanStatusSlugSchema2,
|
|
12370
|
+
name: external_exports.string().min(1, "name is required").max(100, "name must be 100 characters or fewer").refine((v) => visibleLength2(v) > 0, "name must not be blank"),
|
|
12371
|
+
color: external_exports.string().optional()
|
|
12372
|
+
}).passthrough();
|
|
12258
12373
|
EXCLUSIVE_FLAG_PAIRS2 = [
|
|
12259
12374
|
["isInitialStatus", "triggersAgentResponse"],
|
|
12260
12375
|
["isInitialStatus", "allowsAgentUpdate"],
|
|
@@ -12290,7 +12405,10 @@ var init_contracts = __esm({
|
|
|
12290
12405
|
* and is not exposed to agents. The cross-reference invariant (must point at a
|
|
12291
12406
|
* declared lane; the initial status must not have one) is enforced at the hub
|
|
12292
12407
|
* level via `validateLaneReferences` — this schema only sees the status array. */
|
|
12293
|
-
lane_slug: kanbanStatusSlugSchema2.optional()
|
|
12408
|
+
lane_slug: kanbanStatusSlugSchema2.optional(),
|
|
12409
|
+
/** Closing outcomes offered on the terminal transition. Only valid when
|
|
12410
|
+
* `isTerminalStatus === true` (enforced in the superRefine below). */
|
|
12411
|
+
outcomes: external_exports.array(kanbanOutcomeSchema2).max(MAX_OUTCOMES_PER_STATUS2, `outcomes must have at most ${MAX_OUTCOMES_PER_STATUS2} entries`).optional()
|
|
12294
12412
|
}).passthrough().superRefine((status, ctx) => {
|
|
12295
12413
|
const label = status.name ? `"${status.name}"` : status.slug ? `"${status.slug}"` : "<unnamed>";
|
|
12296
12414
|
for (const [a, b] of EXCLUSIVE_FLAG_PAIRS2) {
|
|
@@ -12327,6 +12445,33 @@ var init_contracts = __esm({
|
|
|
12327
12445
|
});
|
|
12328
12446
|
}
|
|
12329
12447
|
}
|
|
12448
|
+
if (Array.isArray(status.outcomes) && status.outcomes.length > 0) {
|
|
12449
|
+
if (status.isTerminalStatus !== true) {
|
|
12450
|
+
ctx.addIssue({
|
|
12451
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12452
|
+
path: ["outcomes"],
|
|
12453
|
+
message: `kanban status ${label}: outcomes are only allowed on the terminal status (set isTerminalStatus=true)`
|
|
12454
|
+
});
|
|
12455
|
+
}
|
|
12456
|
+
const seen = /* @__PURE__ */ new Map();
|
|
12457
|
+
status.outcomes.forEach((o, j) => {
|
|
12458
|
+
if (!o?.slug) return;
|
|
12459
|
+
const arr = seen.get(o.slug) ?? [];
|
|
12460
|
+
arr.push(j);
|
|
12461
|
+
seen.set(o.slug, arr);
|
|
12462
|
+
});
|
|
12463
|
+
for (const [slug, indices] of seen) {
|
|
12464
|
+
if (indices.length > 1) {
|
|
12465
|
+
for (const j of indices) {
|
|
12466
|
+
ctx.addIssue({
|
|
12467
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12468
|
+
path: ["outcomes", j, "slug"],
|
|
12469
|
+
message: `kanban status ${label}: duplicate outcome slug "${slug}"`
|
|
12470
|
+
});
|
|
12471
|
+
}
|
|
12472
|
+
}
|
|
12473
|
+
}
|
|
12474
|
+
}
|
|
12330
12475
|
});
|
|
12331
12476
|
kanbanStatusesArraySchema2 = external_exports.array(kanbanStatusSchema2).max(MAX_KANBAN_STATUSES2, `kanban_statuses must have at most ${MAX_KANBAN_STATUSES2} entries`).superRefine((statuses, ctx) => {
|
|
12332
12477
|
if (statuses.length === 0) return;
|
|
@@ -12347,6 +12492,17 @@ var init_contracts = __esm({
|
|
|
12347
12492
|
});
|
|
12348
12493
|
}
|
|
12349
12494
|
}
|
|
12495
|
+
const terminalIndices = statuses.map((s, i) => ({ s, i })).filter(({ s }) => s.isTerminalStatus === true);
|
|
12496
|
+
if (terminalIndices.length > 1) {
|
|
12497
|
+
const slugs = terminalIndices.map(({ s }) => s.slug).join(", ");
|
|
12498
|
+
for (const { i } of terminalIndices) {
|
|
12499
|
+
ctx.addIssue({
|
|
12500
|
+
code: external_exports.ZodIssueCode.custom,
|
|
12501
|
+
path: [i, "isTerminalStatus"],
|
|
12502
|
+
message: `kanban_statuses: at most one status may have isTerminalStatus=true (found ${terminalIndices.length}: ${slugs})`
|
|
12503
|
+
});
|
|
12504
|
+
}
|
|
12505
|
+
}
|
|
12350
12506
|
const seenSlugs = /* @__PURE__ */ new Map();
|
|
12351
12507
|
statuses.forEach((s, i) => {
|
|
12352
12508
|
const key = s.slug;
|
|
@@ -12547,7 +12703,7 @@ var init_contracts = __esm({
|
|
|
12547
12703
|
hub_id: uuidSchema2,
|
|
12548
12704
|
sync_credentials_to_production: external_exports.boolean().optional()
|
|
12549
12705
|
}).passthrough();
|
|
12550
|
-
PRODUCTION_DIRECT_FIELDS2 = ["username", "api_key", "access_token", "password", "refresh_token", "webhook_secret_token"];
|
|
12706
|
+
PRODUCTION_DIRECT_FIELDS2 = ["username", "api_key", "access_token", "password", "refresh_token", "webhook_secret_token", "webhook_signing_secret"];
|
|
12551
12707
|
setProductionCredentialBody2 = external_exports.object({
|
|
12552
12708
|
hub_id: uuidSchema2,
|
|
12553
12709
|
organization_credential_id: external_exports.string().nullable().optional(),
|
|
@@ -12557,7 +12713,8 @@ var init_contracts = __esm({
|
|
|
12557
12713
|
access_token: external_exports.string().optional(),
|
|
12558
12714
|
password: external_exports.string().optional(),
|
|
12559
12715
|
refresh_token: external_exports.string().optional(),
|
|
12560
|
-
webhook_secret_token: external_exports.string().optional()
|
|
12716
|
+
webhook_secret_token: external_exports.string().optional(),
|
|
12717
|
+
webhook_signing_secret: external_exports.string().optional()
|
|
12561
12718
|
}).strict().superRefine((data, ctx) => {
|
|
12562
12719
|
const hasOrgLink = !!data.organization_credential_id || !!data.organization_credential_token_id;
|
|
12563
12720
|
const hasDirect = PRODUCTION_DIRECT_FIELDS2.some((f) => data[f] != null);
|
|
@@ -13412,6 +13569,38 @@ var init_contracts = __esm({
|
|
|
13412
13569
|
});
|
|
13413
13570
|
appMessageSenderType2 = external_exports.enum(["user", "team"]);
|
|
13414
13571
|
appMessageReceiverType2 = external_exports.enum(["user", "team", "agent", "assistant"]).transform((v) => v === "assistant" ? "agent" : v);
|
|
13572
|
+
apiChannelMessage2 = external_exports.object({
|
|
13573
|
+
text: clientOptionalString2,
|
|
13574
|
+
attachments: external_exports.array(messageAttachment2).max(MAX_ATTACHMENTS_PER_MESSAGE2).nullish().transform((v) => v ?? void 0)
|
|
13575
|
+
}).refine((m) => m.text && m.text.length > 0 || m.attachments && m.attachments.length > 0, {
|
|
13576
|
+
message: "message must have text or at least one attachment"
|
|
13577
|
+
});
|
|
13578
|
+
apiChannelMessageBody2 = external_exports.object({
|
|
13579
|
+
// Correlation id (task hubs): new → new conversation, repeat → continue. min 1 so an
|
|
13580
|
+
// empty string can't masquerade as a ref. Mutually exclusive with conversation_id.
|
|
13581
|
+
external_ref: external_exports.string().min(1).max(256).optional(),
|
|
13582
|
+
// Continue a specific WayAI conversation (authorized against the hub/channel + owner).
|
|
13583
|
+
// UUID-validated here (unlike the app channel, whose client we control): allocation
|
|
13584
|
+
// only treats a UUID-shaped id as a provided conversation, so a malformed id would
|
|
13585
|
+
// otherwise skip the owner guard and silently MINT a new conversation instead of
|
|
13586
|
+
// rejecting. A format 400 is shape-only — not an existence oracle (a valid-but-unknown
|
|
13587
|
+
// UUID still collapses to the opaque authorization error downstream).
|
|
13588
|
+
conversation_id: external_exports.string().uuid().optional(),
|
|
13589
|
+
// On-behalf-of end-user identity. Absent → per-connection service principal (task-hub
|
|
13590
|
+
// only; chat hub rejects with 422 in the route).
|
|
13591
|
+
user: external_exports.object({
|
|
13592
|
+
id: external_exports.string().min(1),
|
|
13593
|
+
email: clientOptionalString2,
|
|
13594
|
+
name: clientOptionalString2
|
|
13595
|
+
}).optional(),
|
|
13596
|
+
message: apiChannelMessage2,
|
|
13597
|
+
// Idempotency key: maps to channel_message_sid; a retried POST echoes the original
|
|
13598
|
+
// message_id and skips billing / turn dispatch (dedupe in ConversationDO.storeMessage).
|
|
13599
|
+
client_message_id: external_exports.string().min(1).max(256).optional()
|
|
13600
|
+
}).refine((b) => !(b.external_ref && b.conversation_id), {
|
|
13601
|
+
message: "provide external_ref or conversation_id, not both",
|
|
13602
|
+
path: ["external_ref"]
|
|
13603
|
+
});
|
|
13415
13604
|
appMessageBody2 = external_exports.object({
|
|
13416
13605
|
// Message content — three historical aliases. All optional: an attachment-only
|
|
13417
13606
|
// or voice-only message carries no text.
|
|
@@ -13487,6 +13676,153 @@ var init_contracts = __esm({
|
|
|
13487
13676
|
/** Type-to-confirm value; must equal the user's email (constant-time compared). */
|
|
13488
13677
|
email_confirmation: external_exports.string().min(1).max(320)
|
|
13489
13678
|
});
|
|
13679
|
+
templateLocaleSchema2 = external_exports.enum(SUPPORTED_LOCALES2);
|
|
13680
|
+
TEMPLATE_SLUG_REGEX2 = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
13681
|
+
templateSlugSchema2 = external_exports.string().regex(TEMPLATE_SLUG_REGEX2, "slug must be lowercase alphanumeric with hyphens (max 63)");
|
|
13682
|
+
templateStatusSchema2 = external_exports.enum(["published", "draft", "internal"]);
|
|
13683
|
+
templateFileMapSchema2 = external_exports.record(external_exports.string()).refine((m) => Object.keys(m).every(isSafeTemplatePath2), {
|
|
13684
|
+
message: 'file map contains an unsafe path (no absolute paths, "..", or backslashes)'
|
|
13685
|
+
});
|
|
13686
|
+
TEMPLATE_INSTANCE_ID_KEYS = /* @__PURE__ */ new Set([
|
|
13687
|
+
// Top-level hub instance metadata (hub.yaml) — set by `wayai pull`, never authored.
|
|
13688
|
+
"hub_id",
|
|
13689
|
+
"hub_environment",
|
|
13690
|
+
"preview_label",
|
|
13691
|
+
"branch_name",
|
|
13692
|
+
// Per-entity row id + cross-entity reference UUIDs (each has a portable name twin).
|
|
13693
|
+
"id",
|
|
13694
|
+
"connection_id",
|
|
13695
|
+
"target_id",
|
|
13696
|
+
"agent_id",
|
|
13697
|
+
"resource_id",
|
|
13698
|
+
"list_id",
|
|
13699
|
+
// Account-scoped Meta WhatsApp template id (name twin: `template_whatsapp`).
|
|
13700
|
+
"template_whatsapp_id"
|
|
13701
|
+
]);
|
|
13702
|
+
TEMPLATE_OPAQUE_BLOB_KEYS = /* @__PURE__ */ new Set([
|
|
13703
|
+
"settings",
|
|
13704
|
+
// agent + connection connector settings
|
|
13705
|
+
"schema_json",
|
|
13706
|
+
// agent response_format JSON Schema
|
|
13707
|
+
"json_schema",
|
|
13708
|
+
// state JSON Schema
|
|
13709
|
+
"initial_value",
|
|
13710
|
+
// state seed value
|
|
13711
|
+
"additional_context_schema",
|
|
13712
|
+
// kanban-status transition-form schema
|
|
13713
|
+
"config",
|
|
13714
|
+
// custom-tool OpenAI function schema
|
|
13715
|
+
"headers",
|
|
13716
|
+
"query_params",
|
|
13717
|
+
"body_params",
|
|
13718
|
+
// custom-tool HTTP shaping
|
|
13719
|
+
"mappings",
|
|
13720
|
+
// composed-tool argument mappings
|
|
13721
|
+
"input",
|
|
13722
|
+
"expected",
|
|
13723
|
+
"history",
|
|
13724
|
+
// eval message fixtures (tool_calls carry their own `id`)
|
|
13725
|
+
"transcript",
|
|
13726
|
+
"step_config"
|
|
13727
|
+
// journey fixtures (transcript carries `step_id`; step_config is keyed by it)
|
|
13728
|
+
]);
|
|
13729
|
+
TEMPLATE_AUTHOR_DATA_KEYS = /* @__PURE__ */ new Set([
|
|
13730
|
+
// Outbound campaign subsystem (hub.yaml top-level). `outbound_contacts` is the
|
|
13731
|
+
// author's real leads — `phone`/`email`/`instagram_sid` + the required `name` are
|
|
13732
|
+
// GDPR-grade PII. `outbound_lists` group those contacts by real name. `outbound_schedules`
|
|
13733
|
+
// bind to the (now-absent) lists and carry the author's campaign cadence + message
|
|
13734
|
+
// copy — operationally tied to the author's customers; a consumer builds their own.
|
|
13735
|
+
"outbound_contacts",
|
|
13736
|
+
"outbound_lists",
|
|
13737
|
+
"outbound_schedules",
|
|
13738
|
+
// Account-scoped channel identifier on a connection (Twilio SID / WhatsApp number /
|
|
13739
|
+
// IG username / from-email, per connector). The connection stays as portable
|
|
13740
|
+
// structure re-bound by name on push; this author-account value carries no blueprint
|
|
13741
|
+
// value. A dedicated top-level column — never nested in the `settings` opaque blob.
|
|
13742
|
+
"account_sid"
|
|
13743
|
+
]);
|
|
13744
|
+
templateTextSchema2 = external_exports.object({
|
|
13745
|
+
metaTitle: external_exports.string().min(1).max(200),
|
|
13746
|
+
metaDescription: external_exports.string().max(1e3).default("")
|
|
13747
|
+
});
|
|
13748
|
+
templateUsesEntrySchema2 = external_exports.object({
|
|
13749
|
+
backend: templateSlugSchema2,
|
|
13750
|
+
endpoint: templateSlugSchema2
|
|
13751
|
+
});
|
|
13752
|
+
templateUsesSchema2 = external_exports.array(templateUsesEntrySchema2).max(24).default([]);
|
|
13753
|
+
templateYamlLocaleEntry2 = templateTextSchema2.extend({ source: external_exports.string().min(1) });
|
|
13754
|
+
templateYamlWayaiBlock2 = external_exports.object({
|
|
13755
|
+
installCommand: external_exports.string().min(1).max(300),
|
|
13756
|
+
locales: external_exports.record(templateLocaleSchema2, templateYamlLocaleEntry2)
|
|
13757
|
+
});
|
|
13758
|
+
templateTagsSchema2 = external_exports.array(external_exports.string().min(1).max(30)).max(12).default([]).transform((tags) => [...new Set(tags.map((t) => t.trim().toLowerCase()).filter(Boolean))]);
|
|
13759
|
+
templateYamlSchema2 = external_exports.object({
|
|
13760
|
+
slug: templateSlugSchema2,
|
|
13761
|
+
category: external_exports.string().min(1).max(60),
|
|
13762
|
+
tags: templateTagsSchema2,
|
|
13763
|
+
status: templateStatusSchema2.default("draft"),
|
|
13764
|
+
order: external_exports.number().int().min(0).max(1e5).optional(),
|
|
13765
|
+
defaultLocale: templateLocaleSchema2,
|
|
13766
|
+
hero: external_exports.string().optional(),
|
|
13767
|
+
// relative path to a hero image inside the template folder
|
|
13768
|
+
// The Rekor backend(s) this channel runs on (gh #2955). Locale-agnostic. The
|
|
13769
|
+
// cross-link + MCP endpoint are derived from each entry's slugs, never authored.
|
|
13770
|
+
uses: templateUsesSchema2,
|
|
13771
|
+
// A WayAI template IS a WayAI channel — the wayai slice is required. (The old
|
|
13772
|
+
// Rekor-only store entry is gone: a pure Rekor backend lives only in Rekor's store.)
|
|
13773
|
+
wayai: templateYamlWayaiBlock2
|
|
13774
|
+
}).refine((c) => Boolean(c.wayai.locales[c.defaultLocale]), {
|
|
13775
|
+
message: "`wayai.locales` must include the defaultLocale"
|
|
13776
|
+
});
|
|
13777
|
+
templateHeroSchema2 = external_exports.object({
|
|
13778
|
+
filename: external_exports.string().min(1).max(200).regex(/\.(png|jpe?g|webp|gif)$/i, "hero must be a raster image (png/jpg/webp/gif)"),
|
|
13779
|
+
dataBase64: external_exports.string().min(1).max(8e6)
|
|
13780
|
+
});
|
|
13781
|
+
templatePushLocaleSchema2 = external_exports.object({
|
|
13782
|
+
wayai: templateTextSchema2.optional(),
|
|
13783
|
+
readmeMarkdown: external_exports.string().default(""),
|
|
13784
|
+
wayaiFiles: templateFileMapSchema2.optional()
|
|
13785
|
+
});
|
|
13786
|
+
templatePushBody2 = external_exports.object({
|
|
13787
|
+
slug: templateSlugSchema2,
|
|
13788
|
+
defaultLocale: templateLocaleSchema2,
|
|
13789
|
+
common: external_exports.object({
|
|
13790
|
+
category: external_exports.string().min(1).max(60),
|
|
13791
|
+
tags: templateTagsSchema2,
|
|
13792
|
+
status: templateStatusSchema2,
|
|
13793
|
+
order: external_exports.number().int().min(0).max(1e5).default(0),
|
|
13794
|
+
// The WayAI install command (a WayAI template always has a wayai side). Kept
|
|
13795
|
+
// optional on the wire so a malformed manifest 400s on the field, not the body.
|
|
13796
|
+
installCommand: external_exports.string().min(1).max(300).optional(),
|
|
13797
|
+
hero: templateHeroSchema2.optional(),
|
|
13798
|
+
// The channel→backend edge (gh #2955), locale-agnostic.
|
|
13799
|
+
uses: templateUsesSchema2
|
|
13800
|
+
}),
|
|
13801
|
+
locales: external_exports.record(templateLocaleSchema2, templatePushLocaleSchema2)
|
|
13802
|
+
}).refine((b) => Boolean(b.locales[b.defaultLocale]), {
|
|
13803
|
+
message: "`locales` must include the defaultLocale"
|
|
13804
|
+
});
|
|
13805
|
+
templateListQuery2 = external_exports.object({ locale: templateLocaleSchema2.optional() });
|
|
13806
|
+
templateSlugParam2 = external_exports.object({ slug: templateSlugSchema2 });
|
|
13807
|
+
templateDetailQuery2 = external_exports.object({ locale: templateLocaleSchema2.optional() });
|
|
13808
|
+
courseQuizScoreSchema2 = external_exports.object({
|
|
13809
|
+
correct: external_exports.number().int().min(0).max(50),
|
|
13810
|
+
total: external_exports.number().int().min(1).max(50),
|
|
13811
|
+
/** Chosen choice index per question; -1 = unanswered. */
|
|
13812
|
+
answers: external_exports.array(external_exports.number().int().min(-1).max(50)).max(50).optional()
|
|
13813
|
+
});
|
|
13814
|
+
upsertCourseLessonBody2 = external_exports.object({
|
|
13815
|
+
quiz_passed: external_exports.boolean().optional(),
|
|
13816
|
+
quiz_score: courseQuizScoreSchema2.optional(),
|
|
13817
|
+
content_version: external_exports.number().int().min(1)
|
|
13818
|
+
}).strict();
|
|
13819
|
+
linkCourseCapstoneBody2 = external_exports.object({
|
|
13820
|
+
hub_id: external_exports.string().min(1).max(128),
|
|
13821
|
+
// A capstone's slug IS a canonical template slug — reuse the one validator
|
|
13822
|
+
// the template pipeline (CLI, admin, gallery) already enforces, so course
|
|
13823
|
+
// linking can't drift from how real template slugs are shaped.
|
|
13824
|
+
template_slug: templateSlugSchema2.optional()
|
|
13825
|
+
}).strict();
|
|
13490
13826
|
archiveHubIdParam2 = external_exports.object({
|
|
13491
13827
|
hubId: external_exports.string().uuid()
|
|
13492
13828
|
});
|
|
@@ -13580,7 +13916,10 @@ var init_contracts = __esm({
|
|
|
13580
13916
|
user_id: external_exports.string().optional(),
|
|
13581
13917
|
scheduled_event_date: external_exports.string().optional(),
|
|
13582
13918
|
additional_context: additionalContextPayloadSchema2.optional(),
|
|
13583
|
-
event_description: external_exports.string().optional()
|
|
13919
|
+
event_description: external_exports.string().optional(),
|
|
13920
|
+
// Closing outcome slug — required by the server only when the target is the
|
|
13921
|
+
// terminal status AND it declares `outcomes`. 50-char slug cap + headroom.
|
|
13922
|
+
outcome: external_exports.string().max(64).optional()
|
|
13584
13923
|
});
|
|
13585
13924
|
annotateConversationBody2 = external_exports.object({
|
|
13586
13925
|
hub_id: external_exports.string().uuid(),
|
|
@@ -14253,6 +14592,12 @@ var init_contracts = __esm({
|
|
|
14253
14592
|
access_token: external_exports.string(),
|
|
14254
14593
|
refresh_token: external_exports.string()
|
|
14255
14594
|
});
|
|
14595
|
+
passwordLoginBody2 = external_exports.object({
|
|
14596
|
+
email: external_exports.string().email("Invalid email").max(254),
|
|
14597
|
+
// RFC 5321 max; bounds the request payload
|
|
14598
|
+
password: external_exports.string().min(1, "Password is required").max(128)
|
|
14599
|
+
// bound the payload; WorkOS validates
|
|
14600
|
+
});
|
|
14256
14601
|
browserParams2 = external_exports.object({
|
|
14257
14602
|
hubId: uuidSchema2,
|
|
14258
14603
|
resourceId: uuidSchema2
|
|
@@ -14694,135 +15039,6 @@ var init_contracts = __esm({
|
|
|
14694
15039
|
offset: external_exports.coerce.number().int().min(0).optional()
|
|
14695
15040
|
});
|
|
14696
15041
|
noticeIdParamSchema2 = external_exports.object({ id: external_exports.string().min(1) });
|
|
14697
|
-
templateLocaleSchema2 = external_exports.enum(SUPPORTED_LOCALES2);
|
|
14698
|
-
TEMPLATE_SLUG_REGEX2 = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
14699
|
-
templateSlugSchema2 = external_exports.string().regex(TEMPLATE_SLUG_REGEX2, "slug must be lowercase alphanumeric with hyphens (max 63)");
|
|
14700
|
-
templateStatusSchema2 = external_exports.enum(["published", "draft", "internal"]);
|
|
14701
|
-
templateFileMapSchema2 = external_exports.record(external_exports.string()).refine((m) => Object.keys(m).every(isSafeTemplatePath2), {
|
|
14702
|
-
message: 'file map contains an unsafe path (no absolute paths, "..", or backslashes)'
|
|
14703
|
-
});
|
|
14704
|
-
TEMPLATE_INSTANCE_ID_KEYS = /* @__PURE__ */ new Set([
|
|
14705
|
-
// Top-level hub instance metadata (hub.yaml) — set by `wayai pull`, never authored.
|
|
14706
|
-
"hub_id",
|
|
14707
|
-
"hub_environment",
|
|
14708
|
-
"preview_label",
|
|
14709
|
-
"branch_name",
|
|
14710
|
-
// Per-entity row id + cross-entity reference UUIDs (each has a portable name twin).
|
|
14711
|
-
"id",
|
|
14712
|
-
"connection_id",
|
|
14713
|
-
"target_id",
|
|
14714
|
-
"agent_id",
|
|
14715
|
-
"resource_id",
|
|
14716
|
-
"list_id",
|
|
14717
|
-
// Account-scoped Meta WhatsApp template id (name twin: `template_whatsapp`).
|
|
14718
|
-
"template_whatsapp_id"
|
|
14719
|
-
]);
|
|
14720
|
-
TEMPLATE_OPAQUE_BLOB_KEYS = /* @__PURE__ */ new Set([
|
|
14721
|
-
"settings",
|
|
14722
|
-
// agent + connection connector settings
|
|
14723
|
-
"schema_json",
|
|
14724
|
-
// agent response_format JSON Schema
|
|
14725
|
-
"json_schema",
|
|
14726
|
-
// state JSON Schema
|
|
14727
|
-
"initial_value",
|
|
14728
|
-
// state seed value
|
|
14729
|
-
"additional_context_schema",
|
|
14730
|
-
// kanban-status transition-form schema
|
|
14731
|
-
"config",
|
|
14732
|
-
// custom-tool OpenAI function schema
|
|
14733
|
-
"headers",
|
|
14734
|
-
"query_params",
|
|
14735
|
-
"body_params",
|
|
14736
|
-
// custom-tool HTTP shaping
|
|
14737
|
-
"mappings",
|
|
14738
|
-
// composed-tool argument mappings
|
|
14739
|
-
"input",
|
|
14740
|
-
"expected",
|
|
14741
|
-
"history",
|
|
14742
|
-
// eval message fixtures (tool_calls carry their own `id`)
|
|
14743
|
-
"transcript",
|
|
14744
|
-
"step_config"
|
|
14745
|
-
// journey fixtures (transcript carries `step_id`; step_config is keyed by it)
|
|
14746
|
-
]);
|
|
14747
|
-
TEMPLATE_AUTHOR_DATA_KEYS = /* @__PURE__ */ new Set([
|
|
14748
|
-
// Outbound campaign subsystem (hub.yaml top-level). `outbound_contacts` is the
|
|
14749
|
-
// author's real leads — `phone`/`email`/`instagram_sid` + the required `name` are
|
|
14750
|
-
// GDPR-grade PII. `outbound_lists` group those contacts by real name. `outbound_schedules`
|
|
14751
|
-
// bind to the (now-absent) lists and carry the author's campaign cadence + message
|
|
14752
|
-
// copy — operationally tied to the author's customers; a consumer builds their own.
|
|
14753
|
-
"outbound_contacts",
|
|
14754
|
-
"outbound_lists",
|
|
14755
|
-
"outbound_schedules",
|
|
14756
|
-
// Account-scoped channel identifier on a connection (Twilio SID / WhatsApp number /
|
|
14757
|
-
// IG username / from-email, per connector). The connection stays as portable
|
|
14758
|
-
// structure re-bound by name on push; this author-account value carries no blueprint
|
|
14759
|
-
// value. A dedicated top-level column — never nested in the `settings` opaque blob.
|
|
14760
|
-
"account_sid"
|
|
14761
|
-
]);
|
|
14762
|
-
templateTextSchema2 = external_exports.object({
|
|
14763
|
-
metaTitle: external_exports.string().min(1).max(200),
|
|
14764
|
-
metaDescription: external_exports.string().max(1e3).default("")
|
|
14765
|
-
});
|
|
14766
|
-
templateUsesEntrySchema2 = external_exports.object({
|
|
14767
|
-
backend: templateSlugSchema2,
|
|
14768
|
-
endpoint: templateSlugSchema2
|
|
14769
|
-
});
|
|
14770
|
-
templateUsesSchema2 = external_exports.array(templateUsesEntrySchema2).max(24).default([]);
|
|
14771
|
-
templateYamlLocaleEntry2 = templateTextSchema2.extend({ source: external_exports.string().min(1) });
|
|
14772
|
-
templateYamlWayaiBlock2 = external_exports.object({
|
|
14773
|
-
installCommand: external_exports.string().min(1).max(300),
|
|
14774
|
-
locales: external_exports.record(templateLocaleSchema2, templateYamlLocaleEntry2)
|
|
14775
|
-
});
|
|
14776
|
-
templateTagsSchema2 = external_exports.array(external_exports.string().min(1).max(30)).max(12).default([]).transform((tags) => [...new Set(tags.map((t) => t.trim().toLowerCase()).filter(Boolean))]);
|
|
14777
|
-
templateYamlSchema2 = external_exports.object({
|
|
14778
|
-
slug: templateSlugSchema2,
|
|
14779
|
-
category: external_exports.string().min(1).max(60),
|
|
14780
|
-
tags: templateTagsSchema2,
|
|
14781
|
-
status: templateStatusSchema2.default("draft"),
|
|
14782
|
-
order: external_exports.number().int().min(0).max(1e5).optional(),
|
|
14783
|
-
defaultLocale: templateLocaleSchema2,
|
|
14784
|
-
hero: external_exports.string().optional(),
|
|
14785
|
-
// relative path to a hero image inside the template folder
|
|
14786
|
-
// The Rekor backend(s) this channel runs on (gh #2955). Locale-agnostic. The
|
|
14787
|
-
// cross-link + MCP endpoint are derived from each entry's slugs, never authored.
|
|
14788
|
-
uses: templateUsesSchema2,
|
|
14789
|
-
// A WayAI template IS a WayAI channel — the wayai slice is required. (The old
|
|
14790
|
-
// Rekor-only store entry is gone: a pure Rekor backend lives only in Rekor's store.)
|
|
14791
|
-
wayai: templateYamlWayaiBlock2
|
|
14792
|
-
}).refine((c) => Boolean(c.wayai.locales[c.defaultLocale]), {
|
|
14793
|
-
message: "`wayai.locales` must include the defaultLocale"
|
|
14794
|
-
});
|
|
14795
|
-
templateHeroSchema2 = external_exports.object({
|
|
14796
|
-
filename: external_exports.string().min(1).max(200).regex(/\.(png|jpe?g|webp|gif)$/i, "hero must be a raster image (png/jpg/webp/gif)"),
|
|
14797
|
-
dataBase64: external_exports.string().min(1).max(8e6)
|
|
14798
|
-
});
|
|
14799
|
-
templatePushLocaleSchema2 = external_exports.object({
|
|
14800
|
-
wayai: templateTextSchema2.optional(),
|
|
14801
|
-
readmeMarkdown: external_exports.string().default(""),
|
|
14802
|
-
wayaiFiles: templateFileMapSchema2.optional()
|
|
14803
|
-
});
|
|
14804
|
-
templatePushBody2 = external_exports.object({
|
|
14805
|
-
slug: templateSlugSchema2,
|
|
14806
|
-
defaultLocale: templateLocaleSchema2,
|
|
14807
|
-
common: external_exports.object({
|
|
14808
|
-
category: external_exports.string().min(1).max(60),
|
|
14809
|
-
tags: templateTagsSchema2,
|
|
14810
|
-
status: templateStatusSchema2,
|
|
14811
|
-
order: external_exports.number().int().min(0).max(1e5).default(0),
|
|
14812
|
-
// The WayAI install command (a WayAI template always has a wayai side). Kept
|
|
14813
|
-
// optional on the wire so a malformed manifest 400s on the field, not the body.
|
|
14814
|
-
installCommand: external_exports.string().min(1).max(300).optional(),
|
|
14815
|
-
hero: templateHeroSchema2.optional(),
|
|
14816
|
-
// The channel→backend edge (gh #2955), locale-agnostic.
|
|
14817
|
-
uses: templateUsesSchema2
|
|
14818
|
-
}),
|
|
14819
|
-
locales: external_exports.record(templateLocaleSchema2, templatePushLocaleSchema2)
|
|
14820
|
-
}).refine((b) => Boolean(b.locales[b.defaultLocale]), {
|
|
14821
|
-
message: "`locales` must include the defaultLocale"
|
|
14822
|
-
});
|
|
14823
|
-
templateListQuery2 = external_exports.object({ locale: templateLocaleSchema2.optional() });
|
|
14824
|
-
templateSlugParam2 = external_exports.object({ slug: templateSlugSchema2 });
|
|
14825
|
-
templateDetailQuery2 = external_exports.object({ locale: templateLocaleSchema2.optional() });
|
|
14826
15042
|
ADMIN_SKILL_NAME_REGEX2 = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
14827
15043
|
adminSkillNameParam2 = external_exports.object({
|
|
14828
15044
|
name: external_exports.string().regex(ADMIN_SKILL_NAME_REGEX2, "invalid skill name")
|
|
@@ -17941,6 +18157,8 @@ async function conversationsCommand(args2) {
|
|
|
17941
18157
|
}
|
|
17942
18158
|
console.log("");
|
|
17943
18159
|
}
|
|
18160
|
+
console.log("Diagnosing agent behavior? The transcript shows what was sent \u2014 not what the model received.");
|
|
18161
|
+
console.log(`Drill in: wayai conversations ${conversationId} observability (per-turn resolved prompt, tool calls, latency)`);
|
|
17944
18162
|
} else if (hasAnalyticsFlags) {
|
|
17945
18163
|
if (status) {
|
|
17946
18164
|
console.error("The --status flag is not supported with --period/--from/--to. Without these flags, --status works as before.");
|