Expand description
Product bash execution impls.
Ports .references/pi/packages/coding-agent/src/core/agent-session.ts
executeBash, recordBashResult, abortBash, isBashRunning,
hasPendingBashMessages, and _flushPendingBashMessages.
Behaviour preserved from the TypeScript contract:
execute_bashprependssettings.shellCommandPrefix(when set), runs through the configuredBashOperations, streams output chunks throughon_chunk, and records aBashExecutionMessageentry on the session.exclude_from_context: true(!!prefix) records the entry with the flag set socrate::core::messagesdrops it from LLM context.- While the agent is streaming, recorded bash messages are queued and
flushed on
agent_endsotool_use/tool_resultordering is preserved. abort_bashcancels the in-flight token; the next call can start a new command.
Lock order: never hold AgentSessionInner across .await. The session
manager async mutex is acquired for append-only persistence.
Structs§
- Bash
Result - Result of a product bash execution (TypeScript
BashResult). - Execute
Bash Options - Options accepted by
AgentSession::execute_bash.
Enums§
- Bash
Exec Error - Errors produced by
AgentSession::execute_bash.