fred-runtime 3.5.0__tar.gz → 3.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/PKG-INFO +1 -1
  2. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/app/_catalogs.py +96 -0
  3. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/app/agent_app.py +253 -79
  4. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/app/config.py +41 -1
  5. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/app/context.py +33 -3
  6. fred_runtime-3.5.2/fred_runtime/app/platform_sql.py +307 -0
  7. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/assembly.py +14 -1
  8. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_access/capability.py +12 -8
  9. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_extract/capability.py +13 -2
  10. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_read_common.py +36 -2
  11. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_summarize/capability.py +12 -1
  12. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/mcp.py +38 -46
  13. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/kf_document_client.py +4 -0
  14. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/mcp_runtime.py +20 -5
  15. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/mcp_utils.py +27 -2
  16. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/deep/deep_runtime.py +101 -90
  17. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/integrations/v2_runtime/adapters.py +412 -35
  18. fred_runtime-3.5.0/fred_runtime/migrations.py → fred_runtime-3.5.2/fred_runtime/migrations/__init__.py +5 -5
  19. fred_runtime-3.5.2/fred_runtime/migrations/env.py +50 -0
  20. fred_runtime-3.5.2/fred_runtime/migrations/script.py.mako +32 -0
  21. fred_runtime-3.5.2/fred_runtime/migrations/versions/__init__.py +1 -0
  22. fred_runtime-3.5.2/fred_runtime/migrations/versions/a1e2f3c4d5b6_create_session_history.py +75 -0
  23. fred_runtime-3.5.2/fred_runtime/migrations/versions/b2f3a4e5c6d7_add_exchange_id.py +49 -0
  24. fred_runtime-3.5.2/fred_runtime/migrations/versions/c3d4b5a6f7e8_add_team_and_instance.py +70 -0
  25. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/model_routing/contracts.py +42 -1
  26. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/model_routing/provider.py +9 -3
  27. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/model_routing/resolver.py +2 -0
  28. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/react_message_codec.py +1 -8
  29. fred_runtime-3.5.2/fred_runtime/react/react_prompting.py +485 -0
  30. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/react_runtime.py +173 -67
  31. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/react_tool_binding.py +140 -45
  32. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/react_tool_rendering.py +23 -16
  33. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/react_tool_resolution.py +19 -1
  34. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/runtime_context.py +75 -0
  35. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/runtime_support/__init__.py +2 -0
  36. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/runtime_support/checkpoints.py +5 -0
  37. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/runtime_support/request_context_helpers.py +26 -0
  38. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/runtime_support/sql_checkpointer.py +1 -0
  39. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/runtime_support/trace_payloads.py +10 -2
  40. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/support/thinking.py +9 -5
  41. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime.egg-info/PKG-INFO +1 -1
  42. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime.egg-info/SOURCES.txt +18 -1
  43. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/pyproject.toml +9 -3
  44. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_agent_app.py +43 -63
  45. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_document_access_1906.py +25 -0
  46. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_document_reading.py +42 -0
  47. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_endpoints_1974.py +63 -0
  48. fred_runtime-3.5.2/tests/test_deep_agent_dispatch.py +209 -0
  49. fred_runtime-3.5.2/tests/test_deep_agent_hitl_integration.py +613 -0
  50. fred_runtime-3.5.2/tests/test_deep_agent_middleware.py +415 -0
  51. fred_runtime-3.5.2/tests/test_document_read_scope.py +236 -0
  52. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_hitl_resume_langgraph_integration.py +87 -0
  53. fred_runtime-3.5.2/tests/test_migrations.py +114 -0
  54. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_model_enforcement.py +50 -0
  55. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_model_reasoning_enablement.py +69 -0
  56. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_model_routing.py +47 -0
  57. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_models_catalog_projection.py +99 -0
  58. fred_runtime-3.5.2/tests/test_platform_sql.py +175 -0
  59. fred_runtime-3.5.2/tests/test_platform_sql_postgres_integration.py +285 -0
  60. fred_runtime-3.5.2/tests/test_react_checkpoint_namespace.py +188 -0
  61. fred_runtime-3.5.2/tests/test_react_prompting.py +985 -0
  62. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_react_thinking.py +177 -1
  63. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_react_token_usage_totals.py +1 -0
  64. fred_runtime-3.5.2/tests/test_react_tool_binding_span_status.py +138 -0
  65. fred_runtime-3.5.2/tests/test_react_tool_error_final_2244.py +572 -0
  66. fred_runtime-3.5.2/tests/test_react_tool_resolution.py +128 -0
  67. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_runtime_context_prompt_injection.py +14 -3
  68. fred_runtime-3.5.2/tests/test_similarity_search_tool_invoker.py +128 -0
  69. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_sql_checkpointer_owner.py +25 -0
  70. fred_runtime-3.5.2/tests/test_team_wiki_adapter.py +340 -0
  71. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_tool_carrier_middleware_naming.py +5 -3
  72. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_trace_payloads.py +30 -0
  73. fred_runtime-3.5.0/fred_runtime/react/react_prompting.py +0 -354
  74. fred_runtime-3.5.0/tests/test_deep_agent_middleware.py +0 -174
  75. fred_runtime-3.5.0/tests/test_react_checkpoint_namespace.py +0 -94
  76. fred_runtime-3.5.0/tests/test_react_prompting.py +0 -281
  77. fred_runtime-3.5.0/tests/test_react_tool_error_final_2244.py +0 -261
  78. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/README.md +0 -0
  79. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/__init__.py +0 -0
  80. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/__main__.py +0 -0
  81. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/app/__init__.py +0 -0
  82. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/app/chat_input_limit.py +0 -0
  83. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/app/config_loader.py +0 -0
  84. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/app/container.py +0 -0
  85. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/app/dependencies.py +0 -0
  86. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/app/mcp_config.py +0 -0
  87. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/app/observability_factory.py +0 -0
  88. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/app/openai_compat_router.py +0 -0
  89. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/__init__.py +0 -0
  90. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/assets.py +0 -0
  91. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/demo.py +0 -0
  92. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/demo_migrations/env.py +0 -0
  93. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/demo_migrations/versions/d1e2m0a0b0c0_create_demo_echo_notes.py +0 -0
  94. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_access/__init__.py +0 -0
  95. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_extract/__init__.py +0 -0
  96. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_label_search/__init__.py +0 -0
  97. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_label_search/capability.py +0 -0
  98. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_similarity/__init__.py +0 -0
  99. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_similarity/capability.py +0 -0
  100. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_summarize/__init__.py +0 -0
  101. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_verbatim/__init__.py +0 -0
  102. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/document_verbatim/capability.py +0 -0
  103. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/errors.py +0 -0
  104. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/openapi_dump.py +0 -0
  105. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/capabilities/registry.py +0 -0
  106. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/cli/__init__.py +0 -0
  107. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/cli/completion.py +0 -0
  108. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/cli/entrypoint.py +0 -0
  109. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/cli/history_display.py +0 -0
  110. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/cli/kpi_display.py +0 -0
  111. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/cli/pod_client.py +0 -0
  112. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/cli/repl.py +0 -0
  113. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/cli/repl_helpers.py +0 -0
  114. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/cli/url_helpers.py +0 -0
  115. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/client.py +0 -0
  116. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/__init__.py +0 -0
  117. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/context_aware_tool.py +0 -0
  118. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/kf_base_client.py +0 -0
  119. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/kf_fast_text_client.py +0 -0
  120. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/kf_http_client.py +0 -0
  121. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/kf_markdown_media_client.py +0 -0
  122. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/kf_tag_client.py +0 -0
  123. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/kf_vectorsearch_client.py +0 -0
  124. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/kf_workspace_client.py +0 -0
  125. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/mcp_interceptors.py +0 -0
  126. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/mcp_toolkit.py +0 -0
  127. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/structures.py +0 -0
  128. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/table_hits.py +0 -0
  129. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/token_expiry.py +0 -0
  130. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/common/tool_node_utils.py +0 -0
  131. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/deep/__init__.py +0 -0
  132. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/eval/__init__.py +0 -0
  133. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/eval/collector.py +0 -0
  134. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/graph/__init__.py +0 -0
  135. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/graph/graph_runtime.py +0 -0
  136. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/integrations/__init__.py +0 -0
  137. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/integrations/inprocess_toolkit_registry.py +0 -0
  138. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/integrations/kf_vector_search/__init__.py +0 -0
  139. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/integrations/kf_vector_search/toolkit.py +0 -0
  140. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/integrations/v2_runtime/__init__.py +0 -0
  141. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/model_routing/__init__.py +0 -0
  142. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/model_routing/authz.py +0 -0
  143. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/model_routing/catalog.py +0 -0
  144. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/__init__.py +0 -0
  145. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/middleware/__init__.py +0 -0
  146. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/middleware/checkpoint_hygiene.py +0 -0
  147. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/middleware/dynamic_prompt.py +0 -0
  148. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/middleware/frame.py +0 -0
  149. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/middleware/hitl.py +0 -0
  150. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/middleware/shared.py +0 -0
  151. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/middleware/tool_observability.py +0 -0
  152. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/middleware/tracing_kpi.py +0 -0
  153. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/react_langchain_adapter.py +0 -0
  154. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/react_model_adapter.py +0 -0
  155. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/react_stream_adapter.py +0 -0
  156. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/react_tool_loop.py +0 -0
  157. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/react_tool_utils.py +0 -0
  158. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/react/react_tracing.py +0 -0
  159. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/runtime_support/model_metadata.py +0 -0
  160. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/runtime_support/user_token_refresher.py +0 -0
  161. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/support/__init__.py +0 -0
  162. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/support/filesystem_context.py +0 -0
  163. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime/support/tool_loop.py +0 -0
  164. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime.egg-info/dependency_links.txt +0 -0
  165. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime.egg-info/entry_points.txt +0 -0
  166. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime.egg-info/requires.txt +0 -0
  167. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/fred_runtime.egg-info/top_level.txt +0 -0
  168. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/setup.cfg +0 -0
  169. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_agent_1973.py +0 -0
  170. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_chat_controls_1976.py +0 -0
  171. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_chat_parts_1977.py +0 -0
  172. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_document_label_search.py +0 -0
  173. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_document_similarity.py +0 -0
  174. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_document_summarize.py +0 -0
  175. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_registry_1973.py +0 -0
  176. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_routes_tables_1979.py +0 -0
  177. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_selection_1974.py +0 -0
  178. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_capability_tool_return_convention.py +0 -0
  179. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_chat_input_limit.py +0 -0
  180. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_checkpoint_namespace.py +0 -0
  181. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_client.py +0 -0
  182. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_config_loader.py +0 -0
  183. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_context.py +0 -0
  184. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_context_aware_tool.py +0 -0
  185. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_conversational_memory.py +0 -0
  186. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_document_port_error_redaction.py +0 -0
  187. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_document_similarity_adapter.py +0 -0
  188. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_eval_collector.py +0 -0
  189. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_eval_trace.py +0 -0
  190. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_fred_workspace_fs.py +0 -0
  191. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_graph_capability_bridge.py +0 -0
  192. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_graph_checkpoint_namespace.py +0 -0
  193. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_graph_runtime_invoke_agent.py +0 -0
  194. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_graph_runtime_observability.py +0 -0
  195. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_graph_runtime_token_usage_totals.py +0 -0
  196. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_history.py +0 -0
  197. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_history_display.py +0 -0
  198. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_kf_base_client_refresh_shapes.py +0 -0
  199. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_kf_vector_search_toolkit.py +0 -0
  200. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_kf_workspace_client.py +0 -0
  201. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_knowledge_search_table_ordering.py +0 -0
  202. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_knowledge_search_tool_invoker_sources.py +0 -0
  203. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_kpi_display.py +0 -0
  204. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_langfuse_tracing.py +0 -0
  205. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_langgraph_interrupt_id_semantics.py +0 -0
  206. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_mcp_config.py +0 -0
  207. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_model_metadata_cache_tokens.py +0 -0
  208. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_model_routing_provider.py +0 -0
  209. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_openai_compat_router.py +0 -0
  210. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_pod_client.py +0 -0
  211. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_react_loop_regressions_1972.py +0 -0
  212. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_react_message_codec_resume.py +0 -0
  213. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_react_middleware_frame.py +0 -0
  214. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_repl_helpers.py +0 -0
  215. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_smoke.py +0 -0
  216. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_spike_capability_state_1971.py +0 -0
  217. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_sql_checkpointer_hitl_claim.py +0 -0
  218. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_table_repair_wiring.py +0 -0
  219. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_token_expiry.py +0 -0
  220. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_tool_loop_trim.py +0 -0
  221. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_tool_observability_middleware.py +0 -0
  222. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_tracing_kpi_content_confinement.py +0 -0
  223. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_url_helpers.py +0 -0
  224. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_user_token_refresher.py +0 -0
  225. {fred_runtime-3.5.0 → fred_runtime-3.5.2}/tests/test_vector_similarity_search_retry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fred-runtime
3
- Version: 3.5.0
3
+ Version: 3.5.2
4
4
  Summary: Runtime adapters and infrastructure wiring for Fred v2 agents.
5
5
  Author-email: Thales <noreply@thalesgroup.com>
6
6
  License: Apache-2.0
@@ -32,6 +32,7 @@ Example:
32
32
 
33
33
  from __future__ import annotations
34
34
 
35
+ import json
35
36
  import logging
36
37
  import os
37
38
  from pathlib import Path
@@ -47,8 +48,10 @@ logger = logging.getLogger(__name__)
47
48
 
48
49
  MCP_CATALOG_ENV = "FRED_MCP_CATALOG_FILE"
49
50
  MODELS_CATALOG_ENV = "FRED_MODELS_CATALOG_FILE"
51
+ PLATFORM_PROMPT_ENV = "FRED_PLATFORM_PROMPT_FILE"
50
52
  MCP_CATALOG_DEFAULT_PATH = "./config/mcp_catalog.yaml"
51
53
  MODELS_CATALOG_DEFAULT_PATH = "./config/models_catalog.yaml"
54
+ PLATFORM_PROMPT_DEFAULT_PATH = "./config/platform_prompt.json"
52
55
 
53
56
 
54
57
  class _CatalogFile(BaseModel):
@@ -211,6 +214,80 @@ def resolve_models_catalog_path() -> Path:
211
214
  return Path(MODELS_CATALOG_DEFAULT_PATH)
212
215
 
213
216
 
217
+ class PlatformPromptFile(BaseModel):
218
+ """
219
+ Shape of `config/platform_prompt.json` — the two blocks that open every
220
+ agent's system prompt, in the order the model receives them.
221
+
222
+ Why one file with two fields:
223
+ - they are one thing, the head of the prompt, and reading them side by side
224
+ is the only way to see whether they contradict each other.
225
+
226
+ They differ in exactly one way, which the field names carry:
227
+ - `platform_prompt` is a STARTING POINT. A platform admin edits it in the
228
+ admin UI; the saved value lives in Postgres and reaches the runtime per
229
+ turn on `BoundRuntimeContext.platform_prompt`, after which this text is
230
+ no longer used.
231
+ - `platform_instructions` is SHIPPED. Nothing edits it; the admin UI renders
232
+ it read-only. It is what keeps agents coherent (call the tools you were
233
+ given, never fake a call, recover from a failed one) however the prompt
234
+ above it is rewritten.
235
+
236
+ Both are required under `extra="forbid"`: making either optional is what
237
+ would let a bad edit silently drop a block, since the runtime renders
238
+ nothing for an empty one and nothing else would fail.
239
+
240
+ `version` is not a schema version to branch on — it lets a future migration
241
+ tell a hand-edited file from a shipped default. `_comment` documents the
242
+ file for whoever opens it and is accepted but unused.
243
+
244
+ How to use:
245
+ - resolved and loaded once at pod boot by `apply_external_catalog_overrides`
246
+ - served to control-plane by `GET /agents/platform-prompt`
247
+ """
248
+
249
+ model_config = ConfigDict(extra="forbid", populate_by_name=True)
250
+
251
+ version: int
252
+ platform_prompt: str
253
+ platform_instructions: str
254
+ comment: str | None = Field(default=None, alias="_comment")
255
+
256
+
257
+ def resolve_platform_prompt_path() -> Path:
258
+ """
259
+ Resolve the canonical platform-prompt file path for one pod startup.
260
+
261
+ Why this exists:
262
+ - same env-override contract as the two catalogs above, so operators have
263
+ one mental model for "pod-shipped config file" across all three.
264
+
265
+ How to use it:
266
+ - call during config bootstrap.
267
+
268
+ Example:
269
+ - `path = resolve_platform_prompt_path()`
270
+ """
271
+
272
+ return Path(os.getenv(PLATFORM_PROMPT_ENV, PLATFORM_PROMPT_DEFAULT_PATH))
273
+
274
+
275
+ def load_platform_prompt_file(path: str | Path) -> PlatformPromptFile:
276
+ """
277
+ Read and validate `platform_prompt.json`.
278
+
279
+ Why this exists:
280
+ - one loader keeps the file's shape validated in a single place, for both
281
+ the prompt composer and the endpoint that serves it to control-plane.
282
+
283
+ How to use it:
284
+ - `file = load_platform_prompt_file("./config/platform_prompt.json")`
285
+ """
286
+
287
+ raw = json.loads(Path(path).read_text(encoding="utf-8"))
288
+ return PlatformPromptFile.model_validate(raw)
289
+
290
+
214
291
  def resolve_mcp_catalog_path() -> Path:
215
292
  """
216
293
  Resolve the canonical MCP catalog path for one pod startup.
@@ -257,6 +334,25 @@ def apply_external_catalog_overrides(config: AgentPodConfig) -> AgentPodConfig:
257
334
  models_catalog_path,
258
335
  )
259
336
 
337
+ platform_prompt_path = resolve_platform_prompt_path()
338
+ if platform_prompt_path.exists():
339
+ config.set_platform_prompt_file(load_platform_prompt_file(platform_prompt_path))
340
+ logger.info(
341
+ "[fred-runtime][config] platform prompt file loaded from %s",
342
+ platform_prompt_path,
343
+ )
344
+ else:
345
+ # Optional, unlike models_catalog.yaml: a pod with no file contributes
346
+ # neither head block, and an admin-saved platform prompt (which arrives
347
+ # per turn, not from here) still applies. Logged at WARNING, not INFO:
348
+ # a pod running without the platform instructions has lost the tool
349
+ # discipline every agent depends on, which is worth noticing.
350
+ logger.warning(
351
+ "[fred-runtime][config] no platform prompt file at %s; this pod "
352
+ "contributes no platform prompt and no platform instructions",
353
+ platform_prompt_path,
354
+ )
355
+
260
356
  mcp_catalog_path = resolve_mcp_catalog_path()
261
357
  if not mcp_catalog_path.exists():
262
358
  config.set_mcp_configuration(None)