Closed
Conversation
Phase 1 of the Mars v2 refactor — additive, no breaking changes. - ExecutionContext: n8n-style state that flows between steps, with namespaced access to previous outputs, fork/merge for parallel branches, and shared global_state - Formatter: injectable input/output transform (identity by default) - Hooks: class-level before_run/after_run callbacks mixin Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 2 of the Mars v2 refactor. - Runnable: include Hooks, add `name` (auto-derived from class via `step_name`), add `formatter` class-level DSL with instance fallback - Gate, Aggregator, Sequential, Parallel: delegate `name` to Runnable via super instead of managing their own attr_reader - Runnable spec: cover name derivation, formatter DSL, hooks integration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 3 of the Mars v2 refactor. - Rename Mars::Agent → Mars::AgentStep with class-level `agent` macro that wraps a RubyLLM::Agent subclass - AgentStep#run creates a new agent instance and delegates via .ask - Remove old Agent with its manual Chat setup (before_run/after_run, system_prompt, tools, schema instance methods) - Rename rendering graph module accordingly - Bump ruby_llm dependency to ~> 1.12 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 4 of the Mars v2 refactor. - Gate: add class-level `condition`/`branch` DSL for reusable gates. Gate#run now executes the matched branch directly instead of returning a Runnable for Sequential to detect - Aggregator: context-aware — accepts ExecutionContext and passes its outputs to the operation - Sequential: remove is_a?(Runnable) check, now just chains step results Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8f6f5b4 to
68a3b04
Compare
Phase 4 of the Mars v2 refactor. - Gate: add class-level `condition`/`branch` DSL for reusable gates. Gate#run now executes the matched branch directly instead of returning a Runnable for Sequential to detect - Aggregator: context-aware — accepts ExecutionContext and passes its outputs to the operation - Sequential: remove is_a?(Runnable) check, now just chains step results Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
68a3b04 to
45d8133
Compare
92b0ee6 to
6c65614
Compare
1993d90 to
a5c12d5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Graph::Basenow provides a defaultto_graphthat renders any Runnable as a[Name]box node. Included intoMars::Runnableviainclude_extensions, so custom Runnable subclasses are renderable without needing a specific graph moduleMars::Rendering::Htmlgenerates a self-contained HTML file with embedded Mermaid.js. Supportsrender(returns string) andwrite(path)(writes file). Escapes HTML in titles for safetyPhase 6 of the v2 refactor. Based on #29.
Test plan
to_graphwriteproduces a valid file on disk🤖 Generated with Claude Code