mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 12:23:22 +00:00
080bb3e5e4e665e7e776aa0f9233b8da62841657
291
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3f1a4d1310 | Merge remote-tracking branch 'origin/main' into runkids/project-config-symlink-policy | ||
|
|
f4c77d53c3 |
fix(config): refuse project config writes that leave the project
Saves follow a symlinked config.yaml to its target so dotfile links survive. For a project config that also lets a cloned repository point .skillshare/config.yaml at any file the user can write, including one that does not exist yet, and every project save, plugin change, hooks change, MCP change, or legacy migration would then rewrite or create it. All five writers now resolve the destination through one helper, utils.ConfigWritePath. A global config keeps writing through its link. A project config must resolve inside its project; otherwise the save fails and names the link so the user can replace it with a regular file. The one-time legacy migration skips persisting instead, and the next save reports the link. |
||
|
|
f2f663689b |
fix(install): warn about submodules on tracked updates
The CLI and dashboard update a tracked repo through update.TrackedRepo, which never looked for submodules. A pull that turned a skill directory into a submodule reported success and the skill vanished on the next sync. TrackedRepoResult now carries the skipped-submodule warnings and both callers show them. Refs #433 |
||
|
|
b7265d6496 |
fix(install): refuse git submodule paths instead of installing empty dirs
skillshare never fetches submodules, so a gitlink is an empty directory after any clone. Installing that path reported success with nothing in it, a path inside it failed with a misleading "does not exist", and whole-repo discovery dropped its skills without a word. Refuse a subdir that is or lies inside a submodule, naming the submodule, its pinned commit and upstream URL, and warn for each submodule skipped by whole-repo discovery and --track. Refs #433 Release-As: 0.25.1 |
||
|
|
3875c16e26 |
docs(extras): describe how prepend and append blocks behave and fail
The pages added with the block modes covered what they write, not what the review fixes made them do. The sharing guide still said sync overwrites a modified target, which is wrong for a block: sync stops until the edit is collected or the block is rewritten. The guide, the extras reference and the built-in skill now cover the block's Collect and Rewrite choices, block statuses, the target file dialog, what a mode change removes, how restore treats a block, and the cases a block target is refused. Common errors gains an Extras section for the four new messages. The --mode help of extras init, --add-target and the mode command listed only import among the single-file modes; it now lists prepend and append too. Refs #436 |
||
|
|
05ff8c675a |
feat(extras): prepend and append modes for single-file extras
Tools without an @import directive (codex, gemini, cursor) could only take a shared instruction file as a symlink or copy, which replaces the target's own file. Teams that want one shared AGENTS.md plus the user's own notes in the same file had no way to express that. prepend and append write the source into the target file as a managed block fenced by skillshare:extra markers that carry the source path and a content hash. Sync inserts the block once and then rewrites it in place, status reports modified when the block body no longer matches its hash, Collect copies the edited body back to the source, Reapply rewrites the block from the source, and restore removes only the block. Lines outside the block, and markers inside code fences, are never touched. Several managed blocks (and an import line) may share one target file; the connection validator only rejects a file when a replacing mode (symlink, copy, merge) is involved. Refs #436 |
||
|
|
d62fa4fd3d |
docs: sync docs with the 0.25.0 changes
Bring the pages, the built-in skill and the translations up to date with the pending release before the Release PR is reviewed: the README Latest callouts for v0.25.0; mcp serve, Oh My Pi, DeepSeek Harness and GitLab Duo in the ja, ko, zh-Hans and zh-Hant pages; the `--` option and the --enable rollback of link and unlink; the missing serve skip reasons and its cross-origin refusal; standard naming rules; junctions kept across volumes; OMP accounts receiving native code hooks; and the 79-target count. |
||
|
|
2647e79ef9 |
feat(mcp): require HTTPS for mcp serve off loopback
A non-loopback --http listener accepted a bearer token over plain HTTP, so anyone on the path could read the token and the skills. Off loopback it now also needs --tls-cert and --tls-key and serves HTTPS; loopback stays plain, so a TLS-terminating proxy in front still works. |
||
|
|
d13e03adfc |
fix(mcp): skip skills whose compatibility exceeds the format limit
The Agent Skills format caps compatibility at 500 characters, and hosts that validate entries reject longer ones, so serve skips such a skill with a warning, as it does for an overlong description. metadata is deliberately not held to the format's string values: lists there are common, tool-fallback clients read them fine, and skipping those skills would hide them from every client to satisfy a few. |
||
|
|
96593f9411 |
fix(mcp): quote the served target and cap skill descriptions
A managed project's name may hold spaces, so the Skillshare tab built `--target my app@claude`, which the save path split into two words and serve rejected as an unknown target. The command is now joined from quoted words. The Agent Skills format caps a description at 1,024 characters, and hosts validating entries reject longer ones, so serve skips such a skill with a warning instead of advertising it. The docs list every skip reason. |
||
|
|
cc7d802411 |
feat(mcp): serve skills over MCP with the SEP-2640 Skills extension
Agents on a disposable VM, in a hosted assistant or behind an MCP gateway can reach an MCP endpoint but not the folder skills sync to, so they got tools and none of the user's skills (#428). `skillshare mcp serve` is a read-only server for the skills skillshare already manages. It declares io.modelcontextprotocol/skills and implements skills/list, skills/get and resources/read: one entry per skill, its URI from the source path, the full frontmatter, and every file with a sha256 digest and size. --target applies that target's selection, and the source is reread at most every 5 seconds so install, update, enable and disable show up without a restart; unchanged files keep their digest. stdio is the default; --http serves Streamable HTTP and needs SKILLSHARE_MCP_TOKEN off loopback. Skills the extension cannot carry are skipped with a warning instead of being published incomplete: a name that breaks the Agent Skills rules or differs from its directory, more than 512 files or 16 MiB, or a nested skill that is not served. --check lists them without serving. The naming rules moved to internal/skillpkg so sync and the server share them. Few clients support the extension yet, so the server also offers list_skills and read_skill tools. A client that declares the extension does not see them, so it never gets each skill twice. sync.SelectTargetSkills is the one place that turns discovered skills into a target's selection (enabled, include/exclude, frontmatter targets). Refs: #428 |
||
|
|
8f79733b4f |
fix(mcp): validate Pi CIMD OAuth settings
Reject unsupported client registration values and CIMD client or callback conflicts before syncing invalid settings to Pi. Keep dcr and custom Pi options supported, identify the legacy codemode alias, and document current Pi launch behavior. |
||
|
|
9db36b472a |
Merge remote-tracking branch 'origin/main' into runkids/419-link-unlink
# Conflicts: # internal/server/handler_skills.go # skills/skillshare/references/TROUBLESHOOTING.md # website/docs/reference/commands/ui.md # website/docs/reference/targets/configuration.md # website/i18n/ja/docusaurus-plugin-content-docs/current/reference/commands/ui.md # website/i18n/ja/docusaurus-plugin-content-docs/current/reference/targets/configuration.md # website/i18n/ko/docusaurus-plugin-content-docs/current/reference/commands/ui.md # website/i18n/ko/docusaurus-plugin-content-docs/current/reference/targets/configuration.md # website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/commands/ui.md # website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/targets/configuration.md # website/i18n/zh-Hant/docusaurus-plugin-content-docs/current/reference/commands/ui.md # website/i18n/zh-Hant/docusaurus-plugin-content-docs/current/reference/targets/configuration.md # website/src/data/featureMap.ts |
||
|
|
113d410da7 |
fix(hub): apply the source follow policy to local discovery
Hub index, built-in search, and draft candidates discovered only the source path, dropping the follow policy used by the inventory. Add optional walk options to the shared Hub functions and pass the operation policy from dashboard handlers and CLI indexing. Explicit CLI sources use the active config policy while retaining configuration-free indexing. Cover global/project modes, enabled/disabled following, all three handlers, and CLI source overrides; document the behavior in all website locales and built-in guidance. |
||
|
|
e7eecffeab | Merge remote-tracking branch 'origin/main' into runkids/274-follow-source-links | ||
|
|
064048da89 |
fix(server): list files from followed skill roots
A symlink passed as a filepath.Walk root is listed as a single file, so root-of-link skills returned files containing only a dot. Reuse the discovery follow policy to resolve the walk root and compute relative file names from it while retaining logical resource paths. Cover global/project responses and disabled following, update the existing traversal inventory, and document root-of-link file browsing in all website locales and troubleshooting guidance. |
||
|
|
1a472eb0ab |
fix(check): resolve followed checkouts by explicit name
Filtered checks dropped the follow policy when resolving a basename, so a linked checkout visible in an unfiltered check was reported as not found by its name. Forward the operation policy to the resolver and cover both global and project checks against a local Git remote. Document checking followed checkouts by link name in the command reference and built-in guidance. |
||
|
|
97446744ff |
feat(omp): add native Oh My Pi support (#423)
* feat(omp): add native Oh My Pi support Support OMP skills, instructions, MCP, code hooks and guarded extension selection using its verified native contracts rather than Pi aliases. Add reviewed marketplace plugin installation, cache-preserving scoped removal and fresh-cache reinstall. Align Pi/OMP extension cards and localize inventory guidance while keeping native ownership and read-only constraints. Include regression coverage, isolated E2E runbooks, documentation and verification policies. Native plugin updates and unverified runtime platforms remain guarded. Refs #409 * fix(omp): guard runtime ownership and localize inventory guidance Native install recursively replaces its runtime destination, and a missing cache manifest could leave the real runtime link installed after removal. Bind and recheck an absent reviewed destination, and recover removal names only from verified scope-local links. Localize fixed backend reasons and warnings across dashboard locales while preserving paths and external diagnostics. Restore the reviewed source in the existing reinstall fixture and record real native verification. * fix(omp): allow forgetting natively removed plugins A different plugin can retain node_modules after native uninstall deletes this installation. When its cache, registration and known runtime state are absent, forget only the stale Skillshare binding instead of demanding runtime-name proof for unrelated files. Extend the existing removal recovery test with a failing-before-fix case that verifies the binding is dropped and unrelated native lock bytes and plugin files are preserved. make check passes. |
||
|
|
3265259d1a |
docs(source-links): use unlink for link removal guidance
The linked-root skill guard makes uninstall refuse some first-level links, so generic link-removal instructions could direct users to a command that fails. Point configuration, FAQ, unlink reference, and built-in skill guidance to unlink or the dashboard Unlink action, preserving target folders for checkout and root-skill links across all five documentation locales. |
||
|
|
cd6e0165dd |
fix(uninstall): refuse skills at followed link roots
A root skill discovered through a followed source link occupies the link entry itself. Moving that entry to trash silently unlinks every nested skill instead of removing one skill. Share the root-skill guard across single and batch API handlers and CLI uninstall, report the unlink action clearly, and preserve explicit unlink and nested skill removal. |
||
|
|
42ed06e3e4 |
fix(cli): accept option terminators for link and unlink
Stop parsing mode and command options after -- so valid link names and relative paths beginning with a hyphen can be addressed. Document the unlink form in every command locale and verify that -g and -p after the terminator remain names. |
||
|
|
93708478a6 |
docs(source-links): describe the dashboard unlink action
The dashboard section of the ui reference only covered Link folder. Add the final unlink design so the docs match the shipped UI: the linked group row, the hover icon button with confirmation, trash restore, single-skill uninstall inside a link, and the absence of repo actions. |
||
|
|
86cb2d51d9 |
docs(source-links): document link, unlink and the dashboard Link folder action
follow_source_links only follows a link that already exists, and the docs told users to create it with ln -s or mklink /J. The guards then surfaced only in doctor, after the link existed. Now that skillshare link checks the target first and picks a junction on Windows, the docs point at the command and keep the manual way as a note. Adds command pages for link and unlink, quick-reference and index rows, the dashboard Link folder sentence, all four translations, and the built-in skill guidance. Refs #419 |
||
|
|
aafb7e7e96 |
fix(ui): keep followed checkouts out of dashboard updates
Separate user-owned followed Git checkouts into linked_repos in check and resources responses so the Updates tab renders information instead of tracked errors or retry actions. Refuse dashboard updates before Git runs, including force retries and descendant skills, while leaving managed repositories unchanged. |
||
|
|
c5c9289781 |
fix(discovery): surface skipped source link warnings
Keep one follow policy per list and status operation and report its skipped links without hiding healthy inventory. Send JSON diagnostics to stderr and expose sourceLinkWarnings in the dashboard resources response, reusing the sync warning formatter. |
||
|
|
5eb6d496ec |
docs(source-links): cover command pages, the built-in skill, and all four translations
The follow_source_links feature touched doctor, update, uninstall, trash, install and audit behavior without their command pages saying so, and the ja, ko, zh-Hans and zh-Hant site translations had none of the new content. Translate every changed page and align the built-in skill's doctor and troubleshooting references. |
||
|
|
bcf567f80d |
docs(source-links): align follow_source_links docs with the review fixes
Covers the guard order, file links, update --all and dirty checkouts, --group forms, restore through the link, what Git stages for a link, the sync and audit JSON warnings, and the junction-chain case in the Windows runbook. |
||
|
|
64b9255075 |
feat(ui): link each part of a target from the Targets list
The Syncing column described what a target gets as one line of text, and the whole row led to the Skills tab, so reaching a target's MCP, Hooks or instruction file took an extra click and a search for the tab. Each part is now its own link into that tab, and the connected shared AGENTS.md shows up by its file name, so the list says at a glance which targets are not connected yet. |
||
|
|
751d0b50fa |
docs: bring translations and status up to date for 0.24.5
Release prep for 0.24.5 found three places where the docs no longer matched what the pending range changed: - The Codex portable-manifest rule (Codex installs from a root plugin.json when a package has both manifests, so Skillshare expects its version, or 1.0.0) was only in the English plugin reference. - The .skillignore.local behavior (a pattern without / matches at any depth, the dashboard shows the .local rules in Settings > Files and reports a toggle they override as failed, and GET /api/skillignore returns the .local file) was only in the English filtering and ui references. - The status reference did not say that the agents column counts only the agents a target syncs, after .agentignore, the target's include/exclude and each agent's targets frontmatter. The ja, ko, zh-Hans and zh-Hant pages now carry the first two, and every language carries the third. The Latest callout in README.md and its translations now describes 0.24.5, which includes a feature. |
||
|
|
c5571a8cae |
fix(plugin): leave npm ranges and tags to Pi, and read a lowercase userconfig
Codex review on #400: - A package added with a range such as npm:demo@^1.2.0 was compared with npm's unrestricted latest. With latest at 2.0.0 and the newest matching release at 1.9.0, check kept offering 2.0.0, which Pi never installs because it keeps the configured range. Only a package added without a version follows latest now; one with a range or a tag is left to Pi, as a pinned one already was. - The private-registry check read the user .npmrc path only from NPM_CONFIG_USERCONFIG. npm reads its environment case-insensitively, so a lowercase npm_config_userconfig pointing at an .npmrc with a private registry was ignored, and the package name went to npmjs. Both spellings are read now. The plugin reference, its translations and the built-in skill say which packages the check leaves to Pi. |
||
|
|
0f2ce354fc |
feat(plugin): check Pi npm packages for updates and show their versions
The Plugins page listed every binding a run touched, one row each, so a single failure sat among a dozen "unchanged" rows, and the preview did the same. Failures now come first, Agents that ended the same way share a row, and what stayed the same folds into one Unchanged line that opens to one row per plugin, with Pi packages apart. Logos stay only on the rows that need a look. An npm package in Pi recorded no version and no source, so it showed no version and Check updates could only say to check in Pi. The installed package.json now gives its version, on the Plugins page and in a Pi target's Extensions tab, and check compares that version with npm's latest. A newer version gets an Update button on the row and in the check's result; it updates that one package with pi update <source>, not pi update --extensions, which would also update packages the preview never listed. update leaves a package already at npm's latest alone, and records no version, so the dashboard keeps reading what Pi installed. The two check messages that were English in every locale now have keys. Release-As: 0.24.5 |
||
|
|
04c4c95cba |
fix(plugin): keep version check for versionless portable manifests
A portable root plugin.json without a version left the Codex binding's version empty, which skips the post-update version check, so an update could advance the snapshot while Codex still ran an older copy. Codex reports 1.0.0 for such a manifest, so expect that instead. Refs Codex review on #396. |
||
|
|
021e0037b6 |
fix(plugin): expect the version Codex reads from a portable manifest
Codex 0.159 installs from a portable root plugin.json (agent-plugins.org schema) ahead of .codex-plugin/plugin.json, and reports 1.0.0 when that manifest has no version. Skillshare preferred .codex-plugin/plugin.json, so updating a package that ships both (ponytail 4.10.3) failed with "native update returned version 1.0.0; expected 4.10.3" on every sync. |
||
|
|
d4c2f6e9a0 |
fix(server): report toggles that .local ignore rules override
Disabling a skill only checked that its path was written to .skillignore. A "!" rule in .skillignore.local is applied after that file, and an unanchored one such as "!feature-radar" re-includes every path segment with that name, so the skill stayed enabled while the dashboard reported success. The dashboard also never showed the .local file, so nothing explained why. Single and batch toggles now re-discover after writing and report an item that did not reach the requested state as failed, naming the overriding file; the batch toast shows the first failure's reason. GET /api/skillignore and /api/agentignore return the .local file, and Settings > Files shows its rules above the editor. |
||
|
|
70cb287672 |
fix(plugin): find the Codex CLI the desktop app ships (#383)
* fix(plugin): find the Codex CLI the desktop app ships Plugin commands ran the bare name `codex` from PATH, so a machine with only the Codex desktop app, or a scheduled job started with a minimal PATH, reported the CLI as missing. The account-only `cli` override did not help: the default codex target cannot set it, and an absolute path in a config shared between macOS and Windows is wrong on one of them. When `codex` is not on PATH, look in Homebrew's folders and the CLI the app installs (Codex.app on macOS, %LOCALAPPDATA%\OpenAI\Codex\bin on Windows). SKILLSHARE_CODEX_CLI overrides the search on one machine without touching the synced config. The missing-CLI error now lists every place searched, in the CLI and the dashboard. Refs #338 * docs(plugin): note where Skillshare finds the Codex CLI The plugin reference and the sharing guide still said every native CLI must be on PATH, and the built-in skill told agents a missing CLI has no fallback. Codex now has one, plus a machine-local override that agents should prefer over a path in a shared config. Refs #338 * fix(plugin): look for the Codex CLI inside ChatGPT.app Since the Codex desktop app merged with ChatGPT, macOS installs it as ChatGPT.app, so an app-only Mac with a minimal PATH still reported Codex as missing. Try ChatGPT.app before Codex.app in /Applications and ~/Applications, the order Codex's own desktop-app finder uses. Refs #338 * fix(plugin): run the packaged CLI entrypoint of the ChatGPT app ChatGPT Desktop 26.924 removed Contents/Resources/codex and ships the CLI at the entrypoint its package manifest declares, codex-cli/bin/codex, so a current app-only Mac still reported Codex as missing. Try that entrypoint first in each app bundle and keep the old path for earlier builds. Refs #338 * fix(plugin): find the Codex CLI from the Windows installer The official PowerShell installer puts codex.exe in %LOCALAPPDATA%\Programs\OpenAI\Codex\bin and adds it to the user PATH. A job started without that PATH missed it, the same gap Homebrew's folders cover on macOS. Try it before the desktop app's copy. Refs #338 * fix(plugin): keep an account's cli even when it is codex The Codex search ran whenever the executable was the bare name codex, so an account that set cli: codex could get SKILLSHARE_CODEX_CLI or the app's CLI instead, against the documented rule that an account's own cli is kept. Search only when no account cli is set. Refs #338 |
||
|
|
8c60f51b9f |
feat(source): add the sourcewalk walker and sourcefs write boundary for proposal 274 (#385)
Implements rollout steps 1 and 2 of proposals/274-skillfollow.md. Nothing follows a link or parses .skillfollow yet. Step 1: doctor reports first-level symlinks and junctions in the skills source as info, in text and JSON, without following them. Step 2a: internal/sourcewalk owns traversal of the skills source. Thirteen raw walks move onto it with identical behavior, and a go/parser ratchet fails the tests on any new unclassified walk. Step 2b: internal/sourcefs wraps an os.Root opened at the skills source and refuses any write whose path has a link component. The six write sites the proposal found in review move onto it, including the cross-device copy fallback, and a second ratchet covers raw os write calls. The only behavior change is that an explicit path crossing a link inside the source is refused instead of written through. Refs #274 Release-As: 0.24.3 |
||
|
|
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. |
||
|
|
887461b36a |
perf(upgrade): download release assets over parallel ranges (#381)
* perf(upgrade): download release assets over parallel ranges release-assets.githubusercontent.com throttles each connection on some networks. The 9.6 MB darwin_arm64 archive took 122-171 s over one connection but 25 s as 8 ranges, each on its own connection, with an identical checksum. `skillshare upgrade` and the first `skillshare ui` of a new version both waited minutes on that download. DownloadToFile probes with `Range: bytes=0-0`; a 206 answer splits the file into ranges fetched in parallel from the redirected URL, and a 200 answer streams the single response as before, so servers without range support cost no extra request. Size limits and checksum verification are unchanged. The UI asset download is about 2 MB now, so the docs no longer say 1 MB. * fix(upgrade): keep the caller's transport for parallel ranges Each range built its client from http.DefaultTransport, so a caller's custom transport (private CA, authenticated proxy, custom dialer) only applied to the probe. The ranges then failed or bypassed the caller's network setup even though the probe succeeded. Each range now copies the caller's client with a clone of its *http.Transport, which keeps those settings and still gives the range its own connection. A transport that cannot be cloned is shared as is. |
||
|
|
8c1818612e |
docs(ui): list hooks among the dashboard counts
|
||
|
|
91dbd2a9fc |
fix(mcp): turn off a global server for Pi with its project override (#379)
* fix(mcp): turn off a global server for Pi with its project override
Since Pi 1.0.1, a .pi/mcp.json entry without command, url or type
overrides only enabled, exposure and toolExposure of the global server
with that name, and Pi's own /mcp writes {"enabled": false} for it.
Skillshare still wrote the global server's command (or url without the
query) next to enabled: false. Pi reads that entry as a project server
that replaces the global one, so turning it back on in Pi's /mcp only
dropped enabled and started the server without its args, env or
headers, and a url server lost its query. It also needed the global
server, so project mode refused pi in a disabled entry.
The switch is now the override alone. It needs nothing from the global
server, so project mode accepts it; a switch written by an earlier
release is rewritten on the next sync, and an identical override Pi
already wrote is unchanged instead of a conflict. The dashboard counts
Pi as an Agent with a per-project switch. Pi before 1.0.1 reports the
override as invalid, as the docs now say.
Closes #378
* fix(mcp): compare the whole Pi override before calling it the switch
Codex review on #379: an unmanaged .pi/mcp.json override such as
{"enabled": false, "exposure": "direct"} has the same ownership hash as
the switch sync writes, because that hash leaves out Pi-only fields like
exposure and toolExposure. Sync then reported it as unchanged, although
it differs from the switch and the docs promise a conflict. The check
now compares the whole entry, so only an exact {"enabled": false} is
unchanged; Pi fields a person adds to a switch this config already owns
are still kept, as for any managed Pi entry.
* docs(mcp): say which Pi overrides of a switch conflict
Codex review on #379 read "the override differs from the disabled
entry" as covering a switch sync already owns, where Pi settings added
in Pi, such as exposure, are kept: managed Pi entries keep Pi-only
fields by design (withAgentFields, piOwnedFields), and exposure does
nothing while the server is off. Turning the server back on in Pi
changes enabled, which the ownership hash covers, so that is a conflict.
The docs now say so: an exact {"enabled": false} is no conflict, Pi
settings added to an owned switch are kept, re-enabling in Pi
conflicts, and a differing override sync did not write conflicts.
TestPiSwitchOwnedBySync pins both owned-switch cases.
|
||
|
|
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. |
||
|
|
d23ab3ab2d |
docs: describe 0.24.0 in the READMEs and the Pi switch that removes rules
The READMEs still introduced 0.23.0, and AdamMagued, who fixed the root-scope first pull over a tracked config.yaml (#357), was missing from the contributors. The plugin reference said a Pi Extensions switch always writes a +/- rule; it now removes the file's own rule when that alone gives the requested state, and Remove rule appears only otherwise. |
||
|
|
355b42ee57 |
feat(cli): one frame and keymap for every TUI, inline prompts, file viewer (#370)
* chore(devcontainer): add a TUI screenshot kit Recreating the devcontainer wipes vhs and the browser it drives, so every TUI review started with a manual reinstall. The start script now installs the recording tools when they are missing and skips straight through when they are present. record-tui.sh screenshots each full-screen TUI in its own fresh ssenv, filled by tui-fixture.sh through real commands, so the TUI redesign can compare before and after on the same data. Refs #200 * feat(cli): ask small choices inline instead of full screen The restore source, new-skill wizard, install skill picker and the other checklist prompts each took over the whole screen for a handful of options, and the answer vanished once chosen. They now use the same inline prompt as init: the question appears in place, collapses into a "✓ label value" line, and stays in the scrollback. Lists longer than the visible rows can be narrowed with /, and esc inside the filter only leaves the filter. Every inline prompt shows one key line in the wording the full-screen TUIs will share. The new wizard drops its esc-goes-back steps: esc cancels, as in init. Refs #200 * feat(cli): give the list TUI the shared frame and keymap The full-screen TUIs each had their own header, footer and key letters, so the same action used different keys per screen and the help line listed everything at once. list is the first screen on a shared frame: one title line with scope, counts and tabs, the list and details side by side without dividers, and one key line with the common keys and the position. Everything else moves under ?, and confirmations ask on the key line so the list stays visible. Keys follow one lowercase letter per action (u update, d uninstall, t enable/disable, m manual only, ! audit). The All tab and the s status cycle are gone: tab switches skills and agents, and status: in the filter or --status covers enabled/disabled. Rows drop the group prefix that the heading above them already shows. Refs #200 * docs: drop key-by-key TUI instructions from command pages The command pages carried key tables, screen mock-ups and one bullet per key for every full-screen TUI, in five languages. The TUIs now show their keys on screen, so these pages repeated what the screen says and went stale with every key change (several already listed keys that no longer exist). Each TUI section is now one paragraph on what the screen shows and what it can do. What the screen does not explain stays: the filter tag syntax, what manual only does to SKILL.md, the analyze color thresholds, when audit opens its TUI, and that target changes are saved to config immediately. Refs #200 * feat(cli): move the trash TUI onto the shared frame The trash TUI replaced the whole screen with a confirmation and a spinner, so you lost sight of what you had selected, and r/d did nothing until something was ticked. It now uses the shared frame: checkbox rows with size and age, details beside them, and the confirmation, the names it covers, the running operation and its result on the bottom lines. With nothing selected, r and d act on the row under the cursor. Refs #200 * feat(cli): move the log TUI onto the shared frame Log rows were two-line "[date] COMMAND — status" blocks, stats lived behind s as a separate screen, and delete swapped the help bar for a prompt you could miss. Rows are now one line with time, command and a status mark; Entries and Stats are tabs on the title line next to the count and success rate; and the delete confirmation takes over the key line. With nothing selected, d deletes the entry under the cursor. Row delegates no longer force a 40-column minimum, which wrapped every row in lists narrower than that. Refs #200 * feat(cli): move the audit TUI onto the shared frame The audit TUI had its own tab bar, a divider column and a two-line summary footer, and esc quit even with a filter typed. It now uses the shared frame: scan counts and the Skills / Agents tabs on the title line, the worst severity at the right of each row, the scan-wide severity, threat and policy summary on the note line, and esc clears the filter before quitting. Rows under a group no longer repeat the group's name. Colored title facts keep their color instead of being dimmed. Refs #200 * feat(cli): move the audit rules TUI onto the shared frame The rules browser used keys no other screen shared: s for severity, space to toggle and R pressed twice to reset. It now follows the shared keymap: t turns a rule or pattern on or off, e asks for the new severity on the key line, and R asks yes/no before deleting audit-rules.yaml. The severity tabs sit on the title line, rows show the rule count or "off" at the right, and rule rows drop the pattern prefix the group row already shows. Space still toggles. When the title line is too narrow for every tab, it shows only the active one instead of clipping them. Refs #200 * feat(cli): move the analyze TUI onto the shared frame Analyze put the target switcher, a stats line and the help text in a three-line footer and sorted with s, which means sync everywhere else. It now uses the shared frame: skill count and always-loaded and on-demand tokens on the title line, one tab per target group, o to sort with the current order on the key line, and esc clears the filter before quitting. The details follow the list layout, and lint warnings use the ! mark the CLI uses. renderDetailSection and renderFactRow had no other callers and are removed. Refs #200 * feat(cli): move the diff TUI onto the shared frame The diff browser drew ruled separators, "── Next Steps ──" banners and an arrow before every suggested command, and esc quit with a filter typed. It now uses the shared frame: target, extra and difference counts on the title line, what differs at the right of each row, group rows like the list's, plain headings in the details, and esc clears the filter before quitting. Refs #200 * feat(cli): move the restore TUI onto the shared frame Restore replaced the whole screen for the confirmation, the running operation and the result, rendered two-line rows, and esc quit even with a filter typed. It now uses the shared frame: the target or the chosen target and its backup count on the title line, one-line rows with backup count and age or skill count and size at the right, and the confirmation, what it covers, the spinner and the result on the bottom lines. Esc clears the filter, then goes back, then quits. Refs #200 * feat(cli): move the MCP manager onto the shared frame and keymap The MCP manager used its own letters (a add, x remove, b backups, r refresh), hid the details behind Enter, and printed two help bars. It now uses the shared frame and the keys every other TUI uses: n add, i import, e edit, d remove, s sync, r restore, with the details of the selected server beside the list and ? for all keys. Refresh is gone because the manager reloads after every action. Command docs drop the key table, and the how-to page and built-in skill name the new keys. Refs #200 * feat(cli): move the search selector onto the shared frame The search selector rendered two-line checkbox rows, put the details under the list, used s for "search again" although s means sync everywhere else, and Enter with nothing selected silently cancelled. It now uses the shared frame with the keyword and counts on the title line, one-line rows with stars or risk at the right, and the details beside the list. Esc clears the filter, then goes back to the keyword prompt; Enter with nothing selected installs the row under the cursor, as r and d do in other TUIs. The command page drops its screen mock-up and key list, and no longer claims the search restarts after an install. Refs #200 * feat(cli): move the target TUI onto the shared frame and keymap The target TUI had five uppercase keys (M, N, I, E, R), a separate skills-or-agents picker before three of them, and full-screen pickers and remove confirmation. e now opens one menu of every setting the target has (skills mode, naming, include, exclude; agents mode, include, exclude, with agent filters marked as ignored in symlink mode), and the pickers and pattern editor open beside the list. d asks on the key line with the command it will run and what removal does. Patterns are added with n, as everywhere else. Also drops the filter style helper the MCP change left unused. Refs #200 * feat(cli): move the extras TUI onto the shared frame and keymap The extras TUI used six uppercase keys (N, X, S, C, M, F), each with its own full-screen menu, and a full-screen confirmation. It now uses the shared frame and keys: n new, d remove, s sync, c collect, and e for one menu with the mode and flatten setting of every target. The target menu and mode picker open beside the list, and confirmations ask on the key line with what the action does. The picker row helper moves to the shared frame, and the split and scroll-hint helpers no TUI uses any more are removed. Refs #200 * feat(cli): share one framed file viewer between list and extras The list and extras file viewers were two copies of the same layout with the old look: an indented title, a │ column between the tree and the file, and a hard-coded yellow cursor. Both now draw through one renderer in the shared frame: the skill or extra and the open file on the title line, the tree beside the file without a divider, and the scroll position at the end of the key line. Refs #200 * feat(cli): ask for a large repo's folder inline Installing from a repo with 50+ skills opened a full-screen folder browser with its own filter bar and key line, then dropped back to an inline skill checklist. The folder question is now an inline select like every other install prompt: the first choice installs everything below the current folder, esc goes up one level, and the chosen folder collapses into a "✓ folder" line before the skill list appears. The screenshot fixture gains a 60-skill repo so the picker can be recorded, and the filter-bar and page-info helpers that only the old picker used are removed. Refs #200 * feat(cli): ask for MCP and plugin values inline MCP and plugin values were typed into a separate textarea program that submitted on ctrl+d, a key no other prompt uses. They now go through a new ui.Text prompt drawn like the other inline questions: enter submits, alt+enter starts a new line, and the box grows with the value. The MCP name is a single line, so it uses ui.Input. Answers are not echoed afterwards because a value can hold a secret. Refs #200 * feat(cli): drop the full-screen MCP change preview Every MCP add, edit, remove, restore and sync already prints its plan inline and then asks whether to apply it. The full-screen preview in between showed the same changes again and needed one more enter, so it is removed along with the review step of the prompts interface. The confirm question loses its "Review complete" prefix, and a blank line now separates it from the plan. Refs #200 * feat(cli): ask extras init questions inline `extras init` without arguments ran its own full-screen wizard with a hand-drawn cursor and a different key line on every step. It now asks the same questions inline, like `init`: each answer collapses into a "✓" line, the target line shows where the file lands, and esc cancels with "Nothing was created". A new ui.InputValid keeps a question open and shows the error under it until the answer passes, which the name, file name and per-target file name questions need. Refs #200 * fix(cli): drop stale key hints from MCP prompts and help `mcp --help` still listed the manager keys from before its redesign (a add, x remove, b backups, r refresh), and several MCP and plugin questions repeated "Esc cancels" or claimed `a` selects all, while the key line under every prompt already shows the real keys (ctrl+a for all). The help now just says where the keys are, and the questions keep only what the key line cannot say. The MCP command page drops the same key list in all five locales. Refs #200 * feat(cli): open a skill's files at its audit findings The audit TUI listed each finding's file, line and one-line snippet, but judging whether a finding is real needs the lines around it, and that meant leaving the TUI to open the file by hand. Enter now opens the selected skill's files at its most severe finding, with the raw text numbered and the flagged line marked; n/N steps through the findings in the order the details number them, and the line above the keys says which finding is shown. The viewer state lives in a new fileBrowser so analyze and trash can open skills the same way. Long lines wrap under their text instead of being cut, since the evidence is often at the end of a line. Refs #200 * feat(cli): open a skill's files from analyze Analyze flags lint issues such as a description that is too short, but the screen only showed the description text, so fixing a skill meant finding its folder first. Enter now opens the selected skill's files, including local ones that live only in a target, as raw numbered text with the front matter, and the line above the keys repeats the first lint issue so it can be checked against what is written. Refs #200 * feat(cli): open a trashed item's files before restoring The trash TUI showed only the first fifteen lines of SKILL.md, which is not enough to tell two trashed versions apart or to see a skill's other files. Enter now opens the item's files in the same viewer as list and analyze, rendered as Markdown, and esc returns to the trash. Refs #200 * fix(cli): leave front matter out of the agent viewer in list Opening an agent in the list TUI rendered its whole file as Markdown, so the front matter came out as a horizontal rule and a "## name: ..." heading. Skills already drop it because the details panel shows the name and description; agents now read their body the same way. Refs #200 * test(cli): compare trash restore destinations home-relative The trash TUI shows restore destinations through shortenPath, so with HOME=/tmp, as in the offline Docker sandbox job, /tmp/skills prints as ~/skills and the tests that expected the absolute path failed. They now expect whatever shortenPath gives for the same path. Refs #200 * fix(cli): show control characters in viewed files as symbols The file viewers in list, extras, audit, analyze and trash wrote a file's bytes to the terminal as they were. Audit and analyze exist to inspect skills that may not be trusted, and a SKILL.md with an ESC or OSC sequence could rewrite the screen or the window title instead of being shown. Control characters are now replaced with same-width symbols such as ␛ before rendering, which keeps line numbers and the marked finding line in place; newlines and tabs are kept and CRLF is read as LF. Refs #200 * fix(cli): open audit findings in files the tree leaves out The file tree skips dotfiles and stops at three levels and 200 entries, but the audit scan reads root dotfiles and goes deeper. A finding in such a file, like a root .env, left the viewer on the previous file with the new finding's note above unrelated text. Opening a finding now adds its file to the top of the tree under its full relative path when it is missing, so the marked line is always the one reported. Refs #200 * fix(devcontainer): exit nonzero when a TUI screenshot fails to record record-tui.sh printed FAIL for a screen whose vhs run failed but still exited 0, so an unattended run looked like every screenshot was taken. It now remembers a failure, keeps cleaning up and recording the other screens, and exits 1 at the end. Refs #200 * fix(cli): keep other files' front matter and fit text to the pane Two problems in the shared file viewer: - It dropped YAML front matter from every Markdown file, so a trashed skill's README or template lost its metadata, which nothing else in the trash view shows. Only SKILL.md and a single-file agent drop it now, since their name and description appear in the details. - The open file was wrapped to at least 40 columns. In a narrow terminal that is wider than the right pane, so the layout wrapped each row a second time, breaking lines apart and moving the marked finding line. Text now wraps to the pane's real width. Refs #200 * fix(cli): keep frame lines within the terminal width joinEnds padded the title, confirm and filter lines but never cut them, so a long search query, path or command made the line wrap. Every TUI sizes its body for a fixed four lines of frame, so the wrap pushed the bottom of the body off the screen. Long text is now cut from the left side, keeping the status or tabs on the right. Lines are left alone until the terminal has reported its width. Refs #200 * fix(cli): show a nested skill's folder when no group heading names it List rows dropped the first path segment for every skill on the grounds that the group heading above shows it. With a single group, or a filter that leaves one, there is no heading, so frontend/react showed as just react and same-named skills from two folders looked alike. Rows now drop it only under a heading; a tracked skill's repo dir is still dropped as before. Refs #200 * fix(ui): let esc leave a prompt's filter after enter found nothing The inline prompt guessed the filter state from key presses and treated enter as leaving the filter. huh's Select stays in the filter when enter has no match, so the next esc, meant to leave the filter, cancelled the question instead: one folder level back in the large-repo picker, or the whole install at the top. The prompt now asks the field whether it is filtering. Refs #200 * fix(cli): show control characters in the trash preview as symbols The trash details panel prints the first lines of a trashed SKILL.md, and it wrote them to the terminal as they were. The file viewers already pass text through printableText so an ESC or OSC sequence in a skill is shown instead of acted on; the preview now does the same. Refs #200 * fix(cli): scroll an agent's text with the wheel anywhere in list An open agent has no file tree, but the wheel still treated the left quarter of the screen as the tree, so scrolling there did nothing. The whole screen now scrolls the agent's text. Refs #200 * fix(ui): read prompt answers after the prompt has run The prompt helpers returned "value, runPrompt(..., &value)". The Go spec leaves the order between reading value and the call unspecified, so a compiler may return the value from before the user answered. gc 1.25 runs the call first, so answers arrive today, but nothing guarantees it. Each helper now runs the prompt into err and then returns the value. Refs #200 * fix(cli): name hidden Unicode and skip oversized files in the viewer Two gaps in the file viewer used to inspect untrusted skills: - Zero-width and bidirectional characters passed through unchanged, although the audit reports them as HIGH (Trojan Source). Opening such a finding reordered or hid the text instead of showing the cause. They now appear as <U+202E> and the like. - Moving onto a file read all of it, then copied it again while numbering and wrapping, with no size limit. The audit skips files over 1 MB; the viewer now does too and says the file is too large. Refs #200 * fix(cli): show control characters in viewed file names as symbols File contents in the viewer already pass through printableText, but the tree and the title printed file and skill names as they were. A file named with an ESC sequence, a newline or a bidirectional character in a skill under review could still reach the terminal, or break the frame across lines. Names now go through printableName, which also shows a newline or tab as a symbol so the name stays on one line. Refs #200 |
||
|
|
7a9b37e852 |
fix(mcp): explain Pi project overrides in import and sync conflicts (#371)
* fix(mcp): explain Pi project overrides in import and sync conflicts Since Pi 1.0.1, /mcp in Pi writes a .pi/mcp.json entry with only enabled, exposure or toolExposure to override the global server of that name. Skillshare treated it as a broken server: import reported "requires exactly one of command or url", and a project server with the same name hit a conflict that told the user to import it, which import always refused, so the user was left without a way forward in the CLI. Import now names the entry as a Pi project override with nothing to import. Sync reports the conflict as an override to replace or remove with /mcp in Pi, and the dashboard offers only Replace for it. Sync behavior is unchanged; detection matches Pi's own isOverride (no command, url or type). * fix(mcp): limit Pi override detection to project imports Codex review on #371: importing Pi's global ~/.pi/agent/mcp.json, or a pasted snippet, also reported a connection-less entry such as {"enabled": false} as a project override and pointed to /mcp in a project. Pi gives that shape override meaning only in a project's .pi/mcp.json; elsewhere it is an invalid server. importNative now takes the scope, so global and pasted imports keep the usual "requires exactly one of command or url" problem. * fix(mcp): classify a synced entry turned into a Pi override Codex review on #371: when an entry this config synced to .pi/mcp.json was later changed into a connection-less Pi override, the ledger still marked it managed, so the generic "Agent configuration changed; import it" conflict won and the dashboard offered an Import that project import now refuses. The override case now comes first and covers a managed entry whose content changed as well as an unmanaged one, so both offer only Replace. * fix(mcp): classify Pi overrides before every import-offering conflict Codex review on #371: the prune conflict ("Pi setting changed since sync; import it") still came before the override case, so a synced server whose cleared Pi field Pi had replaced with an override again offered an Import that project import refuses. Rather than chase each earlier case, the override case now opens the switch. An entry owned by another live config keeps its own message, since only that config can release it. * fix(mcp): treat a removed owner's entry like any other Pi override Codex review on #371: an entry whose ledger owner was a removed config, later turned into a connection-less Pi override, still got the orphaned conflict, which offers an Import that project import refuses. Skillshare never writes a connection-less Pi entry, so the override case now covers every such entry except one a live config owns, which only that config can release. It still skips an entry recorded at its current hash, which is what Replace leaves, so Replace settles the conflict; a test now covers that. |
||
|
|
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. |
||
|
|
9788d486f7 |
feat(pi): edit extensions on any Pi at or above the verified minimum (#367)
* feat(pi): edit extensions on any Pi at or above the verified minimum Pi 1.0.1 was released and every user who updated found the Extensions tab read-only, because the gate matched an exact list of versions. The package contract has not changed between patch releases, so the gate now accepts any plain X.Y.Z at or above PiMinVersion (0.99.2), the oldest version with executed evidence. Older, prerelease or unparsable versions stay read-only. The version matrix now also records Pi 1.0.1, which passes every check. The evidence test requires PiMinVersion to be recorded and every recorded version to pass, instead of matching an exact list. The read-only reason is renamed to unsupportedVersion and the API returns minVersion, so the dashboard says which version is needed. The Pi MCP project switch keeps writing the global command or url: from 1.0.1 Pi accepts a switch-only entry, but it is skipped by older Pi and warns at every start where the global config lacks the server. Its rationale in comments and docs is updated to say so. * fix(docs): update Pi extensions design records for the minimum gate Codex review on #367: the design records still described the exact version list (PiVerifiedVersions, unverifiedVersion, "exact versions only"), so a contributor relying on them would implement or validate the old contract. implementation-report.md now states the current gate and evidence, and phase-0.md gains a dated minimum-version update that the older paragraphs point to, keeping the history intact. |
||
|
|
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. |
||
|
|
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. |