connectonion 0.6.2__py3-none-any.whl → 0.6.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- connectonion/__init__.py +46 -9
- connectonion/cli/__init__.py +11 -1
- connectonion/cli/browser_agent/__init__.py +11 -1
- connectonion/cli/browser_agent/browser.py +13 -3
- connectonion/cli/browser_agent/element_finder.py +8 -0
- connectonion/cli/browser_agent/highlight_screenshot.py +9 -1
- connectonion/cli/browser_agent/scroll.py +8 -0
- connectonion/cli/co_ai/__init__.py +6 -0
- connectonion/cli/co_ai/agent.py +87 -0
- connectonion/cli/co_ai/agents/__init__.py +5 -0
- connectonion/cli/co_ai/agents/registry.py +57 -0
- connectonion/cli/co_ai/commands/__init__.py +45 -0
- connectonion/cli/co_ai/commands/compact.py +173 -0
- connectonion/cli/co_ai/commands/cost.py +77 -0
- connectonion/cli/co_ai/commands/export.py +60 -0
- connectonion/cli/co_ai/commands/help.py +80 -0
- connectonion/cli/co_ai/commands/init.py +101 -0
- connectonion/cli/co_ai/commands/sessions.py +55 -0
- connectonion/cli/co_ai/commands/tasks.py +63 -0
- connectonion/cli/co_ai/commands/undo.py +103 -0
- connectonion/cli/co_ai/context.py +127 -0
- connectonion/cli/co_ai/main.py +52 -0
- connectonion/cli/co_ai/plugins/__init__.py +5 -0
- connectonion/cli/co_ai/plugins/system_reminder.py +154 -0
- connectonion/cli/co_ai/prompts/agents/explore.md +79 -0
- connectonion/cli/co_ai/prompts/agents/plan.md +60 -0
- connectonion/cli/co_ai/prompts/assembler.py +303 -0
- connectonion/cli/{docs/co-vibecoding-principles-docs-contexts-all-in-one.md → co_ai/prompts/connectonion/README.md} +26 -0
- connectonion/cli/co_ai/prompts/connectonion/api.md +457 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/README.md +805 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/auth.md +46 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/browser.md +235 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/copy.md +184 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/create.md +335 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/init.md +431 -0
- connectonion/cli/co_ai/prompts/connectonion/co-directory-structure.md +214 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/agent.md +1078 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/events.md +816 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/llm_do.md +256 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/max_iterations.md +362 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/models.md +641 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/plugins.md +100 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/prompts.md +122 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/tools.md +512 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/transcribe.md +156 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/trust.md +291 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/README.md +18 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/auto_debug.md +1026 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/console.md +129 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/eval-format.md +178 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/eval.md +230 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/exceptions.md +307 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/log.md +117 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/xray.md +215 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/001-choosing-input-method.md +202 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/002-choosing-llm-function-name.md +202 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/003-choosing-trust-keyword.md +141 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/004-cli-create-flow.md +117 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/005-designing-agent-network-protocol.md +503 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/006-agent-address-format.md +305 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/007-authentication-backend-design.md +240 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/008-naming-is-hard.md +228 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/009-why-connect-function.md +167 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/010-cli-ux-progressive-disclosure.md +176 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/011-global-config-identity-management.md +357 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/012-tool-execution-separation.md +259 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/013-debug-and-logging-design.md +253 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/014-hook-system-design.md +510 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/015-interactive-auto-debug-design.md +837 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/016-why-no-zero-knowledge-proofs.md +358 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/017-session-logging-and-eval-format.md +120 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/018-event-api-naming.md +274 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/019-agent-lifecycle-design.md +655 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/020-trust-system-and-network-architecture.md +503 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/021-task-storage-jsonl-design.md +496 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/022-raw-asgi-implementation.md +273 -0
- connectonion/cli/co_ai/prompts/connectonion/examples/agent_reasoning.md +62 -0
- connectonion/cli/co_ai/prompts/connectonion/examples/atomic_tools.md +24 -0
- connectonion/cli/co_ai/prompts/connectonion/examples/load_guide.md +18 -0
- connectonion/cli/co_ai/prompts/connectonion/examples.md +0 -0
- connectonion/cli/co_ai/prompts/connectonion/hook-system-options.md +364 -0
- connectonion/cli/co_ai/prompts/connectonion/index.md +162 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/README.md +12 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/auth.md +450 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/google.md +431 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/microsoft.md +370 -0
- connectonion/cli/co_ai/prompts/connectonion/network/README.md +14 -0
- connectonion/cli/co_ai/prompts/connectonion/network/connect.md +543 -0
- connectonion/cli/co_ai/prompts/connectonion/network/connection.md +538 -0
- connectonion/cli/co_ai/prompts/connectonion/network/deploy.md +123 -0
- connectonion/cli/co_ai/prompts/connectonion/network/host.md +1049 -0
- connectonion/cli/co_ai/prompts/connectonion/network/protocol/agent-relay-protocol.md +495 -0
- connectonion/cli/co_ai/prompts/connectonion/network/protocol/announce-message.md +115 -0
- connectonion/cli/co_ai/prompts/connectonion/principles.md +124 -0
- connectonion/cli/co_ai/prompts/connectonion/quickstart.md +261 -0
- connectonion/cli/co_ai/prompts/connectonion/roadmap.md +81 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/README.md +77 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/meta-agent.md +152 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/minimal.md +105 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/playwright.md +130 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/web-research.md +144 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/README.md +95 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/chat.md +181 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/divider.md +63 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/dropdown.md +83 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/footer.md +44 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/fuzzy.md +68 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/input.md +84 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/keys.md +77 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/pick.md +71 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/providers.md +89 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/status_bar.md +67 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/README.md +156 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/calendar_plugin.md +68 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/eval.md +89 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/gmail_plugin.md +68 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/image_result_formatter.md +74 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/re_act.md +86 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/shell_approval.md +69 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/README.md +81 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/diff_writer.md +138 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/get_emails.md +499 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/gmail.md +135 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/google_calendar.md +106 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/memory.md +486 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/microsoft_calendar.md +106 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/outlook.md +120 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/send_email.md +403 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/shell.md +95 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/slash_command.md +96 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/terminal.md +97 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/todo_list.md +252 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/web_fetch.md +130 -0
- connectonion/cli/co_ai/prompts/connectonion/vibe-coding-guide.md +97 -0
- connectonion/cli/co_ai/prompts/connectonion/windows-support.md +258 -0
- connectonion/cli/co_ai/prompts/main.md +247 -0
- connectonion/cli/co_ai/prompts/summarization.md +55 -0
- connectonion/cli/co_ai/prompts/system-reminders/agent.md +23 -0
- connectonion/cli/co_ai/prompts/system-reminders/plan_mode.md +13 -0
- connectonion/cli/co_ai/prompts/system-reminders/security.md +14 -0
- connectonion/cli/co_ai/prompts/system-reminders/simplicity.md +14 -0
- connectonion/cli/co_ai/prompts/tools/ask_user.md +61 -0
- connectonion/cli/co_ai/prompts/tools/background.md +57 -0
- connectonion/cli/co_ai/prompts/tools/edit.md +90 -0
- connectonion/cli/co_ai/prompts/tools/glob.md +52 -0
- connectonion/cli/co_ai/prompts/tools/grep.md +55 -0
- connectonion/cli/co_ai/prompts/tools/plan_mode.md +80 -0
- connectonion/cli/co_ai/prompts/tools/read.md +40 -0
- connectonion/cli/co_ai/prompts/tools/shell.md +67 -0
- connectonion/cli/co_ai/prompts/tools/task.md +51 -0
- connectonion/cli/co_ai/prompts/tools/todo.md +139 -0
- connectonion/cli/co_ai/prompts/tools/write.md +47 -0
- connectonion/cli/co_ai/prompts/workflow.md +89 -0
- connectonion/cli/co_ai/sessions.py +110 -0
- connectonion/cli/co_ai/skills/__init__.py +37 -0
- connectonion/cli/co_ai/skills/builtin/commit/SKILL.md +63 -0
- connectonion/cli/co_ai/skills/builtin/review-pr/SKILL.md +76 -0
- connectonion/cli/co_ai/skills/loader.py +166 -0
- connectonion/cli/co_ai/skills/tool.py +46 -0
- connectonion/cli/co_ai/tools/__init__.py +92 -0
- connectonion/cli/co_ai/tools/ask_user.py +35 -0
- connectonion/cli/co_ai/tools/background.py +201 -0
- connectonion/cli/co_ai/tools/diff_writer.py +291 -0
- connectonion/cli/co_ai/tools/edit.py +89 -0
- connectonion/cli/co_ai/tools/glob.py +84 -0
- connectonion/cli/co_ai/tools/grep.py +158 -0
- connectonion/cli/co_ai/tools/load_guide.py +23 -0
- connectonion/cli/co_ai/tools/multi_edit.py +116 -0
- connectonion/cli/co_ai/tools/plan_mode.py +169 -0
- connectonion/cli/co_ai/tools/read.py +61 -0
- connectonion/cli/co_ai/tools/task.py +59 -0
- connectonion/cli/co_ai/tools/todo_list.py +159 -0
- connectonion/cli/co_ai/tools/write.py +126 -0
- connectonion/cli/commands/__init__.py +11 -1
- connectonion/cli/commands/ai_commands.py +34 -0
- connectonion/cli/commands/copy_commands.py +55 -6
- connectonion/cli/commands/create.py +20 -17
- connectonion/cli/commands/init.py +19 -22
- connectonion/cli/commands/project_cmd_lib.py +15 -0
- connectonion/cli/main.py +11 -0
- connectonion/console.py +15 -1
- connectonion/core/__init__.py +10 -1
- connectonion/core/agent.py +37 -16
- connectonion/core/exceptions.py +74 -0
- connectonion/core/llm.py +54 -6
- connectonion/core/tool_executor.py +32 -31
- connectonion/core/tool_factory.py +47 -10
- connectonion/debug/__init__.py +10 -1
- connectonion/debug/debug_explainer/__init__.py +10 -1
- connectonion/debug/execution_analyzer/__init__.py +10 -1
- connectonion/debug/execution_analyzer/execution_analysis.py +5 -2
- connectonion/debug/runtime_inspector/__init__.py +10 -1
- connectonion/docs/.package-ignore +6 -0
- connectonion/docs/README.md +2036 -0
- connectonion/docs/api.md +457 -0
- connectonion/docs/archive/001-ai-agent-is-just-prompt-plus-function.md +249 -0
- connectonion/docs/archive/README.md +53 -0
- connectonion/docs/archive/archive/consolidation-plan.md +72 -0
- connectonion/docs/archive/archive/core-principles-extracted.md +239 -0
- connectonion/docs/archive/archive/master-principles.md +222 -0
- connectonion/docs/archive/archive/principles.md +293 -0
- connectonion/docs/archive/archive/simplicity-principles.md +221 -0
- connectonion/docs/archive/attack-defense-insights.md +410 -0
- connectonion/docs/archive/business-model.md +305 -0
- connectonion/docs/archive/core-principles-unified.md +190 -0
- connectonion/docs/archive/discussion-journey.md +178 -0
- connectonion/docs/archive/economic-analysis.md +323 -0
- connectonion/docs/archive/features/01-share-and-find.md +256 -0
- connectonion/docs/archive/features/02-agent-authentication.md +93 -0
- connectonion/docs/archive/features/03-test-before-trust.md +71 -0
- connectonion/docs/archive/features/06-reliability-and-offline.md +197 -0
- connectonion/docs/archive/features/README.md +46 -0
- connectonion/docs/archive/features-roadmap.md +247 -0
- connectonion/docs/archive/mcp-comparison-insights.md +215 -0
- connectonion/docs/archive/migration-strategy.md +571 -0
- connectonion/docs/archive/mini-whitepaper.md +293 -0
- connectonion/docs/archive/network-protocol.md +394 -0
- connectonion/docs/archive/semantic-revolution.md +367 -0
- connectonion/docs/archive/technical-architecture.md +453 -0
- connectonion/docs/archive/the-semantic-insight.md +207 -0
- connectonion/docs/archive/threat-model.md +164 -0
- connectonion/docs/cli/README.md +805 -0
- connectonion/docs/cli/auth.md +46 -0
- connectonion/docs/cli/browser.md +235 -0
- connectonion/docs/cli/copy.md +232 -0
- connectonion/docs/cli/create.md +335 -0
- connectonion/docs/cli/init.md +431 -0
- connectonion/docs/co-directory-structure.md +214 -0
- connectonion/docs/concepts/agent.md +1078 -0
- connectonion/docs/concepts/events.md +699 -0
- connectonion/docs/concepts/llm_do.md +256 -0
- connectonion/docs/concepts/max_iterations.md +362 -0
- connectonion/docs/concepts/models.md +641 -0
- connectonion/docs/concepts/plugins.md +101 -0
- connectonion/docs/concepts/prompts.md +122 -0
- connectonion/docs/concepts/session.md +428 -0
- connectonion/docs/concepts/tools.md +512 -0
- connectonion/docs/concepts/transcribe.md +156 -0
- connectonion/docs/concepts/trust.md +291 -0
- connectonion/docs/connectonion.md +1256 -0
- connectonion/docs/debug/README.md +18 -0
- connectonion/docs/debug/auto_debug.md +1026 -0
- connectonion/docs/debug/console.md +129 -0
- connectonion/docs/debug/eval-format.md +178 -0
- connectonion/docs/debug/eval.md +230 -0
- connectonion/docs/debug/exceptions.md +307 -0
- connectonion/docs/debug/log.md +117 -0
- connectonion/docs/debug/xray.md +215 -0
- connectonion/docs/design-decisions/001-choosing-input-method.md +202 -0
- connectonion/docs/design-decisions/002-choosing-llm-function-name.md +202 -0
- connectonion/docs/design-decisions/003-choosing-trust-keyword.md +141 -0
- connectonion/docs/design-decisions/004-cli-create-flow.md +117 -0
- connectonion/docs/design-decisions/005-designing-agent-network-protocol.md +503 -0
- connectonion/docs/design-decisions/006-agent-address-format.md +305 -0
- connectonion/docs/design-decisions/007-authentication-backend-design.md +240 -0
- connectonion/docs/design-decisions/008-naming-is-hard.md +228 -0
- connectonion/docs/design-decisions/009-why-connect-function.md +167 -0
- connectonion/docs/design-decisions/010-cli-ux-progressive-disclosure.md +176 -0
- connectonion/docs/design-decisions/011-global-config-identity-management.md +357 -0
- connectonion/docs/design-decisions/012-tool-execution-separation.md +259 -0
- connectonion/docs/design-decisions/013-debug-and-logging-design.md +253 -0
- connectonion/docs/design-decisions/014-hook-system-design.md +510 -0
- connectonion/docs/design-decisions/015-interactive-auto-debug-design.md +837 -0
- connectonion/docs/design-decisions/016-why-no-zero-knowledge-proofs.md +358 -0
- connectonion/docs/design-decisions/017-session-logging-and-eval-format.md +120 -0
- connectonion/docs/design-decisions/018-event-api-naming.md +274 -0
- connectonion/docs/design-decisions/019-agent-lifecycle-design.md +655 -0
- connectonion/docs/design-decisions/020-trust-system-and-network-architecture.md +503 -0
- connectonion/docs/design-decisions/021-task-storage-jsonl-design.md +496 -0
- connectonion/docs/design-decisions/022-raw-asgi-implementation.md +273 -0
- connectonion/docs/examples.md +0 -0
- connectonion/docs/hook-system-options.md +364 -0
- connectonion/docs/integrations/README.md +12 -0
- connectonion/docs/integrations/auth.md +450 -0
- connectonion/docs/integrations/google.md +431 -0
- connectonion/docs/integrations/microsoft.md +370 -0
- connectonion/docs/network/README.md +14 -0
- connectonion/docs/network/connect.md +629 -0
- connectonion/docs/network/deploy.md +124 -0
- connectonion/docs/network/host.md +1087 -0
- connectonion/docs/network/io.md +538 -0
- connectonion/docs/network/protocol/agent-relay-protocol.md +495 -0
- connectonion/docs/network/protocol/announce-message.md +115 -0
- connectonion/docs/principles.md +124 -0
- connectonion/docs/quickstart.md +261 -0
- connectonion/docs/roadmap.md +81 -0
- connectonion/docs/templates/README.md +77 -0
- connectonion/docs/templates/meta-agent.md +152 -0
- connectonion/docs/templates/minimal.md +105 -0
- connectonion/docs/templates/playwright.md +130 -0
- connectonion/docs/templates/web-research.md +144 -0
- connectonion/docs/tui/README.md +95 -0
- connectonion/docs/tui/chat.md +181 -0
- connectonion/docs/tui/divider.md +63 -0
- connectonion/docs/tui/dropdown.md +83 -0
- connectonion/docs/tui/footer.md +44 -0
- connectonion/docs/tui/fuzzy.md +68 -0
- connectonion/docs/tui/input.md +84 -0
- connectonion/docs/tui/keys.md +77 -0
- connectonion/docs/tui/pick.md +71 -0
- connectonion/docs/tui/providers.md +89 -0
- connectonion/docs/tui/status_bar.md +67 -0
- connectonion/docs/useful_plugins/README.md +160 -0
- connectonion/docs/useful_plugins/calendar_plugin.md +68 -0
- connectonion/docs/useful_plugins/eval.md +89 -0
- connectonion/docs/useful_plugins/gmail_plugin.md +68 -0
- connectonion/docs/useful_plugins/image_result_formatter.md +74 -0
- connectonion/docs/useful_plugins/re_act.md +86 -0
- connectonion/docs/useful_plugins/shell_approval.md +69 -0
- connectonion/docs/useful_plugins/system_reminder.md +210 -0
- connectonion/docs/useful_plugins/tool_approval.md +139 -0
- connectonion/docs/useful_prompts/README.md +127 -0
- connectonion/docs/useful_prompts/coding_agent.md +214 -0
- connectonion/docs/useful_tools/README.md +81 -0
- connectonion/docs/useful_tools/ask_user.md +103 -0
- connectonion/docs/useful_tools/diff_writer.md +158 -0
- connectonion/docs/useful_tools/get_emails.md +519 -0
- connectonion/docs/useful_tools/gmail.md +155 -0
- connectonion/docs/useful_tools/google_calendar.md +126 -0
- connectonion/docs/useful_tools/memory.md +506 -0
- connectonion/docs/useful_tools/microsoft_calendar.md +126 -0
- connectonion/docs/useful_tools/outlook.md +140 -0
- connectonion/docs/useful_tools/send_email.md +423 -0
- connectonion/docs/useful_tools/shell.md +115 -0
- connectonion/docs/useful_tools/slash_command.md +116 -0
- connectonion/docs/useful_tools/terminal.md +115 -0
- connectonion/docs/useful_tools/todo_list.md +272 -0
- connectonion/docs/useful_tools/web_fetch.md +150 -0
- connectonion/docs/vibe-coding-guide.md +97 -0
- connectonion/docs/windows-support.md +258 -0
- connectonion/logger.py +3 -3
- connectonion/network/__init__.py +19 -6
- connectonion/network/asgi/__init__.py +81 -0
- connectonion/network/asgi/http.py +205 -0
- connectonion/network/asgi/websocket.py +217 -0
- connectonion/network/connect.py +232 -185
- connectonion/network/host/__init__.py +59 -0
- connectonion/network/host/auth.py +191 -0
- connectonion/network/host/routes.py +135 -0
- connectonion/network/host/server.py +289 -0
- connectonion/network/host/session.py +78 -0
- connectonion/network/io/__init__.py +21 -0
- connectonion/network/{connection.py → io/base.py} +17 -42
- connectonion/network/io/websocket.py +55 -0
- connectonion/network/relay.py +37 -16
- connectonion/network/trust/__init__.py +30 -0
- connectonion/network/trust/factory.py +138 -0
- connectonion/network/{trust_agents.py → trust/prompts.py} +3 -3
- connectonion/network/{trust_functions.py → trust/tools.py} +2 -2
- connectonion/prompt_files/__init__.py +11 -1
- connectonion/prompt_files/react_acknowledge.md +26 -0
- connectonion/prompts.py +10 -1
- connectonion/tui/chat.py +10 -1
- connectonion/tui/divider.py +10 -1
- connectonion/tui/dropdown.py +10 -1
- connectonion/tui/footer.py +8 -0
- connectonion/tui/fuzzy.py +11 -1
- connectonion/tui/input.py +118 -70
- connectonion/tui/keys.py +133 -6
- connectonion/tui/providers.py +11 -1
- connectonion/tui/status_bar.py +10 -1
- connectonion/useful_events_handlers/__init__.py +8 -0
- connectonion/useful_events_handlers/reflect.py +19 -4
- connectonion/useful_plugins/__init__.py +3 -1
- connectonion/useful_plugins/eval.py +2 -2
- connectonion/useful_plugins/gmail_plugin.py +3 -3
- connectonion/useful_plugins/image_result_formatter.py +3 -3
- connectonion/useful_plugins/re_act.py +114 -28
- connectonion/useful_plugins/shell_approval.py +2 -2
- connectonion/useful_plugins/system_reminder.py +103 -0
- connectonion/useful_plugins/tool_approval.py +233 -0
- connectonion/useful_plugins/ui_stream.py +18 -133
- connectonion/useful_prompts/README.md +61 -0
- connectonion/useful_prompts/__init__.py +45 -0
- connectonion/useful_prompts/coding_agent/README.md +106 -0
- connectonion/useful_prompts/coding_agent/assembler.py +123 -0
- connectonion/useful_prompts/coding_agent/prompts/main.md +227 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/ask_user.md +61 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/background.md +57 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/edit.md +90 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/glob.md +52 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/grep.md +55 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/plan_mode.md +80 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/read.md +40 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/shell.md +67 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/task.md +51 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/todo.md +139 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/write.md +48 -0
- connectonion/useful_prompts/system-reminders/security-warning.md +14 -0
- connectonion/useful_prompts/system-reminders/test-reminder.md +11 -0
- connectonion/useful_tools/__init__.py +31 -4
- connectonion/useful_tools/ask_user.py +35 -0
- connectonion/useful_tools/bash.py +69 -0
- connectonion/useful_tools/diff_writer.py +186 -94
- connectonion/useful_tools/edit.py +102 -0
- connectonion/useful_tools/glob_files.py +97 -0
- connectonion/useful_tools/grep_files.py +171 -0
- connectonion/useful_tools/multi_edit.py +116 -0
- connectonion/useful_tools/read_file.py +73 -0
- connectonion/useful_tools/shell.py +50 -45
- connectonion/useful_tools/write_file.py +129 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.4.dist-info}/METADATA +10 -3
- connectonion-0.6.4.dist-info/RECORD +472 -0
- connectonion/network/asgi.py +0 -407
- connectonion/network/host.py +0 -616
- connectonion/network/trust.py +0 -166
- connectonion-0.6.2.dist-info/RECORD +0 -129
- /connectonion/cli/{docs → co_ai/prompts/connectonion}/connectonion.md +0 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.4.dist-info}/WHEEL +0 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.4.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Tool: Shell
|
|
2
|
+
|
|
3
|
+
Execute terminal commands in a persistent shell session.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Git operations: `git status`, `git add`, `git commit`, `git push`
|
|
8
|
+
- Package management: `npm install`, `pip install`, `cargo build`
|
|
9
|
+
- Running tests: `pytest`, `npm test`, `cargo test`
|
|
10
|
+
- Directory operations: `ls`, `mkdir`, `tree`
|
|
11
|
+
- Build commands: `npm run build`, `make`
|
|
12
|
+
- Any other shell command
|
|
13
|
+
|
|
14
|
+
## When NOT to Use
|
|
15
|
+
|
|
16
|
+
- Reading file contents → use `read_file` instead
|
|
17
|
+
- Writing files → use `write` instead
|
|
18
|
+
- Searching file contents → read files directly
|
|
19
|
+
|
|
20
|
+
## Guidelines
|
|
21
|
+
|
|
22
|
+
- Use absolute paths when possible to avoid `cd` confusion
|
|
23
|
+
- Chain dependent commands with `&&`: `git add . && git commit -m "msg"`
|
|
24
|
+
- Output is truncated at 30000 characters
|
|
25
|
+
- Default timeout: 2 minutes
|
|
26
|
+
|
|
27
|
+
### Path Quoting (REQUIRED)
|
|
28
|
+
Always quote paths with spaces using double quotes:
|
|
29
|
+
```bash
|
|
30
|
+
cd "/Users/name/My Documents" # Correct
|
|
31
|
+
python "/path/with spaces/run.py" # Correct
|
|
32
|
+
cd /Users/name/My Documents # WRONG - will fail
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Directory Verification
|
|
36
|
+
Before creating files/directories, verify the parent exists:
|
|
37
|
+
```bash
|
|
38
|
+
ls /foo # Verify /foo exists
|
|
39
|
+
mkdir /foo/bar # Now safe to create
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Parallel vs Sequential
|
|
43
|
+
- **Independent commands**: Call tool multiple times in parallel
|
|
44
|
+
- **Dependent commands**: Chain with `&&` in single call
|
|
45
|
+
```bash
|
|
46
|
+
# Sequential (dependent)
|
|
47
|
+
git add . && git commit -m "msg" && git push
|
|
48
|
+
|
|
49
|
+
# Parallel (independent) - use separate tool calls
|
|
50
|
+
[git status] [git diff] [git log]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
<good-example>
|
|
56
|
+
pytest /foo/bar/tests
|
|
57
|
+
git status
|
|
58
|
+
npm run build
|
|
59
|
+
cd "/path/with spaces" && ls
|
|
60
|
+
</good-example>
|
|
61
|
+
|
|
62
|
+
<bad-example>
|
|
63
|
+
cat file.txt # Use read_file instead
|
|
64
|
+
echo "content" > file # Use write instead
|
|
65
|
+
cd /foo && pytest # Use absolute path instead
|
|
66
|
+
cd /path/with spaces # Missing quotes - will fail
|
|
67
|
+
</bad-example>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Tool: Task
|
|
2
|
+
|
|
3
|
+
Launch specialized sub-agents for complex investigations.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- **Codebase exploration** - "Find all API endpoints"
|
|
8
|
+
- **Multi-file analysis** - "How does auth work?"
|
|
9
|
+
- **Architecture questions** - "What's the project structure?"
|
|
10
|
+
- **Complex searches** requiring multiple rounds of glob/grep
|
|
11
|
+
|
|
12
|
+
## When NOT to Use
|
|
13
|
+
|
|
14
|
+
- Simple file reads → use `read_file` instead
|
|
15
|
+
- Specific known file → use `read_file` instead
|
|
16
|
+
- Quick single search → use `glob` or `grep` directly
|
|
17
|
+
|
|
18
|
+
## Available Agents
|
|
19
|
+
|
|
20
|
+
| Agent | Purpose |
|
|
21
|
+
|-------|---------|
|
|
22
|
+
| `explore` | Fast codebase navigation and search |
|
|
23
|
+
| `plan` | Design implementation approach |
|
|
24
|
+
|
|
25
|
+
## Guidelines
|
|
26
|
+
|
|
27
|
+
- Use explore agent for open-ended codebase questions
|
|
28
|
+
- Provide clear, specific task descriptions
|
|
29
|
+
- Let the agent work autonomously - it has its own tools
|
|
30
|
+
- Trust the agent's findings
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
<good-example>
|
|
35
|
+
# Explore codebase structure
|
|
36
|
+
task("explore", "Find all API endpoints and their handlers")
|
|
37
|
+
|
|
38
|
+
# Understand a feature
|
|
39
|
+
task("explore", "How does the authentication system work?")
|
|
40
|
+
|
|
41
|
+
# Search for patterns
|
|
42
|
+
task("explore", "Find all database queries and their locations")
|
|
43
|
+
</good-example>
|
|
44
|
+
|
|
45
|
+
<bad-example>
|
|
46
|
+
# Too simple - just use grep directly
|
|
47
|
+
task("explore", "Find class MyClass")
|
|
48
|
+
|
|
49
|
+
# Specific file - just read it
|
|
50
|
+
task("explore", "Read src/auth.py")
|
|
51
|
+
</bad-example>
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Tool: Todo List
|
|
2
|
+
|
|
3
|
+
Track tasks and progress for complex multi-step work. Helps users understand your progress.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
Use this tool proactively when:
|
|
8
|
+
1. **Complex multi-step tasks** - 3 or more distinct steps
|
|
9
|
+
2. **User provides multiple tasks** - numbered or comma-separated list
|
|
10
|
+
3. **Non-trivial work** - requires careful planning
|
|
11
|
+
4. **After receiving new instructions** - capture requirements immediately
|
|
12
|
+
5. **When starting work** - mark as `in_progress` BEFORE beginning
|
|
13
|
+
|
|
14
|
+
## When NOT to Use
|
|
15
|
+
|
|
16
|
+
Skip this tool when:
|
|
17
|
+
1. Single, straightforward task
|
|
18
|
+
2. Trivial operations (fix typo, add one line)
|
|
19
|
+
3. Task can be completed in less than 3 trivial steps
|
|
20
|
+
4. Pure Q&A or informational requests
|
|
21
|
+
|
|
22
|
+
## Task Format (REQUIRED)
|
|
23
|
+
|
|
24
|
+
Each task MUST have two forms:
|
|
25
|
+
- **content**: Imperative form ("Run tests", "Fix the bug")
|
|
26
|
+
- **activeForm**: Present continuous ("Running tests", "Fixing the bug")
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"content": "Run tests",
|
|
31
|
+
"activeForm": "Running tests",
|
|
32
|
+
"status": "pending"
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Task States
|
|
37
|
+
|
|
38
|
+
- `pending` - Not yet started
|
|
39
|
+
- `in_progress` - Currently working (exactly ONE at a time)
|
|
40
|
+
- `completed` - Finished successfully
|
|
41
|
+
|
|
42
|
+
## Strict Rules
|
|
43
|
+
|
|
44
|
+
1. **Exactly ONE task in_progress** at any time (not less, not more)
|
|
45
|
+
2. **Mark complete IMMEDIATELY** after finishing (don't batch)
|
|
46
|
+
3. **Only complete when FULLY done** - never if:
|
|
47
|
+
- Tests are failing
|
|
48
|
+
- Implementation is partial
|
|
49
|
+
- Errors are unresolved
|
|
50
|
+
4. **If blocked**: Keep in_progress and create a new task for the blocker
|
|
51
|
+
|
|
52
|
+
## Examples: When to Use
|
|
53
|
+
|
|
54
|
+
<example>
|
|
55
|
+
User: "Add dark mode toggle and run tests when done"
|
|
56
|
+
|
|
57
|
+
Assistant creates todo list:
|
|
58
|
+
1. Read existing settings page code
|
|
59
|
+
2. Add dark mode toggle component
|
|
60
|
+
3. Add dark mode state management
|
|
61
|
+
4. Update styles for dark theme
|
|
62
|
+
5. Run tests and fix any failures
|
|
63
|
+
|
|
64
|
+
<reasoning>
|
|
65
|
+
Used todo list because:
|
|
66
|
+
1. Multi-step feature (UI, state, styling)
|
|
67
|
+
2. User explicitly requested tests afterward
|
|
68
|
+
3. Inferred tests need to pass as final step
|
|
69
|
+
</reasoning>
|
|
70
|
+
</example>
|
|
71
|
+
|
|
72
|
+
<example>
|
|
73
|
+
User: "Rename getCwd to getCurrentWorkingDirectory across the project"
|
|
74
|
+
|
|
75
|
+
Assistant first searches codebase, finds 15 instances in 8 files.
|
|
76
|
+
Then creates todo list with specific items for each file.
|
|
77
|
+
|
|
78
|
+
<reasoning>
|
|
79
|
+
Used todo list because:
|
|
80
|
+
1. First searched to understand scope
|
|
81
|
+
2. Found multiple occurrences across files
|
|
82
|
+
3. Todo ensures every instance is tracked
|
|
83
|
+
4. Prevents missing any occurrences
|
|
84
|
+
</reasoning>
|
|
85
|
+
</example>
|
|
86
|
+
|
|
87
|
+
<example>
|
|
88
|
+
User: "Implement user registration, product catalog, shopping cart, and checkout"
|
|
89
|
+
|
|
90
|
+
Assistant creates todo list breaking down each feature.
|
|
91
|
+
|
|
92
|
+
<reasoning>
|
|
93
|
+
Used todo list because:
|
|
94
|
+
1. User provided multiple complex features
|
|
95
|
+
2. Organizes large work into manageable tasks
|
|
96
|
+
3. Allows tracking progress across implementation
|
|
97
|
+
</reasoning>
|
|
98
|
+
</example>
|
|
99
|
+
|
|
100
|
+
## Examples: When NOT to Use
|
|
101
|
+
|
|
102
|
+
<example>
|
|
103
|
+
User: "How do I print 'Hello World' in Python?"
|
|
104
|
+
|
|
105
|
+
Assistant answers directly without todo list.
|
|
106
|
+
|
|
107
|
+
<reasoning>
|
|
108
|
+
Did NOT use todo list because:
|
|
109
|
+
- Single, trivial task
|
|
110
|
+
- No multiple steps to track
|
|
111
|
+
- Just informational
|
|
112
|
+
</reasoning>
|
|
113
|
+
</example>
|
|
114
|
+
|
|
115
|
+
<example>
|
|
116
|
+
User: "Fix the typo in README"
|
|
117
|
+
|
|
118
|
+
Assistant fixes it directly without todo list.
|
|
119
|
+
|
|
120
|
+
<reasoning>
|
|
121
|
+
Did NOT use todo list because:
|
|
122
|
+
- Single straightforward task
|
|
123
|
+
- One location in code
|
|
124
|
+
- No tracking needed
|
|
125
|
+
</reasoning>
|
|
126
|
+
</example>
|
|
127
|
+
|
|
128
|
+
<example>
|
|
129
|
+
User: "Run npm install"
|
|
130
|
+
|
|
131
|
+
Assistant runs command directly.
|
|
132
|
+
|
|
133
|
+
<reasoning>
|
|
134
|
+
Did NOT use todo list because:
|
|
135
|
+
- Single command execution
|
|
136
|
+
- Immediate results
|
|
137
|
+
- No multiple steps
|
|
138
|
+
</reasoning>
|
|
139
|
+
</example>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Tool: Write File
|
|
2
|
+
|
|
3
|
+
Write files with colorized diff display and user approval.
|
|
4
|
+
|
|
5
|
+
## Approval Flow
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
╭─── Changes to hello.py ────────────────────────╮
|
|
9
|
+
│ --- a/hello.py │
|
|
10
|
+
│ +++ b/hello.py │
|
|
11
|
+
│ @@ -1,2 +1,3 @@ │
|
|
12
|
+
│ def hello(): │
|
|
13
|
+
│ - pass │
|
|
14
|
+
│ + print("Hello, World!") │
|
|
15
|
+
╰────────────────────────────────────────────────╯
|
|
16
|
+
|
|
17
|
+
❯ 1 - Yes, apply this change
|
|
18
|
+
2 - Yes to all (auto-approve for session)
|
|
19
|
+
3 - No, and tell agent what to do instead
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Guidelines
|
|
23
|
+
|
|
24
|
+
- **Always read the file first** before writing
|
|
25
|
+
- Creates parent directories automatically if needed
|
|
26
|
+
- Returns byte count on success
|
|
27
|
+
- If rejected, user feedback is returned for you to retry
|
|
28
|
+
|
|
29
|
+
## Best Practices
|
|
30
|
+
|
|
31
|
+
- Match existing code style exactly
|
|
32
|
+
- Keep changes minimal and focused
|
|
33
|
+
- Don't add comments unless asked
|
|
34
|
+
- Don't refactor unrelated code
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
<good-example>
|
|
39
|
+
# Read first, then write
|
|
40
|
+
content = read_file("src/utils.py")
|
|
41
|
+
# ... analyze content ...
|
|
42
|
+
write("src/utils.py", modified_content)
|
|
43
|
+
</good-example>
|
|
44
|
+
|
|
45
|
+
<bad-example>
|
|
46
|
+
# Writing without reading - don't do this
|
|
47
|
+
write("src/utils.py", completely_new_content)
|
|
48
|
+
</bad-example>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-warning
|
|
3
|
+
triggers:
|
|
4
|
+
- tool: read_file
|
|
5
|
+
path_pattern: ["*.env", "*secret*", "*credential*", "*.pem", "*.key"]
|
|
6
|
+
- tool: read
|
|
7
|
+
path_pattern: ["*.env", "*secret*", "*credential*"]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<system-reminder>
|
|
11
|
+
This file may contain sensitive information.
|
|
12
|
+
- Never expose secrets in output
|
|
13
|
+
- Never commit real credentials
|
|
14
|
+
</system-reminder>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-reminder
|
|
3
|
+
triggers:
|
|
4
|
+
- tool: write_file
|
|
5
|
+
path_pattern: ["*.py", "*.js", "*.ts"]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<system-reminder>
|
|
9
|
+
Code was modified. Consider running tests to verify changes.
|
|
10
|
+
This is a gentle reminder - ignore if not applicable.
|
|
11
|
+
</system-reminder>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Purpose: Export all useful tools and utilities for ConnectOnion agents
|
|
3
3
|
LLM-Note:
|
|
4
|
-
Dependencies: imports from [send_email, get_emails, memory, gmail, google_calendar, outlook, microsoft_calendar, web_fetch, shell, diff_writer, tui.pick, terminal, todo_list, slash_command] | imported by [__init__.py main package] | re-exports tools for agent consumption
|
|
4
|
+
Dependencies: imports from [send_email, get_emails, memory, gmail, google_calendar, outlook, microsoft_calendar, web_fetch, shell, diff_writer, tui.pick, terminal, todo_list, slash_command, read_file, edit, multi_edit, glob_files, grep_files, write_file] | imported by [__init__.py main package] | re-exports tools for agent consumption
|
|
5
5
|
Data flow: agent imports from useful_tools → accesses tool functions/classes directly
|
|
6
6
|
State/Effects: no state | pure re-exports | lazy loading for heavy dependencies
|
|
7
|
-
Integration: exposes send_email, get_emails, mark_read, mark_unread (email functions) | Memory, Gmail, GoogleCalendar, Outlook, MicrosoftCalendar, WebFetch, Shell, DiffWriter, TodoList (tool classes) | pick, yes_no, autocomplete (TUI helpers) | SlashCommand (extension point)
|
|
7
|
+
Integration: exposes send_email, get_emails, mark_read, mark_unread (email functions) | Memory, Gmail, GoogleCalendar, Outlook, MicrosoftCalendar, WebFetch, Shell, DiffWriter, TodoList (tool classes) | pick, yes_no, autocomplete (TUI helpers) | SlashCommand (extension point) | read_file, edit, multi_edit, glob, grep, write, Write (Claude Code-style tools)
|
|
8
8
|
Errors: ImportError if dependency not installed (e.g., google-auth for GoogleCalendar, httpx for Outlook/MicrosoftCalendar)
|
|
9
9
|
"""
|
|
10
10
|
|
|
@@ -17,17 +17,29 @@ from .outlook import Outlook
|
|
|
17
17
|
from .microsoft_calendar import MicrosoftCalendar
|
|
18
18
|
from .web_fetch import WebFetch
|
|
19
19
|
from .shell import Shell
|
|
20
|
-
from .
|
|
20
|
+
from .bash import bash
|
|
21
|
+
from .diff_writer import DiffWriter, MODE_NORMAL, MODE_AUTO, MODE_PLAN
|
|
21
22
|
from ..tui import pick
|
|
22
23
|
from .terminal import yes_no, autocomplete
|
|
23
24
|
from .todo_list import TodoList
|
|
24
25
|
from .slash_command import SlashCommand
|
|
26
|
+
from .ask_user import ask_user
|
|
27
|
+
|
|
28
|
+
# Claude Code-style file tools
|
|
29
|
+
from .read_file import read_file
|
|
30
|
+
from .edit import edit
|
|
31
|
+
from .multi_edit import multi_edit
|
|
32
|
+
from .glob_files import glob
|
|
33
|
+
from .grep_files import grep
|
|
34
|
+
from .write_file import write, FileWriter
|
|
25
35
|
|
|
26
36
|
__all__ = [
|
|
37
|
+
# Email tools
|
|
27
38
|
"send_email",
|
|
28
39
|
"get_emails",
|
|
29
40
|
"mark_read",
|
|
30
41
|
"mark_unread",
|
|
42
|
+
# Class-based tools
|
|
31
43
|
"Memory",
|
|
32
44
|
"Gmail",
|
|
33
45
|
"GoogleCalendar",
|
|
@@ -35,10 +47,25 @@ __all__ = [
|
|
|
35
47
|
"MicrosoftCalendar",
|
|
36
48
|
"WebFetch",
|
|
37
49
|
"Shell",
|
|
50
|
+
"bash",
|
|
38
51
|
"DiffWriter",
|
|
52
|
+
"MODE_NORMAL",
|
|
53
|
+
"MODE_AUTO",
|
|
54
|
+
"MODE_PLAN",
|
|
55
|
+
# TUI helpers
|
|
39
56
|
"pick",
|
|
40
57
|
"yes_no",
|
|
41
58
|
"autocomplete",
|
|
59
|
+
# Task management
|
|
42
60
|
"TodoList",
|
|
43
|
-
"SlashCommand"
|
|
61
|
+
"SlashCommand",
|
|
62
|
+
"ask_user",
|
|
63
|
+
# Claude Code-style file tools
|
|
64
|
+
"read_file",
|
|
65
|
+
"edit",
|
|
66
|
+
"multi_edit",
|
|
67
|
+
"glob",
|
|
68
|
+
"grep",
|
|
69
|
+
"write",
|
|
70
|
+
"FileWriter",
|
|
44
71
|
]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Purpose: Ask user a question during agent execution via io
|
|
3
|
+
LLM-Note:
|
|
4
|
+
Dependencies: imports from [typing] | imported by [useful_tools/__init__.py]
|
|
5
|
+
Data flow: agent calls ask_user tool → sends ask_user event via io → waits for response → returns answer
|
|
6
|
+
State/Effects: blocks until user responds via io
|
|
7
|
+
Integration: requires agent.io to be set | agent parameter injected by tool_executor
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from typing import List, Optional
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def ask_user(
|
|
14
|
+
agent,
|
|
15
|
+
question: str,
|
|
16
|
+
options: Optional[List[str]] = None,
|
|
17
|
+
multi_select: bool = False
|
|
18
|
+
) -> str:
|
|
19
|
+
"""Ask the user a question and wait for their response.
|
|
20
|
+
|
|
21
|
+
Args:
|
|
22
|
+
question: The question to ask the user
|
|
23
|
+
options: Optional list of choices for the user to select from
|
|
24
|
+
multi_select: If True, user can select multiple options
|
|
25
|
+
|
|
26
|
+
Returns:
|
|
27
|
+
The user's answer (or comma-separated answers if multi_select)
|
|
28
|
+
"""
|
|
29
|
+
agent.io.send({
|
|
30
|
+
"type": "ask_user",
|
|
31
|
+
"question": question,
|
|
32
|
+
"options": options,
|
|
33
|
+
"multi_select": multi_select
|
|
34
|
+
})
|
|
35
|
+
return agent.io.receive().get("answer", "")
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Bash tool for executing terminal commands (Unix/Mac only).
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
from connectonion import Agent, bash
|
|
6
|
+
|
|
7
|
+
agent = Agent("coder", tools=[bash])
|
|
8
|
+
|
|
9
|
+
# Agent can now use:
|
|
10
|
+
# - bash(command) - Execute bash command, returns output
|
|
11
|
+
# - bash(command, cwd="/path") - Execute in specific directory
|
|
12
|
+
# - bash(command, timeout=60) - Execute with custom timeout
|
|
13
|
+
|
|
14
|
+
Note: This tool is for Unix/Mac systems. For cross-platform usage, use Shell class instead.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import subprocess
|
|
18
|
+
import platform
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def bash(command: str, cwd: str = ".", timeout: int = 120) -> str:
|
|
22
|
+
"""Execute a bash command, returns output (Unix/Mac only).
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
command: Bash command to execute (e.g., "ls -la", "git status")
|
|
26
|
+
cwd: Working directory (default: current directory)
|
|
27
|
+
timeout: Seconds before timeout (default: 120, max: 600)
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
Command output (stdout + stderr)
|
|
31
|
+
"""
|
|
32
|
+
# Check platform
|
|
33
|
+
if platform.system() == "Windows":
|
|
34
|
+
return "Error: bash tool is for Unix/Mac only. Use Shell class for Windows."
|
|
35
|
+
|
|
36
|
+
# Cap timeout at 10 minutes
|
|
37
|
+
timeout = min(timeout, 600)
|
|
38
|
+
|
|
39
|
+
try:
|
|
40
|
+
result = subprocess.run(
|
|
41
|
+
command,
|
|
42
|
+
shell=True,
|
|
43
|
+
executable="/bin/bash",
|
|
44
|
+
capture_output=True,
|
|
45
|
+
text=True,
|
|
46
|
+
cwd=cwd,
|
|
47
|
+
timeout=timeout
|
|
48
|
+
)
|
|
49
|
+
except subprocess.TimeoutExpired:
|
|
50
|
+
return f"Error: Command timed out after {timeout} seconds"
|
|
51
|
+
except FileNotFoundError:
|
|
52
|
+
return "Error: /bin/bash not found. This tool requires bash shell."
|
|
53
|
+
|
|
54
|
+
parts = []
|
|
55
|
+
if result.stdout:
|
|
56
|
+
parts.append(result.stdout.rstrip())
|
|
57
|
+
if result.stderr:
|
|
58
|
+
parts.append(f"STDERR:\n{result.stderr.rstrip()}")
|
|
59
|
+
if result.returncode != 0:
|
|
60
|
+
parts.append(f"\nExit code: {result.returncode}")
|
|
61
|
+
|
|
62
|
+
output = "\n".join(parts) if parts else "(no output)"
|
|
63
|
+
|
|
64
|
+
# Truncate large outputs
|
|
65
|
+
max_chars = 10000
|
|
66
|
+
if len(output) > max_chars:
|
|
67
|
+
output = output[:max_chars] + f"\n... (truncated, {len(output):,} total chars)"
|
|
68
|
+
|
|
69
|
+
return output
|