Added deterministic function layer

This commit is contained in:
2026-05-04 19:26:25 +02:00
parent 3840ff4617
commit 1197b39a76
11 changed files with 1305 additions and 16 deletions

View File

@@ -18,6 +18,7 @@ def builtin_extension_registry() -> ExtensionRegistry:
_runtime_form_state_descriptor(),
_runtime_assessment_descriptor(),
_local_label_policy_descriptor(),
_document_function_descriptor(),
]:
registry.register(descriptor)
return registry
@@ -233,3 +234,34 @@ def _local_label_policy_descriptor() -> ExtensionDescriptor:
]
},
)
def _document_function_descriptor() -> ExtensionDescriptor:
return ExtensionDescriptor(
id="document.function",
kind="document-function",
summary="Markdown-native deterministic document function registry and evaluator.",
capabilities=[
ProcessingCapability(id="document_function", kind="execute"),
ProcessingCapability(id="deterministic", kind="execution"),
ProcessingCapability(id="diagnostics", kind="emit"),
ProcessingCapability(id="provenance", kind="emit"),
],
safety={
"network": False,
"filesystem": False,
"assisted_generation": False,
"external_process": False,
},
input_contract="Markdown with {{mkt:function ...}} or mkt-function fences",
output_contract="DocumentFunctionEvaluationResult",
diagnostics_namespace="document_function",
provenance_prefix="document_function",
cli={"commands": ["mkt function list", "mkt function check", "mkt function render"]},
docs=["docs/document-functions.md"],
examples=["examples/functions/basic-functions.md"],
metadata={
"execution": "deterministic-only",
"external_policy_services_required": False,
},
)