Implements P0+P1 of docs/plans/2026-06-01-ai-model-tokens.md — AI models as tradeable, redeemable on-chain tokens, composing existing primitives. clawd 'model-token' command (cmd/clawd/src/commands/model-token.ts, wired in main.ts): - issue: RegisterModel (modelregistry) + create-denom + mint (tokenfactory) in one signed tx -> factory/<issuer>/<modelid>; optional Astroport DEX pair seed (--dex-factory). - redeem: holder self-burns model tokens (MsgBurn) + SubmitInferenceJob in one tx. - inference-setup / start-job / complete-job: provider lifecycle. - serve-once / serve-loop: provider automation (deterministic templates or OpenRouter when OPENROUTER_API_KEY is set). clawd registry now includes osmosis.tokenfactory.v1beta1 codecs (gen-proto.sh + registry.ts) so create-denom/mint/burn are encodable; cosmjs-types added for wasm exec. Chain changes (consensus-verified by live boot + workflow): - x/modelregistry/module: register msg/query services via the app's ServiceRegistrar shape (fixes 'no message handler found for MsgRegisterModel'). - x/tokenfactory: holder self-burn for factory denoms (non-admin holders redeem their own tokens) — admin burn preserved. Verified: clawd build clean + 659 tests pass; go build + modelregistry/tokenfactory tests pass; app construction guard passes; chain rebuilt + boots (4 validators). LIVE on the multi-validator testnet (this binary): full holder-redemption workflow (issue -> set pricing/provider -> transfer to non-admin holder -> holder self-burn + SubmitInferenceJob -> provider start+complete) ended with job_status=completed (scripts/testnet/model-token-holder-redeem.sh). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
62 KiB
Task Plan
AI Model Token Real OpenRouter Models 2026-06-01
- Verify current OpenRouter model IDs for Claude Opus 4.8 and Qwen3.7 Max.
- Add real
clawd model-token catalogpresets foranthropic/claude-opus-4.8andqwen/qwen3.7-max. - Let
clawd model-token issue --preset <id>register modelregistry metadata withopenrouter:<model-id>storage URIs. - Add a reusable testnet workflow that verifies OpenRouter's public model list and issues both real model tokens on-chain.
- Live-verify both real model tokens on a fresh 4-validator local testnet.
Review
- OpenRouter public models endpoint returned both
anthropic/claude-opus-4.8andqwen/qwen3.7-maxas present. - Added
MODEL_TOKEN_PRESETSfor Claude Opus 4.8 and Qwen3.7 Max with real OpenRouter IDs, token symbols, tags, context size, release metadata, and price metadata. - Added
clawd model-token catalogandclawd model-token issue --preset <id>so operators can issue real model-backed tokenfactory denoms without manually copying metadata. - Added
scripts/testnet/model-token-real-models.shto verify OpenRouter's public model list, fund an issuer, issue both presets, and assert modelregistry containsopenrouter:anthropic/claude-opus-4.8andopenrouter:qwen/qwen3.7-max. - Live workflow passed on local 4-validator testnet. Claude denom:
factory/claw15yk64u7zc9g9k2yr2wmzeva5qgwxps6yv9pgpk/claude_opus_4_8; Qwen denom:factory/claw15yk64u7zc9g9k2yr2wmzeva5qgwxps6yv9pgpk/qwen3_7_max. - Live tx evidence: fund
1BE6FDD52191755BEA747118339A9CCBBE6597ED7410C190CB3F5521E9447BD4, Claude issue91F431355034EF63DE51CFA9A65115A3184BE08DA2FE86146A23D7E97E07E733, Qwen issueF168F2398AC3EB58F78F5AE6F8A246ABC2351F7D4FA773F9F236C99F127C4F78. OPENROUTER_API_KEYwas not present locally, so paid completion smoke testing through OpenRouter was skipped; the public model-list verification and on-chain model registrations were completed.
AI Model Token Provider Serve Loop 2026-06-01
- Inspect the current
serve-onceprovider automation and live holder workflow. - Add
clawd model-token serve-loopfor repeated provider job serving. - Support bounded loop controls for workflows/tests and unbounded operator mode for long-running providers.
- Update the holder-redemption workflow to exercise
serve-loop --max-cycles 1. - Verify focused tests, CLI build/help, shell syntax, and live 4-validator workflow.
Review
- Added
runModelTokenServeLoop, reusing the provenserve-oncepath with--interval-msand--max-cycles;--max-cycles 0runs until stopped. - Wired
clawd model-token serve-loopwith the same model/status/output/OpenRouter controls asserve-once, plus loop controls. - Added tests for two bounded loop cycles and invalid loop controls.
- Updated
scripts/testnet/model-token-holder-redeem.shto useserve-loop --max-cycles 1 --interval-ms 0, so the live workflow proves the supervised loop entry point. - Live workflow passed on local 4-validator testnet with model
holder-redeem-1780272590, model ID1, denomfactory/claw15yk64u7zc9g9k2yr2wmzeva5qgwxps6yv9pgpk/holder_redeem_1780272590, job1, and final statuscompleted. - Live tx evidence: issue
783864C479AEA32DDB8DEA7088C0BF6E8AF2FD0833D038E0FC451C2E4B86D91F, setup57C45282EA5AE7E57A31E0BA1466818F1522E623EF52AB7347D6432F9C7DCA9F, transferF1A5BE7DC86E65912FE8D10EB68532A8B9D23F207406182F3B292BBBBEF2E73D, redeem08780A8AB017CC6B7F0581E2F758C366126AD630B7C81A95E9B9460B9F401740, start8EBAC54E6A42B920E26637F9117328FBA1A73DF57827C4452E9084162127D9C3, completeCAB3F55D61C06A7D00A763E1BF10D95F80687206ADAC5154583099E3E90B2F06. - Verified
cd cmd/clawd && npm test -- --run src/commands/__tests__/model-token.test.ts(22 passed / 0 failed),cd cmd/clawd && npm run build,node cmd/clawd/dist/main.js model-token serve-loop --help, andbash -n scripts/testnet/model-token-holder-redeem.sh.
AI Model Token Provider Serve Once 2026-06-01
- Inspect modelregistry inference-job query filters and current
clawdprovider lifecycle commands. - Add
clawd model-token serve-onceto query assigned jobs and automatically start/complete them. - Add optional OpenRouter-backed execution path behind
--openrouter-modelandOPENROUTER_API_KEY. - Update the holder-redemption workflow to use
serve-onceinstead of separate manual start/complete commands. - Verify focused tests, TypeScript build, help output, shell syntax, and live 4-validator workflow.
Review
serve-oncequeries/clawchain/modelregistry/v1/inference/jobs, filters jobs assigned to the provider wallet, and servespending/runningjobs by default.- Pending jobs are started with
MsgStartInferenceJob; pending or running jobs are completed withMsgCompleteInferenceJob. - The command supports
--model-id,--status,--max-jobs,--outputtemplates,--dry-run, JSON output, and--openrouter-modelfor real OpenRouter execution whenOPENROUTER_API_KEYis present. - Updated
scripts/testnet/model-token-holder-redeem.shso the live workflow now proves the automated provider path: holder redeem creates a job, owner/provider runsserve-once, and the final queried job status must becompleted. - Live workflow passed on local 4-validator testnet with model
holder-redeem-1780272325, model ID1, denomfactory/claw15yk64u7zc9g9k2yr2wmzeva5qgwxps6yv9pgpk/holder_redeem_1780272325, job1, and final statuscompleted. - Live tx evidence: issue
C0126559852D43898171AE8636A6293148737CE74244C61B806BA8CB9141E3FE, setup57C45282EA5AE7E57A31E0BA1466818F1522E623EF52AB7347D6432F9C7DCA9F, transferF4DC527CF6AA550CD3E20F9D47B62CCE06179AE0C15B917069BF9536F231ED45, redeem69C0BA484F224721D70B127F214A05B281D392D92E8C6ACEC6F311B80B7DEC25, start8EBAC54E6A42B920E26637F9117328FBA1A73DF57827C4452E9084162127D9C3, completeCAB3F55D61C06A7D00A763E1BF10D95F80687206ADAC5154583099E3E90B2F06. - Verified
cd cmd/clawd && npm test -- --run src/commands/__tests__/model-token.test.ts(20 passed / 0 failed),cd cmd/clawd && npm run build,node cmd/clawd/dist/main.js model-token serve-once --help, andbash -n scripts/testnet/model-token-holder-redeem.sh.
AI Model Token P1 Provider Completion 2026-06-01
- Inspect modelregistry provider job lifecycle message shapes.
- Add
clawd model-token start-jobandclawd model-token complete-job. - Cover provider lifecycle builders, transaction sequencing, JSON output, and explicit fee handling in CLI tests.
- Extend the holder-redemption workflow through provider start/complete and final completed job status.
- Live-verify the completed holder redemption workflow on a fresh 4-validator local testnet.
Review
- Added
/clawchain.modelregistry.v1.MsgStartInferenceJoband/clawchain.modelregistry.v1.MsgCompleteInferenceJobbuilders plus CLI runners. - Provider lifecycle transactions now use an explicit 200,000 gas fee calculated from configured gas price after live acceptance exposed CosmJS auto-gas under-estimation for
start-job. - Extended
scripts/testnet/model-token-holder-redeem.shso the owner/provider starts and completes the holder-created job, queries final job state, and fails unlessjob.status == completed. - Live workflow passed on local 4-validator testnet with model
holder-redeem-1780271955, model ID1, denomfactory/claw15yk64u7zc9g9k2yr2wmzeva5qgwxps6yv9pgpk/holder_redeem_1780271955, holderclaw19rl4cm2hmr8afy4kldpxz3fka4jguq0akhr68a, job1, and final statuscompleted. - Live tx evidence: issue
B7E5BB90EF4929089A8E8DE52F0DF69B682AA2EA9A0913F073D60360E2B6BDD7, setup57C45282EA5AE7E57A31E0BA1466818F1522E623EF52AB7347D6432F9C7DCA9F, transferC778E6A53294EAA04132C499D8F2813C6B68E6BAC908E467451DC595F181FB57, redeem656CA5A305396250D26E0F6BC8804D1BA505526E6BDE09404A81DB3F701E624C, start8EBAC54E6A42B920E26637F9117328FBA1A73DF57827C4452E9084162127D9C3, complete60BA192A1CE5297657BD53B3D999D88C68C16A49FD90786D33C66606A9F8F352. - Verified
cd cmd/clawd && npm test -- --run src/commands/__tests__/model-token.test.ts(18 passed / 0 failed),cd cmd/clawd && npm run build,cd cmd/clawd && npm test(655 passed / 0 failed),go test -count=1 ./x/modelregistry/... ./x/tokenfactory/...,go build -o build/clawchaind ./cmd/clawchaind/,bash -n scripts/testnet/model-token-holder-redeem.sh,node cmd/clawd/dist/main.js model-token start-job --help, andnode cmd/clawd/dist/main.js model-token complete-job --help.
AI Model Token P1 Redeem CLI 2026-06-01
- Inspect modelregistry inference-job and tokenfactory burn message shapes.
- Add
clawd model-token redeemto burn model tokens and submit an inference job. - Add focused tests for redeem message construction, sequencing, JSON output, and validation.
- Verify TypeScript build/tests and update the AI model-token plan with P1 slice status.
- Add tokenfactory holder self-burn support so non-admin holders can redeem their own model tokens.
- Verify tokenfactory holder self-burn with focused Go tests and update docs.
- Add inference setup CLI support for model pricing/provider readiness.
- Add and live-verify a reusable holder-redemption testnet workflow.
Review
MsgSubmitInferenceJobusesrequester,model_id,model_version,input,max_tokens,temperature, andpayment.MsgBurnusessender,amount, andburn_from_address; updated tokenfactory semantics now preserve admin burn behavior while also allowing a holder to burn from their own address.- Added
clawd model-token redeem --model-id <id> --amount <n> --input <prompt>, deriving the model token denom from--model/--symbolor accepting a full--denom. - Added builders for
/osmosis.tokenfactory.v1beta1.MsgBurnand/clawchain.modelregistry.v1.MsgSubmitInferenceJob, then submit them atomically in one signed transaction. - Extended
cmd/clawd/src/commands/__tests__/model-token.test.tsto cover burn/job message shapes, transaction ordering, JSON output, and missing-denom validation. - Verified
cd cmd/clawd && npm test -- --run src/commands/__tests__/model-token.test.ts(12 passed / 0 failed),cd cmd/clawd && npm run build,cd cmd/clawd && npm test(649 passed / 0 failed),cd cmd/clawd && node dist/main.js model-token redeem --help, andgit diff --check. - Updated
x/tokenfactory/keeper.BurnFromwith holder self-burn authorization and kept unauthorized third-party burns rejected. - Added focused keeper tests for non-admin self-burn and unauthorized third-party burn.
- Verified
go test -count=1 ./x/tokenfactory/...,go test -count=1 ./x/modelregistry/... ./x/tokenfactory/..., andgo build -o build/clawchaind ./cmd/clawchaind/. - Added
clawd model-token inference-setup --model-id <id>to setMsgSetInferencePricingand optionally register the owner as an online inference provider withMsgRegisterInferenceProvider. - Added
scripts/testnet/model-token-holder-redeem.sh, a reusable live workflow that funds owner/holder wallets, issues a model token, configures inference, transfers tokens to a non-admin holder, redeems by holder self-burn, and verifies the created inference job. - Live workflow passed on local 4-validator testnet with model
holder-redeem-1780271343, model ID2, denomfactory/claw15yk64u7zc9g9k2yr2wmzeva5qgwxps6yv9pgpk/holder_redeem_1780271343, holderclaw19rl4cm2hmr8afy4kldpxz3fka4jguq0akhr68a, and inference job2. - Live workflow tx evidence: issue
FC8107BE7DB6AD2DAB69A9CD8CD64936BEAFB53907FE5903CEF529BE225A4693, setup55D4DE81D17DB2761D2C830D9AA7CDB9B68CE03BCC991E1B046CF15EC296B417, transferE74D604032A95CA6D2DBC4191ADC5AF6F93BF14494D86E27AD205B2961F707D7, redeem78D810CB44FF1D29AA3C0203D5C2FD8516EAB019487C8E1B6B16BA57E4FDED5A.
AI Model Token P0 CLI 2026-06-01
- Inspect the AI model token, devnet, DEX, explorer, testnet, mainnet, and vendored integration plans.
- Check the current
clawdmodel, DEX, signing registry, and tokenfactory generated-code surfaces. - Add
clawd model-token issueto register a model, create and mint its tokenfactory denom, and optionally seed a DEX pool. - Add focused command/unit coverage for message construction, event extraction, and CLI output.
- Fix live chain/client blockers found during acceptance.
- Verify TypeScript/Go build/tests, live issue/liquidity/swap, and update the plan docs with implementation status.
Review
- Added
cmd/clawd/src/commands/model-token.tswithrunModelTokenIssue, composingMsgRegisterModel,MsgCreateDenom,MsgMint, and optional Astroportcreate_pair/provide_liquidityCosmWasm executes. - Wired the top-level
clawd model-token issuecommand with model metadata, token supply, DEX factory, and initial liquidity options. - Updated
cmd/clawd/src/commands/model.tsto use the shared custom-module signing registry and current modelregistry message shapes for register/inference paths. - Fixed
x/modelregistryservice registration soMsgRegisterModelis actually mounted in the app gRPC message router, and registered all current modelregistry msg types in Amino/interface codec setup. - Extended the shared
clawdregistry with tokenfactory and CosmWasm execute codecs, and moved DEX transaction signing onto that shared registry. - Tightened model-token subdenom normalization to tokenfactory's accepted
[A-Za-z0-9/_]shape. - Added
cmd/clawd/src/commands/__tests__/model-token.test.tscovering subdenom normalization, message construction, event extraction, issue sequencing, optional DEX seeding, JSON output, and validation. - Live-verified on a fresh 4-validator local testnet with deployed DEX contracts: issued
factory/claw1r5v5srda7xfth3hn2s26txvrcrntldju3ufu0h/opus_4_6_live_1780270277, created pairclaw1fzm6gzyccl8jvdv3qq6hp9vs6ylaruervs4m06c7k0ntzn2f8faqmw95md, seeded 10,000uclaw+ 10,000 model token liquidity, and swapped 1,000uclawfor 907 model tokens. - Live tx evidence: issue
B7A03A62DDB1878A1D4539740360390E22FE16C7A72427A6B0D037B30A70038E, pair4ABA3D5728F0433649456C37BA98D5861B206445AFF1E08521C1D22652BAF333, liquidityC5CF37C27635F7E8E58392A46BD9D46082EA3A2571F260D0A6CDCA5DC0392E53, swapDBA0DB4DBAB998524CA2D95779D5BC3EA21DB717F2981D94AEFC36FF99763DCBat height 208 with code 0. - Verified
cd cmd/clawd && npm test -- --run src/commands/__tests__/model-token.test.ts src/lib/registry.test.ts src/commands/__tests__/model.test.ts(25 passed / 0 failed),cd cmd/clawd && npm test(645 passed / 0 failed),cd cmd/clawd && npm run build,go test -count=1 ./x/modelregistry/... ./x/tokenfactory/...,go build -o build/clawchaind ./cmd/clawchaind/, andcd cmd/clawd && node dist/main.js model-token issue --help.
Vendored Integration V1 Events 2026-06-01
- Inspect the existing SDK WebSocket subscription APIs and viem adapter surface.
- Add viem-style event watch methods for transaction and chain events.
- Add focused unit tests and update exports/docs.
- Verify build/tests/whitespace checks.
- Commit the finished local work.
Review
- Added
watchTransactionsandwatchEventtocreateClawViemClient, backed by the existingClawChainClient.subscribeTxandClawChainClient.subscribeEventWebSocket paths. - Exported the new request types from
sdk/src/index.ts. - Added adapter tests for transaction and event subscription mapping, including unsubscribe propagation.
- Updated
sdk/README.mdanddocs/plans/2026-05-31-vendored-integration.mdso the Tendermint event acceptance criterion is no longer stale. - Verified
cd sdk && npm run build,cd sdk && npm test -- --test-reporter=spec dist/viem.test.js(296 passed / 0 failed), andgit diff --check.
Vendored Integration V1 2026-05-31
- Inspect the vendored integration plan, SDK, clawd registry, and package layout.
- Add a first ClawChain-native TypeScript adapter/example slice without modifying vendored upstream internals.
- Verify the slice locally with unit/smoke checks and, if practical, against devnet.
- Update
docs/plans/2026-05-31-vendored-integration.mdfrom plan-only to implemented status. - Commit the finished local work.
Review
- Added
sdk/src/viem.tswithcreateClawViemClient, a viem-style ClawChain adapter that uses Tendermint status, Cosmos bank sends, and CosmWasm smart query/execute instead ofeth_*JSON-RPC. - Exported the adapter and public types from
sdk/src/index.ts. - Added
sdk/examples/viem-adapter.tsand documented the adapter insdk/README.md. - Added
sdk/src/viem.test.tscovering connect/disconnect, chain id, block height, account, balance, bank send, CosmWasm read/write mapping, and transfer amount validation. - Updated
docs/plans/2026-05-31-vendored-integration.mdso Option B is marked selected for V1 and the remaining live-devnet/event/wagmi/alloy work stays explicit. - Verified
cd sdk && npm run build,cd sdk && npm test -- --test-reporter=spec dist/viem.test.js(294 passed / 0 failed), andgit diff --check.
Devnet Optional Completion 2026-05-31
- Inspect current devnet, IBC, Docker, faucet, explorer, and web hooks.
- Add seeded devnet demo state command and make it idempotent enough for repeated local use.
- Add optional 2-chain IBC devnet command path around the existing IBC drivers.
- Expand Docker devnet support toward full-stack parity where the existing services support it.
- Update devnet plan/docs so optional work is no longer stale.
- Verify live behavior where practical, run syntax/config checks, and commit.
Review
- Added
scripts/devnet-seed-demo.shto seed funded demo accounts, a tokenfactory denom, a demo agent, a marketplace skill, privacy shield state, oracle commit-reveal state, andartifacts/devnet/demo-state.json. - Added
scripts/devnet-seed-dex.shand repairedscripts/deploy-dex.shfor current Astroport contracts: native coin registry upload/instantiate, factorycoin_registry_address, post-pair oracle instantiate, fixed-gas devnet deploy, and stdout-safe function returns. - Added
scripts/devnet-ibc.shas the optional two-chain IBC devnet entry point around the existing IBC driver, and madescripts/ibc-two-chain-test.shacceptBINARY/CLAWCHAIN_BIN. - Added
docker-compose.devnet-stack.ymlto override the root full stack withclawchain-devnet, devnet-fast chain params, faucet mnemonic recovery, and browser-local web/explorer/DEX endpoints. - Updated
scripts/docker-entrypoint.shso Docker devnet can fund a supplied faucet mnemonic and generate fast devnet/privacy settings at genesis. - Added Makefile targets
devnet-seed-demo,devnet-ibc,devnet-stack-up, anddevnet-stack-down. - Ignored generated local
artifacts/devnet/andartifacts/ibc-test/outputs because they are environment-specific and may contain local validator key material. - Verified seeded demo state on a running devnet: 9 passed / 0 failed.
- Verified DEX fixture on a running devnet: code upload, coin registry, factory, router, CLAW/ATOM pair, and oracle deployment completed.
- Verified optional two-chain IBC devnet: 6 passed / 0 failed in manual relayer mode.
- Verified shell syntax, Makefile dry-runs, devnet stack compose config, and whitespace checks.
Devnet Docker/CI Completion 2026-05-31
- Inspect Docker compose, CI, Makefile, and existing devnet scripts for integration points.
- Add a CI-style devnet gate that resets, boots, smokes, and tears down the devnet.
- Add a Docker compose devnet profile that runs the same gate in a disposable tool container.
- Add GitHub Actions devnet smoke workflow.
- Update Makefile targets and the devnet launch plan so completed Docker/CI work is no longer listed as active.
- Run syntax/config/live verification and commit changes.
Review
- Added
scripts/devnet-ci.shas the reusable host/CI gate aroundscripts/devnet-reset.sh,scripts/local-dev.sh --devnet, andscripts/devnet-smoke.sh. - Added
docker-compose.devnet.ymlwith adevnetprofile that runs the same gate inside a disposable Node 22/Debian tool container with Go, make, gcc, git, curl, jq, and cached Go/npm directories. - Added
.github/workflows/devnet-smoke.ymlto run the ephemeral devnet smoke onmainpushes and pull requests. - Added Makefile targets
devnet-cianddevnet-compose. - Verified the live host gate with 7 passed / 0 failed and validated compose config plus Makefile dry-runs.
- Remaining devnet work is optional seeded demo state, optional 2-chain IBC devnet mode, and expanding Docker from smoke gate to full UI/faucet/explorer stack parity if needed.
Devnet Launch Implementation 2026-05-31
- Inspect existing local dev, Docker compose, live driver, DEX, IBC, and Makefile hooks.
- Add
scripts/local-dev.sh --devnetwith isolated.devnet-node/state andclawchain-devnetchain ID. - Add devnet reset and smoke commands.
- Update
docs/plans/2026-05-31-devnet-launch.mdto separate completed local work from optional Docker/CI work. - Run verification and commit changes.
Review
- Existing
scripts/local-dev.shalready builds, initializes, funds a dev key, creates an oracle feeder, configures genesis, generates privacy dev keys, starts the node, and delegates oracle feeder consent. - Missing pieces are devnet-specific chain ID/home isolation, one-command reset, a focused devnet smoke wrapper, Docker profile validation, and CI wiring.
- Added
scripts/local-dev.sh --devnetwithclawchain-devnet,.devnet-node/, fast devnet governance/staking/slashing params, persistent PID file, and indexed feeder-delegation wait. - Added
scripts/devnet-reset.sh,scripts/devnet-smoke.sh, and Makefile targetsdevnet-up,devnet-smoke, anddevnet-reset. - Verified fresh devnet boot plus smoke: 7 passed / 0 failed. Docker profile and CI job remain active follow-up work.
- Final verification passed: shell syntax, Makefile dry-run for devnet targets,
git diff --check, and devnet reset.
Local-Only Public Testnet Readiness 2026-05-31
- Inspect current public testnet scripts/configs to identify what can be completed without VPS or external validators.
- Add a local external-validator genesis ceremony simulation.
- Add a public testnet readiness gate that separates local pass/fail checks from VPS/DNS/people blockers.
- Update
docs/plans/2026-05-31-testnet-launch.mdso completed rehearsal jobs are not listed as active work. - Run syntax/config/gate verification and commit the changes.
Review
- Existing public artifact generation, public env validation, manifest validation, Docker compose stack, nginx static config template, explorer testnet chain config, monitoring configs, and local multinode smoke/upgrade scripts are present.
- Remaining non-local blockers are VPS/host provisioning, public DNS/TLS, external validator/integrator participation, public explorer/faucet/monitoring deployment, public soak, and public upgrade rehearsal.
- Added
scripts/testnet/simulate-genesis-ceremony.sh, which creates 4 isolated validator homes, generates gentxs, and verifies the coordinator collection flow. - Added
scripts/testnet/public-readiness-gate.sh, which reports local pass/fail checks separately from blocked public-infrastructure work. - Rewrote
docs/plans/2026-05-31-testnet-launch.mdso the active checklist contains only remaining public launch tasks. - Verification passed: shell syntax checks, direct ceremony simulation, public readiness gate (13 passed / 0 failed / 8 blocked), and
git diff --check.
Multi-Validator Testnet Upgrade Rehearsal 2026-05-31
- Confirm the full-module multinode smoke is already committed and the worktree is clean.
- Add a safe no-op upgrade handler for local/testnet upgrade rehearsal that does not replay the existing
v2oracle store addition. - Add a governance-driven multinode upgrade rehearsal script.
- Verify the rehearsal on a fresh 4-validator local testnet.
- Document results in the testnet launch plan and commit the changes.
Review
- Current
v2upgrade handler runs normal migrations but also configures an oracle store addition at the upgrade height. That is not safe as a generic rehearsal target for the current local multinode genesis because the oracle store already exists. - Added
testnet-v1-rehearsalas a no-op upgrade handler target for local/testnet rehearsal. - Added
scripts/testnet/rehearse-gov-upgrade.shto submit aMsgSoftwareUpgradeproposal, vote all local validators, wait for passage, and verify post-upgrade blocks. - While verifying,
local-multinode.sh upreached consensus but validator processes exited when the parent shell ended in this non-interactive runner. Updated the launcher to start validators undernohupso the testnet survives afterupreturns. - First same-binary rehearsal attempt halted early with
BINARY UPDATED BEFORE TRIGGER, which is the correct Cosmos SDK guard. Updated the rehearsal to require a pre-upgrade binary for voting/halt and a post-upgrade binary for restart/apply. - Verified with a pre-upgrade binary built from
c6049230and the current post-upgrade binary: proposal1passed, the pre-upgrade binary halted at height 134, the post-upgrade binary appliedtestnet-v1-rehearsalat height 134, and all 4 validators produced post-upgrade blocks (10 passed / 0 failed).
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.