safari-mcp 2.22.12 → 2.22.13
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/extension/background.js +4 -1
- package/package.json +1 -1
package/extension/background.js
CHANGED
|
@@ -125,7 +125,10 @@ function _safeTabUrl(rawUrl) {
|
|
|
125
125
|
|
|
126
126
|
function _receiptOrigin(rawUrl) {
|
|
127
127
|
const raw = String(rawUrl || "");
|
|
128
|
-
|
|
128
|
+
// Safari leaves `url` off a blank tab (measured 7.10.26). Read as no origin at all, the
|
|
129
|
+
// about:blank receipt of a fresh safari_new_tab() was refused on its first command, and
|
|
130
|
+
// getReceipt could not rotate it: the tab could be neither used nor closed.
|
|
131
|
+
if (!raw || raw === "about:blank") return "about:blank";
|
|
129
132
|
try {
|
|
130
133
|
const parsed = new URL(raw);
|
|
131
134
|
return /^https?:$/.test(parsed.protocol) ? parsed.origin : "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "safari-mcp",
|
|
3
|
-
"version": "2.22.
|
|
3
|
+
"version": "2.22.13",
|
|
4
4
|
"mcpName": "io.github.achiya-automation/safari-mcp",
|
|
5
5
|
"description": "Safari browser automation for AI agents — native macOS, zero Chrome overhead. 98 tools via AppleScript + JavaScript.",
|
|
6
6
|
"type": "module",
|