Apply config ignore patterns to copy-mode file traversal, checksum, mtime, CLI diff, and server sync/diff paths.
Add default ignores for .DS_Store, .git, and __pycache__ in global and project init configs.
Tests: go test ./... -count=1
Project-mode agent sync re-reported every agent as updated on the second
sync when the project lived under a symlinked ancestor (e.g. macOS temp
dirs under /var -> /private/var), failing idempotency on macOS CI.
Two interacting causes:
- shouldUseRelative was unstable: on the first sync the target directory
does not exist yet, so evalOrClean fell back to a non-resolved path and
the under-project-root check failed, producing an absolute link; on the
second sync the directory existed and resolved, so it wanted a relative
link and reformatted the existing one. evalOrClean now resolves the
deepest existing ancestor and re-appends the missing tail, so the answer
is the same whether or not the leaf exists.
- The existing-symlink comparison only did a direct string compare, so a
stable relative link whose resolved target carried the unresolved alias
prefix looked like it pointed elsewhere. It now canonicalizes both sides
via EvalSymlinks on the slow path, mirroring isSymlinkToSource.
Adds a regression test that reproduces the symlinked-ancestor case on any
platform.
UI (Extras page):
- Label per-target flatten/extension/mode controls with column headers
- Render flatten as a dropdown so it matches the adjacent selects
- Collapse the add-target form behind a button and widen the path input
- Confirm before removing a target
- Polish layout: tinted icon, inset source chip, hover rows, aligned columns
Components:
- Select: bound the dropdown width so long option descriptions wrap instead
of stretching the popup across the page
- Toast: render messages multi-line, widen the container, and give
error/warning toasts more time to read
Sync feedback:
- Restructure extras sync-failure toasts into readable lines and fix the
contradictory "N more errors" count (new nMoreErrors translation)
CLI/server:
- Match extra target paths by resolved absolute path (handles ~ vs /home)
when adding, removing, or updating targets
- handler_git: dashboard Pull auto-sync now uses EffectiveSkillsSource()
instead of the git_root scope dir, so it no longer mangles skill rel
paths (skills/foo -> skills__foo) when git_root is root/agents/extras
- extension: run the transform subprocess via CommandContext with a 30s
timeout so a hung extension can't block sync indefinitely
- md-toml.js (codex-agents, gemini-commands): escape values via
JSON.stringify so control characters produce valid TOML basic strings
- gitroot: quote paths in the commit/push mv guidance so paths with spaces
can be pasted safely
- extras list + extras server handlers: warn when an extension fails to
resolve instead of silently falling back and reporting false drift
Lock-contention suggestions on handleSetGitRoot/handleAbsorbNested are not
applied: this is a single-user localhost dashboard, and dropping the write
lock around .git-mutating operations trades safety for negligible throughput.
The /api/extras/diff path resolved the copy mode but ignored a transform
extension's output_ext, so buildExtrasDiffItems compared source relative
paths against the target directory. After a .md -> .toml transform sync,
the diff looked for the original .md name and reported false drift, even
though the status path already handled this.
Export ApplyOutputExt as the single source of truth for source->target
filename mapping (previously unexported applyOutputExt) and use it in the
diff path so sync, status, and diff all agree on the transformed name.
A transform-mode dry-run counted every file as synced without inspecting the target, so it claimed it would sync files that a real non-force sync would skip. Report an existing real file (under the transformed name) as a skip needing --force, mirroring the non-dry-run path. The dry-run still never spawns the extension subprocess, so content is compared conservatively by existence rather than by output.
The dashboard computed extension target status with EffectiveMode, which defaults an empty mode to merge, so a valid transform extension target (extension set, no explicit mode) was always reported as drift. Introduce sync.ResolveExtensionMode as the single source of truth (empty/copy resolve to copy, anything else errors) and use it across the CLI, sync, status, and diff paths.
The previous conflict guard lumped symlinks and directories together and
os.RemoveAll'd both unconditionally, so a real directory sitting at a
generated output path (e.g. a.toml/keep.txt) was silently deleted during
`sync extras` even without --force — more destructive than the copy/merge
path, where syncOneExtraFile only auto-replaces symlinks.
Transform conflict handling now mirrors copy semantics exactly:
- symlink → auto-replace (os.Remove, link only)
- directory→ skip unless --force; with --force, replace wholesale (os.RemoveAll)
- file → idempotent if identical, else skip unless --force
Also fix the real deleter: pruneExtraOrphans descended into a skipped
conflict directory and pruned its contents as orphans. It now SkipDirs any
directory occupying a claimed output path, leaving it fully untouched.
Adds regression tests for the directory-conflict skip and the forced
replacement.
Transform-extension sync previously wrote each generated file via
runExtensionFile unconditionally, so a regular local target file (e.g. a
hand-edited hello.toml) could be overwritten from hello.md without --force,
violating the same conflict contract that copy/merge modes honor.
- Split runExtension (subprocess → bytes) from runExtensionFile (writes),
and have syncExtraTransform apply the conflict/force rules: idempotent
when identical, skipped on conflict without --force, overwrite with
--force, and auto-replace leftover symlinks.
- Centralize the copy-only mode rule in SyncExtra so the API and CLI reject
extension+merge/symlink identically; align the server sync handler's mode
normalization (EffectiveMode's "merge" default no longer leaks through).
- CLI `extras list` no longer short-circuits to an "extension" status before
existence/drift checks. Status is now computed via output_ext-aware
CheckSyncStatus; a new Extension field carries the display label, decoupled
from sync status (plain-text + TUI rendering updated).
- Roll back the optimistic cache update in the UI mode-change handler on
failure (fixes the unused-var build break).
Adds regression tests covering conflict skip/force/idempotent/symlink-replace
and non-copy mode rejection.
Installed-skill source dirs carry a .metadata.json tracking store. Extras
discovery walked it like user content, so a transform extension renamed it
to .metadata.toml in the target. Skip the reserved file in
DiscoverExtraFiles so it is never synced or transformed in any mode.
CheckSyncStatus compared each source file against targetDir/<source-name>,
but a transform extension renames output (foo.md -> foo.toml), so the
.toml file was never found and the target was always reported as drift —
even right after a successful sync. Thread the extension's output_ext
through CheckSyncStatus so the expected target filename matches the
transformed output. The web list now resolves the spec to pass it.
md2codex / md2gemini named the *input* (markdown) and read poorly. Rename
the bundled extensions after what they produce: codex-agents and
gemini-commands. Turn the BuiltinExtensions catalog into structs carrying
a human-readable description so the dashboard can explain each one before
install, and propagate the new names across tests and docs.
Add an "Extensions" tab to the Config page for managing transform
extensions in the active mode (global or project):
- GET /api/extensions lists installed extensions with their manifest
descriptions, merged with the built-in catalog so users can see what
is available to download.
- POST /api/extensions/install downloads a whitelisted built-in
extension into the active mode's extensions directory.
- POST /api/extensions/open opens that directory in the user's editor,
mirroring the skill "open in editor" affordance.
ExtensionSpec now carries the manifest description so the list can
surface it. The UI shows installed extensions with a built-in badge,
available built-ins with a Download button, and an Open-directory
action. Strings are translated across all 11 locales.
Surface the per-target extension transform in the dashboard. A new
GET /api/extras/extensions endpoint lists extensions available in the
current mode's directory (global or project), and the Extras page renders
a picker per target. Selecting an extension forces copy mode (transforms
are copy-only) and locks the mode control; changes apply optimistically
via the query cache. Adds i18n keys across all locales.
DiscoverSourceSkillsWithStats did not set collectContext=true, so
DescChars/BodyChars were always 0 when sync called buildAnalyzeEntries.
Add DiscoverSourceSkillsWithStatsAndContext that enables both ignore
stats and context collection in a single walk, and use it in sync.go
and sync_project.go.
GroupedProjectTargets() merges targets sharing the same project path
into a single canonical entry, dropping member targets. For example,
.agents/skills is shared by universal, codex, amp, and others, but
only 'universal' was returned as the inferred target.
Expand Members in getProjectTargetPaths() so all targets sharing a
project path are included in inference results.
FilterAgents matched against FlatName which includes .md (e.g.
"tutor.md"), so user patterns like "tutor" or "team-*" silently
matched nothing. Strip the .md suffix before pattern comparison so
agent filters behave consistently with skill filters.
Add FilterAgents unit tests (include, exclude, combined, nested,
glob, invalid pattern) and integration tests for both filter paths:
- include/exclude config patterns (4 tests)
- .agentignore disabled state (3 tests: explicit, glob, nested)
TestSyncAgents_MergeMode_NestedSameBasename_IsStable compared raw
symlink targets against t.TempDir() paths without EvalSymlinks, causing
false failures on macOS where /var is a symlink to /private/var.
Align agent target naming with the skills-style __ flattening so nested agents do not collide by basename in flat agent directories. Add unit and project-mode integration coverage to verify repeated syncs stay stable and no longer report false updates.
Add SyncAgents() dispatcher supporting all three sync modes:
- merge: per-file symlinks with local file preservation
- symlink: whole directory symlink to agent source
- copy: file copy with content-diff detection
Add CheckAgentCollisions() to detect agents that flatten to the same
filename from different subdirectories.
Add PruneOrphanAgentLinks() for merge mode and PruneOrphanAgentCopies()
for copy mode to clean up stale agent files in targets.
Add CollectAgents() to copy non-symlinked .md files from target back
to agent source directory.
18 tests covering all modes, collision detection, pruning, and collect.
Two correctness improvements from Codex review:
1. EvalSymlinks before relative-link decisions: shouldUseRelative and
createLink now resolve symlinked ancestors via EvalSymlinks so that
a project opened through a symlinked workspace, or a target dir that
traverses a symlink, produces correct relative paths (or falls back
to absolute when paths diverge from the project root).
2. Atomic reformat via reformatLink: instead of remove→create (which
loses the link on createLink failure), reformat now creates a temp
link and renames it over the original. On Unix this is atomic; on
Windows it falls back to remove→create when rename fails.
Tests added for symlinked project root, divergent target symlink,
and reformatLink atomic swap.
On Windows without Developer Mode, createLink falls back to an NTFS
junction (always absolute). linkNeedsReformat would then return true
on every sync, causing a remove→recreate loop.
Add build-tagged canCreateRelativeLink(): returns true on Unix, and
on Windows probes once with sync.Once by creating a test relative
symlink in a temp dir. linkNeedsReformat skips reformat when the
platform cannot create relative links.
Also use filepath.Clean instead of filepath.Abs in resolveReadlink
(input is already absolute, avoids unnecessary os.Getwd).
Addresses PR #122 review feedback.
- shouldUseRelative: avoid double separator when projectRoot is /
- symlink_windows.go: use pre-resolved absTarget/absSource for Rel
- extras.go: check os.Remove error on wrong symlink replacement
filepath.Abs(dest) on a relative readlink result resolves against CWD,
not the symlink's parent directory. This broke the 'already correct'
check when comparing relative symlinks to absolute source paths.
Add resolveReadlink() helper that joins relative targets with
filepath.Dir(linkPath) before calling filepath.Abs.
Also check os.Remove errors in all reformat paths instead of ignoring
them silently.
Addresses PR #122 review feedback.
sync previously skipped symlinks that pointed to the correct source,
even if their format (absolute vs relative) didn't match the expected
mode. This meant existing absolute symlinks in project mode were never
converted to relative on subsequent syncs.
Add linkNeedsReformat(dest, wantRelative) helper that checks whether
the raw readlink result has the wrong format. All four 'already
correct' skip points now check format and recreate when mismatched:
- SyncTargetMergeWithSkills (skills merge mode)
- SyncTarget (skills symlink mode)
- syncExtraSymlinkMode (extras directory symlink)
- syncOneExtraFile (extras per-file merge)
Global mode is unaffected: shouldUseRelative returns false, so
linkNeedsReformat never triggers on absolute links.
Also fix macOS /var → /private/var path mismatch in
TestSyncProject_RelativeSymlinks by EvalSymlinks on expected path.
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
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
Unix: computes filepath.Rel from link dir to source, falls back to
absolute on error.
Windows: tries os.Symlink with relative path first (Developer Mode),
falls back to mklink /J with absolute paths.
All existing call sites pass false (no behavior change yet).
Ref: #120
Determines whether both source and target paths are under the project
root, in which case relative symlinks are portable and can be committed
to git.
Ref: #120
- Enable frontmatter parsing in DiscoverSourceSkillsAll so /api/skills
returns saved targets (fixes target display reverting to All)
- Skip tracked-repo skills in batch/single target handlers to prevent
dirty git state; reject with 400 for single-skill endpoint
- Add RefreshMetaHashes to recompute audit hashes after SKILL.md edits;
batch handler refreshes outside the write lock
- Show 'Uninstall Repo' with confirm dialog for tracked-repo members
instead of the always-failing individual uninstall action
- Return 409 Conflict when enabling a skill disabled by glob pattern
in .skillignore/.skillignore.local instead of false success
- Preserve IsInRepo flag for root-skillignore-disabled skills so they
remain visible in the Tracked tab after disable
- Update changelog and website changelog for v0.18.7
With 25000+ skipped skills (standard naming + name collisions),
the CLI sync output was flooded with per-skill warning lines.
Now prints a concise summary:
12345 skill(s) skipped (naming validation)
456 name collision(s) excluded
Applied to both merge and copy sync modes.
Add per-target target_naming setting that controls how skill directories
are named in sync targets. 'flat' (default) preserves the existing
flattened __ separator behavior. 'standard' uses the SKILL.md name field
directly, following the Agent Skills specification.
Standard mode:
- Validates SKILL.md names match directory basenames
- Detects and skips name collisions with warnings
- Auto-migrates managed entries when switching from flat to standard
- Preserves legacy entries when bare name is already occupied
Also includes:
- Per-target toggle via CLI (--target-naming), TUI (N key), and Web UI
- Collision output redesigned as deduplicated compact summary
- Config inheritance: global target_naming → per-target override
- JSON schema + UI validation for the new field
Closes#110