@hawkeyexl/manni 4.3.1 → 4.4.0
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 +9 -1
- package/dist/batch-DFRCLY77.js +36 -0
- package/dist/build-Q5C6SX5J.js +31 -0
- package/dist/calibrate-XQILKXS3.js +31 -0
- package/dist/capture-JQMOC3BW.js +32 -0
- package/dist/check-HYNGXYJV.js +18 -0
- package/dist/check-HYNGXYJV.js.map +1 -0
- package/dist/check-NFZQLJKN.js +27 -0
- package/dist/check-NFZQLJKN.js.map +1 -0
- package/dist/check-U54XV6BP.js +40 -0
- package/dist/check-U54XV6BP.js.map +1 -0
- package/dist/chunk-252LNOEG.js +622 -0
- package/dist/chunk-252LNOEG.js.map +1 -0
- package/dist/chunk-2H7UOFLK.js +11 -0
- package/dist/chunk-2H7UOFLK.js.map +1 -0
- package/dist/chunk-2U3ORT6D.js +230 -0
- package/dist/chunk-2U3ORT6D.js.map +1 -0
- package/dist/chunk-3AFUD75K.js +23 -0
- package/dist/chunk-3AFUD75K.js.map +1 -0
- package/dist/{chunk-3R23C5DT.js → chunk-4TSWU2SU.js} +2 -14
- package/dist/chunk-4TSWU2SU.js.map +1 -0
- package/dist/chunk-5KHIFVD2.js +1192 -0
- package/dist/chunk-5KHIFVD2.js.map +1 -0
- package/dist/chunk-5YXBLLAC.js +2165 -0
- package/dist/chunk-5YXBLLAC.js.map +1 -0
- package/dist/chunk-644JVKJ4.js +3872 -0
- package/dist/chunk-644JVKJ4.js.map +1 -0
- package/dist/chunk-6OYEI2VV.js +88 -0
- package/dist/chunk-6OYEI2VV.js.map +1 -0
- package/dist/chunk-77AINBYM.js +19 -0
- package/dist/chunk-77AINBYM.js.map +1 -0
- package/dist/chunk-77HX34KD.js +1287 -0
- package/dist/chunk-77HX34KD.js.map +1 -0
- package/dist/{chunk-CFDUZRM2.js → chunk-7QMCHA4N.js} +32 -240
- package/dist/chunk-7QMCHA4N.js.map +1 -0
- package/dist/chunk-BUXDLRDT.js +455 -0
- package/dist/chunk-BUXDLRDT.js.map +1 -0
- package/dist/chunk-C6OH6CNF.js +388 -0
- package/dist/chunk-C6OH6CNF.js.map +1 -0
- package/dist/chunk-CK7SKVHR.js +1042 -0
- package/dist/chunk-CK7SKVHR.js.map +1 -0
- package/dist/chunk-CYWHFSRT.js +6737 -0
- package/dist/chunk-CYWHFSRT.js.map +1 -0
- package/dist/chunk-ERMSO34F.js +17 -0
- package/dist/chunk-ERMSO34F.js.map +1 -0
- package/dist/{chunk-IOYXPBCL.js → chunk-G3T47CFV.js} +1 -7
- package/dist/{chunk-IOYXPBCL.js.map → chunk-G3T47CFV.js.map} +1 -1
- package/dist/chunk-G7NJSREW.js +979 -0
- package/dist/chunk-G7NJSREW.js.map +1 -0
- package/dist/chunk-GLP5PSXB.js +72 -0
- package/dist/chunk-GLP5PSXB.js.map +1 -0
- package/dist/chunk-H2DLH2JI.js +198 -0
- package/dist/chunk-H2DLH2JI.js.map +1 -0
- package/dist/chunk-H6FZ66XR.js +634 -0
- package/dist/chunk-H6FZ66XR.js.map +1 -0
- package/dist/{chunk-KJR7OVDX.js → chunk-IEQHSCZG.js} +56 -137
- package/dist/chunk-IEQHSCZG.js.map +1 -0
- package/dist/chunk-IKEWBMCN.js +98 -0
- package/dist/chunk-IKEWBMCN.js.map +1 -0
- package/dist/chunk-JOHKIAVH.js +5440 -0
- package/dist/chunk-JOHKIAVH.js.map +1 -0
- package/dist/chunk-JVTNMVYU.js +10921 -0
- package/dist/chunk-JVTNMVYU.js.map +1 -0
- package/dist/chunk-K3D6FPV6.js +164 -0
- package/dist/chunk-K3D6FPV6.js.map +1 -0
- package/dist/{chunk-UBMMXS2Y.js → chunk-KCGV52AM.js} +69 -48
- package/dist/{chunk-UBMMXS2Y.js.map → chunk-KCGV52AM.js.map} +1 -1
- package/dist/chunk-LAKAWRV5.js +1651 -0
- package/dist/chunk-LAKAWRV5.js.map +1 -0
- package/dist/chunk-LJ2RDH3F.js +49 -0
- package/dist/chunk-LJ2RDH3F.js.map +1 -0
- package/dist/chunk-M2JCK5F6.js +805 -0
- package/dist/chunk-M2JCK5F6.js.map +1 -0
- package/dist/chunk-MNH7QO4Z.js +15 -0
- package/dist/chunk-MNH7QO4Z.js.map +1 -0
- package/dist/{chunk-HAPTXWU2.js → chunk-MYC3O5EJ.js} +4 -4
- package/dist/chunk-MYMBCTDE.js +387 -0
- package/dist/chunk-MYMBCTDE.js.map +1 -0
- package/dist/chunk-NCPWXHDO.js +683 -0
- package/dist/chunk-NCPWXHDO.js.map +1 -0
- package/dist/chunk-NWZ2SLYL.js +2957 -0
- package/dist/chunk-NWZ2SLYL.js.map +1 -0
- package/dist/chunk-OBFENF3U.js +934 -0
- package/dist/chunk-OBFENF3U.js.map +1 -0
- package/dist/chunk-OWBRDNRZ.js +16 -0
- package/dist/chunk-OWBRDNRZ.js.map +1 -0
- package/dist/{chunk-KTSJ2ZHA.js → chunk-PAU352SV.js} +5 -3
- package/dist/{chunk-KTSJ2ZHA.js.map → chunk-PAU352SV.js.map} +1 -1
- package/dist/chunk-PCE7QHXJ.js +68 -0
- package/dist/chunk-PCE7QHXJ.js.map +1 -0
- package/dist/chunk-PCHZY2I7.js +299 -0
- package/dist/chunk-PCHZY2I7.js.map +1 -0
- package/dist/chunk-PHF3D7ER.js +1042 -0
- package/dist/chunk-PHF3D7ER.js.map +1 -0
- package/dist/chunk-Q35YIDBV.js +1202 -0
- package/dist/chunk-Q35YIDBV.js.map +1 -0
- package/dist/chunk-RLR4TKUZ.js +4398 -0
- package/dist/chunk-RLR4TKUZ.js.map +1 -0
- package/dist/chunk-RNVYGWIC.js +30 -0
- package/dist/chunk-RNVYGWIC.js.map +1 -0
- package/dist/chunk-SE4JN5XN.js +19 -0
- package/dist/chunk-SE4JN5XN.js.map +1 -0
- package/dist/chunk-TIUTIOFB.js +25 -0
- package/dist/chunk-TIUTIOFB.js.map +1 -0
- package/dist/chunk-TU2WUBVZ.js +2 -0
- package/dist/chunk-TU2WUBVZ.js.map +1 -0
- package/dist/chunk-TZOYZK2E.js +98 -0
- package/dist/chunk-TZOYZK2E.js.map +1 -0
- package/dist/chunk-UKZNLVJW.js +17 -0
- package/dist/chunk-UKZNLVJW.js.map +1 -0
- package/dist/chunk-UZC7LDAQ.js +178 -0
- package/dist/chunk-UZC7LDAQ.js.map +1 -0
- package/dist/chunk-V46OILVC.js +3090 -0
- package/dist/chunk-V46OILVC.js.map +1 -0
- package/dist/chunk-WQE54PNH.js +1975 -0
- package/dist/chunk-WQE54PNH.js.map +1 -0
- package/dist/chunk-X3BPBDGQ.js +52 -0
- package/dist/chunk-X3BPBDGQ.js.map +1 -0
- package/dist/chunk-XSLV76YK.js +54 -0
- package/dist/chunk-XSLV76YK.js.map +1 -0
- package/dist/{chunk-5HNHEUD5.js → chunk-XYLUCIKQ.js} +3 -3
- package/dist/chunk-YEUYKR62.js +72 -0
- package/dist/chunk-YEUYKR62.js.map +1 -0
- package/dist/{chunk-G5CM2VGQ.js → chunk-YFQBFNQS.js} +8 -94
- package/dist/chunk-YFQBFNQS.js.map +1 -0
- package/dist/chunk-YIL4XLLJ.js +1661 -0
- package/dist/chunk-YIL4XLLJ.js.map +1 -0
- package/dist/chunk-YNHZHSSM.js +41 -0
- package/dist/chunk-YNHZHSSM.js.map +1 -0
- package/dist/chunk-YTCZRLTU.js +96 -0
- package/dist/chunk-YTCZRLTU.js.map +1 -0
- package/dist/chunk-YYBFZLAJ.js +374 -0
- package/dist/chunk-YYBFZLAJ.js.map +1 -0
- package/dist/chunk-ZXRAE55H.js +31 -0
- package/dist/chunk-ZXRAE55H.js.map +1 -0
- package/dist/cli-2QPR2OZG.js +232 -0
- package/dist/cli-2QPR2OZG.js.map +1 -0
- package/dist/cli-4IOPGZHR.js +1203 -0
- package/dist/cli-4IOPGZHR.js.map +1 -0
- package/dist/cli-5FL73WHA.js +346 -0
- package/dist/cli-5FL73WHA.js.map +1 -0
- package/dist/cli-C262QOWM.js +739 -0
- package/dist/cli-C262QOWM.js.map +1 -0
- package/dist/cli-LJLLIQB2.js +423 -0
- package/dist/cli-LJLLIQB2.js.map +1 -0
- package/dist/cli-OFPZ5MAS.js +626 -0
- package/dist/cli-OFPZ5MAS.js.map +1 -0
- package/dist/cli-SHSMSRQY.js +28 -0
- package/dist/cli-SHSMSRQY.js.map +1 -0
- package/dist/cli-SRHFUZHA.js +473 -0
- package/dist/cli-SRHFUZHA.js.map +1 -0
- package/dist/cli-URZQXL4K.js +552 -0
- package/dist/cli-URZQXL4K.js.map +1 -0
- package/dist/cli.d.ts +12 -2
- package/dist/cli.js +109 -7661
- package/dist/cli.js.map +1 -1
- package/dist/docmeta.js +15 -3
- package/dist/docmeta.js.map +1 -1
- package/dist/github-FE6KCNYJ.js +27 -0
- package/dist/github-FE6KCNYJ.js.map +1 -0
- package/dist/github-QXL3VMK2.js +32 -0
- package/dist/github-QXL3VMK2.js.map +1 -0
- package/dist/index.d.ts +65 -3
- package/dist/index.js +407 -337
- package/dist/index.js.map +1 -1
- package/dist/json-7WV7KL6H.js +17 -0
- package/dist/json-7WV7KL6H.js.map +1 -0
- package/dist/json-SGZ6ZRFD.js +35 -0
- package/dist/json-SGZ6ZRFD.js.map +1 -0
- package/dist/lint-DL4LJRAY.js +28 -0
- package/dist/lint-DL4LJRAY.js.map +1 -0
- package/dist/list-6BAXTZUM.js +29 -0
- package/dist/list-6BAXTZUM.js.map +1 -0
- package/dist/list-7BKNYPSB.js +31 -0
- package/dist/list-7BKNYPSB.js.map +1 -0
- package/dist/page-3U2GCFNE.js +41 -0
- package/dist/page-3U2GCFNE.js.map +1 -0
- package/dist/picker-3XF36MJF.js +14 -0
- package/dist/picker-3XF36MJF.js.map +1 -0
- package/dist/pretty-2H57QVTY.js +43 -0
- package/dist/pretty-2H57QVTY.js.map +1 -0
- package/dist/pretty-N6DO4OOL.js +37 -0
- package/dist/pretty-N6DO4OOL.js.map +1 -0
- package/dist/reporters-M6LJ2IYU.js +21 -0
- package/dist/reporters-M6LJ2IYU.js.map +1 -0
- package/dist/reporters-N6GHXSS7.js +42 -0
- package/dist/reporters-N6GHXSS7.js.map +1 -0
- package/dist/reporters-UCNEV7PH.js +71 -0
- package/dist/reporters-UCNEV7PH.js.map +1 -0
- package/dist/run-XZDAREJE.js +33 -0
- package/dist/run-XZDAREJE.js.map +1 -0
- package/dist/term-5ICGKPC3.js +1592 -0
- package/dist/term-5ICGKPC3.js.map +1 -0
- package/dist/types-Y6TXHM7M.js +10 -0
- package/dist/types-Y6TXHM7M.js.map +1 -0
- package/dist/validate-GQRM77YN.js +16 -0
- package/dist/validate-GQRM77YN.js.map +1 -0
- package/package.json +1 -1
- package/plugin/manni/.claude-plugin/plugin.json +9 -0
- package/plugin/manni/hooks/hooks.json +52 -0
- package/plugin/manni/skills/check/SKILL.md +20 -0
- package/plugin/manni/skills/evals/SKILL.md +27 -0
- package/plugin/manni/skills/fix/SKILL.md +56 -0
- package/plugin/manni/skills/setup/SKILL.md +41 -0
- package/dist/batch-A5HZKYIW.js +0 -18
- package/dist/calibrate-S5K6QHUY.js +0 -13
- package/dist/capture-OZEZDABQ.js +0 -15
- package/dist/chunk-3R23C5DT.js.map +0 -1
- package/dist/chunk-CFDUZRM2.js.map +0 -1
- package/dist/chunk-G5CM2VGQ.js.map +0 -1
- package/dist/chunk-KJR7OVDX.js.map +0 -1
- package/dist/chunk-V4KUVE47.js +0 -27170
- package/dist/chunk-V4KUVE47.js.map +0 -1
- package/dist/chunk-ZQBTK3DO.js +0 -26518
- package/dist/chunk-ZQBTK3DO.js.map +0 -1
- package/dist/picker-6HRMETE7.js +0 -12
- package/plugin/tracevals/.claude-plugin/plugin.json +0 -9
- package/plugin/tracevals/hooks/hooks.json +0 -17
- /package/dist/{batch-A5HZKYIW.js.map → batch-DFRCLY77.js.map} +0 -0
- /package/dist/{calibrate-S5K6QHUY.js.map → build-Q5C6SX5J.js.map} +0 -0
- /package/dist/{capture-OZEZDABQ.js.map → calibrate-XQILKXS3.js.map} +0 -0
- /package/dist/{picker-6HRMETE7.js.map → capture-JQMOC3BW.js.map} +0 -0
- /package/dist/{chunk-HAPTXWU2.js.map → chunk-MYC3O5EJ.js.map} +0 -0
- /package/dist/{chunk-5HNHEUD5.js.map → chunk-XYLUCIKQ.js.map} +0 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
PATH_JOIN,
|
|
4
|
+
applyRelocation,
|
|
5
|
+
offerPrompt,
|
|
6
|
+
planRelocation,
|
|
7
|
+
relocationOffers
|
|
8
|
+
} from "./chunk-RLR4TKUZ.js";
|
|
9
|
+
|
|
10
|
+
// src/meta/core/location-writes.ts
|
|
11
|
+
import { LineCounter, isMap, isNode, isScalar, parseDocument } from "yaml";
|
|
12
|
+
var dedupe = (xs) => [...new Set(xs)];
|
|
13
|
+
var pages = (n) => `${String(n)} page${n === 1 ? "" : "s"}`;
|
|
14
|
+
async function offerExternalHomes(ctx, writes, hooks) {
|
|
15
|
+
const applied = /* @__PURE__ */ new Set();
|
|
16
|
+
const groups = /* @__PURE__ */ new Map();
|
|
17
|
+
for (const w of writes) {
|
|
18
|
+
if (w.home.kind !== "collection") continue;
|
|
19
|
+
const group = groups.get(w.home.collection) ?? [];
|
|
20
|
+
group.push(w);
|
|
21
|
+
groups.set(w.home.collection, group);
|
|
22
|
+
}
|
|
23
|
+
for (const [collection, group] of groups) {
|
|
24
|
+
const require2 = /* @__PURE__ */ new Map();
|
|
25
|
+
for (const w of group) {
|
|
26
|
+
const keys = require2.get(w.label) ?? [];
|
|
27
|
+
if (!keys.includes(w.key)) keys.push(w.key);
|
|
28
|
+
require2.set(w.label, keys);
|
|
29
|
+
}
|
|
30
|
+
const plan = await planRelocation(ctx, {
|
|
31
|
+
files: [...require2.keys()],
|
|
32
|
+
fields: dedupe(group.map((w) => w.key)),
|
|
33
|
+
require: require2
|
|
34
|
+
});
|
|
35
|
+
const offers = relocationOffers(plan);
|
|
36
|
+
if (offers.length === 0) continue;
|
|
37
|
+
let yes = true;
|
|
38
|
+
for (const offer of offers) {
|
|
39
|
+
const { notice, question } = offerPrompt(offer, "write");
|
|
40
|
+
hooks.onNotice?.(notice);
|
|
41
|
+
if (!await hooks.confirm(question)) {
|
|
42
|
+
yes = false;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (!yes) continue;
|
|
47
|
+
const result = await applyRelocation(ctx, plan);
|
|
48
|
+
hooks.onRelocated?.(result);
|
|
49
|
+
applied.add(collection);
|
|
50
|
+
}
|
|
51
|
+
return applied;
|
|
52
|
+
}
|
|
53
|
+
function externalWriteWarnings(writes, dryRun) {
|
|
54
|
+
const verb = dryRun ? "would write" : "wrote";
|
|
55
|
+
const groups = /* @__PURE__ */ new Map();
|
|
56
|
+
const groupOf = (w) => w.home.kind === "collection" ? `c:${w.home.collection}` : `n:${w.home.reason}`;
|
|
57
|
+
for (const w of writes) {
|
|
58
|
+
const id = groupOf(w);
|
|
59
|
+
groups.set(id, [...groups.get(id) ?? [], w]);
|
|
60
|
+
}
|
|
61
|
+
const out = [];
|
|
62
|
+
for (const group of groups.values()) {
|
|
63
|
+
const [first] = group;
|
|
64
|
+
if (first === void 0) continue;
|
|
65
|
+
out.push(
|
|
66
|
+
externalWriteWarning({
|
|
67
|
+
verb,
|
|
68
|
+
keys: dedupe(group.map((w) => w.key)),
|
|
69
|
+
pages: new Set(group.map((w) => w.label)).size,
|
|
70
|
+
home: first.home,
|
|
71
|
+
createsHome: group.some(
|
|
72
|
+
(w) => w.home.kind === "collection" && (w.home.createsCollection || w.home.addsPath !== void 0)
|
|
73
|
+
)
|
|
74
|
+
})
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
return out;
|
|
78
|
+
}
|
|
79
|
+
function externalWriteWarning(line) {
|
|
80
|
+
const { verb, keys, home } = line;
|
|
81
|
+
const one = keys.length === 1;
|
|
82
|
+
const head = `${verb} ${keys.join(", ")} to ${pages(line.pages)}`;
|
|
83
|
+
const prefer = one ? "the schema prefers external metadata" : "their schemas prefer external metadata";
|
|
84
|
+
const them = one ? "it" : "them";
|
|
85
|
+
if (home.kind === "collection") {
|
|
86
|
+
if (!line.createsHome) {
|
|
87
|
+
return `${head} in collection ${home.collection}; ${prefer}, and no manifest owns ${them}. Run manni meta relocate to move ${them}.`;
|
|
88
|
+
}
|
|
89
|
+
return home.createsCollection || home.createsManifest ? `${head}; ${prefer}. Run manni meta relocate to give ${them} a manifest.` : `${head}; ${prefer}. Run manni meta relocate to add ${them} to collection ${home.collection}.`;
|
|
90
|
+
}
|
|
91
|
+
return home.reason === "no-config" ? `${head}; ${prefer}, and --no-config leaves ${them} no manifest.` : `${head} that ${line.pages === 1 ? "is" : "are"} in none of the ${String(home.collections)} collections; ${prefer}, and only a collection has a manifest.`;
|
|
92
|
+
}
|
|
93
|
+
function manifestKeyLine(text, entry, key, join) {
|
|
94
|
+
const norm = (e) => join === PATH_JOIN ? e.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/+/g, "/") : e;
|
|
95
|
+
const lc = new LineCounter();
|
|
96
|
+
const doc = parseDocument(text, { lineCounter: lc, uniqueKeys: false });
|
|
97
|
+
const root = doc.contents;
|
|
98
|
+
if (!isMap(root)) return void 0;
|
|
99
|
+
for (const pair of root.items) {
|
|
100
|
+
const spelled = isScalar(pair.key) ? String(pair.key.value) : String(pair.key);
|
|
101
|
+
if (norm(spelled) !== norm(entry) || !isMap(pair.value)) continue;
|
|
102
|
+
for (const kv of pair.value.items) {
|
|
103
|
+
const name = isScalar(kv.key) ? String(kv.key.value) : String(kv.key);
|
|
104
|
+
const range = isNode(kv.key) ? kv.key.range : void 0;
|
|
105
|
+
if (name === key && range) return lc.linePos(range[0]).line;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return void 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// src/meta/core/meta-provenance.ts
|
|
112
|
+
function isPlainRecord(value) {
|
|
113
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
114
|
+
}
|
|
115
|
+
function mergeMetaProvenance(held, model, key, proposed) {
|
|
116
|
+
if (held !== void 0 && !Array.isArray(held)) return void 0;
|
|
117
|
+
const list = held === void 0 ? [] : [...held];
|
|
118
|
+
const at = list.findIndex((e) => isPlainRecord(e) && e["generated-by"] === model);
|
|
119
|
+
const prior = list[at];
|
|
120
|
+
const kept = isPlainRecord(prior) ? prior : {};
|
|
121
|
+
const priorNames = kept[key];
|
|
122
|
+
const names = Array.isArray(priorNames) ? priorNames.filter((p) => typeof p === "string") : [];
|
|
123
|
+
const confidence = {};
|
|
124
|
+
if (isPlainRecord(kept.confidence)) {
|
|
125
|
+
for (const [k, v] of Object.entries(kept.confidence)) {
|
|
126
|
+
if (typeof v === "number") confidence[k] = v;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
for (const p of proposed) {
|
|
130
|
+
if (!names.includes(p.name)) names.push(p.name);
|
|
131
|
+
confidence[p.name] = p.confidence;
|
|
132
|
+
}
|
|
133
|
+
const entry = {
|
|
134
|
+
...kept,
|
|
135
|
+
"generated-by": model,
|
|
136
|
+
[key]: names,
|
|
137
|
+
confidence
|
|
138
|
+
};
|
|
139
|
+
if (at === -1) list.push(entry);
|
|
140
|
+
else list[at] = entry;
|
|
141
|
+
return { list, entry, names };
|
|
142
|
+
}
|
|
143
|
+
function metaProvenanceEntries(value) {
|
|
144
|
+
if (!Array.isArray(value)) return [];
|
|
145
|
+
const strings = (list) => Array.isArray(list) ? list.filter((s) => typeof s === "string") : [];
|
|
146
|
+
const out = [];
|
|
147
|
+
for (const item of value) {
|
|
148
|
+
if (!isPlainRecord(item)) continue;
|
|
149
|
+
const machine = item["generated-by"];
|
|
150
|
+
if (typeof machine !== "string" || machine === "") continue;
|
|
151
|
+
out.push({ "generated-by": machine, fields: strings(item.fields), evals: strings(item.evals) });
|
|
152
|
+
}
|
|
153
|
+
return out;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export {
|
|
157
|
+
offerExternalHomes,
|
|
158
|
+
externalWriteWarnings,
|
|
159
|
+
externalWriteWarning,
|
|
160
|
+
manifestKeyLine,
|
|
161
|
+
mergeMetaProvenance,
|
|
162
|
+
metaProvenanceEntries
|
|
163
|
+
};
|
|
164
|
+
//# sourceMappingURL=chunk-K3D6FPV6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/meta/core/location-writes.ts","../src/meta/core/meta-provenance.ts"],"sourcesContent":["/**\n * What a writer (`derive`, `fill`) does with a value its schema prefers in\n * external metadata when no manifest owns the key (proposal 0047).\n *\n * On a terminal, one question per collection (P1) offers the relocation that\n * gives the key a manifest, and a yes applies it before anything is written.\n * Off a terminal, declined, or under a dry run, the value is written to the\n * page as before, and one warning per collection (W1), or per set of pages\n * with no possible home (W2), says so. The planning and the prompt's wording\n * are `relocation.ts`'s; this module is the writers' shared use of them.\n */\nimport { LineCounter, isMap, isNode, isScalar, parseDocument } from \"yaml\";\nimport type { Confirm } from \"../../shared/prompt.js\";\nimport {\n applyRelocation,\n offerPrompt,\n planRelocation,\n relocationOffers,\n type ProposedHome,\n type RelocateResult,\n type RelocationContext,\n} from \"./relocation.js\";\nimport { PATH_JOIN } from \"./external-metadata.js\";\n\n/** One key a writer is about to set on one page, which prefers external metadata and has no manifest. */\nexport interface ExternalWrite {\n label: string;\n key: string;\n home: ProposedHome;\n}\n\nconst dedupe = <T>(xs: readonly T[]): T[] => [...new Set(xs)];\nconst pages = (n: number): string => `${String(n)} page${n === 1 ? \"\" : \"s\"}`;\n\n/**\n * Ask P1 once per collection the writes would be homed in, and apply each\n * relocation the user accepts. Returns the collections whose relocation was\n * applied; their keys now have a manifest, and the caller re-reads what the\n * relocation changed before writing. Writes with no possible home are never\n * offered.\n */\nexport async function offerExternalHomes(\n ctx: RelocationContext,\n writes: readonly ExternalWrite[],\n hooks: {\n confirm: Confirm;\n onNotice?: (message: string) => void;\n onRelocated?: (result: RelocateResult) => void;\n },\n): Promise<Set<string>> {\n const applied = new Set<string>();\n const groups = new Map<string, ExternalWrite[]>();\n for (const w of writes) {\n if (w.home.kind !== \"collection\") continue;\n const group = groups.get(w.home.collection) ?? [];\n group.push(w);\n groups.set(w.home.collection, group);\n }\n for (const [collection, group] of groups) {\n const require = new Map<string, string[]>();\n for (const w of group) {\n const keys = require.get(w.label) ?? [];\n if (!keys.includes(w.key)) keys.push(w.key);\n require.set(w.label, keys);\n }\n // Planned against the config as it stands now: an earlier collection's\n // accepted relocation may have created the config file.\n const plan = await planRelocation(ctx, {\n files: [...require.keys()],\n fields: dedupe(group.map((w) => w.key)),\n require,\n });\n const offers = relocationOffers(plan);\n if (offers.length === 0) continue;\n let yes = true;\n for (const offer of offers) {\n const { notice, question } = offerPrompt(offer, \"write\");\n hooks.onNotice?.(notice);\n if (!(await hooks.confirm(question))) {\n yes = false;\n break;\n }\n }\n if (!yes) continue;\n const result = await applyRelocation(ctx, plan);\n hooks.onRelocated?.(result);\n applied.add(collection);\n }\n return applied;\n}\n\n/**\n * The W1 and W2 lines for the writes that landed on a page, or would under a\n * dry run: one per collection, one for the pages in none of several\n * collections, and one under `--no-config`. Without the `manni: ` prefix,\n * which `warn()` adds.\n */\nexport function externalWriteWarnings(\n writes: readonly ExternalWrite[],\n dryRun: boolean,\n): string[] {\n const verb = dryRun ? \"would write\" : \"wrote\";\n const groups = new Map<string, ExternalWrite[]>();\n const groupOf = (w: ExternalWrite): string =>\n w.home.kind === \"collection\" ? `c:${w.home.collection}` : `n:${w.home.reason}`;\n for (const w of writes) {\n const id = groupOf(w);\n groups.set(id, [...(groups.get(id) ?? []), w]);\n }\n const out: string[] = [];\n for (const group of groups.values()) {\n const [first] = group;\n /* c8 ignore next -- a group holds at least one write. */\n if (first === undefined) continue;\n out.push(\n externalWriteWarning({\n verb,\n keys: dedupe(group.map((w) => w.key)),\n pages: new Set(group.map((w) => w.label)).size,\n home: first.home,\n createsHome: group.some(\n (w) => w.home.kind === \"collection\" && (w.home.createsCollection || w.home.addsPath !== undefined),\n ),\n }),\n );\n }\n return out;\n}\n\n/**\n * One W1 or W2 line, without the `manni: ` prefix: `keys` were written (or\n * would be) to `pages` pages whose home is `home`. `createsHome` says\n * relocate would create the collection, manifest or path that gives them a\n * manifest. Where it would only add a path to a collection whose manifest\n * already exists, the line says so rather than promising a manifest. One key\n * reads in the singular, several in the plural.\n */\nexport function externalWriteWarning(line: {\n verb: \"wrote\" | \"would write\";\n keys: readonly string[];\n pages: number;\n home: ProposedHome;\n createsHome: boolean;\n}): string {\n const { verb, keys, home } = line;\n const one = keys.length === 1;\n const head = `${verb} ${keys.join(\", \")} to ${pages(line.pages)}`;\n const prefer = one ? \"the schema prefers external metadata\" : \"their schemas prefer external metadata\";\n const them = one ? \"it\" : \"them\";\n if (home.kind === \"collection\") {\n if (!line.createsHome) {\n return `${head} in collection ${home.collection}; ${prefer}, and no manifest owns ${them}. Run manni meta relocate to move ${them}.`;\n }\n // Whether the collection has a manifest is the collection's, so any write in the group answers it.\n return home.createsCollection || home.createsManifest\n ? `${head}; ${prefer}. Run manni meta relocate to give ${them} a manifest.`\n : `${head}; ${prefer}. Run manni meta relocate to add ${them} to collection ${home.collection}.`;\n }\n return home.reason === \"no-config\"\n ? `${head}; ${prefer}, and --no-config leaves ${them} no manifest.`\n : `${head} that ${line.pages === 1 ? \"is\" : \"are\"} in none of the ${String(home.collections)} collections; ${prefer}, and only a collection has a manifest.`;\n}\n\n/**\n * The 1-based line of `key` in the entry for `entry`, in a manifest's text:\n * where a writer's report points after the write. A path entry matches\n * however the manifest spells it (`./docs/a.md` is `docs/a.md`).\n */\nexport function manifestKeyLine(\n text: string,\n entry: string,\n key: string,\n join: string,\n): number | undefined {\n const norm = (e: string): string =>\n join === PATH_JOIN ? e.replace(/\\\\/g, \"/\").replace(/^\\.\\//, \"\").replace(/\\/+/g, \"/\") : e;\n const lc = new LineCounter();\n const doc = parseDocument(text, { lineCounter: lc, uniqueKeys: false });\n const root = doc.contents;\n if (!isMap(root)) return undefined;\n for (const pair of root.items) {\n const spelled = isScalar(pair.key) ? String(pair.key.value) : String(pair.key);\n if (norm(spelled) !== norm(entry) || !isMap(pair.value)) continue;\n for (const kv of pair.value.items) {\n const name = isScalar(kv.key) ? String(kv.key.value) : String(kv.key);\n const range = isNode(kv.key) ? kv.key.range : undefined;\n if (name === key && range) return lc.linePos(range[0]).line;\n }\n }\n return undefined;\n}\n","/**\n * `meta-provenance` (proposal 0046): which model proposed which metadata, one\n * entry per model. `fields` names the values by JSON Pointer and `evals` names\n * the evals by id, and `confidence` is keyed by either, which cannot collide\n * because a pointer starts with `/` and an id cannot.\n *\n * Two tools write it: `manni meta fill` records the fields it writes, and\n * `manni docevals fill` records the evals it writes. They merge the same way,\n * so the merge lives here rather than in either command.\n */\n\n/** A name one run proposed, under `fields` or `evals`, and its confidence. */\nexport interface MetaProvenanceProposal {\n name: string;\n confidence: number;\n}\n\n/** Which list of an entry a run's proposals go under. */\nexport type MetaProvenanceKey = \"fields\" | \"evals\";\n\n/** An entry after a merge: whatever it held, with the run's names and confidences. */\nexport interface MergedMetaProvenanceEntry {\n \"generated-by\": string;\n confidence: Record<string, number>;\n [other: string]: unknown;\n}\n\nexport interface MergedMetaProvenance {\n /** The whole `meta-provenance` list, to write back. */\n list: unknown[];\n /** The entry the run merged into, as it now stands in `list`. */\n entry: MergedMetaProvenanceEntry;\n /** The entry's names under the merged key: its own first, then the run's new ones. */\n names: string[];\n}\n\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n/**\n * The page's `meta-provenance` list with one run's proposals merged in. The\n * first entry for `model` gains the new names under `key` after its own, and\n * their confidences; everything else in it, and every other entry, is kept.\n * Without one, a new entry is appended. `undefined` when the page holds\n * something other than a list, which there is no merging into.\n */\nexport function mergeMetaProvenance(\n held: unknown,\n model: string,\n key: MetaProvenanceKey,\n proposed: readonly MetaProvenanceProposal[],\n): MergedMetaProvenance | undefined {\n if (held !== undefined && !Array.isArray(held)) return undefined;\n const list: unknown[] = held === undefined ? [] : [...(held as unknown[])];\n const at = list.findIndex((e) => isPlainRecord(e) && e[\"generated-by\"] === model);\n const prior = list[at];\n const kept = isPlainRecord(prior) ? prior : {};\n const priorNames = kept[key];\n const names = Array.isArray(priorNames)\n ? (priorNames as unknown[]).filter((p): p is string => typeof p === \"string\")\n : [];\n const confidence: Record<string, number> = {};\n if (isPlainRecord(kept.confidence)) {\n for (const [k, v] of Object.entries(kept.confidence)) {\n if (typeof v === \"number\") confidence[k] = v;\n }\n }\n for (const p of proposed) {\n if (!names.includes(p.name)) names.push(p.name);\n confidence[p.name] = p.confidence;\n }\n const entry: MergedMetaProvenanceEntry = {\n ...kept,\n \"generated-by\": model,\n [key]: names,\n confidence,\n };\n if (at === -1) list.push(entry);\n else list[at] = entry;\n return { list, entry, names };\n}\n\n/** One `meta-provenance` entry as read: the model, and the names it proposed. */\nexport interface MetaProvenanceRecord {\n \"generated-by\": string;\n /** JSON Pointers, strings only; empty when the entry names none. */\n fields: string[];\n /** Eval ids, strings only; empty when the entry names none. */\n evals: string[];\n}\n\n/**\n * The readable entries of a `meta-provenance` value, in order. As with\n * `provenanceEntries`, an entry the schema would reject for its identity (not\n * a mapping, no model) is skipped rather than guessed at, and a malformed list\n * under `fields` or `evals` reads as naming nothing: the schema finding speaks\n * for it. A reader never throws on what a page holds.\n */\nexport function metaProvenanceEntries(value: unknown): MetaProvenanceRecord[] {\n if (!Array.isArray(value)) return [];\n const strings = (list: unknown): string[] =>\n Array.isArray(list)\n ? (list as unknown[]).filter((s): s is string => typeof s === \"string\")\n : [];\n const out: MetaProvenanceRecord[] = [];\n for (const item of value as unknown[]) {\n if (!isPlainRecord(item)) continue;\n const machine = item[\"generated-by\"];\n if (typeof machine !== \"string\" || machine === \"\") continue;\n out.push({ \"generated-by\": machine, fields: strings(item.fields), evals: strings(item.evals) });\n }\n return out;\n}\n"],"mappings":";;;;;;;;;;AAWA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AAI;AAChB,SAAO,EAAE,MAAM,OAAO,MAAM;AAC9B;AAkBO,SAAS,sBAAsB,OAAwC;AAC5E,MAAI,CAAC,MAAM,QAAQ,KAAK,EAAG,QAAO,CAAC;AACnC,QAAM,UAAU,CAAC,SACf,MAAM,QAAQ,IAAI,IACb,KAAmB,OAAO,CAAC,MAAmB,OAAO,MAAM,QAAQ,IACpE,CAAC;AACP,QAAM,MAA8B,CAAC;AACrC,aAAW,QAAQ,OAAoB;AACrC,QAAI,CAAC,cAAc,IAAI,EAAG;AAC1B,UAAM,UAAU,KAAK,cAAc;AACnC,QAAI,OAAO,YAAY,YAAY,YAAY,GAAI;AACnD,QAAI,KAAK,EAAE,gBAAgB,SAAS,QAAQ,QAAQ,KAAK,MAAM,GAAG,OAAO,QAAQ,KAAK,KAAK,EAAE,CAAC;AAAA,EAChG;AACA,SAAO;AACT;","names":["require"]}
|
|
@@ -1,76 +1,94 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
COMMON_FORMATS,
|
|
4
|
-
COMMON_FORMAT_LIST,
|
|
5
3
|
DEFAULT_VENDOR_DIR,
|
|
6
4
|
DERIVE_FORMATS,
|
|
7
5
|
DERIVE_FORMAT_LIST,
|
|
8
|
-
DocmetaError,
|
|
9
6
|
FILL_FORMATS,
|
|
10
7
|
FILL_FORMAT_LIST,
|
|
11
|
-
LOCAL_FLAG_HELP,
|
|
12
|
-
LOCATION_EXTERNAL_SCHEMA,
|
|
13
|
-
LOCATION_PAGE_SCHEMA,
|
|
14
|
-
OMITTED_WHEN_CLEAN,
|
|
15
|
-
QUERY_FORMATS,
|
|
16
|
-
QUERY_FORMAT_LIST,
|
|
17
|
-
REPORT_FORMATS,
|
|
18
|
-
REPORT_FORMAT_LIST,
|
|
19
|
-
STDIN_LABEL,
|
|
20
|
-
Validator,
|
|
21
|
-
applyRelocation,
|
|
22
|
-
collect,
|
|
23
|
-
collectSchemaPins,
|
|
24
|
-
configOption,
|
|
25
8
|
deriveFailed,
|
|
26
|
-
explicitFalse,
|
|
27
|
-
fail,
|
|
28
|
-
formatList,
|
|
29
9
|
getSchemasInfo,
|
|
30
|
-
isCommonFormat,
|
|
31
10
|
isDeriveFormat,
|
|
32
11
|
isFillFormat,
|
|
33
|
-
isMachineFormat,
|
|
34
|
-
isParamName,
|
|
35
|
-
isQueryFindingsFormat,
|
|
36
|
-
isQueryFormat,
|
|
37
|
-
isReportFormat,
|
|
38
|
-
keyHome,
|
|
39
|
-
loadConfig,
|
|
40
|
-
notice,
|
|
41
|
-
offerPrompt,
|
|
42
|
-
package_default,
|
|
43
|
-
palette,
|
|
44
|
-
planRelocation,
|
|
45
|
-
programName,
|
|
46
|
-
readStdin,
|
|
47
|
-
relocateFailed,
|
|
48
|
-
relocationContext,
|
|
49
|
-
render,
|
|
50
12
|
renderDerive,
|
|
51
13
|
renderFill,
|
|
52
14
|
renderGet,
|
|
53
15
|
renderQuery,
|
|
54
16
|
renderQueryCsv,
|
|
55
|
-
reportConfig,
|
|
56
|
-
resolveRunConfig,
|
|
57
|
-
rowsToFindings,
|
|
58
17
|
runDerive,
|
|
59
18
|
runFill,
|
|
60
19
|
runGet,
|
|
61
20
|
runInferSchema,
|
|
62
21
|
runQuery,
|
|
63
22
|
runRelocate,
|
|
64
|
-
runValidate,
|
|
65
23
|
runVendorSchema,
|
|
24
|
+
terminalConfirm
|
|
25
|
+
} from "./chunk-CYWHFSRT.js";
|
|
26
|
+
import {
|
|
27
|
+
collect,
|
|
28
|
+
configOption,
|
|
29
|
+
explicitFalse,
|
|
30
|
+
readStdin,
|
|
31
|
+
reportConfig,
|
|
32
|
+
rowsToFindings,
|
|
33
|
+
runValidate,
|
|
34
|
+
splitList
|
|
35
|
+
} from "./chunk-V46OILVC.js";
|
|
36
|
+
import {
|
|
37
|
+
LOCATION_EXTERNAL_SCHEMA,
|
|
38
|
+
LOCATION_PAGE_SCHEMA,
|
|
39
|
+
Validator,
|
|
40
|
+
applyRelocation,
|
|
41
|
+
isParamName,
|
|
42
|
+
keyHome,
|
|
43
|
+
offerPrompt,
|
|
44
|
+
planRelocation,
|
|
45
|
+
relocateFailed,
|
|
46
|
+
relocationContext
|
|
47
|
+
} from "./chunk-RLR4TKUZ.js";
|
|
48
|
+
import {
|
|
49
|
+
COMMON_FORMATS,
|
|
50
|
+
COMMON_FORMAT_LIST,
|
|
51
|
+
OMITTED_WHEN_CLEAN,
|
|
52
|
+
QUERY_FORMATS,
|
|
53
|
+
QUERY_FORMAT_LIST,
|
|
54
|
+
REPORT_FORMATS,
|
|
55
|
+
REPORT_FORMAT_LIST,
|
|
56
|
+
formatList,
|
|
57
|
+
isCommonFormat,
|
|
58
|
+
isMachineFormat,
|
|
59
|
+
isQueryFindingsFormat,
|
|
60
|
+
isQueryFormat,
|
|
61
|
+
isReportFormat,
|
|
62
|
+
render
|
|
63
|
+
} from "./chunk-C6OH6CNF.js";
|
|
64
|
+
import {
|
|
65
|
+
DocmetaError,
|
|
66
|
+
STDIN_LABEL,
|
|
67
|
+
collectSchemaPins,
|
|
68
|
+
loadConfig,
|
|
69
|
+
resolveRunConfig,
|
|
66
70
|
schemaLoadOptions,
|
|
67
|
-
shouldColor,
|
|
68
|
-
splitList,
|
|
69
71
|
supportedExtensions,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
toJsonText
|
|
73
|
+
} from "./chunk-JVTNMVYU.js";
|
|
74
|
+
import {
|
|
75
|
+
fail
|
|
76
|
+
} from "./chunk-YEUYKR62.js";
|
|
77
|
+
import {
|
|
78
|
+
palette,
|
|
79
|
+
shouldColor
|
|
80
|
+
} from "./chunk-RNVYGWIC.js";
|
|
81
|
+
import {
|
|
82
|
+
LOCAL_FLAG_HELP,
|
|
83
|
+
notice,
|
|
72
84
|
warn
|
|
73
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-Q35YIDBV.js";
|
|
86
|
+
import {
|
|
87
|
+
package_default
|
|
88
|
+
} from "./chunk-UZC7LDAQ.js";
|
|
89
|
+
import {
|
|
90
|
+
programName
|
|
91
|
+
} from "./chunk-OWBRDNRZ.js";
|
|
74
92
|
|
|
75
93
|
// src/meta/cli.ts
|
|
76
94
|
import { existsSync } from "node:fs";
|
|
@@ -1500,6 +1518,9 @@ function buildProgram() {
|
|
|
1500
1518
|
}
|
|
1501
1519
|
|
|
1502
1520
|
export {
|
|
1521
|
+
resolveGetInputs,
|
|
1522
|
+
resolveQueryInputs,
|
|
1523
|
+
parseQueryParams,
|
|
1503
1524
|
buildProgram
|
|
1504
1525
|
};
|
|
1505
|
-
//# sourceMappingURL=chunk-
|
|
1526
|
+
//# sourceMappingURL=chunk-KCGV52AM.js.map
|