Files
Brandon Martin 39b89360ac fix(plugins): wrap packaged core hooks (#8)
## Summary
- wrap the generated `plugins/cce-core/hooks/hooks.json` contents under
a top-level `hooks` key
- keep `cce-core` pointing at `./hooks/hooks.json` while making the file
shape match the plugin loader schema
- update the package sync script so regenerated core hooks stay valid

## Why
Marketplace installs of `cce-core` failed with:

```text
Hook load failed: [
  {
    "expected": "record",
    "code": "invalid_type",
    "path": ["hooks"],
    "message": "Invalid input: expected record, received undefined"
  }
]
```

The plugin loader expects the external hooks file to contain a top-level
`hooks` record. Our generated file started directly with event keys like
`PreToolUse` and `PostToolUse`, so the loader could not find `hooks`.

## Changes
- update `scripts/sync_plugin_packages.py` to emit `{ "hooks": { ... }
}` for the generated core hooks file
- regenerate `plugins/cce-core/hooks/hooks.json`

## Verification
- `python3 scripts/sync_plugin_packages.py`
- `python3 -m py_compile scripts/sync_plugin_packages.py
install_extensions.py`
- validated `plugins/cce-core/hooks/hooks.json` contains a top-level
`hooks` object
2026-04-01 22:39:30 -05:00
..