fred-capability-document-access 4.4.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.
@@ -0,0 +1,63 @@
1
+ Metadata-Version: 2.4
2
+ Name: fred-capability-document-access
3
+ Version: 4.4.3
4
+ Summary: Fred agent capability: scoped vector search and document-tree listing over the Knowledge Flow corpus (document_access).
5
+ Author-email: Thales <noreply@thalesgroup.com>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://site.fredlab.dev
8
+ Project-URL: Repository, https://github.com/ThalesGroup/fred
9
+ Classifier: License :: OSI Approved :: Apache Software License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: <3.13,>=3.12
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: fred-core>=4.4.3
16
+ Requires-Dist: fred-sdk[agents]>=4.4.3
17
+ Requires-Dist: pydantic<3.0.0,>=2.7.0
18
+ Requires-Dist: langchain-core>=0.3.0
19
+ Provides-Extra: dev
20
+ Requires-Dist: bandit>=1.8.6; extra == "dev"
21
+ Requires-Dist: basedpyright==1.31.0; extra == "dev"
22
+ Requires-Dist: detect-secrets>=1.5.0; extra == "dev"
23
+ Requires-Dist: pytest>=8.4.2; extra == "dev"
24
+ Requires-Dist: pytest-asyncio>=1.2.0; extra == "dev"
25
+ Requires-Dist: pytest-cov>=6.2.1; extra == "dev"
26
+ Requires-Dist: pytest-socket>=0.7.0; extra == "dev"
27
+ Requires-Dist: ruff<0.16,>=0.15.22; extra == "dev"
28
+
29
+ # fred-capability-document-access
30
+
31
+ Fred agent capability giving an agent scoped access to the Knowledge Flow
32
+ document corpus: `search_documents_using_vectorization` (semantic/RAG search)
33
+ and `list_document_tree` (folder and document listing, names and uids only).
34
+
35
+ It is the reference implementation a capability author copies: real tools wired
36
+ to platform services through typed SDK ports, static config-field scoping, and
37
+ one computed chat-turn narrowing control — with no HTTP stack, no access token
38
+ and no per-turn binding anywhere in the capability.
39
+
40
+ ## Scoping
41
+
42
+ Three levels narrow each other, never widen:
43
+
44
+ turn_option ⊆ capability_config ⊆ session_binding
45
+
46
+ The capability enforces the first (`narrow_scope_ids`, in `capability.py`); the
47
+ runtime's `DocumentSearchAdapter` enforces the second. The tool signature the
48
+ model sees carries only `question` / `top_k` — scope and identity travel in the
49
+ middleware closure and can never be widened by the model.
50
+
51
+ ## Chat controls
52
+
53
+ `chat_controls(config)` emits up to four stock composer widgets behind their
54
+ config toggles: `attach_files`, `document_scope`, `search_policy`, `rag_scope`.
55
+ Their params are SDK models (`fred_sdk.contracts.models`) and carry the widget's
56
+ *default* only — the value the user picks travels on `RuntimeContext`.
57
+
58
+ ## Tests
59
+
60
+ `make test` runs offline: the ports are faked, no service is contacted. The dev
61
+ group depends on `fred-runtime` for `CapabilityRegistry` (entry-point discovery)
62
+ and `build_capability_context`; the capability itself depends only on
63
+ `fred-core` and `fred-sdk`.
@@ -0,0 +1,35 @@
1
+ # fred-capability-document-access
2
+
3
+ Fred agent capability giving an agent scoped access to the Knowledge Flow
4
+ document corpus: `search_documents_using_vectorization` (semantic/RAG search)
5
+ and `list_document_tree` (folder and document listing, names and uids only).
6
+
7
+ It is the reference implementation a capability author copies: real tools wired
8
+ to platform services through typed SDK ports, static config-field scoping, and
9
+ one computed chat-turn narrowing control — with no HTTP stack, no access token
10
+ and no per-turn binding anywhere in the capability.
11
+
12
+ ## Scoping
13
+
14
+ Three levels narrow each other, never widen:
15
+
16
+ turn_option ⊆ capability_config ⊆ session_binding
17
+
18
+ The capability enforces the first (`narrow_scope_ids`, in `capability.py`); the
19
+ runtime's `DocumentSearchAdapter` enforces the second. The tool signature the
20
+ model sees carries only `question` / `top_k` — scope and identity travel in the
21
+ middleware closure and can never be widened by the model.
22
+
23
+ ## Chat controls
24
+
25
+ `chat_controls(config)` emits up to four stock composer widgets behind their
26
+ config toggles: `attach_files`, `document_scope`, `search_policy`, `rag_scope`.
27
+ Their params are SDK models (`fred_sdk.contracts.models`) and carry the widget's
28
+ *default* only — the value the user picks travels on `RuntimeContext`.
29
+
30
+ ## Tests
31
+
32
+ `make test` runs offline: the ports are faked, no service is contacted. The dev
33
+ group depends on `fred-runtime` for `CapabilityRegistry` (entry-point discovery)
34
+ and `build_capability_context`; the capability itself depends only on
35
+ `fred-core` and `fred-sdk`.
@@ -0,0 +1,36 @@
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
+ """Scoped document access over the Knowledge Flow corpus (`document_access`).
16
+
17
+ Installing this package registers the capability through its
18
+ `fred.capabilities` entry point; see `capability.py` for the scoping
19
+ precedence and the deliberate deferrals.
20
+ """
21
+
22
+ from fred_capability_document_access.capability import (
23
+ DOCUMENT_ACCESS_TOOL_REF,
24
+ DocumentAccessCapability,
25
+ DocumentAccessConfig,
26
+ DocumentAccessTurnOptions,
27
+ narrow_scope_ids,
28
+ )
29
+
30
+ __all__ = [
31
+ "DOCUMENT_ACCESS_TOOL_REF",
32
+ "DocumentAccessCapability",
33
+ "DocumentAccessConfig",
34
+ "DocumentAccessTurnOptions",
35
+ "narrow_scope_ids",
36
+ ]