mcp-decisive
Version:
MCP server for WRAP decision-making framework with structured output
32 lines • 1.29 kB
JavaScript
import path from 'path';
import { saveJsonFile, readJsonFile, getDataDirectory } from './filesystem.js';
/**
* Options Storage Effect Layer
*
* Handles persistence of options to the file system.
* Uses similar patterns to issue-storage.ts for consistency.
*/
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// Storage Operations
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/**
* Get the full path to the options file
*/
const getOptionsFilePath = () => {
return path.join(getDataDirectory(), 'options.json');
};
/**
* Save options to storage
*/
export const saveOptions = async (optionList) => {
const filePath = getOptionsFilePath();
return await saveJsonFile(filePath, optionList);
};
/**
* Load options from storage
*/
export const loadOptions = async () => {
const filePath = getOptionsFilePath();
return await readJsonFile(filePath);
};
//# sourceMappingURL=options-storage.js.map