UNPKG

@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,

18 lines 806 B
/** * @fileoverview Defines the core logic for the git working directory resource. * @module src/mcp-server/resources/gitWorkingDir/logic */ import { logger } from "../../../utils/index.js"; /** * Retrieves the current working directory for the session. * @param context The request context for logging and tracing. * @param getWorkingDirectory Function to get the session's working directory. * @param sessionId The ID of the current session. * @returns The current working directory path or 'NOT_SET'. */ export function getGitWorkingDirLogic(context, getWorkingDirectory, sessionId) { logger.debug("Executing getGitWorkingDirLogic...", { ...context, sessionId }); const workingDir = getWorkingDirectory(sessionId); return workingDir ?? "NOT_SET"; } //# sourceMappingURL=logic.js.map