@rivet-dev/agentos-runtime-core 0.2.8-rc.2 → 0.2.8-rc.4

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 (234) hide show
  1. package/README.md +1 -1
  2. package/commands/[ +0 -0
  3. package/commands/_stubs +0 -0
  4. package/commands/acl_tools +0 -0
  5. package/commands/arch +0 -0
  6. package/commands/attr +0 -0
  7. package/commands/awk +0 -0
  8. package/commands/b2sum +0 -0
  9. package/commands/base32 +0 -0
  10. package/commands/base64 +0 -0
  11. package/commands/basename +0 -0
  12. package/commands/basenc +0 -0
  13. package/commands/bash +0 -0
  14. package/commands/bc +0 -0
  15. package/commands/cat +0 -0
  16. package/commands/chacl +0 -0
  17. package/commands/chcon +0 -0
  18. package/commands/chgrp +0 -0
  19. package/commands/chmod +0 -0
  20. package/commands/chown +0 -0
  21. package/commands/chroot +0 -0
  22. package/commands/cksum +0 -0
  23. package/commands/cmp +0 -0
  24. package/commands/column +0 -0
  25. package/commands/comm +0 -0
  26. package/commands/cp +0 -0
  27. package/commands/curl +0 -0
  28. package/commands/cut +0 -0
  29. package/commands/date +0 -0
  30. package/commands/dd +0 -0
  31. package/commands/df +0 -0
  32. package/commands/diff +0 -0
  33. package/commands/dir +0 -0
  34. package/commands/dircolors +0 -0
  35. package/commands/dirname +0 -0
  36. package/commands/du +0 -0
  37. package/commands/echo +0 -0
  38. package/commands/egrep +0 -0
  39. package/commands/env +0 -0
  40. package/commands/envsubst +0 -0
  41. package/commands/expand +0 -0
  42. package/commands/expr +0 -0
  43. package/commands/factor +0 -0
  44. package/commands/false +0 -0
  45. package/commands/fd +0 -0
  46. package/commands/fgrep +0 -0
  47. package/commands/file +0 -0
  48. package/commands/find +0 -0
  49. package/commands/findmnt +0 -0
  50. package/commands/fmt +0 -0
  51. package/commands/fold +0 -0
  52. package/commands/getent +0 -0
  53. package/commands/getfacl +0 -0
  54. package/commands/getfattr +0 -0
  55. package/commands/git +0 -0
  56. package/commands/git-receive-pack +0 -0
  57. package/commands/git-remote-http +0 -0
  58. package/commands/git-remote-https +0 -0
  59. package/commands/git-upload-archive +0 -0
  60. package/commands/git-upload-pack +0 -0
  61. package/commands/grep +0 -0
  62. package/commands/groups +0 -0
  63. package/commands/gunzip +0 -0
  64. package/commands/gzip +0 -0
  65. package/commands/head +0 -0
  66. package/commands/hostid +0 -0
  67. package/commands/hostname +0 -0
  68. package/commands/http-test +0 -0
  69. package/commands/id +0 -0
  70. package/commands/install +0 -0
  71. package/commands/join +0 -0
  72. package/commands/jq +0 -0
  73. package/commands/kill +0 -0
  74. package/commands/link +0 -0
  75. package/commands/ln +0 -0
  76. package/commands/logname +0 -0
  77. package/commands/ls +0 -0
  78. package/commands/md5sum +0 -0
  79. package/commands/mkdir +0 -0
  80. package/commands/mkfifo +0 -0
  81. package/commands/mknod +0 -0
  82. package/commands/mktemp +0 -0
  83. package/commands/more +0 -0
  84. package/commands/mount +0 -0
  85. package/commands/mv +0 -0
  86. package/commands/nice +0 -0
  87. package/commands/nl +0 -0
  88. package/commands/nohup +0 -0
  89. package/commands/nproc +0 -0
  90. package/commands/numfmt +0 -0
  91. package/commands/od +0 -0
  92. package/commands/paste +0 -0
  93. package/commands/pathchk +0 -0
  94. package/commands/pinky +0 -0
  95. package/commands/printenv +0 -0
  96. package/commands/printf +0 -0
  97. package/commands/ptx +0 -0
  98. package/commands/pwd +0 -0
  99. package/commands/readlink +0 -0
  100. package/commands/realpath +0 -0
  101. package/commands/rev +0 -0
  102. package/commands/rg +0 -0
  103. package/commands/rm +0 -0
  104. package/commands/rmdir +0 -0
  105. package/commands/runas +0 -0
  106. package/commands/runcon +0 -0
  107. package/commands/sed +0 -0
  108. package/commands/seq +0 -0
  109. package/commands/setfacl +0 -0
  110. package/commands/setfattr +0 -0
  111. package/commands/sh +0 -0
  112. package/commands/sha1sum +0 -0
  113. package/commands/sha224sum +0 -0
  114. package/commands/sha256sum +0 -0
  115. package/commands/sha384sum +0 -0
  116. package/commands/sha512sum +0 -0
  117. package/commands/shred +0 -0
  118. package/commands/shuf +0 -0
  119. package/commands/sleep +0 -0
  120. package/commands/sort +0 -0
  121. package/commands/spawn-test-host +0 -0
  122. package/commands/split +0 -0
  123. package/commands/sqlite3 +0 -0
  124. package/commands/ssh +0 -0
  125. package/commands/ssh-keysign +0 -0
  126. package/commands/ssh-sk-helper +0 -0
  127. package/commands/stat +0 -0
  128. package/commands/stdbuf +0 -0
  129. package/commands/strings +0 -0
  130. package/commands/stty +0 -0
  131. package/commands/su +0 -0
  132. package/commands/sum +0 -0
  133. package/commands/sync +0 -0
  134. package/commands/tac +0 -0
  135. package/commands/tail +0 -0
  136. package/commands/tar +0 -0
  137. package/commands/tee +0 -0
  138. package/commands/test +0 -0
  139. package/commands/timeout +0 -0
  140. package/commands/touch +0 -0
  141. package/commands/tr +0 -0
  142. package/commands/tree +0 -0
  143. package/commands/true +0 -0
  144. package/commands/truncate +0 -0
  145. package/commands/tsort +0 -0
  146. package/commands/tty +0 -0
  147. package/commands/uname +0 -0
  148. package/commands/unexpand +0 -0
  149. package/commands/uniq +0 -0
  150. package/commands/unlink +0 -0
  151. package/commands/unzip +0 -0
  152. package/commands/uptime +0 -0
  153. package/commands/users +0 -0
  154. package/commands/vdir +0 -0
  155. package/commands/wc +0 -0
  156. package/commands/wget +0 -0
  157. package/commands/which +0 -0
  158. package/commands/who +0 -0
  159. package/commands/whoami +0 -0
  160. package/commands/xargs +0 -0
  161. package/commands/xattr_tools +0 -0
  162. package/commands/xfs_io +0 -0
  163. package/commands/xu +0 -0
  164. package/commands/yes +0 -0
  165. package/commands/yq +0 -0
  166. package/commands/zcat +0 -0
  167. package/commands/zip +0 -0
  168. package/dist/binary.js +4 -3
  169. package/dist/descriptors.d.ts +2 -12
  170. package/dist/descriptors.js +10 -6
  171. package/dist/frame-stream.d.ts +33 -0
  172. package/dist/frame-stream.js +113 -0
  173. package/dist/generated/AcpLimitsConfig.d.ts +16 -0
  174. package/dist/generated/BindingLimitsConfig.d.ts +10 -0
  175. package/dist/generated/CreateVmConfig.d.ts +4 -0
  176. package/dist/generated/Http2LimitsConfig.d.ts +12 -0
  177. package/dist/generated/Http2LimitsConfig.js +2 -0
  178. package/dist/generated/JsRuntimeLimitsConfig.d.ts +1 -0
  179. package/dist/generated/MountPluginDescriptor.d.ts +1 -1
  180. package/dist/generated/ProcessLimitsConfig.d.ts +7 -0
  181. package/dist/generated/ProcessLimitsConfig.js +2 -0
  182. package/dist/generated/ReactorLimitsConfig.d.ts +23 -0
  183. package/dist/generated/ReactorLimitsConfig.js +2 -0
  184. package/dist/generated/SqliteLimitsConfig.d.ts +3 -0
  185. package/dist/generated/SqliteLimitsConfig.js +2 -0
  186. package/dist/generated/TlsLimitsConfig.d.ts +3 -0
  187. package/dist/generated/TlsLimitsConfig.js +2 -0
  188. package/dist/generated/UdpLimitsConfig.d.ts +4 -0
  189. package/dist/generated/UdpLimitsConfig.js +2 -0
  190. package/dist/generated/VmGroupConfig.d.ts +5 -0
  191. package/dist/generated/VmGroupConfig.js +2 -0
  192. package/dist/generated/VmLimitsConfig.d.ts +14 -2
  193. package/dist/generated/VmSqliteDescriptor.d.ts +10 -0
  194. package/dist/generated/VmSqliteDescriptor.js +2 -0
  195. package/dist/generated/VmUserAccountConfig.d.ts +9 -0
  196. package/dist/generated/VmUserAccountConfig.js +2 -0
  197. package/dist/generated/VmUserConfig.d.ts +19 -0
  198. package/dist/generated/VmUserConfig.js +1 -0
  199. package/dist/generated/WasmLimitsConfig.d.ts +1 -0
  200. package/dist/generated-protocol.d.ts +60 -2
  201. package/dist/generated-protocol.js +166 -31
  202. package/dist/kernel-proxy.d.ts +4 -0
  203. package/dist/kernel-proxy.js +53 -20
  204. package/dist/native-client.d.ts +3 -3
  205. package/dist/native-client.js +43 -8
  206. package/dist/node-runtime-options-schema.d.ts +1 -1
  207. package/dist/node-runtime-options-schema.js +43 -1
  208. package/dist/node-runtime.d.ts +12 -3
  209. package/dist/node-runtime.js +8 -7
  210. package/dist/process.d.ts +5 -1
  211. package/dist/process.js +35 -8
  212. package/dist/protocol-client.d.ts +9 -2
  213. package/dist/protocol-client.js +127 -7
  214. package/dist/protocol-frames.d.ts +14 -3
  215. package/dist/protocol-frames.js +26 -1
  216. package/dist/protocol-schema.d.ts +1 -1
  217. package/dist/protocol-schema.js +1 -1
  218. package/dist/request-payloads.d.ts +4 -1
  219. package/dist/request-payloads.js +7 -2
  220. package/dist/response-payloads.d.ts +22 -1
  221. package/dist/response-payloads.js +33 -1
  222. package/dist/sidecar-errors.d.ts +22 -0
  223. package/dist/sidecar-errors.js +10 -0
  224. package/dist/sidecar-process.d.ts +12 -2
  225. package/dist/sidecar-process.js +77 -12
  226. package/dist/test-runtime.d.ts +19 -7
  227. package/dist/test-runtime.js +213 -66
  228. package/dist/vm-config.d.ts +5 -1
  229. package/package.json +11 -6
  230. package/commands/codex +0 -0
  231. package/commands/codex-exec +0 -0
  232. package/commands/http_get +0 -0
  233. package/dist/generated/ToolLimitsConfig.d.ts +0 -10
  234. /package/dist/generated/{ToolLimitsConfig.js → BindingLimitsConfig.js} +0 -0
@@ -1,4 +1,117 @@
1
1
  import { encodeLengthPrefixedPayload, tryDecodeLengthPrefixedPayload, } from "./framing.js";
2
+ /**
3
+ * Presents two physically independent frame streams as one transport while
4
+ * retaining strict lane ownership. An error or EOF on either lane is terminal
5
+ * to consumers of the combined transport.
6
+ */
7
+ export class SplitLaneFrameTransport {
8
+ ordinary;
9
+ control;
10
+ selectWriteLane;
11
+ frameListeners = new Set();
12
+ errorListeners = new Set();
13
+ endListeners = new Set();
14
+ removeLaneListeners = [];
15
+ terminalError = null;
16
+ constructor(options) {
17
+ this.ordinary = options.ordinary;
18
+ this.control = options.control;
19
+ this.selectWriteLane = options.selectWriteLane;
20
+ this.removeLaneListeners.push(this.ordinary.onFrame((frame) => {
21
+ try {
22
+ options.validateOrdinaryFrame?.(frame);
23
+ }
24
+ catch (error) {
25
+ this.emitError(error);
26
+ return;
27
+ }
28
+ this.emitFrame(frame);
29
+ }), this.control.onFrame((frame) => {
30
+ try {
31
+ options.validateControlFrame?.(frame);
32
+ }
33
+ catch (error) {
34
+ this.emitError(error);
35
+ return;
36
+ }
37
+ this.emitFrame(frame);
38
+ }), this.ordinary.onError((error) => this.emitError(error)), this.control.onError((error) => this.emitError(error)), this.ordinary.onEnd(() => this.emitEnd()), this.control.onEnd(() => this.emitEnd()));
39
+ }
40
+ onFrame(handler) {
41
+ this.frameListeners.add(handler);
42
+ return () => {
43
+ this.frameListeners.delete(handler);
44
+ };
45
+ }
46
+ onError(handler) {
47
+ this.errorListeners.add(handler);
48
+ return () => {
49
+ this.errorListeners.delete(handler);
50
+ };
51
+ }
52
+ onEnd(handler) {
53
+ this.endListeners.add(handler);
54
+ return () => {
55
+ this.endListeners.delete(handler);
56
+ };
57
+ }
58
+ async writeFrame(frame) {
59
+ if (this.terminalError) {
60
+ throw this.terminalError;
61
+ }
62
+ switch (this.selectWriteLane(frame)) {
63
+ case "ordinary":
64
+ await this.ordinary.writeFrame(frame);
65
+ return;
66
+ case "control":
67
+ await this.control.writeFrame(frame);
68
+ return;
69
+ }
70
+ }
71
+ dispose() {
72
+ this.terminalError ??= new Error("split-lane frame transport disposed");
73
+ this.detachLaneTransports();
74
+ this.frameListeners.clear();
75
+ this.errorListeners.clear();
76
+ this.endListeners.clear();
77
+ }
78
+ emitFrame(frame) {
79
+ if (this.terminalError) {
80
+ return;
81
+ }
82
+ for (const listener of this.frameListeners) {
83
+ listener(frame);
84
+ }
85
+ }
86
+ emitError(error) {
87
+ const normalized = error instanceof Error ? error : new Error(String(error));
88
+ if (this.terminalError) {
89
+ return;
90
+ }
91
+ this.terminalError = normalized;
92
+ this.detachLaneTransports();
93
+ for (const listener of this.errorListeners) {
94
+ listener(normalized);
95
+ }
96
+ }
97
+ emitEnd() {
98
+ if (this.terminalError) {
99
+ return;
100
+ }
101
+ this.terminalError = new Error("split-lane frame transport ended");
102
+ this.detachLaneTransports();
103
+ for (const listener of this.endListeners) {
104
+ listener();
105
+ }
106
+ }
107
+ detachLaneTransports() {
108
+ for (const removeListener of this.removeLaneListeners.splice(0)) {
109
+ removeListener();
110
+ }
111
+ this.ordinary.dispose();
112
+ this.control.dispose();
113
+ }
114
+ }
2
115
  export class StdioFrameTransport {
3
116
  stdin;
4
117
  stdout;
@@ -1,4 +1,20 @@
1
1
  export type AcpLimitsConfig = {
2
2
  maxReadLineBytes?: number;
3
3
  stdoutBufferByteLimit?: number;
4
+ maxCompletedMessageBytes?: number;
5
+ maxTurnOutputBytes?: number;
6
+ maxPromptBytes?: number;
7
+ maxPromptBlocks?: number;
8
+ maxFallbackContinuationBytes?: number;
9
+ maxSessionHistoryBytes?: number;
10
+ maxSessionHistoryEvents?: number;
11
+ maxHistoryPageEntries?: number;
12
+ maxSessionListEntries?: number;
13
+ maxSessionsPerVm?: number;
14
+ maxPromptsPerSession?: number;
15
+ maxPromptsPerVm?: number;
16
+ maxPendingPermissionsPerSession?: number;
17
+ maxPendingPermissionsPerVm?: number;
18
+ maxPermissionOutcomesPerSession?: number;
19
+ maxPermissionOutcomesPerVm?: number;
4
20
  };
@@ -0,0 +1,10 @@
1
+ export type BindingLimitsConfig = {
2
+ defaultBindingTimeoutMs?: number;
3
+ maxBindingTimeoutMs?: number;
4
+ maxRegisteredCollections?: number;
5
+ maxRegisteredBindingsPerVm?: number;
6
+ maxBindingsPerCollection?: number;
7
+ maxBindingSchemaBytes?: number;
8
+ maxExamplesPerBinding?: number;
9
+ maxBindingExampleInputBytes?: number;
10
+ };
@@ -5,6 +5,8 @@ import type { RootFilesystemConfig } from "./RootFilesystemConfig.js";
5
5
  import type { VmDnsConfig } from "./VmDnsConfig.js";
6
6
  import type { VmLimitsConfig } from "./VmLimitsConfig.js";
7
7
  import type { VmListenPolicyConfig } from "./VmListenPolicyConfig.js";
8
+ import type { VmSqliteDescriptor } from "./VmSqliteDescriptor.js";
9
+ import type { VmUserConfig } from "./VmUserConfig.js";
8
10
  /**
9
11
  * Canonical Rust-side VM config. Unknown fields must stay rejected here and in
10
12
  * the TS preflight schema at
@@ -14,6 +16,8 @@ import type { VmListenPolicyConfig } from "./VmListenPolicyConfig.js";
14
16
  export type CreateVmConfig = {
15
17
  cwd?: string;
16
18
  env: Record<string, string>;
19
+ database?: VmSqliteDescriptor;
20
+ user?: VmUserConfig;
17
21
  rootFilesystem: RootFilesystemConfig;
18
22
  permissions?: PermissionsPolicy;
19
23
  limits?: VmLimitsConfig;
@@ -0,0 +1,12 @@
1
+ export type Http2LimitsConfig = {
2
+ maxConnections?: number;
3
+ maxStreams?: number;
4
+ maxStreamsPerConnection?: number;
5
+ maxBufferedBytes?: number;
6
+ maxHeaderBytes?: number;
7
+ maxDataBytes?: number;
8
+ maxPendingCommands?: number;
9
+ maxPendingCommandBytes?: number;
10
+ maxPendingEvents?: number;
11
+ maxPendingEventBytes?: number;
12
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -7,5 +7,6 @@ export type JsRuntimeLimitsConfig = {
7
7
  capturedOutputLimitBytes?: number;
8
8
  stdinBufferLimitBytes?: number;
9
9
  eventPayloadLimitBytes?: number;
10
+ maxTimers?: number;
10
11
  v8IpcMaxFrameBytes?: number;
11
12
  };
@@ -1,4 +1,4 @@
1
1
  export type MountPluginDescriptor = {
2
2
  id: string;
3
- config: import("../descriptors.js").MountConfigJsonValue;
3
+ config: import("@rivet-dev/agentos-runtime-core/descriptors").MountConfigJsonValue;
4
4
  };
@@ -0,0 +1,7 @@
1
+ export type ProcessLimitsConfig = {
2
+ maxSpawnFileActions?: number;
3
+ maxSpawnFileActionBytes?: number;
4
+ pendingStdinBytes?: number;
5
+ pendingEventCount?: number;
6
+ pendingEventBytes?: number;
7
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,23 @@
1
+ export type ReactorLimitsConfig = {
2
+ maxCapabilities?: number;
3
+ maxReadyHandles?: number;
4
+ maxTasks?: number;
5
+ workQuantum?: number;
6
+ byteQuantum?: number;
7
+ maxHandleCommands?: number;
8
+ maxHandleCommandBytes?: number;
9
+ maxBridgeCalls?: number;
10
+ maxBridgeRequestBytes?: number;
11
+ maxBridgeResponseBytes?: number;
12
+ maxAsyncCompletions?: number;
13
+ maxAsyncCompletionBytes?: number;
14
+ maxBlockingJobs?: number;
15
+ maxBlockingBytes?: number;
16
+ perHandleOperationQuantum?: number;
17
+ acceptQuantum?: number;
18
+ datagramQuantum?: number;
19
+ completionQuantum?: number;
20
+ signalQuantum?: number;
21
+ shutdownDeadlineMs?: number;
22
+ operationDeadlineMs?: number;
23
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export type SqliteLimitsConfig = {
2
+ maxResultBytes?: number;
3
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export type TlsLimitsConfig = {
2
+ maxBufferedBytes?: number;
3
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export type UdpLimitsConfig = {
2
+ maxBufferedDatagrams?: number;
3
+ maxBufferedBytes?: number;
4
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export type VmGroupConfig = {
2
+ gid: number;
3
+ name: string;
4
+ members: Array<string>;
5
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -1,18 +1,30 @@
1
1
  import type { AcpLimitsConfig } from "./AcpLimitsConfig.js";
2
+ import type { BindingLimitsConfig } from "./BindingLimitsConfig.js";
3
+ import type { Http2LimitsConfig } from "./Http2LimitsConfig.js";
2
4
  import type { HttpLimitsConfig } from "./HttpLimitsConfig.js";
3
5
  import type { JsRuntimeLimitsConfig } from "./JsRuntimeLimitsConfig.js";
4
6
  import type { PluginLimitsConfig } from "./PluginLimitsConfig.js";
7
+ import type { ProcessLimitsConfig } from "./ProcessLimitsConfig.js";
5
8
  import type { PythonLimitsConfig } from "./PythonLimitsConfig.js";
9
+ import type { ReactorLimitsConfig } from "./ReactorLimitsConfig.js";
6
10
  import type { ResourceLimitsConfig } from "./ResourceLimitsConfig.js";
7
- import type { ToolLimitsConfig } from "./ToolLimitsConfig.js";
11
+ import type { SqliteLimitsConfig } from "./SqliteLimitsConfig.js";
12
+ import type { TlsLimitsConfig } from "./TlsLimitsConfig.js";
13
+ import type { UdpLimitsConfig } from "./UdpLimitsConfig.js";
8
14
  import type { WasmLimitsConfig } from "./WasmLimitsConfig.js";
9
15
  export type VmLimitsConfig = {
16
+ reactor?: ReactorLimitsConfig;
10
17
  resources?: ResourceLimitsConfig;
11
18
  http?: HttpLimitsConfig;
12
- tools?: ToolLimitsConfig;
19
+ udp?: UdpLimitsConfig;
20
+ tls?: TlsLimitsConfig;
21
+ http2?: Http2LimitsConfig;
22
+ bindings?: BindingLimitsConfig;
13
23
  plugins?: PluginLimitsConfig;
14
24
  acp?: AcpLimitsConfig;
25
+ sqlite?: SqliteLimitsConfig;
15
26
  jsRuntime?: JsRuntimeLimitsConfig;
16
27
  python?: PythonLimitsConfig;
17
28
  wasm?: WasmLimitsConfig;
29
+ process?: ProcessLimitsConfig;
18
30
  };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Transport used by the VM-scoped SQLite substrate.
3
+ */
4
+ export type VmSqliteDescriptor = {
5
+ "type": "actor_uds";
6
+ path: string;
7
+ } | {
8
+ "type": "sqlite_file";
9
+ path: string;
10
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ export type VmUserAccountConfig = {
2
+ uid: number;
3
+ gid: number;
4
+ username: string;
5
+ homedir: string;
6
+ shell: string;
7
+ gecos?: string;
8
+ supplementaryGids: Array<number>;
9
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { VmGroupConfig } from "./VmGroupConfig.js";
2
+ import type { VmUserAccountConfig } from "./VmUserAccountConfig.js";
3
+ /**
4
+ * Initial Linux-style credentials and account record for processes in a VM.
5
+ */
6
+ export type VmUserConfig = {
7
+ uid?: number;
8
+ gid?: number;
9
+ euid?: number;
10
+ egid?: number;
11
+ username?: string;
12
+ homedir?: string;
13
+ shell?: string;
14
+ gecos?: string;
15
+ groupName?: string;
16
+ supplementaryGids?: Array<number>;
17
+ accounts?: Array<VmUserAccountConfig>;
18
+ groups?: Array<VmGroupConfig>;
19
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -4,4 +4,5 @@ export type WasmLimitsConfig = {
4
4
  syncReadLimitBytes?: number;
5
5
  prewarmTimeoutMs?: number;
6
6
  runnerHeapLimitMb?: number;
7
+ runnerCpuTimeLimitMs?: number;
7
8
  };
@@ -241,11 +241,20 @@ export declare function readMountPluginDescriptor(bc: bare.ByteCursor): MountPlu
241
241
  export declare function writeMountPluginDescriptor(bc: bare.ByteCursor, x: MountPluginDescriptor): void;
242
242
  export type MountDescriptor = {
243
243
  readonly guestPath: string;
244
+ readonly guestSource: string;
245
+ readonly guestFstype: string;
244
246
  readonly readOnly: boolean;
245
247
  readonly plugin: MountPluginDescriptor;
246
248
  };
247
249
  export declare function readMountDescriptor(bc: bare.ByteCursor): MountDescriptor;
248
250
  export declare function writeMountDescriptor(bc: bare.ByteCursor, x: MountDescriptor): void;
251
+ export type MountInfo = {
252
+ readonly path: string;
253
+ readonly kind: string;
254
+ readonly readOnly: boolean;
255
+ };
256
+ export declare function readMountInfo(bc: bare.ByteCursor): MountInfo;
257
+ export declare function writeMountInfo(bc: bare.ByteCursor, x: MountInfo): void;
249
258
  export type SoftwareDescriptor = {
250
259
  readonly packageName: string;
251
260
  readonly root: string;
@@ -330,7 +339,7 @@ export type ConfigureVmRequest = {
330
339
  readonly packages: readonly PackageDescriptor[];
331
340
  readonly packagesMountAt: string;
332
341
  readonly bootstrapCommands: readonly string[];
333
- readonly toolShimCommands: readonly string[];
342
+ readonly bindingShimCommands: readonly string[];
334
343
  };
335
344
  export declare function readConfigureVmRequest(bc: bare.ByteCursor): ConfigureVmRequest;
336
345
  export declare function writeConfigureVmRequest(bc: bare.ByteCursor, x: ConfigureVmRequest): void;
@@ -435,7 +444,12 @@ export type GuestKernelCallRequest = {
435
444
  };
436
445
  export declare function readGuestKernelCallRequest(bc: bare.ByteCursor): GuestKernelCallRequest;
437
446
  export declare function writeGuestKernelCallRequest(bc: bare.ByteCursor, x: GuestKernelCallRequest): void;
438
- export type SnapshotRootFilesystemRequest = null;
447
+ export type SnapshotRootFilesystemRequest = {
448
+ readonly maxBytes: u64;
449
+ };
450
+ export declare function readSnapshotRootFilesystemRequest(bc: bare.ByteCursor): SnapshotRootFilesystemRequest;
451
+ export declare function writeSnapshotRootFilesystemRequest(bc: bare.ByteCursor, x: SnapshotRootFilesystemRequest): void;
452
+ export type ListMountsRequest = null;
439
453
  export type ExecuteRequest = {
440
454
  readonly processId: string;
441
455
  readonly command: string | null;
@@ -630,6 +644,9 @@ export type RequestPayload = {
630
644
  } | {
631
645
  readonly tag: "ProvidedCommandsRequest";
632
646
  readonly val: ProvidedCommandsRequest;
647
+ } | {
648
+ readonly tag: "ListMountsRequest";
649
+ readonly val: ListMountsRequest;
633
650
  };
634
651
  export declare function readRequestPayload(bc: bare.ByteCursor): RequestPayload;
635
652
  export declare function writeRequestPayload(bc: bare.ByteCursor, x: RequestPayload): void;
@@ -759,6 +776,11 @@ export type RootFilesystemSnapshotResponse = {
759
776
  };
760
777
  export declare function readRootFilesystemSnapshotResponse(bc: bare.ByteCursor): RootFilesystemSnapshotResponse;
761
778
  export declare function writeRootFilesystemSnapshotResponse(bc: bare.ByteCursor, x: RootFilesystemSnapshotResponse): void;
779
+ export type ListMountsResponse = {
780
+ readonly mounts: readonly MountInfo[];
781
+ };
782
+ export declare function readListMountsResponse(bc: bare.ByteCursor): ListMountsResponse;
783
+ export declare function writeListMountsResponse(bc: bare.ByteCursor, x: ListMountsResponse): void;
762
784
  export type ProcessStartedResponse = {
763
785
  readonly processId: string;
764
786
  readonly pid: u32 | null;
@@ -916,6 +938,19 @@ export declare function writePersistenceFlushedResponse(bc: bare.ByteCursor, x:
916
938
  export type RejectedResponse = {
917
939
  readonly code: string;
918
940
  readonly message: string;
941
+ readonly limitName: string | null;
942
+ readonly configuredLimit: u64 | null;
943
+ readonly currentUsage: u64 | null;
944
+ readonly requested: u64 | null;
945
+ readonly unit: string | null;
946
+ readonly scope: string | null;
947
+ readonly vmId: string | null;
948
+ readonly sessionGeneration: u64 | null;
949
+ readonly capabilityId: u64 | null;
950
+ readonly operation: string | null;
951
+ readonly configurationPath: string | null;
952
+ readonly retryable: boolean | null;
953
+ readonly errno: string | null;
919
954
  };
920
955
  export declare function readRejectedResponse(bc: bare.ByteCursor): RejectedResponse;
921
956
  export declare function writeRejectedResponse(bc: bare.ByteCursor, x: RejectedResponse): void;
@@ -1029,6 +1064,9 @@ export type ResponsePayload = {
1029
1064
  } | {
1030
1065
  readonly tag: "ProvidedCommandsResponse";
1031
1066
  readonly val: ProvidedCommandsResponse;
1067
+ } | {
1068
+ readonly tag: "ListMountsResponse";
1069
+ readonly val: ListMountsResponse;
1032
1070
  };
1033
1071
  export declare function readResponsePayload(bc: bare.ByteCursor): ResponsePayload;
1034
1072
  export declare function writeResponsePayload(bc: bare.ByteCursor, x: ResponsePayload): void;
@@ -1174,6 +1212,23 @@ export type SidecarResponseFrame = {
1174
1212
  };
1175
1213
  export declare function readSidecarResponseFrame(bc: bare.ByteCursor): SidecarResponseFrame;
1176
1214
  export declare function writeSidecarResponseFrame(bc: bare.ByteCursor, x: SidecarResponseFrame): void;
1215
+ export type ShutdownControl = {
1216
+ readonly reason: string;
1217
+ };
1218
+ export declare function readShutdownControl(bc: bare.ByteCursor): ShutdownControl;
1219
+ export declare function writeShutdownControl(bc: bare.ByteCursor, x: ShutdownControl): void;
1220
+ export type ControlPayload = {
1221
+ readonly tag: "ShutdownControl";
1222
+ readonly val: ShutdownControl;
1223
+ };
1224
+ export declare function readControlPayload(bc: bare.ByteCursor): ControlPayload;
1225
+ export declare function writeControlPayload(bc: bare.ByteCursor, x: ControlPayload): void;
1226
+ export type ControlFrame = {
1227
+ readonly schema: ProtocolSchema;
1228
+ readonly payload: ControlPayload;
1229
+ };
1230
+ export declare function readControlFrame(bc: bare.ByteCursor): ControlFrame;
1231
+ export declare function writeControlFrame(bc: bare.ByteCursor, x: ControlFrame): void;
1177
1232
  export type ProtocolFrame = {
1178
1233
  readonly tag: "RequestFrame";
1179
1234
  readonly val: RequestFrame;
@@ -1189,6 +1244,9 @@ export type ProtocolFrame = {
1189
1244
  } | {
1190
1245
  readonly tag: "SidecarResponseFrame";
1191
1246
  readonly val: SidecarResponseFrame;
1247
+ } | {
1248
+ readonly tag: "ControlFrame";
1249
+ readonly val: ControlFrame;
1192
1250
  };
1193
1251
  export declare function readProtocolFrame(bc: bare.ByteCursor): ProtocolFrame;
1194
1252
  export declare function writeProtocolFrame(bc: bare.ByteCursor, x: ProtocolFrame): void;