@aeptus/aexeo-emdash 0.8.18 → 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.
- package/CHANGELOG.md +196 -4
- package/INSTALL.md +126 -8
- package/LICENSE +0 -0
- package/README.md +12 -5
- package/dist/adapter.d.ts +30 -2
- package/dist/adapter.d.ts.map +1 -1
- package/dist/admin/Absorbability.d.ts +0 -0
- package/dist/admin/Absorbability.d.ts.map +0 -0
- package/dist/admin/Accessibility.d.ts +0 -0
- package/dist/admin/Accessibility.d.ts.map +0 -0
- package/dist/admin/Citability.d.ts +0 -0
- package/dist/admin/Citability.d.ts.map +0 -0
- package/dist/admin/EntityLegitimacy.d.ts +0 -0
- package/dist/admin/EntityLegitimacy.d.ts.map +0 -0
- package/dist/admin/EntityPresence.d.ts +0 -0
- package/dist/admin/EntityPresence.d.ts.map +0 -0
- package/dist/admin/Facts.d.ts +0 -0
- package/dist/admin/Facts.d.ts.map +0 -0
- package/dist/admin/Findings.d.ts +0 -0
- package/dist/admin/Findings.d.ts.map +0 -0
- package/dist/admin/PillarView.d.ts +0 -0
- package/dist/admin/PillarView.d.ts.map +0 -0
- package/dist/admin/Retrievability.d.ts +0 -0
- package/dist/admin/Retrievability.d.ts.map +0 -0
- package/dist/admin.d.ts +0 -0
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +2 -2
- package/dist/configured.d.ts +6 -0
- package/dist/configured.d.ts.map +1 -1
- package/dist/configured.js +817 -334
- package/dist/content-evaluator.d.ts +14 -0
- package/dist/content-evaluator.d.ts.map +1 -0
- package/dist/content.d.ts +51 -0
- package/dist/content.d.ts.map +1 -0
- package/dist/content.js +365 -0
- package/dist/data-route.d.ts +3 -0
- package/dist/data-route.d.ts.map +1 -1
- package/dist/evaluator-sandbox.d.ts +1 -1
- package/dist/evaluator-sandbox.d.ts.map +1 -1
- package/dist/evaluator.d.ts +1 -1
- package/dist/evaluator.d.ts.map +1 -1
- package/dist/facts-route.d.ts +0 -0
- package/dist/facts-route.d.ts.map +0 -0
- package/dist/findings-view.d.ts +141 -0
- package/dist/findings-view.d.ts.map +1 -0
- package/dist/index.d.ts +15 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +111 -5
- package/dist/inventory.d.ts +51 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/plugin.d.ts +51 -4
- package/dist/plugin.d.ts.map +1 -1
- package/dist/presence-check.d.ts +1 -0
- package/dist/presence-check.d.ts.map +1 -1
- package/dist/presence-route.d.ts +0 -0
- package/dist/presence-route.d.ts.map +0 -0
- package/dist/sandbox-entry.d.ts +4 -23
- package/dist/sandbox-entry.d.ts.map +1 -1
- package/dist/sandbox-entry.js +738 -396
- package/dist/sandbox.d.ts +2 -0
- package/dist/sandbox.d.ts.map +1 -1
- package/dist/sidecar-url.d.ts +18 -0
- package/dist/sidecar-url.d.ts.map +1 -0
- package/dist/sidecar.d.ts +7 -1
- package/dist/sidecar.d.ts.map +1 -1
- package/dist/suppressions.d.ts +0 -0
- package/dist/suppressions.d.ts.map +0 -0
- package/dist/types.d.ts +11 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/wasm-init.d.ts +4 -0
- package/dist/wasm-init.d.ts.map +1 -1
- package/package.json +21 -8
- package/wasm/aexeo_emdash_bridge.d.ts +11 -0
- package/wasm/aexeo_emdash_bridge.js +1 -1
- package/wasm/aexeo_emdash_bridge_bg.d.ts +11 -0
- package/wasm/aexeo_emdash_bridge_bg.js +68 -0
- package/wasm/aexeo_emdash_bridge_bg.wasm +0 -0
- package/wasm/aexeo_emdash_bridge_bg.wasm.d.ts +2 -0
- package/dist/indexnow.d.ts +0 -15
- package/dist/indexnow.d.ts.map +0 -1
- package/dist/mcp.d.ts +0 -28
- package/dist/mcp.d.ts.map +0 -1
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 `
|
|
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
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +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AAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC;IAC3I;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,MAAM,EAAE,CAAC;IAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;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,WAAW,CACzB,OAAO,GAAE,kBAAuB,GAC/B,0BAA0B,CAiF5B;AAED,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,YAAY,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/version.ts
|
|
2
|
+
var PACKAGE_VERSION = "0.9.0";
|
|
3
|
+
|
|
1
4
|
// src/plugin.ts
|
|
2
5
|
var baseCapabilities = ["content:read"];
|
|
3
6
|
function buildCapabilities(evaluatorHost) {
|
|
@@ -15,9 +18,28 @@ function normalizeHost(evaluatorHost) {
|
|
|
15
18
|
const host = evaluatorHost?.trim() ?? "";
|
|
16
19
|
return host.length === 0 ? null : host;
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
+
var SETTINGS_TOKEN_KEY = "eval_token";
|
|
22
|
+
var SETTINGS_BLOCK_MAPPINGS_KEY = "block_mappings";
|
|
23
|
+
var SETTINGS_CONTENT_FIELDS_KEY = "content_fields_by_collection";
|
|
24
|
+
var PLUGIN_SETTINGS_SCHEMA = {
|
|
25
|
+
[SETTINGS_CONTENT_FIELDS_KEY]: {
|
|
26
|
+
type: "string",
|
|
27
|
+
label: "Content fields by collection (JSON)",
|
|
28
|
+
description: "Ordered rendered body fields per collection.",
|
|
29
|
+
multiline: true
|
|
30
|
+
},
|
|
31
|
+
[SETTINGS_BLOCK_MAPPINGS_KEY]: {
|
|
32
|
+
type: "string",
|
|
33
|
+
label: "Custom block mappings (JSON)",
|
|
34
|
+
description: "Ordered mappings for the rendered fields of each custom block type.",
|
|
35
|
+
multiline: true
|
|
36
|
+
},
|
|
37
|
+
[SETTINGS_TOKEN_KEY]: {
|
|
38
|
+
type: "secret",
|
|
39
|
+
label: "EVAL_TOKEN",
|
|
40
|
+
description: "Bearer token for your aexeo-crawl-worker Worker. Encrypted at rest by the emdash host."
|
|
41
|
+
}
|
|
42
|
+
};
|
|
21
43
|
|
|
22
44
|
// src/sandbox.ts
|
|
23
45
|
function aexeoPluginSandboxed(options = {}) {
|
|
@@ -41,10 +63,83 @@ function aexeoPluginSandboxed(options = {}) {
|
|
|
41
63
|
],
|
|
42
64
|
adminWidgets: [
|
|
43
65
|
{ id: "aexeo-score", size: "third", title: "SEO score" }
|
|
44
|
-
]
|
|
66
|
+
],
|
|
67
|
+
// The Setup page writes the sidecar token through ctx.settings; this
|
|
68
|
+
// declaration is what makes the host encrypt it at rest.
|
|
69
|
+
settingsSchema: PLUGIN_SETTINGS_SCHEMA
|
|
45
70
|
};
|
|
46
71
|
}
|
|
47
72
|
|
|
73
|
+
// src/inventory.ts
|
|
74
|
+
async function exportLinkInventory(content, options) {
|
|
75
|
+
const started = options.onTelemetry ? Date.now() : 0;
|
|
76
|
+
const collections = [...new Set(options.collections)];
|
|
77
|
+
if (collections.length === 0 || collections.some((name) => name.trim() === "")) {
|
|
78
|
+
throw new Error("at least one explicit collection is required");
|
|
79
|
+
}
|
|
80
|
+
const limit = options.maxPagesPerCollection ?? 100;
|
|
81
|
+
if (!Number.isSafeInteger(limit) || limit < 1) {
|
|
82
|
+
throw new Error("maxPagesPerCollection must be a positive integer");
|
|
83
|
+
}
|
|
84
|
+
const pages = [];
|
|
85
|
+
const issues = /* @__PURE__ */ new Set(["transactional_snapshot_unavailable"]);
|
|
86
|
+
let scanned = 0;
|
|
87
|
+
let omitted = 0;
|
|
88
|
+
for (const collection of collections) {
|
|
89
|
+
let cursor;
|
|
90
|
+
const seen = /* @__PURE__ */ new Set();
|
|
91
|
+
for (let count = 0; count < limit; count += 1) {
|
|
92
|
+
let batch;
|
|
93
|
+
try {
|
|
94
|
+
batch = await content.list(collection, { limit: 100, ...cursor === void 0 ? {} : { cursor } });
|
|
95
|
+
} catch {
|
|
96
|
+
issues.add("collection_read_failed");
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
for (const item of batch.items) {
|
|
100
|
+
scanned += 1;
|
|
101
|
+
let url;
|
|
102
|
+
try {
|
|
103
|
+
url = await content.getPublicUrl(collection, item.id);
|
|
104
|
+
} catch {
|
|
105
|
+
issues.add("url_resolution_failed");
|
|
106
|
+
omitted += 1;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
if (!url) {
|
|
110
|
+
issues.add("entry_without_public_url");
|
|
111
|
+
omitted += 1;
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
const classification = options.classify?.(item, url);
|
|
115
|
+
pages.push({
|
|
116
|
+
url,
|
|
117
|
+
disposition: classification?.disposition ?? "unknown",
|
|
118
|
+
target: classification?.target ?? null,
|
|
119
|
+
locale: item.locale
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
if (!batch.hasMore) break;
|
|
123
|
+
if (!batch.cursor || seen.has(batch.cursor)) {
|
|
124
|
+
issues.add("invalid_or_repeated_cursor");
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
seen.add(batch.cursor);
|
|
128
|
+
cursor = batch.cursor;
|
|
129
|
+
if (count + 1 === limit) issues.add("collection_page_limit_reached");
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
pages.sort((left, right) => left.url < right.url ? -1 : left.url > right.url ? 1 : 0);
|
|
133
|
+
const result = { inventory: { identity: options.identity, complete: false, pages }, issues: [...issues].sort(), scanned, omitted };
|
|
134
|
+
if (options.onTelemetry) {
|
|
135
|
+
try {
|
|
136
|
+
options.onTelemetry({ event: "link_inventory_export", elapsed_ms: Math.max(0, Date.now() - started), scanned, omitted, page_count: pages.length, issue_count: issues.size });
|
|
137
|
+
} catch {
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
|
|
48
143
|
// src/index.ts
|
|
49
144
|
function aexeoPlugin(options = {}) {
|
|
50
145
|
return {
|
|
@@ -69,6 +164,16 @@ function aexeoPlugin(options = {}) {
|
|
|
69
164
|
// receives. Spread to a plain object so readonly arrays survive
|
|
70
165
|
// the structured-clone semantics of that codegen.
|
|
71
166
|
options: {
|
|
167
|
+
...options.blockMappings === void 0 ? {} : { blockMappings: options.blockMappings },
|
|
168
|
+
...options.contentFieldsByCollection === void 0 ? {} : { contentFieldsByCollection: options.contentFieldsByCollection },
|
|
169
|
+
...options.contentPreset === void 0 ? {} : {
|
|
170
|
+
contentPreset: {
|
|
171
|
+
...options.contentPreset,
|
|
172
|
+
...options.contentPreset.collections === void 0 ? {} : { collections: [...options.contentPreset.collections] },
|
|
173
|
+
...options.contentPreset.sources === void 0 ? {} : { sources: { ...options.contentPreset.sources } },
|
|
174
|
+
...options.contentPreset.byCollection === void 0 ? {} : { byCollection: { ...options.contentPreset.byCollection } }
|
|
175
|
+
}
|
|
176
|
+
},
|
|
72
177
|
...options.collections === void 0 ? {} : { collections: [...options.collections] },
|
|
73
178
|
...options.includeCollections === void 0 ? {} : { includeCollections: [...options.includeCollections] },
|
|
74
179
|
...options.excludeCollections === void 0 ? {} : { excludeCollections: [...options.excludeCollections] },
|
|
@@ -100,5 +205,6 @@ function aexeoPlugin(options = {}) {
|
|
|
100
205
|
}
|
|
101
206
|
export {
|
|
102
207
|
aexeoPlugin,
|
|
103
|
-
aexeoPluginSandboxed
|
|
208
|
+
aexeoPluginSandboxed,
|
|
209
|
+
exportLinkInventory
|
|
104
210
|
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { EmdashContentItem } from "./adapter.js";
|
|
2
|
+
import type { SandboxContentApi } from "./plugin.js";
|
|
3
|
+
/** Explicit surface identity supplied by the inventory producer. */
|
|
4
|
+
export interface LinkInventoryIdentity {
|
|
5
|
+
origin: string;
|
|
6
|
+
release: string;
|
|
7
|
+
surface: string;
|
|
8
|
+
snapshot: string;
|
|
9
|
+
}
|
|
10
|
+
export type LinkInventoryDisposition = "published" | "draft" | "noindex" | "redirect" | "canonical_alias" | "locale_fallback" | "unknown";
|
|
11
|
+
export interface LinkInventoryPage {
|
|
12
|
+
url: string;
|
|
13
|
+
disposition: LinkInventoryDisposition;
|
|
14
|
+
target: string | null;
|
|
15
|
+
locale: string | null;
|
|
16
|
+
}
|
|
17
|
+
export interface LinkInventoryExport {
|
|
18
|
+
inventory: {
|
|
19
|
+
identity: LinkInventoryIdentity | null;
|
|
20
|
+
/** EmDash pagination does not establish a transactional site snapshot. */
|
|
21
|
+
complete: false;
|
|
22
|
+
pages: LinkInventoryPage[];
|
|
23
|
+
};
|
|
24
|
+
issues: string[];
|
|
25
|
+
scanned: number;
|
|
26
|
+
omitted: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Enumerate explicitly selected collections using EmDash's actual URL resolver.
|
|
30
|
+
* An application may supply its own indexability and alias classification.
|
|
31
|
+
* Missing metadata is unknown; no route or snapshot guarantees are inferred.
|
|
32
|
+
*/
|
|
33
|
+
export declare function exportLinkInventory(content: Pick<SandboxContentApi, "list" | "getPublicUrl">, options: {
|
|
34
|
+
collections: readonly string[];
|
|
35
|
+
identity: LinkInventoryIdentity | null;
|
|
36
|
+
maxPagesPerCollection?: number;
|
|
37
|
+
/** Optional aggregate-only local telemetry; no URLs or content are included. */
|
|
38
|
+
onTelemetry?: (event: {
|
|
39
|
+
event: "link_inventory_export";
|
|
40
|
+
elapsed_ms: number;
|
|
41
|
+
scanned: number;
|
|
42
|
+
omitted: number;
|
|
43
|
+
page_count: number;
|
|
44
|
+
issue_count: number;
|
|
45
|
+
}) => void;
|
|
46
|
+
classify?: (item: EmdashContentItem, url: string) => {
|
|
47
|
+
disposition: LinkInventoryDisposition;
|
|
48
|
+
target?: string | null;
|
|
49
|
+
};
|
|
50
|
+
}): Promise<LinkInventoryExport>;
|
|
51
|
+
//# sourceMappingURL=inventory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../src/inventory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,oEAAoE;AACpE,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,wBAAwB,GAChC,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,iBAAiB,GAClE,iBAAiB,GAAG,SAAS,CAAC;AAElC,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,wBAAwB,CAAC;IACtC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE;QACT,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAAC;QACvC,0EAA0E;QAC1E,QAAQ,EAAE,KAAK,CAAC;QAChB,KAAK,EAAE,iBAAiB,EAAE,CAAC;KAC5B,CAAC;IACF,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,cAAc,CAAC,EACzD,OAAO,EAAE;IACP,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACvC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,gFAAgF;IAChF,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,uBAAuB,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACjK,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,KAAK;QACnD,WAAW,EAAE,wBAAwB,CAAC;QACtC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACxB,CAAC;CACH,GACA,OAAO,CAAC,mBAAmB,CAAC,CAoE9B"}
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CustomBlockMappings } from "./adapter.js";
|
|
1
2
|
import type { SuppressionFilter } from "./suppressions.js";
|
|
2
3
|
import type { EmdashDocument, Finding } from "./types.js";
|
|
3
4
|
import { type EmdashContentItem, type EmdashContentMeta } from "./adapter.js";
|
|
@@ -21,12 +22,42 @@ export interface KvNamespace {
|
|
|
21
22
|
}
|
|
22
23
|
export declare const CONFIG_URL_KEY = "config:evaluator_url";
|
|
23
24
|
export declare const CONFIG_TOKEN_KEY = "config:eval_token";
|
|
25
|
+
export declare const SETTINGS_TOKEN_KEY = "eval_token";
|
|
26
|
+
export declare const SETTINGS_BLOCK_MAPPINGS_KEY = "block_mappings";
|
|
27
|
+
export declare const SETTINGS_CONTENT_FIELDS_KEY = "content_fields_by_collection";
|
|
28
|
+
export interface SecretSettingField {
|
|
29
|
+
type: "secret";
|
|
30
|
+
label: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
}
|
|
33
|
+
export type PluginSettingField = SecretSettingField | {
|
|
34
|
+
type: "string";
|
|
35
|
+
label: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
multiline?: boolean;
|
|
38
|
+
};
|
|
39
|
+
export declare const PLUGIN_SETTINGS_SCHEMA: Record<string, PluginSettingField>;
|
|
40
|
+
export interface PluginSettingsAccess {
|
|
41
|
+
get<T = unknown>(key: string): Promise<T | null>;
|
|
42
|
+
set(key: string, value: unknown): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
export interface SandboxLog {
|
|
45
|
+
warn?(msg: string, data?: unknown): void;
|
|
46
|
+
}
|
|
47
|
+
export interface SidecarConfigStore {
|
|
48
|
+
kv: KvNamespace;
|
|
49
|
+
settings?: PluginSettingsAccess;
|
|
50
|
+
log?: SandboxLog;
|
|
51
|
+
}
|
|
24
52
|
export interface SidecarRuntimeConfig {
|
|
25
53
|
url: string;
|
|
26
54
|
token: string;
|
|
27
55
|
}
|
|
28
|
-
export declare function readSidecarConfig(
|
|
29
|
-
export declare function writeSidecarConfig(
|
|
56
|
+
export declare function readSidecarConfig(store: SidecarConfigStore): Promise<SidecarRuntimeConfig | null>;
|
|
57
|
+
export declare function writeSidecarConfig(store: SidecarConfigStore, config: SidecarRuntimeConfig): Promise<void>;
|
|
58
|
+
export declare function isTokenStoredInPlaintext(store: SidecarConfigStore): Promise<boolean>;
|
|
59
|
+
export declare class TokenStorageError extends Error {
|
|
60
|
+
}
|
|
30
61
|
export interface ContentList {
|
|
31
62
|
items: EmdashContentItem[];
|
|
32
63
|
cursor?: string;
|
|
@@ -42,6 +73,7 @@ export interface SandboxContentApi {
|
|
|
42
73
|
}
|
|
43
74
|
export interface SandboxCtx {
|
|
44
75
|
kv: KvNamespace;
|
|
76
|
+
settings?: PluginSettingsAccess;
|
|
45
77
|
http: SidecarHttp;
|
|
46
78
|
content: SandboxContentApi;
|
|
47
79
|
site?: {
|
|
@@ -60,8 +92,19 @@ export interface ContentAfterSaveEvent {
|
|
|
60
92
|
collection: string;
|
|
61
93
|
isNew: boolean;
|
|
62
94
|
}
|
|
95
|
+
export interface ContentAfterDeleteEvent {
|
|
96
|
+
id: string;
|
|
97
|
+
collection: string;
|
|
98
|
+
permanent: boolean;
|
|
99
|
+
}
|
|
100
|
+
export declare function handleAfterDelete(event: ContentAfterDeleteEvent, ctx: SandboxCtx): Promise<void>;
|
|
101
|
+
/** Read optional sandbox mappings without logging their potentially sensitive contents. */
|
|
102
|
+
export declare function readSandboxBlockMappings(ctx: SandboxCtx): Promise<CustomBlockMappings | undefined>;
|
|
103
|
+
/** Read an optional JSON mapping from collection names to ordered field names. */
|
|
104
|
+
export declare function readSandboxContentFields(ctx: SandboxCtx): Promise<Record<string, readonly string[]> | undefined>;
|
|
63
105
|
export declare function handleAfterSave(event: ContentAfterSaveEvent, ctx: SandboxCtx): Promise<void>;
|
|
64
|
-
export declare
|
|
106
|
+
export declare const SITE_GRAPH_RULE_IDS: ReadonlySet<string>;
|
|
107
|
+
export declare function handleAfterSaveConfigured(event: ContentAfterSaveEvent, ctx: SandboxCtx, evaluator: EvaluatorFn, suppressionFilter?: SuppressionFilter, blockMappings?: CustomBlockMappings, contentFields?: readonly string[]): Promise<void>;
|
|
65
108
|
export declare const DEFAULT_COLLECTIONS: readonly ["posts", "pages"];
|
|
66
109
|
export interface RefreshSummary {
|
|
67
110
|
documentsScanned: number;
|
|
@@ -77,11 +120,15 @@ export type EvaluationOutcome = {
|
|
|
77
120
|
reason: string;
|
|
78
121
|
detail: string;
|
|
79
122
|
};
|
|
80
|
-
export type EvaluatorFn = (documents: readonly EmdashDocument[]
|
|
123
|
+
export type EvaluatorFn = (documents: readonly EmdashDocument[], context?: {
|
|
124
|
+
collections: readonly string[];
|
|
125
|
+
}) => Promise<EvaluationOutcome>;
|
|
81
126
|
export declare function evaluateAndPersistAll(ctx: SandboxCtx, options: {
|
|
82
127
|
collections?: readonly string[];
|
|
83
128
|
evaluator: EvaluatorFn;
|
|
84
129
|
suppressionFilter?: SuppressionFilter;
|
|
130
|
+
blockMappings?: CustomBlockMappings | undefined;
|
|
131
|
+
contentFieldsByCollection?: Record<string, readonly string[]> | undefined;
|
|
85
132
|
}): Promise<RefreshSummary>;
|
|
86
133
|
export declare function findingsKey(route: string): string;
|
|
87
134
|
export declare function documentKey(route: string): string;
|
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,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EAEvB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAQhD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,CAAC;IACzB,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAuBD,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,MAAM,GAAG,IAAI,GAC3B,SAAS,MAAM,EAAE,CAMnB;AAID,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,MAAM,GAAG,IAAI,GAC3B,SAAS,MAAM,E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CAAC,iBAAiB,CAAC,CAAC;AAWhC,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,UAAU,EACf,OAAO,EAAE;IACP,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,SAAS,EAAE,WAAW,CAAC;IACvB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,aAAa,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAChD,yBAAyB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;CAC3E,GACA,OAAO,CAAC,cAAc,CAAC,CAyIzB;AAkID,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAOD,eAAO,MAAM,SAAS,kBAAkB,CAAC;AAMzC,wBAAsB,eAAe,CACnC,EAAE,EAAE,WAAW,GACd,OAAO,CAAC,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,CAW3B;AAED,wBAAsB,YAAY,CAChC,EAAE,EAAE,WAAW,EACf,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,OAAO,EAAE,CAAC,CAMpB"}
|
package/dist/presence-check.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TruthManifest } from "./types.js";
|
|
2
|
+
export declare const PRESENCE_HOSTS: readonly ["en.wikipedia.org", "www.wikidata.org", "api.github.com", "rdap.org", "index.commoncrawl.org"];
|
|
2
3
|
export type SourceStatus = "found" | "not_found" | "unreachable" | "skipped";
|
|
3
4
|
export interface SourceResult {
|
|
4
5
|
source: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presence-check.d.ts","sourceRoot":"","sources":["../src/presence-check.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"presence-check.d.ts","sourceRoot":"","sources":["../src/presence-check.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAQhD,eAAO,MAAM,cAAc,YACzB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,EACV,uBAAuB,CACf,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CAAC;AAE7E,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,YAAY,CAAC;IAGrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAED,QAAA,MAAM,YAAY,YAChB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,MAAM,EACN,cAAc,CACN,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAKvD,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,aAAa,GAAG,IAAI,GAC7B,WAAW,GAAG,IAAI,CAUpB;AAED,wBAAsB,eAAe,CACnC,KAAK,EAAE,WAAW,EAClB,OAAO,GAAE,OAAO,KAAa,GAC5B,OAAO,CAAC,YAAY,EAAE,CAAC,CAoBzB"}
|
package/dist/presence-route.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/sandbox-entry.d.ts
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
import type { KvNamespace, SandboxCtx } from "./plugin.js";
|
|
2
|
-
import { handleAfterSave } from "./plugin.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
page: string;
|
|
6
|
-
} | {
|
|
7
|
-
type: "block_action";
|
|
8
|
-
action_id: string;
|
|
9
|
-
block_id?: string;
|
|
10
|
-
value?: unknown;
|
|
11
|
-
} | {
|
|
12
|
-
type: "form_submit";
|
|
13
|
-
action_id: string;
|
|
14
|
-
block_id?: string;
|
|
15
|
-
values: Record<string, unknown>;
|
|
16
|
-
};
|
|
2
|
+
import { handleAfterDelete, handleAfterSave } from "./plugin.js";
|
|
3
|
+
import type { BlockInteraction, BlockResponse } from "./findings-view.js";
|
|
4
|
+
export type { BlockInteraction, BlockResponse } from "./findings-view.js";
|
|
17
5
|
export interface RouteInput {
|
|
18
6
|
input?: unknown;
|
|
19
7
|
request?: unknown;
|
|
@@ -24,24 +12,17 @@ export interface DispatchCtx {
|
|
|
24
12
|
kv: KvNamespace;
|
|
25
13
|
ctx: SandboxCtx;
|
|
26
14
|
}
|
|
27
|
-
export interface BlockResponse {
|
|
28
|
-
blocks: unknown[];
|
|
29
|
-
toast?: {
|
|
30
|
-
message: string;
|
|
31
|
-
type: "success" | "error" | "info";
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
15
|
declare function handleAdminRoute(input: RouteInput, ctx: SandboxCtx): Promise<BlockResponse>;
|
|
35
16
|
declare const _default: {
|
|
36
17
|
hooks: {
|
|
37
18
|
"content:afterSave": typeof handleAfterSave;
|
|
19
|
+
"content:afterDelete": typeof handleAfterDelete;
|
|
38
20
|
};
|
|
39
21
|
routes: {
|
|
40
22
|
admin: {
|
|
41
23
|
handler: typeof handleAdminRoute;
|
|
42
24
|
};
|
|
43
25
|
};
|
|
44
|
-
mcpTools: readonly [import("./mcp.js").McpToolDefinition<import("./mcp.js").CheckInput, import("./mcp.js").CheckOutput>, import("./mcp.js").McpToolDefinition<import("./mcp.js").IndexNowSubmitInput, import("./indexnow.js").IndexNowSubmission>];
|
|
45
26
|
};
|
|
46
27
|
export default _default;
|
|
47
28
|
//# sourceMappingURL=sandbox-entry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox-entry.d.ts","sourceRoot":"","sources":["../src/sandbox-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,
|
|
1
|
+
{"version":3,"file":"sandbox-entry.d.ts","sourceRoot":"","sources":["../src/sandbox-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EACX,UAAU,EAEX,MAAM,aAAa,CAAC;AACrB,OAAO,EAIL,iBAAiB,EACjB,eAAe,EAMhB,MAAM,aAAa,CAAC;AAIrB,OAAO,KAAK,EAEV,gBAAgB,EAChB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAuB5B,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAa1E,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAID,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,gBAAgB,CAAC;IACvB,EAAE,EAAE,WAAW,CAAC;IAChB,GAAG,EAAE,UAAU,CAAC;CACjB;AA6BD,iBAAe,gBAAgB,CAC7B,KAAK,EAAE,UAAU,EACjB,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,aAAa,CAAC,CAwBxB;;;QAqQG,mBAAmB;QACnB,qBAAqB;;;QAGrB,KAAK;YAAI,OAAO"}
|