@blade-hq/agent-client 2612.0.0-beta.71 → 2612.0.0-beta.73

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/index.js CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  parseAskUserQuestion,
27
27
  transformSlashCommand,
28
28
  userFacingErrorText
29
- } from "./chunk-DMVWOTJB.js";
29
+ } from "./chunk-H4DV34V3.js";
30
30
  export {
31
31
  AgentSession,
32
32
  AgentSessionError,
package/dist/internal.js CHANGED
@@ -95,7 +95,7 @@ import {
95
95
  withTurns,
96
96
  workflowEntriesFromOutput,
97
97
  workflowNameFromArguments
98
- } from "./chunk-DMVWOTJB.js";
98
+ } from "./chunk-H4DV34V3.js";
99
99
 
100
100
  // src/polling-backoff.ts
101
101
  var MAX_BACKOFF_MS = 6e4;
@@ -115,6 +115,7 @@ export interface CreateSessionRequest {
115
115
  enable_thinking?: boolean | null;
116
116
  memory_enabled?: boolean | null;
117
117
  env?: Record<string, string>;
118
+ /** Pass ["platform:schedule"] to disable BA scheduled work for this session. */
118
119
  disable_tools?: string[] | null;
119
120
  mcp_sources?: McpSourceConfig[];
120
121
  /** 此会话的所有普通轮次直接执行工具,不弹审批。 */
@@ -3,6 +3,8 @@ export interface ContextAttachment {
3
3
  id: string;
4
4
  label: string;
5
5
  content: string;
6
+ /** Explicitly remove or restore a named Context. Ordinary updates cannot revive a removed source. */
7
+ action?: "remove" | "restore";
6
8
  /** Project plain text as a named session Context; the producer supplies full state. */
7
9
  update_format?: "snapshot" | "diff";
8
10
  data?: Record<string, unknown> | null;
@@ -63,6 +63,7 @@ export declare const SessionInfo: import("arktype/internal/variants/object.ts").
63
63
  is_persistent?: boolean | undefined;
64
64
  initiator?: "sdk" | "ui" | "unknown" | null | undefined;
65
65
  is_headless?: boolean | undefined;
66
+ scheduled_task_id?: string | undefined;
66
67
  viewer_role?: "owner" | "viewer" | undefined;
67
68
  model?: string | null | undefined;
68
69
  enable_thinking?: boolean | null | undefined;
@@ -165,6 +165,7 @@ export declare class AgentSession {
165
165
  private lastDeliveredSystemError;
166
166
  private systemErrorGeneration;
167
167
  private subscriptionReplaySource;
168
+ private readonly lifetimeAbort;
168
169
  private disposed;
169
170
  private getAppContext;
170
171
  private sendPending;
@@ -32,6 +32,7 @@ export interface SessionConfig {
32
32
  memoryEnabled?: boolean;
33
33
  compactionRatio?: number;
34
34
  env?: Record<string, string>;
35
+ /** Disable tools or an entire platform domain, e.g. ["platform:schedule"]. */
35
36
  disableTools?: string[];
36
37
  }
37
38
  /**
@@ -15,6 +15,7 @@ export interface SessionProfile {
15
15
  compactionRatio?: number;
16
16
  enableThinking?: boolean;
17
17
  memoryEnabled?: boolean;
18
+ /** Disable tools or an entire platform domain, e.g. ["platform:schedule"]. */
18
19
  disableTools?: string[];
19
20
  env?: Record<string, string>;
20
21
  }
@@ -15,6 +15,7 @@ export declare namespace ChatSendPayloadSchema {
15
15
  type Id = string;
16
16
  type Label = string;
17
17
  type Content = string;
18
+ type Action = (("remove" | "restore") | null);
18
19
  type UpdateFormat = (("snapshot" | "diff") | null);
19
20
  type Data = ({
20
21
  [k: string]: unknown;
@@ -95,6 +96,7 @@ export declare namespace ChatSendPayloadSchema {
95
96
  id: Id;
96
97
  label: Label;
97
98
  content: Content;
99
+ action?: Action;
98
100
  update_format?: UpdateFormat;
99
101
  data?: Data;
100
102
  files?: Files;
@@ -155,6 +157,7 @@ export declare namespace ChatAppendPayloadSchema {
155
157
  type Id = string;
156
158
  type Label = string;
157
159
  type Content = string;
160
+ type Action = (("remove" | "restore") | null);
158
161
  type UpdateFormat = (("snapshot" | "diff") | null);
159
162
  type Data = ({
160
163
  [k: string]: unknown;
@@ -192,6 +195,7 @@ export declare namespace ChatAppendPayloadSchema {
192
195
  id: Id;
193
196
  label: Label;
194
197
  content: Content;
198
+ action?: Action;
195
199
  update_format?: UpdateFormat;
196
200
  data?: Data;
197
201
  files?: Files;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blade-hq/agent-client",
3
- "version": "2612.0.0-beta.71",
3
+ "version": "2612.0.0-beta.73",
4
4
  "description": "Blade Agent 框架无关客户端:会话实时状态机、REST 通道、弹窗登录、页面协作。浏览器与 Node.js 通用。",
5
5
  "repository": {
6
6
  "type": "git",
package/public-api.md CHANGED
@@ -702,6 +702,7 @@ contentPreview: (content: MessageContent, maxLen?: number) => string
702
702
  ## `ContextAttachment` (interface)
703
703
 
704
704
  ```ts
705
+ action: "remove" | "restore" | undefined
705
706
  content: string
706
707
  data: Record<string, unknown> | null | undefined
707
708
  files: { name: string; session_id?: string; path?: string; }[] | undefined
@@ -1076,6 +1077,7 @@ export type PhoneState = "enabled" | "offline" | "idle"
1076
1077
  ## `PluginFileOpener` (interface)
1077
1078
 
1078
1079
  ```ts
1080
+ default: boolean | undefined
1079
1081
  extensions: string[]
1080
1082
  id: string
1081
1083
  label: string
@@ -1355,6 +1357,7 @@ ports: SessionPortMapping[] | undefined
1355
1357
  preview_url: string | null | undefined
1356
1358
  replay_state: ReplayState | null | undefined
1357
1359
  sandbox_version: string | null | undefined
1360
+ scheduled_task_id: string | undefined
1358
1361
  shared: boolean | undefined
1359
1362
  solution: Solution | null | undefined
1360
1363
  solution_id: string | null | undefined
@@ -1380,6 +1383,7 @@ SessionInfo = type({
1380
1383
  "is_persistent?": "boolean",
1381
1384
  "initiator?": "'ui' | 'sdk' | 'unknown' | null",
1382
1385
  "is_headless?": "boolean",
1386
+ "scheduled_task_id?": "string",
1383
1387
  "viewer_role?": "'owner' | 'viewer'",
1384
1388
  "model?": "string | null",
1385
1389
  "enable_thinking?": "boolean | null",