langchain_agentx_stream_ui 0.7.2 → 0.7.6
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/{AskUserQuestionToolBody-C6J742a2.d.ts → AskUserQuestionToolBody-CrQTL9RY.d.ts} +2 -2
- package/dist/{MarkdownBlock-B_wNhCB4.d.ts → MarkdownBlock-Ag7HSqsu.d.ts} +1 -1
- package/dist/{chunk-TSZ6GVSA.js → chunk-AMUGAG7U.js} +295 -21
- package/dist/chunk-AMUGAG7U.js.map +1 -0
- package/dist/{chunk-N2OSBCFN.js → chunk-RWKNI52H.js} +87 -8
- package/dist/chunk-RWKNI52H.js.map +1 -0
- package/dist/{chunk-OV6UUIA3.js → chunk-VYXHVGJU.js} +9 -1
- package/dist/chunk-VYXHVGJU.js.map +1 -0
- package/dist/default.css +98 -0
- package/dist/index.d.ts +16 -11
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/{multi-session-Dzkwt9KF.d.ts → multi-session-9LtrGlsm.d.ts} +43 -7
- package/dist/multi-session.d.ts +4 -4
- package/dist/multi-session.js +3 -3
- package/dist/{nodes-MpVB9C5d.d.ts → nodes-uahIhQwz.d.ts} +22 -2
- package/dist/{sessionViewOptions-DeTrGjRM.d.ts → sessionViewOptions-DaxstMhx.d.ts} +2 -2
- package/dist/tools-presentation.d.ts +3 -3
- package/dist/tools.d.ts +5 -5
- package/dist/tools.js +1 -1
- package/dist/{types-SVtInovH.d.ts → types-BzeE37Ze.d.ts} +1 -1
- package/dist/virtual.d.ts +1 -1
- package/dist/virtual.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-N2OSBCFN.js.map +0 -1
- package/dist/chunk-OV6UUIA3.js.map +0 -1
- package/dist/chunk-TSZ6GVSA.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ComponentType, ReactNode } from 'react';
|
|
3
|
-
import { a as SessionNodeKind, S as SessionNode, i as ToolCounts } from './nodes-
|
|
4
|
-
import { T as ToolDisplayRegistry, P as PermissionUiMode } from './sessionViewOptions-
|
|
5
|
-
import { a as ToolBodyMode } from './types-
|
|
3
|
+
import { a as SessionNodeKind, S as SessionNode, i as ToolCounts } from './nodes-uahIhQwz.js';
|
|
4
|
+
import { T as ToolDisplayRegistry, P as PermissionUiMode } from './sessionViewOptions-DaxstMhx.js';
|
|
5
|
+
import { a as ToolBodyMode } from './types-BzeE37Ze.js';
|
|
6
6
|
import { StoreApi } from 'zustand/vanilla';
|
|
7
7
|
|
|
8
8
|
/** Common fields on every LangchainAgentEvent (SDK mirror). */
|
|
@@ -219,6 +219,11 @@ type LangchainAgentEvent = ({
|
|
|
219
219
|
} & CommonFields) | ({
|
|
220
220
|
event_type: 'permission-request';
|
|
221
221
|
data: PermissionRequestData;
|
|
222
|
+
} & CommonFields)
|
|
223
|
+
/** D44:AskUserQuestion gather 中间帧(additive) */
|
|
224
|
+
| ({
|
|
225
|
+
event_type: 'user-question-request';
|
|
226
|
+
data: UserQuestionRequestData;
|
|
222
227
|
} & CommonFields) | ({
|
|
223
228
|
event_type: 'memory-saved';
|
|
224
229
|
data: MemorySavedEventData;
|
|
@@ -274,6 +279,24 @@ interface PermissionRequestData {
|
|
|
274
279
|
input_data?: unknown;
|
|
275
280
|
[key: string]: unknown;
|
|
276
281
|
}
|
|
282
|
+
/** D44 user-question-request data(对齐 SDK Question)。 */
|
|
283
|
+
interface UserQuestionOption {
|
|
284
|
+
label: string;
|
|
285
|
+
description?: string;
|
|
286
|
+
preview?: string;
|
|
287
|
+
}
|
|
288
|
+
interface UserQuestionItem {
|
|
289
|
+
question: string;
|
|
290
|
+
header: string;
|
|
291
|
+
options: UserQuestionOption[];
|
|
292
|
+
multiSelect?: boolean;
|
|
293
|
+
}
|
|
294
|
+
interface UserQuestionRequestData {
|
|
295
|
+
session_id: string;
|
|
296
|
+
tool_call_id: string;
|
|
297
|
+
questions: UserQuestionItem[];
|
|
298
|
+
[key: string]: unknown;
|
|
299
|
+
}
|
|
277
300
|
type EventType = LangchainAgentEvent['event_type'];
|
|
278
301
|
type EventTier = 'main' | 'collapsed' | 'debug' | 'state';
|
|
279
302
|
type TierOverrides = Partial<Record<EventType, Exclude<EventTier, 'state'>>>;
|
|
@@ -315,20 +338,33 @@ declare class NodeRegistry {
|
|
|
315
338
|
}
|
|
316
339
|
|
|
317
340
|
/**
|
|
318
|
-
* 职责:人类回写薄层 API;
|
|
319
|
-
* 链路位置:AgentSession interactionBus prop →
|
|
320
|
-
* 当前裁剪范围:permission resolve
|
|
341
|
+
* 职责:人类回写薄层 API;Permission / AskUserQuestion 分轨。
|
|
342
|
+
* 链路位置:AgentSession interactionBus prop → PermissionCard / AskUserQuestionCard。
|
|
343
|
+
* 当前裁剪范围:permission resolve + user questions resolve(D44)。
|
|
321
344
|
*/
|
|
322
345
|
interface PermissionResolvePayload {
|
|
323
346
|
requestId: string;
|
|
324
347
|
allow: boolean;
|
|
325
348
|
message?: string;
|
|
326
349
|
}
|
|
350
|
+
type UserQuestionsResolvePayload = {
|
|
351
|
+
sessionId: string;
|
|
352
|
+
toolCallId: string;
|
|
353
|
+
answers: Record<string, string>;
|
|
354
|
+
reject?: undefined;
|
|
355
|
+
} | {
|
|
356
|
+
sessionId: string;
|
|
357
|
+
toolCallId: string;
|
|
358
|
+
reject: true;
|
|
359
|
+
answers?: undefined;
|
|
360
|
+
};
|
|
327
361
|
interface InteractionBus {
|
|
328
362
|
resolvePermission: (payload: PermissionResolvePayload) => void | Promise<void>;
|
|
363
|
+
resolveUserQuestions: (payload: UserQuestionsResolvePayload) => void | Promise<void>;
|
|
329
364
|
}
|
|
330
365
|
interface InteractionBusHandlers {
|
|
331
366
|
onPermissionResolve?: (payload: PermissionResolvePayload) => void | Promise<void>;
|
|
367
|
+
onResolveUserQuestions?: (payload: UserQuestionsResolvePayload) => void | Promise<void>;
|
|
332
368
|
}
|
|
333
369
|
declare function createInteractionBus(handlers?: InteractionBusHandlers): InteractionBus;
|
|
334
370
|
declare function getNoopInteractionBus(): InteractionBus;
|
|
@@ -848,4 +884,4 @@ declare function useActiveSession(): ActiveSessionView;
|
|
|
848
884
|
|
|
849
885
|
declare function useSessionIds(): string[];
|
|
850
886
|
|
|
851
|
-
export {
|
|
887
|
+
export { createInteractionBus as $, type AskCoalescedBlock as A, type WorkflowAuthorityStatus as B, type CommonFields as C, DEFAULT_EVENT_TIERS as D, type EventTier as E, type WorkflowContainerRuntimeNode as F, type WorkflowContainerTreeState as G, type WorkflowDisplayProjection as H, type InteractionBus as I, type WorkflowDisplayProjectionStatus as J, type WorkflowProgressState as K, type LangchainAgentEvent as L, type MarkdownRenderer as M, NodeRegistry as N, type WorkflowScopeFrame as O, type PermissionResolvePayload as P, type WorkflowSessionState as Q, type ReducerError as R, type SessionSlice as S, type Task as T, type UserQuestionsResolvePayload as U, type WorkflowStageProgress as V, type WorkflowAuthoritySnapshot as W, type WorkflowTerminalKind as X, createActiveSessionBridge as Y, createEmptyTree as Z, createEmptyWorkflowSessionState as _, type AskDisplaySnapshot as a, createMultiSessionStore as a0, createSessionStore as a1, getNoopInteractionBus as a2, useActiveSession as a3, useSessionIds as a4, type AskDisplaySnapshotMetadata as b, type AskSnapshotProjectionStatus as c, type EventType as d, type InteractionBusHandlers as e, type MarkdownRendererProps as f, MultiAgentSession as g, type MultiAgentSessionProps as h, type MultiSessionSourceConfig as i, type MultiSessionStore as j, type MultiSessionStoreOptions as k, type MultiSessionStoreState as l, type NodeWidget as m, type NodeWidgetProps as n, type SessionStatus as o, type SessionStore as p, type SessionStoreOptions as q, type SessionStoreState as r, type SessionTree as s, type SessionTreeSnapshot as t, type Source as u, type SourceEventContext as v, type SourceHandler as w, type TaskPhase as x, type TaskStatus as y, type TierOverrides as z };
|
package/dist/multi-session.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { g as MultiAgentSession, h as MultiAgentSessionProps, i as MultiSessionSourceConfig, j as MultiSessionStore, k as MultiSessionStoreOptions, l as MultiSessionStoreState, S as SessionSlice,
|
|
1
|
+
export { g as MultiAgentSession, h as MultiAgentSessionProps, i as MultiSessionSourceConfig, j as MultiSessionStore, k as MultiSessionStoreOptions, l as MultiSessionStoreState, S as SessionSlice, Y as createActiveSessionBridge, a0 as createMultiSessionStore, a3 as useActiveSession, a4 as useSessionIds } from './multi-session-9LtrGlsm.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
|
-
import './nodes-
|
|
5
|
-
import './sessionViewOptions-
|
|
6
|
-
import './types-
|
|
4
|
+
import './nodes-uahIhQwz.js';
|
|
5
|
+
import './sessionViewOptions-DaxstMhx.js';
|
|
6
|
+
import './types-BzeE37Ze.js';
|
|
7
7
|
import 'zustand/vanilla';
|
package/dist/multi-session.js
CHANGED
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
MultiAgentSession,
|
|
3
3
|
createActiveSessionBridge,
|
|
4
4
|
createMultiSessionStore
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-AMUGAG7U.js";
|
|
6
|
+
import "./chunk-VYXHVGJU.js";
|
|
7
7
|
import "./chunk-DP7V33X7.js";
|
|
8
8
|
import {
|
|
9
9
|
useActiveSession,
|
|
10
10
|
useSessionIds
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RWKNI52H.js";
|
|
12
12
|
import "./chunk-GLUQUP3A.js";
|
|
13
13
|
import "./chunk-4RIOBLGB.js";
|
|
14
14
|
export {
|
|
@@ -164,6 +164,26 @@ interface PermissionNode {
|
|
|
164
164
|
status: 'pending' | 'resolved';
|
|
165
165
|
startedAt: number;
|
|
166
166
|
}
|
|
167
|
+
/** D44 AskUserQuestion 时间线问卷卡(非 Permission)。 */
|
|
168
|
+
interface UserQuestionNode {
|
|
169
|
+
kind: 'user_question';
|
|
170
|
+
id: string;
|
|
171
|
+
sessionId: string;
|
|
172
|
+
toolCallId: string;
|
|
173
|
+
questions: Array<{
|
|
174
|
+
question: string;
|
|
175
|
+
header: string;
|
|
176
|
+
options: Array<{
|
|
177
|
+
label: string;
|
|
178
|
+
description?: string;
|
|
179
|
+
preview?: string;
|
|
180
|
+
}>;
|
|
181
|
+
multiSelect?: boolean;
|
|
182
|
+
}>;
|
|
183
|
+
status: 'pending' | 'submitting' | 'resolved' | 'rejected';
|
|
184
|
+
errorMessage: string | null;
|
|
185
|
+
startedAt: number;
|
|
186
|
+
}
|
|
167
187
|
/** 工具统计(用于轮次摘要) */
|
|
168
188
|
interface ToolCounts {
|
|
169
189
|
searchCount: number;
|
|
@@ -208,7 +228,7 @@ interface MemorySavedNode {
|
|
|
208
228
|
displayHint: string;
|
|
209
229
|
startedAt: number;
|
|
210
230
|
}
|
|
211
|
-
type SessionNode = TextNode | ReasoningNode | ThinkingSummaryNode | ToolCallNode | SubAgentNode | StepNode | ErrorNode | UnknownNode | PermissionNode | MemorySavedNode;
|
|
231
|
+
type SessionNode = TextNode | ReasoningNode | ThinkingSummaryNode | ToolCallNode | SubAgentNode | StepNode | ErrorNode | UnknownNode | PermissionNode | UserQuestionNode | MemorySavedNode;
|
|
212
232
|
type SessionNodeKind = SessionNode['kind'];
|
|
213
233
|
|
|
214
|
-
export type { ErrorNode as E, NodeDetail as N, PermissionNode as P, ReasoningNode as R, SessionNode as S, TextNode as T, UnknownNode as U, SessionNodeKind as a, StepDetail as b, StepNode as c, SubAgentNode as d, SubagentProgressEntry as e, SubagentSessionMarker as f, SubagentTranscriptEntry as g, ToolCallNode as h, ToolCounts as i };
|
|
234
|
+
export type { ErrorNode as E, NodeDetail as N, PermissionNode as P, ReasoningNode as R, SessionNode as S, TextNode as T, UnknownNode as U, SessionNodeKind as a, StepDetail as b, StepNode as c, SubAgentNode as d, SubagentProgressEntry as e, SubagentSessionMarker as f, SubagentTranscriptEntry as g, ToolCallNode as h, ToolCounts as i, UserQuestionNode as j };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as ToolBodyComponent, a as ToolBodyMode } from './types-
|
|
1
|
+
import { T as ToolBodyComponent, a as ToolBodyMode } from './types-BzeE37Ze.js';
|
|
2
2
|
|
|
3
3
|
declare class ToolDisplayRegistry {
|
|
4
4
|
private readonly map;
|
|
@@ -22,7 +22,7 @@ declare function createDefaultToolRegistry(): ToolDisplayRegistry;
|
|
|
22
22
|
* 折叠 / 分组 payload 由 Phase 2+ accumulator 填充;本文件仅 contract。
|
|
23
23
|
*/
|
|
24
24
|
type DisplayMode = 'normal' | 'brief_only' | 'transcript';
|
|
25
|
-
type CanonicalNodeType = 'text' | 'reasoning' | 'tool_use' | 'permission' | 'error' | 'unknown'
|
|
25
|
+
type CanonicalNodeType = 'text' | 'reasoning' | 'tool_use' | 'permission' | 'user_question' | 'error' | 'unknown'
|
|
26
26
|
/** @deprecated 方案 A 不再从 treeAdapter 产出;保留类型供历史 canonical 兼容。 */
|
|
27
27
|
| 'subagent' | 'hook' | 'compact' | 'relevant_memories' | 'thinking_round' | 'thinking_summary' | 'memory_saved';
|
|
28
28
|
interface CanonicalNodeRef {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { B as BodyBlock, a as BodyBlockList, D as DiffView, M as MAX_PREVIEW_LINES, b as MarkdownBlock, T as TruncatedContent, c as buildBashBodyBlocks, d as displayPath, f as formatDiffFromStrings, e as formatPatternTitle, g as formatSearchResultBody, h as formatTimeoutFooter, p as parseDiffText, t as truncateCommand, i as truncateLines } from './MarkdownBlock-
|
|
2
|
-
export { a as ToolBodyMode } from './types-
|
|
1
|
+
export { B as BodyBlock, a as BodyBlockList, D as DiffView, M as MAX_PREVIEW_LINES, b as MarkdownBlock, T as TruncatedContent, c as buildBashBodyBlocks, d as displayPath, f as formatDiffFromStrings, e as formatPatternTitle, g as formatSearchResultBody, h as formatTimeoutFooter, p as parseDiffText, t as truncateCommand, i as truncateLines } from './MarkdownBlock-Ag7HSqsu.js';
|
|
2
|
+
export { a as ToolBodyMode } from './types-BzeE37Ze.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
|
-
import './nodes-
|
|
5
|
+
import './nodes-uahIhQwz.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* textHelpers.ts — 标题预览截断
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { P as PermissionUiMode } from './sessionViewOptions-
|
|
2
|
-
export { T as ToolDisplayRegistry, g as createDefaultToolRegistry } from './sessionViewOptions-
|
|
3
|
-
export { A as AgentToolBody, a as AskUserQuestionToolBody, B as BashToolBody, D as DefaultToolBody, E as EditToolBody, G as GlobToolBody, b as GrepToolBody, R as ReadToolBody, S as SkillToolBody, W as WebFetchToolBody, c as WebSearchToolBody, d as WriteToolBody, f as formatToolTitle, r as resolveToolBody } from './AskUserQuestionToolBody-
|
|
1
|
+
import { P as PermissionUiMode } from './sessionViewOptions-DaxstMhx.js';
|
|
2
|
+
export { T as ToolDisplayRegistry, g as createDefaultToolRegistry } from './sessionViewOptions-DaxstMhx.js';
|
|
3
|
+
export { A as AgentToolBody, a as AskUserQuestionToolBody, B as BashToolBody, D as DefaultToolBody, E as EditToolBody, G as GlobToolBody, b as GrepToolBody, R as ReadToolBody, S as SkillToolBody, W as WebFetchToolBody, c as WebSearchToolBody, d as WriteToolBody, f as formatToolTitle, r as resolveToolBody } from './AskUserQuestionToolBody-CrQTL9RY.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
|
-
import { h as ToolCallNode, P as PermissionNode } from './nodes-
|
|
7
|
-
export { T as ToolBodyComponent, a as ToolBodyMode, b as ToolDisplayProps } from './types-
|
|
6
|
+
import { h as ToolCallNode, P as PermissionNode } from './nodes-uahIhQwz.js';
|
|
7
|
+
export { T as ToolBodyComponent, a as ToolBodyMode, b as ToolDisplayProps } from './types-BzeE37Ze.js';
|
|
8
8
|
|
|
9
9
|
interface ToolCallShellProps {
|
|
10
10
|
status: ToolCallNode['status'];
|
package/dist/tools.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
|
-
import { h as ToolCallNode, e as SubagentProgressEntry, g as SubagentTranscriptEntry, f as SubagentSessionMarker } from './nodes-
|
|
2
|
+
import { h as ToolCallNode, e as SubagentProgressEntry, g as SubagentTranscriptEntry, f as SubagentSessionMarker } from './nodes-uahIhQwz.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* types.ts — Tool Display 公共类型
|
package/dist/virtual.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { a as SessionNodeKind, S as SessionNode } from './nodes-
|
|
2
|
+
import { a as SessionNodeKind, S as SessionNode } from './nodes-uahIhQwz.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 职责:VirtualTimeline 按 SessionNode kind 或 RenderableEntry kind 估算行高。
|
package/dist/virtual.js
CHANGED