@agentsean/analyzers 1.0.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 (158) hide show
  1. package/LICENSE +661 -0
  2. package/dist/ai-crawlers.d.ts +19 -0
  3. package/dist/ai-crawlers.d.ts.map +1 -0
  4. package/dist/ai-crawlers.js +111 -0
  5. package/dist/ai-crawlers.js.map +1 -0
  6. package/dist/audit.d.ts +21 -0
  7. package/dist/audit.d.ts.map +1 -0
  8. package/dist/audit.js +87 -0
  9. package/dist/audit.js.map +1 -0
  10. package/dist/catalogue-data.d.ts +4 -0
  11. package/dist/catalogue-data.d.ts.map +1 -0
  12. package/dist/catalogue-data.js +5103 -0
  13. package/dist/catalogue-data.js.map +1 -0
  14. package/dist/catalogue.d.ts +6 -0
  15. package/dist/catalogue.d.ts.map +1 -0
  16. package/dist/catalogue.js +25 -0
  17. package/dist/catalogue.js.map +1 -0
  18. package/dist/data/checks.json +5078 -0
  19. package/dist/data/lighthouse-13-insights.json +40 -0
  20. package/dist/data/schemaorg-vocab.json +89 -0
  21. package/dist/data/supported_types.json +71 -0
  22. package/dist/detectors/all.d.ts +30 -0
  23. package/dist/detectors/all.d.ts.map +1 -0
  24. package/dist/detectors/all.js +1619 -0
  25. package/dist/detectors/all.js.map +1 -0
  26. package/dist/detectors/canon.d.ts +2 -0
  27. package/dist/detectors/canon.d.ts.map +1 -0
  28. package/dist/detectors/canon.js +2 -0
  29. package/dist/detectors/canon.js.map +1 -0
  30. package/dist/detectors/conf.d.ts +2 -0
  31. package/dist/detectors/conf.d.ts.map +1 -0
  32. package/dist/detectors/conf.js +2 -0
  33. package/dist/detectors/conf.js.map +1 -0
  34. package/dist/detectors/crawl.d.ts +2 -0
  35. package/dist/detectors/crawl.d.ts.map +1 -0
  36. package/dist/detectors/crawl.js +2 -0
  37. package/dist/detectors/crawl.js.map +1 -0
  38. package/dist/detectors/cwv.d.ts +2 -0
  39. package/dist/detectors/cwv.d.ts.map +1 -0
  40. package/dist/detectors/cwv.js +2 -0
  41. package/dist/detectors/cwv.js.map +1 -0
  42. package/dist/detectors/direct.d.ts +2 -0
  43. package/dist/detectors/direct.d.ts.map +1 -0
  44. package/dist/detectors/direct.js +2 -0
  45. package/dist/detectors/direct.js.map +1 -0
  46. package/dist/detectors/dup.d.ts +2 -0
  47. package/dist/detectors/dup.d.ts.map +1 -0
  48. package/dist/detectors/dup.js +2 -0
  49. package/dist/detectors/dup.js.map +1 -0
  50. package/dist/detectors/gap.d.ts +2 -0
  51. package/dist/detectors/gap.d.ts.map +1 -0
  52. package/dist/detectors/gap.js +2 -0
  53. package/dist/detectors/gap.js.map +1 -0
  54. package/dist/detectors/href.d.ts +2 -0
  55. package/dist/detectors/href.d.ts.map +1 -0
  56. package/dist/detectors/href.js +2 -0
  57. package/dist/detectors/href.js.map +1 -0
  58. package/dist/detectors/img.d.ts +2 -0
  59. package/dist/detectors/img.d.ts.map +1 -0
  60. package/dist/detectors/img.js +2 -0
  61. package/dist/detectors/img.js.map +1 -0
  62. package/dist/detectors/index.d.ts +27 -0
  63. package/dist/detectors/index.d.ts.map +1 -0
  64. package/dist/detectors/index.js +27 -0
  65. package/dist/detectors/index.js.map +1 -0
  66. package/dist/detectors/js.d.ts +2 -0
  67. package/dist/detectors/js.d.ts.map +1 -0
  68. package/dist/detectors/js.js +2 -0
  69. package/dist/detectors/js.js.map +1 -0
  70. package/dist/detectors/link.d.ts +2 -0
  71. package/dist/detectors/link.d.ts.map +1 -0
  72. package/dist/detectors/link.js +2 -0
  73. package/dist/detectors/link.js.map +1 -0
  74. package/dist/detectors/log.d.ts +2 -0
  75. package/dist/detectors/log.d.ts.map +1 -0
  76. package/dist/detectors/log.js +2 -0
  77. package/dist/detectors/log.js.map +1 -0
  78. package/dist/detectors/mig.d.ts +2 -0
  79. package/dist/detectors/mig.d.ts.map +1 -0
  80. package/dist/detectors/mig.js +2 -0
  81. package/dist/detectors/mig.js.map +1 -0
  82. package/dist/detectors/mob.d.ts +2 -0
  83. package/dist/detectors/mob.d.ts.map +1 -0
  84. package/dist/detectors/mob.js +2 -0
  85. package/dist/detectors/mob.js.map +1 -0
  86. package/dist/detectors/onp.d.ts +2 -0
  87. package/dist/detectors/onp.d.ts.map +1 -0
  88. package/dist/detectors/onp.js +2 -0
  89. package/dist/detectors/onp.js.map +1 -0
  90. package/dist/detectors/page.d.ts +2 -0
  91. package/dist/detectors/page.d.ts.map +1 -0
  92. package/dist/detectors/page.js +2 -0
  93. package/dist/detectors/page.js.map +1 -0
  94. package/dist/detectors/param.d.ts +2 -0
  95. package/dist/detectors/param.d.ts.map +1 -0
  96. package/dist/detectors/param.js +2 -0
  97. package/dist/detectors/param.js.map +1 -0
  98. package/dist/detectors/perf.d.ts +2 -0
  99. package/dist/detectors/perf.d.ts.map +1 -0
  100. package/dist/detectors/perf.js +2 -0
  101. package/dist/detectors/perf.js.map +1 -0
  102. package/dist/detectors/predicates.d.ts +22 -0
  103. package/dist/detectors/predicates.d.ts.map +1 -0
  104. package/dist/detectors/predicates.js +142 -0
  105. package/dist/detectors/predicates.js.map +1 -0
  106. package/dist/detectors/resp.d.ts +2 -0
  107. package/dist/detectors/resp.d.ts.map +1 -0
  108. package/dist/detectors/resp.js +2 -0
  109. package/dist/detectors/resp.js.map +1 -0
  110. package/dist/detectors/robots.d.ts +2 -0
  111. package/dist/detectors/robots.d.ts.map +1 -0
  112. package/dist/detectors/robots.js +2 -0
  113. package/dist/detectors/robots.js.map +1 -0
  114. package/dist/detectors/sd.d.ts +2 -0
  115. package/dist/detectors/sd.d.ts.map +1 -0
  116. package/dist/detectors/sd.js +2 -0
  117. package/dist/detectors/sd.js.map +1 -0
  118. package/dist/detectors/sec.d.ts +2 -0
  119. package/dist/detectors/sec.d.ts.map +1 -0
  120. package/dist/detectors/sec.js +2 -0
  121. package/dist/detectors/sec.js.map +1 -0
  122. package/dist/detectors/smap.d.ts +2 -0
  123. package/dist/detectors/smap.d.ts.map +1 -0
  124. package/dist/detectors/smap.js +2 -0
  125. package/dist/detectors/smap.js.map +1 -0
  126. package/dist/detectors/soft404.d.ts +2 -0
  127. package/dist/detectors/soft404.d.ts.map +1 -0
  128. package/dist/detectors/soft404.js +2 -0
  129. package/dist/detectors/soft404.js.map +1 -0
  130. package/dist/detectors/thin.d.ts +2 -0
  131. package/dist/detectors/thin.d.ts.map +1 -0
  132. package/dist/detectors/thin.js +2 -0
  133. package/dist/detectors/thin.js.map +1 -0
  134. package/dist/index.d.ts +10 -0
  135. package/dist/index.d.ts.map +1 -0
  136. package/dist/index.js +9 -0
  137. package/dist/index.js.map +1 -0
  138. package/dist/openseo-seed.d.ts +16 -0
  139. package/dist/openseo-seed.d.ts.map +1 -0
  140. package/dist/openseo-seed.js +157 -0
  141. package/dist/openseo-seed.js.map +1 -0
  142. package/dist/priority.d.ts +8 -0
  143. package/dist/priority.d.ts.map +1 -0
  144. package/dist/priority.js +53 -0
  145. package/dist/priority.js.map +1 -0
  146. package/dist/schemaorg.d.ts +28 -0
  147. package/dist/schemaorg.d.ts.map +1 -0
  148. package/dist/schemaorg.js +198 -0
  149. package/dist/schemaorg.js.map +1 -0
  150. package/dist/score.d.ts +10 -0
  151. package/dist/score.d.ts.map +1 -0
  152. package/dist/score.js +177 -0
  153. package/dist/score.js.map +1 -0
  154. package/dist/types.d.ts +109 -0
  155. package/dist/types.d.ts.map +1 -0
  156. package/dist/types.js +2 -0
  157. package/dist/types.js.map +1 -0
  158. package/package.json +51 -0
@@ -0,0 +1,28 @@
1
+ import type { JsonLdBlock } from "@agentsean/crawler";
2
+ type Vocab = {
3
+ version: string;
4
+ types: Record<string, string[]>;
5
+ enums: Record<string, string[]>;
6
+ };
7
+ type Supported = {
8
+ version: string;
9
+ fetched: string;
10
+ supported: string[];
11
+ deprecated: Record<string, string>;
12
+ features: Record<string, {
13
+ required: string[];
14
+ recommended: string[];
15
+ }>;
16
+ };
17
+ export declare function schemaVocab(): Vocab;
18
+ export declare function googleSupportedTypes(): Supported;
19
+ export type JsonLdIssue = {
20
+ code: "PARSE_ERROR" | "MISSING_CONTEXT" | "MISSING_TYPE" | "UNKNOWN_TYPE" | "TYPE_DEPRECATED" | "MISSING_REQUIRED_PROP" | "MISSING_RECOMMENDED_PROP" | "INVALID_ENUM" | "INVALID_DATE" | "INVALID_DURATION";
21
+ message: string;
22
+ type: string | null;
23
+ property: string | null;
24
+ };
25
+ export declare function validateJsonLdBlocks(blocks: JsonLdBlock[]): JsonLdIssue[];
26
+ export declare function flattenTypes(node: unknown, acc?: string[]): string[];
27
+ export {};
28
+ //# sourceMappingURL=schemaorg.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaorg.d.ts","sourceRoot":"","sources":["../src/schemaorg.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACjC,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;QAAC,WAAW,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CACzE,CAAC;AAsBF,wBAAgB,WAAW,IAAI,KAAK,CAGnC;AAED,wBAAgB,oBAAoB,IAAI,SAAS,CAGhD;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EACA,aAAa,GACb,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,iBAAiB,GACjB,uBAAuB,GACvB,0BAA0B,GAC1B,cAAc,GACd,cAAc,GACd,kBAAkB,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CAezE;AAyID,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,GAAE,MAAM,EAAO,GAAG,MAAM,EAAE,CAexE"}
@@ -0,0 +1,198 @@
1
+ import { readFileSync } from "node:fs";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ function loadJson(name) {
5
+ const here = path.dirname(fileURLToPath(import.meta.url));
6
+ const candidates = [
7
+ path.join(here, "data", name),
8
+ path.join(here, "../src/data", name),
9
+ path.join(here, "../../src/data", name),
10
+ ];
11
+ for (const p of candidates) {
12
+ try {
13
+ return JSON.parse(readFileSync(p, "utf8"));
14
+ }
15
+ catch {
16
+ /* try next */
17
+ }
18
+ }
19
+ throw new Error(`missing data file ${name}`);
20
+ }
21
+ let vocabCache;
22
+ let supportedCache;
23
+ export function schemaVocab() {
24
+ vocabCache ??= loadJson("schemaorg-vocab.json");
25
+ return vocabCache;
26
+ }
27
+ export function googleSupportedTypes() {
28
+ supportedCache ??= loadJson("supported_types.json");
29
+ return supportedCache;
30
+ }
31
+ export function validateJsonLdBlocks(blocks) {
32
+ const issues = [];
33
+ for (const block of blocks) {
34
+ if (block.error) {
35
+ issues.push({
36
+ code: "PARSE_ERROR",
37
+ message: block.error,
38
+ type: null,
39
+ property: null,
40
+ });
41
+ continue;
42
+ }
43
+ issues.push(...validateNode(block.parsed));
44
+ }
45
+ return issues;
46
+ }
47
+ function validateNode(node, acc = []) {
48
+ if (Array.isArray(node)) {
49
+ for (const n of node)
50
+ validateNode(n, acc);
51
+ return acc;
52
+ }
53
+ if (!node || typeof node !== "object")
54
+ return acc;
55
+ const obj = node;
56
+ if (obj["@graph"]) {
57
+ validateNode(obj["@graph"], acc);
58
+ return acc;
59
+ }
60
+ const ctx = obj["@context"];
61
+ const typeVal = obj["@type"];
62
+ if (ctx === undefined) {
63
+ acc.push({
64
+ code: "MISSING_CONTEXT",
65
+ message: "No @context",
66
+ type: null,
67
+ property: "@context",
68
+ });
69
+ }
70
+ else if (typeof ctx === "string" && !ctx.includes("schema.org")) {
71
+ acc.push({
72
+ code: "MISSING_CONTEXT",
73
+ message: `@context is not schema.org: ${ctx}`,
74
+ type: null,
75
+ property: "@context",
76
+ });
77
+ }
78
+ if (typeVal === undefined) {
79
+ acc.push({
80
+ code: "MISSING_TYPE",
81
+ message: "No @type",
82
+ type: null,
83
+ property: "@type",
84
+ });
85
+ return acc;
86
+ }
87
+ const types = Array.isArray(typeVal) ? typeVal.map(String) : [String(typeVal)];
88
+ const vocab = schemaVocab();
89
+ const gallery = googleSupportedTypes();
90
+ for (const t of types) {
91
+ const short = t.replace(/^https?:\/\/schema\.org\//, "");
92
+ if (!(short in vocab.types) && !gallery.supported.includes(short)) {
93
+ acc.push({
94
+ code: "UNKNOWN_TYPE",
95
+ message: `Unknown @type ${short}`,
96
+ type: short,
97
+ property: "@type",
98
+ });
99
+ }
100
+ if (short in gallery.deprecated) {
101
+ acc.push({
102
+ code: "TYPE_DEPRECATED",
103
+ message: gallery.deprecated[short] ?? "deprecated",
104
+ type: short,
105
+ property: "@type",
106
+ });
107
+ }
108
+ const feature = gallery.features[short];
109
+ if (feature) {
110
+ for (const req of feature.required) {
111
+ if (obj[req] === undefined) {
112
+ acc.push({
113
+ code: "MISSING_REQUIRED_PROP",
114
+ message: `${short} missing required ${req}`,
115
+ type: short,
116
+ property: req,
117
+ });
118
+ }
119
+ }
120
+ for (const rec of feature.recommended) {
121
+ if (obj[rec] === undefined) {
122
+ acc.push({
123
+ code: "MISSING_RECOMMENDED_PROP",
124
+ message: `${short} missing recommended ${rec}`,
125
+ type: short,
126
+ property: rec,
127
+ });
128
+ }
129
+ }
130
+ }
131
+ if (typeof obj["availability"] === "string") {
132
+ const allowed = vocab.enums["ItemAvailability"] ?? [];
133
+ const v = String(obj["availability"]);
134
+ if (allowed.length &&
135
+ !allowed.includes(v) &&
136
+ !allowed.includes(`https://schema.org/${v}`)) {
137
+ acc.push({
138
+ code: "INVALID_ENUM",
139
+ message: `Bad availability ${v}`,
140
+ type: short,
141
+ property: "availability",
142
+ });
143
+ }
144
+ }
145
+ for (const key of [
146
+ "datePublished",
147
+ "dateModified",
148
+ "startDate",
149
+ "endDate",
150
+ "datePosted",
151
+ ]) {
152
+ const v = obj[key];
153
+ if (typeof v === "string" && !isIsoDate(v)) {
154
+ acc.push({
155
+ code: "INVALID_DATE",
156
+ message: `${key} is not ISO 8601`,
157
+ type: short,
158
+ property: key,
159
+ });
160
+ }
161
+ }
162
+ for (const key of ["prepTime", "cookTime", "duration"]) {
163
+ const v = obj[key];
164
+ if (typeof v === "string" && !v.startsWith("P")) {
165
+ acc.push({
166
+ code: "INVALID_DURATION",
167
+ message: `${key} is not ISO 8601 duration`,
168
+ type: short,
169
+ property: key,
170
+ });
171
+ }
172
+ }
173
+ }
174
+ return acc;
175
+ }
176
+ function isIsoDate(v) {
177
+ return /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/.test(v);
178
+ }
179
+ export function flattenTypes(node, acc = []) {
180
+ if (Array.isArray(node)) {
181
+ for (const n of node)
182
+ flattenTypes(n, acc);
183
+ return acc;
184
+ }
185
+ if (!node || typeof node !== "object")
186
+ return acc;
187
+ const obj = node;
188
+ if (obj["@graph"])
189
+ return flattenTypes(obj["@graph"], acc);
190
+ const t = obj["@type"];
191
+ if (t) {
192
+ for (const x of Array.isArray(t) ? t : [t]) {
193
+ acc.push(String(x).replace(/^https?:\/\/schema\.org\//, ""));
194
+ }
195
+ }
196
+ return acc;
197
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SAAS,CAAC,CAAS;IAC1B,OAAO,yEAAyE,CAAC,IAAI,CACnF,CAAC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAa,EAAE,MAAgB,EAAE;IAC5D,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,KAAK,MAAM,CAAC,IAAI,IAAI;YAAE,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAC3C,OAAO,GAAG,CAAC;IACb,CAAC;IACD,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IAClD,MAAM,GAAG,GAAG,IAA+B,CAAC;IAC5C,IAAI,GAAG,CAAC,QAAQ,CAAC;QAAE,OAAO,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,IAAI,CAAC,EAAE,CAAC;QACN,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3C,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,EAAE,CAAC,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { FindingDraft, SiteScore } from "./types.js";
2
+ import type { CrawlResult } from "@agentsean/crawler";
3
+ /** Published, versioned Site Score formula. Never retro-compute old scores. */
4
+ export declare const SITE_SCORE_VERSION = "ss-1.0.0";
5
+ export declare const SITE_SCORE_FORMULA = "SiteScore = round(100 \u00D7 \u03A3(w\u1D62 \u00D7 s\u1D62)) where \u03A3w\u1D62 = 1, each s\u1D62 \u2208 [0,1]\nPillars (ss-1.0.0):\n 1. Indexability & crawlability w=0.25\n 2. On-page fundamentals w=0.20\n 3. Structured data w=0.10\n 4. Internal linking w=0.10\n 5. Performance / CWV w=0.10\n 6. Search performance trend w=0.15 (redistributed when no GSC)\n 7. AI visibility w=0.05 (robots AI-bot access until Phase 9)\n 8. Content freshness & quality w=0.05\nBands: 0\u201330 Poor \u00B7 31\u201370 Needs work \u00B7 71\u201390 Good \u00B7 91\u2013100 Excellent.\nA pillar with no applicable signal is excluded and weights renormalised.\n<50 crawled URLs \u2192 provisional. No GSC \u2192 partial.";
6
+ export declare function computeSiteScore(crawl: CrawlResult, findings: FindingDraft[], opts?: {
7
+ hasGsc?: boolean | undefined;
8
+ hasCrux?: boolean | undefined;
9
+ }): SiteScore;
10
+ //# sourceMappingURL=score.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"score.d.ts","sourceRoot":"","sources":["../src/score.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAe,SAAS,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAE7C,eAAO,MAAM,kBAAkB,4wBAYmB,CAAC;AAanD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,YAAY,EAAE,EACxB,IAAI,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,GACrE,SAAS,CAiKX"}
package/dist/score.js ADDED
@@ -0,0 +1,177 @@
1
+ import { selfCanonical } from "./detectors/predicates.js";
2
+ /** Published, versioned Site Score formula. Never retro-compute old scores. */
3
+ export const SITE_SCORE_VERSION = "ss-1.0.0";
4
+ export const SITE_SCORE_FORMULA = `SiteScore = round(100 × Σ(wᵢ × sᵢ)) where Σwᵢ = 1, each sᵢ ∈ [0,1]
5
+ Pillars (ss-1.0.0):
6
+ 1. Indexability & crawlability w=0.25
7
+ 2. On-page fundamentals w=0.20
8
+ 3. Structured data w=0.10
9
+ 4. Internal linking w=0.10
10
+ 5. Performance / CWV w=0.10
11
+ 6. Search performance trend w=0.15 (redistributed when no GSC)
12
+ 7. AI visibility w=0.05 (robots AI-bot access until Phase 9)
13
+ 8. Content freshness & quality w=0.05
14
+ Bands: 0–30 Poor · 31–70 Needs work · 71–90 Good · 91–100 Excellent.
15
+ A pillar with no applicable signal is excluded and weights renormalised.
16
+ <50 crawled URLs → provisional. No GSC → partial.`;
17
+ const PILLARS = [
18
+ { id: "indexability", name: "Indexability & crawlability", weight: 0.25 },
19
+ { id: "onpage", name: "On-page fundamentals", weight: 0.2 },
20
+ { id: "structured", name: "Structured data & rich results", weight: 0.1 },
21
+ { id: "linking", name: "Internal linking", weight: 0.1 },
22
+ { id: "performance", name: "Performance / CWV", weight: 0.1 },
23
+ { id: "search", name: "Search performance trend", weight: 0.15 },
24
+ { id: "ai", name: "AI visibility", weight: 0.05 },
25
+ { id: "content", name: "Content freshness & quality", weight: 0.05 },
26
+ ];
27
+ export function computeSiteScore(crawl, findings, opts) {
28
+ const notes = [];
29
+ const htmlPages = crawl.pages.filter((p) => p.extract && p.statusCode === 200);
30
+ const n = Math.max(1, htmlPages.length);
31
+ const ids = new Set(findings.map((f) => f.ruleId));
32
+ const errorUrls = crawl.pages.filter((p) => p.isInternal &&
33
+ p.statusCode !== null &&
34
+ (p.statusCode >= 400 || p.redirectChain.length >= 3 || !p.robotsAllowed)).length;
35
+ const indexability = clamp01(1 - errorUrls / Math.max(1, crawl.pages.length));
36
+ const onpagePass = htmlPages.filter((p) => {
37
+ const t = p.extract?.title ?? "";
38
+ const d = p.extract?.metaDescription ?? "";
39
+ return (t.length >= 15 &&
40
+ t.length <= 60 &&
41
+ d.length >= 70 &&
42
+ d.length <= 160 &&
43
+ (p.extract?.h1.length ?? 0) === 1 &&
44
+ selfCanonical(p));
45
+ }).length;
46
+ const onpage = onpagePass / n;
47
+ const schemaPages = htmlPages.filter((p) => (p.extract?.jsonLd.length ?? 0) > 0);
48
+ const schemaErrors = findings.filter((f) => f.ruleId.startsWith("SD.") && f.severity === "critical").length;
49
+ const structured = htmlPages.length === 0
50
+ ? 0
51
+ : clamp01(schemaPages.length / n - schemaErrors / Math.max(1, schemaPages.length));
52
+ const orphans = findings.find((f) => f.ruleId === "CRAWL.ORPHAN")?.urls.length ?? 0;
53
+ const deep = htmlPages.filter((p) => p.depth > 3).length;
54
+ const linking = clamp01(1 - orphans / n - 0.5 * (deep / n));
55
+ let performance = 0.7;
56
+ let performanceApplied = false;
57
+ let performanceNote = "No CrUX or Lighthouse data; using crawl TTFB proxy.";
58
+ if (opts?.hasCrux) {
59
+ performanceApplied = true;
60
+ performanceNote = null;
61
+ const fail = ["CWV.LCP_FAIL", "CWV.INP_FAIL", "CWV.CLS_FAIL"].filter((id) => ids.has(id)).length;
62
+ performance = clamp01(1 - fail / 3);
63
+ }
64
+ else {
65
+ const slow = crawl.pages.filter((p) => p.ttfbMs > 800).length;
66
+ performance = clamp01(1 - slow / Math.max(1, crawl.pages.length));
67
+ performanceApplied = true;
68
+ }
69
+ const searchApplied = Boolean(opts?.hasGsc);
70
+ const search = searchApplied ? 0.5 : 0;
71
+ const aiBlocked = ids.has("ROBOTS.BLOCKS_AI_UNINTENDED");
72
+ const ai = aiBlocked ? 0.3 : 0.8;
73
+ const thin = findings.find((f) => f.ruleId === "THIN.LOW_WORDCOUNT")?.urls.length ?? 0;
74
+ const content = clamp01(1 - thin / n);
75
+ const raw = [
76
+ {
77
+ id: "indexability",
78
+ name: PILLARS[0].name,
79
+ weight: 0.25,
80
+ score: indexability,
81
+ applied: true,
82
+ note: null,
83
+ },
84
+ {
85
+ id: "onpage",
86
+ name: PILLARS[1].name,
87
+ weight: 0.2,
88
+ score: onpage,
89
+ applied: true,
90
+ note: null,
91
+ },
92
+ {
93
+ id: "structured",
94
+ name: PILLARS[2].name,
95
+ weight: 0.1,
96
+ score: structured,
97
+ applied: true,
98
+ note: null,
99
+ },
100
+ {
101
+ id: "linking",
102
+ name: PILLARS[3].name,
103
+ weight: 0.1,
104
+ score: linking,
105
+ applied: true,
106
+ note: null,
107
+ },
108
+ {
109
+ id: "performance",
110
+ name: PILLARS[4].name,
111
+ weight: 0.1,
112
+ score: performance,
113
+ applied: performanceApplied,
114
+ note: performanceNote,
115
+ },
116
+ {
117
+ id: "search",
118
+ name: PILLARS[5].name,
119
+ weight: 0.15,
120
+ score: search,
121
+ applied: searchApplied,
122
+ note: searchApplied ? null : "No GSC data; weight redistributed.",
123
+ },
124
+ {
125
+ id: "ai",
126
+ name: PILLARS[6].name,
127
+ weight: 0.05,
128
+ score: ai,
129
+ applied: true,
130
+ note: "AI-crawler robots.txt only (Phase 1).",
131
+ },
132
+ {
133
+ id: "content",
134
+ name: PILLARS[7].name,
135
+ weight: 0.05,
136
+ score: content,
137
+ applied: true,
138
+ note: null,
139
+ },
140
+ ];
141
+ const applied = raw.filter((p) => p.applied);
142
+ const weightSum = applied.reduce((s, p) => s + p.weight, 0) || 1;
143
+ const pillars = raw.map((p) => p.applied ? { ...p, weight: p.weight / weightSum } : { ...p, weight: 0 });
144
+ const value = Math.round(100 * pillars.filter((p) => p.applied).reduce((s, p) => s + p.weight * p.score, 0));
145
+ const partial = !searchApplied;
146
+ const provisional = crawl.pages.length < 50;
147
+ if (partial)
148
+ notes.push("Partial score: Search Console is not connected.");
149
+ if (provisional)
150
+ notes.push("Provisional: fewer than 50 URLs crawled.");
151
+ if (!opts?.hasCrux)
152
+ notes.push("Performance pillar uses crawl TTFB until CrUX is connected.");
153
+ return {
154
+ version: SITE_SCORE_VERSION,
155
+ value,
156
+ band: band(value),
157
+ pillars,
158
+ partial,
159
+ provisional,
160
+ notes,
161
+ };
162
+ }
163
+ function band(value) {
164
+ if (value <= 30)
165
+ return "Poor";
166
+ if (value <= 70)
167
+ return "Needs work";
168
+ if (value <= 90)
169
+ return "Good";
170
+ return "Excellent";
171
+ }
172
+ function clamp01(n) {
173
+ if (Number.isNaN(n))
174
+ return 0;
175
+ return Math.max(0, Math.min(1, n));
176
+ }
177
+ //# sourceMappingURL=score.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"score.js","sourceRoot":"","sources":["../src/score.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;kDAYgB,CAAC;AAEnD,MAAM,OAAO,GAAmD;IAC9D,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,6BAA6B,EAAE,MAAM,EAAE,IAAI,EAAE;IACzE,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,sBAAsB,EAAE,MAAM,EAAE,GAAG,EAAE;IAC3D,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,gCAAgC,EAAE,MAAM,EAAE,GAAG,EAAE;IACzE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,GAAG,EAAE;IACxD,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,GAAG,EAAE;IAC7D,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,0BAA0B,EAAE,MAAM,EAAE,IAAI,EAAE;IAChE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE;IACjD,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,6BAA6B,EAAE,MAAM,EAAE,IAAI,EAAE;CACrE,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAC9B,KAAkB,EAClB,QAAwB,EACxB,I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AAC;IACF,MAAM,OAAO,GAAG,CAAC,aAAa,CAAC;IAC/B,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;IAC5C,IAAI,OAAO;QAAE,KAAK,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC;IAC3E,IAAI,WAAW;QAAE,KAAK,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;IACxE,IAAI,CAAC,IAAI,EAAE,OAAO;QAChB,KAAK,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,kBAAkB;QAC3B,KAAK;QACL,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;QACjB,OAAO;QACP,OAAO;QACP,WAAW;QACX,KAAK;KACN,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CAAC,KAAa;IACzB,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,MAAM,CAAC;IAC/B,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,YAAY,CAAC;IACrC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,MAAM,CAAC;IAC/B,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAS,OAAO,CAAC,CAAS;IACxB,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACrC,CAAC"}
@@ -0,0 +1,109 @@
1
+ import type { CrawlResult } from "@agentsean/crawler";
2
+ export type Severity = "critical" | "high" | "medium" | "low" | "insight";
3
+ export type AutonomyTier = "T0" | "T1" | "T2" | "T3" | "T4";
4
+ export type DetectScope = "url" | "site" | "template" | "resource" | "domain";
5
+ export type CheckDefinition = {
6
+ id: string;
7
+ category: string;
8
+ name: string;
9
+ severity: Severity;
10
+ detectScope: DetectScope;
11
+ requires: readonly string[];
12
+ autonomyTier: AutonomyTier;
13
+ fixKind: string;
14
+ fixTemplate: string;
15
+ explanation: string;
16
+ };
17
+ export type FindingDraft = {
18
+ ruleId: string;
19
+ severity: Severity;
20
+ autonomyTier: AutonomyTier;
21
+ title: string;
22
+ explanation: string;
23
+ fixTemplate: string;
24
+ urls: string[];
25
+ evidence: unknown;
26
+ confidence: number;
27
+ };
28
+ export type PrioritizedFinding = FindingDraft & {
29
+ priority: number;
30
+ coverage: number;
31
+ indexability: number;
32
+ traffic: number;
33
+ effort: number;
34
+ };
35
+ export type GscData = {
36
+ clicksByUrl?: Record<string, number> | undefined;
37
+ impressionsByUrl?: Record<string, number> | undefined;
38
+ googleCanonicalByUrl?: Record<string, string> | undefined;
39
+ coverageStateByUrl?: Record<string, string> | undefined;
40
+ submittedSitemaps?: string[] | undefined;
41
+ sitemapErrors?: boolean | undefined;
42
+ lastDownloaded?: string | undefined;
43
+ };
44
+ export type CruxData = {
45
+ lcpP75Ms?: number | undefined;
46
+ inpP75Ms?: number | undefined;
47
+ clsP75?: number | undefined;
48
+ ttfbP75Ms?: number | undefined;
49
+ phoneLcpP75Ms?: number | undefined;
50
+ desktopLcpP75Ms?: number | undefined;
51
+ urlLevel?: boolean | undefined;
52
+ };
53
+ export type LighthouseData = {
54
+ version: string;
55
+ audits: Record<string, {
56
+ score: number | null;
57
+ id: string;
58
+ }>;
59
+ };
60
+ export type LogData = {
61
+ googlebotHitsByUrl?: Record<string, number> | undefined;
62
+ googlebotStatusMix?: Record<string, number> | undefined;
63
+ fakeBotHits?: number | undefined;
64
+ };
65
+ export type MigrationData = {
66
+ urlMap?: Record<string, string> | undefined;
67
+ oldOrigin?: string | undefined;
68
+ newOrigin?: string | undefined;
69
+ };
70
+ export type AuditContext = {
71
+ crawl: CrawlResult;
72
+ gsc?: GscData | undefined;
73
+ crux?: CruxData | undefined;
74
+ lighthouse?: LighthouseData | undefined;
75
+ logs?: LogData | undefined;
76
+ migration?: MigrationData | undefined;
77
+ previousRobotsHash?: string | undefined;
78
+ now?: Date | undefined;
79
+ };
80
+ export type PillarScore = {
81
+ id: string;
82
+ name: string;
83
+ weight: number;
84
+ score: number;
85
+ applied: boolean;
86
+ note: string | null;
87
+ };
88
+ export type SiteScore = {
89
+ version: string;
90
+ value: number;
91
+ band: "Poor" | "Needs work" | "Good" | "Excellent";
92
+ pillars: PillarScore[];
93
+ partial: boolean;
94
+ provisional: boolean;
95
+ notes: string[];
96
+ };
97
+ export type AuditReport = {
98
+ url: string;
99
+ origin: string;
100
+ pages: number;
101
+ elapsedMs: number;
102
+ score: SiteScore;
103
+ findings: PrioritizedFinding[];
104
+ formula: {
105
+ siteScore: string;
106
+ priority: string;
107
+ };
108
+ };
109
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAC1E,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE9E,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE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,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,GAAG,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,WAAW,CAAC;IACnD,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@agentsean/analyzers",
3
+ "version": "1.0.0",
4
+ "license": "AGPL-3.0-only",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "import": "./dist/index.js"
10
+ }
11
+ },
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "engines": {
16
+ "node": ">=22.19.0"
17
+ },
18
+ "dependencies": {
19
+ "@agentsean/crawler": "1.0.0",
20
+ "@agentsean/db": "1.0.0"
21
+ },
22
+ "devDependencies": {
23
+ "typescript": "~5.9.3",
24
+ "vitest": "^4.1.11"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/seziro-team/agentsean.git",
32
+ "directory": "packages/analyzers"
33
+ },
34
+ "homepage": "https://github.com/seziro-team/agentsean#readme",
35
+ "bugs": {
36
+ "url": "https://github.com/seziro-team/agentsean/issues"
37
+ },
38
+ "author": "Seziro (https://seziro.com)",
39
+ "description": "Agent Sean — analyzers module",
40
+ "keywords": [
41
+ "seo",
42
+ "agent",
43
+ "agentsean",
44
+ "seo-automation"
45
+ ],
46
+ "scripts": {
47
+ "build": "tsc -p tsconfig.json && node -e \"require('fs').cpSync('src/data','dist/data',{recursive:true})\"",
48
+ "typecheck": "tsc -p tsconfig.json --noEmit",
49
+ "test": "vitest run --config ../../vitest.config.ts"
50
+ }
51
+ }