get_all_changes
Retrieve all changes from the change ledger, with optional filtering by ISO timestamp for targeted codebase history.
Instructions
Get all changes in the ledger, optionally filtered by ISO timestamp.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| since | No |
Implementation Reference
- src/managers/LedgerManager.ts:83-98 (handler)Core handler for get_all_changes: reads full ledger, optionally filters by ISO timestamp 'since', returns entries with branch and short SHA context.
async function getAllChanges(since?: string): Promise<LedgerQueryResult> { const [entries, context] = await Promise.all([ fs.readLedger(ledgerPath), git.getBranchContext(repoDir), ]); const filtered = since ? entries.filter((e) => e.timestamp >= since) : entries; return { entries: filtered, branch: context.branch, sha: context.shortSha, }; } - src/tools/ledger.tool.ts:24-26 (schema)Zod schema for get_all_changes inputs: optional 'since' string parameter.
export const GetAllChangesSchema = z.object({ since: z.string().optional(), }); - src/tools/ledger.tool.ts:50-55 (registration)Registration of the 'get_all_changes' MCP tool on the server, wiring schema and calling manager.getAllChanges.
server.tool('get_all_changes', 'Get all changes in the ledger, optionally filtered by ISO timestamp.', GetAllChangesSchema.shape, async (args) => { const result = await manager.getAllChanges(args.since); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; }); - src/managers/LedgerManager.ts:22-27 (helper)LedgerManager interface declaring getAllChanges(since?: string).
export interface LedgerManager { logChange(input: LogChangeInput): Promise<LedgerEntry>; getSessionChanges(sessionId: string): Promise<LedgerQueryResult>; getFileLedger(filePath: string): Promise<LedgerQueryResult>; getAllChanges(since?: string): Promise<LedgerQueryResult>; }