Conversation
- Add CodexAgentPlugin with full CLI integration - Support for exec mode, model selection, sandbox modes - JSONL output parsing for structured responses - Register in built-in agent plugins Closes subsy#98
|
@carmandale is attempting to deploy a commit to the plgeek Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughA new CodexAgentPlugin adds OpenAI Codex integration: exec-mode invocation, binary detection, model and sandbox configuration, streaming JSONL parsing utilities, setup/validation hooks, and a factory export. The plugin is registered and re-exported from the built-in agents registry. Changes
Sequence DiagramsequenceDiagram
actor User
participant Plugin as CodexAgentPlugin
participant CLI as Codex CLI
participant Parser as JSONL Parser
User->>Plugin: initialize(config)
Plugin->>Plugin: set options (model, sandbox, outputMode)
User->>Plugin: detect()
Plugin->>CLI: run `codex --version`
CLI-->>Plugin: version string
Plugin-->>User: executable path + version
User->>Plugin: buildArgs(prompt, files)
Plugin->>Plugin: collect unique dirs, build exec args
User->>Plugin: getStdinInput(prompt)
Plugin-->>CLI: execute with stdin and args
CLI-->>Plugin: streaming JSONL output
Plugin->>Parser: parseJsonlOutput / streaming parser
Parser-->>Plugin: messages + fallback lines
Plugin-->>User: structured results
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/plugins/agents/builtin/codex.ts`:
- Around line 88-94: The field bypassApprovals currently defaults to true which
enables dangerous auto-bypass behavior; change the default to false and require
an explicit opt-in via configuration or CLI flag before enabling it (update the
class property bypassApprovals and any places that set or read it, e.g., the
other occurrence referenced as bypass approvals at the later usage around line
~261), and ensure sandboxMode remains explicit and conservative (keep
'workspace-write' or tighten to 'read-only' as appropriate) so that bypassing
approvals/sandbox can only be activated when a clear config/CLI switch is
provided and validated.
|
Thanks for this @carmandale Im in the process of refactoring some of the code to improve the prompt templates, package them with tracker plugins and restructure the agent plugin paths. We also now have true built in sandboxing |
Address CodeRabbit feedback on PR subsy#118: - Default bypassApprovals to false (was true) - Require explicit opt-in for autonomous operation - Update setup question prompt with warning - Improve help text to clarify security implications This is a safer default that requires users to explicitly enable dangerous auto-bypass behavior.
Addressed CodeRabbit FeedbackFixed the
Commit: 7def788 The safer default ensures that |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (8.13%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
==========================================
+ Coverage 26.35% 33.76% +7.41%
==========================================
Files 69 77 +8
Lines 16516 19184 +2668
==========================================
+ Hits 4352 6478 +2126
- Misses 12164 12706 +542
🚀 New features to boost your workflow:
|
|
Closing as this is implemented in a different PR. Appreciate the contribution though! |
Summary
Adds support for Codex as an agent in Ralph TUI.
Changes
CodexAgentPlugininsrc/plugins/agents/builtin/codex.tscodex execfor non-interactive execution-m/--model--dangerously-bypass-approvals-and-sandboxfor autonomous operationTesting
bun run typecheckpassesbun run lintpassesbun run buildpassesralph-tui plugins agentsshows Codex pluginUsage
Closes #98
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.