Conversation
Split 2143-line monolithic main.rs into focused modules: - types.rs: struct definitions (JsonRpc*, Session, StreamingState, etc.) - protobuf.rs: proto parsing (extract_text, get_proto_field, read_varint) - db.rs: SQLite reading + narration filtering - streaming.rs: poll_streaming_delta - adapter.rs: Adapter struct, session/model/state management - main.rs: event loop, JSON-RPC dispatch, execute_prompt No behavioral changes. All tests pass.
- Add agy_bin() → always resolves to $HOME/.local/bin/agy - Replace 5s timeout poll with blocking .output() - Update static fallback to real model names
agy requires Node.js in PATH (set up by fnm in .bashrc). Without a login shell, agy models returns empty. Spawn all agy invocations through bash -lc to get the full env.
bash -lc breaks on shell metacharacters in prompt text. Instead, prepend standard agent paths (bin, .local/bin, fnm node) to PATH env when spawning agy. No shell escaping needed.
chaodu-agent
force-pushed
the
refactor/agy-acp-modules
branch
from
June 12, 2026 19:04
5e7e35b to
762d86e
Compare
thepagent
approved these changes
Jun 12, 2026
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
Split the 2143-line monolithic
main.rsinto focused modules (inspired by hicder/agy-acp):types.rsprotobuf.rsdb.rsstreaming.rsadapter.rsmain.rsAdditional fixes (from e2e testing)
augmented_path()prepends$HOME/bin,$HOME/.local/bin, and fnm node path so agy can find Node.js at runtime.output()—agy modelstakes ~7s in ECS/usr/local/bin/agy(matches Docker image install location)agy modelsfailsTests
All 15 tests pass (10 unit + 5 integration/e2e).
E2E verified
/modelsshows full listsetConfigOptionsends None terminator (kills session) — next message auto-recovers with fresh session