Audit Markdown quotations against live sources and detect drift
$ moon run cmd/main check-report examples/report.md
PASS: 1/1 quotes appear in 1 live web source
examples/report.md:5 PASS https://www.iana.org/help/example-domains
$ moon run cmd/main compare fixtures/codex-two-run-before.jsonl fixtures/codex-two-run-after.jsonl
1 source changes; 0 unchanged
[changed] file:fixtures/codex-live-run-source.txtcurl -fsSL https://cli.moonbitlang.com/install/unix.sh | bashgit clone https://github.com/Freakz2z/tracecite.git
cd tracecite
moon update
moonc -vIANA explains that “example.com and example.org are maintained for documentation purposes.” ([IANA](https://www.iana.org/help/example-domains))> 原文:“example.com and example.org are maintained for documentation purposes.”
> 来源:[IANA example domains](https://www.iana.org/help/example-domains)moon run cmd/main check-report examples/report.md
moon run cmd/main check-report examples/inline-report.md- uses: Freakz2z/tracecite@v0.4.0
with:
report: reports/research.mdclaim: IANA lists example.com and example.org as documentation examples.
quote: example.com and example.org are maintained for documentation purposes.
url: https://www.iana.org/help/example-domainsmoon run cmd/main verify-notes fixtures/simple-citation.mdmoon info
moon fmt
moon check --deny-warn
moon build --deny-warn
moon test --deny-warn
moon test --target js --deny-warn
moon test --target wasm --deny-warn
sh scripts/smoke.sh
python3 -m unittest discover -s adapters -p 'test_*.py'pub(all) struct CitationEdge {
claim_index : Int
source_id : String
call_id : String?
line : Int
evidence_status : String
} derive(ToJson)pub(all) struct CitationNote {
claim : String
quote : String
url : String
line : Int
} derive(ToJson)pub(all) struct CitationNotes {
notes : Array[CitationNote]
diagnostics : Array[Diagnostic]
} derive(ToJson)pub(all) struct DriftReport {
old_run_id : String?
new_run_id : String?
old_valid : Bool
new_valid : Bool
unchanged_count : Int
changes : Array[SourceChange]
old_diagnostics : Array[Diagnostic]
new_diagnostics : Array[Diagnostic]
} derive(ToJson)pub(all) struct LiveCitationMatch {
source_id : String
claim_index : Int
quote_present : Bool
} derive(ToJson)pub(all) struct Report {
run_id : String?
event_count : Int
call_count : Int
source_count : Int
claim_count : Int
verified_citation_count : Int
sources : Array[SourceRecord]
citations : Array[CitationEdge]
diagnostics : Array[Diagnostic]
} derive(ToJson)pub(all) struct SourceRecord {
id : String
uri : String
title : String?
call_id : String
line : Int
content_present : Bool
} derive(ToJson)fn check_live_source_quotes(input : String, uri : String, live_content : String) -> Array[LiveCitationMatch]fn normalize_web_text(input : String) -> String原文:“quoted text” 来源:title Inline-code backticks are Markdown formatting, not part of rendered quotes.
fn quote_appears_in_text(source : String, quote : String) -> Boolfn source_snapshot_matches(input : String, uri : String, live_content : String) -> BoolInstall
Download zipAudit Markdown quotations against live sources and detect drift