@blade-hq/agent-client 2610.0.0-beta.46 → 2610.0.0-beta.48

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.
@@ -0,0 +1,11 @@
1
+ /** Scheduling policy for read-only polling; never sends or replays a request. */
2
+ export declare class PollingBackoff {
3
+ private readonly intervalMs;
4
+ private failures;
5
+ private nextAt;
6
+ constructor(intervalMs: number);
7
+ reset(): void;
8
+ failed(error: unknown): void;
9
+ /** Zero means ready, false means stop, otherwise wait at least this many ms. */
10
+ waitMs(): number | false;
11
+ }
@@ -19,4 +19,8 @@ export declare class ChatProjectsResource {
19
19
  name?: string;
20
20
  instructions?: string;
21
21
  }): Promise<ChatProject>;
22
+ delete(projectId: string): Promise<{
23
+ deleted: boolean;
24
+ deleted_sessions: number;
25
+ }>;
22
26
  }
@@ -22,6 +22,7 @@ export declare class SessionHub {
22
22
  private readonly connectionListeners;
23
23
  private bound;
24
24
  private hasConnected;
25
+ private readonly authBusyReconnect;
25
26
  constructor(client: BladeClient);
26
27
  /** 当前 Socket.IO 连接状态。 */
27
28
  getConnection(): ConnectionStatus;
@@ -0,0 +1,9 @@
1
+ /** Return the server-requested delay for a typed temporary auth rejection. */
2
+ export declare function authBusyRetryDelayMs(error: unknown): number | null;
3
+ /** One pending manual reconnect for Socket.IO CONNECT_ERROR auth overloads. */
4
+ export declare class AuthBusyReconnect {
5
+ private timer;
6
+ get pending(): boolean;
7
+ schedule(error: unknown, reconnect: () => void): boolean;
8
+ cancel(): void;
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blade-hq/agent-client",
3
- "version": "2610.0.0-beta.46",
3
+ "version": "2610.0.0-beta.48",
4
4
  "description": "Blade Agent 框架无关客户端:会话实时状态机、REST 通道、弹窗登录、页面协作。浏览器与 Node.js 通用。",
5
5
  "repository": {
6
6
  "type": "git",
package/public-api.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
4
4
  > 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
5
5
 
6
- 共 177 个公开声明。
6
+ 共 180 个公开声明。
7
7
 
8
8
  ## `acceptedPostChatFollowupCompletesLatestRun` (function)
9
9
 
@@ -164,6 +164,20 @@ cli: AppCliDefinition | undefined
164
164
  getContext: () => Record<string, unknown> | Promise<Record<string, unknown>>
165
165
  ```
166
166
 
167
+ ## `AuthBusyReconnect` (class)
168
+
169
+ ```ts
170
+ cancel: () => void
171
+ pending: boolean
172
+ schedule: (error: unknown, reconnect: () => void) => boolean
173
+ ```
174
+
175
+ ## `authBusyRetryDelayMs` (function)
176
+
177
+ ```ts
178
+ authBusyRetryDelayMs: (error: unknown) => number | null
179
+ ```
180
+
167
181
  ## `AuthResource` (class)
168
182
 
169
183
  ```ts
@@ -318,6 +332,7 @@ updated_at: string
318
332
 
319
333
  ```ts
320
334
  create: (payload: { name: string; instructions?: string; }) => Promise<ChatProject>
335
+ delete: (projectId: string) => Promise<{ deleted: boolean; deleted_sessions: number; }>
321
336
  list: () => Promise<ChatProject[]>
322
337
  update: (projectId: string, payload: { name?: string; instructions?: string; }) => Promise<ChatProject>
323
338
  ```
@@ -942,6 +957,14 @@ services: Partial<Record<"os" | "hub" | "agent" | "oauth" | "llmGateway" | "gite
942
957
  export type PlatformServiceName = (typeof PLATFORM_SERVICE_NAMES)[number]
943
958
  ```
944
959
 
960
+ ## `PollingBackoff` (class)
961
+
962
+ ```ts
963
+ failed: (error: unknown) => void
964
+ reset: () => void
965
+ waitMs: () => number | false
966
+ ```
967
+
945
968
  ## `PostChatFollowup` (interface)
946
969
 
947
970
  ```ts