newcode 0.1.8__tar.gz → 0.1.9__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.
- {newcode-0.1.8 → newcode-0.1.9}/.gitignore +1 -1
- {newcode-0.1.8 → newcode-0.1.9}/PKG-INFO +4 -4
- {newcode-0.1.8 → newcode-0.1.9}/README.md +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/__main__.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_code_agent.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_creator_agent.py +6 -8
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_javascript_reviewer.py +3 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_manager.py +9 -9
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_pack_leader.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_planning.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_scheduler.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/base_agent.py +27 -29
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/event_stream_handler.py +5 -5
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/json_agent.py +5 -5
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/pack/bloodhound.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/pack/husky.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/pack/retriever.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/pack/shepherd.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/pack/terrier.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/pack/watchdog.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/prompt_reviewer.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/subagent_stream_handler.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/api/__init__.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/api/app.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/api/main.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/api/routers/__init__.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/api/routers/agents.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/api/routers/commands.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/api/routers/config.py +5 -5
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/api/routers/sessions.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/api/websocket.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/claude_cache_client.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/cli_runner.py +81 -82
- newcode-0.1.9/newcode/command_line/__init__.py +1 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/add_model_menu.py +6 -6
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/agent_menu.py +8 -8
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/autosave_menu.py +7 -9
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/colors_menu.py +7 -11
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/command_handler.py +15 -15
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/config_commands.py +43 -43
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/core_commands.py +40 -40
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/diff_menu.py +5 -5
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/load_context_completion.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/base.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/catalog_server_installer.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/custom_server_form.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/custom_server_installer.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/edit_command.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/handler.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/help_command.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/install_command.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/install_menu.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/list_command.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/logs_command.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/remove_command.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/restart_command.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/search_command.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/start_all_command.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/start_command.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/status_command.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/stop_all_command.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/stop_command.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/test_command.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/utils.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/wizard_utils.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp_completion.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/model_picker_completion.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/model_settings_menu.py +5 -5
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/motd.py +5 -7
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/onboarding_slides.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/onboarding_wizard.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/pin_command_completion.py +7 -7
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/prompt_toolkit_completion.py +16 -16
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/session_commands.py +17 -17
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/skills_completion.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/uc_menu.py +6 -6
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/config.py +23 -23
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/error_logging.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/hook_engine/README.md +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/hook_engine/aliases.py +7 -7
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/hook_engine/matcher.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/http_utils.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/keymap.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/main.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/blocking_startup.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/captured_stdio_server.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/config_wizard.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/examples/retry_example.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/managed_server.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/manager.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/mcp_logs.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/registry.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/server_registry_catalog.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_prompts/hook_creator.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/__init__.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/message_queue.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/messages.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/queue_console.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/rich_renderer.py +23 -17
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/spinner/__init__.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/spinner/console_spinner.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/spinner/spinner_base.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/subagent_console.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/model_factory.py +13 -13
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/model_switching.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/model_utils.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/models_dev_parser.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/__init__.py +6 -6
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/agent_skills/__init__.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/agent_skills/config.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/agent_skills/discovery.py +5 -5
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/agent_skills/downloader.py +6 -6
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/agent_skills/prompt_builder.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/agent_skills/register_callbacks.py +9 -9
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/agent_skills/remote_catalog.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/agent_skills/skill_catalog.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/agent_skills/skills_install_menu.py +7 -7
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/agent_skills/skills_menu.py +10 -10
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/antigravity_oauth/antigravity_model.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/antigravity_oauth/config.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/antigravity_oauth/register_callbacks.py +6 -6
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/antigravity_oauth/transport.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/antigravity_oauth/utils.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/chatgpt_oauth/config.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/chatgpt_oauth/oauth_flow.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/chatgpt_oauth/register_callbacks.py +5 -5
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/chatgpt_oauth/test_plugin.py +8 -8
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/claude_code_hooks/config.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/claude_code_hooks/register_callbacks.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/claude_code_oauth/SETUP.md +5 -5
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/claude_code_oauth/config.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/claude_code_oauth/register_callbacks.py +9 -9
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/claude_code_oauth/test_plugin.py +8 -8
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/customizable_commands/register_callbacks.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/example_custom_command/README.md +17 -17
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/example_custom_command/register_callbacks.py +2 -2
- newcode-0.1.9/newcode/plugins/file_permission_handler/__init__.py +4 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/file_permission_handler/register_callbacks.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/frontend_emitter/__init__.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/frontend_emitter/emitter.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/frontend_emitter/register_callbacks.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/hook_creator/register_callbacks.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/hook_manager/config.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/hook_manager/hooks_menu.py +6 -6
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/hook_manager/register_callbacks.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/scheduler/register_callbacks.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/scheduler/scheduler_menu.py +12 -14
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/scheduler/scheduler_wizard.py +9 -9
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/shell_safety/agent_shell_safety.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/shell_safety/register_callbacks.py +6 -6
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/synthetic_status/register_callbacks.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/synthetic_status/status_api.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/universal_constructor/__init__.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/universal_constructor/register_callbacks.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/pydantic_patches.py +8 -8
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/scheduler/__init__.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/scheduler/__main__.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/scheduler/cli.py +7 -7
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/scheduler/config.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/scheduler/daemon.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/scheduler/executor.py +6 -6
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/scheduler/platform.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/session_storage.py +5 -5
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/status_display.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/summarization_agent.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/__init__.py +23 -23
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/agent_tools.py +18 -18
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/ask_user_question/__init__.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/ask_user_question/demo_tui.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/ask_user_question/handler.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/ask_user_question/terminal_ui.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/ask_user_question/theme.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/__init__.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/browser_control.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/browser_interactions.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/browser_locators.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/browser_manager.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/browser_navigation.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/browser_screenshot.py +3 -5
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/browser_scripts.py +2 -2
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/browser_workflows.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/chromium_terminal_manager.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/terminal_command_tools.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/terminal_screenshot_tools.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/browser/terminal_tools.py +6 -7
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/command_runner.py +10 -10
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/common.py +12 -12
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/display.py +3 -3
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/file_modifications.py +13 -13
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/file_operations.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/scheduler_tools.py +17 -17
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/skills_tools.py +7 -7
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/subagent_context.py +1 -1
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/universal_constructor.py +12 -12
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/uvx_detection.py +4 -4
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/version_checker.py +2 -2
- {newcode-0.1.8 → newcode-0.1.9}/pyproject.toml +13 -13
- newcode-0.1.8/code_puppy/command_line/__init__.py +0 -1
- newcode-0.1.8/code_puppy/plugins/file_permission_handler/__init__.py +0 -4
- {newcode-0.1.8 → newcode-0.1.9}/LICENSE +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_c_reviewer.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_code_reviewer.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_cpp_reviewer.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_golang_reviewer.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_python_programmer.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_python_reviewer.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_qa_browser.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_qa_expert.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_security_auditor.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_terminal_qa.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/agent_typescript_reviewer.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/agents/pack/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/api/pty_manager.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/api/templates/terminal.html +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/callbacks.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/chatgpt_codex_client.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/attachments.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/clipboard.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/command_registry.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/file_path_completion.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/mcp/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/utils.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/command_line/wiggum_state.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/gemini_code_assist.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/gemini_model.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/hook_engine/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/hook_engine/engine.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/hook_engine/executor.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/hook_engine/models.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/hook_engine/registry.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/hook_engine/validator.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/async_lifecycle.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/circuit_breaker.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/dashboard.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/error_isolation.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/health_monitor.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/retry_manager.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/status_tracker.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_/system_tools.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/mcp_prompts/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/bus.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/commands.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/markdown_patches.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/messaging/renderers.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/models.json +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/models_dev_api.json +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/agent_skills/installer.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/agent_skills/metadata.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/antigravity_oauth/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/antigravity_oauth/accounts.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/antigravity_oauth/constants.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/antigravity_oauth/oauth.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/antigravity_oauth/storage.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/antigravity_oauth/test_plugin.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/antigravity_oauth/token.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/chatgpt_oauth/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/chatgpt_oauth/utils.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/claude_code_hooks/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/claude_code_oauth/README.md +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/claude_code_oauth/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/claude_code_oauth/token_refresh_heartbeat.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/claude_code_oauth/utils.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/customizable_commands/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/hook_creator/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/hook_manager/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/oauth_puppy_html.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/scheduler/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/shell_safety/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/shell_safety/command_cache.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/synthetic_status/__init__.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/universal_constructor/models.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/universal_constructor/registry.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/plugins/universal_constructor/sandbox.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/prompts/antigravity_system_prompt.md +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/reopenable_async_client.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/round_robin_model.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/scheduler/platform_unix.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/scheduler/platform_win.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/terminal_utils.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/ask_user_question/constants.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/ask_user_question/models.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/ask_user_question/registration.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/ask_user_question/renderers.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/ask_user_question/tui_loop.py +0 -0
- {newcode-0.1.8/code_puppy → newcode-0.1.9/newcode}/tools/tools_content.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: newcode
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
4
4
|
Summary: AI-powered code generation agent platform
|
|
5
5
|
Project-URL: repository, https://github.com/janfeddersen-wq/new_code
|
|
6
6
|
Project-URL: HomePage, https://github.com/janfeddersen-wq/new_code
|
|
@@ -45,7 +45,7 @@ Description-Content-Type: text/markdown
|
|
|
45
45
|
|
|
46
46
|
An AI-powered code generation and modification agent for the terminal.
|
|
47
47
|
|
|
48
|
-
NewCode is a fork of [code-puppy](https://github.com/mpfaffenberger/
|
|
48
|
+
NewCode is a fork of [code-puppy](https://github.com/mpfaffenberger/newcode) by Michael Pfaffenberger, customized for the fedstew workflow. We wanted a clean, professional CLI agent with opinionated defaults, streamlined prompts, and a focus on practical code generation without the playful branding.
|
|
49
49
|
|
|
50
50
|
## What changed from code-puppy
|
|
51
51
|
|
|
@@ -100,7 +100,7 @@ On first run, you'll be guided through a setup wizard to configure your API keys
|
|
|
100
100
|
|
|
101
101
|
## Configuration
|
|
102
102
|
|
|
103
|
-
Configuration is stored in `~/.config/
|
|
103
|
+
Configuration is stored in `~/.config/newcode/puppy.cfg` (XDG-compliant paths). The setup wizard handles initial configuration. You can also use CLI commands:
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
106
|
# Inside the agent REPL:
|
|
@@ -147,7 +147,7 @@ ruff format --check .
|
|
|
147
147
|
|
|
148
148
|
## Credits
|
|
149
149
|
|
|
150
|
-
This project is a fork of [code-puppy](https://github.com/mpfaffenberger/
|
|
150
|
+
This project is a fork of [code-puppy](https://github.com/mpfaffenberger/newcode) by [Michael Pfaffenberger](https://github.com/mpfaffenberger), licensed under the MIT License. We are grateful for the original work and the open-source foundation it provides.
|
|
151
151
|
|
|
152
152
|
## License
|
|
153
153
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
An AI-powered code generation and modification agent for the terminal.
|
|
4
4
|
|
|
5
|
-
NewCode is a fork of [code-puppy](https://github.com/mpfaffenberger/
|
|
5
|
+
NewCode is a fork of [code-puppy](https://github.com/mpfaffenberger/newcode) by Michael Pfaffenberger, customized for the fedstew workflow. We wanted a clean, professional CLI agent with opinionated defaults, streamlined prompts, and a focus on practical code generation without the playful branding.
|
|
6
6
|
|
|
7
7
|
## What changed from code-puppy
|
|
8
8
|
|
|
@@ -57,7 +57,7 @@ On first run, you'll be guided through a setup wizard to configure your API keys
|
|
|
57
57
|
|
|
58
58
|
## Configuration
|
|
59
59
|
|
|
60
|
-
Configuration is stored in `~/.config/
|
|
60
|
+
Configuration is stored in `~/.config/newcode/puppy.cfg` (XDG-compliant paths). The setup wizard handles initial configuration. You can also use CLI commands:
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
63
|
# Inside the agent REPL:
|
|
@@ -104,7 +104,7 @@ ruff format --check .
|
|
|
104
104
|
|
|
105
105
|
## Credits
|
|
106
106
|
|
|
107
|
-
This project is a fork of [code-puppy](https://github.com/mpfaffenberger/
|
|
107
|
+
This project is a fork of [code-puppy](https://github.com/mpfaffenberger/newcode) by [Michael Pfaffenberger](https://github.com/mpfaffenberger), licensed under the MIT License. We are grateful for the original work and the open-source foundation it provides.
|
|
108
108
|
|
|
109
109
|
## License
|
|
110
110
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Entry point for running newcode as a module.
|
|
3
3
|
|
|
4
|
-
This allows the package to be run with: python -m
|
|
4
|
+
This allows the package to be run with: python -m newcode
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
from
|
|
7
|
+
from newcode.main import main_entry
|
|
8
8
|
|
|
9
9
|
if __name__ == "__main__":
|
|
10
10
|
main_entry()
|
|
@@ -4,9 +4,9 @@ import json
|
|
|
4
4
|
import os
|
|
5
5
|
from typing import Dict, List, Optional
|
|
6
6
|
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
7
|
+
from newcode.config import get_user_agents_directory
|
|
8
|
+
from newcode.model_factory import ModelFactory
|
|
9
|
+
from newcode.tools import get_available_tool_names
|
|
10
10
|
|
|
11
11
|
from .base_agent import BaseAgent
|
|
12
12
|
|
|
@@ -33,7 +33,7 @@ class AgentCreatorAgent(BaseAgent):
|
|
|
33
33
|
# Also get Universal Constructor tools (custom tools created by users)
|
|
34
34
|
uc_tools_info = []
|
|
35
35
|
try:
|
|
36
|
-
from
|
|
36
|
+
from newcode.plugins.universal_constructor.registry import get_registry
|
|
37
37
|
|
|
38
38
|
registry = get_registry()
|
|
39
39
|
uc_tools = registry.list_tools(include_disabled=True)
|
|
@@ -49,9 +49,7 @@ class AgentCreatorAgent(BaseAgent):
|
|
|
49
49
|
if uc_tools_info:
|
|
50
50
|
uc_tools_section = "\n".join(uc_tools_info)
|
|
51
51
|
else:
|
|
52
|
-
uc_tools_section =
|
|
53
|
-
"No custom UC tools created yet."
|
|
54
|
-
)
|
|
52
|
+
uc_tools_section = "No custom UC tools created yet."
|
|
55
53
|
|
|
56
54
|
# Load available models dynamically
|
|
57
55
|
models_config = ModelFactory.load_config()
|
|
@@ -509,7 +507,7 @@ Your goal is to take users from idea to working agent in one smooth conversation
|
|
|
509
507
|
|
|
510
508
|
def get_available_tools(self) -> List[str]:
|
|
511
509
|
"""Get all tools needed for agent creation."""
|
|
512
|
-
from
|
|
510
|
+
from newcode.config import get_universal_constructor_enabled
|
|
513
511
|
|
|
514
512
|
tools = [
|
|
515
513
|
"list_files",
|
|
@@ -16,7 +16,9 @@ class JavaScriptReviewerAgent(BaseAgent):
|
|
|
16
16
|
|
|
17
17
|
@property
|
|
18
18
|
def description(self) -> str:
|
|
19
|
-
return
|
|
19
|
+
return (
|
|
20
|
+
"Thorough JavaScript reviewer enforcing modern patterns and runtime sanity"
|
|
21
|
+
)
|
|
20
22
|
|
|
21
23
|
def get_available_tools(self) -> list[str]:
|
|
22
24
|
"""Reviewers need read-only inspection helpers plus agent collaboration."""
|
|
@@ -12,10 +12,10 @@ from typing import Dict, List, Optional, Type, Union
|
|
|
12
12
|
|
|
13
13
|
from pydantic_ai.messages import ModelMessage
|
|
14
14
|
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from
|
|
15
|
+
from newcode.agents.base_agent import BaseAgent
|
|
16
|
+
from newcode.agents.json_agent import JSONAgent, discover_json_agents
|
|
17
|
+
from newcode.callbacks import on_agent_reload, on_register_agents
|
|
18
|
+
from newcode.messaging import emit_success, emit_warning
|
|
19
19
|
|
|
20
20
|
# Registry of available agents (Python classes and JSON file paths)
|
|
21
21
|
_AGENT_REGISTRY: Dict[str, Union[Type[BaseAgent], str]] = {}
|
|
@@ -194,7 +194,7 @@ def _discover_agents(message_group_id: Optional[str] = None):
|
|
|
194
194
|
_AGENT_REGISTRY.clear()
|
|
195
195
|
|
|
196
196
|
# 1. Discover Python agent classes in the agents package
|
|
197
|
-
import
|
|
197
|
+
import newcode.agents as agents_package
|
|
198
198
|
|
|
199
199
|
# Iterate through all modules in the agents package
|
|
200
200
|
for _, modname, _ in pkgutil.iter_modules(agents_package.__path__):
|
|
@@ -207,7 +207,7 @@ def _discover_agents(message_group_id: Optional[str] = None):
|
|
|
207
207
|
|
|
208
208
|
try:
|
|
209
209
|
# Import the module
|
|
210
|
-
module = importlib.import_module(f"
|
|
210
|
+
module = importlib.import_module(f"newcode.agents.{modname}")
|
|
211
211
|
|
|
212
212
|
# Look for BaseAgent subclasses
|
|
213
213
|
for attr_name in dir(module):
|
|
@@ -236,7 +236,7 @@ def _discover_agents(message_group_id: Optional[str] = None):
|
|
|
236
236
|
|
|
237
237
|
try:
|
|
238
238
|
# Import the sub-package
|
|
239
|
-
subpkg = importlib.import_module(f"
|
|
239
|
+
subpkg = importlib.import_module(f"newcode.agents.{subpkg_name}")
|
|
240
240
|
|
|
241
241
|
# Iterate through modules in the sub-package
|
|
242
242
|
if not hasattr(subpkg, "__path__"):
|
|
@@ -249,7 +249,7 @@ def _discover_agents(message_group_id: Optional[str] = None):
|
|
|
249
249
|
try:
|
|
250
250
|
# Import the submodule
|
|
251
251
|
module = importlib.import_module(
|
|
252
|
-
f"
|
|
252
|
+
f"newcode.agents.{subpkg_name}.{modname}"
|
|
253
253
|
)
|
|
254
254
|
|
|
255
255
|
# Look for BaseAgent subclasses
|
|
@@ -574,7 +574,7 @@ def _build_clone_display_name(display_name: str, clone_index: int) -> str:
|
|
|
574
574
|
|
|
575
575
|
def _filter_available_tools(tool_names: List[str]) -> List[str]:
|
|
576
576
|
"""Filter a tool list to only available tool names."""
|
|
577
|
-
from
|
|
577
|
+
from newcode.tools import get_available_tool_names
|
|
578
578
|
|
|
579
579
|
available_tools = set(get_available_tool_names())
|
|
580
580
|
return [tool for tool in tool_names if tool in available_tools]
|
|
@@ -61,10 +61,10 @@ You can help users:
|
|
|
61
61
|
|
|
62
62
|
## How Scheduling Works
|
|
63
63
|
|
|
64
|
-
- Tasks are stored in `~/.
|
|
64
|
+
- Tasks are stored in `~/.newcode/scheduled_tasks.json`
|
|
65
65
|
- A background daemon checks for tasks to run based on their schedule
|
|
66
66
|
- Each task runs: `newcode -p <prompt> --model <model> --agent <agent>`
|
|
67
|
-
- Output is saved to log files in `~/.
|
|
67
|
+
- Output is saved to log files in `~/.newcode/scheduler_logs/`
|
|
68
68
|
|
|
69
69
|
## Schedule Types
|
|
70
70
|
|
|
@@ -51,8 +51,8 @@ from pydantic_ai.messages import (
|
|
|
51
51
|
)
|
|
52
52
|
from rich.text import Text
|
|
53
53
|
|
|
54
|
-
from
|
|
55
|
-
from
|
|
54
|
+
from newcode.agents.event_stream_handler import event_stream_handler
|
|
55
|
+
from newcode.callbacks import (
|
|
56
56
|
on_agent_run_end,
|
|
57
57
|
on_agent_run_start,
|
|
58
58
|
on_message_history_processor_end,
|
|
@@ -60,7 +60,7 @@ from code_puppy.callbacks import (
|
|
|
60
60
|
)
|
|
61
61
|
|
|
62
62
|
# Consolidated relative imports
|
|
63
|
-
from
|
|
63
|
+
from newcode.config import (
|
|
64
64
|
get_agent_pinned_model,
|
|
65
65
|
get_compaction_strategy,
|
|
66
66
|
get_compaction_threshold,
|
|
@@ -70,22 +70,22 @@ from code_puppy.config import (
|
|
|
70
70
|
get_use_dbos,
|
|
71
71
|
get_value,
|
|
72
72
|
)
|
|
73
|
-
from
|
|
74
|
-
from
|
|
75
|
-
from
|
|
76
|
-
from
|
|
73
|
+
from newcode.error_logging import log_error
|
|
74
|
+
from newcode.keymap import cancel_agent_uses_signal, get_cancel_agent_char_code
|
|
75
|
+
from newcode.mcp_ import get_mcp_manager
|
|
76
|
+
from newcode.messaging import (
|
|
77
77
|
emit_error,
|
|
78
78
|
emit_info,
|
|
79
79
|
emit_warning,
|
|
80
80
|
)
|
|
81
|
-
from
|
|
81
|
+
from newcode.messaging.spinner import (
|
|
82
82
|
SpinnerBase,
|
|
83
83
|
update_spinner_context,
|
|
84
84
|
)
|
|
85
|
-
from
|
|
86
|
-
from
|
|
87
|
-
from
|
|
88
|
-
from
|
|
85
|
+
from newcode.model_factory import ModelFactory, make_model_settings
|
|
86
|
+
from newcode.summarization_agent import SummarizationError, run_summarization_sync
|
|
87
|
+
from newcode.tools.agent_tools import _active_subagent_tasks
|
|
88
|
+
from newcode.tools.command_runner import (
|
|
89
89
|
is_awaiting_user_input,
|
|
90
90
|
)
|
|
91
91
|
|
|
@@ -96,7 +96,7 @@ _reload_count = 0
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
def _log_error_to_file(exc: Exception) -> Optional[str]:
|
|
99
|
-
"""Log detailed error information to ~/.
|
|
99
|
+
"""Log detailed error information to ~/.newcode/error_logs/log_{timestamp}.txt.
|
|
100
100
|
|
|
101
101
|
Args:
|
|
102
102
|
exc: The exception to log.
|
|
@@ -105,7 +105,7 @@ def _log_error_to_file(exc: Exception) -> Optional[str]:
|
|
|
105
105
|
The path to the log file if successful, None otherwise.
|
|
106
106
|
"""
|
|
107
107
|
try:
|
|
108
|
-
from
|
|
108
|
+
from newcode.error_logging import get_logs_dir
|
|
109
109
|
|
|
110
110
|
error_logs_dir = pathlib.Path(get_logs_dir())
|
|
111
111
|
error_logs_dir.mkdir(parents=True, exist_ok=True)
|
|
@@ -492,7 +492,7 @@ class BaseAgent(ABC):
|
|
|
492
492
|
# For models that prepend system prompt to user message (claude-code, antigravity),
|
|
493
493
|
# this returns the short fixed instructions. For other models, returns full prompt.
|
|
494
494
|
try:
|
|
495
|
-
from
|
|
495
|
+
from newcode.model_utils import prepare_prompt_for_model
|
|
496
496
|
|
|
497
497
|
model_name = (
|
|
498
498
|
self.get_model_name() if hasattr(self, "get_model_name") else ""
|
|
@@ -1174,12 +1174,12 @@ class BaseAgent(ABC):
|
|
|
1174
1174
|
"""
|
|
1175
1175
|
return run_summarization_sync(instructions, message_history)
|
|
1176
1176
|
|
|
1177
|
-
# ===== Agent wiring formerly in
|
|
1177
|
+
# ===== Agent wiring formerly in newcode/agent.py =====
|
|
1178
1178
|
def load_agent_rules(self) -> Optional[str]:
|
|
1179
1179
|
"""Load AGENT(S).md from both global config and project directory.
|
|
1180
1180
|
|
|
1181
1181
|
Checks for AGENTS.md/AGENT.md/agents.md/agent.md in this order:
|
|
1182
|
-
1. Global config directory (~/.
|
|
1182
|
+
1. Global config directory (~/.newcode/ or XDG config)
|
|
1183
1183
|
2. Current working directory (project-specific)
|
|
1184
1184
|
|
|
1185
1185
|
If both exist, they are combined with global rules first, then project rules.
|
|
@@ -1193,7 +1193,7 @@ class BaseAgent(ABC):
|
|
|
1193
1193
|
|
|
1194
1194
|
# Load global rules from CONFIG_DIR
|
|
1195
1195
|
global_rules = None
|
|
1196
|
-
from
|
|
1196
|
+
from newcode.config import CONFIG_DIR
|
|
1197
1197
|
|
|
1198
1198
|
for path_str in possible_paths:
|
|
1199
1199
|
global_path = Path(CONFIG_DIR) / path_str
|
|
@@ -1302,7 +1302,7 @@ class BaseAgent(ABC):
|
|
|
1302
1302
|
|
|
1303
1303
|
def reload_code_generation_agent(self, message_group: Optional[str] = None):
|
|
1304
1304
|
"""Force-reload the pydantic-ai Agent based on current config and model."""
|
|
1305
|
-
from
|
|
1305
|
+
from newcode.tools import register_tools_for_agent
|
|
1306
1306
|
|
|
1307
1307
|
if message_group is None:
|
|
1308
1308
|
message_group = str(uuid.uuid4())
|
|
@@ -1326,7 +1326,7 @@ class BaseAgent(ABC):
|
|
|
1326
1326
|
model_settings = make_model_settings(resolved_model_name)
|
|
1327
1327
|
|
|
1328
1328
|
# Handle claude-code models: swap instructions (prompt prepending happens in run_with_mcp)
|
|
1329
|
-
from
|
|
1329
|
+
from newcode.model_utils import prepare_prompt_for_model
|
|
1330
1330
|
|
|
1331
1331
|
prepared = prepare_prompt_for_model(
|
|
1332
1332
|
model_name, instructions, "", prepend_system_to_user=False
|
|
@@ -1475,8 +1475,8 @@ class BaseAgent(ABC):
|
|
|
1475
1475
|
Returns:
|
|
1476
1476
|
A configured PydanticAgent (or DBOSAgent wrapper) with the custom output_type.
|
|
1477
1477
|
"""
|
|
1478
|
-
from
|
|
1479
|
-
from
|
|
1478
|
+
from newcode.model_utils import prepare_prompt_for_model
|
|
1479
|
+
from newcode.tools import register_tools_for_agent
|
|
1480
1480
|
|
|
1481
1481
|
model_name = self.get_model_name()
|
|
1482
1482
|
models_config = ModelFactory.load_config()
|
|
@@ -1663,9 +1663,7 @@ class BaseAgent(ABC):
|
|
|
1663
1663
|
"Key listener stopped unexpectedly; press Ctrl+C to cancel."
|
|
1664
1664
|
)
|
|
1665
1665
|
|
|
1666
|
-
thread = threading.Thread(
|
|
1667
|
-
target=listener, name="key-listener", daemon=True
|
|
1668
|
-
)
|
|
1666
|
+
thread = threading.Thread(target=listener, name="key-listener", daemon=True)
|
|
1669
1667
|
thread.start()
|
|
1670
1668
|
return thread
|
|
1671
1669
|
|
|
@@ -1817,7 +1815,7 @@ class BaseAgent(ABC):
|
|
|
1817
1815
|
|
|
1818
1816
|
# Handle model-specific prompt transformations via prepare_prompt_for_model()
|
|
1819
1817
|
# This uses the get_model_system_prompt hook, so plugins can register their own handlers
|
|
1820
|
-
from
|
|
1818
|
+
from newcode.model_utils import prepare_prompt_for_model
|
|
1821
1819
|
|
|
1822
1820
|
# Only prepend system prompt on first message (empty history)
|
|
1823
1821
|
should_prepend = len(self.get_message_history()) == 0
|
|
@@ -1994,7 +1992,7 @@ class BaseAgent(ABC):
|
|
|
1994
1992
|
loop = asyncio.get_running_loop()
|
|
1995
1993
|
|
|
1996
1994
|
def schedule_agent_cancel() -> None:
|
|
1997
|
-
from
|
|
1995
|
+
from newcode.tools.command_runner import _RUNNING_PROCESSES
|
|
1998
1996
|
|
|
1999
1997
|
if len(_RUNNING_PROCESSES):
|
|
2000
1998
|
emit_warning(
|
|
@@ -2029,8 +2027,8 @@ class BaseAgent(ABC):
|
|
|
2029
2027
|
# When using keyboard-based cancel, SIGINT should be a no-op
|
|
2030
2028
|
# (just show a hint to user about the configured cancel key)
|
|
2031
2029
|
# Also reset terminal to prevent bricking on Windows+uvx
|
|
2032
|
-
from
|
|
2033
|
-
from
|
|
2030
|
+
from newcode.keymap import get_cancel_agent_display_name
|
|
2031
|
+
from newcode.terminal_utils import reset_windows_terminal_full
|
|
2034
2032
|
|
|
2035
2033
|
# Reset terminal state first to prevent bricking
|
|
2036
2034
|
reset_windows_terminal_full()
|
|
@@ -18,9 +18,9 @@ from rich.console import Console
|
|
|
18
18
|
from rich.markup import escape
|
|
19
19
|
from rich.text import Text
|
|
20
20
|
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
21
|
+
from newcode.config import get_banner_color, get_subagent_verbose
|
|
22
|
+
from newcode.messaging.spinner import pause_all_spinners, resume_all_spinners
|
|
23
|
+
from newcode.tools.subagent_context import is_subagent
|
|
24
24
|
|
|
25
25
|
logger = logging.getLogger(__name__)
|
|
26
26
|
|
|
@@ -33,8 +33,8 @@ def _fire_stream_event(event_type: str, event_data: Any) -> None:
|
|
|
33
33
|
event_data: Data associated with the event
|
|
34
34
|
"""
|
|
35
35
|
try:
|
|
36
|
-
from
|
|
37
|
-
from
|
|
36
|
+
from newcode import callbacks
|
|
37
|
+
from newcode.messaging import get_session_context
|
|
38
38
|
|
|
39
39
|
agent_session_id = get_session_context()
|
|
40
40
|
|
|
@@ -87,14 +87,14 @@ class JSONAgent(BaseAgent):
|
|
|
87
87
|
Supports both built-in tools and Universal Constructor (UC) tools.
|
|
88
88
|
UC tools are identified by checking the UC registry.
|
|
89
89
|
"""
|
|
90
|
-
from
|
|
90
|
+
from newcode.tools import get_available_tool_names
|
|
91
91
|
|
|
92
92
|
available_tools = get_available_tool_names()
|
|
93
93
|
|
|
94
94
|
# Also get UC tool names
|
|
95
95
|
uc_tool_names = set()
|
|
96
96
|
try:
|
|
97
|
-
from
|
|
97
|
+
from newcode.plugins.universal_constructor.registry import get_registry
|
|
98
98
|
|
|
99
99
|
registry = get_registry()
|
|
100
100
|
for tool in registry.list_tools():
|
|
@@ -151,15 +151,15 @@ def discover_json_agents() -> Dict[str, str]:
|
|
|
151
151
|
"""Discover JSON agent files in the user's and project's agents directories.
|
|
152
152
|
|
|
153
153
|
Searches two locations:
|
|
154
|
-
1. User agents directory (~/.
|
|
155
|
-
2. Project agents directory (<CWD>/.
|
|
154
|
+
1. User agents directory (~/.newcode/agents/)
|
|
155
|
+
2. Project agents directory (<CWD>/.newcode/agents/) - if it exists
|
|
156
156
|
|
|
157
157
|
Project agents take priority over user agents when names collide.
|
|
158
158
|
|
|
159
159
|
Returns:
|
|
160
160
|
Dict mapping agent names to their JSON file paths.
|
|
161
161
|
"""
|
|
162
|
-
from
|
|
162
|
+
from newcode.config import (
|
|
163
163
|
get_project_agents_directory,
|
|
164
164
|
get_user_agents_directory,
|
|
165
165
|
)
|
|
@@ -6,7 +6,7 @@ This handler suppresses all console output but still:
|
|
|
6
6
|
- Tracks tool calls, tokens, and status changes
|
|
7
7
|
|
|
8
8
|
Usage:
|
|
9
|
-
>>> from
|
|
9
|
+
>>> from newcode.agents.subagent_stream_handler import subagent_stream_handler
|
|
10
10
|
>>> # In agent run:
|
|
11
11
|
>>> await subagent_stream_handler(ctx, events, session_id="my-session-123")
|
|
12
12
|
"""
|
|
@@ -47,7 +47,7 @@ def _fire_callback(event_type: str, event_data: Any, session_id: Optional[str])
|
|
|
47
47
|
session_id: Optional session ID for the sub-agent
|
|
48
48
|
"""
|
|
49
49
|
try:
|
|
50
|
-
from
|
|
50
|
+
from newcode import callbacks
|
|
51
51
|
|
|
52
52
|
loop = asyncio.get_running_loop()
|
|
53
53
|
loop.create_task(callbacks.on_stream_event(event_type, event_data, session_id))
|
|
@@ -109,8 +109,8 @@ async def subagent_stream_handler(
|
|
|
109
109
|
If None, falls back to get_session_context().
|
|
110
110
|
"""
|
|
111
111
|
# Late import to avoid circular dependencies
|
|
112
|
-
from
|
|
113
|
-
from
|
|
112
|
+
from newcode.messaging import get_session_context
|
|
113
|
+
from newcode.messaging.subagent_console import SubAgentConsoleManager
|
|
114
114
|
|
|
115
115
|
manager = SubAgentConsoleManager.get_instance()
|
|
116
116
|
|
|
@@ -60,7 +60,7 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
|
|
|
60
60
|
|
|
61
61
|
# 1. Close all PTY sessions
|
|
62
62
|
try:
|
|
63
|
-
from
|
|
63
|
+
from newcode.api.pty_manager import get_pty_manager
|
|
64
64
|
|
|
65
65
|
pty_manager = get_pty_manager()
|
|
66
66
|
await pty_manager.close_all()
|
|
@@ -70,7 +70,7 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
|
|
|
70
70
|
|
|
71
71
|
# 2. Remove PID file so /api status knows we're gone
|
|
72
72
|
try:
|
|
73
|
-
from
|
|
73
|
+
from newcode.config import STATE_DIR
|
|
74
74
|
|
|
75
75
|
pid_file = Path(STATE_DIR) / "api_server.pid"
|
|
76
76
|
if pid_file.exists():
|
|
@@ -104,7 +104,7 @@ def create_app() -> FastAPI:
|
|
|
104
104
|
)
|
|
105
105
|
|
|
106
106
|
# Include routers
|
|
107
|
-
from
|
|
107
|
+
from newcode.api.routers import agents, commands, config, sessions
|
|
108
108
|
|
|
109
109
|
app.include_router(config.router, prefix="/api/config", tags=["config"])
|
|
110
110
|
app.include_router(commands.router, prefix="/api/commands", tags=["commands"])
|
|
@@ -112,7 +112,7 @@ def create_app() -> FastAPI:
|
|
|
112
112
|
app.include_router(agents.router, prefix="/api/agents", tags=["agents"])
|
|
113
113
|
|
|
114
114
|
# WebSocket endpoints (events + terminal)
|
|
115
|
-
from
|
|
115
|
+
from newcode.api.websocket import setup_websocket
|
|
116
116
|
|
|
117
117
|
setup_websocket(app)
|
|
118
118
|
|
|
@@ -7,6 +7,6 @@ This package contains the FastAPI router modules for different API domains:
|
|
|
7
7
|
- agents: Agent-related endpoints
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
-
from
|
|
10
|
+
from newcode.api.routers import agents, commands, config, sessions
|
|
11
11
|
|
|
12
12
|
__all__ = ["config", "commands", "sessions", "agents"]
|
|
@@ -21,7 +21,7 @@ async def list_agents() -> List[Dict[str, Any]]:
|
|
|
21
21
|
Returns:
|
|
22
22
|
List[Dict[str, Any]]: List of agent information dictionaries.
|
|
23
23
|
"""
|
|
24
|
-
from
|
|
24
|
+
from newcode.agents import get_agent_descriptions, get_available_agents
|
|
25
25
|
|
|
26
26
|
agents_dict = get_available_agents()
|
|
27
27
|
descriptions = get_agent_descriptions()
|