tarsk 0.5.65 → 0.5.67
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/bundled-skills/skill-creator/eval-viewer/generate_review.js +41 -40
- package/dist/bundled-skills/skill-creator/scripts/aggregate_benchmark.js +106 -98
- package/dist/bundled-skills/skill-creator/scripts/generate_report.js +78 -67
- package/dist/bundled-skills/skill-creator/scripts/improve_description.js +119 -72
- package/dist/bundled-skills/skill-creator/scripts/run_eval.js +76 -54
- package/dist/bundled-skills/skill-creator/scripts/run_loop.js +221 -142
- package/dist/index.js +51645 -47173
- package/dist/public/assets/{account-view-Dp0PfqVq.js → account-view-BlK6g38q.js} +1 -1
- package/dist/public/assets/{alert-dialog-Ge-FFGao.js → alert-dialog-B6An1LDY.js} +1 -1
- package/dist/public/assets/{async-error-boundary-B0tQed36.js → async-error-boundary-Rf-s2_Ez.js} +1 -1
- package/dist/public/assets/browser-tab-BJxPUVJi.js +12 -0
- package/dist/public/assets/{card-xQfAy2Rx.js → card-BDQUHsPD.js} +1 -1
- package/dist/public/assets/chat-dock-context-DyKjqpND.js +1 -0
- package/dist/public/assets/commit-dialog-CYb1kJCq.js +1 -0
- package/dist/public/assets/commit-error-dialog-DvxaNRcH.js +1 -0
- package/dist/public/assets/commit-method-fields-Dijc502F.js +1 -0
- package/dist/public/assets/context-menu-C51M1WGZ.js +1 -0
- package/dist/public/assets/conversation-history-view-w_6Jd3d-.js +1 -0
- package/dist/public/assets/create-project-dialog-CSVkngnF.js +6 -0
- package/dist/public/assets/create-repo-dialog-CcFA8pXz.js +1 -0
- package/dist/public/assets/{delete-confirm-dialog-Dy0dOtPe.js → delete-confirm-dialog-uTSX_x-i.js} +1 -1
- package/dist/public/assets/diff-view-XN5G5F6E.js +4 -0
- package/dist/public/assets/dist-IeRYu0zQ.js +142 -0
- package/dist/public/assets/{explorer-tab-context-8bs_tiCO.js → explorer-tab-context-BdjTEbFh.js} +1 -1
- package/dist/public/assets/explorer-tab-view-A2ICDFPB.js +2 -0
- package/dist/public/assets/explorer-tree-B04Ba59E.js +1 -0
- package/dist/public/assets/explorer-view-CofaKFiu.js +75 -0
- package/dist/public/assets/git-history-dialog-V3kaff2G.js +1 -0
- package/dist/public/assets/index-B0xy4BkI.js +3360 -0
- package/dist/public/assets/index-Cndc50ux.css +1 -0
- package/dist/public/assets/interactive-BrHVRHmQ.js +21 -0
- package/dist/public/assets/{main-tab-context-DHeKIUsf.js → main-tab-context-zQSuRQQG.js} +1 -1
- package/dist/public/assets/mcp-server-card-DOsP-SQ8.js +1 -0
- package/dist/public/assets/merged-pr-dialog-BerRzLlh.js +1 -0
- package/dist/public/assets/model-list-controls-Dw98tMn7.js +1 -0
- package/dist/public/assets/{monaco-setup-x3evbdq3.js → monaco-setup-C87kBr4u.js} +1 -1
- package/dist/public/assets/onboarding-DVc9-yKJ.js +46 -0
- package/dist/public/assets/project-env-vars-view-BQwUd7y6.js +1 -0
- package/dist/public/assets/project-model-aliases-view-CobSp09z.js +1 -0
- package/dist/public/assets/project-settings-view-CPTd5lEi.js +1 -0
- package/dist/public/assets/{project-tools-view-C44y08lY.js → project-tools-view-DShQghoz.js} +1 -1
- package/dist/public/assets/providers-list-view-Da9VMcuP.js +1 -0
- package/dist/public/assets/pull-request-dialog-BAarT9EM.js +1 -0
- package/dist/public/assets/pull-with-changes-dialog-BcF25mjQ.js +1 -0
- package/dist/public/assets/push-before-pr-dialog-BF0NzV2u.js +1 -0
- package/dist/public/assets/react-vendor-B7jFrulV.js +22 -0
- package/dist/public/assets/settings-general-view-DT4nElcL.js +1 -0
- package/dist/public/assets/settings-instructions-view-Bsr8wRMf.js +1 -0
- package/dist/public/assets/settings-list-B9wyVzKw.js +1 -0
- package/dist/public/assets/settings-logs-view-CyaGqUKH.js +5 -0
- package/dist/public/assets/settings-mcp-servers-view-BTUWHB5K.js +5 -0
- package/dist/public/assets/settings-models-view-DFwkVdt3.js +1 -0
- package/dist/public/assets/settings-rules-view-BhA9tjVh.js +8 -0
- package/dist/public/assets/settings-skills-view-BFoO9oZk.js +3 -0
- package/dist/public/assets/{settings-slack-view-OFUhhjTj.js → settings-slack-view-D4mrQ9C9.js} +1 -1
- package/dist/public/assets/settings-slash-commands-view-BLKPDUVG.js +1 -0
- package/dist/public/assets/settings-statistics-view-fa6iBiP8.js +1 -0
- package/dist/public/assets/settings-storage-view-LaiAi5gv.js +1 -0
- package/dist/public/assets/settings-subagents-view-BjMz2Ri_.js +2 -0
- package/dist/public/assets/settings-system-prompt-view-DNh1yqZh.js +1 -0
- package/dist/public/assets/settings-view-BoC66Wji.js +2 -0
- package/dist/public/assets/skeleton-CJSNEi3C.js +1 -0
- package/dist/public/assets/store-B_cK-gsT.js +8 -0
- package/dist/public/assets/{table-CYWF-RhQ.js → table-Cb2C1rQy.js} +1 -1
- package/dist/public/assets/tasks-view-B049aXpC.js +2 -0
- package/dist/public/assets/{terminal-panel-BxUHr-tZ.js → terminal-panel-Pv5xqCpm.js} +3 -3
- package/dist/public/assets/thread-tool-blocks-D9HUkPHB.js +1 -0
- package/dist/public/assets/{ui-components-DjoQfi8k.js → ui-components-DJLsrr5e.js} +1 -1
- package/dist/public/assets/{use-active-dock-panel-instance-BE69kVdb.js → use-active-dock-panel-instance-BlRDPUlZ.js} +1 -1
- package/dist/public/assets/{use-deferred-search-DXrcdbyC.js → use-deferred-search-0sV7mSzX.js} +1 -1
- package/dist/public/assets/use-installed-ai-files-DmLnugpj.js +1 -0
- package/dist/public/assets/{use-settings-page-loading-BC_wP7pl.js → use-settings-page-loading-BU2CDnfE.js} +1 -1
- package/dist/public/assets/{use-suspense-resource-rX-GqyWi.js → use-suspense-resource-CExc4Svq.js} +1 -1
- package/dist/public/assets/{use-toast-BFQ85Ly5.js → use-toast-hxHsVv6a.js} +1 -1
- package/dist/public/assets/{utils-Rlf65JHq.js → utils-SsF94Pkg.js} +1 -1
- package/dist/public/assets/{web-Q-tJsXNN.js → web-BidDZaMC.js} +1 -1
- package/dist/public/assets/{web-D8z4Nni0.js → web-C_HuLxHj.js} +1 -1
- package/dist/public/assets/{web-CxBqU2BU.js → web-DHUv7oQP.js} +1 -1
- package/dist/public/assets/{web-DTwF_7w-.js → web-JMCxQg4N.js} +1 -1
- package/dist/public/browser-preview-rpc.js +465 -7
- package/dist/public/index.html +14 -16
- package/dist/recommended-models.txt +5 -5
- package/package.json +1 -14
- package/dist/public/assets/api-BsPadLpi.js +0 -1
- package/dist/public/assets/browser-tab-hcbTzpVn.js +0 -8
- package/dist/public/assets/chat-dock-context-yQDhSXnw.js +0 -1
- package/dist/public/assets/commit-dialog-DK-NP7EN.js +0 -1
- package/dist/public/assets/commit-method-fields-DG3NtLE2.js +0 -1
- package/dist/public/assets/context-menu-M5y1Qb8G.js +0 -1
- package/dist/public/assets/conversation-history-view-YGPt-fC9.js +0 -1
- package/dist/public/assets/create-project-dialog-DW4oGrl2.js +0 -6
- package/dist/public/assets/create-repo-dialog-BFBOFZ2W.js +0 -1
- package/dist/public/assets/diff-view-Cy5PjlG_.js +0 -4
- package/dist/public/assets/dist-oojFghRi.js +0 -134
- package/dist/public/assets/explorer-tab-view-D6t9Ce05.js +0 -2
- package/dist/public/assets/explorer-tree-BCs2U0De.js +0 -1
- package/dist/public/assets/explorer-view-CxN4GRyn.js +0 -75
- package/dist/public/assets/git-history-dialog-fm9qhkgI.js +0 -1
- package/dist/public/assets/git-ops-button-DO1ng45p.js +0 -2
- package/dist/public/assets/index-B7qJtiRL.js +0 -3307
- package/dist/public/assets/index-GYexJ6QO.css +0 -1
- package/dist/public/assets/interactive-WtOIgeV4.js +0 -21
- package/dist/public/assets/local-tool-blocks-DlqmJ7__.js +0 -1
- package/dist/public/assets/mcp-server-card-V4Ddsgv3.js +0 -1
- package/dist/public/assets/merged-pr-dialog-Bi5pJzTO.js +0 -1
- package/dist/public/assets/model-list-controls-oiBE9X9_.js +0 -1
- package/dist/public/assets/onboarding-dbhmRuxw.js +0 -46
- package/dist/public/assets/project-env-vars-view-OVck-YEy.js +0 -1
- package/dist/public/assets/project-model-aliases-view-Cu-n2j94.js +0 -1
- package/dist/public/assets/project-settings-view-DKkLgg3C.js +0 -1
- package/dist/public/assets/providers-list-view-BEXiqKg8.js +0 -1
- package/dist/public/assets/pull-request-dialog-BOl1VloY.js +0 -1
- package/dist/public/assets/pull-with-changes-dialog-CJKvLUaf.js +0 -1
- package/dist/public/assets/push-before-pr-dialog-BZLScOoO.js +0 -1
- package/dist/public/assets/react-vendor-wGLyNWf9.js +0 -22
- package/dist/public/assets/settings-general-view-LnCQ2zkv.js +0 -1
- package/dist/public/assets/settings-instructions-view-B7lADJZh.js +0 -1
- package/dist/public/assets/settings-list-C5MACtux.js +0 -1
- package/dist/public/assets/settings-logs-view-YWMyQqu5.js +0 -5
- package/dist/public/assets/settings-mcp-servers-view-CN7JO2UD.js +0 -5
- package/dist/public/assets/settings-models-view-CswWfeDN.js +0 -1
- package/dist/public/assets/settings-rules-view-__5f33ot.js +0 -8
- package/dist/public/assets/settings-skills-view-Dvfrl9kz.js +0 -3
- package/dist/public/assets/settings-slash-commands-view-B1pO-Yie.js +0 -1
- package/dist/public/assets/settings-statistics-view-Bp624KXI.js +0 -1
- package/dist/public/assets/settings-storage-view-CHpGieRu.js +0 -1
- package/dist/public/assets/settings-subagents-view-CFggo62r.js +0 -2
- package/dist/public/assets/settings-system-prompt-view-BWD6RrX8.js +0 -1
- package/dist/public/assets/settings-view-ZgVxZhur.js +0 -2
- package/dist/public/assets/skeleton-B_xdlo2b.js +0 -1
- package/dist/public/assets/slug-utils-C5rnmMMP.js +0 -1
- package/dist/public/assets/store-CSyJjyNs.js +0 -7
- package/dist/public/assets/tasks-view-4yyCDYbV.js +0 -2
- package/dist/public/assets/thread-tool-blocks-BfowiaTH.js +0 -1
- package/dist/public/assets/use-installed-ai-files-CZIOFhcX.js +0 -1
|
@@ -1,3 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser preview preload. Injects @mcp-b/webmcp-polyfill at document start
|
|
3
|
+
* (Safari/WebKit has no native WebMCP). After upgrading the package, regenerate
|
|
4
|
+
* the embedded IIFE from app/: `bun scripts/embed-webmcp-polyfill.ts`.
|
|
5
|
+
*/
|
|
6
|
+
(function installTarskWebMcpPolyfill() {
|
|
7
|
+
/* __TARSK_WEBMCP_POLYFILL_SOURCE_START__ */
|
|
8
|
+
var WEBMCP_POLYFILL_SOURCE =
|
|
9
|
+
'var WebMCPPolyfill=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});let t=`Tool was executed but the invocation failed. For example, the script function threw an error`,n=/^[A-Za-z0-9_.-]{1,128}$/u;function r(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function i(e){if(typeof e==`symbol`)throw TypeError(`Symbol values cannot be converted to a DOMString`);return String(e)}function a(e){let t=Reflect.get(e,`name`),n=Reflect.get(e,`description`),a=Reflect.get(e,`title`);if(t===void 0)throw TypeError(`Tool "name" is required`);if(n===void 0)throw TypeError(`Tool "description" is required`);let o=Reflect.get(e,`annotations`),s=r(o)?o:{},c=Reflect.get(e,`inputSchema`),l=Reflect.get(e,`outputSchema`),u=Reflect.get(e,`execute`);return{name:i(t),...a===void 0?{}:{title:i(a).toWellFormed()},description:i(n),...c===void 0?{}:{inputSchema:c},...l===void 0?{}:{outputSchema:l},execute:u,...o===void 0?{}:{annotations:{...s.title===void 0?{}:{title:i(s.title).toWellFormed()},readOnlyHint:!!s.readOnlyHint,...s.destructiveHint===void 0?{}:{destructiveHint:!!s.destructiveHint},...s.idempotentHint===void 0?{}:{idempotentHint:!!s.idempotentHint},...s.openWorldHint===void 0?{}:{openWorldHint:!!s.openWorldHint},untrustedContentHint:!!s.untrustedContentHint}}}}function o(e){return new DOMException(e,`UnknownError`)}function s(e){return o(e instanceof Error?`${t}: ${e.message}`:t)}function c(e){return new DOMException(e,`InvalidStateError`)}function l(e){if(e.name===``)throw c(`Tool "name" must be a non-empty string`);if(typeof e.name!=`string`||!n.test(e.name))throw c(`Tool "name" must be 1–128 characters and contain only ASCII alphanumeric, underscore, hyphen, or period`);if(typeof e.description!=`string`||e.description.length===0)throw c(`Tool "description" must be a non-empty string`);if(typeof e.execute!=`function`)throw TypeError(`Tool "execute" must be a function`)}function u(e){return{readOnlyHint:e.readOnlyHint??!1,untrustedContentHint:e.untrustedContentHint??!1}}function d(e){try{let t=JSON.parse(e);if(Array.isArray(t)||r(t))return t}catch{}throw o(`Failed to parse input arguments`)}function f(e){if(typeof e==`object`&&e||typeof e==`function`)try{let t=JSON.stringify(e);if(t)return t}catch{}return String(e)||`Operation succeeded`}function p(e,t,n=()=>t?.reason){return t?t.aborted?Promise.reject(n()):new Promise((r,i)=>{let a=()=>{o(),i(n())},o=()=>t.removeEventListener(`abort`,a);t.addEventListener(`abort`,a,{once:!0}),e.then(e=>{o(),r(e)},e=>{o(),i(e)})}):e}function m(e){let t=e.origin===`null`?e:new URL(e.origin),n=t.protocol;if([`https:`,`wss:`,`file:`,`chrome-extension:`,`moz-extension:`].includes(n))return!0;let r=t.hostname.toLowerCase(),i=r.split(`.`),a=i.length===4&&i.every(e=>/^\\d{1,3}$/u.test(e)&&Number(e)<=255)&&Number(i[0])===127;return r===`::1`||r===`[::1]`||r===`localhost`||r===`localhost.`||r.endsWith(`.localhost`)||r.endsWith(`.localhost.`)||a}function h(e){for(let t of e??[]){let e;try{e=new URL(t)}catch{throw new DOMException(`Invalid or untrustworthy origin: ${String(t)}`,`SecurityError`)}if(!m(e))throw new DOMException(`Invalid or untrustworthy origin: ${t}`,`SecurityError`)}}function g(e){if(ee(),!e)return;let t=e.defaultView?.DOMException??DOMException,n=!1;try{let t=e.defaultView;n=!!(t&&t.document===e)}catch{}if(!n)throw new t(`The associated document is not fully active`,`InvalidStateError`);let r=Reflect.get(e,`permissionsPolicy`)??Reflect.get(e,`featurePolicy`);if(r&&typeof r==`object`){let e=Reflect.get(r,`features`),n=Reflect.get(r,`allowsFeature`);if(typeof e==`function`&&typeof n==`function`){let i=Reflect.apply(e,r,[]);if(Array.isArray(i)&&i.includes(`tools`)){if(Reflect.apply(n,r,[`tools`])===!0)return;throw new t(`WebMCP is disabled by Permissions Policy`,`NotAllowedError`)}}}let i=e.defaultView;if(!(!i||i.parent===i)){try{i.parent.document;return}catch{}throw new t(`WebMCP in cross-origin frames requires native Permissions Policy support`,`NotAllowedError`)}}function ee(){if(globalThis.originAgentCluster===!1&&globalThis.location?.protocol!==`file:`)throw new DOMException(``,`SecurityError`)}function te(e){try{if(new URL(String(e)).origin!==`null`)return}catch{}throw new DOMException(`Unsupported tool origin: ${String(e)}`,`NotSupportedError`)}function ne(e){if(e===null||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`inputSchema must be an object`);let t=JSON.stringify(e);if(t===void 0)throw TypeError(`inputSchema must be JSON-serializable`);return t}let _=new WeakSet,v=new WeakMap,y=new WeakMap;function b(e){return e.isTrusted&&(_.has(e)||e.eventPhase!==Event.NONE&&e.target instanceof HTMLFormElement&&y.has(e.target))}function re(e,t){if(!b(e))throw new DOMException(`respondWith() is only available during an agent-invoked submit event`,`InvalidStateError`);if(!e.defaultPrevented)throw new DOMException(`respondWith() requires preventDefault() during an agent-invoked submit event`,`InvalidStateError`);if(e.eventPhase===Event.NONE)throw new DOMException(`respondWith() is only available while the submit event is being dispatched`,`InvalidStateError`);_.add(e);let n=Promise.resolve(t);v.set(e,n),e.target instanceof HTMLFormElement&&y.get(e.target)?.respond(e)}let x=new Set([`email`,`password`,`search`,`tel`,`text`,`url`]),ie=new Set([...x,`date`,`datetime-local`,`month`,`number`,`time`,`week`]);function S(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement}function C(e){return Reflect.get(HTMLFormElement.prototype,`elements`,e)}function w(e,t){return Reflect.apply(Element.prototype.getAttribute,e,[t])}function T(e,t){return Reflect.apply(Element.prototype.hasAttribute,e,[t])}function ae(e){return Reflect.get(Node.prototype,`isConnected`,e)}function oe(e){return Reflect.get(Element.prototype,`shadowRoot`,e)}function se(e){return Reflect.apply(HTMLFormElement.prototype.checkValidity,e,[])}function ce(e,t){Reflect.apply(HTMLFormElement.prototype.requestSubmit,e,t?[t]:[])}function le(e){return[...C(e)].filter(e=>S(e)&&!e.matches(`:disabled`)&&!(`readOnly`in e&&e.readOnly&&(e instanceof HTMLTextAreaElement||ie.has(e.type))))}function E(e){let t=new Map;for(let n of le(e)){let e=n.name.trim(),r=t.get(e);r?r.push(n):t.set(e,[n])}return t}function D(e){return[...e.labels??[]].map(e=>{let t=e.cloneNode(!0);return t instanceof HTMLElement?(t.querySelectorAll(`button, input, meter, output, progress, select, textarea`).forEach(e=>e.remove()),t.textContent?.trim()??``):``}).filter(Boolean).join(`; `)}function ue(e,t){for(let n=t[0]?.parentElement;n&&n!==e;n=n.parentElement)if(n instanceof HTMLFieldSetElement&&t.every(e=>n.contains(e)))return n}function de(e,t){if(t.length===1){let e=t[0];return e&&(e.getAttribute(`toolparamdescription`)||D(e)||e.getAttribute(`aria-description`))||void 0}return ue(e,t)?.getAttribute(`toolparamdescription`)||void 0}function O(e,t,n,r){let i=de(t,n),a=i&&r?`${i} (${r})`:i||r;return a?{...e,description:a}:e}function k(e,t){let n=e.getAttribute(t);if(n===null||n.trim()===``)return;let r=Number(n);return Number.isFinite(r)?r:void 0}function fe(e,t){let n=e/t;return Math.abs(n-Math.round(n))<2**-52*16}function A(e){let t=e.getAttribute(`pattern`);if(t!==null)try{return new RegExp(t,`v`),t}catch{return}}function j(e,t=!0){let n={type:`number`},r=k(e,`min`),i=k(e,`max`);r!==void 0&&(n.minimum=r),i!==void 0&&(n.maximum=i);let a=e.getAttribute(`step`);if(a!==`any`){let t=a===null||a===``?1:Number(a),i=Number.isFinite(t)&&t>0?t:1,o=Number(e.getAttribute(`value`));fe(r??(Number.isFinite(o)?o:0),i)&&(n.multipleOf=i)}let o=t?A(e):void 0;return o!==void 0&&(n.pattern=o),n}function M(e,t){let n=e.getAttribute(`step`),r=n===null||n===``?60:Number(n),i=Number.isFinite(r)&&r>0?r:60;return i<1?`${t}(:[0-5][0-9](\\\\.[0-9]{1,3})?)?$`:i<60?`${t}(:[0-5][0-9])?$`:`${t}$`}function pe(e){return{anyOf:e.map(e=>({type:`string`,const:e.value,title:e.textContent??``})),enum:e.map(e=>e.value)}}function N(e){return{anyOf:e.map(e=>{let t=D(e);return{type:`string`,const:e.value,...t?{title:t}:{}}}),enum:e.map(e=>e.value)}}function P(e,t){let n=t[0];if(n){if(t.length>1)return t.every(e=>e instanceof HTMLInputElement)?t.every(e=>e.type===`checkbox`)?O({type:`array`,items:{type:`string`,...N(t)},uniqueItems:!0},e,t):t.every(e=>e.type===`radio`)?O({type:`string`,...N(t)},e,t):void 0:void 0;if(n instanceof HTMLTextAreaElement)return O({type:`string`},e,t);if(n instanceof HTMLSelectElement){let r=pe([...n.options]);return O(n.multiple?{type:`array`,items:{type:`string`,...r},uniqueItems:!0}:{type:`string`,...r},e,t)}if(x.has(n.type)){let r={type:`string`},i=A(n);return i!==void 0&&(r.pattern=i),O(r,e,t)}if(n.type===`hidden`)return n.getAttribute(`toolparamdescription`)?O({type:`string`},e,t):void 0;if(n.type===`number`)return O(j(n),e,t);if(n.type===`range`){let r=j(n,!1);return r.minimum??=0,r.maximum??=100,O(r,e,t)}if(n.type===`checkbox`)return O({type:`boolean`},e,t);if(n.type===`radio`)return O({type:`string`,...N([n])},e,t);if(n.type===`date`)return O({type:`string`,format:`date`},e,t,`Dates MUST be provided in \'YYYY-MM-DD\' format.`);if(n.type===`month`)return O({type:`string`,format:`^[0-9]{4}-(0[1-9]|1[0-2])$`},e,t);if(n.type===`week`)return O({type:`string`,format:`^[0-9]{4}-W(0[1-9]|[1-4][0-9]|5[0-3])$`},e,t);if(n.type===`time`)return O({type:`string`,format:M(n,`^([01][0-9]|2[0-3]):[0-5][0-9]`)},e,t);if(n.type===`datetime-local`)return O({type:`string`,format:M(n,`^[0-9]{4}-(0[1-9]|1[0-2])-[0-9]{2}T([01][0-9]|2[0-3]):[0-5][0-9]`)},e,t);if(n.type===`color`)return O({type:`string`,format:`^#[0-9a-zA-Z]{6}$`},e,t)}}function me(e){let t={},n=[];for(let[r,i]of E(e)){if(!r)continue;let a=P(e,i);a&&(Object.defineProperty(t,r,{configurable:!0,enumerable:!0,value:a,writable:!0}),i.some(e=>e.required)&&n.push(r))}return{type:`object`,properties:t,required:n}}function he(e){return{name:w(e,`toolname`)??``,title:w(e,`tooltitle`)??``,description:w(e,`tooldescription`)??``,inputSchema:me(e),autosubmit:T(e,`toolautosubmit`)}}function F(e){if(typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&Number.isFinite(e))return String(e)}function I(e){if(typeof e==`boolean`)return e;if(typeof e==`number`&&Number.isInteger(e))return e!==0;if(typeof e==`string`){if(e===`1`||e.toLowerCase()===`true`)return!0;if(e===`0`||e.toLowerCase()===`false`)return!1}}function L(e,t){if(!Array.isArray(e))return!1;let n=new Set(t);for(let t of e){let e=F(t);if(e===void 0||!n.delete(e))return!1}return!0}function ge(e,t){if(t===``)return e.type!==`number`&&e.type!==`range`;let n=e.ownerDocument.createElement(`input`);return n.type=e.type,n.value=t,n.value!==``}function _e(e,t,n){let r=t[0];if(!r||!P(e,t))return!1;if(t.length>1){if(!t.every(e=>e instanceof HTMLInputElement))return!1;if(t.every(e=>e.type===`checkbox`))return L(n,new Set(t.map(e=>e.value)));if(t.every(e=>e.type===`radio`)){let e=F(n);return e!==void 0&&t.some(t=>t.value===e)}return!1}if(r instanceof HTMLSelectElement){let e=new Set([...r.options].map(e=>e.value));if(r.multiple)return L(n,e);let t=F(n);return t!==void 0&&e.has(t)}if(r instanceof HTMLTextAreaElement)return F(n)!==void 0;if(r.type===`checkbox`)return I(n)!==void 0;if(r.type===`radio`){let e=F(n);return e!==void 0&&r.value===e}let i=F(n);return i!==void 0&&ge(r,i)}function R(e){e.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}function ve(e,t){let n=e instanceof HTMLInputElement?HTMLInputElement.prototype:HTMLTextAreaElement.prototype;Object.getOwnPropertyDescriptor(n,`value`)?.set?.call(e,t)}function z(e,t){Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`checked`)?.set?.call(e,t)}function ye(e,t){let n=e[0];if(!n)return;if(e.length>1&&e.every(e=>e instanceof HTMLInputElement)){if(e.every(e=>e.type===`checkbox`)&&Array.isArray(t)){let n=new Set(t.map(F));for(let t of e){let e=n.has(t.value);t.checked!==e&&(z(t,e),R(t))}return}let n=F(t),r=e.find(e=>e.value===n);r&&!r.checked&&(z(r,!0),R(r));return}if(n instanceof HTMLSelectElement){if(n.multiple&&Array.isArray(t)){let e=new Set(t.map(F)),r=!1;for(let t of n.options){let n=e.has(t.value);t.selected!==n&&(t.selected=n,r=!0)}r&&R(n);return}let e=F(t);e!==void 0&&n.value!==e&&(n.value=e,R(n));return}if(n instanceof HTMLInputElement&&n.type===`checkbox`){let e=I(t);e!==void 0&&n.checked!==e&&(z(n,e),R(n));return}if(n instanceof HTMLInputElement&&n.type===`radio`){F(t)===n.value&&!n.checked&&(z(n,!0),R(n));return}let r=F(t);r!==void 0&&n.value!==r&&(ve(n,r),R(n))}function be(e,t){if(Array.isArray(t))throw TypeError(`Declarative tool input must be an object`);let n=E(e);for(let[r,i]of Object.entries(t)){let t=n.get(r);if(!t||!_e(e,t,i))throw TypeError(`Invalid value for declarative form parameter "${r}"`)}for(let[e,r]of Object.entries(t))ye(n.get(e)??[],r)}function xe(e){return[...C(e)].find(e=>!e.matches(`:disabled`)&&(e instanceof HTMLButtonElement&&e.type===`submit`||e instanceof HTMLInputElement&&[`image`,`submit`].includes(e.type)))}function Se(e){let t=[...C(e)].filter(e=>S(e)&&e.willValidate&&!e.validity.valid).map(e=>`${e.name.trim()||`{unknown}`}: ${e.validationMessage}`).join(`. `);return new DOMException(`Form validation failed: ${t}`,`UnknownError`)}function B(e){let t=new Event(`toolactivated`);return Object.defineProperty(t,`toolName`,{enumerable:!0,value:e}),t}function Ce(e,t,n,r){let{form:i}=e;return e.cancelPending?.(new DOMException(`Tool execution cancelled`,`UnknownError`)),new Promise((a,o)=>{let s=!1,c=()=>{Reflect.apply(EventTarget.prototype.removeEventListener,i,[`invalid`,f,!0]),y.delete(i),e.cancelPending===u&&delete e.cancelPending},l=e=>{s||(s=!0,c(),e())},u=e=>l(()=>o(e)),d=e=>{e.then(e=>l(()=>a(e)),e=>l(()=>o(e)))},f=e=>{e.isTrusted&&queueMicrotask(()=>{se(i)||u(Se(i))})};if(y.set(i,{complete(e){queueMicrotask(()=>{let t=v.get(e);t?d(t):e.defaultPrevented?u(new DOMException(`preventDefault() requires respondWith()`,`UnknownError`)):l(()=>a(void 0))})},direct(){l(()=>a(void 0))},respond(e){queueMicrotask(()=>{let t=v.get(e);t&&d(t)})}}),e.cancelPending=u,Reflect.apply(EventTarget.prototype.addEventListener,i,[`invalid`,f,!0]),!n){r?.focus(),window.dispatchEvent(B(t));return}try{ce(i,r),window.dispatchEvent(B(t))}catch(e){u(e)}})}function we(e,t){let n=!0,r=new Map,i=new Map,a=new Map,o=e=>{if(!(e instanceof SubmitEvent)||!e.isTrusted||!(e.target instanceof HTMLFormElement))return;let t=y.get(e.target);t&&(_.add(e),t.complete(e))},s=e=>{if(!e.isTrusted||!(e.target instanceof HTMLFormElement))return;let t=e.target;queueMicrotask(()=>{e.defaultPrevented||r.get(t)?.cancelPending?.(new DOMException(`Tool execution cancelled by form reset`,`UnknownError`))})};function c(e){a.get(e)?.disconnect(),a.delete(e),e.removeEventListener(`reset`,s,!0),e.removeEventListener(`submit`,o,!0)}function l(e){if(a.has(e))return;let t=new MutationObserver(u);a.set(e,t),t.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),e.addEventListener(`reset`,s,!0),e.addEventListener(`submit`,o,!0)}function u(){l(e);for(let e of a.keys())e instanceof ShadowRoot&&!Reflect.get(Node.prototype,`isConnected`,e.host)&&c(e);let n=new Set,o=new Map,s=new Map;for(let e of a.keys())for(let t of e.querySelectorAll(`*`)){let e=oe(t);if(e&&l(e),!(t instanceof HTMLFormElement)||!T(t,`toolname`)||!T(t,`tooldescription`)||!ae(t))continue;let r=t;n.add(r);let a=he(r),c=JSON.stringify(a),u=i.get(r);if(u===c)continue;let d=u!==void 0;i.delete(r);let f=s.get(a.name);if(f&&!d){i.set(r,c);continue}if(f){let e=o.get(f);e&&(i.set(f,e.fingerprint),o.delete(f))}s.set(a.name,r),o.set(r,{definition:a,fingerprint:c})}for(let e of i.keys())n.has(e)||i.delete(e);for(let[e,t]of r)o.get(e)?.fingerprint!==t.fingerprint&&(t.cancelPending?.(new DOMException(`Tool execution cancelled because its form changed`,`UnknownError`)),t.controller.abort(),r.delete(e));for(let[e,{definition:n,fingerprint:i}]of o){if(r.has(e))continue;let a=new AbortController,o={controller:a,fingerprint:i,form:e};r.set(e,o),t.registerTool({name:n.name,title:n.title,description:n.description,inputSchema:n.inputSchema,execute(t){let r=xe(e);if(!n.autosubmit&&!r)throw new DOMException(`A declarative form without toolautosubmit requires a submit button`,`UnknownError`);return be(e,t),Ce(o,n.name,n.autosubmit,r)}},{signal:a.signal}).catch(e=>{a.abort(),e?.name!==`AbortError`&&console.error(`[webmcp] declarative form tool "${n.name}" was not registered:`,e)})}}let d=()=>{},f=e.defaultView?.Element.prototype,p=f?Object.getOwnPropertyDescriptor(f,`attachShadow`):void 0;if(f&&p?.configurable){let t=f.attachShadow,r=function(r){let i=t.call(this,r);return n&&i.mode===`open`&&Reflect.get(Node.prototype,`ownerDocument`,this)===e&&Reflect.get(Node.prototype,`isConnected`,this)&&l(i),i};Object.defineProperty(f,`attachShadow`,{...p,value:r}),d=()=>{f.attachShadow===r&&Object.defineProperty(f,`attachShadow`,p)}}let m=()=>{},h=e.defaultView?.HTMLFormElement.prototype,g=h?Object.getOwnPropertyDescriptor(h,`submit`):void 0;if(h&&g?.configurable){let e=h.submit,t=function(){e.call(this),n&&y.get(this)?.direct()};Object.defineProperty(h,`submit`,{...g,value:t}),m=()=>{h.submit===t&&Object.defineProperty(h,`submit`,g)}}return u(),()=>{n=!1,m(),d();for(let e of a.keys())c(e);i.clear();for(let e of r.values())e.cancelPending?.(new DOMException(`Tool execution cancelled`,`UnknownError`)),e.controller.abort();r.clear()}}let V=Symbol(`registeredInputSchema`),H=Symbol(`registrationSignal`),U=Symbol(`registrationAbort`),W=[],G=null,K=null;function q(){return typeof globalThis.origin==`string`?globalThis.origin:globalThis.location?.origin??``}function J(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t);try{Object.defineProperty(e,t,n)}catch(e){throw $(),e}W.push({target:e,key:t,previous:r})}var Y=class extends EventTarget{#e=new Map;#t=null;#n=null;#r=e=>{this.#n?.call(this,e)};#i;#a;constructor(e){super(),this.#a=e,this.#i=e?.defaultView?.DOMException??DOMException,Object.defineProperty(this,`__isWebMCPPolyfill`,{value:!0,enumerable:!1,writable:!1,configurable:!1})}get ontoolchange(){return this.#n}set ontoolchange(e){let t=typeof e==`function`?e:null;if(t===null){this.#n=null,super.removeEventListener(`toolchange`,this.#r);return}this.#n===null&&super.addEventListener(`toolchange`,this.#r),this.#n=t}async registerTool(e,t={}){g(this.#a);let n=t?.signal,r=Ee(e,this.#e);if(n?.throwIfAborted(),h(t?.exposedTo),n?.throwIfAborted(),t?.exposedTo?.length)throw new this.#i(`Cross-document tool exposure requires native WebMCP`,`NotSupportedError`);if(this.#e.set(r.name,r),n){let e=()=>{this.#o(r.name,r)&&this.#c()};r[H]=n,r[U]=e,n.addEventListener(`abort`,e,{once:!0})}if(await this.#c(),n?.aborted)throw n.reason}async getTools(e={}){if(g(this.#a),h(e?.fromOrigins),e?.fromOrigins?.length)throw new this.#i(`Cross-document tool discovery requires native WebMCP`,`NotSupportedError`);let t=[...this.#e.values()].map(e=>{let t=e[V],n=t===void 0?void 0:JSON.parse(t);return{name:e.name,title:e.title??``,description:e.description,...r(n)?{inputSchema:n}:{},origin:q(),window:globalThis.window,...e.annotations?{annotations:u(e.annotations)}:{}}}).sort((e,t)=>e.name<t.name?-1:+(e.name>t.name));return await new Promise(e=>setTimeout(e,0)),t}async executeTool(e,t,n={}){if(g(this.#a),typeof e!=`object`||!e)throw TypeError(`RegisteredTool must be an object`);for(let t of[`name`,`description`,`window`,`origin`])if(!(t in e))throw TypeError(`RegisteredTool.${t} is required`);if(te(e.origin),e.window!==globalThis.window||e.origin!==q())throw o(`Tool not found: ${e.name}`);return this.#s(e.name,t,n)}static getTestingShim(e){return e.#t??=new Te(e),e.#t}static getToolInfos(e){return[...e.#e.values()].map(e=>({name:e.name,description:e.description,...e[V]===void 0?{}:{inputSchema:e[V]}}))}static executeToolForTesting(e,t,n,r){return g(e.#a),e.#s(t,n,r)}static dispose(e){for(let t of e.#e.keys())e.#o(t);e.ontoolchange=null,e.#t?.dispose()}#o(e,t){let n=this.#e.get(e);if(!n||t&&n!==t)return!1;let r=n[H],i=n[U];return r&&i&&r.removeEventListener(`abort`,i),this.#e.delete(e)}async#s(e,t,n){n?.signal?.throwIfAborted();let r=this.#e.get(e);if(!r)throw o(`Tool not found: ${e}`);let i=d(t);if(n?.signal?.throwIfAborted(),r[H]?.aborted)throw o(`Tool unregistered`);let a;try{let e=r[H];a=await p(p(Promise.resolve(r.execute(i)),e,()=>o(`Tool unregistered`)),n?.signal)}catch(e){throw n?.signal?.aborted&&e===n.signal.reason||r[H]?.aborted?e:s(e)}return f(a)}async#c(){await new Promise(e=>setTimeout(e,0)),this.dispatchEvent(new Event(`toolchange`)),this.#t?.dispatchToolChange()}};let X=function(){throw TypeError(`Illegal constructor`)};Object.defineProperty(X,`name`,{value:`ModelContext`}),Object.defineProperty(X,`prototype`,{value:Y.prototype,writable:!1}),Object.setPrototypeOf(X,EventTarget),Object.defineProperty(Y.prototype,`constructor`,{configurable:!0,writable:!0,value:X}),Object.defineProperty(Y.prototype,Symbol.toStringTag,{configurable:!0,value:`ModelContext`});for(let e of[`registerTool`,`getTools`,`executeTool`,`ontoolchange`]){let t=Object.getOwnPropertyDescriptor(Y.prototype,e);t&&Object.defineProperty(Y.prototype,e,{...t,enumerable:!0})}var Te=class extends EventTarget{_ontoolchange=null;ontoolchangeListener=e=>{this._ontoolchange?.call(this,e)};#e;constructor(e){super(),this.#e=e}listTools(){return Y.getToolInfos(this.#e)}executeTool(e,t,n){return Y.executeToolForTesting(this.#e,e,t,n)}get ontoolchange(){return this._ontoolchange}set ontoolchange(e){let t=typeof e==`function`?e:null;if(t===null){this._ontoolchange=null,super.removeEventListener(`toolchange`,this.ontoolchangeListener);return}this._ontoolchange===null&&super.addEventListener(`toolchange`,this.ontoolchangeListener),this._ontoolchange=t}dispatchToolChange(){this.dispatchEvent(new Event(`toolchange`))}dispose(){this.ontoolchange=null}};function Ee(e,t){if(!e||typeof e!=`object`)throw TypeError(`registerTool(tool) requires a tool object`);let n=a(e);if(l(n),t.has(n.name))throw c(`Tool already registered: ${n.name}`);let r=n.inputSchema===void 0?void 0:ne(n.inputSchema);return{name:n.name,...n.title===void 0?{}:{title:n.title},description:n.description,...n.inputSchema===void 0?{}:{inputSchema:n.inputSchema},...n.annotations===void 0?{}:{annotations:n.annotations},execute:e=>Reflect.apply(n.execute,void 0,[e]),...r===void 0?{}:{[V]:r}}}let Z=!1,De=new WeakMap,{modelContext:Oe}={modelContext(){if(!(this instanceof Document))throw TypeError(`Illegal invocation`);return De.get(this)}};Object.defineProperty(Oe,`name`,{value:`get modelContext`});function ke(e,t){De.set(e,t),!Object.hasOwn(Document.prototype,`modelContext`)&&J(Document.prototype,`modelContext`,{configurable:!0,enumerable:!0,get:Oe})}function Ae(e,t){J(e,`modelContext`,{configurable:!0,enumerable:!0,get(){return Z||(Z=!0,console.warn(`[WebMCPPolyfill] navigator.modelContext is deprecated. The May 27, 2026 WebMCP draft moved the modelContext getter from Navigator to Document — use document.modelContext instead. See https://github.com/webmachinelearning/webmcp/pull/184.`)),t}})}function je(){let e=SubmitEvent.prototype;`agentInvoked`in e||J(e,`agentInvoked`,{configurable:!0,enumerable:!0,get(){return b(this)}}),`respondWith`in e||J(e,`respondWith`,{configurable:!0,enumerable:!0,writable:!0,value(e){re(this,e)}})}function Q(e){if(globalThis.isSecureContext===!1)return;let t=typeof navigator>`u`?null:navigator,n=typeof document>`u`?null:document;if(!t||!n||typeof window>`u`||n.modelContext)return;let r=t.modelContext;if(W.length>0&&$(),r){ke(n,r);return}let i=Object.getOwnPropertyDescriptor(window,`ModelContext`);if(i&&!i.configurable){if(!Object.is(Reflect.get(window,`ModelContext`),X))throw TypeError(`Cannot install ModelContext over a non-configurable global`)}else J(window,`ModelContext`,{configurable:!0,enumerable:!1,writable:!0,value:X});let a=new Y(n);G=a,ke(n,a),Z=!1,Ae(t,a),je(),e?.installTestingShim&&!t.modelContextTesting&&J(t,`modelContextTesting`,{configurable:!0,enumerable:!0,writable:!1,value:Y.getTestingShim(a)}),K=we(n,a)}function $(){K?.(),K=null,G&&Y.dispose(G),G=null;for(let{target:e,key:t,previous:n}of[...W].reverse())n?Object.defineProperty(e,t,n):Reflect.deleteProperty(e,t);W.length=0,Z=!1}try{Q(window.__webMCPPolyfillOptions)}catch(e){console.error(`[WebMCPPolyfill] Auto-initialization failed:`,e)}return e.cleanupWebMCPPolyfill=$,e.initializeWebMCPPolyfill=Q,e})({});';
|
|
10
|
+
/* __TARSK_WEBMCP_POLYFILL_SOURCE_END__ */
|
|
11
|
+
|
|
12
|
+
/* __TARSK_WEBMCP_POLYFILL_INSTALLER_START__ */
|
|
13
|
+
function alreadyHasModelContext(targetDocument) {
|
|
14
|
+
try {
|
|
15
|
+
return Boolean(targetDocument && targetDocument.modelContext);
|
|
16
|
+
} catch {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function runPolyfillSource(targetWindow) {
|
|
22
|
+
var source = WEBMCP_POLYFILL_SOURCE;
|
|
23
|
+
if (typeof source !== "string" || source.length === 0) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
if (typeof targetWindow.eval === "function") {
|
|
28
|
+
targetWindow.eval(source);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
} catch {
|
|
32
|
+
// Page CSP or a replaced eval: fall through to the realm Function constructor.
|
|
33
|
+
}
|
|
34
|
+
var FunctionCtor = targetWindow.Function;
|
|
35
|
+
if (typeof FunctionCtor === "function") {
|
|
36
|
+
FunctionCtor(source)();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function installWebMcpPolyfill(targetWindow) {
|
|
41
|
+
if (!targetWindow) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
var targetDocument;
|
|
45
|
+
try {
|
|
46
|
+
targetDocument = targetWindow.document;
|
|
47
|
+
} catch {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
if (alreadyHasModelContext(targetDocument)) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
runPolyfillSource(targetWindow);
|
|
55
|
+
} catch {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
return alreadyHasModelContext(targetDocument);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function tryInstallIntoFrame(frameWindow) {
|
|
62
|
+
if (!frameWindow) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
var frameDocument;
|
|
66
|
+
try {
|
|
67
|
+
frameDocument = frameWindow.document;
|
|
68
|
+
} catch {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (!frameDocument) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
installWebMcpPolyfill(frameWindow);
|
|
75
|
+
attachSameOriginFrameInstaller(frameWindow, frameDocument);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function scanSameOriginFrames(targetWindow, targetDocument) {
|
|
79
|
+
var frames = targetWindow.frames;
|
|
80
|
+
if (frames && typeof frames.length === "number") {
|
|
81
|
+
for (var index = 0; index < frames.length; index++) {
|
|
82
|
+
tryInstallIntoFrame(frames[index]);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (!targetDocument || typeof targetDocument.querySelectorAll !== "function") {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
var embedded;
|
|
89
|
+
try {
|
|
90
|
+
embedded = targetDocument.querySelectorAll("iframe, frame");
|
|
91
|
+
} catch {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
for (var nodeIndex = 0; nodeIndex < embedded.length; nodeIndex++) {
|
|
95
|
+
var node = embedded[nodeIndex];
|
|
96
|
+
if (node && node.contentWindow) {
|
|
97
|
+
tryInstallIntoFrame(node.contentWindow);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function attachSameOriginFrameInstaller(targetWindow, targetDocument) {
|
|
103
|
+
if (!targetWindow || !targetDocument) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
scanSameOriginFrames(targetWindow, targetDocument);
|
|
107
|
+
if (targetWindow.__tarskWebMcpFrameObserved) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
try {
|
|
111
|
+
Object.defineProperty(targetWindow, "__tarskWebMcpFrameObserved", {
|
|
112
|
+
value: true,
|
|
113
|
+
enumerable: false,
|
|
114
|
+
configurable: true,
|
|
115
|
+
});
|
|
116
|
+
} catch {
|
|
117
|
+
targetWindow.__tarskWebMcpFrameObserved = true;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function onEmbeddedLoad(event) {
|
|
121
|
+
var target = event && event.target;
|
|
122
|
+
if (!target) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
var tag = typeof target.tagName === "string" ? target.tagName.toUpperCase() : "";
|
|
126
|
+
if (tag !== "IFRAME" && tag !== "FRAME") {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (target.contentWindow) {
|
|
130
|
+
tryInstallIntoFrame(target.contentWindow);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (typeof targetDocument.addEventListener === "function") {
|
|
135
|
+
targetDocument.addEventListener("DOMContentLoaded", function () {
|
|
136
|
+
scanSameOriginFrames(targetWindow, targetDocument);
|
|
137
|
+
});
|
|
138
|
+
targetDocument.addEventListener("load", onEmbeddedLoad, true);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
var MutationObserverCtor = targetWindow.MutationObserver;
|
|
142
|
+
if (typeof MutationObserverCtor !== "function") {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
try {
|
|
146
|
+
var observer = new MutationObserverCtor(function (mutations) {
|
|
147
|
+
for (var i = 0; i < mutations.length; i++) {
|
|
148
|
+
var added = mutations[i].addedNodes;
|
|
149
|
+
if (!added) continue;
|
|
150
|
+
for (var n = 0; n < added.length; n++) {
|
|
151
|
+
var node = added[n];
|
|
152
|
+
if (!node || node.nodeType !== 1) continue;
|
|
153
|
+
var tag = typeof node.tagName === "string" ? node.tagName.toUpperCase() : "";
|
|
154
|
+
if (tag === "IFRAME" || tag === "FRAME") {
|
|
155
|
+
if (node.contentWindow) {
|
|
156
|
+
tryInstallIntoFrame(node.contentWindow);
|
|
157
|
+
}
|
|
158
|
+
if (typeof node.addEventListener === "function") {
|
|
159
|
+
node.addEventListener("load", function () {
|
|
160
|
+
if (this.contentWindow) {
|
|
161
|
+
tryInstallIntoFrame(this.contentWindow);
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (typeof node.querySelectorAll === "function") {
|
|
167
|
+
var nested = node.querySelectorAll("iframe, frame");
|
|
168
|
+
for (var k = 0; k < nested.length; k++) {
|
|
169
|
+
if (nested[k] && nested[k].contentWindow) {
|
|
170
|
+
tryInstallIntoFrame(nested[k].contentWindow);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
observer.observe(targetDocument.documentElement || targetDocument, {
|
|
178
|
+
childList: true,
|
|
179
|
+
subtree: true,
|
|
180
|
+
});
|
|
181
|
+
} catch {
|
|
182
|
+
// Fake or incomplete documents skip mutation observation.
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
/* __TARSK_WEBMCP_POLYFILL_INSTALLER_END__ */
|
|
186
|
+
|
|
187
|
+
// Synchronous install at document start so page scripts find
|
|
188
|
+
// document.modelContext before they register tools. A native
|
|
189
|
+
// implementation (or a site-provided polyfill) is never overridden.
|
|
190
|
+
// Same-origin frames get the same IIFE so iframe tools still register.
|
|
191
|
+
installWebMcpPolyfill(window);
|
|
192
|
+
attachSameOriginFrameInstaller(window, document);
|
|
193
|
+
})();
|
|
1
194
|
/**
|
|
2
195
|
* Minimal RPC bootstrap for the Browser tab preview webview.
|
|
3
196
|
* Enables evaluateJavascriptWithResponse and structured preview APIs from the Bun process.
|
|
@@ -89,9 +282,9 @@
|
|
|
89
282
|
return true;
|
|
90
283
|
}
|
|
91
284
|
|
|
92
|
-
function
|
|
285
|
+
function sendPreviewEvent(type, payload) {
|
|
93
286
|
const message = {
|
|
94
|
-
type:
|
|
287
|
+
type: type,
|
|
95
288
|
payload: payload,
|
|
96
289
|
};
|
|
97
290
|
|
|
@@ -101,12 +294,16 @@
|
|
|
101
294
|
|
|
102
295
|
window.parent.postMessage(message, "*");
|
|
103
296
|
window.dispatchEvent(
|
|
104
|
-
new CustomEvent(
|
|
297
|
+
new CustomEvent(type, {
|
|
105
298
|
detail: payload,
|
|
106
299
|
}),
|
|
107
300
|
);
|
|
108
301
|
}
|
|
109
302
|
|
|
303
|
+
function sendSelectionToHost(payload) {
|
|
304
|
+
sendPreviewEvent("tarsk-browser-element-selected", payload);
|
|
305
|
+
}
|
|
306
|
+
|
|
110
307
|
function sendPageTitleToHost(title) {
|
|
111
308
|
const message = {
|
|
112
309
|
type: "tarsk-browser-page-title",
|
|
@@ -175,6 +372,11 @@
|
|
|
175
372
|
label: null,
|
|
176
373
|
hoveredElement: null,
|
|
177
374
|
listeners: null,
|
|
375
|
+
interaction: "select",
|
|
376
|
+
editing: false,
|
|
377
|
+
editingElement: null,
|
|
378
|
+
originalHTML: "",
|
|
379
|
+
originalText: "",
|
|
178
380
|
},
|
|
179
381
|
|
|
180
382
|
snapshot: function snapshot(options) {
|
|
@@ -355,6 +557,99 @@
|
|
|
355
557
|
return { hovered: params.ref };
|
|
356
558
|
},
|
|
357
559
|
|
|
560
|
+
inspectElement: function inspectElement(params) {
|
|
561
|
+
const selector = params?.selector;
|
|
562
|
+
const ref = params?.ref;
|
|
563
|
+
let element = null;
|
|
564
|
+
let matchCount = 0;
|
|
565
|
+
|
|
566
|
+
if (ref) {
|
|
567
|
+
element = api.resolveRef(ref);
|
|
568
|
+
matchCount = element ? 1 : 0;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
if (!element && selector) {
|
|
572
|
+
let matches;
|
|
573
|
+
try {
|
|
574
|
+
matches = document.querySelectorAll(selector);
|
|
575
|
+
} catch {
|
|
576
|
+
throw new Error("Invalid CSS selector: " + selector);
|
|
577
|
+
}
|
|
578
|
+
matchCount = matches.length;
|
|
579
|
+
element = matches[0] || null;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
if (!element) {
|
|
583
|
+
return {
|
|
584
|
+
found: false,
|
|
585
|
+
selector: selector || null,
|
|
586
|
+
ref: ref || null,
|
|
587
|
+
matchCount: 0,
|
|
588
|
+
hint:
|
|
589
|
+
"No matching element. Prefer inspect_element over wait_for for short-lived CSS classes. " +
|
|
590
|
+
"Use evaluate_javascript only for custom probes.",
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
const style = window.getComputedStyle(element);
|
|
595
|
+
const rect = element.getBoundingClientRect();
|
|
596
|
+
const rawText = (element.innerText || element.textContent || "")
|
|
597
|
+
.trim()
|
|
598
|
+
.replace(/\s+/g, " ");
|
|
599
|
+
const text = rawText.length > 200 ? rawText.slice(0, 200) + "…" : rawText;
|
|
600
|
+
const animations = [];
|
|
601
|
+
|
|
602
|
+
if (typeof element.getAnimations === "function") {
|
|
603
|
+
const running = element.getAnimations();
|
|
604
|
+
for (let i = 0; i < running.length; i += 1) {
|
|
605
|
+
const anim = running[i];
|
|
606
|
+
const effect = anim.effect;
|
|
607
|
+
let duration = null;
|
|
608
|
+
if (effect && typeof effect.getComputedTiming === "function") {
|
|
609
|
+
duration = effect.getComputedTiming().duration;
|
|
610
|
+
}
|
|
611
|
+
animations.push({
|
|
612
|
+
name: typeof anim.animationName === "string" ? anim.animationName : null,
|
|
613
|
+
playState: anim.playState,
|
|
614
|
+
currentTime: anim.currentTime,
|
|
615
|
+
duration: duration,
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
return {
|
|
621
|
+
found: true,
|
|
622
|
+
selector: selector || null,
|
|
623
|
+
ref: ref || null,
|
|
624
|
+
matchCount: matchCount,
|
|
625
|
+
tag: element.tagName ? element.tagName.toLowerCase() : null,
|
|
626
|
+
id: element.id || null,
|
|
627
|
+
classList: element.classList ? Array.from(element.classList) : [],
|
|
628
|
+
text: text,
|
|
629
|
+
box: {
|
|
630
|
+
x: Math.round(rect.x),
|
|
631
|
+
y: Math.round(rect.y),
|
|
632
|
+
width: Math.round(rect.width),
|
|
633
|
+
height: Math.round(rect.height),
|
|
634
|
+
},
|
|
635
|
+
computed: {
|
|
636
|
+
display: style.display,
|
|
637
|
+
visibility: style.visibility,
|
|
638
|
+
opacity: style.opacity,
|
|
639
|
+
transform: style.transform,
|
|
640
|
+
fontFamily: style.fontFamily,
|
|
641
|
+
fontSize: style.fontSize,
|
|
642
|
+
fontWeight: style.fontWeight,
|
|
643
|
+
color: style.color,
|
|
644
|
+
animationName: style.animationName,
|
|
645
|
+
animationDuration: style.animationDuration,
|
|
646
|
+
animationPlayState: style.animationPlayState,
|
|
647
|
+
transition: style.transition,
|
|
648
|
+
},
|
|
649
|
+
animations: animations,
|
|
650
|
+
};
|
|
651
|
+
},
|
|
652
|
+
|
|
358
653
|
waitFor: function waitFor(params) {
|
|
359
654
|
const timeoutMs = params?.timeout_ms ?? 10000;
|
|
360
655
|
const selector = params?.selector;
|
|
@@ -413,15 +708,134 @@
|
|
|
413
708
|
setSelectMode: function setSelectMode(enabled) {
|
|
414
709
|
const state = api._selectionMode;
|
|
415
710
|
const preserveSelection = arguments.length > 1 ? Boolean(arguments[1]) : false;
|
|
711
|
+
const requestedInteraction = arguments.length > 2 ? arguments[2] : "select";
|
|
712
|
+
const interaction = requestedInteraction === "edit" ? "edit" : "select";
|
|
416
713
|
|
|
417
714
|
function isSelectionChrome(element) {
|
|
418
715
|
return Boolean(
|
|
419
716
|
element &&
|
|
420
717
|
(element.closest("[data-tarsk-selection-overlay]") ||
|
|
421
|
-
element.getAttribute("data-tarsk-selection-overlay")
|
|
718
|
+
element.getAttribute("data-tarsk-selection-overlay") ||
|
|
719
|
+
element.closest("[data-tarsk-text-edit]")),
|
|
720
|
+
);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
function isFormTextControl(element) {
|
|
724
|
+
if (element instanceof HTMLTextAreaElement) return true;
|
|
725
|
+
if (!(element instanceof HTMLInputElement)) return false;
|
|
726
|
+
const type = (element.type || "text").toLowerCase();
|
|
727
|
+
return (
|
|
728
|
+
type === "text" ||
|
|
729
|
+
type === "search" ||
|
|
730
|
+
type === "url" ||
|
|
731
|
+
type === "tel" ||
|
|
732
|
+
type === "email" ||
|
|
733
|
+
type === "password" ||
|
|
734
|
+
type === "number" ||
|
|
735
|
+
type === ""
|
|
422
736
|
);
|
|
423
737
|
}
|
|
424
738
|
|
|
739
|
+
function getEditableText(element) {
|
|
740
|
+
if (isFormTextControl(element)) {
|
|
741
|
+
return element.value || "";
|
|
742
|
+
}
|
|
743
|
+
return element.innerText || element.textContent || "";
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
function canBeginTextEdit(element) {
|
|
747
|
+
if (!element || !element.tagName) return false;
|
|
748
|
+
const tag = element.tagName.toUpperCase();
|
|
749
|
+
if (
|
|
750
|
+
tag === "HTML" ||
|
|
751
|
+
tag === "HEAD" ||
|
|
752
|
+
tag === "SCRIPT" ||
|
|
753
|
+
tag === "STYLE" ||
|
|
754
|
+
tag === "NOSCRIPT" ||
|
|
755
|
+
tag === "TEMPLATE"
|
|
756
|
+
) {
|
|
757
|
+
return false;
|
|
758
|
+
}
|
|
759
|
+
if (isFormTextControl(element)) return true;
|
|
760
|
+
return getEditableText(element).trim().length > 0;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
function stopTextEdit(restore) {
|
|
764
|
+
const element = state.editingElement;
|
|
765
|
+
if (!state.editing || !element) {
|
|
766
|
+
state.editing = false;
|
|
767
|
+
state.editingElement = null;
|
|
768
|
+
return null;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
const currentText = getEditableText(element);
|
|
772
|
+
const originalText = state.originalText;
|
|
773
|
+
if (restore) {
|
|
774
|
+
if (isFormTextControl(element)) {
|
|
775
|
+
element.value = originalText;
|
|
776
|
+
} else {
|
|
777
|
+
element.innerHTML = state.originalHTML;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
if (element.getAttribute("data-tarsk-text-edit")) {
|
|
781
|
+
element.removeAttribute("contenteditable");
|
|
782
|
+
element.removeAttribute("data-tarsk-text-edit");
|
|
783
|
+
}
|
|
784
|
+
element.style.outline = "";
|
|
785
|
+
const selection = toSelectionPayload(element);
|
|
786
|
+
selection.interaction = "edit";
|
|
787
|
+
selection.text = restore ? originalText : currentText;
|
|
788
|
+
state.editing = false;
|
|
789
|
+
state.editingElement = null;
|
|
790
|
+
state.originalHTML = "";
|
|
791
|
+
state.originalText = "";
|
|
792
|
+
return { originalText: originalText, currentText: currentText, selection: selection };
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
function startTextEdit(element) {
|
|
796
|
+
cleanupListeners();
|
|
797
|
+
removeOverlay();
|
|
798
|
+
state.enabled = false;
|
|
799
|
+
state.hoveredElement = null;
|
|
800
|
+
document.documentElement.style.cursor = "";
|
|
801
|
+
document.body.style.cursor = "";
|
|
802
|
+
|
|
803
|
+
state.editing = true;
|
|
804
|
+
state.editingElement = element;
|
|
805
|
+
state.originalHTML = element.innerHTML;
|
|
806
|
+
state.originalText = getEditableText(element);
|
|
807
|
+
|
|
808
|
+
if (!isFormTextControl(element) && !element.isContentEditable) {
|
|
809
|
+
element.setAttribute("data-tarsk-text-edit", "true");
|
|
810
|
+
element.setAttribute("contenteditable", "true");
|
|
811
|
+
}
|
|
812
|
+
element.style.outline = "2px solid hsl(81 91% 40%)";
|
|
813
|
+
try {
|
|
814
|
+
element.focus();
|
|
815
|
+
} catch {
|
|
816
|
+
// Some elements cannot take focus.
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
const payload = toSelectionPayload(element);
|
|
820
|
+
payload.interaction = "edit";
|
|
821
|
+
payload.text = state.originalText;
|
|
822
|
+
sendSelectionToHost(payload);
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
api.commitTextEdit = function commitTextEdit() {
|
|
826
|
+
if (!state.editing) return null;
|
|
827
|
+
const result = stopTextEdit(false);
|
|
828
|
+
if (!result) return null;
|
|
829
|
+
sendPreviewEvent("tarsk-browser-text-edit-commit", result);
|
|
830
|
+
return result;
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
api.cancelTextEdit = function cancelTextEdit() {
|
|
834
|
+
if (!state.editing) return { cancelled: false };
|
|
835
|
+
stopTextEdit(true);
|
|
836
|
+
return { cancelled: true };
|
|
837
|
+
};
|
|
838
|
+
|
|
425
839
|
function removeOverlay() {
|
|
426
840
|
if (state.overlay && state.overlay.parentNode) {
|
|
427
841
|
state.overlay.parentNode.removeChild(state.overlay);
|
|
@@ -545,10 +959,29 @@
|
|
|
545
959
|
return parts.join(" > ");
|
|
546
960
|
}
|
|
547
961
|
|
|
962
|
+
// Guard against capturing multi-megabyte embedded base64 payloads (e.g. an
|
|
963
|
+
// <audio src="data:audio/mpeg;base64,..."> blob on a page). A browser-selection
|
|
964
|
+
// that large blows up the conversation prompt and gets rejected (HTTP 413) or
|
|
965
|
+
// freezes rendering. Strip data-URI media and cap total size.
|
|
966
|
+
var MAX_SELECTION_HTML_LENGTH = 50000;
|
|
967
|
+
var DATA_URI_ATTR_PATTERN = /\s(?:src|href|poster)="data:[^"]*;base64,[A-Za-z0-9+/=]+"/gi;
|
|
968
|
+
var DATA_URI_ATTR_PLACEHOLDER = ' data-tarsk-stripped="true"';
|
|
969
|
+
function sanitizeSelectionHtml(html) {
|
|
970
|
+
var cleaned = String(html).replace(DATA_URI_ATTR_PATTERN, DATA_URI_ATTR_PLACEHOLDER);
|
|
971
|
+
if (cleaned.length > MAX_SELECTION_HTML_LENGTH) {
|
|
972
|
+
cleaned = cleaned.slice(0, MAX_SELECTION_HTML_LENGTH);
|
|
973
|
+
}
|
|
974
|
+
return cleaned;
|
|
975
|
+
}
|
|
976
|
+
|
|
548
977
|
function toSelectionPayload(element) {
|
|
978
|
+
var rawHtml = element.outerHTML;
|
|
549
979
|
return {
|
|
550
|
-
html:
|
|
551
|
-
text: element.innerText || element.textContent || ""
|
|
980
|
+
html: sanitizeSelectionHtml(rawHtml),
|
|
981
|
+
text: (element.innerText || element.textContent || "").slice(
|
|
982
|
+
0,
|
|
983
|
+
MAX_SELECTION_HTML_LENGTH,
|
|
984
|
+
),
|
|
552
985
|
tagName: element.tagName.toLowerCase(),
|
|
553
986
|
selector: buildSelector(element),
|
|
554
987
|
url: location.href,
|
|
@@ -610,6 +1043,7 @@
|
|
|
610
1043
|
|
|
611
1044
|
if (!enabled) {
|
|
612
1045
|
state.enabled = false;
|
|
1046
|
+
state.interaction = "select";
|
|
613
1047
|
if (!preserveSelection) {
|
|
614
1048
|
state.hoveredElement = null;
|
|
615
1049
|
}
|
|
@@ -622,11 +1056,22 @@
|
|
|
622
1056
|
return { enabled: false };
|
|
623
1057
|
}
|
|
624
1058
|
|
|
625
|
-
if (state.enabled) {
|
|
1059
|
+
if (state.enabled && state.interaction === interaction) {
|
|
626
1060
|
return { enabled: true };
|
|
627
1061
|
}
|
|
628
1062
|
|
|
1063
|
+
if (state.enabled) {
|
|
1064
|
+
state.enabled = false;
|
|
1065
|
+
cleanupListeners();
|
|
1066
|
+
removeOverlay();
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
if (state.editing) {
|
|
1070
|
+
stopTextEdit(true);
|
|
1071
|
+
}
|
|
1072
|
+
|
|
629
1073
|
state.enabled = true;
|
|
1074
|
+
state.interaction = interaction;
|
|
630
1075
|
document.documentElement.style.cursor = "crosshair";
|
|
631
1076
|
document.body.style.cursor = "crosshair";
|
|
632
1077
|
|
|
@@ -645,6 +1090,11 @@
|
|
|
645
1090
|
event.stopImmediatePropagation();
|
|
646
1091
|
state.hoveredElement = element;
|
|
647
1092
|
positionOverlay(element);
|
|
1093
|
+
if (state.interaction === "edit") {
|
|
1094
|
+
if (!canBeginTextEdit(element)) return;
|
|
1095
|
+
startTextEdit(element);
|
|
1096
|
+
return;
|
|
1097
|
+
}
|
|
648
1098
|
const payload = toSelectionPayload(element);
|
|
649
1099
|
sendSelectionToHost(payload);
|
|
650
1100
|
api.setSelectMode(false, true);
|
|
@@ -669,6 +1119,14 @@
|
|
|
669
1119
|
return { enabled: true };
|
|
670
1120
|
},
|
|
671
1121
|
|
|
1122
|
+
commitTextEdit: function commitTextEdit() {
|
|
1123
|
+
return null;
|
|
1124
|
+
},
|
|
1125
|
+
|
|
1126
|
+
cancelTextEdit: function cancelTextEdit() {
|
|
1127
|
+
return { cancelled: false };
|
|
1128
|
+
},
|
|
1129
|
+
|
|
672
1130
|
takeScreenshot: function takeScreenshot(params) {
|
|
673
1131
|
const format = params?.format === "jpeg" ? "jpeg" : "png";
|
|
674
1132
|
const width = window.innerWidth;
|
package/dist/public/index.html
CHANGED
|
@@ -22,26 +22,24 @@
|
|
|
22
22
|
<meta name="apple-mobile-web-app-title" content="Tarsk" />
|
|
23
23
|
|
|
24
24
|
<title>Tarsk</title>
|
|
25
|
-
<script type="module" crossorigin src="/assets/index-
|
|
25
|
+
<script type="module" crossorigin src="/assets/index-B0xy4BkI.js"></script>
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/monaco-D1hpqXQ0.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/interactive-
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/onboarding-
|
|
30
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
31
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
32
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
33
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
34
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
36
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
37
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
38
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
39
|
-
<link rel="modulepreload" crossorigin href="/assets/local-tool-blocks-DlqmJ7__.js">
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/interactive-BrHVRHmQ.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/onboarding-DVc9-yKJ.js">
|
|
30
|
+
<link rel="modulepreload" crossorigin href="/assets/react-vendor-B7jFrulV.js">
|
|
31
|
+
<link rel="modulepreload" crossorigin href="/assets/alert-dialog-B6An1LDY.js">
|
|
32
|
+
<link rel="modulepreload" crossorigin href="/assets/use-toast-hxHsVv6a.js">
|
|
33
|
+
<link rel="modulepreload" crossorigin href="/assets/store-B_cK-gsT.js">
|
|
34
|
+
<link rel="modulepreload" crossorigin href="/assets/chat-dock-context-DyKjqpND.js">
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/explorer-tab-context-BdjTEbFh.js">
|
|
36
|
+
<link rel="modulepreload" crossorigin href="/assets/main-tab-context-zQSuRQQG.js">
|
|
37
|
+
<link rel="modulepreload" crossorigin href="/assets/use-suspense-resource-CExc4Svq.js">
|
|
38
|
+
<link rel="modulepreload" crossorigin href="/assets/thread-tool-blocks-D9HUkPHB.js">
|
|
40
39
|
<link rel="modulepreload" crossorigin href="/assets/ndjson-stream-DeGpE5o5.js">
|
|
41
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
42
|
-
<link rel="modulepreload" crossorigin href="/assets/utils-Rlf65JHq.js">
|
|
40
|
+
<link rel="modulepreload" crossorigin href="/assets/utils-SsF94Pkg.js">
|
|
43
41
|
<link rel="stylesheet" crossorigin href="/assets/monaco-BQve5vfS.css">
|
|
44
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
42
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Cndc50ux.css">
|
|
45
43
|
</head>
|
|
46
44
|
<body class="font-sans antialiased">
|
|
47
45
|
<div id="root"></div>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
[
|
|
2
|
+
"GLM5.3 Flash",
|
|
2
3
|
"DeepSeek V4 Flash",
|
|
3
|
-
"
|
|
4
|
+
"Qwen3.8 27B",
|
|
5
|
+
"Qwen3.8 Flash Next",
|
|
4
6
|
"GPT 5.5",
|
|
7
|
+
"GPT 5.6 Luna",
|
|
5
8
|
"DeepSeek V4 Pro",
|
|
6
9
|
"Kimi K2.7 Code",
|
|
7
|
-
"MiMo V2.5 Pro",
|
|
8
|
-
"GLM 5.2",
|
|
9
|
-
"Gemini 3.7 Flash",
|
|
10
10
|
"Claude Opus 5",
|
|
11
11
|
"GPT 5.6 Sol",
|
|
12
12
|
"Grok 4.6",
|
|
13
|
-
"
|
|
13
|
+
"Grok 4.6 (Vertex AI (OpenAI-compatible))"
|
|
14
14
|
]
|