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,293 @@
|
|
|
1
|
+
# Core Design Principles
|
|
2
|
+
|
|
3
|
+
The foundational philosophy guiding ConnectOnion's behavior-based protocol.
|
|
4
|
+
|
|
5
|
+
## The Fundamental Shift
|
|
6
|
+
|
|
7
|
+
We started by asking: **Why abandon IDs?**
|
|
8
|
+
|
|
9
|
+
- Traditional IDs are centralized, static, authority-based
|
|
10
|
+
- Real-world trust is behavioral, dynamic, observation-based
|
|
11
|
+
- AI agents make "understanding behavioral semantics" possible
|
|
12
|
+
|
|
13
|
+
### The Journey of Discovery
|
|
14
|
+
|
|
15
|
+
Our exploration revealed deeper truths:
|
|
16
|
+
|
|
17
|
+
1. **从技术到哲学** - We moved from "how to remove IDs" to "why IDs exist at all"
|
|
18
|
+
2. **从防御到免疫** - Shifted from "preventing attacks" to "making attacks meaningless"
|
|
19
|
+
3. **从复杂到简单** - Discovered that complexity breeds vulnerability, simplicity breeds robustness
|
|
20
|
+
4. **从设计到涌现** - Learned to create conditions for good behavior rather than enforcing rules
|
|
21
|
+
|
|
22
|
+
## Eight Core Principles
|
|
23
|
+
|
|
24
|
+
### 1. Behavior as Identity
|
|
25
|
+
**身份即行为**
|
|
26
|
+
|
|
27
|
+
Identity isn't predetermined - it emerges through sustained behavior. Each agent is the sum of its behavioral history. Trust stems from behavioral consistency and semantic coherence.
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
# Not this:
|
|
31
|
+
agent = Agent(id="agent-123", cert=certificate)
|
|
32
|
+
|
|
33
|
+
# But this:
|
|
34
|
+
agent = Agent() # Identity emerges from what it does
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Semantics over Syntax
|
|
38
|
+
**语义优于形式**
|
|
39
|
+
|
|
40
|
+
Protocols understand "intent" not "commands". Similar goals recognize each other despite different expressions. AI's semantic understanding is the protocol's core.
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
# These should find each other:
|
|
44
|
+
@agent
|
|
45
|
+
def summarize_document(text: str) -> str:
|
|
46
|
+
"""Create concise summary"""
|
|
47
|
+
|
|
48
|
+
@agent
|
|
49
|
+
def make_brief(content: str) -> str:
|
|
50
|
+
"""Generate short version"""
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 3. Attraction not Addressing
|
|
54
|
+
**吸引而非寻址**
|
|
55
|
+
|
|
56
|
+
Messages aren't "sent to addresses" but "attracted by behavior patterns". Like magnets, similar goals/behaviors naturally cluster.
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
# Not this:
|
|
60
|
+
send_to("agent://id-456", message)
|
|
61
|
+
|
|
62
|
+
# But this:
|
|
63
|
+
broadcast(goal="translation") # Attracted by capable agents
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 4. Dynamic Trust
|
|
67
|
+
**信任是动态的**
|
|
68
|
+
|
|
69
|
+
No permanent trust certificates. Trust adjusts real-time with behavior. Trust decays over time, requires continuous maintenance.
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
# Trust through successful interactions
|
|
73
|
+
trust = agent.behavioral_reputation
|
|
74
|
+
# Increases with success, decreases with failure
|
|
75
|
+
# Fades without interaction
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 5. Layered Complexity
|
|
79
|
+
**层次化复杂度**
|
|
80
|
+
|
|
81
|
+
Simple interactions use simple mechanisms. Complex collaboration needs deep verification. Cost matches risk value.
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
# Quick lookup: low verification
|
|
85
|
+
translate("Hello") # Simple, fast
|
|
86
|
+
|
|
87
|
+
# Financial transaction: deep verification
|
|
88
|
+
transfer_funds(amount=1000) # Multiple confirmations
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 6. Collective Intelligence
|
|
92
|
+
**群体智慧**
|
|
93
|
+
|
|
94
|
+
Individual nodes stay lightweight. Complex verification through group collaboration. Network collectively smarter than individuals.
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
# Distributed verification
|
|
98
|
+
verifiers = discover("verification", min_nodes=3)
|
|
99
|
+
consensus = vote(verifiers, behavior_claim)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 7. Progressive Deployment
|
|
103
|
+
**渐进式部署**
|
|
104
|
+
|
|
105
|
+
Start on existing networks. Gradually move deeper into stack. Maintain backward compatibility.
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Application Layer → Transport Layer → Network Layer
|
|
109
|
+
(Today) (Tomorrow) (Future)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 8. Natural Fault Tolerance
|
|
113
|
+
**自然容错**
|
|
114
|
+
|
|
115
|
+
Like natural systems, local failures don't affect the whole. No single point of failure. Errors are part of the system.
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
# Multiple paths to same goal
|
|
119
|
+
translators = discover_all("translation")
|
|
120
|
+
for translator in translators:
|
|
121
|
+
try:
|
|
122
|
+
return translator(text)
|
|
123
|
+
except:
|
|
124
|
+
continue # Natural failover
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Inspiration from Nature
|
|
128
|
+
|
|
129
|
+
### Market Model
|
|
130
|
+
Trust through repeated interaction, no ID cards needed.
|
|
131
|
+
- Vendors recognize regular customers by behavior
|
|
132
|
+
- New vendors prove quality through samples
|
|
133
|
+
- Bad actors naturally excluded by market forces
|
|
134
|
+
|
|
135
|
+
### Wolf Pack Coordination
|
|
136
|
+
Behavioral synchronization establishes trust.
|
|
137
|
+
- Hunting patterns create implicit coordination
|
|
138
|
+
- Trust emerges from successful collaboration
|
|
139
|
+
- No alpha needs to verify identities
|
|
140
|
+
|
|
141
|
+
### Ant Pheromones
|
|
142
|
+
Environmental signal propagation.
|
|
143
|
+
- Information persists in the environment
|
|
144
|
+
- Stronger paths attract more followers
|
|
145
|
+
- System works without individual identity
|
|
146
|
+
|
|
147
|
+
### Bird Flocking
|
|
148
|
+
Simple rules produce complex coordination.
|
|
149
|
+
- No bird has an ID or assigned position
|
|
150
|
+
- Three rules create emergent intelligence
|
|
151
|
+
- Flock responds as one without central control
|
|
152
|
+
|
|
153
|
+
### Love Resonance
|
|
154
|
+
Chemical reactions and behavioral mirroring.
|
|
155
|
+
- Recognition through behavioral patterns
|
|
156
|
+
- Trust built through repeated positive interaction
|
|
157
|
+
- No certificates needed for deep connection
|
|
158
|
+
|
|
159
|
+
## Design Philosophy
|
|
160
|
+
|
|
161
|
+
**Core Concept**: Create a network like a natural ecosystem
|
|
162
|
+
|
|
163
|
+
- No central authority
|
|
164
|
+
- Local interactions produce global intelligence
|
|
165
|
+
- Behavior and goals drive connections
|
|
166
|
+
- Trust builds naturally over time
|
|
167
|
+
- System self-heals and evolves
|
|
168
|
+
|
|
169
|
+
**Key Innovations**:
|
|
170
|
+
|
|
171
|
+
1. **Behavioral flows replace identity markers**
|
|
172
|
+
```
|
|
173
|
+
Traditional: ID → Certificate → Permission
|
|
174
|
+
Behavioral: Action → Pattern → Trust
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
2. **Semantic resonance replaces address matching**
|
|
178
|
+
```
|
|
179
|
+
Traditional: Route to IP/ID
|
|
180
|
+
Behavioral: Attract similar goals
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
3. **Dynamic trust replaces static certificates**
|
|
184
|
+
```
|
|
185
|
+
Traditional: Trust once, use forever
|
|
186
|
+
Behavioral: Trust earned continuously
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
4. **Group verification replaces central authority**
|
|
190
|
+
```
|
|
191
|
+
Traditional: CA signs certificate
|
|
192
|
+
Behavioral: Peers validate behavior
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Implementation Strategy
|
|
196
|
+
|
|
197
|
+
### Phase 1: Prove the Concept
|
|
198
|
+
- Start at application layer
|
|
199
|
+
- Use existing networks
|
|
200
|
+
- Validate core behavior-based discovery
|
|
201
|
+
|
|
202
|
+
### Phase 2: Deepen Integration
|
|
203
|
+
- Move into transport layer
|
|
204
|
+
- Remove more ID dependencies
|
|
205
|
+
- Enhance behavioral routing
|
|
206
|
+
|
|
207
|
+
### Phase 3: Full Realization
|
|
208
|
+
- Custom protocols at network layer
|
|
209
|
+
- Pure behavior-based networking
|
|
210
|
+
- Complete ID-free operation
|
|
211
|
+
|
|
212
|
+
## Balancing Act
|
|
213
|
+
|
|
214
|
+
### Security vs Usability
|
|
215
|
+
- Too much security → unusable network
|
|
216
|
+
- Too little → vulnerable system
|
|
217
|
+
- Solution: Adaptive security based on risk
|
|
218
|
+
|
|
219
|
+
**Key Insight**: 过度防御会让网络不可用
|
|
220
|
+
|
|
221
|
+
### Idealism vs Pragmatism
|
|
222
|
+
- Pure vision: No IDs anywhere
|
|
223
|
+
- Reality: Start where possible
|
|
224
|
+
- Evolution: Progressive enhancement
|
|
225
|
+
|
|
226
|
+
**Learned**: 完美是优秀的敌人
|
|
227
|
+
|
|
228
|
+
### Simplicity vs Power
|
|
229
|
+
- Simple for simple tasks
|
|
230
|
+
- Complex only when needed
|
|
231
|
+
- Power through composition
|
|
232
|
+
|
|
233
|
+
**Discovery**: 100行代码胜过1000页规范
|
|
234
|
+
|
|
235
|
+
### The Complexity Trap
|
|
236
|
+
We discovered how solutions create new problems:
|
|
237
|
+
```
|
|
238
|
+
问题 → 解决方案 → 新问题 → 新方案 → 更多问题...
|
|
239
|
+
↓
|
|
240
|
+
系统崩溃
|
|
241
|
+
```
|
|
242
|
+
**Wisdom**: 停止添加,开始删除
|
|
243
|
+
|
|
244
|
+
## The Philosophical Core
|
|
245
|
+
|
|
246
|
+
We're not just removing IDs - we're recognizing that:
|
|
247
|
+
|
|
248
|
+
1. **Identity is fluid** - "Who you are" matters less than "what you do"
|
|
249
|
+
2. **Trust is earned** - Not granted by authority but built through action
|
|
250
|
+
3. **Intelligence is distributed** - No single point of control or failure
|
|
251
|
+
4. **Systems evolve** - Like nature, the network adapts and improves
|
|
252
|
+
|
|
253
|
+
### Deeper Realizations
|
|
254
|
+
|
|
255
|
+
**技术实现的探索 (Technical Exploration)**
|
|
256
|
+
- Whether to abstract above TCP/IP or rebuild at WiFi/Mesh layer
|
|
257
|
+
- How to remove ID dependencies at different levels
|
|
258
|
+
- How behavior propagates and is perceived in the network
|
|
259
|
+
|
|
260
|
+
**语义理解的重要性 (Importance of Semantic Understanding)**
|
|
261
|
+
- Not recording "what tool was used"
|
|
262
|
+
- But understanding "what goal was pursued"
|
|
263
|
+
- AI can understand intent, infer motivation, predict behavior
|
|
264
|
+
|
|
265
|
+
**安全与效率的权衡 (Security-Efficiency Trade-offs)**
|
|
266
|
+
- Semantic camouflage, behavior injection, Sybil attack 2.0
|
|
267
|
+
- But over-defense makes the network unusable
|
|
268
|
+
- Need layered trust, probabilistic verification, adaptive strength
|
|
269
|
+
|
|
270
|
+
## Conclusion
|
|
271
|
+
|
|
272
|
+
These principles guide us toward a network that works like nature:
|
|
273
|
+
- Self-organizing
|
|
274
|
+
- Resilient
|
|
275
|
+
- Adaptive
|
|
276
|
+
- Trustworthy
|
|
277
|
+
|
|
278
|
+
Not through central control, but through the beautiful emergence of collective behavior.
|
|
279
|
+
|
|
280
|
+
The future network won't ask "who are you?" but "what can we do together?"
|
|
281
|
+
|
|
282
|
+
### The Ultimate Vision
|
|
283
|
+
|
|
284
|
+
**核心理念**: 创建一个像自然生态系统一样的网络
|
|
285
|
+
|
|
286
|
+
Where:
|
|
287
|
+
- 没有中央权威 (No central authority)
|
|
288
|
+
- 局部交互产生全局智能 (Local interactions create global intelligence)
|
|
289
|
+
- 行为和目标驱动连接 (Behavior and goals drive connections)
|
|
290
|
+
- 信任通过时间自然建立 (Trust builds naturally over time)
|
|
291
|
+
- 系统自我修复和进化 (System self-heals and evolves)
|
|
292
|
+
|
|
293
|
+
**Remember**: 这些原则不是最终答案,而是指导我们继续探索和改进协议的基石。
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# Principles from the Complexity Trap Discussion
|
|
2
|
+
|
|
3
|
+
## 1. The Complexity Trap Principle
|
|
4
|
+
**复杂性陷阱原理**
|
|
5
|
+
|
|
6
|
+
Every solution creates new problems. Adding mechanisms to solve those problems creates exponential complexity.
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
Problem → Solution → New Problem → New Solution → More Problems...
|
|
10
|
+
↓
|
|
11
|
+
System Collapse
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
**Wisdom**: Stop adding. Start removing.
|
|
15
|
+
|
|
16
|
+
## 2. Work as Authentication
|
|
17
|
+
**工作即认证**
|
|
18
|
+
|
|
19
|
+
The best proof of ability is doing the work. No certificates needed.
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
# Not: "Here's my certificate that I can translate"
|
|
23
|
+
# But: "Here's your text translated"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Insight**: In systems requiring real work, gaming becomes working.
|
|
27
|
+
|
|
28
|
+
## 3. Immunity Over Prevention
|
|
29
|
+
**免疫优于预防**
|
|
30
|
+
|
|
31
|
+
Don't try to prevent all attacks. Make the system immune to them.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Prevention mindset: Block every possible attack vector
|
|
35
|
+
Immunity mindset: Attacks happen but don't matter
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Example**: Spam exists but email still works.
|
|
39
|
+
|
|
40
|
+
## 4. Local Experience Suffices
|
|
41
|
+
**局部经验足矣**
|
|
42
|
+
|
|
43
|
+
You don't need global reputation. Your experience + neighbors' experience is enough.
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
def find_service():
|
|
47
|
+
# Not: Check global reputation system
|
|
48
|
+
# But: Use who worked for me + ask friends
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Power**: No central authority needed.
|
|
52
|
+
|
|
53
|
+
## 5. Natural Selection Works
|
|
54
|
+
**自然选择有效**
|
|
55
|
+
|
|
56
|
+
Let bad actors exist. They'll naturally disappear.
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
Good agents: Get used → Get recommended → Thrive
|
|
60
|
+
Bad agents: Fail tests → Don't get used → Disappear
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Beauty**: No enforcement needed.
|
|
64
|
+
|
|
65
|
+
## 6. Test at Point of Use
|
|
66
|
+
**使用点测试**
|
|
67
|
+
|
|
68
|
+
Verify capability when you need it, not before.
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
# Not: Pre-certification process
|
|
72
|
+
# But: "Show me you can do this specific task"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Efficiency**: No wasted verification.
|
|
76
|
+
|
|
77
|
+
## 7. Simplicity Enables Evolution
|
|
78
|
+
**简单促进进化**
|
|
79
|
+
|
|
80
|
+
Complex systems can't evolve. Simple systems naturally grow complexity where needed.
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
TCP/IP: Simple → Enabled the Internet
|
|
84
|
+
X.509: Complex → Constant problems
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Strategy**: Start minimal, let it grow.
|
|
88
|
+
|
|
89
|
+
## 8. The 100-Line Test
|
|
90
|
+
**百行测试**
|
|
91
|
+
|
|
92
|
+
If your protocol can't be implemented in 100 lines, it's too complex.
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
# Complete agent protocol:
|
|
96
|
+
class Agent:
|
|
97
|
+
def __init__(self):
|
|
98
|
+
self.experience = {}
|
|
99
|
+
|
|
100
|
+
def find(self, need):
|
|
101
|
+
candidates = self.ask_neighbors(need)
|
|
102
|
+
results = [c.demonstrate() for c in candidates]
|
|
103
|
+
best = max(results, key=lambda r: r.quality)
|
|
104
|
+
self.experience[best] = results
|
|
105
|
+
return best
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Discipline**: Complexity budget = 100 lines.
|
|
109
|
+
|
|
110
|
+
## 9. Attack Meaninglessness
|
|
111
|
+
**攻击无意义化**
|
|
112
|
+
|
|
113
|
+
The best defense makes attacks pointless, not impossible.
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
Sybil attack in our system:
|
|
117
|
+
- Create 1000 fake agents
|
|
118
|
+
- Each must pass real tests
|
|
119
|
+
- Each must do real work
|
|
120
|
+
- Congratulations, you created 1000 real agents!
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Judo**: Use attacker's energy against them.
|
|
124
|
+
|
|
125
|
+
## 10. Trust Through Interaction
|
|
126
|
+
**交互建立信任**
|
|
127
|
+
|
|
128
|
+
Trust isn't declared or certified. It's built through repeated interaction.
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
Traditional: Trust → Interaction
|
|
132
|
+
Natural: Interaction → Trust
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Human**: This is how all relationships work.
|
|
136
|
+
|
|
137
|
+
## 11. No Global State
|
|
138
|
+
**无全局状态**
|
|
139
|
+
|
|
140
|
+
Systems requiring global consensus are fragile. Each node knows only what it needs.
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
# Not: global_reputation[agent_id]
|
|
144
|
+
# But: my_experience[agent_id]
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Robustness**: No single point of failure.
|
|
148
|
+
|
|
149
|
+
## 12. Capability Over Identity
|
|
150
|
+
**能力优于身份**
|
|
151
|
+
|
|
152
|
+
"Who you are" matters less than "what you can do".
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
Question to avoid: "Are you certified?"
|
|
156
|
+
Question to ask: "Can you do this?"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Meritocracy**: Pure and simple.
|
|
160
|
+
|
|
161
|
+
## 13. The Elegance Principle
|
|
162
|
+
**优雅原则**
|
|
163
|
+
|
|
164
|
+
The right solution feels obvious in hindsight.
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
Complex solution: "After considering 47 attack vectors..."
|
|
168
|
+
Elegant solution: "Just test them."
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Beauty**: If it's not beautiful, it's not right.
|
|
172
|
+
|
|
173
|
+
## 14. Emergence Over Design
|
|
174
|
+
**涌现优于设计**
|
|
175
|
+
|
|
176
|
+
Don't design all behaviors. Create conditions for good behaviors to emerge.
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
Designed system: 1000 rules
|
|
180
|
+
Emergent system: 3 principles → 1000 behaviors
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**Nature**: Evolution beats intelligent design.
|
|
184
|
+
|
|
185
|
+
## 15. The Minimum Viable Protocol
|
|
186
|
+
**最小可行协议**
|
|
187
|
+
|
|
188
|
+
Start with the absolute minimum that could possibly work.
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
MVP Protocol:
|
|
192
|
+
1. Agents can test each other
|
|
193
|
+
2. Agents remember results
|
|
194
|
+
3. That's it
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Discipline**: Add nothing until reality demands it.
|
|
198
|
+
|
|
199
|
+
## Meta-Insight: The Complexity Immune System
|
|
200
|
+
|
|
201
|
+
**Traditional thinking**: Add mechanisms to prevent problems
|
|
202
|
+
**New thinking**: Build systems that remain simple despite problems
|
|
203
|
+
|
|
204
|
+
The greatest protocols (TCP/IP, HTTP, SMTP) are simple enough to explain to a child but robust enough to run the world.
|
|
205
|
+
|
|
206
|
+
## The Ultimate Test
|
|
207
|
+
|
|
208
|
+
Before adding any feature, ask:
|
|
209
|
+
1. Can the system work without it?
|
|
210
|
+
2. Does it make the system more complex?
|
|
211
|
+
3. Does it solve a real problem or theoretical one?
|
|
212
|
+
|
|
213
|
+
If yes, yes, theoretical → **Don't add it.**
|
|
214
|
+
|
|
215
|
+
## Conclusion
|
|
216
|
+
|
|
217
|
+
We've been solving the wrong problem. Instead of preventing all possible attacks, we should build systems where attacks are meaningless.
|
|
218
|
+
|
|
219
|
+
**The future belongs to protocols that a developer can understand in an afternoon and implement in a morning.**
|
|
220
|
+
|
|
221
|
+
Remember: 复杂性是熵。简单性是生命。
|