@hawkeyexl/manni 4.2.0 → 4.3.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 +2 -2
- package/dist/batch-7JJWXWSF.js +18 -0
- package/dist/batch-7JJWXWSF.js.map +1 -0
- package/dist/calibrate-IA2ARFMH.js +13 -0
- package/dist/calibrate-IA2ARFMH.js.map +1 -0
- package/dist/capture-C32JXIFN.js +15 -0
- package/dist/capture-C32JXIFN.js.map +1 -0
- package/dist/chunk-3R23C5DT.js +120 -0
- package/dist/chunk-3R23C5DT.js.map +1 -0
- package/dist/chunk-CI2GOU3A.js +4447 -0
- package/dist/chunk-CI2GOU3A.js.map +1 -0
- package/dist/{chunk-TH565O2N.js → chunk-DP2ZA3WH.js} +898 -278
- package/dist/chunk-DP2ZA3WH.js.map +1 -0
- package/dist/chunk-ESJ5W7EV.js +297 -0
- package/dist/chunk-ESJ5W7EV.js.map +1 -0
- package/dist/chunk-IOYXPBCL.js +37 -0
- package/dist/chunk-IOYXPBCL.js.map +1 -0
- package/dist/chunk-KTSJ2ZHA.js +40 -0
- package/dist/chunk-KTSJ2ZHA.js.map +1 -0
- package/dist/{chunk-BNHQWIAE.js → chunk-MFDD3YGU.js} +2 -2
- package/dist/chunk-MOQXWXSG.js +1941 -0
- package/dist/chunk-MOQXWXSG.js.map +1 -0
- package/dist/{chunk-UYDRDFYF.js → chunk-O6RVQKK6.js} +1943 -909
- package/dist/chunk-O6RVQKK6.js.map +1 -0
- package/dist/chunk-QROCFW5S.js +174 -0
- package/dist/chunk-QROCFW5S.js.map +1 -0
- package/dist/chunk-RVVCA4WL.js +379 -0
- package/dist/chunk-RVVCA4WL.js.map +1 -0
- package/dist/cli.js +422 -42
- package/dist/cli.js.map +1 -1
- package/dist/docmeta.js +3 -2
- package/dist/docmeta.js.map +1 -1
- package/dist/index.d.ts +3873 -795
- package/dist/index.js +292 -4
- package/dist/index.js.map +1 -1
- package/dist/picker-6HRMETE7.js +12 -0
- package/dist/picker-6HRMETE7.js.map +1 -0
- package/package.json +3 -1
- package/plugin/tracevals/.claude-plugin/plugin.json +9 -0
- package/plugin/tracevals/hooks/hooks.json +17 -0
- package/dist/chunk-TH565O2N.js.map +0 -1
- package/dist/chunk-UYDRDFYF.js.map +0 -1
- /package/dist/{chunk-BNHQWIAE.js.map → chunk-MFDD3YGU.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
ALLOWED_GRADERS,
|
|
3
4
|
BLOCK_KINDS,
|
|
4
5
|
BUILTIN_SOURCE,
|
|
6
|
+
BUILTIN_TOOLS,
|
|
5
7
|
BUILT_IN_DEFAULTS,
|
|
6
8
|
COVERAGE_FIELDS,
|
|
7
9
|
COVERAGE_FIELD_NAMES,
|
|
@@ -12,9 +14,11 @@ import {
|
|
|
12
14
|
EXTERNAL_KEYS,
|
|
13
15
|
EmbedderUnavailableError,
|
|
14
16
|
FILL_PROMPT_VERSION,
|
|
17
|
+
FILL_PROMPT_VERSION2,
|
|
15
18
|
FILL_SYSTEM_PROMPT,
|
|
16
19
|
FRONTMATTER_SCHEMA_ID,
|
|
17
20
|
FillCache,
|
|
21
|
+
FillCache2,
|
|
18
22
|
GOLDEN_DIR,
|
|
19
23
|
GRAPH_NOT_APPLICABLE_TO_VARIANT,
|
|
20
24
|
GRAPH_NOT_SOFTWARE_SUBJECT,
|
|
@@ -25,10 +29,12 @@ import {
|
|
|
25
29
|
LINT_TOOLS,
|
|
26
30
|
LOCALIZATIONS_FILENAME,
|
|
27
31
|
LintError,
|
|
32
|
+
MAX_BODY_CHARS,
|
|
28
33
|
MODEL_PROFILES,
|
|
29
34
|
NS,
|
|
30
35
|
PREFIXES,
|
|
31
36
|
PROPOSAL_SCHEMA,
|
|
37
|
+
PROPOSAL_SCHEMA2,
|
|
32
38
|
REPORT_FORMATS as REPORT_FORMATS2,
|
|
33
39
|
RULE_ID_PREFIX2 as RULE_ID_PREFIX,
|
|
34
40
|
SECTION_COVERAGE_FIELDS,
|
|
@@ -44,11 +50,15 @@ import {
|
|
|
44
50
|
VectorIndexError,
|
|
45
51
|
VectorMismatchError,
|
|
46
52
|
analyzeDoc,
|
|
53
|
+
appendArtifactEvals,
|
|
47
54
|
appendPageEvals,
|
|
48
55
|
applyGraphFields,
|
|
56
|
+
artifactFacts,
|
|
49
57
|
assertProviderSelection,
|
|
50
58
|
buildFillUser,
|
|
59
|
+
buildFillUser2,
|
|
51
60
|
buildSearchIndex,
|
|
61
|
+
buildVocabulary,
|
|
52
62
|
byCodeUnit,
|
|
53
63
|
cacheKey,
|
|
54
64
|
cite_exports,
|
|
@@ -86,14 +96,17 @@ import {
|
|
|
86
96
|
existingMetaProvenance,
|
|
87
97
|
expandTerm,
|
|
88
98
|
fillCacheKey,
|
|
99
|
+
fillCacheKey2,
|
|
89
100
|
findEntry,
|
|
90
101
|
frontmatterKind,
|
|
91
102
|
frontmatterSchema,
|
|
103
|
+
gateProposals,
|
|
92
104
|
graderFor,
|
|
93
105
|
headingMatches,
|
|
94
106
|
impact,
|
|
95
107
|
isLintTool,
|
|
96
108
|
isValidProposal,
|
|
109
|
+
isValidProposal2,
|
|
97
110
|
isWildcard,
|
|
98
111
|
judgeCacheBody,
|
|
99
112
|
listBuiltins as listBuiltins2,
|
|
@@ -122,6 +135,7 @@ import {
|
|
|
122
135
|
mintProductIri,
|
|
123
136
|
mintSchemeIri,
|
|
124
137
|
mintSectionIri,
|
|
138
|
+
mockFillProposal,
|
|
125
139
|
normalize,
|
|
126
140
|
normalizeDocPath,
|
|
127
141
|
occurrenceRange,
|
|
@@ -141,17 +155,18 @@ import {
|
|
|
141
155
|
readPage,
|
|
142
156
|
readTarget,
|
|
143
157
|
rebaseConfig,
|
|
144
|
-
reencryptMetadata,
|
|
145
158
|
registerGrader,
|
|
146
159
|
render as render2,
|
|
147
160
|
render2 as render3,
|
|
148
161
|
renderCalibration,
|
|
149
162
|
renderEmbed,
|
|
150
163
|
renderFill as renderFill2,
|
|
164
|
+
renderFill3,
|
|
151
165
|
renderGithub,
|
|
152
166
|
renderJson,
|
|
153
167
|
renderJunit as renderJunit2,
|
|
154
168
|
renderList,
|
|
169
|
+
renderList2,
|
|
155
170
|
renderPretty,
|
|
156
171
|
renderReviews,
|
|
157
172
|
renderSarif as renderSarif2,
|
|
@@ -180,12 +195,14 @@ import {
|
|
|
180
195
|
runExport,
|
|
181
196
|
runFill as runFill2,
|
|
182
197
|
runFill2 as runFill3,
|
|
198
|
+
runFill3 as runFill4,
|
|
183
199
|
runGenerate,
|
|
184
200
|
runInit,
|
|
185
201
|
runKeyRotate,
|
|
186
202
|
runKeySet,
|
|
187
203
|
runLint,
|
|
188
204
|
runList,
|
|
205
|
+
runList2,
|
|
189
206
|
runPromote,
|
|
190
207
|
runQuery as runQuery2,
|
|
191
208
|
runReview,
|
|
@@ -209,6 +226,7 @@ import {
|
|
|
209
226
|
storeToQuads,
|
|
210
227
|
stripFrontmatterBlock,
|
|
211
228
|
supportedExtensions as supportedExtensions2,
|
|
229
|
+
systemPromptFor,
|
|
212
230
|
traverse,
|
|
213
231
|
updateConfigEval,
|
|
214
232
|
updatePageEval,
|
|
@@ -218,7 +236,130 @@ import {
|
|
|
218
236
|
withExternalMetadata,
|
|
219
237
|
withPrefix,
|
|
220
238
|
writeZip
|
|
221
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-O6RVQKK6.js";
|
|
240
|
+
import {
|
|
241
|
+
pickTrace
|
|
242
|
+
} from "./chunk-KTSJ2ZHA.js";
|
|
243
|
+
import {
|
|
244
|
+
classify,
|
|
245
|
+
joinLabels,
|
|
246
|
+
rescore,
|
|
247
|
+
runCalibrate as runCalibrate2,
|
|
248
|
+
score
|
|
249
|
+
} from "./chunk-RVVCA4WL.js";
|
|
250
|
+
import {
|
|
251
|
+
BUILTIN_GRADER_KINDS,
|
|
252
|
+
IMPLICIT_EVAL_NAME,
|
|
253
|
+
JUDGE_SYSTEM_PROMPT,
|
|
254
|
+
PROMPT_VERSION,
|
|
255
|
+
REPORT_FORMATS as REPORT_FORMATS3,
|
|
256
|
+
SUMMARY_FORMATS as SUMMARY_FORMATS2,
|
|
257
|
+
VerdictCache,
|
|
258
|
+
WHEN_CONDITIONS,
|
|
259
|
+
aggregate,
|
|
260
|
+
announceSelection,
|
|
261
|
+
appendHistory,
|
|
262
|
+
assertProviderSelection as assertProviderSelection2,
|
|
263
|
+
buildUserContent,
|
|
264
|
+
cacheKey as cacheKey2,
|
|
265
|
+
compareToLast,
|
|
266
|
+
constructProvider as constructProvider2,
|
|
267
|
+
detectContentFormat,
|
|
268
|
+
detectFormat,
|
|
269
|
+
entryFor,
|
|
270
|
+
evaluateWhen,
|
|
271
|
+
globToRegExp,
|
|
272
|
+
graderFor as graderFor2,
|
|
273
|
+
keepNewerThan,
|
|
274
|
+
listGraderKinds as listGraderKinds2,
|
|
275
|
+
loadGraderPlugins,
|
|
276
|
+
loadHistory,
|
|
277
|
+
makeJudgeProvider,
|
|
278
|
+
makeTraceJudge,
|
|
279
|
+
matchesGlob,
|
|
280
|
+
parseFormat as parseFormat2,
|
|
281
|
+
parseNewerThan,
|
|
282
|
+
parseTraceContent,
|
|
283
|
+
parseTraceFile,
|
|
284
|
+
planEvals,
|
|
285
|
+
prepareRun,
|
|
286
|
+
providerSpecFor as providerSpecFor3,
|
|
287
|
+
registerGrader as registerGrader2,
|
|
288
|
+
render as render4,
|
|
289
|
+
renderBatch,
|
|
290
|
+
renderBatchMarkdown,
|
|
291
|
+
renderBatchPretty,
|
|
292
|
+
renderCalibration as renderCalibration2,
|
|
293
|
+
renderCalibrationMarkdown,
|
|
294
|
+
renderCalibrationPretty,
|
|
295
|
+
renderTrace,
|
|
296
|
+
resolveBatchTraces,
|
|
297
|
+
resolveProviderIdentity as resolveProviderIdentity3,
|
|
298
|
+
runBatch,
|
|
299
|
+
runEvals as runEvals2,
|
|
300
|
+
runOne,
|
|
301
|
+
runRun as runRun2,
|
|
302
|
+
selectProvider as selectProvider2,
|
|
303
|
+
sha256,
|
|
304
|
+
skippedWindow,
|
|
305
|
+
validateWhen,
|
|
306
|
+
windowFor
|
|
307
|
+
} from "./chunk-CI2GOU3A.js";
|
|
308
|
+
import {
|
|
309
|
+
buildManifest,
|
|
310
|
+
deviceId,
|
|
311
|
+
parseHookPayload,
|
|
312
|
+
readGit,
|
|
313
|
+
readStdin,
|
|
314
|
+
redactDeep,
|
|
315
|
+
renderCapture,
|
|
316
|
+
runCapture
|
|
317
|
+
} from "./chunk-ESJ5W7EV.js";
|
|
318
|
+
import {
|
|
319
|
+
discoverArtifacts
|
|
320
|
+
} from "./chunk-QROCFW5S.js";
|
|
321
|
+
import {
|
|
322
|
+
ARTIFACT_EVALS_SCHEMA_ID,
|
|
323
|
+
CONFIG_SECTION_KEY,
|
|
324
|
+
CUSTOM_PLACEHOLDER,
|
|
325
|
+
DEFAULT_CAPTURE_DIR,
|
|
326
|
+
DEFAULT_CONFIG_FILENAME as DEFAULT_CONFIG_FILENAME2,
|
|
327
|
+
DEFAULT_LABELS_FILE,
|
|
328
|
+
MANIFEST_VERSION,
|
|
329
|
+
PROJECT_RULES_FILENAMES,
|
|
330
|
+
PRUNED_DIRS,
|
|
331
|
+
REDACTION_PATTERNS,
|
|
332
|
+
availableAt,
|
|
333
|
+
checkContent,
|
|
334
|
+
compileRedactPatterns,
|
|
335
|
+
coverAvailability,
|
|
336
|
+
extractEvals,
|
|
337
|
+
findGitRoot,
|
|
338
|
+
findInTree,
|
|
339
|
+
findManifest,
|
|
340
|
+
hashFile,
|
|
341
|
+
joinDescriptions,
|
|
342
|
+
labelKey,
|
|
343
|
+
listInTree,
|
|
344
|
+
loadConfig as loadConfig5,
|
|
345
|
+
loadLabels,
|
|
346
|
+
makeRedactor,
|
|
347
|
+
manifestPathFor,
|
|
348
|
+
newAvailability,
|
|
349
|
+
offeredNames,
|
|
350
|
+
parseConfig as parseConfig5,
|
|
351
|
+
parseLabels,
|
|
352
|
+
readManifest,
|
|
353
|
+
reencryptMetadata,
|
|
354
|
+
relPosix,
|
|
355
|
+
resolveArtifacts,
|
|
356
|
+
safeMtime,
|
|
357
|
+
safeRead,
|
|
358
|
+
safeSessionId,
|
|
359
|
+
sha256Hex,
|
|
360
|
+
siblingManifestPath,
|
|
361
|
+
writeManifest
|
|
362
|
+
} from "./chunk-MOQXWXSG.js";
|
|
222
363
|
import {
|
|
223
364
|
BinMissing,
|
|
224
365
|
COMMON_FORMATS,
|
|
@@ -258,7 +399,6 @@ import {
|
|
|
258
399
|
SchemaCache,
|
|
259
400
|
Validator,
|
|
260
401
|
__default2 as __default,
|
|
261
|
-
__export,
|
|
262
402
|
applyFrontmatter,
|
|
263
403
|
argvFor,
|
|
264
404
|
assertSourcesAvailable,
|
|
@@ -346,7 +486,16 @@ import {
|
|
|
346
486
|
valueOf,
|
|
347
487
|
vendorFileName,
|
|
348
488
|
writeFileAtomic
|
|
349
|
-
} from "./chunk-
|
|
489
|
+
} from "./chunk-DP2ZA3WH.js";
|
|
490
|
+
import {
|
|
491
|
+
TracevalsError,
|
|
492
|
+
configDir,
|
|
493
|
+
discoverTraces,
|
|
494
|
+
slugFor
|
|
495
|
+
} from "./chunk-3R23C5DT.js";
|
|
496
|
+
import {
|
|
497
|
+
__export
|
|
498
|
+
} from "./chunk-IOYXPBCL.js";
|
|
350
499
|
|
|
351
500
|
// src/docevals/index.ts
|
|
352
501
|
var docevals_exports = {};
|
|
@@ -764,6 +913,144 @@ __export(key_exports, {
|
|
|
764
913
|
runKeyRotate: () => runKeyRotate,
|
|
765
914
|
runKeySet: () => runKeySet
|
|
766
915
|
});
|
|
916
|
+
|
|
917
|
+
// src/tracevals/index.ts
|
|
918
|
+
var tracevals_exports = {};
|
|
919
|
+
__export(tracevals_exports, {
|
|
920
|
+
ALLOWED_GRADERS: () => ALLOWED_GRADERS,
|
|
921
|
+
ARTIFACT_EVALS_SCHEMA_ID: () => ARTIFACT_EVALS_SCHEMA_ID,
|
|
922
|
+
BUILTIN_GRADER_KINDS: () => BUILTIN_GRADER_KINDS,
|
|
923
|
+
BUILTIN_TOOLS: () => BUILTIN_TOOLS,
|
|
924
|
+
CONFIG_SECTION_KEY: () => CONFIG_SECTION_KEY,
|
|
925
|
+
CUSTOM_PLACEHOLDER: () => CUSTOM_PLACEHOLDER,
|
|
926
|
+
DEFAULT_CAPTURE_DIR: () => DEFAULT_CAPTURE_DIR,
|
|
927
|
+
DEFAULT_CONFIG_FILENAME: () => DEFAULT_CONFIG_FILENAME2,
|
|
928
|
+
DEFAULT_LABELS_FILE: () => DEFAULT_LABELS_FILE,
|
|
929
|
+
FILL_PROMPT_VERSION: () => FILL_PROMPT_VERSION2,
|
|
930
|
+
FillCache: () => FillCache2,
|
|
931
|
+
IMPLICIT_EVAL_NAME: () => IMPLICIT_EVAL_NAME,
|
|
932
|
+
JUDGE_SYSTEM_PROMPT: () => JUDGE_SYSTEM_PROMPT,
|
|
933
|
+
MANIFEST_VERSION: () => MANIFEST_VERSION,
|
|
934
|
+
MAX_BODY_CHARS: () => MAX_BODY_CHARS,
|
|
935
|
+
PROJECT_RULES_FILENAMES: () => PROJECT_RULES_FILENAMES,
|
|
936
|
+
PROMPT_VERSION: () => PROMPT_VERSION,
|
|
937
|
+
PROPOSAL_SCHEMA: () => PROPOSAL_SCHEMA2,
|
|
938
|
+
PRUNED_DIRS: () => PRUNED_DIRS,
|
|
939
|
+
REDACTION_PATTERNS: () => REDACTION_PATTERNS,
|
|
940
|
+
REPORT_FORMATS: () => REPORT_FORMATS3,
|
|
941
|
+
SUMMARY_FORMATS: () => SUMMARY_FORMATS2,
|
|
942
|
+
TracevalsError: () => TracevalsError,
|
|
943
|
+
VerdictCache: () => VerdictCache,
|
|
944
|
+
WHEN_CONDITIONS: () => WHEN_CONDITIONS,
|
|
945
|
+
aggregate: () => aggregate,
|
|
946
|
+
announceSelection: () => announceSelection,
|
|
947
|
+
appendArtifactEvals: () => appendArtifactEvals,
|
|
948
|
+
appendHistory: () => appendHistory,
|
|
949
|
+
artifactFacts: () => artifactFacts,
|
|
950
|
+
assertProviderSelection: () => assertProviderSelection2,
|
|
951
|
+
availableAt: () => availableAt,
|
|
952
|
+
buildFillUser: () => buildFillUser2,
|
|
953
|
+
buildManifest: () => buildManifest,
|
|
954
|
+
buildUserContent: () => buildUserContent,
|
|
955
|
+
buildVocabulary: () => buildVocabulary,
|
|
956
|
+
cacheKey: () => cacheKey2,
|
|
957
|
+
checkContent: () => checkContent,
|
|
958
|
+
classify: () => classify,
|
|
959
|
+
compareToLast: () => compareToLast,
|
|
960
|
+
compileRedactPatterns: () => compileRedactPatterns,
|
|
961
|
+
configDir: () => configDir,
|
|
962
|
+
constructProvider: () => constructProvider2,
|
|
963
|
+
coverAvailability: () => coverAvailability,
|
|
964
|
+
detectContentFormat: () => detectContentFormat,
|
|
965
|
+
detectFormat: () => detectFormat,
|
|
966
|
+
deviceId: () => deviceId,
|
|
967
|
+
discoverArtifacts: () => discoverArtifacts,
|
|
968
|
+
discoverTraces: () => discoverTraces,
|
|
969
|
+
entryFor: () => entryFor,
|
|
970
|
+
evaluateWhen: () => evaluateWhen,
|
|
971
|
+
extractEvals: () => extractEvals,
|
|
972
|
+
fillCacheKey: () => fillCacheKey2,
|
|
973
|
+
findGitRoot: () => findGitRoot,
|
|
974
|
+
findInTree: () => findInTree,
|
|
975
|
+
findManifest: () => findManifest,
|
|
976
|
+
gateProposals: () => gateProposals,
|
|
977
|
+
globToRegExp: () => globToRegExp,
|
|
978
|
+
graderFor: () => graderFor2,
|
|
979
|
+
hashFile: () => hashFile,
|
|
980
|
+
isValidProposal: () => isValidProposal2,
|
|
981
|
+
joinDescriptions: () => joinDescriptions,
|
|
982
|
+
joinLabels: () => joinLabels,
|
|
983
|
+
keepNewerThan: () => keepNewerThan,
|
|
984
|
+
labelKey: () => labelKey,
|
|
985
|
+
listGraderKinds: () => listGraderKinds2,
|
|
986
|
+
listInTree: () => listInTree,
|
|
987
|
+
loadConfig: () => loadConfig5,
|
|
988
|
+
loadGraderPlugins: () => loadGraderPlugins,
|
|
989
|
+
loadHistory: () => loadHistory,
|
|
990
|
+
loadLabels: () => loadLabels,
|
|
991
|
+
makeJudgeProvider: () => makeJudgeProvider,
|
|
992
|
+
makeRedactor: () => makeRedactor,
|
|
993
|
+
makeTraceJudge: () => makeTraceJudge,
|
|
994
|
+
manifestPathFor: () => manifestPathFor,
|
|
995
|
+
matchesGlob: () => matchesGlob,
|
|
996
|
+
mockFillProposal: () => mockFillProposal,
|
|
997
|
+
newAvailability: () => newAvailability,
|
|
998
|
+
offeredNames: () => offeredNames,
|
|
999
|
+
parseConfig: () => parseConfig5,
|
|
1000
|
+
parseFormat: () => parseFormat2,
|
|
1001
|
+
parseHookPayload: () => parseHookPayload,
|
|
1002
|
+
parseLabels: () => parseLabels,
|
|
1003
|
+
parseNewerThan: () => parseNewerThan,
|
|
1004
|
+
parseTraceContent: () => parseTraceContent,
|
|
1005
|
+
parseTraceFile: () => parseTraceFile,
|
|
1006
|
+
pickTrace: () => pickTrace,
|
|
1007
|
+
planEvals: () => planEvals,
|
|
1008
|
+
prepareRun: () => prepareRun,
|
|
1009
|
+
providerSpecFor: () => providerSpecFor3,
|
|
1010
|
+
readGit: () => readGit,
|
|
1011
|
+
readManifest: () => readManifest,
|
|
1012
|
+
readStdin: () => readStdin,
|
|
1013
|
+
redactDeep: () => redactDeep,
|
|
1014
|
+
registerGrader: () => registerGrader2,
|
|
1015
|
+
relPosix: () => relPosix,
|
|
1016
|
+
render: () => render4,
|
|
1017
|
+
renderBatch: () => renderBatch,
|
|
1018
|
+
renderBatchMarkdown: () => renderBatchMarkdown,
|
|
1019
|
+
renderBatchPretty: () => renderBatchPretty,
|
|
1020
|
+
renderCalibration: () => renderCalibration2,
|
|
1021
|
+
renderCalibrationMarkdown: () => renderCalibrationMarkdown,
|
|
1022
|
+
renderCalibrationPretty: () => renderCalibrationPretty,
|
|
1023
|
+
renderCapture: () => renderCapture,
|
|
1024
|
+
renderFill: () => renderFill3,
|
|
1025
|
+
renderList: () => renderList2,
|
|
1026
|
+
renderTrace: () => renderTrace,
|
|
1027
|
+
rescore: () => rescore,
|
|
1028
|
+
resolveArtifacts: () => resolveArtifacts,
|
|
1029
|
+
resolveBatchTraces: () => resolveBatchTraces,
|
|
1030
|
+
resolveProviderIdentity: () => resolveProviderIdentity3,
|
|
1031
|
+
runBatch: () => runBatch,
|
|
1032
|
+
runCalibrate: () => runCalibrate2,
|
|
1033
|
+
runCapture: () => runCapture,
|
|
1034
|
+
runEvals: () => runEvals2,
|
|
1035
|
+
runFill: () => runFill4,
|
|
1036
|
+
runList: () => runList2,
|
|
1037
|
+
runOne: () => runOne,
|
|
1038
|
+
runRun: () => runRun2,
|
|
1039
|
+
safeMtime: () => safeMtime,
|
|
1040
|
+
safeRead: () => safeRead,
|
|
1041
|
+
safeSessionId: () => safeSessionId,
|
|
1042
|
+
score: () => score,
|
|
1043
|
+
selectProvider: () => selectProvider2,
|
|
1044
|
+
sha256: () => sha256,
|
|
1045
|
+
sha256Hex: () => sha256Hex,
|
|
1046
|
+
siblingManifestPath: () => siblingManifestPath,
|
|
1047
|
+
skippedWindow: () => skippedWindow,
|
|
1048
|
+
slugFor: () => slugFor,
|
|
1049
|
+
systemPromptFor: () => systemPromptFor,
|
|
1050
|
+
validateWhen: () => validateWhen,
|
|
1051
|
+
windowFor: () => windowFor,
|
|
1052
|
+
writeManifest: () => writeManifest
|
|
1053
|
+
});
|
|
767
1054
|
export {
|
|
768
1055
|
BinMissing,
|
|
769
1056
|
COMMON_FORMATS,
|
|
@@ -885,6 +1172,7 @@ export {
|
|
|
885
1172
|
staleFindings,
|
|
886
1173
|
stringifyValue,
|
|
887
1174
|
supportedExtensions,
|
|
1175
|
+
tracevals_exports as tracevals,
|
|
888
1176
|
valueOf,
|
|
889
1177
|
vendorFileName,
|
|
890
1178
|
writeFileAtomic
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/docevals/index.ts","../src/lint/index.ts","../src/graph/index.ts","../src/graph/runtime/assemble.ts","../src/graph/runtime/rdfjs.ts","../src/graph/schema.ts","../src/key/index.ts"],"sourcesContent":["/** Programmatic API for manni docevals. */\nexport { loadConfig, parseConfig, DEFAULT_CONFIG_FILENAME } from \"./core/config.js\";\nexport type { DocevalsConfig, EvalDef, SuiteDef, ProviderName } from \"./core/config.js\";\nexport { discoverPages, readPage, stripFrontmatterBlock } from \"./core/discover.js\";\nexport type { PageFile } from \"./core/discover.js\";\nexport {\n loadExternalReader,\n withExternalMetadata,\n EVAL_KEYS,\n EXTERNAL_KEYS,\n} from \"./core/external.js\";\nexport type { ExternalMetadataReader, PageExternal } from \"./core/external.js\";\nexport { resolvePage, resolvePages } from \"./core/resolve.js\";\nexport type { ResolvedEval, ResolvedPagePlan, PageProblem } from \"./core/resolve.js\";\nexport { runList, renderList } from \"./commands/list.js\";\nexport type { ListOptions, ListRun } from \"./commands/list.js\";\nexport { runEvals } from \"./core/engine.js\";\nexport type {\n EngineReport,\n JudgeFn,\n JudgeOptions,\n RunOptions,\n RunProblem,\n} from \"./core/engine.js\";\nexport { runRun } from \"./commands/run.js\";\nexport type { RunCommandOptions } from \"./commands/run.js\";\n// From the library, not local copies: judge.ts calls the library's versions,\n// so re-exporting a second implementation here would let a consumer's\n// computeConsensus() diverge from what the judge actually ran — the drift this\n// extraction exists to end.\nexport { computeConsensus, zoneFor } from \"@hawkeyexl/inference\";\nexport type { ZoneThresholds } from \"@hawkeyexl/inference\";\nexport { makeJudge } from \"./judge/judge.js\";\nexport {\n makeProvider,\n providerSpecFor,\n resolveProviderIdentity,\n} from \"./judge/provider.js\";\n// The provider contract and the offline test seam come from the shared\n// inference layer; re-exported so downstream code keeps one import site.\n// `InferenceProvider` is what this package used to call `JudgeProvider`.\nexport {\n MockProvider,\n mockVerdict,\n type CompleteJSONRequest,\n type CompleteJSONResponse,\n type InferenceProvider,\n type MockResponse,\n} from \"@hawkeyexl/inference\";\nexport {\n render,\n parseFormat,\n REPORT_FORMATS,\n SUMMARY_FORMATS,\n} from \"./reporters/index.js\";\nexport type { ColorOptions, ReportFormat, SummaryFormat } from \"./reporters/index.js\";\nexport {\n listReviews,\n renderReviews,\n runReview,\n} from \"./commands/review.js\";\nexport { runGenerate } from \"./commands/generate.js\";\nexport type { GenerateOptions, GenerateRun } from \"./commands/generate.js\";\nexport { runFill, renderFill } from \"./commands/fill.js\";\nexport type {\n FillOptions,\n FillReport,\n FillPageResult,\n FillStatus,\n ProposedEval,\n} from \"./commands/fill.js\";\nexport {\n FILL_PROMPT_VERSION,\n FILL_SYSTEM_PROMPT,\n PROPOSAL_SCHEMA,\n buildFillUser,\n isValidProposal,\n} from \"./fill/prompt.js\";\nexport { FillCache, fillCacheKey } from \"./fill/cache.js\";\nexport { runPromote } from \"./commands/promote.js\";\nexport type { PromoteOptions, PromoteProposal } from \"./commands/promote.js\";\nexport { makeGenerateScripts, scriptLocationFor } from \"./graders/scriptgen.js\";\nexport {\n runCalibrate,\n renderCalibration,\n loadGoldenCases,\n seedGoldenCases,\n GOLDEN_DIR,\n SEEDED_GOLDEN_FILE,\n} from \"./commands/calibrate.js\";\nexport type {\n CalibrateOptions,\n CalibrationReport,\n CalibrationCaseResult,\n GoldenCase,\n SeedResult,\n} from \"./commands/calibrate.js\";\nexport { runInit } from \"./commands/init.js\";\nexport { registerGrader, graderFor, listGraderKinds } from \"./graders/registry.js\";\nexport type { Grader, GraderContext, GraderTarget, ExecFn } from \"./graders/types.js\";\nexport {\n updatePageEval,\n updateConfigEval,\n appendPageEvals,\n} from \"./core/frontmatter-edit.js\";\nexport type { NewEvalEntry } from \"./core/frontmatter-edit.js\";\nexport { frontmatterSchema, FRONTMATTER_SCHEMA_ID } from \"./schema.js\";\n// The judge cache key and the exact body it hashes. Exported so that anything\n// asking \"is this verdict already cached?\" — `scripts/check-docs-cache.mjs`\n// above all — computes it with the judge's own code instead of reproducing the\n// composition by hand, which is how that script silently keyed on the raw page\n// body after the judge started prefixing the chunk budget.\nexport { cacheKey, judgeCacheBody } from \"./judge/cache.js\";\nexport type { JudgeCacheBody } from \"./judge/cache.js\";\nexport { readTarget } from \"./core/target.js\";\nexport * from \"./types.js\";\n","/** Programmatic API for manni lint. */\nimport { clearTemplateCaches } from \"./core/template-registry.js\";\nimport { clearMatcherCache } from \"./core/resolve-template.js\";\nimport { clearPatternCache } from \"./rules/index.js\";\n\n/**\n * Drop every process-lifetime cache: parsed built-ins, fetched template files,\n * compiled override globs, and compiled heading patterns.\n *\n * A CLI run never needs this - it lints one docset and exits, and the caches\n * are what stop a tree of one doctype from re-reading the same template per\n * page. A long-lived host is the different case: the maps grow with the number\n * of distinct refs and patterns seen, and a cached remote template is served\n * for the life of the process, so one republished upstream is never picked up.\n * Call this between runs, or when a template may have changed underneath.\n */\nexport function clearCaches(): void {\n clearTemplateCaches();\n clearMatcherCache();\n clearPatternCache();\n}\n\nexport { runLint, STDIN_LABEL } from \"./commands/lint.js\";\nexport type {\n LintOptions,\n LintRun,\n LintSummary,\n LintFileResult,\n} from \"./commands/lint.js\";\nexport { runTemplates, BUILTIN_SOURCE } from \"./commands/templates.js\";\nexport type {\n TemplateInfo,\n TemplatesInfo,\n TemplatesOptions,\n} from \"./commands/templates.js\";\nexport { runTools, BUILT_IN_DEFAULTS } from \"./commands/tools.js\";\nexport type { FormatInfo, ToolInfo, ToolsOptions } from \"./commands/tools.js\";\nexport {\n LINT_JOBS,\n LINT_TOOLS,\n TOOLS_BY_JOB,\n isLintTool,\n loadConfig,\n parseConfig,\n rebaseConfig,\n resolveLintRun,\n} from \"./core/config.js\";\nexport type {\n LintConfig,\n LintJob,\n LintJobConfig,\n LintRunOptions,\n LintTool,\n ResolvedLintRun,\n} from \"./core/config.js\";\nexport { validateDocument, validateSections } from \"./core/validator.js\";\nexport { matchSections } from \"./core/match.js\";\nexport type { Match, MatchResult } from \"./core/match.js\";\nexport {\n BLOCK_KINDS,\n headingMatches,\n isWildcard,\n occurrenceRange,\n} from \"./core/template.js\";\nexport type {\n AdmonitionsRule,\n AttributesRule,\n BlockKind,\n BlockRule,\n CodeBlocksRule,\n ElementsRule,\n HeadingRule,\n ImagesRule,\n ListItemsRule,\n ListsRule,\n Occurrences,\n ParagraphsRule,\n Rule,\n TablesRule,\n Template,\n TemplateFile,\n} from \"./core/template.js\";\nexport {\n listBuiltins,\n loadTemplate,\n loadTemplateFile,\n resolveExtends,\n classifyRef,\n} from \"./core/template-registry.js\";\nexport type {\n BuiltinInfo,\n LoadTemplateOptions,\n RefKind,\n TemplateResolver,\n} from \"./core/template-registry.js\";\n// Targets resolve through the family's walker (`src/meta/internal.ts`), which\n// is what makes `--ext`, `--exclude`, `.gitignore` handling and `--allow-empty`\n// mean the same thing here as they do for `meta` and `cite`.\nexport { STDIN_TOKEN } from \"../meta/internal.js\";\nexport {\n listFormats,\n parserByName,\n parserForExtension,\n supportedExtensions,\n} from \"./parsers/index.js\";\nexport {\n render,\n renderPretty,\n renderJson,\n renderGithub,\n renderJunit,\n renderTemplates,\n renderTools,\n} from \"./reporters/index.js\";\nexport type {\n ReportFormat,\n ReportOptions,\n ListFormat,\n} from \"./reporters/index.js\";\nexport { renderSarif } from \"./reporters/sarif.js\";\nexport type { SarifOptions } from \"./reporters/sarif.js\";\n// A finding's durable identity, so a caller filing or correlating findings\n// spells the id the same way every reporter does.\nexport { RULE_ID_PREFIX, TOOL_NAME, ruleId, ruleName } from \"./core/rule-id.js\";\n// Colour is the family's decision, made once in `src/shared/color.js`. These\n// are re-exported here so a library caller building lint's reports does not\n// have to reach for another tool's entry point to turn ANSI on or off.\nexport { palette, shouldColor } from \"../shared/color.js\";\nexport * from \"./types.js\";\n","/** The graph tool's public API. */\nexport * from \"./types.js\";\nexport {\n defaultConfig,\n loadConfig,\n loadRunConfig,\n parseConfig,\n type GraphConfig,\n type DeriveSource,\n type FillField,\n} from \"./core/config.js\";\nexport {\n COVERAGE_FIELDS,\n COVERAGE_FIELD_NAMES,\n // reference/library-api.mdx names this alongside the other two, so it has to\n // be reachable from the entry point that page tells consumers to import from.\n SECTION_COVERAGE_FIELDS,\n type CoverageField,\n} from \"./core/coverage.js\";\nexport {\n discoverFiles,\n resolveDocumentSet,\n type DocumentInputOptions,\n type DocumentSetOptions,\n} from \"./core/discover.js\";\nexport {\n GRAPH_NOT_APPLICABLE_TO_VARIANT,\n GRAPH_NOT_SOFTWARE_SUBJECT,\n SOFTWARE_LIFECYCLE_IRIS,\n SOFTWARE_SUBJECT_IRIS,\n TOPIC_TYPE_IRIS,\n} from \"./core/iirds.js\";\nexport {\n conceptSlug,\n encodeSegment,\n mintAgentIri,\n type AgentKind,\n mintBuildActivityIri,\n mintConceptIri,\n mintDocIri,\n mintGraphIri,\n mintProductIri,\n mintSchemeIri,\n mintSectionIri,\n normalizeDocPath,\n resolveBaseIri,\n} from \"./core/iri.js\";\nexport { analyzeDoc } from \"./core/analyze.js\";\nexport {\n deriveGraph,\n type DeriveOptions,\n type Quad,\n type Term,\n} from \"./core/derive.js\";\nexport {\n collectGitHistory,\n type GitFileHistory,\n type GitHistory,\n} from \"./core/git.js\";\nexport { emitTurtle } from \"./core/emit.js\";\nexport { emitJsonLd } from \"./core/emit-jsonld.js\";\nexport { emitRdfXml } from \"./core/emit-rdfxml.js\";\nexport { writeZip, type ZipEntry } from \"./core/zip.js\";\nexport {\n projectPackage,\n type IirdsPackageOptions,\n type PackageProjection,\n type ContentFile,\n} from \"./core/iirds-package.js\";\nexport {\n loadGraph,\n expandTerm,\n compactIri,\n storeToQuads,\n} from \"./core/load.js\";\n/**\n * The browser-native GraphRAG runtime is also published as the `@hawkeyexl/manni/graph/runtime`\n * subpath, which is the import to use in a browser: it has no `node:` imports\n * and no dependencies (ADR 01018).\n */\nexport * from \"./runtime/index.js\";\nexport {\n applyGraphFields,\n existingGraphFields,\n existingMetaProvenance,\n frontmatterKind,\n type GraphApplyOptions,\n type GraphApplyResult,\n} from \"./core/frontmatter-edit.js\";\nexport { NS, PREFIXES } from \"./core/vocab.js\";\nexport {\n runBuild,\n type BuildOptions,\n type BuildResult,\n} from \"./commands/build.js\";\nexport { frontmatterSchema, FRONTMATTER_SCHEMA_ID } from \"./schema.js\";\nexport {\n runExport,\n type ExportOptions,\n type ExportResult,\n type ExportFormat,\n} from \"./commands/export.js\";\nexport {\n runQuery,\n type QueryOptions,\n type QueryResult,\n} from \"./commands/query.js\";\nexport {\n runStats,\n type CoverageRow,\n type StatsOptions,\n type StatsReport,\n} from \"./commands/stats.js\";\nexport {\n runTraverse,\n renderTraverse,\n type TraverseOptions as TraverseCommandOptions,\n type TraverseReport,\n} from \"./commands/traverse.js\";\nexport {\n runSearch,\n renderSearch,\n type SearchHit,\n type SearchOptions,\n type SearchReport,\n} from \"./commands/search.js\";\nexport {\n runEmbed,\n renderEmbed,\n embedText,\n type EmbedOptions,\n type EmbedReport,\n} from \"./commands/embed.js\";\nexport {\n createLocalEmbedder,\n createMockEmbedder,\n EmbedderUnavailableError,\n DEFAULT_MODEL,\n MODEL_PROFILES,\n profileFor,\n withPrefix,\n type EmbedRole,\n type Embedder,\n type LocalEmbedderOptions,\n type MockEmbedderOptions,\n type ModelProfile,\n} from \"./embed/index.js\";\nexport {\n buildSearchIndex,\n documentsByLanguage,\n emitSearchIndex,\n partitionByLanguage,\n type SearchEntry,\n type SearchIndexDoc,\n type SearchIndexOptions,\n} from \"./core/search-index.js\";\nexport {\n emitLocalizations,\n LOCALIZATIONS_FILENAME,\n parseLocalizations,\n searchIndexFilename,\n UNDETERMINED,\n vectorIndexFilename,\n type LocalizationEntry,\n type LocalizationsDoc,\n type SearchArtifact,\n type VectorArtifact,\n} from \"./core/localizations.js\";\nexport {\n runFill,\n type FillOptions,\n type FillReport,\n type FillDocResult,\n} from \"./commands/fill.js\";\n// The inference layer is @hawkeyexl/inference; re-exported here so downstream\n// code that only depends on dockg can still construct providers and drive the\n// offline test seam without adding a second dependency.\nexport {\n MockProvider,\n type CompleteJSONRequest,\n type CompleteJSONResponse,\n type InferenceProvider,\n type MockResponse,\n} from \"@hawkeyexl/inference\";\nexport {\n assertProviderSelection,\n constructProvider,\n makeProvider,\n providerSpecFor,\n resolveProviderIdentity,\n selectProvider,\n type ProviderChoice,\n type ProviderFlags,\n type ProviderSelection,\n} from \"./llm/provider.js\";\n","/**\n * Context assembly (ADR 01018) — the runtime's terminal stage.\n *\n * Turns traversed nodes into the bundle an inference engine consumes:\n * `{ context, citations, trace, refusal? }`. **dockg stops here**: it never\n * calls a model. A different tool (an agent over MCP, a site backend) takes the\n * bundle onward, which keeps this runtime fully deterministic and keeps API\n * keys and inference cost outside dockg entirely.\n *\n * When nothing survives retrieval the result is a *structured refusal*, never\n * empty context — a caller must be able to tell \"no route exists\" apart from\n * \"here is nothing, proceed anyway\" (the disciplined-silence contract).\n *\n * Platform-neutral: no `node:` imports, no npm dependencies.\n */\nimport type { ContentResolver } from \"./resolve.js\";\nimport type { EntryCandidate, QueryTrace } from \"./trace.js\";\nimport { createTrace } from \"./trace.js\";\nimport type { TraversedNode } from \"./traverse.js\";\n\nexport interface ContextBlock {\n iri: string;\n title?: string;\n text: string;\n sourceUrl: string;\n /** Hops from the nearest seed — the relevance signal, carried through. */\n depth: number;\n}\n\nexport interface Citation {\n iri: string;\n title?: string;\n sourceUrl: string;\n}\n\nexport type RefusalReason = \"no-route\" | \"no-content\";\n\nexport interface Refusal {\n reason: RefusalReason;\n detail: string;\n}\n\n/**\n * The rankings that produced the seeds, carried through to the caller.\n *\n * Retrieval answers two different questions — \"what matched the query?\" and\n * \"what is the graph connected to it?\" — and a consumer needs both. Returning\n * only the graph result would make the match rankings inferrable solely from the\n * trace, which is diagnostic rather than a result surface (ADR 01020).\n */\nexport interface EntryRankings {\n /** The lexical leg's own ranking. */\n lexical: EntryCandidate[];\n /** The vector leg's own ranking; empty when no embedder was in play. */\n vector: EntryCandidate[];\n /** The fused ranking that actually seeded traversal. */\n merged: EntryCandidate[];\n}\n\nexport interface RetrievalBundle {\n /** What matched the query, per leg. Absent when seeds were given explicitly. */\n entry?: EntryRankings;\n context: ContextBlock[];\n citations: Citation[];\n trace: QueryTrace;\n /** Present when retrieval found nothing usable. `context` is then empty. */\n refusal?: Refusal;\n /** True when the character budget dropped otherwise-eligible blocks. */\n truncated: boolean;\n}\n\nexport interface AssembleOptions {\n /** Character budget across all blocks. Default: unbounded. */\n maxChars?: number;\n /** Append to an existing trace (normally the traversal's). */\n trace?: QueryTrace;\n /**\n * The entry rankings that produced these nodes, passed through to the bundle\n * so callers see matches and graph results side by side.\n */\n entry?: EntryRankings;\n}\n\n/**\n * Resolve traversed nodes to text and assemble the retrieval bundle. Nodes are\n * kept in traversal order (nearest-first), which is deterministic, and every\n * block carries the IRI it came from so citations are structural, not inferred.\n */\nexport async function assemble(\n resolver: ContentResolver,\n nodes: TraversedNode[],\n options: AssembleOptions = {},\n): Promise<RetrievalBundle> {\n const trace = options.trace ?? createTrace();\n const budget = options.maxChars ?? Infinity;\n\n if (nodes.length === 0) {\n return {\n ...(options.entry ? { entry: options.entry } : {}),\n context: [],\n citations: [],\n trace,\n truncated: false,\n refusal: {\n reason: \"no-route\",\n detail:\n \"No node in the graph was reachable for this query under the active scope filter.\",\n },\n };\n }\n\n const context: ContextBlock[] = [];\n let used = 0;\n let truncated = false;\n let resolvedAny = false;\n\n for (const node of nodes) {\n const resolved = await resolver.resolve(node.iri);\n if (!resolved) continue;\n resolvedAny = true;\n if (used + resolved.text.length > budget) {\n truncated = true;\n continue;\n }\n used += resolved.text.length;\n context.push({\n iri: resolved.iri,\n title: resolved.title,\n text: resolved.text,\n sourceUrl: resolved.sourceUrl,\n depth: node.depth,\n });\n }\n\n if (context.length === 0) {\n return {\n ...(options.entry ? { entry: options.entry } : {}),\n context: [],\n citations: [],\n trace,\n truncated,\n refusal: {\n reason: \"no-content\",\n detail: resolvedAny\n ? \"Every matching node's content exceeded the character budget.\"\n : \"Matching nodes were found, but none of them resolved to readable content.\",\n },\n };\n }\n\n return {\n ...(options.entry ? { entry: options.entry } : {}),\n context,\n citations: context.map((b) => ({\n iri: b.iri,\n title: b.title,\n sourceUrl: b.sourceUrl,\n })),\n trace,\n truncated,\n };\n}\n","/**\n * RDF/JS interop — the custom-SPARQL escape hatch (ADR 01018).\n *\n * The runtime's own walker is deliberately not a SPARQL engine: it is 0 KB and\n * it records a trace. But arbitrary user-authored SPARQL is a legitimate need,\n * so the index can hand out its contents as standard **RDF/JS quads**. Feed\n * them to any RDF/JS store and query with any engine:\n *\n * ```js\n * import { Store } from \"n3\";\n * import { QueryEngine } from \"@comunica/query-sparql-rdfjs-lite\";\n * const store = new Store(rdfjsQuads(graph));\n * const bindings = await new QueryEngine().queryBindings(sparql, { sources: [store] });\n * ```\n *\n * Quads are plain data rather than a hand-rolled `Source` stream on purpose:\n * every engine already accepts a store, stores accept quad arrays, and faking\n * Node's stream contract in a browser-safe module is fragile for no gain. At\n * docs scale materializing is trivial (the reference corpus is 172 quads).\n *\n * Honest caveat: engine results are bindings, not walker traces —\n * explainability lives in the walker API.\n *\n * The term shapes are structural, so they are hand-rolled here rather than\n * pulled from `@rdfjs/data-model`, keeping the runtime dependency-free and\n * browser-safe.\n */\nimport { byCodeUnit } from \"../core/sort.js\";\nimport type { GraphIndex, Value } from \"./graph.js\";\n\nconst XSD_STRING = \"http://www.w3.org/2001/XMLSchema#string\";\n\nexport interface RdfTerm {\n termType: \"NamedNode\" | \"Literal\" | \"DefaultGraph\";\n value: string;\n language?: string;\n datatype?: RdfTerm;\n equals(other?: RdfTerm | null): boolean;\n}\n\nexport interface RdfQuad {\n termType: \"Quad\";\n subject: RdfTerm;\n predicate: RdfTerm;\n object: RdfTerm;\n graph: RdfTerm;\n equals(other?: RdfQuad | null): boolean;\n}\n\nexport function namedNode(value: string): RdfTerm {\n return {\n termType: \"NamedNode\",\n value,\n equals(other) {\n return !!other && other.termType === \"NamedNode\" && other.value === value;\n },\n };\n}\n\nexport function defaultGraph(): RdfTerm {\n return {\n termType: \"DefaultGraph\",\n value: \"\",\n equals(other) {\n return !!other && other.termType === \"DefaultGraph\";\n },\n };\n}\n\nexport function literal(value: string, datatype?: string): RdfTerm {\n const dt = namedNode(datatype ?? XSD_STRING);\n return {\n termType: \"Literal\",\n value,\n language: \"\",\n datatype: dt,\n equals(other) {\n return (\n !!other &&\n other.termType === \"Literal\" &&\n other.value === value &&\n !!other.datatype &&\n other.datatype.value === dt.value\n );\n },\n };\n}\n\nfunction toTerm(v: Value): RdfTerm {\n return v.kind === \"iri\" ? namedNode(v.value) : literal(v.value, v.datatype);\n}\n\nfunction makeQuad(s: string, p: string, o: Value): RdfQuad {\n const subject = namedNode(s);\n const predicate = namedNode(p);\n const object = toTerm(o);\n const graph = defaultGraph();\n return {\n termType: \"Quad\",\n subject,\n predicate,\n object,\n graph,\n equals(other) {\n return (\n !!other &&\n subject.equals(other.subject) &&\n predicate.equals(other.predicate) &&\n object.equals(other.object)\n );\n },\n };\n}\n\n/**\n * The whole index as RDF/JS quads, in the index's deterministic order. Feed to\n * any RDF/JS store (`new Store(rdfjsQuads(graph))`) to run SPARQL.\n */\nexport function rdfjsQuads(graph: GraphIndex): RdfQuad[] {\n const quads: RdfQuad[] = [];\n for (const s of graph.ids()) {\n const node = graph.node(s);\n if (!node) continue;\n for (const p of [...node.props.keys()].sort(byCodeUnit)) {\n for (const v of node.props.get(p) ?? []) quads.push(makeQuad(s, p, v));\n }\n }\n return quads;\n}\n\n/**\n * Triple-pattern match returning RDF/JS quads. A null/undefined position is a\n * wildcard. Convenience for callers who want RDF/JS terms without pulling in a\n * store; the walker API is the richer (and traced) way to query.\n */\nexport function matchQuads(\n graph: GraphIndex,\n subject?: string | null,\n predicate?: string | null,\n object?: string | null,\n): RdfQuad[] {\n const quads: RdfQuad[] = [];\n const subjects = subject ? [subject] : graph.ids();\n for (const s of subjects) {\n const node = graph.node(s);\n if (!node) continue;\n const predicates = predicate\n ? [predicate]\n : [...node.props.keys()].sort(byCodeUnit);\n for (const p of predicates) {\n for (const v of node.props.get(p) ?? []) {\n if (object !== undefined && object !== null && v.value !== object) {\n continue;\n }\n quads.push(makeQuad(s, p, v));\n }\n }\n }\n return quads;\n}\n","/**\n * The page vocabulary manni graph implements: `manni:graph:1.0.0`, the built-in\n * schema the metadata tool publishes under `src/meta/schemas/`. It defines the\n * `graph:` block a page carries. Pages are validated against that schema\n * itself, imported and bundled into the build, so graph and `manni meta validate`\n * read the same bytes.\n *\n * graph ships no copy of the schema. A copy is a second artifact to keep in step,\n * with nothing but a test to say the two still match. A consumer who wants to\n * validate pages names `manni:graph:1.0.0` to `manni meta validate`, or\n * validates programmatically against the object below.\n */\nimport schema from \"../meta/schemas/graph/1.0.0.json\" with { type: \"json\" };\n\n/** The graph vocabulary, for validators that accept an inline schema. */\nexport const frontmatterSchema = schema as Record<string, unknown>;\n\n/** The vocabulary's `$id`: `manni:graph:1.0.0`. */\nexport const FRONTMATTER_SCHEMA_ID: string = schema.$id;\n","/**\n * The key domain's programmatic API, exported from the package as the `key`\n * namespace: `import { key } from \"@hawkeyexl/manni\"`. The command cores, and\n * the family's encryption primitives a caller needs beside them.\n */\nexport * from \"./types.js\";\nexport { KeyError } from \"./errors.js\";\nexport { runKeySet } from \"./commands/set.js\";\nexport { runKeyRotate } from \"./commands/rotate.js\";\nexport { decryptValue, encryptValue, isEncryptedValue } from \"../shared/encryption.js\";\nexport type { EncryptionContext } from \"../shared/encryption.js\";\nexport { resolveEncryptionKey } from \"../shared/encryption-key.js\";\nexport type { KeySource, ResolvedKey } from \"../shared/encryption-key.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,CAAC;AAAA,IACvE;AAAA,EACF;AACA,SAAO;AACT;AAOO,SAAS,WACd,OACA,SACA,WACA,QACW;AACX,QAAM,QAAmB,CAAC;AAC1B,QAAM,WAAW,UAAU,CAAC,OAAO,IAAI,MAAM,IAAI;AACjD,aAAW,KAAK,UAAU;AACxB,UAAM,OAAO,MAAM,KAAK,CAAC;AACzB,QAAI,CAAC,KAAM;AACX,UAAM,aAAa,YACf,CAAC,SAAS,IACV,CAAC,GAAG,KAAK,MAAM,KAAK,CAAC,EAAE,KAAK,UAAU;AAC1C,eAAW,KAAK,YAAY;AAC1B,iBAAW,KAAK,KAAK,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG;AACvC,YAAI,WAAW,UAAa,WAAW,QAAQ,EAAE,UAAU,QAAQ;AACjE;AAAA,QACF;AACA,cAAM,KAAK,SAAS,GAAG,GAAG,CAAC,CAAC;AAAA,MAC9B;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;;;AChJO,IAAMC,qBAAoB;AAG1B,IAAMC,yBAAgC,UAAO;;;AH+JpD;AAAA,EACE,gBAAAC;AAAA,OAKK;;;AIvLP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":["REPORT_FORMATS","loadConfig","parseConfig","render","renderFill","runFill","classifyRef","listBuiltins","loadConfig","parseConfig","render","renderJunit","renderSarif","supportedExtensions","FRONTMATTER_SCHEMA_ID","MockProvider","frontmatterSchema","loadConfig","makeProvider","parseConfig","providerSpecFor","resolveProviderIdentity","runFill","runQuery","frontmatterSchema","FRONTMATTER_SCHEMA_ID","MockProvider"]}
|
|
1
|
+
{"version":3,"sources":["../src/docevals/index.ts","../src/lint/index.ts","../src/graph/index.ts","../src/graph/runtime/assemble.ts","../src/graph/runtime/rdfjs.ts","../src/graph/schema.ts","../src/key/index.ts","../src/tracevals/index.ts"],"sourcesContent":["/** Programmatic API for manni docevals. */\nexport { loadConfig, parseConfig, DEFAULT_CONFIG_FILENAME } from \"./core/config.js\";\nexport type { DocevalsConfig, EvalDef, SuiteDef, ProviderName } from \"./core/config.js\";\nexport { discoverPages, readPage, stripFrontmatterBlock } from \"./core/discover.js\";\nexport type { PageFile } from \"./core/discover.js\";\nexport {\n loadExternalReader,\n withExternalMetadata,\n EVAL_KEYS,\n EXTERNAL_KEYS,\n} from \"./core/external.js\";\nexport type { ExternalMetadataReader, PageExternal } from \"./core/external.js\";\nexport { resolvePage, resolvePages } from \"./core/resolve.js\";\nexport type {\n EvalLocation,\n ResolvedEval,\n ResolvedPagePlan,\n PageProblem,\n} from \"./core/resolve.js\";\nexport { runList, renderList } from \"./commands/list.js\";\nexport type { ListOptions, ListRun } from \"./commands/list.js\";\nexport { runEvals } from \"./core/engine.js\";\nexport type {\n EngineReport,\n JudgeFn,\n JudgeOptions,\n RunOptions,\n RunProblem,\n} from \"./core/engine.js\";\nexport { runRun } from \"./commands/run.js\";\nexport type { RunCommandOptions } from \"./commands/run.js\";\n// From the library, not local copies: judge.ts calls the library's versions,\n// so re-exporting a second implementation here would let a consumer's\n// computeConsensus() diverge from what the judge actually ran — the drift this\n// extraction exists to end.\nexport { computeConsensus, zoneFor } from \"@hawkeyexl/inference\";\nexport type { ZoneThresholds } from \"@hawkeyexl/inference\";\nexport { makeJudge } from \"./judge/judge.js\";\nexport {\n makeProvider,\n providerSpecFor,\n resolveProviderIdentity,\n} from \"./judge/provider.js\";\n// The provider contract and the offline test seam come from the shared\n// inference layer; re-exported so downstream code keeps one import site.\n// `InferenceProvider` is what this package used to call `JudgeProvider`.\nexport {\n MockProvider,\n mockVerdict,\n type CompleteJSONRequest,\n type CompleteJSONResponse,\n type InferenceProvider,\n type MockResponse,\n} from \"@hawkeyexl/inference\";\nexport {\n render,\n parseFormat,\n REPORT_FORMATS,\n SUMMARY_FORMATS,\n} from \"./reporters/index.js\";\nexport type { ColorOptions, ReportFormat, SummaryFormat } from \"./reporters/index.js\";\nexport {\n listReviews,\n renderReviews,\n runReview,\n} from \"./commands/review.js\";\nexport { runGenerate } from \"./commands/generate.js\";\nexport type { GenerateOptions, GenerateRun } from \"./commands/generate.js\";\nexport { runFill, renderFill } from \"./commands/fill.js\";\nexport type {\n FillOptions,\n FillReport,\n FillPageResult,\n FillStatus,\n ProposedEval,\n} from \"./commands/fill.js\";\nexport {\n FILL_PROMPT_VERSION,\n FILL_SYSTEM_PROMPT,\n PROPOSAL_SCHEMA,\n buildFillUser,\n isValidProposal,\n} from \"./fill/prompt.js\";\nexport { FillCache, fillCacheKey } from \"./fill/cache.js\";\nexport { runPromote } from \"./commands/promote.js\";\nexport type { PromoteOptions, PromoteProposal } from \"./commands/promote.js\";\nexport { makeGenerateScripts, scriptLocationFor } from \"./graders/scriptgen.js\";\nexport {\n runCalibrate,\n renderCalibration,\n loadGoldenCases,\n seedGoldenCases,\n GOLDEN_DIR,\n SEEDED_GOLDEN_FILE,\n} from \"./commands/calibrate.js\";\nexport type {\n CalibrateOptions,\n CalibrationReport,\n CalibrationCaseResult,\n GoldenCase,\n SeedResult,\n} from \"./commands/calibrate.js\";\nexport { runInit } from \"./commands/init.js\";\nexport { registerGrader, graderFor, listGraderKinds } from \"./graders/registry.js\";\nexport type { Grader, GraderContext, GraderTarget, ExecFn } from \"./graders/types.js\";\nexport {\n updatePageEval,\n updateConfigEval,\n appendPageEvals,\n} from \"./core/frontmatter-edit.js\";\nexport type { NewEvalEntry } from \"./core/frontmatter-edit.js\";\nexport { frontmatterSchema, FRONTMATTER_SCHEMA_ID } from \"./schema.js\";\n// The judge cache key and the exact body it hashes. Exported so that anything\n// asking \"is this verdict already cached?\" — `scripts/check-docs-cache.mjs`\n// above all — computes it with the judge's own code instead of reproducing the\n// composition by hand, which is how that script silently keyed on the raw page\n// body after the judge started prefixing the chunk budget.\nexport { cacheKey, judgeCacheBody } from \"./judge/cache.js\";\nexport type { JudgeCacheBody } from \"./judge/cache.js\";\nexport { readTarget } from \"./core/target.js\";\nexport * from \"./types.js\";\n","/** Programmatic API for manni lint. */\nimport { clearTemplateCaches } from \"./core/template-registry.js\";\nimport { clearMatcherCache } from \"./core/resolve-template.js\";\nimport { clearPatternCache } from \"./rules/index.js\";\n\n/**\n * Drop every process-lifetime cache: parsed built-ins, fetched template files,\n * compiled override globs, and compiled heading patterns.\n *\n * A CLI run never needs this - it lints one docset and exits, and the caches\n * are what stop a tree of one doctype from re-reading the same template per\n * page. A long-lived host is the different case: the maps grow with the number\n * of distinct refs and patterns seen, and a cached remote template is served\n * for the life of the process, so one republished upstream is never picked up.\n * Call this between runs, or when a template may have changed underneath.\n */\nexport function clearCaches(): void {\n clearTemplateCaches();\n clearMatcherCache();\n clearPatternCache();\n}\n\nexport { runLint, STDIN_LABEL } from \"./commands/lint.js\";\nexport type {\n LintOptions,\n LintRun,\n LintSummary,\n LintFileResult,\n} from \"./commands/lint.js\";\nexport { runTemplates, BUILTIN_SOURCE } from \"./commands/templates.js\";\nexport type {\n TemplateInfo,\n TemplatesInfo,\n TemplatesOptions,\n} from \"./commands/templates.js\";\nexport { runTools, BUILT_IN_DEFAULTS } from \"./commands/tools.js\";\nexport type { FormatInfo, ToolInfo, ToolsOptions } from \"./commands/tools.js\";\nexport {\n LINT_JOBS,\n LINT_TOOLS,\n TOOLS_BY_JOB,\n isLintTool,\n loadConfig,\n parseConfig,\n rebaseConfig,\n resolveLintRun,\n} from \"./core/config.js\";\nexport type {\n LintConfig,\n LintJob,\n LintJobConfig,\n LintRunOptions,\n LintTool,\n ResolvedLintRun,\n} from \"./core/config.js\";\nexport { validateDocument, validateSections } from \"./core/validator.js\";\nexport { matchSections } from \"./core/match.js\";\nexport type { Match, MatchResult } from \"./core/match.js\";\nexport {\n BLOCK_KINDS,\n headingMatches,\n isWildcard,\n occurrenceRange,\n} from \"./core/template.js\";\nexport type {\n AdmonitionsRule,\n AttributesRule,\n BlockKind,\n BlockRule,\n CodeBlocksRule,\n ElementsRule,\n HeadingRule,\n ImagesRule,\n ListItemsRule,\n ListsRule,\n Occurrences,\n ParagraphsRule,\n Rule,\n TablesRule,\n Template,\n TemplateFile,\n} from \"./core/template.js\";\nexport {\n listBuiltins,\n loadTemplate,\n loadTemplateFile,\n resolveExtends,\n classifyRef,\n} from \"./core/template-registry.js\";\nexport type {\n BuiltinInfo,\n LoadTemplateOptions,\n RefKind,\n TemplateResolver,\n} from \"./core/template-registry.js\";\n// Targets resolve through the family's walker (`src/meta/internal.ts`), which\n// is what makes `--ext`, `--exclude`, `.gitignore` handling and `--allow-empty`\n// mean the same thing here as they do for `meta` and `cite`.\nexport { STDIN_TOKEN } from \"../meta/internal.js\";\nexport {\n listFormats,\n parserByName,\n parserForExtension,\n supportedExtensions,\n} from \"./parsers/index.js\";\nexport {\n render,\n renderPretty,\n renderJson,\n renderGithub,\n renderJunit,\n renderTemplates,\n renderTools,\n} from \"./reporters/index.js\";\nexport type {\n ReportFormat,\n ReportOptions,\n ListFormat,\n} from \"./reporters/index.js\";\nexport { renderSarif } from \"./reporters/sarif.js\";\nexport type { SarifOptions } from \"./reporters/sarif.js\";\n// A finding's durable identity, so a caller filing or correlating findings\n// spells the id the same way every reporter does.\nexport { RULE_ID_PREFIX, TOOL_NAME, ruleId, ruleName } from \"./core/rule-id.js\";\n// Colour is the family's decision, made once in `src/shared/color.js`. These\n// are re-exported here so a library caller building lint's reports does not\n// have to reach for another tool's entry point to turn ANSI on or off.\nexport { palette, shouldColor } from \"../shared/color.js\";\nexport * from \"./types.js\";\n","/** The graph tool's public API. */\nexport * from \"./types.js\";\nexport {\n defaultConfig,\n loadConfig,\n loadRunConfig,\n parseConfig,\n type GraphConfig,\n type DeriveSource,\n type FillField,\n} from \"./core/config.js\";\nexport {\n COVERAGE_FIELDS,\n COVERAGE_FIELD_NAMES,\n // reference/library-api.mdx names this alongside the other two, so it has to\n // be reachable from the entry point that page tells consumers to import from.\n SECTION_COVERAGE_FIELDS,\n type CoverageField,\n} from \"./core/coverage.js\";\nexport {\n discoverFiles,\n resolveDocumentSet,\n type DocumentInputOptions,\n type DocumentSetOptions,\n} from \"./core/discover.js\";\nexport {\n GRAPH_NOT_APPLICABLE_TO_VARIANT,\n GRAPH_NOT_SOFTWARE_SUBJECT,\n SOFTWARE_LIFECYCLE_IRIS,\n SOFTWARE_SUBJECT_IRIS,\n TOPIC_TYPE_IRIS,\n} from \"./core/iirds.js\";\nexport {\n conceptSlug,\n encodeSegment,\n mintAgentIri,\n type AgentKind,\n mintBuildActivityIri,\n mintConceptIri,\n mintDocIri,\n mintGraphIri,\n mintProductIri,\n mintSchemeIri,\n mintSectionIri,\n normalizeDocPath,\n resolveBaseIri,\n} from \"./core/iri.js\";\nexport { analyzeDoc } from \"./core/analyze.js\";\nexport {\n deriveGraph,\n type DeriveOptions,\n type Quad,\n type Term,\n} from \"./core/derive.js\";\nexport {\n collectGitHistory,\n type GitFileHistory,\n type GitHistory,\n} from \"./core/git.js\";\nexport { emitTurtle } from \"./core/emit.js\";\nexport { emitJsonLd } from \"./core/emit-jsonld.js\";\nexport { emitRdfXml } from \"./core/emit-rdfxml.js\";\nexport { writeZip, type ZipEntry } from \"./core/zip.js\";\nexport {\n projectPackage,\n type IirdsPackageOptions,\n type PackageProjection,\n type ContentFile,\n} from \"./core/iirds-package.js\";\nexport {\n loadGraph,\n expandTerm,\n compactIri,\n storeToQuads,\n} from \"./core/load.js\";\n/**\n * The browser-native GraphRAG runtime is also published as the `@hawkeyexl/manni/graph/runtime`\n * subpath, which is the import to use in a browser: it has no `node:` imports\n * and no dependencies (ADR 01018).\n */\nexport * from \"./runtime/index.js\";\nexport {\n applyGraphFields,\n existingGraphFields,\n existingMetaProvenance,\n frontmatterKind,\n type GraphApplyOptions,\n type GraphApplyResult,\n} from \"./core/frontmatter-edit.js\";\nexport { NS, PREFIXES } from \"./core/vocab.js\";\nexport {\n runBuild,\n type BuildOptions,\n type BuildResult,\n} from \"./commands/build.js\";\nexport { frontmatterSchema, FRONTMATTER_SCHEMA_ID } from \"./schema.js\";\nexport {\n runExport,\n type ExportOptions,\n type ExportResult,\n type ExportFormat,\n} from \"./commands/export.js\";\nexport {\n runQuery,\n type QueryOptions,\n type QueryResult,\n} from \"./commands/query.js\";\nexport {\n runStats,\n type CoverageRow,\n type StatsOptions,\n type StatsReport,\n} from \"./commands/stats.js\";\nexport {\n runTraverse,\n renderTraverse,\n type TraverseOptions as TraverseCommandOptions,\n type TraverseReport,\n} from \"./commands/traverse.js\";\nexport {\n runSearch,\n renderSearch,\n type SearchHit,\n type SearchOptions,\n type SearchReport,\n} from \"./commands/search.js\";\nexport {\n runEmbed,\n renderEmbed,\n embedText,\n type EmbedOptions,\n type EmbedReport,\n} from \"./commands/embed.js\";\nexport {\n createLocalEmbedder,\n createMockEmbedder,\n EmbedderUnavailableError,\n DEFAULT_MODEL,\n MODEL_PROFILES,\n profileFor,\n withPrefix,\n type EmbedRole,\n type Embedder,\n type LocalEmbedderOptions,\n type MockEmbedderOptions,\n type ModelProfile,\n} from \"./embed/index.js\";\nexport {\n buildSearchIndex,\n documentsByLanguage,\n emitSearchIndex,\n partitionByLanguage,\n type SearchEntry,\n type SearchIndexDoc,\n type SearchIndexOptions,\n} from \"./core/search-index.js\";\nexport {\n emitLocalizations,\n LOCALIZATIONS_FILENAME,\n parseLocalizations,\n searchIndexFilename,\n UNDETERMINED,\n vectorIndexFilename,\n type LocalizationEntry,\n type LocalizationsDoc,\n type SearchArtifact,\n type VectorArtifact,\n} from \"./core/localizations.js\";\nexport {\n runFill,\n type FillOptions,\n type FillReport,\n type FillDocResult,\n} from \"./commands/fill.js\";\n// The inference layer is @hawkeyexl/inference; re-exported here so downstream\n// code that only depends on dockg can still construct providers and drive the\n// offline test seam without adding a second dependency.\nexport {\n MockProvider,\n type CompleteJSONRequest,\n type CompleteJSONResponse,\n type InferenceProvider,\n type MockResponse,\n} from \"@hawkeyexl/inference\";\nexport {\n assertProviderSelection,\n constructProvider,\n makeProvider,\n providerSpecFor,\n resolveProviderIdentity,\n selectProvider,\n type ProviderChoice,\n type ProviderFlags,\n type ProviderSelection,\n} from \"./llm/provider.js\";\n","/**\n * Context assembly (ADR 01018) — the runtime's terminal stage.\n *\n * Turns traversed nodes into the bundle an inference engine consumes:\n * `{ context, citations, trace, refusal? }`. **dockg stops here**: it never\n * calls a model. A different tool (an agent over MCP, a site backend) takes the\n * bundle onward, which keeps this runtime fully deterministic and keeps API\n * keys and inference cost outside dockg entirely.\n *\n * When nothing survives retrieval the result is a *structured refusal*, never\n * empty context — a caller must be able to tell \"no route exists\" apart from\n * \"here is nothing, proceed anyway\" (the disciplined-silence contract).\n *\n * Platform-neutral: no `node:` imports, no npm dependencies.\n */\nimport type { ContentResolver } from \"./resolve.js\";\nimport type { EntryCandidate, QueryTrace } from \"./trace.js\";\nimport { createTrace } from \"./trace.js\";\nimport type { TraversedNode } from \"./traverse.js\";\n\nexport interface ContextBlock {\n iri: string;\n title?: string;\n text: string;\n sourceUrl: string;\n /** Hops from the nearest seed — the relevance signal, carried through. */\n depth: number;\n}\n\nexport interface Citation {\n iri: string;\n title?: string;\n sourceUrl: string;\n}\n\nexport type RefusalReason = \"no-route\" | \"no-content\";\n\nexport interface Refusal {\n reason: RefusalReason;\n detail: string;\n}\n\n/**\n * The rankings that produced the seeds, carried through to the caller.\n *\n * Retrieval answers two different questions — \"what matched the query?\" and\n * \"what is the graph connected to it?\" — and a consumer needs both. Returning\n * only the graph result would make the match rankings inferrable solely from the\n * trace, which is diagnostic rather than a result surface (ADR 01020).\n */\nexport interface EntryRankings {\n /** The lexical leg's own ranking. */\n lexical: EntryCandidate[];\n /** The vector leg's own ranking; empty when no embedder was in play. */\n vector: EntryCandidate[];\n /** The fused ranking that actually seeded traversal. */\n merged: EntryCandidate[];\n}\n\nexport interface RetrievalBundle {\n /** What matched the query, per leg. Absent when seeds were given explicitly. */\n entry?: EntryRankings;\n context: ContextBlock[];\n citations: Citation[];\n trace: QueryTrace;\n /** Present when retrieval found nothing usable. `context` is then empty. */\n refusal?: Refusal;\n /** True when the character budget dropped otherwise-eligible blocks. */\n truncated: boolean;\n}\n\nexport interface AssembleOptions {\n /** Character budget across all blocks. Default: unbounded. */\n maxChars?: number;\n /** Append to an existing trace (normally the traversal's). */\n trace?: QueryTrace;\n /**\n * The entry rankings that produced these nodes, passed through to the bundle\n * so callers see matches and graph results side by side.\n */\n entry?: EntryRankings;\n}\n\n/**\n * Resolve traversed nodes to text and assemble the retrieval bundle. Nodes are\n * kept in traversal order (nearest-first), which is deterministic, and every\n * block carries the IRI it came from so citations are structural, not inferred.\n */\nexport async function assemble(\n resolver: ContentResolver,\n nodes: TraversedNode[],\n options: AssembleOptions = {},\n): Promise<RetrievalBundle> {\n const trace = options.trace ?? createTrace();\n const budget = options.maxChars ?? Infinity;\n\n if (nodes.length === 0) {\n return {\n ...(options.entry ? { entry: options.entry } : {}),\n context: [],\n citations: [],\n trace,\n truncated: false,\n refusal: {\n reason: \"no-route\",\n detail:\n \"No node in the graph was reachable for this query under the active scope filter.\",\n },\n };\n }\n\n const context: ContextBlock[] = [];\n let used = 0;\n let truncated = false;\n let resolvedAny = false;\n\n for (const node of nodes) {\n const resolved = await resolver.resolve(node.iri);\n if (!resolved) continue;\n resolvedAny = true;\n if (used + resolved.text.length > budget) {\n truncated = true;\n continue;\n }\n used += resolved.text.length;\n context.push({\n iri: resolved.iri,\n title: resolved.title,\n text: resolved.text,\n sourceUrl: resolved.sourceUrl,\n depth: node.depth,\n });\n }\n\n if (context.length === 0) {\n return {\n ...(options.entry ? { entry: options.entry } : {}),\n context: [],\n citations: [],\n trace,\n truncated,\n refusal: {\n reason: \"no-content\",\n detail: resolvedAny\n ? \"Every matching node's content exceeded the character budget.\"\n : \"Matching nodes were found, but none of them resolved to readable content.\",\n },\n };\n }\n\n return {\n ...(options.entry ? { entry: options.entry } : {}),\n context,\n citations: context.map((b) => ({\n iri: b.iri,\n title: b.title,\n sourceUrl: b.sourceUrl,\n })),\n trace,\n truncated,\n };\n}\n","/**\n * RDF/JS interop — the custom-SPARQL escape hatch (ADR 01018).\n *\n * The runtime's own walker is deliberately not a SPARQL engine: it is 0 KB and\n * it records a trace. But arbitrary user-authored SPARQL is a legitimate need,\n * so the index can hand out its contents as standard **RDF/JS quads**. Feed\n * them to any RDF/JS store and query with any engine:\n *\n * ```js\n * import { Store } from \"n3\";\n * import { QueryEngine } from \"@comunica/query-sparql-rdfjs-lite\";\n * const store = new Store(rdfjsQuads(graph));\n * const bindings = await new QueryEngine().queryBindings(sparql, { sources: [store] });\n * ```\n *\n * Quads are plain data rather than a hand-rolled `Source` stream on purpose:\n * every engine already accepts a store, stores accept quad arrays, and faking\n * Node's stream contract in a browser-safe module is fragile for no gain. At\n * docs scale materializing is trivial (the reference corpus is 172 quads).\n *\n * Honest caveat: engine results are bindings, not walker traces —\n * explainability lives in the walker API.\n *\n * The term shapes are structural, so they are hand-rolled here rather than\n * pulled from `@rdfjs/data-model`, keeping the runtime dependency-free and\n * browser-safe.\n */\nimport { byCodeUnit } from \"../core/sort.js\";\nimport type { GraphIndex, Value } from \"./graph.js\";\n\nconst XSD_STRING = \"http://www.w3.org/2001/XMLSchema#string\";\n\nexport interface RdfTerm {\n termType: \"NamedNode\" | \"Literal\" | \"DefaultGraph\";\n value: string;\n language?: string;\n datatype?: RdfTerm;\n equals(other?: RdfTerm | null): boolean;\n}\n\nexport interface RdfQuad {\n termType: \"Quad\";\n subject: RdfTerm;\n predicate: RdfTerm;\n object: RdfTerm;\n graph: RdfTerm;\n equals(other?: RdfQuad | null): boolean;\n}\n\nexport function namedNode(value: string): RdfTerm {\n return {\n termType: \"NamedNode\",\n value,\n equals(other) {\n return !!other && other.termType === \"NamedNode\" && other.value === value;\n },\n };\n}\n\nexport function defaultGraph(): RdfTerm {\n return {\n termType: \"DefaultGraph\",\n value: \"\",\n equals(other) {\n return !!other && other.termType === \"DefaultGraph\";\n },\n };\n}\n\nexport function literal(value: string, datatype?: string): RdfTerm {\n const dt = namedNode(datatype ?? XSD_STRING);\n return {\n termType: \"Literal\",\n value,\n language: \"\",\n datatype: dt,\n equals(other) {\n return (\n !!other &&\n other.termType === \"Literal\" &&\n other.value === value &&\n !!other.datatype &&\n other.datatype.value === dt.value\n );\n },\n };\n}\n\nfunction toTerm(v: Value): RdfTerm {\n return v.kind === \"iri\" ? namedNode(v.value) : literal(v.value, v.datatype);\n}\n\nfunction makeQuad(s: string, p: string, o: Value): RdfQuad {\n const subject = namedNode(s);\n const predicate = namedNode(p);\n const object = toTerm(o);\n const graph = defaultGraph();\n return {\n termType: \"Quad\",\n subject,\n predicate,\n object,\n graph,\n equals(other) {\n return (\n !!other &&\n subject.equals(other.subject) &&\n predicate.equals(other.predicate) &&\n object.equals(other.object)\n );\n },\n };\n}\n\n/**\n * The whole index as RDF/JS quads, in the index's deterministic order. Feed to\n * any RDF/JS store (`new Store(rdfjsQuads(graph))`) to run SPARQL.\n */\nexport function rdfjsQuads(graph: GraphIndex): RdfQuad[] {\n const quads: RdfQuad[] = [];\n for (const s of graph.ids()) {\n const node = graph.node(s);\n if (!node) continue;\n for (const p of [...node.props.keys()].sort(byCodeUnit)) {\n for (const v of node.props.get(p) ?? []) quads.push(makeQuad(s, p, v));\n }\n }\n return quads;\n}\n\n/**\n * Triple-pattern match returning RDF/JS quads. A null/undefined position is a\n * wildcard. Convenience for callers who want RDF/JS terms without pulling in a\n * store; the walker API is the richer (and traced) way to query.\n */\nexport function matchQuads(\n graph: GraphIndex,\n subject?: string | null,\n predicate?: string | null,\n object?: string | null,\n): RdfQuad[] {\n const quads: RdfQuad[] = [];\n const subjects = subject ? [subject] : graph.ids();\n for (const s of subjects) {\n const node = graph.node(s);\n if (!node) continue;\n const predicates = predicate\n ? [predicate]\n : [...node.props.keys()].sort(byCodeUnit);\n for (const p of predicates) {\n for (const v of node.props.get(p) ?? []) {\n if (object !== undefined && object !== null && v.value !== object) {\n continue;\n }\n quads.push(makeQuad(s, p, v));\n }\n }\n }\n return quads;\n}\n","/**\n * The page vocabulary manni graph implements: `manni:graph:1.0.0`, the built-in\n * schema the metadata tool publishes under `src/meta/schemas/`. It defines the\n * `graph:` block a page carries. Pages are validated against that schema\n * itself, imported and bundled into the build, so graph and `manni meta validate`\n * read the same bytes.\n *\n * graph ships no copy of the schema. A copy is a second artifact to keep in step,\n * with nothing but a test to say the two still match. A consumer who wants to\n * validate pages names `manni:graph:1.0.0` to `manni meta validate`, or\n * validates programmatically against the object below.\n */\nimport schema from \"../meta/schemas/graph/1.0.0.json\" with { type: \"json\" };\n\n/** The graph vocabulary, for validators that accept an inline schema. */\nexport const frontmatterSchema = schema as Record<string, unknown>;\n\n/** The vocabulary's `$id`: `manni:graph:1.0.0`. */\nexport const FRONTMATTER_SCHEMA_ID: string = schema.$id;\n","/**\n * The key domain's programmatic API, exported from the package as the `key`\n * namespace: `import { key } from \"@hawkeyexl/manni\"`. The command cores, and\n * the family's encryption primitives a caller needs beside them.\n */\nexport * from \"./types.js\";\nexport { KeyError } from \"./errors.js\";\nexport { runKeySet } from \"./commands/set.js\";\nexport { runKeyRotate } from \"./commands/rotate.js\";\nexport { decryptValue, encryptValue, isEncryptedValue } from \"../shared/encryption.js\";\nexport type { EncryptionContext } from \"../shared/encryption.js\";\nexport { resolveEncryptionKey } from \"../shared/encryption-key.js\";\nexport type { KeySource, ResolvedKey } from \"../shared/encryption-key.js\";\n","/** Programmatic API for manni tracevals. */\nexport * from \"./types.js\";\nexport * from \"./trace/types.js\";\nexport { detectFormat, detectContentFormat } from \"./trace/detect.js\";\nexport { parseTraceFile, parseTraceContent } from \"./trace/claude.js\";\nexport {\n availableAt,\n joinDescriptions,\n newAvailability,\n offeredNames,\n} from \"./trace/availability.js\";\nexport {\n configDir,\n discoverTraces,\n slugFor,\n type DiscoverOptions,\n type TraceListing,\n} from \"./trace/discover.js\";\nexport { renderList, runList, type ListOptions, type ListRun } from \"./commands/list.js\";\nexport * from \"./artifacts/types.js\";\nexport {\n PROJECT_RULES_FILENAMES,\n resolveArtifacts,\n type ResolveOptions,\n} from \"./artifacts/resolve.js\";\nexport {\n coverAvailability,\n type AvailabilityCoverage,\n type AvailabilityOptions,\n} from \"./artifacts/availability.js\";\nexport {\n discoverArtifacts,\n type DiscoverOptions as DiscoverArtifactsOptions,\n type DiscoveredArtifact,\n type DiscoveryResult,\n} from \"./artifacts/discover.js\";\nexport {\n PRUNED_DIRS,\n findGitRoot,\n findInTree,\n listInTree,\n safeMtime,\n safeRead,\n} from \"./artifacts/fs.js\";\nexport {\n ARTIFACT_EVALS_SCHEMA_ID,\n extractEvals,\n type EvalEntry,\n type EvalType,\n type ExtractedEvals,\n type Severity,\n} from \"./evals/extract.js\";\nexport {\n appendArtifactEvals,\n type EvalProvenance,\n type NewEvalEntry,\n} from \"./evals/write.js\";\nexport {\n IMPLICIT_EVAL_NAME,\n planEvals,\n type EvalLocation,\n type EvalPlan,\n type SuppliedMetadata,\n} from \"./core/plan.js\";\nexport * from \"./graders/types.js\";\nexport {\n BUILTIN_GRADER_KINDS,\n graderFor,\n listGraderKinds,\n registerGrader,\n} from \"./graders/registry.js\";\nexport {\n loadGraderPlugins,\n type GraderPluginApi,\n type GraderPluginRegister,\n type LoadGraderPluginsOptions,\n type LoadedGraderPlugins,\n} from \"./graders/plugins.js\";\nexport { skippedWindow, windowFor, type TraceWindow } from \"./graders/util.js\";\nexport { globToRegExp, matchesGlob } from \"./graders/glob.js\";\nexport {\n WHEN_CONDITIONS,\n evaluateWhen,\n validateWhen,\n type TriggerResult,\n type WhenCondition,\n} from \"./graders/when.js\";\nexport { renderTrace, type RenderOptions } from \"./judge/render.js\";\nexport {\n CUSTOM_PLACEHOLDER,\n REDACTION_PATTERNS,\n compileRedactPatterns,\n makeRedactor,\n type RedactionPattern,\n type Redactor,\n} from \"./judge/redact.js\";\nexport {\n JUDGE_SYSTEM_PROMPT,\n PROMPT_VERSION,\n buildUserContent,\n} from \"./judge/prompt.js\";\nexport { VerdictCache, cacheKey, sha256 } from \"./judge/cache.js\";\nexport {\n makeTraceJudge,\n type JudgedEval,\n type TraceJudge,\n type TraceJudgeOptions,\n} from \"./judge/trace-judge.js\";\nexport {\n announceSelection,\n assertProviderSelection,\n constructProvider,\n makeJudgeProvider,\n providerSpecFor,\n resolveProviderIdentity,\n selectProvider,\n type JudgeProviderOptions,\n type MockResponse,\n type ProviderChoice,\n type ProviderFlags,\n type ProviderSelection,\n} from \"./judge/provider.js\";\nexport {\n CONFIG_SECTION_KEY,\n DEFAULT_CONFIG_FILENAME,\n loadConfig,\n parseConfig,\n type ConfigFileContext,\n type TracevalsConfig,\n} from \"./core/config.js\";\nexport { runEvals, type EngineOptions } from \"./core/engine.js\";\nexport {\n render,\n renderBatch,\n renderCalibration,\n parseFormat,\n REPORT_FORMATS,\n SUMMARY_FORMATS,\n type ReportFormat,\n type SummaryFormat,\n} from \"./reporters/index.js\";\nexport { renderBatchPretty, renderBatchMarkdown } from \"./reporters/batch.js\";\nexport {\n renderCalibrationPretty,\n renderCalibrationMarkdown,\n} from \"./reporters/calibration.js\";\nexport { aggregate, type BatchOutcome } from \"./aggregate.js\";\nexport {\n prepareRun,\n runOne,\n runRun,\n type RunCommandOptions,\n type RunCommandResult,\n type RunContext,\n type RunSharedOptions,\n} from \"./commands/run.js\";\nexport {\n keepNewerThan,\n parseNewerThan,\n resolveBatchTraces,\n runBatch,\n type BatchCommandOptions,\n type BatchCommandResult,\n} from \"./commands/batch.js\";\nexport {\n runCalibrate,\n type CalibrateCommandOptions,\n type CalibrateCommandResult,\n} from \"./commands/calibrate.js\";\nexport * from \"./calibrate/types.js\";\nexport {\n DEFAULT_LABELS_FILE,\n labelKey,\n loadLabels,\n parseLabels,\n} from \"./calibrate/labels.js\";\nexport {\n classify,\n joinLabels,\n rescore,\n score,\n type JoinedLabel,\n type AmbiguousLabel,\n type JoinResult,\n type Rescored,\n type ScoreInput,\n type ScoreResult,\n} from \"./calibrate/score.js\";\nexport {\n renderFill,\n runFill,\n type FillArtifactResult,\n type FillOptions,\n type FillReport,\n type FillRun,\n type FillStatus,\n type SharpeningNote,\n} from \"./commands/fill.js\";\nexport {\n ALLOWED_GRADERS,\n gateProposals,\n type GateOptions,\n type GateResult,\n type ProposedEval,\n type Rejection,\n type RejectionReason,\n type Vocabulary,\n} from \"./fill/gate.js\";\nexport {\n FILL_PROMPT_VERSION,\n MAX_BODY_CHARS,\n PROPOSAL_SCHEMA,\n buildFillUser,\n isValidProposal,\n systemPromptFor,\n} from \"./fill/prompt.js\";\nexport { FillCache, fillCacheKey, type FillCacheKeyParts } from \"./fill/cache.js\";\nexport { artifactFacts, type ArtifactFacts } from \"./fill/facts.js\";\nexport { BUILTIN_TOOLS, buildVocabulary } from \"./fill/vocabulary.js\";\nexport { mockFillProposal } from \"./fill/mock.js\";\nexport { pickTrace, type PickerChoice, type PromptFn } from \"./trace/picker.js\";\nexport {\n appendHistory,\n compareToLast,\n entryFor,\n loadHistory,\n type HistoryComparison,\n type HistoryEntry,\n type HistoryEval,\n} from \"./history.js\";\nexport * from \"./capture/types.js\";\nexport {\n checkContent,\n findManifest,\n hashFile,\n manifestPathFor,\n readManifest,\n relPosix,\n safeSessionId,\n sha256Hex,\n siblingManifestPath,\n writeManifest,\n type FindManifestOptions,\n type FoundManifest,\n} from \"./capture/manifest.js\";\nexport {\n buildManifest,\n deviceId,\n readGit,\n redactDeep,\n type BuildManifestOptions,\n} from \"./capture/build.js\";\nexport { parseHookPayload, readStdin, type HookPayload } from \"./capture/hook.js\";\nexport {\n renderCapture,\n runCapture,\n type CaptureCommandOptions,\n type CaptureCommandResult,\n} from \"./commands/capture.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A,kBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAC;AAAA,EAAA;AAAA,yBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,yBAAAC;AAAA,EAAA;AAAA,oBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,wBAAAC;AAAA,EAAA;AAAA,gBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA,2BAAAC;AAAA,EAAA;AAAA;AAAA;AAAA,oBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,iCAAAC;AAAA,EAAA;AAAA,sBAAAC;AAAA,EAAA;AAAA,kBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA;AAAA,gBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,wBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":["REPORT_FORMATS","loadConfig","parseConfig","render","renderFill","runFill","classifyRef","listBuiltins","loadConfig","parseConfig","render","renderJunit","renderSarif","supportedExtensions","FRONTMATTER_SCHEMA_ID","MockProvider","frontmatterSchema","loadConfig","makeProvider","parseConfig","providerSpecFor","resolveProviderIdentity","runFill","runQuery","frontmatterSchema","FRONTMATTER_SCHEMA_ID","MockProvider","DEFAULT_CONFIG_FILENAME","FILL_PROMPT_VERSION","FillCache","PROPOSAL_SCHEMA","REPORT_FORMATS","SUMMARY_FORMATS","assertProviderSelection","buildFillUser","cacheKey","constructProvider","fillCacheKey","graderFor","isValidProposal","listGraderKinds","loadConfig","parseConfig","parseFormat","providerSpecFor","registerGrader","render","renderCalibration","renderFill","renderList","resolveProviderIdentity","runCalibrate","runEvals","runFill","runList","runRun","selectProvider"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hawkeyexl/manni",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "One command line for documentation that is meant to be checked. `manni meta` validates the presence and format of document metadata (Markdown frontmatter and more) against JSON Schema, built for CI. Formerly docmeta.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"files": [
|
|
29
29
|
"dist",
|
|
30
30
|
"schemas",
|
|
31
|
+
"plugin",
|
|
31
32
|
"shapes",
|
|
32
33
|
"templates"
|
|
33
34
|
],
|
|
@@ -97,6 +98,7 @@
|
|
|
97
98
|
"@asciidoctor/core": "^3.0.4",
|
|
98
99
|
"@axe-core/playwright": "^4.13.0",
|
|
99
100
|
"@hawkeyexl/inference": "^0.4.0",
|
|
101
|
+
"@inquirer/prompts": "^7.10.1",
|
|
100
102
|
"@types/n3": "^1.26.3",
|
|
101
103
|
"@xmldom/xmldom": "^0.9.12",
|
|
102
104
|
"ajv": "^8.17.1",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "manni-tracevals-capture",
|
|
3
|
+
"description": "Records a session manifest at session start — sha256 of every instruction artifact plus the git SHA — so manni tracevals can tell exactly whether a skill or CLAUDE.md still says what the session followed.",
|
|
4
|
+
"version": "4.3.0",
|
|
5
|
+
"author": { "name": "hawkeyexl" },
|
|
6
|
+
"homepage": "https://hawkeyexl.github.io/manni/",
|
|
7
|
+
"repository": "https://github.com/hawkeyexl/manni",
|
|
8
|
+
"license": "MIT"
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "startup",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "npx --no @hawkeyexl/manni tracevals capture",
|
|
10
|
+
"timeout": 60,
|
|
11
|
+
"statusMessage": "Recording the session manifest…"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|