Commit Graph
960 Commits
Author SHA1 Message Date
Willie d2b322ed87 fix(server): carry follow policy through skill updates
Use one skills traversal policy for dashboard update discovery, post-pull audits, and staged regular-skill writes so linked repositories are audited and child updates preserve their source links. Keep agent updates and disabled follow behavior on the nil-policy path.

Cover global and project modes through HTTP and SSE handlers, including audit rollback and disabled-follow parity.
2026-10-05 15:46:04 +08:00
Willie 75a79abf61 fix(install): protect dirty followed checkouts before update
Refuse install update pulls when a followed checkout has local changes or its Git status cannot be read, so audit rollback cannot discard unrelated user edits. Preserve ordinary and nil-policy behavior and cover both install routes and clean audit rollback.
2026-10-05 15:43:17 +08:00
Willie d6162baba0 fix(sourcewalk): resolve junction chains and compare canonical roots
canonicalPath relied on filepath.EvalSymlinks, which since Go 1.23 leaves
a Windows junction component in place. A link whose target is itself a
junction, or sits below one, was followed as the unresolved junction:
the walk saw no descendants while the inventory counted as complete, so
target entries from that link could be pruned, and a sync target spelled
through a junction could evade the overlap guard. Every existing path
component is now resolved hop by hop, and a target that still ends in a
link marks the link unavailable instead of being followed.

The policy also kept the source root as spelled, so a relative global
source was discovered but never resolved for writes or audit. Root,
first-level and Resolve comparisons now use the same canonical absolute
form. Copy and checksum roots get the same one-hop resolution so a
followed junction that is itself a skill no longer trips the cycle guard.
2026-10-05 15:40:51 +08:00
Willie c9e532a66f fix(source-links): use the server's follow snapshot for collect and keep Windows link text logical
The project dashboard builds a synthetic global config without
follow_source_links, so the collect handler read a zero policy and a
forced collect could replace a followed source link with the target
copy. The per-instance snapshot already knows the project setting.

On Windows the absolute link fallback (junctions, or symlinks without
Developer Mode) canonicalized the source root even with the key off. A
source root that is itself a directory symlink then no longer matched
the logical path that status, prune and merge ownership compare
against, so every sync reported a conflict or recreated every link.
Store the logical path as main did; only relative links need the
canonical root.
2026-10-05 15:40:51 +08:00
Willie f9e25ca7a5 fix(audit): report source links the scan did not follow
An audit run with follow_source_links whose linked checkout was missing
finished as a clean success, so a partial scan looked complete. Audit now
warns once per skipped link in human output and adds warnings plus
incomplete: true to JSON output, including when no skills were found.

Also cover project mode: reconcile keeps config and metadata entries of an
unavailable link, and sync -p warns once and keeps target entries.
2026-10-05 15:40:18 +08:00
Willie d4a9a28e04 fix(sourcefs): anchor MoveIn through a followed link in the opened root
MoveIn below a followed link ended in a pathname os.Rename against the
link target's directory. That pathname can be renamed away and replaced
by a link to another directory after through() cached the second root,
so the move landed outside the checkout the root was opened on.

The followed route now copies the staged tree through the root handle to
a temporary name, renames it into place through the handle, and removes
the staged source only after that. The primary root keeps its rename, so
behavior without a follow policy is unchanged.
2026-10-05 15:38:48 +08:00
Willie 8092b234b7 fix(source-links): judge overlap before existence and keep doctor from suggesting prune
A link into a sync target that is not created yet was reported as a
missing target, which marked the inventory incomplete and held back
pruning for a link that would never be followed. The where-it-points
guards now run on the link text before the does-it-exist check, so such
a link is an overlap and the run prunes as usual.

doctor reported the dangling target links behind an unmounted source
link as broken symlinks and suggested `skillshare sync` to prune them,
while sync deliberately keeps them. Those links are now a warning that
names the waiting source link and carries no prune suggestion.
2026-10-05 15:27:42 +08:00
Willie e3c9763e1a fix(sourcewalk): resolve junction targets with Readlink on Windows
filepath.EvalSymlinks leaves a Windows junction unresolved since Go 1.23
reports mount points as irregular rather than symlinks, so the follow
policy walked the junction entry itself and discovered no skills behind
it, while doctor and tracked-repo detection (which only Stat the entry)
reported it as followed. Resolve the link text first, then canonicalize
the target.

Add the Windows E2E script that found this: a junction under the skills
source pointing at a checkout, with the drive-away, write-through, and
trash round-trip steps.

Refs #274
2026-10-05 15:14:10 +08:00
Willie abaaefb663 fix(audit): retain linked source metadata and propagate install policy
Keep the analyzer metadata context logical while walking the resolved root, so integrity and publisher checks still find the source metadata store. Add global/project command regressions for linked repo roots and single skills, plus linked install-audit and trash sibling-list checks.

Pass the existing optional Follow policy through install audit gates and final metadata hashing, preserving default-off behavior. Absolute link text remains unchanged on trash rename fallback; relative links continue to store their absolute target.
2026-10-05 14:53:52 +08:00
Willie 6bc41d29ec fix(sync): preserve logical identity of followed source links
Keep the canonical skills source root and logical relative tail when creating or reformatting project links, including Windows relative links and junction fallback. Shared agent and extra links retain full canonicalization, and global Unix link text stays unchanged.

Allow group walks outside the source only for an enabled first-level link validated by Follow.Resolve, remapping children to logical paths and metadata keys while retaining nested-link guards and root-skipping semantics. Resolve copy and checksum operation roots before walking to avoid false cycles, and preserve followed source links during forced collect with per-item warnings.

Regression coverage verifies second-sync ownership, status, prune, unlink, format changes, linked-root copying, group guards, and forced collect preservation. Linux build, vet, sync and command tests, sourcewalk ratchet, server collect tests, context validation, and Windows cross-build passed; Windows runtime was not verified. No new raw-walk allowance was needed.
2026-10-05 14:45:58 +08:00
Willie c0e66720ce fix(source-links): preserve trashed links and resolve audit and hash roots
Trash moves and restores the link entry without copying or removing its target, including when rename fails. Relative link text is stored as an absolute target so relocation cannot change its meaning; list and TUI expose the link target without inventorying its contents.

Pass the operation-scoped Follow policy into audit and hash operations, resolving their physical root while keeping logical result and metadata keys. Calls without a policy keep their existing behavior and ScanSkill retains its original function signature.

Update six stale trash raw-write allowances for the injected rename test seam and classify moveLink creation/removal: it moves a checked source entry to trash or restores an entry into source, never writes through its target. Raw sourcewalk calls and allowances are unchanged.
2026-10-05 14:45:41 +08:00
Willie a502e9316b feat(sourcefs): write through followed first-level source links
With follow_source_links on, discovery reports <source>/_dev-skills/foo,
but every write to it was refused: sourcefs rejects a link in the path, and
its source-root os.Root refuses descendants outside the source. Dashboard
edits, nested uninstall, regular skill replacement, and tracked installs
under such a link all failed, although writing through a link the user
placed is the agreed behavior (#410).

sourcefs.Open, Create, MkdirAllIn, and CheckMoveOut take the operation's
optional sourcewalk.Follow. A clean name <link>/<rest> whose first
component the policy follows is handled by a second os.Root opened at the
link's canonical target, with the same per-component link check on <rest>,
so a nested link or ".." still cannot escape the target. Names with ".."
keep the source root, which refuses them through the link. Without a
policy nothing changes.

The link entry itself stays a link: RemoveAll, Rename, and writes on it are
refused, install --track --force still refuses to replace it, and
CheckMoveOut still lets trash rename the link without following it.
MkdirAll on a followed link is a no-op, since it already is that directory;
install --into needs that. A rename across the link boundary is refused.

The install, update, uninstall, and server callers pass the same policy
their discovery uses, through InstallOptions.SourceFollow and the update
context. No raw-write allowance was needed.

Refs #274
2026-10-05 14:42:09 +08:00
Willie 04ee235277 feat(sourcewalk): expose Follow.Resolve for writes through followed links
Operations that write or scan below a followed first-level link need the
real location of a logical path (<source>/_dev-skills/foo). Resolve maps
such a path onto the link's canonical target, reusing the same guards as
traversal, so sourcefs, group walks, trash, and audit roots can share one
answer instead of each re-deriving link identity.

Refs #274
2026-10-05 14:28:00 +08:00
Willie 89fc4fbdf1 feat(sourcewalk): follow first-level source links when enabled
Users link a checkout directly under the skills source (e.g.
skills/_dev-skills -> ~/code/dev-skills) and expect it to behave like any
other first-level entry. sourcewalk resolved only the root, so these links
were invisible to discovery, sync, update, and the dashboard.

follow_source_links (global and project config, default false) enables a
per-operation sourcewalk.Follow policy. Walk, WalkDir, and ReadDir report a
followed link under its own name as a directory and descend into its
target, so names, RelPath, FlatName, SourcePath, tracked-repo detection, and
metadata keys stay logical. Only entries directly under the source root are
followed. The policy is built from config and passed explicitly to every
discovery caller in the CLI, server, and reconcile, so counts agree; the
server keeps a per-instance snapshot refreshed on config load and save
instead of a process-global flag.

A link is skipped, with one warning per operation, when its target is
missing or unreadable, is the source or a parent of it, or overlaps an
active skills target. A missing or unreadable target marks the operation
incomplete: sync then skips pruning and copy-orphan deletion, and reconcile
keeps metadata, so an unmounted drive or a re-clone in progress cannot
erase target entries or install records. A link to an existing file is not
a directory link and stays an ordinary entry; treating it as incomplete
would disable pruning for anyone sharing a file such as .skillignore.

doctor keeps raw link identity: with the key off it still says the link is
not followed and names follow_source_links: true; with it on it reports
followed links and skipped links with the reason.

The raw-walk allowlist gains entries for the policy path in Walk and
WalkDir: the source root walk with a policy, and the walk of a validated
link target whose paths are remapped to the logical link path. Both live
in sourcewalk itself, the package that owns source traversal.

Refs #274
2026-10-05 14:26:09 +08:00
Willie 5c26981e44 refactor(git): reuse raw source directory reader
Use sourcewalk with zero options to preserve first-level link identity without adding a raw-walk allowance. Keep Git paths relative to the logical skills source.
2026-10-05 14:13:50 +08:00
Willie 3e8b6e8bd9 fix(git): warn before staging first-level source links
Source links can record machine-local paths in Git. Share advisory indexed and ignored checks across CLI, init, and dashboard staging and previews, with scope-correct ignore patterns and manual untracking instructions, without changing staging behavior.
2026-10-05 14:11:57 +08:00
Willie a3afc5f39a feat(memory): add a refresh button and keep short facts in INDEX.md (#413)
* feat(memory): add a refresh button and keep short facts in INDEX.md

Agents write shared memory notes from outside the dashboard, so the note
list and content went stale until the page was reloaded. A refresh button
in the note header refetches both.

The active guidance also told agents to create a separate file for every
durable fact, which produced one-sentence files. Short facts now go
directly under Notes in INDEX.md; only multi-paragraph notes get a file.

* fix(ui): keep the memory refresh button available without a selected note

The button lived in the note header, so a search with no matches hid it
and the list could not be refreshed to pick up a note an agent had just
written. It now sits next to the search box.
2026-10-05 12:09:56 +08:00
Willie d1371db7ea fix(audit): keep the skills source when auditing agents only (#412)
* fix(audit): keep the skills source when auditing agents only

`skillshare audit --agents` replaced sourcePath with the agents source
before building auditTUIContext, so the TUI's Skills tab discovered
skills inside the agents directory. The agents-only branches now read
agentsSourcePath themselves and the skills source is left alone.

Also from the #390 review, independent of .skillfollow:

- /api/skillignore reads the source through skillsSource() like the
  other routes (equal in project mode today; consistency only).
- scripts/windows/e2e-file-links.ps1 checked doctor output for a
  "Config:" line that no longer exists and could not match the ~-shortened
  path, so the run always aborted. It now checks status --json
  source.path, as e2e-skillfollow.ps1 does.
- windows-test runs internal/sourcewalk; GOOS=windows vet passes and the
  job on this PR is the first real run.

Refs #404, #407.

* fix(audit): relativize agent names against the agents source

With discovery moved to the agents source, auditInstalled and
auditFiltered still printed the header and computed SkillName against
the skills source, so `audit agents --json` reported names such as
`../agents/helper.md` when the two sources are siblings (Codex review on
#412). auditScanRoot now picks the root per kind for discovery, header,
and relativization; the skills source is kept only for TUI tab switching.

Also drops internal/sourcewalk from windows-test again: the first run on
windows-latest fails TestWalkParity, TestWalkDirParity and
TestSymlinkRoot (callback paths come from the canonical root, so
filepath.Rel against the test's root yields `..\..` chains). Logged on
#344.
2026-10-05 11:29:39 +08:00
Willie c61f48865e fix(server): reject skill names that escape the skills source (#408)
GET /api/audit/{name} joined the client-supplied name to the source
without checking it, so a name such as ../../x scanned a directory
outside the skills source and returned a clean result for it. The
single-skill update, the update stream, and the batch uninstall built
paths the same way; the tracked-repo uninstall route already refused
such names inline.

One helper, validSourceName, now holds that rule: non-empty, relative,
not starting with "..", and no Windows separators or volume prefixes on
any host, as sourcewalk does for declared names. The audit and update
routes answer 400, the update stream reports the name as an error
result, the batch uninstall fails that item, and the repo uninstall
route uses the same helper. Nested names such as group/skill still
resolve.

Closes #402
2026-10-05 11:03:39 +08:00
Willie 116feb6d16 fix(plugin): ask npm which registry it uses, and keep updates that never ran
Codex review on #400:

- The private-registry check read npm's config by hand, and each round
  found another place npm reads it from: the lowercase environment, the
  global npmrc, and now a globalconfig or prefix set in the user .npmrc.
  Rather than chase npm's rules, the check now asks npm itself:
  `npm config get registry @scope:registry` in the folder Pi runs npm in.
  Any registry other than npmjs, or npm not answering, leaves the package
  to Pi. The hand-written .npmrc reading is gone.

- When an apply stopped before any Agent ran, such as on a stale preview,
  the result had no outcomes, and the page took every planned update off
  its list, hiding the row's Update action. Only an Agent the result
  reports done comes off now.
2026-10-05 00:32:56 +08:00
Willie be661c593f fix(plugin): keep row updates without a new version, read npm's global config, keep odd manifests
Codex review on #400:

- The Plugins page kept only one version per plugin from a check, and
  only when the change had one, then hid the row's Update button when an
  Agent already had that version. A source plugin whose content changed
  without a version bump, or whose manifest has no version, so lost its
  Update action once the check dialog closed. The page now keeps what the
  check found per plugin and Agent, with or without a version, and an
  applied update takes those Agents off; the version only shows what the
  update brings.

- The private-registry check did not read npm's global config, so a
  registry set only in $PREFIX/etc/npmrc still sent the package name to
  npmjs. It now reads the file npm_config_globalconfig names, else
  $PREFIX/etc/npmrc with the prefix from the environment or the npm on
  PATH, and leaves the package to Pi when it can't tell where that file
  is.

- Reading the package version made a package.json whose version is not a
  string fail to decode as a whole, which dropped its pi manifest and the
  extensions it declares. The version is decoded on its own now, so an
  odd one is only skipped.
2026-10-05 00:22:30 +08:00
Willie 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.
2026-10-05 00:12:29 +08:00
Willie cc249c1498 fix(plugin): leave private npm registries to Pi, and keep updates for Agents still behind
Codex review on #400:

- The update check asked the public npm registry about every unpinned Pi
  package, even when the environment or an .npmrc sends the package, or
  its scope, to another registry. A public package with the same name
  could then hide a real update or offer an unrelated version. The check
  now reads the npm registry settings for the package and its scope from
  the environment, Pi's npm folder and the user .npmrc, and falls back to
  checking in Pi when any of them names another registry.

- The row's Update button disappeared as soon as any Agent had the
  version the check found, so with one Pi target behind and another up to
  date, the one behind lost it. The row now compares each selected Agent
  with that version on its own, and updates only the ones behind.
2026-10-05 00:05:07 +08:00
Willie 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
2026-10-04 23:55:11 +08:00
Willie eb58dec1f0 fix(plugin): keep the global owner of a Pi project override
Codex review on #399: switching an extension of a global package in a
project writes a project override, which the project view reads in its
project-entry loop. In project mode that loop looked only at the
project's config, so the override lost the global plugin's name.

A project entry now falls back to the global config's owners when the
project config has none.
2026-10-04 23:14:07 +08:00
Willie 56b4f79ac4 fix(plugin): find global owners of inherited Pi packages in project mode
Codex review on #399: a dashboard started in project mode gives the
plugin service the project's config, so a global Pi package that
Skillshare installed, inherited by the project, found no owner and its
card fell back to the state path again. The earlier test kept
ConfigPath on the global config and missed this.

The service now takes the global config path in project mode, and the
project view looks up inherited global entries there.
2026-10-04 23:08:33 +08:00
Willie a510d2a089 fix(plugin): name the managed plugin of a Pi entry with a problem
Codex review on #399: an entry with a readable source but a value
Skillshare can't edit, such as "extensions": null, returned early in
both the global and project views before ManagedBy was set. Its card
then fell back to the plugin's local state path again.

The lookup now runs for every entry whose source can be read, before
the early return.
2026-10-04 23:02:03 +08:00
Willie c31dffc450 fix(plugin): name Skillshare-installed packages in Pi project views
Codex review on #399: piProjectState never set ManagedBy, unlike
piGlobalState. A project's Extensions tab (<project>@pi, or pi in
project mode) therefore titled a plugin Skillshare installed by its
state path and dropped the "Managed by Skillshare" tag, for both the
project's own entries and the global entries it inherits.

The lookup by source, then by resolved local path, moves into
piManagedBy and runs for every package of both views.
2026-10-04 22:56:12 +08:00
Willie f0e3ee22b3 test(plugin): keep Codex finder tests off the machine's own installs
The macOS finder tests stub PATH, but the candidate list still checked
/opt/homebrew/bin/codex, /usr/local/bin/codex and /Applications on the
real filesystem. In the devcontainer /usr/local/bin/codex exists, so it
won over the app bundle each test set up and make check failed there.

The finder now joins those absolute paths onto a root field, "" on a
real machine, and the tests point it at an empty temp dir.
2026-10-04 22:56:12 +08:00
Willie f5a2470276 fix(plugin): keep the Codex logo under a portable manifest
Adopting the portable root plugin.json replaced the whole Codex target
info, dropping the interface.logo read from .codex-plugin/plugin.json.
Codex still overlays that native manifest, and the portable one rarely
names a logo, so the add/list UI fell back to a generic icon.

Refs Codex review on #396.
2026-10-04 22:24:12 +08:00
Willie 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.
2026-10-04 22:18:57 +08:00
Willie 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.
2026-10-04 22:14:28 +08:00
Willie c43bb763f9 fix(status): count one extension output per agent
Two agents that flatten to the same name matched the same manifest entry
and were both counted, so status could report 2/2 with one output on
disk. Each manifest key now satisfies one agent.

Refs Codex review on #392.
2026-10-04 20:01:51 +08:00
Willie aca1438fb5 Merge remote-tracking branch 'origin/runkids/391-extension-agent-status' into runkids/391-extension-agent-status 2026-10-04 19:49:55 +08:00
Willie 51a3be1ca6 fix(status): report drift when an extension agent's source changed
Counting an extension output as synced from its output hash alone missed
the common case: the user edits the agent in the source and runs status
to see whether a sync is due. The output still matched the manifest, so
status, doctor and the dashboard reported no drift although the next
sync would regenerate it.

Sync now records a SHA-256 of the source each output was converted from
in the manifest (sources), and status counts an output only when both
the output and that fingerprint are current. Outputs recorded by earlier
releases have no fingerprint and count as current until the next sync
records one, so upgrading does not show the 0/N the report was about.

Refs #391, Codex review on #392.
2026-10-04 19:49:29 +08:00
Willie d589e4f92f Merge branch 'main' into runkids/391-extension-agent-status 2026-10-04 19:46:28 +08:00
Willie af7654712c fix(server): log a disable that a .local rule overrides
When a "!" rule in .skillignore.local overrode a single disable, the handler
returned 409 before its only ops log call, although AddPattern had already
written the pattern to .skillignore. The shared file changed with no trace in
the log. Log the attempt with status "error" and the reason before returning.
2026-10-04 19:40:44 +08:00
Willie 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.
2026-10-04 19:34:24 +08:00
Willie f403ea5a6f fix(status): count extension-converted agents as synced
An agent target with an extension writes each agent under output_ext
(reviewer.toml) with transformed content, and the manifest tracks that
output name. status, doctor and the dashboard's Sync tab counted synced
agents by looking for the source name and comparing with the source
content, so every converted agent was missing: status showed 0/N with
drift, doctor said the same, and the Sync tab kept them pending after a
successful sync.

For an extension target, count an agent as synced when the manifest
tracks an output with the same stem and that file still matches its
recorded hash. Matching by stem avoids loading the extension spec in
status paths. doctor keeps reporting leftover broken links for these
targets.

Refs #391
2026-10-04 19:33:50 +08:00
Willie 881d08e52e fix(sync): skip nested target dotdirs when discovering source skills
Installing a repo whose root is a skill copies the whole repo into the
source, including any .claude/skills/ the author keeps for their own
development. Install discovery already skips target dotdirs, but the
source walk used by sync, check, and the dashboard only skipped .git,
so those dev-only skills surfaced as nested skills and were synced to
every target.

Share the skip set through sourcewalk and apply it in both source
walks. Only dotdirs nested below the source root are skipped: host-style
paths directly under the root (.cursor/skills/*) stay visible because
they drive target inference.
2026-10-04 17:11:53 +08:00
Willie b466a06d11 fix(memory): scope the global examples to cross-project facts
The global block still offered "a decision with its reason" and "a
pitfall you confirmed" as things that belong in it, so a project
decision matched both blocks. The examples are now per scope: the global
ones name user preferences, decisions that apply across projects, and
pitfalls in a tool; the project ones stay project-bound. Both rules take
the examples as a parameter instead of a string replacement.

Refs Codex review on #387.
2026-10-04 16:54:05 +08:00
Willie 91ad0cba3a fix(memory): say which notes belong in project versus shared memory
An agent that reads both a global and a project guidance block saw the
same body twice, with two "save it here", and had to guess whether a
user preference or a project decision went to the shared folder or the
project one. Each block now says what belongs in it: the global block
points project notes at a project memory when one exists, and the
project block keeps project notes and says that notes about the user,
their tools, or other projects do not belong in it. The project block's
examples follow suit, so it no longer names "a stated user preference".

The active rule's two overlapping sentences on when to save are merged
into one, and the plugins reference describes the older Codex.app path
without reference to current events.
2026-10-04 16:47:48 +08:00
Willie 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
2026-10-04 15:16:14 +08:00
Willie 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
2026-10-04 15:15:43 +08:00
Willie 464d2fab73 fix(memory): route lessons to LEARNED.md in active guidance
The active rule asked for one fact per file, while init still creates
LEARNED.md as a multi-lesson log and the docs tell users to have agents
update it. The rule now says which goes where: a fact or decision gets
its own file linked from INDEX.md, a lesson from a failure gets a new
heading in LEARNED.md.

Refs Codex review on #384.
2026-10-04 14:53:39 +08:00
Willie 9ea51b1890 docs: fix stale facts and conflicts found by a prompt audit
- The LEARNED.md starter said to update only on request, which
  contradicted the active memory guidance; it now defers to the guidance.
- website/AGENTS.md hardcoded a command-page count that had drifted and
  omitted the Desktop App navbar item.
- wiki/testing.md gave `bash -c` and `bash -lc` as the rule in different
  places; it now says which container needs which, and why.
- Migration-relative wording in wiki/architecture.md and an unexplained
  "Always use" in the targets reference are stated as current rules with
  their reason.
2026-10-04 14:45:38 +08:00
Willie 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.
2026-10-04 14:45:38 +08:00
Willie 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.
2026-10-04 14:03:46 +08:00
Willie 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.
2026-10-04 11:50:03 +08:00
Willie 5fe2d78c2b feat(config): lay out auto-saved config files like the dashboard's Beautify (#380)
Config files written by the CLI were marshaled straight from the Go
structs, so sections ran together and plugins, hooks and mcp landed
above sources. Programmatic writes of the global and project config
now sort sections like the dashboard and separate them with a blank
line, keeping the original order when sorting would break a YAML alias.

Also documents one worktree and throwaway container per branch task.

Release-As: 0.24.1
2026-10-04 11:43:26 +08:00