import type { ToolDefinition } from "./types.js"; /** * `DELETE /api/v1/repositories/:id` as a tool — shipped in the platform * (`specguard/config/routes.rb`, `Api::V1::UserRepositoriesController#destroy`, * SPGD-754). * * == The destructive gesture in the whole surface * * Everything else here reads, registers, or mints. This one removes a * repository AND every key, run and intent on it (`memberships_helper.rb`: * "Delete the repository, and every key, run and intent on it"), and there is no * undo. The description therefore carries the hazard BEFORE the call: it is * prompt material, read when the agent is deciding whether to act, not a * footnote discovered after. * * == Authorization is `repo.delete` at either surface * * The controller authorizes through `RepositoryAuthorization`'s `:repo_delete` * fork — deliberately NOT `:owner` — so a member granted `repo.delete` may * remove the repository from either surface. The tool does not probe for the * capability client-side: the server is the gate, and a member without it * receives a 403 whose sentence arrives verbatim through the landed * `refusalMessage` branch in `describeFailure`. * * == 204 with no body * * This is the one response in the `sgu_` surface that is deliberately not a * JSON body — which is why `deleteJson` exists: routing an empty-body 204 * through `requestJson`'s JSON parse would turn a successful delete into * "the body was not JSON". Here, no body IS the success. */ declare const removeRepository: ToolDefinition; export default removeRepository;