@hawkeyexl/manni 4.5.0 → 4.7.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 +1 -1
- package/dist/batch-U6S2JUUN.js +41 -0
- package/dist/build-4RN6WBCP.js +32 -0
- package/dist/calibrate-6VIZYR4L.js +36 -0
- package/dist/capture-DP3NXAZE.js +34 -0
- package/dist/{check-RQIIIURI.js → check-ERVNGKLC.js} +13 -14
- package/dist/check-IWHUPAZM.js +886 -0
- package/dist/check-IWHUPAZM.js.map +1 -0
- package/dist/{check-ESNS7ZBC.js → check-OAJWC3WD.js} +7 -5
- package/dist/check-STHXZIZO.js +26 -0
- package/dist/{chunk-TA42STP7.js → chunk-2ZWTSRE5.js} +4 -4
- package/dist/{chunk-F2OVHJNC.js → chunk-4Z2MN5FR.js} +11 -11
- package/dist/{chunk-HVFR66GQ.js → chunk-5UB47BEV.js} +3280 -283
- package/dist/chunk-5UB47BEV.js.map +1 -0
- package/dist/{chunk-TCC737IS.js → chunk-5VWDIWOH.js} +4 -4
- package/dist/{chunk-B7XUEQF3.js → chunk-6KKZXB2O.js} +7 -5
- package/dist/{chunk-B7XUEQF3.js.map → chunk-6KKZXB2O.js.map} +1 -1
- package/dist/{chunk-ELZ2IIOF.js → chunk-6URSCTTX.js} +2 -2
- package/dist/{chunk-K3U5F2QT.js → chunk-6VDBP5UV.js} +12 -12
- package/dist/chunk-7EL5LLKD.js +233 -0
- package/dist/chunk-7EL5LLKD.js.map +1 -0
- package/dist/{chunk-C3KI45RF.js → chunk-7XZ6INKO.js} +4 -4
- package/dist/{chunk-ZX43SRZR.js → chunk-AMEILOVV.js} +8 -6
- package/dist/{chunk-ZX43SRZR.js.map → chunk-AMEILOVV.js.map} +1 -1
- package/dist/{chunk-SNEHX4VE.js → chunk-B5CMM57M.js} +2 -2
- package/dist/chunk-BWCWTHYS.js +146 -0
- package/dist/chunk-BWCWTHYS.js.map +1 -0
- package/dist/{chunk-QLUMKWQQ.js → chunk-C2TJG5KV.js} +10 -6
- package/dist/{chunk-QLUMKWQQ.js.map → chunk-C2TJG5KV.js.map} +1 -1
- package/dist/{chunk-GAZFKZHM.js → chunk-CEVU3GFF.js} +6 -6
- package/dist/chunk-CI55ABCK.js +502 -0
- package/dist/chunk-CI55ABCK.js.map +1 -0
- package/dist/{chunk-QCBICNKC.js → chunk-CR3HZERW.js} +202 -54
- package/dist/chunk-CR3HZERW.js.map +1 -0
- package/dist/chunk-CU57HT2E.js +116 -0
- package/dist/chunk-CU57HT2E.js.map +1 -0
- package/dist/chunk-CWXZ2MRT.js +222 -0
- package/dist/chunk-CWXZ2MRT.js.map +1 -0
- package/dist/chunk-D2LBN44V.js +134 -0
- package/dist/chunk-D2LBN44V.js.map +1 -0
- package/dist/chunk-D6RO54QD.js +674 -0
- package/dist/chunk-D6RO54QD.js.map +1 -0
- package/dist/{chunk-52PDIZKV.js → chunk-ECVQNGTH.js} +3 -3
- package/dist/chunk-FQGLRJGX.js +174 -0
- package/dist/chunk-FQGLRJGX.js.map +1 -0
- package/dist/{chunk-NGK3N6F2.js → chunk-GCC52YZD.js} +3 -3
- package/dist/chunk-HX44GB4Z.js +30 -0
- package/dist/chunk-HX44GB4Z.js.map +1 -0
- package/dist/{chunk-NN4ASVTY.js → chunk-IIFADWWI.js} +4 -4
- package/dist/{chunk-OIZ3XMKB.js → chunk-IOL74S4J.js} +4 -4
- package/dist/{chunk-UK2I3ACY.js → chunk-IZBBXKMJ.js} +4 -4
- package/dist/{chunk-YA63PVWI.js → chunk-K52CS4KT.js} +12 -10
- package/dist/{chunk-YA63PVWI.js.map → chunk-K52CS4KT.js.map} +1 -1
- package/dist/{chunk-7OQAU4EA.js → chunk-LDKIIZDW.js} +16 -12
- package/dist/{chunk-7OQAU4EA.js.map → chunk-LDKIIZDW.js.map} +1 -1
- package/dist/{chunk-QY3DOZMS.js → chunk-LONRQBGV.js} +4 -4
- package/dist/{chunk-EL2BZTDL.js → chunk-LXJEAV2V.js} +13 -11
- package/dist/{chunk-EL2BZTDL.js.map → chunk-LXJEAV2V.js.map} +1 -1
- package/dist/{chunk-XWFNO5PO.js → chunk-MIBWI5H7.js} +3 -3
- package/dist/{chunk-527HHQPS.js → chunk-MSMB6XOS.js} +6 -4
- package/dist/{chunk-527HHQPS.js.map → chunk-MSMB6XOS.js.map} +1 -1
- package/dist/{chunk-C6HZ6C5T.js → chunk-NIFEEIGQ.js} +2 -2
- package/dist/{chunk-JQU7FHYH.js → chunk-NZ6TNSCU.js} +10 -10
- package/dist/{chunk-3R5Y3XOL.js → chunk-OOEMKOX6.js} +29 -591
- package/dist/chunk-OOEMKOX6.js.map +1 -0
- package/dist/{chunk-MZC62HPZ.js → chunk-PAOVVHQX.js} +2 -2
- package/dist/chunk-PNX43DYW.js +849 -0
- package/dist/chunk-PNX43DYW.js.map +1 -0
- package/dist/chunk-QCHVR4ZM.js +286 -0
- package/dist/chunk-QCHVR4ZM.js.map +1 -0
- package/dist/{chunk-SJO2FTPG.js → chunk-QP5X66TO.js} +73 -1304
- package/dist/chunk-QP5X66TO.js.map +1 -0
- package/dist/{chunk-HQFVJDEN.js → chunk-QQNPVW3J.js} +19 -19
- package/dist/chunk-TPVOOTMN.js +532 -0
- package/dist/chunk-TPVOOTMN.js.map +1 -0
- package/dist/{chunk-IA7BMIPE.js → chunk-UZKQSWHJ.js} +2 -2
- package/dist/chunk-WQWKYAAK.js +86 -0
- package/dist/chunk-WQWKYAAK.js.map +1 -0
- package/dist/{chunk-CP4ZM43V.js → chunk-WTEILBKC.js} +2 -2
- package/dist/{chunk-LJ2RDH3F.js → chunk-XG6PVB5S.js} +1 -23
- package/dist/chunk-XG6PVB5S.js.map +1 -0
- package/dist/{chunk-Q35YIDBV.js → chunk-XKBEHKWO.js} +29 -264
- package/dist/chunk-XKBEHKWO.js.map +1 -0
- package/dist/{chunk-BOIF2XGG.js → chunk-XXDXIIQ4.js} +2 -2
- package/dist/{chunk-6XTQDFGP.js → chunk-YSCZL4U5.js} +3 -3
- package/dist/{chunk-6XTQDFGP.js.map → chunk-YSCZL4U5.js.map} +1 -1
- package/dist/{chunk-7ZUCEMCY.js → chunk-ZEXGGGLW.js} +9 -11
- package/dist/{chunk-7ZUCEMCY.js.map → chunk-ZEXGGGLW.js.map} +1 -1
- package/dist/{chunk-DX32P2DT.js → chunk-ZKAKA54B.js} +2 -2
- package/dist/{chunk-TVIX653Q.js → chunk-ZKCNPKUO.js} +4 -4
- package/dist/{chunk-DE7JSWXV.js → chunk-ZNE25EAR.js} +8 -6
- package/dist/{chunk-DE7JSWXV.js.map → chunk-ZNE25EAR.js.map} +1 -1
- package/dist/{chunk-FLF6AECQ.js → chunk-ZPP75QWG.js} +17 -15
- package/dist/{chunk-FLF6AECQ.js.map → chunk-ZPP75QWG.js.map} +1 -1
- package/dist/{cli-PRZHQ3QB.js → cli-37SRAYNE.js} +14 -15
- package/dist/{cli-PRZHQ3QB.js.map → cli-37SRAYNE.js.map} +1 -1
- package/dist/{cli-TYGOHJOJ.js → cli-HXWYUKGJ.js} +225 -58
- package/dist/cli-HXWYUKGJ.js.map +1 -0
- package/dist/{cli-HUIMNJT6.js → cli-IRHPPUFJ.js} +19 -20
- package/dist/{cli-HUIMNJT6.js.map → cli-IRHPPUFJ.js.map} +1 -1
- package/dist/{cli-6PGVHP7Y.js → cli-KIID535Y.js} +17 -19
- package/dist/{cli-6PGVHP7Y.js.map → cli-KIID535Y.js.map} +1 -1
- package/dist/{cli-AAG3N4NB.js → cli-MTDGQIIV.js} +17 -18
- package/dist/{cli-AAG3N4NB.js.map → cli-MTDGQIIV.js.map} +1 -1
- package/dist/{cli-E3H6ZP4I.js → cli-NM6FZ54R.js} +5 -3
- package/dist/{cli-E3H6ZP4I.js.map → cli-NM6FZ54R.js.map} +1 -1
- package/dist/{cli-MHTYPVOD.js → cli-XIODOEUG.js} +113 -20
- package/dist/{cli-MHTYPVOD.js.map → cli-XIODOEUG.js.map} +1 -1
- package/dist/{cli-YW6VWBHX.js → cli-YL3IDR52.js} +10 -10
- package/dist/{cli-QKIJOXGW.js → cli-ZQUJYQBA.js} +17 -17
- package/dist/cli.js +11 -11
- package/dist/config-O6UBGEDK.js +26 -0
- package/dist/conformance-ALLPNGEQ.js +18 -0
- package/dist/docmeta.js +9 -9
- package/dist/github-UCYLM3DR.js +26 -0
- package/dist/github-VEJFO6JJ.js +31 -0
- package/dist/host-6GURH5HE.js +23 -0
- package/dist/index.d.ts +72 -4
- package/dist/index.js +176 -166
- package/dist/index.js.map +1 -1
- package/dist/{json-4DCKDGUV.js → json-6F52FSXZ.js} +12 -13
- package/dist/lint-X2GNINK6.js +29 -0
- package/dist/list-DP3O3CWB.js +30 -0
- package/dist/list-P77RZFZF.js +28 -0
- package/dist/{page-QEDB7EVU.js → page-WQCMBNRD.js} +11 -12
- package/dist/prepare-52QOK7M4.js +155 -0
- package/dist/prepare-52QOK7M4.js.map +1 -0
- package/dist/{pretty-SQX33UM2.js → pretty-5MMMNSWF.js} +13 -14
- package/dist/{pretty-5DGEBZSV.js → pretty-H4DQREMW.js} +12 -13
- package/dist/provider-AMGRDY6V.js +34 -0
- package/dist/release-CTYRHZL4.js +36 -0
- package/dist/release-CTYRHZL4.js.map +1 -0
- package/dist/{reporters-YELDDYJD.js → reporters-SU3VUKKX.js} +7 -5
- package/dist/{reporters-OHSI3RMV.js → reporters-WIHBEMPG.js} +11 -12
- package/dist/reporters-WIHBEMPG.js.map +1 -0
- package/dist/run-L2DWJ26K.js +32 -0
- package/dist/run-L2DWJ26K.js.map +1 -0
- package/dist/{term-2WMDZ4PY.js → term-PJIJQZNF.js} +16 -17
- package/dist/{term-2WMDZ4PY.js.map → term-PJIJQZNF.js.map} +1 -1
- package/dist/validate-XCDSPURG.js +17 -0
- package/dist/validate-XCDSPURG.js.map +1 -0
- package/package.json +2 -2
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/plugin/manni/hooks/hooks.json +47 -0
- package/dist/batch-GOE3UXOD.js +0 -36
- package/dist/build-M7BMEHL2.js +0 -33
- package/dist/calibrate-6RRAILUY.js +0 -31
- package/dist/capture-RJPQ6B4N.js +0 -32
- package/dist/check-BQD64X3N.js +0 -27
- package/dist/chunk-3R5Y3XOL.js.map +0 -1
- package/dist/chunk-3YHAYXBC.js +0 -164
- package/dist/chunk-3YHAYXBC.js.map +0 -1
- package/dist/chunk-HVFR66GQ.js.map +0 -1
- package/dist/chunk-LJ2RDH3F.js.map +0 -1
- package/dist/chunk-NAZRLJAK.js +0 -3090
- package/dist/chunk-NAZRLJAK.js.map +0 -1
- package/dist/chunk-Q35YIDBV.js.map +0 -1
- package/dist/chunk-QCBICNKC.js.map +0 -1
- package/dist/chunk-SJO2FTPG.js.map +0 -1
- package/dist/chunk-TU2WUBVZ.js +0 -2
- package/dist/cli-TYGOHJOJ.js.map +0 -1
- package/dist/github-3WMSTNTK.js +0 -32
- package/dist/github-OXSJQ4PS.js +0 -27
- package/dist/lint-YDHVVZHT.js +0 -30
- package/dist/list-3ZO2NIYO.js +0 -31
- package/dist/list-EJH6VAOW.js +0 -29
- package/dist/run-IP6NZHAG.js +0 -33
- package/dist/validate-G6HH3YXL.js +0 -16
- /package/dist/{batch-GOE3UXOD.js.map → batch-U6S2JUUN.js.map} +0 -0
- /package/dist/{build-M7BMEHL2.js.map → build-4RN6WBCP.js.map} +0 -0
- /package/dist/{calibrate-6RRAILUY.js.map → calibrate-6VIZYR4L.js.map} +0 -0
- /package/dist/{capture-RJPQ6B4N.js.map → capture-DP3NXAZE.js.map} +0 -0
- /package/dist/{check-BQD64X3N.js.map → check-ERVNGKLC.js.map} +0 -0
- /package/dist/{check-ESNS7ZBC.js.map → check-OAJWC3WD.js.map} +0 -0
- /package/dist/{check-RQIIIURI.js.map → check-STHXZIZO.js.map} +0 -0
- /package/dist/{chunk-TA42STP7.js.map → chunk-2ZWTSRE5.js.map} +0 -0
- /package/dist/{chunk-F2OVHJNC.js.map → chunk-4Z2MN5FR.js.map} +0 -0
- /package/dist/{chunk-TCC737IS.js.map → chunk-5VWDIWOH.js.map} +0 -0
- /package/dist/{chunk-ELZ2IIOF.js.map → chunk-6URSCTTX.js.map} +0 -0
- /package/dist/{chunk-K3U5F2QT.js.map → chunk-6VDBP5UV.js.map} +0 -0
- /package/dist/{chunk-C3KI45RF.js.map → chunk-7XZ6INKO.js.map} +0 -0
- /package/dist/{chunk-SNEHX4VE.js.map → chunk-B5CMM57M.js.map} +0 -0
- /package/dist/{chunk-GAZFKZHM.js.map → chunk-CEVU3GFF.js.map} +0 -0
- /package/dist/{chunk-52PDIZKV.js.map → chunk-ECVQNGTH.js.map} +0 -0
- /package/dist/{chunk-NGK3N6F2.js.map → chunk-GCC52YZD.js.map} +0 -0
- /package/dist/{chunk-NN4ASVTY.js.map → chunk-IIFADWWI.js.map} +0 -0
- /package/dist/{chunk-OIZ3XMKB.js.map → chunk-IOL74S4J.js.map} +0 -0
- /package/dist/{chunk-UK2I3ACY.js.map → chunk-IZBBXKMJ.js.map} +0 -0
- /package/dist/{chunk-QY3DOZMS.js.map → chunk-LONRQBGV.js.map} +0 -0
- /package/dist/{chunk-XWFNO5PO.js.map → chunk-MIBWI5H7.js.map} +0 -0
- /package/dist/{chunk-C6HZ6C5T.js.map → chunk-NIFEEIGQ.js.map} +0 -0
- /package/dist/{chunk-JQU7FHYH.js.map → chunk-NZ6TNSCU.js.map} +0 -0
- /package/dist/{chunk-MZC62HPZ.js.map → chunk-PAOVVHQX.js.map} +0 -0
- /package/dist/{chunk-HQFVJDEN.js.map → chunk-QQNPVW3J.js.map} +0 -0
- /package/dist/{chunk-IA7BMIPE.js.map → chunk-UZKQSWHJ.js.map} +0 -0
- /package/dist/{chunk-CP4ZM43V.js.map → chunk-WTEILBKC.js.map} +0 -0
- /package/dist/{chunk-BOIF2XGG.js.map → chunk-XXDXIIQ4.js.map} +0 -0
- /package/dist/{chunk-DX32P2DT.js.map → chunk-ZKAKA54B.js.map} +0 -0
- /package/dist/{chunk-TVIX653Q.js.map → chunk-ZKCNPKUO.js.map} +0 -0
- /package/dist/{chunk-TU2WUBVZ.js.map → cli-YL3IDR52.js.map} +0 -0
- /package/dist/{cli-QKIJOXGW.js.map → cli-ZQUJYQBA.js.map} +0 -0
- /package/dist/{cli-YW6VWBHX.js.map → config-O6UBGEDK.js.map} +0 -0
- /package/dist/{github-3WMSTNTK.js.map → conformance-ALLPNGEQ.js.map} +0 -0
- /package/dist/{github-OXSJQ4PS.js.map → github-UCYLM3DR.js.map} +0 -0
- /package/dist/{json-4DCKDGUV.js.map → github-VEJFO6JJ.js.map} +0 -0
- /package/dist/{lint-YDHVVZHT.js.map → host-6GURH5HE.js.map} +0 -0
- /package/dist/{list-3ZO2NIYO.js.map → json-6F52FSXZ.js.map} +0 -0
- /package/dist/{list-EJH6VAOW.js.map → lint-X2GNINK6.js.map} +0 -0
- /package/dist/{page-QEDB7EVU.js.map → list-DP3O3CWB.js.map} +0 -0
- /package/dist/{pretty-5DGEBZSV.js.map → list-P77RZFZF.js.map} +0 -0
- /package/dist/{pretty-SQX33UM2.js.map → page-WQCMBNRD.js.map} +0 -0
- /package/dist/{reporters-OHSI3RMV.js.map → pretty-5MMMNSWF.js.map} +0 -0
- /package/dist/{reporters-YELDDYJD.js.map → pretty-H4DQREMW.js.map} +0 -0
- /package/dist/{run-IP6NZHAG.js.map → provider-AMGRDY6V.js.map} +0 -0
- /package/dist/{validate-G6HH3YXL.js.map → reporters-SU3VUKKX.js.map} +0 -0
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
idHash
|
|
4
|
+
} from "./chunk-7EL5LLKD.js";
|
|
5
|
+
import "./chunk-D6RO54QD.js";
|
|
2
6
|
import {
|
|
3
7
|
readStdin
|
|
4
8
|
} from "./chunk-TZOYZK2E.js";
|
|
9
|
+
import "./chunk-CWXZ2MRT.js";
|
|
10
|
+
import "./chunk-OOEMKOX6.js";
|
|
11
|
+
import "./chunk-4TSWU2SU.js";
|
|
12
|
+
import {
|
|
13
|
+
DEFAULT_CAPTURE_DIR
|
|
14
|
+
} from "./chunk-CU57HT2E.js";
|
|
5
15
|
import "./chunk-UKZNLVJW.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-ZKCNPKUO.js";
|
|
17
|
+
import "./chunk-CR3HZERW.js";
|
|
8
18
|
import {
|
|
9
19
|
memberOf,
|
|
10
20
|
retainMembers
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-5UB47BEV.js";
|
|
22
|
+
import "./chunk-5VWDIWOH.js";
|
|
13
23
|
import {
|
|
14
24
|
extractorForExtension,
|
|
15
25
|
resolveTargetSet,
|
|
16
26
|
supportedExtensions,
|
|
17
27
|
withSharedWalks
|
|
18
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MSMB6XOS.js";
|
|
19
29
|
import {
|
|
20
30
|
fail
|
|
21
31
|
} from "./chunk-YEUYKR62.js";
|
|
@@ -25,12 +35,16 @@ import {
|
|
|
25
35
|
import "./chunk-MNH7QO4Z.js";
|
|
26
36
|
import {
|
|
27
37
|
findFamilyConfigFile,
|
|
28
|
-
notice,
|
|
29
38
|
readFamilyConfigFile
|
|
30
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-XKBEHKWO.js";
|
|
40
|
+
import {
|
|
41
|
+
notice,
|
|
42
|
+
warn
|
|
43
|
+
} from "./chunk-HX44GB4Z.js";
|
|
44
|
+
import "./chunk-QCHVR4ZM.js";
|
|
31
45
|
import {
|
|
32
46
|
package_default
|
|
33
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-YSCZL4U5.js";
|
|
34
48
|
import {
|
|
35
49
|
programName
|
|
36
50
|
} from "./chunk-OWBRDNRZ.js";
|
|
@@ -66,13 +80,23 @@ function parseEnvelope(text) {
|
|
|
66
80
|
const cwd = str(doc.cwd);
|
|
67
81
|
const toolName = str(doc.tool_name);
|
|
68
82
|
const model = str(doc.model) ?? str(record(doc.model)?.id);
|
|
83
|
+
const strings = {
|
|
84
|
+
sessionId: str(doc.session_id),
|
|
85
|
+
transcriptPath: str(doc.transcript_path),
|
|
86
|
+
agentTranscriptPath: str(doc.agent_transcript_path),
|
|
87
|
+
agentId: str(doc.agent_id),
|
|
88
|
+
agentType: str(doc.agent_type),
|
|
89
|
+
lastAssistantMessage: str(doc.last_assistant_message)
|
|
90
|
+
};
|
|
91
|
+
const given = Object.fromEntries(Object.entries(strings).filter(([, v]) => v !== void 0));
|
|
69
92
|
return {
|
|
70
93
|
event,
|
|
71
94
|
stopHookActive: doc.stop_hook_active === true,
|
|
72
95
|
...cwd === void 0 ? {} : { cwd },
|
|
73
96
|
...toolName === void 0 ? {} : { toolName },
|
|
74
97
|
...filePath === void 0 ? {} : { filePath },
|
|
75
|
-
...model === void 0 ? {} : { model }
|
|
98
|
+
...model === void 0 ? {} : { model },
|
|
99
|
+
...given
|
|
76
100
|
};
|
|
77
101
|
}
|
|
78
102
|
async function readEnvelope(stream = process.stdin) {
|
|
@@ -139,8 +163,13 @@ async function loadFamily(cwd, configPath) {
|
|
|
139
163
|
const file = configPath === void 0 ? await findFamilyConfigFile(cwd, toError) : await readFamilyConfigFile(configPath, cwd, toError);
|
|
140
164
|
if (file === null) throw noConfigError(cwd);
|
|
141
165
|
const doc = parseYaml(file.text);
|
|
142
|
-
const
|
|
143
|
-
|
|
166
|
+
const top = record2(doc);
|
|
167
|
+
const sections = new Set(top === void 0 ? [] : Object.keys(top));
|
|
168
|
+
const conformance = record2(top?.tracevals)?.conformance !== void 0;
|
|
169
|
+
return { file, configPath: configPath ?? file.source, sections, conformance, collections: file.collections };
|
|
170
|
+
}
|
|
171
|
+
function record2(value) {
|
|
172
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
144
173
|
}
|
|
145
174
|
function labelFrom(cwd, path) {
|
|
146
175
|
return relative(cwd, path).split(sep).join("/");
|
|
@@ -161,7 +190,7 @@ async function listMembers(family, cwd) {
|
|
|
161
190
|
}
|
|
162
191
|
|
|
163
192
|
// src/family/commands/check.ts
|
|
164
|
-
import { extname, resolve as resolve3 } from "node:path";
|
|
193
|
+
import { basename, extname, resolve as resolve3 } from "node:path";
|
|
165
194
|
|
|
166
195
|
// src/family/core/changed.ts
|
|
167
196
|
import { execFile } from "node:child_process";
|
|
@@ -206,6 +235,23 @@ async function changedFiles(cwd) {
|
|
|
206
235
|
return { files: files.map(absolute), removed: removed.map(absolute), dirty: status.length > 0 };
|
|
207
236
|
}
|
|
208
237
|
|
|
238
|
+
// src/family/core/said-once.ts
|
|
239
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
240
|
+
import { dirname, join } from "node:path";
|
|
241
|
+
function saidPath(projectDir, sessionId, key) {
|
|
242
|
+
return join(projectDir, DEFAULT_CAPTURE_DIR, `${idHash(sessionId)}.${key}.said`);
|
|
243
|
+
}
|
|
244
|
+
function sayOnce(projectDir, sessionId, key) {
|
|
245
|
+
const path = saidPath(projectDir, sessionId, key);
|
|
246
|
+
try {
|
|
247
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
248
|
+
writeFileSync(path, "", { flag: "wx" });
|
|
249
|
+
return true;
|
|
250
|
+
} catch (err) {
|
|
251
|
+
return err.code !== "EEXIST";
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
209
255
|
// src/family/commands/check.ts
|
|
210
256
|
var CHECK_FORMATS = ["pretty", "json", "github"];
|
|
211
257
|
async function runDomain(domain, ctx) {
|
|
@@ -214,8 +260,8 @@ async function runDomain(domain, ctx) {
|
|
|
214
260
|
switch (domain) {
|
|
215
261
|
case "meta": {
|
|
216
262
|
const [{ runValidate }, { render: renderMeta }] = await Promise.all([
|
|
217
|
-
import("./validate-
|
|
218
|
-
import("./reporters-
|
|
263
|
+
import("./validate-XCDSPURG.js"),
|
|
264
|
+
import("./reporters-SU3VUKKX.js")
|
|
219
265
|
]);
|
|
220
266
|
const run2 = await runValidate({ inputs, configPath, cwd, skipDefaultOnly: true, onNotice });
|
|
221
267
|
if (run2.results.length === 0) {
|
|
@@ -228,10 +274,10 @@ async function runDomain(domain, ctx) {
|
|
|
228
274
|
}
|
|
229
275
|
case "cite": {
|
|
230
276
|
const [{ runCheck: runCite }, { renderCheckPretty: citePretty }, { renderCheckJson: citeJson }, { renderCheckGithub: citeGithub }] = await Promise.all([
|
|
231
|
-
import("./check-
|
|
232
|
-
import("./pretty-
|
|
277
|
+
import("./check-ERVNGKLC.js"),
|
|
278
|
+
import("./pretty-5MMMNSWF.js"),
|
|
233
279
|
import("./json-7WV7KL6H.js"),
|
|
234
|
-
import("./github-
|
|
280
|
+
import("./github-VEJFO6JJ.js")
|
|
235
281
|
]);
|
|
236
282
|
const run2 = await runCite({ inputs, configPath, cwd, onNotice });
|
|
237
283
|
if (!run2.pages.some((p) => p.citations.length > 0 || p.findings.length > 0)) {
|
|
@@ -245,8 +291,8 @@ async function runDomain(domain, ctx) {
|
|
|
245
291
|
case "lint": {
|
|
246
292
|
if (!family.sections.has("lint")) return { skipped: NOT_SET_UP.lint };
|
|
247
293
|
const [{ runLint }, { render: renderLint }] = await Promise.all([
|
|
248
|
-
import("./lint-
|
|
249
|
-
import("./reporters-
|
|
294
|
+
import("./lint-X2GNINK6.js"),
|
|
295
|
+
import("./reporters-WIHBEMPG.js")
|
|
250
296
|
]);
|
|
251
297
|
const run2 = await runLint({ inputs, configPath, cwd, onNotice });
|
|
252
298
|
return {
|
|
@@ -256,7 +302,7 @@ async function runDomain(domain, ctx) {
|
|
|
256
302
|
}
|
|
257
303
|
case "docevals": {
|
|
258
304
|
const [{ runRun: runDocevals }, { render: renderDocevals }, { DocevalsError }] = await Promise.all([
|
|
259
|
-
import("./run-
|
|
305
|
+
import("./run-L2DWJ26K.js"),
|
|
260
306
|
import("./reporters-M6LJ2IYU.js"),
|
|
261
307
|
import("./types-Y6TXHM7M.js")
|
|
262
308
|
]);
|
|
@@ -283,10 +329,10 @@ async function runDomain(domain, ctx) {
|
|
|
283
329
|
}
|
|
284
330
|
case "term": {
|
|
285
331
|
const [{ runCheck: runTerm }, { renderFindingsPretty: termPretty }, { renderFindingsJson: termJson }, { renderFindingsGithub: termGithub }] = await Promise.all([
|
|
286
|
-
import("./check-
|
|
287
|
-
import("./pretty-
|
|
288
|
-
import("./json-
|
|
289
|
-
import("./github-
|
|
332
|
+
import("./check-STHXZIZO.js"),
|
|
333
|
+
import("./pretty-H4DQREMW.js"),
|
|
334
|
+
import("./json-6F52FSXZ.js"),
|
|
335
|
+
import("./github-UCYLM3DR.js")
|
|
290
336
|
]);
|
|
291
337
|
const report = await runTerm({ inputs, configPath, cwd, allowEmpty: true, onNotice });
|
|
292
338
|
if (report.terms === 0) return { skipped: NOT_SET_UP.term };
|
|
@@ -298,8 +344,8 @@ async function runDomain(domain, ctx) {
|
|
|
298
344
|
case "graph": {
|
|
299
345
|
if (!family.sections.has("graph")) return { skipped: NOT_SET_UP.graph };
|
|
300
346
|
const [{ buildGraph }, { runCheck: runGraph, renderCheck: renderGraph }] = await Promise.all([
|
|
301
|
-
import("./build-
|
|
302
|
-
import("./check-
|
|
347
|
+
import("./build-4RN6WBCP.js"),
|
|
348
|
+
import("./check-OAJWC3WD.js")
|
|
303
349
|
]);
|
|
304
350
|
const built = await buildGraph({ config: configPath, cwd });
|
|
305
351
|
for (const warning of built.warnings) onNotice(warning);
|
|
@@ -464,17 +510,85 @@ ${renderFailures(run2)}
|
|
|
464
510
|
`
|
|
465
511
|
};
|
|
466
512
|
}
|
|
467
|
-
if (envelope.event === "Stop"
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
513
|
+
if (envelope.event === "Stop") return turnReply(run2, void 0, envelope);
|
|
514
|
+
return { exitCode: 0 };
|
|
515
|
+
}
|
|
516
|
+
function turnReply(run2, turn, envelope) {
|
|
517
|
+
const reasons = [];
|
|
518
|
+
const messages = [];
|
|
519
|
+
if (run2?.status === "fail") {
|
|
520
|
+
if (envelope.stopHookActive) {
|
|
521
|
+
messages.push("manni still reports errors after one repair pass. Run manni check to see them.");
|
|
522
|
+
} else {
|
|
523
|
+
reasons.push(`manni found errors in the files you changed. Fix them, then finish.
|
|
471
524
|
|
|
472
|
-
${renderFailures(run2)}`
|
|
473
|
-
}
|
|
474
|
-
|
|
525
|
+
${renderFailures(run2)}`);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
if (turn?.broken !== void 0) {
|
|
529
|
+
const { rules, report, trace } = turn.broken;
|
|
530
|
+
if (envelope.stopHookActive) {
|
|
531
|
+
messages.push(
|
|
532
|
+
`tracevals still finds broken rules after one repair pass. Run manni tracevals check ${trace} to see them.`
|
|
533
|
+
);
|
|
534
|
+
} else {
|
|
535
|
+
reasons.push(
|
|
536
|
+
`This turn broke ${plural(rules, "rule")} from the files and requests that governed it. Fix the work, or say why the rule does not apply here, then finish.
|
|
537
|
+
|
|
538
|
+
${report}`
|
|
539
|
+
);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
if (turn?.skipMessage !== void 0) messages.push(turn.skipMessage);
|
|
543
|
+
if (reasons.length === 0 && messages.length === 0) return { exitCode: 0 };
|
|
544
|
+
const reply = {
|
|
545
|
+
...reasons.length > 0 ? { decision: "block", reason: reasons.join("\n\n") } : {},
|
|
546
|
+
...messages.length > 0 ? { systemMessage: messages.join(" ") } : {}
|
|
547
|
+
};
|
|
548
|
+
return { exitCode: 0, stdout: `${JSON.stringify(reply)}
|
|
475
549
|
` };
|
|
550
|
+
}
|
|
551
|
+
async function runTurnCheck(envelope, cwd, seams = {}) {
|
|
552
|
+
const subagent = envelope.event === "SubagentStop";
|
|
553
|
+
const judged = subagent ? envelope.agentTranscriptPath : envelope.transcriptPath;
|
|
554
|
+
if (judged === void 0) return void 0;
|
|
555
|
+
const trace = resolve3(cwd, judged);
|
|
556
|
+
const sessionId = envelope.sessionId ?? basename(trace, ".jsonl");
|
|
557
|
+
let result;
|
|
558
|
+
let renderTurn;
|
|
559
|
+
try {
|
|
560
|
+
const [{ checkTurn }, reporters] = await Promise.all([
|
|
561
|
+
import("./check-IWHUPAZM.js"),
|
|
562
|
+
import("./conformance-ALLPNGEQ.js")
|
|
563
|
+
]);
|
|
564
|
+
renderTurn = reporters.renderCheck;
|
|
565
|
+
result = await checkTurn({
|
|
566
|
+
transcriptPath: resolve3(cwd, envelope.transcriptPath ?? judged),
|
|
567
|
+
...subagent ? { agentTranscriptPath: trace } : {},
|
|
568
|
+
...subagent && envelope.agentId !== void 0 ? { agentId: envelope.agentId } : {},
|
|
569
|
+
...subagent && envelope.agentType !== void 0 ? { agentType: envelope.agentType } : {},
|
|
570
|
+
...envelope.lastAssistantMessage !== void 0 ? { lastAssistantMessage: envelope.lastAssistantMessage } : {},
|
|
571
|
+
sessionId,
|
|
572
|
+
cwd,
|
|
573
|
+
inLoop: true,
|
|
574
|
+
...seams
|
|
575
|
+
});
|
|
576
|
+
} catch (err) {
|
|
577
|
+
if (!(err instanceof ToolError)) warn(`the turn check failed unexpectedly: ${errorMessage(err)}`);
|
|
578
|
+
return void 0;
|
|
476
579
|
}
|
|
477
|
-
|
|
580
|
+
const { skipped } = result;
|
|
581
|
+
if (skipped?.message !== void 0) {
|
|
582
|
+
return sayOnce(cwd, sessionId, skipped.gate) ? { skipMessage: skipped.message } : void 0;
|
|
583
|
+
}
|
|
584
|
+
if (result.exitCode !== 1 || result.report === void 0) return void 0;
|
|
585
|
+
return {
|
|
586
|
+
broken: {
|
|
587
|
+
rules: result.report.summary.fail,
|
|
588
|
+
report: renderTurn(result.report, { color: false }),
|
|
589
|
+
trace: judged
|
|
590
|
+
}
|
|
591
|
+
};
|
|
478
592
|
}
|
|
479
593
|
function hookFailure(message, envelope, file) {
|
|
480
594
|
if (envelope.event !== "PostToolUse" || file === void 0) return { exitCode: 0 };
|
|
@@ -490,6 +604,38 @@ function hookFailure(message, envelope, file) {
|
|
|
490
604
|
import { appendFileSync, existsSync, readFileSync } from "node:fs";
|
|
491
605
|
import { extname as extname2, resolve as resolve4 } from "node:path";
|
|
492
606
|
var STATUS_FORMATS = ["pretty", "json"];
|
|
607
|
+
async function tracevalsRow(cwd, opts) {
|
|
608
|
+
try {
|
|
609
|
+
const [
|
|
610
|
+
{ discoverConfig },
|
|
611
|
+
{ assertProviderSelection, resolveSelectionIdentity, selectHookProvider, selectProvider },
|
|
612
|
+
{ hostStatus }
|
|
613
|
+
] = await Promise.all([
|
|
614
|
+
import("./config-O6UBGEDK.js"),
|
|
615
|
+
import("./provider-AMGRDY6V.js"),
|
|
616
|
+
import("./host-6GURH5HE.js")
|
|
617
|
+
]);
|
|
618
|
+
const { config } = await discoverConfig(cwd, opts.configPath === void 0 ? {} : { configPath: opts.configPath });
|
|
619
|
+
const hook = await resolveSelectionIdentity(config, selectHookProvider(config));
|
|
620
|
+
const selection = selectProvider(config);
|
|
621
|
+
assertProviderSelection(selection);
|
|
622
|
+
const extraction = await resolveSelectionIdentity(config, selection);
|
|
623
|
+
const host = await (opts.hostStatus ?? hostStatus)().catch(() => null);
|
|
624
|
+
return {
|
|
625
|
+
name: "tracevals",
|
|
626
|
+
status: "in-play",
|
|
627
|
+
reason: `hook: ${hook.provider} ${hook.model} \xB7 extraction: ${extraction.provider} ${extraction.model}`,
|
|
628
|
+
models: {
|
|
629
|
+
hook: { provider: hook.provider, model: hook.model },
|
|
630
|
+
extraction: { provider: extraction.provider, model: extraction.model }
|
|
631
|
+
},
|
|
632
|
+
...host === null || host.models.length === 0 ? {} : { host: host.models }
|
|
633
|
+
};
|
|
634
|
+
} catch (err) {
|
|
635
|
+
const message = errorMessage(err).split("\n", 1)[0] ?? "";
|
|
636
|
+
return { name: "tracevals", status: "unknown", reason: `manni tracevals check could not run: ${message}` };
|
|
637
|
+
}
|
|
638
|
+
}
|
|
493
639
|
function pages(n, one, many) {
|
|
494
640
|
return n === 1 ? `1 page ${one}` : `${String(n)} pages ${many}`;
|
|
495
641
|
}
|
|
@@ -507,8 +653,8 @@ function ownSchemaCount(cwd, members) {
|
|
|
507
653
|
return n;
|
|
508
654
|
}
|
|
509
655
|
async function citedPages(cwd, configPath) {
|
|
510
|
-
const { prepareRun, readTarget } = await import("./check-
|
|
511
|
-
const { readPage } = await import("./page-
|
|
656
|
+
const { prepareRun, readTarget } = await import("./check-ERVNGKLC.js");
|
|
657
|
+
const { readPage } = await import("./page-WQCMBNRD.js");
|
|
512
658
|
const prepared = await prepareRun({ inputs: [], configPath, cwd, checkSources: false }, "checked", "check");
|
|
513
659
|
let n = 0;
|
|
514
660
|
for (const file of prepared.files) {
|
|
@@ -535,14 +681,14 @@ async function row(domain, family, cwd, members) {
|
|
|
535
681
|
return n > 0 ? inPlay(pages(n, "carries citations", "carry citations")) : notSetUp;
|
|
536
682
|
}
|
|
537
683
|
case "docevals": {
|
|
538
|
-
const { runList: listEvals } = await import("./list-
|
|
684
|
+
const { runList: listEvals } = await import("./list-DP3O3CWB.js");
|
|
539
685
|
const { plans } = await listEvals([], { config: configPath, cwd });
|
|
540
686
|
const n = plans.filter((p) => !p.skip && p.evals.length > 0).length;
|
|
541
687
|
if (n === 0) return notSetUp;
|
|
542
688
|
return inPlay(section ? "docevals: section" : pages(n, "declares evals", "declare evals"));
|
|
543
689
|
}
|
|
544
690
|
case "term": {
|
|
545
|
-
const { runList: listTerms } = await import("./list-
|
|
691
|
+
const { runList: listTerms } = await import("./list-P77RZFZF.js");
|
|
546
692
|
const { terms } = await listTerms({ inputs: [], configPath, cwd, allowEmpty: true });
|
|
547
693
|
return terms.length > 0 ? inPlay(plural(terms.length, "term")) : notSetUp;
|
|
548
694
|
}
|
|
@@ -571,7 +717,11 @@ async function statusUnshared(opts) {
|
|
|
571
717
|
domains.push({ name: domain, status: "unknown", reason: `manni ${COMMANDS[domain]} could not run: ${message}` });
|
|
572
718
|
}
|
|
573
719
|
}
|
|
574
|
-
for (const [name, reason] of NOT_CHECKED)
|
|
720
|
+
for (const [name, reason] of NOT_CHECKED) {
|
|
721
|
+
domains.push(
|
|
722
|
+
name === "tracevals" && family.conformance ? await tracevalsRow(cwd, opts) : { name, status: "not-checked", reason }
|
|
723
|
+
);
|
|
724
|
+
}
|
|
575
725
|
return {
|
|
576
726
|
version: package_default.version,
|
|
577
727
|
config: family.file.source,
|
|
@@ -595,9 +745,14 @@ function renderStatus(report, format) {
|
|
|
595
745
|
`config ${report.config}`,
|
|
596
746
|
...report.collections.map((c) => `collection ${c.name} (${plural(c.files, "file")})`)
|
|
597
747
|
].join(" ");
|
|
598
|
-
const
|
|
599
|
-
|
|
600
|
-
)
|
|
748
|
+
const label = (d) => d.models !== void 0 ? "judges each turn" : STATE_LABEL[d.status];
|
|
749
|
+
const width = Math.max(14, ...report.domains.map((d) => label(d).length + 3));
|
|
750
|
+
const rows = report.domains.flatMap((d) => [
|
|
751
|
+
`${d.name.padEnd(11)}${label(d).padEnd(width)}${d.reason}`,
|
|
752
|
+
...(d.host ?? []).map(
|
|
753
|
+
(m) => `${"".padEnd(11)}${"model host".padEnd(width)}${m.model} loaded, ${plural(m.sessions, "session")}, idle ${String(Math.floor(m.idleMs / 6e4))}m`
|
|
754
|
+
)
|
|
755
|
+
]);
|
|
601
756
|
return [head, "", ...rows].join("\n");
|
|
602
757
|
}
|
|
603
758
|
var FIX_SKILL = "manni:fix";
|
|
@@ -644,24 +799,35 @@ function hookScope(envelope, cwd) {
|
|
|
644
799
|
const file = labelFrom(cwd, resolve5(cwd, envelope.filePath));
|
|
645
800
|
return { scope: { kind: "paths", paths: [file] }, file };
|
|
646
801
|
}
|
|
802
|
+
var TURN_EVENTS = ["Stop", "SubagentStop"];
|
|
647
803
|
async function checkUnderHook(paths, options, envelope) {
|
|
648
804
|
const cwd = resolve5(envelope.cwd ?? process.cwd());
|
|
649
805
|
const asked = paths.length > 0 ? { scope: { kind: "paths", paths }, file: paths.join(", ") } : hookScope(envelope, cwd);
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
806
|
+
const turnEvent = TURN_EVENTS.includes(envelope.event);
|
|
807
|
+
if (asked === void 0 && !turnEvent) return;
|
|
808
|
+
let run2;
|
|
809
|
+
if (asked !== void 0) {
|
|
810
|
+
try {
|
|
811
|
+
run2 = await runFamilyCheck({
|
|
812
|
+
cwd,
|
|
813
|
+
scope: asked.scope,
|
|
814
|
+
allowMissing: true,
|
|
815
|
+
...options.config === void 0 ? {} : { configPath: options.config },
|
|
816
|
+
// stdout and stderr are the hook's channels; a notice is not for the agent.
|
|
817
|
+
onNotice: () => void 0
|
|
818
|
+
});
|
|
819
|
+
} catch (err) {
|
|
820
|
+
if (!(err instanceof FamilyError && err.quiet) && !turnEvent) {
|
|
821
|
+
send(hookFailure(errorMessage(err), envelope, asked.file));
|
|
822
|
+
return;
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
if (!turnEvent) {
|
|
827
|
+
if (run2 !== void 0) send(hookReply(run2, envelope));
|
|
828
|
+
return;
|
|
664
829
|
}
|
|
830
|
+
send(turnReply(run2, await runTurnCheck(envelope, cwd), envelope));
|
|
665
831
|
}
|
|
666
832
|
function buildCheck() {
|
|
667
833
|
return new Command("check").description("Run every check this repository has set up, and nothing else").argument("[paths...]", "files, directories, or globs; the per-file checks run on the collection members among them").option("-c, --config <path>", "path to a manni config file").addOption(
|
|
@@ -734,6 +900,7 @@ ${agentLines(report)}` : "";
|
|
|
734
900
|
}
|
|
735
901
|
export {
|
|
736
902
|
buildCheck,
|
|
737
|
-
buildStatus
|
|
903
|
+
buildStatus,
|
|
904
|
+
hookScope
|
|
738
905
|
};
|
|
739
|
-
//# sourceMappingURL=cli-
|
|
906
|
+
//# sourceMappingURL=cli-HXWYUKGJ.js.map
|