@rivet-dev/agentos-runtime-core 0.2.8-rc.1 → 0.2.8-rc.2
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/_stubs +0 -0
- package/commands/bash +0 -0
- package/commands/chcon +0 -0
- package/commands/chgrp +0 -0
- package/commands/chown +0 -0
- package/commands/chroot +0 -0
- package/commands/df +0 -0
- package/commands/groups +0 -0
- package/commands/hostid +0 -0
- package/commands/hostname +0 -0
- package/commands/id +0 -0
- package/commands/install +0 -0
- package/commands/kill +0 -0
- package/commands/mkfifo +0 -0
- package/commands/mknod +0 -0
- package/commands/pinky +0 -0
- package/commands/runcon +0 -0
- package/commands/sh +0 -0
- package/commands/stty +0 -0
- package/commands/sync +0 -0
- package/commands/tty +0 -0
- package/commands/uptime +0 -0
- package/commands/users +0 -0
- package/commands/who +0 -0
- package/dist/kernel-proxy.js +12 -13
- package/dist/test-runtime.d.ts +2 -0
- package/package.json +2 -2
package/commands/_stubs
CHANGED
|
Binary file
|
package/commands/bash
CHANGED
|
Binary file
|
package/commands/chcon
CHANGED
|
Binary file
|
package/commands/chgrp
CHANGED
|
Binary file
|
package/commands/chown
CHANGED
|
Binary file
|
package/commands/chroot
CHANGED
|
Binary file
|
package/commands/df
CHANGED
|
Binary file
|
package/commands/groups
CHANGED
|
Binary file
|
package/commands/hostid
CHANGED
|
Binary file
|
package/commands/hostname
CHANGED
|
Binary file
|
package/commands/id
CHANGED
|
Binary file
|
package/commands/install
CHANGED
|
Binary file
|
package/commands/kill
CHANGED
|
Binary file
|
package/commands/mkfifo
CHANGED
|
Binary file
|
package/commands/mknod
CHANGED
|
Binary file
|
package/commands/pinky
CHANGED
|
Binary file
|
package/commands/runcon
CHANGED
|
Binary file
|
package/commands/sh
CHANGED
|
Binary file
|
package/commands/stty
CHANGED
|
Binary file
|
package/commands/sync
CHANGED
|
Binary file
|
package/commands/tty
CHANGED
|
Binary file
|
package/commands/uptime
CHANGED
|
Binary file
|
package/commands/users
CHANGED
|
Binary file
|
package/commands/who
CHANGED
|
Binary file
|
package/dist/kernel-proxy.js
CHANGED
|
@@ -506,7 +506,7 @@ export class NativeSidecarKernelProxy {
|
|
|
506
506
|
return proc;
|
|
507
507
|
}
|
|
508
508
|
openShell(options) {
|
|
509
|
-
const
|
|
509
|
+
const terminalHandlers = new Set();
|
|
510
510
|
const stderrHandlers = new Set();
|
|
511
511
|
const command = options?.command ?? "sh";
|
|
512
512
|
const args = options?.args ??
|
|
@@ -565,7 +565,7 @@ export class NativeSidecarKernelProxy {
|
|
|
565
565
|
const normalized = normalizeSyntheticTerminalText(text);
|
|
566
566
|
updateSyntheticCursor(normalized);
|
|
567
567
|
const chunk = textEncoder.encode(normalized);
|
|
568
|
-
for (const handler of
|
|
568
|
+
for (const handler of terminalHandlers) {
|
|
569
569
|
handler(chunk);
|
|
570
570
|
}
|
|
571
571
|
};
|
|
@@ -576,7 +576,7 @@ export class NativeSidecarKernelProxy {
|
|
|
576
576
|
const normalized = normalizeSyntheticTerminalText(text);
|
|
577
577
|
updateSyntheticCursor(normalized);
|
|
578
578
|
const chunk = textEncoder.encode(normalized);
|
|
579
|
-
for (const handler of
|
|
579
|
+
for (const handler of terminalHandlers) {
|
|
580
580
|
handler(chunk);
|
|
581
581
|
}
|
|
582
582
|
};
|
|
@@ -621,7 +621,7 @@ export class NativeSidecarKernelProxy {
|
|
|
621
621
|
commandInFlight = false;
|
|
622
622
|
const promptPrefix = syntheticCursorAtLineStart ? "" : "\r\n";
|
|
623
623
|
const promptChunk = textEncoder.encode(`${promptPrefix}${promptText}`);
|
|
624
|
-
for (const handler of
|
|
624
|
+
for (const handler of terminalHandlers) {
|
|
625
625
|
handler(promptChunk);
|
|
626
626
|
}
|
|
627
627
|
syntheticCursorAtLineStart = false;
|
|
@@ -658,7 +658,7 @@ export class NativeSidecarKernelProxy {
|
|
|
658
658
|
}
|
|
659
659
|
};
|
|
660
660
|
let onData = null;
|
|
661
|
-
|
|
661
|
+
terminalHandlers.add((data) => onData?.(data));
|
|
662
662
|
if (options?.onStderr) {
|
|
663
663
|
stderrHandlers.add(options.onStderr);
|
|
664
664
|
}
|
|
@@ -817,7 +817,7 @@ export class NativeSidecarKernelProxy {
|
|
|
817
817
|
cwd: options?.cwd,
|
|
818
818
|
streamStdin: true,
|
|
819
819
|
onStdout: (chunk) => {
|
|
820
|
-
for (const handler of
|
|
820
|
+
for (const handler of terminalHandlers) {
|
|
821
821
|
handler(chunk);
|
|
822
822
|
}
|
|
823
823
|
if (commandInFlight) {
|
|
@@ -825,6 +825,11 @@ export class NativeSidecarKernelProxy {
|
|
|
825
825
|
}
|
|
826
826
|
},
|
|
827
827
|
onStderr: (chunk) => {
|
|
828
|
+
// `onData` is the ordered PTY rendering stream. `onStderr` remains an
|
|
829
|
+
// optional channel-specific diagnostic tap and must not also be rendered.
|
|
830
|
+
for (const handler of terminalHandlers) {
|
|
831
|
+
handler(chunk);
|
|
832
|
+
}
|
|
828
833
|
for (const handler of stderrHandlers) {
|
|
829
834
|
handler(chunk);
|
|
830
835
|
}
|
|
@@ -878,13 +883,7 @@ export class NativeSidecarKernelProxy {
|
|
|
878
883
|
const stdin = process.stdin;
|
|
879
884
|
const stdout = process.stdout;
|
|
880
885
|
const { onData, ...shellOptions } = options ?? {};
|
|
881
|
-
const shell = this.openShell(
|
|
882
|
-
...shellOptions,
|
|
883
|
-
onStderr: shellOptions.onStderr ??
|
|
884
|
-
((data) => {
|
|
885
|
-
process.stderr.write(data);
|
|
886
|
-
}),
|
|
887
|
-
});
|
|
886
|
+
const shell = this.openShell(shellOptions);
|
|
888
887
|
const outputHandler = onData ??
|
|
889
888
|
((data) => {
|
|
890
889
|
stdout.write(data);
|
package/dist/test-runtime.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ export interface ManagedProcess {
|
|
|
118
118
|
export interface ShellHandle {
|
|
119
119
|
pid: number;
|
|
120
120
|
write(data: Uint8Array | string): void;
|
|
121
|
+
/** Ordered PTY output containing stdout and stderr exactly once. */
|
|
121
122
|
onData: ((data: Uint8Array) => void) | null;
|
|
122
123
|
resize(cols: number, rows: number): void;
|
|
123
124
|
kill(signal?: number): void;
|
|
@@ -130,6 +131,7 @@ export interface OpenShellOptions {
|
|
|
130
131
|
cwd?: string;
|
|
131
132
|
cols?: number;
|
|
132
133
|
rows?: number;
|
|
134
|
+
/** Optional stderr-only diagnostic tap; do not render it alongside `onData`. */
|
|
133
135
|
onStderr?: (data: Uint8Array) => void;
|
|
134
136
|
}
|
|
135
137
|
export interface ConnectTerminalOptions extends OpenShellOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivet-dev/agentos-runtime-core",
|
|
3
|
-
"version": "0.2.8-rc.
|
|
3
|
+
"version": "0.2.8-rc.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
"test": "vitest run"
|
|
193
193
|
},
|
|
194
194
|
"dependencies": {
|
|
195
|
-
"@rivet-dev/agentos-runtime-sidecar": "0.2.8-rc.
|
|
195
|
+
"@rivet-dev/agentos-runtime-sidecar": "0.2.8-rc.2",
|
|
196
196
|
"@rivetkit/bare-ts": "^0.6.2",
|
|
197
197
|
"zod": "^4.1.11"
|
|
198
198
|
},
|