feat(files): expose governed tabular content
Module Package Release / publish-packages (push) Successful in 12s

This commit is contained in:
2026-08-21 19:29:54 +02:00
parent ce4eaefbfd
commit a8c3192c3a
7 changed files with 469 additions and 5 deletions
+55 -1
View File
@@ -14,6 +14,7 @@ from govoplan_core.core.files import (
CAPABILITY_FILES_ACCESS,
CAPABILITY_FILES_ARTIFACT_STORE,
CAPABILITY_FILES_POSTBOX_REFERENCES,
CAPABILITY_FILES_TABULAR_CONTENT,
)
from govoplan_core.core.module_guards import (
drop_table_retirement_provider,
@@ -451,7 +452,7 @@ def _dsar_provider(context: ModuleContext) -> object:
manifest = ModuleManifest(
id="files",
name="Files",
version="0.1.18",
version="0.1.19",
required_capabilities=(
CAPABILITY_AUTH_PRINCIPAL_RESOLVER,
CAPABILITY_AUTH_PERMISSION_EVALUATOR,
@@ -462,6 +463,7 @@ manifest = ModuleManifest(
ModuleInterfaceProvider(name="files.campaign_attachments", version="0.1.6"),
ModuleInterfaceProvider(name=CAPABILITY_FILES_ARTIFACT_STORE, version="0.1.14"),
ModuleInterfaceProvider(name=CAPABILITY_FILES_POSTBOX_REFERENCES, version="1.0.0"),
ModuleInterfaceProvider(name=CAPABILITY_FILES_TABULAR_CONTENT, version="1.0.0"),
ModuleInterfaceProvider(name=CAPABILITY_RECORD_SOURCE_FILES, version="1.0.0"),
ModuleInterfaceProvider(name=CAPABILITY_FORM_EVIDENCE_FILES, version="1.0.0"),
ModuleInterfaceProvider(name=FILES_DSAR_CAPABILITY, version="0.1.0"),
@@ -616,6 +618,49 @@ manifest = ModuleManifest(
),
),
documentation=(
DocumentationTopic(
id="files.tabular-content",
title="Use managed CSV and XLSX versions as governed data sources",
summary="Expose exact, authorized managed file versions to Connectors without bypassing Files controls.",
body=(
"Files lists only CSV and XLSX assets visible to the current tenant user. "
"Opening content additionally requires Files download permission and an exact immutable version reference. "
"Size ceilings are checked before storage access; checksum verification, quarantine, encryption envelopes, deletion, ownership, and shares remain authoritative in Files. "
"Connectors receives file metadata and verified bytes through the Core capability and never imports Files models, storage keys, or encryption internals. "
"A newer current version does not silently replace a pinned source version; Connectors reports the version change for explicit review."
),
layer="available",
documentation_types=("admin", "user"),
audience=("administrator", "operator", "power_user"),
related_modules=("connectors", "datasources", "dataflow"),
conditions=(
DocumentationCondition(
required_modules=("files", "connectors"),
required_scopes=("files:file:read", "files:file:download"),
),
),
links=(
DocumentationLink(
label="Files",
href="/files",
kind="runtime",
),
DocumentationLink(
label="Files handbook",
href="govoplan-files/docs/FILES_HANDBOOK.md",
kind="repository",
),
),
metadata={
"kind": "guide",
"consequence_classes": {
"pin_exact_version": "A source keeps its reviewed immutable file version until explicitly refreshed.",
"preserve_file_controls": "Files access, integrity, encryption, retention, and legal-hold controls remain authoritative.",
"fail_closed": "Unavailable, oversized, quarantined, or unauthorized content is not parsed or previewed.",
},
},
order=29,
),
DocumentationTopic(
id="files.postbox.exact-version-references",
title="Resolve exact file versions for Postbox evidence",
@@ -1702,6 +1747,10 @@ manifest = ModuleManifest(
"govoplan_files.backend.capabilities",
fromlist=["postbox_reference_capability"],
).postbox_reference_capability(context),
CAPABILITY_FILES_TABULAR_CONTENT: lambda context: __import__(
"govoplan_files.backend.capabilities",
fromlist=["managed_tabular_file_capability"],
).managed_tabular_file_capability(context),
"files.campaign_attachments": lambda context: __import__(
"govoplan_files.backend.capabilities", fromlist=["campaign_capability"]
).campaign_capability(context),
@@ -1710,6 +1759,11 @@ manifest = ModuleManifest(
FILES_DSAR_CAPABILITY: _dsar_provider,
},
capability_documentation={
CAPABILITY_FILES_TABULAR_CONTENT: CapabilityDocumentation(
label="Managed tabular file content",
summary="Lists and opens authorized exact CSV/XLSX versions with Files integrity and access controls.",
contract_version="1.0.0",
),
CAPABILITY_RECORD_SOURCE_FILES: CapabilityDocumentation(
label="Files record source",
summary="Resolves currently authorized immutable managed file versions for Records filing.",