Commit Graph
596 Commits
Author SHA1 Message Date
Willie b5266574a7 fix: rewrite agent update to use discovery + single-file installer
reinstallAgent previously called install.Install() which expects
directory-based skill installation. Agent sources point to .md files,
so the subdir resolver rejected them.

Now uses DiscoverFromGit/DiscoverFromGitSubdir + InstallAgentFromDiscovery
which correctly handles single-file agent copies. Also preserves the
original repo subdir scope for monorepo installs and reconstructs the
correct destination subdirectory for grouped agents.
2026-04-08 16:35:35 +08:00
Willie 4af128fcf0 fix: migrate metadata consumers from Get(basename) to GetByPath
All call sites that looked up metadata entries using filepath.Base()
now use store.GetByPath(relPath) which handles both full-path keys
and legacy basename+group keys transparently.

Also fixes makeInstallOpts() to set SourceDir from updateContext,
preventing nested skill updates from writing metadata to wrong dir.
2026-04-08 16:35:27 +08:00
Willie 2acfec82ec refactor: simplify metadata — extract helpers, remove dual-write, add kind constants
Code quality fixes from review:
- Extract RemoveByNames() to eliminate copy-paste in uninstall Phase 7
- Add MetadataKindSkill/MetadataKindAgent constants
- Remove dual-write shim (findSkillsRoot + writeMetaToCentralized)
- install_apply.go uses WriteMetaToStore with SourceDir (no sidecar)
- Move LoadMetadata out of walk loops (P0 efficiency fix)
- isGroupDir accepts store parameter to avoid redundant loads
- Add SourceDir to InstallOptions for --into group support
2026-04-08 15:00:22 +08:00
Willie e91890d2b0 test: fix all integration tests for centralized .metadata.json format
- Dual-write in WriteMeta: also writes to .metadata.json for backward compat
- Migration looks in parent dir for registry.yaml
- Group uninstall matches entries by Group field + full path
- Sync test uses MetadataStore instead of registry.yaml
- All integration tests pass (0 FAIL)
2026-04-08 14:28:57 +08:00
Willie ed1beb1ccb refactor: replace all remaining ReadMeta/LoadRegistry with MetadataStore
Replace every remaining call to the old per-skill metadata API
(ReadMeta, RefreshMetaHashes, config.LoadRegistry) with the centralized
MetadataStore across 10 files:

Server handlers:
- handler_check.go: use s.skillsStore.Get() instead of ReadMeta
- handler_check_stream.go: same pattern as handler_check.go
- handler_skills_batch.go: use s.skillsStore.RefreshHashes() + Save()

CLI commands:
- check.go: load store once in collectCheckItems, use MetadataEntry
- doctor.go: load store once in checkSkillIntegrity
- list.go: load store once in buildSkillEntries (replaces parallel ReadMeta)
- uninstall.go: use skillsStore for display/dry-run/finalize
- uninstall_project.go: same pattern, remove config.LoadRegistry
- update_batch.go: pruneRegistry now uses MetadataStore

Hub:
- hub/index.go: load store once in BuildIndex

The only remaining ReadMeta call is in a test file
(search_batch_meta_roundtrip_test.go) which tests the shim itself.
2026-04-08 11:19:27 +08:00
Willie e62f729f18 refactor: partial uninstall migration to MetadataStore 2026-04-08 11:08:24 +08:00
Willie ad05ed9a2f refactor: replace ReadMeta in update handlers with MetadataStore
update.go, update_handlers.go, update_project.go, update_resolve.go
now use MetadataStore.Get() instead of per-skill ReadMeta.
2026-04-08 11:04:28 +08:00
Willie 1f1790b6be refactor: replace Registry with MetadataStore in reconcile, server, install context
Phase 1 of caller migration:
- projectRuntime: registry → skillsStore + agentsStore
- globalInstallContext: reg → store
- ReconcileGlobalSkills/ProjectSkills/ProjectAgents: take *MetadataStore
- Server struct: registry → skillsStore + agentsStore
- handler_install, handler_skills, handler_uninstall: use MetadataStore
- install.go, search.go: post-install reconciliation via MetadataStore
2026-04-08 10:59:13 +08:00
Willie ebcfaf6bc4 feat(agents): add --group support, fix nested discovery, and improve TUI dispatch
- CheckAgents uses recursive discovery via resource.AgentKind{}.Discover()
  so nested agents (e.g. demo/code-reviewer.md) are found correctly
- Add --group/-G flag to update, check, and uninstall agents commands
  with shared validateAgentGroups/matchesAnyGroup helpers
- Fix TUI project-mode dispatch: call cmdUpdateAgentsProject and
  cmdUninstallAgents directly instead of passing 'agents' keyword to
  handlers that don't understand it
- TUI confirmation overlay shows correct command with 'agents' keyword
  and confirmKind field tracks skill vs agent
- TUI toggleDisabled (E key) writes to .agentignore for agents instead
  of .skillignore
- Agent Discover now marks .agentignore matches as Disabled=true instead
  of skipping them, so disabled agents appear in list with [disabled] tag
- Sync filters out disabled agents via resource.ActiveAgents()
- auditSkillByName uses scanPathTarget to support single-file agent audit
- Uninstall agents display uses RelPath (e.g. demo/tutor) instead of
  frontmatter name (e.g. Python Tutor Expert)
2026-04-08 02:37:42 +08:00
Willie 49d33938a2 feat(sync): skip extras 'agents' targets that overlap with agents sync
When extras has an entry named 'agents' whose target paths overlap with
the resolved agent target paths from targets.yaml, the extras targets
are skipped with a warning — the agents sync system takes priority.

Detection uses dual conditions: extras name == 'agents' AND resolved
path overlap. Non-'agents' extras targeting agent paths are unaffected.
Agents source must exist with actual files; empty/missing source means
no overlap (extras sync normally).

Also fixes:
- CheckAgents now recurses into subdirectories via resource.AgentKind
- update agents resolves nested agent names via filepath.Base
- filterAgentCheckResults matches both full path and basename
2026-04-07 22:35:59 +08:00
Willie 34c275a2b8 fix(sync): remove extra indent between checkmark and path in extras output 2026-04-07 22:09:51 +08:00
Willie 3241159b56 style(sync): unify summary format and headers across skills, agents, extras
- Replace ui.Info() agent summary with ui.AgentSyncSummary() using
  OperationSummary pattern (colored metrics, consistent spacing)
- Add ui.ExtrasSyncSummary() call to extras sync (was missing summary)
- Unify section headers: 'Syncing X' / 'Syncing X (project)' pattern
- Remove extra fmt.Println() before extras to fix double blank lines
- Rename agentSyncStats.skipped to .local to match UI semantics
2026-04-07 22:05:34 +08:00
Willie 5afaf57745 feat(tui): add tab switching between skills/agents in list TUI
- Add Tab/Shift+Tab to cycle All/Skills/Agents tabs with count badges
- Tab bar renders at top with bold+underline cyan active, dim inactive
- Tab acts as pre-filter composing with text filter via AND logic
- Cache tab-filtered items in applyFilter() to avoid per-frame recomputation
- Add tabNoun() method to consolidate noun switches across title/filter bar

Agent install --into support:
- Support --into flag for agent install (CLI, server, project mode)
- Support --into=value syntax in addition to --into value
- Server handler_skills uses recursive AgentKind.Discover() for nested agents
- Fix agent metadata read path: use file basename instead of frontmatter name
- Sync --all flag now includes agent sync (not just extras)

Agent content viewer:
- Agents render full-width without sidebar (single .md file, no tree needed)
- Simplified help text and keyboard handling for agent content view

Agent uninstall fixes:
- Use discovery-based resolution instead of hardcoded name+.md path lookup
- Support matching by Name, FlatName, RelPath, or trimmed RelPath
- Compressed confirmation display (list format, max 20 shown)

UI polish:
- Help bar keys highlighted in dim cyan, descriptions in dim gray
- Align 'No items.' text with list title via PaddingLeft(2)
2026-04-07 21:55:05 +08:00
Willie 9d934f87d3 fix: pass AgentsSource to Config in project mode install
Without this, installDiscoveredAgents in project mode falls back to
the global agents path (~/.config/skillshare/agents/) instead of the
project agents path (.skillshare/agents/).
2026-04-07 20:45:40 +08:00
Willie 73d4d32dfe feat(sync): warn when targets are skipped for agents (no agents path)
Both syncAgentsGlobal and syncAgentsProject now collect target names
where agentPath is empty and print a summary warning after the sync
summary line. This makes it visible to users which targets were
silently skipped, helping them configure agents paths if desired.
2026-04-07 20:22:30 +08:00
Willie e2a3d7024c fix: install agents from mixed repos after skills
Mixed repos containing both skills/ and agents/ directories previously
only installed skills, silently ignoring agents. Now after every skill
install exit point, discovered agents are also installed to the agents
source directory.

- Add installDiscoveredAgents helper that installs agents post-skills
- Update 'Found' message to show agent count in mixed repos
- Call helper at all 4 skill install exit points in handleGitInstall
- Add integration test for mixed-repo install scenario
2026-04-07 20:20:21 +08:00
Willie 9f77ac0b61 feat(install): add TUI multi-select and batch progress for agent install
Pure-agent repos now show a checklist TUI for selecting which agents
to install (matching the skill install flow). Supports:
- Single agent: direct install (no TUI)
- Multi-agent: interactive checklist TUI (space/a/enter)
- --all/--yes: install all without prompt
- -a name1,name2: filter by name without prompt
- --dry-run: preview list
- Non-TTY: error with hint to use flags
- Batch progress: spinner (<=20) or progress bar (>20)
- Results display: installed/failed/skipped sections
2026-04-07 19:47:59 +08:00
Willie 91057c1756 feat(install): detect and install agents from pure-agent repos
When a repo has no SKILL.md files but contains .md agents (discovered
via Rule 4 fallback in discovery layer), the CLI now installs them
instead of showing 'No skills found'.

Adds handleAgentInstall() which:
- Respects --agent name filter
- Uses InstallAgentFromDiscovery() (same as UI flow)
- Supports --dry-run and --force
- Shows next-steps hint to run 'sync agents'
2026-04-07 19:35:16 +08:00
Willie 98bd7d7fc2 feat(tui): show agent diffs with [A] badge in diff TUI
Merge agent diffs into skill diff results so both appear together
in the diff TUI. Agent entries display a cyan [A] badge prefix
in the detail panel's category listings.

Changes:
- Add mergeAgentDiffsGlobal/mergeAgentDiffsProject helpers that
  compute agent diffs and merge them into per-target skill results
- Call merge helpers in cmdDiffGlobal and cmdDiffProject before
  TUI/output rendering
- Build agent name set in buildDiffDetail and render [A] badge
  for agent entries in category expansion
- Fix categorizeItems to handle agent-specific reasons
  ('not in target' → New, 'local file' → Local Only)
2026-04-07 19:04:35 +08:00
Willie 11aebd2876 feat(tui): show agent badge and route agent restore in backup restore TUI
Add [A] badge to agent backup entries in the target list, and resolve
the correct agent target path when restoring. Agent backups (entries
ending with -agents) now look up AgentsConfig or fall back to builtin
DefaultAgentTargets for path resolution, both in the restore action
and in the detail/diff panels.
2026-04-07 19:02:56 +08:00
Willie dc4ef279c0 feat(tui): add agent badge and correct restore routing in trash TUI 2026-04-07 18:59:35 +08:00
Willie a941b617f8 feat(tui): support agent content viewing in list detail panel
Agents are single .md files, not directories. The content viewer now:
- Detects agent vs skill via contentKind field on the model
- Renders agent .md content directly (no directory walk)
- Shows a single-file tree entry for the agent
- Resolves file paths from agentsSourcePath for agents
2026-04-07 18:54:35 +08:00
Willie 3c3139fc60 feat(tui): pass agentsSourcePath and route actions per kind in list TUI 2026-04-07 18:53:17 +08:00
Willie be962fd557 feat(tui): add k:kind filter tag for agent/skill filtering in list 2026-04-07 18:49:27 +08:00
Willie 30f8fb0131 feat(agents): add project-mode backup and restore for agents
Add -p/--project support to 'backup agents' and 'restore agents' commands.
Project-mode backups are stored under .skillshare/backups/ (parallel to
.skillshare/trash/).

Backup engine changes:
- Add ProjectBackupDir(), CreateInDir(), ListInDir() to internal/backup
- Add RestoreLatestInDir(), FindBackupsForTargetInDir(),
  GetBackupByTimestampInDir() to restore.go
- Existing global functions become thin wrappers (zero caller churn)

Command layer changes:
- Allow project mode through for kind=agents in cmdBackup/cmdRestore
- Auto-detect project mode when .skillshare/config.yaml exists
- Refactor backup_agents.go with resolveAgentBackupContext() to
  resolve backup dir + agent targets per mode

Skills backup in project mode remains unsupported (error unchanged).
2026-04-07 18:27:08 +08:00
Willie 43d6bd1948 refactor(agents): simplify — extract shared helpers, fix path bug, use DirEntry.Type
From 3-agent review (reuse, quality, efficiency):

Bug fix:
- syncAgentsProject: use resolveProjectAgentTargetPath instead of
  inline path resolution (~ was not expanded for absolute paths)

Deduplication:
- Extract syncAgentTarget() shared by global + project sync loops
  (eliminates 30-line copy-paste)
- Extract renderAgentCheck() shared by project + global check
  (eliminates duplicate rendering block)
- Consolidate countLinkedAgents → delegates to countAgentLinksAndBroken

Efficiency:
- Use DirEntry.Type() instead of os.Lstat in diff_agents.go and
  doctor_agents.go (saves one syscall per .md file)

Cleanup:
- Remove dead start param from cmdCollectAgents
- Remove unused imports

Net: -76 lines.
2026-04-07 18:05:40 +08:00
Willie 075c0191b7 feat(agents): implement project-mode agent support for all commands
Remove all "not yet supported in project mode" errors. Every command
that supports agents in global mode now also supports project mode:

- status -p agents: shows project agent source + per-target status
- status -p all: shows both skills and agents
- check -p agents: checks agent status from .skillshare/agents/
- diff -p agents: computes agent diffs (missing/orphan per target)
- diff agents (global): also now fully implemented via diffGlobalAgents
- collect -p agents: collects local agents from project targets
- audit -p agents: scans .skillshare/agents/ for security patterns

New file: diff_agents.go — shared agent diff logic for both modes
(computeAgentDiff, diffProjectAgents, diffGlobalAgents).

11 new integration tests covering all 5 commands in project mode.
Total agent tests: 56.
2026-04-07 18:05:40 +08:00
Willie 586f0f5773 fix(agents): correct project-mode agent dispatch for all commands
Fixes 3 high-severity bugs found by Codex adversarial review:

1. update -p agents: was writing to global agents instead of project.
   Fix: check project mode BEFORE agent branch, add cmdUpdateAgentsProject.

2. sync -p agents: was silently running skill sync.
   Fix: add syncAgentsProject with project config/target resolution.
   sync -p all: now runs skill sync then project agent sync.

3. uninstall -p agents: was searching .skillshare/skills instead of agents.
   Fix: already addressed in 22c6c61e, verified still correct.

Additional hardening for commands without project agent support:
- collect -p agents: returns explicit "not yet supported" error
- status -p agents: returns explicit error
- check -p agents: returns explicit error
- diff -p agents: returns explicit error
- audit -p agents: returns explicit error

Principle: never silently fall back to skills when agents is requested.
2026-04-07 18:05:40 +08:00
Willie eceb9cc6e4 test(agents): fill coverage gaps — project mode uninstall, trash empty/delete, multi-target, JSON kind
7 new integration tests covering:
- trash agents empty / delete
- uninstall agents in project mode (fix: wire kind into project dispatch)
- check all (combined skill + agent)
- sync agents skips targets without agent path
- list all --json verifies kind field on every entry
- status agents --json with target details

Total agent tests: 45 (38 + 7).
2026-04-07 18:05:40 +08:00
Willie 95c46ca822 feat(agents): wire backup/restore and update CLI help text (Phase 4)
backup/restore:
- "backup agents" backs up agent target paths (entry name: <target>-agents)
- "restore agents <target>" restores from agent backup
- Default backup unchanged (skills only)

help text:
- Updated 9 commands with agents positional in Usage and Examples:
  list, sync, update, uninstall, collect, trash, backup, restore,
  status, diff

5 new integration tests (backup/restore round-trip, dry-run, default
unchanged, project mode rejected), all passing.
2026-04-07 18:05:40 +08:00
Willie c2b9a1537d feat(agents): wire kind filter into status, diff, doctor (Phase 3)
status:
- "status agents" shows agent source + per-target agent status (path, linked, drift)
- "status all" shows both skills and agents
- JSON output includes "agents" section with source/count/targets
- Default "status" unchanged (skills only)

diff:
- Kind field populated in JSON output ("skill" or "agent")
- parseKindArg wired into cmdDiff dispatch
- diffItemToJSON helper centralizes Kind defaulting

doctor:
- New checkAgentTargets: validates agent target paths, detects broken
  symlinks and drift (expected vs linked count)
- Checks run after existing agent source check

8 new integration tests, all passing.
2026-04-07 18:05:40 +08:00
Willie cb55ffe55c feat(agents): add positional kind filter and wire agents into list, sync, update, uninstall, collect, trash
Phase 1 — Foundation:
- parseKindArg() defaults to kindSkills, adds "all" keyword
- list: discover agents via resource.AgentKind, populate Kind field in JSON/TUI
- sync agents / sync all: new sync_agents.go handles agent sync to targets
- uninstall: migrate from --kind flag to positional ("uninstall agents <name>")

Phase 2 — Core CRUD:
- update agents: check status, enrich with remote, reinstall from source
- uninstall agents: move .md + sidecar to agent trash with confirmation
- collect agents: CollectAgents from agent-capable targets to source
- trash agents: list/restore/delete/empty for agent trash directory
- trash.RestoreAgent(): file-level restore (vs directory-level for skills)

Behavior: all commands default to skills-only (no breaking change).
"cmd agents" = agents only, "cmd all" = skills + agents.

Fix: TestLog_SyncPartialStatus uses dangling symlink instead of chmod
(root ignores permissions in devcontainer).

25 new integration tests, all passing.
2026-04-07 18:05:40 +08:00
Willie 2f4021fc6a feat: add kind badge to list TUI and remaining frontend pages
list_tui_item: show [A] badge prefix for agents in terminal list view.
list.go: add Kind field to skillEntry and skillJSON structs.

SyncPage: add kind badge to diff items using DiffTarget.items.kind.
AuditPage: add kind badge to audit result cards.
UpdatePage: add kind badge to update result items.
SkillPickerModal: add kind badge in skill picker.
client.ts: add kind to DiffTarget items and AuditResult types.
2026-04-07 18:05:40 +08:00
Willie e29a42d2d1 feat(cli): add kind arg to update command and kind field to diff output
update: add parseKindArg() for 'skillshare update agents' syntax.

diff: add Kind field to diffJSONItem struct for agent-aware diff output.
2026-04-07 18:05:40 +08:00
Willie 5dc981a5cb feat(audit): wire agent-only audit filtering via kind arg
When 'skillshare audit agents' is used, override sourcePath to agents
source directory so auditInstalled() scans agent .md files.
2026-04-07 18:05:40 +08:00
Willie 57cfab7133 feat(cli): add kind filter to check and uninstall commands
check: add parseKindArg() for 'skillshare check agents'. When agents
kind selected, runs CheckAgents() on agents source dir and displays
per-agent status (up_to_date/drifted/local/error). Supports --json.

uninstall: add --kind flag to parseUninstallArgs and parseKindFlag()
in cmdUninstall dispatch. Kind stored in uninstallOptions for
agent-specific uninstall routing.
2026-04-07 18:05:40 +08:00
Willie 6659898cc2 feat: add kind badge to SkillDetailPage and kind arg to audit command
SkillDetailPage: import KindBadge, show kind badge (S/A) next to skill
name in the detail header.

audit: add parseKindArg() for 'skillshare audit agents' syntax. Kind
filter parsing ready, actual agent-only filtering to be wired.
2026-04-07 18:05:40 +08:00
Willie 017dc22f3e feat: add --kind agent to enable/disable and agent path to TargetsPage
enable.go: support --kind agent flag to route enable/disable operations
to .agentignore instead of .skillignore. Works in both global and project
modes. Oplog entries now include kind field.

TargetsPage.tsx: show agent path below skill path when target has
agentPath. Display agent linked count alongside skill counts.
2026-04-07 18:05:40 +08:00
Willie 47da532bbe feat(cli,api): add agent info to status, doctor, and trash handler
status: show agents source path and agent count alongside skills source.

doctor: add checkAgentsSource() health check verifying agents source
directory exists, is a directory, and reports agent count. Non-existent
dir is info (not error) since agents are optional.

handler_trash: add kind field to trashItemJSON for frontend badge.
2026-04-07 18:05:40 +08:00
Willie e2101ab5e9 feat(cli): add resource kind filter parsing for CLI commands
Add kind_filter.go with two parsing strategies:
- parseKindArg(): positional syntax (list agents, sync skills)
- parseKindFlag(): flag syntax (uninstall --kind agent tutor)

resourceKindFilter type with IncludesSkills()/IncludesAgents() helpers
for handler-level routing. Supports singular and plural forms
(skill/skills, agent/agents).

16 test cases covering both parsers and filter logic.
2026-04-07 18:05:40 +08:00
Willie ba1b03f5f9 feat(install): add agent discovery, install flow, and --kind/--agent flags
Extend DiscoveryResult with Agents field and auto-detection rules:
- agents/ convention directory scanned for .md files
- pure agent repo fallback (no SKILL.md, no agents/ dir, root .md files)
- conventional excludes (README/LICENSE/CHANGELOG/SKILL.md)

Add InstallAgentFromDiscovery() for single-file agent install with
per-agent metadata (<name>.skillshare-meta.json with kind: agent).

Add Kind field to SkillMeta and InstallOptions. New CLI flags:
- --kind <skill|agent>: explicit resource kind selection
- --agent/-a <names>: select specific agents (implies --kind agent)

Add AgentInfo struct, DiscoveryResult helper methods (HasAgents,
HasSkills, IsMixed), and InstallOptions helpers (IsAgentMode,
HasAgentFilter).
2026-04-07 18:05:40 +08:00
Willie c049ccdae0 feat(config): add agents_source field and create agents directory on init
Add AgentsSource field to Config struct with EffectiveAgentsSource()
method that defaults to ~/.config/skillshare/agents when not set.

Global init now creates agents source directory alongside skills source.
Project init creates .skillshare/agents/ alongside .skillshare/skills/.
projectRuntime gains agentsSourcePath field for project-mode agent ops.

Update config.schema.json with agents_source property definition.
2026-04-07 18:05:40 +08:00
Willie 637814a996 style: gofmt 2026-04-07 17:35:06 +08:00
Willie 741564b8b9 fix(status): use shared version parser for skill version check
status command used a legacy local parser that only looked for a
top-level version: key in SKILL.md frontmatter, always returning empty
since version now lives under metadata.version.

Replace local readSkillVersion() and fetchRemoteSkillVersion() with
the shared versioncheck.ReadLocalSkillVersion() and
FetchRemoteSkillVersion() from internal/version, matching what doctor
and upgrade already use.

Remove now-unused skillshareSkillURL constant from init.go.

Closes #121
2026-04-07 17:26:37 +08:00
Willie bbf2e4343e feat(sync): unify extras symlinks through createLink
Replace direct os.Symlink calls in extras.go with createLink, gaining:
- Relative symlink support in project mode
- Windows junction fallback for extras (previously missing)

Thread projectRoot through SyncExtra, CollectExtraFiles, and all callers.

Ref: #120
2026-04-07 17:26:37 +08:00
Willie 465db305ca feat(sync): pass projectRoot from project-mode callers
Project-mode sync now passes the project root directory through to
createLink, enabling relative symlinks for all paths under the project.
Server handlers use s.projectRoot for project-mode dashboards.

Ref: #120
2026-04-07 17:26:37 +08:00
Willie 3c8c56002d feat(sync): wire projectRoot through merge and symlink sync paths
SyncTargetMerge, SyncTargetMergeWithSkills, CreateSymlink, and SyncTarget
now accept projectRoot. When non-empty, createLink uses relative symlinks
for paths under the project root.

All existing callers pass empty string (global mode, no behavior change).

Ref: #120
2026-04-07 17:26:37 +08:00
Willie e82d18cfa4 fix: sync must not prune registry entries for installed skills
Sync's registry prune logic removed entries for installed skills whose
files were missing from disk. This was wrong: the registry is the
authoritative record of installations managed by install/uninstall.

Remove PruneStaleSkills calls from sync (CLI global, CLI project, and
web UI handler). Reconcile (called during install) still uses prune
with full metadata context, which is correct.

Fixes: running 'sync' after 'install' would clear registry.yaml when
the installed skill's source files were not yet on disk.
2026-04-06 17:28:10 +08:00
Willie ce76f58393 fix(doctor): read metadata.version + harden frontmatter delimiter parsing
- doctor: replace inline frontmatter parser with version.ReadLocalSkillVersion
  which correctly reads nested metadata.version (fixes #119)
- frontmatter_write: use TrimRight instead of TrimSpace for --- delimiter
  so indented --- inside YAML block scalars is not mistaken for end marker
- Update changelog and website changelog for v0.18.7
2026-04-04 17:05:22 +08:00
Willie a570670a92 fix: registry cleanup after uninstall and sync, UI polish
- Fix UI batch uninstall not removing nested skill registry entries:
  handler used flat names (__) but registry stores path names (/),
  now tracks exact RelPath from discovered skills for matching

- Add stale entry pruning to ReconcileGlobalSkills and
  ReconcileProjectSkills using a live set built during disk walk,
  so skills deleted from source are removed from registry

- Trigger registry reconcile after sync in both UI handler (via defer
  for early-return safety) and CLI (global + project mode), writing
  warnings to stderr to avoid corrupting --json output

- UI: fix BatchUninstallPage search treating plain text as exact-match
  glob (now substring search when no * or ? present), display nested
  skill paths with / instead of __ in confirm and result dialogs

- UI: hide redundant 'X repo(s) and Y skill(s) already up to date'
  line on UpdatePage when everything is already current

- Fix test isolation: set XDG_CONFIG_HOME in server test helpers to
  prevent host agents dir leaking into test results, skip chmod-based
  oplog test when running as root

- Add README badge for Awesome Codex CLI
2026-04-01 22:30:39 +08:00