@fungi.computer/truffle 0.2.2 → 0.3.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/dist/private-files-patch.js +3 -17
- package/dist/private-invocation-computer.d.ts +224 -12
- package/dist/private-invocation-computer.js +162 -22
- package/dist/private-invocation-files.d.ts +3 -2
- package/dist/private-invocation-files.js +22 -3
- package/dist/private-local-agent-control.d.ts +2 -2
- package/dist/private-local-bwrap.d.ts +9 -7
- package/dist/private-local-bwrap.js +26 -21
- package/dist/private-local-computer-processes.d.ts +15 -0
- package/dist/private-local-computer-processes.js +13 -0
- package/dist/private-local-containment.d.ts +15 -13
- package/dist/private-local-containment.js +49 -65
- package/dist/private-local-delegation.d.ts +3 -3
- package/dist/private-local-delegation.js +32 -19
- package/dist/private-local-exec-review.d.ts +12 -0
- package/dist/private-local-exec-review.js +62 -0
- package/dist/private-local-exec-rules.d.ts +16 -0
- package/dist/private-local-exec-rules.js +441 -0
- package/dist/private-local-git-exclude.js +25 -15
- package/dist/private-local-linux-sandbox.d.ts +5 -5
- package/dist/private-local-linux-sandbox.js +63 -30
- package/dist/private-local-mail.d.ts +2 -2
- package/dist/private-local-mesh-links.d.ts +4 -1
- package/dist/private-local-mesh-links.js +50 -3
- package/dist/private-local-native-digests.js +1 -1
- package/dist/private-local-native-install-error.d.ts +2 -0
- package/dist/private-local-native-install-error.js +10 -0
- package/dist/private-local-native-staging.d.ts +7 -8
- package/dist/private-local-native-staging.js +132 -43
- package/dist/private-local-permission-mode.d.ts +10 -0
- package/dist/private-local-permission-mode.js +18 -0
- package/dist/private-local-runtime-host.d.ts +28 -5
- package/dist/private-local-runtime-host.js +404 -66
- package/dist/private-local-sandbox-policy.d.ts +30 -11
- package/dist/private-local-sandbox-policy.js +223 -373
- package/dist/private-local-sandbox.d.ts +30 -25
- package/dist/private-local-sandbox.js +190 -100
- package/dist/private-local-seatbelt.d.ts +7 -13
- package/dist/private-local-seatbelt.js +55 -32
- package/dist/private-local-service-contract.d.ts +5 -4
- package/dist/private-local-service-discovery.d.ts +19 -7
- package/dist/private-local-service-discovery.js +4 -3
- package/dist/private-local-service-listener.js +40 -2
- package/dist/private-local-service-log.d.ts +18 -0
- package/dist/private-local-service-log.js +6 -0
- package/dist/private-local-service-owner.d.ts +18 -10
- package/dist/private-local-service-owner.js +119 -25
- package/dist/private-local-service.js +30 -3
- package/dist/private-local-session-discovery.d.ts +2 -1
- package/dist/private-local-session-discovery.js +18 -6
- package/dist/private-mcp-form-contract.d.ts +10 -1
- package/dist/private-mcp-form-contract.js +10 -1
- package/dist/private-mcp-form-session.d.ts +39 -3
- package/dist/private-mcp-form-session.js +28 -5
- package/dist/private-oyster-mcp-auth.d.ts +1 -1
- package/dist/private-oyster-mcp-auth.js +139 -7
- package/dist/private-provider-rejection.js +1 -1
- package/dist/seatbelt/safe-base.sbpl +2 -2
- package/native/bin/bwrap-build-source/Dockerfile +2 -0
- package/native/bin/bwrap-build-source/README.md +6 -6
- package/native/bin/bwrap-build-source/pin.mjs +2 -2
- package/native/bin/bwrap-build-source/record.mjs +12 -1
- package/native/bin/bwrap-build-source/vendor/seccomp-unix-block.c +10 -7
- package/native/bin/bwrap-build.json +3 -2
- package/native/bin/fungi-apply-patch +0 -0
- package/native/bin/fungi-seccomp-workspace.bpf +0 -0
- package/native/bin/fungi-seccomp-workspace.bpf.sha256 +1 -0
- package/package.json +23 -17
|
@@ -157,7 +157,8 @@ int main(int argc, char *argv[]) {
|
|
|
157
157
|
const char *output_file = argv[1];
|
|
158
158
|
const char *arch_name = (argc >= 3) ? argv[2] : NULL;
|
|
159
159
|
const char *rule_set = (argc == 4) ? argv[3] : "unix";
|
|
160
|
-
if (strcmp(rule_set, "unix") != 0 && strcmp(rule_set, "
|
|
160
|
+
if (strcmp(rule_set, "unix") != 0 && strcmp(rule_set, "workspace") != 0 &&
|
|
161
|
+
strcmp(rule_set, "namespaces") != 0) {
|
|
161
162
|
fprintf(stderr, "Error: Unknown rule set '%s'\n", rule_set);
|
|
162
163
|
return 1;
|
|
163
164
|
}
|
|
@@ -209,12 +210,14 @@ int main(int argc, char *argv[]) {
|
|
|
209
210
|
* int, so the kernel ignores the upper 32 bits of the register. A plain
|
|
210
211
|
* SCMP_CMP_EQ would compare all 64 bits and miss calls where the upper bits
|
|
211
212
|
* are set. */
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
213
|
+
if (strcmp(rule_set, "unix") == 0) {
|
|
214
|
+
rc = seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(socket), 1,
|
|
215
|
+
SCMP_A0(SCMP_CMP_MASKED_EQ, 0xffffffff, AF_UNIX));
|
|
216
|
+
if (rc < 0) {
|
|
217
|
+
fprintf(stderr, "Error: Failed to add seccomp rule: %s\n", strerror(-rc));
|
|
218
|
+
seccomp_release(ctx);
|
|
219
|
+
return 1;
|
|
220
|
+
}
|
|
218
221
|
}
|
|
219
222
|
|
|
220
223
|
/* Add rule to block socket(AF_VSOCK, ...) */
|
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
"repository": "https://github.com/anthropic-experimental/sandbox-runtime",
|
|
14
14
|
"revision": "38d1aee29c72035f1dba1337ac89b03a2f655d26",
|
|
15
15
|
"source": "vendor/seccomp-src/seccomp-unix-block.c",
|
|
16
|
-
"sourceSha256": "
|
|
16
|
+
"sourceSha256": "1599d24097d5e0bac5a22c6d38de98cae990eb18ee28d6be5faccf6db80dcf24",
|
|
17
17
|
"licenseSha256": "1210bc93eb85dd786c33192d5bcb7153a93922fa99fbc1512af6a7199cb41080"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"readOnlySha256": "38112f9cf994bed2ed962fae63e803c41874732ab032088b2c1ea3d713e51c11",
|
|
20
|
+
"workspaceSha256": "e46f1045f85fcf14f91fae8654bba6a0c87f57e3b92f60bfc16008dbf7dc87c8"
|
|
20
21
|
},
|
|
21
22
|
"packages": [
|
|
22
23
|
{
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e46f1045f85fcf14f91fae8654bba6a0c87f57e3b92f60bfc16008dbf7dc87c8
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/truffle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Truffle: Fungi's local Agent runtime, bundled into the fungi command",
|
|
6
6
|
"type": "module",
|
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
"./extensions": {
|
|
50
50
|
"types": "./dist/local-extensions.d.ts",
|
|
51
51
|
"import": "./dist/local-extensions.js"
|
|
52
|
+
},
|
|
53
|
+
"./rules": {
|
|
54
|
+
"types": "./dist/private-local-exec-rules.d.ts",
|
|
55
|
+
"import": "./dist/private-local-exec-rules.js"
|
|
52
56
|
}
|
|
53
57
|
},
|
|
54
58
|
"files": [
|
|
@@ -61,27 +65,29 @@
|
|
|
61
65
|
"@cf-wasm/photon": "0.4.0",
|
|
62
66
|
"@earendil-works/pi-ai": "1.3.0",
|
|
63
67
|
"@effect/platform-node": "4.0.2",
|
|
64
|
-
"@fungi.computer/agar": "0.3.
|
|
65
|
-
"@fungi.computer/approvals": "0.0
|
|
66
|
-
"@fungi.computer/bird-dog": "0.
|
|
68
|
+
"@fungi.computer/agar": "0.3.1",
|
|
69
|
+
"@fungi.computer/approvals": "0.1.0",
|
|
70
|
+
"@fungi.computer/bird-dog": "0.2.0",
|
|
67
71
|
"@fungi.computer/cairn": "0.1.0",
|
|
68
72
|
"@fungi.computer/capnweb": "0.12.0",
|
|
69
|
-
"@fungi.computer/carrier": "0.
|
|
70
|
-
"@fungi.computer/cordyceps": "0.
|
|
73
|
+
"@fungi.computer/carrier": "0.2.0",
|
|
74
|
+
"@fungi.computer/cordyceps": "0.4.0",
|
|
71
75
|
"@fungi.computer/gills": "0.2.0",
|
|
72
|
-
"@fungi.computer/graft": "0.1.
|
|
73
|
-
"@fungi.computer/knapsack": "0.
|
|
76
|
+
"@fungi.computer/graft": "0.1.2",
|
|
77
|
+
"@fungi.computer/knapsack": "0.3.0",
|
|
74
78
|
"@fungi.computer/lantern": "0.3.0",
|
|
75
|
-
"@fungi.computer/mycelium": "0.2.
|
|
76
|
-
"@fungi.computer/nacre": "0.0.
|
|
77
|
-
"@fungi.computer/seam": "0.
|
|
78
|
-
"@fungi.computer/shiitake": "0.
|
|
79
|
-
"@fungi.computer/shiitake-extensions": "0.
|
|
79
|
+
"@fungi.computer/mycelium": "0.2.2",
|
|
80
|
+
"@fungi.computer/nacre": "0.0.2",
|
|
81
|
+
"@fungi.computer/seam": "0.2.0",
|
|
82
|
+
"@fungi.computer/shiitake": "0.4.0",
|
|
83
|
+
"@fungi.computer/shiitake-extensions": "0.2.0",
|
|
80
84
|
"@fungi.computer/veil": "0.2.0",
|
|
81
85
|
"@fungi.computer/watchdog": "0.1.0",
|
|
82
86
|
"@fungi.computer/whistle": "0.1.0",
|
|
83
|
-
"@fungi.computer/zookeeper": "0.0.
|
|
87
|
+
"@fungi.computer/zookeeper": "0.0.3",
|
|
88
|
+
"@jellybrick/dbus-next": "0.11.4",
|
|
84
89
|
"@modelcontextprotocol/client": "2.0.0",
|
|
90
|
+
"@napi-rs/keyring": "2.1.2",
|
|
85
91
|
"diff": "8.0.4",
|
|
86
92
|
"effect": "4.0.2",
|
|
87
93
|
"eventsource": "5.1.1",
|
|
@@ -97,7 +103,7 @@
|
|
|
97
103
|
},
|
|
98
104
|
"devDependencies": {
|
|
99
105
|
"@cloudflare/codemode": "0.5.1",
|
|
100
|
-
"@fungi.computer/mule": "0.
|
|
106
|
+
"@fungi.computer/mule": "0.2.0",
|
|
101
107
|
"@modelcontextprotocol/server": "2.0.0",
|
|
102
108
|
"@types/node": "24.13.3",
|
|
103
109
|
"@types/proper-lockfile": "4.1.4",
|
|
@@ -148,11 +154,11 @@
|
|
|
148
154
|
"test:node": "../../node_modules/.bin/vitest run",
|
|
149
155
|
"test:bun": "pnpm run test:mesh-link && pnpm run test:bun:batch && bun test ./test/private-workerd-deadline.bun.test.ts",
|
|
150
156
|
"test:mesh-link": "bun test ./test/private-local-mesh-links.bun.test.ts",
|
|
151
|
-
"test:bun:batch": "bun test ./test/private-sqlite-approval-driver.bun.test.ts ./test/mcp-form-service.bun.test.ts ./test/private-local-service-discovery.bun.test.ts ./test/private-local-service-listener.bun.test.ts ./test/private-local-service-manager.bun.test.ts ./test/private-local-service-rebind.bun.test.ts ./test/private-local-service-stop.bun.test.ts ./test/private-local-service-ensure.bun.test.ts ./test/private-local-service-identity.bun.test.ts ./test/private-local-service-kill-resume.bun.test.ts ./test/private-local-service-idle-owners.bun.test.ts ./test/private-local-service-idle-delegation.bun.test.ts ./test/private-local-mail-retry.bun.test.ts ./test/private-local-service-log-native.bun.test.ts ./test/private-local-service-log.bun.test.ts ./test/private-local-sqlite-lifetime.bun.test.ts ./test/private-sqlite-driver.bun.test.ts ./test/private-local-reload.bun.test.ts ./test/private-local-auth-rpc.bun.test.ts ./test/private-workerd-forage.bun.test.ts ./test/local-extensions.bun.test.ts ./test/local-zookeeper-slot.bun.test.ts ./test/local-extension-skills.bun.test.ts ./test/private-local-sandbox-service.bun.test.ts",
|
|
157
|
+
"test:bun:batch": "bun test ./test/private-sqlite-approval-driver.bun.test.ts ./test/mcp-form-service.bun.test.ts ./test/private-local-service-discovery.bun.test.ts ./test/private-local-service-listener.bun.test.ts ./test/private-local-service-manager.bun.test.ts ./test/private-local-service-rebind.bun.test.ts ./test/private-local-service-stop.bun.test.ts ./test/private-local-service-ensure.bun.test.ts ./test/private-local-service-identity.bun.test.ts ./test/private-local-service-kill-resume.bun.test.ts ./test/private-local-service-idle-owners.bun.test.ts ./test/private-local-service-idle-delegation.bun.test.ts ./test/private-local-mail-retry.bun.test.ts ./test/private-local-service-log-native.bun.test.ts ./test/private-local-service-log.bun.test.ts ./test/private-local-sqlite-lifetime.bun.test.ts ./test/private-sqlite-driver.bun.test.ts ./test/private-local-reload.bun.test.ts ./test/private-local-auth-rpc.bun.test.ts ./test/private-workerd-forage.bun.test.ts ./test/local-extensions.bun.test.ts ./test/local-zookeeper-slot.bun.test.ts ./test/local-extension-skills.bun.test.ts ./test/private-local-sandbox-service.bun.test.ts ./test/private-local-native-service.bun.test.ts",
|
|
152
158
|
"build:native": "fungi-apply-patch-build --out native/bin && node scripts/build-bwrap.mjs --out native/bin && node scripts/generate-native-digests.mjs",
|
|
153
159
|
"test:patch": "node --test --test-timeout=30000 test/apply-patch.native.mjs",
|
|
154
160
|
"test:sandbox:linux": "node --import tsx test/fixtures/local-sandbox-proof.mts",
|
|
155
|
-
"test:sandbox:macos": "scratch=$(mktemp -d /tmp/fungi-seatbelt.XXXXXX) && scratch=$(cd \"$scratch\" && pwd -P) && mkdir \"$scratch/home\" && HOME=\"$scratch/home\" node --import tsx scripts/seatbelt-mac-proof.mjs \"$scratch\"",
|
|
161
|
+
"test:sandbox:macos": "scratch=$(mktemp -d /tmp/fungi-seatbelt.XXXXXX) && trap 'rm -rf \"$scratch\"' EXIT && scratch=$(cd \"$scratch\" && pwd -P) && mkdir -m 700 \"$scratch/home\" \"$scratch/runtime\" && HOME=\"$scratch/home\" XDG_CONFIG_HOME=\"$scratch/home/.config\" XDG_CACHE_HOME=\"$scratch/home/.cache\" XDG_DATA_HOME=\"$scratch/home/.local/share\" XDG_RUNTIME_DIR=\"$scratch/runtime\" node --import tsx scripts/seatbelt-mac-proof.mjs \"$scratch\"",
|
|
156
162
|
"format:check": "node ../../tooling/repository/scripts/format-package-check.mjs",
|
|
157
163
|
"lint:anti-slop": "node ../../tooling/repository/scripts/lint-package-anti-slop.mjs",
|
|
158
164
|
"test:unit": "node ../../tooling/repository/scripts/test-file-pool.mjs pnpm run test:node && pnpm run test:mesh-link && pnpm run test:bun:batch && pnpm run test:stop-all",
|