mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 12:23:22 +00:00
fedadbe74babde083261ec82f2272ea730f53d4a
358
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ccc0fbdf74 |
feat(pi): manage individual extensions per target (#350)
* feat(pi): manage individual extensions per target Keep package lifecycle in Plugins while letting global, account, and project Pi targets configure individual extensions with reviewed, lossless changes. Project overrides save only project settings and never grant trust. Bind edits to native version contracts, settings snapshots, source ownership, and discovery; preserve unrelated resources and enforce renewable native locks, stale rejection, and backups. Verify Pi 0.99.2 and 1.0.0 without running extension factories. Simplify configured-state UI and distinguish Skillshare-managed packages from native tool registrations, with localized guidance and regression coverage. Closes #342. * fix(pi): address project extensions review findings Keep exact project delta rules visible when their extension files are missing so users can remove stale rules without changing global settings or trust. Show the project Extensions tab only when its generated Pi target resolves. Cover missing and agents-only projects, absent targets, and another project target with regression tests. * fix(pi): recognize official Windows account launchers Accept pi.cmd and pi.exe account launcher names on Windows, including case-insensitive and native Windows paths, before probing the existing exact-version gate. Preserve POSIX behavior and never probe unrecognized forks or stacked launcher suffixes. Add platform-name and account-gate regressions covering verified, unsupported, and missing CLI versions. Focused race tests, make check, and Windows amd64/arm64 test cross-compilation pass; real Windows runtime remains unverified because the UTM guest is stopped. * fix(pi): align rule removal and backup descriptions Offer Remove rule only for owned exact +/- rules, not project delta globs that the apply path cannot remove. Keep supported glob rows switchable and cover delta and deltaOnly forms with RED/GREEN regressions. Describe retained artifacts as extension-list and file-hash records rather than complete settings backups in English, all four website translations, and the implementation report. * fix(pi): discard records for aborted extension applies Require a validated preview and owned native lock before recording an extension change. Discard only the newly created record if final revalidation, lock ownership, or the atomic settings write fails; retain successful history and propagate cleanup errors with the original failure. Keep discovery revalidation after record I/O so cleanup does not weaken the write-boundary guard. Cover global and new/existing project settings with nine RED/GREEN regressions, including injected commit failures. Align English and translated docs with the retained-record lifecycle. * fix(pi): retain anonymous global packages in projects Keep ordered anonymous registrations separate from the proven-identity map so unsupported query-bearing sources remain visible as redacted read-only packages, rather than being dropped or associated with a project override. Preserve first-global-entry precedence for known identities. Add RED/GREEN coverage for string and object registrations, query/userinfo redaction, project entries, zero-write refusal, ordering, and continued editing of known packages. * fix(pi): deduplicate only proven project identities Exclude unresolved identities from project duplicate tracking. Preserve each anonymous registration as sourceUnknown instead of pretending unrelated query-bearing URLs are the same package. Cover mixed string/object anonymous project sources, redaction and zero-write refusals, retained anonymous globals, and last-project-entry precedence for known packages. Verify known project entries remain editable. * fix(pi): guard unresolved package precedence An unresolved earlier global registration may own a later known package, and an unresolved later project registration may supersede an earlier known entry. Keep those potentially shadowed entries and inherited deltas Unknown/read-only instead of offering edits to ignored registrations. Do not infer identities by dropping credentials or queries. Cover both ordering directions for global, inherited, project-owned, and delta views with RED/GREEN tests. Execute native query identity and dedupe evidence on Pi 0.99.2 and 1.0.0 through core and CLI-bundle contracts, now 28 scenarios and 87 assertions each. Align docs and evidence while retaining independent anonymous entries. * fix(pi): propagate unreadable source ambiguity Treat badSource entries as unresolved instead of letting an unreadable source expose editable later global registrations. Preserve the same uncertainty in inherited globals and before unreadable later project entries. Add twelve global/inherited/project regressions for null, empty, whitespace and invalid UTF-8 sources. Native core and CLI-bundle evidence confirms invalid UTF-8 can decode to and own the same identity as a later valid source on both supported Pi versions; the executed contracts now pass 29 scenarios and 90 assertions. * feat(pi): preserve filtered imports and reclaim stale locks Adopt native object registrations without changing their configured resources. Keep lossless entries in scoped private state, retain current rules across lifecycle operations, restore filters before native installation, and preserve pending retries after failures. Reclaim only unchanged empty directories after the native stale threshold, retaining renewed, replaced, nonempty and non-directory locks. Verify exact supported Pi contracts and keep unsupported cases read-only. * docs(pi): record filtered import verification after branch sync Document the current merged UI test count and repeated checks while retaining the native and visual verification limitations. * docs(pi): clarify stale acquisition exception Keep the lock safety summary consistent with the approved acquisition policy while preserving strict ownership for renewal and release. * fix(pi): keep legacy npm fallback installations unknown A missing user-scoped managed npm root cannot prove a package is absent because native Pi may use a legacy global npm or pnpm root. Keep it read-only without probing host-global state, while retaining missing-state behavior for project npm packages. * fix(pi): preserve project precedence and batch restore ownership Retain empty winning overrides when deleting them could expose older resource filters. Advance filtered restore batches only to exact writes made by the same Apply, while rejecting external changes and retaining failed native retries. Match Pi strict-false autoload semantics instead of treating null as a delta. |
||
|
|
5d269e8e4c |
feat(push): add --pull for two-way sync in one command (#354)
* feat(push): add --pull for two-way sync in one command Users editing skills on several machines have to remember push on one and pull on the other, and a push from a machine that is behind fails until they pull first. push --pull commits local changes, merges the remote with the same merge semantics pull uses, pushes, and syncs the git root scope. A conflict stops before anything is pushed and keeps the local commit; a target sync failure after a successful push is reported separately so the user knows the remote is already updated. It never rebases or force-pushes. commit rejects --pull instead of silently ignoring it, since both commands share the argument parser. * docs(push): document push --pull across guides and translations Cover the new flag on the push reference, the cross-machine sync guide, the quick reference, the daily workflow and the cross-machine recipe, in English and the ja, ko, zh-Hans and zh-Hant translations, plus the built-in skill's sync reference. * fix(push): print the scope's sync command when --pull sync fails A bare 'skillshare sync' retry hint defaults to skills and may pick project mode, so it does not redo an agents, extras, or root sync. Derive both the sync and the hint from one per-scope list. * fix(pull): sync extras for the root git scope The root scope versions skills, agents and extras, but pull and push --pull only synced skills and agents, so merged extras changes never reached their targets. * fix(server): sync extras after a root-scope pull The root scope versions extras too, but the dashboard pull only synced skills and agents, so merged extras never reached their targets. Matches the CLI fix. * feat(ui): add a Sync both ways action to Git Sync Mirrors skillshare push --pull: commit local changes, merge the remote and sync targets, then push, in one click. A pull conflict stops at the existing review before anything is pushed. * feat(ui): confirm Sync both ways and list what it will do Sync both ways commits, merges and pushes in one click, so ask first and show the concrete outcome (files to commit, remote commits to merge, scope, push target, conflict behavior) before changing anything. * fix(ui): make Sync both ways match push --pull It skipped target sync when the pull was already up to date, stopped on an empty remote instead of pushing, and the pull dropped extras warnings. Add alwaysSync and a remote_empty code to /api/pull and surface all extras warnings. |
||
|
|
6e176ddb0c |
feat(extras): share Markdown memory across agents (#349)
* feat(extras): add shared Markdown memory management Store user-managed notes in extras/memory for global and project scopes. Add CLI operations, a nested dashboard browser, versioned edits, and backup-backed deletion and recovery. Connect selected agents with reviewed, marked reading guidance while preserving existing instruction files and routes. Add explicit INDEX linking, conflict draft comparison, and copy-content previews. Document the workflow in five website locales with English screenshots and translate dashboard copy across all eleven locales. Native automatic memory remains separate from this shared file overlay. Validation: make check; 22 UI tests; TypeScript and ESLint; production UI build; six isolated CLI E2E steps; five-locale website build; explicit Claude-write/fresh-Codex-read smoke test. * feat(memory): support dashboard note moves and redesign browser Add version-checked rename and folder moves without replacing existing notes. Back up the old path and preserve content and permissions while refreshing selection, search, index warnings, and backup links. Integrate the two-pane Memory browser and compact agent controls. Refresh all English screenshots and document move/link/history behavior in five locales. Validation: make check, scoped UI tests, TypeScript, ESLint, UI production build, five-locale website build, locale parity, and visible Chrome workflow checks. * fix(memory): recheck reviewed files before committing changes Preserve external edits detected after note backup or draft preparation, and create new notes exclusively. Revalidate each guidance file before writing, report stale partial failures, and correct the built-in move/rename documentation. * fix(memory): repair initialization and preserve note recovery scope Detect missing starter files before dashboard note creation and refresh the index after initialization. Honor requested backup paths, include external project memory sources in recovery scope, and log initialization failures after partial mutations. * fix(memory): protect guidance creates and match Windows history paths Create new reviewed instruction files exclusively to preserve competing writes. Match Windows history links with native backup paths while keeping POSIX names and backup API paths intact. * fix(memory): require configured extra for external backup access Keep project backup scope inside the repository unless a valid memory folder extra enables its external source. Cover listing, version preview and restore denial without changing configured-source recovery. * fix(memory): lock backup scope validation through restore Validate project memory backup access under the restore write lock so concurrent extra deletion cannot revoke access between validation and writing. Hold read locks across scoped backup reads as well. |
||
|
|
7043ca3ad2 |
fix(windows): stop foreground children when skillshare is terminated (#343)
Windows does not stop the processes a terminated process started, so killing skillshare mid-pull left git, its ssh command and hooks running. This covers plain runs and the hidden-console relaunch from #341. skillshare now puts itself in a kill-on-close job at startup. Processes that must outlive it (the `ui start` server, the restart helper, browser, file manager, editor) start through childproc.StartDetached, which allows breakaway only for that one start. The job otherwise forbids breakaway, because the MSYS runtime behind Git for Windows' sh.exe breaks every child away from a job that allows it. The relaunched copy shares the job and ends it if the launcher is terminated. Inside a job that forbids breakaway (Task Scheduler) skillshare does not bind its children, since detached processes could not leave; the task's own job stops them when the task ends. The e2e script gains -Cancel/-SkipWindows checks, and the runbook records the expected results for both contexts. |
||
|
|
1a1eeee844 |
fix(check): compare project-relative local sources and record install layout (#337)
* fix(check): compare project-relative local sources and record install layout Project installs record a local source as typed (./vendor/skill), relative to the project root, so check skipped them. Resolve them against the project root in both the CLI and the dashboard. The copied shape of a local install was inferred from its file hashes, so a CLI install whose source held only SKILL.md looked like a dashboard collection-root install: a child skill added at the source later was neither reported by check nor copied by update. Record the layout (skill-file or directory) at install time and keep the hash heuristic only for entries written before the field existed. * fix(install): let a recorded layout decide the update shape without hashes An entry whose hashing failed at install time still knows what was copied; returning false there would turn a SKILL.md-only update into a full copy. |
||
|
|
f28e5e23f4 |
fix(install): keep local installs updatable from any directory and in shape (#336)
* fix(install): keep local installs updatable from any directory and in shape Follow-ups to local-source change detection (#334): - Global installs recorded a relative local path as typed, so `update` and `check` resolved it against whatever directory they ran in and failed with "source path does not exist". Global CLI and dashboard installs now record the absolute path. Project mode keeps the path as written, because .skillshare/config.yaml is shared across machines. - The dashboard installs the root of a directory that also holds child skills as its SKILL.md alone, but `update` re-copied the whole directory, pulling in child skills and unrelated files. Updates now keep that shape. The detection is shared with `check` so both agree on which files belong to the install. * fix(install): never narrow a whole-directory update to SKILL.md alone The SKILL.md-only shape was inferred from a child skill in the source that the recorded hashes lack. A whole-directory install whose source gained a child skill later matched that too, so `update` replaced it with SKILL.md alone and deleted its other files. Decide from the recorded files instead: only an install that recorded SKILL.md alone keeps that shape. |
||
|
|
9847f59a3e |
feat(check): detect changes at local install sources (#334)
* feat(check): detect changes at local install sources
Skills installed from a local path (for example a skill shipped inside an
app bundle) could already be refreshed with `update`, but `check` always
reported them as "local source", so users had no signal that the source
had changed after an app update.
`check` now re-hashes the files at the recorded source path and compares
them with the hashes stored at install/update time. It reports
update_available on a difference, up_to_date on a match, and an error
naming the path when the source is gone. The path is resolved the same
way `update` resolves it before re-copying, so a successful update always
brings the status back to up_to_date. The CLI and both Web API check
handlers share the comparison in internal/check.
Refs #206
* fix(check): avoid false local-source updates and show check errors
Review follow-ups for local-source change detection:
- The dashboard installs the root of a directory that also holds child
skills as its SKILL.md alone, so hashing the whole source reported
update_available right after a clean install. Compare only the files
such an install copies, recognized by recorded hashes that contain none
of the child skills present in the source.
- A relative source path resolves against the cwd of the install, which
is not recorded, so checking from another directory reported a missing
source. Relative sources are no longer compared.
- The dashboard dropped the new check `message`, so a missing source only
showed a generic "Check failed". Carry it into the status tooltip.
* revert: restore video files accidentally removed in
|
||
|
|
80ac109f72 |
fix(sync): show unmatched include warnings in every sync view (#328)
The unmatched include warning from #326 was written straight to DiagOutput. The dashboard sync never showed it because DiagOutput is the server's stdout, and an interactive CLI sync could redraw its progress area over it. Return the warnings with the merge and copy results so SyncSkillTarget adds them to the target's warnings, which both the CLI and the API already report. Prefix them with the target name, since the API returns one list for all targets. A top-level skill name has no path separator, so the suggestion cut off its first character and suggested "alpha" for a typo like "lpha". Compare the whole name in that case. Refs #325 |
||
|
|
1a2389dea2 |
feat(hooks): manage Git config hooks (#310)
Git 2.54 added named config hooks, but keeping their registrations and helper paths consistent across machines still required manual config edits. Bring them into the same preview, sync, and recovery workflow as Agent hooks. - Global and project scope, with linked worktrees sharing the common dir - Portable helper files, collision detection, and ownership tracking of generated files and include.path entries - Backups and restore preserve unrelated settings and conditional includes - Management never executes hooks; Git below 2.54 is reported as inactive while outputs are still generated - CLI/API inventory, raw YAML editing in the dashboard, localized docs |
||
|
|
ffabe1a86a |
feat(ui): set backup retention limits and delete all backups
Target folder backups were capped at a fixed 10 snapshots and 500 MB, and the dashboard could only remove them one at a time. Users with larger targets or little disk space had no way to tune either. The global config now takes backup.max_count and backup.max_size_mb (0 = no limit); sync, the dashboard's sync and backup --cleanup apply them, while the 30-day limit stays fixed and project snapshots keep the defaults. The Target folders tab shows the limits in its toolbar, opens a panel to change them, and adds Delete all behind a confirmation. File, MCP and Hooks backups are not touched. |
||
|
|
73c4a8d27e |
feat(ui): resolve Git pull conflicts across computers
Guide diverged repositories through pull-and-merge or commit-and-pull before pushing. Compare conflicting file versions in the dashboard and require explicit choices tied to the reviewed revisions, while preserving both histories and automatic metadata merging. Cover previews, modify/delete conflicts, stale and invalid choices, binary and large files, and dry-run behavior. Add an isolated preview fixture, verification runbook, translations, and documentation. Validated with devcontainer make check, targeted Git API and UI tests, UI lint/build, website build, React Doctor, and a real isolated UI pull-resolution-push flow across all four themes. |
||
|
|
aefc9ea0e4 |
feat(hooks): support account targets in global bindings (#308)
Additional Claude, Codex and Pi homes currently require hand-written hooks. Resolve declared global account targets through their Agent and config_dir, while retaining account names in sync, import, inventory and backups. Preserve ownership when a home moves or disappears, protect cleanup and restore against directory aliases, and keep plain Agent defaults when an environment override points at an account. Update dashboard, validation, schema and localized documentation with regression coverage. Co-authored-by: Willie <egg358358@gmail.com> |
||
|
|
886e3672a2 |
feat(plugin): run a compatible CLI for an account target
Pi forks such as omo keep Pi's directory layout and commands but ship their own executable, so an account target pointed at one still ran `pi` for plugin commands. A shell alias cannot help, since Skillshare runs the CLI without a shell. An account target can now set `cli` (or `target add --cli`) to a name on PATH or an absolute path. Pi accounts also export SENPI_CODING_AGENT_DIR and OMO_CODING_AGENT_DIR, which omo reads before PI_CODING_AGENT_DIR. A missing CLI fails instead of falling back, and a missing working directory is no longer reported as a missing CLI. Refs #307 |
||
|
|
6fbb5e109b |
feat(ui): add Git Sync discard changes
Let users discard uncommitted source changes after confirmation, with dry-run support. Restore tracked files to HEAD and remove untracked files while preserving ignored files, nested repositories, and root-scope config.yaml. Guard against ancestor repositories and repositories without a first commit. Cover the API and confirmation flow with regression tests and sync all UI locales and Git Sync documentation. |
||
|
|
c327a26e30 |
feat: native hooks, MCP tool policy and Pi built-in MCP (v0.23.0) (#304)
* feat(hooks): manage native hooks across agents
Add global and project hook management for ten coding agents with native
format adapters, explicit ownership, revision-guarded synchronization and
selective backup/restore. Preserve unrelated native configuration and leave
hook execution and trust decisions with each agent.
Expose CLI commands and completions alongside dashboard import, editing,
native preview, target/project views, synchronization and backups. Localize
messages and document the workflows across supported locales.
Validation: devcontainer make check, full dashboard Vitest suite,
TypeScript/Vite build, scoped ESLint, isolated CLI lifecycle and real UI
acceptance. Native agent hook execution was not tested.
* feat(mcp)!: sync Pi only through its built-in MCP
Pi could be synced through three different mechanisms (built-in MCP,
pi-mcp-adapter, or the extension file), chosen per server. Mixing them
inside one scope was an error users hit easily, and the adapter and
extension files drifted from what Pi itself reads. Pi's built-in MCP
now covers what the other modes offered, so every Pi server is written
to ~/.pi/agent/mcp.json or <project>/.pi/mcp.json.
Existing setups migrate on the next sync: entries Skillshare wrote to
mcp-adapter.json are removed through the ownership ledger, extension
entries are rewritten in place, and hand-written entries stay put.
piExtension and piOptionsPrune still load (with a notice) so old
configs keep working, and are dropped on the next save. directTools is
kept but no longer rendered, since only the adapter reads it.
Pruning unchanged fields Skillshare wrote earlier is now always on,
the per-project off switch no longer applies to Pi, and the removed
--pi-extension and --pi-options-prune flags explain the change instead
of failing as unknown. Import still reads mcp-adapter.json read-only so
servers kept only there can be brought over.
BREAKING CHANGE: --pi-extension and --pi-options-prune were removed;
Pi servers are always synced to Pi's built-in MCP file.
* fix(mcp): load Pi switches and adapter options left from before 0.23.0
Phase 1 made Pi sync only through its built-in MCP, which left two
upgrade paths broken or misleading:
- A project entry with disabled: true that selected Pi used to work in
adapter mode, but now fails every sync with "pi cannot turn off".
Loading now takes pi (and Pi accounts) out of such an entry with a
notice; an entry left with no targets stays and turns nothing off, so
an explicit empty list is now valid for a switch. Saving a new switch
for pi still fails.
- piOptions keys that only pi-mcp-adapter reads (lifecycle, idleTimeout,
approveTools, ...) were copied into Pi's built-in mcp.json, where
nothing reads them. Loading drops them with a notice naming each key,
and saving new ones is refused. Keys neither Pi nor the adapter
documents still pass through. includeTools/excludeTools are left for
the tool policy change, which converts them.
Both changes rewrite the YAML node on load, like the phase 1 legacy
fields, so the next save persists them.
* feat(mcp): portable tool policy per server
Users need one place to say which of a server's tools the model sees,
instead of Pi-only adapter options that Pi's built-in MCP no longer
reads. A server's tools{expose, allow, deny} is rendered per Agent:
Pi gets exposure and an ordered toolExposure, Codex gets
enabled_tools/disabled_tools, Copilot gets its tools list. Parts an
Agent cannot hold (OpenCode and Kilo have no per-server field) are
named in the plan and by mcp check rather than dropped silently.
directTools and the adapter's includeTools/excludeTools are converted
on load and on import, so existing configs keep their behavior; the
--direct-tools flag is removed with a pointer to the new flags.
check --live now reports tool names so the dashboard can suggest them.
Refs #140
* feat(ui): drop the Pi mode, prune switch and Direct tools from MCP
Since 0.23.0 Pi syncs only through its built-in MCP and the API no longer
returns piExtension, so the server dialog showed an empty "Pi MCP mode"
select, links to pi-mcp-adapter and pi-mcp-extension, a prune switch the
backend ignores and adapter-only Direct tools. Toggling Pi also opened a
mode setup that no longer exists, and Pi was still offered as an Agent
that can turn a global server off per project, which the backend refuses.
Pi now shows only tool exposure, its other settings and one link to
Pi's MCP docs. The import dialog still sends piExtension, but only to
pick between Pi's mcp.json and the legacy mcp-adapter.json, which the
listed path already tells apart. Settings the config still carries from
before 0.23.0 are explained once on the MCP page from the source's
notices, worded in the dashboard's language.
* fix(ui): clarify hook takeover and localize MCP actions
Identify global and project hooks in sync previews, show full takeover guidance, and link project conflicts to their Hooks tab. Translate MCP pending actions using the existing locale keys.
* feat(mcp): name unapplied tool policy parts in the render preview
The dashboard's server editor needs to say which Agents cannot follow
part of a tool policy before the server is saved. The plan's notices
only cover saved servers, so each rendered target now carries the gaps
from toolPolicyGaps instead of the UI re-implementing the per-Agent rules.
Refs #140
* feat(ui): edit the portable MCP tool policy in the dashboard
Saving a server from the edit dialog rebuilt it from the form and
dropped its tools policy. The draft now carries tools, and a Tools
section edits exposure, allow and deny for every Agent at once. Tool
names can be loaded on demand from the saved server through the live
check, and each selected Agent that does not apply a part is named from
the backend's render preview.
Pi's other settings flag the adapter-only keys and the exposure fields
that Tools now owns, so the form refuses what the backend refuses with
a message that points to Tools. Rows show a short policy marker, and the
plan's tool policy notices are localized on the MCP page.
Refs #140
* feat(mcp): save the config without retired settings on sync
Notices about settings 0.23.0 retired (piExtension, piOptionsPrune,
adapter-only piOptions, Pi switch entries, directTools/includeTools/
excludeTools) only went away when the user happened to save MCP settings.
Sync never rewrote the source, so most users kept seeing them.
Loading already converts those settings in memory, so a sync now writes
the converted config back (global, per project, external source, CLI and
dashboard), after keeping the previous content in the file history.
Dry runs write nothing, and a failed save is reported after the Agent
files are applied. The plan carries `migrates`, so the dashboard's sync
runs MCP even when no Agent file changes.
The CLI notices are one short line per kind with each server named
once, and a sync prints the file it updated with its backup. The
dashboard no longer shows these notices: sync handles them with nothing
for the user to do, and tool policy gaps stay in the server dialog.
* fix(ui): catch MCP tool policy mistakes before saving
The empty "Other Pi settings" box showed a toolExposure example even
while Tools had a setting. That example is exactly what the dialog
refuses in that state, so it read as a saved value that went unflagged.
The example now leaves toolExposure out while Tools is set.
A Deny list that removes every tool Allow keeps was only refused by the
server, in English with raw field names. The Tools section now says so
in the user's language and disables Save; the server check stays.
* fix(ui): move Pi settings help into info tooltips
The Pi block stacked four lines of help under the exposure select, one
of them in raw config words (entry, toolExposure), which pushed the
fields apart. The help now sits behind keyboard-focusable info icons:
one on a new "Pi settings" heading, which keeps the official docs link
beside it since a tooltip cannot hold a link, and one on the exposure
label with a shorter, plain explanation. The line saying Tools sets the
exposure stays, because it explains why the select is locked.
* docs(mcp): describe Pi built-in only and the tool policy
0.23.0 dropped the Pi modes, the prune switch and directTools, and added a
portable tools policy (#140, #143). The MCP reference still told users to
pick pi-mcp-adapter and pass flags that now fail, and said nothing about
what the first sync does to an old config or which Agents apply which part
of a tool policy.
The reference now covers the tools field and flags with a per-Agent table
linked to each Agent's docs, the dashboard Tools section, Pi's built-in
files and options, and an upgrade section: what the first sync converts,
which adapter entries it removes, the config save with its migrate backup,
and what replaces each removed flag. The how-to, dashboard and backup pages
follow.
* docs(skill): teach the built-in skill the Pi and tool policy changes
Agents using the skill would still pass --pi-extension and --direct-tools,
which fail since 0.23.0, and would not know the tools policy or what a sync
does to a 0.22 Pi config. The MCP reference now matches the CLI; the
description is unchanged and stays within its size limit.
* test(mcp): cover Pi migration and the tool policy in the runbook
The runbook still exercised pi-mcp-extension, pi-mcp-adapter and
--pi-options-prune, all removed in 0.23.0. New steps check Pi built-in
cleanup, the first-sync conversion of a 0.22 config with its migrate
backup and untouched hand-written adapter entries, the removed-flag
messages, and what each Agent receives from one tool policy.
* docs(wiki): record the 0.23.0 MCP Pi and tool policy milestone
Keeps the design decisions and evidence limits of #140 and #143 (the
ledger-driven migration, the migrate backup, per-Agent translation rules)
where later work can find them without reading five phase reports.
* docs(i18n): mirror the Pi built-in and tool policy docs in four locales
The zh-Hant, zh-Hans, ja and ko MCP pages still described the removed Pi
modes and flags, and linked to anchors that no longer exist in English.
They now carry the tool policy, Pi, and upgrade sections with the English
anchors and dashboard labels taken from each locale's UI strings.
* feat(mcp): probe an unsaved server definition for the dashboard
Loading tools in the server dialog could only probe the saved config, so
editing a URL and clicking load tested the old address and surfaced a raw
"connection refused" for a server the user was already fixing. A new server
could not load tools at all until saved.
POST /api/mcp/probe runs the existing live probe on the definition in the
request, resolving env and header references as the saved-server check does,
and never saves or syncs. Failures carry an error kind (connect, timeout,
auth, protocol, command, unknown) so the dashboard can explain them in the
user's language and keep the raw text as detail.
* fix(ui): load MCP tools with the dialog's current settings
The Tools section now probes the connection as the form describes it, so
an edited URL or command is what gets tested and a new server can load its
tools before saving. Probe failures read as short localized messages with
the raw error behind Details instead of the probe's English text.
Loaded names are dropped when the connection fields change, since they may
no longer be this server's tools; editing Allow or Deny keeps them.
* docs(mcp): say Load tools probes the dialog's current settings
The MCP and UI references said the button starts the saved server and that
a new server must be saved first, which is no longer true.
* feat(ui): pick MCP tools from a loaded checklist
Typing exact tool names into allow/deny chip inputs made users guess
names the server already knows. The Tools section now loads the
server's tool list and lets users tick which tools the model gets;
unticking writes the exact name to deny, re-ticking removes it (and
adds it to a non-empty allow list), and rows removed by a deny
wildcard are locked with the rule named in a tooltip.
Wildcard and unlisted rules stay editable as chips in the same box,
and an outcome summary tells users which agents honor the list,
which honor it only partly, and which cannot filter tools at all, so
nobody assumes a filter applies where it does not.
* refactor(mcp): drop tools.expose in favor of Pi's own exposure
tools.expose only ever meant something to Pi, yet it sat in the
cross-Agent tool policy, locked Pi's exposure select whenever a policy
was set, and produced an "expose" gap for every other Agent. Pi's
exposure mode now lives only in piOptions.exposure: it can sit next to
a tool policy (only toolExposure still conflicts, since the policy
writes it), allowed tools inherit it, and pi-mcp-adapter's directTools
migrates to it. The flag and field were never released, so they are
removed without a shim.
The dashboard now describes a policy in plain words ("2 tools
excluded") instead of the old "2 denied" shorthand, shows Pi's
exposure on the server list in words, hints that Enter adds a rule,
and no longer leaves "{}" behind when an exposure is set and then
cleared.
* fix(hooks): make import a takeover and plans say what changes
A hands-on trial showed several rough edges in hooks management:
- Importing one per-event candidate such as claude-stop merged every event
of the file into the entry, so unrelated hooks became managed.
- An imported hook then conflicted on the next sync as an "identical
unmanaged hook" until --replace, although importing it was the takeover.
- Narrowing an entry was reported as "remove" of the whole file although
only one event left it, and plans gave no event-level detail.
- A misspelled event such as Stopp was accepted silently and would never run.
- Rewriting a compact settings.json produced half compact, half indented
JSON and left an empty hooks key Skillshare itself had added.
A name that matches a candidate now picks only that candidate. Saving an
import (Mutation.adopt) records the identical native registrations as the
entry's own even without sync, so the next sync adopts them in place; edits
made outside Skillshare afterwards still conflict. Changes carry added,
updated and removed events, and "remove" is reserved for an entry that leaves
the file. A per-Agent catalog of documented events, from each Agent's
official hooks reference, drives advisory plan warnings and is served at
GET /api/hooks/catalog. JSON edits keep the file's compact or indented style
and drop a hooks key once Skillshare empties the one it created.
* style(ui): keep clean theme switches and picked cards black and white
The clean theme is black-and-white only, so its on switches and picked
cards use ink instead of the green ok and blue accent colors. The playful
theme keeps its own colors.
* feat(hooks): return full file texts from the hooks preview
The dashboard can only show which Agent files a hooks change touches, not
what changes inside them. POST /api/hooks/preview now also returns files[]:
each native file the plan would change, with its current text and the exact
text sync would write, taken from the same plan apply writes from. Other
plan responses stay unchanged, and the route keeps the localhost-only guard.
* feat(hooks): manage Antigravity and Antigravity CLI hooks
Antigravity and its CLI (agy) are skills targets, but their hooks could
not be managed. Both read the same files, ~/.gemini/config/hooks.json and a
project's .agents/hooks.json, so they are one hooks Agent with
antigravity-cli and agy as aliases.
Antigravity's hooks.json maps hook names to blocks of events rather than
one event map. Each Skillshare hook becomes one block named after it, held
as a single owned element, so ownership, adoption, conflicts and restore
work as for the other Agents. Keeping the block's own name lets an import
take the block over in place; a same-named block Skillshare does not own is
a conflict until it is imported or replaced. Disabled blocks are not offered
for import, and edits keep the file's compact or indented style.
The event catalog lists the documented events (seconds timeouts), import
problems are no longer cleared before validation, and the schema and docs
cover the new Agent.
* fix(hooks): replace an edited registration in place
Acceptance found that --replace on a registration Skillshare owned but
someone edited outside appended a second copy: the edited one stayed in the
file, now unmanaged, next to the replacement. When the element at the
record's last written position is owned by no one, replace now overwrites it
there, for both an edit with --replace and 'hooks sync NAME --replace'.
Writing into a one-line array such as "Stop": [{...}] also mixed one-line
and indented layouts; elements written there now stay on that line. Import
candidate lists print an explanation shared by several rows once instead of
on every row.
* feat(ui): rebuild the hooks page around targets, the catalog and real diffs
Editing a hook meant typing event names from memory, repeating each
target by hand and saving JSON the dashboard could not check, and the
preview only listed actions without showing what would change in a
file. The backend now publishes each target's documented events and the
full before/after text of every file a preview touches, so the UI can
guide the whole flow instead of trusting free text.
- Event fields pick from the catalog with descriptions, and show the
tool filter and timeout unit only where the target has them.
- An empty target tab offers to copy another target's commands, mapping
events to their closest equivalent and converting timeout units, and
says when an event has no counterpart.
- Native JSON gets completion, formatting and linting with the line and
a suggested event, and never drops invalid text when switching back to
fields; Cmd/Ctrl+S saves without syncing and Esc asks before
discarding edits.
- The preview shows one card per file with event-level changes and a
folded line diff that marks the user's own hooks as untouched.
- Import preloads each target's unmanaged hooks, saves only the checked
ones with adopt so sync does not duplicate them, and keeps pasting as
a secondary path.
- Antigravity joins the managed targets, the wording says targets
throughout, and the remove dialog no longer contradicts itself.
* fix(hooks): keep key order and separators when replacing an element
Replacing a registration in place re-encoded it from a Go map, so its keys
came out sorted, and on a one-line array it was minimized without the
spaces the line used: [{"hooks": [{"type": "command", ...}]}] turned into
[{"hooks":[{"command":...,"type":"command"}]}]. The whole line then showed
as changed and read as a rewrite of the user's style.
A replaced element now keeps the replaced one's key order at every depth,
with new keys at the end, and elements written on a one-line array use the
line's own spacing after colons and commas.
* feat(hooks): stop managing a hook while keeping its entries
Removing a hook from the source always queued the removal of its native
entries on the next sync, so there was no way to hand a synced or adopted
hook back to the user. MCP already has this as `remove --keep-files`.
`hooks remove NAME --keep-files` (and `unmanage` in the API mutation)
removes the entry and forgets its ownership records in that scope, so sync
neither removes nor updates what it wrote; the entries show up as unmanaged
and importable again. It is rejected with --sync, like MCP.
The dashboard remove dialog adds "Stop managing" and now says what each
choice does to the target files, including that "Remove from source only"
still deletes the entries on the next sync. Its backup note is neutral and
the dialog is wider to fit the diff.
* fix(mcp): warn that Pi's built-in MCP needs Pi 0.99.0 and no old extension
The first sync after upgrading moves Pi servers off pi-mcp-adapter and
pi-mcp-extension into Pi's mcp.json. A user still on Pi before 0.99.0
silently loses every server, because older Pi does not read that file, and
Pi's docs say an installed extension that registers /mcp replaces the
built-in MCP. Nothing told them either.
The plan now adds one notice, shown by preview, sync and --json, when it
removes an entry Skillshare wrote to mcp-adapter.json, rewrites an owned
entry in pi-mcp-extension's format (the transport field), or the config
still has settings only the extensions read. The ledger check covers a
config that owns adapter entries without saying piExtension.
* docs(mcp): say what Pi needs before the first 0.23.0 sync
The upgrade section described how the config changes but not the two
things a user must do in Pi: run Pi 0.99.0 or later, and remove
pi-mcp-adapter or pi-mcp-extension, which Pi's docs say replace the
built-in MCP. It now shows the sync warning, lists every dropped adapter
option, and says a disabled entry no longer turns a server off for Pi in
that project. The import paragraph claimed sync never changes
mcp-adapter.json; it removes the entries it wrote there.
* fix(ui): make hook diffs, editors and the hooks rail readable
Supervisor and user trial of the rebuilt hooks page found diffs that
read as "we will touch your hook", an editor too small for real hooks,
and text cut short in the rail.
- Diffs: removed lines red and added lines green through new diff theme
tokens (the one colour exception in the clean theme), removals before
additions, lines differing only by a trailing comma or whitespace kept
as context, long lines wrapped, and the "left as is" marker on its own
line. An adopt-only card says the file is unchanged.
- Editors: native JSON and code editors expand over the dialog and back
as the same editor, so lint, completion, format, the error count and
Cmd/Ctrl+S keep working; Esc closes completion first. The invalid-JSON
explanation sits above the editor.
- Dialogs are 880px like MCP's.
- Main page: full target paths wrap under the name with no inner scroll
box, the sync card shows the target file, empty descriptions are
hidden, the unmanaged note avoids an orphaned character, and the row
menu uses a hooks-specific "each target" label.
- Import names follow the CLI (<target>-<event>) or a script's basename.
* feat(ui): show MCP plan notices before a sync
The API returned the plan's notices, but no dashboard view showed them, so
dashboard users never saw that the 0.23.0 sync rewrites their config or
that Pi's built-in MCP needs Pi 0.99.0 and no old extension. The MCP sync
dialog and the Sync page now list them, translated through mcp.notice.*
keys; a notice the UI does not know is shown as the server sent it.
* fix(install): default CLI installs to the user-local bin directory
Use ~/.local/bin so ordinary script installs and upgrades do not require administrator access. Preserve INSTALL_DIR overrides and existing installations, verify the installed binary directly, and show PATH setup only when needed.
Add offline installer regressions and align installation guidance across all five documentation locales, including automation PATH setup.
Validation: seven offline installer cases, make check in the devcontainer, all five website locale builds, and AI context checks passed.
* fix(ui): let stop managing succeed and open the source config from the header
Stop managing sent a mutation whose plan differs from the removal preview the
dialog had loaded, because the server forgets the ownership records first, so
the revision never matched and every attempt failed as stale. Both the hooks
and MCP remove dialogs now preview that mutation before saving it; it writes no
target file, so there is no diff to review. Its toast also says the entries
stay in the files instead of "Removed".
The source path line under the lists took space most people never read. A
config.yaml button in the page header now shows the full path on hover and
opens the Config page editor; a separate sources.mcp file has no editor there,
so that case copies the path instead.
The Pi chip on a server row no longer mentions other Pi settings.
* test(server): replay the dashboard's hooks and MCP requests against the handlers
UI tests mock the API with one fixed revision, so a dialog that saves with a
revision from the wrong preview passed every vitest while "Stop managing"
failed in real use. These tests send the exact mutation JSON and preview
revision each dialog uses (remove, stop managing, edit, toggle, takeover,
import/adopt, restore, global and project sync) in global, hooks.projects
or mcp.projects, and project-mode scopes, and pin that hooks refuses an
unmanage saved with the removal preview's revision.
* fix(ui): show comma-only line changes in the hooks diff
A line that only gained or lost a trailing comma was shown as unchanged
with its new text, so the preview hid a real byte change to the file.
Lines still align ignoring the comma, so an added sibling does not shift
unrelated lines, but a differing pair now shows as removed and added,
removals first within each change. The user's own event keeps its
"left as is" note on the new line.
* fix(hooks): name the events a Copilot hook file changes
Copilot keeps each hook in its own file, so its plan changes carried no
events and the preview card showed only the action while every other
Agent listed "+ SessionStart" and the like. The planner now compares the
file's hooks map before and after the write and reports added, updated
and removed events the same way shared files do.
* feat(ui): open config.yaml at the section the header button came from
The config.yaml button on the Hooks and MCP pages opened the editor at
the top, leaving the user to scroll for the part that page manages. It
now links to /config?section=hooks or ?section=mcp, and the Config page
puts the cursor on that top-level key and scrolls it into view once the
file is loaded. A config without the key opens at the top as before.
* fix(ui): say what hooks and MCP dialogs will really do
Trying hooks across eight targets showed several places where the
dashboard hid or misstated the outcome:
- Remove and sync writes every pending change of the scope, but the
hooks and MCP remove dialogs only named the removed entry; they now
name the other hooks or servers that go out with it.
- With more than three targets, each remove choice spelled out every
target; it now gives the count.
- Preview cards shrank to their header in a long list and hid the diff.
- A hook's summary listed SessionStart and sessionStart as separate rows
with no hint of which target runs which; rows now merge case-only
differences and show their targets' icons.
- Save and sync used the same toast as a plain save.
- The copy panel promised the closest events even when a target had
none; it now says those events must be picked by hand.
- The Hooks rail's expandable target rows had no accessible name.
* fix(ui): pair hooks diff lines only at the same indentation
Diff lines were aligned ignoring leading whitespace, so appending an
event paired the file's closing braces with braces inside the new block.
Once differing pairs show as removed and added, that turned one comma
change into a run of removed closing braces. Only the trailing comma is
ignored now, so the diff shows the comma pair and the added lines.
* fix(ui): explain each hook removal choice on its own button
The three consequence lines sat in the dialog body, away from the buttons
they describe, and made the dialog long when a hook reached many targets.
Each explanation now shows as a tooltip on its footer button, on hover and
keyboard focus, and is wired through aria-describedby for screen readers.
Tooltip placed button-anchored tips that did not fit below using the
cursor offset, so a two-line tip covered the buttons; it now flips above
the anchor. It also shows nothing without content, which lets the dialog
keep its buttons mounted while the preview loads.
The CJK strings dropped the space between the target text and the
particle, which read as "8 個目標 的".
* fix(hooks): delete the files and folders a removed hook leaves empty
Syncing a hook to an Agent whose hooks file did not exist, then removing
it, left shells behind: `{}` in Claude, Codex, Gemini, Qwen, Droid and
Antigravity files, `{"version":1}` for Cursor, and empty folders such as
~/.copilot/hooks and ~/.pi/agent/extensions. They look like user
configuration and confuse the next import or review.
The ledger now records the shared files Skillshare created and the
folders it made for its outputs. When removal leaves a created file with
nothing but that skeleton, the plan deletes it and says so, and the file
diff shows the deletion. Files and folders that existed before, settings
or comments the user added, and non-empty folders all stay. Apply checks
the skeleton again, so settings added after the preview keep the file.
* fix(hooks): note Copilot's folder trust and use Pi's current package
Running Copilot CLI against a synced project showed that .github/hooks
is skipped until the folder is in trustedFolders, while COPILOT_HOME
hooks run anyway; the Copilot note was the only command Agent note that
did not mention trust. Pi's extension docs now import ExtensionAPI from
@earendil-works/pi-coding-agent, so the hook template follows them. The
old name still loads because the import is type-only, but editors no
longer resolve its types.
* test(hooks): run synced hooks in real Agent CLIs
Unit tests only prove Skillshare writes the native files we believe are
right. This runbook syncs a marker-writing hook for each Agent, starts
the real CLI once per scope with a throwaway HOME and fake credentials,
and checks the markers, so a format or location mistake shows up as a
missing marker. Antigravity and Cursor check credentials before any hook
runs; the runbook lists how to confirm them by hand.
* fix(hooks): write the hooks section in block style
yaml.v3 encodes an empty mapping as flow `{}`, and entries added to it
inherit that style, so the first hook saved after the section was emptied
landed on one unreadable line in config.yaml. The section is now expanded
before it is written, like the MCP section, which also unfolds entries an
earlier save left on one line.
* fix(ui): let Beautify unfold nested one-line YAML
Beautify kept flow collections as written, so a hooks or MCP section
squeezed onto one line stayed that way and the button reported nothing to
change. It now expands flow collections that nest others, and everything
inside them, while short lists such as `targets: [claude, codex]` stay on
one line. Saving still keeps the user's flow style.
* fix(ui): show hook targets once and light them up per event
Each event line repeated its own row of target icons under the header's
icons, and two rows of logos stacked on the right read as clutter. The
header now shows the targets as one overlapping stack, and hovering an
event line fades the targets it does not run on. Screen readers still hear
each line's targets.
* fix(ui): document the hooks section in the config editor
The field panel labelled every key under hooks as an unknown field, which
suggested the section was a mistake. It now explains hooks, its entries,
bindings, events, code, files and projects like the MCP keys.
* docs(hooks): describe the config editor and Copilot folder trust
The hooks page now writes its section in block style, opens the config
editor at hooks:, and the field panel and Beautify understand the
section; none of that was documented. Running Copilot CLI also showed that
project hooks in .github/hooks load only in a trusted folder, which the
destinations section did not say.
* docs(changelog): add 0.23.0 entry
Records native hooks, the MCP tool policy, the dashboard work around both,
and the Pi built-in MCP breaking changes, so users upgrading from 0.22.2
know what moves on their first sync.
* fix(server): validate hooks when the config editor saves
The config editor kept the hooks section as an opaque node and never ran
the hooks checks, so a malformed binding saved successfully and then broke
the Hooks page and `sync --all` until the YAML was repaired by hand. A
project config could also gain `hooks.projects`, which only the global
config may hold. Saving now rejects both with the same message sync gives.
* fix(hooks): keep an Antigravity block's name when importing it
An Antigravity hook is the named block in hooks.json. Importing one under
another name, through `hooks import --from agy NAME` or a renamed row in the
dashboard, planned a new block and left the original unmanaged, so both
ran. Such a takeover is now a conflict that asks for the block's own name,
and the import dialog keeps that name fixed for Antigravity rows.
|
||
|
|
3355b4f218 |
feat(mcp): add subject to check findings and a check endpoint
The dashboard needs to phrase each finding in the reader's language, so a finding now names what it is about (variable name, command, or host) in a separate subject field instead of only inside the English message. The value of a variable is still never included. GET /api/mcp/check serves the same report as `mcp check --json` so the MCP page can run the check on demand. It is read-only, writes no oplog entry, returns 200 when findings include errors, and accepts ?dns=0 to skip host lookups. |
||
|
|
c4ab37a0a2 |
feat(mcp): support Pi built-in MCP
Support Pi 0.99.0 built-in MCP alongside existing adapter and extension modes, with mode-aware paths, imports, and per-server options. Preserve custom native settings and remove cleared options only when explicitly requested and ownership is unchanged. Align CLI, dashboard previews, exposure controls, and localized documentation; simplify complex MCP components. Add regression coverage for import dialects, escaped values, mode selection, option pruning, conflicts, and migration previews. Verified in the devcontainer with Go vet and tests, MCP integration, make check, UI build and 527 tests, five-language website build, and ai-context validation. |
||
|
|
7b60645397 |
fix(server): keep the project dashboard up when a target has no path
The project dashboard resolved every target's path on startup and before each API request, so one custom target without `skills.path` kept `skillshare ui -p` from starting and made every request of a running dashboard fail with "failed to reload config". Targets that cannot resolve are now left out with a startup warning, and the dashboard sync reports them as failed with part "config", like `sync -p` does. ResolveProjectTargets keeps failing for the commands that need every target. |
||
|
|
cefa7c50ee |
fix(server): report a sync where every target fails instead of a 500
When every skills target failed, including when every target's settings were invalid, the dashboard sync returned 500 with only the first error. The page lost the failed list and its explanations, agents were never synced, and the dashboard's extras and MCP steps did not run. The sync now finishes like any partial failure: it returns 200 with every target in `failed`, and the operation log still records it as `error`. |
||
|
|
5dfd63d5e9 |
fix(sync): fail only the target whose config is invalid
Any per-target config problem, such as a skills path that is a file or
an unknown mode, made `skillshare sync`, `sync -p` and the dashboard
refuse to sync anything. That contradicts the policy that sync runs
every target and reports the ones that failed. Sync now validates the
config as a whole first and still stops on global problems (source,
global mode or naming, git_root, extras); a target whose own settings
are invalid is skipped for skills and agents and reported as failed
("invalid config" in CLI output and --json details, part "config" in
the dashboard's failed list). Config validation on save is unchanged.
|
||
|
|
d6960e46a7 |
fix(sync): count agent failures in the sync operation log
The log counted only skills targets as failed. The CLI wrote its sync entry before `sync --all` ran agents, `sync agents` logged empty stats, and the dashboard left agent failures out of targets_failed, so a run that lost a target's agents still read "ok" and Last sync could not say what failed. CLI and dashboard now log once after every part ran: targets_failed counts each failed target once, the new failed_targets lists their names, and targets_total is every target in scope. |
||
|
|
cf12f33eff |
feat(ui): list failed sync targets apart from warnings
A dashboard sync that lost a target reported it only as a warning string, next to backup notes and prune hints, under a "Sync complete" toast, so a partial failure was easy to miss and nothing said how to fix it. The sync API now returns a "failed" list (target, part, error, the matching warning text, and whether a symlink conflict caused it); "warnings" is unchanged. The Sync page shows failed targets first with their part and error, offers Turn on Force for a symlink conflict, marks the target in the change list, and toasts a warning instead of success. |
||
|
|
36a314442b |
refactor(server): decode JSON request bodies through one size-limited helper
About 57 handlers decoded request bodies with no size limit, and the few that had one each picked their own. They now go through decodeJSON with a 1 MiB default; handlers that need more keep their larger limit. An oversized body gets 413 instead of whatever the handler returned for bad JSON (MCP and plugin requests used to answer 400). Every other decode error keeps the handler's existing status and message. |
||
|
|
018bf96dc0 |
test(server): cover agents-extras overlap skip in project mode
The skip added in
|
||
|
|
035ab61859 |
fix(sync): count extras target failures in sync --all and the Web API log
`sync extras` already exits non-zero and logs "partial" when a target fails, but `sync --all` only printed a warning and exited 0, and its --json path ignored extras errors entirely. The Web API always logged "ok". Both now follow the CLI: `sync --all` exits non-zero on an extras failure in text and JSON, global and project, without holding back MCP; the Web API oplog records the error count with status "partial", or "error" when every target that ran failed. The HTTP status stays 200. |
||
|
|
b76375dab5 |
refactor(sync): share the per-target skills sync step between CLI and server
After the server fixes, the CLI's collect*SyncResult functions and the Web API loop ran the same merge/copy/symlink and prune logic twice. Both now call sync.SyncSkillTarget and only render its result: the CLI keeps its parallel grouping and progress output, the server stays sequential. The stats helpers this orphaned are removed. The server's "pruned" list is now always an array; it could be null when a prune removed nothing. |
||
|
|
b062a11322 |
fix(server): skip extras targets that the agents sync manages
The CLI skips targets of the "agents" extra whose path the agents sync already writes to, so the two syncs do not fight over the same folder. The Web API synced them anyway. It now builds the same set of agent target paths and marks those targets with skipped_by "agents", the CLI's JSON field name; existing response fields are unchanged. |
||
|
|
b62faeed60 |
fix(sync): skip extras whose source directory is missing
Global sync created a missing extras source, project sync and `sync --all` skipped it, and the Web API created it while ignoring any MkdirAll error. Creating an empty source only hides a misconfigured path, so every caller now skips the extra and tells the user to create the directory. The Web API reports the hint in a new per-extra "warnings" field; existing response fields are unchanged. |
||
|
|
57919f1b6c |
fix(server): refuse to replace a conflicting skills symlink without force
In symlink mode the Web API called SyncTarget directly, so a target symlink pointing somewhere else was handled differently from `skillshare sync`: no conflict message, and force had no effect. It now checks the link first like the CLI. Without force the target fails with "conflict - symlink points to X (use --force to override)" and counts as a failed target; with force the link is replaced. |
||
|
|
553e42811a |
fix(server): report skills prune failures and warnings
The Web API dropped the error from pruning orphaned skills and never passed on the prune's own warnings, so a dashboard sync could leave stale entries behind with no sign of it. It now reports them the way the CLI does: "<target>: prune failed: <err>" followed by the prune warnings. |
||
|
|
191bdec33f |
fix(server): keep syncing skills targets after one fails
The Web API returned 500 at the first skills target that failed, so every target after it was left unsynced and agents, extras and MCP never ran. It now follows the CLI: the failing target becomes a "<target>: sync failed: <err>" warning, the rest still sync, and the oplog records the real targets_failed count with status "partial". When every skills target fails the request is still an error, so single-target setups keep seeing one. |
||
|
|
dc255a6f36 |
refactor(sync): share the extras per-target loop between CLI and server
Global sync, project sync, `sync --all` and the Web API each carried a copy of the extras target loop, and the server inlined its own mode switch. All four now call sync.RunExtraTargets, and the TUI calls the exported sync.SyncExtraTarget. This is a pure refactor. The caller differences (missing-source policy, agent-overlap skip, path resolution, error precedence) are options on the runner, and characterization tests pin them so the follow-up fixes show up as deliberate test changes. |
||
|
|
47a6a17a69 |
refactor(sync): share the agents sync loop between CLI and server
The CLI and the Web API each carried their own filter, sync or transform, then prune loop for agents, and the copies had started to drift. Both now call sync.RunAgentSync and render its per-target results as before. This is a pure refactor: characterization tests pin the server's 200 with warnings on a per-target failure, the CLI's non-zero exit, the server's silent skip of targets without an agents path, and the merge of agent lists into the skills row. Prune errors are now returned in the result but still ignored by both callers; surfacing them is a separate fix. |
||
|
|
115236a6fb |
fix(server): use token auth when checking default-branch skill remotes
The dashboard check fetched the remote HEAD without credentials when a skill had no pinned branch. Private repos therefore reported an error in the dashboard while the CLI check, which uses GetRemoteHeadHashWithAuth, succeeded. The pinned-branch path already used auth, and the default-branch path now matches it. |
||
|
|
6a325037f2 |
refactor(server): share the skills config reconcile step
Install, batch install, tracked-repo install, uninstall and rehydrate each repeated the same nine-line block to reconcile the project or global skills config. reconcileSkillsConfig now holds that block, so a change to reconcile behavior or logging is made once instead of five times. Each caller still passes its own source directory, so behavior is unchanged. |
||
|
|
20ae89a838 |
fix(server): stop dropping git and metadata errors in check, uninstall and batch targets
The dashboard check reimplemented the CLI's per-repo check but fetched without the HTTPS token and ignored git status errors. Private tracked repos could fail in the dashboard while `skillshare check` worked, and a repo whose status could not be read showed as up to date. Both check endpoints now call check.ParallelCheckRepos, the same code the CLI uses. The JSON and SSE response shape does not change. Batch uninstall treated a failed dirty check as clean and moved the repo to trash. Without force, that item now fails with the git error instead. This is stricter than the CLI, which only warns and continues. Batch target updates ignored metadata save failures and still reported success, so an override could silently disappear on the next reload. They now return 500. |
||
|
|
8cfeae1e7c |
fix(sync): translate the path overlap warning and link to Health Check
The server put a fixed English sentence into the sync warnings, so the dashboard showed it untranslated in every locale. The sync response now reports the overlap as a path_overlap count, and the dashboard renders it from the locale files with a button that opens the Health Check page. The pull flow keeps the English sentence because it only shows raw warning strings. |
||
|
|
10466f2d53 |
fix(server): report one target per tied sync budget warning
When several targets tied for the worst context cost, the warning joined their names but listed top offenders from whichever target was seen first, so the offenders could belong to a different target than the one a reader looks at. Map iteration order also made that choice random. Ties now resolve to the alphabetically first target, and the warning carries that target's own offenders. The test gives each tied target a different skill so a mismatch between target and offenders shows up. |
||
|
|
8962ed9416 |
fix(server): name the target in sync budget warnings
Context-cost warnings in the Web API's sync response never carried a
target name: the warning struct tracked the worst token totals across
targets but dropped which target hit them. The CLI's sync --json and
the dashboard's ContextCostWarning both include target, so the
dashboard's i18n string rendered its {target} placeholder verbatim
instead of the target's name.
computeContextCost now records the names behind the worst always-loaded
and on-demand totals, joining ties with a comma, and reports them as
the warning's target. Regression tests cover both the tied case and a
worst-offender that only one target receives.
|
||
|
|
fd3bc824f3 |
feat(targets): edit other files a target's tool reads from its page
Pi and OMP read APPEND_SYSTEM.md next to their skills, and editing it meant leaving the dashboard. A target page now shows extra file tabs: built-in ones come from targets.yaml `files:` (APPEND_SYSTEM.md for pi and omp), and users can add their own, including files in subfolders. Paths stay inside the tool's folder; three tabs show and the rest move to a menu. "Share with Extras" opens Add extra prefilled with the file's folder and name, so the same file can be shared across tools. A single-file extra's name now defaults to its file name without the extension (APPEND_SYSTEM.md -> APPEND_SYSTEM) until the user types one, and the hint suggests the file name, as the #300 reporter asked. Refs #301 Refs #300 |
||
|
|
e48784f16b |
feat(sync): name targets that sync one folder with different filters
When two targets sync skills into the same folder with different include or exclude filters, each sync adds what one wants and prunes what the other filters out, so the folder never settles and sync keeps showing the same changes. The only hint was a vague overlap count. sync, doctor and the dashboard's Sync page now name the targets and the folder, and suggest turning skills off for all but one (universal when it is among them) instead of removing a target. The Sync page offers the existing stop-syncing dialog in place. Targets with identical filters are not reported. |
||
|
|
d757afbb61 |
feat(extras): let several single-file extras share one source folder
A single-file extra added from the dashboard with the shared source got <extras dir>/<name> as its folder, so a second file in the same folder needed the same name and was refused as a duplicate. Project mode had no source setting at all, so it could never share a folder. The add dialog now has a source folder field that defaults to the name, and project extras accept a source relative to the project root, from the dashboard and from `extras init -p --source`. Paths shown for single-file extras also keep the folder's own separator, so Windows paths no longer mix backslashes with a slash before the file name. Refs #300 |
||
|
|
e0882217ab |
feat(targets): list copy-mode copies apart when skills are switched off
Switching skills off keeps copy-mode copies, since they are real folders the user may have edited, but they were listed as the user's own items. The tool still loads them next to wherever it now reads skills from, so each skill shows up twice. The CLI, the preview and the dashboard dialog now list them separately and say to delete them if the tool reads the same skills elsewhere, leaving that choice to the user. |
||
|
|
46b23cd2ad |
feat(targets): let a target keep its instructions with skills switched off
Some tools only need skillshare for AGENTS.md, MCP or agents, while their skills folder is managed elsewhere or shared through another target. Syncing skills into those folders duplicated what the tool already reads, so a target can now turn skills off (`target <name> --no-skills`, the dashboard switch) and sync, diff, status and doctor skip its skills. Switching off warns about the other tools that read the same folder. The target list also gains tools that were missing, with colored vendor logos where their licenses allow it, and zencoder/replit default paths follow their current documentation. The dashboard's target pages get the matching UI: universal is pinned as the shared folder when adding a target, the add dialog lists what will be written, and the AGENTS.md tab shows where the file comes from in one card with an in-place switch between shared files. |
||
|
|
00f51adbda |
feat(extras): create and manage single-file extras from the CLI and dashboard
Single-file extras (file + per-target as) already worked in the sync engine, but the only way to create one was editing config.yaml or the dashboard's AGENTS.md tab, so they looked like an AGENTS.md-only feature. Syncing a file such as Pi's APPEND_SYSTEM.md required hand-written config. - extras init gains --file and --as; the init TUI asks Folder or Single file. Validation runs before anything is written, and init neither creates the source file nor syncs. - extras list and add-target show the full source and target file paths. - POST /api/extras accepts file and per-target as, with the same connection checks as add-target. - The dashboard's first Extras tab becomes "Folders & files" and lists every extra except AGENTS.md files; Add extra can create a single file with a per-target file name. - Assigning shared AGENTS.md files now only attaches or detaches AGENTS.md extras. Before, saving on the AGENTS.md tab restored and removed any other single-file extra linked to the same instruction file. Refs #300 |
||
|
|
13a93242f8 |
feat(ui): redesign the Hubs page around one list with in-place editing
Previewing a hub from the builder landed on an empty "pick a hub" state: the builder and the browser kept separate copies of the drafts and the browser's copy went stale. Merging both into one page removes the split, so your own hub is shown exactly as others will see it and edited in place. Hub entries can now be added from any repository URL, not only from installed skills, with a branch or tag picked from the remote. The version is written into the source URL, the only place the hub format keeps it, and a new /api/hub/refs endpoint lists refs and rewrites sources so the UI never builds tree/<ref> URLs itself. Skills added from installed ones keep the version they were installed from. Draft reads and saves read refs from the URLs only, so opening a hub never waits on a remote. Added hubs get unique labels, since the default hub is stored by label. |
||
|
|
a352b8d243 |
feat(install): pin skills to a tag or commit from their web URL (#293)
* feat(install): pin GitHub tree/blob URLs to their ref Hub entries only carry a source URL, so a team hub had no way to pin a third-party skill to a reviewed tag or commit. The parser already read tree/<ref>/ and blob/<ref>/ URLs but discarded the ref, installing from the default branch instead of the version the URL names. Keep that ref as Source.Branch. An explicit --branch (CLI) or branch (API body) still overrides it; the server handlers now only override when a branch is given. Batch installs group by repo and ref so two pinned versions of one repo get separate clones. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs(install): describe pinning hub sources to a tag or commit Explain that a GitHub tree/<ref>/ source URL pins the install, in both the hub index guide and the install reference. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat(install): pin GitLab/Bitbucket URLs and resolve refs containing "/" Pinning should not depend on the host, so GitLab (-/tree/<ref>/) and Bitbucket (src/<ref>/) web URLs now keep their ref too. Taking the first path segment as the ref broke branch names containing "/": tree/feature/x/skills/foo cloned branch "feature" and failed. When the first segment is not a branch or tag on the remote, the longest matching one is used instead. A ref the remote does not have fails with a hint to use --branch, rather than silently installing the default branch. A saved branch that covers more of the path (from --branch or config) moves the subdir without asking the remote. The grouped-install round-trip test pinned -/tree/main/ against a repo on master; the ref used to be ignored, so its branch is now renamed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs(install): cover GitLab, Bitbucket and "/" branches in URL pinning Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(install): keep web URL refs correct on reinstall, --branch and grouping Review of the slash-branch resolution found four gaps: - A saved branch equal to the whole URL tail (tree/feature/x) did not move the subdir back, so every reinstall or update looked for "x". - An unrelated --branch with a slash-branch URL kept the parse-time subdir (x/skills/foo) instead of the URL's real one. - Grouped installs copy the source to a repo root; resolution then put the subdir back and discovery looked under a doubled path. Grouping also keyed on the unresolved first segment, so tree/feature/x and tree/feature/y could share one clone. Web URLs with a ref now install on their own, and resolution leaves a repo-root copy at its root. - A skill named after the parse-time subdir kept that name once the path turned out to be all ref (tree/feature/x named the skill "x"). The unknown-ref error now reads as a missing ref first, since a stale ref (tree/master after a rename) is more common than a slash branch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(update): keep legacy installs on the default branch Skills installed before URL refs were honoured got the default branch and recorded no branch. Single-skill update re-parses the recorded source, so it moved them to the URL's ref (or failed on a stale one, with a hint to pass --branch, which update does not accept), while update --all rebuilds from RepoURL and kept the default branch. ApplyRecordedBranch treats an empty recorded branch as the remote default and drops the URL's ref. It replaces the branch handling at every site that reinstalls from recorded metadata: CLI and server update for skills and agents, and tracked-repo rehydration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * perf(search): share one clone across pinned hub skills from a repo Any web URL with a path after its ref installed on its own, so a hub listing many tree/<tag>/ skills from one repo cloned it once per skill. groupByRepo now resolves each URL's ref before grouping, with a RemoteRefs cache that lists each remote's refs once, and groups by repo and resolved ref. Only refs containing "/" (whose subdir the discovery match cannot re-derive) and refs that fail to resolve still install alone. A resolved source is marked settled so the grouped clone does not resolve it again, and ApplyRecordedBranch settles the subdir from a recorded branch without asking the remote. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Willie <egg358358@gmail.com> |
||
|
|
d572ba3b32 |
perf(backup): walk each snapshot once when listing backups
The list endpoint walked every snapshot to size it, then walked all of them again for the total. With thousands of files and a cold file cache (right after an upgrade, for example) the Backup page took visibly long to open. Each snapshot folder is now walked once for both its size and file count. Backup and total sizes are sums of those, and the per-folder counts are returned as `entries` so the dashboard can show what each folder holds. |
||
|
|
86dca7924f |
feat(backup): browse and restore file history, delete snapshots
skillshare backs up AGENTS.md, CLAUDE.md and shared-file locations before
rewriting them, but nothing could list or restore those copies, and a
target snapshot could not be deleted on its own. The file backups now
record why they were taken in their name (<time>.<reason>.bak; older ones
have none), and the server and CLI can list them, show a version and
restore it, saving the current content first. A link is only replaced
when the caller asks for it.
Also:
- DELETE /api/backups/{timestamp} and `backup --delete`.
- Agents snapshots (<target>-agents) could not be restored from the
dashboard: the name was looked up as a target.
- Project mode uses the project's backups folder for snapshots and lists
only file backups inside the project.
- MCP backups report which servers they changed and when.
Refs #299
|
||
|
|
342fac7691 |
feat(server): serve shared files and their locations in project mode
In a project, single-file extras were only reachable through the folder extras API, which has no file name, no import mode and no immediate sync. The dashboard now shows them on the AGENTS.md tab like global shared files, so the instructions routes it needs must work in project mode: list, create, content, resolve and the locations routes. A project location must stay inside the project (absolute, ~ and .. paths are refused with instructions_location_outside_project) and is stored relative, so a clone keeps working. A tool's own file is a valid location in a project, so the is_target check is skipped there. Refs #299 |