agent-runtime-cockpit 0.1.0a0__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.
Files changed (668) hide show
  1. agent_runtime_cockpit/__daemon_main__.py +52 -0
  2. agent_runtime_cockpit/__init__.py +6 -0
  3. agent_runtime_cockpit/_legacy_cli.py +60 -0
  4. agent_runtime_cockpit/a2a/__init__.py +23 -0
  5. agent_runtime_cockpit/a2a/client.py +127 -0
  6. agent_runtime_cockpit/a2a/generator.py +98 -0
  7. agent_runtime_cockpit/a2a/models.py +69 -0
  8. agent_runtime_cockpit/adapters/__init__.py +21 -0
  9. agent_runtime_cockpit/adapters/_compat.py +19 -0
  10. agent_runtime_cockpit/adapters/_shared.py +78 -0
  11. agent_runtime_cockpit/adapters/_static.py +91 -0
  12. agent_runtime_cockpit/adapters/ag2/__init__.py +0 -0
  13. agent_runtime_cockpit/adapters/ag2/detect.py +23 -0
  14. agent_runtime_cockpit/adapters/ag2/mapping.py +37 -0
  15. agent_runtime_cockpit/adapters/ag2/runner.py +63 -0
  16. agent_runtime_cockpit/adapters/ag2_adapter.py +80 -0
  17. agent_runtime_cockpit/adapters/agno.py +179 -0
  18. agent_runtime_cockpit/adapters/agno_mapping.py +47 -0
  19. agent_runtime_cockpit/adapters/arc_runtime_sdk.py +278 -0
  20. agent_runtime_cockpit/adapters/arc_runtime_sdk_pack.py +141 -0
  21. agent_runtime_cockpit/adapters/arc_runtime_sdk_protocol.py +125 -0
  22. agent_runtime_cockpit/adapters/base.py +232 -0
  23. agent_runtime_cockpit/adapters/browser_use.py +211 -0
  24. agent_runtime_cockpit/adapters/browser_use_mapping.py +48 -0
  25. agent_runtime_cockpit/adapters/conformance.py +218 -0
  26. agent_runtime_cockpit/adapters/crewai/__init__.py +5 -0
  27. agent_runtime_cockpit/adapters/crewai/detect.py +28 -0
  28. agent_runtime_cockpit/adapters/crewai/listener.py +92 -0
  29. agent_runtime_cockpit/adapters/crewai/mapping.py +60 -0
  30. agent_runtime_cockpit/adapters/crewai/runner.py +68 -0
  31. agent_runtime_cockpit/adapters/crewai.py +348 -0
  32. agent_runtime_cockpit/adapters/dspy/__init__.py +174 -0
  33. agent_runtime_cockpit/adapters/dspy/capabilities.py +33 -0
  34. agent_runtime_cockpit/adapters/dspy/detect.py +223 -0
  35. agent_runtime_cockpit/adapters/dspy/export.py +598 -0
  36. agent_runtime_cockpit/adapters/dspy/runner.py +207 -0
  37. agent_runtime_cockpit/adapters/google_adk/__init__.py +93 -0
  38. agent_runtime_cockpit/adapters/google_adk/capabilities.py +35 -0
  39. agent_runtime_cockpit/adapters/google_adk/detect.py +192 -0
  40. agent_runtime_cockpit/adapters/google_adk/export.py +286 -0
  41. agent_runtime_cockpit/adapters/haystack/__init__.py +176 -0
  42. agent_runtime_cockpit/adapters/haystack/capabilities.py +33 -0
  43. agent_runtime_cockpit/adapters/haystack/detect.py +227 -0
  44. agent_runtime_cockpit/adapters/haystack/export.py +460 -0
  45. agent_runtime_cockpit/adapters/haystack/runner.py +203 -0
  46. agent_runtime_cockpit/adapters/langchain/__init__.py +219 -0
  47. agent_runtime_cockpit/adapters/langchain/capabilities.py +34 -0
  48. agent_runtime_cockpit/adapters/langchain/detect.py +204 -0
  49. agent_runtime_cockpit/adapters/langchain/export.py +256 -0
  50. agent_runtime_cockpit/adapters/langchain/runner.py +374 -0
  51. agent_runtime_cockpit/adapters/langgraph/__init__.py +5 -0
  52. agent_runtime_cockpit/adapters/langgraph/loader.py +27 -0
  53. agent_runtime_cockpit/adapters/langgraph/mapping.py +38 -0
  54. agent_runtime_cockpit/adapters/langgraph/replay_detector.py +224 -0
  55. agent_runtime_cockpit/adapters/langgraph/runner.py +56 -0
  56. agent_runtime_cockpit/adapters/langgraph.py +649 -0
  57. agent_runtime_cockpit/adapters/letta.py +243 -0
  58. agent_runtime_cockpit/adapters/letta_mapping.py +47 -0
  59. agent_runtime_cockpit/adapters/llamaindex.py +118 -0
  60. agent_runtime_cockpit/adapters/lmarena.py +172 -0
  61. agent_runtime_cockpit/adapters/mcp_sdk/__init__.py +97 -0
  62. agent_runtime_cockpit/adapters/mcp_sdk/capabilities.py +40 -0
  63. agent_runtime_cockpit/adapters/mcp_sdk/detect.py +243 -0
  64. agent_runtime_cockpit/adapters/mcp_sdk/export.py +427 -0
  65. agent_runtime_cockpit/adapters/metagpt.py +270 -0
  66. agent_runtime_cockpit/adapters/openai_agents/__init__.py +15 -0
  67. agent_runtime_cockpit/adapters/openai_agents/mapping/__init__.py +0 -0
  68. agent_runtime_cockpit/adapters/openai_agents/mapping/openai_agents.py +46 -0
  69. agent_runtime_cockpit/adapters/openai_agents/streaming.py +91 -0
  70. agent_runtime_cockpit/adapters/openai_agents.py +586 -0
  71. agent_runtime_cockpit/adapters/praisonai.py +248 -0
  72. agent_runtime_cockpit/adapters/pydantic_ai/__init__.py +18 -0
  73. agent_runtime_cockpit/adapters/pydantic_ai/detect.py +177 -0
  74. agent_runtime_cockpit/adapters/pydantic_ai/export.py +239 -0
  75. agent_runtime_cockpit/adapters/pydantic_ai/runner.py +192 -0
  76. agent_runtime_cockpit/adapters/pydantic_ai_adapter.py +180 -0
  77. agent_runtime_cockpit/adapters/pydantic_ai_mapping.py +65 -0
  78. agent_runtime_cockpit/adapters/registry.py +164 -0
  79. agent_runtime_cockpit/adapters/semantic_kernel/__init__.py +86 -0
  80. agent_runtime_cockpit/adapters/semantic_kernel/capabilities.py +29 -0
  81. agent_runtime_cockpit/adapters/semantic_kernel/detect.py +152 -0
  82. agent_runtime_cockpit/adapters/semantic_kernel/export.py +382 -0
  83. agent_runtime_cockpit/adapters/smolagents/__init__.py +160 -0
  84. agent_runtime_cockpit/adapters/smolagents/capabilities.py +25 -0
  85. agent_runtime_cockpit/adapters/smolagents/detect.py +150 -0
  86. agent_runtime_cockpit/adapters/smolagents/export.py +210 -0
  87. agent_runtime_cockpit/adapters/smolagents/runner.py +173 -0
  88. agent_runtime_cockpit/adapters/strands.py +219 -0
  89. agent_runtime_cockpit/adapters/strands_mapping.py +47 -0
  90. agent_runtime_cockpit/adapters/swarmgraph/__init__.py +14 -0
  91. agent_runtime_cockpit/adapters/swarmgraph/gateway_client.py +54 -0
  92. agent_runtime_cockpit/adapters/swarmgraph/local_executor.py +56 -0
  93. agent_runtime_cockpit/adapters/swarmgraph/mapping.py +54 -0
  94. agent_runtime_cockpit/adapters/swarmgraph/runner.py +120 -0
  95. agent_runtime_cockpit/adapters/swarmgraph.py +945 -0
  96. agent_runtime_cockpit/adoption/__init__.py +33 -0
  97. agent_runtime_cockpit/adoption/ag2_runner.py +139 -0
  98. agent_runtime_cockpit/adoption/crewai_runner.py +118 -0
  99. agent_runtime_cockpit/adoption/langgraph_runner.py +686 -0
  100. agent_runtime_cockpit/adoption/llamaindex_runner.py +111 -0
  101. agent_runtime_cockpit/adoption/openai_agents_runner.py +107 -0
  102. agent_runtime_cockpit/adoption/protocol.py +125 -0
  103. agent_runtime_cockpit/adoption/registry.py +123 -0
  104. agent_runtime_cockpit/advisor/__init__.py +369 -0
  105. agent_runtime_cockpit/ag_ui/__init__.py +81 -0
  106. agent_runtime_cockpit/ag_ui/validator.py +94 -0
  107. agent_runtime_cockpit/arena/__init__.py +56 -0
  108. agent_runtime_cockpit/arena/client.py +214 -0
  109. agent_runtime_cockpit/arena/models.py +114 -0
  110. agent_runtime_cockpit/arena/service.py +868 -0
  111. agent_runtime_cockpit/audit/__init__.py +83 -0
  112. agent_runtime_cockpit/audit/chain.py +70 -0
  113. agent_runtime_cockpit/audit/hitl.py +54 -0
  114. agent_runtime_cockpit/audit/hitl_sqlite_store.py +378 -0
  115. agent_runtime_cockpit/audit/hitl_store.py +132 -0
  116. agent_runtime_cockpit/audit/hmac_chain.py +333 -0
  117. agent_runtime_cockpit/audit/key_manager.py +195 -0
  118. agent_runtime_cockpit/audit/permissions.py +46 -0
  119. agent_runtime_cockpit/audit/run_keyed_audit.py +51 -0
  120. agent_runtime_cockpit/audit/runner_integration.py +55 -0
  121. agent_runtime_cockpit/audit/schema.py +340 -0
  122. agent_runtime_cockpit/audit/session.py +310 -0
  123. agent_runtime_cockpit/audit/storage.py +134 -0
  124. agent_runtime_cockpit/audit/streaming_verifier.py +549 -0
  125. agent_runtime_cockpit/auth/__init__.py +22 -0
  126. agent_runtime_cockpit/auth/manager.py +509 -0
  127. agent_runtime_cockpit/auth/oauth.py +322 -0
  128. agent_runtime_cockpit/battle/__init__.py +37 -0
  129. agent_runtime_cockpit/battle/models.py +222 -0
  130. agent_runtime_cockpit/battle/runner.py +702 -0
  131. agent_runtime_cockpit/battle/store.py +565 -0
  132. agent_runtime_cockpit/budget/__init__.py +62 -0
  133. agent_runtime_cockpit/budget/legacy_vector.py +115 -0
  134. agent_runtime_cockpit/budget/runtime_context.py +38 -0
  135. agent_runtime_cockpit/budget/schema.py +277 -0
  136. agent_runtime_cockpit/budget/storage.py +333 -0
  137. agent_runtime_cockpit/budget/wallet.py +94 -0
  138. agent_runtime_cockpit/capabilities/__init__.py +216 -0
  139. agent_runtime_cockpit/capabilities/enforcement.py +261 -0
  140. agent_runtime_cockpit/capabilities/from_adapters.py +247 -0
  141. agent_runtime_cockpit/capabilities/from_ir.py +666 -0
  142. agent_runtime_cockpit/capabilities/from_mcp.py +458 -0
  143. agent_runtime_cockpit/capabilities/from_workspace.py +103 -0
  144. agent_runtime_cockpit/capabilities/hashing.py +130 -0
  145. agent_runtime_cockpit/capabilities/models.py +433 -0
  146. agent_runtime_cockpit/capabilities/policy.py +541 -0
  147. agent_runtime_cockpit/capabilities/redaction.py +216 -0
  148. agent_runtime_cockpit/capabilities/registry.py +230 -0
  149. agent_runtime_cockpit/capabilities/signing.py +412 -0
  150. agent_runtime_cockpit/capabilities/validation.py +304 -0
  151. agent_runtime_cockpit/ci_orchestration.py +378 -0
  152. agent_runtime_cockpit/cli/__init__.py +18 -0
  153. agent_runtime_cockpit/cli/_app.py +280 -0
  154. agent_runtime_cockpit/cli/_helpers.py +374 -0
  155. agent_runtime_cockpit/cli/_loader.py +93 -0
  156. agent_runtime_cockpit/cli/_subapps.py +206 -0
  157. agent_runtime_cockpit/cli/a2a.py +172 -0
  158. agent_runtime_cockpit/cli/advisor.py +336 -0
  159. agent_runtime_cockpit/cli/agents_md.py +155 -0
  160. agent_runtime_cockpit/cli/arena.py +201 -0
  161. agent_runtime_cockpit/cli/audit.py +586 -0
  162. agent_runtime_cockpit/cli/batch.py +71 -0
  163. agent_runtime_cockpit/cli/battle.py +476 -0
  164. agent_runtime_cockpit/cli/capabilities.py +865 -0
  165. agent_runtime_cockpit/cli/capabilities_policy.py +282 -0
  166. agent_runtime_cockpit/cli/ci.py +519 -0
  167. agent_runtime_cockpit/cli/codegraph.py +338 -0
  168. agent_runtime_cockpit/cli/composer.py +162 -0
  169. agent_runtime_cockpit/cli/context_cmd.py +174 -0
  170. agent_runtime_cockpit/cli/continuum.py +99 -0
  171. agent_runtime_cockpit/cli/debug.py +117 -0
  172. agent_runtime_cockpit/cli/diff_cmd.py +142 -0
  173. agent_runtime_cockpit/cli/discover.py +163 -0
  174. agent_runtime_cockpit/cli/edit.py +319 -0
  175. agent_runtime_cockpit/cli/events.py +320 -0
  176. agent_runtime_cockpit/cli/exec.py +216 -0
  177. agent_runtime_cockpit/cli/flight.py +226 -0
  178. agent_runtime_cockpit/cli/git_native.py +293 -0
  179. agent_runtime_cockpit/cli/hitl.py +123 -0
  180. agent_runtime_cockpit/cli/hub.py +184 -0
  181. agent_runtime_cockpit/cli/index_cmd.py +130 -0
  182. agent_runtime_cockpit/cli/info.py +229 -0
  183. agent_runtime_cockpit/cli/integrations_cli.py +30 -0
  184. agent_runtime_cockpit/cli/ir.py +334 -0
  185. agent_runtime_cockpit/cli/mcp.py +1049 -0
  186. agent_runtime_cockpit/cli/memory.py +167 -0
  187. agent_runtime_cockpit/cli/memory_cmd.py +252 -0
  188. agent_runtime_cockpit/cli/methodology.py +203 -0
  189. agent_runtime_cockpit/cli/mgmt.py +17 -0
  190. agent_runtime_cockpit/cli/mgmt_config.py +47 -0
  191. agent_runtime_cockpit/cli/mgmt_doctor.py +667 -0
  192. agent_runtime_cockpit/cli/mgmt_eval.py +685 -0
  193. agent_runtime_cockpit/cli/mgmt_hitl.py +118 -0
  194. agent_runtime_cockpit/cli/mgmt_isolation.py +319 -0
  195. agent_runtime_cockpit/cli/mgmt_storage.py +116 -0
  196. agent_runtime_cockpit/cli/migrate.py +214 -0
  197. agent_runtime_cockpit/cli/mobile.py +1319 -0
  198. agent_runtime_cockpit/cli/notebook.py +224 -0
  199. agent_runtime_cockpit/cli/obs.py +410 -0
  200. agent_runtime_cockpit/cli/plan.py +417 -0
  201. agent_runtime_cockpit/cli/predict_cmd.py +94 -0
  202. agent_runtime_cockpit/cli/profiles.py +139 -0
  203. agent_runtime_cockpit/cli/prompt.py +101 -0
  204. agent_runtime_cockpit/cli/providers.py +1303 -0
  205. agent_runtime_cockpit/cli/receipt.py +153 -0
  206. agent_runtime_cockpit/cli/release_cmd.py +90 -0
  207. agent_runtime_cockpit/cli/replay.py +174 -0
  208. agent_runtime_cockpit/cli/review.py +185 -0
  209. agent_runtime_cockpit/cli/runs.py +614 -0
  210. agent_runtime_cockpit/cli/runtime_pack.py +338 -0
  211. agent_runtime_cockpit/cli/sandbox.py +1484 -0
  212. agent_runtime_cockpit/cli/security_cmd.py +37 -0
  213. agent_runtime_cockpit/cli/simulate.py +115 -0
  214. agent_runtime_cockpit/cli/studio_workspace.py +1005 -0
  215. agent_runtime_cockpit/cli/swarmgraph.py +289 -0
  216. agent_runtime_cockpit/cli/task.py +569 -0
  217. agent_runtime_cockpit/cli/testbench.py +735 -0
  218. agent_runtime_cockpit/cli/time_travel.py +342 -0
  219. agent_runtime_cockpit/cli/vision.py +285 -0
  220. agent_runtime_cockpit/cli/voice.py +137 -0
  221. agent_runtime_cockpit/cli_repl/__init__.py +0 -0
  222. agent_runtime_cockpit/cli_repl/adapters.py +1504 -0
  223. agent_runtime_cockpit/cli_repl/aliases.py +96 -0
  224. agent_runtime_cockpit/cli_repl/batch.py +328 -0
  225. agent_runtime_cockpit/cli_repl/cancellation.py +96 -0
  226. agent_runtime_cockpit/cli_repl/chat_repl.py +554 -0
  227. agent_runtime_cockpit/cli_repl/commands/__init__.py +126 -0
  228. agent_runtime_cockpit/cli_repl/pipeline.py +88 -0
  229. agent_runtime_cockpit/cli_repl/rendering.py +200 -0
  230. agent_runtime_cockpit/cli_repl/session.py +433 -0
  231. agent_runtime_cockpit/cli_repl/session_bundle.py +121 -0
  232. agent_runtime_cockpit/cli_repl/slash/__init__.py +0 -0
  233. agent_runtime_cockpit/cli_repl/slash/model_info.py +109 -0
  234. agent_runtime_cockpit/cli_repl/slash/models.py +186 -0
  235. agent_runtime_cockpit/cli_repl/slash_commands.py +2863 -0
  236. agent_runtime_cockpit/cli_repl/theme.py +58 -0
  237. agent_runtime_cockpit/cli_studio.py +66 -0
  238. agent_runtime_cockpit/cloud/__init__.py +0 -0
  239. agent_runtime_cockpit/cloud/budget_broker.py +128 -0
  240. agent_runtime_cockpit/cloud/indicators.py +35 -0
  241. agent_runtime_cockpit/cloud/observability_bridge.py +139 -0
  242. agent_runtime_cockpit/cloud/pricing_feed.py +227 -0
  243. agent_runtime_cockpit/composer/__init__.py +174 -0
  244. agent_runtime_cockpit/config/__init__.py +12 -0
  245. agent_runtime_cockpit/config/loader.py +300 -0
  246. agent_runtime_cockpit/config/model.py +140 -0
  247. agent_runtime_cockpit/config/policy.py +184 -0
  248. agent_runtime_cockpit/context/__init__.py +10 -0
  249. agent_runtime_cockpit/context/agents_md.py +258 -0
  250. agent_runtime_cockpit/context/cache.py +39 -0
  251. agent_runtime_cockpit/context/compaction.py +176 -0
  252. agent_runtime_cockpit/context/engine.py +55 -0
  253. agent_runtime_cockpit/context/handles.py +155 -0
  254. agent_runtime_cockpit/context/pack.py +57 -0
  255. agent_runtime_cockpit/context/prefetch.py +118 -0
  256. agent_runtime_cockpit/context/providers/__init__.py +15 -0
  257. agent_runtime_cockpit/context/providers/base.py +125 -0
  258. agent_runtime_cockpit/context/providers/codegraph/__init__.py +25 -0
  259. agent_runtime_cockpit/context/providers/codegraph/models.py +81 -0
  260. agent_runtime_cockpit/context/providers/codegraph/provider.py +574 -0
  261. agent_runtime_cockpit/context/providers/codegraph/transport.py +247 -0
  262. agent_runtime_cockpit/context/providers/config_schema.py +94 -0
  263. agent_runtime_cockpit/context/providers/context7.py +93 -0
  264. agent_runtime_cockpit/context/providers/github_code_search.py +91 -0
  265. agent_runtime_cockpit/context/providers/local_repo.py +93 -0
  266. agent_runtime_cockpit/context/providers/registry.py +87 -0
  267. agent_runtime_cockpit/context/providers/vercel_grep.py +84 -0
  268. agent_runtime_cockpit/context/providers/web_search.py +65 -0
  269. agent_runtime_cockpit/context/ranker.py +24 -0
  270. agent_runtime_cockpit/context/skill_md.py +86 -0
  271. agent_runtime_cockpit/context/token_counter.py +133 -0
  272. agent_runtime_cockpit/context/tool_interceptor.py +61 -0
  273. agent_runtime_cockpit/continuum/__init__.py +0 -0
  274. agent_runtime_cockpit/continuum/store.py +370 -0
  275. agent_runtime_cockpit/daemon.py +15 -0
  276. agent_runtime_cockpit/debug/__init__.py +478 -0
  277. agent_runtime_cockpit/evals/__init__.py +29 -0
  278. agent_runtime_cockpit/evals/apply.py +245 -0
  279. agent_runtime_cockpit/evals/artifact.py +220 -0
  280. agent_runtime_cockpit/evals/consensus.py +380 -0
  281. agent_runtime_cockpit/evals/consensus_earlystop.py +154 -0
  282. agent_runtime_cockpit/evals/diff.py +80 -0
  283. agent_runtime_cockpit/evals/golden.py +123 -0
  284. agent_runtime_cockpit/evals/policy_recommend.py +209 -0
  285. agent_runtime_cockpit/events/__init__.py +44 -0
  286. agent_runtime_cockpit/events/bus.py +174 -0
  287. agent_runtime_cockpit/events/codegraph_events.py +44 -0
  288. agent_runtime_cockpit/events/models.py +76 -0
  289. agent_runtime_cockpit/events/persistence.py +184 -0
  290. agent_runtime_cockpit/events/types.py +209 -0
  291. agent_runtime_cockpit/events/webhooks.py +221 -0
  292. agent_runtime_cockpit/extensions/__init__.py +6 -0
  293. agent_runtime_cockpit/extensions/a2ui.py +52 -0
  294. agent_runtime_cockpit/extensions/base.py +19 -0
  295. agent_runtime_cockpit/extensions/flutter.py +42 -0
  296. agent_runtime_cockpit/extensions/registry.py +14 -0
  297. agent_runtime_cockpit/flight_recorder/__init__.py +90 -0
  298. agent_runtime_cockpit/flight_recorder/export.py +194 -0
  299. agent_runtime_cockpit/flight_recorder/index.py +136 -0
  300. agent_runtime_cockpit/flight_recorder/models.py +315 -0
  301. agent_runtime_cockpit/flight_recorder/recorder.py +367 -0
  302. agent_runtime_cockpit/flight_recorder/redaction.py +237 -0
  303. agent_runtime_cockpit/flight_recorder/retention.py +205 -0
  304. agent_runtime_cockpit/flight_recorder/segments.py +276 -0
  305. agent_runtime_cockpit/flight_recorder/verify.py +222 -0
  306. agent_runtime_cockpit/gating.py +35 -0
  307. agent_runtime_cockpit/hub/__init__.py +304 -0
  308. agent_runtime_cockpit/index/__init__.py +473 -0
  309. agent_runtime_cockpit/integrations/__init__.py +66 -0
  310. agent_runtime_cockpit/integrations/_pathsafe.py +24 -0
  311. agent_runtime_cockpit/integrations/audit.py +93 -0
  312. agent_runtime_cockpit/integrations/base.py +42 -0
  313. agent_runtime_cockpit/integrations/cli/__init__.py +14 -0
  314. agent_runtime_cockpit/integrations/cli/_app.py +9 -0
  315. agent_runtime_cockpit/integrations/cli/audit_cmd.py +29 -0
  316. agent_runtime_cockpit/integrations/cli/connect.py +45 -0
  317. agent_runtime_cockpit/integrations/cli/disconnect.py +35 -0
  318. agent_runtime_cockpit/integrations/cli/export_cmd.py +19 -0
  319. agent_runtime_cockpit/integrations/cli/poll.py +19 -0
  320. agent_runtime_cockpit/integrations/cli/status.py +39 -0
  321. agent_runtime_cockpit/integrations/cli/test_cmd.py +40 -0
  322. agent_runtime_cockpit/integrations/cli/tools/__init__.py +1 -0
  323. agent_runtime_cockpit/integrations/cli/tools/airtable.py +82 -0
  324. agent_runtime_cockpit/integrations/cli/tools/asana.py +82 -0
  325. agent_runtime_cockpit/integrations/cli/tools/clickup.py +82 -0
  326. agent_runtime_cockpit/integrations/cli/tools/confluence.py +82 -0
  327. agent_runtime_cockpit/integrations/cli/tools/discord.py +82 -0
  328. agent_runtime_cockpit/integrations/cli/tools/figma.py +82 -0
  329. agent_runtime_cockpit/integrations/cli/tools/github_projects.py +82 -0
  330. agent_runtime_cockpit/integrations/cli/tools/google_workspace.py +82 -0
  331. agent_runtime_cockpit/integrations/cli/tools/jira.py +82 -0
  332. agent_runtime_cockpit/integrations/cli/tools/linear.py +82 -0
  333. agent_runtime_cockpit/integrations/cli/tools/miro.py +82 -0
  334. agent_runtime_cockpit/integrations/cli/tools/monday.py +82 -0
  335. agent_runtime_cockpit/integrations/cli/tools/notion.py +82 -0
  336. agent_runtime_cockpit/integrations/cli/tools/slack.py +82 -0
  337. agent_runtime_cockpit/integrations/cli/tools/teams.py +82 -0
  338. agent_runtime_cockpit/integrations/cli/tools/trello.py +82 -0
  339. agent_runtime_cockpit/integrations/credentials.py +104 -0
  340. agent_runtime_cockpit/integrations/event_types.py +34 -0
  341. agent_runtime_cockpit/integrations/http_client.py +90 -0
  342. agent_runtime_cockpit/integrations/idempotency.py +50 -0
  343. agent_runtime_cockpit/integrations/pager.py +95 -0
  344. agent_runtime_cockpit/integrations/rate_limit.py +48 -0
  345. agent_runtime_cockpit/integrations/registry.py +30 -0
  346. agent_runtime_cockpit/integrations/sync.py +107 -0
  347. agent_runtime_cockpit/integrations/tools/__init__.py +1 -0
  348. agent_runtime_cockpit/integrations/tools/airtable.py +101 -0
  349. agent_runtime_cockpit/integrations/tools/asana.py +101 -0
  350. agent_runtime_cockpit/integrations/tools/clickup.py +101 -0
  351. agent_runtime_cockpit/integrations/tools/confluence.py +101 -0
  352. agent_runtime_cockpit/integrations/tools/discord.py +101 -0
  353. agent_runtime_cockpit/integrations/tools/figma.py +101 -0
  354. agent_runtime_cockpit/integrations/tools/github_projects.py +101 -0
  355. agent_runtime_cockpit/integrations/tools/google_workspace.py +101 -0
  356. agent_runtime_cockpit/integrations/tools/jira.py +103 -0
  357. agent_runtime_cockpit/integrations/tools/linear.py +101 -0
  358. agent_runtime_cockpit/integrations/tools/miro.py +101 -0
  359. agent_runtime_cockpit/integrations/tools/monday.py +101 -0
  360. agent_runtime_cockpit/integrations/tools/notion.py +101 -0
  361. agent_runtime_cockpit/integrations/tools/slack.py +101 -0
  362. agent_runtime_cockpit/integrations/tools/teams.py +101 -0
  363. agent_runtime_cockpit/integrations/tools/trello.py +101 -0
  364. agent_runtime_cockpit/isolation/__init__.py +26 -0
  365. agent_runtime_cockpit/isolation/base.py +68 -0
  366. agent_runtime_cockpit/isolation/docker_provider.py +536 -0
  367. agent_runtime_cockpit/isolation/microvm.py +2301 -0
  368. agent_runtime_cockpit/isolation/none.py +148 -0
  369. agent_runtime_cockpit/isolation/selector.py +130 -0
  370. agent_runtime_cockpit/isolation/subprocess.py +225 -0
  371. agent_runtime_cockpit/isolation/vz_provider.py +1506 -0
  372. agent_runtime_cockpit/mcp/__init__.py +10 -0
  373. agent_runtime_cockpit/mcp/manifests.py +161 -0
  374. agent_runtime_cockpit/mcp/proxy.py +273 -0
  375. agent_runtime_cockpit/mcp/registry.py +120 -0
  376. agent_runtime_cockpit/mcp/risk.py +92 -0
  377. agent_runtime_cockpit/mcp/sandbox.py +173 -0
  378. agent_runtime_cockpit/mcp/server.py +945 -0
  379. agent_runtime_cockpit/mcp/session.py +282 -0
  380. agent_runtime_cockpit/memory_graph/__init__.py +14 -0
  381. agent_runtime_cockpit/memory_graph/evidence.py +97 -0
  382. agent_runtime_cockpit/memory_graph/models.py +101 -0
  383. agent_runtime_cockpit/memory_graph/store.py +240 -0
  384. agent_runtime_cockpit/methodology/__init__.py +21 -0
  385. agent_runtime_cockpit/methodology/gates.py +44 -0
  386. agent_runtime_cockpit/methodology/loop_integration.py +42 -0
  387. agent_runtime_cockpit/methodology/primitives.py +64 -0
  388. agent_runtime_cockpit/methodology/registry.py +131 -0
  389. agent_runtime_cockpit/methodology/runtime.py +37 -0
  390. agent_runtime_cockpit/methodology/schema.py +56 -0
  391. agent_runtime_cockpit/migrate/__init__.py +391 -0
  392. agent_runtime_cockpit/mobile/__init__.py +188 -0
  393. agent_runtime_cockpit/mobile/approval.py +92 -0
  394. agent_runtime_cockpit/mobile/audit_retention.py +92 -0
  395. agent_runtime_cockpit/mobile/capabilities.py +318 -0
  396. agent_runtime_cockpit/mobile/capability_gate.py +144 -0
  397. agent_runtime_cockpit/mobile/compliance/__init__.py +20 -0
  398. agent_runtime_cockpit/mobile/compliance/android.py +75 -0
  399. agent_runtime_cockpit/mobile/compliance/ios.py +143 -0
  400. agent_runtime_cockpit/mobile/compliance/report.py +49 -0
  401. agent_runtime_cockpit/mobile/compliance/review_notes.py +39 -0
  402. agent_runtime_cockpit/mobile/device_posture.py +72 -0
  403. agent_runtime_cockpit/mobile/feature_flags.py +74 -0
  404. agent_runtime_cockpit/mobile/fixtures_registry.py +137 -0
  405. agent_runtime_cockpit/mobile/hashing.py +49 -0
  406. agent_runtime_cockpit/mobile/manifest.py +109 -0
  407. agent_runtime_cockpit/mobile/mcp_bridge.py +84 -0
  408. agent_runtime_cockpit/mobile/mock_store.py +46 -0
  409. agent_runtime_cockpit/mobile/models.py +197 -0
  410. agent_runtime_cockpit/mobile/offline_queue.py +145 -0
  411. agent_runtime_cockpit/mobile/policy.py +157 -0
  412. agent_runtime_cockpit/mobile/policy_context.py +126 -0
  413. agent_runtime_cockpit/mobile/privacy_budget.py +193 -0
  414. agent_runtime_cockpit/mobile/provenance.py +55 -0
  415. agent_runtime_cockpit/mobile/recorder.py +169 -0
  416. agent_runtime_cockpit/mobile/redaction.py +86 -0
  417. agent_runtime_cockpit/mobile/replay.py +105 -0
  418. agent_runtime_cockpit/mobile/runtime_pack.py +102 -0
  419. agent_runtime_cockpit/mobile/sbom.py +79 -0
  420. agent_runtime_cockpit/mobile/schema_validator.py +66 -0
  421. agent_runtime_cockpit/mobile/secure_store.py +178 -0
  422. agent_runtime_cockpit/mobile/siem_export.py +121 -0
  423. agent_runtime_cockpit/mobile/signing.py +91 -0
  424. agent_runtime_cockpit/mobile/simulator.py +170 -0
  425. agent_runtime_cockpit/mobile/validation.py +417 -0
  426. agent_runtime_cockpit/mobile_sdk_mapping.py +226 -0
  427. agent_runtime_cockpit/notebook/__init__.py +374 -0
  428. agent_runtime_cockpit/notifications/__init__.py +0 -0
  429. agent_runtime_cockpit/notifications/outbox.py +38 -0
  430. agent_runtime_cockpit/observability/__init__.py +57 -0
  431. agent_runtime_cockpit/observability/exporters.py +200 -0
  432. agent_runtime_cockpit/observability/hashing.py +36 -0
  433. agent_runtime_cockpit/observability/loaders.py +172 -0
  434. agent_runtime_cockpit/observability/mcp_drift.py +134 -0
  435. agent_runtime_cockpit/observability/models.py +140 -0
  436. agent_runtime_cockpit/observability/openinference_mapping.py +119 -0
  437. agent_runtime_cockpit/observability/otel_mapping.py +455 -0
  438. agent_runtime_cockpit/observability/otlp_exporter.py +271 -0
  439. agent_runtime_cockpit/observability/redaction.py +95 -0
  440. agent_runtime_cockpit/observability/validation.py +82 -0
  441. agent_runtime_cockpit/optimizer/__init__.py +21 -0
  442. agent_runtime_cockpit/optimizer/local.py +209 -0
  443. agent_runtime_cockpit/orchestration/__init__.py +1 -0
  444. agent_runtime_cockpit/orchestration/capability_negotiation.py +106 -0
  445. agent_runtime_cockpit/orchestration/codegraph_event_integration.py +274 -0
  446. agent_runtime_cockpit/orchestration/codegraph_manager.py +225 -0
  447. agent_runtime_cockpit/orchestration/cross_linker.py +125 -0
  448. agent_runtime_cockpit/orchestration/event_broker.py +374 -0
  449. agent_runtime_cockpit/orchestration/events.py +78 -0
  450. agent_runtime_cockpit/orchestration/runtime_router.py +505 -0
  451. agent_runtime_cockpit/orchestration/supervisor.py +622 -0
  452. agent_runtime_cockpit/protocol/__init__.py +87 -0
  453. agent_runtime_cockpit/protocol/_bypass.py +49 -0
  454. agent_runtime_cockpit/protocol/cache_breakpoints.py +142 -0
  455. agent_runtime_cockpit/protocol/capabilities.py +99 -0
  456. agent_runtime_cockpit/protocol/capability_card_events.py +43 -0
  457. agent_runtime_cockpit/protocol/capability_snapshot.py +226 -0
  458. agent_runtime_cockpit/protocol/cost_record.py +209 -0
  459. agent_runtime_cockpit/protocol/denial_events.py +174 -0
  460. agent_runtime_cockpit/protocol/envelope.py +30 -0
  461. agent_runtime_cockpit/protocol/errors.py +56 -0
  462. agent_runtime_cockpit/protocol/event_envelope.py +77 -0
  463. agent_runtime_cockpit/protocol/events.py +476 -0
  464. agent_runtime_cockpit/protocol/evidence_refs.py +57 -0
  465. agent_runtime_cockpit/protocol/failure_autopsy.py +66 -0
  466. agent_runtime_cockpit/protocol/mcp_decision_events.py +44 -0
  467. agent_runtime_cockpit/protocol/run_contract.py +77 -0
  468. agent_runtime_cockpit/protocol/run_receipt.py +77 -0
  469. agent_runtime_cockpit/protocol/runtime_capability.py +69 -0
  470. agent_runtime_cockpit/protocol/schemas.py +187 -0
  471. agent_runtime_cockpit/protocol/stable_ids.py +212 -0
  472. agent_runtime_cockpit/protocol/trust_diff.py +41 -0
  473. agent_runtime_cockpit/protocol/typed_events.py +1149 -0
  474. agent_runtime_cockpit/provider_action.py +1315 -0
  475. agent_runtime_cockpit/providers/__init__.py +124 -0
  476. agent_runtime_cockpit/providers/agentrouter_proxy.py +211 -0
  477. agent_runtime_cockpit/providers/anthropic.py +503 -0
  478. agent_runtime_cockpit/providers/anthropic_cost.py +130 -0
  479. agent_runtime_cockpit/providers/anthropic_estimator.py +268 -0
  480. agent_runtime_cockpit/providers/arena_provider.py +162 -0
  481. agent_runtime_cockpit/providers/base.py +257 -0
  482. agent_runtime_cockpit/providers/budget_preflight.py +102 -0
  483. agent_runtime_cockpit/providers/client.py +54 -0
  484. agent_runtime_cockpit/providers/e2e_evidence.py +115 -0
  485. agent_runtime_cockpit/providers/fallback.py +108 -0
  486. agent_runtime_cockpit/providers/models_dev.py +31023 -0
  487. agent_runtime_cockpit/providers/openai_compatible.py +2145 -0
  488. agent_runtime_cockpit/providers/redaction.py +33 -0
  489. agent_runtime_cockpit/providers/registry.py +25 -0
  490. agent_runtime_cockpit/providers/router.py +34 -0
  491. agent_runtime_cockpit/release_intelligence/__init__.py +328 -0
  492. agent_runtime_cockpit/release_snapshots/__init__.py +207 -0
  493. agent_runtime_cockpit/run_diff/__init__.py +113 -0
  494. agent_runtime_cockpit/run_diff/diff_capabilities.py +103 -0
  495. agent_runtime_cockpit/run_diff/diff_events.py +206 -0
  496. agent_runtime_cockpit/run_diff/diff_flight.py +68 -0
  497. agent_runtime_cockpit/run_diff/diff_ir.py +420 -0
  498. agent_runtime_cockpit/run_diff/diff_mcp.py +59 -0
  499. agent_runtime_cockpit/run_diff/diff_policy.py +230 -0
  500. agent_runtime_cockpit/run_diff/diff_simulation.py +71 -0
  501. agent_runtime_cockpit/run_diff/export.py +103 -0
  502. agent_runtime_cockpit/run_diff/loaders.py +257 -0
  503. agent_runtime_cockpit/run_diff/models.py +361 -0
  504. agent_runtime_cockpit/run_diff/redaction.py +118 -0
  505. agent_runtime_cockpit/run_diff/timeline.py +306 -0
  506. agent_runtime_cockpit/runtime/agent_loop.py +105 -0
  507. agent_runtime_cockpit/runtime/capability.py +20 -0
  508. agent_runtime_cockpit/runtime/mode.py +116 -0
  509. agent_runtime_cockpit/runtime/registry.py +30 -0
  510. agent_runtime_cockpit/runtime/response_cache.py +96 -0
  511. agent_runtime_cockpit/runtime/streaming.py +238 -0
  512. agent_runtime_cockpit/runtime/tool_runtime.py +32 -0
  513. agent_runtime_cockpit/runtime/turn_manager.py +501 -0
  514. agent_runtime_cockpit/runtime_packs/__init__.py +138 -0
  515. agent_runtime_cockpit/runtime_packs/exporters.py +197 -0
  516. agent_runtime_cockpit/runtime_packs/hashing.py +125 -0
  517. agent_runtime_cockpit/runtime_packs/loader.py +147 -0
  518. agent_runtime_cockpit/runtime_packs/models.py +415 -0
  519. agent_runtime_cockpit/runtime_packs/redaction.py +146 -0
  520. agent_runtime_cockpit/runtime_packs/registry.py +244 -0
  521. agent_runtime_cockpit/runtime_packs/scaffold.py +182 -0
  522. agent_runtime_cockpit/runtime_packs/validation.py +412 -0
  523. agent_runtime_cockpit/schemas/__init__.py +17 -0
  524. agent_runtime_cockpit/schemas/audit_events.py +62 -0
  525. agent_runtime_cockpit/schemas/replay_capability.py +133 -0
  526. agent_runtime_cockpit/security/__init__.py +5 -0
  527. agent_runtime_cockpit/security/_bypass_rate_limit.py +83 -0
  528. agent_runtime_cockpit/security/adaptive_confirmation.py +123 -0
  529. agent_runtime_cockpit/security/context.py +119 -0
  530. agent_runtime_cockpit/security/edit_loop.py +604 -0
  531. agent_runtime_cockpit/security/enforcement.py +525 -0
  532. agent_runtime_cockpit/security/injection_patterns.py +152 -0
  533. agent_runtime_cockpit/security/monitoring.py +215 -0
  534. agent_runtime_cockpit/security/plan.py +459 -0
  535. agent_runtime_cockpit/security/policy_linter.py +307 -0
  536. agent_runtime_cockpit/security/policy_templates/__init__.py +204 -0
  537. agent_runtime_cockpit/security/policy_templates/templates/ci-cd.yaml +25 -0
  538. agent_runtime_cockpit/security/policy_templates/templates/data-science.yaml +24 -0
  539. agent_runtime_cockpit/security/policy_templates/templates/development.yaml +23 -0
  540. agent_runtime_cockpit/security/policy_templates/templates/open-source.yaml +20 -0
  541. agent_runtime_cockpit/security/policy_templates/templates/regulated-industry.yaml +22 -0
  542. agent_runtime_cockpit/security/profiles.py +174 -0
  543. agent_runtime_cockpit/security/prompt_guard.py +110 -0
  544. agent_runtime_cockpit/security/redaction.py +98 -0
  545. agent_runtime_cockpit/security/repair_loop.py +185 -0
  546. agent_runtime_cockpit/security/review.py +131 -0
  547. agent_runtime_cockpit/security/sandbox.py +2753 -0
  548. agent_runtime_cockpit/security/transactions.py +201 -0
  549. agent_runtime_cockpit/security/trust.py +202 -0
  550. agent_runtime_cockpit/security/validation.py +72 -0
  551. agent_runtime_cockpit/simulation/__init__.py +45 -0
  552. agent_runtime_cockpit/simulation/models.py +158 -0
  553. agent_runtime_cockpit/simulation/pricing.py +58 -0
  554. agent_runtime_cockpit/simulation/simulator.py +409 -0
  555. agent_runtime_cockpit/storage/__init__.py +6 -0
  556. agent_runtime_cockpit/storage/advisory_lock.py +78 -0
  557. agent_runtime_cockpit/storage/atomic.py +39 -0
  558. agent_runtime_cockpit/storage/indexed_store.py +161 -0
  559. agent_runtime_cockpit/storage/jsonl.py +170 -0
  560. agent_runtime_cockpit/storage/sqlite.py +242 -0
  561. agent_runtime_cockpit/stream/__init__.py +0 -0
  562. agent_runtime_cockpit/stream/websocket.py +288 -0
  563. agent_runtime_cockpit/swarmgraph/__init__.py +94 -0
  564. agent_runtime_cockpit/swarmgraph_ir/__init__.py +75 -0
  565. agent_runtime_cockpit/swarmgraph_ir/adapters/__init__.py +47 -0
  566. agent_runtime_cockpit/swarmgraph_ir/adapters/native.py +151 -0
  567. agent_runtime_cockpit/swarmgraph_ir/compiler.py +217 -0
  568. agent_runtime_cockpit/swarmgraph_ir/enrich.py +56 -0
  569. agent_runtime_cockpit/swarmgraph_ir/exporters.py +160 -0
  570. agent_runtime_cockpit/swarmgraph_ir/hashing.py +44 -0
  571. agent_runtime_cockpit/swarmgraph_ir/models.py +207 -0
  572. agent_runtime_cockpit/swarmgraph_ir/provenance.py +48 -0
  573. agent_runtime_cockpit/swarmgraph_ir/validation.py +121 -0
  574. agent_runtime_cockpit/tasks/__init__.py +16 -0
  575. agent_runtime_cockpit/tasks/executor.py +513 -0
  576. agent_runtime_cockpit/tasks/models.py +106 -0
  577. agent_runtime_cockpit/tasks/scheduler.py +237 -0
  578. agent_runtime_cockpit/tasks/storage.py +244 -0
  579. agent_runtime_cockpit/telemetry/__init__.py +12 -0
  580. agent_runtime_cockpit/telemetry/otlp_exporter.py +173 -0
  581. agent_runtime_cockpit/time_travel/__init__.py +390 -0
  582. agent_runtime_cockpit/tools/__init__.py +47 -0
  583. agent_runtime_cockpit/tools/builtin.py +132 -0
  584. agent_runtime_cockpit/tools/protocol.py +59 -0
  585. agent_runtime_cockpit/tools/registry.py +51 -0
  586. agent_runtime_cockpit/tools/shell.py +171 -0
  587. agent_runtime_cockpit/tools/wrapping.py +42 -0
  588. agent_runtime_cockpit/tools/write.py +220 -0
  589. agent_runtime_cockpit/tracing/__init__.py +6 -0
  590. agent_runtime_cockpit/tracing/jsonl_writer.py +43 -0
  591. agent_runtime_cockpit/tui/__init__.py +21 -0
  592. agent_runtime_cockpit/tui/app.py +121 -0
  593. agent_runtime_cockpit/tui/data.py +288 -0
  594. agent_runtime_cockpit/tui/screen.py +1005 -0
  595. agent_runtime_cockpit/tui/search.py +126 -0
  596. agent_runtime_cockpit/tui/sparkline.py +36 -0
  597. agent_runtime_cockpit/tui/tcss/base.tcss +140 -0
  598. agent_runtime_cockpit/tui/theme.py +284 -0
  599. agent_runtime_cockpit/tui/theme_extras.py +74 -0
  600. agent_runtime_cockpit/tui/tweaks.py +89 -0
  601. agent_runtime_cockpit/tui/views/__init__.py +22 -0
  602. agent_runtime_cockpit/tui/views/audit_view.py +50 -0
  603. agent_runtime_cockpit/tui/views/codegraph.py +163 -0
  604. agent_runtime_cockpit/tui/views/hitl_view.py +238 -0
  605. agent_runtime_cockpit/tui/views/methodology.py +111 -0
  606. agent_runtime_cockpit/tui/views/modal_shell.py +93 -0
  607. agent_runtime_cockpit/tui/views/plan_view.py +84 -0
  608. agent_runtime_cockpit/tui/views/providers_view.py +444 -0
  609. agent_runtime_cockpit/tui/views/runs_view.py +174 -0
  610. agent_runtime_cockpit/tui/views/runtimes_view.py +87 -0
  611. agent_runtime_cockpit/tui/views/sessions_view.py +180 -0
  612. agent_runtime_cockpit/tui/views/settings_view.py +445 -0
  613. agent_runtime_cockpit/tui/views/side_panel.py +18 -0
  614. agent_runtime_cockpit/tui/views/tweaks_view.py +109 -0
  615. agent_runtime_cockpit/tui/widgets/__init__.py +8 -0
  616. agent_runtime_cockpit/tui/widgets/activity_tray.py +144 -0
  617. agent_runtime_cockpit/tui/widgets/approval_bar.py +175 -0
  618. agent_runtime_cockpit/tui/widgets/approval_card.py +140 -0
  619. agent_runtime_cockpit/tui/widgets/banner.py +52 -0
  620. agent_runtime_cockpit/tui/widgets/capability_banner.py +91 -0
  621. agent_runtime_cockpit/tui/widgets/capability_gates.py +69 -0
  622. agent_runtime_cockpit/tui/widgets/command_palette.py +129 -0
  623. agent_runtime_cockpit/tui/widgets/context_meter.py +59 -0
  624. agent_runtime_cockpit/tui/widgets/diff_block.py +129 -0
  625. agent_runtime_cockpit/tui/widgets/empty_state.py +73 -0
  626. agent_runtime_cockpit/tui/widgets/header.py +197 -0
  627. agent_runtime_cockpit/tui/widgets/help_screen.py +104 -0
  628. agent_runtime_cockpit/tui/widgets/input_area.py +235 -0
  629. agent_runtime_cockpit/tui/widgets/jump_pill.py +72 -0
  630. agent_runtime_cockpit/tui/widgets/keycap_hint.py +47 -0
  631. agent_runtime_cockpit/tui/widgets/markdown_block.py +173 -0
  632. agent_runtime_cockpit/tui/widgets/mcp_banner.py +60 -0
  633. agent_runtime_cockpit/tui/widgets/message.py +5 -0
  634. agent_runtime_cockpit/tui/widgets/minimap.py +129 -0
  635. agent_runtime_cockpit/tui/widgets/mode_badge.py +84 -0
  636. agent_runtime_cockpit/tui/widgets/reasoning_trace.py +67 -0
  637. agent_runtime_cockpit/tui/widgets/risk_badge.py +64 -0
  638. agent_runtime_cockpit/tui/widgets/search_bar.py +161 -0
  639. agent_runtime_cockpit/tui/widgets/slash_menu.py +167 -0
  640. agent_runtime_cockpit/tui/widgets/status_bar.py +121 -0
  641. agent_runtime_cockpit/tui/widgets/swarm_graph.py +335 -0
  642. agent_runtime_cockpit/tui/widgets/toaster.py +108 -0
  643. agent_runtime_cockpit/tui/widgets/tool_card.py +93 -0
  644. agent_runtime_cockpit/tui/widgets/tool_group.py +135 -0
  645. agent_runtime_cockpit/tui/widgets/transcript.py +271 -0
  646. agent_runtime_cockpit/tui/widgets/trust_prompt.py +108 -0
  647. agent_runtime_cockpit/vision/__init__.py +421 -0
  648. agent_runtime_cockpit/voice/__init__.py +301 -0
  649. agent_runtime_cockpit/wasm_parser/__init__.py +268 -0
  650. agent_runtime_cockpit/web/__init__.py +1 -0
  651. agent_runtime_cockpit/web/agui_bridge.py +67 -0
  652. agent_runtime_cockpit/web/keys.py +10 -0
  653. agent_runtime_cockpit/web/route_fates.py +31 -0
  654. agent_runtime_cockpit/web/routes.py +1356 -0
  655. agent_runtime_cockpit/web/routes_arena.py +172 -0
  656. agent_runtime_cockpit/web/routes_codegraph.py +389 -0
  657. agent_runtime_cockpit/web/routes_helpers.py +78 -0
  658. agent_runtime_cockpit/web/routes_tasks.py +127 -0
  659. agent_runtime_cockpit/web/server.py +139 -0
  660. agent_runtime_cockpit/workspace/__init__.py +33 -0
  661. agent_runtime_cockpit/workspace/entrypoint.py +37 -0
  662. agent_runtime_cockpit/workspace/symbols.py +334 -0
  663. agent_runtime_cockpit/workspace.py +170 -0
  664. agent_runtime_cockpit-0.1.0a0.dist-info/METADATA +64 -0
  665. agent_runtime_cockpit-0.1.0a0.dist-info/RECORD +668 -0
  666. agent_runtime_cockpit-0.1.0a0.dist-info/WHEEL +4 -0
  667. agent_runtime_cockpit-0.1.0a0.dist-info/entry_points.txt +5 -0
  668. agent_runtime_cockpit-0.1.0a0.dist-info/licenses/LICENSE +134 -0
@@ -0,0 +1,52 @@
1
+ """ARC Daemon — PyInstaller entry point.
2
+
3
+ This module serves as the main script for PyInstaller bundling.
4
+ When frozen, it starts the ARC daemon server directly.
5
+ In normal development, users use `arc serve` via the CLI.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import sys
11
+ from pathlib import Path
12
+
13
+ # Ensure the package root is on sys.path when frozen
14
+ if getattr(sys, "frozen", False):
15
+ # PyInstaller bundles packages under sys._MEIPASS
16
+ meipass = Path(sys._MEIPASS) # type: ignore[attr-defined]
17
+ pkg_root = meipass / "agent_runtime_cockpit"
18
+ if pkg_root.is_dir():
19
+ sys.path.insert(0, str(meipass))
20
+
21
+
22
+ def main() -> None:
23
+ """Parse CLI-style args and start the daemon."""
24
+ import argparse
25
+
26
+ parser = argparse.ArgumentParser(description="ARC Studio Daemon")
27
+ parser.add_argument(
28
+ "--host",
29
+ default="localhost",
30
+ help="Host to bind (default: localhost)",
31
+ )
32
+ parser.add_argument(
33
+ "--port",
34
+ type=int,
35
+ default=7777,
36
+ help="Port to bind (default: 7777)",
37
+ )
38
+ parser.add_argument(
39
+ "--workspace",
40
+ type=Path,
41
+ default=None,
42
+ help="Workspace path",
43
+ )
44
+ args = parser.parse_args()
45
+
46
+ from agent_runtime_cockpit.daemon import start
47
+
48
+ start(host=args.host, port=args.port, workspace=args.workspace)
49
+
50
+
51
+ if __name__ == "__main__":
52
+ main()
@@ -0,0 +1,6 @@
1
+ """ARC — Agent Runtime Cockpit
2
+ Python daemon, CLI, adapters, and context retrieval engine.
3
+ """
4
+
5
+ __version__ = "0.1.0a0"
6
+ __all__ = ["__version__"]
@@ -0,0 +1,60 @@
1
+ """ARC CLI — Agent Runtime Cockpit command-line interface.
2
+
3
+ Commands:
4
+ arc version — print ARC version information
5
+ arc health — check ARC daemon and environment health
6
+ arc status — show ARC workspace and runtime status overview
7
+ arc inspect — inspect workspace, detect runtimes
8
+ arc runtimes — list detected runtimes
9
+ arc workflows — list detected workflows
10
+ arc schemas — list detected schemas
11
+ arc serve — start HTTP daemon
12
+ arc run — execute a workflow
13
+ arc runs — list stored runs
14
+ arc doctor — diagnostics (swarmgraph, all)
15
+ arc context — context retrieval commands
16
+ arc adapter — adapter management and conformance testing
17
+ """
18
+
19
+ from __future__ import annotations
20
+
21
+ # Phase 25: decomposed CLI modules. Re-export for backward compatibility.
22
+ from .cli._app import app, console, err_console, main # noqa: F401
23
+ from .cli._helpers import ( # noqa: F401
24
+ DEBUG_FLAG,
25
+ JSON_FLAG,
26
+ LOCAL_REAL_GATE_ENVS,
27
+ WORKSPACE_FLAG,
28
+ _local_real_gate_open,
29
+ _local_real_gate_state,
30
+ _out,
31
+ _profile_payload,
32
+ _run_preflight,
33
+ _setup_logging,
34
+ _validate_runtime_mode,
35
+ _workspace,
36
+ check_swarmgraph_runtime,
37
+ )
38
+ from .cli._subapps import ( # noqa: F401
39
+ accounts_app,
40
+ adapter_app,
41
+ config_app,
42
+ context_app,
43
+ doctor_app,
44
+ eval_app,
45
+ hitl_app,
46
+ isolation_app,
47
+ key_app,
48
+ profiles_app,
49
+ prompt_app,
50
+ providers_app,
51
+ quota_app,
52
+ routing_app,
53
+ storage_app,
54
+ studio_app,
55
+ studio_sessions_app,
56
+ workspace_app,
57
+ )
58
+
59
+
60
+ # ─── version ──────────────────────────────────────────────────────────────────
@@ -0,0 +1,23 @@
1
+ """A2A Local AgentCard Generator + Loopback Client.
2
+
3
+ Provides A2A v1.2 spec-compliant agent card generation, disk-based storage,
4
+ per-card approval, and a loopback-only outbound client.
5
+
6
+ NO inbound HTTP server — cards are written to .arc/a2a/agent-card.json only.
7
+ """
8
+
9
+ from .models import (
10
+ AgentCard,
11
+ AgentCardCapability,
12
+ AgentCardProvider,
13
+ AgentCardSignature,
14
+ AgentCardSkill,
15
+ )
16
+
17
+ __all__ = [
18
+ "AgentCard",
19
+ "AgentCardCapability",
20
+ "AgentCardProvider",
21
+ "AgentCardSignature",
22
+ "AgentCardSkill",
23
+ ]
@@ -0,0 +1,127 @@
1
+ """Loopback-only outbound A2A client.
2
+
3
+ Constraints:
4
+ - Only 127.0.0.1 URLs accepted (no other hosts)
5
+ - Unsigned cards refused
6
+ - Per-card approval required
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import json
12
+ import re
13
+ from pathlib import Path
14
+ from typing import Any, Optional
15
+
16
+ from .models import AgentCard
17
+
18
+ _LOOPBACK_RE = re.compile(r"^http://127\.0\.0\.1:\d+(/|$)")
19
+
20
+ APPROVED_CARDS_FILE = "approved.json"
21
+
22
+
23
+ class A2AClientError(Exception):
24
+ """Base error for A2A client."""
25
+
26
+
27
+ class NonLoopbackError(A2AClientError):
28
+ """URL is not loopback."""
29
+
30
+
31
+ class UnsignedCardError(A2AClientError):
32
+ """Card has no signature."""
33
+
34
+
35
+ class UnapprovedCardError(A2AClientError):
36
+ """Card not in approved list."""
37
+
38
+
39
+ def _validate_url(url: str) -> None:
40
+ if not _LOOPBACK_RE.match(url):
41
+ raise NonLoopbackError(f"Non-loopback URL refused: {url}")
42
+
43
+
44
+ def _load_approved(arc_dir: Path) -> dict[str, Any]:
45
+ path = arc_dir / "a2a" / APPROVED_CARDS_FILE
46
+ if not path.exists():
47
+ return {}
48
+ return json.loads(path.read_text())
49
+
50
+
51
+ def _save_approved(arc_dir: Path, data: dict[str, Any]) -> None:
52
+ path = arc_dir / "a2a" / APPROVED_CARDS_FILE
53
+ path.parent.mkdir(parents=True, exist_ok=True)
54
+ path.write_text(json.dumps(data, indent=2) + "\n")
55
+
56
+
57
+ def is_card_approved(card: AgentCard, arc_dir: Optional[Path] = None) -> bool:
58
+ """Check if a card is in the approved list."""
59
+ base = arc_dir or Path.home() / ".arc"
60
+ approved = _load_approved(base)
61
+ return card.name in approved
62
+
63
+
64
+ def approve_card(card: AgentCard, arc_dir: Optional[Path] = None) -> None:
65
+ """Add card to the approved list."""
66
+ base = arc_dir or Path.home() / ".arc"
67
+ approved = _load_approved(base)
68
+ approved[card.name] = {"version": card.version, "url": card.url}
69
+ _save_approved(base, approved)
70
+
71
+
72
+ def revoke_card(card_name: str, arc_dir: Optional[Path] = None) -> bool:
73
+ """Remove card from approved list. Returns True if was present."""
74
+ base = arc_dir or Path.home() / ".arc"
75
+ approved = _load_approved(base)
76
+ if card_name in approved:
77
+ del approved[card_name]
78
+ _save_approved(base, approved)
79
+ return True
80
+ return False
81
+
82
+
83
+ def _check_card(card: AgentCard, arc_dir: Path) -> None:
84
+ """Validate card has signature and is approved."""
85
+ if not card.signature:
86
+ raise UnsignedCardError(f"Card '{card.name}' has no signature")
87
+ if not is_card_approved(card, arc_dir):
88
+ raise UnapprovedCardError(f"Card '{card.name}' is not approved")
89
+
90
+
91
+ def invoke_sync(
92
+ card: AgentCard,
93
+ *,
94
+ payload: dict[str, Any],
95
+ arc_dir: Optional[Path] = None,
96
+ timeout: float = 30.0,
97
+ ) -> dict[str, Any]:
98
+ """Synchronous A2A invoke — loopback only, signed+approved cards only."""
99
+ import httpx
100
+
101
+ base = arc_dir or Path.home() / ".arc"
102
+ _validate_url(card.url)
103
+ _check_card(card, base)
104
+
105
+ resp = httpx.post(card.url, json=payload, timeout=timeout)
106
+ resp.raise_for_status()
107
+ return resp.json()
108
+
109
+
110
+ async def invoke_async(
111
+ card: AgentCard,
112
+ *,
113
+ payload: dict[str, Any],
114
+ arc_dir: Optional[Path] = None,
115
+ timeout: float = 30.0,
116
+ ) -> dict[str, Any]:
117
+ """Async A2A invoke — loopback only, signed+approved cards only."""
118
+ import httpx
119
+
120
+ base = arc_dir or Path.home() / ".arc"
121
+ _validate_url(card.url)
122
+ _check_card(card, base)
123
+
124
+ async with httpx.AsyncClient() as client:
125
+ resp = await client.post(card.url, json=payload, timeout=timeout)
126
+ resp.raise_for_status()
127
+ return resp.json()
@@ -0,0 +1,98 @@
1
+ """A2A AgentCard generator — writes .arc/a2a/agent-card.json."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import hashlib
6
+ import json
7
+ from pathlib import Path
8
+ from typing import Optional
9
+
10
+ from .models import (
11
+ AgentCard,
12
+ AgentCardCapability,
13
+ AgentCardProvider,
14
+ AgentCardSignature,
15
+ AgentCardSkill,
16
+ )
17
+
18
+
19
+ def _canonicalize(card: AgentCard) -> bytes:
20
+ """Deterministic JSON for signing (excludes signature field)."""
21
+ d = card.model_dump(mode="json", exclude={"signature"})
22
+ return json.dumps(d, sort_keys=True, separators=(",", ":")).encode("utf-8")
23
+
24
+
25
+ def _sign_card_hmac(
26
+ card: AgentCard, secret_key: str, signer_id: str = "arc-runtime"
27
+ ) -> AgentCardSignature:
28
+ import base64
29
+ import hmac as _hmac
30
+
31
+ data = _canonicalize(card)
32
+ sig = _hmac.new(secret_key.encode(), data, hashlib.sha256).digest()
33
+ return AgentCardSignature(
34
+ algorithm="hmac_sha256",
35
+ signature=base64.b64encode(sig).decode("ascii"),
36
+ signer_id=signer_id,
37
+ )
38
+
39
+
40
+ def generate_agent_card(
41
+ *,
42
+ name: str = "arc-studio",
43
+ description: str = "ARC Studio local agent",
44
+ version: str = "1.0.0",
45
+ url: str = "",
46
+ provider_name: str = "arc-studio",
47
+ provider_url: str = "",
48
+ capabilities: Optional[AgentCardCapability] = None,
49
+ skills: Optional[list[AgentCardSkill]] = None,
50
+ secret_key: Optional[str] = None,
51
+ signer_id: str = "arc-runtime",
52
+ ) -> AgentCard:
53
+ """Generate a deterministic AgentCard. Optionally sign with HMAC."""
54
+ card = AgentCard(
55
+ name=name,
56
+ description=description,
57
+ version=version,
58
+ url=url,
59
+ provider=AgentCardProvider(name=provider_name, url=provider_url),
60
+ capabilities=capabilities or AgentCardCapability(),
61
+ skills=skills or [],
62
+ )
63
+ if secret_key:
64
+ card.signature = _sign_card_hmac(card, secret_key, signer_id)
65
+ return card
66
+
67
+
68
+ def write_agent_card(card: AgentCard, arc_dir: Optional[Path] = None) -> Path:
69
+ """Write AgentCard to .arc/a2a/agent-card.json. Returns path written."""
70
+ base = arc_dir or Path.home() / ".arc"
71
+ out_dir = base / "a2a"
72
+ out_dir.mkdir(parents=True, exist_ok=True)
73
+ out_path = out_dir / "agent-card.json"
74
+ out_path.write_text(json.dumps(card.model_dump(mode="json"), indent=2, sort_keys=True) + "\n")
75
+ return out_path
76
+
77
+
78
+ def load_agent_card(arc_dir: Optional[Path] = None) -> Optional[AgentCard]:
79
+ """Load AgentCard from disk, or None if not present."""
80
+ base = arc_dir or Path.home() / ".arc"
81
+ path = base / "a2a" / "agent-card.json"
82
+ if not path.exists():
83
+ return None
84
+ data = json.loads(path.read_text())
85
+ return AgentCard.model_validate(data)
86
+
87
+
88
+ def verify_agent_card(card: AgentCard, secret_key: str) -> bool:
89
+ """Verify HMAC signature on an AgentCard."""
90
+ if not card.signature or card.signature.algorithm != "hmac_sha256":
91
+ return False
92
+ import base64
93
+ import hmac as _hmac
94
+
95
+ data = _canonicalize(card)
96
+ expected = _hmac.new(secret_key.encode(), data, hashlib.sha256).digest()
97
+ expected_b64 = base64.b64encode(expected).decode("ascii")
98
+ return _hmac.compare_digest(expected_b64, card.signature.signature)
@@ -0,0 +1,69 @@
1
+ """A2A v1.2 spec models — AgentCard, skills, capabilities, signature."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+
7
+ from pydantic import BaseModel, ConfigDict, Field
8
+
9
+ A2A_PROTOCOL_VERSION = "1.2"
10
+
11
+
12
+ class AgentCardSkill(BaseModel):
13
+ """A2A skill descriptor."""
14
+
15
+ model_config = ConfigDict(extra="ignore")
16
+
17
+ id: str
18
+ name: str
19
+ description: str = ""
20
+ tags: list[str] = Field(default_factory=list)
21
+ examples: list[str] = Field(default_factory=list)
22
+
23
+
24
+ class AgentCardCapability(BaseModel):
25
+ """A2A agent capabilities."""
26
+
27
+ model_config = ConfigDict(extra="ignore")
28
+
29
+ streaming: bool = False
30
+ pushNotifications: bool = False
31
+ stateTransitionHistory: bool = False
32
+
33
+
34
+ class AgentCardProvider(BaseModel):
35
+ """A2A provider info."""
36
+
37
+ model_config = ConfigDict(extra="ignore")
38
+
39
+ name: str
40
+ url: str = ""
41
+
42
+
43
+ class AgentCardSignature(BaseModel):
44
+ """Cryptographic signature for an AgentCard."""
45
+
46
+ model_config = ConfigDict(extra="ignore")
47
+
48
+ algorithm: str # e.g. "hmac_sha256", "ecdsa_p256"
49
+ signature: str # Base64-encoded
50
+ signer_id: str = "arc-runtime"
51
+ public_key_pem: Optional[str] = None
52
+
53
+
54
+ class AgentCard(BaseModel):
55
+ """A2A v1.2 AgentCard — disk-only, no inbound HTTP."""
56
+
57
+ model_config = ConfigDict(extra="ignore")
58
+
59
+ name: str
60
+ description: str = ""
61
+ version: str = "1.0.0"
62
+ protocolVersion: str = A2A_PROTOCOL_VERSION
63
+ url: str = "" # loopback URL or empty
64
+ provider: AgentCardProvider = Field(
65
+ default_factory=lambda: AgentCardProvider(name="arc-studio")
66
+ )
67
+ capabilities: AgentCardCapability = Field(default_factory=AgentCardCapability)
68
+ skills: list[AgentCardSkill] = Field(default_factory=list)
69
+ signature: Optional[AgentCardSignature] = None
@@ -0,0 +1,21 @@
1
+ """ARC runtime adapters — base, registry, swarmgraph, langgraph, conformance.
2
+
3
+ Module layout
4
+ -------------
5
+ Each adapter has a **canonical single-file implementation** (e.g. ``crewai.py``) that
6
+ is the live, wired module imported by ``registry.py:build_default()``.
7
+
8
+ Some adapters also have a **sibling package** (e.g. ``crewai/``) whose ``__init__.py``
9
+ re-exports the adapter class via ``_compat.load_sibling_adapter``. These packages exist
10
+ so that ``from .adapters.crewai import CrewAIAdapter`` works as a package import path.
11
+ They are **intentional forwarding shims**, not duplicates.
12
+
13
+ The ``*_mapping.py`` siblings (``agno_mapping``, ``browser_use_mapping``,
14
+ ``letta_mapping``, ``pydantic_ai_mapping``, ``strands_mapping``) are side-effect
15
+ imports that register AG-UI event mappers on import; each is imported by its parent
16
+ adapter module.
17
+ """
18
+ from .base import RuntimeAdapter
19
+ from .registry import AdapterRegistry
20
+
21
+ __all__ = ["RuntimeAdapter", "AdapterRegistry"]
@@ -0,0 +1,19 @@
1
+ from __future__ import annotations
2
+
3
+ import importlib.util
4
+ import sys
5
+ from pathlib import Path
6
+ from types import ModuleType
7
+
8
+
9
+ def load_sibling_adapter(package_file: str, module_name: str) -> ModuleType:
10
+ adapter_path = Path(package_file).resolve().parent.with_suffix(".py")
11
+ spec_name = f"agent_runtime_cockpit.adapters._{module_name}_adapter"
12
+ spec = importlib.util.spec_from_file_location(spec_name, adapter_path)
13
+ if spec is None or spec.loader is None:
14
+ raise ImportError(f"cannot load {module_name} adapter from {adapter_path}")
15
+ module = importlib.util.module_from_spec(spec)
16
+ module.__package__ = "agent_runtime_cockpit.adapters"
17
+ sys.modules[spec_name] = module
18
+ spec.loader.exec_module(module)
19
+ return module
@@ -0,0 +1,78 @@
1
+ """Shared helpers used by multiple runtime adapters."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+ from contextlib import contextmanager
7
+ from datetime import datetime, timezone
8
+ from decimal import Decimal
9
+ from pathlib import Path
10
+ from typing import Any, Iterator
11
+
12
+ from ..protocol.schemas import RunEvent
13
+
14
+
15
+ def make_event(run_id: str, sequence: int, event_type: str, data: dict) -> RunEvent:
16
+ """Construct a RunEvent with the current UTC timestamp."""
17
+ return RunEvent(
18
+ type=event_type,
19
+ timestamp=datetime.now(timezone.utc).isoformat(),
20
+ run_id=run_id,
21
+ sequence=sequence,
22
+ data=data,
23
+ )
24
+
25
+
26
+ def budget_checkpoint(
27
+ enforcer: Any,
28
+ estimated_cost_usd: Any,
29
+ *,
30
+ provider_id: str,
31
+ run_active: bool = True,
32
+ workflow_active: bool = True,
33
+ ) -> None:
34
+ """Shared adapter effect-boundary budget gate (B2P-09).
35
+
36
+ Adapters/run paths call this immediately before a cost-incurring effect. With a `BudgetEnforcer`
37
+ present it runs `preflight`, which raises `BudgetExceeded` (real-time exhaustion interrupt) or
38
+ `ConfirmationRequired`. When ``enforcer`` is ``None`` it falls back to the run-scoped enforcer
39
+ (``budget.runtime_context``); if that is also ``None`` it is a no-op (budget disabled), so callers
40
+ can invoke it unconditionally at every effect boundary.
41
+ """
42
+ if enforcer is None:
43
+ from ..budget.runtime_context import current_run_budget_enforcer
44
+
45
+ enforcer = current_run_budget_enforcer()
46
+ if enforcer is None:
47
+ return
48
+ cost = (
49
+ estimated_cost_usd
50
+ if isinstance(estimated_cost_usd, Decimal)
51
+ else Decimal(str(estimated_cost_usd))
52
+ )
53
+ enforcer.preflight(
54
+ cost,
55
+ provider_id=provider_id,
56
+ run_active=run_active,
57
+ workflow_active=workflow_active,
58
+ )
59
+
60
+
61
+ @contextmanager
62
+ def workspace_import_path(workspace: Path) -> Iterator[None]:
63
+ """Temporarily add workspace (and workspace/src) to sys.path."""
64
+ added: list[str] = []
65
+ for candidate in (workspace, workspace / "src"):
66
+ if candidate.exists():
67
+ value = str(candidate.resolve())
68
+ if value not in sys.path:
69
+ sys.path.insert(0, value)
70
+ added.append(value)
71
+ try:
72
+ yield
73
+ finally:
74
+ for value in added:
75
+ try:
76
+ sys.path.remove(value)
77
+ except ValueError:
78
+ pass
@@ -0,0 +1,91 @@
1
+ from __future__ import annotations
2
+
3
+ import itertools
4
+ from pathlib import Path
5
+
6
+ from ..protocol.schemas import NodeType, WorkflowInfo, WorkflowNode
7
+ from ..workspace import iter_workspace_files
8
+
9
+
10
+ def _strip_inline_comment(line: str) -> str:
11
+ """Drop everything from the first ``#`` (comment marker) to end of line."""
12
+ idx = line.find("#")
13
+ return line if idx < 0 else line[:idx]
14
+
15
+
16
+ def _token_present(text: str, needle: str) -> bool:
17
+ """True if *needle* occurs in *text* as a package-name token.
18
+
19
+ Hardened against substring false positives:
20
+ - comments (``#`` to end-of-line) are stripped per line, so a commented-out
21
+ dependency or import never counts as evidence;
22
+ - a match must not be flanked by an alphanumeric character on either side,
23
+ so ``agno`` matches ``agno>=1.0`` and ``crewai-tools`` but NOT
24
+ ``diagnostics`` / ``agnostic``.
25
+
26
+ Inputs are expected to be already lower-cased.
27
+ """
28
+ nlen = len(needle)
29
+ for raw_line in text.splitlines():
30
+ line = _strip_inline_comment(raw_line)
31
+ start = 0
32
+ while True:
33
+ i = line.find(needle, start)
34
+ if i < 0:
35
+ break
36
+ before = line[i - 1] if i > 0 else ""
37
+ after = line[i + nlen] if i + nlen < len(line) else ""
38
+ if not (before.isalnum() or after.isalnum()):
39
+ return True
40
+ start = i + 1
41
+ return False
42
+
43
+
44
+ def dependency_evidence(workspace: Path, needles: tuple[str, ...]) -> tuple[float, list[str]]:
45
+ score = 0.0
46
+ evidence: list[str] = []
47
+ for req_file in ("pyproject.toml", "requirements.txt", "requirements-dev.txt"):
48
+ path = workspace / req_file
49
+ if not path.exists():
50
+ continue
51
+ try:
52
+ text = path.read_text(errors="ignore").lower()
53
+ except OSError:
54
+ continue
55
+ for needle in needles:
56
+ if _token_present(text, needle):
57
+ evidence.append(f"{needle} in {req_file}")
58
+ score += 0.8
59
+ break
60
+ return min(score, 1.0), evidence
61
+
62
+
63
+ def import_evidence(workspace: Path, needles: tuple[str, ...]) -> tuple[float, list[str]]:
64
+ score = 0.0
65
+ evidence: list[str] = []
66
+ for py_file in itertools.islice(iter_workspace_files(workspace, (".py",)), 40):
67
+ try:
68
+ text = py_file.read_text(errors="ignore").lower()
69
+ except OSError:
70
+ continue
71
+ if any(_token_present(text, needle) for needle in needles):
72
+ evidence.append(f"import in {py_file.name}")
73
+ score += 0.6
74
+ break
75
+ return min(score, 1.0), evidence
76
+
77
+
78
+ def static_workflow(
79
+ runtime: str, name: str, workspace: Path, evidence: list[str]
80
+ ) -> list[WorkflowInfo]:
81
+ source = evidence[0] if evidence else None
82
+ return [
83
+ WorkflowInfo(
84
+ id=f"wf-{runtime}-static",
85
+ name=f"{name} static export",
86
+ runtime=runtime,
87
+ source_file=source,
88
+ nodes=[WorkflowNode(id="runtime", label=name, type=NodeType.AGENT)],
89
+ metadata={"workspace": str(workspace), "can_run": False, "export_mode": "static"},
90
+ )
91
+ ]
File without changes
@@ -0,0 +1,23 @@
1
+ """Detect AG2 (AutoGen) projects in a workspace."""
2
+ from __future__ import annotations
3
+
4
+ import pathlib
5
+ import re
6
+
7
+ _PATTERNS = [re.compile(r"\bfrom\s+autogen\b"), re.compile(r"\bGroupChatManager\b")]
8
+
9
+
10
+ def is_ag2_workspace(workspace: pathlib.Path) -> bool:
11
+ py = (workspace / "pyproject.toml")
12
+ if py.exists() and "autogen" in py.read_text(errors="ignore").lower():
13
+ return True
14
+ for p in workspace.rglob("*.py"):
15
+ if any(part in {".venv", "site-packages"} for part in p.parts):
16
+ continue
17
+ try:
18
+ src = p.read_text(errors="ignore")
19
+ except OSError:
20
+ continue
21
+ if any(pat.search(src) for pat in _PATTERNS):
22
+ return True
23
+ return False