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,256 @@
|
|
|
1
|
+
# Share and Find Functions
|
|
2
|
+
|
|
3
|
+
Share your functions and find what you need with natural language.
|
|
4
|
+
|
|
5
|
+
## Share Your Functions
|
|
6
|
+
|
|
7
|
+
Share any function with one line - no decorators needed.
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
from connectonion import share
|
|
11
|
+
|
|
12
|
+
# Any function can be shared
|
|
13
|
+
def translate(text: str, to_lang: str = "en") -> str:
|
|
14
|
+
"""I translate text to any language"""
|
|
15
|
+
return my_translation_logic(text, to_lang)
|
|
16
|
+
|
|
17
|
+
def analyze_sentiment(text: str) -> str:
|
|
18
|
+
"""I detect emotions in text"""
|
|
19
|
+
return sentiment_analysis(text)
|
|
20
|
+
|
|
21
|
+
# One line to share each
|
|
22
|
+
share(translate)
|
|
23
|
+
share(analyze_sentiment)
|
|
24
|
+
|
|
25
|
+
# That's it! Others can now find your functions
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Share Multiple with Agent (optional)
|
|
29
|
+
|
|
30
|
+
If you prefer a single entry point, bundle functions with a tiny Agent helper.
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from connectonion import Agent
|
|
34
|
+
|
|
35
|
+
agent = Agent(
|
|
36
|
+
name="writer-a1",
|
|
37
|
+
share=[translate, analyze_sentiment], # functions only; names default to fn.__name__
|
|
38
|
+
trust="tested" # How others must prove themselves to use my services
|
|
39
|
+
).start()
|
|
40
|
+
|
|
41
|
+
# Discovery stays the same
|
|
42
|
+
translator = need("translate to spanish")
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Find What You Need
|
|
46
|
+
|
|
47
|
+
Use natural language to describe what you need - no function names required.
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
from connectonion import need
|
|
51
|
+
|
|
52
|
+
# Just describe what you need
|
|
53
|
+
translator = need("translate text to spanish")
|
|
54
|
+
result = translator("Hello") # "Hola"
|
|
55
|
+
|
|
56
|
+
# With trust requirements
|
|
57
|
+
translator = need("translate text to spanish", trust="strict") # Only verified
|
|
58
|
+
analyzer = need("analyze sentiment", trust="tested") # Test before use
|
|
59
|
+
|
|
60
|
+
# Any natural description works
|
|
61
|
+
analyzer = need("figure out if this review is positive")
|
|
62
|
+
sentiment = analyzer("I love this product!") # "positive"
|
|
63
|
+
|
|
64
|
+
summarizer = need("make this text shorter")
|
|
65
|
+
calculator = need("solve math problems")
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Natural Language Magic
|
|
69
|
+
|
|
70
|
+
### Works in Any Language
|
|
71
|
+
```python
|
|
72
|
+
# English
|
|
73
|
+
processor = need("analyze customer feedback")
|
|
74
|
+
|
|
75
|
+
# Spanish
|
|
76
|
+
procesador = need("analizar comentarios de clientes")
|
|
77
|
+
|
|
78
|
+
# Chinese
|
|
79
|
+
处理器 = need("分析客户反馈")
|
|
80
|
+
|
|
81
|
+
# All find the same capability!
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Understands Variations
|
|
85
|
+
```python
|
|
86
|
+
# All of these find translation
|
|
87
|
+
translator = need("translate text")
|
|
88
|
+
translator = need("convert to another language")
|
|
89
|
+
translator = need("I don't understand this foreign text")
|
|
90
|
+
translator = need("help me read spanish")
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Context Aware
|
|
94
|
+
```python
|
|
95
|
+
# Same description, different context
|
|
96
|
+
helper = need("analyze this")
|
|
97
|
+
|
|
98
|
+
# Understands from your data
|
|
99
|
+
result1 = helper("I love it!") # Sentiment analysis
|
|
100
|
+
result2 = helper([1,2,3,4,5]) # Statistical analysis
|
|
101
|
+
result3 = helper(image_data) # Image analysis
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Complete Example
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
from connectonion import share, need
|
|
108
|
+
|
|
109
|
+
# 1. Share your function
|
|
110
|
+
def my_translator(text: str, target_lang: str = "en") -> str:
|
|
111
|
+
"""I translate text between languages"""
|
|
112
|
+
return translate_logic(text, target_lang)
|
|
113
|
+
|
|
114
|
+
share(my_translator)
|
|
115
|
+
|
|
116
|
+
# 2. Find what you need
|
|
117
|
+
sentiment_analyzer = need("detect emotions in text")
|
|
118
|
+
summarizer = need("make long text shorter")
|
|
119
|
+
|
|
120
|
+
# 3. Use them together
|
|
121
|
+
def process_review(foreign_review: str) -> dict:
|
|
122
|
+
# Translate first
|
|
123
|
+
english = my_translator(foreign_review, "en")
|
|
124
|
+
|
|
125
|
+
# Then analyze
|
|
126
|
+
sentiment = sentiment_analyzer(english)
|
|
127
|
+
summary = summarizer(english)
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
"sentiment": sentiment,
|
|
131
|
+
"summary": summary,
|
|
132
|
+
"original": foreign_review
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
# 4. Use it
|
|
136
|
+
result = process_review("¡Este producto es increíble!")
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Advanced Options
|
|
140
|
+
|
|
141
|
+
### Find Multiple Options
|
|
142
|
+
```python
|
|
143
|
+
# Get all available translators
|
|
144
|
+
translators = need.all("translate text")
|
|
145
|
+
|
|
146
|
+
# Try each one
|
|
147
|
+
for translator in translators:
|
|
148
|
+
try:
|
|
149
|
+
result = translator("Hello")
|
|
150
|
+
if result: # Found a working one
|
|
151
|
+
break
|
|
152
|
+
except:
|
|
153
|
+
continue
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Trust Requirements
|
|
157
|
+
```python
|
|
158
|
+
# Different trust levels
|
|
159
|
+
translator = need("translate text", trust="strict") # Only verified/whitelisted
|
|
160
|
+
analyzer = need("analyze data", trust="tested") # Test before use
|
|
161
|
+
scraper = need("scrape web", trust="open") # Trust anyone (dev mode)
|
|
162
|
+
|
|
163
|
+
# Custom trust policy
|
|
164
|
+
translator = need("translate text", trust="""
|
|
165
|
+
I trust agents that:
|
|
166
|
+
- Pass translation tests
|
|
167
|
+
- Respond within 500ms
|
|
168
|
+
- Are from trusted domains
|
|
169
|
+
""")
|
|
170
|
+
|
|
171
|
+
# Custom trust agent
|
|
172
|
+
my_trust = Agent("guardian", tools=[verify_capability, check_whitelist])
|
|
173
|
+
translator = need("translate text", trust=my_trust)
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Test Before Use
|
|
177
|
+
```python
|
|
178
|
+
# Test a function before trusting it
|
|
179
|
+
translator = need("translate to spanish")
|
|
180
|
+
|
|
181
|
+
# Test with known input/output
|
|
182
|
+
if translator.test("Hello", expected="Hola"):
|
|
183
|
+
# It works, use it
|
|
184
|
+
result = translator("Good morning")
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Sharing Options
|
|
188
|
+
|
|
189
|
+
### Share with Metadata
|
|
190
|
+
```python
|
|
191
|
+
share(
|
|
192
|
+
my_function,
|
|
193
|
+
description="Custom description",
|
|
194
|
+
tags=["fast", "reliable"],
|
|
195
|
+
max_concurrent=10
|
|
196
|
+
)
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Share Multiple Functions
|
|
200
|
+
```python
|
|
201
|
+
# Share all functions from a module
|
|
202
|
+
import my_tools
|
|
203
|
+
share.module(my_tools)
|
|
204
|
+
|
|
205
|
+
# Share specific functions
|
|
206
|
+
share.functions([translate, analyze, summarize])
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Temporary Sharing
|
|
210
|
+
```python
|
|
211
|
+
# Share for limited time
|
|
212
|
+
share(my_function, ttl=3600) # 1 hour
|
|
213
|
+
|
|
214
|
+
# Share only to specific network
|
|
215
|
+
share(my_function, network="local")
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Network Discovery
|
|
219
|
+
|
|
220
|
+
Functions are automatically discovered across:
|
|
221
|
+
- Local network (same WiFi/LAN)
|
|
222
|
+
- Trusted peers
|
|
223
|
+
- Public networks (opt-in)
|
|
224
|
+
|
|
225
|
+
```python
|
|
226
|
+
# See what's available
|
|
227
|
+
available = need.list()
|
|
228
|
+
print(f"Found {len(available)} functions")
|
|
229
|
+
|
|
230
|
+
# Search by capability
|
|
231
|
+
translators = need.search("translation")
|
|
232
|
+
analyzers = need.search("analysis")
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Error Handling
|
|
236
|
+
|
|
237
|
+
```python
|
|
238
|
+
def safe_processing(data):
|
|
239
|
+
try:
|
|
240
|
+
# Try advanced processor
|
|
241
|
+
processor = need("advanced data processing")
|
|
242
|
+
return processor(data)
|
|
243
|
+
except:
|
|
244
|
+
# Fallback to basic
|
|
245
|
+
basic = need("basic data processing")
|
|
246
|
+
return basic(data)
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## The Beauty
|
|
250
|
+
|
|
251
|
+
**Zero configuration.** Just:
|
|
252
|
+
1. `share(function)` - One line to share
|
|
253
|
+
2. `need("what you want")` - Natural language to find
|
|
254
|
+
3. Use it like any Python function
|
|
255
|
+
|
|
256
|
+
No decorators, no setup, no configuration files. It just works.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Agent-to-Agent Trust: Design Principles
|
|
2
|
+
|
|
3
|
+
## Core Principle: Trust IS an Agent
|
|
4
|
+
|
|
5
|
+
Trust isn't a protocol - it's just another agent with trust-checking tools.
|
|
6
|
+
|
|
7
|
+
## Five Guiding Principles
|
|
8
|
+
|
|
9
|
+
### 1. Trust Through Behavior, Not Credentials
|
|
10
|
+
|
|
11
|
+
Agents prove themselves by what they DO, not what they CLAIM:
|
|
12
|
+
- Pass capability tests (Can you translate "Hello" to "Hola"?)
|
|
13
|
+
- Demonstrate consistent performance
|
|
14
|
+
- Build trust through successful interactions
|
|
15
|
+
|
|
16
|
+
No certificates. No signatures. Just observable behavior.
|
|
17
|
+
|
|
18
|
+
### 2. Unix Philosophy: Small Functions, Composed by Prompts
|
|
19
|
+
|
|
20
|
+
Each trust function does ONE thing:
|
|
21
|
+
- `check_whitelist()` - 5 lines
|
|
22
|
+
- `test_capability()` - 10 lines
|
|
23
|
+
- `measure_response_time()` - 10 lines
|
|
24
|
+
|
|
25
|
+
The agent's prompt combines these into trust strategies. Complexity emerges from composition, not from complicated functions.
|
|
26
|
+
|
|
27
|
+
### 3. Natural Language Configuration
|
|
28
|
+
|
|
29
|
+
Trust requirements are markdown prompts, not JSON schemas:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
I trust agents that:
|
|
33
|
+
- Respond within 500ms
|
|
34
|
+
- Pass my capability tests
|
|
35
|
+
- Are on my whitelist OR from local network
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Both humans and AI understand this. No documentation needed.
|
|
39
|
+
|
|
40
|
+
### 4. Local Experience Over Global Reputation
|
|
41
|
+
|
|
42
|
+
Every agent maintains its OWN trust perspective:
|
|
43
|
+
- My experience: 100% weight
|
|
44
|
+
- Friend's experience: 30% weight
|
|
45
|
+
- Global reputation: 0% weight
|
|
46
|
+
|
|
47
|
+
This prevents reputation manipulation and respects agent autonomy.
|
|
48
|
+
|
|
49
|
+
### 5. Progressive Trust, Not Binary
|
|
50
|
+
|
|
51
|
+
Trust levels grow through interaction:
|
|
52
|
+
- Discovered → Tested → Verified → Trusted → Partner
|
|
53
|
+
|
|
54
|
+
Start with synthetic tests, build to production use. Trust degrades through failures, grows through success.
|
|
55
|
+
|
|
56
|
+
## Implementation: The `trust` Parameter
|
|
57
|
+
|
|
58
|
+
The `trust` parameter provides flexible trust configuration for both serving and consuming agents:
|
|
59
|
+
|
|
60
|
+
### Three Forms of Trust
|
|
61
|
+
|
|
62
|
+
1. **Trust Level (String)** - Simple predefined levels
|
|
63
|
+
- `"open"` - Trust everyone (development)
|
|
64
|
+
- `"tested"` - Test before trusting (default)
|
|
65
|
+
- `"strict"` - Only verified/whitelisted agents (production)
|
|
66
|
+
|
|
67
|
+
2. **Trust Policy (Prompt)** - Natural language requirements
|
|
68
|
+
```python
|
|
69
|
+
trust = """
|
|
70
|
+
I trust agents that:
|
|
71
|
+
- Pass capability tests
|
|
72
|
+
- Respond within 500ms
|
|
73
|
+
- Are on my whitelist OR from local network
|
|
74
|
+
"""
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
3. **Trust Agent** - Custom agent with trust tools
|
|
78
|
+
```python
|
|
79
|
+
trust_agent = Agent("guardian", tools=[verify, check_whitelist])
|
|
80
|
+
agent = Agent("my_bot", trust=trust_agent)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Bidirectional Trust
|
|
84
|
+
|
|
85
|
+
The same `trust` parameter works for both:
|
|
86
|
+
- **As Server**: `Agent("my_service", tools=[...], trust="strict")` - Who can use me
|
|
87
|
+
- **As Client**: `need("service", trust="strict")` - Who I trust to use
|
|
88
|
+
|
|
89
|
+
## The Result
|
|
90
|
+
|
|
91
|
+
When agents need to establish trust, their trust agents simply have a conversation. No special protocols. No complex frameworks. Just agents talking to agents using the same ConnectOnion tools.
|
|
92
|
+
|
|
93
|
+
Trust becomes invisible - exactly as it should be.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Test Before Trust
|
|
2
|
+
|
|
3
|
+
The `trust="tested"` parameter automatically tests agents before using them.
|
|
4
|
+
|
|
5
|
+
## Automatic Testing with Trust Parameter
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
# Automatic testing when trust="tested" (default)
|
|
9
|
+
translator = need("translate", trust="tested")
|
|
10
|
+
# ConnectOnion automatically tests the agent before returning it
|
|
11
|
+
|
|
12
|
+
# Skip testing for development
|
|
13
|
+
translator = need("translate", trust="open")
|
|
14
|
+
|
|
15
|
+
# Only use pre-verified agents
|
|
16
|
+
translator = need("translate", trust="strict")
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Manual Testing
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
# Test an agent manually
|
|
23
|
+
translator = need("translate", trust="open") # Get untested agent
|
|
24
|
+
result = translator.test("Hello", to_lang="es")
|
|
25
|
+
|
|
26
|
+
if result == "Hola":
|
|
27
|
+
# It works! Use it for real
|
|
28
|
+
translation = translator(important_text, to_lang="es")
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Batch Testing
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
def find_best_translator():
|
|
35
|
+
translators = discover.all("translate")
|
|
36
|
+
|
|
37
|
+
for t in translators:
|
|
38
|
+
try:
|
|
39
|
+
# Test with known input/output
|
|
40
|
+
result = t.test("Hello", to_lang="es")
|
|
41
|
+
if result == "Hola":
|
|
42
|
+
return t
|
|
43
|
+
except:
|
|
44
|
+
continue # Try next one
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Performance Testing
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
# Test speed and quality
|
|
51
|
+
analyzer = discover("sentiment analysis")
|
|
52
|
+
|
|
53
|
+
# Run test with timing
|
|
54
|
+
result = analyzer.test("I love this!", measure_time=True)
|
|
55
|
+
print(result.output) # "positive"
|
|
56
|
+
print(result.time_ms) # 45
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Sandbox Testing
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
# Safe testing with limits
|
|
63
|
+
untrusted = discover("data processor")
|
|
64
|
+
|
|
65
|
+
# Test with resource limits
|
|
66
|
+
result = untrusted.test(
|
|
67
|
+
sample_data,
|
|
68
|
+
timeout_ms=1000, # Max 1 second
|
|
69
|
+
memory_mb=100, # Max 100MB
|
|
70
|
+
)
|
|
71
|
+
```
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Reliability & Offline (Experience, Memory, Local First)
|
|
2
|
+
|
|
3
|
+
Make results reliable over time and keep working offline. This combines three simple ideas:
|
|
4
|
+
- Personal experience with functions (my_experience)
|
|
5
|
+
- Trust memory (prefer what worked before)
|
|
6
|
+
- Local-first (cache to work offline)
|
|
7
|
+
|
|
8
|
+
## Quick Start
|
|
9
|
+
|
|
10
|
+
```python
|
|
11
|
+
from connectonion import share, need
|
|
12
|
+
|
|
13
|
+
# Share once
|
|
14
|
+
def translate(text: str, to_lang: str = "es") -> str:
|
|
15
|
+
return my_translation(text, to_lang)
|
|
16
|
+
share(translate)
|
|
17
|
+
|
|
18
|
+
# Use naturally
|
|
19
|
+
translator = need("translate to Spanish")
|
|
20
|
+
print(translator("Hello")) # "Hola"
|
|
21
|
+
|
|
22
|
+
# Next time, need() prefers the same one that worked
|
|
23
|
+
translator = need("translate to Spanish")
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Personal Experience (my_experience)
|
|
29
|
+
|
|
30
|
+
Track your own history automatically and prefer what worked for you.
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
translator = need("translate text")
|
|
34
|
+
|
|
35
|
+
# Use it a few times
|
|
36
|
+
translator("Hello", to_lang="es")
|
|
37
|
+
translator("World", to_lang="es")
|
|
38
|
+
|
|
39
|
+
# Check your experience
|
|
40
|
+
print(translator.my_experience)
|
|
41
|
+
"""
|
|
42
|
+
{
|
|
43
|
+
"uses": 2,
|
|
44
|
+
"success_rate": 1.0,
|
|
45
|
+
"avg_time_ms": 47,
|
|
46
|
+
"last_used": "2024-01-10T10:30:00"
|
|
47
|
+
}
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
# Prefer trusted automatically
|
|
51
|
+
best = need("translate text", prefer_trusted=True)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
See recent interactions and manage experience.
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
analyzer = need("analyze text")
|
|
58
|
+
experience = analyzer.my_experience
|
|
59
|
+
print(f"Success rate: {experience.success_rate:.1%}")
|
|
60
|
+
print(f"Average time: {experience.avg_time_ms}ms")
|
|
61
|
+
print(f"Total uses: {experience.uses}")
|
|
62
|
+
|
|
63
|
+
for interaction in experience.recent(5):
|
|
64
|
+
print(f"{interaction.time}: {interaction.result}")
|
|
65
|
+
|
|
66
|
+
# Reset or forget
|
|
67
|
+
analyzer.reset_experience()
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Trust Memory (Prefer What Worked)
|
|
73
|
+
|
|
74
|
+
Remember what worked and reuse it next time. Dead simple.
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
# First time - discovers new
|
|
78
|
+
summarizer = need("summarize text")
|
|
79
|
+
summary = summarizer(article) # Works → remembered as "worked"
|
|
80
|
+
|
|
81
|
+
# Next time - returns the same one that worked
|
|
82
|
+
summarizer = need("summarize text")
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Avoid bad options automatically.
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
processor = need("process data")
|
|
89
|
+
result = processor(data) # Fails → remembered as "didn't work"
|
|
90
|
+
|
|
91
|
+
# Next time, returns a different one
|
|
92
|
+
processor = need("process data")
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Minimal mental model:
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
def need(description):
|
|
99
|
+
previous = find_in_memory(description)
|
|
100
|
+
if previous and previous.worked:
|
|
101
|
+
return previous
|
|
102
|
+
return discover(description) # internal detail; you just call need()
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Simple visibility and maintenance:
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
# See what worked for you
|
|
109
|
+
my_memory()
|
|
110
|
+
"""
|
|
111
|
+
✓ translator - worked
|
|
112
|
+
✓ summarizer - worked
|
|
113
|
+
✗ processor - didn't work
|
|
114
|
+
✓ analyzer - worked
|
|
115
|
+
"""
|
|
116
|
+
|
|
117
|
+
# Clean up old entries
|
|
118
|
+
forget_old() # Clears entries older than 30 days
|
|
119
|
+
reset_memory() # Start fresh
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Privacy by default:
|
|
123
|
+
- Only stores: minimal ID + worked/didn't work
|
|
124
|
+
- No data about your inputs
|
|
125
|
+
- No frequency tracking
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Local First (Cache & Offline)
|
|
130
|
+
|
|
131
|
+
Everything keeps working offline after first use.
|
|
132
|
+
|
|
133
|
+
```python
|
|
134
|
+
# First time - needs network
|
|
135
|
+
translator = need("translate text")
|
|
136
|
+
print(translator("Hello")) # "Hola"
|
|
137
|
+
|
|
138
|
+
# Second time - works offline (cached)
|
|
139
|
+
print(translator("World")) # Uses local cache
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Cache management made simple.
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
from connectonion import cache
|
|
146
|
+
|
|
147
|
+
# See what's cached
|
|
148
|
+
cache.list()
|
|
149
|
+
"""
|
|
150
|
+
Cached functions: 12
|
|
151
|
+
- translator (used 2h ago)
|
|
152
|
+
- analyzer (used 1d ago)
|
|
153
|
+
- summarizer (used 3d ago)
|
|
154
|
+
Total size: 45MB
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
# Pre-cache common needs
|
|
158
|
+
cache.download("sentiment analyzer")
|
|
159
|
+
cache.download("text processor")
|
|
160
|
+
|
|
161
|
+
# Clear old cache
|
|
162
|
+
cache.clean(older_than_days=30)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Force offline mode when needed.
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
from connectonion import offline_mode
|
|
169
|
+
|
|
170
|
+
# Only use cached functions
|
|
171
|
+
with offline_mode():
|
|
172
|
+
translator = need("translate text")
|
|
173
|
+
# Raises error if not cached
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Basic sync configuration (optional).
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
from connectonion import configure
|
|
180
|
+
|
|
181
|
+
configure(
|
|
182
|
+
cache_size_mb=500,
|
|
183
|
+
cache_duration_days=7,
|
|
184
|
+
auto_cache=True, # Cache everything you use
|
|
185
|
+
preload=["translate", "analyze"] # Keep these ready
|
|
186
|
+
)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Why This Works
|
|
192
|
+
|
|
193
|
+
- Your own experience is the best trust signal
|
|
194
|
+
- Simple memory beats complex reputation systems
|
|
195
|
+
- Local caching gives speed, reliability, and offline capability
|
|
196
|
+
|
|
197
|
+
Keep it simple: need() chooses, memory remembers, cache keeps you running.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# ConnectOnion Features
|
|
2
|
+
|
|
3
|
+
Simple features for agent developers.
|
|
4
|
+
|
|
5
|
+
## Core Features
|
|
6
|
+
|
|
7
|
+
1. **[Share & Find](01-share-and-find.md)** - Share functions and find what you need with natural language
|
|
8
|
+
2. **[Test before trust](03-test-before-trust.md)** - Try functions safely
|
|
9
|
+
|
|
10
|
+
## Trust & Reliability
|
|
11
|
+
|
|
12
|
+
3. **[Reliability & Offline](06-reliability-and-offline.md)** - Experience, memory, and offline cache
|
|
13
|
+
|
|
14
|
+
## Analytics
|
|
15
|
+
|
|
16
|
+
4. (reserved)
|
|
17
|
+
|
|
18
|
+
## Design Principles
|
|
19
|
+
|
|
20
|
+
- One line to share functions
|
|
21
|
+
- Natural language to find what you need
|
|
22
|
+
- Everything else automatic
|
|
23
|
+
- No configuration needed
|
|
24
|
+
- Trust through experience
|
|
25
|
+
|
|
26
|
+
## Getting Started
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
# 1. Share your function
|
|
30
|
+
from connectonion import share
|
|
31
|
+
|
|
32
|
+
def translate(text: str, to_lang: str = "en") -> str:
|
|
33
|
+
return my_translation(text, to_lang)
|
|
34
|
+
|
|
35
|
+
share(translate) # One line to share
|
|
36
|
+
|
|
37
|
+
# 2. Find what you need
|
|
38
|
+
from connectonion import need
|
|
39
|
+
|
|
40
|
+
summarizer = need("make this text shorter")
|
|
41
|
+
summary = summarizer(long_text)
|
|
42
|
+
|
|
43
|
+
# That's it!
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
See **[Share & Find](01-share-and-find.md)** for complete examples and advanced options.
|