codex-autorunner 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codex_autorunner-0.1.1/src/codex_autorunner.egg-info → codex_autorunner-0.1.2}/PKG-INFO +3 -1
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/pyproject.toml +3 -1
- codex_autorunner-0.1.2/src/codex_autorunner/agents/__init__.py +21 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/agents/base.py +2 -2
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/agents/codex/harness.py +1 -1
- codex_autorunner-0.1.2/src/codex_autorunner/agents/execution/policy.py +292 -0
- codex_autorunner-0.1.2/src/codex_autorunner/agents/factory.py +52 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/agents/opencode/__init__.py +4 -0
- codex_autorunner-0.1.2/src/codex_autorunner/agents/opencode/agent_config.py +104 -0
- codex_autorunner-0.1.2/src/codex_autorunner/agents/opencode/client.py +553 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/agents/opencode/harness.py +71 -20
- codex_autorunner-0.1.2/src/codex_autorunner/agents/opencode/logging.py +209 -0
- codex_autorunner-0.1.2/src/codex_autorunner/agents/opencode/run_prompt.py +260 -0
- codex_autorunner-0.1.2/src/codex_autorunner/agents/opencode/runtime.py +1491 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/agents/opencode/supervisor.py +161 -23
- codex_autorunner-0.1.2/src/codex_autorunner/agents/orchestrator.py +358 -0
- codex_autorunner-0.1.2/src/codex_autorunner/agents/registry.py +130 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/agents/types.py +2 -2
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/bootstrap.py +3 -5
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/cli.py +77 -12
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/app_server_events.py +15 -6
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/app_server_logging.py +48 -12
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/app_server_prompts.py +2 -0
- codex_autorunner-0.1.2/src/codex_autorunner/core/circuit_breaker.py +183 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/config.py +167 -35
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/doc_chat.py +51 -20
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/docs.py +44 -7
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/engine.py +730 -192
- codex_autorunner-0.1.2/src/codex_autorunner/core/exceptions.py +60 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/hub.py +9 -7
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/locks.py +114 -1
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/logging_utils.py +9 -6
- codex_autorunner-0.1.2/src/codex_autorunner/core/path_utils.py +123 -0
- codex_autorunner-0.1.2/src/codex_autorunner/core/retry.py +61 -0
- codex_autorunner-0.1.2/src/codex_autorunner/core/review.py +888 -0
- codex_autorunner-0.1.2/src/codex_autorunner/core/review_context.py +164 -0
- codex_autorunner-0.1.2/src/codex_autorunner/core/run_index.py +217 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/runner_controller.py +44 -1
- codex_autorunner-0.1.2/src/codex_autorunner/core/runner_process.py +55 -0
- codex_autorunner-0.1.2/src/codex_autorunner/core/sqlite_utils.py +32 -0
- codex_autorunner-0.1.2/src/codex_autorunner/core/state.py +477 -0
- codex_autorunner-0.1.2/src/codex_autorunner/core/text_delta_coalescer.py +43 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/usage.py +107 -75
- codex_autorunner-0.1.2/src/codex_autorunner/core/utils.py +270 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/discovery.py +5 -3
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/app_server/client.py +144 -73
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/adapter.py +356 -41
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/config.py +64 -1
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/constants.py +3 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/dispatch.py +27 -8
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/handlers/approvals.py +12 -10
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/handlers/callbacks.py +19 -1
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/commands/__init__.py +27 -0
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/commands/approvals.py +173 -0
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/commands/execution.py +2599 -0
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/commands/files.py +1412 -0
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/commands/formatting.py +81 -0
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/commands/github.py +2229 -0
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/commands/shared.py +190 -0
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/commands/voice.py +112 -0
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/commands/workspace.py +2043 -0
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/commands_runtime.py +3083 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/handlers/messages.py +263 -49
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/questions.py +389 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/handlers/selections.py +6 -4
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/utils.py +171 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/helpers.py +2 -2
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/notifications.py +126 -35
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/outbox.py +8 -8
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/progress_stream.py +39 -9
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/runtime.py +24 -13
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/service.py +294 -97
- codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/state.py +2118 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/transport.py +1 -1
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/types.py +22 -2
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/voice.py +14 -15
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/__init__.py +2 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/agents.py +18 -78
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/base.py +75 -18
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/repos.py +17 -0
- codex_autorunner-0.1.2/src/codex_autorunner/routes/review.py +148 -0
- codex_autorunner-0.1.2/src/codex_autorunner/routes/runs.py +250 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/sessions.py +16 -8
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/settings.py +22 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/shared.py +33 -3
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/system.py +16 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/voice.py +5 -13
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/spec_ingest.py +33 -9
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/agentControls.js +8 -1
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/app.js +2 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/dashboard.js +55 -9
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docChatActions.js +8 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsInit.js +13 -2
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/github.js +79 -17
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/hub.js +26 -8
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/index.html +68 -16
- codex_autorunner-0.1.2/src/codex_autorunner/static/liveUpdates.js +58 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/logs.js +67 -29
- codex_autorunner-0.1.2/src/codex_autorunner/static/review.js +157 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/runs.js +64 -55
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/settings.js +6 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/state.js +9 -1
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/styles.css +117 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/terminalManager.js +19 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/voice.js +20 -7
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/voice/capture.py +7 -7
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/voice/service.py +51 -9
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/web/app.py +159 -117
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/web/hub_jobs.py +13 -2
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/web/middleware.py +48 -13
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/web/pty_session.py +26 -13
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/web/schemas.py +25 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/web/static_assets.py +56 -0
- codex_autorunner-0.1.2/src/codex_autorunner/web/static_refresh.py +86 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2/src/codex_autorunner.egg-info}/PKG-INFO +3 -1
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner.egg-info/SOURCES.txt +53 -1
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner.egg-info/requires.txt +2 -0
- codex_autorunner-0.1.2/tests/test_agent_policy.py +258 -0
- codex_autorunner-0.1.2/tests/test_agents_registry.py +239 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_api_contract.py +5 -0
- codex_autorunner-0.1.2/tests/test_app_server_event_formatter.py +252 -0
- codex_autorunner-0.1.2/tests/test_cli_status.py +53 -0
- codex_autorunner-0.1.2/tests/test_codex_app_server_integration.py +358 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_config_resolution.py +143 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_doc_chat.py +1 -1
- codex_autorunner-0.1.2/tests/test_docs_todos.py +148 -0
- codex_autorunner-0.1.2/tests/test_engine_end_review.py +102 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_hub_create.py +2 -2
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_hub_foundation.py +1 -1
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_hub_supervisor.py +46 -2
- codex_autorunner-0.1.2/tests/test_lock_utils.py +62 -0
- codex_autorunner-0.1.2/tests/test_opencode_agent_config.py +176 -0
- codex_autorunner-0.1.2/tests/test_opencode_client.py +37 -0
- codex_autorunner-0.1.2/tests/test_opencode_review_arguments.py +32 -0
- codex_autorunner-0.1.2/tests/test_opencode_runtime.py +421 -0
- codex_autorunner-0.1.2/tests/test_orchestrator.py +600 -0
- codex_autorunner-0.1.2/tests/test_request_logging.py +172 -0
- codex_autorunner-0.1.2/tests/test_review_context.py +35 -0
- codex_autorunner-0.1.2/tests/test_review_service.py +16 -0
- codex_autorunner-0.1.2/tests/test_runner_controller.py +266 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_state_lock.py +1 -1
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_state_sessions.py +1 -1
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_static_asset_cache.py +18 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_adapter.py +157 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_bot_config.py +33 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_bot_integration.py +9 -3
- codex_autorunner-0.1.2/tests/test_telegram_fast_ack.py +257 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_handlers_callbacks.py +63 -4
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_handlers_messages.py +37 -11
- codex_autorunner-0.1.2/tests/test_telegram_media_batch_failure.py +46 -0
- codex_autorunner-0.1.2/tests/test_telegram_opencode_context_cache.py +74 -0
- codex_autorunner-0.1.2/tests/test_telegram_opencode_usage.py +53 -0
- codex_autorunner-0.1.2/tests/test_telegram_outbox.py +67 -0
- codex_autorunner-0.1.2/tests/test_telegram_pr_flow.py +129 -0
- codex_autorunner-0.1.2/tests/test_telegram_progress_stream.py +27 -0
- codex_autorunner-0.1.2/tests/test_telegram_review_opencode.py +337 -0
- codex_autorunner-0.1.2/tests/test_telegram_state.py +17 -0
- codex_autorunner-0.1.2/tests/test_telegram_status_rate_limits.py +131 -0
- codex_autorunner-0.1.2/tests/test_telegram_topic_queue.py +30 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_turn_queue.py +15 -7
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_update_dedupe.py +4 -4
- codex_autorunner-0.1.1/src/codex_autorunner/agents/__init__.py +0 -1
- codex_autorunner-0.1.1/src/codex_autorunner/agents/opencode/client.py +0 -309
- codex_autorunner-0.1.1/src/codex_autorunner/agents/opencode/runtime.py +0 -509
- codex_autorunner-0.1.1/src/codex_autorunner/core/runner_process.py +0 -29
- codex_autorunner-0.1.1/src/codex_autorunner/core/state.py +0 -160
- codex_autorunner-0.1.1/src/codex_autorunner/core/utils.py +0 -133
- codex_autorunner-0.1.1/src/codex_autorunner/integrations/telegram/handlers/commands_runtime.py +0 -7476
- codex_autorunner-0.1.1/src/codex_autorunner/integrations/telegram/state.py +0 -1268
- codex_autorunner-0.1.1/src/codex_autorunner/routes/runs.py +0 -118
- codex_autorunner-0.1.1/tests/test_docs_todos.py +0 -15
- codex_autorunner-0.1.1/tests/test_lock_utils.py +0 -20
- codex_autorunner-0.1.1/tests/test_opencode_runtime.py +0 -85
- codex_autorunner-0.1.1/tests/test_request_logging.py +0 -66
- codex_autorunner-0.1.1/tests/test_runner_controller.py +0 -46
- codex_autorunner-0.1.1/tests/test_telegram_outbox.py +0 -64
- codex_autorunner-0.1.1/tests/test_telegram_state.py +0 -11
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/LICENSE +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/README.md +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/setup.cfg +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/__init__.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/agents/codex/__init__.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/agents/opencode/events.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/codex_cli.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/codex_runner.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/__init__.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/about_car.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/app_server_threads.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/codex_runner.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/git_utils.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/injected_context.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/notifications.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/optional_dependencies.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/patch_utils.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/prompt.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/prompts.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/request_context.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/snapshot.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/update.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/core/update_runner.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/housekeeping.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/__init__.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/app_server/__init__.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/app_server/env.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/app_server/supervisor.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/github/__init__.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/github/chatops.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/github/pr_flow.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/github/service.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/__init__.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/commands_registry.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/handlers/__init__.py +0 -0
- /codex_autorunner-0.1.1/src/codex_autorunner/integrations/telegram/handlers/commands.py → /codex_autorunner-0.1.2/src/codex_autorunner/integrations/telegram/handlers/commands_spec.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/overflow.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/rendering.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/integrations/telegram/retry.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/manifest.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/app_server.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/docs.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/github.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/routes/terminal_images.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/server.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/autoRefresh.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/bootstrap.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/bus.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/cache.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/constants.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docChatEvents.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docChatRender.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docChatStream.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docs.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsClipboard.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsCrud.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsDocUpdates.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsDrafts.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsElements.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsParse.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsSnapshot.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsSpecIngest.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsState.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsThreadRegistry.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsUi.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/docsVoice.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/env.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/loader.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/mobileCompact.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/snapshot.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/tabs.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/terminal.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/todoPreview.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/utils.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/LICENSE.xterm +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-400-cyrillic-ext.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-400-cyrillic.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-400-greek.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-400-latin-ext.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-400-latin.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-400-vietnamese.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-500-cyrillic-ext.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-500-cyrillic.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-500-greek.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-500-latin-ext.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-500-latin.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-500-vietnamese.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-600-cyrillic-ext.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-600-cyrillic.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-600-greek.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-600-latin-ext.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-600-latin.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/JetBrainsMono-600-vietnamese.woff2 +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/fonts/jetbrains-mono/OFL.txt +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/xterm-addon-fit.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/xterm.css +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/static/vendor/xterm.js +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/voice/__init__.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/voice/config.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/voice/provider.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/voice/providers/__init__.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/voice/providers/openai_whisper.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/voice/resolver.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/web/__init__.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/web/runner_manager.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/web/terminal_sessions.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/workspace.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner.egg-info/dependency_links.txt +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner.egg-info/entry_points.txt +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner.egg-info/top_level.txt +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_about_car_terminal_context.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_app_server_client.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_app_server_events.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_app_server_prompts.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_app_server_supervisor.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_app_server_thread_registry.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_auth_middleware.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_base_path.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_base_path_static.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_chatops.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_cli_init.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_cli_sessions.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_cli_snapshot.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_codex_cli_flags.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_codex_runner.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_doc_chat_ui.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_docs_validation.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_engine_app_server.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_engine_logs.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_github_context_hook.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_github_service.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_github_sync_pr_agentic.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_housekeeping.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_hub_terminal_sessions.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_hub_ui_escape.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_logging_utils.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_notifications.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_opencode_integration.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_optional_dependencies.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_origin_middleware.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_patch_utils.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_pr_flow.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_prompt.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_snapshot_api.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_snapshot_core.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_snapshot_incremental.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_spec_ingest.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_sse_streams.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_static.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_system_update_check.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_system_update_worker.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_bot_lock.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_cache_cleanup.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_command_registry.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_interrupt_status.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_overflow.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_paths_compatible.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_task_tracking.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_thread_paths.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_transport.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_telegram_whisper_disclaimer.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_terminal_idle_timeout.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_terminal_input_dedupe.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_usage.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_voice_capture.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_voice_config.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_voice_service.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_voice_transcribe_endpoint.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_voice_ui.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_voice_whisper_mime_types.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_voice_whisper_provider.py +0 -0
- {codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/tests/test_workspace_helpers.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codex-autorunner
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Codex autorunner CLI per DESIGN-V1
|
|
5
5
|
Author: Codex
|
|
6
6
|
License: MIT License
|
|
@@ -45,10 +45,12 @@ Requires-Dist: ptyprocess>=0.7
|
|
|
45
45
|
Requires-Dist: python-multipart>=0.0.9
|
|
46
46
|
Requires-Dist: python-dotenv>=1.0
|
|
47
47
|
Requires-Dist: httpx>=0.27
|
|
48
|
+
Requires-Dist: tenacity>=8.0
|
|
48
49
|
Provides-Extra: dev
|
|
49
50
|
Requires-Dist: black==25.11.0; extra == "dev"
|
|
50
51
|
Requires-Dist: mypy>=1.10; extra == "dev"
|
|
51
52
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
53
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
52
54
|
Requires-Dist: pytest-timeout>=2.0; extra == "dev"
|
|
53
55
|
Requires-Dist: ruff>=0.5.0; extra == "dev"
|
|
54
56
|
Requires-Dist: types-PyYAML; extra == "dev"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "codex-autorunner"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.2"
|
|
4
4
|
description = "Codex autorunner CLI per DESIGN-V1"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = {file = "LICENSE"}
|
|
@@ -16,6 +16,7 @@ dependencies = [
|
|
|
16
16
|
"python-multipart>=0.0.9",
|
|
17
17
|
"python-dotenv>=1.0",
|
|
18
18
|
"httpx>=0.27",
|
|
19
|
+
"tenacity>=8.0",
|
|
19
20
|
]
|
|
20
21
|
classifiers = [
|
|
21
22
|
"License :: OSI Approved :: MIT License",
|
|
@@ -35,6 +36,7 @@ dev = [
|
|
|
35
36
|
"black==25.11.0",
|
|
36
37
|
"mypy>=1.10",
|
|
37
38
|
"pytest>=7.0",
|
|
39
|
+
"pytest-asyncio>=0.23",
|
|
38
40
|
"pytest-timeout>=2.0",
|
|
39
41
|
"ruff>=0.5.0",
|
|
40
42
|
"types-PyYAML",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Agent harness abstractions."""
|
|
2
|
+
|
|
3
|
+
from .registry import (
|
|
4
|
+
AgentCapability,
|
|
5
|
+
AgentDescriptor,
|
|
6
|
+
get_agent_descriptor,
|
|
7
|
+
get_available_agents,
|
|
8
|
+
get_registered_agents,
|
|
9
|
+
has_capability,
|
|
10
|
+
validate_agent_id,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"AgentCapability",
|
|
15
|
+
"AgentDescriptor",
|
|
16
|
+
"get_registered_agents",
|
|
17
|
+
"get_available_agents",
|
|
18
|
+
"get_agent_descriptor",
|
|
19
|
+
"validate_agent_id",
|
|
20
|
+
"has_capability",
|
|
21
|
+
]
|
|
@@ -3,11 +3,11 @@ from __future__ import annotations
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import Any, AsyncIterator, Optional, Protocol
|
|
5
5
|
|
|
6
|
-
from .types import ConversationRef, ModelCatalog, TurnRef
|
|
6
|
+
from .types import AgentId, ConversationRef, ModelCatalog, TurnRef
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class AgentHarness(Protocol):
|
|
10
|
-
agent_id:
|
|
10
|
+
agent_id: AgentId
|
|
11
11
|
display_name: str
|
|
12
12
|
|
|
13
13
|
async def ensure_ready(self, workspace_root: Path) -> None: ...
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
"""Centralized approval and sandbox policy mappings for Codex and OpenCode agents."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from typing import Any, Optional, Union
|
|
5
|
+
|
|
6
|
+
# ========================================================================
|
|
7
|
+
# Approval Policies
|
|
8
|
+
# ========================================================================
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ApprovalPolicy:
|
|
12
|
+
"""Canonical approval policy values for both Codex and OpenCode."""
|
|
13
|
+
|
|
14
|
+
NEVER = "never"
|
|
15
|
+
ON_FAILURE = "on-failure"
|
|
16
|
+
ON_REQUEST = "on-request"
|
|
17
|
+
UNTRUSTED = "untrusted"
|
|
18
|
+
|
|
19
|
+
ALL_VALUES = {NEVER, ON_FAILURE, ON_REQUEST, UNTRUSTED}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# ========================================================================
|
|
23
|
+
# Sandbox Policies (Codex)
|
|
24
|
+
# ========================================================================
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class SandboxPolicy:
|
|
28
|
+
"""Canonical sandbox policy values for Codex app-server."""
|
|
29
|
+
|
|
30
|
+
DANGER_FULL_ACCESS = "dangerFullAccess"
|
|
31
|
+
READ_ONLY = "readOnly"
|
|
32
|
+
WORKSPACE_WRITE = "workspaceWrite"
|
|
33
|
+
EXTERNAL_SANDBOX = "externalSandbox"
|
|
34
|
+
|
|
35
|
+
ALL_VALUES = {
|
|
36
|
+
DANGER_FULL_ACCESS,
|
|
37
|
+
READ_ONLY,
|
|
38
|
+
WORKSPACE_WRITE,
|
|
39
|
+
EXTERNAL_SANDBOX,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# ========================================================================
|
|
44
|
+
# Permission Policies (OpenCode)
|
|
45
|
+
# ========================================================================
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class PermissionPolicy:
|
|
49
|
+
"""Canonical permission policy values for OpenCode."""
|
|
50
|
+
|
|
51
|
+
ALLOW = "allow"
|
|
52
|
+
DENY = "deny"
|
|
53
|
+
ASK = "ask"
|
|
54
|
+
|
|
55
|
+
ALL_VALUES = {ALLOW, DENY, ASK}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# ========================================================================
|
|
59
|
+
# Data Classes
|
|
60
|
+
# ========================================================================
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@dataclass
|
|
64
|
+
class SandboxPolicyConfig:
|
|
65
|
+
"""Configuration for Codex sandbox policies."""
|
|
66
|
+
|
|
67
|
+
policy: Union[str, dict[str, Any]]
|
|
68
|
+
"""Either a string policy type or full policy dict with type and options."""
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@dataclass
|
|
72
|
+
class PolicyMapping:
|
|
73
|
+
"""Unified policy mapping for both Codex and OpenCode agents."""
|
|
74
|
+
|
|
75
|
+
approval_policy: str
|
|
76
|
+
sandbox_policy: Union[str, dict[str, Any]]
|
|
77
|
+
permission_policy: Optional[str] = None
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# ========================================================================
|
|
81
|
+
# Normalization Functions
|
|
82
|
+
# ========================================================================
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def normalize_approval_policy(policy: Optional[str]) -> str:
|
|
86
|
+
"""Normalize approval policy to canonical value.
|
|
87
|
+
|
|
88
|
+
Args:
|
|
89
|
+
policy: Approval policy string (case-insensitive, various aliases accepted).
|
|
90
|
+
|
|
91
|
+
Returns:
|
|
92
|
+
Canonical approval policy value.
|
|
93
|
+
|
|
94
|
+
Raises:
|
|
95
|
+
ValueError: If policy is not a recognized value.
|
|
96
|
+
"""
|
|
97
|
+
if policy is None:
|
|
98
|
+
return ApprovalPolicy.NEVER
|
|
99
|
+
|
|
100
|
+
if not isinstance(policy, str):
|
|
101
|
+
raise ValueError(f"Invalid approval policy: {policy!r}")
|
|
102
|
+
|
|
103
|
+
normalized = policy.strip()
|
|
104
|
+
if not normalized:
|
|
105
|
+
raise ValueError(f"Invalid approval policy: {policy!r}")
|
|
106
|
+
|
|
107
|
+
normalized = normalized.lower()
|
|
108
|
+
|
|
109
|
+
# Aliases for never
|
|
110
|
+
if normalized in ("never", "no", "false", "0"):
|
|
111
|
+
return ApprovalPolicy.NEVER
|
|
112
|
+
|
|
113
|
+
# Aliases for on-failure
|
|
114
|
+
if normalized in (
|
|
115
|
+
"on-failure",
|
|
116
|
+
"on_failure",
|
|
117
|
+
"onfailure",
|
|
118
|
+
"fail",
|
|
119
|
+
"failure",
|
|
120
|
+
):
|
|
121
|
+
return ApprovalPolicy.ON_FAILURE
|
|
122
|
+
|
|
123
|
+
# Aliases for on-request
|
|
124
|
+
if normalized in ("on-request", "on_request", "onrequest", "ask", "prompt"):
|
|
125
|
+
return ApprovalPolicy.ON_REQUEST
|
|
126
|
+
|
|
127
|
+
# Aliases for untrusted
|
|
128
|
+
if normalized in (
|
|
129
|
+
"untrusted",
|
|
130
|
+
"unlesstrusted",
|
|
131
|
+
"unless-trusted",
|
|
132
|
+
"unless trusted",
|
|
133
|
+
"auto",
|
|
134
|
+
):
|
|
135
|
+
return ApprovalPolicy.UNTRUSTED
|
|
136
|
+
|
|
137
|
+
raise ValueError(
|
|
138
|
+
f"Invalid approval policy: {policy!r}. "
|
|
139
|
+
f"Valid values: {', '.join(sorted(ApprovalPolicy.ALL_VALUES))}"
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def normalize_sandbox_policy(policy: Optional[Any]) -> Union[str, dict[str, Any]]:
|
|
144
|
+
"""Normalize sandbox policy to canonical value.
|
|
145
|
+
|
|
146
|
+
Args:
|
|
147
|
+
policy: Sandbox policy (string or dict with 'type' field).
|
|
148
|
+
|
|
149
|
+
Returns:
|
|
150
|
+
Normalized sandbox policy as string or dict.
|
|
151
|
+
"""
|
|
152
|
+
if policy is None:
|
|
153
|
+
return SandboxPolicy.DANGER_FULL_ACCESS
|
|
154
|
+
|
|
155
|
+
# If it's a dict, normalize the type field
|
|
156
|
+
if isinstance(policy, dict):
|
|
157
|
+
policy_value = policy.copy()
|
|
158
|
+
type_value = policy_value.get("type")
|
|
159
|
+
if isinstance(type_value, str):
|
|
160
|
+
policy_value["type"] = normalize_sandbox_policy_type(type_value)
|
|
161
|
+
return policy_value
|
|
162
|
+
|
|
163
|
+
# If it's a string, wrap in dict structure
|
|
164
|
+
if isinstance(policy, str):
|
|
165
|
+
normalized_type = normalize_sandbox_policy_type(policy)
|
|
166
|
+
return {"type": normalized_type}
|
|
167
|
+
|
|
168
|
+
# For other types, convert to string and wrap
|
|
169
|
+
return {"type": SandboxPolicy.DANGER_FULL_ACCESS}
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def normalize_sandbox_policy_type(raw: str) -> str:
|
|
173
|
+
"""Normalize sandbox policy type string to canonical value.
|
|
174
|
+
|
|
175
|
+
Args:
|
|
176
|
+
raw: Sandbox policy type string (case-insensitive).
|
|
177
|
+
|
|
178
|
+
Returns:
|
|
179
|
+
Canonical sandbox policy type.
|
|
180
|
+
"""
|
|
181
|
+
if not raw:
|
|
182
|
+
return SandboxPolicy.DANGER_FULL_ACCESS
|
|
183
|
+
|
|
184
|
+
# Normalize case and remove special characters
|
|
185
|
+
import re
|
|
186
|
+
|
|
187
|
+
cleaned = re.sub(r"[^a-zA-Z0-9]+", "", raw.strip())
|
|
188
|
+
if not cleaned:
|
|
189
|
+
return SandboxPolicy.DANGER_FULL_ACCESS
|
|
190
|
+
|
|
191
|
+
canonical = _SANDBOX_POLICY_CANONICAL.get(cleaned.lower())
|
|
192
|
+
return canonical or raw.strip()
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
_SANDBOX_POLICY_CANONICAL = {
|
|
196
|
+
"dangerfullaccess": SandboxPolicy.DANGER_FULL_ACCESS,
|
|
197
|
+
"readonly": SandboxPolicy.READ_ONLY,
|
|
198
|
+
"workspacewrite": SandboxPolicy.WORKSPACE_WRITE,
|
|
199
|
+
"externalsandbox": SandboxPolicy.EXTERNAL_SANDBOX,
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
# ========================================================================
|
|
204
|
+
# Mapping Functions
|
|
205
|
+
# ========================================================================
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def map_approval_to_permission(
|
|
209
|
+
approval_policy: Optional[str], *, default: str = PermissionPolicy.ALLOW
|
|
210
|
+
) -> str:
|
|
211
|
+
"""Map approval policy to OpenCode permission policy.
|
|
212
|
+
|
|
213
|
+
This maps Codex-style approval policies to OpenCode-style permission policies.
|
|
214
|
+
|
|
215
|
+
Args:
|
|
216
|
+
approval_policy: Codex approval policy.
|
|
217
|
+
default: Default permission if policy is None or unrecognized.
|
|
218
|
+
|
|
219
|
+
Returns:
|
|
220
|
+
OpenCode permission policy (allow/deny/ask).
|
|
221
|
+
"""
|
|
222
|
+
if approval_policy is None:
|
|
223
|
+
return default
|
|
224
|
+
|
|
225
|
+
try:
|
|
226
|
+
normalized = normalize_approval_policy(approval_policy)
|
|
227
|
+
except ValueError:
|
|
228
|
+
# Invalid policy, return default
|
|
229
|
+
return default
|
|
230
|
+
|
|
231
|
+
# Direct matches
|
|
232
|
+
if normalized == ApprovalPolicy.NEVER:
|
|
233
|
+
return PermissionPolicy.ALLOW
|
|
234
|
+
if normalized == ApprovalPolicy.ON_FAILURE:
|
|
235
|
+
return PermissionPolicy.ASK
|
|
236
|
+
if normalized == ApprovalPolicy.ON_REQUEST:
|
|
237
|
+
return PermissionPolicy.ASK
|
|
238
|
+
if normalized == ApprovalPolicy.UNTRUSTED:
|
|
239
|
+
return PermissionPolicy.ASK
|
|
240
|
+
|
|
241
|
+
return default
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
def build_codex_sandbox_policy(
|
|
245
|
+
sandbox_mode: Optional[str],
|
|
246
|
+
*,
|
|
247
|
+
repo_root: Optional[Any] = None,
|
|
248
|
+
network_access: bool = False,
|
|
249
|
+
) -> Union[str, dict[str, Any]]:
|
|
250
|
+
"""Build Codex sandbox policy from mode string.
|
|
251
|
+
|
|
252
|
+
Args:
|
|
253
|
+
sandbox_mode: Sandbox mode string.
|
|
254
|
+
repo_root: Repository root path (for workspaceWrite policy).
|
|
255
|
+
network_access: Whether to allow network access (for workspaceWrite).
|
|
256
|
+
|
|
257
|
+
Returns:
|
|
258
|
+
Sandbox policy string or dict.
|
|
259
|
+
"""
|
|
260
|
+
if not sandbox_mode:
|
|
261
|
+
return SandboxPolicy.DANGER_FULL_ACCESS
|
|
262
|
+
|
|
263
|
+
normalized_mode = normalize_sandbox_policy_type(sandbox_mode)
|
|
264
|
+
|
|
265
|
+
# workspaceWrite requires dict structure with writableRoots and networkAccess
|
|
266
|
+
if normalized_mode == SandboxPolicy.WORKSPACE_WRITE and repo_root is not None:
|
|
267
|
+
return {
|
|
268
|
+
"type": SandboxPolicy.WORKSPACE_WRITE,
|
|
269
|
+
"writableRoots": [str(repo_root)],
|
|
270
|
+
"networkAccess": network_access,
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
# Other modes can be simple strings
|
|
274
|
+
return normalized_mode
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
# ========================================================================
|
|
278
|
+
# Exports
|
|
279
|
+
# ========================================================================
|
|
280
|
+
|
|
281
|
+
__all__ = [
|
|
282
|
+
"ApprovalPolicy",
|
|
283
|
+
"SandboxPolicy",
|
|
284
|
+
"PermissionPolicy",
|
|
285
|
+
"SandboxPolicyConfig",
|
|
286
|
+
"PolicyMapping",
|
|
287
|
+
"normalize_approval_policy",
|
|
288
|
+
"normalize_sandbox_policy",
|
|
289
|
+
"normalize_sandbox_policy_type",
|
|
290
|
+
"map_approval_to_permission",
|
|
291
|
+
"build_codex_sandbox_policy",
|
|
292
|
+
]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Optional, cast
|
|
4
|
+
|
|
5
|
+
from ..core.app_server_events import AppServerEventBuffer
|
|
6
|
+
from ..integrations.app_server.supervisor import WorkspaceAppServerSupervisor
|
|
7
|
+
from .codex.harness import CodexHarness
|
|
8
|
+
from .opencode.harness import OpenCodeHarness
|
|
9
|
+
from .opencode.supervisor import OpenCodeSupervisor
|
|
10
|
+
from .orchestrator import AgentOrchestrator, CodexOrchestrator, OpenCodeOrchestrator
|
|
11
|
+
from .registry import get_agent_descriptor
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def create_orchestrator(
|
|
15
|
+
agent_id: str,
|
|
16
|
+
codex_supervisor: Optional[WorkspaceAppServerSupervisor] = None,
|
|
17
|
+
codex_events: Optional[AppServerEventBuffer] = None,
|
|
18
|
+
opencode_supervisor: Optional[OpenCodeSupervisor] = None,
|
|
19
|
+
) -> AgentOrchestrator:
|
|
20
|
+
descriptor = get_agent_descriptor(agent_id)
|
|
21
|
+
if descriptor is None:
|
|
22
|
+
raise ValueError(f"Unknown agent: {agent_id}")
|
|
23
|
+
|
|
24
|
+
class _AppContext:
|
|
25
|
+
def __init__(
|
|
26
|
+
self,
|
|
27
|
+
app_server_supervisor: Optional[WorkspaceAppServerSupervisor] = None,
|
|
28
|
+
app_server_events: Optional[AppServerEventBuffer] = None,
|
|
29
|
+
opencode_supervisor: Optional[OpenCodeSupervisor] = None,
|
|
30
|
+
):
|
|
31
|
+
self.app_server_supervisor = app_server_supervisor
|
|
32
|
+
self.app_server_events = app_server_events
|
|
33
|
+
self.opencode_supervisor = opencode_supervisor
|
|
34
|
+
|
|
35
|
+
app_ctx = _AppContext(codex_supervisor, codex_events, opencode_supervisor)
|
|
36
|
+
harness = descriptor.make_harness(app_ctx)
|
|
37
|
+
|
|
38
|
+
if agent_id == "codex":
|
|
39
|
+
if not isinstance(harness, CodexHarness):
|
|
40
|
+
raise RuntimeError(f"Expected CodexHarness but got {type(harness)}")
|
|
41
|
+
return CodexOrchestrator(harness, cast(AppServerEventBuffer, codex_events))
|
|
42
|
+
elif agent_id == "opencode":
|
|
43
|
+
if not isinstance(harness, OpenCodeHarness):
|
|
44
|
+
raise RuntimeError(f"Expected OpenCodeHarness but got {type(harness)}")
|
|
45
|
+
return OpenCodeOrchestrator(harness)
|
|
46
|
+
else:
|
|
47
|
+
raise RuntimeError(f"No orchestrator implementation for agent: {agent_id}")
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
__all__ = [
|
|
51
|
+
"create_orchestrator",
|
|
52
|
+
]
|
{codex_autorunner-0.1.1 → codex_autorunner-0.1.2}/src/codex_autorunner/agents/opencode/__init__.py
RENAMED
|
@@ -3,12 +3,16 @@
|
|
|
3
3
|
from .client import OpenCodeClient
|
|
4
4
|
from .events import SSEEvent, parse_sse_lines
|
|
5
5
|
from .harness import OpenCodeHarness
|
|
6
|
+
from .run_prompt import OpenCodeRunConfig, OpenCodeRunResult, run_opencode_prompt
|
|
6
7
|
from .supervisor import OpenCodeSupervisor
|
|
7
8
|
|
|
8
9
|
__all__ = [
|
|
9
10
|
"OpenCodeClient",
|
|
10
11
|
"OpenCodeHarness",
|
|
12
|
+
"OpenCodeRunConfig",
|
|
13
|
+
"OpenCodeRunResult",
|
|
11
14
|
"OpenCodeSupervisor",
|
|
12
15
|
"SSEEvent",
|
|
13
16
|
"parse_sse_lines",
|
|
17
|
+
"run_opencode_prompt",
|
|
14
18
|
]
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
import logging
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Optional
|
|
7
|
+
|
|
8
|
+
logger = logging.getLogger(__name__)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
async def ensure_agent_config(
|
|
12
|
+
workspace_root: Path,
|
|
13
|
+
agent_id: str,
|
|
14
|
+
model: Optional[str],
|
|
15
|
+
title: Optional[str] = None,
|
|
16
|
+
description: Optional[str] = None,
|
|
17
|
+
) -> None:
|
|
18
|
+
"""Ensure .opencode/agent/<agent_id>.md exists with frontmatter config.
|
|
19
|
+
|
|
20
|
+
Args:
|
|
21
|
+
workspace_root: Path to the workspace root
|
|
22
|
+
agent_id: Agent ID (e.g., "subagent")
|
|
23
|
+
model: Model ID in format "providerID/modelID" (e.g., "zai-coding-plan/glm-4.7-flashx")
|
|
24
|
+
title: Optional title for the agent
|
|
25
|
+
description: Optional description for the agent
|
|
26
|
+
"""
|
|
27
|
+
if model is None:
|
|
28
|
+
logger.debug(f"Skipping agent config for {agent_id}: no model configured")
|
|
29
|
+
return
|
|
30
|
+
|
|
31
|
+
agent_dir = workspace_root / ".opencode" / "agent"
|
|
32
|
+
agent_file = agent_dir / f"{agent_id}.md"
|
|
33
|
+
|
|
34
|
+
# Check if file already exists and has the correct model
|
|
35
|
+
if agent_file.exists():
|
|
36
|
+
existing_content = agent_file.read_text(encoding="utf-8")
|
|
37
|
+
existing_model = _extract_model_from_frontmatter(existing_content)
|
|
38
|
+
if existing_model == model:
|
|
39
|
+
logger.debug(f"Agent config already exists for {agent_id}: {agent_file}")
|
|
40
|
+
return
|
|
41
|
+
|
|
42
|
+
# Create agent directory if needed
|
|
43
|
+
await asyncio.to_thread(agent_dir.mkdir, parents=True, exist_ok=True)
|
|
44
|
+
|
|
45
|
+
# Build agent markdown with frontmatter
|
|
46
|
+
content = _build_agent_md(
|
|
47
|
+
agent_id=agent_id,
|
|
48
|
+
model=model,
|
|
49
|
+
title=title or agent_id,
|
|
50
|
+
description=description or f"Subagent for {agent_id} tasks",
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
# Write atomically
|
|
54
|
+
await asyncio.to_thread(agent_file.write_text, content, encoding="utf-8")
|
|
55
|
+
logger.info(f"Created agent config: {agent_file} with model {model}")
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _build_agent_md(
|
|
59
|
+
agent_id: str,
|
|
60
|
+
model: str,
|
|
61
|
+
title: str,
|
|
62
|
+
description: str,
|
|
63
|
+
) -> str:
|
|
64
|
+
"""Generate markdown with YAML frontmatter.
|
|
65
|
+
|
|
66
|
+
Frontmatter format per OpenCode config schema:
|
|
67
|
+
---
|
|
68
|
+
agent: <agent_id>
|
|
69
|
+
title: "<title>"
|
|
70
|
+
description: "<description>"
|
|
71
|
+
model: <providerID>/<modelID>
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
<Optional agent instructions go here>
|
|
75
|
+
"""
|
|
76
|
+
return f"""---
|
|
77
|
+
agent: {agent_id}
|
|
78
|
+
title: "{title}"
|
|
79
|
+
description: "{description}"
|
|
80
|
+
model: {model}
|
|
81
|
+
---
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _extract_model_from_frontmatter(content: str) -> Optional[str]:
|
|
86
|
+
"""Extract model value from YAML frontmatter.
|
|
87
|
+
|
|
88
|
+
Returns None if frontmatter or model field is not found.
|
|
89
|
+
"""
|
|
90
|
+
lines = content.splitlines()
|
|
91
|
+
if not lines or not lines[0].startswith("---"):
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
for _i, line in enumerate(lines[1:], start=1):
|
|
95
|
+
if line.startswith("---"):
|
|
96
|
+
break
|
|
97
|
+
if line.startswith("model:"):
|
|
98
|
+
model = line.split(":", 1)[1].strip()
|
|
99
|
+
return model if model else None
|
|
100
|
+
|
|
101
|
+
return None
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
__all__ = ["ensure_agent_config"]
|