@zhushanwen/pi-llm-shared 0.6.0 → 0.7.0

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": "@zhushanwen/pi-llm-shared",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Shared LLM invocation library for Pi extensions — model resolution (ref exact only), LLM calling (completeSimple), and config read/write with mtime+size caching. Shared library, not a Pi extension.",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -17,8 +17,8 @@
17
17
  "src/"
18
18
  ],
19
19
  "dependencies": {
20
- "@zhushanwen/pi-extension-logger": "0.4.1",
21
- "@zhushanwen/pi-file-lock": "0.2.1"
20
+ "@zhushanwen/pi-extension-logger": "0.6.0",
21
+ "@zhushanwen/pi-file-lock": "0.4.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@earendil-works/pi-ai": "^0.84.4",
@@ -21,7 +21,7 @@ vi.mock("@zhushanwen/pi-extension-logger", () => ({
21
21
  // 用 vi.mock 包装 readFileSync/renameSync/statSync/unlinkSync(默认走 actual,
22
22
  // 个别 test override),其他 fs 操作(writeFileSync/existsSync/mkdirSync...)原样
23
23
  // 透传 actual。statSync/unlinkSync 供 U4 logger.warn 留痕用例 override。
24
- // 注意:proper-lockfile(withFileLockSync 内部)走 graceful-fs,不受本 mock 影响。
24
+ // 注意:withFileLockSync 内部为自实现 mkdir-lock(lock-core.ts,零依赖直用 node:fs,非 proper-lockfile);本 mock 默认透传 actual,锁行为不受影响。
25
25
  vi.mock("node:fs", async (importOriginal) => {
26
26
  const actual = await importOriginal() as typeof import("node:fs");
27
27
  return {
package/src/index.ts CHANGED
@@ -5,4 +5,4 @@
5
5
  export { resolveModel, getCurrentModelId, type ModelSelector } from "./resolve.ts";
6
6
  export { callLLM, type CallLLMOptions, type CallLLMResult } from "./call.ts";
7
7
  export { getConfigPath, loadConfig, saveConfig, clearConfigCache } from "./config.ts";
8
- export { migrateLegacyConfig, type MigrationResult } from "./migrate.ts";
8
+ export { migrateLegacyConfig } from "./migrate.ts";