nickgallick/perlantir-fleet / workspace-clawexpert/skills/openclaw-source-code
openclaw-source-code
UnverifiedDeep knowledge extracted from the OpenClaw source code. Updated by reading the actual repo.
Changelog
- 2026-03-19: Initial extraction from repos/openclaw (v2026.3.14), repos/nemoclaw (v0.1.0), repos/anthropic-sdk-python
OpenClaw Source Code Intelligence
Repo Location
/data/.openclaw/workspace-clawexpert/repos/openclaw
Principle
When answering ANY question about OpenClaw internals, config validity, or behavior:
- First check openclaw-schema-map skill for pre-extracted schema knowledge
- If not found, go read the actual source code in the repo
- After reading source, update this skill so you don't re-read next time
- ALWAYS prefer source code over documentation — source is truth
Key Files
Config Schema (THE MOST IMPORTANT FILE)
- Path:
repos/openclaw/src/config/zod-schema.ts - Exports
OpenClawSchema— every valid config key via.strict() - READ THIS to answer any "is this key valid?" question
- Imports from: zod-schema.agents.ts, zod-schema.core.ts, zod-schema.providers.ts, etc.
Supporting Schema Files
zod-schema.core.ts— SecretInputSchema, ModelsConfigSchema, IdentitySchema, TtsConfigSchemazod-schema.agents.ts— AgentsSchema, BindingsSchema, BroadcastSchemazod-schema.agent-runtime.ts— AgentEntrySchema, HeartbeatSchema, SandboxDockerSchema, ToolsSchemazod-schema.agent-defaults.ts— AgentDefaultsSchemazod-schema.providers.ts— ChannelsSchema (all channel types)zod-schema.hooks.ts— HookMappingSchema, HooksGmailSchemazod-schema.session.ts— CommandsSchema, MessagesSchema, SessionSchema
MCP Handling
- Path:
repos/openclaw/src/config/mcp-config.ts - Path:
repos/openclaw/src/acp/translator.ts(line 407) - MCP capabilities are set to
{ http: false, sse: false }in ACP translator - The
mcpkey IS valid in config — it maps toMcpConfigSchemawithserversrecord - Use
mcp.serversfor stdio MCP servers; mcporter bridge is the recommended pattern
Plugin System
- Path:
repos/openclaw/src/config/zod-schema.ts(PluginEntrySchema) - Plugin entries live at
plugins.entries.<id>with: enabled, hooks, subagent, config - Plugin installs at
plugins.installs.<id> - Plugin slots:
plugins.slots.memory,plugins.slots.contextEngine
Gateway Entry
- Path:
repos/openclaw/src/config/zod-schema.ts(gateway section) gateway.bind: "auto" | "lan" | "loopback" | "custom" | "tailnet"gateway.mode: "local" | "remote"gateway.customBindHost: valid key (contrary to old runbook entries)
NemoClaw Integration
- Mechanism: OpenClaw plugin (not fork/wrapper)
- Plugin ID:
nemoclaw - Plugin JSON:
repos/nemoclaw/nemoclaw/openclaw.plugin.json - Installed via:
curl -fsSL https://www.nvidia.com/nemoclaw.sh | bash - Runs OpenClaw inside OpenShell (k3s sandbox with Landlock + seccomp + network policies)
- Config keys: blueprintVersion, blueprintRegistry, sandboxName, inferenceProvider
Agent Lifecycle (AgentEntrySchema)
Valid keys for each agent in agents.list[]:
id(required),default,name,workspace,agentDirmodel,skills,memorySearch,humanDelay,heartbeatidentity,groupChat,subagents,sandbox,paramstools,runtime- NO
systemPromptkey directly on agent — that comes from workspace SOUL.md/AGENTS.md
Session Management
- Path:
repos/openclaw/src/config/zod-schema.session.ts sessionkey maps to SessionSchemacommandskey maps to CommandsSchemamessageskey maps to MessagesSchema
Version Intel
- Repo HEAD: 2026.3.14 (one patch ahead of our running 2026.3.13)
- NemoClaw: 0.1.0 alpha
- Unreleased:
/btwside-questions command, OpenShell sandbox backend, Firecrawl integration, bundle plugins (Codex/Claude/Cursor), improved gateway health monitor
Critical Discoveries
MCP IS Valid in Config (Correction to old belief)
The mcp key IS in the schema: mcp: McpConfigSchema
const McpConfigSchema = z.object({
servers: z.record(z.string(), McpServerSchema).optional()
}).strict().optional();
mcporter is RECOMMENDED but native stdio MCP via mcp.servers IS supported.
ACP transport capabilities (http/sse) are disabled — that's different from stdio.
customBindHost IS Valid
gateway.customBindHost: z.string().optional() — it IS in the schema.
$schema Key IS Valid
$schema: z.string().optional() — the schema accepts it.
Config .strict() at Root Level
OpenClawSchema uses .strict() — any unknown top-level key crashes the gateway.
Known valid root keys: $schema, meta, env, wizard, diagnostics, logging, cli, update, browser, ui, secrets, auth, acp, models, nodeHost, agents, tools, bindings, broadcast, audio, media, messages, commands, approvals, session, cron, hooks, web, channels, discovery, canvasHost, talk, gateway, memory, mcp, skills, plugins
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |