Skip to main content

WIDGET_INSTALL_TOOL

Constant WIDGET_INSTALL_TOOL 

Source
pub(crate) const WIDGET_INSTALL_TOOL: &str = r#"{
  "name": "WidgetInstall",
  "description": "Install a widget package you built (a folder with a widget.json, that widget.json, or a .zip) and ask the user to approve it. AgentMux validates and copies it, then shows the user a prompt naming you, the widget and every permission it asks for; you can't approve it yourself. Returns once the user answers or the wait ends: status installed (with its views), declined, pending (still waiting; the user can answer later in Settings → Widgets), or the validation error to fix. Installing again with changes replaces the old version and asks again.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "path":      { "type": "string",  "description": "The package folder, its widget.json, or a .zip; relative paths are in your workspace" },
      "replace":   { "type": "boolean", "description": "Replace an installed package with the same id (default true)" },
      "wait_secs": { "type": "integer", "description": "How long to wait for the user's answer, in seconds (default 300, at most 600)" }
    },
    "required": ["path"]
  }
}"#;