fred-runtime 3.3.1__tar.gz → 3.3.3__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 (157) hide show
  1. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/PKG-INFO +2 -2
  2. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/README.md +0 -1
  3. fred_runtime-3.3.3/fred_runtime/__main__.py +84 -0
  4. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/app/agent_app.py +781 -51
  5. fred_runtime-3.3.3/fred_runtime/capabilities/__init__.py +103 -0
  6. fred_runtime-3.3.3/fred_runtime/capabilities/assembly.py +357 -0
  7. fred_runtime-3.3.3/fred_runtime/capabilities/assets.py +88 -0
  8. fred_runtime-3.3.3/fred_runtime/capabilities/demo.py +217 -0
  9. fred_runtime-3.3.3/fred_runtime/capabilities/demo_migrations/env.py +40 -0
  10. fred_runtime-3.3.3/fred_runtime/capabilities/demo_migrations/versions/d1e2m0a0b0c0_create_demo_echo_notes.py +53 -0
  11. fred_runtime-3.3.3/fred_runtime/capabilities/document_access/__init__.py +42 -0
  12. fred_runtime-3.3.3/fred_runtime/capabilities/document_access/capability.py +353 -0
  13. fred_runtime-3.3.3/fred_runtime/capabilities/errors.py +102 -0
  14. fred_runtime-3.3.3/fred_runtime/capabilities/mcp.py +311 -0
  15. fred_runtime-3.3.3/fred_runtime/capabilities/openapi_dump.py +65 -0
  16. fred_runtime-3.3.3/fred_runtime/capabilities/registry.py +370 -0
  17. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/context_aware_tool.py +56 -156
  18. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/mcp_runtime.py +118 -25
  19. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/mcp_utils.py +17 -8
  20. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/structures.py +9 -2
  21. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/token_expiry.py +4 -4
  22. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/graph/graph_runtime.py +0 -1
  23. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/integrations/v2_runtime/adapters.py +107 -305
  24. fred_runtime-3.3.3/fred_runtime/migrations.py +86 -0
  25. fred_runtime-3.3.3/fred_runtime/react/middleware/__init__.py +99 -0
  26. fred_runtime-3.3.3/fred_runtime/react/middleware/checkpoint_hygiene.py +115 -0
  27. fred_runtime-3.3.3/fred_runtime/react/middleware/dynamic_prompt.py +62 -0
  28. fred_runtime-3.3.3/fred_runtime/react/middleware/frame.py +127 -0
  29. fred_runtime-3.3.3/fred_runtime/react/middleware/hitl.py +340 -0
  30. fred_runtime-3.3.3/fred_runtime/react/middleware/model_routing.py +96 -0
  31. fred_runtime-3.3.3/fred_runtime/react/middleware/shared.py +43 -0
  32. fred_runtime-3.3.3/fred_runtime/react/middleware/tool_observability.py +247 -0
  33. fred_runtime-3.3.3/fred_runtime/react/middleware/tracing_kpi.py +203 -0
  34. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/react/react_langchain_adapter.py +0 -2
  35. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/react/react_model_adapter.py +5 -107
  36. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/react/react_runtime.py +38 -25
  37. fred_runtime-3.3.3/fred_runtime/react/react_tool_loop.py +131 -0
  38. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/runtime_context.py +0 -9
  39. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/runtime_support/sql_checkpointer.py +11 -2
  40. fred_runtime-3.3.3/fred_runtime/support/tool_loop.py +162 -0
  41. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime.egg-info/PKG-INFO +2 -2
  42. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime.egg-info/SOURCES.txt +36 -2
  43. fred_runtime-3.3.3/fred_runtime.egg-info/entry_points.txt +6 -0
  44. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime.egg-info/requires.txt +1 -0
  45. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/pyproject.toml +15 -1
  46. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_agent_app.py +283 -67
  47. fred_runtime-3.3.3/tests/test_capability_agent_1973.py +479 -0
  48. fred_runtime-3.3.3/tests/test_capability_chat_controls_1976.py +333 -0
  49. fred_runtime-3.3.3/tests/test_capability_chat_parts_1977.py +198 -0
  50. fred_runtime-3.3.3/tests/test_capability_document_access_1906.py +424 -0
  51. fred_runtime-3.3.3/tests/test_capability_endpoints_1974.py +597 -0
  52. fred_runtime-3.3.3/tests/test_capability_registry_1973.py +252 -0
  53. fred_runtime-3.3.3/tests/test_capability_routes_tables_1979.py +250 -0
  54. fred_runtime-3.3.3/tests/test_capability_selection_1974.py +326 -0
  55. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_context_aware_tool.py +15 -1
  56. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_kf_vector_search_toolkit.py +6 -2
  57. fred_runtime-3.3.3/tests/test_react_loop_regressions_1972.py +711 -0
  58. fred_runtime-3.3.3/tests/test_react_middleware_frame.py +384 -0
  59. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_react_thinking.py +1 -1
  60. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_runtime_context_prompt_injection.py +30 -0
  61. fred_runtime-3.3.3/tests/test_spike_capability_state_1971.py +399 -0
  62. fred_runtime-3.3.3/tests/test_tool_observability_middleware.py +461 -0
  63. fred_runtime-3.3.3/tests/test_tracing_kpi_content_confinement.py +80 -0
  64. fred_runtime-3.3.1/fred_runtime/common/kf_logs_client.py +0 -72
  65. fred_runtime-3.3.1/fred_runtime/react/react_tool_loop.py +0 -330
  66. fred_runtime-3.3.1/fred_runtime/support/tool_approval.py +0 -96
  67. fred_runtime-3.3.1/fred_runtime/support/tool_loop.py +0 -346
  68. fred_runtime-3.3.1/fred_runtime.egg-info/entry_points.txt +0 -2
  69. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/__init__.py +0 -0
  70. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/app/__init__.py +0 -0
  71. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/app/_catalogs.py +0 -0
  72. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/app/config.py +0 -0
  73. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/app/config_loader.py +0 -0
  74. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/app/container.py +0 -0
  75. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/app/context.py +0 -0
  76. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/app/dependencies.py +0 -0
  77. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/app/mcp_config.py +0 -0
  78. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/app/observability_factory.py +0 -0
  79. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/app/openai_compat_router.py +0 -0
  80. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/cli/__init__.py +0 -0
  81. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/cli/completion.py +0 -0
  82. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/cli/entrypoint.py +0 -0
  83. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/cli/history_display.py +0 -0
  84. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/cli/kpi_display.py +0 -0
  85. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/cli/pod_client.py +0 -0
  86. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/cli/repl.py +0 -0
  87. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/cli/repl_helpers.py +0 -0
  88. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/cli/url_helpers.py +0 -0
  89. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/client.py +0 -0
  90. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/__init__.py +0 -0
  91. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/kf_base_client.py +0 -0
  92. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/kf_fast_text_client.py +0 -0
  93. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/kf_http_client.py +0 -0
  94. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/kf_markdown_media_client.py +0 -0
  95. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/kf_vectorsearch_client.py +0 -0
  96. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/kf_workspace_client.py +0 -0
  97. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/mcp_interceptors.py +0 -0
  98. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/mcp_toolkit.py +0 -0
  99. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/common/tool_node_utils.py +0 -0
  100. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/deep/__init__.py +0 -0
  101. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/deep/deep_runtime.py +0 -0
  102. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/eval/__init__.py +0 -0
  103. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/eval/collector.py +0 -0
  104. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/graph/__init__.py +0 -0
  105. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/integrations/__init__.py +0 -0
  106. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/integrations/inprocess_toolkit_registry.py +0 -0
  107. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/integrations/kf_vector_search/__init__.py +0 -0
  108. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/integrations/kf_vector_search/toolkit.py +0 -0
  109. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/integrations/v2_runtime/__init__.py +0 -0
  110. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/model_routing/__init__.py +0 -0
  111. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/model_routing/catalog.py +0 -0
  112. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/model_routing/contracts.py +0 -0
  113. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/model_routing/provider.py +0 -0
  114. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/model_routing/resolver.py +0 -0
  115. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/react/__init__.py +0 -0
  116. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/react/react_message_codec.py +0 -0
  117. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/react/react_prompting.py +0 -0
  118. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/react/react_stream_adapter.py +0 -0
  119. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/react/react_tool_binding.py +0 -0
  120. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/react/react_tool_rendering.py +0 -0
  121. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/react/react_tool_resolution.py +0 -0
  122. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/react/react_tool_utils.py +0 -0
  123. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/react/react_tracing.py +0 -0
  124. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/runtime_support/__init__.py +0 -0
  125. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/runtime_support/checkpoints.py +0 -0
  126. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/runtime_support/model_metadata.py +0 -0
  127. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/runtime_support/request_context_helpers.py +0 -0
  128. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/runtime_support/user_token_refresher.py +0 -0
  129. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/support/__init__.py +0 -0
  130. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/support/filesystem_context.py +0 -0
  131. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime/support/thinking.py +0 -0
  132. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime.egg-info/dependency_links.txt +0 -0
  133. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/fred_runtime.egg-info/top_level.txt +0 -0
  134. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/setup.cfg +0 -0
  135. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_client.py +0 -0
  136. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_config_loader.py +0 -0
  137. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_context.py +0 -0
  138. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_conversational_memory.py +0 -0
  139. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_eval_collector.py +0 -0
  140. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_eval_trace.py +0 -0
  141. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_fred_workspace_fs.py +0 -0
  142. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_graph_runtime_invoke_agent.py +0 -0
  143. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_graph_runtime_observability.py +0 -0
  144. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_history.py +0 -0
  145. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_kf_workspace_client.py +0 -0
  146. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_kpi_display.py +0 -0
  147. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_mcp_config.py +0 -0
  148. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_model_routing.py +0 -0
  149. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_openai_compat_router.py +0 -0
  150. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_pod_client.py +0 -0
  151. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_react_prompting.py +0 -0
  152. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_repl_helpers.py +0 -0
  153. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_smoke.py +0 -0
  154. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_sql_checkpointer_owner.py +0 -0
  155. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_token_expiry.py +0 -0
  156. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_url_helpers.py +0 -0
  157. {fred_runtime-3.3.1 → fred_runtime-3.3.3}/tests/test_user_token_refresher.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fred-runtime
3
- Version: 3.3.1
3
+ Version: 3.3.3
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
@@ -24,6 +24,7 @@ Requires-Dist: langgraph>=1.1.3
24
24
  Requires-Dist: langfuse>=3.0.0
25
25
  Requires-Dist: requests<3,>=2.32
26
26
  Requires-Dist: PyYAML>=6.0
27
+ Requires-Dist: python-multipart>=0.0.9
27
28
  Provides-Extra: app
28
29
  Requires-Dist: fastapi>=0.139.0; extra == "app"
29
30
  Provides-Extra: dev
@@ -129,7 +130,6 @@ HTTP clients that connect agent tools to the Fred platform services:
129
130
  | `kf_vectorsearch_client` | Vector search / retrieval |
130
131
  | `kf_markdown_media_client` | Document content (Markdown + media) |
131
132
  | `kf_workspace_client` | Workspace and library management |
132
- | `kf_logs_client` | Audit log retrieval |
133
133
  | `kf_fast_text_client` | FastText classification |
134
134
  | `mcp_runtime` / `mcp_toolkit` | MCP server lifecycle and tool injection |
135
135
  | `context_aware_tool` | Tool base class that propagates the runtime context (user, team, token) |
@@ -91,7 +91,6 @@ HTTP clients that connect agent tools to the Fred platform services:
91
91
  | `kf_vectorsearch_client` | Vector search / retrieval |
92
92
  | `kf_markdown_media_client` | Document content (Markdown + media) |
93
93
  | `kf_workspace_client` | Workspace and library management |
94
- | `kf_logs_client` | Audit log retrieval |
95
94
  | `kf_fast_text_client` | FastText classification |
96
95
  | `mcp_runtime` / `mcp_toolkit` | MCP server lifecycle and tool injection |
97
96
  | `context_aware_tool` | Tool base class that propagates the runtime context (user, team, token) |
@@ -0,0 +1,84 @@
1
+ # Copyright Thales 2026
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """
16
+ `python -m fred_runtime <command>` — the pod-side operational CLI (#1979).
17
+
18
+ Commands:
19
+ - `migrate` — upgrade fred-runtime's Alembic tree, then every installed
20
+ capability's own tree (RFC §7.1). The Helm migration job points its
21
+ `command`/`args` here so deploying the pod runs all migrations.
22
+ - `dump-openapi <capability_id>` — print one capability router's OpenAPI JSON
23
+ (RFC §9.1), the `schemaFile` input for that capability's frontend codegen.
24
+ """
25
+
26
+ from __future__ import annotations
27
+
28
+ import argparse
29
+ import json
30
+ import logging
31
+ import sys
32
+
33
+
34
+ def _cmd_migrate(_args: argparse.Namespace) -> int:
35
+ from .migrations import run_all_migrations
36
+
37
+ upgraded = run_all_migrations()
38
+ print(f"migrated: {', '.join(upgraded)}")
39
+ return 0
40
+
41
+
42
+ def _cmd_dump_openapi(args: argparse.Namespace) -> int:
43
+ from .capabilities import CapabilityRegistry
44
+ from .capabilities.openapi_dump import dump_capability_openapi
45
+
46
+ registry = CapabilityRegistry()
47
+ registry.discover()
48
+ if args.capability_id not in registry:
49
+ print(
50
+ f"capability '{args.capability_id}' is not installed "
51
+ f"(installed: {', '.join(registry.ids()) or 'none'})",
52
+ file=sys.stderr,
53
+ )
54
+ return 2
55
+ document = dump_capability_openapi(registry.capability(args.capability_id))
56
+ print(json.dumps(document, indent=2))
57
+ return 0
58
+
59
+
60
+ def main(argv: list[str] | None = None) -> int:
61
+ logging.basicConfig(
62
+ level=logging.INFO, format="%(levelname)s [%(name)s] %(message)s"
63
+ )
64
+ parser = argparse.ArgumentParser(prog="fred_runtime")
65
+ sub = parser.add_subparsers(dest="command", required=True)
66
+
67
+ sub.add_parser("migrate", help="run fred-runtime + capability migrations")
68
+
69
+ dump = sub.add_parser(
70
+ "dump-openapi", help="print one capability router's OpenAPI document"
71
+ )
72
+ dump.add_argument("capability_id", help="the capability manifest id")
73
+
74
+ args = parser.parse_args(argv)
75
+ if args.command == "migrate":
76
+ return _cmd_migrate(args)
77
+ if args.command == "dump-openapi":
78
+ return _cmd_dump_openapi(args)
79
+ parser.error(f"unknown command: {args.command}")
80
+ return 2
81
+
82
+
83
+ if __name__ == "__main__":
84
+ raise SystemExit(main())