@aeptus/aexeo-emdash 0.8.19 → 0.9.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +96 -2
  2. package/INSTALL.md +113 -4
  3. package/README.md +12 -5
  4. package/dist/adapter.d.ts +30 -2
  5. package/dist/adapter.d.ts.map +1 -1
  6. package/dist/admin.d.ts.map +1 -1
  7. package/dist/admin.js +2 -2
  8. package/dist/configured.d.ts +6 -0
  9. package/dist/configured.d.ts.map +1 -1
  10. package/dist/configured.js +505 -70
  11. package/dist/content-evaluator.d.ts +14 -0
  12. package/dist/content-evaluator.d.ts.map +1 -0
  13. package/dist/content.d.ts +51 -0
  14. package/dist/content.d.ts.map +1 -0
  15. package/dist/content.js +365 -0
  16. package/dist/data-route.d.ts +3 -0
  17. package/dist/data-route.d.ts.map +1 -1
  18. package/dist/evaluator-sandbox.d.ts +1 -1
  19. package/dist/evaluator-sandbox.d.ts.map +1 -1
  20. package/dist/evaluator.d.ts +1 -1
  21. package/dist/evaluator.d.ts.map +1 -1
  22. package/dist/findings-view.d.ts +7 -2
  23. package/dist/findings-view.d.ts.map +1 -1
  24. package/dist/index.d.ts +15 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +99 -4
  27. package/dist/inventory.d.ts +51 -0
  28. package/dist/inventory.d.ts.map +1 -0
  29. package/dist/plugin.d.ts +30 -3
  30. package/dist/plugin.d.ts.map +1 -1
  31. package/dist/presence-check.d.ts +1 -0
  32. package/dist/presence-check.d.ts.map +1 -1
  33. package/dist/sandbox-entry.d.ts +2 -1
  34. package/dist/sandbox-entry.d.ts.map +1 -1
  35. package/dist/sandbox-entry.js +366 -81
  36. package/dist/sandbox.d.ts +2 -2
  37. package/dist/sidecar-url.d.ts.map +1 -1
  38. package/dist/sidecar.d.ts +7 -1
  39. package/dist/sidecar.d.ts.map +1 -1
  40. package/dist/types.d.ts +11 -4
  41. package/dist/types.d.ts.map +1 -1
  42. package/dist/version.d.ts +1 -1
  43. package/dist/version.d.ts.map +1 -1
  44. package/dist/wasm-init.d.ts +4 -0
  45. package/dist/wasm-init.d.ts.map +1 -1
  46. package/package.json +18 -7
  47. package/wasm/aexeo_emdash_bridge.d.ts +11 -0
  48. package/wasm/aexeo_emdash_bridge.js +1 -1
  49. package/wasm/aexeo_emdash_bridge_bg.d.ts +11 -0
  50. package/wasm/aexeo_emdash_bridge_bg.js +68 -0
  51. package/wasm/aexeo_emdash_bridge_bg.wasm +0 -0
  52. package/wasm/aexeo_emdash_bridge_bg.wasm.d.ts +2 -0
@@ -0,0 +1,14 @@
1
+ import type { ContentReport } from "./content.js";
2
+ import type { EvaluatorFn } from "./plugin.js";
3
+ import type { EmdashDocument } from "./types.js";
4
+ export interface ContentPresetOptions {
5
+ name: string;
6
+ sources?: Record<string, string>;
7
+ evidenceSources?: Record<string, string>;
8
+ byCollection?: Record<string, string>;
9
+ /** Restrict preset evaluation to these collections; site checks still run for all. */
10
+ collections?: readonly string[];
11
+ }
12
+ /** Add portable content findings to an existing evaluator without hiding skipped gates. */
13
+ export declare function withContentPreset(base: EvaluatorFn, preset: ContentPresetOptions | undefined, evaluate: (document: EmdashDocument, name: string, sources?: Record<string, string>, evidenceSources?: Record<string, string>) => Promise<ContentReport>): EvaluatorFn;
14
+ //# sourceMappingURL=content-evaluator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-evaluator.d.ts","sourceRoot":"","sources":["../src/content-evaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,sFAAsF;IACtF,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAED,2FAA2F;AAC3F,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,oBAAoB,GAAG,SAAS,EACxC,QAAQ,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC,aAAa,CAAC,GACvJ,WAAW,CAgCb"}
@@ -0,0 +1,51 @@
1
+ import type { EmdashDocument, Finding } from "./types.js";
2
+ export interface ContentGateResult {
3
+ gate_id: string;
4
+ status: "passed" | "failed" | "not_checked";
5
+ blocking: boolean;
6
+ scope: "document" | "collection" | "site";
7
+ required_capability: "text" | "source_text" | "metadata" | "headings" | "paragraphs" | "links" | "link_destinations" | "collection_metadata" | "site" | "extension" | "text_and_evidence";
8
+ findings: Finding[];
9
+ reason: string | null;
10
+ measurements?: Record<string, number>;
11
+ }
12
+ /** Coordinates inside the exact Portable Text snapshot sent for evaluation. */
13
+ export interface EmdashSourceLocation {
14
+ gate_id: string;
15
+ finding_index: number;
16
+ block_index: number;
17
+ span_index: number;
18
+ /** Zero-based UTF-16 code unit offset in the span text. */
19
+ utf16_offset: number;
20
+ }
21
+ export interface ContentReport {
22
+ preset: string;
23
+ input_id: string;
24
+ gates: ContentGateResult[];
25
+ summary?: {
26
+ passed: number;
27
+ failed: number;
28
+ not_checked: number;
29
+ blocking_failed: number;
30
+ blocking_not_checked: number;
31
+ };
32
+ applied_fixes: string[];
33
+ /** Omitted for collection reports; link findings point to the first marked span. */
34
+ source_locations?: EmdashSourceLocation[];
35
+ }
36
+ /** Local, opt-in aggregate metrics; contains no document text or identifiers. */
37
+ export interface ContentEvaluationTelemetry {
38
+ /** End-to-end wrapper duration, including serialization and WASM initialization. */
39
+ evaluation_ms: number;
40
+ source_locations_mapped: number;
41
+ /** Aggregate destination occurrences; omitted when the gate did not measure them. */
42
+ link_destinations?: {
43
+ checked: number;
44
+ invalid: number;
45
+ };
46
+ }
47
+ /** Evaluate a document locally using the built-in or supplied named TOML presets. */
48
+ export declare function evaluateContent(document: EmdashDocument, preset: string, sources?: Record<string, string>, evidenceSources?: Record<string, string>, onTelemetry?: (event: ContentEvaluationTelemetry) => void): Promise<ContentReport>;
49
+ /** Evaluate collection gates; callers must provide the complete collection. */
50
+ export declare function evaluateContentCollection(documents: EmdashDocument[], preset: string, sources?: Record<string, string>): Promise<ContentReport>;
51
+ //# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1D,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,aAAa,CAAC;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;IAC1C,mBAAmB,EAAE,MAAM,GAAG,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,GAAG,OAAO,GAAG,mBAAmB,GAAG,qBAAqB,GAAG,MAAM,GAAG,WAAW,GAAG,mBAAmB,CAAC;IAC1L,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,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,cAAc,EAAE,EAC3B,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACnC,OAAO,CAAC,aAAa,CAAC,CAExB"}
@@ -0,0 +1,365 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ // wasm/aexeo_emdash_bridge_bg.js
8
+ var aexeo_emdash_bridge_bg_exports = {};
9
+ __export(aexeo_emdash_bridge_bg_exports, {
10
+ __wbg_Error_960c155d3d49e4c2: () => __wbg_Error_960c155d3d49e4c2,
11
+ __wbg_error_a6fa202b58aa1cd3: () => __wbg_error_a6fa202b58aa1cd3,
12
+ __wbg_new_227d7c05414eb861: () => __wbg_new_227d7c05414eb861,
13
+ __wbg_set_wasm: () => __wbg_set_wasm,
14
+ __wbg_stack_3b0d974bbf31e44f: () => __wbg_stack_3b0d974bbf31e44f,
15
+ __wbindgen_init_externref_table: () => __wbindgen_init_externref_table,
16
+ evaluateContent: () => evaluateContent,
17
+ evaluateContentCollection: () => evaluateContentCollection,
18
+ evaluateDocuments: () => evaluateDocuments,
19
+ generateFactsPrompt: () => generateFactsPrompt,
20
+ scoreIntelligence: () => scoreIntelligence,
21
+ validateFactsManifest: () => validateFactsManifest
22
+ });
23
+ function evaluateContent(document_json, preset_name, sources_json, evidence_json) {
24
+ let deferred6_0;
25
+ let deferred6_1;
26
+ try {
27
+ const ptr0 = passStringToWasm0(document_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
28
+ const len0 = WASM_VECTOR_LEN;
29
+ const ptr1 = passStringToWasm0(preset_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
30
+ const len1 = WASM_VECTOR_LEN;
31
+ var ptr2 = isLikeNone(sources_json) ? 0 : passStringToWasm0(sources_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
32
+ var len2 = WASM_VECTOR_LEN;
33
+ var ptr3 = isLikeNone(evidence_json) ? 0 : passStringToWasm0(evidence_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
34
+ var len3 = WASM_VECTOR_LEN;
35
+ const ret = wasm.evaluateContent(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
36
+ var ptr5 = ret[0];
37
+ var len5 = ret[1];
38
+ if (ret[3]) {
39
+ ptr5 = 0;
40
+ len5 = 0;
41
+ throw takeFromExternrefTable0(ret[2]);
42
+ }
43
+ deferred6_0 = ptr5;
44
+ deferred6_1 = len5;
45
+ return getStringFromWasm0(ptr5, len5);
46
+ } finally {
47
+ wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
48
+ }
49
+ }
50
+ function evaluateContentCollection(documents_json, preset_name, sources_json) {
51
+ let deferred5_0;
52
+ let deferred5_1;
53
+ try {
54
+ const ptr0 = passStringToWasm0(documents_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
55
+ const len0 = WASM_VECTOR_LEN;
56
+ const ptr1 = passStringToWasm0(preset_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
57
+ const len1 = WASM_VECTOR_LEN;
58
+ var ptr2 = isLikeNone(sources_json) ? 0 : passStringToWasm0(sources_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
59
+ var len2 = WASM_VECTOR_LEN;
60
+ const ret = wasm.evaluateContentCollection(ptr0, len0, ptr1, len1, ptr2, len2);
61
+ var ptr4 = ret[0];
62
+ var len4 = ret[1];
63
+ if (ret[3]) {
64
+ ptr4 = 0;
65
+ len4 = 0;
66
+ throw takeFromExternrefTable0(ret[2]);
67
+ }
68
+ deferred5_0 = ptr4;
69
+ deferred5_1 = len4;
70
+ return getStringFromWasm0(ptr4, len4);
71
+ } finally {
72
+ wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
73
+ }
74
+ }
75
+ function evaluateDocuments(documents_json, config_json) {
76
+ let deferred4_0;
77
+ let deferred4_1;
78
+ try {
79
+ const ptr0 = passStringToWasm0(documents_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
80
+ const len0 = WASM_VECTOR_LEN;
81
+ var ptr1 = isLikeNone(config_json) ? 0 : passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
82
+ var len1 = WASM_VECTOR_LEN;
83
+ const ret = wasm.evaluateDocuments(ptr0, len0, ptr1, len1);
84
+ var ptr3 = ret[0];
85
+ var len3 = ret[1];
86
+ if (ret[3]) {
87
+ ptr3 = 0;
88
+ len3 = 0;
89
+ throw takeFromExternrefTable0(ret[2]);
90
+ }
91
+ deferred4_0 = ptr3;
92
+ deferred4_1 = len3;
93
+ return getStringFromWasm0(ptr3, len3);
94
+ } finally {
95
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
96
+ }
97
+ }
98
+ function generateFactsPrompt(documents_json) {
99
+ let deferred3_0;
100
+ let deferred3_1;
101
+ try {
102
+ const ptr0 = passStringToWasm0(documents_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
103
+ const len0 = WASM_VECTOR_LEN;
104
+ const ret = wasm.generateFactsPrompt(ptr0, len0);
105
+ var ptr2 = ret[0];
106
+ var len2 = ret[1];
107
+ if (ret[3]) {
108
+ ptr2 = 0;
109
+ len2 = 0;
110
+ throw takeFromExternrefTable0(ret[2]);
111
+ }
112
+ deferred3_0 = ptr2;
113
+ deferred3_1 = len2;
114
+ return getStringFromWasm0(ptr2, len2);
115
+ } finally {
116
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
117
+ }
118
+ }
119
+ function scoreIntelligence(documents_json, manifest_json) {
120
+ let deferred4_0;
121
+ let deferred4_1;
122
+ try {
123
+ const ptr0 = passStringToWasm0(documents_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
124
+ const len0 = WASM_VECTOR_LEN;
125
+ var ptr1 = isLikeNone(manifest_json) ? 0 : passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
126
+ var len1 = WASM_VECTOR_LEN;
127
+ const ret = wasm.scoreIntelligence(ptr0, len0, ptr1, len1);
128
+ var ptr3 = ret[0];
129
+ var len3 = ret[1];
130
+ if (ret[3]) {
131
+ ptr3 = 0;
132
+ len3 = 0;
133
+ throw takeFromExternrefTable0(ret[2]);
134
+ }
135
+ deferred4_0 = ptr3;
136
+ deferred4_1 = len3;
137
+ return getStringFromWasm0(ptr3, len3);
138
+ } finally {
139
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
140
+ }
141
+ }
142
+ function validateFactsManifest(manifest_json, documents_json) {
143
+ let deferred4_0;
144
+ let deferred4_1;
145
+ try {
146
+ const ptr0 = passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
147
+ const len0 = WASM_VECTOR_LEN;
148
+ const ptr1 = passStringToWasm0(documents_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
149
+ const len1 = WASM_VECTOR_LEN;
150
+ const ret = wasm.validateFactsManifest(ptr0, len0, ptr1, len1);
151
+ var ptr3 = ret[0];
152
+ var len3 = ret[1];
153
+ if (ret[3]) {
154
+ ptr3 = 0;
155
+ len3 = 0;
156
+ throw takeFromExternrefTable0(ret[2]);
157
+ }
158
+ deferred4_0 = ptr3;
159
+ deferred4_1 = len3;
160
+ return getStringFromWasm0(ptr3, len3);
161
+ } finally {
162
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
163
+ }
164
+ }
165
+ function __wbg_Error_960c155d3d49e4c2(arg0, arg1) {
166
+ const ret = Error(getStringFromWasm0(arg0, arg1));
167
+ return ret;
168
+ }
169
+ function __wbg_error_a6fa202b58aa1cd3(arg0, arg1) {
170
+ let deferred0_0;
171
+ let deferred0_1;
172
+ try {
173
+ deferred0_0 = arg0;
174
+ deferred0_1 = arg1;
175
+ console.error(getStringFromWasm0(arg0, arg1));
176
+ } finally {
177
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
178
+ }
179
+ }
180
+ function __wbg_new_227d7c05414eb861() {
181
+ const ret = new Error();
182
+ return ret;
183
+ }
184
+ function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
185
+ const ret = arg1.stack;
186
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
187
+ const len1 = WASM_VECTOR_LEN;
188
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
189
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
190
+ }
191
+ function __wbindgen_init_externref_table() {
192
+ const table = wasm.__wbindgen_externrefs;
193
+ const offset = table.grow(4);
194
+ table.set(0, void 0);
195
+ table.set(offset + 0, void 0);
196
+ table.set(offset + 1, null);
197
+ table.set(offset + 2, true);
198
+ table.set(offset + 3, false);
199
+ }
200
+ var cachedDataViewMemory0 = null;
201
+ function getDataViewMemory0() {
202
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
203
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
204
+ }
205
+ return cachedDataViewMemory0;
206
+ }
207
+ function getStringFromWasm0(ptr, len) {
208
+ ptr = ptr >>> 0;
209
+ return decodeText(ptr, len);
210
+ }
211
+ var cachedUint8ArrayMemory0 = null;
212
+ function getUint8ArrayMemory0() {
213
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
214
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
215
+ }
216
+ return cachedUint8ArrayMemory0;
217
+ }
218
+ function isLikeNone(x) {
219
+ return x === void 0 || x === null;
220
+ }
221
+ function passStringToWasm0(arg, malloc, realloc) {
222
+ if (realloc === void 0) {
223
+ const buf = cachedTextEncoder.encode(arg);
224
+ const ptr2 = malloc(buf.length, 1) >>> 0;
225
+ getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
226
+ WASM_VECTOR_LEN = buf.length;
227
+ return ptr2;
228
+ }
229
+ let len = arg.length;
230
+ let ptr = malloc(len, 1) >>> 0;
231
+ const mem = getUint8ArrayMemory0();
232
+ let offset = 0;
233
+ for (; offset < len; offset++) {
234
+ const code = arg.charCodeAt(offset);
235
+ if (code > 127) break;
236
+ mem[ptr + offset] = code;
237
+ }
238
+ if (offset !== len) {
239
+ if (offset !== 0) {
240
+ arg = arg.slice(offset);
241
+ }
242
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
243
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
244
+ const ret = cachedTextEncoder.encodeInto(arg, view);
245
+ offset += ret.written;
246
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
247
+ }
248
+ WASM_VECTOR_LEN = offset;
249
+ return ptr;
250
+ }
251
+ function takeFromExternrefTable0(idx) {
252
+ const value = wasm.__wbindgen_externrefs.get(idx);
253
+ wasm.__externref_table_dealloc(idx);
254
+ return value;
255
+ }
256
+ var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
257
+ cachedTextDecoder.decode();
258
+ var MAX_SAFARI_DECODE_BYTES = 2146435072;
259
+ var numBytesDecoded = 0;
260
+ function decodeText(ptr, len) {
261
+ numBytesDecoded += len;
262
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
263
+ cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
264
+ cachedTextDecoder.decode();
265
+ numBytesDecoded = len;
266
+ }
267
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
268
+ }
269
+ var cachedTextEncoder = new TextEncoder();
270
+ if (!("encodeInto" in cachedTextEncoder)) {
271
+ cachedTextEncoder.encodeInto = function(arg, view) {
272
+ const buf = cachedTextEncoder.encode(arg);
273
+ view.set(buf);
274
+ return {
275
+ read: arg.length,
276
+ written: buf.length
277
+ };
278
+ };
279
+ }
280
+ var WASM_VECTOR_LEN = 0;
281
+ var wasm;
282
+ function __wbg_set_wasm(val) {
283
+ wasm = val;
284
+ }
285
+
286
+ // src/wasm-init.ts
287
+ var WASM_SPECIFIER = "../wasm/aexeo_emdash_bridge_bg.wasm";
288
+ var initialized = false;
289
+ var cachedModule = null;
290
+ async function loadBridgeModule() {
291
+ if (cachedModule !== null) {
292
+ return cachedModule;
293
+ }
294
+ try {
295
+ const mod = await import(WASM_SPECIFIER);
296
+ if (mod.default instanceof WebAssembly.Module) {
297
+ cachedModule = mod.default;
298
+ return cachedModule;
299
+ }
300
+ } catch {
301
+ }
302
+ const wasmUrl = new URL(WASM_SPECIFIER, import.meta.url);
303
+ if (wasmUrl.protocol === "file:") {
304
+ const [{ readFile }, { fileURLToPath }] = await Promise.all([
305
+ import("node:fs/promises"),
306
+ import("node:url")
307
+ ]);
308
+ const bytes = await readFile(fileURLToPath(wasmUrl));
309
+ cachedModule = await WebAssembly.compile(bytes);
310
+ return cachedModule;
311
+ }
312
+ const response = await fetch(wasmUrl);
313
+ cachedModule = await WebAssembly.compileStreaming(response);
314
+ return cachedModule;
315
+ }
316
+ async function ensureInitialized() {
317
+ if (initialized) {
318
+ return;
319
+ }
320
+ const bridgeModule = await loadBridgeModule();
321
+ const instance = new WebAssembly.Instance(bridgeModule, {
322
+ "./aexeo_emdash_bridge_bg.js": aexeo_emdash_bridge_bg_exports
323
+ });
324
+ __wbg_set_wasm(instance.exports);
325
+ instance.exports.__wbindgen_start();
326
+ initialized = true;
327
+ }
328
+ async function evaluateContent2(documentJson, presetName, sourcesJson, evidenceJson) {
329
+ await ensureInitialized();
330
+ return evaluateContent(documentJson, presetName, sourcesJson, evidenceJson);
331
+ }
332
+ async function evaluateContentCollection2(documentsJson, presetName, sourcesJson) {
333
+ await ensureInitialized();
334
+ return evaluateContentCollection(documentsJson, presetName, sourcesJson);
335
+ }
336
+
337
+ // src/content.ts
338
+ async function evaluateContent3(document, preset, sources = {}, evidenceSources, onTelemetry) {
339
+ const started = onTelemetry ? performance.now() : 0;
340
+ const documentJson = JSON.stringify(document);
341
+ const sourcesJson = JSON.stringify(sources);
342
+ const result = evidenceSources === void 0 ? await evaluateContent2(documentJson, preset, sourcesJson) : await evaluateContent2(documentJson, preset, sourcesJson, JSON.stringify(evidenceSources));
343
+ const report = JSON.parse(result);
344
+ if (onTelemetry) {
345
+ const event = { evaluation_ms: performance.now() - started, source_locations_mapped: report.source_locations?.length ?? 0 };
346
+ for (const gate of report.gates) {
347
+ const checked = gate.measurements?.checked_destinations;
348
+ const invalid = gate.measurements?.invalid_destinations;
349
+ if (checked !== void 0 && invalid !== void 0) {
350
+ event.link_destinations ??= { checked: 0, invalid: 0 };
351
+ event.link_destinations.checked += checked;
352
+ event.link_destinations.invalid += invalid;
353
+ }
354
+ }
355
+ onTelemetry(event);
356
+ }
357
+ return report;
358
+ }
359
+ async function evaluateContentCollection3(documents, preset, sources = {}) {
360
+ return JSON.parse(await evaluateContentCollection2(JSON.stringify(documents), preset, JSON.stringify(sources)));
361
+ }
362
+ export {
363
+ evaluateContent3 as evaluateContent,
364
+ evaluateContentCollection3 as evaluateContentCollection
365
+ };
@@ -1,3 +1,4 @@
1
+ import type { CustomBlockMappings } from "./adapter.js";
1
2
  import type { EvaluatorFn, RefreshSummary, SandboxCtx } from "./plugin.js";
2
3
  import type { Finding } from "./types.js";
3
4
  export interface FindingsPayload {
@@ -44,6 +45,8 @@ export interface FindingRow {
44
45
  layers?: import("./types.js").RuleLayers;
45
46
  }
46
47
  interface DataRouteOptions {
48
+ blockMappings?: CustomBlockMappings | undefined;
49
+ contentFieldsByCollection?: Record<string, readonly string[]> | undefined;
47
50
  collections: readonly string[];
48
51
  evaluator: EvaluatorFn;
49
52
  refresh: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"data-route.d.ts","sourceRoot":"","sources":["../src/data-route.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,UAAU,EAEX,MAAM,aAAa,CAAC;AAQrB,OAAO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I,CAAC;CAChC,CAAC,CAqBD;AA4ID,wBAAsB,4BAA4B,CAChD,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,IAAI,CAAC,CAGf"}
@@ -1,6 +1,6 @@
1
1
  import type { EmdashDocument, Finding, SiteIntelligenceScore } from "./types.js";
2
2
  export declare function evaluate(_documents: readonly EmdashDocument[]): Promise<Finding[]>;
3
- export declare function scoreSite(_documents: readonly EmdashDocument[]): Promise<SiteIntelligenceScore>;
3
+ export declare function scoreSite(_documents: readonly EmdashDocument[]): Promise<SiteIntelligenceScore | null>;
4
4
  export declare function errorFindings(findings: readonly Finding[]): Finding[];
5
5
  export declare function findingsByRoute(findings: readonly Finding[]): Map<string, Finding[]>;
6
6
  //# sourceMappingURL=evaluator-sandbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"evaluator-sandbox.d.ts","sourceRoot":"","sources":["../src/evaluator-sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAkBpB,wBAAsB,QAAQ,CAC5B,UAAU,EAAE,SAAS,cAAc,EAAE,GACpC,OAAO,CAAC,OAAO,EAAE,CAAC,CAEpB;AAED,wBAAsB,SAAS,CAC7B,UAAU,EAAE,SAAS,cAAc,EAAE,GACpC,OAAO,CAAC,qBAAqB,CAAC,CAUhC;AAQD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,CAErE;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,OAAO,EAAE,GAC3B,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAWxB"}
1
+ {"version":3,"file":"evaluator-sandbox.d.ts","sourceRoot":"","sources":["../src/evaluator-sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAkBpB,wBAAsB,QAAQ,CAC5B,UAAU,EAAE,SAAS,cAAc,EAAE,GACpC,OAAO,CAAC,OAAO,EAAE,CAAC,CAEpB;AAED,wBAAsB,SAAS,CAC7B,UAAU,EAAE,SAAS,cAAc,EAAE,GACpC,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAEvC;AAQD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,CAErE;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,OAAO,EAAE,GAC3B,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAWxB"}
@@ -5,5 +5,5 @@ export interface EvaluateOptions {
5
5
  export declare function evaluate(documents: readonly EmdashDocument[], options?: EvaluateOptions): Promise<Finding[]>;
6
6
  export declare function errorFindings(findings: readonly Finding[]): Finding[];
7
7
  export declare function findingsByRoute(findings: readonly Finding[]): Map<string, Finding[]>;
8
- export declare function scoreSite(documents: readonly EmdashDocument[]): Promise<SiteIntelligenceScore>;
8
+ export declare function scoreSite(documents: readonly EmdashDocument[]): Promise<SiteIntelligenceScore | null>;
9
9
  //# sourceMappingURL=evaluator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../src/evaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAapB,MAAM,WAAW,eAAe;IAG9B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,QAAQ,CAC5B,SAAS,EAAE,SAAS,cAAc,EAAE,EACpC,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,OAAO,EAAE,CAAC,CAIpB;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,CAErE;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,OAAO,EAAE,GAC3B,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAWxB;AAKD,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,cAAc,EAAE,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAGhC"}
1
+ {"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../src/evaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAapB,MAAM,WAAW,eAAe;IAG9B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,QAAQ,CAC5B,SAAS,EAAE,SAAS,cAAc,EAAE,EACpC,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,OAAO,EAAE,CAAC,CAIpB;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,CAErE;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,OAAO,EAAE,GAC3B,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAWxB;AAMD,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,cAAc,EAAE,GACnC,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAGvC"}
@@ -1,3 +1,4 @@
1
+ import type { CustomBlockMappings } from "./adapter.js";
1
2
  import type { EmdashDocument, Finding, SiteIntelligenceScore } from "./types.js";
2
3
  import type { EvaluatorFn, KvNamespace, SandboxCtx } from "./plugin.js";
3
4
  import type { SuppressionFilter } from "./suppressions.js";
@@ -78,7 +79,7 @@ export interface AdminViewTuning {
78
79
  * manifest-aware in-process scorer; sandbox mode passes the
79
80
  * sidecar-backed `scoreSite`.
80
81
  */
81
- score: (documents: readonly EmdashDocument[], kv: KvNamespace) => Promise<SiteIntelligenceScore>;
82
+ score: (documents: readonly EmdashDocument[], kv: KvNamespace) => Promise<SiteIntelligenceScore | null>;
82
83
  /**
83
84
  * Label for the widget's truth-consistency stat. Configured mode badges
84
85
  * it with the real signal source so a schema-only 60 doesn't read the
@@ -87,6 +88,8 @@ export interface AdminViewTuning {
87
88
  truthLabel: (score: SiteIntelligenceScore) => string;
88
89
  }
89
90
  export interface RefreshOptions {
91
+ blockMappings?: CustomBlockMappings | undefined;
92
+ contentFieldsByCollection?: Record<string, readonly string[]> | undefined;
90
93
  /**
91
94
  * Host context. `evaluateAndPersistAll` needs kv/http/content/log, and
92
95
  * the follow-up `renderFindingsPage` needs kv.
@@ -128,7 +131,9 @@ export declare function severityFirst(a: Finding, b: Finding): number;
128
131
  export declare function uniqueRoutes(rows: FindingRow[]): string[];
129
132
  export declare function renderFindingsPage(kv: KvNamespace, tuning: AdminViewTuning): Promise<BlockResponse>;
130
133
  export declare function findingsTable(rows: FindingRow[]): unknown;
131
- export declare function renderScoreWidget(kv: KvNamespace, tuning: AdminViewTuning): Promise<BlockResponse>;
134
+ export declare function renderScoreWidget(kv: KvNamespace, tuning: AdminViewTuning, log?: {
135
+ error(message: string, data?: unknown): void;
136
+ }): Promise<BlockResponse>;
132
137
  export declare function topBlockersLine(score: SiteIntelligenceScore): string;
133
138
  export declare function renderDocumentPanel(kv: KvNamespace, route?: string): Promise<BlockResponse>;
134
139
  export declare function documentFindingsTable(findings: Finding[]): unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"findings-view.d.ts","sourceRoot":"","sources":["../src/findings-view.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,qBAAqB,EACtB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EAEX,UAAU,EACX,MAAM,aAAa,CAAC;AAMrB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAK3D,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnC;IACE,IAAI,E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EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,GACrD,OAAO,CAAC,aAAa,CAAC,CA8DxB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,qBAAqB,GAAG,MAAM,CAMpE;AAED,wBAAsB,mBAAmB,CACvC,EAAE,EAAE,WAAW,EACf,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,aAAa,CAAC,CAiCxB;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAmBlE;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAOpD"}
package/dist/index.d.ts CHANGED
@@ -18,7 +18,19 @@ export interface ConfiguredPluginDescriptor {
18
18
  title?: string;
19
19
  }[];
20
20
  }
21
+ import type { CustomBlockMappings } from "./adapter.js";
22
+ export type { CustomBlockMappings, CustomBlockField } from "./adapter.js";
21
23
  export interface AexeoPluginOptions {
24
+ /** Ordered field mappings for project-specific blocks. */
25
+ blockMappings?: CustomBlockMappings;
26
+ contentFieldsByCollection?: Record<string, readonly string[]>;
27
+ /** Add a portable content preset to configured-mode evaluation. */
28
+ contentPreset?: {
29
+ name: string;
30
+ sources?: Record<string, string>;
31
+ byCollection?: Record<string, string>;
32
+ collections?: readonly string[];
33
+ };
22
34
  /**
23
35
  * emdash collections the plugin sweeps when an admin clicks
24
36
  * Refresh on the findings page. Order doesn't matter; the sweep
@@ -96,7 +108,7 @@ export interface AexeoPluginOptions {
96
108
  *
97
109
  * Suppressions are plugin-only by design. The CLI's `check` is the
98
110
  * canonical strict audit; if you want to silence findings at the
99
- * CLI layer, use `aexeo.toml`'s `[ignore]` block instead. The two
111
+ * CLI layer, use `ignore_paths` under `[policy]` in `aexeo.toml` instead. The two
100
112
  * surfaces serve different audiences: the plugin is editorial
101
113
  * workflow, the CLI is build-gating.
102
114
  */
@@ -105,4 +117,6 @@ export interface AexeoPluginOptions {
105
117
  export type { Suppression } from "./suppressions.js";
106
118
  import type { Suppression } from "./suppressions.js";
107
119
  export declare function aexeoPlugin(options?: AexeoPluginOptions): ConfiguredPluginDescriptor;
120
+ export { exportLinkInventory } from "./inventory.js";
121
+ export type { LinkInventoryDisposition, LinkInventoryExport, LinkInventoryIdentity, LinkInventoryPage } from "./inventory.js";
108
122
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAYtB,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IAOnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,UAAU,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACvD,YAAY,EAAE,SAAS;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACxE;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEhC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEvC;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,SAAS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