49 lines
1.4 KiB
Python
49 lines
1.4 KiB
Python
"""Release packaging script generating src/core/release-metadata.json."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import hashlib
|
|
import json
|
|
from pathlib import Path
|
|
|
|
|
|
def build_release_metadata() -> Path:
|
|
cfg_file = Path("runtime_config.local.json")
|
|
cfg_bytes = cfg_file.read_bytes()
|
|
cfg_sha = hashlib.sha256(cfg_bytes).hexdigest()
|
|
|
|
metadata = {
|
|
"release_version": "1.0.0",
|
|
"runtime_config_sha256": cfg_sha,
|
|
"certified_models": [
|
|
"llama-3.1-8b-instant",
|
|
"llama-3.3-70b-versatile",
|
|
"deepseek-chat",
|
|
"deepseek-reasoner",
|
|
"gpt-4o-mini",
|
|
"claude-3-haiku-20240307",
|
|
],
|
|
"schemas": {
|
|
"article_input": "1.0.0",
|
|
"ecp_snapshot": "1.0.0",
|
|
"candidates_payload": "1.0.0",
|
|
"hygiene_response": "1.0.0",
|
|
"repair_operations": "1.0.0",
|
|
"enrichment_response": "1.0.0",
|
|
"manifest_output": "1.0.0",
|
|
},
|
|
"prompts": {
|
|
"article_content_hygiene": "1.0.0",
|
|
"article_sentiment_tags": "1.0.0",
|
|
},
|
|
}
|
|
|
|
out_file = Path("src/runtime/core/release-metadata.json")
|
|
out_file.write_text(json.dumps(metadata, indent=2), encoding="utf-8")
|
|
return out_file
|
|
|
|
|
|
if __name__ == "__main__":
|
|
p = build_release_metadata()
|
|
print(f"Generated release metadata at {p}")
|