langchain_agentx_stream_ui 0.1.1 → 0.1.3

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.
@@ -24,7 +24,7 @@ import {
24
24
  useSessionStatus,
25
25
  useSessionViewOptions,
26
26
  useToolDisplayOptions
27
- } from "./chunk-Q4HRD7EM.js";
27
+ } from "./chunk-3B4WC67E.js";
28
28
  import {
29
29
  createDefaultToolRegistry
30
30
  } from "./chunk-MHK53ZHC.js";
@@ -1426,4 +1426,4 @@ export {
1426
1426
  createActiveSessionBridge,
1427
1427
  MultiAgentSession
1428
1428
  };
1429
- //# sourceMappingURL=chunk-R35BQYAY.js.map
1429
+ //# sourceMappingURL=chunk-A4W6B7C3.js.map
package/dist/default.css CHANGED
@@ -1961,6 +1961,10 @@
1961
1961
  padding: 0;
1962
1962
  }
1963
1963
 
1964
+ /*
1965
+ * D25 Phase 1:.lax-workflow-virtual-list 及其变体不再被 workflow 主链路引用。
1966
+ * 保留样式定义以兼容仍可能引用 WorkflowVirtualRowList 的回滚路径(风险 R1)。
1967
+ */
1964
1968
  .lax-workflow-virtual-list {
1965
1969
  position: relative;
1966
1970
  overflow: auto;
@@ -1994,6 +1998,13 @@
1994
1998
  border-color: var(--lax-accent-primary, currentColor);
1995
1999
  }
1996
2000
 
2001
+ .lax-workflow-stage-list__hidden-hint {
2002
+ margin: 0.35rem 0 0;
2003
+ font-size: 0.75rem;
2004
+ color: var(--lax-muted);
2005
+ font-style: italic;
2006
+ }
2007
+
1997
2008
  .lax-workflow-loop-replay-pending__hint {
1998
2009
  color: var(--lax-muted);
1999
2010
  font-size: 0.8125rem;
package/dist/index.d.ts CHANGED
@@ -68,16 +68,26 @@ declare function WorkflowLoopReplayProvider({ onRequestLoopReplay, children, }:
68
68
 
69
69
  /** Workflow 大规模编排 UI 缩放选项(P1–P4) */
70
70
  interface WorkflowScaleOptions {
71
- /** P1:根 stage 列表超过此数量启用虚拟滚动 */
71
+ /**
72
+ * P1:已弃用 — stage 壳列表不再使用虚拟滚动。
73
+ * 保留字段以保证向后兼容,工作流主链路不再读取此值。
74
+ * @deprecated D25 Phase 1 移除 stage shell virtualization 后不再生效。
75
+ */
72
76
  stageVirtualizeThreshold: number;
73
- /** P3:默认展示的 done stage 上限(running/failed/pending 始终展示) */
74
- stagePageSize: number;
77
+ /** P3:默认展示的 completed done stage 上限(running/failed/pending 始终展示) */
78
+ completedStagePageSize: number;
75
79
  /** P2:completed 且未 pin 的 loop 树移出内存,保留摘要 */
76
80
  evictCompletedLoops: boolean;
77
81
  /** P4:running 容器仅 active 自动展开 AgentLoopView */
78
82
  onlyExpandActiveRunning: boolean;
79
- /** Parallel 组内 item 虚拟滚动阈值 */
83
+ /**
84
+ * P1:已弃用 — parallel item shell 不再使用虚拟滚动(最大并行跨度仅 4)。
85
+ * 保留字段以保证向后兼容,工作流主链路不再读取此值。
86
+ * @deprecated D25 Phase 1 移除 parallel item virtualization 后不再生效。
87
+ */
80
88
  parallelItemVirtualizeThreshold: number;
89
+ /** P2:completed hydrated loop 热缓存上限(默认 4,与最大并行跨度对齐) */
90
+ maxHydratedCompletedLoops: number;
81
91
  }
82
92
  declare const DEFAULT_WORKFLOW_SCALE_OPTIONS: WorkflowScaleOptions;
83
93
 
@@ -203,9 +213,17 @@ interface WorkflowStageListPartition {
203
213
  visible: WorkflowContainerRuntimeNode[];
204
214
  hiddenCount: number;
205
215
  total: number;
216
+ /** 当前已展示的 done stage 数量 */
217
+ visibleDoneCount: number;
218
+ /** done stage 总数 */
219
+ totalDoneCount: number;
206
220
  }
207
- /** P3:running / failed / pending 全显;done 仅保留最近 pageSize 条 */
208
- declare function partitionWorkflowStages(stages: WorkflowContainerRuntimeNode[], pageSize: number, showAll: boolean): WorkflowStageListPartition;
221
+ /**
222
+ * P3:running / failed / pending / blocked 全显;
223
+ * done 按 maxVisibleDoneCount 分页展示(默认最近 completedStagePageSize 条)。
224
+ * maxVisibleDoneCount 由 WorkflowStageListPanel 的 "Show N more" 逐页递增。
225
+ */
226
+ declare function partitionWorkflowStages(stages: WorkflowContainerRuntimeNode[], maxVisibleDoneCount: number): WorkflowStageListPartition;
209
227
 
210
228
  /**
211
229
  * workflowSession.ts — Workflow 会话顶层状态
@@ -269,6 +287,8 @@ interface WorkflowSessionState {
269
287
  loopTreesBySessionId: Record<string, SessionTree>;
270
288
  /** P2:container_id → done 摘要(loop 淘汰后) */
271
289
  stageDoneSummariesByContainerId: Record<string, CachedStageDoneSummary>;
290
+ /** P2:completed hydrated loop LRU 热缓存(最近使用在数组尾部) */
291
+ hotCompletedLoopSessionIds: string[];
272
292
  activeLoopSessionId: string | null;
273
293
  /** @deprecated P1 起由 containerTree.activeContainerIds 替代 */
274
294
  openScopeStack: WorkflowScopeFrame[];
@@ -295,6 +315,8 @@ interface WorkflowSessionStoreOptions {
295
315
  initialSeenEventIds?: Iterable<string>;
296
316
  /** P2:completed loop 树内存淘汰(默认 true) */
297
317
  evictCompletedLoops?: boolean;
318
+ /** P2:completed hydrated loop 热缓存上限(默认 4) */
319
+ maxHydratedCompletedLoops?: number;
298
320
  }
299
321
  interface WorkflowSessionStoreState {
300
322
  state: WorkflowSessionState;
@@ -1002,20 +1024,21 @@ declare function reduceWorkflowSession(state: WorkflowSessionState, event: Langc
1002
1024
  /** 从空状态回放 workflow 事件序列。 */
1003
1025
  declare function reduceWorkflowEvents(events: LangchainAgentEvent[], options?: ReduceOptions): WorkflowSessionState;
1004
1026
 
1005
- /**
1006
- * workflowStructureEvents.ts — Workflow 结构事件类型守卫
1007
- *
1008
- * 职责:
1009
- * 区分 workflow 编排结构 event_type 与 agent loop 事件。
1010
- *
1011
- * 链路位置:
1012
- * workflowReducer 路由 · Source application_kind 守卫(并行契约)。
1013
- *
1014
- * 当前裁剪范围:
1015
- * 与 backend WORKFLOW_STRUCTURE_EVENT_TYPES 对齐;不进 tier-1 白名单。
1016
- */
1027
+ /** 与 backend/langchain_agentx_stream_ui_backend/task_sync/multi_sse_bridge.py 对齐 */
1028
+ declare const WORKFLOW_STRUCTURE_EVENT_PREFIXES: readonly string[];
1029
+ /** 显式 SSOT(文档/契约测试);新增结构类型应同时满足前缀规则或补入此集合 */
1017
1030
  declare const WORKFLOW_STRUCTURE_EVENT_TYPES: ReadonlySet<string>;
1018
1031
  declare function isWorkflowStructureEventType(eventType: string): boolean;
1032
+ /** agent loop hydrate/replay 允许进入 reduceTree 的事件(正文 + state/debug tier) */
1033
+ declare function isAgentLoopReplayEventType(eventType: string): boolean;
1034
+ /**
1035
+ * hydrateLoopSession / 宿主 replay:
1036
+ * 1. 白名单:只保留 reduceTree 已知 event_type
1037
+ * 2. 结构前缀/集合:双重排除 workflow 编排帧(含 session_id 误绑的 dual emission)
1038
+ */
1039
+ declare function filterAgentLoopReplayEvents<T extends {
1040
+ event_type: string;
1041
+ }>(events: T[]): T[];
1019
1042
 
1020
1043
  /**
1021
1044
  * 职责:事件分级类型(V2-A classify 层公共契约)。
@@ -1045,4 +1068,4 @@ interface ClassifyContext {
1045
1068
  declare function resolveEventTier(eventType: string, overrides?: TierOverrides): EventTier;
1046
1069
  declare function classifyEvent(event: LangchainAgentEvent, ctx: ClassifyContext, overrides?: TierOverrides, eventIndex?: number): ClassifiedEvent;
1047
1070
 
1048
- export { Agent, AgentLoopView, type AgentLoopViewProps, AgentSession, type AgentSessionProps, type AgentxMetaFrame, type AgentxSseSourceOptions, type ApplicationKind, ApplicationKindMismatchError, AskUserQuestion, Bash, CanonicalNodeRef, type ClassifiedEvent, type ClassifyContext, CollapseKind, CollapsedExploreNode, type CollapsedExploreNodeProps, DEFAULT_WORKFLOW_SCALE_OPTIONS, DisplayMode, EXPECTED_PROTOCOL_VERSION, Edit, ErrorCard, EventTier, ExploreCollapseAccumulator, GROUPABLE_TOOL_NAMES, Glob, Grep, GroupedToolUseAccumulator, InteractionBus, LangchainAgentEvent, MIN_HINT_DISPLAY_MS, MarkdownRenderer, MermaidDiagram, type MermaidDiagramProps, type MermaidInitOptions, type MermaidThemeName, MissingApplicationKindError, NodeRegistry, PermissionCard, PermissionUiMode, PlantUMLBlock, type PlantUMLBlockProps, PlantUMLDiagram, type PlantUMLDiagramProps, type ProjectedTimelineItem, ProjectionContext, DisplayMode as ProjectionDisplayMode, Read, ReasoningBubble, type ReduceOptions, ReducerError, RenderableEntry, RenderableTimelineProjector, type ReplayOptions, type ReplaySourceOptions, RichMarkdown, type RichMarkdownProps, SHELL_PROGRESS_MIN_ELAPSED_SECONDS, SessionNode, SessionNodeKind, SessionStatus, SessionTree, Skill, Source, SourceEventContext, Spinner, type SpinnerProps, type SseTransportFailureKind, SseTransportTerminalError, StepCard, SubAgentBlock, SystemSummaryAccumulator, SystemSummaryNode, Task, TaskList, TaskListFooter, TextBubble, TierOverrides, Timeline, TimelineItem, ToolBodyMode, ToolCallCard, ToolDisplayRegistry, ToolProjectionClassifier, UnknownCard, WORKFLOW_STRUCTURE_EVENT_TYPES, WebFetch, WebSearch, WorkflowChrome, type WorkflowChromeProps, type WorkflowLoopReplayHandler, WorkflowLoopReplayProvider, type WorkflowProgressState, WorkflowScaleContext, type WorkflowScaleOptions, type WorkflowScopeFrame, WorkflowSession, type WorkflowSessionProps, type WorkflowSessionState, type WorkflowSessionStore, type WorkflowSessionStoreOptions, type WorkflowSessionStoreState, type WorkflowStageProgress, WorkflowTaskListFooter, Write, buildCanonicalFromTree, buildRelevantMemoriesCanonical, buildResumeStreamUrl, buildSystemEventCanonical, buildTimelineEntries, classifyEvent, commandAsHint, configureMermaid, configurePlantumlServer, createAgentxSseSource, createDefaultRegistry, createEmptyWorkflowSessionState, createMockSource, createReplaySource, createWorkflowSessionStore, entryKey, formatAgentTitle, formatExploreSummaryText, formatHookFinishedSummary, formatShellProgressSuffix, formatTaskFooterLabel, getChildIds, getMainStageIds, isGitOperationCommand, isGroupableToolName, isMcpToolName, isWorkflowStructureEventType, iterMountCandidates, partitionWorkflowStages, projectCanonical, projectTimeline, reduceAgentLoopEvent, reduceEvents, reduceTree, reduceWorkflowEvents, reduceWorkflowSession, replayEvents, replayTree, resolveEventTier, resolveResponseId, resolveShellProgressFromPayload, shouldShowTaskListFooter, streamChunk, useChildren, useInteractionBus, useInternalErrors, useMinDisplayTime, useNode, useNodeTyped, useProjectedTimeline, useReplayTree, useSessionMeta, useSessionStatus, useTimeline, useWorkflowSessionStatus, useWorkflowSessionStoreApi };
1071
+ export { Agent, AgentLoopView, type AgentLoopViewProps, AgentSession, type AgentSessionProps, type AgentxMetaFrame, type AgentxSseSourceOptions, type ApplicationKind, ApplicationKindMismatchError, AskUserQuestion, Bash, CanonicalNodeRef, type ClassifiedEvent, type ClassifyContext, CollapseKind, CollapsedExploreNode, type CollapsedExploreNodeProps, DEFAULT_WORKFLOW_SCALE_OPTIONS, DisplayMode, EXPECTED_PROTOCOL_VERSION, Edit, ErrorCard, EventTier, ExploreCollapseAccumulator, GROUPABLE_TOOL_NAMES, Glob, Grep, GroupedToolUseAccumulator, InteractionBus, LangchainAgentEvent, MIN_HINT_DISPLAY_MS, MarkdownRenderer, MermaidDiagram, type MermaidDiagramProps, type MermaidInitOptions, type MermaidThemeName, MissingApplicationKindError, NodeRegistry, PermissionCard, PermissionUiMode, PlantUMLBlock, type PlantUMLBlockProps, PlantUMLDiagram, type PlantUMLDiagramProps, type ProjectedTimelineItem, ProjectionContext, DisplayMode as ProjectionDisplayMode, Read, ReasoningBubble, type ReduceOptions, ReducerError, RenderableEntry, RenderableTimelineProjector, type ReplayOptions, type ReplaySourceOptions, RichMarkdown, type RichMarkdownProps, SHELL_PROGRESS_MIN_ELAPSED_SECONDS, SessionNode, SessionNodeKind, SessionStatus, SessionTree, Skill, Source, SourceEventContext, Spinner, type SpinnerProps, type SseTransportFailureKind, SseTransportTerminalError, StepCard, SubAgentBlock, SystemSummaryAccumulator, SystemSummaryNode, Task, TaskList, TaskListFooter, TextBubble, TierOverrides, Timeline, TimelineItem, ToolBodyMode, ToolCallCard, ToolDisplayRegistry, ToolProjectionClassifier, UnknownCard, WORKFLOW_STRUCTURE_EVENT_PREFIXES, WORKFLOW_STRUCTURE_EVENT_TYPES, WebFetch, WebSearch, WorkflowChrome, type WorkflowChromeProps, type WorkflowLoopReplayHandler, WorkflowLoopReplayProvider, type WorkflowProgressState, WorkflowScaleContext, type WorkflowScaleOptions, type WorkflowScopeFrame, WorkflowSession, type WorkflowSessionProps, type WorkflowSessionState, type WorkflowSessionStore, type WorkflowSessionStoreOptions, type WorkflowSessionStoreState, type WorkflowStageProgress, WorkflowTaskListFooter, Write, buildCanonicalFromTree, buildRelevantMemoriesCanonical, buildResumeStreamUrl, buildSystemEventCanonical, buildTimelineEntries, classifyEvent, commandAsHint, configureMermaid, configurePlantumlServer, createAgentxSseSource, createDefaultRegistry, createEmptyWorkflowSessionState, createMockSource, createReplaySource, createWorkflowSessionStore, entryKey, filterAgentLoopReplayEvents, formatAgentTitle, formatExploreSummaryText, formatHookFinishedSummary, formatShellProgressSuffix, formatTaskFooterLabel, getChildIds, getMainStageIds, isAgentLoopReplayEventType, isGitOperationCommand, isGroupableToolName, isMcpToolName, isWorkflowStructureEventType, iterMountCandidates, partitionWorkflowStages, projectCanonical, projectTimeline, reduceAgentLoopEvent, reduceEvents, reduceTree, reduceWorkflowEvents, reduceWorkflowSession, replayEvents, replayTree, resolveEventTier, resolveResponseId, resolveShellProgressFromPayload, shouldShowTaskListFooter, streamChunk, useChildren, useInteractionBus, useInternalErrors, useMinDisplayTime, useNode, useNodeTyped, useProjectedTimeline, useReplayTree, useSessionMeta, useSessionStatus, useTimeline, useWorkflowSessionStatus, useWorkflowSessionStoreApi };