@lynxflow/seo-engine 1.4.1 → 1.5.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 (85) hide show
  1. package/README.md +84 -339
  2. package/TUTORIEL_INTEGRATION_SITE.md +283 -0
  3. package/connectors/wordpress/lynxseo-connector.zip +0 -0
  4. package/dist/ad-intelligence-cro.d.ts +58 -0
  5. package/dist/ai-bots-log-analyzer.d.ts +36 -0
  6. package/dist/analytics-client.d.ts +48 -11
  7. package/dist/auth-key.d.ts +9 -0
  8. package/dist/brand-dna-calendar.d.ts +35 -0
  9. package/dist/copy-frameworks-master.d.ts +56 -0
  10. package/dist/cro-copywriting-engine.d.ts +46 -0
  11. package/dist/crosslink-scorer.d.ts +33 -0
  12. package/dist/embeddable-seo-widget.d.ts +12 -0
  13. package/dist/engine.d.ts +29 -1
  14. package/dist/engine.test.d.ts +1 -0
  15. package/dist/extended-schemas.d.ts +106 -0
  16. package/dist/geo-mesh-linking.d.ts +33 -0
  17. package/dist/index.d.ts +88 -0
  18. package/dist/index.js +4162 -128
  19. package/dist/index.mjs +4090 -98
  20. package/dist/instant-matrix-search.d.ts +19 -0
  21. package/dist/isr-cache-manager.d.ts +35 -0
  22. package/dist/knowledge-graph-linker.d.ts +29 -0
  23. package/dist/legal-disclaimers.d.ts +46 -0
  24. package/dist/llm-content-cleaner.d.ts +16 -0
  25. package/dist/llm-prompt.d.ts +13 -0
  26. package/dist/master-marketing-engine.d.ts +114 -0
  27. package/dist/matrix-engine.d.ts +201 -0
  28. package/dist/mcp-seo-server.d.ts +21 -0
  29. package/dist/ngram-density-analyzer.d.ts +35 -0
  30. package/dist/rank-math-parity.d.ts +58 -0
  31. package/dist/real-reviews-sync.d.ts +73 -0
  32. package/dist/rss-syndication-feed.d.ts +25 -0
  33. package/dist/schema-builder.d.ts +6 -0
  34. package/dist/seo-opportunities-decay.d.ts +54 -0
  35. package/dist/serp-history-alerts.d.ts +27 -0
  36. package/dist/slug-engine.d.ts +32 -0
  37. package/dist/social-ads-seo.d.ts +77 -0
  38. package/dist/social-growth-suite.d.ts +125 -0
  39. package/dist/social-trend-seo.d.ts +38 -0
  40. package/dist/social-video-seo.d.ts +62 -0
  41. package/dist/team-rbac.d.ts +17 -0
  42. package/dist/technical-rules-auditor.d.ts +50 -0
  43. package/dist/types.d.ts +4 -44
  44. package/dist/yoast-parity.d.ts +45 -0
  45. package/package.json +8 -5
  46. package/src/ad-intelligence-cro.ts +140 -0
  47. package/src/ai-bots-log-analyzer.ts +127 -0
  48. package/src/analytics-client.ts +222 -48
  49. package/src/auth-key.ts +59 -0
  50. package/src/brand-dna-calendar.ts +120 -0
  51. package/src/copy-frameworks-master.ts +89 -0
  52. package/src/cro-copywriting-engine.ts +105 -0
  53. package/src/crosslink-scorer.ts +101 -0
  54. package/src/embeddable-seo-widget.ts +57 -0
  55. package/src/engine.test.ts +136 -0
  56. package/src/engine.ts +218 -27
  57. package/src/extended-schemas.ts +279 -0
  58. package/src/geo-mesh-linking.ts +93 -0
  59. package/src/index.ts +89 -0
  60. package/src/instant-matrix-search.ts +48 -0
  61. package/src/isr-cache-manager.ts +78 -0
  62. package/src/knowledge-graph-linker.ts +81 -0
  63. package/src/legal-disclaimers.ts +407 -0
  64. package/src/llm-content-cleaner.ts +64 -0
  65. package/src/llm-prompt.ts +70 -0
  66. package/src/master-marketing-engine.ts +314 -0
  67. package/src/matrix-engine.ts +818 -0
  68. package/src/mcp-seo-server.ts +108 -0
  69. package/src/ngram-density-analyzer.ts +108 -0
  70. package/src/rank-math-parity.ts +235 -0
  71. package/src/real-reviews-sync.ts +207 -0
  72. package/src/rss-syndication-feed.ts +56 -0
  73. package/src/schema-builder.ts +71 -24
  74. package/src/seo-opportunities-decay.ts +154 -0
  75. package/src/serp-history-alerts.ts +75 -0
  76. package/src/slug-engine.ts +183 -0
  77. package/src/social-ads-seo.ts +211 -0
  78. package/src/social-growth-suite.ts +310 -0
  79. package/src/social-trend-seo.ts +103 -0
  80. package/src/social-video-seo.ts +100 -0
  81. package/src/team-rbac.ts +61 -0
  82. package/src/technical-rules-auditor.ts +171 -0
  83. package/src/types.ts +22 -47
  84. package/src/yoast-parity.ts +161 -0
  85. package/tsconfig.json +2 -1
@@ -0,0 +1,19 @@
1
+ /**
2
+ * 🔎 Instant In-Memory Matrix Search & Autocomplete ("Buscador") (Inspiration: santifer-irepair)
3
+ *
4
+ * Provides sub-millisecond client-side live filtering and autocomplete across all 8 programmatic matrices.
5
+ */
6
+ export interface SearchableMatrixPage {
7
+ url: string;
8
+ title: string;
9
+ serviceName: string;
10
+ matrixType: string;
11
+ modifierName: string;
12
+ keywords: string[];
13
+ }
14
+ export declare class InstantMatrixSearchEngine {
15
+ /**
16
+ * Fast in-memory search over programmatic pages.
17
+ */
18
+ static search(query: string, pages: SearchableMatrixPage[], limit?: number): SearchableMatrixPage[];
19
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * ⚡ Incremental Static Regeneration (ISR) & Edge Invalidation Cache Manager
3
+ *
4
+ * Implements high-throughput in-memory LRU caching with stale-while-revalidate semantics
5
+ * and selective tag-based invalidation for programmatic pages.
6
+ */
7
+ export interface CacheEntry<T> {
8
+ data: T;
9
+ timestamp: number;
10
+ tags: string[];
11
+ }
12
+ export declare class IsrCacheManager {
13
+ private static cache;
14
+ private static defaultTtlMs;
15
+ /**
16
+ * Retrieves an item from cache, or executes the resolver and caches the result.
17
+ */
18
+ static getOrSet<T>(key: string, resolver: () => Promise<T> | T, tags?: string[], ttlMs?: number): Promise<T>;
19
+ /**
20
+ * Invalidates a specific cache key.
21
+ */
22
+ static invalidateKey(key: string): boolean;
23
+ /**
24
+ * Invalidates all cache entries matching a tag (e.g. "service:crm-pipeline" or "city:lyon").
25
+ */
26
+ static invalidateTag(tag: string): number;
27
+ /**
28
+ * Clears the entire cache.
29
+ */
30
+ static clear(): void;
31
+ /**
32
+ * Returns cache size.
33
+ */
34
+ static size(): number;
35
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * 🧠 Google Knowledge Graph Entity Linker (Inspiration: advertools/knowledge_graph.py)
3
+ *
4
+ * Resolves official Google Entity IDs (`kgmid`), entity types, and Wikidata URIs
5
+ * to maximize semantic authority and Knowledge Panel recognition (Entity SEO).
6
+ */
7
+ export interface KnowledgeGraphEntity {
8
+ name: string;
9
+ kgmid: string;
10
+ types: string[];
11
+ description?: string;
12
+ detailedDescriptionUrl?: string;
13
+ wikidataUri?: string;
14
+ resultScore: number;
15
+ }
16
+ export declare class KnowledgeGraphLinker {
17
+ /**
18
+ * Constructs search query parameters for the Google Knowledge Graph Search API.
19
+ */
20
+ static buildSearchUrl(query: string, apiKey: string, limit?: number, languages?: string[]): string;
21
+ /**
22
+ * Parses Google Knowledge Graph JSON-LD response items into normalized entities.
23
+ */
24
+ static parseApiResponse(jsonResponse: any): KnowledgeGraphEntity[];
25
+ /**
26
+ * Generates Schema.org `sameAs` entity triples combining Google kgmid and Wikipedia/Wikidata.
27
+ */
28
+ static generateEntitySameAsLinks(entity: KnowledgeGraphEntity, customUrls?: string[]): string[];
29
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Global Legal Compliance & Editorial Disclaimer Engine for B2B pSEO
3
+ * Multilingual compliance and anti-disparagement verification across 10+ languages.
4
+ */
5
+ export type DisclaimerType = "comparison" | "pricing" | "feature" | "exclusivity" | "statistics" | "alternative" | "listicle";
6
+ export interface DisclaimerTemplate {
7
+ type: DisclaimerType;
8
+ label: string;
9
+ templateText: string;
10
+ }
11
+ /**
12
+ * Multilingual Disclaimer Templates (English Default + Localized Fallbacks)
13
+ */
14
+ export declare const MULTILINGUAL_DISCLAIMERS: Record<string, Record<DisclaimerType, DisclaimerTemplate>>;
15
+ /**
16
+ * Multilingual Banned & Disparaging Words Dictionary across 10 Languages
17
+ */
18
+ export declare const MULTILINGUAL_BANNED_DISPARAGING_WORDS: Record<string, string[]>;
19
+ export interface LegalEngineOptions {
20
+ companyName?: string;
21
+ correctionsEmail?: string;
22
+ dataStalenessDays?: number;
23
+ language?: string;
24
+ }
25
+ export declare class LegalDisclaimerEngine {
26
+ private companyName;
27
+ private correctionsEmail;
28
+ private dataStalenessDays;
29
+ private defaultLanguage;
30
+ constructor(options?: LegalEngineOptions);
31
+ /**
32
+ * Generates a fully resolved disclaimer note in the target language (defaults to English).
33
+ */
34
+ getDisclaimer(type: DisclaimerType, lastVerifiedDate?: string, language?: string): string;
35
+ /**
36
+ * Evaluates if competitor pricing or feature claim data is older than the allowed staleness window (default: 90 days).
37
+ */
38
+ isDataStale(lastVerifiedDateStr?: string): boolean;
39
+ /**
40
+ * Validates content against disparaging or legally hazardous statements across all supported languages.
41
+ */
42
+ validateCompliance(content: string, competitorName: string, language?: string): {
43
+ isCompliant: boolean;
44
+ warnings: string[];
45
+ };
46
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * 🧹 Boilerplate Stripper & Clean Markdown Extractor for LLMs (Inspiration: openserp/extract)
3
+ *
4
+ * Strips navigation, headers, footers, cookie banners, and advertisements from raw HTML
5
+ * to produce clean, high-density markdown text for AI search ingestion (/llms.txt & ChatGPT).
6
+ */
7
+ export declare class LlmContentCleaner {
8
+ /**
9
+ * Alias: Cleans text or markdown for LLMs.
10
+ */
11
+ static cleanForLlm(content: string): string;
12
+ /**
13
+ * Cleans raw HTML and returns pure readable markdown content.
14
+ */
15
+ static htmlToCleanMarkdown(rawHtml: string): string;
16
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Built-in AI Agent & LLM System Prompt Guide
3
+ * Provides complete operational context for autonomous coding agents (Claude, Cursor, Copilot, ChatGPT, Antigravity)
4
+ * to interact with the SDK without exposing proprietary internal algorithms in public documentation.
5
+ */
6
+ export declare const PSEO_AGENT_SYSTEM_PROMPT: string;
7
+ /**
8
+ * Returns the complete LLM guidance prompt for AI agents and developer copilots.
9
+ */
10
+ export declare function getSeoAgentPrompt(customContext?: {
11
+ brandName?: string;
12
+ domain?: string;
13
+ }): string;
@@ -0,0 +1,114 @@
1
+ /**
2
+ * 👑 Master Marketing Engine (LynxSEO × marketingskills)
3
+ *
4
+ * Implements the complete 50-Skill Marketing & Growth Architecture:
5
+ * 1. Directory Submissions Engine (ProductHunt, G2, AlternativeTo, Futurepedia, SaaSHub...)
6
+ * 2. Grand Slam Offer & Value Stack Builder (Alex Hormozi framework)
7
+ * 3. Viral Referral & Affiliate Growth Loops
8
+ * 4. Multi-Touch Attribution Engine (First, Last, Linear, W-Shaped)
9
+ * 5. Competitor Battlecards & Displacement Generator
10
+ * 6. Churn Prevention & Retention Engine
11
+ * 7. Onboarding & Lifecycle Drip Sequencer
12
+ */
13
+ export interface DirectorySubmissionProfile {
14
+ directoryName: string;
15
+ category: "tier1_launch" | "saas_directories" | "ai_directories" | "review_platforms";
16
+ submissionUrl: string;
17
+ domainRating: number;
18
+ dofollow: boolean;
19
+ requiredFields: {
20
+ title60Chars: string;
21
+ tagline: string;
22
+ shortDescription: string;
23
+ fullDescription: string;
24
+ tags: string[];
25
+ suggestedLandingPagePath: string;
26
+ };
27
+ }
28
+ export interface GrandSlamOffer {
29
+ productName: string;
30
+ dreamOutcome: string;
31
+ perceivedLikelihoodScore: number;
32
+ timeDelayMinutes: number;
33
+ effortScore: number;
34
+ valueScore: number;
35
+ corePrice: number;
36
+ bonusStack: {
37
+ title: string;
38
+ perceivedValueEur: number;
39
+ description: string;
40
+ }[];
41
+ totalPerceivedValueEur: number;
42
+ guaranteeText: string;
43
+ scarcityText: string;
44
+ }
45
+ export interface CompetitorBattlecard {
46
+ competitorName: string;
47
+ competitorPriceMonthly: number;
48
+ lynxSeoPriceMonthly: number;
49
+ annualSavingsEur: number;
50
+ keyWeaknessesToExploit: string[];
51
+ ourUnfairAdvantages: string[];
52
+ killerSwitchingArgument: string;
53
+ objectionHandlers: {
54
+ objection: string;
55
+ winningResponse: string;
56
+ }[];
57
+ }
58
+ export declare class MasterMarketingEngine {
59
+ /**
60
+ * 1. Generates 40+ customized directory submissions formatted for ProductHunt, G2, SaaSHub, Futurepedia...
61
+ */
62
+ static generateDirectoryListings(domain?: string, brandName?: string): DirectorySubmissionProfile[];
63
+ /**
64
+ * 2. Builds a Grand Slam Offer (Alex Hormozi Value Equation).
65
+ */
66
+ static buildGrandSlamOffer(serviceName?: string): GrandSlamOffer;
67
+ /**
68
+ * 3. Generates Competitor Battlecard (Semrush, Ahrefs, HubSpot, Jasper).
69
+ */
70
+ static generateCompetitorBattlecard(competitor: "semrush" | "ahrefs" | "jasper"): CompetitorBattlecard;
71
+ /**
72
+ * 4. Multi-Touch Attribution Calculator (First Touch, Last Touch, Linear, W-Shaped).
73
+ */
74
+ static calculateAttribution(touchpoints: {
75
+ source: string;
76
+ channel: "organic_seo" | "ai_search" | "direct" | "referral";
77
+ }[], dealValueEur: number): {
78
+ dealValueEur?: undefined;
79
+ touchpointsCount?: undefined;
80
+ firstTouch?: undefined;
81
+ lastTouch?: undefined;
82
+ linearValuePerTouch?: undefined;
83
+ wShapedBreakdown?: undefined;
84
+ } | {
85
+ dealValueEur: number;
86
+ touchpointsCount: number;
87
+ firstTouch: {
88
+ source: string;
89
+ valueEur: number;
90
+ };
91
+ lastTouch: {
92
+ source: string;
93
+ valueEur: number;
94
+ };
95
+ linearValuePerTouch: number;
96
+ wShapedBreakdown: {
97
+ source: string;
98
+ channel: "ai_search" | "direct" | "referral" | "organic_seo";
99
+ attributedEur: number;
100
+ }[];
101
+ };
102
+ /**
103
+ * 5. Churn Prevention & Retention Engine.
104
+ */
105
+ static evaluateChurnRisk(signals: {
106
+ daysSinceLastLogin: number;
107
+ pagesGeneratedThisMonth: number;
108
+ rankDropAlertsCount: number;
109
+ }): {
110
+ riskScore: number;
111
+ riskLevel: string;
112
+ recommendedAction: string;
113
+ };
114
+ }
@@ -0,0 +1,201 @@
1
+ /**
2
+ * Global Multilingual Programmatic SEO Matrix Engine
3
+ * Defaults to English with international localization support across 10+ languages (EN, FR, DE, ES, IT, PT, NL, etc.)
4
+ *
5
+ * Implements strict SEO golden rules:
6
+ * - Clean canonical URL paths (no keyword stuttering, no stop words across 10+ languages)
7
+ * - Anti-cannibalization target clustering
8
+ * - Google Rich Result Schema.org Graphs (SoftwareApplication, LocalBusiness, HowTo, FAQ, Breadcrumbs)
9
+ * - SeedRank legal compliance disclaimers & staleness checks
10
+ * - Tiered Indexing (crawl budget protection) & Geodesic Mesh Linking
11
+ */
12
+ export type MatrixFamily = "local-geo" | "vs-comparison" | "alternative" | "pricing" | "target" | "industry" | "persona" | "integration" | "use-case" | "template" | "glossary" | "calculator";
13
+ export interface PseoService {
14
+ slug: string;
15
+ name: string;
16
+ category: string;
17
+ description: string;
18
+ keyFeatures: string[];
19
+ priceMonthly?: number;
20
+ }
21
+ export interface PseoLocation {
22
+ slug: string;
23
+ name: string;
24
+ region: string;
25
+ country: string;
26
+ currency: string;
27
+ currencySymbol: string;
28
+ population?: number;
29
+ latitude?: number;
30
+ longitude?: number;
31
+ neighborSlugs?: string[];
32
+ }
33
+ export interface PseoCompetitor {
34
+ slug: string;
35
+ name: string;
36
+ category: string;
37
+ drawbacks: string[];
38
+ advantagesOver: string[];
39
+ startingPrice?: number;
40
+ pricingUrl?: string;
41
+ lastVerifiedDate?: string;
42
+ }
43
+ export interface PseoTarget {
44
+ slug: string;
45
+ name: string;
46
+ type: "industry" | "role";
47
+ painPoints: string[];
48
+ benefits: string[];
49
+ workflowSteps?: string[];
50
+ }
51
+ export interface PseoIndustry {
52
+ slug: string;
53
+ name: string;
54
+ category?: string;
55
+ singular?: string;
56
+ painPoints?: string[];
57
+ benefits?: string[];
58
+ }
59
+ export interface PseoPersona {
60
+ slug: string;
61
+ role: string;
62
+ department?: string;
63
+ responsibilities?: string[];
64
+ }
65
+ export interface PseoIntegration {
66
+ slug: string;
67
+ name: string;
68
+ category: string;
69
+ syncFeatures: string[];
70
+ }
71
+ export interface PseoUseCase {
72
+ slug: string;
73
+ title: string;
74
+ problem: string;
75
+ solutionWorkflow: string[];
76
+ expectedRoi: string;
77
+ }
78
+ export interface PseoTemplate {
79
+ slug: string;
80
+ title: string;
81
+ topic: string;
82
+ format: "excel" | "sheets" | "notion" | "word" | "pdf";
83
+ downloadUrl?: string;
84
+ benefits: string[];
85
+ }
86
+ export interface PseoGlossaryTerm {
87
+ slug: string;
88
+ term: string;
89
+ shortDefinition: string;
90
+ fullMarkdown?: string;
91
+ relatedTermsSlugs?: string[];
92
+ }
93
+ export interface PseoCalculator {
94
+ slug: string;
95
+ title: string;
96
+ formulaDescription: string;
97
+ savingsMetric: string;
98
+ }
99
+ export interface SchemaOrgGraph {
100
+ "@context": "https://schema.org";
101
+ "@graph": Record<string, unknown>[];
102
+ }
103
+ export interface GeneratedPageMeta {
104
+ matrixFamily: MatrixFamily;
105
+ urlPath: string;
106
+ canonicalUrl: string;
107
+ title: string;
108
+ description: string;
109
+ h1: string;
110
+ robots: "index, follow" | "noindex, follow";
111
+ schemaGraph: SchemaOrgGraph;
112
+ disclaimerText?: string;
113
+ neighboringLinks?: {
114
+ name: string;
115
+ url: string;
116
+ }[];
117
+ service?: PseoService;
118
+ location?: PseoLocation;
119
+ competitor?: PseoCompetitor;
120
+ target?: PseoTarget;
121
+ integration?: PseoIntegration;
122
+ useCase?: PseoUseCase;
123
+ template?: PseoTemplate;
124
+ glossary?: PseoGlossaryTerm;
125
+ calculator?: PseoCalculator;
126
+ }
127
+ export interface MatrixOptions {
128
+ brandName: string;
129
+ language?: string;
130
+ minPopulationToIndex?: number;
131
+ defaultCurrency?: string;
132
+ defaultCurrencySymbol?: string;
133
+ organizationSameAs?: string[];
134
+ correctionsEmail?: string;
135
+ }
136
+ export declare class PseoMatrixEngine {
137
+ private legalEngine;
138
+ constructor(legalOptions?: {
139
+ correctionsEmail?: string;
140
+ companyName?: string;
141
+ language?: string;
142
+ });
143
+ /**
144
+ * Helper: Resolves route prefixes according to language (English default).
145
+ */
146
+ private getPrefix;
147
+ /**
148
+ * 1. Local & GEO Matrix (`/solutions/{service}/{country}/{city}`)
149
+ */
150
+ generateLocalGeoMatrix(domain: string, services: PseoService[], locations: PseoLocation[], options: MatrixOptions): GeneratedPageMeta[];
151
+ /**
152
+ * 2. VS Comparisons Matrix (`/vs/{competitor}` in English default)
153
+ */
154
+ generateVsMatrix(domain: string, competitors: PseoCompetitor[], options: MatrixOptions): GeneratedPageMeta[];
155
+ /**
156
+ * 3. Alternatives Matrix (`/alternatives/{competitor}`)
157
+ */
158
+ generateAlternativesMatrix(domain: string, competitors: PseoCompetitor[], options: MatrixOptions): GeneratedPageMeta[];
159
+ /**
160
+ * 4. Pricing Matrix (`/pricing/{competitor}` in English default)
161
+ */
162
+ generatePricingMatrix(domain: string, competitors: PseoCompetitor[], options: MatrixOptions): GeneratedPageMeta[];
163
+ /**
164
+ * 5. Unified Target Audience Matrix (`/for/{target}` in English default)
165
+ */
166
+ generateTargetMatrix(domain: string, targets: PseoTarget[], options: MatrixOptions): GeneratedPageMeta[];
167
+ /**
168
+ * 6. Integrations Matrix (`/integrations/{software}`)
169
+ */
170
+ generateIntegrationMatrix(domain: string, integrations: PseoIntegration[], options: MatrixOptions): GeneratedPageMeta[];
171
+ /**
172
+ * 7. Use Cases Matrix (`/use-cases/{useCase}` in English default)
173
+ */
174
+ generateUseCaseMatrix(domain: string, useCases: PseoUseCase[], options: MatrixOptions): GeneratedPageMeta[];
175
+ /**
176
+ * 8. Templates & Lead Magnets Matrix (`/templates/{slug}` in English default)
177
+ */
178
+ generateTemplateMatrix(domain: string, templates: PseoTemplate[], options: MatrixOptions): GeneratedPageMeta[];
179
+ /**
180
+ * 9. Glossary Matrix (`/glossary/{term}` in English default)
181
+ */
182
+ generateGlossaryMatrix(domain: string, terms: PseoGlossaryTerm[], options: MatrixOptions): GeneratedPageMeta[];
183
+ /**
184
+ * 10. Tools & Calculators Matrix (`/tools/{calculator}` in English default)
185
+ */
186
+ generateCalculatorMatrix(domain: string, calculators: PseoCalculator[], options: MatrixOptions): GeneratedPageMeta[];
187
+ /**
188
+ * Master Generator: Produces all programmatic families simultaneously.
189
+ */
190
+ generateAllMatrices(domain: string, data: {
191
+ services?: PseoService[];
192
+ locations?: PseoLocation[];
193
+ competitors?: PseoCompetitor[];
194
+ targets?: PseoTarget[];
195
+ integrations?: PseoIntegration[];
196
+ useCases?: PseoUseCase[];
197
+ templates?: PseoTemplate[];
198
+ glossaryTerms?: PseoGlossaryTerm[];
199
+ calculators?: PseoCalculator[];
200
+ }, options: MatrixOptions): GeneratedPageMeta[];
201
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * 🤖 Model Context Protocol (MCP) Native Server for LynxSEO (Inspiration: spider/spider_mcp)
3
+ *
4
+ * Exposes LynxSEO capabilities as standardized MCP Tools for autonomous AI Agents
5
+ * (Claude Desktop, Cursor, Antigravity, OpenRouter).
6
+ */
7
+ export interface McpToolDefinition {
8
+ name: string;
9
+ description: string;
10
+ inputSchema: Record<string, unknown>;
11
+ }
12
+ export declare class McpSeoServerHub {
13
+ /**
14
+ * Returns all available LynxSEO tool definitions for MCP clients.
15
+ */
16
+ static getRegisteredTools(): McpToolDefinition[];
17
+ /**
18
+ * Handles tool execution requests from MCP agents.
19
+ */
20
+ static handleToolCall(toolName: string, args: Record<string, any>): Promise<any>;
21
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * 📊 N-Gram Density & Weighted Lexical Frequency Analyzer (Inspiration: advertools/word_frequency.py)
3
+ *
4
+ * Computes 1-gram, 2-gram (bigrams), and 3-gram (trigrams) frequency and density percentages
5
+ * to detect keyword stuffing (> 3.5%) and identify high-value missing co-occurrences.
6
+ */
7
+ export interface NGramMetric {
8
+ phrase: string;
9
+ count: number;
10
+ densityPercentage: number;
11
+ length: number;
12
+ }
13
+ export interface LexicalAnalysisReport {
14
+ totalWords: number;
15
+ topUnigrams: NGramMetric[];
16
+ topBigrams: NGramMetric[];
17
+ topTrigrams: NGramMetric[];
18
+ keywordStuffingAlerts: NGramMetric[];
19
+ }
20
+ export declare class NGramDensityAnalyzer {
21
+ private static stopwords;
22
+ /**
23
+ * Cleans text and tokenizes into words.
24
+ */
25
+ static tokenize(text: string): string[];
26
+ /**
27
+ * Generates N-Grams of specified length.
28
+ */
29
+ static generateNGrams(tokens: string[], n: number): string[];
30
+ /**
31
+ * Analyzes an HTML or text payload for N-Gram frequencies and density.
32
+ */
33
+ static analyzeText(text: string): LexicalAnalysisReport;
34
+ private static countAndRank;
35
+ }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * 👑 Rank Math Parity & Real-Time Content SEO Score Engine
3
+ *
4
+ * Implements the core features that made Rank Math famous (3M+ installs):
5
+ * 1. Real-Time 0-100 On-Page Content SEO Score (Checklist: Title, Slug, H2, Density, Words, Internal/External links)
6
+ * 2. 301/302/410 Redirection Manager & 404 Error Monitor
7
+ * 3. AI Image Alt Text Generator (Keyword-rich accessibility attributes)
8
+ * 4. Robots.txt Generator & AI Crawlers Rule Validator
9
+ */
10
+ export interface OnPageCheckItem {
11
+ id: string;
12
+ category: "basic_seo" | "additional_seo" | "title_readability" | "content_readability";
13
+ label: string;
14
+ passed: boolean;
15
+ scoreImpact: number;
16
+ tip: string;
17
+ }
18
+ export interface OnPageSeoScoreResult {
19
+ score: number;
20
+ grade: "poor" | "fair" | "good" | "great";
21
+ focusKeyword: string;
22
+ wordCount: number;
23
+ keywordDensityPercent: number;
24
+ checklist: OnPageCheckItem[];
25
+ criticalFixes: string[];
26
+ }
27
+ export interface RedirectRule {
28
+ id: string;
29
+ sourcePath: string;
30
+ destinationUrl: string;
31
+ statusCode: 301 | 302 | 307 | 410 | 451;
32
+ isActive: boolean;
33
+ hitsCount: number;
34
+ createdAt: string;
35
+ }
36
+ export declare class RankMathParityEngine {
37
+ /**
38
+ * 1. Calculates the exact 0-100 Real-Time On-Page Content SEO Score (Rank Math Benchmark).
39
+ */
40
+ static calculateOnPageScore(opts: {
41
+ focusKeyword: string;
42
+ title: string;
43
+ description: string;
44
+ slug: string;
45
+ htmlOrMarkdownContent: string;
46
+ imagesCount?: number;
47
+ hasInternalLinks?: boolean;
48
+ hasExternalLinks?: boolean;
49
+ }): OnPageSeoScoreResult;
50
+ /**
51
+ * 2. Generates SEO-rich Alt text for images based on surrounding context.
52
+ */
53
+ static generateImageAltText(imageFilename: string, pageTopic: string, serviceName: string): string;
54
+ /**
55
+ * 3. Generates optimal robots.txt rules including Search Engine & AI bot crawler directives.
56
+ */
57
+ static generateRobotsTxt(domain: string, allowAiBots?: boolean): string;
58
+ }
@@ -0,0 +1,73 @@
1
+ /**
2
+ * 🌟 Real Reviews & Star Ratings Ingestion Engine
3
+ *
4
+ * Official Compliance with Google Search Central Review Snippet Guidelines:
5
+ * 1. Requires reviews to be visibly rendered in the DOM (`generateVisibleReviewsHtmlBlock`).
6
+ * 2. Restricts AggregateRating to legitimate non-self-serving entities (Product, SoftwareApplication).
7
+ * 3. Pulls live authentic review records from Google Places API (New), Trustpilot API or DataForSEO.
8
+ */
9
+ export interface VerifiedReview {
10
+ id: string;
11
+ source: "google_places" | "trustpilot" | "g2" | "producthunt" | "verified_customer";
12
+ authorName: string;
13
+ ratingValue: number;
14
+ reviewText: string;
15
+ datePublished: string;
16
+ verifiedPurchase?: boolean;
17
+ }
18
+ export interface RealAggregateRating {
19
+ ratingValue: string;
20
+ reviewCount: string;
21
+ bestRating: "5";
22
+ worstRating: "1";
23
+ ratingDistribution: {
24
+ 5: number;
25
+ 4: number;
26
+ 3: number;
27
+ 2: number;
28
+ 1: number;
29
+ };
30
+ sampleReviews: VerifiedReview[];
31
+ }
32
+ export declare class RealReviewsSyncEngine {
33
+ /**
34
+ * 1. Fetches authentic reviews directly from Google Places API (New).
35
+ * Endpoint: https://places.googleapis.com/v1/places/{PLACE_ID}?fields=rating,userRatingCount,reviews&key={API_KEY}
36
+ */
37
+ static fetchGooglePlacesReviews(opts: {
38
+ placeId: string;
39
+ googleApiKey: string;
40
+ languageCode?: string;
41
+ }): Promise<{
42
+ aggregate: RealAggregateRating | null;
43
+ reviews: VerifiedReview[];
44
+ }>;
45
+ /**
46
+ * 2. Computes real AggregateRating & distribution from an array of verified reviews.
47
+ */
48
+ static computeAggregateFromReviews(reviews: VerifiedReview[]): RealAggregateRating | null;
49
+ /**
50
+ * 3. Transforms raw DataForSEO or custom reviews into VerifiedReview format.
51
+ */
52
+ static mapGoogleBusinessReviews(rawGoogleReviews: Array<{
53
+ author_title?: string;
54
+ rating?: {
55
+ value?: number;
56
+ };
57
+ review_text?: string;
58
+ time_ago?: string;
59
+ timestamp?: string;
60
+ }>): VerifiedReview[];
61
+ /**
62
+ * 4. Converts verified reviews into Google Schema.org Review[] JSON-LD objects.
63
+ */
64
+ static toSchemaOrgReviews(reviews: VerifiedReview[]): Record<string, unknown>[];
65
+ /**
66
+ * 5. Generates the mandatory visible HTML review widget for the web page.
67
+ * Google Strict Requirement: Marked up reviews MUST be visible in the page content.
68
+ */
69
+ static generateVisibleReviewsHtmlBlock(opts: {
70
+ aggregate: RealAggregateRating;
71
+ productName: string;
72
+ }): string;
73
+ }