simplicio-agent 0.25.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.
- acp_adapter/__init__.py +1 -0
- acp_adapter/__main__.py +5 -0
- acp_adapter/auth.py +79 -0
- acp_adapter/edit_approval.py +338 -0
- acp_adapter/entry.py +280 -0
- acp_adapter/events.py +279 -0
- acp_adapter/permissions.py +175 -0
- acp_adapter/provenance.py +127 -0
- acp_adapter/server.py +2065 -0
- acp_adapter/session.py +627 -0
- acp_adapter/tools.py +1329 -0
- agent/__init__.py +8 -0
- agent/_fastjson.py +167 -0
- agent/_hermes_fast.py +182 -0
- agent/account_usage.py +890 -0
- agent/adapter_contract.py +35 -0
- agent/adaptive_controller.py +379 -0
- agent/agent_init.py +2182 -0
- agent/agent_runtime_helpers.py +3375 -0
- agent/ai_memory/__init__.py +1 -0
- agent/ai_memory/cross_vendor.py +148 -0
- agent/algorithms/__init__.py +0 -0
- agent/algorithms/addressing.py +223 -0
- agent/anthropic_adapter.py +2790 -0
- agent/asolaria_pattern_contract.py +477 -0
- agent/async_dag/__init__.py +15 -0
- agent/async_dag/executor.py +166 -0
- agent/async_dag/uvloop_runner.py +169 -0
- agent/async_utils.py +68 -0
- agent/attention_schema.py +370 -0
- agent/autobiographical_memory.py +218 -0
- agent/autonomy_policy.py +315 -0
- agent/auxiliary_client.py +7905 -0
- agent/azure_identity_adapter.py +555 -0
- agent/background_review.py +988 -0
- agent/backlog_ref/__init__.py +0 -0
- agent/backlog_ref/issue_315_self_mod_kernel.py +122 -0
- agent/bedrock_adapter.py +1351 -0
- agent/belief_state.py +696 -0
- agent/benchmark_manifest.py +59 -0
- agent/benchmarks/__init__.py +1 -0
- agent/benchmarks/e2e_comparison.py +162 -0
- agent/billing_view.py +295 -0
- agent/bounded_response.py +148 -0
- agent/browser_provider.py +187 -0
- agent/browser_provider_contract.py +31 -0
- agent/browser_registry.py +192 -0
- agent/capability_inventory.py +86 -0
- agent/capability_registry.py +574 -0
- agent/capability_registry_contract.py +553 -0
- agent/chat_completion_helpers.py +3429 -0
- agent/closed_loop_controller.py +1381 -0
- agent/coarse_graining_contract.py +100 -0
- agent/codex_responses_adapter.py +1468 -0
- agent/codex_runtime.py +954 -0
- agent/coding_context.py +892 -0
- agent/computer_use_provider_contract.py +34 -0
- agent/context/__init__.py +33 -0
- agent/context/incremental.py +61 -0
- agent/context/retrieval.py +83 -0
- agent/context/token_cache.py +104 -0
- agent/context/working_set.py +263 -0
- agent/context_breakdown.py +156 -0
- agent/context_compressor.py +3455 -0
- agent/context_engine.py +238 -0
- agent/context_references.py +616 -0
- agent/conversation_compression.py +1194 -0
- agent/conversation_loop.py +5821 -0
- agent/copilot_acp_client.py +751 -0
- agent/credential_persistence.py +174 -0
- agent/credential_pool.py +2461 -0
- agent/credential_sources.py +447 -0
- agent/credits_tracker.py +794 -0
- agent/cron/__init__.py +5 -0
- agent/cron/unified_scheduler.py +247 -0
- agent/curator.py +2016 -0
- agent/curator_backup.py +711 -0
- agent/delivery_certificate.py +599 -0
- agent/desktop_first_run_contract.py +567 -0
- agent/desktop_layout_contract.py +596 -0
- agent/desktop_security_contract.py +571 -0
- agent/display.py +1464 -0
- agent/distributed/__init__.py +53 -0
- agent/distributed/protocol.py +271 -0
- agent/distribution/__init__.py +6 -0
- agent/distribution/manifest.py +36 -0
- agent/distribution/publisher.py +121 -0
- agent/env_alias.py +97 -0
- agent/error_classifier.py +1621 -0
- agent/errors.py +9 -0
- agent/event_store.py +360 -0
- agent/fanout_governor_contract.py +536 -0
- agent/file_safety.py +679 -0
- agent/gemini_native_adapter.py +1040 -0
- agent/gemini_schema.py +99 -0
- agent/goal_contract.py +727 -0
- agent/golden_path.py +435 -0
- agent/host.py +451 -0
- agent/hrm_controller_contract.py +687 -0
- agent/hyper_bechs/__init__.py +11 -0
- agent/hyper_bechs/host8.py +253 -0
- agent/hypothesis_ensemble.py +225 -0
- agent/i18n.py +302 -0
- agent/image_gen_provider.py +393 -0
- agent/image_gen_registry.py +145 -0
- agent/image_routing.py +765 -0
- agent/insights.py +1080 -0
- agent/issue_claim_lease.py +454 -0
- agent/iteration_budget.py +95 -0
- agent/jiter_preload.py +39 -0
- agent/jspace_contract.py +416 -0
- agent/kanban_stop.py +108 -0
- agent/learn_prompt.py +150 -0
- agent/learning_graph.py +328 -0
- agent/learning_graph_render.py +659 -0
- agent/learning_mutations.py +206 -0
- agent/lmstudio_reasoning.py +48 -0
- agent/lsp/__init__.py +106 -0
- agent/lsp/cli.py +299 -0
- agent/lsp/client.py +964 -0
- agent/lsp/eventlog.py +213 -0
- agent/lsp/install.py +406 -0
- agent/lsp/manager.py +639 -0
- agent/lsp/protocol.py +196 -0
- agent/lsp/range_shift.py +149 -0
- agent/lsp/reporter.py +130 -0
- agent/lsp/servers.py +1187 -0
- agent/lsp/workspace.py +223 -0
- agent/manual_compression_feedback.py +49 -0
- agent/markdown_tables.py +309 -0
- agent/mcp_agent_gateway.py +194 -0
- agent/mcp_cli_compatibility_contract.py +388 -0
- agent/media_goal_contract.py +35 -0
- agent/memory_manager.py +1135 -0
- agent/memory_provider.py +315 -0
- agent/message_content.py +50 -0
- agent/message_sanitization.py +477 -0
- agent/metacognition_contract.py +87 -0
- agent/moa_loop.py +1176 -0
- agent/moa_trace.py +167 -0
- agent/model_metadata.py +2352 -0
- agent/models_dev.py +725 -0
- agent/modes/__init__.py +1 -0
- agent/modes/provider_mode.py +85 -0
- agent/moonshot_schema.py +238 -0
- agent/multirate_scheduler.py +441 -0
- agent/net/__init__.py +5 -0
- agent/net/http_pool.py +143 -0
- agent/nous_rate_guard.py +325 -0
- agent/onboarding.py +253 -0
- agent/oneshot.py +158 -0
- agent/operational_awareness_contract.py +66 -0
- agent/operational_cycle.py +180 -0
- agent/operational_metrics.py +260 -0
- agent/operational_now.py +527 -0
- agent/operational_self_model.py +508 -0
- agent/perception_action_feedback_contract.py +74 -0
- agent/perf_probe.py +102 -0
- agent/persistent_run.py +425 -0
- agent/pet/__init__.py +51 -0
- agent/pet/constants.py +167 -0
- agent/pet/generate/__init__.py +29 -0
- agent/pet/generate/atlas.py +1183 -0
- agent/pet/generate/imagegen.py +251 -0
- agent/pet/generate/orchestrate.py +358 -0
- agent/pet/generate/prompts.py +183 -0
- agent/pet/manifest.py +165 -0
- agent/pet/render.py +682 -0
- agent/pet/state.py +81 -0
- agent/pet/store.py +503 -0
- agent/plugin_llm.py +1046 -0
- agent/plugins/__init__.py +1 -0
- agent/plugins/unified_registry.py +121 -0
- agent/portal_tags.py +64 -0
- agent/possibility_ledger.py +385 -0
- agent/prediction_receipts.py +941 -0
- agent/process_bootstrap.py +227 -0
- agent/profiles/__init__.py +4 -0
- agent/profiles/multi_profile.py +91 -0
- agent/project_mapper/__init__.py +16 -0
- agent/project_mapper/fingerprint.py +264 -0
- agent/prompt_builder.py +2021 -0
- agent/prompt_caching.py +132 -0
- agent/prompt_economy.py +941 -0
- agent/prompt_microkernel.py +309 -0
- agent/protocol.py +155 -0
- agent/protocol_v1.py +1173 -0
- agent/provider_mode.py +160 -0
- agent/providers/__init__.py +17 -0
- agent/providers/fallback_chain.py +202 -0
- agent/providers/router.py +96 -0
- agent/providers/runtime.py +504 -0
- agent/rate_distortion_context.py +550 -0
- agent/rate_limit_tracker.py +246 -0
- agent/reactions.py +56 -0
- agent/reasoning_timeouts.py +224 -0
- agent/redact.py +811 -0
- agent/registry/__init__.py +16 -0
- agent/registry/lazy_schema.py +85 -0
- agent/registry/skill_meta.py +95 -0
- agent/release_evidence_contract.py +481 -0
- agent/release_handoff_contract.py +357 -0
- agent/replay_cleanup.py +317 -0
- agent/resource_homeostasis.py +598 -0
- agent/restart_recovery.py +578 -0
- agent/retry_utils.py +154 -0
- agent/reversible_path.py +520 -0
- agent/router/__init__.py +21 -0
- agent/router/cost_aware.py +213 -0
- agent/router/deterministic.py +94 -0
- agent/router/fallback.py +54 -0
- agent/runtime_bridge.py +65 -0
- agent/runtime_bundle_contract.py +431 -0
- agent/runtime_cwd.py +62 -0
- agent/scientific_integrity_gate.py +181 -0
- agent/secret_scope.py +205 -0
- agent/secret_sources/__init__.py +41 -0
- agent/secret_sources/_cache.py +213 -0
- agent/secret_sources/base.py +274 -0
- agent/secret_sources/bitwarden.py +729 -0
- agent/secret_sources/onepassword.py +643 -0
- agent/secret_sources/registry.py +370 -0
- agent/security/__init__.py +14 -0
- agent/security/unified_auth.py +93 -0
- agent/self_model.py +399 -0
- agent/serde/__init__.py +19 -0
- agent/serde/fast_json.py +111 -0
- agent/session.py +255 -0
- agent/session_repositories.py +126 -0
- agent/shannon/__init__.py +21 -0
- agent/shannon/pipeline.py +525 -0
- agent/shell_hooks.py +928 -0
- agent/simplicio_prompt.py +60 -0
- agent/skill_bundles.py +438 -0
- agent/skill_commands.py +964 -0
- agent/skill_preprocessing.py +144 -0
- agent/skill_utils.py +829 -0
- agent/software_delivery_contract.py +35 -0
- agent/ssl_guard.py +94 -0
- agent/ssl_verify.py +63 -0
- agent/state_migration.py +670 -0
- agent/stream_diag.py +280 -0
- agent/subdirectory_hints.py +270 -0
- agent/supervisor_registry.py +188 -0
- agent/support_bundle_contract.py +484 -0
- agent/system_prompt.py +682 -0
- agent/task_envelope.py +870 -0
- agent/task_envelope_bridge.py +144 -0
- agent/telemetry/__init__.py +39 -0
- agent/telemetry/dashboard.py +137 -0
- agent/telemetry/gain_analytics.py +108 -0
- agent/telemetry/lane_readiness.py +278 -0
- agent/telemetry/mcp_session.py +361 -0
- agent/telemetry/receipts.py +248 -0
- agent/telemetry/savings_report.py +321 -0
- agent/telemetry/stage_timer.py +126 -0
- agent/telemetry/token_savings.py +108 -0
- agent/telemetry/tool_replay.py +259 -0
- agent/telemetry/turn_metrics.py +164 -0
- agent/testing/__init__.py +5 -0
- agent/testing/unified_harness.py +183 -0
- agent/think_scrubber.py +399 -0
- agent/thinking_timeout_guidance.py +136 -0
- agent/thread_scoped_output.py +147 -0
- agent/tier_rate_limiter.py +262 -0
- agent/title_generator.py +204 -0
- agent/token_economy.py +338 -0
- agent/token_governor.py +248 -0
- agent/tokens/__init__.py +17 -0
- agent/tokens/fast_estimator.py +146 -0
- agent/tokens/message_estimator.py +80 -0
- agent/tool_call_json.py +76 -0
- agent/tool_dispatch_helpers.py +626 -0
- agent/tool_executor.py +1873 -0
- agent/tool_guardrails.py +475 -0
- agent/tool_invocation_pipeline.py +868 -0
- agent/tool_result_classification.py +43 -0
- agent/toon_boundary.py +137 -0
- agent/toon_codec.py +679 -0
- agent/trace_upload.py +398 -0
- agent/tracing/__init__.py +19 -0
- agent/tracing/spans.py +165 -0
- agent/trajectory.py +56 -0
- agent/trajectory_skill_contract.py +42 -0
- agent/transcription_provider.py +193 -0
- agent/transcription_registry.py +124 -0
- agent/transports/__init__.py +99 -0
- agent/transports/anthropic.py +251 -0
- agent/transports/base.py +89 -0
- agent/transports/bedrock.py +154 -0
- agent/transports/chat_completions.py +796 -0
- agent/transports/codex.py +499 -0
- agent/transports/codex_app_server.py +413 -0
- agent/transports/codex_app_server_session.py +1078 -0
- agent/transports/codex_event_projector.py +335 -0
- agent/transports/hermes_tools_mcp_server.py +261 -0
- agent/transports/types.py +174 -0
- agent/trust_boundary.py +812 -0
- agent/tts_provider.py +274 -0
- agent/tts_registry.py +134 -0
- agent/turn_context.py +623 -0
- agent/turn_engine.py +140 -0
- agent/turn_envelope.py +242 -0
- agent/turn_finalizer.py +612 -0
- agent/turn_prep.py +72 -0
- agent/turn_retry_state.py +80 -0
- agent/update_rollback_contract.py +387 -0
- agent/usage_pricing.py +1042 -0
- agent/uvloop_utils.py +40 -0
- agent/value_of_information_contract.py +105 -0
- agent/verification_evidence.py +655 -0
- agent/verification_stop.py +313 -0
- agent/verify_hooks.py +69 -0
- agent/vertex_adapter.py +228 -0
- agent/video_gen_provider.py +590 -0
- agent/video_gen_registry.py +133 -0
- agent/web_search_provider.py +211 -0
- agent/web_search_registry.py +304 -0
- batch_runner.py +1323 -0
- cli.py +16505 -0
- cron/__init__.py +42 -0
- cron/blueprint_catalog.py +713 -0
- cron/jobs.py +2341 -0
- cron/lifecycle_guard.py +141 -0
- cron/scheduler.py +3940 -0
- cron/scheduler_provider.py +205 -0
- cron/scripts/__init__.py +1 -0
- cron/scripts/classify_items.py +264 -0
- cron/suggestion_catalog.py +154 -0
- cron/suggestions.py +260 -0
- gateway/__init__.py +35 -0
- gateway/assets/status_phrases.yaml +52 -0
- gateway/assets/telegram-botfather-threads-settings.jpg +0 -0
- gateway/authz_mixin.py +710 -0
- gateway/builtin_hooks/__init__.py +1 -0
- gateway/cgroup_cleanup.py +81 -0
- gateway/channel_directory.py +497 -0
- gateway/code_skew.py +64 -0
- gateway/config.py +2321 -0
- gateway/cwd_placeholder.py +49 -0
- gateway/dead_targets.py +143 -0
- gateway/delivery.py +742 -0
- gateway/display_config.py +277 -0
- gateway/drain_control.py +273 -0
- gateway/hooks.py +227 -0
- gateway/kanban_watchers.py +1286 -0
- gateway/memory_monitor.py +230 -0
- gateway/message_timestamps.py +166 -0
- gateway/mirror.py +206 -0
- gateway/native_bridge.py +500 -0
- gateway/pairing.py +661 -0
- gateway/platform_registry.py +332 -0
- gateway/platforms/__init__.py +45 -0
- gateway/platforms/_http_client_limits.py +84 -0
- gateway/platforms/api_server.py +4641 -0
- gateway/platforms/base.py +5735 -0
- gateway/platforms/bluebubbles.py +1048 -0
- gateway/platforms/helpers.py +403 -0
- gateway/platforms/msgraph_webhook.py +441 -0
- gateway/platforms/qqbot/__init__.py +91 -0
- gateway/platforms/qqbot/adapter.py +3237 -0
- gateway/platforms/qqbot/chunked_upload.py +602 -0
- gateway/platforms/qqbot/constants.py +74 -0
- gateway/platforms/qqbot/crypto.py +45 -0
- gateway/platforms/qqbot/keyboards.py +461 -0
- gateway/platforms/qqbot/onboard.py +220 -0
- gateway/platforms/qqbot/utils.py +70 -0
- gateway/platforms/signal.py +1701 -0
- gateway/platforms/signal_format.py +140 -0
- gateway/platforms/signal_rate_limit.py +369 -0
- gateway/platforms/webhook.py +1266 -0
- gateway/platforms/webhook_filters.py +302 -0
- gateway/platforms/weixin.py +2380 -0
- gateway/platforms/whatsapp_cloud.py +2067 -0
- gateway/platforms/whatsapp_common.py +510 -0
- gateway/platforms/yuanbao.py +5557 -0
- gateway/platforms/yuanbao_media.py +665 -0
- gateway/platforms/yuanbao_proto.py +1418 -0
- gateway/platforms/yuanbao_sticker.py +558 -0
- gateway/profile_routing.py +166 -0
- gateway/readiness.py +117 -0
- gateway/relay/__init__.py +836 -0
- gateway/relay/adapter.py +546 -0
- gateway/relay/auth.py +168 -0
- gateway/relay/descriptor.py +124 -0
- gateway/relay/transport.py +143 -0
- gateway/relay/ws_transport.py +809 -0
- gateway/response_filters.py +106 -0
- gateway/restart.py +492 -0
- gateway/restart_loop_guard.py +150 -0
- gateway/rich_sent_store.py +83 -0
- gateway/run.py +21689 -0
- gateway/runtime_footer.py +149 -0
- gateway/scale_to_zero.py +124 -0
- gateway/session.py +2603 -0
- gateway/session_context.py +346 -0
- gateway/shutdown_forensics.py +462 -0
- gateway/slash_access.py +229 -0
- gateway/slash_commands.py +4742 -0
- gateway/status.py +1554 -0
- gateway/status_phrases.py +227 -0
- gateway/sticker_cache.py +124 -0
- gateway/stream_consumer.py +1964 -0
- gateway/stream_dispatch.py +132 -0
- gateway/stream_events.py +171 -0
- gateway/whatsapp_identity.py +206 -0
- hermes_bootstrap.py +195 -0
- hermes_cli/__init__.py +105 -0
- hermes_cli/_parser.py +452 -0
- hermes_cli/_subprocess_compat.py +234 -0
- hermes_cli/active_sessions.py +357 -0
- hermes_cli/auth.py +8411 -0
- hermes_cli/auth_commands.py +780 -0
- hermes_cli/azure_detect.py +408 -0
- hermes_cli/backup.py +1376 -0
- hermes_cli/banner.py +742 -0
- hermes_cli/blueprint_cmd.py +318 -0
- hermes_cli/browser_connect.py +349 -0
- hermes_cli/build_info.py +51 -0
- hermes_cli/bundles.py +229 -0
- hermes_cli/callbacks.py +242 -0
- hermes_cli/checkpoints.py +244 -0
- hermes_cli/claw.py +809 -0
- hermes_cli/cli_agent_setup_mixin.py +690 -0
- hermes_cli/cli_commands_mixin.py +2738 -0
- hermes_cli/cli_output.py +77 -0
- hermes_cli/clipboard.py +494 -0
- hermes_cli/codex_models.py +220 -0
- hermes_cli/codex_runtime_plugin_migration.py +766 -0
- hermes_cli/codex_runtime_switch.py +288 -0
- hermes_cli/colors.py +38 -0
- hermes_cli/commands.py +2148 -0
- hermes_cli/completion.py +319 -0
- hermes_cli/config.py +7866 -0
- hermes_cli/console_engine.py +1876 -0
- hermes_cli/container_boot.py +576 -0
- hermes_cli/context_switch_guard.py +169 -0
- hermes_cli/copilot_auth.py +458 -0
- hermes_cli/cron.py +481 -0
- hermes_cli/curator.py +698 -0
- hermes_cli/curses_ui.py +872 -0
- hermes_cli/daemon.py +466 -0
- hermes_cli/dashboard_auth/__init__.py +48 -0
- hermes_cli/dashboard_auth/audit.py +89 -0
- hermes_cli/dashboard_auth/base.py +306 -0
- hermes_cli/dashboard_auth/cookies.py +338 -0
- hermes_cli/dashboard_auth/login_page.py +534 -0
- hermes_cli/dashboard_auth/middleware.py +516 -0
- hermes_cli/dashboard_auth/prefix.py +232 -0
- hermes_cli/dashboard_auth/public_paths.py +55 -0
- hermes_cli/dashboard_auth/registry.py +81 -0
- hermes_cli/dashboard_auth/routes.py +644 -0
- hermes_cli/dashboard_auth/token_auth.py +194 -0
- hermes_cli/dashboard_auth/ws_tickets.py +161 -0
- hermes_cli/dashboard_register.py +427 -0
- hermes_cli/debug.py +1017 -0
- hermes_cli/default_soul.py +161 -0
- hermes_cli/dep_ensure.py +163 -0
- hermes_cli/diagnostics_upload.py +138 -0
- hermes_cli/dingtalk_auth.py +291 -0
- hermes_cli/doctor.py +3156 -0
- hermes_cli/dump.py +444 -0
- hermes_cli/env_loader.py +403 -0
- hermes_cli/fallback_cmd.py +354 -0
- hermes_cli/fallback_config.py +135 -0
- hermes_cli/gateway.py +6847 -0
- hermes_cli/gateway_enroll.py +277 -0
- hermes_cli/gateway_windows.py +1682 -0
- hermes_cli/goals.py +1749 -0
- hermes_cli/gui_uninstall.py +285 -0
- hermes_cli/hooks.py +394 -0
- hermes_cli/input_sanitize.py +70 -0
- hermes_cli/inventory.py +627 -0
- hermes_cli/journey.py +357 -0
- hermes_cli/kanban.py +2845 -0
- hermes_cli/kanban_db.py +9135 -0
- hermes_cli/kanban_decompose.py +468 -0
- hermes_cli/kanban_diagnostics.py +1133 -0
- hermes_cli/kanban_specify.py +264 -0
- hermes_cli/kanban_swarm.py +278 -0
- hermes_cli/local_change_staging.py +574 -0
- hermes_cli/logs.py +397 -0
- hermes_cli/main.py +13832 -0
- hermes_cli/managed_scope.py +214 -0
- hermes_cli/managed_uv.py +254 -0
- hermes_cli/mcp_catalog.py +796 -0
- hermes_cli/mcp_config.py +1104 -0
- hermes_cli/mcp_picker.py +322 -0
- hermes_cli/mcp_security.py +181 -0
- hermes_cli/mcp_startup.py +130 -0
- hermes_cli/memory_oauth.py +83 -0
- hermes_cli/memory_providers.py +149 -0
- hermes_cli/memory_setup.py +518 -0
- hermes_cli/middleware.py +313 -0
- hermes_cli/migrate.py +115 -0
- hermes_cli/moa_cmd.py +141 -0
- hermes_cli/moa_config.py +367 -0
- hermes_cli/model_catalog.py +430 -0
- hermes_cli/model_cost_guard.py +134 -0
- hermes_cli/model_normalize.py +473 -0
- hermes_cli/model_setup_flows.py +3063 -0
- hermes_cli/model_switch.py +2498 -0
- hermes_cli/models.py +4210 -0
- hermes_cli/nous_account.py +789 -0
- hermes_cli/nous_auth_keepalive.py +189 -0
- hermes_cli/nous_billing.py +406 -0
- hermes_cli/nous_subscription.py +1285 -0
- hermes_cli/onepassword_secrets_cli.py +432 -0
- hermes_cli/oneshot.py +440 -0
- hermes_cli/pairing.py +115 -0
- hermes_cli/partial_compress.py +324 -0
- hermes_cli/pets.py +502 -0
- hermes_cli/platforms.py +84 -0
- hermes_cli/plugins.py +2466 -0
- hermes_cli/plugins_cmd.py +2017 -0
- hermes_cli/portal_cli.py +245 -0
- hermes_cli/profile_describer.py +288 -0
- hermes_cli/profile_distribution.py +726 -0
- hermes_cli/profiles.py +2238 -0
- hermes_cli/projects_cmd.py +335 -0
- hermes_cli/projects_db.py +727 -0
- hermes_cli/prompt_size.py +161 -0
- hermes_cli/provider_catalog.py +181 -0
- hermes_cli/providers.py +789 -0
- hermes_cli/proxy/__init__.py +20 -0
- hermes_cli/proxy/adapters/__init__.py +37 -0
- hermes_cli/proxy/adapters/base.py +108 -0
- hermes_cli/proxy/adapters/nous_portal.py +199 -0
- hermes_cli/proxy/adapters/xai.py +145 -0
- hermes_cli/proxy/cli.py +141 -0
- hermes_cli/proxy/server.py +304 -0
- hermes_cli/psutil_android.py +108 -0
- hermes_cli/pt_input_extras.py +120 -0
- hermes_cli/pty_bridge.py +286 -0
- hermes_cli/pty_session.py +195 -0
- hermes_cli/relaunch.py +205 -0
- hermes_cli/runtime_mcp_matrix.py +466 -0
- hermes_cli/runtime_provider.py +2097 -0
- hermes_cli/secret_prompt.py +126 -0
- hermes_cli/secrets_cli.py +600 -0
- hermes_cli/security_advisories.py +453 -0
- hermes_cli/security_audit.py +576 -0
- hermes_cli/security_audit_startup.py +282 -0
- hermes_cli/send_cmd.py +471 -0
- hermes_cli/service_manager.py +1123 -0
- hermes_cli/session_export.py +317 -0
- hermes_cli/session_export_html.py +871 -0
- hermes_cli/session_export_md.py +279 -0
- hermes_cli/session_filters.py +208 -0
- hermes_cli/session_listing.py +113 -0
- hermes_cli/session_recap.py +316 -0
- hermes_cli/setup.py +3405 -0
- hermes_cli/setup_whatsapp_cloud.py +541 -0
- hermes_cli/skills_config.py +202 -0
- hermes_cli/skills_hub.py +2013 -0
- hermes_cli/skin_engine.py +926 -0
- hermes_cli/slack_cli.py +224 -0
- hermes_cli/sqlite_util.py +49 -0
- hermes_cli/staging_activation.py +601 -0
- hermes_cli/status.py +622 -0
- hermes_cli/stdio.py +251 -0
- hermes_cli/subcommands/__init__.py +18 -0
- hermes_cli/subcommands/_shared.py +29 -0
- hermes_cli/subcommands/acp.py +52 -0
- hermes_cli/subcommands/auth.py +98 -0
- hermes_cli/subcommands/backup.py +38 -0
- hermes_cli/subcommands/claw.py +92 -0
- hermes_cli/subcommands/config.py +49 -0
- hermes_cli/subcommands/console.py +18 -0
- hermes_cli/subcommands/cron.py +163 -0
- hermes_cli/subcommands/daemon.py +67 -0
- hermes_cli/subcommands/dashboard.py +200 -0
- hermes_cli/subcommands/debug.py +100 -0
- hermes_cli/subcommands/doctor.py +35 -0
- hermes_cli/subcommands/dump.py +28 -0
- hermes_cli/subcommands/gateway.py +345 -0
- hermes_cli/subcommands/gui.py +63 -0
- hermes_cli/subcommands/hooks.py +77 -0
- hermes_cli/subcommands/import_cmd.py +31 -0
- hermes_cli/subcommands/insights.py +25 -0
- hermes_cli/subcommands/login.py +78 -0
- hermes_cli/subcommands/logout.py +28 -0
- hermes_cli/subcommands/logs.py +78 -0
- hermes_cli/subcommands/mcp.py +126 -0
- hermes_cli/subcommands/memory.py +53 -0
- hermes_cli/subcommands/model.py +62 -0
- hermes_cli/subcommands/pairing.py +36 -0
- hermes_cli/subcommands/plugins.py +106 -0
- hermes_cli/subcommands/postinstall.py +23 -0
- hermes_cli/subcommands/profile.py +203 -0
- hermes_cli/subcommands/prompt_size.py +36 -0
- hermes_cli/subcommands/report.py +50 -0
- hermes_cli/subcommands/security.py +62 -0
- hermes_cli/subcommands/setup.py +58 -0
- hermes_cli/subcommands/skills.py +315 -0
- hermes_cli/subcommands/slack.py +77 -0
- hermes_cli/subcommands/status.py +28 -0
- hermes_cli/subcommands/tools.py +95 -0
- hermes_cli/subcommands/uninstall.py +46 -0
- hermes_cli/subcommands/update.py +76 -0
- hermes_cli/subcommands/version.py +18 -0
- hermes_cli/subcommands/webhook.py +83 -0
- hermes_cli/subcommands/whatsapp.py +22 -0
- hermes_cli/suggestions_cmd.py +153 -0
- hermes_cli/telegram_managed_bot.py +358 -0
- hermes_cli/timeouts.py +82 -0
- hermes_cli/tips.py +485 -0
- hermes_cli/tools_config.py +4521 -0
- hermes_cli/toolset_validation.py +74 -0
- hermes_cli/transactional_updater.py +453 -0
- hermes_cli/uninstall.py +962 -0
- hermes_cli/update_contract.py +1011 -0
- hermes_cli/update_preflight.py +389 -0
- hermes_cli/urllib_security.py +139 -0
- hermes_cli/voice.py +846 -0
- hermes_cli/web_git.py +697 -0
- hermes_cli/web_server.py +14270 -0
- hermes_cli/webhook.py +306 -0
- hermes_cli/win_pty_bridge.py +179 -0
- hermes_cli/write_approval_commands.py +209 -0
- hermes_cli/xai_retirement.py +256 -0
- hermes_constants.py +1333 -0
- hermes_logging.py +791 -0
- hermes_state.py +7369 -0
- hermes_time.py +135 -0
- mcp_serve.py +1680 -0
- model_tools.py +1410 -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 +301 -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/cron_providers/__init__.py +356 -0
- plugins/cron_providers/chronos/__init__.py +241 -0
- plugins/cron_providers/chronos/_nas_client.py +123 -0
- plugins/cron_providers/chronos/plugin.yaml +9 -0
- plugins/cron_providers/chronos/verify.py +145 -0
- plugins/dashboard_auth/basic/__init__.py +491 -0
- plugins/dashboard_auth/basic/plugin.yaml +7 -0
- plugins/dashboard_auth/drain/__init__.py +291 -0
- plugins/dashboard_auth/drain/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 +858 -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 +588 -0
- plugins/disk-cleanup/plugin.yaml +7 -0
- plugins/google_meet/README.md +131 -0
- plugins/google_meet/__init__.py +103 -0
- plugins/google_meet/audio_bridge.py +248 -0
- plugins/google_meet/cli.py +476 -0
- plugins/google_meet/meet_bot.py +858 -0
- plugins/google_meet/node/__init__.py +54 -0
- plugins/google_meet/node/cli.py +134 -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/dist/index.js +726 -0
- plugins/hermes-achievements/dashboard/dist/style.css +146 -0
- plugins/hermes-achievements/dashboard/manifest.json +11 -0
- plugins/hermes-achievements/dashboard/plugin_api.py +1061 -0
- plugins/hermes-achievements/tests/test_achievement_engine.py +156 -0
- plugins/image_gen/deepinfra/__init__.py +335 -0
- plugins/image_gen/deepinfra/plugin.yaml +7 -0
- plugins/image_gen/fal/__init__.py +211 -0
- plugins/image_gen/fal/plugin.yaml +7 -0
- plugins/image_gen/krea/__init__.py +743 -0
- plugins/image_gen/krea/plugin.yaml +7 -0
- plugins/image_gen/openai/__init__.py +417 -0
- plugins/image_gen/openai/plugin.yaml +7 -0
- plugins/image_gen/openai-codex/__init__.py +641 -0
- plugins/image_gen/openai-codex/plugin.yaml +5 -0
- plugins/image_gen/openrouter/__init__.py +529 -0
- plugins/image_gen/openrouter/plugin.yaml +7 -0
- plugins/image_gen/xai/__init__.py +494 -0
- plugins/image_gen/xai/plugin.yaml +7 -0
- plugins/kanban/dashboard/dist/index.js +4108 -0
- plugins/kanban/dashboard/dist/style.css +1592 -0
- plugins/kanban/dashboard/manifest.json +14 -0
- plugins/kanban/dashboard/plugin_api.py +2499 -0
- plugins/memory/__init__.py +461 -0
- plugins/memory/byterover/README.md +41 -0
- plugins/memory/byterover/__init__.py +449 -0
- plugins/memory/byterover/plugin.yaml +9 -0
- plugins/memory/hindsight/README.md +147 -0
- plugins/memory/hindsight/__init__.py +1968 -0
- plugins/memory/hindsight/plugin.yaml +8 -0
- plugins/memory/holographic/README.md +36 -0
- plugins/memory/holographic/__init__.py +419 -0
- plugins/memory/holographic/holographic.py +203 -0
- plugins/memory/holographic/plugin.yaml +5 -0
- plugins/memory/holographic/retrieval.py +654 -0
- plugins/memory/holographic/store.py +644 -0
- plugins/memory/honcho/README.md +388 -0
- plugins/memory/honcho/__init__.py +1432 -0
- plugins/memory/honcho/cli.py +1868 -0
- plugins/memory/honcho/client.py +920 -0
- plugins/memory/honcho/oauth.py +371 -0
- plugins/memory/honcho/oauth_flow.py +431 -0
- plugins/memory/honcho/plugin.yaml +7 -0
- plugins/memory/honcho/session.py +1344 -0
- plugins/memory/mem0/README.md +187 -0
- plugins/memory/mem0/__init__.py +627 -0
- plugins/memory/mem0/_backend.py +298 -0
- plugins/memory/mem0/_oss_providers.py +84 -0
- plugins/memory/mem0/_setup.py +981 -0
- plugins/memory/mem0/plugin.yaml +5 -0
- plugins/memory/openviking/README.md +83 -0
- plugins/memory/openviking/__init__.py +3725 -0
- plugins/memory/openviking/plugin.yaml +8 -0
- plugins/memory/retaindb/README.md +40 -0
- plugins/memory/retaindb/__init__.py +771 -0
- plugins/memory/retaindb/plugin.yaml +7 -0
- plugins/memory/supermemory/README.md +111 -0
- plugins/memory/supermemory/__init__.py +1021 -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 +54 -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 +30 -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 +35 -0
- plugins/model-providers/copilot-acp/plugin.yaml +5 -0
- plugins/model-providers/custom/__init__.py +103 -0
- plugins/model-providers/custom/plugin.yaml +5 -0
- plugins/model-providers/deepinfra/__init__.py +81 -0
- plugins/model-providers/deepinfra/plugin.yaml +5 -0
- plugins/model-providers/deepseek/__init__.py +100 -0
- plugins/model-providers/deepseek/plugin.yaml +5 -0
- plugins/model-providers/fireworks/__init__.py +36 -0
- plugins/model-providers/fireworks/plugin.yaml +5 -0
- plugins/model-providers/gemini/__init__.py +61 -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 +97 -0
- plugins/model-providers/minimax/plugin.yaml +5 -0
- plugins/model-providers/nous/__init__.py +58 -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 +73 -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 +147 -0
- plugins/model-providers/opencode-zen/plugin.yaml +5 -0
- plugins/model-providers/openrouter/__init__.py +188 -0
- plugins/model-providers/openrouter/plugin.yaml +5 -0
- plugins/model-providers/qwen-oauth/__init__.py +108 -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/upstage/__init__.py +115 -0
- plugins/model-providers/upstage/plugin.yaml +5 -0
- plugins/model-providers/vertex/__init__.py +75 -0
- plugins/model-providers/vertex/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 +127 -0
- plugins/model-providers/zai/plugin.yaml +5 -0
- plugins/observability/langfuse/README.md +53 -0
- plugins/observability/langfuse/__init__.py +1137 -0
- plugins/observability/langfuse/plugin.yaml +14 -0
- plugins/observability/nemo_relay/README.md +559 -0
- plugins/observability/nemo_relay/__init__.py +1238 -0
- plugins/observability/nemo_relay/plugin.yaml +20 -0
- plugins/platforms/dingtalk/__init__.py +3 -0
- plugins/platforms/dingtalk/adapter.py +1707 -0
- plugins/platforms/dingtalk/plugin.yaml +39 -0
- plugins/platforms/discord/__init__.py +3 -0
- plugins/platforms/discord/adapter.py +7805 -0
- plugins/platforms/discord/plugin.yaml +34 -0
- plugins/platforms/discord/voice_mixer.py +379 -0
- plugins/platforms/email/__init__.py +3 -0
- plugins/platforms/email/adapter.py +1273 -0
- plugins/platforms/email/plugin.yaml +39 -0
- plugins/platforms/feishu/__init__.py +3 -0
- plugins/platforms/feishu/adapter.py +5673 -0
- plugins/platforms/feishu/feishu_comment.py +1382 -0
- plugins/platforms/feishu/feishu_comment_rules.py +429 -0
- plugins/platforms/feishu/feishu_meeting_invite.py +212 -0
- plugins/platforms/feishu/plugin.yaml +44 -0
- plugins/platforms/google_chat/__init__.py +3 -0
- plugins/platforms/google_chat/adapter.py +3348 -0
- plugins/platforms/google_chat/oauth.py +668 -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/matrix/__init__.py +3 -0
- plugins/platforms/matrix/adapter.py +4623 -0
- plugins/platforms/matrix/plugin.yaml +41 -0
- plugins/platforms/mattermost/__init__.py +3 -0
- plugins/platforms/mattermost/adapter.py +1281 -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 +190 -0
- plugins/platforms/photon/__init__.py +4 -0
- plugins/platforms/photon/adapter.py +1795 -0
- plugins/platforms/photon/auth.py +1046 -0
- plugins/platforms/photon/cli.py +440 -0
- plugins/platforms/photon/plugin.yaml +88 -0
- plugins/platforms/photon/sidecar/README.md +52 -0
- plugins/platforms/raft/__init__.py +3 -0
- plugins/platforms/raft/adapter.py +850 -0
- plugins/platforms/raft/plugin.yaml +19 -0
- plugins/platforms/simplex/__init__.py +3 -0
- plugins/platforms/simplex/adapter.py +1313 -0
- plugins/platforms/simplex/plugin.yaml +56 -0
- plugins/platforms/slack/__init__.py +3 -0
- plugins/platforms/slack/adapter.py +5148 -0
- plugins/platforms/slack/block_kit.py +512 -0
- plugins/platforms/slack/plugin.yaml +39 -0
- plugins/platforms/sms/__init__.py +3 -0
- plugins/platforms/sms/adapter.py +510 -0
- plugins/platforms/sms/plugin.yaml +32 -0
- plugins/platforms/teams/__init__.py +3 -0
- plugins/platforms/teams/adapter.py +1448 -0
- plugins/platforms/teams/plugin.yaml +48 -0
- plugins/platforms/telegram/__init__.py +3 -0
- plugins/platforms/telegram/adapter.py +9108 -0
- plugins/platforms/telegram/plugin.yaml +35 -0
- plugins/platforms/telegram/telegram_ids.py +51 -0
- plugins/platforms/telegram/telegram_network.py +269 -0
- plugins/platforms/wecom/__init__.py +3 -0
- plugins/platforms/wecom/adapter.py +1889 -0
- plugins/platforms/wecom/callback_adapter.py +444 -0
- plugins/platforms/wecom/plugin.yaml +52 -0
- plugins/platforms/wecom/wecom_crypto.py +142 -0
- plugins/platforms/whatsapp/__init__.py +3 -0
- plugins/platforms/whatsapp/adapter.py +1795 -0
- plugins/platforms/whatsapp/plugin.yaml +33 -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/simplicio/__init__.py +245 -0
- plugins/simplicio/plugin.yaml +9 -0
- plugins/simplicio/skill_recall.py +233 -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 +470 -0
- plugins/teams_pipeline/meetings.py +333 -0
- plugins/teams_pipeline/models.py +350 -0
- plugins/teams_pipeline/pipeline.py +699 -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/token_saver/__init__.py +42 -0
- plugins/token_saver/plugin.yaml +7 -0
- plugins/token_saver/token_saver.py +228 -0
- plugins/video_gen/deepinfra/__init__.py +90 -0
- plugins/video_gen/deepinfra/plugin.yaml +7 -0
- plugins/video_gen/fal/__init__.py +620 -0
- plugins/video_gen/fal/plugin.yaml +7 -0
- plugins/video_gen/xai/__init__.py +925 -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 +141 -0
- plugins/web/ddgs/__init__.py +15 -0
- plugins/web/ddgs/plugin.yaml +7 -0
- plugins/web/ddgs/provider.py +158 -0
- plugins/web/exa/__init__.py +15 -0
- plugins/web/exa/plugin.yaml +7 -0
- plugins/web/exa/provider.py +216 -0
- plugins/web/firecrawl/__init__.py +28 -0
- plugins/web/firecrawl/plugin.yaml +7 -0
- plugins/web/firecrawl/provider.py +617 -0
- plugins/web/parallel/__init__.py +16 -0
- plugins/web/parallel/plugin.yaml +7 -0
- plugins/web/parallel/provider.py +297 -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 +224 -0
- plugins/web/xai/__init__.py +14 -0
- plugins/web/xai/plugin.yaml +7 -0
- plugins/web/xai/provider.py +557 -0
- providers/__init__.py +191 -0
- providers/base.py +232 -0
- run_agent.py +5734 -0
- simplicio_agent/__init__.py +44 -0
- simplicio_agent/__init__.pyi +10 -0
- simplicio_agent/__main__.py +12 -0
- simplicio_agent/asolaria.py +158 -0
- simplicio_agent/attention_schema.py +88 -0
- simplicio_agent/compat.py +39 -0
- simplicio_agent/compat.pyi +6 -0
- simplicio_agent/entry.py +15 -0
- simplicio_agent/product_identity.py +39 -0
- simplicio_agent/public_contract.py +85 -0
- simplicio_agent/py.typed +1 -0
- simplicio_agent-0.25.0.data/data/locales/af.yaml +408 -0
- simplicio_agent-0.25.0.data/data/locales/de.yaml +408 -0
- simplicio_agent-0.25.0.data/data/locales/en.yaml +420 -0
- simplicio_agent-0.25.0.data/data/locales/es.yaml +405 -0
- simplicio_agent-0.25.0.data/data/locales/fr.yaml +408 -0
- simplicio_agent-0.25.0.data/data/locales/ga.yaml +412 -0
- simplicio_agent-0.25.0.data/data/locales/hu.yaml +408 -0
- simplicio_agent-0.25.0.data/data/locales/it.yaml +408 -0
- simplicio_agent-0.25.0.data/data/locales/ja.yaml +408 -0
- simplicio_agent-0.25.0.data/data/locales/ko.yaml +408 -0
- simplicio_agent-0.25.0.data/data/locales/pt.yaml +408 -0
- simplicio_agent-0.25.0.data/data/locales/ru.yaml +408 -0
- simplicio_agent-0.25.0.data/data/locales/tr.yaml +408 -0
- simplicio_agent-0.25.0.data/data/locales/uk.yaml +408 -0
- simplicio_agent-0.25.0.data/data/locales/zh-hant.yaml +408 -0
- simplicio_agent-0.25.0.data/data/locales/zh.yaml +408 -0
- simplicio_agent-0.25.0.data/data/optional-mcps/linear/manifest.yaml +38 -0
- simplicio_agent-0.25.0.data/data/optional-mcps/n8n/manifest.yaml +81 -0
- simplicio_agent-0.25.0.data/data/runtime/runtime.lock +22 -0
- simplicio_agent-0.25.0.dist-info/METADATA +458 -0
- simplicio_agent-0.25.0.dist-info/RECORD +1148 -0
- simplicio_agent-0.25.0.dist-info/WHEEL +5 -0
- simplicio_agent-0.25.0.dist-info/entry_points.txt +6 -0
- simplicio_agent-0.25.0.dist-info/licenses/LICENSE +21 -0
- simplicio_agent-0.25.0.dist-info/top_level.txt +24 -0
- tools/__init__.py +25 -0
- tools/_fastjson.py +142 -0
- tools/alias_registry.py +490 -0
- tools/ansi_strip.py +44 -0
- tools/approval.py +3436 -0
- tools/async_delegation.py +1037 -0
- tools/bench_latency.py +83 -0
- tools/benchmark_gate.py +506 -0
- tools/benchmark_program.py +474 -0
- tools/binary_extensions.py +42 -0
- tools/blueprints.py +325 -0
- tools/bootstrap_transaction_client.py +181 -0
- tools/browser_camofox.py +949 -0
- tools/browser_camofox_state.py +47 -0
- tools/browser_cdp_tool.py +681 -0
- tools/browser_dialog_tool.py +148 -0
- tools/browser_interaction_contract.py +104 -0
- tools/browser_supervisor.py +1517 -0
- tools/browser_tool.py +4805 -0
- tools/budget_config.py +114 -0
- tools/bundle_manifest.py +128 -0
- tools/checkpoint_manager.py +1691 -0
- tools/clarify_gateway.py +315 -0
- tools/clarify_tool.py +191 -0
- tools/cli_surface_contract.py +428 -0
- tools/close_terminal_tool.py +71 -0
- tools/code_execution_tool.py +1910 -0
- tools/command_invocation_manifest.py +457 -0
- tools/computer_use/__init__.py +48 -0
- tools/computer_use/backend.py +210 -0
- tools/computer_use/cua_backend.py +2346 -0
- tools/computer_use/doctor.py +288 -0
- tools/computer_use/killswitch.py +65 -0
- tools/computer_use/permissions.py +200 -0
- tools/computer_use/schema.py +238 -0
- tools/computer_use/tool.py +1174 -0
- tools/computer_use/vision_routing.py +204 -0
- tools/computer_use_tool.py +39 -0
- tools/credential_files.py +481 -0
- tools/cronjob_tools.py +1147 -0
- tools/daemon_hot_path.py +538 -0
- tools/daemon_pool.py +64 -0
- tools/debug_helpers.py +105 -0
- tools/delegate_tool.py +3528 -0
- tools/desktop_layout_contract.py +310 -0
- tools/discord_tool.py +1119 -0
- tools/discovery_cache.py +153 -0
- tools/env_passthrough.py +184 -0
- tools/env_probe.py +275 -0
- tools/environments/__init__.py +14 -0
- tools/environments/base.py +1128 -0
- tools/environments/daytona.py +270 -0
- tools/environments/docker.py +1460 -0
- tools/environments/file_sync.py +465 -0
- tools/environments/local.py +1385 -0
- tools/environments/managed_modal.py +282 -0
- tools/environments/modal.py +478 -0
- tools/environments/modal_utils.py +210 -0
- tools/environments/singularity.py +265 -0
- tools/environments/ssh.py +375 -0
- tools/equivalence_gate.py +569 -0
- tools/fal_common.py +163 -0
- tools/feishu_doc_tool.py +138 -0
- tools/feishu_drive_tool.py +431 -0
- tools/file_operations.py +2514 -0
- tools/file_state.py +332 -0
- tools/file_tools.py +1952 -0
- tools/fuzzy_match.py +950 -0
- tools/golden_path.py +371 -0
- tools/homeassistant_tool.py +513 -0
- tools/hook_output_spill.py +236 -0
- tools/identity_scan.py +243 -0
- tools/image_generation_tool.py +1668 -0
- tools/image_source.py +338 -0
- tools/interrupt.py +113 -0
- tools/kanban_tools.py +1681 -0
- tools/kernel_binding.py +1255 -0
- tools/lazy_deps.py +970 -0
- tools/live_commit_attestation.py +303 -0
- tools/locale_contract.py +223 -0
- tools/machine_contracts.py +332 -0
- tools/managed_tool_gateway.py +192 -0
- tools/mcp_capability_matrix.py +83 -0
- tools/mcp_oauth.py +948 -0
- tools/mcp_oauth_manager.py +720 -0
- tools/mcp_stdio_watchdog.py +184 -0
- tools/mcp_tool.py +5832 -0
- tools/memory_tool.py +1153 -0
- tools/microsoft_graph_auth.py +245 -0
- tools/microsoft_graph_client.py +408 -0
- tools/namespace_identity_audit.py +524 -0
- tools/neutts_synth.py +104 -0
- tools/openrouter_client.py +33 -0
- tools/osv_check.py +169 -0
- tools/patch_parser.py +637 -0
- tools/path_security.py +43 -0
- tools/perf_gate/__init__.py +12 -0
- tools/perf_gate/bootstrap_baseline.py +62 -0
- tools/perf_gate/compare.py +163 -0
- tools/perf_gate/runner.py +95 -0
- tools/perf_integration_manifest.py +814 -0
- tools/process_registry.py +2329 -0
- tools/project_tools.py +189 -0
- tools/promotion_controller.py +471 -0
- tools/prompt_microkernel_integration_receipt.py +144 -0
- tools/public_docs_audit.py +563 -0
- tools/read_extract.py +248 -0
- tools/read_terminal_tool.py +94 -0
- tools/registry.py +821 -0
- tools/release_gate.py +897 -0
- tools/release_gate_scan.py +494 -0
- tools/release_handoff.py +107 -0
- tools/release_manifest.py +202 -0
- tools/rename_guard/__init__.py +7 -0
- tools/rename_guard/artifact_scan.py +257 -0
- tools/rename_guard/bootstrap_baseline.py +78 -0
- tools/rename_guard/scanner.py +188 -0
- tools/runtime_handshake.py +256 -0
- tools/runtime_lifecycle.py +589 -0
- tools/runtime_lock_contract.py +212 -0
- tools/runtime_manager.py +1084 -0
- tools/schema_sanitizer.py +501 -0
- tools/self_mutation_kernel.py +298 -0
- tools/send_message_tool.py +1965 -0
- tools/session_search_tool.py +923 -0
- tools/shadow_effects.py +601 -0
- tools/simplicio_bridge.py +716 -0
- tools/simplicio_transport.py +680 -0
- tools/skill_manager_tool.py +1559 -0
- tools/skill_provenance.py +78 -0
- tools/skill_usage.py +947 -0
- tools/skills_ast_audit.py +133 -0
- tools/skills_guard.py +1153 -0
- tools/skills_hub.py +4071 -0
- tools/skills_sync.py +1182 -0
- tools/skills_tool.py +1760 -0
- tools/slash_confirm.py +167 -0
- tools/software_builder_manifest.py +349 -0
- tools/terminal_tool.py +3062 -0
- tools/thread_context.py +120 -0
- tools/threat_patterns.py +284 -0
- tools/tirith_security.py +871 -0
- tools/todo_tool.py +403 -0
- tools/tool_backend_helpers.py +182 -0
- tools/tool_output_limits.py +110 -0
- tools/tool_result_storage.py +254 -0
- tools/tool_search.py +735 -0
- tools/transaction_primitives.py +1085 -0
- tools/transcription_tools.py +1893 -0
- tools/tts_tool.py +3152 -0
- tools/url_safety.py +503 -0
- tools/video_generation_tool.py +575 -0
- tools/vision_tools.py +1897 -0
- tools/voice_mode.py +1218 -0
- tools/wake_word.py +182 -0
- tools/watcher_gate.py +481 -0
- tools/web_tools.py +1240 -0
- tools/website_policy.py +283 -0
- tools/write_approval.py +493 -0
- tools/x_search_tool.py +525 -0
- tools/xai_http.py +277 -0
- tools/xai_video_tools.py +209 -0
- tools/yuanbao_tools.py +737 -0
- toolset_distributions.py +358 -0
- toolsets.py +971 -0
- trajectory_compressor.py +1574 -0
- tui_gateway/__init__.py +0 -0
- tui_gateway/entry.py +381 -0
- tui_gateway/event_publisher.py +126 -0
- tui_gateway/git_probe.py +193 -0
- tui_gateway/loop_noise.py +83 -0
- tui_gateway/project_tree.py +640 -0
- tui_gateway/render.py +49 -0
- tui_gateway/server.py +14516 -0
- tui_gateway/slash_worker.py +179 -0
- tui_gateway/transport.py +219 -0
- tui_gateway/ws.py +466 -0
- utils.py +546 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"""Thin HTTP client for the agent → NAS ``agent-cron`` endpoints (Chronos).
|
|
2
|
+
|
|
3
|
+
The Chronos provider speaks ONLY to NAS — it names no scheduler vendor and
|
|
4
|
+
holds no scheduler credentials. NAS owns the external scheduler (an internal
|
|
5
|
+
implementation detail) and that scheduler's account; the agent just asks NAS to
|
|
6
|
+
"arm a one-shot at time T" / "cancel" / "list", authenticated with the agent's
|
|
7
|
+
existing Nous Portal access token (the same token it already uses to call the
|
|
8
|
+
portal — no new secret).
|
|
9
|
+
|
|
10
|
+
Wire contract: ``docs/chronos-managed-cron-contract.md``.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
import logging
|
|
16
|
+
from typing import Any, Dict, List, Optional
|
|
17
|
+
|
|
18
|
+
logger = logging.getLogger("cron.chronos")
|
|
19
|
+
|
|
20
|
+
# Endpoint paths under the portal base URL.
|
|
21
|
+
_PROVISION_PATH = "/api/agent-cron/provision"
|
|
22
|
+
_CANCEL_PATH = "/api/agent-cron/cancel"
|
|
23
|
+
_LIST_PATH = "/api/agent-cron/list"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class NasCronClientError(RuntimeError):
|
|
27
|
+
"""Raised when a NAS agent-cron call fails (non-2xx or transport error)."""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class NasCronClient:
|
|
31
|
+
"""Minimal client for the agent→NAS provision/cancel/list endpoints.
|
|
32
|
+
|
|
33
|
+
Uses the agent's refresh-aware Nous access token for auth. No scheduler
|
|
34
|
+
vendor, no scheduler creds — NAS hides all of that behind these three calls.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, portal_url: str, *, timeout_seconds: float = 15.0) -> None:
|
|
38
|
+
self.portal_url = portal_url.rstrip("/")
|
|
39
|
+
self.timeout_seconds = timeout_seconds
|
|
40
|
+
|
|
41
|
+
# -- auth -------------------------------------------------------------
|
|
42
|
+
|
|
43
|
+
def _access_token(self) -> str:
|
|
44
|
+
"""The agent's existing Nous Portal access token (refresh-aware)."""
|
|
45
|
+
from hermes_cli.auth import resolve_nous_access_token
|
|
46
|
+
return resolve_nous_access_token()
|
|
47
|
+
|
|
48
|
+
def _headers(self) -> Dict[str, str]:
|
|
49
|
+
return {
|
|
50
|
+
"Authorization": f"Bearer {self._access_token()}",
|
|
51
|
+
"Content-Type": "application/json",
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
# -- HTTP -------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
def _post(self, path: str, body: Dict[str, Any]) -> Dict[str, Any]:
|
|
57
|
+
import requests # lazy: agent already depends on requests
|
|
58
|
+
|
|
59
|
+
url = f"{self.portal_url}{path}"
|
|
60
|
+
try:
|
|
61
|
+
resp = requests.post(
|
|
62
|
+
url, json=body, headers=self._headers(), timeout=self.timeout_seconds
|
|
63
|
+
)
|
|
64
|
+
except Exception as e:
|
|
65
|
+
raise NasCronClientError(f"POST {path} failed: {e}") from e
|
|
66
|
+
if resp.status_code // 100 != 2:
|
|
67
|
+
raise NasCronClientError(
|
|
68
|
+
f"POST {path} returned {resp.status_code}: {resp.text[:200]}"
|
|
69
|
+
)
|
|
70
|
+
try:
|
|
71
|
+
return resp.json() if resp.content else {}
|
|
72
|
+
except Exception:
|
|
73
|
+
return {}
|
|
74
|
+
|
|
75
|
+
def _get(self, path: str, params: Dict[str, Any]) -> Dict[str, Any]:
|
|
76
|
+
import requests
|
|
77
|
+
|
|
78
|
+
url = f"{self.portal_url}{path}"
|
|
79
|
+
try:
|
|
80
|
+
resp = requests.get(
|
|
81
|
+
url, params=params, headers=self._headers(), timeout=self.timeout_seconds
|
|
82
|
+
)
|
|
83
|
+
except Exception as e:
|
|
84
|
+
raise NasCronClientError(f"GET {path} failed: {e}") from e
|
|
85
|
+
if resp.status_code // 100 != 2:
|
|
86
|
+
raise NasCronClientError(
|
|
87
|
+
f"GET {path} returned {resp.status_code}: {resp.text[:200]}"
|
|
88
|
+
)
|
|
89
|
+
try:
|
|
90
|
+
return resp.json() if resp.content else {}
|
|
91
|
+
except Exception:
|
|
92
|
+
return {}
|
|
93
|
+
|
|
94
|
+
# -- endpoints --------------------------------------------------------
|
|
95
|
+
|
|
96
|
+
def provision(self, *, job_id: str, fire_at: str, agent_callback_url: str,
|
|
97
|
+
dedup_key: str) -> Dict[str, Any]:
|
|
98
|
+
"""Ask NAS to arm a one-shot for ``job_id`` at ``fire_at`` (ISO 8601).
|
|
99
|
+
|
|
100
|
+
``dedup_key`` (``{job_id}:{fire_at}``) makes re-arming the same fire
|
|
101
|
+
idempotent NAS-side. Returns the NAS response (e.g. ``{schedule_id}``).
|
|
102
|
+
"""
|
|
103
|
+
return self._post(_PROVISION_PATH, {
|
|
104
|
+
"job_id": job_id,
|
|
105
|
+
"fire_at": fire_at,
|
|
106
|
+
"agent_callback_url": agent_callback_url,
|
|
107
|
+
"dedup_key": dedup_key,
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
def cancel(self, *, job_id: str) -> Dict[str, Any]:
|
|
111
|
+
"""Ask NAS to cancel any armed one-shot for ``job_id``."""
|
|
112
|
+
return self._post(_CANCEL_PATH, {"job_id": job_id})
|
|
113
|
+
|
|
114
|
+
def list_armed(self) -> List[Dict[str, Any]]:
|
|
115
|
+
"""List the one-shots NAS currently has armed for this agent.
|
|
116
|
+
|
|
117
|
+
Returns a list of ``{job_id, fire_at, schedule_id}``. Best-effort: used
|
|
118
|
+
by reconcile to find orphaned arms on a cold process; on error the
|
|
119
|
+
caller falls back to idempotent re-arm of all desired jobs.
|
|
120
|
+
"""
|
|
121
|
+
data = self._get(_LIST_PATH, {})
|
|
122
|
+
items = data.get("armed") if isinstance(data, dict) else None
|
|
123
|
+
return items if isinstance(items, list) else []
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
name: chronos
|
|
2
|
+
description: >-
|
|
3
|
+
Chronos — NAS-mediated managed cron provider for scale-to-zero hosted agents.
|
|
4
|
+
Delegates the "wake me at time T" trigger to Nous infrastructure so an idle
|
|
5
|
+
gateway can scale to zero and still fire cron jobs. The agent computes each
|
|
6
|
+
job's next-fire time and asks NAS to arm a one-shot; NAS calls the agent back
|
|
7
|
+
at fire time over an authenticated webhook. Inert unless cron.provider=chronos.
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
author: Nous Research
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"""Inbound cron-fire token verification for Chronos (Phase 4E.1).
|
|
2
|
+
|
|
3
|
+
When NAS relays an external scheduler fire to the agent, it POSTs
|
|
4
|
+
``/api/cron/fire`` with a short-lived NAS-minted JWT. This module verifies that
|
|
5
|
+
JWT before any job runs — the security boundary for remotely-triggered job
|
|
6
|
+
execution.
|
|
7
|
+
|
|
8
|
+
We verify a NAS-minted JWT (the trust path the agent already has) rather than
|
|
9
|
+
let an external scheduler call the agent directly: the scheduler signs with
|
|
10
|
+
NAS's keys, which the agent doesn't (and shouldn't) hold. See the plan's DQ-4.
|
|
11
|
+
|
|
12
|
+
The verifier is pluggable (``get_fire_verifier``) so the escape-hatch mode
|
|
13
|
+
(direct per-job cron-key) can swap in later with no handler change.
|
|
14
|
+
|
|
15
|
+
Crypto is delegated to PyJWT (already a declared dependency) — we do NOT
|
|
16
|
+
hand-roll JWT verification.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
import logging
|
|
22
|
+
import threading
|
|
23
|
+
from typing import Any, Callable, Dict, Optional
|
|
24
|
+
|
|
25
|
+
logger = logging.getLogger("cron.chronos.verify")
|
|
26
|
+
|
|
27
|
+
# The purpose claim that scopes a token to the fire endpoint. A general agent
|
|
28
|
+
# JWT (without this claim) must NOT be replayable against /api/cron/fire.
|
|
29
|
+
_FIRE_PURPOSE = "cron_fire"
|
|
30
|
+
|
|
31
|
+
# Process-wide cache of PyJWKClient instances, keyed by JWKS URL.
|
|
32
|
+
#
|
|
33
|
+
# WHY THIS EXISTS: a PyJWKClient caches the fetched JWKS (signing keys) on the
|
|
34
|
+
# INSTANCE. Constructing a fresh client per fire therefore threw that cache
|
|
35
|
+
# away and forced a synchronous JWKS HTTP GET to the portal on EVERY fire. Under
|
|
36
|
+
# a burst of concurrent fires (an instance with several cron jobs firing in the
|
|
37
|
+
# same window) that fanned out into N simultaneous JWKS fetches, which the
|
|
38
|
+
# portal rate-limited (HTTP 403) — verification then failed and the agent
|
|
39
|
+
# answered 401. When a fetch was merely slow rather than rate-limited, it blocked
|
|
40
|
+
# the event loop long enough that the fire webhook could not return its 202
|
|
41
|
+
# before the relay's 30s timeout (observed in prod as relay 504s concentrated on
|
|
42
|
+
# high-job-count instances). Reusing one client per URL keeps the signing keys
|
|
43
|
+
# cached (NAS keys rotate rarely), so the steady state is zero JWKS fetches per
|
|
44
|
+
# fire. See docs/chronos-managed-cron-contract.md and the betterstack triage.
|
|
45
|
+
_JWK_CLIENTS: Dict[str, Any] = {}
|
|
46
|
+
_JWK_CLIENTS_LOCK = threading.Lock()
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _get_jwk_client(jwks_url: str) -> Any:
|
|
50
|
+
"""Return a process-cached PyJWKClient for ``jwks_url`` (one per URL).
|
|
51
|
+
|
|
52
|
+
PyJWKClient does its own key caching internally (``cache_keys``/``lifespan``);
|
|
53
|
+
the whole point here is to reuse the SAME instance across fires so that cache
|
|
54
|
+
is actually hit instead of discarded. Double-checked-locked so concurrent
|
|
55
|
+
fires resolve to a single shared client without racing.
|
|
56
|
+
"""
|
|
57
|
+
client = _JWK_CLIENTS.get(jwks_url)
|
|
58
|
+
if client is not None:
|
|
59
|
+
return client
|
|
60
|
+
with _JWK_CLIENTS_LOCK:
|
|
61
|
+
client = _JWK_CLIENTS.get(jwks_url)
|
|
62
|
+
if client is None:
|
|
63
|
+
from jwt import PyJWKClient
|
|
64
|
+
|
|
65
|
+
client = PyJWKClient(jwks_url)
|
|
66
|
+
_JWK_CLIENTS[jwks_url] = client
|
|
67
|
+
return client
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def verify_nas_fire_token(
|
|
71
|
+
*,
|
|
72
|
+
token: str,
|
|
73
|
+
expected_audience: str,
|
|
74
|
+
jwks_or_key: Optional[str] = None,
|
|
75
|
+
issuer: Optional[str] = None,
|
|
76
|
+
leeway_seconds: int = 30,
|
|
77
|
+
) -> Optional[Dict[str, Any]]:
|
|
78
|
+
"""Verify a NAS-minted cron-fire JWT. Return decoded claims, or None.
|
|
79
|
+
|
|
80
|
+
Checks (all must pass):
|
|
81
|
+
- signature against the NAS JWKS (``jwks_or_key`` is a JWKS URL) — RS256
|
|
82
|
+
family; symmetric secrets are rejected (NAS signs asymmetrically).
|
|
83
|
+
- ``aud`` == ``expected_audience`` (this agent: ``agent:{instance_id}``).
|
|
84
|
+
- ``exp`` / ``nbf`` within ``leeway_seconds``.
|
|
85
|
+
- ``iss`` == ``issuer`` when an issuer is configured.
|
|
86
|
+
- ``purpose`` == ``"cron_fire"`` — so a general agent JWT can't be
|
|
87
|
+
replayed against the fire endpoint.
|
|
88
|
+
|
|
89
|
+
Returns None (never raises) on any failure, so the handler can answer 401
|
|
90
|
+
without leaking which check failed.
|
|
91
|
+
"""
|
|
92
|
+
if not token or not expected_audience:
|
|
93
|
+
return None
|
|
94
|
+
if not jwks_or_key:
|
|
95
|
+
# No verification key configured → cannot verify → refuse. We never
|
|
96
|
+
# fall back to unsigned decode for a security boundary.
|
|
97
|
+
logger.warning("cron fire: no JWKS/key configured; refusing token")
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
try:
|
|
101
|
+
import jwt
|
|
102
|
+
|
|
103
|
+
# Resolve the signing key from the JWKS endpoint by the token's kid.
|
|
104
|
+
signing_key = None
|
|
105
|
+
if jwks_or_key.startswith("http://") or jwks_or_key.startswith("https://"):
|
|
106
|
+
# Reuse a process-cached client so the JWKS fetch is amortised across
|
|
107
|
+
# fires (a fresh client per fire re-fetched the JWKS every time and,
|
|
108
|
+
# under concurrent fires, tripped the portal's rate limit → 403 →
|
|
109
|
+
# 401, or blocked the event loop past the relay's 30s timeout → 504).
|
|
110
|
+
jwk_client = _get_jwk_client(jwks_or_key)
|
|
111
|
+
signing_key = jwk_client.get_signing_key_from_jwt(token).key
|
|
112
|
+
else:
|
|
113
|
+
# A PEM public key passed inline (test / pinned-key deployments).
|
|
114
|
+
signing_key = jwks_or_key
|
|
115
|
+
|
|
116
|
+
options = {"require": ["exp", "aud"]}
|
|
117
|
+
decode_kwargs: Dict[str, Any] = dict(
|
|
118
|
+
algorithms=["RS256", "RS384", "RS512", "ES256", "ES384"],
|
|
119
|
+
audience=expected_audience,
|
|
120
|
+
leeway=leeway_seconds,
|
|
121
|
+
options=options,
|
|
122
|
+
)
|
|
123
|
+
if issuer:
|
|
124
|
+
decode_kwargs["issuer"] = issuer
|
|
125
|
+
|
|
126
|
+
claims = jwt.decode(token, signing_key, **decode_kwargs)
|
|
127
|
+
except Exception as e:
|
|
128
|
+
logger.warning("cron fire: token verification failed: %s", e)
|
|
129
|
+
return None
|
|
130
|
+
|
|
131
|
+
if claims.get("purpose") != _FIRE_PURPOSE:
|
|
132
|
+
logger.warning("cron fire: token missing/!=%s purpose claim", _FIRE_PURPOSE)
|
|
133
|
+
return None
|
|
134
|
+
|
|
135
|
+
return claims
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def get_fire_verifier() -> Callable[..., Optional[Dict[str, Any]]]:
|
|
139
|
+
"""Return the active inbound-fire verifier.
|
|
140
|
+
|
|
141
|
+
Default = the NAS-JWT verifier. The DQ-4 escape hatch (direct per-job
|
|
142
|
+
cron-key) would return a cron-key verifier here instead, selected by config
|
|
143
|
+
— so the webhook handler never changes when the auth mode is swapped.
|
|
144
|
+
"""
|
|
145
|
+
return verify_nas_fire_token
|