newcode 0.2.10__tar.gz → 0.2.12__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.
Files changed (272) hide show
  1. {newcode-0.2.10 → newcode-0.2.12}/PKG-INFO +1 -5
  2. {newcode-0.2.10 → newcode-0.2.12}/README.md +0 -1
  3. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/core_commands.py +0 -85
  4. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/agent_tools.py +17 -7
  5. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/terminal_tools.py +1 -1
  6. {newcode-0.2.10 → newcode-0.2.12}/pyproject.toml +1 -4
  7. newcode-0.2.10/newcode/api/__init__.py +0 -13
  8. newcode-0.2.10/newcode/api/app.py +0 -169
  9. newcode-0.2.10/newcode/api/main.py +0 -21
  10. newcode-0.2.10/newcode/api/pty_manager.py +0 -453
  11. newcode-0.2.10/newcode/api/routers/__init__.py +0 -12
  12. newcode-0.2.10/newcode/api/routers/agents.py +0 -36
  13. newcode-0.2.10/newcode/api/routers/commands.py +0 -217
  14. newcode-0.2.10/newcode/api/routers/config.py +0 -75
  15. newcode-0.2.10/newcode/api/routers/sessions.py +0 -234
  16. newcode-0.2.10/newcode/api/templates/terminal.html +0 -361
  17. newcode-0.2.10/newcode/api/websocket.py +0 -154
  18. {newcode-0.2.10 → newcode-0.2.12}/.gitignore +0 -0
  19. {newcode-0.2.10 → newcode-0.2.12}/LICENSE +0 -0
  20. {newcode-0.2.10 → newcode-0.2.12}/newcode/__init__.py +0 -0
  21. {newcode-0.2.10 → newcode-0.2.12}/newcode/__main__.py +0 -0
  22. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/__init__.py +0 -0
  23. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_c_reviewer.py +0 -0
  24. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_code_agent.py +0 -0
  25. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_code_reviewer.py +0 -0
  26. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_cpp_reviewer.py +0 -0
  27. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_creator_agent.py +0 -0
  28. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_golang_reviewer.py +0 -0
  29. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_javascript_reviewer.py +0 -0
  30. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_manager.py +0 -0
  31. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_pack_leader.py +0 -0
  32. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_planning.py +0 -0
  33. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_python_programmer.py +0 -0
  34. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_python_reviewer.py +0 -0
  35. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_qa_browser.py +0 -0
  36. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_qa_expert.py +0 -0
  37. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_security_auditor.py +0 -0
  38. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_terminal_qa.py +0 -0
  39. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/agent_typescript_reviewer.py +0 -0
  40. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/base_agent.py +0 -0
  41. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/event_stream_handler.py +0 -0
  42. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/json_agent.py +0 -0
  43. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/pack/__init__.py +0 -0
  44. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/pack/bloodhound.py +0 -0
  45. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/pack/husky.py +0 -0
  46. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/pack/retriever.py +0 -0
  47. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/pack/shepherd.py +0 -0
  48. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/pack/terrier.py +0 -0
  49. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/pack/watchdog.py +0 -0
  50. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/prompt_reviewer.py +0 -0
  51. {newcode-0.2.10 → newcode-0.2.12}/newcode/agents/subagent_stream_handler.py +0 -0
  52. {newcode-0.2.10 → newcode-0.2.12}/newcode/callbacks.py +0 -0
  53. {newcode-0.2.10 → newcode-0.2.12}/newcode/chatgpt_codex_client.py +0 -0
  54. {newcode-0.2.10 → newcode-0.2.12}/newcode/claude_cache_client.py +0 -0
  55. {newcode-0.2.10 → newcode-0.2.12}/newcode/cli_runner.py +0 -0
  56. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/__init__.py +0 -0
  57. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/add_model_menu.py +0 -0
  58. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/agent_menu.py +0 -0
  59. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/attachments.py +0 -0
  60. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/autosave_menu.py +0 -0
  61. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/clipboard.py +0 -0
  62. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/colors_menu.py +0 -0
  63. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/command_handler.py +0 -0
  64. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/command_registry.py +0 -0
  65. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/config_commands.py +0 -0
  66. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/diff_menu.py +0 -0
  67. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/file_path_completion.py +0 -0
  68. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/load_context_completion.py +0 -0
  69. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/__init__.py +0 -0
  70. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/base.py +0 -0
  71. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/catalog_server_installer.py +0 -0
  72. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/custom_server_form.py +0 -0
  73. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/custom_server_installer.py +0 -0
  74. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/edit_command.py +0 -0
  75. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/handler.py +0 -0
  76. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/help_command.py +0 -0
  77. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/install_command.py +0 -0
  78. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/install_menu.py +0 -0
  79. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/list_command.py +0 -0
  80. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/logs_command.py +0 -0
  81. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/remove_command.py +0 -0
  82. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/restart_command.py +0 -0
  83. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/search_command.py +0 -0
  84. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/start_all_command.py +0 -0
  85. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/start_command.py +0 -0
  86. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/status_command.py +0 -0
  87. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/stop_all_command.py +0 -0
  88. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/stop_command.py +0 -0
  89. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/test_command.py +0 -0
  90. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/utils.py +0 -0
  91. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp/wizard_utils.py +0 -0
  92. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/mcp_completion.py +0 -0
  93. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/model_picker_completion.py +0 -0
  94. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/model_settings_menu.py +0 -0
  95. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/motd.py +0 -0
  96. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/onboarding_slides.py +0 -0
  97. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/onboarding_wizard.py +0 -0
  98. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/pin_command_completion.py +0 -0
  99. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/prompt_toolkit_completion.py +0 -0
  100. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/session_commands.py +0 -0
  101. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/skills_completion.py +0 -0
  102. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/uc_menu.py +0 -0
  103. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/utils.py +0 -0
  104. {newcode-0.2.10 → newcode-0.2.12}/newcode/command_line/wiggum_state.py +0 -0
  105. {newcode-0.2.10 → newcode-0.2.12}/newcode/config.py +0 -0
  106. {newcode-0.2.10 → newcode-0.2.12}/newcode/error_logging.py +0 -0
  107. {newcode-0.2.10 → newcode-0.2.12}/newcode/gemini_code_assist.py +0 -0
  108. {newcode-0.2.10 → newcode-0.2.12}/newcode/gemini_model.py +0 -0
  109. {newcode-0.2.10 → newcode-0.2.12}/newcode/hook_engine/README.md +0 -0
  110. {newcode-0.2.10 → newcode-0.2.12}/newcode/hook_engine/__init__.py +0 -0
  111. {newcode-0.2.10 → newcode-0.2.12}/newcode/hook_engine/aliases.py +0 -0
  112. {newcode-0.2.10 → newcode-0.2.12}/newcode/hook_engine/engine.py +0 -0
  113. {newcode-0.2.10 → newcode-0.2.12}/newcode/hook_engine/executor.py +0 -0
  114. {newcode-0.2.10 → newcode-0.2.12}/newcode/hook_engine/matcher.py +0 -0
  115. {newcode-0.2.10 → newcode-0.2.12}/newcode/hook_engine/models.py +0 -0
  116. {newcode-0.2.10 → newcode-0.2.12}/newcode/hook_engine/registry.py +0 -0
  117. {newcode-0.2.10 → newcode-0.2.12}/newcode/hook_engine/validator.py +0 -0
  118. {newcode-0.2.10 → newcode-0.2.12}/newcode/http_utils.py +0 -0
  119. {newcode-0.2.10 → newcode-0.2.12}/newcode/image_utils.py +0 -0
  120. {newcode-0.2.10 → newcode-0.2.12}/newcode/keymap.py +0 -0
  121. {newcode-0.2.10 → newcode-0.2.12}/newcode/main.py +0 -0
  122. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/__init__.py +0 -0
  123. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/async_lifecycle.py +0 -0
  124. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/blocking_startup.py +0 -0
  125. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/captured_stdio_server.py +0 -0
  126. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/circuit_breaker.py +0 -0
  127. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/config_wizard.py +0 -0
  128. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/dashboard.py +0 -0
  129. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/error_isolation.py +0 -0
  130. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/examples/retry_example.py +0 -0
  131. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/health_monitor.py +0 -0
  132. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/managed_server.py +0 -0
  133. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/manager.py +0 -0
  134. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/mcp_logs.py +0 -0
  135. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/registry.py +0 -0
  136. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/retry_manager.py +0 -0
  137. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/server_registry_catalog.py +0 -0
  138. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/status_tracker.py +0 -0
  139. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_/system_tools.py +0 -0
  140. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_prompts/__init__.py +0 -0
  141. {newcode-0.2.10 → newcode-0.2.12}/newcode/mcp_prompts/hook_creator.py +0 -0
  142. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/__init__.py +0 -0
  143. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/bus.py +0 -0
  144. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/commands.py +0 -0
  145. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/markdown_patches.py +0 -0
  146. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/message_queue.py +0 -0
  147. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/messages.py +0 -0
  148. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/queue_console.py +0 -0
  149. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/renderers.py +0 -0
  150. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/rich_renderer.py +0 -0
  151. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/spinner/__init__.py +0 -0
  152. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/spinner/console_spinner.py +0 -0
  153. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/spinner/spinner_base.py +0 -0
  154. {newcode-0.2.10 → newcode-0.2.12}/newcode/messaging/subagent_console.py +0 -0
  155. {newcode-0.2.10 → newcode-0.2.12}/newcode/model_factory.py +0 -0
  156. {newcode-0.2.10 → newcode-0.2.12}/newcode/model_switching.py +0 -0
  157. {newcode-0.2.10 → newcode-0.2.12}/newcode/model_utils.py +0 -0
  158. {newcode-0.2.10 → newcode-0.2.12}/newcode/models.json +0 -0
  159. {newcode-0.2.10 → newcode-0.2.12}/newcode/models_dev_api.json +0 -0
  160. {newcode-0.2.10 → newcode-0.2.12}/newcode/models_dev_parser.py +0 -0
  161. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/__init__.py +0 -0
  162. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/agent_skills/__init__.py +0 -0
  163. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/agent_skills/config.py +0 -0
  164. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/agent_skills/discovery.py +0 -0
  165. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/agent_skills/downloader.py +0 -0
  166. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/agent_skills/installer.py +0 -0
  167. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/agent_skills/metadata.py +0 -0
  168. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/agent_skills/prompt_builder.py +0 -0
  169. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/agent_skills/register_callbacks.py +0 -0
  170. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/agent_skills/remote_catalog.py +0 -0
  171. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/agent_skills/skill_catalog.py +0 -0
  172. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/agent_skills/skills_install_menu.py +0 -0
  173. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/agent_skills/skills_menu.py +0 -0
  174. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/antigravity_oauth/__init__.py +0 -0
  175. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/antigravity_oauth/accounts.py +0 -0
  176. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/antigravity_oauth/antigravity_model.py +0 -0
  177. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/antigravity_oauth/config.py +0 -0
  178. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/antigravity_oauth/constants.py +0 -0
  179. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/antigravity_oauth/oauth.py +0 -0
  180. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/antigravity_oauth/register_callbacks.py +0 -0
  181. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/antigravity_oauth/storage.py +0 -0
  182. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/antigravity_oauth/test_plugin.py +0 -0
  183. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/antigravity_oauth/token.py +0 -0
  184. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/antigravity_oauth/transport.py +0 -0
  185. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/antigravity_oauth/utils.py +0 -0
  186. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/chatgpt_oauth/__init__.py +0 -0
  187. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/chatgpt_oauth/config.py +0 -0
  188. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/chatgpt_oauth/oauth_flow.py +0 -0
  189. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/chatgpt_oauth/register_callbacks.py +0 -0
  190. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/chatgpt_oauth/test_plugin.py +0 -0
  191. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/chatgpt_oauth/utils.py +0 -0
  192. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/claude_code_hooks/__init__.py +0 -0
  193. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/claude_code_hooks/config.py +0 -0
  194. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/claude_code_hooks/register_callbacks.py +0 -0
  195. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/claude_code_oauth/README.md +0 -0
  196. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/claude_code_oauth/SETUP.md +0 -0
  197. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/claude_code_oauth/__init__.py +0 -0
  198. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/claude_code_oauth/config.py +0 -0
  199. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/claude_code_oauth/register_callbacks.py +0 -0
  200. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/claude_code_oauth/test_plugin.py +0 -0
  201. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/claude_code_oauth/token_refresh_heartbeat.py +0 -0
  202. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/claude_code_oauth/utils.py +0 -0
  203. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/customizable_commands/__init__.py +0 -0
  204. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/customizable_commands/register_callbacks.py +0 -0
  205. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/example_custom_command/README.md +0 -0
  206. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/example_custom_command/register_callbacks.py +0 -0
  207. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/file_permission_handler/__init__.py +0 -0
  208. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/file_permission_handler/register_callbacks.py +0 -0
  209. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/frontend_emitter/__init__.py +0 -0
  210. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/frontend_emitter/emitter.py +0 -0
  211. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/frontend_emitter/register_callbacks.py +0 -0
  212. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/hook_creator/__init__.py +0 -0
  213. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/hook_creator/register_callbacks.py +0 -0
  214. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/hook_manager/__init__.py +0 -0
  215. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/hook_manager/config.py +0 -0
  216. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/hook_manager/hooks_menu.py +0 -0
  217. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/hook_manager/register_callbacks.py +0 -0
  218. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/oauth_puppy_html.py +0 -0
  219. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/shell_safety/__init__.py +0 -0
  220. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/shell_safety/agent_shell_safety.py +0 -0
  221. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/shell_safety/command_cache.py +0 -0
  222. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/shell_safety/register_callbacks.py +0 -0
  223. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/synthetic_status/__init__.py +0 -0
  224. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/synthetic_status/register_callbacks.py +0 -0
  225. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/synthetic_status/status_api.py +0 -0
  226. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/universal_constructor/__init__.py +0 -0
  227. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/universal_constructor/models.py +0 -0
  228. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/universal_constructor/register_callbacks.py +0 -0
  229. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/universal_constructor/registry.py +0 -0
  230. {newcode-0.2.10 → newcode-0.2.12}/newcode/plugins/universal_constructor/sandbox.py +0 -0
  231. {newcode-0.2.10 → newcode-0.2.12}/newcode/prompts/antigravity_system_prompt.md +0 -0
  232. {newcode-0.2.10 → newcode-0.2.12}/newcode/pydantic_patches.py +0 -0
  233. {newcode-0.2.10 → newcode-0.2.12}/newcode/reopenable_async_client.py +0 -0
  234. {newcode-0.2.10 → newcode-0.2.12}/newcode/round_robin_model.py +0 -0
  235. {newcode-0.2.10 → newcode-0.2.12}/newcode/session_storage.py +0 -0
  236. {newcode-0.2.10 → newcode-0.2.12}/newcode/status_display.py +0 -0
  237. {newcode-0.2.10 → newcode-0.2.12}/newcode/summarization_agent.py +0 -0
  238. {newcode-0.2.10 → newcode-0.2.12}/newcode/terminal_utils.py +0 -0
  239. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/__init__.py +0 -0
  240. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/ask_user_question/__init__.py +0 -0
  241. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/ask_user_question/constants.py +0 -0
  242. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/ask_user_question/demo_tui.py +0 -0
  243. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/ask_user_question/handler.py +0 -0
  244. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/ask_user_question/models.py +0 -0
  245. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/ask_user_question/registration.py +0 -0
  246. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/ask_user_question/renderers.py +0 -0
  247. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/ask_user_question/terminal_ui.py +0 -0
  248. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/ask_user_question/theme.py +0 -0
  249. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/ask_user_question/tui_loop.py +0 -0
  250. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/__init__.py +0 -0
  251. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/browser_control.py +0 -0
  252. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/browser_interactions.py +0 -0
  253. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/browser_locators.py +0 -0
  254. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/browser_manager.py +0 -0
  255. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/browser_navigation.py +0 -0
  256. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/browser_screenshot.py +0 -0
  257. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/browser_scripts.py +0 -0
  258. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/browser_workflows.py +0 -0
  259. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/chromium_terminal_manager.py +0 -0
  260. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/terminal_command_tools.py +0 -0
  261. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/browser/terminal_screenshot_tools.py +0 -0
  262. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/command_runner.py +0 -0
  263. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/common.py +0 -0
  264. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/display.py +0 -0
  265. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/file_modifications.py +0 -0
  266. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/file_operations.py +0 -0
  267. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/skills_tools.py +0 -0
  268. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/subagent_context.py +0 -0
  269. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/tools_content.py +0 -0
  270. {newcode-0.2.10 → newcode-0.2.12}/newcode/tools/universal_constructor.py +0 -0
  271. {newcode-0.2.10 → newcode-0.2.12}/newcode/uvx_detection.py +0 -0
  272. {newcode-0.2.10 → newcode-0.2.12}/newcode/version_checker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: newcode
3
- Version: 0.2.10
3
+ Version: 0.2.12
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
@@ -17,7 +17,6 @@ Classifier: Programming Language :: Python :: 3.13
17
17
  Classifier: Topic :: Software Development :: Code Generators
18
18
  Requires-Python: <3.14,>=3.11
19
19
  Requires-Dist: anthropic==0.79.0
20
- Requires-Dist: fastapi>=0.109.0
21
20
  Requires-Dist: httpx[http2]>=0.24.1
22
21
  Requires-Dist: json-repair>=0.46.2
23
22
  Requires-Dist: mcp>=1.9.4
@@ -35,8 +34,6 @@ Requires-Dist: ripgrep==14.1.0
35
34
  Requires-Dist: tenacity>=8.2.0
36
35
  Requires-Dist: termflow-md>=0.1.8
37
36
  Requires-Dist: typer>=0.12.0
38
- Requires-Dist: uvicorn[standard]>=0.27.0
39
- Requires-Dist: websockets>=12.0
40
37
  Description-Content-Type: text/markdown
41
38
 
42
39
  # NewCode
@@ -94,7 +91,6 @@ On first run, NewCode starts onboarding to help configure API keys and defaults.
94
91
  /model # Select or switch model
95
92
  /agent # Select or switch agent
96
93
  /colors # Customize terminal UI colors
97
- /api # Manage built-in API server (start|stop|status)
98
94
  ```
99
95
 
100
96
  ## Requirements
@@ -53,7 +53,6 @@ On first run, NewCode starts onboarding to help configure API keys and defaults.
53
53
  /model # Select or switch model
54
54
  /agent # Select or switch agent
55
55
  /colors # Customize terminal UI colors
56
- /api # Manage built-in API server (start|stop|status)
57
56
  ```
58
57
 
59
58
  ## Requirements
@@ -678,91 +678,6 @@ def handle_mcp_command(command: str) -> bool:
678
678
  return handler.handle_mcp_command(command)
679
679
 
680
680
 
681
- @register_command(
682
- name="api",
683
- description="Manage the API server",
684
- usage="/api [start|stop|status]",
685
- category="core",
686
- detailed_help="Start, stop, or check status of the local FastAPI server for GUI integration.",
687
- )
688
- def handle_api_command(command: str) -> bool:
689
- """Handle the /api command."""
690
- import os
691
- import signal
692
- import subprocess
693
- import sys
694
- from pathlib import Path
695
-
696
- from newcode.config import STATE_DIR
697
- from newcode.messaging import emit_error, emit_info, emit_success
698
-
699
- parts = command.split()
700
- subcommand = parts[1] if len(parts) > 1 else "status"
701
-
702
- pid_file = Path(STATE_DIR) / "api_server.pid"
703
-
704
- if subcommand == "start":
705
- # Check if already running
706
- if pid_file.exists():
707
- try:
708
- pid = int(pid_file.read_text().strip())
709
- os.kill(pid, 0) # Check if process exists
710
- emit_info(f"API server already running (PID {pid})")
711
- return True
712
- except (OSError, ValueError):
713
- pid_file.unlink(missing_ok=True) # Stale PID file
714
-
715
- # Start the server in background
716
- emit_info("Starting API server on http://127.0.0.1:8765 ...")
717
- proc = subprocess.Popen(
718
- [sys.executable, "-m", "newcode.api.main"],
719
- stdout=subprocess.DEVNULL,
720
- stderr=subprocess.DEVNULL,
721
- start_new_session=True,
722
- )
723
- pid_file.parent.mkdir(parents=True, exist_ok=True)
724
- pid_file.write_text(str(proc.pid))
725
- emit_success(f"API server started (PID {proc.pid})")
726
- emit_info("Docs available at http://127.0.0.1:8765/docs")
727
- return True
728
-
729
- elif subcommand == "stop":
730
- if not pid_file.exists():
731
- emit_info("API server is not running")
732
- return True
733
-
734
- try:
735
- pid = int(pid_file.read_text().strip())
736
- os.kill(pid, signal.SIGTERM)
737
- pid_file.unlink()
738
- emit_success(f"API server stopped (PID {pid})")
739
- except (OSError, ValueError) as e:
740
- pid_file.unlink(missing_ok=True)
741
- emit_error(f"Error stopping server: {e}")
742
- return True
743
-
744
- elif subcommand == "status":
745
- if not pid_file.exists():
746
- emit_info("API server is not running")
747
- return True
748
-
749
- try:
750
- pid = int(pid_file.read_text().strip())
751
- os.kill(pid, 0) # Check if process exists
752
- emit_success(f"API server is running (PID {pid})")
753
- emit_info("URL: http://127.0.0.1:8765")
754
- emit_info("Docs: http://127.0.0.1:8765/docs")
755
- except (OSError, ValueError):
756
- pid_file.unlink(missing_ok=True)
757
- emit_info("API server is not running (stale PID file removed)")
758
- return True
759
-
760
- else:
761
- emit_error(f"Unknown subcommand: {subcommand}")
762
- emit_info("Usage: /api [start|stop|status]")
763
- return True
764
-
765
-
766
681
  @register_command(
767
682
  name="generate-pr-description",
768
683
  description="Generate comprehensive PR description",
@@ -4,7 +4,6 @@ import hashlib
4
4
  import json
5
5
  import pickle
6
6
  import re
7
- import traceback
8
7
  from datetime import datetime
9
8
  from functools import partial
10
9
  from pathlib import Path
@@ -21,6 +20,7 @@ from newcode.config import (
21
20
  get_message_limit,
22
21
  get_value,
23
22
  )
23
+ from newcode.error_logging import log_error
24
24
  from newcode.messaging import (
25
25
  SubAgentInvocationMessage,
26
26
  SubAgentResponseMessage,
@@ -182,6 +182,15 @@ def _load_session_history(session_id: str) -> List[ModelMessage]:
182
182
  return []
183
183
 
184
184
 
185
+ def _format_exception_summary(error: Exception) -> str:
186
+ """Return a concise exception summary for user-facing messages."""
187
+ error_type = type(error).__name__
188
+ error_message = " ".join(str(error).split())
189
+ if error_message:
190
+ return f"{error_type}: {error_message}"
191
+ return error_type
192
+
193
+
185
194
  class AgentInfo(BaseModel):
186
195
  """Information about an available agent."""
187
196
 
@@ -559,18 +568,19 @@ def register_invoke_agent(agent):
559
568
  )
560
569
 
561
570
  except Exception as e:
562
- # Emit clean failure summary
563
- emit_error(f"{agent_name} failed: {str(e)}", message_group=group_id)
571
+ error_summary = _format_exception_summary(e)
572
+ log_error(e, context=f"invoke_agent:{agent_name}")
564
573
 
565
- # Full traceback for debugging
566
- error_msg = f"Error invoking agent '{agent_name}': {traceback.format_exc()}"
567
- emit_error(error_msg, message_group=group_id)
574
+ # Emit a concise, user-safe failure summary only.
575
+ emit_error(
576
+ f"✗ {agent_name} failed: {error_summary}", message_group=group_id
577
+ )
568
578
 
569
579
  return AgentInvokeOutput(
570
580
  response=None,
571
581
  agent_name=agent_name,
572
582
  session_id=session_id,
573
- error=error_msg,
583
+ error=f"Error invoking agent '{agent_name}': {error_summary}",
574
584
  )
575
585
 
576
586
  finally:
@@ -317,7 +317,7 @@ async def start_api_server(port: int = 8765) -> Dict[str, Any]:
317
317
 
318
318
  This starts the API server that provides the terminal endpoint for
319
319
  browser-based terminal testing. The server runs in the background
320
- and persists until stopped with /api stop or the process is killed.
320
+ and persists until the process is killed.
321
321
 
322
322
  Args:
323
323
  port: The port to run the server on (default: 8765).
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "newcode"
7
- version = "0.2.10"
7
+ version = "0.2.12"
8
8
  description = "AI-powered code generation agent platform"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11,<3.14"
@@ -24,9 +24,6 @@ dependencies = [
24
24
  "ripgrep==14.1.0",
25
25
  "tenacity>=8.2.0",
26
26
  "playwright>=1.40.0",
27
- "fastapi>=0.109.0",
28
- "uvicorn[standard]>=0.27.0",
29
- "websockets>=12.0",
30
27
  "termflow-md>=0.1.8",
31
28
  "Pillow>=10.0.0",
32
29
  "anthropic==0.79.0"
@@ -1,13 +0,0 @@
1
- """REST API module.
2
-
3
- This module provides a FastAPI-based REST API for the application configuration,
4
- sessions, commands, and real-time WebSocket communication.
5
-
6
- Exports:
7
- create_app: Factory function to create the FastAPI application
8
- main: Entry point to run the server
9
- """
10
-
11
- from newcode.api.app import create_app
12
-
13
- __all__ = ["create_app"]
@@ -1,169 +0,0 @@
1
- """FastAPI application factory."""
2
-
3
- import asyncio
4
- import logging
5
- from contextlib import asynccontextmanager
6
- from pathlib import Path
7
- from typing import AsyncGenerator
8
-
9
- from fastapi import FastAPI, Request
10
- from fastapi.middleware.cors import CORSMiddleware
11
- from fastapi.responses import FileResponse, HTMLResponse, JSONResponse
12
- from starlette.middleware.base import BaseHTTPMiddleware
13
-
14
- logger = logging.getLogger(__name__)
15
-
16
- # Default request timeout (seconds) - fail fast!
17
- REQUEST_TIMEOUT = 30.0
18
-
19
-
20
- class TimeoutMiddleware(BaseHTTPMiddleware):
21
- """Middleware to enforce request timeouts and prevent hanging requests."""
22
-
23
- def __init__(self, app, timeout: float = REQUEST_TIMEOUT):
24
- super().__init__(app)
25
- self.timeout = timeout
26
-
27
- async def dispatch(self, request: Request, call_next):
28
- # Skip timeout for WebSocket upgrades and streaming endpoints
29
- if request.headers.get(
30
- "upgrade", ""
31
- ).lower() == "websocket" or request.url.path.startswith("/ws/"):
32
- return await call_next(request)
33
-
34
- try:
35
- return await asyncio.wait_for(
36
- call_next(request),
37
- timeout=self.timeout,
38
- )
39
- except asyncio.TimeoutError:
40
- return JSONResponse(
41
- status_code=504,
42
- content={
43
- "detail": f"Request timed out after {self.timeout}s",
44
- "error": "timeout",
45
- },
46
- )
47
-
48
-
49
- @asynccontextmanager
50
- async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
51
- """Lifespan context manager for startup and shutdown events.
52
-
53
- Handles graceful cleanup of resources when the server shuts down.
54
- """
55
- # Startup: nothing special needed yet, but this is where you'd do it
56
- logger.info("API starting up...")
57
- yield
58
- # Shutdown: clean up all the things!
59
- logger.info("API shutting down, cleaning up...")
60
-
61
- # 1. Close all PTY sessions
62
- try:
63
- from newcode.api.pty_manager import get_pty_manager
64
-
65
- pty_manager = get_pty_manager()
66
- await pty_manager.close_all()
67
- logger.info("✓ All PTY sessions closed")
68
- except Exception as e:
69
- logger.error(f"Error closing PTY sessions: {e}")
70
-
71
- # 2. Remove PID file so /api status knows we're gone
72
- try:
73
- from newcode.config import STATE_DIR
74
-
75
- pid_file = Path(STATE_DIR) / "api_server.pid"
76
- if pid_file.exists():
77
- pid_file.unlink()
78
- logger.info("✓ PID file removed")
79
- except Exception as e:
80
- logger.error(f"Error removing PID file: {e}")
81
-
82
-
83
- def create_app() -> FastAPI:
84
- """Create and configure the FastAPI application."""
85
- app = FastAPI(
86
- lifespan=lifespan,
87
- title="Code Agent API",
88
- description="REST API and Interactive Terminal",
89
- version="1.0.0",
90
- docs_url="/docs",
91
- redoc_url="/redoc",
92
- )
93
-
94
- # Timeout middleware - added first so it wraps everything
95
- app.add_middleware(TimeoutMiddleware, timeout=REQUEST_TIMEOUT)
96
-
97
- # CORS middleware for frontend access
98
- app.add_middleware(
99
- CORSMiddleware,
100
- allow_origins=["*"], # Local/trusted
101
- allow_credentials=True,
102
- allow_methods=["*"],
103
- allow_headers=["*"],
104
- )
105
-
106
- # Include routers
107
- from newcode.api.routers import agents, commands, config, sessions
108
-
109
- app.include_router(config.router, prefix="/api/config", tags=["config"])
110
- app.include_router(commands.router, prefix="/api/commands", tags=["commands"])
111
- app.include_router(sessions.router, prefix="/api/sessions", tags=["sessions"])
112
- app.include_router(agents.router, prefix="/api/agents", tags=["agents"])
113
-
114
- # WebSocket endpoints (events + terminal)
115
- from newcode.api.websocket import setup_websocket
116
-
117
- setup_websocket(app)
118
-
119
- # Templates directory
120
- templates_dir = Path(__file__).parent / "templates"
121
-
122
- @app.get("/")
123
- async def root():
124
- """Landing page with links to terminal and docs."""
125
- return HTMLResponse(
126
- content="""
127
- <!DOCTYPE html>
128
- <html>
129
- <head>
130
- <title>Code Agent</title>
131
- <script src="https://cdn.tailwindcss.com"></script>
132
- </head>
133
- <body class="bg-gray-900 text-white min-h-screen flex items-center justify-center">
134
- <div class="text-center">
135
- <h1 class="text-6xl mb-4">&#x2699;</h1>
136
- <h2 class="text-3xl font-bold mb-8">Code Agent</h2>
137
- <div class="space-x-4">
138
- <a href="/terminal" class="px-6 py-3 bg-blue-600 hover:bg-blue-700 rounded-lg text-lg font-semibold">
139
- Open Terminal
140
- </a>
141
- <a href="/docs" class="px-6 py-3 bg-gray-700 hover:bg-gray-600 rounded-lg text-lg">
142
- API Docs
143
- </a>
144
- </div>
145
- <p class="mt-8 text-gray-400">
146
- WebSocket: ws://localhost:8765/ws/terminal
147
- </p>
148
- </div>
149
- </body>
150
- </html>
151
- """
152
- )
153
-
154
- @app.get("/terminal")
155
- async def terminal_page():
156
- """Serve the interactive terminal page."""
157
- html_file = templates_dir / "terminal.html"
158
- if html_file.exists():
159
- return FileResponse(html_file, media_type="text/html")
160
- return HTMLResponse(
161
- content="<h1>Terminal template not found</h1>",
162
- status_code=404,
163
- )
164
-
165
- @app.get("/health")
166
- async def health():
167
- return {"status": "healthy"}
168
-
169
- return app
@@ -1,21 +0,0 @@
1
- """Entry point for running the FastAPI server."""
2
-
3
- import uvicorn
4
-
5
- from newcode.api.app import create_app
6
-
7
- app = create_app()
8
-
9
-
10
- def main(host: str = "127.0.0.1", port: int = 8765) -> None:
11
- """Run the FastAPI server.
12
-
13
- Args:
14
- host: The host address to bind to. Defaults to localhost.
15
- port: The port number to listen on. Defaults to 8765.
16
- """
17
- uvicorn.run(app, host=host, port=port)
18
-
19
-
20
- if __name__ == "__main__":
21
- main()