rebilder 0.1.1 → 0.2.1
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/README.md +107 -79
- package/dist/bin.js +37 -15
- package/dist/bin.js.map +1 -1
- package/dist/index.cjs +37 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -18
- package/dist/index.d.ts +14 -18
- package/dist/index.js +38 -17
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -534,14 +534,6 @@ var ARS_NOTICE_LINES = [
|
|
|
534
534
|
"facts are true, or whether any assistant cites this page."
|
|
535
535
|
];
|
|
536
536
|
var ARS_NOTICE = ARS_NOTICE_LINES.join(" ");
|
|
537
|
-
var CONFLICT_OF_INTEREST_LINES = [
|
|
538
|
-
"ARS is authored by Rebilder, which sells content-negotiation middleware.",
|
|
539
|
-
"Two ARS checks (D2.1 content negotiation, D5 structured data) can be",
|
|
540
|
-
"satisfied by Rebilder\u2019s free gateway, and reaching an A requires both.",
|
|
541
|
-
"The full ruleset, thresholds, and conformance corpus are published so this",
|
|
542
|
-
"bias is auditable rather than hidden."
|
|
543
|
-
];
|
|
544
|
-
var CONFLICT_OF_INTEREST = CONFLICT_OF_INTEREST_LINES.join(" ");
|
|
545
537
|
var TELEMETRY_LINES = [
|
|
546
538
|
"This CLI ships zero telemetry. It never uploads a scan, a URL, a hostname,",
|
|
547
539
|
"or a result. The only requests it makes are to the target you name."
|
|
@@ -817,6 +809,25 @@ function checkSuite(report, failOn, ctx) {
|
|
|
817
809
|
return { xml, tests, failures, errors };
|
|
818
810
|
}
|
|
819
811
|
|
|
812
|
+
// src/next-steps.ts
|
|
813
|
+
function nextSteps(result) {
|
|
814
|
+
if (result.outcome.kind !== "scored") return [];
|
|
815
|
+
const found = new Set(result.facts.map((fact) => fact.kind));
|
|
816
|
+
const missing = result.factProfile.core.filter((kind) => !found.has(kind));
|
|
817
|
+
const steps = [];
|
|
818
|
+
if (missing.length > 0) {
|
|
819
|
+
steps.push(`Check these business details: ${missing.join(", ")}. They were not detected in this capture (heuristic); verify the page before adding or changing content.`);
|
|
820
|
+
} else {
|
|
821
|
+
steps.push("The expected core business details were detected (heuristic). Review their accuracy against your current products, services and policies.");
|
|
822
|
+
}
|
|
823
|
+
const first = result.recommendations[0];
|
|
824
|
+
if (first !== void 0) steps.push(`Start with: ${first.title}. ${first.detail}`);
|
|
825
|
+
steps.push(result.cost.negotiatedBytes === null ? "To connect your existing information, run rebilder init in your project. Review the generated configuration and connect your real data before deployment." : "Compare the two responses with rebilder diff <url> and confirm the same business facts reach customers and assistants.");
|
|
826
|
+
steps.push("After updating your site, run rebilder check <url> again. Export --format markdown --out review.md to share the findings with your team.");
|
|
827
|
+
steps.push("This scan measures page readability; it does not measure customer demand, AI recommendations or sales.");
|
|
828
|
+
return steps;
|
|
829
|
+
}
|
|
830
|
+
|
|
820
831
|
// src/format/markdown.ts
|
|
821
832
|
function renderMarkdown(payload, ctx) {
|
|
822
833
|
switch (payload.command) {
|
|
@@ -853,6 +864,10 @@ function checkSection(report) {
|
|
|
853
864
|
"",
|
|
854
865
|
`${result.measuredWeight} of the 100 points are measured; ${result.heuristicWeight} are heuristic.`,
|
|
855
866
|
"",
|
|
867
|
+
"### Your next steps",
|
|
868
|
+
"",
|
|
869
|
+
...nextSteps(result).map((step) => `- ${escapeCell(step)}`),
|
|
870
|
+
"",
|
|
856
871
|
"| Check | Points | Basis |",
|
|
857
872
|
"| --- | ---: | --- |"
|
|
858
873
|
);
|
|
@@ -1135,6 +1150,9 @@ function checkBlock(report, pretty) {
|
|
|
1135
1150
|
)
|
|
1136
1151
|
);
|
|
1137
1152
|
lines.push("");
|
|
1153
|
+
lines.push(paint("Your next steps", "bold"));
|
|
1154
|
+
for (const step of nextSteps(result)) lines.push(` ${glyphs.bullet} ${step}`);
|
|
1155
|
+
lines.push("");
|
|
1138
1156
|
for (const dimension of result.dimensions) {
|
|
1139
1157
|
lines.push(...dimensionLines(dimension, pretty));
|
|
1140
1158
|
}
|
|
@@ -1389,7 +1407,7 @@ var EXIT_TABLE = [
|
|
|
1389
1407
|
` ${EXIT.PROBE} probe failed / target unreachable \u2014 infrastructure, not a score failure`,
|
|
1390
1408
|
` ${EXIT.POLICY} blocked by policy (SSRF guard, robots opt-out, probe budget spent)`
|
|
1391
1409
|
];
|
|
1392
|
-
var GENERAL = `rebilder \u2014
|
|
1410
|
+
var GENERAL = `rebilder \u2014 help AI assistants understand your business website.
|
|
1393
1411
|
|
|
1394
1412
|
USAGE
|
|
1395
1413
|
rebilder check <url...> [--format ${FORMATS.join("|")}] [--fail-on ${GRADES.join("|")}]
|
|
@@ -1402,6 +1420,15 @@ USAGE
|
|
|
1402
1420
|
rebilder help <command> detail for one command
|
|
1403
1421
|
rebilder --version
|
|
1404
1422
|
|
|
1423
|
+
START HERE
|
|
1424
|
+
1. Check an important product, service or location page.
|
|
1425
|
+
2. Review the business details and suggested next steps in the report.
|
|
1426
|
+
3. Run rebilder init in your project to prepare a website connection.
|
|
1427
|
+
4. Update your site and rerun the check to verify the result.
|
|
1428
|
+
|
|
1429
|
+
Share a report: rebilder check <url> --format markdown --out review.md
|
|
1430
|
+
A scan measures readability, not AI recommendations, customer demand or sales.
|
|
1431
|
+
|
|
1405
1432
|
EXIT CODES (a stable contract; never renumbered)
|
|
1406
1433
|
${EXIT_TABLE.join("\n")}
|
|
1407
1434
|
|
|
@@ -1413,9 +1440,6 @@ ${EXIT_TABLE.join("\n")}
|
|
|
1413
1440
|
ZERO TELEMETRY
|
|
1414
1441
|
${TELEMETRY_LINES.map((line) => ` ${line}`).join("\n")}
|
|
1415
1442
|
|
|
1416
|
-
DISCLOSURE
|
|
1417
|
-
${CONFLICT_OF_INTEREST_LINES.map((line) => ` ${line}`).join("\n")}
|
|
1418
|
-
|
|
1419
1443
|
Spec: https://rebilder.com/spec/ars Crawler policy: https://rebilder.com/bots
|
|
1420
1444
|
`;
|
|
1421
1445
|
var CHECK = `rebilder check <url...>
|
|
@@ -1444,9 +1468,6 @@ OPTIONS
|
|
|
1444
1468
|
A non-graded outcome \u2014 a deliberate robots opt-out, a 403 at the edge, an
|
|
1445
1469
|
unreachable host \u2014 never produces exit 1. Only a real score compared against a
|
|
1446
1470
|
threshold you set can do that.
|
|
1447
|
-
|
|
1448
|
-
DISCLOSURE
|
|
1449
|
-
${CONFLICT_OF_INTEREST_LINES.map((line) => ` ${line}`).join("\n")}
|
|
1450
1471
|
`;
|
|
1451
1472
|
var DIFF = `rebilder diff <url>
|
|
1452
1473
|
|
|
@@ -1503,7 +1524,7 @@ function helpText(topic) {
|
|
|
1503
1524
|
}
|
|
1504
1525
|
|
|
1505
1526
|
// src/cli.ts
|
|
1506
|
-
var CLI_VERSION = "0.
|
|
1527
|
+
var CLI_VERSION = "0.2.1";
|
|
1507
1528
|
async function runCli(argv, runtime) {
|
|
1508
1529
|
const caps = detectCapabilities({
|
|
1509
1530
|
env: runtime.env,
|
|
@@ -1622,8 +1643,6 @@ exports.ARS_NOTICE_LINES = ARS_NOTICE_LINES;
|
|
|
1622
1643
|
exports.BADGE_ORIGIN = BADGE_ORIGIN;
|
|
1623
1644
|
exports.CLI_VERSION = CLI_VERSION;
|
|
1624
1645
|
exports.COMMANDS = COMMANDS;
|
|
1625
|
-
exports.CONFLICT_OF_INTEREST = CONFLICT_OF_INTEREST;
|
|
1626
|
-
exports.CONFLICT_OF_INTEREST_LINES = CONFLICT_OF_INTEREST_LINES;
|
|
1627
1646
|
exports.EXIT = EXIT;
|
|
1628
1647
|
exports.FORMATS = FORMATS;
|
|
1629
1648
|
exports.FRAMEWORKS = FRAMEWORKS;
|