pi-forge 1.1.4 → 1.1.6
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/README.md +1 -1
- package/bin/fix-pty-perms.mjs +69 -0
- package/dist/client/assets/CodeMirrorEditor-C_ITRoQa.js +50 -0
- package/dist/client/assets/CodeMirrorEditor-C_ITRoQa.js.map +1 -0
- package/dist/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/client/assets/index-B67tDt4n.js +356 -0
- package/dist/client/assets/index-B67tDt4n.js.map +1 -0
- package/dist/client/assets/index-BB-19PiX.css +1 -0
- package/dist/client/assets/workbox-window.prod.es5-Cch4wiA5.js +3 -0
- package/dist/client/assets/workbox-window.prod.es5-Cch4wiA5.js.map +1 -0
- package/dist/client/index.html +2 -2
- package/dist/client/sw.js +1 -1
- package/dist/client/sw.js.map +1 -1
- package/dist/server/agent-resource-loader.js +32 -11
- package/dist/server/agent-resource-loader.js.map +1 -1
- package/dist/server/config-export.js +36 -8
- package/dist/server/config-export.js.map +1 -1
- package/dist/server/config-manager.js +131 -5
- package/dist/server/config-manager.js.map +1 -1
- package/dist/server/config.js +11 -0
- package/dist/server/config.js.map +1 -1
- package/dist/server/extensions-discovery.js +1 -1
- package/dist/server/extensions-discovery.js.map +1 -1
- package/dist/server/file-manager.js +19 -1
- package/dist/server/file-manager.js.map +1 -1
- package/dist/server/file-references.js +124 -29
- package/dist/server/file-references.js.map +1 -1
- package/dist/server/project-manager.js +4 -0
- package/dist/server/project-manager.js.map +1 -1
- package/dist/server/prompt-overrides.js +131 -0
- package/dist/server/prompt-overrides.js.map +1 -0
- package/dist/server/routes/config.js +268 -19
- package/dist/server/routes/config.js.map +1 -1
- package/dist/server/routes/health.js +38 -13
- package/dist/server/routes/health.js.map +1 -1
- package/dist/server/session-registry.js +16 -8
- package/dist/server/session-registry.js.map +1 -1
- package/dist/server/turn-diff-builder.js +1 -1
- package/dist/server/turn-diff-builder.js.map +1 -1
- package/package.json +7 -4
- package/dist/client/assets/CodeMirrorEditor-BqaaP1EE.js +0 -34
- package/dist/client/assets/CodeMirrorEditor-BqaaP1EE.js.map +0 -1
- package/dist/client/assets/index-B-529kgJ.css +0 -32
- package/dist/client/assets/index-BzKzxXFs.js +0 -392
- package/dist/client/assets/index-BzKzxXFs.js.map +0 -1
- package/dist/client/assets/workbox-window.prod.es5-BBnX5xw4.js +0 -3
- package/dist/client/assets/workbox-window.prod.es5-BBnX5xw4.js.map +0 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ for the full surface and example curl flows.
|
|
|
42
42
|
|
|
43
43
|
## Versioning
|
|
44
44
|
|
|
45
|
-
This package version (`1.1.
|
|
45
|
+
This package version (`1.1.6`) tracks the [GitHub release](https://github.com/Devin-Marks/pi-forge/releases)
|
|
46
46
|
of the same name. Docker images and the npm package are published in
|
|
47
47
|
lockstep on each `v*` tag.
|
|
48
48
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* pi-forge postinstall: ensure node-pty's prebuilt `spawn-helper`
|
|
4
|
+
* binaries are executable.
|
|
5
|
+
*
|
|
6
|
+
* The bug: `node-pty` ships prebuilt native binaries at
|
|
7
|
+
* `node_modules/node-pty/prebuilds/<platform>/spawn-helper`
|
|
8
|
+
* The tarball's mode bits don't always survive npm's tar extract —
|
|
9
|
+
* fresh installs frequently land `spawn-helper` at `0644` with no
|
|
10
|
+
* exec bit. When pi-forge later spawns a PTY, `posix_spawnp` fails
|
|
11
|
+
* with the unhelpful "spawn EACCES" or "posix_spawnp failed."
|
|
12
|
+
*
|
|
13
|
+
* `node-pty`'s own postinstall script handles the from-source-built
|
|
14
|
+
* path (`build/Release/`) but NOT the prebuilt path (`prebuilds/`),
|
|
15
|
+
* so the bug ships on every npm-published install of pi-forge.
|
|
16
|
+
*
|
|
17
|
+
* Why this script lives in pi-forge and not upstream: the upstream
|
|
18
|
+
* fix would need to land in node-pty itself. Until then, every
|
|
19
|
+
* package that depends on node-pty needs its own postinstall to
|
|
20
|
+
* cover the gap. We pay one trivial chmod per install in exchange
|
|
21
|
+
* for the integrated terminal actually working.
|
|
22
|
+
*
|
|
23
|
+
* Idempotent: chmod +x on something already +x is a no-op.
|
|
24
|
+
* Failure-tolerant: missing node-pty (e.g. `--omit=optional`),
|
|
25
|
+
* missing prebuilds dir (unusual platform), or chmod failure
|
|
26
|
+
* (read-only mount, EPERM) all warn instead of failing the install.
|
|
27
|
+
*/
|
|
28
|
+
import { chmodSync, existsSync, readdirSync, statSync } from "node:fs";
|
|
29
|
+
import { dirname, join } from "node:path";
|
|
30
|
+
import { createRequire } from "node:module";
|
|
31
|
+
|
|
32
|
+
const require = createRequire(import.meta.url);
|
|
33
|
+
|
|
34
|
+
let nodePtyDir;
|
|
35
|
+
try {
|
|
36
|
+
nodePtyDir = dirname(require.resolve("node-pty/package.json"));
|
|
37
|
+
} catch {
|
|
38
|
+
// node-pty not installed — no-op.
|
|
39
|
+
process.exit(0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const prebuildsDir = join(nodePtyDir, "prebuilds");
|
|
43
|
+
if (!existsSync(prebuildsDir)) process.exit(0);
|
|
44
|
+
|
|
45
|
+
let fixed = 0;
|
|
46
|
+
for (const platform of readdirSync(prebuildsDir)) {
|
|
47
|
+
const helper = join(prebuildsDir, platform, "spawn-helper");
|
|
48
|
+
if (!existsSync(helper)) continue;
|
|
49
|
+
try {
|
|
50
|
+
const mode = statSync(helper).mode;
|
|
51
|
+
// 0o111 = any-x bits. If even one is set, assume the file is
|
|
52
|
+
// already runnable.
|
|
53
|
+
if ((mode & 0o111) !== 0) continue;
|
|
54
|
+
chmodSync(helper, mode | 0o755);
|
|
55
|
+
fixed++;
|
|
56
|
+
} catch (err) {
|
|
57
|
+
console.warn(
|
|
58
|
+
`[pi-forge postinstall] could not chmod ${helper}: ${err instanceof Error ? err.message : err}`,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (fixed > 0) {
|
|
64
|
+
console.log(
|
|
65
|
+
`[pi-forge postinstall] fixed exec bit on ${fixed} node-pty spawn-helper binar${
|
|
66
|
+
fixed === 1 ? "y" : "ies"
|
|
67
|
+
}`,
|
|
68
|
+
);
|
|
69
|
+
}
|