@signalridge/pi-worktree 1.4.1 → 1.4.3
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 +14 -0
- package/package.json +5 -5
- package/src/session.ts +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.4.3
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- 8190516: Extend the tested Pi host compatibility range through 0.87.x while retaining supported older hosts. Validate the published extensions against Pi 0.87.1 and adapt changed provider, session-context, and lifecycle contracts where necessary.
|
|
7
|
+
- 8190516: Add Pi 0.99.1 to the supported host peer ranges while retaining Pi 0.84–0.87 compatibility. Align Pi development dependency pins with 0.99.1 for validation against the new host.
|
|
8
|
+
- Updated dependencies [8190516]
|
|
9
|
+
- Updated dependencies [8190516]
|
|
10
|
+
- @signalridge/pi-ui@1.3.2
|
|
11
|
+
|
|
12
|
+
## 1.4.2
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- e939fa0: Fix Pi 0.85.1 tool-approval argument forwarding, ambient-auth and credential-specific model routing, and cross-platform workspace session validation.
|
|
16
|
+
|
|
3
17
|
## 1.4.1
|
|
4
18
|
### Patch Changes
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signalridge/pi-worktree",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "Pi extension for safe interactive Git worktree management and workspace switching.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"lint": "biome check ."
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@earendil-works/pi-coding-agent": "^0.84.0 || ^0.85.0"
|
|
38
|
+
"@earendil-works/pi-coding-agent": "^0.84.0 || ^0.85.0 || ^0.86.0 || ^0.87.0 || ^0.99.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@biomejs/biome": "2.5.7",
|
|
42
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
43
|
-
"@earendil-works/pi-tui": "0.
|
|
42
|
+
"@earendil-works/pi-coding-agent": "0.99.1",
|
|
43
|
+
"@earendil-works/pi-tui": "0.99.1",
|
|
44
44
|
"@types/node": "26.1.2",
|
|
45
45
|
"@types/proper-lockfile": "^4.1.4",
|
|
46
46
|
"typescript": "7.0.2",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@narumitw/pi-tui-kit": "^0.54.0",
|
|
63
|
-
"@signalridge/pi-ui": "^1.3.
|
|
63
|
+
"@signalridge/pi-ui": "^1.3.2",
|
|
64
64
|
"proper-lockfile": "^4.1.2"
|
|
65
65
|
}
|
|
66
66
|
}
|
package/src/session.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { existsSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { resolve as normalizeTargetPath } from "node:path";
|
|
2
3
|
import type { ExtensionCommandContext, SessionEntry } from "@earendil-works/pi-coding-agent";
|
|
3
4
|
import { SessionManager } from "@earendil-works/pi-coding-agent";
|
|
4
5
|
import { stripTerminalControls } from "./git.js";
|
|
@@ -67,6 +68,14 @@ export function createTargetSession(ctx: ExtensionCommandContext, targetPath: st
|
|
|
67
68
|
return writeTargetSession(targetPath, [], undefined, null);
|
|
68
69
|
}
|
|
69
70
|
|
|
71
|
+
export function sessionCwdMatches(
|
|
72
|
+
actual: string,
|
|
73
|
+
expected: string,
|
|
74
|
+
resolvePath: (path: string) => string = normalizeTargetPath,
|
|
75
|
+
): boolean {
|
|
76
|
+
return resolvePath(actual) === resolvePath(expected);
|
|
77
|
+
}
|
|
78
|
+
|
|
70
79
|
function writeTargetSession(
|
|
71
80
|
targetPath: string,
|
|
72
81
|
entries: readonly SessionEntry[],
|
|
@@ -84,7 +93,7 @@ function writeTargetSession(
|
|
|
84
93
|
mode: 0o600,
|
|
85
94
|
});
|
|
86
95
|
const verified = SessionManager.open(targetFile);
|
|
87
|
-
if (verified.getCwd()
|
|
96
|
+
if (!sessionCwdMatches(verified.getCwd(), targetPath) || verified.getLeafId() !== expectedLeaf) {
|
|
88
97
|
throw new Error("Pi could not verify the target session cwd and active branch.");
|
|
89
98
|
}
|
|
90
99
|
return targetFile;
|