fred-runtime 2.0.8__tar.gz → 2.0.10__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 (112) hide show
  1. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/PKG-INFO +5 -2
  2. fred_runtime-2.0.10/fred_runtime/app/container.py +27 -0
  3. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/app/context.py +14 -0
  4. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/app/dependencies.py +14 -0
  5. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/app/mcp_config.py +14 -0
  6. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/cli/__init__.py +14 -0
  7. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/cli/completion.py +14 -0
  8. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/cli/entrypoint.py +14 -0
  9. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/cli/history_display.py +14 -0
  10. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/cli/kpi_display.py +14 -0
  11. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/cli/pod_client.py +14 -0
  12. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/cli/repl.py +14 -0
  13. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/cli/repl_helpers.py +14 -0
  14. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/cli/url_helpers.py +14 -0
  15. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/client.py +14 -0
  16. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/context_aware_tool.py +21 -5
  17. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/token_expiry.py +14 -0
  18. fred_runtime-2.0.10/fred_runtime/deep/__init__.py +15 -0
  19. fred_runtime-2.0.10/fred_runtime/graph/__init__.py +15 -0
  20. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/graph/graph_runtime.py +14 -0
  21. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/integrations/v2_runtime/adapters.py +19 -1
  22. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/model_routing/__init__.py +14 -0
  23. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/model_routing/catalog.py +14 -0
  24. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/model_routing/provider.py +14 -0
  25. fred_runtime-2.0.10/fred_runtime/react/__init__.py +15 -0
  26. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/react/react_message_codec.py +14 -0
  27. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/react/react_model_adapter.py +14 -0
  28. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/react/react_tool_rendering.py +14 -0
  29. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/react/react_tool_utils.py +14 -0
  30. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/runtime_support/checkpoints.py +14 -0
  31. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/runtime_support/sql_checkpointer.py +14 -0
  32. fred_runtime-2.0.10/fred_runtime/support/__init__.py +15 -0
  33. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/support/filesystem_context.py +14 -0
  34. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/support/tool_approval.py +14 -0
  35. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/support/tool_loop.py +14 -0
  36. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime.egg-info/PKG-INFO +5 -2
  37. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime.egg-info/SOURCES.txt +1 -0
  38. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime.egg-info/requires.txt +4 -1
  39. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/pyproject.toml +10 -2
  40. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_agent_app.py +14 -0
  41. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_client.py +14 -0
  42. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_config_loader.py +14 -0
  43. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_context.py +14 -0
  44. fred_runtime-2.0.10/tests/test_context_aware_tool.py +78 -0
  45. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_conversational_memory.py +14 -0
  46. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_eval_collector.py +14 -0
  47. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_eval_trace.py +14 -0
  48. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_graph_runtime_observability.py +14 -0
  49. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_history.py +53 -0
  50. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_kpi_display.py +14 -0
  51. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_mcp_config.py +14 -0
  52. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_model_routing.py +14 -0
  53. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_openai_compat_router.py +14 -0
  54. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_pod_client.py +14 -0
  55. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_repl_helpers.py +14 -0
  56. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_smoke.py +14 -0
  57. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_token_expiry.py +14 -0
  58. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_url_helpers.py +14 -0
  59. fred_runtime-2.0.8/fred_runtime/app/container.py +0 -13
  60. fred_runtime-2.0.8/fred_runtime/deep/__init__.py +0 -1
  61. fred_runtime-2.0.8/fred_runtime/graph/__init__.py +0 -1
  62. fred_runtime-2.0.8/fred_runtime/react/__init__.py +0 -1
  63. fred_runtime-2.0.8/fred_runtime/support/__init__.py +0 -1
  64. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/README.md +0 -0
  65. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/__init__.py +0 -0
  66. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/app/__init__.py +0 -0
  67. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/app/_catalogs.py +0 -0
  68. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/app/agent_app.py +0 -0
  69. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/app/config.py +0 -0
  70. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/app/config_loader.py +0 -0
  71. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/app/observability_factory.py +0 -0
  72. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/app/openai_compat_router.py +0 -0
  73. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/__init__.py +0 -0
  74. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/kf_base_client.py +0 -0
  75. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/kf_fast_text_client.py +0 -0
  76. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/kf_http_client.py +0 -0
  77. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/kf_logs_client.py +0 -0
  78. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/kf_markdown_media_client.py +0 -0
  79. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/kf_vectorsearch_client.py +0 -0
  80. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/kf_workspace_client.py +0 -0
  81. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/mcp_interceptors.py +0 -0
  82. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/mcp_runtime.py +0 -0
  83. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/mcp_toolkit.py +0 -0
  84. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/mcp_utils.py +0 -0
  85. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/structures.py +0 -0
  86. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/common/tool_node_utils.py +0 -0
  87. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/deep/deep_runtime.py +0 -0
  88. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/eval/__init__.py +0 -0
  89. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/eval/collector.py +0 -0
  90. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/integrations/__init__.py +0 -0
  91. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/integrations/v2_runtime/__init__.py +0 -0
  92. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/model_routing/contracts.py +0 -0
  93. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/model_routing/resolver.py +0 -0
  94. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/react/react_langchain_adapter.py +0 -0
  95. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/react/react_prompting.py +0 -0
  96. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/react/react_runtime.py +0 -0
  97. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/react/react_stream_adapter.py +0 -0
  98. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/react/react_tool_binding.py +0 -0
  99. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/react/react_tool_loop.py +0 -0
  100. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/react/react_tool_resolution.py +0 -0
  101. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/react/react_tracing.py +0 -0
  102. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/runtime_context.py +0 -0
  103. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/runtime_support/__init__.py +0 -0
  104. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/runtime_support/model_metadata.py +0 -0
  105. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/runtime_support/request_context_helpers.py +0 -0
  106. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime/runtime_support/user_token_refresher.py +0 -0
  107. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime.egg-info/dependency_links.txt +0 -0
  108. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime.egg-info/entry_points.txt +0 -0
  109. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/fred_runtime.egg-info/top_level.txt +0 -0
  110. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/setup.cfg +0 -0
  111. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/tests/test_kf_workspace_client.py +0 -0
  112. {fred_runtime-2.0.8 → fred_runtime-2.0.10}/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: 2.0.8
3
+ Version: 2.0.10
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
@@ -12,8 +12,9 @@ Classifier: Programming Language :: Python :: 3 :: Only
12
12
  Classifier: Operating System :: OS Independent
13
13
  Requires-Python: <3.13,>=3.12
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: fred-core>=1.5.3
15
+ Requires-Dist: fred-core>=2.0.5
16
16
  Requires-Dist: fred-sdk>=0.1.11
17
+ Requires-Dist: alembic>=1.18.4
17
18
  Requires-Dist: deepagents>=0.4.11
18
19
  Requires-Dist: httpx>=0.28.1
19
20
  Requires-Dist: langchain-mcp-adapters>=0.2.1
@@ -30,7 +31,9 @@ Requires-Dist: bandit>=1.8.6; extra == "dev"
30
31
  Requires-Dist: basedpyright==1.31.0; extra == "dev"
31
32
  Requires-Dist: detect-secrets>=1.5.0; extra == "dev"
32
33
  Requires-Dist: pytest>=8.4.2; extra == "dev"
34
+ Requires-Dist: pytest-asyncio>=1.2.0; extra == "dev"
33
35
  Requires-Dist: pytest-cov>=6.2.1; extra == "dev"
36
+ Requires-Dist: pytest-socket>=0.7.0; extra == "dev"
34
37
  Requires-Dist: ruff>=0.12.5; extra == "dev"
35
38
 
36
39
  # fred-runtime
@@ -0,0 +1,27 @@
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
+ """Pod container factory — single composition-root entry point."""
16
+
17
+ from __future__ import annotations
18
+
19
+ from fred_runtime.app.config import AgentPodConfig
20
+ from fred_runtime.app.context import PodApplicationContext
21
+
22
+ PodContainer = PodApplicationContext
23
+
24
+
25
+ def build_pod_container(configuration: AgentPodConfig) -> PodContainer:
26
+ """Create a fresh PodApplicationContext with no side effects."""
27
+ return PodApplicationContext(configuration)
@@ -1,3 +1,17 @@
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
+
1
15
  """PodApplicationContext — single composition root for a fred-runtime agent pod."""
2
16
 
3
17
  from __future__ import annotations
@@ -1,3 +1,17 @@
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
+
1
15
  """FastAPI dependency helpers for pod container injection."""
2
16
 
3
17
  from __future__ import annotations
@@ -1,3 +1,17 @@
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
+
1
15
  """Typed representation of the mcp_catalog.yaml loaded by an agent pod."""
2
16
 
3
17
  from __future__ import annotations
@@ -1,3 +1,17 @@
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
+
1
15
  from .completion import completion_candidates
2
16
  from .entrypoint import build_parser, main
3
17
  from .history_display import (
@@ -1,3 +1,17 @@
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
+
1
15
  from __future__ import annotations
2
16
 
3
17
  from collections.abc import Sequence
@@ -1,3 +1,17 @@
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
+
1
15
  from __future__ import annotations
2
16
 
3
17
  import argparse
@@ -1,3 +1,17 @@
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
+
1
15
  from __future__ import annotations
2
16
 
3
17
  import json
@@ -1,3 +1,17 @@
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
+
1
15
  from __future__ import annotations
2
16
 
3
17
  import re
@@ -1,3 +1,17 @@
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
+
1
15
  from __future__ import annotations
2
16
 
3
17
  import json
@@ -1,3 +1,17 @@
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
+
1
15
  from __future__ import annotations
2
16
 
3
17
  import getpass
@@ -1,3 +1,17 @@
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
+
1
15
  from __future__ import annotations
2
16
 
3
17
  import uuid
@@ -1,3 +1,17 @@
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
+
1
15
  from __future__ import annotations
2
16
 
3
17
  import os
@@ -1,3 +1,17 @@
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
+
1
15
  """
2
16
  Compatibility shim — all implementation has moved to fred_runtime.cli.*
3
17
 
@@ -6,6 +6,7 @@ from typing import Any, Callable, Optional
6
6
 
7
7
  import httpx # ← we log/inspect HTTP errors coming from MCP adapters
8
8
  from fred_core.common import OwnerFilter
9
+ from fred_core.common.team_id import is_personal_team_id
9
10
  from fred_core.kpi.kpi_writer_structures import KPIActor
10
11
  from fred_sdk.support.mcp_utils import normalize_mcp_content
11
12
  from langchain_core.tools import BaseTool
@@ -20,6 +21,7 @@ from fred_runtime.runtime_context import get_runtime_context
20
21
  from fred_runtime.runtime_support import (
21
22
  RuntimeContextProvider,
22
23
  get_document_library_tags_ids,
24
+ get_document_uids,
23
25
  get_vector_search_scopes,
24
26
  )
25
27
 
@@ -170,6 +172,15 @@ class ContextAwareTool(BaseTool):
170
172
  library_ids,
171
173
  )
172
174
 
175
+ document_uids = get_document_uids(context)
176
+ if document_uids and "document_uids" in tool_properties:
177
+ kwargs["document_uids"] = document_uids
178
+ logger.info(
179
+ "ContextAwareTool(%s) injecting document filter: %s",
180
+ self.name,
181
+ document_uids,
182
+ )
183
+
173
184
  session_id = context.session_id
174
185
  if (
175
186
  session_id
@@ -183,19 +194,24 @@ class ContextAwareTool(BaseTool):
183
194
  session_id,
184
195
  )
185
196
 
186
- # Force team_id depending on agent settings
187
- if "team_id" in tool_properties and settings.team_id:
188
- kwargs["team_id"] = settings.team_id
197
+ # Force team_id depending on agent settings.
198
+ # Personal-space IDs ("personal-<uuid>") are not real ReBAC teams;
199
+ # don't forward them to tools that look up team membership.
200
+ effective_team_id = (
201
+ settings.team_id if not is_personal_team_id(settings.team_id) else None
202
+ )
203
+ if "team_id" in tool_properties and effective_team_id:
204
+ kwargs["team_id"] = effective_team_id
189
205
  logger.info(
190
206
  "ContextAwareTool(%s) injecting team_id: %s",
191
207
  self.name,
192
- settings.team_id,
208
+ effective_team_id,
193
209
  )
194
210
 
195
211
  # Force owner_filter depending on agent settings
196
212
  if "owner_filter" in tool_properties:
197
213
  owner_filter = (
198
- OwnerFilter.TEAM if settings.team_id else OwnerFilter.PERSONAL
214
+ OwnerFilter.TEAM if effective_team_id else OwnerFilter.PERSONAL
199
215
  )
200
216
  kwargs["owner_filter"] = owner_filter.value
201
217
  logger.info(
@@ -1,3 +1,17 @@
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
+
1
15
  """Shared helpers to detect expired access tokens in HTTP responses/errors."""
2
16
 
3
17
  from __future__ import annotations
@@ -0,0 +1,15 @@
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
+
@@ -0,0 +1,15 @@
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
+
@@ -1,3 +1,17 @@
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
+
1
15
  """
2
16
  Executable runtime for v2 graph agents.
3
17
 
@@ -1,3 +1,17 @@
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
+
1
15
  """
2
16
  Small adapters that make the v2 runtime usable immediately.
3
17
 
@@ -33,6 +47,7 @@ from typing import Literal, Protocol, TypedDict, cast
33
47
 
34
48
  import httpx
35
49
  from fred_core.common import OwnerFilter
50
+ from fred_core.common.team_id import is_personal_team_id
36
51
  from fred_core.kpi.base_kpi_writer import BaseKPIWriter
37
52
  from fred_core.kpi.kpi_writer_structures import KPIActor
38
53
  from fred_core.logs.log_structures import LogFilter, LogQuery, LogQueryResult
@@ -517,8 +532,11 @@ class FredKnowledgeSearchToolInvoker(ToolInvokerPort):
517
532
  search_policy=get_search_policy(runtime_context),
518
533
  owner_filter=OwnerFilter.TEAM
519
534
  if self._settings.team_id
535
+ and not is_personal_team_id(self._settings.team_id)
520
536
  else OwnerFilter.PERSONAL,
521
- team_id=self._settings.team_id,
537
+ team_id=self._settings.team_id
538
+ if not is_personal_team_id(self._settings.team_id)
539
+ else None,
522
540
  session_id=runtime_context.session_id,
523
541
  include_session_scope=include_session_scope,
524
542
  include_corpus_scope=include_corpus_scope,
@@ -1,3 +1,17 @@
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
+
1
15
  from .catalog import (
2
16
  ModelCatalog,
3
17
  load_model_catalog,
@@ -1,3 +1,17 @@
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
+
1
15
  """
2
16
  YAML catalog loader for v2 model-routing policies.
3
17
 
@@ -1,3 +1,17 @@
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
+
1
15
  """
2
16
  Provider-style adapters for routed chat-model selection.
3
17
 
@@ -0,0 +1,15 @@
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
+
@@ -1,3 +1,17 @@
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
+
1
15
  """
2
16
  Transcript conversion between Fred ReAct messages and LangChain message objects.
3
17
 
@@ -1,3 +1,17 @@
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
+
1
15
  """
2
16
  Model-call routing and tracing helpers for ReAct execution.
3
17
 
@@ -1,3 +1,17 @@
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
+
1
15
  """
2
16
  Render v2 ReAct tool results to the plain text and artifact shapes used at runtime.
3
17
 
@@ -1,3 +1,17 @@
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
+
1
15
  """
2
16
  Small shared helpers for v2 ReAct tool binding.
3
17
 
@@ -1,3 +1,17 @@
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
+
1
15
  """
2
16
  Typed async checkpoint access helpers for Fred v2.
3
17
 
@@ -1,3 +1,17 @@
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
+
1
15
  """
2
16
  Durable LangGraph-compatible checkpointer backed by Fred's shared SQL engine.
3
17