@blueking/chat-x 0.0.45-beta.5 → 0.0.45-dev.1

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.
@@ -18,7 +18,8 @@ export declare enum InterruptResumeOperation {
18
18
  /**
19
19
  * AI Dev 第三方工具审批中断
20
20
  */
21
- export type AIDevToolApprovalInterrupt = BaseInterrupt<InterruptReason.AIDevToolApproval, {
21
+ export type AIDevToolApprovalInterrupt = BaseInterrupt<InterruptReason.AIDevToolApproval, AIDevToolApprovalInterruptPayloadMetaData>;
22
+ export type AIDevToolApprovalInterruptPayloadMetaData = {
22
23
  ticket: {
23
24
  approvers: string[];
24
25
  sn: string;
@@ -27,6 +28,13 @@ export type AIDevToolApprovalInterrupt = BaseInterrupt<InterruptReason.AIDevTool
27
28
  title: string;
28
29
  url: string;
29
30
  };
31
+ };
32
+ /**
33
+ * AI Dev 第三方工具审批中断响应(resume 后用于 outcome.success 时会话内回显审批单)。
34
+ * payload 透传中断时的 metaData(含 ticket),以便复用 ToolApprovalCard 渲染。
35
+ */
36
+ export type AIDevToolApprovalResume = BaseResume<InterruptReason.AIDevToolApproval, {
37
+ metadata: AIDevToolApprovalInterruptPayloadMetaData;
30
38
  }>;
31
39
  export type BaseInterrupt<T extends InterruptReason, M extends Record<string, any>> = {
32
40
  expiresAt?: string;
@@ -38,6 +46,7 @@ export type BaseInterrupt<T extends InterruptReason, M extends Record<string, an
38
46
  toolCallId: string;
39
47
  };
40
48
  export type BaseResume<T extends InterruptReason, P extends Record<string, any> = Record<string, any>> = {
49
+ id?: string;
41
50
  interruptId: string;
42
51
  payload: P;
43
52
  reason: T;
@@ -71,11 +80,17 @@ export type InterruptMessage = BaseMessage<MessageRole.Interrupt, {
71
80
  message?: string;
72
81
  /** 是否已被用户响应(resume)过,用于 UI 区分"等待响应 / 已处理"两种态 */
73
82
  outcome?: RunFinishedOutcome;
74
- /** outcome.type === success 用户 resume 时回传给 Agent payload,便于回放与持久化 */
75
- result?: BaseResume<InterruptReason>;
83
+ /** outcome.type === success 用户 resume 后回传/持久化的结果,用于会话内按 reason 回显 */
84
+ result?: InterruptResult;
76
85
  runId?: string;
77
86
  threadId?: string;
78
87
  }>;
88
+ /**
89
+ * 中断处理结果(resume 后回传/持久化,用于 outcome.success 时会话内回显)。
90
+ * 按 reason 区分不同结果形态,统一具备 BaseResume 的 { interruptId, reason, status };
91
+ * 新增中断类型的回显结果只需在此联合扩展。
92
+ */
93
+ export type InterruptResult = AIDevToolApprovalResume | UserQuestionResume;
79
94
  export type InterruptResume = FlowNodeResume | ToolApprovalResume | UserQuestionResume;
80
95
  /**
81
96
  * 中断响应回调(统一约定:payload 在前,原始中断信息在后)
@@ -2,6 +2,7 @@ import type { AIDevToolApprovalInterrupt, OnInterruptResume } from '../../../ag-
2
2
  type __VLS_Props = {
3
3
  interrupt: AIDevToolApprovalInterrupt;
4
4
  onInterruptResume?: OnInterruptResume;
5
+ readonly?: boolean;
5
6
  };
6
7
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
8
  declare const _default: typeof __VLS_export;
@@ -6531,9 +6531,36 @@ export declare const useMessageGroup: (options: {
6531
6531
  type: "success";
6532
6532
  } | undefined;
6533
6533
  result?: {
6534
+ id?: string | undefined;
6534
6535
  interruptId: string;
6535
- payload: Record<string, any>;
6536
- reason: InterruptReason;
6536
+ payload: {
6537
+ metadata: {
6538
+ ticket: {
6539
+ approvers: string[];
6540
+ sn: string;
6541
+ status: APPROVAL_STATUS;
6542
+ submit_time: string;
6543
+ title: string;
6544
+ url: string;
6545
+ };
6546
+ };
6547
+ };
6548
+ reason: InterruptReason.AIDevToolApproval;
6549
+ status: "cancelled" | "resolved";
6550
+ } | {
6551
+ id?: string | undefined;
6552
+ interruptId: string;
6553
+ payload: {
6554
+ answers: {
6555
+ answer: {
6556
+ description: string;
6557
+ label: string;
6558
+ }[];
6559
+ multiSelect?: boolean | undefined;
6560
+ question: string;
6561
+ }[];
6562
+ };
6563
+ reason: InterruptReason.UserQuestion;
6537
6564
  status: "cancelled" | "resolved";
6538
6565
  } | undefined;
6539
6566
  runId?: string | undefined;
@@ -19492,9 +19519,36 @@ export declare const useMessageGroup: (options: {
19492
19519
  type: "success";
19493
19520
  } | undefined;
19494
19521
  result?: {
19522
+ id?: string | undefined;
19495
19523
  interruptId: string;
19496
- payload: Record<string, any>;
19497
- reason: InterruptReason;
19524
+ payload: {
19525
+ metadata: {
19526
+ ticket: {
19527
+ approvers: string[];
19528
+ sn: string;
19529
+ status: APPROVAL_STATUS;
19530
+ submit_time: string;
19531
+ title: string;
19532
+ url: string;
19533
+ };
19534
+ };
19535
+ };
19536
+ reason: InterruptReason.AIDevToolApproval;
19537
+ status: "cancelled" | "resolved";
19538
+ } | {
19539
+ id?: string | undefined;
19540
+ interruptId: string;
19541
+ payload: {
19542
+ answers: {
19543
+ answer: {
19544
+ description: string;
19545
+ label: string;
19546
+ }[];
19547
+ multiSelect?: boolean | undefined;
19548
+ question: string;
19549
+ }[];
19550
+ };
19551
+ reason: InterruptReason.UserQuestion;
19498
19552
  status: "cancelled" | "resolved";
19499
19553
  } | undefined;
19500
19554
  runId?: string | undefined;
@@ -32459,9 +32513,36 @@ export declare const useMessageGroup: (options: {
32459
32513
  type: "success";
32460
32514
  } | undefined;
32461
32515
  result?: {
32516
+ id?: string | undefined;
32517
+ interruptId: string;
32518
+ payload: {
32519
+ metadata: {
32520
+ ticket: {
32521
+ approvers: string[];
32522
+ sn: string;
32523
+ status: APPROVAL_STATUS;
32524
+ submit_time: string;
32525
+ title: string;
32526
+ url: string;
32527
+ };
32528
+ };
32529
+ };
32530
+ reason: InterruptReason.AIDevToolApproval;
32531
+ status: "cancelled" | "resolved";
32532
+ } | {
32533
+ id?: string | undefined;
32462
32534
  interruptId: string;
32463
- payload: Record<string, any>;
32464
- reason: InterruptReason;
32535
+ payload: {
32536
+ answers: {
32537
+ answer: {
32538
+ description: string;
32539
+ label: string;
32540
+ }[];
32541
+ multiSelect?: boolean | undefined;
32542
+ question: string;
32543
+ }[];
32544
+ };
32545
+ reason: InterruptReason.UserQuestion;
32465
32546
  status: "cancelled" | "resolved";
32466
32547
  } | undefined;
32467
32548
  runId?: string | undefined;