connectonion 0.6.2__py3-none-any.whl → 0.6.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- connectonion/__init__.py +46 -9
- connectonion/cli/__init__.py +11 -1
- connectonion/cli/browser_agent/__init__.py +11 -1
- connectonion/cli/browser_agent/browser.py +13 -3
- connectonion/cli/browser_agent/element_finder.py +8 -0
- connectonion/cli/browser_agent/highlight_screenshot.py +9 -1
- connectonion/cli/browser_agent/scroll.py +8 -0
- connectonion/cli/co_ai/__init__.py +6 -0
- connectonion/cli/co_ai/agent.py +87 -0
- connectonion/cli/co_ai/agents/__init__.py +5 -0
- connectonion/cli/co_ai/agents/registry.py +57 -0
- connectonion/cli/co_ai/commands/__init__.py +45 -0
- connectonion/cli/co_ai/commands/compact.py +173 -0
- connectonion/cli/co_ai/commands/cost.py +77 -0
- connectonion/cli/co_ai/commands/export.py +60 -0
- connectonion/cli/co_ai/commands/help.py +80 -0
- connectonion/cli/co_ai/commands/init.py +101 -0
- connectonion/cli/co_ai/commands/sessions.py +55 -0
- connectonion/cli/co_ai/commands/tasks.py +63 -0
- connectonion/cli/co_ai/commands/undo.py +103 -0
- connectonion/cli/co_ai/context.py +127 -0
- connectonion/cli/co_ai/main.py +52 -0
- connectonion/cli/co_ai/plugins/__init__.py +5 -0
- connectonion/cli/co_ai/plugins/system_reminder.py +154 -0
- connectonion/cli/co_ai/prompts/agents/explore.md +79 -0
- connectonion/cli/co_ai/prompts/agents/plan.md +60 -0
- connectonion/cli/co_ai/prompts/assembler.py +303 -0
- connectonion/cli/{docs/co-vibecoding-principles-docs-contexts-all-in-one.md → co_ai/prompts/connectonion/README.md} +26 -0
- connectonion/cli/co_ai/prompts/connectonion/api.md +457 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/README.md +805 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/auth.md +46 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/browser.md +235 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/copy.md +184 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/create.md +335 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/init.md +431 -0
- connectonion/cli/co_ai/prompts/connectonion/co-directory-structure.md +214 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/agent.md +1078 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/events.md +816 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/llm_do.md +256 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/max_iterations.md +362 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/models.md +641 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/plugins.md +100 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/prompts.md +122 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/tools.md +512 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/transcribe.md +156 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/trust.md +291 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/README.md +18 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/auto_debug.md +1026 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/console.md +129 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/eval-format.md +178 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/eval.md +230 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/exceptions.md +307 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/log.md +117 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/xray.md +215 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/001-choosing-input-method.md +202 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/002-choosing-llm-function-name.md +202 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/003-choosing-trust-keyword.md +141 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/004-cli-create-flow.md +117 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/005-designing-agent-network-protocol.md +503 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/006-agent-address-format.md +305 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/007-authentication-backend-design.md +240 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/008-naming-is-hard.md +228 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/009-why-connect-function.md +167 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/010-cli-ux-progressive-disclosure.md +176 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/011-global-config-identity-management.md +357 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/012-tool-execution-separation.md +259 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/013-debug-and-logging-design.md +253 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/014-hook-system-design.md +510 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/015-interactive-auto-debug-design.md +837 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/016-why-no-zero-knowledge-proofs.md +358 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/017-session-logging-and-eval-format.md +120 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/018-event-api-naming.md +274 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/019-agent-lifecycle-design.md +655 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/020-trust-system-and-network-architecture.md +503 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/021-task-storage-jsonl-design.md +496 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/022-raw-asgi-implementation.md +273 -0
- connectonion/cli/co_ai/prompts/connectonion/examples/agent_reasoning.md +62 -0
- connectonion/cli/co_ai/prompts/connectonion/examples/atomic_tools.md +24 -0
- connectonion/cli/co_ai/prompts/connectonion/examples/load_guide.md +18 -0
- connectonion/cli/co_ai/prompts/connectonion/examples.md +0 -0
- connectonion/cli/co_ai/prompts/connectonion/hook-system-options.md +364 -0
- connectonion/cli/co_ai/prompts/connectonion/index.md +162 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/README.md +12 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/auth.md +450 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/google.md +431 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/microsoft.md +370 -0
- connectonion/cli/co_ai/prompts/connectonion/network/README.md +14 -0
- connectonion/cli/co_ai/prompts/connectonion/network/connect.md +543 -0
- connectonion/cli/co_ai/prompts/connectonion/network/connection.md +538 -0
- connectonion/cli/co_ai/prompts/connectonion/network/deploy.md +123 -0
- connectonion/cli/co_ai/prompts/connectonion/network/host.md +1049 -0
- connectonion/cli/co_ai/prompts/connectonion/network/protocol/agent-relay-protocol.md +495 -0
- connectonion/cli/co_ai/prompts/connectonion/network/protocol/announce-message.md +115 -0
- connectonion/cli/co_ai/prompts/connectonion/principles.md +124 -0
- connectonion/cli/co_ai/prompts/connectonion/quickstart.md +261 -0
- connectonion/cli/co_ai/prompts/connectonion/roadmap.md +81 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/README.md +77 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/meta-agent.md +152 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/minimal.md +105 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/playwright.md +130 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/web-research.md +144 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/README.md +95 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/chat.md +181 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/divider.md +63 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/dropdown.md +83 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/footer.md +44 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/fuzzy.md +68 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/input.md +84 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/keys.md +77 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/pick.md +71 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/providers.md +89 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/status_bar.md +67 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/README.md +156 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/calendar_plugin.md +68 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/eval.md +89 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/gmail_plugin.md +68 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/image_result_formatter.md +74 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/re_act.md +86 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/shell_approval.md +69 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/README.md +81 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/diff_writer.md +138 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/get_emails.md +499 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/gmail.md +135 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/google_calendar.md +106 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/memory.md +486 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/microsoft_calendar.md +106 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/outlook.md +120 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/send_email.md +403 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/shell.md +95 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/slash_command.md +96 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/terminal.md +97 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/todo_list.md +252 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/web_fetch.md +130 -0
- connectonion/cli/co_ai/prompts/connectonion/vibe-coding-guide.md +97 -0
- connectonion/cli/co_ai/prompts/connectonion/windows-support.md +258 -0
- connectonion/cli/co_ai/prompts/main.md +247 -0
- connectonion/cli/co_ai/prompts/summarization.md +55 -0
- connectonion/cli/co_ai/prompts/system-reminders/agent.md +23 -0
- connectonion/cli/co_ai/prompts/system-reminders/plan_mode.md +13 -0
- connectonion/cli/co_ai/prompts/system-reminders/security.md +14 -0
- connectonion/cli/co_ai/prompts/system-reminders/simplicity.md +14 -0
- connectonion/cli/co_ai/prompts/tools/ask_user.md +61 -0
- connectonion/cli/co_ai/prompts/tools/background.md +57 -0
- connectonion/cli/co_ai/prompts/tools/edit.md +90 -0
- connectonion/cli/co_ai/prompts/tools/glob.md +52 -0
- connectonion/cli/co_ai/prompts/tools/grep.md +55 -0
- connectonion/cli/co_ai/prompts/tools/plan_mode.md +80 -0
- connectonion/cli/co_ai/prompts/tools/read.md +40 -0
- connectonion/cli/co_ai/prompts/tools/shell.md +67 -0
- connectonion/cli/co_ai/prompts/tools/task.md +51 -0
- connectonion/cli/co_ai/prompts/tools/todo.md +139 -0
- connectonion/cli/co_ai/prompts/tools/write.md +47 -0
- connectonion/cli/co_ai/prompts/workflow.md +89 -0
- connectonion/cli/co_ai/sessions.py +110 -0
- connectonion/cli/co_ai/skills/__init__.py +37 -0
- connectonion/cli/co_ai/skills/builtin/commit/SKILL.md +63 -0
- connectonion/cli/co_ai/skills/builtin/review-pr/SKILL.md +76 -0
- connectonion/cli/co_ai/skills/loader.py +166 -0
- connectonion/cli/co_ai/skills/tool.py +46 -0
- connectonion/cli/co_ai/tools/__init__.py +92 -0
- connectonion/cli/co_ai/tools/ask_user.py +35 -0
- connectonion/cli/co_ai/tools/background.py +201 -0
- connectonion/cli/co_ai/tools/diff_writer.py +291 -0
- connectonion/cli/co_ai/tools/edit.py +89 -0
- connectonion/cli/co_ai/tools/glob.py +84 -0
- connectonion/cli/co_ai/tools/grep.py +158 -0
- connectonion/cli/co_ai/tools/load_guide.py +23 -0
- connectonion/cli/co_ai/tools/multi_edit.py +116 -0
- connectonion/cli/co_ai/tools/plan_mode.py +169 -0
- connectonion/cli/co_ai/tools/read.py +61 -0
- connectonion/cli/co_ai/tools/task.py +59 -0
- connectonion/cli/co_ai/tools/todo_list.py +159 -0
- connectonion/cli/co_ai/tools/write.py +126 -0
- connectonion/cli/commands/__init__.py +11 -1
- connectonion/cli/commands/ai_commands.py +34 -0
- connectonion/cli/commands/copy_commands.py +55 -6
- connectonion/cli/commands/create.py +20 -17
- connectonion/cli/commands/init.py +19 -22
- connectonion/cli/commands/project_cmd_lib.py +15 -0
- connectonion/cli/main.py +11 -0
- connectonion/console.py +15 -1
- connectonion/core/__init__.py +10 -1
- connectonion/core/agent.py +37 -16
- connectonion/core/exceptions.py +74 -0
- connectonion/core/llm.py +54 -6
- connectonion/core/tool_executor.py +32 -31
- connectonion/core/tool_factory.py +47 -10
- connectonion/debug/__init__.py +10 -1
- connectonion/debug/debug_explainer/__init__.py +10 -1
- connectonion/debug/execution_analyzer/__init__.py +10 -1
- connectonion/debug/execution_analyzer/execution_analysis.py +5 -2
- connectonion/debug/runtime_inspector/__init__.py +10 -1
- connectonion/docs/.package-ignore +6 -0
- connectonion/docs/README.md +2036 -0
- connectonion/docs/api.md +457 -0
- connectonion/docs/archive/001-ai-agent-is-just-prompt-plus-function.md +249 -0
- connectonion/docs/archive/README.md +53 -0
- connectonion/docs/archive/archive/consolidation-plan.md +72 -0
- connectonion/docs/archive/archive/core-principles-extracted.md +239 -0
- connectonion/docs/archive/archive/master-principles.md +222 -0
- connectonion/docs/archive/archive/principles.md +293 -0
- connectonion/docs/archive/archive/simplicity-principles.md +221 -0
- connectonion/docs/archive/attack-defense-insights.md +410 -0
- connectonion/docs/archive/business-model.md +305 -0
- connectonion/docs/archive/core-principles-unified.md +190 -0
- connectonion/docs/archive/discussion-journey.md +178 -0
- connectonion/docs/archive/economic-analysis.md +323 -0
- connectonion/docs/archive/features/01-share-and-find.md +256 -0
- connectonion/docs/archive/features/02-agent-authentication.md +93 -0
- connectonion/docs/archive/features/03-test-before-trust.md +71 -0
- connectonion/docs/archive/features/06-reliability-and-offline.md +197 -0
- connectonion/docs/archive/features/README.md +46 -0
- connectonion/docs/archive/features-roadmap.md +247 -0
- connectonion/docs/archive/mcp-comparison-insights.md +215 -0
- connectonion/docs/archive/migration-strategy.md +571 -0
- connectonion/docs/archive/mini-whitepaper.md +293 -0
- connectonion/docs/archive/network-protocol.md +394 -0
- connectonion/docs/archive/semantic-revolution.md +367 -0
- connectonion/docs/archive/technical-architecture.md +453 -0
- connectonion/docs/archive/the-semantic-insight.md +207 -0
- connectonion/docs/archive/threat-model.md +164 -0
- connectonion/docs/cli/README.md +805 -0
- connectonion/docs/cli/auth.md +46 -0
- connectonion/docs/cli/browser.md +235 -0
- connectonion/docs/cli/copy.md +232 -0
- connectonion/docs/cli/create.md +335 -0
- connectonion/docs/cli/init.md +431 -0
- connectonion/docs/co-directory-structure.md +214 -0
- connectonion/docs/concepts/agent.md +1078 -0
- connectonion/docs/concepts/events.md +699 -0
- connectonion/docs/concepts/llm_do.md +256 -0
- connectonion/docs/concepts/max_iterations.md +362 -0
- connectonion/docs/concepts/models.md +641 -0
- connectonion/docs/concepts/plugins.md +101 -0
- connectonion/docs/concepts/prompts.md +122 -0
- connectonion/docs/concepts/session.md +428 -0
- connectonion/docs/concepts/tools.md +512 -0
- connectonion/docs/concepts/transcribe.md +156 -0
- connectonion/docs/concepts/trust.md +291 -0
- connectonion/docs/connectonion.md +1256 -0
- connectonion/docs/debug/README.md +18 -0
- connectonion/docs/debug/auto_debug.md +1026 -0
- connectonion/docs/debug/console.md +129 -0
- connectonion/docs/debug/eval-format.md +178 -0
- connectonion/docs/debug/eval.md +230 -0
- connectonion/docs/debug/exceptions.md +307 -0
- connectonion/docs/debug/log.md +117 -0
- connectonion/docs/debug/xray.md +215 -0
- connectonion/docs/design-decisions/001-choosing-input-method.md +202 -0
- connectonion/docs/design-decisions/002-choosing-llm-function-name.md +202 -0
- connectonion/docs/design-decisions/003-choosing-trust-keyword.md +141 -0
- connectonion/docs/design-decisions/004-cli-create-flow.md +117 -0
- connectonion/docs/design-decisions/005-designing-agent-network-protocol.md +503 -0
- connectonion/docs/design-decisions/006-agent-address-format.md +305 -0
- connectonion/docs/design-decisions/007-authentication-backend-design.md +240 -0
- connectonion/docs/design-decisions/008-naming-is-hard.md +228 -0
- connectonion/docs/design-decisions/009-why-connect-function.md +167 -0
- connectonion/docs/design-decisions/010-cli-ux-progressive-disclosure.md +176 -0
- connectonion/docs/design-decisions/011-global-config-identity-management.md +357 -0
- connectonion/docs/design-decisions/012-tool-execution-separation.md +259 -0
- connectonion/docs/design-decisions/013-debug-and-logging-design.md +253 -0
- connectonion/docs/design-decisions/014-hook-system-design.md +510 -0
- connectonion/docs/design-decisions/015-interactive-auto-debug-design.md +837 -0
- connectonion/docs/design-decisions/016-why-no-zero-knowledge-proofs.md +358 -0
- connectonion/docs/design-decisions/017-session-logging-and-eval-format.md +120 -0
- connectonion/docs/design-decisions/018-event-api-naming.md +274 -0
- connectonion/docs/design-decisions/019-agent-lifecycle-design.md +655 -0
- connectonion/docs/design-decisions/020-trust-system-and-network-architecture.md +503 -0
- connectonion/docs/design-decisions/021-task-storage-jsonl-design.md +496 -0
- connectonion/docs/design-decisions/022-raw-asgi-implementation.md +273 -0
- connectonion/docs/examples.md +0 -0
- connectonion/docs/hook-system-options.md +364 -0
- connectonion/docs/integrations/README.md +12 -0
- connectonion/docs/integrations/auth.md +450 -0
- connectonion/docs/integrations/google.md +431 -0
- connectonion/docs/integrations/microsoft.md +370 -0
- connectonion/docs/network/README.md +14 -0
- connectonion/docs/network/connect.md +629 -0
- connectonion/docs/network/deploy.md +124 -0
- connectonion/docs/network/host.md +1087 -0
- connectonion/docs/network/io.md +538 -0
- connectonion/docs/network/protocol/agent-relay-protocol.md +495 -0
- connectonion/docs/network/protocol/announce-message.md +115 -0
- connectonion/docs/principles.md +124 -0
- connectonion/docs/quickstart.md +261 -0
- connectonion/docs/roadmap.md +81 -0
- connectonion/docs/templates/README.md +77 -0
- connectonion/docs/templates/meta-agent.md +152 -0
- connectonion/docs/templates/minimal.md +105 -0
- connectonion/docs/templates/playwright.md +130 -0
- connectonion/docs/templates/web-research.md +144 -0
- connectonion/docs/tui/README.md +95 -0
- connectonion/docs/tui/chat.md +181 -0
- connectonion/docs/tui/divider.md +63 -0
- connectonion/docs/tui/dropdown.md +83 -0
- connectonion/docs/tui/footer.md +44 -0
- connectonion/docs/tui/fuzzy.md +68 -0
- connectonion/docs/tui/input.md +84 -0
- connectonion/docs/tui/keys.md +77 -0
- connectonion/docs/tui/pick.md +71 -0
- connectonion/docs/tui/providers.md +89 -0
- connectonion/docs/tui/status_bar.md +67 -0
- connectonion/docs/useful_plugins/README.md +160 -0
- connectonion/docs/useful_plugins/calendar_plugin.md +68 -0
- connectonion/docs/useful_plugins/eval.md +89 -0
- connectonion/docs/useful_plugins/gmail_plugin.md +68 -0
- connectonion/docs/useful_plugins/image_result_formatter.md +74 -0
- connectonion/docs/useful_plugins/re_act.md +86 -0
- connectonion/docs/useful_plugins/shell_approval.md +69 -0
- connectonion/docs/useful_plugins/system_reminder.md +210 -0
- connectonion/docs/useful_plugins/tool_approval.md +139 -0
- connectonion/docs/useful_prompts/README.md +127 -0
- connectonion/docs/useful_prompts/coding_agent.md +214 -0
- connectonion/docs/useful_tools/README.md +81 -0
- connectonion/docs/useful_tools/ask_user.md +103 -0
- connectonion/docs/useful_tools/diff_writer.md +158 -0
- connectonion/docs/useful_tools/get_emails.md +519 -0
- connectonion/docs/useful_tools/gmail.md +155 -0
- connectonion/docs/useful_tools/google_calendar.md +126 -0
- connectonion/docs/useful_tools/memory.md +506 -0
- connectonion/docs/useful_tools/microsoft_calendar.md +126 -0
- connectonion/docs/useful_tools/outlook.md +140 -0
- connectonion/docs/useful_tools/send_email.md +423 -0
- connectonion/docs/useful_tools/shell.md +115 -0
- connectonion/docs/useful_tools/slash_command.md +116 -0
- connectonion/docs/useful_tools/terminal.md +115 -0
- connectonion/docs/useful_tools/todo_list.md +272 -0
- connectonion/docs/useful_tools/web_fetch.md +150 -0
- connectonion/docs/vibe-coding-guide.md +97 -0
- connectonion/docs/windows-support.md +258 -0
- connectonion/logger.py +3 -3
- connectonion/network/__init__.py +19 -6
- connectonion/network/asgi/__init__.py +81 -0
- connectonion/network/asgi/http.py +205 -0
- connectonion/network/asgi/websocket.py +217 -0
- connectonion/network/connect.py +232 -185
- connectonion/network/host/__init__.py +59 -0
- connectonion/network/host/auth.py +191 -0
- connectonion/network/host/routes.py +135 -0
- connectonion/network/host/server.py +289 -0
- connectonion/network/host/session.py +78 -0
- connectonion/network/io/__init__.py +21 -0
- connectonion/network/{connection.py → io/base.py} +17 -42
- connectonion/network/io/websocket.py +55 -0
- connectonion/network/relay.py +37 -16
- connectonion/network/trust/__init__.py +30 -0
- connectonion/network/trust/factory.py +138 -0
- connectonion/network/{trust_agents.py → trust/prompts.py} +3 -3
- connectonion/network/{trust_functions.py → trust/tools.py} +2 -2
- connectonion/prompt_files/__init__.py +11 -1
- connectonion/prompt_files/react_acknowledge.md +26 -0
- connectonion/prompts.py +10 -1
- connectonion/tui/chat.py +10 -1
- connectonion/tui/divider.py +10 -1
- connectonion/tui/dropdown.py +10 -1
- connectonion/tui/footer.py +8 -0
- connectonion/tui/fuzzy.py +11 -1
- connectonion/tui/input.py +118 -70
- connectonion/tui/keys.py +133 -6
- connectonion/tui/providers.py +11 -1
- connectonion/tui/status_bar.py +10 -1
- connectonion/useful_events_handlers/__init__.py +8 -0
- connectonion/useful_events_handlers/reflect.py +19 -4
- connectonion/useful_plugins/__init__.py +3 -1
- connectonion/useful_plugins/eval.py +2 -2
- connectonion/useful_plugins/gmail_plugin.py +3 -3
- connectonion/useful_plugins/image_result_formatter.py +3 -3
- connectonion/useful_plugins/re_act.py +114 -28
- connectonion/useful_plugins/shell_approval.py +2 -2
- connectonion/useful_plugins/system_reminder.py +103 -0
- connectonion/useful_plugins/tool_approval.py +233 -0
- connectonion/useful_plugins/ui_stream.py +18 -133
- connectonion/useful_prompts/README.md +61 -0
- connectonion/useful_prompts/__init__.py +45 -0
- connectonion/useful_prompts/coding_agent/README.md +106 -0
- connectonion/useful_prompts/coding_agent/assembler.py +123 -0
- connectonion/useful_prompts/coding_agent/prompts/main.md +227 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/ask_user.md +61 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/background.md +57 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/edit.md +90 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/glob.md +52 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/grep.md +55 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/plan_mode.md +80 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/read.md +40 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/shell.md +67 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/task.md +51 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/todo.md +139 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/write.md +48 -0
- connectonion/useful_prompts/system-reminders/security-warning.md +14 -0
- connectonion/useful_prompts/system-reminders/test-reminder.md +11 -0
- connectonion/useful_tools/__init__.py +31 -4
- connectonion/useful_tools/ask_user.py +35 -0
- connectonion/useful_tools/bash.py +69 -0
- connectonion/useful_tools/diff_writer.py +186 -94
- connectonion/useful_tools/edit.py +102 -0
- connectonion/useful_tools/glob_files.py +97 -0
- connectonion/useful_tools/grep_files.py +171 -0
- connectonion/useful_tools/multi_edit.py +116 -0
- connectonion/useful_tools/read_file.py +73 -0
- connectonion/useful_tools/shell.py +50 -45
- connectonion/useful_tools/write_file.py +129 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.4.dist-info}/METADATA +10 -3
- connectonion-0.6.4.dist-info/RECORD +472 -0
- connectonion/network/asgi.py +0 -407
- connectonion/network/host.py +0 -616
- connectonion/network/trust.py +0 -166
- connectonion-0.6.2.dist-info/RECORD +0 -129
- /connectonion/cli/{docs → co_ai/prompts/connectonion}/connectonion.md +0 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.4.dist-info}/WHEEL +0 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.4.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
# ConnectOnion Init Command
|
|
2
|
+
|
|
3
|
+
The `co init` command initializes ConnectOnion in an existing directory, perfect for adding agent capabilities to existing projects.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
co init [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Initializes ConnectOnion in the current directory with:
|
|
12
|
+
- AI features enabled by default
|
|
13
|
+
- Global address/email from `~/.co/`
|
|
14
|
+
- API keys appended to existing `.env` (or created if missing)
|
|
15
|
+
- Template files added to your project
|
|
16
|
+
- Docs always updated to latest version
|
|
17
|
+
|
|
18
|
+
## Command Comparison
|
|
19
|
+
|
|
20
|
+
| Feature | `co create` | `co init` |
|
|
21
|
+
|---------|------------|-----------|
|
|
22
|
+
| Creates new directory | ✅ Yes | ❌ No (uses current) |
|
|
23
|
+
| Can work in non-empty dir | ❌ No | ✅ Yes |
|
|
24
|
+
| Uses global identity | ✅ Yes | ✅ Yes |
|
|
25
|
+
| Copies global API keys | ✅ Yes | ✅ Yes (appends) |
|
|
26
|
+
| Supports templates | ✅ Yes | ✅ Yes |
|
|
27
|
+
|
|
28
|
+
## Usage Scenarios
|
|
29
|
+
|
|
30
|
+
### Scenario 1: Adding to Existing Project with .env
|
|
31
|
+
|
|
32
|
+
You have a project with existing `.env` file:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
$ cd my-existing-project
|
|
36
|
+
$ cat .env
|
|
37
|
+
DATABASE_URL=postgres://localhost/mydb
|
|
38
|
+
SECRET_KEY=mysecret
|
|
39
|
+
|
|
40
|
+
$ co init
|
|
41
|
+
|
|
42
|
+
🧅 ConnectOnion Project Initializer
|
|
43
|
+
========================================
|
|
44
|
+
|
|
45
|
+
✓ Using global identity
|
|
46
|
+
✓ Found existing .env file
|
|
47
|
+
✓ Appending API keys from ~/.co/keys.env
|
|
48
|
+
|
|
49
|
+
$ cat .env
|
|
50
|
+
DATABASE_URL=postgres://localhost/mydb
|
|
51
|
+
SECRET_KEY=mysecret
|
|
52
|
+
|
|
53
|
+
# ConnectOnion API Keys
|
|
54
|
+
OPENAI_API_KEY=sk-proj-xxx
|
|
55
|
+
ANTHROPIC_API_KEY=sk-ant-xxx
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Your existing environment variables are preserved, API keys are appended!
|
|
59
|
+
|
|
60
|
+
### Scenario 2: Quick Init in Empty Directory
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
$ mkdir my-new-agent
|
|
64
|
+
$ cd my-new-agent
|
|
65
|
+
$ co init --yes
|
|
66
|
+
|
|
67
|
+
✓ Using global identity
|
|
68
|
+
✓ Created new .env with API keys from ~/.co/keys.env
|
|
69
|
+
|
|
70
|
+
✅ ConnectOnion project initialized!
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Scenario 3: Updating Documentation
|
|
74
|
+
|
|
75
|
+
Running `co init` again updates docs to latest version:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
$ co init
|
|
79
|
+
|
|
80
|
+
✓ Project already initialized
|
|
81
|
+
✓ Updating .co/docs/ to latest version
|
|
82
|
+
✓ .env already has API keys
|
|
83
|
+
|
|
84
|
+
✅ Documentation updated!
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## What Gets Added/Updated
|
|
88
|
+
|
|
89
|
+
When you run `co init`:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
your-project/
|
|
93
|
+
├── agent.py # Added if missing (skipped if exists)
|
|
94
|
+
├── .env # APPENDED with API keys (created if missing)
|
|
95
|
+
├── .co/
|
|
96
|
+
│ ├── config.toml # Project config (uses global identity)
|
|
97
|
+
│ └── docs/ # ALWAYS UPDATED to latest version
|
|
98
|
+
│ ├── co-vibe-coding-all-in-one.md # Overwritten
|
|
99
|
+
│ └── connectonion.md # Overwritten
|
|
100
|
+
└── [your existing files remain untouched]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## File Handling Strategy
|
|
104
|
+
|
|
105
|
+
| File/Directory | If Exists | Behavior |
|
|
106
|
+
|----------------|-----------|----------|
|
|
107
|
+
| `agent.py` | Skip | Won't overwrite user code |
|
|
108
|
+
| `.env` | **Append** | Adds API keys if missing |
|
|
109
|
+
| `.co/docs/` | **Overwrite** | Always latest documentation |
|
|
110
|
+
| `.co/config.toml` | Update | Preserves custom settings |
|
|
111
|
+
| `.gitignore` | Append | Adds ConnectOnion entries |
|
|
112
|
+
|
|
113
|
+
## .env Handling Details
|
|
114
|
+
|
|
115
|
+
### Case 1: No .env File
|
|
116
|
+
Creates new `.env` with API keys from `~/.co/keys.env`:
|
|
117
|
+
```bash
|
|
118
|
+
# Created .env
|
|
119
|
+
OPENAI_API_KEY=sk-proj-xxx
|
|
120
|
+
ANTHROPIC_API_KEY=sk-ant-xxx
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Case 2: .env Exists, No API Keys
|
|
124
|
+
Appends API keys to existing file:
|
|
125
|
+
```bash
|
|
126
|
+
# Original .env
|
|
127
|
+
DATABASE_URL=postgres://localhost
|
|
128
|
+
REDIS_URL=redis://localhost
|
|
129
|
+
|
|
130
|
+
# After co init
|
|
131
|
+
DATABASE_URL=postgres://localhost
|
|
132
|
+
REDIS_URL=redis://localhost
|
|
133
|
+
|
|
134
|
+
# ConnectOnion API Keys
|
|
135
|
+
OPENAI_API_KEY=sk-proj-xxx
|
|
136
|
+
ANTHROPIC_API_KEY=sk-ant-xxx
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Case 3: .env Has Some API Keys
|
|
140
|
+
Only appends missing keys:
|
|
141
|
+
```bash
|
|
142
|
+
# Original .env
|
|
143
|
+
OPENAI_API_KEY=sk-proj-old
|
|
144
|
+
|
|
145
|
+
# After co init (adds missing keys)
|
|
146
|
+
OPENAI_API_KEY=sk-proj-old
|
|
147
|
+
|
|
148
|
+
# ConnectOnion API Keys
|
|
149
|
+
ANTHROPIC_API_KEY=sk-ant-xxx # Added
|
|
150
|
+
GEMINI_API_KEY=AIza... # Added
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Case 4: .env Has All Keys
|
|
154
|
+
No changes made:
|
|
155
|
+
```bash
|
|
156
|
+
✓ .env already contains all API keys
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Global Configuration
|
|
160
|
+
|
|
161
|
+
Like `co create`, `co init` uses the global configuration:
|
|
162
|
+
|
|
163
|
+
### First Time Setup
|
|
164
|
+
If `~/.co/` doesn't exist, it's created automatically:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
$ co init # First time ever
|
|
168
|
+
|
|
169
|
+
🚀 Welcome to ConnectOnion!
|
|
170
|
+
✨ Setting up global configuration...
|
|
171
|
+
✓ Generated master keypair
|
|
172
|
+
✓ Your address: 0x7a9f3b2c8d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a
|
|
173
|
+
✓ Your email: 0x7a9f3b2c@mail.openonion.ai
|
|
174
|
+
✓ Created ~/.co/config.toml
|
|
175
|
+
✓ Created ~/.co/keys.env
|
|
176
|
+
|
|
177
|
+
[continues with project initialization...]
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Using Existing Global Config
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
$ co init # After global config exists
|
|
184
|
+
|
|
185
|
+
✓ Using global identity
|
|
186
|
+
✓ Using global email: 0x7a9f3b2c@mail.openonion.ai
|
|
187
|
+
✓ Found OpenAI key in ~/.co/keys.env
|
|
188
|
+
✓ Appending to existing .env
|
|
189
|
+
|
|
190
|
+
[continues with project initialization...]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Command Options
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
co init [options]
|
|
197
|
+
|
|
198
|
+
Options:
|
|
199
|
+
--template, -t Template to use (minimal/web-research/playwright/custom)
|
|
200
|
+
--no-ai Disable AI features (not recommended)
|
|
201
|
+
--key API key to use (saves to global config)
|
|
202
|
+
--force Initialize even in special directories
|
|
203
|
+
--yes, -y Accept all defaults, skip prompts
|
|
204
|
+
--update-docs Only update documentation
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Templates
|
|
208
|
+
|
|
209
|
+
Same templates as `co create`:
|
|
210
|
+
|
|
211
|
+
1. **minimal** - Basic agent with simple tools
|
|
212
|
+
2. **web-research** - Web scraping and research
|
|
213
|
+
3. **playwright** - Browser automation
|
|
214
|
+
4. **custom** - AI-generated based on description
|
|
215
|
+
|
|
216
|
+
## Special Directory Warnings
|
|
217
|
+
|
|
218
|
+
`co init` warns when initializing in special directories:
|
|
219
|
+
|
|
220
|
+
- Home directory (`~`)
|
|
221
|
+
- Root directory (`/`)
|
|
222
|
+
- System directories (`/usr`, `/etc`)
|
|
223
|
+
- Git repositories (warns but allows)
|
|
224
|
+
|
|
225
|
+
Use `--force` to bypass warnings if you know what you're doing.
|
|
226
|
+
|
|
227
|
+
## Examples
|
|
228
|
+
|
|
229
|
+
### Basic Init
|
|
230
|
+
```bash
|
|
231
|
+
# In current directory
|
|
232
|
+
$ co init
|
|
233
|
+
|
|
234
|
+
# Accept all defaults
|
|
235
|
+
$ co init -y
|
|
236
|
+
|
|
237
|
+
# With specific template
|
|
238
|
+
$ co init --template web-research
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Adding to Django Project
|
|
242
|
+
```bash
|
|
243
|
+
$ cd my-django-app
|
|
244
|
+
$ co init
|
|
245
|
+
# Your existing .env is preserved
|
|
246
|
+
# DATABASE_URL, SECRET_KEY remain
|
|
247
|
+
# API keys are appended
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Updating Documentation Only
|
|
251
|
+
```bash
|
|
252
|
+
$ co init --update-docs
|
|
253
|
+
✓ Updated .co/docs/ to latest version
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Custom Template
|
|
257
|
+
```bash
|
|
258
|
+
$ co init --template custom --description "Discord bot integration"
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## Smart .env Merging
|
|
262
|
+
|
|
263
|
+
The `.env` append logic is intelligent:
|
|
264
|
+
|
|
265
|
+
```python
|
|
266
|
+
# Pseudo-code of .env handling
|
|
267
|
+
existing_env = read(".env")
|
|
268
|
+
global_keys = read("~/.co/keys.env")
|
|
269
|
+
|
|
270
|
+
for key, value in global_keys:
|
|
271
|
+
if key not in existing_env:
|
|
272
|
+
append_to_env(f"\n# ConnectOnion API Keys\n{key}={value}")
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
This ensures:
|
|
276
|
+
- No duplicate keys
|
|
277
|
+
- Existing values preserved
|
|
278
|
+
- Clear section for ConnectOnion keys
|
|
279
|
+
- Original file structure maintained
|
|
280
|
+
|
|
281
|
+
## Documentation Updates
|
|
282
|
+
|
|
283
|
+
The `.co/docs/` folder is **always overwritten** to ensure:
|
|
284
|
+
- Latest documentation version
|
|
285
|
+
- New features documented
|
|
286
|
+
- Bug fixes in docs
|
|
287
|
+
- Consistent formatting
|
|
288
|
+
|
|
289
|
+
This is safe because users shouldn't edit framework docs directly.
|
|
290
|
+
|
|
291
|
+
## Common Workflows
|
|
292
|
+
|
|
293
|
+
### 1. Existing Django/Flask Project
|
|
294
|
+
```bash
|
|
295
|
+
cd my-web-app
|
|
296
|
+
co init
|
|
297
|
+
# .env preserved with database URLs
|
|
298
|
+
# API keys appended
|
|
299
|
+
# Latest docs installed
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### 2. Updating Existing ConnectOnion Project
|
|
303
|
+
```bash
|
|
304
|
+
cd old-agent-project
|
|
305
|
+
co init
|
|
306
|
+
# Docs updated to latest
|
|
307
|
+
# Missing API keys added
|
|
308
|
+
# Config preserved
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### 3. Converting Script to Agent
|
|
312
|
+
```bash
|
|
313
|
+
cd my-scripts
|
|
314
|
+
co init
|
|
315
|
+
# Creates .env with API keys
|
|
316
|
+
# Adds agent.py template
|
|
317
|
+
# Your scripts untouched
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## Troubleshooting
|
|
321
|
+
|
|
322
|
+
### .env Already Has Different API Key
|
|
323
|
+
The existing key is preserved:
|
|
324
|
+
```bash
|
|
325
|
+
# Original .env
|
|
326
|
+
OPENAI_API_KEY=sk-old-key
|
|
327
|
+
|
|
328
|
+
# After co init - NOT changed
|
|
329
|
+
OPENAI_API_KEY=sk-old-key
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Docs Seem Old
|
|
333
|
+
Re-run init to update:
|
|
334
|
+
```bash
|
|
335
|
+
$ co init --update-docs
|
|
336
|
+
✓ Documentation updated to latest version
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### Want Fresh .env
|
|
340
|
+
Manually remove and re-init:
|
|
341
|
+
```bash
|
|
342
|
+
$ rm .env
|
|
343
|
+
$ co init
|
|
344
|
+
✓ Created new .env with latest API keys
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Best Practices
|
|
348
|
+
|
|
349
|
+
1. **Review .env after init** - Check that API keys were appended correctly
|
|
350
|
+
|
|
351
|
+
2. **Keep docs updated** - Run `co init --update-docs` periodically
|
|
352
|
+
|
|
353
|
+
3. **Don't edit framework docs** - They'll be overwritten on update
|
|
354
|
+
|
|
355
|
+
4. **Commit .co/config.toml** - Track project configuration
|
|
356
|
+
|
|
357
|
+
5. **Never commit .env** - Keep API keys secret
|
|
358
|
+
|
|
359
|
+
## File Safety Summary
|
|
360
|
+
|
|
361
|
+
| Action | Safe? | Why |
|
|
362
|
+
|--------|-------|-----|
|
|
363
|
+
| Append to .env | ✅ Yes | Only adds missing keys |
|
|
364
|
+
| Overwrite docs | ✅ Yes | Framework docs, not user content |
|
|
365
|
+
| Skip agent.py | ✅ Yes | Preserves user code |
|
|
366
|
+
| Update config | ✅ Yes | Merges, doesn't replace |
|
|
367
|
+
|
|
368
|
+
## Summary
|
|
369
|
+
|
|
370
|
+
`co init` intelligently integrates ConnectOnion into existing projects:
|
|
371
|
+
|
|
372
|
+
- **Preserves** - Your existing `.env` values
|
|
373
|
+
- **Appends** - Only missing API keys
|
|
374
|
+
- **Updates** - Documentation to latest
|
|
375
|
+
- **Respects** - Your existing code
|
|
376
|
+
- **Uses** - Global identity and keys
|
|
377
|
+
|
|
378
|
+
Perfect for adding AI agents to any Python project without disrupting existing configuration!
|
|
379
|
+
# ConnectOnion Init (co init)
|
|
380
|
+
|
|
381
|
+
Add ConnectOnion to an existing folder safely.
|
|
382
|
+
|
|
383
|
+
## Quick Start
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
cd existing-project
|
|
387
|
+
co init
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
## What It Does
|
|
391
|
+
|
|
392
|
+
- Uses your global identity from `~/.co` (address + email)
|
|
393
|
+
- Appends missing API keys to `.env` (creates it if missing)
|
|
394
|
+
- Adds `.co/config.toml` and refreshes `.co/docs/`
|
|
395
|
+
- Never overwrites your code (skips existing files)
|
|
396
|
+
|
|
397
|
+
## Safe In Existing Folders
|
|
398
|
+
|
|
399
|
+
- Warns in special/system directories (e.g., `~`, `/`)
|
|
400
|
+
- Shows what will be created or updated
|
|
401
|
+
- `--force` lets you continue when you know what you’re doing
|
|
402
|
+
|
|
403
|
+
## Templates
|
|
404
|
+
|
|
405
|
+
- minimal: basic agent
|
|
406
|
+
- playwright: browser automation
|
|
407
|
+
- custom: describe it, we generate it with AI
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
co init -t minimal
|
|
411
|
+
co init -t playwright
|
|
412
|
+
co init -t custom --description "Monitor a site and alert me"
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
## Options (the useful bits)
|
|
416
|
+
|
|
417
|
+
- `--template, -t`: `minimal` | `playwright` | `custom`
|
|
418
|
+
- `--key`: paste an API key (auto-detects provider and appends to `.env`)
|
|
419
|
+
- `--force`: continue in non-empty/special directories
|
|
420
|
+
- `--yes, -y`: accept defaults and skip prompts
|
|
421
|
+
|
|
422
|
+
Notes:
|
|
423
|
+
- Keeps `.env` intact; only appends missing keys
|
|
424
|
+
- Provider mapping: OpenAI → `OPENAI_API_KEY`, Anthropic → `ANTHROPIC_API_KEY`, Google → `GEMINI_API_KEY`, Groq → `GROQ_API_KEY`
|
|
425
|
+
- Attempts managed-key authentication on success (or run `co auth` later)
|
|
426
|
+
|
|
427
|
+
## Next Steps
|
|
428
|
+
|
|
429
|
+
```bash
|
|
430
|
+
python agent.py
|
|
431
|
+
```
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# The .co Directory Structure
|
|
2
|
+
|
|
3
|
+
ConnectOnion uses two `.co/` directories: a global one (`~/.co/`) for shared settings and a project one for local config.
|
|
4
|
+
|
|
5
|
+
## Global Directory (`~/.co/`)
|
|
6
|
+
|
|
7
|
+
Created automatically on first `co` command. Stores your identity and shared API keys.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
~/.co/
|
|
11
|
+
├── config.toml # Global configuration (address, default model)
|
|
12
|
+
├── keys.env # Shared API keys (.env format)
|
|
13
|
+
├── keys/ # Cryptographic identity
|
|
14
|
+
│ ├── agent.key # Ed25519 private key (NEVER SHARE)
|
|
15
|
+
│ ├── recovery.txt # 12-word recovery phrase
|
|
16
|
+
│ └── DO_NOT_SHARE # Warning file
|
|
17
|
+
├── logs/ # Agent activity logs ({agent_name}.log)
|
|
18
|
+
└── sessions/ # YAML session logs for eval/replay
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Project Directory (`.co/`)
|
|
22
|
+
|
|
23
|
+
Created by `co create` or `co init`. Contains project-specific runtime data.
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
.co/
|
|
27
|
+
├── keys/ # Project keys (if independent identity)
|
|
28
|
+
│ ├── agent.key # Private signing key (Ed25519)
|
|
29
|
+
│ ├── recovery.txt # 12-word recovery phrase
|
|
30
|
+
│ └── DO_NOT_SHARE # Warning file
|
|
31
|
+
├── logs/ # Agent activity logs ({agent_name}.log)
|
|
32
|
+
└── sessions/ # YAML session logs for eval/replay
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## config.toml Reference
|
|
36
|
+
|
|
37
|
+
The `config.toml` file exists only in the global `~/.co/` directory:
|
|
38
|
+
|
|
39
|
+
```toml
|
|
40
|
+
[connectonion]
|
|
41
|
+
framework_version = "0.0.7"
|
|
42
|
+
created = "2025-01-15T10:30:00.000000"
|
|
43
|
+
|
|
44
|
+
[cli]
|
|
45
|
+
version = "1.0.0"
|
|
46
|
+
|
|
47
|
+
[agent]
|
|
48
|
+
address = "0x7a9f3b2c8d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a"
|
|
49
|
+
short_address = "0x7a9f...7f8a"
|
|
50
|
+
email = "0x7a9f3b2c@mail.openonion.ai"
|
|
51
|
+
created_at = "2025-01-15T10:30:00.000000"
|
|
52
|
+
algorithm = "ed25519"
|
|
53
|
+
default_model = "co/gemini-2.5-pro"
|
|
54
|
+
max_iterations = 10
|
|
55
|
+
|
|
56
|
+
[auth]
|
|
57
|
+
token = "eyJhbGciOiJI..." # JWT for network auth
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Keys Directory
|
|
61
|
+
|
|
62
|
+
The `keys/` directory contains your agent's cryptographic identity. **This directory should NEVER be committed to version control.**
|
|
63
|
+
|
|
64
|
+
### agent.key
|
|
65
|
+
- **Format**: Binary Ed25519 private key (32 bytes)
|
|
66
|
+
- **Purpose**: Signs messages for agent-to-agent communication
|
|
67
|
+
- **Security**: Should be encrypted at rest (future feature)
|
|
68
|
+
|
|
69
|
+
### recovery.txt
|
|
70
|
+
- **Format**: 12-word BIP39 mnemonic phrase
|
|
71
|
+
- **Purpose**: Recover agent identity on new machines
|
|
72
|
+
- **Example**: `canyon robot vacuum circle tornado diet depart rough detect theme sword scissors`
|
|
73
|
+
- **Security**: Store securely, never share, enables full key recovery
|
|
74
|
+
|
|
75
|
+
### DO_NOT_SHARE
|
|
76
|
+
- **Format**: Plain text warning file
|
|
77
|
+
- **Purpose**: Reminds developers these are private keys
|
|
78
|
+
- **Content**:
|
|
79
|
+
```
|
|
80
|
+
⚠️ WARNING: PRIVATE KEYS - DO NOT SHARE ⚠️
|
|
81
|
+
|
|
82
|
+
This directory contains private cryptographic keys.
|
|
83
|
+
NEVER share these files or commit them to version control.
|
|
84
|
+
Anyone with these keys can impersonate your agent.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Agent Address Format
|
|
88
|
+
|
|
89
|
+
The agent address is a hex-encoded Ed25519 public key:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
0x3d4017c3e843895a92b70aa74d1b7ebc9c982ccf2ec4968cc0cd55f12af4660c
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- **Prefix**: `0x` (indicates hexadecimal, familiar from Ethereum)
|
|
96
|
+
- **Length**: 66 characters total (0x + 64 hex characters)
|
|
97
|
+
- **Content**: Direct encoding of 32-byte Ed25519 public key
|
|
98
|
+
- **Property**: Can be converted back to public key for signature verification
|
|
99
|
+
|
|
100
|
+
### Why This Format?
|
|
101
|
+
|
|
102
|
+
1. **No Information Loss**: The address IS the public key (not a hash)
|
|
103
|
+
2. **Direct Verification**: Can verify signatures without additional data
|
|
104
|
+
3. **Familiar Format**: Developers recognize the 0x prefix
|
|
105
|
+
4. **Fast Signatures**: Ed25519 provides 70,000 signatures/second
|
|
106
|
+
|
|
107
|
+
## Logs and Sessions
|
|
108
|
+
|
|
109
|
+
Created at runtime when agents execute.
|
|
110
|
+
|
|
111
|
+
### `logs/` - Plain Text Activity Logs
|
|
112
|
+
|
|
113
|
+
Each agent writes to `{agent_name}.log`:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
2025-01-15 10:30:00 [assistant] Task: What is 2+2?
|
|
117
|
+
2025-01-15 10:30:01 [assistant] Tool: calculate("2+2") -> 4
|
|
118
|
+
2025-01-15 10:30:02 [assistant] Result: The answer is 4
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### `sessions/` - YAML Session Logs
|
|
122
|
+
|
|
123
|
+
Detailed per-session logs for eval and replay:
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
# sessions/assistant_2025-01-15_103000.yaml
|
|
127
|
+
agent: assistant
|
|
128
|
+
model: co/gemini-2.5-pro
|
|
129
|
+
started_at: "2025-01-15T10:30:00Z"
|
|
130
|
+
turns:
|
|
131
|
+
- input: "What is 2+2?"
|
|
132
|
+
tools_called: ["calculate"]
|
|
133
|
+
result: "The answer is 4"
|
|
134
|
+
duration_ms: 1234
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Security Considerations
|
|
138
|
+
|
|
139
|
+
### What's Git-Ignored
|
|
140
|
+
|
|
141
|
+
The following should ALWAYS be in `.gitignore`:
|
|
142
|
+
|
|
143
|
+
```gitignore
|
|
144
|
+
# ConnectOnion sensitive files
|
|
145
|
+
.co/keys/ # Private keys - NEVER commit
|
|
146
|
+
.co/logs/ # May contain sensitive data
|
|
147
|
+
.co/evals/ # Session data
|
|
148
|
+
.env # API keys
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### What's Safe to Commit
|
|
152
|
+
|
|
153
|
+
Project `.co/` directories typically contain only runtime data (keys, logs, sessions) which should all be git-ignored. The project code itself is safe to commit.
|
|
154
|
+
|
|
155
|
+
## Progressive Disclosure
|
|
156
|
+
|
|
157
|
+
The `.co` directory follows ConnectOnion's philosophy of progressive disclosure:
|
|
158
|
+
|
|
159
|
+
1. **Day 1**: User never looks inside `.co`, everything just works
|
|
160
|
+
2. **Week 1**: User discovers their agent has an address in `config.toml`
|
|
161
|
+
3. **Month 1**: User learns about recovery phrases when setting up new machine
|
|
162
|
+
4. **Advanced**: User understands the Ed25519 cryptography when building network features
|
|
163
|
+
|
|
164
|
+
## Common Operations
|
|
165
|
+
|
|
166
|
+
### View Your Agent Address
|
|
167
|
+
```bash
|
|
168
|
+
cat ~/.co/config.toml | grep address
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Backup Your Identity
|
|
172
|
+
```bash
|
|
173
|
+
cp -r ~/.co/keys ~/secure-backup/
|
|
174
|
+
# Or just save the recovery phrase
|
|
175
|
+
cat ~/.co/keys/recovery.txt
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Add API Key
|
|
179
|
+
```bash
|
|
180
|
+
echo "NEW_API_KEY=xxx" >> ~/.co/keys.env
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Check Framework Version
|
|
184
|
+
```bash
|
|
185
|
+
cat ~/.co/config.toml | grep framework_version
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## FAQ
|
|
189
|
+
|
|
190
|
+
### Q: Why save the recovery phrase in plain text?
|
|
191
|
+
|
|
192
|
+
**Pragmatism over dogma.** Most developers would lose their keys without this. Advanced users can encrypt the directory. We chose usability for the 90% case.
|
|
193
|
+
|
|
194
|
+
### Q: Can I regenerate my keys?
|
|
195
|
+
|
|
196
|
+
No, and you shouldn't want to. Your address is your agent's identity. Changing it would break all existing connections. Use the recovery phrase to restore keys instead.
|
|
197
|
+
|
|
198
|
+
### Q: Why not use Ethereum keys for compatibility?
|
|
199
|
+
|
|
200
|
+
Ed25519 is 3x faster for signatures (70k/sec vs 20k/sec). For an agent network exchanging thousands of messages, performance matters more than blockchain compatibility.
|
|
201
|
+
|
|
202
|
+
### Q: Is the address a real Ethereum address?
|
|
203
|
+
|
|
204
|
+
No. It looks like one (0x prefix, hex format) for familiarity, but it's an Ed25519 public key, not an Ethereum address. You cannot receive ETH at this address.
|
|
205
|
+
|
|
206
|
+
## Summary
|
|
207
|
+
|
|
208
|
+
The `.co` directory encapsulates everything unique about your ConnectOnion project:
|
|
209
|
+
- **Identity**: Your agent's cryptographic address
|
|
210
|
+
- **Configuration**: Project and agent settings
|
|
211
|
+
- **Documentation**: Offline reference materials
|
|
212
|
+
- **History**: Runtime behavior tracking
|
|
213
|
+
|
|
214
|
+
Most users never need to understand these details. The system generates everything silently and it just works. But when you need to know, everything is transparent and well-documented.
|