feat: add skills search and website

This commit is contained in:
Peter Steinberger
2025-12-20 17:31:09 +01:00
parent c4a67b7d02
commit ba0791b896
9 changed files with 125 additions and 23 deletions

View File

@@ -160,14 +160,14 @@ Example:
### `skillsInstall` (installer preference)
Controls which installer is surfaced by the macOS Skills UI when a skill offers
multiple install options (brew vs node). Defaults to **brew when available** and
**npm** for node installs.
multiple install options. Defaults to **brew when available** and **npm** for
node installs.
```json5
{
skillsInstall: {
preferBrew: true,
nodeManager: "npm" // npm | pnpm | bun
nodeManager: "npm" // npm | pnpm | yarn
}
}
```
@@ -231,32 +231,29 @@ Defaults:
Notes:
- `clawdis gateway` refuses to start unless `gateway.mode` is set to `local` (or you pass the override flag).
### `canvasHost` (Gateway Canvas file server + live reload)
### `canvasHost` (LAN/tailnet Canvas file server + live reload)
The Gateway serves a directory of HTML/CSS/JS over HTTP so iOS/Android nodes can `canvas.navigate` to it.
The Gateway serves a directory of HTML/CSS/JS over HTTP so iOS/Android nodes can simply `canvas.navigate` to it.
Default root: `~/clawd/canvas`
Port: **same as the Gateway WebSocket/HTTP port** (default `18789`)
Path: `/__clawdis__/canvas/`
Live-reload WebSocket: `/__clawdis/ws`
Default port: `18793` (chosen to avoid the clawd browser CDP port `18792`)
The server listens on `0.0.0.0` so it works on LAN **and** Tailnet (Tailscale is optional).
The server:
- serves files under `canvasHost.root`
- injects a tiny live-reload client into served HTML
- watches the directory and broadcasts reloads over `/__clawdis/ws`
- watches the directory and broadcasts reloads over a WebSocket endpoint at `/__clawdis/ws`
- auto-creates a starter `index.html` when the directory is empty (so you see something immediately)
```json5
{
canvasHost: {
root: "~/clawd/canvas"
root: "~/clawd/canvas",
port: 18793
}
}
```
Notes:
- The bind host follows `gateway.bind` (loopback/lan/tailnet).
Disable with:
- config: `canvasHost: { enabled: false }`
- env: `CLAWDIS_SKIP_CANVAS_HOST=1`

View File

@@ -15,7 +15,7 @@ The macOS app surfaces Clawdis skills via the gateway; it does not parse skills
## Install actions
- `metadata.clawdis.install` defines install options (brew/node/go/pnpm/shell).
- The app calls `skills.install` to run installers on the gateway host.
- The gateway surfaces only one preferred installer when multiple are provided (brew when available, otherwise node manager from `skillsInstall`).
- The gateway surfaces only one preferred installer when multiple are provided (brew when available, otherwise node manager from `skillsInstall`, default npm).
## Env/API keys
- The app stores keys in `~/.clawdis/clawdis.json` under `skills.<skillKey>`.

View File

@@ -39,6 +39,8 @@ Notes:
- The parser used by the embedded agent supports **single-line** frontmatter keys only.
- `metadata` should be a **single-line JSON object**.
- Use `{baseDir}` in instructions to reference the skill folder path.
- Optional frontmatter keys:
- `homepage` — URL surfaced as “Website” in the macOS Skills UI (also supported via `metadata.clawdis.homepage`).
## Gating (load-time filters)
@@ -55,6 +57,7 @@ metadata: {"clawdis":{"requires":{"bins":["uv"],"env":["GEMINI_API_KEY"],"config
Fields under `metadata.clawdis`:
- `always: true` — always include the skill (skip other gates).
- `emoji` — optional emoji used by the macOS Skills UI.
- `homepage` — optional URL shown as “Website” in the macOS Skills UI.
- `requires.bins` — list; each must exist on `PATH`.
- `requires.env` — list; env var must exist **or** be provided in config.
- `requires.config` — list of `clawdis.json` paths that must be truthy.
@@ -73,7 +76,7 @@ metadata: {"clawdis":{"emoji":"♊️","requires":{"bins":["gemini"]},"install":
Notes:
- If multiple installers are listed, the gateway picks a **single** preferred option (brew when available, otherwise node).
- Node installs honor `skillsInstall.nodeManager` in `clawdis.json` (default: npm).
- Node installs honor `skillsInstall.nodeManager` in `clawdis.json` (default: npm; options: npm/pnpm/yarn).
If no `metadata.clawdis` is present, the skill is always eligible (unless disabled in config).