deltabox-lite 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/index.d.ts +17 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -27,6 +27,12 @@ review calls return protocol-shaped typed objects. Every session record names
|
|
|
27
27
|
its `isolation` profile and the resolved `isolation_provider` (`sandlock`,
|
|
28
28
|
`seatbelt`, or Windows MXC).
|
|
29
29
|
|
|
30
|
+
A command has no time limit: it runs until it exits or the host cancels it.
|
|
31
|
+
Pass an `execId` as the last argument of `exec` and call `cancelExec(execId)` to
|
|
32
|
+
end that command's whole process tree, for example on your own deadline or when
|
|
33
|
+
the user aborts. Cancelling retires the warm sandbox runtime, so the next
|
|
34
|
+
command starts it again.
|
|
35
|
+
|
|
30
36
|
Linux CB-CoW modes require `/dev/fuse` and `fusermount3` or `fusermount` on the
|
|
31
37
|
host. Deltabox otherwise reports the reason and falls back to `copy-private`
|
|
32
38
|
unless the requested mode is required.
|
package/index.d.ts
CHANGED
|
@@ -131,7 +131,24 @@ export interface NativeDeltaboxInstance {
|
|
|
131
131
|
label?: string,
|
|
132
132
|
executionProfile?: NativeExecutionProfile,
|
|
133
133
|
networkAllow?: string[],
|
|
134
|
+
/**
|
|
135
|
+
* Lets the host end this command with {@link cancelExec}. Must be unique
|
|
136
|
+
* among executions that are still running.
|
|
137
|
+
*/
|
|
138
|
+
execId?: string,
|
|
134
139
|
): Promise<NativeExecResult>
|
|
140
|
+
/**
|
|
141
|
+
* End the command started by `exec` with this `execId`: its whole process
|
|
142
|
+
* tree is killed. A sandboxed command's `exec` promise then rejects with
|
|
143
|
+
* "command cancelled"; an unsandboxed one resolves with a non-zero result.
|
|
144
|
+
* A cancel that arrives before the command has started is not lost.
|
|
145
|
+
* Returns false when no execution with that id is running.
|
|
146
|
+
*
|
|
147
|
+
* There is no time limit on a command, so hosts that want one should
|
|
148
|
+
* cancel on their own deadline or abort signal. Descendants that move
|
|
149
|
+
* themselves into a new session or process group are not reached.
|
|
150
|
+
*/
|
|
151
|
+
cancelExec(execId: string): boolean
|
|
135
152
|
readFile(sessionId: string, path: string): Promise<Buffer>
|
|
136
153
|
writeFile(sessionId: string, path: string, content: Buffer): Promise<void>
|
|
137
154
|
recordFileChanges(sessionId: string, paths: string[]): Promise<void>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deltabox-lite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Native sandbox runtime with diff, commit, and abort for AI coding agents",
|
|
6
6
|
"repository": "https://github.com/delta-box/deltabox-lite",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"README.md"
|
|
25
25
|
],
|
|
26
26
|
"optionalDependencies": {
|
|
27
|
-
"deltabox-lite-darwin-arm64": "0.
|
|
28
|
-
"deltabox-lite-darwin-x64": "0.
|
|
29
|
-
"deltabox-lite-linux-arm64": "0.
|
|
30
|
-
"deltabox-lite-linux-x64": "0.
|
|
31
|
-
"deltabox-lite-windows-x64": "0.
|
|
27
|
+
"deltabox-lite-darwin-arm64": "0.2.0",
|
|
28
|
+
"deltabox-lite-darwin-x64": "0.2.0",
|
|
29
|
+
"deltabox-lite-linux-arm64": "0.2.0",
|
|
30
|
+
"deltabox-lite-linux-x64": "0.2.0",
|
|
31
|
+
"deltabox-lite-windows-x64": "0.2.0"
|
|
32
32
|
}
|
|
33
33
|
}
|