langchain_agentx_stream_ui 0.2.7 → 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 +197 -57
- package/dist/index.js +546 -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';
|
|
@@ -94,37 +94,6 @@ interface WorkflowScaleOptions {
|
|
|
94
94
|
}
|
|
95
95
|
declare const DEFAULT_WORKFLOW_SCALE_OPTIONS: WorkflowScaleOptions;
|
|
96
96
|
|
|
97
|
-
interface WorkflowSessionProps {
|
|
98
|
-
source: Source;
|
|
99
|
-
initialEvents?: LangchainAgentEvent[];
|
|
100
|
-
registry?: NodeRegistry;
|
|
101
|
-
tierOverrides?: TierOverrides;
|
|
102
|
-
onError?: (error: Error) => void;
|
|
103
|
-
interactionBus?: InteractionBus;
|
|
104
|
-
toolDisplayRegistry?: ToolDisplayRegistry;
|
|
105
|
-
defaultBodyMode?: ToolBodyMode;
|
|
106
|
-
permissionUiMode?: PermissionUiMode;
|
|
107
|
-
markdownRenderer?: MarkdownRenderer;
|
|
108
|
-
displayMode?: DisplayMode;
|
|
109
|
-
verbose?: boolean;
|
|
110
|
-
exploreFullscreenBash?: boolean;
|
|
111
|
-
memoryDir?: string | null;
|
|
112
|
-
workspaceRoot?: string | null;
|
|
113
|
-
virtualized?: boolean;
|
|
114
|
-
virtualizeThreshold?: number;
|
|
115
|
-
groupParallelTools?: boolean;
|
|
116
|
-
/** P1–P4:大规模 workflow 缩放选项 */
|
|
117
|
-
workflowScale?: Partial<WorkflowScaleOptions>;
|
|
118
|
-
/** P2:展开已淘汰 loop 时由宿主 replay 事件 */
|
|
119
|
-
onRequestLoopReplay?: WorkflowLoopReplayHandler;
|
|
120
|
-
/** SSE 流正常结束(传输 resolve);与 status=done 互补,供宿主解锁 loading */
|
|
121
|
-
onStreamComplete?: () => void;
|
|
122
|
-
children?: ReactNode;
|
|
123
|
-
}
|
|
124
|
-
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;
|
|
125
|
-
|
|
126
|
-
declare const WorkflowScaleContext: react.Context<WorkflowScaleOptions>;
|
|
127
|
-
|
|
128
97
|
/**
|
|
129
98
|
* workflowDisplay.ts — SDK WorkflowDisplayPayload 契约(TS)
|
|
130
99
|
*
|
|
@@ -214,22 +183,6 @@ interface WorkflowContainerTreeState {
|
|
|
214
183
|
containersById: Record<string, WorkflowContainerRuntimeNode>;
|
|
215
184
|
}
|
|
216
185
|
|
|
217
|
-
interface WorkflowStageListPartition {
|
|
218
|
-
visible: WorkflowContainerRuntimeNode[];
|
|
219
|
-
hiddenCount: number;
|
|
220
|
-
total: number;
|
|
221
|
-
/** 当前已展示的 done stage 数量 */
|
|
222
|
-
visibleDoneCount: number;
|
|
223
|
-
/** done stage 总数 */
|
|
224
|
-
totalDoneCount: number;
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* P3:running / failed / pending / blocked 全显;
|
|
228
|
-
* done 按 maxVisibleDoneCount 分页展示(默认最近 completedStagePageSize 条)。
|
|
229
|
-
* maxVisibleDoneCount 由 WorkflowStageListPanel 的 "Show N more" 逐页递增。
|
|
230
|
-
*/
|
|
231
|
-
declare function partitionWorkflowStages(stages: WorkflowContainerRuntimeNode[], maxVisibleDoneCount: number, containersById?: Record<string, WorkflowContainerRuntimeNode>): WorkflowStageListPartition;
|
|
232
|
-
|
|
233
186
|
/**
|
|
234
187
|
* workflowSession.ts — Workflow 会话顶层状态
|
|
235
188
|
*
|
|
@@ -245,6 +198,39 @@ declare function partitionWorkflowStages(stages: WorkflowContainerRuntimeNode[],
|
|
|
245
198
|
|
|
246
199
|
/** SDK v1.9.0 根 workflow 终态语义 SSOT */
|
|
247
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
|
+
}
|
|
248
234
|
/** P2:stage 完成摘要缓存(loop 树淘汰后仍显示 teaser) */
|
|
249
235
|
interface CachedStageDoneSummary {
|
|
250
236
|
label: string;
|
|
@@ -281,11 +267,10 @@ interface WorkflowScopeFrame {
|
|
|
281
267
|
loopSessionId: string | null;
|
|
282
268
|
}
|
|
283
269
|
interface WorkflowSessionState {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
openChildIdentities: string[];
|
|
270
|
+
/** 宿主注入;Reducer 禁止写入 */
|
|
271
|
+
authority: WorkflowAuthoritySnapshot | null;
|
|
272
|
+
/** 事件投影 + 传输展示;不可驱动 phase */
|
|
273
|
+
display: WorkflowDisplayProjection;
|
|
289
274
|
meta: {
|
|
290
275
|
workflowRunId: string | null;
|
|
291
276
|
startedAt: number | null;
|
|
@@ -307,6 +292,119 @@ interface WorkflowSessionState {
|
|
|
307
292
|
}
|
|
308
293
|
declare function createEmptyWorkflowSessionState(): WorkflowSessionState;
|
|
309
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
|
+
|
|
310
408
|
/**
|
|
311
409
|
* workflowSessionStore.ts — Workflow 页 zustand store
|
|
312
410
|
*
|
|
@@ -338,8 +436,14 @@ interface WorkflowSessionStoreState {
|
|
|
338
436
|
applyEvents: (events: LangchainAgentEvent[]) => void;
|
|
339
437
|
reset: () => void;
|
|
340
438
|
markAsError: (error?: Error) => void;
|
|
341
|
-
/** SSE
|
|
342
|
-
|
|
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;
|
|
343
447
|
/** P2:展开 done stage 时 pin,避免淘汰 */
|
|
344
448
|
pinLoopSession: (loopSessionId: string) => void;
|
|
345
449
|
/** P2:宿主 replay 后灌入 loop 树(同步;测试与小批量) */
|
|
@@ -355,7 +459,8 @@ type WorkflowSessionStore = StoreApi<WorkflowSessionStoreState>;
|
|
|
355
459
|
declare function createWorkflowSessionStore(initialState?: WorkflowSessionState, storeOptions?: WorkflowSessionStoreOptions): WorkflowSessionStore;
|
|
356
460
|
|
|
357
461
|
declare function useWorkflowSessionStoreApi(): WorkflowSessionStore;
|
|
358
|
-
|
|
462
|
+
/** 投影展示态(非 phase SSOT;phase 用 isAuthorityTerminal)。 */
|
|
463
|
+
declare function useWorkflowSessionStatus(): WorkflowDisplayProjectionStatus;
|
|
359
464
|
|
|
360
465
|
interface WorkflowChromeProps {
|
|
361
466
|
containerTree: WorkflowContainerTreeState;
|
|
@@ -968,6 +1073,9 @@ declare class MissingApplicationKindError extends Error {
|
|
|
968
1073
|
* 职责:SSE transport profile / policy 解析与终态、重连预算语义(D31 P1)。
|
|
969
1074
|
* 链路位置:createAgentxSseSource 入口 → resolveSseTransportPolicy → 连接状态机。
|
|
970
1075
|
* 当前裁剪范围:三预设 profile + 显式 policy 覆写;不含 backend replayMode。
|
|
1076
|
+
*
|
|
1077
|
+
* D33 分层:本模块 terminal 集合仅表示<strong>传输层</strong>字节流结束(finish / workflow-end 等),
|
|
1078
|
+
* 不等于 workflow 业务终态(authority);phase / spinner 读 WorkflowAuthoritySnapshot(见 D33)。
|
|
971
1079
|
*/
|
|
972
1080
|
|
|
973
1081
|
type SseTransportProfile = 'oneshot' | 'oneshot-workflow' | 'replayable-workflow';
|
|
@@ -1155,9 +1263,41 @@ declare function createReplaySource(events: LangchainAgentEvent[], opts?: Replay
|
|
|
1155
1263
|
|
|
1156
1264
|
/** Pure reducer:Workflow 会话状态 + 单条事件。 */
|
|
1157
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;
|
|
1158
1271
|
/** 从空状态回放 workflow 事件序列。 */
|
|
1159
1272
|
declare function reduceWorkflowEvents(events: LangchainAgentEvent[], options?: ReduceOptions): WorkflowSessionState;
|
|
1160
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
|
+
|
|
1161
1301
|
/** 与 backend/langchain_agentx_stream_ui_backend/task_sync/multi_sse_bridge.py 对齐 */
|
|
1162
1302
|
declare const WORKFLOW_STRUCTURE_EVENT_PREFIXES: readonly string[];
|
|
1163
1303
|
/** 显式 SSOT(文档/契约测试);新增结构类型应同时满足前缀规则或补入此集合 */
|
|
@@ -1211,4 +1351,4 @@ interface ClassifyContext {
|
|
|
1211
1351
|
declare function resolveEventTier(eventType: string, overrides?: TierOverrides): EventTier;
|
|
1212
1352
|
declare function classifyEvent(event: LangchainAgentEvent, ctx: ClassifyContext, overrides?: TierOverrides, eventIndex?: number): ClassifiedEvent;
|
|
1213
1353
|
|
|
1214
|
-
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 };
|