Files
wehub-resource-sync adc62957a7
CI / Multi-repo Path Gate (AST-grep) (windows-latest) (push) Has been cancelled
CI / Version Consistency Check (push) Has been cancelled
CI / npm pack + install test (push) Has been cancelled
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Test (Windows path suite) (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / No Committed Build Artifacts (push) Has been cancelled
CI / Multi-repo Path Gate (AST-grep) (ubuntu-latest) (push) Has been cancelled
Upgrade Test / omc update + session-start hook (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:36:54 +08:00

34 lines
706 B
JavaScript
Executable File

#!/usr/bin/env node
/**
* PreCompact Hook: Project Memory Preservation
* Ensures user directives and project context survive compaction
*/
import { processPreCompact } from '../dist/hooks/project-memory/pre-compact.js';
import { readStdin } from './lib/stdin.mjs';
/**
* Main hook execution
*/
async function main() {
try {
const input = await readStdin();
const data = JSON.parse(input);
// Process PreCompact
const result = await processPreCompact(data);
// Return result
console.log(JSON.stringify(result));
} catch (error) {
// Always continue on error
console.log(JSON.stringify({
continue: true,
suppressOutput: true,
}));
}
}
main();