feat(CF-524): Add project_archive MCP method

Implements complete project archival workflow:
- Migration 024: Add archival fields to projects table
- New project-archive.ts tool coordinating:
  * Tarball creation via shell
  * S3 upload with vault credentials
  * Database metadata tracking
  * Optional local deletion
  * Cleanup of temp files
- Registered in tool definitions and handlers

Replaces manual archival process used for Fireberries/CyprusPulse.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-01-27 20:45:56 +02:00
parent a6d24ab86c
commit 3e20a8ea3c
4 changed files with 264 additions and 0 deletions

View File

@@ -83,6 +83,7 @@ import {
sessionPatternDetection,
} from './tools/session-docs.js';
import { archiveAdd, archiveSearch, archiveList, archiveGet } from './tools/archives.js';
import { projectArchive } from './tools/project-archive.js';
// Create MCP server
const server = new Server(
@@ -667,6 +668,16 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
});
break;
// Project archival
case 'project_archive':
result = await projectArchive({
project_key: a.project_key,
project_path: a.project_path,
delete_local: a.delete_local,
session_id: a.session_id,
});
break;
default:
throw new Error(`Unknown tool: ${name}`);
}