@downcity/agent 1.1.198 → 1.1.200
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/bin/executor/Executor.d.ts +2 -2
- package/bin/executor/Executor.d.ts.map +1 -1
- package/bin/executor/Executor.js +23 -24
- package/bin/executor/Executor.js.map +1 -1
- package/bin/executor/composer/compaction/SessionCompactionComposer.d.ts +5 -5
- package/bin/executor/composer/compaction/SessionCompactionComposer.d.ts.map +1 -1
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionComposer.js +1 -1
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionComposer.js.map +1 -1
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts +2 -2
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts.map +1 -1
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js +23 -30
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js.map +1 -1
- package/bin/executor/composer/context/LocalSessionContextComposer.d.ts +2 -2
- package/bin/executor/composer/context/LocalSessionContextComposer.d.ts.map +1 -1
- package/bin/executor/composer/context/LocalSessionContextComposer.js.map +1 -1
- package/bin/executor/composer/context/SessionContextComposer.d.ts +2 -2
- package/bin/executor/composer/context/SessionContextComposer.d.ts.map +1 -1
- package/bin/executor/composer/history/jsonl/JsonlSessionHistoryComposer.d.ts.map +1 -1
- package/bin/executor/composer/history/jsonl/JsonlSessionHistoryComposer.js +4 -3
- package/bin/executor/composer/history/jsonl/JsonlSessionHistoryComposer.js.map +1 -1
- package/bin/executor/core-engine/CoreEngineRunner.d.ts.map +1 -1
- package/bin/executor/core-engine/CoreEngineRunner.js.map +1 -1
- package/bin/executor/core-engine/CoreEngineSignals.d.ts +4 -4
- package/bin/executor/core-engine/CoreEngineSignals.d.ts.map +1 -1
- package/bin/executor/core-engine/CoreEngineSignals.js.map +1 -1
- package/bin/executor/core-engine/CoreEngineUiStreamCollector.d.ts +3 -3
- package/bin/executor/core-engine/CoreEngineUiStreamCollector.d.ts.map +1 -1
- package/bin/executor/core-engine/CoreEngineUiStreamCollector.js.map +1 -1
- package/bin/executor/messages/AssistantResultPersistence.d.ts +3 -3
- package/bin/executor/messages/AssistantResultPersistence.d.ts.map +1 -1
- package/bin/executor/messages/AssistantResultPersistence.js.map +1 -1
- package/bin/executor/messages/SessionAttachmentMapper.d.ts +3 -3
- package/bin/executor/messages/SessionAttachmentMapper.d.ts.map +1 -1
- package/bin/executor/messages/SessionAttachmentMapper.js.map +1 -1
- package/bin/executor/messages/SessionMessageCodec.d.ts +1 -1
- package/bin/executor/messages/SessionMessageCodec.d.ts.map +1 -1
- package/bin/executor/messages/SessionMessageCodec.js +5 -5
- package/bin/executor/messages/SessionMessageCodec.js.map +1 -1
- package/bin/executor/messages/SessionMessageLog.d.ts +3 -3
- package/bin/executor/messages/SessionMessageLog.d.ts.map +1 -1
- package/bin/executor/messages/SessionMessageLog.js.map +1 -1
- package/bin/executor/messages/SessionStepEventMapper.d.ts +2 -2
- package/bin/executor/messages/SessionStepEventMapper.d.ts.map +1 -1
- package/bin/executor/messages/SessionStepEventMapper.js.map +1 -1
- package/bin/executor/messages/UserVisibleText.d.ts +2 -2
- package/bin/executor/messages/UserVisibleText.d.ts.map +1 -1
- package/bin/executor/messages/UserVisibleText.js +5 -0
- package/bin/executor/messages/UserVisibleText.js.map +1 -1
- package/bin/executor/services/ExecutorInflightService.d.ts +2 -2
- package/bin/executor/services/ExecutorInflightService.d.ts.map +1 -1
- package/bin/executor/services/ExecutorInflightService.js +9 -5
- package/bin/executor/services/ExecutorInflightService.js.map +1 -1
- package/bin/executor/store/history/SessionHistoryStore.d.ts +11 -11
- package/bin/executor/store/history/SessionHistoryStore.d.ts.map +1 -1
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts +9 -7
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts.map +1 -1
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js +98 -52
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js.map +1 -1
- package/bin/executor/types/SessionMessages.d.ts +57 -18
- package/bin/executor/types/SessionMessages.d.ts.map +1 -1
- package/bin/executor/types/SessionMessages.js +33 -5
- package/bin/executor/types/SessionMessages.js.map +1 -1
- package/bin/executor/types/SessionRun.d.ts +2 -3
- package/bin/executor/types/SessionRun.d.ts.map +1 -1
- package/bin/index.d.ts +1 -1
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js.map +1 -1
- package/bin/session/SessionTitle.d.ts.map +1 -1
- package/bin/session/SessionTitle.js +5 -0
- package/bin/session/SessionTitle.js.map +1 -1
- package/bin/session/browse/Browse.d.ts.map +1 -1
- package/bin/session/browse/Browse.js +36 -26
- package/bin/session/browse/Browse.js.map +1 -1
- package/bin/session/runtime/SessionPromptRuntime.d.ts +2 -2
- package/bin/session/runtime/SessionPromptRuntime.d.ts.map +1 -1
- package/bin/session/runtime/SessionPromptRuntime.js.map +1 -1
- package/bin/session/services/SessionStateService.d.ts +10 -10
- package/bin/session/services/SessionStateService.d.ts.map +1 -1
- package/bin/session/services/SessionStateService.js +44 -53
- package/bin/session/services/SessionStateService.js.map +1 -1
- package/bin/session/services/SessionTurnService.d.ts.map +1 -1
- package/bin/session/services/SessionTurnService.js +3 -3
- package/bin/session/services/SessionTurnService.js.map +1 -1
- package/bin/session/services/SessionViewService.d.ts.map +1 -1
- package/bin/session/services/SessionViewService.js +17 -27
- package/bin/session/services/SessionViewService.js.map +1 -1
- package/bin/session/storage/Persistence.d.ts +2 -2
- package/bin/session/storage/Persistence.d.ts.map +1 -1
- package/bin/session/storage/Persistence.js.map +1 -1
- package/bin/types/agent/SessionTypes.d.ts +10 -10
- package/bin/types/agent/SessionTypes.d.ts.map +1 -1
- package/bin/types/executor/SessionRunContext.d.ts +6 -6
- package/bin/types/executor/SessionRunContext.d.ts.map +1 -1
- package/bin/types/sdk/AgentSessionAction.d.ts +67 -0
- package/bin/types/sdk/AgentSessionAction.d.ts.map +1 -0
- package/bin/types/sdk/AgentSessionAction.js +10 -0
- package/bin/types/sdk/AgentSessionAction.js.map +1 -0
- package/bin/types/sdk/AgentSessionEvent.d.ts +2 -2
- package/bin/types/sdk/AgentSessionEvent.d.ts.map +1 -1
- package/bin/types/sdk/AgentSessionTurn.d.ts +2 -2
- package/bin/types/sdk/AgentSessionTurn.d.ts.map +1 -1
- package/package.json +3 -3
- package/scripts/{session-operation-message.test.mjs → session-action-message.test.mjs} +58 -41
- package/src/executor/Executor.ts +28 -29
- package/src/executor/composer/compaction/SessionCompactionComposer.ts +5 -5
- package/src/executor/composer/compaction/jsonl/JsonlSessionCompactionComposer.ts +1 -1
- package/src/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.ts +32 -37
- package/src/executor/composer/context/LocalSessionContextComposer.ts +5 -2
- package/src/executor/composer/context/SessionContextComposer.ts +5 -2
- package/src/executor/composer/history/jsonl/JsonlSessionHistoryComposer.ts +7 -4
- package/src/executor/core-engine/CoreEngineRunner.ts +7 -4
- package/src/executor/core-engine/CoreEngineSignals.ts +7 -7
- package/src/executor/core-engine/CoreEngineUiStreamCollector.ts +5 -5
- package/src/executor/messages/AssistantResultPersistence.ts +6 -3
- package/src/executor/messages/SessionAttachmentMapper.ts +12 -9
- package/src/executor/messages/SessionMessageCodec.ts +5 -7
- package/src/executor/messages/SessionMessageLog.ts +5 -3
- package/src/executor/messages/SessionStepEventMapper.ts +5 -5
- package/src/executor/messages/UserVisibleText.ts +8 -2
- package/src/executor/services/ExecutorInflightService.ts +11 -7
- package/src/executor/store/history/SessionHistoryStore.ts +11 -10
- package/src/executor/store/history/jsonl/JsonlSessionHistoryStore.ts +120 -63
- package/src/executor/types/SessionMessages.ts +92 -22
- package/src/executor/types/SessionRun.ts +6 -3
- package/src/index.ts +5 -6
- package/src/session/SessionTitle.ts +3 -0
- package/src/session/browse/Browse.ts +49 -30
- package/src/session/runtime/SessionPromptRuntime.ts +6 -3
- package/src/session/services/SessionStateService.ts +56 -65
- package/src/session/services/SessionTurnService.ts +5 -4
- package/src/session/services/SessionViewService.ts +17 -27
- package/src/session/storage/Persistence.ts +5 -2
- package/src/types/agent/SessionTypes.ts +10 -10
- package/src/types/executor/SessionRunContext.ts +11 -11
- package/src/types/sdk/AgentSessionAction.ts +79 -0
- package/src/types/sdk/AgentSessionEvent.ts +2 -2
- package/src/types/sdk/AgentSessionTurn.ts +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/bin/types/sdk/AgentSessionOperation.d.ts +0 -99
- package/bin/types/sdk/AgentSessionOperation.d.ts.map +0 -1
- package/bin/types/sdk/AgentSessionOperation.js +0 -10
- package/bin/types/sdk/AgentSessionOperation.js.map +0 -1
- package/src/types/sdk/AgentSessionOperation.ts +0 -125
|
@@ -278,17 +278,13 @@ export class SessionViewService<TSession extends Pick<AgentSession, "set">> {
|
|
|
278
278
|
!message_id
|
|
279
279
|
? messages
|
|
280
280
|
: this.resolve_fork_messages(messages, message_id);
|
|
281
|
-
const
|
|
281
|
+
const action_id = `history-forking:${this.session_id}:${Date.now()}:${nanoid(8)}`;
|
|
282
282
|
|
|
283
|
-
await this.state_service.
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
result: {
|
|
289
|
-
messageCount: fork_messages.length,
|
|
290
|
-
...(message_id ? { messageId: message_id } : {}),
|
|
291
|
-
},
|
|
283
|
+
await this.state_service.emit_action_event({
|
|
284
|
+
id: action_id,
|
|
285
|
+
title: "Forking session history",
|
|
286
|
+
description: `Preparing ${String(fork_messages.length)} messages for the new session.`,
|
|
287
|
+
state: "running",
|
|
292
288
|
});
|
|
293
289
|
|
|
294
290
|
try {
|
|
@@ -302,29 +298,23 @@ export class SessionViewService<TSession extends Pick<AgentSession, "set">> {
|
|
|
302
298
|
{
|
|
303
299
|
model: session_config.model,
|
|
304
300
|
},
|
|
305
|
-
{
|
|
301
|
+
{ emit_action: false },
|
|
306
302
|
);
|
|
307
303
|
}
|
|
308
304
|
await this.append_fork_messages(forked_bundle, fork_messages);
|
|
309
|
-
await this.state_service.
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
result: {
|
|
315
|
-
forkedSessionId: String((forked as { id?: unknown }).id || ""),
|
|
316
|
-
messageCount: fork_messages.length,
|
|
317
|
-
...(message_id ? { messageId: message_id } : {}),
|
|
318
|
-
},
|
|
305
|
+
await this.state_service.emit_action_event({
|
|
306
|
+
id: action_id,
|
|
307
|
+
title: "Session history forked",
|
|
308
|
+
description: `Created ${String((forked as { id?: unknown }).id || "")} with ${String(fork_messages.length)} messages.`,
|
|
309
|
+
state: "completed",
|
|
319
310
|
});
|
|
320
311
|
return forked;
|
|
321
312
|
} catch (error) {
|
|
322
|
-
await this.state_service.
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
error: error instanceof Error ? error.message : String(error),
|
|
313
|
+
await this.state_service.emit_action_event({
|
|
314
|
+
id: action_id,
|
|
315
|
+
title: "Session history fork failed",
|
|
316
|
+
description: error instanceof Error ? error.message : String(error),
|
|
317
|
+
state: "failed",
|
|
328
318
|
});
|
|
329
319
|
throw error;
|
|
330
320
|
}
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
import { extractTextFromUiMessage } from "@/executor/messages/UIMessageTransformer.js";
|
|
10
10
|
import type { SessionHistoryMetaV1 } from "@/executor/types/SessionHistoryMeta.js";
|
|
11
|
-
import type {
|
|
11
|
+
import type {
|
|
12
|
+
SessionMessageV1,
|
|
13
|
+
SessionModelMessageV1,
|
|
14
|
+
} from "@/executor/types/SessionMessages.js";
|
|
12
15
|
import { persistAssistantResult } from "@/executor/messages/AssistantResultPersistence.js";
|
|
13
16
|
import type { AgentSessionConfigSnapshot } from "@/types/agent/AgentTypes.js";
|
|
14
17
|
import {
|
|
@@ -65,7 +68,7 @@ export interface PersistSdkAssistantResultParams
|
|
|
65
68
|
* - stop/abort 且没有 assistant 内容时允许为空。
|
|
66
69
|
* - 为空时仅刷新 metadata,不写入伪造 assistant 正文。
|
|
67
70
|
*/
|
|
68
|
-
assistantMessage?:
|
|
71
|
+
assistantMessage?: SessionModelMessageV1 | null;
|
|
69
72
|
}
|
|
70
73
|
|
|
71
74
|
/**
|
|
@@ -99,7 +99,7 @@ export interface AgentSessionTimelineEvent {
|
|
|
99
99
|
* 说明(中文)
|
|
100
100
|
* - `tool-call` / `tool-result` 用于把 assistant 内部工具过程平铺给 UI。
|
|
101
101
|
*/
|
|
102
|
-
role: "user" | "assistant" | "tool-call" | "tool-result" | "
|
|
102
|
+
role: "user" | "assistant" | "tool-call" | "tool-result" | "action";
|
|
103
103
|
/** 事件时间戳(毫秒)。 */
|
|
104
104
|
ts?: number;
|
|
105
105
|
/** 事件所属消息种类。 */
|
|
@@ -116,26 +116,26 @@ export interface AgentSessionTimelineEvent {
|
|
|
116
116
|
*/
|
|
117
117
|
toolName?: string;
|
|
118
118
|
/**
|
|
119
|
-
* 当前
|
|
119
|
+
* 当前 action 标题。
|
|
120
120
|
*
|
|
121
121
|
* 说明(中文)
|
|
122
|
-
* - 仅 `role=
|
|
122
|
+
* - 仅 `role=action` 的事件通常会携带该字段。
|
|
123
123
|
*/
|
|
124
|
-
|
|
124
|
+
actionTitle?: string;
|
|
125
125
|
/**
|
|
126
|
-
* 当前
|
|
126
|
+
* 当前 action 描述。
|
|
127
127
|
*
|
|
128
128
|
* 说明(中文)
|
|
129
|
-
* - 仅 `role=
|
|
129
|
+
* - 仅 `role=action` 的事件通常会携带该字段。
|
|
130
130
|
*/
|
|
131
|
-
|
|
131
|
+
actionDescription?: string;
|
|
132
132
|
/**
|
|
133
|
-
* 当前
|
|
133
|
+
* 当前 action 状态。
|
|
134
134
|
*
|
|
135
135
|
* 说明(中文)
|
|
136
|
-
* - 仅 `role=
|
|
136
|
+
* - 仅 `role=action` 的事件通常会携带该字段。
|
|
137
137
|
*/
|
|
138
|
-
|
|
138
|
+
actionState?: string;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
/**
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "@/types/sdk/
|
|
11
|
+
AgentSessionActionCallback,
|
|
12
|
+
AgentSessionActionEvent,
|
|
13
|
+
AgentSessionActionRecord,
|
|
14
|
+
} from "@/types/sdk/AgentSessionAction.js";
|
|
15
15
|
import type {
|
|
16
16
|
SessionAssistantStepCallback,
|
|
17
17
|
SessionUiMessageChunkCallback,
|
|
@@ -72,13 +72,13 @@ export interface SessionRunContext {
|
|
|
72
72
|
onUiMessageChunkCallback?: SessionUiMessageChunkCallback;
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* action 发布回调。
|
|
76
76
|
*
|
|
77
77
|
* 关键点(中文)
|
|
78
|
-
* - 用于把 compaction
|
|
79
|
-
* -
|
|
78
|
+
* - 用于把 compaction 等辅助动作转成 session event 与 action message。
|
|
79
|
+
* - action 不代表 assistant 正文,也不会进入 LLM 输入。
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
onActionCallback?: AgentSessionActionCallback;
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* 当前 turn 的取消信号。
|
|
@@ -117,7 +117,7 @@ export interface SessionRunContext {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
export type {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
AgentSessionActionCallback,
|
|
121
|
+
AgentSessionActionEvent,
|
|
122
|
+
AgentSessionActionRecord,
|
|
123
123
|
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Session action 类型定义。
|
|
3
|
+
*
|
|
4
|
+
* 关键点(中文)
|
|
5
|
+
* - action 描述 session 内部正在发生的辅助动作,不代表 assistant 正文。
|
|
6
|
+
* - action 同时用于 `session.subscribe()` 实时事件与 JSONL history item。
|
|
7
|
+
* - action 只服务前端状态展示与历史回放,不进入 LLM 输入。
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Session action 当前状态。
|
|
12
|
+
*/
|
|
13
|
+
export type AgentSessionActionState = "running" | "completed" | "failed";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Session action 记录。
|
|
17
|
+
*/
|
|
18
|
+
export interface AgentSessionActionRecord {
|
|
19
|
+
/**
|
|
20
|
+
* 同一个 action 生命周期内稳定复用的 ID。
|
|
21
|
+
*
|
|
22
|
+
* 说明(中文)
|
|
23
|
+
* - 这是 history item envelope 字段,用于把同一个动作更新为一条记录。
|
|
24
|
+
* - 前端展示语义只依赖 `type/title/description/state`。
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 当前 action 标题。
|
|
30
|
+
*/
|
|
31
|
+
title: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 当前 action 描述。
|
|
35
|
+
*/
|
|
36
|
+
description?: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 当前 action 状态。
|
|
40
|
+
*/
|
|
41
|
+
state: AgentSessionActionState;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 当前 action 关联的 turn 标识。
|
|
45
|
+
*/
|
|
46
|
+
turnId?: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 是否建议前端展示。
|
|
50
|
+
*
|
|
51
|
+
* 说明(中文)
|
|
52
|
+
* - 默认视为 `true`。
|
|
53
|
+
* - 调试或审计类辅助事件可显式写入 `false`。
|
|
54
|
+
*/
|
|
55
|
+
visible?: boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Session action 订阅事件。
|
|
60
|
+
*/
|
|
61
|
+
export interface AgentSessionActionEvent
|
|
62
|
+
extends Omit<AgentSessionActionRecord, "visible"> {
|
|
63
|
+
/**
|
|
64
|
+
* 当前事件类型。
|
|
65
|
+
*/
|
|
66
|
+
type: "action";
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 当前 session 唯一标识。
|
|
70
|
+
*/
|
|
71
|
+
sessionId: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Session action 发布回调。
|
|
76
|
+
*/
|
|
77
|
+
export type AgentSessionActionCallback = (
|
|
78
|
+
action: AgentSessionActionEvent,
|
|
79
|
+
) => Promise<void>;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import type { JsonValue } from "@/types/common/Json.js";
|
|
10
10
|
import type { SessionAssistantStepVisibility } from "@/executor/types/SessionRun.js";
|
|
11
|
-
import type {
|
|
11
|
+
import type { AgentSessionActionEvent } from "@/types/sdk/AgentSessionAction.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* 单个 turn 开始事件。
|
|
@@ -355,7 +355,7 @@ export type AgentSessionEvent =
|
|
|
355
355
|
| AgentSessionToolApprovalResultEvent
|
|
356
356
|
| AgentSessionAssistantStepEvent
|
|
357
357
|
| AgentSessionTitleEvent
|
|
358
|
-
|
|
|
358
|
+
| AgentSessionActionEvent
|
|
359
359
|
| AgentSessionTurnFinishEvent
|
|
360
360
|
| AgentSessionErrorEvent;
|
|
361
361
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - 增量过程继续通过 `session.subscribe()` 观察;turn handle 只负责等待最终完成结果。
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type {
|
|
10
|
+
import type { SessionModelMessageV1 } from "@/executor/types/SessionMessages.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* 单个 Session turn 的最终结果。
|
|
@@ -35,7 +35,7 @@ export interface AgentSessionTurnResult {
|
|
|
35
35
|
* - `turn.finished` 返回的结果以这条消息作为最终事实源。
|
|
36
36
|
* - transport / runtime service 若需要读取最终结构化输出,应优先消费这里。
|
|
37
37
|
*/
|
|
38
|
-
assistantMessage?:
|
|
38
|
+
assistantMessage?: SessionModelMessageV1;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* 当前 turn 失败时的错误文本。
|