feat: clawd-code submodule bridge + Cheshire monorepo communication - #1
Conversation
Adds @solana-clawd/clawd-plugin to the lockfile so monorepo install resolves the clawd-plugin ↔ clawd-code workspace dependency.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6acd27c779
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "verify:bridge": "node scripts/run-clawd-code.mjs --help" | ||
| }, | ||
| "dependencies": { | ||
| "@solana-clawd/clawd-code": "workspace:*" |
There was a problem hiding this comment.
Keep the optional submodule out of mandatory workspace deps
When plugins/clawd-code is uninitialized—as in quality.yml's develop-static-gate, which explicitly deinitializes submodules before running the setup action with its default init-submodules: false—Bun must resolve this new workspace:* edge before any scripts run and exits with Workspace dependency "@solana-clawd/clawd-code" not found. This breaks that CI gate and a normal fresh-clone bun install; either initialize this submodule in every installation path or make the bridge dependency optional/non-workspace.
AGENTS.md reference: AGENTS.md:L61-L63
Useful? React with 👍 / 👎.
| CLAWD_PLUGIN_DIR: process.env.CLAWD_PLUGIN_DIR || resolveClawdPluginDir(), | ||
| CLAWD_CODE_ROOT: resolution.root || process.env.CLAWD_CODE_ROOT || "", | ||
| }, | ||
| shell: resolution.kind === "npx", |
There was a problem hiding this comment.
Keep forwarded prompts out of a shell
When resolution reaches the npx fallback, every forwarded CLI argument—including code, trade, or research prompt text—is concatenated into a shell command. An argument containing ;, $(), or similar shell syntax therefore executes arbitrary host commands; this path also triggers Node's DEP0190 warning about unescaped arguments. Spawn npx without a shell, using the platform-specific executable where necessary, so the argument array remains data.
AGENTS.md reference: AGENTS.md:L316-L318
Useful? React with 👍 / 👎.
| } catch { | ||
| // workspace package not resolvable yet |
There was a problem hiding this comment.
Reject unexpected workspace-resolution failures
When require.resolve throws for an installed but unusable package—for example because package.json is not exported, the manifest is malformed, or access fails—this catch treats the error as package absence and silently selects npx @solana-clawd/clawd-code@latest. That hides the local failure and may execute a different remote version instead of the pinned workspace package; only recover from a verified missing-package error and rethrow other failures with their cause.
AGENTS.md reference: AGENTS.md:L344-L360
Useful? React with 👍 / 👎.
Adds root clawd.md with capsule/typing banners, curl install, stack map, and published @x402solana package links. Links from README. Adds scripts/publish-clawd-packages.mjs for isolated monorepo publishes and publishConfig on Clawd-related packages.
Summary
plugins/clawd-codeas the git submodule of Solizardking/clawd-code (not a vendored local tree).plugins/clawd-pluginso MCP/skills invoke the sibling CLI viascripts/run-clawd-code.mjs(preferplugins/clawd-code/dist/cli.js, then workspace, then npx).@elizaos/cheshire-elizato the stack withclawd-bridgeconstants, character/system docs, and README migration notes.@elizaos/plugin-cheshire-memoryand@elizaos/plugin-clawdbrowserto the Clawd/Cheshire map.Clawd Code source of truth
plugins/clawd-code→https://github.com/Solizardking/clawd-code.git29e3a9dccf6433c1f47710d6dc0470ac0cbec7bc(main).gitmodules[submodule "plugins/clawd-code"]install.shdefaultCLAWD_CODE_REPO=https://github.com/Solizardking/clawd-code.gitplugins/clawd-pluginMCP → sibling CLICommunication map
Install (canonical CLI)
curl -fsSL https://raw.githubusercontent.com/Solizardking/clawd-code/main/install.sh | shTest plan
node --test plugins/clawd-plugin/scripts/resolve-clawd-code.test.mjs(5 pass)bunx vitest run --config packages/cheshire-eliza/vitest.config.tsfrom package dir (5 pass)node plugins/clawd-plugin/scripts/run-clawd-code.mjs --helpresolves siblingplugins/clawd-code/dist/cli.jsbun installon clean checkout with submodule initgit submodule update --init plugins/clawd-codeNotes
@elizaos/*Plugin module.LIVE_TRADING+OPERATOR_CONFIRMED+PERPS_SIM_ONLY=false.