@herbertgao/sol-pi 0.1.0 → 0.2.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/docs/compatibility.md
CHANGED
|
@@ -17,6 +17,8 @@ SoL-Pi imports only public package exports:
|
|
|
17
17
|
|
|
18
18
|
The built-in edit/write definitions capture their working directory, so SoL-Pi caches one definition per `ctx.cwd`. Its own per-file queue surrounds the built-in mutation and follow-up command. It does not nest Pi's built-in mutation queue.
|
|
19
19
|
|
|
20
|
+
Action Fusion decodes `file://` targets with Node's `fileURLToPath()` before resolving the queue and hash-check path. This keeps file URLs, including percent-encoded filenames and Pi's optional `@` prefix, aligned with the file handled by the built-in mutation tool.
|
|
21
|
+
|
|
20
22
|
The queue covers only fused operations registered by this SoL-Pi instance. External processes, direct built-in-tool calls outside the replacement, and unrelated extensions are not globally locked. SoL-Pi hashes the target immediately before launching `then_run` and skips the command if it observes an intervening content change.
|
|
21
23
|
|
|
22
24
|
When another extension already owns `write`, Action Fusion leaves that tool in place and only registers its `edit` replacement. When `pi-automode` exposes `automode_inspect`, Action Fusion registers neither mutation replacement: nested `then_run` cannot re-enter Pi's public `tool_call` permission pipeline, so disabling the fusion is the safe fallback.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herbertgao/sol-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Token-efficient context and tool extensions for Pi, maintained from NVlabs/SoL-Pi.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -71,6 +71,6 @@
|
|
|
71
71
|
"version": "0.1.0",
|
|
72
72
|
"reviewedVersion": "0.1.0",
|
|
73
73
|
"repository": "https://github.com/NVlabs/SoL-Pi",
|
|
74
|
-
"commit": "
|
|
74
|
+
"commit": "22277b7e0c3c46ba1259a6687f31fe39ade421a5"
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { realpath } from "node:fs/promises";
|
|
7
7
|
import { homedir } from "node:os";
|
|
8
8
|
import { basename, dirname, resolve } from "node:path";
|
|
9
|
+
import { fileURLToPath } from "node:url";
|
|
9
10
|
|
|
10
11
|
const queueTails = new Map<string, Promise<void>>();
|
|
11
12
|
|
|
@@ -14,7 +15,9 @@ function stripToolPathPrefix(filePath: string): string {
|
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export function resolveToolPath(cwd: string, filePath: string): string {
|
|
17
|
-
const
|
|
18
|
+
const stripped = stripToolPathPrefix(filePath);
|
|
19
|
+
// Pi accepts file URLs; the queue and hash guard must use the same target.
|
|
20
|
+
const expanded = stripped.startsWith("file://") ? fileURLToPath(stripped) : stripped;
|
|
18
21
|
if (expanded === "~") return homedir();
|
|
19
22
|
if (expanded.startsWith("~/")) return resolve(homedir(), expanded.slice(2));
|
|
20
23
|
return resolve(cwd, expanded);
|