@attson/atwebpilot-mcp 0.0.75 → 0.0.77
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/index.js +64 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2499,6 +2499,59 @@ var SKILL_TOOL = {
|
|
|
2499
2499
|
}
|
|
2500
2500
|
};
|
|
2501
2501
|
|
|
2502
|
+
// package.json
|
|
2503
|
+
var package_default = {
|
|
2504
|
+
name: "@attson/atwebpilot-mcp",
|
|
2505
|
+
version: "0.0.77",
|
|
2506
|
+
license: "Apache-2.0",
|
|
2507
|
+
description: "MCP server for the atwebpilot browser extension - let Codex or Claude Code drive your browser.",
|
|
2508
|
+
homepage: "https://github.com/attson/atwebpilot#readme",
|
|
2509
|
+
repository: {
|
|
2510
|
+
type: "git",
|
|
2511
|
+
url: "git+https://github.com/attson/atwebpilot.git"
|
|
2512
|
+
},
|
|
2513
|
+
type: "module",
|
|
2514
|
+
bin: {
|
|
2515
|
+
"atwebpilot-mcp": "./dist/index.js"
|
|
2516
|
+
},
|
|
2517
|
+
exports: {
|
|
2518
|
+
".": "./dist/index.js"
|
|
2519
|
+
},
|
|
2520
|
+
files: [
|
|
2521
|
+
"dist",
|
|
2522
|
+
"README.md",
|
|
2523
|
+
"LICENSE"
|
|
2524
|
+
],
|
|
2525
|
+
publishConfig: {
|
|
2526
|
+
access: "public"
|
|
2527
|
+
},
|
|
2528
|
+
scripts: {
|
|
2529
|
+
typecheck: "tsc --noEmit",
|
|
2530
|
+
test: "vitest run",
|
|
2531
|
+
build: "tsup && node scripts/copy-skill.mjs",
|
|
2532
|
+
start: "tsx src/index.ts",
|
|
2533
|
+
"analyze:sessions": "tsx src/session-analysis/cli.ts"
|
|
2534
|
+
},
|
|
2535
|
+
dependencies: {
|
|
2536
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
2537
|
+
ws: "^8.18.0",
|
|
2538
|
+
zod: "^3.23.8"
|
|
2539
|
+
},
|
|
2540
|
+
devDependencies: {
|
|
2541
|
+
"@atwebpilot/shared": "workspace:*",
|
|
2542
|
+
"@atwebpilot/coordinator": "workspace:*",
|
|
2543
|
+
"@types/node": "^20",
|
|
2544
|
+
"@types/ws": "^8.5.12",
|
|
2545
|
+
tsup: "^8.0.0",
|
|
2546
|
+
tsx: "^4.19.0",
|
|
2547
|
+
typescript: "^5.5.4",
|
|
2548
|
+
vitest: "^2.0.5"
|
|
2549
|
+
}
|
|
2550
|
+
};
|
|
2551
|
+
|
|
2552
|
+
// src/version.ts
|
|
2553
|
+
var MCP_VERSION = package_default.version;
|
|
2554
|
+
|
|
2502
2555
|
// src/mcp-server.ts
|
|
2503
2556
|
var ALL_BROWSER_TOOLS = generateBrowserTools("full");
|
|
2504
2557
|
var BROWSER_BY_NAME = new Map(ALL_BROWSER_TOOLS.map((t) => [t.name, t]));
|
|
@@ -2612,7 +2665,7 @@ async function revealBrowserSurface(state, onListChanged) {
|
|
|
2612
2665
|
}
|
|
2613
2666
|
function createMcpServer(deps, state = DEFAULT_STATE) {
|
|
2614
2667
|
const server = new Server(
|
|
2615
|
-
{ name: "atwebpilot-mcp", version:
|
|
2668
|
+
{ name: "atwebpilot-mcp", version: MCP_VERSION },
|
|
2616
2669
|
{ capabilities: { tools: { listChanged: true }, logging: {} } }
|
|
2617
2670
|
);
|
|
2618
2671
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: buildToolList(deps, state) }));
|
|
@@ -2649,7 +2702,7 @@ function renderPairPage(payload) {
|
|
|
2649
2702
|
<body style="font:14px/1.6 system-ui,sans-serif;padding:2rem;max-width:32rem;margin:auto;color:#222">
|
|
2650
2703
|
<h1 style="font-size:1.1rem;margin:0 0 1rem">AtWebPilot \u914D\u5BF9</h1>
|
|
2651
2704
|
<p id="atwebpilot-status">\u6B63\u5728\u8054\u7CFB\u6269\u5C55\u2026</p>
|
|
2652
|
-
<p style="color:#666;font-size:13px">\u4F1A\u8BDD\uFF1A${escapeHtml(payload.label)} \xB7 pid ${payload.pid} \xB7 \u7AEF\u53E3 ${payload.port}</p>
|
|
2705
|
+
<p style="color:#666;font-size:13px">\u4F1A\u8BDD\uFF1A${escapeHtml(payload.label)} \xB7 pid ${payload.pid} \xB7 \u7AEF\u53E3 ${payload.port} \xB7 ${payload.mcpVersion ? `MCP v${escapeHtml(payload.mcpVersion)}` : "MCP \u7248\u672C\u672A\u77E5"}</p>
|
|
2653
2706
|
<p style="color:#666;font-size:13px">\u6CA1\u6709\u53CD\u5E94\uFF1F\u8BF7\u786E\u8BA4\u8FD9\u4E2A\u6D4F\u89C8\u5668\u5DF2\u5B89\u88C5\u5E76\u542F\u7528 AtWebPilot \u6269\u5C55\uFF0C\u7136\u540E\u5237\u65B0\u672C\u9875\u3002</p>
|
|
2654
2707
|
<script>
|
|
2655
2708
|
(function () {
|
|
@@ -2669,8 +2722,13 @@ function renderPairPage(payload) {
|
|
|
2669
2722
|
done = true;
|
|
2670
2723
|
var el = document.getElementById("atwebpilot-status");
|
|
2671
2724
|
if (e.data.ok) {
|
|
2672
|
-
|
|
2673
|
-
|
|
2725
|
+
if (typeof e.data.versionWarning === "string" && e.data.versionWarning) {
|
|
2726
|
+
el.textContent = "\u7248\u672C\u63D0\u9192\uFF1A" + e.data.versionWarning + "\u3002\u4F1A\u8BDD\u5DF2\u8FDE\u63A5\uFF0C\u53EF\u4EE5\u5173\u95ED\u672C\u9875\u3002";
|
|
2727
|
+
el.style.color = "#b45309";
|
|
2728
|
+
} else {
|
|
2729
|
+
el.textContent = e.data.trusted ? "\u5DF2\u4FE1\u4EFB\uFF0C\u8FDE\u63A5\u4E2D\u2026" : "\u5DF2\u8FDE\u63A5";
|
|
2730
|
+
setTimeout(function () { window.close(); }, 1200);
|
|
2731
|
+
}
|
|
2674
2732
|
} else if (e.data.reason === "denied") {
|
|
2675
2733
|
fetch("/pair/decision", {
|
|
2676
2734
|
method: "POST",
|
|
@@ -3177,7 +3235,8 @@ function createHubEnsurer(d) {
|
|
|
3177
3235
|
sessionId: info.sessionId,
|
|
3178
3236
|
label: info.label,
|
|
3179
3237
|
pid: info.pid,
|
|
3180
|
-
port
|
|
3238
|
+
port,
|
|
3239
|
+
mcpVersion: MCP_VERSION
|
|
3181
3240
|
});
|
|
3182
3241
|
try {
|
|
3183
3242
|
hub = new LoopbackWSHub({ ...common(), port: preferred, pairPayload });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@attson/atwebpilot-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.77",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "MCP server for the atwebpilot browser extension - let Codex or Claude Code drive your browser.",
|
|
6
6
|
"homepage": "https://github.com/attson/atwebpilot#readme",
|