Repository navigation
Conversation
OpenClaw keeps two storage families apart: a state directory (~/.openclaw, OPENCLAW_STATE_DIR, or a profile variant) and one workspace per agent. The workspace is an agent home rather than a code checkout, so project scope only applies when the requested workspace resolves to a configured agent. The adapter attributes the workspace through agents.defaults.workspace and agents.entries.<agentId>.workspace, keeps an unmatched or unreadable config explicit in diagnostics, and collects workspace skills plus the six instruction files OpenClaw loads at session start. openclaw.json is JSON5, so a comment-laden hand-edited config would have been dropped by a strict JSON reader. A small normalizer in scripts/agent-customize/core/json5.mjs handles comments, trailing commas, bare keys, and single-quoted strings, and every read reports a parse state (json, json5, empty, missing, skipped, invalid) so a config the reader cannot understand is reported instead of being treated as empty. The descriptor claims configured assets and portable HTML rendering only. Live sessions and transcripts stay in per-agent SQLite, which is never decoded here, and `openclaw sessions export-trajectory` mutates the workspace it exports from, so no session-evidence slice ships. Lifecycle targets keep rejecting openclaw, and the matrix, docs site page, zh-Hans mirror, platform note, and CLI help state that boundary. Spec: docs/specs/2026-11-23-openclaw-host-adapter.md (issue QoderAI#114). Test: npm test - 1804 passed, 7 skipped. One unrelated failure remains: the Antigravity artifact build trips over local dependency drift (yaml 2.9.1 declared, 2.9.0 installed). npm run pack:verify passed; the doc-link graph resolves 39 files and 56 links. Co-authored-by: Qoder <noreply@qoder.com>
Windows CI reported the fixture config as unparsed. mkdtemp hands back a C:\Users\... path, and a raw path inside a single-quoted JSON5 string turns \U into an invalid escape, so the whole config was rejected and the four OpenClaw tests that depend on it failed on windows-latest. Escape the embedded paths and pin the escaped Windows path in the JSON5 reader tests so the case runs on every platform. Co-authored-by: Qoder <noreply@qoder.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
better-harness agent-customize inventory --provider openclawnow reads an OpenClaw installation: managed and personal skills, per-agentworkshop-skills,mcp.serversfromopenclaw.json, the agent workspaceskills/and.agents/skills, and the six instruction files OpenClaw loads at session start. OpenClaw joins the host descriptor catalog with configured assets and portable HTML rendering only.Why
Traceability and Scope
scripts/agent-customize/providers/openclaw.mjs(new),scripts/agent-customize/core/json5.mjs(new),scripts/host-support/index.mjs, the provider map and CLI help,references/agent-customize/platforms/openclaw.md(new), and the adapter docs.openclaw sessions export-trajectorywrites into the workspace it exports from), no install shell, no plugin lifecycle profile, no Asset Practices, Checkup, Harness report, or Evidence Bundle claim, and no write, migration, or repair of OpenClaw state.Change Type
Test and Review Evidence
npx vitest run test/agents/agent-customize.test.mjs test/agents/json5-config-reader.test.mjsnpm testnpm run pack:verifynode scripts/doc-link-graph/cli.mjs skills/better-harnessgit diff --checkbetter-harness agent-customize helpopenclawand--openclaw-home/--openclaw-config-pathbetter-harness plugin plan install --host openclawThe one
npm testfailure istest/plugins/antigravity-plugin-artifact.test.mjs(Resolved dependency identity or version does not match source package.json): the local install has yaml 2.9.0 whilepackage.jsondeclares 2.9.1. It fails identically onmainin this checkout and is unrelated to this change.Manual or visual evidence: none. No native OpenClaw install was smoked; the adapter is verified against synthetic fixtures that mirror the documented layout.
Risk and Recovery
node:pathand the config reader has no platform-specific branches.pack:verifyreports the same package roots as before; no new metadata root ships.core/json5.mjsis a documented subset normalizer, not a full JSON5 parser, so a config using features outside that subset is reported asinvalidrather than guessed at.agents.defaults.workspaceandagents.entries.<agentId>.workspace. If a future release changes that roster shape, the adapter reports an unmatched workspace instead of guessing.CHANGELOG.mdis untouched becauseAGENTS.mdreserves release metadata for the maintainers.AI Involvement
Checklist
AGENTS.md,CONTRIBUTING.md, and the relevant canonical-owner guidance.CHANGELOG.md. (AGENTS.mdasks contributors not to edit it proactively.)