Commit Graph
3241 Commits
Author SHA1 Message Date
Willie f052d5c945 docs(readme): announce 0.30.9 and credit its reporters
The Latest callout still named 0.30.7. Point it at the hooks import
dialog change that 0.30.9 ships, in every translated README, and add
the reporters of #921 and #922 to the contributors.
2026-11-17 00:17:50 +08:00
Willie 4d502267d0 fix(ui): say the target limit was removed in the Skills toasts (#929)
Choosing "No limit" for a skill, a folder or a selection still showed
"… now available in All": the toasts put the old "All" label into the
"available in {target}" sentence. That is the wording #925 found
misleading, and it no longer matches the option's name.

Give the no-limit case its own sentence in each of the three toasts
and drop the "All" label nothing else uses.
2026-11-17 00:05:47 +08:00
Willie 9ac28615db fix(ui): count symlink-mode targets in the Skills list (#928)
* fix(ui): count symlink-mode targets in the Skills list

A symlink-mode target links the whole source folder, so every skill is
live there. The skill detail page and the Sync page count it, but the
Skills list read only `synced` matrix entries: the Targets column, the
tree pane and the target filter left such a target out, and the Agents
page reported a symlink-mode agent target as not supporting agents.

A skill whose targets all had skills switched off was labelled "No
agent targets", wording meant for agents. It now reads "Skills off".
Nothing else reaches that label any more, so the key is removed.

The list now applies receivesSkill, the same rule as the other pages.

Closes #926

* fix(ui): rename the "All" target option to "No limit"

The option clears a skill's own `targets:` field. Labelled "All", it
read as "synced to every target", so a skill showing "All" next to a
single target icon looked like a bug (#925). "No limit" says what the
field does and pairs with the existing "Limited" tag.

Closes #925
2026-11-16 23:49:06 +08:00
Willie 06b72eb5b0 fix(ui): show a target with skills off as off on the skill page (#927)
The sync matrix reports a target as `na` both when it is in symlink
mode and when skills are switched off for it. The skill detail page
read every `na` as symlink mode, so a skills-off target showed
"Symlink mode, filters do not apply" with its switch on and counted
toward "4 of 4", although nothing syncs there. Next to a Skills list
that shows only the targets the skill reaches, the two pages
contradicted each other (#925).

Use receivesSkill, the rule the Sync page already applies, so only a
symlinked folder counts as carrying the skill, and label the other
case "Skills off".
2026-11-16 23:34:20 +08:00
Willie 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
2026-11-16 22:55:13 +08:00
Willie 313ffdeea0 fix(herdr): run the panel on Windows through Git for Windows' sh (#924)
Windows has no sh on PATH, so every panel exec failed with "program not
found". A default Git for Windows install puts only Git\cmd on PATH, so
when sh cannot start the panel asks `git --exec-path` for the Git root
and uses its bin/sh.exe, which sets up the MSYS PATH itself. The shell
found is kept per machine, because a space's machine can run a
different OS than the window.

Under that sh, jobs printed their temp folder as /tmp/..., which Herdr's
native readTextFile cannot open, so every job waited out its 15 minutes.
READY now prints the cygpath -m form (C:/...) when cygpath exists; MSYS
sh accepts it too, and other platforms are unchanged.

Closes #922
2026-11-16 22:15:41 +08:00
Willie 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
2026-11-16 22:13:30 +08:00
Willie 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.
2026-11-16 15:48:20 +08:00
Willie d8bac85fac fix(cli): describe Git and CLI commands in root help
The Git and CLI groups listed command names on one line with no
summaries, so finding the command for a task meant opening each one's
help. Give them a row and summary like every other group.
2026-11-16 14:14:09 +08:00
Willie ffbddb608a chore(audit): name the SARIF rule index key correctly
The map has been keyed by ruleID, with Pattern only as a fallback,
since rule IDs were introduced; the comment still said pattern.
2026-11-16 13:54:03 +08:00
Rusty Shackleford 22fdb28de0 fix(audit): report maximum SARIF descriptor severity (#916)
Python credential scans can produce a HIGH comment before a CRITICAL
code finding for the same rule. Keeping the first descriptor score hides
the later severity. Promote the shared descriptor while retaining each
result's level and the first-seen rule index.
2026-11-16 13:53:45 +08:00
Rusty ShacklefordandWillie 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: 45ebabfe2b

Static checks and independent inspection completed. Go, integration,
dashboard, rendering, and hosted runtime validation remain pending.
This fork staging commit is not an upstream publication or merge.

* test(opencode): align schema and snapshot assertions

Check the version-aware binding schema and verify native unregister retains the unchanged managed snapshot.

* fix(opencode): resolve Windows npm native launchers

Probe recognized native Opencode executables without invoking a batch shell; exercise the default version probe on hosted Windows.

* test(opencode): normalize Windows fixture line endings

Avoid doubling carriage returns when Git checks out the npm fixture with CRLF.

* fix(opencode): keep an undetected OpenCode version from blocking other agents

Review of the v2 directory package change found that one failed
`opencode --version` probe failed the whole hooks plan, so a machine
without the binary (a second machine sharing the config, CI, a
devcontainer) could no longer sync hooks to any agent, and doctor and
the dashboard preview failed with it.

Hooks:
- A probe that fails or reports an unknown major now skips only the
  OpenCode bindings with one warning per target. Outputs already owned
  there are parked, so they are neither rewritten nor removed while the
  layout is unknown. The probe runs once per plan, list and import.
- A `package` binding on OpenCode v1 is skipped with a warning instead
  of failing the plan.
- The v2 dependency warning is reported once, and only when a package
  file is written, so a synced hook no longer keeps doctor yellow.
- `hooks import` reports an unreadable file such as a symlink as that
  package's problem; other packages and flat files stay importable.
  The package validation problem is reported once instead of twice.
- Directories under `plugins/` are listed as unmanaged only on v2.

Plugins:
- The inventory leaves `plugins/skillshare-NAME` registrations to
  hooks, so a synced v2 hook is not offered as an importable plugin.

Dashboard: the new warnings are translated in every locale, a
`hook NAME:` prefix no longer defeats translation, the native preview
translates its per-file error, and the YAML editor documents `package`.

Docs: the English pages and the built-in skill describe the behavior
above; the ja, ko, zh-Hans and zh-Hant pages now carry the same
content as the English ones. The runbook drives the CLI with mdproof
assertions instead of prose expectations.

Refs #913.

---------

Co-authored-by: Willie <egg358358@gmail.com>
2026-11-16 01:50:14 +08:00
github-actions[bot]andWillie b9ca16a80e chore(main): release 0.30.8 (#891)
* chore(main): release 0.30.8

* chore(release): synchronize release metadata

* docs(changelog): rewrite the 0.30.8 entry for users

The generated entry listed commit subjects. Readers need what changed for
them and what to do: the MCP directory reads are a new capability, the
tracked-repository fixes change what uninstall and unlink remove, and the
theme fix needs the matching desktop app update.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Willie <egg358358@gmail.com>
v0.30.8
2026-11-15 01:13:08 +08:00
Willie 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.
2026-11-15 00:56:11 +08:00
Willie 1f0077d2db chore(mcp): guard the conformance script and close the gaps left by #905 (#911)
Follow-up to #905.

The conformance script builds and serves skillshare and runs npm ci, which
the repository only allows inside a container, but nothing stopped it from
running on the host. It now refuses outside a container, with the same check
scripts/hooks/git-e2e.sh uses. Nothing referred to the script either, so the
testing topic now says when and how to run it.

The translated mcp reference pages left out the example URI the English page
gives for a skill root. All four now carry it.

The streaming UTF-8 check in the package loader was only exercised with a
rune split one byte before the read boundary. Two fixtures in the existing
directory test add the 2+2 and 3+1 splits, so a mistake in the carried-over
bytes shows up as a wrong MIME type.
2026-11-15 00:37:15 +08:00
Rusty Shackleford 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.
2026-11-15 00:21:35 +08:00
Willie f989f13855 fix(ui): let an embedding app start the dashboard with both theme axes (#910)
The desktop app shows the dashboard in an iframe and passes its theme as
?theme=, which holds one value: it cannot ask for Dark + Clean or Playful
dark. Where the iframe's localStorage is not kept (WebKitGTK on Linux), the
dashboard then started with another theme, flashed it, and reported it to
the app as if the user had picked it (runkids/skillshare-app#128).

?mode= and ?style= now name one axis each and win over ?theme=, in both the
pre-paint script and ThemeContext, through one parser. The dashboard also
posts theme-init to its parent when a page starts, before the first
theme-change reports, so the app can tell a starting theme from a user's
choice even when the dashboard reloads itself.
2026-11-14 23:54:42 +08:00
Willie be8f8b2874 fix(hub): read the same tags for drafts and the index (#909)
The index and the draft builder read a skill's tags with different readers,
so the same SKILL.md could publish different tags depending on the path:

- The index accepted only the comma form (tags: git, workflow). A YAML list
  became "[git" and "review]", and a block list produced nothing.
- Drafts accepted only a YAML list, so the documented comma form produced no
  tags, and metadata.tags replaced the root field. After #901 the index
  ignores metadata, which made the two disagree there as well.

Both now call readSkillTags. It reads the root field only, in either form:
a list comes from the decoded frontmatter, and the comma form from the
existing line scan. The scan also unwraps a one-line list, so a skill whose
frontmatter YAML rejects on another line (for example an unquoted colon in
the description) no longer publishes bracketed fragments.

Tags under metadata are custom data and are not read by either path. The
skill format page says so in all five locales.
2026-11-14 23:52:45 +08:00
Willie c88fe15a17 refactor(frontmatter): simplify the root-line check and align custom-field docs (#908)
Follow-up to #901.

IsRootFrontmatterLine took the caller's trimmed line only to test for blank
and comment lines, and its callers disagreed on how they trimmed it
(ParseSkillName trimmed spaces and tabs on the left, the rest trimmed all
whitespace). The helper now trims the raw line itself, so there is one
definition of a blank line and one argument fewer to get wrong.

Two tests added in #901 covered behaviour that change did not touch. The
ParseFrontmatterFields row is removed, and the ParseFrontmatterMap test is
reduced to the one case that guards what the skill format page promises:
nested metadata mappings and lists are kept.

Docs: the skill format page now recommends metadata for custom fields, but
the "Version tracking" example in creating-skills still showed top-level
version and author. It now matches. The sentence saying sync preserves
existing last_edited values is shortened, because skillshare has no such
field and the wording suggested it does. Both edits are applied to en, ja,
ko, zh-Hans and zh-Hant.
2026-11-14 23:41:01 +08:00
Rusty Shackleford 990732b454 fix(frontmatter): isolate root identity and hub index tags (#901)
* fix(frontmatter): keep nested metadata out of skill identity

Preserve root indentation in the tolerant identity readers so nested name
and description fields cannot shadow a skill or create audit claims. Keep
each reader's locator, scalar conversion and streaming policies intact.

Prove existing structured provenance preservation and the namespace fix
with regressions, bounded fuzzing, and global/project CLI integration.
Document nested metadata and native-client compatibility in all format
page locales.

Fixes #894

* refactor(frontmatter): share root-line indentation checks

Use one root-line predicate for the tolerant identity readers and
ParseSkillName so their metadata namespace boundary has one owner.
Keep each caller's whitespace policy, locator, scalar handling and
early-stop behavior intact.

Retain the existing namespace regressions, fuzz invariant and CLI flow
coverage without adding a duplicate helper test harness.

* fix(hub): keep nested metadata out of index tags

Apply the shared root-line predicate to the hub index scalar tag reader so
custom metadata tags cannot replace root tags or create absent root tags.
Extend the existing namespace table rows to assert exact index tags while
preserving the separate structured-list metadata precedence policy.
2026-11-14 23:18:15 +08:00
Willie 58ccb2bcc5 fix(uninstall): keep repos installed into a tracked repo's legacy group (#900)
Uninstalling the _team checkout matched every tracked entry grouped as
"team", so a repo installed with --into team (team/_b) lost its record
and audit acceptances too. Since #880 keeps declarations that have no
checkout on this machine, reconcile could no longer restore that record,
and the next push removed it on every machine; only trash restore of
_team brought it back.

#880 already excluded _-prefixed repo directories from the legacy match
for unlink and declaration-only removal. Move that guard into
inLegacyRepoGroup so checkout uninstall and its trash copy follow the
same rule.

Fixes #898
2026-11-14 14:25:00 +08:00
Willie ad5fed8301 test(doctor): ignore Git status when checking the plugin row order (#899)
TestDoctor_JSON_StreamDefersPluginCheck required the pending plugins
row to follow hooks directly. Git status also runs in the background
in a streamed doctor and is recorded at whichever check comes next,
so on a fast runner its result can land between hooks and plugins,
and the test failed on ubuntu CI (seen on #880). The order the test
guards is unrelated to Git, so leave git_status out of the list.
2026-11-14 14:18:43 +08:00
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>
2026-11-14 13:11:27 +08:00
Willie 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.
2026-11-14 02:12:58 +08:00
github-actions[bot]andWillie d04d04fd93 chore(main): release 0.30.7 (#871)
* chore(main): release 0.30.7

* chore(release): synchronize release metadata

* docs: rewrite the 0.30.7 changelog for users

Release Please lists commit subjects. The entry now says what each
change means for users, with the --respect-accepted example, migration
details for install --json, and credit for the reports and fixes.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Willie <egg358358@gmail.com>
v0.30.7
2026-11-14 00:28:55 +08:00
Willie 51089307f8 docs: prepare README and troubleshooting for 0.30.7 (#888)
The 0.30.7 release adds `audit --respect-accepted`, so the README
"Latest" callouts in every language now point to it, and the release's
external reporter joins the contributors list.

An install whose audit cannot run, for example because audit-rules.yaml
does not parse, now fails with "audit scan failed", and --force does not
override it. The troubleshooting page only suggested --force for audit
errors, so it gains an entry for this error in English and the four
translated docs. The zh-Hant audit page also had the new
--respect-accepted flag row left in English.
2026-11-14 00:20:59 +08:00
Willie 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.
2026-11-14 00:03:17 +08:00
Willie 51306f49fa fix(install): log skipped skills and agents (#886)
After #884, an install without --force keeps existing skills and agents
and names them in the --json skipped array, but the operation log
recorded only installed and failed names, so `ss log` could not show
what an install kept.

Record the kept names as skipped_skills for CLI installs and for the
dashboard's install-from-config action, and list them in `ss log`.
The config install starts with an empty list, so the dashboard log
shows no "null" when nothing was kept.
2026-11-13 22:34:40 +08:00
Rusty Shackleford 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.
2026-11-13 21:31:41 +08:00
Willie 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
2026-11-13 15:14:05 +08:00
Willie 40697e03f3 fix(oplog): keep source credentials out of the operation log (#881)
An install source typed as a URL can carry a token in its userinfo or
query, and operations.log stored it as typed, so anyone reading the log
or the dashboard's log view could see the credential (#878).

Redact in oplog.Write, which every CLI and dashboard writer goes through:
the source, oldSource and newSource args lose their userinfo, query and
fragment, and the message loses the same parts where an error echoes
them. The redaction reuses update's redactRepoURL, moved to
install.RedactRepoURL. It now also covers git+https:// and ssh://
passwords, and a source typed without a scheme such as
user:token@host/owner/repo, which install clones over HTTPS.

logInstallOp logged args[0] as the source, which is a flag when one comes
first (install --into team <url> logged "--into"), so the message was
never redacted. It now logs the parsed source.

Fixes #878
2026-11-13 14:50:31 +08:00
Willie f1faa4bdd5 chore: release 0.30.7 (#874)
Release the pending fixes and the audit --respect-accepted addition as a
patch release, as the maintainer requested, instead of the 0.31.0 that
Release Please derives from the feat commit.

Release-As: 0.30.7
2026-11-12 14:11:08 +08:00
Willie 0939eb9ad9 fix(plugin): verify native support only for changes that run a command (#873)
* fix(plugin): verify native support only for changes that run a command

prepareChange probed native command support before applying the
intentional skip rules. When the probe failed under update --all, the
change was marked as a failed target, so the later skip never applied.
An imported Grok plugin always hit this: Grok updates require native
trust, so every update --all exited nonzero even though Grok plugins are
documented as updated natively. #853 patched the same ordering for
imported OMP plugins only.

Run the probe after the skip rules instead, so a skipped change is never
verified, and drop the OMP-specific exemption it made redundant. Host
errors and changes that do run a native command still fail as before.

* docs(plugin): align OMP removal wording and runbook pass criteria

The translated plugin references said OMP removal requires a
scope-matching native registration. English, and the code, only require
that a registration match when one is present; a retry after native
uninstall proceeds from the retained cache. The runbook's Pass Criteria
also did not cover the two scenarios #853 added as steps 4 and 5.
2026-11-12 14:09:10 +08:00
Rusty ShacklefordandWillie 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>
2026-11-12 13:45:55 +08:00
Willie 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.
2026-11-12 11:15:44 +08:00
Willie 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.
2026-11-12 10:40:15 +08:00
github-actions[bot]andWillie 1100047f9c chore(main): release 0.30.6 (#850)
* chore(main): release 0.30.6

* chore(release): synchronize release metadata

* docs(changelog): write user-facing notes for 0.30.6

The generated entry listed commit subjects only. Describe each change by what users see, add CI examples for check --exit-code, and give a migration note for self-hosted servers, which no longer receive provider tokens after #861.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Willie <egg358358@gmail.com>
v0.30.6
2026-11-12 01:26:19 +08:00
Willie 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.
2026-11-12 00:51:55 +08:00
Willie 68a3f52c9d docs(comparison): mention check --exit-code in the Updates row
The row says skills check exits 1 on updates or local changes, while the Skillshare cell listed only check and update, which reads as if Skillshare cannot gate CI on drift. check --exit-code (#865) does that.
2026-11-12 00:37:28 +08:00
Willie 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.
2026-11-12 00:35:40 +08:00
Willie 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.
2026-11-11 23:50:01 +08:00
Willie 9f43310a3d fix(update): repair skill sources recorded before the per-skill source fix (#866)
Before #863, `install <repo> -s <skill>` recorded "<repo>/<path>" as the
skill's source. GitLab, Bitbucket and file:// sources parse that string as
another repository, so every path that parsed the recorded source failed
for those skills: `update` of a single skill, `install <name> --update`,
the dashboard update, and the local-changes diff. #863 only changed what
new installs record.

The record still holds the repository and the path, so RecordedSource
rebuilds the source from them when the written string parses as a
different repository, and the reinstall writes the record back in the
form that parses.

In project mode the config entry that declared the old string follows the
rewritten record, because teammates install from the config. An entry a
teammate changed stays as it is, and so does a record a batch update only
respelled. The config is reloaded first: `update --prune` saves it through
another copy, and saving the stale one brought pruned skills back.

`hub draft` and `hub index` published the old string as it was written;
they now publish the source that installs the skill.

Closes #862
2026-11-11 23:34:43 +08:00
Willie 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.
2026-11-11 23:30:39 +08:00
Willie 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.
2026-11-11 23:17:54 +08:00
Willie 3872cb5525 fix(install): record a per-skill source every host can install again (#863)
* fix(install): record a per-skill source every host can install again

`install <repo> -s <skill>` joined the repository and the skill path with
a single "/". GitLab and Bitbucket URLs have no fixed depth, so the parser
read the result as a longer repository path, and file:// URLs only split
on "//". The recorded string is what a project's config.yaml shares, so
`install -p` on a fresh clone tried to clone a repository that does not
exist.

Whole-repo file:// sources now join with "//", and GitLab or Bitbucket
sources typed without ".git" or a web URL marker join with ".git/". The
other hosts keep their form.

`install --update` still recognises a record in the old form, but only
when its recorded repository and path agree, because on these hosts the
same string can also name a repository of its own. The dashboard's
install dialog matched installed skills by rebuilding the old form, so it
now accepts each form the server writes.

Closes #859

* fix(ui): mark hub results installed under the new recorded source

A hub entry that names a repository and a skill was matched against the
installed skills by an exact source or a "<source>/" prefix. A GitLab or
Bitbucket repository typed without ".git" is now recorded as
"<source>.git/<skill>", so the search row and the preview kept offering
Install, and a second install hit the already-exists warning.

The matcher now accepts the ".git/" join as well. This is the same class
as the discovery list fixed in the previous commit: both rebuild the
recorded source in the dashboard. No other dashboard or Go code matches a
recorded source by prefix.
2026-11-11 23:14:39 +08:00
Willie 11c2f41b80 docs(comparison): re-pin the npx skills comparison to v1.8.1 (#864)
* docs(comparison): re-pin the npx skills comparison to v1.8.1

The comparison and migration pages cited skills v1.7.6. Since v1.8.0
the restore command links restored skills into agent directories, so
the page's statement that it does not was wrong. The page also did not
say that `skills install` with no source is the same restore command,
that matching skills only get their missing agent links, or that
`skills check` exits 1 on updates or local changes.

Re-pin both pages and their four translations to the v1.8.1 tag commit
and correct those statements against its CLI reference. The lock paths
and fields the migration guide names are unchanged in v1.8.1.

* chore: ignore .feature-radar/

The feature-radar skill keeps its tracking notes, including assessments
of other tools, in .feature-radar/ at the repository root. They are
local working notes and should not be committed to the public
repository.
2026-11-11 23:10:46 +08:00
Willie 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.
2026-11-11 22:42:03 +08:00
Willie e317483459 feat(herdr): offer skillshare as a standalone mod (#857)
Preserve the complete Layout while adding a standalone Mod named skillshare. Generate both packages from one canonical mod and protect custom layouts and usage meters during installation and updates. Keep release versions aligned and route native Herdr instructions separately within existing context budgets.
2026-11-11 21:49:34 +08:00
Willie eb3ca528fc fix(test): harden red-team assertions and mutation checks (#856)
Reject invalid audit output and CLI errors before accepting absent findings, including integrity and traversal checks. Require completed mutation runs to fail the single and batch update gates rather than accepting unrelated failures.

Build gate mutations with a private Go overlay and binary so failures cannot leave source or the shared binary weakened. Add regression coverage for assertions, signal checks, and source/binary isolation to every red-team Make target.
2026-11-11 21:40:44 +08:00
Willie 828ba93f27 fix(git): keep a caller's GIT_DIR out of skillshare's git commands (#854)
* fix(git): keep a caller's GIT_DIR out of skillshare's git commands

Git exports GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE and related variables
to hooks that run in a linked worktree. Every git process skillshare
started inherited them, and those variables override the directory the
command runs in. Run from a post-checkout or post-merge hook, skillshare
therefore acted on the hook's repository instead of its own: install's
sparse clone turned on sparse checkout there (a later merge removed every
file outside the skill's path), the remote tree check's `git init --bare`
made it a bare repository, install's reconcile recorded its origin and
branch, and push staged and committed into it.

internal/gitenv builds git commands without the variables that
`git rev-parse --local-env-vars` lists for choosing a repository, work
tree, index, object store or config file. GIT_CONFIG_COUNT and
GIT_CONFIG_PARAMETERS stay, because users pass credentials through them
and install's token auth appends to the existing count. Every git call in
cmd/skillshare, internal/install, internal/git, internal/check and
internal/config now goes through it, and plugin runCommand starts native
CLIs from the same environment because they run git as well. The hooks
service keeps its own stricter filter.

Closes #852

* test(gitenv): fail on new git commands that bypass gitenv

Each git call site converted for #852 is safe only because it goes
through gitenv.Command, and about half have no test of their own. A
future exec.Command("git", ...) would silently bring the bug back, so a
syntactic guard now rejects one outside gitenv, hooks and testutil,
mirroring the sourcefs and sourcewalk ratchets.

The Environ test also checks a lowercase name, since Windows environment
names are case-insensitive, and compares against literal keys so that
removing one from repoVars fails it. The wiki records the rule.
2026-11-11 21:08:47 +08:00