pi-lazy-extensions 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/index.ts +2 -2
  2. package/package.json +9 -9
package/index.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * 3. The `ext` proxy tool lets the LLM discover and activate extensions
11
11
  */
12
12
 
13
- import type { ExtensionAPI, ExtensionContext, ToolInfo } from "@earendil-works/pi-coding-agent";
13
+ import { getAgentDir, type ExtensionAPI, type ExtensionContext, type ToolInfo } from "@earendil-works/pi-coding-agent";
14
14
  import { Type } from "typebox";
15
15
  import { loadManifest, buildState, getEagerExtensions } from "./config.js";
16
16
  import { activateExtension, clearAllTimers, touchExtension } from "./registry.js";
@@ -28,7 +28,7 @@ export default function lazyExtensions(pi: ExtensionAPI) {
28
28
  let lifecycleGeneration = 0;
29
29
 
30
30
  const getPiTools = (): ToolInfo[] => pi.getAllTools();
31
- const agentDir = process.env.PI_AGENT_DIR ?? process.env.PI_CODING_AGENT_DIR ?? `${process.env.HOME}/.pi/agent`;
31
+ const agentDir = getAgentDir();
32
32
 
33
33
  // Check for tool name collision before registering the proxy tool.
34
34
  // Pi uses "first registration wins" — if another extension already
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-lazy-extensions",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Lazy-load pi extensions on demand via a ToolSearch-style proxy tool",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,13 +34,6 @@
34
34
  "peerDependencies": {
35
35
  "@earendil-works/pi-coding-agent": ">=0.74.0"
36
36
  },
37
- "scripts": {
38
- "test": "vitest run",
39
- "test:watch": "vitest",
40
- "test:coverage": "vitest run --coverage",
41
- "typecheck": "tsc --noEmit",
42
- "lint:dead": "knip --no-gitignore"
43
- },
44
37
  "devDependencies": {
45
38
  "@commitlint/cli": "21.0.1",
46
39
  "@commitlint/config-conventional": "21.0.1",
@@ -55,5 +48,12 @@
55
48
  "fast-xml-builder": "1.2.0",
56
49
  "protobufjs": "8.4.0",
57
50
  "ws": "8.20.1"
51
+ },
52
+ "scripts": {
53
+ "test": "vitest run",
54
+ "test:watch": "vitest",
55
+ "test:coverage": "vitest run --coverage",
56
+ "typecheck": "tsc --noEmit",
57
+ "lint:dead": "knip --no-gitignore"
58
58
  }
59
- }
59
+ }