feat(plugins): install and update Git sources (#3920)

Make every trusted Git repository directly distributable without introducing a registry or package manager. Managed checkouts retain their resolved commit, track branches explicitly, and stage validation before activation so failed updates restore the running version.
This commit is contained in:
Mohamed Boudra
2026-08-27 15:24:01 +08:00
committed by GitHub
parent 4de913fb82
commit ecfb77b014
20 changed files with 1327 additions and 41 deletions
+9
View File
@@ -63,6 +63,9 @@ $PASEO_HOME/
├── runtime/
│ └── managed-processes/
│ └── {recordId}.json # Helper processes owned by Paseo; reconciled on daemon bootstrap
├── plugins/
│ ├── sources.json # Git origin, ref, commit, and managed checkout ownership
│ └── {pluginId}/{version}/checkout/ # Source checkout for one installed Git commit
└── push-tokens.json # Expo push notification tokens
```
@@ -251,6 +254,12 @@ snapshot so a mixed edit can apply its live subset and still name the paths that
All fields are optional with sensible defaults.
Git-managed plugins still appear as directory sources in `config.json`. This keeps the plugin
runtime and protocol config compatible with directory-only clients. `plugins/sources.json` owns the
Git-specific origin, tracking ref, installed commit, repository subdirectory, and checkout root.
Paseo writes it atomically. An update creates and validates a new version directory before changing
the configured directory path; successful activation removes the old version.
### Profile lists
`terminalProfiles` and `agentProfiles` are both whole-list fields: a config patch replaces the
+29 -4
View File
@@ -1,9 +1,9 @@
# Local plugins
# Plugins
Local plugins contribute daemon RPCs, native app surfaces, workspace panels, Command Center items,
app themes, and composer attachment sources from one `index.ts`. Paseo executes the server contribution in a
subprocess and evaluates the client contribution in the app runtime. Plugin code is trusted code;
this first slice does not sandbox it.
Paseo does not sandbox it.
## Install a directory source
@@ -74,8 +74,33 @@ backend code can access the daemon machine, while client contributions run insid
Source changes are explicit. Run `paseo plugin reload <id>` to stop and fully tear down the old
plugin before compiling and starting from disk. A failed reload stays failed; Paseo does not restore
the old code. Use `enable`, `disable`, and `remove` to manage one plugin. Remove deletes only its
configuration, never its source directory. The global `pluginsEnabled` switch remains available.
the old code. Use `enable`, `disable`, and `remove` to manage one plugin. Removing a directory source
never deletes it. The global `pluginsEnabled` switch remains available.
## Install a Git source
GitHub repositories use an `owner/repository` shorthand. Other hosts use a Git URL. An existing
directory always wins over shorthand resolution.
```bash
paseo plugin add owner/repository
paseo plugin add https://git.example.com/owner/repository.git
paseo plugin add owner/monorepo --path plugins/review
paseo plugin add owner/repository --ref main
paseo plugin status
paseo plugin update review
paseo plugin update --all
```
Omitting `--ref` tracks the remote's default branch. A branch passed with `--ref` also tracks;
tags and commits stay pinned. `status` fetches tracked refs and reports the installed and available
commits. `update` checks out a new version, validates its manifest, compiles both bundles, and starts
it before changing the configured path. A compilation or startup failure restores the running
version. Removing a Git source deletes Paseo's managed checkout.
Git installation does not run a package manager or install script. A distributable source plugin
uses Paseo's host-provided modules or commits any other bundled source it needs. Native React Native
dependencies work only when the Paseo app already ships the native module.
Server contributions can write to stdout and stderr with normal Node logging. Paseo adds `[paseo]`
entries for loading, ready, stopping, and stopped transitions. Compilation and load failures are