rename bash tools: bash_run/bash_status → run/status (#1186)
This commit is contained in:
parent
8af06aefdb
commit
18e0e8fc2b
3 changed files with 10 additions and 10 deletions
|
|
@ -142,7 +142,7 @@ struct BashRunArgs {
|
|||
/// `timed_out` when the limit is exceeded.
|
||||
#[serde(default)]
|
||||
timeout_secs: Option<u64>,
|
||||
/// Optional inline wait: `bash_run` polls for up to `wait_seconds`
|
||||
/// Optional inline wait: `run` polls for up to `wait_seconds`
|
||||
/// (capped at 30) before returning. When the task finishes within the
|
||||
/// window the full status is returned immediately and no wake is fired;
|
||||
/// when the timeout expires the task keeps running and the normal
|
||||
|
|
@ -158,9 +158,9 @@ fn default_wait() -> Option<u64> {
|
|||
|
||||
#[derive(Debug, Deserialize, JsonSchema)]
|
||||
struct BashStatusArgs {
|
||||
/// Task ID returned by `bash_run`.
|
||||
/// Task ID returned by `run`.
|
||||
id: String,
|
||||
/// Optional inline wait: `bash_status` polls for up to `wait_seconds`
|
||||
/// Optional inline wait: `status` polls for up to `wait_seconds`
|
||||
/// (capped at 30) before returning. Useful to avoid a separate
|
||||
/// round-trip when the task is expected to finish soon.
|
||||
#[serde(default)]
|
||||
|
|
@ -176,7 +176,7 @@ impl BashMcp {
|
|||
description = "Run a shell command in the background. Returns a task ID immediately — \
|
||||
do NOT wait inline. When the command finishes, the harness fires a wake with \
|
||||
`from: \"bash-task-<id>\"` and the exit code + last stdout lines in the body; \
|
||||
handle it on a future turn. Use `bash_status` to poll the task status within \
|
||||
handle it on a future turn. Use `status` to poll the task status within \
|
||||
the same turn if needed. `timeout_secs` defaults to 180. Pass `wait_seconds` \
|
||||
(capped at 30) to wait inline for fast commands: when the task finishes within \
|
||||
the window the full status is returned immediately and no wake is fired; when \
|
||||
|
|
@ -184,7 +184,7 @@ impl BashMcp {
|
|||
response is returned. `wait_seconds` defaults to 3; pass `wait_seconds: 0` to \
|
||||
disable inline waiting and always get the immediate response."
|
||||
)]
|
||||
async fn bash_run(&self, Parameters(args): Parameters<BashRunArgs>) -> String {
|
||||
async fn run(&self, Parameters(args): Parameters<BashRunArgs>) -> String {
|
||||
let req = DaemonRequest::BashRun {
|
||||
cmd: args.cmd,
|
||||
timeout_secs: args.timeout_secs,
|
||||
|
|
@ -202,7 +202,7 @@ impl BashMcp {
|
|||
}
|
||||
|
||||
#[tool(
|
||||
description = "Check the status of a background bash task by its ID (from `bash_run`). \
|
||||
description = "Check the status of a background bash task by its ID (from `run`). \
|
||||
Returns the current status (pending/running/done/timed_out/interrupted), exit code \
|
||||
if finished, and a tail of stdout/stderr. Full output lives in \
|
||||
`harness/bash-tasks/<id>.out` / `.err`. \
|
||||
|
|
@ -210,7 +210,7 @@ impl BashMcp {
|
|||
task finishes within the window the full status is returned immediately. Useful to \
|
||||
avoid a separate round-trip when the task is expected to finish soon."
|
||||
)]
|
||||
async fn bash_status(&self, Parameters(args): Parameters<BashStatusArgs>) -> String {
|
||||
async fn status(&self, Parameters(args): Parameters<BashStatusArgs>) -> String {
|
||||
let id = args.id.clone();
|
||||
let req = DaemonRequest::BashStatus {
|
||||
id: args.id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue