calvyn-code 0.14.0
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.
- package/LICENSE +21 -0
- package/README.md +217 -0
- package/README.zh-CN.md +180 -0
- package/acp_adapter/__init__.py +1 -0
- package/acp_adapter/__main__.py +5 -0
- package/acp_adapter/auth.py +68 -0
- package/acp_adapter/bootstrap/__init__.py +0 -0
- package/acp_adapter/bootstrap/bootstrap_browser_tools.ps1 +288 -0
- package/acp_adapter/bootstrap/bootstrap_browser_tools.sh +399 -0
- package/acp_adapter/entry.py +292 -0
- package/acp_adapter/events.py +265 -0
- package/acp_adapter/permissions.py +148 -0
- package/acp_adapter/server.py +1713 -0
- package/acp_adapter/session.py +629 -0
- package/acp_adapter/tools.py +1180 -0
- package/agent/__init__.py +6 -0
- package/agent/__pycache__/__init__.cpython-312.pyc +0 -0
- package/agent/__pycache__/account_usage.cpython-312.pyc +0 -0
- package/agent/__pycache__/anthropic_adapter.cpython-312.pyc +0 -0
- package/agent/__pycache__/async_utils.cpython-312.pyc +0 -0
- package/agent/__pycache__/auxiliary_client.cpython-312.pyc +0 -0
- package/agent/__pycache__/codex_responses_adapter.cpython-312.pyc +0 -0
- package/agent/__pycache__/context_compressor.cpython-312.pyc +0 -0
- package/agent/__pycache__/context_engine.cpython-312.pyc +0 -0
- package/agent/__pycache__/context_references.cpython-312.pyc +0 -0
- package/agent/__pycache__/credential_pool.cpython-312.pyc +0 -0
- package/agent/__pycache__/curator.cpython-312.pyc +0 -0
- package/agent/__pycache__/display.cpython-312.pyc +0 -0
- package/agent/__pycache__/error_classifier.cpython-312.pyc +0 -0
- package/agent/__pycache__/file_safety.cpython-312.pyc +0 -0
- package/agent/__pycache__/google_code_assist.cpython-312.pyc +0 -0
- package/agent/__pycache__/google_oauth.cpython-312.pyc +0 -0
- package/agent/__pycache__/i18n.cpython-312.pyc +0 -0
- package/agent/__pycache__/image_gen_provider.cpython-312.pyc +0 -0
- package/agent/__pycache__/image_gen_registry.cpython-312.pyc +0 -0
- package/agent/__pycache__/insights.cpython-312.pyc +0 -0
- package/agent/__pycache__/lmstudio_reasoning.cpython-312.pyc +0 -0
- package/agent/__pycache__/manual_compression_feedback.cpython-312.pyc +0 -0
- package/agent/__pycache__/markdown_tables.cpython-312.pyc +0 -0
- package/agent/__pycache__/memory_manager.cpython-312.pyc +0 -0
- package/agent/__pycache__/memory_provider.cpython-312.pyc +0 -0
- package/agent/__pycache__/model_metadata.cpython-312.pyc +0 -0
- package/agent/__pycache__/models_dev.cpython-312.pyc +0 -0
- package/agent/__pycache__/moonshot_schema.cpython-312.pyc +0 -0
- package/agent/__pycache__/onboarding.cpython-312.pyc +0 -0
- package/agent/__pycache__/portal_tags.cpython-312.pyc +0 -0
- package/agent/__pycache__/prompt_builder.cpython-312.pyc +0 -0
- package/agent/__pycache__/prompt_caching.cpython-312.pyc +0 -0
- package/agent/__pycache__/redact.cpython-312.pyc +0 -0
- package/agent/__pycache__/retry_utils.cpython-312.pyc +0 -0
- package/agent/__pycache__/shell_hooks.cpython-312.pyc +0 -0
- package/agent/__pycache__/skill_commands.cpython-312.pyc +0 -0
- package/agent/__pycache__/skill_preprocessing.cpython-312.pyc +0 -0
- package/agent/__pycache__/skill_utils.cpython-312.pyc +0 -0
- package/agent/__pycache__/subdirectory_hints.cpython-312.pyc +0 -0
- package/agent/__pycache__/think_scrubber.cpython-312.pyc +0 -0
- package/agent/__pycache__/title_generator.cpython-312.pyc +0 -0
- package/agent/__pycache__/tool_guardrails.cpython-312.pyc +0 -0
- package/agent/__pycache__/tool_result_classification.cpython-312.pyc +0 -0
- package/agent/__pycache__/trajectory.cpython-312.pyc +0 -0
- package/agent/__pycache__/usage_pricing.cpython-312.pyc +0 -0
- package/agent/__pycache__/video_gen_provider.cpython-312.pyc +0 -0
- package/agent/__pycache__/video_gen_registry.cpython-312.pyc +0 -0
- package/agent/__pycache__/web_search_provider.cpython-312.pyc +0 -0
- package/agent/__pycache__/web_search_registry.cpython-312.pyc +0 -0
- package/agent/account_usage.py +326 -0
- package/agent/anthropic_adapter.py +2087 -0
- package/agent/async_utils.py +68 -0
- package/agent/auxiliary_client.py +4893 -0
- package/agent/bedrock_adapter.py +1276 -0
- package/agent/codex_responses_adapter.py +1084 -0
- package/agent/context_compressor.py +1583 -0
- package/agent/context_engine.py +211 -0
- package/agent/context_references.py +519 -0
- package/agent/copilot_acp_client.py +684 -0
- package/agent/credential_pool.py +1780 -0
- package/agent/credential_sources.py +449 -0
- package/agent/curator.py +1782 -0
- package/agent/curator_backup.py +694 -0
- package/agent/display.py +987 -0
- package/agent/error_classifier.py +1058 -0
- package/agent/file_safety.py +112 -0
- package/agent/gemini_cloudcode_adapter.py +909 -0
- package/agent/gemini_native_adapter.py +971 -0
- package/agent/gemini_schema.py +99 -0
- package/agent/google_code_assist.py +452 -0
- package/agent/google_oauth.py +1062 -0
- package/agent/i18n.py +258 -0
- package/agent/image_gen_provider.py +243 -0
- package/agent/image_gen_registry.py +145 -0
- package/agent/image_routing.py +301 -0
- package/agent/insights.py +931 -0
- package/agent/lmstudio_reasoning.py +48 -0
- package/agent/lsp/__init__.py +106 -0
- package/agent/lsp/__pycache__/__init__.cpython-312.pyc +0 -0
- package/agent/lsp/__pycache__/cli.cpython-312.pyc +0 -0
- package/agent/lsp/__pycache__/client.cpython-312.pyc +0 -0
- package/agent/lsp/__pycache__/eventlog.cpython-312.pyc +0 -0
- package/agent/lsp/__pycache__/manager.cpython-312.pyc +0 -0
- package/agent/lsp/__pycache__/protocol.cpython-312.pyc +0 -0
- package/agent/lsp/__pycache__/servers.cpython-312.pyc +0 -0
- package/agent/lsp/__pycache__/workspace.cpython-312.pyc +0 -0
- package/agent/lsp/cli.py +308 -0
- package/agent/lsp/client.py +930 -0
- package/agent/lsp/eventlog.py +213 -0
- package/agent/lsp/install.py +376 -0
- package/agent/lsp/manager.py +644 -0
- package/agent/lsp/protocol.py +196 -0
- package/agent/lsp/range_shift.py +149 -0
- package/agent/lsp/reporter.py +78 -0
- package/agent/lsp/servers.py +1040 -0
- package/agent/lsp/workspace.py +223 -0
- package/agent/manual_compression_feedback.py +49 -0
- package/agent/markdown_tables.py +309 -0
- package/agent/memory_manager.py +556 -0
- package/agent/memory_provider.py +279 -0
- package/agent/model_metadata.py +1827 -0
- package/agent/models_dev.py +724 -0
- package/agent/moonshot_schema.py +231 -0
- package/agent/nous_rate_guard.py +326 -0
- package/agent/onboarding.py +193 -0
- package/agent/plugin_llm.py +1046 -0
- package/agent/portal_tags.py +64 -0
- package/agent/prompt_builder.py +1457 -0
- package/agent/prompt_caching.py +79 -0
- package/agent/rate_limit_tracker.py +246 -0
- package/agent/redact.py +403 -0
- package/agent/retry_utils.py +57 -0
- package/agent/shell_hooks.py +837 -0
- package/agent/skill_commands.py +502 -0
- package/agent/skill_preprocessing.py +131 -0
- package/agent/skill_utils.py +512 -0
- package/agent/subdirectory_hints.py +224 -0
- package/agent/think_scrubber.py +386 -0
- package/agent/title_generator.py +171 -0
- package/agent/tool_guardrails.py +458 -0
- package/agent/tool_result_classification.py +26 -0
- package/agent/trajectory.py +56 -0
- package/agent/transports/__init__.py +68 -0
- package/agent/transports/__pycache__/__init__.cpython-312.pyc +0 -0
- package/agent/transports/__pycache__/anthropic.cpython-312.pyc +0 -0
- package/agent/transports/__pycache__/base.cpython-312.pyc +0 -0
- package/agent/transports/__pycache__/bedrock.cpython-312.pyc +0 -0
- package/agent/transports/__pycache__/chat_completions.cpython-312.pyc +0 -0
- package/agent/transports/__pycache__/codex.cpython-312.pyc +0 -0
- package/agent/transports/__pycache__/types.cpython-312.pyc +0 -0
- package/agent/transports/anthropic.py +179 -0
- package/agent/transports/base.py +89 -0
- package/agent/transports/bedrock.py +154 -0
- package/agent/transports/chat_completions.py +614 -0
- package/agent/transports/codex.py +283 -0
- package/agent/transports/codex_app_server.py +368 -0
- package/agent/transports/codex_app_server_session.py +810 -0
- package/agent/transports/codex_event_projector.py +312 -0
- package/agent/transports/hermes_tools_mcp_server.py +233 -0
- package/agent/transports/types.py +162 -0
- package/agent/usage_pricing.py +877 -0
- package/agent/video_gen_provider.py +300 -0
- package/agent/video_gen_registry.py +117 -0
- package/agent/web_search_provider.py +221 -0
- package/agent/web_search_registry.py +262 -0
- package/assets/banner.png +0 -0
- package/batch_runner.py +1303 -0
- package/bin/calvyn.js +67 -0
- package/calvyn_bootstrap.py +130 -0
- package/calvyn_constants.py +346 -0
- package/calvyn_logging.py +390 -0
- package/calvyn_state.py +2967 -0
- package/calvyn_time.py +105 -0
- package/cli.py +14160 -0
- package/cron/__init__.py +42 -0
- package/cron/__pycache__/__init__.cpython-312.pyc +0 -0
- package/cron/__pycache__/jobs.cpython-312.pyc +0 -0
- package/cron/__pycache__/scheduler.cpython-312.pyc +0 -0
- package/cron/jobs.py +1160 -0
- package/cron/scheduler.py +1832 -0
- package/gateway/__init__.py +35 -0
- package/gateway/__pycache__/__init__.cpython-312.pyc +0 -0
- package/gateway/__pycache__/channel_directory.cpython-312.pyc +0 -0
- package/gateway/__pycache__/config.cpython-312.pyc +0 -0
- package/gateway/__pycache__/delivery.cpython-312.pyc +0 -0
- package/gateway/__pycache__/display_config.cpython-312.pyc +0 -0
- package/gateway/__pycache__/hooks.cpython-312.pyc +0 -0
- package/gateway/__pycache__/pairing.cpython-312.pyc +0 -0
- package/gateway/__pycache__/platform_registry.cpython-312.pyc +0 -0
- package/gateway/__pycache__/restart.cpython-312.pyc +0 -0
- package/gateway/__pycache__/run.cpython-312.pyc +0 -0
- package/gateway/__pycache__/runtime_footer.cpython-312.pyc +0 -0
- package/gateway/__pycache__/session.cpython-312.pyc +0 -0
- package/gateway/__pycache__/session_context.cpython-312.pyc +0 -0
- package/gateway/__pycache__/shutdown_forensics.cpython-312.pyc +0 -0
- package/gateway/__pycache__/slash_access.cpython-312.pyc +0 -0
- package/gateway/__pycache__/status.cpython-312.pyc +0 -0
- package/gateway/__pycache__/stream_consumer.cpython-312.pyc +0 -0
- package/gateway/__pycache__/whatsapp_identity.cpython-312.pyc +0 -0
- package/gateway/assets/telegram-botfather-threads-settings.jpg +0 -0
- package/gateway/builtin_hooks/__init__.py +1 -0
- package/gateway/channel_directory.py +357 -0
- package/gateway/config.py +1873 -0
- package/gateway/delivery.py +258 -0
- package/gateway/display_config.py +206 -0
- package/gateway/hooks.py +210 -0
- package/gateway/mirror.py +179 -0
- package/gateway/pairing.py +322 -0
- package/gateway/platform_registry.py +260 -0
- package/gateway/platforms/ADDING_A_PLATFORM.md +374 -0
- package/gateway/platforms/__init__.py +45 -0
- package/gateway/platforms/__pycache__/__init__.cpython-312.pyc +0 -0
- package/gateway/platforms/__pycache__/base.cpython-312.pyc +0 -0
- package/gateway/platforms/__pycache__/helpers.cpython-312.pyc +0 -0
- package/gateway/platforms/__pycache__/telegram.cpython-312.pyc +0 -0
- package/gateway/platforms/__pycache__/telegram_network.cpython-312.pyc +0 -0
- package/gateway/platforms/__pycache__/yuanbao.cpython-312.pyc +0 -0
- package/gateway/platforms/__pycache__/yuanbao_media.cpython-312.pyc +0 -0
- package/gateway/platforms/__pycache__/yuanbao_proto.cpython-312.pyc +0 -0
- package/gateway/platforms/_http_client_limits.py +84 -0
- package/gateway/platforms/api_server.py +3488 -0
- package/gateway/platforms/base.py +3747 -0
- package/gateway/platforms/bluebubbles.py +937 -0
- package/gateway/platforms/dingtalk.py +1473 -0
- package/gateway/platforms/discord.py +5584 -0
- package/gateway/platforms/email.py +773 -0
- package/gateway/platforms/feishu.py +5059 -0
- package/gateway/platforms/feishu_comment.py +1382 -0
- package/gateway/platforms/feishu_comment_rules.py +430 -0
- package/gateway/platforms/helpers.py +279 -0
- package/gateway/platforms/homeassistant.py +449 -0
- package/gateway/platforms/matrix.py +2777 -0
- package/gateway/platforms/mattermost.py +852 -0
- package/gateway/platforms/msgraph_webhook.py +397 -0
- package/gateway/platforms/qqbot/__init__.py +91 -0
- package/gateway/platforms/qqbot/adapter.py +3072 -0
- package/gateway/platforms/qqbot/chunked_upload.py +602 -0
- package/gateway/platforms/qqbot/constants.py +74 -0
- package/gateway/platforms/qqbot/crypto.py +45 -0
- package/gateway/platforms/qqbot/keyboards.py +473 -0
- package/gateway/platforms/qqbot/onboard.py +220 -0
- package/gateway/platforms/qqbot/utils.py +71 -0
- package/gateway/platforms/signal.py +1518 -0
- package/gateway/platforms/signal_rate_limit.py +369 -0
- package/gateway/platforms/slack.py +3028 -0
- package/gateway/platforms/sms.py +377 -0
- package/gateway/platforms/telegram.py +4836 -0
- package/gateway/platforms/telegram_network.py +249 -0
- package/gateway/platforms/webhook.py +806 -0
- package/gateway/platforms/wecom.py +1610 -0
- package/gateway/platforms/wecom_callback.py +403 -0
- package/gateway/platforms/wecom_crypto.py +142 -0
- package/gateway/platforms/weixin.py +2170 -0
- package/gateway/platforms/whatsapp.py +1283 -0
- package/gateway/platforms/yuanbao.py +4873 -0
- package/gateway/platforms/yuanbao_media.py +645 -0
- package/gateway/platforms/yuanbao_proto.py +1209 -0
- package/gateway/platforms/yuanbao_sticker.py +558 -0
- package/gateway/restart.py +20 -0
- package/gateway/run.py +17074 -0
- package/gateway/runtime_footer.py +150 -0
- package/gateway/session.py +1399 -0
- package/gateway/session_context.py +156 -0
- package/gateway/shutdown_forensics.py +462 -0
- package/gateway/slash_access.py +229 -0
- package/gateway/status.py +972 -0
- package/gateway/sticker_cache.py +111 -0
- package/gateway/stream_consumer.py +1286 -0
- package/gateway/whatsapp_identity.py +156 -0
- package/hermes_cli/__init__.py +47 -0
- package/hermes_cli/__pycache__/__init__.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/_parser.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/auth.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/banner.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/browser_connect.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/callbacks.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/checkpoints.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/cli_output.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/codex_models.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/codex_runtime_switch.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/colors.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/commands.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/config.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/copilot_auth.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/curator.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/curses_ui.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/debug.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/default_soul.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/env_loader.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/fallback_cmd.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/gateway.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/gateway_windows.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/goals.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/inventory.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/kanban.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/kanban_db.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/main.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/model_catalog.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/model_normalize.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/model_switch.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/models.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/nous_subscription.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/pairing.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/platforms.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/plugins.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/profiles.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/providers.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/pt_input_extras.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/runtime_provider.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/security_advisories.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/setup.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/skills_hub.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/skin_engine.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/stdio.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/timeouts.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/tips.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/tools_config.cpython-312.pyc +0 -0
- package/hermes_cli/__pycache__/voice.cpython-312.pyc +0 -0
- package/hermes_cli/_parser.py +365 -0
- package/hermes_cli/_subprocess_compat.py +175 -0
- package/hermes_cli/auth.py +6299 -0
- package/hermes_cli/auth_commands.py +749 -0
- package/hermes_cli/azure_detect.py +300 -0
- package/hermes_cli/backup.py +938 -0
- package/hermes_cli/banner.py +703 -0
- package/hermes_cli/browser_connect.py +139 -0
- package/hermes_cli/callbacks.py +243 -0
- package/hermes_cli/checkpoints.py +244 -0
- package/hermes_cli/claw.py +810 -0
- package/hermes_cli/cli_output.py +78 -0
- package/hermes_cli/clipboard.py +495 -0
- package/hermes_cli/codex_models.py +198 -0
- package/hermes_cli/codex_runtime_plugin_migration.py +757 -0
- package/hermes_cli/codex_runtime_switch.py +266 -0
- package/hermes_cli/colors.py +38 -0
- package/hermes_cli/commands.py +1728 -0
- package/hermes_cli/completion.py +315 -0
- package/hermes_cli/config.py +5382 -0
- package/hermes_cli/copilot_auth.py +392 -0
- package/hermes_cli/cron.py +313 -0
- package/hermes_cli/curator.py +598 -0
- package/hermes_cli/curses_ui.py +472 -0
- package/hermes_cli/debug.py +747 -0
- package/hermes_cli/default_soul.py +11 -0
- package/hermes_cli/dep_ensure.py +107 -0
- package/hermes_cli/dingtalk_auth.py +293 -0
- package/hermes_cli/doctor.py +1863 -0
- package/hermes_cli/dump.py +326 -0
- package/hermes_cli/env_loader.py +175 -0
- package/hermes_cli/fallback_cmd.py +361 -0
- package/hermes_cli/gateway.py +5422 -0
- package/hermes_cli/gateway_windows.py +692 -0
- package/hermes_cli/goals.py +757 -0
- package/hermes_cli/hooks.py +385 -0
- package/hermes_cli/inventory.py +240 -0
- package/hermes_cli/kanban.py +2252 -0
- package/hermes_cli/kanban_db.py +4840 -0
- package/hermes_cli/kanban_diagnostics.py +776 -0
- package/hermes_cli/kanban_specify.py +266 -0
- package/hermes_cli/logs.py +391 -0
- package/hermes_cli/main.py +12396 -0
- package/hermes_cli/mcp_config.py +781 -0
- package/hermes_cli/memory_setup.py +465 -0
- package/hermes_cli/model_catalog.py +330 -0
- package/hermes_cli/model_normalize.py +473 -0
- package/hermes_cli/model_switch.py +1777 -0
- package/hermes_cli/models.py +3789 -0
- package/hermes_cli/nous_subscription.py +799 -0
- package/hermes_cli/oneshot.py +351 -0
- package/hermes_cli/pairing.py +115 -0
- package/hermes_cli/platforms.py +83 -0
- package/hermes_cli/plugins.py +1562 -0
- package/hermes_cli/plugins_cmd.py +1587 -0
- package/hermes_cli/profile_distribution.py +703 -0
- package/hermes_cli/profiles.py +1319 -0
- package/hermes_cli/providers.py +720 -0
- package/hermes_cli/proxy/__init__.py +20 -0
- package/hermes_cli/proxy/adapters/__init__.py +35 -0
- package/hermes_cli/proxy/adapters/base.py +94 -0
- package/hermes_cli/proxy/adapters/nous_portal.py +137 -0
- package/hermes_cli/proxy/cli.py +141 -0
- package/hermes_cli/proxy/server.py +265 -0
- package/hermes_cli/pt_input_extras.py +83 -0
- package/hermes_cli/pty_bridge.py +237 -0
- package/hermes_cli/relaunch.py +205 -0
- package/hermes_cli/runtime_provider.py +1428 -0
- package/hermes_cli/security_advisories.py +452 -0
- package/hermes_cli/setup.py +3559 -0
- package/hermes_cli/skills_config.py +177 -0
- package/hermes_cli/skills_hub.py +1595 -0
- package/hermes_cli/skin_engine.py +929 -0
- package/hermes_cli/slack_cli.py +160 -0
- package/hermes_cli/status.py +550 -0
- package/hermes_cli/stdio.py +252 -0
- package/hermes_cli/timeouts.py +82 -0
- package/hermes_cli/tips.py +487 -0
- package/hermes_cli/tools_config.py +3151 -0
- package/hermes_cli/uninstall.py +681 -0
- package/hermes_cli/vercel_auth.py +70 -0
- package/hermes_cli/voice.py +846 -0
- package/hermes_cli/web_server.py +4438 -0
- package/hermes_cli/webhook.py +275 -0
- package/locales/af.yaml +350 -0
- package/locales/de.yaml +350 -0
- package/locales/en.yaml +365 -0
- package/locales/es.yaml +350 -0
- package/locales/fr.yaml +350 -0
- package/locales/ga.yaml +354 -0
- package/locales/hu.yaml +350 -0
- package/locales/it.yaml +350 -0
- package/locales/ja.yaml +350 -0
- package/locales/ko.yaml +350 -0
- package/locales/pt.yaml +350 -0
- package/locales/ru.yaml +350 -0
- package/locales/tr.yaml +350 -0
- package/locales/uk.yaml +350 -0
- package/locales/zh-hant.yaml +350 -0
- package/locales/zh.yaml +350 -0
- package/mcp_serve.py +898 -0
- package/model_tools.py +899 -0
- package/optional-skills/DESCRIPTION.md +24 -0
- package/optional-skills/autonomous-ai-agents/DESCRIPTION.md +2 -0
- package/optional-skills/autonomous-ai-agents/blackbox/SKILL.md +144 -0
- package/optional-skills/autonomous-ai-agents/honcho/SKILL.md +431 -0
- package/optional-skills/blockchain/evm/SKILL.md +211 -0
- package/optional-skills/blockchain/evm/scripts/evm_client.py +1508 -0
- package/optional-skills/blockchain/hyperliquid/SKILL.md +211 -0
- package/optional-skills/blockchain/hyperliquid/scripts/hyperliquid_client.py +1660 -0
- package/optional-skills/blockchain/solana/SKILL.md +208 -0
- package/optional-skills/blockchain/solana/scripts/solana_client.py +698 -0
- package/optional-skills/communication/DESCRIPTION.md +1 -0
- package/optional-skills/communication/one-three-one-rule/SKILL.md +104 -0
- package/optional-skills/creative/blender-mcp/SKILL.md +117 -0
- package/optional-skills/creative/concept-diagrams/SKILL.md +362 -0
- package/optional-skills/creative/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
- package/optional-skills/creative/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
- package/optional-skills/creative/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
- package/optional-skills/creative/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
- package/optional-skills/creative/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
- package/optional-skills/creative/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
- package/optional-skills/creative/concept-diagrams/examples/electricity-grid-flow.md +182 -0
- package/optional-skills/creative/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
- package/optional-skills/creative/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
- package/optional-skills/creative/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
- package/optional-skills/creative/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
- package/optional-skills/creative/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
- package/optional-skills/creative/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
- package/optional-skills/creative/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
- package/optional-skills/creative/concept-diagrams/examples/wind-turbine-structure.md +338 -0
- package/optional-skills/creative/concept-diagrams/references/dashboard-patterns.md +43 -0
- package/optional-skills/creative/concept-diagrams/references/infrastructure-patterns.md +144 -0
- package/optional-skills/creative/concept-diagrams/references/physical-shape-cookbook.md +42 -0
- package/optional-skills/creative/concept-diagrams/templates/template.html +174 -0
- package/optional-skills/creative/hyperframes/SKILL.md +191 -0
- package/optional-skills/creative/hyperframes/references/cli.md +185 -0
- package/optional-skills/creative/hyperframes/references/composition.md +129 -0
- package/optional-skills/creative/hyperframes/references/features.md +289 -0
- package/optional-skills/creative/hyperframes/references/gsap.md +136 -0
- package/optional-skills/creative/hyperframes/references/troubleshooting.md +137 -0
- package/optional-skills/creative/hyperframes/references/website-to-video.md +145 -0
- package/optional-skills/creative/hyperframes/scripts/setup.sh +135 -0
- package/optional-skills/creative/kanban-video-orchestrator/SKILL.md +207 -0
- package/optional-skills/creative/kanban-video-orchestrator/assets/brief.md.tmpl +79 -0
- package/optional-skills/creative/kanban-video-orchestrator/assets/setup.sh.tmpl +185 -0
- package/optional-skills/creative/kanban-video-orchestrator/assets/soul.md.tmpl +38 -0
- package/optional-skills/creative/kanban-video-orchestrator/references/examples.md +227 -0
- package/optional-skills/creative/kanban-video-orchestrator/references/intake.md +166 -0
- package/optional-skills/creative/kanban-video-orchestrator/references/kanban-setup.md +276 -0
- package/optional-skills/creative/kanban-video-orchestrator/references/monitoring.md +180 -0
- package/optional-skills/creative/kanban-video-orchestrator/references/role-archetypes.md +298 -0
- package/optional-skills/creative/kanban-video-orchestrator/references/tool-matrix.md +317 -0
- package/optional-skills/creative/kanban-video-orchestrator/scripts/bootstrap_pipeline.py +501 -0
- package/optional-skills/creative/kanban-video-orchestrator/scripts/monitor.py +195 -0
- package/optional-skills/creative/meme-generation/EXAMPLES.md +46 -0
- package/optional-skills/creative/meme-generation/SKILL.md +130 -0
- package/optional-skills/creative/meme-generation/scripts/generate_meme.py +471 -0
- package/optional-skills/creative/meme-generation/scripts/templates.json +97 -0
- package/optional-skills/devops/cli/SKILL.md +156 -0
- package/optional-skills/devops/cli/references/app-discovery.md +112 -0
- package/optional-skills/devops/cli/references/authentication.md +59 -0
- package/optional-skills/devops/cli/references/cli-reference.md +104 -0
- package/optional-skills/devops/cli/references/running-apps.md +171 -0
- package/optional-skills/devops/docker-management/SKILL.md +281 -0
- package/optional-skills/devops/pinggy-tunnel/SKILL.md +309 -0
- package/optional-skills/devops/watchers/SKILL.md +112 -0
- package/optional-skills/devops/watchers/scripts/_watermark.py +148 -0
- package/optional-skills/devops/watchers/scripts/watch_github.py +168 -0
- package/optional-skills/devops/watchers/scripts/watch_http_json.py +131 -0
- package/optional-skills/devops/watchers/scripts/watch_rss.py +121 -0
- package/optional-skills/dogfood/DESCRIPTION.md +3 -0
- package/optional-skills/dogfood/adversarial-ux-test/SKILL.md +191 -0
- package/optional-skills/email/agentmail/SKILL.md +126 -0
- package/optional-skills/finance/3-statement-model/SKILL.md +433 -0
- package/optional-skills/finance/3-statement-model/references/formatting.md +118 -0
- package/optional-skills/finance/3-statement-model/references/formulas.md +292 -0
- package/optional-skills/finance/3-statement-model/references/sec-filings.md +125 -0
- package/optional-skills/finance/comps-analysis/SKILL.md +662 -0
- package/optional-skills/finance/dcf-model/SKILL.md +1270 -0
- package/optional-skills/finance/dcf-model/TROUBLESHOOTING.md +40 -0
- package/optional-skills/finance/dcf-model/requirements.txt +7 -0
- package/optional-skills/finance/dcf-model/scripts/validate_dcf.py +292 -0
- package/optional-skills/finance/excel-author/SKILL.md +244 -0
- package/optional-skills/finance/excel-author/scripts/recalc.py +88 -0
- package/optional-skills/finance/lbo-model/SKILL.md +291 -0
- package/optional-skills/finance/merger-model/SKILL.md +144 -0
- package/optional-skills/finance/pptx-author/SKILL.md +173 -0
- package/optional-skills/finance/stocks/SKILL.md +95 -0
- package/optional-skills/finance/stocks/scripts/stocks_client.py +755 -0
- package/optional-skills/health/DESCRIPTION.md +1 -0
- package/optional-skills/health/fitness-nutrition/SKILL.md +256 -0
- package/optional-skills/health/fitness-nutrition/references/FORMULAS.md +100 -0
- package/optional-skills/health/fitness-nutrition/scripts/body_calc.py +210 -0
- package/optional-skills/health/fitness-nutrition/scripts/nutrition_search.py +86 -0
- package/optional-skills/health/neuroskill-bci/SKILL.md +459 -0
- package/optional-skills/health/neuroskill-bci/references/api.md +286 -0
- package/optional-skills/health/neuroskill-bci/references/metrics.md +220 -0
- package/optional-skills/health/neuroskill-bci/references/protocols.md +452 -0
- package/optional-skills/mcp/DESCRIPTION.md +3 -0
- package/optional-skills/mcp/fastmcp/SKILL.md +300 -0
- package/optional-skills/mcp/fastmcp/references/fastmcp-cli.md +110 -0
- package/optional-skills/mcp/fastmcp/scripts/scaffold_fastmcp.py +56 -0
- package/optional-skills/mcp/fastmcp/templates/api_wrapper.py +54 -0
- package/optional-skills/mcp/fastmcp/templates/database_server.py +77 -0
- package/optional-skills/mcp/fastmcp/templates/file_processor.py +55 -0
- package/optional-skills/mcp/mcporter/SKILL.md +123 -0
- package/optional-skills/migration/DESCRIPTION.md +2 -0
- package/optional-skills/migration/openclaw-migration/SKILL.md +298 -0
- package/optional-skills/migration/openclaw-migration/scripts/openclaw_to_hermes.py +3136 -0
- package/optional-skills/mlops/accelerate/SKILL.md +336 -0
- package/optional-skills/mlops/accelerate/references/custom-plugins.md +453 -0
- package/optional-skills/mlops/accelerate/references/megatron-integration.md +489 -0
- package/optional-skills/mlops/accelerate/references/performance.md +525 -0
- package/optional-skills/mlops/chroma/SKILL.md +410 -0
- package/optional-skills/mlops/chroma/references/integration.md +38 -0
- package/optional-skills/mlops/clip/SKILL.md +257 -0
- package/optional-skills/mlops/clip/references/applications.md +207 -0
- package/optional-skills/mlops/faiss/SKILL.md +225 -0
- package/optional-skills/mlops/faiss/references/index_types.md +280 -0
- package/optional-skills/mlops/flash-attention/SKILL.md +367 -0
- package/optional-skills/mlops/flash-attention/references/benchmarks.md +215 -0
- package/optional-skills/mlops/flash-attention/references/transformers-integration.md +293 -0
- package/optional-skills/mlops/guidance/SKILL.md +576 -0
- package/optional-skills/mlops/guidance/references/backends.md +554 -0
- package/optional-skills/mlops/guidance/references/constraints.md +674 -0
- package/optional-skills/mlops/guidance/references/examples.md +767 -0
- package/optional-skills/mlops/huggingface-tokenizers/SKILL.md +520 -0
- package/optional-skills/mlops/huggingface-tokenizers/references/algorithms.md +653 -0
- package/optional-skills/mlops/huggingface-tokenizers/references/integration.md +637 -0
- package/optional-skills/mlops/huggingface-tokenizers/references/pipeline.md +723 -0
- package/optional-skills/mlops/huggingface-tokenizers/references/training.md +565 -0
- package/optional-skills/mlops/inference/outlines/SKILL.md +656 -0
- package/optional-skills/mlops/inference/outlines/references/backends.md +615 -0
- package/optional-skills/mlops/inference/outlines/references/examples.md +773 -0
- package/optional-skills/mlops/inference/outlines/references/json_generation.md +652 -0
- package/optional-skills/mlops/instructor/SKILL.md +744 -0
- package/optional-skills/mlops/instructor/references/examples.md +107 -0
- package/optional-skills/mlops/instructor/references/providers.md +70 -0
- package/optional-skills/mlops/instructor/references/validation.md +606 -0
- package/optional-skills/mlops/lambda-labs/SKILL.md +549 -0
- package/optional-skills/mlops/lambda-labs/references/advanced-usage.md +611 -0
- package/optional-skills/mlops/lambda-labs/references/troubleshooting.md +530 -0
- package/optional-skills/mlops/llava/SKILL.md +308 -0
- package/optional-skills/mlops/llava/references/training.md +197 -0
- package/optional-skills/mlops/modal/SKILL.md +345 -0
- package/optional-skills/mlops/modal/references/advanced-usage.md +503 -0
- package/optional-skills/mlops/modal/references/troubleshooting.md +494 -0
- package/optional-skills/mlops/nemo-curator/SKILL.md +387 -0
- package/optional-skills/mlops/nemo-curator/references/deduplication.md +87 -0
- package/optional-skills/mlops/nemo-curator/references/filtering.md +102 -0
- package/optional-skills/mlops/peft/SKILL.md +435 -0
- package/optional-skills/mlops/peft/references/advanced-usage.md +514 -0
- package/optional-skills/mlops/peft/references/troubleshooting.md +480 -0
- package/optional-skills/mlops/pinecone/SKILL.md +362 -0
- package/optional-skills/mlops/pinecone/references/deployment.md +181 -0
- package/optional-skills/mlops/pytorch-fsdp/SKILL.md +130 -0
- package/optional-skills/mlops/pytorch-fsdp/references/index.md +7 -0
- package/optional-skills/mlops/pytorch-fsdp/references/other.md +4261 -0
- package/optional-skills/mlops/pytorch-lightning/SKILL.md +350 -0
- package/optional-skills/mlops/pytorch-lightning/references/callbacks.md +436 -0
- package/optional-skills/mlops/pytorch-lightning/references/distributed.md +490 -0
- package/optional-skills/mlops/pytorch-lightning/references/hyperparameter-tuning.md +556 -0
- package/optional-skills/mlops/qdrant/SKILL.md +497 -0
- package/optional-skills/mlops/qdrant/references/advanced-usage.md +648 -0
- package/optional-skills/mlops/qdrant/references/troubleshooting.md +631 -0
- package/optional-skills/mlops/saelens/SKILL.md +390 -0
- package/optional-skills/mlops/saelens/references/README.md +69 -0
- package/optional-skills/mlops/saelens/references/api.md +333 -0
- package/optional-skills/mlops/saelens/references/tutorials.md +318 -0
- package/optional-skills/mlops/simpo/SKILL.md +223 -0
- package/optional-skills/mlops/simpo/references/datasets.md +478 -0
- package/optional-skills/mlops/simpo/references/hyperparameters.md +452 -0
- package/optional-skills/mlops/simpo/references/loss-functions.md +350 -0
- package/optional-skills/mlops/slime/SKILL.md +468 -0
- package/optional-skills/mlops/slime/references/api-reference.md +392 -0
- package/optional-skills/mlops/slime/references/troubleshooting.md +386 -0
- package/optional-skills/mlops/stable-diffusion/SKILL.md +523 -0
- package/optional-skills/mlops/stable-diffusion/references/advanced-usage.md +716 -0
- package/optional-skills/mlops/stable-diffusion/references/troubleshooting.md +555 -0
- package/optional-skills/mlops/tensorrt-llm/SKILL.md +191 -0
- package/optional-skills/mlops/tensorrt-llm/references/multi-gpu.md +298 -0
- package/optional-skills/mlops/tensorrt-llm/references/optimization.md +242 -0
- package/optional-skills/mlops/tensorrt-llm/references/serving.md +470 -0
- package/optional-skills/mlops/torchtitan/SKILL.md +362 -0
- package/optional-skills/mlops/torchtitan/references/checkpoint.md +181 -0
- package/optional-skills/mlops/torchtitan/references/custom-models.md +258 -0
- package/optional-skills/mlops/torchtitan/references/float8.md +133 -0
- package/optional-skills/mlops/torchtitan/references/fsdp.md +126 -0
- package/optional-skills/mlops/training/axolotl/SKILL.md +166 -0
- package/optional-skills/mlops/training/axolotl/references/api.md +5548 -0
- package/optional-skills/mlops/training/axolotl/references/dataset-formats.md +1029 -0
- package/optional-skills/mlops/training/axolotl/references/index.md +15 -0
- package/optional-skills/mlops/training/axolotl/references/other.md +3563 -0
- package/optional-skills/mlops/training/trl-fine-tuning/SKILL.md +463 -0
- package/optional-skills/mlops/training/trl-fine-tuning/references/dpo-variants.md +227 -0
- package/optional-skills/mlops/training/trl-fine-tuning/references/grpo-training.md +504 -0
- package/optional-skills/mlops/training/trl-fine-tuning/references/online-rl.md +82 -0
- package/optional-skills/mlops/training/trl-fine-tuning/references/reward-modeling.md +122 -0
- package/optional-skills/mlops/training/trl-fine-tuning/references/sft-training.md +168 -0
- package/optional-skills/mlops/training/trl-fine-tuning/templates/basic_grpo_training.py +228 -0
- package/optional-skills/mlops/training/unsloth/SKILL.md +84 -0
- package/optional-skills/mlops/training/unsloth/references/index.md +7 -0
- package/optional-skills/mlops/training/unsloth/references/llms-full.md +16799 -0
- package/optional-skills/mlops/training/unsloth/references/llms-txt.md +12044 -0
- package/optional-skills/mlops/training/unsloth/references/llms.md +82 -0
- package/optional-skills/mlops/whisper/SKILL.md +321 -0
- package/optional-skills/mlops/whisper/references/languages.md +189 -0
- package/optional-skills/productivity/canvas/SKILL.md +98 -0
- package/optional-skills/productivity/canvas/scripts/canvas_api.py +157 -0
- package/optional-skills/productivity/here-now/SKILL.md +217 -0
- package/optional-skills/productivity/here-now/scripts/drive.sh +406 -0
- package/optional-skills/productivity/here-now/scripts/publish.sh +445 -0
- package/optional-skills/productivity/memento-flashcards/SKILL.md +324 -0
- package/optional-skills/productivity/memento-flashcards/scripts/memento_cards.py +353 -0
- package/optional-skills/productivity/memento-flashcards/scripts/youtube_quiz.py +88 -0
- package/optional-skills/productivity/shop-app/SKILL.md +340 -0
- package/optional-skills/productivity/shopify/SKILL.md +373 -0
- package/optional-skills/productivity/siyuan/SKILL.md +298 -0
- package/optional-skills/productivity/telephony/SKILL.md +418 -0
- package/optional-skills/productivity/telephony/scripts/telephony.py +1343 -0
- package/optional-skills/research/bioinformatics/SKILL.md +235 -0
- package/optional-skills/research/darwinian-evolver/SKILL.md +199 -0
- package/optional-skills/research/darwinian-evolver/scripts/parrot_openrouter.py +218 -0
- package/optional-skills/research/darwinian-evolver/scripts/show_snapshot.py +69 -0
- package/optional-skills/research/darwinian-evolver/templates/custom_problem_template.py +240 -0
- package/optional-skills/research/domain-intel/SKILL.md +97 -0
- package/optional-skills/research/domain-intel/scripts/domain_intel.py +397 -0
- package/optional-skills/research/drug-discovery/SKILL.md +227 -0
- package/optional-skills/research/drug-discovery/references/ADMET_REFERENCE.md +66 -0
- package/optional-skills/research/drug-discovery/scripts/chembl_target.py +53 -0
- package/optional-skills/research/drug-discovery/scripts/ro5_screen.py +44 -0
- package/optional-skills/research/duckduckgo-search/SKILL.md +238 -0
- package/optional-skills/research/duckduckgo-search/scripts/duckduckgo.sh +28 -0
- package/optional-skills/research/gitnexus-explorer/SKILL.md +214 -0
- package/optional-skills/research/gitnexus-explorer/scripts/proxy.mjs +92 -0
- package/optional-skills/research/osint-investigation/SKILL.md +277 -0
- package/optional-skills/research/osint-investigation/references/sources/courtlistener.md +98 -0
- package/optional-skills/research/osint-investigation/references/sources/gdelt.md +104 -0
- package/optional-skills/research/osint-investigation/references/sources/icij-offshore.md +104 -0
- package/optional-skills/research/osint-investigation/references/sources/nyc-acris.md +90 -0
- package/optional-skills/research/osint-investigation/references/sources/ofac-sdn.md +92 -0
- package/optional-skills/research/osint-investigation/references/sources/opencorporates.md +103 -0
- package/optional-skills/research/osint-investigation/references/sources/sec-edgar.md +83 -0
- package/optional-skills/research/osint-investigation/references/sources/senate-ld.md +89 -0
- package/optional-skills/research/osint-investigation/references/sources/usaspending.md +97 -0
- package/optional-skills/research/osint-investigation/references/sources/wayback.md +93 -0
- package/optional-skills/research/osint-investigation/references/sources/wikipedia.md +107 -0
- package/optional-skills/research/osint-investigation/scripts/_http.py +82 -0
- package/optional-skills/research/osint-investigation/scripts/_normalize.py +67 -0
- package/optional-skills/research/osint-investigation/scripts/build_findings.py +221 -0
- package/optional-skills/research/osint-investigation/scripts/entity_resolution.py +228 -0
- package/optional-skills/research/osint-investigation/scripts/fetch_courtlistener.py +149 -0
- package/optional-skills/research/osint-investigation/scripts/fetch_gdelt.py +162 -0
- package/optional-skills/research/osint-investigation/scripts/fetch_icij_offshore.py +234 -0
- package/optional-skills/research/osint-investigation/scripts/fetch_nyc_acris.py +203 -0
- package/optional-skills/research/osint-investigation/scripts/fetch_ofac_sdn.py +175 -0
- package/optional-skills/research/osint-investigation/scripts/fetch_opencorporates.py +192 -0
- package/optional-skills/research/osint-investigation/scripts/fetch_sec_edgar.py +184 -0
- package/optional-skills/research/osint-investigation/scripts/fetch_senate_ld.py +146 -0
- package/optional-skills/research/osint-investigation/scripts/fetch_usaspending.py +170 -0
- package/optional-skills/research/osint-investigation/scripts/fetch_wayback.py +142 -0
- package/optional-skills/research/osint-investigation/scripts/fetch_wikipedia.py +267 -0
- package/optional-skills/research/osint-investigation/scripts/timing_analysis.py +253 -0
- package/optional-skills/research/osint-investigation/templates/source-template.md +59 -0
- package/optional-skills/research/parallel-cli/SKILL.md +391 -0
- package/optional-skills/research/qmd/SKILL.md +441 -0
- package/optional-skills/research/scrapling/SKILL.md +336 -0
- package/optional-skills/research/searxng-search/SKILL.md +212 -0
- package/optional-skills/research/searxng-search/scripts/searxng.sh +22 -0
- package/optional-skills/security/1password/SKILL.md +163 -0
- package/optional-skills/security/1password/references/cli-examples.md +31 -0
- package/optional-skills/security/1password/references/get-started.md +21 -0
- package/optional-skills/security/DESCRIPTION.md +3 -0
- package/optional-skills/security/oss-forensics/SKILL.md +423 -0
- package/optional-skills/security/oss-forensics/references/evidence-types.md +89 -0
- package/optional-skills/security/oss-forensics/references/github-archive-guide.md +184 -0
- package/optional-skills/security/oss-forensics/references/investigation-templates.md +131 -0
- package/optional-skills/security/oss-forensics/references/recovery-techniques.md +164 -0
- package/optional-skills/security/oss-forensics/scripts/evidence-store.py +313 -0
- package/optional-skills/security/oss-forensics/templates/forensic-report.md +151 -0
- package/optional-skills/security/oss-forensics/templates/malicious-package-report.md +43 -0
- package/optional-skills/security/sherlock/SKILL.md +193 -0
- package/optional-skills/software-development/rest-graphql-debug/SKILL.md +514 -0
- package/optional-skills/web-development/DESCRIPTION.md +5 -0
- package/optional-skills/web-development/page-agent/SKILL.md +190 -0
- package/package.json +78 -0
- package/plugins/__init__.py +1 -0
- package/plugins/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/context_engine/__init__.py +219 -0
- package/plugins/disk-cleanup/README.md +51 -0
- package/plugins/disk-cleanup/__init__.py +316 -0
- package/plugins/disk-cleanup/disk_cleanup.py +497 -0
- package/plugins/disk-cleanup/plugin.yaml +7 -0
- package/plugins/example-dashboard/dashboard/manifest.json +14 -0
- package/plugins/example-dashboard/dashboard/plugin_api.py +17 -0
- package/plugins/google_meet/README.md +131 -0
- package/plugins/google_meet/SKILL.md +148 -0
- package/plugins/google_meet/__init__.py +103 -0
- package/plugins/google_meet/audio_bridge.py +244 -0
- package/plugins/google_meet/cli.py +479 -0
- package/plugins/google_meet/meet_bot.py +852 -0
- package/plugins/google_meet/node/__init__.py +54 -0
- package/plugins/google_meet/node/cli.py +125 -0
- package/plugins/google_meet/node/client.py +107 -0
- package/plugins/google_meet/node/protocol.py +124 -0
- package/plugins/google_meet/node/registry.py +113 -0
- package/plugins/google_meet/node/server.py +201 -0
- package/plugins/google_meet/plugin.yaml +16 -0
- package/plugins/google_meet/process_manager.py +324 -0
- package/plugins/google_meet/realtime/__init__.py +10 -0
- package/plugins/google_meet/realtime/openai_client.py +332 -0
- package/plugins/google_meet/tools.py +348 -0
- package/plugins/hermes-achievements/LICENSE +21 -0
- package/plugins/hermes-achievements/README.md +150 -0
- package/plugins/hermes-achievements/dashboard/dist/index.js +732 -0
- package/plugins/hermes-achievements/dashboard/dist/style.css +146 -0
- package/plugins/hermes-achievements/dashboard/manifest.json +11 -0
- package/plugins/hermes-achievements/dashboard/plugin_api.py +1062 -0
- package/plugins/hermes-achievements/docs/achievements-performance-implementation-plan.md +157 -0
- package/plugins/hermes-achievements/docs/achievements-performance-implementation-spec.md +219 -0
- package/plugins/hermes-achievements/docs/achievements-performance-spec.md +174 -0
- package/plugins/hermes-achievements/docs/assets/achievements-dashboard-hd.png +0 -0
- package/plugins/hermes-achievements/docs/assets/achievements-tier-showcase-hd.png +0 -0
- package/plugins/hermes-achievements/tests/test_achievement_engine.py +156 -0
- package/plugins/image_gen/openai/__init__.py +303 -0
- package/plugins/image_gen/openai/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/image_gen/openai/plugin.yaml +7 -0
- package/plugins/image_gen/openai-codex/__init__.py +378 -0
- package/plugins/image_gen/openai-codex/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/image_gen/openai-codex/plugin.yaml +5 -0
- package/plugins/image_gen/xai/__init__.py +316 -0
- package/plugins/image_gen/xai/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/image_gen/xai/plugin.yaml +7 -0
- package/plugins/kanban/dashboard/dist/index.js +3143 -0
- package/plugins/kanban/dashboard/dist/style.css +1500 -0
- package/plugins/kanban/dashboard/manifest.json +14 -0
- package/plugins/kanban/dashboard/plugin_api.py +1612 -0
- package/plugins/kanban/systemd/hermes-kanban-dispatcher.service +32 -0
- package/plugins/memory/__init__.py +408 -0
- package/plugins/memory/byterover/README.md +41 -0
- package/plugins/memory/byterover/__init__.py +384 -0
- package/plugins/memory/byterover/plugin.yaml +9 -0
- package/plugins/memory/hindsight/README.md +138 -0
- package/plugins/memory/hindsight/__init__.py +1758 -0
- package/plugins/memory/hindsight/plugin.yaml +8 -0
- package/plugins/memory/holographic/README.md +36 -0
- package/plugins/memory/holographic/__init__.py +409 -0
- package/plugins/memory/holographic/holographic.py +203 -0
- package/plugins/memory/holographic/plugin.yaml +5 -0
- package/plugins/memory/holographic/retrieval.py +593 -0
- package/plugins/memory/holographic/store.py +579 -0
- package/plugins/memory/honcho/README.md +328 -0
- package/plugins/memory/honcho/__init__.py +1329 -0
- package/plugins/memory/honcho/cli.py +1452 -0
- package/plugins/memory/honcho/client.py +784 -0
- package/plugins/memory/honcho/plugin.yaml +7 -0
- package/plugins/memory/honcho/session.py +1255 -0
- package/plugins/memory/mem0/README.md +38 -0
- package/plugins/memory/mem0/__init__.py +374 -0
- package/plugins/memory/mem0/plugin.yaml +5 -0
- package/plugins/memory/openviking/README.md +40 -0
- package/plugins/memory/openviking/__init__.py +945 -0
- package/plugins/memory/openviking/plugin.yaml +9 -0
- package/plugins/memory/retaindb/README.md +40 -0
- package/plugins/memory/retaindb/__init__.py +767 -0
- package/plugins/memory/retaindb/plugin.yaml +7 -0
- package/plugins/memory/supermemory/README.md +99 -0
- package/plugins/memory/supermemory/__init__.py +792 -0
- package/plugins/memory/supermemory/plugin.yaml +5 -0
- package/plugins/model-providers/README.md +70 -0
- package/plugins/model-providers/ai-gateway/__init__.py +43 -0
- package/plugins/model-providers/ai-gateway/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/ai-gateway/plugin.yaml +5 -0
- package/plugins/model-providers/alibaba/__init__.py +13 -0
- package/plugins/model-providers/alibaba/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/alibaba/plugin.yaml +5 -0
- package/plugins/model-providers/alibaba-coding-plan/__init__.py +21 -0
- package/plugins/model-providers/alibaba-coding-plan/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/alibaba-coding-plan/plugin.yaml +5 -0
- package/plugins/model-providers/anthropic/__init__.py +52 -0
- package/plugins/model-providers/anthropic/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/anthropic/plugin.yaml +5 -0
- package/plugins/model-providers/arcee/__init__.py +13 -0
- package/plugins/model-providers/arcee/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/arcee/plugin.yaml +5 -0
- package/plugins/model-providers/azure-foundry/__init__.py +21 -0
- package/plugins/model-providers/azure-foundry/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/azure-foundry/plugin.yaml +5 -0
- package/plugins/model-providers/bedrock/__init__.py +29 -0
- package/plugins/model-providers/bedrock/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/bedrock/plugin.yaml +5 -0
- package/plugins/model-providers/copilot/__init__.py +58 -0
- package/plugins/model-providers/copilot/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/copilot/plugin.yaml +5 -0
- package/plugins/model-providers/copilot-acp/__init__.py +34 -0
- package/plugins/model-providers/copilot-acp/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/copilot-acp/plugin.yaml +5 -0
- package/plugins/model-providers/custom/__init__.py +68 -0
- package/plugins/model-providers/custom/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/custom/plugin.yaml +5 -0
- package/plugins/model-providers/deepseek/__init__.py +99 -0
- package/plugins/model-providers/deepseek/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/deepseek/plugin.yaml +5 -0
- package/plugins/model-providers/gemini/__init__.py +72 -0
- package/plugins/model-providers/gemini/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/gemini/plugin.yaml +5 -0
- package/plugins/model-providers/gmi/__init__.py +31 -0
- package/plugins/model-providers/gmi/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/gmi/plugin.yaml +5 -0
- package/plugins/model-providers/huggingface/__init__.py +20 -0
- package/plugins/model-providers/huggingface/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/huggingface/plugin.yaml +5 -0
- package/plugins/model-providers/kilocode/__init__.py +14 -0
- package/plugins/model-providers/kilocode/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/kilocode/plugin.yaml +5 -0
- package/plugins/model-providers/kimi-coding/__init__.py +71 -0
- package/plugins/model-providers/kimi-coding/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/kimi-coding/plugin.yaml +5 -0
- package/plugins/model-providers/minimax/__init__.py +45 -0
- package/plugins/model-providers/minimax/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/minimax/plugin.yaml +5 -0
- package/plugins/model-providers/nous/__init__.py +54 -0
- package/plugins/model-providers/nous/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/nous/plugin.yaml +5 -0
- package/plugins/model-providers/novita/__init__.py +27 -0
- package/plugins/model-providers/novita/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/novita/plugin.yaml +5 -0
- package/plugins/model-providers/nvidia/__init__.py +21 -0
- package/plugins/model-providers/nvidia/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/nvidia/plugin.yaml +5 -0
- package/plugins/model-providers/ollama-cloud/__init__.py +14 -0
- package/plugins/model-providers/ollama-cloud/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/ollama-cloud/plugin.yaml +5 -0
- package/plugins/model-providers/openai-codex/__init__.py +15 -0
- package/plugins/model-providers/openai-codex/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/openai-codex/plugin.yaml +5 -0
- package/plugins/model-providers/opencode-zen/__init__.py +30 -0
- package/plugins/model-providers/opencode-zen/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/opencode-zen/plugin.yaml +5 -0
- package/plugins/model-providers/openrouter/__init__.py +115 -0
- package/plugins/model-providers/openrouter/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/openrouter/plugin.yaml +5 -0
- package/plugins/model-providers/qwen-oauth/__init__.py +82 -0
- package/plugins/model-providers/qwen-oauth/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/qwen-oauth/plugin.yaml +5 -0
- package/plugins/model-providers/stepfun/__init__.py +14 -0
- package/plugins/model-providers/stepfun/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/stepfun/plugin.yaml +5 -0
- package/plugins/model-providers/xai/__init__.py +15 -0
- package/plugins/model-providers/xai/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/xai/plugin.yaml +5 -0
- package/plugins/model-providers/xiaomi/__init__.py +14 -0
- package/plugins/model-providers/xiaomi/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/xiaomi/plugin.yaml +5 -0
- package/plugins/model-providers/zai/__init__.py +21 -0
- package/plugins/model-providers/zai/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/model-providers/zai/plugin.yaml +5 -0
- package/plugins/observability/langfuse/README.md +53 -0
- package/plugins/observability/langfuse/__init__.py +1004 -0
- package/plugins/observability/langfuse/plugin.yaml +14 -0
- package/plugins/platforms/google_chat/__init__.py +3 -0
- package/plugins/platforms/google_chat/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/platforms/google_chat/__pycache__/adapter.cpython-312.pyc +0 -0
- package/plugins/platforms/google_chat/adapter.py +3343 -0
- package/plugins/platforms/google_chat/oauth.py +639 -0
- package/plugins/platforms/google_chat/plugin.yaml +39 -0
- package/plugins/platforms/irc/__init__.py +3 -0
- package/plugins/platforms/irc/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/platforms/irc/__pycache__/adapter.cpython-312.pyc +0 -0
- package/plugins/platforms/irc/adapter.py +969 -0
- package/plugins/platforms/irc/plugin.yaml +54 -0
- package/plugins/platforms/line/__init__.py +3 -0
- package/plugins/platforms/line/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/platforms/line/__pycache__/adapter.cpython-312.pyc +0 -0
- package/plugins/platforms/line/adapter.py +1639 -0
- package/plugins/platforms/line/plugin.yaml +65 -0
- package/plugins/platforms/simplex/__init__.py +3 -0
- package/plugins/platforms/simplex/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/platforms/simplex/__pycache__/adapter.cpython-312.pyc +0 -0
- package/plugins/platforms/simplex/adapter.py +746 -0
- package/plugins/platforms/simplex/plugin.yaml +37 -0
- package/plugins/platforms/teams/__init__.py +3 -0
- package/plugins/platforms/teams/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/platforms/teams/__pycache__/adapter.cpython-312.pyc +0 -0
- package/plugins/platforms/teams/adapter.py +1188 -0
- package/plugins/platforms/teams/plugin.yaml +48 -0
- package/plugins/spotify/__init__.py +66 -0
- package/plugins/spotify/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/spotify/__pycache__/client.cpython-312.pyc +0 -0
- package/plugins/spotify/__pycache__/tools.cpython-312.pyc +0 -0
- package/plugins/spotify/client.py +435 -0
- package/plugins/spotify/plugin.yaml +13 -0
- package/plugins/spotify/tools.py +454 -0
- package/plugins/teams_pipeline/__init__.py +23 -0
- package/plugins/teams_pipeline/cli.py +463 -0
- package/plugins/teams_pipeline/meetings.py +333 -0
- package/plugins/teams_pipeline/models.py +350 -0
- package/plugins/teams_pipeline/pipeline.py +692 -0
- package/plugins/teams_pipeline/plugin.yaml +9 -0
- package/plugins/teams_pipeline/runtime.py +135 -0
- package/plugins/teams_pipeline/store.py +194 -0
- package/plugins/teams_pipeline/subscriptions.py +249 -0
- package/plugins/video_gen/fal/__init__.py +523 -0
- package/plugins/video_gen/fal/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/video_gen/fal/plugin.yaml +7 -0
- package/plugins/video_gen/xai/__init__.py +441 -0
- package/plugins/video_gen/xai/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/video_gen/xai/plugin.yaml +7 -0
- package/plugins/web/__init__.py +7 -0
- package/plugins/web/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/web/brave_free/__init__.py +14 -0
- package/plugins/web/brave_free/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/web/brave_free/__pycache__/provider.cpython-312.pyc +0 -0
- package/plugins/web/brave_free/plugin.yaml +7 -0
- package/plugins/web/brave_free/provider.py +137 -0
- package/plugins/web/ddgs/__init__.py +15 -0
- package/plugins/web/ddgs/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/web/ddgs/__pycache__/provider.cpython-312.pyc +0 -0
- package/plugins/web/ddgs/plugin.yaml +7 -0
- package/plugins/web/ddgs/provider.py +104 -0
- package/plugins/web/exa/__init__.py +15 -0
- package/plugins/web/exa/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/web/exa/__pycache__/provider.cpython-312.pyc +0 -0
- package/plugins/web/exa/plugin.yaml +7 -0
- package/plugins/web/exa/provider.py +212 -0
- package/plugins/web/firecrawl/__init__.py +28 -0
- package/plugins/web/firecrawl/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/web/firecrawl/__pycache__/provider.cpython-312.pyc +0 -0
- package/plugins/web/firecrawl/plugin.yaml +7 -0
- package/plugins/web/firecrawl/provider.py +773 -0
- package/plugins/web/parallel/__init__.py +16 -0
- package/plugins/web/parallel/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/web/parallel/__pycache__/provider.cpython-312.pyc +0 -0
- package/plugins/web/parallel/plugin.yaml +7 -0
- package/plugins/web/parallel/provider.py +291 -0
- package/plugins/web/searxng/__init__.py +15 -0
- package/plugins/web/searxng/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/web/searxng/__pycache__/provider.cpython-312.pyc +0 -0
- package/plugins/web/searxng/plugin.yaml +7 -0
- package/plugins/web/searxng/provider.py +140 -0
- package/plugins/web/tavily/__init__.py +15 -0
- package/plugins/web/tavily/__pycache__/__init__.cpython-312.pyc +0 -0
- package/plugins/web/tavily/__pycache__/provider.cpython-312.pyc +0 -0
- package/plugins/web/tavily/plugin.yaml +7 -0
- package/plugins/web/tavily/provider.py +285 -0
- package/providers/README.md +78 -0
- package/providers/__init__.py +192 -0
- package/providers/__pycache__/__init__.cpython-312.pyc +0 -0
- package/providers/__pycache__/base.cpython-312.pyc +0 -0
- package/providers/base.py +184 -0
- package/pyproject.toml +255 -0
- package/run_agent.py +16409 -0
- package/scripts/benchmark_browser_eval.py +138 -0
- package/scripts/build_model_catalog.py +95 -0
- package/scripts/build_skills_index.py +325 -0
- package/scripts/check-windows-footguns.py +624 -0
- package/scripts/contributor_audit.py +473 -0
- package/scripts/discord-voice-doctor.py +396 -0
- package/scripts/hermes-gateway +416 -0
- package/scripts/install.cmd +28 -0
- package/scripts/install.ps1 +1611 -0
- package/scripts/install.sh +2007 -0
- package/scripts/install_psutil_android.py +117 -0
- package/scripts/keystroke_diagnostic.py +81 -0
- package/scripts/kill_modal.sh +34 -0
- package/scripts/lib/node-bootstrap.sh +238 -0
- package/scripts/lint_diff.py +207 -0
- package/scripts/postinstall.js +150 -0
- package/scripts/profile-tui.py +626 -0
- package/scripts/release.py +1680 -0
- package/scripts/run_tests.sh +129 -0
- package/scripts/sample_and_compress.py +409 -0
- package/scripts/setup_open_webui.sh +349 -0
- package/scripts/whatsapp-bridge/allowlist.js +88 -0
- package/scripts/whatsapp-bridge/allowlist.test.mjs +80 -0
- package/scripts/whatsapp-bridge/bridge.js +729 -0
- package/scripts/whatsapp-bridge/package-lock.json +2141 -0
- package/scripts/whatsapp-bridge/package.json +19 -0
- package/skills/apple/DESCRIPTION.md +2 -0
- package/skills/apple/apple-notes/SKILL.md +90 -0
- package/skills/apple/apple-reminders/SKILL.md +98 -0
- package/skills/apple/findmy/SKILL.md +131 -0
- package/skills/apple/imessage/SKILL.md +102 -0
- package/skills/apple/macos-computer-use/SKILL.md +201 -0
- package/skills/autonomous-ai-agents/DESCRIPTION.md +3 -0
- package/skills/autonomous-ai-agents/claude-code/SKILL.md +745 -0
- package/skills/autonomous-ai-agents/codex/SKILL.md +130 -0
- package/skills/autonomous-ai-agents/hermes-agent/SKILL.md +1014 -0
- package/skills/autonomous-ai-agents/opencode/SKILL.md +219 -0
- package/skills/creative/DESCRIPTION.md +3 -0
- package/skills/creative/architecture-diagram/SKILL.md +148 -0
- package/skills/creative/architecture-diagram/templates/template.html +319 -0
- package/skills/creative/ascii-art/SKILL.md +322 -0
- package/skills/creative/ascii-video/README.md +290 -0
- package/skills/creative/ascii-video/SKILL.md +241 -0
- package/skills/creative/ascii-video/references/architecture.md +802 -0
- package/skills/creative/ascii-video/references/composition.md +892 -0
- package/skills/creative/ascii-video/references/effects.md +1865 -0
- package/skills/creative/ascii-video/references/inputs.md +685 -0
- package/skills/creative/ascii-video/references/optimization.md +688 -0
- package/skills/creative/ascii-video/references/scenes.md +1011 -0
- package/skills/creative/ascii-video/references/shaders.md +1385 -0
- package/skills/creative/ascii-video/references/troubleshooting.md +367 -0
- package/skills/creative/baoyu-comic/PORT_NOTES.md +77 -0
- package/skills/creative/baoyu-comic/SKILL.md +247 -0
- package/skills/creative/baoyu-comic/references/analysis-framework.md +176 -0
- package/skills/creative/baoyu-comic/references/art-styles/chalk.md +101 -0
- package/skills/creative/baoyu-comic/references/art-styles/ink-brush.md +97 -0
- package/skills/creative/baoyu-comic/references/art-styles/ligne-claire.md +75 -0
- package/skills/creative/baoyu-comic/references/art-styles/manga.md +93 -0
- package/skills/creative/baoyu-comic/references/art-styles/minimalist.md +84 -0
- package/skills/creative/baoyu-comic/references/art-styles/realistic.md +89 -0
- package/skills/creative/baoyu-comic/references/auto-selection.md +71 -0
- package/skills/creative/baoyu-comic/references/base-prompt.md +98 -0
- package/skills/creative/baoyu-comic/references/character-template.md +180 -0
- package/skills/creative/baoyu-comic/references/layouts/cinematic.md +23 -0
- package/skills/creative/baoyu-comic/references/layouts/dense.md +23 -0
- package/skills/creative/baoyu-comic/references/layouts/four-panel.md +40 -0
- package/skills/creative/baoyu-comic/references/layouts/mixed.md +23 -0
- package/skills/creative/baoyu-comic/references/layouts/splash.md +23 -0
- package/skills/creative/baoyu-comic/references/layouts/standard.md +23 -0
- package/skills/creative/baoyu-comic/references/layouts/webtoon.md +30 -0
- package/skills/creative/baoyu-comic/references/ohmsha-guide.md +85 -0
- package/skills/creative/baoyu-comic/references/partial-workflows.md +106 -0
- package/skills/creative/baoyu-comic/references/presets/concept-story.md +121 -0
- package/skills/creative/baoyu-comic/references/presets/four-panel.md +107 -0
- package/skills/creative/baoyu-comic/references/presets/ohmsha.md +114 -0
- package/skills/creative/baoyu-comic/references/presets/shoujo.md +116 -0
- package/skills/creative/baoyu-comic/references/presets/wuxia.md +110 -0
- package/skills/creative/baoyu-comic/references/storyboard-template.md +143 -0
- package/skills/creative/baoyu-comic/references/tones/action.md +110 -0
- package/skills/creative/baoyu-comic/references/tones/dramatic.md +95 -0
- package/skills/creative/baoyu-comic/references/tones/energetic.md +105 -0
- package/skills/creative/baoyu-comic/references/tones/neutral.md +63 -0
- package/skills/creative/baoyu-comic/references/tones/romantic.md +100 -0
- package/skills/creative/baoyu-comic/references/tones/vintage.md +104 -0
- package/skills/creative/baoyu-comic/references/tones/warm.md +94 -0
- package/skills/creative/baoyu-comic/references/workflow.md +401 -0
- package/skills/creative/baoyu-infographic/PORT_NOTES.md +43 -0
- package/skills/creative/baoyu-infographic/SKILL.md +237 -0
- package/skills/creative/baoyu-infographic/references/analysis-framework.md +182 -0
- package/skills/creative/baoyu-infographic/references/base-prompt.md +43 -0
- package/skills/creative/baoyu-infographic/references/layouts/bento-grid.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/binary-comparison.md +48 -0
- package/skills/creative/baoyu-infographic/references/layouts/bridge.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/circular-flow.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/comic-strip.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/comparison-matrix.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/dashboard.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/dense-modules.md +72 -0
- package/skills/creative/baoyu-infographic/references/layouts/funnel.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/hierarchical-layers.md +48 -0
- package/skills/creative/baoyu-infographic/references/layouts/hub-spoke.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/iceberg.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/isometric-map.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/jigsaw.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/linear-progression.md +48 -0
- package/skills/creative/baoyu-infographic/references/layouts/periodic-table.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/story-mountain.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/structural-breakdown.md +48 -0
- package/skills/creative/baoyu-infographic/references/layouts/tree-branching.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/venn-diagram.md +41 -0
- package/skills/creative/baoyu-infographic/references/layouts/winding-roadmap.md +41 -0
- package/skills/creative/baoyu-infographic/references/structured-content-template.md +244 -0
- package/skills/creative/baoyu-infographic/references/styles/aged-academia.md +36 -0
- package/skills/creative/baoyu-infographic/references/styles/bold-graphic.md +36 -0
- package/skills/creative/baoyu-infographic/references/styles/chalkboard.md +61 -0
- package/skills/creative/baoyu-infographic/references/styles/claymation.md +29 -0
- package/skills/creative/baoyu-infographic/references/styles/corporate-memphis.md +29 -0
- package/skills/creative/baoyu-infographic/references/styles/craft-handmade.md +44 -0
- package/skills/creative/baoyu-infographic/references/styles/cyberpunk-neon.md +29 -0
- package/skills/creative/baoyu-infographic/references/styles/hand-drawn-edu.md +63 -0
- package/skills/creative/baoyu-infographic/references/styles/ikea-manual.md +29 -0
- package/skills/creative/baoyu-infographic/references/styles/kawaii.md +29 -0
- package/skills/creative/baoyu-infographic/references/styles/knolling.md +29 -0
- package/skills/creative/baoyu-infographic/references/styles/lego-brick.md +29 -0
- package/skills/creative/baoyu-infographic/references/styles/morandi-journal.md +60 -0
- package/skills/creative/baoyu-infographic/references/styles/origami.md +29 -0
- package/skills/creative/baoyu-infographic/references/styles/pixel-art.md +29 -0
- package/skills/creative/baoyu-infographic/references/styles/pop-laboratory.md +48 -0
- package/skills/creative/baoyu-infographic/references/styles/retro-pop-grid.md +47 -0
- package/skills/creative/baoyu-infographic/references/styles/storybook-watercolor.md +29 -0
- package/skills/creative/baoyu-infographic/references/styles/subway-map.md +29 -0
- package/skills/creative/baoyu-infographic/references/styles/technical-schematic.md +36 -0
- package/skills/creative/baoyu-infographic/references/styles/ui-wireframe.md +29 -0
- package/skills/creative/claude-design/SKILL.md +591 -0
- package/skills/creative/comfyui/SKILL.md +612 -0
- package/skills/creative/comfyui/references/official-cli.md +255 -0
- package/skills/creative/comfyui/references/rest-api.md +312 -0
- package/skills/creative/comfyui/references/template-integrity.md +243 -0
- package/skills/creative/comfyui/references/workflow-format.md +226 -0
- package/skills/creative/comfyui/scripts/_common.py +835 -0
- package/skills/creative/comfyui/scripts/auto_fix_deps.py +225 -0
- package/skills/creative/comfyui/scripts/check_deps.py +437 -0
- package/skills/creative/comfyui/scripts/comfyui_setup.sh +286 -0
- package/skills/creative/comfyui/scripts/extract_schema.py +315 -0
- package/skills/creative/comfyui/scripts/fetch_logs.py +158 -0
- package/skills/creative/comfyui/scripts/hardware_check.py +497 -0
- package/skills/creative/comfyui/scripts/health_check.py +223 -0
- package/skills/creative/comfyui/scripts/run_batch.py +243 -0
- package/skills/creative/comfyui/scripts/run_workflow.py +796 -0
- package/skills/creative/comfyui/scripts/ws_monitor.py +267 -0
- package/skills/creative/comfyui/tests/README.md +50 -0
- package/skills/creative/comfyui/tests/conftest.py +64 -0
- package/skills/creative/comfyui/tests/pytest.ini +5 -0
- package/skills/creative/comfyui/tests/test_check_deps.py +68 -0
- package/skills/creative/comfyui/tests/test_cloud_integration.py +95 -0
- package/skills/creative/comfyui/tests/test_common.py +447 -0
- package/skills/creative/comfyui/tests/test_extract_schema.py +185 -0
- package/skills/creative/comfyui/tests/test_run_workflow.py +213 -0
- package/skills/creative/comfyui/workflows/README.md +86 -0
- package/skills/creative/comfyui/workflows/animatediff_video.json +64 -0
- package/skills/creative/comfyui/workflows/flux_dev_txt2img.json +78 -0
- package/skills/creative/comfyui/workflows/sd15_txt2img.json +49 -0
- package/skills/creative/comfyui/workflows/sdxl_img2img.json +54 -0
- package/skills/creative/comfyui/workflows/sdxl_inpaint.json +59 -0
- package/skills/creative/comfyui/workflows/sdxl_txt2img.json +49 -0
- package/skills/creative/comfyui/workflows/upscale_4x.json +27 -0
- package/skills/creative/comfyui/workflows/wan_video_t2v.json +69 -0
- package/skills/creative/creative-ideation/SKILL.md +152 -0
- package/skills/creative/creative-ideation/references/full-prompt-library.md +110 -0
- package/skills/creative/design-md/SKILL.md +199 -0
- package/skills/creative/design-md/templates/starter.md +99 -0
- package/skills/creative/excalidraw/SKILL.md +199 -0
- package/skills/creative/excalidraw/references/colors.md +44 -0
- package/skills/creative/excalidraw/references/dark-mode.md +68 -0
- package/skills/creative/excalidraw/references/examples.md +141 -0
- package/skills/creative/excalidraw/scripts/upload.py +133 -0
- package/skills/creative/humanizer/LICENSE +21 -0
- package/skills/creative/humanizer/SKILL.md +578 -0
- package/skills/creative/manim-video/README.md +23 -0
- package/skills/creative/manim-video/SKILL.md +269 -0
- package/skills/creative/manim-video/references/animation-design-thinking.md +161 -0
- package/skills/creative/manim-video/references/animations.md +282 -0
- package/skills/creative/manim-video/references/camera-and-3d.md +135 -0
- package/skills/creative/manim-video/references/decorations.md +202 -0
- package/skills/creative/manim-video/references/equations.md +216 -0
- package/skills/creative/manim-video/references/graphs-and-data.md +163 -0
- package/skills/creative/manim-video/references/mobjects.md +333 -0
- package/skills/creative/manim-video/references/paper-explainer.md +255 -0
- package/skills/creative/manim-video/references/production-quality.md +190 -0
- package/skills/creative/manim-video/references/rendering.md +185 -0
- package/skills/creative/manim-video/references/scene-planning.md +118 -0
- package/skills/creative/manim-video/references/troubleshooting.md +135 -0
- package/skills/creative/manim-video/references/updaters-and-trackers.md +260 -0
- package/skills/creative/manim-video/references/visual-design.md +124 -0
- package/skills/creative/manim-video/scripts/setup.sh +14 -0
- package/skills/creative/p5js/README.md +64 -0
- package/skills/creative/p5js/SKILL.md +556 -0
- package/skills/creative/p5js/references/animation.md +439 -0
- package/skills/creative/p5js/references/color-systems.md +352 -0
- package/skills/creative/p5js/references/core-api.md +410 -0
- package/skills/creative/p5js/references/export-pipeline.md +566 -0
- package/skills/creative/p5js/references/interaction.md +398 -0
- package/skills/creative/p5js/references/shapes-and-geometry.md +300 -0
- package/skills/creative/p5js/references/troubleshooting.md +532 -0
- package/skills/creative/p5js/references/typography.md +302 -0
- package/skills/creative/p5js/references/visual-effects.md +895 -0
- package/skills/creative/p5js/references/webgl-and-3d.md +423 -0
- package/skills/creative/p5js/scripts/export-frames.js +179 -0
- package/skills/creative/p5js/scripts/render.sh +108 -0
- package/skills/creative/p5js/scripts/serve.sh +28 -0
- package/skills/creative/p5js/scripts/setup.sh +87 -0
- package/skills/creative/p5js/templates/viewer.html +395 -0
- package/skills/creative/pixel-art/ATTRIBUTION.md +54 -0
- package/skills/creative/pixel-art/SKILL.md +218 -0
- package/skills/creative/pixel-art/references/palettes.md +49 -0
- package/skills/creative/pixel-art/scripts/__init__.py +0 -0
- package/skills/creative/pixel-art/scripts/palettes.py +167 -0
- package/skills/creative/pixel-art/scripts/pixel_art.py +162 -0
- package/skills/creative/pixel-art/scripts/pixel_art_video.py +345 -0
- package/skills/creative/popular-web-designs/SKILL.md +214 -0
- package/skills/creative/popular-web-designs/templates/airbnb.md +259 -0
- package/skills/creative/popular-web-designs/templates/airtable.md +102 -0
- package/skills/creative/popular-web-designs/templates/apple.md +326 -0
- package/skills/creative/popular-web-designs/templates/bmw.md +193 -0
- package/skills/creative/popular-web-designs/templates/cal.md +272 -0
- package/skills/creative/popular-web-designs/templates/claude.md +325 -0
- package/skills/creative/popular-web-designs/templates/clay.md +317 -0
- package/skills/creative/popular-web-designs/templates/clickhouse.md +294 -0
- package/skills/creative/popular-web-designs/templates/cohere.md +279 -0
- package/skills/creative/popular-web-designs/templates/coinbase.md +142 -0
- package/skills/creative/popular-web-designs/templates/composio.md +320 -0
- package/skills/creative/popular-web-designs/templates/cursor.md +322 -0
- package/skills/creative/popular-web-designs/templates/elevenlabs.md +278 -0
- package/skills/creative/popular-web-designs/templates/expo.md +294 -0
- package/skills/creative/popular-web-designs/templates/figma.md +233 -0
- package/skills/creative/popular-web-designs/templates/framer.md +259 -0
- package/skills/creative/popular-web-designs/templates/hashicorp.md +291 -0
- package/skills/creative/popular-web-designs/templates/ibm.md +345 -0
- package/skills/creative/popular-web-designs/templates/intercom.md +159 -0
- package/skills/creative/popular-web-designs/templates/kraken.md +138 -0
- package/skills/creative/popular-web-designs/templates/linear.app.md +380 -0
- package/skills/creative/popular-web-designs/templates/lovable.md +311 -0
- package/skills/creative/popular-web-designs/templates/minimax.md +270 -0
- package/skills/creative/popular-web-designs/templates/mintlify.md +339 -0
- package/skills/creative/popular-web-designs/templates/miro.md +121 -0
- package/skills/creative/popular-web-designs/templates/mistral.ai.md +274 -0
- package/skills/creative/popular-web-designs/templates/mongodb.md +279 -0
- package/skills/creative/popular-web-designs/templates/notion.md +322 -0
- package/skills/creative/popular-web-designs/templates/nvidia.md +306 -0
- package/skills/creative/popular-web-designs/templates/ollama.md +280 -0
- package/skills/creative/popular-web-designs/templates/opencode.ai.md +294 -0
- package/skills/creative/popular-web-designs/templates/pinterest.md +243 -0
- package/skills/creative/popular-web-designs/templates/posthog.md +269 -0
- package/skills/creative/popular-web-designs/templates/raycast.md +281 -0
- package/skills/creative/popular-web-designs/templates/replicate.md +274 -0
- package/skills/creative/popular-web-designs/templates/resend.md +316 -0
- package/skills/creative/popular-web-designs/templates/revolut.md +198 -0
- package/skills/creative/popular-web-designs/templates/runwayml.md +257 -0
- package/skills/creative/popular-web-designs/templates/sanity.md +370 -0
- package/skills/creative/popular-web-designs/templates/sentry.md +275 -0
- package/skills/creative/popular-web-designs/templates/spacex.md +207 -0
- package/skills/creative/popular-web-designs/templates/spotify.md +259 -0
- package/skills/creative/popular-web-designs/templates/stripe.md +335 -0
- package/skills/creative/popular-web-designs/templates/supabase.md +268 -0
- package/skills/creative/popular-web-designs/templates/superhuman.md +265 -0
- package/skills/creative/popular-web-designs/templates/together.ai.md +276 -0
- package/skills/creative/popular-web-designs/templates/uber.md +308 -0
- package/skills/creative/popular-web-designs/templates/vercel.md +323 -0
- package/skills/creative/popular-web-designs/templates/voltagent.md +336 -0
- package/skills/creative/popular-web-designs/templates/warp.md +266 -0
- package/skills/creative/popular-web-designs/templates/webflow.md +105 -0
- package/skills/creative/popular-web-designs/templates/wise.md +186 -0
- package/skills/creative/popular-web-designs/templates/x.ai.md +270 -0
- package/skills/creative/popular-web-designs/templates/zapier.md +341 -0
- package/skills/creative/pretext/SKILL.md +220 -0
- package/skills/creative/pretext/references/patterns.md +258 -0
- package/skills/creative/pretext/templates/donut-orbit.html +1468 -0
- package/skills/creative/pretext/templates/hello-orb-flow.html +95 -0
- package/skills/creative/sketch/SKILL.md +218 -0
- package/skills/creative/songwriting-and-ai-music/SKILL.md +287 -0
- package/skills/creative/touchdesigner-mcp/SKILL.md +356 -0
- package/skills/creative/touchdesigner-mcp/references/3d-scene.md +275 -0
- package/skills/creative/touchdesigner-mcp/references/animation.md +221 -0
- package/skills/creative/touchdesigner-mcp/references/audio-reactive.md +175 -0
- package/skills/creative/touchdesigner-mcp/references/dat-scripting.md +352 -0
- package/skills/creative/touchdesigner-mcp/references/external-data.md +322 -0
- package/skills/creative/touchdesigner-mcp/references/geometry-comp.md +121 -0
- package/skills/creative/touchdesigner-mcp/references/glsl.md +151 -0
- package/skills/creative/touchdesigner-mcp/references/layout-compositor.md +131 -0
- package/skills/creative/touchdesigner-mcp/references/mcp-tools.md +382 -0
- package/skills/creative/touchdesigner-mcp/references/midi-osc.md +211 -0
- package/skills/creative/touchdesigner-mcp/references/network-patterns.md +966 -0
- package/skills/creative/touchdesigner-mcp/references/operator-tips.md +106 -0
- package/skills/creative/touchdesigner-mcp/references/operators.md +239 -0
- package/skills/creative/touchdesigner-mcp/references/panel-ui.md +281 -0
- package/skills/creative/touchdesigner-mcp/references/particles.md +245 -0
- package/skills/creative/touchdesigner-mcp/references/pitfalls.md +704 -0
- package/skills/creative/touchdesigner-mcp/references/postfx.md +183 -0
- package/skills/creative/touchdesigner-mcp/references/projection-mapping.md +211 -0
- package/skills/creative/touchdesigner-mcp/references/python-api.md +463 -0
- package/skills/creative/touchdesigner-mcp/references/replicator.md +198 -0
- package/skills/creative/touchdesigner-mcp/references/troubleshooting.md +244 -0
- package/skills/creative/touchdesigner-mcp/scripts/setup.sh +115 -0
- package/skills/data-science/DESCRIPTION.md +3 -0
- package/skills/data-science/jupyter-live-kernel/SKILL.md +167 -0
- package/skills/devops/kanban-orchestrator/SKILL.md +189 -0
- package/skills/devops/kanban-worker/SKILL.md +184 -0
- package/skills/devops/webhook-subscriptions/SKILL.md +204 -0
- package/skills/diagramming/DESCRIPTION.md +3 -0
- package/skills/dogfood/SKILL.md +162 -0
- package/skills/dogfood/references/issue-taxonomy.md +109 -0
- package/skills/dogfood/templates/dogfood-report-template.md +86 -0
- package/skills/domain/DESCRIPTION.md +24 -0
- package/skills/email/DESCRIPTION.md +3 -0
- package/skills/email/himalaya/SKILL.md +299 -0
- package/skills/email/himalaya/references/configuration.md +227 -0
- package/skills/email/himalaya/references/message-composition.md +199 -0
- package/skills/gaming/DESCRIPTION.md +3 -0
- package/skills/gaming/minecraft-modpack-server/SKILL.md +187 -0
- package/skills/gaming/pokemon-player/SKILL.md +216 -0
- package/skills/gifs/DESCRIPTION.md +3 -0
- package/skills/github/DESCRIPTION.md +3 -0
- package/skills/github/codebase-inspection/SKILL.md +116 -0
- package/skills/github/github-auth/SKILL.md +247 -0
- package/skills/github/github-auth/scripts/gh-env.sh +66 -0
- package/skills/github/github-code-review/SKILL.md +481 -0
- package/skills/github/github-code-review/references/review-output-template.md +74 -0
- package/skills/github/github-issues/SKILL.md +370 -0
- package/skills/github/github-issues/templates/bug-report.md +35 -0
- package/skills/github/github-issues/templates/feature-request.md +31 -0
- package/skills/github/github-pr-workflow/SKILL.md +367 -0
- package/skills/github/github-pr-workflow/references/ci-troubleshooting.md +183 -0
- package/skills/github/github-pr-workflow/references/conventional-commits.md +71 -0
- package/skills/github/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
- package/skills/github/github-pr-workflow/templates/pr-body-feature.md +33 -0
- package/skills/github/github-repo-management/SKILL.md +516 -0
- package/skills/github/github-repo-management/references/github-api-cheatsheet.md +161 -0
- package/skills/index-cache/anthropics_skills_skills_.json +1 -0
- package/skills/index-cache/claude_marketplace_anthropics_skills.json +1 -0
- package/skills/index-cache/lobehub_index.json +1 -0
- package/skills/index-cache/openai_skills_skills_.json +1 -0
- package/skills/inference-sh/DESCRIPTION.md +19 -0
- package/skills/mcp/DESCRIPTION.md +3 -0
- package/skills/mcp/native-mcp/SKILL.md +357 -0
- package/skills/media/DESCRIPTION.md +3 -0
- package/skills/media/gif-search/SKILL.md +91 -0
- package/skills/media/heartmula/SKILL.md +171 -0
- package/skills/media/songsee/SKILL.md +83 -0
- package/skills/media/spotify/SKILL.md +135 -0
- package/skills/media/youtube-content/SKILL.md +73 -0
- package/skills/media/youtube-content/references/output-formats.md +56 -0
- package/skills/media/youtube-content/scripts/fetch_transcript.py +124 -0
- package/skills/mlops/DESCRIPTION.md +3 -0
- package/skills/mlops/evaluation/DESCRIPTION.md +3 -0
- package/skills/mlops/evaluation/lm-evaluation-harness/SKILL.md +498 -0
- package/skills/mlops/evaluation/lm-evaluation-harness/references/api-evaluation.md +490 -0
- package/skills/mlops/evaluation/lm-evaluation-harness/references/benchmark-guide.md +488 -0
- package/skills/mlops/evaluation/lm-evaluation-harness/references/custom-tasks.md +602 -0
- package/skills/mlops/evaluation/lm-evaluation-harness/references/distributed-eval.md +519 -0
- package/skills/mlops/evaluation/weights-and-biases/SKILL.md +594 -0
- package/skills/mlops/evaluation/weights-and-biases/references/artifacts.md +584 -0
- package/skills/mlops/evaluation/weights-and-biases/references/integrations.md +700 -0
- package/skills/mlops/evaluation/weights-and-biases/references/sweeps.md +847 -0
- package/skills/mlops/huggingface-hub/SKILL.md +81 -0
- package/skills/mlops/inference/DESCRIPTION.md +3 -0
- package/skills/mlops/inference/llama-cpp/SKILL.md +249 -0
- package/skills/mlops/inference/llama-cpp/references/advanced-usage.md +504 -0
- package/skills/mlops/inference/llama-cpp/references/hub-discovery.md +168 -0
- package/skills/mlops/inference/llama-cpp/references/optimization.md +89 -0
- package/skills/mlops/inference/llama-cpp/references/quantization.md +243 -0
- package/skills/mlops/inference/llama-cpp/references/server.md +150 -0
- package/skills/mlops/inference/llama-cpp/references/troubleshooting.md +442 -0
- package/skills/mlops/inference/obliteratus/SKILL.md +342 -0
- package/skills/mlops/inference/obliteratus/references/analysis-modules.md +166 -0
- package/skills/mlops/inference/obliteratus/references/methods-guide.md +141 -0
- package/skills/mlops/inference/obliteratus/templates/abliteration-config.yaml +33 -0
- package/skills/mlops/inference/obliteratus/templates/analysis-study.yaml +40 -0
- package/skills/mlops/inference/obliteratus/templates/batch-abliteration.yaml +41 -0
- package/skills/mlops/inference/vllm/SKILL.md +372 -0
- package/skills/mlops/inference/vllm/references/optimization.md +226 -0
- package/skills/mlops/inference/vllm/references/quantization.md +284 -0
- package/skills/mlops/inference/vllm/references/server-deployment.md +255 -0
- package/skills/mlops/inference/vllm/references/troubleshooting.md +447 -0
- package/skills/mlops/models/DESCRIPTION.md +3 -0
- package/skills/mlops/models/audiocraft/SKILL.md +568 -0
- package/skills/mlops/models/audiocraft/references/advanced-usage.md +666 -0
- package/skills/mlops/models/audiocraft/references/troubleshooting.md +504 -0
- package/skills/mlops/models/segment-anything/SKILL.md +506 -0
- package/skills/mlops/models/segment-anything/references/advanced-usage.md +589 -0
- package/skills/mlops/models/segment-anything/references/troubleshooting.md +484 -0
- package/skills/mlops/research/DESCRIPTION.md +3 -0
- package/skills/mlops/research/dspy/SKILL.md +594 -0
- package/skills/mlops/research/dspy/references/examples.md +663 -0
- package/skills/mlops/research/dspy/references/modules.md +475 -0
- package/skills/mlops/research/dspy/references/optimizers.md +566 -0
- package/skills/mlops/training/DESCRIPTION.md +3 -0
- package/skills/mlops/vector-databases/DESCRIPTION.md +3 -0
- package/skills/note-taking/DESCRIPTION.md +3 -0
- package/skills/note-taking/obsidian/SKILL.md +61 -0
- package/skills/productivity/DESCRIPTION.md +3 -0
- package/skills/productivity/airtable/SKILL.md +229 -0
- package/skills/productivity/google-workspace/SKILL.md +335 -0
- package/skills/productivity/google-workspace/references/gmail-search-syntax.md +63 -0
- package/skills/productivity/google-workspace/scripts/_hermes_home.py +43 -0
- package/skills/productivity/google-workspace/scripts/google_api.py +1221 -0
- package/skills/productivity/google-workspace/scripts/gws_bridge.py +108 -0
- package/skills/productivity/google-workspace/scripts/setup.py +454 -0
- package/skills/productivity/linear/SKILL.md +380 -0
- package/skills/productivity/linear/scripts/linear_api.py +445 -0
- package/skills/productivity/maps/SKILL.md +195 -0
- package/skills/productivity/maps/scripts/maps_client.py +1298 -0
- package/skills/productivity/nano-pdf/SKILL.md +52 -0
- package/skills/productivity/notion/SKILL.md +448 -0
- package/skills/productivity/notion/references/block-types.md +112 -0
- package/skills/productivity/ocr-and-documents/DESCRIPTION.md +3 -0
- package/skills/productivity/ocr-and-documents/SKILL.md +172 -0
- package/skills/productivity/ocr-and-documents/scripts/extract_marker.py +87 -0
- package/skills/productivity/ocr-and-documents/scripts/extract_pymupdf.py +98 -0
- package/skills/productivity/powerpoint/LICENSE.txt +30 -0
- package/skills/productivity/powerpoint/SKILL.md +237 -0
- package/skills/productivity/powerpoint/editing.md +205 -0
- package/skills/productivity/powerpoint/pptxgenjs.md +420 -0
- package/skills/productivity/powerpoint/scripts/__init__.py +0 -0
- package/skills/productivity/powerpoint/scripts/add_slide.py +195 -0
- package/skills/productivity/powerpoint/scripts/clean.py +286 -0
- package/skills/productivity/powerpoint/scripts/office/helpers/__init__.py +0 -0
- package/skills/productivity/powerpoint/scripts/office/helpers/merge_runs.py +199 -0
- package/skills/productivity/powerpoint/scripts/office/helpers/simplify_redlines.py +197 -0
- package/skills/productivity/powerpoint/scripts/office/pack.py +159 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-contentTypes.xsd +42 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-coreProperties.xsd +50 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-digSig.xsd +49 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-relationships.xsd +33 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/mce/mc.xsd +75 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/productivity/teams-meeting-pipeline/SKILL.md +116 -0
- package/skills/red-teaming/godmode/SKILL.md +404 -0
- package/skills/red-teaming/godmode/references/jailbreak-templates.md +128 -0
- package/skills/red-teaming/godmode/references/refusal-detection.md +142 -0
- package/skills/red-teaming/godmode/scripts/auto_jailbreak.py +769 -0
- package/skills/red-teaming/godmode/scripts/godmode_race.py +530 -0
- package/skills/red-teaming/godmode/scripts/load_godmode.py +45 -0
- package/skills/red-teaming/godmode/scripts/parseltongue.py +550 -0
- package/skills/red-teaming/godmode/templates/prefill-subtle.json +10 -0
- package/skills/red-teaming/godmode/templates/prefill.json +18 -0
- package/skills/research/DESCRIPTION.md +3 -0
- package/skills/research/arxiv/SKILL.md +282 -0
- package/skills/research/arxiv/scripts/search_arxiv.py +114 -0
- package/skills/research/blogwatcher/SKILL.md +137 -0
- package/skills/research/llm-wiki/SKILL.md +507 -0
- package/skills/research/polymarket/SKILL.md +77 -0
- package/skills/research/polymarket/references/api-endpoints.md +220 -0
- package/skills/research/polymarket/scripts/polymarket.py +284 -0
- package/skills/research/research-paper-writing/SKILL.md +2377 -0
- package/skills/research/research-paper-writing/references/autoreason-methodology.md +394 -0
- package/skills/research/research-paper-writing/references/checklists.md +434 -0
- package/skills/research/research-paper-writing/references/citation-workflow.md +564 -0
- package/skills/research/research-paper-writing/references/experiment-patterns.md +728 -0
- package/skills/research/research-paper-writing/references/human-evaluation.md +476 -0
- package/skills/research/research-paper-writing/references/paper-types.md +481 -0
- package/skills/research/research-paper-writing/references/reviewer-guidelines.md +433 -0
- package/skills/research/research-paper-writing/references/sources.md +191 -0
- package/skills/research/research-paper-writing/references/writing-guide.md +474 -0
- package/skills/research/research-paper-writing/templates/README.md +251 -0
- package/skills/research/research-paper-writing/templates/aaai2026/README.md +534 -0
- package/skills/research/research-paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
- package/skills/research/research-paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
- package/skills/research/research-paper-writing/templates/aaai2026/aaai2026.bib +111 -0
- package/skills/research/research-paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
- package/skills/research/research-paper-writing/templates/aaai2026/aaai2026.sty +315 -0
- package/skills/research/research-paper-writing/templates/acl/README.md +50 -0
- package/skills/research/research-paper-writing/templates/acl/acl.sty +312 -0
- package/skills/research/research-paper-writing/templates/acl/acl_latex.tex +377 -0
- package/skills/research/research-paper-writing/templates/acl/acl_lualatex.tex +101 -0
- package/skills/research/research-paper-writing/templates/acl/acl_natbib.bst +1940 -0
- package/skills/research/research-paper-writing/templates/acl/anthology.bib.txt +26 -0
- package/skills/research/research-paper-writing/templates/acl/custom.bib +70 -0
- package/skills/research/research-paper-writing/templates/acl/formatting.md +326 -0
- package/skills/research/research-paper-writing/templates/colm2025/README.md +3 -0
- package/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
- package/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
- package/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
- package/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
- package/skills/research/research-paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
- package/skills/research/research-paper-writing/templates/colm2025/fancyhdr.sty +485 -0
- package/skills/research/research-paper-writing/templates/colm2025/math_commands.tex +508 -0
- package/skills/research/research-paper-writing/templates/colm2025/natbib.sty +1246 -0
- package/skills/research/research-paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
- package/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
- package/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
- package/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
- package/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
- package/skills/research/research-paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
- package/skills/research/research-paper-writing/templates/iclr2026/math_commands.tex +508 -0
- package/skills/research/research-paper-writing/templates/iclr2026/natbib.sty +1246 -0
- package/skills/research/research-paper-writing/templates/icml2026/algorithm.sty +79 -0
- package/skills/research/research-paper-writing/templates/icml2026/algorithmic.sty +201 -0
- package/skills/research/research-paper-writing/templates/icml2026/example_paper.bib +75 -0
- package/skills/research/research-paper-writing/templates/icml2026/example_paper.pdf +0 -0
- package/skills/research/research-paper-writing/templates/icml2026/example_paper.tex +662 -0
- package/skills/research/research-paper-writing/templates/icml2026/fancyhdr.sty +864 -0
- package/skills/research/research-paper-writing/templates/icml2026/icml2026.bst +1443 -0
- package/skills/research/research-paper-writing/templates/icml2026/icml2026.sty +767 -0
- package/skills/research/research-paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
- package/skills/research/research-paper-writing/templates/neurips2025/Makefile +36 -0
- package/skills/research/research-paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
- package/skills/research/research-paper-writing/templates/neurips2025/main.tex +38 -0
- package/skills/research/research-paper-writing/templates/neurips2025/neurips.sty +382 -0
- package/skills/smart-home/DESCRIPTION.md +3 -0
- package/skills/smart-home/openhue/SKILL.md +109 -0
- package/skills/social-media/DESCRIPTION.md +3 -0
- package/skills/social-media/xurl/SKILL.md +414 -0
- package/skills/software-development/debugging-hermes-tui-commands/SKILL.md +152 -0
- package/skills/software-development/hermes-agent-skill-authoring/SKILL.md +165 -0
- package/skills/software-development/node-inspect-debugger/SKILL.md +319 -0
- package/skills/software-development/plan/SKILL.md +58 -0
- package/skills/software-development/python-debugpy/SKILL.md +375 -0
- package/skills/software-development/requesting-code-review/SKILL.md +280 -0
- package/skills/software-development/spike/SKILL.md +197 -0
- package/skills/software-development/subagent-driven-development/SKILL.md +352 -0
- package/skills/software-development/subagent-driven-development/references/context-budget-discipline.md +53 -0
- package/skills/software-development/subagent-driven-development/references/gates-taxonomy.md +93 -0
- package/skills/software-development/systematic-debugging/SKILL.md +367 -0
- package/skills/software-development/test-driven-development/SKILL.md +343 -0
- package/skills/software-development/writing-plans/SKILL.md +297 -0
- package/skills/yuanbao/SKILL.md +108 -0
- package/tools/__init__.py +25 -0
- package/tools/__pycache__/__init__.cpython-312.pyc +0 -0
- package/tools/__pycache__/approval.cpython-312.pyc +0 -0
- package/tools/__pycache__/binary_extensions.cpython-312.pyc +0 -0
- package/tools/__pycache__/browser_camofox.cpython-312.pyc +0 -0
- package/tools/__pycache__/browser_camofox_state.cpython-312.pyc +0 -0
- package/tools/__pycache__/browser_cdp_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/browser_dialog_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/browser_supervisor.cpython-312.pyc +0 -0
- package/tools/__pycache__/browser_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/budget_config.cpython-312.pyc +0 -0
- package/tools/__pycache__/checkpoint_manager.cpython-312.pyc +0 -0
- package/tools/__pycache__/clarify_gateway.cpython-312.pyc +0 -0
- package/tools/__pycache__/clarify_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/code_execution_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/computer_use_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/cronjob_tools.cpython-312.pyc +0 -0
- package/tools/__pycache__/debug_helpers.cpython-312.pyc +0 -0
- package/tools/__pycache__/delegate_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/discord_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/feishu_doc_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/feishu_drive_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/file_operations.cpython-312.pyc +0 -0
- package/tools/__pycache__/file_state.cpython-312.pyc +0 -0
- package/tools/__pycache__/file_tools.cpython-312.pyc +0 -0
- package/tools/__pycache__/homeassistant_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/image_generation_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/interrupt.cpython-312.pyc +0 -0
- package/tools/__pycache__/kanban_tools.cpython-312.pyc +0 -0
- package/tools/__pycache__/lazy_deps.cpython-312.pyc +0 -0
- package/tools/__pycache__/managed_tool_gateway.cpython-312.pyc +0 -0
- package/tools/__pycache__/mcp_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/memory_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/mixture_of_agents_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/openrouter_client.cpython-312.pyc +0 -0
- package/tools/__pycache__/process_registry.cpython-312.pyc +0 -0
- package/tools/__pycache__/registry.cpython-312.pyc +0 -0
- package/tools/__pycache__/schema_sanitizer.cpython-312.pyc +0 -0
- package/tools/__pycache__/send_message_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/session_search_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/skill_manager_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/skill_provenance.cpython-312.pyc +0 -0
- package/tools/__pycache__/skill_usage.cpython-312.pyc +0 -0
- package/tools/__pycache__/skills_guard.cpython-312.pyc +0 -0
- package/tools/__pycache__/skills_sync.cpython-312.pyc +0 -0
- package/tools/__pycache__/skills_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/slash_confirm.cpython-312.pyc +0 -0
- package/tools/__pycache__/terminal_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/tirith_security.cpython-312.pyc +0 -0
- package/tools/__pycache__/todo_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/tool_backend_helpers.cpython-312.pyc +0 -0
- package/tools/__pycache__/tool_result_storage.cpython-312.pyc +0 -0
- package/tools/__pycache__/tts_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/url_safety.cpython-312.pyc +0 -0
- package/tools/__pycache__/video_generation_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/vision_tools.cpython-312.pyc +0 -0
- package/tools/__pycache__/voice_mode.cpython-312.pyc +0 -0
- package/tools/__pycache__/web_tools.cpython-312.pyc +0 -0
- package/tools/__pycache__/website_policy.cpython-312.pyc +0 -0
- package/tools/__pycache__/x_search_tool.cpython-312.pyc +0 -0
- package/tools/__pycache__/xai_http.cpython-312.pyc +0 -0
- package/tools/__pycache__/yuanbao_tools.cpython-312.pyc +0 -0
- package/tools/ansi_strip.py +44 -0
- package/tools/approval.py +1392 -0
- package/tools/binary_extensions.py +42 -0
- package/tools/browser_camofox.py +700 -0
- package/tools/browser_camofox_state.py +48 -0
- package/tools/browser_cdp_tool.py +569 -0
- package/tools/browser_dialog_tool.py +148 -0
- package/tools/browser_providers/__init__.py +10 -0
- package/tools/browser_providers/__pycache__/__init__.cpython-312.pyc +0 -0
- package/tools/browser_providers/__pycache__/base.cpython-312.pyc +0 -0
- package/tools/browser_providers/__pycache__/browser_use.cpython-312.pyc +0 -0
- package/tools/browser_providers/__pycache__/browserbase.cpython-312.pyc +0 -0
- package/tools/browser_providers/__pycache__/firecrawl.cpython-312.pyc +0 -0
- package/tools/browser_providers/base.py +59 -0
- package/tools/browser_providers/browser_use.py +225 -0
- package/tools/browser_providers/browserbase.py +222 -0
- package/tools/browser_providers/firecrawl.py +112 -0
- package/tools/browser_supervisor.py +1457 -0
- package/tools/browser_tool.py +3676 -0
- package/tools/budget_config.py +51 -0
- package/tools/checkpoint_manager.py +1639 -0
- package/tools/clarify_gateway.py +278 -0
- package/tools/clarify_tool.py +141 -0
- package/tools/code_execution_tool.py +1782 -0
- package/tools/computer_use/__init__.py +43 -0
- package/tools/computer_use/__pycache__/__init__.cpython-312.pyc +0 -0
- package/tools/computer_use/__pycache__/backend.cpython-312.pyc +0 -0
- package/tools/computer_use/__pycache__/schema.cpython-312.pyc +0 -0
- package/tools/computer_use/__pycache__/tool.cpython-312.pyc +0 -0
- package/tools/computer_use/backend.py +150 -0
- package/tools/computer_use/cua_backend.py +682 -0
- package/tools/computer_use/schema.py +191 -0
- package/tools/computer_use/tool.py +521 -0
- package/tools/computer_use_tool.py +39 -0
- package/tools/credential_files.py +437 -0
- package/tools/cronjob_tools.py +719 -0
- package/tools/debug_helpers.py +106 -0
- package/tools/delegate_tool.py +2797 -0
- package/tools/discord_tool.py +959 -0
- package/tools/env_passthrough.py +145 -0
- package/tools/environments/__init__.py +14 -0
- package/tools/environments/__pycache__/__init__.cpython-312.pyc +0 -0
- package/tools/environments/__pycache__/base.cpython-312.pyc +0 -0
- package/tools/environments/__pycache__/docker.cpython-312.pyc +0 -0
- package/tools/environments/__pycache__/file_sync.cpython-312.pyc +0 -0
- package/tools/environments/__pycache__/local.cpython-312.pyc +0 -0
- package/tools/environments/__pycache__/managed_modal.cpython-312.pyc +0 -0
- package/tools/environments/__pycache__/modal.cpython-312.pyc +0 -0
- package/tools/environments/__pycache__/modal_utils.cpython-312.pyc +0 -0
- package/tools/environments/__pycache__/singularity.cpython-312.pyc +0 -0
- package/tools/environments/__pycache__/ssh.cpython-312.pyc +0 -0
- package/tools/environments/base.py +844 -0
- package/tools/environments/daytona.py +270 -0
- package/tools/environments/docker.py +656 -0
- package/tools/environments/file_sync.py +400 -0
- package/tools/environments/local.py +658 -0
- package/tools/environments/managed_modal.py +282 -0
- package/tools/environments/modal.py +479 -0
- package/tools/environments/modal_utils.py +199 -0
- package/tools/environments/singularity.py +263 -0
- package/tools/environments/ssh.py +295 -0
- package/tools/environments/vercel_sandbox.py +655 -0
- package/tools/feishu_doc_tool.py +138 -0
- package/tools/feishu_drive_tool.py +431 -0
- package/tools/file_operations.py +1825 -0
- package/tools/file_state.py +332 -0
- package/tools/file_tools.py +1172 -0
- package/tools/fuzzy_match.py +703 -0
- package/tools/homeassistant_tool.py +513 -0
- package/tools/image_generation_tool.py +1098 -0
- package/tools/interrupt.py +98 -0
- package/tools/kanban_tools.py +1139 -0
- package/tools/lazy_deps.py +608 -0
- package/tools/managed_tool_gateway.py +168 -0
- package/tools/mcp_oauth.py +633 -0
- package/tools/mcp_oauth_manager.py +607 -0
- package/tools/mcp_tool.py +3483 -0
- package/tools/memory_tool.py +584 -0
- package/tools/microsoft_graph_auth.py +245 -0
- package/tools/microsoft_graph_client.py +408 -0
- package/tools/mixture_of_agents_tool.py +542 -0
- package/tools/neutts_samples/jo.txt +1 -0
- package/tools/neutts_samples/jo.wav +0 -0
- package/tools/neutts_synth.py +104 -0
- package/tools/openrouter_client.py +33 -0
- package/tools/osv_check.py +155 -0
- package/tools/patch_parser.py +592 -0
- package/tools/path_security.py +43 -0
- package/tools/process_registry.py +1534 -0
- package/tools/registry.py +589 -0
- package/tools/schema_sanitizer.py +370 -0
- package/tools/send_message_tool.py +1900 -0
- package/tools/session_search_tool.py +613 -0
- package/tools/skill_manager_tool.py +932 -0
- package/tools/skill_provenance.py +78 -0
- package/tools/skill_usage.py +610 -0
- package/tools/skills_guard.py +932 -0
- package/tools/skills_hub.py +3263 -0
- package/tools/skills_sync.py +432 -0
- package/tools/skills_tool.py +1569 -0
- package/tools/slash_confirm.py +167 -0
- package/tools/terminal_tool.py +2376 -0
- package/tools/tirith_security.py +775 -0
- package/tools/todo_tool.py +277 -0
- package/tools/tool_backend_helpers.py +144 -0
- package/tools/tool_output_limits.py +92 -0
- package/tools/tool_result_storage.py +232 -0
- package/tools/transcription_tools.py +936 -0
- package/tools/tts_tool.py +2285 -0
- package/tools/url_safety.py +330 -0
- package/tools/video_generation_tool.py +561 -0
- package/tools/vision_tools.py +1422 -0
- package/tools/voice_mode.py +1019 -0
- package/tools/web_tools.py +1551 -0
- package/tools/website_policy.py +283 -0
- package/tools/x_search_tool.py +424 -0
- package/tools/xai_http.py +83 -0
- package/tools/yuanbao_tools.py +736 -0
- package/toolset_distributions.py +364 -0
- package/toolsets.py +866 -0
- package/trajectory_compressor.py +1509 -0
- package/tui_gateway/__init__.py +0 -0
- package/tui_gateway/entry.py +251 -0
- package/tui_gateway/event_publisher.py +126 -0
- package/tui_gateway/render.py +49 -0
- package/tui_gateway/server.py +6623 -0
- package/tui_gateway/slash_worker.py +76 -0
- package/tui_gateway/transport.py +219 -0
- package/tui_gateway/ws.py +178 -0
- package/utils.py +361 -0
|
@@ -0,0 +1,1551 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Standalone Web Tools Module
|
|
4
|
+
|
|
5
|
+
This module provides generic web tools that work with multiple backend providers.
|
|
6
|
+
Backend is selected during ``hermes tools`` setup (web.backend in config.yaml).
|
|
7
|
+
When available, Hermes can route Firecrawl calls through a Nous-hosted tool-gateway
|
|
8
|
+
for Nous Subscribers only.
|
|
9
|
+
|
|
10
|
+
Available tools:
|
|
11
|
+
- web_search_tool: Search the web for information
|
|
12
|
+
- web_extract_tool: Extract content from specific web pages
|
|
13
|
+
- web_crawl_tool: Crawl websites with specific instructions
|
|
14
|
+
|
|
15
|
+
Backend compatibility:
|
|
16
|
+
- Exa: https://exa.ai (search, extract)
|
|
17
|
+
- Firecrawl: https://docs.firecrawl.dev/introduction (search, extract, crawl; direct or derived firecrawl-gateway.<domain> for Nous Subscribers)
|
|
18
|
+
- Parallel: https://docs.parallel.ai (search, extract)
|
|
19
|
+
- Tavily: https://tavily.com (search, extract, crawl)
|
|
20
|
+
|
|
21
|
+
LLM Processing:
|
|
22
|
+
- Uses OpenRouter API with Gemini 3 Flash Preview for intelligent content extraction
|
|
23
|
+
- Extracts key excerpts and creates markdown summaries to reduce token usage
|
|
24
|
+
|
|
25
|
+
Debug Mode:
|
|
26
|
+
- Set WEB_TOOLS_DEBUG=true to enable detailed logging
|
|
27
|
+
- Creates web_tools_debug_UUID.json in ./logs directory
|
|
28
|
+
- Captures all tool calls, results, and compression metrics
|
|
29
|
+
|
|
30
|
+
Usage:
|
|
31
|
+
from web_tools import web_search_tool, web_extract_tool, web_crawl_tool
|
|
32
|
+
|
|
33
|
+
# Search the web
|
|
34
|
+
results = web_search_tool("Python machine learning libraries", limit=3)
|
|
35
|
+
|
|
36
|
+
# Extract content from URLs
|
|
37
|
+
content = web_extract_tool(["https://example.com"], format="markdown")
|
|
38
|
+
|
|
39
|
+
# Crawl a website
|
|
40
|
+
crawl_data = web_crawl_tool("example.com", "Find contact information")
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
import json
|
|
44
|
+
import logging
|
|
45
|
+
import os
|
|
46
|
+
import re
|
|
47
|
+
import asyncio
|
|
48
|
+
from typing import List, Dict, Any, Optional, TYPE_CHECKING
|
|
49
|
+
import httpx # noqa: F401 — kept at module top so tests can patch tools.web_tools.httpx
|
|
50
|
+
# After the web-provider plugin migration (PR #25182), the Firecrawl SDK
|
|
51
|
+
# proxy, client construction, and response-shape normalizers all live in
|
|
52
|
+
# plugins.web.firecrawl.provider. We re-export the names that external
|
|
53
|
+
# code, integration tests, and unit-test patches reach for so the public
|
|
54
|
+
# surface stays stable.
|
|
55
|
+
if TYPE_CHECKING:
|
|
56
|
+
from firecrawl import Firecrawl # noqa: F401 — type hints only
|
|
57
|
+
from plugins.web.firecrawl.provider import (
|
|
58
|
+
Firecrawl,
|
|
59
|
+
_FirecrawlProxy,
|
|
60
|
+
_FIRECRAWL_CLS_CACHE,
|
|
61
|
+
_extract_scrape_payload,
|
|
62
|
+
_extract_web_search_results,
|
|
63
|
+
_firecrawl_backend_help_suffix,
|
|
64
|
+
_get_direct_firecrawl_config,
|
|
65
|
+
_get_firecrawl_client,
|
|
66
|
+
_get_firecrawl_gateway_url,
|
|
67
|
+
_has_direct_firecrawl_config,
|
|
68
|
+
_is_tool_gateway_ready,
|
|
69
|
+
_load_firecrawl_cls,
|
|
70
|
+
_normalize_result_list,
|
|
71
|
+
_raise_web_backend_configuration_error,
|
|
72
|
+
_to_plain_object,
|
|
73
|
+
check_firecrawl_api_key,
|
|
74
|
+
)
|
|
75
|
+
# Tavily helpers re-exported for backward-compat with existing unit tests
|
|
76
|
+
# (tests/tools/test_web_tools_tavily.py imports these names directly).
|
|
77
|
+
from plugins.web.tavily.provider import ( # noqa: F401 — backward-compat names
|
|
78
|
+
_normalize_tavily_documents,
|
|
79
|
+
_normalize_tavily_search_results,
|
|
80
|
+
_tavily_request,
|
|
81
|
+
)
|
|
82
|
+
# Parallel + Exa clients re-exported for backward-compat with existing
|
|
83
|
+
# unit tests (tests/tools/test_web_tools_config.py imports _get_parallel_client
|
|
84
|
+
# / _get_async_parallel_client / _get_exa_client directly).
|
|
85
|
+
from plugins.web.parallel.provider import ( # noqa: F401 — backward-compat names
|
|
86
|
+
_get_async_parallel_client,
|
|
87
|
+
_get_parallel_client,
|
|
88
|
+
)
|
|
89
|
+
from plugins.web.exa.provider import _get_exa_client # noqa: F401
|
|
90
|
+
|
|
91
|
+
# Module-level cache slots for the per-vendor clients. The plugins read/write
|
|
92
|
+
# these via tools.web_tools so unit tests that reset
|
|
93
|
+
# ``tools.web_tools._<vendor>_client = None`` between cases keep working.
|
|
94
|
+
_firecrawl_client: Optional[Any] = None
|
|
95
|
+
_firecrawl_client_config: Optional[Any] = None
|
|
96
|
+
_parallel_client: Optional[Any] = None
|
|
97
|
+
_async_parallel_client: Optional[Any] = None
|
|
98
|
+
_exa_client: Optional[Any] = None
|
|
99
|
+
|
|
100
|
+
from agent.auxiliary_client import (
|
|
101
|
+
async_call_llm,
|
|
102
|
+
extract_content_or_reasoning,
|
|
103
|
+
get_async_text_auxiliary_client,
|
|
104
|
+
)
|
|
105
|
+
from tools.debug_helpers import DebugSession
|
|
106
|
+
# Imported solely so unit tests can monkeypatch these names on
|
|
107
|
+
# tools.web_tools (the firecrawl plugin reads them via its own import chain).
|
|
108
|
+
from tools.managed_tool_gateway import ( # noqa: F401 — backward-compat names for tests
|
|
109
|
+
build_vendor_gateway_url,
|
|
110
|
+
read_nous_access_token as _read_nous_access_token,
|
|
111
|
+
resolve_managed_tool_gateway,
|
|
112
|
+
)
|
|
113
|
+
from tools.tool_backend_helpers import managed_nous_tools_enabled, prefers_gateway # noqa: F401
|
|
114
|
+
from tools.url_safety import is_safe_url
|
|
115
|
+
from tools.website_policy import check_website_access
|
|
116
|
+
import sys
|
|
117
|
+
|
|
118
|
+
logger = logging.getLogger(__name__)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
# ─── Backend Selection ────────────────────────────────────────────────────────
|
|
122
|
+
|
|
123
|
+
def _has_env(name: str) -> bool:
|
|
124
|
+
val = os.getenv(name)
|
|
125
|
+
return bool(val and val.strip())
|
|
126
|
+
|
|
127
|
+
def _load_web_config() -> dict:
|
|
128
|
+
"""Load the ``web:`` section from ~/.hermes/config.yaml."""
|
|
129
|
+
try:
|
|
130
|
+
from hermes_cli.config import load_config
|
|
131
|
+
return load_config().get("web", {})
|
|
132
|
+
except (ImportError, Exception):
|
|
133
|
+
return {}
|
|
134
|
+
|
|
135
|
+
def _get_backend() -> str:
|
|
136
|
+
"""Determine which web backend to use (shared fallback).
|
|
137
|
+
|
|
138
|
+
Reads ``web.backend`` from config.yaml (set by ``hermes tools``).
|
|
139
|
+
Falls back to whichever API key is present for users who configured
|
|
140
|
+
keys manually without running setup.
|
|
141
|
+
"""
|
|
142
|
+
configured = (_load_web_config().get("backend") or "").lower().strip()
|
|
143
|
+
if configured in {"parallel", "firecrawl", "tavily", "exa", "searxng", "brave-free", "ddgs"}:
|
|
144
|
+
return configured
|
|
145
|
+
|
|
146
|
+
# Fallback for manual / legacy config — pick the highest-priority
|
|
147
|
+
# available backend. Firecrawl also counts as available when the managed
|
|
148
|
+
# tool gateway is configured for Nous subscribers.
|
|
149
|
+
# Free-tier backends (searxng / brave-free / ddgs) trail the paid ones so
|
|
150
|
+
# existing paid setups are unaffected.
|
|
151
|
+
backend_candidates = (
|
|
152
|
+
("firecrawl", _has_env("FIRECRAWL_API_KEY") or _has_env("FIRECRAWL_API_URL") or _is_tool_gateway_ready()),
|
|
153
|
+
("parallel", _has_env("PARALLEL_API_KEY")),
|
|
154
|
+
("tavily", _has_env("TAVILY_API_KEY")),
|
|
155
|
+
("exa", _has_env("EXA_API_KEY")),
|
|
156
|
+
("searxng", _has_env("SEARXNG_URL")),
|
|
157
|
+
("brave-free", _has_env("BRAVE_SEARCH_API_KEY")),
|
|
158
|
+
("ddgs", _ddgs_package_importable()),
|
|
159
|
+
)
|
|
160
|
+
for backend, available in backend_candidates:
|
|
161
|
+
if available:
|
|
162
|
+
return backend
|
|
163
|
+
|
|
164
|
+
return "firecrawl" # default (backward compat)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def _get_search_backend() -> str:
|
|
168
|
+
"""Determine which backend to use for web_search specifically.
|
|
169
|
+
|
|
170
|
+
Selection priority:
|
|
171
|
+
1. ``web.search_backend`` (per-capability override)
|
|
172
|
+
2. ``web.backend`` (shared fallback — existing behavior)
|
|
173
|
+
3. Auto-detect from env vars
|
|
174
|
+
|
|
175
|
+
This enables using different providers for search vs extract
|
|
176
|
+
(e.g. SearXNG for search + Firecrawl for extract).
|
|
177
|
+
"""
|
|
178
|
+
return _get_capability_backend("search")
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
def _get_extract_backend() -> str:
|
|
182
|
+
"""Determine which backend to use for web_extract specifically.
|
|
183
|
+
|
|
184
|
+
Selection priority:
|
|
185
|
+
1. ``web.extract_backend`` (per-capability override)
|
|
186
|
+
2. ``web.backend`` (shared fallback — existing behavior)
|
|
187
|
+
3. Auto-detect from env vars
|
|
188
|
+
"""
|
|
189
|
+
return _get_capability_backend("extract")
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def _get_capability_backend(capability: str) -> str:
|
|
193
|
+
"""Shared helper for per-capability backend selection.
|
|
194
|
+
|
|
195
|
+
Reads ``web.{capability}_backend`` from config; if set and available,
|
|
196
|
+
uses it. Otherwise falls through to the shared ``_get_backend()``.
|
|
197
|
+
"""
|
|
198
|
+
cfg = _load_web_config()
|
|
199
|
+
specific = (cfg.get(f"{capability}_backend") or "").lower().strip()
|
|
200
|
+
if specific and _is_backend_available(specific):
|
|
201
|
+
return specific
|
|
202
|
+
return _get_backend()
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def _is_backend_available(backend: str) -> bool:
|
|
206
|
+
"""Return True when the selected backend is currently usable."""
|
|
207
|
+
if backend == "exa":
|
|
208
|
+
return _has_env("EXA_API_KEY")
|
|
209
|
+
if backend == "parallel":
|
|
210
|
+
return _has_env("PARALLEL_API_KEY")
|
|
211
|
+
if backend == "firecrawl":
|
|
212
|
+
return check_firecrawl_api_key()
|
|
213
|
+
if backend == "tavily":
|
|
214
|
+
return _has_env("TAVILY_API_KEY")
|
|
215
|
+
if backend == "searxng":
|
|
216
|
+
return _has_env("SEARXNG_URL")
|
|
217
|
+
if backend == "brave-free":
|
|
218
|
+
return _has_env("BRAVE_SEARCH_API_KEY")
|
|
219
|
+
if backend == "ddgs":
|
|
220
|
+
return _ddgs_package_importable()
|
|
221
|
+
return False
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
def _ddgs_package_importable() -> bool:
|
|
225
|
+
"""Return True when the ``ddgs`` Python package can be imported.
|
|
226
|
+
|
|
227
|
+
ddgs is the only backend whose availability is driven by a package
|
|
228
|
+
presence rather than an env var / config entry. Wrapped in a helper
|
|
229
|
+
so auto-detect and ``_is_backend_available`` share the same check
|
|
230
|
+
(and tests can monkeypatch a single symbol).
|
|
231
|
+
"""
|
|
232
|
+
try:
|
|
233
|
+
import ddgs # noqa: F401
|
|
234
|
+
return True
|
|
235
|
+
except ImportError:
|
|
236
|
+
return False
|
|
237
|
+
|
|
238
|
+
# ─── Firecrawl Client ────────────────────────────────────────────────────────
|
|
239
|
+
|
|
240
|
+
# ─── Firecrawl Client ────────────────────────────────────────────────────────
|
|
241
|
+
# After PR #25182, the firecrawl client, lazy SDK proxy, dual-auth config
|
|
242
|
+
# resolution, response normalizers, and check_firecrawl_api_key() all live
|
|
243
|
+
# in plugins.web.firecrawl.provider and are re-exported at the top of this
|
|
244
|
+
# module so external callers (integration tests, tool-registry gating) and
|
|
245
|
+
# unit tests that patch tools.web_tools.<name> continue to work.
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def _web_requires_env() -> list[str]:
|
|
249
|
+
"""Return tool metadata env vars for the currently enabled web backends.
|
|
250
|
+
|
|
251
|
+
The gateway env vars are always reported — they're metadata strings
|
|
252
|
+
used by the tool registry to light up the tool when the variable is
|
|
253
|
+
set. Gating them on ``managed_nous_tools_enabled()`` only saved
|
|
254
|
+
string noise in the metadata list, but cost a synchronous HTTP
|
|
255
|
+
refresh against the Nous portal on every CLI startup (invoked at
|
|
256
|
+
tool-registration time). The behavioral contract is: if the env var
|
|
257
|
+
is set, the tool sees it; if not, it doesn't. Not-logged-in users
|
|
258
|
+
simply don't have the vars set, so the extra entries are harmless.
|
|
259
|
+
"""
|
|
260
|
+
return [
|
|
261
|
+
"EXA_API_KEY",
|
|
262
|
+
"PARALLEL_API_KEY",
|
|
263
|
+
"TAVILY_API_KEY",
|
|
264
|
+
"FIRECRAWL_API_KEY",
|
|
265
|
+
"FIRECRAWL_API_URL",
|
|
266
|
+
"FIRECRAWL_GATEWAY_URL",
|
|
267
|
+
"TOOL_GATEWAY_DOMAIN",
|
|
268
|
+
"TOOL_GATEWAY_SCHEME",
|
|
269
|
+
"TOOL_GATEWAY_USER_TOKEN",
|
|
270
|
+
]
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
# ─── Parallel / Tavily / Firecrawl helpers — moved into plugins ──────────────
|
|
274
|
+
# After PR #25182, the per-vendor client construction, request helpers, and
|
|
275
|
+
# response normalizers all live in plugins.web.<vendor>.provider:
|
|
276
|
+
# - parallel: plugins/web/parallel/provider.py
|
|
277
|
+
# - tavily: plugins/web/tavily/provider.py
|
|
278
|
+
# - firecrawl: plugins/web/firecrawl/provider.py
|
|
279
|
+
# The names from the firecrawl plugin (Firecrawl proxy, _get_firecrawl_client,
|
|
280
|
+
# _to_plain_object, _normalize_result_list, _extract_web_search_results,
|
|
281
|
+
# _extract_scrape_payload, _is_tool_gateway_ready, etc.) are re-exported at
|
|
282
|
+
# the top of this module for backward-compat with integration tests and
|
|
283
|
+
# unit-test patches.
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
DEFAULT_MIN_LENGTH_FOR_SUMMARIZATION = 5000
|
|
287
|
+
|
|
288
|
+
def _is_nous_auxiliary_client(client: Any) -> bool:
|
|
289
|
+
"""Return True when the resolved auxiliary backend is Nous Portal."""
|
|
290
|
+
from urllib.parse import urlparse
|
|
291
|
+
|
|
292
|
+
base_url = str(getattr(client, "base_url", "") or "")
|
|
293
|
+
host = (urlparse(base_url).hostname or "").lower()
|
|
294
|
+
return host == "nousresearch.com" or host.endswith(".nousresearch.com")
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def _resolve_web_extract_auxiliary(model: Optional[str] = None) -> tuple[Optional[Any], Optional[str], Dict[str, Any]]:
|
|
298
|
+
"""Resolve the current web-extract auxiliary client, model, and extra body."""
|
|
299
|
+
client, default_model = get_async_text_auxiliary_client("web_extract")
|
|
300
|
+
configured_model = os.getenv("AUXILIARY_WEB_EXTRACT_MODEL", "").strip()
|
|
301
|
+
effective_model = model or configured_model or default_model
|
|
302
|
+
|
|
303
|
+
extra_body: Dict[str, Any] = {}
|
|
304
|
+
if client is not None and _is_nous_auxiliary_client(client):
|
|
305
|
+
from agent.auxiliary_client import get_auxiliary_extra_body
|
|
306
|
+
from agent.portal_tags import nous_portal_tags
|
|
307
|
+
extra_body = get_auxiliary_extra_body() or {"tags": nous_portal_tags()}
|
|
308
|
+
|
|
309
|
+
return client, effective_model, extra_body
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
def _get_default_summarizer_model() -> Optional[str]:
|
|
313
|
+
"""Return the current default model for web extraction summarization."""
|
|
314
|
+
_, model, _ = _resolve_web_extract_auxiliary()
|
|
315
|
+
return model
|
|
316
|
+
|
|
317
|
+
_debug = DebugSession("web_tools", env_var="WEB_TOOLS_DEBUG")
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
async def process_content_with_llm(
|
|
321
|
+
content: str,
|
|
322
|
+
url: str = "",
|
|
323
|
+
title: str = "",
|
|
324
|
+
model: Optional[str] = None,
|
|
325
|
+
min_length: int = DEFAULT_MIN_LENGTH_FOR_SUMMARIZATION
|
|
326
|
+
) -> Optional[str]:
|
|
327
|
+
"""
|
|
328
|
+
Process web content using LLM to create intelligent summaries with key excerpts.
|
|
329
|
+
|
|
330
|
+
This function uses Gemini 3 Flash Preview (or specified model) via OpenRouter API
|
|
331
|
+
to intelligently extract key information and create markdown summaries,
|
|
332
|
+
significantly reducing token usage while preserving all important information.
|
|
333
|
+
|
|
334
|
+
For very large content (>500k chars), uses chunked processing with synthesis.
|
|
335
|
+
For extremely large content (>2M chars), refuses to process entirely.
|
|
336
|
+
|
|
337
|
+
Args:
|
|
338
|
+
content (str): The raw content to process
|
|
339
|
+
url (str): The source URL (for context, optional)
|
|
340
|
+
title (str): The page title (for context, optional)
|
|
341
|
+
model (str): The model to use for processing (default: google/gemini-3-flash-preview)
|
|
342
|
+
min_length (int): Minimum content length to trigger processing (default: 5000)
|
|
343
|
+
|
|
344
|
+
Returns:
|
|
345
|
+
Optional[str]: Processed markdown content, or None if content too short or processing fails
|
|
346
|
+
"""
|
|
347
|
+
# Size thresholds
|
|
348
|
+
MAX_CONTENT_SIZE = 2_000_000 # 2M chars - refuse entirely above this
|
|
349
|
+
CHUNK_THRESHOLD = 500_000 # 500k chars - use chunked processing above this
|
|
350
|
+
CHUNK_SIZE = 100_000 # 100k chars per chunk
|
|
351
|
+
MAX_OUTPUT_SIZE = 5000 # Hard cap on final output size
|
|
352
|
+
|
|
353
|
+
try:
|
|
354
|
+
content_len = len(content)
|
|
355
|
+
|
|
356
|
+
# Refuse if content is absurdly large
|
|
357
|
+
if content_len > MAX_CONTENT_SIZE:
|
|
358
|
+
size_mb = content_len / 1_000_000
|
|
359
|
+
logger.warning("Content too large (%.1fMB > 2MB limit). Refusing to process.", size_mb)
|
|
360
|
+
return f"[Content too large to process: {size_mb:.1f}MB. Try using web_crawl with specific extraction instructions, or search for a more focused source.]"
|
|
361
|
+
|
|
362
|
+
# Skip processing if content is too short
|
|
363
|
+
if content_len < min_length:
|
|
364
|
+
logger.debug("Content too short (%d < %d chars), skipping LLM processing", content_len, min_length)
|
|
365
|
+
return None
|
|
366
|
+
|
|
367
|
+
# Create context information
|
|
368
|
+
context_info = []
|
|
369
|
+
if title:
|
|
370
|
+
context_info.append(f"Title: {title}")
|
|
371
|
+
if url:
|
|
372
|
+
context_info.append(f"Source: {url}")
|
|
373
|
+
context_str = "\n".join(context_info) + "\n\n" if context_info else ""
|
|
374
|
+
|
|
375
|
+
# Check if we need chunked processing
|
|
376
|
+
if content_len > CHUNK_THRESHOLD:
|
|
377
|
+
logger.info("Content large (%d chars). Using chunked processing...", content_len)
|
|
378
|
+
return await _process_large_content_chunked(
|
|
379
|
+
content, context_str, model, CHUNK_SIZE, MAX_OUTPUT_SIZE
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
# Standard single-pass processing for normal content
|
|
383
|
+
logger.info("Processing content with LLM (%d characters)", content_len)
|
|
384
|
+
|
|
385
|
+
processed_content = await _call_summarizer_llm(content, context_str, model)
|
|
386
|
+
|
|
387
|
+
if processed_content:
|
|
388
|
+
# Enforce output cap
|
|
389
|
+
if len(processed_content) > MAX_OUTPUT_SIZE:
|
|
390
|
+
processed_content = processed_content[:MAX_OUTPUT_SIZE] + "\n\n[... summary truncated for context management ...]"
|
|
391
|
+
|
|
392
|
+
# Log compression metrics
|
|
393
|
+
processed_length = len(processed_content)
|
|
394
|
+
compression_ratio = processed_length / content_len if content_len > 0 else 1.0
|
|
395
|
+
logger.info("Content processed: %d -> %d chars (%.1f%%)", content_len, processed_length, compression_ratio * 100)
|
|
396
|
+
|
|
397
|
+
return processed_content
|
|
398
|
+
|
|
399
|
+
except Exception as e:
|
|
400
|
+
logger.warning(
|
|
401
|
+
"web_extract LLM summarization failed (%s). "
|
|
402
|
+
"Tip: increase auxiliary.web_extract.timeout in config.yaml "
|
|
403
|
+
"or switch to a faster auxiliary model.",
|
|
404
|
+
str(e)[:120],
|
|
405
|
+
)
|
|
406
|
+
# Fall back to truncated raw content instead of returning a useless
|
|
407
|
+
# error message. The first ~5000 chars are almost always more useful
|
|
408
|
+
# to the model than "[Failed to process content: ...]".
|
|
409
|
+
truncated = content[:MAX_OUTPUT_SIZE]
|
|
410
|
+
if len(content) > MAX_OUTPUT_SIZE:
|
|
411
|
+
truncated += (
|
|
412
|
+
f"\n\n[Content truncated — showing first {MAX_OUTPUT_SIZE:,} of "
|
|
413
|
+
f"{len(content):,} chars. LLM summarization timed out. "
|
|
414
|
+
f"To fix: increase auxiliary.web_extract.timeout in config.yaml, "
|
|
415
|
+
f"or use a faster auxiliary model. Use browser_navigate for the full page.]"
|
|
416
|
+
)
|
|
417
|
+
return truncated
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
async def _call_summarizer_llm(
|
|
421
|
+
content: str,
|
|
422
|
+
context_str: str,
|
|
423
|
+
model: Optional[str],
|
|
424
|
+
max_tokens: int = 20000,
|
|
425
|
+
is_chunk: bool = False,
|
|
426
|
+
chunk_info: str = ""
|
|
427
|
+
) -> Optional[str]:
|
|
428
|
+
"""
|
|
429
|
+
Make a single LLM call to summarize content.
|
|
430
|
+
|
|
431
|
+
Args:
|
|
432
|
+
content: The content to summarize
|
|
433
|
+
context_str: Context information (title, URL)
|
|
434
|
+
model: Model to use
|
|
435
|
+
max_tokens: Maximum output tokens
|
|
436
|
+
is_chunk: Whether this is a chunk of a larger document
|
|
437
|
+
chunk_info: Information about chunk position (e.g., "Chunk 2/5")
|
|
438
|
+
|
|
439
|
+
Returns:
|
|
440
|
+
Summarized content or None on failure
|
|
441
|
+
"""
|
|
442
|
+
if is_chunk:
|
|
443
|
+
# Chunk-specific prompt - aware that this is partial content
|
|
444
|
+
system_prompt = """You are an expert content analyst processing a SECTION of a larger document. Your job is to extract and summarize the key information from THIS SECTION ONLY.
|
|
445
|
+
|
|
446
|
+
Important guidelines for chunk processing:
|
|
447
|
+
1. Do NOT write introductions or conclusions - this is a partial document
|
|
448
|
+
2. Focus on extracting ALL key facts, figures, data points, and insights from this section
|
|
449
|
+
3. Preserve important quotes, code snippets, and specific details verbatim
|
|
450
|
+
4. Use bullet points and structured formatting for easy synthesis later
|
|
451
|
+
5. Note any references to other sections (e.g., "as mentioned earlier", "see below") without trying to resolve them
|
|
452
|
+
|
|
453
|
+
Your output will be combined with summaries of other sections, so focus on thorough extraction rather than narrative flow."""
|
|
454
|
+
|
|
455
|
+
user_prompt = f"""Extract key information from this SECTION of a larger document:
|
|
456
|
+
|
|
457
|
+
{context_str}{chunk_info}
|
|
458
|
+
|
|
459
|
+
SECTION CONTENT:
|
|
460
|
+
{content}
|
|
461
|
+
|
|
462
|
+
Extract all important information from this section in a structured format. Focus on facts, data, insights, and key details. Do not add introductions or conclusions."""
|
|
463
|
+
|
|
464
|
+
else:
|
|
465
|
+
# Standard full-document prompt
|
|
466
|
+
system_prompt = """You are an expert content analyst. Your job is to process web content and create a comprehensive yet concise summary that preserves all important information while dramatically reducing bulk.
|
|
467
|
+
|
|
468
|
+
Create a well-structured markdown summary that includes:
|
|
469
|
+
1. Key excerpts (quotes, code snippets, important facts) in their original format
|
|
470
|
+
2. Comprehensive summary of all other important information
|
|
471
|
+
3. Proper markdown formatting with headers, bullets, and emphasis
|
|
472
|
+
|
|
473
|
+
Your goal is to preserve ALL important information while reducing length. Never lose key facts, figures, insights, or actionable information. Make it scannable and well-organized."""
|
|
474
|
+
|
|
475
|
+
user_prompt = f"""Please process this web content and create a comprehensive markdown summary:
|
|
476
|
+
|
|
477
|
+
{context_str}CONTENT TO PROCESS:
|
|
478
|
+
{content}
|
|
479
|
+
|
|
480
|
+
Create a markdown summary that captures all key information in a well-organized, scannable format. Include important quotes and code snippets in their original formatting. Focus on actionable information, specific details, and unique insights."""
|
|
481
|
+
|
|
482
|
+
# Call the LLM with retry logic — keep retries low since summarization
|
|
483
|
+
# is a nice-to-have; the caller falls back to truncated content on failure.
|
|
484
|
+
max_retries = 2
|
|
485
|
+
retry_delay = 2
|
|
486
|
+
last_error = None
|
|
487
|
+
|
|
488
|
+
for attempt in range(max_retries):
|
|
489
|
+
try:
|
|
490
|
+
aux_client, effective_model, extra_body = _resolve_web_extract_auxiliary(model)
|
|
491
|
+
if aux_client is None or not effective_model:
|
|
492
|
+
logger.warning("No auxiliary model available for web content processing")
|
|
493
|
+
return None
|
|
494
|
+
call_kwargs = {
|
|
495
|
+
"task": "web_extract",
|
|
496
|
+
"model": effective_model,
|
|
497
|
+
"messages": [
|
|
498
|
+
{"role": "system", "content": system_prompt},
|
|
499
|
+
{"role": "user", "content": user_prompt},
|
|
500
|
+
],
|
|
501
|
+
"temperature": 0.1,
|
|
502
|
+
"max_tokens": max_tokens,
|
|
503
|
+
# No explicit timeout — async_call_llm reads auxiliary.web_extract.timeout
|
|
504
|
+
# from config.yaml. Fresh configs ship with 360s; if the key is absent
|
|
505
|
+
# the runtime default is 30s (_DEFAULT_AUX_TIMEOUT in
|
|
506
|
+
# agent/auxiliary_client.py). Users with slow local models should set
|
|
507
|
+
# or increase auxiliary.web_extract.timeout in config.yaml.
|
|
508
|
+
}
|
|
509
|
+
if extra_body:
|
|
510
|
+
call_kwargs["extra_body"] = extra_body
|
|
511
|
+
response = await async_call_llm(**call_kwargs)
|
|
512
|
+
content = extract_content_or_reasoning(response)
|
|
513
|
+
if content:
|
|
514
|
+
return content
|
|
515
|
+
# Reasoning-only / empty response — let the retry loop handle it
|
|
516
|
+
logger.warning("LLM returned empty content (attempt %d/%d), retrying", attempt + 1, max_retries)
|
|
517
|
+
if attempt < max_retries - 1:
|
|
518
|
+
await asyncio.sleep(retry_delay)
|
|
519
|
+
retry_delay = min(retry_delay * 2, 60)
|
|
520
|
+
continue
|
|
521
|
+
return content # Return whatever we got after exhausting retries
|
|
522
|
+
except RuntimeError:
|
|
523
|
+
logger.warning("No auxiliary model available for web content processing")
|
|
524
|
+
return None
|
|
525
|
+
except Exception as api_error:
|
|
526
|
+
last_error = api_error
|
|
527
|
+
if attempt < max_retries - 1:
|
|
528
|
+
logger.warning("LLM API call failed (attempt %d/%d): %s", attempt + 1, max_retries, str(api_error)[:100])
|
|
529
|
+
logger.warning("Retrying in %ds...", retry_delay)
|
|
530
|
+
await asyncio.sleep(retry_delay)
|
|
531
|
+
retry_delay = min(retry_delay * 2, 60)
|
|
532
|
+
else:
|
|
533
|
+
raise last_error
|
|
534
|
+
|
|
535
|
+
return None
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
async def _process_large_content_chunked(
|
|
539
|
+
content: str,
|
|
540
|
+
context_str: str,
|
|
541
|
+
model: Optional[str],
|
|
542
|
+
chunk_size: int,
|
|
543
|
+
max_output_size: int
|
|
544
|
+
) -> Optional[str]:
|
|
545
|
+
"""
|
|
546
|
+
Process large content by chunking, summarizing each chunk in parallel,
|
|
547
|
+
then synthesizing the summaries.
|
|
548
|
+
|
|
549
|
+
Args:
|
|
550
|
+
content: The large content to process
|
|
551
|
+
context_str: Context information
|
|
552
|
+
model: Model to use
|
|
553
|
+
chunk_size: Size of each chunk in characters
|
|
554
|
+
max_output_size: Maximum final output size
|
|
555
|
+
|
|
556
|
+
Returns:
|
|
557
|
+
Synthesized summary or None on failure
|
|
558
|
+
"""
|
|
559
|
+
# Split content into chunks
|
|
560
|
+
chunks = []
|
|
561
|
+
for i in range(0, len(content), chunk_size):
|
|
562
|
+
chunk = content[i:i + chunk_size]
|
|
563
|
+
chunks.append(chunk)
|
|
564
|
+
|
|
565
|
+
logger.info("Split into %d chunks of ~%d chars each", len(chunks), chunk_size)
|
|
566
|
+
|
|
567
|
+
# Summarize each chunk in parallel
|
|
568
|
+
async def summarize_chunk(chunk_idx: int, chunk_content: str) -> tuple[int, Optional[str]]:
|
|
569
|
+
"""Summarize a single chunk."""
|
|
570
|
+
try:
|
|
571
|
+
chunk_info = f"[Processing chunk {chunk_idx + 1} of {len(chunks)}]"
|
|
572
|
+
summary = await _call_summarizer_llm(
|
|
573
|
+
chunk_content,
|
|
574
|
+
context_str,
|
|
575
|
+
model,
|
|
576
|
+
max_tokens=10000,
|
|
577
|
+
is_chunk=True,
|
|
578
|
+
chunk_info=chunk_info
|
|
579
|
+
)
|
|
580
|
+
if summary:
|
|
581
|
+
logger.info("Chunk %d/%d summarized: %d -> %d chars", chunk_idx + 1, len(chunks), len(chunk_content), len(summary))
|
|
582
|
+
return chunk_idx, summary
|
|
583
|
+
except Exception as e:
|
|
584
|
+
logger.warning("Chunk %d/%d failed: %s", chunk_idx + 1, len(chunks), str(e)[:50])
|
|
585
|
+
return chunk_idx, None
|
|
586
|
+
|
|
587
|
+
# Run all chunk summarizations in parallel
|
|
588
|
+
tasks = [summarize_chunk(i, chunk) for i, chunk in enumerate(chunks)]
|
|
589
|
+
# Use return_exceptions=True so a single task failure does not discard
|
|
590
|
+
# all other successfully summarized chunks.
|
|
591
|
+
results = await asyncio.gather(*tasks, return_exceptions=True)
|
|
592
|
+
|
|
593
|
+
# Filter out exceptions, then collect successful summaries in order
|
|
594
|
+
successful_results = []
|
|
595
|
+
for result_item in results:
|
|
596
|
+
if isinstance(result_item, BaseException):
|
|
597
|
+
logger.warning("Chunk summarization task failed: %s", result_item)
|
|
598
|
+
continue
|
|
599
|
+
successful_results.append(result_item)
|
|
600
|
+
|
|
601
|
+
summaries = []
|
|
602
|
+
for chunk_idx, summary in sorted(successful_results, key=lambda x: x[0]):
|
|
603
|
+
if summary:
|
|
604
|
+
summaries.append(f"## Section {chunk_idx + 1}\n{summary}")
|
|
605
|
+
|
|
606
|
+
if not summaries:
|
|
607
|
+
logger.debug("All chunk summarizations failed")
|
|
608
|
+
return "[Failed to process large content: all chunk summarizations failed]"
|
|
609
|
+
|
|
610
|
+
logger.info("Got %d/%d chunk summaries", len(summaries), len(chunks))
|
|
611
|
+
|
|
612
|
+
# If only one chunk succeeded, just return it (with cap)
|
|
613
|
+
if len(summaries) == 1:
|
|
614
|
+
result = summaries[0]
|
|
615
|
+
if len(result) > max_output_size:
|
|
616
|
+
result = result[:max_output_size] + "\n\n[... truncated ...]"
|
|
617
|
+
return result
|
|
618
|
+
|
|
619
|
+
# Synthesize the summaries into a final summary
|
|
620
|
+
logger.info("Synthesizing %d summaries...", len(summaries))
|
|
621
|
+
|
|
622
|
+
combined_summaries = "\n\n---\n\n".join(summaries)
|
|
623
|
+
|
|
624
|
+
synthesis_prompt = f"""You have been given summaries of different sections of a large document.
|
|
625
|
+
Synthesize these into ONE cohesive, comprehensive summary that:
|
|
626
|
+
1. Removes redundancy between sections
|
|
627
|
+
2. Preserves all key facts, figures, and actionable information
|
|
628
|
+
3. Is well-organized with clear structure
|
|
629
|
+
4. Is under {max_output_size} characters
|
|
630
|
+
|
|
631
|
+
{context_str}SECTION SUMMARIES:
|
|
632
|
+
{combined_summaries}
|
|
633
|
+
|
|
634
|
+
Create a single, unified markdown summary."""
|
|
635
|
+
|
|
636
|
+
try:
|
|
637
|
+
aux_client, effective_model, extra_body = _resolve_web_extract_auxiliary(model)
|
|
638
|
+
if aux_client is None or not effective_model:
|
|
639
|
+
logger.warning("No auxiliary model for synthesis, concatenating summaries")
|
|
640
|
+
fallback = "\n\n".join(summaries)
|
|
641
|
+
if len(fallback) > max_output_size:
|
|
642
|
+
fallback = fallback[:max_output_size] + "\n\n[... truncated ...]"
|
|
643
|
+
return fallback
|
|
644
|
+
|
|
645
|
+
call_kwargs = {
|
|
646
|
+
"task": "web_extract",
|
|
647
|
+
"model": effective_model,
|
|
648
|
+
"messages": [
|
|
649
|
+
{"role": "system", "content": "You synthesize multiple summaries into one cohesive, comprehensive summary. Be thorough but concise."},
|
|
650
|
+
{"role": "user", "content": synthesis_prompt},
|
|
651
|
+
],
|
|
652
|
+
"temperature": 0.1,
|
|
653
|
+
"max_tokens": 20000,
|
|
654
|
+
}
|
|
655
|
+
if extra_body:
|
|
656
|
+
call_kwargs["extra_body"] = extra_body
|
|
657
|
+
response = await async_call_llm(**call_kwargs)
|
|
658
|
+
final_summary = extract_content_or_reasoning(response)
|
|
659
|
+
|
|
660
|
+
# Retry once on empty content (reasoning-only response)
|
|
661
|
+
if not final_summary:
|
|
662
|
+
logger.warning("Synthesis LLM returned empty content, retrying once")
|
|
663
|
+
response = await async_call_llm(**call_kwargs)
|
|
664
|
+
final_summary = extract_content_or_reasoning(response)
|
|
665
|
+
|
|
666
|
+
# If still None after retry, fall back to concatenated summaries
|
|
667
|
+
if not final_summary:
|
|
668
|
+
logger.warning("Synthesis failed after retry — concatenating chunk summaries")
|
|
669
|
+
fallback = "\n\n".join(summaries)
|
|
670
|
+
if len(fallback) > max_output_size:
|
|
671
|
+
fallback = fallback[:max_output_size] + "\n\n[... truncated ...]"
|
|
672
|
+
return fallback
|
|
673
|
+
|
|
674
|
+
# Enforce hard cap
|
|
675
|
+
if len(final_summary) > max_output_size:
|
|
676
|
+
final_summary = final_summary[:max_output_size] + "\n\n[... summary truncated for context management ...]"
|
|
677
|
+
|
|
678
|
+
original_len = len(content)
|
|
679
|
+
final_len = len(final_summary)
|
|
680
|
+
compression = final_len / original_len if original_len > 0 else 1.0
|
|
681
|
+
|
|
682
|
+
logger.info("Synthesis complete: %d -> %d chars (%.2f%%)", original_len, final_len, compression * 100)
|
|
683
|
+
return final_summary
|
|
684
|
+
|
|
685
|
+
except Exception as e:
|
|
686
|
+
logger.warning("Synthesis failed: %s", str(e)[:100])
|
|
687
|
+
# Fall back to concatenated summaries with truncation
|
|
688
|
+
fallback = "\n\n".join(summaries)
|
|
689
|
+
if len(fallback) > max_output_size:
|
|
690
|
+
fallback = fallback[:max_output_size] + "\n\n[... truncated due to synthesis failure ...]"
|
|
691
|
+
return fallback
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
def clean_base64_images(text: str) -> str:
|
|
695
|
+
"""
|
|
696
|
+
Remove base64 encoded images from text to reduce token count and clutter.
|
|
697
|
+
|
|
698
|
+
This function finds and removes base64 encoded images in various formats:
|
|
699
|
+
- (data:image/png;base64,...)
|
|
700
|
+
- (data:image/jpeg;base64,...)
|
|
701
|
+
- (data:image/svg+xml;base64,...)
|
|
702
|
+
- data:image/[type];base64,... (without parentheses)
|
|
703
|
+
|
|
704
|
+
Args:
|
|
705
|
+
text: The text content to clean
|
|
706
|
+
|
|
707
|
+
Returns:
|
|
708
|
+
Cleaned text with base64 images replaced with placeholders
|
|
709
|
+
"""
|
|
710
|
+
# Pattern to match base64 encoded images wrapped in parentheses
|
|
711
|
+
# Matches: (data:image/[type];base64,[base64-string])
|
|
712
|
+
base64_with_parens_pattern = r'\(data:image/[^;]+;base64,[A-Za-z0-9+/=]+\)'
|
|
713
|
+
|
|
714
|
+
# Pattern to match base64 encoded images without parentheses
|
|
715
|
+
# Matches: data:image/[type];base64,[base64-string]
|
|
716
|
+
base64_pattern = r'data:image/[^;]+;base64,[A-Za-z0-9+/=]+'
|
|
717
|
+
|
|
718
|
+
# Replace parentheses-wrapped images first
|
|
719
|
+
cleaned_text = re.sub(base64_with_parens_pattern, '[BASE64_IMAGE_REMOVED]', text)
|
|
720
|
+
|
|
721
|
+
# Then replace any remaining non-parentheses images
|
|
722
|
+
cleaned_text = re.sub(base64_pattern, '[BASE64_IMAGE_REMOVED]', cleaned_text)
|
|
723
|
+
|
|
724
|
+
return cleaned_text
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
# ─── Exa / Parallel inline helpers — moved into plugins ──────────────────────
|
|
728
|
+
# After PR #25182, the exa client + search/extract and parallel client +
|
|
729
|
+
# search/extract helpers all live in their respective plugins:
|
|
730
|
+
# - plugins/web/exa/provider.py
|
|
731
|
+
# - plugins/web/parallel/provider.py
|
|
732
|
+
# Both plugins register through agent.web_search_registry and the
|
|
733
|
+
# dispatchers in this file resolve them via get_active_*_provider().
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
def web_search_tool(query: str, limit: int = 5) -> str:
|
|
737
|
+
"""
|
|
738
|
+
Search the web for information using available search API backend.
|
|
739
|
+
|
|
740
|
+
This function provides a generic interface for web search that can work
|
|
741
|
+
with multiple backends (Parallel or Firecrawl).
|
|
742
|
+
|
|
743
|
+
Note: This function returns search result metadata only (URLs, titles, descriptions).
|
|
744
|
+
Use web_extract_tool to get full content from specific URLs.
|
|
745
|
+
|
|
746
|
+
Args:
|
|
747
|
+
query (str): The search query to look up
|
|
748
|
+
limit (int): Maximum number of results to return (default: 5)
|
|
749
|
+
|
|
750
|
+
Returns:
|
|
751
|
+
str: JSON string containing search results with the following structure:
|
|
752
|
+
{
|
|
753
|
+
"success": bool,
|
|
754
|
+
"data": {
|
|
755
|
+
"web": [
|
|
756
|
+
{
|
|
757
|
+
"title": str,
|
|
758
|
+
"url": str,
|
|
759
|
+
"description": str,
|
|
760
|
+
"position": int
|
|
761
|
+
},
|
|
762
|
+
...
|
|
763
|
+
]
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
Raises:
|
|
768
|
+
Exception: If search fails or API key is not set
|
|
769
|
+
"""
|
|
770
|
+
try:
|
|
771
|
+
limit = int(limit)
|
|
772
|
+
except (TypeError, ValueError):
|
|
773
|
+
limit = 5
|
|
774
|
+
limit = min(max(limit, 1), 100)
|
|
775
|
+
|
|
776
|
+
debug_call_data = {
|
|
777
|
+
"parameters": {
|
|
778
|
+
"query": query,
|
|
779
|
+
"limit": limit
|
|
780
|
+
},
|
|
781
|
+
"error": None,
|
|
782
|
+
"results_count": 0,
|
|
783
|
+
"original_response_size": 0,
|
|
784
|
+
"final_response_size": 0
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
try:
|
|
788
|
+
from tools.interrupt import is_interrupted
|
|
789
|
+
if is_interrupted():
|
|
790
|
+
return tool_error("Interrupted", success=False)
|
|
791
|
+
|
|
792
|
+
# Dispatch through the web search registry. All 7 providers
|
|
793
|
+
# (brave-free, ddgs, searxng, exa, parallel, tavily, firecrawl)
|
|
794
|
+
# now live as plugins; the dispatcher is just a registry lookup +
|
|
795
|
+
# delegation. Sync only — every provider's search() is sync.
|
|
796
|
+
from agent.web_search_registry import (
|
|
797
|
+
get_active_search_provider,
|
|
798
|
+
get_provider as _wsp_get_provider,
|
|
799
|
+
)
|
|
800
|
+
|
|
801
|
+
backend = _get_search_backend()
|
|
802
|
+
provider = _wsp_get_provider(backend) if backend else None
|
|
803
|
+
if provider is None or not provider.supports_search():
|
|
804
|
+
# Fall back to availability-walked active provider when the
|
|
805
|
+
# configured backend isn't a registered search provider (typo,
|
|
806
|
+
# uninstalled plugin, or capability mismatch).
|
|
807
|
+
provider = get_active_search_provider()
|
|
808
|
+
|
|
809
|
+
if provider is None:
|
|
810
|
+
response_data = {
|
|
811
|
+
"success": False,
|
|
812
|
+
"error": (
|
|
813
|
+
"No web search provider configured. "
|
|
814
|
+
"Run `hermes tools` to set one up."
|
|
815
|
+
),
|
|
816
|
+
}
|
|
817
|
+
else:
|
|
818
|
+
logger.info(
|
|
819
|
+
"Web search via %s: '%s' (limit: %d)",
|
|
820
|
+
provider.name, query, limit,
|
|
821
|
+
)
|
|
822
|
+
response_data = provider.search(query, limit)
|
|
823
|
+
|
|
824
|
+
debug_call_data["results_count"] = len(response_data.get("data", {}).get("web", []))
|
|
825
|
+
result_json = json.dumps(response_data, indent=2, ensure_ascii=False)
|
|
826
|
+
debug_call_data["final_response_size"] = len(result_json)
|
|
827
|
+
_debug.log_call("web_search_tool", debug_call_data)
|
|
828
|
+
_debug.save()
|
|
829
|
+
return result_json
|
|
830
|
+
|
|
831
|
+
except Exception as e:
|
|
832
|
+
error_msg = f"Error searching web: {str(e)}"
|
|
833
|
+
logger.debug("%s", error_msg)
|
|
834
|
+
|
|
835
|
+
debug_call_data["error"] = error_msg
|
|
836
|
+
_debug.log_call("web_search_tool", debug_call_data)
|
|
837
|
+
_debug.save()
|
|
838
|
+
|
|
839
|
+
return tool_error(error_msg)
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
async def web_extract_tool(
|
|
843
|
+
urls: List[str],
|
|
844
|
+
format: str = None,
|
|
845
|
+
use_llm_processing: bool = True,
|
|
846
|
+
model: Optional[str] = None,
|
|
847
|
+
min_length: int = DEFAULT_MIN_LENGTH_FOR_SUMMARIZATION
|
|
848
|
+
) -> str:
|
|
849
|
+
"""
|
|
850
|
+
Extract content from specific web pages using available extraction API backend.
|
|
851
|
+
|
|
852
|
+
This function provides a generic interface for web content extraction that
|
|
853
|
+
can work with multiple backends. Currently uses Firecrawl.
|
|
854
|
+
|
|
855
|
+
Args:
|
|
856
|
+
urls (List[str]): List of URLs to extract content from
|
|
857
|
+
format (str): Desired output format ("markdown" or "html", optional)
|
|
858
|
+
use_llm_processing (bool): Whether to process content with LLM for summarization (default: True)
|
|
859
|
+
model (Optional[str]): The model to use for LLM processing (defaults to current auxiliary backend model)
|
|
860
|
+
min_length (int): Minimum content length to trigger LLM processing (default: 5000)
|
|
861
|
+
|
|
862
|
+
Security: URLs are checked for embedded secrets before fetching.
|
|
863
|
+
|
|
864
|
+
Returns:
|
|
865
|
+
str: JSON string containing extracted content. If LLM processing is enabled and successful,
|
|
866
|
+
the 'content' field will contain the processed markdown summary instead of raw content.
|
|
867
|
+
|
|
868
|
+
Raises:
|
|
869
|
+
Exception: If extraction fails or API key is not set
|
|
870
|
+
"""
|
|
871
|
+
# Block URLs containing embedded secrets (exfiltration prevention).
|
|
872
|
+
# URL-decode first so percent-encoded secrets (%73k- = sk-) are caught.
|
|
873
|
+
from agent.redact import _PREFIX_RE
|
|
874
|
+
from urllib.parse import unquote
|
|
875
|
+
for _url in urls:
|
|
876
|
+
if _PREFIX_RE.search(_url) or _PREFIX_RE.search(unquote(_url)):
|
|
877
|
+
return json.dumps({
|
|
878
|
+
"success": False,
|
|
879
|
+
"error": "Blocked: URL contains what appears to be an API key or token. "
|
|
880
|
+
"Secrets must not be sent in URLs.",
|
|
881
|
+
})
|
|
882
|
+
|
|
883
|
+
debug_call_data = {
|
|
884
|
+
"parameters": {
|
|
885
|
+
"urls": urls,
|
|
886
|
+
"format": format,
|
|
887
|
+
"use_llm_processing": use_llm_processing,
|
|
888
|
+
"model": model,
|
|
889
|
+
"min_length": min_length
|
|
890
|
+
},
|
|
891
|
+
"error": None,
|
|
892
|
+
"pages_extracted": 0,
|
|
893
|
+
"pages_processed_with_llm": 0,
|
|
894
|
+
"original_response_size": 0,
|
|
895
|
+
"final_response_size": 0,
|
|
896
|
+
"compression_metrics": [],
|
|
897
|
+
"processing_applied": []
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
try:
|
|
901
|
+
logger.info("Extracting content from %d URL(s)", len(urls))
|
|
902
|
+
|
|
903
|
+
# ── SSRF protection — filter out private/internal URLs before any backend ──
|
|
904
|
+
safe_urls = []
|
|
905
|
+
ssrf_blocked: List[Dict[str, Any]] = []
|
|
906
|
+
for url in urls:
|
|
907
|
+
if not is_safe_url(url):
|
|
908
|
+
ssrf_blocked.append({
|
|
909
|
+
"url": url, "title": "", "content": "",
|
|
910
|
+
"error": "Blocked: URL targets a private or internal network address",
|
|
911
|
+
})
|
|
912
|
+
else:
|
|
913
|
+
safe_urls.append(url)
|
|
914
|
+
|
|
915
|
+
# Dispatch only safe URLs to the configured backend
|
|
916
|
+
if not safe_urls:
|
|
917
|
+
results = []
|
|
918
|
+
else:
|
|
919
|
+
backend = _get_extract_backend()
|
|
920
|
+
|
|
921
|
+
# All seven providers (brave-free, ddgs, searxng, exa, parallel,
|
|
922
|
+
# tavily, firecrawl) now live as plugins. The dispatcher is a
|
|
923
|
+
# registry lookup + delegation. Some providers' extract() is
|
|
924
|
+
# async (parallel, firecrawl), others sync (exa, tavily) — we
|
|
925
|
+
# detect coroutine functions and await; sync functions run
|
|
926
|
+
# inline (the policy gate, SSRF re-check, etc. live inside the
|
|
927
|
+
# provider itself for the firecrawl per-URL loop).
|
|
928
|
+
from agent.web_search_registry import (
|
|
929
|
+
get_active_extract_provider,
|
|
930
|
+
get_provider as _wsp_get_provider,
|
|
931
|
+
)
|
|
932
|
+
|
|
933
|
+
provider = _wsp_get_provider(backend) if backend else None
|
|
934
|
+
if provider is None or not provider.supports_extract():
|
|
935
|
+
# When the configured name IS registered but doesn't support
|
|
936
|
+
# extract (search-only providers like brave-free / ddgs /
|
|
937
|
+
# searxng), surface that as a typed "search-only" error
|
|
938
|
+
# rather than silently switching backends. When the name
|
|
939
|
+
# isn't registered at all (typo / uninstalled plugin), fall
|
|
940
|
+
# through to the active-provider walk.
|
|
941
|
+
if provider is not None and not provider.supports_extract():
|
|
942
|
+
return json.dumps(
|
|
943
|
+
{
|
|
944
|
+
"success": False,
|
|
945
|
+
"error": (
|
|
946
|
+
f"{provider.display_name} is a search-only "
|
|
947
|
+
"backend and cannot extract URL content. "
|
|
948
|
+
"Set web.extract_backend to firecrawl, "
|
|
949
|
+
"tavily, exa, or parallel."
|
|
950
|
+
),
|
|
951
|
+
},
|
|
952
|
+
ensure_ascii=False,
|
|
953
|
+
)
|
|
954
|
+
provider = get_active_extract_provider()
|
|
955
|
+
if provider is None:
|
|
956
|
+
return json.dumps(
|
|
957
|
+
{
|
|
958
|
+
"success": False,
|
|
959
|
+
"error": (
|
|
960
|
+
"No web extract provider configured. "
|
|
961
|
+
"Set web.extract_backend to firecrawl, "
|
|
962
|
+
"tavily, exa, or parallel."
|
|
963
|
+
),
|
|
964
|
+
},
|
|
965
|
+
ensure_ascii=False,
|
|
966
|
+
)
|
|
967
|
+
|
|
968
|
+
logger.info(
|
|
969
|
+
"Web extract via %s: %d URL(s)", provider.name, len(safe_urls)
|
|
970
|
+
)
|
|
971
|
+
|
|
972
|
+
# Async-or-sync dispatch: parallel + firecrawl have async
|
|
973
|
+
# extract(); exa + tavily are sync.
|
|
974
|
+
import inspect
|
|
975
|
+
if inspect.iscoroutinefunction(provider.extract):
|
|
976
|
+
results = await provider.extract(safe_urls, format=format)
|
|
977
|
+
else:
|
|
978
|
+
# Run sync extract() in a thread so we don't block the
|
|
979
|
+
# event loop on network I/O.
|
|
980
|
+
results = await asyncio.to_thread(
|
|
981
|
+
provider.extract, safe_urls, format=format
|
|
982
|
+
)
|
|
983
|
+
|
|
984
|
+
# Merge any SSRF-blocked results back in
|
|
985
|
+
if ssrf_blocked:
|
|
986
|
+
results = ssrf_blocked + results
|
|
987
|
+
|
|
988
|
+
response = {"results": results}
|
|
989
|
+
|
|
990
|
+
pages_extracted = len(response.get('results', []))
|
|
991
|
+
logger.info("Extracted content from %d pages", pages_extracted)
|
|
992
|
+
|
|
993
|
+
debug_call_data["pages_extracted"] = pages_extracted
|
|
994
|
+
debug_call_data["original_response_size"] = len(json.dumps(response))
|
|
995
|
+
effective_model = model or _get_default_summarizer_model()
|
|
996
|
+
auxiliary_available = check_auxiliary_model()
|
|
997
|
+
|
|
998
|
+
# Process each result with LLM if enabled
|
|
999
|
+
if use_llm_processing and auxiliary_available:
|
|
1000
|
+
logger.info("Processing extracted content with LLM (parallel)...")
|
|
1001
|
+
debug_call_data["processing_applied"].append("llm_processing")
|
|
1002
|
+
|
|
1003
|
+
# Prepare tasks for parallel processing
|
|
1004
|
+
async def process_single_result(result):
|
|
1005
|
+
"""Process a single result with LLM and return updated result with metrics."""
|
|
1006
|
+
url = result.get('url', 'Unknown URL')
|
|
1007
|
+
title = result.get('title', '')
|
|
1008
|
+
raw_content = result.get('raw_content', '') or result.get('content', '')
|
|
1009
|
+
|
|
1010
|
+
if not raw_content:
|
|
1011
|
+
return result, None, "no_content"
|
|
1012
|
+
|
|
1013
|
+
original_size = len(raw_content)
|
|
1014
|
+
|
|
1015
|
+
# Process content with LLM
|
|
1016
|
+
processed = await process_content_with_llm(
|
|
1017
|
+
raw_content, url, title, effective_model, min_length
|
|
1018
|
+
)
|
|
1019
|
+
|
|
1020
|
+
if processed:
|
|
1021
|
+
processed_size = len(processed)
|
|
1022
|
+
compression_ratio = processed_size / original_size if original_size > 0 else 1.0
|
|
1023
|
+
|
|
1024
|
+
# Update result with processed content
|
|
1025
|
+
result['content'] = processed
|
|
1026
|
+
result['raw_content'] = raw_content
|
|
1027
|
+
|
|
1028
|
+
metrics = {
|
|
1029
|
+
"url": url,
|
|
1030
|
+
"original_size": original_size,
|
|
1031
|
+
"processed_size": processed_size,
|
|
1032
|
+
"compression_ratio": compression_ratio,
|
|
1033
|
+
"model_used": effective_model
|
|
1034
|
+
}
|
|
1035
|
+
return result, metrics, "processed"
|
|
1036
|
+
else:
|
|
1037
|
+
metrics = {
|
|
1038
|
+
"url": url,
|
|
1039
|
+
"original_size": original_size,
|
|
1040
|
+
"processed_size": original_size,
|
|
1041
|
+
"compression_ratio": 1.0,
|
|
1042
|
+
"model_used": None,
|
|
1043
|
+
"reason": "content_too_short"
|
|
1044
|
+
}
|
|
1045
|
+
return result, metrics, "too_short"
|
|
1046
|
+
|
|
1047
|
+
# Run all LLM processing in parallel
|
|
1048
|
+
results_list = response.get('results', [])
|
|
1049
|
+
tasks = [process_single_result(result) for result in results_list]
|
|
1050
|
+
# Use return_exceptions=True so a single task failure does not
|
|
1051
|
+
# discard all other successfully processed results.
|
|
1052
|
+
processed_results = await asyncio.gather(*tasks, return_exceptions=True)
|
|
1053
|
+
|
|
1054
|
+
# Collect metrics and print results
|
|
1055
|
+
for result_item in processed_results:
|
|
1056
|
+
if isinstance(result_item, BaseException):
|
|
1057
|
+
logger.warning("Web result processing task failed: %s", result_item)
|
|
1058
|
+
continue
|
|
1059
|
+
result, metrics, status = result_item
|
|
1060
|
+
url = result.get('url', 'Unknown URL')
|
|
1061
|
+
if status == "processed":
|
|
1062
|
+
debug_call_data["compression_metrics"].append(metrics)
|
|
1063
|
+
debug_call_data["pages_processed_with_llm"] += 1
|
|
1064
|
+
logger.info("%s (processed)", url)
|
|
1065
|
+
elif status == "too_short":
|
|
1066
|
+
debug_call_data["compression_metrics"].append(metrics)
|
|
1067
|
+
logger.info("%s (no processing - content too short)", url)
|
|
1068
|
+
else:
|
|
1069
|
+
logger.warning("%s (no content to process)", url)
|
|
1070
|
+
else:
|
|
1071
|
+
if use_llm_processing and not auxiliary_available:
|
|
1072
|
+
logger.warning("LLM processing requested but no auxiliary model available, returning raw content")
|
|
1073
|
+
debug_call_data["processing_applied"].append("llm_processing_unavailable")
|
|
1074
|
+
# Print summary of extracted pages for debugging (original behavior)
|
|
1075
|
+
for result in response.get('results', []):
|
|
1076
|
+
url = result.get('url', 'Unknown URL')
|
|
1077
|
+
content_length = len(result.get('raw_content', ''))
|
|
1078
|
+
logger.info("%s (%d characters)", url, content_length)
|
|
1079
|
+
|
|
1080
|
+
# Trim output to minimal fields per entry: title, content, error
|
|
1081
|
+
trimmed_results = [
|
|
1082
|
+
{
|
|
1083
|
+
"url": r.get("url", ""),
|
|
1084
|
+
"title": r.get("title", ""),
|
|
1085
|
+
"content": r.get("content", ""),
|
|
1086
|
+
"error": r.get("error"),
|
|
1087
|
+
**({ "blocked_by_policy": r["blocked_by_policy"]} if "blocked_by_policy" in r else {}),
|
|
1088
|
+
}
|
|
1089
|
+
for r in response.get("results", [])
|
|
1090
|
+
]
|
|
1091
|
+
trimmed_response = {"results": trimmed_results}
|
|
1092
|
+
|
|
1093
|
+
if trimmed_response.get("results") == []:
|
|
1094
|
+
result_json = tool_error("Content was inaccessible or not found")
|
|
1095
|
+
|
|
1096
|
+
cleaned_result = clean_base64_images(result_json)
|
|
1097
|
+
|
|
1098
|
+
else:
|
|
1099
|
+
result_json = json.dumps(trimmed_response, indent=2, ensure_ascii=False)
|
|
1100
|
+
|
|
1101
|
+
cleaned_result = clean_base64_images(result_json)
|
|
1102
|
+
|
|
1103
|
+
debug_call_data["final_response_size"] = len(cleaned_result)
|
|
1104
|
+
debug_call_data["processing_applied"].append("base64_image_removal")
|
|
1105
|
+
|
|
1106
|
+
# Log debug information
|
|
1107
|
+
_debug.log_call("web_extract_tool", debug_call_data)
|
|
1108
|
+
_debug.save()
|
|
1109
|
+
|
|
1110
|
+
return cleaned_result
|
|
1111
|
+
|
|
1112
|
+
except Exception as e:
|
|
1113
|
+
error_msg = f"Error extracting content: {str(e)}"
|
|
1114
|
+
logger.debug("%s", error_msg)
|
|
1115
|
+
|
|
1116
|
+
debug_call_data["error"] = error_msg
|
|
1117
|
+
_debug.log_call("web_extract_tool", debug_call_data)
|
|
1118
|
+
_debug.save()
|
|
1119
|
+
|
|
1120
|
+
return tool_error(error_msg)
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
async def web_crawl_tool(
|
|
1124
|
+
url: str,
|
|
1125
|
+
instructions: str = None,
|
|
1126
|
+
depth: str = "basic",
|
|
1127
|
+
use_llm_processing: bool = True,
|
|
1128
|
+
model: Optional[str] = None,
|
|
1129
|
+
min_length: int = DEFAULT_MIN_LENGTH_FOR_SUMMARIZATION
|
|
1130
|
+
) -> str:
|
|
1131
|
+
"""
|
|
1132
|
+
Crawl a website with specific instructions using available crawling API backend.
|
|
1133
|
+
|
|
1134
|
+
This function provides a generic interface for web crawling that can work
|
|
1135
|
+
with multiple backends. Currently uses Firecrawl.
|
|
1136
|
+
|
|
1137
|
+
Args:
|
|
1138
|
+
url (str): The base URL to crawl (can include or exclude https://)
|
|
1139
|
+
instructions (str): Instructions for what to crawl/extract using LLM intelligence (optional)
|
|
1140
|
+
depth (str): Depth of extraction ("basic" or "advanced", default: "basic")
|
|
1141
|
+
use_llm_processing (bool): Whether to process content with LLM for summarization (default: True)
|
|
1142
|
+
model (Optional[str]): The model to use for LLM processing (defaults to current auxiliary backend model)
|
|
1143
|
+
min_length (int): Minimum content length to trigger LLM processing (default: 5000)
|
|
1144
|
+
|
|
1145
|
+
Returns:
|
|
1146
|
+
str: JSON string containing crawled content. If LLM processing is enabled and successful,
|
|
1147
|
+
the 'content' field will contain the processed markdown summary instead of raw content.
|
|
1148
|
+
Each page is processed individually.
|
|
1149
|
+
|
|
1150
|
+
Raises:
|
|
1151
|
+
Exception: If crawling fails or API key is not set
|
|
1152
|
+
"""
|
|
1153
|
+
debug_call_data = {
|
|
1154
|
+
"parameters": {
|
|
1155
|
+
"url": url,
|
|
1156
|
+
"instructions": instructions,
|
|
1157
|
+
"depth": depth,
|
|
1158
|
+
"use_llm_processing": use_llm_processing,
|
|
1159
|
+
"model": model,
|
|
1160
|
+
"min_length": min_length
|
|
1161
|
+
},
|
|
1162
|
+
"error": None,
|
|
1163
|
+
"pages_crawled": 0,
|
|
1164
|
+
"pages_processed_with_llm": 0,
|
|
1165
|
+
"original_response_size": 0,
|
|
1166
|
+
"final_response_size": 0,
|
|
1167
|
+
"compression_metrics": [],
|
|
1168
|
+
"processing_applied": []
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
try:
|
|
1172
|
+
effective_model = model or _get_default_summarizer_model()
|
|
1173
|
+
auxiliary_available = check_auxiliary_model()
|
|
1174
|
+
backend = _get_backend()
|
|
1175
|
+
|
|
1176
|
+
# Tavily (and any future plugin advertising supports_crawl=True)
|
|
1177
|
+
# dispatches through agent.web_search_registry. The crawl response
|
|
1178
|
+
# shape — {"results": [{"url", "title", "content", ...}]} — is then
|
|
1179
|
+
# post-processed by the shared LLM-summarization path below.
|
|
1180
|
+
from agent.web_search_registry import (
|
|
1181
|
+
get_active_crawl_provider,
|
|
1182
|
+
get_provider as _wsp_get_provider,
|
|
1183
|
+
)
|
|
1184
|
+
|
|
1185
|
+
crawl_provider = _wsp_get_provider(backend) if backend else None
|
|
1186
|
+
if crawl_provider is not None and not crawl_provider.supports_crawl():
|
|
1187
|
+
# When the configured provider is search-only AND cannot
|
|
1188
|
+
# extract URLs either (brave-free / ddgs / searxng), surface a
|
|
1189
|
+
# typed "search-only" error rather than silently switching to
|
|
1190
|
+
# a different crawl backend. When the provider supports extract
|
|
1191
|
+
# but not crawl (e.g. firecrawl), fall through to the legacy
|
|
1192
|
+
# firecrawl-via-extract path below.
|
|
1193
|
+
if not crawl_provider.supports_extract():
|
|
1194
|
+
return json.dumps(
|
|
1195
|
+
{
|
|
1196
|
+
"success": False,
|
|
1197
|
+
"error": (
|
|
1198
|
+
f"{crawl_provider.display_name} is a search-only "
|
|
1199
|
+
"backend and cannot crawl URLs. "
|
|
1200
|
+
"Set FIRECRAWL_API_KEY for crawling, or use "
|
|
1201
|
+
"web_search instead."
|
|
1202
|
+
),
|
|
1203
|
+
},
|
|
1204
|
+
ensure_ascii=False,
|
|
1205
|
+
)
|
|
1206
|
+
crawl_provider = None # let legacy firecrawl path handle it
|
|
1207
|
+
if crawl_provider is None:
|
|
1208
|
+
crawl_provider = get_active_crawl_provider()
|
|
1209
|
+
|
|
1210
|
+
# Mirror main's upstream availability gate: when the resolved
|
|
1211
|
+
# provider is configured-but-unavailable (e.g. firecrawl without
|
|
1212
|
+
# FIRECRAWL_API_KEY), short-circuit BEFORE we dispatch so the
|
|
1213
|
+
# error envelope matches the legacy top-level shape
|
|
1214
|
+
# ``{"success": False, "error": "..."}`` rather than burying the
|
|
1215
|
+
# configuration message inside a per-page ``results[]`` entry.
|
|
1216
|
+
if crawl_provider is not None and not crawl_provider.is_available():
|
|
1217
|
+
return json.dumps(
|
|
1218
|
+
{
|
|
1219
|
+
"success": False,
|
|
1220
|
+
"error": (
|
|
1221
|
+
"web_crawl requires Firecrawl. Set FIRECRAWL_API_KEY, "
|
|
1222
|
+
f"FIRECRAWL_API_URL{_firecrawl_backend_help_suffix()}, "
|
|
1223
|
+
"or use web_search + web_extract instead."
|
|
1224
|
+
),
|
|
1225
|
+
},
|
|
1226
|
+
ensure_ascii=False,
|
|
1227
|
+
)
|
|
1228
|
+
|
|
1229
|
+
if crawl_provider is not None:
|
|
1230
|
+
# Ensure URL has protocol
|
|
1231
|
+
if not url.startswith(('http://', 'https://')):
|
|
1232
|
+
url = f'https://{url}'
|
|
1233
|
+
|
|
1234
|
+
# SSRF protection — block private/internal addresses
|
|
1235
|
+
if not is_safe_url(url):
|
|
1236
|
+
return json.dumps({"results": [{"url": url, "title": "", "content": "",
|
|
1237
|
+
"error": "Blocked: URL targets a private or internal network address"}]}, ensure_ascii=False)
|
|
1238
|
+
|
|
1239
|
+
# Website policy check
|
|
1240
|
+
blocked = check_website_access(url)
|
|
1241
|
+
if blocked:
|
|
1242
|
+
logger.info("Blocked web_crawl for %s by rule %s", blocked["host"], blocked["rule"])
|
|
1243
|
+
return json.dumps({"results": [{"url": url, "title": "", "content": "", "error": blocked["message"],
|
|
1244
|
+
"blocked_by_policy": {"host": blocked["host"], "rule": blocked["rule"], "source": blocked["source"]}}]}, ensure_ascii=False)
|
|
1245
|
+
|
|
1246
|
+
from tools.interrupt import is_interrupted as _is_int
|
|
1247
|
+
if _is_int():
|
|
1248
|
+
return tool_error("Interrupted", success=False)
|
|
1249
|
+
|
|
1250
|
+
logger.info("Web crawl via %s: %s", crawl_provider.name, url)
|
|
1251
|
+
|
|
1252
|
+
# Async-or-sync dispatch — Tavily's crawl is sync, but a future
|
|
1253
|
+
# async-crawl provider works transparently.
|
|
1254
|
+
import inspect
|
|
1255
|
+
crawl_kwargs = {"depth": depth, "limit": 20}
|
|
1256
|
+
if instructions:
|
|
1257
|
+
crawl_kwargs["instructions"] = instructions
|
|
1258
|
+
|
|
1259
|
+
if inspect.iscoroutinefunction(crawl_provider.crawl):
|
|
1260
|
+
response = await crawl_provider.crawl(url, **crawl_kwargs)
|
|
1261
|
+
else:
|
|
1262
|
+
response = await asyncio.to_thread(
|
|
1263
|
+
crawl_provider.crawl, url, **crawl_kwargs
|
|
1264
|
+
)
|
|
1265
|
+
|
|
1266
|
+
# Provider returns {"results": [...]} matching what the shared
|
|
1267
|
+
# LLM post-processing below expects.
|
|
1268
|
+
if not isinstance(response, dict):
|
|
1269
|
+
response = {"results": []}
|
|
1270
|
+
response.setdefault("results", [])
|
|
1271
|
+
|
|
1272
|
+
# Fall through to the shared LLM processing and trimming below
|
|
1273
|
+
# (skip the Firecrawl-specific crawl logic)
|
|
1274
|
+
pages_crawled = len(response.get('results', []))
|
|
1275
|
+
logger.info("Crawled %d pages", pages_crawled)
|
|
1276
|
+
debug_call_data["pages_crawled"] = pages_crawled
|
|
1277
|
+
debug_call_data["original_response_size"] = len(json.dumps(response))
|
|
1278
|
+
|
|
1279
|
+
# Process each result with LLM if enabled
|
|
1280
|
+
if use_llm_processing and auxiliary_available:
|
|
1281
|
+
logger.info("Processing crawled content with LLM (parallel)...")
|
|
1282
|
+
debug_call_data["processing_applied"].append("llm_processing")
|
|
1283
|
+
|
|
1284
|
+
async def _process_tavily_crawl(result):
|
|
1285
|
+
page_url = result.get('url', 'Unknown URL')
|
|
1286
|
+
title = result.get('title', '')
|
|
1287
|
+
content = result.get('content', '')
|
|
1288
|
+
if not content:
|
|
1289
|
+
return result, None, "no_content"
|
|
1290
|
+
original_size = len(content)
|
|
1291
|
+
processed = await process_content_with_llm(content, page_url, title, effective_model, min_length)
|
|
1292
|
+
if processed:
|
|
1293
|
+
result['raw_content'] = content
|
|
1294
|
+
result['content'] = processed
|
|
1295
|
+
metrics = {"url": page_url, "original_size": original_size, "processed_size": len(processed),
|
|
1296
|
+
"compression_ratio": len(processed) / original_size if original_size else 1.0, "model_used": effective_model}
|
|
1297
|
+
return result, metrics, "processed"
|
|
1298
|
+
metrics = {"url": page_url, "original_size": original_size, "processed_size": original_size,
|
|
1299
|
+
"compression_ratio": 1.0, "model_used": None, "reason": "content_too_short"}
|
|
1300
|
+
return result, metrics, "too_short"
|
|
1301
|
+
|
|
1302
|
+
tasks = [_process_tavily_crawl(r) for r in response.get('results', [])]
|
|
1303
|
+
# Use return_exceptions=True so a single task failure does not
|
|
1304
|
+
# discard all other successfully processed crawl results.
|
|
1305
|
+
processed_results = await asyncio.gather(*tasks, return_exceptions=True)
|
|
1306
|
+
for result_item in processed_results:
|
|
1307
|
+
if isinstance(result_item, BaseException):
|
|
1308
|
+
logger.warning("Tavily crawl processing task failed: %s", result_item)
|
|
1309
|
+
continue
|
|
1310
|
+
result, metrics, status = result_item
|
|
1311
|
+
if status == "processed":
|
|
1312
|
+
debug_call_data["compression_metrics"].append(metrics)
|
|
1313
|
+
debug_call_data["pages_processed_with_llm"] += 1
|
|
1314
|
+
|
|
1315
|
+
if use_llm_processing and not auxiliary_available:
|
|
1316
|
+
logger.warning("LLM processing requested but no auxiliary model available, returning raw content")
|
|
1317
|
+
debug_call_data["processing_applied"].append("llm_processing_unavailable")
|
|
1318
|
+
|
|
1319
|
+
trimmed_results = [{"url": r.get("url", ""), "title": r.get("title", ""), "content": r.get("content", ""), "error": r.get("error"),
|
|
1320
|
+
**({ "blocked_by_policy": r["blocked_by_policy"]} if "blocked_by_policy" in r else {})} for r in response.get("results", [])]
|
|
1321
|
+
result_json = json.dumps({"results": trimmed_results}, indent=2, ensure_ascii=False)
|
|
1322
|
+
cleaned_result = clean_base64_images(result_json)
|
|
1323
|
+
debug_call_data["final_response_size"] = len(cleaned_result)
|
|
1324
|
+
_debug.log_call("web_crawl_tool", debug_call_data)
|
|
1325
|
+
_debug.save()
|
|
1326
|
+
return cleaned_result
|
|
1327
|
+
|
|
1328
|
+
# No registered provider supports crawl AND no crawl-capable plugin
|
|
1329
|
+
# is available. Surface a typed error pointing the user at the two
|
|
1330
|
+
# crawl-capable providers (Firecrawl + Tavily).
|
|
1331
|
+
return json.dumps(
|
|
1332
|
+
{
|
|
1333
|
+
"success": False,
|
|
1334
|
+
"error": (
|
|
1335
|
+
"web_crawl has no available backend. "
|
|
1336
|
+
"Set FIRECRAWL_API_KEY (or FIRECRAWL_API_URL for "
|
|
1337
|
+
f"self-hosted){_firecrawl_backend_help_suffix()}, "
|
|
1338
|
+
"or set TAVILY_API_KEY for Tavily. "
|
|
1339
|
+
"Alternatively use web_search + web_extract instead."
|
|
1340
|
+
),
|
|
1341
|
+
},
|
|
1342
|
+
ensure_ascii=False,
|
|
1343
|
+
)
|
|
1344
|
+
|
|
1345
|
+
except Exception as e:
|
|
1346
|
+
error_msg = f"Error crawling website: {str(e)}"
|
|
1347
|
+
logger.debug("%s", error_msg)
|
|
1348
|
+
|
|
1349
|
+
debug_call_data["error"] = error_msg
|
|
1350
|
+
_debug.log_call("web_crawl_tool", debug_call_data)
|
|
1351
|
+
_debug.save()
|
|
1352
|
+
|
|
1353
|
+
return tool_error(error_msg)
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
# Convenience function to check Firecrawl credentials
|
|
1357
|
+
def check_web_api_key() -> bool:
|
|
1358
|
+
"""Check whether the configured web backend is available."""
|
|
1359
|
+
configured = _load_web_config().get("backend", "").lower().strip()
|
|
1360
|
+
if configured in {"exa", "parallel", "firecrawl", "tavily", "searxng", "brave-free", "ddgs"}:
|
|
1361
|
+
return _is_backend_available(configured)
|
|
1362
|
+
return any(
|
|
1363
|
+
_is_backend_available(backend)
|
|
1364
|
+
for backend in ("exa", "parallel", "firecrawl", "tavily", "searxng", "brave-free", "ddgs")
|
|
1365
|
+
)
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
def check_auxiliary_model() -> bool:
|
|
1369
|
+
"""Check if an auxiliary text model is available for LLM content processing."""
|
|
1370
|
+
client, _, _ = _resolve_web_extract_auxiliary()
|
|
1371
|
+
return client is not None
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
if __name__ == "__main__":
|
|
1377
|
+
"""
|
|
1378
|
+
Simple test/demo when run directly
|
|
1379
|
+
"""
|
|
1380
|
+
print("🌐 Standalone Web Tools Module")
|
|
1381
|
+
print("=" * 40)
|
|
1382
|
+
|
|
1383
|
+
# Check if API keys are available
|
|
1384
|
+
web_available = check_web_api_key()
|
|
1385
|
+
tool_gateway_available = _is_tool_gateway_ready()
|
|
1386
|
+
firecrawl_key_available = bool(os.getenv("FIRECRAWL_API_KEY", "").strip())
|
|
1387
|
+
firecrawl_url_available = bool(os.getenv("FIRECRAWL_API_URL", "").strip())
|
|
1388
|
+
nous_available = check_auxiliary_model()
|
|
1389
|
+
default_summarizer_model = _get_default_summarizer_model()
|
|
1390
|
+
|
|
1391
|
+
if web_available:
|
|
1392
|
+
backend = _get_backend()
|
|
1393
|
+
print(f"✅ Web backend: {backend}")
|
|
1394
|
+
if backend == "exa":
|
|
1395
|
+
print(" Using Exa API (https://exa.ai)")
|
|
1396
|
+
elif backend == "parallel":
|
|
1397
|
+
print(" Using Parallel API (https://parallel.ai)")
|
|
1398
|
+
elif backend == "tavily":
|
|
1399
|
+
print(" Using Tavily API (https://tavily.com)")
|
|
1400
|
+
elif backend == "searxng":
|
|
1401
|
+
print(f" Using SearXNG (search only): {os.getenv('SEARXNG_URL', '').strip()}")
|
|
1402
|
+
elif backend == "brave-free":
|
|
1403
|
+
print(" Using Brave Search free tier (search only)")
|
|
1404
|
+
elif backend == "ddgs":
|
|
1405
|
+
print(" Using DuckDuckGo via ddgs package (search only)")
|
|
1406
|
+
elif firecrawl_url_available:
|
|
1407
|
+
print(f" Using self-hosted Firecrawl: {os.getenv('FIRECRAWL_API_URL').strip().rstrip('/')}")
|
|
1408
|
+
elif firecrawl_key_available:
|
|
1409
|
+
print(" Using direct Firecrawl cloud API")
|
|
1410
|
+
elif tool_gateway_available:
|
|
1411
|
+
print(f" Using Firecrawl tool-gateway: {_get_firecrawl_gateway_url()}")
|
|
1412
|
+
else:
|
|
1413
|
+
print(" Firecrawl backend selected but not configured")
|
|
1414
|
+
else:
|
|
1415
|
+
print("❌ No web search backend configured")
|
|
1416
|
+
print(
|
|
1417
|
+
"Set EXA_API_KEY, PARALLEL_API_KEY, TAVILY_API_KEY, FIRECRAWL_API_KEY, FIRECRAWL_API_URL"
|
|
1418
|
+
f"{_firecrawl_backend_help_suffix()}"
|
|
1419
|
+
)
|
|
1420
|
+
|
|
1421
|
+
if not nous_available:
|
|
1422
|
+
print("❌ No auxiliary model available for LLM content processing")
|
|
1423
|
+
print("Set OPENROUTER_API_KEY, configure Nous Portal, or set OPENAI_BASE_URL + OPENAI_API_KEY")
|
|
1424
|
+
print("⚠️ Without an auxiliary model, LLM content processing will be disabled")
|
|
1425
|
+
else:
|
|
1426
|
+
print(f"✅ Auxiliary model available: {default_summarizer_model}")
|
|
1427
|
+
|
|
1428
|
+
if not web_available:
|
|
1429
|
+
sys.exit(1)
|
|
1430
|
+
|
|
1431
|
+
print("🛠️ Web tools ready for use!")
|
|
1432
|
+
|
|
1433
|
+
if nous_available:
|
|
1434
|
+
print(f"🧠 LLM content processing available with {default_summarizer_model}")
|
|
1435
|
+
print(f" Default min length for processing: {DEFAULT_MIN_LENGTH_FOR_SUMMARIZATION} chars")
|
|
1436
|
+
|
|
1437
|
+
# Show debug mode status
|
|
1438
|
+
if _debug.active:
|
|
1439
|
+
print(f"🐛 Debug mode ENABLED - Session ID: {_debug.session_id}")
|
|
1440
|
+
print(f" Debug logs will be saved to: {_debug.log_dir}/web_tools_debug_{_debug.session_id}.json")
|
|
1441
|
+
else:
|
|
1442
|
+
print("🐛 Debug mode disabled (set WEB_TOOLS_DEBUG=true to enable)")
|
|
1443
|
+
|
|
1444
|
+
print("\nBasic usage:")
|
|
1445
|
+
print(" from web_tools import web_search_tool, web_extract_tool, web_crawl_tool")
|
|
1446
|
+
print(" import asyncio")
|
|
1447
|
+
print("")
|
|
1448
|
+
print(" # Search (synchronous)")
|
|
1449
|
+
print(" results = web_search_tool('Python tutorials')")
|
|
1450
|
+
print("")
|
|
1451
|
+
print(" # Extract and crawl (asynchronous)")
|
|
1452
|
+
print(" async def main():")
|
|
1453
|
+
print(" content = await web_extract_tool(['https://example.com'])")
|
|
1454
|
+
print(" crawl_data = await web_crawl_tool('example.com', 'Find docs')")
|
|
1455
|
+
print(" asyncio.run(main())")
|
|
1456
|
+
|
|
1457
|
+
if nous_available:
|
|
1458
|
+
print("\nLLM-enhanced usage:")
|
|
1459
|
+
print(" # Content automatically processed for pages >5000 chars (default)")
|
|
1460
|
+
print(" content = await web_extract_tool(['https://python.org/about/'])")
|
|
1461
|
+
print("")
|
|
1462
|
+
print(" # Customize processing parameters")
|
|
1463
|
+
print(" crawl_data = await web_crawl_tool(")
|
|
1464
|
+
print(" 'docs.python.org',")
|
|
1465
|
+
print(" 'Find key concepts',")
|
|
1466
|
+
print(" model='google/gemini-3-flash-preview',")
|
|
1467
|
+
print(" min_length=3000")
|
|
1468
|
+
print(" )")
|
|
1469
|
+
print("")
|
|
1470
|
+
print(" # Disable LLM processing")
|
|
1471
|
+
print(" raw_content = await web_extract_tool(['https://example.com'], use_llm_processing=False)")
|
|
1472
|
+
|
|
1473
|
+
print("\nDebug mode:")
|
|
1474
|
+
print(" # Enable debug logging")
|
|
1475
|
+
print(" export WEB_TOOLS_DEBUG=true")
|
|
1476
|
+
print(" # Debug logs capture:")
|
|
1477
|
+
print(" # - All tool calls with parameters")
|
|
1478
|
+
print(" # - Original API responses")
|
|
1479
|
+
print(" # - LLM compression metrics")
|
|
1480
|
+
print(" # - Final processed results")
|
|
1481
|
+
print(" # Logs saved to: ./logs/web_tools_debug_UUID.json")
|
|
1482
|
+
|
|
1483
|
+
print("\n📝 Run 'python test_web_tools_llm.py' to test LLM processing capabilities")
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
# ---------------------------------------------------------------------------
|
|
1487
|
+
# Registry
|
|
1488
|
+
# ---------------------------------------------------------------------------
|
|
1489
|
+
from tools.registry import registry, tool_error
|
|
1490
|
+
|
|
1491
|
+
WEB_SEARCH_SCHEMA = {
|
|
1492
|
+
"name": "web_search",
|
|
1493
|
+
"description": "Search the web for information. Returns up to 5 results by default with titles, URLs, and descriptions. The query is passed through to the configured backend, so operators such as site:domain, filetype:pdf, intitle:word, -term, and \"exact phrase\" may work when the backend supports them.",
|
|
1494
|
+
"parameters": {
|
|
1495
|
+
"type": "object",
|
|
1496
|
+
"properties": {
|
|
1497
|
+
"query": {
|
|
1498
|
+
"type": "string",
|
|
1499
|
+
"description": "The search query to look up on the web. You may include backend-supported operators such as site:example.com, filetype:pdf, intitle:word, -term, or \"exact phrase\"."
|
|
1500
|
+
},
|
|
1501
|
+
"limit": {
|
|
1502
|
+
"type": "integer",
|
|
1503
|
+
"description": "Maximum number of results to return. Defaults to 5.",
|
|
1504
|
+
"minimum": 1,
|
|
1505
|
+
"maximum": 100,
|
|
1506
|
+
"default": 5
|
|
1507
|
+
}
|
|
1508
|
+
},
|
|
1509
|
+
"required": ["query"]
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
WEB_EXTRACT_SCHEMA = {
|
|
1514
|
+
"name": "web_extract",
|
|
1515
|
+
"description": "Extract content from web page URLs. Returns page content in markdown format. Also works with PDF URLs (arxiv papers, documents, etc.) — pass the PDF link directly and it converts to markdown text. Pages under 5000 chars return full markdown; larger pages are LLM-summarized and capped at ~5000 chars per page. Pages over 2M chars are refused. If a URL fails or times out, use the browser tool to access it instead.",
|
|
1516
|
+
"parameters": {
|
|
1517
|
+
"type": "object",
|
|
1518
|
+
"properties": {
|
|
1519
|
+
"urls": {
|
|
1520
|
+
"type": "array",
|
|
1521
|
+
"items": {"type": "string"},
|
|
1522
|
+
"description": "List of URLs to extract content from (max 5 URLs per call)",
|
|
1523
|
+
"maxItems": 5
|
|
1524
|
+
}
|
|
1525
|
+
},
|
|
1526
|
+
"required": ["urls"]
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
registry.register(
|
|
1531
|
+
name="web_search",
|
|
1532
|
+
toolset="web",
|
|
1533
|
+
schema=WEB_SEARCH_SCHEMA,
|
|
1534
|
+
handler=lambda args, **kw: web_search_tool(args.get("query", ""), limit=args.get("limit", 5)),
|
|
1535
|
+
check_fn=check_web_api_key,
|
|
1536
|
+
requires_env=_web_requires_env(),
|
|
1537
|
+
emoji="🔍",
|
|
1538
|
+
max_result_size_chars=100_000,
|
|
1539
|
+
)
|
|
1540
|
+
registry.register(
|
|
1541
|
+
name="web_extract",
|
|
1542
|
+
toolset="web",
|
|
1543
|
+
schema=WEB_EXTRACT_SCHEMA,
|
|
1544
|
+
handler=lambda args, **kw: web_extract_tool(
|
|
1545
|
+
args.get("urls", [])[:5] if isinstance(args.get("urls"), list) else [], "markdown"),
|
|
1546
|
+
check_fn=check_web_api_key,
|
|
1547
|
+
requires_env=_web_requires_env(),
|
|
1548
|
+
is_async=True,
|
|
1549
|
+
emoji="📄",
|
|
1550
|
+
max_result_size_chars=100_000,
|
|
1551
|
+
)
|