@fungi.computer/spore 0.2.0 → 0.3.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/THIRD_PARTY_NOTICES +165 -7
- package/dist/cli.js +896 -837
- package/dist/fungi.cjs +30 -17
- package/dist/seatbelt/safe-base.sbpl +2 -2
- package/package.json +6 -5
package/dist/fungi.cjs
CHANGED
|
@@ -49,28 +49,41 @@ if (!supported) {
|
|
|
49
49
|
process.exit(1);
|
|
50
50
|
}
|
|
51
51
|
const nativePackage = `@fungi.computer/spore-native-${platform}`;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
const sporeVersion = require("../package.json").version;
|
|
53
|
+
function nativeResolution() {
|
|
54
|
+
try {
|
|
55
|
+
require.resolve(`${nativePackage}/bin/fungi-apply-patch`);
|
|
56
|
+
return { kind: "ready" };
|
|
57
|
+
} catch {
|
|
58
|
+
return { kind: "missing" };
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (nativeResolution().kind === "missing") {
|
|
62
|
+
console.error(
|
|
63
|
+
`Fungi's native package for ${platform} is missing or doesn't match this version. Reinstall: npm i -g @fungi.computer/spore@${sporeVersion}`,
|
|
60
64
|
);
|
|
65
|
+
process.exit(1);
|
|
61
66
|
}
|
|
67
|
+
const bun = require.resolve(runtimes[platform]);
|
|
62
68
|
const cli = resolve(__dirname, "cli.js");
|
|
63
69
|
const buildId = createHash("sha256").update(readFileSync(cli)).digest("hex");
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
// Bun otherwise loads the project's bunfig.toml preload and .env into this
|
|
71
|
+
// unsandboxed host process before the CLI can establish Agent authority.
|
|
72
|
+
const child = spawnSync(
|
|
73
|
+
bun,
|
|
74
|
+
["--config=/dev/null", "--no-env-file", cli, ...process.argv.slice(2)],
|
|
75
|
+
{
|
|
76
|
+
stdio: "inherit",
|
|
77
|
+
env: {
|
|
78
|
+
...process.env,
|
|
79
|
+
FUNGI_BUNDLED_CLI: cli,
|
|
80
|
+
FUNGI_BUNDLED_BUILD_ID: buildId,
|
|
81
|
+
FUNGI_SPORE_VERSION: sporeVersion,
|
|
82
|
+
FUNGI_LAUNCHER: __filename,
|
|
83
|
+
FUNGI_LAUNCHER_NODE: process.execPath,
|
|
84
|
+
},
|
|
72
85
|
},
|
|
73
|
-
|
|
86
|
+
);
|
|
74
87
|
if (child.error) throw child.error;
|
|
75
88
|
if (child.signal) process.kill(process.pid, child.signal);
|
|
76
89
|
process.exitCode = child.status ?? 1;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
; rust-v0.162.1 (7a078f6bb4).
|
|
4
4
|
; Changed by Botanical: no network fragments, PTY/device write grants, shared
|
|
5
5
|
; memory or power-management grants. Reads and parameterized folder/temp writes
|
|
6
|
-
; are composed by private-local-seatbelt.ts. Protect .fungi and
|
|
7
|
-
;
|
|
6
|
+
; are composed by private-local-seatbelt.ts. Protect .fungi and the whole
|
|
7
|
+
; existing .git administration. Denials carry fungi-safe for diagnostic correlation.
|
|
8
8
|
;
|
|
9
9
|
; inspired by Chrome's sandbox policy:
|
|
10
10
|
; https://source.chromium.org/chromium/chromium/src/+/main:sandbox/policy/mac/common.sb;l=273-319;drc=7b3962fe2e5fc9e2ee58000dc8fbf3429d84d3bd
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/spore",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Fungi local agent for terminals and ACP editors",
|
|
5
5
|
"homepage": "https://docs.fungi.computer/guides/use-fungi-in-your-editor/",
|
|
6
6
|
"bin": {
|
|
@@ -29,13 +29,14 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"miniflare": "5.20260828.0-alpha",
|
|
31
31
|
"@opentui/core": "0.5.10",
|
|
32
|
+
"@napi-rs/keyring": "2.1.2",
|
|
32
33
|
"@opencode-ai/pty": "0.3.0"
|
|
33
34
|
},
|
|
34
35
|
"optionalDependencies": {
|
|
35
|
-
"@fungi.computer/spore-native-linux-x64": "0.
|
|
36
|
-
"@fungi.computer/spore-native-linux-arm64": "0.
|
|
37
|
-
"@fungi.computer/spore-native-darwin-arm64": "0.
|
|
38
|
-
"@fungi.computer/spore-native-darwin-x64": "0.
|
|
36
|
+
"@fungi.computer/spore-native-linux-x64": "0.3.0",
|
|
37
|
+
"@fungi.computer/spore-native-linux-arm64": "0.3.0",
|
|
38
|
+
"@fungi.computer/spore-native-darwin-arm64": "0.3.0",
|
|
39
|
+
"@fungi.computer/spore-native-darwin-x64": "0.3.0",
|
|
39
40
|
"@oven/bun-darwin-x64": "1.4.2",
|
|
40
41
|
"@oven/bun-darwin-aarch64": "1.4.2",
|
|
41
42
|
"@oven/bun-linux-x64": "1.4.2",
|