/** * The routing rule, written where dsh will actually read it. * * This package ships an `AGENTS.md` at its own root, and that file is NOT * loaded by the harness. `@deepseek-ai/dsh-agent-instructions` reads * `$DSH_HOME/AGENTS.md` and then each directory from the project root down to * the session cwd. It never scans `node_modules`, so a dependency's root * `AGENTS.md` reaches nobody. The shipped copy is documentation for a human; * THIS is the copy the model sees. */ /** Fences the managed region so re-connecting updates rather than duplicates. */ export declare const BLOCK_START = ""; export declare const BLOCK_END = ""; /** * Deliberately no agent id, owner id, or scope list. This file is written to a * developer's home directory and is routinely copied into project roots and * pasted into issues; identity in it would leak by the ordinary use of it. */ export declare const ROUTING_BLOCK = "\n# AgentValet\n\nPlatform access for this agent is brokered by AgentValet. No API keys are\nstored on this machine.\n\nFor any action on an external SaaS platform (Slack, GitHub, Gmail, Stripe,\nLinear, Notion, and similar), call `agentvalet_list_platforms` FIRST. If the\nplatform appears, route the call through the AgentValet tools. Do not call the\nplatform's API directly and do not use another tool for it \u2014 other routes\nbypass the audit log and the owner's approval flow.\n\n| Operation | Tool |\n|---|---|\n| Read | `agentvalet_read_platform` (always GET) |\n| Create or update | `agentvalet_write_platform` (POST, PUT or PATCH) |\n| Delete | `agentvalet_delete_platform` (always DELETE) |\n\nPass the platform id and the scope string verbatim as returned by\n`agentvalet_list_platforms`. Grants can change at any time; if a call fails,\nlist again before retrying.\n\nIf a call is declined by the owner, do not retry it and do not look for another\nway to achieve the same result. Report the decline to the user.\n\nIf the platform is not listed, say so rather than falling back to a direct API\ncall.\n"; /** What `writeRoutingInstructions` did, so the caller can say so plainly. */ export type InstructionsOutcome = { kind: 'created'; path: string; } | { kind: 'updated'; path: string; } | { kind: 'unchanged'; path: string; } | { kind: 'failed'; path: string; error: string; }; /** * Write or refresh the managed block in `/AGENTS.md`. * * Never rewrites the whole file: anything outside the fences is the user's and * is preserved byte for byte. A file that already has the fences has only the * region between them replaced. * * Never throws. This runs immediately after enrolment, at which point the * single-use bootstrap token is already spent and the identity is already on * disk — failing the command here would strand a real agent behind an error * about a markdown file. The outcome is returned so the caller can report it. */ export declare function writeRoutingInstructions(dshHome: string): Promise;