safari-mcp 2.11.3 → 2.11.5
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/index.js +8 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -473,6 +473,14 @@ try {
|
|
|
473
473
|
|
|
474
474
|
// POST /proxy-command — secondary instances send commands through primary
|
|
475
475
|
if (req.method === "POST" && req.url === "/proxy-command") {
|
|
476
|
+
// חוסם כש-SAFARI_PROFILE מוגדר — אחרת ה-extension עלול לפעול בפרופיל הלא נכון
|
|
477
|
+
if (process.env.SAFARI_PROFILE) {
|
|
478
|
+
res.writeHead(503, { "Content-Type": "application/json" });
|
|
479
|
+
res.end(JSON.stringify({
|
|
480
|
+
error: `Refusing /proxy-command: SAFARI_PROFILE="${process.env.SAFARI_PROFILE}" is set on the host instance. The Safari extension may be connected to a different profile window, which would execute commands in the wrong profile. Use the safari_* MCP tools instead — they route through AppleScript when SAFARI_PROFILE is set and stay within the configured profile window.`
|
|
481
|
+
}));
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
476
484
|
let body = "";
|
|
477
485
|
req.on("data", (chunk) => { body += chunk; if (body.length > MAX_BODY_SIZE) { res.writeHead(413); res.end("Payload too large"); req.destroy(); } });
|
|
478
486
|
req.on("end", async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "safari-mcp",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.5",
|
|
4
4
|
"mcpName": "io.github.achiya-automation/safari-mcp",
|
|
5
5
|
"description": "Safari browser automation for AI agents — native macOS, zero Chrome overhead. 80 tools via AppleScript + JavaScript.",
|
|
6
6
|
"type": "module",
|