@wayai/cli 0.3.83 → 0.3.85
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 +215 -36
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -332,6 +332,38 @@ var init_api_client = __esm({
|
|
|
332
332
|
async adminUpdateConfig(body) {
|
|
333
333
|
return this.request("PATCH", "/api/admin/config", body);
|
|
334
334
|
}
|
|
335
|
+
// Flip the ORG-layer harness rollout gate (platform-admin gated — harness-agents
|
|
336
|
+
// PR 2.9a-2 staged rollout). Used by `wayai admin harness enable|disable --org <id>`.
|
|
337
|
+
async adminSetOrgHarness(orgId, enabled) {
|
|
338
|
+
return this.request(
|
|
339
|
+
"PATCH",
|
|
340
|
+
`/api/admin/organizations/${encodeURIComponent(orgId)}/harness`,
|
|
341
|
+
{ harness_enabled: enabled }
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
// Read the ORG-layer harness rollout gate. Used by `wayai admin harness status --org <id>`.
|
|
345
|
+
async adminGetOrgHarness(orgId) {
|
|
346
|
+
return this.request(
|
|
347
|
+
"GET",
|
|
348
|
+
`/api/admin/organizations/${encodeURIComponent(orgId)}/harness`
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
// Flip the HUB-layer harness rollout gate (platform-admin gated — harness-agents
|
|
352
|
+
// PR 2.9a-2 staged rollout). Used by `wayai admin harness enable|disable --hub <id>`.
|
|
353
|
+
async adminSetHubHarness(hubId, enabled) {
|
|
354
|
+
return this.request(
|
|
355
|
+
"PATCH",
|
|
356
|
+
`/api/admin/hubs/${encodeURIComponent(hubId)}/harness`,
|
|
357
|
+
{ harness_enabled: enabled }
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
// Read the HUB-layer harness rollout gate. Used by `wayai admin harness status --hub <id>`.
|
|
361
|
+
async adminGetHubHarness(hubId) {
|
|
362
|
+
return this.request(
|
|
363
|
+
"GET",
|
|
364
|
+
`/api/admin/hubs/${encodeURIComponent(hubId)}/harness`
|
|
365
|
+
);
|
|
366
|
+
}
|
|
335
367
|
/**
|
|
336
368
|
* Re-discover an MCP connection's tool/resource catalog (refreshes stale
|
|
337
369
|
* input schemas that `push` leaves untouched). `connection` is the display
|
|
@@ -724,6 +756,35 @@ var init_api_client = __esm({
|
|
|
724
756
|
`/api/admin/data-explorer/debug/archive/${encodeURIComponent(hubId)}/conversations/${encodeURIComponent(conversationId)}${qs}`
|
|
725
757
|
);
|
|
726
758
|
}
|
|
759
|
+
/**
|
|
760
|
+
* Download the harness sandbox FILESYSTEM archive (harness-agents PR 2.12) as
|
|
761
|
+
* raw zip bytes. Distinct from the JSON `request<T>` path — the response is a
|
|
762
|
+
* binary `application/zip`, so this reads `arrayBuffer()`. Single-refresh-on-401
|
|
763
|
+
* like `request`, but no transient-retry loop (a large binary GET is idempotent
|
|
764
|
+
* but not worth re-streaming on a cold-start body probe). 404 ⇒ ApiError (no
|
|
765
|
+
* sandbox for this conversation, or the blob was purged).
|
|
766
|
+
*/
|
|
767
|
+
async downloadArchiveSandboxFs(hubId, conversationId) {
|
|
768
|
+
const path25 = `/api/archive/${encodeURIComponent(hubId)}/conversations/${encodeURIComponent(conversationId)}/sandbox`;
|
|
769
|
+
addApiBreadcrumb("GET", path25);
|
|
770
|
+
const url = `${this.apiUrl}${path25}`;
|
|
771
|
+
let response = await this.send(url, "GET");
|
|
772
|
+
if (response.status === 401 && this.onUnauthorized) {
|
|
773
|
+
let refreshed;
|
|
774
|
+
try {
|
|
775
|
+
refreshed = await this.onUnauthorized();
|
|
776
|
+
} catch {
|
|
777
|
+
}
|
|
778
|
+
if (refreshed) {
|
|
779
|
+
this.accessToken = refreshed;
|
|
780
|
+
response = await this.send(url, "GET");
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
if (!response.ok) {
|
|
784
|
+
throw new ApiError("GET", path25, response.status, await response.text());
|
|
785
|
+
}
|
|
786
|
+
return new Uint8Array(await response.arrayBuffer());
|
|
787
|
+
}
|
|
727
788
|
/** List per-message observability metadata summaries for a conversation (hub-scoped auth). */
|
|
728
789
|
async listConversationObservability(conversationId) {
|
|
729
790
|
return this.request(
|
|
@@ -5332,7 +5393,7 @@ function findStepBoundaries(transcript) {
|
|
|
5332
5393
|
}
|
|
5333
5394
|
return out;
|
|
5334
5395
|
}
|
|
5335
|
-
var APP_ERROR_BRAND, AppError, LLM_RATE_LIMIT_BRAND, LlmRateLimitError, LLM_PROVIDER_HTTP_BRAND, LlmProviderHttpError, 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, 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, previewLabelField, createHubBody, updateHubBody, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, 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, createEvalBody, updateEvalBody, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, sessionConfigSchema, createSessionBody, getSessionsQuery, getSessionResultsQuery, getSessionRunsQuery, evalAnalyticsQuery, getSessionCostQuery, compareSessionsQuery, evalsSqlBody, evalsSqlSchemaQuery, exportResultsQuery, validateEvalBody, hubAgentsQuery, createScenarioSetBody, updateScenarioSetBody, scenarioSetsHubQuery, createScenarioFromConversationBody, createJourneyFromConversationBody, journeyIdParam, journeyToolCallSchema, journeyTurnSchema, journeyStepOverrideSchema, createJourneyBody, updateJourneyBody, getConversationsQuery, getMessagesQuery, 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, completionsBody, 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, uuidPattern, ciUuidSchema, 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, adminHarnessMassDestroyBody, 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, sentryRefStatusSchema, createReportBody, editReportBody, 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, MAX_RESOURCE_FILE_SIZE;
|
|
5396
|
+
var APP_ERROR_BRAND, AppError, LLM_RATE_LIMIT_BRAND, LlmRateLimitError, LLM_PROVIDER_HTTP_BRAND, LlmProviderHttpError, 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, 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, previewLabelField, createHubBody, updateHubBody, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, 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, createEvalBody, updateEvalBody, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, sessionConfigSchema, createSessionBody, getSessionsQuery, getSessionResultsQuery, getSessionRunsQuery, evalAnalyticsQuery, getSessionCostQuery, compareSessionsQuery, evalsSqlBody, evalsSqlSchemaQuery, exportResultsQuery, validateEvalBody, hubAgentsQuery, createScenarioSetBody, updateScenarioSetBody, scenarioSetsHubQuery, createScenarioFromConversationBody, createJourneyFromConversationBody, journeyIdParam, journeyToolCallSchema, journeyTurnSchema, journeyStepOverrideSchema, createJourneyBody, updateJourneyBody, getConversationsQuery, getMessagesQuery, 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, completionsBody, 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, uuidPattern, ciUuidSchema, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, adminPlanIdParam, adminHubIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, updatePlatformConfigBody, updateFreeOrgLimitBody, adminSetOrgHarnessBody, adminSetHubHarnessBody, adminHarnessMassDestroyBody, 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, sentryRefStatusSchema, createReportBody, editReportBody, 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, MAX_RESOURCE_FILE_SIZE;
|
|
5336
5397
|
var init_dist = __esm({
|
|
5337
5398
|
"../../packages/core/dist/index.js"() {
|
|
5338
5399
|
"use strict";
|
|
@@ -5848,7 +5909,11 @@ var init_dist = __esm({
|
|
|
5848
5909
|
// so `language`/`access_approval_role` can't reach the DB with an invalid value.
|
|
5849
5910
|
language: external_exports.enum(["en", "pt", "es"]).optional(),
|
|
5850
5911
|
access_request_message: external_exports.string().max(1e3).nullable().optional(),
|
|
5851
|
-
access_approval_role: external_exports.enum(["admin", "team"]).optional()
|
|
5912
|
+
access_approval_role: external_exports.enum(["admin", "team"]).optional(),
|
|
5913
|
+
// Native-completion fallback connection for a degraded harness turn (PR 2.10b).
|
|
5914
|
+
// A NATIVE LLM connection id on this hub; validated at fallback time in the turn
|
|
5915
|
+
// seam (a stale/missing id simply no-ops the fallback). Nullable to clear it.
|
|
5916
|
+
fallback_connection_id: uuidSchema.nullable().optional()
|
|
5852
5917
|
}).passthrough().superRefine(refineLaneReferences);
|
|
5853
5918
|
addHubAdminBody = external_exports.object({
|
|
5854
5919
|
user_email: external_exports.string().email("valid email is required")
|
|
@@ -7199,6 +7264,9 @@ var init_dist = __esm({
|
|
|
7199
7264
|
adminPlanIdParam = external_exports.object({
|
|
7200
7265
|
planId: uuidSchema
|
|
7201
7266
|
});
|
|
7267
|
+
adminHubIdParam = external_exports.object({
|
|
7268
|
+
hubId: uuidSchema
|
|
7269
|
+
});
|
|
7202
7270
|
adminOrganizationsQuery = external_exports.object({
|
|
7203
7271
|
page: external_exports.coerce.number().int().min(1).default(1),
|
|
7204
7272
|
limit: external_exports.coerce.number().int().min(1).max(100).default(20),
|
|
@@ -7239,6 +7307,12 @@ var init_dist = __esm({
|
|
|
7239
7307
|
updateFreeOrgLimitBody = external_exports.object({
|
|
7240
7308
|
max_free_orgs_override: external_exports.number().int().min(0).nullable()
|
|
7241
7309
|
});
|
|
7310
|
+
adminSetOrgHarnessBody = external_exports.object({
|
|
7311
|
+
harness_enabled: external_exports.number().int().min(0).max(1)
|
|
7312
|
+
}).strict();
|
|
7313
|
+
adminSetHubHarnessBody = external_exports.object({
|
|
7314
|
+
harness_enabled: external_exports.number().int().min(0).max(1)
|
|
7315
|
+
}).strict();
|
|
7242
7316
|
adminHarnessMassDestroyBody = external_exports.object({
|
|
7243
7317
|
scope: external_exports.enum(["all", "org", "hub"]),
|
|
7244
7318
|
org_id: external_exports.string().uuid().optional(),
|
|
@@ -12015,7 +12089,7 @@ function isSanitizableSliceFile(path25) {
|
|
|
12015
12089
|
function distinctUsesBackends(uses) {
|
|
12016
12090
|
return [...new Set((uses ?? []).map((u) => u.backend))];
|
|
12017
12091
|
}
|
|
12018
|
-
var uuidSchema2, paginationSchema3, timestampSchema2, idParamSchema2, 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, previewLabelField2, createHubBody2, updateHubBody2, addHubAdminBody2, addHubIdentityAuthorizationBody2, contactDecisionBody2, approveContactBody2, listContactAccessQuery2, createHubTeamBody2, updateHubTeamBody2, addHubTeamUserBody2, reassignHubUserBody2, replicatePreviewBody2, 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, createEvalBody2, updateEvalBody2, getEvalsQuery2, toggleEvalBody2, bulkToggleEvalsBody2, pacingConfigSchema2, sessionConfigSchema2, createSessionBody2, getSessionsQuery2, getSessionResultsQuery2, getSessionRunsQuery2, evalAnalyticsQuery2, getSessionCostQuery2, compareSessionsQuery2, evalsSqlBody2, evalsSqlSchemaQuery2, exportResultsQuery2, validateEvalBody2, hubAgentsQuery2, createScenarioSetBody2, updateScenarioSetBody2, scenarioSetsHubQuery2, createScenarioFromConversationBody2, createJourneyFromConversationBody2, journeyIdParam2, journeyToolCallSchema2, journeyTurnSchema2, journeyStepOverrideSchema2, createJourneyBody2, updateJourneyBody2, getConversationsQuery2, getMessagesQuery2, 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, completionsBody2, 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, uuidPattern2, ciUuidSchema2, 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, adminHarnessMassDestroyBody2, 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, sentryRefStatusSchema2, createReportBody2, editReportBody2, 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;
|
|
12092
|
+
var uuidSchema2, paginationSchema3, timestampSchema2, idParamSchema2, 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, previewLabelField2, createHubBody2, updateHubBody2, addHubAdminBody2, addHubIdentityAuthorizationBody2, contactDecisionBody2, approveContactBody2, listContactAccessQuery2, createHubTeamBody2, updateHubTeamBody2, addHubTeamUserBody2, reassignHubUserBody2, replicatePreviewBody2, 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, createEvalBody2, updateEvalBody2, getEvalsQuery2, toggleEvalBody2, bulkToggleEvalsBody2, pacingConfigSchema2, sessionConfigSchema2, createSessionBody2, getSessionsQuery2, getSessionResultsQuery2, getSessionRunsQuery2, evalAnalyticsQuery2, getSessionCostQuery2, compareSessionsQuery2, evalsSqlBody2, evalsSqlSchemaQuery2, exportResultsQuery2, validateEvalBody2, hubAgentsQuery2, createScenarioSetBody2, updateScenarioSetBody2, scenarioSetsHubQuery2, createScenarioFromConversationBody2, createJourneyFromConversationBody2, journeyIdParam2, journeyToolCallSchema2, journeyTurnSchema2, journeyStepOverrideSchema2, createJourneyBody2, updateJourneyBody2, getConversationsQuery2, getMessagesQuery2, 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, completionsBody2, 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, uuidPattern2, ciUuidSchema2, hubAsCodeConfigSchema2, ciPullHubIdParam2, ciBranchParam2, ciPullQuery2, ciHubsQuery2, ciLookupQuery2, ciBranchesQuery2, ciSyncBody2, ciPushBody2, ciDiffBody2, ciPublishBody2, ciPublishPreviewBody2, ciSyncMcpBody2, ciOrgResourcesParam2, orgResourcesConfigSchema2, ciOrgResourcesPushBody2, ciOrgResourcesDiffBody2, adminOrgIdParam2, adminOrgAdminIdParam2, adminUserIdParam2, adminPlanIdParam2, adminHubIdParam2, adminOrganizationsQuery2, adminUserSearchQuery2, kanbanSlugMigrationQuery2, adjustQuotaBody2, updatePlanBody2, addAdminUserBody2, updatePlatformConfigBody2, updateFreeOrgLimitBody2, adminSetOrgHarnessBody2, adminSetHubHarnessBody2, adminHarnessMassDestroyBody2, 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, sentryRefStatusSchema2, createReportBody2, editReportBody2, 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;
|
|
12019
12093
|
var init_contracts = __esm({
|
|
12020
12094
|
"../../packages/core/dist/contracts/index.js"() {
|
|
12021
12095
|
"use strict";
|
|
@@ -12447,7 +12521,11 @@ var init_contracts = __esm({
|
|
|
12447
12521
|
// so `language`/`access_approval_role` can't reach the DB with an invalid value.
|
|
12448
12522
|
language: external_exports.enum(["en", "pt", "es"]).optional(),
|
|
12449
12523
|
access_request_message: external_exports.string().max(1e3).nullable().optional(),
|
|
12450
|
-
access_approval_role: external_exports.enum(["admin", "team"]).optional()
|
|
12524
|
+
access_approval_role: external_exports.enum(["admin", "team"]).optional(),
|
|
12525
|
+
// Native-completion fallback connection for a degraded harness turn (PR 2.10b).
|
|
12526
|
+
// A NATIVE LLM connection id on this hub; validated at fallback time in the turn
|
|
12527
|
+
// seam (a stale/missing id simply no-ops the fallback). Nullable to clear it.
|
|
12528
|
+
fallback_connection_id: uuidSchema2.nullable().optional()
|
|
12451
12529
|
}).passthrough().superRefine(refineLaneReferences2);
|
|
12452
12530
|
addHubAdminBody2 = external_exports.object({
|
|
12453
12531
|
user_email: external_exports.string().email("valid email is required")
|
|
@@ -13798,6 +13876,9 @@ var init_contracts = __esm({
|
|
|
13798
13876
|
adminPlanIdParam2 = external_exports.object({
|
|
13799
13877
|
planId: uuidSchema2
|
|
13800
13878
|
});
|
|
13879
|
+
adminHubIdParam2 = external_exports.object({
|
|
13880
|
+
hubId: uuidSchema2
|
|
13881
|
+
});
|
|
13801
13882
|
adminOrganizationsQuery2 = external_exports.object({
|
|
13802
13883
|
page: external_exports.coerce.number().int().min(1).default(1),
|
|
13803
13884
|
limit: external_exports.coerce.number().int().min(1).max(100).default(20),
|
|
@@ -13838,6 +13919,12 @@ var init_contracts = __esm({
|
|
|
13838
13919
|
updateFreeOrgLimitBody2 = external_exports.object({
|
|
13839
13920
|
max_free_orgs_override: external_exports.number().int().min(0).nullable()
|
|
13840
13921
|
});
|
|
13922
|
+
adminSetOrgHarnessBody2 = external_exports.object({
|
|
13923
|
+
harness_enabled: external_exports.number().int().min(0).max(1)
|
|
13924
|
+
}).strict();
|
|
13925
|
+
adminSetHubHarnessBody2 = external_exports.object({
|
|
13926
|
+
harness_enabled: external_exports.number().int().min(0).max(1)
|
|
13927
|
+
}).strict();
|
|
13841
13928
|
adminHarnessMassDestroyBody2 = external_exports.object({
|
|
13842
13929
|
scope: external_exports.enum(["all", "org", "hub"]),
|
|
13843
13930
|
org_id: external_exports.string().uuid().optional(),
|
|
@@ -18548,13 +18635,13 @@ async function adminCommand(args2) {
|
|
|
18548
18635
|
await runHarnessMassDestroy(flagArgs);
|
|
18549
18636
|
return;
|
|
18550
18637
|
case "disable":
|
|
18551
|
-
await runHarnessToggle(false);
|
|
18638
|
+
await runHarnessToggle(false, flagArgs);
|
|
18552
18639
|
return;
|
|
18553
18640
|
case "enable":
|
|
18554
|
-
await runHarnessToggle(true);
|
|
18641
|
+
await runHarnessToggle(true, flagArgs);
|
|
18555
18642
|
return;
|
|
18556
18643
|
case "status":
|
|
18557
|
-
await runHarnessStatus();
|
|
18644
|
+
await runHarnessStatus(flagArgs);
|
|
18558
18645
|
return;
|
|
18559
18646
|
default:
|
|
18560
18647
|
printHelp2();
|
|
@@ -18661,14 +18748,31 @@ async function runAnalyticsRead(positional, flagArgs) {
|
|
|
18661
18748
|
}
|
|
18662
18749
|
async function runArchiveRead(positional, flagArgs) {
|
|
18663
18750
|
if (positional.length < 2) {
|
|
18664
|
-
console.error("wayai admin archive <hub_id> <conversation_id> [--message-id X] [--json]");
|
|
18751
|
+
console.error("wayai admin archive <hub_id> <conversation_id> [--message-id X] [--sandbox [--out <path>]] [--json]");
|
|
18665
18752
|
process.exit(1);
|
|
18666
18753
|
}
|
|
18667
18754
|
const hubId = positional[0];
|
|
18668
18755
|
const conversationId = positional[1];
|
|
18669
|
-
const flags = parseFlags2(flagArgs, ["--json", "--message-id"]);
|
|
18756
|
+
const flags = parseFlags2(flagArgs, ["--json", "--message-id", "--sandbox", "--out"]);
|
|
18670
18757
|
const { config, accessToken } = await requireAuth();
|
|
18671
18758
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
18759
|
+
if (flags.sandbox) {
|
|
18760
|
+
const outPath = flags.out || `${conversationId}-sandbox.zip`;
|
|
18761
|
+
let zip;
|
|
18762
|
+
try {
|
|
18763
|
+
zip = await client.downloadArchiveSandboxFs(hubId, conversationId);
|
|
18764
|
+
} catch (err) {
|
|
18765
|
+
if (err instanceof ApiError && err.status === 404) {
|
|
18766
|
+
console.error("Sandbox archive not found. This conversation had no harness sandbox, or the R2 blob was purged.");
|
|
18767
|
+
process.exit(1);
|
|
18768
|
+
}
|
|
18769
|
+
exitOnApiError(err);
|
|
18770
|
+
throw err;
|
|
18771
|
+
}
|
|
18772
|
+
fs18.writeFileSync(outPath, zip);
|
|
18773
|
+
console.log(`Wrote ${zip.byteLength} bytes to ${outPath}`);
|
|
18774
|
+
return;
|
|
18775
|
+
}
|
|
18672
18776
|
let response;
|
|
18673
18777
|
try {
|
|
18674
18778
|
response = await client.debugReadArchive(hubId, conversationId, {
|
|
@@ -18757,12 +18861,18 @@ function parseFlags2(flagArgs, allowed) {
|
|
|
18757
18861
|
out.jsonOutput = true;
|
|
18758
18862
|
continue;
|
|
18759
18863
|
}
|
|
18864
|
+
if (arg === "--sandbox") {
|
|
18865
|
+
out.sandbox = true;
|
|
18866
|
+
continue;
|
|
18867
|
+
}
|
|
18760
18868
|
const v = flagArgs[++i];
|
|
18761
18869
|
if (!v) {
|
|
18762
18870
|
console.error(`${arg} requires a value`);
|
|
18763
18871
|
process.exit(1);
|
|
18764
18872
|
}
|
|
18765
|
-
if (arg === "--
|
|
18873
|
+
if (arg === "--out") {
|
|
18874
|
+
out.out = v;
|
|
18875
|
+
} else if (arg === "--limit") {
|
|
18766
18876
|
const n = Number.parseInt(v, 10);
|
|
18767
18877
|
if (!Number.isFinite(n)) {
|
|
18768
18878
|
console.error("--limit must be an integer");
|
|
@@ -19271,40 +19381,101 @@ async function runHarnessMassDestroy(flagArgs) {
|
|
|
19271
19381
|
);
|
|
19272
19382
|
}
|
|
19273
19383
|
}
|
|
19274
|
-
|
|
19384
|
+
function resolveHarnessLayer(flagArgs, usage2) {
|
|
19385
|
+
let orgId;
|
|
19386
|
+
let hubId;
|
|
19387
|
+
for (let i = 0; i < flagArgs.length; i++) {
|
|
19388
|
+
const arg = flagArgs[i];
|
|
19389
|
+
switch (arg) {
|
|
19390
|
+
case "--org":
|
|
19391
|
+
orgId = requireFlagValue(flagArgs, ++i, "--org");
|
|
19392
|
+
break;
|
|
19393
|
+
case "--hub":
|
|
19394
|
+
hubId = requireFlagValue(flagArgs, ++i, "--hub");
|
|
19395
|
+
break;
|
|
19396
|
+
default:
|
|
19397
|
+
console.error(`Unknown flag: ${arg}`);
|
|
19398
|
+
console.error(usage2);
|
|
19399
|
+
process.exit(1);
|
|
19400
|
+
}
|
|
19401
|
+
}
|
|
19402
|
+
if (orgId && hubId) {
|
|
19403
|
+
console.error("Provide at most ONE of --org <org_id> or --hub <hub_id> (or neither for the platform layer).");
|
|
19404
|
+
console.error(usage2);
|
|
19405
|
+
process.exit(1);
|
|
19406
|
+
}
|
|
19407
|
+
if (orgId) return { kind: "org", orgId };
|
|
19408
|
+
if (hubId) return { kind: "hub", hubId };
|
|
19409
|
+
return { kind: "platform" };
|
|
19410
|
+
}
|
|
19411
|
+
async function runHarnessToggle(enable, flagArgs) {
|
|
19412
|
+
const USAGE = "wayai admin harness enable|disable [--org <org_id> | --hub <hub_id>]";
|
|
19413
|
+
const layer = resolveHarnessLayer(flagArgs, USAGE);
|
|
19275
19414
|
const { config, accessToken } = await requireAuth();
|
|
19276
19415
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
19277
|
-
let
|
|
19416
|
+
let value;
|
|
19417
|
+
let scopeLabel;
|
|
19278
19418
|
try {
|
|
19279
|
-
|
|
19419
|
+
if (layer.kind === "org") {
|
|
19420
|
+
const res = await client.adminSetOrgHarness(layer.orgId, enable ? 1 : 0);
|
|
19421
|
+
value = res.data.harness_enabled;
|
|
19422
|
+
scopeLabel = `org ${layer.orgId}`;
|
|
19423
|
+
} else if (layer.kind === "hub") {
|
|
19424
|
+
const res = await client.adminSetHubHarness(layer.hubId, enable ? 1 : 0);
|
|
19425
|
+
value = res.data.harness_enabled;
|
|
19426
|
+
scopeLabel = `hub ${layer.hubId}`;
|
|
19427
|
+
} else {
|
|
19428
|
+
const res = await client.adminUpdateConfig({ harness_enabled: enable ? 1 : 0 });
|
|
19429
|
+
value = res.data.harness_enabled;
|
|
19430
|
+
scopeLabel = "platform";
|
|
19431
|
+
}
|
|
19280
19432
|
} catch (err) {
|
|
19281
19433
|
exitOnApiError(err);
|
|
19282
19434
|
throw err;
|
|
19283
19435
|
}
|
|
19284
|
-
const
|
|
19285
|
-
console.log(
|
|
19286
|
-
|
|
19287
|
-
|
|
19288
|
-
|
|
19289
|
-
|
|
19436
|
+
const state = enable ? "ENABLED" : "DISABLED";
|
|
19437
|
+
console.log(`Harness ${state} for ${scopeLabel} (harness_enabled=${value ?? (enable ? 1 : 0)}).`);
|
|
19438
|
+
if (layer.kind === "platform") {
|
|
19439
|
+
if (enable) {
|
|
19440
|
+
console.log("New harness turns may run again (subject to each hub's + org's own flag).");
|
|
19441
|
+
} else {
|
|
19442
|
+
console.log("The per-turn kill switch now aborts every harness turn on its next invocation.");
|
|
19443
|
+
console.log("Next: run `wayai admin harness mass-destroy --all --dry-run` to see what is still live, then reap it.");
|
|
19444
|
+
}
|
|
19445
|
+
} else {
|
|
19446
|
+
console.log("Reminder: a harness agent is creatable only when the platform, org, AND hub flags are ALL on.");
|
|
19290
19447
|
}
|
|
19291
19448
|
}
|
|
19292
|
-
async function runHarnessStatus() {
|
|
19449
|
+
async function runHarnessStatus(flagArgs) {
|
|
19450
|
+
const USAGE = "wayai admin harness status [--org <org_id> | --hub <hub_id>]";
|
|
19451
|
+
const layer = resolveHarnessLayer(flagArgs, USAGE);
|
|
19293
19452
|
const { config, accessToken } = await requireAuth();
|
|
19294
19453
|
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
19295
|
-
let
|
|
19454
|
+
let value = 0;
|
|
19455
|
+
let scopeLabel;
|
|
19296
19456
|
try {
|
|
19297
|
-
|
|
19457
|
+
if (layer.kind === "org") {
|
|
19458
|
+
const res = await client.adminGetOrgHarness(layer.orgId);
|
|
19459
|
+
value = res.data.harness_enabled;
|
|
19460
|
+
scopeLabel = `org ${layer.orgId}`;
|
|
19461
|
+
} else if (layer.kind === "hub") {
|
|
19462
|
+
const res = await client.adminGetHubHarness(layer.hubId);
|
|
19463
|
+
value = res.data.harness_enabled;
|
|
19464
|
+
scopeLabel = `hub ${layer.hubId}`;
|
|
19465
|
+
} else {
|
|
19466
|
+
const res = await client.adminGetConfig();
|
|
19467
|
+
value = res.data.harness_enabled ?? 0;
|
|
19468
|
+
scopeLabel = "platform";
|
|
19469
|
+
}
|
|
19298
19470
|
} catch (err) {
|
|
19299
19471
|
exitOnApiError(err);
|
|
19300
19472
|
throw err;
|
|
19301
19473
|
}
|
|
19302
|
-
|
|
19303
|
-
console.log(`harness_enabled: ${value} (${value ? "ENABLED" : "DISABLED"})`);
|
|
19474
|
+
console.log(`harness_enabled (${scopeLabel}): ${value} (${value ? "ENABLED" : "DISABLED"})`);
|
|
19304
19475
|
}
|
|
19305
19476
|
function requireFlagValue(flagArgs, index, flag) {
|
|
19306
19477
|
const v = flagArgs[index];
|
|
19307
|
-
if (v === void 0 || v.startsWith("--")) {
|
|
19478
|
+
if (v === void 0 || v === "" || v.startsWith("--")) {
|
|
19308
19479
|
console.error(`${flag} requires a value`);
|
|
19309
19480
|
process.exit(1);
|
|
19310
19481
|
}
|
|
@@ -19702,7 +19873,7 @@ Usage:
|
|
|
19702
19873
|
wayai admin analytics tables
|
|
19703
19874
|
wayai admin analytics read <table> [--conversation-id X] [--hub-id Y] [--message-id Z] [--limit N] [--json]
|
|
19704
19875
|
|
|
19705
|
-
wayai admin archive <hub_id> <conversation_id> [--message-id X] [--json]
|
|
19876
|
+
wayai admin archive <hub_id> <conversation_id> [--message-id X] [--sandbox [--out <path>]] [--json]
|
|
19706
19877
|
|
|
19707
19878
|
wayai admin observability <hub_id> <conversation_id> [--message-id X] [--json]
|
|
19708
19879
|
|
|
@@ -19731,9 +19902,12 @@ Usage:
|
|
|
19731
19902
|
wayai admin sandbox exec [--cmd "<c>" | <c>] --hub <id> --connection <id> [--egress open|allowlist|isolated] [--allow <host> ...] [--timeout <ms>] [--json]
|
|
19732
19903
|
Run one shell command in a fresh E2B sandbox (create \u2192 run \u2192 destroy) to test the sandbox driver + egress gate
|
|
19733
19904
|
|
|
19734
|
-
wayai admin harness disable
|
|
19735
|
-
|
|
19736
|
-
wayai admin harness
|
|
19905
|
+
wayai admin harness disable [--org <org_id> | --hub <hub_id>]
|
|
19906
|
+
Flip harness_enabled OFF. No scope = platform (break-glass: per-turn kill switch aborts each harness turn on its next invocation); --org/--hub target that layer of the three-layer rollout gate
|
|
19907
|
+
wayai admin harness enable [--org <org_id> | --hub <hub_id>]
|
|
19908
|
+
Flip harness_enabled ON. No scope = platform; --org/--hub stage the org/hub layer (a harness agent is creatable only when platform AND org AND hub are ALL on)
|
|
19909
|
+
wayai admin harness status [--org <org_id> | --hub <hub_id>]
|
|
19910
|
+
Print the harness_enabled flag for the chosen layer (platform by default)
|
|
19737
19911
|
wayai admin harness mass-destroy --all | --org <org_id> | --hub <hub_id> [--dry-run] [--yes] [--json]
|
|
19738
19912
|
Reap every live harness sandbox/token/slot in scope (run --dry-run first to see the blast radius)
|
|
19739
19913
|
|
|
@@ -19763,13 +19937,17 @@ Sources:
|
|
|
19763
19937
|
command, and destroys it. Egress omitted \u21D2 deny-all (fail-closed); opt up
|
|
19764
19938
|
with --egress + --allow. The E2B key never leaves the backend. Capped at
|
|
19765
19939
|
20 execs/hour/user (the strictest tier \u2014 this is arbitrary code execution).
|
|
19766
|
-
harness Incident response for harness agents
|
|
19767
|
-
|
|
19768
|
-
|
|
19769
|
-
|
|
19770
|
-
|
|
19771
|
-
|
|
19772
|
-
|
|
19940
|
+
harness Incident response + staged rollout for harness agents. \`disable\`/\`enable\`
|
|
19941
|
+
flip the harness_enabled flag; \`status\` prints it. With no scope they
|
|
19942
|
+
target the PLATFORM flag (disable = break-glass: the per-turn kill switch
|
|
19943
|
+
then aborts each harness turn on its next invocation). With --org <id> or
|
|
19944
|
+
--hub <id> they target that layer of the three-layer rollout gate (PR
|
|
19945
|
+
2.9a-2): a harness agent is creatable only when platform AND org AND hub
|
|
19946
|
+
are ALL on \u2014 flip platform on, then enable per org/hub to stage. The
|
|
19947
|
+
per-turn kill switch stays platform-only. \`mass-destroy\` reaps every
|
|
19948
|
+
harness sandbox/token/slot that is live NOW (scope: --hub < --org < --all,
|
|
19949
|
+
prefer the narrowest). Run \`mass-destroy --dry-run\` first to see the blast
|
|
19950
|
+
radius. See docs/runbooks/harness-incident-response.md.
|
|
19773
19951
|
|
|
19774
19952
|
Types (do): ${VALID_TYPES.join(" | ")}
|
|
19775
19953
|
Tables (analytics): ${VALID_ANALYTICS_TABLES.join(" | ")}
|
|
@@ -19789,6 +19967,7 @@ Examples:
|
|
|
19789
19967
|
wayai admin analytics read conversation --conversation-id <conv-id>
|
|
19790
19968
|
wayai admin archive <hub-id> <conv-id>
|
|
19791
19969
|
wayai admin archive <hub-id> <conv-id> --message-id <msg-id> --json
|
|
19970
|
+
wayai admin archive <hub-id> <conv-id> --sandbox --out session.zip
|
|
19792
19971
|
wayai admin observability <hub-id> <conv-id>
|
|
19793
19972
|
wayai admin observability <hub-id> <conv-id> --message-id <msg-id> --json
|
|
19794
19973
|
wayai admin sandbox exec "echo hi" --hub <hub-id> --connection <conn-id>
|