@axiom-lattice/protocols 7.2.0 → 7.3.0

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.d.ts CHANGED
@@ -1856,7 +1856,7 @@ interface SkillLatticeProtocol extends BaseLatticeProtocol<SkillConfig, SkillCli
1856
1856
  /**
1857
1857
  * MCP transport type
1858
1858
  */
1859
- type McpTransportType = "stdio" | "streamable_http" | "sse";
1859
+ type McpTransportType = "stdio" | "streamable_http";
1860
1860
  /**
1861
1861
  * MCP protocol era selection for client connections.
1862
1862
  *
@@ -1884,7 +1884,7 @@ interface McpServerConfig {
1884
1884
  /** Environment variables (stdio transport; credentials passed to the server process) */
1885
1885
  env?: Record<string, string>;
1886
1886
  /**
1887
- * Custom HTTP headers sent with every request (streamable_http / sse only).
1887
+ * Custom HTTP headers sent with every request (streamable_http only).
1888
1888
  * Commonly used for authentication, e.g. `{ Authorization: "Bearer <token>" }`.
1889
1889
  * Ignored for stdio transport. Values are encrypted at rest by config stores.
1890
1890
  */
@@ -3033,6 +3033,11 @@ interface McpServerConfigEntry {
3033
3033
  * Tenant identifier for multi-tenant isolation
3034
3034
  */
3035
3035
  tenantId: string;
3036
+ /**
3037
+ * Personal assistant that owns this configuration, when it belongs to the
3038
+ * personal data domain. Tenant-scoped entries leave this undefined.
3039
+ */
3040
+ ownerAssistantId?: string;
3036
3041
  /**
3037
3042
  * Business key for the configuration (unique within tenant)
3038
3043
  */
@@ -3208,6 +3213,58 @@ interface McpServerConfigStore {
3208
3213
  */
3209
3214
  hasConfig(tenantId: string, id: string): Promise<boolean>;
3210
3215
  }
3216
+ /**
3217
+ * MCP server configuration owned by one personal assistant.
3218
+ *
3219
+ * Personal configs live in a separate store surface so tenant-only code paths
3220
+ * can never read them by accident; the owning assistant id is part of every
3221
+ * lookup key.
3222
+ */
3223
+ interface PersonalMcpServerConfigEntry extends McpServerConfigEntry {
3224
+ /** Personal assistant that owns this configuration. */
3225
+ ownerAssistantId: string;
3226
+ }
3227
+ /**
3228
+ * Store operations for the personal MCP data domain.
3229
+ *
3230
+ * Every method scopes by `(tenantId, ownerAssistantId)`. Implementations must
3231
+ * never merge personal rows into the tenant-only methods of
3232
+ * {@link McpServerConfigStore}.
3233
+ */
3234
+ interface PersonalMcpServerConfigStore {
3235
+ /** List all personal MCP configs belonging to one assistant. */
3236
+ getAllConfigsForAssistant(tenantId: string, ownerAssistantId: string): Promise<PersonalMcpServerConfigEntry[]>;
3237
+ /**
3238
+ * List every personal MCP config across tenants.
3239
+ *
3240
+ * Intended for operations and tests only; startup restoration must not call
3241
+ * it (personal connections are established lazily).
3242
+ */
3243
+ getAllPersonalConfigsWithoutTenant(): Promise<PersonalMcpServerConfigEntry[]>;
3244
+ /** Get one personal config by id, scoped to its assistant. */
3245
+ getConfigByIdForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<PersonalMcpServerConfigEntry | null>;
3246
+ /** Get one personal config by business key, scoped to its assistant. */
3247
+ getConfigByKeyForAssistant(tenantId: string, ownerAssistantId: string, key: string): Promise<PersonalMcpServerConfigEntry | null>;
3248
+ /** Create a personal config for one assistant. */
3249
+ createConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string, data: CreateMcpServerConfigRequest): Promise<PersonalMcpServerConfigEntry>;
3250
+ /** Update a personal config by id, scoped to its assistant. */
3251
+ updateConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string, updates: Partial<UpdateMcpServerConfigRequest>): Promise<PersonalMcpServerConfigEntry | null>;
3252
+ /** Delete one personal config by id; returns whether a row was removed. */
3253
+ deleteConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<boolean>;
3254
+ /** Delete every personal config owned by one assistant; returns the count. */
3255
+ deleteConfigsForAssistant(tenantId: string, ownerAssistantId: string): Promise<number>;
3256
+ /** Check whether a personal config id exists for one assistant. */
3257
+ hasConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<boolean>;
3258
+ }
3259
+ /** A store that serves both the tenant and personal MCP data domains. */
3260
+ type McpConfigStoreWithPersonal = McpServerConfigStore & PersonalMcpServerConfigStore;
3261
+ /**
3262
+ * Narrow a store to the personal MCP surface at runtime.
3263
+ *
3264
+ * Custom hosts may register a tenant-only MCP store; callers use this guard to
3265
+ * degrade gracefully instead of assuming the personal methods exist.
3266
+ */
3267
+ declare function isPersonalMcpServerConfigStore(store: McpServerConfigStore): store is McpConfigStoreWithPersonal;
3211
3268
 
3212
3269
  /**
3213
3270
  * ModelProviderProtocol
@@ -3269,6 +3326,19 @@ type ModelKind = "chat" | "embedding" | "asr";
3269
3326
  declare const DEFAULT_MODEL_KEY = "default";
3270
3327
  declare const EMBEDDING_DEFAULT_KEY = "default:embedding";
3271
3328
  declare const ASR_DEFAULT_KEY = "default:asr";
3329
+ /**
3330
+ * Reserved tenant id for the platform-owned model provider catalog.
3331
+ *
3332
+ * The platform catalog lives in the same encrypted `modelProvider` store as a
3333
+ * tenant's own providers, under this reserved id. It is deliberately distinct
3334
+ * from the deployment `"default"` namespace, which holds the models registered
3335
+ * from environment configuration at boot.
3336
+ *
3337
+ * Resolution uses it as the second step: a tenant with providers of its own
3338
+ * never reaches it, a tenant with none falls back to it while it has providers,
3339
+ * and only an empty platform catalog falls through to the deployment namespace.
3340
+ */
3341
+ declare const PLATFORM_MODEL_TENANT_ID = "__platform__";
3272
3342
  /**
3273
3343
  * Build the tenant-scoped model key.
3274
3344
  *
@@ -3571,11 +3641,12 @@ interface ModelSelection {
3571
3641
  */
3572
3642
  kind?: ModelKind;
3573
3643
  /**
3574
- * Whether this is the tenant's default model.
3644
+ * Whether this is the tenant's default model of its kind.
3575
3645
  *
3576
- * At most one model per tenant may carry it. Omitted means "leave the stored
3577
- * flag alone"; a default can only be replaced, never dropped by omission —
3578
- * see `ModelProviderStore.getDefaultModel`.
3646
+ * The flag is scoped per *(tenant, kind)*: at most one chat model, one
3647
+ * embedding model, and one ASR model may carry it. Omitted means "leave the
3648
+ * stored flag alone"; a default can only be replaced, never dropped by
3649
+ * omission — see `ModelProviderStore.getDefaultModel`.
3579
3650
  */
3580
3651
  isDefault?: boolean;
3581
3652
  }
@@ -8978,6 +9049,13 @@ interface ResolvedPlatformBranding {
8978
9049
  publicGatewayUrl?: string;
8979
9050
  publicConsoleUrl?: string;
8980
9051
  }
9052
+ /** Platform override for one gateway rate-limit policy. */
9053
+ interface PlatformRateLimitPolicyOverride {
9054
+ /** New fixed-window request limit. Omitted keeps the deployment limit. */
9055
+ limit?: number;
9056
+ /** Set false to disable this policy. Omitted keeps the deployment state. */
9057
+ enabled?: boolean;
9058
+ }
8981
9059
  /** Persisted, partial platform settings document managed by platform admins. */
8982
9060
  interface PlatformSettingsDocument {
8983
9061
  auth?: {
@@ -8988,10 +9066,10 @@ interface PlatformSettingsDocument {
8988
9066
  defaultMaxUses?: number;
8989
9067
  };
8990
9068
  rateLimits?: {
8991
- openApiPerMinute?: number;
8992
- openAgentPerMinute?: number;
8993
- a2aJsonRpcPerMinute?: number;
8994
- a2aJsonRpcIpPerMinute?: number;
9069
+ /** Per-policy platform overrides keyed by policy name. */
9070
+ policies?: Record<string, PlatformRateLimitPolicyOverride>;
9071
+ /** PATCH-only command: remove platform overrides for these policies. */
9072
+ resetPolicies?: string[];
8995
9073
  maxActiveRunTasksPerTenant?: number | null;
8996
9074
  };
8997
9075
  branding?: PlatformBrandingSettings;
@@ -9036,6 +9114,8 @@ interface PlatformSettingsProvider {
9036
9114
  getEffective(): EffectivePlatformSettings;
9037
9115
  getInviteDefaults(): EffectivePlatformSettings["invite"];
9038
9116
  getRateLimits(): EffectivePlatformSettings["rateLimits"];
9117
+ /** Platform-only policy overrides; absent for consumers that do not need them. */
9118
+ getRateLimitPolicyOverrides?(): Record<string, PlatformRateLimitPolicyOverride>;
9039
9119
  }
9040
9120
  /** Persistence operations for platform settings with version CAS. */
9041
9121
  interface PlatformSettingsStore {
@@ -9076,4 +9156,132 @@ declare const DEFAULT_PLATFORM_BRANDING: PlatformBranding;
9076
9156
  */
9077
9157
  declare function normalizeBrandingHost(raw: string): string;
9078
9158
 
9079
- export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2AEventCursor, type A2ARemoteAgentConfig, AFFINITY_ECHO_HEADER, AFFINITY_MISS_CODE, AGENT_AFFINITY_HEADER, ASR_DEFAULT_KEY, type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentInterrupt, type AgentLatticeProtocol, type AgentMenuConfig, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type AgentWebApp, type AgentWebAppAppearance, type AgentWebAppBootstrap, type AgentWebAppCalloutWidget, type AgentWebAppError, type AgentWebAppErrorCode, type AgentWebAppFeatures, type AgentWebAppGenUIBlock, type AgentWebAppIdentityAssurance, type AgentWebAppIdentityConfig, type AgentWebAppIdentityPolicy, type AgentWebAppInterrupt, type AgentWebAppIssuerConfig, type AgentWebAppQuickPrompt, type AgentWebAppRuntimeMessage, type AgentWebAppRuntimeThread, type AgentWebAppScope, type AgentWebAppStatus, type AgentWebAppStore, type AgentWebAppStorePatch, type AgentWebAppStreamEvent, type AgentWebAppStreamProjectionContext, type AgentWebAppTableWidget, type AgentWebAppThreadMetadata, type AgentWebAppUpdateOptions, type Assistant, type AssistantMessage, type AssistantStore, type Attachment, type AuthChallenge, type AuthCookie, AuthError, type AuthErrorCode, type AuthProvider, type AuthProviderDescriptor, type AuthRequestContext, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrandingDomain, type BrowserMiddlewareConfig, CHANNEL_REPLY_JOB_LIST_LIMIT_DEFAULT, CHANNEL_REPLY_JOB_LIST_LIMIT_MAX, CHANNEL_REPLY_JOB_LIST_LIMIT_MIN, type Callback, type CapabilityBundle, type CapabilityBundleDeleteResult, type CapabilityBundleStore, type CapabilityBundleUpdateConflict, type CapabilityFieldSource, type CapabilityOverride, type CapabilityPreview, type CapabilityPreviewIssue, type CapabilityRuntime, type ChannelAdapter, type ChannelBindingMigrationConflict, ChannelBindingMigrationConflictError, type ChannelInstallation, type ChannelInstallationStore, type ChannelInstallationType, type ChannelReplyJob, type ChannelReplyJobStatus, type ChannelReplyJobStore, type CheckpointMaintenance, type CheckpointStorage, type ClawMiddlewareConfig, type CodeEvalMiddlewareConfig, type Collection, type CollectionField, type CollectionFieldType, type CollectionMiddlewareConfig, type CollectionSchema, type CollectionStore, type ConnectionEntry, type ConnectionStore, type ConversationRecord, type CreateA2AApiKeyInput, type CreateAgentWebAppInput, type CreateAssistantRequest, type CreateBindingInput, type CreateCapabilityBundleInput, type CreateChannelInstallationInput, type CreateChannelInstallationRequest, type CreateChannelReplyJobInput, type CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateFileShareRequest, type CreateInviteLinkInput, type CreateMcpAppShareRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateModelProviderRequest, type CreateOidcIdentityClaimInput, type CreateOidcProviderConfigInput, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRecord, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, DEFAULT_MODEL_KEY, DEFAULT_PLATFORM_BRANDING, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DiscoveredModel, type DispatchResult, DuplicateChannelBindingSubjectError, EMBEDDING_DEFAULT_KEY, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EffectivePlatformSettings, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, ExternalIdentityConflictError, ExternalIdentityPersistError, type FileMenuConfig, type FileShareRecord, type FilterCondition, type GraphBuildOptions, type HtmlMenuConfig, type IConversationStore, type ID, type InboundMessage, type InternalAgentNode, type InternalBaseNode, type InternalCreateCapabilityBundleInput, type InternalDSL, type InternalEdge, type InternalInput, type InternalInputNode, type InternalMapNode, type InternalNode, type InternalNodeConfig, type InternalOutput, type InternalState, type InternalStateField, type InternalTerminalNode, type InternalUpdateCapabilityBundleInput, type InterruptAnswerKey, type InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type InviteLink, type InviteLinkScope, type InviteLinkStore, LANGFUSE_OBSERVABILITY_DASHBOARD_VERSION, type LLMConfig, type LangfuseAgentBreakdownRow, type LangfuseModelBreakdownRow, type LangfuseModelCostSeries, type LangfuseObservabilityDashboardPayload, type LangfuseObservabilitySeriesPoint, type LangfuseToolBreakdownRow, type LarkChannelInstallationConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LeaseRecord, type LeaseStore, type LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, type LoginSurface, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpAppMenuConfig, type McpAppShareApp, type McpAppShareBootstrap, type McpAppShareRecord, type McpAppShareTarget, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpProtocolMode, type McpServerConfig, type McpServerConfigEntry, type McpServerConfigStore, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type McpUiCsp, type McpUiDisplayMode, type McpUiPermissions, type McpUiRef, type McpUiResourcePayload, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type MenuContentConfig, type MenuContentType, type MenuItem, type MenuRegistry, type MenuTarget, type Message, type MessageChunk, type MessageChunkType, MessageChunkTypes, type MessageContext, type MessageMiddleware, type MetricColumn, type MetricDataPoint, type MetricMeta, type MetricQueryResult, type MetricsMiddlewareConfig, type MetricsServerConfig, type MetricsServerConfigEntry, type MetricsServerConfigStore, type MetricsServerType, type MiddlewareType, type ModelDiscoveryResult, type ModelKind, type ModelLatticeProtocol, type ModelProviderApiStyle, type ModelProviderEntry, type ModelProviderErrorCode, type ModelProviderLlmProvider, type ModelProviderModelEntry, type ModelProviderProbeRequest, type ModelProviderProbeResult, type ModelProviderPublicEntry, type ModelProviderStatus, type ModelProviderStore, type ModelProviderUpstreamErrorCode, type ModelProviderWireProtocol, type ModelSelection, OBSERVABILITY_DASHBOARD_ELEMENT_KEY_PREFIX, type ObservabilityDashboardEnvelope, type ObservabilityDashboardInput, type ObservabilityDashboardRange, type ObservabilityDashboardResult, type OidcIdentityClaim, type OidcIdentityClaimApproval, OidcIdentityClaimConflictError, type OidcIdentityClaimStatus, type OidcIdentityClaimStore, type OidcProviderConfig, OidcProviderConfigConflictError, type OidcProviderConfigStore, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogConnection, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OpenGrantSelector, type OutboundMessage, type OutboundStreamChunk, type OutboxEvent, type OutboxStore, PLATFORM_SETTINGS_DEFAULTS, PROJECT_ROOM_TASK_DELEGATED_LABEL, PROJECT_ROOM_TASK_DELEGATED_SEPARATOR, PROJECT_ROOM_USER_CHANNEL_PROJECT, PROJECT_TASK_LIFECYCLE_ACTIONS, type PaginatedResult, type PaginationParams, type PinoFileOptions, type PlatformBranding, type PlatformBrandingSettings, type PlatformInvitation, type PlatformInvitationStore, type PlatformMember, type PlatformMemberStore, type PlatformRole, type PlatformSettingSource, type PlatformSettingsDocument, type PlatformSettingsProvider, type PlatformSettingsRecord, type PlatformSettingsSnapshot, type PlatformSettingsStore, PlatformSettingsVersionConflictError, type Plugin, type PluginConnection, type PluginConnectionFieldSchema, type PluginConnectionTestResult, type PluginContext, type PluginDeployment, type PluginDeploymentMode, type PluginDeploymentStatus, type PluginDeploymentStore, type PluginDiscoveredResource, type PluginMeta, type PluginMetaOutput, type PluginMiddlewareFactory, type PluginSkillDefinition, type PluginSkillResource, type PluginStandardConnectionConfig, type PluginToolMeta, type PluginToolUi, type PluginUiResource, type Principal, type Project, type ProjectBotMembership, type ProjectBotMembershipStatus, type ProjectBotMembershipStore, type ProjectBotRole, type ProjectCapabilityConfig, type ProjectFilter, type ProjectHumanRole, type ProjectKind, type ProjectLifecycleEventCursor, type ProjectLifecycleEventQuery, type ProjectMembership, type ProjectMembershipMutationResult, type ProjectMembershipStatus, type ProjectMembershipStore, type ProjectRoom, ProjectRoomBrokerCapacityError, type ProjectRoomBusinessEvent, type ProjectRoomBusinessEventDraft, type ProjectRoomControlEvent, ProjectRoomCursorError, type ProjectRoomEventBrokerProtocol, type ProjectRoomEventId, type ProjectRoomEventOf, type ProjectRoomEventScope, type ProjectRoomEventSubscription, type ProjectRoomMembershipAffectedEvent, type ProjectRoomMembershipChangedEvent, type ProjectRoomMention, type ProjectRoomMessage, type ProjectRoomMessageAuthor, type ProjectRoomMessageCreatedEvent, type ProjectRoomMessageCursor, type ProjectRoomMessageSource, type ProjectRoomMessageStore, type ProjectRoomPublicBotMembership, type ProjectRoomPublicMembership, type ProjectRoomPublicMessage, type ProjectRoomReadChangedEvent, type ProjectRoomReadState, type ProjectRoomReadStateStore, type ProjectRoomRealtimeActor, type ProjectRoomRosterChangedEvent, type ProjectRoomScopedBusinessEvent, type ProjectRoomSseWritable, type ProjectRoomStore, type ProjectRoomTaskChangedEvent, type ProjectRoomThreadMetadata, type ProjectRoomTrustedRunContext, type ProjectStore, type ProjectTaskLifecycleAction, ProjectTaskStoreUnsupportedError, type ProjectTaskThreadMetadata, type ProjectTaskTrustedRunContext, type ProjectTaskWorkItemStore, type ProviderModelInput, type PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, REPLICA_HEADER, type ReactAgentConfig, type ReplyTarget, type ResolvedPlatformBranding, type ResourceAddress, type ResourceResolver, type Result, type RunCancelSignal, type RunScope, type RunStep, STORE_IDENTITY_SEPARATOR, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, type SandboxPluginConnectionDef, type SandboxPluginDiagnostic, type SandboxPluginManifest, type SandboxPluginToolDef, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type SchedulerMiddlewareConfig, type SemanticMetricsFilter, type SemanticMetricsQueryRequest, type SemanticMetricsQueryResponse, type SemanticMetricsServerConfig, type ShareCardData, type ShareKind, type ShareRecord, type ShareRecordPatch, type ShareResult, type ShareTarget, type ShareVisibility, type SharedResourceStore, type Skill, type SkillClient, type SkillClientType, type SkillConfig, type SkillLatticeProtocol, type SkillStore, type SkillStoreContext, type SqlMiddlewareConfig, type StepStatus, type StepType, type StorageType, type StoreItem, type StoreProtocol, type StorePutInput, type StoreSearchInput, StoreValidationError, type SystemMessage, type TableQueryRequest, type TableQueryResponse, type TaskBeliefDiagnosticCode, type TaskBeliefEntry, type TaskBeliefParseFailure, type TaskBeliefParseResult, type TaskBeliefParseSuccess, type TaskBeliefState, type TaskDependentListQuery, type TaskFileRef, type TaskHandler, type TaskItem, type TaskListFilter, type TaskMutationSnapshot, type TaskStore, type TaskWorkItem, type TaskWorkItemListFilter, type TaskWorkItemStore, type Tenant, type TenantModelCatalog, type TenantModelPublicEntry, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadCheckpointStorage, type ThreadStore, type Timestamp, type ToolCall, type ToolCallUi, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateA2AApiKeyInput, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateModelProviderRequest, type UpdateOidcIdentityClaimInput, type UpdateOidcProviderConfigInput, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserExternalIdentity, type UserExternalIdentityStore, type UserMessage, type UserPushSubscription, type UserPushSubscriptionStore, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, WORKSPACE_PUBLIC_ROOM_PROJECT_PREFIX, type WechatChannelInstallationConfig, type WecomChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, a2aEventCursorSchema, affinityEchoHeaders, assertGenericProjectConfig, assertStoreIdentity, assertStoreNamespacePrefix, assertValidCreateChannelReplyJobInput, buildAffinityMissChunk, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, firstNonEmptyString, getSubAgentsFromConfig, getToolsFromConfig, hasTools, interruptAnswerKeySchema, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isMcpUiRef, isProjectRoomEventId, isWorkflowAgentConfig, isWorkspacePublicRoomProjectId, normalizeAllowedPrivateHosts, normalizeBrandingHost, normalizeChannelReplyJobListLimit, normalizeInviteLinkEmail, normalizeOidcIdentityEmail, normalizePlatformInvitationEmail, normalizeTaskMetadataScalar, observabilityDashboardElementKey, parseAgentWebAppGenUIBlock, parseMcpUiRef, parseModelKey, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, resolveRunScope, runCancelSignalSchema, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, storeExpiresAt, storePaginationValue, taskBeliefStatesEqual, threadAffinityHeaders, toModelKey, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
9159
+ /** Actor on whose behalf a platform-level audit record was produced. */
9160
+ type PlatformAuditInitiator = {
9161
+ type: "human";
9162
+ userId: string;
9163
+ role: "owner" | "admin" | "auditor";
9164
+ } | {
9165
+ type: "bootstrap";
9166
+ } | {
9167
+ type: "system";
9168
+ component: string;
9169
+ };
9170
+ /** Execution surface that performed the audited platform operation. */
9171
+ type PlatformAuditExecutor = {
9172
+ type: "admin_center";
9173
+ route: string;
9174
+ } | {
9175
+ type: "ops_agent";
9176
+ agentId: "platform-ops";
9177
+ threadId: string;
9178
+ runId: string;
9179
+ toolName: string;
9180
+ } | {
9181
+ type: "bootstrap";
9182
+ } | {
9183
+ type: "system";
9184
+ component: string;
9185
+ };
9186
+ /** Entry point that originated a platform-level audit record. */
9187
+ type PlatformAuditSource = "admin_center" | "ops_agent" | "bootstrap" | "system";
9188
+ /** Kind of platform operation captured by an audit record. */
9189
+ type PlatformAuditAction = "write" | "playbook";
9190
+ /** Terminal outcome of the audited operation. */
9191
+ type PlatformAuditStatus = "ok" | "error" | "cancelled";
9192
+ /** Input accepted when appending a platform audit record. */
9193
+ interface PlatformAuditAppendInput {
9194
+ initiator: PlatformAuditInitiator;
9195
+ source: PlatformAuditSource;
9196
+ executor: PlatformAuditExecutor;
9197
+ tenantId?: string;
9198
+ action: PlatformAuditAction;
9199
+ status: PlatformAuditStatus;
9200
+ summary: Record<string, unknown>;
9201
+ before?: Record<string, unknown>;
9202
+ after?: Record<string, unknown>;
9203
+ errorCode?: string;
9204
+ durationMs: number;
9205
+ }
9206
+ /** Persisted platform audit record. */
9207
+ interface PlatformAuditRecord extends PlatformAuditAppendInput {
9208
+ id: string;
9209
+ createdAt: Date;
9210
+ }
9211
+ /**
9212
+ * Filter and pagination options for querying platform audit records.
9213
+ *
9214
+ * Results are ordered newest-first by `createdAt` descending, then by `id`
9215
+ * descending as a total-order tie-break. `from` is inclusive and `to` is
9216
+ * exclusive on `createdAt`. `limit` defaults to 100; negative `offset` and
9217
+ * `limit` values are clamped to 0. `initiatorUserId` matches human initiators
9218
+ * only.
9219
+ */
9220
+ interface PlatformAuditQuery {
9221
+ initiatorUserId?: string;
9222
+ source?: PlatformAuditSource;
9223
+ tenantId?: string;
9224
+ action?: PlatformAuditAction;
9225
+ status?: PlatformAuditStatus;
9226
+ from?: string;
9227
+ to?: string;
9228
+ limit?: number;
9229
+ offset?: number;
9230
+ }
9231
+ /** Persistence operations for platform audit records. */
9232
+ interface PlatformAuditStore {
9233
+ append(record: PlatformAuditAppendInput): Promise<PlatformAuditRecord>;
9234
+ get(id: string): Promise<PlatformAuditRecord | null>;
9235
+ query(params: PlatformAuditQuery): Promise<PlatformAuditRecord[]>;
9236
+ }
9237
+
9238
+ /**
9239
+ * PlatformOpsProtocol
9240
+ *
9241
+ * Shared identity constants for the platform-scoped operations surface.
9242
+ *
9243
+ * The Ops Agent runs on a hidden system tenant so it can reuse the normal
9244
+ * agent runtime (threads, runs, SSE, leases) without appearing in any tenant
9245
+ * or agent list. These identifiers are deliberately reserved and must not be
9246
+ * user-selectable.
9247
+ */
9248
+ /**
9249
+ * Reserved tenant id that owns platform-scoped configuration and agent
9250
+ * execution (platform model catalog, Ops Agent threads, …).
9251
+ */
9252
+ declare const PLATFORM_TENANT_ID = "__platform__";
9253
+ /**
9254
+ * Fixed key of the platform operations agent. It is registered explicitly at
9255
+ * startup rather than created through assistant management routes.
9256
+ */
9257
+ declare const PLATFORM_OPS_AGENT_ID = "platform-ops";
9258
+ /**
9259
+ * Stable error code returned when a normal tenant route tries to mutate the
9260
+ * hidden platform tenant.
9261
+ */
9262
+ declare const PLATFORM_TENANT_PROTECTED_ERROR = "PLATFORM_TENANT_PROTECTED";
9263
+ /**
9264
+ * Whether a tenant id belongs to the hidden platform tenant.
9265
+ */
9266
+ declare function isPlatformTenantId(tenantId: string): boolean;
9267
+ /**
9268
+ * Stable error raised when a tenant-plane operation tries to address the
9269
+ * hidden platform tenant.
9270
+ */
9271
+ declare class PlatformTenantProtectedError extends Error {
9272
+ readonly code = "PLATFORM_TENANT_PROTECTED";
9273
+ constructor(message?: string);
9274
+ }
9275
+ /**
9276
+ * Rejects any attempt to create or mutate a link into the hidden platform
9277
+ * tenant.
9278
+ */
9279
+ declare function assertNotPlatformTenant(tenantId: string): void;
9280
+ /** Fixed workspace used by Platform Ops threads inside the hidden tenant. */
9281
+ declare const PLATFORM_OPS_WORKSPACE_ID = "platform-ops";
9282
+ /** Fixed project used by Platform Ops threads inside the hidden tenant. */
9283
+ declare const PLATFORM_OPS_PROJECT_ID = "platform-ops";
9284
+ /** High-risk Ops playbook discriminator executed by the playbook executor. */
9285
+ type PlatformOpsPlaybookKind = "transfer_owner" | "offboard_member" | "delete_tenant" | "delete_oidc_provider" | "rotate_oidc_provider" | "reset_settings";
9286
+
9287
+ export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2AEventCursor, type A2ARemoteAgentConfig, AFFINITY_ECHO_HEADER, AFFINITY_MISS_CODE, AGENT_AFFINITY_HEADER, ASR_DEFAULT_KEY, type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentInterrupt, type AgentLatticeProtocol, type AgentMenuConfig, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type AgentWebApp, type AgentWebAppAppearance, type AgentWebAppBootstrap, type AgentWebAppCalloutWidget, type AgentWebAppError, type AgentWebAppErrorCode, type AgentWebAppFeatures, type AgentWebAppGenUIBlock, type AgentWebAppIdentityAssurance, type AgentWebAppIdentityConfig, type AgentWebAppIdentityPolicy, type AgentWebAppInterrupt, type AgentWebAppIssuerConfig, type AgentWebAppQuickPrompt, type AgentWebAppRuntimeMessage, type AgentWebAppRuntimeThread, type AgentWebAppScope, type AgentWebAppStatus, type AgentWebAppStore, type AgentWebAppStorePatch, type AgentWebAppStreamEvent, type AgentWebAppStreamProjectionContext, type AgentWebAppTableWidget, type AgentWebAppThreadMetadata, type AgentWebAppUpdateOptions, type Assistant, type AssistantMessage, type AssistantStore, type Attachment, type AuthChallenge, type AuthCookie, AuthError, type AuthErrorCode, type AuthProvider, type AuthProviderDescriptor, type AuthRequestContext, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrandingDomain, type BrowserMiddlewareConfig, CHANNEL_REPLY_JOB_LIST_LIMIT_DEFAULT, CHANNEL_REPLY_JOB_LIST_LIMIT_MAX, CHANNEL_REPLY_JOB_LIST_LIMIT_MIN, type Callback, type CapabilityBundle, type CapabilityBundleDeleteResult, type CapabilityBundleStore, type CapabilityBundleUpdateConflict, type CapabilityFieldSource, type CapabilityOverride, type CapabilityPreview, type CapabilityPreviewIssue, type CapabilityRuntime, type ChannelAdapter, type ChannelBindingMigrationConflict, ChannelBindingMigrationConflictError, type ChannelInstallation, type ChannelInstallationStore, type ChannelInstallationType, type ChannelReplyJob, type ChannelReplyJobStatus, type ChannelReplyJobStore, type CheckpointMaintenance, type CheckpointStorage, type ClawMiddlewareConfig, type CodeEvalMiddlewareConfig, type Collection, type CollectionField, type CollectionFieldType, type CollectionMiddlewareConfig, type CollectionSchema, type CollectionStore, type ConnectionEntry, type ConnectionStore, type ConversationRecord, type CreateA2AApiKeyInput, type CreateAgentWebAppInput, type CreateAssistantRequest, type CreateBindingInput, type CreateCapabilityBundleInput, type CreateChannelInstallationInput, type CreateChannelInstallationRequest, type CreateChannelReplyJobInput, type CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateFileShareRequest, type CreateInviteLinkInput, type CreateMcpAppShareRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateModelProviderRequest, type CreateOidcIdentityClaimInput, type CreateOidcProviderConfigInput, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRecord, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, DEFAULT_MODEL_KEY, DEFAULT_PLATFORM_BRANDING, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DiscoveredModel, type DispatchResult, DuplicateChannelBindingSubjectError, EMBEDDING_DEFAULT_KEY, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EffectivePlatformSettings, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, ExternalIdentityConflictError, ExternalIdentityPersistError, type FileMenuConfig, type FileShareRecord, type FilterCondition, type GraphBuildOptions, type HtmlMenuConfig, type IConversationStore, type ID, type InboundMessage, type InternalAgentNode, type InternalBaseNode, type InternalCreateCapabilityBundleInput, type InternalDSL, type InternalEdge, type InternalInput, type InternalInputNode, type InternalMapNode, type InternalNode, type InternalNodeConfig, type InternalOutput, type InternalState, type InternalStateField, type InternalTerminalNode, type InternalUpdateCapabilityBundleInput, type InterruptAnswerKey, type InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type InviteLink, type InviteLinkScope, type InviteLinkStore, LANGFUSE_OBSERVABILITY_DASHBOARD_VERSION, type LLMConfig, type LangfuseAgentBreakdownRow, type LangfuseModelBreakdownRow, type LangfuseModelCostSeries, type LangfuseObservabilityDashboardPayload, type LangfuseObservabilitySeriesPoint, type LangfuseToolBreakdownRow, type LarkChannelInstallationConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LeaseRecord, type LeaseStore, type LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, type LoginSurface, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpAppMenuConfig, type McpAppShareApp, type McpAppShareBootstrap, type McpAppShareRecord, type McpAppShareTarget, type McpClient, type McpClientOptions, type McpConfigStoreWithPersonal, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpProtocolMode, type McpServerConfig, type McpServerConfigEntry, type McpServerConfigStore, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type McpUiCsp, type McpUiDisplayMode, type McpUiPermissions, type McpUiRef, type McpUiResourcePayload, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type MenuContentConfig, type MenuContentType, type MenuItem, type MenuRegistry, type MenuTarget, type Message, type MessageChunk, type MessageChunkType, MessageChunkTypes, type MessageContext, type MessageMiddleware, type MetricColumn, type MetricDataPoint, type MetricMeta, type MetricQueryResult, type MetricsMiddlewareConfig, type MetricsServerConfig, type MetricsServerConfigEntry, type MetricsServerConfigStore, type MetricsServerType, type MiddlewareType, type ModelDiscoveryResult, type ModelKind, type ModelLatticeProtocol, type ModelProviderApiStyle, type ModelProviderEntry, type ModelProviderErrorCode, type ModelProviderLlmProvider, type ModelProviderModelEntry, type ModelProviderProbeRequest, type ModelProviderProbeResult, type ModelProviderPublicEntry, type ModelProviderStatus, type ModelProviderStore, type ModelProviderUpstreamErrorCode, type ModelProviderWireProtocol, type ModelSelection, OBSERVABILITY_DASHBOARD_ELEMENT_KEY_PREFIX, type ObservabilityDashboardEnvelope, type ObservabilityDashboardInput, type ObservabilityDashboardRange, type ObservabilityDashboardResult, type OidcIdentityClaim, type OidcIdentityClaimApproval, OidcIdentityClaimConflictError, type OidcIdentityClaimStatus, type OidcIdentityClaimStore, type OidcProviderConfig, OidcProviderConfigConflictError, type OidcProviderConfigStore, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogConnection, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OpenGrantSelector, type OutboundMessage, type OutboundStreamChunk, type OutboxEvent, type OutboxStore, PLATFORM_MODEL_TENANT_ID, PLATFORM_OPS_AGENT_ID, PLATFORM_OPS_PROJECT_ID, PLATFORM_OPS_WORKSPACE_ID, PLATFORM_SETTINGS_DEFAULTS, PLATFORM_TENANT_ID, PLATFORM_TENANT_PROTECTED_ERROR, PROJECT_ROOM_TASK_DELEGATED_LABEL, PROJECT_ROOM_TASK_DELEGATED_SEPARATOR, PROJECT_ROOM_USER_CHANNEL_PROJECT, PROJECT_TASK_LIFECYCLE_ACTIONS, type PaginatedResult, type PaginationParams, type PersonalMcpServerConfigEntry, type PersonalMcpServerConfigStore, type PinoFileOptions, type PlatformAuditAction, type PlatformAuditAppendInput, type PlatformAuditExecutor, type PlatformAuditInitiator, type PlatformAuditQuery, type PlatformAuditRecord, type PlatformAuditSource, type PlatformAuditStatus, type PlatformAuditStore, type PlatformBranding, type PlatformBrandingSettings, type PlatformInvitation, type PlatformInvitationStore, type PlatformMember, type PlatformMemberStore, type PlatformOpsPlaybookKind, type PlatformRateLimitPolicyOverride, type PlatformRole, type PlatformSettingSource, type PlatformSettingsDocument, type PlatformSettingsProvider, type PlatformSettingsRecord, type PlatformSettingsSnapshot, type PlatformSettingsStore, PlatformSettingsVersionConflictError, PlatformTenantProtectedError, type Plugin, type PluginConnection, type PluginConnectionFieldSchema, type PluginConnectionTestResult, type PluginContext, type PluginDeployment, type PluginDeploymentMode, type PluginDeploymentStatus, type PluginDeploymentStore, type PluginDiscoveredResource, type PluginMeta, type PluginMetaOutput, type PluginMiddlewareFactory, type PluginSkillDefinition, type PluginSkillResource, type PluginStandardConnectionConfig, type PluginToolMeta, type PluginToolUi, type PluginUiResource, type Principal, type Project, type ProjectBotMembership, type ProjectBotMembershipStatus, type ProjectBotMembershipStore, type ProjectBotRole, type ProjectCapabilityConfig, type ProjectFilter, type ProjectHumanRole, type ProjectKind, type ProjectLifecycleEventCursor, type ProjectLifecycleEventQuery, type ProjectMembership, type ProjectMembershipMutationResult, type ProjectMembershipStatus, type ProjectMembershipStore, type ProjectRoom, ProjectRoomBrokerCapacityError, type ProjectRoomBusinessEvent, type ProjectRoomBusinessEventDraft, type ProjectRoomControlEvent, ProjectRoomCursorError, type ProjectRoomEventBrokerProtocol, type ProjectRoomEventId, type ProjectRoomEventOf, type ProjectRoomEventScope, type ProjectRoomEventSubscription, type ProjectRoomMembershipAffectedEvent, type ProjectRoomMembershipChangedEvent, type ProjectRoomMention, type ProjectRoomMessage, type ProjectRoomMessageAuthor, type ProjectRoomMessageCreatedEvent, type ProjectRoomMessageCursor, type ProjectRoomMessageSource, type ProjectRoomMessageStore, type ProjectRoomPublicBotMembership, type ProjectRoomPublicMembership, type ProjectRoomPublicMessage, type ProjectRoomReadChangedEvent, type ProjectRoomReadState, type ProjectRoomReadStateStore, type ProjectRoomRealtimeActor, type ProjectRoomRosterChangedEvent, type ProjectRoomScopedBusinessEvent, type ProjectRoomSseWritable, type ProjectRoomStore, type ProjectRoomTaskChangedEvent, type ProjectRoomThreadMetadata, type ProjectRoomTrustedRunContext, type ProjectStore, type ProjectTaskLifecycleAction, ProjectTaskStoreUnsupportedError, type ProjectTaskThreadMetadata, type ProjectTaskTrustedRunContext, type ProjectTaskWorkItemStore, type ProviderModelInput, type PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, REPLICA_HEADER, type ReactAgentConfig, type ReplyTarget, type ResolvedPlatformBranding, type ResourceAddress, type ResourceResolver, type Result, type RunCancelSignal, type RunScope, type RunStep, STORE_IDENTITY_SEPARATOR, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, type SandboxPluginConnectionDef, type SandboxPluginDiagnostic, type SandboxPluginManifest, type SandboxPluginToolDef, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type SchedulerMiddlewareConfig, type SemanticMetricsFilter, type SemanticMetricsQueryRequest, type SemanticMetricsQueryResponse, type SemanticMetricsServerConfig, type ShareCardData, type ShareKind, type ShareRecord, type ShareRecordPatch, type ShareResult, type ShareTarget, type ShareVisibility, type SharedResourceStore, type Skill, type SkillClient, type SkillClientType, type SkillConfig, type SkillLatticeProtocol, type SkillStore, type SkillStoreContext, type SqlMiddlewareConfig, type StepStatus, type StepType, type StorageType, type StoreItem, type StoreProtocol, type StorePutInput, type StoreSearchInput, StoreValidationError, type SystemMessage, type TableQueryRequest, type TableQueryResponse, type TaskBeliefDiagnosticCode, type TaskBeliefEntry, type TaskBeliefParseFailure, type TaskBeliefParseResult, type TaskBeliefParseSuccess, type TaskBeliefState, type TaskDependentListQuery, type TaskFileRef, type TaskHandler, type TaskItem, type TaskListFilter, type TaskMutationSnapshot, type TaskStore, type TaskWorkItem, type TaskWorkItemListFilter, type TaskWorkItemStore, type Tenant, type TenantModelCatalog, type TenantModelPublicEntry, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadCheckpointStorage, type ThreadStore, type Timestamp, type ToolCall, type ToolCallUi, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateA2AApiKeyInput, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateModelProviderRequest, type UpdateOidcIdentityClaimInput, type UpdateOidcProviderConfigInput, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserExternalIdentity, type UserExternalIdentityStore, type UserMessage, type UserPushSubscription, type UserPushSubscriptionStore, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, WORKSPACE_PUBLIC_ROOM_PROJECT_PREFIX, type WechatChannelInstallationConfig, type WecomChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, a2aEventCursorSchema, affinityEchoHeaders, assertGenericProjectConfig, assertNotPlatformTenant, assertStoreIdentity, assertStoreNamespacePrefix, assertValidCreateChannelReplyJobInput, buildAffinityMissChunk, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, firstNonEmptyString, getSubAgentsFromConfig, getToolsFromConfig, hasTools, interruptAnswerKeySchema, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isMcpUiRef, isPersonalMcpServerConfigStore, isPlatformTenantId, isProjectRoomEventId, isWorkflowAgentConfig, isWorkspacePublicRoomProjectId, normalizeAllowedPrivateHosts, normalizeBrandingHost, normalizeChannelReplyJobListLimit, normalizeInviteLinkEmail, normalizeOidcIdentityEmail, normalizePlatformInvitationEmail, normalizeTaskMetadataScalar, observabilityDashboardElementKey, parseAgentWebAppGenUIBlock, parseMcpUiRef, parseModelKey, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, resolveRunScope, runCancelSignalSchema, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, storeExpiresAt, storePaginationValue, taskBeliefStatesEqual, threadAffinityHeaders, toModelKey, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
package/dist/index.js CHANGED
@@ -49,12 +49,19 @@ __export(index_exports, {
49
49
  OBSERVABILITY_DASHBOARD_ELEMENT_KEY_PREFIX: () => OBSERVABILITY_DASHBOARD_ELEMENT_KEY_PREFIX,
50
50
  OidcIdentityClaimConflictError: () => OidcIdentityClaimConflictError,
51
51
  OidcProviderConfigConflictError: () => OidcProviderConfigConflictError,
52
+ PLATFORM_MODEL_TENANT_ID: () => PLATFORM_MODEL_TENANT_ID,
53
+ PLATFORM_OPS_AGENT_ID: () => PLATFORM_OPS_AGENT_ID,
54
+ PLATFORM_OPS_PROJECT_ID: () => PLATFORM_OPS_PROJECT_ID,
55
+ PLATFORM_OPS_WORKSPACE_ID: () => PLATFORM_OPS_WORKSPACE_ID,
52
56
  PLATFORM_SETTINGS_DEFAULTS: () => PLATFORM_SETTINGS_DEFAULTS,
57
+ PLATFORM_TENANT_ID: () => PLATFORM_TENANT_ID,
58
+ PLATFORM_TENANT_PROTECTED_ERROR: () => PLATFORM_TENANT_PROTECTED_ERROR,
53
59
  PROJECT_ROOM_TASK_DELEGATED_LABEL: () => PROJECT_ROOM_TASK_DELEGATED_LABEL,
54
60
  PROJECT_ROOM_TASK_DELEGATED_SEPARATOR: () => PROJECT_ROOM_TASK_DELEGATED_SEPARATOR,
55
61
  PROJECT_ROOM_USER_CHANNEL_PROJECT: () => PROJECT_ROOM_USER_CHANNEL_PROJECT,
56
62
  PROJECT_TASK_LIFECYCLE_ACTIONS: () => PROJECT_TASK_LIFECYCLE_ACTIONS,
57
63
  PlatformSettingsVersionConflictError: () => PlatformSettingsVersionConflictError,
64
+ PlatformTenantProtectedError: () => PlatformTenantProtectedError,
58
65
  ProjectRoomBrokerCapacityError: () => ProjectRoomBrokerCapacityError,
59
66
  ProjectRoomCursorError: () => ProjectRoomCursorError,
60
67
  ProjectTaskStoreUnsupportedError: () => ProjectTaskStoreUnsupportedError,
@@ -70,6 +77,7 @@ __export(index_exports, {
70
77
  a2aEventCursorSchema: () => a2aEventCursorSchema,
71
78
  affinityEchoHeaders: () => affinityEchoHeaders,
72
79
  assertGenericProjectConfig: () => assertGenericProjectConfig,
80
+ assertNotPlatformTenant: () => assertNotPlatformTenant,
73
81
  assertStoreIdentity: () => assertStoreIdentity,
74
82
  assertStoreNamespacePrefix: () => assertStoreNamespacePrefix,
75
83
  assertValidCreateChannelReplyJobInput: () => assertValidCreateChannelReplyJobInput,
@@ -86,6 +94,8 @@ __export(index_exports, {
86
94
  isDeepAgentConfig: () => isDeepAgentConfig,
87
95
  isExecutionResultEventKey: () => isExecutionResultEventKey,
88
96
  isMcpUiRef: () => isMcpUiRef,
97
+ isPersonalMcpServerConfigStore: () => isPersonalMcpServerConfigStore,
98
+ isPlatformTenantId: () => isPlatformTenantId,
89
99
  isProjectRoomEventId: () => isProjectRoomEventId,
90
100
  isWorkflowAgentConfig: () => isWorkflowAgentConfig,
91
101
  isWorkspacePublicRoomProjectId: () => isWorkspacePublicRoomProjectId,
@@ -266,10 +276,39 @@ function assertGenericProjectConfig(config) {
266
276
  }
267
277
  }
268
278
 
279
+ // src/McpServerConfigStoreProtocol.ts
280
+ function isPersonalMcpServerConfigStore(store) {
281
+ const candidate = store;
282
+ return typeof candidate.getAllConfigsForAssistant === "function" && typeof candidate.getAllPersonalConfigsWithoutTenant === "function" && typeof candidate.getConfigByIdForAssistant === "function" && typeof candidate.getConfigByKeyForAssistant === "function" && typeof candidate.createConfigForAssistant === "function" && typeof candidate.updateConfigForAssistant === "function" && typeof candidate.deleteConfigForAssistant === "function" && typeof candidate.deleteConfigsForAssistant === "function" && typeof candidate.hasConfigForAssistant === "function";
283
+ }
284
+
285
+ // src/PlatformOpsProtocol.ts
286
+ var PLATFORM_TENANT_ID = "__platform__";
287
+ var PLATFORM_OPS_AGENT_ID = "platform-ops";
288
+ var PLATFORM_TENANT_PROTECTED_ERROR = "PLATFORM_TENANT_PROTECTED";
289
+ function isPlatformTenantId(tenantId) {
290
+ return tenantId === PLATFORM_TENANT_ID;
291
+ }
292
+ var PlatformTenantProtectedError = class extends Error {
293
+ constructor(message = "The hidden platform tenant is protected") {
294
+ super(message);
295
+ this.code = PLATFORM_TENANT_PROTECTED_ERROR;
296
+ this.name = "PlatformTenantProtectedError";
297
+ }
298
+ };
299
+ function assertNotPlatformTenant(tenantId) {
300
+ if (isPlatformTenantId(tenantId)) {
301
+ throw new PlatformTenantProtectedError();
302
+ }
303
+ }
304
+ var PLATFORM_OPS_WORKSPACE_ID = "platform-ops";
305
+ var PLATFORM_OPS_PROJECT_ID = "platform-ops";
306
+
269
307
  // src/ModelProviderProtocol.ts
270
308
  var DEFAULT_MODEL_KEY = "default";
271
309
  var EMBEDDING_DEFAULT_KEY = "default:embedding";
272
310
  var ASR_DEFAULT_KEY = "default:asr";
311
+ var PLATFORM_MODEL_TENANT_ID = PLATFORM_TENANT_ID;
273
312
  function toModelKey(providerId, modelId) {
274
313
  return `${providerId}/${modelId}`;
275
314
  }
@@ -1411,12 +1450,19 @@ function normalizeBrandingHost(raw) {
1411
1450
  OBSERVABILITY_DASHBOARD_ELEMENT_KEY_PREFIX,
1412
1451
  OidcIdentityClaimConflictError,
1413
1452
  OidcProviderConfigConflictError,
1453
+ PLATFORM_MODEL_TENANT_ID,
1454
+ PLATFORM_OPS_AGENT_ID,
1455
+ PLATFORM_OPS_PROJECT_ID,
1456
+ PLATFORM_OPS_WORKSPACE_ID,
1414
1457
  PLATFORM_SETTINGS_DEFAULTS,
1458
+ PLATFORM_TENANT_ID,
1459
+ PLATFORM_TENANT_PROTECTED_ERROR,
1415
1460
  PROJECT_ROOM_TASK_DELEGATED_LABEL,
1416
1461
  PROJECT_ROOM_TASK_DELEGATED_SEPARATOR,
1417
1462
  PROJECT_ROOM_USER_CHANNEL_PROJECT,
1418
1463
  PROJECT_TASK_LIFECYCLE_ACTIONS,
1419
1464
  PlatformSettingsVersionConflictError,
1465
+ PlatformTenantProtectedError,
1420
1466
  ProjectRoomBrokerCapacityError,
1421
1467
  ProjectRoomCursorError,
1422
1468
  ProjectTaskStoreUnsupportedError,
@@ -1432,6 +1478,7 @@ function normalizeBrandingHost(raw) {
1432
1478
  a2aEventCursorSchema,
1433
1479
  affinityEchoHeaders,
1434
1480
  assertGenericProjectConfig,
1481
+ assertNotPlatformTenant,
1435
1482
  assertStoreIdentity,
1436
1483
  assertStoreNamespacePrefix,
1437
1484
  assertValidCreateChannelReplyJobInput,
@@ -1448,6 +1495,8 @@ function normalizeBrandingHost(raw) {
1448
1495
  isDeepAgentConfig,
1449
1496
  isExecutionResultEventKey,
1450
1497
  isMcpUiRef,
1498
+ isPersonalMcpServerConfigStore,
1499
+ isPlatformTenantId,
1451
1500
  isProjectRoomEventId,
1452
1501
  isWorkflowAgentConfig,
1453
1502
  isWorkspacePublicRoomProjectId,