CapabilitySourceprojects what each runtime can do (skills, tools, connectors) asCapabilityRecords. Six sources are registered: one for each of the five real runtimes (the test-onlyclawboo-mockhas none) plus one for Clawboo’s own outbound connectors. The Org chart and the Capabilities panel both read this stream.ScheduleSourceprojects when work fires asScheduleRecords. Three sources are registered: Clawboo Routines, the OpenClaw Gateway’s own cron, and the jobs each Hermes agent keeps in the Hermes gateway Clawboo supervises.
The shared shape
The record and trait packages,
@clawboo/capability-registry and @clawboo/scheduler, are dependency-light and browser-safe, because the dashboard imports the record types to type the REST responses. @clawboo/capability-registry has no runtime dependencies and re-declares the small foreign types it needs (CapabilityAvailability mirrors @clawboo/db’s AvailabilityRequirement). @clawboo/scheduler is the only package that imports croner, and only in occurrence.ts; everything downstream deals in precomputed epoch-millisecond timestamps. The concrete sources live in apps/web/server/lib/capabilitySource/ and apps/web/server/lib/scheduleSource/.
These layers merge and route; they own no canonical rows. The capability projection is persisted to a capabilities table, but only as a cache for when a source is offline; each source’s backing store (the tool broker’s tool_registry, a Hermes profile’s SKILL.md files, the Gateway config) stays canonical. The Routines source reads the scheduled_runs ledger, the Gateway-cron source reads the live Gateway, and the Hermes-jobs source reads each Hermes profile’s jobs from the running Hermes gateway.
Routing by id prefix
The composite id is the routing key.parseCapabilityId and parseScheduleId find the owning source by matching the id against a fixed list of known source ids as a prefix. They do not split on the first colon: a raw key may itself contain colons (brokered ids look like native:tool_registry:echo), and an id whose prefix is not a registered source parses to null, so it routes nowhere instead of to a plausible wrong source.
read() never rejects
A source’s read() returns degradation as a value. Each returns { records, status }, where status is { sourceId, ok, degraded, reason?, at }; a disconnected Gateway returns no records and { ok: false, degraded: true, reason: 'gateway_disconnected' } (the Gateway-cron source serves its last list instead, with reason stale_cache, when it has one). The Hermes-jobs source does the same while the Hermes gateway is not running: its last list with stale_cache, or no records with gateway_stopped. A read never starts that gateway. A source whose system is not set up at all says so with reason not_configured (SCHEDULE_SOURCE_NOT_CONFIGURED), so a reader can tell “not in use” from “unreachable”. The Gateway-cron source and the OpenClaw capability source say not_in_use (SCHEDULE_SOURCE_NOT_IN_USE for schedules; degraded: false for capabilities, so the panel shows no warning) while the server has not connected to a Gateway that is set up, because nothing needs it yet. The multiplexer also wraps every read() in its own try/catch, so even a source that breaks the contract becomes a degraded status entry rather than failing the merge:
sources array and GET /api/capabilities or GET /api/schedules answers 200. (GET /api/capabilities answers 500 only when the server-side merge itself throws, for example on a database error.)
For capabilities, loadCapabilities (capabilitySource/service.ts) goes one step further. It persists each healthy source’s records into the capabilities table (a reconcile scoped to that source) and, for a degraded source, serves that source’s last-good rows. A Gateway that drops for one read still shows its tools, stale but present.
Manageability: the write gate
Clawboo observes every runtime’s capabilities and schedules but manages only what the owning runtime allows. The line is a manageability tier, and the UI and the write path are both a pure function of it: neither may offer an action the owner forbids.ScheduleSource declares manageability per source. Each source is uniformly managed, external-write or observe-only through a readonly manageability field, so the multiplexer can refuse a write before touching the source.
CapabilitySource declares manageability per record, because one source can emit records of mixed tiers (OpenClaw surfaces runtime-of-record tools.* records, observe-only clawboo-* servers and a built-ins record from the same read()). There is no manageability field on the capability trait. The REST layer resolves the target record and rejects observe-only or non-writable records, and each source.write() refuses again.
A record also carries
writable (default true). A source sets writable: false on a record it cannot write yet, such as an OpenClaw MCP server or plugin entry, so the panel renders no dead Enable or Disable button. The writable column is not persisted, so when the REST mapper serves last-good rows for an offline source it re-derives writable from the row’s origin and kind with the same predicate that source’s write() uses.
The six capability sources
Each source projects the sameCapabilityRecord shape. The origin and manageability of its records encode what Clawboo may do with that runtime. They are registered in this order in apps/web/server/lib/capabilitySource/registry.ts:
Three details carry invariants the rest of the system depends on:
- The native source’s curated-skill records carry the agent’s runtime. A curated catalog skill installed on an OpenClaw agent is a Clawboo-managed annotation, so the record’s
runtimeis the agent’s while its manageability staysmanaged. The panel groups it under the agent’s runtime and Clawboo still owns the write. - The OpenClaw source reuses the shared operator connection. It is constructed with
getRegistry().sourceand never opens a second Gateway connection. Aconfig.patchcarries the{ raw, baseHash, replacePaths }envelope the Gateway expects, wherereplacePathsnames every array the patch replaces (OpenClaw 2026.9 refuses a patch that would shorten an undeclared array). - The connector source reads no network. The supervisor already holds every live connection and its tool list, and the Composio app list comes from a cache the connectors shelf refreshes, so a graph rebuild never waits on a remote server.
write() is the only durable managed write, and it reuses the existing pipeline rather than forking it: an install runs evaluateInjection and writes the same skills table the POST /api/skills path writes, with the same appendAudit trail. The payload is scanned as two surfaces. The name and skill content are scanned as prompt (prose bound for an agent’s context); a connector’s command, arguments and environment are scanned as exec (spawn-bound, so every rule that fires blocks).
The two schedule domains
ScheduleRecord.domain separates two kinds of cron, and keeping them apart is the point of this layer:
team-task: Clawboo’s own scheduler for team work, theclawboo-routinesource over thescheduled_runsledger. It is the one external wake for every runtime, whether a Routine posts into a team’s chat or files a task for one agent.runtime-own-life: a runtime’s own scheduler, theopenclaw-gateway-cronsource over the live Gateway and thehermes-gateway-jobssource over the Hermes gateway Clawboo supervises. The Routines view is an operator surface over these jobs, not their owner.
UnknownScheduleError; an observe-only source raises UnsupportedScheduleWriteError; a team-task create aimed at a runtime-own-life source raises TeamTaskDomainViolationError. The Gateway-cron and Hermes-jobs sources also refuse a team-task create themselves, so the domain rule is defended twice and Clawboo never files a team task into a runtime’s own scheduler.
Typed errors
Every scheduling error carries areadonly code so callers branch on structure, never on message text. The REST mapper (mapScheduleError in apps/web/server/api/schedules.ts) turns them into status codes:
The one-firing-owner rule is the scheduler’s version of the board’s atomic claim. A board task carries a
scheduledBy owner; binding a Routine to a task whose scheduledBy is a different owner other than 'manual' is refused at registration with DuplicateFiringOwnerError. Like a lost claim, it is never retried: another engine owns that task’s cadence. A runtime’s own cron is a different domain and never trips the rule.
The capability errors are the smaller mirror: UnknownCapabilityError answers 404, UnsupportedCapabilityWriteError (raised by the shared unsupported() helper every observe-only source’s write() calls) answers 422, and a write that hits a disconnected Gateway answers 503 gateway_disconnected.
How a Routine fire picks its path
The wake bridge (apps/web/server/lib/routines/wakeBridge.ts) turns a Routine fire into real work. It branches first on the Routine’s target. A team Routine posts its instructions into the team’s General chat through the team engine, addressed to the team’s lead. An agent Routine becomes a board task for that agent, and the bridge then branches on the runtime’s integration plan, resolveRuntimeIntegration(caps).home.kind, never on a runtime id:
persistentorephemeralhome (Clawboo Native, Claude Code, Codex, Hermes):runTaskOnRuntime, the same executor runner aPOST /api/runtimes/:id/runuses. That path has budget checks, circuit breakers, a worktree when the task changes files and has a repository path, and the verification gate when that worktree has a diff. A template with norepoPathruns without a worktree (a file-changing kind becomesresearch), so it gets no verification.connectedhome (OpenClaw): a thin dispatcher on the shared Gateway connection (routines/openclawDispatch.ts). It takes a budget hold (refusing a fire on a paused cap or on room other runs hold), claims the task, beats it, records spend, and stops the run on a 10-minute watchdog (CLAWBOO_ROUTINE_OPENCLAW_TIMEOUT_MS). It has no worktree, no verification gate and no circuit breakers; a finished run landsdonewith the comment “Completed without verification” and an unverified audit row.
runtimeClass, so a new connected runtime routes here without the bridge learning its name.
Design rationale
A multiplexer rather than a catalog. Capabilities and schedules are heterogeneous and partial: six capability sources and two cron systems, any of which may be offline. The merged view is the product, so the registry’s job is the merge: collect everyread(), keep failures as status entries, and present one stream. That is what lets the Org chart and the Capabilities panel share one query and makes a degraded source visible but not fatal.
Per-record manageability for capabilities, per-source for schedules. The shape follows the data. Every Routine is managed and every Gateway cron job is external-write, so a per-source gate is honest. A capability source is not uniform, and a per-source tier would either offer to write a built-in or refuse to manage a managed skill. The per-record tier costs the writable re-derivation in the REST mapper but keeps the gate truthful.
Browser-safe record packages. The record types cross the wire to the dashboard, so the packages that define them cannot pull in a Gateway client, a SQLite driver or croner.
Boundaries
- Not stores. The
capabilitiestable is a cache for offline sources; the schedule sources read thescheduled_runsledger and the live Gateway. - No per-runtime special cases. The UI and the write path depend only on
manageabilityandwritable(capabilities) ormanageabilityanddomain(schedules). A new runtime declares its tiers and nothing in the panel or the multiplexer learns its name. - Reserved fields.
CapabilityRecord.tenantIdand the scheduletenantIdare alwaysnull. The'human'capability runtime and the human-participant Routine are typed but not built. - Writes not offered yet. OpenClaw MCP server and plugin toggles are not writable, and Codex capability writes are refused; both show as non-writable or pending-auth rather than as a dead button.
Related
- AgentSource: the agent registry these two mirror
- The executor runner: where an agent Routine fire becomes a run
- Capabilities and Scheduling: the concepts behind these streams
- Adding a runtime: where a new capability source fits
- Schedules API and Capabilities API: the REST surfaces