@rivet-dev/agentos-runtime-core 0.2.14 → 0.2.16-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +1 -1
  2. package/commands/[ +0 -0
  3. package/commands/_stubs +0 -0
  4. package/commands/awk +0 -0
  5. package/commands/bash +0 -0
  6. package/commands/chcon +0 -0
  7. package/commands/chroot +0 -0
  8. package/commands/column +0 -0
  9. package/commands/diff +0 -0
  10. package/commands/du +0 -0
  11. package/commands/egrep +0 -0
  12. package/commands/env +0 -0
  13. package/commands/expr +0 -0
  14. package/commands/fgrep +0 -0
  15. package/commands/file +0 -0
  16. package/commands/groups +0 -0
  17. package/commands/gunzip +0 -0
  18. package/commands/gzip +0 -0
  19. package/commands/hostid +0 -0
  20. package/commands/http-test +0 -0
  21. package/commands/install +0 -0
  22. package/commands/jq +0 -0
  23. package/commands/nice +0 -0
  24. package/commands/pinky +0 -0
  25. package/commands/rev +0 -0
  26. package/commands/rg +0 -0
  27. package/commands/runcon +0 -0
  28. package/commands/sh +0 -0
  29. package/commands/sleep +0 -0
  30. package/commands/spawn-test-host +0 -0
  31. package/commands/ssh +0 -0
  32. package/commands/stdbuf +0 -0
  33. package/commands/strings +0 -0
  34. package/commands/stty +0 -0
  35. package/commands/sync +0 -0
  36. package/commands/tar +0 -0
  37. package/commands/test +0 -0
  38. package/commands/timeout +0 -0
  39. package/commands/tty +0 -0
  40. package/commands/unzip +0 -0
  41. package/commands/uptime +0 -0
  42. package/commands/users +0 -0
  43. package/commands/wget +0 -0
  44. package/commands/which +0 -0
  45. package/commands/who +0 -0
  46. package/commands/whoami +0 -0
  47. package/commands/yq +0 -0
  48. package/commands/zcat +0 -0
  49. package/commands/zip +0 -0
  50. package/dist/event-buffer.d.ts +14 -0
  51. package/dist/event-buffer.js +30 -1
  52. package/dist/generated/ExecutionLimitsConfig.d.ts +5 -0
  53. package/dist/generated/ExecutionLimitsConfig.js +2 -0
  54. package/dist/generated/VmLimitsConfig.d.ts +2 -0
  55. package/dist/generated-protocol.d.ts +546 -0
  56. package/dist/generated-protocol.js +1438 -122
  57. package/dist/kernel-proxy.js +1 -1
  58. package/dist/node-runtime.js +5 -5
  59. package/dist/request-payloads.d.ts +92 -0
  60. package/dist/request-payloads.js +62 -0
  61. package/dist/response-payloads.d.ts +27 -0
  62. package/dist/response-payloads.js +18 -0
  63. package/dist/sidecar-process.d.ts +4 -1
  64. package/dist/sidecar-process.js +15 -2
  65. package/dist/test-runtime.js +3 -3
  66. package/package.json +2 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @rivet-dev/agentos-runtime-core
2
2
 
3
- Raw Secure Exec protocol types and codecs.
3
+ Raw AgentOS language execution protocol types and codecs.
4
4
 
5
5
  - `@rivet-dev/agentos-runtime-core/protocol` exports the generated sidecar protocol.
6
6
  - `@rivet-dev/agentos-runtime-core/binary` resolves the published `agentos-native-sidecar` binary. `AGENTOS_NATIVE_SIDECAR_BIN` overrides only this native runtime; the legacy `AGENTOS_SIDECAR_BIN` override remains the fallback.
package/commands/[ CHANGED
Binary file
package/commands/_stubs CHANGED
Binary file
package/commands/awk CHANGED
Binary file
package/commands/bash CHANGED
Binary file
package/commands/chcon CHANGED
Binary file
package/commands/chroot CHANGED
Binary file
package/commands/column CHANGED
Binary file
package/commands/diff CHANGED
Binary file
package/commands/du CHANGED
Binary file
package/commands/egrep CHANGED
Binary file
package/commands/env CHANGED
Binary file
package/commands/expr CHANGED
Binary file
package/commands/fgrep CHANGED
Binary file
package/commands/file CHANGED
Binary file
package/commands/groups CHANGED
Binary file
package/commands/gunzip CHANGED
Binary file
package/commands/gzip CHANGED
Binary file
package/commands/hostid CHANGED
Binary file
Binary file
package/commands/install CHANGED
Binary file
package/commands/jq CHANGED
Binary file
package/commands/nice CHANGED
Binary file
package/commands/pinky CHANGED
Binary file
package/commands/rev CHANGED
Binary file
package/commands/rg CHANGED
Binary file
package/commands/runcon CHANGED
Binary file
package/commands/sh CHANGED
Binary file
package/commands/sleep CHANGED
Binary file
Binary file
package/commands/ssh CHANGED
Binary file
package/commands/stdbuf CHANGED
Binary file
package/commands/strings CHANGED
Binary file
package/commands/stty CHANGED
Binary file
package/commands/sync CHANGED
Binary file
package/commands/tar CHANGED
Binary file
package/commands/test CHANGED
Binary file
package/commands/timeout CHANGED
Binary file
package/commands/tty CHANGED
Binary file
package/commands/unzip CHANGED
Binary file
package/commands/uptime CHANGED
Binary file
package/commands/users CHANGED
Binary file
package/commands/wget CHANGED
Binary file
package/commands/which CHANGED
Binary file
package/commands/who CHANGED
Binary file
package/commands/whoami CHANGED
Binary file
package/commands/yq CHANGED
Binary file
package/commands/zcat CHANGED
Binary file
package/commands/zip CHANGED
Binary file
@@ -19,6 +19,12 @@ export type LiveSidecarEventPayload = {
19
19
  type: "structured";
20
20
  name: string;
21
21
  detail: Record<string, string>;
22
+ } | {
23
+ type: "execution_output";
24
+ event: protocol.ExecutionOutputEvent;
25
+ } | {
26
+ type: "execution_completed";
27
+ event: protocol.ExecutionCompletedEvent;
22
28
  } | {
23
29
  type: "ext";
24
30
  envelope: LiveExtEnvelope;
@@ -51,6 +57,14 @@ export type LiveSidecarEventSelector = {
51
57
  ownership?: LiveOwnershipScope;
52
58
  name?: string;
53
59
  detail?: Record<string, string>;
60
+ } | {
61
+ type: "execution_output";
62
+ ownership?: LiveOwnershipScope;
63
+ executionId?: string;
64
+ } | {
65
+ type: "execution_completed";
66
+ ownership?: LiveOwnershipScope;
67
+ executionId?: string;
54
68
  };
55
69
  export type LiveSidecarBufferedEventRecord<TEvent extends LiveSidecarEventFrame> = {
56
70
  event: TEvent;
@@ -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
  }
@@ -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 {};
@@ -1,5 +1,6 @@
1
1
  import type { AcpLimitsConfig } from "./AcpLimitsConfig.js";
2
2
  import type { BindingLimitsConfig } from "./BindingLimitsConfig.js";
3
+ import type { ExecutionLimitsConfig } from "./ExecutionLimitsConfig.js";
3
4
  import type { Http2LimitsConfig } from "./Http2LimitsConfig.js";
4
5
  import type { HttpLimitsConfig } from "./HttpLimitsConfig.js";
5
6
  import type { JsRuntimeLimitsConfig } from "./JsRuntimeLimitsConfig.js";
@@ -26,5 +27,6 @@ export type VmLimitsConfig = {
26
27
  jsRuntime?: JsRuntimeLimitsConfig;
27
28
  python?: PythonLimitsConfig;
28
29
  wasm?: WasmLimitsConfig;
30
+ execution?: ExecutionLimitsConfig;
29
31
  process?: ProcessLimitsConfig;
30
32
  };