37 KiB
Task Plan
Operator Runtime Gateway Contract 2026-05-17
- Add formal OpenClaw protocol schemas/types for
provider.status,provider.help, andprovider.dashboard. - Register provider schemas in the protocol schema registry and add representative contract validation tests.
- Add typed provider helpers in OpenClaw gateway client/call wrappers with method-name mapping tests.
- Update
clawdgateway bridge helpers to queryprovider.statusandprovider.dashboarddirectly. - Update provider lifecycle, readiness,
clawd provider, andclawd dashboardaggregation to prefer gateway provider contracts while retaining existing fallbacks. - Keep JSON output backward-compatible and add gateway source/phase/evidence fields when provider gateway data is available.
- Run focused OpenClaw, clawd, Go module, and whitespace verification commands.
Review
- Added provider protocol schemas and static TypeScript aliases for
provider.status,provider.help, andprovider.dashboard. - Registered the provider schemas in
ProtocolSchemasand added representative validation payloads toprotocol-contract-registry.test.ts. - Added typed OpenClaw
GatewayClient.provider.*andcallGatewayProvider.*helpers with exact method-name mapping tests. - Added
clawdbridge helpers forprovider.statusandprovider.dashboard. - Updated
clawdprovider lifecycle/readiness to prefer provider gateway contracts, with existingchain.*,runtime.status, REST, and local fallbacks retained. - Added gateway source/current phase/evidence fields to
clawd provider --out jsonandclawd dashboard --json, plus concise pretty-output source/phase lines. - Verification passed:
cd openclaw && npm test -- --run src/gateway/server-methods/provider-lifecycle.test.ts src/gateway/server-methods/provider-dashboard.test.ts src/gateway/protocol/schema/protocol-contract-registry.test.ts src/gateway/call.test.ts src/gateway/client.test.ts(46/46 tests)cd cmd/clawd && npm test -- --run src/commands/__tests__/dashboard.test.ts src/commands/__tests__/provider.test.ts src/commands/__tests__/readiness.test.ts src/lib/provider-lifecycle.test.ts src/lib/readiness.test.ts(26/26 tests)go test -timeout 10m ./x/agent/... ./x/marketplace/... ./x/modelregistry/... ./x/privacy/... ./x/reputation/...git diff --check
README Funding and Vendor Flattening 2026-05-17
- Add the project funding Solana wallet to
readme.md. - Expand
readme.mdwith a clearer OpenClaw-style project overview, quick start, security, and docs structure. - Convert existing gitlink/submodule directories, including
wagmi, into normal project directories. - Convert
third_party/clawchain-forks/clones into normal project directories so they do not become nested Git repositories. - Verify no targeted directories remain as gitlinks or nested Git repositories.
- Add current status notes to
prd.mdand the March superpowers design/plan docs.
Review
- Existing submodule/gitlink directories were flattened in commit
37a813f9; VS Code should no longer show those folders as deleted after refreshing Git status. - Added the ClawChain logo to
readme.mdviadocs/static/clawchain-logo.png. - Added the project Solana funding wallet to
readme.md:A4QepUcLpwqZMsxu72FLsLDs5rLNThW7RHLXJWoLDm7r. - Expanded
readme.mdwith OpenClaw-style centered intro links and a protocol stack covering A2A, OpenACP, OpenClaw, mem0, Beads, OpenZiti, Context7, agentgateway, and x402-style experiments. - Replaced stale submodule clone instructions with normal
git cloneguidance. - Added a May 17, 2026 repository-packaging and funding update to
prd.md. - Added May 17, 2026 status amendments to the March 16 and March 21 superpowers specs/plans so stale unchecked work is marked historical or superseded.
- Verified Markdown whitespace with
git diff --checkacross the touched docs.
ClawChain Fork and Clone 2026-05-17
- Confirm the ClawChain fork set from the user-provided list and avoid unrelated workspace changes.
- Create a dedicated clone directory at
third_party/clawchain-forks/. - Fork the selected upstream repositories with GitHub CLI.
- Clone each fork locally under
third_party/clawchain-forks/. - Verify each clone has a usable
originremote and document results.
Review
- Forked or confirmed existing forks under
caelum0xfor 17 concrete repositories:a2a-js,A2A,OpenACP,openclaw,mem0,beads,ziti,context7,agentgateway,x402,x402-gated-api,hyper402,nofx,agents,uniswap-ai,solana-agent-kit, andz402. - Resolved ambiguous list entries as
Jnix2007/hyper402,sendaifun/solana-agent-kit, andchickstudi0/z402; treatedflash-loan / trading reposas a risk category because no exact repository was provided. - Cloned every fork into
third_party/clawchain-forks/. - Added
upstreamremotes for all clones so each fork can sync from its source repository. - Verified all 17 clones have
originpointing athttps://github.com/caelum0x/<repo>.gitandupstreampointing at the selected source repo. - The first clone attempt hit sandbox DNS restrictions; the escalated retry completed successfully.
README Professionalization 2026-05-15
- Review the current public README and repo structure.
- Rewrite
readme.mdas a professional blockchain project README. - Verify Markdown/link-sensitive formatting.
- Commit and push the README update.
Review
- Current README has useful technical coverage, but the tone and structure are closer to an internal implementation summary than a public blockchain repository introduction.
- Rewrote the README around product overview, technology stack, repository layout, chain modules, quick start, operator workflow, SDK, dashboard, GPU providers, validation, security, and documentation.
- Verified referenced local documentation files exist and
git diff --check -- readme.md tasks/todo.mdpassed. - Committed and pushed the README update as
e14881aonmain.
GitHub Publish 2026-05-15
- Inspect repository state, branch, and existing remotes before pushing.
- Check untracked files for obvious secret-bearing artifacts that would be included by
git add -A. - Add ignore rules for local validator keys, node keys, local e2e key material, and Kubernetes secret manifests.
- Stage all safe tracked and untracked repository changes.
- Exclude generated local chain database state from the staged publish set.
- Record embedded Git repositories as explicit submodules instead of anonymous gitlinks.
- Commit the staged changes.
- Configure
originashttps://github.com/caelum0x/clawchain.git. - Push
mainto GitHub.
Review
-
Repository was already initialized on branch
main; nogit initneeded. -
No remote was configured before this publish attempt.
-
A raw
git add -Awould include local private validator/node keys and secret manifests, so those paths are ignored before staging. -
Staging showed generated local chain data under
testnet/data/; this should stay local and out of the public source repository. -
Embedded repositories are retained as submodules with their origin URLs in
.gitmodules. -
Local publish commit created as
2e4f5e5before the first push retry. -
First push attempt failed with HTTP 408 before the remote
mainref was created. -
Amended publish commit
26c6b97was pushed tohttps://github.com/caelum0x/clawchain.giton branchmain. -
Verified remote
refs/heads/mainmatched local26c6b976737c29ce5733354dd2c42cdf1be1b5e7after the push. -
Correct scope: target the full
openclaw/project, not onlyextensions/clawchain/. -
Inspect current
openclaw/changes and identify which parts already extend gateway/runtime/core surfaces. -
Build a repo-level implementation plan based on actual integration points.
-
Wire chain gateway handlers into the central gateway handler registry.
-
Add chain methods to the public gateway method list and authorization scopes.
-
Extend focused tests for newly exposed chain wallet and chain agent methods.
-
Run focused gateway tests to verify dispatch, contracts, and handler behavior.
-
Expose the shared provider lifecycle contract through a dedicated machine-facing
clawd provider statuscommand. -
Restore a clean
cmd/clawdTypeScript baseline for the gateway/provider integration work. -
Expose the shared provider lifecycle through the
clawd dashboardpretty and JSON surfaces.
Review
- Scope correction captured from user feedback on 2026-03-08.
- Current ClawChain work already spans
openclaw/src/gateway/server-methods/and is not limited toextensions/clawchain/. chain-agents.tsandchain-wallet.tsexist as gateway handlers, butopenclaw/src/gateway/server-methods.tscurrently mounts onlychain-status.openclaw/src/gateway/server-methods-list.tsand gateway authorization sets currently expose onlychain.statusandruntime.status;chain.wallet.*andchain.agents.*are missing from the formal gateway surface.- Protocol schemas currently cover chain status/runtime status only; there is no equivalent formal contract coverage yet for the new wallet/agent gateway methods.
- Integrated
chain.agents.*andchain.wallet.*into the main gateway dispatcher and public method list. - Added gateway-level dispatch/auth coverage in
openclaw/src/gateway/server-methods/chain-gateway.integration.test.ts. - Updated fetch mocking in
openclaw/src/gateway/server-methods/chain-agents.test.tsso focused handler tests reliably stub LCD requests in the current Vitest environment. - Verified with
pnpm exec vitest run src/gateway/server-methods/chain-agents.test.ts src/gateway/server-methods/chain-status.test.ts src/gateway/server-methods/chain-gateway.integration.test.tsfromopenclaw/with 26/26 tests passing. - Added formal protocol schemas for
chain.agents.*andchain.wallet.*params/results inopenclaw/src/gateway/protocol/schema/chain.ts. - Registered the new chain schemas in
openclaw/src/gateway/protocol/schema/protocol-schemas.tsand exported their static types fromopenclaw/src/gateway/protocol/schema/types.ts. - Extended
openclaw/src/gateway/protocol/schema/protocol-contract-registry.test.tsto assert registry exposure and representative payload validation for the new chain contracts. - Verified with
pnpm exec vitest run src/gateway/protocol/schema/protocol-contract-registry.test.ts src/gateway/server-methods/chain-agents.test.ts src/gateway/server-methods/chain-status.test.ts src/gateway/server-methods/chain-gateway.integration.test.tsfromopenclaw/with 28/28 tests passing. - Added WebSocket contract coverage for the non-status chain gateway surface in
openclaw/src/gateway/server-methods/chain-methods.ws-contract.test.ts. - Verified advertised method exposure and schema-valid dispatch for representative
chain.agents.*andchain.wallet.*requests throughhandleGatewayRequest. - Verified with
pnpm exec vitest run src/gateway/protocol/schema/protocol-contract-registry.test.ts src/gateway/server-methods/chain-status.ws-contract.test.ts src/gateway/server-methods/chain-methods.ws-contract.test.tsfromopenclaw/with 7/7 tests passing. - Added typed client-side chain helpers on
openclaw/src/gateway/client.tsforchain.status,runtime.status,chain.agents.*, andchain.wallet.*, all backed by the existingrequest()transport. - Added focused wrapper coverage in
openclaw/src/gateway/client.test.tsto assert each helper maps to the correct gateway method name and params payload. - Verified with
pnpm exec vitest run src/gateway/client.test.ts src/gateway/server-methods/chain-gateway.integration.test.ts src/gateway/server-methods/chain-methods.ws-contract.test.ts src/gateway/protocol/schema/protocol-contract-registry.test.tsfromopenclaw/with 12/12 tests passing. - Added typed one-shot chain call wrappers in
openclaw/src/gateway/call.tsviacallGatewayChain, coveringchain.status,runtime.status,chain.agents.*, andchain.wallet.*. - Extended
openclaw/src/gateway/call.test.tsso the wrapper layer is verified against the exact underlying gateway method names and params payloads. - Verified with
pnpm exec vitest run src/gateway/call.test.ts src/gateway/client.test.ts src/gateway/server-methods/chain-gateway.integration.test.ts src/gateway/server-methods/chain-methods.ws-contract.test.ts src/gateway/protocol/schema/protocol-contract-registry.test.tsfromopenclaw/with 34/34 tests passing.
OpenClaw -> clawd Analysis
openclaw/is still structurally an upstream personal-assistant runtime: branding, onboarding, docs, command examples, and state-directory defaults are centered onopenclaw, not theclawdoperator product.clawdalready acts as the real product orchestrator:cmd/clawd/src/commands/up.tsowns init/join/start/readiness, andopenclaw/src/cli/up-cli.tsdelegates back toclawd up.cmd/clawd/src/commands/start.tsproductizes OpenClaw mainly by env injection (BLOCKCHAIN_*) plus sidecars (faucet, messaging, autonomous loop, task recovery), but it still launches a genericopenclaw gateway runprocess rather than a dedicated ClawChain runtime profile.- The strongest current integration seam is the gateway contract surface in
openclaw/src/gateway/; chain status/wallet/agent methods now exist and are typed end to end, which is the right foundation for moving operator UX out of ad hoc REST fetches. - The highest-value remaining work is not “add OpenClaw,” but “replace generic OpenClaw product assumptions with ClawChain operator assumptions” in startup, profile/config generation, readiness/doctor, and selected user-facing workflows.
Recommended Next Development Order
-
- Runtime profile ownership: make
clawdgenerate/manage a dedicated OpenClaw runtime profile/state layout instead of relying on genericopenclawdefaults and upstream copy.
- Runtime profile ownership: make
-
- Product-specific gateway API adoption: migrate
clawdreadiness/status/doctor/dashboard codepaths to consume the typed gateway chain methods where possible, reducing split-brain logic between direct REST probing and gateway state.
- Product-specific gateway API adoption: migrate
-
- Branding and operator UX: replace upstream
openclaw-specific help text, docs links, state-dir assumptions, and onboarding wording in the delegatedclawdpath.
- Branding and operator UX: replace upstream
-
- Autonomous operator flow hardening: connect the autonomous loop, task recovery, skill execution mapping, and agent bootstrap into one observable runtime contract with evidence in
doctor/readiness.
- Autonomous operator flow hardening: connect the autonomous loop, task recovery, skill execution mapping, and agent bootstrap into one observable runtime contract with evidence in
-
- Real caller migration: update one or two actual CLI/TUI/operator flows to use the new typed gateway client and
callGatewayChainwrappers so the new surface is exercised in production code paths.
- Real caller migration: update one or two actual CLI/TUI/operator flows to use the new typed gateway client and
First Productization Step Completed
clawd startnow takes ownership of the OpenClaw runtime profile and mutable state dir by exportingOPENCLAW_PROFILE,OPENCLAW_STATE_DIR, andOPENCLAW_HOMEfromcmd/clawd/src/commands/start.ts.- The owned runtime location is defined centrally in
cmd/clawd/src/lib/paths.tsunder~/.clawd/openclawby default, instead of implicitly falling back to upstream~/.openclaw. - SOUL/workspace bootstrap in
cmd/clawd/src/commands/start.tsnow uses the same clawd-owned OpenClaw state location for consistency. - Verified with
pnpm exec vitest run src/commands/__tests__/start.test.tsfromcmd/clawd/with 5/5 tests passing.
Gateway Contract Adoption Step Completed
- Added
cmd/clawd/src/lib/openclaw-gateway.tsas a pragmatic bridge that queriesopenclaw gateway call runtime.status --json, givingclawdaccess to the gateway runtime contract without re-implementing auth/WS transport. cmd/clawd/src/commands/status.tsnow prefers gatewayruntime.statusfor runtime/operator visibility and falls back to legacy HTTP probing only when the gateway RPC bridge is unavailable.cmd/clawd/src/commands/doctor.tsnow prefers gatewayruntime.statusfor the Gateway check, which reduces split-brain diagnostics between direct HTTP health checks and the gateway’s own readiness model.- Added/updated focused coverage in
cmd/clawd/src/commands/__tests__/status.test.tsandcmd/clawd/src/commands/__tests__/doctor.test.tsfor the runtime-status path. - Verified with
pnpm exec vitest run src/commands/__tests__/status.test.ts src/commands/__tests__/doctor.test.ts src/commands/__tests__/start.test.tsfromcmd/clawd/with 20/20 tests passing.
Ecosystem Plan
Product Thesis
openclawis the user-facing runtime people install first, locally or on a server.clawdis the operator/product shell that turns anopenclawinstall into a ClawChain node provider.- ClawChain is the economic/network substrate where those operators register, discover work, execute tasks, and earn.
- The simple user story is: install OpenClaw, connect your channels/models/devices, opt into ClawChain provider mode, then earn through uptime, tasks, skills, compute, and staking.
Product Architecture
- Distribution layer:
openclawremains the easiest install surface and daily runtime. - Operator layer:
clawdowns bootstrap, node lifecycle, readiness, diagnostics, chain CLI, and provider economics. - Runtime layer:
openclawgateway + agent runtime + channel integrations + device apps. - Network layer: ClawChain modules (
x/agent,x/marketplace,x/reputation,x/privacy,x/messaging,x/modelregistry,x/governance). - Ecosystem layer: web dashboard, wallets, SDK, GPU providers, model hosts, skills marketplace, nodecards/manifests.
Core User Journeys
- Personal assistant only:
Install
openclaw, run locally, use channels/tools/models, no chain participation required. - Operator/provider:
Install
openclaw, runclawd up, automatically provision chain identity + runtime profile + provider services, register on-chain, become discoverable, start heartbeating and earning. - Remote/server operator:
Install
openclawon VPS/mac mini/home server, expose gateway safely, runclawd up --require-ready, monitor viaclawd status/readiness/doctor/dashboard. - Advanced provider: Add GPU/model hosting/skills, publish marketplace inventory, run autonomous task loop, earn from multiple revenue streams.
Program Structure
-
Track A: Unified install and onboarding Goal: one coherent install story where
openclawonboarding can graduate a user intoclawdprovider mode. Deliverables:openclawonboarding copy/flows for ClawChain provider opt-inclawd upfirst-run bootstrap with owned runtime profile/state provider-mode config templates and operator docs -
Track B: Runtime specialization Goal: make
openclawrun in a ClawChain-native operator profile instead of as a generic personal assistant. Deliverables: clawd-owned OpenClaw profile/state/config ClawChain-specific gateway/runtime defaults unified branding/help/docs in delegatedopenclaw -> clawdflows -
Track C: Gateway contract as system boundary Goal: use the
openclawgateway as the canonical runtime control plane forclawd, web, apps, and operators. Deliverables: typedchain.*gateway methodsclawdadoption of gateway runtime/chain contracts in status/readiness/doctor/dashboard stable protocol docs and compatibility policy -
Track D: Provider economics and automation Goal: convert a running OpenClaw node into an economically useful chain participant. Deliverables: auto register + heartbeat + recovery autonomous task accept/complete loop skill execution mapping and profitability policy marketplace/GPU/model-hosting hooks
-
Track E: Operator trust and reliability Goal: make provider mode safe enough for real operators. Deliverables: readiness gates, doctor remediation, incident mode, recovery logs runtime evidence and auditability reproducible local/VPS/mac mini deployment profiles
-
Track F: Ecosystem surfaces Goal: make the broader ClawChain ecosystem visible and usable around the runtime. Deliverables: web dashboard tied to runtime and chain state wallet integration SDK examples nodecard/manifest/discovery flows
Recommended Build Order
- Phase 1: Identity and ownership
Make
clawdown OpenClaw profile/state/config/layout everywhere. - Phase 2: Operator truth model
Migrate
clawdstatus/readiness/doctor/dashboard to gateway runtime + chain contracts. - Phase 3: Onboarding convergence
Add provider-mode onboarding from
openclawintoclawd up. - Phase 4: Autonomous provider loop Harden task recovery, auto-register, auto-heartbeat, auto-accept/complete, skill execution, profitability controls.
- Phase 5: Marketplace/provider monetization Tie skills, GPU, model hosting, and reputation into one operator flow.
- Phase 6: Ecosystem polish Web/wallet/docs/operator guides/release packaging around the unified story.
Near-Term Execution Plan
-
- Finish gateway-contract adoption inside
clawdMigratereadiness.tsand thendashboard.tsto gateway runtime/chain contracts.
- Finish gateway-contract adoption inside
-
- Define provider-mode OpenClaw config generation
Have
clawd upmaterialize a dedicated OpenClaw config/profile with ClawChain defaults.
- Define provider-mode OpenClaw config generation
Have
-
- Replace upstream-facing UX in delegated flows
Remove generic OpenClaw docs/help assumptions from
clawd-owned operator paths.
- Replace upstream-facing UX in delegated flows
Remove generic OpenClaw docs/help assumptions from
-
- Build provider onboarding path Add an explicit “become a node provider” flow from the OpenClaw side.
-
- Exercise real callers Move selected CLI/TUI/web codepaths onto the typed chain gateway wrappers already added.
Execution Roadmap
P0 Foundation: Product Boundary and Runtime Ownership
- Goal:
Make
clawdthe clear operator shell and makeopenclawthe installable runtime inside the ClawChain ecosystem. - Repos:
openclaw/,cmd/clawd/,sdk/, top-level docs/release scripts. - Deliverables:
clawd-owned OpenClaw profile, state, and config generation everywhere delegatedopenclawflows that point to provider activation throughclawdcanonical gateway contract for runtime and chain control paths one install story in docs and packaging - Exit criteria:
a user can install
openclaw, then activate provider mode without manually wiring state dirs, env vars, or chain endpointsclawd status,doctor, andreadinessreport against the same runtime truth source docs describe one coherentInstall -> Run -> Earnstory - Dependencies:
existing gateway work in
openclaw/src/gateway/currentclawd start/up/status/doctor/readinesscommand surfaces - Risks:
split-brain state between generic OpenClaw defaults and
clawd-owned config duplicated health logic across direct HTTP and gateway RPC
P1 Provider Activation: Install to Registered Node Provider
- Goal: Turn provider activation into a reliable first-run flow instead of a collection of operator steps.
- Repos:
cmd/clawd/,openclaw/,cosmos-sdk/,sdk/. - Deliverables:
clawd upbootstrap that creates identity, wallet linkage, OpenClaw provider profile, and on-chain agent/provider registration automatic heartbeat/liveness wiring againstx/agentremediation paths for missing funds, unreachable RPC, invalid config, and partial setup provider-mode onboarding entry points insideopenclaw - Exit criteria: a fresh machine can move from install to registered provider with one primary command partial failures are resumable rather than requiring manual cleanup provider state is inspectable through CLI and gateway methods
- Dependencies:
gateway chain methods
chain registration/heartbeat semantics in
x/agentwallet/key management conventions - Risks: brittle first-run bootstrap unclear separation between local-only users and provider-mode users
P2 Earnings Loop: Autonomous Work, Rewards, and Recovery
- Goal: Make a running provider economically useful without constant operator intervention.
- Repos:
cmd/clawd/,openclaw/extensions/clawchain/,sdk/,cosmos-sdk/x/agent,cosmos-sdk/x/reputation. - Deliverables: autonomous task discovery, accept, execute, and completion loop reward visibility for mining, task income, and staking profitability controls, wallet guardrails, and task checkpoint recovery runtime evidence for completed work, uptime, and failures
- Exit criteria: providers can leave the node running and reliably participate in tasks operator can see why income was or was not earned crash/restart paths recover active work safely
- Dependencies: provider activation flow gateway and extension task APIs reputation and reward accounting from chain modules
- Risks: unsafe autonomous spend behavior hidden failure modes in task execution and recovery
P3 Supply-Side Expansion: Skills, GPU, and Model Hosting
- Goal: Expand provider revenue beyond basic task execution into marketplace inventory.
- Repos:
openclaw/,dantegpu-core/,sdk/,cosmos-sdk/x/marketplace,cosmos-sdk/x/modelregistry,web/. - Deliverables: skill publishing and pricing flows GPU provider registration and lease visibility tied to chain identity model-host registration and paid access flows unified provider inventory view across tasks, skills, GPU, and models
- Exit criteria: one provider identity can expose multiple earning surfaces marketplace inventory is visible on-chain and in operator tools operators can understand utilization and revenue by surface
- Dependencies: working provider identity and gateway/runtime control plane marketplace and model registry module maturity DanteGPU payment and provider integration points
- Risks: fragmented operator UX across multiple monetization systems off-chain/on-chain state drift for GPU and hosted models
P4 Ecosystem Surfaces: Dashboard, Wallets, SDK, Discovery
- Goal: Make the broader ecosystem usable for operators, developers, and buyers.
- Repos:
web/,sdk/,keplr-wallet/,claw-wallet-mobile/,keplr-chain-registry/,openclaw/. - Deliverables: dashboard for runtime health, provider status, tasks, rewards, and inventory wallet flows for provider identity, rewards, staking, and marketplace payments SDK examples for provider automation and third-party integrations provider/nodecard/discovery flows for finding agents and capabilities
- Exit criteria: operator can manage the business from web + wallet + CLI without raw chain tooling developers can integrate through stable SDK and gateway contracts discovery surfaces expose trustworthy provider metadata
- Dependencies:
stable provider and earnings loop
typed contracts already established in
openclawchain registry and wallet support for target networks - Risks: UI surfaces diverge from actual gateway/runtime truth SDK examples fall behind protocol changes
P5 Mainnet-Grade Operations: Trust, Safety, and Release Discipline
- Goal: Make the ecosystem safe and operable at real network scale.
- Repos:
cmd/clawd/,openclaw/,testnet/,cosmos-sdk/, CI/release tooling, infra docs. - Deliverables:
release channels and compatibility rules between
openclaw,clawd, SDK, and chain versions incident-orienteddoctorand recovery tooling observability pack for local, VPS, and validator deployments testnet/mainnet deployment guides and upgrade playbooks - Exit criteria: operators can upgrade and recover without guesswork compatibility expectations are explicit across the stack testnet reproduces the real provider lifecycle closely enough to catch regressions early
- Dependencies:
all earlier phases
monitoring/alerting baseline in
testnet/ - Risks: version skew across runtime, CLI, SDK, and chain operational burden too high for small operators
Cross-Repo Ownership Map
openclaw/install surface, runtime UX, gateway control plane, skills/tools, provider-mode entry pointscmd/clawd/bootstrap, lifecycle, diagnostics, readiness, operator automation, owned runtime profilecosmos-sdk/provider economics, registration, tasks, reputation, marketplace, model hosting, governancesdk/typed client/agent integration layer shared by runtime, web, and third-party developersweb/operator dashboard and ecosystem visibilitydantegpu-core/GPU monetization path and off-chain provider serviceskeplr-wallet/,claw-wallet-mobile/identity, rewards, payments, staking, consumer/operator wallet UX
Recommended Sequencing for Active Development
-
- Finish P0
Complete
clawdadoption of gateway truth inreadinessand any remaining diagnostics/dashboard surfaces.
- Finish P0
Complete
-
- Start P1 immediately after P0
Make provider activation resumable and explicit from both
clawd upand OpenClaw onboarding.
- Start P1 immediately after P0
Make provider activation resumable and explicit from both
-
- Build P2 before expanding surfaces The earning loop must work before investing heavily in dashboard and marketplace polish.
-
- Develop P3 and P4 in parallel once P2 is stable Monetization and ecosystem UX can then share the same provider/runtime contracts.
-
- Treat P5 as continuous hardening Start the compatibility and observability work early, but complete it only after the provider flow is real.
Immediate Next Build Tickets
- Migrate
cmd/clawd/src/lib/readiness.tsonto gateway runtime and chain methods. - Audit
cmd/clawdfor remaining direct REST probes that should be replaced by typed gateway calls. - Define the generated provider-mode OpenClaw config/profile shape that
clawd upmaterializes on first run. - Add an explicit OpenClaw-side provider activation UX that routes users into
clawd up. - Define the minimum provider lifecycle contract for registration, heartbeat, task recovery, and reward visibility.
Roadmap Progress Review
cmd/clawd/src/lib/readiness.tsnow prefersopenclawgateway contracts instead of re-probing everything directly:runtime.statusis now used for gateway availability, messaging readiness, and peer health;chain.agents.infois now used for agent registration and heartbeat presence when available.- The previous direct REST/HTTP checks remain as fallback paths, so readiness still works if the gateway bridge is unavailable during bootstrap or recovery.
- Added focused coverage in
cmd/clawd/src/lib/readiness.test.tsfor both the preferred gateway-contract path and the fallback direct-probe path. - Verified with
pnpm exec vitest run src/lib/readiness.test.ts src/commands/__tests__/readiness.test.ts src/commands/__tests__/status.test.ts src/commands/__tests__/doctor.test.tsfromcmd/clawd/with 25/25 tests passing. - Audited the remaining
cmd/clawdfetch surfaces and split them into two groups: gateway/runtime-control callers that should migrate to typed gateway contracts, and direct chain query surfaces that remain appropriate as raw REST/RPC calls. - Migrated
cmd/clawd/src/commands/agent.tstask lookup to preferchain.agents.tasks, with the old REST task endpoints retained as fallback. - Migrated
cmd/clawd/src/commands/dashboard.tsto preferchain.agents.listfor provider count andruntime.statusfor chain liveness/height fallback, while leaving broader network/economics data on direct REST queries. - Verified with
pnpm exec vitest run src/commands/__tests__/agent.test.ts src/commands/__tests__/dashboard.test.ts src/lib/readiness.test.ts src/commands/__tests__/readiness.test.ts src/commands/__tests__/status.test.ts src/commands/__tests__/doctor.test.tsfromcmd/clawd/with 44/44 tests passing. clawd startnow materializes a provider-mode OpenClaw profile file at the canonical clawd-owned path~/.clawd/openclaw/openclaw.json(or the overriddenOPENCLAW_STATE_DIRequivalent) before launching the gateway.- Added
cmd/clawd/src/lib/openclaw-provider-profile.tsto merge provider-ownedgatewayandblockchaindefaults into any existing OpenClaw config without overwriting unrelated user settings such as channels, auth, or model config. - The generated profile explicitly owns:
gateway.mode=local,gateway.bind=loopback,gateway.reload.mode=hybrid, and theblockchainprovider settings for RPC/REST, denom/prefix/gas price, auto-register, node/faucet/peers, heartbeat, and autonomous-loop defaults. cmd/clawd/src/commands/start.tsnow exportsOPENCLAW_CONFIG_PATHalongside the existing profile/state env vars and logs whether the provider profile was materialized or reused.- Added focused coverage in
cmd/clawd/src/lib/openclaw-provider-profile.test.tsand extendedcmd/clawd/src/commands/__tests__/start.test.tsto verify profile materialization through the launch path. - Fixed the
cmd/clawd/src/commands/start.tscleanup path so shutdown no longer assumes every sidecar mock exposes astop()method, removing the recurring Vitest unhandled-rejection noise. - Verified with
pnpm exec vitest run src/lib/openclaw-provider-profile.test.ts src/commands/__tests__/start.test.ts src/lib/readiness.test.ts src/commands/__tests__/status.test.ts src/commands/__tests__/doctor.test.ts src/commands/__tests__/agent.test.ts src/commands/__tests__/dashboard.test.tsfromcmd/clawd/with 45/45 tests passing. - Added an explicit OpenClaw-side provider activation UX in
openclaw/src/cli/provider-cli.ts:openclaw provider enablenow exists as a dedicated entry point for turning a local OpenClaw runtime into a ClawChain provider. - The new command reuses the same delegated
clawd uppath asopenclaw up, but with clearer provider-mode wording, examples, and help text so users do not need to infer that “up” means “become a provider”. - Registered the new surface in
openclaw/src/cli/program/register.subclis.ts, soproviderappears as a normal top-level OpenClaw command in the lazy subcommand registry. - Added focused coverage in
openclaw/src/cli/provider-cli.test.tsandopenclaw/src/cli/program/register.subclis.provider.test.ts. - Verified with
pnpm exec vitest run src/cli/provider-cli.test.ts src/cli/program/register.subclis.provider.test.tsfromopenclaw/with 4/4 tests passing. - Added
cmd/clawd/src/lib/provider-lifecycle.tsas the shared minimum provider lifecycle contract for the operator surface. - The contract now evaluates and reports four provider-critical dimensions in one place: registration, heartbeat, task recovery, and reward visibility.
- Registration and heartbeat prefer gateway contracts (
chain.agents.info,runtime.status) and fall back to REST only when the gateway path is unavailable. - Task recovery uses the existing local crash-recovery tracker and reconciliation logic (
active_tasks.json+determineRecoveryAction) to surface whether tracked tasks would resume or be cleaned up. - Reward visibility currently combines agent rewards from the chain REST surface with staking rewards from
chain.wallet.staking.rewardswhen available. cmd/clawd/src/commands/status.tsnow prints a dedicatedProvider Lifecyclesection so operators can see the minimum provider contract state in a single command instead of piecing it together acrossagent,staking,readiness, and startup logs.cmd/clawd/src/commands/doctor.tsnow includes the same shared provider lifecycle contract in both JSON and terminal output, sostatusanddoctorno longer describe provider health using different models.- Added focused coverage in
cmd/clawd/src/lib/provider-lifecycle.test.tsand extendedcmd/clawd/src/commands/__tests__/status.test.ts. - Extended
cmd/clawd/src/commands/__tests__/doctor.test.tsto assert the shared provider lifecycle section and JSON field. - Verified with
pnpm exec vitest run src/lib/provider-lifecycle.test.ts src/commands/__tests__/status.test.ts src/commands/__tests__/doctor.test.ts src/lib/readiness.test.ts src/commands/__tests__/agent.test.ts src/commands/__tests__/dashboard.test.ts src/commands/__tests__/start.test.tsfromcmd/clawd/with 46/46 tests passing. - Added a dedicated provider-machine surface in
cmd/clawd/src/commands/provider.ts, exposed asclawd provider status --out pretty|json. - The new command reuses
evaluateProviderLifecycle()directly, so automation and future dashboard/API callers can consume the same provider truth model without scrapingstatusordoctor. - Added focused coverage in
cmd/clawd/src/commands/__tests__/provider.test.tsfor pretty output, JSON output, and degraded/blocker rendering. - Verified with
pnpm exec vitest run src/commands/__tests__/provider.test.ts src/commands/__tests__/status.test.ts src/commands/__tests__/doctor.test.tsfromcmd/clawd/with 20/20 tests passing. - Fixed the pre-existing
cmd/clawdcompile failures around gateway/provider integration by widening overly narrow Vitest mock signatures in the affected tests and correcting boolean narrowing incmd/clawd/src/lib/readiness.ts. - Verified with
pnpm exec vitest run src/commands/__tests__/agent.test.ts src/commands/__tests__/dashboard.test.ts src/commands/__tests__/doctor.test.ts src/commands/__tests__/status.test.ts src/commands/__tests__/start.test.ts src/lib/provider-lifecycle.test.ts src/lib/readiness.test.tsfromcmd/clawd/with 46/46 tests passing. - Verified with
pnpm exec tsc -p tsconfig.json --noEmitfromcmd/clawd/, now passing cleanly. - Extended
cmd/clawd/src/commands/dashboard.tsso the dashboard now includes the shared local provider lifecycle contract in both terminal and JSON output. - Added dashboard coverage for provider lifecycle rendering, JSON exposure, and degraded/blocker display in
cmd/clawd/src/commands/__tests__/dashboard.test.ts. - Verified with
pnpm exec vitest run src/commands/__tests__/dashboard.test.tsfromcmd/clawd/with 11/11 tests passing. - Re-verified with
pnpm exec tsc -p tsconfig.json --noEmitfromcmd/clawd/, still passing cleanly.