@hawkeyexl/manni 4.15.0 → 4.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -7
- package/dist/{batch-OMDKRGUE.js → batch-SAW4E46C.js} +14 -14
- package/dist/{build-YCY5MUHA.js → build-F6S3W77I.js} +15 -14
- package/dist/{calibrate-RN2NJ4FS.js → calibrate-3DW2VV7F.js} +15 -15
- package/dist/{capture-2WYROZKA.js → capture-PKEYY2VO.js} +14 -14
- package/dist/{check-LVUTWAGR.js → check-7PUIHLFM.js} +15 -15
- package/dist/{check-OIRJ6OBW.js → check-EZN7YNVF.js} +14 -15
- package/dist/{check-KRVWHF7E.js → check-LRX2YFDF.js} +13 -14
- package/dist/check-NW7GHSX6.js +47 -0
- package/dist/{cli-33E3B2FK.js → chunk-245W2Q7C.js} +133 -365
- package/dist/chunk-245W2Q7C.js.map +1 -0
- package/dist/{chunk-KN37BXVY.js → chunk-2A5OIZHT.js} +7 -7
- package/dist/{chunk-KCXQXKOL.js → chunk-2LCJNH73.js} +2 -2
- package/dist/{chunk-Q2VOXKAQ.js → chunk-2TLNAGVJ.js} +187 -159
- package/dist/chunk-2TLNAGVJ.js.map +1 -0
- package/dist/{chunk-AL4HRKSZ.js → chunk-3446DW4W.js} +2 -2
- package/dist/{chunk-UVLQRP6O.js → chunk-3UYSONT4.js} +7 -453
- package/dist/chunk-3UYSONT4.js.map +1 -0
- package/dist/{chunk-3CSEHHKB.js → chunk-4GGADKTU.js} +82 -238
- package/dist/chunk-4GGADKTU.js.map +1 -0
- package/dist/{chunk-RGRNAQG5.js → chunk-5QOTR53S.js} +7 -7
- package/dist/{chunk-GZHBMMDC.js → chunk-5VNFO2RT.js} +12 -38
- package/dist/chunk-5VNFO2RT.js.map +1 -0
- package/dist/{chunk-7EKXSSEO.js → chunk-64EDFJ5S.js} +5 -5
- package/dist/chunk-6J2ED4ED.js +545 -0
- package/dist/chunk-6J2ED4ED.js.map +1 -0
- package/dist/{chunk-FEEO7ET6.js → chunk-ABAFKOQF.js} +3 -3
- package/dist/{chunk-476DMDJ5.js → chunk-AIZBZYQM.js} +1311 -18
- package/dist/chunk-AIZBZYQM.js.map +1 -0
- package/dist/{chunk-NIQ2JSZO.js → chunk-B5R5BWMY.js} +14 -429
- package/dist/chunk-B5R5BWMY.js.map +1 -0
- package/dist/{chunk-6DYFWAZA.js → chunk-D3AO2PMV.js} +9 -9
- package/dist/{chunk-57DHX65T.js → chunk-DSJTYRI5.js} +3 -3
- package/dist/{chunk-T62SFCQY.js → chunk-DU6CXY5R.js} +47 -10
- package/dist/chunk-DU6CXY5R.js.map +1 -0
- package/dist/{chunk-OFOIBV5J.js → chunk-FAS3SRQB.js} +927 -99
- package/dist/chunk-FAS3SRQB.js.map +1 -0
- package/dist/{chunk-FYWQS35G.js → chunk-FEURGKJC.js} +2 -2
- package/dist/{chunk-46OWIAAX.js → chunk-FPPHEHPZ.js} +3 -3
- package/dist/chunk-HEVYEI6O.js +1338 -0
- package/dist/chunk-HEVYEI6O.js.map +1 -0
- package/dist/{chunk-C37OVJ35.js → chunk-IGE6CIKZ.js} +11 -2
- package/dist/chunk-IGE6CIKZ.js.map +1 -0
- package/dist/{chunk-4MYW2D2U.js → chunk-JK56UPNQ.js} +252 -425
- package/dist/chunk-JK56UPNQ.js.map +1 -0
- package/dist/{chunk-ZC2MZZR5.js → chunk-KAWS7H4C.js} +2385 -2061
- package/dist/chunk-KAWS7H4C.js.map +1 -0
- package/dist/{chunk-MAOX3524.js → chunk-KB4MNUKC.js} +2 -2
- package/dist/{chunk-Z6PZKXSP.js → chunk-KCNBM42T.js} +4 -4
- package/dist/chunk-KUXAHHDE.js +314 -0
- package/dist/chunk-KUXAHHDE.js.map +1 -0
- package/dist/{chunk-7SVFBJBE.js → chunk-LDIUA4ZG.js} +2 -2
- package/dist/{chunk-DN4LCWSA.js → chunk-M6DNOHJO.js} +3 -3
- package/dist/{chunk-TXZJESES.js → chunk-MBLVLQWI.js} +2 -2
- package/dist/{chunk-3EJVJDMX.js → chunk-MDXDTO7E.js} +6 -6
- package/dist/{chunk-WDENIUC7.js → chunk-MDZXRHIJ.js} +1 -1
- package/dist/chunk-MDZXRHIJ.js.map +1 -0
- package/dist/{chunk-IGRXQC3H.js → chunk-N25KDXOV.js} +2 -2
- package/dist/{chunk-DW22KCLN.js → chunk-NPZWOPOH.js} +3 -3
- package/dist/chunk-OZL5M764.js +443 -0
- package/dist/chunk-OZL5M764.js.map +1 -0
- package/dist/{chunk-Q62Q7CDI.js → chunk-PS4Y7EPP.js} +3 -3
- package/dist/{chunk-JTATFPWB.js → chunk-Q7E43SXN.js} +12 -7
- package/dist/{chunk-JTATFPWB.js.map → chunk-Q7E43SXN.js.map} +1 -1
- package/dist/{chunk-GUTAKJIF.js → chunk-QIKCIREY.js} +4 -4
- package/dist/{chunk-Y3GWQBJP.js → chunk-QIWSEKA6.js} +2 -2
- package/dist/{chunk-SVF3WCC7.js → chunk-TNYIXIYV.js} +6 -6
- package/dist/{chunk-SLGCRXHM.js → chunk-TUMR35B3.js} +4 -4
- package/dist/{chunk-7XHW5DZA.js → chunk-U5NSIZRS.js} +3 -3
- package/dist/chunk-UP6NBQ62.js +2 -0
- package/dist/{chunk-QEJ4GH25.js → chunk-VRMQSP7O.js} +3 -3
- package/dist/{chunk-URGALOZY.js → chunk-W7IEP7IG.js} +2 -2
- package/dist/{chunk-JHE3CYWS.js → chunk-W7XOMNYC.js} +2 -2
- package/dist/{chunk-CWGBRWP7.js → chunk-WBXVQW57.js} +6 -5
- package/dist/{chunk-CWGBRWP7.js.map → chunk-WBXVQW57.js.map} +1 -1
- package/dist/{chunk-JULE3EU3.js → chunk-WP5EKWTU.js} +7 -7
- package/dist/chunk-WRSWZEVU.js +580 -0
- package/dist/chunk-WRSWZEVU.js.map +1 -0
- package/dist/{chunk-JQPZKWIP.js → chunk-WZSL7KF2.js} +2 -2
- package/dist/{chunk-525KMBZS.js → chunk-XCEEJEVA.js} +4 -4
- package/dist/{chunk-3WQMMLIO.js → chunk-XPGK4ECA.js} +7 -7
- package/dist/{chunk-QDO5JFFV.js → chunk-XRWQQHBR.js} +2 -2
- package/dist/{chunk-IE5PXI6M.js → chunk-XWUIFSWK.js} +20 -6
- package/dist/chunk-XWUIFSWK.js.map +1 -0
- package/dist/{chunk-GLQCSDFS.js → chunk-YJHHXM5B.js} +2 -2
- package/dist/{chunk-QS3K57OJ.js → chunk-ZEYNLKOH.js} +4 -4
- package/dist/{chunk-YT5HKJWV.js → chunk-ZIXU7A4C.js} +21 -21
- package/dist/{cli-DDLLZHZW.js → cli-5ZQXVWWC.js} +18 -19
- package/dist/{cli-DDLLZHZW.js.map → cli-5ZQXVWWC.js.map} +1 -1
- package/dist/{cli-QEPVGLQ3.js → cli-D5WYQVUF.js} +18 -18
- package/dist/{cli-OKPRTVG6.js → cli-FCGGNZ5C.js} +2 -2
- package/dist/{cli-LIKI7WPR.js → cli-FNX4LXMI.js} +37 -37
- package/dist/{cli-VP6JTPFS.js → cli-LQRHK23G.js} +9 -9
- package/dist/{cli-MWUFAS2X.js → cli-LRKBCQRS.js} +9 -9
- package/dist/{cli-7JV4RM66.js → cli-NJC3H3CW.js} +15 -15
- package/dist/{cli-B4DTJ2KC.js → cli-OHKWCJIJ.js} +21 -21
- package/dist/{cli-EVACAD7K.js → cli-RKYIZ6KU.js} +634 -36
- package/dist/cli-RKYIZ6KU.js.map +1 -0
- package/dist/cli-TJDQ5GUW.js +379 -0
- package/dist/cli-TJDQ5GUW.js.map +1 -0
- package/dist/{cli-D4WXCDTS.js → cli-VC3BXCVR.js} +19 -19
- package/dist/cli.js +14 -14
- package/dist/docmeta.js +8 -8
- package/dist/{github-DV57TW5L.js → github-6PV2JTZ7.js} +13 -14
- package/dist/github-7ZT4KYQU.js +35 -0
- package/dist/graph/runtime.d.ts +633 -217
- package/dist/graph/runtime.js +1001 -370
- package/dist/graph/runtime.js.map +1 -1
- package/dist/index.d.ts +2617 -1945
- package/dist/index.js +108 -64
- package/dist/index.js.map +1 -1
- package/dist/{json-SHPUCD64.js → json-VWXLDTXR.js} +13 -14
- package/dist/{labels-3GCGYYV3.js → labels-ZJK27RL3.js} +12 -13
- package/dist/{labels-3GCGYYV3.js.map → labels-ZJK27RL3.js.map} +1 -1
- package/dist/{lint-RE4DMI6E.js → lint-5OERIERT.js} +13 -13
- package/dist/{list-ZR3KY556.js → list-MANBRF7Z.js} +13 -14
- package/dist/{list-F56MEJXR.js → list-SEEANTU6.js} +15 -15
- package/dist/{page-G7XSO4FD.js → page-O4M65KMJ.js} +13 -14
- package/dist/{prepare-WHMWP7BG.js → prepare-3WULLZER.js} +13 -13
- package/dist/{pretty-VTJVXWRK.js → pretty-5FRBLTXU.js} +13 -14
- package/dist/{pretty-YVRRWBWN.js → pretty-D3M366JD.js} +14 -15
- package/dist/{reporters-G5R4SURQ.js → reporters-4WWZRHKI.js} +4 -4
- package/dist/{reporters-FSXJ42EB.js → reporters-6TEJDXXO.js} +4 -4
- package/dist/{reporters-MHPY4HRA.js → reporters-GDCZ5P7C.js} +12 -12
- package/dist/{run-FSYOYEPR.js → run-TZDLG6EN.js} +16 -16
- package/dist/sarif-PUZAMEFQ.js +36 -0
- package/dist/{sarif-HBQIDY7T.js → sarif-SSSPOUCK.js} +11 -11
- package/dist/site/rehype.d.ts +33 -0
- package/dist/site/rehype.js +49 -0
- package/dist/site/rehype.js.map +1 -0
- package/dist/{term-ABHGACYE.js → term-DHWMUL5N.js} +18 -19
- package/dist/{term-ABHGACYE.js.map → term-DHWMUL5N.js.map} +1 -1
- package/dist/{types-VMOT7RAL.js → types-7N7ETP3W.js} +2 -2
- package/dist/{validate-DXYUUGUD.js → validate-4AW7KIIY.js} +5 -5
- package/package.json +10 -1
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/shapes/graph/shapes-1.2.0.ttl +1161 -0
- package/dist/check-MR7IG7IP.js +0 -36
- package/dist/chunk-3CSEHHKB.js.map +0 -1
- package/dist/chunk-476DMDJ5.js.map +0 -1
- package/dist/chunk-4MYW2D2U.js.map +0 -1
- package/dist/chunk-C37OVJ35.js.map +0 -1
- package/dist/chunk-GZHBMMDC.js.map +0 -1
- package/dist/chunk-IE5PXI6M.js.map +0 -1
- package/dist/chunk-IKEWBMCN.js +0 -98
- package/dist/chunk-IKEWBMCN.js.map +0 -1
- package/dist/chunk-NIQ2JSZO.js.map +0 -1
- package/dist/chunk-OFOIBV5J.js.map +0 -1
- package/dist/chunk-Q2VOXKAQ.js.map +0 -1
- package/dist/chunk-T62SFCQY.js.map +0 -1
- package/dist/chunk-UPUJJOKB.js +0 -236
- package/dist/chunk-UPUJJOKB.js.map +0 -1
- package/dist/chunk-UVLQRP6O.js.map +0 -1
- package/dist/chunk-WDENIUC7.js.map +0 -1
- package/dist/chunk-YUTVAMWW.js +0 -2
- package/dist/chunk-ZC2MZZR5.js.map +0 -1
- package/dist/cli-33E3B2FK.js.map +0 -1
- package/dist/cli-EVACAD7K.js.map +0 -1
- package/dist/github-SGX2EARO.js +0 -36
- package/dist/sarif-RRUFJZUL.js +0 -37
- /package/dist/{batch-OMDKRGUE.js.map → batch-SAW4E46C.js.map} +0 -0
- /package/dist/{build-YCY5MUHA.js.map → build-F6S3W77I.js.map} +0 -0
- /package/dist/{calibrate-RN2NJ4FS.js.map → calibrate-3DW2VV7F.js.map} +0 -0
- /package/dist/{capture-2WYROZKA.js.map → capture-PKEYY2VO.js.map} +0 -0
- /package/dist/{check-LVUTWAGR.js.map → check-7PUIHLFM.js.map} +0 -0
- /package/dist/{check-KRVWHF7E.js.map → check-EZN7YNVF.js.map} +0 -0
- /package/dist/{check-MR7IG7IP.js.map → check-LRX2YFDF.js.map} +0 -0
- /package/dist/{check-OIRJ6OBW.js.map → check-NW7GHSX6.js.map} +0 -0
- /package/dist/{chunk-KN37BXVY.js.map → chunk-2A5OIZHT.js.map} +0 -0
- /package/dist/{chunk-KCXQXKOL.js.map → chunk-2LCJNH73.js.map} +0 -0
- /package/dist/{chunk-AL4HRKSZ.js.map → chunk-3446DW4W.js.map} +0 -0
- /package/dist/{chunk-RGRNAQG5.js.map → chunk-5QOTR53S.js.map} +0 -0
- /package/dist/{chunk-7EKXSSEO.js.map → chunk-64EDFJ5S.js.map} +0 -0
- /package/dist/{chunk-FEEO7ET6.js.map → chunk-ABAFKOQF.js.map} +0 -0
- /package/dist/{chunk-6DYFWAZA.js.map → chunk-D3AO2PMV.js.map} +0 -0
- /package/dist/{chunk-57DHX65T.js.map → chunk-DSJTYRI5.js.map} +0 -0
- /package/dist/{chunk-FYWQS35G.js.map → chunk-FEURGKJC.js.map} +0 -0
- /package/dist/{chunk-46OWIAAX.js.map → chunk-FPPHEHPZ.js.map} +0 -0
- /package/dist/{chunk-MAOX3524.js.map → chunk-KB4MNUKC.js.map} +0 -0
- /package/dist/{chunk-Z6PZKXSP.js.map → chunk-KCNBM42T.js.map} +0 -0
- /package/dist/{chunk-7SVFBJBE.js.map → chunk-LDIUA4ZG.js.map} +0 -0
- /package/dist/{chunk-DN4LCWSA.js.map → chunk-M6DNOHJO.js.map} +0 -0
- /package/dist/{chunk-TXZJESES.js.map → chunk-MBLVLQWI.js.map} +0 -0
- /package/dist/{chunk-3EJVJDMX.js.map → chunk-MDXDTO7E.js.map} +0 -0
- /package/dist/{chunk-IGRXQC3H.js.map → chunk-N25KDXOV.js.map} +0 -0
- /package/dist/{chunk-DW22KCLN.js.map → chunk-NPZWOPOH.js.map} +0 -0
- /package/dist/{chunk-Q62Q7CDI.js.map → chunk-PS4Y7EPP.js.map} +0 -0
- /package/dist/{chunk-GUTAKJIF.js.map → chunk-QIKCIREY.js.map} +0 -0
- /package/dist/{chunk-Y3GWQBJP.js.map → chunk-QIWSEKA6.js.map} +0 -0
- /package/dist/{chunk-SVF3WCC7.js.map → chunk-TNYIXIYV.js.map} +0 -0
- /package/dist/{chunk-SLGCRXHM.js.map → chunk-TUMR35B3.js.map} +0 -0
- /package/dist/{chunk-7XHW5DZA.js.map → chunk-U5NSIZRS.js.map} +0 -0
- /package/dist/{chunk-YUTVAMWW.js.map → chunk-UP6NBQ62.js.map} +0 -0
- /package/dist/{chunk-QEJ4GH25.js.map → chunk-VRMQSP7O.js.map} +0 -0
- /package/dist/{chunk-URGALOZY.js.map → chunk-W7IEP7IG.js.map} +0 -0
- /package/dist/{chunk-JHE3CYWS.js.map → chunk-W7XOMNYC.js.map} +0 -0
- /package/dist/{chunk-JULE3EU3.js.map → chunk-WP5EKWTU.js.map} +0 -0
- /package/dist/{chunk-JQPZKWIP.js.map → chunk-WZSL7KF2.js.map} +0 -0
- /package/dist/{chunk-525KMBZS.js.map → chunk-XCEEJEVA.js.map} +0 -0
- /package/dist/{chunk-3WQMMLIO.js.map → chunk-XPGK4ECA.js.map} +0 -0
- /package/dist/{chunk-QDO5JFFV.js.map → chunk-XRWQQHBR.js.map} +0 -0
- /package/dist/{chunk-GLQCSDFS.js.map → chunk-YJHHXM5B.js.map} +0 -0
- /package/dist/{chunk-QS3K57OJ.js.map → chunk-ZEYNLKOH.js.map} +0 -0
- /package/dist/{chunk-YT5HKJWV.js.map → chunk-ZIXU7A4C.js.map} +0 -0
- /package/dist/{cli-QEPVGLQ3.js.map → cli-D5WYQVUF.js.map} +0 -0
- /package/dist/{cli-OKPRTVG6.js.map → cli-FCGGNZ5C.js.map} +0 -0
- /package/dist/{cli-LIKI7WPR.js.map → cli-FNX4LXMI.js.map} +0 -0
- /package/dist/{cli-VP6JTPFS.js.map → cli-LQRHK23G.js.map} +0 -0
- /package/dist/{cli-MWUFAS2X.js.map → cli-LRKBCQRS.js.map} +0 -0
- /package/dist/{cli-7JV4RM66.js.map → cli-NJC3H3CW.js.map} +0 -0
- /package/dist/{cli-B4DTJ2KC.js.map → cli-OHKWCJIJ.js.map} +0 -0
- /package/dist/{cli-D4WXCDTS.js.map → cli-VC3BXCVR.js.map} +0 -0
- /package/dist/{github-DV57TW5L.js.map → github-6PV2JTZ7.js.map} +0 -0
- /package/dist/{github-SGX2EARO.js.map → github-7ZT4KYQU.js.map} +0 -0
- /package/dist/{json-SHPUCD64.js.map → json-VWXLDTXR.js.map} +0 -0
- /package/dist/{lint-RE4DMI6E.js.map → lint-5OERIERT.js.map} +0 -0
- /package/dist/{list-F56MEJXR.js.map → list-MANBRF7Z.js.map} +0 -0
- /package/dist/{list-ZR3KY556.js.map → list-SEEANTU6.js.map} +0 -0
- /package/dist/{page-G7XSO4FD.js.map → page-O4M65KMJ.js.map} +0 -0
- /package/dist/{prepare-WHMWP7BG.js.map → prepare-3WULLZER.js.map} +0 -0
- /package/dist/{pretty-VTJVXWRK.js.map → pretty-5FRBLTXU.js.map} +0 -0
- /package/dist/{pretty-YVRRWBWN.js.map → pretty-D3M366JD.js.map} +0 -0
- /package/dist/{reporters-FSXJ42EB.js.map → reporters-4WWZRHKI.js.map} +0 -0
- /package/dist/{reporters-G5R4SURQ.js.map → reporters-6TEJDXXO.js.map} +0 -0
- /package/dist/{reporters-MHPY4HRA.js.map → reporters-GDCZ5P7C.js.map} +0 -0
- /package/dist/{run-FSYOYEPR.js.map → run-TZDLG6EN.js.map} +0 -0
- /package/dist/{sarif-HBQIDY7T.js.map → sarif-PUZAMEFQ.js.map} +0 -0
- /package/dist/{sarif-RRUFJZUL.js.map → sarif-SSSPOUCK.js.map} +0 -0
- /package/dist/{types-VMOT7RAL.js.map → types-7N7ETP3W.js.map} +0 -0
- /package/dist/{validate-DXYUUGUD.js.map → validate-4AW7KIIY.js.map} +0 -0
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
ManifestSet,
|
|
4
|
+
appendFrontmatterCitation,
|
|
5
|
+
entryObject,
|
|
6
|
+
insertStatementBefore,
|
|
7
|
+
itemLine,
|
|
8
|
+
mintCitation,
|
|
9
|
+
removeFrontmatterCitations,
|
|
10
|
+
removeLine,
|
|
11
|
+
runAdd,
|
|
12
|
+
runHistory,
|
|
13
|
+
runRemove,
|
|
14
|
+
runUpdate,
|
|
15
|
+
shiftedEntries,
|
|
16
|
+
splice,
|
|
17
|
+
spliceEntryField,
|
|
18
|
+
unifiedDiff,
|
|
19
|
+
withClaimLines
|
|
20
|
+
} from "./chunk-ZIXU7A4C.js";
|
|
21
|
+
import {
|
|
22
|
+
CITATIONS_KEY,
|
|
23
|
+
CITE_SECTION,
|
|
24
|
+
DEFAULT_CITE_BASELINE_PATH,
|
|
25
|
+
GIT_UNAVAILABLE_COMMIT,
|
|
26
|
+
GIT_UNAVAILABLE_HISTORY,
|
|
27
|
+
MAX_PAGE_COMMITS,
|
|
28
|
+
PAGE_HISTORY_UNAVAILABLE,
|
|
29
|
+
SOURCE_HISTORY_UNAVAILABLE,
|
|
30
|
+
buildSourceIndex,
|
|
31
|
+
checkCitations,
|
|
32
|
+
claimDiff,
|
|
33
|
+
claimHistory,
|
|
34
|
+
claimWords,
|
|
35
|
+
classifyCitation,
|
|
36
|
+
decryptSourcePath,
|
|
37
|
+
duplicateJoinRefusal,
|
|
38
|
+
encryptSourcePath,
|
|
39
|
+
gitClient,
|
|
40
|
+
historyOf,
|
|
41
|
+
holdsWords,
|
|
42
|
+
loadCitationSidecars,
|
|
43
|
+
loadCiteConfig,
|
|
44
|
+
noGit,
|
|
45
|
+
orphanRefusal,
|
|
46
|
+
parseCiteConfig,
|
|
47
|
+
readCiteConfigFile,
|
|
48
|
+
readSource,
|
|
49
|
+
refineClaim,
|
|
50
|
+
resolveCiteRun,
|
|
51
|
+
runCheck,
|
|
52
|
+
runsHolding,
|
|
53
|
+
sentencesOf,
|
|
54
|
+
sharesSentence,
|
|
55
|
+
sidecarsFor,
|
|
56
|
+
sourceBaseline,
|
|
57
|
+
stripMarkers,
|
|
58
|
+
twoManifestsRefusal,
|
|
59
|
+
urlManifestRefusal
|
|
60
|
+
} from "./chunk-D3AO2PMV.js";
|
|
61
|
+
import {
|
|
62
|
+
renderCheckJson,
|
|
63
|
+
renderHistoryJson,
|
|
64
|
+
renderRemoveJson,
|
|
65
|
+
renderUpdateJson
|
|
66
|
+
} from "./chunk-5D24C6WM.js";
|
|
67
|
+
import {
|
|
68
|
+
renderCheckGithub
|
|
69
|
+
} from "./chunk-VRMQSP7O.js";
|
|
70
|
+
import {
|
|
71
|
+
refusalLine,
|
|
72
|
+
removalLine,
|
|
73
|
+
renderCheckPretty,
|
|
74
|
+
renderHistoryPretty,
|
|
75
|
+
renderRemovePretty,
|
|
76
|
+
renderUpdatePretty,
|
|
77
|
+
rewriteLine
|
|
78
|
+
} from "./chunk-PS4Y7EPP.js";
|
|
79
|
+
import {
|
|
80
|
+
blockMatches,
|
|
81
|
+
claimEnd,
|
|
82
|
+
claimLine,
|
|
83
|
+
claimMessageFor,
|
|
84
|
+
errorSite,
|
|
85
|
+
findingsFor,
|
|
86
|
+
markerClaimEnd,
|
|
87
|
+
markerUnit,
|
|
88
|
+
messageFor,
|
|
89
|
+
misplacedMarkerAt,
|
|
90
|
+
misplacedMarkers,
|
|
91
|
+
misplacedMessageFor,
|
|
92
|
+
movedUnit,
|
|
93
|
+
noUnitAt,
|
|
94
|
+
normalizeWhitespace,
|
|
95
|
+
pre43Span,
|
|
96
|
+
shortCommit,
|
|
97
|
+
shortLine,
|
|
98
|
+
shortPin,
|
|
99
|
+
shortSrc,
|
|
100
|
+
spellAt,
|
|
101
|
+
toValidationResult,
|
|
102
|
+
unitAt,
|
|
103
|
+
unitText
|
|
104
|
+
} from "./chunk-5VNFO2RT.js";
|
|
105
|
+
import {
|
|
106
|
+
CITE_RULES,
|
|
107
|
+
CiteError,
|
|
108
|
+
DEFAULT_SEVERITY,
|
|
109
|
+
FILE_PATTERN,
|
|
110
|
+
MARKER_JSON,
|
|
111
|
+
MAX_MARKERS_PER_PAGE,
|
|
112
|
+
RULE_ID_PREFIX,
|
|
113
|
+
SRC_PATTERN,
|
|
114
|
+
citationInputs,
|
|
115
|
+
formatSrc,
|
|
116
|
+
formatStatement,
|
|
117
|
+
hashRange,
|
|
118
|
+
isCiteRule,
|
|
119
|
+
ownedMessage,
|
|
120
|
+
parseSrc,
|
|
121
|
+
pickExtractor,
|
|
122
|
+
rangeLines,
|
|
123
|
+
readPage,
|
|
124
|
+
resolveSeverity,
|
|
125
|
+
ruleId,
|
|
126
|
+
sliceLines,
|
|
127
|
+
sourceRange,
|
|
128
|
+
spellSource,
|
|
129
|
+
validateEntry
|
|
130
|
+
} from "./chunk-3UYSONT4.js";
|
|
131
|
+
import {
|
|
132
|
+
MAX_RANGE_LINES,
|
|
133
|
+
MOVE_BUDGET_BYTES,
|
|
134
|
+
MOVE_WINDOW_LINES,
|
|
135
|
+
anchoredLines,
|
|
136
|
+
bodyLineOf,
|
|
137
|
+
detectEol,
|
|
138
|
+
fenceSpanAt,
|
|
139
|
+
fencedBlockAfter,
|
|
140
|
+
fencedBlockAt,
|
|
141
|
+
fencedBlocks,
|
|
142
|
+
findWindows,
|
|
143
|
+
hashLines,
|
|
144
|
+
insideFence,
|
|
145
|
+
isBoundLine,
|
|
146
|
+
isKeyedPin,
|
|
147
|
+
isTableRow,
|
|
148
|
+
isUnitText,
|
|
149
|
+
lineAt,
|
|
150
|
+
lineSpec,
|
|
151
|
+
markerRunAt,
|
|
152
|
+
normalizeText,
|
|
153
|
+
offsetOfLine,
|
|
154
|
+
paragraphAfter,
|
|
155
|
+
parseLines,
|
|
156
|
+
parseStatements,
|
|
157
|
+
pinOfLines,
|
|
158
|
+
spellLines,
|
|
159
|
+
splitLines,
|
|
160
|
+
splitUnit,
|
|
161
|
+
statementForms,
|
|
162
|
+
toBodyLines,
|
|
163
|
+
toFileLines
|
|
164
|
+
} from "./chunk-AIZBZYQM.js";
|
|
165
|
+
import {
|
|
166
|
+
__export
|
|
167
|
+
} from "./chunk-2H7UOFLK.js";
|
|
168
|
+
|
|
169
|
+
// src/cite/index.ts
|
|
170
|
+
var cite_exports = {};
|
|
171
|
+
__export(cite_exports, {
|
|
172
|
+
CITATIONS_KEY: () => CITATIONS_KEY,
|
|
173
|
+
CITE_RULES: () => CITE_RULES,
|
|
174
|
+
CITE_SECTION: () => CITE_SECTION,
|
|
175
|
+
CiteError: () => CiteError,
|
|
176
|
+
DEFAULT_CITE_BASELINE_PATH: () => DEFAULT_CITE_BASELINE_PATH,
|
|
177
|
+
DEFAULT_SEVERITY: () => DEFAULT_SEVERITY,
|
|
178
|
+
FILE_PATTERN: () => FILE_PATTERN,
|
|
179
|
+
GIT_UNAVAILABLE_COMMIT: () => GIT_UNAVAILABLE_COMMIT,
|
|
180
|
+
GIT_UNAVAILABLE_HISTORY: () => GIT_UNAVAILABLE_HISTORY,
|
|
181
|
+
MARKER_JSON: () => MARKER_JSON,
|
|
182
|
+
MAX_MARKERS_PER_PAGE: () => MAX_MARKERS_PER_PAGE,
|
|
183
|
+
MAX_PAGE_COMMITS: () => MAX_PAGE_COMMITS,
|
|
184
|
+
MAX_RANGE_LINES: () => MAX_RANGE_LINES,
|
|
185
|
+
MOVE_BUDGET_BYTES: () => MOVE_BUDGET_BYTES,
|
|
186
|
+
MOVE_WINDOW_LINES: () => MOVE_WINDOW_LINES,
|
|
187
|
+
ManifestSet: () => ManifestSet,
|
|
188
|
+
PAGE_HISTORY_UNAVAILABLE: () => PAGE_HISTORY_UNAVAILABLE,
|
|
189
|
+
RULE_ID_PREFIX: () => RULE_ID_PREFIX,
|
|
190
|
+
SOURCE_HISTORY_UNAVAILABLE: () => SOURCE_HISTORY_UNAVAILABLE,
|
|
191
|
+
SRC_PATTERN: () => SRC_PATTERN,
|
|
192
|
+
anchoredLines: () => anchoredLines,
|
|
193
|
+
appendFrontmatterCitation: () => appendFrontmatterCitation,
|
|
194
|
+
blockMatches: () => blockMatches,
|
|
195
|
+
bodyLineOf: () => bodyLineOf,
|
|
196
|
+
buildSourceIndex: () => buildSourceIndex,
|
|
197
|
+
checkCitations: () => checkCitations,
|
|
198
|
+
citationInputs: () => citationInputs,
|
|
199
|
+
claimDiff: () => claimDiff,
|
|
200
|
+
claimEnd: () => claimEnd,
|
|
201
|
+
claimHistory: () => claimHistory,
|
|
202
|
+
claimLine: () => claimLine,
|
|
203
|
+
claimMessageFor: () => claimMessageFor,
|
|
204
|
+
claimWords: () => claimWords,
|
|
205
|
+
classifyCitation: () => classifyCitation,
|
|
206
|
+
detectEol: () => detectEol,
|
|
207
|
+
duplicateJoinRefusal: () => duplicateJoinRefusal,
|
|
208
|
+
entryObject: () => entryObject,
|
|
209
|
+
errorSite: () => errorSite,
|
|
210
|
+
fenceSpanAt: () => fenceSpanAt,
|
|
211
|
+
fencedBlockAfter: () => fencedBlockAfter,
|
|
212
|
+
fencedBlockAt: () => fencedBlockAt,
|
|
213
|
+
fencedBlocks: () => fencedBlocks,
|
|
214
|
+
findWindows: () => findWindows,
|
|
215
|
+
findingsFor: () => findingsFor,
|
|
216
|
+
formatSrc: () => formatSrc,
|
|
217
|
+
formatStatement: () => formatStatement,
|
|
218
|
+
gitClient: () => gitClient,
|
|
219
|
+
hashLines: () => hashLines,
|
|
220
|
+
hashRange: () => hashRange,
|
|
221
|
+
historyOf: () => historyOf,
|
|
222
|
+
holdsWords: () => holdsWords,
|
|
223
|
+
insertStatementBefore: () => insertStatementBefore,
|
|
224
|
+
insideFence: () => insideFence,
|
|
225
|
+
isBoundLine: () => isBoundLine,
|
|
226
|
+
isCiteRule: () => isCiteRule,
|
|
227
|
+
isKeyedPin: () => isKeyedPin,
|
|
228
|
+
isTableRow: () => isTableRow,
|
|
229
|
+
isUnitText: () => isUnitText,
|
|
230
|
+
itemLine: () => itemLine,
|
|
231
|
+
lineAt: () => lineAt,
|
|
232
|
+
lineSpec: () => lineSpec,
|
|
233
|
+
loadCitationSidecars: () => loadCitationSidecars,
|
|
234
|
+
loadCiteConfig: () => loadCiteConfig,
|
|
235
|
+
markerClaimEnd: () => markerClaimEnd,
|
|
236
|
+
markerRunAt: () => markerRunAt,
|
|
237
|
+
markerUnit: () => markerUnit,
|
|
238
|
+
messageFor: () => messageFor,
|
|
239
|
+
mintCitation: () => mintCitation,
|
|
240
|
+
misplacedMarkerAt: () => misplacedMarkerAt,
|
|
241
|
+
misplacedMarkers: () => misplacedMarkers,
|
|
242
|
+
misplacedMessageFor: () => misplacedMessageFor,
|
|
243
|
+
movedUnit: () => movedUnit,
|
|
244
|
+
noGit: () => noGit,
|
|
245
|
+
noUnitAt: () => noUnitAt,
|
|
246
|
+
normalizeText: () => normalizeText,
|
|
247
|
+
normalizeWhitespace: () => normalizeWhitespace,
|
|
248
|
+
offsetOfLine: () => offsetOfLine,
|
|
249
|
+
orphanRefusal: () => orphanRefusal,
|
|
250
|
+
ownedMessage: () => ownedMessage,
|
|
251
|
+
paragraphAfter: () => paragraphAfter,
|
|
252
|
+
parseCiteConfig: () => parseCiteConfig,
|
|
253
|
+
parseLines: () => parseLines,
|
|
254
|
+
parseSrc: () => parseSrc,
|
|
255
|
+
parseStatements: () => parseStatements,
|
|
256
|
+
pickExtractor: () => pickExtractor,
|
|
257
|
+
pinOfLines: () => pinOfLines,
|
|
258
|
+
pre43Span: () => pre43Span,
|
|
259
|
+
rangeLines: () => rangeLines,
|
|
260
|
+
readCiteConfigFile: () => readCiteConfigFile,
|
|
261
|
+
readPage: () => readPage,
|
|
262
|
+
readSource: () => readSource,
|
|
263
|
+
reencryptCitationEntries: () => reencryptCitationEntries,
|
|
264
|
+
reencryptCitations: () => reencryptCitations,
|
|
265
|
+
refineClaim: () => refineClaim,
|
|
266
|
+
refusalLine: () => refusalLine,
|
|
267
|
+
removalLine: () => removalLine,
|
|
268
|
+
removeFrontmatterCitations: () => removeFrontmatterCitations,
|
|
269
|
+
removeLine: () => removeLine,
|
|
270
|
+
renderCheckGithub: () => renderCheckGithub,
|
|
271
|
+
renderCheckJson: () => renderCheckJson,
|
|
272
|
+
renderCheckPretty: () => renderCheckPretty,
|
|
273
|
+
renderHistoryJson: () => renderHistoryJson,
|
|
274
|
+
renderHistoryPretty: () => renderHistoryPretty,
|
|
275
|
+
renderRemoveJson: () => renderRemoveJson,
|
|
276
|
+
renderRemovePretty: () => renderRemovePretty,
|
|
277
|
+
renderUpdateJson: () => renderUpdateJson,
|
|
278
|
+
renderUpdatePretty: () => renderUpdatePretty,
|
|
279
|
+
resolveCiteRun: () => resolveCiteRun,
|
|
280
|
+
resolveSeverity: () => resolveSeverity,
|
|
281
|
+
rewriteLine: () => rewriteLine,
|
|
282
|
+
ruleId: () => ruleId,
|
|
283
|
+
runAdd: () => runAdd,
|
|
284
|
+
runCheck: () => runCheck,
|
|
285
|
+
runHistory: () => runHistory,
|
|
286
|
+
runRemove: () => runRemove,
|
|
287
|
+
runUpdate: () => runUpdate,
|
|
288
|
+
runsHolding: () => runsHolding,
|
|
289
|
+
sentencesOf: () => sentencesOf,
|
|
290
|
+
sharesSentence: () => sharesSentence,
|
|
291
|
+
shiftedEntries: () => shiftedEntries,
|
|
292
|
+
shortCommit: () => shortCommit,
|
|
293
|
+
shortLine: () => shortLine,
|
|
294
|
+
shortPin: () => shortPin,
|
|
295
|
+
shortSrc: () => shortSrc,
|
|
296
|
+
sidecarsFor: () => sidecarsFor,
|
|
297
|
+
sliceLines: () => sliceLines,
|
|
298
|
+
sourceRange: () => sourceRange,
|
|
299
|
+
spellAt: () => spellAt,
|
|
300
|
+
spellLines: () => spellLines,
|
|
301
|
+
spellSource: () => spellSource,
|
|
302
|
+
splice: () => splice,
|
|
303
|
+
spliceEntryField: () => spliceEntryField,
|
|
304
|
+
splitLines: () => splitLines,
|
|
305
|
+
splitUnit: () => splitUnit,
|
|
306
|
+
statementForms: () => statementForms,
|
|
307
|
+
stripMarkers: () => stripMarkers,
|
|
308
|
+
toBodyLines: () => toBodyLines,
|
|
309
|
+
toFileLines: () => toFileLines,
|
|
310
|
+
toValidationResult: () => toValidationResult,
|
|
311
|
+
twoManifestsRefusal: () => twoManifestsRefusal,
|
|
312
|
+
unifiedDiff: () => unifiedDiff,
|
|
313
|
+
unitAt: () => unitAt,
|
|
314
|
+
unitText: () => unitText,
|
|
315
|
+
urlManifestRefusal: () => urlManifestRefusal,
|
|
316
|
+
validateEntry: () => validateEntry,
|
|
317
|
+
withClaimLines: () => withClaimLines
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
// src/cite/core/reencrypt.ts
|
|
321
|
+
var UNDECRYPTABLE = "does not decrypt under the current key";
|
|
322
|
+
var MISSING = "missing (no tracked file matches)";
|
|
323
|
+
var CHANGED = "changed; run `manni cite update --accept` before rotating";
|
|
324
|
+
function whereOf(citation, origin) {
|
|
325
|
+
const where = { index: origin.index };
|
|
326
|
+
if (citation.id !== void 0) where.id = citation.id;
|
|
327
|
+
if (origin.line !== void 0) where.line = origin.line;
|
|
328
|
+
return where;
|
|
329
|
+
}
|
|
330
|
+
async function pinnedLines(ctx, citation, range, path, key) {
|
|
331
|
+
const source = await readSource(ctx.root, ctx.index, { ...range, path, encrypted: false });
|
|
332
|
+
if (source.kind === "missing") return { skip: MISSING };
|
|
333
|
+
const pin = citation.source.integrity;
|
|
334
|
+
let joined;
|
|
335
|
+
try {
|
|
336
|
+
joined = sliceLines(splitLines(source.text), range);
|
|
337
|
+
} catch {
|
|
338
|
+
joined = void 0;
|
|
339
|
+
}
|
|
340
|
+
if (joined !== void 0 && hashLines(joined, key) === pin) return { joined };
|
|
341
|
+
if (await ctx.git.available()) {
|
|
342
|
+
const recorded = citation.source["commit-sha"];
|
|
343
|
+
const { history } = await sourceBaseline(ctx.git, recorded, path, range, pin, key, void 0);
|
|
344
|
+
if (history.kind === "original") return { joined: history.lines.join("\n") };
|
|
345
|
+
}
|
|
346
|
+
return { skip: CHANGED };
|
|
347
|
+
}
|
|
348
|
+
async function verdictFor(ctx, citation, opts) {
|
|
349
|
+
const range = sourceRange(citation.source);
|
|
350
|
+
const underNew = decryptSourcePath(range.path, opts.toKey);
|
|
351
|
+
if (underNew !== void 0) {
|
|
352
|
+
const held = await pinnedLines(ctx, citation, range, underNew, opts.toKey);
|
|
353
|
+
if ("joined" in held) return { kind: "done" };
|
|
354
|
+
}
|
|
355
|
+
const path = underNew ?? decryptSourcePath(range.path, opts.fromKey);
|
|
356
|
+
if (path === void 0) return { kind: "skip", message: UNDECRYPTABLE };
|
|
357
|
+
const lines = await pinnedLines(ctx, citation, range, path, opts.fromKey);
|
|
358
|
+
if ("skip" in lines) return { kind: "skip", message: lines.skip };
|
|
359
|
+
const file = underNew === void 0 ? encryptSourcePath(path, opts.toKey) : range.path;
|
|
360
|
+
return {
|
|
361
|
+
kind: "write",
|
|
362
|
+
file,
|
|
363
|
+
integrity: hashLines(lines.joined, opts.toKey),
|
|
364
|
+
to: formatSrc({ ...range, path: file })
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
async function contextFor(opts) {
|
|
368
|
+
const git = opts.gitClient ?? gitClient(opts.root);
|
|
369
|
+
const index = opts.sourceIndex ?? await buildSourceIndex(opts.root, { gitClient: git });
|
|
370
|
+
return { root: opts.root, index, git };
|
|
371
|
+
}
|
|
372
|
+
async function reencryptCitations(page, opts) {
|
|
373
|
+
const read = readPage(page.file, page.content, page.format === void 0 ? void 0 : { format: page.format });
|
|
374
|
+
const result = { content: page.content, rewritten: [], skipped: [] };
|
|
375
|
+
const encrypted = read.citations.filter(({ citation }) => sourceRange(citation.source).encrypted);
|
|
376
|
+
if (encrypted.length === 0) return result;
|
|
377
|
+
const ctx = await contextFor(opts);
|
|
378
|
+
let after = page.content;
|
|
379
|
+
for (const { citation, origin } of encrypted) {
|
|
380
|
+
const range = sourceRange(citation.source);
|
|
381
|
+
const where = whereOf(citation, origin);
|
|
382
|
+
const verdict = await verdictFor(ctx, citation, opts);
|
|
383
|
+
if (verdict.kind === "done") continue;
|
|
384
|
+
if (verdict.kind === "skip") {
|
|
385
|
+
result.skipped.push({ ...where, message: verdict.message });
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
if (verdict.file !== range.path) {
|
|
389
|
+
after = spliceEntryField(after, read.format, origin.index, ["source", "file"], verdict.file);
|
|
390
|
+
}
|
|
391
|
+
after = spliceEntryField(
|
|
392
|
+
after,
|
|
393
|
+
read.format,
|
|
394
|
+
origin.index,
|
|
395
|
+
["source", "integrity"],
|
|
396
|
+
verdict.integrity
|
|
397
|
+
);
|
|
398
|
+
result.rewritten.push({ ...where, from: spellSource(citation.source), to: verdict.to });
|
|
399
|
+
}
|
|
400
|
+
result.content = after;
|
|
401
|
+
return result;
|
|
402
|
+
}
|
|
403
|
+
async function reencryptCitationEntries(page, opts) {
|
|
404
|
+
const entries = JSON.parse(
|
|
405
|
+
JSON.stringify(page.citations.map((input) => input.entry))
|
|
406
|
+
);
|
|
407
|
+
const out = { entries, changed: false, rewritten: [], skipped: [] };
|
|
408
|
+
const read = readPage(page.file, page.content, {
|
|
409
|
+
...page.format === void 0 ? {} : { format: page.format },
|
|
410
|
+
citations: page.citations
|
|
411
|
+
});
|
|
412
|
+
const encrypted = read.citations.filter(({ citation }) => sourceRange(citation.source).encrypted);
|
|
413
|
+
if (encrypted.length === 0) return out;
|
|
414
|
+
const ctx = await contextFor(opts);
|
|
415
|
+
for (const { citation, origin } of encrypted) {
|
|
416
|
+
const where = whereOf(citation, origin);
|
|
417
|
+
const verdict = await verdictFor(ctx, citation, opts);
|
|
418
|
+
if (verdict.kind === "done") continue;
|
|
419
|
+
if (verdict.kind === "skip") {
|
|
420
|
+
out.skipped.push({ ...where, message: verdict.message });
|
|
421
|
+
continue;
|
|
422
|
+
}
|
|
423
|
+
const entry = entries[origin.index];
|
|
424
|
+
const source = typeof entry === "object" && entry !== null && !Array.isArray(entry) ? entry.source : void 0;
|
|
425
|
+
if (typeof source !== "object" || source === null || Array.isArray(source)) {
|
|
426
|
+
out.skipped.push({ ...where, message: UNDECRYPTABLE });
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
const fields = source;
|
|
430
|
+
fields.file = verdict.file;
|
|
431
|
+
fields.integrity = verdict.integrity;
|
|
432
|
+
out.changed = true;
|
|
433
|
+
out.rewritten.push({ ...where, from: spellSource(citation.source), to: verdict.to });
|
|
434
|
+
}
|
|
435
|
+
return out;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export {
|
|
439
|
+
reencryptCitations,
|
|
440
|
+
reencryptCitationEntries,
|
|
441
|
+
cite_exports
|
|
442
|
+
};
|
|
443
|
+
//# sourceMappingURL=chunk-OZL5M764.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cite/index.ts","../src/cite/core/reencrypt.ts"],"sourcesContent":["/**\n * The citation tool's programmatic API, exported from the package as the\n * `cite` namespace: `import { cite } from \"@hawkeyexl/manni\"`.\n */\nexport * from \"./types.js\";\nexport { CiteError } from \"./errors.js\";\nexport { DEFAULT_SEVERITY, RULE_ID_PREFIX, isCiteRule, resolveSeverity, ruleId } from \"./core/severity.js\";\nexport {\n FILE_PATTERN,\n SRC_PATTERN,\n formatSrc,\n lineSpec,\n parseLines,\n parseSrc,\n rangeLines,\n sourceRange,\n spellLines,\n spellSource,\n} from \"./core/range.js\";\nexport { hashLines, hashRange, isKeyedPin, normalizeText, sliceLines, splitLines } from \"./core/hash.js\";\nexport { shortCommit, shortLine, shortPin, shortSrc, spellAt } from \"./core/spell.js\";\nexport { buildSourceIndex, readSource } from \"./core/sources.js\";\nexport type { BuildIndexOptions, ReadSourceResult } from \"./core/sources.js\";\nexport {\n isUnitText,\n markerClaimEnd,\n markerRunAt,\n misplacedMarkerAt,\n misplacedMarkers,\n movedUnit,\n pre43Span,\n splitUnit,\n unitText,\n} from \"./core/reanchor.js\";\nexport type { MisplacedMarker } from \"./core/reanchor.js\";\nexport {\n anchoredLines,\n detectEol,\n fenceSpanAt,\n fencedBlockAfter,\n fencedBlockAt,\n fencedBlocks,\n formatStatement,\n insideFence,\n isBoundLine,\n isTableRow,\n lineAt,\n offsetOfLine,\n paragraphAfter,\n parseStatements,\n statementForms,\n} from \"./core/statements.js\";\nexport type { StatementForm } from \"./core/statements.js\";\nexport {\n blockMatches,\n claimEnd,\n claimLine,\n markerUnit,\n noUnitAt,\n normalizeWhitespace,\n pinOfLines,\n toBodyLines,\n toFileLines,\n unitAt,\n} from \"./core/claims.js\";\nexport type { ClaimUnit, NoUnit } from \"./core/claims.js\";\nexport {\n GIT_UNAVAILABLE_COMMIT,\n GIT_UNAVAILABLE_HISTORY,\n PAGE_HISTORY_UNAVAILABLE,\n SOURCE_HISTORY_UNAVAILABLE,\n gitClient,\n noGit,\n} from \"./core/git.js\";\nexport {\n MAX_PAGE_COMMITS,\n claimDiff,\n claimHistory,\n claimWords,\n holdsWords,\n refineClaim,\n runsHolding,\n sentencesOf,\n sharesSentence,\n stripMarkers,\n} from \"./core/history.js\";\nexport type { ClaimHistory, ClaimHistoryInput, RefineClaimInput } from \"./core/history.js\";\nexport { MAX_RANGE_LINES, MOVE_BUDGET_BYTES, MOVE_WINDOW_LINES, classifyCitation, findWindows, historyOf } from \"./core/classify.js\";\nexport type { ClassifyOptions, FindWindowsOptions, History } from \"./core/classify.js\";\nexport {\n MARKER_JSON,\n MAX_MARKERS_PER_PAGE,\n bodyLineOf,\n citationInputs,\n ownedMessage,\n pickExtractor,\n readPage,\n validateEntry,\n} from \"./core/page.js\";\nexport { shiftedEntries, withClaimLines } from \"./core/shift.js\";\nexport type { ShiftOptions, Shifted } from \"./core/shift.js\";\nexport {\n CITATIONS_KEY,\n duplicateJoinRefusal,\n loadCitationSidecars,\n orphanRefusal,\n sidecarsFor,\n twoManifestsRefusal,\n urlManifestRefusal,\n} from \"./core/sidecar.js\";\nexport type {\n CitationManifest,\n CitationSidecars,\n LoadSidecarOptions,\n PageSidecar,\n} from \"./core/sidecar.js\";\nexport { ManifestSet, itemLine, splice } from \"./core/manifest.js\";\nexport type { HeldManifest } from \"./core/manifest.js\";\nexport type { ReadPageOptions } from \"./core/page.js\";\nexport { checkCitations } from \"./core/check-page.js\";\nexport {\n claimMessageFor,\n errorSite,\n findingsFor,\n messageFor,\n misplacedMessageFor,\n toValidationResult,\n} from \"./core/adapt.js\";\nexport {\n appendFrontmatterCitation,\n entryObject,\n insertStatementBefore,\n removeFrontmatterCitations,\n removeLine,\n spliceEntryField,\n unifiedDiff,\n} from \"./core/write.js\";\nexport type { EntryPath } from \"./core/write.js\";\nexport { mintCitation } from \"./core/mint.js\";\nexport { CITE_SECTION, DEFAULT_CITE_BASELINE_PATH, loadCiteConfig, parseCiteConfig, readCiteConfigFile, resolveCiteRun } from \"./core/config.js\";\nexport type { CiteRunOptions } from \"./core/config.js\";\n\nexport { runCheck } from \"./commands/check.js\";\nexport { runAdd } from \"./commands/add.js\";\nexport { runRemove } from \"./commands/remove.js\";\nexport { runUpdate } from \"./commands/update.js\";\nexport { runHistory } from \"./commands/history.js\";\nexport { reencryptCitationEntries, reencryptCitations } from \"./core/reencrypt.js\";\nexport type { ReencryptEntriesResult, ReencryptOptions } from \"./core/reencrypt.js\";\nexport {\n refusalLine,\n removalLine,\n renderCheckPretty,\n renderHistoryPretty,\n renderRemovePretty,\n renderUpdatePretty,\n rewriteLine,\n} from \"./reporters/pretty.js\";\nexport type { PrettyOptions } from \"./reporters/pretty.js\";\nexport { renderCheckJson, renderHistoryJson, renderRemoveJson, renderUpdateJson } from \"./reporters/json.js\";\nexport { renderCheckGithub } from \"./reporters/github.js\";\n","/**\n * `reencryptCitations`: re-encrypt one page's encrypted citations under a new\n * key, for `manni key rotate` (proposal 0045). It reads sources and never\n * writes: the caller gets the rewritten page back, and writes it only once\n * every page in the run could be re-encrypted.\n *\n * A citation counts as done only when its `source.file` decrypts under the\n * new key *and* its pin holds under the new key. Either alone is a half\n * rotation, and a rerun has to finish it rather than declare it done. Meta's\n * walker cannot leave one today, because it skips the whole `citations` key\n * and cite encrypts in its own `cite-src` context; an interrupted run, a hand\n * edit, or a second writer of the same manifest can.\n *\n * The path must be tracked, and the pin must hold under the old key, over the\n * lines as they are today or, with git, as they were at the baseline the\n * classifier derives from the source's history (proposal 0097). Then `file` becomes the\n * path's ciphertext under the new key, its lines kept, and `integrity` the\n * keyed pin under it, so a `changed` citation stays exactly as changed. A pin\n * that holds nowhere is skipped, with `update --accept` named as the repair.\n * No message names a path.\n */\nimport type {\n Citation,\n CitationInput,\n CitationOrigin,\n GitClient,\n ReencryptCitationsResult,\n ReencryptedCitation,\n SourceIndex,\n SourceRange,\n} from \"../types.js\";\nimport { sourceBaseline } from \"./classify.js\";\nimport { gitClient } from \"./git.js\";\nimport { hashLines, sliceLines, splitLines } from \"./hash.js\";\nimport { readPage } from \"./page.js\";\nimport { formatSrc, sourceRange, spellSource } from \"./range.js\";\nimport { buildSourceIndex, decryptSourcePath, encryptSourcePath, readSource } from \"./sources.js\";\nimport { spliceEntryField } from \"./write.js\";\n\nconst UNDECRYPTABLE = \"does not decrypt under the current key\";\nconst MISSING = \"missing (no tracked file matches)\";\nconst CHANGED = \"changed; run `manni cite update --accept` before rotating\";\n\ntype Where = Pick<ReencryptedCitation, \"id\" | \"index\" | \"line\">;\n\n/** The fields a report row carries to name the entry: its id, or where it sits. */\nfunction whereOf(citation: Citation, origin: CitationOrigin): Where {\n const where: Where = { index: origin.index };\n if (citation.id !== undefined) where.id = citation.id;\n if (origin.line !== undefined) where.line = origin.line;\n return where;\n}\n\ninterface Context {\n root: string;\n index: SourceIndex;\n git: GitClient;\n}\n\n/**\n * The lines the pin was taken over, joined: today's when the pin holds there\n * under `key`, else the lines at the derived baseline when git finds one;\n * else why neither.\n */\nasync function pinnedLines(\n ctx: Context,\n citation: Citation,\n range: SourceRange,\n path: string,\n key: string,\n): Promise<{ joined: string } | { skip: string }> {\n const source = await readSource(ctx.root, ctx.index, { ...range, path, encrypted: false });\n if (source.kind === \"missing\") return { skip: MISSING };\n const pin = citation.source.integrity;\n let joined: string | undefined;\n try {\n joined = sliceLines(splitLines(source.text), range);\n } catch {\n // The range runs past the end of the file as it is now.\n joined = undefined;\n }\n if (joined !== undefined && hashLines(joined, key) === pin) return { joined };\n\n // The baseline the classifier derives (0097): the recorded commit when it\n // holds, else the newest commit in the source's history that does.\n if (await ctx.git.available()) {\n const recorded = citation.source[\"commit-sha\"];\n const { history } = await sourceBaseline(ctx.git, recorded, path, range, pin, key, undefined);\n if (history.kind === \"original\") return { joined: history.lines.join(\"\\n\") };\n }\n return { skip: CHANGED };\n}\n\n/** What one citation needs: nothing, a new pair of values, or a reason it cannot be done. */\ntype Verdict =\n | { kind: \"done\" }\n | { kind: \"skip\"; message: string }\n | { kind: \"write\"; file: string; integrity: string; to: string };\n\n/** Options every re-encryption takes, whichever channel the entry lives in. */\nexport interface ReencryptOptions {\n root: string;\n fromKey: string;\n toKey: string;\n /** History and the source index are read through it; defaults to one over the root. */\n gitClient?: GitClient;\n sourceIndex?: SourceIndex;\n}\n\n/**\n * One citation's verdict: whether it is already under the new key, what its\n * `source.file` and `source.integrity` become, or why neither. The rule is\n * the same wherever the entry is kept, so the page splicer and the manifest\n * writer both go through here.\n */\nasync function verdictFor(\n ctx: Context,\n citation: Citation,\n opts: Pick<ReencryptOptions, \"fromKey\" | \"toKey\">,\n): Promise<Verdict> {\n const range = sourceRange(citation.source);\n const underNew = decryptSourcePath(range.path, opts.toKey);\n // Done only when both halves are under the new key; a file that is and a\n // pin that is not is the half rotation this finishes.\n if (underNew !== undefined) {\n const held = await pinnedLines(ctx, citation, range, underNew, opts.toKey);\n if (\"joined\" in held) return { kind: \"done\" };\n }\n const path = underNew ?? decryptSourcePath(range.path, opts.fromKey);\n if (path === undefined) return { kind: \"skip\", message: UNDECRYPTABLE };\n const lines = await pinnedLines(ctx, citation, range, path, opts.fromKey);\n if (\"skip\" in lines) return { kind: \"skip\", message: lines.skip };\n const file = underNew === undefined ? encryptSourcePath(path, opts.toKey) : range.path;\n return {\n kind: \"write\",\n file,\n integrity: hashLines(lines.joined, opts.toKey),\n to: formatSrc({ ...range, path: file }),\n };\n}\n\n/** The git client and source index a run shares, built once per page at most. */\nasync function contextFor(opts: ReencryptOptions): Promise<Context> {\n const git = opts.gitClient ?? gitClient(opts.root);\n const index = opts.sourceIndex ?? (await buildSourceIndex(opts.root, { gitClient: git }));\n return { root: opts.root, index, git };\n}\n\nexport async function reencryptCitations(\n page: { file: string; content: string; format?: string },\n opts: ReencryptOptions,\n): Promise<ReencryptCitationsResult> {\n const read = readPage(page.file, page.content, page.format === undefined ? undefined : { format: page.format });\n const result: ReencryptCitationsResult = { content: page.content, rewritten: [], skipped: [] };\n const encrypted = read.citations.filter(({ citation }) => sourceRange(citation.source).encrypted);\n // A page with nothing encrypted costs no index and no git.\n if (encrypted.length === 0) return result;\n\n const ctx = await contextFor(opts);\n let after = page.content;\n for (const { citation, origin } of encrypted) {\n const range = sourceRange(citation.source);\n const where = whereOf(citation, origin);\n const verdict = await verdictFor(ctx, citation, opts);\n if (verdict.kind === \"done\") continue;\n if (verdict.kind === \"skip\") {\n result.skipped.push({ ...where, message: verdict.message });\n continue;\n }\n if (verdict.file !== range.path) {\n after = spliceEntryField(after, read.format, origin.index, [\"source\", \"file\"], verdict.file);\n }\n after = spliceEntryField(\n after,\n read.format,\n origin.index,\n [\"source\", \"integrity\"],\n verdict.integrity,\n );\n result.rewritten.push({ ...where, from: spellSource(citation.source), to: verdict.to });\n }\n result.content = after;\n return result;\n}\n\n/** What `reencryptCitationEntries` did to one page's manifest entries. */\nexport interface ReencryptEntriesResult {\n /** The entries as they should now be written, a copy of what came in. */\n entries: unknown[];\n /** Whether any of them changed. */\n changed: boolean;\n rewritten: ReencryptedCitation[];\n skipped: { id?: string; index?: number; line?: number; message: string }[];\n}\n\n/**\n * The same rotation, for a page whose citations live in a manifest.\n *\n * The entries come from meta's merge, so they are plain values; each one is\n * validated as `readPage` validates a frontmatter entry, and an encrypted\n * source's `file` and `integrity` are rewritten in place. The caller writes\n * the whole list back with one splice, once every page of the run could be\n * re-encrypted.\n */\nexport async function reencryptCitationEntries(\n page: { file: string; content: string; format?: string; citations: readonly CitationInput[] },\n opts: ReencryptOptions,\n): Promise<ReencryptEntriesResult> {\n const entries: unknown[] = JSON.parse(\n JSON.stringify(page.citations.map((input) => input.entry)),\n ) as unknown[];\n const out: ReencryptEntriesResult = { entries, changed: false, rewritten: [], skipped: [] };\n\n const read = readPage(page.file, page.content, {\n ...(page.format === undefined ? {} : { format: page.format }),\n citations: page.citations,\n });\n const encrypted = read.citations.filter(({ citation }) => sourceRange(citation.source).encrypted);\n if (encrypted.length === 0) return out;\n\n const ctx = await contextFor(opts);\n for (const { citation, origin } of encrypted) {\n const where = whereOf(citation, origin);\n const verdict = await verdictFor(ctx, citation, opts);\n if (verdict.kind === \"done\") continue;\n if (verdict.kind === \"skip\") {\n out.skipped.push({ ...where, message: verdict.message });\n continue;\n }\n const entry: unknown = entries[origin.index];\n const source =\n typeof entry === \"object\" && entry !== null && !Array.isArray(entry)\n ? (entry as Record<string, unknown>).source\n : undefined;\n if (typeof source !== \"object\" || source === null || Array.isArray(source)) {\n out.skipped.push({ ...where, message: UNDECRYPTABLE });\n continue;\n }\n const fields = source as Record<string, unknown>;\n fields.file = verdict.file;\n fields.integrity = verdict.integrity;\n out.changed = true;\n out.rewritten.push({ ...where, from: spellSource(citation.source), to: verdict.to });\n }\n return out;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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8
|
shortSrc,
|
|
9
9
|
spellAt
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5VNFO2RT.js";
|
|
11
11
|
import {
|
|
12
12
|
parseSrc
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3UYSONT4.js";
|
|
14
14
|
import {
|
|
15
15
|
guidanceLines
|
|
16
16
|
} from "./chunk-QK6VYJHV.js";
|
|
@@ -532,4 +532,4 @@ export {
|
|
|
532
532
|
releasesCell,
|
|
533
533
|
renderHistoryPretty
|
|
534
534
|
};
|
|
535
|
-
//# sourceMappingURL=chunk-
|
|
535
|
+
//# sourceMappingURL=chunk-PS4Y7EPP.js.map
|
|
@@ -17,25 +17,26 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
DocevalsError,
|
|
19
19
|
FIX_GUIDE
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MDZXRHIJ.js";
|
|
21
21
|
import {
|
|
22
22
|
declaredAt
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-M6DNOHJO.js";
|
|
24
24
|
import {
|
|
25
25
|
metaProvenanceEntries
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-KB4MNUKC.js";
|
|
27
27
|
import {
|
|
28
28
|
familyMarks,
|
|
29
29
|
loadExternalMetadata,
|
|
30
30
|
memberOf,
|
|
31
31
|
mergeWithMarks,
|
|
32
32
|
provenanceEntries
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-AIZBZYQM.js";
|
|
34
34
|
import {
|
|
35
35
|
__default,
|
|
36
36
|
classifyRef,
|
|
37
|
-
extractFrontmatter
|
|
38
|
-
|
|
37
|
+
extractFrontmatter,
|
|
38
|
+
integrityOf
|
|
39
|
+
} from "./chunk-FAS3SRQB.js";
|
|
39
40
|
import {
|
|
40
41
|
findConfigFileSync,
|
|
41
42
|
ownsKey,
|
|
@@ -2309,7 +2310,9 @@ function stampSuites(results, plans) {
|
|
|
2309
2310
|
const weightOf = /* @__PURE__ */ new Map();
|
|
2310
2311
|
const locationOf2 = /* @__PURE__ */ new Map();
|
|
2311
2312
|
const assertionOf = /* @__PURE__ */ new Map();
|
|
2313
|
+
const integrityOfPage = /* @__PURE__ */ new Map();
|
|
2312
2314
|
for (const plan of plans) {
|
|
2315
|
+
integrityOfPage.set(plan.page.file, integrityOf(Buffer.from(plan.page.content, "utf8")));
|
|
2313
2316
|
for (const ev of plan.evals) {
|
|
2314
2317
|
const key = resultKey(plan.page.file, ev.name);
|
|
2315
2318
|
suiteOf.set(key, ev.suite);
|
|
@@ -2323,6 +2326,8 @@ function stampSuites(results, plans) {
|
|
|
2323
2326
|
r.suite = suiteOf.get(key) ?? "default";
|
|
2324
2327
|
r.weight = weightOf.get(key) ?? 1;
|
|
2325
2328
|
r.location = locationOf2.get(key) ?? { file: r.file };
|
|
2329
|
+
const integrity = integrityOfPage.get(r.file);
|
|
2330
|
+
if (integrity !== void 0) r.integrity = integrity;
|
|
2326
2331
|
r.guidance = {
|
|
2327
2332
|
id: r.location.file,
|
|
2328
2333
|
rule: r.evalName,
|
|
@@ -2971,4 +2976,4 @@ export {
|
|
|
2971
2976
|
applySelection,
|
|
2972
2977
|
runEvals
|
|
2973
2978
|
};
|
|
2974
|
-
//# sourceMappingURL=chunk-
|
|
2979
|
+
//# sourceMappingURL=chunk-Q7E43SXN.js.map
|