import type { ToolDefinition } from "./types.js"; /** * `POST /api/v1/repositories/:repository_id/members` as a tool — shipped in the * platform (`specguard/config/routes.rb`, * `Api::V1::UserRepositoryMembersController#create`, SPGD-875). * * == The handle is the LOGIN itself * * `User.resolve_by_handle` refuses a profile URL and a display name with its * own sentence ("Send the login itself — octocat, not a profile URL or a * display name"), and each non-`:found` resolution — never-signed-in, * archived, ambiguous, malformed — arrives as a distinguishable 400 sentence * through the landed `refusalMessage` branch. This bridge does not re-derive * that vocabulary: a client-side copy is a rule with no owner, free to drift * from the one that actually decides. * * == The grantor is always the authenticated principal * * `granted_by_user` is stamped server-side from the `sgu_` credential and is * deliberately absent from the permitted params. The tool therefore takes no * grantor argument, and no caller can name one. * * == The 201 body carries the membership id * * `#serialize` serves `id`, `handle`, `permissions`, `granted_by`, * `created_at` — and the `id` is the MEMBERSHIP id, the very identifier * `update_repository_member_permissions` and `remove_repository_member` name. * It is not portable: lookup is scoped through the repository, so a foreign * id is refused 404 server-side. */ declare const addRepositoryMember: ToolDefinition; export default addRepositoryMember;