@fungi.computer/truffle 0.4.0 → 0.6.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/README.md +27 -4
- package/dist/internal/private-workerd-sandbox-worker.mjs +243 -273
- package/dist/internal/sandbox-metafile.json +35 -30
- package/dist/local-board-agents.d.ts +46 -0
- package/dist/local-board-agents.js +138 -0
- package/dist/local-board-shipping.d.ts +129 -0
- package/dist/local-board-shipping.js +325 -0
- package/dist/local-extensions.d.ts +4 -2
- package/dist/local-extensions.js +56 -22
- package/dist/local-login.js +33 -25
- package/dist/private-fungi-mcp-connection.js +6 -1
- package/dist/private-invocation-computer.d.ts +6 -2
- package/dist/private-invocation-computer.js +20 -13
- package/dist/private-local-agent-control.d.ts +5 -1
- package/dist/private-local-agent-control.js +11 -1
- package/dist/private-local-auth-rpc.d.ts +5 -0
- package/dist/private-local-auth-rpc.js +46 -4
- package/dist/private-local-client-version.js +3 -1
- package/dist/private-local-computer-processes.d.ts +7 -2
- package/dist/private-local-computer-processes.js +47 -23
- package/dist/private-local-delegation.d.ts +18 -0
- package/dist/private-local-delegation.js +84 -26
- package/dist/private-local-exec-environment.d.ts +5 -2
- package/dist/private-local-exec-environment.js +35 -1
- package/dist/private-local-exec-review.js +14 -7
- package/dist/private-local-exec-rules.d.ts +7 -0
- package/dist/private-local-exec-rules.js +23 -6
- package/dist/private-local-extension-records.d.ts +1 -1
- package/dist/private-local-runtime-host.js +54 -27
- package/dist/private-local-sandbox-policy.js +4 -0
- package/dist/private-local-sandbox.d.ts +3 -1
- package/dist/private-local-sandbox.js +2 -2
- package/dist/private-local-schedule-client.d.ts +12 -0
- package/dist/private-local-schedule-client.js +41 -0
- package/dist/private-local-schedules.d.ts +84 -0
- package/dist/private-local-schedules.js +65 -0
- package/dist/private-local-service-contract.d.ts +4 -0
- package/dist/private-local-service-discovery.d.ts +3 -3
- package/dist/private-local-service-discovery.js +1 -1
- package/dist/private-local-service-listener.js +9 -0
- package/dist/private-local-service-owner.d.ts +130 -0
- package/dist/private-local-service-owner.js +90 -2
- package/dist/private-local-service.d.ts +3 -0
- package/dist/private-local-service.js +9 -1
- package/dist/private-local-session-discovery.d.ts +10 -4
- package/dist/private-local-session-discovery.js +37 -4
- package/dist/private-provider-rejection.d.ts +1 -1
- package/dist/private-provider-rejection.js +28 -8
- package/dist/private-sqlite-owner.d.ts +7 -1
- package/dist/private-sqlite-owner.js +14 -2
- package/package.json +29 -16
package/README.md
CHANGED
|
@@ -24,6 +24,13 @@ unit and native patch tests. They do not sign in to a provider or start a
|
|
|
24
24
|
customer Agent. Build outputs and test fixtures are disposable. Without a built
|
|
25
25
|
engine, Local offers no `apply_patch` tool.
|
|
26
26
|
|
|
27
|
+
Sandbox policy assertions run in `test:unit` without launching a sandbox: they
|
|
28
|
+
exercise the real admission and command renderer with a deterministic startup
|
|
29
|
+
probe. Native sandbox qualification lives in `test/*.native.test.ts`, selected
|
|
30
|
+
by `test:sandbox:native` through `test:merge`, with one file worker. It retains
|
|
31
|
+
the real bwrap/Seatbelt startup, Git write-refusal, child and delegation proofs;
|
|
32
|
+
`test:merge` also runs the platform sandbox matrix and native patch suite.
|
|
33
|
+
|
|
27
34
|
## Host and Session lifetime
|
|
28
35
|
|
|
29
36
|
[openPrivateLocalRuntimeHost](src/private-local-runtime-host.ts) captures the
|
|
@@ -172,7 +179,14 @@ model operation that changes Home.
|
|
|
172
179
|
interpreted by `sh -c`) and a direct form (`executable` and `args`, run with
|
|
173
180
|
no shell interpretation at all, through the same bounded native process owner
|
|
174
181
|
`runPrivateInvocationProcess`). Zod refuses a request carrying both or
|
|
175
|
-
neither.
|
|
182
|
+
neither. Both forms accept optional `env`: at most 64 string-valued entries,
|
|
183
|
+
each at most 1,024 UTF-16 code units, named `^[A-Z_][A-Z0-9_]*$`. Values are
|
|
184
|
+
passed literally, never interpolated into shell source. Host-owned names
|
|
185
|
+
(`HOME`, `PATH`, session/sandbox locators, temporary-directory and loader
|
|
186
|
+
controls such as `LD_*`/`DYLD_*`) are refused; ambient host secrets remain
|
|
187
|
+
excluded. If a host-trusted Node process ever inherits this caller-supplied
|
|
188
|
+
env, `NODE_OPTIONS` must join the refused list before that path is enabled.
|
|
189
|
+
Either form accepts optional `stdin`
|
|
176
190
|
([its own bound](src/private-local-exec-launch.ts), not borrowed from Files),
|
|
177
191
|
written to the child once, then closed; there is no interactive stdin. An
|
|
178
192
|
omitted `stdin` closes immediately rather than leaving an open pipe, so a
|
|
@@ -181,8 +195,8 @@ model operation that changes Home.
|
|
|
181
195
|
generic sandbox failure.
|
|
182
196
|
- [Background processes](src/private-local-computer-processes.ts) support start,
|
|
183
197
|
poll, wait, list and kill on the existing exec surface. `start` takes the same
|
|
184
|
-
shell-or-direct, optional-stdin input as `run`, through the
|
|
185
|
-
background process owner (`ManagedProcess`/`spawn`, not `run`'s
|
|
198
|
+
shell-or-direct, optional-stdin and bounded-env input as `run`, through the
|
|
199
|
+
existing background process owner (`ManagedProcess`/`spawn`, not `run`'s
|
|
186
200
|
`runPrivateInvocationProcess`). Wait is bounded to 60 seconds. Cancelling a
|
|
187
201
|
wait does not kill the process. Output retains a bounded tail with offsets.
|
|
188
202
|
Session deletion or owner close stops its groups. Process IDs do not survive
|
|
@@ -284,10 +298,19 @@ activations its own operations write in `~/.fungi/extensions/activations.json`.
|
|
|
284
298
|
Files in a project or an Agent store never enable anything, so a copied folder
|
|
285
299
|
starts disabled.
|
|
286
300
|
|
|
287
|
-
- `add(source)` installs a Git URL, npm spec or path with the shipped Bun
|
|
301
|
+
- `add(source, cwd)` installs a Git URL, npm spec or path with the shipped Bun
|
|
288
302
|
package manager, lifecycle scripts disabled and a private cache. A Git source
|
|
289
303
|
is pinned to the commit Bun resolved; updating is another `add`. A package
|
|
290
304
|
whose declared `./host` entry or terminal program is not built is refused.
|
|
305
|
+
Local paths resolve from the caller's `cwd`, not the private staging folder.
|
|
306
|
+
Directory sources go through Bun's `pm pack --ignore-scripts` before install:
|
|
307
|
+
their installed bytes are an isolated package snapshot, not links back into
|
|
308
|
+
the project. Updating still requires another explicit `add` and activation;
|
|
309
|
+
existing Agents keep their accepted revision and capabilities. Behaviour
|
|
310
|
+
outside the manifest, schemas and hashed config needs an extension version
|
|
311
|
+
bump, per
|
|
312
|
+
[Core's identity contract](../../wiki/3-resources/shiitake-v0.0.1/extensions.md).
|
|
313
|
+
Replacing an active extension can require a service restart.
|
|
291
314
|
- `enableProject(root, id)` turns on the extension's client entry and programs
|
|
292
315
|
for that folder, whichever Agent is selected.
|
|
293
316
|
- `enableAgent(store, id, requester?)` grants one Agent store the capabilities
|