connectonion 0.6.3__py3-none-any.whl → 0.6.5__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 (50) hide show
  1. connectonion/__init__.py +1 -1
  2. connectonion/cli/co_ai/agent.py +3 -3
  3. connectonion/cli/co_ai/main.py +2 -2
  4. connectonion/cli/co_ai/plugins/__init__.py +2 -3
  5. connectonion/cli/co_ai/plugins/system_reminder.py +154 -0
  6. connectonion/cli/co_ai/prompts/connectonion/concepts/trust.md +166 -208
  7. connectonion/cli/co_ai/prompts/system-reminders/agent.md +23 -0
  8. connectonion/cli/co_ai/prompts/system-reminders/plan_mode.md +13 -0
  9. connectonion/cli/co_ai/prompts/system-reminders/security.md +14 -0
  10. connectonion/cli/co_ai/prompts/system-reminders/simplicity.md +14 -0
  11. connectonion/cli/co_ai/tools/plan_mode.py +1 -4
  12. connectonion/cli/co_ai/tools/read.py +0 -6
  13. connectonion/cli/commands/copy_commands.py +21 -0
  14. connectonion/cli/commands/trust_commands.py +152 -0
  15. connectonion/cli/main.py +82 -0
  16. connectonion/core/llm.py +2 -2
  17. connectonion/docs/concepts/fast_rules.md +237 -0
  18. connectonion/docs/concepts/onboarding.md +465 -0
  19. connectonion/docs/concepts/plugins.md +2 -1
  20. connectonion/docs/concepts/trust.md +933 -192
  21. connectonion/docs/design-decisions/023-trust-policy-system-design.md +323 -0
  22. connectonion/docs/network/README.md +23 -1
  23. connectonion/docs/network/connect.md +135 -0
  24. connectonion/docs/network/host.md +73 -4
  25. connectonion/docs/useful_plugins/tool_approval.md +139 -0
  26. connectonion/network/__init__.py +7 -6
  27. connectonion/network/asgi/__init__.py +3 -0
  28. connectonion/network/asgi/http.py +125 -19
  29. connectonion/network/asgi/websocket.py +276 -15
  30. connectonion/network/connect.py +145 -29
  31. connectonion/network/host/auth.py +70 -67
  32. connectonion/network/host/routes.py +88 -3
  33. connectonion/network/host/server.py +100 -17
  34. connectonion/network/trust/__init__.py +27 -19
  35. connectonion/network/trust/factory.py +51 -24
  36. connectonion/network/trust/fast_rules.py +100 -0
  37. connectonion/network/trust/tools.py +316 -32
  38. connectonion/network/trust/trust_agent.py +403 -0
  39. connectonion/transcribe.py +1 -1
  40. connectonion/useful_plugins/__init__.py +2 -1
  41. connectonion/useful_plugins/tool_approval.py +233 -0
  42. {connectonion-0.6.3.dist-info → connectonion-0.6.5.dist-info}/METADATA +1 -1
  43. {connectonion-0.6.3.dist-info → connectonion-0.6.5.dist-info}/RECORD +45 -37
  44. connectonion/cli/co_ai/plugins/reminder.py +0 -76
  45. connectonion/cli/co_ai/plugins/shell_approval.py +0 -105
  46. connectonion/cli/co_ai/prompts/reminders/plan_mode.md +0 -34
  47. connectonion/cli/co_ai/reminders.py +0 -159
  48. connectonion/network/trust/prompts.py +0 -71
  49. {connectonion-0.6.3.dist-info → connectonion-0.6.5.dist-info}/WHEEL +0 -0
  50. {connectonion-0.6.3.dist-info → connectonion-0.6.5.dist-info}/entry_points.txt +0 -0
@@ -1,13 +1,13 @@
1
- connectonion/__init__.py,sha256=xlQNWUE80CDHRNIVvY3apw36sMkQoCwIyZ1ay4msG_8,3416
1
+ connectonion/__init__.py,sha256=DOO8J6IjqTVEDXwh7LljiFpzrRgJUqrD2VMJBN0hgOY,3416
2
2
  connectonion/address.py,sha256=YOzpMOej-HqJUE6o0i0fG8rB7HM-Iods36s9OD--5ig,10852
3
3
  connectonion/console.py,sha256=Gl0K0c3ZHlLkbGlBVx0Wgb5Fg8LNVci9WQhSDDdGmJg,21937
4
4
  connectonion/llm_do.py,sha256=rwgSsTreNGAq5xV3m9lbA7U5AE0XOZNdihJwW5FHz0k,12005
5
5
  connectonion/logger.py,sha256=VxdY26OGU9zdfBEDS14ypklCpD4j6vTLi8lwrxCGqQE,17647
6
6
  connectonion/prompts.py,sha256=ccpBCKWsrlx7KGTpycWz9KwTgipZvfiJ78NTr3N-VAc,6073
7
- connectonion/transcribe.py,sha256=m2qd7A2qMKFAbmbLLgvcd-yUFz8FHgjUKtvtFffnK00,7730
7
+ connectonion/transcribe.py,sha256=yA9l7Mgbt944cZl_UBmV9RPSUniQFwfoH5WREX1ktkQ,7712
8
8
  connectonion/cli/__init__.py,sha256=OC-NeIAThUPALtJLL0B3r1zKfDiWwSC3Z7xXkNOARIc,372
9
9
  connectonion/cli/docs.md,sha256=Fk_JT8jFXXDpXTvU0ZUigMW1UR6ERmX-HDheYPPRNY8,3231
10
- connectonion/cli/main.py,sha256=QEI-EfiUDdX0x4_NX4J6riG68vGAR7q2rlUf_9qb7TA,7768
10
+ connectonion/cli/main.py,sha256=ucx56aRssALVzyn8lBz-phkIwDZOdGXfDu92s2YcZaU,10494
11
11
  connectonion/cli/browser_agent/__init__.py,sha256=UQ117kmv76CLimsTjdZYVfq_uUhRELumrmuS-r6hhQk,592
12
12
  connectonion/cli/browser_agent/browser.py,sha256=bpRvta1eNKiK2tYGq_DwuFqHQXTwHuFtHEFUcuOPCdc,21564
13
13
  connectonion/cli/browser_agent/element_finder.py,sha256=cDJtIkCh-BhfWnSuBbJKmYPTVcy1rbtheGH58KD5ZBc,5550
@@ -19,10 +19,9 @@ connectonion/cli/browser_agent/prompts/form_filler.md,sha256=r4Trnln51rjKTIYGJ9S
19
19
  connectonion/cli/browser_agent/prompts/scroll_strategy.md,sha256=fbvEtMM4J9yhGXNeDdKCf4D5ZB5fA-KQrLapmul0wVU,833
20
20
  connectonion/cli/browser_agent/scripts/extract_elements.js,sha256=0YMufRSeBf6PQLxbpgVmHvlnjPVNTYqmmsuWyOZBGNc,4651
21
21
  connectonion/cli/co_ai/__init__.py,sha256=rxHdQFxV3iH9y60VhuoKu_jly02JHbdQEHAkpMZPrIM,183
22
- connectonion/cli/co_ai/agent.py,sha256=Oc8DJ4iFO9zZlFxsRX3Sp_EEAwlmaihw1QUP5grQWO4,2160
22
+ connectonion/cli/co_ai/agent.py,sha256=4xVunKfK9s61TOrn0nDpFn2_j627fRi9K_EJlLtx5Rg,2174
23
23
  connectonion/cli/co_ai/context.py,sha256=B07GMFUFqAP-_76PxJigHgj7AMkbMBX0kAObysCz5tM,3778
24
- connectonion/cli/co_ai/main.py,sha256=k9SvRrs2nFLBOWCrqjULfxWKwpcRxwiqvDkNxWEwvtA,1480
25
- connectonion/cli/co_ai/reminders.py,sha256=x5C14uFQWEP6L1T15-zzS5jVLCoIDfRJGsS2lc0Oo7Q,4898
24
+ connectonion/cli/co_ai/main.py,sha256=S8mep1dDtmVOvUPITy3Lx9_ut92ZCNmYd9zHJ1Q6Eww,1515
26
25
  connectonion/cli/co_ai/sessions.py,sha256=YbkTowHw2BpSIh2sGg0avnJLuwObkKeFZ0UXGkXpLlg,3526
27
26
  connectonion/cli/co_ai/agents/__init__.py,sha256=k9KdUsmsG80Us4_SnJ4m9Ibx0KNVQ_ly0JlNFjcX1gc,142
28
27
  connectonion/cli/co_ai/agents/registry.py,sha256=-hhgh6S9iufwKoxT-kO3mhN-wLYSlB_YJVxoK3I4598,1740
@@ -35,9 +34,8 @@ connectonion/cli/co_ai/commands/init.py,sha256=w_SoRNU8CwULlIvWkRwxNcItb9XnSWKw0
35
34
  connectonion/cli/co_ai/commands/sessions.py,sha256=4F-s86wgd_xbSshz2G4O7Kfgzz61fwv3JLmYjuJbonE,1667
36
35
  connectonion/cli/co_ai/commands/tasks.py,sha256=BoxyrFSAb4uKAiZRAu1u3f0UjepCD-Es3jSDQlENFA4,1767
37
36
  connectonion/cli/co_ai/commands/undo.py,sha256=WE_TA4Td0uSBaHZcyW_kxYI59nmpFcrrSSDVCRq8BJg,2736
38
- connectonion/cli/co_ai/plugins/__init__.py,sha256=a46RJBGocjOfrpW5oUc3_kaornkQw7IVGFDIQ3cxefE,155
39
- connectonion/cli/co_ai/plugins/reminder.py,sha256=xZvZw8hEjlC5SLvgzx4ztmKGs9IFaXSN9ojsE1Xxia0,2611
40
- connectonion/cli/co_ai/plugins/shell_approval.py,sha256=uolVMC6JCJGTcyaDq8UvQ_m-OaCCYZlagU4cckAqkW0,4097
37
+ connectonion/cli/co_ai/plugins/__init__.py,sha256=vC3R3b8JDJ9KICFlRsOPmE3XTpnvOmuz5t-XW8icMI8,101
38
+ connectonion/cli/co_ai/plugins/system_reminder.py,sha256=XSVmljS4_cOKzayOrBcv9JtNx03I40u4ZD8mw9Zj1SM,4889
41
39
  connectonion/cli/co_ai/prompts/assembler.py,sha256=ubhS2cT68z0PqdXdjlzIRVodX3o7iTvg0XCu0vHUDxM,9742
42
40
  connectonion/cli/co_ai/prompts/main.md,sha256=Dq5F32HLpFwrM8jKB53hWX_Ztw4qggRxRtFausnsZE8,8591
43
41
  connectonion/cli/co_ai/prompts/summarization.md,sha256=Qu5T8qWU7ZtLUSgJb_Ga1_vYt7on9_dp1MnFMCyg41c,1979
@@ -71,7 +69,7 @@ connectonion/cli/co_ai/prompts/connectonion/concepts/plugins.md,sha256=NHKHV6cKr
71
69
  connectonion/cli/co_ai/prompts/connectonion/concepts/prompts.md,sha256=LXiyNSniGrD0PZeEkadmzR9Fc7qVR8hj01KZCIklSyU,3191
72
70
  connectonion/cli/co_ai/prompts/connectonion/concepts/tools.md,sha256=2y8Bi31UqQHmDFf8dbhm7vYweWcPCl4ebYkicGFKJuU,14518
73
71
  connectonion/cli/co_ai/prompts/connectonion/concepts/transcribe.md,sha256=-1r2Gx5H2_3dBT5oozaCXocjdGCBlUqL2PVsoU5zT5w,3960
74
- connectonion/cli/co_ai/prompts/connectonion/concepts/trust.md,sha256=MXYXmWhvdP22eBbI6PoPoDapOsU5xB0GL7axTcGdIp0,6922
72
+ connectonion/cli/co_ai/prompts/connectonion/concepts/trust.md,sha256=HlRB6pReMWyY7MnkpDvj4GDiWVfzGopTMZdraG5HH3g,6931
75
73
  connectonion/cli/co_ai/prompts/connectonion/debug/README.md,sha256=dQvR0Csj-cyjE6c8KmYIRRJcUCVoc_0nswUTfB01q4o,549
76
74
  connectonion/cli/co_ai/prompts/connectonion/debug/auto_debug.md,sha256=MSD_T19Py0bmHzva-P1Zmfq1lRt9wUrVaM-3g4uEP0Q,26369
77
75
  connectonion/cli/co_ai/prompts/connectonion/debug/console.md,sha256=r_9D6lEE4sHGCD0Je8vF8Nqv2PefSDMrOuARp3zrAV0,4299
@@ -153,7 +151,10 @@ connectonion/cli/co_ai/prompts/connectonion/useful_tools/slash_command.md,sha256
153
151
  connectonion/cli/co_ai/prompts/connectonion/useful_tools/terminal.md,sha256=BdPz0cnsD8JkMLs5zhSPlKQbhV0vIXWbDfrxnkT12IM,1751
154
152
  connectonion/cli/co_ai/prompts/connectonion/useful_tools/todo_list.md,sha256=8qQrdtlNnGip1oocDYEGMItomOffFKHZ6xGXYDgN6-Y,5266
155
153
  connectonion/cli/co_ai/prompts/connectonion/useful_tools/web_fetch.md,sha256=uMnlsMHbUfh2M1Vnaf8aaMnveMTuatnpd92r2sn-uIo,2241
156
- connectonion/cli/co_ai/prompts/reminders/plan_mode.md,sha256=sgepJBZ_4sKlN3JeOa8VlZatjDqSDv3lNaZcgEF5k5c,1685
154
+ connectonion/cli/co_ai/prompts/system-reminders/agent.md,sha256=4Yifx5W1kuQVZ8qA3Kwpf-bwi_F-zCaf6jjMJoT1FwA,569
155
+ connectonion/cli/co_ai/prompts/system-reminders/plan_mode.md,sha256=Qh5P7LapxAw9NBYjRWtgBNgJ2sTepSErL85ruCQXiIA,310
156
+ connectonion/cli/co_ai/prompts/system-reminders/security.md,sha256=WlLWakeEUR_w9ZOVg8AiHuGX4QO-BaB45AJ06tgcPbc,420
157
+ connectonion/cli/co_ai/prompts/system-reminders/simplicity.md,sha256=kKqz_Op9A6Dh35UHHxiUdEY2En63Z-R2tNrYwLi--KY,283
157
158
  connectonion/cli/co_ai/prompts/tools/ask_user.md,sha256=H3YwaxdXy9uxxPIcTlbOp9wjl-0ZXnIRuvrTOzIKpdM,1458
158
159
  connectonion/cli/co_ai/prompts/tools/background.md,sha256=ipJFKe9NM61EvL0QoNYpzAbmRwsSrV2Q_C2puj9ZKsE,1400
159
160
  connectonion/cli/co_ai/prompts/tools/edit.md,sha256=2cxl-IID6tItdeASQxgcKtoRLVvYWNLafhfGjIFW_Rc,2500
@@ -179,8 +180,8 @@ connectonion/cli/co_ai/tools/glob.py,sha256=GrX7ozs61mkf8uG4E5Pi3w8aPP8QYrLnC5Pj
179
180
  connectonion/cli/co_ai/tools/grep.py,sha256=5VXMbFE-uY_JVAXTOevpTTzeB8oXw7XsdawM5TLqN2s,5063
180
181
  connectonion/cli/co_ai/tools/load_guide.py,sha256=tAomLc21O_UJIieRdX4L1oUTOMcZBIO4XoDyhcMe1PA,617
181
182
  connectonion/cli/co_ai/tools/multi_edit.py,sha256=BNmkWJRhuM-W4WW-c8lVFo3zbIIvoadjfeunD_nO7xY,4423
182
- connectonion/cli/co_ai/tools/plan_mode.py,sha256=pPi4k0ZjetFBu4SRiJvP0HDKEkxSaRGLX0ZJFa6hZMg,5053
183
- connectonion/cli/co_ai/tools/read.py,sha256=_iHMJS9-kS8PAEGdlE1HhG-yFzPawVf20-BAKkFYTWg,1892
183
+ connectonion/cli/co_ai/tools/plan_mode.py,sha256=enyynOtXb7hS4xZZaNuSJAMZ22oXCrH0sItFdyBp1v8,4910
184
+ connectonion/cli/co_ai/tools/read.py,sha256=-I-5i01m7fgmQBXlfhGUyW61SLszaVJpNarGU9Z2qrw,1650
184
185
  connectonion/cli/co_ai/tools/task.py,sha256=-65KJl4tdo0l-aeRIL-AXHKCKMBG9x6z2gAau-AfUHE,1817
185
186
  connectonion/cli/co_ai/tools/todo_list.py,sha256=t2uQICQELM_dDCJcD2A0basxbMYV9bnX_nDbqQlKahk,4983
186
187
  connectonion/cli/co_ai/tools/write.py,sha256=nSO-ASVZXy4acj40QZ3afVYHSYaFaL-OcqPdYQaQlbw,3577
@@ -188,7 +189,7 @@ connectonion/cli/commands/__init__.py,sha256=5q62U9-6mJfITB85ilBpM50EQCKUAeugR2N
188
189
  connectonion/cli/commands/ai_commands.py,sha256=yfQ6zJeXx11u4XlkwRC7hnJs86-a3dXkfSVQokF2lE8,1033
189
190
  connectonion/cli/commands/auth_commands.py,sha256=D76_0yd77d23bXRvsTAY6HOcGJswo9-6z2dRi9CR9sE,21635
190
191
  connectonion/cli/commands/browser_commands.py,sha256=lB4N6XwP43qdcthwQWlbFU2S3INfxhRDXznAw1PSTsQ,1803
191
- connectonion/cli/commands/copy_commands.py,sha256=yhGAqHW0kqoNcv9g_vGIYtcUfbcVyw-gAr9kxP7xxAg,6368
192
+ connectonion/cli/commands/copy_commands.py,sha256=88r6gZvdjRnwxeETpi2Tc4pnNgP5QotksE4bLThIxxU,7317
192
193
  connectonion/cli/commands/create.py,sha256=01wRtoGcAxsd1K_8DclG3BG2N-RQ8l7E8yhai_EhZ_A,21855
193
194
  connectonion/cli/commands/deploy_commands.py,sha256=l-o6XDxh5kDB0YUCb_LeVERvdUY4gUogOlNalRv1OdM,8774
194
195
  connectonion/cli/commands/doctor_commands.py,sha256=EOk8CMclvVqLq4-Dg2JghWehH9VQnthBejrhIBX66_4,7244
@@ -197,6 +198,7 @@ connectonion/cli/commands/init.py,sha256=Jn7tfCuudocV7hSeqWtqfK82mbVzmeFKsDdpYkG
197
198
  connectonion/cli/commands/project_cmd_lib.py,sha256=fUKR4hi7RLeIku7mHBug6cRwvBUpo2QwSgDGWkmhzu8,32752
198
199
  connectonion/cli/commands/reset_commands.py,sha256=FkK6tMn7QOY3X5ulTYQ7VnLfeYpStgbZ5UnnbD3zudY,7016
199
200
  connectonion/cli/commands/status_commands.py,sha256=krUZNd1pFuU8D7UdXrUskBTlpmAdjcTWBXs0s4YJOc4,6401
201
+ connectonion/cli/commands/trust_commands.py,sha256=l5mPHVpHq7tYFbpRn8PhZ7k_pRTC20o583n_vld2pEY,4414
200
202
  connectonion/cli/templates/meta-agent/README.md,sha256=qDUxlSfRPQrEzT9_tcbwL0nqWMfu3EOKYdQe00wlUDE,8659
201
203
  connectonion/cli/templates/meta-agent/agent.py,sha256=x89xmsLSwUiiqZGRBzaEOZhvxDE2T1oKzke2I0PGUpw,7349
202
204
  connectonion/cli/templates/meta-agent/prompts/answer_prompt.md,sha256=q3knwNPjDdtpzGecaDhoTYK5jMrBTOVhniEvZXjMGw4,406
@@ -214,7 +216,7 @@ connectonion/core/__init__.py,sha256=BK3MZ2INeozVFrrvwjhVg0Q17lNPubPqBpfPeEtnwIw
214
216
  connectonion/core/agent.py,sha256=TFz2QwxGG6vrgh5Y64yS3KYLpR6CU_PY856Z5_2uo28,19678
215
217
  connectonion/core/events.py,sha256=jJOMt1PhRl-ef4R8-WpAq8pUbZ8GKIl0wOB2kJUVyWg,9151
216
218
  connectonion/core/exceptions.py,sha256=1jpXxkhCZg7U-dujwcGv6UmgmVf8jOrgT3C_Td6d2dA,3088
217
- connectonion/core/llm.py,sha256=lzKpHhqh47iX-4b9GOie70-bzHLRmbpd4JkXf2HVMGg,34226
219
+ connectonion/core/llm.py,sha256=vcrpc2AfEuPEFZaeIYGhfBzeD0RHW4UGgjWOtQp5MS4,34198
218
220
  connectonion/core/tool_executor.py,sha256=wdR9jV0d68LK710-nOL8eEddzlVYKwWubRl20w1pI7Y,10751
219
221
  connectonion/core/tool_factory.py,sha256=lAZjaLUfSkD7U0O-_VKqwaR7fmzDoNK6tKKyLjz0WSo,8157
220
222
  connectonion/core/tool_registry.py,sha256=rTe8RJnWXpmHXWznP468fhWvmRknk-TlF9Iz8G9_qus,4367
@@ -237,26 +239,27 @@ connectonion/debug/runtime_inspector/__init__.py,sha256=ghHF6Q8n5EmuN5F4fIvEnVFn
237
239
  connectonion/debug/runtime_inspector/agent.py,sha256=kGXncq8AOffUQ_fuj9Sw15of6_mtsvrsYNZ5-lU74ao,2510
238
240
  connectonion/debug/runtime_inspector/runtime_inspector.py,sha256=rxFOqTxSvyKxqagYL4V2Pf-ii0Ie8l14a5xHzgIb810,15336
239
241
  connectonion/debug/runtime_inspector/prompts/debug_assistant.md,sha256=sR17NHwBY-8EgIZwK4AoTKW9D6vEDUf1Aq7i936tqco,2816
240
- connectonion/network/__init__.py,sha256=pDn5cb7E1mKN352uikFOVEH-2uMCWdrl4zZ4zb2NviM,1855
242
+ connectonion/network/__init__.py,sha256=_s8qX6zptkKOmPqCWLkc-eQKz_X0aDjapXu4Ola5FRE,1876
241
243
  connectonion/network/announce.py,sha256=roS_PIYef7g-HlXhIkUrCEtGNUDBEStqFodCU8qEy5M,3366
242
- connectonion/network/connect.py,sha256=lEXXdOqZSaqvFBUkZ8OK1VXnRV4p2WCZyTMlc_RFBcE,11419
244
+ connectonion/network/connect.py,sha256=SYpiPkWnzEIArkd7Y5fIl3uSx0n8UeTYLdHyjklWmJM,16496
243
245
  connectonion/network/relay.py,sha256=gUaO6IHPtaPpcyL3CywfuP4SQGpJYJIp1CUz6LgY5i4,7177
244
- connectonion/network/asgi/__init__.py,sha256=4h6gcJ9L5CfmFfURcHh5lqPVWMieiCLgFZELyNLo4pQ,2685
245
- connectonion/network/asgi/http.py,sha256=GgCpEPDu085XnRrxhI9119tfnnjtPg46luJccpBLcVA,8427
246
- connectonion/network/asgi/websocket.py,sha256=HcUEOY34yCDosSmKnJN7QN5oBqnDXSqQw4c5RGoIeVA,10317
246
+ connectonion/network/asgi/__init__.py,sha256=-_5ITXLJR9WKvoJkh719Sh1KBq-P3qlyXFgsjfGFPWc,2845
247
+ connectonion/network/asgi/http.py,sha256=k9NFR_TMFu_9uiMYxiue8AwexcM_dYo1OoGm_Z3WRlU,13438
248
+ connectonion/network/asgi/websocket.py,sha256=g6QvU_LHuslfjq4nqXmE4uAd4Zi1t-LO1hj7FLmPWjk,22740
247
249
  connectonion/network/host/__init__.py,sha256=MAiKrVWp2NLTsx5bwp1pjGgvNLIKuQpaIDX2qZEO_pc,1703
248
- connectonion/network/host/auth.py,sha256=wx3gb7oNTl7biHQ_MDcI0aDsieUqNdtlCggIngutEvg,7594
249
- connectonion/network/host/routes.py,sha256=Q3n7N9Tc6u3LeiQYWD0R18Qzan9X_MFbC76n_3mFj1w,5644
250
- connectonion/network/host/server.py,sha256=c9Y68RcBedxlOKba5wqhOB_vbdbghQcea1UhVqe9WiE,11382
250
+ connectonion/network/host/auth.py,sha256=OGk7KzORcfWnABqKCbuhAPY9fBWz_qubGPyHqq2ol1I,7594
251
+ connectonion/network/host/routes.py,sha256=l0hGcUe0OwVFrz1KYutDdczA7-LVtHTXeHXDBwDnDk8,9003
252
+ connectonion/network/host/server.py,sha256=Hk0Ck5TfQmcJukxsNmXPaWVvpRsy58hA6gkf9NUmPx8,14845
251
253
  connectonion/network/host/session.py,sha256=5HciX7Gx_kcS911oYJ9rIeLFv8CnovFnvDs3IwogNSU,3458
252
254
  connectonion/network/io/__init__.py,sha256=jE7-EFZW8OIJ5P8IUevQFFc7AXKRilpsFLo5hjpGOBk,817
253
255
  connectonion/network/io/base.py,sha256=US4LgB1FMBQzHB3GnUQiBXwjuBDCceFrwnaAsA7dJ9k,4398
254
256
  connectonion/network/io/websocket.py,sha256=DjkMLq7SMiO4JAORGHLMR_R2XEUP6HbGG2P3WFwCrsg,2823
255
257
  connectonion/network/static/docs.html,sha256=rSffkCAy2fA512XcMC6z1wyZH9iYeAsSP213G3l1OOk,31085
256
- connectonion/network/trust/__init__.py,sha256=EGDzH3M1wna6DPgEG1IGn00aBaNlB6IR-2kOW1VaxSk,1362
257
- connectonion/network/trust/factory.py,sha256=j5cE2YQPbjgyzJB8Uru_s6lbVGmF102HPgdoW2bgjqY,4180
258
- connectonion/network/trust/prompts.py,sha256=TD9s1qJ5pp_ZTmak1wdckeDjDb8KcuLcinHwOqNbjA4,2984
259
- connectonion/network/trust/tools.py,sha256=4Z1UiNM8bSTNfB8s8i6uQFtQKvZ0DgvtsKvXiszC0_4,3581
258
+ connectonion/network/trust/__init__.py,sha256=7Qv8JW-0nkI64Cs2bXnhDLlaYZOs5vWb0aMVTHXTDoc,1083
259
+ connectonion/network/trust/factory.py,sha256=i7z9oMG9eOVGGqZFedRAetwbv4kfdeu7lIN5f9ydZWI,5017
260
+ connectonion/network/trust/fast_rules.py,sha256=JkYdM43yeXTHQR4kzTLCksEG2nqTxk0wQj2ixteXAe8,3095
261
+ connectonion/network/trust/tools.py,sha256=fyqeF9x5Hm-3Rawv7fH74QQb-wkAEH8qNkTVozacnHI,11092
262
+ connectonion/network/trust/trust_agent.py,sha256=nmTP9a1pPFnE2Dp9wMh2X9YhHo5dWCRjgYnQTLCFHpQ,12888
260
263
  connectonion/prompt_files/__init__.py,sha256=qqcEtnI8KSpcH7u5MvjXSZsNFWPpksFBQP9t_72GSms,527
261
264
  connectonion/prompt_files/analyze_contact.md,sha256=ZTCUhO8mM1mbYswfz4zjBxlv4r0DICLoYm0YaQBpiXk,2110
262
265
  connectonion/prompt_files/eval_expected.md,sha256=ZnVmyF9S9m49UzTKCMajJhfGaxUhUkDxDm75xDYNLPs,435
@@ -277,7 +280,7 @@ connectonion/tui/providers.py,sha256=7e3PXQv6xtasSSne6PEUAz8yEG430uN9FAafioALbEo
277
280
  connectonion/tui/status_bar.py,sha256=MUJICFKp4fm2Hres2mt5dbVsw1OwssbuI-KuzwY1fZA,5479
278
281
  connectonion/useful_events_handlers/__init__.py,sha256=V2iLrD_ryP6ubIKmN3HwsU-9OI-O1y76m747u92-RWc,826
279
282
  connectonion/useful_events_handlers/reflect.py,sha256=z6BGx7JuzhG0AXc0XtJn83YG3KVxecQAwMQcSyfbRbs,4653
280
- connectonion/useful_plugins/__init__.py,sha256=PqQQ5NTnKnEa_1G1kh6xn7oBrDKHQZ8vVhl9p4k0mQQ,1419
283
+ connectonion/useful_plugins/__init__.py,sha256=8uiZ1jpNzoHjePaQQEKF4KJ1u8jLiHyN1Kik-_gyft0,1477
281
284
  connectonion/useful_plugins/calendar_plugin.py,sha256=PoQoOfLcprDDBRrt1Ykzlh2RDiOofIyL7tO-hERkYV8,6004
282
285
  connectonion/useful_plugins/eval.py,sha256=6uJn2mZZiJpMQ1e-6Nw042wdYSioFrRMHA-MZZeT388,4932
283
286
  connectonion/useful_plugins/gmail_plugin.py,sha256=94H31zWOjwAuiDMdgg5tnlu-1I9yxkM0ZU42w2YdJOI,5702
@@ -285,6 +288,7 @@ connectonion/useful_plugins/image_result_formatter.py,sha256=sYcyn3L3YvC24Mnu3Mk
285
288
  connectonion/useful_plugins/re_act.py,sha256=q1l99zGtKmK6SGxLFGeaCM3v274fXfWOHwHoXLgZKVY,5828
286
289
  connectonion/useful_plugins/shell_approval.py,sha256=ytmwXpgvjX0VLABsY7XyTpKiB_68uA2MUzS9vVwLJws,6361
287
290
  connectonion/useful_plugins/system_reminder.py,sha256=eLeOyGDyNH_TBlQblRg5CJ3XLhh0jaWrGPSD0hjZ1Ag,3338
291
+ connectonion/useful_plugins/tool_approval.py,sha256=P403MLpQBdDO7Loz3wVlXtAhVGNaj7frMB5NKOdDuyc,8334
288
292
  connectonion/useful_plugins/ui_stream.py,sha256=Jsh5URgIGBLJAmLnRne7XikRoI0x2TePt0DrhU7yYWA,2152
289
293
  connectonion/useful_prompts/README.md,sha256=jMIjzxjyu5zc1Mk8KAUvZlN9iroiznckbOn9_sLjMBo,1636
290
294
  connectonion/useful_prompts/__init__.py,sha256=ps5sON_kafzx9nt8KqLQF0QDoFSOYAhrlxFshS5zXlI,1795
@@ -372,15 +376,17 @@ connectonion/docs/cli/create.md,sha256=dtnKrGa6egzL6AbcKtQBrBDz3r_QwJ_rLqHQ4cc4r
372
376
  connectonion/docs/cli/init.md,sha256=wUr97ZhauR8PHK3bS0Tt2unJaIJBs0m1MQN4BV5aPBk,10124
373
377
  connectonion/docs/concepts/agent.md,sha256=Zk53P8WetQhb1YMdrExMKjWQrJ2J1g4gQJVEdjPLM8A,26169
374
378
  connectonion/docs/concepts/events.md,sha256=AwVddkW7ZqkFWr1ie8Z5GfSUE1xzyCF3j_Y6ZbRnzOs,20912
379
+ connectonion/docs/concepts/fast_rules.md,sha256=maBnYFPy6-3JvL1-2jhcjOGhsHWSqMhqqd_Nmio13ig,4307
375
380
  connectonion/docs/concepts/llm_do.md,sha256=1Ns_k77RAAGBRvz7Z9_5c4IsEgSUYx3_EthSewV9dvI,6759
376
381
  connectonion/docs/concepts/max_iterations.md,sha256=EUEMjQi2Lvv8Ab_maONIo3hM4_0SU1W7p22E87tN1uc,10782
377
382
  connectonion/docs/concepts/models.md,sha256=rohjOX_eT2cu1jsvQxIOpVDAvX6tinqHMCfgZCGt6zY,20113
378
- connectonion/docs/concepts/plugins.md,sha256=NHKHV6cKrujnTFv7V6Lx_5LZXiuUuoc-ncfGve73l6s,2651
383
+ connectonion/docs/concepts/onboarding.md,sha256=uzOHTSIoeas-Cg4I31k2EFcFb1edadTLmZP48TRJDAU,8532
384
+ connectonion/docs/concepts/plugins.md,sha256=13MjQF3QObY0Avn4lQg6-2ZarzBE3MN-n9Z-61Ng-zY,2784
379
385
  connectonion/docs/concepts/prompts.md,sha256=LXiyNSniGrD0PZeEkadmzR9Fc7qVR8hj01KZCIklSyU,3191
380
386
  connectonion/docs/concepts/session.md,sha256=7wPqsvm3DDNuV2yBg1LqdHe83ZCL5qR2julWc8-jCxQ,10573
381
387
  connectonion/docs/concepts/tools.md,sha256=2y8Bi31UqQHmDFf8dbhm7vYweWcPCl4ebYkicGFKJuU,14518
382
388
  connectonion/docs/concepts/transcribe.md,sha256=-1r2Gx5H2_3dBT5oozaCXocjdGCBlUqL2PVsoU5zT5w,3960
383
- connectonion/docs/concepts/trust.md,sha256=MXYXmWhvdP22eBbI6PoPoDapOsU5xB0GL7axTcGdIp0,6922
389
+ connectonion/docs/concepts/trust.md,sha256=GDfaScBG57HFJSjHHEcq0KTYW5502KrnPm2lbqUHjbw,30083
384
390
  connectonion/docs/debug/README.md,sha256=dQvR0Csj-cyjE6c8KmYIRRJcUCVoc_0nswUTfB01q4o,549
385
391
  connectonion/docs/debug/auto_debug.md,sha256=MSD_T19Py0bmHzva-P1Zmfq1lRt9wUrVaM-3g4uEP0Q,26369
386
392
  connectonion/docs/debug/console.md,sha256=r_9D6lEE4sHGCD0Je8vF8Nqv2PefSDMrOuARp3zrAV0,4299
@@ -411,14 +417,15 @@ connectonion/docs/design-decisions/019-agent-lifecycle-design.md,sha256=91nCPejY
411
417
  connectonion/docs/design-decisions/020-trust-system-and-network-architecture.md,sha256=89D2dXMI8t_df6BuiwAYCdudrRdXrLuYhnx628a2l20,17328
412
418
  connectonion/docs/design-decisions/021-task-storage-jsonl-design.md,sha256=zROasQPcOc9SyiG7Jc5f30VMpyslLhV7Vva3EHvWbFw,12822
413
419
  connectonion/docs/design-decisions/022-raw-asgi-implementation.md,sha256=Mk6q1wlJP06WroEENUSc6KfFWsykr-KRF330MJCsims,7432
420
+ connectonion/docs/design-decisions/023-trust-policy-system-design.md,sha256=GxCypScvKmJTfF2GwWRRPxDsuB99X9NIGDj_f4StyMA,12736
414
421
  connectonion/docs/integrations/README.md,sha256=B2VbNQlzfJ8pvypnQNKACrdJkBxfVJlxADq2VL7VOeI,298
415
422
  connectonion/docs/integrations/auth.md,sha256=ML9usJ1qcBeM1nUzntkcCSHW3ATZhV2nZpzwqW1Jj_0,10856
416
423
  connectonion/docs/integrations/google.md,sha256=Yv9GcmAtEQNPCmm4Png1DGE9pBt7ido5SpxF0HkQJwY,11473
417
424
  connectonion/docs/integrations/microsoft.md,sha256=tYwWmUeh68-HwD1qKpzVlps5IDkojVQyFir40H30koc,9883
418
- connectonion/docs/network/README.md,sha256=mpbqoPxet_3TR2Pxb5_OOu_jMePt0oT9a0KZMFmW5YE,525
419
- connectonion/docs/network/connect.md,sha256=EXF6qfIT_Mq_ZzwSAANkUahxp43JIo_enV6DWltri60,18546
425
+ connectonion/docs/network/README.md,sha256=-3gjVfxw_4oEEakkjqnnK9IBwoR-_MW8gi4C01GR-U8,1222
426
+ connectonion/docs/network/connect.md,sha256=vDR3ePd8t07voxKN6olGdEbEc3CVwwtDWBDimR9ZJk4,23416
420
427
  connectonion/docs/network/deploy.md,sha256=kqLhRhQoCKqx0RqoaJrTAOQ-j1DpfF8jt-8ibhCO3GU,2156
421
- connectonion/docs/network/host.md,sha256=frXU0TZLO0VWqgqXuJAqPpeqBxeVYtb_6Eqg757UZVU,28453
428
+ connectonion/docs/network/host.md,sha256=0ysQ0AStvx_aBh8LQuZe3jWw_AnSawnIK0xH5PRQjVI,30578
422
429
  connectonion/docs/network/io.md,sha256=1Opb3tZ66nxJko548JWvhVPE8_LaIEd_I4c2ONusTZE,15438
423
430
  connectonion/docs/network/protocol/agent-relay-protocol.md,sha256=ccM7H39fjQYds-mpyRp2gVRbIk0QZcLRsIk_MKgh9xE,12961
424
431
  connectonion/docs/network/protocol/announce-message.md,sha256=dNYs3cm5tVK9u82HTEfZ4dhJDozSSdl1G5JleyDoj_M,3138
@@ -446,6 +453,7 @@ connectonion/docs/useful_plugins/image_result_formatter.md,sha256=FucmJjccl9MuY5
446
453
  connectonion/docs/useful_plugins/re_act.md,sha256=QWC6kB6R2foOpLZuO0Hll4FhPDdxtM82kWYenRkuMj8,2345
447
454
  connectonion/docs/useful_plugins/shell_approval.md,sha256=OA4cZZRB8ueJQrjrLvk_4W2LBI1FP16tfJBI8DGqf8U,1776
448
455
  connectonion/docs/useful_plugins/system_reminder.md,sha256=Hm-vxTD5A2fgoodufSdmkVSDZecP-na5ylFBZAXRvCI,5509
456
+ connectonion/docs/useful_plugins/tool_approval.md,sha256=fiZbrXTH1UOXH95Yfrjc1OWJ5HNbylOiLXP-sF_6amo,3482
449
457
  connectonion/docs/useful_prompts/README.md,sha256=Wln15T2FMLCMFqXAU7g4se2lQVSQcCAV2CLrK7sJDNM,3062
450
458
  connectonion/docs/useful_prompts/coding_agent.md,sha256=1MQLjKKzRANUWE5hc5csvOgHHwLzSY_bfQRlB-w6dEE,4571
451
459
  connectonion/docs/useful_tools/README.md,sha256=v1HZRzkeXCLmNwlDIGQK6dZEXJQ2WV11U9LoLMD_5Xg,2572
@@ -463,7 +471,7 @@ connectonion/docs/useful_tools/slash_command.md,sha256=B4jTn9Bck19rVdecZCUqMSUdc
463
471
  connectonion/docs/useful_tools/terminal.md,sha256=SeAt2BNN_91dVuxIHpFbT9V_i8XPTCR4-U2UX1_05RU,2041
464
472
  connectonion/docs/useful_tools/todo_list.md,sha256=4MGHUYYamYXV_NfYi179IvmKuAdxBW14nD1g4PrLjl4,5537
465
473
  connectonion/docs/useful_tools/web_fetch.md,sha256=uri7ZjhJ8rFgy3SNolzGMlXTHGEBCIUHWlwpXKWqEDw,2516
466
- connectonion-0.6.3.dist-info/METADATA,sha256=ItPOfKQtRjL4szH6yrJRVYIhB-HTMJrbvTrdG5EtoBY,22190
467
- connectonion-0.6.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
468
- connectonion-0.6.3.dist-info/entry_points.txt,sha256=XDB-kVN7Qgy4DmYTkjQB_O6hZeUND-SqmZbdoQPn6WA,90
469
- connectonion-0.6.3.dist-info/RECORD,,
474
+ connectonion-0.6.5.dist-info/METADATA,sha256=n4XFUuDccaaE4LPK3UGOiB2aTyZ3_fj10R_Czoc9XvY,22190
475
+ connectonion-0.6.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
476
+ connectonion-0.6.5.dist-info/entry_points.txt,sha256=XDB-kVN7Qgy4DmYTkjQB_O6hZeUND-SqmZbdoQPn6WA,90
477
+ connectonion-0.6.5.dist-info/RECORD,,
@@ -1,76 +0,0 @@
1
- """
2
- Reminder plugin - injects contextual reminders into tool results.
3
-
4
- Like Claude Code's system reminders, these are appended to tool results
5
- (not separate messages) to guide agent behavior without extra API calls.
6
-
7
- Usage:
8
- from connectonion.cli.co_ai.plugins.reminder import reminder_plugin
9
-
10
- agent = Agent("coder", plugins=[reminder_plugin])
11
- """
12
-
13
- from connectonion.core.events import after_each_tool
14
- from ..reminders import REMINDERS, should_show_security_reminder
15
-
16
-
17
- def _get_reminder_for_tool(tool_name: str, args: dict, result: str) -> str | None:
18
- """Determine which reminder to inject based on tool and context."""
19
-
20
- # write_file with .py extension → remind about ConnectOnion pattern
21
- if tool_name == "write_file":
22
- path = args.get("path", "") or args.get("file_path", "")
23
- if path.endswith(".py"):
24
- return "connectonion_workflow"
25
-
26
- # read_file with sensitive path → security reminder
27
- if tool_name in ("read_file", "read"):
28
- path = args.get("path", "") or args.get("file_path", "")
29
- if should_show_security_reminder(path):
30
- return "security"
31
-
32
- # bash/shell commands that modify code
33
- if tool_name in ("bash", "shell", "run_command"):
34
- cmd = args.get("command", "") or args.get("cmd", "")
35
- # If creating/editing Python files
36
- if any(x in cmd for x in [">.py", ">> .py", "cat >", "echo >", "sed -i"]):
37
- return "connectonion_workflow"
38
-
39
- return None
40
-
41
-
42
- def inject_reminder_handler(agent):
43
- """Inject contextual reminders into tool results.
44
-
45
- This handler runs after each tool execution and modifies the
46
- tool result message to include relevant reminders.
47
- """
48
- trace = agent.current_session.get('trace', [])
49
- messages = agent.current_session.get('messages', [])
50
-
51
- if not trace or not messages:
52
- return
53
-
54
- # Get the most recent tool execution
55
- last_trace = trace[-1]
56
- if last_trace.get('type') != 'tool_result':
57
- return
58
-
59
- tool_name = last_trace.get('name', '')
60
- tool_args = last_trace.get('args', {})
61
- result = last_trace.get('result', '')
62
-
63
- # Determine which reminder to inject
64
- reminder_key = _get_reminder_for_tool(tool_name, tool_args, result)
65
- if not reminder_key or reminder_key not in REMINDERS:
66
- return
67
-
68
- # Find and modify the last tool result message
69
- for msg in reversed(messages):
70
- if msg.get('role') == 'tool':
71
- msg['content'] = msg.get('content', '') + '\n\n' + REMINDERS[reminder_key]
72
- break
73
-
74
-
75
- # Export the plugin
76
- reminder_plugin = [after_each_tool(inject_reminder_handler)]
@@ -1,105 +0,0 @@
1
- """Shell Approval plugin - Asks user approval for shell commands."""
2
-
3
- import re
4
- from typing import TYPE_CHECKING
5
- from connectonion.core.events import before_each_tool
6
-
7
- if TYPE_CHECKING:
8
- from connectonion.core.agent import Agent
9
-
10
- SAFE_PATTERNS = [
11
- r'^ls\b', r'^ll\b', r'^cat\b', r'^head\b', r'^tail\b', r'^less\b', r'^more\b',
12
- r'^grep\b', r'^rg\b', r'^find\b', r'^fd\b', r'^which\b', r'^whereis\b',
13
- r'^type\b', r'^file\b', r'^stat\b', r'^wc\b', r'^pwd\b', r'^echo\b',
14
- r'^printf\b', r'^date\b', r'^whoami\b', r'^id\b', r'^env\b', r'^printenv\b',
15
- r'^uname\b', r'^hostname\b', r'^df\b', r'^du\b', r'^free\b', r'^ps\b',
16
- r'^top\b', r'^htop\b', r'^tree\b',
17
- r'^git\s+status\b', r'^git\s+log\b', r'^git\s+diff\b', r'^git\s+show\b',
18
- r'^git\s+branch\b', r'^git\s+remote\b', r'^git\s+tag\b',
19
- r'^npm\s+list\b', r'^npm\s+ls\b', r'^pip\s+list\b', r'^pip\s+show\b',
20
- r'^python\s+--version\b', r'^node\s+--version\b', r'^cargo\s+--version\b',
21
- ]
22
-
23
-
24
- def _is_safe(command: str) -> bool:
25
- cmd = command.strip()
26
- return any(re.search(pattern, cmd) for pattern in SAFE_PATTERNS)
27
-
28
-
29
- def _check_approval(agent: 'Agent') -> None:
30
- pending = agent.current_session.get('pending_tool') if agent.current_session else None
31
- if not pending:
32
- return
33
-
34
- tool_name = pending.get('name', '')
35
- if tool_name not in ('bash', 'shell', 'run', 'run_in_dir'):
36
- return
37
-
38
- args = pending.get('arguments', {})
39
- command = args.get('command', '')
40
- base_cmd = command.strip().split()[0] if command.strip() else ''
41
-
42
- approved_cmds = agent.current_session.get('shell_approved_cmds', set()) if agent.current_session else set()
43
- if base_cmd in approved_cmds:
44
- return
45
-
46
- if _is_safe(command):
47
- return
48
-
49
- from connectonion.cli.co_ai.tui.context import is_tui_active, show_choice_selector_sync, show_modal_sync
50
-
51
- if is_tui_active():
52
- from connectonion.cli.co_ai.tui.modals import TextInputModal
53
-
54
- truncated = command[:60] + "..." if len(command) > 60 else command
55
- question = f"Execute: `{truncated}`"
56
- options = [
57
- "Yes, execute",
58
- f"Auto approve '{base_cmd}' for this session",
59
- "No, tell agent what I want",
60
- ]
61
-
62
- choice = show_choice_selector_sync(question, options, allow_other=False)
63
-
64
- if choice == options[0]:
65
- return
66
- elif choice == options[1]:
67
- if agent.current_session is not None:
68
- if 'shell_approved_cmds' not in agent.current_session:
69
- agent.current_session['shell_approved_cmds'] = set()
70
- agent.current_session['shell_approved_cmds'].add(base_cmd)
71
- return
72
- else:
73
- feedback = show_modal_sync(TextInputModal("What do you want instead?"))
74
- raise ValueError(f"User feedback: {feedback}")
75
- else:
76
- from rich.console import Console
77
- from rich.panel import Panel
78
- from rich.syntax import Syntax
79
- from connectonion.tui import pick
80
-
81
- console = Console()
82
- console.print()
83
- syntax = Syntax(command, "bash", theme="monokai", word_wrap=True)
84
- console.print(Panel(syntax, title="[yellow]Shell Command[/yellow]", border_style="yellow"))
85
-
86
- choice = pick("Execute this command?", [
87
- "Yes, execute",
88
- f"Auto approve '{base_cmd}' in this session",
89
- "No, tell agent what I want"
90
- ], console=console)
91
-
92
- if choice == "Yes, execute":
93
- return
94
- elif choice.startswith("Auto approve"):
95
- if agent.current_session is not None:
96
- if 'shell_approved_cmds' not in agent.current_session:
97
- agent.current_session['shell_approved_cmds'] = set()
98
- agent.current_session['shell_approved_cmds'].add(base_cmd)
99
- return
100
- else:
101
- feedback = input("What do you want the agent to do instead? ")
102
- raise ValueError(f"User feedback: {feedback}")
103
-
104
-
105
- shell_approval = [before_each_tool(_check_approval)]
@@ -1,34 +0,0 @@
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.
@@ -1,159 +0,0 @@
1
- """System reminders for contextual guidance.
2
-
3
- System reminders are automatically injected into tool results or conversation
4
- to provide contextual constraints and guidance. They override default behavior
5
- when applicable.
6
-
7
- Usage:
8
- from connectonion.cli.co_ai.reminders import inject_reminder, REMINDERS
9
-
10
- # Inject a specific reminder
11
- result = inject_reminder(tool_result, "plan_mode_active")
12
-
13
- # Check if reminder should be shown
14
- if should_show_todo_reminder(agent):
15
- result = inject_reminder(result, "todo_reminder")
16
- """
17
-
18
- from typing import Optional, Dict, Any
19
- from functools import wraps
20
-
21
-
22
- # System reminder templates
23
- REMINDERS: Dict[str, str] = {
24
- # Plan mode reminder - injected when plan mode is active
25
- "plan_mode_active": """<system-reminder>
26
- Plan mode is active. You are in READ-ONLY exploration mode.
27
- - You can ONLY use: glob, grep, read_file to explore
28
- - You can ONLY write to the plan file (.co/PLAN.md)
29
- - Do NOT make any code changes until plan is approved
30
- - Use write_plan() to update your plan
31
- - Use exit_plan_mode() when plan is complete
32
- </system-reminder>""",
33
-
34
- # Todo reminder - gentle nudge to use todo tracking
35
- "todo_reminder": """<system-reminder>
36
- Consider using todo_list() to track progress for multi-step tasks.
37
- Mark tasks complete immediately when finished.
38
- </system-reminder>""",
39
-
40
- # Read-only mode for explore agent
41
- "read_only": """<system-reminder>
42
- This is READ-ONLY mode. You are PROHIBITED from modifying any files.
43
- Only use: glob, grep, read_file, and read-only bash commands.
44
- </system-reminder>""",
45
-
46
- # Security reminder after reading sensitive files
47
- "security": """<system-reminder>
48
- This file may contain sensitive information (credentials, keys, tokens).
49
- - Never expose secrets in output
50
- - Never commit this file if it contains real credentials
51
- - Consider using environment variables instead
52
- </system-reminder>""",
53
-
54
- # Anti-over-engineering reminder
55
- "simplicity": """<system-reminder>
56
- Keep it simple:
57
- - Only change what's directly needed
58
- - Don't add error handling for scenarios that can't happen
59
- - Three similar lines > premature abstraction
60
- - If unused, delete completely
61
- </system-reminder>""",
62
-
63
- # Workflow reminder - injected when writing Python files
64
- "connectonion_workflow": """<system-reminder>
65
- When creating agents, ALWAYS use ConnectOnion framework:
66
- - `from connectonion import Agent`
67
- - Atomic tool functions (one thing each)
68
- - `agent = Agent("name", tools=[...])` + `agent.input("task")`
69
-
70
- NEVER create standalone scripts with argparse. NEVER skip ask_user confirmation.
71
- </system-reminder>""",
72
-
73
- # After code write reminder
74
- "after_write_code": """<system-reminder>
75
- Code written. If this is an agent:
76
- - Verify it uses `from connectonion import Agent`
77
- - Verify tools are atomic functions
78
- - If it's a standalone script with argparse, REWRITE using ConnectOnion
79
- </system-reminder>""",
80
- }
81
-
82
-
83
- def inject_reminder(content: str, reminder_key: str) -> str:
84
- """
85
- Inject a system reminder into content.
86
-
87
- Args:
88
- content: The original content (tool result, message, etc.)
89
- reminder_key: Key from REMINDERS dict
90
-
91
- Returns:
92
- Content with reminder injected at the end
93
- """
94
- if reminder_key not in REMINDERS:
95
- return content
96
-
97
- reminder = REMINDERS[reminder_key]
98
- return f"{content}\n\n{reminder}"
99
-
100
-
101
- def with_reminder(reminder_key: str):
102
- """
103
- Decorator to inject a reminder into tool results.
104
-
105
- Usage:
106
- @with_reminder("plan_mode_active")
107
- def some_tool(...):
108
- return result
109
- """
110
- def decorator(func):
111
- @wraps(func)
112
- def wrapper(*args, **kwargs):
113
- result = func(*args, **kwargs)
114
- if isinstance(result, str):
115
- return inject_reminder(result, reminder_key)
116
- return result
117
- return wrapper
118
- return decorator
119
-
120
-
121
- def should_show_security_reminder(file_path: str) -> bool:
122
- """Check if file path suggests sensitive content."""
123
- sensitive_patterns = [
124
- ".env",
125
- "credentials",
126
- "secrets",
127
- "config/prod",
128
- "keys",
129
- "password",
130
- "token",
131
- ".pem",
132
- ".key",
133
- ]
134
- path_lower = file_path.lower()
135
- return any(pattern in path_lower for pattern in sensitive_patterns)
136
-
137
-
138
- def get_contextual_reminders(context: Dict[str, Any]) -> list:
139
- """
140
- Get list of reminders based on current context.
141
-
142
- Args:
143
- context: Dict with current state info:
144
- - plan_mode: bool
145
- - todo_count: int
146
- - file_path: str (for security check)
147
-
148
- Returns:
149
- List of reminder keys that should be shown
150
- """
151
- reminders = []
152
-
153
- if context.get("plan_mode"):
154
- reminders.append("plan_mode_active")
155
-
156
- if context.get("file_path") and should_show_security_reminder(context["file_path"]):
157
- reminders.append("security")
158
-
159
- return reminders