agent-loft 0.2.105 → 0.2.106

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-loft",
3
- "version": "0.2.105",
3
+ "version": "0.2.106",
4
4
  "type": "module",
5
5
  "description": "多个 agent 的工作台:把本机 Claude Code / Codex 放到一处统一管理,用飞书和 Web 页面随时驱动——会话、审批、模型切换都共用",
6
6
  "keywords": [
@@ -5,6 +5,7 @@
5
5
  import { spawn, spawnSync } from "node:child_process";
6
6
  import { createRequire } from "node:module";
7
7
  import path from "node:path";
8
+ import { fileURLToPath } from "node:url";
8
9
  import { agentEnvironment } from "../core/agent-env.js";
9
10
  import { config } from "../core/config.js";
10
11
  import { withProbe } from "./claude/probe.js";
@@ -210,7 +211,8 @@ async function piHealth(): Promise<AgentHealth> {
210
211
  }
211
212
  let version: string | undefined;
212
213
  try {
213
- const v = (require(path.join(path.dirname(require.resolve("@earendil-works/pi-coding-agent")), "..", "package.json")) as { version?: string }).version;
214
+ // SDK 只有 import 导出,require.resolve 解不到,得走 import.meta.resolve
215
+ const v = (require(path.join(path.dirname(fileURLToPath(import.meta.resolve("@earendil-works/pi-coding-agent"))), "..", "package.json")) as { version?: string }).version;
214
216
  version = v ? `SDK ${v}` : undefined;
215
217
  } catch {
216
218
  return {