@axiom-lattice/protocols 4.1.4 → 4.2.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.1.4 build /home/runner/work/agentic/agentic/packages/protocols
2
+ > @axiom-lattice/protocols@4.2.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
- CJS dist/index.js 40.66 KB
12
- CJS dist/index.js.map 130.52 KB
13
- CJS ⚡️ Build success in 323ms
14
- ESM dist/index.mjs 36.69 KB
15
- ESM dist/index.mjs.map 127.15 KB
16
- ESM ⚡️ Build success in 348ms
11
+ ESM dist/index.mjs 37.07 KB
12
+ ESM dist/index.mjs.map 128.88 KB
13
+ ESM ⚡️ Build success in 264ms
14
+ CJS dist/index.js 41.18 KB
15
+ CJS dist/index.js.map 132.31 KB
16
+ CJS ⚡️ Build success in 302ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 16465ms
19
- DTS dist/index.d.ts 201.42 KB
20
- DTS dist/index.d.mts 201.42 KB
18
+ DTS ⚡️ Build success in 17045ms
19
+ DTS dist/index.d.ts 204.17 KB
20
+ DTS dist/index.d.mts 204.17 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @axiom-lattice/protocols
2
2
 
3
+ ## 4.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a2a0615: feat: MCP server connection authentication — `McpServerConfig.headers` (http/sse, encrypted at rest) plumbed through stores, gateway connections, and the config form; env-variable editor for stdio; SSE deprecation hint in the form.
8
+
9
+ ### Patch Changes
10
+
11
+ - af3dff0: fix web app
12
+
13
+ ## 4.1.5
14
+
15
+ ### Patch Changes
16
+
17
+ - 15d2469: fix issue
18
+
3
19
  ## 4.1.4
4
20
 
5
21
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1771,8 +1771,14 @@ interface McpServerConfig {
1771
1771
  args?: string[];
1772
1772
  /** URL for HTTP/SSE transport */
1773
1773
  url?: string;
1774
- /** Environment variables */
1774
+ /** Environment variables (stdio transport; credentials passed to the server process) */
1775
1775
  env?: Record<string, string>;
1776
+ /**
1777
+ * Custom HTTP headers sent with every request (streamable_http / sse only).
1778
+ * Commonly used for authentication, e.g. `{ Authorization: "Bearer <token>" }`.
1779
+ * Ignored for stdio transport. Values are encrypted at rest by config stores.
1780
+ */
1781
+ headers?: Record<string, string>;
1776
1782
  /** Connection timeout in milliseconds */
1777
1783
  timeout?: number;
1778
1784
  /** Retry attempts on connection failure */
@@ -2865,7 +2871,8 @@ interface McpServerConfigEntry {
2865
2871
  */
2866
2872
  selectedTools: string[];
2867
2873
  /**
2868
- * Whether the env field is encrypted in storage
2874
+ * Whether secret values (env vars and headers) are encrypted at rest.
2875
+ * Field name kept for backward compatibility; it covers config.headers too.
2869
2876
  */
2870
2877
  isEnvEncrypted: boolean;
2871
2878
  /**
@@ -5374,6 +5381,38 @@ interface ProjectRoomMessageStore {
5374
5381
  }): Promise<ProjectRoomMessage[]>;
5375
5382
  /** Finds a room message by identifier within a tenant. */
5376
5383
  findById(tenantId: string, id: string): Promise<ProjectRoomMessage | null>;
5384
+ /** Counts messages created strictly after a horizon, optionally excluding one human author. */
5385
+ countAfter(input: {
5386
+ tenantId: string;
5387
+ roomId: string;
5388
+ after: Date;
5389
+ excludeAuthorUserId?: string;
5390
+ }): Promise<number>;
5391
+ }
5392
+
5393
+ /** A user's per-room read marker used to compute unread counts. */
5394
+ interface ProjectRoomReadState {
5395
+ tenantId: string;
5396
+ roomId: string;
5397
+ userId: string;
5398
+ /** Read horizon: messages created strictly after this instant are unread. */
5399
+ lastReadAt: Date;
5400
+ updatedAt: Date;
5401
+ }
5402
+ /** Persistence operations for per-user, per-room read markers. */
5403
+ interface ProjectRoomReadStateStore {
5404
+ /** Returns the user's read marker for a room, or null when never reported. */
5405
+ get(tenantId: string, roomId: string, userId: string): Promise<ProjectRoomReadState | null>;
5406
+ /**
5407
+ * Upserts the read marker monotonically: an earlier lastReadAt never moves
5408
+ * the marker backwards. Returns the stored state after the write.
5409
+ */
5410
+ markRead(input: {
5411
+ tenantId: string;
5412
+ roomId: string;
5413
+ userId: string;
5414
+ lastReadAt: Date;
5415
+ }): Promise<ProjectRoomReadState>;
5377
5416
  }
5378
5417
 
5379
5418
  /** A safely extracted value from an own enumerable data-property descriptor. */
@@ -5478,10 +5517,22 @@ type ProjectRoomTaskChangedEvent = ProjectRoomEventOf<"task.changed", {
5478
5517
  ownerMembershipId: string;
5479
5518
  updatedAt: string;
5480
5519
  }>;
5520
+ /** A read-marker update broadcast on the acting user's channel. */
5521
+ type ProjectRoomReadChangedEvent = ProjectRoomEventOf<"read.changed", {
5522
+ projectId: string;
5523
+ roomId: string;
5524
+ lastReadAt: string;
5525
+ }>;
5526
+ /** A membership mutation that may change a user's room subscription set. */
5527
+ type ProjectRoomMembershipAffectedEvent = ProjectRoomEventOf<"membership.affected", {
5528
+ change: "added" | "removed" | "role_changed";
5529
+ projectId: string;
5530
+ roomId: string;
5531
+ }>;
5481
5532
  /** All identified business events retained by the realtime broker. */
5482
- type ProjectRoomBusinessEvent = ProjectRoomMessageCreatedEvent | ProjectRoomRosterChangedEvent | ProjectRoomMembershipChangedEvent | ProjectRoomTaskChangedEvent;
5533
+ type ProjectRoomBusinessEvent = ProjectRoomMessageCreatedEvent | ProjectRoomRosterChangedEvent | ProjectRoomMembershipChangedEvent | ProjectRoomTaskChangedEvent | ProjectRoomReadChangedEvent | ProjectRoomMembershipAffectedEvent;
5483
5534
  /** A business event before the broker assigns its process-local ID. */
5484
- type ProjectRoomBusinessEventDraft = Omit<ProjectRoomMessageCreatedEvent, "id"> | Omit<ProjectRoomRosterChangedEvent, "id"> | Omit<ProjectRoomMembershipChangedEvent, "id"> | Omit<ProjectRoomTaskChangedEvent, "id">;
5535
+ type ProjectRoomBusinessEventDraft = Omit<ProjectRoomMessageCreatedEvent, "id"> | Omit<ProjectRoomRosterChangedEvent, "id"> | Omit<ProjectRoomMembershipChangedEvent, "id"> | Omit<ProjectRoomTaskChangedEvent, "id"> | Omit<ProjectRoomReadChangedEvent, "id"> | Omit<ProjectRoomMembershipAffectedEvent, "id">;
5485
5536
  /** A connection control event; control events are never replayed. */
5486
5537
  type ProjectRoomControlEvent = {
5487
5538
  type: "ready";
@@ -5497,7 +5548,7 @@ type ProjectRoomControlEvent = {
5497
5548
  } | {
5498
5549
  type: "access.revoked";
5499
5550
  data: {
5500
- reason: "PROJECT_ACCESS_REVOKED" | "TOKEN_EXPIRED";
5551
+ reason: "PROJECT_ACCESS_REVOKED" | "TOKEN_EXPIRED" | "CONNECTION_SUPERSEDED";
5501
5552
  };
5502
5553
  };
5503
5554
  /** The authenticated identity used by Project Room realtime access checks. */
@@ -5559,6 +5610,10 @@ interface ProjectRoomEventId {
5559
5610
  declare function parseProjectRoomEventId(value: unknown): ProjectRoomEventId | undefined;
5560
5611
  /** Checks an event ID without relying on realm-specific object identity. */
5561
5612
  declare function isProjectRoomEventId(value: unknown): value is string;
5613
+ /** projectId sentinel marking a per-user event channel inside the room broker. */
5614
+ declare const PROJECT_ROOM_USER_CHANNEL_PROJECT = "__user_channel__";
5615
+ /** Builds the per-user broker scope used for membership and read broadcasts. */
5616
+ declare function projectRoomUserEventScope(tenantId: string, userId: string): ProjectRoomEventScope;
5562
5617
  /** Maps a canonical internal message to the strict public message DTO. */
5563
5618
  declare function toProjectRoomPublicMessage(value: unknown): ProjectRoomPublicMessage | undefined;
5564
5619
  /** A descriptor-safe message projection together with its canonical realtime scope. */
@@ -6167,4 +6222,4 @@ declare function parseTrustedRunContext(value: unknown): TrustedRunContext;
6167
6222
  */
6168
6223
  declare function parseQueuedExecutionMode(value: unknown): QueuedExecutionMode;
6169
6224
 
6170
- export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2AExposure, type A2ARemoteAgentConfig, 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 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 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 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 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 LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, MAX_PENDING_EXECUTION_RESULTS_LIMIT, 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 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 ModelLatticeProtocol, type OutboundMessage, 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 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 ProjectRoomMembershipChangedEvent, type ProjectRoomMention, type ProjectRoomMessage, type ProjectRoomMessageAuthor, type ProjectRoomMessageCreatedEvent, type ProjectRoomMessageCursor, type ProjectRoomMessageSource, type ProjectRoomMessageStore, type ProjectRoomPublicBotMembership, type ProjectRoomPublicMembership, type ProjectRoomPublicMessage, 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 PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, type ReactAgentConfig, type ReplyTarget, type ResourceAddress, type ResourceResolver, type Result, type RunStep, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, 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 TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, type WechatChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, assertGenericProjectConfig, createAgentWebAppStreamProjectionContext, descriptorDataValue, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, parseAgentWebAppGenUIBlock, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, replaceTaskBeliefState, requireProjectTaskWorkItemStore, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
6225
+ export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2AExposure, type A2ARemoteAgentConfig, 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 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 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 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 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 LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, MAX_PENDING_EXECUTION_RESULTS_LIMIT, 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 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 ModelLatticeProtocol, type OutboundMessage, 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 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 PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, type ReactAgentConfig, type ReplyTarget, type ResourceAddress, type ResourceResolver, type Result, type RunStep, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, 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 TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, type WechatChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, assertGenericProjectConfig, createAgentWebAppStreamProjectionContext, descriptorDataValue, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, parseAgentWebAppGenUIBlock, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
package/dist/index.d.ts CHANGED
@@ -1771,8 +1771,14 @@ interface McpServerConfig {
1771
1771
  args?: string[];
1772
1772
  /** URL for HTTP/SSE transport */
1773
1773
  url?: string;
1774
- /** Environment variables */
1774
+ /** Environment variables (stdio transport; credentials passed to the server process) */
1775
1775
  env?: Record<string, string>;
1776
+ /**
1777
+ * Custom HTTP headers sent with every request (streamable_http / sse only).
1778
+ * Commonly used for authentication, e.g. `{ Authorization: "Bearer <token>" }`.
1779
+ * Ignored for stdio transport. Values are encrypted at rest by config stores.
1780
+ */
1781
+ headers?: Record<string, string>;
1776
1782
  /** Connection timeout in milliseconds */
1777
1783
  timeout?: number;
1778
1784
  /** Retry attempts on connection failure */
@@ -2865,7 +2871,8 @@ interface McpServerConfigEntry {
2865
2871
  */
2866
2872
  selectedTools: string[];
2867
2873
  /**
2868
- * Whether the env field is encrypted in storage
2874
+ * Whether secret values (env vars and headers) are encrypted at rest.
2875
+ * Field name kept for backward compatibility; it covers config.headers too.
2869
2876
  */
2870
2877
  isEnvEncrypted: boolean;
2871
2878
  /**
@@ -5374,6 +5381,38 @@ interface ProjectRoomMessageStore {
5374
5381
  }): Promise<ProjectRoomMessage[]>;
5375
5382
  /** Finds a room message by identifier within a tenant. */
5376
5383
  findById(tenantId: string, id: string): Promise<ProjectRoomMessage | null>;
5384
+ /** Counts messages created strictly after a horizon, optionally excluding one human author. */
5385
+ countAfter(input: {
5386
+ tenantId: string;
5387
+ roomId: string;
5388
+ after: Date;
5389
+ excludeAuthorUserId?: string;
5390
+ }): Promise<number>;
5391
+ }
5392
+
5393
+ /** A user's per-room read marker used to compute unread counts. */
5394
+ interface ProjectRoomReadState {
5395
+ tenantId: string;
5396
+ roomId: string;
5397
+ userId: string;
5398
+ /** Read horizon: messages created strictly after this instant are unread. */
5399
+ lastReadAt: Date;
5400
+ updatedAt: Date;
5401
+ }
5402
+ /** Persistence operations for per-user, per-room read markers. */
5403
+ interface ProjectRoomReadStateStore {
5404
+ /** Returns the user's read marker for a room, or null when never reported. */
5405
+ get(tenantId: string, roomId: string, userId: string): Promise<ProjectRoomReadState | null>;
5406
+ /**
5407
+ * Upserts the read marker monotonically: an earlier lastReadAt never moves
5408
+ * the marker backwards. Returns the stored state after the write.
5409
+ */
5410
+ markRead(input: {
5411
+ tenantId: string;
5412
+ roomId: string;
5413
+ userId: string;
5414
+ lastReadAt: Date;
5415
+ }): Promise<ProjectRoomReadState>;
5377
5416
  }
5378
5417
 
5379
5418
  /** A safely extracted value from an own enumerable data-property descriptor. */
@@ -5478,10 +5517,22 @@ type ProjectRoomTaskChangedEvent = ProjectRoomEventOf<"task.changed", {
5478
5517
  ownerMembershipId: string;
5479
5518
  updatedAt: string;
5480
5519
  }>;
5520
+ /** A read-marker update broadcast on the acting user's channel. */
5521
+ type ProjectRoomReadChangedEvent = ProjectRoomEventOf<"read.changed", {
5522
+ projectId: string;
5523
+ roomId: string;
5524
+ lastReadAt: string;
5525
+ }>;
5526
+ /** A membership mutation that may change a user's room subscription set. */
5527
+ type ProjectRoomMembershipAffectedEvent = ProjectRoomEventOf<"membership.affected", {
5528
+ change: "added" | "removed" | "role_changed";
5529
+ projectId: string;
5530
+ roomId: string;
5531
+ }>;
5481
5532
  /** All identified business events retained by the realtime broker. */
5482
- type ProjectRoomBusinessEvent = ProjectRoomMessageCreatedEvent | ProjectRoomRosterChangedEvent | ProjectRoomMembershipChangedEvent | ProjectRoomTaskChangedEvent;
5533
+ type ProjectRoomBusinessEvent = ProjectRoomMessageCreatedEvent | ProjectRoomRosterChangedEvent | ProjectRoomMembershipChangedEvent | ProjectRoomTaskChangedEvent | ProjectRoomReadChangedEvent | ProjectRoomMembershipAffectedEvent;
5483
5534
  /** A business event before the broker assigns its process-local ID. */
5484
- type ProjectRoomBusinessEventDraft = Omit<ProjectRoomMessageCreatedEvent, "id"> | Omit<ProjectRoomRosterChangedEvent, "id"> | Omit<ProjectRoomMembershipChangedEvent, "id"> | Omit<ProjectRoomTaskChangedEvent, "id">;
5535
+ type ProjectRoomBusinessEventDraft = Omit<ProjectRoomMessageCreatedEvent, "id"> | Omit<ProjectRoomRosterChangedEvent, "id"> | Omit<ProjectRoomMembershipChangedEvent, "id"> | Omit<ProjectRoomTaskChangedEvent, "id"> | Omit<ProjectRoomReadChangedEvent, "id"> | Omit<ProjectRoomMembershipAffectedEvent, "id">;
5485
5536
  /** A connection control event; control events are never replayed. */
5486
5537
  type ProjectRoomControlEvent = {
5487
5538
  type: "ready";
@@ -5497,7 +5548,7 @@ type ProjectRoomControlEvent = {
5497
5548
  } | {
5498
5549
  type: "access.revoked";
5499
5550
  data: {
5500
- reason: "PROJECT_ACCESS_REVOKED" | "TOKEN_EXPIRED";
5551
+ reason: "PROJECT_ACCESS_REVOKED" | "TOKEN_EXPIRED" | "CONNECTION_SUPERSEDED";
5501
5552
  };
5502
5553
  };
5503
5554
  /** The authenticated identity used by Project Room realtime access checks. */
@@ -5559,6 +5610,10 @@ interface ProjectRoomEventId {
5559
5610
  declare function parseProjectRoomEventId(value: unknown): ProjectRoomEventId | undefined;
5560
5611
  /** Checks an event ID without relying on realm-specific object identity. */
5561
5612
  declare function isProjectRoomEventId(value: unknown): value is string;
5613
+ /** projectId sentinel marking a per-user event channel inside the room broker. */
5614
+ declare const PROJECT_ROOM_USER_CHANNEL_PROJECT = "__user_channel__";
5615
+ /** Builds the per-user broker scope used for membership and read broadcasts. */
5616
+ declare function projectRoomUserEventScope(tenantId: string, userId: string): ProjectRoomEventScope;
5562
5617
  /** Maps a canonical internal message to the strict public message DTO. */
5563
5618
  declare function toProjectRoomPublicMessage(value: unknown): ProjectRoomPublicMessage | undefined;
5564
5619
  /** A descriptor-safe message projection together with its canonical realtime scope. */
@@ -6167,4 +6222,4 @@ declare function parseTrustedRunContext(value: unknown): TrustedRunContext;
6167
6222
  */
6168
6223
  declare function parseQueuedExecutionMode(value: unknown): QueuedExecutionMode;
6169
6224
 
6170
- export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2AExposure, type A2ARemoteAgentConfig, 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 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 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 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 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 LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, MAX_PENDING_EXECUTION_RESULTS_LIMIT, 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 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 ModelLatticeProtocol, type OutboundMessage, 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 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 ProjectRoomMembershipChangedEvent, type ProjectRoomMention, type ProjectRoomMessage, type ProjectRoomMessageAuthor, type ProjectRoomMessageCreatedEvent, type ProjectRoomMessageCursor, type ProjectRoomMessageSource, type ProjectRoomMessageStore, type ProjectRoomPublicBotMembership, type ProjectRoomPublicMembership, type ProjectRoomPublicMessage, 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 PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, type ReactAgentConfig, type ReplyTarget, type ResourceAddress, type ResourceResolver, type Result, type RunStep, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, 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 TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, type WechatChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, assertGenericProjectConfig, createAgentWebAppStreamProjectionContext, descriptorDataValue, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, parseAgentWebAppGenUIBlock, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, replaceTaskBeliefState, requireProjectTaskWorkItemStore, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
6225
+ export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2AExposure, type A2ARemoteAgentConfig, 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 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 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 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 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 LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, MAX_PENDING_EXECUTION_RESULTS_LIMIT, 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 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 ModelLatticeProtocol, type OutboundMessage, 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 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 PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, type ReactAgentConfig, type ReplyTarget, type ResourceAddress, type ResourceResolver, type Result, type RunStep, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, 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 TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, type WechatChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, assertGenericProjectConfig, createAgentWebAppStreamProjectionContext, descriptorDataValue, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, parseAgentWebAppGenUIBlock, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
package/dist/index.js CHANGED
@@ -32,6 +32,7 @@ __export(index_exports, {
32
32
  McpMessageType: () => McpMessageType,
33
33
  MemoryType: () => MemoryType,
34
34
  MessageChunkTypes: () => MessageChunkTypes,
35
+ PROJECT_ROOM_USER_CHANNEL_PROJECT: () => PROJECT_ROOM_USER_CHANNEL_PROJECT,
35
36
  PROJECT_TASK_LIFECYCLE_ACTIONS: () => PROJECT_TASK_LIFECYCLE_ACTIONS,
36
37
  ProjectRoomBrokerCapacityError: () => ProjectRoomBrokerCapacityError,
37
38
  ProjectRoomCursorError: () => ProjectRoomCursorError,
@@ -60,6 +61,7 @@ __export(index_exports, {
60
61
  parseTaskBeliefState: () => parseTaskBeliefState,
61
62
  parseTrustedRunContext: () => parseTrustedRunContext,
62
63
  projectAgentWebAppChunk: () => projectAgentWebAppChunk,
64
+ projectRoomUserEventScope: () => projectRoomUserEventScope,
63
65
  replaceTaskBeliefState: () => replaceTaskBeliefState,
64
66
  requireProjectTaskWorkItemStore: () => requireProjectTaskWorkItemStore,
65
67
  snapshotExactArray: () => snapshotExactArray,
@@ -705,6 +707,11 @@ function parseProjectRoomEventId(value) {
705
707
  function isProjectRoomEventId(value) {
706
708
  return parseProjectRoomEventId(value) !== void 0;
707
709
  }
710
+ var PROJECT_ROOM_USER_CHANNEL_PROJECT = "__user_channel__";
711
+ function projectRoomUserEventScope(tenantId, userId) {
712
+ if (!tenantId || !userId) throw new TypeError("Project Room user scope requires non-empty identifiers");
713
+ return { tenantId, roomId: `__user__:${userId}`, projectId: PROJECT_ROOM_USER_CHANNEL_PROJECT };
714
+ }
708
715
  function isoDate(value) {
709
716
  if (typeof value !== "object" || value === null) return void 0;
710
717
  try {
@@ -942,6 +949,7 @@ function parseQueuedExecutionMode(value) {
942
949
  McpMessageType,
943
950
  MemoryType,
944
951
  MessageChunkTypes,
952
+ PROJECT_ROOM_USER_CHANNEL_PROJECT,
945
953
  PROJECT_TASK_LIFECYCLE_ACTIONS,
946
954
  ProjectRoomBrokerCapacityError,
947
955
  ProjectRoomCursorError,
@@ -970,6 +978,7 @@ function parseQueuedExecutionMode(value) {
970
978
  parseTaskBeliefState,
971
979
  parseTrustedRunContext,
972
980
  projectAgentWebAppChunk,
981
+ projectRoomUserEventScope,
973
982
  replaceTaskBeliefState,
974
983
  requireProjectTaskWorkItemStore,
975
984
  snapshotExactArray,