Shift the Rust parity increment away from implying TS-style plugin UX and toward an honest inspection surface. /plugin now reports current local plugin support, checked directories, and missing runtime wiring, while /reload-plugins rebuilds the runtime and prints the same inspection snapshot.\n\nConstraint: Rust only supports local manifest-backed plugins today; marketplace/discovery parity does not exist\nRejected: Stub marketplace installer flow | would overstate current capability\nRejected: Keep /plugin as list-only output | hides important gaps and checked paths\nConfidence: high\nScope-risk: narrow\nReversibility: clean\nDirective: Keep plugin reporting aligned with actual runtime wiring; do not advertise manifest commands/hooks as active until the runtime uses them\nTested: cargo test -p commands\nTested: cargo test -p claw-cli\nNot-tested: cargo clippy -p commands -p claw-cli --tests -- -D warnings (blocked by pre-existing workspace warnings in commands/claw-cli/lsp)
11 KiB
PARITY GAP ANALYSIS
Scope: read-only comparison between the original TypeScript source at /home/bellman/Workspace/claw-code/src/ and the Rust port under rust/crates/.
Method: compared feature surfaces, registries, entrypoints, and runtime plumbing only. No TypeScript source was copied.
Executive summary
The Rust port has a good foundation for:
- Anthropic API/OAuth basics
- local conversation/session state
- a core tool loop
- MCP stdio/bootstrap support
- CLAW.md discovery
- a small but usable built-in tool set
It is not feature-parity with the TypeScript CLI.
Largest gaps:
- plugins are effectively absent in Rust
- hooks are parsed but not executed in Rust
- CLI breadth is much narrower in Rust
- skills are local-file only in Rust, without the TS registry/bundled pipeline
- assistant orchestration lacks TS hook-aware orchestration and remote/structured transports
- services beyond core API/OAuth/MCP are mostly missing in Rust
tools/
TS exists
Evidence:
src/tools/contains broad tool families includingAgentTool,AskUserQuestionTool,BashTool,ConfigTool,FileReadTool,FileWriteTool,GlobTool,GrepTool,LSPTool,ListMcpResourcesTool,MCPTool,McpAuthTool,ReadMcpResourceTool,RemoteTriggerTool,ScheduleCronTool,SkillTool,Task*,Team*,TodoWriteTool,ToolSearchTool,WebFetchTool,WebSearchTool.- Tool execution/orchestration is split across
src/services/tools/StreamingToolExecutor.ts,src/services/tools/toolExecution.ts,src/services/tools/toolHooks.ts, andsrc/services/tools/toolOrchestration.ts.
Rust exists
Evidence:
- Tool registry is centralized in
rust/crates/tools/src/lib.rsviamvp_tool_specs(). - Current built-ins include shell/file/search/web/todo/skill/agent/config/notebook/repl/powershell primitives.
- Runtime execution is wired through
rust/crates/tools/src/lib.rsandrust/crates/runtime/src/conversation.rs.
Missing or broken in Rust
- No Rust equivalents for major TS tools such as
AskUserQuestionTool,LSPTool,ListMcpResourcesTool,MCPTool,McpAuthTool,ReadMcpResourceTool,RemoteTriggerTool,ScheduleCronTool,Task*,Team*, and several workflow/system tools. - Rust tool surface is still explicitly an MVP registry, not a parity registry.
- Rust lacks TS’s layered tool orchestration split.
Status: partial core only.
hooks/
TS exists
Evidence:
- Hook command surface under
src/commands/hooks/. - Runtime hook machinery in
src/services/tools/toolHooks.tsandsrc/services/tools/toolExecution.ts. - TS supports
PreToolUse,PostToolUse, and broader hook-driven behaviors configured through settings and documented insrc/skills/bundled/updateConfig.ts.
Rust exists
Evidence:
- Hook config is parsed and merged in
rust/crates/runtime/src/config.rs. - Shell-command
PreToolUse/PostToolUsehooks execute viarust/crates/runtime/src/hooks.rs. - Conversation runtime runs pre/post hooks around tool execution in
rust/crates/runtime/src/conversation.rs. - Hook config can now be inspected through a dedicated Rust
/hooksreport inrust/crates/commands/src/lib.rsandrust/crates/claw-cli/src/main.rs. - Prompt guidance mentions hooks in
rust/crates/runtime/src/prompt.rs.
Missing or broken in Rust
- No TS-style matcher-based hook config model; Rust only supports merged string command lists under
settings.hooks.PreToolUseandPostToolUse. - No TS-style prompt/agent/http hook types,
PostToolUseFailure,PermissionDenied, or richer hook lifecycle surfaces. - No TS-equivalent interactive
/hooksbrowser/editor; Rust currently provides inspection/reporting only. - No PreToolUse/PostToolUse input rewrite, MCP-output mutation, or continuation-stop behavior beyond allow/deny plus feedback text.
Status: basic shell hook runtime plus /hooks inspection; richer TS hook model still missing.
plugins/
TS exists
Evidence:
- Built-in plugin scaffolding in
src/plugins/builtinPlugins.tsandsrc/plugins/bundled/index.ts. - Plugin lifecycle/services in
src/services/plugins/PluginInstallationManager.tsandsrc/services/plugins/pluginOperations.ts. - CLI/plugin command surface under
src/commands/plugin/andsrc/commands/reload-plugins/.
Rust exists
Evidence:
- Local plugin manifests, registry/state, install/update/uninstall flows, and bundled/external discovery live in
rust/crates/plugins/src/lib.rs. - Runtime config parses plugin settings (
enabledPlugins, external directories, install root, registry path, bundled root) inrust/crates/runtime/src/config.rs. - CLI wiring builds a
PluginManager, exposes/plugininspection/reporting, and now exposes/reload-pluginsruntime rebuild/reporting inrust/crates/commands/src/lib.rsandrust/crates/claw-cli/src/main.rs. - Plugin-provided tools are merged into the runtime tool registry in
rust/crates/claw-cli/src/main.rsandrust/crates/tools/src/lib.rs.
Missing or broken in Rust
- No TS-style marketplace/discovery/editor UI; current surfaces are local manifest/reporting oriented.
- Plugin-defined slash commands are validated from manifests but not exposed in the CLI runtime.
- Plugin hooks and lifecycle commands are validated but not wired into the conversation runtime startup/shutdown or hook runner.
- No plugin-provided MCP/server extension path.
/reload-pluginsonly rebuilds the current local runtime; it is not a richer TS hot-reload/plugin-browser flow.
Status: local plugin discovery/install/inspection exists; TS marketplace/runtime-extension parity is still partial.
skills/ and CLAW.md discovery
TS exists
Evidence:
- Skill loading/registry pipeline in
src/skills/loadSkillsDir.ts,src/skills/bundledSkills.ts, andsrc/skills/mcpSkillBuilders.ts. - Bundled skills under
src/skills/bundled/. - Skills command surface under
src/commands/skills/.
Rust exists
Evidence:
Skilltool inrust/crates/tools/src/lib.rsnow resolves workspace-local.codex/.clawskills plus legacy/commandsentries through shared runtime discovery./skillsexists inrust/crates/commands/src/lib.rsandrust/crates/claw-cli/src/main.rs, listing discoverable local skills and checked skill directories in the current workspace context.- CLAW.md discovery is implemented in
rust/crates/runtime/src/prompt.rs. - Rust supports
/memoryand/initviarust/crates/commands/src/lib.rsandrust/crates/claw-cli/src/main.rs.
Missing or broken in Rust
- No bundled skill registry equivalent.
- No MCP skill-builder pipeline.
- No TS-style live skill discovery/reload/change handling.
- No comparable session-memory / team-memory integration around skills.
Status: local/workspace skill loading plus minimal /skills discovery; bundled/MCP parity still missing.
cli/
TS exists
Evidence:
- Large command surface under
src/commands/includingagents,hooks,mcp,memory,model,permissions,plan,plugin,resume,review,skills,tasks, and many more. - Structured/remote transport stack in
src/cli/structuredIO.ts,src/cli/remoteIO.ts, andsrc/cli/transports/*. - CLI handler split in
src/cli/handlers/*.
Rust exists
Evidence:
- Shared slash command registry in
rust/crates/commands/src/lib.rs. - Rust slash commands currently cover
help,status,compact,model,permissions,clear,cost,resume,config,hooks,memory,init,diff,version,export,session,plugin,reload-plugins,agents, andskills. - Main CLI/repl/prompt handling lives in
rust/crates/claw-cli/src/main.rs.
Missing or broken in Rust
- Missing major TS command families:
/hooks,/mcp,/plan,/review,/tasks, and many others. - No Rust equivalent to TS structured IO / remote transport layers.
- No TS-style handler decomposition for auth/plugins/MCP/agents.
- JSON prompt mode now maintains clean transport output in tool-capable runs; targeted CLI coverage should guard against regressions.
Status: functional local CLI core, much narrower than TS.
assistant/ (agentic loop, streaming, tool calling)
TS exists
Evidence:
- Assistant/session surface at
src/assistant/sessionHistory.ts. - Tool orchestration in
src/services/tools/StreamingToolExecutor.ts,src/services/tools/toolExecution.ts,src/services/tools/toolOrchestration.ts. - Remote/structured streaming layers in
src/cli/structuredIO.tsandsrc/cli/remoteIO.ts.
Rust exists
Evidence:
- Core loop in
rust/crates/runtime/src/conversation.rs. - Stream/tool event translation in
rust/crates/claw-cli/src/main.rs. - Session persistence in
rust/crates/runtime/src/session.rs.
Missing or broken in Rust
- No TS-style hook-aware orchestration layer.
- No TS structured/remote assistant transport stack.
- No richer TS assistant/session-history/background-task integration.
- JSON output path is no longer single-turn only on this branch, and tool-capable prompt output now stays transport-clean like the TypeScript behavior.
Status: strong core loop, missing orchestration layers.
services/ (API client, auth, models, MCP)
TS exists
Evidence:
- API services under
src/services/api/*. - OAuth services under
src/services/oauth/*. - MCP services under
src/services/mcp/*. - Additional service layers for analytics, prompt suggestion, session memory, plugin operations, settings sync, policy limits, team memory sync, notifier, voice, and more under
src/services/*.
Rust exists
Evidence:
- Core Anthropic API client in
rust/crates/api/src/{client,error,sse,types}.rs. - OAuth support in
rust/crates/runtime/src/oauth.rs. - MCP config/bootstrap/client support in
rust/crates/runtime/src/{config,mcp,mcp_client,mcp_stdio}.rs. - Usage accounting in
rust/crates/runtime/src/usage.rs. - Remote upstream-proxy support in
rust/crates/runtime/src/remote.rs.
Missing or broken in Rust
- Most TS service ecosystem beyond core messaging/auth/MCP is absent.
- No TS-equivalent plugin service layer.
- No TS-equivalent analytics/settings-sync/policy-limit/team-memory subsystems.
- No TS-style MCP connection-manager/UI layer.
- Model/provider ergonomics remain thinner than TS.
Status: core foundation exists; broader service ecosystem missing.
Critical bug status in this worktree
Fixed
- Prompt mode tools enabled
rust/crates/claw-cli/src/main.rsnow constructs prompt mode withLiveCli::new(model, true, ...).
- Default permission mode = DangerFullAccess
- Runtime default now resolves to
DangerFullAccessinrust/crates/claw-cli/src/main.rs. - Clap default also uses
DangerFullAccessinrust/crates/claw-cli/src/args.rs. - Init template writes
dontAskinrust/crates/claw-cli/src/init.rs.
- Runtime default now resolves to
- Streaming
{}tool-input prefix bugrust/crates/claw-cli/src/main.rsnow strips the initial empty object only for streaming tool input, while preserving legitimate{}in non-stream responses.
- Unlimited max_iterations
- Verified at
rust/crates/runtime/src/conversation.rswithusize::MAX.
- Verified at
JSON prompt output cleanliness status
- JSON prompt output cleanliness
- Verified clean in tool-capable prompt mode: stdout remains a single final JSON object when tools fire.