pi-web-ui 0.8.2 → 0.8.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/dist/server/terminals.js
CHANGED
|
@@ -137,7 +137,10 @@ function shellEnv() {
|
|
|
137
137
|
// and node-pty throws the generic "posix_spawnp failed". Locally-built
|
|
138
138
|
// copies (build/Release) are fine; every `npm install` that picks the prebuild
|
|
139
139
|
// — e.g. `npm i -g pi-web-ui`, which is what system-service installs run — is
|
|
140
|
-
// broken until the bit is restored. Self-heal at startup
|
|
140
|
+
// broken until the bit is restored. Self-heal at startup AND lazily before
|
|
141
|
+
// every spawn (an `npm i -g` while the server is running replaces the helper
|
|
142
|
+
// under the running process, so the startup-only repair misses it).
|
|
143
|
+
// Best-effort: a read-only node_modules just keeps the old failure.
|
|
141
144
|
const require = createRequire(import.meta.url);
|
|
142
145
|
/** Absolute paths of every node-pty spawn-helper this install can exec. */
|
|
143
146
|
function spawnHelperPaths() {
|
|
@@ -294,6 +297,9 @@ export class TerminalManager {
|
|
|
294
297
|
this.fail(id, `目录不存在:${abs}`);
|
|
295
298
|
return false;
|
|
296
299
|
}
|
|
300
|
+
// node-pty's spawn-helper may have lost its +x bit since the last repair
|
|
301
|
+
// (e.g. a global npm install replaced the helper while this server runs).
|
|
302
|
+
repairSpawnHelperPermissions();
|
|
297
303
|
let pty;
|
|
298
304
|
try {
|
|
299
305
|
pty = spawn(SHELL, SHELL_ARGS, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-web-ui",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Web chat interface for the pi coding agent, powered by the pi SDK (@earendil-works/pi-coding-agent) — one-command run, Docker/systemd/launchd deployable",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|