@rivet-dev/agentos-runtime-core 0.2.12 → 0.2.14
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/commands/bash +0 -0
- package/commands/rg +0 -0
- package/commands/sh +0 -0
- package/commands/ssh +0 -0
- package/commands/tar +0 -0
- package/commands/unzip +0 -0
- package/commands/zip +0 -0
- package/dist/frame-stream.d.ts +1 -0
- package/dist/frame-stream.js +8 -0
- package/dist/generated-protocol.d.ts +4 -0
- package/dist/generated-protocol.js +8 -0
- package/dist/request-payloads.d.ts +4 -0
- package/dist/request-payloads.js +4 -0
- package/dist/sidecar-process.d.ts +4 -0
- package/dist/sidecar-process.js +12 -0
- package/dist/test-runtime.d.ts +4 -0
- package/package.json +2 -2
package/commands/bash
CHANGED
|
Binary file
|
package/commands/rg
CHANGED
|
Binary file
|
package/commands/sh
CHANGED
|
Binary file
|
package/commands/ssh
CHANGED
|
Binary file
|
package/commands/tar
CHANGED
|
Binary file
|
package/commands/unzip
CHANGED
|
Binary file
|
package/commands/zip
CHANGED
|
Binary file
|
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);
|
|
@@ -542,6 +542,10 @@ export type VmFetchRequest = {
|
|
|
542
542
|
readonly path: string;
|
|
543
543
|
readonly headersJson: string;
|
|
544
544
|
readonly body: string | null;
|
|
545
|
+
readonly bodyBase64: string | null;
|
|
546
|
+
readonly streamOperation: string | null;
|
|
547
|
+
readonly streamId: string | null;
|
|
548
|
+
readonly maxBytes: u32 | null;
|
|
545
549
|
};
|
|
546
550
|
export declare function readVmFetchRequest(bc: bare.ByteCursor): VmFetchRequest;
|
|
547
551
|
export declare function writeVmFetchRequest(bc: bare.ByteCursor, x: VmFetchRequest): void;
|
|
@@ -1712,6 +1712,10 @@ export function readVmFetchRequest(bc) {
|
|
|
1712
1712
|
path: bare.readString(bc),
|
|
1713
1713
|
headersJson: bare.readString(bc),
|
|
1714
1714
|
body: read0(bc),
|
|
1715
|
+
bodyBase64: read0(bc),
|
|
1716
|
+
streamOperation: read0(bc),
|
|
1717
|
+
streamId: read0(bc),
|
|
1718
|
+
maxBytes: read2(bc),
|
|
1715
1719
|
};
|
|
1716
1720
|
}
|
|
1717
1721
|
export function writeVmFetchRequest(bc, x) {
|
|
@@ -1720,6 +1724,10 @@ export function writeVmFetchRequest(bc, x) {
|
|
|
1720
1724
|
bare.writeString(bc, x.path);
|
|
1721
1725
|
bare.writeString(bc, x.headersJson);
|
|
1722
1726
|
write0(bc, x.body);
|
|
1727
|
+
write0(bc, x.bodyBase64);
|
|
1728
|
+
write0(bc, x.streamOperation);
|
|
1729
|
+
write0(bc, x.streamId);
|
|
1730
|
+
write2(bc, x.maxBytes);
|
|
1723
1731
|
}
|
|
1724
1732
|
export function readRequestPayload(bc) {
|
|
1725
1733
|
const offset = bc.offset;
|
|
@@ -150,6 +150,10 @@ export type LiveRequestPayload = {
|
|
|
150
150
|
path: string;
|
|
151
151
|
headers_json: string;
|
|
152
152
|
body?: string;
|
|
153
|
+
body_base64?: string;
|
|
154
|
+
stream_operation?: "start" | "read" | "cancel";
|
|
155
|
+
stream_id?: string;
|
|
156
|
+
max_bytes?: number;
|
|
153
157
|
} | {
|
|
154
158
|
type: "get_signal_state";
|
|
155
159
|
process_id: string;
|
package/dist/request-payloads.js
CHANGED
|
@@ -231,6 +231,10 @@ export function toGeneratedRequestPayload(payload) {
|
|
|
231
231
|
path: payload.path,
|
|
232
232
|
headersJson: payload.headers_json,
|
|
233
233
|
body: payload.body ?? null,
|
|
234
|
+
bodyBase64: payload.body_base64 ?? null,
|
|
235
|
+
streamOperation: payload.stream_operation ?? null,
|
|
236
|
+
streamId: payload.stream_id ?? null,
|
|
237
|
+
maxBytes: payload.max_bytes ?? null,
|
|
234
238
|
},
|
|
235
239
|
};
|
|
236
240
|
case "get_signal_state":
|
|
@@ -348,6 +348,10 @@ export declare class SidecarProcess {
|
|
|
348
348
|
path: string;
|
|
349
349
|
headersJson: string;
|
|
350
350
|
body?: string;
|
|
351
|
+
bodyBase64?: string;
|
|
352
|
+
streamOperation?: "start" | "read" | "cancel";
|
|
353
|
+
streamId?: string;
|
|
354
|
+
maxBytes?: number;
|
|
351
355
|
}): Promise<string>;
|
|
352
356
|
getSignalState(session: AuthenticatedSession, vm: CreatedVm, processId: string): Promise<SidecarSignalState>;
|
|
353
357
|
getZombieTimerCount(session: AuthenticatedSession, vm: CreatedVm): Promise<SidecarZombieTimerCount>;
|
package/dist/sidecar-process.js
CHANGED
|
@@ -814,6 +814,18 @@ export class SidecarProcess {
|
|
|
814
814
|
path: request.path,
|
|
815
815
|
headers_json: request.headersJson,
|
|
816
816
|
...(request.body !== undefined ? { body: request.body } : {}),
|
|
817
|
+
...(request.bodyBase64 !== undefined
|
|
818
|
+
? { body_base64: request.bodyBase64 }
|
|
819
|
+
: {}),
|
|
820
|
+
...(request.streamOperation !== undefined
|
|
821
|
+
? { stream_operation: request.streamOperation }
|
|
822
|
+
: {}),
|
|
823
|
+
...(request.streamId !== undefined
|
|
824
|
+
? { stream_id: request.streamId }
|
|
825
|
+
: {}),
|
|
826
|
+
...(request.maxBytes !== undefined
|
|
827
|
+
? { max_bytes: request.maxBytes }
|
|
828
|
+
: {}),
|
|
817
829
|
},
|
|
818
830
|
});
|
|
819
831
|
if (response.payload.type !== "vm_fetch_result") {
|
package/dist/test-runtime.d.ts
CHANGED
|
@@ -342,6 +342,10 @@ export interface Kernel extends KernelInterface {
|
|
|
342
342
|
path: string;
|
|
343
343
|
headersJson: string;
|
|
344
344
|
body?: string;
|
|
345
|
+
bodyBase64?: string;
|
|
346
|
+
streamOperation?: "start" | "read" | "cancel";
|
|
347
|
+
streamId?: string;
|
|
348
|
+
maxBytes?: number;
|
|
345
349
|
}): Promise<string>;
|
|
346
350
|
registerBindings(bindings: Record<string, BindingDefinition>): Promise<void>;
|
|
347
351
|
getResourceSnapshot(): Promise<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivet-dev/agentos-runtime-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"test:npm-workflows": "AGENTOS_NPM_WORKFLOWS_E2E=1 vitest run tests/integration/e2e-npm-*.nightly.test.ts tests/integration/e2e-npx-and-pipes.nightly.test.ts tests/integration/e2e-concurrently.nightly.test.ts tests/integration/e2e-nextjs-build.nightly.test.ts --reporter=verbose"
|
|
198
198
|
},
|
|
199
199
|
"dependencies": {
|
|
200
|
-
"@rivet-dev/agentos-runtime-sidecar": "0.2.
|
|
200
|
+
"@rivet-dev/agentos-runtime-sidecar": "0.2.14",
|
|
201
201
|
"@rivetkit/bare-ts": "^0.6.2",
|
|
202
202
|
"zod": "^4.1.11"
|
|
203
203
|
},
|