Skip to main content

FLEET_BULK_STOP_TOOL

Constant FLEET_BULK_STOP_TOOL 

Source
pub(crate) const FLEET_BULK_STOP_TOOL: &str = r#"{
  "name": "FleetBulkStop",
  "description": "Stop many agent panes at once by block_id (get these from FleetList). Destructive — double-check your target list first. Returns JSON {succeeded, failed: [{id, error}...], aborted_early}. Optionally pass `staged` to cap blast radius on a bad selection: stops `batch_size` targets at a time, and if a batch's failure rate exceeds `max_fail_percentage`, the remaining targets are recorded as failed (untried) instead of being attempted — `aborted_early` will be true. Without `staged`, every target is attempted as one batch. Shutting down an agent you don't own (or yourself, without the user asking this turn) waits for a 15-second user override window. Expect this call to take at least 15 seconds; the result says whether the user kept the agent running. Every running target gets its own window, all in parallel, including one on another AgentMux instance on this machine (its user is asked there); a target the user kept is listed in `kept_by_user` and in `failed`.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "targets": { "type": "array", "items": { "type": "string" }, "description": "block_id values to stop (from FleetList)" },
      "signal": { "type": "string", "description": "Optional: SIGKILL or SIGTERM for a forceful stop; default is a graceful stop" },
      "staged": {
        "type": "object",
        "description": "Optional staged rollout to cap blast radius",
        "properties": {
          "batch_size": { "type": "integer", "description": "How many targets to stop per batch" },
          "max_fail_percentage": { "type": "integer", "description": "Abort remaining batches if a completed batch's failure rate exceeds this (0-100)" }
        },
        "required": ["batch_size", "max_fail_percentage"]
      }
    },
    "required": ["targets"]
  }
}"#;