@downcity/agent 1.1.199 → 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.
Files changed (94) hide show
  1. package/bin/executor/Executor.d.ts +2 -2
  2. package/bin/executor/Executor.d.ts.map +1 -1
  3. package/bin/executor/Executor.js +23 -24
  4. package/bin/executor/Executor.js.map +1 -1
  5. package/bin/executor/composer/compaction/SessionCompactionComposer.d.ts +5 -5
  6. package/bin/executor/composer/compaction/SessionCompactionComposer.d.ts.map +1 -1
  7. package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionComposer.js +1 -1
  8. package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionComposer.js.map +1 -1
  9. package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts +2 -2
  10. package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts.map +1 -1
  11. package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js +23 -30
  12. package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js.map +1 -1
  13. package/bin/executor/composer/history/jsonl/JsonlSessionHistoryComposer.d.ts.map +1 -1
  14. package/bin/executor/composer/history/jsonl/JsonlSessionHistoryComposer.js +4 -3
  15. package/bin/executor/composer/history/jsonl/JsonlSessionHistoryComposer.js.map +1 -1
  16. package/bin/executor/messages/SessionAttachmentMapper.js.map +1 -1
  17. package/bin/executor/messages/SessionMessageCodec.d.ts +1 -1
  18. package/bin/executor/messages/SessionMessageCodec.js +3 -3
  19. package/bin/executor/messages/SessionMessageCodec.js.map +1 -1
  20. package/bin/executor/messages/SessionStepEventMapper.d.ts +2 -2
  21. package/bin/executor/messages/SessionStepEventMapper.d.ts.map +1 -1
  22. package/bin/executor/messages/SessionStepEventMapper.js.map +1 -1
  23. package/bin/executor/services/ExecutorInflightService.d.ts +2 -2
  24. package/bin/executor/services/ExecutorInflightService.d.ts.map +1 -1
  25. package/bin/executor/services/ExecutorInflightService.js +9 -5
  26. package/bin/executor/services/ExecutorInflightService.js.map +1 -1
  27. package/bin/executor/store/history/SessionHistoryStore.d.ts +11 -11
  28. package/bin/executor/store/history/SessionHistoryStore.d.ts.map +1 -1
  29. package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts +9 -7
  30. package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts.map +1 -1
  31. package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js +97 -52
  32. package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js.map +1 -1
  33. package/bin/executor/types/SessionMessages.d.ts +41 -22
  34. package/bin/executor/types/SessionMessages.d.ts.map +1 -1
  35. package/bin/executor/types/SessionMessages.js +25 -7
  36. package/bin/executor/types/SessionMessages.js.map +1 -1
  37. package/bin/index.d.ts +1 -1
  38. package/bin/index.d.ts.map +1 -1
  39. package/bin/index.js.map +1 -1
  40. package/bin/session/SessionTitle.d.ts.map +1 -1
  41. package/bin/session/SessionTitle.js +5 -0
  42. package/bin/session/SessionTitle.js.map +1 -1
  43. package/bin/session/browse/Browse.d.ts.map +1 -1
  44. package/bin/session/browse/Browse.js +35 -32
  45. package/bin/session/browse/Browse.js.map +1 -1
  46. package/bin/session/services/SessionStateService.d.ts +8 -8
  47. package/bin/session/services/SessionStateService.d.ts.map +1 -1
  48. package/bin/session/services/SessionStateService.js +44 -54
  49. package/bin/session/services/SessionStateService.js.map +1 -1
  50. package/bin/session/services/SessionTurnService.js +3 -3
  51. package/bin/session/services/SessionTurnService.js.map +1 -1
  52. package/bin/session/services/SessionViewService.d.ts.map +1 -1
  53. package/bin/session/services/SessionViewService.js +17 -27
  54. package/bin/session/services/SessionViewService.js.map +1 -1
  55. package/bin/types/agent/SessionTypes.d.ts +10 -10
  56. package/bin/types/agent/SessionTypes.d.ts.map +1 -1
  57. package/bin/types/executor/SessionRunContext.d.ts +6 -6
  58. package/bin/types/executor/SessionRunContext.d.ts.map +1 -1
  59. package/bin/types/sdk/AgentSessionAction.d.ts +67 -0
  60. package/bin/types/sdk/AgentSessionAction.d.ts.map +1 -0
  61. package/bin/types/sdk/AgentSessionAction.js +10 -0
  62. package/bin/types/sdk/AgentSessionAction.js.map +1 -0
  63. package/bin/types/sdk/AgentSessionEvent.d.ts +2 -2
  64. package/bin/types/sdk/AgentSessionEvent.d.ts.map +1 -1
  65. package/package.json +3 -3
  66. package/scripts/{session-operation-message.test.mjs → session-action-message.test.mjs} +57 -55
  67. package/src/executor/Executor.ts +28 -29
  68. package/src/executor/composer/compaction/SessionCompactionComposer.ts +5 -5
  69. package/src/executor/composer/compaction/jsonl/JsonlSessionCompactionComposer.ts +1 -1
  70. package/src/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.ts +32 -37
  71. package/src/executor/composer/history/jsonl/JsonlSessionHistoryComposer.ts +7 -4
  72. package/src/executor/messages/SessionAttachmentMapper.ts +2 -2
  73. package/src/executor/messages/SessionMessageCodec.ts +3 -3
  74. package/src/executor/messages/SessionStepEventMapper.ts +5 -5
  75. package/src/executor/services/ExecutorInflightService.ts +11 -7
  76. package/src/executor/store/history/SessionHistoryStore.ts +11 -10
  77. package/src/executor/store/history/jsonl/JsonlSessionHistoryStore.ts +118 -63
  78. package/src/executor/types/SessionMessages.ts +69 -31
  79. package/src/index.ts +5 -6
  80. package/src/session/SessionTitle.ts +3 -0
  81. package/src/session/browse/Browse.ts +42 -34
  82. package/src/session/services/SessionStateService.ts +54 -64
  83. package/src/session/services/SessionTurnService.ts +3 -3
  84. package/src/session/services/SessionViewService.ts +17 -27
  85. package/src/types/agent/SessionTypes.ts +10 -10
  86. package/src/types/executor/SessionRunContext.ts +11 -11
  87. package/src/types/sdk/AgentSessionAction.ts +79 -0
  88. package/src/types/sdk/AgentSessionEvent.ts +2 -2
  89. package/tsconfig.tsbuildinfo +1 -1
  90. package/bin/types/sdk/AgentSessionOperation.d.ts +0 -99
  91. package/bin/types/sdk/AgentSessionOperation.d.ts.map +0 -1
  92. package/bin/types/sdk/AgentSessionOperation.js +0 -10
  93. package/bin/types/sdk/AgentSessionOperation.js.map +0 -1
  94. package/src/types/sdk/AgentSessionOperation.ts +0 -125
@@ -31,9 +31,9 @@ import type {
31
31
  AgentSessionEvent,
32
32
  } from "@/types/sdk/AgentSessionEvent.js";
33
33
  import type {
34
- AgentSessionOperationEvent,
35
- AgentSessionOperationRecord,
36
- } from "@/types/sdk/AgentSessionOperation.js";
34
+ AgentSessionActionEvent,
35
+ AgentSessionActionRecord,
36
+ } from "@/types/sdk/AgentSessionAction.js";
37
37
  import type { AgentSessionPromptInput } from "@/types/sdk/AgentSessionPrompt.js";
38
38
  import type {
39
39
  SessionMessageV1,
@@ -87,17 +87,17 @@ type SessionStateServiceOptions = {
87
87
 
88
88
  type SessionSetOptions = {
89
89
  /**
90
- * 是否写入并发布 model-switching operation
90
+ * 是否写入并发布 model-switching action
91
91
  *
92
92
  * 说明(中文)
93
93
  * - 公开 `session.set()` 应保持默认开启。
94
94
  * - fork 内部复制模型配置时关闭,避免污染 forked session 历史。
95
95
  */
96
- emit_operation?: boolean;
96
+ emit_action?: boolean;
97
97
  };
98
98
 
99
- type EmitOperationInput = Omit<AgentSessionOperationRecord, "operationId"> &
100
- Partial<Pick<AgentSessionOperationRecord, "operationId">>;
99
+ type EmitActionInput = Omit<AgentSessionActionRecord, "id"> &
100
+ Partial<Pick<AgentSessionActionRecord, "id">>;
101
101
 
102
102
  /**
103
103
  * 本地 Session 状态与持久化服务。
@@ -223,23 +223,21 @@ export class SessionStateService {
223
223
  * 写入当前 session 配置。
224
224
  */
225
225
  async set(input: AgentSessionSetInput, options?: SessionSetOptions): Promise<void> {
226
- const should_emit_operation = options?.emit_operation !== false;
226
+ const should_emit_action = options?.emit_action !== false;
227
227
  const previous_model_label = this.state.sessionConfig.modelLabel;
228
228
  const next_model_label = input.model
229
229
  ? inferAgentModelLabel(input.model)
230
230
  : undefined;
231
- const operation_id = `model-switching:${this.session_id}:${Date.now()}:${generateId()}`;
232
-
233
- if (input.model && should_emit_operation) {
234
- await this.emit_operation_event({
235
- operationId: operation_id,
236
- name: "model-switching",
237
- status: "started",
238
- label: "Switching session model",
239
- result: {
240
- ...(previous_model_label ? { previousModelLabel: previous_model_label } : {}),
241
- ...(next_model_label ? { modelLabel: next_model_label } : {}),
242
- },
231
+ const action_id = `model-switching:${this.session_id}:${Date.now()}:${generateId()}`;
232
+
233
+ if (input.model && should_emit_action) {
234
+ await this.emit_action_event({
235
+ id: action_id,
236
+ title: "Switching session model",
237
+ description: next_model_label
238
+ ? `Switching to ${next_model_label}.`
239
+ : undefined,
240
+ state: "running",
243
241
  });
244
242
  }
245
243
 
@@ -256,30 +254,25 @@ export class SessionStateService {
256
254
  model: this.state.sessionConfig.model,
257
255
  });
258
256
  } catch (error) {
259
- if (input.model && should_emit_operation) {
260
- await this.emit_operation_event({
261
- operationId: operation_id,
262
- name: "model-switching",
263
- status: "failed",
264
- label: "Session model switch failed",
265
- error: error instanceof Error ? error.message : String(error),
257
+ if (input.model && should_emit_action) {
258
+ await this.emit_action_event({
259
+ id: action_id,
260
+ title: "Session model switch failed",
261
+ description: error instanceof Error ? error.message : String(error),
262
+ state: "failed",
266
263
  });
267
264
  }
268
265
  throw error;
269
266
  }
270
267
 
271
- if (input.model && should_emit_operation) {
272
- await this.emit_operation_event({
273
- operationId: operation_id,
274
- name: "model-switching",
275
- status: "finished",
276
- label: "Session model switched",
277
- result: {
278
- ...(previous_model_label ? { previousModelLabel: previous_model_label } : {}),
279
- ...(this.state.sessionConfig.modelLabel
280
- ? { modelLabel: this.state.sessionConfig.modelLabel }
281
- : {}),
282
- },
268
+ if (input.model && should_emit_action) {
269
+ await this.emit_action_event({
270
+ id: action_id,
271
+ title: "Session model switched",
272
+ description: this.state.sessionConfig.modelLabel
273
+ ? `Using ${this.state.sessionConfig.modelLabel}.`
274
+ : undefined,
275
+ state: "completed",
283
276
  });
284
277
  }
285
278
  }
@@ -369,23 +362,18 @@ export class SessionStateService {
369
362
  }
370
363
 
371
364
  /**
372
- * 持久化一条 operation message。
365
+ * 持久化一条 action message。
373
366
  */
374
- async persist_operation_event(
375
- event: AgentSessionOperationEvent,
367
+ async persist_action_event(
368
+ event: AgentSessionActionEvent,
376
369
  ): Promise<void> {
377
- if (event.status !== "finished" || event.visible === false) return;
378
- const message = this.history_store.operation({
379
- operation: {
380
- operationId: event.operationId,
381
- name: event.name,
382
- status: event.status,
370
+ const message = this.history_store.action({
371
+ action: {
372
+ id: event.id,
373
+ title: event.title,
374
+ state: event.state,
375
+ ...(event.description ? { description: event.description } : {}),
383
376
  ...(event.turnId ? { turnId: event.turnId } : {}),
384
- ...(event.label ? { label: event.label } : {}),
385
- ...(event.reason ? { reason: event.reason } : {}),
386
- ...(typeof event.progress === "number" ? { progress: event.progress } : {}),
387
- ...(event.result !== undefined ? { result: event.result } : {}),
388
- ...(event.error ? { error: event.error } : {}),
389
377
  },
390
378
  metadata: {
391
379
  sessionId: this.session_id,
@@ -396,22 +384,24 @@ export class SessionStateService {
396
384
  }
397
385
 
398
386
  /**
399
- * 写入并发布一条 operation
387
+ * 写入并发布一条 action
400
388
  */
401
- async emit_operation_event(input: EmitOperationInput): Promise<void> {
402
- const operation_id =
403
- String(input.operationId || "").trim() ||
404
- `${input.name}:${this.session_id}:${Date.now()}:${generateId()}`;
405
- const event: AgentSessionOperationEvent = {
406
- type: "operation",
389
+ async emit_action_event(input: EmitActionInput): Promise<void> {
390
+ if (input.visible === false) return;
391
+ const action_id =
392
+ String(input.id || "").trim() ||
393
+ `action:${this.session_id}:${Date.now()}:${generateId()}`;
394
+ const { visible: _visible, ...public_input } = input;
395
+ const event: AgentSessionActionEvent = {
396
+ type: "action",
407
397
  sessionId: this.session_id,
408
- ...input,
409
- operationId: operation_id,
398
+ ...public_input,
399
+ id: action_id,
410
400
  };
411
401
  try {
412
- await this.persist_operation_event(event);
402
+ await this.persist_action_event(event);
413
403
  } catch {
414
- // operation 持久化失败不应阻断宿主操作。
404
+ // action 持久化失败不应阻断宿主操作。
415
405
  }
416
406
  this.publish_event(event);
417
407
  }
@@ -199,11 +199,11 @@ export class SessionTurnService {
199
199
  this.publish_event(session_event);
200
200
  }
201
201
  },
202
- onOperationCallback: async (event) => {
202
+ onActionCallback: async (event) => {
203
203
  try {
204
- await this.state_service.persist_operation_event(event);
204
+ await this.state_service.persist_action_event(event);
205
205
  } catch {
206
- // operation 持久化失败不应阻断当前 turn。
206
+ // action 持久化失败不应阻断当前 turn。
207
207
  }
208
208
  this.publish_event(event);
209
209
  },
@@ -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 operation_id = `history-forking:${this.session_id}:${Date.now()}:${nanoid(8)}`;
281
+ const action_id = `history-forking:${this.session_id}:${Date.now()}:${nanoid(8)}`;
282
282
 
283
- await this.state_service.emit_operation_event({
284
- operationId: operation_id,
285
- name: "history-forking",
286
- status: "started",
287
- label: "Forking session history",
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
- { emit_operation: false },
301
+ { emit_action: false },
306
302
  );
307
303
  }
308
304
  await this.append_fork_messages(forked_bundle, fork_messages);
309
- await this.state_service.emit_operation_event({
310
- operationId: operation_id,
311
- name: "history-forking",
312
- status: "finished",
313
- label: "Session history forked",
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.emit_operation_event({
323
- operationId: operation_id,
324
- name: "history-forking",
325
- status: "failed",
326
- label: "Session history fork failed",
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
  }
@@ -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" | "operation";
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
- * 当前 operation ID。
119
+ * 当前 action 标题。
120
120
  *
121
121
  * 说明(中文)
122
- * - 仅 `role=operation` 的事件通常会携带该字段。
122
+ * - 仅 `role=action` 的事件通常会携带该字段。
123
123
  */
124
- operationId?: string;
124
+ actionTitle?: string;
125
125
  /**
126
- * 当前 operation 名称。
126
+ * 当前 action 描述。
127
127
  *
128
128
  * 说明(中文)
129
- * - 仅 `role=operation` 的事件通常会携带该字段。
129
+ * - 仅 `role=action` 的事件通常会携带该字段。
130
130
  */
131
- operationName?: string;
131
+ actionDescription?: string;
132
132
  /**
133
- * 当前 operation 状态。
133
+ * 当前 action 状态。
134
134
  *
135
135
  * 说明(中文)
136
- * - 仅 `role=operation` 的事件通常会携带该字段。
136
+ * - 仅 `role=action` 的事件通常会携带该字段。
137
137
  */
138
- operationStatus?: string;
138
+ actionState?: string;
139
139
  }
140
140
 
141
141
  /**
@@ -8,10 +8,10 @@
8
8
  */
9
9
 
10
10
  import type {
11
- AgentSessionOperationCallback,
12
- AgentSessionOperationEvent,
13
- AgentSessionOperationRecord,
14
- } from "@/types/sdk/AgentSessionOperation.js";
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
- * operation 发布回调。
75
+ * action 发布回调。
76
76
  *
77
77
  * 关键点(中文)
78
- * - 用于把 compaction 等辅助操作转成 session event 与 operation message。
79
- * - operation 不代表 assistant 正文,也不会进入 LLM 输入。
78
+ * - 用于把 compaction 等辅助动作转成 session event 与 action message。
79
+ * - action 不代表 assistant 正文,也不会进入 LLM 输入。
80
80
  */
81
- onOperationCallback?: AgentSessionOperationCallback;
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
- AgentSessionOperationCallback,
121
- AgentSessionOperationEvent,
122
- AgentSessionOperationRecord,
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 { AgentSessionOperationEvent } from "@/types/sdk/AgentSessionOperation.js";
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
- | AgentSessionOperationEvent
358
+ | AgentSessionActionEvent
359
359
  | AgentSessionTurnFinishEvent
360
360
  | AgentSessionErrorEvent;
361
361