Conversation
5074134 to
d0c1831
Compare
1. execution.ts: executeCommand auto-manages browser sessions - Signature simplified: (cmd, kwargs, debug) — callers dont handle browser - Internal runCommand() does lazy-loading, func/pipeline dispatch - shouldUseBrowserSession + domain pre-nav moved here from adapter 2. runtime.ts: add getBrowserFactory() - Eliminates 4x duplicate CDPBridge/BrowserBridge selection 3. serialization.ts: new module (79 LOC) - serializeArg, serializeCommand, formatArgSummary, formatRegistryHelpText - registry.ts re-exports for backward compat (160 -> 96 LOC) 4. cli.ts: format all built-in commands - Un-compressed explore/generate/cascade from 300-char single lines - Extracted inferHost() helper - Uses getBrowserFactory() instead of inline CDPBridge selection - Clear section comments 5. commanderAdapter.ts: pure thin adapter (113 LOC) - Only does: arg collection → executeCommand → renderOutput - Zero browser/session/strategy logic All 244 tests pass. No behavioral changes.
d0c1831 to
2f3e96d
Compare
This was referenced Mar 20, 2026
jackwener
added a commit
that referenced
this pull request
Mar 20, 2026
- Add missing codex/dump to README command tables - Fix reddit subreddit --name → positional - Update architecture.md for PR #152 engine.ts split: engine.ts → discovery.ts + execution.ts + commanderAdapter.ts - Add intercept and ui strategies to auth table
jackwener
added a commit
that referenced
this pull request
Mar 20, 2026
- Add missing codex/dump to README command tables - Fix reddit subreddit --name → positional - Update architecture.md for PR #152 engine.ts split: engine.ts → discovery.ts + execution.ts + commanderAdapter.ts - Add intercept and ui strategies to auth table
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.
Architectural improvements to the CLI layer:
Changes
1. Split
engine.ts(275 LOC) into focused modulesdiscovery.ts(167 LOC): CLI discovery, manifest loading, YAML parsingexecution.ts(112 LOC): arg validation, command execution, lazy loadingengine.tssimplified to 10-line re-export facade for backward compat2. Extract
commanderAdapter.ts(117 LOC)3. Simplify
cli.tsregisterAllCommands()from the adapterArchitecture (after)
Verification