import type { ToolDefinition } from "./types.js"; /** * `DELETE /api/v1/repositories/:repository_id/api_keys/:id` as a tool — * shipped in the platform (`specguard/config/routes.rb`, * `user_repository_api_keys_controller#destroy`, SPGD-754). * * == Replacement-mint-then-revoke is the rotation model * * The platform ships no `#regenerate`. Rotating a compromised key is therefore * two calls with tools this slice lands together: mint a replacement * (`create_repository_api_key`), deploy it, then revoke the old one here. That * ordering is stated in the description because it is the one thing an agent * must know before it revokes — revoke-first locks the repository's CI out * until a human intervenes. * * == The id is scoped to the repository * * `repository.api_keys.find_by(id: params[:id])` + an explicit raise — a key * id belonging to a DIFFERENT repository is a 404, not a cross-repository * delete. The bridge relies on that scoping entirely and adds no client-side * check of its own, for the reason every tool here states: the server is the * gate. * * == 204 with no body * * The same empty-body success `remove_repository` serves; the same reason * `deleteJson` exists rather than routing a 204 through `requestJson`. */ declare const revokeRepositoryApiKey: ToolDefinition; export default revokeRepositoryApiKey;