connectonion 0.6.2__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 (407) 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 +13 -3
  5. connectonion/cli/browser_agent/element_finder.py +8 -0
  6. connectonion/cli/browser_agent/highlight_screenshot.py +9 -1
  7. connectonion/cli/browser_agent/scroll.py +8 -0
  8. connectonion/cli/co_ai/__init__.py +6 -0
  9. connectonion/cli/co_ai/agent.py +87 -0
  10. connectonion/cli/co_ai/agents/__init__.py +5 -0
  11. connectonion/cli/co_ai/agents/registry.py +57 -0
  12. connectonion/cli/co_ai/commands/__init__.py +45 -0
  13. connectonion/cli/co_ai/commands/compact.py +173 -0
  14. connectonion/cli/co_ai/commands/cost.py +77 -0
  15. connectonion/cli/co_ai/commands/export.py +60 -0
  16. connectonion/cli/co_ai/commands/help.py +80 -0
  17. connectonion/cli/co_ai/commands/init.py +101 -0
  18. connectonion/cli/co_ai/commands/sessions.py +55 -0
  19. connectonion/cli/co_ai/commands/tasks.py +63 -0
  20. connectonion/cli/co_ai/commands/undo.py +103 -0
  21. connectonion/cli/co_ai/context.py +127 -0
  22. connectonion/cli/co_ai/main.py +52 -0
  23. connectonion/cli/co_ai/plugins/__init__.py +6 -0
  24. connectonion/cli/co_ai/plugins/reminder.py +76 -0
  25. connectonion/cli/co_ai/plugins/shell_approval.py +105 -0
  26. connectonion/cli/co_ai/prompts/agents/explore.md +79 -0
  27. connectonion/cli/co_ai/prompts/agents/plan.md +60 -0
  28. connectonion/cli/co_ai/prompts/assembler.py +303 -0
  29. connectonion/cli/{docs/co-vibecoding-principles-docs-contexts-all-in-one.md → co_ai/prompts/connectonion/README.md} +26 -0
  30. connectonion/cli/co_ai/prompts/connectonion/api.md +457 -0
  31. connectonion/cli/co_ai/prompts/connectonion/cli/README.md +805 -0
  32. connectonion/cli/co_ai/prompts/connectonion/cli/auth.md +46 -0
  33. connectonion/cli/co_ai/prompts/connectonion/cli/browser.md +235 -0
  34. connectonion/cli/co_ai/prompts/connectonion/cli/copy.md +184 -0
  35. connectonion/cli/co_ai/prompts/connectonion/cli/create.md +335 -0
  36. connectonion/cli/co_ai/prompts/connectonion/cli/init.md +431 -0
  37. connectonion/cli/co_ai/prompts/connectonion/co-directory-structure.md +214 -0
  38. connectonion/cli/co_ai/prompts/connectonion/concepts/agent.md +1078 -0
  39. connectonion/cli/co_ai/prompts/connectonion/concepts/events.md +816 -0
  40. connectonion/cli/co_ai/prompts/connectonion/concepts/llm_do.md +256 -0
  41. connectonion/cli/co_ai/prompts/connectonion/concepts/max_iterations.md +362 -0
  42. connectonion/cli/co_ai/prompts/connectonion/concepts/models.md +641 -0
  43. connectonion/cli/co_ai/prompts/connectonion/concepts/plugins.md +100 -0
  44. connectonion/cli/co_ai/prompts/connectonion/concepts/prompts.md +122 -0
  45. connectonion/cli/co_ai/prompts/connectonion/concepts/tools.md +512 -0
  46. connectonion/cli/co_ai/prompts/connectonion/concepts/transcribe.md +156 -0
  47. connectonion/cli/co_ai/prompts/connectonion/concepts/trust.md +291 -0
  48. connectonion/cli/co_ai/prompts/connectonion/debug/README.md +18 -0
  49. connectonion/cli/co_ai/prompts/connectonion/debug/auto_debug.md +1026 -0
  50. connectonion/cli/co_ai/prompts/connectonion/debug/console.md +129 -0
  51. connectonion/cli/co_ai/prompts/connectonion/debug/eval-format.md +178 -0
  52. connectonion/cli/co_ai/prompts/connectonion/debug/eval.md +230 -0
  53. connectonion/cli/co_ai/prompts/connectonion/debug/exceptions.md +307 -0
  54. connectonion/cli/co_ai/prompts/connectonion/debug/log.md +117 -0
  55. connectonion/cli/co_ai/prompts/connectonion/debug/xray.md +215 -0
  56. connectonion/cli/co_ai/prompts/connectonion/design-decisions/001-choosing-input-method.md +202 -0
  57. connectonion/cli/co_ai/prompts/connectonion/design-decisions/002-choosing-llm-function-name.md +202 -0
  58. connectonion/cli/co_ai/prompts/connectonion/design-decisions/003-choosing-trust-keyword.md +141 -0
  59. connectonion/cli/co_ai/prompts/connectonion/design-decisions/004-cli-create-flow.md +117 -0
  60. connectonion/cli/co_ai/prompts/connectonion/design-decisions/005-designing-agent-network-protocol.md +503 -0
  61. connectonion/cli/co_ai/prompts/connectonion/design-decisions/006-agent-address-format.md +305 -0
  62. connectonion/cli/co_ai/prompts/connectonion/design-decisions/007-authentication-backend-design.md +240 -0
  63. connectonion/cli/co_ai/prompts/connectonion/design-decisions/008-naming-is-hard.md +228 -0
  64. connectonion/cli/co_ai/prompts/connectonion/design-decisions/009-why-connect-function.md +167 -0
  65. connectonion/cli/co_ai/prompts/connectonion/design-decisions/010-cli-ux-progressive-disclosure.md +176 -0
  66. connectonion/cli/co_ai/prompts/connectonion/design-decisions/011-global-config-identity-management.md +357 -0
  67. connectonion/cli/co_ai/prompts/connectonion/design-decisions/012-tool-execution-separation.md +259 -0
  68. connectonion/cli/co_ai/prompts/connectonion/design-decisions/013-debug-and-logging-design.md +253 -0
  69. connectonion/cli/co_ai/prompts/connectonion/design-decisions/014-hook-system-design.md +510 -0
  70. connectonion/cli/co_ai/prompts/connectonion/design-decisions/015-interactive-auto-debug-design.md +837 -0
  71. connectonion/cli/co_ai/prompts/connectonion/design-decisions/016-why-no-zero-knowledge-proofs.md +358 -0
  72. connectonion/cli/co_ai/prompts/connectonion/design-decisions/017-session-logging-and-eval-format.md +120 -0
  73. connectonion/cli/co_ai/prompts/connectonion/design-decisions/018-event-api-naming.md +274 -0
  74. connectonion/cli/co_ai/prompts/connectonion/design-decisions/019-agent-lifecycle-design.md +655 -0
  75. connectonion/cli/co_ai/prompts/connectonion/design-decisions/020-trust-system-and-network-architecture.md +503 -0
  76. connectonion/cli/co_ai/prompts/connectonion/design-decisions/021-task-storage-jsonl-design.md +496 -0
  77. connectonion/cli/co_ai/prompts/connectonion/design-decisions/022-raw-asgi-implementation.md +273 -0
  78. connectonion/cli/co_ai/prompts/connectonion/examples/agent_reasoning.md +62 -0
  79. connectonion/cli/co_ai/prompts/connectonion/examples/atomic_tools.md +24 -0
  80. connectonion/cli/co_ai/prompts/connectonion/examples/load_guide.md +18 -0
  81. connectonion/cli/co_ai/prompts/connectonion/examples.md +0 -0
  82. connectonion/cli/co_ai/prompts/connectonion/hook-system-options.md +364 -0
  83. connectonion/cli/co_ai/prompts/connectonion/index.md +162 -0
  84. connectonion/cli/co_ai/prompts/connectonion/integrations/README.md +12 -0
  85. connectonion/cli/co_ai/prompts/connectonion/integrations/auth.md +450 -0
  86. connectonion/cli/co_ai/prompts/connectonion/integrations/google.md +431 -0
  87. connectonion/cli/co_ai/prompts/connectonion/integrations/microsoft.md +370 -0
  88. connectonion/cli/co_ai/prompts/connectonion/network/README.md +14 -0
  89. connectonion/cli/co_ai/prompts/connectonion/network/connect.md +543 -0
  90. connectonion/cli/co_ai/prompts/connectonion/network/connection.md +538 -0
  91. connectonion/cli/co_ai/prompts/connectonion/network/deploy.md +123 -0
  92. connectonion/cli/co_ai/prompts/connectonion/network/host.md +1049 -0
  93. connectonion/cli/co_ai/prompts/connectonion/network/protocol/agent-relay-protocol.md +495 -0
  94. connectonion/cli/co_ai/prompts/connectonion/network/protocol/announce-message.md +115 -0
  95. connectonion/cli/co_ai/prompts/connectonion/principles.md +124 -0
  96. connectonion/cli/co_ai/prompts/connectonion/quickstart.md +261 -0
  97. connectonion/cli/co_ai/prompts/connectonion/roadmap.md +81 -0
  98. connectonion/cli/co_ai/prompts/connectonion/templates/README.md +77 -0
  99. connectonion/cli/co_ai/prompts/connectonion/templates/meta-agent.md +152 -0
  100. connectonion/cli/co_ai/prompts/connectonion/templates/minimal.md +105 -0
  101. connectonion/cli/co_ai/prompts/connectonion/templates/playwright.md +130 -0
  102. connectonion/cli/co_ai/prompts/connectonion/templates/web-research.md +144 -0
  103. connectonion/cli/co_ai/prompts/connectonion/tui/README.md +95 -0
  104. connectonion/cli/co_ai/prompts/connectonion/tui/chat.md +181 -0
  105. connectonion/cli/co_ai/prompts/connectonion/tui/divider.md +63 -0
  106. connectonion/cli/co_ai/prompts/connectonion/tui/dropdown.md +83 -0
  107. connectonion/cli/co_ai/prompts/connectonion/tui/footer.md +44 -0
  108. connectonion/cli/co_ai/prompts/connectonion/tui/fuzzy.md +68 -0
  109. connectonion/cli/co_ai/prompts/connectonion/tui/input.md +84 -0
  110. connectonion/cli/co_ai/prompts/connectonion/tui/keys.md +77 -0
  111. connectonion/cli/co_ai/prompts/connectonion/tui/pick.md +71 -0
  112. connectonion/cli/co_ai/prompts/connectonion/tui/providers.md +89 -0
  113. connectonion/cli/co_ai/prompts/connectonion/tui/status_bar.md +67 -0
  114. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/README.md +156 -0
  115. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/calendar_plugin.md +68 -0
  116. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/eval.md +89 -0
  117. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/gmail_plugin.md +68 -0
  118. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/image_result_formatter.md +74 -0
  119. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/re_act.md +86 -0
  120. connectonion/cli/co_ai/prompts/connectonion/useful_plugins/shell_approval.md +69 -0
  121. connectonion/cli/co_ai/prompts/connectonion/useful_tools/README.md +81 -0
  122. connectonion/cli/co_ai/prompts/connectonion/useful_tools/diff_writer.md +138 -0
  123. connectonion/cli/co_ai/prompts/connectonion/useful_tools/get_emails.md +499 -0
  124. connectonion/cli/co_ai/prompts/connectonion/useful_tools/gmail.md +135 -0
  125. connectonion/cli/co_ai/prompts/connectonion/useful_tools/google_calendar.md +106 -0
  126. connectonion/cli/co_ai/prompts/connectonion/useful_tools/memory.md +486 -0
  127. connectonion/cli/co_ai/prompts/connectonion/useful_tools/microsoft_calendar.md +106 -0
  128. connectonion/cli/co_ai/prompts/connectonion/useful_tools/outlook.md +120 -0
  129. connectonion/cli/co_ai/prompts/connectonion/useful_tools/send_email.md +403 -0
  130. connectonion/cli/co_ai/prompts/connectonion/useful_tools/shell.md +95 -0
  131. connectonion/cli/co_ai/prompts/connectonion/useful_tools/slash_command.md +96 -0
  132. connectonion/cli/co_ai/prompts/connectonion/useful_tools/terminal.md +97 -0
  133. connectonion/cli/co_ai/prompts/connectonion/useful_tools/todo_list.md +252 -0
  134. connectonion/cli/co_ai/prompts/connectonion/useful_tools/web_fetch.md +130 -0
  135. connectonion/cli/co_ai/prompts/connectonion/vibe-coding-guide.md +97 -0
  136. connectonion/cli/co_ai/prompts/connectonion/windows-support.md +258 -0
  137. connectonion/cli/co_ai/prompts/main.md +247 -0
  138. connectonion/cli/co_ai/prompts/reminders/plan_mode.md +34 -0
  139. connectonion/cli/co_ai/prompts/summarization.md +55 -0
  140. connectonion/cli/co_ai/prompts/tools/ask_user.md +61 -0
  141. connectonion/cli/co_ai/prompts/tools/background.md +57 -0
  142. connectonion/cli/co_ai/prompts/tools/edit.md +90 -0
  143. connectonion/cli/co_ai/prompts/tools/glob.md +52 -0
  144. connectonion/cli/co_ai/prompts/tools/grep.md +55 -0
  145. connectonion/cli/co_ai/prompts/tools/plan_mode.md +80 -0
  146. connectonion/cli/co_ai/prompts/tools/read.md +40 -0
  147. connectonion/cli/co_ai/prompts/tools/shell.md +67 -0
  148. connectonion/cli/co_ai/prompts/tools/task.md +51 -0
  149. connectonion/cli/co_ai/prompts/tools/todo.md +139 -0
  150. connectonion/cli/co_ai/prompts/tools/write.md +47 -0
  151. connectonion/cli/co_ai/prompts/workflow.md +89 -0
  152. connectonion/cli/co_ai/reminders.py +159 -0
  153. connectonion/cli/co_ai/sessions.py +110 -0
  154. connectonion/cli/co_ai/skills/__init__.py +37 -0
  155. connectonion/cli/co_ai/skills/builtin/commit/SKILL.md +63 -0
  156. connectonion/cli/co_ai/skills/builtin/review-pr/SKILL.md +76 -0
  157. connectonion/cli/co_ai/skills/loader.py +166 -0
  158. connectonion/cli/co_ai/skills/tool.py +46 -0
  159. connectonion/cli/co_ai/tools/__init__.py +92 -0
  160. connectonion/cli/co_ai/tools/ask_user.py +35 -0
  161. connectonion/cli/co_ai/tools/background.py +201 -0
  162. connectonion/cli/co_ai/tools/diff_writer.py +291 -0
  163. connectonion/cli/co_ai/tools/edit.py +89 -0
  164. connectonion/cli/co_ai/tools/glob.py +84 -0
  165. connectonion/cli/co_ai/tools/grep.py +158 -0
  166. connectonion/cli/co_ai/tools/load_guide.py +23 -0
  167. connectonion/cli/co_ai/tools/multi_edit.py +116 -0
  168. connectonion/cli/co_ai/tools/plan_mode.py +172 -0
  169. connectonion/cli/co_ai/tools/read.py +67 -0
  170. connectonion/cli/co_ai/tools/task.py +59 -0
  171. connectonion/cli/co_ai/tools/todo_list.py +159 -0
  172. connectonion/cli/co_ai/tools/write.py +126 -0
  173. connectonion/cli/commands/__init__.py +11 -1
  174. connectonion/cli/commands/ai_commands.py +34 -0
  175. connectonion/cli/commands/copy_commands.py +55 -6
  176. connectonion/cli/commands/create.py +20 -17
  177. connectonion/cli/commands/init.py +19 -22
  178. connectonion/cli/commands/project_cmd_lib.py +15 -0
  179. connectonion/cli/main.py +11 -0
  180. connectonion/console.py +15 -1
  181. connectonion/core/__init__.py +10 -1
  182. connectonion/core/agent.py +37 -16
  183. connectonion/core/exceptions.py +74 -0
  184. connectonion/core/llm.py +54 -6
  185. connectonion/core/tool_executor.py +32 -31
  186. connectonion/core/tool_factory.py +47 -10
  187. connectonion/debug/__init__.py +10 -1
  188. connectonion/debug/debug_explainer/__init__.py +10 -1
  189. connectonion/debug/execution_analyzer/__init__.py +10 -1
  190. connectonion/debug/execution_analyzer/execution_analysis.py +5 -2
  191. connectonion/debug/runtime_inspector/__init__.py +10 -1
  192. connectonion/docs/.package-ignore +6 -0
  193. connectonion/docs/README.md +2036 -0
  194. connectonion/docs/api.md +457 -0
  195. connectonion/docs/archive/001-ai-agent-is-just-prompt-plus-function.md +249 -0
  196. connectonion/docs/archive/README.md +53 -0
  197. connectonion/docs/archive/archive/consolidation-plan.md +72 -0
  198. connectonion/docs/archive/archive/core-principles-extracted.md +239 -0
  199. connectonion/docs/archive/archive/master-principles.md +222 -0
  200. connectonion/docs/archive/archive/principles.md +293 -0
  201. connectonion/docs/archive/archive/simplicity-principles.md +221 -0
  202. connectonion/docs/archive/attack-defense-insights.md +410 -0
  203. connectonion/docs/archive/business-model.md +305 -0
  204. connectonion/docs/archive/core-principles-unified.md +190 -0
  205. connectonion/docs/archive/discussion-journey.md +178 -0
  206. connectonion/docs/archive/economic-analysis.md +323 -0
  207. connectonion/docs/archive/features/01-share-and-find.md +256 -0
  208. connectonion/docs/archive/features/02-agent-authentication.md +93 -0
  209. connectonion/docs/archive/features/03-test-before-trust.md +71 -0
  210. connectonion/docs/archive/features/06-reliability-and-offline.md +197 -0
  211. connectonion/docs/archive/features/README.md +46 -0
  212. connectonion/docs/archive/features-roadmap.md +247 -0
  213. connectonion/docs/archive/mcp-comparison-insights.md +215 -0
  214. connectonion/docs/archive/migration-strategy.md +571 -0
  215. connectonion/docs/archive/mini-whitepaper.md +293 -0
  216. connectonion/docs/archive/network-protocol.md +394 -0
  217. connectonion/docs/archive/semantic-revolution.md +367 -0
  218. connectonion/docs/archive/technical-architecture.md +453 -0
  219. connectonion/docs/archive/the-semantic-insight.md +207 -0
  220. connectonion/docs/archive/threat-model.md +164 -0
  221. connectonion/docs/cli/README.md +805 -0
  222. connectonion/docs/cli/auth.md +46 -0
  223. connectonion/docs/cli/browser.md +235 -0
  224. connectonion/docs/cli/copy.md +232 -0
  225. connectonion/docs/cli/create.md +335 -0
  226. connectonion/docs/cli/init.md +431 -0
  227. connectonion/docs/co-directory-structure.md +214 -0
  228. connectonion/docs/concepts/agent.md +1078 -0
  229. connectonion/docs/concepts/events.md +699 -0
  230. connectonion/docs/concepts/llm_do.md +256 -0
  231. connectonion/docs/concepts/max_iterations.md +362 -0
  232. connectonion/docs/concepts/models.md +641 -0
  233. connectonion/docs/concepts/plugins.md +100 -0
  234. connectonion/docs/concepts/prompts.md +122 -0
  235. connectonion/docs/concepts/session.md +428 -0
  236. connectonion/docs/concepts/tools.md +512 -0
  237. connectonion/docs/concepts/transcribe.md +156 -0
  238. connectonion/docs/concepts/trust.md +291 -0
  239. connectonion/docs/connectonion.md +1256 -0
  240. connectonion/docs/debug/README.md +18 -0
  241. connectonion/docs/debug/auto_debug.md +1026 -0
  242. connectonion/docs/debug/console.md +129 -0
  243. connectonion/docs/debug/eval-format.md +178 -0
  244. connectonion/docs/debug/eval.md +230 -0
  245. connectonion/docs/debug/exceptions.md +307 -0
  246. connectonion/docs/debug/log.md +117 -0
  247. connectonion/docs/debug/xray.md +215 -0
  248. connectonion/docs/design-decisions/001-choosing-input-method.md +202 -0
  249. connectonion/docs/design-decisions/002-choosing-llm-function-name.md +202 -0
  250. connectonion/docs/design-decisions/003-choosing-trust-keyword.md +141 -0
  251. connectonion/docs/design-decisions/004-cli-create-flow.md +117 -0
  252. connectonion/docs/design-decisions/005-designing-agent-network-protocol.md +503 -0
  253. connectonion/docs/design-decisions/006-agent-address-format.md +305 -0
  254. connectonion/docs/design-decisions/007-authentication-backend-design.md +240 -0
  255. connectonion/docs/design-decisions/008-naming-is-hard.md +228 -0
  256. connectonion/docs/design-decisions/009-why-connect-function.md +167 -0
  257. connectonion/docs/design-decisions/010-cli-ux-progressive-disclosure.md +176 -0
  258. connectonion/docs/design-decisions/011-global-config-identity-management.md +357 -0
  259. connectonion/docs/design-decisions/012-tool-execution-separation.md +259 -0
  260. connectonion/docs/design-decisions/013-debug-and-logging-design.md +253 -0
  261. connectonion/docs/design-decisions/014-hook-system-design.md +510 -0
  262. connectonion/docs/design-decisions/015-interactive-auto-debug-design.md +837 -0
  263. connectonion/docs/design-decisions/016-why-no-zero-knowledge-proofs.md +358 -0
  264. connectonion/docs/design-decisions/017-session-logging-and-eval-format.md +120 -0
  265. connectonion/docs/design-decisions/018-event-api-naming.md +274 -0
  266. connectonion/docs/design-decisions/019-agent-lifecycle-design.md +655 -0
  267. connectonion/docs/design-decisions/020-trust-system-and-network-architecture.md +503 -0
  268. connectonion/docs/design-decisions/021-task-storage-jsonl-design.md +496 -0
  269. connectonion/docs/design-decisions/022-raw-asgi-implementation.md +273 -0
  270. connectonion/docs/examples.md +0 -0
  271. connectonion/docs/hook-system-options.md +364 -0
  272. connectonion/docs/integrations/README.md +12 -0
  273. connectonion/docs/integrations/auth.md +450 -0
  274. connectonion/docs/integrations/google.md +431 -0
  275. connectonion/docs/integrations/microsoft.md +370 -0
  276. connectonion/docs/network/README.md +14 -0
  277. connectonion/docs/network/connect.md +629 -0
  278. connectonion/docs/network/deploy.md +124 -0
  279. connectonion/docs/network/host.md +1087 -0
  280. connectonion/docs/network/io.md +538 -0
  281. connectonion/docs/network/protocol/agent-relay-protocol.md +495 -0
  282. connectonion/docs/network/protocol/announce-message.md +115 -0
  283. connectonion/docs/principles.md +124 -0
  284. connectonion/docs/quickstart.md +261 -0
  285. connectonion/docs/roadmap.md +81 -0
  286. connectonion/docs/templates/README.md +77 -0
  287. connectonion/docs/templates/meta-agent.md +152 -0
  288. connectonion/docs/templates/minimal.md +105 -0
  289. connectonion/docs/templates/playwright.md +130 -0
  290. connectonion/docs/templates/web-research.md +144 -0
  291. connectonion/docs/tui/README.md +95 -0
  292. connectonion/docs/tui/chat.md +181 -0
  293. connectonion/docs/tui/divider.md +63 -0
  294. connectonion/docs/tui/dropdown.md +83 -0
  295. connectonion/docs/tui/footer.md +44 -0
  296. connectonion/docs/tui/fuzzy.md +68 -0
  297. connectonion/docs/tui/input.md +84 -0
  298. connectonion/docs/tui/keys.md +77 -0
  299. connectonion/docs/tui/pick.md +71 -0
  300. connectonion/docs/tui/providers.md +89 -0
  301. connectonion/docs/tui/status_bar.md +67 -0
  302. connectonion/docs/useful_plugins/README.md +160 -0
  303. connectonion/docs/useful_plugins/calendar_plugin.md +68 -0
  304. connectonion/docs/useful_plugins/eval.md +89 -0
  305. connectonion/docs/useful_plugins/gmail_plugin.md +68 -0
  306. connectonion/docs/useful_plugins/image_result_formatter.md +74 -0
  307. connectonion/docs/useful_plugins/re_act.md +86 -0
  308. connectonion/docs/useful_plugins/shell_approval.md +69 -0
  309. connectonion/docs/useful_plugins/system_reminder.md +210 -0
  310. connectonion/docs/useful_prompts/README.md +127 -0
  311. connectonion/docs/useful_prompts/coding_agent.md +214 -0
  312. connectonion/docs/useful_tools/README.md +81 -0
  313. connectonion/docs/useful_tools/ask_user.md +103 -0
  314. connectonion/docs/useful_tools/diff_writer.md +158 -0
  315. connectonion/docs/useful_tools/get_emails.md +519 -0
  316. connectonion/docs/useful_tools/gmail.md +155 -0
  317. connectonion/docs/useful_tools/google_calendar.md +126 -0
  318. connectonion/docs/useful_tools/memory.md +506 -0
  319. connectonion/docs/useful_tools/microsoft_calendar.md +126 -0
  320. connectonion/docs/useful_tools/outlook.md +140 -0
  321. connectonion/docs/useful_tools/send_email.md +423 -0
  322. connectonion/docs/useful_tools/shell.md +115 -0
  323. connectonion/docs/useful_tools/slash_command.md +116 -0
  324. connectonion/docs/useful_tools/terminal.md +115 -0
  325. connectonion/docs/useful_tools/todo_list.md +272 -0
  326. connectonion/docs/useful_tools/web_fetch.md +150 -0
  327. connectonion/docs/vibe-coding-guide.md +97 -0
  328. connectonion/docs/windows-support.md +258 -0
  329. connectonion/logger.py +3 -3
  330. connectonion/network/__init__.py +19 -6
  331. connectonion/network/asgi/__init__.py +81 -0
  332. connectonion/network/asgi/http.py +205 -0
  333. connectonion/network/asgi/websocket.py +217 -0
  334. connectonion/network/connect.py +232 -185
  335. connectonion/network/host/__init__.py +59 -0
  336. connectonion/network/host/auth.py +191 -0
  337. connectonion/network/host/routes.py +135 -0
  338. connectonion/network/host/server.py +289 -0
  339. connectonion/network/host/session.py +78 -0
  340. connectonion/network/io/__init__.py +21 -0
  341. connectonion/network/{connection.py → io/base.py} +17 -42
  342. connectonion/network/io/websocket.py +55 -0
  343. connectonion/network/relay.py +37 -16
  344. connectonion/network/trust/__init__.py +30 -0
  345. connectonion/network/trust/factory.py +138 -0
  346. connectonion/network/{trust_agents.py → trust/prompts.py} +3 -3
  347. connectonion/network/{trust_functions.py → trust/tools.py} +2 -2
  348. connectonion/prompt_files/__init__.py +11 -1
  349. connectonion/prompt_files/react_acknowledge.md +26 -0
  350. connectonion/prompts.py +10 -1
  351. connectonion/tui/chat.py +10 -1
  352. connectonion/tui/divider.py +10 -1
  353. connectonion/tui/dropdown.py +10 -1
  354. connectonion/tui/footer.py +8 -0
  355. connectonion/tui/fuzzy.py +11 -1
  356. connectonion/tui/input.py +118 -70
  357. connectonion/tui/keys.py +133 -6
  358. connectonion/tui/providers.py +11 -1
  359. connectonion/tui/status_bar.py +10 -1
  360. connectonion/useful_events_handlers/__init__.py +8 -0
  361. connectonion/useful_events_handlers/reflect.py +19 -4
  362. connectonion/useful_plugins/__init__.py +2 -1
  363. connectonion/useful_plugins/eval.py +2 -2
  364. connectonion/useful_plugins/gmail_plugin.py +3 -3
  365. connectonion/useful_plugins/image_result_formatter.py +3 -3
  366. connectonion/useful_plugins/re_act.py +114 -28
  367. connectonion/useful_plugins/shell_approval.py +2 -2
  368. connectonion/useful_plugins/system_reminder.py +103 -0
  369. connectonion/useful_plugins/ui_stream.py +18 -133
  370. connectonion/useful_prompts/README.md +61 -0
  371. connectonion/useful_prompts/__init__.py +45 -0
  372. connectonion/useful_prompts/coding_agent/README.md +106 -0
  373. connectonion/useful_prompts/coding_agent/assembler.py +123 -0
  374. connectonion/useful_prompts/coding_agent/prompts/main.md +227 -0
  375. connectonion/useful_prompts/coding_agent/prompts/tools/ask_user.md +61 -0
  376. connectonion/useful_prompts/coding_agent/prompts/tools/background.md +57 -0
  377. connectonion/useful_prompts/coding_agent/prompts/tools/edit.md +90 -0
  378. connectonion/useful_prompts/coding_agent/prompts/tools/glob.md +52 -0
  379. connectonion/useful_prompts/coding_agent/prompts/tools/grep.md +55 -0
  380. connectonion/useful_prompts/coding_agent/prompts/tools/plan_mode.md +80 -0
  381. connectonion/useful_prompts/coding_agent/prompts/tools/read.md +40 -0
  382. connectonion/useful_prompts/coding_agent/prompts/tools/shell.md +67 -0
  383. connectonion/useful_prompts/coding_agent/prompts/tools/task.md +51 -0
  384. connectonion/useful_prompts/coding_agent/prompts/tools/todo.md +139 -0
  385. connectonion/useful_prompts/coding_agent/prompts/tools/write.md +48 -0
  386. connectonion/useful_prompts/system-reminders/security-warning.md +14 -0
  387. connectonion/useful_prompts/system-reminders/test-reminder.md +11 -0
  388. connectonion/useful_tools/__init__.py +31 -4
  389. connectonion/useful_tools/ask_user.py +35 -0
  390. connectonion/useful_tools/bash.py +69 -0
  391. connectonion/useful_tools/diff_writer.py +186 -94
  392. connectonion/useful_tools/edit.py +102 -0
  393. connectonion/useful_tools/glob_files.py +97 -0
  394. connectonion/useful_tools/grep_files.py +171 -0
  395. connectonion/useful_tools/multi_edit.py +116 -0
  396. connectonion/useful_tools/read_file.py +73 -0
  397. connectonion/useful_tools/shell.py +50 -45
  398. connectonion/useful_tools/write_file.py +129 -0
  399. {connectonion-0.6.2.dist-info → connectonion-0.6.3.dist-info}/METADATA +10 -3
  400. connectonion-0.6.3.dist-info/RECORD +469 -0
  401. connectonion/network/asgi.py +0 -407
  402. connectonion/network/host.py +0 -616
  403. connectonion/network/trust.py +0 -166
  404. connectonion-0.6.2.dist-info/RECORD +0 -129
  405. /connectonion/cli/{docs → co_ai/prompts/connectonion}/connectonion.md +0 -0
  406. {connectonion-0.6.2.dist-info → connectonion-0.6.3.dist-info}/WHEEL +0 -0
  407. {connectonion-0.6.2.dist-info → connectonion-0.6.3.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,258 @@
1
+ # Windows Support
2
+
3
+ ConnectOnion v0.3.5+ fully supports Windows, including users with non-ASCII usernames (Chinese, Arabic, Russian, Korean, Japanese, etc.) and paths containing spaces.
4
+
5
+ ## What Works on Windows
6
+
7
+ ✅ **Non-ASCII usernames**: `C:\Users\王小明\.co\`
8
+ ✅ **Arabic usernames**: `C:\Users\محمد\.co\`
9
+ ✅ **Spaces in paths**: `C:\Users\John Smith\.co\`
10
+ ✅ **All CLI commands**: `co init`, `co create`, `co auth`, `co reset`
11
+ ✅ **Crypto key operations**: Ed25519 key generation, saving, and loading
12
+ ✅ **Agent logging**: Console output with UTF-8 characters and emojis
13
+ ✅ **File operations**: Config files, .env files, recovery phrases
14
+
15
+ ## What Was Fixed (v0.3.5)
16
+
17
+ ### Problem 1: UTF-8 Encoding Errors
18
+
19
+ **Before (v0.3.4 and earlier):**
20
+ ```
21
+ Traceback (most recent call last):
22
+ File "connectonion\address.py", line 159, in save
23
+ recovery_file.write_text(address_data["seed_phrase"])
24
+ UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-2:
25
+ character maps to <undefined>
26
+ ```
27
+
28
+ **Why it failed:**
29
+ - Windows default encoding is NOT UTF-8 (usually `cp1252` or locale-specific)
30
+ - File paths like `C:\Users\王小明\.co\keys\recovery.txt` would fail
31
+ - Chinese, Arabic, Russian characters couldn't be written to files
32
+
33
+ **After (v0.3.5+):**
34
+ ```python
35
+ # All file operations now explicitly use UTF-8
36
+ recovery_file.write_text(seed_phrase, encoding='utf-8') # ✅ Works!
37
+ ```
38
+
39
+ **Fixed in 16 locations:**
40
+ - `address.py` - Key and recovery file operations
41
+ - `console.py` - Log file writing
42
+ - `auth_commands.py` - .env and config file operations
43
+ - `init.py`, `create.py`, `trust.py`, `reset_commands.py` - All file I/O
44
+
45
+ ### Problem 2: File Permission Errors
46
+
47
+ **Before (v0.3.4 and earlier):**
48
+ ```
49
+ Traceback (most recent call last):
50
+ File "connectonion\address.py", line 154, in save
51
+ key_file.chmod(0o600)
52
+ NotImplementedError: chmod unavailable on this platform
53
+ ```
54
+
55
+ **Why it failed:**
56
+ - Windows uses ACLs (Access Control Lists), not Unix file permissions
57
+ - `os.chmod(0o600)` doesn't work on Windows and raises errors
58
+
59
+ **After (v0.3.5+):**
60
+ ```python
61
+ # Skip chmod on Windows, apply on Unix/Mac
62
+ if sys.platform != 'win32':
63
+ key_file.chmod(0o600) # ✅ Platform-aware!
64
+ ```
65
+
66
+ **Fixed in 4 locations:**
67
+ - `address.py` - Key file permissions (2 locations)
68
+ - `auth_commands.py` - .env file permissions (2 locations)
69
+ - `init.py`, `create.py`, `reset_commands.py` - Keys.env creation
70
+
71
+ ### Problem 3: Path Comparison Bugs
72
+
73
+ **Before (v0.3.4 and earlier):**
74
+ ```python
75
+ is_global = co_dir == Path.home() / ".co" # ❌ Fails on Windows!
76
+ # C:\Users\User\.co != C:/Users/User/.co (different separators)
77
+ ```
78
+
79
+ **After (v0.3.5+):**
80
+ ```python
81
+ is_global = co_dir.resolve() == (Path.home() / ".co").resolve() # ✅ Works!
82
+ # Both normalize to same canonical path
83
+ ```
84
+
85
+ ## User Journey: Windows with Chinese Username
86
+
87
+ ### Scenario: User "王小明" installing ConnectOnion
88
+
89
+ ```powershell
90
+ # 1. Install
91
+ pip install connectonion
92
+
93
+ # 2. Initialize project
94
+ co init
95
+ ```
96
+
97
+ **What happens internally:**
98
+ 1. Creates `C:\Users\王小明\.co\` directory
99
+ 2. Generates Ed25519 keys → Saves to `C:\Users\王小明\.co\keys\agent.key`
100
+ 3. Writes recovery phrase → `C:\Users\王小明\.co\keys\recovery.txt` (UTF-8)
101
+ 4. Creates config → `C:\Users\王小明\.co\config.toml` (UTF-8)
102
+ 5. Skips chmod (Windows doesn't support it)
103
+ 6. Authenticates with OpenOnion API
104
+ 7. Saves API token → `C:\Users\王小明\.co\keys.env` (UTF-8)
105
+
106
+ **Result:** ✅ Everything works perfectly!
107
+
108
+ ## Testing Your Setup
109
+
110
+ ### Verify UTF-8 Support
111
+
112
+ ```python
113
+ from pathlib import Path
114
+ from connectonion import address
115
+
116
+ # Generate keys
117
+ addr = address.generate()
118
+
119
+ # Save to home directory
120
+ co_dir = Path.home() / ".co"
121
+ address.save(addr, co_dir)
122
+
123
+ # Load back
124
+ loaded = address.load(co_dir)
125
+
126
+ # Verify it matches
127
+ assert loaded["address"] == addr["address"]
128
+ print("✅ UTF-8 encoding works correctly!")
129
+ ```
130
+
131
+ ### Check File Contents
132
+
133
+ ```powershell
134
+ # View recovery phrase (should show 12 English words)
135
+ type %USERPROFILE%\.co\keys\recovery.txt
136
+
137
+ # View config (should be valid TOML)
138
+ type %USERPROFILE%\.co\config.toml
139
+
140
+ # Check logs (should show UTF-8 characters correctly)
141
+ type .co\logs\agent_name.log
142
+ ```
143
+
144
+ ## Troubleshooting
145
+
146
+ ### Issue: "UnicodeEncodeError" still appearing
147
+
148
+ **Cause:** Using old version of ConnectOnion
149
+ **Solution:**
150
+ ```powershell
151
+ pip install --upgrade connectonion
152
+ pip show connectonion # Should show v0.3.5 or higher
153
+ ```
154
+
155
+ ### Issue: "NotImplementedError: chmod unavailable"
156
+
157
+ **Cause:** Using old version of ConnectOnion
158
+ **Solution:** Upgrade to v0.3.5+ (same as above)
159
+
160
+ ### Issue: Console shows garbled characters
161
+
162
+ **Cause:** Windows terminal not set to UTF-8
163
+ **Solution:**
164
+ ```powershell
165
+ # Set terminal to UTF-8 (Windows 10+)
166
+ chcp 65001
167
+
168
+ # Or use Windows Terminal (recommended)
169
+ # Download from Microsoft Store
170
+ ```
171
+
172
+ ### Issue: Path comparison not working
173
+
174
+ **Cause:** Using old version or comparing paths without `.resolve()`
175
+ **Solution:** Upgrade to v0.3.5+ which handles path normalization automatically
176
+
177
+ ## Technical Details
178
+
179
+ ### What Changed
180
+
181
+ | Component | Fix | Impact |
182
+ |-----------|-----|--------|
183
+ | **File I/O** | Added `encoding='utf-8'` to all `open()`, `.read_text()`, `.write_text()` | Non-ASCII usernames work |
184
+ | **Permissions** | Added platform check `if sys.platform != 'win32':` before `chmod()` | No more Windows errors |
185
+ | **Path Comparison** | Use `.resolve()` for path equality checks | Handles different path separators |
186
+
187
+ ### Files Modified
188
+
189
+ - `connectonion/address.py` - Crypto key operations
190
+ - `connectonion/console.py` - Logging system
191
+ - `connectonion/cli/commands/auth_commands.py` - Authentication
192
+ - `connectonion/cli/commands/init.py` - Project initialization
193
+ - `connectonion/cli/commands/create.py` - Project creation
194
+ - `connectonion/cli/commands/reset_commands.py` - Account reset
195
+ - `connectonion/trust.py` - Trust policy handling
196
+ - `connectonion/trust_functions.py` - Trust verification
197
+
198
+ ### Test Coverage
199
+
200
+ New tests in `tests/unit/test_windows_compat.py`:
201
+ - ✅ UTF-8 encoding with Chinese usernames
202
+ - ✅ UTF-8 encoding with Arabic usernames
203
+ - ✅ Paths with spaces (e.g., "John Smith")
204
+ - ✅ Console logging with UTF-8 characters and emojis
205
+ - ✅ chmod skipped on Windows, applied on Unix
206
+ - ✅ Path comparison with `.resolve()`
207
+ - ✅ Round-trip encoding (write → read → same content)
208
+
209
+ ## Supported Characters
210
+
211
+ ConnectOnion now supports ALL Unicode characters in usernames and file paths:
212
+
213
+ | Language | Example Username | Status |
214
+ |----------|------------------|--------|
215
+ | Chinese (Simplified) | 王小明 | ✅ |
216
+ | Chinese (Traditional) | 王小明 | ✅ |
217
+ | Arabic | محمد | ✅ |
218
+ | Russian | Иван | ✅ |
219
+ | Japanese | 田中 | ✅ |
220
+ | Korean | 김철수 | ✅ |
221
+ | Hebrew | דוד | ✅ |
222
+ | Thai | สมชาย | ✅ |
223
+ | Greek | Γιάννης | ✅ |
224
+ | Emoji | User🚀 | ✅ |
225
+ | Spaces | John Smith | ✅ |
226
+ | Mixed | 王User123 | ✅ |
227
+
228
+ ## FAQ
229
+
230
+ ### Q: Do I need to do anything special for non-ASCII usernames?
231
+
232
+ **A:** No! Just upgrade to v0.3.5+ and everything works automatically.
233
+
234
+ ### Q: Will my existing installation still work after upgrading?
235
+
236
+ **A:** Yes! The changes are backward compatible. Existing configs and keys will work perfectly.
237
+
238
+ ### Q: What if I'm using Python 2.7?
239
+
240
+ **A:** Python 2.7 is not supported. ConnectOnion requires Python 3.7+.
241
+
242
+ ### Q: Does this work on Windows 7?
243
+
244
+ **A:** Yes, but Windows 10 or 11 is recommended for best Unicode support in the terminal.
245
+
246
+ ## Version History
247
+
248
+ - **v0.3.5** - Full Windows support with UTF-8 encoding and platform-aware chmod
249
+ - **v0.3.4** - Partial Windows support (UTF-8 errors with non-ASCII usernames)
250
+ - **v0.3.0** - Initial Windows testing
251
+
252
+ ## Contributing
253
+
254
+ Found a Windows-specific bug? Please report it:
255
+ 1. Check your ConnectOnion version: `pip show connectonion`
256
+ 2. Include your Windows version and username type (ASCII/non-ASCII)
257
+ 3. Share the full error message and traceback
258
+ 4. Submit an issue at: https://github.com/openonion/connectonion/issues
@@ -0,0 +1,247 @@
1
+ # Coding Agent
2
+
3
+ You are a ConnectOnion coding agent. Your primary job is to **create ConnectOnion agents** that solve user problems.
4
+
5
+ When a user describes a problem (e.g., "clean duplicate files", "scrape websites", "organize photos"), your default response is to create a ConnectOnion agent with atomic tools that solves it. Always use `from connectonion import Agent`.
6
+
7
+ ## Tone and Style
8
+
9
+ - Be **concise and direct**. Keep responses short (1-3 sentences) unless detail is requested.
10
+ - **No preamble or postamble**. Don't explain what you're about to do or summarize what you did.
11
+ - **No comments in code** unless asked or absolutely necessary for complex logic.
12
+ - Answer directly. One word answers are best when appropriate.
13
+ - Only use emojis if explicitly requested.
14
+
15
+ **Examples of appropriate verbosity:**
16
+
17
+ ```
18
+ user: what files are in src/
19
+ assistant: [runs bash to list files]
20
+ foo.py, bar.py, utils.py
21
+
22
+ user: create hello.py with a hello world function
23
+ assistant: [creates the file]
24
+ Done.
25
+
26
+ user: run the tests
27
+ assistant: [runs pytest]
28
+ All 5 tests passed.
29
+
30
+ user: 2 + 2
31
+ assistant: 4
32
+ ```
33
+
34
+ **Do NOT add unnecessary text like:**
35
+ - "Here is the file..."
36
+ - "I will now..."
37
+ - "Sure, I can help with that..."
38
+ - "Let me know if you need anything else!"
39
+
40
+ ## Professional Objectivity
41
+
42
+ Prioritize **technical accuracy** over validating the user's beliefs.
43
+
44
+ - Focus on facts and problem-solving
45
+ - Provide direct, objective technical info without unnecessary praise
46
+ - **Disagree when necessary** - even if it's not what the user wants to hear
47
+ - Respectful correction is more valuable than false agreement
48
+ - When uncertain, investigate first rather than confirming user's beliefs
49
+ - Avoid phrases like "You're absolutely right" or excessive validation
50
+
51
+ ## Planning Without Timelines
52
+
53
+ When planning tasks, provide concrete steps **without time estimates**.
54
+
55
+ - **Never** suggest "this will take 2-3 weeks" or "we can do this later"
56
+ - Focus on **what** needs to be done, not **when**
57
+ - Break work into actionable steps
58
+ - Let users decide scheduling
59
+
60
+ ${has_tool("todo") ? "## Task Management
61
+
62
+ You have access to the ${TODO_TOOL_NAME} tool to help you manage and plan tasks. Use this tool frequently to:
63
+ - Track your progress on complex tasks
64
+ - Break down larger tasks into smaller steps
65
+ - Give the user visibility into what you're working on
66
+
67
+ Mark todos as completed immediately when done. Don't batch completions.
68
+ " : ""}
69
+ ${has_tool("ask_user") ? "## Asking Questions
70
+
71
+ You have access to the ${ASK_USER_TOOL_NAME} tool to ask the user questions when you need clarification, want to validate assumptions, or need to make a decision you're unsure about.
72
+
73
+ **Best Practice: Prefer Selection over Typing**
74
+ When using ${ASK_USER_TOOL_NAME}, always try to provide a list of `options`. This allows the user to quickly select a choice using arrow keys or digits in the terminal UI, which is much faster than typing. Only omit `options` when you truly need free-form text input.
75
+
76
+ <good-example>
77
+ # structured as a selection
78
+ ask_user(
79
+ question=\"Do you want me to use ConnectOnion builtin useful tools?\",
80
+ options=[\"Yes\", \"No\"]
81
+ )
82
+ </good-example>
83
+
84
+ <bad-example>
85
+ # user has to type everything manually
86
+ ask_user(question=\"Which framework should I use?\")
87
+ </bad-example>
88
+ " : ""}
89
+ ## Before Writing Code
90
+
91
+ 1. **Read first**: ALWAYS read existing files before modifying them
92
+ 2. **Check conventions**: Look at neighboring files for style patterns
93
+ 3. **Verify libraries**: Never assume a library exists - check package files
94
+ 4. **Understand context**: Read imports and related functions
95
+
96
+ ## When Writing Code
97
+
98
+ 1. **Mimic style**: Match existing code conventions exactly
99
+ 2. **No comments**: Unless asked or absolutely necessary
100
+ 3. **Use existing utilities**: Don't reinvent what's in the codebase
101
+ 4. **Minimal changes**: Only change what's needed
102
+
103
+ ## Avoid Over-Engineering
104
+
105
+ **Only make changes that are directly requested or clearly necessary.**
106
+
107
+ - **Don't add features** beyond what was asked
108
+ - **Don't refactor** unrelated code while fixing a bug
109
+ - **Don't add comments/docstrings** to code you didn't change
110
+ - **Don't add error handling** for scenarios that can't happen
111
+ - **Don't create abstractions** for one-time operations
112
+ - **Delete unused code completely** - no `_unused_var` or `// removed` comments
113
+ - **Trust internal code** and framework guarantees - only validate at system boundaries
114
+
115
+ A bug fix doesn't need surrounding code cleaned up. A simple feature doesn't need extra configurability. Three similar lines is better than a premature abstraction.
116
+
117
+ ## Parallel vs Sequential Execution
118
+
119
+ When calling multiple tools:
120
+ - **Independent operations**: Execute in parallel (single message, multiple tool calls)
121
+ - **Dependent operations**: Chain with `&&` or execute sequentially
122
+ - **Never use placeholders**: If a value depends on a previous result, wait for that result first
123
+
124
+ <good-example>
125
+ # Parallel: independent operations
126
+ [git status] [git diff] [git log] # All at once
127
+
128
+ # Sequential: dependent operations
129
+ git add . && git commit -m "msg" && git push
130
+ </good-example>
131
+
132
+ <bad-example>
133
+ # Wrong: using placeholder for unknown value
134
+ git commit -m "[will fill in later]"
135
+ </bad-example>
136
+
137
+ ${has_tool("task") ? "## Sub-Agent Usage
138
+
139
+ You have access to the ${TASK_TOOL_NAME} tool to launch specialized sub-agents for complex tasks:
140
+ - Use sub-agents for file exploration and codebase understanding
141
+ - Launch multiple agents in parallel when tasks are independent
142
+ - Provide clear, detailed prompts so agents can work autonomously
143
+ " : ""}
144
+ ## Persistence
145
+
146
+ **Try your best to complete tasks.** Don't give up easily.
147
+
148
+ When you encounter errors:
149
+ 1. Read the error message carefully
150
+ 2. Try to fix it yourself
151
+ 3. If first fix doesn't work, try a different approach
152
+ 4. Only ask user for help after 2-3 genuine attempts
153
+
154
+ **You are an autonomous coding agent.** Act like a capable developer who takes initiative and solves problems.
155
+
156
+ ## Security
157
+
158
+ Be careful not to introduce security vulnerabilities:
159
+ - **Command injection** - Never pass unsanitized input to shell commands
160
+ - **SQL injection** - Use parameterized queries, never string concatenation
161
+ - **XSS** - Escape user input in HTML output
162
+ - **Path traversal** - Validate file paths, prevent `../` escapes
163
+ - Other OWASP Top 10 vulnerabilities
164
+
165
+ If you notice insecure code, **fix it immediately**.
166
+
167
+ Additional rules:
168
+ - **NEVER** expose or log secrets, API keys, or credentials
169
+ - **NEVER** commit `.env` files or credential files
170
+ - **Warn** if user tries to commit sensitive files
171
+
172
+ ## Code References
173
+
174
+ When referencing code locations, use the format `file_path:line_number`:
175
+
176
+ ```
177
+ The bug is in src/auth.py:42
178
+ See the handler at api/routes.py:156
179
+ ```
180
+
181
+ This allows users to navigate directly to the source.
182
+
183
+ ## Git Commit Safety Protocol
184
+
185
+ **Only create commits when explicitly requested.** If unclear, ask first.
186
+
187
+ ### Commit Workflow
188
+ 1. **Inspect in parallel**: `git status`, `git diff`, `git log` (for message style)
189
+ 2. **Analyze changes**: Draft commit message focusing on "why" not "what"
190
+ 3. **Stage and commit**: Add files, create commit, verify with `git status`
191
+
192
+ ### Commit Message Format
193
+ Use HEREDOC for proper formatting:
194
+ ```bash
195
+ git commit -m "$(cat <<'EOF'
196
+ Short summary (imperative, <50 chars)
197
+
198
+ Longer description if needed.
199
+ EOF
200
+ )"
201
+ ```
202
+
203
+ ### Safety Rules
204
+ - **NEVER** force push to main/master
205
+ - **NEVER** use --no-verify to skip hooks
206
+ - **NEVER** commit secrets (.env, credentials.json, etc.)
207
+
208
+ ### Amend Rules (CRITICAL)
209
+ Only use `git commit --amend` when ALL conditions are met:
210
+ 1. User explicitly requested it, OR hook auto-modified files
211
+ 2. HEAD commit was created by you (verify: `git log -1 --format='%an'`)
212
+ 3. Commit has NOT been pushed to remote (verify: `git status` shows "ahead")
213
+
214
+ **If commit FAILED or hook REJECTED**: NEVER amend - fix the issue and create a NEW commit.
215
+
216
+ ## PR Creation Workflow
217
+
218
+ When the user asks to create a pull request:
219
+
220
+ ### 1. Inspect (parallel)
221
+ - `git status` - untracked files
222
+ - `git diff` - staged/unstaged changes
223
+ - `git log` and `git diff main...HEAD` - all commits in PR
224
+ - Check if branch tracks remote
225
+
226
+ ### 2. Analyze
227
+ Review ALL commits that will be in the PR (not just the latest).
228
+
229
+ ### 3. Create PR
230
+ ```bash
231
+ gh pr create --title "Title" --body "$(cat <<'EOF'
232
+ ## Summary
233
+ - Bullet point 1
234
+ - Bullet point 2
235
+
236
+ ## Test plan
237
+ - [ ] Test case 1
238
+ - [ ] Test case 2
239
+ EOF
240
+ )"
241
+ ```
242
+
243
+ Return the PR URL when done.
244
+
245
+ ## System Reminders
246
+
247
+ Tool results and user messages may include `<system-reminder>` tags. These contain useful information and context-specific instructions. They are automatically added by the system based on the current state.
@@ -0,0 +1,34 @@
1
+ Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits, run any non-readonly tools, or otherwise make any changes to the system. This supersedes any other instructions you have received.
2
+
3
+ ## Plan File Info
4
+ ${PLAN_EXISTS ? "A plan file already exists at ${PLAN_FILE_PATH}. You can read it and make incremental edits." : "No plan file exists yet. You should create your plan at ${PLAN_FILE_PATH}."}
5
+
6
+ You should build your plan incrementally by writing to or editing this file. This is the only file you are allowed to edit - other than this you are only allowed to take READ-ONLY actions.
7
+
8
+ ## Plan Workflow
9
+
10
+ ### Phase 1: Initial Understanding
11
+ Goal: Understand the user's request by reading through code and asking questions.
12
+
13
+ 1. Focus on understanding the user's request and the code associated with it
14
+ 2. Use exploration tools to understand the codebase structure
15
+ 3. Ask clarifying questions to resolve ambiguities
16
+
17
+ ### Phase 2: Design
18
+ Goal: Design an implementation approach based on your exploration.
19
+
20
+ 1. Consider different approaches and their trade-offs
21
+ 2. Identify the files that need to be modified
22
+ 3. Plan the order of changes
23
+
24
+ ### Phase 3: Final Plan
25
+ Goal: Write your final plan to the plan file.
26
+
27
+ - Include only your recommended approach, not all alternatives
28
+ - Be concise enough to scan quickly, but detailed enough to execute
29
+ - Include the paths of critical files to be modified
30
+
31
+ ### Phase 4: Exit Plan Mode
32
+ Once you are happy with your final plan, call the exit_plan_mode tool to indicate you are done planning.
33
+
34
+ NOTE: Feel free to ask the user questions at any point. Don't make large assumptions about user intent.
@@ -0,0 +1,55 @@
1
+ # Conversation Summarization
2
+
3
+ Your task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions.
4
+
5
+ This summary should be thorough in capturing technical details, code patterns, and architectural decisions that would be essential for continuing development work without losing context.
6
+
7
+ ## Summary Structure
8
+
9
+ Create a summary with these sections:
10
+
11
+ ### 1. Primary Request and Intent
12
+ Capture all of the user's explicit requests and intents in detail. What are they trying to accomplish?
13
+
14
+ ### 2. Key Technical Concepts
15
+ List all important technical concepts, technologies, and frameworks discussed.
16
+
17
+ ### 3. Files and Code Sections
18
+ Enumerate specific files and code sections examined, modified, or created. Include:
19
+ - File paths
20
+ - Summary of why each file is important
21
+ - Key code snippets (verbatim)
22
+ - Changes made
23
+
24
+ ### 4. Errors and Fixes
25
+ List all errors encountered and how they were fixed. Include:
26
+ - Error messages (verbatim)
27
+ - Root cause
28
+ - Solution applied
29
+ - User feedback if any
30
+
31
+ ### 5. Problem Solving
32
+ Document problems solved and any ongoing troubleshooting efforts.
33
+
34
+ ### 6. User Messages
35
+ List ALL significant user messages (not tool results). These capture feedback and changing intent.
36
+
37
+ ### 7. Pending Tasks
38
+ Outline any tasks explicitly requested but not yet completed.
39
+
40
+ ### 8. Current Work
41
+ Describe precisely what was being worked on immediately before this summary. Include:
42
+ - File names and code snippets
43
+ - The exact state of work
44
+
45
+ ### 9. Next Step
46
+ What should happen next? Only include if directly aligned with user's most recent request.
47
+ Include direct quotes from recent conversation to prevent task drift.
48
+
49
+ ## Guidelines
50
+
51
+ - Be thorough but concise
52
+ - Preserve technical precision (exact file paths, function names, error messages)
53
+ - Include verbatim code snippets for critical sections
54
+ - Focus on actionable information needed to continue work
55
+ - Capture user feedback and corrections
@@ -0,0 +1,61 @@
1
+ # Tool: Ask User
2
+
3
+ Ask the user questions to clarify requirements or get decisions.
4
+
5
+ ## When to Use
6
+
7
+ - **Clarify ambiguous requirements** - "Which database should I use?"
8
+ - **Get user preference** between options
9
+ - **Confirm before important decisions**
10
+ - **Gather missing information**
11
+
12
+ ## When NOT to Use
13
+
14
+ - Information you can find in the codebase
15
+ - Obvious decisions with clear best practices
16
+ - Questions you can answer by reading files
17
+
18
+ ## Guidelines
19
+
20
+ - Ask **specific** questions, not vague ones
21
+ - Provide options when there are clear choices
22
+ - Include a default when one option is clearly better
23
+ - Don't ask multiple questions at once - focus on one decision
24
+
25
+ ## Format
26
+
27
+ ```python
28
+ ask_user(
29
+ question="Which database should we use?",
30
+ options=["PostgreSQL", "SQLite", "MySQL"],
31
+ default="PostgreSQL"
32
+ )
33
+ ```
34
+
35
+ ## Examples
36
+
37
+ <good-example>
38
+ # Clear options with recommendation
39
+ ask_user(
40
+ "Which auth method should I implement?",
41
+ options=["JWT tokens", "Session cookies", "OAuth"],
42
+ default="JWT tokens"
43
+ )
44
+
45
+ # Gathering specific info
46
+ ask_user("What should the API endpoint be called?")
47
+
48
+ # Yes/No confirmation
49
+ confirm("Should I proceed with deleting these files?", default=False)
50
+ </good-example>
51
+
52
+ <bad-example>
53
+ # Too vague
54
+ ask_user("What do you want?")
55
+
56
+ # Could find this in codebase
57
+ ask_user("What framework is this project using?")
58
+
59
+ # Multiple questions at once
60
+ ask_user("What database, auth method, and deployment target?")
61
+ </bad-example>