@blade-hq/agent-client 2612.0.0-beta.83 → 2612.0.0-beta.85

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.d.ts CHANGED
@@ -27,7 +27,7 @@ export type { ModelsResource, ModelCatalog, ModelOption } from "./resources/mode
27
27
  export type { ComputersResource } from "./resources/computers";
28
28
  export type { AccountComputer, SessionComputer } from "./resources/computers";
29
29
  export type { PhoneDevice, PhoneHealth, PhoneList, PhoneAccessKey, PhonePipeline, PhoneState, PhonesResource, } from "./resources/phones";
30
- export type { AppCliAttachment, AppCliDefinition, CreateSessionRequest, UpdateSessionConfigurationRequest, SessionConfiguration, SessionRunResult, McpSourceConfig, FileEntry, PaginatedSessionsResult, SessionsResource, SessionTurnsPage, SessionTurnsQuery, UploadFileEntry, UploadFilesOptions, } from "./resources/sessions";
30
+ export type { AppCliAttachment, AppCliDefinition, CreateSessionRequest, UpdateSessionConfigurationRequest, SessionConfiguration, SessionRunResult, SessionRequestEvidence, McpSourceConfig, FileEntry, PaginatedSessionsResult, SessionsResource, SessionTurnsPage, SessionTurnsQuery, UploadFileEntry, UploadFilesOptions, } from "./resources/sessions";
31
31
  export { DEFAULT_REPLAY_SPEED, SessionInfo, SessionStatus } from "./schemas/session";
32
32
  export type { ReplaySpeed, ReplayState, SessionDetail } from "./schemas/session";
33
33
  export type { ChatMessage, FileContentPart, ImageUrlContentPart, MemoryRefInfo, MessageContent, MessageContentPart, TextContentPart, ToolCallInfo, WorkflowStepInfo, } from "./schemas/message";
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  parseAskUserQuestion,
33
33
  transformSlashCommand,
34
34
  userFacingErrorText
35
- } from "./chunk-J5HK3PPV.js";
35
+ } from "./chunk-AKYL4RUF.js";
36
36
  export {
37
37
  AgentSession,
38
38
  AgentSessionError,
package/dist/internal.js CHANGED
@@ -102,7 +102,7 @@ import {
102
102
  withTurns,
103
103
  workflowEntriesFromOutput,
104
104
  workflowNameFromArguments
105
- } from "./chunk-J5HK3PPV.js";
105
+ } from "./chunk-AKYL4RUF.js";
106
106
 
107
107
  // src/polling-backoff.ts
108
108
  var MAX_BACKOFF_MS = 6e4;
@@ -558,7 +558,7 @@ export declare class SessionsResource {
558
558
  getSharedSession(token: string): Promise<TurnProjection[]>;
559
559
  getSessionTasks(sessionId: string): Promise<Task[]>;
560
560
  /** Durable result for this execution; null until its run_end is committed. Owner only. */
561
- getRunResult<T = unknown>(sessionId: string, runId: string): Promise<SessionRunResult<T> | null>;
561
+ getRunResult<T = unknown>(sessionId: string, runId: string, init?: RequestInit): Promise<SessionRunResult<T> | null>;
562
562
  getSessionTurns(sessionId: string): Promise<TurnProjection[]>;
563
563
  getSessionTurnsPage(sessionId: string, options?: SessionTurnsQuery, init?: RequestInit): Promise<SessionTurnsPage>;
564
564
  /**
@@ -580,6 +580,8 @@ export declare class SessionsResource {
580
580
  reason?: ResultFeedbackReason | null;
581
581
  }): Promise<ResultFeedback>;
582
582
  getSessionContextStats(sessionId: string, init?: RequestInit): Promise<SessionContextStats>;
583
+ /** Owner-only consumption evidence across all retained branches. Throws on an invalid response. */
584
+ getRequestEvidence(sessionId: string, requestId: string, init?: RequestInit): Promise<SessionRequestEvidence>;
583
585
  getSessionHistory(sessionId: string, init?: RequestInit): Promise<SessionHistory>;
584
586
  getSessionCheckpoints(sessionId: string, init?: RequestInit): Promise<{
585
587
  nodes: CheckpointNode[];
@@ -673,3 +675,17 @@ export interface SessionRunResult<T = unknown> {
673
675
  error?: string;
674
676
  structured_result?: T;
675
677
  }
678
+ export type SessionRequestEvidence = {
679
+ requestId: string;
680
+ status: "consumed";
681
+ executionId: string;
682
+ } | {
683
+ requestId: string;
684
+ status: "not_found";
685
+ executionId?: never;
686
+ } | {
687
+ requestId: string;
688
+ status: "unknown";
689
+ reason: "request_identity_incomplete_or_conflicting";
690
+ executionId?: never;
691
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blade-hq/agent-client",
3
- "version": "2612.0.0-beta.83",
3
+ "version": "2612.0.0-beta.85",
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
- 共 204 个公开声明。
6
+ 共 205 个公开声明。
7
7
 
8
8
  ## `AccountComputer` (interface)
9
9
 
@@ -1903,6 +1903,15 @@ revision: number
1903
1903
  session_id: string
1904
1904
  ```
1905
1905
 
1906
+ ## `SessionRequestEvidence` (type)
1907
+
1908
+ ```ts
1909
+ export type SessionRequestEvidence =
1910
+ | { requestId: string; status: "consumed"; executionId: string }
1911
+ | { requestId: string; status: "not_found"; executionId?: never }
1912
+ | { requestId: string; status: "unknown"; reason: "request_identity_incomplete_or_conflicting"; executionId?: never }
1913
+ ```
1914
+
1906
1915
  ## `SessionRunResult` (interface)
1907
1916
 
1908
1917
  ```ts
@@ -1959,7 +1968,8 @@ getDownloadDirUrl: (sessionId: string, dirPath: string) => string
1959
1968
  getMcpApp: (sessionId: string, sourceId: string, init?: RequestInit) => Promise<McpAppArchive>
1960
1969
  getMcpAppContext: (sessionId: string, sourceId: string, init?: RequestInit) => Promise<McpAppContextState>
1961
1970
  getReplayPreview: (sessionId: string) => Promise<ReplayPreview>
1962
- getRunResult: <T = unknown>(sessionId: string, runId: string) => Promise<SessionRunResult<T> | null>
1971
+ getRequestEvidence: (sessionId: string, requestId: string, init?: RequestInit) => Promise<SessionRequestEvidence>
1972
+ getRunResult: <T = unknown>(sessionId: string, runId: string, init?: RequestInit) => Promise<SessionRunResult<T> | null>
1963
1973
  getSession: (sessionId: string, init?: RequestInit) => Promise<SessionDetail>
1964
1974
  getSessionCheckpoints: (sessionId: string, init?: RequestInit) => Promise<{ nodes: CheckpointNode[]; leaf_id: string | null; }>
1965
1975
  getSessionConfiguration: (sessionId: string, init?: RequestInit) => Promise<SessionConfiguration>