feat: add --describe flag to strategy-builder CLI#2552
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label Raindex-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
988ae03 to
2bb6a18
Compare
3f8a26e to
a1bf8e7
Compare
2bb6a18 to
b205a51
Compare
a1bf8e7 to
e9f600b
Compare
Merge activity
|
b205a51 to
3065b16
Compare
> [!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 -->
e9f600b to
15c9e2b
Compare
3065b16 to
9e4531a
Compare
> [!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 -->
15c9e2b to
f7cfad7
Compare
> [!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 -->
9e4531a to
d8d142d
Compare
f7cfad7 to
6149cdd
Compare

Caution
The registry-side companion work that uses the template-fallback operator (#2551) to produce readable
--describeoutput 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
.rainYAML files or running the interactive wizard. That discovery loop is currently:curlthe registry file → resolve the settings URL →curleach 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 theaddress:calldataoutput 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):
(required)or(optional, default: X)so it is obvious which flags are mandatorystrategy-builderstdout lines are now labelled with#comment headers describing what each transaction does (approve / deploy / meta emission). Safe forcast sendpipelines (with a one-line skip) and forstox submit(updated in feat: skip # comment lines in cli submit input ST0x-Technology/st0x.liquidity#578)#comment convention, the--tokenscompanion, the cast-send pipe idiom (with comment-skip), the units convention (human-readable decimal), and the build-once guidance for running the binary directly withoutnix developnoiseChecks
Summary by CodeRabbit
New Features
strategy-builderCLI command with interactive, describe, and tokens modes for deploying order strategies from registry configurations.Bug Fixes
logoURIfield optional in remote token configurations.Documentation
gui:sections withbuilder:throughout codebase.