Rename gui to builder and strip non-base deployments#9
Conversation
Aligns with the raindex consolidation branch which renamed the gui: YAML key to builder:. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
st0x.registry only defines base network — remove arbitrum/polygon entries that reference undefined networks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
st0x.registry only defines base network. Remove arbitrum/polygon entries from auction-dca, canary, dynamic-spread, and grid to prevent deployer-not-found errors when the builder validates all deployments on load. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughReplaced upstream registry commit hash, added a Base-network USDC token entry, consolidated multi-network strategy configs to Base-only, and renamed top-level UI sections from Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Add template fallbacks (|| 'Token to Buy' / 'Token to Sell') to all field and preset names/descriptions that reference unresolved token symbols. Readable in --describe before select-tokens are chosen; unchanged at deploy time when tokens are selected. - Improve select-token role descriptions in fixed-limit and grid to describe what the slot means (input vault vs output vault) instead of just 'pick a token'. - Rewrite pyth-pair description to clarify it is not a canonical Pyth feed ID from hermes.pyth.network — it is a length-prefixed ASCII encoding the on-chain subparser expects. Direct users to the preset list. - grid: replace saturating-sub (retired with Float negative support) with max(0 sub(...)).
The on-chain metadata parser rejects non-ASCII characters (em-dash raises IllegalChar). Replace all — with - in the field and select-token descriptions so deploy calldata validates on chain.
The retired max-value word was replaced by max-positive-value in the current interpreter. Using max-value causes an UnknownWord revert on Base deployers.
## Motivation
Strategy field names and descriptions in `.rain` YAML reference token properties via templates like `\${order.inputs.0.token.symbol} per \${order.outputs.0.token.symbol}`. The webapp resolves these at runtime once tokens have been selected. Any other consumer (notably `--describe`) that renders these strings before a token is picked sees the raw placeholder, which is confusing.
Dropping the placeholder in un-selected contexts would lose the structural information. Hard-coding a substitution in every consumer is brittle and doesn't match webapp semantics.
## Solution
Extend the template syntax with an optional fallback literal:
```
${path} — current behaviour
${path || 'fallback'} — substitute literal when the path resolves to a missing token
${path || "fallback"} — double quotes also accepted
```
The fallback only kicks in on `PropertyNotFound("token")` (i.e. select-token not yet selected). Other resolution errors still propagate. Templates without `||` behave identically to today — backwards compatible.
The webapp gets no regression: when tokens are selected the left-hand side always resolves and the fallback never fires. `--describe` (and any other "no context" consumer) gets readable output for free once registry strategies adopt fallbacks.
Registry adoption is tracked in ST0x-Technology/st0x.registry#9.
## Checks
- [x] made this PR as small as possible
- [x] unit-tested any new functionality
- [x] linked any relevant issues or PRs
- [ ] included screenshots (if this involves a front-end change)
> [!CAUTION] > > The registry-side companion work that uses the template-fallback operator (#2551) to produce readable `--describe` output for existing strategies is in ST0x-Technology/st0x.registry#9 — describe works fine without it, but strategy field names will contain raw `${...}` placeholders until that PR lands. ## Motivation CLI users and AI agents need a way to learn a registry's full configuration without reading the underlying `.rain` YAML files or running the interactive wizard. That discovery loop is currently: `curl` the registry file → resolve the settings URL → `curl` each strategy → parse the YAML by hand. Every agent we tested (6/6) burned 4+ tool calls just discovering token addresses. ## Solution Add `--describe` — emits a full markdown dump of the registry: every strategy, its deployments, required/optional fields (with presets and defaults), select-tokens, deposits, plus usage documentation and the `address:calldata` output format. Intended as a self-generating skill. An agent can run once against a registry and have everything it needs to construct non-interactive deploy commands from a natural-language request. Each deployment includes an **Example command** with the exact flags and placeholders pre-filled. Also bundled in this PR (small polish items): - Each field tagged `(required)` or `(optional, default: X)` so it is obvious which flags are mandatory - `strategy-builder` stdout lines are now labelled with `#` comment headers describing what each transaction does (approve / deploy / meta emission). Safe for `cast send` pipelines (with a one-line skip) and for `stox submit` (updated in ST0x-Technology/st0x.liquidity#578) - Usage section documents the `#` comment convention, the `--tokens` companion, the cast-send pipe idiom (with comment-skip), the units convention (human-readable decimal), and the build-once guidance for running the binary directly without `nix develop` noise ## Checks - [x] made this PR as small as possible - [x] unit-tested any new functionality - [x] linked any relevant issues or PRs - [ ] included screenshots (if this involves a front-end change) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added `strategy-builder` CLI command with interactive, describe, and tokens modes for deploying order strategies from registry configurations. * **Bug Fixes** * Made token `logoURI` field optional in remote token configurations. * **Documentation** * Updated YAML configuration: replaced `gui:` sections with `builder:` throughout codebase. * Renamed public APIs from GUI-centric to builder-centric terminology across CLI, SDK, and UI components. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Motivation
Strategy field names and descriptions in `.rain` YAML reference token properties via templates like `\${order.inputs.0.token.symbol} per \${order.outputs.0.token.symbol}`. The webapp resolves these at runtime once tokens have been selected. Any other consumer (notably `--describe`) that renders these strings before a token is picked sees the raw placeholder, which is confusing.
Dropping the placeholder in un-selected contexts would lose the structural information. Hard-coding a substitution in every consumer is brittle and doesn't match webapp semantics.
## Solution
Extend the template syntax with an optional fallback literal:
```
${path} — current behaviour
${path || 'fallback'} — substitute literal when the path resolves to a missing token
${path || "fallback"} — double quotes also accepted
```
The fallback only kicks in on `PropertyNotFound("token")` (i.e. select-token not yet selected). Other resolution errors still propagate. Templates without `||` behave identically to today — backwards compatible.
The webapp gets no regression: when tokens are selected the left-hand side always resolves and the fallback never fires. `--describe` (and any other "no context" consumer) gets readable output for free once registry strategies adopt fallbacks.
Registry adoption is tracked in ST0x-Technology/st0x.registry#9.
## Checks
- [x] made this PR as small as possible
- [x] unit-tested any new functionality
- [x] linked any relevant issues or PRs
- [ ] included screenshots (if this involves a front-end change)
> [!CAUTION] > > The registry-side companion work that uses the template-fallback operator (#2551) to produce readable `--describe` output for existing strategies is in ST0x-Technology/st0x.registry#9 — describe works fine without it, but strategy field names will contain raw `${...}` placeholders until that PR lands. ## Motivation CLI users and AI agents need a way to learn a registry's full configuration without reading the underlying `.rain` YAML files or running the interactive wizard. That discovery loop is currently: `curl` the registry file → resolve the settings URL → `curl` each strategy → parse the YAML by hand. Every agent we tested (6/6) burned 4+ tool calls just discovering token addresses. ## Solution Add `--describe` — emits a full markdown dump of the registry: every strategy, its deployments, required/optional fields (with presets and defaults), select-tokens, deposits, plus usage documentation and the `address:calldata` output format. Intended as a self-generating skill. An agent can run once against a registry and have everything it needs to construct non-interactive deploy commands from a natural-language request. Each deployment includes an **Example command** with the exact flags and placeholders pre-filled. Also bundled in this PR (small polish items): - Each field tagged `(required)` or `(optional, default: X)` so it is obvious which flags are mandatory - `strategy-builder` stdout lines are now labelled with `#` comment headers describing what each transaction does (approve / deploy / meta emission). Safe for `cast send` pipelines (with a one-line skip) and for `stox submit` (updated in ST0x-Technology/st0x.liquidity#578) - Usage section documents the `#` comment convention, the `--tokens` companion, the cast-send pipe idiom (with comment-skip), the units convention (human-readable decimal), and the build-once guidance for running the binary directly without `nix develop` noise ## Checks - [x] made this PR as small as possible - [x] unit-tested any new functionality - [x] linked any relevant issues or PRs - [ ] included screenshots (if this involves a front-end change) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added `strategy-builder` CLI command with interactive, describe, and tokens modes for deploying order strategies from registry configurations. * **Bug Fixes** * Made token `logoURI` field optional in remote token configurations. * **Documentation** * Updated YAML configuration: replaced `gui:` sections with `builder:` throughout codebase. * Renamed public APIs from GUI-centric to builder-centric terminology across CLI, SDK, and UI components. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Motivation
Strategy field names and descriptions in `.rain` YAML reference token properties via templates like `\${order.inputs.0.token.symbol} per \${order.outputs.0.token.symbol}`. The webapp resolves these at runtime once tokens have been selected. Any other consumer (notably `--describe`) that renders these strings before a token is picked sees the raw placeholder, which is confusing.
Dropping the placeholder in un-selected contexts would lose the structural information. Hard-coding a substitution in every consumer is brittle and doesn't match webapp semantics.
## Solution
Extend the template syntax with an optional fallback literal:
```
${path} — current behaviour
${path || 'fallback'} — substitute literal when the path resolves to a missing token
${path || "fallback"} — double quotes also accepted
```
The fallback only kicks in on `PropertyNotFound("token")` (i.e. select-token not yet selected). Other resolution errors still propagate. Templates without `||` behave identically to today — backwards compatible.
The webapp gets no regression: when tokens are selected the left-hand side always resolves and the fallback never fires. `--describe` (and any other "no context" consumer) gets readable output for free once registry strategies adopt fallbacks.
Registry adoption is tracked in ST0x-Technology/st0x.registry#9.
## Checks
- [x] made this PR as small as possible
- [x] unit-tested any new functionality
- [x] linked any relevant issues or PRs
- [ ] included screenshots (if this involves a front-end change)
> [!CAUTION] > > The registry-side companion work that uses the template-fallback operator (#2551) to produce readable `--describe` output for existing strategies is in ST0x-Technology/st0x.registry#9 — describe works fine without it, but strategy field names will contain raw `${...}` placeholders until that PR lands. ## Motivation CLI users and AI agents need a way to learn a registry's full configuration without reading the underlying `.rain` YAML files or running the interactive wizard. That discovery loop is currently: `curl` the registry file → resolve the settings URL → `curl` each strategy → parse the YAML by hand. Every agent we tested (6/6) burned 4+ tool calls just discovering token addresses. ## Solution Add `--describe` — emits a full markdown dump of the registry: every strategy, its deployments, required/optional fields (with presets and defaults), select-tokens, deposits, plus usage documentation and the `address:calldata` output format. Intended as a self-generating skill. An agent can run once against a registry and have everything it needs to construct non-interactive deploy commands from a natural-language request. Each deployment includes an **Example command** with the exact flags and placeholders pre-filled. Also bundled in this PR (small polish items): - Each field tagged `(required)` or `(optional, default: X)` so it is obvious which flags are mandatory - `strategy-builder` stdout lines are now labelled with `#` comment headers describing what each transaction does (approve / deploy / meta emission). Safe for `cast send` pipelines (with a one-line skip) and for `stox submit` (updated in ST0x-Technology/st0x.liquidity#578) - Usage section documents the `#` comment convention, the `--tokens` companion, the cast-send pipe idiom (with comment-skip), the units convention (human-readable decimal), and the build-once guidance for running the binary directly without `nix develop` noise ## Checks - [x] made this PR as small as possible - [x] unit-tested any new functionality - [x] linked any relevant issues or PRs - [ ] included screenshots (if this involves a front-end change) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added `strategy-builder` CLI command with interactive, describe, and tokens modes for deploying order strategies from registry configurations. * **Bug Fixes** * Made token `logoURI` field optional in remote token configurations. * **Documentation** * Updated YAML configuration: replaced `gui:` sections with `builder:` throughout codebase. * Renamed public APIs from GUI-centric to builder-centric terminology across CLI, SDK, and UI components. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Caution
Depends on rainlanguage/raindex#2551 for the `${path || 'fallback'}` template syntax that the updated strategy descriptions use. Describe output in raindex has unresolved `${…}` placeholders for strategies in this registry until #2551 lands.
Motivation
Several improvements needed for the st0x registry to work well with the new raindex CLI's `--describe`, `--tokens`, and non-interactive modes (rainlanguage/raindex#2544, #2546, #2548, #2549).
Agents running end-to-end tests consistently stumbled on:
Solution
A series of small registry edits on this branch:
Verified end-to-end against the raindex CLI and deployed real transactions (fixed-limit, auction-dca, fixed-spread) on Base.
Grid still fails to parse on Base with the current deployer because the on-chain interpreter is also missing `max-value`; that's a separate interpreter-bump concern, not addressed here.
Checks
Summary by CodeRabbit
Configuration Updates
User Interface