safari-mcp 2.22.15 → 2.22.16

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.
@@ -2700,6 +2700,11 @@ const _OWNED_TABS_KEY = "mcpSessionOwnedTabs";
2700
2700
  const _TAB_RECEIPTS_KEY = "mcpOwnedTabReceiptsV3";
2701
2701
  const _TAB_RECEIPTS_VERSION = 3;
2702
2702
  const _BROWSER_SESSION_EPOCH_KEY = "mcpBrowserSessionEpochV1";
2703
+ // The prefix of `_bridgeWorkerId` that the daemon log prints for this worker. Every
2704
+ // ownership envelope written to storage.local carries it, so the on-disk history shows
2705
+ // which worker instance wrote each one and under which epoch (#143). Diagnostic only:
2706
+ // hydration never reads it.
2707
+ const _ENVELOPE_WRITER = _bridgeWorkerId.slice(0, 8);
2703
2708
  // Receipts are bearer capabilities stored entirely out of band. They are never added
2704
2709
  // to a live page URL: doing so corrupts signed queries and application hash routers.
2705
2710
  const _receiptByToken = new Map(); // token → { tabId, windowId, receiptOrigin, identityDigest, issuedAt }
@@ -2977,6 +2982,7 @@ async function _persistOwnedTabs(requireDurableReceipt = false) {
2977
2982
  const receiptEnvelope = {
2978
2983
  version: _TAB_RECEIPTS_VERSION,
2979
2984
  browserEpoch,
2985
+ writer: _ENVELOPE_WRITER,
2980
2986
  at: Date.now(),
2981
2987
  records: [..._receiptByToken.values()].map((record) => ({ ...record })),
2982
2988
  };
@@ -2995,7 +3001,7 @@ async function _persistOwnedTabs(requireDurableReceipt = false) {
2995
3001
  try {
2996
3002
  localWrite = Promise.resolve(browser.storage.local.set({
2997
3003
  [_TAB_RECEIPTS_KEY]: receiptEnvelope,
2998
- [_OWNED_TABS_LOCAL_KEY]: { browserEpoch, at: Date.now(), tabs: owners },
3004
+ [_OWNED_TABS_LOCAL_KEY]: { browserEpoch, writer: _ENVELOPE_WRITER, at: Date.now(), tabs: owners },
2999
3005
  }));
3000
3006
  } catch (error) {
3001
3007
  localWrite = Promise.reject(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "safari-mcp",
3
- "version": "2.22.15",
3
+ "version": "2.22.16",
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",