1755 Commits
Author SHA1 Message Date
Willie df0817cf57 chore: release v0.20.4 v0.20.4 2026-06-02 18:56:25 +08:00
Willie ad6a2224f0 fix(ui): keep each extension download spinner independent
The Extensions section tracked the in-flight download with a single
`string | null`, so starting a second download cleared the first one's
loading state. Track in-flight downloads in a `Set<string>` so concurrent
downloads each keep their own spinner.

Also add ismferd to the README contributors.
2026-06-02 18:45:27 +08:00
Willie 86b91efe95 feat(extras): refine per-target management UI and path resolution
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
2026-06-02 18:40:00 +08:00
Willie 3306026472 docs(changelog): add extras per-target management and 'extras mode' removal to v0.20.4 2026-06-02 17:42:01 +08:00
Willie e7be4c60c4 docs(extras): sync quick-reference and built-in skill with per-target flags 2026-06-02 17:39:23 +08:00
Willie ab06f7b69e i18n(extras): add target add/remove toast translations 2026-06-02 17:32:26 +08:00
Willie 0a1724a74f test(extras): migrate mode tests to shorthand after subcommand removal 2026-06-02 17:27:28 +08:00
Willie b0732b75bb docs(extras): document --add-target/--remove-target; drop 'extras mode' subcommand 2026-06-02 17:22:56 +08:00
Willie 37ac6c5078 feat(ui): per-target add/remove controls on Extras page 2026-06-02 17:20:01 +08:00
Willie 8ee8ab76fe feat(ui): add addExtraTarget/removeExtraTarget API client methods 2026-06-02 17:17:44 +08:00
Willie 78a06da3d2 feat(server): add per-target add/remove endpoints for extras 2026-06-02 17:16:21 +08:00
Willie 4be846cb28 test(extras): integration tests for per-target add/remove 2026-06-02 17:13:33 +08:00
Willie 804f6803db feat(extras): route --add-target/--remove-target; remove 'extras mode' subcommand 2026-06-02 17:11:29 +08:00
Willie 2224791939 feat(extras): add cmdExtrasRemoveTarget handler with --prune 2026-06-02 17:10:02 +08:00
Willie a7a2e45b3c feat(extras): add cmdExtrasAddTarget handler 2026-06-02 17:08:16 +08:00
Willie c47785abd9 feat(sync): add PruneExtraTarget wrapper for per-target cleanup 2026-06-02 17:06:12 +08:00
Willie 1d0ee69955 feat: support SSH hub sources for private and GHE hosts
Hub index fetch previously handled only unauthenticated HTTP(S) GET or
local file paths, leaving private and GitHub Enterprise repos out of
reach — raw HTTPS URLs redirect to login before token headers apply, and
SSH-style hub URLs were unrecognized.

Resolve SSH hub sources by shallow-cloning the repo with the user's SSH
keys and reading the index from it. The in-repo index path uses the
existing //path subdir convention (consistent with `install`), defaulting
to skillshare-hub.json at the repo root. Both scp-style and ssh:// URLs
are accepted. In the web dashboard, SSH clones are restricted to saved
hubs so a request-supplied URL can't drive an arbitrary clone.

Ref #185
2026-06-02 16:29:25 +08:00
Willie fde373a1b2 docs: add dotned to contributors 2026-06-01 16:59:21 +08:00
Willie 594a767734 chore: release v0.20.3 v0.20.3 2026-06-01 16:31:13 +08:00
Willie 6c29934a4f feat: add agents path to copilot target
Copilot CLI uses the same .agent.md format Skillshare already syncs to
Claude and OpenCode, so no transformation is needed — only a missing
registry path. Add global (~/.copilot/agents) and project (.github/agents)
agent paths per GitHub's documented custom-agent locations.

Closes #184
2026-06-01 15:08:22 +08:00
Willie f255c4a28b fix: scope agent installation to the requested filter (#183)
Installing a specific skill from a mixed repo dragged in every agent.
The -a/--agent handler implicitly set Kind=agent, but -s/--skill never
set Kind=skill, so installDiscoveredAgents could not tell that the user
had narrowed the install — and it looped over every discovered agent
without applying the -a name filter.

Fix the install path so agents track the user's intent:

- -s/--skill (without -a) installs only the named skills, no agents.
- -s/--skill with -a installs only the named agents, via selectAgents,
  matching the pure-agent path.
- --all/--yes still installs everything.
- An unknown -a name fails the whole command before any skill is
  installed (validated up front against the discovered agents, including
  repos with no agents at all), so automation never sees a half-success.

Add integration tests covering each case.

Fixes #183
2026-06-01 14:42:24 +08:00
Willie bc65566f49 chore: release v0.20.2 v0.20.2 2026-05-31 23:27:09 +08:00
Letiancheng Lee 50e6cb885f feat: add target removal hints to doctor suggestions 2026-05-31 22:49:02 +08:00
Letiancheng Lee d35ed81789 fix: recognize GHE data residency hosts 2026-05-31 22:28:33 +08:00
Letiancheng Lee 980e7e3d87 fix: support custom SSH usernames 2026-05-31 22:28:33 +08:00
Willie e983ecf750 feat(ui): surface doctor suggestions on Health Check page
The doctor --json output gained a `suggestions` field (see eb99118d), but the web Health Check page silently dropped it. Render the remediation suggestions under each check's expandable detail block.

- Add optional `suggestions` to the DoctorCheck type

- Render suggestions list in CheckRow; make rows expandable when only suggestions are present

- Add `doctor.suggestions` i18n key across all 11 locales
2026-05-31 21:07:20 +08:00
Willie 85cc972f95 docs(doctor): document suggestions field; refine remediation wording
Follow-up to eb99118d (doctor overlap suggestions):

- Document the optional `suggestions` JSON field in doctor.md with an example

- Clarify shared-paths wording: the listed targets are all current collisions, not "the others"

- Print the cross-target suggestion after overlap detail lines for a more natural read order
2026-05-31 20:56:37 +08:00
TiR eb99118dc5 Add doctor overlap remediation suggestions 2026-05-31 20:53:18 +08:00
Willie 549d466f8f chore: update readme 2026-05-31 13:54:19 +08:00
Willie 7ac0431335 chore: release v0.20.1 v0.20.1 2026-05-31 13:51:55 +08:00
Willie 1183e0a366 fix: improve codex agent extension validation 2026-05-31 13:39:41 +08:00
Letiancheng Lee 0ae4e11376 reject blank codex agent descriptions 2026-05-31 13:07:25 +08:00
Letiancheng Lee ad9ffde242 fix codex agent extension validation 2026-05-31 13:07:25 +08:00
Willie 8df801e21e chore: release v0.20.0 v0.20.0 2026-05-30 19:48:52 +08:00
Willie 04f5cfa3c8 chore: update extensions readme 2026-05-30 19:45:16 +08:00
Willie 4d08690d36 fix(review): address PR #174 review feedback
- 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.
2026-05-30 19:23:12 +08:00
Willie def12c51ca chore: update docs 2026-05-30 19:23:12 +08:00
Willie e1c4761333 fix(extras): apply output_ext when computing diff target filenames
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.
2026-05-30 19:23:12 +08:00
Willie 2f6f6bd052 fix(git): enforce root-scope safety on commit/push instead of warning
Root-scope git operations detected hazards but proceeded anyway, letting
preventable mistakes reach the remote:

- Nested git repos were only warned about, then committed/pushed as empty
  submodules (silent data loss). Now commit/push abort (CLI non-zero exit,
  server 400) until the nested repos are disabled, and the web UI disables
  the commit/push buttons while any are present.
- The pre-stage safety sweep ran before the dry-run check, so `--dry-run`
  wrote .gitignore and ran `git rm --cached config.yaml`. The sweep/guard is
  now strictly read-only on dry-run and only reports what would change.
- Server git endpoints used EffectiveGitRoot() without validating git_root,
  so a hand-edited invalid scope silently fell back to skills. They now share
  a gitSource() guard that rejects invalid scopes with 400, mirroring the
  CLI's resolveGitRoot.
2026-05-30 19:23:12 +08:00
Willie 599c6e2160 fix(ui): honor status filter in grouped resources view
The grouped (folder tree) view ignored statusFilter in its isSearching, clear-filters, and empty-state logic, so filtering to Enabled/Disabled with no matches looked like an empty library instead of a filtered view with no results. Mirror the grid/table behavior by including statusFilter in all three checks.
2026-05-30 19:23:12 +08:00
Willie 4435429ada fix(extras): detect target conflicts in transform sync dry-run
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.
2026-05-30 19:23:12 +08:00
Willie 7419bc74d2 fix(extras): resolve extension target mode consistently in CLI and server
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.
2026-05-30 19:23:12 +08:00
Willie fc07a3c3ea fix(config): reject invalid git_root scope keyword
An unknown git_root value silently fell back to the skills scope via ScopeDir's default case, so a typo like "agnets" made commit/push/pull operate on the wrong repository without any warning. Validate the scope at the commit/push/pull entry point (resolveGitRoot) and in ValidateConfig, reusing the existing ValidGitRoot check backed by a new ValidGitRoots list.
2026-05-30 19:23:12 +08:00
Willie 53e4a02a7b i18n(git-root): clarify config.yaml tracked notice (explain machine-specific paths) 2026-05-30 19:23:12 +08:00
Willie eda9ac75a4 feat(git-root): guard root scope against submodule traps and config leaks
At the root git_root scope, `git add -A` over the config base directory
records any subdirectory that has its own .git (e.g. the skills source) as
an empty submodule, and can commit the machine-specific config.yaml.

- Detect nested repos and warn before commit/push (CLI) or surface them on
  the Git Sync page with a one-click "Disable nested .git" action (UI),
  which renames .git to .git.disabled (reversible) and drops any stale
  gitlink from the index so the directory's files track as normal blobs.
- Keep config.yaml out of a root-scope repo automatically: ensure it is
  ignored and untrack it (git rm --cached) before staging, on both the CLI
  and the web UI commit/push paths.
- Expose nestedRepos/configTracked in GET /api/git/status and add
  POST /api/git/absorb-nested (validated against detected nested repos).
2026-05-30 19:23:12 +08:00
Willie d5c865870a refactor(ui): tidy Git Sync scope selector and not-a-repo layout
- Move the git_root scope selector from its own row into the status bar
  alongside branch/HEAD, matching the repo-info layout
- Lay out the not-a-repo Initialize button inline (justify-between) so it
  no longer floats awkwardly below the warning row
2026-05-30 19:23:12 +08:00
Willie 96ead0b361 feat(ui): make Git Sync not-a-repo state actionable
The not-a-repo state was a dead end: the scope switcher only rendered once a
repo existed, so there was no way to initialize git or set a remote from the
UI. Add an 'Initialize git repository' button that opens the existing scope
dialog (with optional remote) — POST /api/git/root already inits the scope
repo and wires origin. Dialog title/message adapt for the init case.

Also detect a missing git executable: gitStatus reports gitInstalled (via
exec.LookPath), the page shows a clear 'Git is not installed' notice instead
of a cryptic 500 on init, and handleSetGitRoot rejects with a plain message.
2026-05-30 19:23:12 +08:00
Willie e158f77f03 fix(init): route --remote through validated git.SetOrAddRemote
The CLI addRemote ran a raw "git remote add origin <url>" with the
user-supplied URL, sharing the argv flag-smuggling risk just fixed in the
git package. Delegate to git.SetOrAddRemote so the --remote flag goes
through the same leading-dash rejection and "--" terminator, removing the
duplicated exec path.
2026-05-30 19:23:12 +08:00
Willie 56766b024c fix(git): reject flag-smuggling remote URLs in SetRemoteURL/SetOrAddRemote
A remote URL beginning with '-' could be parsed by git as an option flag
(argv injection, e.g. --upload-pack=...). Validate the URL (reject a leading
dash) and pass '--' before positional args so git stops option parsing.
Covers both the new scope-switch remote path and the existing skill-repo
URL editor that funnels through SetRemoteURL.
2026-05-30 19:23:12 +08:00
Willie 53e5b2455b feat(ui): set git remote during scope switch on Git Sync page
The Git Sync scope switcher now accepts an optional remote URL, reaching
UI parity with the CLI's `init --git-root <scope> --remote <url>`. The
POST /api/git/root handler takes an optional remoteURL and wires origin on
the just-initialized scope repo via a new git.SetOrAddRemote helper (adds
origin when absent, updates the URL otherwise). Adds gitSync.scope.remote*
strings across all locales.
2026-05-30 19:23:12 +08:00