@opentabs-dev/opentabs-plugin-minimax-agent 0.0.74 → 0.0.75

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.
@@ -231,18 +231,18 @@
231
231
 
232
232
  // node_modules/@opentabs-dev/plugin-sdk/dist/storage.js
233
233
  var getLocalStorage = (key) => {
234
+ try {
235
+ return localStorage.getItem(key);
236
+ } catch {
237
+ }
234
238
  let storage;
235
239
  try {
236
- storage = window.localStorage;
240
+ storage = localStorage;
237
241
  } catch {
238
242
  return null;
239
243
  }
240
- if (storage) {
241
- try {
242
- return storage.getItem(key);
243
- } catch {
244
- return null;
245
- }
244
+ if (storage !== void 0) {
245
+ return null;
246
246
  }
247
247
  try {
248
248
  const iframe = document.createElement("iframe");
@@ -15208,21 +15208,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15208
15208
  };
15209
15209
  var src_default = new MinimaxAgentPlugin();
15210
15210
 
15211
- // dist/_adapter_entry_e4827ca3-3e61-4557-afe8-6f7744e54c03.ts
15211
+ // dist/_adapter_entry_7af6de41-2605-4c0c-b1fe-33e9e5093ac6.ts
15212
15212
  if (!globalThis.__openTabs) {
15213
15213
  globalThis.__openTabs = {};
15214
15214
  } else {
15215
15215
  const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
15216
15216
  if (desc && !desc.writable) {
15217
- const ot3 = globalThis.__openTabs;
15217
+ const ot2 = globalThis.__openTabs;
15218
15218
  const newAdaptersObj = {};
15219
- if (ot3.adapters) {
15220
- for (const key of Object.keys(ot3.adapters)) {
15221
- const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
15219
+ if (ot2.adapters) {
15220
+ for (const key of Object.keys(ot2.adapters)) {
15221
+ const d = Object.getOwnPropertyDescriptor(ot2.adapters, key);
15222
15222
  if (d) Object.defineProperty(newAdaptersObj, key, d);
15223
15223
  }
15224
15224
  }
15225
- globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
15225
+ globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdaptersObj });
15226
15226
  }
15227
15227
  }
15228
15228
  if (!globalThis.__openTabs.adapters) {
@@ -15260,16 +15260,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15260
15260
  }
15261
15261
  };
15262
15262
  var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
15263
- var ot2 = globalThis.__openTabs;
15264
- ot2._notifyReadinessChanged = () => {
15265
- try {
15266
- const nonce = globalThis.__openTabs?._readinessNonce;
15267
- if (nonce) {
15268
- window.postMessage({ type: "opentabs:readiness-changed", plugin: "minimax-agent", nonce }, "*");
15269
- }
15270
- } catch {
15271
- }
15272
- };
15273
15263
  var existing = adapters["minimax-agent"];
15274
15264
  if (existing) {
15275
15265
  if (typeof existing.teardown === "function") {
@@ -15281,7 +15271,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15281
15271
  }
15282
15272
  }
15283
15273
  if (!Reflect.deleteProperty(adapters, "minimax-agent")) {
15284
- const ot3 = globalThis.__openTabs;
15274
+ const ot2 = globalThis.__openTabs;
15285
15275
  const newAdapters = {};
15286
15276
  for (const key of Object.keys(adapters)) {
15287
15277
  if (key !== "minimax-agent") {
@@ -15289,7 +15279,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15289
15279
  if (desc) Object.defineProperty(newAdapters, key, desc);
15290
15280
  }
15291
15281
  }
15292
- globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
15282
+ globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
15293
15283
  }
15294
15284
  var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
15295
15285
  for (const tool of src_default.tools) {
@@ -15350,12 +15340,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15350
15340
  }
15351
15341
  }
15352
15342
  };
15353
- const ot3 = globalThis.__openTabs;
15354
- if (!ot3._navigationInterceptor) {
15343
+ const ot2 = globalThis.__openTabs;
15344
+ if (!ot2._navigationInterceptor) {
15355
15345
  const origPushState = history.pushState.bind(history);
15356
15346
  const origReplaceState = history.replaceState.bind(history);
15357
15347
  const callbacks = /* @__PURE__ */ new Map();
15358
- ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
15348
+ ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
15359
15349
  history.pushState = function(...args) {
15360
15350
  origPushState(...args);
15361
15351
  for (const cb of callbacks.values()) {
@@ -15369,7 +15359,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15369
15359
  }
15370
15360
  };
15371
15361
  }
15372
- const interceptor = ot3._navigationInterceptor;
15362
+ const interceptor = ot2._navigationInterceptor;
15373
15363
  interceptor.callbacks.set("minimax-agent", checkUrl);
15374
15364
  window.addEventListener("popstate", checkUrl);
15375
15365
  window.addEventListener("hashchange", checkUrl);
@@ -15424,5 +15414,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15424
15414
  };
15425
15415
  delete src_default.onDeactivate;
15426
15416
  }
15427
- })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["minimax-agent"]){var a=o.adapters["minimax-agent"];a.__adapterHash="d758878c647ccbfc43d87c607a98d67b2788b13761098286f758e33c7b349032";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"minimax-agent",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15417
+ })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["minimax-agent"]){var a=o.adapters["minimax-agent"];a.__adapterHash="fea6480f1caa95741408e4adc101eafc9bc8355a13568811ad9607542f45e53b";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"minimax-agent",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15428
15418
  //# sourceMappingURL=adapter.iife.js.map