@dsh-enhanced/assistant-isolation 0.1.67 → 0.1.70

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.
Files changed (63) hide show
  1. package/README.md +39 -68
  2. package/lib/cli.d.ts +2 -4
  3. package/lib/cli.d.ts.map +1 -1
  4. package/lib/cli.js +51 -77
  5. package/lib/cli.js.map +1 -1
  6. package/lib/config.d.ts +4 -7
  7. package/lib/config.d.ts.map +1 -1
  8. package/lib/config.js +26 -40
  9. package/lib/config.js.map +1 -1
  10. package/lib/index.d.ts +3 -3
  11. package/lib/index.d.ts.map +1 -1
  12. package/lib/index.js +2 -2
  13. package/lib/index.js.map +1 -1
  14. package/lib/ledger.d.ts +2 -13
  15. package/lib/ledger.d.ts.map +1 -1
  16. package/lib/ledger.js +7 -85
  17. package/lib/ledger.js.map +1 -1
  18. package/lib/probe.d.ts +0 -3
  19. package/lib/probe.d.ts.map +1 -1
  20. package/lib/probe.js +1 -41
  21. package/lib/probe.js.map +1 -1
  22. package/lib/service.d.ts +1 -1
  23. package/lib/service.d.ts.map +1 -1
  24. package/lib/service.js +10 -90
  25. package/lib/service.js.map +1 -1
  26. package/lib/types.d.ts +4 -31
  27. package/lib/types.d.ts.map +1 -1
  28. package/lib/verifier-runner.d.ts +8 -16
  29. package/lib/verifier-runner.d.ts.map +1 -1
  30. package/lib/verifier-runner.js +9 -207
  31. package/lib/verifier-runner.js.map +1 -1
  32. package/lib/version.d.ts +1 -1
  33. package/lib/version.js +1 -1
  34. package/package.json +8 -5
  35. package/lib/cleanup-receipt.d.ts +0 -28
  36. package/lib/cleanup-receipt.d.ts.map +0 -1
  37. package/lib/cleanup-receipt.js +0 -137
  38. package/lib/cleanup-receipt.js.map +0 -1
  39. package/lib/daemon-binding.d.ts +0 -13
  40. package/lib/daemon-binding.d.ts.map +0 -1
  41. package/lib/daemon-binding.js +0 -120
  42. package/lib/daemon-binding.js.map +0 -1
  43. package/lib/docker-socket.d.ts +0 -10
  44. package/lib/docker-socket.d.ts.map +0 -1
  45. package/lib/docker-socket.js +0 -43
  46. package/lib/docker-socket.js.map +0 -1
  47. package/lib/reconcile.d.ts +0 -5
  48. package/lib/reconcile.d.ts.map +0 -1
  49. package/lib/reconcile.js +0 -31
  50. package/lib/reconcile.js.map +0 -1
  51. package/lib/runner.d.ts +0 -12
  52. package/lib/runner.d.ts.map +0 -1
  53. package/lib/runner.js +0 -227
  54. package/lib/runner.js.map +0 -1
  55. package/lib/runtime-witness.d.ts +0 -32
  56. package/lib/runtime-witness.d.ts.map +0 -1
  57. package/lib/runtime-witness.js +0 -225
  58. package/lib/runtime-witness.js.map +0 -1
  59. package/lib/state-socket-binding.d.ts +0 -4
  60. package/lib/state-socket-binding.d.ts.map +0 -1
  61. package/lib/state-socket-binding.js +0 -64
  62. package/lib/state-socket-binding.js.map +0 -1
  63. package/runtime/supervisor.mjs +0 -300
package/README.md CHANGED
@@ -12,16 +12,14 @@ lease interval plus ordinary boot time before treating readiness as a failure.
12
12
 
13
13
  `@dsh-enhanced/assistant-isolation` adds `isolation_run` to the native DSH ToolRuntime. An operator grants a finite number of offline shell jobs to one authenticated owner, workspace and agent preset. Each job receives only explicitly supplied text files in a fresh scratch directory. Results and artifacts are untrusted process output; exit code zero does not establish that a user goal was achieved.
14
14
 
15
- This is the first actual isolation component of autonomy work packages 08–10. External action/credential brokerage, rollback/compensation and installer bootstrap remain separate delivery requirements. It does not isolate arbitrary Host plugins or replace the native AgentLoop. The Host, local operator, configured runtime and kernel remain trusted; the Docker backend also trusts its daemon and image. Each workspace uses a private tmpfs volume with byte and inode hard limits. A persistent pool bounds admitted worker/workspace/keeper reservations across this ledger; it is not a machine-wide guarantee against runtime/kernel overhead or unrelated workloads. Do not treat this initial component as a complete hostile-code production platform.
15
+ This is an actual isolation component of the autonomy work. External action/credential brokerage, rollback/compensation and installer bootstrap remain separate delivery requirements. It does not isolate arbitrary Host plugins or replace the native AgentLoop. The Host, local operator, configured runtime and kernel remain trusted. The package contains no Docker dependency: Linux isolation is the native user-namespace/cgroup/seccomp backend, and macOS verification uses the seatbelt primitive. Each workspace uses a private tmpfs volume with byte and inode hard limits. A persistent pool bounds admitted worker/workspace/keeper reservations across this ledger; it is not a machine-wide guarantee against runtime/kernel overhead or unrelated workloads. Do not treat this component as a complete hostile-code production platform.
16
16
 
17
17
  ## Native Linux building blocks
18
18
 
19
19
  The Host-only `runLinuxNamespace`, `LinuxCgroupLease`, and `LinuxRuntime`
20
- exports provide Docker-free execution on non-root Linux. The public tool accepts
21
- explicit `backend: 'linux-native'` configuration; the private verifier also
22
- accepts `LinuxVerifierRunnerConfig` below. Omitting `backend` retains Docker
23
- configuration semantics. Production setup still selects its existing backend
24
- until installation and owner migration are integrated.
20
+ exports provide execution on non-root Linux. Both the public tool and the private
21
+ verifier require explicit `backend: 'linux-native'` configuration; there is
22
+ only the native backend and no implicit default.
25
23
 
26
24
  `runLinuxNamespace` uses fixed `unshare`, mount, bubblewrap and Python/libseccomp
27
25
  programs, with a shipped digest-checked syscall policy. It exposes system runtime
@@ -55,8 +53,8 @@ runtime broker or a sudo rule for a writable checkout.
55
53
  `LinuxRuntime` verification binds Node, native pnpm, frozen dependencies and
56
54
  retained store/cache to device/inode and deterministic tree hashes. It rejects
57
55
  outside links, writable contents and drift. None of these exports activates a
58
- service, reads provider credentials, accesses a browser, downloads images or
59
- runs an install lifecycle script. See the [delivery boundary](../../docs/dockerless-runtime.md)
56
+ service, reads provider credentials, accesses a browser or runs an install
57
+ lifecycle script. See the [delivery boundary](../../docs/dockerless-runtime.md)
60
58
  for remaining integration and acceptance.
61
59
 
62
60
  ### Public native execution
@@ -67,7 +65,7 @@ is the digest-pinned `LinuxRuntime` prepared by the native toolchain bootstrap;
67
65
  `cgroupRoots` identifies the current user's verified v1 controller delegation.
68
66
  The synchronous Cordis Config rejects invalid bindings and insufficient pools;
69
67
  service readiness and every newly admitted request recheck the runtime tree.
70
- This branch does not require an image or resolve a Docker socket.
68
+ This branch does not require an image, a Docker socket or a container daemon.
71
69
 
72
70
  `isolation_run` keeps its existing request, owner/Policy checks, goal artifact
73
71
  binding and cancellation contract. Inline files enter a fresh bounded workspace;
@@ -78,15 +76,15 @@ under an existing idempotency key is a conflict and never creates a new job.
78
76
 
79
77
  Startup and background recovery use each job's persisted backend. Native cleanup
80
78
  uses the original contract and private receipts; a native-configured service
81
- leaves historical Docker unknown resources occupied for their original cleanup
82
- path. Switching configuration does not extend grants or reset budgets.
79
+ keeps historical unknown resources occupied for their original cleanup
80
+ path. Configuration changes do not extend grants or reset budgets.
83
81
 
84
82
  `dsh-isolation probe-native /absolute/runtime-config.json` accepts an owned JSON
85
83
  file containing exactly `{ runtime, cgroupRoots }`. It tests pinned Node,
86
- non-root execution, a canary artifact and actual cleanup without Docker or a
87
- production grant. Unproven cleanup retains its private evidence directory.
88
- `reconcile /absolute/private/state-root` dispatches cleanup by persisted backend;
89
- Docker arguments are unused for a native-only ledger. `revoke` first persists
84
+ non-root execution, a canary artifact and actual cleanup without a production
85
+ grant. Unproven cleanup retains its private evidence directory.
86
+ `reconcile /absolute/private/state-root` reconciles native cleanup.
87
+ `revoke` first persists
90
88
  revocation and lets a live controller stop its work. For pending native jobs it
91
89
  also reports `nativeResourcesQuiescent` and `nativeRetained`; exit 2 indicates
92
90
  that cleanup is not yet confirmed. It never takes over a live controller.
@@ -117,7 +115,7 @@ incomplete initialization needs explicit reconciliation. The helper never
117
115
  renews grants, clears history or replays unknown jobs. Configurations without a
118
116
  seal retain their original behavior and have not acquired this protection.
119
117
 
120
- An authorized Docker-to-linux-native backend handover runs offline on a staged
118
+ An authorized legacy-to-linux-native backend handover runs offline on a staged
121
119
  copy of the home. `prepareLinuxVerifierHandoverState({ name, stageStateRoot,
122
120
  stageSealPath, liveStateRoot, liveSealPath })` upgrades the staging ledger to
123
121
  schema 9 and publishes the seal before the new authority digest is compiled;
@@ -125,9 +123,8 @@ schema 9 and publishes the seal before the new authority digest is compiled;
125
123
  seal still binds the copy and performs the audited grant/job rewrite without
126
124
  resealing, so a digest compiled in between stays valid across the cutover.
127
125
 
128
- `IsolatedVerifierRunner` accepts either the existing Docker configuration or an
129
- explicit `backend: 'linux-native'` configuration with a verified `LinuxRuntime`
130
- and delegated `cgroupRoots`. `LinuxVerifierRunner` is also exported directly.
126
+ `IsolatedVerifierRunner` requires a `backend: 'linux-native'` configuration with
127
+ a verified `LinuxRuntime` and delegated `cgroupRoots`; any other backend is rejected. `LinuxVerifierRunner` is also exported directly.
131
128
  The API remains `run(key, artifact, stdin, signal)` and `close()`; the fixed
132
129
  operator command receives `artifact` and `input` files in the private workspace.
133
130
  Its PATH uses the pinned runtime's Node/pnpm. Ordinary agent tools do not receive
@@ -147,8 +144,7 @@ original identities and proves actual group/workspace absence. A missing or
147
144
  partial creation record never grants permission to run the command again or to
148
145
  signal an unidentified process. Proven cleanup releases active capacity while
149
146
  preserving an existing unknown result and its consumed run/duration budget.
150
- Historical Docker/macOS rows retain their own backend identity; switching this
151
- API does not reconcile those external resources or reset their grants.
147
+ Historical rows opened from a pre-native ledger retain their original backend identity; the API cannot create them and does not reset their grants.
152
148
 
153
149
  These APIs still require non-root Linux with verified v1 delegation and the
154
150
  fixed namespace dependencies. Installer migration, behavior certificates and
@@ -247,7 +243,7 @@ native integration; repository execution alone does not authorize adoption.
247
243
  ## Native macOS execution primitive
248
244
 
249
245
  The Host-only `runNativeMacProcess` export runs one digest-pinned Node process
250
- under `/usr/bin/sandbox-exec`, without Docker. Its deny-default policy permits
246
+ under `/usr/bin/sandbox-exec`, without a container daemon. Its deny-default policy permits
251
247
  only system runtime reads, explicitly approved canonical runtime roots and a
252
248
  private workspace. The workspace is read-only unless the trusted caller explicitly
253
249
  sets `workspaceWritable: true`. Network and child processes are denied; file
@@ -271,10 +267,10 @@ do not authenticate its contents. The caller must provision trusted runtime
271
267
  contents and exclude aliases to unrelated Host files. Workspace staging rejects
272
268
  symbolic links, hard links and special files before dispatch.
273
269
  Writable workspaces have no hard disk quota; this primitive also has no hard
274
- memory or CPU quota. Do not infer Docker resource limits or a complete native
270
+ memory or CPU quota. Do not infer native resource limits or a complete native
275
271
  RSI installation from a successful invocation. Native tests run on macOS and
276
272
  use only temporary canaries, an ephemeral loopback listener and disposable
277
- processes; they require no Docker installation.
273
+ processes; they require no container runtime installation.
278
274
 
279
275
  The Host-only `NativeMacVerifierRunner` adds a durable finite grant to this
280
276
  single-process primitive. Its `backend: 'macos-seatbelt'` configuration pins an
@@ -287,7 +283,7 @@ and nonce. The detached supervisor kills its candidate when the Host IPC
287
283
  disconnects; an absent or invalid receipt leaves the job `unknown`, occupies
288
284
  active capacity and cannot be replayed. A new Host must wait for the old
289
285
  controller lease to expire before recovering it. The private native state
290
- root is bound separately from Docker state and is never a runtime read root.
286
+ root is its own private state and is never a runtime read root.
291
287
  Runtime tree hashing rejects special files, hard links, external symbolic
292
288
  links and group/world-writable contents; internal pnpm links are allowed only
293
289
  when their resolved targets remain inside the same root. Admission bounds runs,
@@ -301,17 +297,18 @@ trusted verifier API, not the public `isolation_run` tool.
301
297
  dsh plugin --profile <profile> add @dsh-enhanced/assistant-isolation
302
298
  ```
303
299
 
304
- Required Host services: `agents`, `tools`, `assistantDelivery`, and `assistantPolicy`. The bundle is independently publishable; installing it does not install or activate peers. Without the services it does not register an execution tool. With no grants it does not execute jobs. No Docker image is downloaded by the plugin.
300
+ Required Host services: `agents`, `tools`, `assistantDelivery`, and `assistantPolicy`. The bundle is independently publishable; installing it does not install or activate peers. Without the services it does not register an execution tool. With no grants it does not execute jobs. The plugin downloads no image and contacts no container daemon.
305
301
 
306
- The Docker backend supports a non-root Linux or macOS Host process with access to a local Docker daemon. Linux defaults to `/var/run/docker.sock`; macOS defaults to the current user's Docker Desktop socket at `~/.docker/run/docker.sock`. The socket must exist at runtime and remain the same local Unix socket through creation, execution and cleanup. macOS requires an owner-owned socket and private Docker run directory; a remote `DOCKER_HOST`, Docker context or socket path outside that user directory is never used. Configure an already-present, operator-reviewed image **ID** (`sha256:` plus 64 hexadecimal digits), containing `/bin/sh`, a trusted `/bin/busybox` with `sleep`, `stat` and `cat`, and the commands needed for the task. Image-declared `VOLUME` entries are rejected to prevent extra writable Docker volumes. A tag or remote repository digest is not accepted as a substitute for the local immutable image ID. Failed Docker operations do not fall back to a Host shell.
302
+ Linux isolation requires a non-root Linux Host with verified v1 cgroup delegation and the fixed namespace dependencies (unshare, bubblewrap, Python/libseccomp). macOS exposes only the `macos-seatbelt` verifier primitive; `isolation_run` is Linux-only.
307
303
 
308
304
  ## Configuration
309
305
 
310
306
  ```yaml
307
+ backend: linux-native
311
308
  stateRoot: /absolute/private/assistant-isolation
312
- image: sha256:<64-hex-local-image-id>
313
- dockerPath: /usr/bin/docker
314
- # Optional: socketPath: /Users/<owner>/.docker/run/docker.sock on macOS.
309
+ linux:
310
+ runtime: <digest-pinned LinuxRuntime from the native toolchain bootstrap>
311
+ cgroupRoots: <current-user v1 controller delegation>
315
312
  maxConcurrentJobs: 2
316
313
  maxReservedMemoryMiB: 2048
317
314
  maxReservedWorkspaceInodes: 32768
@@ -341,39 +338,15 @@ limits:
341
338
 
342
339
  Replace the placeholders with the operator's current owner record and runtime configuration. `isolationPrincipalDigest()` is exported for trusted Host configuration tooling. Model arguments cannot supply an owner or create/extend a grant. Policy must allow `execute` on both `tool:isolation_run` and `tool:isolation:<grant-id>` for the exact scope. Matching finite-grant preauthorization can skip the redundant risk prompt; native Policy denials, call budgets and other guards remain in force (details below).
343
340
 
344
- The workspace value identifies the authorized task; **the project directory is not mounted**. The tool accepts `grant_id`, `idempotency_key`, `command`, optional `files: [{ path, content }]`, `artifacts: [relativePath]` and `timeout_ms`. Paths must be canonical relative paths. Inputs and requested artifacts have finite count/byte limits, including path text and staged parent inode counts. Inputs are copied into a fresh quota volume; no Host directory is mounted in either container. After the execution container is removed, a separate keeper container retains the volume while the trusted supervisor checks each artifact with absolute-path BusyBox commands. Only regular UTF-8 files without symlink parents or hard links can be exported within one total byte budget. The keeper and volume must then be removed before the result reports quiescence. Binary/invalid UTF-8 console data is omitted; decoded output never expands past the configured byte limit.
341
+ The workspace value identifies the authorized task; **the project directory is not mounted**. The tool accepts `grant_id`, `idempotency_key`, `command`, optional `files: [{ path, content }]`, `artifacts: [relativePath]` and `timeout_ms`. Paths must be canonical relative paths. Inputs and requested artifacts have finite count/byte limits, including path text and staged parent inode counts. Inputs are copied into a fresh tmpfs workspace inside the candidate's user/mount namespaces; no Host directory is mounted into the sandbox. After the candidate process is terminated, the trusted keeper process (outside the candidate's PID/cgroup namespace) retains the workspace while the supervisor checks each artifact with absolute-path commands. Only regular UTF-8 files without symlink parents or hard links can be exported within one total byte/inode budget. The keeper, cgroup and workspace must then be released and proven quiescent before the result reports quiescence. Binary/invalid UTF-8 console data is omitted; decoded output never expands past the configured byte limit.
345
342
 
346
343
  Within a configured workspace/preset, the model sees only the same named surface that the Host routing guard accepts: `isolation_run`, `isolation_grants`, `goal_context`, `goal_checkpoint`, and the fixed preauthorized goal or GitHub broker tools when installed. It does not see Host filesystem, shell, `run_code`, or subagent tools. This presentation applies only after the live Agent resolves to the current Delivery owner lineage and exact workspace/preset; ordinary or unbound Agents keep their normal tool surface. A scoped model-facing system section states that each `isolation_run` gets a fresh scratch workspace, accepts starting material only as inline files, and has no Host project mount or network. It contains no Host path, credential, task answer, or tool-call sequence. Revocation or expiry does not release the configured scope restriction while the bundle remains loaded. This is trusted Host routing around the OS-isolated worker; a trusted operator can change or remove the plugin configuration.
347
344
 
348
345
  ## Authorization, stop and recovery
349
346
 
350
- The private SQLite WAL ledger binds each job to exact owner lineage, grant revision, request/image/limits digest, owning Session, idempotency key and absolute deadline. A private state-root marker binds recovery to the configured Docker socket path; changing that path requires a separate state root. Legacy Linux ledgers without the marker can only continue on their original `/var/run/docker.sock`. Run count and reserved duration are consumed before creation and are not refunded on failures. Grant IDs retain cumulative usage across revisions. Same-key exact requests return the original outcome; changed requests are rejected. An unknown outcome is never automatically re-executed or promoted to success. Reusing a revoked grant revision cannot reactivate it.
347
+ The private SQLite WAL ledger binds each job to exact owner lineage, grant revision, request/limits digest, owning Session, idempotency key and absolute deadline. Run count and reserved duration are consumed before creation and are not refunded on failures. Grant IDs retain cumulative usage across revisions. Same-key exact requests return the original outcome; changed requests are rejected. An unknown outcome is never automatically re-executed or promoted to success. Reusing a revoked grant revision cannot reactivate it. Legacy pre-native ledgers keep their historical rows readable for accounting and migration only; this package cannot create them.
351
348
 
352
- Schema v6 migrates existing v1/v2/v3/v4/v5 job records without erasing them. It retains the v5 rule that, before any supervisor can receive create authority, the Host durably commits a fenced `supervisor-spawn-intent`; a crash between fork and the later running-state CAS therefore cannot look like an unstarted job. Legacy records lack this proof and are conservatively treated as already dispatched. Each new job reserves `memoryMiB + workspaceMiB + 32` MiB (worker limit, workspace capacity, and keeper limit) and `workspaceInodes` in the same transaction as grant usage. Prepared/running jobs and all unconfirmed cleanup retain their reservations; an active legacy job with unknown resource use prevents new reservations. Unknown dispatched jobs retain occupancy after ordinary exact-name removal. A separate reconciliation path can release resource reservations only with the complete request receipt and stop evidence described below. Jobs durably known never to have been dispatched can still use ordinary recovery. Changing pool settings cannot retroactively release reservations. The pool applies to this state root, so separate state roots need an operator-managed aggregate budget.
353
-
354
- The native tool cancellation signal (including Agent cancellation), current owner/Policy changes, grant revocation and service disposal stop running jobs. The controller polls authorization every 250 ms while active. A detached supervisor watches the job deadline and Host IPC independently; losing the Host IPC initiates container termination, state inspection and removal, including `setsid` descendants. Stop is asynchronous, with bounded Docker control calls. The plugin reports `quiescent: false` and `unknown` when it cannot confirm cleanup. It cannot undo instructions already executed before a stop was observed. A timed-out creation acknowledgment remains `docker-creation-unconfirmed` and holds its reservation even across Host restart: current object absence alone does not prove a pending daemon request completed. The same protection covers other unknown outcomes after dispatch, including supervisor exit, IPC loss and runner exceptions. Private diagnostic witnesses capture the Linux boot ID, process PID/start ticks and Docker Engine ID around a final supervisor receipt when available. They are stored separately from model-visible results. A restart candidate is not a release authorization: trusted socket-to-daemon binding and an independently proven stop barrier remain operational requirements; do not delete the ledger to force capacity release.
355
-
356
- A final supervisor receipt now records whether every create/start/copy/exec command returned normally and every CLI closed. On Linux, when that private `requestsSettled` flag is true, the original supervisor has exited, and the exact Docker daemon generation is unchanged, the Host can remove and independently inspect all three UUID-named resources. A fresh opaque cleanup receipt, the original witness, current controller fence and job version are required in the same ledger transaction to release reservations. macOS does not fabricate Linux process witnesses; an unknown dispatched job retains its reservation pending a separately proven stop barrier. The original `unknown` outcome, output, run count and consumed duration remain unchanged; commands are never replayed. The audit stores the exact resources and their removal/absence observations.
357
-
358
- The live Host checks a bounded page of pending records every five seconds without overlapping sweeps. With the Host stopped, an operator can invoke the same path:
359
-
360
- ```sh
361
- dsh-isolation reconcile /absolute/private/assistant-isolation
362
- # Optional Docker executable:
363
- dsh-isolation reconcile /absolute/private/assistant-isolation /absolute/docker
364
- ```
365
-
366
- The command reports checked, released and retained counts and refuses to take over a live controller. Legacy receipts, interrupted mutating calls (including timeout or output overflow of `start --attach` or artifact `exec`), missing final IPC, and changed daemon generations retain occupancy. Systemd socket/service invocation metadata is diagnostic only: daemon restart does not prove containerd/shim execution stopped. Automatic release of these ambiguous cases is still unsupported.
367
-
368
- An operator can revoke from a separate terminal, without calling the model:
369
-
370
- ```sh
371
- dsh-isolation revoke /absolute/private/assistant-isolation offline-maintenance 1
372
- # Optional absolute Docker executable for deployments using another path:
373
- dsh-isolation revoke /absolute/private/assistant-isolation offline-maintenance 1 /absolute/docker
374
- ```
375
-
376
- This persists revocation first and attempts to remove this grant's exact UUID-named execution containers, keeper containers and workspace volumes. `containersRemoved` reports those removal attempts, not an atomic barrier against an already in-flight Docker request. A running controller also rejects any subsequent start and polls revocation. Return code 2 means cleanup was not confirmed; retain the ledger and investigate Docker availability. Credentials and external action leases are outside this offline entry point.
349
+ Schema migration retains every historical job record. Before any supervisor can receive create authority, the Host durably commits a fenced `supervisor-spawn-intent`; a crash between fork and the running-state CAS therefore cannot look like an unstarted job. Legacy records without that proof are conservatively treated as already dispatched. Each new job reserves `memoryMiB + workspaceMiB + 32` MiB (worker limit, workspace capacity, and keeper limit) and `workspaceInodes` in the same transaction as grant usage. Prepared/running jobs and all unconfirmed cleanup retain their reservations; capacity releases only with the complete request receipt and stop evidence below. Changing pool settings never retroactively releases reservations. The pool applies to this state root, so separate state roots need an operator-managed aggregate budget.
377
350
 
378
351
  A durable 30-second controller lease with fencing prevents two live controllers from recovering or spending the same ledger. Heartbeats run every 5 seconds; losing the fence stops jobs and forbids stale outcome writes. A replacement can claim an expired controller lease, walk all recovery pages and remove old execution/keeper containers and workspace volumes without replaying their commands. Recovery retains unknown execution outcomes even when later removal succeeds. The controller ledger must not be deleted to clear an unknown job or exhausted budget.
379
352
 
@@ -423,28 +396,26 @@ The local hash chain proves integrity and linkage relative to a trusted digest;
423
396
 
424
397
  | Surface | Authority |
425
398
  | --- | --- |
426
- | Filesystem | Host owns a `0700` state directory, `0600` ledger and per-job staging. A separate operator-owned `0700` audit archive may contain canonical hash-linked NDJSON batches; neither state nor archive root is mounted or bind-mounted into a worker. The worker sees its byte/inode-limited tmpfs workspace plus its configured image or approved native runtime roots. Console/artifact results and diagnostic witnesses persist in the private ledger. The Host reads Linux `/proc`, the protected `/run/docker.pid`, and socket metadata for best-effort diagnostics; missing metadata never grants release. No writable Host bind is exposed. Observed storage admission and opt-in result retention are described below; they are not a hard filesystem quota. |
427
- | Network | Docker uses its fixed local Unix socket; native Linux does not contact Docker. Workers have no network, Host socket/config mount or external action endpoint. |
428
- | Subprocess | Native Linux uses the fixed packaged keeper, unshare, mount, bubblewrap and Python/libseccomp programs described above. Docker starts the fixed configured Docker executable and packaged detached Node supervisor, and may read fixed docker.service/docker.socket properties through /usr/bin/systemctl for diagnostics. Workers run `/bin/sh` with non-root UID/GID, read-only image filesystem, dropped capabilities, `no-new-privileges`, memory/CPU/PID limits, bounded `/tmp` and `/dev/shm`, and disabled Docker log storage. A fixed BusyBox keeper retains the job volume across execution-container removal and does not execute job code. |
429
- | Credentials | Worker receives no Host environment or credential files. The Docker daemon access itself is a privileged trusted Host capability. Images and approved runtime roots must contain no embedded secrets. |
399
+ | Filesystem | Host owns a `0700` state directory, `0600` ledger and per-job staging. A separate operator-owned `0700` audit archive may contain canonical hash-linked NDJSON batches; neither state nor archive root is mounted or bind-mounted into a worker. The worker sees its byte/inode-limited tmpfs workspace plus approved native runtime roots. Result and receipt data persist in the private ledger. The Host reads Linux `/proc` for best-effort diagnostics; missing metadata never grants release. No writable Host bind is exposed. Observed storage admission and opt-in result retention are described below; they are not a hard filesystem quota. |
400
+ | Network | None. Workers have no network namespace connectivity, no Host socket/config mount and no external action endpoint. |
401
+ | Subprocess | Native Linux uses the fixed packaged keeper, `unshare`, mount, bubblewrap and Python/libseccomp programs described above, with a shipped digest-checked seccomp policy. Workers run `/bin/sh` as non-root UID/GID with dropped capabilities, `no-new-privileges`, memory/CPU/PID limits, bounded `/tmp` and `/dev/shm`. The keeper only coordinates cleanup; it never executes job code. |
402
+ | Credentials | The worker receives no Host environment or credential files. Approved runtime roots must contain no embedded secrets. |
430
403
  | Browser | None. |
431
404
  | Install scripts | No runtime provisioning, image pull or privileged install hook. Standard package build/prepack only. |
432
405
 
433
- Whole-machine failure, Docker daemon failure, disk exhaustion and untrusted Host plugins are not solved by IPC cleanup. Unknown jobs remain visible in the ledger and consume active capacity when quiescence is unconfirmed. The same Host user can inspect or modify this database; it is protected from the container worker, not from the trusted operator. Partial scratch cleanup failures are not proof of execution failure and may require operator cleanup once the container is confirmed stopped.
406
+ Whole-machine failure, disk exhaustion and untrusted Host plugins are not solved by IPC cleanup. Unknown jobs remain visible in the ledger and consume active capacity when quiescence is unconfirmed. The same Host user can inspect or modify this database; it is protected from the worker, not from the trusted operator. Partial scratch cleanup failures are not proof of execution failure and may require operator cleanup once resource absence is confirmed.
434
407
 
435
408
  ## Verification
436
409
 
437
410
  ```sh
438
- CI=true DSH_ISOLATION_TEST_IMAGE=sha256:<local-image-id> pnpm check
411
+ DSH_NATIVE_CGROUP_REAL=1 pnpm check
439
412
  ```
440
413
 
441
- Without the environment variable, Docker tests are explicitly skipped. With it, tests use actual containers and the native AgentLoop/ToolRuntime; the model and Delivery identity are controlled seams; the finite-grant fixture uses the actual default-deny Policy, ApprovalService and native ToolRuntime. Separate tests exercise Host file/socket/environment separation, a Host HTTP canary, configured cgroup restrictions, workspace exhaustion, output/IPC separation, cancellation, and Host process-group death. Filesystem quota and storage lifecycle probes use actual Docker resources; no image is pulled. These are not evidence of a real cloud model, external account, full user profile or all autonomy work packages being complete.
442
-
443
- The optional identity probe `python3 scripts/isolation/daemon-witness-probe.py` runs from the repository root after a build. It requires Python 3, rootlesskit/dockerd and unprivileged Linux namespaces, starts only private rootless daemons, and leaves inspectable logs under `/tmp`. It verifies a real restart, stable Engine ID, changed PID/start ticks, live-process rejection and a surviving volume. Its limited UID/GID map and absent cgroup delegation do not establish worker isolation or production release authority.
414
+ Without `DSH_NATIVE_CGROUP_REAL=1`, real-cgroup integration tests are explicitly skipped; schema, contract, migration and simulated-runtime tests always run. Real tests use actual user namespaces, cgroup leases, seccomp and the native AgentLoop/ToolRuntime; the model and Delivery identity are controlled seams and the finite-grant fixture uses the actual default-deny Policy, ApprovalService and native ToolRuntime. Separate tests exercise cgroup restrictions, workspace exhaustion, output bounds, cancellation, receipts and process-group death. These are not evidence of a real cloud model, external account, full user profile or a complete autonomy acceptance.
444
415
 
445
416
  ## Operator readiness and native preauthorization
446
417
 
447
- `dsh-isolation probe sha256:<local-image-id> [/absolute/docker [/absolute/docker.sock]]` exercises the production supervisor, non-root/read-only-root execution, work volume, artifact export and cleanup with a fixed nonce task. On macOS the default Docker executable is `/usr/local/bin/docker`; pass its absolute path if installed elsewhere. It creates private temporary staging and never pulls an image. Successful or confirmed-quiescent probes remove staging; unknown cleanup retains `probe.json` with exact job/container/image/socket metadata for operator investigation. This diagnostic does not create a production grant or reset a ledger, and does not replace task-specific resource validation.
418
+ `dsh-isolation probe-native /absolute/runtime-config.json` exercises the pinned native runtime, non-root execution, a canary artifact and actual cleanup with a fixed nonce task, using exactly `{ runtime, cgroupRoots }` from an owned bounded JSON file. It creates private temporary staging and never touches production grants. Successful or confirmed-quiescent probes remove staging; unknown cleanup retains its private evidence for operator investigation. This diagnostic does not create a production grant or reset a ledger, and does not replace task-specific resource validation.
448
419
 
449
420
  With matching Policy and Isolation builds, the exact registered `isolation_run` definition can skip a redundant risk prompt only while its owner/scope grant and live Policy evaluation permit the normalized request. Same-name scoped tools cannot borrow this registration. Native tool authorization remains independent: configure `execute` on `tool:isolation_run` as well as `tool:isolation:<grant-id>`; explicit denials still win. A default-deny Policy is supported without allowing unrelated tools.
450
421
 
@@ -456,7 +427,7 @@ The default export is the Cordis plugin object with stable name, Config and appl
456
427
 
457
428
  schema v6 新增可空的 artifact admission 绑定,v1–v5 行迁移后保留且不会被追认为目标产物。Host 在真实 Goals native round 内,于隔离任务派发前固定 step acceptance ID/digest、run、turn 与声明输出路径;相同幂等键不会重新绑定。运行中若原 admission 改变则取消。私有 `readAcceptedArtifact` 只读取同一 v4 step scope/owner/Session 的成功、已静止、有效期内且正文未清理的产物;较新的同路径失败尝试禁止回退旧结果。
458
429
 
459
- Host Verifier 可使用导出的 `IsolatedVerifierRunner` 在独立私有 stateRoot 中验收复制产物。该类没有模型工具入口,固定 authority/镜像/命令、次数、累计预留时长及期限,可选 `socketPath` 与普通隔离任务遵循相同的本地 Docker socket 约束,并复用相同 Docker supervisor 和资源边界。验收任务与原产物 job 是不同 ID;验收不在宿主执行模型代码。未知派发仍保留资源占用且不自动重放,重复 setup 或重启也不会重置预算。
430
+ Host Verifier 可使用导出的 `IsolatedVerifierRunner` 在独立私有 stateRoot 中验收复制产物。该类没有模型工具入口,要求显式 `backend: 'linux-native'` 配置(已验证 `LinuxRuntime` 与受委派 v1 cgroupRoots),固定 authority/命令、次数、累计预留时长及期限,复用原生执行资源边界。验收任务与原产物 job 是不同 ID;验收不在宿主执行模型代码。未知派发仍保留资源占用且不自动重放,重复 setup 或重启也不会重置预算。
460
431
 
461
432
  The read-only `isolation_grants` tool exposes usable grant IDs and remaining limits only for the current authenticated owner and workspace/preset. It applies live Policy, principal lineage, expiry and revocation checks; it cannot create or extend grants and returns no credentials or Host paths. When Policy allows discovery and at least one grant remains usable for that exact owner, the Host registers its exact tool definition for finite preauthorization so this read-only query skips the redundant native risk prompt. Revocation, expiry, owner/scope mismatch, Policy denial, tool replacement, or bundle unload removes that preauthorization. Use a returned ID with `isolation_run`.
462
433
 
package/lib/cli.d.ts CHANGED
@@ -2,15 +2,13 @@
2
2
  import { type IsolationStorageMaintenance } from './storage.js';
3
3
  export interface IsolationRevocationResult {
4
4
  revoked: true;
5
- /** Legacy Docker removal acknowledgements, not a general proof of quiescence. */
6
- containersRemoved: boolean;
7
5
  nativeResourcesQuiescent?: boolean;
8
6
  nativeRetained?: number;
9
7
  }
10
8
  /** Operator entry point, separate from the model's tool registry. */
11
- export declare function revokeIsolationGrant(stateRoot: string, grantId: string, revision: number, dockerPath?: string, socketPath?: string): Promise<IsolationRevocationResult>;
9
+ export declare function revokeIsolationGrant(stateRoot: string, grantId: string, revision: number): Promise<IsolationRevocationResult>;
12
10
  /** Reconcile only settled requests; a live Host owns its own background sweep. */
13
- export declare function reconcileIsolation(stateRoot: string, dockerPath?: string, signal?: AbortSignal, socketPath?: string): Promise<{
11
+ export declare function reconcileIsolation(stateRoot: string, signal?: AbortSignal): Promise<{
14
12
  checked: number;
15
13
  released: number;
16
14
  retained: number;
package/lib/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAYA,OAAO,EAA4B,KAAK,2BAA2B,EAAE,MAAM,cAAc,CAAA;AAezF,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,IAAI,CAAA;IACb,iFAAiF;IACjF,iBAAiB,EAAE,OAAO,CAAA;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,cAAc,CAAC,EAAE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AAA;CAAE,CAAC,CA+BtH;AAED,8FAA8F;AAC9F,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,iBAAiB,SAAI,EAAE,OAAO,SAAK,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAepI"}
package/lib/cli.js CHANGED
@@ -1,19 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import { probeIsolationRuntime, probeLinuxIsolationRuntime } from './probe.js';
2
+ import { probeLinuxIsolationRuntime } from './probe.js';
3
3
  import { randomUUID } from 'node:crypto';
4
- import { reconcileUnknownJob } from './reconcile.js';
5
4
  import { constants, lstatSync, realpathSync } from 'node:fs';
6
5
  import { open } from 'node:fs/promises';
7
6
  import { isAbsolute, join } from 'node:path';
8
7
  import { pathToFileURL } from 'node:url';
9
8
  import { IsolationLedger, IsolationLedgerError } from './ledger.js';
10
9
  import { reconcileLinuxJob } from './linux-job-recovery.js';
11
- import { removeIsolatedContainer } from './runner.js';
12
10
  import { defaultStoragePolicy, validateStoragePolicy } from './storage-policy.js';
13
11
  import { maintainIsolationStorage } from './storage.js';
14
12
  import { archiveIsolationAudit, verifyIsolationAuditArchive } from './audit-archive.js';
15
- import { configuredDockerSocketPath } from './docker-socket.js';
16
- import { stateSocketBindingMatches } from './state-socket-binding.js';
17
13
  function privateLedger(stateRoot) {
18
14
  if (!isAbsolute(stateRoot) || realpathSync(stateRoot) !== stateRoot)
19
15
  throw new Error('canonical state root required');
@@ -26,7 +22,7 @@ function privateLedger(stateRoot) {
26
22
  return file;
27
23
  }
28
24
  /** Operator entry point, separate from the model's tool registry. */
29
- export async function revokeIsolationGrant(stateRoot, grantId, revision, dockerPath = process.platform === 'darwin' ? '/usr/local/bin/docker' : '/usr/bin/docker', socketPath) {
25
+ export async function revokeIsolationGrant(stateRoot, grantId, revision) {
30
26
  const file = privateLedger(stateRoot);
31
27
  const ledger = new IsolationLedger(file);
32
28
  let authority;
@@ -34,7 +30,7 @@ export async function revokeIsolationGrant(stateRoot, grantId, revision, dockerP
34
30
  const abort = new AbortController();
35
31
  try {
36
32
  ledger.revoke(grantId, revision, 'external-operator-revoke');
37
- let containersRemoved = true, nativeSeen = false;
33
+ let nativeSeen = false;
38
34
  let cursor = '';
39
35
  for (;;) {
40
36
  const page = ledger.recoverable(cursor);
@@ -42,49 +38,37 @@ export async function revokeIsolationGrant(stateRoot, grantId, revision, dockerP
42
38
  break;
43
39
  cursor = page.at(-1).id;
44
40
  for (const job of page) {
45
- if (job.grantId !== grantId)
41
+ if (job.grantId !== grantId || job.backend !== 'linux-native')
46
42
  continue;
47
- if (job.backend === 'linux-native') {
48
- nativeSeen = true;
49
- // A live service owns cancellation and cleanup. Claiming never steals
50
- // its lease or rewrites expiry; only an idle ledger permits CLI cleanup.
51
- if (!authority) {
52
- try {
53
- authority = ledger.claimController(randomUUID(), 30_000);
54
- }
55
- catch (error) {
56
- if (!(error instanceof IsolationLedgerError) || error.code !== 'unauthorized')
57
- throw error;
58
- }
59
- if (authority) {
60
- const controller = authority;
61
- timer = setInterval(() => { try {
62
- if (!ledger.renewController(controller, 30_000))
63
- abort.abort();
64
- }
65
- catch {
43
+ nativeSeen = true;
44
+ // A live service owns cancellation and cleanup. Claiming never steals
45
+ // its lease or rewrites expiry; only an idle ledger permits CLI cleanup.
46
+ if (!authority) {
47
+ try {
48
+ authority = ledger.claimController(randomUUID(), 30_000);
49
+ }
50
+ catch (error) {
51
+ if (!(error instanceof IsolationLedgerError) || error.code !== 'unauthorized')
52
+ throw error;
53
+ }
54
+ if (authority) {
55
+ const controller = authority;
56
+ timer = setInterval(() => { try {
57
+ if (!ledger.renewController(controller, 30_000))
66
58
  abort.abort();
67
- } }, 5_000);
68
- timer.unref();
69
59
  }
60
+ catch {
61
+ abort.abort();
62
+ } }, 5_000);
63
+ timer.unref();
70
64
  }
71
- if (authority)
72
- await reconcileLinuxJob(ledger, authority, job, join(stateRoot, 'linux-executions'), abort.signal);
73
- }
74
- else if (job.backend === 'docker' && job.containerName) {
75
- if (!isAbsolute(dockerPath))
76
- throw new Error('absolute Docker path required');
77
- const boundSocket = configuredDockerSocketPath(socketPath);
78
- if (!stateSocketBindingMatches(stateRoot, boundSocket)
79
- || !await removeIsolatedContainer(dockerPath, job.containerName, { socketPath: boundSocket }))
80
- containersRemoved = false;
81
65
  }
66
+ if (authority)
67
+ await reconcileLinuxJob(ledger, authority, job, join(stateRoot, 'linux-executions'), abort.signal);
82
68
  }
83
69
  }
84
- // Revocation is durable. A running controller also polls it and prevents any
85
- // pending create from starting; late daemon responses may remain unknown.
86
70
  if (!nativeSeen)
87
- return { revoked: true, containersRemoved };
71
+ return { revoked: true };
88
72
  let nativeRetained = 0;
89
73
  cursor = '';
90
74
  for (;;) {
@@ -94,7 +78,7 @@ export async function revokeIsolationGrant(stateRoot, grantId, revision, dockerP
94
78
  cursor = page.at(-1).id;
95
79
  nativeRetained += page.filter(job => job.backend === 'linux-native' && job.grantId === grantId).length;
96
80
  }
97
- return { revoked: true, containersRemoved, nativeResourcesQuiescent: nativeRetained === 0, nativeRetained };
81
+ return { revoked: true, nativeResourcesQuiescent: nativeRetained === 0, nativeRetained };
98
82
  }
99
83
  finally {
100
84
  if (timer)
@@ -109,7 +93,7 @@ export async function revokeIsolationGrant(stateRoot, grantId, revision, dockerP
109
93
  }
110
94
  }
111
95
  /** Reconcile only settled requests; a live Host owns its own background sweep. */
112
- export async function reconcileIsolation(stateRoot, dockerPath = process.platform === 'darwin' ? '/usr/local/bin/docker' : '/usr/bin/docker', signal = new AbortController().signal, socketPath) {
96
+ export async function reconcileIsolation(stateRoot, signal = new AbortController().signal) {
113
97
  const ledger = new IsolationLedger(privateLedger(stateRoot));
114
98
  const abort = new AbortController();
115
99
  let timer;
@@ -123,7 +107,7 @@ export async function reconcileIsolation(stateRoot, dockerPath = process.platfor
123
107
  }
124
108
  catch {
125
109
  abort.abort();
126
- } }, 5000);
110
+ } }, 5_000);
127
111
  timer.unref();
128
112
  const counts = { checked: 0, released: 0, retained: 0 };
129
113
  let cursor = '';
@@ -137,16 +121,8 @@ export async function reconcileIsolation(stateRoot, dockerPath = process.platfor
137
121
  abort.signal.throwIfAborted();
138
122
  counts.checked++;
139
123
  const combined = AbortSignal.any([signal, abort.signal, AbortSignal.timeout(30_000)]);
140
- let released = false;
141
- if (job.backend === 'linux-native')
142
- released = await reconcileLinuxJob(ledger, controller, job, join(stateRoot, 'linux-executions'), combined);
143
- else if (job.backend === 'docker' && job.containerName) {
144
- if (!isAbsolute(dockerPath))
145
- throw new Error('absolute Docker path required');
146
- const boundSocket = configuredDockerSocketPath(socketPath);
147
- released = stateSocketBindingMatches(stateRoot, boundSocket)
148
- && await reconcileUnknownJob(ledger, controller, job, dockerPath, combined, boundSocket);
149
- }
124
+ const released = job.backend === 'linux-native'
125
+ && await reconcileLinuxJob(ledger, controller, job, join(stateRoot, 'linux-executions'), combined);
150
126
  if (released)
151
127
  counts.released++;
152
128
  else
@@ -179,7 +155,7 @@ export async function maintainIsolation(stateRoot, resultRetentionMs = 0, afterI
179
155
  timer = setInterval(() => { try {
180
156
  ledger.renewController(controller, 30_000);
181
157
  }
182
- catch { /* The maintenance fence fails closed. */ } }, 5000);
158
+ catch { /* The maintenance fence fails closed. */ } }, 5_000);
183
159
  timer.unref();
184
160
  return await maintainIsolationStorage(ledger, controller, stateRoot, policy, afterId);
185
161
  }
@@ -196,10 +172,10 @@ export async function maintainIsolation(stateRoot, resultRetentionMs = 0, afterI
196
172
  }
197
173
  }
198
174
  if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href) {
199
- const [command, stateRoot, grantId, revision, dockerPath, ...extra] = process.argv.slice(2);
175
+ const [command, stateRoot, grantId, revision, ...extra] = process.argv.slice(2);
200
176
  try {
201
177
  if (command === 'probe-native') {
202
- if (!stateRoot || !isAbsolute(stateRoot) || grantId !== undefined || revision !== undefined || dockerPath !== undefined || extra.length > 0)
178
+ if (!stateRoot || grantId !== undefined || revision !== undefined || extra.length > 0)
203
179
  throw new Error('usage: dsh-isolation probe-native /absolute/runtime-config.json');
204
180
  const file = await open(stateRoot, constants.O_RDONLY | constants.O_NOFOLLOW);
205
181
  try {
@@ -208,7 +184,7 @@ if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.a
208
184
  throw new Error('native probe config must be a bounded owned regular file');
209
185
  const text = await file.readFile('utf8');
210
186
  const after = await file.stat();
211
- if (Buffer.byteLength(text) !== stat.size || after.size !== stat.size || after.mtimeMs !== stat.mtimeMs || after.ctimeMs !== stat.ctimeMs)
187
+ if (Buffer.byteLength(text) !== stat.size || after.size !== stat.size || after.mtimeMs !== stat.mtimeMs || after.ctimeMs !== stat.mtimeMs)
212
188
  throw new Error('native probe config changed while reading');
213
189
  process.stdout.write(`${JSON.stringify(await probeLinuxIsolationRuntime(JSON.parse(text)))}\n`);
214
190
  }
@@ -216,25 +192,20 @@ if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.a
216
192
  await file.close();
217
193
  }
218
194
  }
219
- else if (command === 'probe') {
220
- if (!stateRoot || dockerPath !== undefined || extra.length > 0)
221
- throw new Error('usage: dsh-isolation probe sha256:image-id [/absolute/docker [/absolute/docker.sock]]');
222
- process.stdout.write(`${JSON.stringify(await probeIsolationRuntime(stateRoot, grantId, revision))}\n`);
223
- }
224
195
  else if (command === 'maintain') {
225
- if (stateRoot === undefined || dockerPath !== undefined || (grantId !== undefined && !/^(0|[1-9][0-9]*)$/.test(grantId)))
196
+ if (stateRoot === undefined || (grantId !== undefined && !/^(0|[1-9][0-9]*)$/.test(grantId)))
226
197
  throw new Error('usage: dsh-isolation maintain /absolute/private/state-root [result-retention-ms [after-job-id]]');
227
198
  process.stdout.write(`${JSON.stringify(await maintainIsolation(stateRoot, grantId === undefined ? 0 : Number(grantId), revision))}\n`);
228
199
  }
229
200
  else if (command === 'reconcile') {
230
- if (stateRoot === undefined || dockerPath !== undefined || extra.length > 0)
231
- throw new Error('usage: dsh-isolation reconcile /absolute/private/state-root [/absolute/docker [/absolute/docker.sock]]');
201
+ if (stateRoot === undefined || extra.length > 0)
202
+ throw new Error('usage: dsh-isolation reconcile /absolute/private/state-root');
232
203
  const abort = new AbortController();
233
204
  const cancel = () => abort.abort();
234
205
  process.once('SIGINT', cancel);
235
206
  process.once('SIGTERM', cancel);
236
207
  try {
237
- process.stdout.write(`${JSON.stringify(await reconcileIsolation(stateRoot, grantId, abort.signal, revision))}\n`);
208
+ process.stdout.write(`${JSON.stringify(await reconcileIsolation(stateRoot, abort.signal))}\n`);
238
209
  }
239
210
  finally {
240
211
  process.removeListener('SIGINT', cancel);
@@ -242,29 +213,32 @@ if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.a
242
213
  }
243
214
  }
244
215
  else if (command === 'archive-audit') {
245
- if (stateRoot === undefined || grantId === undefined || dockerPath !== undefined || extra.length > 0
216
+ if (stateRoot === undefined || grantId === undefined || extra.length > 0
246
217
  || (revision !== undefined && (!/^[1-9][0-9]*$/.test(revision) || !Number.isSafeInteger(Number(revision)) || Number(revision) > 1_000))) {
247
218
  throw new Error('usage: dsh-isolation archive-audit /absolute/private/state-root /absolute/private/archive-directory [batch-size]');
248
219
  }
249
- process.stdout.write(`${JSON.stringify(archiveIsolationAudit({ stateRoot, archiveDirectory: grantId, ...(revision === undefined ? {} : { batchSize: Number(revision) }) }))}\n`);
220
+ process.stdout.write(`${JSON.stringify(await archiveIsolationAudit({ stateRoot, archiveDirectory: grantId, ...(revision === undefined ? {} : { batchSize: Number(revision) }) }))}\n`);
250
221
  }
251
222
  else if (command === 'verify-audit') {
252
- if (stateRoot === undefined || grantId !== undefined || revision !== undefined || dockerPath !== undefined || extra.length > 0) {
223
+ if (stateRoot === undefined || grantId !== undefined || revision !== undefined || extra.length > 0) {
253
224
  throw new Error('usage: dsh-isolation verify-audit /absolute/private/archive-directory');
254
225
  }
255
226
  process.stdout.write(`${JSON.stringify(verifyIsolationAuditArchive(stateRoot))}\n`);
256
227
  }
257
- else {
258
- if (command !== 'revoke' || stateRoot === undefined || grantId === undefined || revision === undefined || extra.length > 1 || !/^[1-9][0-9]*$/.test(revision))
259
- throw new Error('usage: dsh-isolation revoke /absolute/private/state-root grant-id revision [/absolute/docker [/absolute/docker.sock]]');
260
- const result = await revokeIsolationGrant(stateRoot, grantId, Number(revision), dockerPath, extra[0]);
228
+ else if (command === 'revoke') {
229
+ if (command !== 'revoke' || stateRoot === undefined || grantId === undefined || revision === undefined || extra.length > 0 || !/^[1-9][0-9]*$/.test(revision))
230
+ throw new Error('usage: dsh-isolation revoke /absolute/private/state-root grant-id revision');
231
+ const result = await revokeIsolationGrant(stateRoot, grantId, Number(revision));
261
232
  process.stdout.write(`${JSON.stringify(result)}\n`);
262
- if (!result.containersRemoved || result.nativeResourcesQuiescent === false)
233
+ if (result.nativeResourcesQuiescent === false)
263
234
  process.exitCode = 2;
264
235
  }
236
+ else {
237
+ throw new Error('unknown command');
238
+ }
265
239
  }
266
240
  catch (error) {
267
- process.stderr.write(`${error instanceof Error ? error.message : 'isolation revoke failed'}\n`);
241
+ process.stderr.write(`${error instanceof Error ? error.message : 'isolation operation failed'}\n`);
268
242
  process.exitCode = 1;
269
243
  }
270
244
  }
package/lib/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,oBAA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