import { Tool } from '@modelcontextprotocol/sdk/types.js';
import { PhaseManager } from '../core/phase-manager.js';
export function createEnvMapTool(phaseManager: PhaseManager): Tool {
return {
name: 'overseer.env_map',
description: 'Maps and tracks environment variables across phases, identifying required vs. optional variables.',
inputSchema: {
type: 'object',
required: ['repo_name'],
properties: {
repo_name: {
type: 'string',
description: 'Name of the repository',
},
phase_name: {
type: 'string',
description: 'Optional: filter to specific phase',
},
},
},
};
}
export async function handleEnvMap(
args: {
repo_name: string;
phase_name?: string;
},
phaseManager: PhaseManager
): Promise<{
success: boolean;
env_map: Record<
string,
{
variable: string;
required_for_phases: string[];
description?: string;
default_value?: string;
}
>;
message?: string;
}> {
// Note: env_map is a planned feature for v1.1+
// This tool will scan project files for environment variable usage
// and map them to phases where they are required
return {
success: true,
env_map: {},
message: 'Environment mapping is planned for v1.1.0. This tool will analyze project files to identify environment variables and their phase dependencies.',
};
}