Delegate cron prompt command building to AgentCLI implementations#339
Merged
tbrandenburg merged 1 commit intomainfrom Mar 30, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Motivation
cron_serviceand into eachAgentCLIimplementation so the CLI class is authoritative for its invocation semantics.Description
build_prompt_command(prompt: str) -> list[str]and hookprompt_via_stdin()toAgentCLIinpackages/pybackend/agent_cli.pyso CLIs can provide their prompt command and whether they accept prompt via stdin.build_prompt_commandandprompt_via_stdinwhere appropriate inpackages/pybackend/copilot_agent_cli.py,codex_agent_cli.py,kiro_agent_cli.py,opencode_database_agent_cli.py,ob1_agent_cli.pyand the baseOpenCodeAgentCLI.packages/pybackend/cron_service.pyso_build_agent_cli_commanddelegates toget_agent_cli().build_prompt_command(prompt)and_uses_stdin_prompt()now usesget_agent_cli().prompt_via_stdin().packages/pybackend/tests/unit/test_cron_service.pyto mock the newAgentCLIcontract (build_prompt_commandandprompt_via_stdin) instead of relying oncli_name/main_executable_namebehavior.Testing
python -m pytest packages/pybackend/tests/unit/test_copilot_agent_cli.py packages/pybackend/tests/unit/test_kiro_agent_cli.py packages/pybackend/tests/unit/test_codex_agent_cli.py packages/pybackend/tests/unit/test_ob1_agent_cli.py packages/pybackend/tests/unit/test_opencode_database_agent_cli.pyand all contained tests passed.python -m pytest packages/pybackend/tests/unit/test_cron_service.pybut collection failed in this environment due to a missingapschedulerdependency, preventing full execution of that file here.Codex Task