@aeptus/aexeo-emdash 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +116 -1
- package/dist/admin/Facts.d.ts +3 -0
- package/dist/admin/Facts.d.ts.map +1 -0
- package/dist/admin.d.ts +2 -0
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +327 -49
- package/dist/configured.d.ts +8 -0
- package/dist/configured.d.ts.map +1 -1
- package/dist/configured.js +447 -109
- package/dist/data-route.d.ts +2 -0
- package/dist/data-route.d.ts.map +1 -1
- package/dist/facts-route.d.ts +7 -0
- package/dist/facts-route.d.ts.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/plugin.d.ts +5 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/sandbox-entry.js +6 -2
- package/dist/sandbox.d.ts.map +1 -1
- package/dist/suppressions.d.ts +10 -0
- package/dist/suppressions.d.ts.map +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/wasm-init.d.ts +3 -1
- package/dist/wasm-init.d.ts.map +1 -1
- package/package.json +4 -3
- package/wasm/aexeo_emdash_bridge.d.ts +16 -1
- package/wasm/aexeo_emdash_bridge.js +1 -1
- package/wasm/aexeo_emdash_bridge_bg.d.ts +12 -3
- package/wasm/aexeo_emdash_bridge_bg.js +65 -2
- package/wasm/aexeo_emdash_bridge_bg.wasm +0 -0
- package/wasm/aexeo_emdash_bridge_bg.wasm.d.ts +13 -11
package/dist/data-route.d.ts.map
CHANGED
|
@@ -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,aAA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EAAE,CAAC;IAC/B,SAAS,EAAE,WAAW,CAAC;IAIvB,OAAO,EAAE,OAAO,CAAC;IAIjB,iBAAiB,CAAC,EAAE,OAAO,mBAAmB,EAAE,iBAAiB,CAAC;CACnE;AAED,wBAAsB,eAAe,CACnC,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC;IACT,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;CAChC,CAAC,CAmBD;AAgGD,wBAAsB,4BAA4B,CAChD,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,IAAI,CAAC,CAGf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facts-route.d.ts","sourceRoot":"","sources":["../src/facts-route.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAa9C,UAAU,YAAa,SAAQ,UAAU;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAmB1E"}
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,36 @@ export interface SeogeoPluginOptions {
|
|
|
40
40
|
* add collections later.
|
|
41
41
|
*/
|
|
42
42
|
collections?: readonly string[];
|
|
43
|
+
/**
|
|
44
|
+
* Editor-workflow suppressions. Each rule silences findings that
|
|
45
|
+
* match the route pattern (glob) AND/OR are in the rule-id set.
|
|
46
|
+
* Applied before findings are persisted to KV — suppressed findings
|
|
47
|
+
* never reach the dashboard, /findings, or the per-document panel.
|
|
48
|
+
*
|
|
49
|
+
* seogeoPlugin({
|
|
50
|
+
* suppressions: [
|
|
51
|
+
* { routePattern: "/privacy", ruleIds: ["RULE001"] },
|
|
52
|
+
* { routePattern: "/fr-fr/**", ruleIds: ["RULE002"] },
|
|
53
|
+
* { ruleIds: ["RULE999"] }, // applies to every route
|
|
54
|
+
* ],
|
|
55
|
+
* })
|
|
56
|
+
*
|
|
57
|
+
* Glob syntax: `*` matches any chars except `/`; `**` matches across
|
|
58
|
+
* `/`; `?` matches one char except `/`. Patterns are anchored.
|
|
59
|
+
*
|
|
60
|
+
* Empty rules (`{}` with neither field set) are rejected at plugin
|
|
61
|
+
* construction — that's a kill-switch for all findings everywhere
|
|
62
|
+
* and almost certainly an editor mistake.
|
|
63
|
+
*
|
|
64
|
+
* Suppressions are plugin-only by design. The CLI's `check` is the
|
|
65
|
+
* canonical strict audit; if you want to silence findings at the
|
|
66
|
+
* CLI layer, use `seogeo.toml`'s `[ignore]` block instead. The two
|
|
67
|
+
* surfaces serve different audiences: the plugin is editorial
|
|
68
|
+
* workflow, the CLI is build-gating.
|
|
69
|
+
*/
|
|
70
|
+
suppressions?: readonly Suppression[];
|
|
43
71
|
}
|
|
72
|
+
export type { Suppression } from "./suppressions.js";
|
|
73
|
+
import type { Suppression } from "./suppressions.js";
|
|
44
74
|
export declare function seogeoPlugin(options?: SeogeoPluginOptions): ConfiguredPluginDescriptor;
|
|
45
75
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,GACvB,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,mBAAmB;IAClC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,YAAY,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;CACvC;AAED,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,wBAAgB,YAAY,CAC1B,OAAO,GAAE,mBAAwB,GAChC,0BAA0B,CAkD5B"}
|
package/dist/index.js
CHANGED
|
@@ -22,12 +22,15 @@ function buildAllowedHosts(evaluatorHost) {
|
|
|
22
22
|
return hosts;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
// src/version.ts
|
|
26
|
+
var PACKAGE_VERSION = "0.4.0";
|
|
27
|
+
|
|
25
28
|
// src/sandbox.ts
|
|
26
29
|
function seogeoPluginSandboxed(options = {}) {
|
|
27
30
|
const evaluatorHost = options.evaluatorHost ?? process.env.SEOGEO_EVALUATOR_HOST ?? null;
|
|
28
31
|
return {
|
|
29
32
|
id: "aexeo-seogeo",
|
|
30
|
-
version:
|
|
33
|
+
version: PACKAGE_VERSION,
|
|
31
34
|
// Subpath export of this same package; must match package.json
|
|
32
35
|
// `exports["./sandbox"]`.
|
|
33
36
|
entrypoint: "@aeptus/aexeo-emdash/sandbox",
|
|
@@ -52,7 +55,7 @@ function seogeoPluginSandboxed(options = {}) {
|
|
|
52
55
|
function seogeoPlugin(options = {}) {
|
|
53
56
|
return {
|
|
54
57
|
id: "aexeo-seogeo",
|
|
55
|
-
version:
|
|
58
|
+
version: PACKAGE_VERSION,
|
|
56
59
|
// Subpath import resolved by the consumer's bundler at build
|
|
57
60
|
// time — must match the package.json `exports["./configured"]`
|
|
58
61
|
// entry.
|
|
@@ -72,7 +75,8 @@ function seogeoPlugin(options = {}) {
|
|
|
72
75
|
// receives. Spread to a plain object so readonly arrays survive
|
|
73
76
|
// the structured-clone semantics of that codegen.
|
|
74
77
|
options: {
|
|
75
|
-
...options.collections === void 0 ? {} : { collections: [...options.collections] }
|
|
78
|
+
...options.collections === void 0 ? {} : { collections: [...options.collections] },
|
|
79
|
+
...options.suppressions === void 0 ? {} : { suppressions: options.suppressions.map((rule) => ({ ...rule })) }
|
|
76
80
|
},
|
|
77
81
|
capabilities: [
|
|
78
82
|
"read:content",
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SuppressionFilter } from "./suppressions.js";
|
|
1
2
|
import type { EmdashDocument, Finding } from "./types.js";
|
|
2
3
|
import { type EmdashContentItem, type EmdashContentMeta } from "./adapter.js";
|
|
3
4
|
import type { SidecarHttp } from "./sidecar.js";
|
|
@@ -58,7 +59,7 @@ export interface ContentAfterSaveEvent {
|
|
|
58
59
|
isNew: boolean;
|
|
59
60
|
}
|
|
60
61
|
export declare function handleAfterSave(_event: ContentAfterSaveEvent, _ctx: SandboxCtx): Promise<void>;
|
|
61
|
-
export declare function handleAfterSaveConfigured(event: ContentAfterSaveEvent, ctx: SandboxCtx, evaluator: EvaluatorFn): Promise<void>;
|
|
62
|
+
export declare function handleAfterSaveConfigured(event: ContentAfterSaveEvent, ctx: SandboxCtx, evaluator: EvaluatorFn, suppressionFilter?: SuppressionFilter): Promise<void>;
|
|
62
63
|
export declare const DEFAULT_COLLECTIONS: readonly ["posts", "pages"];
|
|
63
64
|
export interface RefreshSummary {
|
|
64
65
|
documentsScanned: number;
|
|
@@ -78,9 +79,12 @@ export type EvaluatorFn = (documents: readonly EmdashDocument[]) => Promise<Eval
|
|
|
78
79
|
export declare function evaluateAndPersistAll(ctx: SandboxCtx, options: {
|
|
79
80
|
collections?: readonly string[];
|
|
80
81
|
evaluator: EvaluatorFn;
|
|
82
|
+
suppressionFilter?: SuppressionFilter;
|
|
81
83
|
}): Promise<RefreshSummary>;
|
|
82
84
|
export declare function findingsKey(route: string): string;
|
|
83
85
|
export declare function documentKey(route: string): string;
|
|
86
|
+
export declare const FACTS_KEY = "facts:current";
|
|
87
|
+
export declare function readStoredFacts(kv: KvNamespace): Promise<unknown | null>;
|
|
84
88
|
export declare function readAllDocuments(kv: KvNamespace): Promise<EmdashDocument[]>;
|
|
85
89
|
export declare function readAllStoredDocuments(kv: KvNamespace): Promise<StoredDocument[]>;
|
|
86
90
|
export declare function readFindings(kv: KvNamespace, route: string): Promise<Finding[]>;
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EAGvB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAOhD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,CAAC;IACzB,IAAI,EAAE,iBAAiB,CAAC;CACzB;A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OAAO,GAAG,IAAI,CAAC,CAGzB;AAED,wBAAsB,gBAAgB,CACpC,EAAE,EAAE,WAAW,GACd,OAAO,CAAC,cAAc,EAAE,CAAC,CAE3B;AAED,wBAAsB,sBAAsB,CAC1C,EAAE,EAAE,WAAW,GACd,OAAO,CAAC,cAAc,EAAE,CAAC,CA+B3B;AAED,wBAAsB,YAAY,CAChC,EAAE,EAAE,WAAW,EACf,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,OAAO,EAAE,CAAC,CAMpB"}
|
package/dist/sandbox-entry.js
CHANGED
|
@@ -89,6 +89,7 @@ async function handleAfterSave(_event, _ctx) {
|
|
|
89
89
|
var DEFAULT_COLLECTIONS = ["posts", "pages"];
|
|
90
90
|
async function evaluateAndPersistAll(ctx, options) {
|
|
91
91
|
const collections = options.collections ?? DEFAULT_COLLECTIONS;
|
|
92
|
+
const suppressionFilter = options.suppressionFilter;
|
|
92
93
|
const { kv, log } = ctx;
|
|
93
94
|
const summary = {
|
|
94
95
|
documentsScanned: 0,
|
|
@@ -146,11 +147,14 @@ async function evaluateAndPersistAll(ctx, options) {
|
|
|
146
147
|
list.push(finding);
|
|
147
148
|
findingsByRoute2.set(bucket, list);
|
|
148
149
|
}
|
|
150
|
+
let totalAfterSuppression = 0;
|
|
149
151
|
for (const [route, findings] of findingsByRoute2) {
|
|
150
|
-
|
|
152
|
+
const filtered = suppressionFilter === void 0 ? findings : suppressionFilter.apply(route, findings);
|
|
153
|
+
await kv.set(findingsKey(route), { route, findings: filtered });
|
|
151
154
|
summary.routesUpdated += 1;
|
|
155
|
+
totalAfterSuppression += filtered.length;
|
|
152
156
|
}
|
|
153
|
-
summary.totalFindings =
|
|
157
|
+
summary.totalFindings = totalAfterSuppression;
|
|
154
158
|
return summary;
|
|
155
159
|
}
|
|
156
160
|
function findingsKey(route) {
|
package/dist/sandbox.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AA0BA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IAGnB,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,UAAU,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAGxC,YAAY,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC5C,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAeD,MAAM,WAAW,sBAAsB;IAgBrC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,sBAA2B,GACnC,yBAAyB,CAwB3B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Finding } from "./types.js";
|
|
2
|
+
export interface Suppression {
|
|
3
|
+
routePattern?: string;
|
|
4
|
+
ruleIds?: readonly string[];
|
|
5
|
+
}
|
|
6
|
+
export interface SuppressionFilter {
|
|
7
|
+
apply(route: string, findings: readonly Finding[]): Finding[];
|
|
8
|
+
}
|
|
9
|
+
export declare function compileSuppressions(rules: readonly Suppression[] | undefined): SuppressionFilter;
|
|
10
|
+
//# sourceMappingURL=suppressions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppressions.d.ts","sourceRoot":"","sources":["../src/suppressions.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAkB1C,MAAM,WAAW,WAAW;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAID,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC;CAC/D;AASD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,WAAW,EAAE,GAAG,SAAS,GACxC,iBAAiB,CAoCnB"}
|
package/dist/types.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export interface Finding {
|
|
|
48
48
|
suggestion: string | null;
|
|
49
49
|
scope: FindingScope;
|
|
50
50
|
}
|
|
51
|
+
export type StructuredTruthSource = "manifest" | "schema" | "schema_and_manifest" | "none";
|
|
51
52
|
export interface SiteIntelligenceScore {
|
|
52
53
|
citation_readiness_score: number;
|
|
53
54
|
truth_consistency_score: number;
|
|
@@ -56,6 +57,7 @@ export interface SiteIntelligenceScore {
|
|
|
56
57
|
overall_score: number;
|
|
57
58
|
route_scores: unknown[];
|
|
58
59
|
blockers: IntelligenceBlocker[];
|
|
60
|
+
structured_truth_source?: StructuredTruthSource;
|
|
59
61
|
}
|
|
60
62
|
export interface IntelligenceBlocker {
|
|
61
63
|
rule_id?: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,YAAY,CAAC;AAEjB,MAAM,M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AAE,mBAAmB,EAAE,CAAC;IAChC,uBAAuB,CAAC,EAAE,qBAAqB,CAAC;CACjD;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,UAAU,CAAC"}
|
package/dist/wasm-init.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare function evaluateDocuments(documentsJson: string, configJson?: string | null): Promise<string>;
|
|
2
|
-
export declare function scoreIntelligence(documentsJson: string): Promise<string>;
|
|
2
|
+
export declare function scoreIntelligence(documentsJson: string, manifestJson?: string | null): Promise<string>;
|
|
3
|
+
export declare function generateFactsPrompt(documentsJson: string): Promise<string>;
|
|
4
|
+
export declare function validateFactsManifest(manifestJson: string, documentsJson: string): Promise<string>;
|
|
3
5
|
//# sourceMappingURL=wasm-init.d.ts.map
|
package/dist/wasm-init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasm-init.d.ts","sourceRoot":"","sources":["../src/wasm-init.ts"],"names":[],"mappings":"AAmDA,wBAAsB,iBAAiB,CACrC,aAAa,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED,wBAAsB,iBAAiB,CACrC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAGjB"}
|
|
1
|
+
{"version":3,"file":"wasm-init.d.ts","sourceRoot":"","sources":["../src/wasm-init.ts"],"names":[],"mappings":"AAmDA,wBAAsB,iBAAiB,CACrC,aAAa,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED,wBAAsB,iBAAiB,CACrC,aAAa,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAC3B,OAAO,CAAC,MAAM,CAAC,CAGjB;AAID,wBAAsB,mBAAmB,CACvC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAGjB;AAKD,wBAAsB,qBAAqB,CACzC,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAGjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeptus/aexeo-emdash",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Aexeo seogeo SEO/GEO content evaluator as an emdash plugin",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Aexeo",
|
|
@@ -55,11 +55,12 @@
|
|
|
55
55
|
"LICENSE"
|
|
56
56
|
],
|
|
57
57
|
"scripts": {
|
|
58
|
+
"sync-version": "node scripts/sync-version.mjs",
|
|
58
59
|
"build:wasm": "bash scripts/build-wasm.sh",
|
|
59
60
|
"build:ts": "tsc -p tsconfig.build.json",
|
|
60
61
|
"build:bundle": "node scripts/build-bundle.mjs",
|
|
61
|
-
"build": "npm run build:wasm && npm run build:ts && npm run build:bundle",
|
|
62
|
-
"typecheck": "tsc --noEmit",
|
|
62
|
+
"build": "npm run sync-version && npm run build:wasm && npm run build:ts && npm run build:bundle",
|
|
63
|
+
"typecheck": "npm run sync-version && tsc --noEmit",
|
|
63
64
|
"prepublishOnly": "npm run build"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
@@ -3,4 +3,19 @@
|
|
|
3
3
|
|
|
4
4
|
export function evaluateDocuments(documents_json: string, config_json?: string | null): string;
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Generate the LLM authoring prompt for a truth manifest. The plugin calls
|
|
8
|
+
* this when the editor opens "Generate authoring prompt" — the returned
|
|
9
|
+
* string is what the editor pastes into Claude/GPT/etc.
|
|
10
|
+
*/
|
|
11
|
+
export function generateFactsPrompt(documents_json: string): string;
|
|
12
|
+
|
|
13
|
+
export function scoreIntelligence(documents_json: string, manifest_json?: string | null): string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Validate a candidate `facts.json`. Returns a JSON object with two top-level
|
|
17
|
+
* fields: `validation` (shape / schema check) and `assessment` (truth-layer
|
|
18
|
+
* audit including mismatches against the site). The plugin renders this in
|
|
19
|
+
* the validate-paste UI.
|
|
20
|
+
*/
|
|
21
|
+
export function validateFactsManifest(manifest_json: string, documents_json: string): string;
|
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./aexeo_emdash_bridge_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
wasm.__wbindgen_start();
|
|
7
7
|
export {
|
|
8
|
-
evaluateDocuments, scoreIntelligence
|
|
8
|
+
evaluateDocuments, generateFactsPrompt, scoreIntelligence, validateFactsManifest
|
|
9
9
|
} from "./aexeo_emdash_bridge_bg.js";
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
// Minimal ambient declarations for the wasm-bindgen "bg" glue
|
|
2
2
|
// module. We import this for two purposes:
|
|
3
3
|
// 1. The named functions we actually call from JS:
|
|
4
|
-
// __wbg_set_wasm, evaluateDocuments, scoreIntelligence
|
|
4
|
+
// __wbg_set_wasm, evaluateDocuments, scoreIntelligence,
|
|
5
|
+
// generateFactsPrompt, validateFactsManifest.
|
|
5
6
|
// 2. The full namespace, which we hand to WebAssembly.instantiate
|
|
6
7
|
// as the import map — every __wbg_* / __wbindgen_* import the
|
|
7
8
|
// WASM declares needs to resolve at instantiation time.
|
|
8
9
|
// We don't enumerate the second set here; they cross the boundary
|
|
9
10
|
// only via `import * as glue` and never appear in TypeScript call
|
|
10
11
|
// sites by name. See scripts/build-wasm.sh for why this file is
|
|
11
|
-
//
|
|
12
|
+
// hand-maintained: wasm-bindgen does not generate it for our target.
|
|
12
13
|
export const __wbg_set_wasm: (wasm: WebAssembly.Exports) => void;
|
|
13
14
|
export const evaluateDocuments: (
|
|
14
15
|
documents_json: string,
|
|
15
16
|
config_json?: string | null,
|
|
16
17
|
) => string;
|
|
17
|
-
export const scoreIntelligence: (
|
|
18
|
+
export const scoreIntelligence: (
|
|
19
|
+
documents_json: string,
|
|
20
|
+
manifest_json?: string | null,
|
|
21
|
+
) => string;
|
|
22
|
+
export const generateFactsPrompt: (documents_json: string) => string;
|
|
23
|
+
export const validateFactsManifest: (
|
|
24
|
+
manifest_json: string,
|
|
25
|
+
documents_json: string,
|
|
26
|
+
) => string;
|
|
@@ -27,16 +27,19 @@ export function evaluateDocuments(documents_json, config_json) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
+
* Generate the LLM authoring prompt for a truth manifest. The plugin calls
|
|
31
|
+
* this when the editor opens "Generate authoring prompt" — the returned
|
|
32
|
+
* string is what the editor pastes into Claude/GPT/etc.
|
|
30
33
|
* @param {string} documents_json
|
|
31
34
|
* @returns {string}
|
|
32
35
|
*/
|
|
33
|
-
export function
|
|
36
|
+
export function generateFactsPrompt(documents_json) {
|
|
34
37
|
let deferred3_0;
|
|
35
38
|
let deferred3_1;
|
|
36
39
|
try {
|
|
37
40
|
const ptr0 = passStringToWasm0(documents_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
38
41
|
const len0 = WASM_VECTOR_LEN;
|
|
39
|
-
const ret = wasm.
|
|
42
|
+
const ret = wasm.generateFactsPrompt(ptr0, len0);
|
|
40
43
|
var ptr2 = ret[0];
|
|
41
44
|
var len2 = ret[1];
|
|
42
45
|
if (ret[3]) {
|
|
@@ -50,6 +53,66 @@ export function scoreIntelligence(documents_json) {
|
|
|
50
53
|
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
51
54
|
}
|
|
52
55
|
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @param {string} documents_json
|
|
59
|
+
* @param {string | null} [manifest_json]
|
|
60
|
+
* @returns {string}
|
|
61
|
+
*/
|
|
62
|
+
export function scoreIntelligence(documents_json, manifest_json) {
|
|
63
|
+
let deferred4_0;
|
|
64
|
+
let deferred4_1;
|
|
65
|
+
try {
|
|
66
|
+
const ptr0 = passStringToWasm0(documents_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
67
|
+
const len0 = WASM_VECTOR_LEN;
|
|
68
|
+
var ptr1 = isLikeNone(manifest_json) ? 0 : passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
69
|
+
var len1 = WASM_VECTOR_LEN;
|
|
70
|
+
const ret = wasm.scoreIntelligence(ptr0, len0, ptr1, len1);
|
|
71
|
+
var ptr3 = ret[0];
|
|
72
|
+
var len3 = ret[1];
|
|
73
|
+
if (ret[3]) {
|
|
74
|
+
ptr3 = 0; len3 = 0;
|
|
75
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
76
|
+
}
|
|
77
|
+
deferred4_0 = ptr3;
|
|
78
|
+
deferred4_1 = len3;
|
|
79
|
+
return getStringFromWasm0(ptr3, len3);
|
|
80
|
+
} finally {
|
|
81
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Validate a candidate `facts.json`. Returns a JSON object with two top-level
|
|
87
|
+
* fields: `validation` (shape / schema check) and `assessment` (truth-layer
|
|
88
|
+
* audit including mismatches against the site). The plugin renders this in
|
|
89
|
+
* the validate-paste UI.
|
|
90
|
+
* @param {string} manifest_json
|
|
91
|
+
* @param {string} documents_json
|
|
92
|
+
* @returns {string}
|
|
93
|
+
*/
|
|
94
|
+
export function validateFactsManifest(manifest_json, documents_json) {
|
|
95
|
+
let deferred4_0;
|
|
96
|
+
let deferred4_1;
|
|
97
|
+
try {
|
|
98
|
+
const ptr0 = passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
99
|
+
const len0 = WASM_VECTOR_LEN;
|
|
100
|
+
const ptr1 = passStringToWasm0(documents_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
101
|
+
const len1 = WASM_VECTOR_LEN;
|
|
102
|
+
const ret = wasm.validateFactsManifest(ptr0, len0, ptr1, len1);
|
|
103
|
+
var ptr3 = ret[0];
|
|
104
|
+
var len3 = ret[1];
|
|
105
|
+
if (ret[3]) {
|
|
106
|
+
ptr3 = 0; len3 = 0;
|
|
107
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
108
|
+
}
|
|
109
|
+
deferred4_0 = ptr3;
|
|
110
|
+
deferred4_1 = len3;
|
|
111
|
+
return getStringFromWasm0(ptr3, len3);
|
|
112
|
+
} finally {
|
|
113
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
53
116
|
export function __wbg_Error_960c155d3d49e4c2(arg0, arg1) {
|
|
54
117
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
55
118
|
return ret;
|
|
Binary file
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const evaluateDocuments: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
5
|
+
export const generateFactsPrompt: (a: number, b: number) => [number, number, number, number];
|
|
6
|
+
export const scoreIntelligence: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
7
|
+
export const validateFactsManifest: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
8
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
9
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
10
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
11
|
+
export const __externref_table_dealloc: (a: number) => void;
|
|
12
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
13
|
+
export const __wbindgen_start: () => void;
|