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,96 @@
|
|
|
1
|
+
# SlashCommand
|
|
2
|
+
|
|
3
|
+
Load and execute custom commands from markdown files.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import SlashCommand
|
|
9
|
+
|
|
10
|
+
# Load command
|
|
11
|
+
cmd = SlashCommand.load("today")
|
|
12
|
+
|
|
13
|
+
# Get prompt
|
|
14
|
+
prompt = cmd.prompt
|
|
15
|
+
|
|
16
|
+
# List all commands
|
|
17
|
+
commands = SlashCommand.list_all()
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Command File Format
|
|
21
|
+
|
|
22
|
+
Create `.co/commands/today.md`:
|
|
23
|
+
|
|
24
|
+
```markdown
|
|
25
|
+
---
|
|
26
|
+
name: today
|
|
27
|
+
description: Daily email briefing
|
|
28
|
+
tools:
|
|
29
|
+
- Gmail.search_emails
|
|
30
|
+
- WebFetch
|
|
31
|
+
---
|
|
32
|
+
Summarize my important emails from today.
|
|
33
|
+
Focus on:
|
|
34
|
+
- Urgent requests
|
|
35
|
+
- Meeting invites
|
|
36
|
+
- Follow-ups needed
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## YAML Frontmatter
|
|
40
|
+
|
|
41
|
+
| Field | Required | Description |
|
|
42
|
+
|-------|----------|-------------|
|
|
43
|
+
| `name` | Yes | Command name |
|
|
44
|
+
| `description` | Yes | Short description |
|
|
45
|
+
| `tools` | No | Allowed tools (all if omitted) |
|
|
46
|
+
|
|
47
|
+
## Tool Filtering
|
|
48
|
+
|
|
49
|
+
Limit which tools the command can use:
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
tools:
|
|
53
|
+
- Gmail.search_emails # Specific method
|
|
54
|
+
- WebFetch # Whole class
|
|
55
|
+
- my_function # Standalone function
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Locations
|
|
59
|
+
|
|
60
|
+
Commands are loaded from:
|
|
61
|
+
1. `.co/commands/*.md` (user commands - priority)
|
|
62
|
+
2. `commands/*.md` (built-in commands)
|
|
63
|
+
|
|
64
|
+
## API
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
# Load single command
|
|
68
|
+
cmd = SlashCommand.load("today")
|
|
69
|
+
cmd.name # "today"
|
|
70
|
+
cmd.description # "Daily email briefing"
|
|
71
|
+
cmd.prompt # "Summarize my important..."
|
|
72
|
+
cmd.tools # ["Gmail.search_emails", "WebFetch"]
|
|
73
|
+
|
|
74
|
+
# Filter tools for command
|
|
75
|
+
filtered = cmd.filter_tools(all_tools)
|
|
76
|
+
|
|
77
|
+
# List all available commands
|
|
78
|
+
commands = SlashCommand.list_all()
|
|
79
|
+
for cmd in commands:
|
|
80
|
+
print(f"/{cmd.name} - {cmd.description}")
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Customizing
|
|
84
|
+
|
|
85
|
+
Need to modify SlashCommand's behavior? Copy the source to your project:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
co copy slash_command
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Then import from your local copy:
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
# from connectonion import SlashCommand # Before
|
|
95
|
+
from tools.slash_command import SlashCommand # After - customize freely!
|
|
96
|
+
```
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Terminal
|
|
2
|
+
|
|
3
|
+
Interactive terminal utilities: selection menus, file browser, and input with autocomplete.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import pick, yes_no, browse_files, input_with_at
|
|
9
|
+
|
|
10
|
+
# Selection menu
|
|
11
|
+
choice = pick("Pick a color", ["Red", "Green", "Blue"])
|
|
12
|
+
|
|
13
|
+
# Yes/No confirmation
|
|
14
|
+
ok = yes_no("Are you sure?")
|
|
15
|
+
|
|
16
|
+
# File browser
|
|
17
|
+
path = browse_files()
|
|
18
|
+
|
|
19
|
+
# Input with @ file autocomplete
|
|
20
|
+
cmd = input_with_at("> ")
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## pick()
|
|
24
|
+
|
|
25
|
+
Single-select menu with keyboard navigation.
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
# List options (press 1, 2, 3 or arrow keys)
|
|
29
|
+
choice = pick("Apply this command?", [
|
|
30
|
+
"Yes, apply",
|
|
31
|
+
"Yes for same command",
|
|
32
|
+
"No, tell agent how"
|
|
33
|
+
])
|
|
34
|
+
|
|
35
|
+
# Dict options (returns key)
|
|
36
|
+
choice = pick("Continue?", {
|
|
37
|
+
"y": "Yes, continue",
|
|
38
|
+
"n": "No, cancel",
|
|
39
|
+
})
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## yes_no()
|
|
43
|
+
|
|
44
|
+
Simple binary confirmation.
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
ok = yes_no("Delete this file?")
|
|
48
|
+
# Press y → True, n → False
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## browse_files()
|
|
52
|
+
|
|
53
|
+
Navigate and select files.
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
path = browse_files()
|
|
57
|
+
# Arrow keys to navigate
|
|
58
|
+
# Enter on folder to open
|
|
59
|
+
# Enter on file to select
|
|
60
|
+
# Returns: "src/agent.py"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## input_with_at()
|
|
64
|
+
|
|
65
|
+
Text input with @ file autocomplete.
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
cmd = input_with_at("> ")
|
|
69
|
+
# User types: "edit @"
|
|
70
|
+
# File browser opens automatically
|
|
71
|
+
# Returns: "edit src/agent.py"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Keyboard Controls
|
|
75
|
+
|
|
76
|
+
| Key | Action |
|
|
77
|
+
|-----|--------|
|
|
78
|
+
| ↑/↓ | Navigate options |
|
|
79
|
+
| 1-9 | Quick select by number |
|
|
80
|
+
| Enter | Confirm selection |
|
|
81
|
+
| Esc | Cancel |
|
|
82
|
+
| @ | Trigger file autocomplete |
|
|
83
|
+
|
|
84
|
+
## Customizing
|
|
85
|
+
|
|
86
|
+
Need to modify terminal utilities? Copy the source to your project:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
co copy terminal
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Then import from your local copy:
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
# from connectonion import pick, yes_no # Before
|
|
96
|
+
from tools.terminal import pick, yes_no # After - customize freely!
|
|
97
|
+
```
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# TodoList
|
|
2
|
+
|
|
3
|
+
Task tracking tool for agents to manage complex, multi-step tasks.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import TodoList
|
|
9
|
+
|
|
10
|
+
todo = TodoList()
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Why Use TodoList?
|
|
14
|
+
|
|
15
|
+
- **Track progress** on complex tasks with multiple steps
|
|
16
|
+
- **Show users** what the agent is working on
|
|
17
|
+
- **Organize** multi-step workflows
|
|
18
|
+
- **Prevent** forgetting steps in complex tasks
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
Use TodoList when:
|
|
23
|
+
- Task requires **3+ distinct steps**
|
|
24
|
+
- User provides **multiple tasks** (numbered or comma-separated)
|
|
25
|
+
- Task requires **careful planning**
|
|
26
|
+
- You want to show **progress** to the user
|
|
27
|
+
|
|
28
|
+
Don't use when:
|
|
29
|
+
- Task is **trivial** (1-2 simple steps)
|
|
30
|
+
- Task is **purely conversational**
|
|
31
|
+
|
|
32
|
+
## API
|
|
33
|
+
|
|
34
|
+
### add(content, active_form)
|
|
35
|
+
|
|
36
|
+
Add a new pending task.
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
todo.add("Fix authentication bug", "Fixing authentication bug")
|
|
40
|
+
todo.add("Run tests", "Running tests")
|
|
41
|
+
todo.add("Update docs", "Updating docs")
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### start(content)
|
|
45
|
+
|
|
46
|
+
Mark a task as in_progress. Only one task can be in_progress at a time.
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
todo.start("Fix authentication bug")
|
|
50
|
+
# Shows: ◐ Fixing authentication bug
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### complete(content)
|
|
54
|
+
|
|
55
|
+
Mark a task as completed.
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
todo.complete("Fix authentication bug")
|
|
59
|
+
# Shows: ● Fix authentication bug
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### remove(content)
|
|
63
|
+
|
|
64
|
+
Remove a task from the list.
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
todo.remove("Update docs")
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### list()
|
|
71
|
+
|
|
72
|
+
Get all todos as text.
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
print(todo.list())
|
|
76
|
+
# ○ Fix authentication bug
|
|
77
|
+
# ◐ Running tests
|
|
78
|
+
# ● Update docs
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### update(todos)
|
|
82
|
+
|
|
83
|
+
Replace entire todo list (for bulk updates).
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
todo.update([
|
|
87
|
+
{"content": "Step 1", "status": "completed", "active_form": "Doing step 1"},
|
|
88
|
+
{"content": "Step 2", "status": "in_progress", "active_form": "Doing step 2"},
|
|
89
|
+
{"content": "Step 3", "status": "pending", "active_form": "Doing step 3"},
|
|
90
|
+
])
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### clear()
|
|
94
|
+
|
|
95
|
+
Clear all todos.
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
todo.clear()
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Task States
|
|
102
|
+
|
|
103
|
+
| Icon | Status | Description |
|
|
104
|
+
|------|--------|-------------|
|
|
105
|
+
| ○ | pending | Not yet started |
|
|
106
|
+
| ◐ | in_progress | Currently working on |
|
|
107
|
+
| ● | completed | Finished |
|
|
108
|
+
|
|
109
|
+
## Visual Display
|
|
110
|
+
|
|
111
|
+
When tasks change, TodoList shows a panel:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
╭─── Tasks (1/3) ───────────────────────────────╮
|
|
115
|
+
│ ● Fix authentication bug │
|
|
116
|
+
│ ◐ Running tests │
|
|
117
|
+
│ ○ Update docs │
|
|
118
|
+
╰────────────────────────────────────────────────╯
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Properties
|
|
122
|
+
|
|
123
|
+
### progress
|
|
124
|
+
|
|
125
|
+
Get completion percentage (0.0 to 1.0).
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
print(todo.progress) # 0.33 (1 of 3 completed)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### current_task
|
|
132
|
+
|
|
133
|
+
Get the currently in_progress task.
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
print(todo.current_task) # "Running tests"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Use with Agent
|
|
140
|
+
|
|
141
|
+
```python
|
|
142
|
+
from connectonion import Agent, TodoList
|
|
143
|
+
|
|
144
|
+
todo = TodoList()
|
|
145
|
+
agent = Agent("worker", tools=[todo])
|
|
146
|
+
|
|
147
|
+
agent.input("""
|
|
148
|
+
Implement user authentication:
|
|
149
|
+
1. Create User model
|
|
150
|
+
2. Add login endpoint
|
|
151
|
+
3. Add logout endpoint
|
|
152
|
+
4. Write tests
|
|
153
|
+
""")
|
|
154
|
+
|
|
155
|
+
# Agent will:
|
|
156
|
+
# 1. Add all tasks to todo list
|
|
157
|
+
# 2. Start each task before working on it
|
|
158
|
+
# 3. Complete each task when done
|
|
159
|
+
# 4. Show progress throughout
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Best Practices
|
|
163
|
+
|
|
164
|
+
### Task Naming
|
|
165
|
+
|
|
166
|
+
Use both forms:
|
|
167
|
+
- **content**: Imperative form ("Fix bug", "Run tests")
|
|
168
|
+
- **active_form**: Present continuous ("Fixing bug", "Running tests")
|
|
169
|
+
|
|
170
|
+
```python
|
|
171
|
+
todo.add("Fix authentication bug", "Fixing authentication bug")
|
|
172
|
+
# ^-- content ^-- active_form
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### One In-Progress at a Time
|
|
176
|
+
|
|
177
|
+
Only one task should be in_progress. Complete current before starting next.
|
|
178
|
+
|
|
179
|
+
```python
|
|
180
|
+
todo.add("Task A", "Doing A")
|
|
181
|
+
todo.add("Task B", "Doing B")
|
|
182
|
+
|
|
183
|
+
todo.start("Task A")
|
|
184
|
+
todo.start("Task B") # Error: Another task is in progress
|
|
185
|
+
todo.complete("Task A")
|
|
186
|
+
todo.start("Task B") # Now works
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Mark Complete Immediately
|
|
190
|
+
|
|
191
|
+
Complete tasks as soon as done, don't batch:
|
|
192
|
+
|
|
193
|
+
```python
|
|
194
|
+
# Good
|
|
195
|
+
todo.complete("Step 1")
|
|
196
|
+
# ... do step 2 ...
|
|
197
|
+
todo.complete("Step 2")
|
|
198
|
+
|
|
199
|
+
# Bad - batching completions
|
|
200
|
+
# ... do all steps ...
|
|
201
|
+
todo.complete("Step 1")
|
|
202
|
+
todo.complete("Step 2")
|
|
203
|
+
todo.complete("Step 3")
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Example: Multi-Step Task
|
|
207
|
+
|
|
208
|
+
```python
|
|
209
|
+
from connectonion import Agent, TodoList, DiffWriter
|
|
210
|
+
|
|
211
|
+
todo = TodoList()
|
|
212
|
+
writer = DiffWriter()
|
|
213
|
+
|
|
214
|
+
agent = Agent(
|
|
215
|
+
"developer",
|
|
216
|
+
tools=[todo, writer],
|
|
217
|
+
system_prompt="""
|
|
218
|
+
You are a developer. For complex tasks:
|
|
219
|
+
1. Break into steps using TodoList
|
|
220
|
+
2. Start each step before working
|
|
221
|
+
3. Complete each step when done
|
|
222
|
+
"""
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
agent.input("Create a REST API with user CRUD operations")
|
|
226
|
+
|
|
227
|
+
# Agent workflow:
|
|
228
|
+
# 1. todo.add("Create User model", "Creating User model")
|
|
229
|
+
# 2. todo.add("Add GET /users endpoint", "Adding GET endpoint")
|
|
230
|
+
# 3. todo.add("Add POST /users endpoint", "Adding POST endpoint")
|
|
231
|
+
# ...
|
|
232
|
+
# 4. todo.start("Create User model")
|
|
233
|
+
# 5. writer.write("models.py", "...")
|
|
234
|
+
# 6. todo.complete("Create User model")
|
|
235
|
+
# 7. todo.start("Add GET /users endpoint")
|
|
236
|
+
# ...
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Customizing
|
|
240
|
+
|
|
241
|
+
Need to modify TodoList's behavior? Copy the source to your project:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
co copy todo_list
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Then import from your local copy:
|
|
248
|
+
|
|
249
|
+
```python
|
|
250
|
+
# from connectonion import TodoList # Before
|
|
251
|
+
from tools.todo_list import TodoList # After - customize freely!
|
|
252
|
+
```
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# WebFetch
|
|
2
|
+
|
|
3
|
+
Web fetching tool with single-responsibility functions.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import WebFetch
|
|
9
|
+
|
|
10
|
+
web = WebFetch()
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Low-level APIs
|
|
14
|
+
|
|
15
|
+
Each function does ONE thing.
|
|
16
|
+
|
|
17
|
+
### fetch(url)
|
|
18
|
+
|
|
19
|
+
HTTP GET request, returns raw HTML.
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
html = web.fetch("example.com")
|
|
23
|
+
# Returns: "<!DOCTYPE html>..."
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### strip_tags(html)
|
|
27
|
+
|
|
28
|
+
Strip HTML tags, returns body text only.
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
text = web.strip_tags(html)
|
|
32
|
+
# Returns clean text without HTML
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### get_title(html)
|
|
36
|
+
|
|
37
|
+
Get page title.
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
title = web.get_title(html)
|
|
41
|
+
# Returns: "Example Domain"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### get_links(html)
|
|
45
|
+
|
|
46
|
+
Extract all links from HTML.
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
links = web.get_links(html)
|
|
50
|
+
# Returns: [{'text': 'Home', 'href': '/'}, {'text': 'About', 'href': '/about'}]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### get_emails(html)
|
|
54
|
+
|
|
55
|
+
Extract email addresses from HTML.
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
emails = web.get_emails(html)
|
|
59
|
+
# Returns: ['support@example.com', 'sales@company.org']
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### get_social_links(html)
|
|
63
|
+
|
|
64
|
+
Extract social media links.
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
html = web.fetch("openai.com")
|
|
68
|
+
social = web.get_social_links(html)
|
|
69
|
+
# Returns: {'twitter': 'https://x.com/OpenAI', 'youtube': '...', 'github': '...'}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## High-level APIs
|
|
73
|
+
|
|
74
|
+
Uses LLM to analyze content.
|
|
75
|
+
|
|
76
|
+
### analyze_page(url)
|
|
77
|
+
|
|
78
|
+
Analyze what a webpage/company does.
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
result = web.analyze_page("stripe.com")
|
|
82
|
+
# Returns: "Stripe is a technology company that builds economic infrastructure..."
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### get_contact_info(url)
|
|
86
|
+
|
|
87
|
+
Extract contact information.
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
result = web.get_contact_info("stripe.com/contact")
|
|
91
|
+
# Returns: "Email: support@stripe.com, Phone: ..."
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Composing Functions
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
# Get clean text from a URL
|
|
98
|
+
text = web.strip_tags(web.fetch("example.com"))
|
|
99
|
+
|
|
100
|
+
# Get title and text
|
|
101
|
+
html = web.fetch("example.com")
|
|
102
|
+
title = web.get_title(html)
|
|
103
|
+
text = web.strip_tags(html)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Use with Agent
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
from connectonion import Agent, WebFetch
|
|
110
|
+
|
|
111
|
+
web = WebFetch()
|
|
112
|
+
agent = Agent("researcher", tools=[web])
|
|
113
|
+
|
|
114
|
+
agent.input("What does stripe.com do?")
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Customizing
|
|
118
|
+
|
|
119
|
+
Need to modify WebFetch's behavior? Copy the source to your project:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
co copy web_fetch
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Then import from your local copy:
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
# from connectonion import WebFetch # Before
|
|
129
|
+
from tools.web_fetch import WebFetch # After - customize freely!
|
|
130
|
+
```
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Vibe Coding Guide: Build Agents with Cursor AI
|
|
2
|
+
|
|
3
|
+
> **Quick Start**: Drag our docs into Cursor → Ask AI → Get your agent
|
|
4
|
+
|
|
5
|
+
## Two Ways to Get Started
|
|
6
|
+
|
|
7
|
+
### Method 1: Drag & Drop
|
|
8
|
+
1. **Open Cursor AI editor**
|
|
9
|
+
2. **Drag our documentation** into Cursor:
|
|
10
|
+
- From website: Go to [docs.connectonion.com](https://docs.connectonion.com) → Drag any page
|
|
11
|
+
- From local: After `co init`, drag `.co/docs/co-vibecoding-principles-docs-contexts-all-in-one.md`
|
|
12
|
+
3. **Ask Cursor**: "Help me create an agent using these docs"
|
|
13
|
+
|
|
14
|
+
### Method 2: Copy All
|
|
15
|
+
1. **Visit** [docs.connectonion.com](https://docs.connectonion.com)
|
|
16
|
+
2. **Click** "Copy All Docs" (purple button in sidebar)
|
|
17
|
+
3. **Paste** into Cursor chat
|
|
18
|
+
4. **Ask Cursor**: "Help me create an agent using these docs"
|
|
19
|
+
|
|
20
|
+
## Example: What Cursor Generates
|
|
21
|
+
|
|
22
|
+
When you ask Cursor: **"Using ConnectOnion docs, create a calculator agent"**
|
|
23
|
+
|
|
24
|
+
Cursor generates:
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from connectonion import Agent
|
|
28
|
+
|
|
29
|
+
def add(a: float, b: float) -> float:
|
|
30
|
+
"""Add two numbers."""
|
|
31
|
+
return a + b
|
|
32
|
+
|
|
33
|
+
def multiply(a: float, b: float) -> float:
|
|
34
|
+
"""Multiply two numbers."""
|
|
35
|
+
return a * b
|
|
36
|
+
|
|
37
|
+
# Create agent
|
|
38
|
+
calculator = Agent(
|
|
39
|
+
"calculator",
|
|
40
|
+
tools=[add, multiply],
|
|
41
|
+
instructions="You are a helpful calculator"
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
# Use it
|
|
45
|
+
result = calculator.input("What is 5 plus 3?")
|
|
46
|
+
print(result) # Output: "5 plus 3 equals 8"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## The Magic
|
|
50
|
+
|
|
51
|
+
The agent automatically:
|
|
52
|
+
- ✅ Understands "plus" means use `add()`
|
|
53
|
+
- ✅ Picks the right tool
|
|
54
|
+
- ✅ Returns natural language
|
|
55
|
+
|
|
56
|
+
## What to Ask Cursor
|
|
57
|
+
|
|
58
|
+
**Basic:**
|
|
59
|
+
```
|
|
60
|
+
"Using ConnectOnion docs, create a calculator agent"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Advanced:**
|
|
64
|
+
```
|
|
65
|
+
"Add more math functions to this agent"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Custom:**
|
|
69
|
+
```
|
|
70
|
+
"Create an agent that [your specific need]"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Why It Works
|
|
74
|
+
|
|
75
|
+
Cursor + Our Docs = Complete Understanding:
|
|
76
|
+
- How to create agents
|
|
77
|
+
- How to add tools
|
|
78
|
+
- Best practices
|
|
79
|
+
- Natural language processing
|
|
80
|
+
|
|
81
|
+
## Quick Start
|
|
82
|
+
|
|
83
|
+
1. **Install**: `pip install connectonion`
|
|
84
|
+
2. **Initialize**: `co init`
|
|
85
|
+
3. **Open in Cursor**
|
|
86
|
+
4. **Drag our docs** into Cursor
|
|
87
|
+
5. **Ask**: "Create an agent"
|
|
88
|
+
6. **Run**: `python agent.py`
|
|
89
|
+
|
|
90
|
+
## Get Our Docs
|
|
91
|
+
|
|
92
|
+
- **Website**: [docs.connectonion.com](https://docs.connectonion.com) → Copy All Docs
|
|
93
|
+
- **Local**: `.co/docs/co-vibecoding-principles-docs-contexts-all-in-one.md` (after `co init`)
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
*Drag, drop, ask. Your agent is ready!* 🎉
|