mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
464d2fab73af0b4e63efd202cdbec8d445bbc8d0
396
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9ac9682dcc |
perf(memory): tell agents to prefer shared notes over tool memory
The generated guidance block defined "what is worth saving" the same way agents' built-in memory does, but never said how the two relate, so agents with their own memory kept saving there and left the shared folder alone. The active rule now says to save here instead of tool-specific memory, gives a note format and an INDEX.md line shape, and both modes read INDEX.md at the start of each task instead of "when relevant". The passive rule asks agents to point out facts worth keeping so the user can ask for them to be saved. Dashboard mode descriptions, the CLI help, and the website pages are updated to match. Test fixtures that anchored on "Read only" follow the new wording. |
||
|
|
b4296e3cff |
feat(memory): let each agent choose passive or active note updates (#377)
* feat(memory): let each agent choose passive or active note updates Shared memory guidance only told agents to update notes when asked, so anything worth keeping was lost unless the user remembered to request it. Some users want agents to maintain the notes themselves, but because the notes are shared across every tool, blind writes would fill them with noise. Add an active mode whose guidance limits saves to facts that will matter in later sessions, asks the agent to propose a note when unsure, to update an existing note instead of duplicating it, and to report what it saved. Passive stays the default and its block is byte-for-byte unchanged, so existing connections remain configured. The mode is recorded in each block's marker, so agents can differ. Agents that read the same file share one block; the dashboard switches them together and the API rejects conflicting modes for one file. The CLI prints either block with `extras memory instructions --update-mode` (`--mode` already means an extra's sync mode). * feat(memory): review guidance changes as a unified diff The side-by-side Before/After panes made users scan two windows to find the one block that changed. A single Git-style diff shows only the removed and added lines in context, with removals listed first. * fix(memory): flag targets that read guidance in both update modes A tool that imports several shared instruction files can read a passive block in one and an active block in another. The status showed only the best-ranked block, so the target looked configured in one mode while the agent still received the other, and switching modes rewrote just one file. Report such a target as needing attention instead, so the user sets the tools on those files to one mode. * fix(memory): refuse mode switches that would split a target's guidance A target can read intact blocks in more than one file, such as its own file and an imported shared file. Switching its mode rewrote only the file the status pointed at, leaving the other block in the old mode and creating the contradiction the mixed_modes state reports. Skip such a switch as multiple_blocks so the user removes the extra block first. Document guidance modes, mixed_modes and multiple_blocks in the architecture topic, which still described a single implicit mode. |
||
|
|
dd6991ca3c |
fix(push): refuse unpushed config.yaml history at root scope (#366) (#372)
* fix(push): reject unpushed config history at root scope Untracking config.yaml at the tip still uploads its contents from earlier local commits. Refuse root-scope pushes before mutation and before upload when unpublished history adds or changes the file or its directory tree, without rewriting history. Share the check across the CLI and dashboard, return unpushed_config_history, and allow removals and config inherited unchanged from upstream merges. Cover first pushes, dry runs, push --pull, directory paths, renames, and merge commits, and document manual repair in all website locales. Fixes #366 * fix(push): check exactly what push sends for config history Review of the config history guard found two range problems: - The guard checked @{u}..HEAD, but a same-named upstream was pushed with a bare `git push`. With remote.pushDefault or push.default=matching that could send config-bearing commits to another remote, or other branches, that the guard never looked at. PushArgs now always names the upstream remote and branch (read from branch config, so names with "/" survive), so the checked range and the pushed range are the same. - Without an upstream every commit on HEAD counted as unpushed, so a config.yaml already published on origin followed by the "Keep config.yaml out of version control" commit was refused. The guard now checks HEAD --not --remotes=<push remote>. The refusal message now suggests rebasing from just before the oldest offending commit instead of @{u} or --root, which would rewrite commits the remote already has. * fix(push): check config history against the remote's live refs Local remote-tracking refs can be stale. When another machine force-pushes the remote to drop a leaked config.yaml commit, this clone's refs/remotes/<remote>/... still contains it, so the guard treated the leak as already published and HEAD:main, still a fast-forward, would publish it again. The guard now excludes only the objects the push remote's refs point to right now (git ls-remote), limited to objects this clone has. It falls back to local remote-tracking refs only when the remote cannot be reached, in which case the push fails anyway. Revisions go to git log on stdin as "^<id>" lines because git before 2.42 rejects "--not" there. * fix(push): screen config history against every push URL, without replace refs Two more ways the screened history could differ from what git push uploads: - `git ls-remote <remote>` queries the fetch URL, but git push sends to every remote.<name>.pushurl. A commit already on the fetch URL could still be new to a push URL. The guard now lists `git remote get-url --push --all` and excludes only objects that every push URL has. - With a refs/replace/* entry for an offending commit, git log read the sanitized replacement while the push pack carries the original. The log and the rebase-base lookup now run with --no-replace-objects. * fix(push): let pushes the remote will reject reach the pull step Our own review of the config history guard found two problems: - When another machine had pushed, the remote's tip was unknown locally, so no live ref survived the "objects this clone has" filter and the whole history counted as unpushed. A config.yaml published long ago, followed by the stop-tracking commit, then blocked `push --pull` before it could pull, and replaced the plain push's ErrPushRejected hint. A push URL whose destination branch tip this clone lacks rejects the push as non-fast-forward and receives nothing, so it is now left out, and the check passes when every push URL is like that. `push --pull` re-runs the check after pulling, with the tip known. - PushRemote read branch.<b>.remote even when @{u} no longer resolved, while PushArgs then pushed to origin. pushTarget now follows the same HasUpstream rule as PushArgs. |
||
|
|
475b176914 |
fix(pull): keep the local config.yaml when a later pull brings a tracked copy (#362)
* fix(pull): keep the local config.yaml when a later pull brings a tracked copy #357 refuses a root-scope first pull when the remote tracks config.yaml, but once upstream is set, a pull that merges in a remote-tracked copy still replaced this machine's config: Git treats the ignored file as expendable. Snapshot config.yaml around later pulls (CLI pull, push --pull, and the dashboard), restore it, and warn so the user can untrack it with push. Refs #353 * fix(git): untrack config.yaml after push --pull and warn on identical copies push --pull ran the root safety sweep before integrating the remote, so a pull that brought in a remote-tracked config.yaml was pushed back as-is: the remote kept tracking it and the next first pull elsewhere was refused. Re-run EnsureConfigUntracked after the pull and commit the removal before pushing. The warning also depended on the pull changing the local bytes, so a tracked copy identical to this machine's went unreported. KeepLocalConfig's restore now reports whether the repo tracks config.yaml after the pull. * fix(git): only restore config.yaml when the pull could have touched it KeepLocalConfig wrote its snapshot back after every root-scope pull, so an edit made to an untracked config.yaml while the pull ran was silently replaced by the stale copy. Git only rewrites config.yaml when it is tracked before or after the pull, so restore only in that case. * fix(git): restore config.yaml only when the pull changed its index entry Gating the restore on "tracked before or after" still overwrote edits made during a pull when config.yaml was already tracked and the pull left it alone. Compare config.yaml's index entry (mode, blob, stage) before and after the pull instead; a merge, reset or conflict that touches the file changes it, and anything else keeps the current file. * fix(git): warn about a tracked config.yaml only when the upstream tracks it The warning followed the local index, so a config.yaml tracked only by a local, unpushed commit was reported as tracked by the remote, and the suggested push would publish it in history. Check the upstream tree with RemoteTracksConfig("@{u}") instead. * fix(git): restore config.yaml after a pull that aborts its merge A merge that brought in a tracked config.yaml and conflicted elsewhere was aborted, which deleted the file again and returned the index entry to its pre-pull state, so restore saw no change and the local config was lost. Also restore when the snapshotted file is missing after the pull. * fix(git): keep config.yaml ignored when a later rule negates it EnsureConfigUntracked only checked that a "config.yaml" line existed, so a pulled .gitignore with a later "!config.yaml" left the file unignored and the following `git add -A` tracked this machine's copy again. Check the effective ignore state and append an overriding entry when needed. * fix: commit post-pull .gitignore repairs and keep config.yaml's mode push --pull committed only when EnsureConfigUntracked removed an index entry, so a pulled .gitignore that stopped ignoring config.yaml was repaired locally but never pushed, leaving the tree dirty. Commit whenever the safety step leaves changes. KeepLocalConfig skipped the restore when the bytes matched, so a checkout that rewrote config.yaml with the default mode dropped this machine's restrictive permissions. Compare the mode too, and chmod after writing since WriteFile's mode is masked by umask. * fix(git): restore config.yaml over a tracked config.yaml directory A pull that checks out a tracked config.yaml/ tree replaces the ignored local file with a directory, which os.Remove cannot delete, so restore failed and the local config stayed lost. Remove a directory there before writing the snapshot back; its contents are in Git. EnsureConfigUntracked now untracks recursively so push can remove that tree too. * fix: keep post-checkout config edits and preview .gitignore repairs Restore wrote the snapshot back whenever the pull changed config.yaml's index entry, even when a newer copy had been written after Git checked it out. Skip the restore when the file on disk no longer matches the blob the pull checked out. A dry-run push or commit only previewed untracking config.yaml, so when a later "!config.yaml" rule un-ignored it the preview listed config.yaml to commit while a real run repairs .gitignore instead. Preview that repair. * fix: scope the post-pull safety commit and keep post-checkout symlinks The post-pull safety step in push --pull ran `git add -A`, so an edit made by another process while the pull ran was committed and pushed under the config-safety message. Stage only .gitignore on top of the config.yaml removal and commit the index as staged. The post-checkout edit check skipped symlinks, so a dotfiles manager that replaced config.yaml with a newer link after the checkout had it replaced by the stale snapshot. Treat a link where Git checked out a file, or a different link target, as a newer local edit. * fix: preview explicit config.yaml entries and refuse other .gitignore edits A dry run previewed the .gitignore repair only when config.yaml was not ignored at all, but a real run also appends the explicit entry when a broader rule such as *.yaml ignores it. Preview whenever the entry is missing too. The post-pull safety commit staged the whole .gitignore, so an edit made by another process while the pull ran was pushed with it. Refuse unless the file only gained config.yaml lines over its staged version. * fix: report config.yaml restore failures instead of dropping them integrateRemote declared the KeepLocalConfig result with :=, shadowing the named err that the deferred restore joins its failure into, so a failed restore was swallowed and pull or push --pull went on to sync targets with another machine's config.yaml. The dashboard pull replaced the pull's own error with a bare 500 on a restore failure, losing the conflict response and the ops log entry; join the errors so both are reported. |
||
|
|
f76af3f0f6 |
test(plugin): resolve the sandbox home in the Pi npm test (#364)
Native config writes refuse any symlinked ancestor, and macOS temp directories live under /var, a symlink to /private/var. The test pointed PI_CODING_AGENT_DIR into the unresolved sandbox home, so the macOS integration job blocked the change and failed on main. Resolve the home first, as the hooks test already does. |
||
|
|
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.
|
||
|
|
7fccd6ffa5 |
fix(pull): refuse root-scope first pull when remote tracks config.yaml (#357)
When git_root is configured as root, config.yaml is machine-specific and kept out of version control by .gitignore. If a remote repository tracks config.yaml, a first pull silently overwrites the local config.yaml during git merge or git reset. Detect whether the remote tracks config.yaml at root scope before integrating changes in FirstPull and init remote setup. If so, refuse the operation and report guidance to untrack config.yaml on the remote via push before pulling. Co-authored-by: Willie <egg358358@gmail.com> |
||
|
|
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. |
||
|
|
d78e7ce09a |
feat(cli): redesign init and give every command one output style (#360)
* fix(install): omit the empty audit section in dry-run A dry-run skips the security audit, yet the single-skill path still printed the "Audit Findings" heading with nothing under it, which reads as if the audit ran and found an empty result. * feat(init): ask first, confirm a summary, then write The old init asked nine questions in three input styles and wrote files as it went, so cancelling midway left a half-built setup, and detection created tool folders even under --dry-run. Connecting a second machine to an existing repo was only offered at the very end, and the built-in skill defaulted to "no", which read as "not recommended" (#200). init now collects every answer into a plan, shows a summary with Yes / Change settings / Cancel, and writes nothing until confirmed. Esc cancels cleanly. A "Connect my existing skillshare repo" path checks the repo before writing, detects its layout, prefers the repo version of same-name skills and keeps local-only ones for the next push. The built-in skill is installed by default, and the first sync runs at the end so the tools work right away. Prompts use one inline huh-based component with theme colors. Without a terminal (CI, scripts, AI agents) init now applies the same defaults as pressing Enter and prints each decision with the flag that changes it, instead of silently doing less; init -p and --discover add the detected tools. Output that is not a terminal is plain text. BREAKING CHANGE: non-interactive `init` now enables git, installs the built-in skill and selects every detected tool; pass --no-git, --no-skill, --no-targets or --no-copy for the previous minimal setup. Piped or redirected output no longer contains ANSI colors; use --json where offered for machine-readable output. Refs #200 * docs(init): show the new init flow and the connect-a-repo path The getting-started page still described the old four-question wizard with a screenshot of it, the second-machine guide never mentioned the new "Connect my existing skillshare repo" choice, and the recipe told users to run pull and sync after init even though init now does both. Replace the screenshot with ones from the new flow, describe the questions, summary and cancel behavior, and explain what connecting a repo does before and after confirmation. The devcontainer example gains --no-git because init without a terminal now turns git on by default. Refs #200 * feat(devcontainer): seed fake tools and a repo with ssenv --seed Trying init by hand needed several manual steps to fake installed AI tools and a skills repo to connect. `ssenv create --seed` (and `ssnew --seed`) now creates claude/codex/cursor directories with a few skills and a local bare repo at ~/remote/skills.git, so both init paths can be tried at once. Refs #200 * fix(ui): skip the logo on 16-color terminals and hide the cursor while it plays `docker exec -it` sets only TERM=xterm, which reads as 16 colors: the logo was mapped onto the terminal's own palette and its fade-in collapsed into a few flickering cells. Below 256 colors the banner now prints only its text, and the devcontainer sets COLORTERM=truecolor. The visible cursor also jumped along the logo's left edge while frames redrew in place. It is hidden during the animation and restored on exit, including Ctrl+C. Refs #200 * style(ui): color the question mark in prompts The uncolored "?" before each question read like a stray character. It now uses the accent color of the "›" cursor. Refs #200 * fix(init): name the root git scope by what it versions "everything" suggested plugins, MCP servers and hooks were versioned too, but they live in config.yaml, which the root scope gitignores. The option and summary now say "skills, agents, extras" and note that those settings stay in each machine's config.yaml. Refs #200 * feat(init): show --discover in the new init style --discover still printed the old header, "agent(s)" counts and "+ name" lists next to the new prompt. Global and project discover now share init's answered rows (Tools, Config) and a Next line, and call the targets "AI tools" as init's banner does. Refs #200 * feat(init): replace the pixel logo with a SKILLSHARE wordmark The half-block logo looked stretched on terminals with tall line height and turned to mush when shrunk to fit. init now opens with a three-line pixel wordmark, SKILL in blue and SHARE in gold, that lights up from left to right, followed by the version and tagline on one dim line. The generated logo data and its generator script are gone. Without a terminal, without color, below 256 colors or on a narrow terminal, the banner still prints a plain "skillshare vX" line. Refs #200 * refactor(init): label the chosen tools "Targets" init called them "Tools" while the rest of the CLI, the config file and the `target` command call them targets. The answered rows and the summary now say "Targets", the same label the other commands will use. Sentences that describe what was detected ("Found 3 AI tools") stay as they are. The docs tables, the First Sync steps and both init screenshots are updated to match. Refs #200 * feat(cli): ask yes/no questions with the inline prompt uninstall, trash empty, extras remove, target add, collect, update, upgrade and audit each printed their own "[y/N]:" line and parsed the answer by hand, while init already used the inline Yes/No prompt. They now share it: esc answers no, and a declined question prints one dim "Cancelled. Nothing was …" line, as init's cancel now does too. Without a terminal the prompt reads one line from stdin instead, so piped answers such as `echo y | skillshare uninstall x` keep working. It reads byte by byte so a second question still gets its own answer. Refs #200 * feat(sync): report each target on one aligned row Sync printed a ruled header, a "Backing up" block and a "name: merged (43 linked, 0 local, 0 updated, 0 pruned)" line per target, so the counts that changed were hard to find among zeros. It now follows the init style: one row per target with only the non-zero counts, a single Backup row, and a closing line with the duration. `sync --all` names its Skills, Agents and Extras blocks and no longer explains how to set up extras when none are configured. The non-TTY text changes with it; `--json` stays the stable interface for scripts. Tests match rows through the new AssertRowContains helper. Refs #200 * feat(status): show targets as one table Status printed each target as a header with indented skills and agents lines full of bracketed modes and zero counts, and the audit policy as four lines of uppercase labels. Comparing targets meant reading every block. Each target is now one row with a skills and an agents column, a single line names the modes in use, and audit and version take one line each. Global and project mode share the renderer, so project paths read relative to the project root. Refs #200 * feat(install): report each step on one aligned row Install printed a logo, a box-drawn tree, "Next Steps" bullets and a separate "Audit Findings" block, so the result was hard to find. It now uses the same rows as sync and status: Source, Audit and Install with the destination folded to ~, then a closing line and a Next block. Spinners write through a gate that Stop closes before clearing the line. pterm's render goroutine checks IsActive and then writes, so a fast step such as install --dry-run left "Copying files..." stuck in front of the next line. Refs #200 * feat(uninstall): confirm against one line and point at undo Uninstall opened with a boxed header and Name/Path lines, and closed with the trash folder path and a "Next Steps" bullet. Now one line names the target, its folder and what it holds; the result is a single "Uninstall x → trash, kept 7 days" row; and Next offers sync, the trash restore command that undoes it, and the reinstall command when the skill came from a remote source. A batch run with --force or --dry-run no longer lists the targets twice, since there is no question for the list to support. Mixed batches are counted as items, not targets, which already names the AI tools. Refs #200 * feat(update): report each skill or repo on one Update row Update opened with an "Updating" header, the full source path and a "0 tracked repo(s), 1 skill(s)" line, then printed a Changes box and two success lines before "Next Steps". A single update is now an Update row (source or commit count, time), the commits it pulled in dim text, the Audit row, and Next. A batch ends with the audit result and one closing line that leaves out zero counts. Progress bars now clear themselves when they stop, like spinners, so a finished batch no longer leaves "[3/3] ... 100% Done" behind. Refs #200 * feat(check): list what needs attention and close with one line Check opened with a header, the full source path and an item count, counted skills with updates without naming them, and ended with two "Run ..." hints. It now prints one row per repo, skill or agent that needs attention (behind, update available, stale, failed), a closing line that leaves out zero counts, and the update command under Next. A single-name check is one row, like update. Refs #200 * feat(push,pull): report commit, push and pull as aligned rows Push and pull opened with a header and closed with "Push complete" or "Pull complete", so they never said what they committed, where they pushed, or what a pull brought in. Push now prints a Commit row (file count and message) and a Push row naming the upstream branch, never the remote URL since it can carry credentials. Pull prints a Pull row with the commit and file counts and the commits themselves, as update does for a tracked repository, before the sync output. Dry runs list the changed files as ~ + - instead of raw porcelain codes, and error hints are dim notes instead of info lines. Refs #200 * feat(upgrade): report the CLI and the skill on one row each Upgrade opened with the logo and printed a tree of steps per part (current version, latest version, status) ending in "Already up to date ✓". Each part is now one row, such as "✓ CLI v0.22.0 → v0.23.0 · 3.1s" or "✓ Skill v0.23.0, already up to date", with spinners that clear. Sync is offered under Next only when the skill changed, and the star request is a dim line at the end. Refs #200 * feat(new): report the created skill on one row New printed a "New Skill Created" header, the full path, and numbered "Next steps" that told the user to edit the file and run sync. It now prints "✓ Created ~/…/SKILL.md", the folders a pattern added, and sync under Next. A dry run shows the same row, a Preview section with the template, and the dry-run line. Refs #200 * feat(trash): list items and restores as aligned rows The plain trash list printed each item as an info line with its size and age in parentheses under a "Trash" header, and restore printed two success/info lines plus a "Next Steps" label. The list is now rows of name, size and age with one closing count, and restore is one row naming where the item went back, with sync under Next. An item trashed under a minute ago reads "just now" instead of "just now ago". Refs #200 * feat(collect): list local items and results as aligned rows Collect opened with a header, listed local items as "[target] path" list items under a second header, then printed a third header before the per-item results and a metric summary line. It now lists each local item as a row (name, target, path), asks the inline confirm, prints one row per result and closes with "Collected N skills" plus sync and, when the source is a git repository, commit under Next. Refs #200 * feat(hooks): show hooks and their changes as aligned rows Hooks printed "Hooks source: <path>" as an info line, statuses through the fixed-width Status helper, and results as sentences ending in "Run 'skillshare hooks sync' when ready." Hooks and Agent file changes are now rows, with conflicts marked as failures and inactive outputs as warnings, saves and applies close with one line, and the next command sits under Next. The list's "Pending sync" section no longer shows entries that are already in place. Refs #200 * feat(mcp): show servers, changes and checks as aligned rows MCP printed "MCP source: <path>" as an info line, plan changes through the fixed-width Status helper, results as sentences that named the next command inline, and check summaries as "2 server(s) checked: 1 error(s)". Changes and parked servers are now rows with conflicts marked as failures, saves and applies close with one line and Next, and check marks each server with its findings beneath and closes with "Checked 2 servers: 1 error". The Status helper had no callers left and is removed. Refs #200 * feat(plugin): show packages, plans and results as aligned rows Plugin text output was raw "name · target · id · state" lines with "Warning:", "Includes:" and "Revision:" prefixes, and the list walked a map so packages came out in a different order each run. Packages, discovered candidates, planned changes and results are now rows sorted by name, marked by state (registered, not installed, pending, blocked, failed), with details as dim notes and the dry-run line after a preview. JSON output is unchanged. Refs #200 * feat(audit): replace header and summary boxes with rows Audit framed its context in a header box (mode, path, block rule, policy), numbered batch results "[1/2]", printed per-skill verdicts as "→ Aggregate risk / Block decision" lines, and closed with a Summary box that listed every count including zeros. The context is now one title line with a dim note, flagged skills are aligned rows with their highest severity, the summary leaves out zero counts, and the run closes with one line saying whether anything was blocked and by which severity, followed by the command to see the first blocked skill's findings. The progress bar no longer writes its final frame when stdout is not a terminal; that frame had no newline and ran into the next line. Refs #200 * feat(audit): show audit rules as aligned rows The rules list was a fixed-width table framed by 90-character dividers with a "(N rules: N enabled, N disabled)" footer, and rule changes were sentences like "Set severity for X → HIGH". Rules are now rows keyed by ID with a colored severity and the pattern dimmed, disabled rules dim as a whole, the list closes with a count that names disabled rules only when there are some, and each change is one row. Refs #200 * feat(search): drop the logo and tree, show results as rows Search opened with the ASCII logo, drew its progress as a ├─/└─ tree, listed results under a column header with dividers, and ended installs with "Run 'skillshare sync' to distribute to all targets". Results are now aligned rows with the source, stars or risk, and the description and tags beneath; a single install reports the same Install row as `skillshare install`; batch installs list only failures before one Done line; and sync and audit sit under Next. Login and rate-limit problems name the command that fixes them. Non-terminal output no longer prints a "name: installing..." line per skill. Refs #200 * feat(backup): show backups and restores as rows with one closing line Backup and restore opened with headers, announced dry runs with a warning before doing anything, summarized with an operation box, and followed a backup with a "Recent backups" list. Targets now back up in name order as rows with folded paths, runs close with one Done line (and Next restore), listings are rows keyed by timestamp or path with a total, and dry runs end with the shared dry-run line. Cleanup reports how many backups remain instead of a separate "Current" line. Refs #200 * feat(help): one line per command, subcommands in each command's help The top-level help opened with the ASCII logo and listed about 70 lines across ten uppercase sections plus 15 examples, so it did not fit a screen, yet it left out analyze and the common options. It now lists each command once in six groups with the common options, and points to `<command> --help` for subcommands. The mcp, plugin, hooks and extras pages use the same layout and keep all their content. A mistyped command prints one error with the closest command instead of the whole help, a lone option such as --no-tui shows the help, and `skillshare version` prints one line. Refs #200 * feat(extras): show extras and their changes as rows with Next Extras printed a header, "→ name" lines with ad-hoc colored marks (including ✗ for targets that were only waiting for a sync), and ended each change with a sentence naming the next command. The list now shows each extra as a bold name over aligned target rows (! for drift or not synced) and closes with a count and, when something is pending, Next sync extras. Init, collect, add/remove target, mode and source changes close with one Done line, details become notes, and dry-run collect ends with the shared dry-run line. Refs #200 * feat(target): show targets as sections and rows with Next Target info and the plain list printed "Key:" lines at two indent levels, with "(none)" for every unset filter, and remove printed "Backing up" / "Unlinking" headers with one line per step. Info now shows the name over Skills and Agents sections with aligned rows, the list gives each target one row per resource with details dimmed, and empty filters are left out. Remove reports one row per target (plus its backups) and closes with a Done count; dry runs say what would happen per target and end with the shared dry-run line. Skills on/off, add and mode/naming/filter changes close with Done and Next. Refs #200 * feat(doctor): report checks as aligned rows and end with Next Doctor opened with the ASCII logo, split its report under divider headers, mixed ✓/→/! lines with full paths and "(s)" counts, listed targets in random map order, and ended with a bare warning count that left the fix to scattered "Run:" hints. Checks now print as aligned rows under bold sections (Environment, Targets, Extras, MCP/hooks/ plugins, Storage, Version), paths fold to ~, targets are sorted with one row per resource, and the report closes with a Done line plus up to three Next commands collected from the checks (sync, sync agents, sync hooks, upgrade, ...). The --json output is unchanged. Refs #200 * feat(hub): drop the logo and report hub changes with Done hub index opened with the ASCII logo and a tree of spinner steps, then repeated the result as "→ Mode / Skills / Output" lines with the full path. It now shows one spinner that clears itself and a Done line naming the folded output path, skill count and duration, with the index contents as a note. hub list shows aligned rows with the default and built-in hubs marked in dim text instead of a "*" column, and the add, remove and default commands close with a Done line. Refs #200 * test(install): match the shared dry-run line in online tests The online-tagged install tests still looked for the old "dry-run" banner, which install no longer prints since the restyle. They are skipped by default, so the mismatch only showed under -tags online. Refs #200 * fix(target): align remove rows on target names only The label column was sized for "<name>-agents" so an agents backup could fit, which left a wide gap on every row when no agents were backed up. The agents backup row now uses the target name too and says "agents backed up", so the column fits the names. Refs #200 * fix(update): list each item in a batch dry run A batch dry run only said "Would update N skills". Off a terminal the names leaked out through the progress bar's title lines, but on a terminal those lines clear, so the dry run never said which skills or repos it would touch. It now prints one Update row per item, as the single-item dry run does. Refs #200 * fix(ui): keep the progress bar silent off a terminal Off a terminal the bar printed "Title (0/N)", every title change and every phase header as permanent lines, which a terminal shows only as a frame that clears itself. Audit left a stale "Scanning skills (0/7)" line, and scripts saw different content than a terminal. The bar now prints nothing off a terminal, like the spinner. Refs #200 * fix(audit): avoid a double blank line before Summary The audit header ends with a blank line and Summary added its own, so a clean scan with no result rows showed two blank lines in a row. The Summary title no longer adds one; the result rows add it when present. Refs #200 * fix(mcp): drop the blank line above "Saved the MCP source" A save with no backup or migration notes printed a blank line with nothing above it, so mcp add and mcp edit opened on an empty line. Refs #200 * fix(doctor): stop repeating the extra's name in its findings Extras findings printed "rules rules → /home/me/.claude/rules: 1 file(s) out of sync": the row label already names the extra, the path was not folded to ~, and the count used "file(s)". The rows now start at the arrow, fold the path and pluralize the count. JSON details keep the extra's name so each line still stands alone. Refs #200 * fix(doctor): show integrity issues as rows under Integrity Tampered skills and missing hashes printed as free "! Skill integrity: N skill(s) ..." lines after the verified row, breaking the aligned Environment rows. They now sit under a single Integrity row, which turns to ! when any skill has an issue. Refs #200 * fix(doctor): pluralize the Skillignore and Trash rows The rows read "1 patterns, 1 skills ignored" and "1 item(s) (50 B), oldest <1 day". They now read "1 pattern, 1 skill ignored" and "1 item, 50 B · oldest under a day". The JSON messages keep their wording, since scripts may match on them. Refs #200 * docs: show the restyled output of batch 3 commands The reference pages still showed the old output of upgrade, new, trash, collect, audit, search, backup, restore, extras, hub, target and doctor: divider headers, arrow-prefixed lines and "(s)" plurals. The examples now match what the commands print, in all five locales, and the doctor check table uses the new row labels. Refs #200 * feat(trash): let trash empty skip its confirmation with --force Scripts had no way to empty the trash: off a terminal the confirmation reads stdin and cancels on EOF. --force (-f) skips it, as it does for uninstall and extras remove. Refs #200 * fix(doctor): show source, link and target problems as rows Missing sources, unsupported links, folders without SKILL.md, unknown skill targets, bad include/exclude patterns and broken symlinks printed as free "✗ Source not found: …" lines between the aligned rows. They now use the row of the check they belong to, and broken symlinks or a missing source add a Next suggestion. Refs #200 * fix(ui): leave out durations that would read 0.0s Fast commands ended with "· 0.0s", which says nothing. Every result line now formats its time through ui.Took, which init already used for its steps: durations under 0.05s are left out. Refs #200 * fix(ui): print dev builds without a v prefix Version labels were built as "v" + version everywhere, so a dev build printed "vdev". VersionLabel adds the prefix only when the version starts with a digit, and the logo, help header, version command and upgrade output share it. Refs #200 * fix: pluralize category and drop "just now ago" The checklist status bar appended "s" to its item name and printed "categorys". The trash TUI formatted ages with its own helper that added "ago" after "just now". plural now handles consonant + y, and the trash TUI uses the shared timeAgo, which makes formatAge unused. Refs #200 * fix(target): drop the parenthesized counts in the plain list The plain target list printed "merged (43 shared, 0 local)" while target info and doctor print "merged · 43 shared" with zero counts left out. The sync summary now returns both forms from one scan, so the TUI and --json keep their existing text and the plain list matches the other commands. Refs #200 * test(backup): make the agents backup test back something up The test only synced agents, which become symlinks into the source and are skipped by backup, so it passed without any backup being written. It now adds a target-local agent and checks that the file lands in the backup. Refs #200 * refactor(cli): render every command's --help with printHelp About forty help pages were hand-aligned raw strings with "Usage:", "Options:" and "Examples:" headings, while hooks, mcp, plugin, extras and the top-level help already used printHelp. They now share it, so headings, option order (short flag first) and alignment match across commands. Examples align on their own column so long commands no longer push option descriptions to the right, and "--help, -h" rows are dropped as on the converted pages. Refs #200 * feat(enable): print enable and disable results as rows enable/disable still used the old "Disabled: x (added to .skillignore)" line plus a "Run skillshare sync" sentence. They now print one row per pattern, a Next hint after a change, and the dry-run closing line, like the other restyled commands. Refs #200 * fix(sync): pluralize the leftover cleanup note Project sync printed "Cleaned 1 leftover skill(s)". The note now uses the singular or plural noun, and the sync docs show it as the dim note it is instead of an arrow line. Refs #200 * fix(cli): drop the arrow info lines left in install, update and sync These commands were restyled, but about fifty messages still went through ui.Info, which prints a leading arrow, and several said "skill(s)" or "item(s)". Hints now print as dim notes, empty results ("No agents found") as closing lines, follow-up commands as Next, and counts use the singular or plural noun. Refs #200 * fix(cli): tidy small leftovers found in the recorded output doctor printed "0 minutes ago" for a fresh backup and an ASCII arrow in the Update row, unlike trash and upgrade, which say "just now" and "v1.2.0 → v1.3.0". The "bring the Targets up to date" hint capitalized a word mid-sentence, and search --list showed hub sources under the home directory as a cut-off absolute path instead of folding it to ~. JSON messages keep their wording. Refs #200 * fix(search): fit a home-folded source path in the list Folding the home directory to ~ was not enough: a typical local hub path such as ~/.config/skillshare/skills/frontend/react is 42 characters, so the 40-character cap still cut it. Fifty characters next to the 24-character name column stays within 80 columns. Refs #200 * feat(list): print the plain list with rows and a closing count The --no-tui list still used the old header with a divider and an arrow on every skill, so it looked unlike every other restyled command. Skills now line up in one column under their group, tracked repos use the ✓ / ! marks, and the list closes with a count split by tracked, remote and local (zero counts left out). Project mode keeps its scope as a dim "· project" after the title. Global and project had copied the same plain-output code; both now call printSkillList. The loading spinner clears itself instead of leaving a "Loaded N skills" line. Refs #200 * fix(cli): show help for subcommand --help instead of running it target add/remove/list, trash list/empty and hub list/remove passed --help through as an argument, so they ran the command, failed on a target or hub named "--help", or rejected the flag. tui on --help even switched the TUI on. Each now prints its command's help page. The tui status and toggle lines also move to the row and Done style. Refs #200 * feat(diff): print differences as rows and close with next steps The plain diff still printed a Summary line, divider headers, arrow hints and per-target "scanning" lines when output was not a terminal. Each group of targets now lists one row per kind of change ("New a, b"), targets in sync share a single ✓ row, extras use the same rows, and diff closes with a count and up to three commands. The suggested sync command follows what differs: sync, sync agents, sync extras or sync --all. Agents no longer show as "New 1 skill", because rows name the change rather than counting skills. "skillshare diff all", listed in the help, failed with "target 'all' not found"; it now diffs everything, the same as no argument. Refs #200 * test: sync the install warning summary and gofmt two status tests The "6 findings" wording changed in an earlier commit, but the unit test under cmd/ still expected "6 finding(s)": scripts/test.sh and make check only run ./internal and ./tests, so the cmd tests never ran. Two status tests also had comment alignment gofmt rejects, which fails make check's fmt-check. Refs #200 * test: run the cmd unit tests in scripts/test.sh CI runs go test ./cmd/skillshare/... ./internal/..., but the local runner behind make test and make check only ran ./internal/..., so a stale assertion in cmd/skillshare passed locally and would only fail in CI. Refs #200 * feat(cli): restyle commit and analyze output commit and analyze were the last git and inspection commands still printing the old header and table layouts. They now use the same rows, Done line, and Next hints as push and pull, so a commit reads like the commit row of push, and analyze shows each target group as a bold name with aligned token rows instead of a boxed table. Refs #200 * feat(log): show entries as rows and fold the log path The plain log view still opened each section with a boxed header that printed the absolute log path, then a TIME | CMD | STATUS table. Entries now read like every other command: a status mark, the command, when it ran and how long it took, with details indented beneath. The log path is folded to ~ and moves to a dim footnote. log --stats drops its divider and ends with one summary line. It and the TUI stats panel said "just now ago" for a fresh entry; both now use timeAgo, which already handles that case. Refs #200 * feat(cli): restyle completion, ui and leftover arrow lines completion --install, ui start/stop and a few notices still printed arrow info lines with absolute paths. They now end with a Done line, fold paths to ~, and give config-file lines their own bold heading so the lines to paste read apart from the hints. The empty extras TUI now says the same thing as extras list. Refs #200 * feat(init): report git changes on an existing setup as rows init --remote and init --git-root on an existing setup still printed arrow lines with absolute paths and spinner results in a different voice. They now print aligned Git, Remote, Pull and Git root rows like a fresh init, end a dry run with the shared Dry run line, and give the choices after a remote check as Next commands. A source repo the user created before init had no fallback identity, so on a machine without git config the follow-up commit failed and dumped git's whole "Please tell me who you are" message. The existing repo now gets the same local fallback a new one does. Refs #200 * feat(doctor): warn when a newer built-in skill is published status already compared the skillshare skill with the published one, but doctor only printed the local version, so a run meant to find problems called an old skill healthy. doctor now fetches the published version alongside the CLI update check and suggests upgrade --skill. Both commands share a semver comparison. status compared with !=, so a skill ahead of main (a dev build) was reported as having an update. Refs #200 * fix(cli): count batch audit warnings in words and clear progress spinners The batch install and update audit summary still printed "2 skill(s)" and "warning(s)" after the rest of the output switched to "1 skill" / "2 skills". uninstall and agent update also left "Found N skills" and "Check complete" behind, progress messages the restyle clears. Refs #200 * fix(cli): say so when diff or analyze has no targets With no targets configured, diff reported "No differences" and analyze printed only its "Add -v" hint, both reading like a healthy result. They now say no targets are configured and suggest target add, as target list does. Refs #200 * fix(diff): align values across target sections Each target section sized its labels on its own, so a section with "Local only" started its values two columns later than one with only "New", and the list read ragged. All sections now share one width. Refs #200 * fix(doctor): count built-in skill warnings in the summary The skill rows (not found, missing version, newer version available) were marked as warnings and counted by --json, but never reached the text summary, so doctor could print "! Skill not found" and close with "All checks passed". The all-good integration test only passed because of this; it now installs the built-in skill it needs. Refs #200 * fix(init): stop writing a git identity into existing repos On a repo the user created, init stored skillshare@local in the repo config so its one commit would work. That setting outranks --global, so the advice we printed never took effect and later pushes went out as skillshare@local. The commit now gets the fallback through env vars only. The note for repos init creates names the repo-level command that actually overrides it. Dry runs also wrote .gitignore into existing repos while closing with "nothing was written", and warned about --no-git when it was not passed; both now only describe what would happen. Refs #200 * fix(cli): tell "no targets" apart from "nothing reaches them" diff and analyze said "No targets configured" and suggested adding one whenever there was nothing to show, including when targets exist but have skills turned off or no skill is meant for them. Refs #200 * fix(log): drop the trailing separator on instant entries Entries with no recorded duration ended in a dangling " · ". Also removes the formatRelativeTime alias the stats restyle left unused; its test now covers formatDurationShort directly. Refs #200 * docs: match tui, project list and log examples to the real output The tui and project list examples used label widths the CLI does not print, and the plain log example claimed to show non-TTY output, which joins each entry's details on one line. Refs #200 * perf(version): cache the published skill version for a day doctor and status asked GitHub for the latest skill version on every run, adding up to 3 s when offline. They now reuse the answer for 24 hours, the same interval the CLI update check caches for. upgrade --skill still fetches fresh and records what it got. Refs #200 * perf(server): reuse the cached skill version on the dashboard The version endpoint fetched the published skill version on every call, like doctor and status did, so it now shares their 24-hour cache. It also treated any difference as an update, offering a "newer" skill to anyone running a local build ahead of main. Refs #200 * test(redteam): match the restyled update --diff heading update --diff now titles its file list "Files changed" in sentence case, like every other section, so the check for the list looked for the old "Files Changed" box title and failed although the list was there. Refs #200 * test(cli): keep /tmp fixtures unfolded where HOME is /tmp scripts/test.sh now runs the cmd unit tests, so the docker sandbox runs them too, with HOME=/tmp. shortenPath then folds the /tmp fixtures in four tests to ~ and their exact-path checks fail. The tests now point the cached home elsewhere while they run. Refs #200 * fix(init): find skills/ in a repo that holds nothing else The check for a skills/ folder ran only when the repo root had no skill folders, but it counted skills/ itself as one, so it never ran. A repo with only skills/ became the source as a whole, one level too high. Refs #200 * fix(init): keep the skills git scope for a custom source With a remote that has no skills yet, init defaulted to versioning the whole skillshare folder. For a --source outside that folder it holds none of the user's skills, so the commit and every later push carried nothing while init reported the remote as linked. Refs #200 * test(sync): check only the Agents section for updated agents The restyle turned the old "0 updated" check on the agent summary into "no 'updated' anywhere", which also covered the Skills section. On macOS the first project sync reports the skill as updated there, so the test failed on something it was never meant to check. Refs #200 |
||
|
|
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. |
||
|
|
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 |
||
|
|
4e3b2b269a |
fix(sync): report include patterns that match no skill (#326)
Target include/exclude patterns are matched with filepath.Match against the source-path flat name, while target_naming: standard shows the bare SKILL.md name in the target directory. A pattern written with the name the target shows selects nothing, so sync prunes the entries a working pattern had linked, and the only trace is the echoed include: line, which never says that any of those patterns matched zero skills. Add FindUnmatchedIncludes and render one diagnostic per include pattern that selects no discovered skill, suggesting the flat names whose last path segment is the pattern. exclude is left alone: an exclusion that blocks nothing is the normal state of a spare filter, while an include that selects nothing is always a mistake and is the destructive direction. The diagnostic goes to DiagOutput, so --json output is unchanged, and no filtering, naming, or pruning behavior moves. Closes #325 |
||
|
|
9bdc1b3a22 |
fix(hooks): Git hook follow-ups from #310 (#317)
* fix(hooks): report inactive Git reasons once and warn on a git account The inactive reason from #310 was appended to every change message and also added to the plan warnings, so the CLI and the dashboard preview showed it twice. Global and project roots on the same old Git added the same warning twice as well, which the preview uses as a React key. Keep the reason in inactiveReason and a single deduplicated warning. The git binding always manages Git config hooks, so an account target named git silently lost its hooks. Warn when an entry uses that binding; stay quiet otherwise so doctor does not warn about a valid config. The planner tests for file decisions and main checkout origins no longer depend on Git 2.54 now that actions are not relabeled, so they run on older runners too. Validation: make check in the devcontainer (Git 2.39.5); each new test fails without its fix. * fix(doctor): report missing Git as inactive instead of unsynced When Git is not installed, Git hook outputs are skipped with an inactive change. Doctor listed it as "not synced (inactive)" and suggested running sync, which cannot install Git. Report the reason instead, and only suggest sync when a change is pending or conflicting. Validation: make check in the devcontainer; the new integration test runs doctor with an empty PATH and fails without this fix. |
||
|
|
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 |
||
|
|
5dd0260ad3 |
feat(doctor): check MCP servers, hooks, plugins and extras drift
Doctor only diagnosed skills and agents. MCP, hooks and plugins had no check at all, and extras only confirmed that the source and target parent directories existed. Their misconfigurations stayed hidden from both the CLI and the dashboard's Doctor page. Doctor now reuses each domain's own read-only logic in both modes: - MCP: the static part of mcp check (env, command, client rules, sync), without DNS lookups or starting servers - Hooks: the hooks sync preview (failures, pending changes, conflicts) - Plugins: the plugin sync preview without fetching sources, run only when a package exists - Extras: config validation, broken links in targets, and drift as diff reports it (flatten/extension targets are not compared) The dashboard labels for these checks, plus the shared_target_paths, cross_target_discovery and tracked_repos checks that had none, are translated in every locale. |
||
|
|
1a27dcb363 |
fix(mcp): treat a project's Claude off switch as the current scope
In project mode a disabled Claude server is written to the project's off list in ~/.claude.json, so its native target carries the project root. changeRoot returned that root, while project mode keys its own scope as "". mcp check lost the sync state of these switches, and `mcp remove --keep-files` never forgot their ownership, so the next sync still removed the switch it promised to keep. |
||
|
|
a4601361f2 |
fix(mcp): keep project-mode changes in the current scope
Adding the current project root to the roots used for Change.Root made every project-mode change report that root instead of "". mcp check, the dashboard matrix and the CLI's targetless list all key project-mode changes by "", so pending syncs and conflicts disappeared from them. Ownership already records its own scope, so Change.Root does not need it. |
||
|
|
54b39d0741 |
fix(mcp): preserve default homes in account shells (#312)
An Agent environment override pointing at a declared account must not redirect the plain target and prune its default home. Use account-aware resolution for sync, import and dashboard reads. Park entries whose home no longer resolves, retain ownership, and record entry scope so intentional project cleanup still works. Cover the account-shell reproduction, directory aliases and scope recovery with regression tests, and document the warnings. Co-authored-by: Willie <egg358358@gmail.com> |
||
|
|
a2d75300f6 |
fix(sync): prune only agent copies skillshare wrote in copy mode
Copy and extension modes pruned every unexpected .md (or output-extension) file in the agents target, so agent files a user kept there were deleted on the next sync, unlike skills copy mode, which prunes only manifest entries. Copy and transform outputs are now tracked with the same checksum manifest the merge fallback already uses, and prune removes only tracked copies the user has not edited. Existing copies are adopted while their agent is still synced, and an untracked pre-transform .md that still matches its agent is treated as a stale copy, so switching to an extension keeps cleaning it up. Copies already orphaned before upgrading are kept and must be removed by hand. copyTracker.pruneOrphans now continues past a failed removal and joins the errors, so one locked file no longer leaves the other orphans behind. |
||
|
|
33ef407e9a |
fix(hooks): report global config load errors instead of hiding them
When config.Load failed, the hooks CLI silently ran without account targets, so users saw `unsupported Agent "codex-2"` and parked ownership instead of the real configuration error. |
||
|
|
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 |
||
|
|
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.
|
||
|
|
83ac85bae4 |
feat(mcp): default new Pi servers to the built-in MCP
`mcp add --target pi` without `--pi-extension` failed at render time with "Pi requires piExtension", so scripts had to know about Pi's modes before they could add anything. The maintainer decided new servers that reach Pi should use Pi's built-in MCP (Pi >= 0.99.0) when no mode was chosen. `mcp add` and `mcp import` now store `piExtension: builtin` at creation time when the server's own or inherited targets include Pi or a Pi account. The mode of other servers is not consulted, stored values are never rewritten, and switch-only entries keep inheriting the global server's mode. renderPi still refuses an entry without a mode, so a hand-written config stays explicit. Integration tests prove the built-in file follows the scope: ~/.pi/agent/mcp.json globally, <root>/.pi/mcp.json in project mode and for a server under mcp.projects. |
||
|
|
be18505dae |
fix(completion): complete missing subcommands and flags
The five completion scripts are hand-written and had drifted from the CLI's argument parsing. Some entries sent users down paths that no longer exist: `backup restore` backed up a target named "restore", `extras mode` only printed help, `install --source` failed as an unknown option, and `hub index --audit-skills` was rejected because the flag is `--audit`. pull, push and commit were offered -p/-g, which they ignore. Those stale entries are gone, and the scripts now complete: - backup files list/show/restore, audit rules disable/enable/severity/ reset/init, ui start/stop, mcp edit (bash, PowerShell, Nushell) - sync scopes and the `agents` kind keyword where commands accept it - flags the CLI parses but no shell offered, among them sync --quiet, status --json, new/search flags, enable/disable --kind, backup --delete/--all, restore/trash --all, ui --base-path/--clear-cache/--app, hub add --label, hub default --reset, mcp --disabled/--keep-files, analyze --verbose/--filter, init --git-root/--visible/--config and the extras subcommand and `extras <name>` flags - fish: the target filter flags, --agent and --config-dir, and restore PowerShell also stops swallowing a flag typed as the second word for commands that have a subcommand list, so adding list, sync and the other kind-aware commands to that table keeps their flag completion. The completion reference page in every locale listed the stale subcommands; it now lists the current ones. |
||
|
|
71583e1cf4 |
fix(completion): complete the remaining mcp flags in fish
Fish offered only the Pi and check flags for mcp and left out edit, while bash and zsh completed --url, --target, --sync, --dry-run and the rest. The fish script now lists the same mcp flags and subcommands. |
||
|
|
8c98ab3b51 |
test(completion): exercise zsh and fish completions
The completion tests only grepped the generated scripts, so a script that parses but offers nothing, or a flag listed in the wrong place, passed. These tests load the scripts in a real fish (complete -C) and a real zsh (compinit under zpty, capturing what compadd receives) and assert the mcp subcommands and the mcp check flags, including --live and --timeout. They skip where the shells are not installed; the testing wiki says how to run them in a throwaway container. Refs #141 |
||
|
|
33c64a78c2 |
feat(completion): complete mcp check --live and --timeout
mcp check gained --live and --timeout, and a flag that no shell offers is one users do not find. All five completion scripts list both with the other mcp flags, and the all-shells test asserts they are present. Refs #141 |
||
|
|
b7969308bf |
feat(mcp): probe servers live with mcp check --live
The static check can say a variable is set and a command is on PATH, but not whether the server actually starts and speaks MCP, which is the other half of "synced, but the Agent does not see it". --live runs after the static checks and only for servers without a static error. A stdio server is started with the current environment plus its env and fromEnv values, probed with server/discover and, for servers before 2026-07-28, the initialize handshake, then stopped: stdin closed, then SIGTERM and SIGKILL to its process group. A remote server gets a Streamable HTTP POST with its resolved headers; a 401 reports the WWW-Authenticate resource metadata as a warning and never signs in. Each probe has one timeout (--timeout, default 10s), a few run at once, and configured values are redacted from every message. Without --live nothing is started and no request is sent, and the dashboard API stays static. Refs #141 |
||
|
|
d938fc8853 |
feat(completion): complete mcp check and --no-dns
skillshare mcp check shipped without shell completion, so tab never offered the subcommand or its --no-dns flag. Each shell now lists check among the mcp subcommands and --no-dns among the mcp flags, described as "Skip host lookups" where the shell shows descriptions. PowerShell and Nushell had no mcp subcommand list, so they gain one in their existing plugin style. |
||
|
|
f43a6734eb |
feat(mcp): check servers under mcp.projects
A global config syncs every mcp.projects root in the same plan, but mcp check only looked at the global list, so a project server with a missing variable, an unresolvable command, or an entry out of sync went unreported. Check now covers each root's servers in global mode, rendering client rules in that root and reading sync state from the plan's changes with the same Root. Each result carries the root in a new project field (empty for global servers), and name filtering and the unknown-name error span every scope. |
||
|
|
90950f701a |
test(mcp): cover mcp check end to end in global mode
Exercises the built binary: exit code 1 and the JSON shape when a variable is missing, exit code 0 after sync with the variable set and no value printed, and the known-server list for an unknown name. |
||
|
|
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. |
||
|
|
a040eacf83 |
test(sync): compare the resolved extras path on macOS
TestSyncExtras_ProjectJSONReportsResolvedPath failed on the macOS CI runner: the CLI reports the real target path, and the macOS temp dir sits behind the /var -> /private/var symlink, so it no longer matched the unresolved path the test built. Resolve the expected path the same way, as json_output_test.go already does. |
||
|
|
be597055d7 |
fix(sync): validate and log agent-only project sync
`sync -p agents` skipped config validation and wrote no operation log entry, unlike `sync agents` and `sync -p`. A target with invalid settings still got agents synced into it, and the run was missing from `log` and the dashboard's Last sync card. It now skips invalid targets and reports them as failed, exits non-zero, and logs one sync entry with targets_failed and failed_targets. |
||
|
|
8f7d3da4c2 |
fix(sync): let a project target without a path fail alone
`sync -p` resolved every target's path before validating the config, so one custom target without `skills.path` stopped the whole project sync with "unknown target ... (missing path)" before any target ran. Sync now validates first and resolves only the valid targets; the target without a path is reported as "invalid config: missing path" and the others still sync, as they already did for other invalid settings. |
||
|
|
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. |
||
|
|
85bf933451 |
fix(uninstall): log project uninstalls with global oplog semantics
The project wrapper logged every call, including --help (recorded as a skill named "--help"), resolve errors, declined prompts and dry runs, and always with zero succeeded, so a partial uninstall never showed as partial. Project uninstall now logs once when it has run, with the real succeeded count, exactly like global. The project list TUI, which calls it directly, now logs its uninstalls too, as the global one already did. |
||
|
|
5b54dd67b7 |
fix(uninstall): report specific resolve errors in project mode
Project uninstall had its own name resolver that turned every problem into "not found", hiding that a name matched several nested skills or pointed at a file. It now uses the global resolver, so both modes report the same specific errors; only the not-found wording still names the project's skills directory. |
||
|
|
880dad5c22 |
fix(status,list): show unreadable git status as unknown instead of clean
status and list discarded the error from the uncommitted-changes check, so a tracked repo whose git status could not be read was shown as up-to-date. They now show it as unknown with a warning naming the repo and error; status --json sets the existing status and message fields. The commands still succeed, since they only report. |
||
|
|
350d71f41c |
fix(uninstall): keep project operational gitignore entries in .skillshare
Project uninstall backfills logs/, trash/ and backups/ into a gitignore
for projects created before v0.17.3. Since
|
||
|
|
60732db37a |
test(integration): pin global and project uninstall differences
Before merging the two uninstall flows, pin where they differ today (glob expansion, resolve errors, --json support, preflight messages, prompts, dry-run and gitignore output, lock pruning, oplog) so the merge and the fixes that follow show up as deliberate test changes. |
||
|
|
0793ebe3c6 |
fix(update): fail tracked repos whose git status cannot be read
update discarded the error from the uncommitted-changes check, so a repo whose git status could not be read was treated as clean and pulled over whatever local edits it had. It now fails that repo with "failed to check git status: <err>" unless --force, matching uninstall and the Web API. Batch update counts these as failed instead of skipped and exits non-zero. |
||
|
|
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. |
||
|
|
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. |