jaato-server 0.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1357) hide show
  1. jaato_embedded/__init__.py +15 -0
  2. jaato_embedded/client.py +1094 -0
  3. jaato_embedded/permission.py +118 -0
  4. jaato_server-0.7.0.dist-info/METADATA +1252 -0
  5. jaato_server-0.7.0.dist-info/RECORD +1357 -0
  6. jaato_server-0.7.0.dist-info/WHEEL +5 -0
  7. jaato_server-0.7.0.dist-info/entry_points.txt +32 -0
  8. jaato_server-0.7.0.dist-info/top_level.txt +3 -0
  9. server/__init__.py +108 -0
  10. server/__main__.py +2043 -0
  11. server/apparmor.py +3057 -0
  12. server/cgroups.py +552 -0
  13. server/client_tools.py +164 -0
  14. server/command_router.py +2203 -0
  15. server/core.py +6991 -0
  16. server/egress_proxy/__init__.py +32 -0
  17. server/egress_proxy/config.py +145 -0
  18. server/egress_proxy/errors.py +20 -0
  19. server/egress_proxy/manager.py +86 -0
  20. server/egress_proxy/nft.py +212 -0
  21. server/egress_proxy/proxy.py +280 -0
  22. server/egress_proxy/tests/__init__.py +0 -0
  23. server/egress_proxy/tests/test_config.py +90 -0
  24. server/egress_proxy/tests/test_manager.py +76 -0
  25. server/egress_proxy/tests/test_nft.py +189 -0
  26. server/egress_proxy/tests/test_proxy.py +178 -0
  27. server/egress_proxy/tests/test_wireup.py +209 -0
  28. server/egress_proxy/wireup.py +194 -0
  29. server/env_report.py +70 -0
  30. server/event_sink.py +139 -0
  31. server/health_check.py +111 -0
  32. server/ipc.py +1219 -0
  33. server/loop_watchdog.py +347 -0
  34. server/revive_policy.py +253 -0
  35. server/runner/__init__.py +20 -0
  36. server/runner/__main__.py +627 -0
  37. server/runner/bootstrap.py +195 -0
  38. server/runner/cli_runner.py +208 -0
  39. server/runner/echo_tool.py +30 -0
  40. server/runner/envelope.py +437 -0
  41. server/runner/json_codec.py +127 -0
  42. server/runner/rpc.py +5723 -0
  43. server/runner/rpc_client.py +435 -0
  44. server/runner/sanitize.py +85 -0
  45. server/runner/session.py +1386 -0
  46. server/runner/slot_plugins.py +374 -0
  47. server/runner/tests/__init__.py +0 -0
  48. server/runner/tests/conftest.py +87 -0
  49. server/runner/tests/test_bidirectional_rpc.py +314 -0
  50. server/runner/tests/test_bootstrap.py +194 -0
  51. server/runner/tests/test_cli_runner.py +226 -0
  52. server/runner/tests/test_client_tools_injection.py +161 -0
  53. server/runner/tests/test_description_callback_bridge_phase_4_4.py +331 -0
  54. server/runner/tests/test_envelope.py +143 -0
  55. server/runner/tests/test_notification_frame_protocol.py +408 -0
  56. server/runner/tests/test_post_turn_forwarding_on_cancel.py +151 -0
  57. server/runner/tests/test_pre_step6_toolbar_coherence.py +299 -0
  58. server/runner/tests/test_rendered_system_instruction_rpc.py +138 -0
  59. server/runner/tests/test_rpc_client_spawn_isolated_runner.py +316 -0
  60. server/runner/tests/test_rpc_lane_classification.py +205 -0
  61. server/runner/tests/test_rpc_protocol.py +530 -0
  62. server/runner/tests/test_runner_configure_plugins_path_d.py +533 -0
  63. server/runner/tests/test_runner_rpc_bootstrap_main_thread.py +250 -0
  64. server/runner/tests/test_runner_rpc_client_wiring_step7_2.py +243 -0
  65. server/runner/tests/test_runner_runtime_connect_path_c.py +345 -0
  66. server/runner/tests/test_runner_session_apparmor_child_install.py +434 -0
  67. server/runner/tests/test_runner_session_host.py +345 -0
  68. server/runner/tests/test_runner_session_model_tiers.py +129 -0
  69. server/runner/tests/test_runner_session_self_confine_5a.py +238 -0
  70. server/runner/tests/test_runner_session_tools_empty.py +138 -0
  71. server/runner/tests/test_runner_session_workspace_env.py +260 -0
  72. server/runner/tests/test_runner_workspace_context.py +63 -0
  73. server/runner/tests/test_sanitize.py +201 -0
  74. server/runner/tests/test_session_append_history_message_rpc.py +358 -0
  75. server/runner/tests/test_session_bootstrap_rpc.py +301 -0
  76. server/runner/tests/test_session_config_rpc.py +253 -0
  77. server/runner/tests/test_session_dispatch_lifecycle_e2e.py +276 -0
  78. server/runner/tests/test_session_end_rpc.py +318 -0
  79. server/runner/tests/test_session_execute_user_command_rpc.py +519 -0
  80. server/runner/tests/test_session_executor_route.py +302 -0
  81. server/runner/tests/test_session_get_all_state_rpc.py +267 -0
  82. server/runner/tests/test_session_get_auth_info_rpc.py +370 -0
  83. server/runner/tests/test_session_get_context_limit_rpc.py +218 -0
  84. server/runner/tests/test_session_get_model_completions_rpc.py +407 -0
  85. server/runner/tests/test_session_get_tool_schemas_rpc.py +486 -0
  86. server/runner/tests/test_session_get_user_commands_rpc.py +393 -0
  87. server/runner/tests/test_session_health_check.py +222 -0
  88. server/runner/tests/test_session_history_rpc.py +373 -0
  89. server/runner/tests/test_session_inject_prompt_rpc.py +419 -0
  90. server/runner/tests/test_session_method_wrappers_e2e.py +329 -0
  91. server/runner/tests/test_session_presentation_context_rpc.py +196 -0
  92. server/runner/tests/test_session_replay_messages_rpc.py +404 -0
  93. server/runner/tests/test_session_reset_rpc.py +180 -0
  94. server/runner/tests/test_session_resolve_fork_point_rpc.py +465 -0
  95. server/runner/tests/test_session_restore_conversation_budget_rpc.py +410 -0
  96. server/runner/tests/test_session_restore_turn_accounting_rpc.py +384 -0
  97. server/runner/tests/test_session_send_message_notification_emit.py +716 -0
  98. server/runner/tests/test_session_send_message_rpc.py +640 -0
  99. server/runner/tests/test_session_set_initial_history_rpc.py +405 -0
  100. server/runner/tests/test_session_set_parallel_tools_override_rpc.py +305 -0
  101. server/runner/tests/test_session_set_reference_authorizer_rpc.py +325 -0
  102. server/runner/tests/test_session_shutdown_rpc.py +277 -0
  103. server/runner/tests/test_session_snapshot_conversation_budget_rpc.py +382 -0
  104. server/runner/tests/test_session_snapshot_instruction_budget_rpc.py +353 -0
  105. server/runner/tests/test_session_state_rpc.py +398 -0
  106. server/runner/tests/test_session_try_completion_nudge_rpc.py +451 -0
  107. server/runner/tests/test_session_try_drain_pending_user_rpc.py +362 -0
  108. server/runner/tests/test_session_turn_accounting_rpc.py +161 -0
  109. server/runner/tests/test_shim_agent_completed_forward.py +237 -0
  110. server/runner/tests/test_shim_remaining_hooks_forward.py +296 -0
  111. server/runner/tests/test_slot_scoped_plugin_carry.py +454 -0
  112. server/runner/tool_executor.py +85 -0
  113. server/runner_pool.py +1072 -0
  114. server/runner_rpc_client.py +2855 -0
  115. server/runner_rpc_handlers/__init__.py +18 -0
  116. server/runner_rpc_handlers/apparmor_fragment.py +176 -0
  117. server/runner_rpc_handlers/clarification_relay.py +210 -0
  118. server/runner_rpc_handlers/daemon_plugin_execute.py +248 -0
  119. server/runner_rpc_handlers/profile_payload_schema.py +399 -0
  120. server/runner_rpc_handlers/prompt_operator.py +282 -0
  121. server/runner_rpc_handlers/spawn_isolated_runner.py +454 -0
  122. server/runner_rpc_handlers/sub_profile_tightenings_schema.py +197 -0
  123. server/runner_rpc_handlers/tests/__init__.py +0 -0
  124. server/runner_rpc_handlers/tests/test_apparmor_fragment.py +341 -0
  125. server/runner_rpc_handlers/tests/test_clarification_relay.py +135 -0
  126. server/runner_rpc_handlers/tests/test_daemon_plugin_execute.py +308 -0
  127. server/runner_rpc_handlers/tests/test_permission_input_mode_emit_path_j.py +363 -0
  128. server/runner_rpc_handlers/tests/test_profile_payload_schema.py +466 -0
  129. server/runner_rpc_handlers/tests/test_prompt_operator.py +443 -0
  130. server/runner_rpc_handlers/tests/test_spawn_isolated_runner.py +588 -0
  131. server/runner_rpc_handlers/tests/test_sub_profile_tightenings_schema.py +368 -0
  132. server/runner_rpc_server.py +231 -0
  133. server/runner_spawn.py +1031 -0
  134. server/runner_spawner.py +389 -0
  135. server/runner_template.py +477 -0
  136. server/session_logging.py +353 -0
  137. server/session_manager.py +11730 -0
  138. server/session_workspace_index.py +173 -0
  139. server/subagent_id.py +75 -0
  140. server/test_client.py +371 -0
  141. server/test_client_disconnect_routing.py +47 -0
  142. server/test_health_check.py +136 -0
  143. server/test_outbound_event_transformers.py +151 -0
  144. server/test_pre_initialize_hooks.py +206 -0
  145. server/test_runner_rpc_client.py +287 -0
  146. server/test_sdk_parity_handlers.py +730 -0
  147. server/test_session_manager_routing.py +385 -0
  148. server/test_stage_files_request.py +369 -0
  149. server/test_staged_files.py +144 -0
  150. server/test_websocket_auth.py +188 -0
  151. server/test_workspace_command.py +256 -0
  152. server/test_workspace_monitor_sandbox.py +706 -0
  153. server/tests/__init__.py +0 -0
  154. server/tests/test_a_reused_slot_carries_nothing_over.py +169 -0
  155. server/tests/test_agent_created_bootstrap_path_i.py +452 -0
  156. server/tests/test_agent_error_event.py +303 -0
  157. server/tests/test_agent_params_passdown_phase4d.py +150 -0
  158. server/tests/test_always_spawn_runner.py +408 -0
  159. server/tests/test_an_attachment_is_content.py +265 -0
  160. server/tests/test_apparmor_session_hook_os_scope.py +62 -0
  161. server/tests/test_attach_index_fallback.py +91 -0
  162. server/tests/test_attach_unload_race_guard.py +56 -0
  163. server/tests/test_bootstrap_failure_emits_terminated.py +203 -0
  164. server/tests/test_bootstrap_helper.py +569 -0
  165. server/tests/test_bootstrap_partition.py +225 -0
  166. server/tests/test_budget_ceiling_survives_reload.py +122 -0
  167. server/tests/test_budget_refusal_terminal_event.py +156 -0
  168. server/tests/test_budget_restore_honours_runner.py +76 -0
  169. server/tests/test_budget_usage_persistence_wiring.py +187 -0
  170. server/tests/test_build_session_envelope.py +790 -0
  171. server/tests/test_build_session_envelope_profileless_fallback.py +219 -0
  172. server/tests/test_bus_event_payload_hoist.py +93 -0
  173. server/tests/test_cascade_as_client_phase1.py +1232 -0
  174. server/tests/test_cascade_as_client_phase2.py +305 -0
  175. server/tests/test_cascade_budget_registry.py +273 -0
  176. server/tests/test_cascade_budget_rpc.py +134 -0
  177. server/tests/test_cascade_cancel.py +330 -0
  178. server/tests/test_cascade_membership_survives_reload.py +141 -0
  179. server/tests/test_cascade_observer_dedup.py +149 -0
  180. server/tests/test_cascade_teardown_e2e.py +321 -0
  181. server/tests/test_cascade_teardown_isolated.py +327 -0
  182. server/tests/test_chat_replay_gate.py +55 -0
  183. server/tests/test_clarification_batch_answers_route.py +106 -0
  184. server/tests/test_client_tools_shared.py +104 -0
  185. server/tests/test_construct_and_initialize_server.py +377 -0
  186. server/tests/test_construction_refactor_645d.py +313 -0
  187. server/tests/test_create_headless_session_cascade.py +84 -0
  188. server/tests/test_create_registry_and_discover.py +108 -0
  189. server/tests/test_disk_restore_defer_and_flush.py +220 -0
  190. server/tests/test_dispatch_bootstrap_envelope.py +141 -0
  191. server/tests/test_egress_strict_denies_spawn.py +62 -0
  192. server/tests/test_env_report.py +37 -0
  193. server/tests/test_envelope_carries_budget_control.py +183 -0
  194. server/tests/test_envelope_session_env_non_leakage.py +254 -0
  195. server/tests/test_ephemeral_headless_shim.py +221 -0
  196. server/tests/test_existing_rpc_migration_645b.py +306 -0
  197. server/tests/test_fork_budget_params.py +165 -0
  198. server/tests/test_forward_subagent_event.py +132 -0
  199. server/tests/test_gc_lifecycle_events.py +177 -0
  200. server/tests/test_get_history_runner_fetch.py +97 -0
  201. server/tests/test_get_persisted_history.py +39 -0
  202. server/tests/test_get_runtime_migration_645a.py +138 -0
  203. server/tests/test_history_answers_or_errors.py +127 -0
  204. server/tests/test_ipc_apparmor_provision.py +733 -0
  205. server/tests/test_ipc_bootstrap_dispatch_path_b.py +228 -0
  206. server/tests/test_isolated_subagent_integration.py +330 -0
  207. server/tests/test_jaato_server_clear_history_forwards.py +124 -0
  208. server/tests/test_jaato_server_set_terminal_width_forwards.py +123 -0
  209. server/tests/test_jaato_server_shutdown_calls_session_shutdown.py +185 -0
  210. server/tests/test_jaato_server_stop_forwards.py +117 -0
  211. server/tests/test_loop_cannot_deadlock_on_itself.py +201 -0
  212. server/tests/test_loop_watchdog.py +452 -0
  213. server/tests/test_no_unresolved_global_names.py +97 -0
  214. server/tests/test_nudge_exhaust_terminal_events.py +186 -0
  215. server/tests/test_permission_resolved_event_identity_859.py +136 -0
  216. server/tests/test_phase3_apparmor_transitions.py +321 -0
  217. server/tests/test_plugin_configs_passdown_phase4c.py +343 -0
  218. server/tests/test_pool_cascade_sharing.py +634 -0
  219. server/tests/test_pool_telemetry_5d.py +209 -0
  220. server/tests/test_pool_watchdog_5b.py +281 -0
  221. server/tests/test_prompt_help_turn_completes.py +113 -0
  222. server/tests/test_prompt_operator_wiring_step7_1.py +278 -0
  223. server/tests/test_provider_binding_follows_the_tier.py +222 -0
  224. server/tests/test_reactor_daemon_wide_bus.py +58 -0
  225. server/tests/test_resolve_profile_env_overlay.py +351 -0
  226. server/tests/test_resolve_restore_config_root.py +29 -0
  227. server/tests/test_resolve_session_env_phase4.py +302 -0
  228. server/tests/test_respond_to_permission_routing_step7_3.py +354 -0
  229. server/tests/test_resume_session.py +40 -0
  230. server/tests/test_revive_restores_persisted_state.py +478 -0
  231. server/tests/test_rpc_bytes_wire_encoding.py +403 -0
  232. server/tests/test_rpc_client_slot_reuse.py +135 -0
  233. server/tests/test_runner_cgroup_attach_7d.py +292 -0
  234. server/tests/test_runner_ready_gate.py +124 -0
  235. server/tests/test_runner_session_tmpdir.py +151 -0
  236. server/tests/test_runner_spawn.py +679 -0
  237. server/tests/test_runner_template.py +525 -0
  238. server/tests/test_save_reentrancy_path_h.py +404 -0
  239. server/tests/test_save_serializes_per_session.py +142 -0
  240. server/tests/test_seat_flip_complete_645e.py +246 -0
  241. server/tests/test_send_message_active_turn_path_e.py +490 -0
  242. server/tests/test_send_message_seat_flip_643b.py +706 -0
  243. server/tests/test_send_message_to_session.py +38 -0
  244. server/tests/test_session_cascade_driver_id_stamp.py +75 -0
  245. server/tests/test_session_id_allocation_race.py +110 -0
  246. server/tests/test_session_terminated_bus_bridge.py +118 -0
  247. server/tests/test_session_wake.py +345 -0
  248. server/tests/test_session_workspace_index.py +128 -0
  249. server/tests/test_set_session_state_for_session.py +34 -0
  250. server/tests/test_sibling_name_addressing.py +140 -0
  251. server/tests/test_sibling_name_refusal_is_observable.py +94 -0
  252. server/tests/test_sibling_roster.py +215 -0
  253. server/tests/test_slot_settled_bus_bridge.py +154 -0
  254. server/tests/test_spawn_isolated_runner_helper.py +1250 -0
  255. server/tests/test_spawn_session_runner_always_bootstraps.py +178 -0
  256. server/tests/test_stash_does_not_overwrite.py +83 -0
  257. server/tests/test_stash_fix_is_observable.py +115 -0
  258. server/tests/test_step7_snapshot_regression_fix.py +279 -0
  259. server/tests/test_stop_orphan_runner_reaper.py +211 -0
  260. server/tests/test_stop_socket_fallback.py +44 -0
  261. server/tests/test_streaming_response_path_f.py +481 -0
  262. server/tests/test_subagent_id_validation.py +140 -0
  263. server/tests/test_template_ready_handshake_5c.py +216 -0
  264. server/tests/test_the_heal_path_says_what_it_did.py +327 -0
  265. server/tests/test_the_manager_lock_is_a_dict_guard.py +183 -0
  266. server/tests/test_tiers_only_every_producer.py +118 -0
  267. server/tests/test_tiers_only_profile_bootstraps.py +181 -0
  268. server/tests/test_timeout_says_which_layer.py +153 -0
  269. server/tests/test_tool_id_mappings_offloop_gate.py +42 -0
  270. server/tests/test_transport_timeout_does_not_kill_the_session.py +176 -0
  271. server/tests/test_wake_bind_commands.py +135 -0
  272. server/tests/test_wake_binding_registry.py +255 -0
  273. server/tests/test_wake_ingress.py +233 -0
  274. server/tests/test_wake_verify.py +133 -0
  275. server/tests/test_wiring_deletions_644.py +184 -0
  276. server/tests/test_ws_always_spawn_runner.py +379 -0
  277. server/tests/test_ws_require_apparmor.py +64 -0
  278. server/wake_binding_registry.py +349 -0
  279. server/wake_ingress.py +365 -0
  280. server/wake_verify.py +116 -0
  281. server/websocket.py +2808 -0
  282. server/workspace_command.py +243 -0
  283. server/workspace_manager.py +530 -0
  284. server/workspace_monitor.py +794 -0
  285. server/workspace_provisioner.py +418 -0
  286. shared/__init__.py +117 -0
  287. shared/ai_tool_runner.py +1499 -0
  288. shared/app_identity.py +446 -0
  289. shared/atomic_write.py +140 -0
  290. shared/bootstrap_timing.py +233 -0
  291. shared/budget_control.py +989 -0
  292. shared/change_tools.py +59 -0
  293. shared/client_commands.py +302 -0
  294. shared/command_analysis.py +608 -0
  295. shared/completion_nudge.py +123 -0
  296. shared/completion_processors.py +769 -0
  297. shared/completion_schema_loader.py +186 -0
  298. shared/config_resolver.py +228 -0
  299. shared/console_encoding.py +66 -0
  300. shared/dynamic_instructions.py +403 -0
  301. shared/env_scope.py +924 -0
  302. shared/event_bus.py +376 -0
  303. shared/event_bus_tools.py +493 -0
  304. shared/framing.py +161 -0
  305. shared/gc_support.py +309 -0
  306. shared/http/__init__.py +76 -0
  307. shared/http/proxy.py +706 -0
  308. shared/instruction_budget.py +522 -0
  309. shared/instruction_budget_builder.py +367 -0
  310. shared/instruction_suppression.py +118 -0
  311. shared/instruction_token_cache.py +72 -0
  312. shared/jaato_client.py +1169 -0
  313. shared/jaato_runtime.py +1951 -0
  314. shared/jaato_session.py +12644 -0
  315. shared/lifecycle_tools.py +1849 -0
  316. shared/mcp_context_manager.py +496 -0
  317. shared/message_delivery.py +150 -0
  318. shared/message_queue.py +358 -0
  319. shared/model_tiers.py +1152 -0
  320. shared/path_utils.py +297 -0
  321. shared/plugins/__init__.py +58 -0
  322. shared/plugins/anthropic_auth/__init__.py +15 -0
  323. shared/plugins/anthropic_auth/plugin.py +425 -0
  324. shared/plugins/antigravity_auth/__init__.py +23 -0
  325. shared/plugins/antigravity_auth/plugin.py +496 -0
  326. shared/plugins/artifact_tracker/__init__.py +52 -0
  327. shared/plugins/artifact_tracker/models.py +285 -0
  328. shared/plugins/artifact_tracker/plugin.py +1514 -0
  329. shared/plugins/artifact_tracker/tests/__init__.py +0 -0
  330. shared/plugins/artifact_tracker/tests/test_plugin.py +934 -0
  331. shared/plugins/ast_search/__init__.py +36 -0
  332. shared/plugins/ast_search/plugin.py +1120 -0
  333. shared/plugins/ast_search/tests/__init__.py +1 -0
  334. shared/plugins/ast_search/tests/test_plugin.py +780 -0
  335. shared/plugins/ast_search/tests/test_symlink_containment.py +212 -0
  336. shared/plugins/background/__init__.py +59 -0
  337. shared/plugins/background/mixin.py +864 -0
  338. shared/plugins/background/plugin.py +623 -0
  339. shared/plugins/background/protocol.py +433 -0
  340. shared/plugins/background/tests/__init__.py +1 -0
  341. shared/plugins/background/tests/test_auto_background.py +569 -0
  342. shared/plugins/background/tests/test_mixin.py +641 -0
  343. shared/plugins/background/tests/test_plugin.py +719 -0
  344. shared/plugins/background/tests/test_protocol.py +176 -0
  345. shared/plugins/background/tests/test_registry_integration.py +181 -0
  346. shared/plugins/bundle/__init__.py +18 -0
  347. shared/plugins/bundle/plugin.py +1610 -0
  348. shared/plugins/bundle/tests/__init__.py +0 -0
  349. shared/plugins/bundle/tests/test_plugin.py +903 -0
  350. shared/plugins/bundle_common/__init__.py +28 -0
  351. shared/plugins/bundle_common/bundle.py +651 -0
  352. shared/plugins/bundle_common/handler.py +401 -0
  353. shared/plugins/bundle_common/pack.py +490 -0
  354. shared/plugins/bundle_common/tests/__init__.py +0 -0
  355. shared/plugins/bundle_common/tests/test_handler.py +198 -0
  356. shared/plugins/bundle_common/tests/test_pack_unpack.py +557 -0
  357. shared/plugins/bundle_common/unpack.py +511 -0
  358. shared/plugins/cache/__init__.py +136 -0
  359. shared/plugins/cache/base.py +146 -0
  360. shared/plugins/cache/tests/__init__.py +0 -0
  361. shared/plugins/cache/tests/test_protocol.py +37 -0
  362. shared/plugins/cache_anthropic/__init__.py +12 -0
  363. shared/plugins/cache_anthropic/plugin.py +602 -0
  364. shared/plugins/cache_anthropic/tests/__init__.py +0 -0
  365. shared/plugins/cache_anthropic/tests/test_plugin.py +428 -0
  366. shared/plugins/cache_google_genai/__init__.py +19 -0
  367. shared/plugins/cache_google_genai/plugin.py +561 -0
  368. shared/plugins/cache_google_genai/tests/__init__.py +0 -0
  369. shared/plugins/cache_google_genai/tests/test_plugin.py +772 -0
  370. shared/plugins/cache_zhipuai/__init__.py +13 -0
  371. shared/plugins/cache_zhipuai/plugin.py +228 -0
  372. shared/plugins/cache_zhipuai/tests/__init__.py +0 -0
  373. shared/plugins/cache_zhipuai/tests/test_plugin.py +189 -0
  374. shared/plugins/calculator/__init__.py +14 -0
  375. shared/plugins/calculator/plugin.py +424 -0
  376. shared/plugins/clarification/__init__.py +42 -0
  377. shared/plugins/clarification/channels.py +1020 -0
  378. shared/plugins/clarification/models.py +155 -0
  379. shared/plugins/clarification/plugin.py +667 -0
  380. shared/plugins/clarification/tests/__init__.py +1 -0
  381. shared/plugins/clarification/tests/test_channels.py +456 -0
  382. shared/plugins/clarification/tests/test_models.py +347 -0
  383. shared/plugins/clarification/tests/test_plugin.py +362 -0
  384. shared/plugins/clarification/tests/test_registry_integration.py +126 -0
  385. shared/plugins/clarification/tests/test_runner_rpc_channel.py +108 -0
  386. shared/plugins/cli/__init__.py +16 -0
  387. shared/plugins/cli/plugin.py +1601 -0
  388. shared/plugins/cli/tests/__init__.py +1 -0
  389. shared/plugins/cli/tests/test_plugin.py +1123 -0
  390. shared/plugins/cli/tests/test_registry_integration.py +277 -0
  391. shared/plugins/cli/tests/test_runner_stub.py +204 -0
  392. shared/plugins/cli/tests/test_secret_scrub_default.py +75 -0
  393. shared/plugins/code_block_formatter/__init__.py +6 -0
  394. shared/plugins/code_block_formatter/plugin.py +311 -0
  395. shared/plugins/code_block_formatter/tests/__init__.py +0 -0
  396. shared/plugins/code_block_formatter/tests/test_fence_detection.py +151 -0
  397. shared/plugins/code_block_formatter/tests/test_semantic_rendering.py +110 -0
  398. shared/plugins/code_validation_formatter/__init__.py +27 -0
  399. shared/plugins/code_validation_formatter/plugin.py +544 -0
  400. shared/plugins/code_validation_formatter/tests/__init__.py +0 -0
  401. shared/plugins/code_validation_formatter/tests/test_excerpt_detection.py +169 -0
  402. shared/plugins/code_validation_formatter/tests/test_feedback.py +90 -0
  403. shared/plugins/daemon_forwarding.py +267 -0
  404. shared/plugins/diff_formatter/__init__.py +49 -0
  405. shared/plugins/diff_formatter/box_drawing.py +321 -0
  406. shared/plugins/diff_formatter/parser.py +301 -0
  407. shared/plugins/diff_formatter/plugin.py +411 -0
  408. shared/plugins/diff_formatter/renderers/__init__.py +16 -0
  409. shared/plugins/diff_formatter/renderers/base.py +85 -0
  410. shared/plugins/diff_formatter/renderers/compact.py +382 -0
  411. shared/plugins/diff_formatter/renderers/side_by_side.py +582 -0
  412. shared/plugins/diff_formatter/renderers/unified.py +125 -0
  413. shared/plugins/diff_formatter/syntax_highlight.py +176 -0
  414. shared/plugins/diff_formatter/tests/__init__.py +2 -0
  415. shared/plugins/diff_formatter/tests/test_box_drawing.py +183 -0
  416. shared/plugins/diff_formatter/tests/test_parser.py +304 -0
  417. shared/plugins/diff_formatter/tests/test_plugin.py +403 -0
  418. shared/plugins/diff_formatter/tests/test_word_diff.py +152 -0
  419. shared/plugins/diff_formatter/word_diff.py +191 -0
  420. shared/plugins/enrichment_formatter.py +181 -0
  421. shared/plugins/entry_point_trust.py +385 -0
  422. shared/plugins/environment/__init__.py +18 -0
  423. shared/plugins/environment/plugin.py +752 -0
  424. shared/plugins/environment/tests/__init__.py +1 -0
  425. shared/plugins/environment/tests/conftest.py +21 -0
  426. shared/plugins/environment/tests/test_plugin.py +1017 -0
  427. shared/plugins/environment/tests/test_registry_integration.py +237 -0
  428. shared/plugins/file_edit/__init__.py +66 -0
  429. shared/plugins/file_edit/backup.py +888 -0
  430. shared/plugins/file_edit/diff_utils.py +261 -0
  431. shared/plugins/file_edit/edit_core.py +283 -0
  432. shared/plugins/file_edit/find_replace.py +408 -0
  433. shared/plugins/file_edit/git_eol.py +466 -0
  434. shared/plugins/file_edit/line_endings.py +203 -0
  435. shared/plugins/file_edit/multi_file.py +946 -0
  436. shared/plugins/file_edit/plugin.py +2437 -0
  437. shared/plugins/file_edit/tests/__init__.py +1 -0
  438. shared/plugins/file_edit/tests/test_backup.py +579 -0
  439. shared/plugins/file_edit/tests/test_diff_utils.py +276 -0
  440. shared/plugins/file_edit/tests/test_edit_core.py +296 -0
  441. shared/plugins/file_edit/tests/test_edit_span_cap.py +389 -0
  442. shared/plugins/file_edit/tests/test_ensure_gitignore.py +57 -0
  443. shared/plugins/file_edit/tests/test_line_endings.py +504 -0
  444. shared/plugins/file_edit/tests/test_multi_file.py +1061 -0
  445. shared/plugins/file_edit/tests/test_path_sandboxing.py +461 -0
  446. shared/plugins/file_edit/tests/test_plugin.py +1436 -0
  447. shared/plugins/file_edit/tests/test_registry_integration.py +392 -0
  448. shared/plugins/file_edit/tests/test_symlink_toctou.py +337 -0
  449. shared/plugins/filesystem_query/__init__.py +45 -0
  450. shared/plugins/filesystem_query/config_loader.py +443 -0
  451. shared/plugins/filesystem_query/plugin.py +1377 -0
  452. shared/plugins/filesystem_query/tests/__init__.py +1 -0
  453. shared/plugins/filesystem_query/tests/test_benchmarks.py +498 -0
  454. shared/plugins/filesystem_query/tests/test_config_loader.py +413 -0
  455. shared/plugins/filesystem_query/tests/test_plugin.py +954 -0
  456. shared/plugins/filesystem_query/tests/test_registry_integration.py +280 -0
  457. shared/plugins/filesystem_query/tests/test_symlink_containment.py +283 -0
  458. shared/plugins/formatter_pipeline/__init__.py +44 -0
  459. shared/plugins/formatter_pipeline/pipeline.py +282 -0
  460. shared/plugins/formatter_pipeline/protocol.py +205 -0
  461. shared/plugins/formatter_pipeline/registry.py +343 -0
  462. shared/plugins/formatter_pipeline/tests/__init__.py +1 -0
  463. shared/plugins/formatter_pipeline/tests/test_pipeline.py +233 -0
  464. shared/plugins/formatter_pipeline/tests/test_registry.py +321 -0
  465. shared/plugins/gc/__init__.py +329 -0
  466. shared/plugins/gc/base.py +326 -0
  467. shared/plugins/gc/tests/__init__.py +1 -0
  468. shared/plugins/gc/tests/test_dedup_tool_results.py +125 -0
  469. shared/plugins/gc/tests/test_hybrid.py +255 -0
  470. shared/plugins/gc/tests/test_summarize.py +188 -0
  471. shared/plugins/gc/tests/test_truncate.py +214 -0
  472. shared/plugins/gc/tests/test_utils.py +500 -0
  473. shared/plugins/gc/utils.py +842 -0
  474. shared/plugins/gc_budget/__init__.py +22 -0
  475. shared/plugins/gc_budget/plugin.py +936 -0
  476. shared/plugins/gc_budget/tests/__init__.py +0 -0
  477. shared/plugins/gc_budget/tests/test_budget_gc.py +1283 -0
  478. shared/plugins/gc_hybrid/__init__.py +29 -0
  479. shared/plugins/gc_hybrid/plugin.py +449 -0
  480. shared/plugins/gc_summarize/__init__.py +28 -0
  481. shared/plugins/gc_summarize/plugin.py +453 -0
  482. shared/plugins/gc_truncate/__init__.py +21 -0
  483. shared/plugins/gc_truncate/plugin.py +342 -0
  484. shared/plugins/github_auth/__init__.py +24 -0
  485. shared/plugins/github_auth/plugin.py +477 -0
  486. shared/plugins/hidden_content_filter/__init__.py +11 -0
  487. shared/plugins/hidden_content_filter/plugin.py +140 -0
  488. shared/plugins/inline_markdown_formatter/__init__.py +10 -0
  489. shared/plugins/inline_markdown_formatter/plugin.py +403 -0
  490. shared/plugins/inline_markdown_formatter/tests/__init__.py +0 -0
  491. shared/plugins/inline_markdown_formatter/tests/test_inline_markdown.py +349 -0
  492. shared/plugins/interactive_shell/__init__.py +32 -0
  493. shared/plugins/interactive_shell/ansi.py +54 -0
  494. shared/plugins/interactive_shell/plugin.py +1097 -0
  495. shared/plugins/interactive_shell/session.py +716 -0
  496. shared/plugins/interactive_shell/tests/__init__.py +0 -0
  497. shared/plugins/interactive_shell/tests/test_ansi.py +95 -0
  498. shared/plugins/interactive_shell/tests/test_plugin.py +395 -0
  499. shared/plugins/interactive_shell/tests/test_secret_scrub.py +91 -0
  500. shared/plugins/interactive_shell/tests/test_session.py +311 -0
  501. shared/plugins/introspection/__init__.py +36 -0
  502. shared/plugins/introspection/plugin.py +968 -0
  503. shared/plugins/introspection/tests/__init__.py +1 -0
  504. shared/plugins/introspection/tests/conftest.py +21 -0
  505. shared/plugins/introspection/tests/test_activation_is_described_where_it_happens.py +113 -0
  506. shared/plugins/introspection/tests/test_plugin.py +601 -0
  507. shared/plugins/introspection/tests/test_unknown_category_id_is_recoverable.py +136 -0
  508. shared/plugins/kimi_auth/__init__.py +16 -0
  509. shared/plugins/kimi_auth/plugin.py +378 -0
  510. shared/plugins/lsp/__init__.py +8 -0
  511. shared/plugins/lsp/lsp_client.py +1269 -0
  512. shared/plugins/lsp/plugin.py +4233 -0
  513. shared/plugins/lsp/tests/__init__.py +1 -0
  514. shared/plugins/lsp/tests/test_pdeathsig_spawn.py +62 -0
  515. shared/plugins/lsp/tests/test_phase4_cascade_lifecycle.py +243 -0
  516. shared/plugins/lsp/tests/test_plugin.py +3104 -0
  517. shared/plugins/lsp/tests/test_profile_declared_language_servers.py +288 -0
  518. shared/plugins/lsp/tests/test_slot_scoped_declaration.py +51 -0
  519. shared/plugins/lsp/tests/test_workspace_relative_paths.py +101 -0
  520. shared/plugins/mcp/__init__.py +16 -0
  521. shared/plugins/mcp/plugin.py +2117 -0
  522. shared/plugins/mcp/tests/__init__.py +1 -0
  523. shared/plugins/mcp/tests/test_plugin.py +832 -0
  524. shared/plugins/mcp/tests/test_registry_integration.py +227 -0
  525. shared/plugins/memory/__init__.py +25 -0
  526. shared/plugins/memory/indexer.py +338 -0
  527. shared/plugins/memory/models.py +140 -0
  528. shared/plugins/memory/plugin.py +1922 -0
  529. shared/plugins/memory/storage.py +502 -0
  530. shared/plugins/memory/test_standalone.py +135 -0
  531. shared/plugins/memory/tests/__init__.py +1 -0
  532. shared/plugins/memory/tests/test_allowed_scopes.py +62 -0
  533. shared/plugins/memory/tests/test_confined_init.py +46 -0
  534. shared/plugins/memory/tests/test_enrichment_surfaces.py +393 -0
  535. shared/plugins/memory/tests/test_list_tags_reports_the_raw_queue.py +122 -0
  536. shared/plugins/memory/tests/test_maturity_query_reaches_raw.py +124 -0
  537. shared/plugins/memory/tests/test_plugin.py +960 -0
  538. shared/plugins/memory/tests/test_reading_the_queue_does_not_empty_it.py +145 -0
  539. shared/plugins/memory/tests/test_stale_writeback_cannot_undo_decisions.py +160 -0
  540. shared/plugins/memory/tests/test_storage_layout.py +227 -0
  541. shared/plugins/mermaid_formatter/__init__.py +12 -0
  542. shared/plugins/mermaid_formatter/backends/__init__.py +85 -0
  543. shared/plugins/mermaid_formatter/backends/iterm.py +81 -0
  544. shared/plugins/mermaid_formatter/backends/kitty.py +94 -0
  545. shared/plugins/mermaid_formatter/backends/rich_pixels.py +106 -0
  546. shared/plugins/mermaid_formatter/backends/sixel.py +156 -0
  547. shared/plugins/mermaid_formatter/plugin.py +400 -0
  548. shared/plugins/mermaid_formatter/renderer.py +266 -0
  549. shared/plugins/mermaid_formatter/tests/__init__.py +0 -0
  550. shared/plugins/mermaid_formatter/tests/test_backends.py +191 -0
  551. shared/plugins/mermaid_formatter/tests/test_plugin.py +724 -0
  552. shared/plugins/mermaid_formatter/tests/test_renderer.py +384 -0
  553. shared/plugins/mimo_auth/__init__.py +16 -0
  554. shared/plugins/mimo_auth/plugin.py +377 -0
  555. shared/plugins/minimax_auth/__init__.py +16 -0
  556. shared/plugins/minimax_auth/plugin.py +378 -0
  557. shared/plugins/model_provider/__init__.py +289 -0
  558. shared/plugins/model_provider/_api_key_store.py +304 -0
  559. shared/plugins/model_provider/_attachments.py +503 -0
  560. shared/plugins/model_provider/_media_deltas.py +576 -0
  561. shared/plugins/model_provider/_openai_compat/__init__.py +16 -0
  562. shared/plugins/model_provider/_openai_compat/_lazy.py +47 -0
  563. shared/plugins/model_provider/_openai_compat/base.py +1210 -0
  564. shared/plugins/model_provider/_openai_compat/converters.py +648 -0
  565. shared/plugins/model_provider/_openai_compat/local_host.py +176 -0
  566. shared/plugins/model_provider/_prose_tools.py +370 -0
  567. shared/plugins/model_provider/anthropic/__init__.py +133 -0
  568. shared/plugins/model_provider/anthropic/converters.py +912 -0
  569. shared/plugins/model_provider/anthropic/env.py +96 -0
  570. shared/plugins/model_provider/anthropic/errors.py +182 -0
  571. shared/plugins/model_provider/anthropic/oauth.py +809 -0
  572. shared/plugins/model_provider/anthropic/provider.py +1766 -0
  573. shared/plugins/model_provider/anthropic/smoke/smoke_chat.py +117 -0
  574. shared/plugins/model_provider/anthropic/smoke/smoke_signal_completion.py +111 -0
  575. shared/plugins/model_provider/anthropic/smoke/smoke_tools.py +114 -0
  576. shared/plugins/model_provider/anthropic/tests/__init__.py +1 -0
  577. shared/plugins/model_provider/anthropic/tests/test_oauth_load.py +59 -0
  578. shared/plugins/model_provider/anthropic/tests/test_provider.py +1047 -0
  579. shared/plugins/model_provider/anthropic/tests/test_tool_choice_contract.py +39 -0
  580. shared/plugins/model_provider/antigravity/__init__.py +151 -0
  581. shared/plugins/model_provider/antigravity/constants.py +162 -0
  582. shared/plugins/model_provider/antigravity/converters.py +617 -0
  583. shared/plugins/model_provider/antigravity/env.py +136 -0
  584. shared/plugins/model_provider/antigravity/errors.py +146 -0
  585. shared/plugins/model_provider/antigravity/oauth.py +899 -0
  586. shared/plugins/model_provider/antigravity/provider.py +1104 -0
  587. shared/plugins/model_provider/antigravity/tests/__init__.py +1 -0
  588. shared/plugins/model_provider/antigravity/tests/test_provider.py +417 -0
  589. shared/plugins/model_provider/antigravity/tests/test_sampling_knobs.py +91 -0
  590. shared/plugins/model_provider/antigravity/tests/test_stream_cancel_close.py +74 -0
  591. shared/plugins/model_provider/azure_openai/__init__.py +132 -0
  592. shared/plugins/model_provider/azure_openai/auth.py +258 -0
  593. shared/plugins/model_provider/azure_openai/env.py +206 -0
  594. shared/plugins/model_provider/azure_openai/errors.py +205 -0
  595. shared/plugins/model_provider/azure_openai/provider.py +514 -0
  596. shared/plugins/model_provider/azure_openai/tests/__init__.py +0 -0
  597. shared/plugins/model_provider/azure_openai/tests/test_azure_openai_provider.py +383 -0
  598. shared/plugins/model_provider/base.py +1088 -0
  599. shared/plugins/model_provider/chrome_ai/__init__.py +164 -0
  600. shared/plugins/model_provider/chrome_ai/bridge.py +545 -0
  601. shared/plugins/model_provider/chrome_ai/cdp.py +315 -0
  602. shared/plugins/model_provider/chrome_ai/converters.py +100 -0
  603. shared/plugins/model_provider/chrome_ai/env.py +138 -0
  604. shared/plugins/model_provider/chrome_ai/errors.py +55 -0
  605. shared/plugins/model_provider/chrome_ai/provider.py +696 -0
  606. shared/plugins/model_provider/chrome_ai/smoke/smoke_chat.py +69 -0
  607. shared/plugins/model_provider/chrome_ai/tests/__init__.py +0 -0
  608. shared/plugins/model_provider/chrome_ai/tests/conftest.py +154 -0
  609. shared/plugins/model_provider/chrome_ai/tests/test_bridge.py +100 -0
  610. shared/plugins/model_provider/chrome_ai/tests/test_complete.py +236 -0
  611. shared/plugins/model_provider/chrome_ai/tests/test_converters.py +92 -0
  612. shared/plugins/model_provider/chrome_ai/tests/test_provider.py +278 -0
  613. shared/plugins/model_provider/chrome_ai/tooling.py +14 -0
  614. shared/plugins/model_provider/claude_cli/__init__.py +121 -0
  615. shared/plugins/model_provider/claude_cli/env.py +158 -0
  616. shared/plugins/model_provider/claude_cli/provider.py +1231 -0
  617. shared/plugins/model_provider/claude_cli/tests/__init__.py +0 -0
  618. shared/plugins/model_provider/claude_cli/tests/test_context_limit.py +21 -0
  619. shared/plugins/model_provider/claude_cli/types.py +626 -0
  620. shared/plugins/model_provider/conftest.py +162 -0
  621. shared/plugins/model_provider/doubleword/__init__.py +98 -0
  622. shared/plugins/model_provider/doubleword/auth.py +424 -0
  623. shared/plugins/model_provider/doubleword/env.py +205 -0
  624. shared/plugins/model_provider/doubleword/errors.py +234 -0
  625. shared/plugins/model_provider/doubleword/provider.py +496 -0
  626. shared/plugins/model_provider/doubleword/tests/__init__.py +0 -0
  627. shared/plugins/model_provider/doubleword/tests/test_auth.py +228 -0
  628. shared/plugins/model_provider/doubleword/tests/test_doubleword_provider.py +865 -0
  629. shared/plugins/model_provider/doubleword/tests/test_stream_cancel_close.py +104 -0
  630. shared/plugins/model_provider/doubleword/tests/test_tool_choice_mapping.py +43 -0
  631. shared/plugins/model_provider/echo/__init__.py +39 -0
  632. shared/plugins/model_provider/echo/provider.py +471 -0
  633. shared/plugins/model_provider/echo/tests/__init__.py +0 -0
  634. shared/plugins/model_provider/echo/tests/test_echo_provider.py +114 -0
  635. shared/plugins/model_provider/echo/tests/test_echo_reports_a_configured_spend.py +167 -0
  636. shared/plugins/model_provider/github_models/__init__.py +57 -0
  637. shared/plugins/model_provider/github_models/_lazy.py +98 -0
  638. shared/plugins/model_provider/github_models/converters.py +613 -0
  639. shared/plugins/model_provider/github_models/copilot_client.py +895 -0
  640. shared/plugins/model_provider/github_models/env.py +221 -0
  641. shared/plugins/model_provider/github_models/errors.py +444 -0
  642. shared/plugins/model_provider/github_models/oauth.py +965 -0
  643. shared/plugins/model_provider/github_models/provider.py +2228 -0
  644. shared/plugins/model_provider/github_models/smoke/smoke_chat.py +115 -0
  645. shared/plugins/model_provider/github_models/smoke/smoke_signal_completion.py +112 -0
  646. shared/plugins/model_provider/github_models/smoke/smoke_tools.py +114 -0
  647. shared/plugins/model_provider/github_models/tests/__init__.py +1 -0
  648. shared/plugins/model_provider/github_models/tests/test_converters.py +48 -0
  649. shared/plugins/model_provider/github_models/tests/test_oauth.py +213 -0
  650. shared/plugins/model_provider/github_models/tests/test_oauth_load.py +114 -0
  651. shared/plugins/model_provider/github_models/tests/test_provider.py +870 -0
  652. shared/plugins/model_provider/github_models/tests/test_sampling_knobs.py +93 -0
  653. shared/plugins/model_provider/github_models/tests/test_stream_cancel_close.py +107 -0
  654. shared/plugins/model_provider/google_genai/__init__.py +66 -0
  655. shared/plugins/model_provider/google_genai/_lazy.py +60 -0
  656. shared/plugins/model_provider/google_genai/converters.py +685 -0
  657. shared/plugins/model_provider/google_genai/env.py +264 -0
  658. shared/plugins/model_provider/google_genai/errors.py +307 -0
  659. shared/plugins/model_provider/google_genai/provider.py +1397 -0
  660. shared/plugins/model_provider/google_genai/tests/__init__.py +1 -0
  661. shared/plugins/model_provider/google_genai/tests/test_finish_reason_mapping.py +170 -0
  662. shared/plugins/model_provider/google_genai/tests/test_provider.py +991 -0
  663. shared/plugins/model_provider/google_genai/tests/test_sampling_knobs.py +106 -0
  664. shared/plugins/model_provider/kimi/__init__.py +110 -0
  665. shared/plugins/model_provider/kimi/auth.py +314 -0
  666. shared/plugins/model_provider/kimi/env.py +171 -0
  667. shared/plugins/model_provider/kimi/errors.py +199 -0
  668. shared/plugins/model_provider/kimi/provider.py +496 -0
  669. shared/plugins/model_provider/kimi/tests/__init__.py +0 -0
  670. shared/plugins/model_provider/kimi/tests/test_auth.py +140 -0
  671. shared/plugins/model_provider/kimi/tests/test_kimi_provider.py +345 -0
  672. shared/plugins/model_provider/kimi/tests/test_stream_cancel_close.py +55 -0
  673. shared/plugins/model_provider/lmstudio/__init__.py +95 -0
  674. shared/plugins/model_provider/lmstudio/env.py +63 -0
  675. shared/plugins/model_provider/lmstudio/errors.py +91 -0
  676. shared/plugins/model_provider/lmstudio/provider.py +285 -0
  677. shared/plugins/model_provider/lmstudio/smoke/smoke_chat.py +117 -0
  678. shared/plugins/model_provider/lmstudio/smoke/smoke_signal_completion.py +110 -0
  679. shared/plugins/model_provider/lmstudio/smoke/smoke_tools.py +114 -0
  680. shared/plugins/model_provider/lmstudio/tests/__init__.py +0 -0
  681. shared/plugins/model_provider/lmstudio/tests/test_provider.py +674 -0
  682. shared/plugins/model_provider/lmstudio/tests/test_stream_cancel_close.py +103 -0
  683. shared/plugins/model_provider/mimo/__init__.py +99 -0
  684. shared/plugins/model_provider/mimo/auth.py +314 -0
  685. shared/plugins/model_provider/mimo/env.py +171 -0
  686. shared/plugins/model_provider/mimo/errors.py +242 -0
  687. shared/plugins/model_provider/mimo/provider.py +430 -0
  688. shared/plugins/model_provider/mimo/tests/__init__.py +0 -0
  689. shared/plugins/model_provider/mimo/tests/test_auth.py +140 -0
  690. shared/plugins/model_provider/mimo/tests/test_mimo_provider.py +432 -0
  691. shared/plugins/model_provider/mimo/tests/test_stream_cancel_close.py +55 -0
  692. shared/plugins/model_provider/minimax/__init__.py +98 -0
  693. shared/plugins/model_provider/minimax/auth.py +314 -0
  694. shared/plugins/model_provider/minimax/env.py +171 -0
  695. shared/plugins/model_provider/minimax/errors.py +215 -0
  696. shared/plugins/model_provider/minimax/provider.py +495 -0
  697. shared/plugins/model_provider/minimax/tests/__init__.py +0 -0
  698. shared/plugins/model_provider/minimax/tests/test_auth.py +140 -0
  699. shared/plugins/model_provider/minimax/tests/test_minimax_provider.py +296 -0
  700. shared/plugins/model_provider/minimax/tests/test_stream_cancel_close.py +55 -0
  701. shared/plugins/model_provider/nebius/__init__.py +86 -0
  702. shared/plugins/model_provider/nebius/_lazy.py +47 -0
  703. shared/plugins/model_provider/nebius/auth.py +417 -0
  704. shared/plugins/model_provider/nebius/converters.py +570 -0
  705. shared/plugins/model_provider/nebius/env.py +196 -0
  706. shared/plugins/model_provider/nebius/errors.py +229 -0
  707. shared/plugins/model_provider/nebius/provider.py +390 -0
  708. shared/plugins/model_provider/nebius/tests/__init__.py +0 -0
  709. shared/plugins/model_provider/nebius/tests/test_auth.py +212 -0
  710. shared/plugins/model_provider/nebius/tests/test_caching.py +72 -0
  711. shared/plugins/model_provider/nebius/tests/test_nebius_provider.py +969 -0
  712. shared/plugins/model_provider/nebius/tests/test_stream_cancel_close.py +104 -0
  713. shared/plugins/model_provider/nebius/tests/test_tool_choice_mapping.py +43 -0
  714. shared/plugins/model_provider/nim/__init__.py +64 -0
  715. shared/plugins/model_provider/nim/auth.py +417 -0
  716. shared/plugins/model_provider/nim/env.py +167 -0
  717. shared/plugins/model_provider/nim/errors.py +229 -0
  718. shared/plugins/model_provider/nim/provider.py +240 -0
  719. shared/plugins/model_provider/nim/smoke/smoke_chat.py +117 -0
  720. shared/plugins/model_provider/nim/smoke/smoke_signal_completion.py +110 -0
  721. shared/plugins/model_provider/nim/smoke/smoke_tools.py +106 -0
  722. shared/plugins/model_provider/nim/tests/__init__.py +0 -0
  723. shared/plugins/model_provider/nim/tests/test_auth.py +212 -0
  724. shared/plugins/model_provider/nim/tests/test_nim_provider.py +688 -0
  725. shared/plugins/model_provider/nim/tests/test_stream_cancel_close.py +104 -0
  726. shared/plugins/model_provider/ollama/__init__.py +96 -0
  727. shared/plugins/model_provider/ollama/env.py +54 -0
  728. shared/plugins/model_provider/ollama/provider.py +455 -0
  729. shared/plugins/model_provider/ollama/smoke/smoke_chat.py +117 -0
  730. shared/plugins/model_provider/ollama/smoke/smoke_signal_completion.py +111 -0
  731. shared/plugins/model_provider/ollama/smoke/smoke_tools.py +106 -0
  732. shared/plugins/model_provider/ollama/tests/__init__.py +1 -0
  733. shared/plugins/model_provider/ollama/tests/test_env.py +58 -0
  734. shared/plugins/model_provider/ollama/tests/test_provider.py +387 -0
  735. shared/plugins/model_provider/ollama/tests/test_sampling_knobs.py +95 -0
  736. shared/plugins/model_provider/openai/__init__.py +151 -0
  737. shared/plugins/model_provider/openai/auth.py +235 -0
  738. shared/plugins/model_provider/openai/converters.py +96 -0
  739. shared/plugins/model_provider/openai/env.py +261 -0
  740. shared/plugins/model_provider/openai/errors.py +237 -0
  741. shared/plugins/model_provider/openai/provider.py +622 -0
  742. shared/plugins/model_provider/openai/responses.py +573 -0
  743. shared/plugins/model_provider/openai/responses_converters.py +410 -0
  744. shared/plugins/model_provider/openai/tests/__init__.py +0 -0
  745. shared/plugins/model_provider/openai/tests/test_openai_provider.py +394 -0
  746. shared/plugins/model_provider/openai/tests/test_responses_wire.py +606 -0
  747. shared/plugins/model_provider/openrouter/__init__.py +112 -0
  748. shared/plugins/model_provider/openrouter/_lazy.py +37 -0
  749. shared/plugins/model_provider/openrouter/auth.py +342 -0
  750. shared/plugins/model_provider/openrouter/cache.py +113 -0
  751. shared/plugins/model_provider/openrouter/converters.py +970 -0
  752. shared/plugins/model_provider/openrouter/env.py +291 -0
  753. shared/plugins/model_provider/openrouter/errors.py +316 -0
  754. shared/plugins/model_provider/openrouter/provider.py +2471 -0
  755. shared/plugins/model_provider/openrouter/smoke/smoke_chat.py +116 -0
  756. shared/plugins/model_provider/openrouter/smoke/smoke_prose_tool_calls.py +162 -0
  757. shared/plugins/model_provider/openrouter/smoke/smoke_signal_completion.py +111 -0
  758. shared/plugins/model_provider/openrouter/smoke/smoke_tools.py +106 -0
  759. shared/plugins/model_provider/openrouter/stall.py +146 -0
  760. shared/plugins/model_provider/openrouter/tests/__init__.py +0 -0
  761. shared/plugins/model_provider/openrouter/tests/test_auth.py +198 -0
  762. shared/plugins/model_provider/openrouter/tests/test_error_finish_native_reason.py +350 -0
  763. shared/plugins/model_provider/openrouter/tests/test_openrouter_provider.py +2364 -0
  764. shared/plugins/model_provider/openrouter/tests/test_prompt_caching.py +555 -0
  765. shared/plugins/model_provider/openrouter/tests/test_retry_after_from_body.py +111 -0
  766. shared/plugins/model_provider/openrouter/tests/test_session_id.py +125 -0
  767. shared/plugins/model_provider/openrouter/tests/test_stall_deadline.py +675 -0
  768. shared/plugins/model_provider/openrouter/tests/test_truncated_tool_call_finish.py +414 -0
  769. shared/plugins/model_provider/ovhcloud/__init__.py +95 -0
  770. shared/plugins/model_provider/ovhcloud/auth.py +420 -0
  771. shared/plugins/model_provider/ovhcloud/env.py +216 -0
  772. shared/plugins/model_provider/ovhcloud/errors.py +240 -0
  773. shared/plugins/model_provider/ovhcloud/provider.py +479 -0
  774. shared/plugins/model_provider/ovhcloud/tests/__init__.py +0 -0
  775. shared/plugins/model_provider/ovhcloud/tests/test_auth.py +225 -0
  776. shared/plugins/model_provider/ovhcloud/tests/test_ovhcloud_provider.py +834 -0
  777. shared/plugins/model_provider/ovhcloud/tests/test_stream_cancel_close.py +104 -0
  778. shared/plugins/model_provider/ovhcloud/tests/test_tool_choice_mapping.py +43 -0
  779. shared/plugins/model_provider/tensorrt_llm/__init__.py +96 -0
  780. shared/plugins/model_provider/tensorrt_llm/env.py +69 -0
  781. shared/plugins/model_provider/tensorrt_llm/errors.py +123 -0
  782. shared/plugins/model_provider/tensorrt_llm/provider.py +200 -0
  783. shared/plugins/model_provider/tensorrt_llm/smoke/smoke_chat.py +116 -0
  784. shared/plugins/model_provider/tensorrt_llm/smoke/smoke_signal_completion.py +111 -0
  785. shared/plugins/model_provider/tensorrt_llm/smoke/smoke_tools.py +106 -0
  786. shared/plugins/model_provider/tensorrt_llm/tests/__init__.py +0 -0
  787. shared/plugins/model_provider/tensorrt_llm/tests/test_provider.py +555 -0
  788. shared/plugins/model_provider/tensorrt_llm/tests/test_stream_cancel_close.py +105 -0
  789. shared/plugins/model_provider/tests/__init__.py +0 -0
  790. shared/plugins/model_provider/tests/test_attachment_mime_dispatch.py +463 -0
  791. shared/plugins/model_provider/tests/test_modalities.py +221 -0
  792. shared/plugins/model_provider/tests/test_profile_api_key_location.py +98 -0
  793. shared/plugins/model_provider/tests/test_prose_tool_calls_quirk.py +228 -0
  794. shared/plugins/model_provider/tests/test_prose_tools.py +260 -0
  795. shared/plugins/model_provider/tests/test_reasoning_replay.py +330 -0
  796. shared/plugins/model_provider/tests/test_trace_records_resolved_tool_name.py +250 -0
  797. shared/plugins/model_provider/triton/__init__.py +109 -0
  798. shared/plugins/model_provider/triton/env.py +125 -0
  799. shared/plugins/model_provider/triton/errors.py +156 -0
  800. shared/plugins/model_provider/triton/provider.py +292 -0
  801. shared/plugins/model_provider/triton/tests/__init__.py +0 -0
  802. shared/plugins/model_provider/triton/tests/test_provider.py +663 -0
  803. shared/plugins/model_provider/vllm/__init__.py +160 -0
  804. shared/plugins/model_provider/vllm/env.py +74 -0
  805. shared/plugins/model_provider/vllm/errors.py +118 -0
  806. shared/plugins/model_provider/vllm/provider.py +1152 -0
  807. shared/plugins/model_provider/vllm/smoke/smoke_chat.py +118 -0
  808. shared/plugins/model_provider/vllm/smoke/smoke_signal_completion.py +110 -0
  809. shared/plugins/model_provider/vllm/smoke/smoke_tools.py +113 -0
  810. shared/plugins/model_provider/vllm/tests/__init__.py +0 -0
  811. shared/plugins/model_provider/vllm/tests/test_coerce_typed_tool_args_quirk.py +336 -0
  812. shared/plugins/model_provider/vllm/tests/test_context_window_autodetect.py +192 -0
  813. shared/plugins/model_provider/vllm/tests/test_force_tool_choice_quirk.py +227 -0
  814. shared/plugins/model_provider/vllm/tests/test_parallel_tool_calls_knob.py +107 -0
  815. shared/plugins/model_provider/vllm/tests/test_provider.py +578 -0
  816. shared/plugins/model_provider/vllm/tests/test_sampling_knobs.py +80 -0
  817. shared/plugins/model_provider/vllm/tests/test_stream_cancel_close.py +139 -0
  818. shared/plugins/model_provider/zhipuai/__init__.py +155 -0
  819. shared/plugins/model_provider/zhipuai/auth.py +569 -0
  820. shared/plugins/model_provider/zhipuai/env.py +116 -0
  821. shared/plugins/model_provider/zhipuai/provider.py +725 -0
  822. shared/plugins/model_provider/zhipuai/tests/__init__.py +1 -0
  823. shared/plugins/model_provider/zhipuai/tests/test_auth.py +319 -0
  824. shared/plugins/model_provider/zhipuai/tests/test_env.py +129 -0
  825. shared/plugins/model_provider/zhipuai/tests/test_provider.py +770 -0
  826. shared/plugins/model_provider/zhipuai_openai/__init__.py +105 -0
  827. shared/plugins/model_provider/zhipuai_openai/env.py +160 -0
  828. shared/plugins/model_provider/zhipuai_openai/errors.py +194 -0
  829. shared/plugins/model_provider/zhipuai_openai/provider.py +209 -0
  830. shared/plugins/model_provider/zhipuai_openai/tests/__init__.py +0 -0
  831. shared/plugins/model_provider/zhipuai_openai/tests/test_stream_cancel_close.py +106 -0
  832. shared/plugins/multimodal/__init__.py +20 -0
  833. shared/plugins/multimodal/plugin.py +364 -0
  834. shared/plugins/multimodal/tests/__init__.py +1 -0
  835. shared/plugins/multimodal/tests/test_plugin.py +313 -0
  836. shared/plugins/nim_auth/__init__.py +16 -0
  837. shared/plugins/nim_auth/plugin.py +507 -0
  838. shared/plugins/notebook/__init__.py +22 -0
  839. shared/plugins/notebook/backends/__init__.py +24 -0
  840. shared/plugins/notebook/backends/base.py +173 -0
  841. shared/plugins/notebook/backends/kaggle.py +1044 -0
  842. shared/plugins/notebook/backends/local.py +506 -0
  843. shared/plugins/notebook/backends/subprocess_kernel.py +377 -0
  844. shared/plugins/notebook/cell_transform.py +129 -0
  845. shared/plugins/notebook/code_analyzer.py +802 -0
  846. shared/plugins/notebook/kernel_main.py +208 -0
  847. shared/plugins/notebook/kernel_protocol.py +76 -0
  848. shared/plugins/notebook/plugin.py +1401 -0
  849. shared/plugins/notebook/tests/__init__.py +1 -0
  850. shared/plugins/notebook/tests/test_cell_transform.py +101 -0
  851. shared/plugins/notebook/tests/test_code_analyzer.py +326 -0
  852. shared/plugins/notebook/tests/test_inprocess_gate.py +138 -0
  853. shared/plugins/notebook/tests/test_notebook.py +426 -0
  854. shared/plugins/notebook/tests/test_subprocess_kernel.py +236 -0
  855. shared/plugins/notebook/tests/test_tool_stubs.py +511 -0
  856. shared/plugins/notebook/tool_stubs.py +316 -0
  857. shared/plugins/notebook/types.py +196 -0
  858. shared/plugins/notebook_output_formatter/__init__.py +15 -0
  859. shared/plugins/notebook_output_formatter/plugin.py +255 -0
  860. shared/plugins/openrouter_auth/__init__.py +21 -0
  861. shared/plugins/openrouter_auth/plugin.py +550 -0
  862. shared/plugins/path_safety.py +641 -0
  863. shared/plugins/permission/__init__.py +61 -0
  864. shared/plugins/permission/channels.py +1499 -0
  865. shared/plugins/permission/config_loader.py +319 -0
  866. shared/plugins/permission/evaluator.py +275 -0
  867. shared/plugins/permission/plugin.py +2303 -0
  868. shared/plugins/permission/policy.py +557 -0
  869. shared/plugins/permission/runner_rpc_channel.py +290 -0
  870. shared/plugins/permission/sanitization.py +469 -0
  871. shared/plugins/permission/tests/__init__.py +1 -0
  872. shared/plugins/permission/tests/test_approver_identity_859.py +233 -0
  873. shared/plugins/permission/tests/test_ask_permission_scope.py +141 -0
  874. shared/plugins/permission/tests/test_call_id_propagation_phase_4_1.py +318 -0
  875. shared/plugins/permission/tests/test_channels.py +782 -0
  876. shared/plugins/permission/tests/test_config_loader.py +395 -0
  877. shared/plugins/permission/tests/test_core_tool_evaluator_exemption.py +197 -0
  878. shared/plugins/permission/tests/test_editable_metadata_propagation_phase_4_2.py +253 -0
  879. shared/plugins/permission/tests/test_evaluator.py +269 -0
  880. shared/plugins/permission/tests/test_plugin.py +1334 -0
  881. shared/plugins/permission/tests/test_plugin_runner_rpc_wiring.py +203 -0
  882. shared/plugins/permission/tests/test_policy.py +397 -0
  883. shared/plugins/permission/tests/test_policy_lock_ask_critical_section.py +293 -0
  884. shared/plugins/permission/tests/test_registry_integration.py +405 -0
  885. shared/plugins/permission/tests/test_reliability_escalation_gate.py +82 -0
  886. shared/plugins/permission/tests/test_runner_rpc_channel.py +436 -0
  887. shared/plugins/permission/tests/test_sanitization.py +441 -0
  888. shared/plugins/permission/tests/test_whitelist_shell_control.py +95 -0
  889. shared/plugins/permission/types.py +203 -0
  890. shared/plugins/prompt_library/__init__.py +19 -0
  891. shared/plugins/prompt_library/plugin.py +2822 -0
  892. shared/plugins/prompt_library/tests/__init__.py +1 -0
  893. shared/plugins/prompt_library/tests/test_discover_cache.py +81 -0
  894. shared/plugins/prompt_library/tests/test_plugin.py +1847 -0
  895. shared/plugins/prompt_library/tests/test_validation.py +307 -0
  896. shared/plugins/prompt_library/validation.py +216 -0
  897. shared/plugins/references/__init__.py +90 -0
  898. shared/plugins/references/bundle.py +197 -0
  899. shared/plugins/references/channels.py +634 -0
  900. shared/plugins/references/config_loader.py +748 -0
  901. shared/plugins/references/embedding_types.py +418 -0
  902. shared/plugins/references/entry_handler.py +485 -0
  903. shared/plugins/references/merge.py +675 -0
  904. shared/plugins/references/models.py +369 -0
  905. shared/plugins/references/plugin.py +5473 -0
  906. shared/plugins/references/reconcile.py +438 -0
  907. shared/plugins/references/tests/__init__.py +1 -0
  908. shared/plugins/references/tests/test_bundle.py +585 -0
  909. shared/plugins/references/tests/test_bundle_crud.py +463 -0
  910. shared/plugins/references/tests/test_bundle_wiring.py +401 -0
  911. shared/plugins/references/tests/test_confined_catalog_load.py +41 -0
  912. shared/plugins/references/tests/test_embedding.py +200 -0
  913. shared/plugins/references/tests/test_embedding_config.py +282 -0
  914. shared/plugins/references/tests/test_entry_handler.py +191 -0
  915. shared/plugins/references/tests/test_merge.py +618 -0
  916. shared/plugins/references/tests/test_preselected_detection.py +161 -0
  917. shared/plugins/references/tests/test_reconcile.py +239 -0
  918. shared/plugins/references/tests/test_reference_contents.py +432 -0
  919. shared/plugins/references/tests/test_registry_integration.py +572 -0
  920. shared/plugins/references/tests/test_reload.py +256 -0
  921. shared/plugins/references/tests/test_transitive.py +2300 -0
  922. shared/plugins/references/tests/test_validate_reference.py +387 -0
  923. shared/plugins/registry.py +3174 -0
  924. shared/plugins/reliability/__init__.py +114 -0
  925. shared/plugins/reliability/nudge.py +577 -0
  926. shared/plugins/reliability/patterns.py +650 -0
  927. shared/plugins/reliability/persistence.py +431 -0
  928. shared/plugins/reliability/plugin.py +3331 -0
  929. shared/plugins/reliability/policy_config.py +508 -0
  930. shared/plugins/reliability/tests/__init__.py +1 -0
  931. shared/plugins/reliability/tests/test_plugin_persistence.py +167 -0
  932. shared/plugins/reliability/tests/test_policy_config.py +1214 -0
  933. shared/plugins/reliability/tests/test_reliability.py +3124 -0
  934. shared/plugins/reliability/tests/test_subagent_termination.py +99 -0
  935. shared/plugins/reliability/types.py +1236 -0
  936. shared/plugins/result_grep/__init__.py +50 -0
  937. shared/plugins/result_grep/plugin.py +527 -0
  938. shared/plugins/result_grep/tests/__init__.py +0 -0
  939. shared/plugins/result_grep/tests/test_plugin.py +259 -0
  940. shared/plugins/runner_forwarding.py +264 -0
  941. shared/plugins/sandbox_manager/__init__.py +31 -0
  942. shared/plugins/sandbox_manager/plugin.py +1153 -0
  943. shared/plugins/sandbox_manager/tests/__init__.py +1 -0
  944. shared/plugins/sandbox_manager/tests/test_plugin.py +1486 -0
  945. shared/plugins/sandbox_utils.py +532 -0
  946. shared/plugins/service_connector/__init__.py +19 -0
  947. shared/plugins/service_connector/auth.py +690 -0
  948. shared/plugins/service_connector/bruno_import.py +487 -0
  949. shared/plugins/service_connector/http_client.py +526 -0
  950. shared/plugins/service_connector/openapi_parser.py +968 -0
  951. shared/plugins/service_connector/plugin.py +2352 -0
  952. shared/plugins/service_connector/schema_store.py +608 -0
  953. shared/plugins/service_connector/tests/__init__.py +1 -0
  954. shared/plugins/service_connector/tests/test_auth_secret_resolution.py +547 -0
  955. shared/plugins/service_connector/tests/test_endpoint_by_name.py +189 -0
  956. shared/plugins/service_connector/tests/test_openapi_parser.py +742 -0
  957. shared/plugins/service_connector/tests/test_persistence.py +133 -0
  958. shared/plugins/service_connector/tests/test_schema_store_tiering.py +246 -0
  959. shared/plugins/service_connector/tests/test_types.py +367 -0
  960. shared/plugins/service_connector/tests/test_user_commands.py +511 -0
  961. shared/plugins/service_connector/tests/test_validation.py +313 -0
  962. shared/plugins/service_connector/types.py +581 -0
  963. shared/plugins/service_connector/validation.py +344 -0
  964. shared/plugins/session/__init__.py +70 -0
  965. shared/plugins/session/base.py +614 -0
  966. shared/plugins/session/config_loader.py +148 -0
  967. shared/plugins/session/file_session.py +968 -0
  968. shared/plugins/session/serializer.py +413 -0
  969. shared/plugins/session/tests/__init__.py +1 -0
  970. shared/plugins/session/tests/test_file_session.py +497 -0
  971. shared/plugins/session/tests/test_serializer.py +584 -0
  972. shared/plugins/streaming/__init__.py +37 -0
  973. shared/plugins/streaming/manager.py +540 -0
  974. shared/plugins/streaming/protocol.py +380 -0
  975. shared/plugins/subagent/__init__.py +62 -0
  976. shared/plugins/subagent/config.py +4601 -0
  977. shared/plugins/subagent/entry_handler.py +242 -0
  978. shared/plugins/subagent/plugin.py +4021 -0
  979. shared/plugins/subagent/serializer.py +263 -0
  980. shared/plugins/subagent/tests/__init__.py +1 -0
  981. shared/plugins/subagent/tests/test_config.py +423 -0
  982. shared/plugins/subagent/tests/test_confined_profile_discovery.py +32 -0
  983. shared/plugins/subagent/tests/test_entry_handler.py +243 -0
  984. shared/plugins/subagent/tests/test_inline_profile.py +243 -0
  985. shared/plugins/subagent/tests/test_isolated_optin_routing.py +247 -0
  986. shared/plugins/subagent/tests/test_isolated_subagent_optin_stub.py +219 -0
  987. shared/plugins/subagent/tests/test_merge_model_tiers.py +41 -0
  988. shared/plugins/subagent/tests/test_plugins_key_required.py +182 -0
  989. shared/plugins/subagent/tests/test_profile_discovery.py +740 -0
  990. shared/plugins/subagent/tests/test_profile_inheritance.py +1181 -0
  991. shared/plugins/subagent/tests/test_profile_quirks.py +194 -0
  992. shared/plugins/subagent/tests/test_profile_scrub_secret_env.py +168 -0
  993. shared/plugins/subagent/tests/test_profile_snapshot.py +169 -0
  994. shared/plugins/subagent/tests/test_receive_forwarded_event.py +137 -0
  995. shared/plugins/subagent/tests/test_registry_integration.py +310 -0
  996. shared/plugins/subagent/tests/test_remote_spawn_forward.py +116 -0
  997. shared/plugins/subagent/tests/test_secret_resolver.py +556 -0
  998. shared/plugins/subagent/tests/test_serializer.py +479 -0
  999. shared/plugins/subagent/tests/test_session_isolation.py +423 -0
  1000. shared/plugins/subagent/tests/test_subagent_budget_control.py +80 -0
  1001. shared/plugins/subagent/tests/test_termination_hook.py +306 -0
  1002. shared/plugins/subagent/tests/test_validate_profile.py +313 -0
  1003. shared/plugins/subagent/ui_hooks.py +463 -0
  1004. shared/plugins/table_formatter/__init__.py +10 -0
  1005. shared/plugins/table_formatter/plugin.py +479 -0
  1006. shared/plugins/table_formatter/tests/__init__.py +1 -0
  1007. shared/plugins/table_formatter/tests/test_plugin.py +213 -0
  1008. shared/plugins/telemetry/__init__.py +139 -0
  1009. shared/plugins/telemetry/langfuse_plugin.py +132 -0
  1010. shared/plugins/telemetry/null_plugin.py +178 -0
  1011. shared/plugins/telemetry/otel_plugin.py +1149 -0
  1012. shared/plugins/telemetry/plugin.py +421 -0
  1013. shared/plugins/telemetry/tests/__init__.py +1 -0
  1014. shared/plugins/telemetry/tests/test_attribute_redactors.py +164 -0
  1015. shared/plugins/telemetry/tests/test_langfuse_plugin.py +147 -0
  1016. shared/plugins/telemetry/tests/test_plugin.py +1109 -0
  1017. shared/plugins/telepathy/__init__.py +55 -0
  1018. shared/plugins/telepathy/plugin.py +365 -0
  1019. shared/plugins/telepathy/tests/__init__.py +0 -0
  1020. shared/plugins/telepathy/tests/test_plugin.py +279 -0
  1021. shared/plugins/template/__init__.py +16 -0
  1022. shared/plugins/template/indexer.py +179 -0
  1023. shared/plugins/template/plugin.py +5707 -0
  1024. shared/plugins/template/tests/__init__.py +0 -0
  1025. shared/plugins/template/tests/test_indexer_and_enrichment.py +406 -0
  1026. shared/plugins/template/tests/test_template_index.py +6274 -0
  1027. shared/plugins/template/tests/test_validate_template_index.py +244 -0
  1028. shared/plugins/tests/__init__.py +0 -0
  1029. shared/plugins/tests/test_daemon_forwarding.py +297 -0
  1030. shared/plugins/tests/test_daemon_forwarding_precondition.py +84 -0
  1031. shared/plugins/tests/test_entry_point_trust.py +560 -0
  1032. shared/plugins/tests/test_error_results_are_visible.py +85 -0
  1033. shared/plugins/tests/test_path_safety.py +405 -0
  1034. shared/plugins/tests/test_registry_authorized_paths.py +336 -0
  1035. shared/plugins/tests/test_registry_denied_paths.py +383 -0
  1036. shared/plugins/tests/test_registry_entry_point_protocol_warning.py +330 -0
  1037. shared/plugins/tests/test_registry_framework_injection.py +199 -0
  1038. shared/plugins/tests/test_registry_missing_dependency_warning.py +123 -0
  1039. shared/plugins/tests/test_registry_workspace_path.py +123 -0
  1040. shared/plugins/tests/test_runner_forwarding.py +407 -0
  1041. shared/plugins/tests/test_sandbox_utils.py +1183 -0
  1042. shared/plugins/tests/test_tool_schema_tier_filter.py +49 -0
  1043. shared/plugins/thinking/__init__.py +66 -0
  1044. shared/plugins/thinking/config.py +153 -0
  1045. shared/plugins/thinking/plugin.py +472 -0
  1046. shared/plugins/todo/__init__.py +118 -0
  1047. shared/plugins/todo/channels.py +628 -0
  1048. shared/plugins/todo/config_loader.py +243 -0
  1049. shared/plugins/todo/event_bus.py +232 -0
  1050. shared/plugins/todo/plugin.py +1901 -0
  1051. shared/plugins/todo/storage.py +327 -0
  1052. shared/plugins/todo/tests/__init__.py +1 -0
  1053. shared/plugins/todo/tests/conftest.py +25 -0
  1054. shared/plugins/todo/tests/test_channels.py +335 -0
  1055. shared/plugins/todo/tests/test_event_bus.py +751 -0
  1056. shared/plugins/todo/tests/test_models.py +606 -0
  1057. shared/plugins/todo/tests/test_plan_locking.py +666 -0
  1058. shared/plugins/todo/tests/test_plan_required_visibility.py +169 -0
  1059. shared/plugins/todo/tests/test_plugin.py +818 -0
  1060. shared/plugins/todo/tests/test_registry_integration.py +362 -0
  1061. shared/plugins/todo/tests/test_slot_scoped_declaration.py +16 -0
  1062. shared/plugins/todo/tests/test_storage.py +312 -0
  1063. shared/plugins/todo/tests/test_validation_enforcement.py +413 -0
  1064. shared/plugins/vision_capture/__init__.py +63 -0
  1065. shared/plugins/vision_capture/capture.py +268 -0
  1066. shared/plugins/vision_capture/formatter.py +178 -0
  1067. shared/plugins/vision_capture/protocol.py +109 -0
  1068. shared/plugins/waypoint/__init__.py +33 -0
  1069. shared/plugins/waypoint/manager.py +627 -0
  1070. shared/plugins/waypoint/models.py +136 -0
  1071. shared/plugins/waypoint/plugin.py +1129 -0
  1072. shared/plugins/waypoint/tests/__init__.py +1 -0
  1073. shared/plugins/waypoint/tests/test_manager.py +675 -0
  1074. shared/plugins/waypoint/tests/test_plugin.py +521 -0
  1075. shared/plugins/waypoint/tests/test_session_state_snapshot.py +149 -0
  1076. shared/plugins/web_fetch/__init__.py +16 -0
  1077. shared/plugins/web_fetch/plugin.py +1621 -0
  1078. shared/plugins/web_fetch/security.py +276 -0
  1079. shared/plugins/web_fetch/tests/__init__.py +1 -0
  1080. shared/plugins/web_fetch/tests/test_execute_guards.py +216 -0
  1081. shared/plugins/web_fetch/tests/test_plugin.py +883 -0
  1082. shared/plugins/web_fetch/tests/test_security.py +205 -0
  1083. shared/plugins/web_search/__init__.py +16 -0
  1084. shared/plugins/web_search/plugin.py +307 -0
  1085. shared/plugins/web_search/tests/__init__.py +1 -0
  1086. shared/plugins/web_search/tests/test_registry_integration.py +326 -0
  1087. shared/plugins/webhook/__init__.py +19 -0
  1088. shared/plugins/webhook/config.py +398 -0
  1089. shared/plugins/webhook/http_server.py +423 -0
  1090. shared/plugins/webhook/plugin.py +557 -0
  1091. shared/plugins/webhook/routes.py +190 -0
  1092. shared/plugins/webhook/tests/__init__.py +0 -0
  1093. shared/plugins/webhook/tests/test_config.py +393 -0
  1094. shared/plugins/webhook/tests/test_http_server.py +333 -0
  1095. shared/plugins/webhook/tests/test_plugin.py +455 -0
  1096. shared/plugins/webhook/tests/test_routes.py +264 -0
  1097. shared/plugins/workspace_venv.py +384 -0
  1098. shared/plugins/zhipuai_auth/__init__.py +16 -0
  1099. shared/plugins/zhipuai_auth/plugin.py +511 -0
  1100. shared/pricing.py +182 -0
  1101. shared/retry_utils.py +602 -0
  1102. shared/rewind.py +174 -0
  1103. shared/runtime_limits.py +360 -0
  1104. shared/safe_pool.py +139 -0
  1105. shared/scaffold/__init__.py +0 -0
  1106. shared/scaffold/__main__.py +378 -0
  1107. shared/scaffold/_client_templates.py +667 -0
  1108. shared/scaffold/_gate_templates.py +403 -0
  1109. shared/scaffold/_processor_template.py +298 -0
  1110. shared/scaffold/api.py +137 -0
  1111. shared/scaffold/archetypes.py +766 -0
  1112. shared/scaffold/build.py +1554 -0
  1113. shared/scaffold/explain.py +2100 -0
  1114. shared/scaffold/introspect.py +1152 -0
  1115. shared/scaffold/tests/test_binding_is_optional_where_unowned.py +157 -0
  1116. shared/scaffold/tests/test_client_template_completion_wait.py +263 -0
  1117. shared/scaffold/tests/test_client_transport_recovery.py +140 -0
  1118. shared/scaffold/tests/test_env_descriptions.py +41 -0
  1119. shared/scaffold/tests/test_explain_commands.py +85 -0
  1120. shared/scaffold/tests/test_explain_paths.py +43 -0
  1121. shared/scaffold/tests/test_explain_prefetch.py +23 -0
  1122. shared/scaffold/tests/test_explain_profile_inheritance.py +49 -0
  1123. shared/scaffold/tests/test_extension_verbs.py +135 -0
  1124. shared/scaffold/tests/test_observer_filter_names.py +105 -0
  1125. shared/scaffold/tests/test_sweep_archetype.py +440 -0
  1126. shared/scaffold/tests/test_templates_track_the_sdk_contract.py +222 -0
  1127. shared/scaffold/tests/test_validate_harness_traps.py +123 -0
  1128. shared/scaffold/tests/test_validate_knobs.py +40 -0
  1129. shared/scaffold/tests/test_validate_model_tiers.py +44 -0
  1130. shared/scaffold/tests/test_validate_plugin_knobs.py +85 -0
  1131. shared/scaffold/tests/test_validate_prefetch.py +75 -0
  1132. shared/scaffold/tests/test_validate_secret_scrub.py +87 -0
  1133. shared/scaffold/tests/test_validate_single_file.py +65 -0
  1134. shared/scaffold/tests/test_validate_template_routing.py +109 -0
  1135. shared/scaffold/tests/test_validate_tier_tag.py +32 -0
  1136. shared/scaffold/validate.py +1228 -0
  1137. shared/script_loader.py +368 -0
  1138. shared/secret_repr.py +159 -0
  1139. shared/secret_scrub.py +281 -0
  1140. shared/session_context.py +290 -0
  1141. shared/session_envelope.py +669 -0
  1142. shared/session_history.py +269 -0
  1143. shared/session_id.py +60 -0
  1144. shared/session_persistence.py +227 -0
  1145. shared/session_telemetry.py +171 -0
  1146. shared/spawn_schema_loader.py +178 -0
  1147. shared/ssl_helper.py +89 -0
  1148. shared/subprocess_runner.py +314 -0
  1149. shared/tag_coherence.py +152 -0
  1150. shared/terminal_caps.py +191 -0
  1151. shared/test_safe_pool.py +147 -0
  1152. shared/tests/__init__.py +1 -0
  1153. shared/tests/offer_double.py +59 -0
  1154. shared/tests/test_a_cache_is_published_only_when_complete.py +179 -0
  1155. shared/tests/test_a_completed_session_keeps_a_valid_history.py +273 -0
  1156. shared/tests/test_a_dead_stream_is_not_a_finished_turn.py +665 -0
  1157. shared/tests/test_a_dict_result_is_not_exempt_from_enrichment.py +344 -0
  1158. shared/tests/test_a_missing_completion_is_not_silent.py +186 -0
  1159. shared/tests/test_a_reported_cost_reaches_the_event.py +156 -0
  1160. shared/tests/test_a_terminal_event_is_last.py +166 -0
  1161. shared/tests/test_a_truncated_turn_is_continued_not_lost.py +631 -0
  1162. shared/tests/test_abnormal_finish_surfacing.py +166 -0
  1163. shared/tests/test_agent_profiles.py +633 -0
  1164. shared/tests/test_all_plugins_satisfy_protocol.py +221 -0
  1165. shared/tests/test_an_abandoned_tool_call_is_still_answered.py +536 -0
  1166. shared/tests/test_an_attachment_does_not_silence_the_model.py +318 -0
  1167. shared/tests/test_app_identity.py +361 -0
  1168. shared/tests/test_apparmor.py +2799 -0
  1169. shared/tests/test_apparmor_sub_profile.py +638 -0
  1170. shared/tests/test_atomic_write.py +261 -0
  1171. shared/tests/test_binary_media_chunks.py +794 -0
  1172. shared/tests/test_budget_control.py +225 -0
  1173. shared/tests/test_budget_latch_survives_reload.py +123 -0
  1174. shared/tests/test_budget_runtime.py +346 -0
  1175. shared/tests/test_budget_signal_and_persistence.py +141 -0
  1176. shared/tests/test_budget_usage_round_trip.py +107 -0
  1177. shared/tests/test_cache_hit_percent_against_invoice.py +441 -0
  1178. shared/tests/test_cache_plugin_follows_tier_switch.py +338 -0
  1179. shared/tests/test_cache_plugin_profile_knobs.py +353 -0
  1180. shared/tests/test_cache_profile_field.py +185 -0
  1181. shared/tests/test_cache_spend_survives_a_tier_switch.py +631 -0
  1182. shared/tests/test_cancellation.py +321 -0
  1183. shared/tests/test_cascade_budget_pool.py +254 -0
  1184. shared/tests/test_cascade_event_attribution.py +331 -0
  1185. shared/tests/test_cascade_midflight_push.py +258 -0
  1186. shared/tests/test_cascade_refusal_reaches_observers.py +164 -0
  1187. shared/tests/test_cgroups.py +580 -0
  1188. shared/tests/test_clarification_reaches_the_client.py +237 -0
  1189. shared/tests/test_cold_sibling_is_not_absent.py +157 -0
  1190. shared/tests/test_command_analysis.py +198 -0
  1191. shared/tests/test_completion_nudge_budget.py +363 -0
  1192. shared/tests/test_completion_processor_refusal_budget.py +342 -0
  1193. shared/tests/test_completion_processors.py +904 -0
  1194. shared/tests/test_completion_schema_loader.py +124 -0
  1195. shared/tests/test_config_resolver.py +281 -0
  1196. shared/tests/test_confinement_guard.py +53 -0
  1197. shared/tests/test_connection_error_rebuilds_client.py +122 -0
  1198. shared/tests/test_context_limit_lazy_provider.py +139 -0
  1199. shared/tests/test_credential_hygiene.py +382 -0
  1200. shared/tests/test_cross_provider_tiers.py +106 -0
  1201. shared/tests/test_cyclomatic_complexity_audit.py +828 -0
  1202. shared/tests/test_dedup_history_for_gc.py +109 -0
  1203. shared/tests/test_deferred_plugin_instructions.py +439 -0
  1204. shared/tests/test_discover_bundles_eacces.py +37 -0
  1205. shared/tests/test_docs_do_not_contradict_the_tree.py +312 -0
  1206. shared/tests/test_drain_with_prompt_callback.py +101 -0
  1207. shared/tests/test_dynamic_instructions.py +330 -0
  1208. shared/tests/test_enrichment_plugin.py +384 -0
  1209. shared/tests/test_env_scope_catalog.py +427 -0
  1210. shared/tests/test_event_bus_tools.py +356 -0
  1211. shared/tests/test_event_payloads.py +71 -0
  1212. shared/tests/test_every_guard_detects_its_own_reversion.py +329 -0
  1213. shared/tests/test_exc_message.py +42 -0
  1214. shared/tests/test_executor_return_conventions.py +148 -0
  1215. shared/tests/test_explain_profile_cost.py +161 -0
  1216. shared/tests/test_explain_publishes_tool_parameters.py +96 -0
  1217. shared/tests/test_forwarded_caller_identity.py +116 -0
  1218. shared/tests/test_forwarded_executor_contract.py +170 -0
  1219. shared/tests/test_framing.py +264 -0
  1220. shared/tests/test_gc_config.py +403 -0
  1221. shared/tests/test_gc_runs_through_one_path.py +172 -0
  1222. shared/tests/test_gc_support.py +191 -0
  1223. shared/tests/test_generic_plugin_persistence.py +244 -0
  1224. shared/tests/test_get_tools_for_provider_visibility_filter.py +221 -0
  1225. shared/tests/test_heard_audio_does_not_accumulate.py +515 -0
  1226. shared/tests/test_history_modality_gate.py +325 -0
  1227. shared/tests/test_history_pairs_calls_to_responses.py +137 -0
  1228. shared/tests/test_history_render_function_response.py +77 -0
  1229. shared/tests/test_in_process_facade.py +1102 -0
  1230. shared/tests/test_in_process_open_event_stream.py +100 -0
  1231. shared/tests/test_in_process_permission.py +109 -0
  1232. shared/tests/test_inject_drives_and_session_save.py +189 -0
  1233. shared/tests/test_instruction_budget.py +654 -0
  1234. shared/tests/test_instruction_budget_builder.py +165 -0
  1235. shared/tests/test_instruction_suppression.py +205 -0
  1236. shared/tests/test_instruction_token_cache.py +90 -0
  1237. shared/tests/test_introspection_gate.py +99 -0
  1238. shared/tests/test_isolated_default_runtime_limits.py +181 -0
  1239. shared/tests/test_jaato_client.py +241 -0
  1240. shared/tests/test_jaato_runtime.py +576 -0
  1241. shared/tests/test_jaato_runtime_api_key_promotion.py +147 -0
  1242. shared/tests/test_jaato_session.py +1950 -0
  1243. shared/tests/test_ledger_user_attribution_859.py +90 -0
  1244. shared/tests/test_lifecycle_tools.py +1274 -0
  1245. shared/tests/test_max_parallel_tools.py +329 -0
  1246. shared/tests/test_mcp_secret_scrub.py +141 -0
  1247. shared/tests/test_media_output_contract.py +948 -0
  1248. shared/tests/test_message_delivery_is_shared.py +248 -0
  1249. shared/tests/test_modality_content_gate.py +405 -0
  1250. shared/tests/test_model_loop_frames_survive.py +107 -0
  1251. shared/tests/test_model_suffix_ledger.py +74 -0
  1252. shared/tests/test_model_tiers.py +563 -0
  1253. shared/tests/test_offer_message_is_atomic.py +185 -0
  1254. shared/tests/test_output_callback.py +207 -0
  1255. shared/tests/test_parent_authority_is_source_gated.py +200 -0
  1256. shared/tests/test_path_utils.py +417 -0
  1257. shared/tests/test_pending_tool_choice_lifecycle.py +204 -0
  1258. shared/tests/test_per_turn_completion_latches.py +161 -0
  1259. shared/tests/test_plugin_registry_gated_init.py +251 -0
  1260. shared/tests/test_plugin_session_safety.py +112 -0
  1261. shared/tests/test_plugin_tier_partition.py +416 -0
  1262. shared/tests/test_prefetch_confinement.py +162 -0
  1263. shared/tests/test_prepare_completion_free_shape.py +66 -0
  1264. shared/tests/test_pricing.py +148 -0
  1265. shared/tests/test_processor_wiring_survives_the_runner_boundary.py +281 -0
  1266. shared/tests/test_profile_block_fields_have_one_parser.py +114 -0
  1267. shared/tests/test_provider_capabilities.py +168 -0
  1268. shared/tests/test_provider_capability_conformance.py +535 -0
  1269. shared/tests/test_provider_knobs.py +199 -0
  1270. shared/tests/test_provider_trace_routing.py +176 -0
  1271. shared/tests/test_proxy.py +479 -0
  1272. shared/tests/test_refusal_names_the_real_reason.py +144 -0
  1273. shared/tests/test_registry_workspace_broadcast.py +45 -0
  1274. shared/tests/test_relative_paths_do_not_cross_the_daemon_boundary.py +418 -0
  1275. shared/tests/test_reliability_model_follows_the_tier.py +145 -0
  1276. shared/tests/test_render_context_session_id.py +133 -0
  1277. shared/tests/test_rendered_system_instruction_snapshot.py +146 -0
  1278. shared/tests/test_reset_for_next_session.py +449 -0
  1279. shared/tests/test_resume_verbs_carry_attachments.py +392 -0
  1280. shared/tests/test_retry_utils.py +313 -0
  1281. shared/tests/test_rewind.py +212 -0
  1282. shared/tests/test_rewind_integration.py +192 -0
  1283. shared/tests/test_runner_traceback_reaches_consumer.py +112 -0
  1284. shared/tests/test_runtime_limits_e2e.py +939 -0
  1285. shared/tests/test_runtime_limits_wiring.py +559 -0
  1286. shared/tests/test_scaffold_archetype_docs.py +334 -0
  1287. shared/tests/test_scaffold_budget_control.py +135 -0
  1288. shared/tests/test_scaffold_completion_contract.py +323 -0
  1289. shared/tests/test_scaffold_discovery_gated.py +62 -0
  1290. shared/tests/test_scaffold_explain_descriptions.py +75 -0
  1291. shared/tests/test_scaffold_explain_events.py +104 -0
  1292. shared/tests/test_scaffold_new_blames_only_itself.py +79 -0
  1293. shared/tests/test_scaffold_profile_env_block.py +541 -0
  1294. shared/tests/test_scaffold_secrets.py +151 -0
  1295. shared/tests/test_scaffold_smoke.py +215 -0
  1296. shared/tests/test_scaffold_sweep_gate_contract.py +575 -0
  1297. shared/tests/test_scaffold_tiers.py +259 -0
  1298. shared/tests/test_script_loader.py +470 -0
  1299. shared/tests/test_secret_scrub.py +220 -0
  1300. shared/tests/test_send_to_sibling.py +320 -0
  1301. shared/tests/test_server_version.py +142 -0
  1302. shared/tests/test_session_attached_state.py +242 -0
  1303. shared/tests/test_session_cost_telemetry.py +173 -0
  1304. shared/tests/test_session_env_audit.py +218 -0
  1305. shared/tests/test_session_envelope.py +656 -0
  1306. shared/tests/test_session_envelope_client_tools.py +36 -0
  1307. shared/tests/test_session_history.py +606 -0
  1308. shared/tests/test_session_id_validation.py +68 -0
  1309. shared/tests/test_session_manager_wiring_on_every_route.py +138 -0
  1310. shared/tests/test_session_new_instruction_override.py +209 -0
  1311. shared/tests/test_session_persistence_is_declared.py +159 -0
  1312. shared/tests/test_session_send_command.py +155 -0
  1313. shared/tests/test_session_telemetry.py +136 -0
  1314. shared/tests/test_session_tool_scopes.py +173 -0
  1315. shared/tests/test_sibling_accepted_means_a_turn.py +180 -0
  1316. shared/tests/test_sibling_source_is_idle_only.py +101 -0
  1317. shared/tests/test_signal_completion_schema_gate.py +192 -0
  1318. shared/tests/test_signal_completion_terminates_turn.py +294 -0
  1319. shared/tests/test_source_type_not_re_enumerated.py +93 -0
  1320. shared/tests/test_symmetric_loop_does_not_strand.py +127 -0
  1321. shared/tests/test_system_instruction_override_budget.py +292 -0
  1322. shared/tests/test_tag_coherence.py +135 -0
  1323. shared/tests/test_terminal_caps.py +241 -0
  1324. shared/tests/test_the_refusal_ceiling_bounds_the_session_loop.py +394 -0
  1325. shared/tests/test_tier_descriptions.py +221 -0
  1326. shared/tests/test_tier_exit_on_completion.py +133 -0
  1327. shared/tests/test_tier_modalities.py +485 -0
  1328. shared/tests/test_tier_names.py +426 -0
  1329. shared/tests/test_tool_executor_transformers.py +223 -0
  1330. shared/tests/test_tool_id_map.py +191 -0
  1331. shared/tests/test_tool_id_scrub.py +54 -0
  1332. shared/tests/test_tool_id_wire_conformance.py +147 -0
  1333. shared/tests/test_tool_narration_reaches_the_wire.py +110 -0
  1334. shared/tests/test_tool_result_builder.py +107 -0
  1335. shared/tests/test_tool_result_truncation.py +102 -0
  1336. shared/tests/test_trace_profile_block.py +255 -0
  1337. shared/tests/test_truncation_is_not_reported_as_tool_use.py +310 -0
  1338. shared/tests/test_two_phase_budget.py +351 -0
  1339. shared/tests/test_ui_utils.py +317 -0
  1340. shared/tests/test_unreachable_says_which_kind.py +317 -0
  1341. shared/tests/test_unreadable_tool_args_are_not_executed.py +433 -0
  1342. shared/tests/test_untrusted_content_boundary.py +123 -0
  1343. shared/tests/test_untrusted_mark_survives_rebuilds.py +131 -0
  1344. shared/tests/test_user_message_multimodal.py +84 -0
  1345. shared/tests/test_wire_tool_schema_budget.py +160 -0
  1346. shared/tests/test_workspace_provisioner.py +195 -0
  1347. shared/tests/test_workspace_root_isolation.py +154 -0
  1348. shared/tests/test_workspace_venv.py +281 -0
  1349. shared/token_accounting.py +214 -0
  1350. shared/tool_id_map.py +197 -0
  1351. shared/tool_result_builder.py +355 -0
  1352. shared/tool_result_truncation.py +301 -0
  1353. shared/trace.py +20 -0
  1354. shared/ui_utils.py +838 -0
  1355. shared/utils/__init__.py +1 -0
  1356. shared/utils/errors.py +44 -0
  1357. shared/utils/gitignore.py +159 -0
@@ -0,0 +1,15 @@
1
+ """jaato_embedded — the in-process (embedded) runtime backend.
2
+
3
+ Ships with **jaato-server**. This is the ``mode="in_process"`` backend behind the
4
+ public ``jaato.session(...)`` facade (which lives in jaato-sdk): it runs the agent
5
+ loop in your process with no daemon, no socket, no runner subprocess.
6
+
7
+ The public facade imports this lazily — ``jaato.session(mode="in_process")`` does
8
+ ``from jaato_embedded import InProcessClient`` only when in-process mode is
9
+ requested, so a thin ipc/ws client needs only jaato-sdk. See
10
+ ``docs/design/in-process-facade.md``.
11
+ """
12
+
13
+ from jaato_embedded.client import InProcessClient, InProcessEventEmitter
14
+
15
+ __all__ = ["InProcessClient", "InProcessEventEmitter"]