Roadmap
Internal Document
This page tracks the forward-looking architectural plan and open questions. It is intended for maintainers and contributors.
Immediate Priority — Sequential Pipeline Execution (v1)
The parser/validation hardening phase is complete. The next priority is shipping sequential command execution on top of the stabilized dispatch boundary.
Current Scope (Proposed 2026-03-05)
| Milestone | Description |
|---|---|
| 1. Pipeline parser + interpolation | Add && step splitting, => $name capture parsing, and $name.field/$_ interpolation |
| 2. CLI execution integration | Refactor executeCommandForTab() into reusable single-step and pipeline executors |
| 3. Output normalization | Add/standardize pipelineOutput on swap/bridge first, then lending flows |
| 4. Tx-aware sequencing | Default post-transaction gating between steps, plus --dry-run and --confirm behaviors |
| 5. 7702 preparation | Keep backend boundary ready for delegated execution fallback per-step |
Execution Rules (v1)
- Abort on first failed step and report partial completion.
- Cross-fiber chaining is only allowed from global context.
- In active protocol context, cross-fiber steps are blocked.
- Confirm/cancel lifecycle remains the same for intent-backed write steps.
Recently Completed (March 2026)
- Parser and validation architecture completed and merged.
- Dispatch boundary stabilized:
parse -> rho resolve -> applyContract -> run. - Parser diagnostics made non-fatal and shown as warnings.
- Validation execution moved before command
run(); validation errors separated from execution errors. - Contracts/schemas added across core commands and protocol plugins, including expanded Aave coverage.
Target Architecture — Headless Execution Engine
The current architecture conflates the execution runtime with the CLI rendering component (cli.tsx). The target architecture separates them:
ExecutionEngine (headless)
├── Command resolution (π, ρ, ρ_f operators)
├── Command + handler lifecycle
├── Execution context / history management
├── Typed event emission
└── Per-tab queue / scheduling
Interface Adapters
├── CLI Adapter (text parsing + terminal rendering)
└── Desktop/UI Adapter (typed forms + graphical flow)
Design guardrails:
- UI must never bypass the execution engine for protocol operations.
- Text parsing remains CLI-specific; the runtime API remains typed.
- Plugin handlers return structured outputs, not UI-specific side effects.
- Logging is gated/structured (
debugLog), not ad-hoc runtime noise.
Pipeline DSL — Phased Rollout (After Hardening)
The sequential command DSL remains phased:
Phase A — Sequential Execution
quote 1 eth usdc && swap 1 eth usdc
cmd1 && cmd2syntax only.- Step 2 runs only if step 1 succeeds.
Phase B — Variable Capture
quote 1 eth usdc => $q && swap $q.amountOut eth usdc
=> $varcaptures thepipelineOutputfrom the previous step.$var.fieldinterpolation for accessing captured values.
Phase C — Workflow Flags and Extended Backends
quote 1 eth usdc && swap 1 eth usdc --confirm --dry-run
--dry-runsimulates without sending transactions.--confirmadds an explicit user confirmation gate between steps.- Future: optional execution backends (including 7702-eligible paths) per step.
Open Questions
1. G_alias Roll-Out
- Define alias selection rules when multiple protocols implement the same action (e.g.,
bridgeavailable on LiFi, Wormhole, Stargate). - Decide on default protocol ordering: user preference vs. chain context vs. fee optimization.
- Document conflict resolution and fallback behavior when the active protocol does not implement an aliased command.
2. Unified Status Tracking
- Shared polling utilities across bridge protocols (LiFi, Wormhole, Stargate).
- Standard status model:
PENDING/DONE/FAILED/TIMED_OUT. - Common explorer link formatting utilities reusable across all protocols.
3. Protocol Metrics and Telemetry
- Standardize quote/execute timing metrics across all protocol plugins.
- Capture error classes and upstream failure rates per protocol.
- Define storage schema and retention policy for analytics events.
4. Testing Harnesses
- Mock servers for protocol APIs (1inch, LiFi, Wormhole, Stargate, Aave).
- Deterministic fixtures for command outputs (stable quote shapes, tx receipts).
- Integration tests for multi-step transaction flows (approve → bridge → status polling).
5. Shared Transaction Executor
- A single executor that processes ordered transaction lists from any protocol.
- Hooks for user confirmation dialogs, retry logic, and receipt awaiting.
- Reusable across all plugins to eliminate duplicated signing/broadcasting code.
6. Protocol State Schema
- A minimal typed schema for
protocolStateentries with common fields:lastQuote— most recent quote resultlastUpdated— timestamp of last state mutationexecution— current execution status
- Enables CLI debugging commands (
inspect,state) to display typed state.
Security Milestones
| Milestone | Status | Description |
|---|---|---|
| Protect analytics endpoints | Open | Apply auth gate to all /api/analytics/* routes |
| Protect 1inch proxy routes | Open | Apply auth gate to all unauthenticated 1inch proxy routes |
| Redis-backed rate limiting | Open | Replace in-memory rate limiter with shared store |
| Server-side plugin execution | Deferred | Move plugin execution server-side; remove API key exposure risk |
| Fix faucet IP spoofing | Open | Use platform-provided request IP, reject user headers |
See Security Findings for the full findings list and priority order.