/** * * Records (or revokes / inspects) a current-task user authorization for * a worktree-mutating operation. The PreToolUse gate * (`src/services/hooks/worktree-authorization-gate.ts`) reads the * resulting file before allowing `git worktree ...`, `git stash ...`, * or `Agent(isolation: worktree)` tool calls. * * Sub-commands: * - grant : append a one-shot (or multi-use) authorization * - revoke : remove all unconsumed grants * - status : list current grants + fingerprint * * Default TTL: 5 min, single-use. Multi-use is opt-in via --multi. * Default operation: `git-worktree` (the most common ask). Specify * `--operation agent-isolation-worktree` or `--operation git-stash-mutating` * when authorizing a different shape. * * This command is invoked by the LLM after the user has explicitly * authorized the operation in the current task. It must NOT be invoked * autonomously without a user prompt that names the operation. The * command itself does not enforce user confirmation — that is the * peaks-code orchestrator's responsibility (see * `skills/peaks-code/SKILL.md` "Worktree authorization" red line). */ import type { Command } from 'commander'; import { type ProgramIO } from '../cli-helpers.js'; export declare function registerWorktreeAuthCommand(program: Command, io: ProgramIO): void;