import type { ToolDefinition } from "./types.js"; /** * `PATCH /api/v1/repositories/:repository_id/members/:id` as a tool — shipped * in the platform (`specguard/config/routes.rb`, * `Api::V1::UserRepositoryMembersController#update`, SPGD-875). * * == The body is `{permissions: []}` and nothing else * * The controller permits exactly that one key, and the ARRAY form because the * column is `text[]`: a scalar permit silently drops the array server-side. * This tool therefore REQUIRES a string array — a scalar or nested value is * refused client-side as a shape error before anything is sent. * * == The id is a MEMBERSHIP id, scoped to the repository * * `find_membership!` looks the row up THROUGH the repository, so a membership * id belonging to a different repository is a 404, never a cross-repository * write. The bridge adds no client-side check of that scoping: the server is * the gate. * * == Where the id comes from * * `#serialize` serves the membership id on every member response — the list * (`list_repository_members`), the 201 body (`add_repository_member`) and * this tool's own 200 body — so an agent that listed or added a member * already holds the id this call names. There is no name-based lookup: the * id comes off those responses, and lookup is scoped through the repository * (a foreign id is refused 404). */ declare const updateRepositoryMemberPermissions: ToolDefinition; export default updateRepositoryMemberPermissions;