cbrowser 18.22.0 → 18.24.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/dist/analysis/accessibility-empathy.d.ts.map +1 -1
- package/dist/analysis/accessibility-empathy.js +60 -11
- package/dist/analysis/accessibility-empathy.js.map +1 -1
- package/dist/analysis/agent-ready-audit.d.ts.map +1 -1
- package/dist/analysis/agent-ready-audit.js +131 -4
- package/dist/analysis/agent-ready-audit.js.map +1 -1
- package/dist/analysis/competitive-benchmark.d.ts.map +1 -1
- package/dist/analysis/competitive-benchmark.js +6 -1
- package/dist/analysis/competitive-benchmark.js.map +1 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +4 -2
- package/dist/browser.js.map +1 -1
- package/dist/cli.js +51 -4
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +7 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -2
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +3 -2
- package/dist/mcp-server.js.map +1 -1
- package/dist/mcp-tools/base/analysis-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/analysis-tools.js +14 -0
- package/dist/mcp-tools/base/analysis-tools.js.map +1 -1
- package/dist/mcp-tools/base/audit-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/audit-tools.js +7 -0
- package/dist/mcp-tools/base/audit-tools.js.map +1 -1
- package/dist/mcp-tools/base/browser-management-tools.d.ts +1 -1
- package/dist/mcp-tools/base/browser-management-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/browser-management-tools.js +4 -3
- package/dist/mcp-tools/base/browser-management-tools.js.map +1 -1
- package/dist/mcp-tools/base/remediation-tools.js +1 -1
- package/dist/mcp-tools/base/remediation-tools.js.map +1 -1
- package/dist/mcp-tools/types.d.ts +2 -0
- package/dist/mcp-tools/types.d.ts.map +1 -1
- package/dist/personas.d.ts +35 -0
- package/dist/personas.d.ts.map +1 -1
- package/dist/personas.js +99 -0
- package/dist/personas.js.map +1 -1
- package/dist/remediation/structured-data.d.ts +13 -0
- package/dist/remediation/structured-data.d.ts.map +1 -1
- package/dist/remediation/structured-data.js +130 -21
- package/dist/remediation/structured-data.js.map +1 -1
- package/dist/types.d.ts +35 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/docs/Tools-Overview.md +18 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -27,7 +27,7 @@ import { getStatusInfo, formatStatus, getDataDir } from "./config.js";
|
|
|
27
27
|
import { printEnterpriseStatus } from "./stealth/index.js";
|
|
28
28
|
import { runCognitiveJourney, getAnthropicApiKey, setAnthropicApiKey, removeAnthropicApiKey, isApiKeyConfigured, } from "./cognitive/index.js";
|
|
29
29
|
// Lightpanda integration (v18.20.0) - OPT-IN ONLY with security guardrails
|
|
30
|
-
import { getLightpandaStatus, LIGHTPANDA_SETUP_GUIDE, LIGHTPANDA_SECURITY_WARNING, } from "./lightpanda.js";
|
|
30
|
+
import { getLightpandaStatus, LIGHTPANDA_SETUP_GUIDE, LIGHTPANDA_SECURITY_WARNING, isLightpandaConfigured, } from "./lightpanda.js";
|
|
31
31
|
// Version from package.json - single source of truth
|
|
32
32
|
import { VERSION } from "./version.js";
|
|
33
33
|
// Node readline for interactive input
|
|
@@ -65,6 +65,7 @@ function showHelp() {
|
|
|
65
65
|
NAVIGATION
|
|
66
66
|
navigate <url> Navigate and take screenshot
|
|
67
67
|
screenshot [path] Take screenshot of current page
|
|
68
|
+
--no-restore Don't reload saved URL (capture current state after interactions)
|
|
68
69
|
|
|
69
70
|
INTERACTION
|
|
70
71
|
click <selector> Click element (tries text, label, role, CSS)
|
|
@@ -643,6 +644,7 @@ OPTIONS
|
|
|
643
644
|
--force Bypass red zone safety checks
|
|
644
645
|
--headless Run browser in headless mode
|
|
645
646
|
--no-persistent Disable persistent browser context (default: enabled)
|
|
647
|
+
--no-restore Skip session URL restoration (preserves page state after interactions)
|
|
646
648
|
|
|
647
649
|
ENVIRONMENT VARIABLES
|
|
648
650
|
CBROWSER_DATA_DIR Custom data directory (default: ~/.cbrowser)
|
|
@@ -1332,6 +1334,8 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
|
|
|
1332
1334
|
}
|
|
1333
1335
|
// Default to headless for CLI usage, unless explicitly set to false
|
|
1334
1336
|
const headless = options.headless !== false && options.headless !== "false";
|
|
1337
|
+
// --no-restore: skip session URL restoration (preserves page state after interactions)
|
|
1338
|
+
const skipRestore = options.restore === false || options.restore === "false";
|
|
1335
1339
|
const browser = new CBrowser({
|
|
1336
1340
|
browser: browserType,
|
|
1337
1341
|
headless,
|
|
@@ -1341,6 +1345,7 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
|
|
|
1341
1345
|
timezone: options.timezone,
|
|
1342
1346
|
recordVideo: options["record-video"] === true,
|
|
1343
1347
|
persistent: persistentMode,
|
|
1348
|
+
skipSessionRestore: skipRestore,
|
|
1344
1349
|
verbose: true,
|
|
1345
1350
|
});
|
|
1346
1351
|
try {
|
|
@@ -2037,13 +2042,48 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
|
|
|
2037
2042
|
}
|
|
2038
2043
|
break;
|
|
2039
2044
|
}
|
|
2045
|
+
case "cleanup": {
|
|
2046
|
+
// Import the cleanup functions
|
|
2047
|
+
const { listInvalidPersonas, cleanupInvalidPersonas } = await import("./personas.js");
|
|
2048
|
+
const dryRun = options["dry-run"] === true;
|
|
2049
|
+
if (dryRun) {
|
|
2050
|
+
const invalid = listInvalidPersonas();
|
|
2051
|
+
if (invalid.length === 0) {
|
|
2052
|
+
console.log("✓ No invalid personas found.");
|
|
2053
|
+
}
|
|
2054
|
+
else {
|
|
2055
|
+
console.log(`\n⚠️ Found ${invalid.length} invalid persona(s):\n`);
|
|
2056
|
+
for (const { name, reason } of invalid) {
|
|
2057
|
+
console.log(` • ${name}`);
|
|
2058
|
+
console.log(` Reason: ${reason}`);
|
|
2059
|
+
}
|
|
2060
|
+
console.log("\nRun 'cbrowser persona cleanup' (without --dry-run) to remove them.");
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
else {
|
|
2064
|
+
const removed = cleanupInvalidPersonas();
|
|
2065
|
+
if (removed.length === 0) {
|
|
2066
|
+
console.log("✓ No invalid personas found.");
|
|
2067
|
+
}
|
|
2068
|
+
else {
|
|
2069
|
+
console.log(`\n🧹 Removed ${removed.length} invalid persona(s):\n`);
|
|
2070
|
+
for (const { name, reason } of removed) {
|
|
2071
|
+
console.log(` ✗ ${name}`);
|
|
2072
|
+
console.log(` Reason: ${reason}`);
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
break;
|
|
2077
|
+
}
|
|
2040
2078
|
default:
|
|
2041
|
-
console.error("Usage: cbrowser persona [list|create|show|delete|export|import]");
|
|
2079
|
+
console.error("Usage: cbrowser persona [list|create|show|delete|export|import|cleanup]");
|
|
2042
2080
|
console.error("\nExamples:");
|
|
2043
2081
|
console.error(" cbrowser persona list");
|
|
2044
2082
|
console.error(" cbrowser persona create \"impatient developer\" --name dev-persona");
|
|
2045
2083
|
console.error(" cbrowser persona show power-user");
|
|
2046
2084
|
console.error(" cbrowser persona delete my-custom-persona");
|
|
2085
|
+
console.error(" cbrowser persona cleanup --dry-run # Preview invalid personas");
|
|
2086
|
+
console.error(" cbrowser persona cleanup # Remove invalid personas");
|
|
2047
2087
|
}
|
|
2048
2088
|
break;
|
|
2049
2089
|
}
|
|
@@ -4636,12 +4676,19 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
|
|
|
4636
4676
|
const url = args[0];
|
|
4637
4677
|
if (!url) {
|
|
4638
4678
|
console.error("Error: URL required");
|
|
4639
|
-
console.error("Usage: cbrowser agent-ready-audit <url> [--html] [--output <file>]");
|
|
4679
|
+
console.error("Usage: cbrowser agent-ready-audit <url> [--html] [--output <file>] [--lightpanda]");
|
|
4680
|
+
process.exit(1);
|
|
4681
|
+
}
|
|
4682
|
+
const useLightpanda = options.lightpanda === true;
|
|
4683
|
+
if (useLightpanda && !isLightpandaConfigured()) {
|
|
4684
|
+
console.error("Error: --lightpanda flag requires LIGHTPANDA_ENDPOINT or LIGHTPANDA_TOKEN to be set");
|
|
4685
|
+
console.error("Run 'cbrowser lightpanda-setup' for instructions.");
|
|
4640
4686
|
process.exit(1);
|
|
4641
4687
|
}
|
|
4642
|
-
console.log(`\n🤖 Running Agent-Ready Audit on ${url}
|
|
4688
|
+
console.log(`\n🤖 Running Agent-Ready Audit on ${url}...${useLightpanda ? " (with Lightpanda)" : ""}\n`);
|
|
4643
4689
|
const result = await runAgentReadyAudit(url, {
|
|
4644
4690
|
headless,
|
|
4691
|
+
useLightpanda,
|
|
4645
4692
|
});
|
|
4646
4693
|
// Print formatted report
|
|
4647
4694
|
const report = formatAgentReadyReport(result);
|