Commit Graph
465 Commits
Author SHA1 Message Date
Willie 86ff94fa8a fix(target): check prefixed naming when turning skills back on
Skills-off targets may now keep prefixed naming under a merge mode, but
target --skills=true and the dashboard's skills toggle flipped them on
without checking, so the next sync skipped the target and its agents.
Refuse to turn skills on while the effective naming needs copy mode.
2026-10-09 11:47:51 +08:00
Willie a9e3613282 fix(target): add global targets in copy mode when they would inherit prefixed
Top-level prefixed naming with a merge global mode is valid while every
target overrides copy, but target add (CLI, dashboard, and Agent config
directories) wrote new targets without a mode, so they inherited the
invalid pair and failed at sync. Share one rule for global and project
additions: write copy mode when the inherited naming needs it.
2026-10-09 11:26:40 +08:00
Willie 7b676502a5 fix(target): add project targets in copy mode under prefixed naming
A project target defaults to merge mode and target add has no mode
option, so adding one to a project whose top-level target_naming is
prefixed reported success and then failed validation at sync. Give the
new target copy mode in both the CLI and the dashboard API.
2026-10-09 11:17:48 +08:00
Willie 0477f1e837 fix(diff): report a target naming migration as a rename
After target_naming changes, sync renames the managed entry in place,
but diff looked only under the new name, so the CLI and the dashboard
showed the skill as new while hiding the old entry. Resolve the legacy
entry and report it as a rename instead.
2026-10-09 10:29:36 +08:00
Willie 73eb44ee36 Merge remote-tracking branch 'origin/main' into runkids/feat-497-prefixed-naming
# Conflicts:
#	ui/src/i18n/locales/de.json
#	ui/src/i18n/locales/en.json
#	ui/src/i18n/locales/es.json
#	ui/src/i18n/locales/fa.json
#	ui/src/i18n/locales/fr.json
#	ui/src/i18n/locales/id.json
#	ui/src/i18n/locales/ja.json
#	ui/src/i18n/locales/ko.json
#	ui/src/i18n/locales/pt-BR.json
#	ui/src/i18n/locales/zh-CN.json
#	ui/src/i18n/locales/zh-TW.json
#	ui/src/pages/TargetDetailPage.test.tsx
#	ui/src/pages/TargetDetailPage.tsx
2026-10-09 09:48:45 +08:00
Willie 89a12074ce Merge remote-tracking branch 'origin/main' into runkids/feat-497-prefixed-naming 2026-10-09 09:44:06 +08:00
Willie 22e2958113 Merge branch 'main' into runkids/fix-498-shared-folder-conflict 2026-10-09 01:19:22 +08:00
Willie 9d0b56db91 test(install): install the subdir test skill from this repo
TestInstall_GitHubSubdirViaAPI installed skills/documents/atlassian-search
from majiayu000/claude-skill-registry, which dropped its skills/ tree on
2026-10-08, so the online job fails on every branch. Subdir installs take
the same sparse-checkout-then-Contents-API path whatever the repo, so
install runkids/skillshare/skills/skillshare instead: same assertions,
and the source can't move under us.
2026-10-09 00:59:11 +08:00
Willie e44466c9fc test(sync): cover prefixed naming in project mode
Project mode inherits target_naming from the project config through a separate path (defaultTargetNaming on ProjectTargetEntry), so it gets its own end-to-end check that two same-named tracked-repo skills both sync.
2026-10-09 00:53:37 +08:00
Willie 1e00939512 fix(sync): keep naming migration from claiming another skill's entry
The legacy lookup checks a skill's flat, standard and prefixed names. With
a manifest that has no naming records yet, aaa/dev looked at "dev", found
the top-level dev skill's managed copy and synced into it, because nothing
said the entry belonged to someone else. A skill that already has its
current entry now skips the lookup, and names other skills sync to in the
same run are never treated as old names.
2026-10-09 00:53:13 +08:00
Willie 226c5c9a74 feat(target): offer prefixed naming in the CLI, dashboard and schemas
The new naming has to be choosable wherever naming already is: target
--target-naming, the target list TUI, the dashboard target page, shell
completions and the config schemas. Each setter checks the copy-only rule
before saving, for a naming change and for a mode change on a prefixed
target, so an invalid pair never reaches the config file and only surfaces
later as a failed sync.
2026-10-09 00:47:20 +08:00
Willie 35f3bb0e28 feat(sync): add target_naming: prefixed for copy-mode targets
Two tracked repos that ship a skill with the same name cannot both reach a
tool today: standard drops both, flat keeps both folders but tools list
skills by name:. Prefixed gives a skill inside a tracked repo the folder and
name: <repo>-<name> in the copy, so both stay usable and the name shows
where the skill came from. It is copy-only because a merge symlink points
at the source, where name: must not change; config validation rejects it
elsewhere, per target, like extension does.

Switching naming used to know only the flat name as the old one, so
standard <-> prefixed would orphan entries. The migration now checks the
skill's name under every naming, and the copy manifest records the naming
that produced each entry: a switch finds the exact old entry, and a renamed
copy is re-copied so its name: matches even when the source is unchanged.
Manifests without the record fall back to flat, standard, prefixed in turn.
A rename is written to the manifest at once, so a later failure cannot
leave the renamed folder looking user-owned.
2026-10-09 00:44:47 +08:00
Willie 366fb236c1 fix(sync): flag shared skills folders whose mode or naming differ
Two targets writing one skills folder with different target_naming or
mode undo each other on every sync (flat links vs standard names, merge
vs copy), but only include/exclude were compared, so sync and doctor
fell back to the generic shared-path hint.

Compare the effective mode and target naming too, so an unset value
equals the default it resolves to. The global default mode is not
carried on the target, so SkillsFolderConflicts takes it from its three
callers. The warning now says "different settings" instead of "different
filters".

Fixes #498
2026-10-09 00:28:34 +08:00
Willie 18d6b11347 test: test each rule once, in the package that owns it
Many integration and handler tests re-checked rules that internal/
packages already test, duplicated each other, or ran no product code at
all (a few re-implemented the logic inline, two could never fail). They
slowed the suite without catching anything new.

Delete those, keeping tests for CLI wiring, JSON output, exit codes,
project/global mode and cmd-only logic. Move the agents/extras overlap
check into sync.AgentTargetPaths so the CLI and the server share one
implementation and it is covered by unit tests instead of seven
integration tests.
2026-10-08 16:41:09 +08:00
Willie 36113be45e fix(extras): prune a symlink target only when it links to the source
The CLI's `--remove-target --prune` removed a symlink-mode target no matter
where it pointed, while the dashboard removed it only when it still linked
to the extra's source folder. A user who repointed that link at their own
folder could lose it from the CLI. Both now go through one shared
sync.ClearExtraTarget, so the safer rule applies everywhere; the CLI warns
and leaves anything that is not a link to the source instead of failing.

Refs #491
2026-10-08 16:19:32 +08:00
Willie 7a4103b9a8 refactor(extras): validate every mode change and share special extra names
cmdExtrasMode only ran ValidateExtraConfig behind a growing list of
conditions, so each new restriction needed another clause. For a plain
folder extra the full check adds only the mode-name and flatten+symlink
rules, which sync already rejects, so validating unconditionally cannot
refuse a config that syncs today.

The agents and memory extra names were string literals in sync, the
server handlers, the memory store, and the CLI. They now live in
internal/config, and the rename guard moves to ValidateExtraRename so a
future CLI rename reuses it instead of copying the check.

Refs #489
2026-10-08 16:08:03 +08:00
Willie c182c42d1a fix(extras): keep filter changes from being dropped or saved invalid
- On a multi-target extra, `extras <name> --flatten --add-exclude ...`
  without --target took the flatten-for-all-targets path, which returned
  before the filter flags were applied, and still reported success. Filter
  flags now require --target there, like --mode.
- The `extras list` TUI mode picker saved a mode without validation, so a
  filtered target could be switched to symlink and break every later sync.
  The change is now validated before saving.

Refs #435
2026-10-08 16:01:01 +08:00
Willie a9ae5349a2 feat(extras): choose which files each target syncs, and edit targets in place
A directory extra used to sync every file to every target, so a tool that
only wanted a few docs got the whole folder. Each target can now set
gitignore-style include/exclude patterns, matched on the path inside the
source. Merge targets prune links to files that stop matching; copy targets
keep earlier copies, since nothing records which copied files are ours.
Filters are rejected for symlink mode and single-file extras, and sync warns
when an include matches nothing.

The dashboard previously forced users to delete and re-add a target or an
extra to change it. Edit target now changes the folder, file name, mode,
flatten and filters with a live preview; Edit extra renames an extra or
points it at another source folder. A moved target or source drops the
links left at the old place and syncs right away.

CLI: --include/--exclude on extras init, and --add-include, --add-exclude,
--remove-include, --remove-exclude on extras <name>.

Refs #435
2026-10-08 15:31:51 +08:00
Willie 5d5b0f3efb feat(sync): explain include filters that select no skill
The dashboard showed the CLI's raw line, "api-server@claude: include pattern
"*review*" matches no skill in the source", once per target. It named a
config field, did not say the target ends up with no skills, and gave no way
to fix it. Sync now returns these as structured entries; the Sync page
groups a project's targets into one localized notice that says what happens
and links to where the filter is edited. The CLI line also says the filter
adds nothing to the target.
2026-10-08 14:26:41 +08:00
Willie 414d193114 fix(update): keep an existing skill ahead of the nested shorthand
Codex review of #481 found three problems with the shorthand change:

- `update org/team -p` and the dashboard stream updated the org/_team
  repo even when a skill exists at org/team, which used to win because
  the shorthand was not rewritten there. FindTrackedCheckoutUnlessSkill
  skips the nested shorthand when a directory exists at the typed path;
  plain names keep their repo-first behavior.
- Global `update team/` cleaned the name for repo matching but not for
  skill matching, so it silently updated `_team` instead of reporting the
  skill/repo collision that `update team` reports. resolveByBasename now
  cleans the name once for both.
- The update.md example sits in the Project Mode section but lacked -p
  (also in the four translations).
2026-10-07 23:58:43 +08:00
Willie 84ed67b13d fix(update): accept the org/team shorthand for --into repos in every entry point
A repo installed with `--track --into org` lives at `org/_team`. Only
POST /api/update accepted `org/team`; the dashboard stream and
`update -p` prefixed the whole name (`_org/team`), and global `update`
compared the full name with the basename, so each reported not found.

Move the candidate rule (the name as typed, then `_` added to the last
segment, never leaving the source root) into install.FindTrackedCheckout
and the basename match into install.MatchTrackedRepos, and use them from
the single update, the stream, project and global CLI update. A shorthand
resolves to its own `org/_team`, never to a top-level `_team`; plain names
and full paths keep their behavior.
2026-10-07 23:51:37 +08:00
Willie 27f4b1f61c Merge branch 'main' into runkids/fix-audit-markdown-context 2026-10-07 23:25:52 +08:00
Willie 75a732ae91 Merge branch 'main' into runkids/fix-audit-markdown-context 2026-10-07 23:21:55 +08:00
Willie 0be5164159 fix(update): use the tracked checkout rule in every update and reconcile path
#474 made install.IsTrackedCheckout (a _-prefixed git repo) the rule for what
a tracked repo is, but several paths still treated any git checkout as one, so
the same directory was classified differently depending on the entry point. An
unprefixed checkout, including a submodule or worktree whose .git is a file,
could be pulled as a tracked repo from the dashboard batch stream, the CLI
--group and project-mode name resolution, and the dashboard single update's
direct-path lookup, and reconcile wrote tracked: true for it.

All of them now use IsTrackedCheckout, so an unprefixed checkout updates as a
regular skill or is skipped, while _-prefixed repos, including --into repos
such as org/_team, still update as tracked repos.

Reconcile no longer registers an unprefixed checkout as tracked or creates an
entry for it from the git remote. An existing entry that an older reconcile
flagged tracked on such a checkout is kept with its source and branch; only the
flag is cleared on the next reconcile, so no user data is removed.

Fixes #476
2026-10-07 23:10:13 +08:00
Willie e589336bef Merge origin/main (#472) into runkids/473-tracked-repo-update
Resolve the conflict in getTrackedReposImpl by keeping both sides: the
IsTrackedCheckout rule from this branch and the slash-form paths #472
returns for --into repos (org/_repo). Add a GetUpdatableSkills test for a
rewritten --into checkout next to a top-level one.
2026-10-07 22:46:15 +08:00
Willie 8dee3108f3 Merge remote-tracking branch 'origin/main' into runkids/fix-audit-markdown-context 2026-10-07 22:35:50 +08:00
Willie aee75b69d6 fix(audit): distinguish SDK examples from prompt injection
Avoid blocking legitimate Markdown SDK parameters and ambiguous disclosure advice by default while retaining visible HIGH findings and strict-policy gating. Preserve explicit concealment, custom severity overrides, and shell dataflow coverage in HTML and comments. Add regression coverage and document rule-ID compatibility.
2026-10-07 22:35:50 +08:00
Willie 51d0a1e5e9 fix(update): repair tracked repo entries rewritten as regular installs
The old dashboard update rewrote a tracked repo's metadata entry as a
regular install: tracked was dropped and type, repo_url and version were
added. Those repos stayed broken after the routing fix, because
`skillshare update <repo>` found the name twice (as a repo and as a
regular skill) and refused it, and nothing restored the entry.

The shared tracked-repo update now restores such an entry to what
install --track records (source, branch, group, tracked) when its path is
a checkout GetTrackedRepos lists, so regular skills are never touched.
CLI name and glob resolution skip a regular-skill match whose path is
already a tracked repo, so the update can reach that repair.

Codex review: the routing fix sent every git checkout with metadata to
the tracked-repo update, including standalone skills installed as a full
checkout, whose regular update records the new version and commit.
Their version stayed stale and update checks kept reporting an update.
Only tracked entries and _-prefixed checkouts now skip the regular path.
2026-10-07 22:16:56 +08:00
Willie 504713b065 fix(uninstall): refuse removing part of a tracked repo's checkout
The CLI removed any skill or folder inside a tracked repo on its own:
`skillshare uninstall _team/foo` moved the skill out of the repo's
checkout, and `_team/vendor/_lib` (a submodule) was even treated as a
tracked repo because the CLI marks every git checkout as one. Either way
the repo was left dirty for the next update. The dashboard already
refused single skills inside a repo, but the rule lived only in its
handler.

The rule now lives in internal/uninstall, which both the CLI and the
dashboard go through: an item below a "_"-prefixed git checkout fails
with ErrInsideRepo in Preflight and Run, even with --force. A followed
source link is the user's own checkout, so skills below it can still be
removed one at a time.

The uninstall reference documents the rule and how to name a repo
installed with --into, with ja/ko/zh-Hans/zh-Hant translations.
2026-10-07 21:51:41 +08:00
Willie c9b649143d refactor: return slash repo paths and simplify --into repo lookup
GetTrackedRepos returned OS-native paths, so every caller that compared
them with slash paths (RepoRelPath, dashboard repoPath, metadata keys)
had to convert first. Two callers in install_queries already did, and
this branch added four more. It now returns slash paths on every OS,
matching GetMissingTrackedRepos; filepath.Join and filepath.Base accept
them on Windows, and `update org/_repo` now also matches by full path
there. The per-call-site conversions are gone.

Smaller cleanups in the same code:
- repoOf takes the slash relPath and looks up prefixes by substring, so
  the walk no longer splits and joins per directory;
- repo .skillignore matchers are keyed by the same slash rel path, so
  isSkillIgnored no longer needs walkRoot;
- batch uninstall uses utils.IsTrackedRepoDir instead of a literal "_";
- the dashboard uses repoOf where it spelled out isInRepo && folderOf;
- the new tests reuse postBatchUninstall and share one --into sandbox.
2026-10-07 21:35:05 +08:00
Willie 4dd62d4ce5 fix: treat tracked repos installed with --into as repos
`install --track --into org` clones to org/_repo, but skill discovery
only marked a skill as in-repo when the first path segment started with
"_". Everything downstream also assumed the repo name was that first
segment. Skills of such a repo were therefore treated as loose skills:
no source in the dashboard, not grouped under the repo, a skill count of
0 in `status`, and an install hint that pointed at the wrong name.

Discovery now records each skill's tracked repo root (RepoRelPath). A
first-segment "_" folder still counts as before; a deeper one counts
only when the walk saw it as a git clone, so a plain org/_drafts folder
stays a folder. The repo's .skillignore is looked up by the same root.

Consumers move from "first segment" to that root:
- the API exposes it as repoPath, and the dashboard groups, updates and
  uninstalls repos by it;
- `list` and `status` use it for repo names and counts;
- batch uninstall accepts a nested repo name, so the dashboard can still
  remove an --into repo now that its skills are in-repo;
- repo names sent to the dashboard by check and update-all use slash
  paths, so they match repoPath on Windows too;
- the install hint suggests `skillshare update org/_repo`.

Fixes #470
2026-10-07 21:23:26 +08:00
Willie 0117161c8b Merge remote-tracking branch 'origin/main' into runkids/436-managed-instruction-block 2026-10-07 01:13:44 +08:00
Willie fe4fcba122 Merge branch 'main' into runkids/arch-442-uninstall 2026-10-07 01:07:38 +08:00
Willie 4c6d152abf refactor(uninstall): run the CLI and dashboard through one operation
The uninstall sequence (move-out check, dirty check, move to trash,
.gitignore cleanup, metadata prune) lived in the CLI and in three
dashboard handlers, and the copies had drifted: three different prune
rule sets, no dirty check on DELETE /api/repos, and no metadata prune
at all on DELETE /api/resources, which left the removed skill's entry
and target overrides in .metadata.json.

internal/uninstall now owns the sequence for resolved items. Callers
keep name resolution, prompts, output, HTTP status and oplog.
MetadataStore.RemoveByNames is the single prune rule set: an entry goes
when it is a removed path or lies below one, by key or by Group, plus
the tracked legacy group of a top-level repo.

Behaviour changes, all intended:
- DELETE /api/repos/{name} refuses a dirty tracked repo, or one whose
  git status cannot be read, with 409 unless ?force=true.
- DELETE /api/repos/{name} refuses a followed link whose folder is
  itself a skill, like every other uninstall path.
- DELETE /api/resources/{name} prunes the skill's metadata.
- Removing top-level "foo" no longer prunes "frontend/foo" (CLI), and
  removing repo "_team" no longer prunes the untracked group "team"
  (dashboard batch); both dropped metadata of skills still installed.

Refs #442
2026-10-07 00:13:47 +08:00
Willie 2edf7649fd refactor(update): update tracked repos through one shared operation
Updating a tracked repo is a fail-closed sequence: check for uncommitted
changes, pull, audit what was pulled, reset to the pre-pull commit when the
audit blocks. The CLI had two copies of the pull flow, the dashboard a third,
and the audit gate existed four times (CLI, dashboard, and two in install).
The copies had drifted: the dashboard ignored a failed git status and never
refreshed root-skill metadata, and each copy worded a failed rollback on its
own.

update.TrackedRepo now owns the sequence and returns a structured result;
install.AuditGate is the only gate. internal/update is a new package because
internal/git already imports internal/install. The CLI keeps its spinner,
rows and the "Apply anyway?" prompt, passed in as one Confirm callback; the
dashboard turns the result into its JSON item.

Behaviour changes, all towards the stricter copy:
- the dashboard reports a failed git status as an error instead of pulling;
- the dashboard refreshes root-skill metadata after an update, like the CLI;
- a prompt that fails rolls the update back instead of leaving it applied;
- the rollback-failed and rollback-unavailable texts come from one place.

Accepted findings stay as they were (CLI honours and records them, the
dashboard does neither), now as the explicit AcceptedFindings input. The
"blocked and rolled back" texts are unchanged per caller because the
dashboard matches on them.

Refs #443
2026-10-07 00:10:54 +08:00
Willie ea83840bae test(update): pin tracked-repo update behaviour of the dashboard and CLI
The dashboard's pull flow for tracked repos had no tests of its own, and the
CLI had none for uncommitted changes. Both flows are about to be replaced by
one shared operation, so their current results are pinned first: clean
update, blocked and rolled back, skip-audit, force not remembering findings,
dirty repos, and the pull error hint.

Refs #443
2026-10-07 00:10:54 +08:00
Willie 05ff8c675a feat(extras): prepend and append modes for single-file extras
Tools without an @import directive (codex, gemini, cursor) could only
take a shared instruction file as a symlink or copy, which replaces the
target's own file. Teams that want one shared AGENTS.md plus the user's
own notes in the same file had no way to express that.

prepend and append write the source into the target file as a managed
block fenced by skillshare:extra markers that carry the source path and
a content hash. Sync inserts the block once and then rewrites it in
place, status reports modified when the block body no longer matches
its hash, Collect copies the edited body back to the source, Reapply
rewrites the block from the source, and restore removes only the
block. Lines outside the block, and markers inside code fences, are
never touched. Several managed blocks (and an import line) may share
one target file; the connection validator only rejects a file when a
replacing mode (symlink, copy, merge) is involved.

Refs #436
2026-10-07 00:04:00 +08:00
Willie 2647e79ef9 feat(mcp): require HTTPS for mcp serve off loopback
A non-loopback --http listener accepted a bearer token over plain HTTP,
so anyone on the path could read the token and the skills. Off loopback
it now also needs --tls-cert and --tls-key and serves HTTPS; loopback
stays plain, so a TLS-terminating proxy in front still works.
2026-10-06 16:08:44 +08:00
Willie 64898e145b fix(mcp): keep migration notices off stdout and require closed frontmatter
The first command after an upgrade reports legacy data it moved. For
mcp serve that notice landed on stdout ahead of the handshake, so it now
goes to stderr like serve's other messages.

A SKILL.md that opens frontmatter but never closes it could still parse,
so serve published a file hosts read as having no frontmatter; it is now
skipped with a warning.
2026-10-06 14:57:49 +08:00
Willie fd4f499be7 fix(mcp): keep serve digests and stdout trustworthy
Size and mtime cannot prove a file is unchanged (cp -p, rsync -t), and a
stale digest makes hosts that verify digests reject the file for good,
so every rebuild hashes every file again; 1,000 skills rebuild in about
140 ms, at most once per refresh interval.

Serve errors now go to stderr: stdout is the protocol stream, and a
startup error printed there is not JSON-RPC.

SKILL.md must begin with its frontmatter, as the Agent Skills format
requires; a later --- block no longer passes.
2026-10-06 14:39:21 +08:00
Willie cc7d802411 feat(mcp): serve skills over MCP with the SEP-2640 Skills extension
Agents on a disposable VM, in a hosted assistant or behind an MCP gateway can
reach an MCP endpoint but not the folder skills sync to, so they got tools and
none of the user's skills (#428).

`skillshare mcp serve` is a read-only server for the skills skillshare already
manages. It declares io.modelcontextprotocol/skills and implements skills/list,
skills/get and resources/read: one entry per skill, its URI from the source
path, the full frontmatter, and every file with a sha256 digest and size.
--target applies that target's selection, and the source is reread at most
every 5 seconds so install, update, enable and disable show up without a
restart; unchanged files keep their digest. stdio is the default; --http
serves Streamable HTTP and needs SKILLSHARE_MCP_TOKEN off loopback.

Skills the extension cannot carry are skipped with a warning instead of being
published incomplete: a name that breaks the Agent Skills rules or differs from
its directory, more than 512 files or 16 MiB, or a nested skill that is not
served. --check lists them without serving. The naming rules moved to
internal/skillpkg so sync and the server share them.

Few clients support the extension yet, so the server also offers list_skills
and read_skill tools. A client that declares the extension does not see them,
so it never gets each skill twice.

sync.SelectTargetSkills is the one place that turns discovered skills into a
target's selection (enabled, include/exclude, frontmatter targets).

Refs: #428
2026-10-06 14:18:16 +08:00
Willie 7d5776ef79 fix(link): show help before loading the scope and accept -g/-p as --name values
link -h loaded the config first, so it failed with "config not found"
without one and, with --project, could create .skillshare files just to
print help. Detect help among the option arguments before loading the
scope. Pass --name as a value flag to parseModeArgs so "--name -g" no
longer selects global mode (#422).
2026-10-06 00:02:28 +08:00
Willie 2d5ab6771c Merge remote-tracking branch 'origin/main' into runkids/419-link-unlink 2026-10-06 00:01:28 +08:00
Willie 1d66193749 Merge pull request #425 from runkids/runkids/422-mode-option-values
fix(cli): preserve mode flags used as option values
2026-10-06 00:00:33 +08:00
Willie 1f4a466eed fix(uninstall): refuse a linked root skill before the dirty preflight
A followed checkout whose root is a skill is classified as a tracked
repository, so a dirty checkout hit the uncommitted-changes preflight and
was told to retry with --force before the linked-root guard ran. Run the
guard right after target validation for every mode so the answer is always
"use unlink".
2026-10-05 23:46:02 +08:00
Willie e329f5d906 fix(cli): preserve mode flags used as option values
Pass value-taking options to the shared mode parser so command values cannot select a scope or create false mode conflicts. Preserve the end-of-options delimiter and reuse it for MCP command arguments.

Cover existing CLI entry points, including audit rules, enable/disable, and backup deletion, with regression tests and document the parser contract.
2026-10-05 23:12:35 +08:00
Willie ad5d5cd09f fix(link): roll back the link when enabling follow_source_links fails
link --enable created the link, logged success, and only then wrote the
config; a failed config write left a link discovery ignores behind a
logged success, and a retry failed with "already exists". Enable before
logging and remove the fresh link when enabling fails so the command,
the filesystem, and the operation log agree.
2026-10-05 23:01:50 +08:00
Willie ecb410ff95 test(link): compare canonical paths for the option terminator case
macOS temp directories live under /var, a symlink to /private/var, so
EvalSymlinks on the created link returns the /private form while the test
compared it with the raw t.TempDir() path. Canonicalize the expected path
as well so the integration test passes on macOS runners.
2026-10-05 22:58:13 +08:00
Willie 9db36b472a Merge remote-tracking branch 'origin/main' into runkids/419-link-unlink
# Conflicts:
#	internal/server/handler_skills.go
#	skills/skillshare/references/TROUBLESHOOTING.md
#	website/docs/reference/commands/ui.md
#	website/docs/reference/targets/configuration.md
#	website/i18n/ja/docusaurus-plugin-content-docs/current/reference/commands/ui.md
#	website/i18n/ja/docusaurus-plugin-content-docs/current/reference/targets/configuration.md
#	website/i18n/ko/docusaurus-plugin-content-docs/current/reference/commands/ui.md
#	website/i18n/ko/docusaurus-plugin-content-docs/current/reference/targets/configuration.md
#	website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/commands/ui.md
#	website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/targets/configuration.md
#	website/i18n/zh-Hant/docusaurus-plugin-content-docs/current/reference/commands/ui.md
#	website/i18n/zh-Hant/docusaurus-plugin-content-docs/current/reference/targets/configuration.md
#	website/src/data/featureMap.ts
2026-10-05 22:49:25 +08:00
Willie e7eecffeab Merge remote-tracking branch 'origin/main' into runkids/274-follow-source-links 2026-10-05 21:32:38 +08:00