Commit Graph
2525 Commits
Author SHA1 Message Date
Willie 113d410da7 fix(hub): apply the source follow policy to local discovery
Hub index, built-in search, and draft candidates discovered only the source path, dropping the follow policy used by the inventory. Add optional walk options to the shared Hub functions and pass the operation policy from dashboard handlers and CLI indexing.

Explicit CLI sources use the active config policy while retaining configuration-free indexing. Cover global/project modes, enabled/disabled following, all three handlers, and CLI source overrides; document the behavior in all website locales and built-in guidance.
2026-10-05 22:03:47 +08:00
Willie 1254fe522d fix(doctor): classify unavailable links by their destination
Standard target naming uses frontmatter names, so matching target entry names misclassified unavailable source skills as broken and suggested pruning. Read the stored link destination, resolve relative paths, and compare it with unavailable source roots; retain name matching only when the link target cannot be read.

Cover absolute and relative destinations and an unrelated broken link whose name resembles a followed skill. Document that standard target names receive the same waiting classification.
2026-10-05 21:56:01 +08:00
Willie 98300a2eec fix(install): recognize gitdir files as checkouts
Followed worktrees and submodules were discovered as tracked repos but bypassed guards that required a .git directory. Widen IsGitRepo to accept a directory or regular gitdir file and reuse it in discovery and reconciliation. All existing callers classify checkouts or run Git commands; none requires the directory layout, so a separate predicate would retain inconsistent decisions.

Exercise actual followed worktrees in CLI and dashboard update fixtures, including project mode and force retries, and document that they receive the same checkout guards.
2026-10-05 21:53:12 +08:00
Willie e7eecffeab Merge remote-tracking branch 'origin/main' into runkids/274-follow-source-links 2026-10-05 21:32:38 +08:00
Willie 064048da89 fix(server): list files from followed skill roots
A symlink passed as a filepath.Walk root is listed as a single file, so root-of-link skills returned files containing only a dot. Reuse the discovery follow policy to resolve the walk root and compute relative file names from it while retaining logical resource paths.

Cover global/project responses and disabled following, update the existing traversal inventory, and document root-of-link file browsing in all website locales and troubleshooting guidance.
2026-10-05 21:31:29 +08:00
Willie 1a472eb0ab fix(check): resolve followed checkouts by explicit name
Filtered checks dropped the follow policy when resolving a basename, so a linked checkout visible in an unfiltered check was reported as not found by its name. Forward the operation policy to the resolver and cover both global and project checks against a local Git remote.

Document checking followed checkouts by link name in the command reference and built-in guidance.
2026-10-05 21:24:56 +08:00
Willie e8242affc3 fix(update): exclude followed checkouts from missing repo recovery
Missing-repo discovery ignored the operation follow policy, so tracked metadata added a skipped checkout back to update --all and allowed --force to reset it. Thread the policy through missing-repo detection and its CLI/server callers, including rehydration, so existing followed checkouts remain excluded.

Cover global and project updates with dirty tracked checkouts and force, as well as shared and dashboard rehydration. Document that --force does not override the batch skip.
2026-10-05 21:22:47 +08:00
Willie df7a6ad73d fix(sourcewalk): preserve inventory on followed traversal failures
Discovery callbacks may ignore filesystem errors after a followed target passes its availability probe. Record these failures in the shared Follow policy before dispatching callbacks so sync and reconciliation preserve entries missing from an incomplete inventory.

Keep ordinary vanished-child races tolerated, while treating loss of the target itself as unavailable. Cover both walkers and merge/copy pruning, and document read failures in the English and translated configuration guidance.
2026-10-05 20:46:45 +08:00
Willie 97446744ff feat(omp): add native Oh My Pi support (#423)
* feat(omp): add native Oh My Pi support

Support OMP skills, instructions, MCP, code hooks and guarded extension selection using its verified native contracts rather than Pi aliases.

Add reviewed marketplace plugin installation, cache-preserving scoped removal and fresh-cache reinstall. Align Pi/OMP extension cards and localize inventory guidance while keeping native ownership and read-only constraints.

Include regression coverage, isolated E2E runbooks, documentation and verification policies. Native plugin updates and unverified runtime platforms remain guarded.

Refs #409

* fix(omp): guard runtime ownership and localize inventory guidance

Native install recursively replaces its runtime destination, and a missing cache manifest could leave the real runtime link installed after removal. Bind and recheck an absent reviewed destination, and recover removal names only from verified scope-local links.

Localize fixed backend reasons and warnings across dashboard locales while preserving paths and external diagnostics. Restore the reviewed source in the existing reinstall fixture and record real native verification.

* fix(omp): allow forgetting natively removed plugins

A different plugin can retain node_modules after native uninstall deletes this installation. When its cache, registration and known runtime state are absent, forget only the stale Skillshare binding instead of demanding runtime-name proof for unrelated files.

Extend the existing removal recovery test with a failing-before-fix case that verifies the binding is dropped and unrelated native lock bytes and plugin files are preserved. make check passes.
2026-10-05 20:36:39 +08:00
Willie aafb7e7e96 fix(ui): keep followed checkouts out of dashboard updates
Separate user-owned followed Git checkouts into linked_repos in check and resources responses so the Updates tab renders information instead of tracked errors or retry actions. Refuse dashboard updates before Git runs, including force retries and descendant skills, while leaving managed repositories unchanged.
2026-10-05 18:26:12 +08:00
Willie c5c9289781 fix(discovery): surface skipped source link warnings
Keep one follow policy per list and status operation and report its skipped links without hiding healthy inventory. Send JSON diagnostics to stderr and expose sourceLinkWarnings in the dashboard resources response, reusing the sync warning formatter.
2026-10-05 18:26:12 +08:00
Willie 942251b78a fix(update): resolve explicitly named followed source links
Pass the operation follow policy into basename and glob resolution so linked Git checkouts and full skill paths can be updated explicitly. Keep update --all skipping user-owned followed checkouts with its existing warning.
2026-10-05 18:26:12 +08:00
Willie 5565948ab2 Merge branch 'main' into runkids/274-follow-source-links 2026-10-05 17:46:40 +08:00
github-actions[bot]andWillie 6b5a79de4f chore(main): release 0.24.6 (#411)
* chore(main): release 0.24.6

* chore(release): synchronize release metadata

* docs(changelog): write the 0.24.6 notes for users

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Willie <egg358358@gmail.com>
v0.24.6
2026-10-05 16:20:13 +08:00
Willie 3b898f3730 Merge branch 'main' into runkids/274-follow-source-links 2026-10-05 16:11:45 +08:00
Willie 5eb6d496ec docs(source-links): cover command pages, the built-in skill, and all four translations
The follow_source_links feature touched doctor, update, uninstall,
trash, install and audit behavior without their command pages saying
so, and the ja, ko, zh-Hans and zh-Hant site translations had none of
the new content. Translate every changed page and align the built-in
skill's doctor and troubleshooting references.
2026-10-05 16:03:47 +08:00
Willie 56b3b7579f docs: bring memory docs and READMEs up to date for 0.24.6 (#418)
The Memory page gained a Refresh button and the active guidance now keeps
short facts as one bullet in INDEX.md, but the walkthrough still said
every durable fact gets its own file. Update it in every locale, and
point the Latest callout in each README at 0.24.6.
2026-10-05 15:59:25 +08:00
Willie 2186cd3432 docs(tests): record the Windows runs on the reviewed head 2026-10-05 15:52:23 +08:00
Willie 8879d445ab fix(status): require a source fingerprint for extension outputs (#416)
Extension outputs were matched to an agent by stem alone. A plain copy
that sync tracked before the target enabled an extension (reviewer.md)
passed for the converted output, so status, doctor, diff and the Sync tab
reported the target in sync while the next sync would write reviewer.toml
and prune the copy.

Only a transform records a source fingerprint, so an output without one
is no longer counted as converted. Outputs written before fingerprints
existed (before 0.24.5) show as pending until the next sync, which is
what they were already reported as before #392.

Refs #415
2026-10-05 15:51:40 +08:00
Willie 2b76402240 test(source-links): align group test and raw-write ratchet with the review fixes
uninstall --group on a followed link is now refused, and restore no
longer creates parents with a raw MkdirAll, so the ratchet allowance
for it is stale.
2026-10-05 15:50:00 +08:00
Willie bcf567f80d docs(source-links): align follow_source_links docs with the review fixes
Covers the guard order, file links, update --all and dirty checkouts,
--group forms, restore through the link, what Git stages for a link,
the sync and audit JSON warnings, and the junction-chain case in the
Windows runbook.
2026-10-05 15:48:45 +08:00
Willie eb7b4156bc fix(source-links): report unfollowed links in sync --json and refuse uninstall --group on a link
sync --json showed pruned: 0 and success while a link was unavailable,
so automation could not tell a held-back prune from nothing to prune.
The run's source link warnings now ride along as warnings.

uninstall --group <followed link> moved every skill out of the user's
checkout, while uninstall <link> removes only the link entry. The group
form is refused with a pointer to the by-name forms.
2026-10-05 15:48:45 +08:00
Willie bccb394c6e fix(trash): enforce source link boundaries on restore
Restore skills through sourcefs with the active global or project follow policy so nested links and disabled following cannot redirect writes or consume the trash copy. Preserve relative link traversal when relocating links, and keep link rows in the trash TUI on their detail view.
2026-10-05 15:47:30 +08:00
Willie d2b322ed87 fix(server): carry follow policy through skill updates
Use one skills traversal policy for dashboard update discovery, post-pull audits, and staged regular-skill writes so linked repositories are audited and child updates preserve their source links. Keep agent updates and disabled follow behavior on the nil-policy path.

Cover global and project modes through HTTP and SSE handlers, including audit rollback and disabled-follow parity.
2026-10-05 15:46:04 +08:00
Willie 75a79abf61 fix(install): protect dirty followed checkouts before update
Refuse install update pulls when a followed checkout has local changes or its Git status cannot be read, so audit rollback cannot discard unrelated user edits. Preserve ordinary and nil-policy behavior and cover both install routes and clean audit rollback.
2026-10-05 15:43:17 +08:00
Willie 956db6d122 fix(update): keep --all away from followed checkouts
update --all treated a followed source link as a managed tracked repo:
with --force it ran git reset --hard inside the user's own checkout and
silently discarded their local edits, and an audit-gate rollback would
do the same. --all now skips any tracked repo behind a followed link
with a warning that names the by-name form, which keeps its documented
behavior.
2026-10-05 15:42:01 +08:00
Willie d6162baba0 fix(sourcewalk): resolve junction chains and compare canonical roots
canonicalPath relied on filepath.EvalSymlinks, which since Go 1.23 leaves
a Windows junction component in place. A link whose target is itself a
junction, or sits below one, was followed as the unresolved junction:
the walk saw no descendants while the inventory counted as complete, so
target entries from that link could be pruned, and a sync target spelled
through a junction could evade the overlap guard. Every existing path
component is now resolved hop by hop, and a target that still ends in a
link marks the link unavailable instead of being followed.

The policy also kept the source root as spelled, so a relative global
source was discovered but never resolved for writes or audit. Root,
first-level and Resolve comparisons now use the same canonical absolute
form. Copy and checksum roots get the same one-hop resolution so a
followed junction that is itself a skill no longer trips the cycle guard.
2026-10-05 15:40:51 +08:00
Willie c9e532a66f fix(source-links): use the server's follow snapshot for collect and keep Windows link text logical
The project dashboard builds a synthetic global config without
follow_source_links, so the collect handler read a zero policy and a
forced collect could replace a followed source link with the target
copy. The per-instance snapshot already knows the project setting.

On Windows the absolute link fallback (junctions, or symlinks without
Developer Mode) canonicalized the source root even with the key off. A
source root that is itself a directory symlink then no longer matched
the logical path that status, prune and merge ownership compare
against, so every sync reported a conflict or recreated every link.
Store the logical path as main did; only relative links need the
canonical root.
2026-10-05 15:40:51 +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 f9e25ca7a5 fix(audit): report source links the scan did not follow
An audit run with follow_source_links whose linked checkout was missing
finished as a clean success, so a partial scan looked complete. Audit now
warns once per skipped link in human output and adds warnings plus
incomplete: true to JSON output, including when no skills were found.

Also cover project mode: reconcile keeps config and metadata entries of an
unavailable link, and sync -p warns once and keeps target entries.
2026-10-05 15:40:18 +08:00
Willie d4a9a28e04 fix(sourcefs): anchor MoveIn through a followed link in the opened root
MoveIn below a followed link ended in a pathname os.Rename against the
link target's directory. That pathname can be renamed away and replaced
by a link to another directory after through() cached the second root,
so the move landed outside the checkout the root was opened on.

The followed route now copies the staged tree through the root handle to
a temporary name, renames it into place through the handle, and removes
the staged source only after that. The primary root keeps its rename, so
behavior without a follow policy is unchanged.
2026-10-05 15:38:48 +08:00
Willie 9d3fafff6b test(windows): add Developer Mode symlink round for followed source links
Covers directory symlinks instead of junctions and project mode, where the
per-skill target links are relative symlinks that must keep the logical
<source>/_dev-skills/<name> tail rather than the checkout path. Verified
on a Windows 11 ARM64 guest with Developer Mode on.
2026-10-05 15:34:23 +08:00
Willie 8092b234b7 fix(source-links): judge overlap before existence and keep doctor from suggesting prune
A link into a sync target that is not created yet was reported as a
missing target, which marked the inventory incomplete and held back
pruning for a link that would never be followed. The where-it-points
guards now run on the link text before the does-it-exist check, so such
a link is an overlap and the run prunes as usual.

doctor reported the dangling target links behind an unmounted source
link as broken symlinks and suggested `skillshare sync` to prune them,
while sync deliberately keeps them. Those links are now a warning that
names the waiting source link and carries no prune suggestion.
2026-10-05 15:27:42 +08:00
Willie c876711458 docs: add the Windows runbook for followed source links
Record how the junction case is verified through the UTM guest and point the testing topic and the config reference at it, replacing the 'not yet verified' caveat now that the ARM64 run passed.
2026-10-05 15:17:16 +08:00
Willie e3c9763e1a fix(sourcewalk): resolve junction targets with Readlink on Windows
filepath.EvalSymlinks leaves a Windows junction unresolved since Go 1.23
reports mount points as irregular rather than symlinks, so the follow
policy walked the junction entry itself and discovered no skills behind
it, while doctor and tracked-repo detection (which only Stat the entry)
reported it as followed. Resolve the link text first, then canonicalize
the target.

Add the Windows E2E script that found this: a junction under the skills
source pointing at a checkout, with the drive-away, write-through, and
trash round-trip steps.

Refs #274
2026-10-05 15:14:10 +08:00
Willie c9b1362ab4 docs(wiki): add a host leftover check to the testing topic
Interrupted Git operations left 32 GB of tmp_pack files in .git, which
filled the disk. Document how to find and clear that and the other
ignored verification leftovers without pruning shared caches.
2026-10-05 15:10:28 +08:00
Willie 660cc33c28 docs: describe keeping linked skills on an external drive
The unmounted-drive case is the main reason the incomplete-inventory guard exists, so spell out what each command does while the drive is away, what the AI tools see in symlink versus copy mode, and why the mount path must stay stable.
2026-10-05 15:02:52 +08:00
Willie d61cea9ec7 docs: describe the link decision flow and writes through followed links
Wave 2 made writes behind a followed first-level link land in the real
checkout, so the "current limits" paragraph written for the discovery-only
version was no longer true. Replace it with the actual write semantics, add
the walker decision flowchart the design discussion settled on, and record
the sourcefs/sourcewalk policy contract in the CLI development topic.

Refs #274
2026-10-05 14:56:29 +08:00
Willie abaaefb663 fix(audit): retain linked source metadata and propagate install policy
Keep the analyzer metadata context logical while walking the resolved root, so integrity and publisher checks still find the source metadata store. Add global/project command regressions for linked repo roots and single skills, plus linked install-audit and trash sibling-list checks.

Pass the existing optional Follow policy through install audit gates and final metadata hashing, preserving default-off behavior. Absolute link text remains unchanged on trash rename fallback; relative links continue to store their absolute target.
2026-10-05 14:53:52 +08:00
Willie b92938a9b7 fix(cli): pass the follow policy to update audits and group uninstall
update audited a skill below a followed source link with a scanner that
did not follow the link, and uninstall --group resolved a followed group
without the operation's policy. Both now use the same policy as the rest
of the operation: the update context's follow for the audit scan, and the
uninstall mode's walk for group resolution.

Refs #274
2026-10-05 14:49:31 +08:00
Willie 6bc41d29ec fix(sync): preserve logical identity of followed source links
Keep the canonical skills source root and logical relative tail when creating or reformatting project links, including Windows relative links and junction fallback. Shared agent and extra links retain full canonicalization, and global Unix link text stays unchanged.

Allow group walks outside the source only for an enabled first-level link validated by Follow.Resolve, remapping children to logical paths and metadata keys while retaining nested-link guards and root-skipping semantics. Resolve copy and checksum operation roots before walking to avoid false cycles, and preserve followed source links during forced collect with per-item warnings.

Regression coverage verifies second-sync ownership, status, prune, unlink, format changes, linked-root copying, group guards, and forced collect preservation. Linux build, vet, sync and command tests, sourcewalk ratchet, server collect tests, context validation, and Windows cross-build passed; Windows runtime was not verified. No new raw-walk allowance was needed.
2026-10-05 14:45:58 +08:00
Willie c0e66720ce fix(source-links): preserve trashed links and resolve audit and hash roots
Trash moves and restores the link entry without copying or removing its target, including when rename fails. Relative link text is stored as an absolute target so relocation cannot change its meaning; list and TUI expose the link target without inventorying its contents.

Pass the operation-scoped Follow policy into audit and hash operations, resolving their physical root while keeping logical result and metadata keys. Calls without a policy keep their existing behavior and ScanSkill retains its original function signature.

Update six stale trash raw-write allowances for the injected rename test seam and classify moveLink creation/removal: it moves a checked source entry to trash or restores an entry into source, never writes through its target. Raw sourcewalk calls and allowances are unchanged.
2026-10-05 14:45:41 +08:00
Willie a502e9316b feat(sourcefs): write through followed first-level source links
With follow_source_links on, discovery reports <source>/_dev-skills/foo,
but every write to it was refused: sourcefs rejects a link in the path, and
its source-root os.Root refuses descendants outside the source. Dashboard
edits, nested uninstall, regular skill replacement, and tracked installs
under such a link all failed, although writing through a link the user
placed is the agreed behavior (#410).

sourcefs.Open, Create, MkdirAllIn, and CheckMoveOut take the operation's
optional sourcewalk.Follow. A clean name <link>/<rest> whose first
component the policy follows is handled by a second os.Root opened at the
link's canonical target, with the same per-component link check on <rest>,
so a nested link or ".." still cannot escape the target. Names with ".."
keep the source root, which refuses them through the link. Without a
policy nothing changes.

The link entry itself stays a link: RemoveAll, Rename, and writes on it are
refused, install --track --force still refuses to replace it, and
CheckMoveOut still lets trash rename the link without following it.
MkdirAll on a followed link is a no-op, since it already is that directory;
install --into needs that. A rename across the link boundary is refused.

The install, update, uninstall, and server callers pass the same policy
their discovery uses, through InstallOptions.SourceFollow and the update
context. No raw-write allowance was needed.

Refs #274
2026-10-05 14:42:09 +08:00
Willie a532e77ffb test(doctor): expect the follow_source_links hint in the link message
The doctor message for an unfollowed first-level link now names the config key that enables following, so the integration expectation must carry the hint too.
2026-10-05 14:30:41 +08:00
Willie 04ee235277 feat(sourcewalk): expose Follow.Resolve for writes through followed links
Operations that write or scan below a followed first-level link need the
real location of a logical path (<source>/_dev-skills/foo). Resolve maps
such a path onto the link's canonical target, reusing the same guards as
traversal, so sourcefs, group walks, trash, and audit roots can share one
answer instead of each re-deriving link identity.

Refs #274
2026-10-05 14:28:00 +08:00
Willie 89fc4fbdf1 feat(sourcewalk): follow first-level source links when enabled
Users link a checkout directly under the skills source (e.g.
skills/_dev-skills -> ~/code/dev-skills) and expect it to behave like any
other first-level entry. sourcewalk resolved only the root, so these links
were invisible to discovery, sync, update, and the dashboard.

follow_source_links (global and project config, default false) enables a
per-operation sourcewalk.Follow policy. Walk, WalkDir, and ReadDir report a
followed link under its own name as a directory and descend into its
target, so names, RelPath, FlatName, SourcePath, tracked-repo detection, and
metadata keys stay logical. Only entries directly under the source root are
followed. The policy is built from config and passed explicitly to every
discovery caller in the CLI, server, and reconcile, so counts agree; the
server keeps a per-instance snapshot refreshed on config load and save
instead of a process-global flag.

A link is skipped, with one warning per operation, when its target is
missing or unreadable, is the source or a parent of it, or overlaps an
active skills target. A missing or unreadable target marks the operation
incomplete: sync then skips pruning and copy-orphan deletion, and reconcile
keeps metadata, so an unmounted drive or a re-clone in progress cannot
erase target entries or install records. A link to an existing file is not
a directory link and stays an ordinary entry; treating it as incomplete
would disable pruning for anyone sharing a file such as .skillignore.

doctor keeps raw link identity: with the key off it still says the link is
not followed and names follow_source_links: true; with it on it reports
followed links and skipped links with the reason.

The raw-walk allowlist gains entries for the policy path in Walk and
WalkDir: the source root walk with a policy, and the walk of a validated
link target whose paths are remapped to the logical link path. Both live
in sourcewalk itself, the package that owns source traversal.

Refs #274
2026-10-05 14:26:09 +08:00
Willie 0fe02dc59b fix(ui): put the hub filters on the title row
The sticky band stacked the title and the filters on two rows and padded
both ends by 24px, which left a large empty strip above and below the
filters. Merging them into one row removes the gap.
2026-10-05 14:17:30 +08:00
Willie 5c26981e44 refactor(git): reuse raw source directory reader
Use sourcewalk with zero options to preserve first-level link identity without adding a raw-walk allowance. Keep Git paths relative to the logical skills source.
2026-10-05 14:13:50 +08:00
Willie 3e8b6e8bd9 fix(git): warn before staging first-level source links
Source links can record machine-local paths in Git. Share advisory indexed and ignored checks across CLI, init, and dashboard staging and previews, with scope-correct ignore patterns and manual untracking instructions, without changing staging behavior.
2026-10-05 14:11:57 +08:00
Willie b8de508d60 docs: document opt-in first-level source links
Explain follow_source_links in global and project configuration and distinguish linked source roots from first-level discovery. Document real-checkout update risks, cleanup guards, source write limits, Git staging warnings, and unverified Windows junction support.
2026-10-05 14:10:23 +08:00