import type { ToolDefinition } from "./types.js"; /** * `POST /api/v1/repositories/:repository_id/api_keys` as a tool — shipped in * the platform (`specguard/config/routes.rb`, * `user_repository_api_keys_controller#create`, SPGD-754). * * == Reveal-once, again * * The 201 body carries `api_key.token` — the raw key, the only time it exists * anywhere — exactly as `add_repository`'s does. The body is therefore passed * through UNRESHAPED in both `text` and `structured` for the same reason that * tool states: any reshaping on this hop is a value that cannot be recovered * rather than a field that can be re-fetched. Recovery for a dropped token is * minting another key — this same tool — because the platform ships no * `#regenerate` and no re-serve. * * == The name is top-level and optional * * `params[:name]` defaults to `ApiKey::DEFAULT_NAME` server-side; `undefined` * here means "let the server name it" and simply omits the key from the POST * body. Not re-validated here for the reason `add_repository` states: a second * format rule on this side is a rule with no owner, free to drift from the one * that actually decides. */ declare const createRepositoryApiKey: ToolDefinition; export default createRepositoryApiKey;