@axiom-lattice/protocols 4.7.1 → 4.9.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
@@ -102,6 +102,17 @@ interface LLMConfig {
102
102
  streaming?: boolean;
103
103
  apiKeyEnvName?: string;
104
104
  apiKey?: string;
105
+ /**
106
+ * The upstream requires no credentials.
107
+ *
108
+ * A locally hosted model server — Ollama, vLLM, LM Studio — usually accepts
109
+ * unauthenticated requests. Without this flag a config carrying no key falls
110
+ * back to `process.env[apiKeyEnvName ?? "<PROVIDER>_API_KEY"]`, which would
111
+ * send the *gateway's own* deployment credential to whatever host the tenant
112
+ * configured. Setting it makes "no credential" an explicit statement rather
113
+ * than a missing value, so the fallback never runs.
114
+ */
115
+ noAuth?: boolean;
105
116
  baseURL?: string;
106
117
  modelKwargs?: Record<string, any>;
107
118
  extra?: Record<string, any>;
@@ -164,6 +175,12 @@ interface BaseAgentConfig {
164
175
  name: string;
165
176
  description: string;
166
177
  prompt: string;
178
+ /**
179
+ * Owner user id when this config represents a user's personal assistant.
180
+ * `undefined` means a tenant/workspace-shared agent, which is the only kind
181
+ * discoverable in shared contexts (e.g. a public room's executor list).
182
+ */
183
+ ownerUserId?: string;
167
184
  /**
168
185
  * Key of the parent agent to inherit configuration from.
169
186
  * When set, unspecified fields are inherited from the parent agent's config.
@@ -2458,7 +2475,7 @@ interface ConnectionStore {
2458
2475
  }
2459
2476
 
2460
2477
  /** Channel types persisted by the installation store, including internal-only channels. */
2461
- type ChannelInstallationType = "lark" | "email" | "slack" | "wechat" | "room";
2478
+ type ChannelInstallationType = "lark" | "email" | "slack" | "wechat" | "wecom" | "room";
2462
2479
  /** Channel types exposed by the public installation management API. */
2463
2480
  type PublicChannelInstallationType = Exclude<ChannelInstallationType, "room">;
2464
2481
  /** Credentials and routing configuration for a Lark installation. */
@@ -2474,6 +2491,18 @@ interface WechatChannelInstallationConfig {
2474
2491
  botToken: string;
2475
2492
  uin?: string;
2476
2493
  }
2494
+ /**
2495
+ * Credentials for a WeCom (企业微信) 智能机器人 installation using the
2496
+ * long-connection (API 模式) transport. Only `botId` + `secret` are needed —
2497
+ * no CorpID / AgentID / Token / EncodingAESKey, and no callback URL.
2498
+ */
2499
+ interface WecomChannelInstallationConfig {
2500
+ /** 机器人 BotID. */
2501
+ botId: string;
2502
+ /** 长连接专用 Secret. */
2503
+ secret: string;
2504
+ assistantId?: string;
2505
+ }
2477
2506
  /** A persisted tenant-scoped channel installation. */
2478
2507
  interface ChannelInstallation<TConfig = unknown> {
2479
2508
  id: string;
@@ -2504,6 +2533,9 @@ type CreateChannelInstallationRequest = PublicInstallationBase & ({
2504
2533
  } | {
2505
2534
  channel: "wechat";
2506
2535
  config: WechatChannelInstallationConfig;
2536
+ } | {
2537
+ channel: "wecom";
2538
+ config: WecomChannelInstallationConfig;
2507
2539
  } | {
2508
2540
  channel: "email" | "slack";
2509
2541
  config: Record<string, unknown>;
@@ -3313,14 +3345,16 @@ interface CreateModelProviderRequest {
3313
3345
  */
3314
3346
  baseURL: string;
3315
3347
  /**
3316
- * Upstream API key. Required: a provider must always carry a credential.
3348
+ * Upstream API key. Optional: omitted means the upstream needs no
3349
+ * authentication, which is the normal case for a locally hosted model server
3350
+ * (Ollama, vLLM, LM Studio).
3317
3351
  *
3318
- * A keyless provider is not merely useless — it is unsafe. `initChatModel`
3319
- * falls back to `process.env[apiKeyEnvName ?? "OPENAI_API_KEY"]` when the
3320
- * config carries no key, so a keyless provider pointed at a tenant-chosen
3321
- * host would send the gateway's own deployment credential to it.
3352
+ * A keyless provider must never fall back to the gateway's own environment
3353
+ * credentials. `initChatModel` would otherwise reach for `OPENAI_API_KEY` and
3354
+ * send the deployment's credential to the tenant's host. The runtime config
3355
+ * carries an explicit no-auth marker instead — see `LLMConfig.noAuth`.
3322
3356
  */
3323
- apiKey: string;
3357
+ apiKey?: string;
3324
3358
  /**
3325
3359
  * Whether this provider participates in discovery and registration
3326
3360
  */
@@ -3411,6 +3445,21 @@ interface ProviderModelInput extends DiscoveredModel {
3411
3445
  * Distinct from `enabled: false`, which means the tenant switched it off.
3412
3446
  */
3413
3447
  stale?: boolean;
3448
+ /**
3449
+ * Per-model LLM config, merged over the provider's own settings when the
3450
+ * runtime client is built.
3451
+ *
3452
+ * This is what lets one model on a provider run at a different temperature,
3453
+ * or carry `modelKwargs` the server needs, without duplicating the provider.
3454
+ */
3455
+ extra?: Record<string, unknown>;
3456
+ /**
3457
+ * Whether this is the tenant's default model.
3458
+ *
3459
+ * Omitted means "leave the stored flag alone": a discovery pass carries no
3460
+ * opinion about which model is the default, and must not clear it.
3461
+ */
3462
+ isDefault?: boolean;
3414
3463
  }
3415
3464
  /**
3416
3465
  * One model in an explicit provider model selection.
@@ -3425,6 +3474,22 @@ interface ModelSelection {
3425
3474
  enabled: boolean;
3426
3475
  /** The upstream no longer offers this model; the row is kept, flagged. */
3427
3476
  stale?: boolean;
3477
+ /**
3478
+ * Per-model LLM config, merged over the provider's own settings.
3479
+ *
3480
+ * Omitted means "leave whatever is stored alone" — the selection carries only
3481
+ * what the caller is changing, and a model edited through the picker must not
3482
+ * lose the config it already had.
3483
+ */
3484
+ extra?: Record<string, unknown>;
3485
+ /**
3486
+ * Whether this is the tenant's default model.
3487
+ *
3488
+ * At most one model per tenant may carry it. Omitted means "leave the stored
3489
+ * flag alone"; a default can only be replaced, never dropped by omission —
3490
+ * see `ModelProviderStore.getDefaultModel`.
3491
+ */
3492
+ isDefault?: boolean;
3428
3493
  }
3429
3494
  /**
3430
3495
  * A model recorded in a provider's snapshot
@@ -3468,6 +3533,20 @@ interface ModelProviderModelEntry {
3468
3533
  * distinguishable from "switched off here".
3469
3534
  */
3470
3535
  stale?: boolean;
3536
+ /**
3537
+ * Per-model LLM config, merged over the provider's own settings when the
3538
+ * runtime client is built. Absent when the model runs on the provider's
3539
+ * settings alone.
3540
+ */
3541
+ extra?: Record<string, unknown>;
3542
+ /**
3543
+ * Whether this is the tenant's default model.
3544
+ *
3545
+ * At most one row per tenant carries it, enforced by a partial unique index.
3546
+ * It is what a bare `"default"` model key resolves to for that tenant, and it
3547
+ * cannot be deleted — replacing it means marking another model first.
3548
+ */
3549
+ isDefault?: boolean;
3471
3550
  /**
3472
3551
  * Timestamp of the discovery that produced this row
3473
3552
  */
@@ -3587,6 +3666,17 @@ interface TenantModelPublicEntry {
3587
3666
  * The upstream no longer offers this model (see `ModelProviderModelEntry.stale`)
3588
3667
  */
3589
3668
  stale: boolean;
3669
+ /**
3670
+ * Per-model LLM config, merged over the provider's own settings. Absent when
3671
+ * the model runs on the provider's settings alone.
3672
+ */
3673
+ extra?: Record<string, unknown>;
3674
+ /**
3675
+ * Whether this is the tenant's default model — the one a bare `"default"`
3676
+ * key resolves to, and the one a tenant without its own would otherwise take
3677
+ * from the deployment.
3678
+ */
3679
+ isDefault?: boolean;
3590
3680
  /**
3591
3681
  * Whether this model can actually be executed by an agent.
3592
3682
  * Phase 1: true only for the `default` tenant.
@@ -5450,7 +5540,15 @@ interface ChannelAdapter<TConfig = unknown> {
5450
5540
  *
5451
5541
  * 与 `sendReply` 不同,这不是对某条入站消息的最终回复,而是运行中途
5452
5542
  * 产生的一条独立 bot 消息(例如 Project Room 的 clarify 卡片)。
5453
- * `message.metadata.inputMessageId` 关联触发该运行的入站队列消息。
5543
+ *
5544
+ * 支持两种(互斥的)关联方式,均由 `message.metadata` 承载:
5545
+ * - `message.metadata.inputMessageId`:legacy presence 关联,指向触发该
5546
+ * 运行的入站队列消息;需配合 `replyTarget.rawTarget` 中的
5547
+ * `sourceRoomMessageId` / `inputMessageId`。
5548
+ * - `message.metadata.correlationKey`(可选):**source-less/correlated**
5549
+ * 中断,没有入站输入消息;由调用方提供关联键,幂等性以「每次中断」为单位
5550
+ * (idempotency key 派生自该 correlationKey),`replyTarget.rawTarget`
5551
+ * 只需 `targetMembershipId`。
5454
5552
  */
5455
5553
  sendInterrupt?(replyTarget: ReplyTarget, message: OutboundMessage, installation: ChannelInstallation): Promise<void>;
5456
5554
  /**
@@ -5471,6 +5569,10 @@ interface ChannelAdapter<TConfig = unknown> {
5471
5569
  * 可选:断开持久连接并停止接收事件。
5472
5570
  * 当 channel installation 被禁用或删除时调用。
5473
5571
  * `installationId` 用于标识要断开的具体安装实例。
5572
+ *
5573
+ * 实现必须是**幂等**且对未连接的 installation 安全(no-op):多副本下
5574
+ * `ChannelConnectionLeader` 在失去租约时会对共享 store 中的全部启用安装
5575
+ * 调用 `disconnect`,其中可能包含本副本从未 `connect` 的实例。
5474
5576
  */
5475
5577
  disconnect?(installationId: string): Promise<void>;
5476
5578
  }
@@ -6172,6 +6274,12 @@ interface ProjectBotMembership {
6172
6274
  roomThreadId: string;
6173
6275
  joinedAt: Date;
6174
6276
  updatedAt: Date;
6277
+ /**
6278
+ * True for a not-yet-materialized "virtual" public-project entry (dynamic
6279
+ * roster projection). Virtual entries have no persisted row; their id
6280
+ * materializes just-in-time on first interaction. Absent on real members.
6281
+ */
6282
+ provisional?: boolean;
6175
6283
  }
6176
6284
  /** Identifies a human author of a project room message. */
6177
6285
  interface ProjectRoomMessageHumanAuthor {
@@ -6448,6 +6556,49 @@ interface UserPushSubscriptionStore {
6448
6556
  delete(tenantId: string, userId: string, endpoint: string): Promise<boolean>;
6449
6557
  }
6450
6558
 
6559
+ /** Lifecycle states of a published plugin's resident service. */
6560
+ type PluginDeploymentStatus = "requested" | "provisioning" | "running" | "paused" | "stopping" | "stopped" | "failed";
6561
+ /** Lifecycle strategy: lazily paused vs. permanently resident. */
6562
+ type PluginDeploymentMode = "onDemand" | "alwaysOn";
6563
+ /** Durable tenant-scoped record of one published plugin's resident service. */
6564
+ interface PluginDeployment {
6565
+ id: string;
6566
+ tenantId: string;
6567
+ pluginType: string;
6568
+ pluginVersion: string;
6569
+ mode: PluginDeploymentMode;
6570
+ status: PluginDeploymentStatus;
6571
+ /** Backend provider key, e.g. "microsandbox-remote" | "opensandbox". */
6572
+ provider: string;
6573
+ /** Deterministic sandbox identity (`plugin-<hash(tenantId, pluginType)>`). */
6574
+ sandboxName: string;
6575
+ /** Guest port published by the host server. */
6576
+ port: number;
6577
+ /** Resolved endpoint (scheme-less route or host:port); may change over time. */
6578
+ endpoint?: string;
6579
+ /** Image used to create the sandbox, when pinned. */
6580
+ imageRef?: string;
6581
+ /** Idle timeout before an onDemand deployment is paused. */
6582
+ idleTimeoutMs: number;
6583
+ lastHealthAt?: string;
6584
+ lastError?: string;
6585
+ createdAt: string;
6586
+ updatedAt: string;
6587
+ }
6588
+ /** Persistence operations for plugin deployments. */
6589
+ interface PluginDeploymentStore {
6590
+ /** Lists every deployment for a tenant. */
6591
+ listByTenant(tenantId: string): Promise<PluginDeployment[]>;
6592
+ /** Returns the deployment for a plugin type, or undefined. */
6593
+ get(tenantId: string, pluginType: string): Promise<PluginDeployment | undefined>;
6594
+ /** Inserts or replaces a deployment keyed by tenant + plugin type. */
6595
+ upsert(deployment: PluginDeployment): Promise<PluginDeployment>;
6596
+ /** Applies a partial update (status/endpoint/health); returns the updated record. */
6597
+ updateStatus(tenantId: string, pluginType: string, patch: Partial<Omit<PluginDeployment, "id" | "tenantId" | "pluginType">>): Promise<PluginDeployment | undefined>;
6598
+ /** Deletes a deployment. Returns whether a row was removed. */
6599
+ delete(tenantId: string, pluginType: string): Promise<boolean>;
6600
+ }
6601
+
6451
6602
  /** One held distributed lease. */
6452
6603
  interface LeaseRecord {
6453
6604
  /** Lease key (e.g. `task-run:<taskId>`); unique across replicas. */
@@ -7047,10 +7198,13 @@ interface PluginConnection {
7047
7198
  resourceLabel?: string;
7048
7199
  }
7049
7200
  /**
7050
- * UI declaration for a plugin tool: an HTML file rendered as an MCP App when
7051
- * the tool runs.
7201
+ * UI declaration for a plugin tool: an HTML resource rendered as an MCP App
7202
+ * when the tool runs.
7052
7203
  *
7053
- * @property resource - Safe relative path (within the plugin directory) to an `.html` file.
7204
+ * @property resource - For GLOBAL plugins, a `ui://` key into the plugin's
7205
+ * `meta.uiResources` map (inline HTML served without a sandbox read). For
7206
+ * tenant sandbox plugins, a safe relative path (within the plugin directory)
7207
+ * to an `.html` file on the tenant volume.
7054
7208
  * @property displayMode - Preferred display mode; defaults to `inline` (resolved by the compiler).
7055
7209
  * @property csp - Origins the UI needs (see `McpUiCsp`).
7056
7210
  * @property permissions - Sandbox permissions requested (see `McpUiPermissions`).
@@ -7434,6 +7588,15 @@ interface ProjectRoomTrustedRunContext {
7434
7588
  * naming any specific value (ADR-118).
7435
7589
  */
7436
7590
  source?: string;
7591
+ /**
7592
+ * Host-provided signal that this project has no authored roster.
7593
+ *
7594
+ * Optional; `true` when present, `undefined`/`false` is treated as absent. Core uses it to skip
7595
+ * Project roster authorization for the run's caller and owner (any tenant agent may own a task) and
7596
+ * to list the tenant's agents — not the persisted roster — as available executors. The host stamps
7597
+ * it only for the workspace general project. Mirrors {@link ProjectTaskTrustedRunContext.rosterExempt}.
7598
+ */
7599
+ rosterExempt?: boolean;
7437
7600
  }
7438
7601
  /** Trusted Project Task identity persisted with a privileged queue message. */
7439
7602
  interface ProjectTaskTrustedRunContext {
@@ -7539,4 +7702,4 @@ declare function threadAffinityHeaders(threadId: string | undefined): Record<str
7539
7702
  */
7540
7703
  declare function buildAffinityMissChunk(owner: string, threadId: string): MessageChunk;
7541
7704
 
7542
- 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 };
7705
+ 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 WecomChannelInstallationConfig, 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) {