geo-ai-search-optimization 2.0.0 → 2.2.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/action.yml +130 -0
- package/package.json +15 -3
- package/src/auto-fix.js +349 -0
- package/src/batch-full-page-audit.js +151 -0
- package/src/citability.js +311 -0
- package/src/citation-check.js +1 -1
- package/src/cli-site-ops-commands.js +391 -2
- package/src/compare.js +175 -0
- package/src/config.js +105 -0
- package/src/crawlers.js +286 -0
- package/src/diagnose.js +221 -0
- package/src/eeat.js +251 -0
- package/src/freshness.js +281 -0
- package/src/full-audit.js +269 -0
- package/src/full-page-audit.js +273 -0
- package/src/heading-structure.js +287 -0
- package/src/index.d.ts +492 -0
- package/src/index.js +24 -0
- package/src/internal-links.js +298 -0
- package/src/page-audit.js +1 -1
- package/src/page-snapshot.js +198 -0
- package/src/pdf-report.js +205 -0
- package/src/platform-ready.js +238 -0
- package/src/plugins.js +126 -0
- package/src/readability.js +252 -0
- package/src/security.js +249 -0
- package/src/sitemap.js +323 -0
- package/src/social-meta.js +293 -0
- package/src/topics.js +275 -0
- package/src/url-onboarding.js +1 -1
- package/src/validate-llms.js +307 -0
- package/src/validate-schema.js +306 -0
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
// Type declarations for geo-ai-search-optimization
|
|
2
|
+
|
|
3
|
+
// --- Common types ---
|
|
4
|
+
|
|
5
|
+
export interface GeoScore {
|
|
6
|
+
score: number;
|
|
7
|
+
maxScore: number;
|
|
8
|
+
checks: Array<{
|
|
9
|
+
key: string;
|
|
10
|
+
label: string;
|
|
11
|
+
passed: boolean;
|
|
12
|
+
maxPoints: number;
|
|
13
|
+
pointsAwarded: number;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface GeoIssue {
|
|
18
|
+
severity: string;
|
|
19
|
+
message: string;
|
|
20
|
+
field?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// --- Scan ---
|
|
24
|
+
|
|
25
|
+
export interface ScanSummary {
|
|
26
|
+
root: string;
|
|
27
|
+
filesConsidered: number;
|
|
28
|
+
filesScanned: number;
|
|
29
|
+
specialFiles: {
|
|
30
|
+
robotsTxt: string[];
|
|
31
|
+
sitemap: string[];
|
|
32
|
+
llmsTxt: string[];
|
|
33
|
+
};
|
|
34
|
+
signals: Record<string, { count: number; examples: string[] }>;
|
|
35
|
+
recommendations: string[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function scanProject(rootInput: string, options?: { maxFileSize?: number; maxExamples?: number }): Promise<ScanSummary>;
|
|
39
|
+
export function renderScanMarkdown(summary: ScanSummary): string;
|
|
40
|
+
export function writeScanOutput(outputPath: string, content: string): Promise<string>;
|
|
41
|
+
|
|
42
|
+
// --- Audit ---
|
|
43
|
+
|
|
44
|
+
export interface AuditReport {
|
|
45
|
+
kind: "geo-audit";
|
|
46
|
+
summary: string;
|
|
47
|
+
score: number;
|
|
48
|
+
maxScore: number;
|
|
49
|
+
scoreLabel: string;
|
|
50
|
+
areas: Array<{ key: string; title: string; owner: string; issues: string[]; severity: string; status: string; summary: string; recommendation: string }>;
|
|
51
|
+
groups: { blockers: string[]; highImpactFixes: string[]; supportFixes: string[]; experiments: string[] };
|
|
52
|
+
actionPlan: Array<{ priority: string; owner: string; area: string; action: string }>;
|
|
53
|
+
checks: GeoScore["checks"];
|
|
54
|
+
scanSummary: ScanSummary;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function auditProject(rootInput: string, options?: { maxFileSize?: number; maxExamples?: number }): Promise<AuditReport>;
|
|
58
|
+
export function renderAuditMarkdown(report: AuditReport): string;
|
|
59
|
+
export function writeAuditOutput(outputPath: string, content: string): Promise<string>;
|
|
60
|
+
|
|
61
|
+
// --- Page Audit ---
|
|
62
|
+
|
|
63
|
+
export interface PageAuditReport {
|
|
64
|
+
kind: "geo-page-audit";
|
|
65
|
+
input: string;
|
|
66
|
+
sourceType: "url" | "file";
|
|
67
|
+
reference: string;
|
|
68
|
+
fetchStatus: number | null;
|
|
69
|
+
metadata: { title: string | null; metaDescription: string | null; canonical: string | null };
|
|
70
|
+
directAnswerCandidate: string | null;
|
|
71
|
+
headingStats: { totalHeadingCount: number; questionHeadingCount: number };
|
|
72
|
+
headings: Array<{ level: number; text: string }>;
|
|
73
|
+
signals: Record<string, { count: number; examples: string[] }>;
|
|
74
|
+
score: GeoScore;
|
|
75
|
+
scoreLabel: string;
|
|
76
|
+
problemAreas: Array<{ area: string; severity: string; issues: string[]; whyItMatters: string }>;
|
|
77
|
+
recommendedBlocks: string[];
|
|
78
|
+
rewriteBrief: Record<string, unknown>;
|
|
79
|
+
summary: string;
|
|
80
|
+
agentPrompt: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function auditPage(input: string, options?: { maxHeadings?: number }): Promise<PageAuditReport>;
|
|
84
|
+
export function renderPageAuditMarkdown(report: PageAuditReport): string;
|
|
85
|
+
export function writePageAuditOutput(outputPath: string, content: string): Promise<string>;
|
|
86
|
+
|
|
87
|
+
// --- Full Page Audit ---
|
|
88
|
+
|
|
89
|
+
export interface FullPageAuditReport {
|
|
90
|
+
kind: "geo-full-page-audit";
|
|
91
|
+
input: string;
|
|
92
|
+
source: string;
|
|
93
|
+
compositeScore: number;
|
|
94
|
+
compositeLabel: string;
|
|
95
|
+
dimensions: Record<string, { score: number; label: string; summary: string }>;
|
|
96
|
+
platformSummary: Array<{ platform: string; score: number; readiness: string }>;
|
|
97
|
+
topIssues: Array<{ source: string; severity: string; issue: string }>;
|
|
98
|
+
recommendations: Array<{ source: string; rec: string }>;
|
|
99
|
+
errors: Array<{ dimension: string; error: string }>;
|
|
100
|
+
details: Record<string, unknown>;
|
|
101
|
+
summary: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function fullPageAudit(input: string, options?: { baseUrl?: string }): Promise<FullPageAuditReport>;
|
|
105
|
+
export function renderFullPageAuditMarkdown(report: FullPageAuditReport): string;
|
|
106
|
+
export function writeFullPageAuditOutput(outputPath: string, content: string): Promise<string>;
|
|
107
|
+
|
|
108
|
+
// --- Full Audit ---
|
|
109
|
+
|
|
110
|
+
export interface FullAuditReport {
|
|
111
|
+
kind: "geo-full-audit";
|
|
112
|
+
root: string;
|
|
113
|
+
overallScore: number;
|
|
114
|
+
overallLabel: string;
|
|
115
|
+
infraScore: number;
|
|
116
|
+
pageScore: number | null;
|
|
117
|
+
scores: { base: number; crawlers: number; llmsValidation: number; pageAverage: number | null };
|
|
118
|
+
baseAudit: AuditReport;
|
|
119
|
+
crawlers: CrawlerReport | null;
|
|
120
|
+
llmsValidation: ValidateLlmsReport | null;
|
|
121
|
+
samplePages: FullPageAuditReport[];
|
|
122
|
+
actionPlan: Array<{ priority: string; source: string; action: string; owner: string; area: string }>;
|
|
123
|
+
errors: Array<{ component: string; error: string }>;
|
|
124
|
+
summary: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function fullAudit(input: string, options?: { sampleUrls?: string[]; concurrency?: number; maxFileSize?: number }): Promise<FullAuditReport>;
|
|
128
|
+
export function renderFullAuditMarkdown(report: FullAuditReport): string;
|
|
129
|
+
export function writeFullAuditOutput(outputPath: string, content: string): Promise<string>;
|
|
130
|
+
|
|
131
|
+
// --- Crawlers ---
|
|
132
|
+
|
|
133
|
+
export interface CrawlerReport {
|
|
134
|
+
kind: "geo-crawlers";
|
|
135
|
+
source: string;
|
|
136
|
+
found: boolean;
|
|
137
|
+
crawlers: Array<{ crawler: string; owner: string; engine: string; purpose: string; status: string; reason: string; matchedAgent: string | null; blockedPaths: string[] }>;
|
|
138
|
+
score: number;
|
|
139
|
+
blocked: string[];
|
|
140
|
+
partial: string[];
|
|
141
|
+
summary: string;
|
|
142
|
+
recommendation: string;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function analyzeCrawlers(input: string, options?: { strategy?: "open" | "selective" | "block-all" }): Promise<CrawlerReport>;
|
|
146
|
+
export function renderCrawlersMarkdown(report: CrawlerReport): string;
|
|
147
|
+
export function writeCrawlersOutput(outputPath: string, content: string): Promise<string>;
|
|
148
|
+
|
|
149
|
+
// --- Citability ---
|
|
150
|
+
|
|
151
|
+
export interface CitabilityReport {
|
|
152
|
+
kind: "geo-citability";
|
|
153
|
+
source: string;
|
|
154
|
+
wordCount: number;
|
|
155
|
+
sentenceCount: number;
|
|
156
|
+
score: number;
|
|
157
|
+
scoreLabel: string;
|
|
158
|
+
claims: { total: number; factualClaims: number; statClaims: number; claimDensity: number; statDensity: number };
|
|
159
|
+
entities: { namedEntities: string[]; techTerms: string[]; brands: string[]; entityDensity: number };
|
|
160
|
+
quotableSentences: Array<{ sentence: string; score: number; wordCount: number }>;
|
|
161
|
+
structure: { hasList: boolean; hasTable: boolean; hasDefinition: boolean; hasHeading: boolean; headingCount: number; structureScore: number };
|
|
162
|
+
recommendations: string[];
|
|
163
|
+
summary: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function analyzeCitability(input: string, options?: object): Promise<CitabilityReport>;
|
|
167
|
+
export function renderCitabilityMarkdown(report: CitabilityReport): string;
|
|
168
|
+
export function writeCitabilityOutput(outputPath: string, content: string): Promise<string>;
|
|
169
|
+
|
|
170
|
+
// --- Validate llms.txt ---
|
|
171
|
+
|
|
172
|
+
export interface ValidateLlmsReport {
|
|
173
|
+
kind: "geo-validate-llms";
|
|
174
|
+
source: string;
|
|
175
|
+
found: boolean;
|
|
176
|
+
score: number;
|
|
177
|
+
scoreLabel: string;
|
|
178
|
+
parsed: { title: string | null; description: string | null; sectionCount: number; sections: string[]; urlCount: number } | null;
|
|
179
|
+
issues: GeoIssue[];
|
|
180
|
+
warnings: GeoIssue[];
|
|
181
|
+
urlValidation: Array<{ url: string; valid: boolean; https: boolean; warning: string | null }>;
|
|
182
|
+
recommendations: string[];
|
|
183
|
+
summary: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function validateLlmsTxt(input: string, options?: object): Promise<ValidateLlmsReport>;
|
|
187
|
+
export function renderValidateLlmsMarkdown(report: ValidateLlmsReport): string;
|
|
188
|
+
export function writeValidateLlmsOutput(outputPath: string, content: string): Promise<string>;
|
|
189
|
+
|
|
190
|
+
// --- Validate Schema ---
|
|
191
|
+
|
|
192
|
+
export interface ValidateSchemaReport {
|
|
193
|
+
kind: "geo-validate-schema";
|
|
194
|
+
source: string;
|
|
195
|
+
entityCount: number;
|
|
196
|
+
types: string[];
|
|
197
|
+
validations: Array<{ type: string; issues: GeoIssue[]; warnings: GeoIssue[]; enhancements: GeoIssue[] }>;
|
|
198
|
+
score: number;
|
|
199
|
+
scoreLabel: string;
|
|
200
|
+
summary: string;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export function validateSchema(input: string, options?: object): Promise<ValidateSchemaReport>;
|
|
204
|
+
export function renderValidateSchemaMarkdown(report: ValidateSchemaReport): string;
|
|
205
|
+
export function writeValidateSchemaOutput(outputPath: string, content: string): Promise<string>;
|
|
206
|
+
|
|
207
|
+
// --- E-E-A-T ---
|
|
208
|
+
|
|
209
|
+
export interface EeatReport {
|
|
210
|
+
kind: "geo-eeat";
|
|
211
|
+
source: string;
|
|
212
|
+
wordCount: number;
|
|
213
|
+
score: number;
|
|
214
|
+
scoreLabel: string;
|
|
215
|
+
dimensions: Record<string, { score: number; signals: Array<{ label: string; count: number; examples: string[] }> }>;
|
|
216
|
+
authorPresence: string[];
|
|
217
|
+
recommendations: string[];
|
|
218
|
+
summary: string;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function analyzeEeat(input: string, options?: object): Promise<EeatReport>;
|
|
222
|
+
export function renderEeatMarkdown(report: EeatReport): string;
|
|
223
|
+
export function writeEeatOutput(outputPath: string, content: string): Promise<string>;
|
|
224
|
+
|
|
225
|
+
// --- Platform Readiness ---
|
|
226
|
+
|
|
227
|
+
export interface PlatformReadyReport {
|
|
228
|
+
kind: "geo-platform-ready";
|
|
229
|
+
source: string;
|
|
230
|
+
overallScore: number;
|
|
231
|
+
overallLabel: string;
|
|
232
|
+
readyPlatforms: number;
|
|
233
|
+
totalPlatforms: number;
|
|
234
|
+
platforms: Array<{ key: string; platform: string; score: number; passed: number; total: number; checks: Array<{ key: string; label: string; passed: boolean }>; readiness: string }>;
|
|
235
|
+
recommendations: string[];
|
|
236
|
+
summary: string;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function analyzePlatformReadiness(input: string, options?: object): Promise<PlatformReadyReport>;
|
|
240
|
+
export function renderPlatformReadyMarkdown(report: PlatformReadyReport): string;
|
|
241
|
+
export function writePlatformReadyOutput(outputPath: string, content: string): Promise<string>;
|
|
242
|
+
|
|
243
|
+
// --- Readability ---
|
|
244
|
+
|
|
245
|
+
export interface ReadabilityReport {
|
|
246
|
+
kind: "geo-readability";
|
|
247
|
+
source: string;
|
|
248
|
+
wordCount: number;
|
|
249
|
+
sentenceCount: number;
|
|
250
|
+
readingTime: number;
|
|
251
|
+
fleschKincaidGrade: number;
|
|
252
|
+
gradeLabel: string;
|
|
253
|
+
fleschReadingEase: number;
|
|
254
|
+
readingEaseLabel: string;
|
|
255
|
+
passiveVoice: { passiveCount: number; passiveRatio: number };
|
|
256
|
+
sentenceLength: { avg: number; min: number; max: number; longCount: number; shortCount: number; distribution: Record<string, number> };
|
|
257
|
+
score: number;
|
|
258
|
+
scoreLabel: string;
|
|
259
|
+
recommendations: string[];
|
|
260
|
+
summary: string;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export function analyzeReadability(input: string, options?: object): Promise<ReadabilityReport>;
|
|
264
|
+
export function renderReadabilityMarkdown(report: ReadabilityReport): string;
|
|
265
|
+
export function writeReadabilityOutput(outputPath: string, content: string): Promise<string>;
|
|
266
|
+
|
|
267
|
+
// --- Heading Structure ---
|
|
268
|
+
|
|
269
|
+
export interface HeadingStructureReport {
|
|
270
|
+
kind: "geo-heading-structure";
|
|
271
|
+
source: string;
|
|
272
|
+
headingCount: number;
|
|
273
|
+
headings: Array<{ level: number; text: string }>;
|
|
274
|
+
hierarchy: { issues: GeoIssue[]; depth: number; levelDistribution: Record<string, number> };
|
|
275
|
+
semanticCoverage: { categories: Record<string, boolean>; coverageRatio: number; covered: number; total: number };
|
|
276
|
+
questionHeadings: { count: number; ratio: number; examples: string[] };
|
|
277
|
+
score: number;
|
|
278
|
+
scoreLabel: string;
|
|
279
|
+
recommendations: string[];
|
|
280
|
+
summary: string;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export function analyzeHeadingStructure(input: string, options?: object): Promise<HeadingStructureReport>;
|
|
284
|
+
export function renderHeadingStructureMarkdown(report: HeadingStructureReport): string;
|
|
285
|
+
export function writeHeadingStructureOutput(outputPath: string, content: string): Promise<string>;
|
|
286
|
+
|
|
287
|
+
// --- Internal Links ---
|
|
288
|
+
|
|
289
|
+
export interface InternalLinksReport {
|
|
290
|
+
kind: "geo-internal-links";
|
|
291
|
+
source: string;
|
|
292
|
+
internalLinks: { total: number; unique: number; anchorQuality: number; mostLinked: Array<{ url: string; count: number }>; avgDepth: number; maxDepth: number };
|
|
293
|
+
externalLinks: { total: number; domains: string[] };
|
|
294
|
+
anchorAnalysis: { total: number; descriptive: number; generic: number; empty: number; qualityRatio: number; issues: GeoIssue[] };
|
|
295
|
+
score: number;
|
|
296
|
+
scoreLabel: string;
|
|
297
|
+
recommendations: string[];
|
|
298
|
+
summary: string;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export function analyzeInternalLinks(input: string, options?: { baseUrl?: string }): Promise<InternalLinksReport>;
|
|
302
|
+
export function renderInternalLinksMarkdown(report: InternalLinksReport): string;
|
|
303
|
+
export function writeInternalLinksOutput(outputPath: string, content: string): Promise<string>;
|
|
304
|
+
|
|
305
|
+
// --- Social Meta ---
|
|
306
|
+
|
|
307
|
+
export interface SocialMetaReport {
|
|
308
|
+
kind: "geo-social-meta";
|
|
309
|
+
source: string;
|
|
310
|
+
openGraph: { found: number; total: number; tags: Array<{ tag: string; label: string; required: boolean; found: boolean; value: string | null; issues: GeoIssue[] }> };
|
|
311
|
+
twitter: { found: number; total: number; tags: Array<{ tag: string; label: string; required: boolean; found: boolean; value: string | null; issues: GeoIssue[] }> };
|
|
312
|
+
score: number;
|
|
313
|
+
scoreLabel: string;
|
|
314
|
+
recommendations: string[];
|
|
315
|
+
summary: string;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export function analyzeSocialMeta(input: string, options?: object): Promise<SocialMetaReport>;
|
|
319
|
+
export function renderSocialMetaMarkdown(report: SocialMetaReport): string;
|
|
320
|
+
export function writeSocialMetaOutput(outputPath: string, content: string): Promise<string>;
|
|
321
|
+
|
|
322
|
+
// --- Sitemap ---
|
|
323
|
+
|
|
324
|
+
export interface SitemapReport {
|
|
325
|
+
kind: "geo-sitemap";
|
|
326
|
+
source: string;
|
|
327
|
+
found: boolean;
|
|
328
|
+
isIndex?: boolean;
|
|
329
|
+
entryCount: number;
|
|
330
|
+
urlStats: { total: number; withLastmod: number; lastmodCoverage: number; freshness: Record<string, number> } | null;
|
|
331
|
+
validation: { issues: GeoIssue[]; warnings: GeoIssue[] };
|
|
332
|
+
score: number;
|
|
333
|
+
scoreLabel: string;
|
|
334
|
+
recommendations: string[];
|
|
335
|
+
summary: string;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export function analyzeSitemap(input: string, options?: { maxEntries?: number }): Promise<SitemapReport>;
|
|
339
|
+
export function renderSitemapMarkdown(report: SitemapReport): string;
|
|
340
|
+
export function writeSitemapOutput(outputPath: string, content: string): Promise<string>;
|
|
341
|
+
|
|
342
|
+
// --- Security ---
|
|
343
|
+
|
|
344
|
+
export interface SecurityReport {
|
|
345
|
+
kind: "geo-security";
|
|
346
|
+
source: string;
|
|
347
|
+
isHttps: boolean;
|
|
348
|
+
score: number;
|
|
349
|
+
scoreLabel: string;
|
|
350
|
+
htmlChecks: Array<{ key: string; label: string; passed: boolean; severity: string; detail?: string }>;
|
|
351
|
+
securityHeaders: Array<{ header: string; key: string; present: boolean; value: string | null; weight: number; critical: boolean }> | null;
|
|
352
|
+
recommendations: string[];
|
|
353
|
+
summary: string;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export function analyzeSecurity(input: string, options?: object): Promise<SecurityReport>;
|
|
357
|
+
export function renderSecurityMarkdown(report: SecurityReport): string;
|
|
358
|
+
export function writeSecurityOutput(outputPath: string, content: string): Promise<string>;
|
|
359
|
+
|
|
360
|
+
// --- Freshness ---
|
|
361
|
+
|
|
362
|
+
export interface FreshnessReport {
|
|
363
|
+
kind: "geo-freshness";
|
|
364
|
+
source: string;
|
|
365
|
+
datesFound: number;
|
|
366
|
+
dates: Array<{ raw: string; date: string; source: string; timestamp: number }>;
|
|
367
|
+
age: { publishedDate: string; modifiedDate: string; publishedAgeDays: number; modifiedAgeDays: number; isStale: boolean; isOld: boolean } | null;
|
|
368
|
+
freshnessSignals: string[];
|
|
369
|
+
score: number;
|
|
370
|
+
scoreLabel: string;
|
|
371
|
+
recommendations: string[];
|
|
372
|
+
summary: string;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export function analyzeFreshness(input: string, options?: object): Promise<FreshnessReport>;
|
|
376
|
+
export function renderFreshnessMarkdown(report: FreshnessReport): string;
|
|
377
|
+
export function writeFreshnessOutput(outputPath: string, content: string): Promise<string>;
|
|
378
|
+
|
|
379
|
+
// --- Topics ---
|
|
380
|
+
|
|
381
|
+
export interface TopicsReport {
|
|
382
|
+
kind: "geo-topics";
|
|
383
|
+
source: string;
|
|
384
|
+
wordCount: number;
|
|
385
|
+
uniqueTerms: number;
|
|
386
|
+
keywords: Array<{ term: string; count: number; tfidf: number }>;
|
|
387
|
+
bigrams: Array<{ term: string; count: number }>;
|
|
388
|
+
trigrams: Array<{ term: string; count: number }>;
|
|
389
|
+
headingTopics: string[];
|
|
390
|
+
topicClusters: Array<{ primary: string; related: string[]; totalFreq: number }>;
|
|
391
|
+
score: number;
|
|
392
|
+
scoreLabel: string;
|
|
393
|
+
recommendations: string[];
|
|
394
|
+
summary: string;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export function analyzeTopics(input: string, options?: object): Promise<TopicsReport>;
|
|
398
|
+
export function renderTopicsMarkdown(report: TopicsReport): string;
|
|
399
|
+
export function writeTopicsOutput(outputPath: string, content: string): Promise<string>;
|
|
400
|
+
|
|
401
|
+
// --- Auto-Fix ---
|
|
402
|
+
|
|
403
|
+
export interface AutoFixReport {
|
|
404
|
+
kind: "geo-auto-fix";
|
|
405
|
+
input: string;
|
|
406
|
+
source: string;
|
|
407
|
+
auditScore: number;
|
|
408
|
+
metaTags: Array<{ tag: string; html: string; priority: string; condition?: string }>;
|
|
409
|
+
ogTags: Array<{ tag: string; html: string }>;
|
|
410
|
+
jsonLdSchemas: Array<{ type: string; json: string }>;
|
|
411
|
+
robotsTxt: { label: string; content: string };
|
|
412
|
+
llmsTxt: { label: string; content: string };
|
|
413
|
+
headingFix: { label: string; content: string } | null;
|
|
414
|
+
summary: string;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export function generateAutoFix(input: string, options?: object): Promise<AutoFixReport>;
|
|
418
|
+
export function renderAutoFixMarkdown(report: AutoFixReport): string;
|
|
419
|
+
export function writeAutoFixOutput(outputPath: string, content: string): Promise<string>;
|
|
420
|
+
|
|
421
|
+
// --- Page Snapshot ---
|
|
422
|
+
|
|
423
|
+
export function savePageSnapshot(pageAuditResult: FullPageAuditReport, options?: { dataDir?: string }): Promise<{ path: string; key: string; snapshot: object }>;
|
|
424
|
+
export function listPageSnapshots(input: string, options?: { dataDir?: string }): Promise<string[]>;
|
|
425
|
+
export function loadPageSnapshot(filePath: string): Promise<object>;
|
|
426
|
+
|
|
427
|
+
export interface PageTrendReport {
|
|
428
|
+
kind: "geo-page-trend";
|
|
429
|
+
input: string;
|
|
430
|
+
key: string;
|
|
431
|
+
snapshotCount: number;
|
|
432
|
+
snapshots: Array<{ timestamp: string; compositeScore: number }>;
|
|
433
|
+
trend: { firstDate: string; latestDate: string; firstScore: number; latestScore: number; delta: number; direction: string; dimensionTrends: Record<string, { first: number; latest: number; delta: number; direction: string }> } | null;
|
|
434
|
+
summary: string;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export function buildPageTrend(input: string, options?: { dataDir?: string; last?: number }): Promise<PageTrendReport>;
|
|
438
|
+
export function renderPageTrendMarkdown(report: PageTrendReport): string;
|
|
439
|
+
export function writePageTrendOutput(outputPath: string, content: string): Promise<string>;
|
|
440
|
+
|
|
441
|
+
// --- Batch ---
|
|
442
|
+
|
|
443
|
+
export interface BatchFullPageAuditReport {
|
|
444
|
+
kind: "geo-batch-full-page-audit";
|
|
445
|
+
totalUrls: number;
|
|
446
|
+
successful: number;
|
|
447
|
+
failed: number;
|
|
448
|
+
avgScore: number;
|
|
449
|
+
minScore: number;
|
|
450
|
+
maxScore: number;
|
|
451
|
+
dimensionAverages: Record<string, number>;
|
|
452
|
+
results: FullPageAuditReport[];
|
|
453
|
+
weakest: FullPageAuditReport[];
|
|
454
|
+
commonIssues: Array<{ issue: string; count: number; percentage: number }>;
|
|
455
|
+
errors: Array<{ url: string; error: string }>;
|
|
456
|
+
summary: string;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export function batchFullPageAudit(urls: string[], options?: { concurrency?: number }): Promise<BatchFullPageAuditReport>;
|
|
460
|
+
export function renderBatchFullPageAuditMarkdown(report: BatchFullPageAuditReport): string;
|
|
461
|
+
export function writeBatchFullPageAuditOutput(outputPath: string, content: string): Promise<string>;
|
|
462
|
+
|
|
463
|
+
// --- Config ---
|
|
464
|
+
|
|
465
|
+
export function loadConfig(options?: { configPath?: string; startDir?: string }): Promise<Record<string, unknown>>;
|
|
466
|
+
export function initConfig(options?: { targetDir?: string; siteName?: string; siteUrl?: string; overwrite?: boolean; minScore?: number }): Promise<{ outputPath: string; config: object }>;
|
|
467
|
+
export function mergeConfigWithOptions(config: Record<string, unknown>, cliOptions: Record<string, unknown>): Record<string, unknown>;
|
|
468
|
+
|
|
469
|
+
// --- Plugins ---
|
|
470
|
+
|
|
471
|
+
export interface PluginApi {
|
|
472
|
+
addSignal(name: string, config: { pattern: RegExp | string; label?: string; weight?: number }): void;
|
|
473
|
+
addCheck(name: string, config: { label?: string; maxPoints?: number; passed: (data: unknown) => boolean }): void;
|
|
474
|
+
addCommand(name: string, config: { description?: string; handler: (args: string[]) => Promise<void> }): void;
|
|
475
|
+
addScoreRule(name: string, config: { label?: string; maxPoints?: number; passed: (scan: unknown) => boolean }): void;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export function loadPlugins(pluginPaths: string[], options?: { baseDir?: string }): Promise<{ loaded: Array<{ path: string; name: string }>; errors: Array<{ path: string; error: string }> }>;
|
|
479
|
+
export function getPluginRegistry(): Record<string, unknown>;
|
|
480
|
+
export function getPluginSignals(): Record<string, unknown>;
|
|
481
|
+
export function getPluginChecks(): Record<string, unknown>;
|
|
482
|
+
export function getPluginCommands(): Record<string, unknown>;
|
|
483
|
+
export function resetPluginRegistry(): void;
|
|
484
|
+
|
|
485
|
+
// --- PDF Report ---
|
|
486
|
+
|
|
487
|
+
export function generatePdfHtml(data: Record<string, unknown>, options?: { title?: string; date?: string }): string;
|
|
488
|
+
export function writePdfReport(inputPath: string, outputPath?: string, options?: { title?: string }): Promise<{ outputPath: string; title: string }>;
|
|
489
|
+
|
|
490
|
+
// --- CLI ---
|
|
491
|
+
|
|
492
|
+
export function runCli(args?: string[]): Promise<void>;
|
package/src/index.js
CHANGED
|
@@ -62,3 +62,27 @@ export { buildTrend, renderTrendMarkdown, writeTrendOutput } from "./trend.js";
|
|
|
62
62
|
export { createSharePack, renderSharePackMarkdown, writeSharePackOutput } from "./share-pack.js";
|
|
63
63
|
export { listBundledSkills, renderBundledSkillsMarkdown } from "./skills.js";
|
|
64
64
|
export { analyzeWebsiteUrl, renderWebsiteOnboardingMarkdown, writeWebsiteOnboardingOutput } from "./url-onboarding.js";
|
|
65
|
+
export { analyzeCrawlers, renderCrawlersMarkdown, writeCrawlersOutput } from "./crawlers.js";
|
|
66
|
+
export { analyzeCitability, renderCitabilityMarkdown, writeCitabilityOutput } from "./citability.js";
|
|
67
|
+
export { validateLlmsTxt, renderValidateLlmsMarkdown, writeValidateLlmsOutput } from "./validate-llms.js";
|
|
68
|
+
export { validateSchema, renderValidateSchemaMarkdown, writeValidateSchemaOutput } from "./validate-schema.js";
|
|
69
|
+
export { analyzeEeat, renderEeatMarkdown, writeEeatOutput } from "./eeat.js";
|
|
70
|
+
export { analyzePlatformReadiness, renderPlatformReadyMarkdown, writePlatformReadyOutput } from "./platform-ready.js";
|
|
71
|
+
export { analyzeReadability, renderReadabilityMarkdown, writeReadabilityOutput } from "./readability.js";
|
|
72
|
+
export { analyzeHeadingStructure, renderHeadingStructureMarkdown, writeHeadingStructureOutput } from "./heading-structure.js";
|
|
73
|
+
export { analyzeInternalLinks, renderInternalLinksMarkdown, writeInternalLinksOutput } from "./internal-links.js";
|
|
74
|
+
export { analyzeSocialMeta, renderSocialMetaMarkdown, writeSocialMetaOutput } from "./social-meta.js";
|
|
75
|
+
export { loadConfig, initConfig, mergeConfigWithOptions } from "./config.js";
|
|
76
|
+
export { loadPlugins, getPluginRegistry, getPluginSignals, getPluginChecks, getPluginCommands, resetPluginRegistry } from "./plugins.js";
|
|
77
|
+
export { generatePdfHtml, writePdfReport } from "./pdf-report.js";
|
|
78
|
+
export { fullPageAudit, renderFullPageAuditMarkdown, writeFullPageAuditOutput } from "./full-page-audit.js";
|
|
79
|
+
export { fullAudit, renderFullAuditMarkdown, writeFullAuditOutput } from "./full-audit.js";
|
|
80
|
+
export { analyzeSitemap, renderSitemapMarkdown, writeSitemapOutput } from "./sitemap.js";
|
|
81
|
+
export { analyzeSecurity, renderSecurityMarkdown, writeSecurityOutput } from "./security.js";
|
|
82
|
+
export { analyzeFreshness, renderFreshnessMarkdown, writeFreshnessOutput } from "./freshness.js";
|
|
83
|
+
export { analyzeTopics, renderTopicsMarkdown, writeTopicsOutput } from "./topics.js";
|
|
84
|
+
export { batchFullPageAudit, renderBatchFullPageAuditMarkdown, writeBatchFullPageAuditOutput } from "./batch-full-page-audit.js";
|
|
85
|
+
export { generateAutoFix, renderAutoFixMarkdown, writeAutoFixOutput } from "./auto-fix.js";
|
|
86
|
+
export { diagnose, renderDiagnoseMarkdown, writeDiagnoseOutput } from "./diagnose.js";
|
|
87
|
+
export { comparePages, renderCompareMarkdown, writeCompareOutput } from "./compare.js";
|
|
88
|
+
export { savePageSnapshot, listPageSnapshots, loadPageSnapshot, buildPageTrend, renderPageTrendMarkdown, writePageTrendOutput } from "./page-snapshot.js";
|