Files
technocapital-singularity-z…/scripts/sources.py
T

73 lines
1.7 KiB
Python

#!/usr/bin/env python3
"""
Citation ledger for grounded answers and documents.
Delegates to `hyperstitionstud_io.ci.citation_sources` in `/workspace/hyperstitionstudio-core`,
preserving the full 11-function Python API and all 7 CLI subcommands (`reset`, `add`, `ingest`,
`quote`, `list`, `render`, `verify`) with pure local-configuration URL resolution (`workspace.toml`).
"""
from __future__ import annotations
import sys
from pathlib import Path
_REPO_ROOT = Path(__file__).resolve().parent.parent
_CORE_SRC = _REPO_ROOT.parent / "hyperstitionstudio-core" / "src"
if _CORE_SRC.is_dir() and str(_CORE_SRC) not in sys.path:
sys.path.insert(0, str(_CORE_SRC))
from hyperstitionstud_io.ci.citation_sources import ( # noqa: E402
SCHEMA_VERSION,
_CITE_RE,
_FENCE_RE,
_LedgerLock,
_MD_LINK_RE,
_MD_NOISE_RE,
_SOURCES_HEADER_RE,
_SOURCE_LINE_RE,
_UNVERIFIED_RE,
_URL_IN_TEXT_RE,
add_sources,
attach_quote,
load_ledger,
main,
normalize_url,
quote_in_evidence,
render_sources,
resolve_citation_target,
resolve_ledger_path,
resolve_repo_url_or_path,
save_ledger,
urls_from_json,
verify_draft,
)
__all__ = [
"SCHEMA_VERSION",
"_CITE_RE",
"_FENCE_RE",
"_LedgerLock",
"_MD_LINK_RE",
"_MD_NOISE_RE",
"_SOURCES_HEADER_RE",
"_SOURCE_LINE_RE",
"_UNVERIFIED_RE",
"_URL_IN_TEXT_RE",
"add_sources",
"attach_quote",
"load_ledger",
"main",
"normalize_url",
"quote_in_evidence",
"render_sources",
"resolve_citation_target",
"resolve_ledger_path",
"resolve_repo_url_or_path",
"save_ledger",
"urls_from_json",
"verify_draft",
]
if __name__ == "__main__":
raise SystemExit(main())