@averyyy/pi-client 0.84.2-piclient.1 → 0.84.3-piclient.1
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 +6 -0
- package/bin/pi-client.js +2 -0
- package/bin/web.js +10 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
### Fixed
|
|
4
|
+
|
|
5
|
+
- Fixed automatic update checks to compare the installed `pi-client` version instead of the upstream `pi` version.
|
|
6
|
+
|
|
3
7
|
### Added
|
|
4
8
|
|
|
9
|
+
- Added automatic `pi` → `pi-client` command rewriting when running in `PI_SERVER_MODE`. The adapter installs a process-local PATH shim for subprocess execution and rewrites displayed commands for consistency.
|
|
5
10
|
- Initial `pi-client` package as a lightweight wrapper that exposes only the `pi-client` bin without `pi`.
|
|
6
11
|
- Global install wrapper that launches the local forked coding-agent entrypoint while sharing the original `~/.pi/agent` configuration.
|
|
7
12
|
- `pi-client update` command for updating the fork checkout and reinstalling both `pi-client` and `pi-server`.
|
|
@@ -11,6 +16,7 @@
|
|
|
11
16
|
|
|
12
17
|
### Fixed
|
|
13
18
|
|
|
19
|
+
- Handled malformed `settings.json` when checking for the Tau Codex extension instead of crashing `pi-client web`.
|
|
14
20
|
- Used `--legacy-peer-deps` for npm-global fork updates and documented installs so existing upstream Pi installs do not trigger peer override warnings for forked prerelease aliases.
|
|
15
21
|
|
|
16
22
|
### Changed
|
package/bin/pi-client.js
CHANGED
|
@@ -7,6 +7,7 @@ import { fileURLToPath } from "node:url";
|
|
|
7
7
|
import { runPiClientSend } from "./send.js";
|
|
8
8
|
|
|
9
9
|
const args = process.argv.slice(2);
|
|
10
|
+
const packageVersion = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8")).version;
|
|
10
11
|
const modulePromise =
|
|
11
12
|
args[0] === "send"
|
|
12
13
|
? runPiClientSend(args.slice(1)).then((code) => {
|
|
@@ -40,6 +41,7 @@ function runPiClientCli(args) {
|
|
|
40
41
|
...process.env,
|
|
41
42
|
PI_CODING_AGENT: "true",
|
|
42
43
|
PI_SERVER_MODE: "true",
|
|
44
|
+
PI_CLIENT_VERSION: packageVersion,
|
|
43
45
|
PI_CLIENT_RELOAD_STATE_PATH: reloadStatePath,
|
|
44
46
|
},
|
|
45
47
|
stdio: "inherit",
|
package/bin/web.js
CHANGED
|
@@ -8,6 +8,7 @@ import { fileURLToPath } from "node:url";
|
|
|
8
8
|
|
|
9
9
|
const defaultPort = "1838";
|
|
10
10
|
const defaultPiServerUrl = "http://127.0.0.1:4217";
|
|
11
|
+
const packageVersion = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8")).version;
|
|
11
12
|
const tauCodexPackage = "@averyyy/pi-tau-codex";
|
|
12
13
|
const tauCodexInstallTarget = "npm:@averyyy/pi-tau-codex";
|
|
13
14
|
const tauCodexGitTarget = "git:github.com/Averyyy/pi-tau-codex";
|
|
@@ -64,6 +65,7 @@ export function piClientWebEnv(env = process.env, options) {
|
|
|
64
65
|
...env,
|
|
65
66
|
PI_CODING_AGENT: "true",
|
|
66
67
|
PI_SERVER_MODE: "true",
|
|
68
|
+
PI_CLIENT_VERSION: packageVersion,
|
|
67
69
|
PI_SERVER_URL: env.PI_SERVER_URL ?? defaultPiServerUrl,
|
|
68
70
|
TAU_HOST: options.host,
|
|
69
71
|
TAU_MIRROR_PORT: options.port,
|
|
@@ -77,9 +79,14 @@ export function hasTauCodexExtensionInstalled(env = process.env) {
|
|
|
77
79
|
"settings.json",
|
|
78
80
|
);
|
|
79
81
|
if (!existsSync(settingsPath)) return false;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
try {
|
|
83
|
+
const settings = JSON.parse(readFileSync(settingsPath, "utf8"));
|
|
84
|
+
const packages = Array.isArray(settings.packages) ? settings.packages : [];
|
|
85
|
+
return packages.some(packageSpecMatchesTauCodex);
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.warn(`Failed to parse settings.json, treating as missing: ${error.message}`);
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
83
90
|
}
|
|
84
91
|
|
|
85
92
|
function packageSpecMatchesTauCodex(spec) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@averyyy/pi-client",
|
|
3
|
-
"version": "0.84.
|
|
3
|
+
"version": "0.84.3-piclient.1",
|
|
4
4
|
"description": "Lightweight CLI wrapper that connects to a pi-server instance",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piClient": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"prepublishOnly": "npm run build"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@earendil-works/pi-coding-agent": "npm:@averyyy/pi-coding-agent@0.84.
|
|
28
|
+
"@earendil-works/pi-coding-agent": "npm:@averyyy/pi-coding-agent@0.84.3-piclient.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"shx": "0.4.0",
|