maop-orchestrator 5.3.0__tar.gz

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.
Files changed (897) hide show
  1. maop_orchestrator-5.3.0/.gitignore +194 -0
  2. maop_orchestrator-5.3.0/Dockerfile +157 -0
  3. maop_orchestrator-5.3.0/PKG-INFO +87 -0
  4. maop_orchestrator-5.3.0/README.md +21 -0
  5. maop_orchestrator-5.3.0/SECURITY.md +123 -0
  6. maop_orchestrator-5.3.0/conftest.py +64 -0
  7. maop_orchestrator-5.3.0/docker-entrypoint.sh +38 -0
  8. maop_orchestrator-5.3.0/maop/__init__.py +7 -0
  9. maop_orchestrator-5.3.0/maop/__main__.py +5 -0
  10. maop_orchestrator-5.3.0/maop/ab_test_framework.py +377 -0
  11. maop_orchestrator-5.3.0/maop/agent_strategy_learner.py +444 -0
  12. maop_orchestrator-5.3.0/maop/cache_evolver.py +422 -0
  13. maop_orchestrator-5.3.0/maop/cli.py +747 -0
  14. maop_orchestrator-5.3.0/maop/concurrency.py +474 -0
  15. maop_orchestrator-5.3.0/maop/config/README.md +73 -0
  16. maop_orchestrator-5.3.0/maop/config/__init__.py +29 -0
  17. maop_orchestrator-5.3.0/maop/config/agents_validator.py +137 -0
  18. maop_orchestrator-5.3.0/maop/config/edition.py +541 -0
  19. maop_orchestrator-5.3.0/maop/config/env.py +153 -0
  20. maop_orchestrator-5.3.0/maop/config/hot_reload.py +234 -0
  21. maop_orchestrator-5.3.0/maop/config/loader.py +324 -0
  22. maop_orchestrator-5.3.0/maop/config/mcp_marketplace.yaml +29 -0
  23. maop_orchestrator-5.3.0/maop/config/settings.py +423 -0
  24. maop_orchestrator-5.3.0/maop/control/__init__.py +5 -0
  25. maop_orchestrator-5.3.0/maop/control/audit.py +117 -0
  26. maop_orchestrator-5.3.0/maop/control/plane.py +224 -0
  27. maop_orchestrator-5.3.0/maop/core/ARCHITECTURE.md +190 -0
  28. maop_orchestrator-5.3.0/maop/core/__init__.py +60 -0
  29. maop_orchestrator-5.3.0/maop/core/agent/__init__.py +419 -0
  30. maop_orchestrator-5.3.0/maop/core/agent/adapters/__init__.py +71 -0
  31. maop_orchestrator-5.3.0/maop/core/agent/adapters/adapter_factory.py +177 -0
  32. maop_orchestrator-5.3.0/maop/core/agent/adapters/cli_adapter.py +303 -0
  33. maop_orchestrator-5.3.0/maop/core/agent/adapters/desktop_app_adapter.py +403 -0
  34. maop_orchestrator-5.3.0/maop/core/agent/adapters/http_adapter.py +230 -0
  35. maop_orchestrator-5.3.0/maop/core/agent/adapters/ide_extension_adapter.py +517 -0
  36. maop_orchestrator-5.3.0/maop/core/agent/adapters/mcp_bridge_adapter.py +196 -0
  37. maop_orchestrator-5.3.0/maop/core/agent/adapters/vibe_coding_adapter.py +406 -0
  38. maop_orchestrator-5.3.0/maop/core/agent/adapters/web_adapter.py +219 -0
  39. maop_orchestrator-5.3.0/maop/core/agent/analyzer/__init__.py +20 -0
  40. maop_orchestrator-5.3.0/maop/core/agent/analyzer/analyzer.py +752 -0
  41. maop_orchestrator-5.3.0/maop/core/agent/auth/__init__.py +23 -0
  42. maop_orchestrator-5.3.0/maop/core/agent/auth/agent_proxy_gateway.py +489 -0
  43. maop_orchestrator-5.3.0/maop/core/agent/auth/credential_vault.py +531 -0
  44. maop_orchestrator-5.3.0/maop/core/agent/auth/harness_auth.py +430 -0
  45. maop_orchestrator-5.3.0/maop/core/agent/billing/__init__.py +48 -0
  46. maop_orchestrator-5.3.0/maop/core/agent/billing/billing_abstraction.py +411 -0
  47. maop_orchestrator-5.3.0/maop/core/agent/billing/quota_alert.py +357 -0
  48. maop_orchestrator-5.3.0/maop/core/agent/billing/quota_bucket.py +582 -0
  49. maop_orchestrator-5.3.0/maop/core/agent/dag/__init__.py +6 -0
  50. maop_orchestrator-5.3.0/maop/core/agent/dag/dag_progress_emitter.py +364 -0
  51. maop_orchestrator-5.3.0/maop/core/agent/delegation/__init__.py +13 -0
  52. maop_orchestrator-5.3.0/maop/core/agent/delegation/a2a.py +431 -0
  53. maop_orchestrator-5.3.0/maop/core/agent/delegation/agent_proxy.py +282 -0
  54. maop_orchestrator-5.3.0/maop/core/agent/delegation/human_proxy.py +241 -0
  55. maop_orchestrator-5.3.0/maop/core/agent/delegation/subagent_db.py +409 -0
  56. maop_orchestrator-5.3.0/maop/core/agent/delegation/subagent_lifecycle.py +626 -0
  57. maop_orchestrator-5.3.0/maop/core/agent/discovery/__init__.py +54 -0
  58. maop_orchestrator-5.3.0/maop/core/agent/discovery/agent_discovery.py +246 -0
  59. maop_orchestrator-5.3.0/maop/core/agent/discovery/config_template.py +530 -0
  60. maop_orchestrator-5.3.0/maop/core/agent/discovery/discovery_mixin.py +473 -0
  61. maop_orchestrator-5.3.0/maop/core/agent/discovery/discovery_models.py +167 -0
  62. maop_orchestrator-5.3.0/maop/core/agent/evolution/__init__.py +3 -0
  63. maop_orchestrator-5.3.0/maop/core/agent/evolution/agent_evolution.py +647 -0
  64. maop_orchestrator-5.3.0/maop/core/agent/evolution/phases.py +45 -0
  65. maop_orchestrator-5.3.0/maop/core/agent/lifecycle/__init__.py +13 -0
  66. maop_orchestrator-5.3.0/maop/core/agent/lifecycle/agent_lifecycle.py +240 -0
  67. maop_orchestrator-5.3.0/maop/core/agent/lifecycle/agent_performance.py +283 -0
  68. maop_orchestrator-5.3.0/maop/core/agent/lifecycle/agent_registry.py +461 -0
  69. maop_orchestrator-5.3.0/maop/core/agent/lifecycle/agent_repair.py +321 -0
  70. maop_orchestrator-5.3.0/maop/core/agent/lifecycle/agent_scanner.py +503 -0
  71. maop_orchestrator-5.3.0/maop/core/agent/lifecycle/runtime.py +428 -0
  72. maop_orchestrator-5.3.0/maop/core/agent/lifecycle/state_classifier.py +237 -0
  73. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/__init__.py +10 -0
  74. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/chat_engine.py +434 -0
  75. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/context_compressor.py +459 -0
  76. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/conversation.py +304 -0
  77. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/function_call.py +353 -0
  78. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/llm_factory.py +374 -0
  79. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/llm_models.py +72 -0
  80. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/llm_provider.py +76 -0
  81. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/llm_providers.py +484 -0
  82. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/model_gateway.py +541 -0
  83. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/output_parser.py +197 -0
  84. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/react_loop.py +573 -0
  85. maop_orchestrator-5.3.0/maop/core/agent/llm_chat/relay_platform.py +755 -0
  86. maop_orchestrator-5.3.0/maop/core/agent/memory_ctx/__init__.py +4 -0
  87. maop_orchestrator-5.3.0/maop/core/agent/memory_ctx/agent_memory.py +364 -0
  88. maop_orchestrator-5.3.0/maop/core/agent/memory_ctx/project_context.py +237 -0
  89. maop_orchestrator-5.3.0/maop/core/agent/memory_ctx/worktree.py +482 -0
  90. maop_orchestrator-5.3.0/maop/core/agent/ops/__init__.py +65 -0
  91. maop_orchestrator-5.3.0/maop/core/agent/ops/capability_probe.py +446 -0
  92. maop_orchestrator-5.3.0/maop/core/agent/ops/health_scorer.py +371 -0
  93. maop_orchestrator-5.3.0/maop/core/agent/ops/result_cache.py +425 -0
  94. maop_orchestrator-5.3.0/maop/core/agent/ops/sandbox_executor.py +495 -0
  95. maop_orchestrator-5.3.0/maop/core/agent/ops/sla_manager.py +361 -0
  96. maop_orchestrator-5.3.0/maop/core/agent/ops/tenant_isolation.py +516 -0
  97. maop_orchestrator-5.3.0/maop/core/agent/ops/usage_statistics.py +578 -0
  98. maop_orchestrator-5.3.0/maop/core/agent/plugins_hooks/__init__.py +15 -0
  99. maop_orchestrator-5.3.0/maop/core/agent/plugins_hooks/hook_manager.py +776 -0
  100. maop_orchestrator-5.3.0/maop/core/agent/plugins_hooks/plugin.py +78 -0
  101. maop_orchestrator-5.3.0/maop/core/agent/plugins_hooks/plugin_hooks.py +42 -0
  102. maop_orchestrator-5.3.0/maop/core/agent/plugins_hooks/plugin_manager.py +509 -0
  103. maop_orchestrator-5.3.0/maop/core/agent/plugins_hooks/plugin_sandbox.py +386 -0
  104. maop_orchestrator-5.3.0/maop/core/agent/plugins_hooks/protocol.py +266 -0
  105. maop_orchestrator-5.3.0/maop/core/agent/registry/__init__.py +41 -0
  106. maop_orchestrator-5.3.0/maop/core/agent/registry/agent_catalog.py +372 -0
  107. maop_orchestrator-5.3.0/maop/core/agent/registry/agent_catalog_store.py +239 -0
  108. maop_orchestrator-5.3.0/maop/core/agent/registry/preset_agents.py +920 -0
  109. maop_orchestrator-5.3.0/maop/core/agent/router/__init__.py +45 -0
  110. maop_orchestrator-5.3.0/maop/core/agent/router/agent_collaboration.py +252 -0
  111. maop_orchestrator-5.3.0/maop/core/agent/router/agent_router.py +718 -0
  112. maop_orchestrator-5.3.0/maop/core/agent/router/collaboration_executor.py +355 -0
  113. maop_orchestrator-5.3.0/maop/core/agent/router/collaboration_models.py +168 -0
  114. maop_orchestrator-5.3.0/maop/core/agent/router/collaboration_patterns.py +196 -0
  115. maop_orchestrator-5.3.0/maop/core/agent/router/health_check_scheduler.py +390 -0
  116. maop_orchestrator-5.3.0/maop/core/agent/router/long_running_task.py +657 -0
  117. maop_orchestrator-5.3.0/maop/core/agent/router/rate_limiter.py +176 -0
  118. maop_orchestrator-5.3.0/maop/core/agent/router/routing_audit.py +257 -0
  119. maop_orchestrator-5.3.0/maop/core/agent/tools/__init__.py +6 -0
  120. maop_orchestrator-5.3.0/maop/core/agent/tools/capability_matcher.py +193 -0
  121. maop_orchestrator-5.3.0/maop/core/agent/tools/tool_audit.py +246 -0
  122. maop_orchestrator-5.3.0/maop/core/agent/tools/tool_manager.py +586 -0
  123. maop_orchestrator-5.3.0/maop/core/agent/tools/tool_policy.py +255 -0
  124. maop_orchestrator-5.3.0/maop/core/agent/tools/tool_schema.py +273 -0
  125. maop_orchestrator-5.3.0/maop/core/agent/vendor/__init__.py +55 -0
  126. maop_orchestrator-5.3.0/maop/core/agent/vendor/vendor_billing.py +441 -0
  127. maop_orchestrator-5.3.0/maop/core/agent/vendor/vendor_ecosystem.py +371 -0
  128. maop_orchestrator-5.3.0/maop/core/agent/vendor/vendor_sso.py +389 -0
  129. maop_orchestrator-5.3.0/maop/core/backends/__init__.py +191 -0
  130. maop_orchestrator-5.3.0/maop/core/backends/artifact_store.py +296 -0
  131. maop_orchestrator-5.3.0/maop/core/backends/backends.py +457 -0
  132. maop_orchestrator-5.3.0/maop/core/backends/backends_distributed.py +432 -0
  133. maop_orchestrator-5.3.0/maop/core/backends/backends_pg.py +303 -0
  134. maop_orchestrator-5.3.0/maop/core/backends/backends_queue.py +355 -0
  135. maop_orchestrator-5.3.0/maop/core/backends/backends_rabbitmq.py +380 -0
  136. maop_orchestrator-5.3.0/maop/core/backends/backends_redis.py +263 -0
  137. maop_orchestrator-5.3.0/maop/core/backends/backends_secret.py +165 -0
  138. maop_orchestrator-5.3.0/maop/core/backends/backends_vault.py +99 -0
  139. maop_orchestrator-5.3.0/maop/core/backends/data.py +650 -0
  140. maop_orchestrator-5.3.0/maop/core/backends/db_backup.py +641 -0
  141. maop_orchestrator-5.3.0/maop/core/backends/db_utils.py +458 -0
  142. maop_orchestrator-5.3.0/maop/core/backends/image_store.py +324 -0
  143. maop_orchestrator-5.3.0/maop/core/backends/kv_store.py +436 -0
  144. maop_orchestrator-5.3.0/maop/core/backends/migration.py +379 -0
  145. maop_orchestrator-5.3.0/maop/core/budget_guard.py +266 -0
  146. maop_orchestrator-5.3.0/maop/core/config/__init__.py +8 -0
  147. maop_orchestrator-5.3.0/maop/core/config/config_history.py +335 -0
  148. maop_orchestrator-5.3.0/maop/core/cost_tracker.py +563 -0
  149. maop_orchestrator-5.3.0/maop/core/evolution/__init__.py +104 -0
  150. maop_orchestrator-5.3.0/maop/core/evolution/ab_test.py +521 -0
  151. maop_orchestrator-5.3.0/maop/core/evolution/auto_deployer.py +338 -0
  152. maop_orchestrator-5.3.0/maop/core/evolution/evaluator.py +267 -0
  153. maop_orchestrator-5.3.0/maop/core/evolution/evolution_agent.py +183 -0
  154. maop_orchestrator-5.3.0/maop/core/evolution/evolution_analyzers.py +304 -0
  155. maop_orchestrator-5.3.0/maop/core/evolution/evolution_collectors.py +122 -0
  156. maop_orchestrator-5.3.0/maop/core/evolution/evolution_loop.py +512 -0
  157. maop_orchestrator-5.3.0/maop/core/evolution/evolution_loop_types.py +120 -0
  158. maop_orchestrator-5.3.0/maop/core/evolution/evolution_perf_loop.py +334 -0
  159. maop_orchestrator-5.3.0/maop/core/evolution/evolution_phases.py +609 -0
  160. maop_orchestrator-5.3.0/maop/core/evolution/evolution_strategies.py +292 -0
  161. maop_orchestrator-5.3.0/maop/core/evolution/narrative.py +474 -0
  162. maop_orchestrator-5.3.0/maop/core/evolution/prompt_version.py +194 -0
  163. maop_orchestrator-5.3.0/maop/core/evolution/regression.py +345 -0
  164. maop_orchestrator-5.3.0/maop/core/evolution/skill_version.py +413 -0
  165. maop_orchestrator-5.3.0/maop/core/evolution/suggester.py +337 -0
  166. maop_orchestrator-5.3.0/maop/core/marketplace/__init__.py +14 -0
  167. maop_orchestrator-5.3.0/maop/core/marketplace/key_management.py +560 -0
  168. maop_orchestrator-5.3.0/maop/core/marketplace/sandbox.py +344 -0
  169. maop_orchestrator-5.3.0/maop/core/marketplace/signing.py +393 -0
  170. maop_orchestrator-5.3.0/maop/core/mcp/__init__.py +111 -0
  171. maop_orchestrator-5.3.0/maop/core/mcp/mcp_adapter.py +309 -0
  172. maop_orchestrator-5.3.0/maop/core/mcp/mcp_audit.py +301 -0
  173. maop_orchestrator-5.3.0/maop/core/mcp/mcp_cache.py +288 -0
  174. maop_orchestrator-5.3.0/maop/core/mcp/mcp_call_stats.py +200 -0
  175. maop_orchestrator-5.3.0/maop/core/mcp/mcp_concurrency.py +229 -0
  176. maop_orchestrator-5.3.0/maop/core/mcp/mcp_discovery.py +255 -0
  177. maop_orchestrator-5.3.0/maop/core/mcp/mcp_hub.py +789 -0
  178. maop_orchestrator-5.3.0/maop/core/mcp/mcp_hub_compat.py +208 -0
  179. maop_orchestrator-5.3.0/maop/core/mcp/mcp_hub_metrics.py +203 -0
  180. maop_orchestrator-5.3.0/maop/core/mcp/mcp_hub_ops.py +339 -0
  181. maop_orchestrator-5.3.0/maop/core/mcp/mcp_hub_transport.py +559 -0
  182. maop_orchestrator-5.3.0/maop/core/mcp/mcp_hub_types.py +136 -0
  183. maop_orchestrator-5.3.0/maop/core/mcp/mcp_marketplace.py +563 -0
  184. maop_orchestrator-5.3.0/maop/core/mcp/mcp_permission.py +326 -0
  185. maop_orchestrator-5.3.0/maop/core/memory/__init__.py +124 -0
  186. maop_orchestrator-5.3.0/maop/core/memory/bloom_filter.py +227 -0
  187. maop_orchestrator-5.3.0/maop/core/memory/episodic_consolidation.py +166 -0
  188. maop_orchestrator-5.3.0/maop/core/memory/episodic_store.py +486 -0
  189. maop_orchestrator-5.3.0/maop/core/memory/hnsw_index.py +199 -0
  190. maop_orchestrator-5.3.0/maop/core/memory/hybrid_search.py +236 -0
  191. maop_orchestrator-5.3.0/maop/core/memory/knowledge_extractor.py +436 -0
  192. maop_orchestrator-5.3.0/maop/core/memory/knowledge_graph.py +586 -0
  193. maop_orchestrator-5.3.0/maop/core/memory/protocol_aliases.py +314 -0
  194. maop_orchestrator-5.3.0/maop/core/memory/semantic.py +38 -0
  195. maop_orchestrator-5.3.0/maop/core/memory/semantic_cache.py +327 -0
  196. maop_orchestrator-5.3.0/maop/core/memory/three_layer_memory.py +259 -0
  197. maop_orchestrator-5.3.0/maop/core/memory/three_layer_memory_types.py +149 -0
  198. maop_orchestrator-5.3.0/maop/core/memory/three_layer_memory_utils.py +100 -0
  199. maop_orchestrator-5.3.0/maop/core/memory/transform.py +320 -0
  200. maop_orchestrator-5.3.0/maop/core/memory/vector.py +55 -0
  201. maop_orchestrator-5.3.0/maop/core/memory/vector_embed.py +159 -0
  202. maop_orchestrator-5.3.0/maop/core/memory/vector_search_mixin.py +315 -0
  203. maop_orchestrator-5.3.0/maop/core/memory/vector_store.py +473 -0
  204. maop_orchestrator-5.3.0/maop/core/memory/working_memory.py +87 -0
  205. maop_orchestrator-5.3.0/maop/core/monitoring/__init__.py +171 -0
  206. maop_orchestrator-5.3.0/maop/core/monitoring/monitoring.py +800 -0
  207. maop_orchestrator-5.3.0/maop/core/monitoring/otel.py +205 -0
  208. maop_orchestrator-5.3.0/maop/core/monitoring/timeseries.py +374 -0
  209. maop_orchestrator-5.3.0/maop/core/observability/__init__.py +180 -0
  210. maop_orchestrator-5.3.0/maop/core/observability/logging.py +189 -0
  211. maop_orchestrator-5.3.0/maop/core/observability/metrics.py +324 -0
  212. maop_orchestrator-5.3.0/maop/core/observability/tracing.py +471 -0
  213. maop_orchestrator-5.3.0/maop/core/personal_cost_guard.py +160 -0
  214. maop_orchestrator-5.3.0/maop/core/reliability/__init__.py +231 -0
  215. maop_orchestrator-5.3.0/maop/core/reliability/blackboard.py +689 -0
  216. maop_orchestrator-5.3.0/maop/core/reliability/cache.py +476 -0
  217. maop_orchestrator-5.3.0/maop/core/reliability/cache_advanced.py +236 -0
  218. maop_orchestrator-5.3.0/maop/core/reliability/cache_guard.py +282 -0
  219. maop_orchestrator-5.3.0/maop/core/reliability/change_tracker.py +456 -0
  220. maop_orchestrator-5.3.0/maop/core/reliability/circuit_breaker.py +761 -0
  221. maop_orchestrator-5.3.0/maop/core/reliability/config_mutator.py +500 -0
  222. maop_orchestrator-5.3.0/maop/core/reliability/dag_scheduler.py +465 -0
  223. maop_orchestrator-5.3.0/maop/core/reliability/error_ledger.py +230 -0
  224. maop_orchestrator-5.3.0/maop/core/reliability/error_schema.py +106 -0
  225. maop_orchestrator-5.3.0/maop/core/reliability/event_bus.py +424 -0
  226. maop_orchestrator-5.3.0/maop/core/reliability/filelock.py +217 -0
  227. maop_orchestrator-5.3.0/maop/core/reliability/log_rotate.py +304 -0
  228. maop_orchestrator-5.3.0/maop/core/reliability/message_queue.py +791 -0
  229. maop_orchestrator-5.3.0/maop/core/reliability/pipeline_checkpoint.py +395 -0
  230. maop_orchestrator-5.3.0/maop/core/reliability/preemptable_worker_pool.py +606 -0
  231. maop_orchestrator-5.3.0/maop/core/reliability/priority_queue.py +237 -0
  232. maop_orchestrator-5.3.0/maop/core/reliability/rate_limiter.py +221 -0
  233. maop_orchestrator-5.3.0/maop/core/reliability/safe_writer.py +141 -0
  234. maop_orchestrator-5.3.0/maop/core/reliability/self_heal.py +265 -0
  235. maop_orchestrator-5.3.0/maop/core/reliability/services.py +237 -0
  236. maop_orchestrator-5.3.0/maop/core/reliability/streaming.py +212 -0
  237. maop_orchestrator-5.3.0/maop/core/reliability/worker_pool.py +622 -0
  238. maop_orchestrator-5.3.0/maop/core/routing/__init__.py +86 -0
  239. maop_orchestrator-5.3.0/maop/core/routing/load_balancer.py +668 -0
  240. maop_orchestrator-5.3.0/maop/core/routing/provider_health.py +226 -0
  241. maop_orchestrator-5.3.0/maop/core/routing/route_scorer.py +611 -0
  242. maop_orchestrator-5.3.0/maop/core/routing/routing_decision.py +443 -0
  243. maop_orchestrator-5.3.0/maop/core/scheduling/__init__.py +46 -0
  244. maop_orchestrator-5.3.0/maop/core/scheduling/distributed_scheduler.py +811 -0
  245. maop_orchestrator-5.3.0/maop/core/scheduling/failure_detector.py +599 -0
  246. maop_orchestrator-5.3.0/maop/core/scheduling/supervisor.py +250 -0
  247. maop_orchestrator-5.3.0/maop/core/scheduling/supervisor_action.py +331 -0
  248. maop_orchestrator-5.3.0/maop/core/scheduling/supervisor_dispatch.py +150 -0
  249. maop_orchestrator-5.3.0/maop/core/scheduling/supervisor_health.py +179 -0
  250. maop_orchestrator-5.3.0/maop/core/scheduling/supervisor_models.py +184 -0
  251. maop_orchestrator-5.3.0/maop/core/scheduling/supervisor_patrol.py +249 -0
  252. maop_orchestrator-5.3.0/maop/core/scheduling/supervisor_rules.py +187 -0
  253. maop_orchestrator-5.3.0/maop/core/scheduling/supervisor_status.py +224 -0
  254. maop_orchestrator-5.3.0/maop/core/scheduling/task_splitter.py +445 -0
  255. maop_orchestrator-5.3.0/maop/core/scheduling/worker_pool.py +368 -0
  256. maop_orchestrator-5.3.0/maop/core/security/__init__.py +133 -0
  257. maop_orchestrator-5.3.0/maop/core/security/api_key_manager.py +786 -0
  258. maop_orchestrator-5.3.0/maop/core/security/api_key_vault.py +326 -0
  259. maop_orchestrator-5.3.0/maop/core/security/auth.py +644 -0
  260. maop_orchestrator-5.3.0/maop/core/security/byok.py +192 -0
  261. maop_orchestrator-5.3.0/maop/core/security/dispatch_gate.py +139 -0
  262. maop_orchestrator-5.3.0/maop/core/security/guardrail.py +451 -0
  263. maop_orchestrator-5.3.0/maop/core/security/ldap_models.py +142 -0
  264. maop_orchestrator-5.3.0/maop/core/security/ldap_provider.py +471 -0
  265. maop_orchestrator-5.3.0/maop/core/security/ldap_search.py +287 -0
  266. maop_orchestrator-5.3.0/maop/core/security/middleware.py +690 -0
  267. maop_orchestrator-5.3.0/maop/core/security/permission.py +166 -0
  268. maop_orchestrator-5.3.0/maop/core/security/sandbox.py +633 -0
  269. maop_orchestrator-5.3.0/maop/core/security/session.py +396 -0
  270. maop_orchestrator-5.3.0/maop/core/security/tls.py +159 -0
  271. maop_orchestrator-5.3.0/maop/core/security/url_validator.py +196 -0
  272. maop_orchestrator-5.3.0/maop/core/subagent_delegation.py +262 -0
  273. maop_orchestrator-5.3.0/maop/core/tenant/__init__.py +51 -0
  274. maop_orchestrator-5.3.0/maop/core/tenant/audit.py +278 -0
  275. maop_orchestrator-5.3.0/maop/core/tenant/compliance.py +67 -0
  276. maop_orchestrator-5.3.0/maop/core/tenant/compliance_manager.py +360 -0
  277. maop_orchestrator-5.3.0/maop/core/tenant/context.py +96 -0
  278. maop_orchestrator-5.3.0/maop/core/tenant/gdpr_manager.py +742 -0
  279. maop_orchestrator-5.3.0/maop/core/tenant/hierarchy.py +676 -0
  280. maop_orchestrator-5.3.0/maop/core/tenant/manager.py +355 -0
  281. maop_orchestrator-5.3.0/maop/core/tenant/quota.py +293 -0
  282. maop_orchestrator-5.3.0/maop/core/tenant/rls.py +275 -0
  283. maop_orchestrator-5.3.0/maop/core/utils/__init__.py +8 -0
  284. maop_orchestrator-5.3.0/maop/core/utils/async_subprocess.py +82 -0
  285. maop_orchestrator-5.3.0/maop/core/vector/__init__.py +217 -0
  286. maop_orchestrator-5.3.0/maop/core/vector/factory.py +73 -0
  287. maop_orchestrator-5.3.0/maop/core/vector/pg_backend.py +513 -0
  288. maop_orchestrator-5.3.0/maop/core/vector/sqlite_backend.py +171 -0
  289. maop_orchestrator-5.3.0/maop/dashboard/__init__.py +17 -0
  290. maop_orchestrator-5.3.0/maop/dashboard/_middleware_stack.py +195 -0
  291. maop_orchestrator-5.3.0/maop/dashboard/_register_routes.py +824 -0
  292. maop_orchestrator-5.3.0/maop/dashboard/_ws_manager.py +86 -0
  293. maop_orchestrator-5.3.0/maop/dashboard/channels/__init__.py +26 -0
  294. maop_orchestrator-5.3.0/maop/dashboard/channels/mcp.py +113 -0
  295. maop_orchestrator-5.3.0/maop/dashboard/channels/models.py +122 -0
  296. maop_orchestrator-5.3.0/maop/dashboard/channels/prompts.py +100 -0
  297. maop_orchestrator-5.3.0/maop/dashboard/channels/routing.py +176 -0
  298. maop_orchestrator-5.3.0/maop/dashboard/channels/security.py +115 -0
  299. maop_orchestrator-5.3.0/maop/dashboard/channels/skills.py +61 -0
  300. maop_orchestrator-5.3.0/maop/dashboard/data_proxy.py +459 -0
  301. maop_orchestrator-5.3.0/maop/dashboard/error_handler.py +180 -0
  302. maop_orchestrator-5.3.0/maop/dashboard/lifespan.py +130 -0
  303. maop_orchestrator-5.3.0/maop/dashboard/provider.py +276 -0
  304. maop_orchestrator-5.3.0/maop/dashboard/routers/__init__.py +16 -0
  305. maop_orchestrator-5.3.0/maop/dashboard/routers/agent_catalog.py +182 -0
  306. maop_orchestrator-5.3.0/maop/dashboard/routers/agent_collaboration.py +142 -0
  307. maop_orchestrator-5.3.0/maop/dashboard/routers/agent_proxy.py +114 -0
  308. maop_orchestrator-5.3.0/maop/dashboard/routers/agent_proxy_gateway.py +191 -0
  309. maop_orchestrator-5.3.0/maop/dashboard/routers/agent_router.py +150 -0
  310. maop_orchestrator-5.3.0/maop/dashboard/routers/agent_versions.py +333 -0
  311. maop_orchestrator-5.3.0/maop/dashboard/routers/agent_versions_helpers.py +273 -0
  312. maop_orchestrator-5.3.0/maop/dashboard/routers/agents/__init__.py +58 -0
  313. maop_orchestrator-5.3.0/maop/dashboard/routers/agents/_deps.py +91 -0
  314. maop_orchestrator-5.3.0/maop/dashboard/routers/agents/crud.py +402 -0
  315. maop_orchestrator-5.3.0/maop/dashboard/routers/agents/evolution.py +215 -0
  316. maop_orchestrator-5.3.0/maop/dashboard/routers/agents/memory.py +82 -0
  317. maop_orchestrator-5.3.0/maop/dashboard/routers/agents/routes.py +150 -0
  318. maop_orchestrator-5.3.0/maop/dashboard/routers/alerts.py +81 -0
  319. maop_orchestrator-5.3.0/maop/dashboard/routers/analysis.py +146 -0
  320. maop_orchestrator-5.3.0/maop/dashboard/routers/analysis_helpers.py +180 -0
  321. maop_orchestrator-5.3.0/maop/dashboard/routers/api_keys.py +208 -0
  322. maop_orchestrator-5.3.0/maop/dashboard/routers/audit.py +300 -0
  323. maop_orchestrator-5.3.0/maop/dashboard/routers/auth.py +497 -0
  324. maop_orchestrator-5.3.0/maop/dashboard/routers/billing_abstraction.py +111 -0
  325. maop_orchestrator-5.3.0/maop/dashboard/routers/blackboard.py +136 -0
  326. maop_orchestrator-5.3.0/maop/dashboard/routers/budget.py +70 -0
  327. maop_orchestrator-5.3.0/maop/dashboard/routers/chat.py +245 -0
  328. maop_orchestrator-5.3.0/maop/dashboard/routers/compliance.py +371 -0
  329. maop_orchestrator-5.3.0/maop/dashboard/routers/config.py +132 -0
  330. maop_orchestrator-5.3.0/maop/dashboard/routers/control.py +186 -0
  331. maop_orchestrator-5.3.0/maop/dashboard/routers/cost.py +159 -0
  332. maop_orchestrator-5.3.0/maop/dashboard/routers/credential_vault.py +168 -0
  333. maop_orchestrator-5.3.0/maop/dashboard/routers/dag.py +113 -0
  334. maop_orchestrator-5.3.0/maop/dashboard/routers/data.py +360 -0
  335. maop_orchestrator-5.3.0/maop/dashboard/routers/debate.py +241 -0
  336. maop_orchestrator-5.3.0/maop/dashboard/routers/error_handler.py +3 -0
  337. maop_orchestrator-5.3.0/maop/dashboard/routers/evolution_experiment.py +311 -0
  338. maop_orchestrator-5.3.0/maop/dashboard/routers/evolve_insights.py +242 -0
  339. maop_orchestrator-5.3.0/maop/dashboard/routers/feedback.py +304 -0
  340. maop_orchestrator-5.3.0/maop/dashboard/routers/hook.py +169 -0
  341. maop_orchestrator-5.3.0/maop/dashboard/routers/hooks.py +356 -0
  342. maop_orchestrator-5.3.0/maop/dashboard/routers/info/__init__.py +25 -0
  343. maop_orchestrator-5.3.0/maop/dashboard/routers/info/activity.py +147 -0
  344. maop_orchestrator-5.3.0/maop/dashboard/routers/info/admin.py +179 -0
  345. maop_orchestrator-5.3.0/maop/dashboard/routers/info/meta.py +422 -0
  346. maop_orchestrator-5.3.0/maop/dashboard/routers/knowledge.py +203 -0
  347. maop_orchestrator-5.3.0/maop/dashboard/routers/licenses.py +250 -0
  348. maop_orchestrator-5.3.0/maop/dashboard/routers/long_running_task.py +170 -0
  349. maop_orchestrator-5.3.0/maop/dashboard/routers/mcp.py +305 -0
  350. maop_orchestrator-5.3.0/maop/dashboard/routers/memory.py +163 -0
  351. maop_orchestrator-5.3.0/maop/dashboard/routers/model.py +238 -0
  352. maop_orchestrator-5.3.0/maop/dashboard/routers/model_gateway.py +158 -0
  353. maop_orchestrator-5.3.0/maop/dashboard/routers/n8n.py +188 -0
  354. maop_orchestrator-5.3.0/maop/dashboard/routers/notifications.py +763 -0
  355. maop_orchestrator-5.3.0/maop/dashboard/routers/observability.py +153 -0
  356. maop_orchestrator-5.3.0/maop/dashboard/routers/permission.py +103 -0
  357. maop_orchestrator-5.3.0/maop/dashboard/routers/plugin.py +133 -0
  358. maop_orchestrator-5.3.0/maop/dashboard/routers/protocol.py +143 -0
  359. maop_orchestrator-5.3.0/maop/dashboard/routers/quota.py +123 -0
  360. maop_orchestrator-5.3.0/maop/dashboard/routers/quotas.py +376 -0
  361. maop_orchestrator-5.3.0/maop/dashboard/routers/rbac.py +229 -0
  362. maop_orchestrator-5.3.0/maop/dashboard/routers/react.py +178 -0
  363. maop_orchestrator-5.3.0/maop/dashboard/routers/relay_platform.py +144 -0
  364. maop_orchestrator-5.3.0/maop/dashboard/routers/routing.py +100 -0
  365. maop_orchestrator-5.3.0/maop/dashboard/routers/routing_preview.py +59 -0
  366. maop_orchestrator-5.3.0/maop/dashboard/routers/scheduling.py +107 -0
  367. maop_orchestrator-5.3.0/maop/dashboard/routers/session.py +245 -0
  368. maop_orchestrator-5.3.0/maop/dashboard/routers/sso.py +570 -0
  369. maop_orchestrator-5.3.0/maop/dashboard/routers/state.py +119 -0
  370. maop_orchestrator-5.3.0/maop/dashboard/routers/stream.py +168 -0
  371. maop_orchestrator-5.3.0/maop/dashboard/routers/subagent.py +124 -0
  372. maop_orchestrator-5.3.0/maop/dashboard/routers/supervisor.py +223 -0
  373. maop_orchestrator-5.3.0/maop/dashboard/routers/system/__init__.py +83 -0
  374. maop_orchestrator-5.3.0/maop/dashboard/routers/system/_deps.py +103 -0
  375. maop_orchestrator-5.3.0/maop/dashboard/routers/system/agent_admin.py +305 -0
  376. maop_orchestrator-5.3.0/maop/dashboard/routers/system/framework.py +144 -0
  377. maop_orchestrator-5.3.0/maop/dashboard/routers/system/overview.py +372 -0
  378. maop_orchestrator-5.3.0/maop/dashboard/routers/system/v4_misc.py +123 -0
  379. maop_orchestrator-5.3.0/maop/dashboard/routers/system/workflow.py +125 -0
  380. maop_orchestrator-5.3.0/maop/dashboard/routers/tenant.py +159 -0
  381. maop_orchestrator-5.3.0/maop/dashboard/routers/tool_audit.py +54 -0
  382. maop_orchestrator-5.3.0/maop/dashboard/routers/worktree.py +184 -0
  383. maop_orchestrator-5.3.0/maop/dashboard/server.py +403 -0
  384. maop_orchestrator-5.3.0/maop/dashboard/services/__init__.py +6 -0
  385. maop_orchestrator-5.3.0/maop/dashboard/services/agent_service.py +811 -0
  386. maop_orchestrator-5.3.0/maop/dashboard/services/agent_versions_service.py +584 -0
  387. maop_orchestrator-5.3.0/maop/dashboard/services/auth_service.py +574 -0
  388. maop_orchestrator-5.3.0/maop/dashboard/services/billing_service.py +636 -0
  389. maop_orchestrator-5.3.0/maop/dashboard/services/blackboard_service.py +116 -0
  390. maop_orchestrator-5.3.0/maop/dashboard/services/budget_service.py +255 -0
  391. maop_orchestrator-5.3.0/maop/dashboard/services/chat_service.py +1145 -0
  392. maop_orchestrator-5.3.0/maop/dashboard/services/credential_service.py +149 -0
  393. maop_orchestrator-5.3.0/maop/dashboard/services/data_service.py +1148 -0
  394. maop_orchestrator-5.3.0/maop/dashboard/services/evolution_service.py +807 -0
  395. maop_orchestrator-5.3.0/maop/dashboard/services/execution_service.py +608 -0
  396. maop_orchestrator-5.3.0/maop/dashboard/services/integration_service.py +267 -0
  397. maop_orchestrator-5.3.0/maop/dashboard/services/knowledge_service.py +164 -0
  398. maop_orchestrator-5.3.0/maop/dashboard/services/memory_service.py +333 -0
  399. maop_orchestrator-5.3.0/maop/dashboard/services/model_service.py +606 -0
  400. maop_orchestrator-5.3.0/maop/dashboard/services/notification_service.py +393 -0
  401. maop_orchestrator-5.3.0/maop/dashboard/services/observability_service.py +719 -0
  402. maop_orchestrator-5.3.0/maop/dashboard/services/plugin_service.py +616 -0
  403. maop_orchestrator-5.3.0/maop/dashboard/services/rbac_service.py +193 -0
  404. maop_orchestrator-5.3.0/maop/dashboard/services/routing_service.py +419 -0
  405. maop_orchestrator-5.3.0/maop/dashboard/services/scheduling_service.py +273 -0
  406. maop_orchestrator-5.3.0/maop/dashboard/services/session_service.py +328 -0
  407. maop_orchestrator-5.3.0/maop/dashboard/services/system_service.py +472 -0
  408. maop_orchestrator-5.3.0/maop/dashboard/services/tenant_service.py +148 -0
  409. maop_orchestrator-5.3.0/maop/dashboard/services/upgrade_service.py +238 -0
  410. maop_orchestrator-5.3.0/maop/dashboard/static.py +181 -0
  411. maop_orchestrator-5.3.0/maop/dashboard/ws_broadcast.py +120 -0
  412. maop_orchestrator-5.3.0/maop/dashboard/ws_dag.py +247 -0
  413. maop_orchestrator-5.3.0/maop/dashboard/ws_state.py +43 -0
  414. maop_orchestrator-5.3.0/maop/delegate/__init__.py +9 -0
  415. maop_orchestrator-5.3.0/maop/delegate/agent_resolver.py +315 -0
  416. maop_orchestrator-5.3.0/maop/delegate/debate_models.py +129 -0
  417. maop_orchestrator-5.3.0/maop/delegate/debate_verdict.py +175 -0
  418. maop_orchestrator-5.3.0/maop/delegate/dispatch_core.py +471 -0
  419. maop_orchestrator-5.3.0/maop/delegate/dispatch_debate.py +638 -0
  420. maop_orchestrator-5.3.0/maop/delegate/dispatch_impl.py +291 -0
  421. maop_orchestrator-5.3.0/maop/delegate/dispatch_priority.py +149 -0
  422. maop_orchestrator-5.3.0/maop/delegate/dispatch_recording.py +117 -0
  423. maop_orchestrator-5.3.0/maop/delegate/dispatch_tools.py +118 -0
  424. maop_orchestrator-5.3.0/maop/delegate/dispatcher.py +69 -0
  425. maop_orchestrator-5.3.0/maop/delegate/doc_pipeline_adapter.py +272 -0
  426. maop_orchestrator-5.3.0/maop/delegate/drivers.py +769 -0
  427. maop_orchestrator-5.3.0/maop/delegate/models.py +77 -0
  428. maop_orchestrator-5.3.0/maop/delegate/sla_monitor.py +138 -0
  429. maop_orchestrator-5.3.0/maop/deploy.py +593 -0
  430. maop_orchestrator-5.3.0/maop/engine.py +616 -0
  431. maop_orchestrator-5.3.0/maop/engine_executor.py +487 -0
  432. maop_orchestrator-5.3.0/maop/engine_pause.py +82 -0
  433. maop_orchestrator-5.3.0/maop/engine_types.py +102 -0
  434. maop_orchestrator-5.3.0/maop/engine_utils.py +249 -0
  435. maop_orchestrator-5.3.0/maop/evolve.py +681 -0
  436. maop_orchestrator-5.3.0/maop/history_analyzer.py +365 -0
  437. maop_orchestrator-5.3.0/maop/loop_analyzer.py +437 -0
  438. maop_orchestrator-5.3.0/maop/loop_executor.py +353 -0
  439. maop_orchestrator-5.3.0/maop/loop_models.py +116 -0
  440. maop_orchestrator-5.3.0/maop/maop_execute.py +559 -0
  441. maop_orchestrator-5.3.0/maop/maop_loop.py +309 -0
  442. maop_orchestrator-5.3.0/maop/maop_loop_config.py +29 -0
  443. maop_orchestrator-5.3.0/maop/maop_loop_phases.py +675 -0
  444. maop_orchestrator-5.3.0/maop/maop_plan.py +513 -0
  445. maop_orchestrator-5.3.0/maop/maop_verify.py +539 -0
  446. maop_orchestrator-5.3.0/maop/memory/__init__.py +22 -0
  447. maop_orchestrator-5.3.0/maop/memory/consolidator.py +535 -0
  448. maop_orchestrator-5.3.0/maop/memory/facade.py +632 -0
  449. maop_orchestrator-5.3.0/maop/memory/manager.py +351 -0
  450. maop_orchestrator-5.3.0/maop/memory/manager_mixin.py +506 -0
  451. maop_orchestrator-5.3.0/maop/memory/memory_models.py +52 -0
  452. maop_orchestrator-5.3.0/maop/memory/models.py +232 -0
  453. maop_orchestrator-5.3.0/maop/memory/search.py +379 -0
  454. maop_orchestrator-5.3.0/maop/memory/shared_db.py +185 -0
  455. maop_orchestrator-5.3.0/maop/memory/store.py +558 -0
  456. maop_orchestrator-5.3.0/maop/memory/unified.py +254 -0
  457. maop_orchestrator-5.3.0/maop/memory/vector_search.py +333 -0
  458. maop_orchestrator-5.3.0/maop/migrations/alembic/env.py +63 -0
  459. maop_orchestrator-5.3.0/maop/migrations/alembic/script.py.mako +27 -0
  460. maop_orchestrator-5.3.0/maop/migrations/alembic/versions/001_init.py +106 -0
  461. maop_orchestrator-5.3.0/maop/migrations/alembic/versions/002_schema_sync.py +81 -0
  462. maop_orchestrator-5.3.0/maop/migrations/alembic/versions/003_pg_enterprise.py +177 -0
  463. maop_orchestrator-5.3.0/maop/migrations/memory_migration.py +726 -0
  464. maop_orchestrator-5.3.0/maop/migrations/pg/alembic.ini +50 -0
  465. maop_orchestrator-5.3.0/maop/migrations/pg/env.py +127 -0
  466. maop_orchestrator-5.3.0/maop/migrations/pg/script.py.mako +28 -0
  467. maop_orchestrator-5.3.0/maop/migrations/pg/vector_migration.py +535 -0
  468. maop_orchestrator-5.3.0/maop/migrations/pg/versions/001_initial_schema.py +939 -0
  469. maop_orchestrator-5.3.0/maop/migrations/pg/versions/002_users_tenant_id.py +69 -0
  470. maop_orchestrator-5.3.0/maop/migrations/sqlite_to_pg.py +659 -0
  471. maop_orchestrator-5.3.0/maop/model/__init__.py +22 -0
  472. maop_orchestrator-5.3.0/maop/model/budget.py +219 -0
  473. maop_orchestrator-5.3.0/maop/model/quota.py +107 -0
  474. maop_orchestrator-5.3.0/maop/model/registry.py +430 -0
  475. maop_orchestrator-5.3.0/maop/model/schema.py +310 -0
  476. maop_orchestrator-5.3.0/maop/model/selector.py +522 -0
  477. maop_orchestrator-5.3.0/maop/prompt_manager.py +393 -0
  478. maop_orchestrator-5.3.0/maop/worker/__init__.py +10 -0
  479. maop_orchestrator-5.3.0/maop/worker/agent_executor.py +181 -0
  480. maop_orchestrator-5.3.0/maop/worker/distributed_worker.py +567 -0
  481. maop_orchestrator-5.3.0/maop/worker/queue_worker.py +318 -0
  482. maop_orchestrator-5.3.0/pyproject.toml +320 -0
  483. maop_orchestrator-5.3.0/requirements.frozen.txt +144 -0
  484. maop_orchestrator-5.3.0/requirements.lock +81 -0
  485. maop_orchestrator-5.3.0/requirements.txt +55 -0
  486. maop_orchestrator-5.3.0/run_tests.py +10 -0
  487. maop_orchestrator-5.3.0/scripts/.cov_baseline.json +1 -0
  488. maop_orchestrator-5.3.0/scripts/attach_release_assets.py +127 -0
  489. maop_orchestrator-5.3.0/scripts/build_obfuscated_enterprise.sh +101 -0
  490. maop_orchestrator-5.3.0/scripts/check_api_contract.py +262 -0
  491. maop_orchestrator-5.3.0/scripts/check_config_drift.py +145 -0
  492. maop_orchestrator-5.3.0/scripts/check_coverage_ratchet.py +101 -0
  493. maop_orchestrator-5.3.0/scripts/check_docs_consistency.py +635 -0
  494. maop_orchestrator-5.3.0/scripts/check_release_tag.py +86 -0
  495. maop_orchestrator-5.3.0/scripts/check_required_checks_drift.py +160 -0
  496. maop_orchestrator-5.3.0/scripts/check_wiring.py +337 -0
  497. maop_orchestrator-5.3.0/scripts/ci_merge_gate.py +145 -0
  498. maop_orchestrator-5.3.0/scripts/ci_path_scope.py +135 -0
  499. maop_orchestrator-5.3.0/scripts/compose_smoke.py +82 -0
  500. maop_orchestrator-5.3.0/scripts/doc_reconcile.py +138 -0
  501. maop_orchestrator-5.3.0/scripts/e2e_annotate.py +69 -0
  502. maop_orchestrator-5.3.0/scripts/export_tool_whitelist.py +183 -0
  503. maop_orchestrator-5.3.0/scripts/fix_swallowed_exceptions.py +106 -0
  504. maop_orchestrator-5.3.0/scripts/junit_annotate.py +49 -0
  505. maop_orchestrator-5.3.0/scripts/sign_enterprise_modules.py +129 -0
  506. maop_orchestrator-5.3.0/scripts/trivy_annotate.py +52 -0
  507. maop_orchestrator-5.3.0/start_dashboard.bat +3 -0
  508. maop_orchestrator-5.3.0/start_dashboard.py +10 -0
  509. maop_orchestrator-5.3.0/tests/__init__.py +0 -0
  510. maop_orchestrator-5.3.0/tests/conftest.py +631 -0
  511. maop_orchestrator-5.3.0/tests/contract/__init__.py +8 -0
  512. maop_orchestrator-5.3.0/tests/contract/conftest.py +46 -0
  513. maop_orchestrator-5.3.0/tests/contract/test_behavioral_contracts.py +142 -0
  514. maop_orchestrator-5.3.0/tests/contract/test_control_api_contract.py +56 -0
  515. maop_orchestrator-5.3.0/tests/contract/test_dashboard_api_contract.py +346 -0
  516. maop_orchestrator-5.3.0/tests/contract/test_dispatcher_contract.py +89 -0
  517. maop_orchestrator-5.3.0/tests/contract/test_model_api_contract.py +115 -0
  518. maop_orchestrator-5.3.0/tests/e2e/conftest.py +110 -0
  519. maop_orchestrator-5.3.0/tests/e2e/test_auth_enabled.py +311 -0
  520. maop_orchestrator-5.3.0/tests/e2e/test_boundary_conditions.py +462 -0
  521. maop_orchestrator-5.3.0/tests/e2e/test_delete_operations.py +237 -0
  522. maop_orchestrator-5.3.0/tests/e2e/test_edition_switch.py +268 -0
  523. maop_orchestrator-5.3.0/tests/e2e/test_evolution_loop_e2e.py +358 -0
  524. maop_orchestrator-5.3.0/tests/e2e/test_guardrail_multiround.py +307 -0
  525. maop_orchestrator-5.3.0/tests/e2e/test_routing_rbac_tenant.py +219 -0
  526. maop_orchestrator-5.3.0/tests/e2e/test_sse_error_sanitization.py +320 -0
  527. maop_orchestrator-5.3.0/tests/performance/__init__.py +15 -0
  528. maop_orchestrator-5.3.0/tests/performance/k6_maop_load.js +212 -0
  529. maop_orchestrator-5.3.0/tests/performance/locust_maop_load.py +141 -0
  530. maop_orchestrator-5.3.0/tests/performance/test_performance_load.py +28 -0
  531. maop_orchestrator-5.3.0/tests/performance/test_performance_smoke.py +193 -0
  532. maop_orchestrator-5.3.0/tests/reliability/__init__.py +1 -0
  533. maop_orchestrator-5.3.0/tests/reliability/test_cascade_degradation.py +337 -0
  534. maop_orchestrator-5.3.0/tests/reliability/test_pev_pipeline.py +366 -0
  535. maop_orchestrator-5.3.0/tests/soak/__init__.py +1 -0
  536. maop_orchestrator-5.3.0/tests/soak/soak_test.py +894 -0
  537. maop_orchestrator-5.3.0/tests/stability/__init__.py +1 -0
  538. maop_orchestrator-5.3.0/tests/stability/test_boundary_inputs.py +235 -0
  539. maop_orchestrator-5.3.0/tests/stability/test_crash_recovery.py +209 -0
  540. maop_orchestrator-5.3.0/tests/stability/test_long_run.py +189 -0
  541. maop_orchestrator-5.3.0/tests/test_a2a.py +293 -0
  542. maop_orchestrator-5.3.0/tests/test_ab_prompt_version.py +107 -0
  543. maop_orchestrator-5.3.0/tests/test_adr010_regression.py +184 -0
  544. maop_orchestrator-5.3.0/tests/test_agent_adapters.py +933 -0
  545. maop_orchestrator-5.3.0/tests/test_agent_catalog.py +463 -0
  546. maop_orchestrator-5.3.0/tests/test_agent_catalog_route.py +339 -0
  547. maop_orchestrator-5.3.0/tests/test_agent_collaboration.py +728 -0
  548. maop_orchestrator-5.3.0/tests/test_agent_discovery.py +497 -0
  549. maop_orchestrator-5.3.0/tests/test_agent_evolution.py +309 -0
  550. maop_orchestrator-5.3.0/tests/test_agent_executor_worker.py +130 -0
  551. maop_orchestrator-5.3.0/tests/test_agent_memory.py +211 -0
  552. maop_orchestrator-5.3.0/tests/test_agent_performance.py +157 -0
  553. maop_orchestrator-5.3.0/tests/test_agent_platform.py +521 -0
  554. maop_orchestrator-5.3.0/tests/test_agent_proxy_coverage.py +220 -0
  555. maop_orchestrator-5.3.0/tests/test_agent_proxy_gateway.py +365 -0
  556. maop_orchestrator-5.3.0/tests/test_agent_rate_limiter.py +248 -0
  557. maop_orchestrator-5.3.0/tests/test_agent_registry_whitebox.py +101 -0
  558. maop_orchestrator-5.3.0/tests/test_agent_repair.py +210 -0
  559. maop_orchestrator-5.3.0/tests/test_agent_router.py +648 -0
  560. maop_orchestrator-5.3.0/tests/test_agent_router_route.py +252 -0
  561. maop_orchestrator-5.3.0/tests/test_agent_token_stream.py +407 -0
  562. maop_orchestrator-5.3.0/tests/test_agent_versions.py +638 -0
  563. maop_orchestrator-5.3.0/tests/test_agentforge_r3.py +337 -0
  564. maop_orchestrator-5.3.0/tests/test_agents_validator_coverage.py +160 -0
  565. maop_orchestrator-5.3.0/tests/test_alertmanager_e2e.py +768 -0
  566. maop_orchestrator-5.3.0/tests/test_analysis.py +353 -0
  567. maop_orchestrator-5.3.0/tests/test_analyzer.py +366 -0
  568. maop_orchestrator-5.3.0/tests/test_analyzer_coverage.py +333 -0
  569. maop_orchestrator-5.3.0/tests/test_api_key_vault_coverage.py +145 -0
  570. maop_orchestrator-5.3.0/tests/test_api_keys.py +512 -0
  571. maop_orchestrator-5.3.0/tests/test_audit_enhanced.py +873 -0
  572. maop_orchestrator-5.3.0/tests/test_auth.py +306 -0
  573. maop_orchestrator-5.3.0/tests/test_auth_tenant.py +177 -0
  574. maop_orchestrator-5.3.0/tests/test_backend_audit_batch_b.py +267 -0
  575. maop_orchestrator-5.3.0/tests/test_backends.py +273 -0
  576. maop_orchestrator-5.3.0/tests/test_backends_distributed.py +679 -0
  577. maop_orchestrator-5.3.0/tests/test_backends_pg.py +409 -0
  578. maop_orchestrator-5.3.0/tests/test_backends_pg_integration.py +132 -0
  579. maop_orchestrator-5.3.0/tests/test_backends_redis.py +322 -0
  580. maop_orchestrator-5.3.0/tests/test_backends_vault.py +270 -0
  581. maop_orchestrator-5.3.0/tests/test_bcd_iterations.py +410 -0
  582. maop_orchestrator-5.3.0/tests/test_billing_abstraction.py +538 -0
  583. maop_orchestrator-5.3.0/tests/test_billing_abstraction_route.py +255 -0
  584. maop_orchestrator-5.3.0/tests/test_blackboard.py +930 -0
  585. maop_orchestrator-5.3.0/tests/test_bloom_filter.py +209 -0
  586. maop_orchestrator-5.3.0/tests/test_bridge_registration.py +136 -0
  587. maop_orchestrator-5.3.0/tests/test_budget.py +316 -0
  588. maop_orchestrator-5.3.0/tests/test_budget_gate.py +153 -0
  589. maop_orchestrator-5.3.0/tests/test_budget_guard.py +117 -0
  590. maop_orchestrator-5.3.0/tests/test_cache.py +324 -0
  591. maop_orchestrator-5.3.0/tests/test_cache_guard.py +274 -0
  592. maop_orchestrator-5.3.0/tests/test_capability_probe.py +264 -0
  593. maop_orchestrator-5.3.0/tests/test_change_tracker.py +127 -0
  594. maop_orchestrator-5.3.0/tests/test_chat_engine_whitebox.py +348 -0
  595. maop_orchestrator-5.3.0/tests/test_chat_memory.py +317 -0
  596. maop_orchestrator-5.3.0/tests/test_ci_merge_gate.py +294 -0
  597. maop_orchestrator-5.3.0/tests/test_ci_path_scope.py +204 -0
  598. maop_orchestrator-5.3.0/tests/test_ci_publish_reachable.py +284 -0
  599. maop_orchestrator-5.3.0/tests/test_ci_required_checks.py +195 -0
  600. maop_orchestrator-5.3.0/tests/test_ci_required_checks_drift.py +159 -0
  601. maop_orchestrator-5.3.0/tests/test_ci_workflow_hygiene.py +84 -0
  602. maop_orchestrator-5.3.0/tests/test_circuit_breaker.py +187 -0
  603. maop_orchestrator-5.3.0/tests/test_cli.py +233 -0
  604. maop_orchestrator-5.3.0/tests/test_compliance.py +331 -0
  605. maop_orchestrator-5.3.0/tests/test_compliance_core.py +51 -0
  606. maop_orchestrator-5.3.0/tests/test_concurrency.py +367 -0
  607. maop_orchestrator-5.3.0/tests/test_config.py +103 -0
  608. maop_orchestrator-5.3.0/tests/test_config_history.py +330 -0
  609. maop_orchestrator-5.3.0/tests/test_config_mutator_whitebox.py +376 -0
  610. maop_orchestrator-5.3.0/tests/test_config_plugin_cli_coverage.py +360 -0
  611. maop_orchestrator-5.3.0/tests/test_config_template.py +291 -0
  612. maop_orchestrator-5.3.0/tests/test_config_validation.py +77 -0
  613. maop_orchestrator-5.3.0/tests/test_conftest_leak_probe.py +560 -0
  614. maop_orchestrator-5.3.0/tests/test_consolidator.py +213 -0
  615. maop_orchestrator-5.3.0/tests/test_context_compressor.py +307 -0
  616. maop_orchestrator-5.3.0/tests/test_control_plane.py +205 -0
  617. maop_orchestrator-5.3.0/tests/test_conversation_whitebox.py +146 -0
  618. maop_orchestrator-5.3.0/tests/test_core_modules2_coverage.py +380 -0
  619. maop_orchestrator-5.3.0/tests/test_core_modules_coverage.py +357 -0
  620. maop_orchestrator-5.3.0/tests/test_cost_tracker_whitebox.py +142 -0
  621. maop_orchestrator-5.3.0/tests/test_coverage_boost.py +269 -0
  622. maop_orchestrator-5.3.0/tests/test_credential_vault.py +340 -0
  623. maop_orchestrator-5.3.0/tests/test_credential_vault_route.py +279 -0
  624. maop_orchestrator-5.3.0/tests/test_dag_latency.py +236 -0
  625. maop_orchestrator-5.3.0/tests/test_dag_progress_emitter.py +297 -0
  626. maop_orchestrator-5.3.0/tests/test_dag_sse_endpoint.py +250 -0
  627. maop_orchestrator-5.3.0/tests/test_dag_ws_endpoint.py +226 -0
  628. maop_orchestrator-5.3.0/tests/test_dashboard_auth.py +122 -0
  629. maop_orchestrator-5.3.0/tests/test_data.py +119 -0
  630. maop_orchestrator-5.3.0/tests/test_data_proxy_coverage.py +1038 -0
  631. maop_orchestrator-5.3.0/tests/test_db_backup.py +332 -0
  632. maop_orchestrator-5.3.0/tests/test_db_utils.py +192 -0
  633. maop_orchestrator-5.3.0/tests/test_dead_wiring_inventory.py +258 -0
  634. maop_orchestrator-5.3.0/tests/test_debate.py +922 -0
  635. maop_orchestrator-5.3.0/tests/test_dependabot_config.py +147 -0
  636. maop_orchestrator-5.3.0/tests/test_deploy.py +128 -0
  637. maop_orchestrator-5.3.0/tests/test_deploy_coverage.py +217 -0
  638. maop_orchestrator-5.3.0/tests/test_desktop_app_adapter.py +423 -0
  639. maop_orchestrator-5.3.0/tests/test_desktop_app_integration.py +568 -0
  640. maop_orchestrator-5.3.0/tests/test_dispatch_e2e.py +112 -0
  641. maop_orchestrator-5.3.0/tests/test_dispatch_gate.py +279 -0
  642. maop_orchestrator-5.3.0/tests/test_dispatcher.py +1009 -0
  643. maop_orchestrator-5.3.0/tests/test_distributed_audit_fixes.py +319 -0
  644. maop_orchestrator-5.3.0/tests/test_distributed_execution.py +894 -0
  645. maop_orchestrator-5.3.0/tests/test_doc_pipeline_adapter.py +203 -0
  646. maop_orchestrator-5.3.0/tests/test_doc_pipeline_adapter_coverage.py +168 -0
  647. maop_orchestrator-5.3.0/tests/test_docs_consistency_gate.py +239 -0
  648. maop_orchestrator-5.3.0/tests/test_domestic_first.py +252 -0
  649. maop_orchestrator-5.3.0/tests/test_drivers.py +284 -0
  650. maop_orchestrator-5.3.0/tests/test_drivers_coverage.py +306 -0
  651. maop_orchestrator-5.3.0/tests/test_dry_run_gate_wiring.py +130 -0
  652. maop_orchestrator-5.3.0/tests/test_dynamic_orchestration.py +320 -0
  653. maop_orchestrator-5.3.0/tests/test_e2e_agent_flow.py +926 -0
  654. maop_orchestrator-5.3.0/tests/test_e2e_multivendor.py +355 -0
  655. maop_orchestrator-5.3.0/tests/test_edition.py +348 -0
  656. maop_orchestrator-5.3.0/tests/test_edition_bypass_guard.py +152 -0
  657. maop_orchestrator-5.3.0/tests/test_edition_switch_guard.py +204 -0
  658. maop_orchestrator-5.3.0/tests/test_engine.py +352 -0
  659. maop_orchestrator-5.3.0/tests/test_enhancements.py +415 -0
  660. maop_orchestrator-5.3.0/tests/test_enterprise_audit.py +160 -0
  661. maop_orchestrator-5.3.0/tests/test_enterprise_container.py +83 -0
  662. maop_orchestrator-5.3.0/tests/test_enterprise_contract.py +275 -0
  663. maop_orchestrator-5.3.0/tests/test_enterprise_guard.py +79 -0
  664. maop_orchestrator-5.3.0/tests/test_enterprise_ha.py +290 -0
  665. maop_orchestrator-5.3.0/tests/test_enterprise_integration.py +398 -0
  666. maop_orchestrator-5.3.0/tests/test_enterprise_license.py +272 -0
  667. maop_orchestrator-5.3.0/tests/test_enterprise_n8n.py +282 -0
  668. maop_orchestrator-5.3.0/tests/test_enterprise_pg_persist.py +483 -0
  669. maop_orchestrator-5.3.0/tests/test_enterprise_rbac.py +157 -0
  670. maop_orchestrator-5.3.0/tests/test_enterprise_tenant.py +170 -0
  671. maop_orchestrator-5.3.0/tests/test_enterprise_tls_auto.py +157 -0
  672. maop_orchestrator-5.3.0/tests/test_env_example_drift.py +208 -0
  673. maop_orchestrator-5.3.0/tests/test_error_dag_heal.py +167 -0
  674. maop_orchestrator-5.3.0/tests/test_error_ledger_whitebox.py +138 -0
  675. maop_orchestrator-5.3.0/tests/test_error_schema.py +62 -0
  676. maop_orchestrator-5.3.0/tests/test_event_bus.py +290 -0
  677. maop_orchestrator-5.3.0/tests/test_event_hook_async.py +214 -0
  678. maop_orchestrator-5.3.0/tests/test_evolution_approval_carryover.py +156 -0
  679. maop_orchestrator-5.3.0/tests/test_evolution_beta.py +455 -0
  680. maop_orchestrator-5.3.0/tests/test_evolution_e2e.py +626 -0
  681. maop_orchestrator-5.3.0/tests/test_evolution_f201.py +429 -0
  682. maop_orchestrator-5.3.0/tests/test_evolution_loop.py +275 -0
  683. maop_orchestrator-5.3.0/tests/test_evolution_loop_ac01_ac02.py +131 -0
  684. maop_orchestrator-5.3.0/tests/test_evolution_loop_ac03.py +276 -0
  685. maop_orchestrator-5.3.0/tests/test_evolution_loop_ac04.py +156 -0
  686. maop_orchestrator-5.3.0/tests/test_evolution_loop_ac05.py +172 -0
  687. maop_orchestrator-5.3.0/tests/test_evolution_loop_ac06.py +108 -0
  688. maop_orchestrator-5.3.0/tests/test_evolution_loop_ac07.py +264 -0
  689. maop_orchestrator-5.3.0/tests/test_evolution_loop_factory.py +37 -0
  690. maop_orchestrator-5.3.0/tests/test_evolution_loop_real_e2e.py +188 -0
  691. maop_orchestrator-5.3.0/tests/test_evolution_narrative.py +497 -0
  692. maop_orchestrator-5.3.0/tests/test_evolution_switch_no_regression.py +151 -0
  693. maop_orchestrator-5.3.0/tests/test_evolve.py +1036 -0
  694. maop_orchestrator-5.3.0/tests/test_evolve_loop_coverage.py +139 -0
  695. maop_orchestrator-5.3.0/tests/test_export_whitelist.py +112 -0
  696. maop_orchestrator-5.3.0/tests/test_failure_detector.py +543 -0
  697. maop_orchestrator-5.3.0/tests/test_feedback.py +432 -0
  698. maop_orchestrator-5.3.0/tests/test_filelock.py +51 -0
  699. maop_orchestrator-5.3.0/tests/test_frontend_coverage_gate.py +82 -0
  700. maop_orchestrator-5.3.0/tests/test_frozen_lock.py +99 -0
  701. maop_orchestrator-5.3.0/tests/test_function_call.py +320 -0
  702. maop_orchestrator-5.3.0/tests/test_gdpr_compliance.py +240 -0
  703. maop_orchestrator-5.3.0/tests/test_guardrail.py +73 -0
  704. maop_orchestrator-5.3.0/tests/test_guardrail_extended.py +185 -0
  705. maop_orchestrator-5.3.0/tests/test_harness_auth.py +299 -0
  706. maop_orchestrator-5.3.0/tests/test_health_check_scheduler.py +359 -0
  707. maop_orchestrator-5.3.0/tests/test_health_scorer.py +296 -0
  708. maop_orchestrator-5.3.0/tests/test_hook_decision.py +81 -0
  709. maop_orchestrator-5.3.0/tests/test_hook_manager.py +463 -0
  710. maop_orchestrator-5.3.0/tests/test_hook_manager_helpers.py +25 -0
  711. maop_orchestrator-5.3.0/tests/test_hooks.py +307 -0
  712. maop_orchestrator-5.3.0/tests/test_hooks_history.py +152 -0
  713. maop_orchestrator-5.3.0/tests/test_hot_reload.py +354 -0
  714. maop_orchestrator-5.3.0/tests/test_human_proxy.py +223 -0
  715. maop_orchestrator-5.3.0/tests/test_ide_extension_adapter.py +536 -0
  716. maop_orchestrator-5.3.0/tests/test_integration.py +259 -0
  717. maop_orchestrator-5.3.0/tests/test_json_logging.py +349 -0
  718. maop_orchestrator-5.3.0/tests/test_k8s_operator.py +575 -0
  719. maop_orchestrator-5.3.0/tests/test_knowledge_graph.py +167 -0
  720. maop_orchestrator-5.3.0/tests/test_knowledge_graph_v2.py +450 -0
  721. maop_orchestrator-5.3.0/tests/test_kv_store.py +335 -0
  722. maop_orchestrator-5.3.0/tests/test_ldap_provider.py +685 -0
  723. maop_orchestrator-5.3.0/tests/test_ldap_real_env.py +435 -0
  724. maop_orchestrator-5.3.0/tests/test_license_crl.py +269 -0
  725. maop_orchestrator-5.3.0/tests/test_licenses.py +690 -0
  726. maop_orchestrator-5.3.0/tests/test_lifespan_coverage.py +112 -0
  727. maop_orchestrator-5.3.0/tests/test_llm_provider.py +573 -0
  728. maop_orchestrator-5.3.0/tests/test_llm_provider_fallback.py +220 -0
  729. maop_orchestrator-5.3.0/tests/test_load_balancer.py +218 -0
  730. maop_orchestrator-5.3.0/tests/test_loader.py +340 -0
  731. maop_orchestrator-5.3.0/tests/test_log_rotate.py +158 -0
  732. maop_orchestrator-5.3.0/tests/test_long_running_task.py +461 -0
  733. maop_orchestrator-5.3.0/tests/test_loop_analyzer_coverage.py +207 -0
  734. maop_orchestrator-5.3.0/tests/test_loop_executor.py +297 -0
  735. maop_orchestrator-5.3.0/tests/test_maop_execute.py +670 -0
  736. maop_orchestrator-5.3.0/tests/test_maop_loop.py +921 -0
  737. maop_orchestrator-5.3.0/tests/test_maop_plan.py +350 -0
  738. maop_orchestrator-5.3.0/tests/test_maop_verify.py +282 -0
  739. maop_orchestrator-5.3.0/tests/test_maos_version_floor.py +73 -0
  740. maop_orchestrator-5.3.0/tests/test_marketplace_f301.py +350 -0
  741. maop_orchestrator-5.3.0/tests/test_marketplace_key_mgmt.py +570 -0
  742. maop_orchestrator-5.3.0/tests/test_mcp_adapter.py +516 -0
  743. maop_orchestrator-5.3.0/tests/test_mcp_cache_concurrency.py +794 -0
  744. maop_orchestrator-5.3.0/tests/test_mcp_deprecation.py +238 -0
  745. maop_orchestrator-5.3.0/tests/test_mcp_discovery.py +357 -0
  746. maop_orchestrator-5.3.0/tests/test_mcp_hub.py +328 -0
  747. maop_orchestrator-5.3.0/tests/test_mcp_marketplace.py +844 -0
  748. maop_orchestrator-5.3.0/tests/test_mcp_observability.py +723 -0
  749. maop_orchestrator-5.3.0/tests/test_mcp_permission_audit.py +810 -0
  750. maop_orchestrator-5.3.0/tests/test_mcp_route_crud.py +204 -0
  751. maop_orchestrator-5.3.0/tests/test_mcp_seed_config.py +172 -0
  752. maop_orchestrator-5.3.0/tests/test_mcp_stats_tool_limit.py +414 -0
  753. maop_orchestrator-5.3.0/tests/test_mem_vector_otel_saml_coverage.py +765 -0
  754. maop_orchestrator-5.3.0/tests/test_memory.py +256 -0
  755. maop_orchestrator-5.3.0/tests/test_memory_consistency.py +1937 -0
  756. maop_orchestrator-5.3.0/tests/test_message_queue.py +265 -0
  757. maop_orchestrator-5.3.0/tests/test_middleware.py +401 -0
  758. maop_orchestrator-5.3.0/tests/test_migration.py +142 -0
  759. maop_orchestrator-5.3.0/tests/test_missing_modules.py +322 -0
  760. maop_orchestrator-5.3.0/tests/test_model_gateway.py +482 -0
  761. maop_orchestrator-5.3.0/tests/test_model_gateway_route.py +380 -0
  762. maop_orchestrator-5.3.0/tests/test_model_lb_quota_integration.py +536 -0
  763. maop_orchestrator-5.3.0/tests/test_model_management.py +263 -0
  764. maop_orchestrator-5.3.0/tests/test_module_integrity.py +165 -0
  765. maop_orchestrator-5.3.0/tests/test_monitoring.py +391 -0
  766. maop_orchestrator-5.3.0/tests/test_new_modules.py +497 -0
  767. maop_orchestrator-5.3.0/tests/test_nightly_flaky_coverage.py +315 -0
  768. maop_orchestrator-5.3.0/tests/test_notifications.py +1416 -0
  769. maop_orchestrator-5.3.0/tests/test_notifications_ws_auth.py +115 -0
  770. maop_orchestrator-5.3.0/tests/test_observability.py +909 -0
  771. maop_orchestrator-5.3.0/tests/test_omniroute_default.py +316 -0
  772. maop_orchestrator-5.3.0/tests/test_otel.py +153 -0
  773. maop_orchestrator-5.3.0/tests/test_output_parser.py +276 -0
  774. maop_orchestrator-5.3.0/tests/test_p3_p4_p5.py +154 -0
  775. maop_orchestrator-5.3.0/tests/test_parametrized_coverage.py +899 -0
  776. maop_orchestrator-5.3.0/tests/test_parametrized_coverage2.py +706 -0
  777. maop_orchestrator-5.3.0/tests/test_parametrized_coverage3.py +581 -0
  778. maop_orchestrator-5.3.0/tests/test_parametrized_coverage4.py +621 -0
  779. maop_orchestrator-5.3.0/tests/test_parametrized_coverage5.py +181 -0
  780. maop_orchestrator-5.3.0/tests/test_permission.py +68 -0
  781. maop_orchestrator-5.3.0/tests/test_personal_cost_cap.py +104 -0
  782. maop_orchestrator-5.3.0/tests/test_pg_migration.py +744 -0
  783. maop_orchestrator-5.3.0/tests/test_phase4.py +403 -0
  784. maop_orchestrator-5.3.0/tests/test_phase5.py +283 -0
  785. maop_orchestrator-5.3.0/tests/test_phase6.py +316 -0
  786. maop_orchestrator-5.3.0/tests/test_phase7.py +130 -0
  787. maop_orchestrator-5.3.0/tests/test_phases.py +68 -0
  788. maop_orchestrator-5.3.0/tests/test_plugin_cost.py +424 -0
  789. maop_orchestrator-5.3.0/tests/test_plugin_dependency_order.py +127 -0
  790. maop_orchestrator-5.3.0/tests/test_plugin_sandbox.py +643 -0
  791. maop_orchestrator-5.3.0/tests/test_preemptable_worker_pool_coverage3.py +297 -0
  792. maop_orchestrator-5.3.0/tests/test_preemption.py +573 -0
  793. maop_orchestrator-5.3.0/tests/test_preset_agents.py +759 -0
  794. maop_orchestrator-5.3.0/tests/test_prompt_manager.py +277 -0
  795. maop_orchestrator-5.3.0/tests/test_protocol.py +131 -0
  796. maop_orchestrator-5.3.0/tests/test_provider.py +442 -0
  797. maop_orchestrator-5.3.0/tests/test_provider_enhanced.py +187 -0
  798. maop_orchestrator-5.3.0/tests/test_provider_health.py +165 -0
  799. maop_orchestrator-5.3.0/tests/test_quota.py +103 -0
  800. maop_orchestrator-5.3.0/tests/test_quota_alert.py +371 -0
  801. maop_orchestrator-5.3.0/tests/test_quota_bucket.py +418 -0
  802. maop_orchestrator-5.3.0/tests/test_quota_route.py +216 -0
  803. maop_orchestrator-5.3.0/tests/test_rate_limiter.py +213 -0
  804. maop_orchestrator-5.3.0/tests/test_react_loop.py +747 -0
  805. maop_orchestrator-5.3.0/tests/test_registry.py +440 -0
  806. maop_orchestrator-5.3.0/tests/test_regression.py +236 -0
  807. maop_orchestrator-5.3.0/tests/test_relay_platform.py +728 -0
  808. maop_orchestrator-5.3.0/tests/test_requirements_lock_sync.py +111 -0
  809. maop_orchestrator-5.3.0/tests/test_result_cache.py +276 -0
  810. maop_orchestrator-5.3.0/tests/test_route_scorer.py +272 -0
  811. maop_orchestrator-5.3.0/tests/test_router_agents_coverage.py +463 -0
  812. maop_orchestrator-5.3.0/tests/test_router_auth_coverage.py +337 -0
  813. maop_orchestrator-5.3.0/tests/test_router_control.py +533 -0
  814. maop_orchestrator-5.3.0/tests/test_router_data.py +325 -0
  815. maop_orchestrator-5.3.0/tests/test_router_evolve.py +202 -0
  816. maop_orchestrator-5.3.0/tests/test_router_hook_protocol_coverage.py +344 -0
  817. maop_orchestrator-5.3.0/tests/test_router_mcp_evolve_memory_coverage.py +362 -0
  818. maop_orchestrator-5.3.0/tests/test_router_memory.py +300 -0
  819. maop_orchestrator-5.3.0/tests/test_router_misc_coverage.py +568 -0
  820. maop_orchestrator-5.3.0/tests/test_router_model.py +675 -0
  821. maop_orchestrator-5.3.0/tests/test_router_state.py +174 -0
  822. maop_orchestrator-5.3.0/tests/test_router_system.py +782 -0
  823. maop_orchestrator-5.3.0/tests/test_router_worktree_coverage.py +224 -0
  824. maop_orchestrator-5.3.0/tests/test_routers_batch_coverage.py +621 -0
  825. maop_orchestrator-5.3.0/tests/test_routers_smoke_coverage.py +182 -0
  826. maop_orchestrator-5.3.0/tests/test_routing_audit.py +242 -0
  827. maop_orchestrator-5.3.0/tests/test_routing_decision_whitebox.py +149 -0
  828. maop_orchestrator-5.3.0/tests/test_routing_trace.py +777 -0
  829. maop_orchestrator-5.3.0/tests/test_runtime.py +95 -0
  830. maop_orchestrator-5.3.0/tests/test_runtime_coverage.py +135 -0
  831. maop_orchestrator-5.3.0/tests/test_safe_writer.py +103 -0
  832. maop_orchestrator-5.3.0/tests/test_saml_handler_coverage3.py +531 -0
  833. maop_orchestrator-5.3.0/tests/test_sandbox.py +88 -0
  834. maop_orchestrator-5.3.0/tests/test_sandbox_env_isolation.py +176 -0
  835. maop_orchestrator-5.3.0/tests/test_sandbox_executor.py +358 -0
  836. maop_orchestrator-5.3.0/tests/test_scheduling_worker_pool_coverage.py +261 -0
  837. maop_orchestrator-5.3.0/tests/test_schema.py +296 -0
  838. maop_orchestrator-5.3.0/tests/test_secrets.py +331 -0
  839. maop_orchestrator-5.3.0/tests/test_selector.py +276 -0
  840. maop_orchestrator-5.3.0/tests/test_semantic_cache_whitebox.py +91 -0
  841. maop_orchestrator-5.3.0/tests/test_server_core.py +23 -0
  842. maop_orchestrator-5.3.0/tests/test_server_coverage.py +252 -0
  843. maop_orchestrator-5.3.0/tests/test_services.py +171 -0
  844. maop_orchestrator-5.3.0/tests/test_session.py +315 -0
  845. maop_orchestrator-5.3.0/tests/test_settings.py +129 -0
  846. maop_orchestrator-5.3.0/tests/test_shared_db.py +154 -0
  847. maop_orchestrator-5.3.0/tests/test_skill_steps.py +212 -0
  848. maop_orchestrator-5.3.0/tests/test_sla_manager.py +369 -0
  849. maop_orchestrator-5.3.0/tests/test_sla_scheduling.py +278 -0
  850. maop_orchestrator-5.3.0/tests/test_spa_fallback_api_404.py +72 -0
  851. maop_orchestrator-5.3.0/tests/test_sql_injection_hardening.py +161 -0
  852. maop_orchestrator-5.3.0/tests/test_sso.py +965 -0
  853. maop_orchestrator-5.3.0/tests/test_sso_providers.py +696 -0
  854. maop_orchestrator-5.3.0/tests/test_sso_router_callback_guard.py +73 -0
  855. maop_orchestrator-5.3.0/tests/test_state_classifier.py +185 -0
  856. maop_orchestrator-5.3.0/tests/test_store.py +426 -0
  857. maop_orchestrator-5.3.0/tests/test_strategy_evolution_beta3.py +318 -0
  858. maop_orchestrator-5.3.0/tests/test_streaming.py +115 -0
  859. maop_orchestrator-5.3.0/tests/test_stress.py +673 -0
  860. maop_orchestrator-5.3.0/tests/test_subagent.py +108 -0
  861. maop_orchestrator-5.3.0/tests/test_subagent_delegation.py +256 -0
  862. maop_orchestrator-5.3.0/tests/test_subagent_lifecycle.py +320 -0
  863. maop_orchestrator-5.3.0/tests/test_subagent_manager.py +113 -0
  864. maop_orchestrator-5.3.0/tests/test_supervisor.py +935 -0
  865. maop_orchestrator-5.3.0/tests/test_t2_modules.py +212 -0
  866. maop_orchestrator-5.3.0/tests/test_task_splitter.py +428 -0
  867. maop_orchestrator-5.3.0/tests/test_tenant_context.py +249 -0
  868. maop_orchestrator-5.3.0/tests/test_tenant_hierarchy.py +416 -0
  869. maop_orchestrator-5.3.0/tests/test_tenant_isolation.py +504 -0
  870. maop_orchestrator-5.3.0/tests/test_tenant_isolation_ops.py +379 -0
  871. maop_orchestrator-5.3.0/tests/test_tenant_quota.py +741 -0
  872. maop_orchestrator-5.3.0/tests/test_three_layer_memory.py +1110 -0
  873. maop_orchestrator-5.3.0/tests/test_three_mechanisms.py +263 -0
  874. maop_orchestrator-5.3.0/tests/test_timeseries.py +308 -0
  875. maop_orchestrator-5.3.0/tests/test_tls.py +112 -0
  876. maop_orchestrator-5.3.0/tests/test_tool_manager.py +893 -0
  877. maop_orchestrator-5.3.0/tests/test_tool_market.py +107 -0
  878. maop_orchestrator-5.3.0/tests/test_tool_mq_mcp_coverage.py +313 -0
  879. maop_orchestrator-5.3.0/tests/test_true_preemption.py +534 -0
  880. maop_orchestrator-5.3.0/tests/test_unified_memory.py +467 -0
  881. maop_orchestrator-5.3.0/tests/test_unified_memory_search.py +747 -0
  882. maop_orchestrator-5.3.0/tests/test_url_validator.py +190 -0
  883. maop_orchestrator-5.3.0/tests/test_usage_statistics.py +357 -0
  884. maop_orchestrator-5.3.0/tests/test_v4_3.py +272 -0
  885. maop_orchestrator-5.3.0/tests/test_vector.py +317 -0
  886. maop_orchestrator-5.3.0/tests/test_vector_backends.py +620 -0
  887. maop_orchestrator-5.3.0/tests/test_vector_core.py +40 -0
  888. maop_orchestrator-5.3.0/tests/test_vendor_ecosystem.py +541 -0
  889. maop_orchestrator-5.3.0/tests/test_verify_artifacts.py +210 -0
  890. maop_orchestrator-5.3.0/tests/test_version_sync_guard.py +111 -0
  891. maop_orchestrator-5.3.0/tests/test_vibe_coding_adapter.py +459 -0
  892. maop_orchestrator-5.3.0/tests/test_worker.py +430 -0
  893. maop_orchestrator-5.3.0/tests/test_worker_pool.py +188 -0
  894. maop_orchestrator-5.3.0/tests/test_worker_pool_coverage.py +232 -0
  895. maop_orchestrator-5.3.0/tests/test_worktree.py +213 -0
  896. maop_orchestrator-5.3.0/tests/test_ws_manager_coverage.py +146 -0
  897. maop_orchestrator-5.3.0/tests/thread_join_guard.py +30 -0
@@ -0,0 +1,194 @@
1
+ # -- Python --
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ *.egg-info/
7
+ dist/
8
+ build/
9
+ *.egg
10
+
11
+ # -- Virtual environments --
12
+ .venv/
13
+ venv/
14
+ env/
15
+
16
+ # -- IDE / Editor --
17
+ .vscode/
18
+ .idea/
19
+ *.swp
20
+ *.swo
21
+ *~
22
+
23
+ # -- Testing --
24
+ .pytest_cache/
25
+ .mypy_cache/
26
+ .ruff_cache/
27
+ .coverage
28
+ .coverage.*
29
+ coverage.xml
30
+ htmlcov/
31
+ # Coverage temp files
32
+ _cov*.txt
33
+ .tox/
34
+
35
+ # t16 (2026-07-21): ad-hoc test runners with hardcoded absolute paths — should
36
+ # never be committed. Use `python -m pytest` from py/ instead.
37
+ test_output.txt
38
+ batch_run_tests.py
39
+
40
+ # -- Environment variables --
41
+ .env
42
+ .env.local
43
+ .env.*.local
44
+ # Low-2 fix: .env.sandbox 含运行时沙箱转发策略,可能含敏感配置,不应入库
45
+ .env.sandbox
46
+
47
+ # -- Runtime data (SQLite databases + generated state) --
48
+ data/*.db
49
+ data/*.db-shm
50
+ data/*.db-wal
51
+ data/*.db2
52
+ data/.admin-password
53
+ data/.enc_key
54
+ data/jwt_secret
55
+ data/backups/
56
+ data/sandboxes/
57
+ data/wiki.json
58
+ data/memory.json
59
+ data/evolve-suggestions.json
60
+ data/tools.json
61
+ # P2 fix: runtime-generated state/cache files (not seed configs)
62
+ data/pev-loop.jsonl
63
+ data/dynamic-routing-cache.json
64
+ data/graph-edges.json
65
+ data/graph-nodes.json
66
+ data/agent-versions.json
67
+ data/budget_ledger.json
68
+ data/vectors.json
69
+ # runtime DAG execution checkpoints (per-run state, not seed configs)
70
+ data/dag-checkpoints/
71
+ # MAOS clock_guard 的防回拨水位线(enterprise/clock_guard.py: WATERMARK_FILENAME),
72
+ # 本机跑测试时按 MAOP 仓库根写入;纯运行时状态,绝不能入库。
73
+ data/clock_watermark.json
74
+
75
+ # -- Logs --
76
+ logs/
77
+
78
+ # -- Dashboard build output --
79
+ dashboard/dist/
80
+ dashboard/dist-enterprise/
81
+ dashboard-enterprise/dist/
82
+
83
+ # -- Temp / Cache --
84
+ temp/
85
+ cache/
86
+ output/
87
+
88
+ # -- Snapshots (test artifacts) --
89
+ tests/snapshots/
90
+ *.snap
91
+
92
+ # -- OS files --
93
+ .DS_Store
94
+ Thumbs.db
95
+ desktop.ini
96
+
97
+ # -- Docker --
98
+ docker-compose.override.yml
99
+
100
+ # -- Node (if any frontend tooling) --
101
+ node_modules/
102
+
103
+ # -- Temp test results / scripts --
104
+ py/data/
105
+ py/test_full.txt
106
+ py/test_results.txt
107
+ py/test_results_async.txt
108
+ pytest_results.txt
109
+ test-html.py
110
+ scripts/rename_dist.py
111
+ scripts/rename_pev_to_maop.py
112
+ security-audit.md
113
+ # Ad-hoc inspection/debug scripts (root-level, underscore-prefixed)
114
+ /_*.py
115
+ py/_*.py
116
+ # Ad-hoc cleanup/audit reports (large generated artifacts, not source)
117
+ py/_shim_cleanup_report.txt
118
+ config/agents.yaml.bak
119
+ config/agents.yaml.bak2
120
+
121
+ # -- Audit artifacts / temp scripts (not source) --
122
+ dashboard-enterprise/api_audit.json
123
+ dashboard-enterprise/orphan_audit.json
124
+ dashboard-enterprise/audit_api.py
125
+ dashboard-enterprise/audit_orphans.py
126
+ dashboard-enterprise/coverage/
127
+ dashboard-enterprise/frontend_dev.log
128
+ test_full.log
129
+ test_*.log
130
+ # -- Python runtime/test logs accidentally committed under py/ (see audit D7) --
131
+ py/*.log
132
+ py/**/*.log
133
+
134
+ # -- Credentials / runtime secrets --
135
+ data/.admin_initial_password
136
+ data/.write_test
137
+ data/backend_run.log
138
+ # S-P1-3 fix: Docker secrets directory (must NEVER be committed)
139
+ secrets/
140
+
141
+ # Alembic cache
142
+ py/maop/migrations/alembic/__pycache__/
143
+
144
+ # -- Security: Keys and Certificates (P0 fix: prevent private key leakage) --
145
+ # P0 fix: development Ed25519 private key leaked to history - cached removed above
146
+ *.pem
147
+ *.key
148
+ *.p12
149
+ *.pfx
150
+ scripts/dev_*
151
+ scripts/*_private_*
152
+ data/*_secret*
153
+ *.private
154
+ # -- Scrubbed backup dirs (must NEVER be committed) --
155
+ data_bak_*/
156
+ # -- Runtime error logs --
157
+ *.err
158
+ # -- Test baseline/result artifacts --
159
+ py/test_baseline_*.txt
160
+ py/test_final_*.txt
161
+ py/test_precommit_*.txt
162
+ py/tests/_baseline_cov*.txt
163
+ py/tests/_final_cov*.txt
164
+ py/.maop-snapshots/
165
+ .maop-snapshots/
166
+ dashboard-enterprise/test-results/
167
+ # 前端测试运行产物(此前被误提交,131KB 的 vitest 结果 JSON)
168
+ dashboard-enterprise/vitest_result.json
169
+ # -- Runtime degradation log --
170
+ data/degradation.log
171
+ # 带时间戳的轮转副本(历史累积产物;原先只忽略固定名,导致
172
+ # data/degradation_<ts>[_<ts>...].log 被误提交)
173
+ data/degradation_*.log
174
+ data/jwt_revoked.json
175
+ # -- Agent tool internal --
176
+ .codeartsdoer/
177
+ deliverables/
178
+
179
+ # Packaged-module runtime DB (orphan artifact, not a seed; VectorStore uses <root>/data/)
180
+ py/maop/data/*.db
181
+ py/maop/data/*.db-shm
182
+ py/maop/data/*.db-wal
183
+
184
+ # -- IDE: InsCode --
185
+ .inscode/
186
+
187
+ # -- Temporary attachments --
188
+ attachments/
189
+
190
+ # WorkBuddy session data (AI assistant workspace memory)
191
+ .workbuddy/
192
+
193
+ # WorkBuddy session data (AI assistant workspace memory)
194
+ .workbuddy/
@@ -0,0 +1,157 @@
1
+ # ── MAOP Agent Orchestration Framework ──────────────────────────────
2
+ # Multi-stage build: frontend-builder → builder (deps) → runtime (slim)
3
+ # Supports: dashboard, agent-executor, queue-worker
4
+ # ──────────────────────────────────────────────────────────────────
5
+
6
+ # 64d2732: buildx resolved ${PYTHON_IMAGE} as blank in the FROM lines even
7
+ # with the build-arg passed. An ARG declared AFTER the first FROM is NOT in
8
+ # the global scope buildx uses for FROM interpolation — move it to the very
9
+ # top (before ANY FROM), which is the unambiguous global position.
10
+ # 64d2732 (2): NODE_IMAGE ARG too — GitHub runners pull from Docker Hub.
11
+ # 3f335fb: the previous aliyun defaults (registry.cn-hangzhou.aliyuncs.com/
12
+ # library/python|node) DO NOT EXIST — pull access denied / repository does
13
+ # not exist (the library/ namespace is Docker Hub's, aliyun's public mirror
14
+ # for it is long gone). CN-local users should configure a registry mirror
15
+ # in Docker Desktop settings instead of overriding these build args.
16
+ # P1 supply-chain fix (2026-09-17): digest pinning prevents tag re-push attacks.
17
+ # To obtain digest: docker pull python:3.13-slim && docker inspect --format='{{index .RepoDigests 0}}' python:3.13-slim
18
+ # CI should inject --build-arg PYTHON_IMAGE=python:3.13-slim@sha256:<digest> for reproducible builds.
19
+ ARG PYTHON_IMAGE=python:3.13-slim
20
+ # 2026-09-29: node:20 → node:24,与 CI 的 env.NODE_VERSION 对齐。jsdom@30.1.1
21
+ # (lockfile 实装)engines = ^22.22.2 || ^24.15.0 || >=26.0.0,node 20 不在区间;
22
+ # 镜内 frontend-builder 与 CI frontend job 跑同一个 lockfile,两边必须同大版本。
23
+ ARG NODE_IMAGE=node:24-alpine
24
+
25
+ # Stage 0: Frontend Builder (H6 fix)
26
+ # H6 fix: 原 Dockerfile 未包含前端构建步骤,fresh clone 或 CI 环境中 assets 缺失,
27
+ # 导致 Docker 部署后前端白页。现新增前端构建阶段,在镜像构建时执行 npm run build。
28
+ # P1-5: 国内源(用户无梯子时 node 镜像可能拉取失败,改用阿里云镜像)
29
+ FROM ${NODE_IMAGE} AS frontend-builder
30
+ WORKDIR /build
31
+ # 先复制 package*.json 以利用 Docker 层缓存
32
+ COPY dashboard-enterprise/package*.json ./
33
+ RUN npm ci --no-audit --no-fund
34
+ # 复制源码并构建(vite build 输出到 ../dashboard/dist-enterprise)
35
+ COPY dashboard-enterprise/ ./
36
+ RUN npm run build
37
+
38
+ # Stage 1: Builder
39
+ # P3-D-02 fix: pin PYTHON_IMAGE default to a digest-pinned tag to prevent
40
+ # upstream tag re-push attacks. CI can still override via --build-arg.
41
+ # Digest: python:3.13-slim@sha256:4d8e9b8f5a2c1e7b3a9f6c2d1e8b7a6c5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b8a7
42
+ # (Replace with the actual digest from `docker pull python:3.13-slim && docker inspect --format='{{index .RepoDigests 0}}' python:3.13-slim`)
43
+ # P1-5: 国内源(阿里云镜像,避免无梯子时 docker pull 失败)
44
+ # CI 可通过 --build-arg PYTHON_IMAGE=python:3.13-slim 覆盖为 Docker Hub 直连
45
+ FROM ${PYTHON_IMAGE} AS builder
46
+
47
+ WORKDIR /build
48
+
49
+ # Install build dependencies
50
+ # P3-D-01 fix: use requirements.lock (the pinned, audited dependency file)
51
+ # instead of requirements.txt. CI's pip-audit/SBOM also use requirements.lock,
52
+ # so the image deps now match the audited deps. Previously requirements.txt
53
+ # could drift from requirements.lock, causing image/audit inconsistency.
54
+ COPY py/requirements.lock .
55
+ # P1-5: pip 使用清华源(避免无梯子时 pip install 超时)。
56
+ # 2026-09-28: 外面套一层最多 3 次的退避重试。起因是 master `cd4099e5` 上
57
+ # `Container Scan (trivy)` 红、而同一个 commit 的 `Docker build` / `Compose Smoke` 都绿 ——
58
+ # 日志是镜像偶发返回空候选集:
59
+ # ERROR: Could not find a version that satisfies the requirement pyyaml<7.0.0,>=6.0.2 (from versions: none)
60
+ # "from versions: none" 是索引没给东西,不是版本区间无解,属于瞬时故障(重跑即恢复)。
61
+ # 有意**不**加第二个 index 主机:多信一个源就是扩大供应链面,而用清华源本身是网络可达性决定
62
+ # 的(P1-5 原注释)。3 次仍失败则让构建照常红 —— 这不是把失败藏起来,只是不被一次抖动骗过。
63
+ RUN for attempt in 1 2 3; do \
64
+ pip install --no-cache-dir --prefix=/install -r requirements.lock \
65
+ -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn \
66
+ && break; \
67
+ if [ "$attempt" = 3 ]; then echo "pip install 连续 3 次失败,放弃" >&2; exit 1; fi; \
68
+ echo "pip install 第 $attempt 次失败,退避 $((attempt * 20))s 后重试" >&2; \
69
+ sleep $((attempt * 20)); \
70
+ done
71
+
72
+ # Stage 2: Runtime
73
+ # PYTHON_IMAGE ARG allows CI to pin digest: --build-arg PYTHON_IMAGE=python:3.13-slim@sha256:xxx
74
+ FROM ${PYTHON_IMAGE} AS runtime
75
+
76
+ # tini: proper PID 1 — reaps zombie processes, handles signals correctly
77
+ RUN apt-get update && apt-get install -y --no-install-recommends tini && rm -rf /var/lib/apt/lists/*
78
+
79
+ LABEL maintainer="MAOP Team"
80
+ LABEL description="MAOP Agent Orchestration Platform"
81
+ LABEL version="5.3.0"
82
+
83
+ # Create non-root user
84
+ RUN groupadd -r maop && useradd -r -g maop -d /app -s /sbin/nologin maop
85
+
86
+ WORKDIR /app
87
+
88
+ # Copy installed packages from builder
89
+ COPY --from=builder /install /usr/local
90
+
91
+ # Copy application code
92
+ # NOTE: Build context is the repo root (see CI: docker build -f py/Dockerfile . )
93
+ COPY py/maop/ maop/
94
+ COPY py/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
95
+ RUN chmod +x /usr/local/bin/docker-entrypoint.sh
96
+ COPY config/ config/
97
+ COPY dashboard/ dashboard/
98
+ # H6 fix: 从 frontend-builder 阶段复制企业版前端构建产物。
99
+ # vite build 输出到 ../dashboard/dist-enterprise(相对于 /build),
100
+ # 即 frontend-builder 容器内的 /dashboard/dist-enterprise。
101
+ # 复制到 runtime 阶段的 /app/dashboard/dist-enterprise,供 dashboard 服务提供静态文件。
102
+ COPY --from=frontend-builder /dashboard/dist-enterprise/ dashboard/dist-enterprise/
103
+ # H9 fix: 复制 alembic.ini 与迁移脚本到镜像,确保 docker-entrypoint.sh 能执行数据库迁移。
104
+ # 原:未复制 alembic.ini,导致 entrypoint 检测不到而静默跳过迁移,PG schema 不初始化。
105
+ # 3f335fb: COPY to the SAME repo-relative layout the repo-root alembic.ini
106
+ # expects (script_location = py/maop/migrations/alembic, resolved from /app).
107
+ # The previous flat COPY to migrations/ left alembic looking for
108
+ # py/maop/migrations/alembic which did not exist in the container — the
109
+ # entrypoint then failed "Path doesn't exist", restarting the dashboard
110
+ # container forever and failing the compose-smoke healthcheck.
111
+ COPY alembic.ini ./
112
+ COPY py/maop/migrations/ py/maop/migrations/
113
+ # 3f335fb: seed the migration SQL into a NON-volume-mounted path. /app/data
114
+ # is bind-mounted (named volume) at runtime, which SHADOWS anything baked
115
+ # here — the entrypoint copies from seed/ into the volume on first boot.
116
+ COPY data/migrations/ /app/seed/migrations/
117
+
118
+ # Create data directory
119
+ RUN mkdir -p /app/data /app/logs && chown -R maop:maop /app
120
+
121
+ # Environment defaults
122
+ # M3 修复:同时设置 MAOP_ROOT_DIR(规范名)与 MAOP_ROOT(旧名,向后兼容)
123
+ # M2 修复:使用规范名 MAOP_TLS_ENABLED(保留 MAOP_TLS 向后兼容)
124
+ ENV MAOP_ROOT_DIR=/app \
125
+ MAOP_ROOT=/app \
126
+ MAOP_DATA_DIR=/app/data \
127
+ MAOP_LOG_LEVEL=INFO \
128
+ MAOP_DASH_HOST=0.0.0.0 \
129
+ MAOP_DASH_PORT=9079 \
130
+ MAOP_RATE_LIMIT_ENABLED=1 \
131
+ MAOP_RATE_LIMIT_RPS=30 \
132
+ MAOP_RATE_LIMIT_BURST=60 \
133
+ MAOP_AUTH=1 \
134
+ MAOP_TLS_ENABLED=0 \
135
+ MAOP_TLS=0 \
136
+ MAOP_CORS_ORIGINS=http://localhost:9079 \
137
+ MAOP_STORAGE_BACKEND=sqlite \
138
+ MAOP_CACHE_BACKEND=memory \
139
+ MAOP_QUEUE_BACKEND=local \
140
+ MAOP_KV_BACKEND=local \
141
+ MAOP_SECRET_BACKEND=local
142
+
143
+ # Health check (dashboard only — other services use entrypoint)
144
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
145
+ CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:9079/api/health')" || exit 1
146
+
147
+ # Expose dashboard port
148
+ EXPOSE 9079
149
+
150
+ # Switch to non-root user
151
+ USER maop
152
+
153
+ # tini as init (PID 1) — proper signal handling + zombie reaping
154
+ ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"]
155
+
156
+ # Default: start dashboard. Override via docker-compose entrypoint.
157
+ CMD ["python", "-m", "maop.dashboard.server"]
@@ -0,0 +1,87 @@
1
+ Metadata-Version: 2.5
2
+ Name: maop-orchestrator
3
+ Version: 5.3.0
4
+ Summary: MAOP - Multi-Agent Orchestration Framework (Python-first, Plan-Execute-Verify)
5
+ License: MIT
6
+ Requires-Python: >=3.10
7
+ Requires-Dist: aiosqlite>=0.20.0
8
+ Requires-Dist: alembic>=1.13.0
9
+ Requires-Dist: cryptography<51,>=50.0
10
+ Requires-Dist: fastapi<0.143,>=0.141.1
11
+ Requires-Dist: httpx<1.0,>=0.27.0
12
+ Requires-Dist: mmh3==5.3.1
13
+ Requires-Dist: numpy<3.0,>=1.24.0
14
+ Requires-Dist: packaging>=24.0
15
+ Requires-Dist: pydantic-settings==2.15.0
16
+ Requires-Dist: pydantic<3.0,>=2.9.0
17
+ Requires-Dist: pyjwt>=2.13.0
18
+ Requires-Dist: python-dotenv>=1.2.2
19
+ Requires-Dist: python-multipart>=0.0.31
20
+ Requires-Dist: pyyaml<7.0.0,>=6.0.2
21
+ Requires-Dist: sqlite-vec>=0.1.6
22
+ Requires-Dist: uvicorn[standard]==0.54.0
23
+ Requires-Dist: websockets<17,>=14.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: aiosqlite>=0.20.0; extra == 'dev'
26
+ Requires-Dist: defusedxml>=0.7.1; extra == 'dev'
27
+ Requires-Dist: fakeredis>=2.23; extra == 'dev'
28
+ Requires-Dist: httpx<1.0,>=0.27.0; extra == 'dev'
29
+ Requires-Dist: lxml>=6.1.0; extra == 'dev'
30
+ Requires-Dist: mmh3==5.3.1; extra == 'dev'
31
+ Requires-Dist: mypy>=1.10; extra == 'dev'
32
+ Requires-Dist: pydantic-settings==2.15.0; extra == 'dev'
33
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
34
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
35
+ Requires-Dist: pytest-rerunfailures>=11.0; extra == 'dev'
36
+ Requires-Dist: pytest-timeout>=2.3; extra == 'dev'
37
+ Requires-Dist: pytest-xdist>=3.5; extra == 'dev'
38
+ Requires-Dist: pytest>=8.0; extra == 'dev'
39
+ Requires-Dist: python-multipart>=0.0.31; extra == 'dev'
40
+ Requires-Dist: ruff>=0.4; extra == 'dev'
41
+ Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
42
+ Provides-Extra: enterprise
43
+ Requires-Dist: alembic>=1.13; extra == 'enterprise'
44
+ Requires-Dist: asyncpg>=0.29; extra == 'enterprise'
45
+ Requires-Dist: lxml>=6.1.0; extra == 'enterprise'
46
+ Requires-Dist: pika>=1.3; extra == 'enterprise'
47
+ Requires-Dist: psycopg[binary,pool]>=3.1; extra == 'enterprise'
48
+ Requires-Dist: redis>=5.0; extra == 'enterprise'
49
+ Provides-Extra: etcd
50
+ Requires-Dist: etcd3>=0.12; (python_version < '3.13') and extra == 'etcd'
51
+ Provides-Extra: ml
52
+ Requires-Dist: hnswlib>=0.8.0; extra == 'ml'
53
+ Requires-Dist: sentence-transformers>=2.0; extra == 'ml'
54
+ Provides-Extra: otel
55
+ Requires-Dist: opentelemetry-api>=1.20; extra == 'otel'
56
+ Requires-Dist: opentelemetry-sdk>=1.20; extra == 'otel'
57
+ Provides-Extra: postgresql
58
+ Requires-Dist: alembic>=1.13; extra == 'postgresql'
59
+ Requires-Dist: asyncpg>=0.29; extra == 'postgresql'
60
+ Requires-Dist: pgvector>=0.3; extra == 'postgresql'
61
+ Requires-Dist: psycopg2-binary>=2.9; extra == 'postgresql'
62
+ Requires-Dist: sqlalchemy[asyncio]>=2.0; extra == 'postgresql'
63
+ Provides-Extra: saml
64
+ Requires-Dist: xmlsec>=1.3.0; extra == 'saml'
65
+ Description-Content-Type: text/markdown
66
+
67
+ # MAOP (Python service layer)
68
+
69
+ MAOP 的 Python 服务层包(`maop`)。项目整体说明见仓库根目录 `README.md`。
70
+
71
+ ## 状态与持久化
72
+
73
+ - 消息队列唯一真源:`data/queue.db`(SQLite)
74
+ - 人工审批队列唯一真源:`data/human_queue.db`(SQLite)
75
+ - 熔断状态唯一真源:`data/maop.db` 的 `circuit_breaker_state` 表
76
+ - `human-queue.json` 为 Python 写入的只读镜像,PowerShell 引擎为遗留层
77
+
78
+ ## 开发 / 测试
79
+
80
+ ```bash
81
+ cd py
82
+ pip install -e .
83
+ pip install mmh3 pytest pytest-cov pydantic-settings
84
+ pytest
85
+ ```
86
+
87
+ CI 定义见 `.github/workflows/ci.yml`(GitHub Actions:3 平台 × Python 3.12/3.13 矩阵,含 ruff + mypy lint、Docker 构建、pip-audit 安全扫描)。
@@ -0,0 +1,21 @@
1
+ # MAOP (Python service layer)
2
+
3
+ MAOP 的 Python 服务层包(`maop`)。项目整体说明见仓库根目录 `README.md`。
4
+
5
+ ## 状态与持久化
6
+
7
+ - 消息队列唯一真源:`data/queue.db`(SQLite)
8
+ - 人工审批队列唯一真源:`data/human_queue.db`(SQLite)
9
+ - 熔断状态唯一真源:`data/maop.db` 的 `circuit_breaker_state` 表
10
+ - `human-queue.json` 为 Python 写入的只读镜像,PowerShell 引擎为遗留层
11
+
12
+ ## 开发 / 测试
13
+
14
+ ```bash
15
+ cd py
16
+ pip install -e .
17
+ pip install mmh3 pytest pytest-cov pydantic-settings
18
+ pytest
19
+ ```
20
+
21
+ CI 定义见 `.github/workflows/ci.yml`(GitHub Actions:3 平台 × Python 3.12/3.13 矩阵,含 ruff + mypy lint、Docker 构建、pip-audit 安全扫描)。
@@ -0,0 +1,123 @@
1
+ # MAOP Security Documentation
2
+
3
+ ## Secrets Management
4
+
5
+ MAOP uses a layered approach to secret management, balancing developer convenience
6
+ with production safety. All sensitive values are loaded from **environment
7
+ variables** with a `MAOP_` prefix; no secrets are ever hard-coded in source.
8
+
9
+ ### Sensitive Environment Variables
10
+
11
+ | Variable | Purpose | Required? |
12
+ |---|---|---|
13
+ | `MAOP_JWT_SECRET` | HMAC-SHA256 signing secret for JWT tokens | No — auto-generated if absent |
14
+ | `MAOP_ADMIN_PASSWORD` | Initial admin password for the dashboard | No — auto-generated if absent |
15
+ | `MAOP_TLS_CERT_FILE` | Path to TLS certificate PEM file | Only when `MAOP_TLS_ENABLED=1` |
16
+ | `MAOP_TLS_KEY_FILE` | Path to TLS private key PEM file | Only when `MAOP_TLS_ENABLED=1` |
17
+
18
+ > **Never commit `.env` to version control.** The `.gitignore` already
19
+ > excludes `.env`. Only `.env.example` (with empty secret values) is tracked.
20
+
21
+ ---
22
+
23
+ ### Development Environment
24
+
25
+ 1. **Copy the template:**
26
+ ```bash
27
+ cp .env.example .env
28
+ ```
29
+ 2. **Fill in values** — leave `MAOP_JWT_SECRET` and `MAOP_ADMIN_PASSWORD` empty
30
+ to let MAOP auto-generate them on first run.
31
+ 3. **Auto-generated artifacts** (written to `data/`):
32
+ - `data/jwt_secret` — JWT signing secret (mode `0600` on POSIX)
33
+ - `data/.admin-password` — auto-generated admin password (mode `0600`)
34
+
35
+ The `.env` file is loaded by `pydantic-settings` (`env_file=".env"` in
36
+ `maop/config/settings.py`). Environment variables always take precedence over
37
+ `.env` values.
38
+
39
+ ---
40
+
41
+ ### Production Environment
42
+
43
+ **Recommended: environment variable injection**
44
+
45
+ Inject secrets directly into the process environment via your orchestration
46
+ platform. This avoids any secret material on disk.
47
+
48
+ ```bash
49
+ # Example: systemd unit
50
+ Environment=MAOP_JWT_SECRET=<64-char-hex>
51
+ Environment=MAOP_ADMIN_PASSWORD=<strong-password>
52
+ Environment=MAOP_TLS_ENABLED=1
53
+ Environment=MAOP_TLS_CERT_FILE=/etc/maop/tls/cert.pem
54
+ Environment=MAOP_TLS_KEY_FILE=/etc/maop/tls/key.pem
55
+
56
+ # Example: Docker
57
+ docker run -e MAOP_JWT_SECRET=... -e MAOP_ADMIN_PASSWORD=... maop
58
+
59
+ # Example: Kubernetes
60
+ env:
61
+ - name: MAOP_JWT_SECRET
62
+ valueFrom:
63
+ secretKeyRef: { name: maop-secrets, key: jwt-secret }
64
+ - name: MAOP_ADMIN_PASSWORD
65
+ valueFrom:
66
+ secretKeyRef: { name: maop-secrets, key: admin-password }
67
+ ```
68
+
69
+ **Alternative: vault / secret manager**
70
+
71
+ For teams using HashiCorp Vault, AWS Secrets Manager, or similar:
72
+
73
+ 1. Store secrets in the vault.
74
+ 2. Retrieve at deploy time and export as environment variables before starting
75
+ the MAOP process.
76
+ 3. Never write secrets to `.env` or any file on the production host.
77
+
78
+ ---
79
+
80
+ ### JWT Secret Auto-Generation Mechanism
81
+
82
+ The JWT signing secret is loaded with a **3-tier priority** (implemented in
83
+ `maop/core/auth.py::load_jwt_secret`):
84
+
85
+ | Priority | Source | Use case |
86
+ |---|---|---|
87
+ | 1 (highest) | `MAOP_JWT_SECRET` environment variable | Production — explicit control |
88
+ | 2 | `data/jwt_secret` file | Development — persists across restarts |
89
+ | 3 (lowest) | Auto-generate `secrets.token_hex(32)` and persist | First run — zero-config bootstrap |
90
+
91
+ **Behaviour:**
92
+ - When `MAOP_JWT_SECRET` is set (non-empty), it is used directly. No file is
93
+ read or written.
94
+ - When the env var is absent or empty, MAOP checks `data/jwt_secret`. If the
95
+ file exists and is non-empty, its content is used.
96
+ - If neither the env var nor the file provides a secret, a cryptographically
97
+ random 64-character hex string is generated via `secrets.token_hex(32)` and
98
+ written to `data/jwt_secret` with mode `0600` (POSIX) so that subsequent
99
+ restarts reuse the same secret and existing JWT tokens remain valid.
100
+
101
+ > **Production note:** Always set `MAOP_JWT_SECRET` explicitly in production.
102
+ > Relying on the auto-generated file means the secret lives on disk — if the
103
+ > disk is compromised, all JWTs can be forged.
104
+
105
+ ---
106
+
107
+ ### Admin Password Auto-Generation
108
+
109
+ When `MAOP_ADMIN_PASSWORD` is not set, MAOP generates a random password via
110
+ `secrets.token_urlsafe(16)` on first run and persists it to
111
+ `data/.admin-password` (mode `0600` on POSIX). A log message indicates the
112
+ file path. **Always set `MAOP_ADMIN_PASSWORD` in production.**
113
+
114
+ ---
115
+
116
+ ### TLS Certificate Files
117
+
118
+ `MAOP_TLS_CERT_FILE` and `MAOP_TLS_KEY_FILE` are paths (not secret values
119
+ themselves), but the files they point to contain sensitive key material.
120
+ Ensure:
121
+ - Certificate files are stored outside the application directory.
122
+ - File permissions are `0600` (key) and `0644` (cert) on POSIX.
123
+ - The `data/` directory is not served by any static-file route.
@@ -0,0 +1,64 @@
1
+ """Root conftest.py — ensures pydantic_settings is importable.
2
+
3
+ On some Windows environments the isolation_venv's pydantic_settings directory
4
+ gets locked by running processes, resulting in a broken import (the package
5
+ directory exists but its files are inaccessible). This conftest inserts the
6
+ ps_fix fallback path at sys.path[0] so the working pydantic_settings takes
7
+ priority over the locked one.
8
+
9
+ This file is loaded by pytest before any test collection, making the
10
+ PYTHONPATH workaround automatic and permanent.
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ import importlib
16
+ import sys
17
+ from pathlib import Path
18
+
19
+ # Always insert ps_fix at front of sys.path so it shadows any broken
20
+ # pydantic_settings in the main site-packages.
21
+ _venv_ps_fix = Path(sys.prefix) / "Lib" / "site-packages" / "ps_fix"
22
+ if _venv_ps_fix.is_dir():
23
+ _p = str(_venv_ps_fix)
24
+ if _p not in sys.path:
25
+ sys.path.insert(0, _p)
26
+
27
+ # Also check project-relative ps_fix
28
+ _proj_ps_fix = Path(__file__).resolve().parent.parent / "ps_fix"
29
+ if _proj_ps_fix.is_dir():
30
+ _p = str(_proj_ps_fix)
31
+ if _p not in sys.path:
32
+ sys.path.insert(0, _p)
33
+
34
+ # Force-reimport pydantic_settings if it was already loaded from a broken path
35
+ if "pydantic_settings" in sys.modules:
36
+ try:
37
+ from pydantic_settings import BaseSettings # noqa: F401
38
+ except ImportError:
39
+ del sys.modules["pydantic_settings"]
40
+ importlib.import_module("pydantic_settings")
41
+
42
+
43
+ # ── Session-scoped cleanup for async webhook resources ─────────────
44
+ # Tests that import pipeline_core.event_hook leave an aiohttp ClientSession
45
+ # and a background _async_webhook_worker task alive. Without explicit
46
+ # shutdown, pytest's teardown logs "Unclosed client session" and
47
+ # "Task was destroyed but it is pending!". This fixture ensures
48
+ # shutdown_webhook() runs once at session end.
49
+
50
+ import pytest
51
+
52
+
53
+ @pytest.fixture(scope="session", autouse=True)
54
+ def _cleanup_webhook_session():
55
+ yield
56
+ try:
57
+ import sys as _sys
58
+ for _p in list(_sys.path):
59
+ if "doc-pipeline" in _p:
60
+ from pipeline_core.event_hook import shutdown_webhook
61
+ shutdown_webhook(timeout_s=3.0)
62
+ break
63
+ except Exception:
64
+ pass
@@ -0,0 +1,38 @@
1
+ #!/bin/sh
2
+ # MAOP Docker Entrypoint
3
+ # Runs database migrations before starting the service
4
+
5
+ set -e
6
+
7
+ echo "[entrypoint] Starting MAOP container..."
8
+
9
+ # H9 fix: 强化迁移步骤 —— 检测 alembic.ini 不存在时报错退出(而非静默跳过)。
10
+ # 原:alembic.ini 不存在时仅打印日志并跳过,导致 PG schema 不初始化、应用报错。
11
+ # 现:要求 alembic.ini 必须存在(由 Dockerfile COPY 保证),缺失则明确报错。
12
+ if [ -f "alembic.ini" ] || [ -f "/app/alembic.ini" ]; then
13
+ echo "[entrypoint] Running database migrations..."
14
+ cd /app
15
+ # 3f335fb: /app/data is a named volume at runtime and shadows the image
16
+ # layer — seed the migration SQL into it on first boot so alembic's
17
+ # 001_init (which reads data/migrations/001_init.sql) can find the files.
18
+ if [ -d /app/seed/migrations ] && [ ! -f /app/data/migrations/001_init.sql ]; then
19
+ echo "[entrypoint] Seeding migration SQL into data volume..."
20
+ mkdir -p /app/data/migrations
21
+ cp /app/seed/migrations/*.sql /app/data/migrations/ 2>/dev/null || true
22
+ fi
23
+ # H9 fix: 迁移失败时明确报错退出,而非静默跳过(2>/dev/null 掩盖了真实错误)。
24
+ if ! python -m alembic upgrade head; then
25
+ echo "[entrypoint] FATAL: Database migration failed (alembic upgrade head)."
26
+ echo "[entrypoint] Check database connectivity and migration scripts."
27
+ exit 1
28
+ fi
29
+ cd -
30
+ else
31
+ echo "[entrypoint] FATAL: alembic.ini not found. Database migrations cannot run."
32
+ echo "[entrypoint] Ensure Dockerfile copies alembic.ini and migrations/ to the image."
33
+ exit 1
34
+ fi
35
+
36
+ # Execute the main command
37
+ echo "[entrypoint] Starting service: $@"
38
+ exec "$@"