feat(ai-tools): install/update AI CLIs, remote catalog sync, cached favicons (#40 A2)
This commit is contained in:
@@ -6,6 +6,24 @@ One JSON file per AI coding CLI AgentHub can run in a lane. Loaded by
|
||||
`DASHBOARD_AI_TOOLS_DIR` with the same `id` replaces the built-in one (it may
|
||||
not set `launcher`).
|
||||
|
||||
## Install / update (A2)
|
||||
|
||||
Two optional fields, honoured only in built-in files and in the copy of the
|
||||
newest release's catalog that `server/lib/ai-tools-sync.js` keeps in
|
||||
`<data dir>/runtime/ai-tools-remote/` — a file in `DASHBOARD_AI_TOOLS_DIR`
|
||||
carrying either is rejected, because an Install click would run what it names:
|
||||
|
||||
- `install`: `{ "kind": "npm", "package": "<npm name>" }` (runs
|
||||
`npm install -g <package>@latest` with the login shell's npm) or
|
||||
`{ "kind": "script", "url": "https://…" }` (https, same site — last two host
|
||||
labels — as `homepageUrl`; downloaded by the server, run as `bash <file>`).
|
||||
- `update`: `{ "kind": "npm" }` or `{ "kind": "script" }` (reuse `install`),
|
||||
or `{ "kind": "self", "args": ["update"] }` (the tool's own updater).
|
||||
|
||||
Before adding an npm package, check its owner (`npm view <pkg> maintainers
|
||||
repository.url`) and that its `bin` matches `detect`: a squatted name would
|
||||
install a stranger's code on every machine that clicks Install.
|
||||
|
||||
## Attribution
|
||||
|
||||
The commands, prompt modes, permission-bypass flags and homepages of the tools
|
||||
|
||||
Reference in New Issue
Block a user