pub(crate) const PRESENCE_TOOL: &str = r#"{
"name": "Presence",
"description": "Who is working on what, so you don't duplicate or overwrite another agent's work. It only informs: nothing is locked or blocked. Every call takes an action. who: which other agents are working on a file or folder (path), a branch, a repository, a topic (query, matched against their goals and to-do lists), or an open PR's files (pr). Call it before starting work in a repository and before opening a PR; with nothing given it lists who works in your current repository. It covers every agent on this computer in every channel (agents on other computers by name and status only, and open PRs on GitHub by their <Agent>@<host> title prefix). Each has its own clone, so files are compared by repository and path: an absolute path in your clone or a repository-relative one both work, and a folder matches everything under it. The answer lists agents (you excluded), strongest first, each with matches of kind claim (they said so with claim), dirty (uncommitted changes), edited (changed it recently), branch, repo, goal or todo, or pr. claim: say what you are working on (path, branch, repo or topic, with a note) so the others see it in who, and get a note when they edit a file inside it; claim before a larger change in a shared repository, not for every edit. Claiming the same thing renews it; it lapses after ttl_minutes. release: drop your claim by id, or all of yours. If someone else is changing the same thing, message them before you change it. status: set the one line the Swarm and Agents conversations show for what you are doing now. Set it when you start a task, when your plan changes, when you are blocked or waiting for an answer (give the question), and when you are done (give the result); not for every step. 5 to 10 words (at most 80 characters), verb first, name the thing (a task #, PR, file or feature): \"Fixing the stale-site restore loop\", \"Waiting: which account should it use?\", \"Done: PR #6190 merged\". It stays until you set another or claim a task, and is shown with its age once it is old. With state waiting, until_minutes (1 to 240) says how long you will be quiet: the quiet watch leaves you alone for that long (30 minutes when you give none), then runs again; any new line also counts as activity.",
"inputSchema": {
"type": "object",
"properties": {
"action": { "type": "string", "enum": ["who", "claim", "release", "status"], "description": "What to do" },
"path": { "type": "string", "description": "who, claim: a file or folder, absolute in your clone or relative to the repository root" },
"branch": { "type": "string", "description": "who, claim: a branch" },
"repo": { "type": "string", "description": "who, claim: owner/repo or a remote URL (default: the repository you are in; alone, claim takes the whole repository)" },
"query": { "type": "string", "description": "who: words that must all appear in another agent's goal or to-do list, case-insensitive" },
"pr": { "type": ["integer", "string"], "description": "who: an open PR in the repository, by number or URL: who else changes its files" },
"topic": { "type": "string", "description": "claim: what the work is about, in a few words (who's query matches it)" },
"note": { "type": "string", "description": "claim: one line for the others" },
"ttl_minutes": { "type": "integer", "description": "claim: how long it lasts (default 120, 5 to 1440)" },
"id": { "type": "string", "description": "release: the claim id from claim; omit to release all of yours" },
"line": { "type": "string", "description": "status: what you are doing now, 5 to 10 words, verb first (at most 80 characters; longer is cut)" },
"state": { "type": "string", "enum": ["working", "blocked", "waiting", "done"], "description": "status: optional, what state the line describes" },
"until_minutes": { "type": "integer", "description": "status, with state waiting: how long you will be quiet, 1 to 240 (default 30)" }
},
"required": ["action"]
}
}"#;