mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
dc3ea55a708c3a1ec2d5977a41fb7136f00a72f4
509
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ed3c825c49 |
feat(hooks): record Codex hook trust on sync with --trust (#829)
* feat(hooks): record Codex hook trust on sync with --trust Codex runs a user-level hook only after its trusted_hash is stored in that home's config.toml, keyed by the hook's position in hooks.json. Only the TUI's /hooks review writes it, so every hook Skillshare adds or moves starts untrusted and codex exec skips it without a word. `hooks sync --trust` (global mode, opt-in) asks each Codex home's `codex app-server` for the current hash of the hooks Skillshare owns and writes trusted_hash through config/batchWrite, the same calls /hooks makes, so the hash is always the one Codex computes. It changes nothing else in config.toml: disabled hooks stay disabled and are reported. Trust it wrote is remembered in the hooks state directory, so when a hook moves or is removed the next --trust sync clears the old position, unless that trust has changed since. Without codex on PATH the hook files are still written and the command fails saying trust was not recorded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(hooks): scope Codex trust to config owner Scope trust selection and saved hashes to the active config owner so a global config cannot trust or reconcile another config’s hooks. Recheck hooks.json after hooks/list to avoid trusting a handler from a stale position, and only report trusted or cleared actions after config/batchWrite succeeds. Keep v1 ownerless hashes cleanup-only so upgraded installs clear stale trust after hook removal without trusting foreign hooks. * fix(hooks): retain parked Codex trust receipts Locate hooks using all records for their canonical file before selecting the active config owner, so identical hooks remain identifiable across shared and symlinked homes. Keep cleanup receipts for parked registrations whose native group still matches, including when duplicate counts make locate ambiguous, while clearing receipts for removed hooks. Add regressions for identical hooks across config owners, symlink aliases, parked-home restoration, ambiguous duplicates, and stale receipt cleanup. * fix(hooks): coalesce symlinked Codex trust homes Canonicalize current-owner and legacy trust receipts so symlink spellings of one hooks.json are processed once. Remove the redundant parked-position branch because the hash-matching fallback below covers it. Add regression coverage for current and legacy receipts. * fix(hooks): coalesce removed Codex hook homes Resolve existing home directories when hook files have been removed so trust receipts for symlink aliases reconcile once. Correct canonical key expectations and exercise coalescing without unsupported ledger migration. * fix(hooks): read reconciled trust fixture into fresh state JSON decoding retains existing map entries, so reusing the seeded receipt map makes the alias appear to survive reconciliation. Decode the persisted state into a new value to verify its actual contents. * feat(hooks): confirm Codex trust before recording it and drop the receipts file `hooks sync --trust` recorded trust for every owned hook without showing what it was trusting, and tracked its own writes in codex-trust.json so it could clear them later. Codex's review exists so that a person sees a command before it runs, and the receipts file was the source of most of the edge cases found in review. Trust is now two steps. A preview asks Codex which owned hooks are new or changed and returns them with their commands and a revision; the write takes that revision and is refused when the hooks changed since. The CLI lists the hooks and asks once, `--yes` skips the question, and without a terminal nothing is trusted unless `--yes` is given. The dashboard gets the same two steps as API routes. Nothing is cleared any more: a leftover entry only matches a hook with the same event, matcher and handler at that position, which is the hook the user already approved. That removes codex-trust.json. The app-server is started without CODEX_HOME for the default home. Codex resolves the symlinks of CODEX_HOME but not of ~/.codex, so a symlinked default home got a trust key the user's own Codex never looks up. A home whose write fails no longer stops the other homes, and the error names which were recorded. A preview releases the hooks operation lock before it waits on Codex, so a slow Codex does not fail other hooks operations. Refs #828 * feat(ui): trust Codex hooks from the Hooks page The dashboard could sync Codex hooks but left them untrusted, so Codex skipped them until the user ran the CLI or approved each one in Codex. The Sync box now offers "Trust Codex hooks" in the global scope when a hook is bound to a Codex target. The dialog shows each hook that needs trust with its full command and records trust for exactly that list; a change since the list was shown is refused. The button is hidden while changes are pending, because trust covers the hooks on disk and the next sync would invalidate it. Refs #828 * test(ui): cover the Codex trust dialog's refused, empty and disabled states Only the happy path was tested, so a regression in the states where the dialog must not offer a write would have passed. The docs sentence on several Codex homes now says what is isolated: a failed write, not a home that cannot be listed. Refs #828 * refactor(hooks): split the trust prompt and output rendering out of the handlers hooks_handlers.go had grown past 500 lines and mixed orchestration with the confirmation prompt and every print function, which the CLI layering rule asks to keep apart. The code is moved unchanged: the prompt goes to hooks_prompt.go and the printing to hooks_render.go. * fix(hooks): leave out a Codex home that cannot be listed instead of stopping With several Codex homes, one home Codex could not list aborted the whole trust run, so a broken account home kept every other home untrusted. A home that fails to list is now reported and left out, and the other homes are previewed and trusted as usual. The CLI warns before the question and exits with an error that names the home; the dashboard dialog shows the same note. When no home can be listed the preview still fails. Codex answers a home it cannot load, such as one with an invalid config.toml, with a successful reply that has no hooks and the reason in `errors`. That was read as a home without hooks and passed silently. It is now a failed listing that carries Codex's own message. Refs #828 * fix(hooks): check the reviewed Codex hooks per home when recording trust The revision was one digest over every home's hooks. When a home was listed in the preview but failed to list again at the write, its hooks dropped out of the digest, so the write was refused as stale: the homes the user had just reviewed stayed untrusted and the real listing error was hidden behind "changed since they were listed". The revision now has one part per home. A home is refused only when its own hooks changed; a home that cannot be listed any more is reported and the reviewed homes are still trusted. Refs #828 * chore: release as 0.30.10 Keep the next release on the patch version the maintainer asked for, instead of the 0.31.0 that Release Please derives from the feat commit. Release-As: 0.30.10 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Willie <egg358358@gmail.com> |
||
|
|
c626c4bf1f |
fix(sync): let --force take over an agent file that already matches (#944)
Without file-link privilege (Windows without Developer Mode) merge mode copies agents and tracks the copies it wrote. A file a tool already had with the same bytes as the source was not tracked, so it was kept, and --force kept it too: the identical-content check ran before the force check. init's "kept local agents: X (sync agents --force replaces them)" then named a file --force could never take over, on every run. With --force the file is now recorded as skillshare's, so later syncs update it. Without --force nothing changes. Also: the five-name cap written twice is one helper, sync.ListNames, and doctor.md says when a recorded broken link is reported as a broken symlink (the behavior from #942). |
||
|
|
d2cc0d8681 |
fix(init): name the agent files the first sync kept (#943)
init syncs agents quietly, and an agent file a tool already had under an agent's name was kept without a word: init said "Synced" while the tool went on loading its own file. A plain sync shows this only as a count. The quiet agent run now returns a line per tool that names the kept files and the command that replaces them, and init prints it with the skill warnings. In symlink mode what is kept is the whole agents folder, so the line says that instead. Closes #938 |
||
|
|
7af9224896 |
fix(diff): list only what sync prunes, and have doctor follow it (#942)
Three previews disagreed with what sync does to a link no skill or agent maps to. The agent diff, in the CLI and the dashboard, listed every orphan link as a removal. Agent sync prunes a link only in merge mode, and only when it is broken or points into the source, so a live link to another location was listed forever. Both diffs now ask the function prune uses. The CLI diff listed no orphan links at all for merge-mode skills, so a skill removed from the source showed nothing until sync pruned its link. It now lists the links sync.OrphanLink says prune removes. doctor called a broken link "did not create, kept" whenever OwnsLink was false. Prune also removes a broken link under a name the manifest records in any form once no skill maps to it, so doctor told the user to delete by hand a link that sync removes. It now reports those as broken and suggests sync. An empty source counts as "every entry is an orphan"; only a failed discovery turns the check off. Closes #939 Closes #940 Closes #941 |
||
|
|
1419b62499 |
fix(sync): never delete or re-point entries skillshare did not create (#914)
* fix(sync): never delete or re-point entries skillshare did not create On Windows, a plain `init` followed by `sync` deleted things in ~/.claude/skills that skillshare never created, with no backup and no prompt. It also re-pointed another tool's junction. Seen in a sandbox run of v0.30.7: - prune removed real folders whose names only look like skillshare's flat naming (team__shared, _drafts), via the name heuristic - prune removed a broken link that another tool or the user made - merge sync deleted and re-created a same-name link that pointed into another manager's store - init's import deleted original folders that matched the source byte for byte The manifest already records what skillshare made, so use it: - prune keeps a look-alike folder that is not in the manifest and warns once per sync; --force still removes it - prune removes a broken external link only if the manifest records it (e.g. after the source moved); otherwise it keeps the link and warns - merge sync re-points a link only if the manifest records it or it already points into the source; otherwise it reports the entry as kept local, as it already does for a real folder; --force replaces it - init's import moves identical copies to the trash under replaced-by-init/<target>/ instead of deleting them Tests: ownership_test.go adds regression tests that use createLink, so they run on Windows without Developer Mode (junctions). The 4 keep tests fail without this change. TestSyncTargetMerge_FixesBrokenLink now records the link in the manifest first, since a same-name link that skillshare did not make is no longer re-pointed. Existing tests in internal/sync, internal/trash and cmd/skillshare show the same failures on a Windows host with and without the change (symlink privilege). The devcontainer suite has not been run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: say what sync and init keep when skillshare did not create it The previous commit makes sync and init leave alone entries skillshare did not create. Update the pages that describe that behaviour: - sync-modes: merge mode keeps a same-name link from another tool and reports it as local; orphan cleanup keeps folders that only look like skillshare's flat names, and broken links outside the source that the manifest does not record. sync --force still removes them. - init: identical folders replaced with links during the first sync go to the trash first (replaced-by-init/<tool>/, cleaned after 7 days). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(sourcefs): drop the raw-write allowance replaceIdenticalCopies no longer needs replaceIdenticalCopies now moves an identical copy to the trash instead of calling os.RemoveAll, so TestRawWriteRatchet reports its allowance as stale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(sync): apply the ownership rule at every consumer Review of the first commit found places that still did, or predicted, the old behaviour. One rule now decides whether a link is skillshare's: Manifest.OwnsLink (the manifest records a link there, or it points into the source). It compares canonical paths, so a source reached through an alias and a relative project link still count as skillshare's. - copy mode kept re-pointing: it removed any same-name link and wrote a copy. It now keeps a link it does not own, like merge mode. - the dashboard diff predicted a prune for a folder that is only named like skillshare's, and an update for another tool's link. It now reports them as local and kept. The orphan-link prediction uses the same rule as prune. - `diff` reported a target as in sync while sync printed "kept local" for another tool's link. It lists the link as a local override. - doctor reported a broken link skillshare did not create as an error and suggested `skillshare sync`, which now keeps it. It is a warning with its own row, and `broken_symlinks` is `warning` in --json. - `trash restore` put a folder init had replaced into the source as a new nested skill. Restore refuses entries under replaced-by-init/ and names the trash folder to copy from. - init reported a folder it could not move to the trash as one that differs from the source, and dropped the error. It is reported separately, with the error. - the PruneOptions.ManagedOnly comment still said broken external links are skipped; manifest-recorded ones are removed. Tests cover the states the review listed: a source behind an alias, a relative project link, ManagedOnly, standard naming, dry run with --force, and a recorded copy the user replaced with a link. TestSync_Pruning_RemovesBrokenExternalSymlinks passed without testing anything, because FileExists follows links; it is now two tests that use Lstat, one per owner. Agent merge is unchanged: agents have no link manifest. * fix(diff): list another tool's link as kept in copy mode too Copy mode now keeps a same-name link skillshare did not create, but both diffs read the entry with os.Stat. A broken link showed as a skill to add on every run, and a live one as a plain local copy, while sync kept both and said "kept local". `diff` and the dashboard diff check the link first and report it the way merge mode does: a local override, kept until --force. * test(sync): make the aliased-source link while its folder exists TestSyncMergeRepointsUnrecordedLinkIntoAliasedSource failed on Windows: it linked straight to a missing folder, and a junction cannot be made to one. It now links first and removes the folder after, like the other broken-link tests in this file. * fix(sync): compare a broken link by where it would point linksIntoSource resolved both paths with EvalSymlinks, which gives up on a path that does not exist. A broken link is exactly that, so a link into a source reached through an alias (a symlinked config folder, or a short 8.3 path on Windows) compared an unresolved path with a resolved one and was taken for another tool's link. Sync then kept it instead of repairing or pruning it. It now uses sourcewalk.Canonical, which resolves the nearest folder that exists and keeps the missing tail. The test covers both spellings: the alias in the link, and the alias in the configured source. * fix(init): report what the first sync kept, and match prune in the diff Two previews said less, or more, than sync does. init ran its first sync quietly and printed only "Synced". Sync now keeps a link another tool put on a skill's name, a folder that is only named like skillshare's, and a broken link it did not create, so the skill was reported as synced while the tool still loaded the other copy. firstSync returns the warnings a plain sync prints, and init shows them. They already name the folders that differ from the source, so the separate list of those is gone. The dashboard diff counted an orphan link as a removal whenever the manifest recorded it. Prune keeps a recorded link that still resolves outside the source (the source moved and the old checkout stayed), so the Sync page showed a removal that never happened. The diff now uses prune's own rule: a link into the source goes when broken or recorded; any other link only when broken and recorded. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Willie <egg358358@gmail.com> |
||
|
|
0f816a3425 |
fix(ui): pick nothing by default when taking over hooks from targets (#935)
* fix(ui): pick nothing by default when taking over hooks from targets
The hooks import dialog is also where a hook is edited or removed in its
target file without importing it, but it opened with every hook ticked,
so managing removals could import the rest by accident. It now opens
with nothing selected, and its entry points are named for what they
show ("Hooks in targets", "Not managed yet") instead of "Import".
The review step stacked three scroll areas (dialog body, file list,
diff) and listed each removed hook three times. The dialog body is now
the only thing that scrolls, hook names are listed once, a file card
shows a count per action, and its diff opens on request. The other hook
previews share the component: their diffs still start open but lose the
inner scroll and gain the same toggle.
Adding or editing a hook now uses the same command cards as editing one
in a target: collapsible, with a multi-line editor that can be expanded.
A collapsed card with a missing field is marked. The variable buttons
append to the command there instead of inserting at the cursor.
A missing OpenCode CLI showed the raw exec error when reading its hooks;
it now says the command was not found and what to do.
* fix(ui): explain a missing OpenCode CLI in hook plan warnings
The sync preview, Sync page and target hooks views show the same
failure as a plan warning, wrapped as "target X: detect OpenCode API
...; its hook bindings are skipped". That form still put the raw exec
error in parentheses. It now says the command was not found, that the
bindings are skipped, and what to do. Other detection failures keep
the existing message with the detail.
|
||
|
|
310478c28d |
fix(ui): fetch each repository once when the dashboard updates skills (#931)
* fix(ui): fetch each repository once when the dashboard updates skills Updating many skills from the Updates tab cloned the repository once per skill and reinstalled every one, so 31 skills from 8 repositories took over a minute where `skillshare update --all` takes 16 seconds, and unchanged skills were reported as updated. The update stream and the update-all endpoint now group the request's skills by repository and branch and go through install.UpdateSkillsFromRepo, as the CLI does. A skill that already matches upstream is left alone and reported as up to date; the Updates tab shows and counts it that way. Results still arrive in request order, which the dashboard relies on. Updating a single skill and switching its branch still reinstall. Those paths now also pass the configured parse options to the installer. * fix(ui): keep checkouts and recorded sources when updates share a fetch Grouping a dashboard update by repository sent every skill through the discovery installer. A root skill kept as a Git checkout was replaced by a plain copy, losing its repository, and an updated skill had its source recorded in the repository's canonical spelling, which a project declaration written with another spelling no longer matches. A checkout now updates on its own by pulling, as before, and an updated skill keeps the source its record had, as updating one skill does. |
||
|
|
0dc2018747 |
feat(hooks): browse, edit and remove unmanaged hooks in the import dialog (#920)
* feat(hooks): browse, edit and remove unmanaged hooks in the import dialog The import dialog listed every target's hooks in one long scroll of full commands, so it was hard to read and hard to tell which target a row belonged to. It also offered no way to change a hook without first handing it to skillshare. The dialog now shows one target at a time from a rail, with two-line rows that open to the full commands. A hook that lives as an event in a target's settings file can be edited or removed in place: the change stays pending, a review step shows the file diff, and only then is the file written, with a backup that restores it. The hook stays unmanaged. The write is a new operation in internal/hooks (PreviewNativeEdits and ApplyNativeEdits) that addresses elements by content, refuses anything a ledger record holds, and reuses the existing backup and journal path. Whole-file hooks, Copilot files and Antigravity blocks still have to be imported first. * fix(hooks): keep repeated restores and retries from writing a hook twice Two ways an unmanaged hook could end up in a target file twice: Restoring the backup of a removal a second time appended the hook again. An unmanaged hook has no ledger record, so nothing marked the backup as restored. PreviewRestore now reports a conflict when the removed hook is already in the file. When the dialog's native write succeeded and a later import failed, the retry compared each pending change with the row it was made in. An edit that moves or adds a command under another event comes back as other rows, so the change stayed pending and was written again, and the new row was picked for import. The dialog now drops every change once the write went through (or reports files it already applied), and keeps only the rows picked before as imports for the targets it wrote. * chore: release as 0.30.9 Keep the next release on the patch version the maintainer asked for, instead of the 0.31.0 that Release Please derives from the feat commit. Release-As: 0.30.9 * fix(hooks): tell a restored hook from a surviving twin, keep unwritten edits The check that refuses a second restore of a removed unmanaged hook looked for any unmanaged hook with the same content. When one of two identical hooks was removed, the survivor made the first restore look done. A removal that shifts later hooks is stored as an update plus a removal, which the check did not cover, and a restored hook that was imported afterwards no longer counted, so those backups could still restore twice. Every change to an unmanaged hook now records how many identical hooks the write left, and a restore is refused only when the file holds more than that. When a native write failed after its first file, the dialog dropped every pending change, including those of files the write never reached. The failure response now lists the applied files in error_params, and the dialog drops only the changes of those files. Pasted candidates are no longer unpicked by a write to the target they were pasted for. * fix(ui): show a hook row's edit and remove actions once An open row in the import dialog showed the pencil and trash icons next to the labelled Edit and Remove buttons below, which do the same thing. The icons now hide while the row is open; their space is kept so the chevron stays where it was clicked. * chore: release as 0.30.9 Keep the next release on the patch version the maintainer asked for, instead of the 0.31.0 that Release Please derives from the feat commit. Release-As: 0.30.9 * fix(hooks): count surviving twins for every backup, not only native edits Only the native edit preview recorded how many identical hooks a write left, so the backup a restore writes had no count. Undoing a restore through Backups was then refused whenever a hook with the same content was still in the file. The count now happens where every backup is written. * fix(ui): keep the row icons as the only edit and remove actions The labelled Edit and Remove buttons under an open row repeated the icons and stood out too much, so they are gone and the icons stay visible on open rows again. Each icon now has a tooltip that says what it does. * chore: release as 0.30.9 Keep the next release on the patch version the maintainer asked for, instead of the 0.31.0 that Release Please derives from the feat commit. Release-As: 0.30.9 * fix(ui): put the import dialog's hooks on one card, with fewer lines and fills The dialog mixed a grey rail, a grey footer, grey expanded rows and a divider around every region, and the editor stacked its own Cancel and Done above the dialog's. It read as cluttered, and a long JSON line pushed the editor's controls out of the dialog. The dialog now sits on the page background with the hook list, or the editor, as one card. Rows are separated only by the list separator, the row icons are neutral until hovered, and code is the only sunken fill. One row is open at a time, and a single command no longer repeats its event as a heading. While a hook is edited, the dialog's footer holds the editor's actions, so there is one row of buttons and Cancel returns to the list instead of closing the dialog with the draft. Commands are sections of the card and wrap instead of scrolling sideways. The dialog is larger. The hint is one line, the edit note moved to the footer, and the name field is labelled by where the name is used. * chore: release as 0.30.9 Keep the next release on the patch version the maintainer asked for, instead of the 0.31.0 that Release Please derives from the feat commit. Release-As: 0.30.9 * fix(ui): give the import review step the same card-on-ground look The review step still had the white body, the grey footer and the bordered summary box, so it looked like a different dialog from the list it follows. It now sits on the page background with the summary as one card, and the removal tile is neutral with only its icon in the danger colour. * chore: release as 0.30.9 Keep the next release on the patch version the maintainer asked for, instead of the 0.31.0 that Release Please derives from the feat commit. Release-As: 0.30.9 |
||
|
|
94cf438066 |
fix(audit): match only uppercase role labels in source files (#923)
prompt-injection-1 kept reporting ordinary source lines as CRITICAL
prompt overrides: `root: Path = Path(".")` (#921), docstring arguments
such as `root: Repository root containing the manifests.`, and typed
parameters with a name default. #376 and #750 each added value shapes
to the exclude. Measured on 5,573 real Python files and 33,006 Markdown
and config files, widening the exclude again cleared no line, and a
docstring entry cannot be told from prose by any value pattern.
In a source file a lowercase label word is a parameter, field or
docstring entry, so the built-in rule now matches only uppercase labels
there. The file extension decides, never a shebang, so a text file
cannot switch the check off. Markdown, text, config and extensionless
files, and Markdown code fences, keep the case-insensitive match. A
custom regex under the same ID is used as written.
This reverses the earlier choice that a lowercase `system: "..."` in a
non-Markdown source file stays CRITICAL.
Closes #921
|
||
|
|
5a6873ec96 |
fix(mcp): stop conflict resolution looping between Agents (#919)
When Agents hold different definitions of one server, importing one Agent's version was refused with "unresolved conflicts prevented adoption", because any conflict in the plan blocked it, including another Agent's. The source was saved anyway, so the Agents that had matched the old definition now conflicted, and importing from them flipped the source back. Replace with source sent one resolution at a time, so with two conflicts the plan stayed blocked and the dialog could never apply. Gate adoption only on the resolved entries' own conflicts, in the API save and in the interactive CLI import. Replace with source now settles every conflict of that server at once. After a conflict import, a translated hint names the Agents in the same scope that still need Replace with source, and the remaining adoption error is translated. |
||
|
|
43059a1428 |
fix(opencode): preserve v2 hook and plugin directory packages (#915)
* fix(opencode): preserve v2 directory packages
Stage the reviewed issue 913 source for isolated fork validation. Preserve
package directories and manifests without executing managed packages or
installing their dependencies, and include receipt and localized UI fixes.
Reviewed local source: 15ac88e2f266571b8a6dc8d777302db0f4dcae44
Exact source tree:
|
||
|
|
afe5eaa959 |
docs(ui): describe the dashboard row for a repo with no checkout
Since #880, the Dashboard lists a tracked repository that is recorded in metadata but not cloned on this machine, marks it "No checkout on this machine", and its Uninstall removes only the record and audit acceptances. The Dashboard row in the ui reference still described only checkout uninstalls, so readers could expect the repo to move to trash. |
||
|
|
e969ebcfb0 |
fix(mcp): close Skills conformance gaps with directory reads and resource metadata (#905)
* feat(mcp): support Skills directory reads and metadata listing Expose accepted skill directories and SKILL.md metadata so MCP hosts can browse served packages without guessing manifest filenames. Reuse catalog selection and refresh boundaries, including empty directories and stable pagination, and normalize strict frontmatter for YAML 1.2 Core readback. Add regressions and a pinned official conformance runner, and update the runbook and MCP references to describe the browsing contract. Refs #895 * fix(mcp): preserve supporting file MIME types in directory listings Record UTF-8 classification from the same bounded bytes used for package digests so directory metadata agrees with resource reads for extensionless and unknown-extension text. Reuse the existing bounded reader without adding listing-time payload reads or changing package limits. Share pagination with skills/list, trust the SDK's typed request boundary, and repair the pagination regression to detect stale catalog snapshots. Refs #895 * fix(mcp): stream supporting file metadata inspection Buffering supporting files during catalog refresh allocated with asset size. Restore one bounded stream for digest, size and UTF-8 classification, retaining at most three incomplete rune bytes and consuming invalid text through EOF. Preserve the existing same-file checks, package caps and SKILL.md byte reader. Keep real package-load benchmarks and strengthen the existing MIME fixtures for split runes and bytes after invalid sequences. Use one first-match sed command for the conformance URL without a truncated pipeline under pipefail. Scoped packages, focused race tests, vet, shell syntax/shellcheck and all 45 pinned official checks pass. Allocation stays near 48 KB for 64 KiB and 8 MiB assets; multibyte UTF-8 validation still costs CPU versus digest-only loading. * test(mcp): consolidate directory and frontmatter coverage Check every directory continuation URI so a duplicated middle entry cannot hide a missing resource. Keep the existing before/after-cursor refresh cases. Merge nested-skill acceptance fixtures in the catalog owner, preserving all skill-count, skip-warning and directory assertions across configured and targetless cases. Move directory capability coverage to initialization and merge scalar, alias and rejection cases under the existing parser test. Give cached-page benchmark skills names that match their URI directories. Narrow tests, benchmark smoke and vet pass; duplicate-result and stale-catalog mutations both fail, then restored source passes. Production is unchanged. |
||
|
|
3217d44881 |
fix(reconcile): keep tracked repo declarations this machine has not cloned (#880)
* test(install): reproduce loss of pulled tracked records Exercise the two-machine push and pull sequence and reconciliation states so missing tracked clones cannot silently erase shared install intent. * fix(reconcile): preserve tracked records missing local clones Pull transfers tracked repository metadata but not ignored clones. Keep the missing records during global reconciliation so another install and push cannot erase shared intent or accepted audit findings on every machine. * test(reconcile): isolate tracked record fixtures Use the shared sandbox fixture for both reconciliation tests so their home and configuration paths remain isolated from the invoking environment. * fix(reconcile): retain all sourced tracked declarations Legacy tracked members and unfollowed source links can hide declarations from the local walk. Preserve sourced tracked records regardless of their path so unrelated installs cannot erase them or their audit acceptances. Document restoring a missing checkout before uninstalling it and cover migration, link collisions, aliases, and explicit removal. * test(reconcile): drop fixtures existing tests already pin The tracked-record unit test also seeded a missing plain record and a live plain record. TestReconcileGlobalSkills_PrunesStaleEntries already pins both outcomes: a sourced plain record whose folder is gone is pruned, and one on disk survives. The tracked record with no source still catches a fix that keeps everything or skips the prune. The two-machine test passed HOME and SKILLSHARE_CONFIG to RunCLIEnv, which already sets both from the sandbox for each child process. Separate homes, XDG paths, client overrides and git config remain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(reconcile): retain tracked entry for unavailable link Expect sourced tracked declarations to survive reconciliation with either source-link policy, so the test matches the cross-machine retention contract. * fix(config): prune legacy tracked members Retain only sourced tracked repository declarations during reconciliation. Migrated member records are not restorable as repositories and retaining them would leave permanent misleading install requests and audit acceptances. * fix(reconcile): preserve tracked intent across followed links A source link can exist before a tracked repository declaration is pulled. Preserve that declaration when the linked folder is not a checkout so later reconciliation does not discard its record and audit acceptances. * test(reconcile): cover grouped followed declarations A followed group can contain the path of a pulled legacy repository declaration, which must retain its tracked intent while its key migrates. * fix(test): scope collision fixture runner correctly Keep the isolated CLI runner in the collision subtest that uses it so the integration test package can compile. * docs(manifest): clarify tracked checkout recovery A retained declaration cannot restore a checkout while another folder or source link occupies its destination, and restoration requires a reachable source. State those prerequisites in each manifest translation. * fix(config): prune members under recorded repositories A migrated underscore-named member can otherwise survive a missing checkout as a repository declaration. Check recorded ancestor paths while preserving ambiguous grouped declarations and unrelated aliases. * docs(manifest): restore fresh-clone project guidance Explain that project declarations without local install records remain available so teammates can install them after cloning. * refactor(reconcile): drop the tracked-intent walker policy Restore baseline normalization for present paths while retaining absent repository declarations through the shared metadata predicate. Isolate the reconcile fixtures without building a CLI and share native-client overrides without changing the original two-machine record and audit regression. Validation: gofmt, git diff --check and context-router check only. Runtime, builds and tests were not executed under the source-only gate. * fix: forget linked checkout records and declarations without checkouts Extend the metadata and uninstall owners to remove a declaration without reading or moving its occupant, contacting its source, or changing trash and gitignore. A failed metadata save makes every metadata-only result fail. Clean up global unlink records in CLI and API, preserve existing-path name precedence, report record-only results truthfully, and list declarations in the dashboard API with noCheckout. Keep project removal behavior unchanged. Remove the obsolete grouped-link walker-policy assertion while preserving grouped absent declarations and the original record/audit A/B regression. Validation: source-only five-pass review, gofmt, git diff --check and the context-router check. No runtime, builds, tests or frontend tooling ran. Stop at commit 15 for the mandatory Luna checkpoint before UI and docs work. * fix(server): reload metadata before removing declarations Preserve CLI records and audit acceptances written while the dashboard is open. Resolve new declarations from disk and refuse stale-cache saves after a reload failure, retaining unlink success when its link already moved. * feat(dashboard): remove a tracked repository record without a checkout Show declaration-only rows without checkout actions or status promises. Reuse Uninstall with record-specific confirmation and feedback, keep real-checkout force handling, and refresh the missing-entry list after repository removal or unlink. * docs: explain kept declarations and how to remove them Document direct global declaration removal and optional restore in English and all four translations, including occupied paths and normalization after reconcile. Keep built-in guidance accurate and use the existing API removal result for dashboard success feedback after concurrent CLI changes. * fix(dashboard): confirm restored checkouts after forceable refusals A tracked declaration can be restored through the CLI while its dashboard row still says there is no checkout. Treat a forceable uninstall refusal as evidence of the current checkout and promote the existing confirmation to its dirty or unreadable-status warning before allowing explicit force. Author stale-row regressions for both forceable codes before the source repair, and retain nonforceable failure and actual-result success feedback. Validation: five serial source review passes, git diff --check, and the context-router check. Tests, builds, runtime and frontend tooling were not run under the source-only gate. * test(server): persist overview declarations before routed request The overview fixture added declarations only to the in-memory skills store, which the real request's config reload replaced with on-disk metadata. The hosted unit, offline, and Nix jobs consequently returned no tracked rows. Save the complete fixture through MetadataStore before serving the request and fail setup on a save error. Keep the middleware, assertions, and production behavior unchanged. * fix(server): prefer exact declarations before checkout shorthand Removing a missing _team declaration from the dashboard could resolve the different org/_team checkout by basename and trash it instead. Reload metadata before declaration lookup, give exact declarations priority, and preserve checkout resolution before non-exact declaration fallback. Add routed absent/occupied regressions and checkout precedence guards, and persist existing checkout fixtures so the metadata reload keeps their state. Validation: gofmt, git diff --check, and context-router check passed. Tests were authored but not run under the source-only fleet restriction. * fix: preserve removal intent and report partial failures Bind dashboard record-only removal to its canonical declaration and refuse restored checkouts before checkout resolution or force. Refresh the row and require another confirmation before moving a restored checkout to trash. Keep unresolved uninstall inputs and their reasons in JSON failed results, including all-invalid requests, partial successes and dry runs. Report unlink metadata cleanup failures as partial results, refresh completed unlinks and show localized warnings. Keep CLI and dashboard guidance aligned. Regression tests were authored before source changes and remain unrun under the source-only task restriction. Static formatting, diff and router checks passed; no build, product runtime, frontend tooling or test suite was run. * fix(unlink): log partial metadata cleanup failures Write the unlink result after global metadata cleanup so load and save failures retain their diagnostic and report partial success. Preserve the successful link removal, warning, target and exit policy, and the existing link, project unlink and native removal failure behavior. Add the corrupt-metadata regression before the fix; leave it unrun under the source-only authorization. Formatting, diff and context-router checks pass; runtime verification remains with the coordinator. * fix(unlink): forget records below the removed link name Reconcile can normalize a followed link's record to untracked, and linked collections can retain nested repository declarations. Clean the removed namespace through the existing metadata path owner in both unlink callers, including audit acceptances, while keeping declaration uninstall strict. Author CLI and route regressions before the source fix for normalized and nested records, sibling preservation, and subsequent bare install. Tests remain unrun under the source-only task restriction; static checks only. * fix(uninstall): refuse a restored checkout at execution A declaration selected while absent can become a checkout before removal runs. Recheck the resolved source-relative name in the shared metadata-only execution owner and refuse before touching metadata, regardless of force. Reuse the existing dashboard conflict response and refresh/reselection flow for this refusal, preserving the earlier record-only intent guard. CLI results already carry shared execution failures through text and JSON. Author restoration, force, absent/occupied control and client boundary regressions before production edits. Correct the unlink fixture name and response-key assertion found in serial static review. All tests remain unrun under the source-only restriction; formatting/diff/router checks pass. * refactor(server): consolidate repository uninstall result handling Resolve a declaration or checkout to one item and canonical name before using the existing uninstall, conflict, log and success response tail. Keep metadata-only removal unforced, preserve its error and cache recovery behavior, and report movedToTrash from the selected item. Preserve exact declaration precedence, record-only checkout refusals, ordinary checkout errors and project behavior without changing tests. Five serial source review passes, gofmt, diff checks and the context-router check completed. Tests and builds remain unrun under the source-only brief. * fix(unlink): preserve independent records and trash undo metadata Limit unlink's legacy group matching to members so a retained declaration such as team/_repo survives unlinking _team. Share snapshot and removal matching while keeping generic uninstall's legacy contract unchanged. Save the exact removed records, audit acceptances and target overrides through uninstall's existing trash sidecar owner before pruning metadata. Keep metadata on sidecar failure and preserve completed-unlink warnings, fresh reloads, cache refresh and project-mode behavior. Author owner, CLI and API regressions for namespace collisions, undo, partial failures and project/empty controls. Source-only verification: gofmt, diff check and context-router check passed; runtime tests, builds, frontend checks and final make check remain unrun for root-owned gates. * fix(install): preserve independent tracked declarations Limit declaration-only cleanup to the precise namespace and legacy members already used by unlink. Keep independently installed prefixed repositories, their audit acceptances, and overrides when forgetting a missing checkout. * fix(cli): explain missing tracked repository recovery by mode Offer global record removal when restoring an unreachable source is unwanted. Keep project recovery scoped to install -p, share the hint with doctor, and align update documentation in every existing locale. * refactor(uninstall): share declaration and unlink operations Keep declaration resolution and unlink metadata ordering in shared owners so CLI and API preserve the same scope and recovery behavior. Consolidate domain regressions while retaining caller translation coverage. Distinguish record-only removals in API and CLI operation logs and CLI JSON, including mixed batches and dry runs. Document outcome fields, warning semantics, and current API error codes across existing locales. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Willie <egg358358@gmail.com> |
||
|
|
fab72f79e1 |
fix(doctor): stop the plugin check from holding back later checks (#889)
* fix(doctor): stop the plugin check from holding back later checks The dashboard's Doctor page streams checks as doctor finds them, but the plugin check asks each Agent's native CLI what is installed and can take many seconds. Checks run in order, so backups, trash and the version checks waited behind it while the page showed only an unlabeled skeleton row, with nothing saying which check was still running. When doctor streams, the plugin check now runs in the background. It is streamed first as a "pending" row in its place, the checks after it stream as soon as they finish, and its result follows. The full result keeps the check in its original place. Text output and plain --json run it inline as before. The dashboard shows a pending row as the check's name with a spinner and "Checking", replaces it in place when the result arrives, keeps it visible under every filter, and drops the unlabeled skeleton while it is shown. The /api/doctor/stream reference documents the pending row. * fix(doctor): show the skill scan and Git status as running Doctor scans the skill source before it streams its first check, and runs git status on the source inline. On a large source either can take seconds, and the dashboard showed only an unlabeled skeleton meanwhile. A streamed doctor now sends a pending "source" row before the scan, and runs the Git check in the background like the plugin check, so the checks after it no longer wait. A finished background check is recorded at the next check instead of at the end, so its row does not stay pending after its result is known. The pending row now holds the check's place in the result while it runs. |
||
|
|
cfe235a84d |
fix(install): report reinstalls from the same repo as skipped (#887)
* fix(install): report reinstalls from the same repo as skipped checkExistingConflict read only the legacy .skillshare-meta.json sidecar, which installs no longer write, so reinstalling a skill from the same repo was reported as "already exists" and counted as failed, contrary to the documented skip. It now reads the skill's record in .metadata.json, falling back to the sidecar, and skips only the same skill of that repo: another skill installed under the same name stays a conflict instead of being reported as installed. The dashboard logged an existing agent as installed and a same-repo skill as failed. Batch installs now return those as skipped and log them as skipped_skills, passing --into so a reinstall into a group folder finds its record; the install dialog warns that they are already installed. A same-repo tracked reinstall returns 409 and is logged as skipped instead of a 500 logged as failed. ss search installs, batch and single, log the names they skip, and the Herdr panel reports skipped names like failed ones. The install docs and their translations say that only the same skill is skipped. * fix(install): install requested agents when the only skill is skipped Reinstalling a single-skill repo with `-s alpha -a helper` returned as soon as the skill was skipped as already installed, so the requested agent was never installed while the command reported success. Both single-skill branches now continue to the agent phase, as the multi-skill path already does. |
||
|
|
4596c1e413 |
fix(install): require explicit force for JSON overwrites (#884)
* fix(install): require explicit force for JSON overwrites Machine-readable output must not grant destructive consent. Preserve existing skills and agents unless force is explicit, and report existing skip decisions in the JSON result while retaining selection and audit behavior. Cover edited copies in global and project modes, and update help, automation guidance, and translated command documentation. Refs: #877 * fix(install): preserve previews and locked JSON copies Read-only discovery must work before replacement consent, including existing single skills and cross-path installs. Keep overwrite checks on write paths. Require existing update or force intent to advance installed project copies to a changed lock pin. Preserve ordinary CLI and dashboard lock following, while JSON alone leaves local edits and incoming pins unchanged. Cover existing-destination previews, edited locked copies and dashboard lock following. Clarify translated docs and make the consent runbook step runnable. Refs: #877 * fix(install): resolve installed names during previews JSON previews must resolve recorded sources without requiring overwrite consent. Permit metadata lookup for dry runs and restore the original unforced preview regression in global and project modes. * test(install): remove duplicate JSON consent runbook case The global local-skill integration case already covers JSON overwrite refusal and explicit forced replacement. Remove the duplicate runbook step and restore its 18-step numbering while retaining the existing purity setup and assertion corrections. |
||
|
|
08ecb7afad |
fix(audit): report audit-rules load errors and block installs whose audit cannot run (#882)
* fix(audit): report audit-rules load errors in global scans The global scan entry points (ScanSkill, ScanSkillWithFollow, ScanSkillFiltered, ScanFile) dropped the error from Rules() and scanned with no pattern rules. One bad regex in the global audit-rules.yaml turned every pattern check off with no warning, so audits reported fewer findings than they should have (#879). Project mode already returned the error. Return the error from the global path as well, and name the failing file in it: parse errors from loadUserRules and compile errors from Rules() and RulesWithProject now carry the path. When a project scan fails to compile, the global file is blamed only if it fails on its own, so a project file that disables a broken global rule still loads. The cached markdown split now takes the rules its caller already loaded instead of loading them again and dropping the error. * fix(install): block installs whose audit cannot run Once global scans return rule-load errors, install treated the error as a warning and installed the skill with no audit at all. update already fails closed on a scan error, and --force there accepts findings, not an install nobody could check. A scan error now blocks skill, agent and tracked-repo installs and removes what was installed. --force does not override it; --skip-audit still bypasses scanning. The error wraps the new install.ErrAuditScanFailed rather than audit.ErrBlocked, so install output and the dashboard do not offer a --force retry that cannot help. upgrade reinstalls the built-in skill with --force, which deleted the old copy before the audit ran. A typo in audit-rules.yaml would have left users without the skill, so upgrade now stages the download through the update path and keeps the installed copy when the audit fails. update --all counted the new error as a silent skip. It is now listed under "Blocked by security audit" with its reason and makes the run exit non-zero. The install warning summary that counted "audit scan error" warnings is removed, since nothing emits them any more. Fixes #879 |
||
|
|
caa107b880 |
fix(plugin): refresh stale OMP catalog and report blocked OMP updates (#853)
* fix(plugin): recover OMP stale catalog installations Refresh owned marketplace catalogs before reuse and validate the native cache identity when removing an installation. Preserve that identity through interrupted cleanup and report blocked batch updates as failures so retries remain safe and visible. * fix(plugin): preserve reviewed versions during OMP recovery Keep native removal identity separate from reviewed receipts so interrupted cleanup can retry safely. Expose isolated failures in previews and dry-run exit status while allowing healthy targets to proceed. * fix(plugin): resume interrupted OMP update cleanup Retry matching pending removals before reinstalling after registry-first interruption, and clarify isolated failure reporting. Strengthen recovery fixtures and restore accurate installation guidance. * test(plugin): model OMP cached catalog installs Use the cached marketplace entry for native install version and source so the stale catalog regression exercises the real version-to-cache relationship. * test(plugin): align OMP batch expectations with safety checks Require catalog refresh before reinstalling from an owned marketplace and assert isolated failures when native OMP ownership cannot be verified, while healthy targets update. * fix(plugin): skip native upgrade checks for OMP imports Imported plugins have no reviewed source to upgrade, so requiring native upgrade capability makes a safe batch skip fail unnecessarily. Cover that case and OMP dry-run failures, and align translations and native verification runbook with the failure and removal behavior. --------- Co-authored-by: Willie <egg358358@gmail.com> |
||
|
|
9dbcd925d8 |
feat(audit): honor findings accepted with --force via --respect-accepted (#872)
* feat(audit): honor findings accepted with --force via --respect-accepted install and update --force record the findings a user accepted in audit_accepted, but audit ignored that record. A skill installed with --force therefore kept failing `skillshare audit` in CI with no way to let the accepted findings pass (#869). audit --respect-accepted marks those findings as acknowledged. They stay in every output (JSON acknowledged: true, a text/TUI note, "(accepted earlier)" in Markdown, SARIF external suppressions), but they are counted in summary.accepted instead of their severity and no longer fail the audit. Without the flag nothing changes, so existing CI gates keep their behavior. A changed file or snippet produces a new key and blocks again. Tracked repositories record acceptances at the repo root with paths relative to it, so ApplyAcceptedFindings walks up from each skill to match them. The install, update and edit gates use the same function and now honor repo-wide acceptances for skills inside tracked repos too. The dashboard always honors accepted findings: the Audit page mutes them and counts them apart, the skill Audit tab collapses them, and the Dashboard attention card no longer lists a skill whose only blocking findings were accepted. The CLI JSON summary and the server summary share Result.CountOpenBySeverity so both count accepted findings the same way. The oplog records the accepted count and the log views show it. * fix(audit): match acceptances when a single file is scanned A single-file scan names its findings by the file's base name, but the ancestor lookup used the file's whole path as the prefix, so it hashed SKILL.md/SKILL.md instead of the recorded SKILL.md. Auditing a skill file directly with --respect-accepted, and auditing agents inside a tracked repository in the CLI or the dashboard, still failed on unchanged accepted findings. For a file target the prefix is now the file's own directory. |
||
|
|
65f3c8d1b9 |
fix(ui): show health checks as they finish instead of after the slowest (#870)
* fix(ui): show health checks as they finish instead of after the slowest
The Doctor page waited for the whole `doctor --json` run before showing
anything. One slow check, such as plugin checks waiting on a native CLI
that does not answer, kept the page on a skeleton for 30 seconds, and the
server's 30-second write timeout could cut the response off entirely.
`doctor --json` now prints each check as a {"check": ...} line when the
internal _SKILLSHARE_DOCTOR_STREAM variable is set, before its usual
result. The new GET /api/doctor/stream relays those lines as Server-Sent
Events and sends the full result as `done`; it has no write deadline and
stops doctor when the client leaves. The page shows checks as they
arrive and replaces them with the final result.
* fix(ui): show the server's reason when a stream fails
The audit, diff and doctor streams send an `error` event with the reason,
but the shared EventSource helper treated it like a dropped connection
and showed only a generic message. It now uses the reason the server
sent, and keeps the generic message for a real disconnect.
* fix(doctor): skip Git reads in the hooks check when no hooks are configured
The hooks check loaded the full hooks inventory, which also scans
unmanaged native and Git hooks twice: about 12 git calls even with no
hooks configured, none of which doctor reports. Doctor now reads the
hooks section first and previews a sync only when there is something to
check.
|
||
|
|
c7ee19535b |
docs: prepare the 0.30.6 check --exit-code release
Point every README release notice at check --exit-code and check --all, the headline CI changes in 0.30.6, and credit tomerzcod7 (#852) and ErykJakubik (#858), whose reports led to the git hook and project config fixes. The security change in #861 added its provider-token paragraph twice to the install command page in all five locales; keep one copy. The website builds for all five locales and context validation passes. |
||
|
|
55161e44ba |
fix(check): keep --json output valid when a name or group does not resolve (#868)
check <name> --json printed its warnings and the group expansion note on stdout before the JSON, so the output could not be parsed. When no name or group resolved it then printed an empty result and exited 0, while text mode exits 1, so a CI gate with a mistyped name passed. With --json, check now exits 1 with an error object when nothing resolves, lists skipped names in a warnings field when some do, and reports every other failure (bad flag combination, missing config) as the same error object. Text mode is unchanged. |
||
|
|
53bac42243 |
fix(check): make --all check agents as well as skills (#867)
check --all is documented as checking both skills and agents, but it ran the skills check only. With --exit-code now available, a CI job using check --all --exit-code passed while an agent had drifted. --all now runs both checks: the text output has a Skills and an Agents section, --json adds an agents array beside tracked_repos and skills, and --exit-code counts both. check --json and check agents --json keep their shapes. --all is rejected together with names or --group. It used to be ignored there, and agents have no name filter, so honoring it would check one skill and every agent. |
||
|
|
8abf3f50ed |
feat(check): add --exit-code to fail when anything is not up to date (#865)
check exits 1 only when an item could not be checked, so a CI job that wants to fail on pending updates or local edits had to parse --json. --exit-code makes a check that ran cleanly exit 1 when any skill, tracked repository or agent is not up to date. Only items whose status is local are left out, and the default exit status is unchanged. The operation log still records such a run as successful. The flag is rejected with --diff. |
||
|
|
c040917bc7 |
fix(security): enforce credential and filesystem trust boundaries (#861)
Bind provider credentials to canonical or explicitly configured HTTPS origins and preserve that policy across remote consumers. Reject cross-site credentialed reads, linked fallback directories, and discovered-agent writes outside the source; audit staged content before rooted atomic publication. Add boundary regressions, private Git update coverage, stable cross-platform fixtures, and aligned documentation. Verified the integrated main baseline with all executed CI checks passing. |
||
|
|
769087b882 |
fix(project): keep config.yaml true after reinstall, uninstall and fresh-clone installs (#860)
In project mode the committed config.yaml is what teammates install from, but it could disagree with what a machine actually has (#858): - `uninstall -p` and the dashboard's single-skill and tracked-repo removal left the skill's entry in config.yaml, so a later `install -p` brought it back. They now drop the entry and the lock pin through one shared config.ForgetProjectSkills, as the uninstall docs already promised. - Installing a skill again from another source or branch (after an uninstall, or over the copy with --force) updated only the gitignored .metadata.json. config.yaml kept the old source and skills.lock.json ended with the old source and the new commit. Installs from a named source (CLI install, search, dashboard) now compare the records from before and after the command and let the config entry follow the skills it actually reinstalled. Install from config never rewrites an entry from local records, so a teammate's edit survives on a machine that has not updated yet. - Reconcile removed every config entry that had no folder and no record. On a fresh clone nothing is installed yet, so `install <source> -p` deleted all the other declared skills. An entry now goes only when the skill was installed here and its folder is gone, when it was moved, or when a command removed it; `move` passes the old paths and `update --prune` cleans the config itself. |
||
|
|
93c12557bd |
docs: prepare the 0.30.5 update controls release
Refresh all README release notices and route agents to the new updates command. Clarify that desktop policy controls require a compatible App release; the CLI upgrade alone cannot change older desktop builds. The website builds for all five locales, context validation and skill validation pass. The documentation diff passed five local review passes. |
||
|
|
adf6c9ecb3 |
feat(updates): allow opting out of automatic version checks (#847)
Add a global automatic-update preference with an environment override, CLI controls and dashboard settings. Suppress automatic release checks and cached notices while retaining explicit checks and upgrades. Recheck policy before publishing in-flight results, preserve structured JSON errors, and reject incomplete manual checks. Include schema, completion, localization, documentation and regression coverage. Closes #846. |
||
|
|
ac339b5693 |
docs: describe the real .metadata.json format
The docs still showed the old `{"skills": [{"name", ...}]}` layout, which
no current release writes; the file is `{"version", "entries", ...}`
keyed by path. Readers comparing the docs with their own file had no way
to tell what `audit_accepted` or `target_overrides` are for.
tracked-repositories also said project mode records `tracked: true` in
`.skillshare/.metadata.json` so teammates get it, but that path does not
exist and project mode gitignores the metadata files (#760); the flag
lives in `.skillshare/config.yaml`.
The example `type` is `github-subdir` because a subdir install records
that, and the field table omits `into`, which nothing writes.
|
||
|
|
709f5ce896 |
fix(herdr): align install discovery with CLI planning (#841)
Expose selected skill names and repository-relative paths in dry-run JSON so the panel follows CLI discovery, ignore rules, and canonical names. Refuse ambiguous plans and treat nonzero install exits as failures even with legacy JSON output. Closes #838 Release-As: 0.30.4 |
||
|
|
4556438575 |
fix(plugin): let OMP and Pi plugin updates through without uninstalling (#833) (#837)
* fix(plugin): let OMP and Pi plugin updates through without uninstalling (#833) Every OMP update was blocked, because OMP's native upgrade replaces cache folders that projects outside its inventory may still use. The only way to move an OMP binding to a new commit was to uninstall first. An update now runs the same pair a source change already uses: the scoped removal adapter (cache kept), then an install under a fresh marketplace and cache identity. A refresh always takes a new identity, because OMP installs from the catalog it cached when the marketplace was added, and that catalog still names the old version. If the removal cannot be verified, the update is blocked; update --all still skips it with the reason. Pi was blocked whenever the catalog plugin name differed from its package.json name. That happens after an upstream npm rename, for example when npm refused the original name. Pi installs by path, and Skillshare keys the binding by the catalog name, so the npm name never reaches either, and the check only stopped working installs. Updating one package across several Agents stopped every Agent as soon as one was blocked. Each failing Agent is now reported with its reason while the others update, and the command exits non-zero. A single --target, or a package with no other Agent to update, stays blocked as before, so a dry-run still fails when nothing would update. * fix(plugin): let one update --all refresh several OMP packages Every OMP removal proves itself against a fingerprint of the whole native registry and lock. In a single update --all plan, the first package's removal and reinstall rewrite those shared files. The second package's removal therefore saw "OMP native files changed", so only one OMP package could update per run. The same applied to a sync that replaced the sources of several OMP packages. A removal now also fingerprints only its own installation: its registry entry, its lock entry, its package manifest and its runtime link. After an earlier change in the same apply has written to that OMP target, the removal re-reads the files and runs every ownership check again. It goes ahead only if that own fingerprint still matches the preview. A change outside Skillshare to the package's own entries still blocks it. Without an earlier write in the apply, the full-file check is unchanged. The fake OMP in the tests now merges installs into the registry and lock and lists them in a stable order, as the real one keeps other plugins. |
||
|
|
816938c09c |
fix(cli): report why uninstall and install fail under --json (#835)
Scripts and the herdr panel could not tell why an uninstall or install failed: uninstall --json had no error field, project mode ignored --json (printing text and still prompting), and a multi-skill or config install in which every skill was blocked exited 0. - uninstall --json (skills and agents, global and -p) sets "error" with each failed name and reason; skills exit non-zero when all fail, agents when any fails. Project mode now emits pure JSON, including on the first run that initializes the project. - uninstall -p agents parses its flags instead of treating --help or an unknown flag as an agent name, and uninstall agents --json is logged. - install exits non-zero, naming each skill and reason, when every skill from a source or from config fails; installed or skipped skills make it a partial success that still exits 0. Config installs show each failure's reason, and the dashboard logs an all-failed run as an error. - herdr asks for JSON in project scope and shows the CLI's error. |
||
|
|
176a236249 |
fix(install): report why an install failed in --json output (#831)
install --json printed empty skills and failed lists with exit code 1 when the whole install failed, for example when the security audit blocked a tracked repository or a single skill. Scripts and the herdr mod could see that it failed but not why, and the mod already reads an error field that was never set. The install JSON now carries the command error in an omitempty error field, in global and project mode. The install docs also stop saying --json implies --force: it only permits overwriting, and the audit gate still applies unless --force is given. |
||
|
|
c74a35dd4b |
fix(audit): text-scan hidden-directory skills in tracked repo gates (#827)
Tracked install and update audit the whole repository root, and the scanner treated every file below a hidden directory as header-only. Skills that discovery finds in hidden directories, such as .curated/<skill> and, since #801, a repository-root .agents/skills/<skill>, were therefore synced to every target without a text scan. The hidden-directory boundary is now measured inside the skill that holds a file, so those skills get the text scan they already get when audited one by one, while target copies such as .claude/skills and hidden folders inside a skill stay header-only. Release-As: 0.30.3 |
||
|
|
71ff2d9e14 |
fix(discovery): find repository-root .agents/skills (#801)
A repository-root .agents/skills now counts as a skill anchor only when the repository has no other SKILL.md outside .git and target directories, so tracked checkouts that author skills there are discovered, while repos that commit .agents/skills copies keep discovering only their authored skills. Fixes #800 |
||
|
|
cafd99e595 |
feat(mcp): add Hermes Agent sync and import target (#826)
Share portable MCP definitions with Hermes through its native YAML configuration while preserving unrelated settings and managed-entry safeguards. Support explicit Hermes homes and native OAuth options without copying credential state, and expose the target consistently in the dashboard, schemas, completions and documentation. Refs #825 |
||
|
|
037c7943cf |
fix(audit): report credential paths in Python comments and docstrings as HIGH (#819)
Credential-access rules match whole lines, so a Python docstring that named ~/.aws/credentials in a `cat` example counted as a CRITICAL read and blocked the mcp-sentinel skill at the default threshold (#817). In .py files, a built-in CRITICAL credential-access match on a comment-only line, or inside a string that is a whole statement such as a docstring, is now HIGH: it still shows, and still blocks under a HIGH threshold. A small tokenizer decides this and keeps CRITICAL wherever it cannot be sure the line never runs: argument, assigned and bracketed strings, f-strings and their replacement fields, code before a trailing comment, files that read __doc__ or use bare CR line breaks, and explicit severity overrides. A lowered finding carries severityContext "python-inert" (JSON, SARIF, `audit rules --format json`), and the dashboard, CLI text output, both audit TUIs, install/update warnings and the markdown report say it was lowered from CRITICAL, so it is not mistaken for a changed rule. Closes #817 |
||
|
|
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. |
||
|
|
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. |
||
|
|
e9dc4d0360 |
feat(server)!: answer only at localhost, IP addresses and trusted origins (#811)
DNS rebinding lets a page point its own domain at the user's machine, which makes its requests same-origin to the dashboard, so the CSRF guard cannot refuse them. Only the MCP, Hooks and Plugins routes required a localhost or IP Host, so such a page could still install, sync and push. That rule also blocked those three pages for people who run the dashboard behind their own reverse proxy (#809). The dashboard now answers every route only at localhost, an IP address, the --host name, and origins given with --trusted-origin or SKILLSHARE_UI_TRUSTED_ORIGINS. Configuration stays outside config.yaml so the dashboard cannot widen its own trust through its config API. A trusted origin must match the Host with its scheme, and an Origin header, when sent, must be that origin. A refused browser gets a page with the exact setting to copy, the API gets it in the error, and the server log names each refused Host once. BREAKING CHANGE: a dashboard opened by a domain name, such as a reverse proxy, a Tailscale or mDNS name, or a Docker service name, now returns 403 on every page until that address is trusted, for example with `skillshare ui start --trusted-origin https://skills.example.com`. Release-As: 0.30.0 |
||
|
|
ec9b3e688c |
fix(server): refuse dashboard changes sent from other sites (#810)
A web page can submit a form or a no-cors fetch to the local dashboard without a CORS preflight, and the handlers accept a text/plain or empty body. Only the MCP, Hooks and Plugins routes checked where a request came from, so any site the user visited could add targets, install, sync, commit, push or upgrade, whenever the browser let the request reach localhost. Every POST, PUT, PATCH and DELETE now needs Fetch Metadata, when sent, to say same-origin, and Origin, when sent, to match the Host. A client that sends neither, such as curl, is unchanged, because a page cannot make a browser omit both on a cross-origin request. The update stream runs updates over GET, as EventSource only opens GET, so it gets the same check. The nginx example now forwards $http_host, which keeps the port, since a proxy that drops it would now fail every change, not only MCP. |
||
|
|
ac49959f83 |
docs(hooks): note the dashboard Hooks page needs localhost or an IP
The Hooks page uses the same DNS rebinding guard as the MCP page (requireLocalHooks), so through a domain name or a reverse proxy its requests return 403. The reverse proxy note only mentioned MCP, so a user behind a proxy had no warning that Hooks would fail too. |
||
|
|
bfbc06a664 |
fix(plugin): keep Codex off packages and folders it cannot use (#808)
The Claude manifest fallback from #806 offered Codex more than it can install: - A Claude package whose only parts are ones Codex does not read, such as agents, was offered to Codex with no components, so Codex would install an empty plugin. - When Codex's own catalog pointed at a folder it rejects, the whole candidate could be replaced by the Claude catalog's folder, which now carries a Codex fallback. Codex reads only its own catalog, so it would never install from that folder. #806 also stopped every Agent from using a later catalog's folder when the first one was rejected. Only Codex needs that, since only Codex reads one catalog exclusively, so other Agents get the old behaviour back. |
||
|
|
6e1fc67d71 |
fix(plugin): discover Codex-compatible Claude manifests (#806)
Codex accepts Claude plugin manifests natively, but discovery omitted Codex for packages such as Matt Pocock's skills. Select that supported fallback without rewriting package resources or invocation policies. Match native root and manifest precedence, retain rejected own-catalog packages, and add discovery and snapshot regression coverage. Refs #805 |
||
|
|
f3dec2fde9 |
docs(ui): describe the filter preview search
The dashboard reference walked through each Targets page control but not the search box #799 added above the include/exclude preview, which is also shared by project pages and the Extras Edit target dialog. Release-As: 0.29.2 |
||
|
|
c19ff80611 |
fix(audit): reject special targets before reading content (#796)
A named pipe can block collection, integrity hashing or uncached skill metadata reads indefinitely. Require resolved regular files at each read boundary while preserving symlink accounting and integrity evidence. Cover the paths with bounded FIFO regressions and generated filesystem cases, and update the Nix vendor hash and integrity-rule documentation. |
||
|
|
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> |
||
|
|
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> |
||
|
|
3ab92f35b2 |
docs: fill gaps found in the 0.29.0 docs sweep
Checking every user-visible change since v0.28.4 against the docs found these gaps: - ui.md: GET /api/audit now returns warnings and incomplete; an incomplete scan warns instead of reporting all clear and appears under Needs attention; a project branch switch records the branch in .skillshare/config.yaml. Also fixes a lowercase sentence start. - audit-engine.md: Markdown and SARIF carry the per-resource coverage counts added in #756. - audit-rules.md: the files row pointed at a "File Scoping" section that does not exist; it now links to File Applicability. - log.md: project localize logs a localize action. - built-in skill: how an unreadable followed source link is reported. Translations are updated to match. |