v0.27.0 — portable contracts + ARD publish path
Portable, self-contained contracts + Agentic Resource Discovery (ARD) publish path
Added
DataContract.freeze_semantic_source()— snapshots a contract's semantic source inline (metrics, relationships, metric-impacts, table column-schemas) so a serialized contract enforces identically on any machine with no filesystem access to the original dbt/Cube/YAML source. Freezing clears the machine-specificpathand normalizestype, so the content address is reproducible across machines and leaks no local paths. NewYamlSource.from_raw()↔dump_semantic_source()inverse pair — frozen snapshots are source-type-agnostic (dbt/Cube normalize to the canonical YAML-source shape).- New
agentic_data_contracts.ardmodule —build_catalog_entry()/build_ai_catalog()emit a spec-valid Agentic Resource Discoveryai-catalog.jsonentry for a contract-governed MCP server, with the frozen contract pinned as a digest-addresseddata-contractattestation in the trust manifest.contract_canonical_bytes()/contract_digest()produce the content-addressable artifact a consumer independently recomputes — so the publish→verify loop closes with no trust in the publisher's assertion.
Breaking (fail-loud)
- A declared-but-unavailable semantic source now raises
SemanticSourceUnavailableError(a new top-level export, deliberately not aFileNotFoundErrorsubclass) instead of a bareFileNotFoundError— covering missing file, a directory path, a permission error, malformed YAML, and malformed dbt JSON — so enforcement never silently degrades off the authoring box. Migration: code that caughtFileNotFoundErroraround contract/tool construction should catchSemanticSourceUnavailableError. - The
SemanticSourceprotocol gainsget_table_schemas()(affects only third-party custom sources that are frozen).SemanticSource.pathis now optional, gated by a validator requiring path-or-inline. - Existing contracts and the common path (source present, or letting errors propagate) are unaffected.
Built TDD red-first and hardened by two independent code-review passes. 688 tests green; ruff + ty clean. Full details in CHANGELOG.md.