/** * The scope contract injected into EVERY agent prompt (2026-10-25). * * A QA run lost its TeamShare tools at the 63-minute mark and then spent an * hour operating the platform: listing processes, reading `~/.teamshare` and * the harness's own MCP config, and finally calling the API with a live key it * had read off disk. The run was not malicious - nothing had ever told it what * was out of scope, and nothing failed when its own tools disappeared. * * Two rules live here, both load-bearing: * 1. a run works its TASK; it is not the operator of TeamShare/bridge/MCP; * 2. a tool failure is a BLOCKER to report, not a platform to repair. * * Paired with the harness-level guard (a QA run has no shell at all) and the * runtime classifier in `scope-guard.ts`, this is the layer that still works on * harnesses with no permission model (codex/gemini/cursor). */ /** Full contract: task runs and tool/research runs. */ export declare const AGENT_SCOPE_BLOCK = "## Your scope (read before acting)\n\nYou are here to do THIS task, not to operate TeamShare.\n\n- FIRST call `whoami`. It must say `kind: \"agent\"` and YOUR agent id. If it says `human`, or another agent, STOP: your MCP identity is wrong (the run fell back to the global harness config). Report it with `ask_human` and end the run - never act in a person's name.\n- In scope: the target system named in this brief, and the `teamshare` MCP tools this brief lists. Nothing else.\n- You are NOT the operator of TeamShare, the bridge, the daemon, MCP, the API or this machine. Never debug, repair, restart or inspect them, even when a tool fails.\n- Never read or print a credential: `~/.teamshare/...`, `~/.config/opencode/...`, session or config files, `ts_...` keys, `X-Api-Key` or `X-TeamShare-*` headers. Never run `teamshare-agent`, `teamshare-bridge` or `opencode`, and never call the TeamShare API by hand.\n- If a TeamShare tool fails, retry it ONCE. If it fails again the run is BLOCKED: call `ask_human` (or submit a `blocked` report when the report path still works), name the tool and the exact error, and STOP.\n- An infrastructure failure is a blocker to report, never work to do."; /** Short form for conversational paths (chat/doc/board/blog/workflow author). */ export declare const AGENT_SCOPE_BLOCK_LIGHT = "## Scope\n\nDo the task; do not operate the platform. FIRST call `whoami`: it must say `kind: \"agent\"` and YOUR agent id. If it says `human` (or another agent), your identity is wrong - stop, say so plainly, and end the turn; never reply in a person's name. Never read or print keys or config (`~/.teamshare`, `~/.config/opencode`), never run `teamshare-agent`/`teamshare-bridge`/`opencode`, and never call the TeamShare API by hand. If a TeamShare tool fails twice, report the blocker with `ask_human` and stop.";