mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 20:03:05 +00:00
feat(coding-agent): add SSH URL support for git packages
Use hosted-git-info library for robust parsing of SSH URLs (git@host:path and ssh://) in addition to HTTPS. SSH and HTTPS URLs for the same repo are now properly deduplicated.
This commit is contained in:
parent
0404a93e33
commit
fba9a8aece
9 changed files with 576 additions and 48 deletions
|
|
@ -60,13 +60,32 @@ npm:pkg
|
|||
```
|
||||
git:github.com/user/repo@v1
|
||||
https://github.com/user/repo@v1
|
||||
git@github.com:user/repo@v1
|
||||
ssh://git@github.com/user/repo@v1
|
||||
```
|
||||
|
||||
- HTTPS and SSH URLs are both supported.
|
||||
- SSH URLs use your configured SSH keys automatically (respects `~/.ssh/config`).
|
||||
- Raw `https://` URLs work without the `git:` prefix.
|
||||
- Refs pin the package and skip `pi update`.
|
||||
- Cloned to `~/.pi/agent/git/<host>/<path>` (global) or `.pi/git/<host>/<path>` (project).
|
||||
- Runs `npm install` after clone or pull if `package.json` exists.
|
||||
|
||||
**SSH examples:**
|
||||
```bash
|
||||
# Standard git@host:path format
|
||||
pi install git@github.com:user/repo
|
||||
|
||||
# With git: prefix
|
||||
pi install git:git@github.com:user/repo
|
||||
|
||||
# ssh:// protocol format
|
||||
pi install ssh://git@github.com/user/repo
|
||||
|
||||
# With version ref
|
||||
pi install git@github.com:user/repo@v1.0.0
|
||||
```
|
||||
|
||||
### Local Paths
|
||||
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue