@fungi.computer/spore 0.2.1 → 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/dist/fungi.cjs CHANGED
@@ -49,16 +49,22 @@ if (!supported) {
49
49
  process.exit(1);
50
50
  }
51
51
  const nativePackage = `@fungi.computer/spore-native-${platform}`;
52
- let bun;
53
- try {
54
- require.resolve(`${nativePackage}/bin/fungi-apply-patch`);
55
- bun = require.resolve(runtimes[platform]);
56
- } catch (cause) {
57
- throw new Error(
58
- "Fungi CLI could not load its native dependencies. Reinstall with npm install -g @fungi.computer/spore --include=optional.",
59
- { cause },
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
70
  // Bun otherwise loads the project's bunfig.toml preload and .env into this
@@ -72,6 +78,7 @@ const child = spawnSync(
72
78
  ...process.env,
73
79
  FUNGI_BUNDLED_CLI: cli,
74
80
  FUNGI_BUNDLED_BUILD_ID: buildId,
81
+ FUNGI_SPORE_VERSION: sporeVersion,
75
82
  FUNGI_LAUNCHER: __filename,
76
83
  FUNGI_LAUNCHER_NODE: process.execPath,
77
84
  },
@@ -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 Git hooks/config,
7
- ; not all of .git. Denials carry fungi-safe for diagnostic correlation.
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.2.1",
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.2.1",
36
- "@fungi.computer/spore-native-linux-arm64": "0.2.1",
37
- "@fungi.computer/spore-native-darwin-arm64": "0.2.1",
38
- "@fungi.computer/spore-native-darwin-x64": "0.2.1",
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",