feat(plugins): install from subdirectories and select update refs - #1045
Merged
Merged
Conversation
Signed-off-by: David Viejo <dviejo@kfs.es>
📓 Changelog previewThis is what your commits will add to the generated ## [Unreleased]
### Added
- **plugins:** Install from subdirectories and select update refs
### Fixed
- **plugins:** Explain invalid repository directory paths |
|
Signed-off-by: David Viejo <dviejo@kfs.es>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Install TypeScript plugins from a self-contained GitHub subdirectory and select branches, tags, or commits for updates. For example:
The console exposes the directory at install time and a ref override when updating. Catalog review opens the exact directory at the reviewed commit. Updating without a ref retains the stored selection; every install records the resolved commit. Root installations remain compatible.
The selected path is validated and included in receipts, status, audit attribution, source conflict checks, and actor identity. Same-source ref updates preserve grants; attempting to install the same plugin name from another path is rejected. Only the selected subtree enters the existing bounded Docker builder. Catalog schema v2 permits sibling plugins in one repository; schema v1 remains supported for root entries.
Registry companion: gotempsh/plugins#5. Plugin authoring skill and generated API/CLI references are updated here.
Evidence
cargo test --lib -p temps-external-plugins -- --test-threads=1: 193 passed. New coverage includes paths, sibling identity conflicts, receipt tampering, backward-compatible root receipts, custom branches/tags/SHAs, missing refs, and catalog v2.cargo test --lib -p temps-external-plugins pinned_builder_compiles_without_host_mounts_when_image_available -- --nocapture: 1 passed, Docker and the pinned builder image were present. The selectedplugins/fixturecompiled successfully despite invalid plugin manifests at repository root and in a sibling. Final changed fixture/conflict tests were rerun after the full suite.cargo check --lib -p temps-external-pluginsand Clippy with-D warnings: passed.bun test src/commands/plugin/install.test.ts: 35 passed; CLI typecheck passed.bun run src/index.ts plugin install <public-template-repository> --path missing-plugin-fixture --ref main --yesexited 1 withRepository must contain a matching package.json and src/index.ts. A temporary local API key was created (201) and deleted (204); no plugin was installed.../escape,/absolute, andplugins//demoeach returned 400 Invalid Plugin Repository. The live OpenAPI schema exposes the install path field.plugin-source-selection.spec.ts: 1 passed against the production web bundle and local session. Plugin endpoints were mocked: observed update bodies were{"ref_name":"release/v2"}then{}, confirming the override clears after success. It also checks the stored directory and mobile width.Limits
No published nested plugin was installed and upgraded end to end in this session; evidence separates real source/build/API tests from mocked UI update responses. The shared browser assertion initially reported the existing theme-script React warning in development mode; the same test passed against the production bundle. No broad web lint cleanup is included.
Each directory requires its own lockfile and complete source/build assets; parent workspace dependencies are not included. Whole-repository download/extraction limits still apply. Catalog-selected installs remain pinned to the reviewed commit; selecting a new branch/tag is explicit. Native plugins run with the host OS account's permissions, not in an OS sandbox.