Commit Graph
749 Commits
Author SHA1 Message Date
Willie 0580bd79bd feat(ui): add a refresh button to the Hubs page (#814)
The Hubs page keeps a hub's skill list for two minutes and does not
refetch on window focus. The server reads the index fresh on every
request (git hubs are re-cloned), so after someone pushes an updated
skillshare-hub.json the only way to see it was to wait or reload the
whole page.

A refresh icon button next to the filter refetches the list on demand.
It spins and is disabled while loading; the current list stays on screen,
and a failed fetch shows the existing error note above it. Your own
(draft) Hubs are local and do not get the button.
2026-11-09 18:08:25 +08:00
Willie 2bc791ed19 perf(plugin): check every plugin at once and skip sources that did not move (#812)
* perf(plugin): check every plugin at once and skip sources that did not move

The Plugins page's update check read every Agent CLI, cloned and hashed
every source, and asked npm about every package one after another, so it
grew with each plugin added. A single Agent CLI that stopped answering
held the whole page at "Checking for updates" with no way to tell which
plugin was stuck.

The check now asks every Agent and checks every plugin at the same time.
Plugins share one read of each Agent and each source, so an Agent with
many plugins is still asked once, and a plugin waits only on its own
Agents, including when proving its own leftover installs. Before downloading a remote source with no pinned ref, the
check asks the remote which commit its default branch points at with
`git ls-remote` and reports no update when that is the installed commit.
A check of three unchanged GitHub plugins on two Agents went from 4.3s
with three clones to 0.6s with none.

The dashboard reads the check from a new stream, GET
/api/plugins/check/stream, that sends each plugin as soon as it is
checked. The page marks rows as they arrive and counts progress in the
header. The stream stops waiting after 60 seconds: a plugin bound to an
Agent that has not answered by then shows "Check failed" with the
reason, and plugins on other Agents are unaffected. There is no limit on
how many plugins run together, because plugins waiting on a hung Agent
would otherwise hold every slot and starve the rest.

A cancelled command did not return when the Agent CLI was a shim that
starts the real client, such as an npm, mise or volta wrapper: killing
the shim left the child holding its output, so the command waited until
the child exited and no timeout took effect. Commands now stop waiting
for output two seconds after they are cancelled; a command that exits on
its own while a helper keeps its output open still counts as answered.

* fix(ui): offer every update the Plugins page shows in the update dialog

The header counted updates from the per-plugin marks, but the update
dialog offered only the targets in the last completed check's plan. Two
cases left the header saying Update N with nothing to tick in the dialog:
a first check that broke off after finding an update never set the plan,
and a recheck that could not reach an Agent kept that Agent's earlier
update while the plan said blocked.

The dialog's plan is now derived from each plugin's last answer together
with the kept updates, so a kept update stands in for the blocked or
missing answer and both always agree. A broken-off check also keeps the
answers it did receive.
2026-11-09 15:06:55 +08:00
Willie 228efb4fca feat(ui): search the include/exclude preview list (#799)
* feat(ui): search the include/exclude preview list

With dozens of skills, finding one row in the filter preview meant
scrolling the whole list before a click could include or exclude it.
A search box above the preview narrows the rows by name, ignoring case,
and marks the matching text. It only narrows what is shown; the filters
and the summary still cover every row.

The preview is shared, so the search appears on the project page, the
target page, and the Extras edit-target dialog. Switching between skills
and agents clears it, since a skill name rarely means anything as an
agent search.

Closes #798

* fix(ui): hide the stray scrollbar on the skills tab bar

The tab bar scrolls sideways at phone width, and overflow-x: auto makes
the other axis auto too. In the Clean style each tab hangs 1px below the
bar to cover its underline, so the bar overflowed by 1px and Chrome drew
the app's 8px custom scrollbar as a small dark pill at its right end.
Clipping the vertical axis keeps the sideways scroll and the underline.
2026-11-08 03:26:41 +08:00
Willieandsim 51107fb1ac fix(projects): save new projects in config.yaml again (#793)
* fix(projects): save new projects in config.yaml again

v0.29.0 wrote every project add, edit and remove to a machine-local
registry, so a project added on one machine never reached config.yaml
or the other machines that share it (#792). Most people share one
config.yaml and expect a new project to follow it.

config.yaml is the default again. Machine-local storage stays as an
explicit choice: --machine-local on add, or projects_storage:
machine-local for every new project, with --shared to override it.
The new share command moves a local project into config.yaml, and
localize still copies one to this machine. Edits and removals stay in
the layer that owns the project; removing a local copy of a
config.yaml project keeps config.yaml's version unless --shared asks
to remove both, so one machine cannot silently drop a project for
the others. Exclusions written by v0.29.0 are left as they are.

The dashboard picks storage once, in the Add project dialog, and
offers the two removal choices only where both copies exist. Moving a
project between layers stays a CLI command, so the detail page keeps
one job.

Closes #792

* fix(projects): recheck both layers after a confirmation, sync the saved key

remove and share ask before taking the config lock, then compared only
the merged entry after locking. A share or localize from another
terminal moves a project between layers without changing that entry, so
a remove confirmed for this machine's copy could then delete config.yaml's
declaration for every machine, and a confirmed share could overwrite
config.yaml settings changed meanwhile. The recheck now compares the
owning layer and config.yaml's declaration too (ProjectLayerState).

Re-adding a project that v0.29.0 hid restores config.yaml's own key,
which can be spelled differently from the folder given to add (~/app
versus an absolute path). add --sync looked the project up by the given
spelling and failed with "project not found" after saving it; it now
syncs the key that was saved.

* test(projects): make the layer tests hold on Windows

The mutation-sequence test looked the shared project up by
filepath.Join, but the fixture spells config.yaml's key $ROOT/app;
on Windows the two spellings differ, so the lookup found nothing.
It now asks the config for the key it uses.

The remove save-failure test blocked the local registry, but removing a
config.yaml project now writes config.yaml. On Linux the registry check
still failed with ENOTDIR first, which hid the mismatch; on Windows that
reads as a missing file and the save went through. The test now blocks
config.yaml, as the edit save-failure test does, and its hook no longer
shadows the config path with the target path.

---------

Co-authored-by: sim <sim@example.invalid>
2026-11-06 23:49:30 +08:00
Willieandsim 2c41fa57cc fix(ui): let any git source switch branch on the skill detail page (#790)
A skill installed from a non-default branch of an SSH or other-host
remote (git@host:o/r.git, Gitea, self-hosted HTTPS) could not switch
back to main: the Branch picker was greyed out with "This source can
only use its default branch" (#787). The picker reused /api/hub/refs,
which only lists refs for GitHub, GitLab and Bitbucket web URLs because
a hub entry pins its ref in the URL. Reinstalling from a branch does
not need that; the update endpoint already accepts any git source.

/api/hub/refs now takes anyGit, which lists a non-pinnable git source's
refs while still reporting pinnable=false. The detail page asks for it
under its own query key; the hub editors keep the old request, so they
run no extra ls-remote for sources they cannot pin.

Closes #787

Co-authored-by: sim <sim@example.invalid>
2026-11-06 21:19:50 +08:00
Willieandsim ddc33fb8c7 feat(audit): keep an incomplete scan visible in Markdown, the TUI and the dashboard (#786)
* feat(audit): show unfollowed source links in Markdown and the TUI

When a followed source link could not be read, only text output (and
JSON's warnings/incomplete fields) said so. A Markdown report looked
like a full scan, and the TUI covered the warnings printed before it
opened, so a partial scan read as complete there. Item 25 of #746 asks
for incomplete status to stay visible in human reports, including
under --min-severity.

Markdown now ends its summary with a "Source links not followed"
section, led by an "Incomplete scan" line when a link could not be
read. The TUI summary line starts with the count in the warning
colour. JSON and SARIF are unchanged.

* feat(ui): mark a partial audit scan on the dashboard

The audit API dropped the source-link warnings the scan collected, so
the dashboard showed a scan that skipped an unreadable followed link as
complete. Item 25 of #746 asks for incomplete status to stay visible in
every human report, the dashboard included.

GET /api/audit and the stream's done event now carry warnings and
incomplete with the same meaning as `audit --format json`, and the
Audit page shows the count beside the Skills/Agents tabs.

* feat(ui): stop calling an incomplete audit scan all clear

After a scan that skipped an unreadable followed source link, the
Audit page still toasted "no dangerous content" and the Dashboard's
Quick Scan toasted "All clear", while the home page showed nothing,
so a partial scan still read as a clean one there.

Both toasts now warn that the scan is incomplete, and the home page's
"Needs attention" list gets a row linking to the Audit page. One
helper words the note for the Audit page label, both toasts and the
row.

---------

Co-authored-by: sim <sim@example.invalid>
2026-11-06 14:55:35 +08:00
Willieandsim 9c916df663 fix(audit): keep clean resources visible under a display floor (#785)
With --min-severity set, the TUI dropped every result without visible
findings, so clean skills disappeared from the list and the tab count
shrank, while text and Markdown output kept them. The rule now lives in
audit.HiddenByFloor and both the TUI and text output use it: a floor
hides only a result whose findings all fall below it and that is not
blocked.

The dashboard severity buttons label themselves with the English
severity, matching the badge they show, so the six translated label
keys added for them are gone. AuditPage.test.tsx again asserts the
exact coverage line and count instead of any three digits, and drops a
rendered test that only checked translated labels. The audit-engine
paragraph about --min-severity now appears in all four translations.

Co-authored-by: sim <sim@example.invalid>
2026-11-06 14:21:21 +08:00
4b31eccb93 feat(audit): add a display-only minimum severity (#751)
Reduce audit report noise without changing full findings, risk scores, severity gates or machine output. Reuse existing severity ordering and dashboard selection, and keep visible/hidden counts and incomplete-scan status explicit in human reports.

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: Willie <egg358358@gmail.com>
2026-11-06 14:08:22 +08:00
Willieandsim 5e90cf4b71 feat(ui): show a skill's branch and switch it from the detail page (#784)
* feat(ui): show a skill's branch and switch it from the detail page

A skill installed with --branch looked the same in the dashboard as one
from the default branch, and moving it to another branch meant a manual
reinstall from the CLI (#783).

The list, tiles, tree pane and Updates tab now tag the branch a skill was
installed from. The detail page lists the source's branches; picking one
confirms, then reinstalls through POST /api/update with a new `branch`
field, so the audit gate and the local-changes check still apply and a
branch without the skill leaves the install in place.

In project mode, reconciling config.yaml only added missing skills, so a
reinstall from another branch (the switch, or install --branch --force)
left config.yaml naming the old branch while the lock pinned the new
commit. Reconcile now moves the declared branch with the record.

Closes #783

* fix(update): make branch switches install the requested branch safely

Codex review of #784 found four ways a switch could misreport or lose work:

- A root skill installed as a full clone took the pull fast path on later
  switches, pulling its current branch instead of the requested one. The fast
  path now applies only when the checkout is already on that branch.
- A branch whose skill folder lacks SKILL.md replaced the skill with a plain
  folder. A staged update now refuses a candidate without SKILL.md when the
  installed copy has one, and keeps the install.
- Reconciling config.yaml from local metadata could rewrite a teammate's
  newer branch declaration back to a stale one on an unrelated install. The
  generic reconcile change is reverted; the switch updates only the switched
  skill's declaration.
- The config editor cache kept the old branch after a switch, so a later save
  could undo it. A successful switch now invalidates the config query.

---------

Co-authored-by: sim <sim@example.invalid>
2026-11-05 22:44:03 +08:00
Rusty Shackleford 5dd9925c98 fix(projects): keep registrations in machine-local state (#769)
Keep machine-specific project changes out of shared configuration while preserving shared registrations and making their origin visible. Handle missing replicated roots and preserve startup maintenance for mutating commands.
2026-11-05 15:23:28 +08:00
8d0a675b57 feat(audit): identify disguised executable headers (#756)
Extension and size filters could hide native executables and Python bytecode
inside document, image and cache paths. Classify bounded headers before those
filters, retain source boundaries, and report opaque and oversized file counts
separately from auditable text.

Keep archive signatures and uncertain headers informational rather than claiming
runtime analysis. Honor analyzer selection for file and dashboard scans, and
cover renamed payloads and benign twins with synthetic fixtures and fuzzing.

Implements item 7 of #746.

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: sim <sim@example.invalid>
2026-11-05 14:55:46 +08:00
d699c3ef14 feat(audit): detect sensitive destinations and unsafe deserialization (#753)
Existing URL and code-execution signatures miss cloud metadata access and
language-specific deserializers. Add scoped static evidence and inspect safe
YAML and torch options within each call so safe siblings cannot hide risks.

Validate and preserve file applicability across overrides, scans and rule
listings. Collect PHP scripts and propagate rule-load errors so malformed
filters cannot silently disable global scanning. Document the policy and
limits with paired regressions, fuzzing and an isolated CLI runbook.

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: sim <sim@example.invalid>
Co-authored-by: Willie <egg358358@gmail.com>
2026-11-05 14:47:04 +08:00
4ededca4dd feat(audit): check bundled reference containment (#754)
Required local references can currently escape a skill bundle or fail silently
when written as images and explicit code paths. Resolve them within the declared
root without reading external targets, retain dangling-link compatibility, and
share the findings and rule controls with doctor. Keep metadata and integrity
fallback reads within the same root so they cannot reopen skipped symlinks.

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: Willie <egg358358@gmail.com>
2026-11-05 14:37:33 +08:00
Willie 11add19544 feat(ui): note how Nix updates the CLI in the update dialog (#771)
* feat(ui): show the install's own upgrade command in the update dialog

The update dialog always offered `skillshare upgrade` for the terminal.
On Nix that command only prints advice, and Homebrew users are better
served by `brew upgrade skillshare`, so the right command appeared only
after a click on Update returned an error.

/api/version now detects the install method, reports its command as
upgradeCommand, and looks up the latest version the way the CLI update
notice does for that method. The dialog shows that command, or the
existing "update your Nix configuration and rebuild" text when a Nix
configuration provides skillshare, so no new translations are needed.

* fix(ui): keep `skillshare upgrade` in the update dialog, add only a Nix note

Review of the previous commit found three regressions:

- `skillshare upgrade` already runs `brew upgrade` on Homebrew and also
  updates the built-in skill. Showing `brew upgrade skillshare` (or the
  nix profile command) instead broke the case where only the skill is
  outdated: the shown command updates nothing.
- /api/version looked up the latest version through `brew info` on
  Homebrew, inside the request with no timeout. Homebrew's auto-update
  could stall the dialog, and a server without brew on PATH never showed
  an update.
- The rendered dialog tests only checked shown text, which
  wiki/frontend.md says to leave to screenshots.

The dialog keeps `skillshare upgrade` and the GitHub lookup. /api/version
reports nixUpgradeCommand only for Nix installs, and when a newer CLI is
pending the dialog adds the existing Nix advice under the command. The
decision lives in nixUpdateNote, unit-tested in upgradeError.test.ts.
2026-11-04 16:51:03 +08:00
Charitarth ChughandClaude Opus 5.5 64c8a3f34e feat: add Nix flake and handle Nix-store installs in upgrade (#764)
* feat: add Nix flake and stop self-upgrade of Nix-store installs

Add flake.nix with packages, overlays.default, checks and a formatter,
building nix/package.nix with the unit tests in the Nix sandbox. The
version comes from the Release Please manifest, so releases need no Nix
edit. A Nix workflow runs `nix flake check` on non-docs changes.

`skillshare upgrade` now detects binaries under /nix/store/ and prints
`nix profile upgrade skillshare` instead of replacing a read-only store
path; update notices and doctor suggest the same command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(upgrade): give Nix installs the right update path everywhere

The first flake commit sent every /nix/store binary to `nix profile
upgrade`, failed a plain `skillshare upgrade` with exit 1 even when the
CLI was current, and left the dashboard with a generic 500.

- Tell `nix profile` installs (the profile manifest lists the store path)
  from NixOS, Home Manager and overlay installs, which are told to update
  their configuration and rebuild. Detection lives in one helper shared by
  the update notice, doctor, upgrade and the dashboard.
- `upgrade` on Nix reports "already up to date" or prints the hint and
  exits 0; the built-in skill still updates.
- The dashboard runs the upgrade so the skill updates, then answers
  409 `upgrade.nix` with the command when a newer CLI waits on Nix. The
  UI shows localized text for it in all 11 locales.
- Installs skip the unit tests; the flake's checks enable them. postPatch
  lowers only the go directive's patch version and fails evaluation with
  a clear message when go.mod needs a newer Go minor. CI also builds the
  package on macOS.
- Docs, translations, the built-in skill reference and the release topic
  describe the new behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:53:57 +08:00
Rusty Shackleford 65af9c17b7 feat(audit): detect narrow prose risk directives (#711)
* feat(audit): detect narrow prose risk directives

* fix(audit): honor link confidence and narrow refusal rule

Apply configured confidence to Markdown link findings and require safety-related evidence in anti-refusal directives to avoid ordinary compliance false positives.

* fix(audit): address prose and confidence review feedback

Narrow prose matches, preserve overrides when enabling rules, and expose effective confidence to rule consumers. Expand Markdown coverage and synchronize the audit guidance.

* fix(audit): retain scheduled payload detection

Keep detecting directives that schedule a payload while excluding ordinary payload processor terminology.

* fix(audit): preserve prose detection recall

Recognize concise disclosure and safety override directives while retaining benign exclusions. Share the confidence default and cover replacement overlays.

* fix(audit): detect quantified refusal directives

Retain detection when a directive refers to any or every user request while preserving benign security discussion.
2026-11-02 16:31:56 +08:00
Willie b3a7fc5263 feat(ui): copy another project's MCP server into a project (#681)
Adding a server a user already set up in another project meant typing it
in again. The project MCP tab's Add server dialog now has a "From another
project" tab that fills the form from a server another mcp.projects root
has. The copy leaves out that project's targets, so it follows this
project's Agents. Off switches are not offered.

Closes #678
2026-10-31 18:17:44 +08:00
Willie cc4c9e436b feat(ui): show which Agents load an enabled global MCP server in a project
A project's MCP tab only showed Agent logos for a global server that was
turned off, so an enabled row gave no hint of where the server loads.
Enabled rows now show the Agents the global server is written to; a row
overridden by a project server of the same name shows none.

Closes #677
2026-10-31 17:32:58 +08:00
Willie 9aec05521a test(ui): stop expecting the retired selection outcome message
#660 removed "Sync selection saved..." and its translation key, but
outcomeText.test.ts still expected it to localize, so the dashboard
suite failed on main. CI does not run vitest, which let it through.
2026-10-31 04:27:56 +08:00
Willie 8c2c646613 fix(ui): drop empty plugin notes before joining them
#660 stopped filtering plugin changes and results by message, so rows
with no message now reach the join. Two such rows joined to a blank
note, which hid the "Blocked" fallback and showed an empty note under
a skipped or running plugin.
2026-10-31 04:27:56 +08:00
Rusty Shackleford da3383ed5f fix(plugins): separate shared intent from local installation state (#660)
* fix(plugins): separate shared intent from machine-local receipts

Shared configs currently carry native paths, reviewed snapshots and pending
failures, so one host can publish local progress over another host's target
selection. Persist versioned declarations separately from local applied and
pending receipts, and reconcile reviewed installs, imports and cleanup against
this machine's native inventory without rewriting intent during sync/update.

Keep snapshot names and adapter safeguards, move the operation lock locally,
validate legacy adoption with local evidence, and invalidate approval on local
state or native-context changes. Preserve source recipes after native adoption,
require local import for absent native-only targets, and document the shared
writer upgrade boundary in schemas and translated references.

Cover two-host behavior, generated legacy fixtures, failure/recovery, stale
intent, cleanup, npm recipes and the existing CLI/API/UI consumers with focused
resource-capped tests. Fixes #651.

* fix(plugins): preserve intent and ownership across host transitions

Repeat-add must retain shared target selection, and update previews must resolve
the requested ref before reviewing fresh or replacement installs. Keep disabled
targets on the uninstall path and reject refs unsupported by native-only/npm
intent before they can produce invalid shared declarations.

Block changed-context add/import before Pi registration preparation so a new
account cannot overwrite the old receipt. Preserve unresolved legacy bindings
as passive private proof candidates before rewriting shared YAML, retaining
original intent/store for later verified adoption and cleanup. Never compose
these hints as executable state, and persist their explicit resolution.

Cover the five review classes, native/private failure boundaries, requested-ref
retry, and original-context hint proofs with isolated focused regressions.
Keep local format v1 and baseline account validation unchanged. Refs #651.

* fix(plugins): allow receipt-only orphan cleanup to complete

An installation already removed on this host can retain a local receipt when
another host removes or replaces shared intent. Sync correctly plans forget,
but native command verification rejects that metadata-only action and blocks
all targets before the receipt can be cleared.

Exclude forget from native command verification while retaining host inventory
checks and OMP scoped cleanup preparation. The existing completion path then
persists receipt deletion, including pending work and passive legacy hints.

Cover the cross-host disable/re-enable/remove walk, five native adapters,
failed work with a legacy hint, and absent source replacement alongside a
healthy target. Assert Apply completion, unchanged shared bytes/mtime, and a
quiet second sync. Refs #651.

* fix(plugin): reconcile ref intent across inventory consumers

Validate explicit ref changes before disabled targets can save them and reuse
one reviewed discovery throughout a preview. Surface shared ref changes as local
reconciliation work while preserving the applied native identity and receipts.

Reuse scoped legacy proofs for Pi extension ownership and make full inventory
the dashboard's authoritative package/host pair. Cover invalid and replacement
refs, read-only ownership, and shared-state properties without new persisted
state or dependencies.

* test(plugin): repair and consolidate host-state fixtures

Create source intent and a pending imported Claude update through supported
operations so direct and batch updates exercise the intended fixture. Keep the
marketplace-loss case locally owned before testing its skipped reinstall.

Consolidate cross-host repeat-add and requested-ref replacement/orphan retries
at their existing owners, retaining failure recovery and shared-byte checks.
Trim duplicate HTTP and translated-text assertions from consumer tests.

* fix(plugin): reconcile legacy snapshot reads and native imports

Resolve legacy snapshot ownership through existing scoped proofs before listing,
reading or discovering cached source files. Keep adoption read-only and limit
proof work to the requested package and targets; current receipts need no CLI.

Only preserve reviewed source metadata on reimport when intent remains source
managed. Native-only intent must not resurrect an older Git source after a
same-ID local import. Retain identity mismatch and reviewed-source safeguards.

Remove the unused source-folding helper left by the old shared runtime writer.

* Preserve reviewed package versions locally

* Fix reviewed package version lifecycle

* fix(plugin): report missing local imports in doctor

Show the local-import instruction instead of claiming a skipped imported
plugin is healthy. Preserve the missing-CLI warning and shared config bytes.

Keep fixture native settings inside scratch XDG directories and serialize
the fake CLI calls used by concurrent inventories. Update assertions to
separate shared declarations from local versions and native IDs, and align
the raw-write audit with private plugin state and operation locks.

* test(plugin): use declarations for doctor source fixture

The missing-CLI case has no native ID, so encode it with the version 2
declaration schema. Keep the native-only import case in legacy syntax.

* fix(plugin): install shared sources from reviewed snapshots

When a source target is already declared, first sync must install its
reviewed local snapshot even if the native client has a package from the
same marketplace. Keep explicit add adoption and native-only import intact.

Extend the existing two-host adoption check to cover an independent native
installation on the second host and verify a quiet subsequent sync.

* fix(plugin): preserve reviewed retries and native collision boundaries

Retry a pending source update through the existing reviewed update path,
so a rolled-back native failure cannot clear progress at the old snapshot.
Record default-source versions for add, sync, and update while retaining
the recipe fingerprint and generic-version checks for target overrides.

Keep explicit native adoption, but block shared Claude sources when an
independent same-name native plugin could shadow their hooks. Extract the
existing adoption decision so the preview function becomes smaller.

* test(plugin): respect OMP update safety in version control

Check generic and target versions during review, then confirm the existing
OMP upgrade guard preserves the installed and default-source versions.

* fix(plugin): declare first local native imports explicitly

A first local import into a shared source target now changes that target
to native-only intent while preserving its sync selection. Verified source
reimports retain their reviewed source and the preview discloses conversion.

Cover the explicit import, local sync, and other-host cleanup flow, and
remove the unconsumed internal observation assertion from the OMP test.

* docs(plugin): explain first local import intent changes

Describe the shared native-only target conversion and its effect on other
machines, while distinguishing verified source reimports.

* fix(plugin): verify checked sources before native reinstalls

A checked update that becomes an install after native removal must still
match the source digest the user approved. Reject moved or unchecked
sources before native work, and allow a stable approved reinstall.

Clear completed reinstalls from dashboard update availability while keeping
failed targets available for retry. Cover both native presence states in
the existing checked-update tests and the dashboard outcome rule.

* fix(plugin): guard replacement before cleanup

* fix(plugin): refresh discovery for each manager action

A later Add action must review the current source even when the manager
previously observed that source. Keep discovery sharing across one action
while ending its cache before the next wizard invocation.

Exercise a fresh source version after an earlier Add preview without TTY
input or native writes, using an unavailable client to stop at review.

* test(plugin): cover desired checks and final update outcomes

Consolidate checked batch approval and dashboard completion tests while
retaining removed-native, digest, version and approval controls. Reproduce
stale shared recipes and failed or unfinished replacement installs.

* test(plugin): make stale source discovery observable

Remove the old repository before native-only and npm desired checks so
those existing cases cannot pass by reading the applied source.

* fix(plugin): check desired source and final outcome

* test(plugin): bind checked updates to the observed recipe

Reproduce a shared candidate change with equal version, commit and digest,
and preserve a freshly checked replacement whose native ID differs. Use
actual check observations in approval and native update controls, reject
missing source identity, and verify the UI carries the observation through.

* fix(plugin): bind checked update to source recipe

* fix(ui): classify npm recipes as Pi packages

* fix(plugin): retain legacy removal intent during migration

Omit pending removals from shared declarations while retaining original local ownership proof so sync retries cleanup.

Verification: focused regression passed in an isolated Linux Codex container, not the devcontainer (GOMAXPROCS=4, -p=4).

* fix(plugin): keep imports local to an existing shared recipe

Adopt a native installation into its local receipt without converting the shared source target or removing other machines installations.

Verification: focused import regressions passed in an isolated Linux Codex container, not the devcontainer (GOMAXPROCS=4, -p=4).

* fix(plugin): capture legacy evidence on first read

Persist passive hints before another machine writes v2 and save verified adoption on reads. Apply reuses preview receipts instead of querying every legacy binding again. Document the per-machine pre-migration read.

Verification: migration regressions passed in isolated Linux Codex container runs, not the devcontainer (GOMAXPROCS=4, -p=4).

* fix(plugin): target named declarations in interactive imports

Offer unresolved package names in dashboard and TUI imports and pass the selected name in single and batch requests. Drop display-only rendered assertions.

Verification: 47 UI tests passed with at most four workers in an isolated Linux Codex container, not the devcontainer.

* fix(plugin): localize shared intent plan guidance

Add message keys for local imports, account changes, cleanup and native collisions across all dashboard locales. Localized guidance contains no CLI flags.

Verification: failing localization regression now passes in an isolated Linux Codex container, not the devcontainer (GOMAXPROCS=4, -p=4).

* refactor(plugin): reuse preview inventory and guard apply boundaries

Capture hints on first load without persisting in-memory adoption during preview, keeping approval revisions stable. Apply reuses preview inventory. Reuse accountEnv and guard applyChange plus native write boundaries without inspecting argv.

Verification: migration, receipt, account and sync regressions passed in an isolated Linux Codex container, not the devcontainer (GOMAXPROCS=4, -p=4).

* test(plugin): organize host state coverage around lifecycle scenarios

Group migration, ref drift, account context and cleanup tests behind shared host fixtures and public Preview/Apply assertions. Cover Codex, Cursor, Antigravity and project scopes; add second-machine doctor coverage and the two-machine runbook. Consolidate package-version tests and remove the unused private-record fixture.

Verification: focused plugin regressions passed in an isolated Linux Codex container, not the devcontainer (GOMAXPROCS=4, -p=4).

* docs(plugin): explain local imports and per-machine migration

Document local receipts, per-machine review and commit pinning, config-path state identity and the required legacy read on every machine. Align sharing, doctor, troubleshooting, file-layout and four translated plugin references; restore schema editing guidance.

Verification: context-router check passed. Runtime verification uses an isolated Linux Codex container, not the devcontainer.

* refactor(plugin): separate unrelated review scope

Move project OMP configuration, plugin list ordering, and npm Pi classification to independent local branches based on upstream/main. Keep the shared intent change focused and cover named import selection in the pure flow helper.

The three local branches have passing builds in a Linux Codex container, not the devcontainer, with isolated test homes and capped parallelism.

* perf(plugin): avoid recapturing v2 state on reads

Only compare and persist passive migration hints when legacy bindings exist. Native v2 reads need no state serialization for migration.

Verification: pending removal and first-read/import regressions passed in a Linux Codex container, not the devcontainer, with isolated HOME/XDG/TMPDIR and GOMAXPROCS=4 GOFLAGS=-p=4.

* docs(plugin): clarify native marketplace repair after import

A local import receipt is not a reviewed reinstall source. Correct the remaining troubleshooting instruction and its four translations to require native-client repair, and align the nearby code comment.

Validation: checked against prepareChange, context-router check and git diff --check passed. Verification for this review ran in a Linux Codex container, not the devcontainer.

* fix(plugins): preserve local ownership across shared intent changes

Retain completed legacy migration markers so unchanged v1 YAML cannot
uninstall a later manual reinstall. Serialize read-side hint persistence
with native operations and keep local imports when shared recipes change.
Require explicit dashboard import names and validate recipe identities.

Correct schema descriptions, messages, CLI ref status, translated migration
guidance and runbooks. Add failing-first Preview/Apply regressions and a
real two-ssenv CLI lifecycle script.

* fix(plugins): preserve migration history and show retained import guidance

Mark existing legacy hints and receipts as captured before cleanup so state
from the previous serializer cannot re-adopt a later manual installation.
Keep recipe-change guidance in unchanged sync outcomes and visible dashboard
rows, and resolve nested OpenCode entries through their package manifest.

Cover public migration, ref, account, import and message contracts across
adapters. Correct the real two-host Cursor assertions, explicit dashboard
selection flow, and remaining localized guidance.

* fix(plugins): retain explicit OpenCode entry during import matching

Standalone OpenCode packages can rely on a reviewed explicit entry rather
than an SDK dependency. Preserve that entry when reading native package
identity so matching nested imports remain supported.

* fix(plugins): preserve migrated imports and verify native entry identity

Recognize older native-only receipts by their existing declaration
fingerprint so remote source recipe edits cannot replace migrated imports.
Keep managed npm receipts distinct through their source fingerprints.

Only borrow an ancestor OpenCode package identity when its resolved entry
is the actual registered file. Retain nested and explicit entry support.
Add public two-host migration and mismatching-entry regressions.

* fix(plugins): retain imported ownership through repeated adds

Persist inferred imported ownership when a matching add refreshes the
receipt intent, so later shared recipe changes still preserve local
native installations. Keep the legacy replacement regression aligned
with that ownership contract while retaining removed-intent cleanup.

Reject missing or unstatable absolute OpenCode entries before identity
matching rather than falling back to the file name. Cover both paths
through public Preview and Apply regressions.

* test(plugins): isolate OpenCode adapter fixtures from host config

Keep native registration fixtures inside their fake agent home by setting
XDG_CONFIG_HOME and clearing inherited OpenCode overrides. Ambient config
writes can otherwise leak into config-discovery tests in other packages.

Cover the XDG, file, directory and inline override cases with temporary
config sentinels, while retaining the existing MCP listing expectation.

* fix(plugin): let local imports return to the shared source

Add a local unimport action that removes only this machine’s installation and receipt while preserving the shared source declaration. Keep retained-import guidance visible across matching adds, list, doctor and dashboard consumers.

Avoid idle OMP guidance and unchanged legacy-read locks, preserve localized errors, keep import identity checks offline, and normalize OpenCode drive URLs. Cover the A/B transition and align translations, runbooks and environment cleanup.

* fix(plugin): complete unimport validation and guidance

Reject missing targets before planning local unimports and share per-target eligibility with the wizard. Make native uninstall effects explicit in help and translated docs, preserve structured update guidance, and cover error paths and shell completion.
2026-10-31 04:23:20 +08:00
Willie 35a1e97783 fix(ui): align plugin update result icon to the top of the row
The result rows centered the icon against a multi-line body, so it
floated mid-row. Top-align it like the selection list and keep the
status and retry button centered.
2026-10-30 14:18:01 +08:00
Willie a9d8391a4c chore(ui): drop unused target skip naming strings
#649 replaced the target detail skip message with the shared
sync.skipped hints, leaving targetDetail.skipped.one/other unused in
every locale.
2026-10-29 16:48:38 +08:00
Rusty ShacklefordandWillie 85bcf589a7 feat(sync): recognize and route agent-specific skill variants (#649)
* docs(proposals): propose agent-specific skill variants

Tracked repositories can ship different files for the same skill across
agents. Counting and syncing each copy independently sends incompatible
instructions to every target unless users maintain routing filters.

Propose repository-scoped logical identity and exact variant routing while
preserving source files, explicit controls, and existing naming behavior.
Leave activation and compatibility decisions for maintainer review.

Refs #648

* docs(proposals): clarify variant routing compatibility

Explain how recognition affects universal-only targets and how existing
per-variant overrides preserve the desired routing. Fix the precedence
between variant identity and generic host-style path inference.

Include analyze, move, and catalog consumers while preserving physical
identifiers and actual context-cost accounting.

Refs #648

* docs(proposals): clarify activation assumptions and scope

Make acceptance cases conditional on maintainer-approved recognition being
enabled for the tracked source. Separate the provisional implementation
estimate from this proposal-only PR so its size is clear.

Refs #648

* docs(proposals): qualify naming and opt-in assumptions

State that the reproduced routing behavior uses default flat target
naming. Leave any opt-in surface with the maintainer's activation decision
without ruling out future CLI or config fields.

Refs #648

* feat: recognize and route tracked agent skill variants

Count tracked variants as logical skills in source and repository summaries,
while preserving physical paths, sync operations, and context costs. Select
matching canonical agent variants, including account targets, through shared
discovery and selection with existing explicit routing precedence.

Refs #648

* fix: count logical skills in sync inventory summaries

Use shared logical and physical inventory counts in global and project sync
closing lines while preserving each target's operation totals.

Refs #648

* fix: preserve variant routing diagnostics across previews

Resolve target selections once so CLI and server previews keep ambiguity
reasons and physical skip counts. Explain managed variants removed by
automatic agent routing, and report logical inventory in doctor.

Keep warning rows read-only, document upgrade recovery in translated
filtering references, and remove the optional README-only addition.

Refs #648

* fix: align sync matrix previews with shared variant selection

Classify the full source selection once per target so matrix previews honor
canonical aliases, account identity, exact-agent routing, and ambiguous
variant skips. Preserve each rejected physical path's existing diagnostic
and draft filter disambiguation; skipped preview rows remain read-only.

Refs #648

* test: expect singular skill wording in doctor source checks

Keep the undiscovered-link count assertion aligned with logical source
inventory formatting for one skill in global and project mode.

Refs #648

* fix: retain selection diagnostics in catalog and diff verdicts

Report warning-only diff targets as requiring attention while preserving
local-only folder semantics. Reuse shared per-path selection diagnostics
in target-scoped catalogs without applying target naming to served paths.

Compute source counts once in summary callers and require variant counts
in the source status formatter.

Refs #648

* test: tighten tracked variant preview fixtures

Use a real committed tracked repository for status counts, verify sync
preview banners retain server warnings, and use emitted ambiguity reason
text in target preview fixtures.

Refs #648

* fix(sync): keep agent variants in shared target folders

Compatible targets sharing a skills folder need a combined selection so
Codex and universal do not prune one another in merge or copy mode.
Carry every shared reader through selection, pruning and previews,
including project targets, account identities and path aliases.

Require a matching skill suffix under two distinct agents before
inferring variants, keeping ordinary agent-named categories unrestricted.
Separate naming warnings from ambiguous selection in diff and explain
ambiguous removals. Add global/project regression coverage for repeated
sync, target-only sync, status JSON, diff and API consumers.

* fix(variants): align consumer counts, hints and diagnostics

Use logical source counts in list, tracked install and init summaries while matching audit caches against physical variants. Restore localized dashboard skip hints and explain symlink routing limits in status and doctor, including project and JSON output.

Document paired-agent detection and compatible shared-folder selection in the proposal, built-in skill and English plus translated command pages. Add focused regressions for the affected consumers.

* fix(sync): cover initial sync and ignored variant diagnostics

Init syncs a fresh in-memory config, so resolve shared target identities
before its first sync as well as when loading saved configuration.

A whole-directory symlink exposes ignored skills too. Diagnose agent
variants using physical inventory when active discovery has none, while
keeping logical counts and merge/copy selection restricted to enabled
skills. Cover global/project JSON status and doctor with regressions.

Reuse sourcewalk directory and canonical-path helpers so traversal guards
remain enforced and path resolution has a single existing owner.

* fix(variants): address conversion, counts and selection diagnostics

Ignore runtime agent identities when comparing convertible project targets and count logical skills during init. Keep selection warnings separate from naming warnings and preserve agent-named parent skills as ordinary skills.

Cover account sync/prune, project ambiguity and overrides in merge/copy modes, and init/status agreement. Focused verification ran in an isolated Linux Codex container, not the devcontainer, as authorized.

* refactor(variants): remove obsolete selection helpers

Remove the unused FilterSkillsByTarget wrapper and prune agent parameter, cache canonical target aliases once, and restore catalog skip ordering to avoid an unrelated behavior change. Completes the optional cleanup from PR 649 review.

* fix(ui): expose localized variant selection diagnostics

Show target warnings with source paths, localize ambiguity across preview and detail consumers, and let skipped preview rows add a physical exclude pattern. Show tracked repository variant counts alongside logical skills.

Drop display-only rendered cases while retaining mutation protection and plain TypeScript logic coverage. Inspect target states in Clean/Playful light/dark and Traditional Chinese.

* docs(variants): explain diagnostics and add sync runbook

Document doctor variant_routing and logical/physical counts, diff selection skips, and the nested parent-skill boundary. Keep all four command translations aligned and add isolated account/project E2E scenarios.

Both runbook steps passed in the authorized Linux Codex container with separate HOME/XDG/TMPDIR fixtures. Website typecheck and all five locale builds passed.

* test(config): use native paths in project conversion fixture

The shared-agent regression fixture appended slash-separated suffixes to Windows temporary paths, so project path matching returned no candidates. Build each path with filepath.Join and preserve all conversion assertions.

Focused project configuration tests passed in the authorized isolated Linux Codex container, not the devcontainer. Windows CI verifies the platform-specific fixture correction.

* fix(ui): recompute shared skill routing for filter previews

Evaluate edited include/exclude settings in the complete target map before
classifying the draft, so a formerly shared folder no longer keeps its old
union when the filters differ. Preserve the saved target configuration.

* fix(mcp): keep parent skills when peer variants route elsewhere

Do not treat an otherwise eligible variant for another agent as an unserved
nested skill. Continue blocking parent publication for explicitly filtered,
disabled, ambiguous, or invalid children so filters still hide their files.

* fix(ui): distinguish agent selection from naming skips

Expose separate naming and selection skip counts on target summaries.
Show each applicable remedy in target details and sync previews so ambiguity
keeps its filter/override guidance alongside naming and collision hints.

* fix(list): include disabled rows in tracked repository counts

Count the complete inventory that list displays, including ignored skills
and physical variants, without changing the enabled counts used by status,
install, or sync. Clone rows before counting to preserve disabled state.

* docs: align variant counts and routing recovery guidance

Show logical skill and physical variant counts in list/install documentation
and keep the four translations aligned with the filtering examples. Explain
that agent-named skill parents keep ordinary nested skills and retain the
devcontainer-only runbook environment. Removal warnings now recommend a
source-local override, since include filters cannot undo agent routing.

* fix(mcp): preserve explicit target restrictions on nested variants

Limit the differently routed child exemption to automatic layout inference.
Frontmatter targets and dashboard source-local overrides must still prevent
a parent from publishing files explicitly restricted to another target.

* fix(ui): fill target name in naming warning guidance

Pass the current target name when rendering localized warning hints so the
same naming guidance shown beside the controls does not expose a placeholder
in the warning banner. Verified in the populated target preview.

---------

Co-authored-by: Willie <egg358358@gmail.com>
2026-10-29 16:47:38 +08:00
Willie 23c9453f87 fix(update): serialize checkout updates across skillshare processes (#666)
Two dashboards (or a dashboard and the CLI) serving the same source ran
"Update all" at once. The server mutex only covers one process, so both
pulled into the same checkouts: one saw the other's half-applied merge as
"local changes would be overwritten", and concurrent fetches into a
blob:none clone failed with "fetch-pack: invalid index-pack output".
update.TrackedRepo, install --track --update, and the in-place pull of a
git-installed skill now hold a flock in the checkout's git directory; a
second process waits up to a minute, then fails with a clear message.

Force on a git-installed skill only skipped the local-modification check
and then ran a plain pull, which refused to merge over the edits the docs
say --force discards. It now fetches and resets to upstream, so a failed
fetch still keeps the edits. Followed checkouts keep pulling, since they
must be clean and may hold the user's unpushed commits.

The pull error dropped the file list git indents under it, and the
finished-update subtitle said everything was up to date even when items
had failed.
2026-10-29 16:20:30 +08:00
Willie d7c436157d feat(ui): report the current route to an embedding app (#659)
The desktop app shows this web UI in a cross-origin iframe and cannot read
its location. After an auto-sync reload it can only return to a route it
knows, so the user lands on the dashboard (runkids/skillshare-app#88).

When embedded, post { type: 'route-change', path } to the parent on every
router location change, where path is pathname + search relative to the
router basename. Standalone pages post nothing.
2026-10-27 19:54:09 +08:00
Rusty Shackleford 6c6c45ddd1 fix(ui): resolve account icons from default targets (#657)
Use the target data already loaded by the dashboard so account logos do not depend on the slower all-targets request. Keep the all-targets mapping for additional targets.
2026-10-27 17:53:21 +08:00
Willie 18d47d832b fix(ui): preserve frontmatter when editing skill descriptions (#644)
Use the existing YAML parser and serializer so folded descriptions, quoted text, and nested metadata survive repeated editor saves without accumulating escapes or losing structure. Keep legacy headers editable and render nested object fields as read-only JSON.

Add regression coverage for the MinerU workflow reported in #637 and document editor behavior. Verified UI tests, lint, build, make check, and an isolated browser save/reopen flow.
2026-10-26 01:39:03 +08:00
Rusty Shackleford 5729eee088 feat(project): manage global registrations from the CLI (#603)
Add global project list, show, add, edit, sync and remove so setup scripts
can register repositories without editing YAML or opening the dashboard.
Keep dry runs read-only and report completed work when a target fails.

Reuse the shared project service and sync runners. Include command docs,
translations, completions and regression coverage. Quote overlap hints for
their shell and log partial project syncs consistently with ordinary sync.
2026-10-26 01:38:04 +08:00
Willie 2e22257520 fix(check): report failed update checks as failures (#643)
Return nonzero exit status for failed skill and agent checks while preserving JSON results. Propagate agent remote errors and prioritize dashboard check failures over the up-to-date summary.

Add regression coverage and document exit status in all command reference locales. Related to runkids/skillshare-app#85.
2026-10-26 01:20:22 +08:00
Willie 562e7371fa fix(ui): prevent update action overlap and support mobile navigation (#642)
Keep local-edit statuses wide enough so they do not collide with update actions. Wrap update rows on narrow screens and show row actions on touch devices.\n\nReuse the shared dialog for mobile navigation, close it before blocked or successful keyboard navigation, and keep the language picker and tour within the visible mobile UI. Include locale labels, responsive layout documentation, and tour-step regression coverage.\n\nFixes #638.
2026-10-26 00:45:34 +08:00
Willie f3d23ccb0c feat(ui): draw skill trees as curved branches and animate folding
Nested packages sat in a grey inset panel and the folder tree drew one
straight line per level, so neither showed which row a child hangs from.
Both now use one faint spine under the parent with a rounded elbow into
each child that stops short of its checkbox or icon, in an opaque colour
so overlapping strokes leave no darker seam.

Opening and closing a package or folder now grows and shrinks instead of
jumping; collapsed content is inert while it shrinks, and reduced motion
turns the animation off. Nested row actions line up with top-level rows,
and a selected folder's block keeps straight sides.
2026-10-24 23:24:08 +08:00
Willie a96c5e55f2 fix(ui): warn that uninstalling a package removes its nested skills (#636)
* fix(ui): warn that uninstalling a package removes its nested skills

Uninstalling a skill moves its whole folder to the trash, so the skills
nested inside it go too, but the confirmation listed only the one skill.
It now counts them in the title, marks the package row and adds a note.

Selecting a package together with its nested skills (select all does this)
also sent every name to the server, which trashed the package first and
then failed on each child whose folder was already gone. The dialog now
sends only the outermost selected skills.

The success toast uses the same count as the title; it reported the
server's per-name count, which read as fewer removals than confirmed.

* fix(ui): keep nested skills of a linked folder root in uninstall

A linked folder whose root is itself a skill can only be unlinked, so the
server refuses to trash it. Collapsing the selection to that root dropped
its selected children from the request and none of them were removed.
A linked root no longer counts as holding its children: they are sent on
their own and the root row does not claim to remove them.
2026-10-24 22:08:23 +08:00
Willie 1a79971df4 feat(ui): show skill descriptions in the list and redesign package rows (#635)
* feat(ui): show skill descriptions in the list and let expand all open packages

Reviewing a large library meant opening each detail page just to read
what a skill does (#627, proposal in #631). The resources list response
now carries each skill's and agent's frontmatter description, read in
the same pass as manual-only, and the list shows it truncated under the
name with the full text on hover.

The read now decodes the frontmatter once for both fields. An unquoted
": " in a description is invalid YAML, so a failed decode falls back to
the line scanner instead of dropping the description and manual-only.
Editing a skill refreshes the list too, so the new description shows
right away.

Expand all / Collapse all also opens and closes nested-skill packages
from #624; before, it only touched source and folder groups.

Closes #627

* feat(ui): redesign list packages as an inset panel with a description switch

The chevron-in-a-column nesting read as a second, unrelated table and gave
no room for the descriptions #627 asks for. A count pill after the package
name now opens its skills in one quiet inset panel, with deeper packages
indented under a faint guide, so the hierarchy stays readable at any depth.

The rest closes the gaps left against #627: a Show > Descriptions switch
keeps the compact list one click away, keyboard focus reveals the full
description, a search opens only the packages holding a match without
overwriting what the user left open, and the selection bar says how many
selected items are out of view. Only the name opens the detail page, since
whole-row clicks were easy to trigger by accident once rows held more text.

* fix(ui): keep linked-folder matches when searching a folder group

Searching while grouped by folder took package ancestors only from skills
whose folderOf matched the group key, but groupByFolder keys a linked
folder's skills by the link name. Every skill in a linked folder fell out
of its own group, so the header counted a match and drew no row. The
ancestor pool is now each folder group's unfiltered skills, keyed by
groupByFolder itself, which always contains the group's matches.

* fix(ui): keep the .ss-r .nm.m rule the design token export reads

Merging it into :is(.ss-r, .ss-nr) .nm.m removed the exact selector that
scripts/design/tokens.py looks up for the row name type scale, so the
design token tests failed in CI.
2026-10-24 21:43:12 +08:00
Willie a65414fa2f feat(ui): nest skill packages under their parent in the list view
A package that ships its own SKILL.md plus nested skills used to list
every child as a peer, so one large package could fill the page and hide
which skills belong together (#624, proposal in #625).

The list view now puts each skill under the nearest skill whose folder
holds it, within its current group. Packages start collapsed with a
nested count, a search opens them so matches stay visible, and paging
counts top-level rows so a package is never split across pages.
Selection, select-all and bulk actions still work per skill.

Closes #624
2026-10-24 18:37:08 +08:00
trojanwk e5e2e2c0f3 fix(ui): restore jsdom storage in Node 26 test workers (#626)
Node exposes native localStorage without usable storage when no backing file is configured. Disable native Web Storage for test workers only when the runtime exposes it, allowing jsdom to populate browser storage and preserving Node 24 behavior.
2026-10-24 17:55:18 +08:00
Willie 2d196c286b feat(check): show what changed in a skill since install (#623)
* feat(check): show what changed in a skill since install

#622 made a hand-edited skill visible as modified and kept update from
overwriting it, but there was still no way to see the edits before
deciding to keep or discard them (#621).

LocalChanges compares the skill's files with the hashes recorded at
install, fetches the source at the recorded commit only when a recorded
file changed, and diffs each file against it, so the diff shows the
user's edits even after upstream moves on. A skill without a recorded
commit is refused rather than diffed against HEAD, which would show
upstream changes as the user's.

It backs `check <name> --diff`, GET /api/resources/{name}/local-changes,
and the dashboard: the Modified locally dialog on the skill page lists
the diffs, and the Updates tab links a modified skill to it. update's
skip hints now point at --diff. The route looks up the exact record and
refuses non-local names, so a nested or ../ path cannot borrow a
top-level skill's record or read outside the source. The file diff
helper moved to textdiff so the CLI and server share it.

* fix(install): diff local changes against the full installed commit

entry.Version holds the short SHA from `rev-parse --short`. A targeted
fetch needs the full SHA, so checkoutCommit fell back to fetching every
branch and tag with --unshallow: viewing one edited skill could download
the repository's whole history, and fail when the commit is only
reachable by its full SHA.

Use entry.Commit, the full SHA install records, when it is the same
commit as Version; a Commit left from an older install, or a legacy
record without one, falls back to Version.

* test(install): keep checkout line endings when editing in LocalChanges test

On Windows git checks the installed copy out with CRLF, so overwriting
SKILL.md with LF content made every line differ and the expected diff
failed. Edit the installed file in place, as an editor would, and compare
the diff without carriage returns.
2026-10-24 17:32:34 +08:00
Willie 7a7cceefab feat(update): flag and protect skills edited since install (#622)
* feat(update): flag and protect skills edited since install

A skill installed from a repository and then edited by hand looked
exactly like an untouched one: check said up to date, and update either
reported it current or silently reinstalled it over the edit (#621).

Install already records each file's hash, so check now compares a
remote skill's files with those hashes and reports "modified", and
update skips such a skill until --force (CLI single, --all/--group,
dashboard). --force, the dashboard's Force Retry on the skipped row, or
the confirmation on the skill page discards the edit and reinstalls.

Two hash paths had to be made reliable for this to be trusted: the
dashboard's folder-wide target edit refreshed hashes by basename, so a
nested skill looked edited after skillshare's own change, and a skill
whose files cannot be hashed now counts as modified instead of being
overwritten.

* fix(server): keep earlier local edits when a target change rewrites SKILL.md

Changing a skill's targets in the dashboard rewrites its SKILL.md, and
both the folder-wide and the single-skill handler then re-hashed the
whole directory as the new baseline. An edit the user had already made
to any file in the skill was absorbed into that baseline, so the skill
stopped counting as modified and the next update overwrote the edit
without --force.

Both handlers now move only SKILL.md's recorded hash, and only when the
file still matched it before the rewrite. skillshare's own target edit
no longer reads as a local change, and an earlier edit still does. The
whole-directory refresh helpers lost their last callers and are removed.
2026-10-24 16:33:37 +08:00
Willie e441b57f0e fix(ui): offer a tracked repo's Update only when a check finds it behind (#619)
* fix(ui): offer a tracked repo's Update only when a check finds it behind

The Dashboard showed Update on every tracked repo, so a clean repo looked
like it had an update. Clicking it only reported "already up to date" and
the button stayed, which read as an update that would not apply.

The last update check is now kept in the shared query cache, the repo row
shows Update only for a repo that check found behind, and a pull that
succeeds drops the repo from that result so the Update button and the
Needs attention row both clear.

* fix(ui): drop the Dashboard update check when the Dashboard unmounts

Moving the check into the shared query cache kept it for the cache's
10-minute gcTime. An update made elsewhere (the Skills Updates tab, a
single skill update, the CLI) never corrected it, so returning to the
Dashboard still showed the repo behind in Needs attention and offered its
Update button. The old component state was discarded on navigation;
removing the query on unmount restores that for every update path at once.
2026-10-24 02:15:24 +08:00
Willie 5ba626696e fix(ui): center single-line rows in the plugin update dialog
Rows align to the top so multi-Agent rows stack from there, which left a one-line row's name and version above the centre of its icon and checkbox.
2026-10-23 21:38:57 +08:00
Willie 8e43cc5ce6 feat(ui): import several installed plugins at once
Importing one plugin per click closed the dialog each time, so the user
had to reopen it and scroll back to the next row. Ticked rows are now
imported in turn while the dialog stays open, and a blocked or failed row
stays ticked for a retry. Installs with resource filters still go through
the single reviewed import, because their preserved native fields need to
be seen first.

Release-As: 0.26.4
2026-10-23 20:52:10 +08:00
Willie 2c724c4e51 fix(ui): put folder-conflict actions on their own row (#613)
The conflict notice placed its action buttons beside the sentence. With
a project target the "Edit app@claude's project" label is long, so two
buttons squeezed the sentence into a narrow column of short lines. Put
the actions on a row under the sentence, indented like the comparison
table, so the sentence uses the full width.
2026-10-23 14:29:43 +08:00
Willie dea01b1b8d fix(ui): link project targets in the folder-conflict hint to their project
The hint under a folder conflict linked every target it named to its
target page, but a project target's settings can only be changed from
its project. Link those names to the project editor, as the button
above already does, and drop "on the target page" from the sentence so
it no longer points at the wrong place.

Refs #612
2026-10-23 14:17:47 +08:00
Willie 9dcd8d6e63 fix(ui): send project-target folder conflicts to the project editor
The Sync page offered "Stop syncing skills" for every target a folder
conflict asked to stop. For a project target that button opened the
skills-off dialog, whose preview and update calls the server refuses
with 400 because project targets are configured through their project.
Link those targets to their project's editor instead, and say so in the
doctor docs.

Fixes #612
2026-10-23 14:14:41 +08:00
Willie 2bba224cdf fix(ui): update agents from the Updates tab and repo detail page (#601)
The Agents Updates tab updates through /api/update/stream, which resolved
every name against the skills source, so agent updates failed there. The
agent detail page names a tracked repo by its folder, which updateAgent
did not resolve, so updating an agent inside a repo failed with "agent not
found".

The stream now takes a kind and routes agent names to updateAgent, which
also resolves an agent repo folder under the agents source. The tab sends
its kind to the stream and to Prune, and matches update results by kind and
by the agent's path, so a nested agent is marked up to date after it
updates.

Closes #600
2026-10-22 00:39:12 +08:00
Willie 829cbb176d fix(plugins): honor native OMP marketplace builds (#588)
* fix(plugins): honor native OMP marketplace builds

Resolve OMP entries from their native marketplace when present and inspect package.json extension-only plugins. Keep target-specific source paths, marketplace identities and components so Claude adoption and hybrid manifests remain valid.\n\nShow separate builds in text discovery without changing logical JSON selection, and cover native precedence, invalid catalogs, manifestless and hybrid packages, global/project materialization and CLI output with regression tests. Update the plugin docs and existing translations.\n\nFixes #587

* fix(plugins): preserve native build metadata across consumers

Keep OMP catalog versions in target discovery metadata and materialized marketplace entries so previews, cache guards, and native installs use the same version, including legacy catalog fallback. Cover catalog versions that differ from package manifests.

Show each dashboard discovery target's own version, components, and source path instead of presenting a merged candidate as one build.

* fix(plugins): avoid ambiguous shared build versions

Derive candidate versions from agreement across supported targets and recompute after catalog overrides. No-Agent records and lists no longer inherit an arbitrary native build version; equal versions remain available and unknown versions stay unknown.

Keep Cursor and Antigravity inventory target-specific when manifests disagree. Cover no-Agent preview and persistence, equal and unknown versions, catalog overrides, and mixed-manifest local inventories. Align English and translated plugin references.

* fix(plugins): accept Pi extension manifests for OMP catalogs

Reuse the existing OMP extension detector instead of requiring an OMP-specific manifest key. Native OMP accepts Pi extension manifests too, so the extra gate rejected supported native catalog entries.

Cover Pi-only discovery with scoped package names and global/project materialization. Align the English plugin references and all existing translations.
2026-10-20 12:22:05 +08:00
Willie 364af36391 feat(ui): update outdated memory guidance in one step
After a release changed the guidance text, outdated agents showed an
unchecked box in "Connect to agents", so updating looked like it
required disconnecting and reconnecting. An "Update to latest" button
now opens the same review with every outdated agent preselected and
its mode kept. Hand-edited blocks are "modified", not "outdated", so
they are never preselected and the backend still refuses to overwrite
them.
2026-10-20 00:23:42 +08:00
Willie a2112ff681 feat(ui): keep all local or all remote in the pull conflict dialog
A pull with dozens of conflicting files meant clicking "Keep this
version" once per file. Two buttons now set every file to the same
side; individual files can still be switched afterwards.
2026-10-19 23:21:54 +08:00
Willie f6e7265414 feat(hooks): read hook code and scripts from files next to the config (#586)
* feat(hooks): read hook code and scripts from files next to the config

Code Agent extensions and command scripts lived as strings in
config.yaml, so a longer Pi extension or shell script was edited inside
a YAML block scalar with no editor support, and nothing type-checked or
linted it. A breaking change in an Agent's extension API went unnoticed
because the generated file is not part of any tsconfig.

A binding now takes `codeFile: path` instead of `code`, and a `files`
value may be `{from: path}` instead of the contents. Paths resolve
against the folder of the config that holds the entry and are read
every time the config is read, so the regular typecheck or shellcheck
can cover the real source. The revision and drift checks use the
resolved contents, so a file edited after a preview fails the apply as
stale.

Saving keeps the references: enable/disable, `hooks edit` and the
dashboard write `codeFile` and `{from}` back instead of inlining the
contents. JSON carries the contents plus `codeFile`/`filesFrom`, and an
entry echoed back with both must match the file, so an edit is refused
rather than silently dropped. Paths must stay inside the config folder
without symlinks, so a cloned project cannot pull in files from
elsewhere. References are taken from the YAML tree before one strict
decode, which keeps unknown-field checks and anchors shared across
bindings working.

Closes #585

* fix(hooks): refuse an emptied file sent with its reference

An empty files value stood for "contents not sent", so a file cleared in
the dashboard's Git YAML editor while its filesFrom reference stayed was
treated as unsent: the file was read again from disk and the save
reported success with the user's edit discarded.

A value read from {from: path} now keeps a dedicated mark until it is
resolved, so an empty value is compared with the file like any other
contents and refused when they differ. Code keeps using empty as unsent,
since a code binding can never be empty.

* fix(hooks): render referenced files as they are on disk

RenderNative rendered the contents the caller sent. The dashboard sends
the entry it loaded, so after a referenced file changed, View
configuration still showed the old contents while describing them as
what sync would write.

Render now drops sent contents for codeFile and {from} references and
reads every reference again, like preview and save. Draft, render and
config decoding are the only paths that take an entry, and all three now
resolve references.

* fix(hooks): accept file references in JSON entries and anchored values

Two inputs that config.yaml accepts failed to load elsewhere.

A `{from}` value carrying its own YAML anchor, aliased from another
binding, lost its anchor because the value node was replaced instead of
rewritten, so the alias no longer resolved. The node is now rewritten in
place with its anchor kept.

An entry JSON file (`hooks add|edit --file x.json`) could not write a
files value as `{"from": path}`, because JSON decoded straight into
string contents. Binding now decodes JSON files values as contents or a
reference, strictly, like YAML, so both entry formats and the Web API
take the same shapes.
2026-10-19 22:48:00 +08:00
Willie 8f55e58999 feat(ui): edit other Agents' MCP options in the server dialog (#580)
* feat(mcp): write per-Agent native fields from the source

Some MCP settings have no portable form, such as Codex's
default_tools_approval_mode or Claude Code's per-server timeout. Sync
kept them only while an entry survived, so a recreated entry (for
example after a rename) lost them, and every machine needed them added
by hand again.

A server's `options` now holds these fields per Agent, and sync writes
them as given. The field ledger that piOptions used is extended to
every Agent, so sync removes an option it wrote once the source drops
it, and reports a conflict when the Agent changed it since.

Options are refused when they could break the entry or leak a secret:
fields Skillshare writes (including portable names some Agents rename),
values a native format cannot write back (null, arrays of tables),
options.pi (piOptions covers Pi), disabled entries, and credentials as
plain text, since the Agent's file may be committed.

The dashboard has no editor for options yet but keeps them on save.

Refs: #578

* fix(mcp): close gaps in per-Agent options found in review

- A credential option passed if it merely contained "${", so text around
  a reference, or another Agent's syntax, was written out as plain text.
  It must now be a whole-value reference in the Agent's own syntax, and
  Codex and Antigravity options, which read no references, cannot hold one.
- The Kilo Code project check looked only at portable env references, so
  an {env:VAR} in options reached a project file Kilo refuses to load.
- A replace resolution left the dropped-option conflict in place, so the
  plan stayed blocked; replace now lets the source win and prunes those
  fields.
- Adopting an entry that already matched skipped writing its options until
  a later sync; the takeover now writes them.

* fix(mcp): refuse numeric credentials and constrain option values in the schema

- YAML reads an unquoted secret such as clientSecret: 123456 as a number,
  which the credential check skipped, so sync wrote it out as plain text.
  A mapping under a sensitive name such as credentials also hid its
  plainly named fields. Sensitivity now carries down through mappings and
  lists, and a number under a sensitive name is refused.
- The schema allowed any value inside an Agent's options, so editors
  accepted null or nested lists that LoadSource then rejects. A recursive
  optionValue definition now matches the runtime rules.

* feat(ui): edit other Agents' MCP options in the server dialog

The dialog only carried options through unchanged, so setting a field
such as Codex default_tools_approval_mode or Claude Code timeout still
meant editing mcp.yaml by hand. One Agent picker with a JSON editor keeps
the dialog short however many Agents are ticked; ticked Agents come first,
and an unticked Agent that still has settings stays listed so they can be
cleared. Anything but a JSON object blocks saving; the server checks the
fields themselves.

* fix(ui): offer every Agent in the options picker and document the editor

- The picker listed targets from the order, which includes accounts, so a
  ticked account produced an options key the server refuses, and the
  Agent the account writes to was not offered. Options are keyed by Agent,
  so every Agent but Pi is offered, ticked ones first.
- An unticked Agent left the list as soon as its text was emptied, so its
  settings could not be cleared and retyped.
- The editor was hidden on the Skillshare tab although its server takes
  options too, and hidden invalid text could block Save there.
- The docs still said the dashboard had no options editor.

* fix(ui): open the options editor on a ticked account's Agent

The picker ranked Agents by the ticked targets, which hold account names,
so a server reaching only codex-work opened the Claude editor and what was
typed there was saved under options.claude. The MCP page now provides
each account's Agent, and the ranking uses it.

The retype test now asserts the saved options rather than the editor
staying visible.

* fix(ui): show the server's refusals of Agent options in the dashboard language

The dialog leaves field rules to the server, but its refusals (a field
Skillshare writes, a plain-text credential, a credential in an Agent that
reads no references, an unsupported value) reached the dialog in English.
describeError now maps each to a translated message naming the Agent and
field. The other option errors cannot come from the dialog: it offers no
Pi, no non-Agent key, and no options on an off switch.
2026-10-18 00:09:18 +08:00