Skip to main content

WHO_IS_WORKING_ON_TOOL

Constant WHO_IS_WORKING_ON_TOOL 

Source
pub(crate) const WHO_IS_WORKING_ON_TOOL: &str = r#"{
  "name": "WhoIsWorkingOn",
  "description": "Find out which other agents are working on the same file, folder, repository, branch or topic, so you don't duplicate or overwrite their work. Call it before starting work in a repository, and before opening a PR. It only informs: nothing is locked or blocked. Covers every agent on this computer, in every AgentMux channel; agents on other computers (LAN, cloud) are listed by name and status only. Each agent has its own clone, so files are compared by repository and path inside it: an absolute path in your clone or a repository-relative path both work, and a folder matches everything under it. With no arguments it lists who is working in your current repository. Returns JSON: agents (you excluded), strongest first, each {agent, channel, status, goal, repo, branch, git_checked_ms, matches: [{kind, detail, since_ms}]}, where kind is claim (they said they are working on it, with ClaimWork), dirty (uncommitted changes in their clone), edited (they changed it recently), branch (same branch), repo (same repository), goal or todo (query matched their goal or checklist), or pr (an open PR on GitHub touches it: read through your gh-agent, cached 2 minutes, credited by its <Agent>@<host> title prefix, else its GitHub author, so it covers agents on other computers too, listed with channel github and their host). With pr, it answers who else changes that PR's files: other open PRs, and agents on this computer with those files changed or edited. If GitHub can't be read, pr_error says why and the rest of the answer stands. Git facts (repo, branch, uncommitted files) are refreshed in the background, usually every 20 to 30 seconds; git_checked_ms says when each agent's were taken. If someone else is changing the same thing, message them with SendMessage before you change it.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "path":   { "type": "string", "description": "A file or folder: absolute in your clone, or relative to the repository root" },
      "repo":   { "type": "string", "description": "owner/repo or a remote URL. Defaults to the repository you are in" },
      "branch": { "type": "string", "description": "A branch name: who else is on it" },
      "query":  { "type": "string", "description": "Words to look for in other agents' goals and todo lists, case-insensitive, all must appear (e.g. \"muxbus allowlist\")" },
      "pr":     { "type": ["integer", "string"], "description": "An open PR in the repository, by number (12) or URL: who else is changing its files. Check before opening or merging a PR" }
    }
  }
}"#;