code-puppy 0.0.905__tar.gz → 0.0.906__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.
- {code_puppy-0.0.905 → code_puppy-0.0.906}/PKG-INFO +1 -1
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_builder.py +16 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/base_agent.py +18 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/pydantic_patches.py +143 -24
- {code_puppy-0.0.905 → code_puppy-0.0.906}/pyproject.toml +1 -1
- {code_puppy-0.0.905 → code_puppy-0.0.906}/.gitignore +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/LICENSE +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/README.md +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/__main__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/_plugin_i18n_lifecycle.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/_pydantic_tool_helpers.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/_pydantic_video_patch.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agent_completion_inbox.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agent_execution_context.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_code_mode.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_code_mode_guidance.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_compaction.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_diagnostics.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_foreign_thinking.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_history.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_key_listeners.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_model_message_transform.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_non_streaming_render.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_output_limits.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_run_signals.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_runtime.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_steer_processor.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_subagent_recursion.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_windows_console.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/_wire_tool_names.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/agent_code_puppy.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/agent_creator_agent.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/agent_helios.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/agent_manager.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/agent_model_judge.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/agent_planning.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/agent_qa_kitten.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/agent_web_retriever.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/event_stream_handler.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/json_agent.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/retry_checkpoint.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/retry_profiles.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/run_stats.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/smooth_stream.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/stream_status.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/subagent_stream_handler.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/agents/thinking_output.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/asyncio_cleanup.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/atomic_io.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/atomic_json.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/ca_bundle.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/callbacks.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/capabilities/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/capabilities/compaction.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/capabilities/eager_timing.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/chatgpt_codex_client.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/claude_cache_client.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/claude_oauth_transport.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/cli_runner.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/add_model_details.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/add_model_menu.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/add_model_menus.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/add_model_vllm.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/agent_menu.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/attachments.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/autosave_menu.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/autosave_search.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/clipboard.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/colors_menu.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/command_handler.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/command_registry.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/completers.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/completion_cache.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/config_apply.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/config_commands.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/core_commands.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/file_index.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/file_path_completion.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/help_catalog.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/help_overlay.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/image_utils.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/load_context_completion.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/base.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/catalog_server_installer.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/custom_server_form.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/custom_server_installer.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/edit_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/handler.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/help_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/install_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/install_menu.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/list_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/logs_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/mcp_servers_store.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/remove_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/restart_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/search_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/silence_warning_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/start_all_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/start_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/status_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/stop_all_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/stop_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/trust_command.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/utils.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/wizard_utils.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp_binding_menu.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp_completion.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/menu_session.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/model_picker_completion.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/model_settings_defs.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/model_settings_menu.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/onboarding_slides.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/onboarding_wizard.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/pagination.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/pin_command_completion.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/refresh_models.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/session_browser.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/session_browser_data.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/session_commands.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/set_menu.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/set_menu_catalog.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/set_menu_schema.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/set_menu_settings.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/set_menu_shims.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/set_menu_values.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/shell_passthrough.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/skills_completion.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/tui_style.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/uc_menu.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/utils.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/config.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/config_file.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/diagnostics.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/error_logging.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/events/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/events/bridge.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/file_completion_io.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/file_completion_tokens.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/gemini_code_assist.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/gemini_common.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/gemini_model.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/hook_engine/README.md +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/hook_engine/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/hook_engine/aliases.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/hook_engine/engine.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/hook_engine/executor.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/hook_engine/matcher.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/hook_engine/models.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/hook_engine/registry.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/hook_engine/validator.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/http_retry.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/http_utils.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/httpx2_utils.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/audit.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/catalog.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/formats.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/interpolation.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/locale.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/locales/en-US.json +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/locales/es.json +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/locales/fr-CA.json +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/plugin_catalog.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/plurals.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/pseudo.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/i18n/translate.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/kennel_provider.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/keymap.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/list_filtering.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/main.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/agent_bindings.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/async_lifecycle.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/blocking_startup.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/circuit_breaker.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/config_wizard.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/dashboard.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/error_isolation.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/examples/retry_example.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/health_monitor.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/http_auth.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/managed_server.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/manager.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/manager_lifecycle.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/mcp_logs.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/project_config.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/registry.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/retry_manager.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/server_registry_catalog.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/status_tracker.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/system_tools.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/tool_arg_coercion.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_/toolset_utils.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_prompts/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/mcp_prompts/hook_creator.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/bar_painters.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/bar_rendering.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/bottom_bar.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/bus.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/chords.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/commands.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/editor_actions.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/editor_completion.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/editor_display.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/editor_history.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/editor_keys.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/editor_paste.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/editor_queue.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/editor_submission.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/external_editor.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/identity_line.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/idle_status.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/inline_bar.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/line_editor.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/markdown_patches.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/menu_lifecycle.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/message_queue.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/messages.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/pause_controller.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/prompt_prefix_style.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/queue_console.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/renderers.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/rich_renderer.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/run_ui.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/run_ui_wiring.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/speculation_line.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/speculation_stats.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/speculation_toggle.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/spinner/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/status_line.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/subagent_console.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/theme_accent.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/tool_output.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/messaging/transcript_guard.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/model_descriptions.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/model_factory.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/model_switching.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/model_utils.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/models.json +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/models_dev_api.json +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/models_dev_parser.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/observability.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/platform_utils.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/plugins/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/plugins/config.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/plugins/oauth_pasteback.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/plugins/oauth_puppy_html.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/plugins/trust.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/plugins/trust_notice.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/private_inference.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/provider_credentials.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/provider_identity.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/reopenable_async_client.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/round_robin_model.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/secret_store.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/secret_store_backends.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/session_format_migration.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/session_lifecycle.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/session_migration.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/session_storage.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/session_surrogate_unpickler.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/shared_credentials.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/skill_provider.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/splash.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/status_display.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/steer_metadata.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/terminal_utils.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/token_usage.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/_browser_registry.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/_lazy.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/agent_tools.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/approval_feedback.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/ask_user_question/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/ask_user_question/constants.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/ask_user_question/demo_tui.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/ask_user_question/handler.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/ask_user_question/models.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/ask_user_question/registration.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/ask_user_question/renderers.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/ask_user_question/terminal_ui.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/ask_user_question/theme.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/ask_user_question/tui_loop.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/__init__.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/browser_control.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/browser_interactions.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/browser_locator_resolver.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/browser_locators.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/browser_manager.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/browser_navigation.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/browser_page_snapshot.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/browser_screenshot.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/browser_scripts.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/browser_semantic_interactions.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/browser_workflows.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/browser/tool_registry.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/command_runner.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/common.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/display.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/file_modifications.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/file_operations.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/file_permission_state.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/fs_access.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/image_tools.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/io_backends.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/model_tools.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/ripgrep.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/shell_backgrounding.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/skills_tools.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/subagent_context.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/subagent_invocation.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/subagent_usage_metrics.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/tools_content.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/universal_constructor.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/tools/win_shell_io.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/undo_manager.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/universal_constructor_provider.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/version_checker.py +0 -0
- {code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/zai_model.py +0 -0
|
@@ -241,6 +241,21 @@ def load_mcp_servers(
|
|
|
241
241
|
return manager.get_servers_for_agent(agent_name=agent_name)
|
|
242
242
|
|
|
243
243
|
|
|
244
|
+
def _with_runtime_mcp_toolsets(agent: Any, mcp_servers: List[Any]) -> List[Any]:
|
|
245
|
+
"""Append the MCP toolsets injected for this agent instance.
|
|
246
|
+
|
|
247
|
+
Embedders (an ACP client's ``mcpServers``) attach these with
|
|
248
|
+
``BaseAgent.set_runtime_mcp_toolsets``. ``--no-tools`` still means no MCP
|
|
249
|
+
toolsets at all.
|
|
250
|
+
"""
|
|
251
|
+
from code_puppy.tools import tools_disabled
|
|
252
|
+
|
|
253
|
+
runtime = getattr(agent, "get_runtime_mcp_toolsets", lambda: [])()
|
|
254
|
+
if not runtime or tools_disabled():
|
|
255
|
+
return mcp_servers
|
|
256
|
+
return list(mcp_servers or []) + list(runtime)
|
|
257
|
+
|
|
258
|
+
|
|
244
259
|
def _iter_autostart_targets(manager: Any, agent_name: str):
|
|
245
260
|
"""Yield ``(server_name, config)`` tuples that need to be auto-started.
|
|
246
261
|
|
|
@@ -650,6 +665,7 @@ def build_pydantic_agent(
|
|
|
650
665
|
)
|
|
651
666
|
prepared = _assemble_instructions(agent, resolved_model_name)
|
|
652
667
|
mcp_servers = load_mcp_servers(agent_name=getattr(agent, "name", None))
|
|
668
|
+
mcp_servers = _with_runtime_mcp_toolsets(agent, mcp_servers)
|
|
653
669
|
model_settings = make_model_settings(
|
|
654
670
|
resolved_model_name,
|
|
655
671
|
overrides=agent.get_model_settings_overrides(),
|
|
@@ -72,6 +72,9 @@ class BaseAgent(ABC):
|
|
|
72
72
|
self._last_model_name: Optional[str] = None
|
|
73
73
|
self._runtime_model_name_override: Optional[str] = None
|
|
74
74
|
self._runtime_system_prompt_additions: List[str] = []
|
|
75
|
+
# MCP toolsets injected by an embedding client (e.g. ACP ``mcpServers``)
|
|
76
|
+
# for this agent instance only; merged on every build.
|
|
77
|
+
self._runtime_mcp_toolsets: List[Any] = []
|
|
75
78
|
# Model chosen by a ``model_select`` hook for the current run. Slots
|
|
76
79
|
# below an explicit runtime override but above pinned/JSON/global, and
|
|
77
80
|
# is reset at the start of every run (see resolve_run_model_selection),
|
|
@@ -303,6 +306,21 @@ class BaseAgent(ABC):
|
|
|
303
306
|
return await run_with_mcp(self, prompt, **kwargs)
|
|
304
307
|
|
|
305
308
|
# ---- MCP integration shims --------------------------------------------
|
|
309
|
+
def get_runtime_mcp_toolsets(self) -> List[Any]:
|
|
310
|
+
"""Return MCP toolsets injected for this agent instance."""
|
|
311
|
+
return list(self._runtime_mcp_toolsets)
|
|
312
|
+
|
|
313
|
+
def set_runtime_mcp_toolsets(self, toolsets: List[Any]) -> None:
|
|
314
|
+
"""Replace this instance's injected MCP toolsets.
|
|
315
|
+
|
|
316
|
+
For embedders that bring their own MCP servers -- an ACP client's
|
|
317
|
+
``mcpServers`` -- rather than ``mcp_servers.json``. They are merged
|
|
318
|
+
with the configured servers on every build, so a rebuild (a model
|
|
319
|
+
switch, a reload) keeps them, and they never touch global bindings or
|
|
320
|
+
other agent instances.
|
|
321
|
+
"""
|
|
322
|
+
self._runtime_mcp_toolsets = list(toolsets)
|
|
323
|
+
|
|
306
324
|
def transform_mcp_toolsets(self, toolsets: List[Any]) -> List[Any]:
|
|
307
325
|
"""Extension seam: post-process resolved MCP toolsets before build.
|
|
308
326
|
|
|
@@ -67,22 +67,38 @@ def _repair_tool_call_json(raw: str) -> str:
|
|
|
67
67
|
return raw
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
def
|
|
71
|
-
"""Best-effort lookup of a tool's
|
|
72
|
-
|
|
73
|
-
Returns the
|
|
74
|
-
|
|
75
|
-
Never raises: this runs on the validation hot
|
|
70
|
+
def _resolve_tool_schema(manager: Any, call: Any) -> dict | None:
|
|
71
|
+
"""Best-effort lookup of a tool's full parameters JSON-Schema.
|
|
72
|
+
|
|
73
|
+
Returns the schema dict, or ``None`` when the tool (or its schema)
|
|
74
|
+
cannot be resolved — callers must treat ``None`` as "unknown" and
|
|
75
|
+
keep their hands off. Never raises: this runs on the validation hot
|
|
76
|
+
path. Interpreting the keywords is the callers' job; in particular
|
|
77
|
+
an omitted ``properties`` key means the parameter surface is
|
|
78
|
+
*unknown* (free-form args may be legitimate), not "no parameters".
|
|
76
79
|
"""
|
|
77
80
|
try:
|
|
78
81
|
tool_def = manager.get_tool_def(getattr(call, "tool_name", None))
|
|
79
82
|
schema = getattr(tool_def, "parameters_json_schema", None)
|
|
80
|
-
|
|
81
|
-
return properties if isinstance(properties, dict) else None
|
|
83
|
+
return schema if isinstance(schema, dict) else None
|
|
82
84
|
except Exception:
|
|
83
85
|
return None
|
|
84
86
|
|
|
85
87
|
|
|
88
|
+
def _schema_properties(schema: dict | None) -> dict | None:
|
|
89
|
+
"""Declared ``properties`` of a schema, or ``None`` when the schema is
|
|
90
|
+
unresolvable or omits/malforms the key.
|
|
91
|
+
|
|
92
|
+
The ``None``-vs-empty distinction matters: an omitted ``properties`` key
|
|
93
|
+
means the tool's parameter surface is *unknown* (it may accept free-form
|
|
94
|
+
args), which the envelope unwrap's provability gate must not guess past.
|
|
95
|
+
"""
|
|
96
|
+
if not isinstance(schema, dict):
|
|
97
|
+
return None
|
|
98
|
+
properties = schema.get("properties")
|
|
99
|
+
return properties if isinstance(properties, dict) else None
|
|
100
|
+
|
|
101
|
+
|
|
86
102
|
def _unwrap_arguments_envelope(tool_args: Any, properties: dict | None) -> Any:
|
|
87
103
|
"""Collapse a spurious ``{"arguments": {...}}`` envelope into its payload.
|
|
88
104
|
|
|
@@ -94,14 +110,16 @@ def _unwrap_arguments_envelope(tool_args: Any, properties: dict | None) -> Any:
|
|
|
94
110
|
are hit hardest: the model has no real parameter to name, so it emits the
|
|
95
111
|
envelope and every call is rejected with ``extra_forbidden``.
|
|
96
112
|
|
|
97
|
-
Unwraps ONLY when
|
|
98
|
-
|
|
99
|
-
|
|
113
|
+
Unwraps ONLY when the tool's schema resolved and provably declares no
|
|
114
|
+
``arguments`` property — an unresolvable schema, or one that omits
|
|
115
|
+
``properties`` entirely (free-form args may be legitimate, including an
|
|
116
|
+
``arguments`` one), is returned untouched. A declared parameter of that
|
|
117
|
+
name is likewise never clobbered.
|
|
100
118
|
"""
|
|
101
119
|
if not isinstance(tool_args, dict) or list(tool_args) != ["arguments"]:
|
|
102
120
|
return tool_args
|
|
103
|
-
if isinstance(properties, dict)
|
|
104
|
-
return tool_args # a real parameter -- hands off
|
|
121
|
+
if not isinstance(properties, dict) or "arguments" in properties:
|
|
122
|
+
return tool_args # unproven, or a real parameter -- hands off
|
|
105
123
|
|
|
106
124
|
inner = tool_args["arguments"]
|
|
107
125
|
if isinstance(inner, str):
|
|
@@ -109,23 +127,124 @@ def _unwrap_arguments_envelope(tool_args: Any, properties: dict | None) -> Any:
|
|
|
109
127
|
inner = json.loads(inner)
|
|
110
128
|
except Exception:
|
|
111
129
|
return tool_args
|
|
130
|
+
if isinstance(inner, dict):
|
|
131
|
+
logger.debug("unwrapped spurious {arguments: ...} tool-call envelope")
|
|
112
132
|
return inner if isinstance(inner, dict) else tool_args
|
|
113
133
|
|
|
114
134
|
|
|
135
|
+
def _is_strict_zero_param_schema(schema: Any) -> bool:
|
|
136
|
+
"""True when ``schema`` provably accepts no arguments at all.
|
|
137
|
+
|
|
138
|
+
Requires a resolved schema whose ``type`` admits objects (``"object"``
|
|
139
|
+
or a type list containing it; an absent ``type`` constrains nothing, and
|
|
140
|
+
tool-call arguments are objects by construction) and which declares no
|
|
141
|
+
properties while *forbidding* additional ones. ``additionalProperties``
|
|
142
|
+
must be literally ``false``: absent means "allow extras" (the JSON-Schema
|
|
143
|
+
default) and a dict value means "allow, constrained" — either way the
|
|
144
|
+
tool may legitimately receive free-form args, and stripping would
|
|
145
|
+
destroy them.
|
|
146
|
+
"""
|
|
147
|
+
if not isinstance(schema, dict):
|
|
148
|
+
return False
|
|
149
|
+
declared_type = schema.get("type", "object")
|
|
150
|
+
types = declared_type if isinstance(declared_type, list) else [declared_type]
|
|
151
|
+
if "object" not in types:
|
|
152
|
+
return False
|
|
153
|
+
if _schema_properties(schema):
|
|
154
|
+
return False
|
|
155
|
+
return schema.get("additionalProperties") is False
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def _strip_placeholder_args(
|
|
159
|
+
tool_args: Any, schema: dict | None, tool_name: str | None
|
|
160
|
+
) -> Any:
|
|
161
|
+
"""Drop invented keys from a call to a zero-parameter tool.
|
|
162
|
+
|
|
163
|
+
Some providers cannot serialize an empty function-call arguments object
|
|
164
|
+
and inject a placeholder key instead — observed in the wild:
|
|
165
|
+
``{"command": "list_agents"}``, ``{"city": "ignore"}``, ``{"dummy": "x"}``.
|
|
166
|
+
Each one hard-fails validation with ``extra_forbidden`` while the model
|
|
167
|
+
insists it sent ``{}``, so the agent burns retries on an error it cannot
|
|
168
|
+
see to fix.
|
|
169
|
+
|
|
170
|
+
Fires only when :func:`_is_strict_zero_param_schema` says the schema
|
|
171
|
+
resolved and forbids every argument — under that contract any non-empty
|
|
172
|
+
argument object is junk (including non-dict ``arguments``-envelope
|
|
173
|
+
payloads, which validation would reject anyway) and is replaced with
|
|
174
|
+
``{}``. Everything else — unresolvable schemas, permissive schemas,
|
|
175
|
+
tools with declared properties — is returned untouched, so a legitimate
|
|
176
|
+
or merely confused call is never masked.
|
|
177
|
+
"""
|
|
178
|
+
if not isinstance(tool_args, dict) or not tool_args:
|
|
179
|
+
return tool_args
|
|
180
|
+
if not _is_strict_zero_param_schema(schema):
|
|
181
|
+
return tool_args
|
|
182
|
+
_log_placeholder_strip(tool_args, tool_name)
|
|
183
|
+
return {}
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
# (tool name, junk signature) pairs already warned at WARNING level; the
|
|
187
|
+
# providers that inject placeholder args do it on *every* zero-param call,
|
|
188
|
+
# so an identical repeat drops to DEBUG — while a *new* quirk on the same
|
|
189
|
+
# tool still surfaces at WARNING. Bounded: signatures use the same 200-char
|
|
190
|
+
# bound as the log line (visually identical repeats dedup identically) and
|
|
191
|
+
# the set stops growing at the cap rather than leaking per-call memory.
|
|
192
|
+
_PLACEHOLDER_WARNED_KEYS: set[tuple[str, str]] = set()
|
|
193
|
+
_PLACEHOLDER_WARNED_KEYS_MAX = 512
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def _log_placeholder_strip(tool_args: dict, tool_name: str | None) -> None:
|
|
197
|
+
"""One WARNING per (tool, quirk), then DEBUG for identical repeats —
|
|
198
|
+
with the payload that identifies the provider quirk, bounded so a junk
|
|
199
|
+
dict cannot flood the log. Cannot raise, even for repr-hostile values."""
|
|
200
|
+
try:
|
|
201
|
+
payload = json.dumps(tool_args, sort_keys=True, default=str)
|
|
202
|
+
except Exception: # mixed-type keys defeat sort_keys; repr is the fallback
|
|
203
|
+
try:
|
|
204
|
+
payload = repr(tool_args)
|
|
205
|
+
except Exception: # never let logging break the validation hot path
|
|
206
|
+
payload = "<unrepr-able args>"
|
|
207
|
+
tool_key = tool_name or "<unknown>"
|
|
208
|
+
if len(_PLACEHOLDER_WARNED_KEYS) >= _PLACEHOLDER_WARNED_KEYS_MAX:
|
|
209
|
+
log = logger.warning # set full: never silently dedup a new quirk
|
|
210
|
+
else:
|
|
211
|
+
key = (tool_key, payload[:200])
|
|
212
|
+
log = logger.debug if key in _PLACEHOLDER_WARNED_KEYS else logger.warning
|
|
213
|
+
_PLACEHOLDER_WARNED_KEYS.add(key)
|
|
214
|
+
log(
|
|
215
|
+
"dropping placeholder args %.200s for zero-parameter tool %r "
|
|
216
|
+
"(provider cannot serialize an empty arguments object)",
|
|
217
|
+
payload,
|
|
218
|
+
tool_key,
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def _sanitize_args(tool_args: Any, schema: dict | None, tool_name: str | None) -> Any:
|
|
223
|
+
"""Envelope-unwrap then placeholder-strip; identity when untouched."""
|
|
224
|
+
return _strip_placeholder_args(
|
|
225
|
+
_unwrap_arguments_envelope(tool_args, _schema_properties(schema)),
|
|
226
|
+
schema,
|
|
227
|
+
tool_name,
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
|
|
115
231
|
def _sanitize_tool_call_args(manager: Any, call: Any) -> None:
|
|
116
|
-
"""Rewrite ``call.args`` in place
|
|
232
|
+
"""Rewrite ``call.args`` in place to survive strict validation.
|
|
117
233
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
234
|
+
Two malformations are handled, for dict and JSON-string shapes alike
|
|
235
|
+
(a string is re-serialized to preserve the original shape): the spurious
|
|
236
|
+
``{"arguments": ...}`` envelope, and placeholder keys invented for a
|
|
237
|
+
zero-parameter tool. Invalid JSON strings are left for
|
|
238
|
+
:func:`_repair_tool_call_json`.
|
|
121
239
|
"""
|
|
122
240
|
args = getattr(call, "args", None)
|
|
123
|
-
|
|
241
|
+
schema = _resolve_tool_schema(manager, call)
|
|
242
|
+
tool_name = getattr(call, "tool_name", None)
|
|
124
243
|
|
|
125
244
|
if isinstance(args, dict):
|
|
126
|
-
|
|
127
|
-
if
|
|
128
|
-
call.args =
|
|
245
|
+
sanitized = _sanitize_args(args, schema, tool_name)
|
|
246
|
+
if sanitized is not args:
|
|
247
|
+
call.args = sanitized
|
|
129
248
|
elif isinstance(args, str) and args:
|
|
130
249
|
try:
|
|
131
250
|
parsed = json.loads(args)
|
|
@@ -133,9 +252,9 @@ def _sanitize_tool_call_args(manager: Any, call: Any) -> None:
|
|
|
133
252
|
return
|
|
134
253
|
if not isinstance(parsed, dict):
|
|
135
254
|
return
|
|
136
|
-
|
|
137
|
-
if
|
|
138
|
-
call.args = json.dumps(
|
|
255
|
+
sanitized = _sanitize_args(parsed, schema, tool_name)
|
|
256
|
+
if sanitized is not parsed:
|
|
257
|
+
call.args = json.dumps(sanitized)
|
|
139
258
|
|
|
140
259
|
|
|
141
260
|
# Loud failures recorded during the current apply_all_patches() run, so the
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/load_context_completion.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/catalog_server_installer.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/custom_server_installer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/mcp/silence_warning_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.905 → code_puppy-0.0.906}/code_puppy/command_line/model_picker_completion.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|