Host-function command output doesn't reach a shell pipe, redirection or command substitution
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, rust, wasm
Línea de trabajo
The issue identifies shell pipelines, redirection, and command substitution as failing, with #1967 and #1983 as related context; it names no source files or tests. Start by tracing how host-function commands are dispatched through the VM shell and compare that path with ordinary shell command output. Done when the listed shell forms receive the host function's output and a regression test covers them.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Written by an AI agent (Claude) on behalf of @jasonkuhrt.
A host-function command's output reaches the caller when the command runs on its own, but not through a pipe, a redirection or a command substitution in the VM's shell. Those all see empty output, and the command still exits 0.
Reproduction on @rivet-dev/agentos-core 0.4.4: one collection, probe, with a ping function returning { pong: 'hello' }, and vm.process.exec(command, { output: { capture: 'all' } }) for each command.
| Command | stdout |
|---|---|
agentos-probe ping --json '{}' |
{"ok":true,"result":{"pong":"hello"}} |
agentos-probe ping --json '{}' | cat |
empty |
agentos-probe ping --json '{}' | wc -c |
0 |
agentos-probe ping --json '{}' > /tmp/out.json; wc -c < /tmp/out.json |
0: the file is empty |
x="$(agentos-probe ping --json '{}')"; echo "[$x]" |
[] |
echo '{"pong":"hello"}' | cat (control) |
{"pong":"hello"} |
const vm = await AgentOs.create({
permissions: { fs: 'allow', childProcess: 'allow', process: 'allow', hostFunction: 'allow', network: 'deny', env: 'deny' },
hostFunctions: {
probe: {
ping: { inputSchema: z.object({}), execute: () => ({ pong: 'hello' }) },
},
},
});
await vm.process.exec(`agentos-probe ping --json '{}' | cat`, {
cwd: '/', timeoutMs: 30_000, output: { capture: 'all' },
});
So a guest can't compose host functions with ordinary shell tools, such as agentos-x list | jq …, > file, or $(…). The silent empty output is worse than an error: a script carries on with nothing.
We work around it by running a host-function command only on its own, through execFile, and refusing pipelines, lists and redirections that contain one.
Possibly related: #1967 delivers JS processes' stdout and stderr to a redirected fd, and #1983 fixed dispatching shell-spawned binding stubs. We haven't checked whether #1967 covers host-function commands.
- Lenguaje dominante
- Rust
- Estrellas
- 4.8k
- Forks
- 270
- Merge medio
- 14 h 28 min
- PR fusionados (30 d)
- 55
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rivet-dev/agentos
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
rivet-dev/agentos#2087 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 Medio día Aptitud para principiantes 32/100
rivet-dev/agentos#2020 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Inline JavaScript resolves dynamic import() from / instead of the working directoryPosiblemente ocupada @mittal-parth la tomó hace 40 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
rivet-dev/agentos#1973 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de rivet-dev/agentos
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Y-ASLant/ElegantClipboard#178 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
linxiv-dev/linXiv#384 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug drawings ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
userFRM/egui-charts#1595 ·
Los mantenedores suelen responder en 1 día
-
tcp: a very large keep-alive interval overflows `Instant` arithmetic (panic in debug builds)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
smoltcp-rs/smoltcp#1235 ·
Los mantenedores suelen responder en 1 día
-
scope:core type:security
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día