You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(agent): replace the shell tool with the myshell process EDSL
The agent no longer has a shell. Commands are spawned from `run_moonbit`
programs through `bobzhang/myshell`, a shell-free process EDSL where the
executable and the argument vector stay separate: `Cmd("moon", ["check"])`
passes every argument literally, so `|`, `>`, `&&`, `$()` and `*` have no
meaning and there is no quoting to get wrong. Pipes and control flow are
ordinary MoonBit — capture `out.stdout` and filter it in code — which is
also what replaces grep/sed/awk.
What this removes is a parsing layer and the string heuristics defending
it. What it keeps is everything the shell tool actually delivered:
- Background jobs move to `run_moonbit`'s `run_in_background`, watched by
`job_output` and `job_stop` (renamed from `shell_output`/`shell_stop`,
since a registry without a shell must not advertise shell names). The
job runtime, its spill dir, and the completion-notice steer are wired
as before.
- A detached snippet owns its directory until the session scope ends,
rather than being reclaimed by the call that started it.
- The foreground bound rises from 60s to 300s, because a snippet now runs
whole `moon test` cycles rather than only compute.
The source-write sandbox still wraps every run. Note the consequence: the
shell tool could statically recognize trusted source-writing moon commands
(`moon fmt`, `moon info`, `moon add`, `moon test --update`) and run them
exempt, but an arbitrary snippet cannot be classified that way, so those
commands are denied and source changes go through the file tools. The
system prompt says so directly and tells the agent to report the commands
it could not run.
`run_moonbit` keeps refusing native FFI; it no longer refuses spawning
processes, which is now the point of the tool.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments