@wayai/cli 0.3.188 → 0.3.190

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -9380,7 +9380,7 @@ var init_chunk_XJDAH2N7 = __esm({
9380
9380
  }
9381
9381
  });
9382
9382
 
9383
- // ../../packages/core/dist/chunk-GXBBQMYP.js
9383
+ // ../../packages/core/dist/chunk-3LINNTBI.js
9384
9384
  function refineLaneReferences(val, ctx) {
9385
9385
  const lanes = val.lanes;
9386
9386
  const statuses = val.kanban_statuses;
@@ -9416,9 +9416,9 @@ function refineScopedTarget(data, ctx) {
9416
9416
  }
9417
9417
  }
9418
9418
  }
9419
- var primaryRegionSchema, placementSourceSchema, orgIdParam, orgAdminIdParam, createOrganizationBody, updateOrganizationBody, addOrgAdminBody, hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, previewLabelField, createHubBody, updateHubBody, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam, connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, PRODUCTION_DIRECT_FIELDS, setProductionCredentialBody, registerWhatsappQuery, registerWhatsappBody, retryProvisioningQuery, resendDomainStatusQuery, initialValueCreateSchema, initialValueUpdateSchema, stateIdParam, listStatesQuery, stateNameSchema, createStateBody, updateStateBody, reorderStatesBody, variantAiModeSchema, experimentStatusSchema, overlayUpdateSchema, experimentIdParam, variantIdParam, listExperimentsQuery, listVariantsQuery, listOverridesQuery, deleteOverrideQuery, createExperimentBody, updateExperimentBody, setExperimentStatusBody, createVariantBody, updateVariantBody, upsertOverrideBody, orgTagIdParam, listOrgTagsQuery, ORG_TAG_NAME_REGEX, ORG_TAG_NAME_MAX_LENGTH, createOrgTagBody, updateOrgTagBody, orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody, BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery, orgResourceIdParam, orgResourceFileIdParam, orgResourceFolderIdParam, hubOrgResourceParam, listOrgResourcesQuery, orgIdQuery, createOrgResourceBody, updateOrgResourceBody, createOrgResourceFolderBody, updateOrgResourceFolderBody, uploadOrgResourceFileBody, updateOrgResourceFileBody, uploadOrgSkillZipBody, linkOrgResourceBody, resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery, navItemSchema, hubCountResetBody, navItemCountResetBody, typingBody, analyticsHubIdParam, analyticsVariableIdParam, updateVariablePinBody, updateAnalyticsViewBody, NUMERIC_FILTER_OPS, TEXT_FILTER_OPS, CATEGORICAL_FILTER_OPS, VARIABLE_FILTER_OPS, STRUCTURED_QUERY_OPS, STRUCTURED_QUERY_AGGREGATIONS, filterValueSchema, conversationsBody, analyticsConversationIdParam, messagesQuery, conversationDetailDataQuery, analyticsDataBody, structuredQueryBody, analyticsSqlBody, analyticsSqlTable, analyticsSqlSchemaQuery, getConversationsQuery, getMessagesQuery, appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse, CALL_STATUSES, callStatus, CALL_END_REASONS, callEndReason, CALL_TRANSPORTS, callTransport, CALL_PARTICIPANT_TYPES, callParticipantType, callInstant, MAX_SDP_OFFER_LENGTH, sdpDescription, sdpOffer, MAX_CALL_REQUEST_BODY_BYTES, hubScoped, callSummaryFields, callSummary, callIdParam, createCallBody, createCallResponse, callReadyBody, callHangupBody, callStatusQuery, MAX_REPORTED_DELEGATION_IDS, callDelegationId, callDelegationsBody, callResponse, MAX_CALL_RECORDING_GAPS, callRecordingGap, callRecordingNoteMetadata, evalCallInstant, EVAL_CALL_MIN_SECONDS, EVAL_CALL_MAX_SECONDS, EVAL_CALL_SPOKEN_LINE_MAX_CHARS, hubScoped2, createEvalCallBody, createEvalCallResponse, evalCallConversationQuery, evalCallRecordQuery, evalCallSpeaker, evalCallUtterance, evalCallTurn, evalCallRecording, evalCallRecordResponse, evalCallFinishResponse, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, recordAiDisclosureAcceptanceBody, activityQuery, deletionModeSchema, deletionRequestBody, CACHE_RECONCILE_MAX_IDS, CACHE_RECONCILE_MAX_HUBS, cacheReconcileScopeSchema, cachedConversationPageSchema, cachedHistoryThreadSchema, cachedPeopleThreadSchema, cacheReconcileBody, archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams, conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody, copilotSuggestBody, copilotSuggestResponse, CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS, billingOrgIdParam, subscriptionItemParams, spendCapBody, growthPacksBody, portalSessionBody, checkoutSessionBody, updateBillingCurrencyBody, invoicesQuery, planKeySchema, billingStatusSchema, billingPlanTypeSchema, dataUsageCountersSchema, REKOR_ENTITLEMENT_CONTRACT_VERSION, entitlementProjectionSchema, rekorEntitlementRefreshMessageSchema, downloadBody, uploadQuery, SIGN_URL_MAX_EXPIRES_IN_SECONDS, 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, VERSION_PART, MOBILE_APP_VERSION_RE, mobileAppVersionSchema, MOBILE_PLATFORMS, mobilePlatformSchema, mobileVersionPolicyQuery, mobileVersionPolicySchema, mobileVersionPolicyResponse, adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, PRICING_PLAN_ID_RE, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, MAX_VOICE_CALL_MINUTE_OPS, voiceCallMinuteOps, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetShape, adminScopedTargetBody, BRANCHING_ORPHAN_ENTITY_TYPES, BRANCHING_ORPHAN_MAX_TARGETS, adminRepairBranchingOrphansBody, adminRepairLegacyOrgGrantsBody, adminRepairCompedPlansBody, deletionResidueDoClass, deletionResidueOutcome, MAX_DELETION_RESIDUE_SWEEP_PAGE, adminDeletionResidueSweepBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysBody, dataExplorerKvKeyBody, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteBody, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, dataExplorerDebugDoType, DEBUG_READ_MAX_LIMIT, DEBUG_READ_DEFAULT_LIMIT, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, debugHubConvParam, debugMessageIdQuery, sandboxEgressPolicy, SANDBOX_EXEC_MAX_CMD_LENGTH, SANDBOX_EXEC_MAX_ALLOWLIST, SANDBOX_EXEC_MAX_TIMEOUT_MS, adminSandboxExecBody, META_ENTITY_ID_PATTERN, metaEntityId, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, passwordLoginBody, 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, MAX_NAME_LENGTH, MAX_VALUE_LENGTH, MAX_TAGS, MAX_TAG_LENGTH, MAX_SCOPE_HUBS, MAX_SCOPE_TAGS, vaultSecretScopeSchema, vaultCreateBody, vaultUpdateBody, MAX_NAME_LENGTH2, MAX_HUBS_PER_GRANT, MAX_HUB_TAGS_PER_GRANT, MAX_GRANTS, permissionEnum, grantScopeSchema, grantSchema, createTokenBody, tokenOrgIdParam, invitePreviewQuery, inviteRolePreviewResponse, inviteContactPreviewResponse, invitePreviewResponse, inviteUnsubscribeBody, jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse, hubAlertsParam, hubAlertSeverity, hubAlert, hubAlertsListResponse, noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema, ADMIN_SKILL_NAME_REGEX, adminSkillNameParam, REKOR_ACTOR_TYPE_HEADER, REKOR_ACTOR_ID_HEADER, REKOR_ACTOR_LABEL_HEADER, REKOR_ACTOR_ORG_HEADER, REKOR_ACTOR_ADMIN_HEADER, REKOR_CLIENT_HEADER, REKOR_TOOL_ID_HEADER, REKOR_CLIENTS, rekorClientSchema, MAX_REKOR_TOOL_ID_LENGTH, rekorToolIdSchema, DATA_PROXY_MOUNT, DATA_PROXY_PREFIX, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, BASE_DESTRUCTION_MOUNT, BASE_DESTRUCTION_PREFIX, BASE_DESTRUCTION_CONFIRM_PATH, baseDestructionConfirmBody, BASE_DESTRUCTION_GRACE_MS, BASE_DESTRUCTION_CONFIRM_TTL_MS, BASE_DESTRUCTION_ORG_QUERY_PARAM, baseDestructionQuery, baseDestructionParam, baseDestructionInitiateBody, baseDestructionStatus, baseDestructionRequest, baseDestructionListResponse, baseDestructionInitiateResponse, baseDestructionConfirmResponse, baseDestructionCancelResponse, rekorBaseChangeMessageSchema, PEOPLE_CONTACT_PAGE_MAX, PEOPLE_CONTACT_PAGE_DEFAULT, PEOPLE_CONTACT_EMAIL_MAX_LENGTH, peopleUserIdSchema, peopleInviteEmailSchema, peopleContactInviteBody, peopleContactInviteIdParam, peopleContactUserIdParam, peopleContactBlockBody, peopleContactPageQuery, peopleOutgoingInviteSchema, peopleContactPersonSchema, peopleContactSchema, peopleIncomingInviteSchema, peopleBlockedUserSchema, PEOPLE_THREAD_MESSAGE_MAX_LENGTH, PEOPLE_THREAD_MESSAGES_PAGE_MAX, PEOPLE_THREAD_PAGE_MAX, PEOPLE_THREAD_PAGE_DEFAULT, PEOPLE_GROUP_NAME_MAX_LENGTH, PEOPLE_GROUP_AVATAR_URL_MAX_LENGTH, PEOPLE_THREAD_ATTACHMENT_MAX_BYTES, PEOPLE_THREAD_ATTACHMENT_NAME_MAX_LENGTH, PEOPLE_ATTACHMENT_STORAGE_PER_USER_BYTES, PEOPLE_THREAD_ATTACHMENT_MAX_MB, PEOPLE_THREAD_ATTACHMENT_URL_TTL_SECONDS, PEOPLE_THREAD_ATTACHMENT_URLS_MAX, peopleThreadIdParam, peopleThreadMessageIdParam, peopleThreadListQuery, peopleThreadMessagesQuery, peopleThreadAttachmentUploadSchema, peopleThreadSendBody, peopleThreadAttachmentUrlsBody, peopleThreadReadBody, peopleThreadSettingsBody, peopleGroupNameSchema, peopleGroupAvatarUrlSchema, peopleGroupCreateBody, peopleOrgDirectBody, peopleGroupUpdateBody, peopleGroupInviteBody, peopleOrgErasureBody, peopleGroupLeaveBody, peopleGroupInviteIdParam, peopleGroupIncomingInviteIdParam, peopleGroupMemberParam, peopleThreadKindSchema, peopleThreadMemberSchema, peopleThreadLastMessageSchema, peopleGroupRoleSchema, peopleGroupSummarySchema, peopleThreadSummarySchema, peopleThreadAttachmentSchema, peopleThreadMessageSchema, peopleGroupMemberSchema, peopleGroupSentInviteSchema, peopleGroupIncomingInviteSchema, PEOPLE_REPORT_DETAILS_MAX_LENGTH, peopleReportReasonSchema, reportDetailsSchema, reportFields, peopleReportBody, PEOPLE_MODERATION_NOTE_MAX_LENGTH, ADMIN_PEOPLE_REPORTS_PAGE_MAX, ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT, peopleModerationActionSchema, moderationNoteSchema, adminPeopleReportListQuery, adminPeopleReportIdParam, adminPeopleMessageRemovalBody, adminPeopleSuspendBody, adminPeopleNoteBody;
9420
- var init_chunk_GXBBQMYP = __esm({
9421
- "../../packages/core/dist/chunk-GXBBQMYP.js"() {
9419
+ var primaryRegionSchema, placementSourceSchema, orgIdParam, orgAdminIdParam, createOrganizationBody, updateOrganizationBody, addOrgAdminBody, hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, previewLabelField, createHubBody, updateHubBody, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam, connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, PRODUCTION_DIRECT_FIELDS, setProductionCredentialBody, registerWhatsappQuery, registerWhatsappBody, retryProvisioningQuery, resendDomainStatusQuery, initialValueCreateSchema, initialValueUpdateSchema, stateIdParam, listStatesQuery, stateNameSchema, createStateBody, updateStateBody, reorderStatesBody, variantAiModeSchema, experimentStatusSchema, overlayUpdateSchema, experimentIdParam, variantIdParam, listExperimentsQuery, listVariantsQuery, listOverridesQuery, deleteOverrideQuery, createExperimentBody, updateExperimentBody, setExperimentStatusBody, createVariantBody, updateVariantBody, upsertOverrideBody, orgTagIdParam, listOrgTagsQuery, ORG_TAG_NAME_REGEX, ORG_TAG_NAME_MAX_LENGTH, createOrgTagBody, updateOrgTagBody, orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody, BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery, orgResourceIdParam, orgResourceFileIdParam, orgResourceFolderIdParam, hubOrgResourceParam, listOrgResourcesQuery, orgIdQuery, createOrgResourceBody, updateOrgResourceBody, createOrgResourceFolderBody, updateOrgResourceFolderBody, uploadOrgResourceFileBody, updateOrgResourceFileBody, uploadOrgSkillZipBody, linkOrgResourceBody, resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery, navItemSchema, hubCountResetBody, navItemCountResetBody, typingBody, analyticsHubIdParam, analyticsVariableIdParam, updateVariablePinBody, updateAnalyticsViewBody, NUMERIC_FILTER_OPS, TEXT_FILTER_OPS, CATEGORICAL_FILTER_OPS, VARIABLE_FILTER_OPS, STRUCTURED_QUERY_OPS, STRUCTURED_QUERY_AGGREGATIONS, filterValueSchema, conversationsBody, analyticsConversationIdParam, messagesQuery, conversationDetailDataQuery, analyticsDataBody, structuredQueryBody, analyticsSqlBody, analyticsSqlTable, analyticsSqlSchemaQuery, getConversationsQuery, getMessagesQuery, appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse, CALL_STATUSES, callStatus, CALL_END_REASONS, callEndReason, CALL_TRANSPORTS, callTransport, CALL_PARTICIPANT_TYPES, callParticipantType, callInstant, MAX_SDP_OFFER_LENGTH, sdpDescription, sdpOffer, MAX_CALL_REQUEST_BODY_BYTES, hubScoped, callSummaryFields, callSummary, callIdParam, createCallBody, createCallResponse, callReadyBody, callHangupBody, callStatusQuery, MAX_REPORTED_DELEGATION_IDS, callDelegationId, callDelegationsBody, callResponse, MAX_CALL_RECORDING_GAPS, callRecordingGap, callRecordingNoteMetadata, evalCallInstant, EVAL_CALL_MIN_SECONDS, EVAL_CALL_MAX_SECONDS, EVAL_CALL_SPOKEN_LINE_MAX_CHARS, hubScoped2, createEvalCallBody, createEvalCallResponse, evalCallConversationQuery, evalCallRecordQuery, evalCallSpeaker, evalCallUtterance, evalCallTurn, evalCallRecording, evalCallRecordResponse, evalCallFinishResponse, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, recordAiDisclosureAcceptanceBody, activityQuery, deletionModeSchema, deletionRequestBody, CACHE_RECONCILE_MAX_IDS, CACHE_RECONCILE_MAX_HUBS, cacheReconcileScopeSchema, cachedConversationPageSchema, cachedHistoryThreadSchema, cachedPeopleThreadSchema, cacheReconcileBody, archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams, conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody, copilotSuggestBody, copilotSuggestResponse, CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS, billingOrgIdParam, subscriptionItemParams, spendCapBody, growthPacksBody, portalSessionBody, checkoutSessionBody, updateBillingCurrencyBody, invoicesQuery, planKeySchema, billingStatusSchema, billingPlanTypeSchema, dataUsageCountersSchema, REKOR_ENTITLEMENT_CONTRACT_VERSION, entitlementProjectionSchema, rekorEntitlementRefreshMessageSchema, downloadBody, uploadQuery, SIGN_URL_MAX_EXPIRES_IN_SECONDS, 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, VERSION_PART, MOBILE_APP_VERSION_RE, mobileAppVersionSchema, MOBILE_PLATFORMS, mobilePlatformSchema, mobileVersionPolicyQuery, mobileVersionPolicySchema, mobileVersionPolicyResponse, adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, PRICING_PLAN_ID_RE, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, MAX_VOICE_CALL_MINUTE_OPS, voiceCallMinuteOps, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetShape, adminScopedTargetBody, BRANCHING_ORPHAN_ENTITY_TYPES, BRANCHING_ORPHAN_MAX_TARGETS, adminRepairBranchingOrphansBody, adminRepairLegacyOrgGrantsBody, adminRepairCompedPlansBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysBody, dataExplorerKvKeyBody, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteBody, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, dataExplorerDebugDoType, DEBUG_READ_MAX_LIMIT, DEBUG_READ_DEFAULT_LIMIT, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, debugHubConvParam, debugMessageIdQuery, sandboxEgressPolicy, SANDBOX_EXEC_MAX_CMD_LENGTH, SANDBOX_EXEC_MAX_ALLOWLIST, SANDBOX_EXEC_MAX_TIMEOUT_MS, adminSandboxExecBody, META_ENTITY_ID_PATTERN, metaEntityId, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, passwordLoginBody, 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, MAX_NAME_LENGTH, MAX_VALUE_LENGTH, MAX_TAGS, MAX_TAG_LENGTH, MAX_SCOPE_HUBS, MAX_SCOPE_TAGS, vaultSecretScopeSchema, vaultCreateBody, vaultUpdateBody, MAX_NAME_LENGTH2, MAX_HUBS_PER_GRANT, MAX_HUB_TAGS_PER_GRANT, MAX_GRANTS, permissionEnum, grantScopeSchema, grantSchema, createTokenBody, tokenOrgIdParam, invitePreviewQuery, inviteRolePreviewResponse, inviteContactPreviewResponse, invitePreviewResponse, inviteUnsubscribeBody, jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse, hubAlertsParam, hubAlertSeverity, hubAlert, hubAlertsListResponse, noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema, ADMIN_SKILL_NAME_REGEX, adminSkillNameParam, REKOR_ACTOR_TYPE_HEADER, REKOR_ACTOR_ID_HEADER, REKOR_ACTOR_LABEL_HEADER, REKOR_ACTOR_ORG_HEADER, REKOR_ACTOR_ADMIN_HEADER, REKOR_CLIENT_HEADER, REKOR_TOOL_ID_HEADER, REKOR_CLIENTS, rekorClientSchema, MAX_REKOR_TOOL_ID_LENGTH, rekorToolIdSchema, DATA_PROXY_MOUNT, DATA_PROXY_PREFIX, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, BASE_DESTRUCTION_MOUNT, BASE_DESTRUCTION_PREFIX, BASE_DESTRUCTION_CONFIRM_PATH, baseDestructionConfirmBody, BASE_DESTRUCTION_GRACE_MS, BASE_DESTRUCTION_CONFIRM_TTL_MS, BASE_DESTRUCTION_ORG_QUERY_PARAM, baseDestructionQuery, baseDestructionParam, baseDestructionInitiateBody, baseDestructionStatus, baseDestructionRequest, baseDestructionListResponse, baseDestructionInitiateResponse, baseDestructionConfirmResponse, baseDestructionCancelResponse, rekorBaseChangeMessageSchema, PEOPLE_CONTACT_PAGE_MAX, PEOPLE_CONTACT_PAGE_DEFAULT, PEOPLE_CONTACT_EMAIL_MAX_LENGTH, peopleUserIdSchema, peopleInviteEmailSchema, peopleContactInviteBody, peopleContactInviteIdParam, peopleContactUserIdParam, peopleContactBlockBody, peopleContactPageQuery, peopleOutgoingInviteSchema, peopleContactPersonSchema, peopleContactSchema, peopleIncomingInviteSchema, peopleBlockedUserSchema, PEOPLE_THREAD_MESSAGE_MAX_LENGTH, PEOPLE_THREAD_MESSAGES_PAGE_MAX, PEOPLE_THREAD_PAGE_MAX, PEOPLE_THREAD_PAGE_DEFAULT, PEOPLE_GROUP_NAME_MAX_LENGTH, PEOPLE_GROUP_AVATAR_URL_MAX_LENGTH, PEOPLE_THREAD_ATTACHMENT_MAX_BYTES, PEOPLE_THREAD_ATTACHMENT_NAME_MAX_LENGTH, PEOPLE_ATTACHMENT_STORAGE_PER_USER_BYTES, PEOPLE_THREAD_ATTACHMENT_MAX_MB, PEOPLE_THREAD_ATTACHMENT_URL_TTL_SECONDS, PEOPLE_THREAD_ATTACHMENT_URLS_MAX, peopleThreadIdParam, peopleThreadMessageIdParam, peopleThreadListQuery, peopleThreadMessagesQuery, peopleThreadAttachmentUploadSchema, peopleThreadSendBody, peopleThreadAttachmentUrlsBody, peopleThreadReadBody, peopleThreadSettingsBody, peopleGroupNameSchema, peopleGroupAvatarUrlSchema, peopleGroupCreateBody, peopleOrgDirectBody, peopleGroupUpdateBody, peopleGroupInviteBody, peopleOrgErasureBody, peopleGroupLeaveBody, peopleGroupInviteIdParam, peopleGroupIncomingInviteIdParam, peopleGroupMemberParam, peopleThreadKindSchema, peopleThreadMemberSchema, peopleThreadLastMessageSchema, peopleGroupRoleSchema, peopleGroupSummarySchema, peopleThreadSummarySchema, peopleThreadAttachmentSchema, peopleThreadMessageSchema, peopleGroupMemberSchema, peopleGroupSentInviteSchema, peopleGroupIncomingInviteSchema, PEOPLE_REPORT_DETAILS_MAX_LENGTH, peopleReportReasonSchema, reportDetailsSchema, reportFields, peopleReportBody, PEOPLE_MODERATION_NOTE_MAX_LENGTH, ADMIN_PEOPLE_REPORTS_PAGE_MAX, ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT, peopleModerationActionSchema, moderationNoteSchema, adminPeopleReportListQuery, adminPeopleReportIdParam, adminPeopleMessageRemovalBody, adminPeopleSuspendBody, adminPeopleNoteBody, COMMUNITIES_PER_ORG_MAX, COMMUNITY_NAME_MAX_LENGTH, COMMUNITY_REGISTRY_CLOSED_REASON, communityNameSchema, adminCreateCommunityBody;
9420
+ var init_chunk_3LINNTBI = __esm({
9421
+ "../../packages/core/dist/chunk-3LINNTBI.js"() {
9422
9422
  "use strict";
9423
9423
  init_chunk_FJKE7WIF();
9424
9424
  init_chunk_IYXLMIWU();
@@ -9478,6 +9478,7 @@ var init_chunk_GXBBQMYP = __esm({
9478
9478
  init_zod();
9479
9479
  init_zod();
9480
9480
  init_zod();
9481
+ init_zod();
9481
9482
  primaryRegionSchema = external_exports.enum([
9482
9483
  "wnam",
9483
9484
  "enam",
@@ -11430,6 +11431,12 @@ var init_chunk_GXBBQMYP = __esm({
11430
11431
  * `wayai admin threads enable|disable` flips this.
11431
11432
  */
11432
11433
  threads_enabled: external_exports.number().int().min(0).max(1).optional(),
11434
+ /**
11435
+ * The communities kill switch (gh #4872, Decision 14). 0 = off (the default), 1 = on. The
11436
+ * community member surface is open only while this AND `threads_enabled` are on.
11437
+ * `wayai admin communities enable|disable` flips this.
11438
+ */
11439
+ communities_enabled: external_exports.number().int().min(0).max(1).optional(),
11433
11440
  /**
11434
11441
  * The mobile app version policy (`MOBILE_VERSION_POLICY_COLUMNS`), per platform: an install
11435
11442
  * below the minimum is blocked until it updates from the store; one below the recommended
@@ -11498,24 +11505,6 @@ var init_chunk_GXBBQMYP = __esm({
11498
11505
  org_id: external_exports.string().uuid().optional(),
11499
11506
  dry_run: external_exports.boolean().optional().default(true)
11500
11507
  }).strict();
11501
- deletionResidueDoClass = external_exports.enum(["ConversationDO", "HubDO", "OrgDO", "UserDO"]);
11502
- deletionResidueOutcome = external_exports.enum([
11503
- "absent",
11504
- "finished",
11505
- "finishing",
11506
- "unflagged",
11507
- "wiped_schema_only",
11508
- "live",
11509
- "marker_unreadable",
11510
- "errored"
11511
- ]);
11512
- MAX_DELETION_RESIDUE_SWEEP_PAGE = 100;
11513
- adminDeletionResidueSweepBody = external_exports.object({
11514
- do_class: deletionResidueDoClass,
11515
- cursor: external_exports.string().min(1).max(4096).optional(),
11516
- limit: external_exports.number().int().min(1).max(MAX_DELETION_RESIDUE_SWEEP_PAGE).optional().default(MAX_DELETION_RESIDUE_SWEEP_PAGE),
11517
- dry_run: external_exports.boolean().optional().default(true)
11518
- }).strict();
11519
11508
  updatePricingPlanBody = external_exports.object({
11520
11509
  display_name: external_exports.string().min(1).optional(),
11521
11510
  stripe_product_id: external_exports.string().optional(),
@@ -11600,7 +11589,7 @@ var init_chunk_GXBBQMYP = __esm({
11600
11589
  /** Filter to specific DO types (default: all) */
11601
11590
  do_types: external_exports.array(pitrDoNamespace).optional()
11602
11591
  });
11603
- dataExplorerDebugDoType = external_exports.enum(["hub", "org", "conversation", "user", "platform", "thread"]);
11592
+ dataExplorerDebugDoType = external_exports.enum(["hub", "org", "conversation", "user", "platform", "thread", "community"]);
11604
11593
  DEBUG_READ_MAX_LIMIT = 100;
11605
11594
  DEBUG_READ_DEFAULT_LIMIT = 20;
11606
11595
  DEBUG_DO_HEX_PREFIX = "hex:";
@@ -12344,7 +12333,8 @@ var init_chunk_GXBBQMYP = __esm({
12344
12333
  muted: external_exports.boolean(),
12345
12334
  hidden: external_exports.boolean(),
12346
12335
  writable: external_exports.boolean(),
12347
- group: peopleGroupSummarySchema.nullable().optional()
12336
+ group: peopleGroupSummarySchema.nullable().optional(),
12337
+ version: external_exports.number().int().nonnegative().optional()
12348
12338
  }).strict();
12349
12339
  peopleThreadAttachmentSchema = external_exports.object({
12350
12340
  attachment_id: uuidSchema,
@@ -12407,6 +12397,11 @@ var init_chunk_GXBBQMYP = __esm({
12407
12397
  adminPeopleMessageRemovalBody = external_exports.object({ report_id: uuidSchema, message_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
12408
12398
  adminPeopleSuspendBody = external_exports.object({ report_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
12409
12399
  adminPeopleNoteBody = external_exports.object({ note: moderationNoteSchema }).strict();
12400
+ COMMUNITIES_PER_ORG_MAX = 10;
12401
+ COMMUNITY_NAME_MAX_LENGTH = 100;
12402
+ COMMUNITY_REGISTRY_CLOSED_REASON = "community_registry_closed";
12403
+ communityNameSchema = external_exports.string().trim().min(1).max(COMMUNITY_NAME_MAX_LENGTH);
12404
+ adminCreateCommunityBody = external_exports.object({ org_id: uuidSchema, name: communityNameSchema }).strict();
12410
12405
  }
12411
12406
  });
12412
12407
 
@@ -12509,7 +12504,7 @@ var init_chunk_R5WRRHCL = __esm({
12509
12504
  var init_contracts = __esm({
12510
12505
  "../../packages/core/dist/contracts/index.js"() {
12511
12506
  "use strict";
12512
- init_chunk_GXBBQMYP();
12507
+ init_chunk_3LINNTBI();
12513
12508
  init_chunk_FJKE7WIF();
12514
12509
  init_chunk_IYXLMIWU();
12515
12510
  init_chunk_YX7EL2HJ();
@@ -12676,11 +12671,6 @@ var init_api_client = __esm({
12676
12671
  async adminRepairLegacyOrgGrants(body) {
12677
12672
  return this.request("POST", "/api/admin/organizations/repair-legacy-grants", body);
12678
12673
  }
12679
- // One page of the one-off sweep over a class's deletion markers (gh #4775 T5 PR 6a).
12680
- // Used by `wayai admin deletion-residue sweep` (platform-admin gated).
12681
- async adminDeletionResidueSweep(body) {
12682
- return this.request("POST", "/api/admin/deletion-residue/sweep", body);
12683
- }
12684
12674
  // Read the platform config (platform-admin gated). Used by every `wayai admin <gate>
12685
12675
  // status` — grep `PlatformGate` in `commands/admin.ts` for the gates it serves.
12686
12676
  async adminGetConfig() {
@@ -12692,6 +12682,11 @@ var init_api_client = __esm({
12692
12682
  async adminUpdateConfig(body) {
12693
12683
  return this.request("PATCH", "/api/admin/config", body);
12694
12684
  }
12685
+ // Create an org-owned community (platform-admin gated, gh #4872). Used by
12686
+ // `wayai admin communities create`.
12687
+ async adminCreateCommunity(body) {
12688
+ return this.request("POST", "/api/admin/communities", body);
12689
+ }
12695
12690
  /**
12696
12691
  * Re-discover an MCP connection's tool/resource catalog (refreshes stale
12697
12692
  * input schemas that `push` leaves untouched). `connection` is the display
@@ -13826,7 +13821,7 @@ var ENDPOINT_CONFIGS, WAYAI_WORKSPACE_LAYOUT;
13826
13821
  var init_dist = __esm({
13827
13822
  "../../packages/core/dist/index.js"() {
13828
13823
  "use strict";
13829
- init_chunk_GXBBQMYP();
13824
+ init_chunk_3LINNTBI();
13830
13825
  init_chunk_FJKE7WIF();
13831
13826
  init_chunk_IYXLMIWU();
13832
13827
  init_chunk_YX7EL2HJ();
@@ -27650,20 +27645,6 @@ async function adminCommand(args2) {
27650
27645
  process.exit(1);
27651
27646
  }
27652
27647
  }
27653
- if (group === "deletion-residue") {
27654
- if (!sub) {
27655
- printHelp2();
27656
- process.exit(1);
27657
- }
27658
- switch (sub) {
27659
- case "sweep":
27660
- await runDeletionResidueSweepCommand(flagArgs);
27661
- return;
27662
- default:
27663
- printHelp2();
27664
- process.exit(1);
27665
- }
27666
- }
27667
27648
  if (group === "harness") {
27668
27649
  if (!sub) {
27669
27650
  printHelp2();
@@ -27707,6 +27688,29 @@ async function adminCommand(args2) {
27707
27688
  process.exit(1);
27708
27689
  }
27709
27690
  }
27691
+ if (group === "communities") {
27692
+ if (!sub) {
27693
+ printHelp2();
27694
+ process.exit(1);
27695
+ }
27696
+ switch (sub) {
27697
+ case "enable":
27698
+ await runCommunitiesToggle(true, flagArgs);
27699
+ return;
27700
+ case "disable":
27701
+ await runCommunitiesToggle(false, flagArgs);
27702
+ return;
27703
+ case "status":
27704
+ await runPlatformGateStatus(COMMUNITIES_GATE, flagArgs);
27705
+ return;
27706
+ case "create":
27707
+ await runCommunitiesCreate(flagArgs);
27708
+ return;
27709
+ default:
27710
+ printHelp2();
27711
+ process.exit(1);
27712
+ }
27713
+ }
27710
27714
  if (group === "voice-calls") {
27711
27715
  if (!sub) {
27712
27716
  printHelp2();
@@ -28347,115 +28351,6 @@ async function runRepairLegacyOrgGrants(flagArgs) {
28347
28351
  console.log(`${d.org_id} | ${d.user_email} | ${d.action} | ${d.user_id ?? "-"} | ${d.reason ?? "-"}`);
28348
28352
  }
28349
28353
  }
28350
- async function runDeletionResidueSweepCommand(flagArgs) {
28351
- let doClass;
28352
- let cursor;
28353
- let limit;
28354
- let wake = false;
28355
- let jsonOutput = false;
28356
- for (let i = 0; i < flagArgs.length; i++) {
28357
- const flag = flagArgs[i];
28358
- switch (flag) {
28359
- case "--class": {
28360
- const parsed = deletionResidueDoClass.safeParse(requireFlagValue(flagArgs, ++i, "--class"));
28361
- if (!parsed.success) {
28362
- console.error(`--class must be one of: ${deletionResidueDoClass.options.join(", ")}`);
28363
- process.exit(1);
28364
- }
28365
- doClass = parsed.data;
28366
- break;
28367
- }
28368
- case "--cursor":
28369
- cursor = requireFlagValue(flagArgs, ++i, "--cursor");
28370
- break;
28371
- case "--limit":
28372
- limit = parsePositiveIntFlag("--limit", flagArgs[++i]);
28373
- if (limit > MAX_DELETION_RESIDUE_SWEEP_PAGE) {
28374
- console.error(`--limit must be at most ${MAX_DELETION_RESIDUE_SWEEP_PAGE}.`);
28375
- process.exit(1);
28376
- }
28377
- break;
28378
- // A dry run is the default; the flag only says so.
28379
- case "--dry-run":
28380
- break;
28381
- case "--yes":
28382
- wake = true;
28383
- break;
28384
- case "--json":
28385
- jsonOutput = true;
28386
- break;
28387
- default:
28388
- console.error(`Unknown flag: ${flag}`);
28389
- console.error(`Usage: ${DELETION_RESIDUE_SWEEP_USAGE}`);
28390
- process.exit(1);
28391
- }
28392
- }
28393
- if (!doClass) {
28394
- console.error(`Usage: ${DELETION_RESIDUE_SWEEP_USAGE}`);
28395
- process.exit(1);
28396
- }
28397
- if (wake && flagArgs.includes("--dry-run")) {
28398
- console.error("--dry-run and --yes contradict each other: pass --yes alone to wake the stores.");
28399
- process.exit(1);
28400
- }
28401
- const dryRun = !wake;
28402
- const { config, accessToken } = await requireAuth();
28403
- const client = new ApiClient({ apiUrl: config.api_url, accessToken });
28404
- const progress = (line) => jsonOutput ? console.error(line) : console.log(line);
28405
- const census = {
28406
- do_class: doClass,
28407
- dry_run: dryRun,
28408
- pages: 0,
28409
- markers: 0,
28410
- earliest_marker_expiry: null,
28411
- outcomes: {},
28412
- runtime_tables: {},
28413
- attention: []
28414
- };
28415
- do {
28416
- let page;
28417
- try {
28418
- page = (await client.adminDeletionResidueSweep({ do_class: doClass, cursor, limit, dry_run: dryRun })).data;
28419
- } catch (err) {
28420
- if (cursor) console.error(`Stopped before the page at --cursor ${cursor}; re-run with it to resume.`);
28421
- exitOnApiError(err);
28422
- throw err;
28423
- }
28424
- census.pages += 1;
28425
- census.markers += page.markers;
28426
- if (page.earliest_marker_expiry && (!census.earliest_marker_expiry || page.earliest_marker_expiry < census.earliest_marker_expiry)) {
28427
- census.earliest_marker_expiry = page.earliest_marker_expiry;
28428
- }
28429
- for (const [outcome, count] of Object.entries(page.outcomes)) {
28430
- if (count > 0) census.outcomes[outcome] = (census.outcomes[outcome] ?? 0) + count;
28431
- }
28432
- for (const [table, count] of Object.entries(page.runtime_tables)) {
28433
- census.runtime_tables[table] = (census.runtime_tables[table] ?? 0) + count;
28434
- }
28435
- census.attention.push(...page.attention);
28436
- cursor = page.next_cursor ?? void 0;
28437
- progress(`page ${census.pages}: markers=${page.markers} ${formatCounts(page.outcomes)}` + (cursor ? ` next_cursor=${cursor}` : " (listing complete)"));
28438
- } while (cursor);
28439
- if (jsonOutput) {
28440
- console.log(JSON.stringify(census, null, 2));
28441
- return;
28442
- }
28443
- console.log("");
28444
- console.log(`deletion-residue sweep ${doClass} \u2014 ${dryRun ? "DRY RUN, nothing woken" : "swept"}: markers=${census.markers} ${formatCounts(census.outcomes)}`);
28445
- console.log(`earliest marker expiry: ${census.earliest_marker_expiry ?? "(no markers)"}`);
28446
- if (Object.keys(census.runtime_tables).length > 0) {
28447
- console.log(`absent stores still holding runtime-only tables: ${formatCounts(census.runtime_tables)}`);
28448
- }
28449
- if (census.attention.length > 0) {
28450
- console.log("");
28451
- console.log("needs a look (do_id | outcome | error):");
28452
- for (const a of census.attention) console.log(`${a.do_id} | ${a.outcome} | ${a.error ?? "-"}`);
28453
- }
28454
- }
28455
- function formatCounts(counts) {
28456
- const parts = Object.entries(counts).filter(([, n]) => (n ?? 0) > 0).map(([k, n]) => `${k}=${n}`);
28457
- return parts.length > 0 ? parts.join(" ") : "(none)";
28458
- }
28459
28354
  async function runHarnessMassDestroy(flagArgs) {
28460
28355
  const USAGE2 = "wayai admin harness mass-destroy --all | --org <org_id> | --hub <hub_id> [--dry-run] [--yes] [--json]";
28461
28356
  const { body, targetLabel, dryRun, yes, jsonOutput } = parseScopedTargetFlags(flagArgs, USAGE2);
@@ -28615,6 +28510,77 @@ async function runThreadsToggle(enable, flagArgs) {
28615
28510
  }
28616
28511
  console.log(PLATFORM_CONFIG_PROPAGATION_NOTE);
28617
28512
  }
28513
+ async function runCommunitiesToggle(enable, flagArgs) {
28514
+ await runPlatformGateToggle(COMMUNITIES_GATE, enable, flagArgs);
28515
+ if (enable) {
28516
+ console.log("Members reach their communities while the threads switch (`wayai admin threads status`) is on too.");
28517
+ } else {
28518
+ console.log("No member reaches a community; platform admins still create them.");
28519
+ }
28520
+ console.log(PLATFORM_CONFIG_PROPAGATION_NOTE);
28521
+ }
28522
+ async function runCommunitiesCreate(flagArgs) {
28523
+ const usage3 = "wayai admin communities create --org <org_id> --name <name> [--json]";
28524
+ let orgId;
28525
+ let name;
28526
+ let jsonOutput = false;
28527
+ for (let i = 0; i < flagArgs.length; i++) {
28528
+ const flag = flagArgs[i];
28529
+ if (flag === "--org") {
28530
+ orgId = requireFlagValue(flagArgs, i + 1, "--org");
28531
+ i++;
28532
+ } else if (flag === "--name") {
28533
+ name = requireFlagValue(flagArgs, i + 1, "--name");
28534
+ i++;
28535
+ } else if (flag === "--json") {
28536
+ jsonOutput = true;
28537
+ } else {
28538
+ console.error(`Unknown flag: ${flag}`);
28539
+ console.error(usage3);
28540
+ process.exit(1);
28541
+ }
28542
+ }
28543
+ const parsed = adminCreateCommunityBody.safeParse({ org_id: orgId, name });
28544
+ if (!parsed.success) {
28545
+ console.error(parsed.error.issues.map((issue) => `--${issue.path[0] === "org_id" ? "org" : issue.path[0]}: ${issue.message}`).join("\n"));
28546
+ console.error(usage3);
28547
+ process.exit(1);
28548
+ }
28549
+ const { config, accessToken } = await requireAuth();
28550
+ const client = new ApiClient({ apiUrl: config.api_url, accessToken });
28551
+ let data;
28552
+ try {
28553
+ data = (await client.adminCreateCommunity(parsed.data)).data;
28554
+ } catch (err) {
28555
+ if (err instanceof ApiError && err.status === 404) {
28556
+ console.error(`Organization ${parsed.data.org_id} not found.`);
28557
+ process.exit(1);
28558
+ }
28559
+ if (err instanceof ApiError && err.status === 409) {
28560
+ console.error(conflictReasonOf(err) === COMMUNITY_REGISTRY_CLOSED_REASON ? `A deletion of organization ${parsed.data.org_id} closed it to new communities.` : `The organization already owns ${COMMUNITIES_PER_ORG_MAX} communities, the most it may.`);
28561
+ process.exit(1);
28562
+ }
28563
+ if (err instanceof ApiError && err.status === 503) {
28564
+ console.error("The community was not created in time. Run the command again.");
28565
+ process.exit(1);
28566
+ }
28567
+ exitOnApiError(err);
28568
+ throw err;
28569
+ }
28570
+ if (jsonOutput) {
28571
+ console.log(JSON.stringify(data, null, 2));
28572
+ return;
28573
+ }
28574
+ console.log(`Created community ${data.community_id} \u2014 "${data.name}", owned by ${data.org_name} (${data.org_id}).`);
28575
+ }
28576
+ function conflictReasonOf(err) {
28577
+ try {
28578
+ const reason = JSON.parse(err.body).details?.reason;
28579
+ return typeof reason === "string" ? reason : null;
28580
+ } catch {
28581
+ return null;
28582
+ }
28583
+ }
28618
28584
  function requireFlagValue(flagArgs, index, flag) {
28619
28585
  const v = flagArgs[index];
28620
28586
  if (v === void 0 || v === "" || v.startsWith("--")) {
@@ -29201,9 +29167,6 @@ Usage:
29201
29167
  wayai admin orgs repair-legacy-grants --all | --org <org_id> [--dry-run] [--yes] [--json]
29202
29168
  Repair org-admin roster rows keyed by email with a NULL user_email (pre-#3922 platform-admin adds): grant the real access they never conferred, or drop the phantom seat. Idempotent \u2014 run --dry-run first
29203
29169
 
29204
- ${DELETION_RESIDUE_SWEEP_USAGE}
29205
- Count one class's deletion markers (the default, a dry run), or with --yes wake the store each names and finish each delete cut off partway (gh #4775 T5 PR 6a). Idempotent
29206
-
29207
29170
  wayai admin harness disable Flip the platform harness_enabled flag OFF (break-glass: blocks harness-agent writes and the per-turn kill switch aborts each harness turn on its next invocation)
29208
29171
  wayai admin harness enable Flip the platform harness_enabled flag ON
29209
29172
  wayai admin harness status Print the platform harness_enabled flag
@@ -29220,6 +29183,12 @@ Usage:
29220
29183
  wayai admin threads disable Flip it OFF: every /api/contacts route answers 404
29221
29184
  wayai admin threads status Print the kill switch
29222
29185
 
29186
+ wayai admin communities enable Flip the platform communities_enabled kill switch ON (members reach communities while threads is ON too)
29187
+ wayai admin communities disable Flip it OFF: no member reaches a community
29188
+ wayai admin communities status Print the kill switch
29189
+ wayai admin communities create --org <org_id> --name <name> [--json]
29190
+ Create a community owned by the org (at most ${COMMUNITIES_PER_ORG_MAX} per org); works while the switch is OFF
29191
+
29223
29192
  Sources:
29224
29193
  do Live DO SQLite (existing conversation, hub config, etc.).
29225
29194
  analytics ClickHouse projections (conversation, message, schedule_event).
@@ -29281,17 +29250,6 @@ Sources:
29281
29250
  to a real person and sends no email, so read --dry-run output as the list of
29282
29251
  people about to get access. Idempotent.
29283
29252
 
29284
- deletion-residue
29285
- The one-off sweep over the do_deleted:{class}:{id} markers (gh #4775 T5 PR 6a).
29286
- Before T5, a delete cut off between its marker and its wipe left the deleted
29287
- entity's data behind the marker. Since T5 PR 6b no wake finishes such a
29288
- store: a cold start serves it as live, and only a sweep visit finishes it.
29289
- \`sweep\` walks one class's markers page by page. Without --yes it is a dry
29290
- run: it counts the markers and their earliest expiry and wakes nothing. With
29291
- --yes it wakes the store each names, which finishes such a delete; every other
29292
- store is only reported, so re-running is safe. Each page prints its next
29293
- cursor: an interrupted run resumes with --cursor.
29294
-
29295
29253
  sandbox Run arbitrary code in a fresh E2B sandbox (harness-agents isolation surface).
29296
29254
  \`exec\` provisions a sandbox from a named Sandbox connection, runs one
29297
29255
  command, and destroys it. Egress omitted \u21D2 deny-all (fail-closed); opt up
@@ -29314,12 +29272,17 @@ Sources:
29314
29272
  (\`enable\`/\`disable\`) for contacts, direct messages and groups between
29315
29273
  people. Off, every /api/contacts route answers 404. Changes land within
29316
29274
  about 60 s.
29275
+ communities Org-owned communities. \`enable\`/\`disable\` flip the PLATFORM-wide
29276
+ communities_enabled switch, default-deny and nested in threads: members
29277
+ reach a community only while both switches are on. \`create\` makes a
29278
+ community for an org, whichever way the switch is set. Changes to the
29279
+ switch land within about 60 s.
29317
29280
 
29318
29281
  Types (do): ${VALID_TYPES.join(" | ")}
29319
29282
  Tables (analytics): ${VALID_ANALYTICS_TABLES.join(" | ")}
29320
29283
 
29321
29284
  Entity id forms (do):
29322
- <uuid> Domain entity id (hub_id, org_id, conversation_id, user_id, thread_id) \u2014
29285
+ <uuid> Domain entity id (hub_id, org_id, conversation_id, user_id, thread_id, community_id) \u2014
29323
29286
  hashed via idFromName, same path as every other route.
29324
29287
  hex:<64-hex> Raw CF DO hex id \u2014 resolved via idFromString. Use when you
29325
29288
  only have the CF-level id (e.g. from orphan-audit logs, CF
@@ -29341,8 +29304,6 @@ Examples:
29341
29304
  wayai admin hubs repair-branching-orphans --hub <prod-hub-id> --id connection:<id> --dry-run
29342
29305
  wayai admin orgs repair-legacy-grants --all --dry-run
29343
29306
  wayai admin orgs repair-legacy-grants --org <org-id> --yes
29344
- wayai admin deletion-residue sweep --class UserDO --dry-run
29345
- wayai admin deletion-residue sweep --class UserDO --yes
29346
29307
  wayai admin harness disable
29347
29308
  wayai admin harness mass-destroy --all --dry-run
29348
29309
  wayai admin harness mass-destroy --hub <hub-id> --yes
@@ -29354,7 +29315,7 @@ Audit + rate limit:
29354
29315
  across all sources. Platform-admin grant required.
29355
29316
  `.trim());
29356
29317
  }
29357
- var VALID_TYPES, VALID_ANALYTICS_TABLES, DELETION_RESIDUE_SWEEP_USAGE, HARNESS_GATE, VOICE_CALLS_GATE, THREADS_GATE, PLATFORM_CONFIG_PROPAGATION_NOTE, VALID_NOTICE_SEVERITIES;
29318
+ var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, VOICE_CALLS_GATE, THREADS_GATE, COMMUNITIES_GATE, PLATFORM_CONFIG_PROPAGATION_NOTE, VALID_NOTICE_SEVERITIES;
29358
29319
  var init_admin = __esm({
29359
29320
  "src/commands/admin.ts"() {
29360
29321
  "use strict";
@@ -29369,7 +29330,6 @@ var init_admin = __esm({
29369
29330
  init_contracts();
29370
29331
  VALID_TYPES = dataExplorerDebugDoType.options;
29371
29332
  VALID_ANALYTICS_TABLES = dataExplorerDebugAnalyticsTable.options;
29372
- DELETION_RESIDUE_SWEEP_USAGE = `wayai admin deletion-residue sweep --class <${deletionResidueDoClass.options.join("|")}> [--yes] [--limit <n>] [--cursor <cursor>] [--json]`;
29373
29333
  HARNESS_GATE = {
29374
29334
  group: "harness",
29375
29335
  key: "harness_enabled",
@@ -29388,6 +29348,12 @@ var init_admin = __esm({
29388
29348
  label: "threads kill switch",
29389
29349
  displayName: "Threads"
29390
29350
  };
29351
+ COMMUNITIES_GATE = {
29352
+ group: "communities",
29353
+ key: "communities_enabled",
29354
+ label: "communities kill switch",
29355
+ displayName: "Communities"
29356
+ };
29391
29357
  PLATFORM_CONFIG_PROPAGATION_NOTE = "Takes effect within about 60 s (the platform-config cache is dropped; KV deletes propagate eventually).";
29392
29358
  VALID_NOTICE_SEVERITIES = ["critical", "warn", "info"];
29393
29359
  }