@rivet-dev/agentos-runtime-core 0.0.0-main.2f99c77 → 0.0.0-main.5ac5a14

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 (238) hide show
  1. package/README.md +2 -2
  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/event-buffer.d.ts +14 -0
  172. package/dist/event-buffer.js +30 -1
  173. package/dist/frame-stream.d.ts +34 -0
  174. package/dist/frame-stream.js +121 -0
  175. package/dist/generated/AcpLimitsConfig.d.ts +16 -0
  176. package/dist/generated/BindingLimitsConfig.d.ts +10 -0
  177. package/dist/generated/CreateVmConfig.d.ts +4 -0
  178. package/dist/generated/ExecutionLimitsConfig.d.ts +5 -0
  179. package/dist/generated/ExecutionLimitsConfig.js +2 -0
  180. package/dist/generated/Http2LimitsConfig.d.ts +12 -0
  181. package/dist/generated/Http2LimitsConfig.js +2 -0
  182. package/dist/generated/JsRuntimeLimitsConfig.d.ts +1 -0
  183. package/dist/generated/MountPluginDescriptor.d.ts +1 -1
  184. package/dist/generated/ProcessLimitsConfig.d.ts +7 -0
  185. package/dist/generated/ProcessLimitsConfig.js +2 -0
  186. package/dist/generated/ReactorLimitsConfig.d.ts +23 -0
  187. package/dist/generated/ReactorLimitsConfig.js +2 -0
  188. package/dist/generated/SqliteLimitsConfig.d.ts +3 -0
  189. package/dist/generated/SqliteLimitsConfig.js +2 -0
  190. package/dist/generated/TlsLimitsConfig.d.ts +3 -0
  191. package/dist/generated/TlsLimitsConfig.js +2 -0
  192. package/dist/generated/UdpLimitsConfig.d.ts +4 -0
  193. package/dist/generated/UdpLimitsConfig.js +2 -0
  194. package/dist/generated/VmGroupConfig.d.ts +5 -0
  195. package/dist/generated/VmGroupConfig.js +2 -0
  196. package/dist/generated/VmLimitsConfig.d.ts +16 -2
  197. package/dist/generated/VmSqliteDescriptor.d.ts +10 -0
  198. package/dist/generated/VmSqliteDescriptor.js +2 -0
  199. package/dist/generated/VmUserAccountConfig.d.ts +9 -0
  200. package/dist/generated/VmUserAccountConfig.js +2 -0
  201. package/dist/generated/VmUserConfig.d.ts +19 -0
  202. package/dist/generated/VmUserConfig.js +1 -0
  203. package/dist/generated/WasmLimitsConfig.d.ts +1 -0
  204. package/dist/generated-protocol.d.ts +610 -2
  205. package/dist/generated-protocol.js +1534 -75
  206. package/dist/kernel-proxy.d.ts +4 -0
  207. package/dist/kernel-proxy.js +66 -34
  208. package/dist/native-client.d.ts +3 -3
  209. package/dist/native-client.js +43 -8
  210. package/dist/node-runtime-options-schema.d.ts +1 -1
  211. package/dist/node-runtime-options-schema.js +43 -1
  212. package/dist/node-runtime.d.ts +12 -3
  213. package/dist/node-runtime.js +13 -12
  214. package/dist/process.d.ts +5 -1
  215. package/dist/process.js +35 -8
  216. package/dist/protocol-client.d.ts +9 -2
  217. package/dist/protocol-client.js +127 -7
  218. package/dist/protocol-frames.d.ts +14 -3
  219. package/dist/protocol-frames.js +26 -1
  220. package/dist/protocol-schema.d.ts +1 -1
  221. package/dist/protocol-schema.js +1 -1
  222. package/dist/request-payloads.d.ts +100 -1
  223. package/dist/request-payloads.js +73 -2
  224. package/dist/response-payloads.d.ts +49 -1
  225. package/dist/response-payloads.js +51 -1
  226. package/dist/sidecar-errors.d.ts +22 -0
  227. package/dist/sidecar-errors.js +10 -0
  228. package/dist/sidecar-process.d.ts +20 -3
  229. package/dist/sidecar-process.js +104 -14
  230. package/dist/test-runtime.d.ts +25 -7
  231. package/dist/test-runtime.js +216 -69
  232. package/dist/vm-config.d.ts +5 -1
  233. package/package.json +16 -6
  234. package/commands/codex +0 -0
  235. package/commands/codex-exec +0 -0
  236. package/commands/http_get +0 -0
  237. package/dist/generated/ToolLimitsConfig.d.ts +0 -10
  238. /package/dist/generated/{ToolLimitsConfig.js → BindingLimitsConfig.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { fromGeneratedExtEnvelope, } from "./ext.js";
1
+ import { fromGeneratedExtEnvelope } from "./ext.js";
2
2
  import { ownershipMatchesSelector, ownershipSelectorKey, } from "./ownership.js";
3
3
  import { fromGeneratedStreamChannel, fromGeneratedVmLifecycleState, } from "./protocol-maps.js";
4
4
  export const ANY_BUFFERED_EVENT_KEY = "*";
@@ -114,6 +114,9 @@ function buildBufferKey(type, options) {
114
114
  if (options?.processId) {
115
115
  parts.push(`process:${options.processId}`);
116
116
  }
117
+ if (options?.executionId) {
118
+ parts.push(`execution:${options.executionId}`);
119
+ }
117
120
  if (options?.channel) {
118
121
  parts.push(`channel:${options.channel}`);
119
122
  }
@@ -163,6 +166,12 @@ export function sidecarSelectorMatchesEvent(selector, event) {
163
166
  }
164
167
  return true;
165
168
  }
169
+ case "execution_output":
170
+ case "execution_completed": {
171
+ const payload = event.payload;
172
+ return (selector.executionId === undefined ||
173
+ payload.event.executionId === selector.executionId);
174
+ }
166
175
  }
167
176
  }
168
177
  export function sidecarSelectorBufferKey(selector) {
@@ -194,6 +203,12 @@ export function sidecarSelectorBufferKey(selector) {
194
203
  ownership: selector.ownership,
195
204
  name: selector.name,
196
205
  });
206
+ case "execution_output":
207
+ case "execution_completed":
208
+ return buildBufferKey(selector.type, {
209
+ ownership: selector.ownership,
210
+ executionId: selector.executionId,
211
+ });
197
212
  }
198
213
  }
199
214
  export function normalizeSidecarEventMatcher(selector) {
@@ -239,6 +254,10 @@ export function fromGeneratedEventPayload(payload) {
239
254
  type: "ext",
240
255
  envelope: fromGeneratedExtEnvelope(payload.val),
241
256
  };
257
+ case "ExecutionOutputEvent":
258
+ return { type: "execution_output", event: payload.val };
259
+ case "ExecutionCompletedEvent":
260
+ return { type: "execution_completed", event: payload.val };
242
261
  }
243
262
  }
244
263
  export function sidecarEventWaitAbortError(reason) {
@@ -306,6 +325,16 @@ export function sidecarEventBufferKeys(event) {
306
325
  name: event.payload.name,
307
326
  }));
308
327
  break;
328
+ case "execution_output":
329
+ case "execution_completed":
330
+ keys.add(buildBufferKey(event.payload.type, {
331
+ executionId: event.payload.event.executionId,
332
+ }));
333
+ keys.add(buildBufferKey(event.payload.type, {
334
+ ownership: owner,
335
+ executionId: event.payload.event.executionId,
336
+ }));
337
+ break;
309
338
  case "ext":
310
339
  break;
311
340
  }
@@ -12,11 +12,45 @@ export interface FrameTransport<TReadFrame, TWriteFrame = TReadFrame> {
12
12
  writeFrame(frame: TWriteFrame): Promise<void>;
13
13
  dispose(): void;
14
14
  }
15
+ export type FrameTransportLane = "ordinary" | "control";
16
+ export interface SplitLaneFrameTransportOptions<TOrdinaryReadFrame, TOrdinaryWriteFrame, TControlReadFrame, TControlWriteFrame> {
17
+ ordinary: FrameTransport<TOrdinaryReadFrame, TOrdinaryWriteFrame>;
18
+ control: FrameTransport<TControlReadFrame, TControlWriteFrame>;
19
+ validateOrdinaryFrame?: (frame: TOrdinaryReadFrame) => void;
20
+ validateControlFrame?: (frame: TControlReadFrame) => void;
21
+ selectWriteLane: (frame: TOrdinaryWriteFrame | TControlWriteFrame) => FrameTransportLane;
22
+ }
23
+ /**
24
+ * Presents two physically independent frame streams as one transport while
25
+ * retaining strict lane ownership. An error or EOF on either lane is terminal
26
+ * to consumers of the combined transport.
27
+ */
28
+ export declare class SplitLaneFrameTransport<TOrdinaryReadFrame, TOrdinaryWriteFrame, TControlReadFrame, TControlWriteFrame> implements FrameTransport<TOrdinaryReadFrame | TControlReadFrame, TOrdinaryWriteFrame | TControlWriteFrame> {
29
+ private readonly ordinary;
30
+ private readonly control;
31
+ private readonly selectWriteLane;
32
+ private readonly frameListeners;
33
+ private readonly errorListeners;
34
+ private readonly endListeners;
35
+ private readonly removeLaneListeners;
36
+ private terminalError;
37
+ constructor(options: SplitLaneFrameTransportOptions<TOrdinaryReadFrame, TOrdinaryWriteFrame, TControlReadFrame, TControlWriteFrame>);
38
+ onFrame(handler: (frame: TOrdinaryReadFrame | TControlReadFrame) => void): () => void;
39
+ onError(handler: (error: Error) => void): () => void;
40
+ onEnd(handler: () => void): () => void;
41
+ writeFrame(frame: TOrdinaryWriteFrame | TControlWriteFrame): Promise<void>;
42
+ dispose(): void;
43
+ private emitFrame;
44
+ private emitError;
45
+ private emitEnd;
46
+ private detachLaneTransports;
47
+ }
15
48
  export declare class StdioFrameTransport<TReadFrame, TWriteFrame = TReadFrame> implements FrameTransport<TReadFrame, TWriteFrame> {
16
49
  private readonly stdin;
17
50
  private readonly stdout;
18
51
  private readonly encodeFrame;
19
52
  private readonly decodeFrame;
53
+ private readonly sharedStdio;
20
54
  private readonly frameListeners;
21
55
  private readonly errorListeners;
22
56
  private readonly endListeners;
@@ -1,9 +1,123 @@
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;
5
118
  encodeFrame;
6
119
  decodeFrame;
120
+ sharedStdio;
7
121
  frameListeners = new Set();
8
122
  errorListeners = new Set();
9
123
  endListeners = new Set();
@@ -13,6 +127,10 @@ export class StdioFrameTransport {
13
127
  this.stdout = options.stdout;
14
128
  this.encodeFrame = options.encodeFrame;
15
129
  this.decodeFrame = options.decodeFrame;
130
+ this.sharedStdio = this.stdin === this.stdout;
131
+ if (!this.sharedStdio) {
132
+ this.stdin.on("error", this.handleError);
133
+ }
16
134
  this.stdout.on("data", this.handleData);
17
135
  this.stdout.on("end", this.handleEnd);
18
136
  this.stdout.on("error", this.handleError);
@@ -49,6 +167,9 @@ export class StdioFrameTransport {
49
167
  });
50
168
  }
51
169
  dispose() {
170
+ if (!this.sharedStdio) {
171
+ this.stdin.off("error", this.handleError);
172
+ }
52
173
  this.stdout.off("data", this.handleData);
53
174
  this.stdout.off("end", this.handleEnd);
54
175
  this.stdout.off("error", this.handleError);
@@ -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,5 @@
1
+ export type ExecutionLimitsConfig = {
2
+ completedTtlMs?: number;
3
+ maxCompletedExecutions?: number;
4
+ liveExecutionWarningThreshold?: number;
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 {};
@@ -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,32 @@
1
1
  import type { AcpLimitsConfig } from "./AcpLimitsConfig.js";
2
+ import type { BindingLimitsConfig } from "./BindingLimitsConfig.js";
3
+ import type { ExecutionLimitsConfig } from "./ExecutionLimitsConfig.js";
4
+ import type { Http2LimitsConfig } from "./Http2LimitsConfig.js";
2
5
  import type { HttpLimitsConfig } from "./HttpLimitsConfig.js";
3
6
  import type { JsRuntimeLimitsConfig } from "./JsRuntimeLimitsConfig.js";
4
7
  import type { PluginLimitsConfig } from "./PluginLimitsConfig.js";
8
+ import type { ProcessLimitsConfig } from "./ProcessLimitsConfig.js";
5
9
  import type { PythonLimitsConfig } from "./PythonLimitsConfig.js";
10
+ import type { ReactorLimitsConfig } from "./ReactorLimitsConfig.js";
6
11
  import type { ResourceLimitsConfig } from "./ResourceLimitsConfig.js";
7
- import type { ToolLimitsConfig } from "./ToolLimitsConfig.js";
12
+ import type { SqliteLimitsConfig } from "./SqliteLimitsConfig.js";
13
+ import type { TlsLimitsConfig } from "./TlsLimitsConfig.js";
14
+ import type { UdpLimitsConfig } from "./UdpLimitsConfig.js";
8
15
  import type { WasmLimitsConfig } from "./WasmLimitsConfig.js";
9
16
  export type VmLimitsConfig = {
17
+ reactor?: ReactorLimitsConfig;
10
18
  resources?: ResourceLimitsConfig;
11
19
  http?: HttpLimitsConfig;
12
- tools?: ToolLimitsConfig;
20
+ udp?: UdpLimitsConfig;
21
+ tls?: TlsLimitsConfig;
22
+ http2?: Http2LimitsConfig;
23
+ bindings?: BindingLimitsConfig;
13
24
  plugins?: PluginLimitsConfig;
14
25
  acp?: AcpLimitsConfig;
26
+ sqlite?: SqliteLimitsConfig;
15
27
  jsRuntime?: JsRuntimeLimitsConfig;
16
28
  python?: PythonLimitsConfig;
17
29
  wasm?: WasmLimitsConfig;
30
+ execution?: ExecutionLimitsConfig;
31
+ process?: ProcessLimitsConfig;
18
32
  };
@@ -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
  };