@llblab/pi-actors 0.58.3 → 0.58.4
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/CHANGELOG.md +5 -0
- package/dist/lib/recipes-context.js +16 -2
- package/lib/recipes-context.ts +12 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
> Each release keeps at most 8 outcome records of at most 512 characters.
|
|
4
4
|
|
|
5
|
+
## 0.58.4: Host-Provided SDK Loading
|
|
6
|
+
|
|
7
|
+
- `Extension Startup`: Standalone and kit-pointer installations no longer require a physical Pi SDK package beside the extension merely to load. Bare Pi commands keep their context/session behavior; Node CLI recognition resolves the SDK only when needed and refuses unknown scripts when that optional identity is unavailable.
|
|
8
|
+
- `Package Regression`: Copied and npm-packed standalone and kit-pointer layouts load through the public Pi resource loader without local Pi peers. The checks preserve canonical tool registration and prevent unrelated Node scripts from receiving Pi-only arguments; no duplicate SDK dependency is installed.
|
|
9
|
+
|
|
5
10
|
## 0.58.3: Compact Run File Navigation
|
|
6
11
|
|
|
7
12
|
- `Useful File References`: Compact spawn/async-tool receipts select useful exact starting paths without per-file format, size, mutable, scope or generation dumps. Fresh completion headers keep rooted source/artifact paths and concise admitted status, not repeated purposes or hashes. Full machine details and saved snapshot bindings remain accessible.
|
|
@@ -33,10 +33,24 @@ export function createEmptyRecipeResolutionContext(sessionId, cwd) {
|
|
|
33
33
|
function commandName(command) {
|
|
34
34
|
return basename(command).toLowerCase();
|
|
35
35
|
}
|
|
36
|
-
const PI_NODE_CLI_PATHS = new Set(["./bundle/cli.js", "./cli.js"].map(path => fileURLToPath(new URL(path, import.meta.resolve("@earendil-works/pi-coding-agent")))));
|
|
37
36
|
function isPiCommand(command, args) {
|
|
38
37
|
const name = commandName(command);
|
|
39
|
-
|
|
38
|
+
if (name === "pi")
|
|
39
|
+
return true;
|
|
40
|
+
if (name !== "node" && name !== "node.exe")
|
|
41
|
+
return false;
|
|
42
|
+
let sdkEntry;
|
|
43
|
+
try {
|
|
44
|
+
// Host-provided SDK imports need not have a filesystem package beside the extension.
|
|
45
|
+
sdkEntry = import.meta.resolve("@earendil-works/pi-coding-agent");
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
const code = error?.code;
|
|
49
|
+
if (code === "ERR_MODULE_NOT_FOUND" || code === "MODULE_NOT_FOUND")
|
|
50
|
+
return false;
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
return ["./bundle/cli.js", "./cli.js"].some(path => fileURLToPath(new URL(path, sdkEntry)) === args[0]);
|
|
40
54
|
}
|
|
41
55
|
const PI_PRINT_FLAGS = new Set(["-p", "--print"]);
|
|
42
56
|
const PI_VALUE_OPTIONS = new Set([
|
package/lib/recipes-context.ts
CHANGED
|
@@ -65,12 +65,20 @@ function commandName(command: string): string {
|
|
|
65
65
|
return basename(command).toLowerCase();
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
const PI_NODE_CLI_PATHS = new Set(["./bundle/cli.js", "./cli.js"].map(path =>
|
|
69
|
-
fileURLToPath(new URL(path, import.meta.resolve("@earendil-works/pi-coding-agent")))));
|
|
70
|
-
|
|
71
68
|
function isPiCommand(command: string, args: string[]): boolean {
|
|
72
69
|
const name = commandName(command);
|
|
73
|
-
|
|
70
|
+
if (name === "pi") return true;
|
|
71
|
+
if (name !== "node" && name !== "node.exe") return false;
|
|
72
|
+
let sdkEntry: string;
|
|
73
|
+
try {
|
|
74
|
+
// Host-provided SDK imports need not have a filesystem package beside the extension.
|
|
75
|
+
sdkEntry = import.meta.resolve("@earendil-works/pi-coding-agent");
|
|
76
|
+
} catch (error) {
|
|
77
|
+
const code = (error as NodeJS.ErrnoException)?.code;
|
|
78
|
+
if (code === "ERR_MODULE_NOT_FOUND" || code === "MODULE_NOT_FOUND") return false;
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
return ["./bundle/cli.js", "./cli.js"].some(path => fileURLToPath(new URL(path, sdkEntry)) === args[0]);
|
|
74
82
|
}
|
|
75
83
|
|
|
76
84
|
const PI_PRINT_FLAGS = new Set(["-p", "--print"]);
|