# 1.1.1 — `register` works on copied / moved drafts

Patch release. Fixes **Bug #3**, found during end-to-end verification of 1.1.0 against real CapCut 8.x on Windows. **Additive bugfix — no breaking changes, `draft_content.json` output byte-identical.**

## Highlights

- 🛠️ **`register` no longer trusts a stale sidecar.** It now derives the draft's name and folder path from the directory you point it at, not from whatever `draft_meta_info.json` happened to say. Copy or move a draft into CapCut's Projects folder, run `register`, and CapCut opens it under the correct name.
- 🔑 **Idempotency key changed from `draft_id` to `draft_fold_path`.** A `cp -r` of a draft keeps the same `draft_id`; the old code saw the duplicate id and silently skipped indexing the copy. Now a different folder with a colliding id gets a fresh id and is indexed correctly. Re-registering the *same* directory is still a no-op.

## Bug fixed

### Bug #3 — `register` failed on copied / moved drafts

`capcut-david register <dir>` read `draft_name` and `draft_fold_path` straight out of the target's `draft_meta_info.json`. A draft generated at path A and then copied to CapCut path B still carried A's name and path, so the `root_meta_info.json` entry pointed at the old location and CapCut couldn't open it. Worse, dedup was keyed on `draft_id` — a `cp -r` keeps the id, so `register` returned `{"added": false}` and wrote nothing.

**Fix:** `register` now

- derives `draft_name` from `basename(<dir>)` and `draft_fold_path` from the resolved absolute `<dir>`,
- rewrites the target's `draft_meta_info.json` so the sidecar matches where the draft actually lives,
- regenerates a fresh v4 `draft_id` when the existing id collides with a *different* folder, and
- dedups on `draft_fold_path` (re-registering the same directory stays a no-op).

The recommended one-shot `capcut-david psycho-build <manifest> --out <dir> --register` is **unaffected** — it already writes a correct `--out`-derived sidecar before registering. This was re-verified end-to-end against real CapCut as part of this release.

## CLI surface

Unchanged. No new commands or flags:

```
capcut-david register <draft-dir> [--projects-root <dir>]
capcut-david psycho-build <manifest.yaml> [--out <dir>] [--seed <n>]
                                          [--register] [--projects-root <dir>]
```

## Migration from 1.1.0

**No code changes required.**

- `register <dir>` now always reflects the directory you pass — if you previously worked around Bug #3 by hand-patching `draft_meta_info.json` or `root_meta_info.json`, you can stop; just run `register`.
- If you relied on the old `draft_id` dedup to skip re-registering a renamed copy, note the key is now `draft_fold_path`: a copy in a new folder *will* now be indexed (which is the correct behavior).

## Compatibility

- CapCut ≥ 5.x desktop (Windows + macOS), JianYing 6+ unsupported — unchanged.
- Node `>= 18` — unchanged.
- Runtime dependencies: zero — unchanged.
- 2 new tests (196 total). All existing tests pass; aggregate coverage stays above the 80% gate.

## Roadmap (1.x — non-binding)

Unchanged from 1.0.0:

- `1.x.0` — `capcut-david query` (animation / sticker / effect / filter catalogue lookup)
- `1.x.0` — `capcut-david validate <project>` (schema-invariant linter)
- `1.x.0` — JianYing 6+ research; `psycho-build` dynamic audio ducking
