/** * Mutable repo operations: submodule update and commit. * * These are intentionally separate from repos.ts (read-only status) * to make the mutation surface explicit. */ /** Cancellation for the mutating repo operations (from the tool's extra.signal). */ export interface RepoActionOpts { signal?: AbortSignal; } export interface SubmoduleUpdateResult { success: boolean; submodule: string; repo: string; old_sha: string | null; new_sha: string | null; commits_pulled: number; changed_files: string[]; staged: boolean; error?: string; } export interface CommitResult { success: boolean; repo: string; commit_hash: string | null; message: string; files_committed: string[]; error?: string; } /** * Update a submodule in a parent repo to the latest commit on its tracking branch. * * Workflow: * 1. cd into submodule * 2. git fetch origin * 3. git checkout origin/ (default: main) * 4. cd back to parent, git add * 5. Report old→new SHA, commits pulled, files changed */ export declare function crosspadSubmoduleUpdate(submodule: string, repo: string, branch?: string, opts?: RepoActionOpts): Promise; /** * Commit changes in a specific repo. * * Safety: * - Refuses if working tree has merge conflicts * - If files specified, stages only those files * - If no files specified, commits whatever is currently staged * - Never pushes to remote */ export declare function crosspadCommit(repo: string, message: string, files?: string[], opts?: RepoActionOpts): Promise;