export const gitShowObjectDetailsDependencyDeclarations = [
    {
        dependencyId: "runtime.execEngine.git.runGit",
        kind: "runtime",
        required: true,
        description: "Runtime-provided git executor exposed through BaseToolExecutorPort.git.runGit",
    },
    {
        dependencyId: "runtime.governancePlane.toolInvocationGrant",
        kind: "permission",
        required: true,
        description: "dryRun:false requires an affirmative runtime guard before provider dispatch.",
    },
    {
        dependencyId: "git",
        kind: "binary",
        required: true,
        description: "Host git binary used by the runtime-owned git executor.",
    },
];
export function createHostExecutorGitShowObjectDetailsProvider(executor) {
    const runGit = executor?.git?.runGit;
    if (runGit === undefined) {
        return undefined;
    }
    return async (request, _context) => {
        const result = await runGit({
            repositoryPath: request.repositoryPath,
            args: request.args,
            timeoutMs: request.timeoutMs,
        });
        if (!result.ok) {
            throw new Error(result.error.message);
        }
        return result.output;
    };
}
