@rebilder/agent-readability 0.4.0 → 0.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.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +860 -5
- package/dist/index.d.cts +276 -3
- package/dist/index.d.ts +276 -3
- package/dist/index.js +847 -6
- package/dist/index.js.map +1 -1
- package/dist/probe/index.cjs +112 -10
- package/dist/probe/index.d.cts +2 -2
- package/dist/probe/index.d.ts +2 -2
- package/dist/probe/index.js +112 -10
- package/dist/probe/index.js.map +1 -1
- package/dist/probe/local.cjs +112 -10
- package/dist/probe/local.d.cts +1 -1
- package/dist/probe/local.d.ts +1 -1
- package/dist/probe/local.js +112 -10
- package/dist/probe/local.js.map +1 -1
- package/dist/{robots-policy-BeffrTf0.d.cts → robots-policy-C7cfPpu2.d.cts} +1 -1
- package/dist/{robots-policy-BeffrTf0.d.ts → robots-policy-C7cfPpu2.d.ts} +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ArsDimensionId, a as ArsBasis, b as ArsFactProfile, c as ArsRuleset, d as ArsBand, e as ArsHttpCapture, f as ArsEvidence, g as ArsResult, h as ArsRecommendation, i as ArsPageKind } from './robots-policy-
|
|
2
|
-
export {
|
|
1
|
+
import { A as ArsDimensionId, a as ArsBasis, b as ArsFactProfile, c as ArsRuleset, d as ArsBand, e as ArsHttpCapture, f as ArsEvidence, g as ArsResult, h as ArsRecommendation, i as ArsFactObservation, j as ArsAudienceDecision, k as ArsPageKind } from './robots-policy-C7cfPpu2.cjs';
|
|
2
|
+
export { l as AGENT_ACCEPT, m as ARS_ROBOTS_TOKEN, n as ARS_SPEC_VERSION, o as ASSET_ACCEPT, p as ArsAudience, q as ArsCheck, r as ArsCheckEvidence, s as ArsCheckId, t as ArsCostReport, u as ArsDimension, v as ArsFactKind, w as ArsFlag, x as ArsFlagId, y as ArsGrade, z as ArsOutcome, B as ArsPolicyReport, C as ArsProbeError, D as ArsProbeRecord, E as ArsUnscoredReason, F as ArsVantage, G as BROWSER_ACCEPT, H as robotsDisallowsScanner } from './robots-policy-C7cfPpu2.cjs';
|
|
3
3
|
|
|
4
4
|
/** Descriptive metadata per check: which dimension it belongs to, its published label, its basis. */
|
|
5
5
|
interface ArsCheckMeta {
|
|
@@ -698,6 +698,7 @@ declare function recommend(input: ArsRecommendationInput): ArsRecommendation[];
|
|
|
698
698
|
* is why offsets from the two files are in the same address space.
|
|
699
699
|
*/
|
|
700
700
|
declare function utf8Length(text: string): number;
|
|
701
|
+
type ArsFactSource = ArsFactObservation['source'];
|
|
701
702
|
interface RobotsGroup {
|
|
702
703
|
/** Lowercased user-agent tokens this group applies to. */
|
|
703
704
|
readonly agents: readonly string[];
|
|
@@ -719,6 +720,13 @@ interface RobotsFile {
|
|
|
719
720
|
* by the score — waiting longer is not worse markup.
|
|
720
721
|
*/
|
|
721
722
|
declare function parseRobots(text: string): RobotsFile;
|
|
723
|
+
/**
|
|
724
|
+
* RFC 9309 group selection: the most specific matching `User-agent` wins, `*` is
|
|
725
|
+
* the fallback, and matching is case-insensitive. Returns the decision plus the
|
|
726
|
+
* group and rule that produced it, because `ArsAudienceDecision` publishes both —
|
|
727
|
+
* a merchant who disagrees with an `opt-out` verdict gets to see the line.
|
|
728
|
+
*/
|
|
729
|
+
declare function decideRobots(robots: RobotsFile, tokens: readonly string[], path: string): ArsAudienceDecision;
|
|
722
730
|
/**
|
|
723
731
|
* Path matching with `*` and `$`, done as a bounded scan rather than a compiled
|
|
724
732
|
* regex: a robots.txt is attacker-controlled input and
|
|
@@ -962,4 +970,269 @@ declare function minorUnitDigits(code: string): number;
|
|
|
962
970
|
*/
|
|
963
971
|
declare function parseMoneyText(text: string, hints?: MoneyHints): ParsedMoney | null;
|
|
964
972
|
|
|
965
|
-
|
|
973
|
+
/**
|
|
974
|
+
* site-signals.ts — observations about a page that are NOT part of ARS.
|
|
975
|
+
*
|
|
976
|
+
* Nothing in this file is read by `score()`, and nothing here changes a check,
|
|
977
|
+
* a weight, a flag in `ArsResult`, or the ruleset hash. These are the unscored
|
|
978
|
+
* site-report findings that ride alongside a score: a CDN bot challenge served
|
|
979
|
+
* instead of the page, `noindex` directives, the canonical address a page
|
|
980
|
+
* names. Pure, no clock, no network, so the probe, the API and a second
|
|
981
|
+
* implementation can all read a capture the same way.
|
|
982
|
+
*
|
|
983
|
+
* ── EDGE CHALLENGE FINGERPRINTS ─────────────────────────────────────────────
|
|
984
|
+
* A fingerprint ships only when the vendor's own documentation confirms it.
|
|
985
|
+
* Sources, checked November 2026:
|
|
986
|
+
*
|
|
987
|
+
* - Cloudflare, header. "cf-mitigated" present and set to "challenge" on every
|
|
988
|
+
* Challenge Page type, any status:
|
|
989
|
+
* https://developers.cloudflare.com/cloudflare-challenges/challenge-types/challenge-pages/detect-response/
|
|
990
|
+
* - Cloudflare, markup. Challenge scripts load from paths starting
|
|
991
|
+
* "/cdn-cgi/challenge-platform/":
|
|
992
|
+
* https://developers.cloudflare.com/cloudflare-challenges/challenge-types/javascript-detections/
|
|
993
|
+
* Cloudflare also injects that path into ORDINARY pages (JavaScript
|
|
994
|
+
* Detections), so the markup alone never counts: it needs `server:
|
|
995
|
+
* cloudflare` AND a 403, 429 or 503. A 200 challenge is caught by the
|
|
996
|
+
* header, which Cloudflare sets on all challenge types.
|
|
997
|
+
* - Vercel. A challenged visitor sees the "Vercel Security Checkpoint" screen:
|
|
998
|
+
* https://vercel.com/docs/vercel-firewall/firewall-concepts#challenge
|
|
999
|
+
* The page is localised, so the English title is a supplementary signal and
|
|
1000
|
+
* needs a non-2xx status and `server: Vercel`. The `x-vercel-mitigated:
|
|
1001
|
+
* challenge` header is not in Vercel's reference docs; it is what Vercel's
|
|
1002
|
+
* own community forum shows on challenged responses
|
|
1003
|
+
* (https://community.vercel.com/t/all-non-browser-requests-challenged-on-hobby-account-ddos-mitigation-false-positive/1000000130).
|
|
1004
|
+
* - DataDome. A blocking response carries the status DataDome's API returned
|
|
1005
|
+
* plus the mapped `X-DataDome` header:
|
|
1006
|
+
* https://docs.datadome.co/reference/validate-request
|
|
1007
|
+
* The header alone also appears on allowed responses, so it counts only
|
|
1008
|
+
* with a 401 or 403.
|
|
1009
|
+
* - HUMAN (PerimeterX). The block page renders a `px-captcha` element and sets
|
|
1010
|
+
* `window._pxAppId`:
|
|
1011
|
+
* https://docs.humansecurity.com/applications/advanced-blocking-response
|
|
1012
|
+
* Both markers are required, with a 403 or 429.
|
|
1013
|
+
*
|
|
1014
|
+
* NOT SHIPPED, because no vendor documentation confirmed a fingerprint:
|
|
1015
|
+
* Akamai Bot Manager (the `sec-cpt`/428 behaviour is described only by third
|
|
1016
|
+
* parties) and Imperva (the "Incapsula incident ID" page and `x-iinfo` header
|
|
1017
|
+
* are described only by third parties and Imperva's community forum). Those
|
|
1018
|
+
* still surface as an HTTP 403 block, exactly as before.
|
|
1019
|
+
*/
|
|
1020
|
+
|
|
1021
|
+
type EdgeChallengeVendor = 'cloudflare' | 'vercel' | 'datadome' | 'human';
|
|
1022
|
+
declare const EDGE_CHALLENGE_VENDOR_LABEL: Readonly<Record<EdgeChallengeVendor, string>>;
|
|
1023
|
+
interface EdgeChallenge {
|
|
1024
|
+
vendor: EdgeChallengeVendor;
|
|
1025
|
+
/** The observation that matched, e.g. `cf-mitigated: challenge`. */
|
|
1026
|
+
signal: string;
|
|
1027
|
+
status: number;
|
|
1028
|
+
}
|
|
1029
|
+
/** The slice of a response the detector reads. `ArsHttpCapture` satisfies it. */
|
|
1030
|
+
interface ChallengeInput {
|
|
1031
|
+
status: number;
|
|
1032
|
+
headers: Readonly<Record<string, readonly string[]>>;
|
|
1033
|
+
body?: string | null;
|
|
1034
|
+
requestedUrl?: string;
|
|
1035
|
+
finalUrl?: string;
|
|
1036
|
+
}
|
|
1037
|
+
/**
|
|
1038
|
+
* The documented challenge fingerprints, most specific first. Returns null for
|
|
1039
|
+
* an ordinary response, including an ordinary 403: a block without a
|
|
1040
|
+
* recognised challenge stays a block. Also handles `/robots.txt` responses
|
|
1041
|
+
* cleanly (case-insensitive headers, never flagging plain-text `Disallow:`
|
|
1042
|
+
* lines, and recognising HTML challenge pages served at `/robots.txt`).
|
|
1043
|
+
*/
|
|
1044
|
+
declare function detectEdgeChallenge(input: ChallengeInput): EdgeChallenge | null;
|
|
1045
|
+
/**
|
|
1046
|
+
* The probe records a challenge as `{ ok: false, error: 'challenge', detail }`.
|
|
1047
|
+
* `detail` is this fixed, parseable line, so a consumer can name the vendor
|
|
1048
|
+
* without the bundle carrying the challenge page itself.
|
|
1049
|
+
*/
|
|
1050
|
+
declare function challengeDetail(challenge: EdgeChallenge): string;
|
|
1051
|
+
declare function parseChallengeDetail(detail: unknown): EdgeChallenge | null;
|
|
1052
|
+
/**
|
|
1053
|
+
* The challenge the AGENT probe met, if any. Accepts `unknown` so callers that
|
|
1054
|
+
* only hold a structural slice of the bundle (the API's seam types) can ask.
|
|
1055
|
+
*/
|
|
1056
|
+
declare function edgeChallengeOf(evidence: unknown): EdgeChallenge | null;
|
|
1057
|
+
/**
|
|
1058
|
+
* The challenge the `/robots.txt` probe met, if any — inspecting either a
|
|
1059
|
+
* recorded `challenge` probe error or the captured `/robots.txt` response.
|
|
1060
|
+
*/
|
|
1061
|
+
declare function robotsEdgeChallengeOf(evidence: unknown): EdgeChallenge | null;
|
|
1062
|
+
type ContentSignalValue = 'yes' | 'no' | (string & {});
|
|
1063
|
+
interface ContentSignalRule {
|
|
1064
|
+
/** User-agent tokens in the enclosing group (lowercased); empty if global. */
|
|
1065
|
+
readonly agents: readonly string[];
|
|
1066
|
+
/** Raw trimmed value after `Content-signal:`. */
|
|
1067
|
+
readonly raw: string;
|
|
1068
|
+
/** Parsed lowercased `key=value` pairs (e.g. `{ search: 'yes', 'ai-train': 'no' }`). */
|
|
1069
|
+
readonly signals: Readonly<Record<string, ContentSignalValue>>;
|
|
1070
|
+
}
|
|
1071
|
+
interface ContentSignalsReport {
|
|
1072
|
+
/** True when at least one `Content-signal:` directive was found. */
|
|
1073
|
+
readonly present: boolean;
|
|
1074
|
+
/** True when `# BEGIN Cloudflare Managed content` appears in robots.txt. */
|
|
1075
|
+
readonly cloudflareManaged: boolean;
|
|
1076
|
+
/** All parsed `Content-signal:` rules in source order. */
|
|
1077
|
+
readonly rules: readonly ContentSignalRule[];
|
|
1078
|
+
/** Effective wildcard (`*`) or global summary for the three standard signals. */
|
|
1079
|
+
readonly summary: {
|
|
1080
|
+
readonly search: ContentSignalValue | null;
|
|
1081
|
+
readonly aiInput: ContentSignalValue | null;
|
|
1082
|
+
readonly aiTrain: ContentSignalValue | null;
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Parses `Content-signal:` directives (e.g. Cloudflare Managed `robots.txt`
|
|
1087
|
+
* `Content-signal: search=yes, ai-train=no`) and detects the Cloudflare
|
|
1088
|
+
* Managed content block marker. Pure, unscored, never read by `score()`.
|
|
1089
|
+
*/
|
|
1090
|
+
declare function parseContentSignals(robotsTxt: string): ContentSignalsReport;
|
|
1091
|
+
interface NoindexDirective {
|
|
1092
|
+
/** `robots` for the generic directive, otherwise the crawler token named. */
|
|
1093
|
+
agent: string;
|
|
1094
|
+
source: 'meta' | 'header';
|
|
1095
|
+
value: string;
|
|
1096
|
+
}
|
|
1097
|
+
type RestrictedRobotsDirectiveKind = 'nosnippet' | 'max-snippet:0' | 'noai' | 'noimageai';
|
|
1098
|
+
interface RobotsRestrictionDirective {
|
|
1099
|
+
/** `robots` for the generic directive, otherwise the crawler token named. */
|
|
1100
|
+
agent: string;
|
|
1101
|
+
source: 'meta' | 'header';
|
|
1102
|
+
directive: RestrictedRobotsDirectiveKind;
|
|
1103
|
+
value: string;
|
|
1104
|
+
}
|
|
1105
|
+
interface CanonicalDeclaration {
|
|
1106
|
+
source: 'header' | 'html';
|
|
1107
|
+
url: string;
|
|
1108
|
+
}
|
|
1109
|
+
interface PageIndexSignals {
|
|
1110
|
+
status: number;
|
|
1111
|
+
finalUrl: string;
|
|
1112
|
+
redirected: boolean;
|
|
1113
|
+
/** Every `noindex`/`none` directive found, generic and agent-specific. */
|
|
1114
|
+
noindex: NoindexDirective[];
|
|
1115
|
+
/** Absolute canonical address the page declares, or null. */
|
|
1116
|
+
canonical: string | null;
|
|
1117
|
+
/** Every `nosnippet`, `max-snippet:0`, `noai`, or `noimageai` directive found. */
|
|
1118
|
+
restrictions: RobotsRestrictionDirective[];
|
|
1119
|
+
/** True when any `nosnippet` directive was found. */
|
|
1120
|
+
nosnippet: boolean;
|
|
1121
|
+
/** True when any `max-snippet:0` directive was found. */
|
|
1122
|
+
maxSnippetZero: boolean;
|
|
1123
|
+
/** True when any `noai` directive was found. */
|
|
1124
|
+
noai: boolean;
|
|
1125
|
+
/** True when any `noimageai` directive was found. */
|
|
1126
|
+
noimageai: boolean;
|
|
1127
|
+
/** Every resolved canonical declaration across HTTP `Link` headers and HTML `<link>` tags. */
|
|
1128
|
+
canonicals: CanonicalDeclaration[];
|
|
1129
|
+
/** True when more than one HTML `<link rel="canonical">` or HTTP `Link` canonical header was sent. */
|
|
1130
|
+
duplicateCanonical: boolean;
|
|
1131
|
+
/** True when canonical declarations disagree on their resolved URL (HTML vs HTML or HTTP vs HTML). */
|
|
1132
|
+
conflictingCanonical: boolean;
|
|
1133
|
+
/** True when HTTP 402 Payment Required (e.g. Pay-Per-Crawl) was observed. */
|
|
1134
|
+
payPerCrawl: boolean;
|
|
1135
|
+
}
|
|
1136
|
+
/** Index signals of one response. Pure; reads headers and, when present, the HTML. */
|
|
1137
|
+
declare function indexSignalsOf(capture: ArsHttpCapture): PageIndexSignals;
|
|
1138
|
+
/**
|
|
1139
|
+
* The page's index signals from a probe bundle: the browser control first (it
|
|
1140
|
+
* asked for HTML, which is where `<meta name="robots">` lives), the agent probe
|
|
1141
|
+
* otherwise. Null when neither probe returned a response.
|
|
1142
|
+
*/
|
|
1143
|
+
declare function pageIndexSignals(evidence: ArsEvidence): PageIndexSignals | null;
|
|
1144
|
+
type SpaJsDependencyReason = 'empty-mount-root' | 'noscript-js-required' | 'unrendered-next-payload' | 'low-text-vs-script';
|
|
1145
|
+
interface SpaJsDependencyReport {
|
|
1146
|
+
/** True when static HTML heuristics indicate a JS-dependent SPA shell. */
|
|
1147
|
+
readonly likelySpaShell: boolean;
|
|
1148
|
+
/** Specific heuristic signals that fired. */
|
|
1149
|
+
readonly reasons: readonly SpaJsDependencyReason[];
|
|
1150
|
+
/** Empty SPA mount roots found (e.g. `['#root']`, `['#__next']`). */
|
|
1151
|
+
readonly emptyMountRoots: readonly string[];
|
|
1152
|
+
/** True when `<noscript>` carries a boilerplate JavaScript-required message. */
|
|
1153
|
+
readonly jsRequiredNoscript: boolean;
|
|
1154
|
+
/** Matched `<noscript>` text snippet, or null. */
|
|
1155
|
+
readonly noscriptSnippet: string | null;
|
|
1156
|
+
/** True when `<script id="__NEXT_DATA__">` is present. */
|
|
1157
|
+
readonly hasNextData: boolean;
|
|
1158
|
+
/** True when Next.js RSC flight chunks (`__next_f`) appear in inline scripts. */
|
|
1159
|
+
readonly hasNextFlight: boolean;
|
|
1160
|
+
/** Combined UTF-8 bytes of Next.js hydration payloads (`__NEXT_DATA__` / `__next_f`). */
|
|
1161
|
+
readonly hydrationPayloadBytes: number;
|
|
1162
|
+
/** True when Next.js hydration payload appears to carry unrendered page content. */
|
|
1163
|
+
readonly unrenderedHydrationPayload: boolean;
|
|
1164
|
+
/** Visible body word count (excluding `<title>`, `<noscript>`, `<script>`, `<style>`, hidden). */
|
|
1165
|
+
readonly visibleWordCount: number;
|
|
1166
|
+
/** UTF-8 byte length of visible body text. */
|
|
1167
|
+
readonly visibleTextBytes: number;
|
|
1168
|
+
/** Total UTF-8 byte length of non-JSON-LD inline `<script>` contents. */
|
|
1169
|
+
readonly scriptBytes: number;
|
|
1170
|
+
/** Number of external `<script src="...">` tags. */
|
|
1171
|
+
readonly externalScriptCount: number;
|
|
1172
|
+
/** Ratio of inline script bytes to visible text bytes, or `null` when visible text is empty and scripts exist. */
|
|
1173
|
+
readonly scriptToTextRatio: number | null;
|
|
1174
|
+
/** True when visible word count is low relative to script payload. */
|
|
1175
|
+
readonly lowTextToScriptRatio: boolean;
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Static HTML heuristics for client-side SPA shells and JS-only rendering:
|
|
1179
|
+
* empty `#root`/`#app`/`#__next` mount roots, boilerplate JS-required
|
|
1180
|
+
* `<noscript>` notices, Next.js `__NEXT_DATA__`/`__next_f` unrendered payload
|
|
1181
|
+
* clues, and low visible word count relative to script bytes. Pure, non-executing,
|
|
1182
|
+
* unscored.
|
|
1183
|
+
*/
|
|
1184
|
+
declare function detectSpaJsDependency(html: string): SpaJsDependencyReport;
|
|
1185
|
+
declare const SAAS_QUOTA_UNITS: readonly ["seats", "users", "projects", "pages", "sites", "requests", "tokens", "credits", "calls", "events", "contacts", "workspaces", "domains", "rows"];
|
|
1186
|
+
type SaasQuotaUnit = (typeof SAAS_QUOTA_UNITS)[number];
|
|
1187
|
+
interface PricingAuditJsonLdNode {
|
|
1188
|
+
readonly types: readonly string[];
|
|
1189
|
+
readonly value: Readonly<Record<string, unknown>>;
|
|
1190
|
+
}
|
|
1191
|
+
interface PricingAndLimitsAudit {
|
|
1192
|
+
/** Number of schema.org `Offer` nodes found in JSON-LD. */
|
|
1193
|
+
readonly jsonLdOfferCount: number;
|
|
1194
|
+
/** Number of schema.org `Offer` nodes declaring a price or priceSpecification. */
|
|
1195
|
+
readonly jsonLdPricedOfferCount: number;
|
|
1196
|
+
/** Estimated number of visible pricing tiers in server HTML. */
|
|
1197
|
+
readonly visibleTierCount: number;
|
|
1198
|
+
/** Total visible currency price occurrences found in server HTML. */
|
|
1199
|
+
readonly visiblePriceCount: number;
|
|
1200
|
+
/** True when a feature comparison table contains icon-only SVG/empty-text cells. */
|
|
1201
|
+
readonly iconOnlyFeatureMatrix: boolean;
|
|
1202
|
+
/** Count of icon-only / empty-text cells inside comparison tables. */
|
|
1203
|
+
readonly iconOnlyCellCount: number;
|
|
1204
|
+
/** True when server HTML includes a monthly/annual billing toggle hint. */
|
|
1205
|
+
readonly hasBillingToggleHint: boolean;
|
|
1206
|
+
/** True when a billing toggle hint is present but only one billing period appears in server HTML. */
|
|
1207
|
+
readonly billingToggleSinglePeriodOnly: boolean;
|
|
1208
|
+
/** Distinct billing cadences extracted from visible text (e.g. '/mo', '/yr', 'per seat', 'billed annually'). */
|
|
1209
|
+
readonly billingCadences: readonly string[];
|
|
1210
|
+
/** Total quantified SaaS feature-limit mentions across the 14 canonical quota units. */
|
|
1211
|
+
readonly featureLimitCount: number;
|
|
1212
|
+
/** Per-unit counts for detected SaaS feature-limit quotas. */
|
|
1213
|
+
readonly featureLimitUnits: Readonly<Partial<Record<SaasQuotaUnit, number>>>;
|
|
1214
|
+
/** Distinct canonical quota units detected. */
|
|
1215
|
+
readonly detectedQuotaUnits: readonly SaasQuotaUnit[];
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Multi-tier SaaS pricing & feature-limit auditor over server HTML and JSON-LD.
|
|
1219
|
+
* Pure, non-executing, unscored: inspects Offer coverage, visible tiers,
|
|
1220
|
+
* icon-only comparison matrix cells, single-period billing toggle hints,
|
|
1221
|
+
* billing cadences, and quantified SaaS feature-limit quota units.
|
|
1222
|
+
*/
|
|
1223
|
+
declare function auditPricingAndLimits(html: string, jsonLdNodes?: readonly PricingAuditJsonLdNode[]): PricingAndLimitsAudit;
|
|
1224
|
+
interface DeclaredPageFacts {
|
|
1225
|
+
/** The modified date the page itself states (ISO 8601), or null. */
|
|
1226
|
+
updated: string | null;
|
|
1227
|
+
/** Where each price the page states was found; empty when no price was readable. */
|
|
1228
|
+
priceSources: ArsFactSource[];
|
|
1229
|
+
}
|
|
1230
|
+
/**
|
|
1231
|
+
* The extractor's own `updated` and `price` facts, read with a profile that asks
|
|
1232
|
+
* for exactly those two, whatever kind the page was classified as. `score()`
|
|
1233
|
+
* extracts against the page kind's profile (an `unknown` page never yields a
|
|
1234
|
+
* price), so these values are taken separately and never feed a score.
|
|
1235
|
+
*/
|
|
1236
|
+
declare function declaredPageFacts(evidence: ArsEvidence): DeclaredPageFacts | null;
|
|
1237
|
+
|
|
1238
|
+
export { ARS_CORPUS_HASH, ARS_HEURISTIC_WEIGHT, ARS_HEURISTIC_WEIGHT_CEILING, ARS_MEASURED_WEIGHT, ArsAudienceDecision, ArsBand, ArsBasis, type ArsCheckMeta, type ArsClassification, ArsDimensionId, ArsEvidence, ArsFactObservation, ArsFactProfile, ArsHttpCapture, ArsPageKind, type ArsPass1Signals, ArsRecommendation, type ArsRecommendationInput, ArsResult, ArsRuleset, CHECK_META, type CanonicalDeclaration, type ChallengeInput, type ContentSignalRule, type ContentSignalValue, type ContentSignalsReport, DEFAULT_RULESET, DIMENSION_META, type DeclaredPageFacts, EDGE_CHALLENGE_VENDOR_LABEL, type EdgeChallenge, type EdgeChallengeVendor, type Money, type MoneyHints, type NoindexDirective, PROFILES, type PageIndexSignals, type ParsedMoney, type PricingAndLimitsAudit, type PricingAuditJsonLdNode, type RestrictedRobotsDirectiveKind, type RobotsRestrictionDirective, SAAS_QUOTA_UNITS, SUBPOINTS, type SaasQuotaUnit, type SpaJsDependencyReason, type SpaJsDependencyReport, auditPricingAndLimits, bandFor, canonicalJson, challengeDetail, classify, decideRobots, declaredMarkdownAlternates, declaredPageFacts, detectEdgeChallenge, detectSpaJsDependency, edgeChallengeOf, evidenceHash, indexSignalsOf, isMachineCopy, markdownAlternateTarget, minorUnitDigits, pageIndexSignals, parseChallengeDetail, parseContentSignals, parseMoneyText, parseRobots, pathMatches, profileFor, recommend, robotsEdgeChallengeOf, rulesetHash, score, sha256Hex, utf8Length };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ArsDimensionId, a as ArsBasis, b as ArsFactProfile, c as ArsRuleset, d as ArsBand, e as ArsHttpCapture, f as ArsEvidence, g as ArsResult, h as ArsRecommendation, i as ArsPageKind } from './robots-policy-
|
|
2
|
-
export {
|
|
1
|
+
import { A as ArsDimensionId, a as ArsBasis, b as ArsFactProfile, c as ArsRuleset, d as ArsBand, e as ArsHttpCapture, f as ArsEvidence, g as ArsResult, h as ArsRecommendation, i as ArsFactObservation, j as ArsAudienceDecision, k as ArsPageKind } from './robots-policy-C7cfPpu2.js';
|
|
2
|
+
export { l as AGENT_ACCEPT, m as ARS_ROBOTS_TOKEN, n as ARS_SPEC_VERSION, o as ASSET_ACCEPT, p as ArsAudience, q as ArsCheck, r as ArsCheckEvidence, s as ArsCheckId, t as ArsCostReport, u as ArsDimension, v as ArsFactKind, w as ArsFlag, x as ArsFlagId, y as ArsGrade, z as ArsOutcome, B as ArsPolicyReport, C as ArsProbeError, D as ArsProbeRecord, E as ArsUnscoredReason, F as ArsVantage, G as BROWSER_ACCEPT, H as robotsDisallowsScanner } from './robots-policy-C7cfPpu2.js';
|
|
3
3
|
|
|
4
4
|
/** Descriptive metadata per check: which dimension it belongs to, its published label, its basis. */
|
|
5
5
|
interface ArsCheckMeta {
|
|
@@ -698,6 +698,7 @@ declare function recommend(input: ArsRecommendationInput): ArsRecommendation[];
|
|
|
698
698
|
* is why offsets from the two files are in the same address space.
|
|
699
699
|
*/
|
|
700
700
|
declare function utf8Length(text: string): number;
|
|
701
|
+
type ArsFactSource = ArsFactObservation['source'];
|
|
701
702
|
interface RobotsGroup {
|
|
702
703
|
/** Lowercased user-agent tokens this group applies to. */
|
|
703
704
|
readonly agents: readonly string[];
|
|
@@ -719,6 +720,13 @@ interface RobotsFile {
|
|
|
719
720
|
* by the score — waiting longer is not worse markup.
|
|
720
721
|
*/
|
|
721
722
|
declare function parseRobots(text: string): RobotsFile;
|
|
723
|
+
/**
|
|
724
|
+
* RFC 9309 group selection: the most specific matching `User-agent` wins, `*` is
|
|
725
|
+
* the fallback, and matching is case-insensitive. Returns the decision plus the
|
|
726
|
+
* group and rule that produced it, because `ArsAudienceDecision` publishes both —
|
|
727
|
+
* a merchant who disagrees with an `opt-out` verdict gets to see the line.
|
|
728
|
+
*/
|
|
729
|
+
declare function decideRobots(robots: RobotsFile, tokens: readonly string[], path: string): ArsAudienceDecision;
|
|
722
730
|
/**
|
|
723
731
|
* Path matching with `*` and `$`, done as a bounded scan rather than a compiled
|
|
724
732
|
* regex: a robots.txt is attacker-controlled input and
|
|
@@ -962,4 +970,269 @@ declare function minorUnitDigits(code: string): number;
|
|
|
962
970
|
*/
|
|
963
971
|
declare function parseMoneyText(text: string, hints?: MoneyHints): ParsedMoney | null;
|
|
964
972
|
|
|
965
|
-
|
|
973
|
+
/**
|
|
974
|
+
* site-signals.ts — observations about a page that are NOT part of ARS.
|
|
975
|
+
*
|
|
976
|
+
* Nothing in this file is read by `score()`, and nothing here changes a check,
|
|
977
|
+
* a weight, a flag in `ArsResult`, or the ruleset hash. These are the unscored
|
|
978
|
+
* site-report findings that ride alongside a score: a CDN bot challenge served
|
|
979
|
+
* instead of the page, `noindex` directives, the canonical address a page
|
|
980
|
+
* names. Pure, no clock, no network, so the probe, the API and a second
|
|
981
|
+
* implementation can all read a capture the same way.
|
|
982
|
+
*
|
|
983
|
+
* ── EDGE CHALLENGE FINGERPRINTS ─────────────────────────────────────────────
|
|
984
|
+
* A fingerprint ships only when the vendor's own documentation confirms it.
|
|
985
|
+
* Sources, checked November 2026:
|
|
986
|
+
*
|
|
987
|
+
* - Cloudflare, header. "cf-mitigated" present and set to "challenge" on every
|
|
988
|
+
* Challenge Page type, any status:
|
|
989
|
+
* https://developers.cloudflare.com/cloudflare-challenges/challenge-types/challenge-pages/detect-response/
|
|
990
|
+
* - Cloudflare, markup. Challenge scripts load from paths starting
|
|
991
|
+
* "/cdn-cgi/challenge-platform/":
|
|
992
|
+
* https://developers.cloudflare.com/cloudflare-challenges/challenge-types/javascript-detections/
|
|
993
|
+
* Cloudflare also injects that path into ORDINARY pages (JavaScript
|
|
994
|
+
* Detections), so the markup alone never counts: it needs `server:
|
|
995
|
+
* cloudflare` AND a 403, 429 or 503. A 200 challenge is caught by the
|
|
996
|
+
* header, which Cloudflare sets on all challenge types.
|
|
997
|
+
* - Vercel. A challenged visitor sees the "Vercel Security Checkpoint" screen:
|
|
998
|
+
* https://vercel.com/docs/vercel-firewall/firewall-concepts#challenge
|
|
999
|
+
* The page is localised, so the English title is a supplementary signal and
|
|
1000
|
+
* needs a non-2xx status and `server: Vercel`. The `x-vercel-mitigated:
|
|
1001
|
+
* challenge` header is not in Vercel's reference docs; it is what Vercel's
|
|
1002
|
+
* own community forum shows on challenged responses
|
|
1003
|
+
* (https://community.vercel.com/t/all-non-browser-requests-challenged-on-hobby-account-ddos-mitigation-false-positive/1000000130).
|
|
1004
|
+
* - DataDome. A blocking response carries the status DataDome's API returned
|
|
1005
|
+
* plus the mapped `X-DataDome` header:
|
|
1006
|
+
* https://docs.datadome.co/reference/validate-request
|
|
1007
|
+
* The header alone also appears on allowed responses, so it counts only
|
|
1008
|
+
* with a 401 or 403.
|
|
1009
|
+
* - HUMAN (PerimeterX). The block page renders a `px-captcha` element and sets
|
|
1010
|
+
* `window._pxAppId`:
|
|
1011
|
+
* https://docs.humansecurity.com/applications/advanced-blocking-response
|
|
1012
|
+
* Both markers are required, with a 403 or 429.
|
|
1013
|
+
*
|
|
1014
|
+
* NOT SHIPPED, because no vendor documentation confirmed a fingerprint:
|
|
1015
|
+
* Akamai Bot Manager (the `sec-cpt`/428 behaviour is described only by third
|
|
1016
|
+
* parties) and Imperva (the "Incapsula incident ID" page and `x-iinfo` header
|
|
1017
|
+
* are described only by third parties and Imperva's community forum). Those
|
|
1018
|
+
* still surface as an HTTP 403 block, exactly as before.
|
|
1019
|
+
*/
|
|
1020
|
+
|
|
1021
|
+
type EdgeChallengeVendor = 'cloudflare' | 'vercel' | 'datadome' | 'human';
|
|
1022
|
+
declare const EDGE_CHALLENGE_VENDOR_LABEL: Readonly<Record<EdgeChallengeVendor, string>>;
|
|
1023
|
+
interface EdgeChallenge {
|
|
1024
|
+
vendor: EdgeChallengeVendor;
|
|
1025
|
+
/** The observation that matched, e.g. `cf-mitigated: challenge`. */
|
|
1026
|
+
signal: string;
|
|
1027
|
+
status: number;
|
|
1028
|
+
}
|
|
1029
|
+
/** The slice of a response the detector reads. `ArsHttpCapture` satisfies it. */
|
|
1030
|
+
interface ChallengeInput {
|
|
1031
|
+
status: number;
|
|
1032
|
+
headers: Readonly<Record<string, readonly string[]>>;
|
|
1033
|
+
body?: string | null;
|
|
1034
|
+
requestedUrl?: string;
|
|
1035
|
+
finalUrl?: string;
|
|
1036
|
+
}
|
|
1037
|
+
/**
|
|
1038
|
+
* The documented challenge fingerprints, most specific first. Returns null for
|
|
1039
|
+
* an ordinary response, including an ordinary 403: a block without a
|
|
1040
|
+
* recognised challenge stays a block. Also handles `/robots.txt` responses
|
|
1041
|
+
* cleanly (case-insensitive headers, never flagging plain-text `Disallow:`
|
|
1042
|
+
* lines, and recognising HTML challenge pages served at `/robots.txt`).
|
|
1043
|
+
*/
|
|
1044
|
+
declare function detectEdgeChallenge(input: ChallengeInput): EdgeChallenge | null;
|
|
1045
|
+
/**
|
|
1046
|
+
* The probe records a challenge as `{ ok: false, error: 'challenge', detail }`.
|
|
1047
|
+
* `detail` is this fixed, parseable line, so a consumer can name the vendor
|
|
1048
|
+
* without the bundle carrying the challenge page itself.
|
|
1049
|
+
*/
|
|
1050
|
+
declare function challengeDetail(challenge: EdgeChallenge): string;
|
|
1051
|
+
declare function parseChallengeDetail(detail: unknown): EdgeChallenge | null;
|
|
1052
|
+
/**
|
|
1053
|
+
* The challenge the AGENT probe met, if any. Accepts `unknown` so callers that
|
|
1054
|
+
* only hold a structural slice of the bundle (the API's seam types) can ask.
|
|
1055
|
+
*/
|
|
1056
|
+
declare function edgeChallengeOf(evidence: unknown): EdgeChallenge | null;
|
|
1057
|
+
/**
|
|
1058
|
+
* The challenge the `/robots.txt` probe met, if any — inspecting either a
|
|
1059
|
+
* recorded `challenge` probe error or the captured `/robots.txt` response.
|
|
1060
|
+
*/
|
|
1061
|
+
declare function robotsEdgeChallengeOf(evidence: unknown): EdgeChallenge | null;
|
|
1062
|
+
type ContentSignalValue = 'yes' | 'no' | (string & {});
|
|
1063
|
+
interface ContentSignalRule {
|
|
1064
|
+
/** User-agent tokens in the enclosing group (lowercased); empty if global. */
|
|
1065
|
+
readonly agents: readonly string[];
|
|
1066
|
+
/** Raw trimmed value after `Content-signal:`. */
|
|
1067
|
+
readonly raw: string;
|
|
1068
|
+
/** Parsed lowercased `key=value` pairs (e.g. `{ search: 'yes', 'ai-train': 'no' }`). */
|
|
1069
|
+
readonly signals: Readonly<Record<string, ContentSignalValue>>;
|
|
1070
|
+
}
|
|
1071
|
+
interface ContentSignalsReport {
|
|
1072
|
+
/** True when at least one `Content-signal:` directive was found. */
|
|
1073
|
+
readonly present: boolean;
|
|
1074
|
+
/** True when `# BEGIN Cloudflare Managed content` appears in robots.txt. */
|
|
1075
|
+
readonly cloudflareManaged: boolean;
|
|
1076
|
+
/** All parsed `Content-signal:` rules in source order. */
|
|
1077
|
+
readonly rules: readonly ContentSignalRule[];
|
|
1078
|
+
/** Effective wildcard (`*`) or global summary for the three standard signals. */
|
|
1079
|
+
readonly summary: {
|
|
1080
|
+
readonly search: ContentSignalValue | null;
|
|
1081
|
+
readonly aiInput: ContentSignalValue | null;
|
|
1082
|
+
readonly aiTrain: ContentSignalValue | null;
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Parses `Content-signal:` directives (e.g. Cloudflare Managed `robots.txt`
|
|
1087
|
+
* `Content-signal: search=yes, ai-train=no`) and detects the Cloudflare
|
|
1088
|
+
* Managed content block marker. Pure, unscored, never read by `score()`.
|
|
1089
|
+
*/
|
|
1090
|
+
declare function parseContentSignals(robotsTxt: string): ContentSignalsReport;
|
|
1091
|
+
interface NoindexDirective {
|
|
1092
|
+
/** `robots` for the generic directive, otherwise the crawler token named. */
|
|
1093
|
+
agent: string;
|
|
1094
|
+
source: 'meta' | 'header';
|
|
1095
|
+
value: string;
|
|
1096
|
+
}
|
|
1097
|
+
type RestrictedRobotsDirectiveKind = 'nosnippet' | 'max-snippet:0' | 'noai' | 'noimageai';
|
|
1098
|
+
interface RobotsRestrictionDirective {
|
|
1099
|
+
/** `robots` for the generic directive, otherwise the crawler token named. */
|
|
1100
|
+
agent: string;
|
|
1101
|
+
source: 'meta' | 'header';
|
|
1102
|
+
directive: RestrictedRobotsDirectiveKind;
|
|
1103
|
+
value: string;
|
|
1104
|
+
}
|
|
1105
|
+
interface CanonicalDeclaration {
|
|
1106
|
+
source: 'header' | 'html';
|
|
1107
|
+
url: string;
|
|
1108
|
+
}
|
|
1109
|
+
interface PageIndexSignals {
|
|
1110
|
+
status: number;
|
|
1111
|
+
finalUrl: string;
|
|
1112
|
+
redirected: boolean;
|
|
1113
|
+
/** Every `noindex`/`none` directive found, generic and agent-specific. */
|
|
1114
|
+
noindex: NoindexDirective[];
|
|
1115
|
+
/** Absolute canonical address the page declares, or null. */
|
|
1116
|
+
canonical: string | null;
|
|
1117
|
+
/** Every `nosnippet`, `max-snippet:0`, `noai`, or `noimageai` directive found. */
|
|
1118
|
+
restrictions: RobotsRestrictionDirective[];
|
|
1119
|
+
/** True when any `nosnippet` directive was found. */
|
|
1120
|
+
nosnippet: boolean;
|
|
1121
|
+
/** True when any `max-snippet:0` directive was found. */
|
|
1122
|
+
maxSnippetZero: boolean;
|
|
1123
|
+
/** True when any `noai` directive was found. */
|
|
1124
|
+
noai: boolean;
|
|
1125
|
+
/** True when any `noimageai` directive was found. */
|
|
1126
|
+
noimageai: boolean;
|
|
1127
|
+
/** Every resolved canonical declaration across HTTP `Link` headers and HTML `<link>` tags. */
|
|
1128
|
+
canonicals: CanonicalDeclaration[];
|
|
1129
|
+
/** True when more than one HTML `<link rel="canonical">` or HTTP `Link` canonical header was sent. */
|
|
1130
|
+
duplicateCanonical: boolean;
|
|
1131
|
+
/** True when canonical declarations disagree on their resolved URL (HTML vs HTML or HTTP vs HTML). */
|
|
1132
|
+
conflictingCanonical: boolean;
|
|
1133
|
+
/** True when HTTP 402 Payment Required (e.g. Pay-Per-Crawl) was observed. */
|
|
1134
|
+
payPerCrawl: boolean;
|
|
1135
|
+
}
|
|
1136
|
+
/** Index signals of one response. Pure; reads headers and, when present, the HTML. */
|
|
1137
|
+
declare function indexSignalsOf(capture: ArsHttpCapture): PageIndexSignals;
|
|
1138
|
+
/**
|
|
1139
|
+
* The page's index signals from a probe bundle: the browser control first (it
|
|
1140
|
+
* asked for HTML, which is where `<meta name="robots">` lives), the agent probe
|
|
1141
|
+
* otherwise. Null when neither probe returned a response.
|
|
1142
|
+
*/
|
|
1143
|
+
declare function pageIndexSignals(evidence: ArsEvidence): PageIndexSignals | null;
|
|
1144
|
+
type SpaJsDependencyReason = 'empty-mount-root' | 'noscript-js-required' | 'unrendered-next-payload' | 'low-text-vs-script';
|
|
1145
|
+
interface SpaJsDependencyReport {
|
|
1146
|
+
/** True when static HTML heuristics indicate a JS-dependent SPA shell. */
|
|
1147
|
+
readonly likelySpaShell: boolean;
|
|
1148
|
+
/** Specific heuristic signals that fired. */
|
|
1149
|
+
readonly reasons: readonly SpaJsDependencyReason[];
|
|
1150
|
+
/** Empty SPA mount roots found (e.g. `['#root']`, `['#__next']`). */
|
|
1151
|
+
readonly emptyMountRoots: readonly string[];
|
|
1152
|
+
/** True when `<noscript>` carries a boilerplate JavaScript-required message. */
|
|
1153
|
+
readonly jsRequiredNoscript: boolean;
|
|
1154
|
+
/** Matched `<noscript>` text snippet, or null. */
|
|
1155
|
+
readonly noscriptSnippet: string | null;
|
|
1156
|
+
/** True when `<script id="__NEXT_DATA__">` is present. */
|
|
1157
|
+
readonly hasNextData: boolean;
|
|
1158
|
+
/** True when Next.js RSC flight chunks (`__next_f`) appear in inline scripts. */
|
|
1159
|
+
readonly hasNextFlight: boolean;
|
|
1160
|
+
/** Combined UTF-8 bytes of Next.js hydration payloads (`__NEXT_DATA__` / `__next_f`). */
|
|
1161
|
+
readonly hydrationPayloadBytes: number;
|
|
1162
|
+
/** True when Next.js hydration payload appears to carry unrendered page content. */
|
|
1163
|
+
readonly unrenderedHydrationPayload: boolean;
|
|
1164
|
+
/** Visible body word count (excluding `<title>`, `<noscript>`, `<script>`, `<style>`, hidden). */
|
|
1165
|
+
readonly visibleWordCount: number;
|
|
1166
|
+
/** UTF-8 byte length of visible body text. */
|
|
1167
|
+
readonly visibleTextBytes: number;
|
|
1168
|
+
/** Total UTF-8 byte length of non-JSON-LD inline `<script>` contents. */
|
|
1169
|
+
readonly scriptBytes: number;
|
|
1170
|
+
/** Number of external `<script src="...">` tags. */
|
|
1171
|
+
readonly externalScriptCount: number;
|
|
1172
|
+
/** Ratio of inline script bytes to visible text bytes, or `null` when visible text is empty and scripts exist. */
|
|
1173
|
+
readonly scriptToTextRatio: number | null;
|
|
1174
|
+
/** True when visible word count is low relative to script payload. */
|
|
1175
|
+
readonly lowTextToScriptRatio: boolean;
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Static HTML heuristics for client-side SPA shells and JS-only rendering:
|
|
1179
|
+
* empty `#root`/`#app`/`#__next` mount roots, boilerplate JS-required
|
|
1180
|
+
* `<noscript>` notices, Next.js `__NEXT_DATA__`/`__next_f` unrendered payload
|
|
1181
|
+
* clues, and low visible word count relative to script bytes. Pure, non-executing,
|
|
1182
|
+
* unscored.
|
|
1183
|
+
*/
|
|
1184
|
+
declare function detectSpaJsDependency(html: string): SpaJsDependencyReport;
|
|
1185
|
+
declare const SAAS_QUOTA_UNITS: readonly ["seats", "users", "projects", "pages", "sites", "requests", "tokens", "credits", "calls", "events", "contacts", "workspaces", "domains", "rows"];
|
|
1186
|
+
type SaasQuotaUnit = (typeof SAAS_QUOTA_UNITS)[number];
|
|
1187
|
+
interface PricingAuditJsonLdNode {
|
|
1188
|
+
readonly types: readonly string[];
|
|
1189
|
+
readonly value: Readonly<Record<string, unknown>>;
|
|
1190
|
+
}
|
|
1191
|
+
interface PricingAndLimitsAudit {
|
|
1192
|
+
/** Number of schema.org `Offer` nodes found in JSON-LD. */
|
|
1193
|
+
readonly jsonLdOfferCount: number;
|
|
1194
|
+
/** Number of schema.org `Offer` nodes declaring a price or priceSpecification. */
|
|
1195
|
+
readonly jsonLdPricedOfferCount: number;
|
|
1196
|
+
/** Estimated number of visible pricing tiers in server HTML. */
|
|
1197
|
+
readonly visibleTierCount: number;
|
|
1198
|
+
/** Total visible currency price occurrences found in server HTML. */
|
|
1199
|
+
readonly visiblePriceCount: number;
|
|
1200
|
+
/** True when a feature comparison table contains icon-only SVG/empty-text cells. */
|
|
1201
|
+
readonly iconOnlyFeatureMatrix: boolean;
|
|
1202
|
+
/** Count of icon-only / empty-text cells inside comparison tables. */
|
|
1203
|
+
readonly iconOnlyCellCount: number;
|
|
1204
|
+
/** True when server HTML includes a monthly/annual billing toggle hint. */
|
|
1205
|
+
readonly hasBillingToggleHint: boolean;
|
|
1206
|
+
/** True when a billing toggle hint is present but only one billing period appears in server HTML. */
|
|
1207
|
+
readonly billingToggleSinglePeriodOnly: boolean;
|
|
1208
|
+
/** Distinct billing cadences extracted from visible text (e.g. '/mo', '/yr', 'per seat', 'billed annually'). */
|
|
1209
|
+
readonly billingCadences: readonly string[];
|
|
1210
|
+
/** Total quantified SaaS feature-limit mentions across the 14 canonical quota units. */
|
|
1211
|
+
readonly featureLimitCount: number;
|
|
1212
|
+
/** Per-unit counts for detected SaaS feature-limit quotas. */
|
|
1213
|
+
readonly featureLimitUnits: Readonly<Partial<Record<SaasQuotaUnit, number>>>;
|
|
1214
|
+
/** Distinct canonical quota units detected. */
|
|
1215
|
+
readonly detectedQuotaUnits: readonly SaasQuotaUnit[];
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Multi-tier SaaS pricing & feature-limit auditor over server HTML and JSON-LD.
|
|
1219
|
+
* Pure, non-executing, unscored: inspects Offer coverage, visible tiers,
|
|
1220
|
+
* icon-only comparison matrix cells, single-period billing toggle hints,
|
|
1221
|
+
* billing cadences, and quantified SaaS feature-limit quota units.
|
|
1222
|
+
*/
|
|
1223
|
+
declare function auditPricingAndLimits(html: string, jsonLdNodes?: readonly PricingAuditJsonLdNode[]): PricingAndLimitsAudit;
|
|
1224
|
+
interface DeclaredPageFacts {
|
|
1225
|
+
/** The modified date the page itself states (ISO 8601), or null. */
|
|
1226
|
+
updated: string | null;
|
|
1227
|
+
/** Where each price the page states was found; empty when no price was readable. */
|
|
1228
|
+
priceSources: ArsFactSource[];
|
|
1229
|
+
}
|
|
1230
|
+
/**
|
|
1231
|
+
* The extractor's own `updated` and `price` facts, read with a profile that asks
|
|
1232
|
+
* for exactly those two, whatever kind the page was classified as. `score()`
|
|
1233
|
+
* extracts against the page kind's profile (an `unknown` page never yields a
|
|
1234
|
+
* price), so these values are taken separately and never feed a score.
|
|
1235
|
+
*/
|
|
1236
|
+
declare function declaredPageFacts(evidence: ArsEvidence): DeclaredPageFacts | null;
|
|
1237
|
+
|
|
1238
|
+
export { ARS_CORPUS_HASH, ARS_HEURISTIC_WEIGHT, ARS_HEURISTIC_WEIGHT_CEILING, ARS_MEASURED_WEIGHT, ArsAudienceDecision, ArsBand, ArsBasis, type ArsCheckMeta, type ArsClassification, ArsDimensionId, ArsEvidence, ArsFactObservation, ArsFactProfile, ArsHttpCapture, ArsPageKind, type ArsPass1Signals, ArsRecommendation, type ArsRecommendationInput, ArsResult, ArsRuleset, CHECK_META, type CanonicalDeclaration, type ChallengeInput, type ContentSignalRule, type ContentSignalValue, type ContentSignalsReport, DEFAULT_RULESET, DIMENSION_META, type DeclaredPageFacts, EDGE_CHALLENGE_VENDOR_LABEL, type EdgeChallenge, type EdgeChallengeVendor, type Money, type MoneyHints, type NoindexDirective, PROFILES, type PageIndexSignals, type ParsedMoney, type PricingAndLimitsAudit, type PricingAuditJsonLdNode, type RestrictedRobotsDirectiveKind, type RobotsRestrictionDirective, SAAS_QUOTA_UNITS, SUBPOINTS, type SaasQuotaUnit, type SpaJsDependencyReason, type SpaJsDependencyReport, auditPricingAndLimits, bandFor, canonicalJson, challengeDetail, classify, decideRobots, declaredMarkdownAlternates, declaredPageFacts, detectEdgeChallenge, detectSpaJsDependency, edgeChallengeOf, evidenceHash, indexSignalsOf, isMachineCopy, markdownAlternateTarget, minorUnitDigits, pageIndexSignals, parseChallengeDetail, parseContentSignals, parseMoneyText, parseRobots, pathMatches, profileFor, recommend, robotsEdgeChallengeOf, rulesetHash, score, sha256Hex, utf8Length };
|