[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CHTNVRZSEAWT6216W53ZJK":3,"skill-same:01M6CHTNVRZSEAWT6216W53ZJK":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":14,"repositoryHtmlUrl":44,"repositoryHomepageUrl":45,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M6CHTNVRZSEAWT6216W53ZJK","clawdapus-cli",null,"Use when working with the claw CLI, Clawfiles, claw-pod.yml, cllama proxy, or deploying AI agent containers with Clawdapus. Use when you see CLAW_TYPE, AGENT, MODEL, CLLAMA, CONFIGURE, INVOKE, SURFACE, HANDLE, TRACK, SKILL, or PRIVILEGE directives. Use when diagnosing agent startup failures, credential starvation, config injection, governance proxy issues, managed tool mediation, or memory plane problems.","mostlydev\u002Fclawdapus","mostlydev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F67087?v=4","01M6CHTC319DK6Z2ASSDJFQ50V","Wojtek Grabski","01M6CHTC7CGHYAYSJT6834D78T",3,"MIT","https:\u002F\u002Fgithub.com\u002Fmostlydev\u002Fclawdapus\u002Fblob\u002Fmaster\u002Fskills\u002Fclawdapus\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"clawdapus cli","cli","startup","credential","claw","governance","use","tool","containers","proxy","injection","config","configure","ai agent","issues","memory","model","2026-11-10 10:12:30",false,"---\nname: clawdapus-cli\ndescription: Use when working with the claw CLI, Clawfiles, claw-pod.yml, cllama proxy, or deploying AI agent containers with Clawdapus. Use when you see CLAW_TYPE, AGENT, MODEL, CLLAMA, CONFIGURE, INVOKE, SURFACE, HANDLE, TRACK, SKILL, or PRIVILEGE directives. Use when diagnosing agent startup failures, credential starvation, config injection, governance proxy issues, managed tool mediation, or memory plane problems.\n---\n\n# Clawdapus — Operational Skill\n\nInfrastructure-layer governance for AI agent containers. `claw` treats agents as untrusted workloads — reproducible, inspectable, diffable, killable.\n\n**Mental model:** Clawfile is to Dockerfile what claw-pod.yml is to docker-compose.yml. Standard Docker directives pass through unchanged. Claw directives compile into labels plus driver-specific runtime materialization. Eject anytime — you still have working Docker artifacts.\n\n## CLI Commands\n\n```bash\n# Prerequisites\ngo build -o bin\u002Fclaw .\u002Fcmd\u002Fclaw    # build from source\nclaw doctor                         # verify Docker, buildx, compose\n\n# Image lifecycle\nclaw pull [-f \u003Cpod>.yml]            # pinned infra + pod registry images + runner bases\nclaw pull --no-runners [-f \u003Cpod>]   # pinned infra + registry images only\nclaw build -t \u003Cimage> \u003Cpath>        # single Clawfile -> Dockerfile.generated -> docker build\nclaw build [-f \u003Cpod>.yml]           # with no path: build every pod service that has build:\nclaw inspect \u003Cimage>                 # show claw.* labels from built image\nclaw discover [-f \u003Cpod>.yml] [svc]   # discover stdio MCP tools into .claw-discovered\u002F\n\n# Pod lifecycle (mirrors docker compose UX)\nclaw up [-f \u003Cpod>.yml] [-d]         # strict: tells you to run claw pull\u002Fbuild when images are missing\nclaw up --fix [-f \u003Cpod>.yml] [-d]   # pull\u002Fbuild missing images, refresh runtime descriptors, then launch\nclaw up --discover-tools [-d]        # refresh missing\u002Fstale stdio MCP discovery snapshots, then launch\nclaw down [-f \u003Cpod>.yml]            # tear down\nclaw ps [-f \u003Cpod>.yml]              # container status\nclaw logs [-f \u003Cpod>.yml] [svc]      # stream logs (--follow)\nclaw health [-f \u003Cpod>.yml]          # driver health probes\nclaw compose \u003Ccmd> [args]           # passthrough: any docker compose subcommand\n\n# Scaffold\nclaw init [dir]                     # interactive project scaffold\nclaw agent add [name]               # add agent service to existing pod\n\n# Observability\nclaw audit [--since \u003Cdur>] [--claw \u003Cid>] [--type \u003Ctype>] [--json]\n                                    # summarize cllama telemetry from container logs\n                                    # types: request, response, error, intervention,\n                                    #        feed_fetch, feed_injection, context_block,\n                                    #        memory_op, provider_pool, tool_call\nclaw api schedule \u003Csubcommand>      # inspect\u002Fcontrol scheduled invocations via claw-api\n    # list | get \u003Cid> | pause \u003Cid> | resume \u003Cid> | skip-next \u003Cid> |\n    # clear-skip-next \u003Cid> | fire \u003Cid>\n\n# Per-run workers (stateless PicoClaw; opt-in task-home Hermes)\nclaw runs serve [--socket-dir DIR] [--allow-uid UID] [--callback-origin URL]   # supervisor; holds the pod run lock\nclaw runs launch|status|cancel|result \u003Cinstallation> \u003Crun-id> [...]            # Unix-socket clients\nclaw runs doctor [--remove-orphans]                                            # ledger check, orphaned workers\n\n# Session history & memory\nclaw history export \u003Cagent-id>      # export session history as NDJSON\n    [--after \u003CRFC3339>] [--limit N]\nclaw memory backfill \u003Cmem-svc>      # replay retained history to memory service\n    [--after \u003CRFC3339>] [--limit N] [--agent \u003Cid>]\nclaw memory forget \u003Cmem-svc>        # forget entries by ID with governed tombstones\n    --entry-id \u003Cid> --agent \u003Cid> [--reason \u003Ctext>]\n\n# Maintenance\nclaw update                         # re-run install.sh to update binary\n```\n\nOn successful pod launch, `claw up` prints `[claw] dashboard:  http:\u002F\u002Flocalhost:\u003Cport>` when the pod declares a `clawdash` surface. Agents debugging a running pod should point the operator at that URL.\n\nLifecycle commands block if `claw-pod.yml` is newer than `compose.generated.yml` — run `claw up` to regenerate. `claw down` is exempt.\n\n`-f` locates `compose.generated.yml` next to the pod file. Without `-f`, `claw up` uses `.\u002Fclaw-pod.yml`; other lifecycle commands look for `compose.generated.yml` in the current directory.\n\n`claw api schedule ...` does not require a host-published claw-api port. It\ntunnels through `docker compose exec -T claw-api \u002Fclaw-api -request-*`, so the\npod must already be up and include an injected `claw-api` service.\n`claw api schedule fire` waits synchronously for the final runner outcome and\ntherefore uses a longer operation-specific timeout. `--exec-timeout` overrides\nthe outer compose transport when an operator needs a different bound.\n\nTrust boundary: if you can run `docker compose exec` against the pod, you can\nselect any principal present in claw-api's `principals.json`. The `--principal`\nflag is a selector, not a security boundary.\n\n## Clawfile Reference\n\nA Clawfile is an extended Dockerfile. Every valid Dockerfile is a valid Clawfile.\n\n```dockerfile\nFROM openclaw:latest\n\nCLAW_TYPE openclaw                          # REQUIRED: selects runtime driver\nAGENT AGENTS.md                             # behavioral contract — must exist on host\n\nMODEL primary openrouter\u002Fanthropic\u002Fclaude-sonnet-5\nMODEL fallback anthropic\u002Fclaude-haiku-4-5\n\nCLLAMA passthrough                          # governance proxy type\nPERSONA .\u002Fpersonas\u002Ftrader                   # identity materialization (local or OCI)\n\nHANDLE discord                              # platform identity declaration\nINVOKE 15 8 * * 1-5  pre-market             # cron schedule (5-field + name)\n\nSURFACE service:\u002F\u002Ftrading-api               # infrastructure surface\nSURFACE volume:\u002F\u002Fshared-research read-write\n\nSKILL policy\u002Frisk-limits.md                 # operator policy, mounted read-only\nCONFIGURE openclaw config set key value     # driver-side config DSL, not arbitrary shell\n\nTRACK apt npm                               # mutation tracking wrappers\nPRIVILEGE worker root                       # privilege mode mapping\nPRIVILEGE runtime claw-user\n```\n\n### Directive Details\n\n| Directive | Purpose | Build -> Runtime |\n|-----------|---------|-----------------|\n| `CLAW_TYPE \u003Ctype>` | Selects driver. Determines HOW enforcement happens. | Label -> driver selection |\n| `AGENT \u003Cfile>` | Behavioral contract. **Must exist on host or startup fails.** Mounted read-only. | Label -> `:ro` bind mount |\n| `MODEL \u003Cslot> \u003Cprovider\u002Fmodel>` | Named model slot. Multiple allowed. Format: `provider\u002Fmodel-name`. | Label -> driver config injection |\n| `CLLAMA \u003Ctype>` | Governance proxy. Currently only `passthrough`. Runtime enforces max 1. | Label -> proxy sidecar wiring |\n| `PERSONA \u003Cpath>` | Identity materialization. Local refs copied with traversal hardening; non-local pulled as OCI artifacts. Sets `CLAW_PERSONA_DIR` only when present. | Label -> runtime materialization |\n| `HANDLE \u003Cplatform>` | Platform identity (`discord`, `slack`, `telegram`). Broadcasts agent ID as `CLAW_HANDLE_*` env vars. | Label -> driver config + pod env |\n| `INVOKE \u003Ccron> \u003Cname>` | Driver-specific scheduling. OpenClaw compiles into claw-api `schedule.json`; the compiler owns timing. | Baked contract, materialized at `claw up` |\n| `SURFACE \u003Cscheme>:\u002F\u002F\u003Ctarget> [mode]` | Infrastructure boundary. See Surface Taxonomy. | Label -> compose wiring |\n| `SKILL \u003Cfile>` | Reference markdown mounted read-only into runner skill directory. | Label -> host path validation + mount |\n| `CONFIGURE \u003Ccmd>` | Driver-specific config DSL. Use `\u003Cdriver> config set \u003Cpath> \u003Cvalue>`, not arbitrary shell. | Parsed by Clawdapus, then projected into generated runtime config\u002Fartifacts |\n| `TRACK \u003Cpkg-managers>` | Installs wrappers for `apt`, `pip`, `npm` to log mutations. | Build-time install |\n| `PRIVILEGE \u003Cmode> \u003Cuser>` | Maps privilege modes to user specs. | Label -> Docker user\u002Fsecurity |\n\n### `CONFIGURE` Semantics\n\n- Treat `CONFIGURE` as driver-side config mutation DSL, not as a generic startup hook.\n- The public contract is `CONFIGURE \u003Cdriver> config set \u003Cpath> \u003Cvalue>`.\n- Values are JSON-decoded when possible. Leave booleans, numbers, arrays, and objects unquoted; quote strings.\n- `CONFIGURE` applies after generated defaults, so it overrides what `HANDLE` and other driver defaults emitted.\n- For `openclaw`, Clawdapus applies `CONFIGURE` while generating `openclaw.json` during materialization. Do not assume downstream `openclaw config set ...` shell behavior is the same contract.\n- Dotted object paths are the supported shape today. OpenClaw uses keyed `agents.entries.main`, not the retired `agents.list` array. Managed provider routing\u002Fauthentication\u002Fruntime keys cannot be changed through CONFIGURE.\n- OpenClaw model selectors, including image, subagent and heartbeat models, must use declared MODEL values or their aliases. Put provider credentials in `x-claw.cllama-env`; provider auth\u002Froute variables in CONFIGURE env fail compilation.\n- OpenClaw Discord\u002FSlack plugins are pinned in the stock image and wired for declared channels. Custom bases need `\u002Fopt\u002Fclaw-openclaw-plugins\u002F{discord,slack}`. Conflicting plugin allow\u002Fdeny settings fail compilation. Telegram\u002FSlack use `botToken`; Discord uses `token`.\n- OpenClaw INVOKE wakes use fresh sessions and require explicit `to` for automatic final delivery. Configured `agents.defaults.timeoutSeconds` must be 1–900. Configure native `session.maintenance` for frequent schedules; live session SQLite stays in the durable sessions mount through explicit `session.store`.\n\n## Surface Taxonomy\n\n| Scheme | Enforcement | Notes |\n|--------|-------------|-------|\n| `volume:\u002F\u002F\u003Cname> [read-only\\|read-write]` | Compose volume mount | Default read-only |\n| `host:\u002F\u002F\u003Cpath> [mode]` | Compose bind mount | |\n| `service:\u002F\u002F\u003Cname>` | Pod-internal networking | Auto-mounts service skill if available |\n| `channel:\u002F\u002F\u003Cplatform>` | Driver config injection | Token from standard `environment:` block |\n| `webhook:\u002F\u002F\u003Cname>` | Driver HTTP endpoint config | |\n\nService skills: `claw.skill.emit` label > operator override > fallback stub.\n\n## Per-Run Workers\n\nAn orchestrator can read `GET \u002Fv1\u002Ftemplates` on the supervisor socket and put the\ncompiled template's `id` in the launch spec as `template_id`, before computing\nits digest and queueing it. A stale ID fails admission with `409 template_changed`\nand `current_template_id`; it does not reserve a home or create a run. A retry of\nan already-admitted identical spec returns the original run. Status exposes the\nadmitted `template_id` and concrete `models` chain. The listing contains only\nverified template metadata, model refs, profile, reference mount targets and a\ndata-policy summary; it contains no credentials or context body. Each model entry has `slot`, concrete `ref`, and optional `requested` (for example `openai\u002F@terra`) when a family was resolved. Requested names come only from the verified template and are copied into the run at admission. Exact pins omit the field. The first recompilation with this feature changes family-template IDs; queued old IDs keep the normal `template_changed` refusal, never an automatic rebind.\n\n`claw runs doctor` reports model-family drift before taking the run lock, so this report is available while serve runs (later ledger checks still refuse). It never changes model locks or templates. It compares the current family\u002Fpricing constraints and catalog, reports newer candidates\u002Fineligible members\u002Flisting absence or unavailability, and states that service data policy was not assessed. Image-only consumers are not inspected; candidates are not compile approval and listing absence is not retirement.\n\nThe default profile remains stateless PicoClaw. Hermes can opt into a persistent\ntask home with `x-claw.run.home: {}`. Launch specs then require an opaque `home`\nID, scoped by installation; the supervisor admits one live run per home. Only\nthat home is mounted read-write; pod `run.content` mounts reference content\nread-only. Hermes resumes its exact session and can return `result.outcome:\nquestion`; answer it by launching a later run for the same home. Use\n`claw runs home status|rm \u003Cinstallation> \u003Chome>` to inspect or reset it.\n\nFrom v0.32.2, the wrapper proves the session from the home's stored conversation\nand compression ancestry, so a missing Hermes stderr session hint can be recovered.\nMissing or ambiguous ancestry fails with `worker_session_unproven`. Wrapper failures\ncarry fixed `worker_*` codes in run status and the end callback's `reason`; a failed\nrunner also has `exit_observed.runner_code` in the persisted ledger. Public status\nexposes the wrapper exit as `exit_code`; it does not expose the runner code.\nArbitrary stderr is not retained. See the\nper-run workers guide for the reason table.\n\nTask-home workers have native terminal\u002Ffile tools. Each has its own network\nthrough a fixed cllama forwarder, plus a separate networkless read-only home\nmeter. `run.home.max-bytes` defaults to 1 GiB; exceeding it cancels the run as\n`home_full`. Meter loss fails closed. This watchdog is not a hard storage\nquota: host disk exhaustion before detection remains possible. After a killed\nturn, inspect durable effects before repeating them.\n\nModel routing is the declared chain: `x-claw.models` `primary`, `fallback`,\n`fallback-2`. `chatgpt\u002F\u003Cmodel>` serves from the operator's ChatGPT plan (needs\ncllama v0.15.0+); `vercel\u002F\u003Cprovider>\u002F\u003Cmodel>` uses\n`AI_GATEWAY_API_KEY`; other prefixes use their API key. `chatgpt\u002F…` first and a\nkeyed entry after it means plan first, key second; `chatgpt\u002F…` alone never\nuses a key. The operator signs in on the host, never an agent:\n`claw compose run --rm -p 127.0.0.1:1455:1455 cllama auth login chatgpt --listen 0.0.0.0:1455`.\n`claw runs doctor` and `GET \u002Fv1\u002Fsubscriptions` show sign-in state. A task-home\nrun's status and `end` callback report `served_by`, `served_by_complete` and\n`last_plan_failure` (`subscription_signin_required`,\n`subscription_limit_reached`, ...). Keys and the sign-in stay behind cllama.\n\nFor stateless PicoClaw, a service with `x-claw.lifecycle: per-run` is compiled by `claw up` into a run template under `.claw-runs\u002Ftemplates\u002F` and is never a long-lived compose service. `claw runs serve` (a host process) launches one worker per run as its own Compose project on an `internal` network shared with cllama, with a fresh cllama identity, read-only rootfs, tmpfs `\u002Ftmp`, uid 65534 and no host mounts. Cancel tombstones the run, revokes the identity through cllama's durable fence (requires cllama v0.11.0+), then removes the container. Workers speak OpenAI chat\u002Fcompletions; direct Anthropic keys and current OpenAI GPT-6 models need cllama v0.12.0+. `x-claw.reasoning-effort: {\u003Cslot>: none|minimal|low|medium|high}` (per-run only) makes the worker send that `reasoning_effort` for the slot. With cllama v0.13.0+, `CLLAMA_TRACE_JOURNAL: \"on\"` in `cllama-defaults.env` records a durable, verifiable segment per request, and each revoke writes a coverage seal proving every request of a run was captured. `claw up` and `claw down` refuse while the supervisor holds the pod lock; `claw up` also refuses while any run is unfinished. See `site\u002Fguide\u002Fper-run-workers.md` for the socket API, spec digest (RFC 8785) and callback contract.\n\n## claw-pod.yml Reference\n\nExtended docker-compose. Claw config lives under `x-claw:` (Docker ignores this namespace).\n\n```yaml\nx-claw:\n  pod: my-pod                        # optional pod name\n  # Pod-level defaults (services inherit; override or extend with ...)\n  cllama-defaults: passthrough\n  handles-defaults:\n    discord:\n      id: \"${BOT_DISCORD_ID}\"\n      username: \"my-bot\"\n      guilds: [...]\n  surfaces-defaults:\n    - \"service:\u002F\u002Ftrading-api\"\n  feeds-defaults:\n    - fleet-alerts\n  skills-defaults:\n    - .\u002Fskills\u002Fshared-runbook.md\n  tools-defaults:\n    - trading-api\n  memory-defaults:\n    service: team-memory\n    timeout-ms: 300\n\nservices:\n  my-agent:\n    image: my-claw-image:latest\n    x-claw:\n      agent: .\u002FAGENTS.md             # host path, overrides Clawfile AGENT\n      cllama: passthrough             # or [passthrough, policy] for future chains\n      cllama-env:                     # ONLY place for provider API keys when using cllama\n        ANTHROPIC_API_KEY: \"${ANTHROPIC_API_KEY}\"\n        OPENROUTER_API_KEY: \"${OPENROUTER_API_KEY}\"\n      handles:\n        discord:\n          id: \"${BOT_DISCORD_ID}\"\n          username: \"my-bot\"\n          guilds:\n            - id: \"${GUILD_ID}\"\n              name: \"My Server\"\n              channels:\n                - id: \"${CHANNEL_ID}\"\n                  name: general\n      surfaces:\n        - \"service:\u002F\u002Ftrading-api\"\n        - \"volume:\u002F\u002Fshared-cache read-write\"\n        - channel:\u002F\u002Fdiscord:          # map form with routing config\n            dm:\n              enabled: true\n              policy: allowlist\n              allow_from: [\"USER_ID\"]\n      skills:\n        - .\u002Fskills\u002Fcustom-runbook.md\n      feeds:\n        - fleet-alerts               # short-form feed name (resolved from feed registry)\n      tools:                          # v0.5.0: managed tool subscriptions (cllama-only)\n        - trading-api                 # scalar = subscribe to ALL tools from this service\n        - service: analytics          # map form = named allow list\n          allow:\n            - get_summary\n            - get_report\n      memory:                         # v0.5.0: ambient memory subscription (cllama-only)\n        service: team-memory\n        timeout-ms: 450              # recall timeout per turn (default 300ms)\n      invoke:                         # pod-level scheduled tasks\n        - schedule: \"*\u002F30 * * * *\"\n          name: \"Heartbeat\"\n          message: \"Post status.\"\n          to: trading-floor\n    environment:                      # standard compose — credentials go HERE\n      DISCORD_BOT_TOKEN: \"${DISCORD_BOT_TOKEN}\"\n\n  perplexity:\n    image: ghcr.io\u002Fmostlydev\u002Fclaw-mcp-stdio:v0.12.0\n    environment:\n      PERPLEXITY_API_KEY: \"${PERPLEXITY_KEY}\"\n    expose:\n      - \"8080\"\n    x-claw:\n      mcp-stdio:\n        command: npx\n        args: [\"-y\", \"perplexity-mcp\"]\n```\n\n### Key rules\n\n- **Credentials**: Standard `environment:` or `secrets:` blocks. Never in `x-claw:` (except `cllama-env` for proxy keys).\n- **`cllama-env`**: Provider API keys for the proxy. These go ONLY here — never in agent `environment:`. Credential starvation enforced.\n- **`handles`**: Discord bot IDs, usernames, guilds. Clawdapus auto-generates native Discord `mentionPatterns`, `allowBots: true`, peer `users[]` allowlist.\n- **`surfaces`**: String form (`\"channel:\u002F\u002Fdiscord\"`) = simple enable. Map form (`channel:\u002F\u002Fdiscord: {dm: {...}}`) = routing config.\n- **`tools`**: Requires `cllama` on the consuming service. Services must publish tools via `claw.describe` descriptor v2. `allow: all` (implicit for scalar form) passes every tool; named lists are validated against the tool registry.\n- **`mcp-stdio`**: Sidecar-only block for the shared `claw-mcp-stdio` wrapper. `command` is required, `args` is a list, and credentials stay in the sidecar's regular `environment:`. Run `claw discover \u003Cservice>` to ask the MCP server for `tools\u002Flist` and write `.claw-discovered\u002F\u003Cservice>.claw-describe.json`; `describe-file` remains an explicit override when live discovery is unavailable.\n- **`memory`**: Requires `cllama` on the consuming service. Target service must declare `memory` in its `claw.describe` descriptor v2.\n- **Pod defaults**: `*-defaults` at pod level are inherited by all services. Declaring the field at service level replaces the default. Use `...` spread token to extend list-type defaults (surfaces, feeds, skills, tools). Memory defaults are object-form (no spread — presence of `memory:` at service level replaces entirely; `memory: null` suppresses).\n- **`models` \u002F `models-defaults`**: slot map overriding image `MODEL` labels per key (`primary`, `fallback`, custom slots). `fallback` also accepts an ordered list (`fallback: [ref, ref]`) — cllama walks the chain in declared order on provider exhaustion (v0.28.0, cllama ≥ v0.9.0). The fallback family replaces atomically: a service-level fallback (scalar, list, or `[]` to clear) replaces the entire inherited\u002Fimage chain, never merging positionally. Only `fallback` takes a list; images stay single-fallback (declare chains at pod level).\n- **`model-families`** (pod level): declare a name with `provider`, `pattern` (one `*` matching a dotted numeric version), `max-input` and `max-output` in USD per million tokens. Reference it as `openai\u002F@terra` in a model slot. `claw up` selects a concrete member using the provider catalog and the pinned cllama price export (requires cllama ≥ v0.16.0), checks each service's policy, prints moves, and writes `models.lock`. Exact pins remain unchanged. Offline locks are revalidated; catalog absence never authorizes a downgrade. Support covers official standard API endpoints for OpenAI, xAI, Google and Meta, plus Vercel AI Gateway with `AI_GATEWAY_API_KEY` (for example `vercel\u002F@terra` with pattern `openai\u002Fgpt-*-terra`). Vercel uses its authenticated eligibility catalog and the highest catalog\u002Fendpoint tier price; unreadable fresh prices cannot reuse an older lock price. An unavailable catalog may reuse recorded rates under current ceilings. ChatGPT plan families use `provider: chatgpt`, omit price ceilings, and read the account catalog through pinned cllama ≥ v0.18.0 (`cllama auth catalog chatgpt --json`); the sign-in stays in the proxy auth store. Custom\u002Fregional endpoints need exact pins. Only exact, complete-context prices count; unknown models wait for updated pricing. Queued orchestrator specs must capture the compiled `template_id` when queued, not when dispatched, to prevent recompilation rebinding.\n\n## Service Self-Description (claw.describe)\n\nServices declare capabilities via a `.claw-describe.json` file (embedded in the image, discovered from Dockerfile labels, generated under `.claw-discovered\u002F` by `claw discover`, refreshed there by `claw up --fix` for build-backed runtime-emitted descriptors, or supplied with service-level `x-claw.describe-file`). `claw up` extracts descriptors and compiles them into pod-global registries.\n\n### Descriptor v2\n\n```json\n{\n  \"version\": 2,\n  \"service\": \"trading-api\",\n  \"feeds\": [\n    {\"name\": \"market-data\", \"path\": \"\u002Ffeeds\u002Fmarket\", \"ttl\": \"5m\"}\n  ],\n  \"tools\": [\n    {\n      \"name\": \"execute_trade\",\n      \"description\": \"Execute a market order\",\n      \"inputSchema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"ticker\": {\"type\": \"string\"},\n          \"action\": {\"type\": \"string\", \"enum\": [\"buy\", \"sell\"]},\n          \"quantity\": {\"type\": \"integer\"}\n        },\n        \"required\": [\"ticker\", \"action\", \"quantity\"]\n      },\n      \"http\": {\"method\": \"POST\", \"path\": \"\u002Ftrade\", \"body\": \"json\"}\n    }\n  ],\n  \"memory\": {\n    \"recall\": {\"path\": \"\u002Frecall\"},\n    \"retain\": {\"path\": \"\u002Fretain\"},\n    \"forget\": {\"path\": \"\u002Fforget\"}\n  }\n}\n```\n\n- **`tools`**: Each requires `name`, `description`, `inputSchema` (JSON Schema, `type: \"object\"`), and either `http` (`method`, `path`, optional `body`) for Clawdapus-native HTTP services *or* a top-level `mcp` block on the descriptor (see below) for MCP sidecars. Duplicate tool names within a service are a hard error.\n- **`mcp`** *(v0.11.0)*: Top-level block declaring the service is an MCP sidecar — `transport: streamable_http` (default) and `path: \u002Fmcp` (default). When present, `tools[].http` becomes optional and cllama routes calls through the MCP `tools\u002Fcall` endpoint instead of an HTTP path. Auth resolution, namespacing, audit, session-history, and policy budgets are unchanged from the HTTP-managed path.\n- **`memory`**: At least one of `recall` or `retain` required. All paths must start with `\u002F`.\n- **`feeds`**: Unchanged from v1. Short-form names in `x-claw.feeds` resolve against the feed registry.\n\n## Persistence Surfaces\n\nClawdapus provides distinct durable state surfaces for agents. They survive container restarts (`claw up`) and driver migrations (changing `CLAW_TYPE`).\n\n| Surface | Owner | Written by | Path inside container | Host path |\n|---------|-------|------------|-----------------------|-----------|\n| **Session history** | Infrastructure | cllama proxy | `\u002Fclaw\u002Fsession-history` | `.claw-session-history\u002F\u003Cagent-id>\u002Fhistory.jsonl` |\n| **Portable memory** | Runner \u002F Agent | Agent | `\u002Fclaw\u002Fmemory` | `.claw-memory\u002F\u003Cagent-id>\u002Fmemory\u002F` |\n| **Portable skills** | Runner \u002F Agent | Agent | runner-specific skill dir, e.g. `\u002Froot\u002F.hermes\u002Fskills` | `.claw-skills\u002F\u003Cclaw-id>\u002Fskills\u002F` |\n\n- **Session History:** Normalized JSONL record of every successful LLM turn, captured transparently at the proxy boundary. The agent does not write this. Fields include `reported_cost_usd`, `tool_trace` (for managed tool calls), and `memory_op` (for recall\u002Fretain operations).\n- **Portable Memory:** The agent's own active scratchpad. Agents can read\u002Fwrite notes, drafts, and learned facts here.\n- **Portable Skills:** The runner's writable skill directory is backed by `.claw-skills\u002F\u003Cclaw-id>\u002Fskills\u002F`. Compile-time `SKILL` files and service manuals are still mounted read-only over this directory, while agent-created skills persist beside them.\n- **Cross-Runner Portability:** Because these paths are canonically managed by Clawdapus, you can swap an agent's `CLAW_TYPE` (e.g., migrating from OpenClaw to PicoClaw) and its memory, session history, and self-authored skills will automatically follow it into the new runtime.\n\n### Ambient Memory (v0.5.0)\n\nWhen a service subscribes to a memory service via `x-claw.memory`, cllama performs:\n\n- **Pre-turn recall**: Before each inference turn, cllama queries the memory service's `\u002Frecall` endpoint and injects relevant context.\n- **Post-turn retain**: After each turn, cllama sends the conversation to the memory service's `\u002Fretain` endpoint for storage.\n- **Governed forget**: `claw memory forget` sends tombstone requests to `\u002Fforget` and records local tombstones so subsequent backfills skip those entries.\n\n`claw up` compiles `memory.json` into each subscribing agent's cllama context directory with endpoint URLs, auth tokens, and timeout configuration.\n\n### Context Blocks\n\nPod or service `x-claw.context.blocks` compiles short operator-authored snippets into each agent's cllama context directory as `context-blocks.json`. cllama injects enabled blocks into late runtime context before or after feeds on every turn, so durable operating focus stays visible without expanding the primary contract.\n\nSupported fields: `id` (required), `text` (required), `enabled` (default `true`), `cadence` (`every_turn`), `placement` (`before_feeds` or `after_feeds`, default `after_feeds`), and `max-chars` \u002F `max_chars` (default `800`). A service-level list replaces pod-level blocks; an explicit empty list suppresses inherited blocks.\n\n### Managed Tool Mediation (v0.5.0)\n\nWhen a service subscribes to tools via `x-claw.tools`, cllama performs bounded tool execution within the inference turn:\n\n- Tools are injected into the LLM request as available tool definitions\n- When the model calls a tool, cllama executes against the providing service. The execution path depends on the descriptor: HTTP-native services use the per-tool `http` metadata; MCP sidecars (descriptor declares a top-level `mcp` block, v0.11.0+) are reached via the Streamable HTTP `tools\u002Fcall` endpoint with cached `initialize` sessions.\n- Repeated identical managed tool calls in a mediated turn are not re-executed; by default cllama replays the first call's cached result (`CLLAMA_MANAGED_DUPLICATE_POLICY=replay`; `reject` restores the legacy data-less `duplicate_tool_call` 409). After `CLLAMA_MANAGED_DUPLICATE_STREAK_CUTOFF` consecutive identical calls (default 3) it disables tools and forces a final answer. Duplicate metadata (round, count, streak, policy) is recorded in `tool_trace`\n- Tool results are fed back to the model for up to 8 rounds (configurable)\n- `tool_trace` entries appear in session history for auditability\n- Works with both OpenAI-compatible and Anthropic-format requests\n- Supports synthetic SSE re-streaming when the runner requested streaming\n\n`claw up` compiles `tools.json` into each subscribing agent's cllama context directory:\n\n```json\n{\n  \"version\": 1,\n  \"tools\": [...],\n  \"policy\": {\n    \"max_rounds\": 8,\n    \"timeout_per_tool_ms\": 30000,\n    \"total_timeout_ms\": 120000\n  }\n}\n```\n\nThe policy is tunable from the pod YAML via `x-claw.tool-policy` (service level) or `x-claw.tool-policy-defaults` (pod level) with `max-rounds`, `timeout-per-tool-ms`, and `total-timeout-ms`. Omitted fields keep the defaults above; a service-level block replaces the pod default entirely. Slow reasoning models that exceed the 120s total budget fail the whole mediated turn with a 502 `context deadline exceeded` — raise `total-timeout-ms` for those services.\n\n### Compute budget enforcement *(v0.24.0)*\n\n`x-claw.budget` (service level) or `x-claw.budget-defaults` (pod level) compile a per-agent spend\u002Frequest cap into the agent's `metadata.json`. Fields: `limit-usd` (spend cap), `max-requests` (request-rate cap), `window` (rolling duration, e.g. `1h`, `24h`), and `behavior` (`hard_stop` default, `rate_limit`, or `soft_alert`). Before dispatching either an OpenAI-compatible or Anthropic-format request, cllama sums the agent's `.claw-session-history\u002F\u003Cid>\u002Fhistory.jsonl` over the window; when the window is already at or above a cap it returns `429` with a structured `budget_exceeded` (spend) or `rate_limited` (requests) error and logs the matching intervention. `soft_alert` logs the intervention but allows the request. If the ledger cannot be read, cllama **fails open** (logs `budget_check_unavailable`, allows the request); set `CLLAMA_BUDGET_FAIL_MODE=closed` to return `503` instead. Runtime overrides flow through `fleet.budget.set` (claw-api writes `.claw-governance\u002F\u003Cid>\u002Fbudget.json`, mounted read-only into cllama and merged over the compiled cap on each request) so an operator or Master Claw governor can raise a cap without rebuilding the pod. Budgets are an infrastructure hard-cap independent of the (future) policy plane — see ADR-025.\n\n`x-claw.data-policy` (service level, replaces) or `x-claw.data-policy-defaults` (pod level) sets the data policy cllama enforces on every model request and fallback: `regions` (default `[us, eu]`; lowercase codes or `global`), `training` (`none` default | `allowed`), `retention` (provider retention, `none` default | `provider-default`), `local-retention` (cllama content, `none` default | `allowed`), and `attestations` (`- provider:`, optional `endpoint:`, `guarantees: [zero-data-retention, no-training, processing:\u003Ccc>, storage:\u003Ccc>]`). A requirement passes only by a per-request control cllama applies or an endpoint-bound attestation; otherwise the request is refused with an intervention naming the unmet requirement. Most providers need attestations under the default, so an upgraded pod that suddenly gets refused needs its real account guarantees attested or the policy relaxed. With `local-retention: none` history keeps metadata only. Claws that bypass cllama are not covered (`claw up` warns). See `site\u002Fguide\u002Fdata-policy.md`.\n\n### Hosted capabilities\n\nWith cllama v0.17.0 or later, provider-hosted features require an explicit service-level `x-claw.hosted-capabilities` list: `web_search`, `code_interpreter`, `file_search`, or `image_generation`. It requires cllama, has no pod default, and applies only to that service and its ordinals across their already authorized model routes. Remote MCP servers and vendor plugins cannot be granted. A grant never overrides the data policy; relaxing that policy grants nothing. Per-run templates reject grants in this version and remain protected on API fallback. Native function\u002Fcustom tools and managed tools need no hosted grant. The fixed refusal is HTTP 400 `hosted capability not granted: \u003Ccapability>` with intervention `hosted_capability_refused:\u003Ccapability>`. See `site\u002Fguide\u002Fpod-yaml.md`.\n\n## Communication Tools Contract\n\nAll four drivers compile mention-only channel consumption so an unaddressed bot message does not create a feedback loop.\n\n- **Hermes**: `HERMES_TOOL_ONLY_MODE=1` injected when Discord handles are present; runtime patches prefer `send_message`, suppress duplicate final text after a successful `send_message`, and fall back to final-text delivery rather than silently dropping replies\n- **OpenClaw**: enforced natively\n- **NanoBot and PicoClaw**: generated channel configuration enables each runner's mention-only equivalent\n\nCLAWDAPUS.md includes a `## Communication Tools` section with private-thinking policy whenever handles are configured.\n\n## cllama Governance Proxy\n\nThe proxy sits between agents and LLM providers. Agents get bearer tokens, proxy holds real API keys.\n\n### How it works\n\n1. Agent calls `http:\u002F\u002Fcllama-passthrough:8080\u002Fv1\u002Fchat\u002Fcompletions` with bearer token\n2. Proxy resolves agent identity from token (`\u003Cagent-id>:\u003C48-hex-secret>`)\n3. Proxy routes to correct provider, swaps bearer token for real API key\n4. If tools are configured, proxy injects tool definitions and handles bounded tool execution loops\n5. If memory is configured, proxy runs pre-turn recall and post-turn retain\n6. Proxy extracts token usage, tracks cost, emits audit log\n7. Response streamed back to agent transparently\n\n### Bearer token format\n\n`\u003Cagent-id>:\u003C48-hex-chars>` — generated by `crypto\u002Frand`, injected into agent env and proxy context.\n\n### Context directory (auto-generated per agent)\n\n```\n\u002Fclaw\u002Fcontext\u002F\u003Cagent-id>\u002F\n  metadata.json     # token, pod, service, type\n  AGENTS.md         # compiled behavioral contract\n  CLAWDAPUS.md      # infrastructure map\n  tools.json        # managed tool manifest (when tools subscribed)\n  memory.json       # memory service config (when memory subscribed)\n  context-blocks.json # context block manifest (when configured)\n```\n\n### Provider support\n\n| Provider | Auth | Model format |\n|----------|------|-------------|\n| OpenAI | Bearer | `openai\u002Fgpt-5.6` |\n| Anthropic | X-Api-Key | `anthropic\u002Fclaude-sonnet-5` |\n| OpenRouter | Bearer | `openrouter\u002Fanthropic\u002Fclaude-sonnet-5` |\n| xAI | Bearer | `xai\u002Fgrok-3` |\n| Ollama | None | `ollama\u002Fllama3` |\n\n### Credential starvation enforcement\n\n- Real API keys go in `x-claw.cllama-env` (proxy only)\n- Agent env is scanned for `*_API_KEY` patterns — preflight fails if found\n- Image ENV layer is inspected too — baked keys fail preflight\n- Agent only knows its bearer token. No keys, no bypass.\n\n### claw-wall sidecar\n\nAuto-injected by `claw up` when any cllama-enabled service has Discord channel IDs. Polls Discord channels and serves the recent channel transcript to agents through `channel-context` tail feeds; legacy unread-mailbox cursor paging remains available as `mode=delta`. On startup, wall backfills Discord history before its first forward poll up to `CLAW_WALL_RETENTION` (default `24h`) and `CLAW_WALL_BACKFILL_MAX_PAGES` (default `25`), while `CLAW_WALL_LIMIT` is a per-channel safety cap (default `5000`). Configure the generated tail window with pod or service `x-claw.context.channel` (`since`, `limit`, `max-chars`, `buffer`). Since `v0.15.0` channel-consuming services also get a default-on `channel-awareness` feed plus two cllama-mediated retrieval tools - `search_channel_context` and `get_channel_messages` - auto-subscribed via a compiler-owned claw-wall descriptor. Without `x-claw.channel-memory.service`, `channel-awareness` is an uncursored raw window and retrieval tools search only claw-wall's retained raw buffer. With channel-memory wired, `claw up` changes that feed to `context_kind=raw_window+digest`; claw-wall fetches digest blocks from channel-memory, emits a compact `[digest]` section with source provenance, keeps a bounded `[raw recent]` tail, and lets retrieval tools fall through to durable source-message and sparse derived-block results when the raw buffer has rolled forward. Feed headers include `backfill_status`, `digest`, `raw_bytes`, `digest_bytes`, `digest_blocks`, `coverage_gaps`, and `deterministic_only`; `partial` or `rate_limited` backfill means the backing window did not fully satisfy the requested horizon. Calls are gated by a generated per-agent channel allowlist, claw-wall service-token auth, and forwarded `X-Claw-ID`. The service name `claw-wall` is reserved - declaring it in `claw-pod.yml` is a hard error.\n\n### cllama feed injection budgets\n\n`x-claw.context.channel.max-chars` only sizes the *source* window claw-wall returns. cllama applies its own byte budgets when it injects feeds into the prompt: `32 KB` per feed (`CLLAMA_FEED_MAX_RESPONSE_BYTES`) and `64 KB` aggregate across all feed blocks (`CLLAMA_FEED_MAX_TOTAL_BYTES`). Defaults are bounded; invalid values fall back to defaults. A pod that raises `max-chars` to a large 24h window but leaves cllama at defaults will still have the feed truncated, or skipped entirely once earlier feeds consume the shared aggregate budget. Raise both via `x-claw.cllama-defaults.env` (or service-level `x-claw.cllama-env`):\n\n```yaml\nx-claw:\n  cllama-defaults:\n    env:\n      CLLAMA_FEED_MAX_RESPONSE_BYTES: \"262144\"\n      CLLAMA_FEED_MAX_TOTAL_BYTES: \"393216\"\n```\n\nWhen the aggregate cap drops a feed the model sees an explicit `--- FEED: \u003Cname> skipped (...) ---` notice (not a silent omission), and cllama emits a `feed_injection` audit event per feed (`included` \u002F `empty` \u002F `skipped_total_cap`) with byte metadata. The aggregate cap drops whole feeds in manifest order — there is no per-feed priority yet, so raise `CLLAMA_FEED_MAX_TOTAL_BYTES` rather than relying on ordering.\n\n## Generated Artifacts\n\n| File | Purpose | Location |\n|------|---------|----------|\n| `Dockerfile.generated` | Transpiled Clawfile | Next to Clawfile |\n| `compose.generated.yml` | Final compose with all enforcement | Next to claw-pod.yml |\n| `CLAWDAPUS.md` | Per-agent infrastructure map | Mounted into container |\n| `AGENTS.effective.md` | Merged contract + CLAWDAPUS.md (OpenClaw and Hermes cllama context) | Mounted into container or cllama context |\n| `openclaw.json` | Generated runner config (OpenClaw) | Bind-mounted directory |\n| `config.yaml` \u002F `.env` | Generated runner config (Hermes) | Bind-mounted directory |\n| `schedule.json` | Compiled scheduler authority (all OpenClaw INVOKE and pod schedules) | `.claw-runtime\u002F` |\n| `jobs.json` | Native schedule store for runners retaining that format; not OpenClaw | Runner state directory |\n| `tools.json` | Managed tool manifest per agent | cllama context directory |\n| `memory.json` | Memory service config per agent | cllama context directory |\n| `context-blocks.json` | Runtime context block manifest per agent | cllama context directory |\n\n## Drivers\n\n| Driver | CLAW_TYPE | Runner | Config method | Notes |\n|--------|-----------|--------|--------------|-------|\n| OpenClaw | `openclaw` | OpenClaw | JSON5 Go-native patching -> `openclaw.json` | Pins OpenClaw 2026.10.5 + Node 24.22.0. Keyed agent config; per-ordinal durable SQLite\u002Ftranscripts; compiled claw-api wakes. Read-only root. |\n| Hermes | `hermes` | Hermes (Python) | `config.yaml` + `.env` | Discord\u002FTelegram\u002FSlack. `HERMES_TOOL_ONLY_MODE`. Requires at least one handle. |\n| NanoBot | `nanobot` | Nanobot (Python) | `config.json` | Cron via `jobs.json`. Merged AGENTS.md. |\n| PicoClaw | `picoclaw` | PicoClaw | `config.json` | HTTP `\u002Fhealth` + `\u002Fready` probe. Read-only container. |\n\nRetired (ADR-026): `nanoclaw`, `microclaw`, `nullclaw` — these `CLAW_TYPE`s fail `claw up` with a migration message.\n\nAll drivers set `CLAW_MANAGED=true`, explicit `HOME`, and `DISCORD_REQUIRE_MENTION` (or equivalent) to prevent feedback loops.\n\n## Fail-Closed Semantics\n\nClawdapus refuses to start containers when:\n- `AGENT` file missing on host\n- Driver preflight fails\n- Driver post-apply verification fails\n- Unsupported surface scheme for the driver\n- Credential starvation violated (API keys in agent env or image)\n- `tools` or `memory` declared without `cllama` on the service\n- Managed service requires `claw up -d` (detached mode)\n\n**This is by design. If enforcement can't be confirmed, the container doesn't run.**\n\n## Skill Mounting\n\n- Image-level: `SKILL \u003Cfile>` -> `claw.skill.N` labels\n- Pod-level: `x-claw.skills: [.\u002Ffile.md]` — merges with image skills by basename (pod wins)\n- Generated: service skills from `claw.describe` mounted at `\u002Fclaw\u002Fskills\u002F` with CLAWDAPUS.md pointer\n- Precedence: pod > image > generated\n- Duplicate basenames across same layer -> validation error\n\n## Troubleshooting\n\n### Agent won't start\n1. Check `AGENT` file exists at the host path specified\n2. Run `claw doctor` to verify Docker dependencies\n3. Check `compose.generated.yml` for the actual compose that was generated\n4. Look at driver preflight errors in `claw up` output\n\n### Credential starvation failures\n- Move API keys from agent `environment:` to `x-claw.cllama-env:`\n- Check image doesn't bake keys in ENV layer: `claw inspect \u003Cimage>`\n- Bearer token is auto-injected; don't set it manually\n\n### Config injection issues (OpenClaw)\n- Config dir (`\u002Froot\u002F.openclaw\u002Fconfig`) must be bind-mounted as directory, not file\n- OpenClaw does atomic writes via rename — file-only mounts cause EBUSY\n- OpenClaw home is canonical `~\u002F.openclaw` (`\u002Froot\u002F.openclaw`) rather than a separate `\u002Fapp\u002Fstate` shim; both `\u002Froot` and `\u002Froot\u002F.openclaw` are tmpfs-backed so non-root users can traverse and write state\n- Check generated `openclaw.json` in the runtime directory\n- OpenClaw health: `claw health -f \u003Cpod>.yml`\n\n### HANDLE\u002Fsocial topology issues\n- Handles broadcast as `CLAW_HANDLE_\u003CUPPERCASED_NAME>_DISCORD_ID` etc.\n- `mentionPatterns` auto-derived: Discord uses native `\u003C@!?\u003Cid>>`; text-mention platforms use `(?i)\\b@?\u003Cusername>\\b`\n- `allowBots: true` is unconditional — required for bot-to-bot messaging\n- Peer handles: each agent's guild `users[]` includes own ID + all peer bot IDs\n\n### Observability dashboard (clawdash)\n\nWhen a pod declares a `clawdash` surface, `claw up` publishes the operational dashboard at the emitted `http:\u002F\u002Flocalhost:\u003Cport>` URL. Relevant views:\n\n- **Fleet \u002F Topology** — running services, wiring, driver types.\n- **Agents** — per-agent *contract* as compiled at `claw up` time (AGENTS.md, CLAWDAPUS.md, feed subscriptions, managed tools, memory wiring, metadata).\n- **Agents → Live Context** — the system message, tools array, context blocks, injected feeds, memory recall, time context, and interventions that were assembled for the most recent inference turn. Sourced from the cllama snapshot store (`\u002Finternal\u002Fcontext\u002F\u003Cagent-id>\u002Fsnapshot`, proxied through `claw-api`). Credentials and token fields are redacted.\n- **Schedule** — `INVOKE` and `x-claw.invoke` cron entries, with `claw api schedule ...` controls.\n\nAll views are read-only and scoped through `claw-api` principals. Use this before log-diving — \"what did the model actually see last turn\" has a direct answer here.\n\n### cllama proxy not working\n- Check proxy container is running: `claw ps -f \u003Cpod>.yml`\n- Proxy named `cllama-passthrough` in compose — agents reach it at `http:\u002F\u002Fcllama-passthrough:8080`\n- Dashboard at port 8081 of proxy container\n- Check `\u002Fclaw\u002Fcontext\u002F\u003Cagent-id>\u002Fmetadata.json` has correct token\n- Proxy logs are structured JSON on stdout\n- SSE debug endpoint: `curl -N -H \"Authorization: Bearer \u003Cui_token>\" http:\u002F\u002F\u003Chost>:\u003Cport>\u002Fevents`\n\n### Managed tools not working\n- Verify the provider service has a `claw.describe` descriptor with `version: 2` and `tools[]`\n- Check `tools.json` in `.claw-runtime\u002Fcontext\u002F\u003Cagent-id>\u002F`\n- `claw audit --type tool_call` shows tool execution traces\n- Both consumer and provider must be on the `claw-internal` network (auto-wired by `claw up`)\n- Declaring `tools:` without `cllama:` is a hard error\n\n### Memory not working\n- Verify the memory service has a `claw.describe` descriptor with `memory` block\n- Check `memory.json` in `.claw-runtime\u002Fcontext\u002F\u003Cagent-id>\u002F`\n- `claw audit` shows `memory_op` telemetry entries\n- `claw memory backfill` replays history to a memory service for bootstrapping\n- `claw memory forget --entry-id \u003Cid>` writes tombstones; subsequent backfills skip those entries\n- Declaring `memory:` without `cllama:` is a hard error\n\n### Context blocks not visible\n- Check `context-blocks.json` in `.claw-runtime\u002Fcontext\u002F\u003Cagent-id>\u002F`\n- Check `claw audit --type context_block` for injected or skipped context block entries\n- Verify `cadence` is `every_turn`, `placement` is `before_feeds` or `after_feeds`, and the block text is within `max-chars`\n\n## Working Examples\n\n| Example | Path | What it demonstrates |\n|---------|------|---------------------|\n| Quickstart | `examples\u002Fquickstart\u002F` | Single governed OpenClaw Discord bot |\n| Trading desk | `examples\u002Ftrading-desk\u002F` | 5-driver fleet, pod defaults, invoke schedules, `claw.describe` |\n| Rollcall | `examples\u002Frollcall\u002F` | 7-driver parity test, sequential-conformance, memory wiring |\n| Master Claw | `examples\u002Fmaster-claw\u002F` | Fleet governance, `claw-api` auto-inject, feeds with bearer auth |\n| Multi-claw | `examples\u002Fmulti-claw\u002F` | Shared volume surfaces, Slack handle, non-claw sidecar |\n| Nanobot | `examples\u002Fnanobot\u002F` | Minimal nanobot driver setup |\n| PicoClaw | `examples\u002Fpicoclaw\u002F` | Minimal picoclaw driver setup |\n| OpenClaw | `examples\u002Fopenclaw\u002F` | Multi-channel Discord guild config |\n| Reference memory | `examples\u002Freference-memory\u002F` | ADR-021 memory contract reference implementation (Go HTTP service) |\n\n## Architecture Key Points\n\n- `claw pull` owns pinned infra freshness, pod registry-image pulls, and built-in local runner alias freshness (`openclaw:latest`, `nanobot:latest`, etc.)\n- `claw pull --no-runners` skips runner refresh for the fast infra-only path\n- `claw build` transpiles Clawfile -> standard Dockerfile -> `docker build` -> OCI image, or builds every pod `build:` service when run without a path\n- `claw up` parses pod YAML -> driver enforcement -> `compose.generated.yml` -> `docker compose`, but stays strict about missing images unless `--fix` is set\n- **docker compose is the sole lifecycle authority**. Docker SDK is read-only.\n- Two-pass loop in compose_up: Pass 1 inspect+resolve all services + cllama wiring, Pass 2 materialize\n- After feed resolution: `resolveToolSubscriptions` and `resolveMemorySubscriptions` wire capability providers into the internal network and compile manifests into cllama context\n- Generated files are inspectable build artifacts, not hand-edited\n- `claw-internal` Docker network is NOT `internal: true` — agents need egress for APIs\n\nTask-home run networks use individual \u002F29 blocks from `10.213.0.0\u002F16` instead of consuming Docker default address pools. Set `CLAW_RUN_SUBNET_BASE` on `claw runs serve` to choose a different private IPv4 range (\u002F8 through \u002F24) if another host network overlaps. Runs remain on separate internal bridges; no existing host networks are pruned.\n\nTask-home workers can return files in `\u003Chome>\u002Fdeliverables\u002F`. The supervisor socket serves `GET \u002Fv1\u002Fhomes\u002F{installation}\u002F{home}\u002Fdeliverables` (up to 200 files, 4096 scanned entries, `truncated` when bounded) and `GET ...\u002Fdeliverables\u002F{name}?sha256=\u003Coptional expected digest>`. Only flat regular files up to 524288 bytes are served. Fetch returns `{name,bytes,sha256,content_base64}` under 700 KiB total JSON; a digest mismatch returns `409 deliverable_changed`. Symlinks, directories and harness\u002Fsession files are not served. The digest describes the returned bytes.\n\nUnreadable deliverables return `503 deliverables_unreadable`, never a successful partial\u002Fempty list. Recompile existing Hermes task-home templates after upgrading to v0.36.1: the wrapper publishes regular deliverable files at turn start and after the runner exits. Private files left by a killed turn remain errors until a subsequent run publishes them. Session\u002Fworkspace file modes remain private.\n\n### Versioned per-run reference content\n\nTask-home `run.content` entries accept `versioned: true`. The compiled source is a snapshot root inside the pod; launch `content` maps each exact versioned target to an opaque `[A-Za-z0-9][A-Za-z0-9._-]{0,127}` ID. All versioned targets are required; stateless, fixed and unknown targets refuse selection. The nonempty map is canonicalized with JCS UTF-16 key ordering and included in `spec_digest`. The supervisor validates sealed directories\u002Fregular files only (20,000 entries including root, depth32,256MiB), records target\u002Fsnapshot\u002Fmanifest_digest in status, and rechecks before spawn. Missing\u002Funsafe snapshots fail admission; changed snapshots fail the run. Inventory exposes `versioned_content_targets`. Host publishing must seal with `chmod -R a+rX,a-w` and retain issued directories unchanged until runs finish; no directory swaps, GC, host commands or credentials are supplied by launch. Docker's later lookup still trusts host immutability. Compile once to add the declaration; publishing versions needs no recompile.\n","# Clawdapus — Operational Skill\n\nInfrastructure-layer governance for AI agent containers. `claw` treats agents as untrusted workloads — reproducible, inspectable, diffable, killable.\n\n**Mental model:** Clawfile is to Dockerfile what claw-pod.yml is to docker-compose.yml. Standard Docker directives pass through unchanged. Claw directives compile into labels plus driver-specific runtime materialization. Eject anytime — you still have working Docker artifacts.\n\n## CLI Commands\n\n```bash\n# Prerequisites\ngo build -o bin\u002Fclaw .\u002Fcmd\u002Fclaw    # build from source\nclaw doctor                         # verify Docker, buildx, compose\n\n# Image lifecycle\nclaw pull [-f \u003Cpod>.yml]            # pinned infra + pod registry images + runner bases\nclaw pull --no-runners [-f \u003Cpod>]   # pinned infra + registry images only\nclaw build -t \u003Cimage> \u003Cpath>        # single Clawfile -> Dockerfile.generated -> docker build\nclaw build [-f \u003Cpod>.yml]           # with no path: build every pod service that has build:\nclaw inspect \u003Cimage>                 # show claw.* labels from built image\nclaw discover [-f \u003Cpod>.yml] [svc]   # discover stdio MCP tools into .claw-discovered\u002F\n\n# Pod lifecycle (mirrors docker compose UX)\nclaw up [-f \u003Cpod>.yml] [-d]         # strict: tells you to run claw pull\u002Fbuild when images are missing\nclaw up --fix [-f \u003Cpod>.yml] [-d]   # pull\u002Fbuild missing images, refresh runtime descriptors, then launch\nclaw up --discover-tools [-d]        # refresh missing\u002Fstale stdio MCP discovery snapshots, then launch\nclaw down [-f \u003Cpod>.yml]            # tear down\nclaw ps [-f \u003Cpod>.yml]              # container status\nclaw logs [-f \u003Cpod>.yml] [svc]      # stream logs (--follow)\nclaw health [-f \u003Cpod>.yml]          # driver health probes\nclaw compose \u003Ccmd> [args]           # passthrough: any docker compose subcommand\n\n# Scaffold\nclaw init [dir]                     # interactive project scaffold\nclaw agent add [name]               # add agent service to existing pod\n\n# Observability\nclaw audit [--since \u003Cdur>] [--claw \u003Cid>] [--type \u003Ctype>] [--json]\n                                    # summarize cllama telemetry from container logs\n                                    # types: request, response, error, intervention,\n                                    #        feed_fetch, feed_injection, context_block,\n                                    #        memory_op, provider_pool, tool_call\nclaw api schedule \u003Csubcommand>      # inspect\u002Fcontrol scheduled invocations via claw-api\n    # list | get \u003Cid> | pause \u003Cid> | resume \u003Cid> | skip-next \u003Cid> |\n    # clear-skip-next \u003Cid> | fire \u003Cid>\n\n# Per-run workers (stateless PicoClaw; opt-in task-home Hermes)\nclaw runs serve [--socket-dir DIR] [--allow-uid UID] [--callback-origin URL]   # supervisor; holds the pod run lock\nclaw runs launch|status|cancel|result \u003Cinstallation> \u003Crun-id> [...]            # Unix-socket clients\nclaw runs doctor [--remove-orphans]                                            # ledger check, orphaned workers\n\n# Session history & memory\nclaw history export \u003Cagent-id>      # export session history as NDJSON\n    [--after \u003CRFC3339>] [--limit N]\nclaw memory backfill \u003Cmem-svc>      # replay retained history to memory service\n    [--after \u003CRFC3339>] [--limit N] [--agent \u003Cid>]\nclaw memory forget \u003Cmem-svc>        # forget entries by ID with governed tombstones\n    --entry-id \u003Cid> --agent \u003Cid> [--reason \u003Ctext>]\n\n# Maintenance\nclaw update                         # re-run install.sh to update binary\n```\n\nOn successful pod launch, `claw up` prints `[claw] dashboard:  http:\u002F\u002Flocalhost:\u003Cport>` when the pod declares a `clawdash` surface. Agents debugging a running pod should point the operator at that URL.\n\nLifecycle commands block if `claw-pod.yml` is newer than `compose.generated.yml` — run `claw up` to regenerate. `claw down` is exempt.\n\n`-f` locates `compose.generated.yml` next to the pod file. Without `-f`, `claw up` uses `.\u002Fclaw-pod.yml`; other lifecycle commands look for `compose.generated.yml` in the current directory.\n\n`claw api schedule ...` does not require a host-published claw-api port. It\ntunnels through `docker compose exec -T claw-api \u002Fclaw-api -request-*`, so the\npod must already be up and include an injected `claw-api` service.\n`claw api schedule fire` waits synchronously for the final runner outcome and\ntherefore uses a longer operation-specific timeout. `--exec-timeout` overrides\nthe outer compose transport when an operator needs a different bound.\n\nTrust boundary: if you can run `docker compose exec` against the pod, you can\nselect any principal present in claw-api's `principals.json`. The `--principal`\nflag is a selector, not a security boundary.\n\n## Clawfile Reference\n\nA Clawfile is an extended Dockerfile. Every valid Dockerfile is a valid Clawfile.\n\n```dockerfile\nFROM openclaw:latest\n\nCLAW_TYPE openclaw                          # REQUIRED: selects runtime driver\nAGENT AGENTS.md                             # behavioral contract — must exist on host\n\nMODEL primary openrouter\u002Fanthropic\u002Fclaude-sonnet-5\nMODEL fallback anthropic\u002Fclaude-haiku-4-5\n\nCLLAMA passthrough                          # governance proxy type\nPERSONA .\u002Fpersonas\u002Ftrader                   # identity materialization (local or OCI)\n\nHANDLE discord                              # platform identity declaration\nINVOKE 15 8 * * 1-5  pre-market             # cron schedule (5-field + name)\n\nSURFACE service:\u002F\u002Ftrading-api               # infrastructure surface\nSURFACE volume:\u002F\u002Fshared-research read-write\n\nSKILL policy\u002Frisk-limits.md                 # operator policy, mounted read-only\nCONFIGURE openclaw config set key value     # driver-side config DSL, not arbitrary shell\n\nTRACK apt npm                               # mutation tracking wrappers\nPRIVILEGE worker root                       # privilege mode mapping\nPRIVILEGE runtime claw-user\n```\n\n### Directive Details\n\n| Directive | Purpose | Build -> Runtime |\n|-----------|---------|-----------------|\n| `CLAW_TYPE \u003Ctype>` | Selects driver. Determines HOW enforcement happens. | Label -> driver selection |\n| `AGENT \u003Cfile>` | Behavioral contract. **Must exist on host or startup fails.** Mounted read-only. | Label -> `:ro` bind mount |\n| `MODEL \u003Cslot> \u003Cprovider\u002Fmodel>` | Named model slot. Multiple allowed. Format: `provider\u002Fmodel-name`. | Label -> driver config injection |\n| `CLLAMA \u003Ctype>` | Governance proxy. Currently only `passthrough`. Runtime enforces max 1. | Label -> proxy sidecar wiring |\n| `PERSONA \u003Cpath>` | Identity materialization. Local refs copied with traversal hardening; non-local pulled as OCI artifacts. Sets `CLAW_PERSONA_DIR` only when present. | Label -> runtime materialization |\n| `HANDLE \u003Cplatform>` | Platform identity (`discord`, `slack`, `telegram`). Broadcasts agent ID as `CLAW_HANDLE_*` env vars. | Label -> driver config + pod env |\n| `INVOKE \u003Ccron> \u003Cname>` | Driver-specific scheduling. OpenClaw compiles into claw-api `schedule.json`; the compiler owns timing. | Baked contract, materialized at `claw up` |\n| `SURFACE \u003Cscheme>:\u002F\u002F\u003Ctarget> [mode]` | Infrastructure boundary. See Surface Taxonomy. | Label -> compose wiring |\n| `SKILL \u003Cfile>` | Reference markdown mounted read-only into runner skill directory. | Label -> host path validation + mount |\n| `CONFIGURE \u003Ccmd>` | Driver-specific config DSL. Use `\u003Cdriver> config set \u003Cpath> \u003Cvalue>`, not arbitrary shell. | Parsed by Clawdapus, then projected into generated runtime config\u002Fartifacts |\n| `TRACK \u003Cpkg-managers>` | Installs wrappers for `apt`, `pip`, `npm` to log mutations. | Build-time install |\n| `PRIVILEGE \u003Cmode> \u003Cuser>` | Maps privilege modes to user specs. | Label -> Docker user\u002Fsecurity |\n\n### `CONFIGURE` Semantics\n\n- Treat `CONFIGURE` as driver-side config mutation DSL, not as a generic startup hook.\n- The public contract is `CONFIGURE \u003Cdriver> config set \u003Cpath> \u003Cvalue>`.\n- Values are JSON-decoded when possible. Leave booleans, numbers, arrays, and objects unquoted; quote strings.\n- `CONFIGURE` applies after generated defaults, so it overrides what `HANDLE` and other driver defaults emitted.\n- For `openclaw`, Clawdapus applies `CONFIGURE` while generating `openclaw.json` during materialization. Do not assume downstream `openclaw config set ...` shell behavior is the same contract.\n- Dotted object paths are the supported shape today. OpenClaw uses keyed `agents.entries.main`, not the retired `agents.list` array. Managed provider routing\u002Fauthentication\u002Fruntime keys cannot be changed through CONFIGURE.\n- OpenClaw model selectors, including image, subagent and heartbeat models, must use declared MODEL values or their aliases. Put provider credentials in `x-claw.cllama-env`; provider auth\u002Froute variables in CONFIGURE env fail compilation.\n- OpenClaw Discord\u002FSlack plugins are pinned in the stock image and wired for declared channels. Custom bases need `\u002Fopt\u002Fclaw-openclaw-plugins\u002F{discord,slack}`. Conflicting plugin allow\u002Fdeny settings fail compilation. Telegram\u002FSlack use `botToken`; Discord uses `token`.\n- OpenClaw INVOKE wakes use fresh sessions and require explicit `to` for automatic final delivery. Configured `agents.defaults.timeoutSeconds` must be 1–900. Configure native `session.maintenance` for frequent schedules; live session SQLite stays in the durable sessions mount through explicit `session.store`.\n\n## Surface Taxonomy\n\n| Scheme | Enforcement | Notes |\n|--------|-------------|-------|\n| `volume:\u002F\u002F\u003Cname> [read-only\\|read-write]` | Compose volume mount | Default read-only |\n| `host:\u002F\u002F\u003Cpath> [mode]` | Compose bind mount | |\n| `service:\u002F\u002F\u003Cname>` | Pod-internal networking | Auto-mounts service skill if available |\n| `channel:\u002F\u002F\u003Cplatform>` | Driver config injection | Token from standard `environment:` block |\n| `webhook:\u002F\u002F\u003Cname>` | Driver HTTP endpoint config | |\n\nService skills: `claw.skill.emit` label > operator override > fallback stub.\n\n## Per-Run Workers\n\nAn orchestrator can read `GET \u002Fv1\u002Ftemplates` on the supervisor socket and put the\ncompiled template's `id` in the launch spec as `template_id`, before computing\nits digest and queueing it. A stale ID fails admission with `409 template_changed`\nand `current_template_id`; it does not reserve a home or create a run. A retry of\nan already-admitted identical spec returns the original run. Status exposes the\nadmitted `template_id` and concrete `models` chain. The listing contains only\nverified template metadata, model refs, profile, reference mount targets and a\ndata-policy summary; it contains no credentials or context body. Each model entry has `slot`, concrete `ref`, and optional `requested` (for example `openai\u002F@terra`) when a family was resolved. Requested names come only from the verified template and are copied into the run at admission. Exact pins omit the field. The first recompilation with this feature changes family-template IDs; queued old IDs keep the normal `template_changed` refusal, never an automatic rebind.\n\n`claw runs doctor` reports model-family drift before taking the run lock, so this report is available while serve runs (later ledger checks still refuse). It never changes model locks or templates. It compares the current family\u002Fpricing constraints and catalog, reports newer candidates\u002Fineligible members\u002Flisting absence or unavailability, and states that service data policy was not assessed. Image-only consumers are not inspected; candidates are not compile approval and listing absence is not retirement.\n\nThe default profile remains stateless PicoClaw. Hermes can opt into a persistent\ntask home with `x-claw.run.home: {}`. Launch specs then require an opaque `home`\nID, scoped by installation; the supervisor admits one live run per home. Only\nthat home is mounted read-write; pod `run.content` mounts reference content\nread-only. Hermes resumes its exact session and can return `result.outcome:\nquestion`; answer it by launching a later run for the same home. Use\n`claw runs home status|rm \u003Cinstallation> \u003Chome>` to inspect or reset it.\n\nFrom v0.32.2, the wrapper proves the session from the home's stored conversation\nand compression ancestry, so a missing Hermes stderr session hint can be recovered.\nMissing or ambiguous ancestry fails with `worker_session_unproven`. Wrapper failures\ncarry fixed `worker_*` codes in run status and the end callback's `reason`; a failed\nrunner also has `exit_observed.runner_code` in the persisted ledger. Public status\nexposes the wrapper exit as `exit_code`; it does not expose the runner code.\nArbitrary stderr is not retained. See the\nper-run workers guide for the reason table.\n\nTask-home workers have native terminal\u002Ffile tools. Each has its own network\nthrough a fixed cllama forwarder, plus a separate networkless read-only home\nmeter. `run.home.max-bytes` defaults to 1 GiB; exceeding it cancels the run as\n`home_full`. Meter loss fails closed. This watchdog is not a hard storage\nquota: host disk exhaustion before detection remains possible. After a killed\nturn, inspect durable effects before repeating them.\n\nModel routing is the declared chain: `x-claw.models` `primary`, `fallback`,\n`fallback-2`. `chatgpt\u002F\u003Cmodel>` serves from the operator's ChatGPT plan (needs\ncllama v0.15.0+); `vercel\u002F\u003Cprovider>\u002F\u003Cmodel>` uses\n`AI_GATEWAY_API_KEY`; other prefixes use their API key. `chatgpt\u002F…` first and a\nkeyed entry after it means plan first, key second; `chatgpt\u002F…` alone never\nuses a key. The operator signs in on the host, never an agent:\n`claw compose run --rm -p 127.0.0.1:1455:1455 cllama auth login chatgpt --listen 0.0.0.0:1455`.\n`claw runs doctor` and `GET \u002Fv1\u002Fsubscriptions` show sign-in state. A task-home\nrun's status and `end` callback report `served_by`, `served_by_complete` and\n`last_plan_failure` (`subscription_signin_required`,\n`subscription_limit_reached`, ...). Keys and the sign-in stay behind cllama.\n\nFor stateless PicoClaw, a service with `x-claw.lifecycle: per-run` is compiled by `claw up` into a run template under `.claw-runs\u002Ftemplates\u002F` and is never a long-lived compose service. `claw runs serve` (a host process) launches one worker per run as its own Compose project on an `internal` network shared with cllama, with a fresh cllama identity, read-only rootfs, tmpfs `\u002Ftmp`, uid 65534 and no host mounts. Cancel tombstones the run, revokes the identity through cllama's durable fence (requires cllama v0.11.0+), then removes the container. Workers speak OpenAI chat\u002Fcompletions; direct Anthropic keys and current OpenAI GPT-6 models need cllama v0.12.0+. `x-claw.reasoning-effort: {\u003Cslot>: none|minimal|low|medium|high}` (per-run only) makes the worker send that `reasoning_effort` for the slot. With cllama v0.13.0+, `CLLAMA_TRACE_JOURNAL: \"on\"` in `cllama-defaults.env` records a durable, verifiable segment per request, and each revoke writes a coverage seal proving every request of a run was captured. `claw up` and `claw down` refuse while the supervisor holds the pod lock; `claw up` also refuses while any run is unfinished. See `site\u002Fguide\u002Fper-run-workers.md` for the socket API, spec digest (RFC 8785) and callback contract.\n\n## claw-pod.yml Reference\n\nExtended docker-compose. Claw config lives under `x-claw:` (Docker ignores this namespace).\n\n```yaml\nx-claw:\n  pod: my-pod                        # optional pod name\n  # Pod-level defaults (services inherit; override or extend with ...)\n  cllama-defaults: passthrough\n  handles-defaults:\n    discord:\n      id: \"${BOT_DISCORD_ID}\"\n      username: \"my-bot\"\n      guilds: [...]\n  surfaces-defaults:\n    - \"service:\u002F\u002Ftrading-api\"\n  feeds-defaults:\n    - fleet-alerts\n  skills-defaults:\n    - .\u002Fskills\u002Fshared-runbook.md\n  tools-defaults:\n    - trading-api\n  memory-defaults:\n    service: team-memory\n    timeout-ms: 300\n\nservices:\n  my-agent:\n    image: my-claw-image:latest\n    x-claw:\n      agent: .\u002FAGENTS.md             # host path, overrides Clawfile AGENT\n      cllama: passthrough             # or [passthrough, policy] for future chains\n      cllama-env:                     # ONLY place for provider API keys when using cllama\n        ANTHROPIC_API_KEY: \"${ANTHROPIC_API_KEY}\"\n        OPENROUTER_API_KEY: \"${OPENROUTER_API_KEY}\"\n      handles:\n        discord:\n          id: \"${BOT_DISCORD_ID}\"\n          username: \"my-bot\"\n          guilds:\n            - id: \"${GUILD_ID}\"\n              name: \"My Server\"\n              channels:\n                - id: \"${CHANNEL_ID}\"\n                  name: general\n      surfaces:\n        - \"service:\u002F\u002Ftrading-api\"\n        - \"volume:\u002F\u002Fshared-cache read-write\"\n        - channel:\u002F\u002Fdiscord:          # map form with routing config\n            dm:\n              enabled: true\n              policy: allowlist\n              allow_from: [\"USER_ID\"]\n      skills:\n        - .\u002Fskills\u002Fcustom-runbook.md\n      feeds:\n        - fleet-alerts               # short-form feed name (resolved from feed registry)\n      tools:                          # v0.5.0: managed tool subscriptions (cllama-only)\n        - trading-api                 # scalar = subscribe to ALL tools from this service\n        - service: analytics          # map form = named allow list\n          allow:\n            - get_summary\n            - get_report\n      memory:                         # v0.5.0: ambient memory subscription (cllama-only)\n        service: team-memory\n        timeout-ms: 450              # recall timeout per turn (default 300ms)\n      invoke:                         # pod-level scheduled tasks\n        - schedule: \"*\u002F30 * * * *\"\n          name: \"Heartbeat\"\n          message: \"Post status.\"\n          to: trading-floor\n    environment:                      # standard compose — credentials go HERE\n      DISCORD_BOT_TOKEN: \"${DISCORD_BOT_TOKEN}\"\n\n  perplexity:\n    image: ghcr.io\u002Fmostlydev\u002Fclaw-mcp-stdio:v0.12.0\n    environment:\n      PERPLEXITY_API_KEY: \"${PERPLEXITY_KEY}\"\n    expose:\n      - \"8080\"\n    x-claw:\n      mcp-stdio:\n        command: npx\n        args: [\"-y\", \"perplexity-mcp\"]\n```\n\n### Key rules\n\n- **Credentials**: Standard `environment:` or `secrets:` blocks. Never in `x-claw:` (except `cllama-env` for proxy keys).\n- **`cllama-env`**: Provider API keys for the proxy. These go ONLY here — never in agent `environment:`. Credential starvation enforced.\n- **`handles`**: Discord bot IDs, usernames, guilds. Clawdapus auto-generates native Discord `mentionPatterns`, `allowBots: true`, peer `users[]` allowlist.\n- **`surfaces`**: String form (`\"channel:\u002F\u002Fdiscord\"`) = simple enable. Map form (`channel:\u002F\u002Fdiscord: {dm: {...}}`) = routing config.\n- **`tools`**: Requires `cllama` on the consuming service. Services must publish tools via `claw.describe` descriptor v2. `allow: all` (implicit for scalar form) passes every tool; named lists are validated against the tool registry.\n- **`mcp-stdio`**: Sidecar-only block for the shared `claw-mcp-stdio` wrapper. `command` is required, `args` is a list, and credentials stay in the sidecar's regular `environment:`. Run `claw discover \u003Cservice>` to ask the MCP server for `tools\u002Flist` and write `.claw-discovered\u002F\u003Cservice>.claw-describe.json`; `describe-file` remains an explicit override when live discovery is unavailable.\n- **`memory`**: Requires `cllama` on the consuming service. Target service must declare `memory` in its `claw.describe` descriptor v2.\n- **Pod defaults**: `*-defaults` at pod level are inherited by all services. Declaring the field at service level replaces the default. Use `...` spread token to extend list-type defaults (surfaces, feeds, skills, tools). Memory defaults are object-form (no spread — presence of `memory:` at service level replaces entirely; `memory: null` suppresses).\n- **`models` \u002F `models-defaults`**: slot map overriding image `MODEL` labels per key (`primary`, `fallback`, custom slots). `fallback` also accepts an ordered list (`fallback: [ref, ref]`) — cllama walks the chain in declared order on provider exhaustion (v0.28.0, cllama ≥ v0.9.0). The fallback family replaces atomically: a service-level fallback (scalar, list, or `[]` to clear) replaces the entire inherited\u002Fimage chain, never merging positionally. Only `fallback` takes a list; images stay single-fallback (declare chains at pod level).\n- **`model-families`** (pod level): declare a name with `provider`, `pattern` (one `*` matching a dotted numeric version), `max-input` and `max-output` in USD per million tokens. Reference it as `openai\u002F@terra` in a model slot. `claw up` selects a concrete member using the provider catalog and the pinned cllama price export (requires cllama ≥ v0.16.0), checks each service's policy, prints moves, and writes `models.lock`. Exact pins remain unchanged. Offline locks are revalidated; catalog absence never authorizes a downgrade. Support covers official standard API endpoints for OpenAI, xAI, Google and Meta, plus Vercel AI Gateway with `AI_GATEWAY_API_KEY` (for example `vercel\u002F@terra` with pattern `openai\u002Fgpt-*-terra`). Vercel uses its authenticated eligibility catalog and the highest catalog\u002Fendpoint tier price; unreadable fresh prices cannot reuse an older lock price. An unavailable catalog may reuse recorded rates under current ceilings. ChatGPT plan families use `provider: chatgpt`, omit price ceilings, and read the account catalog through pinned cllama ≥ v0.18.0 (`cllama auth catalog chatgpt --json`); the sign-in stays in the proxy auth store. Custom\u002Fregional endpoints need exact pins. Only exact, complete-context prices count; unknown models wait for updated pricing. Queued orchestrator specs must capture the compiled `template_id` when queued, not when dispatched, to prevent recompilation rebinding.\n\n## Service Self-Description (claw.describe)\n\nServices declare capabilities via a `.claw-describe.json` file (embedded in the image, discovered from Dockerfile labels, generated under `.claw-discovered\u002F` by `claw discover`, refreshed there by `claw up --fix` for build-backed runtime-emitted descriptors, or supplied with service-level `x-claw.describe-file`). `claw up` extracts descriptors and compiles them into pod-global registries.\n\n### Descriptor v2\n\n```json\n{\n  \"version\": 2,\n  \"service\": \"trading-api\",\n  \"feeds\": [\n    {\"name\": \"market-data\", \"path\": \"\u002Ffeeds\u002Fmarket\", \"ttl\": \"5m\"}\n  ],\n  \"tools\": [\n    {\n      \"name\": \"execute_trade\",\n      \"description\": \"Execute a market order\",\n      \"inputSchema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"ticker\": {\"type\": \"string\"},\n          \"action\": {\"type\": \"string\", \"enum\": [\"buy\", \"sell\"]},\n          \"quantity\": {\"type\": \"integer\"}\n        },\n        \"required\": [\"ticker\", \"action\", \"quantity\"]\n      },\n      \"http\": {\"method\": \"POST\", \"path\": \"\u002Ftrade\", \"body\": \"json\"}\n    }\n  ],\n  \"memory\": {\n    \"recall\": {\"path\": \"\u002Frecall\"},\n    \"retain\": {\"path\": \"\u002Fretain\"},\n    \"forget\": {\"path\": \"\u002Fforget\"}\n  }\n}\n```\n\n- **`tools`**: Each requires `name`, `description`, `inputSchema` (JSON Schema, `type: \"object\"`), and either `http` (`method`, `path`, optional `body`) for Clawdapus-native HTTP services *or* a top-level `mcp` block on the descriptor (see below) for MCP sidecars. Duplicate tool names within a service are a hard error.\n- **`mcp`** *(v0.11.0)*: Top-level block declaring the service is an MCP sidecar — `transport: streamable_http` (default) and `path: \u002Fmcp` (default). When present, `tools[].http` becomes optional and cllama routes calls through the MCP `tools\u002Fcall` endpoint instead of an HTTP path. Auth resolution, namespacing, audit, session-history, and policy budgets are unchanged from the HTTP-managed path.\n- **`memory`**: At least one of `recall` or `retain` required. All paths must start with `\u002F`.\n- **`feeds`**: Unchanged from v1. Short-form names in `x-claw.feeds` resolve against the feed registry.\n\n## Persistence Surfaces\n\nClawdapus provides distinct durable state surfaces for agents. They survive container restarts (`claw up`) and driver migrations (changing `CLAW_TYPE`).\n\n| Surface | Owner | Written by | Path inside container | Host path |\n|---------|-------|------------|-----------------------|-----------|\n| **Session history** | Infrastructure | cllama proxy | `\u002Fclaw\u002Fsession-history` | `.claw-session-history\u002F\u003Cagent-id>\u002Fhistory.jsonl` |\n| **Portable memory** | Runner \u002F Agent | Agent | `\u002Fclaw\u002Fmemory` | `.claw-memory\u002F\u003Cagent-id>\u002Fmemory\u002F` |\n| **Portable skills** | Runner \u002F Agent | Agent | runner-specific skill dir, e.g. `\u002Froot\u002F.hermes\u002Fskills` | `.claw-skills\u002F\u003Cclaw-id>\u002Fskills\u002F` |\n\n- **Session History:** Normalized JSONL record of every successful LLM turn, captured transparently at the proxy boundary. The agent does not write this. Fields include `reported_cost_usd`, `tool_trace` (for managed tool calls), and `memory_op` (for recall\u002Fretain operations).\n- **Portable Memory:** The agent's own active scratchpad. Agents can read\u002Fwrite notes, drafts, and learned facts here.\n- **Portable Skills:** The runner's writable skill directory is backed by `.claw-skills\u002F\u003Cclaw-id>\u002Fskills\u002F`. Compile-time `SKILL` files and service manuals are still mounted read-only over this directory, while agent-created skills persist beside them.\n- **Cross-Runner Portability:** Because these paths are canonically managed by Clawdapus, you can swap an agent's `CLAW_TYPE` (e.g., migrating from OpenClaw to PicoClaw) and its memory, session history, and self-authored skills will automatically follow it into the new runtime.\n\n### Ambient Memory (v0.5.0)\n\nWhen a service subscribes to a memory service via `x-claw.memory`, cllama performs:\n\n- **Pre-turn recall**: Before each inference turn, cllama queries the memory service's `\u002Frecall` endpoint and injects relevant context.\n- **Post-turn retain**: After each turn, cllama sends the conversation to the memory service's `\u002Fretain` endpoint for storage.\n- **Governed forget**: `claw memory forget` sends tombstone requests to `\u002Fforget` and records local tombstones so subsequent backfills skip those entries.\n\n`claw up` compiles `memory.json` into each subscribing agent's cllama context directory with endpoint URLs, auth tokens, and timeout configuration.\n\n### Context Blocks\n\nPod or service `x-claw.context.blocks` compiles short operator-authored snippets into each agent's cllama context directory as `context-blocks.json`. cllama injects enabled blocks into late runtime context before or after feeds on every turn, so durable operating focus stays visible without expanding the primary contract.\n\nSupported fields: `id` (required), `text` (required), `enabled` (default `true`), `cadence` (`every_turn`), `placement` (`before_feeds` or `after_feeds`, default `after_feeds`), and `max-chars` \u002F `max_chars` (default `800`). A service-level list replaces pod-level blocks; an explicit empty list suppresses inherited blocks.\n\n### Managed Tool Mediation (v0.5.0)\n\nWhen a service subscribes to tools via `x-claw.tools`, cllama performs bounded tool execution within the inference turn:\n\n- Tools are injected into the LLM request as available tool definitions\n- When the model calls a tool, cllama executes against the providing service. The execution path depends on the descriptor: HTTP-native services use the per-tool `http` metadata; MCP sidecars (descriptor declares a top-level `mcp` block, v0.11.0+) are reached via the Streamable HTTP `tools\u002Fcall` endpoint with cached `initialize` sessions.\n- Repeated identical managed tool calls in a mediated turn are not re-executed; by default cllama replays the first call's cached result (`CLLAMA_MANAGED_DUPLICATE_POLICY=replay`; `reject` restores the legacy data-less `duplicate_tool_call` 409). After `CLLAMA_MANAGED_DUPLICATE_STREAK_CUTOFF` consecutive identical calls (default 3) it disables tools and forces a final answer. Duplicate metadata (round, count, streak, policy) is recorded in `tool_trace`\n- Tool results are fed back to the model for up to 8 rounds (configurable)\n- `tool_trace` entries appear in session history for auditability\n- Works with both OpenAI-compatible and Anthropic-format requests\n- Supports synthetic SSE re-streaming when the runner requested streaming\n\n`claw up` compiles `tools.json` into each subscribing agent's cllama context directory:\n\n```json\n{\n  \"version\": 1,\n  \"tools\": [...],\n  \"policy\": {\n    \"max_rounds\": 8,\n    \"timeout_per_tool_ms\": 30000,\n    \"total_timeout_ms\": 120000\n  }\n}\n```\n\nThe policy is tunable from the pod YAML via `x-claw.tool-policy` (service level) or `x-claw.tool-policy-defaults` (pod level) with `max-rounds`, `timeout-per-tool-ms`, and `total-timeout-ms`. Omitted fields keep the defaults above; a service-level block replaces the pod default entirely. Slow reasoning models that exceed the 120s total budget fail the whole mediated turn with a 502 `context deadline exceeded` — raise `total-timeout-ms` for those services.\n\n### Compute budget enforcement *(v0.24.0)*\n\n`x-claw.budget` (service level) or `x-claw.budget-defaults` (pod level) compile a per-agent spend\u002Frequest cap into the agent's `metadata.json`. Fields: `limit-usd` (spend cap), `max-requests` (request-rate cap), `window` (rolling duration, e.g. `1h`, `24h`), and `behavior` (`hard_stop` default, `rate_limit`, or `soft_alert`). Before dispatching either an OpenAI-compatible or Anthropic-format request, cllama sums the agent's `.claw-session-history\u002F\u003Cid>\u002Fhistory.jsonl` over the window; when the window is already at or above a cap it returns `429` with a structured `budget_exceeded` (spend) or `rate_limited` (requests) error and logs the matching intervention. `soft_alert` logs the intervention but allows the request. If the ledger cannot be read, cllama **fails open** (logs `budget_check_unavailable`, allows the request); set `CLLAMA_BUDGET_FAIL_MODE=closed` to return `503` instead. Runtime overrides flow through `fleet.budget.set` (claw-api writes `.claw-governance\u002F\u003Cid>\u002Fbudget.json`, mounted read-only into cllama and merged over the compiled cap on each request) so an operator or Master Claw governor can raise a cap without rebuilding the pod. Budgets are an infrastructure hard-cap independent of the (future) policy plane — see ADR-025.\n\n`x-claw.data-policy` (service level, replaces) or `x-claw.data-policy-defaults` (pod level) sets the data policy cllama enforces on every model request and fallback: `regions` (default `[us, eu]`; lowercase codes or `global`), `training` (`none` default | `allowed`), `retention` (provider retention, `none` default | `provider-default`), `local-retention` (cllama content, `none` default | `allowed`), and `attestations` (`- provider:`, optional `endpoint:`, `guarantees: [zero-data-retention, no-training, processing:\u003Ccc>, storage:\u003Ccc>]`). A requirement passes only by a per-request control cllama applies or an endpoint-bound attestation; otherwise the request is refused with an intervention naming the unmet requirement. Most providers need attestations under the default, so an upgraded pod that suddenly gets refused needs its real account guarantees attested or the policy relaxed. With `local-retention: none` history keeps metadata only. Claws that bypass cllama are not covered (`claw up` warns). See `site\u002Fguide\u002Fdata-policy.md`.\n\n### Hosted capabilities\n\nWith cllama v0.17.0 or later, provider-hosted features require an explicit service-level `x-claw.hosted-capabilities` list: `web_search`, `code_interpreter`, `file_search`, or `image_generation`. It requires cllama, has no pod default, and applies only to that service and its ordinals across their already authorized model routes. Remote MCP servers and vendor plugins cannot be granted. A grant never overrides the data policy; relaxing that policy grants nothing. Per-run templates reject grants in this version and remain protected on API fallback. Native function\u002Fcustom tools and managed tools need no hosted grant. The fixed refusal is HTTP 400 `hosted capability not granted: \u003Ccapability>` with intervention `hosted_capability_refused:\u003Ccapability>`. See `site\u002Fguide\u002Fpod-yaml.md`.\n\n## Communication Tools Contract\n\nAll four drivers compile mention-only channel consumption so an unaddressed bot message does not create a feedback loop.\n\n- **Hermes**: `HERMES_TOOL_ONLY_MODE=1` injected when Discord handles are present; runtime patches prefer `send_message`, suppress duplicate final text after a successful `send_message`, and fall back to final-text delivery rather than silently dropping replies\n- **OpenClaw**: enforced natively\n- **NanoBot and PicoClaw**: generated channel configuration enables each runner's mention-only equivalent\n\nCLAWDAPUS.md includes a `## Communication Tools` section with private-thinking policy whenever handles are configured.\n\n## cllama Governance Proxy\n\nThe proxy sits between agents and LLM providers. Agents get bearer tokens, proxy holds real API keys.\n\n### How it works\n\n1. Agent calls `http:\u002F\u002Fcllama-passthrough:8080\u002Fv1\u002Fchat\u002Fcompletions` with bearer token\n2. Proxy resolves agent identity from token (`\u003Cagent-id>:\u003C48-hex-secret>`)\n3. Proxy routes to correct provider, swaps bearer token for real API key\n4. If tools are configured, proxy injects tool definitions and handles bounded tool execution loops\n5. If memory is configured, proxy runs pre-turn recall and post-turn retain\n6. Proxy extracts token usage, tracks cost, emits audit log\n7. Response streamed back to agent transparently\n\n### Bearer token format\n\n`\u003Cagent-id>:\u003C48-hex-chars>` — generated by `crypto\u002Frand`, injected into agent env and proxy context.\n\n### Context directory (auto-generated per agent)\n\n```\n\u002Fclaw\u002Fcontext\u002F\u003Cagent-id>\u002F\n  metadata.json     # token, pod, service, type\n  AGENTS.md         # compiled behavioral contract\n  CLAWDAPUS.md      # infrastructure map\n  tools.json        # managed tool manifest (when tools subscribed)\n  memory.json       # memory service config (when memory subscribed)\n  context-blocks.json # context block manifest (when configured)\n```\n\n### Provider support\n\n| Provider | Auth | Model format |\n|----------|------|-------------|\n| OpenAI | Bearer | `openai\u002Fgpt-5.6` |\n| Anthropic | X-Api-Key | `anthropic\u002Fclaude-sonnet-5` |\n| OpenRouter | Bearer | `openrouter\u002Fanthropic\u002Fclaude-sonnet-5` |\n| xAI | Bearer | `xai\u002Fgrok-3` |\n| Ollama | None | `ollama\u002Fllama3` |\n\n### Credential starvation enforcement\n\n- Real API keys go in `x-claw.cllama-env` (proxy only)\n- Agent env is scanned for `*_API_KEY` patterns — preflight fails if found\n- Image ENV layer is inspected too — baked keys fail preflight\n- Agent only knows its bearer token. No keys, no bypass.\n\n### claw-wall sidecar\n\nAuto-injected by `claw up` when any cllama-enabled service has Discord channel IDs. Polls Discord channels and serves the recent channel transcript to agents through `channel-context` tail feeds; legacy unread-mailbox cursor paging remains available as `mode=delta`. On startup, wall backfills Discord history before its first forward poll up to `CLAW_WALL_RETENTION` (default `24h`) and `CLAW_WALL_BACKFILL_MAX_PAGES` (default `25`), while `CLAW_WALL_LIMIT` is a per-channel safety cap (default `5000`). Configure the generated tail window with pod or service `x-claw.context.channel` (`since`, `limit`, `max-chars`, `buffer`). Since `v0.15.0` channel-consuming services also get a default-on `channel-awareness` feed plus two cllama-mediated retrieval tools - `search_channel_context` and `get_channel_messages` - auto-subscribed via a compiler-owned claw-wall descriptor. Without `x-claw.channel-memory.service`, `channel-awareness` is an uncursored raw window and retrieval tools search only claw-wall's retained raw buffer. With channel-memory wired, `claw up` changes that feed to `context_kind=raw_window+digest`; claw-wall fetches digest blocks from channel-memory, emits a compact `[digest]` section with source provenance, keeps a bounded `[raw recent]` tail, and lets retrieval tools fall through to durable source-message and sparse derived-block results when the raw buffer has rolled forward. Feed headers include `backfill_status`, `digest`, `raw_bytes`, `digest_bytes`, `digest_blocks`, `coverage_gaps`, and `deterministic_only`; `partial` or `rate_limited` backfill means the backing window did not fully satisfy the requested horizon. Calls are gated by a generated per-agent channel allowlist, claw-wall service-token auth, and forwarded `X-Claw-ID`. The service name `claw-wall` is reserved - declaring it in `claw-pod.yml` is a hard error.\n\n### cllama feed injection budgets\n\n`x-claw.context.channel.max-chars` only sizes the *source* window claw-wall returns. cllama applies its own byte budgets when it injects feeds into the prompt: `32 KB` per feed (`CLLAMA_FEED_MAX_RESPONSE_BYTES`) and `64 KB` aggregate across all feed blocks (`CLLAMA_FEED_MAX_TOTAL_BYTES`). Defaults are bounded; invalid values fall back to defaults. A pod that raises `max-chars` to a large 24h window but leaves cllama at defaults will still have the feed truncated, or skipped entirely once earlier feeds consume the shared aggregate budget. Raise both via `x-claw.cllama-defaults.env` (or service-level `x-claw.cllama-env`):\n\n```yaml\nx-claw:\n  cllama-defaults:\n    env:\n      CLLAMA_FEED_MAX_RESPONSE_BYTES: \"262144\"\n      CLLAMA_FEED_MAX_TOTAL_BYTES: \"393216\"\n```\n\nWhen the aggregate cap drops a feed the model sees an explicit `--- FEED: \u003Cname> skipped (...) ---` notice (not a silent omission), and cllama emits a `feed_injection` audit event per feed (`included` \u002F `empty` \u002F `skipped_total_cap`) with byte metadata. The aggregate cap drops whole feeds in manifest order — there is no per-feed priority yet, so raise `CLLAMA_FEED_MAX_TOTAL_BYTES` rather than relying on ordering.\n\n## Generated Artifacts\n\n| File | Purpose | Location |\n|------|---------|----------|\n| `Dockerfile.generated` | Transpiled Clawfile | Next to Clawfile |\n| `compose.generated.yml` | Final compose with all enforcement | Next to claw-pod.yml |\n| `CLAWDAPUS.md` | Per-agent infrastructure map | Mounted into container |\n| `AGENTS.effective.md` | Merged contract + CLAWDAPUS.md (OpenClaw and Hermes cllama context) | Mounted into container or cllama context |\n| `openclaw.json` | Generated runner config (OpenClaw) | Bind-mounted directory |\n| `config.yaml` \u002F `.env` | Generated runner config (Hermes) | Bind-mounted directory |\n| `schedule.json` | Compiled scheduler authority (all OpenClaw INVOKE and pod schedules) | `.claw-runtime\u002F` |\n| `jobs.json` | Native schedule store for runners retaining that format; not OpenClaw | Runner state directory |\n| `tools.json` | Managed tool manifest per agent | cllama context directory |\n| `memory.json` | Memory service config per agent | cllama context directory |\n| `context-blocks.json` | Runtime context block manifest per agent | cllama context directory |\n\n## Drivers\n\n| Driver | CLAW_TYPE | Runner | Config method | Notes |\n|--------|-----------|--------|--------------|-------|\n| OpenClaw | `openclaw` | OpenClaw | JSON5 Go-native patching -> `openclaw.json` | Pins OpenClaw 2026.10.5 + Node 24.22.0. Keyed agent config; per-ordinal durable SQLite\u002Ftranscripts; compiled claw-api wakes. Read-only root. |\n| Hermes | `hermes` | Hermes (Python) | `config.yaml` + `.env` | Discord\u002FTelegram\u002FSlack. `HERMES_TOOL_ONLY_MODE`. Requires at least one handle. |\n| NanoBot | `nanobot` | Nanobot (Python) | `config.json` | Cron via `jobs.json`. Merged AGENTS.md. |\n| PicoClaw | `picoclaw` | PicoClaw | `config.json` | HTTP `\u002Fhealth` + `\u002Fready` probe. Read-only container. |\n\nRetired (ADR-026): `nanoclaw`, `microclaw`, `nullclaw` — these `CLAW_TYPE`s fail `claw up` with a migration message.\n\nAll drivers set `CLAW_MANAGED=true`, explicit `HOME`, and `DISCORD_REQUIRE_MENTION` (or equivalent) to prevent feedback loops.\n\n## Fail-Closed Semantics\n\nClawdapus refuses to start containers when:\n- `AGENT` file missing on host\n- Driver preflight fails\n- Driver post-apply verification fails\n- Unsupported surface scheme for the driver\n- Credential starvation violated (API keys in agent env or image)\n- `tools` or `memory` declared without `cllama` on the service\n- Managed service requires `claw up -d` (detached mode)\n\n**This is by design. If enforcement can't be confirmed, the container doesn't run.**\n\n## Skill Mounting\n\n- Image-level: `SKILL \u003Cfile>` -> `claw.skill.N` labels\n- Pod-level: `x-claw.skills: [.\u002Ffile.md]` — merges with image skills by basename (pod wins)\n- Generated: service skills from `claw.describe` mounted at `\u002Fclaw\u002Fskills\u002F` with CLAWDAPUS.md pointer\n- Precedence: pod > image > generated\n- Duplicate basenames across same layer -> validation error\n\n## Troubleshooting\n\n### Agent won't start\n1. Check `AGENT` file exists at the host path specified\n2. Run `claw doctor` to verify Docker dependencies\n3. Check `compose.generated.yml` for the actual compose that was generated\n4. Look at driver preflight errors in `claw up` output\n\n### Credential starvation failures\n- Move API keys from agent `environment:` to `x-claw.cllama-env:`\n- Check image doesn't bake keys in ENV layer: `claw inspect \u003Cimage>`\n- Bearer token is auto-injected; don't set it manually\n\n### Config injection issues (OpenClaw)\n- Config dir (`\u002Froot\u002F.openclaw\u002Fconfig`) must be bind-mounted as directory, not file\n- OpenClaw does atomic writes via rename — file-only mounts cause EBUSY\n- OpenClaw home is canonical `~\u002F.openclaw` (`\u002Froot\u002F.openclaw`) rather than a separate `\u002Fapp\u002Fstate` shim; both `\u002Froot` and `\u002Froot\u002F.openclaw` are tmpfs-backed so non-root users can traverse and write state\n- Check generated `openclaw.json` in the runtime directory\n- OpenClaw health: `claw health -f \u003Cpod>.yml`\n\n### HANDLE\u002Fsocial topology issues\n- Handles broadcast as `CLAW_HANDLE_\u003CUPPERCASED_NAME>_DISCORD_ID` etc.\n- `mentionPatterns` auto-derived: Discord uses native `\u003C@!?\u003Cid>>`; text-mention platforms use `(?i)\\b@?\u003Cusername>\\b`\n- `allowBots: true` is unconditional — required for bot-to-bot messaging\n- Peer handles: each agent's guild `users[]` includes own ID + all peer bot IDs\n\n### Observability dashboard (clawdash)\n\nWhen a pod declares a `clawdash` surface, `claw up` publishes the operational dashboard at the emitted `http:\u002F\u002Flocalhost:\u003Cport>` URL. Relevant views:\n\n- **Fleet \u002F Topology** — running services, wiring, driver types.\n- **Agents** — per-agent *contract* as compiled at `claw up` time (AGENTS.md, CLAWDAPUS.md, feed subscriptions, managed tools, memory wiring, metadata).\n- **Agents → Live Context** — the system message, tools array, context blocks, injected feeds, memory recall, time context, and interventions that were assembled for the most recent inference turn. Sourced from the cllama snapshot store (`\u002Finternal\u002Fcontext\u002F\u003Cagent-id>\u002Fsnapshot`, proxied through `claw-api`). Credentials and token fields are redacted.\n- **Schedule** — `INVOKE` and `x-claw.invoke` cron entries, with `claw api schedule ...` controls.\n\nAll views are read-only and scoped through `claw-api` principals. Use this before log-diving — \"what did the model actually see last turn\" has a direct answer here.\n\n### cllama proxy not working\n- Check proxy container is running: `claw ps -f \u003Cpod>.yml`\n- Proxy named `cllama-passthrough` in compose — agents reach it at `http:\u002F\u002Fcllama-passthrough:8080`\n- Dashboard at port 8081 of proxy container\n- Check `\u002Fclaw\u002Fcontext\u002F\u003Cagent-id>\u002Fmetadata.json` has correct token\n- Proxy logs are structured JSON on stdout\n- SSE debug endpoint: `curl -N -H \"Authorization: Bearer \u003Cui_token>\" http:\u002F\u002F\u003Chost>:\u003Cport>\u002Fevents`\n\n### Managed tools not working\n- Verify the provider service has a `claw.describe` descriptor with `version: 2` and `tools[]`\n- Check `tools.json` in `.claw-runtime\u002Fcontext\u002F\u003Cagent-id>\u002F`\n- `claw audit --type tool_call` shows tool execution traces\n- Both consumer and provider must be on the `claw-internal` network (auto-wired by `claw up`)\n- Declaring `tools:` without `cllama:` is a hard error\n\n### Memory not working\n- Verify the memory service has a `claw.describe` descriptor with `memory` block\n- Check `memory.json` in `.claw-runtime\u002Fcontext\u002F\u003Cagent-id>\u002F`\n- `claw audit` shows `memory_op` telemetry entries\n- `claw memory backfill` replays history to a memory service for bootstrapping\n- `claw memory forget --entry-id \u003Cid>` writes tombstones; subsequent backfills skip those entries\n- Declaring `memory:` without `cllama:` is a hard error\n\n### Context blocks not visible\n- Check `context-blocks.json` in `.claw-runtime\u002Fcontext\u002F\u003Cagent-id>\u002F`\n- Check `claw audit --type context_block` for injected or skipped context block entries\n- Verify `cadence` is `every_turn`, `placement` is `before_feeds` or `after_feeds`, and the block text is within `max-chars`\n\n## Working Examples\n\n| Example | Path | What it demonstrates |\n|---------|------|---------------------|\n| Quickstart | `examples\u002Fquickstart\u002F` | Single governed OpenClaw Discord bot |\n| Trading desk | `examples\u002Ftrading-desk\u002F` | 5-driver fleet, pod defaults, invoke schedules, `claw.describe` |\n| Rollcall | `examples\u002Frollcall\u002F` | 7-driver parity test, sequential-conformance, memory wiring |\n| Master Claw | `examples\u002Fmaster-claw\u002F` | Fleet governance, `claw-api` auto-inject, feeds with bearer auth |\n| Multi-claw | `examples\u002Fmulti-claw\u002F` | Shared volume surfaces, Slack handle, non-claw sidecar |\n| Nanobot | `examples\u002Fnanobot\u002F` | Minimal nanobot driver setup |\n| PicoClaw | `examples\u002Fpicoclaw\u002F` | Minimal picoclaw driver setup |\n| OpenClaw | `examples\u002Fopenclaw\u002F` | Multi-channel Discord guild config |\n| Reference memory | `examples\u002Freference-memory\u002F` | ADR-021 memory contract reference implementation (Go HTTP service) |\n\n## Architecture Key Points\n\n- `claw pull` owns pinned infra freshness, pod registry-image pulls, and built-in local runner alias freshness (`openclaw:latest`, `nanobot:latest`, etc.)\n- `claw pull --no-runners` skips runner refresh for the fast infra-only path\n- `claw build` transpiles Clawfile -> standard Dockerfile -> `docker build` -> OCI image, or builds every pod `build:` service when run without a path\n- `claw up` parses pod YAML -> driver enforcement -> `compose.generated.yml` -> `docker compose`, but stays strict about missing images unless `--fix` is set\n- **docker compose is the sole lifecycle authority**. Docker SDK is read-only.\n- Two-pass loop in compose_up: Pass 1 inspect+resolve all services + cllama wiring, Pass 2 materialize\n- After feed resolution: `resolveToolSubscriptions` and `resolveMemorySubscriptions` wire capability providers into the internal network and compile manifests into cllama context\n- Generated files are inspectable build artifacts, not hand-edited\n- `claw-internal` Docker network is NOT `internal: true` — agents need egress for APIs\n\nTask-home run networks use individual \u002F29 blocks from `10.213.0.0\u002F16` instead of consuming Docker default address pools. Set `CLAW_RUN_SUBNET_BASE` on `claw runs serve` to choose a different private IPv4 range (\u002F8 through \u002F24) if another host network overlaps. Runs remain on separate internal bridges; no existing host networks are pruned.\n\nTask-home workers can return files in `\u003Chome>\u002Fdeliverables\u002F`. The supervisor socket serves `GET \u002Fv1\u002Fhomes\u002F{installation}\u002F{home}\u002Fdeliverables` (up to 200 files, 4096 scanned entries, `truncated` when bounded) and `GET ...\u002Fdeliverables\u002F{name}?sha256=\u003Coptional expected digest>`. Only flat regular files up to 524288 bytes are served. Fetch returns `{name,bytes,sha256,content_base64}` under 700 KiB total JSON; a digest mismatch returns `409 deliverable_changed`. Symlinks, directories and harness\u002Fsession files are not served. The digest describes the returned bytes.\n\nUnreadable deliverables return `503 deliverables_unreadable`, never a successful partial\u002Fempty list. Recompile existing Hermes task-home templates after upgrading to v0.36.1: the wrapper publishes regular deliverable files at turn start and after the runner exits. Private files left by a killed turn remain errors until a subsequent run publishes them. Session\u002Fworkspace file modes remain private.\n\n### Versioned per-run reference content\n\nTask-home `run.content` entries accept `versioned: true`. The compiled source is a snapshot root inside the pod; launch `content` maps each exact versioned target to an opaque `[A-Za-z0-9][A-Za-z0-9._-]{0,127}` ID. All versioned targets are required; stateless, fixed and unknown targets refuse selection. The nonempty map is canonicalized with JCS UTF-16 key ordering and included in `spec_digest`. The supervisor validates sealed directories\u002Fregular files only (20,000 entries including root, depth32,256MiB), records target\u002Fsnapshot\u002Fmanifest_digest in status, and rechecks before spawn. Missing\u002Funsafe snapshots fail admission; changed snapshots fail the run. Inventory exposes `versioned_content_targets`. Host publishing must seal with `chmod -R a+rX,a-w` and retain issued directories unchanged until runs finish; no directory swaps, GC, host commands or credentials are supplied by launch. Docker's later lookup still trusts host immutability. Compile once to add the declaration; publishing versions needs no recompile.\n",{"name":5,"description":7},"master","039ce12da26574659189789877100d81cdd6e14f","skills\u002Fclawdapus","https:\u002F\u002Fgithub.com\u002Fmostlydev\u002Fclawdapus","http:\u002F\u002Fclawdapus.dev\u002F","https:\u002F\u002Fgithub.com\u002Fmostlydev","Husband, father, runner, biker, full stack dev.","2026-11-12 09:12:16",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add mostlydev\u002Fclawdapus --skill clawdapus-cli",{"tool":55,"command":56},"bunx","bunx skills add mostlydev\u002Fclawdapus --skill clawdapus-cli",{"tool":58,"command":59},"pnpm","pnpm dlx skills add mostlydev\u002Fclawdapus --skill clawdapus-cli","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmostlydev\u002Fclawdapus\u002Fblob\u002Fmaster\u002Fskills\u002Fclawdapus\u002FSKILL.md",true,[],[64,88,93,98],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":36},"01M6CHTRVNMS32Y8T3BAJJWJW0","clawdapus-release","Automates cutting a Clawdapus release: runs pre-release checks, coordinates with cllama submodule releases if needed, determines the next semver version, backfills any missing changelog entries, sweeps docs (CLI reference, README, manifesto) for updates tied to the release, prepares release notes in the site changelog, pushes the release-prep commit to master, prepublishes the pinned infra image refs the release workflow verifies, then tags and publishes the release. Only after publication and verification does it promote the site nav dropdown and Latest badge. Use this skill whenever the user says \"release\", \"cut a release\", \"new version\", \"update the changelog and tag\", \"prepare a release\", or anything about shipping a new version of the claw CLI.","https:\u002F\u002Fgithub.com\u002Fmostlydev\u002Fclawdapus\u002Fblob\u002Fmaster\u002Fskills\u002Frelease\u002FSKILL.md",[],[71,72,73,23,74,75,25,76,77,78,79,80,81,82,83,20,84,85,86,87],"clawdapus release","release","README","only","release notes","workflow","image","version","commit","notes","verification","changelog","shipping","releases","update","promote","infra",{"skillNo":89,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":36},"01M6CHTJD42EA04MTPMBQ4Y1KW","https:\u002F\u002Fgithub.com\u002Fmostlydev\u002Fclawdapus\u002Fblob\u002Fmaster\u002Fcmd\u002Fclaw\u002Fskill_data\u002FSKILL.md",[],[20,19,27,35,34,33,32,31,30,29,28,26,25,24,23,22,21],{"skillNo":94,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":36},"01M6CHTG6S1AV0B5087N60V5GJ","https:\u002F\u002Fgithub.com\u002Fmostlydev\u002Fclawdapus\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fclawdapus-release\u002FSKILL.md",[],[71,72],{"skillNo":99,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":36},"01M6CHTEQ89FE6WXCCJ22ZJXMP","https:\u002F\u002Fgithub.com\u002Fmostlydev\u002Fclawdapus\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fclawdapus-cli\u002FSKILL.md",[],[20,19]]