codepp 0.0.447__tar.gz → 0.0.448__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.
- {codepp-0.0.447 → codepp-0.0.448}/PKG-INFO +1 -5
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/_core_bridge.py +146 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/base_agent.py +102 -43
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/callbacks.py +30 -29
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/fast_puppy/builder.py +65 -124
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/fast_puppy/register_callbacks.py +33 -13
- codepp-0.0.448/code_puppy/plugins/git_auto_commit/README.md +118 -0
- codepp-0.0.448/code_puppy/plugins/git_auto_commit/__init__.py +100 -0
- codepp-0.0.448/code_puppy/plugins/git_auto_commit/cli.py +184 -0
- codepp-0.0.448/code_puppy/plugins/git_auto_commit/commit_flow.py +350 -0
- codepp-0.0.448/code_puppy/plugins/git_auto_commit/context_guard.py +256 -0
- codepp-0.0.448/code_puppy/plugins/git_auto_commit/policy_errors.py +122 -0
- codepp-0.0.448/code_puppy/plugins/git_auto_commit/register_callbacks.py +251 -0
- codepp-0.0.448/code_puppy/plugins/git_auto_commit/shell_bridge.py +243 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/repo_compass/formatter.py +1 -1
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/repo_compass/register_callbacks.py +11 -1
- codepp-0.0.448/code_puppy/plugins/repo_compass/turbo_indexer_bridge.py +107 -0
- {codepp-0.0.447 → codepp-0.0.448}/pyproject.toml +2 -8
- {codepp-0.0.447 → codepp-0.0.448}/.gitignore +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/LICENSE +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/README.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/__main__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/_backlog.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/adaptive_rate_limiter.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agent_model_pinning.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_code_puppy.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_code_reviewer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_code_scout.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_creator_agent.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_golang_reviewer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_helios.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_identity.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_javascript_reviewer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_manager.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_pack_leader.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_planning.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_prompt_mixin.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_python_programmer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_python_reviewer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_qa_expert.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_qa_kitten.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_scheduler.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_security_auditor.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_state.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_terminal_qa.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_turbo_executor.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/agent_typescript_reviewer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/event_stream_handler.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/history_manager.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/json_agent.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/pack/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/pack/bloodhound.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/pack/retriever.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/pack/shepherd.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/pack/terrier.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/pack/watchdog.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/prompt_reviewer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/agents/subagent_stream_handler.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/api/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/api/app.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/api/main.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/api/pty_manager.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/api/routers/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/api/routers/agents.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/api/routers/commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/api/routers/config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/api/routers/sessions.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/api/templates/terminal.html +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/api/websocket.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/app_runner.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/async_utils.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/capability/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/capability/builtin_providers.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/capability/registry.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/capability/types.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/chatgpt_codex_client.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/circuit_state.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/claude_cache_client.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/cli_runner.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/code_context/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/code_context/explorer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/code_context/models.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/code_context.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/add_model_menu.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/agent_menu.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/attachments.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/autosave_menu.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/clipboard.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/colors_menu.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/command_handler.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/command_registry.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/concurrency_commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/config_commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/core_commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/diff_menu.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/file_path_completion.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/load_context_completion.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/base.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/catalog_server_installer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/custom_server_form.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/custom_server_installer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/edit_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/handler.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/help_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/install_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/install_menu.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/list_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/logs_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/remove_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/restart_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/search_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/start_all_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/start_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/status_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/stop_all_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/stop_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/test_command.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/utils.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp/wizard_utils.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/mcp_completion.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/model_picker_completion.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/model_settings_menu.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/motd.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/onboarding_slides.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/onboarding_wizard.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/pack_commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/pagination.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/pin_command_completion.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/preset_commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/prompt_toolkit_completion.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/repl_commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/session_commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/shell_passthrough.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/skills_completion.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/staged_commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/uc_menu.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/utils.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/wiggum_state.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/command_line/workflow_commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/compaction/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/compaction/file_ops_tracker.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/compaction/history_offload.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/compaction/thresholds.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/compaction/tool_arg_truncation.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/concurrency_limits.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/config_package/README.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/config_package/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/config_package/_resolvers.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/config_package/env_helpers.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/config_package/loader.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/config_package/models.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/config_presets.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/console.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/constants.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/dbos_utils.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/error_logging.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/errors.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/gemini_code_assist.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/gemini_model.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/hook_engine/README.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/hook_engine/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/hook_engine/aliases.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/hook_engine/engine.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/hook_engine/executor.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/hook_engine/matcher.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/hook_engine/models.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/hook_engine/registry.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/hook_engine/validator.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/http_utils.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/interactive_loop.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/keymap.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/main.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/async_lifecycle.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/blocking_startup.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/captured_stdio_server.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/circuit_breaker.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/config_wizard.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/dashboard.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/error_isolation.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/examples/retry_example.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/health_monitor.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/managed_server.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/manager.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/mcp_logs.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/mcp_security.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/registry.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/retry_manager.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/server_registry_catalog.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/status_tracker.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_/system_tools.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_prompts/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/mcp_prompts/hook_creator.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/bus.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/history_buffer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/markdown_patches.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/message_queue.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/messages.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/queue_console.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/renderers.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/rich_renderer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/spinner/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/spinner/console_spinner.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/spinner/spinner_base.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/messaging/subagent_console.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/model_availability.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/model_config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/model_factory.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/model_packs.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/model_switching.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/model_utils.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/models.json +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/models_dev_api.json +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/models_dev_parser.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/permission_decision.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/persistence.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/CONTRACT.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/README.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/agents/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/agents/ap_arbiter.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/agents/ap_planner_a.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/agents/ap_planner_b.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/agents/ap_red_team.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/agents/ap_researcher.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/agents/ap_reviewer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/agents/base_adversarial_agent.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/evidence.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/models.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/orchestrator.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/phases/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/phases/base_phase.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/prompt_builders.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/prompts/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/prompts/arbiter.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/prompts/planner_a.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/prompts/planner_b.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/prompts/red_team.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/prompts/researcher.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/prompts/reviewer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/prompts/shared_rules.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/renderers.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/tools.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/adversarial_planning/validators.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/agent_run_end.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/core.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/extraction.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/messaging.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/processing.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/prompts.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/signal_safeguards.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/signals.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/storage.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_memory/updater.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_shortcuts/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_shortcuts/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/README.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/discovery.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/downloader.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/installer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/metadata.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/prompt_builder.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/remote_catalog.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/skill_catalog.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/skills_install_menu.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/agent_skills/skills_menu.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/antigravity_oauth/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/antigravity_oauth/accounts.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/antigravity_oauth/antigravity_model.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/antigravity_oauth/config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/antigravity_oauth/constants.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/antigravity_oauth/oauth.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/antigravity_oauth/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/antigravity_oauth/storage.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/antigravity_oauth/test_plugin.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/antigravity_oauth/token.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/antigravity_oauth/transport.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/antigravity_oauth/utils.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/chatgpt_oauth/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/chatgpt_oauth/config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/chatgpt_oauth/oauth_flow.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/chatgpt_oauth/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/chatgpt_oauth/test_plugin.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/chatgpt_oauth/utils.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/claude_code_hooks/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/claude_code_hooks/config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/claude_code_hooks/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/claude_code_oauth/README.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/claude_code_oauth/SETUP.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/claude_code_oauth/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/claude_code_oauth/config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/claude_code_oauth/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/claude_code_oauth/test_plugin.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/claude_code_oauth/token_refresh_heartbeat.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/claude_code_oauth/utils.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/clean_command/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/clean_command/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/code_explorer/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/code_explorer/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/code_skeleton/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/code_skeleton/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/code_skeleton/skeleton.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/cost_estimator/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/cost_estimator/estimator.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/cost_estimator/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/customizable_commands/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/customizable_commands/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/error_classifier/DESIGN.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/error_classifier/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/error_classifier/builtins.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/error_classifier/exinfo.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/error_classifier/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/error_classifier/registry.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/error_logger/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/error_logger/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/example_custom_command/README.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/example_custom_command/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/file_mentions/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/file_mentions/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/file_permission_handler/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/file_permission_handler/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/flow_visualizer/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/flow_visualizer/lanes.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/flow_visualizer/panel.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/flow_visualizer/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/frontend_emitter/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/frontend_emitter/emitter.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/frontend_emitter/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/hook_creator/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/hook_creator/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/hook_manager/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/hook_manager/config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/hook_manager/hooks_menu.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/hook_manager/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/loop_detection/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/loop_detection/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/mana_bridge/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/mana_bridge/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/mana_bridge/tcp_client.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/oauth_puppy_html.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/ollama_setup/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/ollama_setup/completer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/ollama_setup/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/pack_parallelism/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/pack_parallelism/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/pack_parallelism/run_limiter.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/pop_command/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/pop_command/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/prompt_store/README.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/prompt_store/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/prompt_store/commands.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/prompt_store/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/prompt_store/store.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/remember_last_agent/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/remember_last_agent/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/remember_last_agent/storage.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/render_check/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/render_check/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/repo_compass/DESIGN.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/repo_compass/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/repo_compass/config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/repo_compass/indexer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/scheduler/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/scheduler/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/scheduler/scheduler_menu.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/scheduler/scheduler_wizard.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/session_logger/README.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/session_logger/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/session_logger/config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/session_logger/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/session_logger/writer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/shell_safety/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/shell_safety/agent_shell_safety.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/shell_safety/command_cache.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/shell_safety/regex_classifier.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/shell_safety/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/supervisor_review/README.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/supervisor_review/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/supervisor_review/models.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/supervisor_review/orchestrator.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/supervisor_review/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/supervisor_review/satisfaction.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/synthetic_status/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/synthetic_status/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/synthetic_status/status_api.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/theme_switcher/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/theme_switcher/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/tool_allowlist/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/tool_allowlist/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/tracing_langfuse/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/tracing_langfuse/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/tracing_langsmith/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/tracing_langsmith/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/ttsr/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/ttsr/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/ttsr/rule_loader.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/ttsr/stream_watcher.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/turbo_executor/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/turbo_executor/models.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/turbo_executor/notifications.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/turbo_executor/orchestrator.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/turbo_executor/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/turbo_executor/summarizer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/turbo_parse/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/turbo_parse/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/universal_constructor/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/universal_constructor/models.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/universal_constructor/register_callbacks.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/universal_constructor/registry.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/plugins/universal_constructor/sandbox.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/policy_config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/policy_engine.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/prompt_runner.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/prompts/antigravity_system_prompt.md +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/provider_identity.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/py.typed +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/pydantic_patches.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/reflection.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/reopenable_async_client.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/repl_session.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/request_cache.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/resilience.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/round_robin_model.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/routing/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/routing/composite.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/routing/router.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/routing/strategies/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/routing/strategies/availability.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/routing/strategies/default.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/routing/strategies/last_resort_strategy.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/routing/strategies/plugin.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/routing/strategy.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/run_context.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/runtime_state.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/scheduler/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/scheduler/__main__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/scheduler/cli.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/scheduler/config.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/scheduler/daemon.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/scheduler/executor.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/scheduler/platform.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/scheduler/platform_unix.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/scheduler/platform_win.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/security.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/session_storage.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/staged_changes.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/status_display.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/summarization_agent.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/terminal_utils.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/token_utils.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tool_schema.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/agent_tools.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/ask_user_question/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/ask_user_question/constants.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/ask_user_question/demo_tui.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/ask_user_question/handler.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/ask_user_question/helpers.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/ask_user_question/models.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/ask_user_question/registration.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/ask_user_question/renderers.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/ask_user_question/terminal_ui.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/ask_user_question/theme.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/ask_user_question/tui_loop.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/browser_control.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/browser_interactions.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/browser_locators.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/browser_manager.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/browser_navigation.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/browser_screenshot.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/browser_scripts.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/browser_workflows.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/chromium_terminal_manager.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/terminal_command_tools.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/terminal_screenshot_tools.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/browser/terminal_tools.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/command_runner.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/common.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/display.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/file_modifications.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/file_operations.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/scheduler_tools.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/skills_tools.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/subagent_context.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/tools_content.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tools/universal_constructor.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/app.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/base_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/completion.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/launcher.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/message_bridge.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/add_model_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/agent_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/autosave_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/colors_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/diff_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/hooks_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/mcp_form_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/mcp_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/model_pin_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/model_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/model_settings_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/onboarding_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/question_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/scheduler_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/scheduler_wizard_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/skills_install_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/skills_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/screens/uc_screen.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/stream_renderer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/theme.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/widgets/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/widgets/completion_overlay.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/widgets/info_bar.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/widgets/searchable_list.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/tui/widgets/split_panel.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/turbo_parse_bridge.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/__init__.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/adaptive_render.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/agent_helpers.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/checkpoint.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/clipboard.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/config_resolve.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/dag.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/debouncer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/editor_detect.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/emit.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/eol.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/file_display.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/file_mutex.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/fs_errors.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/gitignore.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/hashline.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/install_hints.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/llm_parsing.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/macos_path.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/min_duration.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/overflow_detect.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/parallel.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/path_safety.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/peek_file.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/ring_buffer.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/shell_split.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/stream_parser.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/subtask_parser.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/symbol_hierarchy.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/syntax_validate.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/utils/whitespace.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/uvx_detection.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/version_checker.py +0 -0
- {codepp-0.0.447 → codepp-0.0.448}/code_puppy/workflow_state.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codepp
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.448
|
|
4
4
|
Summary: Code generation agent
|
|
5
5
|
Project-URL: repository, https://github.com/mpfaffenberger/code_puppy
|
|
6
6
|
Project-URL: HomePage, https://github.com/mpfaffenberger/code_puppy
|
|
@@ -45,10 +45,6 @@ Requires-Dist: textual>=8.2.1
|
|
|
45
45
|
Requires-Dist: typer>=0.24.1
|
|
46
46
|
Requires-Dist: uvicorn[standard]>=0.42.0
|
|
47
47
|
Requires-Dist: websockets>=16.0
|
|
48
|
-
Provides-Extra: rust
|
|
49
|
-
Requires-Dist: codepuppy-rs-core>=0.1.0; extra == 'rust'
|
|
50
|
-
Requires-Dist: codepuppy-rs-turbo-ops>=0.1.0; extra == 'rust'
|
|
51
|
-
Requires-Dist: codepuppy-rs-turbo-parse>=0.1.0; extra == 'rust'
|
|
52
48
|
Description-Content-Type: text/markdown
|
|
53
49
|
|
|
54
50
|
<div align="center">
|
|
@@ -15,6 +15,7 @@ except ImportError:
|
|
|
15
15
|
|
|
16
16
|
try:
|
|
17
17
|
from _code_puppy_core import (
|
|
18
|
+
MessageBatch,
|
|
18
19
|
ProcessResult,
|
|
19
20
|
PruneResult,
|
|
20
21
|
SplitResult,
|
|
@@ -30,6 +31,7 @@ try:
|
|
|
30
31
|
RUST_AVAILABLE = True
|
|
31
32
|
except ImportError:
|
|
32
33
|
RUST_AVAILABLE = False
|
|
34
|
+
MessageBatch = None # type: ignore[assignment,misc]
|
|
33
35
|
|
|
34
36
|
# Provide type stubs so downstream code can reference them
|
|
35
37
|
ProcessResult = None # type: ignore[assignment,misc]
|
|
@@ -174,3 +176,147 @@ def serialize_message_for_rust(message: Any) -> dict:
|
|
|
174
176
|
def serialize_messages_for_rust(messages: list) -> list[dict]:
|
|
175
177
|
"""Batch convert messages for Rust consumption."""
|
|
176
178
|
return [serialize_message_for_rust(m) for m in messages]
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class MessageBatchHandle:
|
|
182
|
+
"""Zero-copy wrapper around Rust MessageBatch for batched operations.
|
|
183
|
+
|
|
184
|
+
This class serializes pydantic-ai messages ONCE during construction,
|
|
185
|
+
then allows multiple Rust operations without re-serialization.
|
|
186
|
+
|
|
187
|
+
Usage:
|
|
188
|
+
batch = MessageBatchHandle(messages)
|
|
189
|
+
result = batch.process(tool_defs, mcp_defs, system_prompt)
|
|
190
|
+
indices = batch.truncation_indices(protected_tokens, has_thinking)
|
|
191
|
+
pruned = batch.prune_and_filter(50000)
|
|
192
|
+
"""
|
|
193
|
+
|
|
194
|
+
__slots__ = ("_rust_batch", "_py_messages", "_serialized")
|
|
195
|
+
|
|
196
|
+
def __init__(self, messages: list) -> None:
|
|
197
|
+
"""Create batch from pydantic-ai ModelMessage list.
|
|
198
|
+
|
|
199
|
+
Args:
|
|
200
|
+
messages: List of pydantic-ai ModelMessage objects
|
|
201
|
+
"""
|
|
202
|
+
self._py_messages = messages
|
|
203
|
+
self._serialized = [serialize_message_for_rust(m) for m in messages]
|
|
204
|
+
|
|
205
|
+
if RUST_AVAILABLE:
|
|
206
|
+
self._rust_batch = MessageBatch(self._serialized)
|
|
207
|
+
else:
|
|
208
|
+
self._rust_batch = None
|
|
209
|
+
|
|
210
|
+
def __len__(self) -> int:
|
|
211
|
+
return len(self._py_messages)
|
|
212
|
+
|
|
213
|
+
@property
|
|
214
|
+
def messages(self) -> list:
|
|
215
|
+
"""Access original Python messages."""
|
|
216
|
+
return self._py_messages
|
|
217
|
+
|
|
218
|
+
@property
|
|
219
|
+
def serialized(self) -> list[dict]:
|
|
220
|
+
"""Access serialized dict form (for legacy code paths)."""
|
|
221
|
+
return self._serialized
|
|
222
|
+
|
|
223
|
+
def process(
|
|
224
|
+
self,
|
|
225
|
+
tool_definitions: list,
|
|
226
|
+
mcp_tool_definitions: list,
|
|
227
|
+
system_prompt: str,
|
|
228
|
+
) -> "ProcessResult":
|
|
229
|
+
"""Process messages and cache token counts."""
|
|
230
|
+
if self._rust_batch is not None:
|
|
231
|
+
return self._rust_batch.process(
|
|
232
|
+
tool_definitions, mcp_tool_definitions, system_prompt
|
|
233
|
+
)
|
|
234
|
+
# Fallback: use standalone function
|
|
235
|
+
return process_messages_batch(
|
|
236
|
+
self._serialized, tool_definitions, mcp_tool_definitions, system_prompt
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
def prune_and_filter(self, max_tokens_per_message: int = 50000) -> "PruneResult":
|
|
240
|
+
"""Prune interrupted tool calls and filter huge messages."""
|
|
241
|
+
if self._rust_batch is not None:
|
|
242
|
+
return self._rust_batch.prune_and_filter(max_tokens_per_message)
|
|
243
|
+
return prune_and_filter(self._serialized, max_tokens_per_message)
|
|
244
|
+
|
|
245
|
+
def truncation_indices(
|
|
246
|
+
self, protected_tokens: int, second_has_thinking: bool
|
|
247
|
+
) -> list[int]:
|
|
248
|
+
"""Get indices to keep after truncation."""
|
|
249
|
+
if self._rust_batch is not None:
|
|
250
|
+
return self._rust_batch.truncation_indices(protected_tokens, second_has_thinking)
|
|
251
|
+
# Fallback requires per_message_tokens - not available without process()
|
|
252
|
+
raise RuntimeError("truncation_indices requires process() to be called first")
|
|
253
|
+
|
|
254
|
+
def split_for_summarization(self, protected_tokens_limit: int) -> "SplitResult":
|
|
255
|
+
"""Split messages for summarization."""
|
|
256
|
+
if self._rust_batch is not None:
|
|
257
|
+
return self._rust_batch.split_for_summarization(protected_tokens_limit)
|
|
258
|
+
raise RuntimeError("split_for_summarization requires Rust batch with process() called")
|
|
259
|
+
|
|
260
|
+
def get_per_message_tokens(self) -> list[int] | None:
|
|
261
|
+
"""Get cached per-message token counts (None if process() not called)."""
|
|
262
|
+
if self._rust_batch is not None:
|
|
263
|
+
return self._rust_batch.get_per_message_tokens()
|
|
264
|
+
return None
|
|
265
|
+
|
|
266
|
+
def get_total_tokens(self) -> int | None:
|
|
267
|
+
"""Get cached total token count (None if process() not called)."""
|
|
268
|
+
if self._rust_batch is not None:
|
|
269
|
+
return self._rust_batch.get_total_tokens()
|
|
270
|
+
return None
|
|
271
|
+
|
|
272
|
+
def get_message_hashes(self) -> list[int] | None:
|
|
273
|
+
"""Get cached message hashes (None if process() not called)."""
|
|
274
|
+
if self._rust_batch is not None:
|
|
275
|
+
return self._rust_batch.get_message_hashes()
|
|
276
|
+
return None
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
def create_message_batch(messages: list) -> MessageBatchHandle:
|
|
280
|
+
"""Factory function for creating MessageBatchHandle.
|
|
281
|
+
|
|
282
|
+
Args:
|
|
283
|
+
messages: List of pydantic-ai ModelMessage objects
|
|
284
|
+
|
|
285
|
+
Returns:
|
|
286
|
+
MessageBatchHandle wrapping the messages
|
|
287
|
+
"""
|
|
288
|
+
return MessageBatchHandle(messages)
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
__all__ = [
|
|
292
|
+
# Core serialization
|
|
293
|
+
"serialize_message_for_rust",
|
|
294
|
+
"serialize_messages_for_rust",
|
|
295
|
+
# Message batch wrapper
|
|
296
|
+
"MessageBatchHandle",
|
|
297
|
+
"create_message_batch",
|
|
298
|
+
# Rust availability flags
|
|
299
|
+
"RUST_AVAILABLE",
|
|
300
|
+
"is_rust_enabled",
|
|
301
|
+
"set_rust_enabled",
|
|
302
|
+
"get_rust_status",
|
|
303
|
+
# Hashline acceleration
|
|
304
|
+
"HASHLINE_RUST_AVAILABLE",
|
|
305
|
+
"compute_line_hash",
|
|
306
|
+
"format_hashlines",
|
|
307
|
+
"strip_hashline_prefixes",
|
|
308
|
+
"validate_hashline_anchor",
|
|
309
|
+
# Rust types (for type hints)
|
|
310
|
+
"ProcessResult",
|
|
311
|
+
"PruneResult",
|
|
312
|
+
"SplitResult",
|
|
313
|
+
"MessageBatch",
|
|
314
|
+
# Standalone functions (for legacy/fallback use)
|
|
315
|
+
"process_messages_batch",
|
|
316
|
+
"prune_and_filter",
|
|
317
|
+
"truncation_indices",
|
|
318
|
+
"split_for_summarization",
|
|
319
|
+
"serialize_session",
|
|
320
|
+
"deserialize_session",
|
|
321
|
+
"serialize_session_incremental",
|
|
322
|
+
]
|
|
@@ -30,7 +30,11 @@ from pydantic_ai.durable_exec.dbos import DBOSAgent
|
|
|
30
30
|
# Rust acceleration bridge (optional - falls back to Python)
|
|
31
31
|
from code_puppy import _core_bridge
|
|
32
32
|
from code_puppy._core_bridge import RUST_AVAILABLE, is_rust_enabled
|
|
33
|
-
from code_puppy._core_bridge import
|
|
33
|
+
from code_puppy._core_bridge import (
|
|
34
|
+
serialize_messages_for_rust, # Keep for any remaining edge cases
|
|
35
|
+
MessageBatchHandle,
|
|
36
|
+
create_message_batch,
|
|
37
|
+
)
|
|
34
38
|
|
|
35
39
|
if RUST_AVAILABLE:
|
|
36
40
|
pass
|
|
@@ -142,6 +146,49 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
142
146
|
# Mutable runtime state container - separates state from immutable config
|
|
143
147
|
self._state = AgentRuntimeState()
|
|
144
148
|
|
|
149
|
+
# Message batch cache for avoiding repeated serialization
|
|
150
|
+
self._cached_batch: MessageBatchHandle | None = None
|
|
151
|
+
self._cached_batch_messages_id: int | None = None
|
|
152
|
+
self._cached_batch_messages_len: int = 0
|
|
153
|
+
|
|
154
|
+
def _get_or_create_batch(self, messages: list[ModelMessage]) -> MessageBatchHandle:
|
|
155
|
+
"""Return cached batch if messages unchanged, else create new.
|
|
156
|
+
|
|
157
|
+
Uses object identity and length as a fast heuristic for detecting
|
|
158
|
+
changes. This catches the common case where the same list object
|
|
159
|
+
is passed repeatedly, or where messages have been added.
|
|
160
|
+
|
|
161
|
+
Args:
|
|
162
|
+
messages: The message list to create a batch for
|
|
163
|
+
|
|
164
|
+
Returns:
|
|
165
|
+
MessageBatchHandle wrapping the messages (cached or new)
|
|
166
|
+
"""
|
|
167
|
+
msg_id = id(messages)
|
|
168
|
+
msg_len = len(messages)
|
|
169
|
+
|
|
170
|
+
# Cache hit: same list object with same length
|
|
171
|
+
if (self._cached_batch is not None and
|
|
172
|
+
self._cached_batch_messages_id == msg_id and
|
|
173
|
+
self._cached_batch_messages_len == msg_len):
|
|
174
|
+
return self._cached_batch
|
|
175
|
+
|
|
176
|
+
# Cache miss: create new batch
|
|
177
|
+
self._cached_batch = create_message_batch(messages)
|
|
178
|
+
self._cached_batch_messages_id = msg_id
|
|
179
|
+
self._cached_batch_messages_len = msg_len
|
|
180
|
+
return self._cached_batch
|
|
181
|
+
|
|
182
|
+
def _invalidate_batch_cache(self) -> None:
|
|
183
|
+
"""Invalidate the cached message batch.
|
|
184
|
+
|
|
185
|
+
Call this after mutating the message history to ensure
|
|
186
|
+
the next batch creation reflects the changes.
|
|
187
|
+
"""
|
|
188
|
+
self._cached_batch = None
|
|
189
|
+
self._cached_batch_messages_id = None
|
|
190
|
+
self._cached_batch_messages_len = 0
|
|
191
|
+
|
|
145
192
|
# Backward-compatible properties that delegate to _state for migration support
|
|
146
193
|
@property
|
|
147
194
|
def _puppy_rules(self) -> str | None:
|
|
@@ -745,23 +792,25 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
745
792
|
def filter_huge_messages(
|
|
746
793
|
self,
|
|
747
794
|
messages: list[ModelMessage],
|
|
748
|
-
serialized_messages: list[dict] | None = None,
|
|
795
|
+
serialized_messages: list[dict] | MessageBatchHandle | None = None,
|
|
749
796
|
) -> list[ModelMessage]:
|
|
750
797
|
"""Filter out messages that exceed the token threshold.
|
|
751
798
|
|
|
752
799
|
Args:
|
|
753
800
|
messages: List of messages to filter
|
|
754
|
-
serialized_messages: Pre-serialized messages for Rust (if available)
|
|
801
|
+
serialized_messages: Pre-serialized messages or MessageBatchHandle for Rust (if available)
|
|
755
802
|
|
|
756
803
|
Returns:
|
|
757
804
|
Filtered list of messages
|
|
758
805
|
"""
|
|
759
806
|
if _rust_enabled():
|
|
760
807
|
try:
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
808
|
+
# Use MessageBatchHandle if provided, otherwise create one
|
|
809
|
+
if isinstance(serialized_messages, MessageBatchHandle):
|
|
810
|
+
batch = serialized_messages
|
|
811
|
+
else:
|
|
812
|
+
batch = create_message_batch(messages)
|
|
813
|
+
result = batch.prune_and_filter(50000)
|
|
765
814
|
return [messages[i] for i in result.surviving_indices]
|
|
766
815
|
except Exception as exc:
|
|
767
816
|
logger.debug(
|
|
@@ -834,14 +883,14 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
834
883
|
def split_messages_for_protected_summarization(
|
|
835
884
|
self,
|
|
836
885
|
messages: list[ModelMessage],
|
|
837
|
-
serialized_messages: list[dict] | None = None,
|
|
886
|
+
serialized_messages: list[dict] | MessageBatchHandle | None = None,
|
|
838
887
|
) -> tuple[list[ModelMessage], list[ModelMessage]]:
|
|
839
888
|
"""
|
|
840
889
|
Split messages into two groups: messages to summarize and protected recent messages.
|
|
841
890
|
|
|
842
891
|
Args:
|
|
843
892
|
messages: Full message list to split
|
|
844
|
-
serialized_messages: Pre-serialized messages for Rust (if available)
|
|
893
|
+
serialized_messages: Pre-serialized messages or MessageBatchHandle for Rust (if available)
|
|
845
894
|
|
|
846
895
|
Returns:
|
|
847
896
|
Tuple of (messages_to_summarize, protected_messages)
|
|
@@ -877,12 +926,14 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
877
926
|
# --- Rust fast path ------------------------------------------------
|
|
878
927
|
if _rust_enabled():
|
|
879
928
|
try:
|
|
880
|
-
# Use
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
929
|
+
# Use MessageBatchHandle if provided, otherwise create one
|
|
930
|
+
if isinstance(serialized_messages, MessageBatchHandle):
|
|
931
|
+
batch = serialized_messages
|
|
932
|
+
else:
|
|
933
|
+
batch = create_message_batch(messages)
|
|
934
|
+
# Process to get per-message tokens (cached in batch)
|
|
935
|
+
batch.process([], [], "")
|
|
936
|
+
per_message_tokens = batch.get_per_message_tokens()
|
|
886
937
|
|
|
887
938
|
# Build tool_call_ids_per_message: list of [(id, kind), ...] per message
|
|
888
939
|
tool_call_ids_per_message: list[list[tuple[str, str]]] = []
|
|
@@ -1144,7 +1195,7 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1144
1195
|
self,
|
|
1145
1196
|
messages: list[ModelMessage],
|
|
1146
1197
|
with_protection: bool = True,
|
|
1147
|
-
serialized_messages: list[dict] | None = None,
|
|
1198
|
+
serialized_messages: list[dict] | MessageBatchHandle | None = None,
|
|
1148
1199
|
) -> tuple[list[ModelMessage], list[ModelMessage]]:
|
|
1149
1200
|
"""Summarize messages while protecting recent messages up to PROTECTED_TOKENS.
|
|
1150
1201
|
|
|
@@ -1161,7 +1212,7 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1161
1212
|
Args:
|
|
1162
1213
|
messages: Messages to summarize
|
|
1163
1214
|
with_protection: Whether to protect recent messages
|
|
1164
|
-
serialized_messages: Pre-serialized messages for Rust (if available)
|
|
1215
|
+
serialized_messages: Pre-serialized messages or MessageBatchHandle for Rust (if available)
|
|
1165
1216
|
|
|
1166
1217
|
Returns:
|
|
1167
1218
|
Tuple of (compacted_messages, summarized_source_messages)
|
|
@@ -1440,7 +1491,7 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1440
1491
|
def prune_interrupted_tool_calls(
|
|
1441
1492
|
self,
|
|
1442
1493
|
messages: list[ModelMessage],
|
|
1443
|
-
serialized_messages: list[dict] | None = None,
|
|
1494
|
+
serialized_messages: list[dict] | MessageBatchHandle | None = None,
|
|
1444
1495
|
) -> list[ModelMessage]:
|
|
1445
1496
|
"""
|
|
1446
1497
|
Remove any messages that participate in mismatched tool call sequences.
|
|
@@ -1451,7 +1502,7 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1451
1502
|
|
|
1452
1503
|
Args:
|
|
1453
1504
|
messages: List of messages to prune
|
|
1454
|
-
serialized_messages: Pre-serialized messages for Rust (if available)
|
|
1505
|
+
serialized_messages: Pre-serialized messages or MessageBatchHandle for Rust (if available)
|
|
1455
1506
|
|
|
1456
1507
|
Returns:
|
|
1457
1508
|
Pruned list of messages with mismatched tool calls removed
|
|
@@ -1463,10 +1514,12 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1463
1514
|
# in a single pass, plus filters empty thinking parts and trailing responses
|
|
1464
1515
|
if _rust_enabled():
|
|
1465
1516
|
try:
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1517
|
+
# Use MessageBatchHandle if provided, otherwise create one
|
|
1518
|
+
if isinstance(serialized_messages, MessageBatchHandle):
|
|
1519
|
+
batch = serialized_messages
|
|
1520
|
+
else:
|
|
1521
|
+
batch = create_message_batch(messages)
|
|
1522
|
+
result = batch.prune_and_filter(999_999_999)
|
|
1470
1523
|
return [messages[i] for i in result.surviving_indices]
|
|
1471
1524
|
except Exception as exc:
|
|
1472
1525
|
logger.debug(
|
|
@@ -1502,13 +1555,13 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1502
1555
|
# First, prune any interrupted/mismatched tool-call conversations
|
|
1503
1556
|
model_max = self.get_model_context_length()
|
|
1504
1557
|
|
|
1505
|
-
#
|
|
1506
|
-
|
|
1558
|
+
# Create MessageBatchHandle once and reuse for all Rust operations within this pipeline
|
|
1559
|
+
_message_batch: MessageBatchHandle | None = None
|
|
1507
1560
|
|
|
1508
1561
|
# Use Rust batch processing when available (single pass for tokens + hashes)
|
|
1509
1562
|
if _rust_enabled():
|
|
1510
1563
|
try:
|
|
1511
|
-
|
|
1564
|
+
_message_batch = self._get_or_create_batch(messages)
|
|
1512
1565
|
# Extract actual tool definitions for accurate context overhead
|
|
1513
1566
|
# Use cached tool_defs (only computed once per agent lifecycle)
|
|
1514
1567
|
if self._state.cached_tool_defs is None:
|
|
@@ -1539,9 +1592,7 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1539
1592
|
else ""
|
|
1540
1593
|
)
|
|
1541
1594
|
system_prompt = self._state.cached_system_prompt
|
|
1542
|
-
batch_result =
|
|
1543
|
-
_serialized_messages_for_rust, tool_defs, mcp_defs, system_prompt
|
|
1544
|
-
)
|
|
1595
|
+
batch_result = _message_batch.process(tool_defs, mcp_defs, system_prompt)
|
|
1545
1596
|
message_tokens = batch_result.total_message_tokens
|
|
1546
1597
|
context_overhead = batch_result.context_overhead_tokens
|
|
1547
1598
|
self._state.rust_per_message_tokens = batch_result.per_message_tokens
|
|
@@ -1550,6 +1601,7 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1550
1601
|
"Rust fallback in message_history_processor: %s", exc, exc_info=True
|
|
1551
1602
|
)
|
|
1552
1603
|
# Fall back to Python on any Rust error
|
|
1604
|
+
_message_batch = None # Reset batch on failure
|
|
1553
1605
|
message_tokens = sum(
|
|
1554
1606
|
self.estimate_tokens_for_message(msg) for msg in messages
|
|
1555
1607
|
)
|
|
@@ -1594,9 +1646,9 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1594
1646
|
if compaction_strategy == "truncation":
|
|
1595
1647
|
# Use truncation instead of summarization
|
|
1596
1648
|
protected_tokens = cfg.protected_token_count
|
|
1597
|
-
# Pass
|
|
1649
|
+
# Pass MessageBatchHandle to avoid re-serialization
|
|
1598
1650
|
filtered_messages = self.filter_huge_messages(
|
|
1599
|
-
messages, serialized_messages=
|
|
1651
|
+
messages, serialized_messages=_message_batch
|
|
1600
1652
|
)
|
|
1601
1653
|
# Pass cached per_message_tokens when available from Rust batch processing
|
|
1602
1654
|
cached_tokens = self._state.rust_per_message_tokens
|
|
@@ -1604,6 +1656,7 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1604
1656
|
filtered_messages,
|
|
1605
1657
|
protected_tokens,
|
|
1606
1658
|
per_message_tokens=cached_tokens,
|
|
1659
|
+
serialized_messages=_message_batch,
|
|
1607
1660
|
)
|
|
1608
1661
|
# Track dropped messages by hash so message_history_accumulator
|
|
1609
1662
|
# won't re-inject them from pydantic-ai's full message list on
|
|
@@ -1621,14 +1674,14 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1621
1674
|
)
|
|
1622
1675
|
else:
|
|
1623
1676
|
# Default to summarization (safe to proceed - no pending tool calls)
|
|
1624
|
-
# Pass
|
|
1677
|
+
# Pass MessageBatchHandle to avoid re-serialization
|
|
1625
1678
|
filtered_messages = self.filter_huge_messages(
|
|
1626
|
-
messages, serialized_messages=
|
|
1679
|
+
messages, serialized_messages=_message_batch
|
|
1627
1680
|
)
|
|
1628
|
-
# Also pass
|
|
1681
|
+
# Also pass MessageBatchHandle to summarize_messages for split_messages_for_protected_summarization
|
|
1629
1682
|
result_messages, summarized_messages = self.summarize_messages(
|
|
1630
1683
|
filtered_messages,
|
|
1631
|
-
serialized_messages=
|
|
1684
|
+
serialized_messages=_message_batch,
|
|
1632
1685
|
)
|
|
1633
1686
|
# For summarization, we need to estimate tokens since messages are transformed
|
|
1634
1687
|
final_token_count = sum(
|
|
@@ -1652,7 +1705,7 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1652
1705
|
messages: list[ModelMessage],
|
|
1653
1706
|
protected_tokens: int,
|
|
1654
1707
|
per_message_tokens: list[int | None] = None,
|
|
1655
|
-
serialized_messages: list[dict] | None = None,
|
|
1708
|
+
serialized_messages: list[dict] | MessageBatchHandle | None = None,
|
|
1656
1709
|
) -> list[ModelMessage]:
|
|
1657
1710
|
"""
|
|
1658
1711
|
Truncate message history to manage token usage.
|
|
@@ -1668,7 +1721,7 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1668
1721
|
per_message_tokens: Optional pre-computed per-message token counts.
|
|
1669
1722
|
When provided (e.g., from message_history_processor), avoids
|
|
1670
1723
|
re-serializing and re-computing token counts.
|
|
1671
|
-
serialized_messages: Optional pre-serialized messages for Rust.
|
|
1724
|
+
serialized_messages: Optional pre-serialized messages or MessageBatchHandle for Rust.
|
|
1672
1725
|
When provided and per_message_tokens is not available, avoids re-serializing.
|
|
1673
1726
|
|
|
1674
1727
|
Returns:
|
|
@@ -1679,16 +1732,22 @@ class BaseAgent(ABC, AgentPromptMixin):
|
|
|
1679
1732
|
# Try Rust fast path
|
|
1680
1733
|
if _rust_enabled():
|
|
1681
1734
|
try:
|
|
1682
|
-
|
|
1735
|
+
# Use MessageBatchHandle if provided
|
|
1736
|
+
if isinstance(serialized_messages, MessageBatchHandle):
|
|
1737
|
+
batch = serialized_messages
|
|
1738
|
+
# Ensure process() has been called to populate token counts
|
|
1739
|
+
if batch.get_per_message_tokens() is None:
|
|
1740
|
+
batch.process([], [], "")
|
|
1741
|
+
tokens = batch.get_per_message_tokens()
|
|
1742
|
+
elif per_message_tokens is not None:
|
|
1683
1743
|
# Reuse pre-computed tokens from caller (e.g., message_history_processor)
|
|
1684
1744
|
tokens = per_message_tokens
|
|
1685
1745
|
else:
|
|
1686
1746
|
# Compute from scratch when not provided
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
)
|
|
1690
|
-
|
|
1691
|
-
tokens = batch.per_message_tokens
|
|
1747
|
+
batch = create_message_batch(messages)
|
|
1748
|
+
batch.process([], [], "")
|
|
1749
|
+
tokens = batch.get_per_message_tokens()
|
|
1750
|
+
|
|
1692
1751
|
second_has_thinking = len(messages) > 1 and any(
|
|
1693
1752
|
isinstance(p, ThinkingPart) for p in messages[1].parts
|
|
1694
1753
|
)
|
|
@@ -231,9 +231,18 @@ def _ensure_plugins_loaded_for_phase(phase: PhaseType) -> None:
|
|
|
231
231
|
This is called before triggering callbacks to ensure plugins that
|
|
232
232
|
registered for this phase via lazy loading are actually loaded.
|
|
233
233
|
"""
|
|
234
|
+
import os
|
|
235
|
+
|
|
236
|
+
# Allow tests to disable auto-plugin-loading for isolated testing
|
|
237
|
+
if os.environ.get("PUP_DISABLE_CALLBACK_PLUGIN_LOADING"):
|
|
238
|
+
return
|
|
239
|
+
|
|
234
240
|
try:
|
|
235
|
-
from code_puppy.plugins import ensure_plugins_loaded_for_phase
|
|
241
|
+
from code_puppy.plugins import ensure_plugins_loaded_for_phase, load_plugin_callbacks
|
|
236
242
|
|
|
243
|
+
# Ensure plugins are discovered first (idempotent - safe to call multiple times)
|
|
244
|
+
load_plugin_callbacks()
|
|
245
|
+
# Then load plugins for this specific phase
|
|
237
246
|
ensure_plugins_loaded_for_phase(phase)
|
|
238
247
|
except ImportError:
|
|
239
248
|
# Plugin system not available (shouldn't happen in normal operation)
|
|
@@ -241,17 +250,11 @@ def _ensure_plugins_loaded_for_phase(phase: PhaseType) -> None:
|
|
|
241
250
|
|
|
242
251
|
|
|
243
252
|
def _trigger_callbacks_sync(phase: PhaseType, *args, **kwargs) -> list[Any]:
|
|
244
|
-
# Cheap early-exit: check count before doing any work
|
|
245
|
-
if not count_callbacks(phase):
|
|
246
|
-
# Only buffer if this phase could potentially have listeners later
|
|
247
|
-
# (i.e., a plugin that registers callbacks for this phase might load)
|
|
248
|
-
_backlog.buffer_event(phase, args, kwargs)
|
|
249
|
-
return []
|
|
250
|
-
|
|
251
253
|
# Ensure lazy-loaded plugins for this phase are loaded first
|
|
254
|
+
# MUST happen before count check, otherwise plugins never get a chance to register
|
|
252
255
|
_ensure_plugins_loaded_for_phase(phase)
|
|
253
256
|
|
|
254
|
-
#
|
|
257
|
+
# Now check if any callbacks are registered
|
|
255
258
|
callbacks = get_callbacks(phase)
|
|
256
259
|
if not callbacks:
|
|
257
260
|
_backlog.buffer_event(phase, args, kwargs)
|
|
@@ -288,18 +291,12 @@ def _trigger_callbacks_sync(phase: PhaseType, *args, **kwargs) -> list[Any]:
|
|
|
288
291
|
|
|
289
292
|
|
|
290
293
|
async def _trigger_callbacks(phase: PhaseType, *args, **kwargs) -> list[Any]:
|
|
291
|
-
# Cheap early-exit: check count before doing any work (including plugin loading)
|
|
292
|
-
if not count_callbacks(phase):
|
|
293
|
-
# Only buffer if this phase could potentially have listeners later
|
|
294
|
-
_backlog.buffer_event(phase, args, kwargs)
|
|
295
|
-
return []
|
|
296
|
-
|
|
297
294
|
# Ensure lazy-loaded plugins for this phase are loaded first
|
|
295
|
+
# MUST happen before count check, otherwise plugins never get a chance to register
|
|
298
296
|
_ensure_plugins_loaded_for_phase(phase)
|
|
299
297
|
|
|
300
|
-
#
|
|
298
|
+
# Now check if any callbacks are registered
|
|
301
299
|
callbacks = get_callbacks(phase)
|
|
302
|
-
|
|
303
300
|
if not callbacks:
|
|
304
301
|
_backlog.buffer_event(phase, args, kwargs)
|
|
305
302
|
return []
|
|
@@ -856,16 +853,20 @@ def on_register_agents() -> list[dict[str, Any]]:
|
|
|
856
853
|
|
|
857
854
|
Example return: [{"name": "my-agent", "class": MyAgentClass}]
|
|
858
855
|
"""
|
|
859
|
-
|
|
860
|
-
# BEFORE checking callback count, since lazy-loaded plugins register callbacks
|
|
861
|
-
# at import time. Without this, AP agents would not be visible in /agent.
|
|
862
|
-
try:
|
|
863
|
-
from code_puppy.plugins import ensure_plugins_loaded_for_phase, load_plugin_callbacks
|
|
856
|
+
import os
|
|
864
857
|
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
858
|
+
# Allow tests to disable auto-plugin-loading for isolated testing
|
|
859
|
+
if not os.environ.get("PUP_DISABLE_CALLBACK_PLUGIN_LOADING"):
|
|
860
|
+
# AP visibility fix: Ensure plugins are discovered and loaded for register_agents
|
|
861
|
+
# BEFORE checking callback count, since lazy-loaded plugins register callbacks
|
|
862
|
+
# at import time. Without this, AP agents would not be visible in /agent.
|
|
863
|
+
try:
|
|
864
|
+
from code_puppy.plugins import ensure_plugins_loaded_for_phase, load_plugin_callbacks
|
|
865
|
+
|
|
866
|
+
load_plugin_callbacks()
|
|
867
|
+
ensure_plugins_loaded_for_phase("register_agents")
|
|
868
|
+
except ImportError:
|
|
869
|
+
pass # Plugin system not available
|
|
869
870
|
|
|
870
871
|
return _trigger_callbacks_sync("register_agents")
|
|
871
872
|
|
|
@@ -925,11 +926,11 @@ def on_get_model_system_prompt(
|
|
|
925
926
|
List of results from registered callbacks in execution order.
|
|
926
927
|
"""
|
|
927
928
|
phase: PhaseType = "get_model_system_prompt"
|
|
928
|
-
if not count_callbacks(phase):
|
|
929
|
-
_backlog.buffer_event(phase, (model_name, default_system_prompt, user_prompt), {})
|
|
930
|
-
return []
|
|
931
929
|
|
|
930
|
+
# Ensure plugins are loaded BEFORE checking count, otherwise lazy-loaded
|
|
931
|
+
# plugins never get a chance to register callbacks
|
|
932
932
|
_ensure_plugins_loaded_for_phase(phase)
|
|
933
|
+
|
|
933
934
|
callbacks = get_callbacks(phase)
|
|
934
935
|
if not callbacks:
|
|
935
936
|
_backlog.buffer_event(phase, (model_name, default_system_prompt, user_prompt), {})
|