connectonion 0.6.1__py3-none-any.whl → 0.6.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +95 -142
- connectonion/cli/browser_agent/element_finder.py +147 -0
- connectonion/cli/browser_agent/highlight_screenshot.py +182 -0
- connectonion/cli/browser_agent/prompt.md +188 -105
- connectonion/cli/browser_agent/prompts/element_matcher.md +59 -0
- connectonion/cli/browser_agent/prompts/form_filler.md +19 -0
- connectonion/cli/browser_agent/prompts/scroll_strategy.md +36 -0
- connectonion/cli/browser_agent/scripts/extract_elements.js +126 -0
- connectonion/cli/browser_agent/scroll.py +145 -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 +6 -0
- connectonion/cli/co_ai/plugins/reminder.py +76 -0
- connectonion/cli/co_ai/plugins/shell_approval.py +105 -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/reminders/plan_mode.md +34 -0
- connectonion/cli/co_ai/prompts/summarization.md +55 -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/reminders.py +159 -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 +172 -0
- connectonion/cli/co_ai/tools/read.py +67 -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 +100 -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_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 +2 -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/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.1.dist-info → connectonion-0.6.3.dist-info}/METADATA +10 -3
- connectonion-0.6.3.dist-info/RECORD +469 -0
- connectonion/cli/browser_agent/scroll_strategies.py +0 -276
- connectonion/network/asgi.py +0 -407
- connectonion/network/host.py +0 -616
- connectonion/network/trust.py +0 -166
- connectonion-0.6.1.dist-info/RECORD +0 -123
- /connectonion/cli/{docs → co_ai/prompts/connectonion}/connectonion.md +0 -0
- {connectonion-0.6.1.dist-info → connectonion-0.6.3.dist-info}/WHEEL +0 -0
- {connectonion-0.6.1.dist-info → connectonion-0.6.3.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# MicrosoftCalendar
|
|
2
|
+
|
|
3
|
+
Microsoft Calendar integration via Microsoft Graph API.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import Agent, MicrosoftCalendar
|
|
9
|
+
|
|
10
|
+
calendar = MicrosoftCalendar()
|
|
11
|
+
agent = Agent("assistant", tools=[calendar])
|
|
12
|
+
|
|
13
|
+
agent.input("What meetings do I have today?")
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Setup
|
|
17
|
+
|
|
18
|
+
Requires Microsoft OAuth authorization:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
co auth microsoft
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Methods
|
|
25
|
+
|
|
26
|
+
### Reading Events
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
# List upcoming events
|
|
30
|
+
calendar.list_events(days_ahead=7, max_results=10)
|
|
31
|
+
|
|
32
|
+
# Get today's events
|
|
33
|
+
calendar.get_today_events()
|
|
34
|
+
|
|
35
|
+
# Get specific event
|
|
36
|
+
calendar.get_event(event_id="abc123")
|
|
37
|
+
|
|
38
|
+
# Get upcoming meetings
|
|
39
|
+
calendar.get_upcoming_meetings(days_ahead=7)
|
|
40
|
+
|
|
41
|
+
# Find free slots
|
|
42
|
+
calendar.find_free_slots(date="2024-01-15", duration_minutes=30)
|
|
43
|
+
|
|
44
|
+
# Check availability
|
|
45
|
+
calendar.check_availability(datetime_str="2024-01-15 14:00")
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Creating Events
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
# Create event
|
|
52
|
+
calendar.create_event(
|
|
53
|
+
title="Team Meeting",
|
|
54
|
+
start_time="2024-01-15 14:00",
|
|
55
|
+
end_time="2024-01-15 15:00",
|
|
56
|
+
description="Weekly sync",
|
|
57
|
+
attendees="alice@example.com,bob@example.com",
|
|
58
|
+
location="Conference Room A"
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
# Create Teams meeting
|
|
62
|
+
calendar.create_teams_meeting(
|
|
63
|
+
title="Video Call",
|
|
64
|
+
start_time="2024-01-15 14:00",
|
|
65
|
+
end_time="2024-01-15 15:00",
|
|
66
|
+
attendees="alice@example.com",
|
|
67
|
+
description="Quick sync"
|
|
68
|
+
)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Managing Events
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
# Update event
|
|
75
|
+
calendar.update_event(
|
|
76
|
+
event_id="abc123",
|
|
77
|
+
title="Updated Title",
|
|
78
|
+
start_time="2024-01-15 15:00"
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
# Delete event
|
|
82
|
+
calendar.delete_event(event_id="abc123")
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## vs GoogleCalendar
|
|
86
|
+
|
|
87
|
+
| Feature | MicrosoftCalendar | GoogleCalendar |
|
|
88
|
+
|---------|------------------|----------------|
|
|
89
|
+
| Video calls | Teams | Google Meet |
|
|
90
|
+
| Auth | `co auth microsoft` | `co auth google` |
|
|
91
|
+
| API | Microsoft Graph | Google Calendar API |
|
|
92
|
+
|
|
93
|
+
## Customizing
|
|
94
|
+
|
|
95
|
+
Need to modify MicrosoftCalendar's behavior? Copy the source to your project:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
co copy microsoft_calendar
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Then import from your local copy:
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
# from connectonion import MicrosoftCalendar # Before
|
|
105
|
+
from tools.microsoft_calendar import MicrosoftCalendar # After - customize freely!
|
|
106
|
+
```
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Outlook
|
|
2
|
+
|
|
3
|
+
Give your agents Outlook access via Microsoft Graph API.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import Agent, Outlook
|
|
9
|
+
|
|
10
|
+
outlook = Outlook()
|
|
11
|
+
agent = Agent("assistant", tools=[outlook])
|
|
12
|
+
|
|
13
|
+
agent.input("Show me my recent emails")
|
|
14
|
+
agent.input("Send an email to alice@example.com saying hello")
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Setup
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
co auth microsoft
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Your agent can now read and manage Outlook emails.
|
|
24
|
+
|
|
25
|
+
**Switch accounts?** Run `co auth microsoft` again to connect a different Microsoft account.
|
|
26
|
+
|
|
27
|
+
## Agent Methods
|
|
28
|
+
|
|
29
|
+
### Reading
|
|
30
|
+
|
|
31
|
+
**`read_inbox(last=10, unread=False)`**
|
|
32
|
+
- Read emails from inbox
|
|
33
|
+
- `last`: Number of emails (default: 10)
|
|
34
|
+
- `unread`: Only unread emails (default: False)
|
|
35
|
+
|
|
36
|
+
**`get_sent_emails(max_results=10)`**
|
|
37
|
+
- Get emails you sent
|
|
38
|
+
|
|
39
|
+
**`get_email_body(email_id)`**
|
|
40
|
+
- Get full email content with headers
|
|
41
|
+
|
|
42
|
+
### Search
|
|
43
|
+
|
|
44
|
+
**`search_emails(query, max_results=10)`**
|
|
45
|
+
- Search using Microsoft Graph search
|
|
46
|
+
- Examples: `"quarterly report"`, `"meeting notes"`, `"invoice"`
|
|
47
|
+
|
|
48
|
+
### Sending
|
|
49
|
+
|
|
50
|
+
**`send(to, subject, body, cc=None, bcc=None)`**
|
|
51
|
+
- Send email via Microsoft Graph API
|
|
52
|
+
- `to`: Recipient email (comma-separated for multiple)
|
|
53
|
+
- `subject`: Email subject
|
|
54
|
+
- `body`: Email body (plain text)
|
|
55
|
+
- `cc`: Optional CC recipients
|
|
56
|
+
- `bcc`: Optional BCC recipients
|
|
57
|
+
|
|
58
|
+
**`reply(email_id, body)`**
|
|
59
|
+
- Reply to an existing email
|
|
60
|
+
|
|
61
|
+
### Actions
|
|
62
|
+
|
|
63
|
+
**`mark_read(email_id)`**
|
|
64
|
+
- Mark email as read
|
|
65
|
+
|
|
66
|
+
**`mark_unread(email_id)`**
|
|
67
|
+
- Mark email as unread
|
|
68
|
+
|
|
69
|
+
**`archive_email(email_id)`**
|
|
70
|
+
- Move email to archive folder
|
|
71
|
+
|
|
72
|
+
### Stats
|
|
73
|
+
|
|
74
|
+
**`count_unread()`**
|
|
75
|
+
- Count unread emails in inbox
|
|
76
|
+
|
|
77
|
+
**`get_my_email()`**
|
|
78
|
+
- Get connected Microsoft email address
|
|
79
|
+
|
|
80
|
+
## Example
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
from connectonion import Agent, Outlook, Memory
|
|
84
|
+
|
|
85
|
+
outlook = Outlook()
|
|
86
|
+
memory = Memory()
|
|
87
|
+
|
|
88
|
+
agent = Agent(
|
|
89
|
+
name="email-assistant",
|
|
90
|
+
tools=[outlook, memory],
|
|
91
|
+
system_prompt="You help manage Outlook emails and remember important info."
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
agent.input("Check unread emails and save important deadlines to memory")
|
|
95
|
+
agent.input("Send an email to alice@example.com about the project update")
|
|
96
|
+
agent.input("Find all emails about the quarterly report")
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Customizing
|
|
100
|
+
|
|
101
|
+
Need to modify Outlook's behavior? Copy the source to your project:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
co copy outlook
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Then import from your local copy:
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
# from connectonion import Outlook # Before
|
|
111
|
+
from tools.outlook import Outlook # After - customize freely!
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Troubleshooting
|
|
115
|
+
|
|
116
|
+
**Missing Microsoft Mail scopes**: Run `co auth microsoft`
|
|
117
|
+
|
|
118
|
+
**Credentials not found**: Run `co auth microsoft`
|
|
119
|
+
|
|
120
|
+
**Token expired**: Tokens auto-refresh. If issues persist, run `co auth microsoft` again.
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
# Send Email
|
|
2
|
+
|
|
3
|
+
> Send emails with one line of code. No config, no complexity.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 📌 Current Status (as of Sep 2025)
|
|
8
|
+
|
|
9
|
+
✅ **Working**: Email sending via `mail.openonion.ai` domain
|
|
10
|
+
✅ **API Endpoint**: `https://oo.openonion.ai/api/v1/email/send`
|
|
11
|
+
✅ **Sender**: Your agent's unique email `0x{your_key}@mail.openonion.ai`
|
|
12
|
+
✅ **JWT Tokens**: No expiration - authenticate once and use forever
|
|
13
|
+
|
|
14
|
+
## ⚡ Quick Debug
|
|
15
|
+
|
|
16
|
+
**Email not working? Try this:**
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# 1. Check if email is activated
|
|
20
|
+
cat .co/config.toml | grep email_active
|
|
21
|
+
# If false, run: co auth
|
|
22
|
+
|
|
23
|
+
# 2. Test directly
|
|
24
|
+
python -c "from connectonion import send_email; print(send_email('your@email.com', 'Test', 'It works!'))"
|
|
25
|
+
|
|
26
|
+
# 3. Common fixes
|
|
27
|
+
co auth # Refresh token if expired
|
|
28
|
+
co init # If missing .co directory
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Quick Start (30 seconds to first email)
|
|
34
|
+
|
|
35
|
+
**One line. That's it.**
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from connectonion import send_email
|
|
39
|
+
|
|
40
|
+
send_email("alice@example.com", "Welcome!", "Thanks for joining us!")
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Run it**
|
|
44
|
+
|
|
45
|
+
```pycon
|
|
46
|
+
>>> send_email("alice@example.com", "Welcome!", "Thanks for joining us!")
|
|
47
|
+
{'success': True, 'message_id': 'msg_123', 'from': '0x1234abcd@mail.openonion.ai'}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Email sent. Done.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Core Concept
|
|
55
|
+
|
|
56
|
+
What you get:
|
|
57
|
+
|
|
58
|
+
- Simple function: `send_email(to, subject, message)`
|
|
59
|
+
- No API keys to manage (already configured)
|
|
60
|
+
- Your own email address for every agent
|
|
61
|
+
- Professional delivery with good reputation
|
|
62
|
+
|
|
63
|
+
### The function
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
def send_email(to: str, subject: str, message: str) -> dict:
|
|
67
|
+
"""Send an email. Returns success/failure."""
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Three parameters. Nothing else.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Examples
|
|
75
|
+
|
|
76
|
+
### Basic notification
|
|
77
|
+
|
|
78
|
+
```pycon
|
|
79
|
+
>>> send_email("user@example.com", "Order shipped", "Track it: ABC123")
|
|
80
|
+
{'success': True, 'message_id': 'msg_124'}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Verification code
|
|
84
|
+
|
|
85
|
+
```pycon
|
|
86
|
+
>>> send_email("bob@example.com", "Your code: 456789", "Verify your account")
|
|
87
|
+
{'success': True, 'message_id': 'msg_125'}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Status update
|
|
91
|
+
|
|
92
|
+
```pycon
|
|
93
|
+
>>> send_email("team@example.com", "Build passed", "All tests green ✅")
|
|
94
|
+
{'success': True, 'message_id': 'msg_126'}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### HTML content (automatic)
|
|
98
|
+
|
|
99
|
+
```pycon
|
|
100
|
+
>>> send_email(
|
|
101
|
+
... "alice@example.com",
|
|
102
|
+
... "Weekly Report",
|
|
103
|
+
... "<h1>Progress</h1><p>3 features shipped!</p>"
|
|
104
|
+
... )
|
|
105
|
+
{'success': True, 'message_id': 'msg_127'}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Your Email Address
|
|
111
|
+
|
|
112
|
+
Every agent automatically gets an email address:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
0x1234abcd@mail.openonion.ai
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
- Based on your public key (first 10 characters)
|
|
119
|
+
- Professional domain with good reputation
|
|
120
|
+
- Generated during `co init` or `co create`
|
|
121
|
+
- **Activated after authentication with `co auth`**
|
|
122
|
+
|
|
123
|
+
### Check your email address
|
|
124
|
+
|
|
125
|
+
Your email address is configured when you run `co create` or `co init` and stored in `.co/config.toml`:
|
|
126
|
+
|
|
127
|
+
```toml
|
|
128
|
+
[agent]
|
|
129
|
+
address = "0x04e1c4ae3c57d716383153479dae869e51e86d43d88db8dfa22fba7533f3968d"
|
|
130
|
+
short_address = "0x04e1c4ae"
|
|
131
|
+
email = "0x04e1c4ae@mail.openonion.ai"
|
|
132
|
+
email_active = false # Becomes true after 'co auth'
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Access it from your agent:
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
>>> agent.email_addr
|
|
139
|
+
'0x04e1c4ae@mail.openonion.ai'
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Email Activation Lifecycle
|
|
143
|
+
|
|
144
|
+
1. **Generated** - Email address created during `co init` or `co create`
|
|
145
|
+
2. **Activation Prompt** - You'll be asked "Would you like to activate your agent's email now?"
|
|
146
|
+
3. **Active** - Email is fully functional after authentication
|
|
147
|
+
|
|
148
|
+
#### Two ways to activate:
|
|
149
|
+
|
|
150
|
+
**Option 1: Immediate activation** (recommended)
|
|
151
|
+
```bash
|
|
152
|
+
$ co init
|
|
153
|
+
...
|
|
154
|
+
📧 Agent email: 0x1234abcd@mail.openonion.ai (inactive)
|
|
155
|
+
|
|
156
|
+
💌 Your agent can send emails!
|
|
157
|
+
Would you like to activate your agent's email now? [Y/n]: y
|
|
158
|
+
✨ Email activated! Your agent can now send emails.
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Option 2: Activate later**
|
|
162
|
+
```bash
|
|
163
|
+
$ co auth # Run this anytime to activate
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
To check your email status:
|
|
167
|
+
```bash
|
|
168
|
+
$ cat .co/config.toml | grep email
|
|
169
|
+
email = "0x04e1c4ae@mail.openonion.ai"
|
|
170
|
+
email_active = true # true = active, false = inactive
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Want a custom name?
|
|
174
|
+
|
|
175
|
+
Upgrade to a custom email for $0.99:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
mybot@mail.openonion.ai
|
|
179
|
+
ai-assistant@mail.openonion.ai
|
|
180
|
+
support@mail.openonion.ai
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Return Values
|
|
186
|
+
|
|
187
|
+
### Success
|
|
188
|
+
|
|
189
|
+
```python
|
|
190
|
+
{
|
|
191
|
+
'success': True,
|
|
192
|
+
'message_id': 'msg_123',
|
|
193
|
+
'from': '0x1234abcd@mail.openonion.ai' # Your agent's email
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Failure
|
|
198
|
+
|
|
199
|
+
```python
|
|
200
|
+
{
|
|
201
|
+
'success': False,
|
|
202
|
+
'error': 'Rate limit exceeded'
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Common errors:
|
|
207
|
+
- `"Rate limit exceeded"` - Hit your quota
|
|
208
|
+
- `"Invalid email address"` - Check the recipient
|
|
209
|
+
- `"Authentication failed"` - Token expired, run `co auth`
|
|
210
|
+
- `"Email not activated"` - Run `co auth` to activate
|
|
211
|
+
- `"Not in a ConnectOnion project"` - Run `co init` first
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Using with an Agent
|
|
216
|
+
|
|
217
|
+
Give your agent the ability to send emails:
|
|
218
|
+
|
|
219
|
+
```python
|
|
220
|
+
from connectonion import Agent, send_email
|
|
221
|
+
|
|
222
|
+
# Create an agent with email capability
|
|
223
|
+
agent = Agent(
|
|
224
|
+
"customer_support",
|
|
225
|
+
tools=[send_email],
|
|
226
|
+
instructions="You help users and send them email confirmations"
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
# The agent can now send emails autonomously
|
|
230
|
+
response = agent("Send a welcome email to alice@example.com")
|
|
231
|
+
# Agent sends: send_email("alice@example.com", "Welcome!", "Thanks for joining...")
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Real-world agent example
|
|
235
|
+
|
|
236
|
+
```python
|
|
237
|
+
from connectonion import Agent, send_email
|
|
238
|
+
import time
|
|
239
|
+
|
|
240
|
+
def check_system_status() -> dict:
|
|
241
|
+
"""Check if the system is running properly."""
|
|
242
|
+
cpu_usage = 95 # Simulated high CPU
|
|
243
|
+
return {"status": "warning", "cpu": cpu_usage}
|
|
244
|
+
|
|
245
|
+
# Create monitoring agent
|
|
246
|
+
monitor = Agent(
|
|
247
|
+
"system_monitor",
|
|
248
|
+
tools=[check_system_status, send_email],
|
|
249
|
+
instructions="Monitor system health and alert admin@example.com if issues"
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
# Agent checks system and sends alerts
|
|
253
|
+
monitor("Check the system and alert if there are problems")
|
|
254
|
+
# Agent will:
|
|
255
|
+
# 1. Call check_system_status()
|
|
256
|
+
# 2. See high CPU (95%)
|
|
257
|
+
# 3. Call send_email("admin@example.com", "Alert: High CPU", "CPU at 95%...")
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
## Complete Example
|
|
261
|
+
|
|
262
|
+
Here's a real-world example sending different types of emails:
|
|
263
|
+
|
|
264
|
+
```python
|
|
265
|
+
from connectonion import send_email
|
|
266
|
+
|
|
267
|
+
# Welcome email
|
|
268
|
+
result = send_email(
|
|
269
|
+
"new_user@example.com",
|
|
270
|
+
"Welcome to our platform!",
|
|
271
|
+
"We're excited to have you. Check out our docs to get started."
|
|
272
|
+
)
|
|
273
|
+
print(f"Welcome email: {result['success']}")
|
|
274
|
+
|
|
275
|
+
# Alert notification
|
|
276
|
+
result = send_email(
|
|
277
|
+
"admin@example.com",
|
|
278
|
+
"🚨 High CPU usage detected",
|
|
279
|
+
"Server CPU at 95% for the last 5 minutes"
|
|
280
|
+
)
|
|
281
|
+
print(f"Alert sent: {result['success']}")
|
|
282
|
+
|
|
283
|
+
# Daily report
|
|
284
|
+
result = send_email(
|
|
285
|
+
"team@example.com",
|
|
286
|
+
"Daily Summary",
|
|
287
|
+
"""
|
|
288
|
+
<h2>Today's Metrics</h2>
|
|
289
|
+
<ul>
|
|
290
|
+
<li>Users: 1,234</li>
|
|
291
|
+
<li>Revenue: $5,678</li>
|
|
292
|
+
<li>Uptime: 99.9%</li>
|
|
293
|
+
</ul>
|
|
294
|
+
"""
|
|
295
|
+
)
|
|
296
|
+
print(f"Report sent: {result['success']}")
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## The Details
|
|
302
|
+
|
|
303
|
+
### Quotas
|
|
304
|
+
|
|
305
|
+
- **Free tier**: 100 emails/month
|
|
306
|
+
- **Plus tier**: 10,000 emails/month ($29.90/mo)
|
|
307
|
+
- **Pro tier**: 50,000 emails/month ($200/mo)
|
|
308
|
+
|
|
309
|
+
Check your remaining quota:
|
|
310
|
+
```python
|
|
311
|
+
from connectonion import get_agent_info
|
|
312
|
+
info = get_agent_info()
|
|
313
|
+
print(f"Email quota: {info.get('email_quota_remaining', 'Unknown')} remaining")
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Rate Limiting
|
|
317
|
+
|
|
318
|
+
Automatic rate limiting prevents abuse:
|
|
319
|
+
- Returns `{'success': False, 'error': 'Rate limit exceeded'}`
|
|
320
|
+
- Resets monthly
|
|
321
|
+
- No configuration needed
|
|
322
|
+
|
|
323
|
+
### Content Types
|
|
324
|
+
|
|
325
|
+
- **Plain text**: Just send a string
|
|
326
|
+
- **HTML**: Include HTML tags, automatically detected
|
|
327
|
+
- **Mixed**: HTML with plain text fallback
|
|
328
|
+
|
|
329
|
+
### From Address
|
|
330
|
+
|
|
331
|
+
- **Free tier**: `0x{your_key_prefix}@mail.openonion.ai` (your unique address!)
|
|
332
|
+
- **With custom name**: `yourname@mail.openonion.ai` ($0.99 one-time)
|
|
333
|
+
- **Verified domain**: `mail.openonion.ai` (SPF/DKIM configured)
|
|
334
|
+
|
|
335
|
+
**How it works**:
|
|
336
|
+
- Your agent's email is the first 10 characters of your public key
|
|
337
|
+
- Example: `0x6fdb2d9e@mail.openonion.ai` (clean format, no name labels)
|
|
338
|
+
- This is YOUR unique sender address - recipients see emails coming directly from YOUR agent
|
|
339
|
+
- Each agent has their own unique email address based on their key
|
|
340
|
+
|
|
341
|
+
### Behind the Scenes
|
|
342
|
+
|
|
343
|
+
- Email address configured during `co create` or `co init`
|
|
344
|
+
- Stored in `.co/config.toml` for your project
|
|
345
|
+
- Uses Resend API for delivery via `mail.openonion.ai` domain
|
|
346
|
+
- Automatic retry on temporary failures
|
|
347
|
+
- Logs all emails for debugging
|
|
348
|
+
- SPF/DKIM configured for deliverability
|
|
349
|
+
|
|
350
|
+
### Troubleshooting
|
|
351
|
+
|
|
352
|
+
#### Email not sending?
|
|
353
|
+
|
|
354
|
+
1. **Check activation status**:
|
|
355
|
+
```bash
|
|
356
|
+
cat .co/config.toml | grep email_active
|
|
357
|
+
# Should show: email_active = true
|
|
358
|
+
```
|
|
359
|
+
If false, run `co auth` to activate.
|
|
360
|
+
|
|
361
|
+
2. **Check for errors**:
|
|
362
|
+
```python
|
|
363
|
+
result = send_email("test@example.com", "Test", "Testing")
|
|
364
|
+
if not result['success']:
|
|
365
|
+
print(f"Error: {result['error']}")
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
3. **Common fixes**:
|
|
369
|
+
- `co auth` - Refresh authentication token
|
|
370
|
+
- `co init` - Initialize project if missing `.co` directory
|
|
371
|
+
- Check internet connection
|
|
372
|
+
|
|
373
|
+
4. **Test directly**:
|
|
374
|
+
```python
|
|
375
|
+
from connectonion import send_email
|
|
376
|
+
result = send_email("your-email@example.com", "Test", "If you get this, it works!")
|
|
377
|
+
print(result)
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
#### Debug mode
|
|
381
|
+
|
|
382
|
+
See what's happening under the hood:
|
|
383
|
+
|
|
384
|
+
```python
|
|
385
|
+
import os
|
|
386
|
+
os.environ['CONNECTONION_DEBUG'] = '1'
|
|
387
|
+
|
|
388
|
+
from connectonion import send_email
|
|
389
|
+
result = send_email("test@example.com", "Debug Test", "Testing with debug")
|
|
390
|
+
# Will show detailed API calls and responses
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## Philosophy
|
|
396
|
+
|
|
397
|
+
**One function, one purpose**: Send an email
|
|
398
|
+
|
|
399
|
+
No templates to learn. No configuration files. No complex APIs.
|
|
400
|
+
|
|
401
|
+
Just `send_email(to, subject, message)`.
|
|
402
|
+
|
|
403
|
+
Keep simple things simple.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Shell
|
|
2
|
+
|
|
3
|
+
Shell command execution tool.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import Shell
|
|
9
|
+
|
|
10
|
+
shell = Shell()
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## API
|
|
14
|
+
|
|
15
|
+
### run(command)
|
|
16
|
+
|
|
17
|
+
Execute a shell command, returns output.
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
result = shell.run("ls -la")
|
|
21
|
+
# Returns: "total 12\ndrwxr-xr-x 8 user staff..."
|
|
22
|
+
|
|
23
|
+
result = shell.run("git status")
|
|
24
|
+
# Returns: "On branch main\nnothing to commit..."
|
|
25
|
+
|
|
26
|
+
result = shell.run("python --version")
|
|
27
|
+
# Returns: "Python 3.11.0"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### run_in_dir(command, directory)
|
|
31
|
+
|
|
32
|
+
Execute command in a specific directory.
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
result = shell.run_in_dir("npm install", "/path/to/project")
|
|
36
|
+
# Returns: "added 100 packages..."
|
|
37
|
+
|
|
38
|
+
result = shell.run_in_dir("pytest", "/path/to/tests")
|
|
39
|
+
# Returns: "5 passed in 0.5s"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Use with Agent
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
from connectonion import Agent, Shell
|
|
46
|
+
|
|
47
|
+
shell = Shell()
|
|
48
|
+
agent = Agent("coder", tools=[shell])
|
|
49
|
+
|
|
50
|
+
agent.input("list all python files in current directory")
|
|
51
|
+
# Agent runs: shell.run("ls *.py")
|
|
52
|
+
|
|
53
|
+
agent.input("run the tests")
|
|
54
|
+
# Agent runs: shell.run("pytest")
|
|
55
|
+
|
|
56
|
+
agent.input("install requests package")
|
|
57
|
+
# Agent runs: shell.run("pip install requests")
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Common Use Cases
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
# Git operations
|
|
64
|
+
shell.run("git status")
|
|
65
|
+
shell.run("git add .")
|
|
66
|
+
shell.run("git commit -m 'update'")
|
|
67
|
+
|
|
68
|
+
# Package management
|
|
69
|
+
shell.run("pip install requests")
|
|
70
|
+
shell.run("npm install express")
|
|
71
|
+
|
|
72
|
+
# Build and test
|
|
73
|
+
shell.run("pytest")
|
|
74
|
+
shell.run("npm run build")
|
|
75
|
+
|
|
76
|
+
# System info
|
|
77
|
+
shell.run("pwd")
|
|
78
|
+
shell.run("whoami")
|
|
79
|
+
shell.run("df -h")
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Customizing
|
|
83
|
+
|
|
84
|
+
Need to modify Shell's behavior? Copy the source to your project:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
co copy shell
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Then import from your local copy:
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
# from connectonion import Shell # Before
|
|
94
|
+
from tools.shell import Shell # After - customize freely!
|
|
95
|
+
```
|