langchain_agentx_stream_ui 0.2.6 → 0.3.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 +200 -57
- package/dist/index.js +560 -165
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, PointerEventHandler } from 'react';
|
|
4
|
-
import { q as Source, L as LangchainAgentEvent, N as NodeRegistry, v as TierOverrides, I as InteractionBus, M as MarkdownRenderer, p as SessionTree,
|
|
4
|
+
import { q as Source, L as LangchainAgentEvent, N as NodeRegistry, v as TierOverrides, I as InteractionBus, M as MarkdownRenderer, p as SessionTree, R as ReducerError, r as SourceEventContext, T as Task, t as TaskPhase, l as SessionStatus, E as EventTier } from './multi-session-xvSZstSN.js';
|
|
5
5
|
export { C as CommonFields, D as DEFAULT_EVENT_TIERS, a as EventType, b as InteractionBusHandlers, c as MarkdownRendererProps, d as MultiAgentSession, e as MultiAgentSessionProps, f as MultiSessionSourceConfig, g as MultiSessionStore, h as MultiSessionStoreOptions, i as MultiSessionStoreState, j as NodeWidget, k as NodeWidgetProps, P as PermissionResolvePayload, S as SessionSlice, m as SessionStore, n as SessionStoreOptions, o as SessionStoreState, s as SourceHandler, u as TaskStatus, w as createActiveSessionBridge, x as createEmptyTree, y as createInteractionBus, z as createMultiSessionStore, A as createSessionStore, B as getNoopInteractionBus, F as useActiveSession, G as useSessionIds } from './multi-session-xvSZstSN.js';
|
|
6
6
|
import { T as ToolDisplayRegistry, P as PermissionUiMode, b as DisplayMode, c as ProjectionContext, R as RenderableEntry, C as CanonicalNodeRef } from './sessionViewOptions-WM00Fpcn.js';
|
|
7
7
|
export { a as CollapsedExplorePayload, D as DEFAULT_SESSION_VIEW_OPTIONS, S as SessionViewOptions, d as ToolUseSnapshot, e as buildProjectionContext, f as buildProjectionViewContext, g as createDefaultToolRegistry, h as createProjectionContext, r as resolveEffectiveToolBodyMode, s as shouldApplyGrouping, i as shouldShowExploreDetail } from './sessionViewOptions-WM00Fpcn.js';
|
|
@@ -21,6 +21,9 @@ interface AgentSessionProps {
|
|
|
21
21
|
registry?: NodeRegistry;
|
|
22
22
|
tierOverrides?: TierOverrides;
|
|
23
23
|
onError?: (error: Error) => void;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated 重连策略由 Source(如 createAgentxSseSource 的 profile)承载;本 prop 未接入 store
|
|
26
|
+
*/
|
|
24
27
|
autoReconnect?: boolean;
|
|
25
28
|
debug?: boolean;
|
|
26
29
|
/** 为 true 且主舞台节点数超过阈值时使用 VirtualTimeline(V2-E) */
|
|
@@ -91,37 +94,6 @@ interface WorkflowScaleOptions {
|
|
|
91
94
|
}
|
|
92
95
|
declare const DEFAULT_WORKFLOW_SCALE_OPTIONS: WorkflowScaleOptions;
|
|
93
96
|
|
|
94
|
-
interface WorkflowSessionProps {
|
|
95
|
-
source: Source;
|
|
96
|
-
initialEvents?: LangchainAgentEvent[];
|
|
97
|
-
registry?: NodeRegistry;
|
|
98
|
-
tierOverrides?: TierOverrides;
|
|
99
|
-
onError?: (error: Error) => void;
|
|
100
|
-
interactionBus?: InteractionBus;
|
|
101
|
-
toolDisplayRegistry?: ToolDisplayRegistry;
|
|
102
|
-
defaultBodyMode?: ToolBodyMode;
|
|
103
|
-
permissionUiMode?: PermissionUiMode;
|
|
104
|
-
markdownRenderer?: MarkdownRenderer;
|
|
105
|
-
displayMode?: DisplayMode;
|
|
106
|
-
verbose?: boolean;
|
|
107
|
-
exploreFullscreenBash?: boolean;
|
|
108
|
-
memoryDir?: string | null;
|
|
109
|
-
workspaceRoot?: string | null;
|
|
110
|
-
virtualized?: boolean;
|
|
111
|
-
virtualizeThreshold?: number;
|
|
112
|
-
groupParallelTools?: boolean;
|
|
113
|
-
/** P1–P4:大规模 workflow 缩放选项 */
|
|
114
|
-
workflowScale?: Partial<WorkflowScaleOptions>;
|
|
115
|
-
/** P2:展开已淘汰 loop 时由宿主 replay 事件 */
|
|
116
|
-
onRequestLoopReplay?: WorkflowLoopReplayHandler;
|
|
117
|
-
/** SSE 流正常结束(传输 resolve);与 status=done 互补,供宿主解锁 loading */
|
|
118
|
-
onStreamComplete?: () => void;
|
|
119
|
-
children?: ReactNode;
|
|
120
|
-
}
|
|
121
|
-
declare function WorkflowSession({ source, initialEvents, registry, tierOverrides, onError, interactionBus, toolDisplayRegistry, defaultBodyMode, permissionUiMode, markdownRenderer, displayMode, verbose, exploreFullscreenBash, memoryDir, workspaceRoot, virtualized, virtualizeThreshold, groupParallelTools, workflowScale, onRequestLoopReplay, onStreamComplete, children, }: WorkflowSessionProps): react_jsx_runtime.JSX.Element;
|
|
122
|
-
|
|
123
|
-
declare const WorkflowScaleContext: react.Context<WorkflowScaleOptions>;
|
|
124
|
-
|
|
125
97
|
/**
|
|
126
98
|
* workflowDisplay.ts — SDK WorkflowDisplayPayload 契约(TS)
|
|
127
99
|
*
|
|
@@ -211,22 +183,6 @@ interface WorkflowContainerTreeState {
|
|
|
211
183
|
containersById: Record<string, WorkflowContainerRuntimeNode>;
|
|
212
184
|
}
|
|
213
185
|
|
|
214
|
-
interface WorkflowStageListPartition {
|
|
215
|
-
visible: WorkflowContainerRuntimeNode[];
|
|
216
|
-
hiddenCount: number;
|
|
217
|
-
total: number;
|
|
218
|
-
/** 当前已展示的 done stage 数量 */
|
|
219
|
-
visibleDoneCount: number;
|
|
220
|
-
/** done stage 总数 */
|
|
221
|
-
totalDoneCount: number;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* P3:running / failed / pending / blocked 全显;
|
|
225
|
-
* done 按 maxVisibleDoneCount 分页展示(默认最近 completedStagePageSize 条)。
|
|
226
|
-
* maxVisibleDoneCount 由 WorkflowStageListPanel 的 "Show N more" 逐页递增。
|
|
227
|
-
*/
|
|
228
|
-
declare function partitionWorkflowStages(stages: WorkflowContainerRuntimeNode[], maxVisibleDoneCount: number, containersById?: Record<string, WorkflowContainerRuntimeNode>): WorkflowStageListPartition;
|
|
229
|
-
|
|
230
186
|
/**
|
|
231
187
|
* workflowSession.ts — Workflow 会话顶层状态
|
|
232
188
|
*
|
|
@@ -242,6 +198,39 @@ declare function partitionWorkflowStages(stages: WorkflowContainerRuntimeNode[],
|
|
|
242
198
|
|
|
243
199
|
/** SDK v1.9.0 根 workflow 终态语义 SSOT */
|
|
244
200
|
type WorkflowTerminalKind = 'healthy' | 'forced_closeout' | 'failed';
|
|
201
|
+
/** 宿主业务权威快照 — 唯一控制面输入(D33) */
|
|
202
|
+
type WorkflowAuthorityStatus = 'pending' | 'running' | 'done' | 'error' | 'canceled' | 'partial_success';
|
|
203
|
+
interface WorkflowAuthoritySnapshot {
|
|
204
|
+
taskId: string;
|
|
205
|
+
status: WorkflowAuthorityStatus;
|
|
206
|
+
updatedAt: number;
|
|
207
|
+
metadata?: {
|
|
208
|
+
failed_items?: string[];
|
|
209
|
+
cleanup_failures?: Array<{
|
|
210
|
+
action: string;
|
|
211
|
+
error: string;
|
|
212
|
+
}>;
|
|
213
|
+
execution_authority?: true;
|
|
214
|
+
orphan_items_reaped?: number;
|
|
215
|
+
partial_success_kind?: string;
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
/** 纯投影 / 传输展示态 — 不可驱动宿主 phase(D33) */
|
|
219
|
+
type WorkflowDisplayProjectionStatus = 'connecting' | 'running' | 'done' | 'error' | 'done_with_warning';
|
|
220
|
+
interface WorkflowDisplayProjection {
|
|
221
|
+
/** SSE 字节流是否已结束(transport) */
|
|
222
|
+
streamEnded: boolean;
|
|
223
|
+
/** 投影推断的编排展示态(workflow-end / 容器树;缺帧时不 infer done) */
|
|
224
|
+
projectionStatus: WorkflowDisplayProjectionStatus;
|
|
225
|
+
terminalKind: WorkflowTerminalKind | null;
|
|
226
|
+
openChildIdentities: string[];
|
|
227
|
+
/** streamEnded 且 authority 仍 running 超过阈值时的展示降级 */
|
|
228
|
+
awaitingAuthority?: boolean;
|
|
229
|
+
/** streamEnded + running 超过 120s 仍无 authority terminal */
|
|
230
|
+
authoritySyncFailed?: boolean;
|
|
231
|
+
/** authoritySource.subscribe 抛错时的展示降级 */
|
|
232
|
+
authoritySubscribeFailed?: boolean;
|
|
233
|
+
}
|
|
245
234
|
/** P2:stage 完成摘要缓存(loop 树淘汰后仍显示 teaser) */
|
|
246
235
|
interface CachedStageDoneSummary {
|
|
247
236
|
label: string;
|
|
@@ -278,11 +267,10 @@ interface WorkflowScopeFrame {
|
|
|
278
267
|
loopSessionId: string | null;
|
|
279
268
|
}
|
|
280
269
|
interface WorkflowSessionState {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
openChildIdentities: string[];
|
|
270
|
+
/** 宿主注入;Reducer 禁止写入 */
|
|
271
|
+
authority: WorkflowAuthoritySnapshot | null;
|
|
272
|
+
/** 事件投影 + 传输展示;不可驱动 phase */
|
|
273
|
+
display: WorkflowDisplayProjection;
|
|
286
274
|
meta: {
|
|
287
275
|
workflowRunId: string | null;
|
|
288
276
|
startedAt: number | null;
|
|
@@ -304,6 +292,119 @@ interface WorkflowSessionState {
|
|
|
304
292
|
}
|
|
305
293
|
declare function createEmptyWorkflowSessionState(): WorkflowSessionState;
|
|
306
294
|
|
|
295
|
+
/**
|
|
296
|
+
* workflowAuthoritySource.ts — 宿主 workflow 业务权威输入契约(D33 §6.1)
|
|
297
|
+
*
|
|
298
|
+
* 职责:
|
|
299
|
+
* 定义 WorkflowSession 必填的 authority 订阅接口。
|
|
300
|
+
*
|
|
301
|
+
* 链路位置:
|
|
302
|
+
* WorkflowSession → workflowSessionStore.applyAuthoritySnapshot。
|
|
303
|
+
*
|
|
304
|
+
* 当前裁剪范围:
|
|
305
|
+
* createPollingAuthoritySource 于 Phase 3;此处仅基线接口。
|
|
306
|
+
*/
|
|
307
|
+
|
|
308
|
+
/** 基线契约:hydrate + 推送订阅 */
|
|
309
|
+
interface WorkflowAuthoritySource {
|
|
310
|
+
getSnapshot(): WorkflowAuthoritySnapshot | null;
|
|
311
|
+
subscribe(cb: (snap: WorkflowAuthoritySnapshot) => void): () => void;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
interface WorkflowSessionProps {
|
|
315
|
+
source: Source;
|
|
316
|
+
/** 宿主业务权威(必填);测试可用 createMockAuthoritySource */
|
|
317
|
+
authoritySource: WorkflowAuthoritySource;
|
|
318
|
+
initialEvents?: LangchainAgentEvent[];
|
|
319
|
+
registry?: NodeRegistry;
|
|
320
|
+
tierOverrides?: TierOverrides;
|
|
321
|
+
onError?: (error: Error) => void;
|
|
322
|
+
interactionBus?: InteractionBus;
|
|
323
|
+
toolDisplayRegistry?: ToolDisplayRegistry;
|
|
324
|
+
defaultBodyMode?: ToolBodyMode;
|
|
325
|
+
permissionUiMode?: PermissionUiMode;
|
|
326
|
+
markdownRenderer?: MarkdownRenderer;
|
|
327
|
+
displayMode?: DisplayMode;
|
|
328
|
+
verbose?: boolean;
|
|
329
|
+
exploreFullscreenBash?: boolean;
|
|
330
|
+
memoryDir?: string | null;
|
|
331
|
+
workspaceRoot?: string | null;
|
|
332
|
+
virtualized?: boolean;
|
|
333
|
+
virtualizeThreshold?: number;
|
|
334
|
+
groupParallelTools?: boolean;
|
|
335
|
+
/** P1–P4:大规模 workflow 缩放选项 */
|
|
336
|
+
workflowScale?: Partial<WorkflowScaleOptions>;
|
|
337
|
+
/** P2:展开已淘汰 loop 时由宿主 replay 事件 */
|
|
338
|
+
onRequestLoopReplay?: WorkflowLoopReplayHandler;
|
|
339
|
+
/** authority 首次进入 terminal 时触发(phase SSOT) */
|
|
340
|
+
onAuthorityTerminal?: (snapshot: WorkflowAuthoritySnapshot) => void;
|
|
341
|
+
/** SSE 传输 resolve;仅 analytics / 非 phase */
|
|
342
|
+
onDisplayStreamEnded?: () => void;
|
|
343
|
+
children?: ReactNode;
|
|
344
|
+
}
|
|
345
|
+
declare function WorkflowSession({ source, authoritySource, initialEvents, registry, tierOverrides, onError, interactionBus, toolDisplayRegistry, defaultBodyMode, permissionUiMode, markdownRenderer, displayMode, verbose, exploreFullscreenBash, memoryDir, workspaceRoot, virtualized, virtualizeThreshold, groupParallelTools, workflowScale, onRequestLoopReplay, onAuthorityTerminal, onDisplayStreamEnded, children, }: WorkflowSessionProps): react_jsx_runtime.JSX.Element;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* createMockAuthoritySource.ts — 测试 / demo 用 authority 源
|
|
349
|
+
*
|
|
350
|
+
* 职责:
|
|
351
|
+
* 提供 instant terminal 或可控 push 的 mock,避免测试依赖 registry。
|
|
352
|
+
*
|
|
353
|
+
* 链路位置:
|
|
354
|
+
* Vitest · simple workflow 页(Phase 3 前临时 mock)。
|
|
355
|
+
*/
|
|
356
|
+
|
|
357
|
+
interface MockAuthoritySourceOptions {
|
|
358
|
+
snapshot?: WorkflowAuthoritySnapshot | null;
|
|
359
|
+
/** subscribe 后依次推送(模拟 SSE / poll) */
|
|
360
|
+
pendingUpdates?: WorkflowAuthoritySnapshot[];
|
|
361
|
+
}
|
|
362
|
+
declare function createMockAuthoritySource(snapshotOrOptions?: WorkflowAuthoritySnapshot | null | MockAuthoritySourceOptions): WorkflowAuthoritySource;
|
|
363
|
+
declare function createDoneAuthoritySource(taskId?: string): WorkflowAuthoritySource;
|
|
364
|
+
declare function createRunningAuthoritySource(taskId?: string): WorkflowAuthoritySource;
|
|
365
|
+
declare function createControllableAuthoritySource(initial: WorkflowAuthoritySnapshot): WorkflowAuthoritySource & {
|
|
366
|
+
push: (snapshot: WorkflowAuthoritySnapshot) => void;
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* createPollingAuthoritySource.ts — REST 轮询 authority 源(D33 §6.1 · §6.6)
|
|
371
|
+
*
|
|
372
|
+
* 职责:
|
|
373
|
+
* 宿主兜底轮询 registry;terminal hydrate 短路;AbortSignal 清理 interval。
|
|
374
|
+
*
|
|
375
|
+
* 链路位置:
|
|
376
|
+
* 宿主 workflow 页 · Phase 5 前 simple 可选接入。
|
|
377
|
+
*
|
|
378
|
+
* 当前裁剪范围:
|
|
379
|
+
* 不含 SSE task_complete;优先由宿主 push 订阅。
|
|
380
|
+
*/
|
|
381
|
+
|
|
382
|
+
interface PollingAuthoritySourceOptions {
|
|
383
|
+
intervalMs?: number;
|
|
384
|
+
signal?: AbortSignal;
|
|
385
|
+
/** hydrate 已 terminal 时注入,subscribe 不启动 poll */
|
|
386
|
+
initialSnapshot?: WorkflowAuthoritySnapshot | null;
|
|
387
|
+
}
|
|
388
|
+
declare function createPollingAuthoritySource(taskId: string, fetchFn: (id: string) => Promise<WorkflowAuthoritySnapshot>, options?: PollingAuthoritySourceOptions): WorkflowAuthoritySource;
|
|
389
|
+
|
|
390
|
+
declare const WorkflowScaleContext: react.Context<WorkflowScaleOptions>;
|
|
391
|
+
|
|
392
|
+
interface WorkflowStageListPartition {
|
|
393
|
+
visible: WorkflowContainerRuntimeNode[];
|
|
394
|
+
hiddenCount: number;
|
|
395
|
+
total: number;
|
|
396
|
+
/** 当前已展示的 done stage 数量 */
|
|
397
|
+
visibleDoneCount: number;
|
|
398
|
+
/** done stage 总数 */
|
|
399
|
+
totalDoneCount: number;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* P3:running / failed / pending / blocked 全显;
|
|
403
|
+
* done 按 maxVisibleDoneCount 分页展示(默认最近 completedStagePageSize 条)。
|
|
404
|
+
* maxVisibleDoneCount 由 WorkflowStageListPanel 的 "Show N more" 逐页递增。
|
|
405
|
+
*/
|
|
406
|
+
declare function partitionWorkflowStages(stages: WorkflowContainerRuntimeNode[], maxVisibleDoneCount: number, containersById?: Record<string, WorkflowContainerRuntimeNode>): WorkflowStageListPartition;
|
|
407
|
+
|
|
307
408
|
/**
|
|
308
409
|
* workflowSessionStore.ts — Workflow 页 zustand store
|
|
309
410
|
*
|
|
@@ -335,8 +436,14 @@ interface WorkflowSessionStoreState {
|
|
|
335
436
|
applyEvents: (events: LangchainAgentEvent[]) => void;
|
|
336
437
|
reset: () => void;
|
|
337
438
|
markAsError: (error?: Error) => void;
|
|
338
|
-
/** SSE
|
|
339
|
-
|
|
439
|
+
/** SSE 传输结束:仅 display.streamEnded;不 infer 业务 done(D33) */
|
|
440
|
+
markStreamEnded: () => void;
|
|
441
|
+
/** 宿主 authority 快照写入(唯一业务终态入口) */
|
|
442
|
+
applyAuthoritySnapshot: (snapshot: WorkflowAuthoritySnapshot) => void;
|
|
443
|
+
/** §5.4:streamEnded + authority running 超时展示 */
|
|
444
|
+
setAwaitingAuthority: (value: boolean) => void;
|
|
445
|
+
setAuthoritySyncFailed: (value: boolean) => void;
|
|
446
|
+
setAuthoritySubscribeFailed: (value: boolean) => void;
|
|
340
447
|
/** P2:展开 done stage 时 pin,避免淘汰 */
|
|
341
448
|
pinLoopSession: (loopSessionId: string) => void;
|
|
342
449
|
/** P2:宿主 replay 后灌入 loop 树(同步;测试与小批量) */
|
|
@@ -352,7 +459,8 @@ type WorkflowSessionStore = StoreApi<WorkflowSessionStoreState>;
|
|
|
352
459
|
declare function createWorkflowSessionStore(initialState?: WorkflowSessionState, storeOptions?: WorkflowSessionStoreOptions): WorkflowSessionStore;
|
|
353
460
|
|
|
354
461
|
declare function useWorkflowSessionStoreApi(): WorkflowSessionStore;
|
|
355
|
-
|
|
462
|
+
/** 投影展示态(非 phase SSOT;phase 用 isAuthorityTerminal)。 */
|
|
463
|
+
declare function useWorkflowSessionStatus(): WorkflowDisplayProjectionStatus;
|
|
356
464
|
|
|
357
465
|
interface WorkflowChromeProps {
|
|
358
466
|
containerTree: WorkflowContainerTreeState;
|
|
@@ -965,6 +1073,9 @@ declare class MissingApplicationKindError extends Error {
|
|
|
965
1073
|
* 职责:SSE transport profile / policy 解析与终态、重连预算语义(D31 P1)。
|
|
966
1074
|
* 链路位置:createAgentxSseSource 入口 → resolveSseTransportPolicy → 连接状态机。
|
|
967
1075
|
* 当前裁剪范围:三预设 profile + 显式 policy 覆写;不含 backend replayMode。
|
|
1076
|
+
*
|
|
1077
|
+
* D33 分层:本模块 terminal 集合仅表示<strong>传输层</strong>字节流结束(finish / workflow-end 等),
|
|
1078
|
+
* 不等于 workflow 业务终态(authority);phase / spinner 读 WorkflowAuthoritySnapshot(见 D33)。
|
|
968
1079
|
*/
|
|
969
1080
|
|
|
970
1081
|
type SseTransportProfile = 'oneshot' | 'oneshot-workflow' | 'replayable-workflow';
|
|
@@ -1152,9 +1263,41 @@ declare function createReplaySource(events: LangchainAgentEvent[], opts?: Replay
|
|
|
1152
1263
|
|
|
1153
1264
|
/** Pure reducer:Workflow 会话状态 + 单条事件。 */
|
|
1154
1265
|
declare function reduceWorkflowSession(state: WorkflowSessionState, event: LangchainAgentEvent, eventIndex: number, options?: ReduceOptions): WorkflowSessionState;
|
|
1266
|
+
/**
|
|
1267
|
+
* SSE 传输结束:仅设 display.streamEnded;不 infer projection done(D33)。
|
|
1268
|
+
* authority 已 terminal 时可选 force-settle 容器以对齐展示。
|
|
1269
|
+
*/
|
|
1270
|
+
declare function finalizeWorkflowDisplayOnStreamEnded(state: WorkflowSessionState): WorkflowSessionState;
|
|
1155
1271
|
/** 从空状态回放 workflow 事件序列。 */
|
|
1156
1272
|
declare function reduceWorkflowEvents(events: LangchainAgentEvent[], options?: ReduceOptions): WorkflowSessionState;
|
|
1157
1273
|
|
|
1274
|
+
/**
|
|
1275
|
+
* workflowAuthoritySelectors.ts — Workflow authority/display 读法 SSOT
|
|
1276
|
+
*
|
|
1277
|
+
* 职责:
|
|
1278
|
+
* 宿主 phase、全局 spinner、警告条的唯一判定入口;禁止直接读 display 做 phase。
|
|
1279
|
+
*
|
|
1280
|
+
* 链路位置:
|
|
1281
|
+
* WorkflowSession · WorkflowChrome · workflowTaskListMerge。
|
|
1282
|
+
*
|
|
1283
|
+
* 当前裁剪范围:
|
|
1284
|
+
* Phase 1:核心 selector;resolveWorkflowBanner 组合矩阵 Phase 2 扩展。
|
|
1285
|
+
*/
|
|
1286
|
+
|
|
1287
|
+
declare function isAuthorityTerminalStatus(status: WorkflowAuthorityStatus | undefined): boolean;
|
|
1288
|
+
declare function isAuthorityTerminal(state: WorkflowSessionState): boolean;
|
|
1289
|
+
/** 全局 workflow spinner:authority 非 terminal 时保持(含 projection 已 done 的 T2)。 */
|
|
1290
|
+
declare function shouldShowGlobalSpinner(state: WorkflowSessionState): boolean;
|
|
1291
|
+
interface WorkflowBannerDescriptor {
|
|
1292
|
+
kind: 'none' | 'partial_success' | 'forced_closeout' | 'awaiting_authority' | 'sync_failed';
|
|
1293
|
+
message: string;
|
|
1294
|
+
}
|
|
1295
|
+
/** Phase 1 基础文案;Phase 2 扩展 partial_success × forced_closeout 矩阵。 */
|
|
1296
|
+
declare function resolveWorkflowBanner(state: WorkflowSessionState): WorkflowBannerDescriptor;
|
|
1297
|
+
/** UI 读投影态(非 phase SSOT)。 */
|
|
1298
|
+
declare function getDisplayProjectionStatus(state: WorkflowSessionState): WorkflowSessionState['display']['projectionStatus'];
|
|
1299
|
+
declare function applyAuthoritySnapshotToState(state: WorkflowSessionState, snapshot: WorkflowAuthoritySnapshot): WorkflowSessionState;
|
|
1300
|
+
|
|
1158
1301
|
/** 与 backend/langchain_agentx_stream_ui_backend/task_sync/multi_sse_bridge.py 对齐 */
|
|
1159
1302
|
declare const WORKFLOW_STRUCTURE_EVENT_PREFIXES: readonly string[];
|
|
1160
1303
|
/** 显式 SSOT(文档/契约测试);新增结构类型应同时满足前缀规则或补入此集合 */
|
|
@@ -1208,4 +1351,4 @@ interface ClassifyContext {
|
|
|
1208
1351
|
declare function resolveEventTier(eventType: string, overrides?: TierOverrides): EventTier;
|
|
1209
1352
|
declare function classifyEvent(event: LangchainAgentEvent, ctx: ClassifyContext, overrides?: TierOverrides, eventIndex?: number): ClassifiedEvent;
|
|
1210
1353
|
|
|
1211
|
-
export { Agent, AgentLoopView, type AgentLoopViewProps, AgentSession, type AgentSessionProps, type AgentxMetaFrame, type AgentxSseSourceOptions, type ApplicationKind, ApplicationKindMismatchError, AskUserQuestion, BOUNDED_DEFAULTS, Bash, CanonicalNodeRef, type ClassifiedEvent, type ClassifyContext, CollapseKind, CollapsedExploreNode, type CollapsedExploreNodeProps, DEFAULT_WORKFLOW_SCALE_OPTIONS, type DiagramFitLayout, DiagramZoomShell, type DiagramZoomShellProps, DiagramZoomView, type DiagramZoomViewProps, DisplayMode, EXPECTED_PROTOCOL_VERSION, Edit, ErrorCard, EventTier, ExploreCollapseAccumulator, GROUPABLE_TOOL_NAMES, Glob, Grep, GroupedToolUseAccumulator, type HydrateLoopSessionAsyncOptions, InteractionBus, LangchainAgentEvent, MIN_HINT_DISPLAY_MS, MarkdownRenderer, MermaidDiagram, type MermaidDiagramProps, type MermaidInitOptions, type MermaidThemeName, MissingApplicationKindError, NodeRegistry, PROFILE_PRESETS, PermissionCard, PermissionUiMode, PlantUMLBlock, type PlantUMLBlockProps, PlantUMLDiagram, type PlantUMLDiagramProps, type ProjectedTimelineItem, ProjectionContext, DisplayMode as ProjectionDisplayMode, Read, ReasoningBubble, ReconnectBudget, 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 SseReconnectMode, type SseReconnectPolicy, type SseReplayMode, type SseTerminalPolicy, type SseTransportFailureKind, type SseTransportPolicy, type SseTransportPolicyOverride, type SseTransportProfile, 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, type WorkflowTerminalKind, Write, buildCanonicalFromTree, buildRelevantMemoriesCanonical, buildResumeStreamUrl, buildSystemEventCanonical, buildTimelineEntries, classifyEvent, commandAsHint, computeViewportFitTransform, configureMermaid, configurePlantumlServer, createAgentxSseSource, createDefaultRegistry, createEmptyWorkflowSessionState, createMockSource, createReplaySource, createWorkflowSessionStore, deriveLoopSessionIdFromAgentEvent, entryKey, filterAgentLoopReplayEvents, fixDiagramSvg, formatAgentTitle, formatExploreSummaryText, formatHookFinishedSummary, formatShellProgressSuffix, formatTaskFooterLabel, getChildIds, getMainStageIds, isAgentLoopReplayEventType, isGitOperationCommand, isGroupableToolName, isMcpToolName, isSseStreamTerminalEvent, isWorkflowStructureEventType, iterMountCandidates, partitionWorkflowStages, projectCanonical, projectTimeline, reduceAgentLoopEvent, reduceEvents, reduceTree, reduceWorkflowEvents, reduceWorkflowSession, replayEvents, replayTree, resolveEventTier, resolveResponseId, resolveShellProgressFromPayload, resolveSseTransportPolicy, shouldShowTaskListFooter, streamChunk, useChildren, useInteractionBus, useInternalErrors, useMinDisplayTime, useNode, useNodeTyped, useProjectedTimeline, useReplayTree, useSessionMeta, useSessionStatus, useTimeline, useWorkflowSessionStatus, useWorkflowSessionStoreApi };
|
|
1354
|
+
export { Agent, AgentLoopView, type AgentLoopViewProps, AgentSession, type AgentSessionProps, type AgentxMetaFrame, type AgentxSseSourceOptions, type ApplicationKind, ApplicationKindMismatchError, AskUserQuestion, BOUNDED_DEFAULTS, Bash, CanonicalNodeRef, type ClassifiedEvent, type ClassifyContext, CollapseKind, CollapsedExploreNode, type CollapsedExploreNodeProps, DEFAULT_WORKFLOW_SCALE_OPTIONS, type DiagramFitLayout, DiagramZoomShell, type DiagramZoomShellProps, DiagramZoomView, type DiagramZoomViewProps, DisplayMode, EXPECTED_PROTOCOL_VERSION, Edit, ErrorCard, EventTier, ExploreCollapseAccumulator, GROUPABLE_TOOL_NAMES, Glob, Grep, GroupedToolUseAccumulator, type HydrateLoopSessionAsyncOptions, InteractionBus, LangchainAgentEvent, MIN_HINT_DISPLAY_MS, MarkdownRenderer, MermaidDiagram, type MermaidDiagramProps, type MermaidInitOptions, type MermaidThemeName, MissingApplicationKindError, type MockAuthoritySourceOptions, NodeRegistry, PROFILE_PRESETS, PermissionCard, PermissionUiMode, PlantUMLBlock, type PlantUMLBlockProps, PlantUMLDiagram, type PlantUMLDiagramProps, type PollingAuthoritySourceOptions, type ProjectedTimelineItem, ProjectionContext, DisplayMode as ProjectionDisplayMode, Read, ReasoningBubble, ReconnectBudget, 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 SseReconnectMode, type SseReconnectPolicy, type SseReplayMode, type SseTerminalPolicy, type SseTransportFailureKind, type SseTransportPolicy, type SseTransportPolicyOverride, type SseTransportProfile, 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, type WorkflowAuthoritySnapshot, type WorkflowAuthoritySource, type WorkflowAuthorityStatus, type WorkflowBannerDescriptor, WorkflowChrome, type WorkflowChromeProps, type WorkflowDisplayProjection, type WorkflowDisplayProjectionStatus, type WorkflowLoopReplayHandler, WorkflowLoopReplayProvider, type WorkflowProgressState, WorkflowScaleContext, type WorkflowScaleOptions, type WorkflowScopeFrame, WorkflowSession, type WorkflowSessionProps, type WorkflowSessionState, type WorkflowSessionStore, type WorkflowSessionStoreOptions, type WorkflowSessionStoreState, type WorkflowStageProgress, WorkflowTaskListFooter, type WorkflowTerminalKind, Write, applyAuthoritySnapshotToState, buildCanonicalFromTree, buildRelevantMemoriesCanonical, buildResumeStreamUrl, buildSystemEventCanonical, buildTimelineEntries, classifyEvent, commandAsHint, computeViewportFitTransform, configureMermaid, configurePlantumlServer, createAgentxSseSource, createControllableAuthoritySource, createDefaultRegistry, createDoneAuthoritySource, createEmptyWorkflowSessionState, createMockAuthoritySource, createMockSource, createPollingAuthoritySource, createReplaySource, createRunningAuthoritySource, createWorkflowSessionStore, deriveLoopSessionIdFromAgentEvent, entryKey, filterAgentLoopReplayEvents, finalizeWorkflowDisplayOnStreamEnded, fixDiagramSvg, formatAgentTitle, formatExploreSummaryText, formatHookFinishedSummary, formatShellProgressSuffix, formatTaskFooterLabel, getChildIds, getDisplayProjectionStatus, getMainStageIds, isAgentLoopReplayEventType, isAuthorityTerminal, isAuthorityTerminalStatus, isGitOperationCommand, isGroupableToolName, isMcpToolName, isSseStreamTerminalEvent, isWorkflowStructureEventType, iterMountCandidates, partitionWorkflowStages, projectCanonical, projectTimeline, reduceAgentLoopEvent, reduceEvents, reduceTree, reduceWorkflowEvents, reduceWorkflowSession, replayEvents, replayTree, resolveEventTier, resolveResponseId, resolveShellProgressFromPayload, resolveSseTransportPolicy, resolveWorkflowBanner, shouldShowGlobalSpinner, shouldShowTaskListFooter, streamChunk, useChildren, useInteractionBus, useInternalErrors, useMinDisplayTime, useNode, useNodeTyped, useProjectedTimeline, useReplayTree, useSessionMeta, useSessionStatus, useTimeline, useWorkflowSessionStatus, useWorkflowSessionStoreApi };
|