Add infrastructure changelog system to task-mcp

Implements session-aware infrastructure change tracking for CF-179.

Changes:
- New changelog.ts with 3 MCP tools:
  - changelog_add: Add infrastructure changes
  - changelog_since_session: Query changes since last session
  - changelog_list: Time-based fallback query
- Integrated with session-start command via MCP
- Database-first architecture (PostgreSQL on infra VM)
- Session-relative queries (not fixed time windows)

Database schema:
- infrastructure_changelog table (6 fields)
- Migrated 5 historical changes
- Indexes on date, session_id, created_at

Task: CF-179

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-01-17 12:13:24 +02:00
parent 8db391f680
commit cc88b234ae
3 changed files with 169 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ import { taskDelegations, taskDelegationQuery } from './tools/delegations.js';
import { projectLock, projectUnlock, projectLockStatus, projectContext } from './tools/locks.js';
import { versionAdd, versionList, versionShow, versionUpdate, versionRelease, versionAssignTask } from './tools/versions.js';
import { taskCommitAdd, taskCommitRemove, taskCommitsList, taskLinkCommits, sessionTasks } from './tools/commits.js';
import { changelogAdd, changelogSinceSession, changelogList } from './tools/changelog.js';
import {
componentRegister,
componentList,
@@ -287,6 +288,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
});
break;
// Infrastructure Changelog
case 'changelog_add':
result = await changelogAdd(a as any);
break;
case 'changelog_since_session':
result = await changelogSinceSession(a as any);
break;
case 'changelog_list':
result = await changelogList(a.days_back, a.limit);
break;
// Impact Analysis
case 'component_register':
result = JSON.stringify(await componentRegister(a.id, a.name, a.type, {