Commit Graph
4 Commits
Author SHA1 Message Date
Willie 7af9224896 fix(diff): list only what sync prunes, and have doctor follow it (#942)
Three previews disagreed with what sync does to a link no skill or
agent maps to.

The agent diff, in the CLI and the dashboard, listed every orphan link
as a removal. Agent sync prunes a link only in merge mode, and only when
it is broken or points into the source, so a live link to another
location was listed forever. Both diffs now ask the function prune uses.

The CLI diff listed no orphan links at all for merge-mode skills, so a
skill removed from the source showed nothing until sync pruned its
link. It now lists the links sync.OrphanLink says prune removes.

doctor called a broken link "did not create, kept" whenever OwnsLink was
false. Prune also removes a broken link under a name the manifest
records in any form once no skill maps to it, so doctor told the user to
delete by hand a link that sync removes. It now reports those as broken
and suggests sync. An empty source counts as "every entry is an orphan";
only a failed discovery turns the check off.

Closes #939
Closes #940
Closes #941
2026-11-17 13:38:31 +08:00
Willie 72ed5ba0fb fix(diff): compare extension agent outputs and apply target filters (#414)
* fix(diff): compare extension agent outputs and apply target filters

#392 taught status and doctor to recognise converted extension outputs,
but diff (CLI) and the Sync tab (/api/diff) still compared the target
directory's *.md files against the source name. A target whose extension
renames the output (codex -> .toml) therefore listed every agent as
pending after a sync.

Both diff paths now use the same manifest-based check as status, and
report tracked outputs whose source is gone as prune items. They also
apply the target's include/exclude and the agents' frontmatter targets,
so an agent that sync would skip is no longer shown as pending.

Refs #391

* chore(release): request 0.24.6

The pending feat commits would make Release Please propose 0.25.0. This
batch is meant to ship as the 0.24.6 patch, so ask for that version.

Release-As: 0.24.6
2026-10-05 15:40:19 +08:00
Willie 568d2b7f64 fix: address code review findings
- Fix data race: read agentsSource inside RLock in handleDiffStream
- Validate kind param in handleSync (reject invalid values)
- Add test for symlink-points-elsewhere agent diff case
- Always show KindBadge on DiffItemRow (default to 'skill')
2026-04-09 23:50:42 +08:00
Willie 335092066f feat(server): add computeAgentTargetDiff for agent diff in UI
Port agent diff logic from CLI (diff_agents.go) to server package.
Returns []diffItem with Kind='agent' for link/update/prune/local actions.
2026-04-09 23:34:21 +08:00