@blade-hq/agent-client 2610.0.0-beta.79 → 2610.0.0-beta.80

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/README.md CHANGED
@@ -763,3 +763,5 @@ HTML 一律判无效);`isInternalStatusToolUiCard` 识别内部「阶段进
763
763
  `McpAppArchive` 是 `client.sessions.getMcpApp(sessionId, sourceId)` 经鉴权返回的归档,包含保存的 HTML 与最新留档输入/结果。`callMcpApp` 在会话 sandbox 内调用该卡片的归档能力;`onMcpAppChanged` 订阅结果变化,返回取消订阅函数。
764
764
 
765
765
  最新调用失败或完成状态未知时,归档同时提供 `previousToolInput` / `previousToolResult`,用于先恢复最后成功的界面再展示错误。读取这些留档不会重新执行工具。
766
+
767
+ 会话列表和详情的 `SessionInfo.initiator` 表示首次发起来源:`ui` 为界面,`sdk` 为 SDK;旧会话缺少可靠记录时为 `unknown`,尚未发起会话时为 `null` 或未提供。它不等同于后台运行标记 `is_headless`,后续继续会话不会改变来源。
package/dist/index.js CHANGED
@@ -531,6 +531,7 @@ var SessionInfo = type({
531
531
  "shared?": "boolean",
532
532
  "memory_enabled?": "boolean",
533
533
  "is_persistent?": "boolean",
534
+ "initiator?": "'ui' | 'sdk' | 'unknown' | null",
534
535
  "is_headless?": "boolean",
535
536
  "viewer_role?": "'owner' | 'viewer'",
536
537
  "template_id?": "string | null",
@@ -3057,8 +3058,9 @@ var SessionsResource = class {
3057
3058
  `/api/sessions/${sessionId}/probe-url?url=${encodeURIComponent(url)}`
3058
3059
  );
3059
3060
  }
3060
- listDir(sessionId, dirPath) {
3061
- return this.client.json("GET", `/api/sessions/${sessionId}/ls/${encodeURIComponent(dirPath)}`);
3061
+ listDir(sessionId, dirPath, showHidden = false) {
3062
+ const query = showHidden ? "?show_hidden=true" : "";
3063
+ return this.client.json("GET", `/api/sessions/${sessionId}/ls/${encodeURIComponent(dirPath)}${query}`);
3062
3064
  }
3063
3065
  async countFiles(sessionId, dirPath = "") {
3064
3066
  const entries = await this.listDir(sessionId, dirPath);
@@ -6801,7 +6803,7 @@ function resolveServiceUrl(endpoints, name, path = "") {
6801
6803
 
6802
6804
  // src/version.ts
6803
6805
  var SDK_NAME = "agent-client";
6804
- var SDK_VERSION = true ? "2610.0.0-beta.79" : "1.1.1";
6806
+ var SDK_VERSION = true ? "2610.0.0-beta.80" : "1.1.1";
6805
6807
 
6806
6808
  // src/commands/protocol.ts
6807
6809
  function isCommandEnvelope(value) {