pm-copilot-engine 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cron/__init__.py +42 -0
- cron/blueprint_catalog.py +713 -0
- cron/jobs.py +1212 -0
- cron/scheduler.py +2213 -0
- cron/scripts/__init__.py +1 -0
- cron/scripts/classify_items.py +226 -0
- cron/suggestion_catalog.py +154 -0
- cron/suggestions.py +257 -0
- plugins/__init__.py +1 -0
- plugins/browser/browser_use/__init__.py +14 -0
- plugins/browser/browser_use/plugin.yaml +7 -0
- plugins/browser/browser_use/provider.py +317 -0
- plugins/browser/browserbase/__init__.py +15 -0
- plugins/browser/browserbase/plugin.yaml +7 -0
- plugins/browser/browserbase/provider.py +297 -0
- plugins/browser/firecrawl/__init__.py +16 -0
- plugins/browser/firecrawl/plugin.yaml +7 -0
- plugins/browser/firecrawl/provider.py +171 -0
- plugins/context_engine/__init__.py +285 -0
- plugins/dashboard_auth/basic/__init__.py +491 -0
- plugins/dashboard_auth/basic/plugin.yaml +7 -0
- plugins/dashboard_auth/nous/__init__.py +667 -0
- plugins/dashboard_auth/nous/plugin.yaml +7 -0
- plugins/dashboard_auth/self_hosted/__init__.py +736 -0
- plugins/dashboard_auth/self_hosted/plugin.yaml +8 -0
- plugins/disk-cleanup/README.md +51 -0
- plugins/disk-cleanup/__init__.py +316 -0
- plugins/disk-cleanup/disk_cleanup.py +560 -0
- plugins/disk-cleanup/plugin.yaml +7 -0
- plugins/google_meet/README.md +131 -0
- plugins/google_meet/SKILL.md +148 -0
- plugins/google_meet/__init__.py +103 -0
- plugins/google_meet/audio_bridge.py +248 -0
- plugins/google_meet/cli.py +477 -0
- plugins/google_meet/meet_bot.py +858 -0
- plugins/google_meet/node/__init__.py +54 -0
- plugins/google_meet/node/cli.py +125 -0
- plugins/google_meet/node/client.py +107 -0
- plugins/google_meet/node/protocol.py +124 -0
- plugins/google_meet/node/registry.py +112 -0
- plugins/google_meet/node/server.py +200 -0
- plugins/google_meet/plugin.yaml +16 -0
- plugins/google_meet/process_manager.py +323 -0
- plugins/google_meet/realtime/__init__.py +10 -0
- plugins/google_meet/realtime/openai_client.py +332 -0
- plugins/google_meet/tools.py +348 -0
- plugins/hermes-achievements/README.md +150 -0
- plugins/hermes-achievements/dashboard/manifest.json +11 -0
- plugins/hermes-achievements/dashboard/plugin_api.py +1061 -0
- plugins/hermes-achievements/docs/achievements-performance-implementation-plan.md +157 -0
- plugins/hermes-achievements/docs/achievements-performance-implementation-spec.md +219 -0
- plugins/hermes-achievements/docs/achievements-performance-spec.md +174 -0
- plugins/hermes-achievements/tests/test_achievement_engine.py +156 -0
- plugins/image_gen/fal/__init__.py +182 -0
- plugins/image_gen/fal/plugin.yaml +7 -0
- plugins/image_gen/krea/__init__.py +548 -0
- plugins/image_gen/krea/plugin.yaml +7 -0
- plugins/image_gen/openai/__init__.py +316 -0
- plugins/image_gen/openai/plugin.yaml +7 -0
- plugins/image_gen/openai-codex/__init__.py +442 -0
- plugins/image_gen/openai-codex/plugin.yaml +5 -0
- plugins/image_gen/xai/__init__.py +334 -0
- plugins/image_gen/xai/plugin.yaml +7 -0
- plugins/kanban/dashboard/manifest.json +14 -0
- plugins/kanban/dashboard/plugin_api.py +2454 -0
- plugins/memory/__init__.py +450 -0
- plugins/memory/byterover/README.md +41 -0
- plugins/memory/byterover/__init__.py +384 -0
- plugins/memory/byterover/plugin.yaml +9 -0
- plugins/memory/hindsight/README.md +147 -0
- plugins/memory/hindsight/__init__.py +1803 -0
- plugins/memory/hindsight/plugin.yaml +8 -0
- plugins/memory/holographic/README.md +36 -0
- plugins/memory/holographic/__init__.py +408 -0
- plugins/memory/holographic/holographic.py +203 -0
- plugins/memory/holographic/plugin.yaml +5 -0
- plugins/memory/holographic/retrieval.py +593 -0
- plugins/memory/holographic/store.py +578 -0
- plugins/memory/honcho/README.md +368 -0
- plugins/memory/honcho/__init__.py +1419 -0
- plugins/memory/honcho/cli.py +1698 -0
- plugins/memory/honcho/client.py +882 -0
- plugins/memory/honcho/plugin.yaml +7 -0
- plugins/memory/honcho/session.py +1341 -0
- plugins/memory/mem0/README.md +38 -0
- plugins/memory/mem0/__init__.py +374 -0
- plugins/memory/mem0/plugin.yaml +5 -0
- plugins/memory/openviking/README.md +40 -0
- plugins/memory/openviking/__init__.py +978 -0
- plugins/memory/openviking/plugin.yaml +9 -0
- plugins/memory/retaindb/README.md +40 -0
- plugins/memory/retaindb/__init__.py +766 -0
- plugins/memory/retaindb/plugin.yaml +7 -0
- plugins/memory/supermemory/README.md +111 -0
- plugins/memory/supermemory/__init__.py +897 -0
- plugins/memory/supermemory/plugin.yaml +5 -0
- plugins/model-providers/README.md +70 -0
- plugins/model-providers/alibaba/__init__.py +13 -0
- plugins/model-providers/alibaba/plugin.yaml +5 -0
- plugins/model-providers/alibaba-coding-plan/__init__.py +21 -0
- plugins/model-providers/alibaba-coding-plan/plugin.yaml +5 -0
- plugins/model-providers/anthropic/__init__.py +52 -0
- plugins/model-providers/anthropic/plugin.yaml +5 -0
- plugins/model-providers/arcee/__init__.py +13 -0
- plugins/model-providers/arcee/plugin.yaml +5 -0
- plugins/model-providers/azure-foundry/__init__.py +21 -0
- plugins/model-providers/azure-foundry/plugin.yaml +5 -0
- plugins/model-providers/bedrock/__init__.py +29 -0
- plugins/model-providers/bedrock/plugin.yaml +5 -0
- plugins/model-providers/copilot/__init__.py +58 -0
- plugins/model-providers/copilot/plugin.yaml +5 -0
- plugins/model-providers/copilot-acp/__init__.py +34 -0
- plugins/model-providers/copilot-acp/plugin.yaml +5 -0
- plugins/model-providers/custom/__init__.py +73 -0
- plugins/model-providers/custom/plugin.yaml +5 -0
- plugins/model-providers/deepseek/__init__.py +100 -0
- plugins/model-providers/deepseek/plugin.yaml +5 -0
- plugins/model-providers/gemini/__init__.py +72 -0
- plugins/model-providers/gemini/plugin.yaml +5 -0
- plugins/model-providers/gmi/__init__.py +31 -0
- plugins/model-providers/gmi/plugin.yaml +5 -0
- plugins/model-providers/huggingface/__init__.py +20 -0
- plugins/model-providers/huggingface/plugin.yaml +5 -0
- plugins/model-providers/kilocode/__init__.py +14 -0
- plugins/model-providers/kilocode/plugin.yaml +5 -0
- plugins/model-providers/kimi-coding/__init__.py +80 -0
- plugins/model-providers/kimi-coding/plugin.yaml +5 -0
- plugins/model-providers/minimax/__init__.py +45 -0
- plugins/model-providers/minimax/plugin.yaml +5 -0
- plugins/model-providers/nous/__init__.py +54 -0
- plugins/model-providers/nous/plugin.yaml +5 -0
- plugins/model-providers/novita/__init__.py +27 -0
- plugins/model-providers/novita/plugin.yaml +5 -0
- plugins/model-providers/nvidia/__init__.py +21 -0
- plugins/model-providers/nvidia/plugin.yaml +5 -0
- plugins/model-providers/ollama-cloud/__init__.py +14 -0
- plugins/model-providers/ollama-cloud/plugin.yaml +5 -0
- plugins/model-providers/openai-codex/__init__.py +15 -0
- plugins/model-providers/openai-codex/plugin.yaml +5 -0
- plugins/model-providers/opencode-zen/__init__.py +126 -0
- plugins/model-providers/opencode-zen/plugin.yaml +5 -0
- plugins/model-providers/openrouter/__init__.py +187 -0
- plugins/model-providers/openrouter/plugin.yaml +5 -0
- plugins/model-providers/qwen-oauth/__init__.py +82 -0
- plugins/model-providers/qwen-oauth/plugin.yaml +5 -0
- plugins/model-providers/stepfun/__init__.py +14 -0
- plugins/model-providers/stepfun/plugin.yaml +5 -0
- plugins/model-providers/xai/__init__.py +15 -0
- plugins/model-providers/xai/plugin.yaml +5 -0
- plugins/model-providers/xiaomi/__init__.py +16 -0
- plugins/model-providers/xiaomi/plugin.yaml +5 -0
- plugins/model-providers/zai/__init__.py +21 -0
- plugins/model-providers/zai/plugin.yaml +5 -0
- plugins/observability/langfuse/README.md +53 -0
- plugins/observability/langfuse/__init__.py +1035 -0
- plugins/observability/langfuse/plugin.yaml +14 -0
- plugins/observability/nemo_relay/README.md +559 -0
- plugins/observability/nemo_relay/__init__.py +962 -0
- plugins/observability/nemo_relay/plugin.yaml +20 -0
- plugins/platforms/discord/__init__.py +3 -0
- plugins/platforms/discord/adapter.py +6764 -0
- plugins/platforms/discord/plugin.yaml +34 -0
- plugins/platforms/discord/voice_mixer.py +379 -0
- plugins/platforms/google_chat/__init__.py +3 -0
- plugins/platforms/google_chat/adapter.py +3348 -0
- plugins/platforms/google_chat/oauth.py +667 -0
- plugins/platforms/google_chat/plugin.yaml +39 -0
- plugins/platforms/homeassistant/__init__.py +3 -0
- plugins/platforms/homeassistant/adapter.py +577 -0
- plugins/platforms/homeassistant/plugin.yaml +22 -0
- plugins/platforms/irc/__init__.py +3 -0
- plugins/platforms/irc/adapter.py +971 -0
- plugins/platforms/irc/plugin.yaml +54 -0
- plugins/platforms/line/__init__.py +3 -0
- plugins/platforms/line/adapter.py +1652 -0
- plugins/platforms/line/plugin.yaml +65 -0
- plugins/platforms/mattermost/__init__.py +3 -0
- plugins/platforms/mattermost/adapter.py +1192 -0
- plugins/platforms/mattermost/plugin.yaml +49 -0
- plugins/platforms/ntfy/__init__.py +3 -0
- plugins/platforms/ntfy/adapter.py +593 -0
- plugins/platforms/ntfy/plugin.yaml +56 -0
- plugins/platforms/photon/README.md +174 -0
- plugins/platforms/photon/__init__.py +4 -0
- plugins/platforms/photon/adapter.py +1529 -0
- plugins/platforms/photon/auth.py +1065 -0
- plugins/platforms/photon/cli.py +441 -0
- plugins/platforms/photon/plugin.yaml +88 -0
- plugins/platforms/photon/sidecar/README.md +52 -0
- plugins/platforms/photon/sidecar/package-lock.json +1729 -0
- plugins/platforms/photon/sidecar/package.json +24 -0
- plugins/platforms/simplex/__init__.py +3 -0
- plugins/platforms/simplex/adapter.py +1313 -0
- plugins/platforms/simplex/plugin.yaml +56 -0
- plugins/platforms/teams/__init__.py +3 -0
- plugins/platforms/teams/adapter.py +1297 -0
- plugins/platforms/teams/plugin.yaml +48 -0
- plugins/plugin_utils.py +135 -0
- plugins/security-guidance/README.md +88 -0
- plugins/security-guidance/__init__.py +259 -0
- plugins/security-guidance/patterns.py +368 -0
- plugins/security-guidance/plugin.yaml +7 -0
- plugins/spotify/__init__.py +66 -0
- plugins/spotify/client.py +435 -0
- plugins/spotify/plugin.yaml +13 -0
- plugins/spotify/tools.py +454 -0
- plugins/teams_pipeline/__init__.py +23 -0
- plugins/teams_pipeline/cli.py +461 -0
- plugins/teams_pipeline/meetings.py +333 -0
- plugins/teams_pipeline/models.py +350 -0
- plugins/teams_pipeline/pipeline.py +689 -0
- plugins/teams_pipeline/plugin.yaml +9 -0
- plugins/teams_pipeline/runtime.py +135 -0
- plugins/teams_pipeline/store.py +193 -0
- plugins/teams_pipeline/subscriptions.py +249 -0
- plugins/video_gen/fal/__init__.py +620 -0
- plugins/video_gen/fal/plugin.yaml +7 -0
- plugins/video_gen/xai/__init__.py +504 -0
- plugins/video_gen/xai/plugin.yaml +7 -0
- plugins/web/__init__.py +7 -0
- plugins/web/brave_free/__init__.py +14 -0
- plugins/web/brave_free/plugin.yaml +7 -0
- plugins/web/brave_free/provider.py +137 -0
- plugins/web/ddgs/__init__.py +15 -0
- plugins/web/ddgs/plugin.yaml +7 -0
- plugins/web/ddgs/provider.py +104 -0
- plugins/web/exa/__init__.py +15 -0
- plugins/web/exa/plugin.yaml +7 -0
- plugins/web/exa/provider.py +212 -0
- plugins/web/firecrawl/__init__.py +28 -0
- plugins/web/firecrawl/plugin.yaml +7 -0
- plugins/web/firecrawl/provider.py +594 -0
- plugins/web/parallel/__init__.py +16 -0
- plugins/web/parallel/plugin.yaml +7 -0
- plugins/web/parallel/provider.py +696 -0
- plugins/web/searxng/__init__.py +15 -0
- plugins/web/searxng/plugin.yaml +7 -0
- plugins/web/searxng/provider.py +153 -0
- plugins/web/tavily/__init__.py +10 -0
- plugins/web/tavily/plugin.yaml +7 -0
- plugins/web/tavily/provider.py +220 -0
- plugins/web/xai/__init__.py +14 -0
- plugins/web/xai/plugin.yaml +7 -0
- plugins/web/xai/provider.py +557 -0
- pm_copilot_engine/__init__.py +11 -0
- pm_copilot_engine/_internal/__init__.py +6 -0
- pm_copilot_engine/_internal/hermes_cli/__init__.py +92 -0
- pm_copilot_engine/_internal/hermes_cli/_parser.py +411 -0
- pm_copilot_engine/_internal/hermes_cli/_subprocess_compat.py +234 -0
- pm_copilot_engine/_internal/hermes_cli/active_sessions.py +320 -0
- pm_copilot_engine/_internal/hermes_cli/auth.py +7926 -0
- pm_copilot_engine/_internal/hermes_cli/auth_commands.py +802 -0
- pm_copilot_engine/_internal/hermes_cli/azure_detect.py +406 -0
- pm_copilot_engine/_internal/hermes_cli/backup.py +1064 -0
- pm_copilot_engine/_internal/hermes_cli/banner.py +835 -0
- pm_copilot_engine/_internal/hermes_cli/blueprint_cmd.py +318 -0
- pm_copilot_engine/_internal/hermes_cli/browser_connect.py +217 -0
- pm_copilot_engine/_internal/hermes_cli/build_info.py +51 -0
- pm_copilot_engine/_internal/hermes_cli/bundles.py +229 -0
- pm_copilot_engine/_internal/hermes_cli/callbacks.py +242 -0
- pm_copilot_engine/_internal/hermes_cli/checkpoints.py +244 -0
- pm_copilot_engine/_internal/hermes_cli/claw.py +809 -0
- pm_copilot_engine/_internal/hermes_cli/cli_agent_setup_mixin.py +681 -0
- pm_copilot_engine/_internal/hermes_cli/cli_commands_mixin.py +2263 -0
- pm_copilot_engine/_internal/hermes_cli/cli_output.py +77 -0
- pm_copilot_engine/_internal/hermes_cli/clipboard.py +494 -0
- pm_copilot_engine/_internal/hermes_cli/codex_models.py +206 -0
- pm_copilot_engine/_internal/hermes_cli/codex_runtime_plugin_migration.py +757 -0
- pm_copilot_engine/_internal/hermes_cli/codex_runtime_switch.py +266 -0
- pm_copilot_engine/_internal/hermes_cli/colors.py +38 -0
- pm_copilot_engine/_internal/hermes_cli/commands.py +1933 -0
- pm_copilot_engine/_internal/hermes_cli/completion.py +319 -0
- pm_copilot_engine/_internal/hermes_cli/config.py +6530 -0
- pm_copilot_engine/_internal/hermes_cli/container_boot.py +395 -0
- pm_copilot_engine/_internal/hermes_cli/copilot_auth.py +392 -0
- pm_copilot_engine/_internal/hermes_cli/cron.py +357 -0
- pm_copilot_engine/_internal/hermes_cli/curator.py +598 -0
- pm_copilot_engine/_internal/hermes_cli/curses_ui.py +872 -0
- pm_copilot_engine/_internal/hermes_cli/dashboard_auth/__init__.py +42 -0
- pm_copilot_engine/_internal/hermes_cli/dashboard_auth/audit.py +87 -0
- pm_copilot_engine/_internal/hermes_cli/dashboard_auth/base.py +220 -0
- pm_copilot_engine/_internal/hermes_cli/dashboard_auth/cookies.py +247 -0
- pm_copilot_engine/_internal/hermes_cli/dashboard_auth/login_page.py +534 -0
- pm_copilot_engine/_internal/hermes_cli/dashboard_auth/middleware.py +368 -0
- pm_copilot_engine/_internal/hermes_cli/dashboard_auth/prefix.py +201 -0
- pm_copilot_engine/_internal/hermes_cli/dashboard_auth/public_paths.py +49 -0
- pm_copilot_engine/_internal/hermes_cli/dashboard_auth/registry.py +58 -0
- pm_copilot_engine/_internal/hermes_cli/dashboard_auth/routes.py +621 -0
- pm_copilot_engine/_internal/hermes_cli/dashboard_auth/ws_tickets.py +161 -0
- pm_copilot_engine/_internal/hermes_cli/dashboard_register.py +427 -0
- pm_copilot_engine/_internal/hermes_cli/debug.py +829 -0
- pm_copilot_engine/_internal/hermes_cli/default_soul.py +11 -0
- pm_copilot_engine/_internal/hermes_cli/dep_ensure.py +159 -0
- pm_copilot_engine/_internal/hermes_cli/dingtalk_auth.py +293 -0
- pm_copilot_engine/_internal/hermes_cli/doctor.py +2269 -0
- pm_copilot_engine/_internal/hermes_cli/dump.py +360 -0
- pm_copilot_engine/_internal/hermes_cli/env_loader.py +344 -0
- pm_copilot_engine/_internal/hermes_cli/fallback_cmd.py +354 -0
- pm_copilot_engine/_internal/hermes_cli/fallback_config.py +72 -0
- pm_copilot_engine/_internal/hermes_cli/gateway.py +6915 -0
- pm_copilot_engine/_internal/hermes_cli/gateway_windows.py +1311 -0
- pm_copilot_engine/_internal/hermes_cli/goals.py +912 -0
- pm_copilot_engine/_internal/hermes_cli/gui_uninstall.py +285 -0
- pm_copilot_engine/_internal/hermes_cli/hooks.py +385 -0
- pm_copilot_engine/_internal/hermes_cli/inventory.py +387 -0
- pm_copilot_engine/_internal/hermes_cli/kanban.py +2830 -0
- pm_copilot_engine/_internal/hermes_cli/kanban_db.py +7750 -0
- pm_copilot_engine/_internal/hermes_cli/kanban_decompose.py +477 -0
- pm_copilot_engine/_internal/hermes_cli/kanban_diagnostics.py +1107 -0
- pm_copilot_engine/_internal/hermes_cli/kanban_specify.py +273 -0
- pm_copilot_engine/_internal/hermes_cli/kanban_swarm.py +279 -0
- pm_copilot_engine/_internal/hermes_cli/logs.py +394 -0
- pm_copilot_engine/_internal/hermes_cli/main.py +12419 -0
- pm_copilot_engine/_internal/hermes_cli/managed_uv.py +254 -0
- pm_copilot_engine/_internal/hermes_cli/mcp_catalog.py +775 -0
- pm_copilot_engine/_internal/hermes_cli/mcp_config.py +892 -0
- pm_copilot_engine/_internal/hermes_cli/mcp_picker.py +322 -0
- pm_copilot_engine/_internal/hermes_cli/mcp_startup.py +59 -0
- pm_copilot_engine/_internal/hermes_cli/memory_setup.py +472 -0
- pm_copilot_engine/_internal/hermes_cli/middleware.py +313 -0
- pm_copilot_engine/_internal/hermes_cli/migrate.py +115 -0
- pm_copilot_engine/_internal/hermes_cli/model_catalog.py +394 -0
- pm_copilot_engine/_internal/hermes_cli/model_cost_guard.py +134 -0
- pm_copilot_engine/_internal/hermes_cli/model_normalize.py +473 -0
- pm_copilot_engine/_internal/hermes_cli/model_setup_flows.py +2736 -0
- pm_copilot_engine/_internal/hermes_cli/model_switch.py +2086 -0
- pm_copilot_engine/_internal/hermes_cli/models.py +3992 -0
- pm_copilot_engine/_internal/hermes_cli/nous_account.py +789 -0
- pm_copilot_engine/_internal/hermes_cli/nous_subscription.py +1279 -0
- pm_copilot_engine/_internal/hermes_cli/oneshot.py +381 -0
- pm_copilot_engine/_internal/hermes_cli/pairing.py +115 -0
- pm_copilot_engine/_internal/hermes_cli/partial_compress.py +235 -0
- pm_copilot_engine/_internal/hermes_cli/platforms.py +84 -0
- pm_copilot_engine/_internal/hermes_cli/plugins.py +2046 -0
- pm_copilot_engine/_internal/hermes_cli/plugins_cmd.py +1835 -0
- pm_copilot_engine/_internal/hermes_cli/portal_cli.py +245 -0
- pm_copilot_engine/_internal/hermes_cli/profile_describer.py +298 -0
- pm_copilot_engine/_internal/hermes_cli/profile_distribution.py +726 -0
- pm_copilot_engine/_internal/hermes_cli/profiles.py +1776 -0
- pm_copilot_engine/_internal/hermes_cli/prompt_size.py +153 -0
- pm_copilot_engine/_internal/hermes_cli/providers.py +734 -0
- pm_copilot_engine/_internal/hermes_cli/proxy/__init__.py +20 -0
- pm_copilot_engine/_internal/hermes_cli/proxy/adapters/__init__.py +37 -0
- pm_copilot_engine/_internal/hermes_cli/proxy/adapters/base.py +108 -0
- pm_copilot_engine/_internal/hermes_cli/proxy/adapters/nous_portal.py +189 -0
- pm_copilot_engine/_internal/hermes_cli/proxy/adapters/xai.py +145 -0
- pm_copilot_engine/_internal/hermes_cli/proxy/cli.py +142 -0
- pm_copilot_engine/_internal/hermes_cli/proxy/server.py +296 -0
- pm_copilot_engine/_internal/hermes_cli/psutil_android.py +108 -0
- pm_copilot_engine/_internal/hermes_cli/pt_input_extras.py +120 -0
- pm_copilot_engine/_internal/hermes_cli/pty_bridge.py +286 -0
- pm_copilot_engine/_internal/hermes_cli/relaunch.py +205 -0
- pm_copilot_engine/_internal/hermes_cli/runtime_provider.py +1775 -0
- pm_copilot_engine/_internal/hermes_cli/secret_prompt.py +126 -0
- pm_copilot_engine/_internal/hermes_cli/secrets_cli.py +600 -0
- pm_copilot_engine/_internal/hermes_cli/security_advisories.py +453 -0
- pm_copilot_engine/_internal/hermes_cli/security_audit.py +576 -0
- pm_copilot_engine/_internal/hermes_cli/send_cmd.py +463 -0
- pm_copilot_engine/_internal/hermes_cli/service_manager.py +981 -0
- pm_copilot_engine/_internal/hermes_cli/session_recap.py +316 -0
- pm_copilot_engine/_internal/hermes_cli/setup.py +3361 -0
- pm_copilot_engine/_internal/hermes_cli/setup_whatsapp_cloud.py +541 -0
- pm_copilot_engine/_internal/hermes_cli/skills_config.py +177 -0
- pm_copilot_engine/_internal/hermes_cli/skills_hub.py +1891 -0
- pm_copilot_engine/_internal/hermes_cli/skin_engine.py +926 -0
- pm_copilot_engine/_internal/hermes_cli/slack_cli.py +159 -0
- pm_copilot_engine/_internal/hermes_cli/status.py +586 -0
- pm_copilot_engine/_internal/hermes_cli/stdio.py +251 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/__init__.py +18 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/_shared.py +29 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/acp.py +52 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/auth.py +109 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/backup.py +38 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/claw.py +92 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/config.py +49 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/cron.py +163 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/dashboard.py +143 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/debug.py +77 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/doctor.py +35 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/dump.py +28 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/gateway.py +274 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/gui.py +63 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/hooks.py +77 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/import_cmd.py +31 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/insights.py +25 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/login.py +58 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/logout.py +28 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/logs.py +78 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/mcp.py +108 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/memory.py +53 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/model.py +72 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/pairing.py +36 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/plugins.py +94 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/postinstall.py +23 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/profile.py +203 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/prompt_size.py +36 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/security.py +62 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/setup.py +58 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/skills.py +269 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/slack.py +60 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/status.py +28 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/tools.py +95 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/uninstall.py +41 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/update.py +70 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/version.py +18 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/webhook.py +76 -0
- pm_copilot_engine/_internal/hermes_cli/subcommands/whatsapp.py +22 -0
- pm_copilot_engine/_internal/hermes_cli/suggestions_cmd.py +153 -0
- pm_copilot_engine/_internal/hermes_cli/telegram_managed_bot.py +358 -0
- pm_copilot_engine/_internal/hermes_cli/timeouts.py +82 -0
- pm_copilot_engine/_internal/hermes_cli/tips.py +486 -0
- pm_copilot_engine/_internal/hermes_cli/tools_config.py +3926 -0
- pm_copilot_engine/_internal/hermes_cli/uninstall.py +930 -0
- pm_copilot_engine/_internal/hermes_cli/voice.py +846 -0
- pm_copilot_engine/_internal/hermes_cli/web_server.py +11859 -0
- pm_copilot_engine/_internal/hermes_cli/webhook.py +298 -0
- pm_copilot_engine/_internal/hermes_cli/win_pty_bridge.py +179 -0
- pm_copilot_engine/_internal/hermes_cli/write_approval_commands.py +209 -0
- pm_copilot_engine/_internal/hermes_cli/xai_retirement.py +253 -0
- pm_copilot_engine/agent/__init__.py +8 -0
- pm_copilot_engine/agent/account_usage.py +638 -0
- pm_copilot_engine/agent/agent_init.py +1713 -0
- pm_copilot_engine/agent/agent_runtime_helpers.py +2595 -0
- pm_copilot_engine/agent/anthropic_adapter.py +2513 -0
- pm_copilot_engine/agent/async_utils.py +68 -0
- pm_copilot_engine/agent/auxiliary_client.py +5949 -0
- pm_copilot_engine/agent/azure_identity_adapter.py +555 -0
- pm_copilot_engine/agent/background_review.py +608 -0
- pm_copilot_engine/agent/bedrock_adapter.py +1325 -0
- pm_copilot_engine/agent/browser_provider.py +175 -0
- pm_copilot_engine/agent/browser_registry.py +192 -0
- pm_copilot_engine/agent/chat_completion_helpers.py +2682 -0
- pm_copilot_engine/agent/codex_responses_adapter.py +1271 -0
- pm_copilot_engine/agent/codex_runtime.py +686 -0
- pm_copilot_engine/agent/coding_context.py +738 -0
- pm_copilot_engine/agent/context_compressor.py +2426 -0
- pm_copilot_engine/agent/context_engine.py +226 -0
- pm_copilot_engine/agent/context_references.py +551 -0
- pm_copilot_engine/agent/conversation_compression.py +802 -0
- pm_copilot_engine/agent/conversation_loop.py +4255 -0
- pm_copilot_engine/agent/copilot_acp_client.py +686 -0
- pm_copilot_engine/agent/credential_persistence.py +174 -0
- pm_copilot_engine/agent/credential_pool.py +2184 -0
- pm_copilot_engine/agent/credential_sources.py +448 -0
- pm_copilot_engine/agent/credits_tracker.py +794 -0
- pm_copilot_engine/agent/curator.py +1835 -0
- pm_copilot_engine/agent/curator_backup.py +695 -0
- pm_copilot_engine/agent/display.py +1049 -0
- pm_copilot_engine/agent/error_classifier.py +1365 -0
- pm_copilot_engine/agent/file_safety.py +640 -0
- pm_copilot_engine/agent/gemini_cloudcode_adapter.py +909 -0
- pm_copilot_engine/agent/gemini_native_adapter.py +1001 -0
- pm_copilot_engine/agent/gemini_schema.py +99 -0
- pm_copilot_engine/agent/google_code_assist.py +451 -0
- pm_copilot_engine/agent/google_oauth.py +1067 -0
- pm_copilot_engine/agent/i18n.py +302 -0
- pm_copilot_engine/agent/image_gen_provider.py +324 -0
- pm_copilot_engine/agent/image_gen_registry.py +145 -0
- pm_copilot_engine/agent/image_routing.py +540 -0
- pm_copilot_engine/agent/insights.py +921 -0
- pm_copilot_engine/agent/iteration_budget.py +62 -0
- pm_copilot_engine/agent/jiter_preload.py +39 -0
- pm_copilot_engine/agent/lmstudio_reasoning.py +48 -0
- pm_copilot_engine/agent/lsp/__init__.py +106 -0
- pm_copilot_engine/agent/lsp/cli.py +299 -0
- pm_copilot_engine/agent/lsp/client.py +943 -0
- pm_copilot_engine/agent/lsp/eventlog.py +213 -0
- pm_copilot_engine/agent/lsp/install.py +403 -0
- pm_copilot_engine/agent/lsp/manager.py +639 -0
- pm_copilot_engine/agent/lsp/protocol.py +196 -0
- pm_copilot_engine/agent/lsp/range_shift.py +149 -0
- pm_copilot_engine/agent/lsp/reporter.py +78 -0
- pm_copilot_engine/agent/lsp/servers.py +1040 -0
- pm_copilot_engine/agent/lsp/workspace.py +223 -0
- pm_copilot_engine/agent/manual_compression_feedback.py +49 -0
- pm_copilot_engine/agent/markdown_tables.py +309 -0
- pm_copilot_engine/agent/memory_manager.py +917 -0
- pm_copilot_engine/agent/memory_provider.py +296 -0
- pm_copilot_engine/agent/message_sanitization.py +444 -0
- pm_copilot_engine/agent/model_metadata.py +2006 -0
- pm_copilot_engine/agent/models_dev.py +725 -0
- pm_copilot_engine/agent/moonshot_schema.py +238 -0
- pm_copilot_engine/agent/nous_rate_guard.py +325 -0
- pm_copilot_engine/agent/onboarding.py +253 -0
- pm_copilot_engine/agent/plugin_llm.py +1046 -0
- pm_copilot_engine/agent/portal_tags.py +64 -0
- pm_copilot_engine/agent/process_bootstrap.py +167 -0
- pm_copilot_engine/agent/prompt_builder.py +1630 -0
- pm_copilot_engine/agent/prompt_caching.py +79 -0
- pm_copilot_engine/agent/rate_limit_tracker.py +246 -0
- pm_copilot_engine/agent/redact.py +496 -0
- pm_copilot_engine/agent/retry_utils.py +57 -0
- pm_copilot_engine/agent/runtime_cwd.py +62 -0
- pm_copilot_engine/agent/secret_sources/__init__.py +13 -0
- pm_copilot_engine/agent/secret_sources/bitwarden.py +692 -0
- pm_copilot_engine/agent/shell_hooks.py +847 -0
- pm_copilot_engine/agent/skill_bundles.py +410 -0
- pm_copilot_engine/agent/skill_commands.py +527 -0
- pm_copilot_engine/agent/skill_preprocessing.py +140 -0
- pm_copilot_engine/agent/skill_utils.py +666 -0
- pm_copilot_engine/agent/stream_diag.py +280 -0
- pm_copilot_engine/agent/subdirectory_hints.py +270 -0
- pm_copilot_engine/agent/system_prompt.py +446 -0
- pm_copilot_engine/agent/think_scrubber.py +386 -0
- pm_copilot_engine/agent/title_generator.py +171 -0
- pm_copilot_engine/agent/tool_dispatch_helpers.py +417 -0
- pm_copilot_engine/agent/tool_executor.py +1428 -0
- pm_copilot_engine/agent/tool_guardrails.py +475 -0
- pm_copilot_engine/agent/tool_result_classification.py +26 -0
- pm_copilot_engine/agent/trajectory.py +56 -0
- pm_copilot_engine/agent/transcription_provider.py +193 -0
- pm_copilot_engine/agent/transcription_registry.py +122 -0
- pm_copilot_engine/agent/transports/__init__.py +68 -0
- pm_copilot_engine/agent/transports/anthropic.py +232 -0
- pm_copilot_engine/agent/transports/base.py +89 -0
- pm_copilot_engine/agent/transports/bedrock.py +154 -0
- pm_copilot_engine/agent/transports/chat_completions.py +704 -0
- pm_copilot_engine/agent/transports/codex.py +347 -0
- pm_copilot_engine/agent/transports/codex_app_server.py +400 -0
- pm_copilot_engine/agent/transports/codex_app_server_session.py +876 -0
- pm_copilot_engine/agent/transports/codex_event_projector.py +312 -0
- pm_copilot_engine/agent/transports/hermes_tools_mcp_server.py +233 -0
- pm_copilot_engine/agent/transports/types.py +174 -0
- pm_copilot_engine/agent/tts_provider.py +274 -0
- pm_copilot_engine/agent/tts_registry.py +133 -0
- pm_copilot_engine/agent/turn_context.py +388 -0
- pm_copilot_engine/agent/turn_finalizer.py +427 -0
- pm_copilot_engine/agent/turn_retry_state.py +68 -0
- pm_copilot_engine/agent/usage_pricing.py +908 -0
- pm_copilot_engine/agent/video_gen_provider.py +299 -0
- pm_copilot_engine/agent/video_gen_registry.py +117 -0
- pm_copilot_engine/agent/web_search_provider.py +185 -0
- pm_copilot_engine/agent/web_search_registry.py +245 -0
- pm_copilot_engine/batch_runner.py +1321 -0
- pm_copilot_engine/hermes_bootstrap.py +129 -0
- pm_copilot_engine/hermes_constants.py +471 -0
- pm_copilot_engine/hermes_logging.py +536 -0
- pm_copilot_engine/hermes_state.py +4777 -0
- pm_copilot_engine/hermes_time.py +117 -0
- pm_copilot_engine/mcp_serve.py +897 -0
- pm_copilot_engine/model_tools.py +1229 -0
- pm_copilot_engine/providers/__init__.py +191 -0
- pm_copilot_engine/providers/base.py +214 -0
- pm_copilot_engine/run_agent.py +5424 -0
- pm_copilot_engine/tools/__init__.py +25 -0
- pm_copilot_engine/tools/ansi_strip.py +44 -0
- pm_copilot_engine/tools/approval.py +1812 -0
- pm_copilot_engine/tools/binary_extensions.py +42 -0
- pm_copilot_engine/tools/blueprints.py +325 -0
- pm_copilot_engine/tools/browser_camofox.py +794 -0
- pm_copilot_engine/tools/browser_camofox_state.py +47 -0
- pm_copilot_engine/tools/browser_cdp_tool.py +569 -0
- pm_copilot_engine/tools/browser_dialog_tool.py +148 -0
- pm_copilot_engine/tools/browser_supervisor.py +1475 -0
- pm_copilot_engine/tools/browser_tool.py +3873 -0
- pm_copilot_engine/tools/budget_config.py +51 -0
- pm_copilot_engine/tools/checkpoint_manager.py +1642 -0
- pm_copilot_engine/tools/clarify_gateway.py +278 -0
- pm_copilot_engine/tools/clarify_tool.py +141 -0
- pm_copilot_engine/tools/code_execution_tool.py +1832 -0
- pm_copilot_engine/tools/computer_use/__init__.py +43 -0
- pm_copilot_engine/tools/computer_use/backend.py +158 -0
- pm_copilot_engine/tools/computer_use/cua_backend.py +779 -0
- pm_copilot_engine/tools/computer_use/schema.py +213 -0
- pm_copilot_engine/tools/computer_use/tool.py +823 -0
- pm_copilot_engine/tools/computer_use/vision_routing.py +204 -0
- pm_copilot_engine/tools/computer_use_tool.py +39 -0
- pm_copilot_engine/tools/credential_files.py +455 -0
- pm_copilot_engine/tools/cronjob_tools.py +896 -0
- pm_copilot_engine/tools/debug_helpers.py +105 -0
- pm_copilot_engine/tools/delegate_tool.py +2956 -0
- pm_copilot_engine/tools/discord_tool.py +959 -0
- pm_copilot_engine/tools/env_passthrough.py +163 -0
- pm_copilot_engine/tools/env_probe.py +248 -0
- pm_copilot_engine/tools/environments/__init__.py +14 -0
- pm_copilot_engine/tools/environments/base.py +895 -0
- pm_copilot_engine/tools/environments/daytona.py +270 -0
- pm_copilot_engine/tools/environments/docker.py +1312 -0
- pm_copilot_engine/tools/environments/file_sync.py +403 -0
- pm_copilot_engine/tools/environments/local.py +755 -0
- pm_copilot_engine/tools/environments/managed_modal.py +282 -0
- pm_copilot_engine/tools/environments/modal.py +478 -0
- pm_copilot_engine/tools/environments/modal_utils.py +204 -0
- pm_copilot_engine/tools/environments/singularity.py +265 -0
- pm_copilot_engine/tools/environments/ssh.py +375 -0
- pm_copilot_engine/tools/fal_common.py +163 -0
- pm_copilot_engine/tools/feishu_doc_tool.py +138 -0
- pm_copilot_engine/tools/feishu_drive_tool.py +431 -0
- pm_copilot_engine/tools/file_operations.py +2336 -0
- pm_copilot_engine/tools/file_state.py +332 -0
- pm_copilot_engine/tools/file_tools.py +1632 -0
- pm_copilot_engine/tools/fuzzy_match.py +860 -0
- pm_copilot_engine/tools/homeassistant_tool.py +513 -0
- pm_copilot_engine/tools/image_generation_tool.py +1180 -0
- pm_copilot_engine/tools/interrupt.py +98 -0
- pm_copilot_engine/tools/kanban_tools.py +1431 -0
- pm_copilot_engine/tools/lazy_deps.py +643 -0
- pm_copilot_engine/tools/managed_tool_gateway.py +192 -0
- pm_copilot_engine/tools/mcp_oauth.py +776 -0
- pm_copilot_engine/tools/mcp_oauth_manager.py +607 -0
- pm_copilot_engine/tools/mcp_tool.py +4106 -0
- pm_copilot_engine/tools/memory_tool.py +811 -0
- pm_copilot_engine/tools/microsoft_graph_auth.py +245 -0
- pm_copilot_engine/tools/microsoft_graph_client.py +408 -0
- pm_copilot_engine/tools/mixture_of_agents_tool.py +542 -0
- pm_copilot_engine/tools/neutts_synth.py +104 -0
- pm_copilot_engine/tools/openrouter_client.py +33 -0
- pm_copilot_engine/tools/osv_check.py +169 -0
- pm_copilot_engine/tools/patch_parser.py +622 -0
- pm_copilot_engine/tools/path_security.py +43 -0
- pm_copilot_engine/tools/process_registry.py +1621 -0
- pm_copilot_engine/tools/read_extract.py +248 -0
- pm_copilot_engine/tools/read_terminal_tool.py +93 -0
- pm_copilot_engine/tools/registry.py +589 -0
- pm_copilot_engine/tools/schema_sanitizer.py +483 -0
- pm_copilot_engine/tools/send_message_tool.py +1897 -0
- pm_copilot_engine/tools/session_search_tool.py +784 -0
- pm_copilot_engine/tools/skill_manager_tool.py +1125 -0
- pm_copilot_engine/tools/skill_provenance.py +78 -0
- pm_copilot_engine/tools/skill_usage.py +887 -0
- pm_copilot_engine/tools/skills_ast_audit.py +133 -0
- pm_copilot_engine/tools/skills_guard.py +1086 -0
- pm_copilot_engine/tools/skills_hub.py +3888 -0
- pm_copilot_engine/tools/skills_sync.py +932 -0
- pm_copilot_engine/tools/skills_tool.py +1612 -0
- pm_copilot_engine/tools/slash_confirm.py +167 -0
- pm_copilot_engine/tools/terminal_tool.py +2684 -0
- pm_copilot_engine/tools/thread_context.py +120 -0
- pm_copilot_engine/tools/threat_patterns.py +252 -0
- pm_copilot_engine/tools/tirith_security.py +822 -0
- pm_copilot_engine/tools/todo_tool.py +308 -0
- pm_copilot_engine/tools/tool_backend_helpers.py +182 -0
- pm_copilot_engine/tools/tool_output_limits.py +110 -0
- pm_copilot_engine/tools/tool_result_storage.py +232 -0
- pm_copilot_engine/tools/tool_search.py +735 -0
- pm_copilot_engine/tools/transcription_tools.py +1798 -0
- pm_copilot_engine/tools/tts_tool.py +2731 -0
- pm_copilot_engine/tools/url_safety.py +402 -0
- pm_copilot_engine/tools/video_generation_tool.py +562 -0
- pm_copilot_engine/tools/vision_tools.py +1591 -0
- pm_copilot_engine/tools/voice_mode.py +1218 -0
- pm_copilot_engine/tools/web_tools.py +1569 -0
- pm_copilot_engine/tools/website_policy.py +282 -0
- pm_copilot_engine/tools/write_approval.py +493 -0
- pm_copilot_engine/tools/x_search_tool.py +525 -0
- pm_copilot_engine/tools/xai_http.py +128 -0
- pm_copilot_engine/tools/yuanbao_tools.py +737 -0
- pm_copilot_engine/toolset_distributions.py +364 -0
- pm_copilot_engine/toolsets.py +912 -0
- pm_copilot_engine/trajectory_compressor.py +1579 -0
- pm_copilot_engine/utils.py +440 -0
- pm_copilot_engine-0.1.0.dist-info/METADATA +215 -0
- pm_copilot_engine-0.1.0.dist-info/RECORD +656 -0
- pm_copilot_engine-0.1.0.dist-info/WHEEL +5 -0
- pm_copilot_engine-0.1.0.dist-info/licenses/LICENSE +21 -0
- pm_copilot_engine-0.1.0.dist-info/top_level.txt +3 -0
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Status command for hermes CLI.
|
|
3
|
+
|
|
4
|
+
Shows the status of all Hermes Agent components.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import sys
|
|
9
|
+
import subprocess # noqa: F401 — re-exported for tests that monkeypatch status.subprocess to guard against regressions
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
PROJECT_ROOT = Path(__file__).parent.parent.resolve()
|
|
13
|
+
|
|
14
|
+
from pm_copilot_engine._internal.hermes_cli.auth import AuthError, resolve_provider
|
|
15
|
+
from pm_copilot_engine._internal.hermes_cli.colors import Colors, color
|
|
16
|
+
from pm_copilot_engine._internal.hermes_cli.config import get_env_path, get_env_value, get_hermes_home, load_config
|
|
17
|
+
from pm_copilot_engine._internal.hermes_cli.models import provider_label
|
|
18
|
+
from pm_copilot_engine._internal.hermes_cli.nous_account import (
|
|
19
|
+
format_nous_portal_entitlement_message,
|
|
20
|
+
get_nous_portal_account_info,
|
|
21
|
+
)
|
|
22
|
+
from pm_copilot_engine._internal.hermes_cli.nous_subscription import get_nous_subscription_features
|
|
23
|
+
from pm_copilot_engine._internal.hermes_cli.runtime_provider import resolve_requested_provider
|
|
24
|
+
from pm_copilot_engine.hermes_constants import OPENROUTER_MODELS_URL
|
|
25
|
+
from pm_copilot_engine.tools.tool_backend_helpers import managed_nous_tools_enabled
|
|
26
|
+
|
|
27
|
+
def check_mark(ok: bool) -> str:
|
|
28
|
+
if ok:
|
|
29
|
+
return color("✓", Colors.GREEN)
|
|
30
|
+
return color("✗", Colors.RED)
|
|
31
|
+
|
|
32
|
+
def redact_key(key: str) -> str:
|
|
33
|
+
"""Redact an API key for display.
|
|
34
|
+
|
|
35
|
+
Thin wrapper over :func:`agent.redact.mask_secret`. Preserves the
|
|
36
|
+
"(not set)" placeholder in dim color to match ``hermes config``'s
|
|
37
|
+
output (previously this variant was missing the DIM color —
|
|
38
|
+
consolidated via PR that also introduced ``mask_secret``).
|
|
39
|
+
"""
|
|
40
|
+
from pm_copilot_engine.agent.redact import mask_secret
|
|
41
|
+
return mask_secret(key, empty=color("(not set)", Colors.DIM))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _format_iso_timestamp(value) -> str:
|
|
45
|
+
"""Format ISO timestamps for status output, converting to local timezone."""
|
|
46
|
+
if not value or not isinstance(value, str):
|
|
47
|
+
return "(unknown)"
|
|
48
|
+
from datetime import datetime, timezone
|
|
49
|
+
text = value.strip()
|
|
50
|
+
if not text:
|
|
51
|
+
return "(unknown)"
|
|
52
|
+
if text.endswith("Z"):
|
|
53
|
+
text = text[:-1] + "+00:00"
|
|
54
|
+
try:
|
|
55
|
+
parsed = datetime.fromisoformat(text)
|
|
56
|
+
if parsed.tzinfo is None:
|
|
57
|
+
parsed = parsed.replace(tzinfo=timezone.utc)
|
|
58
|
+
except Exception:
|
|
59
|
+
return value
|
|
60
|
+
return parsed.astimezone().strftime("%Y-%m-%d %H:%M:%S %Z")
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _configured_model_label(config: dict) -> str:
|
|
64
|
+
"""Return the configured default model from config.yaml."""
|
|
65
|
+
model_cfg = config.get("model")
|
|
66
|
+
if isinstance(model_cfg, dict):
|
|
67
|
+
model = (model_cfg.get("default") or model_cfg.get("name") or "").strip()
|
|
68
|
+
elif isinstance(model_cfg, str):
|
|
69
|
+
model = model_cfg.strip()
|
|
70
|
+
else:
|
|
71
|
+
model = ""
|
|
72
|
+
return model or "(not set)"
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _effective_provider_label() -> str:
|
|
76
|
+
"""Return the provider label matching current CLI runtime resolution."""
|
|
77
|
+
requested = resolve_requested_provider()
|
|
78
|
+
try:
|
|
79
|
+
effective = resolve_provider(requested)
|
|
80
|
+
except AuthError:
|
|
81
|
+
effective = requested or "auto"
|
|
82
|
+
|
|
83
|
+
if effective == "openrouter" and get_env_value("OPENAI_BASE_URL"):
|
|
84
|
+
effective = "custom"
|
|
85
|
+
|
|
86
|
+
return provider_label(effective)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
from pm_copilot_engine.hermes_constants import is_termux as _is_termux
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def show_status(args):
|
|
93
|
+
"""Show status of all Hermes Agent components."""
|
|
94
|
+
show_all = getattr(args, 'all', False)
|
|
95
|
+
deep = getattr(args, 'deep', False)
|
|
96
|
+
|
|
97
|
+
print()
|
|
98
|
+
print(color("┌─────────────────────────────────────────────────────────┐", Colors.CYAN))
|
|
99
|
+
print(color("│ ⚕ Hermes Agent Status │", Colors.CYAN))
|
|
100
|
+
print(color("└─────────────────────────────────────────────────────────┘", Colors.CYAN))
|
|
101
|
+
|
|
102
|
+
# =========================================================================
|
|
103
|
+
# Environment
|
|
104
|
+
# =========================================================================
|
|
105
|
+
print()
|
|
106
|
+
print(color("◆ Environment", Colors.CYAN, Colors.BOLD))
|
|
107
|
+
print(f" Project: {PROJECT_ROOT}")
|
|
108
|
+
print(f" Python: {sys.version.split()[0]}")
|
|
109
|
+
|
|
110
|
+
env_path = get_env_path()
|
|
111
|
+
print(f" .env file: {check_mark(env_path.exists())} {'exists' if env_path.exists() else 'not found'}")
|
|
112
|
+
|
|
113
|
+
try:
|
|
114
|
+
config = load_config()
|
|
115
|
+
except Exception:
|
|
116
|
+
config = {}
|
|
117
|
+
|
|
118
|
+
print(f" Model: {_configured_model_label(config)}")
|
|
119
|
+
print(f" Provider: {_effective_provider_label()}")
|
|
120
|
+
|
|
121
|
+
# =========================================================================
|
|
122
|
+
# API Keys
|
|
123
|
+
# =========================================================================
|
|
124
|
+
print()
|
|
125
|
+
print(color("◆ API Keys", Colors.CYAN, Colors.BOLD))
|
|
126
|
+
|
|
127
|
+
# Values may be a single env var name (str) or a tuple of alternates (first found wins).
|
|
128
|
+
keys: dict[str, str | tuple[str, ...]] = {
|
|
129
|
+
"OpenRouter": "OPENROUTER_API_KEY",
|
|
130
|
+
"OpenAI": "OPENAI_API_KEY",
|
|
131
|
+
"Anthropic": ("ANTHROPIC_API_KEY", "ANTHROPIC_TOKEN"),
|
|
132
|
+
"Google / Gemini": ("GOOGLE_API_KEY", "GEMINI_API_KEY"),
|
|
133
|
+
"DeepSeek": "DEEPSEEK_API_KEY",
|
|
134
|
+
"xAI / Grok": "XAI_API_KEY",
|
|
135
|
+
"NVIDIA NIM": "NVIDIA_API_KEY",
|
|
136
|
+
"Z.AI / GLM": "GLM_API_KEY",
|
|
137
|
+
"Kimi": "KIMI_API_KEY",
|
|
138
|
+
"StepFun Step Plan": "STEPFUN_API_KEY",
|
|
139
|
+
"MiniMax": "MINIMAX_API_KEY",
|
|
140
|
+
"MiniMax-CN": "MINIMAX_CN_API_KEY",
|
|
141
|
+
"Firecrawl": "FIRECRAWL_API_KEY",
|
|
142
|
+
"Tavily": "TAVILY_API_KEY",
|
|
143
|
+
"Browser Use": "BROWSER_USE_API_KEY", # Optional — local browser works without this
|
|
144
|
+
"Browserbase": "BROWSERBASE_API_KEY", # Optional — direct credentials only
|
|
145
|
+
"FAL": "FAL_KEY",
|
|
146
|
+
"ElevenLabs": "ELEVENLABS_API_KEY",
|
|
147
|
+
"GitHub": "GITHUB_TOKEN",
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
def _resolve_env(env_ref) -> str:
|
|
151
|
+
"""Return first non-empty env var value from a str or tuple of names."""
|
|
152
|
+
if isinstance(env_ref, tuple):
|
|
153
|
+
for candidate in env_ref:
|
|
154
|
+
v = get_env_value(candidate) or ""
|
|
155
|
+
if v:
|
|
156
|
+
return v
|
|
157
|
+
return ""
|
|
158
|
+
return get_env_value(env_ref) or ""
|
|
159
|
+
|
|
160
|
+
for name, env_ref in keys.items():
|
|
161
|
+
# Anthropic already has a dedicated lookup below; keep that as the
|
|
162
|
+
# single source of truth (it also resolves OAuth tokens), skip here
|
|
163
|
+
# so we don't print two "Anthropic" rows.
|
|
164
|
+
if name == "Anthropic":
|
|
165
|
+
continue
|
|
166
|
+
value = _resolve_env(env_ref)
|
|
167
|
+
has_key = bool(value)
|
|
168
|
+
display = redact_key(value) if not show_all else value
|
|
169
|
+
print(f" {name:<12} {check_mark(has_key)} {display}")
|
|
170
|
+
|
|
171
|
+
from pm_copilot_engine._internal.hermes_cli.auth import get_anthropic_key
|
|
172
|
+
anthropic_value = get_anthropic_key()
|
|
173
|
+
anthropic_display = redact_key(anthropic_value) if not show_all else anthropic_value
|
|
174
|
+
print(f" {'Anthropic':<12} {check_mark(bool(anthropic_value))} {anthropic_display}")
|
|
175
|
+
|
|
176
|
+
# =========================================================================
|
|
177
|
+
# Auth Providers (OAuth)
|
|
178
|
+
# =========================================================================
|
|
179
|
+
print()
|
|
180
|
+
print(color("◆ Auth Providers", Colors.CYAN, Colors.BOLD))
|
|
181
|
+
|
|
182
|
+
try:
|
|
183
|
+
from pm_copilot_engine._internal.hermes_cli.auth import (
|
|
184
|
+
get_nous_auth_status,
|
|
185
|
+
get_codex_auth_status,
|
|
186
|
+
get_qwen_auth_status,
|
|
187
|
+
get_minimax_oauth_auth_status,
|
|
188
|
+
)
|
|
189
|
+
nous_status = get_nous_auth_status()
|
|
190
|
+
codex_status = get_codex_auth_status()
|
|
191
|
+
qwen_status = get_qwen_auth_status()
|
|
192
|
+
minimax_status = get_minimax_oauth_auth_status()
|
|
193
|
+
except Exception:
|
|
194
|
+
nous_status = {}
|
|
195
|
+
codex_status = {}
|
|
196
|
+
qwen_status = {}
|
|
197
|
+
minimax_status = {}
|
|
198
|
+
|
|
199
|
+
nous_account_info = None
|
|
200
|
+
if (
|
|
201
|
+
nous_status.get("logged_in")
|
|
202
|
+
or nous_status.get("access_token")
|
|
203
|
+
or nous_status.get("portal_base_url")
|
|
204
|
+
or nous_status.get("inference_credential_present")
|
|
205
|
+
or nous_status.get("error_code")
|
|
206
|
+
):
|
|
207
|
+
try:
|
|
208
|
+
nous_account_info = get_nous_portal_account_info()
|
|
209
|
+
except Exception:
|
|
210
|
+
nous_account_info = None
|
|
211
|
+
|
|
212
|
+
nous_logged_in = bool(
|
|
213
|
+
nous_status.get("logged_in")
|
|
214
|
+
or (nous_account_info and nous_account_info.logged_in)
|
|
215
|
+
)
|
|
216
|
+
nous_inference_present = bool(
|
|
217
|
+
nous_status.get("inference_credential_present")
|
|
218
|
+
or (nous_account_info and nous_account_info.inference_credential_present)
|
|
219
|
+
)
|
|
220
|
+
nous_error = nous_status.get("error")
|
|
221
|
+
if nous_logged_in:
|
|
222
|
+
nous_label = "logged in"
|
|
223
|
+
elif nous_inference_present:
|
|
224
|
+
nous_label = "not logged in (Nous inference key configured)"
|
|
225
|
+
else:
|
|
226
|
+
nous_label = "not logged in (run: hermes portal)"
|
|
227
|
+
print(
|
|
228
|
+
f" {'Nous Portal':<12} {check_mark(nous_logged_in)} "
|
|
229
|
+
f"{nous_label}"
|
|
230
|
+
)
|
|
231
|
+
portal_url = nous_status.get("portal_base_url") or "(unknown)"
|
|
232
|
+
inference_url = (
|
|
233
|
+
nous_status.get("inference_base_url")
|
|
234
|
+
or (nous_account_info.inference_base_url if nous_account_info else None)
|
|
235
|
+
)
|
|
236
|
+
access_exp = _format_iso_timestamp(nous_status.get("access_expires_at"))
|
|
237
|
+
key_exp = _format_iso_timestamp(nous_status.get("agent_key_expires_at"))
|
|
238
|
+
refresh_label = "yes" if nous_status.get("has_refresh_token") else "no"
|
|
239
|
+
if nous_logged_in or portal_url != "(unknown)" or nous_error:
|
|
240
|
+
print(f" Portal URL: {portal_url}")
|
|
241
|
+
if nous_inference_present and inference_url:
|
|
242
|
+
print(f" Inference: {inference_url}")
|
|
243
|
+
if nous_logged_in or nous_status.get("access_expires_at"):
|
|
244
|
+
print(f" Access exp: {access_exp}")
|
|
245
|
+
if nous_logged_in or nous_inference_present or nous_status.get("agent_key_expires_at"):
|
|
246
|
+
print(f" Key exp: {key_exp}")
|
|
247
|
+
if nous_logged_in or nous_status.get("has_refresh_token"):
|
|
248
|
+
print(f" Refresh: {refresh_label}")
|
|
249
|
+
if nous_error:
|
|
250
|
+
print(f" Error: {nous_error}")
|
|
251
|
+
|
|
252
|
+
codex_logged_in = bool(codex_status.get("logged_in"))
|
|
253
|
+
print(
|
|
254
|
+
f" {'OpenAI Codex':<12} {check_mark(codex_logged_in)} "
|
|
255
|
+
f"{'logged in' if codex_logged_in else 'not logged in (run: hermes model)'}"
|
|
256
|
+
)
|
|
257
|
+
codex_auth_file = codex_status.get("auth_store")
|
|
258
|
+
if codex_auth_file:
|
|
259
|
+
print(f" Auth file: {codex_auth_file}")
|
|
260
|
+
codex_last_refresh = _format_iso_timestamp(codex_status.get("last_refresh"))
|
|
261
|
+
if codex_status.get("last_refresh"):
|
|
262
|
+
print(f" Refreshed: {codex_last_refresh}")
|
|
263
|
+
if codex_status.get("error") and not codex_logged_in:
|
|
264
|
+
print(f" Error: {codex_status.get('error')}")
|
|
265
|
+
|
|
266
|
+
qwen_logged_in = bool(qwen_status.get("logged_in"))
|
|
267
|
+
print(
|
|
268
|
+
f" {'Qwen OAuth':<12} {check_mark(qwen_logged_in)} "
|
|
269
|
+
f"{'logged in' if qwen_logged_in else 'not logged in (run: qwen auth qwen-oauth)'}"
|
|
270
|
+
)
|
|
271
|
+
qwen_auth_file = qwen_status.get("auth_file")
|
|
272
|
+
if qwen_auth_file:
|
|
273
|
+
print(f" Auth file: {qwen_auth_file}")
|
|
274
|
+
qwen_exp = qwen_status.get("expires_at_ms")
|
|
275
|
+
if qwen_exp:
|
|
276
|
+
from datetime import datetime, timezone
|
|
277
|
+
print(f" Access exp: {datetime.fromtimestamp(int(qwen_exp) / 1000, tz=timezone.utc).isoformat()}")
|
|
278
|
+
if qwen_status.get("error") and not qwen_logged_in:
|
|
279
|
+
print(f" Error: {qwen_status.get('error')}")
|
|
280
|
+
|
|
281
|
+
minimax_logged_in = bool(minimax_status.get("logged_in"))
|
|
282
|
+
print(
|
|
283
|
+
f" {'MiniMax OAuth':<12} {check_mark(minimax_logged_in)} "
|
|
284
|
+
f"{'logged in' if minimax_logged_in else 'not logged in (run: hermes auth add minimax-oauth)'}"
|
|
285
|
+
)
|
|
286
|
+
minimax_region = minimax_status.get("region")
|
|
287
|
+
if minimax_logged_in and minimax_region:
|
|
288
|
+
print(f" Region: {minimax_region}")
|
|
289
|
+
minimax_exp = minimax_status.get("expires_at")
|
|
290
|
+
if minimax_exp:
|
|
291
|
+
print(f" Access exp: {minimax_exp}")
|
|
292
|
+
if minimax_status.get("error") and not minimax_logged_in:
|
|
293
|
+
print(f" Error: {minimax_status.get('error')}")
|
|
294
|
+
|
|
295
|
+
# xAI OAuth — separate try/except so an import failure here cannot
|
|
296
|
+
# disrupt the already-printed Nous/Codex/Qwen/MiniMax rows above.
|
|
297
|
+
try:
|
|
298
|
+
from pm_copilot_engine._internal.hermes_cli.auth import get_xai_oauth_auth_status
|
|
299
|
+
xai_oauth_status = get_xai_oauth_auth_status() or {}
|
|
300
|
+
except Exception:
|
|
301
|
+
xai_oauth_status = {}
|
|
302
|
+
|
|
303
|
+
xai_oauth_logged_in = bool(xai_oauth_status.get("logged_in"))
|
|
304
|
+
print(
|
|
305
|
+
f" {'xAI OAuth':<12} {check_mark(xai_oauth_logged_in)} "
|
|
306
|
+
f"{'logged in' if xai_oauth_logged_in else 'not logged in (run: hermes auth add xai-oauth)'}"
|
|
307
|
+
)
|
|
308
|
+
xai_auth_file = xai_oauth_status.get("auth_store")
|
|
309
|
+
if xai_auth_file:
|
|
310
|
+
print(f" Auth file: {xai_auth_file}")
|
|
311
|
+
if xai_oauth_status.get("last_refresh"):
|
|
312
|
+
print(f" Refreshed: {_format_iso_timestamp(xai_oauth_status.get('last_refresh'))}")
|
|
313
|
+
if xai_oauth_status.get("error") and not xai_oauth_logged_in:
|
|
314
|
+
print(f" Error: {xai_oauth_status.get('error')}")
|
|
315
|
+
|
|
316
|
+
# =========================================================================
|
|
317
|
+
# Nous Subscription Features
|
|
318
|
+
# =========================================================================
|
|
319
|
+
if managed_nous_tools_enabled():
|
|
320
|
+
features = get_nous_subscription_features(config)
|
|
321
|
+
print()
|
|
322
|
+
print(color("◆ Nous Tool Gateway", Colors.CYAN, Colors.BOLD))
|
|
323
|
+
if not features.nous_auth_present:
|
|
324
|
+
print(" Nous Portal ✗ not logged in")
|
|
325
|
+
else:
|
|
326
|
+
print(" Nous Portal ✓ managed tools available")
|
|
327
|
+
for feature in features.items():
|
|
328
|
+
if feature.managed_by_nous:
|
|
329
|
+
state = "active via Nous subscription"
|
|
330
|
+
elif feature.active:
|
|
331
|
+
current = feature.current_provider or "configured provider"
|
|
332
|
+
state = f"active via {current}"
|
|
333
|
+
elif feature.included_by_default and features.nous_auth_present:
|
|
334
|
+
state = "included by subscription, not currently selected"
|
|
335
|
+
elif feature.key == "modal" and features.nous_auth_present:
|
|
336
|
+
state = "available via subscription (optional)"
|
|
337
|
+
else:
|
|
338
|
+
state = "not configured"
|
|
339
|
+
print(f" {feature.label:<15} {check_mark(feature.available or feature.active or feature.managed_by_nous)} {state}")
|
|
340
|
+
elif nous_logged_in or nous_inference_present:
|
|
341
|
+
# Nous OAuth without entitlement, or an opaque inference key without
|
|
342
|
+
# Portal account information, cannot enable the Tool Gateway.
|
|
343
|
+
print()
|
|
344
|
+
print(color("◆ Nous Tool Gateway", Colors.CYAN, Colors.BOLD))
|
|
345
|
+
message = format_nous_portal_entitlement_message(
|
|
346
|
+
nous_account_info,
|
|
347
|
+
capability="managed web, image, TTS, STT, browser, and Modal tools",
|
|
348
|
+
)
|
|
349
|
+
if message:
|
|
350
|
+
for line in message.splitlines():
|
|
351
|
+
print(f" {line}")
|
|
352
|
+
|
|
353
|
+
# =========================================================================
|
|
354
|
+
# API-Key Providers
|
|
355
|
+
# =========================================================================
|
|
356
|
+
print()
|
|
357
|
+
print(color("◆ API-Key Providers", Colors.CYAN, Colors.BOLD))
|
|
358
|
+
|
|
359
|
+
apikey_providers = {
|
|
360
|
+
"Z.AI / GLM": ("GLM_API_KEY", "ZAI_API_KEY", "Z_AI_API_KEY"),
|
|
361
|
+
"Kimi / Moonshot": ("KIMI_API_KEY",),
|
|
362
|
+
"StepFun Step Plan": ("STEPFUN_API_KEY",),
|
|
363
|
+
"MiniMax": ("MINIMAX_API_KEY",),
|
|
364
|
+
"MiniMax (China)": ("MINIMAX_CN_API_KEY",),
|
|
365
|
+
}
|
|
366
|
+
for pname, env_vars in apikey_providers.items():
|
|
367
|
+
key_val = ""
|
|
368
|
+
for ev in env_vars:
|
|
369
|
+
key_val = get_env_value(ev) or ""
|
|
370
|
+
if key_val:
|
|
371
|
+
break
|
|
372
|
+
configured = bool(key_val)
|
|
373
|
+
label = "configured" if configured else "not configured (run: hermes model)"
|
|
374
|
+
print(f" {pname:<16} {check_mark(configured)} {label}")
|
|
375
|
+
|
|
376
|
+
# LM Studio reachability — only probe when it's the active provider so
|
|
377
|
+
# users with foreign configs don't see noise. Auth rejection vs. silent
|
|
378
|
+
# empty list is the most common LM Studio support case.
|
|
379
|
+
if _effective_provider_label() == "LM Studio":
|
|
380
|
+
from pm_copilot_engine._internal.hermes_cli.models import probe_lmstudio_models
|
|
381
|
+
model_cfg = config.get("model")
|
|
382
|
+
base = (model_cfg.get("base_url") if isinstance(model_cfg, dict) else None) or get_env_value("LM_BASE_URL") or "http://127.0.0.1:1234/v1"
|
|
383
|
+
try:
|
|
384
|
+
models = probe_lmstudio_models(api_key=get_env_value("LM_API_KEY") or "", base_url=base, timeout=1.5)
|
|
385
|
+
if models is None:
|
|
386
|
+
ok, msg = False, f"unreachable at {base}"
|
|
387
|
+
else:
|
|
388
|
+
ok, msg = True, f"reachable ({len(models)} model(s)) at {base}"
|
|
389
|
+
except AuthError:
|
|
390
|
+
ok, msg = False, "auth rejected — set LM_API_KEY"
|
|
391
|
+
print(f" {'LM Studio':<16} {check_mark(ok)} {msg}")
|
|
392
|
+
|
|
393
|
+
# =========================================================================
|
|
394
|
+
# Terminal Configuration
|
|
395
|
+
# =========================================================================
|
|
396
|
+
print()
|
|
397
|
+
print(color("◆ Terminal Backend", Colors.CYAN, Colors.BOLD))
|
|
398
|
+
|
|
399
|
+
terminal_cfg = config.get("terminal", {}) if isinstance(config.get("terminal"), dict) else {}
|
|
400
|
+
terminal_env = os.getenv("TERMINAL_ENV", "")
|
|
401
|
+
if not terminal_env:
|
|
402
|
+
terminal_env = terminal_cfg.get("backend", "local")
|
|
403
|
+
print(f" Backend: {terminal_env}")
|
|
404
|
+
|
|
405
|
+
if terminal_env == "ssh":
|
|
406
|
+
ssh_host = os.getenv("TERMINAL_SSH_HOST", "")
|
|
407
|
+
ssh_user = os.getenv("TERMINAL_SSH_USER", "")
|
|
408
|
+
print(f" SSH Host: {ssh_host or '(not set)'}")
|
|
409
|
+
print(f" SSH User: {ssh_user or '(not set)'}")
|
|
410
|
+
elif terminal_env == "docker":
|
|
411
|
+
docker_image = os.getenv("TERMINAL_DOCKER_IMAGE", "python:3.11-slim")
|
|
412
|
+
print(f" Docker Image: {docker_image}")
|
|
413
|
+
elif terminal_env == "daytona":
|
|
414
|
+
daytona_image = os.getenv("TERMINAL_DAYTONA_IMAGE", "nikolaik/python-nodejs:python3.11-nodejs20")
|
|
415
|
+
print(f" Daytona Image: {daytona_image}")
|
|
416
|
+
|
|
417
|
+
sudo_password = os.getenv("SUDO_PASSWORD", "")
|
|
418
|
+
print(f" Sudo: {check_mark(bool(sudo_password))} {'enabled' if sudo_password else 'disabled'}")
|
|
419
|
+
|
|
420
|
+
# =========================================================================
|
|
421
|
+
# Messaging Platforms
|
|
422
|
+
# =========================================================================
|
|
423
|
+
print()
|
|
424
|
+
print(color("◆ Messaging Platforms", Colors.CYAN, Colors.BOLD))
|
|
425
|
+
|
|
426
|
+
platforms = {
|
|
427
|
+
"Telegram": ("TELEGRAM_BOT_TOKEN", "TELEGRAM_HOME_CHANNEL"),
|
|
428
|
+
"Discord": ("DISCORD_BOT_TOKEN", "DISCORD_HOME_CHANNEL"),
|
|
429
|
+
"WhatsApp": ("WHATSAPP_ENABLED", None),
|
|
430
|
+
"Signal": ("SIGNAL_HTTP_URL", "SIGNAL_HOME_CHANNEL"),
|
|
431
|
+
"Slack": ("SLACK_BOT_TOKEN", None),
|
|
432
|
+
"Email": ("EMAIL_ADDRESS", "EMAIL_HOME_ADDRESS"),
|
|
433
|
+
"SMS": ("TWILIO_ACCOUNT_SID", "SMS_HOME_CHANNEL"),
|
|
434
|
+
"DingTalk": ("DINGTALK_CLIENT_ID", None),
|
|
435
|
+
"Feishu": ("FEISHU_APP_ID", "FEISHU_HOME_CHANNEL"),
|
|
436
|
+
"WeCom": ("WECOM_BOT_ID", "WECOM_HOME_CHANNEL"),
|
|
437
|
+
"WeCom Callback": ("WECOM_CALLBACK_CORP_ID", None),
|
|
438
|
+
"Weixin": ("WEIXIN_ACCOUNT_ID", "WEIXIN_HOME_CHANNEL"),
|
|
439
|
+
"BlueBubbles": ("BLUEBUBBLES_SERVER_URL", "BLUEBUBBLES_HOME_CHANNEL"),
|
|
440
|
+
"QQBot": ("QQ_APP_ID", "QQ_HOME_CHANNEL"),
|
|
441
|
+
"Yuanbao": ("YUANBAO_APP_ID", "YUANBAO_HOME_CHANNEL"),
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
for name, (token_var, home_var) in platforms.items():
|
|
445
|
+
token = os.getenv(token_var, "")
|
|
446
|
+
has_token = bool(token)
|
|
447
|
+
|
|
448
|
+
home_channel = ""
|
|
449
|
+
if home_var:
|
|
450
|
+
home_channel = os.getenv(home_var, "")
|
|
451
|
+
# Back-compat: QQBot home channel was renamed from QQ_HOME_CHANNEL to QQBOT_HOME_CHANNEL
|
|
452
|
+
if not home_channel and home_var == "QQBOT_HOME_CHANNEL":
|
|
453
|
+
home_channel = os.getenv("QQ_HOME_CHANNEL", "")
|
|
454
|
+
|
|
455
|
+
status = "configured" if has_token else "not configured"
|
|
456
|
+
if home_channel:
|
|
457
|
+
status += f" (home: {home_channel})"
|
|
458
|
+
|
|
459
|
+
print(f" {name:<12} {check_mark(has_token)} {status}")
|
|
460
|
+
|
|
461
|
+
# Plugin-registered platforms
|
|
462
|
+
try:
|
|
463
|
+
from gateway.platform_registry import platform_registry
|
|
464
|
+
for entry in platform_registry.plugin_entries():
|
|
465
|
+
configured = entry.check_fn()
|
|
466
|
+
status_str = "configured" if configured else "not configured"
|
|
467
|
+
label = entry.label
|
|
468
|
+
print(f" {label:<12} {check_mark(configured)} {status_str} (plugin)")
|
|
469
|
+
except Exception:
|
|
470
|
+
pass
|
|
471
|
+
|
|
472
|
+
# =========================================================================
|
|
473
|
+
# Gateway Status
|
|
474
|
+
# =========================================================================
|
|
475
|
+
print()
|
|
476
|
+
print(color("◆ Gateway Service", Colors.CYAN, Colors.BOLD))
|
|
477
|
+
|
|
478
|
+
try:
|
|
479
|
+
from pm_copilot_engine._internal.hermes_cli.gateway import get_gateway_runtime_snapshot, _format_gateway_pids
|
|
480
|
+
|
|
481
|
+
snapshot = get_gateway_runtime_snapshot()
|
|
482
|
+
is_running = snapshot.running
|
|
483
|
+
print(f" Status: {check_mark(is_running)} {'running' if is_running else 'stopped'}")
|
|
484
|
+
print(f" Manager: {snapshot.manager}")
|
|
485
|
+
if snapshot.gateway_pids:
|
|
486
|
+
print(f" PID(s): {_format_gateway_pids(snapshot.gateway_pids)}")
|
|
487
|
+
if snapshot.has_process_service_mismatch:
|
|
488
|
+
print(" Service: installed but not managing the current running gateway")
|
|
489
|
+
elif _is_termux() and not snapshot.gateway_pids:
|
|
490
|
+
print(" Start with: hermes gateway")
|
|
491
|
+
print(" Note: Android may stop background jobs when Termux is suspended")
|
|
492
|
+
elif snapshot.service_installed and not snapshot.service_running:
|
|
493
|
+
print(" Service: installed but stopped")
|
|
494
|
+
except Exception:
|
|
495
|
+
if _is_termux():
|
|
496
|
+
print(f" Status: {color('unknown', Colors.DIM)}")
|
|
497
|
+
print(" Manager: Termux / manual process")
|
|
498
|
+
elif sys.platform.startswith('linux'):
|
|
499
|
+
print(f" Status: {color('unknown', Colors.DIM)}")
|
|
500
|
+
print(" Manager: systemd/manual")
|
|
501
|
+
elif sys.platform == 'darwin':
|
|
502
|
+
print(f" Status: {color('unknown', Colors.DIM)}")
|
|
503
|
+
print(" Manager: launchd")
|
|
504
|
+
else:
|
|
505
|
+
print(f" Status: {color('N/A', Colors.DIM)}")
|
|
506
|
+
print(" Manager: (not supported on this platform)")
|
|
507
|
+
|
|
508
|
+
# =========================================================================
|
|
509
|
+
# Cron Jobs
|
|
510
|
+
# =========================================================================
|
|
511
|
+
print()
|
|
512
|
+
print(color("◆ Scheduled Jobs", Colors.CYAN, Colors.BOLD))
|
|
513
|
+
|
|
514
|
+
jobs_file = get_hermes_home() / "cron" / "jobs.json"
|
|
515
|
+
if jobs_file.exists():
|
|
516
|
+
import json
|
|
517
|
+
try:
|
|
518
|
+
with open(jobs_file, encoding="utf-8") as f:
|
|
519
|
+
data = json.load(f)
|
|
520
|
+
jobs = data.get("jobs", [])
|
|
521
|
+
enabled_jobs = [j for j in jobs if j.get("enabled", True)]
|
|
522
|
+
print(f" Jobs: {len(enabled_jobs)} active, {len(jobs)} total")
|
|
523
|
+
except Exception:
|
|
524
|
+
print(" Jobs: (error reading jobs file)")
|
|
525
|
+
else:
|
|
526
|
+
print(" Jobs: 0")
|
|
527
|
+
|
|
528
|
+
# =========================================================================
|
|
529
|
+
# Sessions
|
|
530
|
+
# =========================================================================
|
|
531
|
+
print()
|
|
532
|
+
print(color("◆ Sessions", Colors.CYAN, Colors.BOLD))
|
|
533
|
+
|
|
534
|
+
sessions_file = get_hermes_home() / "sessions" / "sessions.json"
|
|
535
|
+
if sessions_file.exists():
|
|
536
|
+
import json
|
|
537
|
+
try:
|
|
538
|
+
with open(sessions_file, encoding="utf-8") as f:
|
|
539
|
+
data = json.load(f)
|
|
540
|
+
print(f" Active: {len(data)} session(s)")
|
|
541
|
+
except Exception:
|
|
542
|
+
print(" Active: (error reading sessions file)")
|
|
543
|
+
else:
|
|
544
|
+
print(" Active: 0")
|
|
545
|
+
|
|
546
|
+
# =========================================================================
|
|
547
|
+
# Deep checks
|
|
548
|
+
# =========================================================================
|
|
549
|
+
if deep:
|
|
550
|
+
print()
|
|
551
|
+
print(color("◆ Deep Checks", Colors.CYAN, Colors.BOLD))
|
|
552
|
+
|
|
553
|
+
# Check OpenRouter connectivity
|
|
554
|
+
openrouter_key = os.getenv("OPENROUTER_API_KEY", "")
|
|
555
|
+
if openrouter_key:
|
|
556
|
+
try:
|
|
557
|
+
import httpx
|
|
558
|
+
response = httpx.get(
|
|
559
|
+
OPENROUTER_MODELS_URL,
|
|
560
|
+
headers={"Authorization": f"Bearer {openrouter_key}"},
|
|
561
|
+
timeout=10
|
|
562
|
+
)
|
|
563
|
+
ok = response.status_code == 200
|
|
564
|
+
print(f" OpenRouter: {check_mark(ok)} {'reachable' if ok else f'error ({response.status_code})'}")
|
|
565
|
+
except Exception as e:
|
|
566
|
+
print(f" OpenRouter: {check_mark(False)} error: {e}")
|
|
567
|
+
|
|
568
|
+
# Check gateway port
|
|
569
|
+
try:
|
|
570
|
+
import socket
|
|
571
|
+
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
572
|
+
sock.settimeout(1)
|
|
573
|
+
result = sock.connect_ex(('127.0.0.1', 18789))
|
|
574
|
+
sock.close()
|
|
575
|
+
# Port in use = gateway likely running
|
|
576
|
+
port_in_use = result == 0
|
|
577
|
+
# This is informational, not necessarily bad
|
|
578
|
+
print(f" Port 18789: {'in use' if port_in_use else 'available'}")
|
|
579
|
+
except OSError:
|
|
580
|
+
pass
|
|
581
|
+
|
|
582
|
+
print()
|
|
583
|
+
print(color("─" * 60, Colors.DIM))
|
|
584
|
+
print(color(" Run 'hermes doctor' for detailed diagnostics", Colors.DIM))
|
|
585
|
+
print(color(" Run 'hermes setup' to configure", Colors.DIM))
|
|
586
|
+
print()
|