aiscope 0.1.2

DevTools for your AI coding tools' memory. See what Cursor, Claude Code, and Copilot actually remember about your project — and where they disagree.
"""Build public npm and skill/plugin bundles alongside native release assets."""
import json
from pathlib import Path
import subprocess
from zipfile import ZIP_DEFLATED, ZipFile

root = Path(__file__).resolve().parents[1]
version = json.loads((root / 'package.json').read_text())['version']
dist = root / 'dist'
dist.mkdir(exist_ok=True)
subprocess.run(['npm', 'pack', '--pack-destination', 'dist'], cwd=root, check=True)
files = ['README.md', 'LICENSE', 'plugin.json', '.codex-plugin/plugin.json', '.claude-plugin/plugin.json']
files += [p.relative_to(root).as_posix() for p in (root / 'skills').rglob('*') if p.is_file()]
for kind in ('plugin', 'skills'):
    with ZipFile(dist / f'aiscope-{kind}-{version}.zip', 'w', ZIP_DEFLATED) as archive:
        for name in files:
            if kind == 'skills' and not name.startswith('skills/'):
                continue
            archive.write(root / name, name if kind == 'plugin' else name.removeprefix('skills/'))