connectonion 0.6.2__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 +13 -3
- connectonion/cli/browser_agent/element_finder.py +8 -0
- connectonion/cli/browser_agent/highlight_screenshot.py +9 -1
- connectonion/cli/browser_agent/scroll.py +8 -0
- connectonion/cli/co_ai/__init__.py +6 -0
- connectonion/cli/co_ai/agent.py +87 -0
- connectonion/cli/co_ai/agents/__init__.py +5 -0
- connectonion/cli/co_ai/agents/registry.py +57 -0
- connectonion/cli/co_ai/commands/__init__.py +45 -0
- connectonion/cli/co_ai/commands/compact.py +173 -0
- connectonion/cli/co_ai/commands/cost.py +77 -0
- connectonion/cli/co_ai/commands/export.py +60 -0
- connectonion/cli/co_ai/commands/help.py +80 -0
- connectonion/cli/co_ai/commands/init.py +101 -0
- connectonion/cli/co_ai/commands/sessions.py +55 -0
- connectonion/cli/co_ai/commands/tasks.py +63 -0
- connectonion/cli/co_ai/commands/undo.py +103 -0
- connectonion/cli/co_ai/context.py +127 -0
- connectonion/cli/co_ai/main.py +52 -0
- connectonion/cli/co_ai/plugins/__init__.py +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.2.dist-info → connectonion-0.6.3.dist-info}/METADATA +10 -3
- connectonion-0.6.3.dist-info/RECORD +469 -0
- connectonion/network/asgi.py +0 -407
- connectonion/network/host.py +0 -616
- connectonion/network/trust.py +0 -166
- connectonion-0.6.2.dist-info/RECORD +0 -129
- /connectonion/cli/{docs → co_ai/prompts/connectonion}/connectonion.md +0 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.3.dist-info}/WHEEL +0 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.3.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# System Reminder Plugin
|
|
2
|
+
|
|
3
|
+
Inject contextual guidance into tool results to nudge agent behavior.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from connectonion import Agent
|
|
9
|
+
from connectonion.useful_plugins import system_reminder
|
|
10
|
+
|
|
11
|
+
agent = Agent("assistant", tools=[...], plugins=[system_reminder])
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Concept
|
|
15
|
+
|
|
16
|
+
System reminders are short messages appended to tool results that guide the agent's next action—without extra API calls or separate messages.
|
|
17
|
+
|
|
18
|
+
**Example**: After writing a Python file, remind the agent to consider testing.
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
write_file("app.py", code)
|
|
22
|
+
↓
|
|
23
|
+
Result: "File written successfully"
|
|
24
|
+
↓
|
|
25
|
+
With system reminder: "File written successfully
|
|
26
|
+
|
|
27
|
+
<system-reminder>
|
|
28
|
+
Consider running tests to verify your changes work correctly.
|
|
29
|
+
This is a gentle reminder - ignore if not applicable.
|
|
30
|
+
</system-reminder>"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The LLM sees the system reminder as part of the tool output and naturally considers it.
|
|
34
|
+
|
|
35
|
+
## How It Works
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
┌─────────────────────────────────────────────┐
|
|
39
|
+
│ SYSTEM REMINDER FLOW │
|
|
40
|
+
├─────────────────────────────────────────────┤
|
|
41
|
+
│ │
|
|
42
|
+
│ 1. Tool executes (e.g., write_file) │
|
|
43
|
+
│ ↓ │
|
|
44
|
+
│ 2. after_each_tool event fires │
|
|
45
|
+
│ ↓ │
|
|
46
|
+
│ 3. Plugin checks triggers: │
|
|
47
|
+
│ - tool name matches? │
|
|
48
|
+
│ - path pattern matches? │
|
|
49
|
+
│ ↓ │
|
|
50
|
+
│ 4. If match: append system reminder │
|
|
51
|
+
│ ↓ │
|
|
52
|
+
│ 5. LLM sees result + system reminder │
|
|
53
|
+
│ │
|
|
54
|
+
└─────────────────────────────────────────────┘
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Categories
|
|
58
|
+
|
|
59
|
+
Based on Claude Code patterns, system reminders fall into five categories:
|
|
60
|
+
|
|
61
|
+
| Category | Purpose | Example |
|
|
62
|
+
|----------|---------|---------|
|
|
63
|
+
| **Workflow Nudges** | Gentle best practice suggestions | "Consider running tests" |
|
|
64
|
+
| **State Notifications** | Inform about state changes | "You exited plan mode" |
|
|
65
|
+
| **External Events** | React to external changes | "File was modified by linter" |
|
|
66
|
+
| **Next Steps** | Guide what to do next | "Verify your implementation" |
|
|
67
|
+
| **Context Injection** | Provide relevant info | "This file contains secrets" |
|
|
68
|
+
|
|
69
|
+
## File Format
|
|
70
|
+
|
|
71
|
+
Each system reminder is a markdown file with YAML frontmatter:
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
---
|
|
75
|
+
name: test-reminder
|
|
76
|
+
triggers:
|
|
77
|
+
- tool: write_file
|
|
78
|
+
path_pattern: "*.py"
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
<system-reminder>
|
|
82
|
+
Consider running tests to verify your changes.
|
|
83
|
+
This is a gentle reminder - ignore if not applicable.
|
|
84
|
+
</system-reminder>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Frontmatter Fields
|
|
88
|
+
|
|
89
|
+
| Field | Required | Description |
|
|
90
|
+
|-------|----------|-------------|
|
|
91
|
+
| `name` | Yes | Unique identifier |
|
|
92
|
+
| `triggers` | Yes | List of trigger conditions |
|
|
93
|
+
| `triggers[].tool` | No | Tool name to match |
|
|
94
|
+
| `triggers[].path_pattern` | No | Glob pattern(s) for file path arguments |
|
|
95
|
+
| `triggers[].command_pattern` | No | Glob pattern(s) for command arguments |
|
|
96
|
+
|
|
97
|
+
### Variables
|
|
98
|
+
|
|
99
|
+
Use `${variable}` for dynamic content:
|
|
100
|
+
|
|
101
|
+
| Variable | Description |
|
|
102
|
+
|----------|-------------|
|
|
103
|
+
| `${file_path}` | File path from tool arguments |
|
|
104
|
+
| `${tool_name}` | Name of the tool that fired |
|
|
105
|
+
|
|
106
|
+
## Design Principles
|
|
107
|
+
|
|
108
|
+
**Gentle, Not Forceful**
|
|
109
|
+
- ✓ "Consider running tests"
|
|
110
|
+
- ✗ "You MUST run tests now"
|
|
111
|
+
|
|
112
|
+
**Contextual, Not Spammy**
|
|
113
|
+
- Fire only when relevant, not after every tool call
|
|
114
|
+
|
|
115
|
+
**Simple Patterns**
|
|
116
|
+
- Use glob: `*.py`, `["*.env", "*secret*"]`
|
|
117
|
+
- Not regex: `.*\.py$`
|
|
118
|
+
|
|
119
|
+
## Customizing
|
|
120
|
+
|
|
121
|
+
Copy the plugin and built-in reminders to your project:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
co copy system_reminder
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Creates:
|
|
128
|
+
```
|
|
129
|
+
./plugins/system_reminder.py
|
|
130
|
+
./prompts/system-reminders/
|
|
131
|
+
├── test-reminder.md
|
|
132
|
+
└── security-warning.md
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Then import from your local copy:
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
from plugins.system_reminder import system_reminder
|
|
139
|
+
agent = Agent("assistant", plugins=[system_reminder])
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Modify the reminder files in `./prompts/system-reminders/` to customize.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Examples
|
|
147
|
+
|
|
148
|
+
### Workflow Nudge: Test After Code Change
|
|
149
|
+
|
|
150
|
+
```markdown
|
|
151
|
+
---
|
|
152
|
+
name: test-reminder
|
|
153
|
+
triggers:
|
|
154
|
+
- tool: write_file
|
|
155
|
+
path_pattern: ["*.py", "*.js", "*.ts"]
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
<system-reminder>
|
|
159
|
+
Code was modified. Consider:
|
|
160
|
+
- Running relevant tests
|
|
161
|
+
- Checking for linter errors
|
|
162
|
+
This is a gentle reminder - ignore if not applicable.
|
|
163
|
+
</system-reminder>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### State Notification: Plan Mode Exited
|
|
167
|
+
|
|
168
|
+
```markdown
|
|
169
|
+
---
|
|
170
|
+
name: plan-mode-exited
|
|
171
|
+
triggers:
|
|
172
|
+
- tool: exit_plan_mode
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
<system-reminder>
|
|
176
|
+
You have exited plan mode. You can now make edits and run tools.
|
|
177
|
+
</system-reminder>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### External Event: File Modified Externally
|
|
181
|
+
|
|
182
|
+
```markdown
|
|
183
|
+
---
|
|
184
|
+
name: file-modified-externally
|
|
185
|
+
triggers:
|
|
186
|
+
- tool: file_watcher
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
<system-reminder>
|
|
190
|
+
${file_path} was modified externally (by user or linter).
|
|
191
|
+
Don't revert these changes unless asked.
|
|
192
|
+
</system-reminder>
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Context Injection: Security Warning
|
|
196
|
+
|
|
197
|
+
```markdown
|
|
198
|
+
---
|
|
199
|
+
name: security-warning
|
|
200
|
+
triggers:
|
|
201
|
+
- tool: read_file
|
|
202
|
+
path_pattern: ["*.env", "*secret*", "*.pem"]
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
<system-reminder>
|
|
206
|
+
This file may contain sensitive information.
|
|
207
|
+
- Never expose secrets in output
|
|
208
|
+
- Never commit real credentials
|
|
209
|
+
</system-reminder>
|
|
210
|
+
```
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Prompt Templates
|
|
2
|
+
|
|
3
|
+
Pre-built prompt structures for common agent patterns. Copy to your project and customize.
|
|
4
|
+
|
|
5
|
+
## Quick Reference
|
|
6
|
+
|
|
7
|
+
| Template | Purpose | Use Case |
|
|
8
|
+
|----------|---------|----------|
|
|
9
|
+
| [coding_agent](coding_agent.md) | Coding Agent Prompt | CLI coding tools, code review bots |
|
|
10
|
+
|
|
11
|
+
## Philosophy
|
|
12
|
+
|
|
13
|
+
These are **examples to copy**, not framework code to import.
|
|
14
|
+
|
|
15
|
+
1. Browse the templates
|
|
16
|
+
2. Copy what fits your needs
|
|
17
|
+
3. Modify freely - you own the code
|
|
18
|
+
|
|
19
|
+
No lock-in. No rigid structure. Just good patterns.
|
|
20
|
+
|
|
21
|
+
## Usage Pattern
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Copy template to your project
|
|
25
|
+
cp -r $(python -c "from connectonion.useful_prompts import get_example_path; print(get_example_path('coding_agent'))") ./my_prompts
|
|
26
|
+
|
|
27
|
+
# Or manually
|
|
28
|
+
cp -r .../connectonion/useful_prompts/coding_agent/ ./my_prompts
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
# Use the assembler from your copied template
|
|
33
|
+
from my_prompts.assembler import assemble_prompt
|
|
34
|
+
from connectonion import Agent, Shell, DiffWriter
|
|
35
|
+
|
|
36
|
+
tools = [Shell(), DiffWriter()]
|
|
37
|
+
prompt = assemble_prompt(prompts_dir="my_prompts/prompts", tools=tools)
|
|
38
|
+
|
|
39
|
+
agent = Agent("my-agent", system_prompt=prompt, tools=tools)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Why Modular Prompts?
|
|
43
|
+
|
|
44
|
+
Learned from Claude Code's architecture:
|
|
45
|
+
|
|
46
|
+
| Benefit | Description |
|
|
47
|
+
|---------|-------------|
|
|
48
|
+
| **Per-tool guidance** | Each tool gets dedicated "when to use" / "when NOT to use" |
|
|
49
|
+
| **Easy customization** | Modify one file without touching others |
|
|
50
|
+
| **Conditional assembly** | Only include prompts for tools you actually use |
|
|
51
|
+
| **Project context** | Add project-specific instructions separately |
|
|
52
|
+
|
|
53
|
+
## Template Structure
|
|
54
|
+
|
|
55
|
+
Each template follows this pattern:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
template_name/
|
|
59
|
+
├── prompts/
|
|
60
|
+
│ ├── main.md # Core agent behavior
|
|
61
|
+
│ └── tools/ # Per-tool guidance
|
|
62
|
+
│ ├── tool_a.md
|
|
63
|
+
│ └── tool_b.md
|
|
64
|
+
├── assembler.py # Prompt assembly utility
|
|
65
|
+
└── README.md # Template documentation
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Customizing Templates
|
|
69
|
+
|
|
70
|
+
### Modify agent behavior
|
|
71
|
+
Edit `prompts/main.md`:
|
|
72
|
+
- Agent personality and tone
|
|
73
|
+
- Workflow steps
|
|
74
|
+
- General guidelines
|
|
75
|
+
|
|
76
|
+
### Add tool guidance
|
|
77
|
+
Create `prompts/tools/my_tool.md`:
|
|
78
|
+
```markdown
|
|
79
|
+
# Tool: My Tool
|
|
80
|
+
|
|
81
|
+
## When to Use
|
|
82
|
+
- Situation A
|
|
83
|
+
- Situation B
|
|
84
|
+
|
|
85
|
+
## When NOT to Use
|
|
86
|
+
- Situation C
|
|
87
|
+
|
|
88
|
+
## Examples
|
|
89
|
+
<good-example>
|
|
90
|
+
...
|
|
91
|
+
</good-example>
|
|
92
|
+
|
|
93
|
+
<bad-example>
|
|
94
|
+
...
|
|
95
|
+
</bad-example>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Add project context
|
|
99
|
+
Create `.co/AGENT.md` in your project:
|
|
100
|
+
```markdown
|
|
101
|
+
# Project: My App
|
|
102
|
+
|
|
103
|
+
## Tech Stack
|
|
104
|
+
- Python 3.11, FastAPI
|
|
105
|
+
|
|
106
|
+
## Conventions
|
|
107
|
+
- Use snake_case
|
|
108
|
+
- Type hints required
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Pass it to the assembler:
|
|
112
|
+
```python
|
|
113
|
+
prompt = assemble_prompt(
|
|
114
|
+
prompts_dir="my_prompts/prompts",
|
|
115
|
+
tools=tools,
|
|
116
|
+
context_file=".co/AGENT.md"
|
|
117
|
+
)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Comparison: Single File vs Modular
|
|
121
|
+
|
|
122
|
+
| Approach | Pros | Cons |
|
|
123
|
+
|----------|------|------|
|
|
124
|
+
| **Single file** | Simple, one place | Hard to maintain, can't customize per-tool |
|
|
125
|
+
| **Modular** | Easy to update, per-tool control | More files to manage |
|
|
126
|
+
|
|
127
|
+
**Recommendation:** Start with single file for simple agents. Switch to modular when you need per-tool customization or have 3+ tools.
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Coding Agent Prompt
|
|
2
|
+
|
|
3
|
+
A modular prompt template for building coding assistants. This is a **prompt**, not code - you copy it, customize it, and use it as your agent's system prompt.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This template provides:
|
|
8
|
+
- **Main prompt** - Core agent behavior, tone, workflow
|
|
9
|
+
- **Per-tool prompts** - Guidance for shell, file read/write, todo list
|
|
10
|
+
- **Assembler** - Simple utility to combine prompts
|
|
11
|
+
|
|
12
|
+
## Structure
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
coding_agent/
|
|
16
|
+
├── prompts/
|
|
17
|
+
│ ├── main.md # Core agent behavior
|
|
18
|
+
│ └── tools/ # Per-tool guidance
|
|
19
|
+
│ ├── shell.md # Shell/bash usage
|
|
20
|
+
│ ├── read.md # File reading
|
|
21
|
+
│ ├── write.md # File writing
|
|
22
|
+
│ └── todo.md # Task tracking
|
|
23
|
+
├── assembler.py # Prompt assembly (~50 lines)
|
|
24
|
+
└── README.md
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
### 1. Copy to your project
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Using co copy (recommended)
|
|
33
|
+
co copy coding_agent
|
|
34
|
+
|
|
35
|
+
# Or manually
|
|
36
|
+
cp -r $(python -c "from connectonion.useful_prompts import get_example_path; print(get_example_path('coding_agent'))") ./prompts
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 2. Use in your agent
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
from prompts.assembler import assemble_prompt
|
|
43
|
+
from connectonion import Agent
|
|
44
|
+
from connectonion.useful_tools import Shell, DiffWriter, TodoList
|
|
45
|
+
|
|
46
|
+
def read_file(path: str) -> str:
|
|
47
|
+
"""Read file contents."""
|
|
48
|
+
return open(path).read()
|
|
49
|
+
|
|
50
|
+
# Define tools
|
|
51
|
+
tools = [Shell(), read_file, DiffWriter(), TodoList()]
|
|
52
|
+
|
|
53
|
+
# Assemble prompt (only includes docs for tools you have)
|
|
54
|
+
prompt = assemble_prompt(
|
|
55
|
+
prompts_dir="prompts/prompts",
|
|
56
|
+
tools=tools
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
# Create agent
|
|
60
|
+
agent = Agent("coder", system_prompt=prompt, tools=tools)
|
|
61
|
+
agent.run()
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Prompt Files
|
|
65
|
+
|
|
66
|
+
### main.md
|
|
67
|
+
|
|
68
|
+
Core agent behavior:
|
|
69
|
+
- Tone and style (concise, no preamble)
|
|
70
|
+
- Task workflow (understand → search → implement → verify)
|
|
71
|
+
- Coding guidelines (read first, mimic style, minimal changes)
|
|
72
|
+
- Persistence (don't give up easily)
|
|
73
|
+
- Security rules (no secrets, no force push)
|
|
74
|
+
|
|
75
|
+
### tools/shell.md
|
|
76
|
+
|
|
77
|
+
When to use shell:
|
|
78
|
+
- Git operations
|
|
79
|
+
- Package management
|
|
80
|
+
- Running tests
|
|
81
|
+
- Build commands
|
|
82
|
+
|
|
83
|
+
When NOT to use:
|
|
84
|
+
- Reading files (use read_file)
|
|
85
|
+
- Writing files (use write)
|
|
86
|
+
|
|
87
|
+
### tools/read.md
|
|
88
|
+
|
|
89
|
+
File reading best practices:
|
|
90
|
+
- Always read before modifying
|
|
91
|
+
- Check dependencies
|
|
92
|
+
- Understand context
|
|
93
|
+
|
|
94
|
+
### tools/write.md
|
|
95
|
+
|
|
96
|
+
File writing guidelines:
|
|
97
|
+
- Read first, then write
|
|
98
|
+
- Match existing style
|
|
99
|
+
- Minimal changes
|
|
100
|
+
|
|
101
|
+
### tools/todo.md
|
|
102
|
+
|
|
103
|
+
Task tracking guidance:
|
|
104
|
+
- When to use (3+ steps)
|
|
105
|
+
- When not to use (trivial tasks)
|
|
106
|
+
- Task states and flow
|
|
107
|
+
|
|
108
|
+
## Customization
|
|
109
|
+
|
|
110
|
+
### Change agent personality
|
|
111
|
+
|
|
112
|
+
Edit `prompts/main.md`:
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
# My Custom Agent
|
|
116
|
+
|
|
117
|
+
You are a friendly coding assistant that loves emojis! 🚀
|
|
118
|
+
|
|
119
|
+
## Tone
|
|
120
|
+
- Be enthusiastic and encouraging
|
|
121
|
+
- Use emojis liberally
|
|
122
|
+
- Celebrate small wins
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Add custom tool guidance
|
|
126
|
+
|
|
127
|
+
Create `prompts/tools/my_api.md`:
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
# Tool: My API
|
|
131
|
+
|
|
132
|
+
## When to Use
|
|
133
|
+
- Fetching user data
|
|
134
|
+
- Updating records
|
|
135
|
+
|
|
136
|
+
## When NOT to Use
|
|
137
|
+
- Bulk operations (use batch API)
|
|
138
|
+
|
|
139
|
+
## Rate Limits
|
|
140
|
+
- Max 100 requests/minute
|
|
141
|
+
- Use caching when possible
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Add project context
|
|
145
|
+
|
|
146
|
+
Create `.co/AGENT.md`:
|
|
147
|
+
|
|
148
|
+
```markdown
|
|
149
|
+
# Project: E-commerce API
|
|
150
|
+
|
|
151
|
+
## Stack
|
|
152
|
+
- Python 3.11, FastAPI, PostgreSQL
|
|
153
|
+
|
|
154
|
+
## Conventions
|
|
155
|
+
- snake_case for functions
|
|
156
|
+
- Type hints required
|
|
157
|
+
- Tests in tests/ directory
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Use in assembler:
|
|
161
|
+
|
|
162
|
+
```python
|
|
163
|
+
prompt = assemble_prompt(
|
|
164
|
+
prompts_dir="prompts/prompts",
|
|
165
|
+
tools=tools,
|
|
166
|
+
context_file=".co/AGENT.md"
|
|
167
|
+
)
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## The Assembler
|
|
171
|
+
|
|
172
|
+
The assembler is intentionally simple (~50 lines):
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
def assemble_prompt(prompts_dir, tools, context_file=None):
|
|
176
|
+
parts = []
|
|
177
|
+
|
|
178
|
+
# 1. Main prompt
|
|
179
|
+
parts.append(read("prompts/main.md"))
|
|
180
|
+
|
|
181
|
+
# 2. Tool descriptions (for each tool)
|
|
182
|
+
for tool in tools:
|
|
183
|
+
tool_file = f"prompts/tools/{tool.name}.md"
|
|
184
|
+
if exists(tool_file):
|
|
185
|
+
parts.append(read(tool_file))
|
|
186
|
+
|
|
187
|
+
# 3. Project context (optional)
|
|
188
|
+
if context_file:
|
|
189
|
+
parts.append(read(context_file))
|
|
190
|
+
|
|
191
|
+
return "\n\n---\n\n".join(parts)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
You own this code. Modify it for your needs:
|
|
195
|
+
- Add variable interpolation
|
|
196
|
+
- Add conditional sections
|
|
197
|
+
- Add version tracking
|
|
198
|
+
- Whatever you need
|
|
199
|
+
|
|
200
|
+
## Best Practices
|
|
201
|
+
|
|
202
|
+
### From Claude Code
|
|
203
|
+
|
|
204
|
+
1. **"When NOT to use"** sections are as important as "when to use"
|
|
205
|
+
2. **Examples with reasoning** - show good AND bad patterns
|
|
206
|
+
3. **Keep tool docs focused** - one tool per file
|
|
207
|
+
4. **Project context separate** - easy to update per-project
|
|
208
|
+
|
|
209
|
+
### Keep It Simple
|
|
210
|
+
|
|
211
|
+
- Start with the template as-is
|
|
212
|
+
- Only add complexity when needed
|
|
213
|
+
- Delete files you don't use
|
|
214
|
+
- The goal is clarity, not completeness
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Built-in Tools
|
|
2
|
+
|
|
3
|
+
Pre-built tools for common agent tasks.
|
|
4
|
+
|
|
5
|
+
## Quick Reference
|
|
6
|
+
|
|
7
|
+
| Tool | Purpose | Import |
|
|
8
|
+
|------|---------|--------|
|
|
9
|
+
| [Shell](shell.md) | Execute shell commands | `from connectonion import Shell` |
|
|
10
|
+
| [DiffWriter](diff_writer.md) | Edit files with diffs | `from connectonion import DiffWriter` |
|
|
11
|
+
| [TodoList](todo_list.md) | Track task progress | `from connectonion import TodoList` |
|
|
12
|
+
| [WebFetch](web_fetch.md) | Fetch web content | `from connectonion import WebFetch` |
|
|
13
|
+
| [Gmail](gmail.md) | Gmail integration | `from connectonion import Gmail` |
|
|
14
|
+
| [get_emails](get_emails.md) | Email parsing utilities | `from connectonion import get_emails` |
|
|
15
|
+
| [send_email](send_email.md) | Send emails via API | `from connectonion import send_email` |
|
|
16
|
+
| [Outlook](outlook.md) | Outlook integration | `from connectonion import Outlook` |
|
|
17
|
+
| [GoogleCalendar](google_calendar.md) | Google Calendar | `from connectonion import GoogleCalendar` |
|
|
18
|
+
| [MicrosoftCalendar](microsoft_calendar.md) | Microsoft Calendar | `from connectonion import MicrosoftCalendar` |
|
|
19
|
+
| [Memory](memory.md) | Persistent memory | `from connectonion import Memory` |
|
|
20
|
+
| [Terminal](terminal.md) | Interactive terminal | `from connectonion import Terminal` |
|
|
21
|
+
| [SlashCommand](slash_command.md) | Custom commands | `from connectonion import SlashCommand` |
|
|
22
|
+
|
|
23
|
+
## Usage Pattern
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
from connectonion import Agent, Shell, DiffWriter
|
|
27
|
+
|
|
28
|
+
# Create tool instances
|
|
29
|
+
shell = Shell()
|
|
30
|
+
writer = DiffWriter()
|
|
31
|
+
|
|
32
|
+
# Pass to agent
|
|
33
|
+
agent = Agent("coder", tools=[shell, writer])
|
|
34
|
+
|
|
35
|
+
agent.input("Create a hello.py file that prints 'Hello World'")
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Customizing Tools
|
|
39
|
+
|
|
40
|
+
Need to modify a built-in tool? Copy it to your project:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Copy tool source to ./tools/
|
|
44
|
+
co copy Gmail
|
|
45
|
+
|
|
46
|
+
# Copy multiple tools
|
|
47
|
+
co copy Gmail Shell memory
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Then import from your local copy:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
# Before (from package)
|
|
54
|
+
from connectonion import Gmail
|
|
55
|
+
|
|
56
|
+
# After (from your copy)
|
|
57
|
+
from tools.gmail import Gmail # Customize freely!
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
See [co copy](../cli/copy.md) for full details.
|
|
61
|
+
|
|
62
|
+
## Categories
|
|
63
|
+
|
|
64
|
+
### File Operations
|
|
65
|
+
- **Shell** - Run commands, scripts, git
|
|
66
|
+
- **DiffWriter** - Edit files with visual diffs
|
|
67
|
+
|
|
68
|
+
### Communication
|
|
69
|
+
- **Gmail** - Send/read Gmail
|
|
70
|
+
- **Outlook** - Send/read Outlook
|
|
71
|
+
|
|
72
|
+
### Calendar
|
|
73
|
+
- **GoogleCalendar** - Google Calendar events
|
|
74
|
+
- **MicrosoftCalendar** - Microsoft Calendar events
|
|
75
|
+
|
|
76
|
+
### Utilities
|
|
77
|
+
- **WebFetch** - Fetch and parse web pages
|
|
78
|
+
- **Memory** - Store/retrieve persistent data
|
|
79
|
+
- **TodoList** - Track tasks and progress
|
|
80
|
+
- **Terminal** - Interactive terminal UI
|
|
81
|
+
- **SlashCommand** - Define custom commands
|