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
|
|
@ -2003,7 +2003,7 @@ pub const SERVER_NAME: &str = "hyperhive";
|
||||||
/// exist in the session. Web egress (`WebFetch`/`WebSearch`) are
|
/// exist in the session. Web egress (`WebFetch`/`WebSearch`) are
|
||||||
/// tool-group-gated (`web_tools`) — off by default. Nested agents
|
/// tool-group-gated (`web_tools`) — off by default. Nested agents
|
||||||
/// (`Task`) are intentionally omitted. `Bash` is disallowed — shell
|
/// (`Task`) are intentionally omitted. `Bash` is disallowed — shell
|
||||||
/// execution goes through `mcp__hive_bash__bash_run` (background tasks
|
/// execution goes through `mcp__bash__run` (background tasks
|
||||||
/// with structured output via `hive-bash-mcp`) instead of a raw interactive shell. `TodoWrite`
|
/// with structured output via `hive-bash-mcp`) instead of a raw interactive shell. `TodoWrite`
|
||||||
/// is omitted because the todo list lives in claude's in-process session
|
/// is omitted because the todo list lives in claude's in-process session
|
||||||
/// state and silently evaporates on /compact or session reset — agents
|
/// state and silently evaporates on /compact or session reset — agents
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ struct BashRunArgs {
|
||||||
/// `timed_out` when the limit is exceeded.
|
/// `timed_out` when the limit is exceeded.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
timeout_secs: Option<u64>,
|
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
|
/// (capped at 30) before returning. When the task finishes within the
|
||||||
/// window the full status is returned immediately and no wake is fired;
|
/// window the full status is returned immediately and no wake is fired;
|
||||||
/// when the timeout expires the task keeps running and the normal
|
/// when the timeout expires the task keeps running and the normal
|
||||||
|
|
@ -158,9 +158,9 @@ fn default_wait() -> Option<u64> {
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, JsonSchema)]
|
#[derive(Debug, Deserialize, JsonSchema)]
|
||||||
struct BashStatusArgs {
|
struct BashStatusArgs {
|
||||||
/// Task ID returned by `bash_run`.
|
/// Task ID returned by `run`.
|
||||||
id: String,
|
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
|
/// (capped at 30) before returning. Useful to avoid a separate
|
||||||
/// round-trip when the task is expected to finish soon.
|
/// round-trip when the task is expected to finish soon.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
|
@ -176,7 +176,7 @@ impl BashMcp {
|
||||||
description = "Run a shell command in the background. Returns a task ID immediately — \
|
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 \
|
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; \
|
`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` \
|
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 \
|
(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 \
|
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 \
|
response is returned. `wait_seconds` defaults to 3; pass `wait_seconds: 0` to \
|
||||||
disable inline waiting and always get the immediate response."
|
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 {
|
let req = DaemonRequest::BashRun {
|
||||||
cmd: args.cmd,
|
cmd: args.cmd,
|
||||||
timeout_secs: args.timeout_secs,
|
timeout_secs: args.timeout_secs,
|
||||||
|
|
@ -202,7 +202,7 @@ impl BashMcp {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tool(
|
#[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 \
|
Returns the current status (pending/running/done/timed_out/interrupted), exit code \
|
||||||
if finished, and a tail of stdout/stderr. Full output lives in \
|
if finished, and a tail of stdout/stderr. Full output lives in \
|
||||||
`harness/bash-tasks/<id>.out` / `.err`. \
|
`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 \
|
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."
|
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 id = args.id.clone();
|
||||||
let req = DaemonRequest::BashStatus {
|
let req = DaemonRequest::BashStatus {
|
||||||
id: args.id,
|
id: args.id,
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ in
|
||||||
default = [ ];
|
default = [ ];
|
||||||
description = ''
|
description = ''
|
||||||
Deprecated - has no effect. The built-in Bash tool is fully
|
Deprecated - has no effect. The built-in Bash tool is fully
|
||||||
disabled regardless of this list; agents use mcp__hyperhive__bash_run
|
disabled regardless of this list; agents use mcp__bash__run
|
||||||
instead. Remove this option from your agent.nix.
|
instead. Remove this option from your agent.nix.
|
||||||
'';
|
'';
|
||||||
visible = false;
|
visible = false;
|
||||||
|
|
@ -612,7 +612,7 @@ in
|
||||||
config = {
|
config = {
|
||||||
warnings = lib.optional (config.hyperhive.allowedBashPatterns != [ ]) ''
|
warnings = lib.optional (config.hyperhive.allowedBashPatterns != [ ]) ''
|
||||||
hyperhive.allowedBashPatterns is deprecated and has no effect.
|
hyperhive.allowedBashPatterns is deprecated and has no effect.
|
||||||
The built-in Bash tool is fully disabled; agents use mcp__hyperhive__bash_run instead.
|
The built-in Bash tool is fully disabled; agents use mcp__bash__run instead.
|
||||||
Remove allowedBashPatterns from your agent.nix.
|
Remove allowedBashPatterns from your agent.nix.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue