@rivet-dev/agentos-runtime-core 0.2.13 → 0.2.15
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 +1 -1
- package/commands/[ +0 -0
- package/commands/_stubs +0 -0
- package/commands/awk +0 -0
- package/commands/bash +0 -0
- package/commands/chcon +0 -0
- package/commands/chroot +0 -0
- package/commands/column +0 -0
- package/commands/diff +0 -0
- package/commands/du +0 -0
- package/commands/egrep +0 -0
- package/commands/env +0 -0
- package/commands/expr +0 -0
- package/commands/fgrep +0 -0
- package/commands/file +0 -0
- package/commands/groups +0 -0
- package/commands/gunzip +0 -0
- package/commands/gzip +0 -0
- package/commands/hostid +0 -0
- package/commands/http-test +0 -0
- package/commands/install +0 -0
- package/commands/jq +0 -0
- package/commands/nice +0 -0
- package/commands/pinky +0 -0
- package/commands/rev +0 -0
- package/commands/rg +0 -0
- package/commands/runcon +0 -0
- package/commands/sh +0 -0
- package/commands/sleep +0 -0
- package/commands/spawn-test-host +0 -0
- package/commands/ssh +0 -0
- package/commands/stdbuf +0 -0
- package/commands/strings +0 -0
- package/commands/stty +0 -0
- package/commands/sync +0 -0
- package/commands/tar +0 -0
- package/commands/test +0 -0
- package/commands/timeout +0 -0
- package/commands/tty +0 -0
- package/commands/unzip +0 -0
- package/commands/uptime +0 -0
- package/commands/users +0 -0
- package/commands/wget +0 -0
- package/commands/which +0 -0
- package/commands/who +0 -0
- package/commands/whoami +0 -0
- package/commands/yq +0 -0
- package/commands/zcat +0 -0
- package/commands/zip +0 -0
- package/dist/event-buffer.d.ts +14 -0
- package/dist/event-buffer.js +30 -1
- package/dist/frame-stream.d.ts +1 -0
- package/dist/frame-stream.js +8 -0
- package/dist/generated/ExecutionLimitsConfig.d.ts +5 -0
- package/dist/generated/ExecutionLimitsConfig.js +2 -0
- package/dist/generated/VmLimitsConfig.d.ts +2 -0
- package/dist/generated-protocol.d.ts +546 -0
- package/dist/generated-protocol.js +1438 -122
- package/dist/kernel-proxy.js +1 -1
- package/dist/node-runtime.js +5 -5
- package/dist/request-payloads.d.ts +92 -0
- package/dist/request-payloads.js +62 -0
- package/dist/response-payloads.d.ts +27 -0
- package/dist/response-payloads.js +18 -0
- package/dist/sidecar-process.d.ts +4 -1
- package/dist/sidecar-process.js +15 -2
- package/dist/test-runtime.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @rivet-dev/agentos-runtime-core
|
|
2
2
|
|
|
3
|
-
Raw
|
|
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
|
package/commands/http-test
CHANGED
|
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
|
package/commands/spawn-test-host
CHANGED
|
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
|
package/dist/event-buffer.d.ts
CHANGED
|
@@ -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;
|
package/dist/event-buffer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fromGeneratedExtEnvelope
|
|
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
|
}
|
package/dist/frame-stream.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare class StdioFrameTransport<TReadFrame, TWriteFrame = TReadFrame> i
|
|
|
50
50
|
private readonly stdout;
|
|
51
51
|
private readonly encodeFrame;
|
|
52
52
|
private readonly decodeFrame;
|
|
53
|
+
private readonly sharedStdio;
|
|
53
54
|
private readonly frameListeners;
|
|
54
55
|
private readonly errorListeners;
|
|
55
56
|
private readonly endListeners;
|
package/dist/frame-stream.js
CHANGED
|
@@ -117,6 +117,7 @@ export class StdioFrameTransport {
|
|
|
117
117
|
stdout;
|
|
118
118
|
encodeFrame;
|
|
119
119
|
decodeFrame;
|
|
120
|
+
sharedStdio;
|
|
120
121
|
frameListeners = new Set();
|
|
121
122
|
errorListeners = new Set();
|
|
122
123
|
endListeners = new Set();
|
|
@@ -126,6 +127,10 @@ export class StdioFrameTransport {
|
|
|
126
127
|
this.stdout = options.stdout;
|
|
127
128
|
this.encodeFrame = options.encodeFrame;
|
|
128
129
|
this.decodeFrame = options.decodeFrame;
|
|
130
|
+
this.sharedStdio = this.stdin === this.stdout;
|
|
131
|
+
if (!this.sharedStdio) {
|
|
132
|
+
this.stdin.on("error", this.handleError);
|
|
133
|
+
}
|
|
129
134
|
this.stdout.on("data", this.handleData);
|
|
130
135
|
this.stdout.on("end", this.handleEnd);
|
|
131
136
|
this.stdout.on("error", this.handleError);
|
|
@@ -162,6 +167,9 @@ export class StdioFrameTransport {
|
|
|
162
167
|
});
|
|
163
168
|
}
|
|
164
169
|
dispose() {
|
|
170
|
+
if (!this.sharedStdio) {
|
|
171
|
+
this.stdin.off("error", this.handleError);
|
|
172
|
+
}
|
|
165
173
|
this.stdout.off("data", this.handleData);
|
|
166
174
|
this.stdout.off("end", this.handleEnd);
|
|
167
175
|
this.stdout.off("error", this.handleError);
|
|
@@ -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
|
};
|