@cyanheads/git-mcp-server
Version:
An MCP (Model Context Protocol) server enabling LLMs and AI agents to interact with Git repositories. Provides tools for comprehensive Git operations including clone, commit, branch, diff, log, status, push, pull, merge, rebase, worktree, tag management,
134 lines • 4.33 kB
TypeScript
/**
* @fileoverview Defines the core logic, schemas, and types for the git_push tool.
* @module src/mcp-server/tools/gitPush/logic
*/
import { z } from "zod";
import { type RequestContext } from "../../../utils/index.js";
export declare const GitPushBaseSchema: z.ZodObject<{
path: z.ZodDefault<z.ZodString>;
remote: z.ZodOptional<z.ZodString>;
branch: z.ZodOptional<z.ZodString>;
remoteBranch: z.ZodOptional<z.ZodString>;
force: z.ZodDefault<z.ZodBoolean>;
forceWithLease: z.ZodDefault<z.ZodBoolean>;
setUpstream: z.ZodDefault<z.ZodBoolean>;
tags: z.ZodDefault<z.ZodBoolean>;
delete: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
path: string;
delete: boolean;
force: boolean;
tags: boolean;
forceWithLease: boolean;
setUpstream: boolean;
remote?: string | undefined;
branch?: string | undefined;
remoteBranch?: string | undefined;
}, {
path?: string | undefined;
delete?: boolean | undefined;
force?: boolean | undefined;
remote?: string | undefined;
branch?: string | undefined;
tags?: boolean | undefined;
remoteBranch?: string | undefined;
forceWithLease?: boolean | undefined;
setUpstream?: boolean | undefined;
}>;
export declare const GitPushInputSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
path: z.ZodDefault<z.ZodString>;
remote: z.ZodOptional<z.ZodString>;
branch: z.ZodOptional<z.ZodString>;
remoteBranch: z.ZodOptional<z.ZodString>;
force: z.ZodDefault<z.ZodBoolean>;
forceWithLease: z.ZodDefault<z.ZodBoolean>;
setUpstream: z.ZodDefault<z.ZodBoolean>;
tags: z.ZodDefault<z.ZodBoolean>;
delete: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
path: string;
delete: boolean;
force: boolean;
tags: boolean;
forceWithLease: boolean;
setUpstream: boolean;
remote?: string | undefined;
branch?: string | undefined;
remoteBranch?: string | undefined;
}, {
path?: string | undefined;
delete?: boolean | undefined;
force?: boolean | undefined;
remote?: string | undefined;
branch?: string | undefined;
tags?: boolean | undefined;
remoteBranch?: string | undefined;
forceWithLease?: boolean | undefined;
setUpstream?: boolean | undefined;
}>, {
path: string;
delete: boolean;
force: boolean;
tags: boolean;
forceWithLease: boolean;
setUpstream: boolean;
remote?: string | undefined;
branch?: string | undefined;
remoteBranch?: string | undefined;
}, {
path?: string | undefined;
delete?: boolean | undefined;
force?: boolean | undefined;
remote?: string | undefined;
branch?: string | undefined;
tags?: boolean | undefined;
remoteBranch?: string | undefined;
forceWithLease?: boolean | undefined;
setUpstream?: boolean | undefined;
}>, {
path: string;
delete: boolean;
force: boolean;
tags: boolean;
forceWithLease: boolean;
setUpstream: boolean;
remote?: string | undefined;
branch?: string | undefined;
remoteBranch?: string | undefined;
}, {
path?: string | undefined;
delete?: boolean | undefined;
force?: boolean | undefined;
remote?: string | undefined;
branch?: string | undefined;
tags?: boolean | undefined;
remoteBranch?: string | undefined;
forceWithLease?: boolean | undefined;
setUpstream?: boolean | undefined;
}>;
export declare const GitPushOutputSchema: z.ZodObject<{
success: z.ZodBoolean;
message: z.ZodString;
rejected: z.ZodOptional<z.ZodBoolean>;
deleted: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
message: string;
success: boolean;
rejected?: boolean | undefined;
deleted?: boolean | undefined;
}, {
message: string;
success: boolean;
rejected?: boolean | undefined;
deleted?: boolean | undefined;
}>;
export type GitPushInput = z.infer<typeof GitPushInputSchema>;
export type GitPushOutput = z.infer<typeof GitPushOutputSchema>;
/**
* 4. IMPLEMENT the core logic function.
* @throws {McpError} If the logic encounters an unrecoverable issue.
*/
export declare function pushGitChanges(params: GitPushInput, context: RequestContext & {
getWorkingDirectory: () => string | undefined;
}): Promise<GitPushOutput>;
//# sourceMappingURL=logic.d.ts.map