mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
v0.24.1
28
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3c7e48e239 |
fix(ui): let a Pi extension switch remove a rule instead of adding its opposite
Turning on a file that only a "-path" rule kept off wrote "+path", so the row ended with a rule pinning it on and a separate Remove rule button that did nearly the same thing. When removing the row's own rule gives the state the switch wants, the view now says so (unruled) and the switch removes the rule. Remove rule stays only where the rule is redundant. The prediction uses the same rule edit, evaluation and guard as the write, so the preview and the result agree. |
||
|
|
ca11f63a09 |
fix(plugin): trust symlinked ancestors of the Agent config root (#368)
* fix(plugin): trust symlinked ancestors of the Agent config root (#365) noSymlink walked every ancestor up to / and refused the write if any was a link, so macOS /var, a home on a linked volume, a dotfiles-linked ~/.pi, or a PI_CODING_AGENT_DIR / CLAUDE_CONFIG_DIR / CODEX_HOME behind a link failed with "refusing to modify symlinked native path". noSymlink now takes the root the user chose (the Agent folder, the project, or Skillshare's state dir) and checks only the path and the folders between it and that root, refusing paths outside it. The root is compared lexically because every checked path is built by joining onto it, so no EvalSymlinks call is needed. A linked config file or a linked folder inside the root is still refused, and Windows junctions are still detected via IsLinkMode. * fix(plugin): bound the noSymlink ancestor walk by its relative depth The walk stopped when p equalled root, but on Windows Dir spells a UNC share root with a trailing separator (\\server\share\) while Clean keeps the root without it, so the loop never ended for a PI_CODING_AGENT_DIR, project root or StateDir on a share root. Walk up exactly as many levels as the relative path has instead. |
||
|
|
9788d486f7 |
feat(pi): edit extensions on any Pi at or above the verified minimum (#367)
* feat(pi): edit extensions on any Pi at or above the verified minimum Pi 1.0.1 was released and every user who updated found the Extensions tab read-only, because the gate matched an exact list of versions. The package contract has not changed between patch releases, so the gate now accepts any plain X.Y.Z at or above PiMinVersion (0.99.2), the oldest version with executed evidence. Older, prerelease or unparsable versions stay read-only. The version matrix now also records Pi 1.0.1, which passes every check. The evidence test requires PiMinVersion to be recorded and every recorded version to pass, instead of matching an exact list. The read-only reason is renamed to unsupportedVersion and the API returns minVersion, so the dashboard says which version is needed. The Pi MCP project switch keeps writing the global command or url: from 1.0.1 Pi accepts a switch-only entry, but it is skipped by older Pi and warns at every start where the global config lacks the server. Its rationale in comments and docs is updated to say so. * fix(docs): update Pi extensions design records for the minimum gate Codex review on #367: the design records still described the exact version list (PiVerifiedVersions, unverifiedVersion, "exact versions only"), so a contributor relying on them would implement or validate the old contract. implementation-report.md now states the current gate and evidence, and phase-0.md gains a dated minimum-version update that the older paragraphs point to, keeping the history intact. |
||
|
|
3ba95ef49e |
feat(plugin): add npm packages from pi.dev through Pi (#363)
* chore(design): export dashboard tokens for design tools
Mockup tools read a design system's tokens.json rather than our CSS, so
designs drifted from the dashboard's Clean theme. The script derives the
tokens from components.css, and CI runs its test so a new color
variable without a usage note fails instead of silently going missing.
* feat(plugin): add npm packages from pi.dev through Pi
Pi packages on pi.dev are npm packages, which Plugins could not add:
it only took local or Git sources, so users had to install them with Pi
and import them. `plugin add npm:<package>` now hands them to
`pi install` for Pi targets and records the binding like an import.
Skillshare can't fetch or review an npm package, and Pi runs its install
scripts, so the preview says so, discover refuses npm sources, and only
targets that run pi itself take them. Pi keeps one entry per package
name, so another version replaces it in place and keeps its extension
filters; Skillshare records the new entry so a reinstall restores them,
and refuses a package another Skillshare package already manages, since
removing one would remove both. Pinned versions are skipped on update
because pi update keeps them.
The dashboard accepts npm sources, a pasted `pi install` command or a
pi.dev address, lists only Pi targets, and the Pi Extensions tab links
to adding a package with that target selected. Pi packages show Pi's
mark in the plugin list.
A blocked change now keeps its own reason when the Agent's CLI is also
missing, and the message key always matches the message the CLI prints.
* fix(plugin): keep npm package names and accept pi by path
The default name of an npm package went through the file-path rule, which
cut its last dot segment as an extension: npm:foo.bar was recorded as foo,
and adding npm:foo.bar@1.2.3 later derived foo.bar and was refused as
another package managing the same Pi entry. npm names are now taken from
the package spec.
A Pi account whose CLI is an absolute path to pi was treated as running
another executable, so it could not take npm packages. It now uses the
same path- and platform-aware check as the Pi Extensions tab.
* docs(wiki): add a pull-requests topic for Codex review rounds
Handling Codex's review was only known from practice: confirm each
finding, fix it with a failing test first, reply in its thread, ask for
another review, and follow up until it answers. Writing it down keeps
agents from resolving threads, amending pushed commits, or stopping at
the 👀 that only means the review is still running.
* feat(ui): give the Extras AGENTS.md and Memory tabs one layout
The two tabs shared a page but looked like different products: the header
shifted between them, notes sat in a joined box with an icon toolbar, and
agents showed as an icon strip in a side card. Switching tabs felt jarring.
Memory now follows the AGENTS.md layout: a sticky list column with search,
the note's name with Edit and a More actions menu, the same preview box,
and Use with agents as one row per tool under the note. Long notes open
collapsed like shared files do. The AGENTS.md list gains a search box and
the same sticky column. The Memory tab label stays English in every locale,
like AGENTS.md. Docs and screenshots follow the new layout.
* chore(docs): add a script that serves the Memory screenshot homes
The Memory how-to screenshots came from demo homes that were never
recorded, so reshooting them meant rebuilding the data by hand. The script
rebuilds the fresh and the populated home inside the devcontainer, serves
each behind the Vite dev server, and hands the port back to air afterwards.
* fix(plugin): refuse npm sources Pi can't resolve
validNpmSource accepted specs such as npm:foo/bar, npm:foo@ and names
containing "..", which Pi's own parser rejects. They passed preview, and
Apply recorded a pending binding before pi install failed, leaving an
entry every later sync retried. Validate with the same grammar the Pi
settings reader uses, which also covers a scope without a package name.
* fix(ui): show the default name when adding an npm package to Pi
The name field for an npm source was blank, so it looked like a name was
missing. Leaving it empty records the package name without its version or
scope, as the git flow already shows; the field now shows that name as its
placeholder.
|
||
|
|
539f1d0f03 |
fix(pi): recover Windows stale locks and protect private registrations (#361)
* test(pi): reproduce Windows private registration access failures Use NTFS DACL assertions instead of POSIX mode bits and verify that broadly accessible existing records cannot be read or silently reused. Keep the Unix mode assertion unchanged. * fix(pi): reclaim Windows locks and protect private registration state Anchor stale directories with delete sharing and delete the verified empty Windows directory by handle, keeping inode, lease and racing-owner guards. Create new registration directories with protected owner/SYSTEM DACLs and validate existing owner/access rules without changing their ACLs. Leave Unix permissions and directory-only removal unchanged. * test(pi): capture Windows lock identity before path replacement Windows Lstat lazily fetches file IDs by pathname. Snapshot the stale fixture through its anchored handle and add a matching-mtime replacement regression before first verification or release. * fix(pi): snapshot Windows lock IDs and accept privileged default owners Capture acquired lock identity through a handle before Windows can lazily resolve a replaced pathname. Elevated tokens can default file ownership to Administrators; permit privileged owners only alongside a verified current-user-only DACL. Refuse unsafe existing registration directories without modifying their ACLs or writing records. * docs(pi): record Windows acceptance and isolated regression workflow Document private Windows ACL requirements and refusal without permission rewrites. Add pinned devcontainer kit packaging, token-isolated full/basic acceptance, preserved UTF-8 logs and a reproducible UTM runbook. Preserve the original Unix permission assertion. * test(backup): isolate explicit agent backup from sync snapshots Sync automatically backs up target-local agents. Creating the fixture before sync makes the exact-one-backup assertion depend on both commands sharing a timestamp second. Create it after successful sync so the explicit backup is the only operation that snapshots it, without weakening the assertion. |
||
|
|
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. |
||
|
|
d17c1ab013 |
fix(plugin): remove Claude marketplaces in every scope and explain skill clashes (#323)
Removing a Skillshare marketplace from Claude passed --scope user (or project). Claude refuses a scoped removal when the marketplace is only recorded in known_marketplaces.json, which happens once synced settings drop its declaration, so cleanup failed on every sync. Remove it without a scope: the name is unique to the binding and its root is checked first, so every scope's copy is Skillshare's. A name declared at several paths is reported as a conflict and nothing is removed. Claude also reads a skill folder that has a plugin manifest as <name>@skills-dir and loads only one plugin per name, so installing a Claude plugin named like such a skill made Claude report the skill as not loaded with no warning beforehand. The install preview now says which copy Claude will load. Validation: make check, the UI vitest suite and tsc in the devcontainer; the cleanup and clash tests fail without the change. Claude 2.1.287 rejected the scoped removal and accepted the unscoped one against a copy of an affected config. Release-As: 0.23.4 |
||
|
|
7f3b5e7b1e |
fix(plugin): clean up and explain Skillshare marketplaces (#321)
Managed Claude/Codex marketplaces were named skillshare-<hash>, which says nothing in native marketplace lists, and they stayed registered after the plugin was excluded or removed. Cleanup ran only after a native uninstall, so a plugin already removed in the Agent, a failed first install, or a failed cleanup left the marketplace behind for good. Name new marketplaces skillshare-<plugin>-<hash>, and remove the one Skillshare registered whenever its plugin is excluded or removed, also when the plugin is already gone. Cleanup checks that the marketplace is registered from Skillshare's own state directory, re-lists afterwards, and stays pending for the next sync on failure or while the marketplace list cannot be read. An update registers a missing managed marketplace again. An imported plugin reinstalls from its native marketplace. When that marketplace is gone (for example when synced settings dropped it), sync failed with a generic "command failed". Skip that target with the reason instead, so other Agents still sync. Skillshare does not move an import to its recorded source on its own: that would install a distribution and version nobody reviewed for that Agent. Failed outcomes now carry their translation key, and the dashboard shows each distinct failure once instead of the joined English text. Validation: make check and the full UI vitest suite in the devcontainer, tsc and eslint; the new Go tests fail without the change. Claude and Codex marketplace removal was checked against the real CLIs in isolated config directories. Release-As: 0.23.3 |
||
|
|
bcb8c6c781 |
fix(plugin): skip Agents an update cannot reach instead of blocking it
A plugin installed on several Agents could not be updated anywhere when one of them could not take the update: a plugin disabled in Codex or Copilot, or an imported package, blocked the whole plan, so Claude stayed behind too. These targets are now skipped with the reason, and the rest update. A skipped update stays pending, where the previous noop cleared it and left Skillshare believing a stale Agent was current. Two of those were not real limits: an imported Codex plugin now updates through `codex plugin marketplace upgrade`, and an imported Pi package in global mode through `pi update`, which keeps its settings entry. Skip reasons carry a message key so the dashboard translates them, and a plugin whose Agents hold different versions shows each instead of none. Refs #309 |
||
|
|
b201caab5b |
feat(plugin): update Codex plugins by adding them again
Codex has no plugin update command, so Skillshare refused to update a Codex binding and left that Agent to be maintained by hand. Codex's add replaces an installed plugin with its marketplace's current copy atomically, so an update now refreshes the reviewed snapshot, adds the plugin again, and checks the installed version. Add always enables the plugin, so one disabled in Codex is skipped with the reason rather than turned back on. An imported binding is skipped too, since Codex upgrades Git marketplaces itself. Both are skipped, not blocked, so the plugin's other Agents still update in the same run. Refs #309 |
||
|
|
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 |
||
|
|
791f518b43 |
fix(plugin): filter Claude inventory by scope before validating IDs (#306)
Claude's plugin list also reports other scopes, such as a project-scoped "(suppressed)@skills-dir" entry for the folder it runs in. The ID check ran before the scope filter, so one entry the current scope never uses blocked the whole target - e.g. a claude account target showed "native plugin list contains an unsupported plugin identifier" when the UI server ran from the home folder. |
||
|
|
deafea7693 |
fix(plugin): allow Codex logos up to 1MB
Real plugin logos exceed the 256KB cap (ponytail ships a 554KB PNG), so the dashboard fell back to the default icon for them. |
||
|
|
a996a5bbfd |
feat(plugin): show version and Codex logo for plugins with no Agent
A plugin added without choosing an Agent has no binding, so the dashboard had nowhere to read its version from and always drew the default icon. Record the source version on the package when it is added, and let rows without one ask their source once. Read interface.logo from the Codex manifest (inside the plugin, image types, 256KB max) and draw it in the list and in the add preview, falling back to the default icon. |
||
|
|
97499ebcc4 |
fix: recognise Windows junctions wherever links are detected
Since Go 1.23, os.Lstat reports NTFS junctions as irregular files instead of symlinks (winsymlink, active for go 1.25 in go.mod). Every check that looked only at os.ModeSymlink therefore missed the junctions skillshare itself creates on Windows: linked skills could be treated as local folders, backed up, copied through, or left behind on prune. Detect links through utils.IsLinkMode, which also asks the OS about the reparse tag of irregular entries, and count only real symlinks and junctions as links so OneDrive placeholders and deduplicated files stay regular files. restore.go also used os.Stat for its link check, which follows the link and never matched. Refs #299 |
||
|
|
3d08cbc670 |
fix(plugins): name a git failure's cause only when git names it
Git opens every HTTPS failure with "unable to access", a bad certificate or a 403 included, and a missing git-lfs says "command not found". Those were reported as a network problem or a missing source and sent the user to the wrong fix; they now fall back to the general failure. Discovery of a managed plugin is also cached per plugin, since two plugins of one source can have snapshots at different commits. |
||
|
|
c25eb4f708 |
fix(plugins): open managed plugins from their snapshot and explain slow reads
Opening a plugin cloned its whole source again to learn which Agents can take it, which took tens of seconds per row. A managed plugin already has a reviewed snapshot; it answers when its digest still matches, and the network is used only otherwise. A failed clone said only that git failed. Git's output is sorted into an unreachable source or a missing one without passing it on, since it can hold credentials. The dashboard translates those, notes when a read or an Agent's CLI is slow, and says when the browser is offline. |
||
|
|
e259d3c116 |
fix(plugin): keep a failed host's installed list empty, not null
When an Agent's plugin inventory failed (for example OpenCode with both opencode.json and opencode.jsonc present), the inventory call overwrote the host's installed list with nil, which the API encoded as null. The Plugins page read its length unguarded, so one misconfigured Agent crashed the whole page. Host.fail now restores an empty list, covering every inventory path that reports through it, and the dashboard reads a null list as empty so a single Agent can no longer take the page down. Refs #296 |
||
|
|
bb57a9af9c |
feat(targets): add account targets for a second Claude, Codex or Pi config directory
A target declared with `agent` and `config_dir` is another config directory of a built-in Agent, such as a second Claude account. Its skills and agents paths are derived from the Agent's defaults at load time, so the config only records the directory. The same target name works for MCP (written in the Agent's format into the account's own file), for plugins (the Agent CLI runs with CLAUDE_CONFIG_DIR, CODEX_HOME or PI_CODING_AGENT_DIR) and for `mcp import --from`. Removing such a target warns when MCP config still names it instead of failing later at sync. The dashboard gains an "another account" mode in the add-target dialog and lists accounts next to the Agents on the MCP and plugin pages. Refs #289 |
||
|
|
121e2712b5 |
fix(plugins): let one Agent use another source under the same name
The source recorded for binding Agents later was also compared on every install, so adding a second distribution for another Agent under the same package name was refused. It is only where later bindings come from; installs are checked per Agent as before. |
||
|
|
e0c1111b79 |
feat(plugins): add a plugin without choosing Agents yet
Adding a plugin forced at least one target, so keeping a plugin in Skillshare for later meant installing it somewhere and then deselecting every Agent by hand. A package now records its source, so it stays managed with no Agent bound. Agents are bound later from the same source, installing it as it is then. Removing the last Agent keeps such a plugin; removing the plugin itself drops it. In the terminal picker, confirming with nothing selected records it, while Esc still cancels. The plugin list also shows the installed version as a tag, and an update check shows old -> new for plugins whose source has moved on. |
||
|
|
ece7090b1b |
fix: write every YAML file with 2-space indentation
yaml.Marshal defaults to 4 spaces, and only the config package forced 2. Saving a plugin re-encodes the whole config.yaml, so installing one reindented a user's entire file; skill/agent frontmatter and audit-rules.yaml were written with 4 spaces too. Route all YAML writers (config, registry, plugins, MCP, frontmatter, audit rules) through one utils.MarshalYAML so they cannot drift apart. |
||
|
|
35cebd8ab2 |
fix(plugins): install Pi packages whose package.json has no name
Pi installs a package by its path, and a package.json with only a pi field is a valid Pi package, but the missing name blocked Pi for it. OpenCode also installs by path. A package.json name now only names the plugin when no other manifest does. |
||
|
|
b663895222 |
fix(plugins): stop blocking Pi and OpenCode over a scoped npm name
A package.json name is the npm name, often scoped (@owner/pkg), so it rarely equals the plugin name, and Pi and OpenCode install by path, not by that name. The name check blocked both Agents for plugins that support them, such as ones published as @owner/plugin. |
||
|
|
f2321370ec |
fix(plugins): leave out broken or unsafe links instead of failing the source
One dangling link anywhere in a repository, often in the author's own agent settings and unrelated to any plugin, made every plugin in it uninstallable. Such links (broken, absolute, escaping the source, into .git, or closing a cycle) are now left out of the digest and snapshot and reported as a discovery warning. They are still never followed, and sources without them keep the same digest, so existing bindings are unaffected. Special files and the size limits still fail the source. |
||
|
|
f271c93c32 |
fix(plugins): install marketplaces the way each Agent reads its catalog
One broken or external entry used to fail the whole marketplace, and valid Claude plugins were rejected because skillshare expected more than Claude does. Checked against the real Claude and Codex CLIs: - A bad entry now marks only its own row, with a translatable reason. - An external entry yields to a catalog that points inside the source. - Claude plugins without plugin.json are read from their catalog entry and default folders, including a root SKILL.md as the only skill. - Claude entries keep their own definition (strict, skills, lspServers, version, ...) in the catalog written for Claude, so entries sharing a folder no longer install identical content. - When catalog and manifest names differ, Claude still installs under the catalog name; Codex refuses, so other Agents are blocked. - When catalogs place the same plugin in different folders per Agent, each Agent installs from its own folder. - The add dialog no longer preselects a plugin that cannot be installed. |
||
|
|
cd79530cda |
fix(plugins): read the Pi version from stderr
Pi prints its version to stderr, so the host showed an empty version. The fallback applies only to --version with empty stdout, so commands whose stdout is parsed never see stderr noise. |
||
|
|
4bcd569e25 |
feat: MCP connections, plugins and a redesigned dashboard (v0.21.0) (#285)
* feat(mcp): sync portable server configuration across six clients
Add inline and external MCP sources with guided CLI and dashboard setup, native imports, conflict previews, ownership tracking, backups, and restore. Support Claude Code, Codex, Cursor, VS Code, OpenCode, and Grok CLI in global and project scopes.
Format YAML on save, document MCP fields in the config assistant, and keep its layout stable for scalar list items. Include schemas, localized UI copy, documentation, and regression and end-to-end coverage.
* fix(config): keep loading config when the MCP section is invalid
A mistake in the mcp section (an unknown key, a targets value that is
not a list, an invalid server field) made config.Load, LoadProject,
Save, SaveIn and ValidateConfig fail. Every command that reads config,
including skills sync, install, list and the dashboard, stopped working
because of settings it never uses.
MCPConfig now keeps a section that does not parse exactly as written and
records the error instead of returning it, so commands unrelated to MCP
load and save the config without touching that section. MCP commands
still validate their source on every run, and the dashboard config
editor calls the new ValidateMCP, so saving an invalid MCP section there
is still rejected.
Also correct the ProjectSources comment: sources.mcp resolves from the
directory containing config.yaml, not from the project root.
* fix(mcp): protect Agent files during concurrent edits and recovery
A release review of the MCP sync engine found ways it could lock users
out, report false conflicts, or change entries it does not own.
Recovery
- A failed write left pending.json behind, and every later MCP command
refused to run. Failed writes now remove their journal, and a journal
whose Agent file changed again is discarded, because ownership hashes
still flag entries that no longer match.
- Preview no longer writes. It reads the ownership that recovery will
record, byte for byte, so a preview stays valid across the recovery
that the next write performs under the lock.
Concurrent Agent writes
- Claude Code rewrites ~/.claude.json on its own, so hashing whole files
expired previews and failed applies. Revisions and pre-write checks
now cover only the MCP entries, and apply rereads each file and applies
the previewed entry edits to its current content, keeping settings the
Agent wrote after the preview.
Comparison and ownership
- Only fields Skillshare renders are hashed, after dropping defaults
Agents add or omit (type stdio/http, empty env, args or headers,
enabled: true) and header name case, so equivalent entries are not
reported as drift. enabled and disabled are compared, so turning off a
managed server is a conflict instead of being overwritten.
- An unmanaged entry that already matches the source is reported as
unchanged but no longer claimed, so removing the server never deletes
an entry the user wrote. Import adopts it explicitly, and without
--replace refuses to rewrite a differing entry, such as a literal token
that import turned into an environment reference.
- Sync keeps Agent-only fields such as timeouts in existing entries.
Import
- Agent-only fields become warnings instead of blocking the import.
- streamable-http is accepted, and enabled/disabled flags are checked
for every client.
- Values carrying a URL password, such as database DSNs, become
environment references, and credential-like arguments are flagged.
Writes and state
- Save only renders the definition first, so a server that could never
sync, such as one without targets, is rejected before it is saved.
- A symlinked config.yaml is written through to its target.
- TOML entries are updated in place, keep CRLF line endings, and repeated
add/remove cycles no longer grow blank lines.
- JSON edits no longer HTML-escape characters such as &.
- GROK_HOME is honored.
- Backups keep the newest 20 per Agent file, pruned by file name, and
damaged backup files are skipped instead of failing the list.
- GET /api/mcp no longer fails when an Agent that no server uses has an
unresolvable path.
* feat(mcp): detect the client format of pasted JSON
Import without --from, the add wizard and the dashboard import API
assumed Claude's mcpServers shape unless a client was named, so VS Code
"servers" and OpenCode "mcp" snippets copied from server docs failed to
import. The client is now chosen by the top-level key, and a bare server
object still reads as Claude's single-entry shape.
TOML stays explicit because Codex and Grok share the format; a .toml
file without --from is still read as Codex.
* refactor(mcp): print CLI results through internal/ui
MCP commands wrote plain fmt output and duplicated statusFromErr, unlike
every other command. Plans, backup IDs and save/apply messages now use
the shared ui helpers, so they get the standard status prefixes and
colors; each change line shows the server name, action and target. The
operation log uses statusFromErr. --json output is unchanged.
* fix(server): serve MCP settings only to localhost or IP hosts
MCP settings include stdio commands that Agents execute, so a web page
must not be able to read or change them. The existing Origin check does
not stop DNS rebinding: once an attacker's domain resolves to 127.0.0.1,
the browser sends that domain as both Origin and Host from a loopback
address, and the dashboard also binds 0.0.0.0 in Docker.
Rebinding always needs a domain name, so every MCP route now also
requires a Host that is localhost or an IP literal, whatever the bind
address. Other dashboard routes are unaffected. Opening the dashboard
through a domain name, including a reverse proxy, therefore returns 403
for MCP settings; the message says to use localhost or an IP address,
because rewriting Host at the proxy would still fail the Origin check
and would reopen the hole.
Remove the unused POST /api/mcp/sync endpoint. Configuring with sync
covers it, and the guard wraps every remaining MCP route.
* fix(sync): make sync --all report MCP results reliably
- "sync -g mcp" and "sync --dry-run mcp" ran skills sync, because mcp
was only recognized as the first argument. It now matches in any
position.
- sync --all --json printed plain-text errors when the MCP preflight
failed, and only an error on conflicts. Preflight errors now use the
JSON error shape, and conflicts also return the credential-free plan so
scripts can see which entries conflict.
- When resource sync failed, MCP was skipped without notice. Text output
now warns that MCP settings were not applied; JSON output omits the mcp
field, which --all otherwise always includes.
- MCP was applied with the preflight revision, which failed whenever the
resource sync changed config or state in between. It is now planned
again under the MCP lock, and conflicts found then still stop the
write.
* fix(sync): recognize agents and extras after flags
sync only checked the first argument for a resource kind, so
"sync --dry-run agents" and "sync -g extras" silently synchronized
skills instead. Sync flags take no values, so the kind now matches in
any position.
The shared parseKindArg keeps its first-argument rule: uninstall, update
and similar commands accept resource names, and a name such as "agents"
must not be read as a kind.
* feat(ui): redesign the MCP dashboard around a server-by-agent matrix
The MCP page listed servers and planned changes as flat text, which made
it hard to see where each server is written and what needs attention.
- A matrix shows each server's status per Agent, summarizes pending
changes and conflicts, and can hide synced entries. Agents whose MCP
file or config directory exists are marked as detected; GET /api/mcp
now returns the detected clients.
- Setup is a two-step dialog: add a remote URL, paste JSON or TOML, or
import from an Agent, then preview which Agent files change. Importing
an entry the Agent already has adopts it, Replace overrides only that
entry, and a target selection equal to the inherited mcp.targets is
saved without pinning targets on the server.
- Conflicts explain their cause and offer Import from <agent> or
Replace. Removal lists the affected Agent files and offers removing
from the source only or removing and syncing. Backups are grouped by
day, with a preview before restoring a file.
- Agent icons appear on the MCP and Targets pages, and the universal
target is marked as a path shared across agents. Brand icons come from
@lobehub/icons-static-svg, with bundled SVGs for Warp and Zed.
- Segmented controls wrap instead of overflowing narrow containers.
- New copy is translated for every supported locale.
* fix(ui): let Sync all apply MCP after syncing resources
Sync all previewed MCP, synced skills, agents and extras, then applied
MCP with the revision from the first preview. When the resource sync
changed config or state, that revision was stale and MCP failed with
"preview again" after everything else had already been synced.
MCP is now rechecked before and after the resource sync by comparing the
reviewed changes (target, name and action) instead of the revision, and
applied with the fresh revision. A different set of changes still stops
before any MCP file is written.
* fix(ui): keep flow-style YAML collections when saving config
Formatting on save forced every collection into block style, so a
hand-written "targets: [claude, codex]" was expanded into a list each
time the config was saved. Each collection now keeps its flow or block
style, indentation is still normalized and comments are preserved, and
flow collections are not padded with spaces.
* docs(mcp): document ownership, normalization and dashboard host rules
- Explain that matching entries stay unmanaged until imported, so
removing a server leaves them in place, and that import adopts an
identical entry while --replace rewrites a differing one.
- Note that Agent defaults and header case are not treated as changes,
that disabling a managed server is a conflict, and that previews stay
valid while an Agent rewrites unrelated settings.
- Describe Agent-specific fields, streamable-http, GROK_HOME, backup
retention, recovery by the next MCP write, and the VS Code limitation
on environment references in headers.
- Document that MCP settings require opening the dashboard by localhost
or an IP address, with SSH port forwarding for remote machines.
- Update the built-in skill for all six clients and the adoption rule,
and the MCP runbook for import refusal, Agent-specific fields and
pulled changes.
* docs(skill): streamline guidance and refresh resource workflows
Keep the built-in skill entrypoint focused and route agent and MCP details to dedicated references. Correct scope, audit, automation, and recovery guidance against the current CLI.
* feat(ui): redesign the dashboard around two styles and a flatter layout
The dashboard had grown page by page, so the same idea looked different
depending on where you met it and pages held controls with nothing to act on.
This rebuilds it on one token set that drives both the Clean and Playful styles
in light and dark, and reshapes the pages around what a person actually does.
Notable changes:
- MCP: replace the server-by-agent matrix with one row per server. The agents a
server writes to are chips inside the row, so the list grows downwards as more
CLIs gain MCP support instead of scrolling sideways.
- Settings: collect General, Backup, Log, Health, Extensions and Files into one
page. The Files tab keeps a panel beside the editor showing what the field
under the cursor does, the file's shape, or the unsaved changes.
- Audit rules: the YAML editor gets the same panel, plus a Test tab that runs a
rule's regex against pasted lines.
- Skills and Agents become separate pages; install, search, updates and trash
move into them. Old routes redirect.
- Tour: rewrite every step's copy, add MCP and Install steps, and anchor each
step to a control that is always rendered so no step silently times out.
- Give every button a pointer cursor; the browser default does not say a button
is clickable and each component class had to opt in by hand.
Docs follow the new Settings tabs and the MCP list.
* chore(devcontainer): move dev servers to uncommon ports
5173, 19420 and 8888 are defaults that other projects on the same
machine already hold, so `make devc` failed to bind and the container
never started. Use 45173, 49420 and 48888 instead, identical inside and
outside the container so every banner, log and doc prints the URL that
actually works.
* feat(ui): link dashboard source counts to their pages
The counts in the playful dashboard's source note named a number but led
nowhere, so reaching Skills or MCP from there meant going back to the
sidebar. Each row is now a link to its own page.
The hover fill uses currentColor because .ss-pinnote.src overrides the ink
tokens for the yellow note.
* feat(ui): build and browse hubs from the dashboard
A hub is a JSON index that lists skills, and until now the web UI could
only consume one someone else had already hosted. Writing the index by
hand was the only way to produce one, and the two halves never met: the
dialog that searched hubs and the page that would have built one shared a
config file but nothing else.
The new /hubs page holds both halves behind two tabs:
Browse pick a hub, filter its contents by tag or text, install from it
without leaving the page
My hubs assemble an index from installed skills, validate it, export it
A draft is offered as a source in Browse straight away, read from the
draft API rather than a file, so you can see what a recipient sees before
deciding whether to host anything. Where the index is hosted is stored on
the draft and stripped from the exported document, so a reopened hub
remembers where it was published and the published file stays clean.
Hub management moves out of the install dialog, which keeps only the
search-source dropdown and links here.
Routing switches to createBrowserRouter for useBlocker, which guards the
builder against navigating away from unsaved entries.
* docs(extras): add shared instructions recipe for AGENTS.md across agents
Answers a recurring question about sharing one instruction file between AI
agents: extras already covers it, since each agent keeps its user-level
copy in its own directory and one extra can target all of them.
Naming the source file AGENTS.md rather than something neutral matters —
Codex concatenates AGENTS.md files and has no import syntax, so it only
recognises the file by name. Claude Code and Antigravity read a fixed
filename of their own but resolve @-imports, so a one-line CLAUDE.md or
GEMINI.md picks up the synced file.
Says plainly that this is not agent memory. Agents keep their own
learnings in private stores — a Markdown directory for Claude Code, a
database for Codex, non-file storage for Cursor — so that side is a
migration problem, not something syncing files can solve.
* feat(ui): filter skills and agents by target
The Targets column showed which targets a resource reaches, but there was
no way to narrow the list down to one. The filter reads the sync matrix —
the same source that column renders — so a result always matches the icons
the rows show.
Options and counts are derived from the matrix, so no target is offered
that would filter to nothing, and the control stays hidden until at least
two targets have something. A selected target that disappears on a kind
switch or an uninstall falls back to All rather than emptying the list.
The toolbar had 24px to spare at 1440px, so the new control wrapped the
row. Source moves from a 325px segmented control to a dropdown like its
neighbours, and every filter now sizes to its label instead of a fixed
width that truncated the longer values.
* fix(ui): tighten page headers and reach hubs from skills
PageHeader carried mb-7 while .ss-wrap already separates its children with a
28px flex gap. Margins and flex gaps add up rather than collapse, so every
page inside the wrapper opened with a 56px hole under its title. Move the
default onto .ss-pgh so the wrapper can zero it, keeping the 28px for pages
that lay out their own children.
Hubs is a source you install from and a catalog you publish, not inventory
you own, so it no longer sits in the Library group next to Skills, Agents and
Plugins. The Skills page header already links to it and the page already
carries a back link there. Skills stays highlighted while the hub page is
open. Plugins takes the Package icon its own page identifies with, so the
sidebar no longer shows two identical puzzle pieces.
* fix(skill): stop implement-feature from running --no-tui as a command
The dispatch-order note wrote "not --no-tui" as !`--no-tui`. In a skill file
that is the syntax for running a shell command at load time, so the skill died
with "command not found: --no-tui" before any of it could be read. Spell the
condition out in words instead.
* feat(list): toggle model invocation for a skill with M
The only cheap gesture in the list TUI was E, which hides a skill from every
harness. Wanting a skill installed but not auto-loaded meant leaving the TUI
to edit SKILL.md, so people disabled skills they only meant to make
manual-only. M flips disable-model-invocation in place and the detail panel
shows a "manual only" badge so the state is never a blind toggle.
Unlike E this edits the skill file, which upstream may own: update skips
tracked repos with local changes, and reinstalling a skill drops the edit. M
says so and asks before writing in those cases. The flag is written as a
single-line edit rather than a YAML round-trip, and turning it back off
removes the line, so two presses return the file byte for byte and a tracked
repo is clean again. Agents are left alone; their harnesses do not read the key.
Refs #283
* feat(plugin): manage complete plugins across agent tools
Add CLI, TUI, and web flows for discovery, adoption, sync selection, updates, and removal while preserving native package formats and unrelated installations.
Support Claude, Codex, Cursor, Antigravity desktop, Pi, and OpenCode. Update help, completions, built-in skill, and documentation; keep plugins outside sync --all.
* docs(skill): describe the redesigned dashboard in the style skill
The style skill still documented the pre-redesign hand-drawn system, so
pages written with it came out on legacy tokens and outside the ss-*
classes; the new Plugins page was the first casualty.
The rewrite names tokens and classes and points to components.css for
their values, because copied values are what went stale last time. The
ui command docs described Playful by the old look as well.
* fix(ui): keep Playful ghost buttons free of stray shadows
The hover and disabled rules outranked the ghost variant's
box-shadow: none, so a frameless button grew a lone shadow arc in
Playful. Bulk toolbar and toast buttons shared the problem.
Ghost also gets a soft outline in Playful: beside 2px ink frames a bare
label such as Cancel did not read as a button.
* refactor(ui): lay out the Plugins page like the MCP page
The page was built on legacy tokens and plain markup, so it missed the
Playful frames and drifted from every other page. A per-agent column
layout would not have scaled either: each agent that gains plugin
support would add a column.
Plugins now follow the MCP server list: one row per plugin with its
agents as toggles inside the row, so the list only grows downwards.
Per-agent sync and update move to package-level actions in the row
menu, and the dialogs use the standard header, body and footer.
* feat(ui): give plugins a kind colour and per-agent actions
Plugins borrowed a neutral grey tile because no kind colour existed,
which made them the one resource without an identity on the page.
Magenta sits furthest from the five hues already taken.
Laying plugins out as rows had dropped the per-agent sync and update.
Retrying one agent after a partial failure should not re-run the rest,
so each agent in the expanded row gets its own menu. Update is left out
for a deselected agent, which has nothing installed to update.
* feat(ui): count plugins on the Dashboard
The source summary listed every resource kind except plugins, so the
Dashboard under-reported what a source holds. The Playful source note
grows to fit a fifth row.
MCP now sits above Plugins in the sidebar to match that order, and its
Dashboard label reuses the sidebar's "MCP" instead of a longer string
of its own.
* feat(scripts): add a host verification environment
Plugin and MCP work talks to the real Agent CLIs, and those live on the
host, not in the devcontainer, where every target reports "not installed".
Verifying by hand meant either pointing a build at real config or
assembling a dozen environment variables each time.
`make verify` builds a host binary and runs it against .verify-home/ in
the repo, redirecting HOME, the XDG dirs and each agent's own config
variable. The environment starts from `env -i`, so a stray
SKILLSHARE_CONFIG in the caller's shell cannot pull the run back to real
paths. Living inside the repo is safe because project-mode detection
only inspects the working directory and never walks up to a parent.
It also seeds the dashboard cache from ui/dist. A dev build serves a
placeholder rather than the working tree, because runtime download only
applies to numbered versions, so the UI was previously unverifiable
without a release.
* fix(ui): show progress while a plugin selection is applied
Toggling an agent shells out to that agent's own CLI, which takes
seconds. The row gave no sign of it: the toggle only greyed out, and
the confirmation badge is hidden while a target is deselected, so
turning one on looked like nothing happened at all.
The toggle being applied now lifts out of the greyed state and spins in
its badge. Agent versions also get room for their real strings, since
"2.1.276 (Claude Code)" was truncated to a width chosen for a bare
version number.
verify.sh gains a 'run' subcommand, so the same throwaway environment
can be driven from a script rather than only an interactive shell.
* fix(ui): spin the control that started a plugin action
Reading the inventory shells out to six agent CLIs and takes about two
and a half seconds, and every action refreshes it afterwards. Nothing on
the page said so: a menu action closed the menu and left the page still,
so the wait read as a freeze.
Each control now tracks its own work. Check, sync and import spin in
place, a menu action spins the row it acts on, and the agents refresh
follows the query itself rather than the mutation flag.
* feat(ui): split MCP add and import by where the configuration comes from
"Import from a target" opened a dialog whose second tab pasted a snippet,
which is not a target and usually comes from a provider's setup page rather
than a tool the user already configured. Pasting is a way to add a server,
so it moves under "Add server" beside the form, and importing now means one
thing: read what an installed Agent already has.
The paste side gains a file picker, matching `mcp import --file`; the API
only ever took content, so the browser reads the file and fills the editor.
The target picker no longer waits for a successful parse, and a footer that
said "writes 0 config files" next to a greyed-out button now names what is
missing instead.
* fix(ui): label the plugins result strip as the last action
The strip and the plugin inventory below it used the same list styling with
no heading on either, so two rows carrying the same plugin name read as one
list. The status word made it worse: "imported" is one of the outcomes
lifecycle.go returns for an action, but it sat where an inventory row shows
state, so it looked like a property of the plugin.
Give it the section heading the Agents list already has, plus a count and a
dismiss button, so it reads as the report it is.
* feat(plugins): expand compatibility and clarify setup guidance
Support additional native targets, safe source links, Git refs, and explicit OpenCode entries while exposing per-target capabilities across CLI, TUI, and UI.
Separate unsupported integrations from environment errors, explain next steps in plain language, and link official documentation. Update built-in guidance, website docs, completions, and regression coverage.
* feat(plugin): serve a plugin's files and translatable discovery problems
The dashboard could only show a plugin's name and targets, so reviewing
what a plugin ships meant opening the snapshot by hand. Files and
ReadFile expose the reviewed local copy read-only through os.OpenRoot,
which keeps reads inside the snapshot even across symlinks.
Discovery problems now carry a key and arguments next to the English
sentence, so the dashboard can translate them while the CLI keeps its
wording. Inventory asks every Agent CLI in parallel and Packages answers
from config alone, so the plugin list no longer waits on the slowest CLI.
* feat(mcp): sync to Pi, show native config, and lay out written entries
Pi has no built-in MCP support, so a server targeting it must name the
third-party extension that will read the file. `--pi-extension` and the
`piExtension` source field record that choice, and sync writes the file
format of the chosen package instead of guessing.
RenderNative and POST /api/mcp/render return what each Agent would
receive for a definition, with secrets kept as references, so the
dashboard can show the result before anything is written.
Sync used to insert entries on a single line and never revisit them. A
managed entry that still sits on one line is now reported as an update
and rewritten one field per line; entries formatted by hand are left
alone.
* feat(ui): choose plugin Agents like MCP, browse plugin files, view MCP config
The plugin fold listed bound Agents with a per-Agent menu, while MCP let
you simply tick the Agents you want. Plugins now work the same way: the
fold discovers where the source can also go, shows those Agents as
unticked toggles, and a tick previews an install. The per-Agent menu is
gone, and updating a plugin targets only the Agents that support it
instead of hiding the action when one of them does not.
A plugin with a local copy can be browsed in a read-only files dialog,
using the same tree as a skill's Files tab. The MCP "view config" moved
out of a fold in the server form into its own view, reachable from the
server menu, so the native result has room to be read. The MCP dialogs
also ask for the Pi extension when Pi is selected.
Playful tile names drop from 25px to 22px: "brainstorming" was 1px wider
than the tile and lost its last letter to the next line.
* docs: reshoot dashboard screenshots for the redesigned UI
The README and website still showed the pre-redesign dashboard, which no longer matches what users see after upgrading.
* docs: describe MCP, plugins and the new dashboard for v0.21.0
The README still announced v0.20.0 and never mentioned plugins, and its
MCP section listed four clients. The built-in skill and the docs pick up
the Pi extension setup, the formatting-only MCP update, and the plugin
fold and files dialog, so agents and users are not surprised by them.
|