@axiom-lattice/protocols 5.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -96,6 +96,16 @@ interface LLMConfig {
96
96
  model: string;
97
97
  displayName?: string;
98
98
  maxTokens?: number;
99
+ /**
100
+ * The model's total input window, in tokens.
101
+ *
102
+ * Not a client field: it never reaches the upstream. It is the number the
103
+ * summarization middleware uses to decide when history must be compacted
104
+ * (see `resolveSummarizationTriggerTokens` in core), because only the tenant
105
+ * knows what a given deployment's window actually is. Absent means "use the
106
+ * framework default".
107
+ */
108
+ contextWindow?: number;
99
109
  temperature?: number;
100
110
  timeout?: number;
101
111
  maxRetries?: number;
@@ -877,6 +887,11 @@ interface ScheduleClient {
877
887
  * @returns Number of tasks restored
878
888
  */
879
889
  restore(): Promise<number>;
890
+ /**
891
+ * Reconcile this replica's timers with the shared store. Implementations
892
+ * that support multi-replica scheduling should expose this.
893
+ */
894
+ reconcile?(): Promise<number>;
880
895
  /**
881
896
  * Set the storage backend
882
897
  */
@@ -906,6 +921,7 @@ interface ScheduleLatticeProtocol extends BaseLatticeProtocol<ScheduleConfig, Sc
906
921
  getActiveTaskIds: () => Promise<string[]>;
907
922
  cancelAll: () => Promise<void>;
908
923
  restore: () => Promise<number>;
924
+ reconcile?: () => Promise<number>;
909
925
  }
910
926
 
911
927
  /**
@@ -3222,6 +3238,21 @@ type ModelProviderLlmProvider = LLMConfig["provider"];
3222
3238
  * manager, its own loader guard, and its own client type.
3223
3239
  */
3224
3240
  type ModelKind = "chat" | "embedding" | "asr";
3241
+ /**
3242
+ * The registry keys a tenant's default model is published under.
3243
+ *
3244
+ * A default is a *key*, not a property of the catalog row: the persisted
3245
+ * `is_default` flag only says which row the alias points at. Each kind has its
3246
+ * own alias, so a tenant can have a chat default and an embedding default at
3247
+ * the same time.
3248
+ *
3249
+ * The chat alias keeps the historical bare `"default"`; the other kinds are
3250
+ * namespaced so they can never collide with a `${providerId}/${modelId}` key
3251
+ * (which always contains a `/`).
3252
+ */
3253
+ declare const DEFAULT_MODEL_KEY = "default";
3254
+ declare const EMBEDDING_DEFAULT_KEY = "default:embedding";
3255
+ declare const ASR_DEFAULT_KEY = "default:asr";
3225
3256
  /**
3226
3257
  * Build the tenant-scoped model key.
3227
3258
  *
@@ -3838,6 +3869,13 @@ interface ModelProviderProbeResult {
3838
3869
  * returned no usable vector.
3839
3870
  */
3840
3871
  dimensions?: number;
3872
+ /**
3873
+ * The request/response shape the successful embedding probe used.
3874
+ *
3875
+ * Auto-negotiation may have tried the other shape; the value here is the one
3876
+ * that worked (and, for a saved model, the one now persisted).
3877
+ */
3878
+ shape?: "openai" | "contents" | "texts";
3841
3879
  }
3842
3880
  /**
3843
3881
  * ModelProviderStore interface
@@ -4499,6 +4537,8 @@ type McpUiRef = {
4499
4537
  resource: string;
4500
4538
  displayMode: McpUiDisplayMode;
4501
4539
  title?: string;
4540
+ /** Opaque HMAC-signed run/connection scope (1..4096 chars); never contains secrets. */
4541
+ scope?: string;
4502
4542
  };
4503
4543
  /** Resolved UI resource body returned by the gateway. */
4504
4544
  interface McpUiResourcePayload {
@@ -4560,6 +4600,8 @@ type McpAppMenuConfig = {
4560
4600
  resource: string;
4561
4601
  displayMode?: McpUiDisplayMode;
4562
4602
  title?: string;
4603
+ /** Signed scope copied from the ref so a pinned App can keep calling. */
4604
+ scope?: string;
4563
4605
  toolInput?: Record<string, unknown>;
4564
4606
  toolResult?: unknown;
4565
4607
  ui?: ToolCallUi;
@@ -4729,6 +4771,8 @@ interface EvalRun {
4729
4771
  interruptedCases?: number;
4730
4772
  avgScore: number;
4731
4773
  error?: string;
4774
+ /** A client requested cancellation; the executing worker polls this flag. */
4775
+ cancelRequested?: boolean;
4732
4776
  /**
4733
4777
  * When true, this run executed ONLY the hold-out validation suite.
4734
4778
  * Per-case results of holdout runs are withheld from agents (aggregate
@@ -4822,6 +4866,8 @@ interface EvalStore {
4822
4866
  error?: string;
4823
4867
  completedAt?: Date;
4824
4868
  }): Promise<EvalRun | null>;
4869
+ /** Request cooperative cancellation for a running evaluation. */
4870
+ requestCancel?(tenantId: string, id: string): Promise<boolean>;
4825
4871
  deleteRun(tenantId: string, id: string): Promise<boolean>;
4826
4872
  getResultsByRun(tenantId: string, runId: string): Promise<EvalRunResult[]>;
4827
4873
  createRunResult(tenantId: string, runId: string, id: string, data: Omit<EvalRunResult, 'id' | 'runId' | 'createdAt'>): Promise<EvalRunResult>;
@@ -5139,6 +5185,13 @@ interface TaskListFilter {
5139
5185
  * Filter by priority level
5140
5186
  */
5141
5187
  priority?: string;
5188
+ /**
5189
+ * Filter by the isolated run thread linked from `context.thread_id`.
5190
+ *
5191
+ * @remarks Used to authorize read-only views of task execution threads that
5192
+ * do not have a durable Thread row or AgentRun row.
5193
+ */
5194
+ threadId?: string;
5142
5195
  /**
5143
5196
  * Filter by workspace ID
5144
5197
  */
@@ -8191,4 +8244,157 @@ declare function threadAffinityHeaders(threadId: string | undefined): Record<str
8191
8244
  */
8192
8245
  declare function buildAffinityMissChunk(owner: string, threadId: string): MessageChunk;
8193
8246
 
8194
- export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2AEventCursor, type A2ARemoteAgentConfig, AFFINITY_ECHO_HEADER, AFFINITY_MISS_CODE, AGENT_AFFINITY_HEADER, type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentInterrupt, type AgentLatticeProtocol, type AgentMenuConfig, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type AgentWebApp, type AgentWebAppAppearance, type AgentWebAppBootstrap, type AgentWebAppCalloutWidget, type AgentWebAppError, type AgentWebAppErrorCode, type AgentWebAppFeatures, type AgentWebAppGenUIBlock, type AgentWebAppIdentityAssurance, type AgentWebAppIdentityConfig, type AgentWebAppIdentityPolicy, type AgentWebAppInterrupt, type AgentWebAppIssuerConfig, type AgentWebAppQuickPrompt, type AgentWebAppRuntimeMessage, type AgentWebAppRuntimeThread, type AgentWebAppScope, type AgentWebAppStatus, type AgentWebAppStore, type AgentWebAppStorePatch, type AgentWebAppStreamEvent, type AgentWebAppStreamProjectionContext, type AgentWebAppTableWidget, type AgentWebAppThreadMetadata, type AgentWebAppUpdateOptions, type Assistant, type AssistantMessage, type AssistantStore, type Attachment, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrowserMiddlewareConfig, CHANNEL_REPLY_JOB_LIST_LIMIT_DEFAULT, CHANNEL_REPLY_JOB_LIST_LIMIT_MAX, CHANNEL_REPLY_JOB_LIST_LIMIT_MIN, type Callback, type CapabilityBundle, type CapabilityBundleDeleteResult, type CapabilityBundleStore, type CapabilityBundleUpdateConflict, type CapabilityFieldSource, type CapabilityOverride, type CapabilityPreview, type CapabilityPreviewIssue, type CapabilityRuntime, type ChannelAdapter, type ChannelBindingMigrationConflict, ChannelBindingMigrationConflictError, type ChannelInstallation, type ChannelInstallationStore, type ChannelInstallationType, type ChannelReplyJob, type ChannelReplyJobStatus, type ChannelReplyJobStore, type CheckpointMaintenance, type CheckpointStorage, type ClawMiddlewareConfig, type CodeEvalMiddlewareConfig, type Collection, type CollectionField, type CollectionFieldType, type CollectionMiddlewareConfig, type CollectionSchema, type CollectionStore, type ConnectionEntry, type ConnectionStore, type ConversationRecord, type CreateA2AApiKeyInput, type CreateAgentWebAppInput, type CreateAssistantRequest, type CreateBindingInput, type CreateCapabilityBundleInput, type CreateChannelInstallationInput, type CreateChannelInstallationRequest, type CreateChannelReplyJobInput, type CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateModelProviderRequest, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DiscoveredModel, type DispatchResult, DuplicateChannelBindingSubjectError, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, type FileMenuConfig, type FilterCondition, type GraphBuildOptions, type HtmlMenuConfig, type IConversationStore, type ID, type InboundMessage, type InternalAgentNode, type InternalBaseNode, type InternalCreateCapabilityBundleInput, type InternalDSL, type InternalEdge, type InternalInput, type InternalInputNode, type InternalMapNode, type InternalNode, type InternalNodeConfig, type InternalOutput, type InternalState, type InternalStateField, type InternalTerminalNode, type InternalUpdateCapabilityBundleInput, type InterruptAnswerKey, type InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type LLMConfig, type LarkChannelInstallationConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LeaseRecord, type LeaseStore, type LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpAppMenuConfig, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpServerConfig, type McpServerConfigEntry, type McpServerConfigStore, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type McpUiCsp, type McpUiDisplayMode, type McpUiPermissions, type McpUiRef, type McpUiResourcePayload, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type MenuContentConfig, type MenuContentType, type MenuItem, type MenuRegistry, type MenuTarget, type Message, type MessageChunk, type MessageChunkType, MessageChunkTypes, type MessageContext, type MessageMiddleware, type MetricColumn, type MetricDataPoint, type MetricMeta, type MetricQueryResult, type MetricsMiddlewareConfig, type MetricsServerConfig, type MetricsServerConfigEntry, type MetricsServerConfigStore, type MetricsServerType, type MiddlewareType, type ModelDiscoveryResult, type ModelKind, type ModelLatticeProtocol, type ModelProviderApiStyle, type ModelProviderEntry, type ModelProviderErrorCode, type ModelProviderLlmProvider, type ModelProviderModelEntry, type ModelProviderProbeRequest, type ModelProviderProbeResult, type ModelProviderPublicEntry, type ModelProviderStatus, type ModelProviderStore, type ModelProviderUpstreamErrorCode, type ModelProviderWireProtocol, type ModelSelection, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OutboundMessage, type OutboundStreamChunk, type OutboxEvent, type OutboxStore, PROJECT_ROOM_TASK_DELEGATED_LABEL, PROJECT_ROOM_TASK_DELEGATED_SEPARATOR, PROJECT_ROOM_USER_CHANNEL_PROJECT, PROJECT_TASK_LIFECYCLE_ACTIONS, type PaginatedResult, type PaginationParams, type PinoFileOptions, type Plugin, type PluginConnection, type PluginConnectionFieldSchema, type PluginConnectionTestResult, type PluginContext, type PluginDeployment, type PluginDeploymentMode, type PluginDeploymentStatus, type PluginDeploymentStore, type PluginDiscoveredResource, type PluginMeta, type PluginMetaOutput, type PluginMiddlewareFactory, type PluginSkillDefinition, type PluginSkillResource, type PluginStandardConnectionConfig, type PluginToolMeta, type PluginToolUi, type PluginUiResource, type ProcessingAgentConfig, type Project, type ProjectBotMembership, type ProjectBotMembershipStatus, type ProjectBotMembershipStore, type ProjectBotRole, type ProjectCapabilityConfig, type ProjectFilter, type ProjectHumanRole, type ProjectKind, type ProjectLifecycleEventCursor, type ProjectLifecycleEventQuery, type ProjectMembership, type ProjectMembershipMutationResult, type ProjectMembershipStatus, type ProjectMembershipStore, type ProjectRoom, ProjectRoomBrokerCapacityError, type ProjectRoomBusinessEvent, type ProjectRoomBusinessEventDraft, type ProjectRoomControlEvent, ProjectRoomCursorError, type ProjectRoomEventBrokerProtocol, type ProjectRoomEventId, type ProjectRoomEventOf, type ProjectRoomEventScope, type ProjectRoomEventSubscription, type ProjectRoomMembershipAffectedEvent, type ProjectRoomMembershipChangedEvent, type ProjectRoomMention, type ProjectRoomMessage, type ProjectRoomMessageAuthor, type ProjectRoomMessageCreatedEvent, type ProjectRoomMessageCursor, type ProjectRoomMessageSource, type ProjectRoomMessageStore, type ProjectRoomPublicBotMembership, type ProjectRoomPublicMembership, type ProjectRoomPublicMessage, type ProjectRoomReadChangedEvent, type ProjectRoomReadState, type ProjectRoomReadStateStore, type ProjectRoomRealtimeActor, type ProjectRoomRosterChangedEvent, type ProjectRoomScopedBusinessEvent, type ProjectRoomSseWritable, type ProjectRoomStore, type ProjectRoomTaskChangedEvent, type ProjectRoomThreadMetadata, type ProjectRoomTrustedRunContext, type ProjectStore, type ProjectTaskLifecycleAction, ProjectTaskStoreUnsupportedError, type ProjectTaskThreadMetadata, type ProjectTaskTrustedRunContext, type ProjectTaskWorkItemStore, type ProviderModelInput, type PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, REPLICA_HEADER, type ReactAgentConfig, type ReplyTarget, type ResourceAddress, type ResourceResolver, type Result, type RunCancelSignal, type RunScope, type RunStep, STORE_IDENTITY_SEPARATOR, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, type SandboxPluginConnectionDef, type SandboxPluginDiagnostic, type SandboxPluginManifest, type SandboxPluginToolDef, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type SchedulerMiddlewareConfig, type SemanticMetricsFilter, type SemanticMetricsQueryRequest, type SemanticMetricsQueryResponse, type SemanticMetricsServerConfig, type 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 StoreItem, type StoreProtocol, type StorePutInput, type StoreSearchInput, StoreValidationError, type SystemMessage, type TableQueryRequest, type TableQueryResponse, type TaskBeliefDiagnosticCode, type TaskBeliefEntry, type TaskBeliefParseFailure, type TaskBeliefParseResult, type TaskBeliefParseSuccess, type TaskBeliefState, type TaskDependentListQuery, type TaskFileRef, type TaskHandler, type TaskItem, type TaskListFilter, type TaskMutationSnapshot, type TaskStore, type TaskWorkItem, type TaskWorkItemListFilter, type TaskWorkItemStore, type Tenant, type TenantModelCatalog, type TenantModelPublicEntry, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadCheckpointStorage, type ThreadStore, type Timestamp, type ToolCall, type ToolCallUi, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateA2AApiKeyInput, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateModelProviderRequest, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserPushSubscription, type UserPushSubscriptionStore, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, WORKSPACE_PUBLIC_ROOM_PROJECT_PREFIX, type WechatChannelInstallationConfig, type WecomChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, a2aEventCursorSchema, affinityEchoHeaders, assertGenericProjectConfig, assertStoreIdentity, assertStoreNamespacePrefix, assertValidCreateChannelReplyJobInput, buildAffinityMissChunk, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, firstNonEmptyString, getSubAgentsFromConfig, getToolsFromConfig, hasTools, interruptAnswerKeySchema, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isMcpUiRef, isProcessingAgentConfig, isProjectRoomEventId, isWorkflowAgentConfig, isWorkspacePublicRoomProjectId, normalizeChannelReplyJobListLimit, normalizeTaskMetadataScalar, parseAgentWebAppGenUIBlock, parseMcpUiRef, parseModelKey, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, resolveRunScope, runCancelSignalSchema, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, storeExpiresAt, storePaginationValue, taskBeliefStatesEqual, threadAffinityHeaders, toModelKey, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
8247
+ /**
8248
+ * Time range accepted by an observability dashboard.
8249
+ */
8250
+ type ObservabilityDashboardRange = "1h" | "24h" | "7d" | "30d";
8251
+ /**
8252
+ * Input passed by the gateway to the selected observability provider.
8253
+ */
8254
+ interface ObservabilityDashboardInput {
8255
+ /** Time window to aggregate. */
8256
+ range: ObservabilityDashboardRange;
8257
+ /** Tenant resolved from the authenticated request, never from the client. */
8258
+ tenantId: string;
8259
+ }
8260
+ /**
8261
+ * Provider-owned dashboard result.
8262
+ *
8263
+ * The `payload` shape belongs to the provider; consumers must check `version`
8264
+ * before rendering it.
8265
+ */
8266
+ interface ObservabilityDashboardResult {
8267
+ /** Provider payload version. */
8268
+ version: number;
8269
+ /** Section keys that could not be loaded. */
8270
+ warnings?: string[];
8271
+ /** Provider-specific dashboard data. */
8272
+ payload: unknown;
8273
+ }
8274
+ /**
8275
+ * Cross-provider response envelope returned by the gateway.
8276
+ */
8277
+ interface ObservabilityDashboardEnvelope {
8278
+ /** Provider type, also used as the UI element key suffix. */
8279
+ provider: string;
8280
+ /** Requested time window. */
8281
+ range: ObservabilityDashboardRange;
8282
+ /** Server generation timestamp. */
8283
+ generatedAt: string;
8284
+ /** Provider payload version. */
8285
+ version: number;
8286
+ /** Section keys that could not be loaded. */
8287
+ warnings?: string[];
8288
+ /** Provider-specific dashboard data. */
8289
+ payload: unknown;
8290
+ }
8291
+ /** Prefix used to register a dashboard renderer in the GenUI element registry. */
8292
+ declare const OBSERVABILITY_DASHBOARD_ELEMENT_KEY_PREFIX = "observability_dashboard_";
8293
+ /**
8294
+ * Returns the GenUI element key for a provider dashboard.
8295
+ *
8296
+ * @param provider - Provider type such as `"langfuse"`.
8297
+ * @returns The registry key used by both the provider renderer and the panel.
8298
+ */
8299
+ declare function observabilityDashboardElementKey(provider: string): string;
8300
+ /** Version of the built-in Langfuse dashboard payload. */
8301
+ declare const LANGFUSE_OBSERVABILITY_DASHBOARD_VERSION = 3;
8302
+ /** One point in a Langfuse dashboard time series. */
8303
+ interface LangfuseObservabilitySeriesPoint {
8304
+ /** ISO timestamp of the bucket start. */
8305
+ bucket: string;
8306
+ /** Aggregated value, or `null` when the bucket has no value. */
8307
+ value: number | null;
8308
+ }
8309
+ /** Agent breakdown row, derived from the `assistant:<id>` trace tag. */
8310
+ interface LangfuseAgentBreakdownRow {
8311
+ /** Assistant id from the trace tag. */
8312
+ assistantId: string;
8313
+ /** Display name from the trace name, when Langfuse captured one. */
8314
+ name?: string;
8315
+ /** Root-observation count, i.e. invocations started by this agent. */
8316
+ calls: number;
8317
+ /** All observations emitted by this agent. */
8318
+ observations: number;
8319
+ /** Total cost in USD. */
8320
+ costUsd: number;
8321
+ /** Input tokens consumed. */
8322
+ inputTokens: number;
8323
+ /** Output tokens produced. */
8324
+ outputTokens: number;
8325
+ /** Error-level observation count. */
8326
+ errorCount: number;
8327
+ /** Error ratio in `[0, 1]` over observations. */
8328
+ errorRate: number;
8329
+ }
8330
+ /** One model's cost over time. */
8331
+ interface LangfuseModelCostSeries {
8332
+ /** Model name. */
8333
+ model: string;
8334
+ /** Cost points for this model. */
8335
+ points: LangfuseObservabilitySeriesPoint[];
8336
+ }
8337
+ /** Model breakdown row. */
8338
+ interface LangfuseModelBreakdownRow {
8339
+ /** Model name reported by Langfuse. */
8340
+ model: string;
8341
+ /** Observation count. */
8342
+ count: number;
8343
+ /** Total cost in USD. */
8344
+ costUsd: number;
8345
+ /** Input tokens consumed. */
8346
+ inputTokens: number;
8347
+ /** Output tokens produced. */
8348
+ outputTokens: number;
8349
+ /** p95 generation latency in milliseconds, or `null` when unknown. */
8350
+ p95LatencyMs: number | null;
8351
+ }
8352
+ /** Tool breakdown row. */
8353
+ interface LangfuseToolBreakdownRow {
8354
+ /** Tool observation name. */
8355
+ tool: string;
8356
+ /** Observation count. */
8357
+ count: number;
8358
+ }
8359
+ /**
8360
+ * Built-in Langfuse dashboard payload.
8361
+ *
8362
+ * Aggregated for one tenant and time range; it never contains prompts,
8363
+ * completions, user text, or credentials.
8364
+ */
8365
+ interface LangfuseObservabilityDashboardPayload {
8366
+ /** Provider sample rate; values below 1 mean the numbers are sampled. */
8367
+ samplingRate: number;
8368
+ /** Tracing environment used for the query, when configured. */
8369
+ environment?: string;
8370
+ kpis: {
8371
+ traces: number;
8372
+ costUsd: number;
8373
+ inputTokens: number;
8374
+ outputTokens: number;
8375
+ /** Error observation ratio in `[0, 1]`. */
8376
+ errorRate: number;
8377
+ };
8378
+ series: {
8379
+ traces: LangfuseObservabilitySeriesPoint[];
8380
+ cost: LangfuseObservabilitySeriesPoint[];
8381
+ tokens: {
8382
+ input: LangfuseObservabilitySeriesPoint[];
8383
+ output: LangfuseObservabilitySeriesPoint[];
8384
+ };
8385
+ latency: {
8386
+ p50: LangfuseObservabilitySeriesPoint[];
8387
+ p95: LangfuseObservabilitySeriesPoint[];
8388
+ p99: LangfuseObservabilitySeriesPoint[];
8389
+ };
8390
+ errorRate: LangfuseObservabilitySeriesPoint[];
8391
+ toolCalls: LangfuseObservabilitySeriesPoint[];
8392
+ /** Per-model cost trend. Optional so older payloads keep working. */
8393
+ costByModel?: LangfuseModelCostSeries[];
8394
+ };
8395
+ agents: LangfuseAgentBreakdownRow[];
8396
+ models: LangfuseModelBreakdownRow[];
8397
+ tools: LangfuseToolBreakdownRow[];
8398
+ }
8399
+
8400
+ export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2AEventCursor, type A2ARemoteAgentConfig, AFFINITY_ECHO_HEADER, AFFINITY_MISS_CODE, AGENT_AFFINITY_HEADER, ASR_DEFAULT_KEY, type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentInterrupt, type AgentLatticeProtocol, type AgentMenuConfig, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type AgentWebApp, type AgentWebAppAppearance, type AgentWebAppBootstrap, type AgentWebAppCalloutWidget, type AgentWebAppError, type AgentWebAppErrorCode, type AgentWebAppFeatures, type AgentWebAppGenUIBlock, type AgentWebAppIdentityAssurance, type AgentWebAppIdentityConfig, type AgentWebAppIdentityPolicy, type AgentWebAppInterrupt, type AgentWebAppIssuerConfig, type AgentWebAppQuickPrompt, type AgentWebAppRuntimeMessage, type AgentWebAppRuntimeThread, type AgentWebAppScope, type AgentWebAppStatus, type AgentWebAppStore, type AgentWebAppStorePatch, type AgentWebAppStreamEvent, type AgentWebAppStreamProjectionContext, type AgentWebAppTableWidget, type AgentWebAppThreadMetadata, type AgentWebAppUpdateOptions, type Assistant, type AssistantMessage, type AssistantStore, type Attachment, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrowserMiddlewareConfig, CHANNEL_REPLY_JOB_LIST_LIMIT_DEFAULT, CHANNEL_REPLY_JOB_LIST_LIMIT_MAX, CHANNEL_REPLY_JOB_LIST_LIMIT_MIN, type Callback, type CapabilityBundle, type CapabilityBundleDeleteResult, type CapabilityBundleStore, type CapabilityBundleUpdateConflict, type CapabilityFieldSource, type CapabilityOverride, type CapabilityPreview, type CapabilityPreviewIssue, type CapabilityRuntime, type ChannelAdapter, type ChannelBindingMigrationConflict, ChannelBindingMigrationConflictError, type ChannelInstallation, type ChannelInstallationStore, type ChannelInstallationType, type ChannelReplyJob, type ChannelReplyJobStatus, type ChannelReplyJobStore, type CheckpointMaintenance, type CheckpointStorage, type ClawMiddlewareConfig, type CodeEvalMiddlewareConfig, type Collection, type CollectionField, type CollectionFieldType, type CollectionMiddlewareConfig, type CollectionSchema, type CollectionStore, type ConnectionEntry, type ConnectionStore, type ConversationRecord, type CreateA2AApiKeyInput, type CreateAgentWebAppInput, type CreateAssistantRequest, type CreateBindingInput, type CreateCapabilityBundleInput, type CreateChannelInstallationInput, type CreateChannelInstallationRequest, type CreateChannelReplyJobInput, type CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateModelProviderRequest, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, DEFAULT_MODEL_KEY, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DiscoveredModel, type DispatchResult, DuplicateChannelBindingSubjectError, EMBEDDING_DEFAULT_KEY, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, type FileMenuConfig, type FilterCondition, type GraphBuildOptions, type HtmlMenuConfig, type IConversationStore, type ID, type InboundMessage, type InternalAgentNode, type InternalBaseNode, type InternalCreateCapabilityBundleInput, type InternalDSL, type InternalEdge, type InternalInput, type InternalInputNode, type InternalMapNode, type InternalNode, type InternalNodeConfig, type InternalOutput, type InternalState, type InternalStateField, type InternalTerminalNode, type InternalUpdateCapabilityBundleInput, type InterruptAnswerKey, type InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, LANGFUSE_OBSERVABILITY_DASHBOARD_VERSION, type LLMConfig, type LangfuseAgentBreakdownRow, type LangfuseModelBreakdownRow, type LangfuseModelCostSeries, type LangfuseObservabilityDashboardPayload, type LangfuseObservabilitySeriesPoint, type LangfuseToolBreakdownRow, type LarkChannelInstallationConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LeaseRecord, type LeaseStore, type LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpAppMenuConfig, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpServerConfig, type McpServerConfigEntry, type McpServerConfigStore, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type McpUiCsp, type McpUiDisplayMode, type McpUiPermissions, type McpUiRef, type McpUiResourcePayload, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type MenuContentConfig, type MenuContentType, type MenuItem, type MenuRegistry, type MenuTarget, type Message, type MessageChunk, type MessageChunkType, MessageChunkTypes, type MessageContext, type MessageMiddleware, type MetricColumn, type MetricDataPoint, type MetricMeta, type MetricQueryResult, type MetricsMiddlewareConfig, type MetricsServerConfig, type MetricsServerConfigEntry, type MetricsServerConfigStore, type MetricsServerType, type MiddlewareType, type ModelDiscoveryResult, type ModelKind, type ModelLatticeProtocol, type ModelProviderApiStyle, type ModelProviderEntry, type ModelProviderErrorCode, type ModelProviderLlmProvider, type ModelProviderModelEntry, type ModelProviderProbeRequest, type ModelProviderProbeResult, type ModelProviderPublicEntry, type ModelProviderStatus, type ModelProviderStore, type ModelProviderUpstreamErrorCode, type ModelProviderWireProtocol, type ModelSelection, OBSERVABILITY_DASHBOARD_ELEMENT_KEY_PREFIX, type ObservabilityDashboardEnvelope, type ObservabilityDashboardInput, type ObservabilityDashboardRange, type ObservabilityDashboardResult, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OutboundMessage, type OutboundStreamChunk, type OutboxEvent, type OutboxStore, PROJECT_ROOM_TASK_DELEGATED_LABEL, PROJECT_ROOM_TASK_DELEGATED_SEPARATOR, PROJECT_ROOM_USER_CHANNEL_PROJECT, PROJECT_TASK_LIFECYCLE_ACTIONS, type PaginatedResult, type PaginationParams, type PinoFileOptions, type Plugin, type PluginConnection, type PluginConnectionFieldSchema, type PluginConnectionTestResult, type PluginContext, type PluginDeployment, type PluginDeploymentMode, type PluginDeploymentStatus, type PluginDeploymentStore, type PluginDiscoveredResource, type PluginMeta, type PluginMetaOutput, type PluginMiddlewareFactory, type PluginSkillDefinition, type PluginSkillResource, type PluginStandardConnectionConfig, type PluginToolMeta, type PluginToolUi, type PluginUiResource, type ProcessingAgentConfig, type Project, type ProjectBotMembership, type ProjectBotMembershipStatus, type ProjectBotMembershipStore, type ProjectBotRole, type ProjectCapabilityConfig, type ProjectFilter, type ProjectHumanRole, type ProjectKind, type ProjectLifecycleEventCursor, type ProjectLifecycleEventQuery, type ProjectMembership, type ProjectMembershipMutationResult, type ProjectMembershipStatus, type ProjectMembershipStore, type ProjectRoom, ProjectRoomBrokerCapacityError, type ProjectRoomBusinessEvent, type ProjectRoomBusinessEventDraft, type ProjectRoomControlEvent, ProjectRoomCursorError, type ProjectRoomEventBrokerProtocol, type ProjectRoomEventId, type ProjectRoomEventOf, type ProjectRoomEventScope, type ProjectRoomEventSubscription, type ProjectRoomMembershipAffectedEvent, type ProjectRoomMembershipChangedEvent, type ProjectRoomMention, type ProjectRoomMessage, type ProjectRoomMessageAuthor, type ProjectRoomMessageCreatedEvent, type ProjectRoomMessageCursor, type ProjectRoomMessageSource, type ProjectRoomMessageStore, type ProjectRoomPublicBotMembership, type ProjectRoomPublicMembership, type ProjectRoomPublicMessage, type ProjectRoomReadChangedEvent, type ProjectRoomReadState, type ProjectRoomReadStateStore, type ProjectRoomRealtimeActor, type ProjectRoomRosterChangedEvent, type ProjectRoomScopedBusinessEvent, type ProjectRoomSseWritable, type ProjectRoomStore, type ProjectRoomTaskChangedEvent, type ProjectRoomThreadMetadata, type ProjectRoomTrustedRunContext, type ProjectStore, type ProjectTaskLifecycleAction, ProjectTaskStoreUnsupportedError, type ProjectTaskThreadMetadata, type ProjectTaskTrustedRunContext, type ProjectTaskWorkItemStore, type ProviderModelInput, type PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, REPLICA_HEADER, type ReactAgentConfig, type ReplyTarget, type ResourceAddress, type ResourceResolver, type Result, type RunCancelSignal, type RunScope, type RunStep, STORE_IDENTITY_SEPARATOR, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, type SandboxPluginConnectionDef, type SandboxPluginDiagnostic, type SandboxPluginManifest, type SandboxPluginToolDef, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type SchedulerMiddlewareConfig, type SemanticMetricsFilter, type SemanticMetricsQueryRequest, type SemanticMetricsQueryResponse, type SemanticMetricsServerConfig, type 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 StoreItem, type StoreProtocol, type StorePutInput, type StoreSearchInput, StoreValidationError, type SystemMessage, type TableQueryRequest, type TableQueryResponse, type TaskBeliefDiagnosticCode, type TaskBeliefEntry, type TaskBeliefParseFailure, type TaskBeliefParseResult, type TaskBeliefParseSuccess, type TaskBeliefState, type TaskDependentListQuery, type TaskFileRef, type TaskHandler, type TaskItem, type TaskListFilter, type TaskMutationSnapshot, type TaskStore, type TaskWorkItem, type TaskWorkItemListFilter, type TaskWorkItemStore, type Tenant, type TenantModelCatalog, type TenantModelPublicEntry, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadCheckpointStorage, type ThreadStore, type Timestamp, type ToolCall, type ToolCallUi, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateA2AApiKeyInput, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateModelProviderRequest, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserPushSubscription, type UserPushSubscriptionStore, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, WORKSPACE_PUBLIC_ROOM_PROJECT_PREFIX, type WechatChannelInstallationConfig, type WecomChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, a2aEventCursorSchema, affinityEchoHeaders, assertGenericProjectConfig, assertStoreIdentity, assertStoreNamespacePrefix, assertValidCreateChannelReplyJobInput, buildAffinityMissChunk, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, firstNonEmptyString, getSubAgentsFromConfig, getToolsFromConfig, hasTools, interruptAnswerKeySchema, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isMcpUiRef, isProcessingAgentConfig, isProjectRoomEventId, isWorkflowAgentConfig, isWorkspacePublicRoomProjectId, normalizeChannelReplyJobListLimit, normalizeTaskMetadataScalar, observabilityDashboardElementKey, parseAgentWebAppGenUIBlock, parseMcpUiRef, parseModelKey, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, resolveRunScope, runCancelSignalSchema, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, storeExpiresAt, storePaginationValue, taskBeliefStatesEqual, threadAffinityHeaders, toModelKey, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
package/dist/index.js CHANGED
@@ -23,21 +23,26 @@ __export(index_exports, {
23
23
  AFFINITY_ECHO_HEADER: () => AFFINITY_ECHO_HEADER,
24
24
  AFFINITY_MISS_CODE: () => AFFINITY_MISS_CODE,
25
25
  AGENT_AFFINITY_HEADER: () => AGENT_AFFINITY_HEADER,
26
+ ASR_DEFAULT_KEY: () => ASR_DEFAULT_KEY,
26
27
  AgentType: () => AgentType,
27
28
  CHANNEL_REPLY_JOB_LIST_LIMIT_DEFAULT: () => CHANNEL_REPLY_JOB_LIST_LIMIT_DEFAULT,
28
29
  CHANNEL_REPLY_JOB_LIST_LIMIT_MAX: () => CHANNEL_REPLY_JOB_LIST_LIMIT_MAX,
29
30
  CHANNEL_REPLY_JOB_LIST_LIMIT_MIN: () => CHANNEL_REPLY_JOB_LIST_LIMIT_MIN,
30
31
  ChannelBindingMigrationConflictError: () => ChannelBindingMigrationConflictError,
32
+ DEFAULT_MODEL_KEY: () => DEFAULT_MODEL_KEY,
31
33
  DuplicateChannelBindingSubjectError: () => DuplicateChannelBindingSubjectError,
34
+ EMBEDDING_DEFAULT_KEY: () => EMBEDDING_DEFAULT_KEY,
32
35
  EXECUTION_RESULT_EVENT_KEY_PATTERN: () => EXECUTION_RESULT_EVENT_KEY_PATTERN,
33
36
  EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE: () => EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE,
34
37
  EXECUTION_RESULT_EVENT_KEY_PREFIX: () => EXECUTION_RESULT_EVENT_KEY_PREFIX,
35
38
  InvalidProjectCapabilityBundleConfigError: () => InvalidProjectCapabilityBundleConfigError,
39
+ LANGFUSE_OBSERVABILITY_DASHBOARD_VERSION: () => LANGFUSE_OBSERVABILITY_DASHBOARD_VERSION,
36
40
  LoggerType: () => LoggerType,
37
41
  MAX_PENDING_EXECUTION_RESULTS_LIMIT: () => MAX_PENDING_EXECUTION_RESULTS_LIMIT,
38
42
  McpMessageType: () => McpMessageType,
39
43
  MemoryType: () => MemoryType,
40
44
  MessageChunkTypes: () => MessageChunkTypes,
45
+ OBSERVABILITY_DASHBOARD_ELEMENT_KEY_PREFIX: () => OBSERVABILITY_DASHBOARD_ELEMENT_KEY_PREFIX,
41
46
  PROJECT_ROOM_TASK_DELEGATED_LABEL: () => PROJECT_ROOM_TASK_DELEGATED_LABEL,
42
47
  PROJECT_ROOM_TASK_DELEGATED_SEPARATOR: () => PROJECT_ROOM_TASK_DELEGATED_SEPARATOR,
43
48
  PROJECT_ROOM_USER_CHANNEL_PROJECT: () => PROJECT_ROOM_USER_CHANNEL_PROJECT,
@@ -79,6 +84,7 @@ __export(index_exports, {
79
84
  isWorkspacePublicRoomProjectId: () => isWorkspacePublicRoomProjectId,
80
85
  normalizeChannelReplyJobListLimit: () => normalizeChannelReplyJobListLimit,
81
86
  normalizeTaskMetadataScalar: () => normalizeTaskMetadataScalar,
87
+ observabilityDashboardElementKey: () => observabilityDashboardElementKey,
82
88
  parseAgentWebAppGenUIBlock: () => parseAgentWebAppGenUIBlock,
83
89
  parseMcpUiRef: () => parseMcpUiRef,
84
90
  parseModelKey: () => parseModelKey,
@@ -253,6 +259,9 @@ function assertGenericProjectConfig(config) {
253
259
  }
254
260
 
255
261
  // src/ModelProviderProtocol.ts
262
+ var DEFAULT_MODEL_KEY = "default";
263
+ var EMBEDDING_DEFAULT_KEY = "default:embedding";
264
+ var ASR_DEFAULT_KEY = "default:asr";
256
265
  function toModelKey(providerId, modelId) {
257
266
  return `${providerId}/${modelId}`;
258
267
  }
@@ -1211,6 +1220,7 @@ function effectiveGrants(record) {
1211
1220
 
1212
1221
  // src/McpUiProtocol.ts
1213
1222
  var MODES = ["inline", "fullscreen", "pip"];
1223
+ var MAX_MCP_UI_SCOPE_LENGTH = 4096;
1214
1224
  var isObj = (v) => typeof v === "object" && v !== null;
1215
1225
  function isMcpUiRef(value) {
1216
1226
  return parseMcpUiRef(value) !== null;
@@ -1230,30 +1240,50 @@ function parseMcpUiRef(value) {
1230
1240
  };
1231
1241
  }
1232
1242
  if (value.kind === "plugin" && typeof value.pluginType === "string" && typeof value.resource === "string") {
1233
- return { kind: "plugin", pluginType: value.pluginType, resource: value.resource, displayMode, ...title ? { title } : {} };
1243
+ const scope = typeof value.scope === "string" && value.scope.length > 0 && value.scope.length <= MAX_MCP_UI_SCOPE_LENGTH ? value.scope : void 0;
1244
+ return {
1245
+ kind: "plugin",
1246
+ pluginType: value.pluginType,
1247
+ resource: value.resource,
1248
+ displayMode,
1249
+ ...title ? { title } : {},
1250
+ ...scope ? { scope } : {}
1251
+ };
1234
1252
  }
1235
1253
  return null;
1236
1254
  }
1255
+
1256
+ // src/ObservabilityDashboardProtocol.ts
1257
+ var OBSERVABILITY_DASHBOARD_ELEMENT_KEY_PREFIX = "observability_dashboard_";
1258
+ function observabilityDashboardElementKey(provider) {
1259
+ return `${OBSERVABILITY_DASHBOARD_ELEMENT_KEY_PREFIX}${provider}`;
1260
+ }
1261
+ var LANGFUSE_OBSERVABILITY_DASHBOARD_VERSION = 3;
1237
1262
  // Annotate the CommonJS export names for ESM import in node:
1238
1263
  0 && (module.exports = {
1239
1264
  AFFINITY_ECHO_HEADER,
1240
1265
  AFFINITY_MISS_CODE,
1241
1266
  AGENT_AFFINITY_HEADER,
1267
+ ASR_DEFAULT_KEY,
1242
1268
  AgentType,
1243
1269
  CHANNEL_REPLY_JOB_LIST_LIMIT_DEFAULT,
1244
1270
  CHANNEL_REPLY_JOB_LIST_LIMIT_MAX,
1245
1271
  CHANNEL_REPLY_JOB_LIST_LIMIT_MIN,
1246
1272
  ChannelBindingMigrationConflictError,
1273
+ DEFAULT_MODEL_KEY,
1247
1274
  DuplicateChannelBindingSubjectError,
1275
+ EMBEDDING_DEFAULT_KEY,
1248
1276
  EXECUTION_RESULT_EVENT_KEY_PATTERN,
1249
1277
  EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE,
1250
1278
  EXECUTION_RESULT_EVENT_KEY_PREFIX,
1251
1279
  InvalidProjectCapabilityBundleConfigError,
1280
+ LANGFUSE_OBSERVABILITY_DASHBOARD_VERSION,
1252
1281
  LoggerType,
1253
1282
  MAX_PENDING_EXECUTION_RESULTS_LIMIT,
1254
1283
  McpMessageType,
1255
1284
  MemoryType,
1256
1285
  MessageChunkTypes,
1286
+ OBSERVABILITY_DASHBOARD_ELEMENT_KEY_PREFIX,
1257
1287
  PROJECT_ROOM_TASK_DELEGATED_LABEL,
1258
1288
  PROJECT_ROOM_TASK_DELEGATED_SEPARATOR,
1259
1289
  PROJECT_ROOM_USER_CHANNEL_PROJECT,
@@ -1295,6 +1325,7 @@ function parseMcpUiRef(value) {
1295
1325
  isWorkspacePublicRoomProjectId,
1296
1326
  normalizeChannelReplyJobListLimit,
1297
1327
  normalizeTaskMetadataScalar,
1328
+ observabilityDashboardElementKey,
1298
1329
  parseAgentWebAppGenUIBlock,
1299
1330
  parseMcpUiRef,
1300
1331
  parseModelKey,