connectonion 0.6.2__py3-none-any.whl → 0.6.4__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.
- connectonion/__init__.py +46 -9
- connectonion/cli/__init__.py +11 -1
- connectonion/cli/browser_agent/__init__.py +11 -1
- connectonion/cli/browser_agent/browser.py +13 -3
- connectonion/cli/browser_agent/element_finder.py +8 -0
- connectonion/cli/browser_agent/highlight_screenshot.py +9 -1
- connectonion/cli/browser_agent/scroll.py +8 -0
- connectonion/cli/co_ai/__init__.py +6 -0
- connectonion/cli/co_ai/agent.py +87 -0
- connectonion/cli/co_ai/agents/__init__.py +5 -0
- connectonion/cli/co_ai/agents/registry.py +57 -0
- connectonion/cli/co_ai/commands/__init__.py +45 -0
- connectonion/cli/co_ai/commands/compact.py +173 -0
- connectonion/cli/co_ai/commands/cost.py +77 -0
- connectonion/cli/co_ai/commands/export.py +60 -0
- connectonion/cli/co_ai/commands/help.py +80 -0
- connectonion/cli/co_ai/commands/init.py +101 -0
- connectonion/cli/co_ai/commands/sessions.py +55 -0
- connectonion/cli/co_ai/commands/tasks.py +63 -0
- connectonion/cli/co_ai/commands/undo.py +103 -0
- connectonion/cli/co_ai/context.py +127 -0
- connectonion/cli/co_ai/main.py +52 -0
- connectonion/cli/co_ai/plugins/__init__.py +5 -0
- connectonion/cli/co_ai/plugins/system_reminder.py +154 -0
- connectonion/cli/co_ai/prompts/agents/explore.md +79 -0
- connectonion/cli/co_ai/prompts/agents/plan.md +60 -0
- connectonion/cli/co_ai/prompts/assembler.py +303 -0
- connectonion/cli/{docs/co-vibecoding-principles-docs-contexts-all-in-one.md → co_ai/prompts/connectonion/README.md} +26 -0
- connectonion/cli/co_ai/prompts/connectonion/api.md +457 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/README.md +805 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/auth.md +46 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/browser.md +235 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/copy.md +184 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/create.md +335 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/init.md +431 -0
- connectonion/cli/co_ai/prompts/connectonion/co-directory-structure.md +214 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/agent.md +1078 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/events.md +816 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/llm_do.md +256 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/max_iterations.md +362 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/models.md +641 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/plugins.md +100 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/prompts.md +122 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/tools.md +512 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/transcribe.md +156 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/trust.md +291 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/README.md +18 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/auto_debug.md +1026 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/console.md +129 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/eval-format.md +178 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/eval.md +230 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/exceptions.md +307 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/log.md +117 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/xray.md +215 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/001-choosing-input-method.md +202 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/002-choosing-llm-function-name.md +202 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/003-choosing-trust-keyword.md +141 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/004-cli-create-flow.md +117 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/005-designing-agent-network-protocol.md +503 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/006-agent-address-format.md +305 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/007-authentication-backend-design.md +240 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/008-naming-is-hard.md +228 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/009-why-connect-function.md +167 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/010-cli-ux-progressive-disclosure.md +176 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/011-global-config-identity-management.md +357 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/012-tool-execution-separation.md +259 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/013-debug-and-logging-design.md +253 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/014-hook-system-design.md +510 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/015-interactive-auto-debug-design.md +837 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/016-why-no-zero-knowledge-proofs.md +358 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/017-session-logging-and-eval-format.md +120 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/018-event-api-naming.md +274 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/019-agent-lifecycle-design.md +655 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/020-trust-system-and-network-architecture.md +503 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/021-task-storage-jsonl-design.md +496 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/022-raw-asgi-implementation.md +273 -0
- connectonion/cli/co_ai/prompts/connectonion/examples/agent_reasoning.md +62 -0
- connectonion/cli/co_ai/prompts/connectonion/examples/atomic_tools.md +24 -0
- connectonion/cli/co_ai/prompts/connectonion/examples/load_guide.md +18 -0
- connectonion/cli/co_ai/prompts/connectonion/examples.md +0 -0
- connectonion/cli/co_ai/prompts/connectonion/hook-system-options.md +364 -0
- connectonion/cli/co_ai/prompts/connectonion/index.md +162 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/README.md +12 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/auth.md +450 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/google.md +431 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/microsoft.md +370 -0
- connectonion/cli/co_ai/prompts/connectonion/network/README.md +14 -0
- connectonion/cli/co_ai/prompts/connectonion/network/connect.md +543 -0
- connectonion/cli/co_ai/prompts/connectonion/network/connection.md +538 -0
- connectonion/cli/co_ai/prompts/connectonion/network/deploy.md +123 -0
- connectonion/cli/co_ai/prompts/connectonion/network/host.md +1049 -0
- connectonion/cli/co_ai/prompts/connectonion/network/protocol/agent-relay-protocol.md +495 -0
- connectonion/cli/co_ai/prompts/connectonion/network/protocol/announce-message.md +115 -0
- connectonion/cli/co_ai/prompts/connectonion/principles.md +124 -0
- connectonion/cli/co_ai/prompts/connectonion/quickstart.md +261 -0
- connectonion/cli/co_ai/prompts/connectonion/roadmap.md +81 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/README.md +77 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/meta-agent.md +152 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/minimal.md +105 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/playwright.md +130 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/web-research.md +144 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/README.md +95 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/chat.md +181 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/divider.md +63 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/dropdown.md +83 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/footer.md +44 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/fuzzy.md +68 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/input.md +84 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/keys.md +77 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/pick.md +71 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/providers.md +89 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/status_bar.md +67 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/README.md +156 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/calendar_plugin.md +68 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/eval.md +89 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/gmail_plugin.md +68 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/image_result_formatter.md +74 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/re_act.md +86 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/shell_approval.md +69 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/README.md +81 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/diff_writer.md +138 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/get_emails.md +499 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/gmail.md +135 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/google_calendar.md +106 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/memory.md +486 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/microsoft_calendar.md +106 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/outlook.md +120 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/send_email.md +403 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/shell.md +95 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/slash_command.md +96 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/terminal.md +97 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/todo_list.md +252 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/web_fetch.md +130 -0
- connectonion/cli/co_ai/prompts/connectonion/vibe-coding-guide.md +97 -0
- connectonion/cli/co_ai/prompts/connectonion/windows-support.md +258 -0
- connectonion/cli/co_ai/prompts/main.md +247 -0
- connectonion/cli/co_ai/prompts/summarization.md +55 -0
- connectonion/cli/co_ai/prompts/system-reminders/agent.md +23 -0
- connectonion/cli/co_ai/prompts/system-reminders/plan_mode.md +13 -0
- connectonion/cli/co_ai/prompts/system-reminders/security.md +14 -0
- connectonion/cli/co_ai/prompts/system-reminders/simplicity.md +14 -0
- connectonion/cli/co_ai/prompts/tools/ask_user.md +61 -0
- connectonion/cli/co_ai/prompts/tools/background.md +57 -0
- connectonion/cli/co_ai/prompts/tools/edit.md +90 -0
- connectonion/cli/co_ai/prompts/tools/glob.md +52 -0
- connectonion/cli/co_ai/prompts/tools/grep.md +55 -0
- connectonion/cli/co_ai/prompts/tools/plan_mode.md +80 -0
- connectonion/cli/co_ai/prompts/tools/read.md +40 -0
- connectonion/cli/co_ai/prompts/tools/shell.md +67 -0
- connectonion/cli/co_ai/prompts/tools/task.md +51 -0
- connectonion/cli/co_ai/prompts/tools/todo.md +139 -0
- connectonion/cli/co_ai/prompts/tools/write.md +47 -0
- connectonion/cli/co_ai/prompts/workflow.md +89 -0
- connectonion/cli/co_ai/sessions.py +110 -0
- connectonion/cli/co_ai/skills/__init__.py +37 -0
- connectonion/cli/co_ai/skills/builtin/commit/SKILL.md +63 -0
- connectonion/cli/co_ai/skills/builtin/review-pr/SKILL.md +76 -0
- connectonion/cli/co_ai/skills/loader.py +166 -0
- connectonion/cli/co_ai/skills/tool.py +46 -0
- connectonion/cli/co_ai/tools/__init__.py +92 -0
- connectonion/cli/co_ai/tools/ask_user.py +35 -0
- connectonion/cli/co_ai/tools/background.py +201 -0
- connectonion/cli/co_ai/tools/diff_writer.py +291 -0
- connectonion/cli/co_ai/tools/edit.py +89 -0
- connectonion/cli/co_ai/tools/glob.py +84 -0
- connectonion/cli/co_ai/tools/grep.py +158 -0
- connectonion/cli/co_ai/tools/load_guide.py +23 -0
- connectonion/cli/co_ai/tools/multi_edit.py +116 -0
- connectonion/cli/co_ai/tools/plan_mode.py +169 -0
- connectonion/cli/co_ai/tools/read.py +61 -0
- connectonion/cli/co_ai/tools/task.py +59 -0
- connectonion/cli/co_ai/tools/todo_list.py +159 -0
- connectonion/cli/co_ai/tools/write.py +126 -0
- connectonion/cli/commands/__init__.py +11 -1
- connectonion/cli/commands/ai_commands.py +34 -0
- connectonion/cli/commands/copy_commands.py +55 -6
- connectonion/cli/commands/create.py +20 -17
- connectonion/cli/commands/init.py +19 -22
- connectonion/cli/commands/project_cmd_lib.py +15 -0
- connectonion/cli/main.py +11 -0
- connectonion/console.py +15 -1
- connectonion/core/__init__.py +10 -1
- connectonion/core/agent.py +37 -16
- connectonion/core/exceptions.py +74 -0
- connectonion/core/llm.py +54 -6
- connectonion/core/tool_executor.py +32 -31
- connectonion/core/tool_factory.py +47 -10
- connectonion/debug/__init__.py +10 -1
- connectonion/debug/debug_explainer/__init__.py +10 -1
- connectonion/debug/execution_analyzer/__init__.py +10 -1
- connectonion/debug/execution_analyzer/execution_analysis.py +5 -2
- connectonion/debug/runtime_inspector/__init__.py +10 -1
- connectonion/docs/.package-ignore +6 -0
- connectonion/docs/README.md +2036 -0
- connectonion/docs/api.md +457 -0
- connectonion/docs/archive/001-ai-agent-is-just-prompt-plus-function.md +249 -0
- connectonion/docs/archive/README.md +53 -0
- connectonion/docs/archive/archive/consolidation-plan.md +72 -0
- connectonion/docs/archive/archive/core-principles-extracted.md +239 -0
- connectonion/docs/archive/archive/master-principles.md +222 -0
- connectonion/docs/archive/archive/principles.md +293 -0
- connectonion/docs/archive/archive/simplicity-principles.md +221 -0
- connectonion/docs/archive/attack-defense-insights.md +410 -0
- connectonion/docs/archive/business-model.md +305 -0
- connectonion/docs/archive/core-principles-unified.md +190 -0
- connectonion/docs/archive/discussion-journey.md +178 -0
- connectonion/docs/archive/economic-analysis.md +323 -0
- connectonion/docs/archive/features/01-share-and-find.md +256 -0
- connectonion/docs/archive/features/02-agent-authentication.md +93 -0
- connectonion/docs/archive/features/03-test-before-trust.md +71 -0
- connectonion/docs/archive/features/06-reliability-and-offline.md +197 -0
- connectonion/docs/archive/features/README.md +46 -0
- connectonion/docs/archive/features-roadmap.md +247 -0
- connectonion/docs/archive/mcp-comparison-insights.md +215 -0
- connectonion/docs/archive/migration-strategy.md +571 -0
- connectonion/docs/archive/mini-whitepaper.md +293 -0
- connectonion/docs/archive/network-protocol.md +394 -0
- connectonion/docs/archive/semantic-revolution.md +367 -0
- connectonion/docs/archive/technical-architecture.md +453 -0
- connectonion/docs/archive/the-semantic-insight.md +207 -0
- connectonion/docs/archive/threat-model.md +164 -0
- connectonion/docs/cli/README.md +805 -0
- connectonion/docs/cli/auth.md +46 -0
- connectonion/docs/cli/browser.md +235 -0
- connectonion/docs/cli/copy.md +232 -0
- connectonion/docs/cli/create.md +335 -0
- connectonion/docs/cli/init.md +431 -0
- connectonion/docs/co-directory-structure.md +214 -0
- connectonion/docs/concepts/agent.md +1078 -0
- connectonion/docs/concepts/events.md +699 -0
- connectonion/docs/concepts/llm_do.md +256 -0
- connectonion/docs/concepts/max_iterations.md +362 -0
- connectonion/docs/concepts/models.md +641 -0
- connectonion/docs/concepts/plugins.md +101 -0
- connectonion/docs/concepts/prompts.md +122 -0
- connectonion/docs/concepts/session.md +428 -0
- connectonion/docs/concepts/tools.md +512 -0
- connectonion/docs/concepts/transcribe.md +156 -0
- connectonion/docs/concepts/trust.md +291 -0
- connectonion/docs/connectonion.md +1256 -0
- connectonion/docs/debug/README.md +18 -0
- connectonion/docs/debug/auto_debug.md +1026 -0
- connectonion/docs/debug/console.md +129 -0
- connectonion/docs/debug/eval-format.md +178 -0
- connectonion/docs/debug/eval.md +230 -0
- connectonion/docs/debug/exceptions.md +307 -0
- connectonion/docs/debug/log.md +117 -0
- connectonion/docs/debug/xray.md +215 -0
- connectonion/docs/design-decisions/001-choosing-input-method.md +202 -0
- connectonion/docs/design-decisions/002-choosing-llm-function-name.md +202 -0
- connectonion/docs/design-decisions/003-choosing-trust-keyword.md +141 -0
- connectonion/docs/design-decisions/004-cli-create-flow.md +117 -0
- connectonion/docs/design-decisions/005-designing-agent-network-protocol.md +503 -0
- connectonion/docs/design-decisions/006-agent-address-format.md +305 -0
- connectonion/docs/design-decisions/007-authentication-backend-design.md +240 -0
- connectonion/docs/design-decisions/008-naming-is-hard.md +228 -0
- connectonion/docs/design-decisions/009-why-connect-function.md +167 -0
- connectonion/docs/design-decisions/010-cli-ux-progressive-disclosure.md +176 -0
- connectonion/docs/design-decisions/011-global-config-identity-management.md +357 -0
- connectonion/docs/design-decisions/012-tool-execution-separation.md +259 -0
- connectonion/docs/design-decisions/013-debug-and-logging-design.md +253 -0
- connectonion/docs/design-decisions/014-hook-system-design.md +510 -0
- connectonion/docs/design-decisions/015-interactive-auto-debug-design.md +837 -0
- connectonion/docs/design-decisions/016-why-no-zero-knowledge-proofs.md +358 -0
- connectonion/docs/design-decisions/017-session-logging-and-eval-format.md +120 -0
- connectonion/docs/design-decisions/018-event-api-naming.md +274 -0
- connectonion/docs/design-decisions/019-agent-lifecycle-design.md +655 -0
- connectonion/docs/design-decisions/020-trust-system-and-network-architecture.md +503 -0
- connectonion/docs/design-decisions/021-task-storage-jsonl-design.md +496 -0
- connectonion/docs/design-decisions/022-raw-asgi-implementation.md +273 -0
- connectonion/docs/examples.md +0 -0
- connectonion/docs/hook-system-options.md +364 -0
- connectonion/docs/integrations/README.md +12 -0
- connectonion/docs/integrations/auth.md +450 -0
- connectonion/docs/integrations/google.md +431 -0
- connectonion/docs/integrations/microsoft.md +370 -0
- connectonion/docs/network/README.md +14 -0
- connectonion/docs/network/connect.md +629 -0
- connectonion/docs/network/deploy.md +124 -0
- connectonion/docs/network/host.md +1087 -0
- connectonion/docs/network/io.md +538 -0
- connectonion/docs/network/protocol/agent-relay-protocol.md +495 -0
- connectonion/docs/network/protocol/announce-message.md +115 -0
- connectonion/docs/principles.md +124 -0
- connectonion/docs/quickstart.md +261 -0
- connectonion/docs/roadmap.md +81 -0
- connectonion/docs/templates/README.md +77 -0
- connectonion/docs/templates/meta-agent.md +152 -0
- connectonion/docs/templates/minimal.md +105 -0
- connectonion/docs/templates/playwright.md +130 -0
- connectonion/docs/templates/web-research.md +144 -0
- connectonion/docs/tui/README.md +95 -0
- connectonion/docs/tui/chat.md +181 -0
- connectonion/docs/tui/divider.md +63 -0
- connectonion/docs/tui/dropdown.md +83 -0
- connectonion/docs/tui/footer.md +44 -0
- connectonion/docs/tui/fuzzy.md +68 -0
- connectonion/docs/tui/input.md +84 -0
- connectonion/docs/tui/keys.md +77 -0
- connectonion/docs/tui/pick.md +71 -0
- connectonion/docs/tui/providers.md +89 -0
- connectonion/docs/tui/status_bar.md +67 -0
- connectonion/docs/useful_plugins/README.md +160 -0
- connectonion/docs/useful_plugins/calendar_plugin.md +68 -0
- connectonion/docs/useful_plugins/eval.md +89 -0
- connectonion/docs/useful_plugins/gmail_plugin.md +68 -0
- connectonion/docs/useful_plugins/image_result_formatter.md +74 -0
- connectonion/docs/useful_plugins/re_act.md +86 -0
- connectonion/docs/useful_plugins/shell_approval.md +69 -0
- connectonion/docs/useful_plugins/system_reminder.md +210 -0
- connectonion/docs/useful_plugins/tool_approval.md +139 -0
- connectonion/docs/useful_prompts/README.md +127 -0
- connectonion/docs/useful_prompts/coding_agent.md +214 -0
- connectonion/docs/useful_tools/README.md +81 -0
- connectonion/docs/useful_tools/ask_user.md +103 -0
- connectonion/docs/useful_tools/diff_writer.md +158 -0
- connectonion/docs/useful_tools/get_emails.md +519 -0
- connectonion/docs/useful_tools/gmail.md +155 -0
- connectonion/docs/useful_tools/google_calendar.md +126 -0
- connectonion/docs/useful_tools/memory.md +506 -0
- connectonion/docs/useful_tools/microsoft_calendar.md +126 -0
- connectonion/docs/useful_tools/outlook.md +140 -0
- connectonion/docs/useful_tools/send_email.md +423 -0
- connectonion/docs/useful_tools/shell.md +115 -0
- connectonion/docs/useful_tools/slash_command.md +116 -0
- connectonion/docs/useful_tools/terminal.md +115 -0
- connectonion/docs/useful_tools/todo_list.md +272 -0
- connectonion/docs/useful_tools/web_fetch.md +150 -0
- connectonion/docs/vibe-coding-guide.md +97 -0
- connectonion/docs/windows-support.md +258 -0
- connectonion/logger.py +3 -3
- connectonion/network/__init__.py +19 -6
- connectonion/network/asgi/__init__.py +81 -0
- connectonion/network/asgi/http.py +205 -0
- connectonion/network/asgi/websocket.py +217 -0
- connectonion/network/connect.py +232 -185
- connectonion/network/host/__init__.py +59 -0
- connectonion/network/host/auth.py +191 -0
- connectonion/network/host/routes.py +135 -0
- connectonion/network/host/server.py +289 -0
- connectonion/network/host/session.py +78 -0
- connectonion/network/io/__init__.py +21 -0
- connectonion/network/{connection.py → io/base.py} +17 -42
- connectonion/network/io/websocket.py +55 -0
- connectonion/network/relay.py +37 -16
- connectonion/network/trust/__init__.py +30 -0
- connectonion/network/trust/factory.py +138 -0
- connectonion/network/{trust_agents.py → trust/prompts.py} +3 -3
- connectonion/network/{trust_functions.py → trust/tools.py} +2 -2
- connectonion/prompt_files/__init__.py +11 -1
- connectonion/prompt_files/react_acknowledge.md +26 -0
- connectonion/prompts.py +10 -1
- connectonion/tui/chat.py +10 -1
- connectonion/tui/divider.py +10 -1
- connectonion/tui/dropdown.py +10 -1
- connectonion/tui/footer.py +8 -0
- connectonion/tui/fuzzy.py +11 -1
- connectonion/tui/input.py +118 -70
- connectonion/tui/keys.py +133 -6
- connectonion/tui/providers.py +11 -1
- connectonion/tui/status_bar.py +10 -1
- connectonion/useful_events_handlers/__init__.py +8 -0
- connectonion/useful_events_handlers/reflect.py +19 -4
- connectonion/useful_plugins/__init__.py +3 -1
- connectonion/useful_plugins/eval.py +2 -2
- connectonion/useful_plugins/gmail_plugin.py +3 -3
- connectonion/useful_plugins/image_result_formatter.py +3 -3
- connectonion/useful_plugins/re_act.py +114 -28
- connectonion/useful_plugins/shell_approval.py +2 -2
- connectonion/useful_plugins/system_reminder.py +103 -0
- connectonion/useful_plugins/tool_approval.py +233 -0
- connectonion/useful_plugins/ui_stream.py +18 -133
- connectonion/useful_prompts/README.md +61 -0
- connectonion/useful_prompts/__init__.py +45 -0
- connectonion/useful_prompts/coding_agent/README.md +106 -0
- connectonion/useful_prompts/coding_agent/assembler.py +123 -0
- connectonion/useful_prompts/coding_agent/prompts/main.md +227 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/ask_user.md +61 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/background.md +57 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/edit.md +90 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/glob.md +52 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/grep.md +55 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/plan_mode.md +80 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/read.md +40 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/shell.md +67 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/task.md +51 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/todo.md +139 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/write.md +48 -0
- connectonion/useful_prompts/system-reminders/security-warning.md +14 -0
- connectonion/useful_prompts/system-reminders/test-reminder.md +11 -0
- connectonion/useful_tools/__init__.py +31 -4
- connectonion/useful_tools/ask_user.py +35 -0
- connectonion/useful_tools/bash.py +69 -0
- connectonion/useful_tools/diff_writer.py +186 -94
- connectonion/useful_tools/edit.py +102 -0
- connectonion/useful_tools/glob_files.py +97 -0
- connectonion/useful_tools/grep_files.py +171 -0
- connectonion/useful_tools/multi_edit.py +116 -0
- connectonion/useful_tools/read_file.py +73 -0
- connectonion/useful_tools/shell.py +50 -45
- connectonion/useful_tools/write_file.py +129 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.4.dist-info}/METADATA +10 -3
- connectonion-0.6.4.dist-info/RECORD +472 -0
- connectonion/network/asgi.py +0 -407
- connectonion/network/host.py +0 -616
- connectonion/network/trust.py +0 -166
- connectonion-0.6.2.dist-info/RECORD +0 -129
- /connectonion/cli/{docs → co_ai/prompts/connectonion}/connectonion.md +0 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.4.dist-info}/WHEEL +0 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.4.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Built-in Plugins
|
|
2
|
+
|
|
3
|
+
Pre-built plugins that extend agent behavior via event hooks.
|
|
4
|
+
|
|
5
|
+
## Quick Reference
|
|
6
|
+
|
|
7
|
+
| Plugin | Purpose | Import |
|
|
8
|
+
|--------|---------|--------|
|
|
9
|
+
| [re_act](re_act.md) | ReAct reasoning pattern | `from connectonion.useful_plugins import re_act` |
|
|
10
|
+
| [eval](eval.md) | Task evaluation/debugging | `from connectonion.useful_plugins import eval` |
|
|
11
|
+
| [system_reminder](system_reminder.md) | Inject contextual guidance | `from connectonion.useful_plugins import system_reminder` |
|
|
12
|
+
| [image_result_formatter](image_result_formatter.md) | Format images for vision | `from connectonion.useful_plugins import image_result_formatter` |
|
|
13
|
+
| [shell_approval](shell_approval.md) | Shell command approval | `from connectonion.useful_plugins import shell_approval` |
|
|
14
|
+
| [gmail_plugin](gmail_plugin.md) | Gmail OAuth flow | `from connectonion.useful_plugins import gmail_plugin` |
|
|
15
|
+
| [calendar_plugin](calendar_plugin.md) | Calendar OAuth flow | `from connectonion.useful_plugins import calendar_plugin` |
|
|
16
|
+
|
|
17
|
+
## Usage Pattern
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from connectonion import Agent
|
|
21
|
+
from connectonion.useful_plugins import re_act, eval
|
|
22
|
+
|
|
23
|
+
agent = Agent(
|
|
24
|
+
"assistant",
|
|
25
|
+
tools=[search],
|
|
26
|
+
plugins=[re_act, eval] # List of plugins
|
|
27
|
+
)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Customizing Plugins
|
|
31
|
+
|
|
32
|
+
Need to modify a built-in plugin? Copy it to your project:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Copy plugin source to ./plugins/
|
|
36
|
+
co copy re_act
|
|
37
|
+
|
|
38
|
+
# Copy multiple plugins
|
|
39
|
+
co copy re_act shell_approval
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Then import from your local copy:
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
# Before (from package)
|
|
46
|
+
from connectonion.useful_plugins import re_act
|
|
47
|
+
|
|
48
|
+
# After (from your copy)
|
|
49
|
+
from plugins.re_act import re_act # Customize freely!
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
See [co copy](../cli/copy.md) for full details.
|
|
53
|
+
|
|
54
|
+
## Categories
|
|
55
|
+
|
|
56
|
+
### Reasoning
|
|
57
|
+
- **re_act** - Plan before acting, reflect after tools
|
|
58
|
+
|
|
59
|
+
### Debugging
|
|
60
|
+
- **eval** - Generate expected outcomes, evaluate completion
|
|
61
|
+
|
|
62
|
+
### Guidance
|
|
63
|
+
- **system_reminder** - Inject contextual reminders into tool results
|
|
64
|
+
|
|
65
|
+
### Media
|
|
66
|
+
- **image_result_formatter** - Convert base64 images for vision models
|
|
67
|
+
|
|
68
|
+
### Security
|
|
69
|
+
- **shell_approval** - Require approval for shell commands
|
|
70
|
+
|
|
71
|
+
### OAuth
|
|
72
|
+
- **gmail_plugin** - Handle Gmail authentication flow
|
|
73
|
+
- **calendar_plugin** - Handle Calendar authentication flow
|
|
74
|
+
|
|
75
|
+
## Event Lifecycle
|
|
76
|
+
|
|
77
|
+
Understanding when events fire is key to writing plugins.
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
User Input
|
|
81
|
+
│
|
|
82
|
+
▼
|
|
83
|
+
┌─────────────────────────────────────────────────────┐
|
|
84
|
+
│ after_user_input │
|
|
85
|
+
│ (re_act: plan_task, eval: generate_expected) │
|
|
86
|
+
└─────────────────────────────────────────────────────┘
|
|
87
|
+
│
|
|
88
|
+
▼
|
|
89
|
+
┌─────────────────── ITERATION LOOP ──────────────────┐
|
|
90
|
+
│ │
|
|
91
|
+
│ before_llm → LLM Call → after_llm │
|
|
92
|
+
│ │ │
|
|
93
|
+
│ ▼ │
|
|
94
|
+
│ ┌─────────────────────┐ │
|
|
95
|
+
│ │ Tool Calls (if any) │ │
|
|
96
|
+
│ └─────────────────────┘ │
|
|
97
|
+
│ │ │
|
|
98
|
+
│ ▼ │
|
|
99
|
+
│ ┌─────────────────────────────────────────────┐ │
|
|
100
|
+
│ │ before_tools (fires ONCE before all tools) │ │
|
|
101
|
+
│ └─────────────────────────────────────────────┘ │
|
|
102
|
+
│ │ │
|
|
103
|
+
│ ▼ │
|
|
104
|
+
│ ┌─────────────────────────────────────────────┐ │
|
|
105
|
+
│ │ For EACH tool in parallel: │ │
|
|
106
|
+
│ │ before_each_tool → Execute → after_each_tool │
|
|
107
|
+
│ │ (shell_approval) (logging only!) │
|
|
108
|
+
│ └─────────────────────────────────────────────┘ │
|
|
109
|
+
│ │ │
|
|
110
|
+
│ ▼ │
|
|
111
|
+
│ ┌─────────────────────────────────────────────┐ │
|
|
112
|
+
│ │ after_tools (fires ONCE after ALL tools) │ │
|
|
113
|
+
│ │ (re_act: reflect, image_result_formatter) │ │
|
|
114
|
+
│ │ ⚠️ ONLY place safe to modify messages │ │
|
|
115
|
+
│ └─────────────────────────────────────────────┘ │
|
|
116
|
+
│ │ │
|
|
117
|
+
│ Continue or Exit Loop │
|
|
118
|
+
└─────────────────────────────────────────────────────┘
|
|
119
|
+
│
|
|
120
|
+
▼
|
|
121
|
+
┌─────────────────────────────────────────────────────┐
|
|
122
|
+
│ on_complete │
|
|
123
|
+
│ (eval: evaluate_completion) │
|
|
124
|
+
└─────────────────────────────────────────────────────┘
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Key Distinction
|
|
128
|
+
|
|
129
|
+
- **`after_each_tool`**: Fires for EACH tool individually. Use for logging, monitoring, side effects. **DO NOT modify messages here.**
|
|
130
|
+
- **`after_tools`**: Fires ONCE after ALL tools complete. **ONLY place safe to modify messages.**
|
|
131
|
+
|
|
132
|
+
### Why This Matters
|
|
133
|
+
|
|
134
|
+
LLM APIs require tool results to match tool calls exactly. If you modify messages in `after_each_tool`, you'll break the tool_call_id sequence.
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
❌ WRONG - modifying messages in after_each_tool:
|
|
138
|
+
tool_1 result → modify messages → tool_2 result → API ERROR!
|
|
139
|
+
|
|
140
|
+
✅ CORRECT - modifying messages in after_tools:
|
|
141
|
+
tool_1 result → tool_2 result → tool_3 result → after_tools → modify messages → OK
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Rule:** If your plugin modifies `agent.current_session['messages']`, use `after_tools`.
|
|
145
|
+
|
|
146
|
+
### Error You'll See If You Get This Wrong
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
BadRequestError: 400 An assistant message with 'tool_calls' must be
|
|
150
|
+
followed by tool messages responding to each 'tool_call_id'.
|
|
151
|
+
The following tool_call_ids did not have response messages: call_xxx
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
If you see this error, check if any plugin is modifying messages in `after_each_tool` - move that logic to `after_tools`.
|
|
155
|
+
|
|
156
|
+
Example: If LLM calls 3 tools in one round:
|
|
157
|
+
- `before_tools` fires 1 time
|
|
158
|
+
- `before_each_tool` fires 3 times (logging only!)
|
|
159
|
+
- `after_each_tool` fires 3 times (logging only!)
|
|
160
|
+
- `after_tools` fires 1 time (safe to modify messages)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# calendar_plugin
|
|
2
|
+
|
|
3
|
+
Approval for Google Calendar operations.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import Agent, GoogleCalendar
|
|
9
|
+
from connectonion.useful_plugins import calendar_plugin
|
|
10
|
+
|
|
11
|
+
calendar = GoogleCalendar()
|
|
12
|
+
agent = Agent("assistant", tools=[calendar], plugins=[calendar_plugin])
|
|
13
|
+
|
|
14
|
+
agent.input("Schedule a meeting tomorrow at 2pm")
|
|
15
|
+
# ┌─ Create Event ──────────────────┐
|
|
16
|
+
# │ Title: Meeting │
|
|
17
|
+
# │ Start: 2024-01-02 14:00 │
|
|
18
|
+
# │ End: 2024-01-02 15:00 │
|
|
19
|
+
# │ Attendees: alice@example.com │
|
|
20
|
+
# └─────────────────────────────────┘
|
|
21
|
+
# Proceed with create event?
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Protected Operations
|
|
25
|
+
|
|
26
|
+
Requires approval for:
|
|
27
|
+
- `create_event` - Create new events
|
|
28
|
+
- `create_meet` - Create Google Meet meetings
|
|
29
|
+
- `update_event` - Modify existing events
|
|
30
|
+
- `delete_event` - Delete events
|
|
31
|
+
|
|
32
|
+
## Approval Options
|
|
33
|
+
|
|
34
|
+
- **Yes, {action}** - Proceed once
|
|
35
|
+
- **Auto approve all calendar actions** - Auto-approve for session
|
|
36
|
+
- **No, tell agent what I want** - Provide feedback
|
|
37
|
+
|
|
38
|
+
## Events
|
|
39
|
+
|
|
40
|
+
| Handler | Event | Purpose |
|
|
41
|
+
|---------|-------|---------|
|
|
42
|
+
| `check_calendar_approval` | `before_each_tool` | Prompt approval before action |
|
|
43
|
+
|
|
44
|
+
## Session Data
|
|
45
|
+
|
|
46
|
+
- `agent.current_session['calendar_approve_all']` - Auto-approve flag
|
|
47
|
+
|
|
48
|
+
## Warnings
|
|
49
|
+
|
|
50
|
+
The plugin highlights when attendees will be notified:
|
|
51
|
+
```
|
|
52
|
+
Attendees: alice@example.com (will receive invite!)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Customizing
|
|
56
|
+
|
|
57
|
+
Need to modify calendar_plugin's behavior? Copy the source to your project:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
co copy calendar_plugin
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then import from your local copy:
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
# from connectonion.useful_plugins import calendar_plugin # Before
|
|
67
|
+
from plugins.calendar_plugin import calendar_plugin # After - customize freely!
|
|
68
|
+
```
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# eval
|
|
2
|
+
|
|
3
|
+
Debug and test AI agent prompts and tools during development.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import Agent
|
|
9
|
+
from connectonion.useful_plugins import eval
|
|
10
|
+
|
|
11
|
+
agent = Agent("assistant", tools=[search], plugins=[eval])
|
|
12
|
+
|
|
13
|
+
agent.input("Search for Python docs")
|
|
14
|
+
# ... agent executes ...
|
|
15
|
+
# /evaluating...
|
|
16
|
+
# ✓ Task completed successfully
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## How It Works
|
|
20
|
+
|
|
21
|
+
The plugin hooks into two lifecycle events:
|
|
22
|
+
|
|
23
|
+
1. **`after_user_input`**: Generates expected outcome (if not already set)
|
|
24
|
+
2. **`on_complete`**: Evaluates if task completed correctly
|
|
25
|
+
|
|
26
|
+
### Why `on_complete`?
|
|
27
|
+
|
|
28
|
+
The evaluation needs to see the **entire execution** - all iterations, all tool calls, and the final response.
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
User Input
|
|
32
|
+
↓
|
|
33
|
+
📝 Generate Expected (after_user_input)
|
|
34
|
+
↓
|
|
35
|
+
┌─────────────────── ITERATIONS ──────────────────┐
|
|
36
|
+
│ LLM → Tools → LLM → Tools → ... → Final Response│
|
|
37
|
+
└─────────────────────────────────────────────────┘
|
|
38
|
+
↓
|
|
39
|
+
✓ Evaluate (on_complete) - sees full trace + result
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The `on_complete` event fires once after the agent finishes all iterations
|
|
43
|
+
|
|
44
|
+
## Events
|
|
45
|
+
|
|
46
|
+
| Handler | Event | Purpose |
|
|
47
|
+
|---------|-------|---------|
|
|
48
|
+
| `generate_expected` | `after_user_input` | Generate expected outcome |
|
|
49
|
+
| `evaluate_completion` | `on_complete` | Evaluate actual vs expected |
|
|
50
|
+
|
|
51
|
+
## Combine with re_act
|
|
52
|
+
|
|
53
|
+
Best used with re_act for full debugging:
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
from connectonion.useful_plugins import re_act, eval
|
|
57
|
+
|
|
58
|
+
agent = Agent("assistant", tools=[search], plugins=[re_act, eval])
|
|
59
|
+
# re_act sets expected during planning
|
|
60
|
+
# eval evaluates completion against that expected
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Session Data
|
|
64
|
+
|
|
65
|
+
The plugin stores:
|
|
66
|
+
- `agent.current_session['expected']` - Expected outcome
|
|
67
|
+
- `agent.current_session['evaluation']` - Evaluation result
|
|
68
|
+
|
|
69
|
+
## When to Use
|
|
70
|
+
|
|
71
|
+
- Testing new prompts or tools
|
|
72
|
+
- Debugging agent behavior
|
|
73
|
+
- Validating task completion
|
|
74
|
+
- Development and experimentation
|
|
75
|
+
|
|
76
|
+
## Customizing
|
|
77
|
+
|
|
78
|
+
Need to modify eval's behavior? Copy the source to your project:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
co copy eval
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Then import from your local copy:
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
# from connectonion.useful_plugins import eval # Before
|
|
88
|
+
from plugins.eval import eval # After - customize freely!
|
|
89
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# gmail_plugin
|
|
2
|
+
|
|
3
|
+
Email approval and CRM sync for Gmail operations.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import Agent, Gmail
|
|
9
|
+
from connectonion.useful_plugins import gmail_plugin
|
|
10
|
+
|
|
11
|
+
gmail = Gmail()
|
|
12
|
+
agent = Agent("assistant", tools=[gmail], plugins=[gmail_plugin])
|
|
13
|
+
|
|
14
|
+
agent.input("Send email to alice@example.com")
|
|
15
|
+
# ┌─ Email to Send ─────────────────┐
|
|
16
|
+
# │ To: alice@example.com │
|
|
17
|
+
# │ Subject: Hello │
|
|
18
|
+
# │ │
|
|
19
|
+
# │ Message body... │
|
|
20
|
+
# └─────────────────────────────────┘
|
|
21
|
+
# Send this email?
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Features
|
|
25
|
+
|
|
26
|
+
1. **Email Approval** - Preview and approve before sending
|
|
27
|
+
2. **CRM Sync** - Auto-update contact's last_contact date
|
|
28
|
+
|
|
29
|
+
## Approval Options
|
|
30
|
+
|
|
31
|
+
- **Yes, send it** - Send once
|
|
32
|
+
- **Auto approve emails to '{recipient}'** - Auto-approve this recipient
|
|
33
|
+
- **Auto approve all replies this session** - Auto-approve replies
|
|
34
|
+
- **Auto approve all emails this session** - Auto-approve everything
|
|
35
|
+
|
|
36
|
+
## Events
|
|
37
|
+
|
|
38
|
+
| Handler | Event | Purpose |
|
|
39
|
+
|---------|-------|---------|
|
|
40
|
+
| `check_email_approval` | `before_each_tool` | Prompt approval before send |
|
|
41
|
+
| `sync_crm_after_send` | `after_each_tool` | Update CRM after send |
|
|
42
|
+
|
|
43
|
+
## Session Data
|
|
44
|
+
|
|
45
|
+
- `agent.current_session['gmail_approved_recipients']` - Set of approved recipients
|
|
46
|
+
- `agent.current_session['gmail_approve_replies']` - Auto-approve replies flag
|
|
47
|
+
- `agent.current_session['gmail_approve_all']` - Auto-approve all flag
|
|
48
|
+
|
|
49
|
+
## CRM Integration
|
|
50
|
+
|
|
51
|
+
After sending, the plugin auto-updates:
|
|
52
|
+
- `last_contact` → Today's date
|
|
53
|
+
- `next_contact_date` → Cleared
|
|
54
|
+
|
|
55
|
+
## Customizing
|
|
56
|
+
|
|
57
|
+
Need to modify gmail_plugin's behavior? Copy the source to your project:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
co copy gmail_plugin
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then import from your local copy:
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
# from connectonion.useful_plugins import gmail_plugin # Before
|
|
67
|
+
from plugins.gmail_plugin import gmail_plugin # After - customize freely!
|
|
68
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# image_result_formatter
|
|
2
|
+
|
|
3
|
+
Automatically formats base64 image results for vision models.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import Agent
|
|
9
|
+
from connectonion.useful_plugins import image_result_formatter
|
|
10
|
+
|
|
11
|
+
agent = Agent("assistant", tools=[take_screenshot], plugins=[image_result_formatter])
|
|
12
|
+
|
|
13
|
+
agent.input("Take a screenshot and describe what you see")
|
|
14
|
+
# 🖼️ Formatted 'take_screenshot' result as image
|
|
15
|
+
# Agent can now see and analyze the image visually
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## How It Works
|
|
19
|
+
|
|
20
|
+
When a tool returns base64 encoded image data:
|
|
21
|
+
|
|
22
|
+
1. Detects base64 image in tool result
|
|
23
|
+
2. Converts to OpenAI vision format
|
|
24
|
+
3. Allows LLM to see image visually (not as text)
|
|
25
|
+
|
|
26
|
+
## Supported Formats
|
|
27
|
+
|
|
28
|
+
- PNG
|
|
29
|
+
- JPEG/JPG
|
|
30
|
+
- WebP
|
|
31
|
+
- GIF
|
|
32
|
+
|
|
33
|
+
## Detection Patterns
|
|
34
|
+
|
|
35
|
+
The plugin detects:
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
# Data URL format
|
|
39
|
+
"data:image/png;base64,iVBORw0KGgo..."
|
|
40
|
+
|
|
41
|
+
# Plain base64 (defaults to PNG)
|
|
42
|
+
"iVBORw0KGgoAAAANSUhEUgAA..."
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Events
|
|
46
|
+
|
|
47
|
+
| Handler | Event | Purpose |
|
|
48
|
+
|---------|-------|---------|
|
|
49
|
+
| `_format_image_result` | `after_tools` | Format base64 images after all tools complete |
|
|
50
|
+
|
|
51
|
+
Uses `after_tools` because it modifies messages (see [Event Lifecycle](README.md#why-this-matters)).
|
|
52
|
+
|
|
53
|
+
## Use Cases
|
|
54
|
+
|
|
55
|
+
- Screenshot tools
|
|
56
|
+
- Image generation tools
|
|
57
|
+
- Camera/webcam capture
|
|
58
|
+
- PDF to image conversion
|
|
59
|
+
- Any tool returning visual data
|
|
60
|
+
|
|
61
|
+
## Customizing
|
|
62
|
+
|
|
63
|
+
Need to modify image_result_formatter's behavior? Copy the source to your project:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
co copy image_result_formatter
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Then import from your local copy:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
# from connectonion.useful_plugins import image_result_formatter # Before
|
|
73
|
+
from plugins.image_result_formatter import image_result_formatter # After
|
|
74
|
+
```
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# re_act
|
|
2
|
+
|
|
3
|
+
ReAct (Reason + Act) plugin - Adds planning and reflection to agents.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import Agent
|
|
9
|
+
from connectonion.useful_plugins import re_act
|
|
10
|
+
|
|
11
|
+
agent = Agent("assistant", tools=[search], plugins=[re_act])
|
|
12
|
+
|
|
13
|
+
agent.input("Search for Python tutorials")
|
|
14
|
+
# /planning...
|
|
15
|
+
# 💭 Will search for Python tutorials first.
|
|
16
|
+
# ... tool executes ...
|
|
17
|
+
# /reflecting...
|
|
18
|
+
# 🤔 Found Python basics, task complete.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## How It Works
|
|
22
|
+
|
|
23
|
+
The plugin hooks into two points in the agent lifecycle:
|
|
24
|
+
|
|
25
|
+
1. **`after_user_input`**: Plans what to do (💭)
|
|
26
|
+
2. **`after_tools`**: Reflects on results and plans next step (🤔)
|
|
27
|
+
|
|
28
|
+
### Why `after_tools`?
|
|
29
|
+
|
|
30
|
+
Each LLM call may trigger **multiple tools in parallel**. The reflection needs to see ALL tool results before deciding next steps.
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
User Input
|
|
34
|
+
↓
|
|
35
|
+
💭 Plan (after_user_input)
|
|
36
|
+
↓
|
|
37
|
+
LLM decides to call 3 tools
|
|
38
|
+
↓
|
|
39
|
+
┌─────────────────────────────────────┐
|
|
40
|
+
│ tool_1 executes ──┐ │
|
|
41
|
+
│ tool_2 executes ──┼── all complete │
|
|
42
|
+
│ tool_3 executes ──┘ │
|
|
43
|
+
└─────────────────────────────────────┘
|
|
44
|
+
↓
|
|
45
|
+
🤔 Reflect (after_tools) - sees all 3 results
|
|
46
|
+
↓
|
|
47
|
+
LLM decides next action or responds
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
If we used `after_each_tool`, reflection would fire 3 times with partial information.
|
|
51
|
+
|
|
52
|
+
## Events
|
|
53
|
+
|
|
54
|
+
| Handler | Event | Purpose |
|
|
55
|
+
|---------|-------|---------|
|
|
56
|
+
| `plan_task` | `after_user_input` | Generate initial plan |
|
|
57
|
+
| `reflect` | `after_tools` | Reflect on tool results |
|
|
58
|
+
|
|
59
|
+
## Combine with eval
|
|
60
|
+
|
|
61
|
+
For debugging, combine with the eval plugin:
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
from connectonion.useful_plugins import re_act, eval
|
|
65
|
+
|
|
66
|
+
agent = Agent("assistant", tools=[search], plugins=[re_act, eval])
|
|
67
|
+
# re_act provides plan as expected outcome
|
|
68
|
+
# eval evaluates if task completed correctly
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Customizing
|
|
72
|
+
|
|
73
|
+
Need to modify re_act's behavior? Copy the source to your project:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
co copy re_act
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Then import from your local copy:
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
# from connectonion.useful_plugins import re_act # Before
|
|
83
|
+
from plugins.re_act import re_act # After - customize freely!
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The plan is stored in `agent.current_session['expected']` and can be used by other plugins.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# shell_approval
|
|
2
|
+
|
|
3
|
+
Prompts for user approval before executing shell commands.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import Agent, Shell
|
|
9
|
+
from connectonion.useful_plugins import shell_approval
|
|
10
|
+
|
|
11
|
+
shell = Shell()
|
|
12
|
+
agent = Agent("assistant", tools=[shell], plugins=[shell_approval])
|
|
13
|
+
|
|
14
|
+
agent.input("Clean up temp files")
|
|
15
|
+
# ┌─ Shell Command ─────────────────┐
|
|
16
|
+
# │ rm -rf /tmp/test │
|
|
17
|
+
# └─────────────────────────────────┘
|
|
18
|
+
# Execute this command?
|
|
19
|
+
# ❯ Yes, execute
|
|
20
|
+
# Auto approve 'rm' in this session
|
|
21
|
+
# No, tell agent what I want
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Safe Commands (No Approval)
|
|
25
|
+
|
|
26
|
+
Read-only commands are auto-approved:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
ls, ll, cat, head, tail, less, more
|
|
30
|
+
grep, rg, find, fd, which, whereis
|
|
31
|
+
file, stat, wc, pwd, echo, date
|
|
32
|
+
whoami, id, env, uname, hostname
|
|
33
|
+
df, du, free, ps, top, tree
|
|
34
|
+
git status, git log, git diff, git show
|
|
35
|
+
npm list, pip list, python --version
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Approval Options
|
|
39
|
+
|
|
40
|
+
When prompted, you can:
|
|
41
|
+
|
|
42
|
+
1. **Yes, execute** - Run once
|
|
43
|
+
2. **Auto approve '{cmd}'** - Auto-approve this command type for session
|
|
44
|
+
3. **No, tell agent what I want** - Provide feedback
|
|
45
|
+
|
|
46
|
+
## Events
|
|
47
|
+
|
|
48
|
+
| Handler | Event | Purpose |
|
|
49
|
+
|---------|-------|---------|
|
|
50
|
+
| `_check_approval` | `before_each_tool` | Check and prompt for approval |
|
|
51
|
+
|
|
52
|
+
## Session Data
|
|
53
|
+
|
|
54
|
+
- `agent.current_session['shell_approved_cmds']` - Set of auto-approved command types
|
|
55
|
+
|
|
56
|
+
## Customizing
|
|
57
|
+
|
|
58
|
+
Need to modify shell_approval's behavior? Copy the source to your project:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
co copy shell_approval
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Then import from your local copy:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
# from connectonion.useful_plugins import shell_approval # Before
|
|
68
|
+
from plugins.shell_approval import shell_approval # After - customize freely!
|
|
69
|
+
```
|