#!/usr/bin/env node // Copy the canonical core client into the extension so the bundle is // self-contained. The single source of truth lives in the skill; this keeps the // extension's copy (server/lib/graph.mjs) in sync. Run before packing. import { copyFileSync, mkdirSync } from "node:fs"; import { dirname, join } from "node:path"; import { fileURLToPath } from "node:url"; const here = dirname(fileURLToPath(import.meta.url)); const src = join(here, "..", "..", ".claude", "skills", "ms-todo", "scripts", "lib", "graph.mjs"); const dest = join(here, "..", "server", "lib", "graph.mjs"); mkdirSync(dirname(dest), { recursive: true }); copyFileSync(src, dest); console.log(`Synced core client:\n ${src}\n -> ${dest}`);