MCPcopy Create free account
hub / github.com/Louisym/MiniCC / BashCommandOutput

Class BashCommandOutput

tutorials/14_bash_engine_deep_dive.py:388–405  ·  view source on GitHub ↗

Bash 命令输出 — 源码 bash.rs:36-65 注意这个输出有多丰富。不只是 stdout/stderr, 还有中断标记、后台任务ID、沙箱状态、持久化路径等。 这些信息让模型能理解命令执行的完整上下文: - interrupted=True → 超时了,可能需要重试或换策略 - background_task_id → 可以后续查询任务状态 - sandbox_status → 知道命令在什么安全级别下运行的

Source from the content-addressed store, hash-verified

386
387@dataclass
388class BashCommandOutput:
389 """Bash 命令输出 — 源码 bash.rs:36-65
390
391 注意这个输出有多丰富。不只是 stdout/stderr,
392 还有中断标记、后台任务ID、沙箱状态、持久化路径等。
393
394 这些信息让模型能理解命令执行的完整上下文:
395 - interrupted=True → 超时了,可能需要重试或换策略
396 - background_task_id → 可以后续查询任务状态
397 - sandbox_status → 知道命令在什么安全级别下运行的
398 """
399 stdout: str = ""
400 stderr: str = ""
401 interrupted: bool = False
402 background_task_id: Optional[str] = None
403 sandbox_status: Optional[SandboxStatus] = None
404 return_code_interpretation: Optional[str] = None
405 no_output_expected: Optional[bool] = None
406
407
408def prepare_sandbox_dirs(cwd: Path):

Callers 2

execute_bashFunction · 0.70
_execute_bash_syncFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected