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,150 @@
|
|
|
1
|
+
# WebFetch
|
|
2
|
+
|
|
3
|
+
Web fetching tool with single-responsibility functions.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
**Option 1: Import directly**
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
from connectonion import WebFetch
|
|
11
|
+
|
|
12
|
+
agent = Agent("researcher", tools=[WebFetch()])
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Option 2: Copy and customize**
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
co copy web_fetch
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
from tools.web_fetch import WebFetch # Your local copy
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
from connectonion import WebFetch
|
|
29
|
+
|
|
30
|
+
web = WebFetch()
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Low-level APIs
|
|
34
|
+
|
|
35
|
+
Each function does ONE thing.
|
|
36
|
+
|
|
37
|
+
### fetch(url)
|
|
38
|
+
|
|
39
|
+
HTTP GET request, returns raw HTML.
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
html = web.fetch("example.com")
|
|
43
|
+
# Returns: "<!DOCTYPE html>..."
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### strip_tags(html)
|
|
47
|
+
|
|
48
|
+
Strip HTML tags, returns body text only.
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
text = web.strip_tags(html)
|
|
52
|
+
# Returns clean text without HTML
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### get_title(html)
|
|
56
|
+
|
|
57
|
+
Get page title.
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
title = web.get_title(html)
|
|
61
|
+
# Returns: "Example Domain"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### get_links(html)
|
|
65
|
+
|
|
66
|
+
Extract all links from HTML.
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
links = web.get_links(html)
|
|
70
|
+
# Returns: [{'text': 'Home', 'href': '/'}, {'text': 'About', 'href': '/about'}]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### get_emails(html)
|
|
74
|
+
|
|
75
|
+
Extract email addresses from HTML.
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
emails = web.get_emails(html)
|
|
79
|
+
# Returns: ['support@example.com', 'sales@company.org']
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### get_social_links(html)
|
|
83
|
+
|
|
84
|
+
Extract social media links.
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
html = web.fetch("openai.com")
|
|
88
|
+
social = web.get_social_links(html)
|
|
89
|
+
# Returns: {'twitter': 'https://x.com/OpenAI', 'youtube': '...', 'github': '...'}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## High-level APIs
|
|
93
|
+
|
|
94
|
+
Uses LLM to analyze content.
|
|
95
|
+
|
|
96
|
+
### analyze_page(url)
|
|
97
|
+
|
|
98
|
+
Analyze what a webpage/company does.
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
result = web.analyze_page("stripe.com")
|
|
102
|
+
# Returns: "Stripe is a technology company that builds economic infrastructure..."
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### get_contact_info(url)
|
|
106
|
+
|
|
107
|
+
Extract contact information.
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
result = web.get_contact_info("stripe.com/contact")
|
|
111
|
+
# Returns: "Email: support@stripe.com, Phone: ..."
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Composing Functions
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
# Get clean text from a URL
|
|
118
|
+
text = web.strip_tags(web.fetch("example.com"))
|
|
119
|
+
|
|
120
|
+
# Get title and text
|
|
121
|
+
html = web.fetch("example.com")
|
|
122
|
+
title = web.get_title(html)
|
|
123
|
+
text = web.strip_tags(html)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Use with Agent
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
from connectonion import Agent, WebFetch
|
|
130
|
+
|
|
131
|
+
web = WebFetch()
|
|
132
|
+
agent = Agent("researcher", tools=[web])
|
|
133
|
+
|
|
134
|
+
agent.input("What does stripe.com do?")
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Customizing
|
|
138
|
+
|
|
139
|
+
Need to modify WebFetch's behavior? Copy the source to your project:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
co copy web_fetch
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Then import from your local copy:
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
# from connectonion import WebFetch # Before
|
|
149
|
+
from tools.web_fetch import WebFetch # After - customize freely!
|
|
150
|
+
```
|
|
@@ -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!* 🎉
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# Windows Support
|
|
2
|
+
|
|
3
|
+
ConnectOnion v0.3.5+ fully supports Windows, including users with non-ASCII usernames (Chinese, Arabic, Russian, Korean, Japanese, etc.) and paths containing spaces.
|
|
4
|
+
|
|
5
|
+
## What Works on Windows
|
|
6
|
+
|
|
7
|
+
✅ **Non-ASCII usernames**: `C:\Users\王小明\.co\`
|
|
8
|
+
✅ **Arabic usernames**: `C:\Users\محمد\.co\`
|
|
9
|
+
✅ **Spaces in paths**: `C:\Users\John Smith\.co\`
|
|
10
|
+
✅ **All CLI commands**: `co init`, `co create`, `co auth`, `co reset`
|
|
11
|
+
✅ **Crypto key operations**: Ed25519 key generation, saving, and loading
|
|
12
|
+
✅ **Agent logging**: Console output with UTF-8 characters and emojis
|
|
13
|
+
✅ **File operations**: Config files, .env files, recovery phrases
|
|
14
|
+
|
|
15
|
+
## What Was Fixed (v0.3.5)
|
|
16
|
+
|
|
17
|
+
### Problem 1: UTF-8 Encoding Errors
|
|
18
|
+
|
|
19
|
+
**Before (v0.3.4 and earlier):**
|
|
20
|
+
```
|
|
21
|
+
Traceback (most recent call last):
|
|
22
|
+
File "connectonion\address.py", line 159, in save
|
|
23
|
+
recovery_file.write_text(address_data["seed_phrase"])
|
|
24
|
+
UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-2:
|
|
25
|
+
character maps to <undefined>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Why it failed:**
|
|
29
|
+
- Windows default encoding is NOT UTF-8 (usually `cp1252` or locale-specific)
|
|
30
|
+
- File paths like `C:\Users\王小明\.co\keys\recovery.txt` would fail
|
|
31
|
+
- Chinese, Arabic, Russian characters couldn't be written to files
|
|
32
|
+
|
|
33
|
+
**After (v0.3.5+):**
|
|
34
|
+
```python
|
|
35
|
+
# All file operations now explicitly use UTF-8
|
|
36
|
+
recovery_file.write_text(seed_phrase, encoding='utf-8') # ✅ Works!
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Fixed in 16 locations:**
|
|
40
|
+
- `address.py` - Key and recovery file operations
|
|
41
|
+
- `console.py` - Log file writing
|
|
42
|
+
- `auth_commands.py` - .env and config file operations
|
|
43
|
+
- `init.py`, `create.py`, `trust.py`, `reset_commands.py` - All file I/O
|
|
44
|
+
|
|
45
|
+
### Problem 2: File Permission Errors
|
|
46
|
+
|
|
47
|
+
**Before (v0.3.4 and earlier):**
|
|
48
|
+
```
|
|
49
|
+
Traceback (most recent call last):
|
|
50
|
+
File "connectonion\address.py", line 154, in save
|
|
51
|
+
key_file.chmod(0o600)
|
|
52
|
+
NotImplementedError: chmod unavailable on this platform
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Why it failed:**
|
|
56
|
+
- Windows uses ACLs (Access Control Lists), not Unix file permissions
|
|
57
|
+
- `os.chmod(0o600)` doesn't work on Windows and raises errors
|
|
58
|
+
|
|
59
|
+
**After (v0.3.5+):**
|
|
60
|
+
```python
|
|
61
|
+
# Skip chmod on Windows, apply on Unix/Mac
|
|
62
|
+
if sys.platform != 'win32':
|
|
63
|
+
key_file.chmod(0o600) # ✅ Platform-aware!
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Fixed in 4 locations:**
|
|
67
|
+
- `address.py` - Key file permissions (2 locations)
|
|
68
|
+
- `auth_commands.py` - .env file permissions (2 locations)
|
|
69
|
+
- `init.py`, `create.py`, `reset_commands.py` - Keys.env creation
|
|
70
|
+
|
|
71
|
+
### Problem 3: Path Comparison Bugs
|
|
72
|
+
|
|
73
|
+
**Before (v0.3.4 and earlier):**
|
|
74
|
+
```python
|
|
75
|
+
is_global = co_dir == Path.home() / ".co" # ❌ Fails on Windows!
|
|
76
|
+
# C:\Users\User\.co != C:/Users/User/.co (different separators)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**After (v0.3.5+):**
|
|
80
|
+
```python
|
|
81
|
+
is_global = co_dir.resolve() == (Path.home() / ".co").resolve() # ✅ Works!
|
|
82
|
+
# Both normalize to same canonical path
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## User Journey: Windows with Chinese Username
|
|
86
|
+
|
|
87
|
+
### Scenario: User "王小明" installing ConnectOnion
|
|
88
|
+
|
|
89
|
+
```powershell
|
|
90
|
+
# 1. Install
|
|
91
|
+
pip install connectonion
|
|
92
|
+
|
|
93
|
+
# 2. Initialize project
|
|
94
|
+
co init
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**What happens internally:**
|
|
98
|
+
1. Creates `C:\Users\王小明\.co\` directory
|
|
99
|
+
2. Generates Ed25519 keys → Saves to `C:\Users\王小明\.co\keys\agent.key`
|
|
100
|
+
3. Writes recovery phrase → `C:\Users\王小明\.co\keys\recovery.txt` (UTF-8)
|
|
101
|
+
4. Creates config → `C:\Users\王小明\.co\config.toml` (UTF-8)
|
|
102
|
+
5. Skips chmod (Windows doesn't support it)
|
|
103
|
+
6. Authenticates with OpenOnion API
|
|
104
|
+
7. Saves API token → `C:\Users\王小明\.co\keys.env` (UTF-8)
|
|
105
|
+
|
|
106
|
+
**Result:** ✅ Everything works perfectly!
|
|
107
|
+
|
|
108
|
+
## Testing Your Setup
|
|
109
|
+
|
|
110
|
+
### Verify UTF-8 Support
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
from pathlib import Path
|
|
114
|
+
from connectonion import address
|
|
115
|
+
|
|
116
|
+
# Generate keys
|
|
117
|
+
addr = address.generate()
|
|
118
|
+
|
|
119
|
+
# Save to home directory
|
|
120
|
+
co_dir = Path.home() / ".co"
|
|
121
|
+
address.save(addr, co_dir)
|
|
122
|
+
|
|
123
|
+
# Load back
|
|
124
|
+
loaded = address.load(co_dir)
|
|
125
|
+
|
|
126
|
+
# Verify it matches
|
|
127
|
+
assert loaded["address"] == addr["address"]
|
|
128
|
+
print("✅ UTF-8 encoding works correctly!")
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Check File Contents
|
|
132
|
+
|
|
133
|
+
```powershell
|
|
134
|
+
# View recovery phrase (should show 12 English words)
|
|
135
|
+
type %USERPROFILE%\.co\keys\recovery.txt
|
|
136
|
+
|
|
137
|
+
# View config (should be valid TOML)
|
|
138
|
+
type %USERPROFILE%\.co\config.toml
|
|
139
|
+
|
|
140
|
+
# Check logs (should show UTF-8 characters correctly)
|
|
141
|
+
type .co\logs\agent_name.log
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Troubleshooting
|
|
145
|
+
|
|
146
|
+
### Issue: "UnicodeEncodeError" still appearing
|
|
147
|
+
|
|
148
|
+
**Cause:** Using old version of ConnectOnion
|
|
149
|
+
**Solution:**
|
|
150
|
+
```powershell
|
|
151
|
+
pip install --upgrade connectonion
|
|
152
|
+
pip show connectonion # Should show v0.3.5 or higher
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Issue: "NotImplementedError: chmod unavailable"
|
|
156
|
+
|
|
157
|
+
**Cause:** Using old version of ConnectOnion
|
|
158
|
+
**Solution:** Upgrade to v0.3.5+ (same as above)
|
|
159
|
+
|
|
160
|
+
### Issue: Console shows garbled characters
|
|
161
|
+
|
|
162
|
+
**Cause:** Windows terminal not set to UTF-8
|
|
163
|
+
**Solution:**
|
|
164
|
+
```powershell
|
|
165
|
+
# Set terminal to UTF-8 (Windows 10+)
|
|
166
|
+
chcp 65001
|
|
167
|
+
|
|
168
|
+
# Or use Windows Terminal (recommended)
|
|
169
|
+
# Download from Microsoft Store
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Issue: Path comparison not working
|
|
173
|
+
|
|
174
|
+
**Cause:** Using old version or comparing paths without `.resolve()`
|
|
175
|
+
**Solution:** Upgrade to v0.3.5+ which handles path normalization automatically
|
|
176
|
+
|
|
177
|
+
## Technical Details
|
|
178
|
+
|
|
179
|
+
### What Changed
|
|
180
|
+
|
|
181
|
+
| Component | Fix | Impact |
|
|
182
|
+
|-----------|-----|--------|
|
|
183
|
+
| **File I/O** | Added `encoding='utf-8'` to all `open()`, `.read_text()`, `.write_text()` | Non-ASCII usernames work |
|
|
184
|
+
| **Permissions** | Added platform check `if sys.platform != 'win32':` before `chmod()` | No more Windows errors |
|
|
185
|
+
| **Path Comparison** | Use `.resolve()` for path equality checks | Handles different path separators |
|
|
186
|
+
|
|
187
|
+
### Files Modified
|
|
188
|
+
|
|
189
|
+
- `connectonion/address.py` - Crypto key operations
|
|
190
|
+
- `connectonion/console.py` - Logging system
|
|
191
|
+
- `connectonion/cli/commands/auth_commands.py` - Authentication
|
|
192
|
+
- `connectonion/cli/commands/init.py` - Project initialization
|
|
193
|
+
- `connectonion/cli/commands/create.py` - Project creation
|
|
194
|
+
- `connectonion/cli/commands/reset_commands.py` - Account reset
|
|
195
|
+
- `connectonion/network/trust/factory.py` - Trust policy handling
|
|
196
|
+
- `connectonion/network/trust/tools.py` - Trust verification
|
|
197
|
+
|
|
198
|
+
### Test Coverage
|
|
199
|
+
|
|
200
|
+
New tests in `tests/unit/test_windows_compat.py`:
|
|
201
|
+
- ✅ UTF-8 encoding with Chinese usernames
|
|
202
|
+
- ✅ UTF-8 encoding with Arabic usernames
|
|
203
|
+
- ✅ Paths with spaces (e.g., "John Smith")
|
|
204
|
+
- ✅ Console logging with UTF-8 characters and emojis
|
|
205
|
+
- ✅ chmod skipped on Windows, applied on Unix
|
|
206
|
+
- ✅ Path comparison with `.resolve()`
|
|
207
|
+
- ✅ Round-trip encoding (write → read → same content)
|
|
208
|
+
|
|
209
|
+
## Supported Characters
|
|
210
|
+
|
|
211
|
+
ConnectOnion now supports ALL Unicode characters in usernames and file paths:
|
|
212
|
+
|
|
213
|
+
| Language | Example Username | Status |
|
|
214
|
+
|----------|------------------|--------|
|
|
215
|
+
| Chinese (Simplified) | 王小明 | ✅ |
|
|
216
|
+
| Chinese (Traditional) | 王小明 | ✅ |
|
|
217
|
+
| Arabic | محمد | ✅ |
|
|
218
|
+
| Russian | Иван | ✅ |
|
|
219
|
+
| Japanese | 田中 | ✅ |
|
|
220
|
+
| Korean | 김철수 | ✅ |
|
|
221
|
+
| Hebrew | דוד | ✅ |
|
|
222
|
+
| Thai | สมชาย | ✅ |
|
|
223
|
+
| Greek | Γιάννης | ✅ |
|
|
224
|
+
| Emoji | User🚀 | ✅ |
|
|
225
|
+
| Spaces | John Smith | ✅ |
|
|
226
|
+
| Mixed | 王User123 | ✅ |
|
|
227
|
+
|
|
228
|
+
## FAQ
|
|
229
|
+
|
|
230
|
+
### Q: Do I need to do anything special for non-ASCII usernames?
|
|
231
|
+
|
|
232
|
+
**A:** No! Just upgrade to v0.3.5+ and everything works automatically.
|
|
233
|
+
|
|
234
|
+
### Q: Will my existing installation still work after upgrading?
|
|
235
|
+
|
|
236
|
+
**A:** Yes! The changes are backward compatible. Existing configs and keys will work perfectly.
|
|
237
|
+
|
|
238
|
+
### Q: What if I'm using Python 2.7?
|
|
239
|
+
|
|
240
|
+
**A:** Python 2.7 is not supported. ConnectOnion requires Python 3.7+.
|
|
241
|
+
|
|
242
|
+
### Q: Does this work on Windows 7?
|
|
243
|
+
|
|
244
|
+
**A:** Yes, but Windows 10 or 11 is recommended for best Unicode support in the terminal.
|
|
245
|
+
|
|
246
|
+
## Version History
|
|
247
|
+
|
|
248
|
+
- **v0.3.5** - Full Windows support with UTF-8 encoding and platform-aware chmod
|
|
249
|
+
- **v0.3.4** - Partial Windows support (UTF-8 errors with non-ASCII usernames)
|
|
250
|
+
- **v0.3.0** - Initial Windows testing
|
|
251
|
+
|
|
252
|
+
## Contributing
|
|
253
|
+
|
|
254
|
+
Found a Windows-specific bug? Please report it:
|
|
255
|
+
1. Check your ConnectOnion version: `pip show connectonion`
|
|
256
|
+
2. Include your Windows version and username type (ASCII/non-ASCII)
|
|
257
|
+
3. Share the full error message and traceback
|
|
258
|
+
4. Submit an issue at: https://github.com/openonion/connectonion/issues
|
connectonion/logger.py
CHANGED
|
@@ -140,8 +140,8 @@ class Logger:
|
|
|
140
140
|
|
|
141
141
|
def _format_tool_call(self, trace_entry: dict) -> str:
|
|
142
142
|
"""Format tool call as natural function-call style: greet(name='Alice')"""
|
|
143
|
-
tool_name = trace_entry.get('
|
|
144
|
-
args = trace_entry.get('
|
|
143
|
+
tool_name = trace_entry.get('name', '')
|
|
144
|
+
args = trace_entry.get('args', {})
|
|
145
145
|
parts = []
|
|
146
146
|
for k, v in args.items():
|
|
147
147
|
if isinstance(v, str):
|
|
@@ -242,7 +242,7 @@ class Logger:
|
|
|
242
242
|
# Aggregate from trace
|
|
243
243
|
trace = session.get('trace', [])
|
|
244
244
|
llm_calls = [t for t in trace if t.get('type') == 'llm_call']
|
|
245
|
-
tool_calls = [t for t in trace if t.get('type') == '
|
|
245
|
+
tool_calls = [t for t in trace if t.get('type') == 'tool_result']
|
|
246
246
|
|
|
247
247
|
total_tokens = sum(
|
|
248
248
|
(t.get('usage').input_tokens + t.get('usage').output_tokens)
|
connectonion/network/__init__.py
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""
|
|
2
|
+
Purpose: Network layer package re-exporting host, IO, asgi, relay, connect, announce, trust modules
|
|
3
|
+
LLM-Note:
|
|
4
|
+
Dependencies: imports from [host/, io/, connect.py, relay.py, announce.py, trust/] | imported by [__init__.py main package, user code] | tested via submodule tests
|
|
5
|
+
Data flow: pure re-export module aggregating networking functionality
|
|
6
|
+
State/Effects: no state
|
|
7
|
+
Integration: exposes host(agent, port, trust), create_app(), IO/WebSocketIO, SessionStorage/Session, connect(url), RemoteAgent, Response, relay server (relay_connect, serve_loop), announce (create_announce_message), trust (create_trust_agent, TRUST_LEVELS, prompts) | unified networking API surface
|
|
8
|
+
Performance: trivial
|
|
9
|
+
Errors: none
|
|
10
|
+
Network layer for hosting and connecting agents.
|
|
2
11
|
|
|
3
12
|
This module contains:
|
|
4
13
|
- host: Host an agent over HTTP/WebSocket
|
|
5
|
-
-
|
|
14
|
+
- IO: Base class for agent-client communication
|
|
6
15
|
- asgi: ASGI app implementation
|
|
7
16
|
- relay: Agent relay server for P2P discovery
|
|
8
17
|
- connect: Multi-agent networking (RemoteAgent)
|
|
@@ -11,27 +20,31 @@ This module contains:
|
|
|
11
20
|
"""
|
|
12
21
|
|
|
13
22
|
from .host import host, create_app, SessionStorage, Session
|
|
14
|
-
from .
|
|
15
|
-
from .connect import connect, RemoteAgent
|
|
23
|
+
from .io import IO, WebSocketIO
|
|
24
|
+
from .connect import connect, RemoteAgent, Response
|
|
16
25
|
from .relay import connect as relay_connect, serve_loop
|
|
17
26
|
from .announce import create_announce_message
|
|
18
|
-
from .trust import create_trust_agent, get_default_trust_level, TRUST_LEVELS
|
|
27
|
+
from .trust import create_trust_agent, get_default_trust_level, TRUST_LEVELS, get_trust_prompt, TRUST_PROMPTS
|
|
19
28
|
from . import relay, announce
|
|
20
29
|
|
|
21
30
|
__all__ = [
|
|
22
31
|
"host",
|
|
23
32
|
"create_app",
|
|
24
|
-
"
|
|
33
|
+
"IO",
|
|
34
|
+
"WebSocketIO",
|
|
25
35
|
"SessionStorage",
|
|
26
36
|
"Session",
|
|
27
37
|
"connect",
|
|
28
38
|
"RemoteAgent",
|
|
39
|
+
"Response",
|
|
29
40
|
"relay_connect",
|
|
30
41
|
"serve_loop",
|
|
31
42
|
"create_announce_message",
|
|
32
43
|
"create_trust_agent",
|
|
33
44
|
"get_default_trust_level",
|
|
34
45
|
"TRUST_LEVELS",
|
|
46
|
+
"get_trust_prompt",
|
|
47
|
+
"TRUST_PROMPTS",
|
|
35
48
|
"relay",
|
|
36
49
|
"announce",
|
|
37
50
|
]
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Purpose: ASGI application factory for HTTP/WebSocket handling without framework overhead
|
|
3
|
+
LLM-Note:
|
|
4
|
+
Dependencies: imports from [asgi/http.py, asgi/websocket.py, time] | imported by [network/host/server.py, network/__init__.py] | tested by [tests/network/test_asgi.py]
|
|
5
|
+
Data flow: create_app(route_handlers, storage, trust, blacklist, whitelist) → returns ASGI app callable → uvicorn calls app(scope, receive, send) → routes to handle_http() or handle_websocket() based on scope type
|
|
6
|
+
State/Effects: captures start_time for uptime | no other persistent state
|
|
7
|
+
Integration: exposes create_app() factory, handle_http(), handle_websocket(), _pump_messages(), CORS_HEADERS, read_body(), send_json(), send_html(), send_text() | raw ASGI (no FastAPI/Starlette) for protocol control
|
|
8
|
+
Performance: minimal overhead (direct ASGI protocol) | async I/O for concurrency
|
|
9
|
+
Errors: none (errors handled in http.py/websocket.py)
|
|
10
|
+
ASGI application for HTTP and WebSocket handling.
|
|
11
|
+
|
|
12
|
+
Raw ASGI instead of Starlette/FastAPI for full protocol control.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import time
|
|
16
|
+
|
|
17
|
+
from .http import handle_http, send_json, send_html, send_text, read_body, CORS_HEADERS
|
|
18
|
+
from .websocket import handle_websocket, _pump_messages
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def create_app(
|
|
22
|
+
*,
|
|
23
|
+
route_handlers: dict,
|
|
24
|
+
storage,
|
|
25
|
+
trust: str = "careful",
|
|
26
|
+
blacklist: list | None = None,
|
|
27
|
+
whitelist: list | None = None,
|
|
28
|
+
):
|
|
29
|
+
"""Create ASGI application.
|
|
30
|
+
|
|
31
|
+
Args:
|
|
32
|
+
route_handlers: Dict of route handler functions
|
|
33
|
+
storage: SessionStorage instance
|
|
34
|
+
trust: Trust level (open/careful/strict)
|
|
35
|
+
blacklist: Blocked identities
|
|
36
|
+
whitelist: Allowed identities
|
|
37
|
+
|
|
38
|
+
Returns:
|
|
39
|
+
ASGI application callable
|
|
40
|
+
"""
|
|
41
|
+
start_time = time.time()
|
|
42
|
+
|
|
43
|
+
async def app(scope, receive, send):
|
|
44
|
+
if scope["type"] == "http":
|
|
45
|
+
await handle_http(
|
|
46
|
+
scope,
|
|
47
|
+
receive,
|
|
48
|
+
send,
|
|
49
|
+
route_handlers=route_handlers,
|
|
50
|
+
storage=storage,
|
|
51
|
+
trust=trust,
|
|
52
|
+
start_time=start_time,
|
|
53
|
+
blacklist=blacklist,
|
|
54
|
+
whitelist=whitelist,
|
|
55
|
+
)
|
|
56
|
+
elif scope["type"] == "websocket":
|
|
57
|
+
await handle_websocket(
|
|
58
|
+
scope,
|
|
59
|
+
receive,
|
|
60
|
+
send,
|
|
61
|
+
route_handlers=route_handlers,
|
|
62
|
+
storage=storage,
|
|
63
|
+
trust=trust,
|
|
64
|
+
blacklist=blacklist,
|
|
65
|
+
whitelist=whitelist,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
return app
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
__all__ = [
|
|
72
|
+
"create_app",
|
|
73
|
+
"handle_http",
|
|
74
|
+
"handle_websocket",
|
|
75
|
+
"_pump_messages",
|
|
76
|
+
"CORS_HEADERS",
|
|
77
|
+
"read_body",
|
|
78
|
+
"send_json",
|
|
79
|
+
"send_html",
|
|
80
|
+
"send_text",
|
|
81
|
+
]
|