fix: make workflow drafts explicitly opt in

This commit is contained in:
lda
2026-08-31 03:08:47 +07:00 Verified
parent 5315d4b66e
commit ce7e3ed761
15 changed files with 256 additions and 108 deletions
+9 -2
View File
@@ -14,8 +14,15 @@ from .normalize import manifest_from_openrpc
def generate_manifest() -> ContractManifest:
"""Compose the real server against an isolated store and normalize OpenRPC."""
with TemporaryDirectory(prefix="wf-contract-manifest-") as directory:
server = build_local_static_workflow_server(Path(directory) / "store")
document = cast(dict[str, object], create_rpc_app(server).get_openrpc())
# The checked contract describes the complete opt-in API. Product
# composition remains draft-free by default; contract generation is
# the deliberate compatibility seam that asks for the full surface.
server = build_local_static_workflow_server(
Path(directory) / "store", drafts=True
)
document = cast(
dict[str, object], create_rpc_app(server, drafts=True).get_openrpc()
)
# Normalization deliberately drops framework metadata that could carry
# process-local paths or transport details.
return manifest_from_openrpc(document)