@axiom-lattice/protocols 4.7.0 → 4.8.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/protocols@4.7.0 build /home/runner/work/agentic/agentic/packages/protocols
2
+ > @axiom-lattice/protocols@4.8.0 build /home/runner/work/agentic/agentic/packages/protocols
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,13 +8,13 @@
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- ESM dist/index.mjs 42.99 KB
12
- ESM dist/index.mjs.map 189.15 KB
13
- ESM ⚡️ Build success in 817ms
14
- CJS dist/index.js 48.09 KB
15
- CJS dist/index.js.map 193.07 KB
16
- CJS ⚡️ Build success in 819ms
11
+ CJS dist/index.js 48.46 KB
12
+ CJS dist/index.js.map 194.76 KB
13
+ CJS ⚡️ Build success in 623ms
14
+ ESM dist/index.mjs 43.36 KB
15
+ ESM dist/index.mjs.map 190.79 KB
16
+ ESM ⚡️ Build success in 634ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 15444ms
19
- DTS dist/index.d.ts 249.89 KB
20
- DTS dist/index.d.mts 249.89 KB
18
+ DTS ⚡️ Build success in 15067ms
19
+ DTS dist/index.d.ts 254.85 KB
20
+ DTS dist/index.d.mts 254.85 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @axiom-lattice/protocols
2
2
 
3
+ ## 4.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ad5a730: Unify `kind: "public"` (CoSpace `#general`) project handling around a dynamic roster with just-in-time anchoring. `ProjectRosterService.list` is now read-only: it returns persisted members (the built-in coordinator + any agent already interacted with) plus a **virtual** entry for every remaining eligible tenant agent (`public-project-bot:<projectId>:<assistantId>`), skipping the protected built-in coordinator and personal assistants. The single-agent JIT `ensurePublicProjectBot` materializes a real `ProjectBotMembership` + presence thread + binding only when an agent is actually touched: a human `@mention` (RoomMessageService resolves the virtual id to a real membership before persisting), a public-project task owner (ProjectTaskExecutionService.ensurePublicOwner, so the worker has a room anchor to post/reply), or a roster management action. On the agent side, `rosterExempt` flows through the `projectRoom` trusted context (RoomDispatchService/RoomInterruptService) for public projects, and both `list_room_roster` and the "Available task executors" prompt list the tenant's agents (independent of the sparse persisted roster), so a general-room agent can discover and assign tasks to any tenant agent. Adds optional `ProjectRoomTrustedRunContext.rosterExempt`.
8
+
9
+ Also fixes two bugs surfaced by the deterministic live e2e (`pnpm e2e:public-room`): `InMemoryProjectStore.createProject` now persists `kind` (matching the Local/PostgreSQL stores), and the gateway's trusted Room dispatch validator accepts the new `rosterExempt` context key.
10
+
11
+ Review hardening: `AgentConfig` now carries the personal-assistant `ownerUserId` and shared-context discovery excludes personal assistants; a roster-exempt task owner must be a same-tenant shared agent.
12
+
13
+ ## 4.7.1
14
+
15
+ ### Patch Changes
16
+
17
+ - bb2614f: Chating composer height, plugin connection-secret encryption, and manage_task compact cards.
18
+
19
+ - react-sdk: keep the Chating composer input from collapsing after a run. In slot mode (Chating always passes an array `slotConfig`) the Sender input is a `contentEditable` whose height comes from `autoSize`; without a `minRows` the empty editor lost its placeholder-driven line box once streaming ended and collapsed to zero height on some platforms (e.g. Windows Chrome), leaving the input unreachable while the footer stayed visible. Pass `autoSize={{ minRows: 1, maxRows: 8 }}` like `ProjectRoomComposer`.
20
+ - protocols/core: add `ConnectionEntry.secretFields`, plus `connectionSecretFields` / `encryptConfigFields` / `decryptConfigFields`.
21
+ - local-stores/pg-stores: encrypt the declared secret fields on save and decrypt on read, so the API and runtime consumers always receive real values. Existing plaintext rows read unchanged and convert on their next save (PG migration v188).
22
+ - gateway: plugin builder self-test discovery + secret redaction.
23
+ - core: `manage_task` `add_activity` now returns the target task alongside the activity (`{ success, data, task }`), so UIs can show which task an activity was written to.
24
+ - react-sdk: every `manage_task` action renders a compact chip in the chat stream and reveals its full card on hover. Fixes `get` and `add_activity`, which previously rendered no UI at all.
25
+
3
26
  ## 4.7.0
4
27
 
5
28
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -164,6 +164,12 @@ interface BaseAgentConfig {
164
164
  name: string;
165
165
  description: string;
166
166
  prompt: string;
167
+ /**
168
+ * Owner user id when this config represents a user's personal assistant.
169
+ * `undefined` means a tenant/workspace-shared agent, which is the only kind
170
+ * discoverable in shared contexts (e.g. a public room's executor list).
171
+ */
172
+ ownerUserId?: string;
167
173
  /**
168
174
  * Key of the parent agent to inherit configuration from.
169
175
  * When set, unspecified fields are inherited from the parent agent's config.
@@ -2409,14 +2415,50 @@ interface ConnectionEntry {
2409
2415
  name: string;
2410
2416
  description?: string;
2411
2417
  config: Record<string, unknown>;
2418
+ /**
2419
+ * Names of config fields that hold secrets (API keys, passwords, tokens).
2420
+ *
2421
+ * Stores persist this list alongside the entry and use it to encrypt those
2422
+ * config values at rest on write and transparently decrypt them on read.
2423
+ * `config` in a returned entry is always the decrypted, real value — callers
2424
+ * (gateway API, runtime plugin resolution) never see ciphertext.
2425
+ *
2426
+ * Absent/empty means the entry has no encrypted fields (e.g. legacy rows or
2427
+ * connection types whose schema defines no password fields).
2428
+ */
2429
+ secretFields?: string[];
2412
2430
  createdAt: string;
2413
2431
  updatedAt: string;
2414
2432
  }
2415
2433
  interface ConnectionStore {
2416
2434
  listByTenant(tenantId: string): Promise<ConnectionEntry[]>;
2435
+ /**
2436
+ * List a tenant's connections of one plugin type.
2437
+ *
2438
+ * `config` in the returned entries is decrypted — implementations decrypt the
2439
+ * fields named by each entry's `secretFields` before returning.
2440
+ */
2417
2441
  listByType(tenantId: string, type: string): Promise<ConnectionEntry[]>;
2442
+ /**
2443
+ * Read one connection by key.
2444
+ *
2445
+ * `config` in the returned entry is decrypted (see `listByType`).
2446
+ */
2418
2447
  getByKey(tenantId: string, type: string, key: string): Promise<ConnectionEntry | null>;
2448
+ /**
2449
+ * Create a connection.
2450
+ *
2451
+ * Implementations encrypt the `secretFields` of `config` at rest; the
2452
+ * returned entry carries the plaintext `config` the caller supplied.
2453
+ */
2419
2454
  create(entry: Omit<ConnectionEntry, "id" | "createdAt" | "updatedAt">): Promise<ConnectionEntry>;
2455
+ /**
2456
+ * Update a connection.
2457
+ *
2458
+ * When `updates.config` is present, the effective secret fields are
2459
+ * `updates.secretFields ?? existing.secretFields`; those fields are
2460
+ * re-encrypted before persistence.
2461
+ */
2420
2462
  update(tenantId: string, type: string, key: string, updates: Partial<ConnectionEntry>): Promise<ConnectionEntry | null>;
2421
2463
  delete(tenantId: string, type: string, key: string): Promise<boolean>;
2422
2464
  }
@@ -5435,6 +5477,10 @@ interface ChannelAdapter<TConfig = unknown> {
5435
5477
  * 可选:断开持久连接并停止接收事件。
5436
5478
  * 当 channel installation 被禁用或删除时调用。
5437
5479
  * `installationId` 用于标识要断开的具体安装实例。
5480
+ *
5481
+ * 实现必须是**幂等**且对未连接的 installation 安全(no-op):多副本下
5482
+ * `ChannelConnectionLeader` 在失去租约时会对共享 store 中的全部启用安装
5483
+ * 调用 `disconnect`,其中可能包含本副本从未 `connect` 的实例。
5438
5484
  */
5439
5485
  disconnect?(installationId: string): Promise<void>;
5440
5486
  }
@@ -6136,6 +6182,12 @@ interface ProjectBotMembership {
6136
6182
  roomThreadId: string;
6137
6183
  joinedAt: Date;
6138
6184
  updatedAt: Date;
6185
+ /**
6186
+ * True for a not-yet-materialized "virtual" public-project entry (dynamic
6187
+ * roster projection). Virtual entries have no persisted row; their id
6188
+ * materializes just-in-time on first interaction. Absent on real members.
6189
+ */
6190
+ provisional?: boolean;
6139
6191
  }
6140
6192
  /** Identifies a human author of a project room message. */
6141
6193
  interface ProjectRoomMessageHumanAuthor {
@@ -6412,6 +6464,49 @@ interface UserPushSubscriptionStore {
6412
6464
  delete(tenantId: string, userId: string, endpoint: string): Promise<boolean>;
6413
6465
  }
6414
6466
 
6467
+ /** Lifecycle states of a published plugin's resident service. */
6468
+ type PluginDeploymentStatus = "requested" | "provisioning" | "running" | "paused" | "stopping" | "stopped" | "failed";
6469
+ /** Lifecycle strategy: lazily paused vs. permanently resident. */
6470
+ type PluginDeploymentMode = "onDemand" | "alwaysOn";
6471
+ /** Durable tenant-scoped record of one published plugin's resident service. */
6472
+ interface PluginDeployment {
6473
+ id: string;
6474
+ tenantId: string;
6475
+ pluginType: string;
6476
+ pluginVersion: string;
6477
+ mode: PluginDeploymentMode;
6478
+ status: PluginDeploymentStatus;
6479
+ /** Backend provider key, e.g. "microsandbox-remote" | "opensandbox". */
6480
+ provider: string;
6481
+ /** Deterministic sandbox identity (`plugin-<hash(tenantId, pluginType)>`). */
6482
+ sandboxName: string;
6483
+ /** Guest port published by the host server. */
6484
+ port: number;
6485
+ /** Resolved endpoint (scheme-less route or host:port); may change over time. */
6486
+ endpoint?: string;
6487
+ /** Image used to create the sandbox, when pinned. */
6488
+ imageRef?: string;
6489
+ /** Idle timeout before an onDemand deployment is paused. */
6490
+ idleTimeoutMs: number;
6491
+ lastHealthAt?: string;
6492
+ lastError?: string;
6493
+ createdAt: string;
6494
+ updatedAt: string;
6495
+ }
6496
+ /** Persistence operations for plugin deployments. */
6497
+ interface PluginDeploymentStore {
6498
+ /** Lists every deployment for a tenant. */
6499
+ listByTenant(tenantId: string): Promise<PluginDeployment[]>;
6500
+ /** Returns the deployment for a plugin type, or undefined. */
6501
+ get(tenantId: string, pluginType: string): Promise<PluginDeployment | undefined>;
6502
+ /** Inserts or replaces a deployment keyed by tenant + plugin type. */
6503
+ upsert(deployment: PluginDeployment): Promise<PluginDeployment>;
6504
+ /** Applies a partial update (status/endpoint/health); returns the updated record. */
6505
+ updateStatus(tenantId: string, pluginType: string, patch: Partial<Omit<PluginDeployment, "id" | "tenantId" | "pluginType">>): Promise<PluginDeployment | undefined>;
6506
+ /** Deletes a deployment. Returns whether a row was removed. */
6507
+ delete(tenantId: string, pluginType: string): Promise<boolean>;
6508
+ }
6509
+
6415
6510
  /** One held distributed lease. */
6416
6511
  interface LeaseRecord {
6417
6512
  /** Lease key (e.g. `task-run:<taskId>`); unique across replicas. */
@@ -7011,10 +7106,13 @@ interface PluginConnection {
7011
7106
  resourceLabel?: string;
7012
7107
  }
7013
7108
  /**
7014
- * UI declaration for a plugin tool: an HTML file rendered as an MCP App when
7015
- * the tool runs.
7109
+ * UI declaration for a plugin tool: an HTML resource rendered as an MCP App
7110
+ * when the tool runs.
7016
7111
  *
7017
- * @property resource - Safe relative path (within the plugin directory) to an `.html` file.
7112
+ * @property resource - For GLOBAL plugins, a `ui://` key into the plugin's
7113
+ * `meta.uiResources` map (inline HTML served without a sandbox read). For
7114
+ * tenant sandbox plugins, a safe relative path (within the plugin directory)
7115
+ * to an `.html` file on the tenant volume.
7018
7116
  * @property displayMode - Preferred display mode; defaults to `inline` (resolved by the compiler).
7019
7117
  * @property csp - Origins the UI needs (see `McpUiCsp`).
7020
7118
  * @property permissions - Sandbox permissions requested (see `McpUiPermissions`).
@@ -7398,6 +7496,15 @@ interface ProjectRoomTrustedRunContext {
7398
7496
  * naming any specific value (ADR-118).
7399
7497
  */
7400
7498
  source?: string;
7499
+ /**
7500
+ * Host-provided signal that this project has no authored roster.
7501
+ *
7502
+ * Optional; `true` when present, `undefined`/`false` is treated as absent. Core uses it to skip
7503
+ * Project roster authorization for the run's caller and owner (any tenant agent may own a task) and
7504
+ * to list the tenant's agents — not the persisted roster — as available executors. The host stamps
7505
+ * it only for the workspace general project. Mirrors {@link ProjectTaskTrustedRunContext.rosterExempt}.
7506
+ */
7507
+ rosterExempt?: boolean;
7401
7508
  }
7402
7509
  /** Trusted Project Task identity persisted with a privileged queue message. */
7403
7510
  interface ProjectTaskTrustedRunContext {
@@ -7503,4 +7610,4 @@ declare function threadAffinityHeaders(threadId: string | undefined): Record<str
7503
7610
  */
7504
7611
  declare function buildAffinityMissChunk(owner: string, threadId: string): MessageChunk;
7505
7612
 
7506
- export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2ARemoteAgentConfig, AFFINITY_ECHO_HEADER, AFFINITY_MISS_CODE, AGENT_AFFINITY_HEADER, type AgentClient, type AgentConfig, type AgentConfigWithTools, 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 AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrowserMiddlewareConfig, 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 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 CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateModelProviderRequest, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DiscoveredModel, type DispatchResult, DuplicateChannelBindingSubjectError, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, type FileMenuConfig, 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 InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type LLMConfig, 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, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpAppMenuConfig, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, 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 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, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OutboundMessage, type OutboxEvent, type OutboxStore, 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 Plugin, type PluginConnection, type PluginConnectionFieldSchema, type PluginConnectionTestResult, type PluginContext, type PluginDiscoveredResource, type PluginMeta, type PluginMetaOutput, type PluginMiddlewareFactory, type PluginSkillDefinition, type PluginSkillResource, type PluginStandardConnectionConfig, type PluginToolMeta, type PluginToolUi, type PluginUiResource, type ProcessingAgentConfig, 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 ResourceAddress, type ResourceResolver, type Result, type RunScope, type RunStep, 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 ShareRecord, type ShareResult, 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 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 TeamAgentConfig, type TeamTeammateConfig, type Tenant, type TenantModelCatalog, type TenantModelPublicEntry, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, 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 UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, 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 WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, affinityEchoHeaders, assertGenericProjectConfig, buildAffinityMissChunk, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, firstNonEmptyString, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isMcpUiRef, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, isWorkspacePublicRoomProjectId, normalizeTaskMetadataScalar, parseAgentWebAppGenUIBlock, parseMcpUiRef, parseModelKey, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, resolveRunScope, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, threadAffinityHeaders, toModelKey, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
7613
+ export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2ARemoteAgentConfig, AFFINITY_ECHO_HEADER, AFFINITY_MISS_CODE, AGENT_AFFINITY_HEADER, type AgentClient, type AgentConfig, type AgentConfigWithTools, 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 AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrowserMiddlewareConfig, 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 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 CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateModelProviderRequest, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DiscoveredModel, type DispatchResult, DuplicateChannelBindingSubjectError, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, type FileMenuConfig, 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 InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type LLMConfig, 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, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpAppMenuConfig, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, 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 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, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OutboundMessage, type OutboxEvent, type OutboxStore, 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 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 ProcessingAgentConfig, 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 ResourceAddress, type ResourceResolver, type Result, type RunScope, type RunStep, 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 ShareRecord, type ShareResult, 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 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 TeamAgentConfig, type TeamTeammateConfig, type Tenant, type TenantModelCatalog, type TenantModelPublicEntry, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, 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 UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, 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 WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, affinityEchoHeaders, assertGenericProjectConfig, buildAffinityMissChunk, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, firstNonEmptyString, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isMcpUiRef, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, isWorkspacePublicRoomProjectId, normalizeTaskMetadataScalar, parseAgentWebAppGenUIBlock, parseMcpUiRef, parseModelKey, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, resolveRunScope, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, threadAffinityHeaders, toModelKey, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
package/dist/index.d.ts CHANGED
@@ -164,6 +164,12 @@ interface BaseAgentConfig {
164
164
  name: string;
165
165
  description: string;
166
166
  prompt: string;
167
+ /**
168
+ * Owner user id when this config represents a user's personal assistant.
169
+ * `undefined` means a tenant/workspace-shared agent, which is the only kind
170
+ * discoverable in shared contexts (e.g. a public room's executor list).
171
+ */
172
+ ownerUserId?: string;
167
173
  /**
168
174
  * Key of the parent agent to inherit configuration from.
169
175
  * When set, unspecified fields are inherited from the parent agent's config.
@@ -2409,14 +2415,50 @@ interface ConnectionEntry {
2409
2415
  name: string;
2410
2416
  description?: string;
2411
2417
  config: Record<string, unknown>;
2418
+ /**
2419
+ * Names of config fields that hold secrets (API keys, passwords, tokens).
2420
+ *
2421
+ * Stores persist this list alongside the entry and use it to encrypt those
2422
+ * config values at rest on write and transparently decrypt them on read.
2423
+ * `config` in a returned entry is always the decrypted, real value — callers
2424
+ * (gateway API, runtime plugin resolution) never see ciphertext.
2425
+ *
2426
+ * Absent/empty means the entry has no encrypted fields (e.g. legacy rows or
2427
+ * connection types whose schema defines no password fields).
2428
+ */
2429
+ secretFields?: string[];
2412
2430
  createdAt: string;
2413
2431
  updatedAt: string;
2414
2432
  }
2415
2433
  interface ConnectionStore {
2416
2434
  listByTenant(tenantId: string): Promise<ConnectionEntry[]>;
2435
+ /**
2436
+ * List a tenant's connections of one plugin type.
2437
+ *
2438
+ * `config` in the returned entries is decrypted — implementations decrypt the
2439
+ * fields named by each entry's `secretFields` before returning.
2440
+ */
2417
2441
  listByType(tenantId: string, type: string): Promise<ConnectionEntry[]>;
2442
+ /**
2443
+ * Read one connection by key.
2444
+ *
2445
+ * `config` in the returned entry is decrypted (see `listByType`).
2446
+ */
2418
2447
  getByKey(tenantId: string, type: string, key: string): Promise<ConnectionEntry | null>;
2448
+ /**
2449
+ * Create a connection.
2450
+ *
2451
+ * Implementations encrypt the `secretFields` of `config` at rest; the
2452
+ * returned entry carries the plaintext `config` the caller supplied.
2453
+ */
2419
2454
  create(entry: Omit<ConnectionEntry, "id" | "createdAt" | "updatedAt">): Promise<ConnectionEntry>;
2455
+ /**
2456
+ * Update a connection.
2457
+ *
2458
+ * When `updates.config` is present, the effective secret fields are
2459
+ * `updates.secretFields ?? existing.secretFields`; those fields are
2460
+ * re-encrypted before persistence.
2461
+ */
2420
2462
  update(tenantId: string, type: string, key: string, updates: Partial<ConnectionEntry>): Promise<ConnectionEntry | null>;
2421
2463
  delete(tenantId: string, type: string, key: string): Promise<boolean>;
2422
2464
  }
@@ -5435,6 +5477,10 @@ interface ChannelAdapter<TConfig = unknown> {
5435
5477
  * 可选:断开持久连接并停止接收事件。
5436
5478
  * 当 channel installation 被禁用或删除时调用。
5437
5479
  * `installationId` 用于标识要断开的具体安装实例。
5480
+ *
5481
+ * 实现必须是**幂等**且对未连接的 installation 安全(no-op):多副本下
5482
+ * `ChannelConnectionLeader` 在失去租约时会对共享 store 中的全部启用安装
5483
+ * 调用 `disconnect`,其中可能包含本副本从未 `connect` 的实例。
5438
5484
  */
5439
5485
  disconnect?(installationId: string): Promise<void>;
5440
5486
  }
@@ -6136,6 +6182,12 @@ interface ProjectBotMembership {
6136
6182
  roomThreadId: string;
6137
6183
  joinedAt: Date;
6138
6184
  updatedAt: Date;
6185
+ /**
6186
+ * True for a not-yet-materialized "virtual" public-project entry (dynamic
6187
+ * roster projection). Virtual entries have no persisted row; their id
6188
+ * materializes just-in-time on first interaction. Absent on real members.
6189
+ */
6190
+ provisional?: boolean;
6139
6191
  }
6140
6192
  /** Identifies a human author of a project room message. */
6141
6193
  interface ProjectRoomMessageHumanAuthor {
@@ -6412,6 +6464,49 @@ interface UserPushSubscriptionStore {
6412
6464
  delete(tenantId: string, userId: string, endpoint: string): Promise<boolean>;
6413
6465
  }
6414
6466
 
6467
+ /** Lifecycle states of a published plugin's resident service. */
6468
+ type PluginDeploymentStatus = "requested" | "provisioning" | "running" | "paused" | "stopping" | "stopped" | "failed";
6469
+ /** Lifecycle strategy: lazily paused vs. permanently resident. */
6470
+ type PluginDeploymentMode = "onDemand" | "alwaysOn";
6471
+ /** Durable tenant-scoped record of one published plugin's resident service. */
6472
+ interface PluginDeployment {
6473
+ id: string;
6474
+ tenantId: string;
6475
+ pluginType: string;
6476
+ pluginVersion: string;
6477
+ mode: PluginDeploymentMode;
6478
+ status: PluginDeploymentStatus;
6479
+ /** Backend provider key, e.g. "microsandbox-remote" | "opensandbox". */
6480
+ provider: string;
6481
+ /** Deterministic sandbox identity (`plugin-<hash(tenantId, pluginType)>`). */
6482
+ sandboxName: string;
6483
+ /** Guest port published by the host server. */
6484
+ port: number;
6485
+ /** Resolved endpoint (scheme-less route or host:port); may change over time. */
6486
+ endpoint?: string;
6487
+ /** Image used to create the sandbox, when pinned. */
6488
+ imageRef?: string;
6489
+ /** Idle timeout before an onDemand deployment is paused. */
6490
+ idleTimeoutMs: number;
6491
+ lastHealthAt?: string;
6492
+ lastError?: string;
6493
+ createdAt: string;
6494
+ updatedAt: string;
6495
+ }
6496
+ /** Persistence operations for plugin deployments. */
6497
+ interface PluginDeploymentStore {
6498
+ /** Lists every deployment for a tenant. */
6499
+ listByTenant(tenantId: string): Promise<PluginDeployment[]>;
6500
+ /** Returns the deployment for a plugin type, or undefined. */
6501
+ get(tenantId: string, pluginType: string): Promise<PluginDeployment | undefined>;
6502
+ /** Inserts or replaces a deployment keyed by tenant + plugin type. */
6503
+ upsert(deployment: PluginDeployment): Promise<PluginDeployment>;
6504
+ /** Applies a partial update (status/endpoint/health); returns the updated record. */
6505
+ updateStatus(tenantId: string, pluginType: string, patch: Partial<Omit<PluginDeployment, "id" | "tenantId" | "pluginType">>): Promise<PluginDeployment | undefined>;
6506
+ /** Deletes a deployment. Returns whether a row was removed. */
6507
+ delete(tenantId: string, pluginType: string): Promise<boolean>;
6508
+ }
6509
+
6415
6510
  /** One held distributed lease. */
6416
6511
  interface LeaseRecord {
6417
6512
  /** Lease key (e.g. `task-run:<taskId>`); unique across replicas. */
@@ -7011,10 +7106,13 @@ interface PluginConnection {
7011
7106
  resourceLabel?: string;
7012
7107
  }
7013
7108
  /**
7014
- * UI declaration for a plugin tool: an HTML file rendered as an MCP App when
7015
- * the tool runs.
7109
+ * UI declaration for a plugin tool: an HTML resource rendered as an MCP App
7110
+ * when the tool runs.
7016
7111
  *
7017
- * @property resource - Safe relative path (within the plugin directory) to an `.html` file.
7112
+ * @property resource - For GLOBAL plugins, a `ui://` key into the plugin's
7113
+ * `meta.uiResources` map (inline HTML served without a sandbox read). For
7114
+ * tenant sandbox plugins, a safe relative path (within the plugin directory)
7115
+ * to an `.html` file on the tenant volume.
7018
7116
  * @property displayMode - Preferred display mode; defaults to `inline` (resolved by the compiler).
7019
7117
  * @property csp - Origins the UI needs (see `McpUiCsp`).
7020
7118
  * @property permissions - Sandbox permissions requested (see `McpUiPermissions`).
@@ -7398,6 +7496,15 @@ interface ProjectRoomTrustedRunContext {
7398
7496
  * naming any specific value (ADR-118).
7399
7497
  */
7400
7498
  source?: string;
7499
+ /**
7500
+ * Host-provided signal that this project has no authored roster.
7501
+ *
7502
+ * Optional; `true` when present, `undefined`/`false` is treated as absent. Core uses it to skip
7503
+ * Project roster authorization for the run's caller and owner (any tenant agent may own a task) and
7504
+ * to list the tenant's agents — not the persisted roster — as available executors. The host stamps
7505
+ * it only for the workspace general project. Mirrors {@link ProjectTaskTrustedRunContext.rosterExempt}.
7506
+ */
7507
+ rosterExempt?: boolean;
7401
7508
  }
7402
7509
  /** Trusted Project Task identity persisted with a privileged queue message. */
7403
7510
  interface ProjectTaskTrustedRunContext {
@@ -7503,4 +7610,4 @@ declare function threadAffinityHeaders(threadId: string | undefined): Record<str
7503
7610
  */
7504
7611
  declare function buildAffinityMissChunk(owner: string, threadId: string): MessageChunk;
7505
7612
 
7506
- export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2ARemoteAgentConfig, AFFINITY_ECHO_HEADER, AFFINITY_MISS_CODE, AGENT_AFFINITY_HEADER, type AgentClient, type AgentConfig, type AgentConfigWithTools, 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 AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrowserMiddlewareConfig, 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 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 CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateModelProviderRequest, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DiscoveredModel, type DispatchResult, DuplicateChannelBindingSubjectError, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, type FileMenuConfig, 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 InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type LLMConfig, 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, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpAppMenuConfig, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, 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 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, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OutboundMessage, type OutboxEvent, type OutboxStore, 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 Plugin, type PluginConnection, type PluginConnectionFieldSchema, type PluginConnectionTestResult, type PluginContext, type PluginDiscoveredResource, type PluginMeta, type PluginMetaOutput, type PluginMiddlewareFactory, type PluginSkillDefinition, type PluginSkillResource, type PluginStandardConnectionConfig, type PluginToolMeta, type PluginToolUi, type PluginUiResource, type ProcessingAgentConfig, 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 ResourceAddress, type ResourceResolver, type Result, type RunScope, type RunStep, 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 ShareRecord, type ShareResult, 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 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 TeamAgentConfig, type TeamTeammateConfig, type Tenant, type TenantModelCatalog, type TenantModelPublicEntry, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, 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 UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, 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 WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, affinityEchoHeaders, assertGenericProjectConfig, buildAffinityMissChunk, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, firstNonEmptyString, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isMcpUiRef, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, isWorkspacePublicRoomProjectId, normalizeTaskMetadataScalar, parseAgentWebAppGenUIBlock, parseMcpUiRef, parseModelKey, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, resolveRunScope, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, threadAffinityHeaders, toModelKey, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
7613
+ export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2ARemoteAgentConfig, AFFINITY_ECHO_HEADER, AFFINITY_MISS_CODE, AGENT_AFFINITY_HEADER, type AgentClient, type AgentConfig, type AgentConfigWithTools, 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 AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrowserMiddlewareConfig, 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 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 CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateModelProviderRequest, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DiscoveredModel, type DispatchResult, DuplicateChannelBindingSubjectError, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, type FileMenuConfig, 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 InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type LLMConfig, 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, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpAppMenuConfig, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, 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 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, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OutboundMessage, type OutboxEvent, type OutboxStore, 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 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 ProcessingAgentConfig, 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 ResourceAddress, type ResourceResolver, type Result, type RunScope, type RunStep, 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 ShareRecord, type ShareResult, 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 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 TeamAgentConfig, type TeamTeammateConfig, type Tenant, type TenantModelCatalog, type TenantModelPublicEntry, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, 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 UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, 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 WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, affinityEchoHeaders, assertGenericProjectConfig, buildAffinityMissChunk, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, firstNonEmptyString, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isMcpUiRef, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, isWorkspacePublicRoomProjectId, normalizeTaskMetadataScalar, parseAgentWebAppGenUIBlock, parseMcpUiRef, parseModelKey, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, resolveRunScope, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, threadAffinityHeaders, toModelKey, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
package/dist/index.js CHANGED
@@ -988,10 +988,11 @@ function parseTrustedRunContext(value) {
988
988
  "role",
989
989
  "title"
990
990
  ];
991
- const projectRoomValues = snapshotExactRecord(projectRoomValue, requiredKeys, ["responsibility", "source"]);
991
+ const projectRoomValues = snapshotExactRecord(projectRoomValue, requiredKeys, ["responsibility", "source", "rosterExempt"]);
992
992
  const hasResponsibility = projectRoomValues !== void 0 && Object.prototype.hasOwnProperty.call(projectRoomValues, "responsibility");
993
993
  const hasSource = projectRoomValues !== void 0 && Object.prototype.hasOwnProperty.call(projectRoomValues, "source");
994
- if (!projectRoomValues || requiredKeys.some((key) => typeof projectRoomValues[key] !== "string" || projectRoomValues[key].length === 0) || hasResponsibility && projectRoomValues.responsibility !== void 0 && (typeof projectRoomValues.responsibility !== "string" || projectRoomValues.responsibility.length === 0) || hasSource && projectRoomValues.source !== void 0 && (typeof projectRoomValues.source !== "string" || projectRoomValues.source.length === 0) || projectRoomValues.role !== "coordinator" && projectRoomValues.role !== "specialist") {
994
+ const hasRosterExempt = projectRoomValues !== void 0 && Object.prototype.hasOwnProperty.call(projectRoomValues, "rosterExempt");
995
+ if (!projectRoomValues || requiredKeys.some((key) => typeof projectRoomValues[key] !== "string" || projectRoomValues[key].length === 0) || hasResponsibility && projectRoomValues.responsibility !== void 0 && (typeof projectRoomValues.responsibility !== "string" || projectRoomValues.responsibility.length === 0) || hasSource && projectRoomValues.source !== void 0 && (typeof projectRoomValues.source !== "string" || projectRoomValues.source.length === 0) || hasRosterExempt && projectRoomValues.rosterExempt !== void 0 && typeof projectRoomValues.rosterExempt !== "boolean" || projectRoomValues.role !== "coordinator" && projectRoomValues.role !== "specialist") {
995
996
  throw new Error("Invalid trusted agent run context");
996
997
  }
997
998
  const parsedProjectRoom = {
@@ -1012,6 +1013,9 @@ function parseTrustedRunContext(value) {
1012
1013
  if (hasSource && typeof projectRoomValues.source === "string") {
1013
1014
  parsedProjectRoom.source = projectRoomValues.source;
1014
1015
  }
1016
+ if (hasRosterExempt && projectRoomValues.rosterExempt === true) {
1017
+ parsedProjectRoom.rosterExempt = true;
1018
+ }
1015
1019
  return { projectRoom: parsedProjectRoom };
1016
1020
  }
1017
1021
  function parseQueuedExecutionMode(value) {