Skip to content

feat(plugin): install and update commands declared by plugins - #907

Open
salmonumbrella wants to merge 14 commits into
runkids:mainfrom
salmonumbrella:feat/issue-897-nov14
Open

salmonumbrella wants to merge 14 commits into
runkids:mainfrom
salmonumbrella:feat/issue-897-nov14

Conversation

@salmonumbrella

@salmonumbrella salmonumbrella commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • Portable plugins can declare executable commands in extensions.cc.runkids.skillshare.commands. On macOS/Linux, plugin add publishes links into ~/.local/bin globally or .skillshare/bin in a project, including when no native target is selected.
  • Package commands follow the plugin's default source through check, update, sync and removal. Links point into reviewed local snapshots. With an existing command receipt and an unchanged source recipe, sync repairs missing links using the recorded bytes. First publication without a receipt may discover current source content; run check first to review it.
  • Conflicting files and foreign links at names being published block publication. Removal works offline and removes only owned links, preserving commands installed or replaced by hand. Command failures retain successful native operations and return a nonzero exit status.
  • CLI, dashboard and Herdr show command state, versions and pending work. Documentation covers the manifest field and setup.

Why

Updating agents-context-router updates the plugin but leaves a separately installed ai-context command behind. Linking directly into the plugin's hashed content directory breaks on the next update. Declaring the command lets Skillshare keep it with the plugin and remove its owned link when the plugin is removed.

feat-plugin-install-and-update-commands-declared-by-plugins.mp4

Usage

Extend a portable root plugin.json, for example:

{
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
  "name": "demo",
  "extensions": {
    "cc.runkids.skillshare": {
      "commands": { "demo-tool": "bin/demo-tool" }
    }
  }
}

Commit bin/demo-tool as an executable file inside the package, then:

skillshare plugin add ./demo --no-tui -g
skillshare plugin update demo --no-tui -g
skillshare plugin update --all --no-tui -g
skillshare plugin remove demo --no-tui -g

Add ~/.local/bin to PATH yourself. For project mode, use -p, add <project>/.skillshare/bin to PATH, and add .skillshare/bin/ to the project root .gitignore. Skillshare does not edit shell profiles. Windows command publication is unsupported.

The router producer still needs to declare "ai-context": "skills/agents-context-router/scripts/ai-context.py" in this extension and commit that script with its executable bit set. Its current package has neither; this PR alone does not publish ai-context.

Type

Linked Issue

#897. This AI-assisted implementation and PR prose are offered as a reference. Maintainer approval is pending, and human line-by-line review remains outstanding.

Verification

  • The PR is draft at 6c4ec91fedaadaeb9ebc97cae232870e467f0f4c. Affected plugin (4.909 s), CLI (0.101 s), server (0.043 s) and integration tests (0.135 s), 80 UI/locale tests, and the production UI build passed. Exact-head make check passed (exit 0), covering docs, formatting, vet, Go unit tests, real CLI integration and Herdr tests (139 passed, 0 failed). Hosted CI settled with seven successful jobs (Nix, Linux unit/race, Ubuntu and macOS integration/race, Windows, offline Docker and redteam), two optional skips, and no pending or failed jobs.
  • At predecessor aca098be464d0363ab51aabdbc4c35501105bee2: all TestPluginCommands tests passed on Linux (41.747 s), after the new regression cases failed at a1fd02e. Exact-head make check passed (exit 0), including Herdr tests (139/139). Hosted CI settled with seven successful jobs (Nix, Linux unit/race, Ubuntu and macOS integration/race, Windows, offline Docker and redteam), two optional skips, and no pending or failed jobs.
  • At predecessor a1fd02e5494b7a2af3af99cba07535c7c5ca8644: make check passed (exit 0), covering docs, formatting, lint, Go unit tests, real CLI integration and Herdr tests (139/139). Focused Linux CLI tests also passed (0.913 s). Hosted CI settled with seven successful jobs (Nix, Linux unit/race, Ubuntu and macOS integration/race, Windows, offline Docker and redteam), two optional skips, and no pending or failed jobs. Windows passed all three affected CLI test owners and all four wizard modes, including commandless and mixed-native cases. That revision changed tests only.
  • At 8a27fb1b93e1cbe596cf328048ddf6137121335d: make check passed (exit 0), including Herdr tests (139/139). Focused command, plugin, CLI integration and API tests also passed.
  • Hosted CI at 8a27fb1b9: macOS and Ubuntu integration/race, Linux unit/race, Nix, offline Docker and redteam passed; two optional jobs were skipped. Windows failed in three CLI test owners. The test-only revision at a1fd02e corrected platform expectations and home-directory isolation; its fresh Windows job passed at a1fd02e5494b7a2af3af99cba07535c7c5ca8644.
  • On earlier revisions: make check, including unit tests, real CLI integration tests and Herdr tests (139/139), passed. Affected UI tests (70/70) and browser checks also passed before the final CLI change.
  • Earlier full UI suite (906 tests across 109 files), website build in all five locales, and a portable fixture install/list/remove with Codex 0.154.0 passed. These are not final-head results; the Codex check did not cover runtime loading or model calls.
  • An earlier hosted Codex review attempt at 8a27fb1b9 failed: failed summary, usage limit. That attempt returned neither findings nor a clean review. A later automatic review at aca098b completed with two findings, corrected at 6c4ec91fedaadaeb9ebc97cae232870e467f0f4c.
  • Hands-on native-client checks on Windows and macOS were not run.
  • At final readback, the branch is eight commits behind main with no merge conflicts; maintainer review remains required.

Checklist

  • I've read CONTRIBUTING.md, including its AI-assisted contributions section — author confirmation pending.
  • I've reviewed every line of the diff and can explain it — human review pending.
  • Tests included and passing (make check) — passed at 6c4ec91fedaadaeb9ebc97cae232870e467f0f4c.
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

Closes #897

Read executable declarations from the portable Skillshare extension without interpreting native slash commands. Validate candidate-relative executable paths before lifecycle publication, preserving catalog provider identity.
Keep package commands independent of native bindings and publish exact receipt-owned links into the scoped bin. Persist pending work before publication, retain reviewed snapshots for sync, and recover previous output when publication or applied-state persistence fails.
Carry reviewed package source observations through command-only selections and retries so native successes remain independent. Cover platform rejection, final command removal and snapshot cleanup recovery, and classify the scoped publisher writes in the existing filesystem ratchet.
Show package commands across CLI, dashboard and Herdr without presenting them as a native Agent. Document scoped PATH setup and receipt ownership in existing translations, with reproducible CLI and browser fixtures for update, conflict preservation and offline removal.
Isolate logical package snapshots and retain interrupted ownership before replacing pending intent so aliases and retries preserve executable provenance. Discover current commands independently of native selection, surface failed checks, refresh package versions, and localize command guidance through API outcomes.

Preserve native default-source semantics with current-source proof, correct stale built-in documentation, and remove the optional screenshot helper.
Include package commands in targeted CLI checks and updates only for selected default recipes. Preserve observed versions when final commands disappear, distinguish preview rows, and reuse existing parser and snapshot ownership proofs. Avoid unchanged-source sync downloads and document receipt-less publication.
Journal removal against the persisted declaration and replay each receipt only when its own intent matches. Isolate discovery errors between packages, retain offline final-command cleanup, and consolidate regression assertions at their existing behavior owners.
Propagate the existing root schema error instead of interpreting unsupported metadata as a removal. Reuse materialization and public approval proofs, remove unreachable guards and strings, and shorten optional native target guidance.
Preserve the accepted entry in package intent and command receipts while keeping targeted alternate distributions independent. Report command cleanup before pending work in CLI rows and use blocked for derived observation failures.
Retain original snapshot proofs until cleanup succeeds so removal permits an immediate re-add. Offer whole-package updates for recorded sources before their first command receipt, while preserving native deselection and receipt-based removal.
Use the ordinary untargeted request for the wizard package choice so native bindings update with commands. Verify both native digest and installed content through the actual helper and Apply, including packages without commands.
@salmonumbrella

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T17:56:03.122881Z 6c4ec91 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Keep native Cursor add and update coverage on Windows while asserting unsupported command publication, localized failure identities, and absent receipts. Preserve the full Unix publication and cleanup walks.
Only treat an operator entry as a conflict when its name remains desired. Retired names can stay under operator ownership while retained and renamed package commands update.
@salmonumbrella
salmonumbrella marked this pull request as ready for review November 14, 2026 16:38

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aca098be46

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/plugin/commands.go Resolved
Comment thread internal/plugin/commands.go Resolved
@salmonumbrella
salmonumbrella marked this pull request as draft November 14, 2026 16:56
Reject Applied or Pending receipts from another command bin before side effects so updates, re-adds and sync preserve the original ownership proof. Keep preservation guidance action-neutral in all locales, with regressions for changed-home transitions and localized single and batch consumers.
@salmonumbrella
salmonumbrella marked this pull request as ready for review November 14, 2026 17:44
@runkids runkids added feature New feature or request pending install Install and update flows labels Nov 15, 2026
@runkids

runkids commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Thanks for all the work you've put into these. A lot of large PRs have arrived at once, more than I can take in right now, so I need to go through them slowly. I can't promise a date, but I'll get to them.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request install Install and update flows pending

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install a command declared by a plugin and update it with the plugin

2 participants