@axiom-lattice/protocols 4.1.3 → 4.1.4

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.3 build /home/runner/work/agentic/agentic/packages/protocols
2
+ > @axiom-lattice/protocols@4.1.4 build /home/runner/work/agentic/agentic/packages/protocols
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,13 +8,13 @@
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- ESM dist/index.mjs 33.51 KB
12
- ESM dist/index.mjs.map 120.47 KB
13
- ESM ⚡️ Build success in 269ms
14
- CJS dist/index.js 37.33 KB
15
- CJS dist/index.js.map 123.78 KB
16
- CJS ⚡️ Build success in 294ms
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
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 11582ms
19
- DTS dist/index.d.ts 199.35 KB
20
- DTS dist/index.d.mts 199.35 KB
18
+ DTS ⚡️ Build success in 16465ms
19
+ DTS dist/index.d.ts 201.42 KB
20
+ DTS dist/index.d.mts 201.42 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @axiom-lattice/protocols
2
2
 
3
+ ## 4.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - a787438: fix issue and sample
8
+
3
9
  ## 4.1.3
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -4750,6 +4750,8 @@ interface AgentWebAppFeatures {
4750
4750
  attachments: boolean;
4751
4751
  hitl: boolean;
4752
4752
  genUI: boolean;
4753
+ /** File panel surface. Tolerated missing (treated as false) for records created before Phase 2. */
4754
+ files?: boolean;
4753
4755
  }
4754
4756
  /** Optional display customization for an Agent Web App. */
4755
4757
  interface AgentWebAppAppearance {
@@ -4757,6 +4759,27 @@ interface AgentWebAppAppearance {
4757
4759
  welcomeMessage?: string;
4758
4760
  primaryColor?: string;
4759
4761
  }
4762
+ /** Identity assurance levels reported by the runtime. */
4763
+ type AgentWebAppIdentityAssurance = "unverified" | "verified";
4764
+ /** How external callers may identify themselves for this web app. */
4765
+ type AgentWebAppIdentityPolicy = "unverified" | "verified" | "both";
4766
+ /** One trusted issuer entry. `secret` pairs with HS256, `jwksUrl` with RS256. */
4767
+ interface AgentWebAppIssuerConfig {
4768
+ /** Exact `iss` claim match. */
4769
+ iss: string;
4770
+ /** Exact `aud` claim match; conventionally the webAppId. */
4771
+ aud: string;
4772
+ alg: "HS256" | "RS256";
4773
+ /** Shared secret for HS256. */
4774
+ secret?: string;
4775
+ /** JWKS endpoint URL for RS256. */
4776
+ jwksUrl?: string;
4777
+ }
4778
+ /** Identity configuration block for a web app. Absent = V1 unverified behavior. */
4779
+ interface AgentWebAppIdentityConfig {
4780
+ policy: AgentWebAppIdentityPolicy;
4781
+ issuers: AgentWebAppIssuerConfig[];
4782
+ }
4760
4783
  /** Persisted React SDK publication of an assistant. */
4761
4784
  interface AgentWebApp {
4762
4785
  id: string;
@@ -4771,6 +4794,7 @@ interface AgentWebApp {
4771
4794
  scope: AgentWebAppScope;
4772
4795
  features: AgentWebAppFeatures;
4773
4796
  appearance: AgentWebAppAppearance;
4797
+ identity?: AgentWebAppIdentityConfig;
4774
4798
  createdAt: Date;
4775
4799
  updatedAt: Date;
4776
4800
  }
@@ -4785,6 +4809,7 @@ interface CreateAgentWebAppInput {
4785
4809
  scope: AgentWebAppScope;
4786
4810
  features: AgentWebAppFeatures;
4787
4811
  appearance: AgentWebAppAppearance;
4812
+ identity?: AgentWebAppIdentityConfig;
4788
4813
  }
4789
4814
  /** Editable fields accepted when updating an Agent Web App. Nested objects use merge semantics. */
4790
4815
  interface UpdateAgentWebAppInput {
@@ -4793,6 +4818,7 @@ interface UpdateAgentWebAppInput {
4793
4818
  scope?: Partial<AgentWebAppScope>;
4794
4819
  features?: Partial<AgentWebAppFeatures>;
4795
4820
  appearance?: Partial<AgentWebAppAppearance>;
4821
+ identity?: AgentWebAppIdentityConfig;
4796
4822
  }
4797
4823
  /** Internal persistence patch. Nested objects are complete replacements when provided. */
4798
4824
  interface AgentWebAppStorePatch {
@@ -4801,6 +4827,7 @@ interface AgentWebAppStorePatch {
4801
4827
  scope?: AgentWebAppScope;
4802
4828
  features?: AgentWebAppFeatures;
4803
4829
  appearance?: AgentWebAppAppearance;
4830
+ identity?: AgentWebAppIdentityConfig;
4804
4831
  status?: AgentWebAppStatus;
4805
4832
  }
4806
4833
  /** Optional optimistic concurrency guard for an Agent Web App update. */
@@ -4878,7 +4905,7 @@ interface AgentWebAppBootstrap {
4878
4905
  defaultModelKey?: string;
4879
4906
  features: AgentWebAppFeatures;
4880
4907
  appearance: AgentWebAppAppearance;
4881
- identityAssurance: "unverified";
4908
+ identityAssurance: AgentWebAppIdentityAssurance;
4882
4909
  };
4883
4910
  projects: Array<{
4884
4911
  id: string;
@@ -4940,6 +4967,20 @@ type AgentWebAppStreamEvent = {
4940
4967
  /** Validate and copy one strict public GenUI block at a trust boundary. */
4941
4968
  declare function parseAgentWebAppGenUIBlock(value: unknown): AgentWebAppGenUIBlock | undefined;
4942
4969
 
4970
+ /** Per-consumer projection metadata; it does not control Agent execution. */
4971
+ interface AgentWebAppStreamProjectionContext {
4972
+ readonly startedToolIds: Set<string>;
4973
+ readonly allowInterrupts: boolean;
4974
+ readonly allowGenUI: boolean;
4975
+ }
4976
+ /** Create projection metadata shared by all chunks in one public stream. */
4977
+ declare function createAgentWebAppStreamProjectionContext(options?: {
4978
+ allowInterrupts?: boolean;
4979
+ allowGenUI?: boolean;
4980
+ }): AgentWebAppStreamProjectionContext;
4981
+ /** Purely project one internal Agent chunk onto zero or more stable public events. */
4982
+ declare function projectAgentWebAppChunk(chunk: MessageChunk, context?: AgentWebAppStreamProjectionContext): AgentWebAppStreamEvent[];
4983
+
4943
4984
  /**
4944
4985
  * Capability bundle persistence protocol.
4945
4986
  *
@@ -6126,4 +6167,4 @@ declare function parseTrustedRunContext(value: unknown): TrustedRunContext;
6126
6167
  */
6127
6168
  declare function parseQueuedExecutionMode(value: unknown): QueuedExecutionMode;
6128
6169
 
6129
- 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 AgentWebAppInterrupt, type AgentWebAppRuntimeMessage, type AgentWebAppRuntimeThread, type AgentWebAppScope, type AgentWebAppStatus, type AgentWebAppStore, type AgentWebAppStorePatch, type AgentWebAppStreamEvent, 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, descriptorDataValue, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, parseAgentWebAppGenUIBlock, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, replaceTaskBeliefState, requireProjectTaskWorkItemStore, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
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 };
package/dist/index.d.ts CHANGED
@@ -4750,6 +4750,8 @@ interface AgentWebAppFeatures {
4750
4750
  attachments: boolean;
4751
4751
  hitl: boolean;
4752
4752
  genUI: boolean;
4753
+ /** File panel surface. Tolerated missing (treated as false) for records created before Phase 2. */
4754
+ files?: boolean;
4753
4755
  }
4754
4756
  /** Optional display customization for an Agent Web App. */
4755
4757
  interface AgentWebAppAppearance {
@@ -4757,6 +4759,27 @@ interface AgentWebAppAppearance {
4757
4759
  welcomeMessage?: string;
4758
4760
  primaryColor?: string;
4759
4761
  }
4762
+ /** Identity assurance levels reported by the runtime. */
4763
+ type AgentWebAppIdentityAssurance = "unverified" | "verified";
4764
+ /** How external callers may identify themselves for this web app. */
4765
+ type AgentWebAppIdentityPolicy = "unverified" | "verified" | "both";
4766
+ /** One trusted issuer entry. `secret` pairs with HS256, `jwksUrl` with RS256. */
4767
+ interface AgentWebAppIssuerConfig {
4768
+ /** Exact `iss` claim match. */
4769
+ iss: string;
4770
+ /** Exact `aud` claim match; conventionally the webAppId. */
4771
+ aud: string;
4772
+ alg: "HS256" | "RS256";
4773
+ /** Shared secret for HS256. */
4774
+ secret?: string;
4775
+ /** JWKS endpoint URL for RS256. */
4776
+ jwksUrl?: string;
4777
+ }
4778
+ /** Identity configuration block for a web app. Absent = V1 unverified behavior. */
4779
+ interface AgentWebAppIdentityConfig {
4780
+ policy: AgentWebAppIdentityPolicy;
4781
+ issuers: AgentWebAppIssuerConfig[];
4782
+ }
4760
4783
  /** Persisted React SDK publication of an assistant. */
4761
4784
  interface AgentWebApp {
4762
4785
  id: string;
@@ -4771,6 +4794,7 @@ interface AgentWebApp {
4771
4794
  scope: AgentWebAppScope;
4772
4795
  features: AgentWebAppFeatures;
4773
4796
  appearance: AgentWebAppAppearance;
4797
+ identity?: AgentWebAppIdentityConfig;
4774
4798
  createdAt: Date;
4775
4799
  updatedAt: Date;
4776
4800
  }
@@ -4785,6 +4809,7 @@ interface CreateAgentWebAppInput {
4785
4809
  scope: AgentWebAppScope;
4786
4810
  features: AgentWebAppFeatures;
4787
4811
  appearance: AgentWebAppAppearance;
4812
+ identity?: AgentWebAppIdentityConfig;
4788
4813
  }
4789
4814
  /** Editable fields accepted when updating an Agent Web App. Nested objects use merge semantics. */
4790
4815
  interface UpdateAgentWebAppInput {
@@ -4793,6 +4818,7 @@ interface UpdateAgentWebAppInput {
4793
4818
  scope?: Partial<AgentWebAppScope>;
4794
4819
  features?: Partial<AgentWebAppFeatures>;
4795
4820
  appearance?: Partial<AgentWebAppAppearance>;
4821
+ identity?: AgentWebAppIdentityConfig;
4796
4822
  }
4797
4823
  /** Internal persistence patch. Nested objects are complete replacements when provided. */
4798
4824
  interface AgentWebAppStorePatch {
@@ -4801,6 +4827,7 @@ interface AgentWebAppStorePatch {
4801
4827
  scope?: AgentWebAppScope;
4802
4828
  features?: AgentWebAppFeatures;
4803
4829
  appearance?: AgentWebAppAppearance;
4830
+ identity?: AgentWebAppIdentityConfig;
4804
4831
  status?: AgentWebAppStatus;
4805
4832
  }
4806
4833
  /** Optional optimistic concurrency guard for an Agent Web App update. */
@@ -4878,7 +4905,7 @@ interface AgentWebAppBootstrap {
4878
4905
  defaultModelKey?: string;
4879
4906
  features: AgentWebAppFeatures;
4880
4907
  appearance: AgentWebAppAppearance;
4881
- identityAssurance: "unverified";
4908
+ identityAssurance: AgentWebAppIdentityAssurance;
4882
4909
  };
4883
4910
  projects: Array<{
4884
4911
  id: string;
@@ -4940,6 +4967,20 @@ type AgentWebAppStreamEvent = {
4940
4967
  /** Validate and copy one strict public GenUI block at a trust boundary. */
4941
4968
  declare function parseAgentWebAppGenUIBlock(value: unknown): AgentWebAppGenUIBlock | undefined;
4942
4969
 
4970
+ /** Per-consumer projection metadata; it does not control Agent execution. */
4971
+ interface AgentWebAppStreamProjectionContext {
4972
+ readonly startedToolIds: Set<string>;
4973
+ readonly allowInterrupts: boolean;
4974
+ readonly allowGenUI: boolean;
4975
+ }
4976
+ /** Create projection metadata shared by all chunks in one public stream. */
4977
+ declare function createAgentWebAppStreamProjectionContext(options?: {
4978
+ allowInterrupts?: boolean;
4979
+ allowGenUI?: boolean;
4980
+ }): AgentWebAppStreamProjectionContext;
4981
+ /** Purely project one internal Agent chunk onto zero or more stable public events. */
4982
+ declare function projectAgentWebAppChunk(chunk: MessageChunk, context?: AgentWebAppStreamProjectionContext): AgentWebAppStreamEvent[];
4983
+
4943
4984
  /**
4944
4985
  * Capability bundle persistence protocol.
4945
4986
  *
@@ -6126,4 +6167,4 @@ declare function parseTrustedRunContext(value: unknown): TrustedRunContext;
6126
6167
  */
6127
6168
  declare function parseQueuedExecutionMode(value: unknown): QueuedExecutionMode;
6128
6169
 
6129
- 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 AgentWebAppInterrupt, type AgentWebAppRuntimeMessage, type AgentWebAppRuntimeThread, type AgentWebAppScope, type AgentWebAppStatus, type AgentWebAppStore, type AgentWebAppStorePatch, type AgentWebAppStreamEvent, 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, descriptorDataValue, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, parseAgentWebAppGenUIBlock, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, replaceTaskBeliefState, requireProjectTaskWorkItemStore, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
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 };
package/dist/index.js CHANGED
@@ -42,6 +42,7 @@ __export(index_exports, {
42
42
  ScheduledTaskStatus: () => ScheduledTaskStatus,
43
43
  UIComponentType: () => UIComponentType,
44
44
  assertGenericProjectConfig: () => assertGenericProjectConfig,
45
+ createAgentWebAppStreamProjectionContext: () => createAgentWebAppStreamProjectionContext,
45
46
  descriptorDataValue: () => descriptorDataValue,
46
47
  getSubAgentsFromConfig: () => getSubAgentsFromConfig,
47
48
  getToolsFromConfig: () => getToolsFromConfig,
@@ -58,6 +59,7 @@ __export(index_exports, {
58
59
  parseQueuedExecutionMode: () => parseQueuedExecutionMode,
59
60
  parseTaskBeliefState: () => parseTaskBeliefState,
60
61
  parseTrustedRunContext: () => parseTrustedRunContext,
62
+ projectAgentWebAppChunk: () => projectAgentWebAppChunk,
61
63
  replaceTaskBeliefState: () => replaceTaskBeliefState,
62
64
  requireProjectTaskWorkItemStore: () => requireProjectTaskWorkItemStore,
63
65
  snapshotExactArray: () => snapshotExactArray,
@@ -525,6 +527,85 @@ function hasOnlyKeys(value, required, optional) {
525
527
  return required.every((key) => key in value) && keys.every((key) => required.includes(key) || optional.includes(key));
526
528
  }
527
529
 
530
+ // src/AgentWebAppStreamProjection.ts
531
+ function createAgentWebAppStreamProjectionContext(options = {}) {
532
+ return { startedToolIds: /* @__PURE__ */ new Set(), allowInterrupts: options.allowInterrupts ?? true, allowGenUI: options.allowGenUI ?? false };
533
+ }
534
+ function projectAgentWebAppChunk(chunk, context) {
535
+ if (chunk.type === MessageChunkTypes.AI) {
536
+ const events = [];
537
+ const startedToolIds = context?.startedToolIds ?? /* @__PURE__ */ new Set();
538
+ if (typeof chunk.data.content === "string" && chunk.data.content) events.push({ type: "message.delta", text: chunk.data.content });
539
+ if (context?.allowGenUI && Array.isArray(chunk.data.content)) {
540
+ for (const value of chunk.data.content) {
541
+ const block = parseAgentWebAppGenUIBlock(value);
542
+ if (block) events.push({ type: "genui.render", block });
543
+ }
544
+ }
545
+ for (const call of chunk.data.tool_call_chunks ?? []) {
546
+ if (call.id && call.name && !startedToolIds.has(call.id)) {
547
+ startedToolIds.add(call.id);
548
+ events.push({ type: "tool.started", id: call.id, name: call.name });
549
+ }
550
+ }
551
+ for (const call of chunk.data.tool_calls ?? []) {
552
+ if (!startedToolIds.has(call.id)) {
553
+ startedToolIds.add(call.id);
554
+ events.push({ type: "tool.started", id: call.id, name: call.name });
555
+ }
556
+ }
557
+ return events;
558
+ }
559
+ if (chunk.type === MessageChunkTypes.TOOL && chunk.data.tool_call_id) {
560
+ return [{ type: "tool.completed", id: chunk.data.tool_call_id }];
561
+ }
562
+ if (chunk.type === MessageChunkTypes.INTERRUPT) {
563
+ if (context && !context.allowInterrupts) return [{ type: "stream.completed" }];
564
+ const interrupt = publicInterrupt(chunk);
565
+ return interrupt ? [{ type: "interrupt.created", interrupt }, { type: "stream.completed" }] : [{ type: "stream.completed" }];
566
+ }
567
+ if (chunk.type === MessageChunkTypes.MESSAGE_COMPLETED) {
568
+ return [
569
+ { type: "message.completed", messageId: chunk.data.id },
570
+ { type: "stream.completed" }
571
+ ];
572
+ }
573
+ if (chunk.type === MessageChunkTypes.MESSAGE_FAILED) {
574
+ return [
575
+ { type: "error", error: { code: "STREAM_FAILED", message: "Stream failed", retryable: true } },
576
+ { type: "stream.completed" }
577
+ ];
578
+ }
579
+ return [];
580
+ }
581
+ function publicInterrupt(chunk) {
582
+ const value = parseInterruptContent(chunk.data.content);
583
+ if (!value) return void 0;
584
+ const topLevelId = chunk.id;
585
+ const id = typeof topLevelId === "string" ? topLevelId : chunk.data.id;
586
+ if (!id) return void 0;
587
+ return {
588
+ id,
589
+ type: typeof value.type === "string" ? value.type : "input",
590
+ prompt: typeof value.prompt === "string" ? value.prompt : typeof value.message === "string" ? value.message : "Input required",
591
+ ...isRecord2(value.data) ? { data: value.data } : {}
592
+ };
593
+ }
594
+ function parseInterruptContent(content) {
595
+ if (!content) return {};
596
+ if (isRecord2(content)) return content;
597
+ if (typeof content !== "string") return void 0;
598
+ try {
599
+ const parsed = JSON.parse(content);
600
+ return isRecord2(parsed) ? parsed : { prompt: content };
601
+ } catch {
602
+ return { prompt: content };
603
+ }
604
+ }
605
+ function isRecord2(value) {
606
+ return typeof value === "object" && value !== null && !Array.isArray(value);
607
+ }
608
+
528
609
  // src/ExactDataSnapshot.ts
529
610
  function ownDescriptorField(descriptor, key) {
530
611
  const field = Object.getOwnPropertyDescriptor(descriptor, key);
@@ -871,6 +952,7 @@ function parseQueuedExecutionMode(value) {
871
952
  ScheduledTaskStatus,
872
953
  UIComponentType,
873
954
  assertGenericProjectConfig,
955
+ createAgentWebAppStreamProjectionContext,
874
956
  descriptorDataValue,
875
957
  getSubAgentsFromConfig,
876
958
  getToolsFromConfig,
@@ -887,6 +969,7 @@ function parseQueuedExecutionMode(value) {
887
969
  parseQueuedExecutionMode,
888
970
  parseTaskBeliefState,
889
971
  parseTrustedRunContext,
972
+ projectAgentWebAppChunk,
890
973
  replaceTaskBeliefState,
891
974
  requireProjectTaskWorkItemStore,
892
975
  snapshotExactArray,