connectonion 0.6.1__py3-none-any.whl → 0.6.3__py3-none-any.whl

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 (413) hide show
  1. connectonion/__init__.py +46 -9
  2. connectonion/cli/__init__.py +11 -1
  3. connectonion/cli/browser_agent/__init__.py +11 -1
  4. connectonion/cli/browser_agent/browser.py +95 -142
  5. connectonion/cli/browser_agent/element_finder.py +147 -0
  6. connectonion/cli/browser_agent/highlight_screenshot.py +182 -0
  7. connectonion/cli/browser_agent/prompt.md +188 -105
  8. connectonion/cli/browser_agent/prompts/element_matcher.md +59 -0
  9. connectonion/cli/browser_agent/prompts/form_filler.md +19 -0
  10. connectonion/cli/browser_agent/prompts/scroll_strategy.md +36 -0
  11. connectonion/cli/browser_agent/scripts/extract_elements.js +126 -0
  12. connectonion/cli/browser_agent/scroll.py +145 -0
  13. connectonion/cli/co_ai/__init__.py +6 -0
  14. connectonion/cli/co_ai/agent.py +87 -0
  15. connectonion/cli/co_ai/agents/__init__.py +5 -0
  16. connectonion/cli/co_ai/agents/registry.py +57 -0
  17. connectonion/cli/co_ai/commands/__init__.py +45 -0
  18. connectonion/cli/co_ai/commands/compact.py +173 -0
  19. connectonion/cli/co_ai/commands/cost.py +77 -0
  20. connectonion/cli/co_ai/commands/export.py +60 -0
  21. connectonion/cli/co_ai/commands/help.py +80 -0
  22. connectonion/cli/co_ai/commands/init.py +101 -0
  23. connectonion/cli/co_ai/commands/sessions.py +55 -0
  24. connectonion/cli/co_ai/commands/tasks.py +63 -0
  25. connectonion/cli/co_ai/commands/undo.py +103 -0
  26. connectonion/cli/co_ai/context.py +127 -0
  27. connectonion/cli/co_ai/main.py +52 -0
  28. connectonion/cli/co_ai/plugins/__init__.py +6 -0
  29. connectonion/cli/co_ai/plugins/reminder.py +76 -0
  30. connectonion/cli/co_ai/plugins/shell_approval.py +105 -0
  31. connectonion/cli/co_ai/prompts/agents/explore.md +79 -0
  32. connectonion/cli/co_ai/prompts/agents/plan.md +60 -0
  33. connectonion/cli/co_ai/prompts/assembler.py +303 -0
  34. connectonion/cli/{docs/co-vibecoding-principles-docs-contexts-all-in-one.md → co_ai/prompts/connectonion/README.md} +26 -0
  35. connectonion/cli/co_ai/prompts/connectonion/api.md +457 -0
  36. connectonion/cli/co_ai/prompts/connectonion/cli/README.md +805 -0
  37. connectonion/cli/co_ai/prompts/connectonion/cli/auth.md +46 -0
  38. connectonion/cli/co_ai/prompts/connectonion/cli/browser.md +235 -0
  39. connectonion/cli/co_ai/prompts/connectonion/cli/copy.md +184 -0
  40. connectonion/cli/co_ai/prompts/connectonion/cli/create.md +335 -0
  41. connectonion/cli/co_ai/prompts/connectonion/cli/init.md +431 -0
  42. connectonion/cli/co_ai/prompts/connectonion/co-directory-structure.md +214 -0
  43. connectonion/cli/co_ai/prompts/connectonion/concepts/agent.md +1078 -0
  44. connectonion/cli/co_ai/prompts/connectonion/concepts/events.md +816 -0
  45. connectonion/cli/co_ai/prompts/connectonion/concepts/llm_do.md +256 -0
  46. connectonion/cli/co_ai/prompts/connectonion/concepts/max_iterations.md +362 -0
  47. connectonion/cli/co_ai/prompts/connectonion/concepts/models.md +641 -0
  48. connectonion/cli/co_ai/prompts/connectonion/concepts/plugins.md +100 -0
  49. connectonion/cli/co_ai/prompts/connectonion/concepts/prompts.md +122 -0
  50. connectonion/cli/co_ai/prompts/connectonion/concepts/tools.md +512 -0
  51. connectonion/cli/co_ai/prompts/connectonion/concepts/transcribe.md +156 -0
  52. connectonion/cli/co_ai/prompts/connectonion/concepts/trust.md +291 -0
  53. connectonion/cli/co_ai/prompts/connectonion/debug/README.md +18 -0
  54. connectonion/cli/co_ai/prompts/connectonion/debug/auto_debug.md +1026 -0
  55. connectonion/cli/co_ai/prompts/connectonion/debug/console.md +129 -0
  56. connectonion/cli/co_ai/prompts/connectonion/debug/eval-format.md +178 -0
  57. connectonion/cli/co_ai/prompts/connectonion/debug/eval.md +230 -0
  58. connectonion/cli/co_ai/prompts/connectonion/debug/exceptions.md +307 -0
  59. connectonion/cli/co_ai/prompts/connectonion/debug/log.md +117 -0
  60. connectonion/cli/co_ai/prompts/connectonion/debug/xray.md +215 -0
  61. connectonion/cli/co_ai/prompts/connectonion/design-decisions/001-choosing-input-method.md +202 -0
  62. connectonion/cli/co_ai/prompts/connectonion/design-decisions/002-choosing-llm-function-name.md +202 -0
  63. connectonion/cli/co_ai/prompts/connectonion/design-decisions/003-choosing-trust-keyword.md +141 -0
  64. connectonion/cli/co_ai/prompts/connectonion/design-decisions/004-cli-create-flow.md +117 -0
  65. connectonion/cli/co_ai/prompts/connectonion/design-decisions/005-designing-agent-network-protocol.md +503 -0
  66. connectonion/cli/co_ai/prompts/connectonion/design-decisions/006-agent-address-format.md +305 -0
  67. connectonion/cli/co_ai/prompts/connectonion/design-decisions/007-authentication-backend-design.md +240 -0
  68. connectonion/cli/co_ai/prompts/connectonion/design-decisions/008-naming-is-hard.md +228 -0
  69. connectonion/cli/co_ai/prompts/connectonion/design-decisions/009-why-connect-function.md +167 -0
  70. connectonion/cli/co_ai/prompts/connectonion/design-decisions/010-cli-ux-progressive-disclosure.md +176 -0
  71. connectonion/cli/co_ai/prompts/connectonion/design-decisions/011-global-config-identity-management.md +357 -0
  72. connectonion/cli/co_ai/prompts/connectonion/design-decisions/012-tool-execution-separation.md +259 -0
  73. connectonion/cli/co_ai/prompts/connectonion/design-decisions/013-debug-and-logging-design.md +253 -0
  74. connectonion/cli/co_ai/prompts/connectonion/design-decisions/014-hook-system-design.md +510 -0
  75. connectonion/cli/co_ai/prompts/connectonion/design-decisions/015-interactive-auto-debug-design.md +837 -0
  76. connectonion/cli/co_ai/prompts/connectonion/design-decisions/016-why-no-zero-knowledge-proofs.md +358 -0
  77. connectonion/cli/co_ai/prompts/connectonion/design-decisions/017-session-logging-and-eval-format.md +120 -0
  78. connectonion/cli/co_ai/prompts/connectonion/design-decisions/018-event-api-naming.md +274 -0
  79. connectonion/cli/co_ai/prompts/connectonion/design-decisions/019-agent-lifecycle-design.md +655 -0
  80. connectonion/cli/co_ai/prompts/connectonion/design-decisions/020-trust-system-and-network-architecture.md +503 -0
  81. connectonion/cli/co_ai/prompts/connectonion/design-decisions/021-task-storage-jsonl-design.md +496 -0
  82. connectonion/cli/co_ai/prompts/connectonion/design-decisions/022-raw-asgi-implementation.md +273 -0
  83. connectonion/cli/co_ai/prompts/connectonion/examples/agent_reasoning.md +62 -0
  84. connectonion/cli/co_ai/prompts/connectonion/examples/atomic_tools.md +24 -0
  85. connectonion/cli/co_ai/prompts/connectonion/examples/load_guide.md +18 -0
  86. connectonion/cli/co_ai/prompts/connectonion/examples.md +0 -0
  87. connectonion/cli/co_ai/prompts/connectonion/hook-system-options.md +364 -0
  88. connectonion/cli/co_ai/prompts/connectonion/index.md +162 -0
  89. connectonion/cli/co_ai/prompts/connectonion/integrations/README.md +12 -0
  90. connectonion/cli/co_ai/prompts/connectonion/integrations/auth.md +450 -0
  91. connectonion/cli/co_ai/prompts/connectonion/integrations/google.md +431 -0
  92. connectonion/cli/co_ai/prompts/connectonion/integrations/microsoft.md +370 -0
  93. connectonion/cli/co_ai/prompts/connectonion/network/README.md +14 -0
  94. connectonion/cli/co_ai/prompts/connectonion/network/connect.md +543 -0
  95. connectonion/cli/co_ai/prompts/connectonion/network/connection.md +538 -0
  96. connectonion/cli/co_ai/prompts/connectonion/network/deploy.md +123 -0
  97. connectonion/cli/co_ai/prompts/connectonion/network/host.md +1049 -0
  98. connectonion/cli/co_ai/prompts/connectonion/network/protocol/agent-relay-protocol.md +495 -0
  99. connectonion/cli/co_ai/prompts/connectonion/network/protocol/announce-message.md +115 -0
  100. connectonion/cli/co_ai/prompts/connectonion/principles.md +124 -0
  101. connectonion/cli/co_ai/prompts/connectonion/quickstart.md +261 -0
  102. connectonion/cli/co_ai/prompts/connectonion/roadmap.md +81 -0
  103. connectonion/cli/co_ai/prompts/connectonion/templates/README.md +77 -0
  104. connectonion/cli/co_ai/prompts/connectonion/templates/meta-agent.md +152 -0
  105. connectonion/cli/co_ai/prompts/connectonion/templates/minimal.md +105 -0
  106. connectonion/cli/co_ai/prompts/connectonion/templates/playwright.md +130 -0
  107. connectonion/cli/co_ai/prompts/connectonion/templates/web-research.md +144 -0
  108. connectonion/cli/co_ai/prompts/connectonion/tui/README.md +95 -0
  109. connectonion/cli/co_ai/prompts/connectonion/tui/chat.md +181 -0
  110. connectonion/cli/co_ai/prompts/connectonion/tui/divider.md +63 -0
  111. connectonion/cli/co_ai/prompts/connectonion/tui/dropdown.md +83 -0
  112. connectonion/cli/co_ai/prompts/connectonion/tui/footer.md +44 -0
  113. connectonion/cli/co_ai/prompts/connectonion/tui/fuzzy.md +68 -0
  114. connectonion/cli/co_ai/prompts/connectonion/tui/input.md +84 -0
  115. connectonion/cli/co_ai/prompts/connectonion/tui/keys.md +77 -0
  116. connectonion/cli/co_ai/prompts/connectonion/tui/pick.md +71 -0
  117. connectonion/cli/co_ai/prompts/connectonion/tui/providers.md +89 -0
  118. connectonion/cli/co_ai/prompts/connectonion/tui/status_bar.md +67 -0
  119. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/README.md +156 -0
  120. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/calendar_plugin.md +68 -0
  121. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/eval.md +89 -0
  122. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/gmail_plugin.md +68 -0
  123. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/image_result_formatter.md +74 -0
  124. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/re_act.md +86 -0
  125. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/shell_approval.md +69 -0
  126. connectonion/cli/co_ai/prompts/connectonion/useful_tools/README.md +81 -0
  127. connectonion/cli/co_ai/prompts/connectonion/useful_tools/diff_writer.md +138 -0
  128. connectonion/cli/co_ai/prompts/connectonion/useful_tools/get_emails.md +499 -0
  129. connectonion/cli/co_ai/prompts/connectonion/useful_tools/gmail.md +135 -0
  130. connectonion/cli/co_ai/prompts/connectonion/useful_tools/google_calendar.md +106 -0
  131. connectonion/cli/co_ai/prompts/connectonion/useful_tools/memory.md +486 -0
  132. connectonion/cli/co_ai/prompts/connectonion/useful_tools/microsoft_calendar.md +106 -0
  133. connectonion/cli/co_ai/prompts/connectonion/useful_tools/outlook.md +120 -0
  134. connectonion/cli/co_ai/prompts/connectonion/useful_tools/send_email.md +403 -0
  135. connectonion/cli/co_ai/prompts/connectonion/useful_tools/shell.md +95 -0
  136. connectonion/cli/co_ai/prompts/connectonion/useful_tools/slash_command.md +96 -0
  137. connectonion/cli/co_ai/prompts/connectonion/useful_tools/terminal.md +97 -0
  138. connectonion/cli/co_ai/prompts/connectonion/useful_tools/todo_list.md +252 -0
  139. connectonion/cli/co_ai/prompts/connectonion/useful_tools/web_fetch.md +130 -0
  140. connectonion/cli/co_ai/prompts/connectonion/vibe-coding-guide.md +97 -0
  141. connectonion/cli/co_ai/prompts/connectonion/windows-support.md +258 -0
  142. connectonion/cli/co_ai/prompts/main.md +247 -0
  143. connectonion/cli/co_ai/prompts/reminders/plan_mode.md +34 -0
  144. connectonion/cli/co_ai/prompts/summarization.md +55 -0
  145. connectonion/cli/co_ai/prompts/tools/ask_user.md +61 -0
  146. connectonion/cli/co_ai/prompts/tools/background.md +57 -0
  147. connectonion/cli/co_ai/prompts/tools/edit.md +90 -0
  148. connectonion/cli/co_ai/prompts/tools/glob.md +52 -0
  149. connectonion/cli/co_ai/prompts/tools/grep.md +55 -0
  150. connectonion/cli/co_ai/prompts/tools/plan_mode.md +80 -0
  151. connectonion/cli/co_ai/prompts/tools/read.md +40 -0
  152. connectonion/cli/co_ai/prompts/tools/shell.md +67 -0
  153. connectonion/cli/co_ai/prompts/tools/task.md +51 -0
  154. connectonion/cli/co_ai/prompts/tools/todo.md +139 -0
  155. connectonion/cli/co_ai/prompts/tools/write.md +47 -0
  156. connectonion/cli/co_ai/prompts/workflow.md +89 -0
  157. connectonion/cli/co_ai/reminders.py +159 -0
  158. connectonion/cli/co_ai/sessions.py +110 -0
  159. connectonion/cli/co_ai/skills/__init__.py +37 -0
  160. connectonion/cli/co_ai/skills/builtin/commit/SKILL.md +63 -0
  161. connectonion/cli/co_ai/skills/builtin/review-pr/SKILL.md +76 -0
  162. connectonion/cli/co_ai/skills/loader.py +166 -0
  163. connectonion/cli/co_ai/skills/tool.py +46 -0
  164. connectonion/cli/co_ai/tools/__init__.py +92 -0
  165. connectonion/cli/co_ai/tools/ask_user.py +35 -0
  166. connectonion/cli/co_ai/tools/background.py +201 -0
  167. connectonion/cli/co_ai/tools/diff_writer.py +291 -0
  168. connectonion/cli/co_ai/tools/edit.py +89 -0
  169. connectonion/cli/co_ai/tools/glob.py +84 -0
  170. connectonion/cli/co_ai/tools/grep.py +158 -0
  171. connectonion/cli/co_ai/tools/load_guide.py +23 -0
  172. connectonion/cli/co_ai/tools/multi_edit.py +116 -0
  173. connectonion/cli/co_ai/tools/plan_mode.py +172 -0
  174. connectonion/cli/co_ai/tools/read.py +67 -0
  175. connectonion/cli/co_ai/tools/task.py +59 -0
  176. connectonion/cli/co_ai/tools/todo_list.py +159 -0
  177. connectonion/cli/co_ai/tools/write.py +126 -0
  178. connectonion/cli/commands/__init__.py +11 -1
  179. connectonion/cli/commands/ai_commands.py +34 -0
  180. connectonion/cli/commands/copy_commands.py +55 -6
  181. connectonion/cli/commands/create.py +20 -17
  182. connectonion/cli/commands/init.py +19 -22
  183. connectonion/cli/commands/project_cmd_lib.py +15 -0
  184. connectonion/cli/main.py +11 -0
  185. connectonion/console.py +15 -1
  186. connectonion/core/__init__.py +10 -1
  187. connectonion/core/agent.py +37 -16
  188. connectonion/core/exceptions.py +74 -0
  189. connectonion/core/llm.py +54 -6
  190. connectonion/core/tool_executor.py +32 -31
  191. connectonion/core/tool_factory.py +47 -10
  192. connectonion/debug/__init__.py +10 -1
  193. connectonion/debug/debug_explainer/__init__.py +10 -1
  194. connectonion/debug/execution_analyzer/__init__.py +10 -1
  195. connectonion/debug/execution_analyzer/execution_analysis.py +5 -2
  196. connectonion/debug/runtime_inspector/__init__.py +10 -1
  197. connectonion/docs/.package-ignore +6 -0
  198. connectonion/docs/README.md +2036 -0
  199. connectonion/docs/api.md +457 -0
  200. connectonion/docs/archive/001-ai-agent-is-just-prompt-plus-function.md +249 -0
  201. connectonion/docs/archive/README.md +53 -0
  202. connectonion/docs/archive/archive/consolidation-plan.md +72 -0
  203. connectonion/docs/archive/archive/core-principles-extracted.md +239 -0
  204. connectonion/docs/archive/archive/master-principles.md +222 -0
  205. connectonion/docs/archive/archive/principles.md +293 -0
  206. connectonion/docs/archive/archive/simplicity-principles.md +221 -0
  207. connectonion/docs/archive/attack-defense-insights.md +410 -0
  208. connectonion/docs/archive/business-model.md +305 -0
  209. connectonion/docs/archive/core-principles-unified.md +190 -0
  210. connectonion/docs/archive/discussion-journey.md +178 -0
  211. connectonion/docs/archive/economic-analysis.md +323 -0
  212. connectonion/docs/archive/features/01-share-and-find.md +256 -0
  213. connectonion/docs/archive/features/02-agent-authentication.md +93 -0
  214. connectonion/docs/archive/features/03-test-before-trust.md +71 -0
  215. connectonion/docs/archive/features/06-reliability-and-offline.md +197 -0
  216. connectonion/docs/archive/features/README.md +46 -0
  217. connectonion/docs/archive/features-roadmap.md +247 -0
  218. connectonion/docs/archive/mcp-comparison-insights.md +215 -0
  219. connectonion/docs/archive/migration-strategy.md +571 -0
  220. connectonion/docs/archive/mini-whitepaper.md +293 -0
  221. connectonion/docs/archive/network-protocol.md +394 -0
  222. connectonion/docs/archive/semantic-revolution.md +367 -0
  223. connectonion/docs/archive/technical-architecture.md +453 -0
  224. connectonion/docs/archive/the-semantic-insight.md +207 -0
  225. connectonion/docs/archive/threat-model.md +164 -0
  226. connectonion/docs/cli/README.md +805 -0
  227. connectonion/docs/cli/auth.md +46 -0
  228. connectonion/docs/cli/browser.md +235 -0
  229. connectonion/docs/cli/copy.md +232 -0
  230. connectonion/docs/cli/create.md +335 -0
  231. connectonion/docs/cli/init.md +431 -0
  232. connectonion/docs/co-directory-structure.md +214 -0
  233. connectonion/docs/concepts/agent.md +1078 -0
  234. connectonion/docs/concepts/events.md +699 -0
  235. connectonion/docs/concepts/llm_do.md +256 -0
  236. connectonion/docs/concepts/max_iterations.md +362 -0
  237. connectonion/docs/concepts/models.md +641 -0
  238. connectonion/docs/concepts/plugins.md +100 -0
  239. connectonion/docs/concepts/prompts.md +122 -0
  240. connectonion/docs/concepts/session.md +428 -0
  241. connectonion/docs/concepts/tools.md +512 -0
  242. connectonion/docs/concepts/transcribe.md +156 -0
  243. connectonion/docs/concepts/trust.md +291 -0
  244. connectonion/docs/connectonion.md +1256 -0
  245. connectonion/docs/debug/README.md +18 -0
  246. connectonion/docs/debug/auto_debug.md +1026 -0
  247. connectonion/docs/debug/console.md +129 -0
  248. connectonion/docs/debug/eval-format.md +178 -0
  249. connectonion/docs/debug/eval.md +230 -0
  250. connectonion/docs/debug/exceptions.md +307 -0
  251. connectonion/docs/debug/log.md +117 -0
  252. connectonion/docs/debug/xray.md +215 -0
  253. connectonion/docs/design-decisions/001-choosing-input-method.md +202 -0
  254. connectonion/docs/design-decisions/002-choosing-llm-function-name.md +202 -0
  255. connectonion/docs/design-decisions/003-choosing-trust-keyword.md +141 -0
  256. connectonion/docs/design-decisions/004-cli-create-flow.md +117 -0
  257. connectonion/docs/design-decisions/005-designing-agent-network-protocol.md +503 -0
  258. connectonion/docs/design-decisions/006-agent-address-format.md +305 -0
  259. connectonion/docs/design-decisions/007-authentication-backend-design.md +240 -0
  260. connectonion/docs/design-decisions/008-naming-is-hard.md +228 -0
  261. connectonion/docs/design-decisions/009-why-connect-function.md +167 -0
  262. connectonion/docs/design-decisions/010-cli-ux-progressive-disclosure.md +176 -0
  263. connectonion/docs/design-decisions/011-global-config-identity-management.md +357 -0
  264. connectonion/docs/design-decisions/012-tool-execution-separation.md +259 -0
  265. connectonion/docs/design-decisions/013-debug-and-logging-design.md +253 -0
  266. connectonion/docs/design-decisions/014-hook-system-design.md +510 -0
  267. connectonion/docs/design-decisions/015-interactive-auto-debug-design.md +837 -0
  268. connectonion/docs/design-decisions/016-why-no-zero-knowledge-proofs.md +358 -0
  269. connectonion/docs/design-decisions/017-session-logging-and-eval-format.md +120 -0
  270. connectonion/docs/design-decisions/018-event-api-naming.md +274 -0
  271. connectonion/docs/design-decisions/019-agent-lifecycle-design.md +655 -0
  272. connectonion/docs/design-decisions/020-trust-system-and-network-architecture.md +503 -0
  273. connectonion/docs/design-decisions/021-task-storage-jsonl-design.md +496 -0
  274. connectonion/docs/design-decisions/022-raw-asgi-implementation.md +273 -0
  275. connectonion/docs/examples.md +0 -0
  276. connectonion/docs/hook-system-options.md +364 -0
  277. connectonion/docs/integrations/README.md +12 -0
  278. connectonion/docs/integrations/auth.md +450 -0
  279. connectonion/docs/integrations/google.md +431 -0
  280. connectonion/docs/integrations/microsoft.md +370 -0
  281. connectonion/docs/network/README.md +14 -0
  282. connectonion/docs/network/connect.md +629 -0
  283. connectonion/docs/network/deploy.md +124 -0
  284. connectonion/docs/network/host.md +1087 -0
  285. connectonion/docs/network/io.md +538 -0
  286. connectonion/docs/network/protocol/agent-relay-protocol.md +495 -0
  287. connectonion/docs/network/protocol/announce-message.md +115 -0
  288. connectonion/docs/principles.md +124 -0
  289. connectonion/docs/quickstart.md +261 -0
  290. connectonion/docs/roadmap.md +81 -0
  291. connectonion/docs/templates/README.md +77 -0
  292. connectonion/docs/templates/meta-agent.md +152 -0
  293. connectonion/docs/templates/minimal.md +105 -0
  294. connectonion/docs/templates/playwright.md +130 -0
  295. connectonion/docs/templates/web-research.md +144 -0
  296. connectonion/docs/tui/README.md +95 -0
  297. connectonion/docs/tui/chat.md +181 -0
  298. connectonion/docs/tui/divider.md +63 -0
  299. connectonion/docs/tui/dropdown.md +83 -0
  300. connectonion/docs/tui/footer.md +44 -0
  301. connectonion/docs/tui/fuzzy.md +68 -0
  302. connectonion/docs/tui/input.md +84 -0
  303. connectonion/docs/tui/keys.md +77 -0
  304. connectonion/docs/tui/pick.md +71 -0
  305. connectonion/docs/tui/providers.md +89 -0
  306. connectonion/docs/tui/status_bar.md +67 -0
  307. connectonion/docs/useful_plugins/README.md +160 -0
  308. connectonion/docs/useful_plugins/calendar_plugin.md +68 -0
  309. connectonion/docs/useful_plugins/eval.md +89 -0
  310. connectonion/docs/useful_plugins/gmail_plugin.md +68 -0
  311. connectonion/docs/useful_plugins/image_result_formatter.md +74 -0
  312. connectonion/docs/useful_plugins/re_act.md +86 -0
  313. connectonion/docs/useful_plugins/shell_approval.md +69 -0
  314. connectonion/docs/useful_plugins/system_reminder.md +210 -0
  315. connectonion/docs/useful_prompts/README.md +127 -0
  316. connectonion/docs/useful_prompts/coding_agent.md +214 -0
  317. connectonion/docs/useful_tools/README.md +81 -0
  318. connectonion/docs/useful_tools/ask_user.md +103 -0
  319. connectonion/docs/useful_tools/diff_writer.md +158 -0
  320. connectonion/docs/useful_tools/get_emails.md +519 -0
  321. connectonion/docs/useful_tools/gmail.md +155 -0
  322. connectonion/docs/useful_tools/google_calendar.md +126 -0
  323. connectonion/docs/useful_tools/memory.md +506 -0
  324. connectonion/docs/useful_tools/microsoft_calendar.md +126 -0
  325. connectonion/docs/useful_tools/outlook.md +140 -0
  326. connectonion/docs/useful_tools/send_email.md +423 -0
  327. connectonion/docs/useful_tools/shell.md +115 -0
  328. connectonion/docs/useful_tools/slash_command.md +116 -0
  329. connectonion/docs/useful_tools/terminal.md +115 -0
  330. connectonion/docs/useful_tools/todo_list.md +272 -0
  331. connectonion/docs/useful_tools/web_fetch.md +150 -0
  332. connectonion/docs/vibe-coding-guide.md +97 -0
  333. connectonion/docs/windows-support.md +258 -0
  334. connectonion/logger.py +3 -3
  335. connectonion/network/__init__.py +19 -6
  336. connectonion/network/asgi/__init__.py +81 -0
  337. connectonion/network/asgi/http.py +205 -0
  338. connectonion/network/asgi/websocket.py +217 -0
  339. connectonion/network/connect.py +232 -185
  340. connectonion/network/host/__init__.py +59 -0
  341. connectonion/network/host/auth.py +191 -0
  342. connectonion/network/host/routes.py +135 -0
  343. connectonion/network/host/server.py +289 -0
  344. connectonion/network/host/session.py +78 -0
  345. connectonion/network/io/__init__.py +21 -0
  346. connectonion/network/{connection.py → io/base.py} +17 -42
  347. connectonion/network/io/websocket.py +55 -0
  348. connectonion/network/relay.py +37 -16
  349. connectonion/network/trust/__init__.py +30 -0
  350. connectonion/network/trust/factory.py +138 -0
  351. connectonion/network/{trust_agents.py → trust/prompts.py} +3 -3
  352. connectonion/network/{trust_functions.py → trust/tools.py} +2 -2
  353. connectonion/prompt_files/__init__.py +11 -1
  354. connectonion/prompt_files/react_acknowledge.md +26 -0
  355. connectonion/prompts.py +10 -1
  356. connectonion/tui/chat.py +10 -1
  357. connectonion/tui/divider.py +10 -1
  358. connectonion/tui/dropdown.py +10 -1
  359. connectonion/tui/footer.py +8 -0
  360. connectonion/tui/fuzzy.py +11 -1
  361. connectonion/tui/input.py +118 -70
  362. connectonion/tui/keys.py +133 -6
  363. connectonion/tui/providers.py +11 -1
  364. connectonion/tui/status_bar.py +10 -1
  365. connectonion/useful_events_handlers/__init__.py +8 -0
  366. connectonion/useful_events_handlers/reflect.py +19 -4
  367. connectonion/useful_plugins/__init__.py +2 -1
  368. connectonion/useful_plugins/eval.py +2 -2
  369. connectonion/useful_plugins/gmail_plugin.py +3 -3
  370. connectonion/useful_plugins/image_result_formatter.py +3 -3
  371. connectonion/useful_plugins/re_act.py +114 -28
  372. connectonion/useful_plugins/shell_approval.py +2 -2
  373. connectonion/useful_plugins/system_reminder.py +103 -0
  374. connectonion/useful_plugins/ui_stream.py +18 -133
  375. connectonion/useful_prompts/README.md +61 -0
  376. connectonion/useful_prompts/__init__.py +45 -0
  377. connectonion/useful_prompts/coding_agent/README.md +106 -0
  378. connectonion/useful_prompts/coding_agent/assembler.py +123 -0
  379. connectonion/useful_prompts/coding_agent/prompts/main.md +227 -0
  380. connectonion/useful_prompts/coding_agent/prompts/tools/ask_user.md +61 -0
  381. connectonion/useful_prompts/coding_agent/prompts/tools/background.md +57 -0
  382. connectonion/useful_prompts/coding_agent/prompts/tools/edit.md +90 -0
  383. connectonion/useful_prompts/coding_agent/prompts/tools/glob.md +52 -0
  384. connectonion/useful_prompts/coding_agent/prompts/tools/grep.md +55 -0
  385. connectonion/useful_prompts/coding_agent/prompts/tools/plan_mode.md +80 -0
  386. connectonion/useful_prompts/coding_agent/prompts/tools/read.md +40 -0
  387. connectonion/useful_prompts/coding_agent/prompts/tools/shell.md +67 -0
  388. connectonion/useful_prompts/coding_agent/prompts/tools/task.md +51 -0
  389. connectonion/useful_prompts/coding_agent/prompts/tools/todo.md +139 -0
  390. connectonion/useful_prompts/coding_agent/prompts/tools/write.md +48 -0
  391. connectonion/useful_prompts/system-reminders/security-warning.md +14 -0
  392. connectonion/useful_prompts/system-reminders/test-reminder.md +11 -0
  393. connectonion/useful_tools/__init__.py +31 -4
  394. connectonion/useful_tools/ask_user.py +35 -0
  395. connectonion/useful_tools/bash.py +69 -0
  396. connectonion/useful_tools/diff_writer.py +186 -94
  397. connectonion/useful_tools/edit.py +102 -0
  398. connectonion/useful_tools/glob_files.py +97 -0
  399. connectonion/useful_tools/grep_files.py +171 -0
  400. connectonion/useful_tools/multi_edit.py +116 -0
  401. connectonion/useful_tools/read_file.py +73 -0
  402. connectonion/useful_tools/shell.py +50 -45
  403. connectonion/useful_tools/write_file.py +129 -0
  404. {connectonion-0.6.1.dist-info → connectonion-0.6.3.dist-info}/METADATA +10 -3
  405. connectonion-0.6.3.dist-info/RECORD +469 -0
  406. connectonion/cli/browser_agent/scroll_strategies.py +0 -276
  407. connectonion/network/asgi.py +0 -407
  408. connectonion/network/host.py +0 -616
  409. connectonion/network/trust.py +0 -166
  410. connectonion-0.6.1.dist-info/RECORD +0 -123
  411. /connectonion/cli/{docs → co_ai/prompts/connectonion}/connectonion.md +0 -0
  412. {connectonion-0.6.1.dist-info → connectonion-0.6.3.dist-info}/WHEEL +0 -0
  413. {connectonion-0.6.1.dist-info → connectonion-0.6.3.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,837 @@
1
+ # Design Decision: Interactive Auto-Debug - The Journey to Simplicity
2
+
3
+ *Date: 2025-10-05 (Updated: 2025-10-06)*
4
+ *Status: Implemented in v0.1.8*
5
+ *Decision: Agent-first menu-based REPL with progressive disclosure*
6
+
7
+ ## The Problem: AI Agents Are Black Boxes
8
+
9
+ AI agents make decisions we can't see. They call tools, process results, and continue - all invisible to developers. When something goes wrong, we're stuck with:
10
+
11
+ ```python
12
+ agent = Agent("assistant", tools=[search, calculate])
13
+ agent.input("Find the answer")
14
+ # *mysterious processing happens*
15
+ # Something broke... but where? why? how?
16
+ ```
17
+
18
+ **Debugging AI agents felt like debugging in the dark.**
19
+
20
+ ## First Attempt: Traditional CLI Tools
21
+
22
+ Our initial instinct was familiar territory - CLI debugging commands:
23
+
24
+ ```bash
25
+ # Traditional approach
26
+ co debug agent.py # Enter debug mode
27
+ co step # Step through tools
28
+ co inspect # View state
29
+ co retry --modify # Retry with changes
30
+ ```
31
+
32
+ **Why this felt right:**
33
+ - Developers know CLI tools (gdb, pdb, lldb)
34
+ - Separate commands = clear separation of concerns
35
+ - Easy to document each command
36
+
37
+ **But something felt wrong.**
38
+
39
+ ## The User's Insight: "CLI Needs Learning, auto_debug Is Intuitive"
40
+
41
+ During design review, the critical feedback came:
42
+
43
+ > "I think CLI needs users to learn, but `agent.auto_debug()` is intuitive..."
44
+
45
+ This stopped us cold. **They were absolutely right.**
46
+
47
+ The CLI approach:
48
+ - ✗ Requires learning new commands (`co debug`, `co step`, `co inspect`)
49
+ - ✗ Breaks the Python development flow
50
+ - ✗ Adds cognitive overhead (remember command syntax)
51
+ - ✗ Feels separate from the code
52
+
53
+ But `agent.auto_debug()`:
54
+ - ✓ Discovered through autocomplete
55
+ - ✓ Natural Python method call
56
+ - ✓ Works in any environment (REPL, notebook, script)
57
+ - ✓ Feels like part of the agent
58
+
59
+ **The insight: The best interface is one you don't have to learn.**
60
+
61
+ ## Rethinking: The User Journey First
62
+
63
+ We paused implementation and asked a different question:
64
+
65
+ **"What does a developer WANT when debugging an AI agent?"**
66
+
67
+ Not what features we can build. What problems they're trying to solve.
68
+
69
+ ### The First-Time User Journey
70
+
71
+ ```python
72
+ # User writes agent
73
+ agent = Agent("assistant", tools=[search])
74
+
75
+ # Something breaks or they're curious
76
+ agent.input("Find the answer") # Tool calls happen... confused
77
+
78
+ # They discover auto_debug (via docs, autocomplete, or trial)
79
+ agent.auto_debug()
80
+ agent.input("Find the answer")
81
+
82
+ # [INTERACTIVE MENU APPEARS]
83
+ # ┌─────────────────────────────────────┐
84
+ # │ 🔧 Agent paused at: search │
85
+ # │ Arguments: {'query': 'answer'} │
86
+ # │ │
87
+ # │ ❯ Continue │
88
+ # │ AI Help - Ask questions │
89
+ # │ Python Edit - Modify variables │
90
+ # │ View Trace - See execution │
91
+ # │ │
92
+ # │ 💡 Use ↑↓ arrows • Enter to select │
93
+ # └─────────────────────────────────────┘
94
+ ```
95
+
96
+ **This felt right.** No commands to remember. No syntax to learn. Just navigate and select.
97
+
98
+ ## The Design Evolution: Four Iterations to Simplicity
99
+
100
+ But getting to this final design required four complete iterations, each teaching us something critical about simplicity and user experience.
101
+
102
+ ### Iteration 1: The Complex Four-Mode Design (REJECTED)
103
+
104
+ Our first instinct after rejecting CLI was to build a comprehensive debugging system with four distinct modes:
105
+
106
+ ```
107
+ 🔍 Debug Mode Active
108
+
109
+ Modes:
110
+ - CHAT: Talk to agent normally
111
+ - EDIT: Modify execution state
112
+ - SIM: Simulate different scenarios
113
+ - VIEW: Inspect execution trace
114
+
115
+ Current: CHAT mode
116
+ agent>
117
+ ```
118
+
119
+ **User feedback:** *"I think 4 is too complicated, two or three at most"*
120
+
121
+ **Why it failed:**
122
+ - Too many modes to understand upfront
123
+ - Unclear when to use which mode
124
+ - High learning curve before being productive
125
+ - Violated "keep simple things simple" principle
126
+
127
+ **Key lesson:** More features ≠ better UX. Start with less.
128
+
129
+ ### Iteration 2: Prefix-Based Mode Switching (REJECTED)
130
+
131
+ We tried simplifying with prefix characters to indicate different targets:
132
+
133
+ ```
134
+ agent> Hello # Send to agent (default)
135
+ agent> ? why did it fail # Ask AI debugger for help
136
+ agent> >>> result = [] # Python code execution mode
137
+ ```
138
+
139
+ **User feedback:** *"when we do auto-debug, sometimes we input something. Sometimes we want to input what we want to input to the agent. The input of the agent should default have a mode"*
140
+
141
+ **Why it failed:**
142
+ - Prefix characters (`?`, `>>>`) not immediately discoverable
143
+ - Don't clearly communicate purpose without documentation
144
+ - Still confusing about who receives the input
145
+ - Default mode wasn't obvious enough
146
+
147
+ **Key lesson:** Symbolic shortcuts require learning. Need explicit mode indicators.
148
+
149
+ ### Iteration 3: Mode Indicators with Prompts (BETTER)
150
+
151
+ We added clear, named mode indicators:
152
+
153
+ ```
154
+ agent> Send email to John # To agent (default)
155
+
156
+ ai> why did it send wrong email # To AI debugger for help
157
+
158
+ >>> result = "correct@email" # Python execution mode
159
+ ```
160
+
161
+ **User feedback:** *"The AI should be something more intuitive like AI Ask or something like that"*
162
+
163
+ **Progress made:**
164
+ - Clear visual mode indicators (`agent>`, `ai>`, `>>>`)
165
+ - Default to agent input (matches user mental model)
166
+ - Separate AI help and Python modes
167
+
168
+ **Still needed work:**
169
+ - Mode names not intuitive enough (`ai>` → what does "ai" mean here?)
170
+ - Switching between modes unclear (how do I get back?)
171
+ - Missing visual guidance for mode transitions
172
+ - `/inspect` vs `/code` distinction unclear
173
+
174
+ **Key lesson:** Names matter. "AI" is ambiguous - "AI Ask" is self-explanatory.
175
+
176
+ ### Iteration 4: Agent-First Menu with Universal Commands (FINAL) ✅
177
+
178
+ The breakthrough came from asking: **"What would Unix creators or Steve Jobs design?"**
179
+
180
+ This question forced us to apply fundamental design principles:
181
+
182
+ **Unix Philosophy Applied (Ken Thompson, Dennis Ritchie):**
183
+ - **Do one thing well** - Each mode has single, clear purpose
184
+ - **Composition over complexity** - Combine simple parts, don't create complex wholes
185
+ - **No unnecessary features** - Eliminate what isn't essential
186
+ - **Text streams** - Input/output flows naturally
187
+
188
+ **Steve Jobs Influence (Apple Design):**
189
+ - **Eliminate the unnecessary** - Remove mode switching complexity entirely
190
+ - **Focus on the essence** - What does user REALLY need? Continue execution.
191
+ - **Intuitive over learnable** - No manual required, just use it
192
+ - **Design is how it works** - Menu isn't decoration, it IS the interface
193
+
194
+ **Final Design:**
195
+
196
+ ```
197
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
198
+ @xray BREAKPOINT: search_emails
199
+
200
+ Local Variables:
201
+ query = "John"
202
+ result = "Found 1 email from john@company.com"
203
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
204
+
205
+ What do you want to do?
206
+ → Continue execution [Enter or c]
207
+ Ask AI for help [a]
208
+ Edit variables (Python) [e]
209
+ View execution trace [v]
210
+ Toggle step mode [s]
211
+ Stop debugging [q]
212
+
213
+ 💡 Use ↑↓ arrows and Enter, or type shortcuts
214
+ >
215
+ ```
216
+
217
+ **Why this works:**
218
+
219
+ 1. **Agent-first by default** - Just press Enter to continue (simplest action)
220
+ 2. **Progressive disclosure** - See all options, discover gradually (no hidden features)
221
+ 3. **Consistent patterns** - All commands use `/` when in modes (`/menu`, `/continue`)
222
+ 4. **Multiple input methods** - Arrow keys (beginner-friendly) OR shortcuts (power users)
223
+ 5. **Always visible help** - Tips show how to use it, zero memorization
224
+ 6. **No dead ends** - `/menu` and `/continue` work everywhere (universal escape hatches)
225
+
226
+ **Key lesson:** The best design makes the default action effortless and everything else discoverable.
227
+
228
+ ## The Design Shift: Menu-Based Interactive UX
229
+
230
+ ### Core Principle: Arrow Keys > Typed Commands
231
+
232
+ Instead of:
233
+ ```
234
+ (debug) help
235
+ (debug) inspect query
236
+ (debug) retry --modify query="better search"
237
+ ```
238
+
239
+ We designed:
240
+ ```
241
+ [Use ↑↓ arrows to navigate, Enter to select]
242
+
243
+ ❯ Continue
244
+ AI Help - Ask me anything
245
+ Python Edit - Modify execution state
246
+ View Trace - See full history
247
+ Step Mode - Pause at every tool
248
+ ```
249
+
250
+ **Why arrow keys win:**
251
+ 1. **No typos** - Can't misspell a direction
252
+ 2. **Discoverable** - See all options immediately
253
+ 3. **Familiar** - Every developer knows arrow navigation
254
+ 4. **Fast** - Two keystrokes: arrow + enter
255
+
256
+ ### Universal Commands: Always Visible
257
+
258
+ But we kept the power of commands for experts:
259
+
260
+ ```python
261
+ # At ANY point during debugging:
262
+ /menu # Back to main menu
263
+ /continue # Resume execution
264
+ ? # Show help
265
+ ```
266
+
267
+ These appear in **every** screen footer:
268
+ ```
269
+ 💡 Commands: /menu /continue • Press ? for help
270
+ ```
271
+
272
+ **The principle: Simple by default, powerful when ready.**
273
+
274
+ ## The Five Debugging Modes (Final)
275
+
276
+ We designed five debugging modes, each progressively more powerful:
277
+
278
+ ### 0. Menu (Default - Visual Discovery)
279
+ ```
280
+ The menu itself is a mode - visual discovery of all options
281
+ Arrow keys OR shortcuts
282
+ No memorization required
283
+ ```
284
+
285
+ ### 1. Continue (Default - Simple)
286
+ ```
287
+ Just resume execution
288
+ → No learning required
289
+ → Fast escape hatch
290
+ ```
291
+
292
+ ### 2. AI Help (Powerful)
293
+ ```python
294
+ # Ask questions in natural language
295
+ "Why did this tool fail?"
296
+ "What does the current state look like?"
297
+ "How can I fix the query parameter?"
298
+
299
+ # AI has FULL context:
300
+ # - Agent's task
301
+ # - Tool history
302
+ # - Current state
303
+ # - Error messages
304
+ ```
305
+
306
+ ### 3. Python Edit (Expert)
307
+ ```python
308
+ # Full Python REPL at breakpoint
309
+ >>> query # Inspect variables
310
+ 'broken search'
311
+
312
+ >>> query = "better search" # Modify
313
+ >>> tool_result = search(query) # Test
314
+ >>> # Exit to continue with changes
315
+ ```
316
+
317
+ ### 4. Step Mode (Debug Everything)
318
+ ```
319
+ 🔍 Step Mode: ON
320
+ Pause at EVERY tool call
321
+
322
+ [search] → Paused
323
+ [calculate] → Paused
324
+ [write_file] → Paused
325
+
326
+ Perfect for tracing complex flows
327
+ ```
328
+
329
+ ## Solving the Learning Curve Problem
330
+
331
+ The original concern: **"My only concern is that the learning curve should be simple and clear."**
332
+
333
+ Our solutions:
334
+
335
+ ### 1. Visual Mode Indicators
336
+ ```python
337
+ # Normal mode
338
+ Agent paused at: search
339
+ ┌─────────────────────────┐
340
+ │ ❯ Continue │
341
+ │ AI Help │
342
+ └─────────────────────────┘
343
+
344
+ # Step Mode active
345
+ 🔍 STEP MODE: Pausing at EVERY tool
346
+ Agent paused at: search
347
+ ┌─────────────────────────┐
348
+ │ ❯ Continue (step) │
349
+ │ Exit Step Mode │
350
+ └─────────────────────────┘
351
+ ```
352
+
353
+ Mode changes are **visually obvious**, not just text.
354
+
355
+ ### 2. Always-Visible Tips
356
+ ```
357
+ 💡 Use ↑↓ arrows • Enter to select • Press ? for help
358
+ ```
359
+
360
+ Every screen reminds you how to navigate. No memorization needed.
361
+
362
+ ### 3. Contextual Help
363
+ ```python
364
+ # Press ? anywhere
365
+ ─────────── Help ───────────
366
+ At menu: Use arrows to navigate
367
+ In AI Help: Ask natural language questions
368
+ In Python: Full REPL, 'exit' to continue
369
+ Commands: /menu /continue always work
370
+ ```
371
+
372
+ Help is context-aware - shows what matters NOW.
373
+
374
+ ### 4. Progressive Disclosure
375
+ ```
376
+ First use: See Continue, AI Help (simple)
377
+ Get curious: Discover Python Edit (power)
378
+ Deep debug: Enable Step Mode (expert)
379
+ ```
380
+
381
+ You can't be overwhelmed by options you don't see yet.
382
+
383
+ ## What We Explicitly Rejected
384
+
385
+ ### ❌ Complex Command Syntax
386
+ ```bash
387
+ # NO
388
+ co debug --breakpoint search --condition "query='test'" --on-error retry
389
+ ```
390
+ Too much to remember. Too easy to break.
391
+
392
+ ### ❌ Configuration Files
393
+ ```yaml
394
+ # NO
395
+ debug:
396
+ breakpoints:
397
+ - tool: search
398
+ condition: query == 'test'
399
+ ```
400
+ Configuration is code you can't debug.
401
+
402
+ ### ❌ Separate Debug Tool
403
+ ```bash
404
+ # NO
405
+ co debug agent.py # Different tool, different context
406
+ ```
407
+ Debugging should be built-in, not bolted-on.
408
+
409
+ ### ❌ Typed Commands at Breakpoint
410
+ ```
411
+ # NO
412
+ (debug) > inspect
413
+ (debug) > retry --modify
414
+ (debug) > step
415
+ ```
416
+ Menu navigation is more intuitive than command recall.
417
+
418
+ ## The Unix and Steve Jobs Principles We Applied
419
+
420
+ The question "What would Unix creators or Steve Jobs design?" guided our final iteration. Here's how we applied their principles:
421
+
422
+ ### From Unix Philosophy (Ken Thompson, Dennis Ritchie)
423
+
424
+ #### 1. Make Each Program Do One Thing Well
425
+ ```
426
+ Continue mode = Continue only (single purpose)
427
+ AI Help = Answer questions only (single purpose)
428
+ Python Edit = Modify variables only (single purpose)
429
+ View Trace = Show history only (single purpose)
430
+ Step Mode = Toggle pause behavior only (single purpose)
431
+ ```
432
+
433
+ Each mode has ONE job. No overlap, no confusion.
434
+
435
+ #### 2. Expect Output to Become Input (Composition)
436
+ ```
437
+ Menu → AI mode → /menu → Menu
438
+ Menu → Python mode → /continue → Resume
439
+ Menu → View Trace → [Enter] → Menu
440
+ ```
441
+
442
+ Modes compose naturally. Output of one flows to input of another.
443
+
444
+ #### 3. Design Software to Be Tried Early
445
+ ```
446
+ We shipped:
447
+ Week 1: Basic menu + continue
448
+ Week 2: Added AI Help
449
+ Week 3: Added Python Edit
450
+ Week 4: Added Step Mode
451
+ ```
452
+
453
+ Validate early, iterate based on feedback, ship incrementally.
454
+
455
+ #### 4. Use Software Leverage (Build on Existing Tools)
456
+ ```python
457
+ from rich.console import Console # Terminal UI (don't reinvent)
458
+ from code import InteractiveConsole # Python REPL (reuse)
459
+ ```
460
+
461
+ We composed from existing, proven tools rather than building everything from scratch.
462
+
463
+ ### From Steve Jobs (Apple Design Philosophy)
464
+
465
+ #### 1. Simplicity is the Ultimate Sophistication
466
+ ```
467
+ 4 modes → Too complex
468
+ 3 modes → Still complex
469
+ 5 modes BUT menu-driven → Simple
470
+
471
+ The menu makes complexity simple by making it VISUAL.
472
+ ```
473
+
474
+ More modes, but simpler experience. Visual beats cognitive load.
475
+
476
+ #### 2. Focus Means Saying No
477
+ ```
478
+ We said NO to:
479
+ - Typed commands at breakpoint
480
+ - Configuration files
481
+ - Separate CLI tool
482
+ - Mode switching complexity
483
+
484
+ We said YES to:
485
+ - Menu navigation
486
+ - Visual discovery
487
+ - Press Enter to continue
488
+ ```
489
+
490
+ Every "no" made room for a better "yes."
491
+
492
+ #### 3. Design is How It Works, Not How It Looks
493
+ ```
494
+ The menu isn't decoration - it IS the debugging interface
495
+ Arrow navigation isn't a feature - it IS how you debug
496
+ Tips aren't help text - they ARE the documentation
497
+ ```
498
+
499
+ Form follows function. The interface IS the experience.
500
+
501
+ #### 4. Make It Intuitive, Not Learnable
502
+ ```
503
+ Learnable: "Read the docs to understand modes"
504
+ Intuitive: "See menu, press arrow, select option"
505
+
506
+ First-time users succeed without docs = intuitive
507
+ ```
508
+
509
+ Zero learning curve for basic usage. That's intuitive design.
510
+
511
+ ### How These Principles Shaped Decisions
512
+
513
+ **Decision: Menu vs Typed Commands**
514
+ - Unix: Visual listing (like `ls`) beats command recall
515
+ - Jobs: See all options immediately (no memorization)
516
+ - **Result:** Menu with arrow navigation
517
+
518
+ **Decision: Press Enter to Continue**
519
+ - Unix: Default behavior should be simplest (like `less`)
520
+ - Jobs: Essential action should be effortless
521
+ - **Result:** Enter = continue (0 friction)
522
+
523
+ **Decision: `/menu` and `/continue` Everywhere**
524
+ - Unix: Universal commands work everywhere (like `Ctrl+C`)
525
+ - Jobs: No dead ends, always a way out
526
+ - **Result:** Universal escape hatches
527
+
528
+ **Decision: Full Names + Shortcuts**
529
+ - Unix: Teach with long flags (`--verbose`), reward with short (`-v`)
530
+ - Jobs: Discoverability first, efficiency second
531
+ - **Result:** `/ai-ask` or `/ai` - both work
532
+
533
+ ## The Implementation Philosophy
534
+
535
+ ### 1. @xray Decorator: Opt-In Breakpoints
536
+ ```python
537
+ @xray # This tool becomes a breakpoint
538
+ def search(query: str) -> str:
539
+ return find_results(query)
540
+
541
+ agent = Agent("assistant", tools=[search])
542
+ agent.auto_debug() # Pauses at @xray tools
543
+ ```
544
+
545
+ **Why @xray?**
546
+ - Self-documenting (code shows what's debuggable)
547
+ - No runtime overhead when auto_debug() not called
548
+ - Composable with other decorators
549
+
550
+ ### 2. agent.auto_debug(): Session-Based
551
+ ```python
552
+ # Debugging is per-session, not global
553
+ agent1.auto_debug() # Debug this agent
554
+ agent2.input("task") # This one runs normally
555
+ ```
556
+
557
+ No global state. No surprise behaviors.
558
+
559
+ ### 3. Rich Terminal UI: Native Experience
560
+ ```python
561
+ from rich.console import Console
562
+ from rich.panel import Panel
563
+ from rich.table import Table
564
+
565
+ # Beautiful, functional, standard
566
+ console.print(Panel("Agent paused", style="blue"))
567
+ ```
568
+
569
+ Using Rich library:
570
+ - Professional terminal UI
571
+ - Wide compatibility
572
+ - Familiar to Python developers
573
+
574
+ ## The Trade-offs We Made
575
+
576
+ ### We Chose: Intuitive > Powerful CLI
577
+
578
+ **Pro:**
579
+ - First-time users succeed immediately
580
+ - Menu navigation is self-documenting
581
+ - Arrow keys can't be mistyped
582
+ - Progressive disclosure prevents overwhelm
583
+
584
+ **Con:**
585
+ - Menu navigation is slower than typed commands (for experts)
586
+ - Requires interactive terminal (won't work in pure scripts)
587
+
588
+ **Our stance:** 99% of debugging happens interactively. The 1% edge case (non-interactive) can use logging/print debugging.
589
+
590
+ ### We Chose: Session-Based > Configuration-Based
591
+
592
+ **Pro:**
593
+ - `agent.auto_debug()` is explicit and obvious
594
+ - No hidden config files to debug
595
+ - Works in any environment (REPL, notebook, script)
596
+
597
+ **Con:**
598
+ - Have to call `.auto_debug()` on each agent
599
+ - No "debug all agents" global mode
600
+
601
+ **Our stance:** Explicit > Implicit. Knowing which agents are debugged prevents surprises.
602
+
603
+ ### We Chose: @xray Decorator > Auto-Breakpoint All
604
+
605
+ **Pro:**
606
+ - Developer controls what's debuggable
607
+ - No performance impact on non-decorated tools
608
+ - Clear visual indicator in code
609
+
610
+ **Con:**
611
+ - Requires adding decorator to tools
612
+ - Can't debug tools you don't control (external libraries)
613
+
614
+ **Our stance:** 95% of debugging is on your own tools. For external tools, wrap them.
615
+
616
+ ## Lessons Learned from Four Iterations
617
+
618
+ ### 1. Listen to User Feedback - It Saves You
619
+ - **Iteration 1:** *"Too complicated"* → Simplified from 4 modes
620
+ - **Iteration 2:** *"Agent should default have a mode"* → Made agent-first explicit
621
+ - **Iteration 3:** *"AI Ask more intuitive"* → Clarified naming
622
+ - **Final:** *"What would Unix/Jobs design?"* → Eliminated complexity
623
+
624
+ **We almost built the wrong thing - four times. Feedback saved us every time.**
625
+
626
+ ### 2. User Journey > Feature List
627
+ Asking "What does a developer WANT?" (continue execution) led to better design than "What CAN we build?" (complex modes).
628
+
629
+ **Default should be the most common action, not the most powerful.**
630
+
631
+ ### 3. Intuitive > Learnable
632
+ - `agent.auto_debug()` - Discovered via autocomplete (intuitive)
633
+ - Arrow keys - Everyone knows these (intuitive)
634
+ - Menu - See options visually (intuitive)
635
+ - CLI commands - Require docs and practice (learnable)
636
+
637
+ **If it requires documentation for basic usage, it's not intuitive enough.**
638
+
639
+ ### 4. More Features ≠ Better UX
640
+ We went from:
641
+ - 4 modes (complex)
642
+ - 2-3 modes (simpler)
643
+ - 5 modes BUT menu-driven (simplest!)
644
+
645
+ **Visual discovery makes complexity manageable. Hide it behind a good interface.**
646
+
647
+ ### 5. Progressive Disclosure Works Perfectly
648
+ ```
649
+ First use: See menu, press Enter (10 seconds to understand)
650
+ Get curious: Try 'a' for AI help (discover power)
651
+ Need control: Discover 'e' for Python (expert mode)
652
+ Deep debug: Enable step mode (maximum visibility)
653
+ ```
654
+
655
+ **Reveal complexity gradually. Never overwhelm upfront.**
656
+
657
+ ### 6. Consistent Patterns Enable Muscle Memory
658
+ - All commands use `/` prefix
659
+ - All modes show tips
660
+ - All screens offer `/menu` and `/continue`
661
+
662
+ **Consistency reduces cognitive load. Exceptions require thinking.**
663
+
664
+ ### 7. Default Matters More Than Anything
665
+ Press Enter to continue - the simplest possible action.
666
+
667
+ **If the default is perfect, 80% of users never need advanced features.**
668
+
669
+ ### 8. Ask "What Would Masters Design?"
670
+ Unix and Steve Jobs principles aren't abstract - they're actionable:
671
+ - Do one thing well → Single purpose per mode
672
+ - Eliminate unnecessary → Removed mode switching
673
+ - Make it intuitive → Visual menu, not commands
674
+
675
+ **Learn from the best, apply to your domain.**
676
+
677
+ ## The Implementation Phases
678
+
679
+ We broke this into a 6-phase MVP-first approach:
680
+
681
+ ### Phase 1: Core Infrastructure (Week 1)
682
+ - Breakpoint detection system
683
+ - Interactive pause/continue
684
+ - Basic menu with arrow keys
685
+
686
+ ### Phase 2-3: Menu & Modes (Week 2)
687
+ - Full menu navigation
688
+ - AI Help Mode implementation
689
+ - View Trace functionality
690
+
691
+ ### Phase 4-5: Advanced Features (Week 3)
692
+ - Python Edit Mode (REPL at breakpoint)
693
+ - Step Mode (pause at ALL tools)
694
+ - Command system (/menu, /continue, ?)
695
+
696
+ ### Phase 6: Polish (Week 4)
697
+ - Error handling & edge cases
698
+ - Comprehensive documentation
699
+ - Tutorial videos
700
+
701
+ **Target: 4 weeks from design to shipped.**
702
+
703
+ ## Future Possibilities This Enables
704
+
705
+ The menu-based architecture makes future enhancements natural:
706
+
707
+ ### Remote Debugging (Future)
708
+ ```
709
+ ┌─────────────────────────┐
710
+ │ ❯ Continue │
711
+ │ AI Help │
712
+ │ Remote Inspect ← NEW │
713
+ └─────────────────────────┘
714
+
715
+ # Debug agent running on server
716
+ # Menu item connects to remote session
717
+ ```
718
+
719
+ ### Visual Debugger (Future)
720
+ ```
721
+ Menu system stays the same
722
+ Add: Export state to web UI
723
+ Click menu items in browser instead of terminal
724
+ ```
725
+
726
+ ### Collaborative Debugging (Future)
727
+ ```
728
+ Multiple developers join same debug session
729
+ Menu shows who's controlling
730
+ Vote on which option to select
731
+ ```
732
+
733
+ But we ship Phase 1 first. **Validate before expanding.**
734
+
735
+ ## The Core Principles
736
+
737
+ 1. **Intuitive > Learnable** - No manual required
738
+ 2. **Menu > Commands** - Visual beats recall
739
+ 3. **Progressive Disclosure** - Simple first, power later
740
+ 4. **Always Visible Help** - No memorization needed
741
+ 5. **Session-Based** - Explicit beats implicit
742
+ 6. **@xray Decorator** - Opt-in beats auto-everything
743
+
744
+ ## Conclusion: The Journey from Complex to Simple
745
+
746
+ We almost built the wrong thing - **five times**:
747
+
748
+ 1. **CLI tool** - Required learning commands, broke Python flow
749
+ 2. **4-mode system** - Too complicated, high learning curve
750
+ 3. **Prefix characters** - Not discoverable, unclear purpose
751
+ 4. **Mode prompts** - Better but still needed work
752
+ 5. **Agent-first menu** - Finally got it right ✅
753
+
754
+ Each iteration taught us something:
755
+ - **Iteration 1 → 2:** Reduce complexity (4 modes → simpler)
756
+ - **Iteration 2 → 3:** Make default obvious (agent-first)
757
+ - **Iteration 3 → 4:** Clarify naming (AI Ask vs ai>)
758
+ - **Applied Unix/Jobs:** Eliminate unnecessary, focus on essence
759
+
760
+ **The final design:**
761
+ - `agent.auto_debug()` - One method to remember
762
+ - Press Enter - Simplest action (continue)
763
+ - Arrow keys - Navigation everyone knows
764
+ - Menu - Visual discovery (no memorization)
765
+ - Shortcuts - Power when ready (progressive disclosure)
766
+ - Universal `/commands` - Escape hatches everywhere
767
+
768
+ **The result: Debugging that feels natural, not learned.**
769
+
770
+ ### What Made the Difference
771
+
772
+ **User feedback at every stage:**
773
+ - *"Too complicated"* - Led to simplification
774
+ - *"Learning curve should be simple"* - Led to progressive disclosure
775
+ - *"Agent should be primary"* - Led to agent-first design
776
+ - *"What would Unix/Jobs design?"* - Led to final breakthrough
777
+
778
+ **Applying timeless principles:**
779
+ - Unix: Do one thing well, compose simply
780
+ - Steve Jobs: Eliminate unnecessary, make it intuitive
781
+ - Both: Default action should be effortless
782
+
783
+ **The willingness to iterate:**
784
+ - Five complete redesigns before shipping
785
+ - Each rejected design taught us something
786
+ - Final design emerged from learning, not planning
787
+
788
+ ### The Core Principles That Won
789
+
790
+ 1. **Intuitive > Learnable** - No manual required for basic usage
791
+ 2. **Menu > Commands** - Visual discovery beats command recall
792
+ 3. **Progressive Disclosure** - Start simple, reveal power gradually
793
+ 4. **Always Visible Help** - Zero memorization needed
794
+ 5. **Agent-First** - Default matches most common action
795
+ 6. **Consistent Patterns** - All `/` commands work everywhere
796
+
797
+ ---
798
+
799
+ *"Simplicity is the ultimate sophistication." - Leonardo da Vinci*
800
+
801
+ *We iterated five times to find the simplest solution.*
802
+
803
+ ## Meta: How This Design Really Happened
804
+
805
+ This design decision documents a rare journey of honest iteration:
806
+
807
+ 1. **Rejected CLI** (wrong tool for the job)
808
+ 2. **Rejected 4-mode design** (too complex)
809
+ 3. **Rejected prefix characters** (not discoverable)
810
+ 4. **Rejected mode prompts** (still unclear)
811
+ 5. **Asked "What would masters design?"** (breakthrough)
812
+ 6. **Applied Unix + Jobs principles** (final design)
813
+
814
+ **The turning point:** Asking "What would Unix creators or Steve Jobs design?" forced us to apply timeless principles instead of following our assumptions.
815
+
816
+ **The uncomfortable truth:** We were wrong four times before getting it right. And that's okay.
817
+
818
+ **The real lesson:** The best design decision is often admitting your previous one was wrong.
819
+
820
+ ### What This Means for ConnectOnion
821
+
822
+ This isn't just about auto-debug. It's about our design process:
823
+
824
+ 1. **Start with user problems** (invisible agent behavior)
825
+ 2. **Prototype solutions** (CLI, modes, prompts)
826
+ 3. **Get user feedback early** (reject what doesn't work)
827
+ 4. **Apply timeless principles** (Unix, Jobs, great designers)
828
+ 5. **Iterate until simple** (5 tries for auto-debug)
829
+ 6. **Ship when intuitive** (zero learning curve achieved)
830
+
831
+ **We don't just build features. We solve problems through iteration.**
832
+
833
+ Every design decision should go through this process. Auto-debug is the template.
834
+
835
+ ---
836
+
837
+ *This document evolved alongside the design - from initial CLI concept to final menu-based REPL. The edits and iterations you see in the git history mirror the design iterations themselves. Meta-documentation at its finest.*