> _**routing manifest (full INDEX with routing-hints appendix; ~7k tokens, on-demand)** · ~7,424 tokens_

# Hoody — surface index

Hoody is a remote-first computing platform: every workflow runs in account-owned
Linux containers reachable by URL. Three surfaces — typed **SDK** (`@hoody-ai/hoody-sdk`),
HTTP API at `https://api.hoody.icu`, system **CLI** (`hoody`) — share one control plane.

For each namespace below: a one-line purpose, links to the agent-optimized **skill page**
(quick, opinionated, copy-pastable) and the canonical **docs page** (long-form, conceptual),
a representative snippet, and the operation list. Fetch the skill URL for fast tasks;
fetch the docs URL when you need to understand *why*.

**Onboarding a brand-new user?** Fetch **<https://hoody.icu/skills/ONBOARDING.md>** and
follow it — a guided playbook (sign-up → first container/workspace → a live website + alias
→ Hoody Exec → a GUI app) that adapts to whether the user is technical. **Stuck on a
"how do I…"?** Ask the public docs assistant: `POST https://chatbot.hoody.icu/mcp` (no auth;
JSON-RPC tool `search_hoody_docs`, answers with cited URLs) or the `POST /api/chat` SSE fallback.

## Auth & kit URLs (read once, applies everywhere)

A bearer token authenticates against `https://api.hoody.icu`. Per-container **kit URLs**
of shape `https://{P}-{C}-{slug}-{n}.{N}.containers.hoody.icu` are themselves the credential —
the URL IS bearer for most kits (`files`, `sqlite`, `exec`, `terminal`, `display`, `notifications`, …).
The `agent` / `workspaces` kit additionally requires `X-Hoody-Container-Claim` + `X-Hoody-Token`
headers; the SDK injects these via `withContainer(...)` (CLI users mint/pass the claim manually). Realm-scoped: prepend
`{realmId}.` to the API host. **Full reference**: <https://hoody.icu/skills/SKILL-SDK.md#auth-model>
· <https://docs.hoody.icu/concepts/security/> · <https://docs.hoody.icu/concepts/proxy/>

---

## display — programmatic GUI desktops (screenshots, input, windows)

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/display.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/display.md> · CLI <https://hoody.icu/skills/SKILL-CLI/display.md>
- **Docs**: <https://docs.hoody.icu/kit/displays/>
- **Concepts**: <https://docs.hoody.icu/concepts/everything-is-a-url/> (display-N kit URL)

```ts
// Screenshot display :1, then click + type
const shot = await box.display.screenshots.capture({ base64: true, displayId: 1 });
await box.display.input.clickAt({ x: 640, y: 360, button: 1 }, { displayId: 1 });
await box.display.input.typeAt({ x: 640, y: 360, text: 'hello' }, { displayId: 1 });
```

**Ops**: `screenshots.{capture, captureMetadata, getLatest, getByTimestamp}` · `thumbnails.{capture, getLatest}` · `input.{clickAt, typeAt, mouseMove, drag, select, mouseScroll, keyboardKey, windowFocus, windowSearch, windowGeometry, windowActive, reset}` · `display.{listWindows, getWindowProperties, getClipboard, setClipboard}`
**Gotcha**: needs a persistent terminal session with `display: ":N"` to render — ephemeral terminals strip `DISPLAY`. Pair `terminal_id=N` ↔ `display=:N` ↔ URL `display-N`.

---

## files — container filesystem over HTTP, with Git-like change history

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/files.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/files.md> · CLI <https://hoody.icu/skills/SKILL-CLI/files.md>
- **Docs**: <https://docs.hoody.icu/kit/files/>
- **Concepts**: <https://docs.hoody.icu/foundation/containers/copy-sync/> (cross-host paths) · <https://docs.hoody.icu/foundation/storage/>

```ts
// Read, write, time-travel
const r = await box.files.get('/etc/hostname', { responseType: 'text', rawResponse: true });
await box.files.put('/workspace/hello.txt', Buffer.from('hello'));
const old = await box.files.get('/workspace/hello.txt', { revision: 12 });   // history
const diff = await box.files.get('/workspace/hello.txt', { diff: 1, from_seq: 12 });
```

**Client-level helper** (built on files): `box.syncAgentConfig(tool, opts)` pushes a
local agent CLI's config/credentials (`codex`/`claude`/`opencode`/`gemini`) into the
container — pairs with the dev-kit AI CLIs. See SDK core-ops § "Sync agent config".

**Ops**: `files.{get, put, delete, move, copy, listDirectory, glob, grep, stat, operate, append, chmod, chown}` · `mounts.{create, list, getDetails, update, unmount}` (rclone-backed FUSE) · `journal.{query, flush}` (mutation log)
**Gotcha**: paths are absolute container paths. Remote backends (`?backend=…`) need `--allow-remote` on the kit. Journal records local-FS only; remote-backend ops aren't replayable.

---

## terminal — persistent PTY sessions over HTTP/WS

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/terminal.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/terminal.md> · CLI <https://hoody.icu/skills/SKILL-CLI/terminal.md>
- **Docs**: <https://docs.hoody.icu/kit/terminals/>

```ts
// One-off command (ephemeral)
await box.terminal.execution.execute({ command: 'uname -a' }, { ephemeral: true });
// Persistent session
await box.terminal.sessions.create({ terminal_id: '1', shell: 'bash', user: 'user' });
await box.terminal.execution.execute({ command: 'cd /workspace && ls' }, { terminal_id: '1' });
```

**Ops**: `sessions.{create, list, get, delete}` · `execution.execute` · WS stream
**Gotcha**: ephemeral terminals strip `DISPLAY`; use a pinned session for GUI launches. `terminal_id` numeric 1–39999; 40000+ reserved for ephemeral.

---

## exec — Bun-powered micro-services: write any .js/.ts script and it auto-becomes a webhook URL

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/exec.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/exec.md> · CLI <https://hoody.icu/skills/SKILL-CLI/exec.md>
- **Docs**: <https://docs.hoody.icu/kit/exec/>

```ts
// Write → auto-mount → reachable at exec-kit-URL/build
await box.exec.scripts.write({
  path: 'build.js',
  content: 'module.exports = (req, res) => res.json({ ok: true });\n',
});
const r = await box.exec.execution.execute('build');  // r: ApiResponse<unknown> — body in r.data
```

**Ops**: `scripts.{write, read, list, delete}` · `execution.execute` · auto-mount at `{kit-url}/<bare-path>`
**Gotcha**: scripts use CommonJS. Accessor URL-encodes `/`, so multi-segment routes (`api/build`) must be hit by fetching the bare kit URL.

---

## sqlite — SQL transactions, JSON KV, time-travel history

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/sqlite.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/sqlite.md> · CLI <https://hoody.icu/skills/SKILL-CLI/sqlite.md>
- **Docs**: <https://docs.hoody.icu/kit/sqlite/>

```ts
await box.sqlite.kvStore.set('user:42', JSON.stringify({ name: 'Ada' }), {
  db: '/data/app.db', create_db_if_missing: true,
});
const r = await box.sqlite.kvStore.get('user:42', { db: '/data/app.db' });
// Multi-statement transaction + time-travel rollback:
await box.sqlite.database.executeTransaction({ db: '/data/app.db', statements: ['BEGIN', '…', 'COMMIT'] });
```

**Ops**: `kvStore.{set, get, delete, incr, decr, push, pop, rollback, getSnapshot}` · `database.executeTransaction` · `query.executeShareable` · `history.{list, getStats}` · TTL · JSON-path
**Gotcha**: keyed by `db` query param — every call needs an absolute db path. KV `get` returns the body raw (no envelope); JSON-encode/decode yourself.

## browser — Chromium/Firefox via Playwright (Patchright stealth)

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/browser.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/browser.md> · CLI <https://hoody.icu/skills/SKILL-CLI/browser.md>
- **Docs**: <https://docs.hoody.icu/kit/browser/>

```ts
const b = await box.browser.instances.start({ stealth: false });
await box.browser.interaction.browse({ browser_id: b.id, url: 'https://example.com' });
const shot = await box.browser.interaction.takeScreenshot({ browser_id: b.id });
const val = await box.browser.interaction.evalGet({ browser_id: b.id, script: 'document.title' });
```

**Ops**: `instances.{start, stop, restart}` · `interaction.{browse, browsePost, takeScreenshot, evalGet, evalPost}` · `page.{getHtml, getText, exportPdf}` · `cookies.{get, set, clear}` · `debugging.{getConsoleLogs, getNetworkLogs}` · CDP via `introspection.getDevtoolsUrl`
**Gotcha**: long-lived browsers keyed by `browser_id`. `stealth=true` swaps Playwright → Patchright (anti-fingerprint). Chromium ships `webSocketDebuggerUrl` ON by default.

## code — VS Code in a browser tab (and as an iframable single-extension surface)

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/code.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/code.md> · CLI <https://hoody.icu/skills/SKILL-CLI/code.md>
- **Docs**: <https://docs.hoody.icu/kit/code/>

```ts
// Open the full IDE — just visit the URL (iframable):
const url = `https://${P}-${C}-code-1.${N}.containers.hoody.icu/`;
// Extension-only embed (no IDE chrome) — e.g. Cline-as-a-service:
const cline = `${url}?extension=saoudrizwan.claude-dev`;
// Programmatic: install/list extensions, mint path-proxy URLs.
await box.code.extensions.install({ id: 'saoudrizwan.claude-dev' });
```

**Ops**: `extensions.{install, list, uninstall}` · `auth` · `vscode` · `static` · `proxy` · `health`
**Gotcha**: this is mainly a *URL*, not an API. The methods configure the editor; day-to-day use is "open the URL". Multiple `code-N` instances run side-by-side for parallel extensions.

## cron — managed crontab(1) entries per system user

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/cron.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/cron.md> · CLI <https://hoody.icu/skills/SKILL-CLI/cron.md>
- **Docs**: <https://docs.hoody.icu/kit/cron/>

```ts
await box.cron.entries.create({
  user: 'user', name: 'nightly-build',
  schedule: '0 3 * * *', command: 'bash /workspace/build.sh',
  expires_at: '2026-12-31T00:00:00Z',
});
const list = await box.cron.entries.list({ user: 'user' });
```

**Ops**: `entries.{create, list, get, update, delete}` · UUID-keyed, coexists with hand-written lines
**Gotcha**: managed entries are UUID-tagged and carry an `expires_at`; pass it on `create` to bound an entry's lifetime. Hand-written lines outside the managed block are preserved.

## curl — libcurl gateway + REST-as-GET-URL bridge

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/curl.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/curl.md> · CLI <https://hoody.icu/skills/SKILL-CLI/curl.md>
- **Docs**: <https://docs.hoody.icu/kit/curl/>

**When to reach for it:** any time the caller can **only fetch a URL** — a fetch-only client (the claude.ai web-fetch UI), a webhook/CRM field that takes a link, an `<img src>`/`<a href>`, an RSS scheduler, an LLM tool with web-search-only access. It turns *any* HTTP call (to any API, or to Hoody's own control plane via `&bearer_token=`) into one GET-able URL. (Extends to any use case — it's a general libcurl gateway with sessions, async jobs, and schedules.)

```ts
// GET bridge: fire a request from any GET-only environment. The ENTIRE request —
// body AND headers — fits in the query string; supplying a body auto-upgrades GET→POST.
// Bare URL form: …/api/v1/curl/request?url=<enc>&json=<enc>&header=...&bearer_token=…
const r = await box.curl.executeCurlRequestGet({
  url: 'https://api.example.com/foo',
  json: '{"hello":"world"}',              // raw body via `data`, binary via `data_base64`
  header: 'Authorization: Bearer XYZ',    // repeatable; method auto-upgrades to POST
});
// (POST executor `box.curl.execute({...})` remains for multipart/binary `--data-binary @file`.)
```

**Ops**: `curl.{execute, executeCurlRequestGet}` (GET-URL bridge) · `jobs.{list, get, cancel, getResult}` · `sessions.*` (cookie jars) · `schedules.*` · `storage.*`
**Gotcha**: the killer feature is the GET-URL bridge — any environment that can only issue GETs (browser tab, webhook URL field, LLM web-fetch tool) can do arbitrary HTTP — **including POST/PUT with a body + headers** (`data`/`json`/`data_base64` + repeatable `header=`) — via this kit.

## daemon — supervisord program lifecycle (default for "spawn a process")

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/daemon.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/daemon.md> · CLI <https://hoody.icu/skills/SKILL-CLI/daemon.md>
- **Docs**: <https://docs.hoody.icu/kit/daemons/>

```ts
// Ephemeral: launch + capture logs
const r = await box.daemon.quickStart.launch({
  command: 'python build.py', user: 'user', wait: true, timeout: 60,
});
const logs = await box.daemon.quickStart.getEphemeralLogs(r.temporary_id);
// Durable: registered program (persists across kit restarts)
const prog = await box.daemon.programs.add({
  name: 'webhook-server', command: 'node server.js', user: 'user',
  enabled: true, boot: true, autorestart: 'unexpected',
});
await box.daemon.control.start(prog.id, { wait: true });   // start takes a numeric program id
```

**Ops**: `quickStart.{launch, getEphemeralLogs, stop}` · `programs.{add, list, get, edit, remove}` · `control.{start, stop, enable, disable}` · `status.{get, getLogs}` · port-range fan-out · lazy-load
**Gotcha**: prefer `quickStart` for one-offs (no config write), `programs` when the process should survive container restarts. Logs always persist even after the process exits.

## pipe — zero-storage streaming HTTP rendezvous

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/pipe.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/pipe.md> · CLI <https://hoody.icu/skills/SKILL-CLI/pipe.md>
- **Docs**: <https://docs.hoody.icu/kit/pipe/>

```ts
// Sender:
await fetch(`${pipeUrl}/myfile.bin?n=3`, { method: 'PUT', body: largeBlob });
// Receivers (up to N): just GET the same URL — bytes fan out in-memory, no server storage.
const stream = await fetch(`${pipeUrl}/myfile.bin`);
```

**Ops**: PUT/POST sender, GET receiver, `?n=<count>` fan-out (≤256), `?video` live stream, `?progress` telemetry, `/noscript` browser UI
**Gotcha**: paths exist only while there's a pending sender or receiver. Zero on-disk staging — pure in-memory rendezvous.

## proxyLogs — per-container reverse-proxy request log (read-only)

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/proxyLogs.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/proxyLogs.md> · CLI <https://hoody.icu/skills/SKILL-CLI/proxyLogs.md>
- **Docs**: <https://docs.hoody.icu/kit/proxy-logs/>

```ts
// Query historical logs
const logs = await box.proxyLogs.logs.list({
  kind: 'request', method: 'POST', serviceName: 'files', limit: 50,
});
// Live tail via SSE
const stream = box.proxyLogs.logs.streamLogs({ serviceName: 'files' });
for await (const event of stream) console.log(event);
```

**Ops**: `logs.{list, getStats, streamLogs}` (SSE) · filter by `kind`/`level`/`method`/`serviceName`/`source`
**Gotcha**: read-only — for write/inspect MITM, use `proxyHooks` (in the `api` control plane).

## tunnel — reverse tunnels (ngrok built-in, with proxy/auth/logs/MITM glued in)

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/tunnel.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/tunnel.md> · CLI <https://hoody.icu/skills/SKILL-CLI/tunnel.md>
- **Docs**: <https://docs.hoody.icu/kit/tunnel/>

```ts
import { tunnelExpose, tunnelPull } from '@hoody-ai/hoody-sdk';
// EXPOSE: publish laptop :3000 on the container's public domain
const h = await tunnelExpose({ container: containerWsUrl, token, containerPort: 0, to: { host: 'localhost', port: 3000 } });
console.log(h.publicUrl);
// PULL: project container :5432 onto laptop loopback
const p = await tunnelPull({ container: containerWsUrl, token, containerPort: 5432, to: { host: 'localhost', port: 5432 } });
```

**Ops**: top-level helpers `tunnelExpose` / `tunnelPull` / `tunnelServe` (HTTP/1.1 + WS, TCP reverse) · namespace `tunnel.{listBindings, listSessions, listTunnels, killSession, getMetrics, tunnelConnect}` · driver-managed long-lived WS
**Gotcha**: tunnels inherit the full proxy stack — `proxyPermissionsContainer` gates them, `proxyHooks` can MITM them, `proxyLogs` captures every request. Friendly aliases via `proxyAliases`.

## watch — Linux inotify file-change streams with replay

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/watch.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/watch.md> · CLI <https://hoody.icu/skills/SKILL-CLI/watch.md>
- **Docs**: <https://docs.hoody.icu/kit/watch/>

```ts
const w = await box.watch.watchers.create({
  paths: ['/workspace'], globs: ['**/*.ts'], ignore_dirs: ['node_modules'],
  coalesce_ms: 100, kinds: ['created', 'modified'],
});
// Stream events (SSE/WS)
const stream = box.watch.streams.streamSse(w.id, { since_id: lastSeen });
// Or paginated history + resume
const page = await box.watch.streams.listEvents(w.id, { since_id: lastSeen });
```

**Ops**: `watchers.{create, list, get, delete}` · `streams.{listEvents, streamSse, streamWs}` (SSE/WS) · bounded replay buffer with `since_id` resume
**Gotcha**: bounded in-memory buffer — long disconnects may lose events past the ring. Coalesce window dedupes bursts.

## notifications — desktop toasts inside a container

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/notifications.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/notifications.md> · CLI <https://hoody.icu/skills/SKILL-CLI/notifications.md>
- **Docs**: <https://docs.hoody.icu/api/kit/notification-server/>

```ts
await box.notifications.notify.trigger({ display: ':1', summary: 'Build done', body: '12 passed' });
const log = await box.notifications.list(':1', { limit: 10 });
// Stream new entries
const stream = await box.notifications.connectStream({ displays: 'all' });
```

**Ops**: `notify.trigger` (`notify-send`) · `list`/`dismiss` (log) · `connectStream` (WS/SSE) · `icons.get`
**Gotcha**: requires a `DISPLAY=:N` X session (same constraint as `display` kit). Accepts the bare kit URL — no `X-Hoody-Container-Claim` header needed. Kit slug is `n-{serviceIndex}`.

## notes — collaborative notebooks (nodes, docs, databases)

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/notes.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/notes.md> · CLI <https://hoody.icu/skills/SKILL-CLI/notes.md>
- **Docs**: <https://docs.hoody.icu/kit/notes/>

```ts
// identity.get auto-provisions a notebook + a `Home` section + starter pages.
const me = await box.notes.identity.get();                       // { notebookId, userId, ... }
const sections = await box.notes.nodes.list(me.notebookId, { type: 'section' });
const home = sections.data.nodes.find(n => n.attributes.name === 'Home');
// nodes use `parentId` + `attributes`; a page needs name + parentId (cannot be root)
const page = await box.notes.nodes.create(me.notebookId, { type: 'page', parentId: home.id, attributes: { name: 'Day 1' } });
// write content via append — the server assigns block id/parentId/index
await box.notes.documents.appendDocument(me.notebookId, page.data.id, { type: 'heading1', text: 'Day 1' });
await box.notes.comments.create(me.notebookId, page.data.id, { content: 'looks good' });
// a database node holds typed columns under attributes.fields; records via databases.create
const db = await box.notes.nodes.create(me.notebookId, { type: 'database', parentId: home.id, attributes: { name: 'Tasks', fields: { /* … */ } } });
```

**Ops**: `nodes.{create, get, list, update, delete}` (sections/pages/channels/messages/databases/records) · `documents.{appendDocument, put, patch, get}` · `databases.{create, list, update, delete}` (records) · `comments.*` · `reactions.*` · `versions.*` · `collaborators.*` · `files.tus*` (TUS attachments) · WS mutation feed
**Gotcha**: hierarchical — every node has a `parentId` chain; pages need a parent (use the auto-created `Home` section). Documents attach only to `page`/`record` nodes. To write a doc prefer `documents.appendDocument` (server assigns block id/parentId/index); building `documents.put` blocks by hand requires the real block-type strings and the `attrs` key, and container blocks (lists/tables) hold their text in a child `paragraph`.

## app — resolve apps to shell commands (cross-source package resolver)

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/app.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/app.md> · CLI <https://hoody.icu/skills/SKILL-CLI/app.md>
- **Docs**: <https://docs.hoody.icu/api/app/>

```ts
const r = await box.app.execution.searchCandidates({ app: 'firefox', limit: 5 });
// → { candidates: [{ source: 'nixpkgs', shell_command: '…', set_id: '…' }, …] }
const r2 = await box.app.execution.searchCandidates({ app: 'owner/repo', source: ['oci'] });
// Batch
const batch = await box.app.execution.runBatch({
  items: [{ request_id: '1', mode: 'run', selector: { app: 'node' } }],
});
```

**Ops**: `execution.{searchCandidates, runBatch, runAppPost, preflight}` (trusted-list + system-path + nixpkgs + pkgx + AppImage + OCI + manifests) · `profiles.*` · `recipes.*` · `dry_run` / `print_curl`
**Gotcha**: returns ranked *candidates* with `shell_command`; doesn't run them by default — pair with `terminal` or `daemon` to actually execute. Set `set_id` is stable across calls.

## agent — Hoody OS / Hoody Workspaces — full GUI for coding, agents, files (slug `workspaces-1`)
<!-- "Hoody OS" and "Workspaces" both refer to this namespace. The kit URL is the GUI; this namespace is the programmatic surface. -->

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/agent.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/agent.md> · CLI <https://hoody.icu/skills/SKILL-CLI/agent.md>
- **Docs**: <https://docs.hoody.icu/kit/workspaces/>
- **Concepts**: <https://docs.hoody.icu/foundation/hoody-ai/>

```ts
const w = await box.agent.workspace.workspacesCreate({ name: 'experiment-1' });
const s = await box.agent.sessions.create(w.id, { title: 'demo' });
await box.agent.prompt.agentPrompt({ session_id: s.id, content: 'list files in /workspace' });
// Stream a message via SSE:
const events = box.agent.workspaceSession.sessionsStreamMessage(w.id, s.id, messageId);
// Branches: git worktrees inside a workspace
const br = await box.agent.branches.createBranch(w.id, { name: 'feat-x' });
```

**Ops**: `workspace.*` · `sessions.*` · `prompt.*` · `branches.*` (git worktrees) · `permissions.*` · `mcp.*` (tool servers) · `memory.*` · `providers.*` · `imageGen.*` · `webSearch.*` · `experimental.*` · `meta.list-skills` / `discover-skills`
**Gotcha**: **requires `X-Hoody-Container-Claim` + `X-Hoody-Token` headers**. Kit slug is `workspaces-1` not `agent-1`. URL: `https://{P}-{C}-workspaces-1.{N}.containers.hoody.icu`. Each container has its own Workspaces instance.

## api — control plane (identity, projects, containers, billing, vault)

- **Skill**: SDK <https://hoody.icu/skills/SKILL-SDK/api.md> · HTTP <https://hoody.icu/skills/SKILL-HTTP/api.md> · CLI <https://hoody.icu/skills/SKILL-CLI/api.md>
- **Docs**: <https://docs.hoody.icu/foundation/hoody-api/>
- **Concepts**: <https://docs.hoody.icu/concepts/realms-projects/> · <https://docs.hoody.icu/foundation/wallet/>

```ts
// Auth
await hoody.api.authentication.login({ username: 'alex', password: '…' });
// Containers
const cs = await hoody.api.containers.list();
const c = await hoody.api.containers.create(projectId, { server_id, name: 'box-1', hoody_kit: true });
// Auth tokens for headless agents (realm-scoped)
const tok = await hoody.api.authTokens.create({ alias: 'agent-x', realm_ids: [realmId] });
// Vault, wallet, rentals, pools, proxy permissions, …
```

**Ops**: `authentication.*` · `tfa.*` · `users.*` · `authTokens.*` · `projects.*` · `containers.*` (incl. snapshot + network-config methods) · `env.*` · `firewall.*` · `images.*` · `storageShares.*` · `proxyPermissionsContainer.*` · `proxyHooks.*` · `proxyAliases.*` · `rentals.*` · `serverRental.*` · `wallet.*` · `vault.*` · `pools.*` · `realms.*` · `notifications.*` (account) · `events.*` · `activity.*`
**Gotcha**: realm-scoping — every method accepts `_realm: realmId`, or use `https://{realmId}.api.hoody.icu` as `baseURL` to apply globally. This namespace mints the tokens every other namespace depends on.

---

## Mode-blend overview (when to pick SDK vs HTTP vs CLI)

| You're … | Pick | Entry |
|---|---|---|
| TS/JS service or browser app | **SDK** | <https://hoody.icu/skills/SKILL-SDK.md> |
| Calling from Python/Rust/Go/… | **HTTP** | <https://hoody.icu/skills/SKILL-HTTP.md> |
| Shell / CI / SSH | **CLI** | <https://hoody.icu/skills/SKILL-CLI.md> |
| Need a GET-able URL for YOUR OWN logic/handler | **`exec` kit auto-mount** | see `exec` above |
| Drive ANY HTTP / Hoody call from a URL-only client (claude.ai fetch, webhook, `<img src>`) | **`curl` GET-bridge** | see `curl` above |

## Cross-cutting pitfalls (mode-agnostic)

- **Kit URL IS the credential** — restart does NOT rotate it; only delete+recreate does. To gate access, replace `proxyPermissionsContainer` (GET → PUT with `If-Match`).
- **Kit auth headers are NOT uniform.** `agent` / `workspaces` needs `X-Hoody-Container-Claim` + `X-Hoody-Token`; others (including `notifications`) accept the bare URL.
- **`server_name` is the routable host**, never `subserver_name`.
- **Container ≠ Docker** — full Linux box (systemd, root, ssh, persistent disk).
- **Retryable**: `408 / 425 / 429 / 500 / 502 / 503 / 504`.

<!-- routing-hints-begin -->
## Routing hints (use these to disambiguate)

- **A user-bound port inside the container is automatically reachable** at
  `https://{P}-{C}-http-<port>.{N}.containers.hoody.icu` — no namespace call
  needed to "expose" it. If the user asks "how do I reach my app on port N
  from the internet?", the answer is "just use the auto-URL". For policy
  gating (passwords, IP, JWT, hide the URL behind an alias) → `api`
  (`proxyPermissionsContainer`, `proxyAliases`). Use `tunnel` only when the
  user wants to expose something running on **their laptop** to the world
  via the container, not something already running **inside** the container.

- **`tunnel` vs `api`** — tunnel is laptop → container (ngrok-style); api +
  the auto-URL is for code already running in the container.

- **`curl` has built-in scheduling** (`curl.schedules.*`) — for recurring
  HTTP pings/scrapes/webhooks, prefer `curl` over `cron`. Use `cron` when
  the recurring task is a shell command, not an HTTP call.

- **`exec` vs `daemon` vs `terminal`** —
  - One HTTP-callable script you GET to trigger → `exec`.
  - A long-running supervised process (web server, queue worker, restart on
    crash) → `daemon` (`programs.add` + `control.start`).
  - A one-off command, ephemeral, capture output once → `daemon.quickStart`
    (preferred, persists logs) or `terminal.execute(ephemeral)`.
  - An interactive REPL / TUI / multi-command session → `terminal.sessions`.

- **`browser` vs `display`** — `browser` controls a Playwright-driven
  headless browser (HTTP rendering); `display` controls the X11 GUI
  desktop (any GUI app, including a native browser window). If the task
  is "scrape a web page", use `browser`. If it's "click a window in an
  X session", use `display`.

- **`files` vs `pipe`** — `files` writes to the container filesystem
  (persistent, journaled). `pipe` is in-memory zero-storage rendezvous
  for ephemeral bytes that never touch disk. Default to `files`; pick
  `pipe` only if the user explicitly does NOT want storage.

- **`agent` slug is `workspaces-1`** — anything about the Hoody Workspaces
  GUI, coding-agent sessions, branches, MCP tool servers, providers,
  workspace memory → `agent`.

- **Code-embedded queries (`await box.X.method(...)` or `client.X.method(...)`)
  ALWAYS map to namespace X** — do NOT abstain just because the query has
  no prose. The SDK token is itself the answer.

- **Account/billing/realm/network-config** queries route to **`api`** —
  realms (`api.realms.list`), wallet/billing (`api.wallet.*`), and per-container
  network config (`api.containers.getNetworkConfig`) are all real control-plane
  surfaces. Emit `NONE` (abstain) only for genuinely unsupported tasks (e.g. SSO
  provider setup, external DNS management) with no per-container kit and no `api` method.
<!-- routing-hints-end -->


## Long-tail concept search

For questions outside the 19 namespaces above (SSO, realms vs projects, snapshots,
billing, networking model, …), search the canonical docs:
**`POST https://chatbot.hoody.icu/api/chat` `{ "message":"..." }` → SSE-streamed answer with cited URLs.**
(Same retrieval + LLM substrate as the docs chat widget; one HTTP call, no tool-call wrapping.)

Or call the **MCP Streamable-HTTP** variant at `https://chatbot.hoody.icu/mcp` —
JSON-RPC over POST, one tool `search_hoody_docs(question)`, returns the answer
with cited source URLs in one text block. Same pipeline, agent-friendly framing,
public + unauthenticated. Wire it once into any MCP client (Claude Desktop,
opencode, Cursor) or call raw via `curl` — see `SKILL.lite.md` for one-liner examples.

## Build accuracy over time — remember what worked

When a Hoody call succeeds (correct endpoint + headers + body shape) **or
when you recover from a wrong path** (a hallucinated route, a missing
claim header, the wrong namespace for a fuzzy query), **save it to
memory** under a short tag so the next call is cheap and accurate:

- `[Hoody/api]` — control-plane calls (`api.hoody.icu/...`)
- `[Hoody/kit:<name>]` — per-kit URL shape + auth (`terminal`, `display`, `files`, `exec`, `agent`, `notifications`, …)
- `[Hoody/mcp]` — `chatbot.hoody.icu/mcp` (JSON-RPC) or `/api/chat` (SSE)
- `[Hoody/gotcha]` — surprising behaviour, wrong-path corrections

The point of the tag is **grep-findability**. A future agent (or future
you) sees the bracketed prefix in its memory index and jumps to the
verified call shape without re-reading the whole skill. Concrete write
recipes (which fields a memory should record per category) live in the
per-namespace `SKILL-{MODE}/<ns>.md` tier-2 pages.
