@bo-agent/sandbox-local 0.0.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/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # @bo-agent/sandbox-local
2
+
3
+ Local implementation of the [`@bo-agent/sandbox`](../sandbox/) seam. Selects and caches one platform runner: Linux prefers a working `bwrap` then Landlock; macOS uses Seatbelt (`sandbox-exec`); Windows uses the ACL restricted-token runner. Multiple candidates are probed in order; a sole candidate is selected directly.
4
+
5
+ The package root exports the default and named `LocalSandboxProvider` plugin and `Config`; platform profile builders stay internal.
6
+
7
+ ## Fail-closed
8
+
9
+ Unsupported platforms and unusable runners fail closed with `SANDBOX_UNAVAILABLE`; execution never silently falls through unconfined. Each wrap carries structured runner-failure rules so consumers can distinguish a broken sandbox from a command failure.
10
+
11
+ Policy is per call; the provider stores only the mechanism and cached runner verdict. Each wrap reports enforcement completeness plus backend-specific denial signatures and runner-failure rules.
12
+
13
+ ## Backend specifics
14
+
15
+ - **Bubblewrap / Seatbelt**: signature-only — neither public contract reserves a launcher-failure status, so the runner's child exit remains ordinary.
16
+ - **Landlock**: requires exit 125 and a `landlock-run:` fatal line after excluding only the exact partial-enforcement notice; a notice with child exit 1, 2, or 125 remains a child outcome.
17
+ - **Windows ACL**: keeps one deterministic write SID and standing ACE per workspace, but gives every live session/workspace pair a random private temp directory with a distinct SID and revocable ACE. A workspace equal to or containing the platform temp root fails before any ACL mutation because its inheritable workspace ACE would otherwise reach every private temp child.
18
+
19
+ Consumers spawn the returned argv directly, so a missing or unexecutable runner is an out-of-band spawn failure while a successfully launched child exit 126 or 127 remains ordinary.
20
+
21
+ ## Vendored launcher
22
+
23
+ [`@bo-agent/node-addon-landlock-run`](../../vendor/landlock-run/) supplies the Landlock platform launcher, functional probe, and CLI argument vocabulary. This provider owns only mode-to-grant mapping and runner selection. Keeping path resolution and probe parsing with the versioned binary prevents contract drift.
24
+
25
+ ## Known limitations
26
+
27
+ - **Windows ACL enforcement is partial** — the restricted token must retain Everyone for process initialization, so external objects granting Everyone write access remain writable; NTFS hard links also alias one file object across workspace and external paths. Reported as `enforcement: 'partial'` rather than overstating that boundary as full.
28
+ - **Landlock may be partial** — older supported kernel ABIs confine only the access classes they expose, reported as `enforcement: 'partial'`.
29
+ - **Seatbelt depends on deprecated `sandbox-exec`** — macOS still ships it, but this provider cannot replace or probe that private policy engine if Apple removes it.
30
+ - **Runner selection is cached for the provider lifetime** — installing, removing, or repairing a runner requires reloading the plugin before selection changes.
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.full.d.ts","../../../vendor/landlock-run/lib/index.d.ts","../../../node_modules/.pnpm/cosmokit@1.8.1/node_modules/cosmokit/lib/index.d.ts","../../../node_modules/.pnpm/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/utils.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/registry.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/reflect.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/fiber.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/events.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/logger.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/context.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/service.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/index.d.ts","../../../node_modules/.pnpm/schemastery@3.18.0/node_modules/schemastery/lib/index.d.ts","../../inline/lib/harness-error.d.ts","../../inline/lib/assert-never.d.ts","../../inline/lib/session-id.d.ts","../../inline/lib/index.d.ts","../../sandbox/lib/escalation.d.ts","../../sandbox/lib/roots.d.ts","../../sandbox/lib/index.d.ts","../../../node_modules/.pnpm/koffi@3.2.1/node_modules/koffi/index.d.ts","../../sandbox-windows-acl/lib/ffi.d.ts","../../sandbox-windows-acl/lib/spawn.d.ts","../../sandbox-windows-acl/lib/grant.d.ts","../../sandbox-windows-acl/lib/path-boundary.d.ts","../../sandbox-windows-acl/lib/workspace-sid.d.ts","../../sandbox-windows-acl/lib/errors.d.ts","../../sandbox-windows-acl/lib/index.d.ts","../src/profiles.ts","../src/index.ts","../src/invariant.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/index.d.ts"],"fileIdsList":[[112,161,178,179],[112,158,159,161,178,179],[112,160,161,178,179],[161,178,179],[112,161,166,178,179,196],[112,161,162,167,172,178,179,181,193,204],[112,161,162,163,172,178,179,181],[107,108,109,112,161,178,179],[112,161,164,178,179,205],[112,161,165,166,173,178,179,182],[112,161,166,178,179,193,201],[112,161,167,169,172,178,179,181],[112,160,161,168,178,179],[112,161,169,170,178,179],[112,161,171,172,178,179],[112,160,161,172,178,179],[112,161,172,173,174,178,179,193,204],[112,161,172,173,174,178,179,188,193,196],[112,153,161,169,172,175,178,179,181,193,204],[112,161,172,173,175,176,178,179,181,193,201,204],[112,161,175,177,178,179,193,201,204],[110,111,112,113,114,115,116,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210],[112,161,172,178,179],[112,161,178,179,180,204],[112,161,169,172,178,179,181,193],[112,161,178,179,182],[112,161,178,179,183],[112,160,161,178,179,184],[112,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210],[112,161,178,179,186],[112,161,178,179,187],[112,161,172,178,179,188,189],[112,161,178,179,188,190,205,207],[112,161,173,178,179],[112,161,172,178,179,193,194,196],[112,161,178,179,195,196],[112,161,178,179,193,194],[112,161,178,179,196],[112,161,178,179,197],[112,158,161,178,179,193,198,204],[112,161,172,178,179,199,200],[112,161,178,179,199,200],[112,161,166,178,179,181,193,201],[112,161,178,179,202],[112,161,178,179,181,203],[112,161,175,178,179,187,204],[112,161,166,178,179,205],[112,161,178,179,193,206],[112,161,178,179,180,207],[112,161,178,179,208],[112,153,161,178,179],[112,153,161,172,174,178,179,184,193,196,204,206,207,209],[112,161,178,179,193,210],[77,79,80,81,82,83,84,112,161,178,179],[77,80,81,82,83,84,85,112,161,178,179],[77,78,79,80,81,82,83,84,85,112,161,178,179],[79,80,81,82,83,84,85,86,112,161,178,179],[79,80,81,82,83,84,85,112,161,178,179],[87,95,112,161,178,179],[77,78,112,161,178,179],[112,125,129,161,178,179,204],[112,125,161,178,179,193,204],[112,120,161,178,179],[112,122,125,161,178,179,201,204],[112,161,178,179,181,201],[112,161,178,179,211],[112,120,161,178,179,211],[112,122,125,161,178,179,181,204],[112,117,118,121,124,161,172,178,179,193,204],[112,125,132,161,178,179],[112,117,123,161,178,179],[112,125,146,147,161,178,179],[112,121,125,161,178,179,196,204,211],[112,146,161,178,179,211],[112,119,120,161,178,179,211],[112,125,161,178,179],[112,119,120,121,122,123,124,125,126,127,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,147,148,149,150,151,152,161,178,179],[112,125,140,161,178,179],[112,125,132,133,161,178,179],[112,123,125,133,134,161,178,179],[112,124,161,178,179],[112,117,120,125,161,178,179],[112,125,129,133,134,161,178,179],[112,129,161,178,179],[112,123,125,128,161,178,179,204],[112,117,122,125,132,161,178,179],[112,161,178,179,193],[112,120,125,146,161,178,179,209,211],[89,90,91,112,161,178,179],[76,87,88,92,95,103,104,112,161,162,173,178,179,182,183,204],[76,95,112,161,178,179],[96,112,161,178,179],[97,112,161,178,179],[98,99,100,101,102,112,161,178,179],[95,112,161,178,179],[87,92,93,94,95,112,161,178,179]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3e9cef4eed59f8a2249ed834ba4aabe9d0d4e9037d4679487fa17dad99004a3","impliedFormat":1},"747f4ebe8bd5c0eb7fa4f2492f580ede9a4d32b4a610d10c0354a9151564cdd8",{"version":"0e7086243656ce24ba7dfe15a8d8e3cd4310afa6cbddb97dd06d5dc399794676","impliedFormat":99},{"version":"bdd14f07b4eca0b4b5203b85b8dbc4d084c749fa590bee5ea613e1641dcd3b29","impliedFormat":99},{"version":"1f9b9bc4eb18864e8c1628ecd0630442eb857e7b77322559a9a00004f1e39d80","impliedFormat":99},{"version":"598ee676b4645a043e7c4198d53221dd8c44bc628b12776efd8bc6fabd804ced","impliedFormat":99},{"version":"3de8c258acd8647678a8c96db4cee1151a16bc18626028a9c7b33b6bdd037db9","impliedFormat":99},{"version":"b7f6288c956d50a63f4d14610f39df7f7b1e9d481413a0e95c82c37179448ddc","impliedFormat":99},{"version":"18930b7045a527847a039cf29af8927c8079414527707396672ed3cd706fc399","impliedFormat":99},{"version":"7395b909d9b5c754cf8af3937a7ac783bd82eeea31c42a35a02bbcfb5db945a4","impliedFormat":99},{"version":"3a0bf69f6275288de8b20cc353c1e0e6c6d61644789ddec51b526d0d5166acc1","impliedFormat":99},{"version":"6adf2288c91294fe0c68828187e96820b0620fe5d78f79ccbff06d230d9b0c8e","impliedFormat":99},{"version":"8cc48b522565f226e5bdb0f6a4d4b1bcdc8f82ac72c32fd869831a96f583b3cc","impliedFormat":99},{"version":"d84b05b596aafd7be8867d29ff85e02cb690888a1f8aaa85afe5d5f01862efd8","affectsGlobalScope":true,"impliedFormat":1},"3207040072c5856d33d3f2f039436dc39a81b1dea1577702ff9b7d705bf2ceb5","8176d2ff27e0d895260bb1f1b3e094ab521819e7536c79bad057f6c475f00ee6","70b6cdce0800a89493f582f239c4cc49f4dba7e5b0e674f651d039476333fca0","e0ecc9ceeb052adc8590f8e527e58d572ae564f7b90a407295e4846b9bdb7b8a","eab4d0f1a497f676581d205a6019850414d7aac01f9ae05e8320d250d7409cf3","eb85ac6e1d061fa97b89e2cf810253e688a0f008a71bfd3a720f05788966d932","10f45007344ec6e7bd7384ab49b8b72feafcdc9df3d20d040ac058b0514f5a1b",{"version":"b4f749b16500797d1f0e9ed0f04e08e1b162cfbaf48e3efbacee8f27182b4ad1","impliedFormat":99},"ea06a43414e727e635a61d87a117c2a3a086869b911b78bd38d3830c042ed162","3f1bc0c48c0601694ff480d5160992355fd989557f121b30e27eb60e2eb77f3d","952f8bc7fe35a291be5883f15c3b4ccbbe7b41c077461e2d587df563b102950c","599a509f3547eb349b35c6761a639493eaa3095e39fde8cdee2ee2264c06f457","63e8e0876f60c128e25ef0f08ea7cd60327b197297039f903ac7e4efb38b47e6","a12f2c28fcf2c4702df1f423d87d18dd70f4553a07f86a05d73b9a5ced1e4b5d","f18c705ec1dc13d09c68cec1be3329bee7c602c7d6f7f3ee62575647f58e12cf",{"version":"9a73fc4f91d184ba575a609f630d4c167205d75e18bb85a3ef29a736aec5154f","signature":"8e72503eba91199ffea9061f7223a4c6061336e103a77a5612f39eb193a5771c"},{"version":"ad229d7dfc30f9be832fc5edd3df4d302b56becdcfcc7e35b8b289e94602ca05","signature":"9f6f00d0b651c063919d4148bf6e4f8118b2ff2ec65e9a4cc01985d22251be35"},{"version":"b0f5c6e9500b2d0bbd4e71dd797add5fe9bf753bcf40a041a27af1cf9e11d211","signature":"601fb95ab43f9ae583d91a551287e0e922e938f9a9b560ae136efd7c1f6acfdd"},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d97fb21da858fb18b8ae72c314e9743fd52f73ebe2764e12af1db32fc03f853f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"78dbea00e90d2df8ea3dbef0cc379d95b8be9b71cd6bde4c28728f306811803b","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e1e46d0a9837ee058c100501080c920fa98081ea3956af0374308ba6f22a33e","impliedFormat":1},{"version":"272ca407e0c9068bdc5152552d876e68037ceae3de62e529306403e973dec8e1","impliedFormat":1},{"version":"fa7834c715d5357e4540cee40ce96c3250ddb67a7b879a6b7fa0e86d6696f121","impliedFormat":1},{"version":"22dfb07a7ab15b66ac043829056fe70124844636ae719551812ac631ba04985b","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"0cb167c371eaa8c869f8a7656a7296f2e4fae43b4d8b803a680236b24794e5f9","impliedFormat":1},{"version":"0a839dba0287cc0481ad4beedd48a1c64acf1e212ae865d1315f7007ca215161","impliedFormat":1},{"version":"38dc4655376cd1a4bd6bb3763d92949233e33d38d3dd3cbea7bbf218175a38ef","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"208a6a0bfb227bdf8fb964799d0a206c75cf03ccd72e63bf5495c9331354c6d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"48a679952eefe4cb776d5a0e1ccba2d3eb53b57448bbb7abc1fcebcbd5440188","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2d14da6ecb49bf828d83948765ec2d3a579d476bbb9645e749610baa6ec880ca","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"0aef708fb4c7a6b915e8305cbfac40cd207b032dbaabe9a01889a5fff3254681","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"ad9bdafb4e7abf14cc53ce7970486a84c87831e62891e5dfe798ddcd55e84701","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"71d3ae6a5e73ca4130762560425e00984ebaff64d5353a3333d1bb7eb86ef336","impliedFormat":1}],"root":[[104,106]],"options":{"allowImportingTsExtensions":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","rewriteRelativeImportExtensions":true,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":11,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":false},"referencedMap":[[78,1],[158,2],[159,2],[160,3],[112,4],[161,5],[162,6],[163,7],[107,1],[110,8],[108,1],[109,1],[164,9],[165,10],[166,11],[167,12],[168,13],[169,14],[170,14],[171,15],[172,16],[173,17],[174,18],[113,1],[111,1],[175,19],[176,20],[177,21],[211,22],[178,23],[179,1],[180,24],[181,25],[182,26],[183,27],[184,28],[185,29],[186,30],[187,31],[188,32],[189,32],[190,33],[191,1],[192,34],[193,35],[195,36],[194,37],[196,38],[197,39],[198,40],[199,41],[200,42],[201,43],[202,44],[203,45],[204,46],[205,47],[206,48],[207,49],[208,50],[114,1],[115,1],[116,1],[154,51],[155,1],[156,1],[157,38],[209,52],[210,53],[85,54],[83,55],[82,56],[87,57],[84,58],[81,55],[80,56],[86,58],[79,59],[77,1],[96,1],[88,60],[73,1],[74,1],[14,1],[12,1],[13,1],[18,1],[17,1],[2,1],[19,1],[20,1],[21,1],[22,1],[23,1],[24,1],[25,1],[26,1],[3,1],[27,1],[28,1],[4,1],[29,1],[33,1],[30,1],[31,1],[32,1],[34,1],[35,1],[36,1],[5,1],[37,1],[38,1],[39,1],[40,1],[6,1],[44,1],[41,1],[42,1],[43,1],[45,1],[7,1],[46,1],[51,1],[52,1],[47,1],[48,1],[49,1],[50,1],[8,1],[56,1],[53,1],[54,1],[55,1],[57,1],[9,1],[58,1],[59,1],[60,1],[62,1],[61,1],[63,1],[64,1],[10,1],[65,1],[66,1],[67,1],[11,1],[75,1],[68,1],[69,1],[70,1],[71,1],[72,1],[1,1],[16,1],[15,1],[132,61],[142,62],[131,61],[152,63],[123,64],[122,65],[151,66],[145,67],[150,68],[125,69],[139,70],[124,71],[148,72],[120,73],[119,66],[149,74],[121,75],[126,76],[127,1],[130,76],[117,1],[153,77],[143,78],[134,79],[135,80],[137,81],[133,82],[136,83],[146,66],[128,84],[129,85],[138,86],[118,87],[141,78],[140,76],[144,1],[147,88],[90,1],[89,1],[92,89],[91,1],[105,90],[106,1],[104,91],[102,1],[97,92],[99,93],[103,94],[100,1],[98,93],[101,1],[93,95],[95,96],[94,95],[76,1]],"latestChangedDtsFile":"./profiles.d.ts","version":"5.9.3"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Local sandbox backend. It selects the platform runner chain (Linux bwrap then
3
+ * Landlock; macOS Seatbelt; Windows the ACL restricted-token runner), functionally probes
4
+ * competing candidates once, and reports each wrap's enforcement and stderr
5
+ * classification facts. Missing or unusable confinement fails closed rather
6
+ * than returning the original argv.
7
+ *
8
+ * The windows-acl rung additionally owns the write grants: the write SID is
9
+ * the per-WORKSPACE identity derived from the canonical workspace path
10
+ * (`workspaceWriteSid`), while every live session receives a RANDOM private
11
+ * temp directory and its own derived capability (`tempWriteSid`). The
12
+ * workspace-root ACE materializes once per workspace per server lifetime
13
+ * and STANDS (the cross-session reuse cache — the exact-ACE skip makes
14
+ * every later provision O(1) instead of re-propagating the tree per
15
+ * session); the private-temp ACEs are revoked on dispose. The runner
16
+ * receives both SIDs (their presence marks the seam-managed contract) and
17
+ * stops managing DACLs itself. The rung reports partial enforcement because
18
+ * WRITE_RESTRICTED must retain Everyone in its
19
+ * restricting list and NTFS hard links alias one file object across paths.
20
+ * @module @bo-agent/sandbox-local
21
+ */
22
+ import { Context } from 'cordis';
23
+ import z from 'schemastery';
24
+ import { SandboxProvider } from '@bo-agent/sandbox';
25
+ import type { ConfinedArgv, SandboxEnforcement, SandboxPolicy } from '@bo-agent/sandbox';
26
+ /** Plugin config. All optional — `static Config` supplies the defaults. */
27
+ export interface Config {
28
+ /**
29
+ * Override the runner argv; bwrap-compatible profile arguments are appended. A
30
+ * non-empty override asserts full enforcement and skips built-in selection and
31
+ * probing. A runner that starts but refuses its profile must be identifiable by
32
+ * {@link runnerFailureSignatures}. Consumers classify a spawn rejection only after
33
+ * confirming the workdir is usable. `ENOENT` or `EACCES` identifies the runner when
34
+ * `error.path` equals argv[0] and `error.syscall` is `spawn` or `spawn <runner>`, or
35
+ * when `error.path` is absent and `error.syscall` is exactly `spawn <runner>`.
36
+ */
37
+ runnerCommand?: string[];
38
+ /**
39
+ * Case-insensitive stderr substrings emitted when a configured
40
+ * {@link runnerCommand} refuses its profile before executing the wrapped
41
+ * command. Required and non-empty with `runnerCommand`; rejected without
42
+ * it. Each entry is a non-empty, single-line, case-insensitive substring
43
+ * covering the executable runner's own failure dialect.
44
+ */
45
+ runnerFailureSignatures?: string[];
46
+ /** Positive timeout for each functional probe; zero would mean unbounded to Node. */
47
+ probeTimeoutMs?: number;
48
+ }
49
+ /** Test hook: inject probe verdicts / a fake launcher / a platform without real runners. */
50
+ export interface SandboxInternals {
51
+ /** Replaces `process.platform` for chain selection (exercise any platform's chain from any host). */
52
+ platform?: string;
53
+ /** Replaces the platform's chain wholesale (walk mechanics — e.g. probing a rung the product chains only reach unprobed). */
54
+ chain?: readonly SelectedRunner['runner'][];
55
+ /** Replaces the functional `bwrap` probe (the Linux chain's first rung). */
56
+ probeBwrap?: () => boolean;
57
+ /** Replaces the functional Landlock launcher probe (the Linux chain's second rung). */
58
+ probeLandlock?: (launcher: string) => SandboxEnforcement | 'unusable';
59
+ /** Replaces the functional Seatbelt probe (the darwin chain's sole rung — only consulted if that chain ever grows). */
60
+ probeSeatbelt?: (seatbeltExec: string) => boolean;
61
+ /** Replaces the resolved `landlock-run` launcher path (a fake launcher script). */
62
+ landlockLauncher?: string;
63
+ /** Replaces the `sandbox-exec` executable the probe and wraps invoke (a fake script). */
64
+ seatbeltExec?: string;
65
+ /** Replaces the resolved windows-acl runner argv prefix (a fake runner). */
66
+ windowsAclRunnerArgs?: string[];
67
+ /** Replaces the resolved windows-acl runner built entry path (a fake lib/runner.js location). */
68
+ windowsAclRunnerEntry?: string;
69
+ /** Replaces the functional windows-acl probe (the win32 chain's sole rung — only consulted if that chain ever grows). */
70
+ probeWindowsAcl?: () => boolean;
71
+ /** Replaces the private-temp-directory removal at provider dispose (a throwing fake exercises the cleanup-failure path). */
72
+ rmTempDir?: (path: string) => void;
73
+ }
74
+ /** The chain's verdict: which runner confines, and how completely it enforces. */
75
+ type SelectedRunner = {
76
+ runner: 'bwrap' | 'landlock' | 'seatbelt' | 'windows-acl';
77
+ enforcement: SandboxEnforcement;
78
+ };
79
+ /**
80
+ * Local process-sandbox provider. Registers as `ctx.sandbox`. Caches the
81
+ * chain verdict and, on the windows-acl rung, the write grants
82
+ * ({@link AclWriteGrant}: the standing workspace-root grant per workspace
83
+ * and the revocable private-temp grant per live session/workspace pair, the
84
+ * latter revoked on provider dispose); the one-time probes spawn nothing
85
+ * else.
86
+ */
87
+ export declare class LocalSandboxProvider extends SandboxProvider {
88
+ static Config: z<Config>;
89
+ /** Test hook (mirrors the bash executors' `internals`). */
90
+ internals: SandboxInternals;
91
+ private readonly runnerCommand;
92
+ private readonly configuredRunnerFailureSignatures;
93
+ private readonly probeTimeoutMs;
94
+ /** Cached chain verdict; undefined until the first confined wrap needs it. */
95
+ private selectedRunner;
96
+ /**
97
+ * Server-lifetime write grants (windows-acl rung): the STANDING
98
+ * workspace-root grant per workspace (its ACE is the cross-session reuse
99
+ * cache and outlives the provider — never revoked) and the REVOCABLE
100
+ * private-temp grant per live session/workspace pair (revoked on provider
101
+ * dispose).
102
+ */
103
+ private readonly workspaceGrants;
104
+ private readonly tempCapabilities;
105
+ constructor(ctx: Context, config: Config);
106
+ /**
107
+ * Wrap `argv` in the selected runner's invocation for `policy` — the configured
108
+ * `runnerCommand` when present (the operator's assertion, no probe), else the platform
109
+ * chain's runner speaking its own profile dialect.
110
+ *
111
+ * @param argv - the exact argv the caller is about to spawn.
112
+ * @param policy - the file-effect policy this execution runs under.
113
+ * @returns the wrapped argv plus the selected backend's enforcement completeness, denial
114
+ * signatures, and structured runner-failure rules; throws the fail-closed
115
+ * `SANDBOX_UNAVAILABLE` error when the platform has no usable runner.
116
+ */
117
+ confine(argv: readonly string[], policy: SandboxPolicy): ConfinedArgv;
118
+ /** The selected rung's runner invocation (program + profile arguments) for one policy. */
119
+ private runnerArgv;
120
+ /**
121
+ * The windows-acl runner argv for one policy. With a calling session (the
122
+ * policy's `sessionId`) under workspace-write, the grants are materialized
123
+ * once per provider lifetime — the standing workspace-root grant per
124
+ * workspace and a revocable, RANDOM private-temp capability per live
125
+ * session/workspace pair. The runner receives `--write-sid` plus
126
+ * `--temp-write-sid` and grants nothing itself. Agentless workspace-write
127
+ * calls pass the ambient temp ROOT and no SID flags: the runner creates and
128
+ * removes a random private child directory for that one invocation.
129
+ * @param policy - the resolved per-call policy.
130
+ * @returns the runner invocation.
131
+ */
132
+ private windowsAclRunnerArgv;
133
+ /**
134
+ * Materialize one workspace-write policy's ACEs once per provider
135
+ * lifetime. The workspace SID and standing root grant are shared by the
136
+ * workspace. The temp directory is random and carries a distinct SID, so
137
+ * another session on the same workspace cannot use the shared workspace
138
+ * SID to enter it. A fresh provider always chooses a new path; crash
139
+ * residue therefore cannot collide with or authorize a resumed session.
140
+ * Fail-closed: a half-materialized temp grant is revoked and its directory
141
+ * removed before the error propagates.
142
+ * @param sessionId - the policy's calling-session identity.
143
+ * @param workspaceRoot - the resolved policy root.
144
+ * @returns the pair's private temp directory and write capability.
145
+ */
146
+ private materializeAclGrant;
147
+ /**
148
+ * Dispose every write grant (provider dispose): the revocable temp ACEs
149
+ * are revoked, the private temp directories this provider created are
150
+ * removed, and every SID allocation is freed; the standing workspace ACEs
151
+ * stay (the reuse cache). Cleanup failures are reported, not thrown:
152
+ * cordis teardown must not be aborted by grant cleanup. A crash skips all
153
+ * of it, but a new provider never reuses the residue's random path or SID;
154
+ * OS temp hygiene (or manual removal) eventually reclaims it.
155
+ */
156
+ private revokeAclGrants;
157
+ /** Remove one provider-owned private temp directory (injectable for cleanup tests). */
158
+ private removeTempDir;
159
+ /**
160
+ * Resolve which runner confines commands, once, for the provider's
161
+ * lifetime: this platform's chain ({@link PLATFORM_CHAINS}), its sole
162
+ * candidate selected directly, multiple candidates arbitrated by
163
+ * functional probes in chain order. Fail closed when the platform has no
164
+ * chain or no candidate passes — the command never runs.
165
+ */
166
+ private selectRunner;
167
+ /** Walk this platform's chain: sole candidate unprobed, several probed in order, none usable → unavailable. */
168
+ private chainVerdict;
169
+ /** One rung's functional probe (each at most once, via the chain walk). */
170
+ private probeRunner;
171
+ /** The Landlock launcher to probe and exec (test hook over the resolved one). */
172
+ private landlockLauncher;
173
+ /** The `sandbox-exec` executable to probe and exec (test hook over the system one). */
174
+ private seatbeltExec;
175
+ /**
176
+ * The windows-acl runner argv prefix: the built lib/runner.js entry when
177
+ * present (production), else the package source through tsx (development).
178
+ * The prefix stays `[node, runner, ...]` — a future native-exe runner keeps
179
+ * the same argv contract and only swaps these entries.
180
+ */
181
+ private windowsAclRunnerInvocation;
182
+ }
183
+ export default LocalSandboxProvider;
184
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAaH,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,CAAC,MAAM,aAAa,CAAA;AAE3B,OAAO,EAAE,eAAe,EAA2B,MAAM,mBAAmB,CAAA;AAC5E,OAAO,KAAK,EAAE,YAAY,EAA0C,kBAAkB,EAAE,aAAa,EA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vD,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAItB;IAEF,2DAA2D;IAC3D,SAAS,EAAE,gBAAgB,CAAK;IAEhC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAsB;IACpD,OAAO,CAAC,QAAQ,CAAC,iCAAiC,CAAU;IAC5D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAQ;IACvC,8EAA8E;IAC9E,OAAO,CAAC,cAAc,CAA4C;IAClE;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAmC;IACnE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAuC;gBAE5D,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM;IA6BxC;;;;;;;;;;OAUG;IACH,OAAO,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,aAAa,GAAG,YAAY;IAmBrE,0FAA0F;IAC1F,OAAO,CAAC,UAAU;IAUlB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,oBAAoB;IAqB5B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,mBAAmB;IAqD3B;;;;;;;;OAQG;IACH,OAAO,CAAC,eAAe;IAyBvB,uFAAuF;IACvF,OAAO,CAAC,aAAa;IAKrB;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAMpB,+GAA+G;IAC/G,OAAO,CAAC,YAAY;IAapB,2EAA2E;IAC3E,OAAO,CAAC,WAAW;IA4BnB,iFAAiF;IACjF,OAAO,CAAC,gBAAgB;IAIxB,uFAAuF;IACvF,OAAO,CAAC,YAAY;IAIpB;;;;;OAKG;IACH,OAAO,CAAC,0BAA0B;CAQnC;AAED,eAAe,oBAAoB,CAAA"}
package/lib/index.js ADDED
@@ -0,0 +1,490 @@
1
+ /**
2
+ * Local sandbox backend. It selects the platform runner chain (Linux bwrap then
3
+ * Landlock; macOS Seatbelt; Windows the ACL restricted-token runner), functionally probes
4
+ * competing candidates once, and reports each wrap's enforcement and stderr
5
+ * classification facts. Missing or unusable confinement fails closed rather
6
+ * than returning the original argv.
7
+ *
8
+ * The windows-acl rung additionally owns the write grants: the write SID is
9
+ * the per-WORKSPACE identity derived from the canonical workspace path
10
+ * (`workspaceWriteSid`), while every live session receives a RANDOM private
11
+ * temp directory and its own derived capability (`tempWriteSid`). The
12
+ * workspace-root ACE materializes once per workspace per server lifetime
13
+ * and STANDS (the cross-session reuse cache — the exact-ACE skip makes
14
+ * every later provision O(1) instead of re-propagating the tree per
15
+ * session); the private-temp ACEs are revoked on dispose. The runner
16
+ * receives both SIDs (their presence marks the seam-managed contract) and
17
+ * stops managing DACLs itself. The rung reports partial enforcement because
18
+ * WRITE_RESTRICTED must retain Everyone in its
19
+ * restricting list and NTFS hard links alias one file object across paths.
20
+ * @module @bo-agent/sandbox-local
21
+ */
22
+ import { spawnSync } from 'node:child_process';
23
+ import { existsSync, mkdtempSync, rmSync } from 'node:fs';
24
+ import { tmpdir } from 'node:os';
25
+ import { join } from 'node:path';
26
+ import { fileURLToPath } from 'node:url';
27
+ import { LAUNCHER_BIN, LAUNCHER_FAILURE_EXIT, launcherPath as landlockLauncherPath, probe as defaultProbeLandlock, } from '@bo-agent/node-addon-landlock-run';
28
+ import z from 'schemastery';
29
+ import { assertNever } from '@bo-agent/inline';
30
+ import { SandboxProvider, SandboxUnavailableError } from '@bo-agent/sandbox';
31
+ import { AclWriteGrant, assertTempRootOutsideWorkspace, tempWriteSid, workspaceWriteSid } from '@bo-agent/sandbox-windows-acl';
32
+ import { bwrapProfileArgs, landlockProfileArgs, seatbeltProfileArgs } from "./profiles.js";
33
+ /** Probe whether `bwrap` can create the profile; the provider caches the bounded result. */
34
+ function defaultProbeBwrap(timeoutMs) {
35
+ const probe = spawnSync('bwrap', ['--ro-bind', '/', '/', '--dev', '/dev', '--proc', '/proc', '--die-with-parent', '--', 'true'], {
36
+ timeout: timeoutMs,
37
+ stdio: 'ignore',
38
+ });
39
+ return probe.status === 0;
40
+ }
41
+ /**
42
+ * Functional Seatbelt probe: apply the real `read-only` profile through
43
+ * `sandbox-exec -p` and run `true` under it — exit 0 means the kernel
44
+ * accepted and enforced the profile (`sandbox-exec` exits non-zero when
45
+ * `sandbox_init` refuses it). A missing `sandbox-exec` (every non-macOS
46
+ * host) fails the spawn and probes `unusable`, exactly like the other
47
+ * rungs' absent binaries. Apple marks the CLI deprecated but ships it on
48
+ * every macOS; if it ever disappears, this probe is what fails closed.
49
+ */
50
+ function defaultProbeSeatbelt(seatbeltExec, timeoutMs) {
51
+ const probe = spawnSync(seatbeltExec, [...seatbeltProfileArgs({ mode: 'read-only', workspaceRoot: '/' }), '--', 'true'], {
52
+ timeout: timeoutMs,
53
+ stdio: 'ignore',
54
+ });
55
+ return probe.status === 0;
56
+ }
57
+ /**
58
+ * Functional windows-acl probe: run the runner in read-only mode (zero grants,
59
+ * no ACL mutation) around `cmd /c exit 0` — exit 0 means the runner created
60
+ * the restricted token and spawned the child under it. The win32 chain is a
61
+ * sole candidate, so the product never probes; the probe exists for override
62
+ * chains and mirrors the other rungs' shape.
63
+ */
64
+ function defaultProbeWindowsAcl(runnerInvocation, timeoutMs) {
65
+ const program = runnerInvocation[0];
66
+ if (program === undefined)
67
+ return false;
68
+ const probe = spawnSync(program, [
69
+ ...runnerInvocation.slice(1),
70
+ '--workspace', tmpdir(), '--temp', tmpdir(), '--mode', 'read-only',
71
+ '--', 'cmd', '/c', 'exit', '0',
72
+ ], {
73
+ timeout: timeoutMs,
74
+ stdio: 'ignore',
75
+ });
76
+ return probe.status === 0;
77
+ }
78
+ /**
79
+ * The runner chain per platform — selection is BY PLATFORM first, probes
80
+ * second: a platform's chain is probed in preference order only when it has
81
+ * MORE than one candidate (probing arbitrates; it does not re-validate a
82
+ * choice that has no alternative). A platform with no chain fails closed at
83
+ * `confine()`. Linux prefers `bwrap` (its mount profile is closest to the
84
+ * mode vocabulary) over the Landlock launcher; darwin has exactly one
85
+ * candidate, selected without any probe.
86
+ */
87
+ const PLATFORM_CHAINS = {
88
+ linux: ['bwrap', 'landlock'],
89
+ darwin: ['seatbelt'],
90
+ // The Windows restricted-token runner (@bo-agent/sandbox-windows-acl):
91
+ // a sole candidate, selected without a probe — its execution-time refusal
92
+ // fails closed through its stderr signature (windows-acl-run:) and exit 127.
93
+ win32: ['windows-acl'],
94
+ };
95
+ /**
96
+ * Enforcement completeness a rung claims when selected WITHOUT a probe (a
97
+ * chain of one). `bwrap` and Seatbelt govern every promised file effect by
98
+ * construction, so the claim is a profile fact; `landlock` is listed for the
99
+ * table's totality but is unreachable unprobed today (the Linux chain has
100
+ * two rungs, so it is only ever selected through its probe, whose report is
101
+ * what distinguishes full from per-ABI-partial — and the launcher additionally
102
+ * self-reports partial enforcement on stderr at every confined run).
103
+ */
104
+ const STATIC_ENFORCEMENT = {
105
+ bwrap: 'full',
106
+ landlock: 'full',
107
+ seatbelt: 'full',
108
+ // WRITE_RESTRICTED needs Everyone in both restricting lists for process
109
+ // initialization. An external object that grants Everyone write access
110
+ // therefore remains writable, and NTFS hard links can alias a granted
111
+ // workspace file to a path outside it. The backend enforces the remaining
112
+ // ACL-addressable surface but must not advertise the absolute promise.
113
+ 'windows-acl': 'partial',
114
+ };
115
+ /**
116
+ * A probe bound must be a positive finite number: Node treats
117
+ * `spawnSync({ timeout: 0 })` as NO timeout, so an unvalidated 0 would
118
+ * silently mean "unbounded" — the opposite of what the field promises.
119
+ */
120
+ function assertPositiveFinite(name, value) {
121
+ if (!Number.isFinite(value) || value <= 0) {
122
+ throw new Error(`sandbox-local: ${name} must be a positive finite number`);
123
+ }
124
+ }
125
+ /**
126
+ * The denial dialect each runner's kernel speaks — the case-insensitive stderr substrings a
127
+ * denied file effect produces under it, carried on every wrap (the seam's
128
+ * `ConfinedArgv.denialSignatures`).
129
+ */
130
+ const DENIAL_SIGNATURES = {
131
+ bwrap: ['read-only file system'],
132
+ landlock: ['permission denied'],
133
+ seatbelt: ['operation not permitted'],
134
+ // pwsh/.NET: "Access to the path '...' is denied."; cmd: "Access is denied.";
135
+ // node EACCES: "permission denied".
136
+ 'windows-acl': ['access is denied', 'access to the path', 'permission denied'],
137
+ runnerCommand: ['read-only file system', 'permission denied'],
138
+ };
139
+ /** The windows-acl runner's documented failure exit (its own RUNNER_FAILURE_EXIT contract, distinct from Landlock's 125). */
140
+ const WINDOWS_ACL_RUNNER_FAILURE_EXIT = 127;
141
+ /**
142
+ * Runner-owned fatal diagnostics. Landlock has a versioned exit-125 plus
143
+ * fatal-line launcher-failure contract. Bubblewrap's current fatal paths exit
144
+ * 1 but its public contract does not reserve that status, while sandbox-exec
145
+ * publishes no launcher-failure status; those backends remain signature-only.
146
+ * The windows-acl runner prints `windows-acl-run: <detail>` on every
147
+ * runner-side failure and exits 127 — the rule is exit-gated on that status
148
+ * so a confined command that merely PRINTS the signature (or a runner
149
+ * cleanup failure reported on a non-zero child exit) is never misclassified
150
+ * as "the command did not run". Keep the Landlock tuple aligned with the
151
+ * assembled snapshot fixture at
152
+ * `examples/acp-agent/tests/fixtures/partial-landlock-sandbox.ts`.
153
+ */
154
+ const RUNNER_FAILURE_RULES = {
155
+ bwrap: [{ fatalSignatures: ['bwrap: '] }],
156
+ landlock: [{
157
+ allowedExitCodes: [LAUNCHER_FAILURE_EXIT],
158
+ fatalSignatures: [`${LAUNCHER_BIN}: `],
159
+ informationalLines: [`${LAUNCHER_BIN}: partial enforcement (older Landlock ABI)`],
160
+ }],
161
+ seatbelt: [{ fatalSignatures: ['sandbox-exec: '] }],
162
+ 'windows-acl': [{ allowedExitCodes: [WINDOWS_ACL_RUNNER_FAILURE_EXIT], fatalSignatures: ['windows-acl-run: '] }],
163
+ };
164
+ /**
165
+ * Local process-sandbox provider. Registers as `ctx.sandbox`. Caches the
166
+ * chain verdict and, on the windows-acl rung, the write grants
167
+ * ({@link AclWriteGrant}: the standing workspace-root grant per workspace
168
+ * and the revocable private-temp grant per live session/workspace pair, the
169
+ * latter revoked on provider dispose); the one-time probes spawn nothing
170
+ * else.
171
+ */
172
+ export class LocalSandboxProvider extends SandboxProvider {
173
+ // Inline schema call: the config catalog walks `static Config` statically.
174
+ static Config = z.object({
175
+ runnerCommand: z.array(z.string()).default([]),
176
+ runnerFailureSignatures: z.array(z.string()).default([]),
177
+ probeTimeoutMs: z.natural().default(5_000),
178
+ });
179
+ /** Test hook (mirrors the bash executors' `internals`). */
180
+ internals = {};
181
+ runnerCommand;
182
+ configuredRunnerFailureSignatures;
183
+ probeTimeoutMs;
184
+ /** Cached chain verdict; undefined until the first confined wrap needs it. */
185
+ selectedRunner;
186
+ /**
187
+ * Server-lifetime write grants (windows-acl rung): the STANDING
188
+ * workspace-root grant per workspace (its ACE is the cross-session reuse
189
+ * cache and outlives the provider — never revoked) and the REVOCABLE
190
+ * private-temp grant per live session/workspace pair (revoked on provider
191
+ * dispose).
192
+ */
193
+ workspaceGrants = new Map();
194
+ tempCapabilities = new Map();
195
+ constructor(ctx, config) {
196
+ super(ctx);
197
+ // The schema (static Config) defaults every field — the casts record
198
+ // those runtime facts. An empty runnerCommand means "not configured":
199
+ // use the platform chain.
200
+ const runner = config.runnerCommand;
201
+ const runnerFailureSignatures = config.runnerFailureSignatures;
202
+ if (runner.length === 0 && runnerFailureSignatures.length > 0) {
203
+ throw new Error('sandbox-local: runnerFailureSignatures requires runnerCommand');
204
+ }
205
+ if (runner.length > 0 && runnerFailureSignatures.length === 0) {
206
+ throw new Error('sandbox-local: runnerCommand requires at least one runnerFailureSignatures entry');
207
+ }
208
+ if (runnerFailureSignatures.some(signature => signature.trim().length === 0 || /[\r\n]/u.test(signature))) {
209
+ throw new Error('sandbox-local: runnerFailureSignatures entries must be non-empty single-line strings');
210
+ }
211
+ this.runnerCommand = runner.length > 0 ? runner : undefined;
212
+ this.configuredRunnerFailureSignatures = runnerFailureSignatures;
213
+ this.probeTimeoutMs = config.probeTimeoutMs;
214
+ assertPositiveFinite('probeTimeoutMs', this.probeTimeoutMs);
215
+ // The temp grants are revoked with the provider: a clean server
216
+ // shutdown leaves no temp ACEs behind (workspace ACEs stand by design —
217
+ // the reuse cache; an unclean shutdown leaves them for the next
218
+ // provision's exact-ACE skip).
219
+ ctx.effect(() => () => {
220
+ this.revokeAclGrants();
221
+ });
222
+ }
223
+ /**
224
+ * Wrap `argv` in the selected runner's invocation for `policy` — the configured
225
+ * `runnerCommand` when present (the operator's assertion, no probe), else the platform
226
+ * chain's runner speaking its own profile dialect.
227
+ *
228
+ * @param argv - the exact argv the caller is about to spawn.
229
+ * @param policy - the file-effect policy this execution runs under.
230
+ * @returns the wrapped argv plus the selected backend's enforcement completeness, denial
231
+ * signatures, and structured runner-failure rules; throws the fail-closed
232
+ * `SANDBOX_UNAVAILABLE` error when the platform has no usable runner.
233
+ */
234
+ confine(argv, policy) {
235
+ if (this.runnerCommand !== undefined) {
236
+ return {
237
+ argv: [...this.runnerCommand, ...bwrapProfileArgs(policy), '--', ...argv],
238
+ enforcement: 'full',
239
+ denialSignatures: DENIAL_SIGNATURES.runnerCommand,
240
+ runnerFailureRules: [{ fatalSignatures: this.configuredRunnerFailureSignatures }],
241
+ };
242
+ }
243
+ const selected = this.selectRunner(policy.mode);
244
+ const runnerArgv = this.runnerArgv(selected.runner, policy);
245
+ return {
246
+ argv: [...runnerArgv, '--', ...argv],
247
+ enforcement: selected.enforcement,
248
+ denialSignatures: DENIAL_SIGNATURES[selected.runner],
249
+ runnerFailureRules: RUNNER_FAILURE_RULES[selected.runner],
250
+ };
251
+ }
252
+ /** The selected rung's runner invocation (program + profile arguments) for one policy. */
253
+ runnerArgv(runner, policy) {
254
+ switch (runner) {
255
+ case 'bwrap': return ['bwrap', ...bwrapProfileArgs(policy)];
256
+ case 'landlock': return [this.landlockLauncher(), ...landlockProfileArgs(policy)];
257
+ case 'seatbelt': return [this.seatbeltExec(), ...seatbeltProfileArgs(policy)];
258
+ case 'windows-acl': return this.windowsAclRunnerArgv(policy);
259
+ default: return assertNever(runner);
260
+ }
261
+ }
262
+ /**
263
+ * The windows-acl runner argv for one policy. With a calling session (the
264
+ * policy's `sessionId`) under workspace-write, the grants are materialized
265
+ * once per provider lifetime — the standing workspace-root grant per
266
+ * workspace and a revocable, RANDOM private-temp capability per live
267
+ * session/workspace pair. The runner receives `--write-sid` plus
268
+ * `--temp-write-sid` and grants nothing itself. Agentless workspace-write
269
+ * calls pass the ambient temp ROOT and no SID flags: the runner creates and
270
+ * removes a random private child directory for that one invocation.
271
+ * @param policy - the resolved per-call policy.
272
+ * @returns the runner invocation.
273
+ */
274
+ windowsAclRunnerArgv(policy) {
275
+ const sessionId = policy.sessionId;
276
+ if (sessionId === undefined || policy.mode === 'read-only') {
277
+ return [
278
+ ...this.windowsAclRunnerInvocation(),
279
+ '--workspace', policy.workspaceRoot,
280
+ '--temp', tmpdir(),
281
+ '--mode', policy.mode,
282
+ ];
283
+ }
284
+ const temp = this.materializeAclGrant(sessionId, policy.workspaceRoot);
285
+ return [
286
+ ...this.windowsAclRunnerInvocation(),
287
+ '--workspace', policy.workspaceRoot,
288
+ '--temp', temp.dir,
289
+ '--mode', policy.mode,
290
+ '--write-sid', workspaceWriteSid(policy.workspaceRoot),
291
+ '--temp-write-sid', temp.writeSid,
292
+ ];
293
+ }
294
+ /**
295
+ * Materialize one workspace-write policy's ACEs once per provider
296
+ * lifetime. The workspace SID and standing root grant are shared by the
297
+ * workspace. The temp directory is random and carries a distinct SID, so
298
+ * another session on the same workspace cannot use the shared workspace
299
+ * SID to enter it. A fresh provider always chooses a new path; crash
300
+ * residue therefore cannot collide with or authorize a resumed session.
301
+ * Fail-closed: a half-materialized temp grant is revoked and its directory
302
+ * removed before the error propagates.
303
+ * @param sessionId - the policy's calling-session identity.
304
+ * @param workspaceRoot - the resolved policy root.
305
+ * @returns the pair's private temp directory and write capability.
306
+ */
307
+ materializeAclGrant(sessionId, workspaceRoot) {
308
+ assertTempRootOutsideWorkspace(workspaceRoot, tmpdir());
309
+ const writeSid = workspaceWriteSid(workspaceRoot);
310
+ if (!this.workspaceGrants.has(workspaceRoot)) {
311
+ const grant = AclWriteGrant.create(writeSid);
312
+ try {
313
+ grant.add(workspaceRoot, true);
314
+ }
315
+ catch (error) {
316
+ // Free the SID; a standing ACE (if the apply succeeded before a
317
+ // post-apply throw) is the intended end state, not an error
318
+ // artifact — nothing to revoke.
319
+ try {
320
+ grant.dispose();
321
+ }
322
+ catch (cleanupError) {
323
+ throw new AggregateError([error, cleanupError], 'sandbox-local windows-acl workspace grant failed and its cleanup also failed');
324
+ }
325
+ throw error;
326
+ }
327
+ this.workspaceGrants.set(workspaceRoot, grant);
328
+ }
329
+ const key = JSON.stringify([String(sessionId), workspaceRoot]);
330
+ const existing = this.tempCapabilities.get(key);
331
+ if (existing !== undefined)
332
+ return existing;
333
+ const tempDir = mkdtempSync(join(tmpdir(), 'dsh-'));
334
+ const tempSid = tempWriteSid(tempDir);
335
+ let grant;
336
+ try {
337
+ grant = AclWriteGrant.create(tempSid);
338
+ grant.add(tempDir);
339
+ }
340
+ catch (error) {
341
+ const cleanupFailures = [];
342
+ if (grant !== undefined) {
343
+ try {
344
+ grant.dispose();
345
+ }
346
+ catch (cleanupError) {
347
+ cleanupFailures.push(cleanupError);
348
+ }
349
+ }
350
+ try {
351
+ this.removeTempDir(tempDir);
352
+ }
353
+ catch (cleanupError) {
354
+ cleanupFailures.push(cleanupError);
355
+ }
356
+ if (cleanupFailures.length > 0) {
357
+ throw new AggregateError([error, ...cleanupFailures], 'sandbox-local windows-acl temp grant materialization failed and its cleanup also failed');
358
+ }
359
+ throw error;
360
+ }
361
+ const capability = { dir: tempDir, writeSid: tempSid, grant };
362
+ this.tempCapabilities.set(key, capability);
363
+ return capability;
364
+ }
365
+ /**
366
+ * Dispose every write grant (provider dispose): the revocable temp ACEs
367
+ * are revoked, the private temp directories this provider created are
368
+ * removed, and every SID allocation is freed; the standing workspace ACEs
369
+ * stay (the reuse cache). Cleanup failures are reported, not thrown:
370
+ * cordis teardown must not be aborted by grant cleanup. A crash skips all
371
+ * of it, but a new provider never reuses the residue's random path or SID;
372
+ * OS temp hygiene (or manual removal) eventually reclaims it.
373
+ */
374
+ revokeAclGrants() {
375
+ if (this.workspaceGrants.size === 0 && this.tempCapabilities.size === 0)
376
+ return;
377
+ const failures = [];
378
+ for (const grant of [...this.workspaceGrants.values(), ...[...this.tempCapabilities.values()].map(capability => capability.grant)]) {
379
+ try {
380
+ grant.dispose();
381
+ }
382
+ catch (error) {
383
+ failures.push(error);
384
+ }
385
+ }
386
+ for (const { dir } of this.tempCapabilities.values()) {
387
+ try {
388
+ this.removeTempDir(dir);
389
+ }
390
+ catch (error) {
391
+ failures.push(error);
392
+ }
393
+ }
394
+ this.workspaceGrants.clear();
395
+ this.tempCapabilities.clear();
396
+ if (failures.length > 0) {
397
+ this.ctx.logger.warn(`sandbox-local: windows-acl grant cleanup completed with ${failures.length} failure(s)`);
398
+ for (const error of failures)
399
+ this.ctx.logger.warn(error);
400
+ }
401
+ }
402
+ /** Remove one provider-owned private temp directory (injectable for cleanup tests). */
403
+ removeTempDir(dir) {
404
+ const remove = this.internals.rmTempDir ?? ((path) => { rmSync(path, { recursive: true, force: true }); });
405
+ remove(dir);
406
+ }
407
+ /**
408
+ * Resolve which runner confines commands, once, for the provider's
409
+ * lifetime: this platform's chain ({@link PLATFORM_CHAINS}), its sole
410
+ * candidate selected directly, multiple candidates arbitrated by
411
+ * functional probes in chain order. Fail closed when the platform has no
412
+ * chain or no candidate passes — the command never runs.
413
+ */
414
+ selectRunner(mode) {
415
+ this.selectedRunner ??= this.chainVerdict();
416
+ if (this.selectedRunner === 'unavailable')
417
+ throw new SandboxUnavailableError(mode);
418
+ return this.selectedRunner;
419
+ }
420
+ /** Walk this platform's chain: sole candidate unprobed, several probed in order, none usable → unavailable. */
421
+ chainVerdict() {
422
+ const chain = this.internals.chain ?? PLATFORM_CHAINS[this.internals.platform ?? process.platform] ?? [];
423
+ const [first, ...rest] = chain;
424
+ if (first === undefined)
425
+ return 'unavailable';
426
+ // A sole candidate needs no arbitration; its execution-time refusal still fails closed.
427
+ if (rest.length === 0)
428
+ return { runner: first, enforcement: STATIC_ENFORCEMENT[first] };
429
+ for (const runner of chain) {
430
+ const enforcement = this.probeRunner(runner);
431
+ if (enforcement !== 'unusable')
432
+ return { runner, enforcement };
433
+ }
434
+ return 'unavailable';
435
+ }
436
+ /** One rung's functional probe (each at most once, via the chain walk). */
437
+ probeRunner(runner) {
438
+ // bwrap's mount profile and Seatbelt's deny-file-write* profile govern
439
+ // every promised file effect by construction, so their passing probes
440
+ // are always full enforcement; the Landlock launcher's probe report
441
+ // distinguishes full from per-ABI-partial, while windows-acl is always
442
+ // partial for its documented Everyone and hard-link boundaries.
443
+ switch (runner) {
444
+ case 'bwrap': {
445
+ const probe = this.internals.probeBwrap ?? (() => defaultProbeBwrap(this.probeTimeoutMs));
446
+ return probe() ? 'full' : 'unusable';
447
+ }
448
+ case 'landlock': {
449
+ const probe = this.internals.probeLandlock ?? (launcher => defaultProbeLandlock(launcher, { timeoutMs: this.probeTimeoutMs }));
450
+ return probe(this.landlockLauncher());
451
+ }
452
+ case 'seatbelt': {
453
+ const probe = this.internals.probeSeatbelt ?? (exec => defaultProbeSeatbelt(exec, this.probeTimeoutMs));
454
+ return probe(this.seatbeltExec()) ? 'full' : 'unusable';
455
+ }
456
+ case 'windows-acl': {
457
+ const probe = this.internals.probeWindowsAcl
458
+ ?? (() => defaultProbeWindowsAcl(this.windowsAclRunnerInvocation(), this.probeTimeoutMs));
459
+ return probe() ? 'partial' : 'unusable';
460
+ }
461
+ default: return assertNever(runner);
462
+ }
463
+ }
464
+ /** The Landlock launcher to probe and exec (test hook over the resolved one). */
465
+ landlockLauncher() {
466
+ return this.internals.landlockLauncher ?? landlockLauncherPath();
467
+ }
468
+ /** The `sandbox-exec` executable to probe and exec (test hook over the system one). */
469
+ seatbeltExec() {
470
+ return this.internals.seatbeltExec ?? 'sandbox-exec';
471
+ }
472
+ /**
473
+ * The windows-acl runner argv prefix: the built lib/runner.js entry when
474
+ * present (production), else the package source through tsx (development).
475
+ * The prefix stays `[node, runner, ...]` — a future native-exe runner keeps
476
+ * the same argv contract and only swaps these entries.
477
+ */
478
+ windowsAclRunnerInvocation() {
479
+ const override = this.internals.windowsAclRunnerArgs;
480
+ if (override !== undefined)
481
+ return override;
482
+ const builtEntry = this.internals.windowsAclRunnerEntry ?? fileURLToPath(import.meta.resolve('@bo-agent/sandbox-windows-acl/runner'));
483
+ if (existsSync(builtEntry))
484
+ return [process.execPath, builtEntry];
485
+ const sourceEntry = fileURLToPath(import.meta.resolve('@bo-agent/sandbox-windows-acl/src/runner.ts'));
486
+ return [process.execPath, '--import', 'tsx/esm', sourceEntry];
487
+ }
488
+ }
489
+ export default LocalSandboxProvider;
490
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,YAAY,IAAI,oBAAoB,EACpC,KAAK,IAAI,oBAAoB,GAC9B,MAAM,mCAAmC,CAAA;AAE1C,OAAO,CAAC,MAAM,aAAa,CAAA;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAG5E,OAAO,EAAE,aAAa,EAAE,8BAA8B,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAC9H,OAAO,EAAE,gBAAgB,EAAE,mB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,sCAAsC,CAAC,CAAC,CAAA;QACrI,IAAI,UAAU,CAAC,UAAU,CAAC;YAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAA;QACjE,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,6CAA6C,CAAC,CAAC,CAAA;QACrG,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,CAAC,CAAA;IAC/D,CAAC;;AAGH,eAAe,oBAAoB,CAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Package-owned invariant companion stub.
3
+ *
4
+ * This product does not enforce runtime invariants; the public contract
5
+ * exposed here is a structural declaration (`name`, `inject`, `apply`)
6
+ * rather than runtime behavior. The companion slots into a Cordis context
7
+ * without doing anything, so consumers that wire it up see the same surface
8
+ * shape regardless of whether invariants are turned on.
9
+ *
10
+ * @module @bo-agent/sandbox-local/invariant
11
+ */
12
+ export declare const name = "sandbox-local-invariant";
13
+ export declare const inject: string[];
14
+ export declare const apply: () => Promise<() => void>;
15
+ //# sourceMappingURL=invariant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invariant.d.ts","sourceRoot":"","sources":["../src/invariant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,eAAO,MAAM,IAAI,4BAA4B,CAAA;AAC7C,eAAO,MAAM,MAAM,EAAE,MAAM,EAAO,CAAA;AAClC,eAAO,MAAM,KAAK,QAAa,OAAO,CAAC,MAAM,IAAI,CAAa,CAAA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Package-owned invariant companion stub.
3
+ *
4
+ * This product does not enforce runtime invariants; the public contract
5
+ * exposed here is a structural declaration (`name`, `inject`, `apply`)
6
+ * rather than runtime behavior. The companion slots into a Cordis context
7
+ * without doing anything, so consumers that wire it up see the same surface
8
+ * shape regardless of whether invariants are turned on.
9
+ *
10
+ * @module @bo-agent/sandbox-local/invariant
11
+ */
12
+ /* eslint-disable @typescript-eslint/no-unused-vars */
13
+ export const name = 'sandbox-local-invariant';
14
+ export const inject = [];
15
+ export const apply = async () => () => { };
16
+ /* eslint-enable @typescript-eslint/no-unused-vars */
17
+ //# sourceMappingURL=invariant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invariant.js","sourceRoot":"","sources":["../src/invariant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,sDAAsD;AACtD,MAAM,CAAC,MAAM,IAAI,GAAG,yBAAyB,CAAA;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAa,EAAE,CAAA;AAClC,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,IAAyB,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC,CAAA;AAC9D,qDAAqD"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Internal platform-profile builders for the local sandbox provider.
3
+ *
4
+ * @module @bo-agent/sandbox-local/profiles
5
+ */
6
+ import type { SandboxPolicy } from '@bo-agent/sandbox';
7
+ /**
8
+ * Build the bwrap profile arguments for one file-effect policy.
9
+ * @param policy - file-effect policy to express as bwrap mounts.
10
+ * @returns profile arguments before the trailing separator and command argv.
11
+ */
12
+ export declare function bwrapProfileArgs(policy: SandboxPolicy): string[];
13
+ /**
14
+ * Build the Landlock launcher grants for one file-effect policy.
15
+ * @param policy - file-effect policy to express as Landlock allow-list grants.
16
+ * @returns launcher grant arguments before the trailing separator and command argv.
17
+ */
18
+ export declare function landlockProfileArgs(policy: SandboxPolicy): string[];
19
+ /**
20
+ * Build the sandbox-exec arguments and SBPL profile for one policy. The
21
+ * writable roots come from the shared {@link writableRoots} helper (canonical,
22
+ * deduplicated) so the Seatbelt grant and any in-process fs fence stay in
23
+ * lockstep on the same allow-list.
24
+ * @param policy - file-effect policy to express as an SBPL profile.
25
+ * @returns sandbox-exec arguments before the trailing separator and command argv.
26
+ */
27
+ export declare function seatbeltProfileArgs(policy: SandboxPolicy): string[];
28
+ //# sourceMappingURL=profiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../src/profiles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEtD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,EAAE,CAOhE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,EAAE,CAMnE;AAOD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,EAAE,CAOnE"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Internal platform-profile builders for the local sandbox provider.
3
+ *
4
+ * @module @bo-agent/sandbox-local/profiles
5
+ */
6
+ import { grantArgs as landlockGrantArgs } from '@bo-agent/node-addon-landlock-run';
7
+ import { writableRoots } from '@bo-agent/sandbox';
8
+ /**
9
+ * Build the bwrap profile arguments for one file-effect policy.
10
+ * @param policy - file-effect policy to express as bwrap mounts.
11
+ * @returns profile arguments before the trailing separator and command argv.
12
+ */
13
+ export function bwrapProfileArgs(policy) {
14
+ const args = ['--ro-bind', '/', '/', '--dev', '/dev', '--proc', '/proc', '--die-with-parent'];
15
+ if (policy.mode === 'workspace-write') {
16
+ args.push('--tmpfs', '/tmp');
17
+ args.push('--bind', policy.workspaceRoot, policy.workspaceRoot);
18
+ }
19
+ return args;
20
+ }
21
+ /**
22
+ * Build the Landlock launcher grants for one file-effect policy.
23
+ * @param policy - file-effect policy to express as Landlock allow-list grants.
24
+ * @returns launcher grant arguments before the trailing separator and command argv.
25
+ */
26
+ export function landlockProfileArgs(policy) {
27
+ const readWrite = ['/dev/null'];
28
+ if (policy.mode === 'workspace-write') {
29
+ readWrite.push('/tmp', policy.workspaceRoot);
30
+ }
31
+ return landlockGrantArgs({ readOnly: ['/'], readWrite });
32
+ }
33
+ /** Quote one path as an SBPL string literal. */
34
+ function sbplString(path) {
35
+ return `"${path.replaceAll('\\', String.raw `\\`).replaceAll('"', String.raw `\"`)}"`;
36
+ }
37
+ /**
38
+ * Build the sandbox-exec arguments and SBPL profile for one policy. The
39
+ * writable roots come from the shared {@link writableRoots} helper (canonical,
40
+ * deduplicated) so the Seatbelt grant and any in-process fs fence stay in
41
+ * lockstep on the same allow-list.
42
+ * @param policy - file-effect policy to express as an SBPL profile.
43
+ * @returns sandbox-exec arguments before the trailing separator and command argv.
44
+ */
45
+ export function seatbeltProfileArgs(policy) {
46
+ const forms = ['(version 1)', '(allow default)', '(deny file-write*)', `(allow file-write* (literal ${sbplString('/dev/null')}))`];
47
+ const roots = writableRoots(policy);
48
+ if (roots.length > 0) {
49
+ forms.push(`(allow file-write* ${roots.map(root => `(subpath ${sbplString(root)})`).join(' ')})`);
50
+ }
51
+ return ['-p', forms.join(' ')];
52
+ }
53
+ //# sourceMappingURL=profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../src/profiles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,IAAI,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAGjD;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAqB;IACpD,MAAM,IAAI,GAAG,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAA;IAC7F,IAAI,MAAM,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;QAC5B,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,aAAa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1
+ {
2
+ "name": "@bo-agent/sandbox-local",
3
+ "description": "Local process-sandbox backends for the standalone sandbox product: bwrap, the npm-distributed landlock-run launcher, macOS Seatbelt, or the Windows ACL restricted-token runner — functionally probed, fail-closed",
4
+ "version": "0.0.1",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "types": "lib/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "files": [
16
+ "lib/"
17
+ ],
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "license": "MIT",
22
+ "dependencies": {
23
+ "cordis": "^4.0.0-rc.10",
24
+ "schemastery": "^3.18.0",
25
+ "@bo-agent/sandbox-windows-acl": "0.0.1",
26
+ "@bo-agent/sandbox": "0.0.1",
27
+ "@bo-agent/inline": "0.0.1",
28
+ "@bo-agent/node-addon-landlock-run": "0.0.1"
29
+ },
30
+ "peerDependencies": {
31
+ "cordis": "^4.0.0-rc.10",
32
+ "schemastery": "^3.18.0",
33
+ "@bo-agent/inline": "0.0.1",
34
+ "@bo-agent/sandbox": "0.0.1"
35
+ }
36
+ }