teddy-cli 0.1.15__tar.gz → 0.1.16.dev1149__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.
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/PKG-INFO +1 -1
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/pyproject.toml +1 -1
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/__main__.py +130 -54
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/cli_helpers.py +9 -8
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/session_cli_handlers.py +489 -45
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/textual_plan_reviewer.py +7 -1
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_editor.py +29 -18
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/console_interactor.py +37 -24
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/console_interactor_ask_loop.py +55 -33
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/console_interactor_helpers.py +6 -31
- teddy_cli-0.1.16.dev1149/src/teddy_executor/adapters/outbound/console_tooling.py +188 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/litellm_adapter.py +155 -25
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/local_file_system_adapter.py +40 -6
- teddy_cli-0.1.16.dev1149/src/teddy_executor/adapters/outbound/openrouter_hydrator.py +167 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/shell_adapter.py +94 -8
- teddy_cli-0.1.16.dev1149/src/teddy_executor/adapters/outbound/suppressed_logging.py +39 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/system_environment_adapter.py +18 -21
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/system_environment_inspector.py +20 -1
- teddy_cli-0.1.16.dev1149/src/teddy_executor/adapters/outbound/terminal_quit_key_listener.py +154 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/web_scraper_adapter.py +17 -11
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/web_searcher_adapter.py +6 -4
- teddy_cli-0.1.16.dev1149/src/teddy_executor/adapters/outbound/yaml_config_adapter.py +350 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/container.py +36 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/execution_report.py +2 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/orchestrator_ports.py +2 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/planning_ports.py +9 -1
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/shell_output.py +4 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/inbound/init.py +2 -2
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/inbound/planning_use_case.py +4 -2
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/inbound/run_plan_use_case.py +3 -3
- teddy_cli-0.1.16.dev1149/src/teddy_executor/core/ports/outbound/config_service.py +55 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/file_system_manager.py +23 -2
- teddy_cli-0.1.16.dev1149/src/teddy_executor/core/ports/outbound/quit_key_listener.py +32 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/session_manager.py +23 -1
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/system_environment.py +4 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/web_scraper.py +3 -1
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/action_dispatcher.py +6 -1
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/context_service.py +4 -2
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/execution_orchestrator.py +31 -7
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/execution_report_assembler.py +7 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/init_service.py +58 -8
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/markdown_plan_parser.py +1 -1
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/planning_service.py +5 -3
- teddy_cli-0.1.16.dev1149/src/teddy_executor/core/services/session_lifecycle_manager.py +560 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/session_orchestrator.py +127 -59
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/session_planner.py +11 -5
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/session_repository.py +1 -1
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/session_service.py +80 -73
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/templates/execution_report.md.j2 +55 -40
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/update_checker.py +3 -1
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/validation_rules/edit.py +1 -1
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/validation_rules/edit_matcher.py +22 -5
- teddy_cli-0.1.16.dev1149/src/teddy_executor/core/utils/interrupt_guard.py +110 -0
- teddy_cli-0.1.16.dev1149/src/teddy_executor/core/utils/stdin_ownership.py +43 -0
- teddy_cli-0.1.16.dev1149/src/teddy_executor/core/utils/terminal.py +47 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/registries/infrastructure.py +9 -1
- teddy_cli-0.1.16.dev1149/src/teddy_executor/registries/reviewer.py +35 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/config/config.yaml +15 -3
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/config/prompts/debugger.xml +2 -2
- teddy_cli-0.1.15/src/teddy_executor/adapters/inbound/console_plan_reviewer.py +0 -69
- teddy_cli-0.1.15/src/teddy_executor/adapters/outbound/console_tooling.py +0 -76
- teddy_cli-0.1.15/src/teddy_executor/adapters/outbound/openrouter_hydrator.py +0 -89
- teddy_cli-0.1.15/src/teddy_executor/adapters/outbound/yaml_config_adapter.py +0 -105
- teddy_cli-0.1.15/src/teddy_executor/core/ports/outbound/config_service.py +0 -29
- teddy_cli-0.1.15/src/teddy_executor/core/services/session_lifecycle_manager.py +0 -233
- teddy_cli-0.1.15/src/teddy_executor/registries/reviewer.py +0 -59
- teddy_cli-0.1.15/src/teddy_executor/resources/config/.gitignore +0 -2
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/.gitignore +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/LICENSE +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/cli_formatter.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_app.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_execution.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_helpers.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_logic.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_previews.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_widgets.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/filesystem_helpers.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/local_repo_tree_generator.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/shell_command_builder.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/outbound/system_time_adapter.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/action_ports.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/change_set.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/exceptions.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/plan.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/project_context.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/report_assembly_data.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/session.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/domain/models/web_search_results.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/inbound/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/inbound/edit_simulator.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/inbound/get_context_use_case.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/inbound/plan_parser.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/inbound/plan_reviewer.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/inbound/plan_validator.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/environment_inspector.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/execution_report_assembler.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/llm_client.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/markdown_report_formatter.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/prompt_manager.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/repo_tree_generator.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/session_loop_guard.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/session_repository.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/shell_executor.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/time_service.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/user_interactor.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/ports/outbound/web_searcher.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/action_changeset_builder.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/action_diff_manager.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/action_executor.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/action_factory.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/action_parser_complex.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/action_parser_strategies.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/edit_simulator.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/markdown_report_formatter.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/parser_infrastructure.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/parser_metadata.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/parser_reporting.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/plan_validator.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/prompt_manager.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/session_loop_guard.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/session_pruning_service.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/session_replanner.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/validation_rules/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/validation_rules/edit_matcher_heuristics.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/validation_rules/execute.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/validation_rules/filesystem.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/validation_rules/helpers.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/services/validation_rules/message.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/utils/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/utils/diff.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/utils/io.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/utils/markdown.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/utils/serialization.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/core/utils/string.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/prompts.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/registries/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/registries/validators.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/config/__init__.py +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/config/init.context +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/config/prompts/architect.xml +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/config/prompts/assistant.xml +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/config/prompts/developer.xml +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/config/prompts/pathfinder.xml +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/config/prompts/prototyper.xml +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/templates/ARCHITECTURE.md +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/templates/MM-NN-vertical-slice.md +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/templates/MM-milestone.md +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/templates/NN-case-file.md +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/templates/NN-task-brief.md +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/templates/PROJECT.md +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/templates/ci.md +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/templates/component-design.md +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/templates/makefile.md +0 -0
- {teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/resources/templates/specification-document.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "teddy-cli"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.16.dev1149"
|
|
4
4
|
description = "A local-first, file-based AI coding workflow that applies the UNIX philosophy to AI collaboration."
|
|
5
5
|
authors = [{ name = "Raphael Atteritano" }]
|
|
6
6
|
license = { text = "AGPL-3.0-only" }
|
|
@@ -11,6 +11,8 @@ import typer
|
|
|
11
11
|
from teddy_executor.core.domain.models import (
|
|
12
12
|
ExecutionReport,
|
|
13
13
|
)
|
|
14
|
+
from teddy_executor.core.ports.outbound.config_service import IConfigService
|
|
15
|
+
from teddy_executor.core.ports.outbound.system_environment import ISystemEnvironment
|
|
14
16
|
|
|
15
17
|
if TYPE_CHECKING:
|
|
16
18
|
from teddy_executor.core.ports.inbound.plan_parser import IPlanParser
|
|
@@ -42,13 +44,6 @@ def get_container():
|
|
|
42
44
|
return _get_container()
|
|
43
45
|
|
|
44
46
|
|
|
45
|
-
def _apply_ui_mode_override(container, ui_mode_bool: bool) -> None:
|
|
46
|
-
from teddy_executor.container import register_reviewer
|
|
47
|
-
|
|
48
|
-
mode = "tui" if ui_mode_bool else "console"
|
|
49
|
-
register_reviewer(container, ui_mode=mode)
|
|
50
|
-
|
|
51
|
-
|
|
52
47
|
logging.basicConfig(
|
|
53
48
|
level=logging.INFO,
|
|
54
49
|
format="%(message)s",
|
|
@@ -57,6 +52,54 @@ logging.basicConfig(
|
|
|
57
52
|
)
|
|
58
53
|
|
|
59
54
|
|
|
55
|
+
def _resolve_yolo(yolo: Optional[bool], config_service: IConfigService) -> bool:
|
|
56
|
+
"""Resolve the effective YOLO mode (single-sourced across commands).
|
|
57
|
+
|
|
58
|
+
An explicit flag always wins (``--yolo`` / ``-y`` -> ``True``,
|
|
59
|
+
``--no-yolo`` / ``-n`` -> ``False``). When the flag is unset, the mode
|
|
60
|
+
falls back to the ``yolo_default`` config setting (code default ``False``).
|
|
61
|
+
"""
|
|
62
|
+
if yolo is not None:
|
|
63
|
+
return yolo
|
|
64
|
+
return bool(config_service.get_setting("yolo_default", False))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def _resolve_setup_editor(
|
|
68
|
+
system_env: ISystemEnvironment,
|
|
69
|
+
interactive: bool,
|
|
70
|
+
message: Optional[str],
|
|
71
|
+
pipeline: bool,
|
|
72
|
+
) -> bool:
|
|
73
|
+
"""Resolve whether the one-time editor setup should run (Slice 00-26).
|
|
74
|
+
|
|
75
|
+
The editor gate keys on "will the session actually read the terminal"
|
|
76
|
+
rather than on the approval (``interactive``) flag: setup runs only when a
|
|
77
|
+
terminal is attached (``system_env.isatty``), the run is not a pipeline,
|
|
78
|
+
and the session will either enter the approval loop (``interactive``) or
|
|
79
|
+
block on the opening-message prompt (``message is None``). This lets a yolo
|
|
80
|
+
run without ``-m`` configure its editor once, while fully-specified batch
|
|
81
|
+
runs (``-y -m``), pipeline runs, and non-TTY (CI/piped) runs stay
|
|
82
|
+
prompt-free.
|
|
83
|
+
"""
|
|
84
|
+
return system_env.isatty() and not pipeline and (interactive or message is None)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def _resolve_setup_api_key(
|
|
88
|
+
system_env: ISystemEnvironment,
|
|
89
|
+
pipeline: bool,
|
|
90
|
+
) -> bool:
|
|
91
|
+
"""Resolve whether the interactive LLM API-key setup should run.
|
|
92
|
+
|
|
93
|
+
Unlike the optional editor, the LLM API key is REQUIRED, so its gate is
|
|
94
|
+
deliberately WIDER: setup runs whenever a terminal is attached and the run
|
|
95
|
+
is not a pipeline. There is intentionally no ``interactive``/``-m`` clause --
|
|
96
|
+
a fully-specified batch run (``-y -m``) on a TTY still prompts, because the
|
|
97
|
+
session cannot proceed without a key. Pipeline runs remain the clean
|
|
98
|
+
automation path (they hard-error by design).
|
|
99
|
+
"""
|
|
100
|
+
return system_env.isatty() and not pipeline
|
|
101
|
+
|
|
102
|
+
|
|
60
103
|
def _ensure_project_initialized(container, root_dir: str | None = None) -> None:
|
|
61
104
|
"""Lazily performs project anchoring and initialization.
|
|
62
105
|
|
|
@@ -110,8 +153,11 @@ def _ensure_project_initialized(container, root_dir: str | None = None) -> None:
|
|
|
110
153
|
OPT_NO_COPY = typer.Option(
|
|
111
154
|
False, "--no-copy", help="Do not copy the output to the clipboard."
|
|
112
155
|
)
|
|
113
|
-
|
|
114
|
-
|
|
156
|
+
OPT_PIPELINE = typer.Option(
|
|
157
|
+
False,
|
|
158
|
+
"--pipeline",
|
|
159
|
+
"-p",
|
|
160
|
+
help="Pipeline mode: auto-approve all actions, requires -m, exits after first ## Message.",
|
|
115
161
|
)
|
|
116
162
|
|
|
117
163
|
|
|
@@ -121,28 +167,28 @@ def start( # noqa: PLR0913
|
|
|
121
167
|
agent: str = typer.Option(
|
|
122
168
|
"pathfinder", "--agent", "-a", help="Agent prompt to use."
|
|
123
169
|
),
|
|
124
|
-
yolo: bool = typer.Option(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
170
|
+
yolo: Optional[bool] = typer.Option(
|
|
171
|
+
None,
|
|
172
|
+
"--yolo/--no-yolo",
|
|
173
|
+
"-y/-n",
|
|
174
|
+
help=(
|
|
175
|
+
"Auto-approve all actions (non-interactive). "
|
|
176
|
+
"--no-yolo / -n forces interactive mode."
|
|
177
|
+
),
|
|
132
178
|
),
|
|
133
|
-
|
|
134
|
-
no_interactive: bool = typer.Option(False, "--no-interactive", hidden=True),
|
|
135
|
-
non_interactive: bool = typer.Option(False, "--non-interactive", hidden=True),
|
|
179
|
+
pipeline: bool = OPT_PIPELINE,
|
|
136
180
|
no_copy: bool = OPT_NO_COPY,
|
|
137
|
-
ui_mode: Optional[bool] = OPT_UI_MODE,
|
|
138
181
|
message: Optional[str] = typer.Option(
|
|
139
182
|
None, "-m", "--message", help="Instruction for the first turn."
|
|
140
183
|
),
|
|
141
|
-
context: Optional[str] = typer.Option(
|
|
184
|
+
context: Optional[list[str]] = typer.Option(
|
|
142
185
|
None,
|
|
143
186
|
"--context",
|
|
144
187
|
"-c",
|
|
145
|
-
help=
|
|
188
|
+
help=(
|
|
189
|
+
"Additional files/dirs for context. Repeatable (-c a.py -c b.md); "
|
|
190
|
+
'comma-separated values are also accepted (-c "a.py,b.md").'
|
|
191
|
+
),
|
|
146
192
|
),
|
|
147
193
|
model: Optional[str] = typer.Option(None, "--model", help="LLM model override."),
|
|
148
194
|
provider: Optional[str] = typer.Option(
|
|
@@ -159,16 +205,30 @@ def start( # noqa: PLR0913
|
|
|
159
205
|
|
|
160
206
|
container = get_container()
|
|
161
207
|
_ensure_project_initialized(container)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
208
|
+
config_service = container.resolve(IConfigService)
|
|
209
|
+
|
|
210
|
+
additional_context = (
|
|
211
|
+
[
|
|
212
|
+
path.strip()
|
|
213
|
+
for occurrence in context
|
|
214
|
+
for path in occurrence.split(",")
|
|
215
|
+
if path.strip()
|
|
216
|
+
]
|
|
217
|
+
if context
|
|
218
|
+
else None
|
|
219
|
+
)
|
|
166
220
|
|
|
221
|
+
interactive = not (_resolve_yolo(yolo, config_service) or pipeline)
|
|
222
|
+
system_env = container.resolve(ISystemEnvironment)
|
|
167
223
|
handle_new_session(
|
|
168
224
|
container=container,
|
|
169
225
|
name=name,
|
|
170
226
|
agent=agent,
|
|
171
|
-
interactive=
|
|
227
|
+
interactive=interactive,
|
|
228
|
+
setup_editor=_resolve_setup_editor(
|
|
229
|
+
system_env, interactive=interactive, message=message, pipeline=pipeline
|
|
230
|
+
),
|
|
231
|
+
setup_api_key=_resolve_setup_api_key(system_env, pipeline=pipeline),
|
|
172
232
|
no_copy=no_copy,
|
|
173
233
|
message=message,
|
|
174
234
|
pipeline=pipeline,
|
|
@@ -294,15 +354,13 @@ def update(
|
|
|
294
354
|
typer.echo("To apply prompt updates, run: teddy init prompts")
|
|
295
355
|
elif experimental:
|
|
296
356
|
typer.echo(f"A new experimental version {latest} is available.")
|
|
297
|
-
typer.echo(
|
|
298
|
-
"To upgrade, run: uv tool install teddy-cli --pre --force --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ --index-strategy unsafe-best-match"
|
|
299
|
-
)
|
|
357
|
+
typer.echo("To upgrade, run: uv tool install teddy-cli --pre --force")
|
|
300
358
|
typer.echo("To apply prompt updates, run: teddy init prompts")
|
|
301
359
|
else:
|
|
302
360
|
typer.echo(f"A new version {latest} is available.")
|
|
303
|
-
# A pre-release install comes from
|
|
304
|
-
# `uv tool upgrade` cannot reliably move the tool off
|
|
305
|
-
#
|
|
361
|
+
# A pre-release install comes from PyPI with a dev version (--pre).
|
|
362
|
+
# `uv tool upgrade` cannot reliably move the tool off --pre back to
|
|
363
|
+
# stable, so force a reinstall from the default index instead.
|
|
306
364
|
if is_prerelease(current):
|
|
307
365
|
typer.echo("To upgrade, run: uv tool install teddy-cli --force")
|
|
308
366
|
else:
|
|
@@ -372,14 +430,16 @@ def create_parser_for_plan(plan_content: str) -> IPlanParser:
|
|
|
372
430
|
@app.command()
|
|
373
431
|
def resume( # noqa: PLR0913
|
|
374
432
|
path: Optional[str] = typer.Argument(None, help="Path to session or turn."),
|
|
375
|
-
yolo: bool = typer.Option(
|
|
376
|
-
|
|
433
|
+
yolo: Optional[bool] = typer.Option(
|
|
434
|
+
None,
|
|
435
|
+
"--yolo/--no-yolo",
|
|
436
|
+
"-y/-n",
|
|
437
|
+
help=(
|
|
438
|
+
"Auto-approve all actions (non-interactive). "
|
|
439
|
+
"--no-yolo / -n forces interactive mode."
|
|
440
|
+
),
|
|
377
441
|
),
|
|
378
|
-
yes: bool = typer.Option(False, "--yes", hidden=True),
|
|
379
|
-
no_interactive: bool = typer.Option(False, "--no-interactive", hidden=True),
|
|
380
|
-
non_interactive: bool = typer.Option(False, "--non-interactive", hidden=True),
|
|
381
442
|
no_copy: bool = OPT_NO_COPY,
|
|
382
|
-
ui_mode: Optional[bool] = OPT_UI_MODE,
|
|
383
443
|
model: Optional[str] = typer.Option(None, "--model", help="LLM model override."),
|
|
384
444
|
provider: Optional[str] = typer.Option(
|
|
385
445
|
None, "--provider", help="LLM provider override."
|
|
@@ -387,28 +447,44 @@ def resume( # noqa: PLR0913
|
|
|
387
447
|
api_key: Optional[str] = typer.Option(
|
|
388
448
|
None, "--api-key", help="LLM API key override."
|
|
389
449
|
),
|
|
450
|
+
message: Optional[str] = typer.Option(
|
|
451
|
+
None,
|
|
452
|
+
"--message",
|
|
453
|
+
"-m",
|
|
454
|
+
help=(
|
|
455
|
+
"Inject a user request/reply without interactive prompting "
|
|
456
|
+
"(e.g. to continue after interrupting a --yolo run)."
|
|
457
|
+
),
|
|
458
|
+
),
|
|
459
|
+
pipeline: bool = OPT_PIPELINE,
|
|
390
460
|
):
|
|
391
461
|
"""
|
|
392
462
|
Intelligently resumes the last turn of a session or starts a new one.
|
|
393
463
|
"""
|
|
394
|
-
from teddy_executor.adapters.inbound.cli_helpers import apply_ui_mode_override
|
|
395
464
|
from teddy_executor.adapters.inbound.session_cli_handlers import (
|
|
396
465
|
handle_resume_session,
|
|
397
466
|
)
|
|
398
467
|
|
|
399
468
|
container = get_container()
|
|
400
469
|
_ensure_project_initialized(container)
|
|
401
|
-
|
|
402
|
-
apply_ui_mode_override(container, ui_mode)
|
|
470
|
+
config_service = container.resolve(IConfigService)
|
|
403
471
|
|
|
472
|
+
interactive = not (_resolve_yolo(yolo, config_service) or pipeline)
|
|
473
|
+
system_env = container.resolve(ISystemEnvironment)
|
|
404
474
|
handle_resume_session(
|
|
405
475
|
container=container,
|
|
406
476
|
path=path,
|
|
407
|
-
interactive=
|
|
477
|
+
interactive=interactive,
|
|
478
|
+
setup_editor=_resolve_setup_editor(
|
|
479
|
+
system_env, interactive=interactive, message=message, pipeline=pipeline
|
|
480
|
+
),
|
|
481
|
+
setup_api_key=_resolve_setup_api_key(system_env, pipeline=pipeline),
|
|
408
482
|
no_copy=no_copy,
|
|
409
483
|
model=model,
|
|
410
484
|
provider=provider,
|
|
411
485
|
api_key=api_key,
|
|
486
|
+
message=message,
|
|
487
|
+
pipeline=pipeline,
|
|
412
488
|
)
|
|
413
489
|
|
|
414
490
|
|
|
@@ -417,17 +493,19 @@ def execute( # noqa: PLR0913
|
|
|
417
493
|
plan_file: Optional[Path] = typer.Argument(
|
|
418
494
|
None, help="Root-relative path to the plan file (.md).", show_default=False
|
|
419
495
|
),
|
|
420
|
-
yolo: bool = typer.Option(
|
|
421
|
-
|
|
496
|
+
yolo: Optional[bool] = typer.Option(
|
|
497
|
+
None,
|
|
498
|
+
"--yolo/--no-yolo",
|
|
499
|
+
"-y/-n",
|
|
500
|
+
help=(
|
|
501
|
+
"Auto-approve all actions (non-interactive). "
|
|
502
|
+
"--no-yolo / -n forces interactive mode."
|
|
503
|
+
),
|
|
422
504
|
),
|
|
423
|
-
yes: bool = typer.Option(False, "--yes", hidden=True),
|
|
424
|
-
no_interactive: bool = typer.Option(False, "--no-interactive", hidden=True),
|
|
425
|
-
non_interactive: bool = typer.Option(False, "--non-interactive", hidden=True),
|
|
426
505
|
no_copy: bool = OPT_NO_COPY,
|
|
427
506
|
plan_content: Optional[str] = typer.Option(
|
|
428
507
|
None, "--plan-content", help="Plan content.", show_default=False
|
|
429
508
|
),
|
|
430
|
-
ui_mode: Optional[bool] = OPT_UI_MODE,
|
|
431
509
|
message: Optional[str] = typer.Option(
|
|
432
510
|
None, "-m", "--message", help="Optional instruction for the report."
|
|
433
511
|
),
|
|
@@ -436,7 +514,6 @@ def execute( # noqa: PLR0913
|
|
|
436
514
|
Executes a Markdown plan file (from path or clipboard) and generates an execution report.
|
|
437
515
|
"""
|
|
438
516
|
from teddy_executor.adapters.inbound.cli_helpers import (
|
|
439
|
-
apply_ui_mode_override,
|
|
440
517
|
get_plan_content,
|
|
441
518
|
handle_report_output,
|
|
442
519
|
)
|
|
@@ -444,13 +521,12 @@ def execute( # noqa: PLR0913
|
|
|
444
521
|
from teddy_executor.core.ports.inbound.run_plan_use_case import IRunPlanUseCase
|
|
445
522
|
|
|
446
523
|
report: Optional[ExecutionReport] = None
|
|
447
|
-
interactive_mode = not (yolo or yes or no_interactive or non_interactive)
|
|
448
524
|
start_time = datetime.now(timezone.utc)
|
|
449
525
|
|
|
450
526
|
container = get_container()
|
|
451
527
|
_ensure_project_initialized(container)
|
|
452
|
-
|
|
453
|
-
|
|
528
|
+
config_service = container.resolve(IConfigService)
|
|
529
|
+
interactive_mode = not _resolve_yolo(yolo, config_service)
|
|
454
530
|
|
|
455
531
|
try:
|
|
456
532
|
final_plan_content = get_plan_content(plan_content, plan_file)
|
{teddy_cli-0.1.15 → teddy_cli-0.1.16.dev1149}/src/teddy_executor/adapters/inbound/cli_helpers.py
RENAMED
|
@@ -241,14 +241,6 @@ def handle_report_output(
|
|
|
241
241
|
raise typer.Exit(code=1)
|
|
242
242
|
|
|
243
243
|
|
|
244
|
-
def apply_ui_mode_override(container: Container, ui_mode_bool: bool) -> None:
|
|
245
|
-
"""Applies a UI mode override to the container."""
|
|
246
|
-
from teddy_executor.container import register_reviewer
|
|
247
|
-
|
|
248
|
-
mode = "tui" if ui_mode_bool else "console"
|
|
249
|
-
register_reviewer(container, ui_mode=mode)
|
|
250
|
-
|
|
251
|
-
|
|
252
244
|
def prewarm_imports() -> None:
|
|
253
245
|
"""
|
|
254
246
|
Pre-warm heavy imports to reduce first-run latency.
|
|
@@ -260,5 +252,14 @@ def prewarm_imports() -> None:
|
|
|
260
252
|
import pyperclip # noqa: F401
|
|
261
253
|
from bs4 import BeautifulSoup # noqa: F401
|
|
262
254
|
from ddgs import DDGS # noqa: F401
|
|
255
|
+
import tiktoken # noqa: F401
|
|
256
|
+
|
|
257
|
+
try:
|
|
258
|
+
tiktoken.get_encoding("cl100k_base")
|
|
259
|
+
except Exception:
|
|
260
|
+
logger.warning(
|
|
261
|
+
"Failed to prewarm tiktoken encoding (best-effort)",
|
|
262
|
+
exc_info=True,
|
|
263
|
+
)
|
|
263
264
|
except ImportError:
|
|
264
265
|
pass
|