@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tracevals/rules/turn.ts","../src/tracevals/rules/sources.ts"],"sourcesContent":["/**\n * The turn a Stop or SubagentStop judges (proposal 0079). A turn starts at the\n * last prompt the user typed; tool results and hook feedback do not start one.\n * Under SubagentStop the turn is the subagent's whole run.\n *\n * Which user records are typed prompts is read from the record shape Claude\n * Code writes, not guessed from wording alone:\n *\n * - `isMeta: true` marks harness injections: a skill's \"Base directory\" body,\n * `<local-command-caveat>`, peer and scheduled messages, hook feedback.\n * - `isCompactSummary: true` is the \"session is being continued\" summary.\n * - `origin.kind` is `human` for a typed prompt and `task-notification` or\n * `peer` otherwise. Older records carry only `turnOrigin`, whose non-typed\n * values are `task_notification`, `scheduled` and `peer`.\n * - A record whose text is nothing but `<system-reminder>`,\n * `<task-notification>`, `<ci-monitor-event>` or `<local-command-*>` blocks\n * is an injection. A typed prompt Claude Code prefixed with a reminder keeps\n * the text after it, so it still counts.\n * - `Stop hook feedback:` and `[Request interrupted by user…]` are markers,\n * never prompts.\n *\n * A `<command-name>` record is a slash command someone typed, so it counts.\n */\nimport {\n emptyWindow,\n materialize,\n type TraceWindow,\n} from \"../graders/util.js\";\nimport type { Trace, TraceEvent } from \"../trace/types.js\";\n\nexport interface TurnSlice {\n window: TraceWindow;\n /** Ordinal in `trace.events` of the turn's first event. */\n from: number;\n /** Ordinal of its last event, inclusive. Less than `from` when there is no turn. */\n to: number;\n /** Typed prompts in the whole session, which `turn-count-above` reads. */\n sessionTurnCount: number;\n}\n\nconst INJECTED =\n /<(system-reminder|task-notification|ci-monitor-event|local-command-stdout|local-command-stderr|local-command-caveat)>[\\s\\S]*?<\\/\\1>/g;\nconst MARKER =\n /^(?:Stop hook feedback:|SubagentStop hook feedback:|\\[Request interrupted by user)/;\n/**\n * Origins of a prompt a person sent: typed in the CLI, or sent through the SDK.\n * Both record formats name it, as `origin.kind` or the older `turnOrigin`,\n * and both are read against this one set.\n */\nconst TYPED_TURN_ORIGINS = new Set([\"human\", \"sdk\"]);\nconst WORK = new Set<TraceEvent[\"kind\"]>([\"assistant\", \"tool_call\", \"tool_result\"]);\n\nexport function isTypedPrompt(event: TraceEvent): boolean {\n if (event.kind !== \"user\" || event.text === undefined) return false;\n const { raw } = event;\n if (raw.isMeta === true || raw.isCompactSummary === true) return false;\n const origin = raw.origin;\n if (\n typeof origin === \"object\" &&\n origin !== null &&\n \"kind\" in origin &&\n typeof origin.kind === \"string\"\n ) {\n if (!TYPED_TURN_ORIGINS.has(origin.kind)) return false;\n } else if (\n typeof raw.turnOrigin === \"string\" &&\n !TYPED_TURN_ORIGINS.has(raw.turnOrigin)\n ) {\n return false;\n }\n const rest = event.text.replace(INJECTED, \"\").trim();\n return rest !== \"\" && !MARKER.test(rest);\n}\n\n/** The last turn of a session: its last typed prompt to the end of the trace. */\nexport function lastTurn(trace: Trace): TurnSlice {\n const prompts = trace.events.filter((e) => e.sidechain !== true && isTypedPrompt(e));\n const sessionTurnCount = prompts.length;\n const to = trace.events.length - 1;\n const last = prompts.at(-1);\n if (last === undefined) {\n return {\n window: emptyWindow(\"turn\", \"last turn\", \"the trace holds no prompt the user typed\"),\n from: to + 1,\n to,\n sessionTurnCount,\n };\n }\n return slice(trace, last.index, [last], new Set([undefined]), sessionTurnCount, {\n label: \"last turn\",\n reason: \"nothing happened after the last prompt the user typed\",\n });\n}\n\n/**\n * A subagent's sidecar transcript parsed alone. Every record is a sidechain,\n * so the parser keeps no prompts; the turn is the whole run, and its prompts\n * are the task the subagent was given.\n */\nexport function subagentTurn(trace: Trace): TurnSlice {\n const prompts = trace.events.filter(isTypedPrompt);\n return slice(\n trace,\n 0,\n prompts,\n new Set(trace.events.map((e) => e.branchId)),\n prompts.length,\n { label: \"subagent run\", reason: \"the subagent recorded no work\" },\n );\n}\n\nfunction slice(\n trace: Trace,\n from: number,\n prompts: TraceEvent[],\n own: Set<string | undefined>,\n sessionTurnCount: number,\n words: { label: string; reason: string },\n): TurnSlice {\n const to = trace.events.length - 1;\n const worked = trace.events.some((e) => e.index > from && WORK.has(e.kind));\n if (!worked) {\n return {\n window: emptyWindow(\"turn\", words.label, words.reason),\n from,\n to,\n sessionTurnCount,\n };\n }\n const window = materialize(\n trace,\n \"turn\",\n words.label,\n [{ start: from, end: Number.POSITIVE_INFINITY }],\n undefined,\n own,\n );\n // Only typed prompts are prompts here, and `turnCount` is the session's,\n // because the one condition that reads it counts session turns.\n window.userMessages = prompts.map((p) => p.text ?? \"\");\n window.turnCount = sessionTurnCount;\n return { window, from, to, sessionTurnCount };\n}\n","/**\n * Which files govern the agent in a turn (proposal 0079, \"Rule sources and\n * their triggers\"). Resolution is deterministic, from the filesystem and the\n * trace; no model decides which files count.\n *\n * The list of formats is closed. Reading a file never makes it a source: a\n * README or a product docs page describes other systems, so only the known\n * formats, files named by `include`, and what a skill or an `@path` import\n * pulls in are ever returned. `exclude` removes a file from every row.\n *\n * To touch a file is to Read, Write or Edit it, anywhere in the session up to\n * the turn's end, which is Claude Code's own trigger for path-scoped rules.\n *\n * Six more formats say what the session was asked (proposal 0080): the typed\n * prompts, the approved plan, a touched Spec Kit feature, Kiro spec or live\n * OpenSpec change, and a touched file `conformance.plans` names. None is known\n * at session start, so only a turn resolves them, and none declares evals.\n *\n * Two are read from the transcript itself (proposal 0081): the system prompt\n * of the last prompt snapshot, and a user output style. Claude Code's own\n * prompt is reported and never blocks; a prompt the user wrote blocks.\n */\nimport { createHash } from \"node:crypto\";\nimport { homedir } from \"node:os\";\nimport { basename, dirname, isAbsolute, join, relative, resolve, sep } from \"node:path\";\nimport picomatch from \"picomatch\";\nimport { extractFrontmatter } from \"../../meta/extractors/frontmatter.js\";\nimport type { ExtractedMetadata } from \"../../meta/types.js\";\nimport { resolveArtifacts } from \"../artifacts/resolve.js\";\nimport { findGitRoot, listInTree, safeRead } from \"../artifacts/fs.js\";\nimport { extractEvals } from \"../evals/extract.js\";\nimport { windowOf } from \"../graders/util.js\";\nimport { makeRedactor } from \"../judge/redact.js\";\nimport { configDir } from \"../trace/discover.js\";\nimport type { Trace } from \"../trace/types.js\";\nimport { isTypedPrompt } from \"./turn.js\";\n\nexport type RuleFormat =\n | \"claude-md\"\n | \"claude-rule\"\n | \"agents-md\"\n | \"gemini-md\"\n | \"cursor-rule\"\n | \"kiro-steering\"\n | \"speckit-constitution\"\n | \"openspec-project\"\n | \"import\"\n | \"skill\"\n | \"slash-command\"\n | \"agent\"\n | \"designated\"\n | \"prompt\"\n | \"plan\"\n | \"speckit-spec\"\n | \"kiro-spec\"\n | \"openspec-change\"\n | \"plans\"\n | \"system-prompt\"\n | \"output-style\";\n\n/** An `ai` eval a source declares; its assertion is the rule (proposal 0079). */\nexport interface DeclaredRule {\n id: string;\n text: string;\n when?: Record<string, unknown>;\n}\n\nexport interface RuleSource {\n /** Absolute path on disk, or `\"\"` for the typed prompts, an inline plan and the system prompt. */\n path: string;\n /** Relative to the project root with forward slashes, or `~/…` under home. */\n displayPath: string;\n format: RuleFormat;\n /** Why the file is in scope, in words: `always`, `read`, `touched src/a.ts`. */\n trigger: string;\n content: string;\n /** sha256 of `content`, hex. */\n sha256: string;\n /** The skill a `skill` source belongs to. */\n skill?: string;\n /** Present when the file declares `ai` evals; they replace extraction. */\n declaredRules?: DeclaredRule[];\n /** False for Claude Code's default system prompt, whose rules are reported and never block. */\n blocks: boolean;\n}\n\nexport interface SourceOptions {\n /** The session's working directory, where the ancestor walk starts. */\n projectDir: string;\n /** Ceiling for the ancestor walk and base of `displayPath`; default the git root. */\n projectRoot?: string;\n /** `CLAUDE_CONFIG_DIR` finds `~/.claude`; `HOME` / `USERPROFILE` find `~/.gemini` and `~/.kiro`. */\n env?: Record<string, string | undefined>;\n /** `conformance.include`: globs, relative to the project root, in scope once read. */\n include?: string[];\n /** `conformance.exclude`: globs never treated as sources, in any row, and source names. */\n exclude?: string[];\n /** `judge.redact`: patterns scrubbed from what the transcript records of the system prompt. */\n redact?: string[];\n /** `conformance.plans`: globs, relative to the project root, in scope once touched. */\n plans?: string[];\n /** Set under SubagentStop: the subagent type whose definition governs the run. */\n agentType?: string;\n}\n\nexport interface ResolvedSources {\n sources: RuleSource[];\n warnings: string[];\n}\n\n/** The turn's ordinal bounds in `trace.events`, inclusive. `lastTurn` returns them. */\nexport interface TurnBounds {\n from: number;\n to: number;\n}\n\n/** Imports followed from a `claude-md` or `gemini-md` file, as Claude Code does. */\nconst MAX_IMPORT_HOPS = 4;\n\ntype Trigger =\n | { kind: \"always\" }\n | { kind: \"read\" }\n | { kind: \"globs\"; key: string; patterns: string[] };\n\ninterface Candidate {\n path: string;\n format: RuleFormat;\n trigger: Trigger;\n}\n\ninterface Touch {\n abs: string;\n rel: string | null;\n read: boolean;\n}\n\nclass Collector {\n readonly sources: RuleSource[] = [];\n readonly warnings: string[] = [];\n private readonly seen = new Set<string>();\n private readonly parsed = new Map<string, ExtractedMetadata | null>();\n private readonly excluded: (path: string) => boolean;\n /** Whether `exclude` lists, as it is, the name of a source with no file, such as `prompt`. */\n readonly excludedName: (name: string) => boolean;\n\n constructor(\n readonly cwd: string,\n readonly root: string,\n readonly home: string,\n exclude: string[],\n ) {\n const match = exclude.length > 0 ? picomatch(exclude, { dot: true }) : null;\n this.excluded = (path) => match !== null && match(this.display(path));\n // The whole name, never a glob: `**` names files, and keeps the prompt.\n this.excludedName = (name) => exclude.includes(name);\n }\n\n display(path: string): string {\n const inRoot = relPosix(this.root, path);\n if (inRoot !== null) return inRoot;\n const inHome = relPosix(this.home, path);\n if (inHome !== null) return `~/${inHome}`;\n return path.split(sep).join(\"/\");\n }\n\n has(path: string): boolean {\n return this.seen.has(key(path));\n }\n\n /** The file's front matter, or null when it has none or it does not parse. */\n front(path: string, content: string): ExtractedMetadata | null {\n const k = key(path);\n if (this.parsed.has(k)) return this.parsed.get(k) ?? null;\n let parsed: ExtractedMetadata | null = null;\n try {\n const fm = extractFrontmatter(content, \"markdown\");\n parsed = fm.present ? fm : null;\n } catch (err) {\n const loose = isCursorRule(path) ? cursorFront(content) : null;\n if (loose !== null) {\n this.parsed.set(k, loose);\n return loose;\n }\n const first = (err instanceof Error ? err.message : String(err)).split(\"\\n\")[0] ?? \"\";\n this.warnings.push(\n `${this.display(path)}: front matter does not parse (${first}), so it is read as having none`,\n );\n }\n this.parsed.set(k, parsed);\n return parsed;\n }\n\n /** Adds a source once. Returns it, or null when excluded or already listed. */\n add(\n path: string,\n content: string,\n format: RuleFormat,\n trigger: string,\n skill?: string,\n ): RuleSource | null {\n if (this.has(path) || this.excluded(path)) return null;\n this.seen.add(key(path));\n const source: RuleSource = {\n path,\n displayPath: this.display(path),\n format,\n trigger,\n content,\n sha256: createHash(\"sha256\").update(content).digest(\"hex\"),\n blocks: true,\n };\n if (skill !== undefined) source.skill = skill;\n const declared = this.declared(path, content);\n if (declared !== undefined) source.declaredRules = declared;\n this.sources.push(source);\n return source;\n }\n\n /**\n * Adds a source that says what the session was asked, or one the transcript\n * recorded. These never declare evals. With no file, its display path is its\n * format, and `exclude` matches that name.\n */\n addRequest(\n file: string | null,\n content: string,\n format: RuleFormat,\n trigger: string,\n blocks = true,\n ): void {\n // A named source goes by its name whether or not a file holds it, so\n // `exclude: [plan]` drops a plan file as it drops an inline plan.\n if (EXCLUDABLE_BY_NAME.has(format) && this.excludedName(format)) return;\n if (file !== null) {\n if (this.has(file) || this.excluded(file)) return;\n this.seen.add(key(file));\n }\n this.sources.push({\n path: file ?? \"\",\n displayPath: file === null ? format : this.display(file),\n format,\n trigger,\n content,\n sha256: createHash(\"sha256\").update(content).digest(\"hex\"),\n blocks,\n });\n }\n\n private declared(path: string, content: string): DeclaredRule[] | undefined {\n const fm = this.front(path, content);\n if (fm === null) return undefined;\n const extracted = extractEvals(\n { name: basename(path), type: \"project-rules\", path, content, origin: \"project\" },\n fm,\n );\n if (extracted.errors.length > 0) {\n this.warnings.push(\n `${this.display(path)}: metadata.evals does not validate (${extracted.errors[0]?.message ?? \"invalid\"}), so it declares no rules`,\n );\n return undefined;\n }\n const rules: DeclaredRule[] = [];\n for (const entry of extracted.evals) {\n if (entry.grader !== \"ai\" || entry.assertion === undefined) continue;\n const rule: DeclaredRule = { id: entry.id, text: entry.assertion };\n const when = entry.options?.when;\n if (isRecord(when)) rule.when = when;\n rules.push(rule);\n }\n return rules.length > 0 ? rules : undefined;\n }\n}\n\n/** Every source whose trigger is \"always\", without a trace (for `prepare`). */\nexport async function resolveAlwaysSources(opts: SourceOptions): Promise<ResolvedSources> {\n const c = await collector(opts);\n for (const candidate of await catalog(c, opts)) {\n if (candidate.trigger.kind === \"always\") await addWithImports(c, candidate, \"always\");\n }\n await addDesignated(c, opts);\n return { sources: c.sources, warnings: c.warnings };\n}\n\n/** Every source in scope for one turn of `trace`. */\nexport async function resolveTurnSources(\n trace: Trace,\n turn: TurnBounds,\n opts: SourceOptions,\n): Promise<ResolvedSources> {\n const c = await collector(opts);\n const touches: Touch[] = trace.fileAccesses\n .filter((a) => a.index <= turn.to)\n .map((a) => {\n const abs = resolve(c.cwd, a.path);\n return { abs, rel: relPosix(c.root, abs), read: a.op === \"read\" };\n });\n const wasRead = new Set(touches.filter((t) => t.read).map((t) => key(t.abs)));\n\n for (const candidate of await catalog(c, opts)) {\n const { trigger } = candidate;\n if (trigger.kind === \"always\") {\n await addWithImports(c, candidate, \"always\");\n } else if (trigger.kind === \"read\") {\n if (wasRead.has(key(candidate.path))) await addWithImports(c, candidate, \"read\");\n } else {\n const match = picomatch(trigger.patterns, { dot: true });\n const hit = touches.find((t) => t.rel !== null && match(t.rel));\n if (hit !== undefined && hit.rel !== null) {\n await addWithImports(c, candidate, `${trigger.key} matched ${hit.rel}`);\n }\n }\n }\n\n // A subdirectory's memory file applies once a file under it is touched.\n // Farther directories come first, so the nearest file reads last.\n const nested = new Map<string, string>();\n for (const touch of touches) {\n if (touch.rel === null) continue;\n for (const dir of dirsBelowCwd(c, dirname(touch.abs))) {\n if (!nested.has(dir)) nested.set(dir, touch.rel);\n }\n }\n const dirs = [...nested.keys()].sort((a, b) => a.length - b.length);\n for (const dir of dirs) {\n const touched = nested.get(dir) ?? \"\";\n for (const [name, format] of NESTED_FILES) {\n const path = join(dir, name);\n const content = await safeRead(path);\n if (content !== null) {\n await addWithImports(c, { path, format, trigger: { kind: \"always\" } }, `touched ${touched}`, content);\n }\n }\n }\n\n await addWindowed(c, trace, turn, touches, opts);\n\n await addDesignated(c, opts);\n\n addPrompts(c, trace, turn);\n await addPlan(c, trace, turn, opts);\n await addSpecs(c, touches, opts.plans ?? []);\n await addSystemPrompt(c, trace, turn, opts);\n return { sources: c.sources, warnings: c.warnings };\n}\n\n// ── What the transcript recorded of the prompt ───────────────────\n\n/** The sources `conformance.exclude` matches by name (proposals 0080 and 0081). */\nconst EXCLUDABLE_BY_NAME: ReadonlySet<RuleFormat> = new Set<RuleFormat>([\"prompt\", \"plan\", \"system-prompt\"]);\n\n/** Claude Code's own block in its default prompt; a replaced prompt has none. */\nconst BOUNDARY_MARKER = \"__SYSTEM_PROMPT_DYNAMIC_BOUNDARY__\";\n\ninterface Recorded {\n index: number;\n record: Record<string, unknown>;\n attachment: Record<string, unknown>;\n}\n\n/** The last attachment of `type` at or before the turn's end, with its record. */\nfunction lastAttachment(trace: Trace, turn: TurnBounds, type: string): Recorded | undefined {\n for (let i = trace.events.length - 1; i >= 0; i -= 1) {\n const event = trace.events[i];\n if (event === undefined || event.kind !== \"meta\" || event.index > turn.to) continue;\n const attachment = event.raw.attachment;\n if (event.raw.type === \"attachment\" && isRecord(attachment) && attachment.type === type) {\n return { index: event.index, record: event.raw, attachment };\n }\n }\n return undefined;\n}\n\n/**\n * The system prompt of the last `prompt_snapshot`, and the last output style.\n * A style a user file defines is its own source, holding the text the agent\n * saw; a built-in style's text joins the system prompt. The prompt is custom,\n * and blocks, when Claude Code's boundary marker is missing.\n */\nasync function addSystemPrompt(c: Collector, trace: Trace, turn: TurnBounds, opts: SourceOptions): Promise<void> {\n const scrub = makeRedactor(opts.redact ?? []);\n const style = lastAttachment(trace, turn, \"output_style_instructions\")?.attachment.style;\n const styleName = isRecord(style) && typeof style.name === \"string\" ? style.name : undefined;\n const stylePrompt = isRecord(style) && typeof style.prompt === \"string\" ? style.prompt : undefined;\n let builtIn: string | undefined;\n if (styleName !== undefined && stylePrompt !== undefined) {\n const file = await userStyleFile(c, opts, styleName);\n if (file === undefined) builtIn = stylePrompt;\n else c.addRequest(file, scrub(stylePrompt), \"output-style\", `style ${styleName}`);\n }\n\n const snapshot = lastAttachment(trace, turn, \"prompt_snapshot\");\n const recorded: unknown = snapshot?.attachment.systemPrompt;\n if (snapshot === undefined || !Array.isArray(recorded)) return;\n const blocks = recorded.filter((b): b is string => typeof b === \"string\");\n const custom = !blocks.includes(BOUNDARY_MARKER);\n const content = scrub([...blocks, ...(builtIn !== undefined ? [builtIn] : [])].join(\"\\n\\n\"));\n const { version } = snapshot.record;\n const by = typeof version === \"string\" ? `, Claude Code ${version}` : \"\";\n const trigger = `recorded at turn ${String(snapshot.index)}${by}${custom ? \", custom\" : \"\"}`;\n // A prompt the user replaced blocks; Claude Code's own default only reports.\n c.addRequest(null, content, \"system-prompt\", trigger, /* blocks= */ custom);\n}\n\n/**\n * The user file that defines output style `name`: under the project's\n * `.claude/output-styles/`, then the user's. Its front matter `name`, or\n * its base name, matches.\n */\nasync function userStyleFile(c: Collector, opts: SourceOptions, name: string): Promise<string | undefined> {\n // Where Claude Code reads styles: the project (cwd first, then the git root)\n // and the user. No ancestor walk, since Claude Code does none for styles.\n const dirs = [...new Set([c.cwd, c.root])].map((b) => join(b, \".claude\", \"output-styles\"));\n dirs.push(join(configDir(opts.env), \"output-styles\"));\n for (const dir of dirs) {\n for (const path of await listInTree(dir, (p) => p.endsWith(\".md\"), { maxDepth: 0 })) {\n const declared = (await frontOf(c, path))?.name;\n if ((typeof declared === \"string\" ? declared : basename(path, \".md\")) === name) return path;\n }\n }\n return undefined;\n}\n\n// ── What the session was asked ───────────────────────────────────\n\n/**\n * Every prompt typed up to the turn's end, as one numbered sequence. A\n * subagent's own run has only sidechain prompts, and its task is its request.\n */\nfunction addPrompts(c: Collector, trace: Trace, turn: TurnBounds): void {\n const typed = trace.events.filter((e) => e.index <= turn.to && isTypedPrompt(e));\n const main = typed.filter((e) => e.sidechain !== true);\n const prompts = main.length > 0 ? main : typed;\n if (prompts.length === 0) return;\n const content = prompts\n .map((p, i) => `${String(i + 1)}. ${(p.text ?? \"\").trim()}`)\n .join(\"\\n\\n\");\n c.addRequest(null, content, \"prompt\", `typed prompts 1-${String(prompts.length)}`);\n}\n\n/**\n * The plan of the last approved `ExitPlanMode` at or before the turn's end.\n * A call is approved when its result is not an error. The plan is the call's\n * `plan` input, or else the file the session last wrote under the user's\n * `plans/` directory before the call.\n */\nasync function addPlan(c: Collector, trace: Trace, turn: TurnBounds, opts: SourceOptions): Promise<void> {\n const approved = trace.toolCalls\n .filter((call) => call.name === \"ExitPlanMode\" && call.index <= turn.to)\n .filter((call) => isApproved(trace, call.index, turn.to))\n .at(-1);\n if (approved === undefined) return;\n const trigger = `approved at turn ${String(approved.index)}`;\n const plan = approved.input.plan;\n if (typeof plan === \"string\" && plan.trim() !== \"\") {\n c.addRequest(null, plan, \"plan\", trigger);\n return;\n }\n const plansDir = join(configDir(opts.env), \"plans\");\n const file = trace.fileAccesses\n .filter((a) => a.op !== \"read\" && a.index < approved.index)\n .map((a) => resolve(c.cwd, a.path))\n .filter((abs) => relPosix(plansDir, abs) !== null)\n .at(-1);\n if (file === undefined) return;\n const content = await safeRead(file);\n if (content !== null) c.addRequest(file, content, \"plan\", trigger);\n}\n\n/**\n * Whether the tool call at `index` has a result by `to` that is not an error.\n * A plan approved only after the turn ends is not yet a source; the next turn,\n * whose bounds include the result, picks it up.\n */\nfunction isApproved(trace: Trace, index: number, to: number): boolean {\n const id = trace.events.find((e) => e.index === index)?.raw.id;\n if (typeof id !== \"string\") return false;\n for (const event of trace.events) {\n if (event.kind !== \"tool_result\" || event.index <= index || event.index > to) continue;\n const message = event.raw.message;\n const blocks: unknown = isRecord(message) ? message.content : undefined;\n if (!Array.isArray(blocks)) continue;\n for (const block of blocks as unknown[]) {\n if (isRecord(block) && block.type === \"tool_result\" && block.tool_use_id === id) {\n return block.is_error !== true;\n }\n }\n }\n return false;\n}\n\n/** The files each spec format reads from a touched directory. */\nconst SPEC_FILES: Record<\"speckit-spec\" | \"kiro-spec\", string[]> = {\n \"speckit-spec\": [\"spec.md\", \"plan.md\", \"tasks.md\"],\n \"kiro-spec\": [\"requirements.md\", \"design.md\", \"tasks.md\"],\n};\n\n/** The spec directory a project-relative path lies under, and its format. */\nfunction specDirOf(rel: string): { dir: string; format: \"speckit-spec\" | \"kiro-spec\" | \"openspec-change\" } | null {\n const parts = rel.split(\"/\");\n const [first, second, third] = parts;\n if (first === \"specs\" && second !== undefined && parts.length > 2) {\n return { dir: `specs/${second}`, format: \"speckit-spec\" };\n }\n if (first === \".kiro\" && second === \"specs\" && third !== undefined && parts.length > 3) {\n return { dir: `.kiro/specs/${third}`, format: \"kiro-spec\" };\n }\n // An archived change is done, so it never counts.\n if (first === \"openspec\" && second === \"changes\" && third !== undefined && third !== \"archive\" && parts.length > 3) {\n return { dir: `openspec/changes/${third}`, format: \"openspec-change\" };\n }\n return null;\n}\n\n/** A touched spec brings in its directory's files; a touched `plans` file brings in itself. */\nasync function addSpecs(c: Collector, touches: Touch[], plans: string[]): Promise<void> {\n const isPlan = plans.length > 0 ? picomatch(plans, { dot: true }) : null;\n const done = new Set<string>();\n for (const touch of touches) {\n const { rel } = touch;\n if (rel === null) continue;\n const trigger = `touched ${rel}`;\n const spec = specDirOf(rel);\n if (spec !== null && !done.has(spec.dir)) {\n done.add(spec.dir);\n const dir = join(c.root, ...spec.dir.split(\"/\"));\n const files =\n spec.format === \"openspec-change\"\n ? await listInTree(dir, (p) => p.endsWith(\".md\"))\n : SPEC_FILES[spec.format].map((name) => join(dir, name));\n for (const file of files) {\n const content = await safeRead(file);\n if (content !== null) c.addRequest(file, content, spec.format, trigger);\n }\n }\n if (isPlan?.(rel) === true) {\n const content = await safeRead(touch.abs);\n if (content !== null) c.addRequest(touch.abs, content, \"plans\", trigger);\n }\n }\n}\n\n/**\n * Files named in `conformance.include`. A person chose each one to govern the\n * agent, so it applies to every turn, as a `CLAUDE.md` does. Waiting for the\n * agent to read one would let a turn that skipped it escape its rules.\n */\nasync function addDesignated(c: Collector, opts: SourceOptions): Promise<void> {\n const include = opts.include ?? [];\n if (include.length === 0) return;\n const match = picomatch(include, { dot: true });\n const found = await listInTree(c.root, (abs) => {\n const rel = relPosix(c.root, abs);\n return rel !== null && match(rel);\n });\n for (const abs of found) {\n if (c.has(abs)) continue;\n const content = await safeRead(abs);\n if (content === null) {\n c.warnings.push(`${c.display(abs)}: matched conformance.include but could not be read`);\n continue;\n }\n c.add(abs, content, \"designated\", \"always\");\n }\n}\n\n// ── Skills, slash commands and the agent ─────────────────────────\n\nasync function addWindowed(\n c: Collector,\n trace: Trace,\n turn: TurnBounds,\n touches: Touch[],\n opts: SourceOptions,\n): Promise<void> {\n // The existing resolver settles which file a skill, command or agent names.\n // Agents spawned in a main session govern their own runs, not this turn, so\n // only the agent this run is (under SubagentStop) is asked for.\n const { artifacts } = await resolveArtifacts(\n {\n ...trace,\n agentSpawns:\n opts.agentType === undefined ? [] : [{ subagentType: opts.agentType, index: 0 }],\n },\n { projectDir: c.cwd, projectRoot: c.root, ...(opts.env ? { env: opts.env } : {}) },\n );\n for (const artifact of artifacts) {\n if (artifact.type === \"agent\") {\n c.add(artifact.path, artifact.content, \"agent\", \"subagent run\");\n continue;\n }\n if (artifact.type !== \"skill\" && artifact.type !== \"slash-command\") continue;\n // In scope from the first invocation to the end of the session (proposal\n // 0080): a skill's procedure spans the turns after it, and the skills it\n // calls partway through do not end it. Batch `run` keeps ADR 01015's window.\n const window = windowOf(trace, artifact);\n if (!window.events.some((e) => e.index <= turn.to)) continue;\n if (artifact.type === \"slash-command\") {\n c.add(artifact.path, artifact.content, \"slash-command\", \"slash command window\");\n continue;\n }\n c.add(artifact.path, artifact.content, \"skill\", \"skill window\", artifact.name);\n const skillDir = dirname(artifact.path);\n for (const touch of touches) {\n if (!touch.read || relPosix(skillDir, touch.abs) === null || c.has(touch.abs)) continue;\n const content = await safeRead(touch.abs);\n if (content !== null) {\n c.add(touch.abs, content, \"skill\", `read under skill ${artifact.name}`, artifact.name);\n }\n }\n }\n}\n\n// ── The catalog of known formats ─────────────────────────────────\n\n/** Memory files read at cwd, each ancestor up to the root, and in their `.claude/`. */\nconst ANCESTOR_FILES: [string, RuleFormat][] = [\n [\"CLAUDE.md\", \"claude-md\"],\n [\"CLAUDE.local.md\", \"claude-md\"],\n [join(\".claude\", \"CLAUDE.md\"), \"claude-md\"],\n [\"AGENTS.md\", \"agents-md\"],\n [join(\".claude\", \"AGENTS.md\"), \"agents-md\"],\n [\"GEMINI.md\", \"gemini-md\"],\n];\n\n/** Memory files a touch under a subdirectory brings in. */\nconst NESTED_FILES: [string, RuleFormat][] = [\n [\"CLAUDE.md\", \"claude-md\"],\n [\"AGENTS.md\", \"agents-md\"],\n [\"GEMINI.md\", \"gemini-md\"],\n];\n\nasync function catalog(c: Collector, opts: SourceOptions): Promise<Candidate[]> {\n const out: Candidate[] = [];\n const userClaude = configDir(opts.env);\n const always: Trigger = { kind: \"always\" };\n\n out.push({ path: join(userClaude, \"CLAUDE.md\"), format: \"claude-md\", trigger: always });\n out.push({ path: join(c.home, \".gemini\", \"GEMINI.md\"), format: \"gemini-md\", trigger: always });\n for (const dir of ancestors(c.cwd, c.root).reverse()) {\n for (const [name, format] of ANCESTOR_FILES) {\n out.push({ path: join(dir, name), format, trigger: always });\n }\n }\n\n // Project-level directories live at the root; a cwd below it is checked too.\n const bases = c.cwd === c.root ? [c.root] : [c.root, c.cwd];\n\n for (const dir of [join(userClaude, \"rules\"), ...bases.map((b) => join(b, \".claude\", \"rules\"))]) {\n for (const path of await listInTree(dir, (p) => p.endsWith(\".md\"))) {\n out.push({ path, format: \"claude-rule\", trigger: await claudeRuleTrigger(c, path) });\n }\n }\n\n for (const base of bases) {\n const dir = join(base, \".cursor\", \"rules\");\n for (const path of await listInTree(dir, (p) => p.endsWith(\".mdc\") || p.endsWith(\".md\"))) {\n const trigger = await cursorTrigger(c, path);\n if (trigger !== null) out.push({ path, format: \"cursor-rule\", trigger });\n }\n }\n\n for (const dir of [join(c.home, \".kiro\", \"steering\"), ...bases.map((b) => join(b, \".kiro\", \"steering\"))]) {\n for (const path of await listInTree(dir, (p) => p.endsWith(\".md\"), { maxDepth: 0 })) {\n out.push({ path, format: \"kiro-steering\", trigger: await kiroTrigger(c, path) });\n }\n }\n\n for (const base of bases) {\n out.push({\n path: join(base, \".specify\", \"memory\", \"constitution.md\"),\n format: \"speckit-constitution\",\n trigger: always,\n });\n out.push({ path: join(base, \"openspec\", \"project.md\"), format: \"openspec-project\", trigger: { kind: \"read\" } });\n }\n return out;\n}\n\nasync function frontOf(c: Collector, path: string): Promise<Record<string, unknown> | null> {\n const content = await safeRead(path);\n if (content === null) return null;\n return c.front(path, content)?.data ?? null;\n}\n\nasync function claudeRuleTrigger(c: Collector, path: string): Promise<Trigger> {\n const patterns = globList((await frontOf(c, path))?.paths);\n return patterns.length > 0 ? { kind: \"globs\", key: \"paths\", patterns } : { kind: \"always\" };\n}\n\n/** Null for a `.md` file with no front matter, which Cursor does not read as a rule. */\nasync function cursorTrigger(c: Collector, path: string): Promise<Trigger | null> {\n const fm = await frontOf(c, path);\n if (fm === null && !path.endsWith(\".mdc\")) return null;\n if (fm?.alwaysApply === true) return { kind: \"always\" };\n const patterns = globList(fm?.globs);\n return patterns.length > 0 ? { kind: \"globs\", key: \"globs\", patterns } : { kind: \"read\" };\n}\n\nasync function kiroTrigger(c: Collector, path: string): Promise<Trigger> {\n const fm = await frontOf(c, path);\n const inclusion = fm?.inclusion;\n if (inclusion === undefined || inclusion === \"always\") return { kind: \"always\" };\n if (inclusion === \"fileMatch\") {\n const patterns = globList(fm?.fileMatchPattern);\n if (patterns.length > 0) return { kind: \"globs\", key: \"fileMatchPattern\", patterns };\n }\n return { kind: \"read\" };\n}\n\n// ── Imports ──────────────────────────────────────────────────────\n\n/** Adds a candidate and, for a memory file, what its `@path` lines import. */\nasync function addWithImports(\n c: Collector,\n candidate: Candidate,\n trigger: string,\n known?: string,\n): Promise<void> {\n if (c.has(candidate.path)) return;\n const content = known ?? (await safeRead(candidate.path));\n if (content === null) return;\n const added = c.add(candidate.path, content, candidate.format, trigger);\n if (added === null || (candidate.format !== \"claude-md\" && candidate.format !== \"gemini-md\")) {\n return;\n }\n let frontier = [added];\n for (let hop = 1; hop <= MAX_IMPORT_HOPS && frontier.length > 0; hop += 1) {\n const next: RuleSource[] = [];\n for (const importer of frontier) {\n for (const ref of importsOf(importer.content)) {\n const path = ref.startsWith(\"~/\")\n ? join(c.home, ref.slice(2))\n : resolve(dirname(importer.path), ref);\n if (c.has(path)) continue;\n const body = await safeRead(path);\n if (body === null) continue;\n const source = c.add(path, body, \"import\", `imported by ${importer.displayPath}`);\n if (source !== null) next.push(source);\n }\n }\n frontier = next;\n }\n}\n\n/** `@path` references outside code fences and code spans. */\nfunction importsOf(content: string): string[] {\n const refs: string[] = [];\n // The open fence's character and length: CommonMark closes a fence only\n // with the same character, at least as long, so a backtick line inside a\n // tilde fence is text.\n let fence: { char: string; length: number } | null = null;\n for (const line of content.split(/\\r?\\n/)) {\n const marker = /^\\s*(`{3,}|~{3,})/.exec(line)?.[1];\n if (marker !== undefined) {\n const char = marker.charAt(0);\n if (fence === null) {\n fence = { char, length: marker.length };\n continue;\n }\n if (char === fence.char && marker.length >= fence.length && line.trim() === marker) {\n fence = null;\n continue;\n }\n }\n if (fence !== null) continue;\n const prose = line.replace(/`[^`]*`/g, \"\");\n for (const m of prose.matchAll(/(?:^|\\s)@([^\\s`]+)/g)) {\n const ref = m[1]?.replace(/[.,;:!?)\\]]+$/, \"\");\n if (ref) refs.push(ref);\n }\n }\n return refs;\n}\n\n// ── Helpers ──────────────────────────────────────────────────────\n\nasync function collector(opts: SourceOptions): Promise<Collector> {\n const cwd = resolve(opts.projectDir);\n const root = resolve(opts.projectRoot ?? (await findGitRoot(cwd)) ?? cwd);\n return new Collector(cwd, root, homeDir(opts.env), opts.exclude ?? []);\n}\n\nfunction homeDir(env: Record<string, string | undefined> = process.env): string {\n const set = process.platform === \"win32\" ? (env.USERPROFILE ?? env.HOME) : env.HOME;\n return resolve(set ?? homedir());\n}\n\n/** cwd and each ancestor up to the root, nearest first. */\nfunction ancestors(cwd: string, root: string): string[] {\n const dirs: string[] = [];\n let current = cwd;\n for (let depth = 0; depth < 32; depth += 1) {\n dirs.push(current);\n if (current === root) break;\n const parent = dirname(current);\n if (parent === current) break;\n current = parent;\n }\n return dirs;\n}\n\n/** `dir` and its ancestors inside the root that are not cwd or above it. */\nfunction dirsBelowCwd(c: Collector, dir: string): string[] {\n const dirs: string[] = [];\n let current = dir;\n for (let depth = 0; depth < 64; depth += 1) {\n if (relPosix(c.root, current) === null || relPosix(current, c.cwd) !== null) break;\n dirs.push(current);\n const parent = dirname(current);\n if (parent === current) break;\n current = parent;\n }\n return dirs;\n}\n\n/** One glob, a comma-separated string, or a list. Commas inside braces stay. */\nfunction isCursorRule(path: string): boolean {\n return path.split(sep).join(\"/\").includes(\"/.cursor/rules/\");\n}\n\n/**\n * Cursor reads its front matter line by line, so `globs: **\\/*.ts` is a rule\n * there and invalid YAML (an alias) here. This reads the three keys Cursor\n * defines the way Cursor does, as `key: rest of line`.\n */\nfunction cursorFront(content: string): ExtractedMetadata | null {\n const block = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---(?:\\r?\\n|$)/.exec(content)?.[1];\n if (block === undefined) return null;\n const data: Record<string, unknown> = {};\n for (const line of block.split(/\\r?\\n/)) {\n const m = /^(description|globs|alwaysApply):\\s*(.*)$/.exec(line);\n const name = m?.[1];\n const value = m?.[2]?.trim();\n if (name === undefined || value === undefined) continue;\n data[name] = name === \"alwaysApply\" ? value === \"true\" : value;\n }\n if (Object.keys(data).length === 0) return null;\n return { data, present: true, format: \"markdown\", lineFor: () => undefined };\n}\n\nfunction globList(value: unknown): string[] {\n if (Array.isArray(value)) {\n return value.filter((v): v is string => typeof v === \"string\" && v.trim() !== \"\").map((v) => v.trim());\n }\n if (typeof value !== \"string\") return [];\n const out: string[] = [];\n let depth = 0;\n let current = \"\";\n for (const ch of value) {\n if (ch === \"{\") depth += 1;\n if (ch === \"}\") depth = Math.max(0, depth - 1);\n if (ch === \",\" && depth === 0) {\n out.push(current);\n current = \"\";\n } else {\n current += ch;\n }\n }\n out.push(current);\n return out.map((p) => p.trim()).filter((p) => p !== \"\");\n}\n\n/** `path` relative to `base` with forward slashes, or null when outside it. */\nfunction relPosix(base: string, path: string): string | null {\n const rel = relative(base, path);\n if (rel === \"\") return \"\";\n if (rel.startsWith(\"..\") || isAbsolute(rel)) return null;\n return rel.split(sep).join(\"/\");\n}\n\nfunction key(path: string): string {\n const abs = resolve(path);\n return process.platform === \"win32\" ? abs.toLowerCase() : abs;\n}\n\n/** A path as sources compare it: absolute, and case-folded on Windows. */\nexport const pathKey = key;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwCA,IAAM,WACJ;AACF,IAAM,SACJ;AAMF,IAAM,qBAAqB,oBAAI,IAAI,CAAC,SAAS,KAAK,CAAC;AACnD,IAAM,OAAO,oBAAI,IAAwB,CAAC,aAAa,aAAa,aAAa,CAAC;AAE3E,SAAS,cAAc,OAA4B;AACxD,MAAI,MAAM,SAAS,UAAU,MAAM,SAAS,OAAW,QAAO;AAC9D,QAAM,EAAE,IAAI,IAAI;AAChB,MAAI,IAAI,WAAW,QAAQ,IAAI,qBAAqB,KAAM,QAAO;AACjE,QAAM,SAAS,IAAI;AACnB,MACE,OAAO,WAAW,YAClB,WAAW,QACX,UAAU,UACV,OAAO,OAAO,SAAS,UACvB;AACA,QAAI,CAAC,mBAAmB,IAAI,OAAO,IAAI,EAAG,QAAO;AAAA,EACnD,WACE,OAAO,IAAI,eAAe,YAC1B,CAAC,mBAAmB,IAAI,IAAI,UAAU,GACtC;AACA,WAAO;AAAA,EACT;AACA,QAAM,OAAO,MAAM,KAAK,QAAQ,UAAU,EAAE,EAAE,KAAK;AACnD,SAAO,SAAS,MAAM,CAAC,OAAO,KAAK,IAAI;AACzC;AAGO,SAAS,SAAS,OAAyB;AAChD,QAAM,UAAU,MAAM,OAAO,OAAO,CAAC,MAAM,EAAE,cAAc,QAAQ,cAAc,CAAC,CAAC;AACnF,QAAM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chunk-
|
|
11
|
+
} from "./chunk-6KKZXB2O.js";
|
|
12
12
|
import {
|
|
13
13
|
escapeWorkflowCommandMessage,
|
|
14
14
|
escapeWorkflowCommandProperty
|
|
@@ -85,4 +85,4 @@ export {
|
|
|
85
85
|
runCheck,
|
|
86
86
|
renderCheck
|
|
87
87
|
};
|
|
88
|
-
//# sourceMappingURL=chunk-
|
|
88
|
+
//# sourceMappingURL=chunk-ECVQNGTH.js.map
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/tracevals/graders/glob.ts
|
|
4
|
+
var literal = (ch) => ch.replace(/[.+^${}()|[\]\\]/g, "\\$&");
|
|
5
|
+
var compiled = /* @__PURE__ */ new Map();
|
|
6
|
+
function globToRegExp(glob) {
|
|
7
|
+
const cached = compiled.get(glob);
|
|
8
|
+
if (cached !== void 0) return cached;
|
|
9
|
+
const built = compile(glob);
|
|
10
|
+
compiled.set(glob, built);
|
|
11
|
+
return built;
|
|
12
|
+
}
|
|
13
|
+
function compile(glob) {
|
|
14
|
+
const spec = glob.replace(/\\/g, "/").toLowerCase().replace(/(?:\*\*\/)+/g, "**/");
|
|
15
|
+
let out = "";
|
|
16
|
+
for (let i = 0; i < spec.length; i += 1) {
|
|
17
|
+
const ch = spec[i];
|
|
18
|
+
if (ch === "?") {
|
|
19
|
+
out += "[^/]";
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (ch !== "*") {
|
|
23
|
+
out += literal(ch);
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (spec[i + 1] !== "*") {
|
|
27
|
+
out += "[^/]*";
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
i += 1;
|
|
31
|
+
if (spec[i + 1] === "/") {
|
|
32
|
+
i += 1;
|
|
33
|
+
if (out !== "") out += "(?:.*/)?";
|
|
34
|
+
} else if (out.endsWith("/")) {
|
|
35
|
+
out = `${out.slice(0, -1)}(?:/.*)?`;
|
|
36
|
+
} else {
|
|
37
|
+
out += ".*";
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return new RegExp(`^(?:.*/)?${out}$`);
|
|
41
|
+
}
|
|
42
|
+
function normalizePath(path) {
|
|
43
|
+
return path.replace(/\\/g, "/").toLowerCase();
|
|
44
|
+
}
|
|
45
|
+
function matchesGlob(path, glob) {
|
|
46
|
+
return globToRegExp(glob).test(normalizePath(path));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// src/tracevals/graders/when.ts
|
|
50
|
+
var stringValue = (kind) => (value) => typeof value === "string" && value.length > 0 ? void 0 : `options.when.${kind} must be a string`;
|
|
51
|
+
var compiled2 = /* @__PURE__ */ new Map();
|
|
52
|
+
function compiledRe(pattern) {
|
|
53
|
+
const cached = compiled2.get(pattern);
|
|
54
|
+
if (cached !== void 0) return cached;
|
|
55
|
+
const built = new RegExp(pattern);
|
|
56
|
+
compiled2.set(pattern, built);
|
|
57
|
+
return built;
|
|
58
|
+
}
|
|
59
|
+
var CONDITIONS = {
|
|
60
|
+
"file-access": {
|
|
61
|
+
validate: stringValue("file-access"),
|
|
62
|
+
test: (value, window) => window.fileAccesses.some((a) => matchesGlob(a.path, value)),
|
|
63
|
+
reason: (value) => `no file matching "${value}" was accessed`
|
|
64
|
+
},
|
|
65
|
+
"tool-used": {
|
|
66
|
+
validate: stringValue("tool-used"),
|
|
67
|
+
test: (value, window) => window.toolCalls.some((c) => c.name === value),
|
|
68
|
+
reason: (value) => `the ${value} tool was never used`
|
|
69
|
+
},
|
|
70
|
+
"prompt-matches": {
|
|
71
|
+
validate: (value) => {
|
|
72
|
+
const shape = stringValue("prompt-matches")(value);
|
|
73
|
+
if (shape !== void 0) return shape;
|
|
74
|
+
try {
|
|
75
|
+
new RegExp(value);
|
|
76
|
+
} catch (err) {
|
|
77
|
+
return `options.when.prompt-matches is not a valid regular expression: ${err.message}`;
|
|
78
|
+
}
|
|
79
|
+
return void 0;
|
|
80
|
+
},
|
|
81
|
+
test: (value, window) => {
|
|
82
|
+
const re = compiledRe(value);
|
|
83
|
+
return window.userMessages.some((text) => re.test(text));
|
|
84
|
+
},
|
|
85
|
+
reason: (value) => `no prompt matched /${value}/`
|
|
86
|
+
},
|
|
87
|
+
"command-matches": {
|
|
88
|
+
validate: (value) => {
|
|
89
|
+
const shape = stringValue("command-matches")(value);
|
|
90
|
+
if (shape !== void 0) return shape;
|
|
91
|
+
try {
|
|
92
|
+
new RegExp(value);
|
|
93
|
+
} catch (err) {
|
|
94
|
+
return `options.when.command-matches is not a valid regular expression: ${err.message}`;
|
|
95
|
+
}
|
|
96
|
+
return void 0;
|
|
97
|
+
},
|
|
98
|
+
test: (value, window) => {
|
|
99
|
+
const re = compiledRe(value);
|
|
100
|
+
return window.toolCalls.some(
|
|
101
|
+
(c) => c.name === "Bash" && typeof c.input.command === "string" && re.test(c.input.command)
|
|
102
|
+
);
|
|
103
|
+
},
|
|
104
|
+
reason: (value) => `no Bash command matched /${value}/`
|
|
105
|
+
},
|
|
106
|
+
"turn-count-above": {
|
|
107
|
+
validate: (value) => {
|
|
108
|
+
if (typeof value !== "number" || !Number.isInteger(value)) {
|
|
109
|
+
return "options.when.turn-count-above must be a whole number";
|
|
110
|
+
}
|
|
111
|
+
if (value < 0) return "options.when.turn-count-above must be at least 0";
|
|
112
|
+
return void 0;
|
|
113
|
+
},
|
|
114
|
+
test: (value, window) => window.turnCount > value,
|
|
115
|
+
reason: (value, window) => `${window.turnCount} turn(s) is not more than ${value}`
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
var WHEN_CONDITIONS = Object.keys(
|
|
119
|
+
CONDITIONS
|
|
120
|
+
);
|
|
121
|
+
function validateWhen(options) {
|
|
122
|
+
const when = options.when;
|
|
123
|
+
if (when === void 0) return void 0;
|
|
124
|
+
if (typeof when !== "object" || when === null || Array.isArray(when)) {
|
|
125
|
+
return "options.when must be an object of conditions";
|
|
126
|
+
}
|
|
127
|
+
const conditions = when;
|
|
128
|
+
const keys = Object.keys(conditions);
|
|
129
|
+
if (keys.length === 0) {
|
|
130
|
+
return `options.when needs at least one of: ${WHEN_CONDITIONS.join(", ")}`;
|
|
131
|
+
}
|
|
132
|
+
for (const key of keys) {
|
|
133
|
+
const condition = CONDITIONS[key];
|
|
134
|
+
if (condition === void 0) {
|
|
135
|
+
return `options.when.${key} is not a known condition; expected one of: ${WHEN_CONDITIONS.join(", ")}`;
|
|
136
|
+
}
|
|
137
|
+
const invalid = condition.validate(conditions[key]);
|
|
138
|
+
if (invalid !== void 0) return invalid;
|
|
139
|
+
}
|
|
140
|
+
return void 0;
|
|
141
|
+
}
|
|
142
|
+
function evaluateWhen(options, window) {
|
|
143
|
+
const when = options.when;
|
|
144
|
+
if (when === void 0) return { armed: true };
|
|
145
|
+
for (const name of WHEN_CONDITIONS) {
|
|
146
|
+
const value = when[name];
|
|
147
|
+
if (value === void 0) continue;
|
|
148
|
+
const condition = CONDITIONS[name];
|
|
149
|
+
if (condition.test(value, window)) continue;
|
|
150
|
+
return {
|
|
151
|
+
armed: false,
|
|
152
|
+
reason: `trigger not met (${window.label}): ${condition.reason(value, window)}`
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
return { armed: true };
|
|
156
|
+
}
|
|
157
|
+
function rejectWhen(kind, options) {
|
|
158
|
+
if (options.when === void 0) return void 0;
|
|
159
|
+
return `options.when is not supported by the ${kind} grader, which grades the whole session rather than a window`;
|
|
160
|
+
}
|
|
161
|
+
function skippedTrigger(trigger) {
|
|
162
|
+
return { findings: [], skipped: trigger.reason ?? "trigger not met" };
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export {
|
|
166
|
+
globToRegExp,
|
|
167
|
+
matchesGlob,
|
|
168
|
+
WHEN_CONDITIONS,
|
|
169
|
+
validateWhen,
|
|
170
|
+
evaluateWhen,
|
|
171
|
+
rejectWhen,
|
|
172
|
+
skippedTrigger
|
|
173
|
+
};
|
|
174
|
+
//# sourceMappingURL=chunk-FQGLRJGX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tracevals/graders/glob.ts","../src/tracevals/graders/when.ts"],"sourcesContent":["/**\n * A small path glob, for grader options that name a set of files rather than\n * one (ADR 01016).\n *\n * Deliberately not a dependency: the syntax needed here is `**`, `*`, and `?`\n * over already-normalized paths, and a matcher that small is easier to pin than\n * to pick. Matching follows the same rule as the `file-access` grader's\n * suffix compare — separators normalized, case folded, anchored at a path\n * segment boundary — so `docs/**` reads the same whatever the checkout root is.\n * `file-access` reaches that rule by compiling its literal path through here,\n * so the two cannot drift.\n *\n * **The pattern is untrusted input.** It comes from the *evaluated* project's\n * front matter and is tested against every file access in a window, so a\n * pattern that compiles to nested optional-greedy groups is a denial of service\n * on the runner rather than a slow match. Two things keep that impossible: a\n * run of double-star segments collapses to one, so the optional greedy group\n * never nests, and compilation is memoised per pattern string.\n */\n\n/** Escapes every regex metacharacter; `*` and `?` are handled by the caller. */\nconst literal = (ch: string): string => ch.replace(/[.+^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\n/**\n * Compiled patterns, keyed by the pattern string. Bounded because the key\n * space is: a run grades a fixed set of evals, each carrying a fixed set of\n * globs, and the compiled form depends on nothing else.\n */\nconst compiled = new Map<string, RegExp>();\n\nexport function globToRegExp(glob: string): RegExp {\n const cached = compiled.get(glob);\n if (cached !== undefined) return cached;\n const built = compile(glob);\n compiled.set(glob, built);\n return built;\n}\n\nfunction compile(glob: string): RegExp {\n // A run of `**/` means exactly what one does — \"any number of segments\" —\n // so collapsing it here is a normalization, not an approximation. Left\n // uncollapsed, each repeat added another optional greedy group over the same\n // input and the cost of a failed match grew multiplicatively.\n const spec = glob\n .replace(/\\\\/g, \"/\")\n .toLowerCase()\n .replace(/(?:\\*\\*\\/)+/g, \"**/\");\n let out = \"\";\n for (let i = 0; i < spec.length; i += 1) {\n const ch = spec[i] as string;\n if (ch === \"?\") {\n out += \"[^/]\";\n continue;\n }\n if (ch !== \"*\") {\n out += literal(ch);\n continue;\n }\n if (spec[i + 1] !== \"*\") {\n out += \"[^/]*\";\n continue;\n }\n // `**` spans separators, and must allow *zero* segments: `docs/**` has to\n // match `docs` itself, and `docs/**/x` has to match `docs/x`. Both cases\n // absorb one adjacent separator rather than requiring it.\n i += 1;\n if (spec[i + 1] === \"/\") {\n i += 1;\n // A leading `**/` is already covered by the unconditional ancestor\n // prefix below, so emitting a second optional group here would give the\n // engine two interchangeable ways to consume the same segments — the\n // shape that turns a failed match exponential.\n if (out !== \"\") out += \"(?:.*/)?\";\n } else if (out.endsWith(\"/\")) {\n out = `${out.slice(0, -1)}(?:/.*)?`;\n } else {\n out += \".*\";\n }\n }\n // Trace paths are absolute and machine-specific, so a spec matches any\n // ancestor prefix — but only whole segments, so `docs/**` does not match\n // `docsite/`.\n return new RegExp(`^(?:.*/)?${out}$`);\n}\n\n/** Separators normalized and case folded, the one way both matchers see paths. */\nexport function normalizePath(path: string): string {\n return path.replace(/\\\\/g, \"/\").toLowerCase();\n}\n\n/** True when `path` matches `glob`, both normalized the same way. */\nexport function matchesGlob(path: string, glob: string): boolean {\n return globToRegExp(glob).test(normalizePath(path));\n}\n","/**\n * Conditional triggers (ADR 01016): `options.when` arms an eval only for the\n * sessions it is about.\n *\n * The point is to make the *absence* of an artifact checkable. You cannot hang\n * an eval on a skill that never loaded — nothing resolves it, so nothing plans\n * it — but you can hang it on `CLAUDE.md`, which resolves for every session.\n * `when` is what lets that always-planned eval stay quiet on the sessions it\n * has nothing to say about.\n *\n * **A trigger that does not fire is `skipped`, never `pass`.** A check that\n * never armed has not been satisfied, and reporting it as a pass would make a\n * green report out of an eval that never ran — the same reasoning that makes an\n * empty window a skip (ADR 01015).\n *\n * **`when` is a general trigger, not one grader's feature.** Every windowed\n * grader routes its options through `validateWhen` and its window through\n * `evaluateWhen`, because `options` is an open bag: a grader that merely\n * ignored an unrecognised `when` would leave the eval armed on every session,\n * which is the exact failure this module exists to prevent. `cost` and\n * `json-output` are the abstainers, and they say so: both grade the whole\n * session rather than a window (ADR 01015), so there is nothing to evaluate a\n * predicate over, and `rejectWhen` turns the option into a loud error.\n *\n * Predicates are pure trace facts, evaluated over the artifact's window, and\n * every listed one must hold.\n *\n * `options` is an open object by schema decree — \"validated by the grader at\n * run time — a grader's options evolve on the grader's schedule\" — so this\n * costs no schema change and no upstream docmeta proposal (ADR 01010).\n */\nimport { matchesGlob } from \"./glob.js\";\nimport type { TraceWindow } from \"./util.js\";\nimport type { Options } from \"./util.js\";\n\n/**\n * One condition, defined once.\n *\n * The three facets used to live in three unlinked places — the name list, the\n * validator's type grouping, and the evaluator's if-chain — so adding a\n * condition meant three coordinated edits, and an incomplete one failed\n * *silently in the arming direction*: an unvalidated key would be rejected as\n * unknown, but an unevaluated one would simply never constrain anything.\n * Keeping them together makes an incomplete condition a type error.\n */\ninterface Condition {\n /** Rejects a malformed value without a trace, for `fill` (ADR 01004). */\n validate(value: unknown): string | undefined;\n /** True when the condition holds over the window. */\n test(value: unknown, window: TraceWindow): boolean;\n /** The half of the reason that names what was missing. */\n reason(value: unknown, window: TraceWindow): string;\n}\n\nconst stringValue =\n (kind: string) =>\n (value: unknown): string | undefined =>\n typeof value === \"string\" && value.length > 0\n ? undefined\n : `options.when.${kind} must be a string`;\n\n/**\n * Compiled once per pattern, as `globToRegExp` does. The pattern is fixed by\n * the artifact, so rebuilding it for every eval on every trace of a batch is\n * work with no new answer. No `g` flag here, so a shared instance carries no\n * `lastIndex` between calls.\n */\nconst compiled = new Map<string, RegExp>();\n\nfunction compiledRe(pattern: string): RegExp {\n const cached = compiled.get(pattern);\n if (cached !== undefined) return cached;\n const built = new RegExp(pattern);\n compiled.set(pattern, built);\n return built;\n}\n\nconst CONDITIONS = {\n \"file-access\": {\n validate: stringValue(\"file-access\"),\n test: (value, window) =>\n window.fileAccesses.some((a) => matchesGlob(a.path, value as string)),\n reason: (value) => `no file matching \"${value as string}\" was accessed`,\n },\n \"tool-used\": {\n validate: stringValue(\"tool-used\"),\n test: (value, window) => window.toolCalls.some((c) => c.name === value),\n reason: (value) => `the ${value as string} tool was never used`,\n },\n \"prompt-matches\": {\n validate: (value) => {\n const shape = stringValue(\"prompt-matches\")(value);\n if (shape !== undefined) return shape;\n try {\n new RegExp(value as string);\n } catch (err) {\n return `options.when.prompt-matches is not a valid regular expression: ${(err as Error).message}`;\n }\n return undefined;\n },\n test: (value, window) => {\n const re = compiledRe(value as string);\n return window.userMessages.some((text) => re.test(text));\n },\n reason: (value) => `no prompt matched /${value as string}/`,\n },\n \"command-matches\": {\n validate: (value) => {\n const shape = stringValue(\"command-matches\")(value);\n if (shape !== undefined) return shape;\n try {\n new RegExp(value as string);\n } catch (err) {\n return `options.when.command-matches is not a valid regular expression: ${(err as Error).message}`;\n }\n return undefined;\n },\n test: (value, window) => {\n const re = compiledRe(value as string);\n return window.toolCalls.some(\n (c) =>\n c.name === \"Bash\" &&\n typeof c.input.command === \"string\" &&\n re.test(c.input.command),\n );\n },\n reason: (value) => `no Bash command matched /${value as string}/`,\n },\n \"turn-count-above\": {\n validate: (value) => {\n if (typeof value !== \"number\" || !Number.isInteger(value)) {\n return \"options.when.turn-count-above must be a whole number\";\n }\n if (value < 0) return \"options.when.turn-count-above must be at least 0\";\n return undefined;\n },\n test: (value, window) => window.turnCount > (value as number),\n reason: (value, window) =>\n `${window.turnCount} turn(s) is not more than ${value as number}`,\n },\n} satisfies Record<string, Condition>;\n\n/** Every recognised condition. Unknown keys are an error, never ignored. */\nexport const WHEN_CONDITIONS = Object.keys(\n CONDITIONS,\n) as readonly WhenCondition[];\n\nexport type WhenCondition = keyof typeof CONDITIONS;\n\n/** What a trigger decided, and — when it did not fire — why. */\nexport interface TriggerResult {\n armed: boolean;\n /** Reason phrase for the skip; set only when `armed` is false. */\n reason?: string;\n}\n\n/**\n * Validate `options.when` without a trace, so `fill` can ground-check a\n * proposal before writing it (ADR 01004).\n *\n * An unrecognised condition is rejected rather than dropped. A silently\n * ignored `file-acess` would leave the eval armed on every session — the loud\n * failure is the safe one, and it mirrors how `metadata.eval*` reserves its\n * own prefix in `src/evals/extract.ts`.\n */\nexport function validateWhen(options: Options): string | undefined {\n const when = options.when;\n if (when === undefined) return undefined;\n if (typeof when !== \"object\" || when === null || Array.isArray(when)) {\n return \"options.when must be an object of conditions\";\n }\n const conditions = when as Record<string, unknown>;\n const keys = Object.keys(conditions);\n if (keys.length === 0) {\n // A trigger with no conditions arms on every session, which is the same as\n // having no trigger — but reads like a scoped check.\n return `options.when needs at least one of: ${WHEN_CONDITIONS.join(\", \")}`;\n }\n for (const key of keys) {\n const condition = (CONDITIONS as Record<string, Condition>)[key];\n if (condition === undefined) {\n return `options.when.${key} is not a known condition; expected one of: ${WHEN_CONDITIONS.join(\", \")}`;\n }\n const invalid = condition.validate(conditions[key]);\n if (invalid !== undefined) return invalid;\n }\n return undefined;\n}\n\n/**\n * Decide whether the trigger fires over a window. Conjunctive: the first\n * condition that fails names itself in the reason, so a skipped eval says\n * which half of its trigger was missing rather than only that it was.\n *\n * Evaluation walks `WHEN_CONDITIONS`, not the caller's key order, so the\n * reason a skip carries is stable across two spellings of the same trigger.\n */\nexport function evaluateWhen(options: Options, window: TraceWindow): TriggerResult {\n const when = options.when as Record<string, unknown> | undefined;\n if (when === undefined) return { armed: true };\n\n for (const name of WHEN_CONDITIONS) {\n const value = when[name];\n if (value === undefined) continue;\n const condition = CONDITIONS[name] as Condition;\n if (condition.test(value, window)) continue;\n return {\n armed: false,\n reason: `trigger not met (${window.label}): ${condition.reason(value, window)}`,\n };\n }\n\n return { armed: true };\n}\n\n/**\n * Reject `when` outright, for a grader that has no window to evaluate it over.\n *\n * Silence is the one answer not available. `options` is an open bag, so a\n * `when` a grader neither evaluates nor rejects validates clean and is\n * ignored — and an ignored trigger is an eval left armed on every session,\n * which is precisely the outcome its author wrote `when` to avoid. `cost` is\n * unwindowed by design (ADR 01015) and `json-output` reads the session's final\n * text; for both, the honest answer is that the option does not apply.\n */\nexport function rejectWhen(kind: string, options: Options): string | undefined {\n if (options.when === undefined) return undefined;\n return (\n `options.when is not supported by the ${kind} grader, ` +\n \"which grades the whole session rather than a window\"\n );\n}\n\n/**\n * The skip a grader returns for an unfired trigger. One helper rather than one\n * per grader, so every grader's wording — and the fact that it is a skip and\n * not a pass — comes from a single place.\n */\nexport function skippedTrigger(trigger: TriggerResult): {\n findings: never[];\n skipped: string;\n} {\n return { findings: [], skipped: trigger.reason ?? \"trigger not met\" };\n}\n"],"mappings":";;;AAqBA,IAAM,UAAU,CAAC,OAAuB,GAAG,QAAQ,qBAAqB,MAAM;AAO9E,IAAM,WAAW,oBAAI,IAAoB;AAElC,SAAS,aAAa,MAAsB;AACjD,QAAM,SAAS,SAAS,IAAI,IAAI;AAChC,MAAI,WAAW,OAAW,QAAO;AACjC,QAAM,QAAQ,QAAQ,IAAI;AAC1B,WAAS,IAAI,MAAM,KAAK;AACxB,SAAO;AACT;AAEA,SAAS,QAAQ,MAAsB;AAKrC,QAAM,OAAO,KACV,QAAQ,OAAO,GAAG,EAClB,YAAY,EACZ,QAAQ,gBAAgB,KAAK;AAChC,MAAI,MAAM;AACV,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK,GAAG;AACvC,UAAM,KAAK,KAAK,CAAC;AACjB,QAAI,OAAO,KAAK;AACd,aAAO;AACP;AAAA,IACF;AACA,QAAI,OAAO,KAAK;AACd,aAAO,QAAQ,EAAE;AACjB;AAAA,IACF;AACA,QAAI,KAAK,IAAI,CAAC,MAAM,KAAK;AACvB,aAAO;AACP;AAAA,IACF;AAIA,SAAK;AACL,QAAI,KAAK,IAAI,CAAC,MAAM,KAAK;AACvB,WAAK;AAKL,UAAI,QAAQ,GAAI,QAAO;AAAA,IACzB,WAAW,IAAI,SAAS,GAAG,GAAG;AAC5B,YAAM,GAAG,IAAI,MAAM,GAAG,EAAE,CAAC;AAAA,IAC3B,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;AAIA,SAAO,IAAI,OAAO,YAAY,GAAG,GAA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.js";
|
|
13
13
|
import {
|
|
14
14
|
palette
|
|
15
15
|
} from "./chunk-RNVYGWIC.js";
|
|
@@ -452,4 +452,4 @@ export {
|
|
|
452
452
|
removalLine,
|
|
453
453
|
renderRemovePretty
|
|
454
454
|
};
|
|
455
|
-
//# sourceMappingURL=chunk-
|
|
455
|
+
//# sourceMappingURL=chunk-GCC52YZD.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
programName
|
|
4
|
+
} from "./chunk-OWBRDNRZ.js";
|
|
5
|
+
|
|
6
|
+
// src/shared/warn.ts
|
|
7
|
+
var said = /* @__PURE__ */ new Set();
|
|
8
|
+
function warn(message) {
|
|
9
|
+
if (said.has(message)) return;
|
|
10
|
+
said.add(message);
|
|
11
|
+
process.stderr.write(`${programName()}: ${message}
|
|
12
|
+
`);
|
|
13
|
+
}
|
|
14
|
+
function notice(message) {
|
|
15
|
+
process.stderr.write(`${programName()}: ${message}
|
|
16
|
+
`);
|
|
17
|
+
}
|
|
18
|
+
var noticed = /* @__PURE__ */ new Set();
|
|
19
|
+
function noticeOnce(message) {
|
|
20
|
+
if (noticed.has(message)) return;
|
|
21
|
+
noticed.add(message);
|
|
22
|
+
notice(message);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
warn,
|
|
27
|
+
notice,
|
|
28
|
+
noticeOnce
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk-HX44GB4Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/shared/warn.ts"],"sourcesContent":["/**\n * Warnings for the user: stderr, prefixed, and said once.\n *\n * stderr, because stdout belongs to the report (`--format json` has to stay\n * parseable). Once, because the same deprecated config file is discovered by\n * every command core a run touches, and a warning repeated five times reads as\n * five problems. Dedup is on the exact text, per process.\n */\nimport { programName } from \"./program-name.js\";\n\nconst said = new Set<string>();\n\nexport function warn(message: string): void {\n if (said.has(message)) return;\n said.add(message);\n process.stderr.write(`${programName()}: ${message}\\n`);\n}\n\n/**\n * Diagnostics from a command core. Always stderr, never stdout: `json` and\n * `github` output has to stay parseable, and a note is not the report.\n * Unlike `warn`, said every time: a notice reports what a run did, not a\n * condition that holds.\n */\nexport function notice(message: string): void {\n process.stderr.write(`${programName()}: ${message}\n`);\n}\n\nconst noticed = new Set<string>();\n\n/**\n * A notice about something a run meets many times, said the first time. What\n * `--local` replaced is the case: an eval naming a hosted provider is selected\n * once per ensemble, but the user needs to read it once per eval.\n */\nexport function noticeOnce(message: string): void {\n if (noticed.has(message)) return;\n noticed.add(message);\n notice(message);\n}\n\n/** Forget what has been said, so a test can assert a warning fires again. */\nexport function resetWarnings(): void {\n said.clear();\n noticed.clear();\n}\n"],"mappings":";;;;;;AAUA,IAAM,OAAO,oBAAI,IAAY;AAEtB,SAAS,KAAK,SAAuB;AAC1C,MAAI,KAAK,IAAI,OAAO,EAAG;AACvB,OAAK,IAAI,OAAO;AAChB,UAAQ,OAAO,MAAM,GAAG,YAAY,CAAC,KAAK,OAAO;AAAA,CAAI;AACvD;AAQO,SAAS,OAAO,SAAuB;AAC5C,UAAQ,OAAO,MAAM,GAAG,YAAY,CAAC,KAAK,OAAO;AAAA,CAClD;AACD;AAEA,IAAM,UAAU,oBAAI,IAAY;AAOzB,SAAS,WAAW,SAAuB;AAChD,MAAI,QAAQ,IAAI,OAAO,EAAG;AAC1B,UAAQ,IAAI,OAAO;AACnB,SAAO,OAAO;AAChB;","names":[]}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
CONCEPT_FIELDS,
|
|
11
11
|
fieldPointer,
|
|
12
12
|
valueAt
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CR3HZERW.js";
|
|
14
14
|
import {
|
|
15
15
|
STDIN_LABEL,
|
|
16
16
|
STDIN_TOKEN,
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
gitignoreOptions,
|
|
21
21
|
locateFrontmatter,
|
|
22
22
|
resolveTargetSet
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MSMB6XOS.js";
|
|
24
24
|
import {
|
|
25
25
|
findConfigFile,
|
|
26
26
|
readConfigFile,
|
|
27
27
|
selectCollections,
|
|
28
28
|
valeConfigPath
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-XKBEHKWO.js";
|
|
30
30
|
import {
|
|
31
31
|
ToolError,
|
|
32
32
|
errorMessage
|
|
@@ -1972,4 +1972,4 @@ export {
|
|
|
1972
1972
|
valeConfigFor,
|
|
1973
1973
|
plural
|
|
1974
1974
|
};
|
|
1975
|
-
//# sourceMappingURL=chunk-
|
|
1975
|
+
//# sourceMappingURL=chunk-IIFADWWI.js.map
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
loadTemplateFile,
|
|
6
6
|
resolveLintRun,
|
|
7
7
|
resolveStructureTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZNE25EAR.js";
|
|
9
9
|
import {
|
|
10
10
|
parserByName,
|
|
11
11
|
parserForExtension,
|
|
12
12
|
unsupportedFormatMessage
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6URSCTTX.js";
|
|
14
14
|
import {
|
|
15
15
|
BLOCK_KINDS,
|
|
16
16
|
BLOCK_KIND_NODE
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-YGFIQ6Y5.js";
|
|
21
21
|
import {
|
|
22
22
|
writeTextAtomic
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5UB47BEV.js";
|
|
24
24
|
import {
|
|
25
25
|
ToolError,
|
|
26
26
|
errorMessage
|
|
@@ -298,4 +298,4 @@ export {
|
|
|
298
298
|
BUILT_IN_DEFAULTS,
|
|
299
299
|
runTools
|
|
300
300
|
};
|
|
301
|
-
//# sourceMappingURL=chunk-
|
|
301
|
+
//# sourceMappingURL=chunk-IOL74S4J.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
lineSpec,
|
|
12
12
|
parseLines,
|
|
13
13
|
sliceLines
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5UB47BEV.js";
|
|
15
15
|
import {
|
|
16
16
|
__default3 as __default,
|
|
17
17
|
extractorByName,
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
hasFrontmatterFence,
|
|
20
20
|
locateFrontmatter,
|
|
21
21
|
supportedExtensions
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MSMB6XOS.js";
|
|
23
23
|
import {
|
|
24
24
|
isEncryptedValue
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-XKBEHKWO.js";
|
|
26
26
|
import {
|
|
27
27
|
ToolError
|
|
28
28
|
} from "./chunk-G3T47CFV.js";
|
|
@@ -976,4 +976,4 @@ export {
|
|
|
976
976
|
citationInputs,
|
|
977
977
|
readPage
|
|
978
978
|
};
|
|
979
|
-
//# sourceMappingURL=chunk-
|
|
979
|
+
//# sourceMappingURL=chunk-IZBBXKMJ.js.map
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
sha256,
|
|
20
20
|
splitBody,
|
|
21
21
|
urlManifestRefusal
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LDKIIZDW.js";
|
|
23
23
|
import {
|
|
24
24
|
turnBudgetSkipReason
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-XG6PVB5S.js";
|
|
26
26
|
import {
|
|
27
27
|
isExecutionGrant,
|
|
28
28
|
unknownGrantsMessage
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
externalWriteWarnings,
|
|
35
35
|
offerExternalHomes
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-CR3HZERW.js";
|
|
37
37
|
import {
|
|
38
38
|
LOCATION_KEYWORD,
|
|
39
39
|
Validator,
|
|
@@ -41,21 +41,23 @@ import {
|
|
|
41
41
|
readManifestOrEmpty,
|
|
42
42
|
readManifestValue,
|
|
43
43
|
spliceManifestValue
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-5UB47BEV.js";
|
|
45
45
|
import {
|
|
46
46
|
writeFileAtomic
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-MSMB6XOS.js";
|
|
48
|
+
import {
|
|
49
|
+
noticeOnce,
|
|
50
|
+
warn
|
|
51
|
+
} from "./chunk-HX44GB4Z.js";
|
|
48
52
|
import {
|
|
49
53
|
assertKnownProvider,
|
|
50
54
|
assertLocalFlag,
|
|
51
55
|
assertModelHasProvider,
|
|
52
56
|
localNotice,
|
|
53
|
-
noticeOnce,
|
|
54
57
|
providerSpecFor,
|
|
55
58
|
resolveIdentity,
|
|
56
|
-
selectProvider
|
|
57
|
-
|
|
58
|
-
} from "./chunk-Q35YIDBV.js";
|
|
59
|
+
selectProvider
|
|
60
|
+
} from "./chunk-QCHVR4ZM.js";
|
|
59
61
|
import {
|
|
60
62
|
errorMessage
|
|
61
63
|
} from "./chunk-G3T47CFV.js";
|
|
@@ -1039,4 +1041,4 @@ export {
|
|
|
1039
1041
|
makeGenerateScripts,
|
|
1040
1042
|
runRun
|
|
1041
1043
|
};
|
|
1042
|
-
//# sourceMappingURL=chunk-
|
|
1044
|
+
//# sourceMappingURL=chunk-K52CS4KT.js.map
|