@blade-hq/agent-client 1.1.3 → 1.1.4

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.
@@ -9,6 +9,7 @@ export type AsrAudioPayload = ArrayBuffer | Uint8Array | {
9
9
  };
10
10
  export declare namespace ChatSendPayloadSchema {
11
11
  type SessionId = string;
12
+ type ClientRequestId = (string | null);
12
13
  type Mode = (("planning" | "executing") | null);
13
14
  type AskuserAnswer = ({
14
15
  [k: string]: unknown;
@@ -30,6 +31,7 @@ export declare namespace ChatSendPayloadSchema {
30
31
  interface ChatSendPayload {
31
32
  session_id: SessionId;
32
33
  message: Message;
34
+ client_request_id?: ClientRequestId;
33
35
  mode?: Mode;
34
36
  askuser_answer?: AskuserAnswer;
35
37
  model?: Model;
@@ -155,11 +157,13 @@ export type ChatStartPayload = ChatStartPayloadSchema.ChatStartPayload;
155
157
  export declare namespace ChatEndPayloadSchema {
156
158
  type SessionId = (string | null);
157
159
  type Status = (string | null);
160
+ type CancelledClientRequestIds = (string[] | null);
158
161
  type FinishReason = (string | null);
159
162
  type ChatRunId = (string | null);
160
163
  interface ChatEndPayload {
161
164
  session_id?: SessionId;
162
165
  status?: Status;
166
+ cancelled_client_request_ids?: CancelledClientRequestIds;
163
167
  result?: unknown;
164
168
  finish_reason?: FinishReason;
165
169
  chat_run_id?: ChatRunId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blade-hq/agent-client",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Blade Agent 框架无关客户端:会话实时状态机、REST 通道、弹窗登录、页面协作。浏览器与 Node.js 通用。",
5
5
  "repository": {
6
6
  "type": "git",
package/public-api.md CHANGED
@@ -579,7 +579,7 @@ label: string
579
579
  ## `PatchEnvelope` (interface)
580
580
 
581
581
  ```ts
582
- data: { turn?: TurnProjection; workspace_changed?: { tool_call_id?: string; tool_name?: string; }; }
582
+ data: { turn?: TurnProjection; workspace_changed?: { tool_call_id?: string; tool_name?: string; workspace_path?: string; }; }
583
583
  loop_id: string
584
584
  patch_type: string
585
585
  sequence: number
@@ -754,6 +754,7 @@ status: "completed" | "failed" | "interrupted" | "running" | "created" | "waitin
754
754
  template_id: TemplateId | null | undefined
755
755
  updated_at: string
756
756
  viewer_role: "owner" | "viewer" | undefined
757
+ workspace_path: string | null | undefined
757
758
  ```
758
759
 
759
760
  ## `SessionHistory` (interface)
@@ -812,6 +813,7 @@ SessionInfo = type({
812
813
  "disable_tools?": "string[]",
813
814
  "runtime_type?": "string | null",
814
815
  "daemon_id?": "string | null",
816
+ "workspace_path?": "string | null",
815
817
  "match?": "unknown",
816
818
  })
817
819
  ```
@@ -865,7 +867,7 @@ createSessionWithRequest: (request: CreateSessionRequest) => Promise<{ session_i
865
867
  createShare: (sessionId: string) => Promise<ShareLinkResult>
866
868
  createWithProfile: (params: { intent: string; profile: SessionProfile; }) => Promise<{ session_id: string; }>
867
869
  deleteFile: (sessionId: string, filePath: string) => Promise<void>
868
- deleteSession: (sessionId: string) => Promise<{ deleted: boolean; }>
870
+ deleteSession: (sessionId: string, options?: { deleteWorkspace?: boolean; }) => Promise<{ deleted: boolean; workspace_deleted?: boolean; }>
869
871
  downloadFile: (sessionId: string, filePath: string, downloadName?: string) => Promise<void>
870
872
  exportSession: (sessionId: string) => Promise<void>
871
873
  getBackgroundTask: (sessionId: string, taskId: string, tail?: number, init?: RequestInit) => Promise<BackgroundTask>