shadow-claw 1.43.0 → 1.44.0

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.
Files changed (104) hide show
  1. package/.well-known/mcp/server-card.json +1 -1
  2. package/.well-known/mcp.json +1 -1
  3. package/dist/cli/chunk--nlZNQrZ2.js +1 -0
  4. package/dist/cli/{chunk-CbhVal4Q.js → chunk-2IASlfOI.js} +1 -1
  5. package/dist/cli/chunk-2zUw4dTY.js +1 -0
  6. package/dist/cli/{chunk-C_vLt0YP2.js → chunk-B2WxN9-12.js} +11 -11
  7. package/dist/cli/{chunk-Cweo3Jpw.js → chunk-B5hVBRV-.js} +1 -1
  8. package/dist/cli/chunk-B7vuMvBg.js +1 -0
  9. package/dist/cli/{chunk-C9b5a_Uy.js → chunk-B9Fx2rWZ.js} +1 -1
  10. package/dist/cli/chunk-BChoeGdY2.js +1 -0
  11. package/dist/cli/{chunk-CcWCWTJe.js → chunk-BJmbRsHN.js} +1 -1
  12. package/dist/cli/{chunk-BN0tqRNn.js → chunk-BQyGyg86.js} +1 -1
  13. package/dist/cli/chunk-B_FQjokZ.js +1 -0
  14. package/dist/cli/chunk-BaAL1yLC.js +1 -0
  15. package/dist/cli/{chunk-L61wFp4H2.js → chunk-BaSEVtTB2.js} +1 -1
  16. package/dist/cli/chunk-BckYclkX2.js +1 -0
  17. package/dist/cli/chunk-Bh0Uxjld.js +1 -0
  18. package/dist/cli/{chunk-D57WTK9e2.js → chunk-By9miObI2.js} +2 -2
  19. package/dist/cli/chunk-C0cwwqX52.js +1 -0
  20. package/dist/cli/{chunk-DJ1pR9f82.js → chunk-C0vTb5Ur2.js} +1 -1
  21. package/dist/cli/{chunk-BBCAo_6N2.js → chunk-C3iVPEyi2.js} +1 -1
  22. package/dist/cli/{chunk-D3NWfUvq2.js → chunk-CJpZQ6NS2.js} +1 -1
  23. package/dist/cli/{chunk-Dhh0lHO6.js → chunk-CKksk-lA.js} +1 -1
  24. package/dist/cli/chunk-CKm7-SCu.js +1 -0
  25. package/dist/cli/{chunk-BPcMKhha2.js → chunk-CLKlXl_32.js} +1 -1
  26. package/dist/cli/{chunk-rvRQOKXp.js → chunk-CQeDQc3C.js} +1 -1
  27. package/dist/cli/{chunk-DYGlH-un.js → chunk-CSMegkz6.js} +1 -1
  28. package/dist/cli/{chunk-B1TEXFG-2.js → chunk-CTnzEqW82.js} +1 -1
  29. package/dist/cli/chunk-CiHV_7H62.js +1 -0
  30. package/dist/cli/{chunk-D9F645K62.js → chunk-CimeIb1j2.js} +1 -1
  31. package/dist/cli/{chunk-D-lQkf5X.js → chunk-CjhfhiNM.js} +1 -1
  32. package/dist/cli/{chunk-BTe1dZD0.js → chunk-ClBaEe8W.js} +1 -1
  33. package/dist/cli/{chunk-BmDywCXL.js → chunk-Cvv2Fuue.js} +1 -1
  34. package/dist/cli/{chunk-DcYfXgpg2.js → chunk-Cx8_qww-2.js} +1 -1
  35. package/dist/cli/{chunk-CvKmsXS02.js → chunk-D0UlHLhC2.js} +1 -1
  36. package/dist/cli/chunk-D0jQVYRk.js +5 -0
  37. package/dist/cli/chunk-D0sHV-Z82.js +1 -0
  38. package/dist/cli/{chunk-DeMPVxlQ.js → chunk-D2FGpjOO.js} +1 -1
  39. package/dist/cli/chunk-D3cH54jW.js +1 -0
  40. package/dist/cli/{chunk-Di4LxQG-2.js → chunk-D9dG7jP92.js} +1 -1
  41. package/dist/cli/{chunk-qTCLBos1.js → chunk-DKw-oTLT.js} +1 -1
  42. package/dist/cli/{chunk-BHnjkiBp2.js → chunk-DOkl85Te2.js} +1 -1
  43. package/dist/cli/{chunk-XS0fMLl1.js → chunk-DPySd-KC.js} +1 -1
  44. package/dist/cli/{chunk-BkTdHRZ6.js → chunk-DSleWP3c.js} +1 -1
  45. package/dist/cli/chunk-DjKQO7aV.js +1 -0
  46. package/dist/cli/{chunk-CA8_jPwF2.js → chunk-Dk750_9R2.js} +11 -11
  47. package/dist/cli/{chunk-nsFY_QXf.js → chunk-Do2xLVwC.js} +1 -1
  48. package/dist/cli/{chunk-DcMyZrds.js → chunk-DoVkBeQv.js} +1 -1
  49. package/dist/cli/chunk-DrB5Gd6y2.js +1 -0
  50. package/dist/cli/chunk-DwKjgkq92.js +1 -0
  51. package/dist/cli/{chunk-DJU6hg1K2.js → chunk-DxZ6DcRo2.js} +63 -63
  52. package/dist/cli/chunk-IGlHHKOH.js +1 -0
  53. package/dist/cli/{chunk-CpoiOFRV.js → chunk-NclDuGcY.js} +1 -1
  54. package/dist/cli/{chunk-CeFei3f_2.js → chunk-TO5qzf3J2.js} +303 -303
  55. package/dist/cli/{chunk-swUMQyE2.js → chunk-TYwbIsK9.js} +9 -9
  56. package/dist/cli/{chunk-CWs_KY8q.js → chunk-Xz02ooJU.js} +1 -1
  57. package/dist/cli/{chunk-DfKXmvNq.js → chunk-e4ARaRhY.js} +1 -1
  58. package/dist/cli/{chunk-DuTr5h_-.js → chunk-g3j2rSPJ.js} +9 -9
  59. package/dist/cli/{chunk-JMI-k9_C.js → chunk-j0KG-6x9.js} +1 -1
  60. package/dist/cli/chunk-ud_DUk_f2.js +1 -0
  61. package/dist/cli/{chunk-BzqpsHxW2.js → chunk-zUKEZHmz2.js} +1 -1
  62. package/dist/cli/cli.js +2 -2
  63. package/dist/headless-agent.js +10 -10
  64. package/dist/public/.well-known/mcp/server-card.json +1 -1
  65. package/dist/public/.well-known/mcp.json +1 -1
  66. package/dist/public/docs/example/article/index.html +1 -1
  67. package/dist/public/docs/publishing/index.html +1 -1
  68. package/dist/public/docs/skill-creator/index.html +1 -1
  69. package/dist/public/docs/subsystems/cli.md +4 -0
  70. package/dist/public/index.html +1 -1
  71. package/dist/public/main/index.html +1 -1
  72. package/dist/public/main/memory/index.html +1 -1
  73. package/dist/public/service-worker.js +1 -1
  74. package/dist/server.js +761 -761
  75. package/package.json +1 -1
  76. package/src/cli/cli.ts +5 -1
  77. package/src/cli/commands/agent.test.ts +97 -4
  78. package/src/cli/commands/agent.ts +28 -2
  79. package/src/db/sqlite/openSqliteDatabase.test.ts +24 -0
  80. package/src/db/sqlite/openSqliteDatabase.ts +8 -1
  81. package/dist/cli/chunk-0WvYaMdi.js +0 -1
  82. package/dist/cli/chunk-BXNdnbwK.js +0 -1
  83. package/dist/cli/chunk-BlNmgi3c2.js +0 -1
  84. package/dist/cli/chunk-C7irE8d42.js +0 -1
  85. package/dist/cli/chunk-Cbbk_aex2.js +0 -1
  86. package/dist/cli/chunk-CdNTakxH2.js +0 -1
  87. package/dist/cli/chunk-Cqd6ZDkT.js +0 -1
  88. package/dist/cli/chunk-CvoMdhST2.js +0 -1
  89. package/dist/cli/chunk-DCRmnjTH.js +0 -1
  90. package/dist/cli/chunk-DFLqhyP_.js +0 -5
  91. package/dist/cli/chunk-DLUNHJGc.js +0 -1
  92. package/dist/cli/chunk-DfwnnpVo.js +0 -1
  93. package/dist/cli/chunk-DhJvrfsM.js +0 -1
  94. package/dist/cli/chunk-DhQQhCTL2.js +0 -1
  95. package/dist/cli/chunk-Drx4e34U.js +0 -1
  96. package/dist/cli/chunk-DwEMut0N.js +0 -1
  97. package/dist/cli/chunk-STsbFGCh2.js +0 -1
  98. /package/dist/cli/{chunk-Bb_85Mew.js → chunk-Bb_85Mew2.js} +0 -0
  99. /package/dist/cli/{chunk-CrWRlKmP.js → chunk-CrWRlKmP2.js} +0 -0
  100. /package/dist/cli/{chunk-D2vZJXHH2.js → chunk-D2vZJXHH.js} +0 -0
  101. /package/dist/cli/{chunk-D5U9WJ9X.js → chunk-D5U9WJ9X2.js} +0 -0
  102. /package/dist/cli/{chunk-DV5sRVN1.js → chunk-DV5sRVN12.js} +0 -0
  103. /package/dist/cli/{chunk-DXSwo4q72.js → chunk-DXSwo4q7.js} +0 -0
  104. /package/dist/cli/{chunk-Dv5oFrVy2.js → chunk-Dv5oFrVy.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{n as e,t}from"./chunk-Drx4e34U.js";import n from"process";import{Buffer as r}from"buffer";function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function a(e){if(Object.prototype.hasOwnProperty.call(e,`__esModule`))return e;var t=e.default;if(typeof t==`function`){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var o={exports:{}},s=o.exports,c;function l(){return c?o.exports:(c=1,(function(e){(function(t,n){e.exports?e.exports=n():t.log=n()})(s,function(){var e=function(){},t=`undefined`,n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=[`trace`,`debug`,`info`,`warn`,`error`],i={},a=null;function o(e,t){var n=e[t];if(typeof n.bind==`function`)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch{return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(r){return r===`debug`&&(r=`log`),typeof console===t?!1:r===`trace`&&n?s:console[r]===void 0?console.log===void 0?e:o(console,`log`):o(console,r)}function l(){for(var n=this.getLevel(),i=0;i<r.length;i++){var a=r[i];this[a]=i<n?e:this.methodFactory(a,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return`No console available for logging`}function u(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function d(e,t,n){return c(e)||u.apply(this,arguments)}function f(e,n){var o=this,s,c,u,f=`loglevel`;typeof e==`string`?f+=`:`+e:typeof e==`symbol`&&(f=void 0);function p(e){var n=(r[e]||`silent`).toUpperCase();if(!(typeof window===t||!f)){try{window.localStorage[f]=n;return}catch{}try{window.document.cookie=encodeURIComponent(f)+`=`+n+`;`}catch{}}}function m(){var e;if(!(typeof window===t||!f)){try{e=window.localStorage[f]}catch{}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(f),i=n.indexOf(r+`=`);i!==-1&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch{}return o.levels[e]===void 0&&(e=void 0),e}}function h(){if(!(typeof window===t||!f)){try{window.localStorage.removeItem(f)}catch{}try{window.document.cookie=encodeURIComponent(f)+`=; expires=Thu, 01 Jan 1970 00:00:00 UTC`}catch{}}}function g(e){var t=e;if(typeof t==`string`&&o.levels[t.toUpperCase()]!==void 0&&(t=o.levels[t.toUpperCase()]),typeof t==`number`&&t>=0&&t<=o.levels.SILENT)return t;throw TypeError(`log.setLevel() called with invalid level: `+e)}o.name=e,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=n||d,o.getLevel=function(){return u??c??s},o.setLevel=function(e,t){return u=g(e),t!==!1&&p(u),l.call(o)},o.setDefaultLevel=function(e){c=g(e),m()||o.setLevel(e,!1)},o.resetLevel=function(){u=null,h(),l.call(o)},o.enableAll=function(e){o.setLevel(o.levels.TRACE,e)},o.disableAll=function(e){o.setLevel(o.levels.SILENT,e)},o.rebuild=function(){if(a!==o&&(s=g(a.getLevel())),l.call(o),a===o)for(var e in i)i[e].rebuild()},s=g(a?a.getLevel():`WARN`);var _=m();_!=null&&(u=g(_)),l.call(o)}a=new f,a.getLogger=function(e){if(typeof e!=`symbol`&&typeof e!=`string`||e===``)throw TypeError(`You must supply a name when creating a logger.`);var t=i[e];return t||=i[e]=new f(e,a.methodFactory),t};var p=typeof window===t?void 0:window.log;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=p),a},a.getLoggers=function(){return i},a.default=a,a})})(o),o.exports)}var u=i(l()),d=class extends Error{constructor(e){super(`Cannot find model record in appConfig for ${e}. Please check if the model ID is correct and included in the model_list configuration.`),this.name=`ModelNotFoundError`}},f=class extends Error{constructor(e){super(e),this.name=`ConfigValueError`}},p=class extends f{constructor(e,t){super(`Make sure \`${e}\` > ${t}.`),this.name=`MinValueError`}},m=class extends f{constructor(e,t,n,r){super(`Make sure ${t} < ${e} <= ${n}.${r?` `+r:``}`),this.name=`RangeError`}},h=class extends f{constructor(e){super(`Make sure ${e} >= 0.`),this.name=`NonNegativeError`}},g=class extends f{constructor(e,t){super(`Make sure ${e} to be number represented in string.${t?` Got `+t:``}`),this.name=`InvalidNumberStringError`}},_=class extends f{constructor(e,t,n){super(`${e} requires ${t} to be ${n}.`),this.name=`DependencyError`}},v=class extends Error{constructor(){super(`WebGPU is not supported in your current environment, but it is necessary to run the WebLLM engine. Please make sure that your browser supports WebGPU and that it is enabled in your browser settings. You can also consult your browser's compatibility chart to see if it supports WebGPU. For more information about WebGPU support in your browser, visit https://webgpureport.org/`),this.name=`WebGPUNotAvailableError`}},y=class extends Error{constructor(e){super(`Model not loaded before trying to complete ${e}. Please ensure you have called MLCEngine.reload(model) to load the model before initiating APIs, or initialize your engine using CreateMLCEngine() with a valid model configuration.`),this.name=`ModelNotLoadedError`}},b=class extends Error{constructor(e){super(e),this.name=`MessageOrderError`}},ee=class extends Error{constructor(){super("System prompt should always be the first message in `messages`."),this.name=`SystemMessageOrderError`}},x=class extends Error{constructor(e){super(`${e} should have string content.`),this.name=`ContentTypeError`}},S=class extends Error{constructor(e){super(`Unsupported role of message: ${e}`),this.name=`UnsupportedRoleError`}},te=class extends Error{constructor(e,t,n){super(`The model loaded is not of type ModelType.VLM (vision-language model). Therefore, user message only supports string content, but received: ${n}\nLoaded modelId: ${e}, modelType: ${t}`),this.name=`UserMessageContentErrorForNonVLM`}},ne=class extends Error{constructor(e,t){super(`prefillChunkSize needs to be greater than imageEmbedSize because a single image's prefill cannot be chunked. Got prefillChunkSize: ${e}, imageEmbedSize: ${t}`),this.name=`PrefillChunkSizeSmallerThanImageError`}},re=class extends Error{constructor(){super(`Received image input but model does not have kernel image_embed. Make sure to only pass in image to a vision model.`),this.name=`CannotFindImageEmbedError`}},ie=class extends Error{constructor(e){super(`Currently do not support field image_url.detail, but received: ${e}`),this.name=`UnsupportedDetailError`}},C=class extends Error{constructor(e){super(`image_url.url should start with "data:image" for base64, or with "http", but got: ${e}`),this.name=`UnsupportedImageURLError`}},w=class extends Error{constructor(){super(`Each message can have at most one text contentPart, but received more than 1.`),this.name=`MultipleTextContentError`}},T=class extends Error{constructor(e,t){super(`Internal error: error encountered when parsing outputMessage for function calling. Got outputMessage: ${e}\nGot error: ${t}`),this.name=`ToolCallOutputParseError`}},ae=class extends Error{constructor(e){super(`Internal error: expect output of function calling to be an ${e}`),this.name=`ToolCallOutputInvalidTypeError`}},E=class extends Error{constructor(e,t){super(`Expect generated tool call to have fields ${e.map(e=>`"\`${e}\`"`).join(`, `)}, but got object: ${JSON.stringify(t)}`),this.name=`JSONFieldError`}},D=class extends Error{constructor(){super("Configuration not initialized. Ensure you have called `reload()` function first."),this.name=`ConfigurationNotInitializedError`}},oe=class extends Error{constructor(e){super(`Missing \`model_lib\` for the model with ID "${e}". Please ensure that \`model_lib\` is provided in \`model_list\` for each model. This URL is essential for downloading the WASM library necessary to run the model.`),this.name=`MissingModelError`}},se=class extends Error{constructor(e){super(`This model requires feature ${e}, which is not yet supported by this browser.`),this.name=`FeatureSupportError`}},ce=class extends Error{constructor(e,t){super(`The following fields in ${t} are not yet supported: \n`+e.join(`, `)),this.name=`UnsupportedFieldsError`}},le=class extends se{constructor(){super(`This model requires WebGPU extension shader-f16, which is not enabled in this browser. You can try to launch Chrome Canary in command line with flag "--enable-dawn-features=allow_unsafe_apis".`),this.name=`ShaderF16SupportError`}},ue=class extends Error{constructor(){super(`The WebGPU device was lost while loading the model. This issue often occurs due to running out of memory (OOM). To resolve this, try reloading with a model that has fewer parameters or uses a smaller context length.`),this.name=`DeviceLostError`}},de=class extends Error{constructor(e){super(`Cannot handle tokenizer files ${e}`),this.name=`UnsupportedTokenizerFilesError`}},fe=class extends Error{constructor(e,t){super(`Only one of context_window_size and sliding_window_size can be positive. Got: context_window_size: ${e}, sliding_window_size: ${t}\nConsider modifying ModelRecord.overrides to set one of them to -1.`),this.name=`WindowSizeConfigurationError`}},pe=class extends Error{constructor(){super("Need to specify non-negative attention_sink_size if using sliding window. Consider modifying ModelRecord.overrides. Use `attention_sink_size=0` for default sliding window."),this.name=`AttentionSinkSizeError`}},me=class extends Error{constructor(){super(`Need to specify either sliding_window_size or max_window_size.
1
+ import{n as e,t}from"./chunk-Drx4e34U2.js";import n from"process";import{Buffer as r}from"buffer";function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function a(e){if(Object.prototype.hasOwnProperty.call(e,`__esModule`))return e;var t=e.default;if(typeof t==`function`){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var o={exports:{}},s=o.exports,c;function l(){return c?o.exports:(c=1,(function(e){(function(t,n){e.exports?e.exports=n():t.log=n()})(s,function(){var e=function(){},t=`undefined`,n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=[`trace`,`debug`,`info`,`warn`,`error`],i={},a=null;function o(e,t){var n=e[t];if(typeof n.bind==`function`)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch{return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(r){return r===`debug`&&(r=`log`),typeof console===t?!1:r===`trace`&&n?s:console[r]===void 0?console.log===void 0?e:o(console,`log`):o(console,r)}function l(){for(var n=this.getLevel(),i=0;i<r.length;i++){var a=r[i];this[a]=i<n?e:this.methodFactory(a,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return`No console available for logging`}function u(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function d(e,t,n){return c(e)||u.apply(this,arguments)}function f(e,n){var o=this,s,c,u,f=`loglevel`;typeof e==`string`?f+=`:`+e:typeof e==`symbol`&&(f=void 0);function p(e){var n=(r[e]||`silent`).toUpperCase();if(!(typeof window===t||!f)){try{window.localStorage[f]=n;return}catch{}try{window.document.cookie=encodeURIComponent(f)+`=`+n+`;`}catch{}}}function m(){var e;if(!(typeof window===t||!f)){try{e=window.localStorage[f]}catch{}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(f),i=n.indexOf(r+`=`);i!==-1&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch{}return o.levels[e]===void 0&&(e=void 0),e}}function h(){if(!(typeof window===t||!f)){try{window.localStorage.removeItem(f)}catch{}try{window.document.cookie=encodeURIComponent(f)+`=; expires=Thu, 01 Jan 1970 00:00:00 UTC`}catch{}}}function g(e){var t=e;if(typeof t==`string`&&o.levels[t.toUpperCase()]!==void 0&&(t=o.levels[t.toUpperCase()]),typeof t==`number`&&t>=0&&t<=o.levels.SILENT)return t;throw TypeError(`log.setLevel() called with invalid level: `+e)}o.name=e,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=n||d,o.getLevel=function(){return u??c??s},o.setLevel=function(e,t){return u=g(e),t!==!1&&p(u),l.call(o)},o.setDefaultLevel=function(e){c=g(e),m()||o.setLevel(e,!1)},o.resetLevel=function(){u=null,h(),l.call(o)},o.enableAll=function(e){o.setLevel(o.levels.TRACE,e)},o.disableAll=function(e){o.setLevel(o.levels.SILENT,e)},o.rebuild=function(){if(a!==o&&(s=g(a.getLevel())),l.call(o),a===o)for(var e in i)i[e].rebuild()},s=g(a?a.getLevel():`WARN`);var _=m();_!=null&&(u=g(_)),l.call(o)}a=new f,a.getLogger=function(e){if(typeof e!=`symbol`&&typeof e!=`string`||e===``)throw TypeError(`You must supply a name when creating a logger.`);var t=i[e];return t||=i[e]=new f(e,a.methodFactory),t};var p=typeof window===t?void 0:window.log;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=p),a},a.getLoggers=function(){return i},a.default=a,a})})(o),o.exports)}var u=i(l()),d=class extends Error{constructor(e){super(`Cannot find model record in appConfig for ${e}. Please check if the model ID is correct and included in the model_list configuration.`),this.name=`ModelNotFoundError`}},f=class extends Error{constructor(e){super(e),this.name=`ConfigValueError`}},p=class extends f{constructor(e,t){super(`Make sure \`${e}\` > ${t}.`),this.name=`MinValueError`}},m=class extends f{constructor(e,t,n,r){super(`Make sure ${t} < ${e} <= ${n}.${r?` `+r:``}`),this.name=`RangeError`}},h=class extends f{constructor(e){super(`Make sure ${e} >= 0.`),this.name=`NonNegativeError`}},g=class extends f{constructor(e,t){super(`Make sure ${e} to be number represented in string.${t?` Got `+t:``}`),this.name=`InvalidNumberStringError`}},_=class extends f{constructor(e,t,n){super(`${e} requires ${t} to be ${n}.`),this.name=`DependencyError`}},v=class extends Error{constructor(){super(`WebGPU is not supported in your current environment, but it is necessary to run the WebLLM engine. Please make sure that your browser supports WebGPU and that it is enabled in your browser settings. You can also consult your browser's compatibility chart to see if it supports WebGPU. For more information about WebGPU support in your browser, visit https://webgpureport.org/`),this.name=`WebGPUNotAvailableError`}},y=class extends Error{constructor(e){super(`Model not loaded before trying to complete ${e}. Please ensure you have called MLCEngine.reload(model) to load the model before initiating APIs, or initialize your engine using CreateMLCEngine() with a valid model configuration.`),this.name=`ModelNotLoadedError`}},b=class extends Error{constructor(e){super(e),this.name=`MessageOrderError`}},ee=class extends Error{constructor(){super("System prompt should always be the first message in `messages`."),this.name=`SystemMessageOrderError`}},x=class extends Error{constructor(e){super(`${e} should have string content.`),this.name=`ContentTypeError`}},S=class extends Error{constructor(e){super(`Unsupported role of message: ${e}`),this.name=`UnsupportedRoleError`}},te=class extends Error{constructor(e,t,n){super(`The model loaded is not of type ModelType.VLM (vision-language model). Therefore, user message only supports string content, but received: ${n}\nLoaded modelId: ${e}, modelType: ${t}`),this.name=`UserMessageContentErrorForNonVLM`}},ne=class extends Error{constructor(e,t){super(`prefillChunkSize needs to be greater than imageEmbedSize because a single image's prefill cannot be chunked. Got prefillChunkSize: ${e}, imageEmbedSize: ${t}`),this.name=`PrefillChunkSizeSmallerThanImageError`}},re=class extends Error{constructor(){super(`Received image input but model does not have kernel image_embed. Make sure to only pass in image to a vision model.`),this.name=`CannotFindImageEmbedError`}},ie=class extends Error{constructor(e){super(`Currently do not support field image_url.detail, but received: ${e}`),this.name=`UnsupportedDetailError`}},C=class extends Error{constructor(e){super(`image_url.url should start with "data:image" for base64, or with "http", but got: ${e}`),this.name=`UnsupportedImageURLError`}},w=class extends Error{constructor(){super(`Each message can have at most one text contentPart, but received more than 1.`),this.name=`MultipleTextContentError`}},T=class extends Error{constructor(e,t){super(`Internal error: error encountered when parsing outputMessage for function calling. Got outputMessage: ${e}\nGot error: ${t}`),this.name=`ToolCallOutputParseError`}},ae=class extends Error{constructor(e){super(`Internal error: expect output of function calling to be an ${e}`),this.name=`ToolCallOutputInvalidTypeError`}},E=class extends Error{constructor(e,t){super(`Expect generated tool call to have fields ${e.map(e=>`"\`${e}\`"`).join(`, `)}, but got object: ${JSON.stringify(t)}`),this.name=`JSONFieldError`}},D=class extends Error{constructor(){super("Configuration not initialized. Ensure you have called `reload()` function first."),this.name=`ConfigurationNotInitializedError`}},oe=class extends Error{constructor(e){super(`Missing \`model_lib\` for the model with ID "${e}". Please ensure that \`model_lib\` is provided in \`model_list\` for each model. This URL is essential for downloading the WASM library necessary to run the model.`),this.name=`MissingModelError`}},se=class extends Error{constructor(e){super(`This model requires feature ${e}, which is not yet supported by this browser.`),this.name=`FeatureSupportError`}},ce=class extends Error{constructor(e,t){super(`The following fields in ${t} are not yet supported: \n`+e.join(`, `)),this.name=`UnsupportedFieldsError`}},le=class extends se{constructor(){super(`This model requires WebGPU extension shader-f16, which is not enabled in this browser. You can try to launch Chrome Canary in command line with flag "--enable-dawn-features=allow_unsafe_apis".`),this.name=`ShaderF16SupportError`}},ue=class extends Error{constructor(){super(`The WebGPU device was lost while loading the model. This issue often occurs due to running out of memory (OOM). To resolve this, try reloading with a model that has fewer parameters or uses a smaller context length.`),this.name=`DeviceLostError`}},de=class extends Error{constructor(e){super(`Cannot handle tokenizer files ${e}`),this.name=`UnsupportedTokenizerFilesError`}},fe=class extends Error{constructor(e,t){super(`Only one of context_window_size and sliding_window_size can be positive. Got: context_window_size: ${e}, sliding_window_size: ${t}\nConsider modifying ModelRecord.overrides to set one of them to -1.`),this.name=`WindowSizeConfigurationError`}},pe=class extends Error{constructor(){super("Need to specify non-negative attention_sink_size if using sliding window. Consider modifying ModelRecord.overrides. Use `attention_sink_size=0` for default sliding window."),this.name=`AttentionSinkSizeError`}},me=class extends Error{constructor(){super(`Need to specify either sliding_window_size or max_window_size.
2
2
  Consider modifying ModelRecord.overrides to set one of them to positive.`),this.name=`WindowSizeSpecificationError`}},he=class extends Error{constructor(e,t){super(`Prompt tokens exceed context window size: number of prompt tokens: ${e}; context window size: ${t}\nConsider shortening the prompt, or increase \`context_window_size\`, or using sliding window via \`sliding_window_size\`.`),this.name=`ContextWindowSizeExceededError`}},ge=class extends Error{constructor(){super("When streaming, `n` cannot be > 1."),this.name=`StreamingCountError`}},_e=class extends Error{constructor(e){super("`seed` should be an integer, but got "+e),this.name=`SeedTypeError`}},ve=class extends Error{constructor(){super("JSON schema is only supported with `json_object` response format."),this.name=`InvalidResponseFormatError`}},O=class extends Error{constructor(){super("When ResponseFormat.type is `grammar`, ResponseFormat.grammar needs to be specified.\nWhen ResponseFormat.grammar is specified, ResponseFormat.type needs to be grammar."),this.name=`InvalidResponseFormatGrammarError`}},ye=class extends Error{constructor(){super("When ResponseFormat.type is `structural_tag`, ResponseFormat.structural_tag needs to be specified.\nWhen ResponseFormat.structural_tag is specified, ResponseFormat.type needs to be structural_tag."),this.name=`InvalidResponseFormatStructuralTagError`}},be=class extends Error{constructor(e){super(`When using Hermes-2-Pro function calling via ChatCompletionRequest.tools, cannot specify customized response_format. We will set it for you internally. Currently set to: `+JSON.stringify(e)),this.name=`CustomResponseFormatError`}},xe=class extends Error{constructor(e,t){super(`${e} is not supported for ChatCompletionRequest.tools. Currently, models that support function calling are: ${t.join(`, `)}`),this.name=`UnsupportedModelIdError`}},Se=class extends Error{constructor(){super(`When using Hermes-2-Pro function calling via ChatCompletionRequest.tools, cannot specify customized system prompt.`),this.name=`CustomSystemPromptError`}},Ce=class extends Error{constructor(){super(`Only specify stream_options when stream=True.`),this.name=`InvalidStreamOptionsError`}},we=class extends Error{constructor(){super(`Non-chat text completion API expects KVCache to be empty.`),this.name=`TextCompletionExpectsKVEmptyError`}},Te=class extends Error{constructor(){super(`Non-chat text completion API expects isTextCompletion is true, and prompt is defined.`),this.name=`TextCompletionConversationExpectsPrompt`}},k=class extends Error{constructor(e){super(`Non-chat text completion API cannot call ${e}.`),this.name=`TextCompletionConversationError`}},Ee=class extends Error{constructor(){super(`Embedding in base64 format is currently not supported.`),this.name=`EmbeddingUnsupportedEncodingFormatError`}},De=class extends Error{constructor(e){super(`Trying to run embeddings.create() with ${e}, which does not have ModelRecord.model_type === ModelType.embedding in the model record. Either make sure an embedding model is loaded, or specify the model type in ModelRecord.`),this.name=`EmbeddingUnsupportedModelError`}},Oe=class extends Error{constructor(e){super(`Embedding should not use sliding window. However, sliding_window_size=${e} is specified in the chat config.`),this.name=`EmbeddingSlidingWindowError`}},ke=class extends Error{constructor(e,t){super(`Embedding currently does not support chunking. Make sure contextWindowSize === prefillChunkSize. Got contextWindowSize=${e}, prefillChunkSize=${t} instead.`),this.name=`EmbeddingChunkingUnsupportedError`}},Ae=class extends Error{constructor(e,t){super(`The embedding model you are using only supports up to ${e} context size.However, an input in the batch has size ${t}.`),this.name=`EmbeddingExceedContextWindowSizeError`}},A=class extends Error{constructor(){super(`Embedding input cannot be empty string or empty token array.`),this.name=`EmbeddingInputEmptyError`}},j=class extends Error{constructor(e,t){super(`Expect chatOpts, if specified, to match the size of modelId. However, got ${e} modelId, but ${t} chatOpts.`),this.name=`ReloadArgumentSizeUnmatchedError`}},je=class extends Error{constructor(e,t){super(`Multiple models are loaded in engine. Please specify the model in ${t}.\nCurrently loaded models are:\n${e}`),this.name=`UnclearModelToUseError`}},Me=class extends Error{constructor(e,t,n){super(`Specified model ${t} for ${n} is not found in loaded models. Please check if the correct model is loaded/specified. Currently loaded models are:\n${e}`),this.name=`SpecifiedModelNotFoundError`}},Ne=class extends Error{constructor(e,t,n){super(`${n} expects model to be loaded with ${t}. However, ${e} is not loaded with this pipeline.`),this.name=`IncorrectPipelineLoadedError`}},Pe=class extends Error{constructor(e){super(`Need to make models in modelId passed to reload() need to be unique. If you want to, load copies of the same model, consider making copies of the ModelRecord with different model_id. Received modelId: ${e}`),this.name=`ReloadModelIdNotUniqueError`}},Fe=class extends Error{constructor(e,t,n){super(`Integrity verification failed for ${e}\n Expected: ${t}\n Actual: ${n}\nThis may indicate file corruption or tampering.`),this.url=e,this.expected=t,this.actual=n,this.name=`IntegrityError`}},Ie;(function(e){e.user=`user`,e.assistant=`assistant`,e.tool=`tool`})(Ie||={});var Le;(function(e){e.system=`{system_message}`,e.user=`{user_message}`,e.assistant=`{assistant_message}`,e.tool=`{tool_message}`,e.function=`{function_string}`,e.hermes_tools=`{hermes_tools}`})(Le||={});function Re(e){function t(e){return e!=null}if(e.frequency_penalty&&(e.frequency_penalty<-2||e.frequency_penalty>2))throw new m(`frequency_penalty`,-2,2);if(e.presence_penalty&&(e.presence_penalty<-2||e.presence_penalty>2))throw new m(`presence_penalty`,-2,2);if(t(e.repetition_penalty)&&e.repetition_penalty<=0)throw new p(`repetition_penalty`,0);if(t(e.max_tokens)&&e.max_tokens<=0)throw new p(`max_tokens`,0);if(t(e.top_p)&&e.top_p<=0||e.top_p>1)throw new m(`top_p`,0,1);if(t(e.temperature)&&e.temperature<0)throw new h(`temperature`);if(t(e.frequency_penalty)&&!t(e.presence_penalty)&&(e.presence_penalty=0,u.warn(`Only frequency_penalty is set; we default presence_penaty to 0.`)),t(e.presence_penalty)&&!t(e.frequency_penalty)&&(e.frequency_penalty=0,u.warn(`Only presence_penalty is set; we default frequency_penalty to 0.`)),t(e.logit_bias))for(let t in e.logit_bias){let n=e.logit_bias[t];if(n>100||n<-100)throw new m(`logit_bias`,-100,100,`Got `+n+` for tokenID `+t);if(isNaN(parseInt(t)))throw new g(`logit_bias's keys`,t)}if(t(e.top_logprobs)){if(!e.logprobs)throw new _(`top_logprobs`,`logprobs`,!0);if(e.top_logprobs<0||e.top_logprobs>5)throw new m(`top_logprobs`,0,5,`Got `+e.top_logprobs)}e.logprobs&&(t(e.top_logprobs)||(e.top_logprobs=0))}var M;(function(e){e[e.LLM=0]=`LLM`,e[e.embedding=1]=`embedding`,e[e.VLM=2]=`VLM`})(M||={});function ze(e){return e.cacheBackend===void 0?`cache`:e.cacheBackend}const Be=[`Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC`,`Hermes-2-Pro-Llama-3-8B-q4f32_1-MLC`,`Hermes-2-Pro-Mistral-7B-q4f16_1-MLC`,`Hermes-3-Llama-3.1-8B-q4f32_1-MLC`,`Hermes-3-Llama-3.1-8B-q4f16_1-MLC`],Ve={cacheBackend:`cache`,model_list:[{model:`https://huggingface.co/mlc-ai/Llama-3.2-1B-Instruct-q4f32_1-MLC`,model_id:`Llama-3.2-1B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3.2-1B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:1128.82,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-3.2-1B-Instruct-q4f16_1-MLC`,model_id:`Llama-3.2-1B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3.2-1B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:879.04,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-3.2-1B-Instruct-q0f32-MLC`,model_id:`Llama-3.2-1B-Instruct-q0f32-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3.2-1B-Instruct-q0f32_cs1k-webgpu.wasm`,vram_required_MB:5106.26,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-3.2-1B-Instruct-q0f16-MLC`,model_id:`Llama-3.2-1B-Instruct-q0f16-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3.2-1B-Instruct-q0f16_cs1k-webgpu.wasm`,vram_required_MB:2573.13,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-3.2-3B-Instruct-q4f32_1-MLC`,model_id:`Llama-3.2-3B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3.2-3B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:2951.51,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-3.2-3B-Instruct-q4f16_1-MLC`,model_id:`Llama-3.2-3B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3.2-3B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2263.69,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-3.1-8B-Instruct-q4f32_1-MLC`,model_id:`Llama-3.1-8B-Instruct-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3_1-8B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:5295.7,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/Llama-3.1-8B-Instruct-q4f16_1-MLC`,model_id:`Llama-3.1-8B-Instruct-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3_1-8B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:4598.34,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/Llama-3.1-8B-Instruct-q4f32_1-MLC`,model_id:`Llama-3.1-8B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3_1-8B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:6101.01,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-3.1-8B-Instruct-q4f16_1-MLC`,model_id:`Llama-3.1-8B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3_1-8B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:5001,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/DeepSeek-R1-Distill-Qwen-7B-q4f16_1-MLC`,model_id:`DeepSeek-R1-Distill-Qwen-7B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-7B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!1,vram_required_MB:5106.67,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/DeepSeek-R1-Distill-Qwen-7B-q4f32_1-MLC`,model_id:`DeepSeek-R1-Distill-Qwen-7B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-7B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!1,vram_required_MB:5900.09,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/DeepSeek-R1-Distill-Llama-8B-q4f32_1-MLC`,model_id:`DeepSeek-R1-Distill-Llama-8B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3_1-8B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:6101.01,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/DeepSeek-R1-Distill-Llama-8B-q4f16_1-MLC`,model_id:`DeepSeek-R1-Distill-Llama-8B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3_1-8B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:5001,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Hermes-2-Theta-Llama-3-8B-q4f16_1-MLC`,model_id:`Hermes-2-Theta-Llama-3-8B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3-8B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:4976.13,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Hermes-2-Theta-Llama-3-8B-q4f32_1-MLC`,model_id:`Hermes-2-Theta-Llama-3-8B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3-8B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:6051.27,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC`,model_id:`Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3-8B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:4976.13,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Hermes-2-Pro-Llama-3-8B-q4f32_1-MLC`,model_id:`Hermes-2-Pro-Llama-3-8B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3-8B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:6051.27,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Hermes-3-Llama-3.2-3B-q4f32_1-MLC`,model_id:`Hermes-3-Llama-3.2-3B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3.2-3B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:2951.51,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Hermes-3-Llama-3.2-3B-q4f16_1-MLC`,model_id:`Hermes-3-Llama-3.2-3B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3.2-3B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2263.69,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Hermes-3-Llama-3.1-8B-q4f32_1-MLC`,model_id:`Hermes-3-Llama-3.1-8B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3_1-8B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:5779.27,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Hermes-3-Llama-3.1-8B-q4f16_1-MLC`,model_id:`Hermes-3-Llama-3.1-8B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3_1-8B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:4876.13,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Hermes-2-Pro-Mistral-7B-q4f16_1-MLC`,model_id:`Hermes-2-Pro-Mistral-7B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Mistral-7B-Instruct-v0.3-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:4033.28,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:4096,sliding_window_size:-1}},{model:`https://huggingface.co/mlc-ai/Phi-3.5-mini-instruct-q4f16_1-MLC`,model_id:`Phi-3.5-mini-instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Phi-3.5-mini-instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:3672.07,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Phi-3.5-mini-instruct-q4f32_1-MLC`,model_id:`Phi-3.5-mini-instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Phi-3.5-mini-instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:5483.12,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Phi-3.5-mini-instruct-q4f16_1-MLC`,model_id:`Phi-3.5-mini-instruct-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Phi-3.5-mini-instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2520.07,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/Phi-3.5-mini-instruct-q4f32_1-MLC`,model_id:`Phi-3.5-mini-instruct-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Phi-3.5-mini-instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:3179.12,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/Phi-3.5-vision-instruct-q4f16_1-MLC`,model_id:`Phi-3.5-vision-instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Phi-3.5-vision-instruct-q4f16_1_cs2k-webgpu.wasm`,vram_required_MB:3952.18,low_resource_required:!0,overrides:{context_window_size:4096},model_type:M.VLM},{model:`https://huggingface.co/mlc-ai/Phi-3.5-vision-instruct-q4f32_1-MLC`,model_id:`Phi-3.5-vision-instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Phi-3.5-vision-instruct-q4f32_1_cs2k-webgpu.wasm`,vram_required_MB:5879.84,low_resource_required:!0,overrides:{context_window_size:4096},model_type:M.VLM},{model:`https://huggingface.co/mlc-ai/Phi-4-mini-instruct-q4f16_1-MLC`,model_id:`Phi-4-mini-instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Phi-4-mini-instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:3437.58,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Phi-4-mini-instruct-q4f32_1-MLC`,model_id:`Phi-4-mini-instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Phi-4-mini-instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:4220.59,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Mistral-7B-Instruct-v0.3-q4f16_1-MLC`,model_id:`Mistral-7B-Instruct-v0.3-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Mistral-7B-Instruct-v0.3-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:4573.39,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:4096,sliding_window_size:-1}},{model:`https://huggingface.co/mlc-ai/Mistral-7B-Instruct-v0.3-q4f32_1-MLC`,model_id:`Mistral-7B-Instruct-v0.3-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Mistral-7B-Instruct-v0.3-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:5619.27,low_resource_required:!1,overrides:{context_window_size:4096,sliding_window_size:-1}},{model:`https://huggingface.co/mlc-ai/Mistral-7B-Instruct-v0.2-q4f16_1-MLC`,model_id:`Mistral-7B-Instruct-v0.2-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Mistral-7B-Instruct-v0.3-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:4573.39,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:4096,sliding_window_size:-1}},{model:`https://huggingface.co/mlc-ai/OpenHermes-2.5-Mistral-7B-q4f16_1-MLC`,model_id:`OpenHermes-2.5-Mistral-7B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Mistral-7B-Instruct-v0.3-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:4573.39,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:4096,sliding_window_size:-1}},{model:`https://huggingface.co/mlc-ai/NeuralHermes-2.5-Mistral-7B-q4f16_1-MLC`,model_id:`NeuralHermes-2.5-Mistral-7B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Mistral-7B-Instruct-v0.3-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:4573.39,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:4096,sliding_window_size:-1}},{model:`https://huggingface.co/mlc-ai/WizardMath-7B-V1.1-q4f16_1-MLC`,model_id:`WizardMath-7B-V1.1-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Mistral-7B-Instruct-v0.3-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:4573.39,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:4096,sliding_window_size:-1}},{model:`https://huggingface.co/mlc-ai/SmolLM2-1.7B-Instruct-q4f16_1-MLC`,model_id:`SmolLM2-1.7B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/SmolLM2-1.7B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:1774.19,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/SmolLM2-1.7B-Instruct-q4f32_1-MLC`,model_id:`SmolLM2-1.7B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/SmolLM2-1.7B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:2692.38,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/SmolLM2-360M-Instruct-q0f16-MLC`,model_id:`SmolLM2-360M-Instruct-q0f16-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/SmolLM2-360M-Instruct-q0f16_cs1k-webgpu.wasm`,vram_required_MB:871.99,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/SmolLM2-360M-Instruct-q0f32-MLC`,model_id:`SmolLM2-360M-Instruct-q0f32-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/SmolLM2-360M-Instruct-q0f32_cs1k-webgpu.wasm`,vram_required_MB:1743.99,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/SmolLM2-360M-Instruct-q4f16_1-MLC`,model_id:`SmolLM2-360M-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/SmolLM2-360M-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:376.06,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/SmolLM2-360M-Instruct-q4f32_1-MLC`,model_id:`SmolLM2-360M-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/SmolLM2-360M-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:579.61,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/SmolLM2-135M-Instruct-q0f16-MLC`,model_id:`SmolLM2-135M-Instruct-q0f16-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/SmolLM2-135M-Instruct-q0f16_cs1k-webgpu.wasm`,vram_required_MB:359.69,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/SmolLM2-135M-Instruct-q0f32-MLC`,model_id:`SmolLM2-135M-Instruct-q0f32-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/SmolLM2-135M-Instruct-q0f32_cs1k-webgpu.wasm`,vram_required_MB:719.38,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/gemma-2-2b-it-q4f16_1-MLC`,model_id:`gemma-2-2b-it-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma-2-2b-it-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:1895.3,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/gemma-2-2b-it-q4f32_1-MLC`,model_id:`gemma-2-2b-it-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma-2-2b-it-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:2508.75,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/gemma-2-2b-it-q4f16_1-MLC`,model_id:`gemma-2-2b-it-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma-2-2b-it-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:1583.3,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/gemma-2-2b-it-q4f32_1-MLC`,model_id:`gemma-2-2b-it-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma-2-2b-it-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:1884.75,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/gemma-2-9b-it-q4f16_1-MLC`,model_id:`gemma-2-9b-it-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma-2-9b-it-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:6422.01,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/gemma-2-9b-it-q4f32_1-MLC`,model_id:`gemma-2-9b-it-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma-2-9b-it-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:8383.33,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/gemma-2-2b-jpn-it-q4f16_1-MLC`,model_id:`gemma-2-2b-jpn-it-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma-2-2b-jpn-it-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:1895.3,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/gemma-2-2b-jpn-it-q4f32_1-MLC`,model_id:`gemma-2-2b-jpn-it-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma-2-2b-jpn-it-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:2508.75,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/gemma3-1b-it-q4f16_1-MLC`,model_id:`gemma3-1b-it-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma3-1b-it-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:711.07,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/OLMo-2-1124-7B-Instruct-q4f16_1-MLC`,model_id:`OLMo-2-1124-7B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/OLMo-2-1124-7B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:6479.01,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/OLMo-2-1124-7B-Instruct-q4f32_1-MLC`,model_id:`OLMo-2-1124-7B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/OLMo-2-1124-7B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:9086.02,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/OLMo-2-0425-1B-Instruct-q4f16_1-MLC`,model_id:`OLMo-2-0425-1B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/OLMo-2-0425-1B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:1776.75,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/OLMo-2-0425-1B-Instruct-q4f32_1-MLC`,model_id:`OLMo-2-0425-1B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/OLMo-2-0425-1B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:2453.51,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen3-0.6B-q4f16_1-MLC`,model_id:`Qwen3-0.6B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3-0.6B-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:1403.34,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen3-0.6B-q4f32_1-MLC`,model_id:`Qwen3-0.6B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3-0.6B-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:1924.98,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen3-0.6B-q0f16-MLC`,model_id:`Qwen3-0.6B-q0f16-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3-0.6B-q0f16_cs1k-webgpu.wasm`,vram_required_MB:2220.38,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen3-0.6B-q0f32-MLC`,model_id:`Qwen3-0.6B-q0f32-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3-0.6B-q0f32_cs1k-webgpu.wasm`,vram_required_MB:3843.25,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen3-1.7B-q4f16_1-MLC`,model_id:`Qwen3-1.7B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3-1.7B-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2036.66,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen3-1.7B-q4f32_1-MLC`,model_id:`Qwen3-1.7B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3-1.7B-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:2635.44,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen3-4B-q4f16_1-MLC`,model_id:`Qwen3-4B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3-4B-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:3431.59,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen3-4B-q4f32_1-MLC`,model_id:`Qwen3-4B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3-4B-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:4327.71,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen3-8B-q4f16_1-MLC`,model_id:`Qwen3-8B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3-8B-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:5695.78,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen3-8B-q4f32_1-MLC`,model_id:`Qwen3-8B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3-8B-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:6852.55,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen3.5-0.8B-q4f16_1-MLC`,model_id:`Qwen3.5-0.8B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3.5-0.8B-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:1629.49,low_resource_required:!0,overrides:{context_window_size:4096,max_history_size:1}},{model:`https://huggingface.co/mlc-ai/Qwen3.5-0.8B-q4f32_1-MLC`,model_id:`Qwen3.5-0.8B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3.5-0.8B-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:1894.19,low_resource_required:!0,overrides:{context_window_size:4096,max_history_size:1}},{model:`https://huggingface.co/mlc-ai/Qwen3.5-0.8B-q0f16-MLC`,model_id:`Qwen3.5-0.8B-q0f16-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3.5-0.8B-q0f16_cs1k-webgpu.wasm`,vram_required_MB:2660.27,low_resource_required:!0,overrides:{context_window_size:4096,max_history_size:1}},{model:`https://huggingface.co/mlc-ai/Qwen3.5-2B-q4f16_1-MLC`,model_id:`Qwen3.5-2B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3.5-2B-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2245.44,low_resource_required:!1,overrides:{context_window_size:4096,max_history_size:1}},{model:`https://huggingface.co/mlc-ai/Qwen3.5-2B-q4f32_1-MLC`,model_id:`Qwen3.5-2B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3.5-2B-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:2591.55,low_resource_required:!1,overrides:{context_window_size:4096,max_history_size:1}},{model:`https://huggingface.co/mlc-ai/Qwen3.5-4B-q4f16_1-MLC`,model_id:`Qwen3.5-4B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3.5-4B-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:3867.82,low_resource_required:!1,overrides:{context_window_size:4096,max_history_size:1}},{model:`https://huggingface.co/mlc-ai/Qwen3.5-4B-q4f32_1-MLC`,model_id:`Qwen3.5-4B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3.5-4B-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:4680.36,low_resource_required:!1,overrides:{context_window_size:4096,max_history_size:1}},{model:`https://huggingface.co/mlc-ai/Qwen3.5-9B-q4f16_1-MLC`,model_id:`Qwen3.5-9B-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3.5-9B-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:6433.01,low_resource_required:!1,overrides:{context_window_size:4096,max_history_size:1}},{model:`https://huggingface.co/mlc-ai/Qwen3.5-9B-q4f32_1-MLC`,model_id:`Qwen3.5-9B-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen3.5-9B-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:7544.74,low_resource_required:!1,overrides:{context_window_size:4096,max_history_size:1}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-0.5B-Instruct-q4f16_1-MLC`,model_id:`Qwen2.5-0.5B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-0.5B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:944.62,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-0.5B-Instruct-q4f32_1-MLC`,model_id:`Qwen2.5-0.5B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-0.5B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1060.2,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-0.5B-Instruct-q0f16-MLC`,model_id:`Qwen2.5-0.5B-Instruct-q0f16-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-0.5B-Instruct-q0f16_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1624.12,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-0.5B-Instruct-q0f32-MLC`,model_id:`Qwen2.5-0.5B-Instruct-q0f32-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-0.5B-Instruct-q0f32_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:2654.75,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-1.5B-Instruct-q4f16_1-MLC`,model_id:`Qwen2.5-1.5B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-1.5B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1629.75,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-1.5B-Instruct-q4f32_1-MLC`,model_id:`Qwen2.5-1.5B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-1.5B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1888.97,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-3B-Instruct-q4f16_1-MLC`,model_id:`Qwen2.5-3B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2.5-3B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:2504.76,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-3B-Instruct-q4f32_1-MLC`,model_id:`Qwen2.5-3B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2.5-3B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:2893.64,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-7B-Instruct-q4f16_1-MLC`,model_id:`Qwen2.5-7B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-7B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!1,vram_required_MB:5106.67,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-7B-Instruct-q4f32_1-MLC`,model_id:`Qwen2.5-7B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-7B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!1,vram_required_MB:5900.09,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-Coder-0.5B-Instruct-q4f16_1-MLC`,model_id:`Qwen2.5-Coder-0.5B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-0.5B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:944.62,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-Coder-0.5B-Instruct-q4f32_1-MLC`,model_id:`Qwen2.5-Coder-0.5B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-0.5B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1060.2,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-Coder-0.5B-Instruct-q0f16-MLC`,model_id:`Qwen2.5-Coder-0.5B-Instruct-q0f16-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-0.5B-Instruct-q0f16_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1624.12,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-Coder-0.5B-Instruct-q0f32-MLC`,model_id:`Qwen2.5-Coder-0.5B-Instruct-q0f32-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-0.5B-Instruct-q0f32_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:2654.75,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-Coder-1.5B-Instruct-q4f16_1-MLC`,model_id:`Qwen2.5-Coder-1.5B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-1.5B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!1,vram_required_MB:1629.75,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-Coder-1.5B-Instruct-q4f32_1-MLC`,model_id:`Qwen2.5-Coder-1.5B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-1.5B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!1,vram_required_MB:1888.97,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-Coder-3B-Instruct-q4f16_1-MLC`,model_id:`Qwen2.5-Coder-3B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2.5-3B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:2504.76,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-Coder-3B-Instruct-q4f32_1-MLC`,model_id:`Qwen2.5-Coder-3B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2.5-3B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:2893.64,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-Coder-7B-Instruct-q4f16_1-MLC`,model_id:`Qwen2.5-Coder-7B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-7B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!1,vram_required_MB:5106.67,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-Coder-7B-Instruct-q4f32_1-MLC`,model_id:`Qwen2.5-Coder-7B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-7B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!1,vram_required_MB:5900.09,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-Math-1.5B-Instruct-q4f16_1-MLC`,model_id:`Qwen2.5-Math-1.5B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-1.5B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1629.75,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2.5-Math-1.5B-Instruct-q4f32_1-MLC`,model_id:`Qwen2.5-Math-1.5B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-1.5B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1888.97,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/stablelm-2-zephyr-1_6b-q4f16_1-MLC`,model_id:`stablelm-2-zephyr-1_6b-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/stablelm-2-zephyr-1_6b-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2087.66,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/stablelm-2-zephyr-1_6b-q4f32_1-MLC`,model_id:`stablelm-2-zephyr-1_6b-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/stablelm-2-zephyr-1_6b-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:2999.33,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/stablelm-2-zephyr-1_6b-q4f16_1-MLC`,model_id:`stablelm-2-zephyr-1_6b-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/stablelm-2-zephyr-1_6b-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:1511.66,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/stablelm-2-zephyr-1_6b-q4f32_1-MLC`,model_id:`stablelm-2-zephyr-1_6b-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/stablelm-2-zephyr-1_6b-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:1847.33,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/RedPajama-INCITE-Chat-3B-v1-q4f16_1-MLC`,model_id:`RedPajama-INCITE-Chat-3B-v1-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/RedPajama-INCITE-Chat-3B-v1-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2972.09,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:2048}},{model:`https://huggingface.co/mlc-ai/RedPajama-INCITE-Chat-3B-v1-q4f32_1-MLC`,model_id:`RedPajama-INCITE-Chat-3B-v1-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/RedPajama-INCITE-Chat-3B-v1-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:3928.09,low_resource_required:!1,overrides:{context_window_size:2048}},{model:`https://huggingface.co/mlc-ai/RedPajama-INCITE-Chat-3B-v1-q4f16_1-MLC`,model_id:`RedPajama-INCITE-Chat-3B-v1-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/RedPajama-INCITE-Chat-3B-v1-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2041.09,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/RedPajama-INCITE-Chat-3B-v1-q4f32_1-MLC`,model_id:`RedPajama-INCITE-Chat-3B-v1-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/RedPajama-INCITE-Chat-3B-v1-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:2558.09,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/TinyLlama-1.1B-Chat-v1.0-q4f16_1-MLC`,model_id:`TinyLlama-1.1B-Chat-v1.0-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/TinyLlama-1.1B-Chat-v1.0-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:697.24,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:2048}},{model:`https://huggingface.co/mlc-ai/TinyLlama-1.1B-Chat-v1.0-q4f32_1-MLC`,model_id:`TinyLlama-1.1B-Chat-v1.0-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/TinyLlama-1.1B-Chat-v1.0-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:839.98,low_resource_required:!0,overrides:{context_window_size:2048}},{model:`https://huggingface.co/mlc-ai/TinyLlama-1.1B-Chat-v1.0-q4f16_1-MLC`,model_id:`TinyLlama-1.1B-Chat-v1.0-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/TinyLlama-1.1B-Chat-v1.0-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:675.24,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/TinyLlama-1.1B-Chat-v1.0-q4f32_1-MLC`,model_id:`TinyLlama-1.1B-Chat-v1.0-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/TinyLlama-1.1B-Chat-v1.0-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:795.98,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/Ministral-3-3B-Base-2512-q4f16_1-MLC`,model_id:`Ministral-3-3B-Base-2512-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Ministral-3-3B-Base-2512-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2863.69,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Ministral-3-3B-Base-2512-q4f32_1-MLC`,model_id:`Ministral-3-3B-Base-2512-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Ministral-3-3B-Base-2512-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:3532.37,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Ministral-3-3B-Reasoning-2512-q4f16_1-MLC`,model_id:`Ministral-3-3B-Reasoning-2512-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Ministral-3-3B-Reasoning-2512-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2863.69,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Ministral-3-3B-Reasoning-2512-q4f32_1-MLC`,model_id:`Ministral-3-3B-Reasoning-2512-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Ministral-3-3B-Reasoning-2512-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:3532.37,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Ministral-3-3B-Instruct-2512-BF16-q4f16_1-MLC`,model_id:`Ministral-3-3B-Instruct-2512-BF16-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Ministral-3-3B-Instruct-2512-BF16-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2863.69,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Ministral-3-3B-Instruct-2512-BF16-q4f32_1-MLC`,model_id:`Ministral-3-3B-Instruct-2512-BF16-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Ministral-3-3B-Instruct-2512-BF16-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:3532.37,low_resource_required:!0,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-3.1-70B-Instruct-q3f16_1-MLC`,model_id:`Llama-3.1-70B-Instruct-q3f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3_1-70B-Instruct-q3f16_1_cs1k-webgpu.wasm`,vram_required_MB:31153.13,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2-0.5B-Instruct-q4f16_1-MLC`,model_id:`Qwen2-0.5B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-0.5B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:944.62,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2-0.5B-Instruct-q0f16-MLC`,model_id:`Qwen2-0.5B-Instruct-q0f16-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-0.5B-Instruct-q0f16_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1624.12,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2-0.5B-Instruct-q0f32-MLC`,model_id:`Qwen2-0.5B-Instruct-q0f32-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-0.5B-Instruct-q0f32_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:2654.75,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2-1.5B-Instruct-q4f16_1-MLC`,model_id:`Qwen2-1.5B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-1.5B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1629.75,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2-1.5B-Instruct-q4f32_1-MLC`,model_id:`Qwen2-1.5B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-1.5B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1888.97,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2-7B-Instruct-q4f16_1-MLC`,model_id:`Qwen2-7B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-7B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!1,vram_required_MB:5106.67,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2-7B-Instruct-q4f32_1-MLC`,model_id:`Qwen2-7B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-7B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!1,vram_required_MB:5900.09,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2-Math-1.5B-Instruct-q4f16_1-MLC`,model_id:`Qwen2-Math-1.5B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-1.5B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1629.75,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2-Math-1.5B-Instruct-q4f32_1-MLC`,model_id:`Qwen2-Math-1.5B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-1.5B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!0,vram_required_MB:1888.97,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2-Math-7B-Instruct-q4f16_1-MLC`,model_id:`Qwen2-Math-7B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-7B-Instruct-q4f16_1_cs1k-webgpu.wasm`,low_resource_required:!1,vram_required_MB:5106.67,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Qwen2-Math-7B-Instruct-q4f32_1-MLC`,model_id:`Qwen2-Math-7B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Qwen2-7B-Instruct-q4f32_1_cs1k-webgpu.wasm`,low_resource_required:!1,vram_required_MB:5900.09,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-3-8B-Instruct-q4f32_1-MLC`,model_id:`Llama-3-8B-Instruct-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3-8B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:5295.7,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/Llama-3-8B-Instruct-q4f16_1-MLC`,model_id:`Llama-3-8B-Instruct-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3-8B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:4598.34,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/Llama-3-8B-Instruct-q4f32_1-MLC`,model_id:`Llama-3-8B-Instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3-8B-Instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:6101.01,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-3-8B-Instruct-q4f16_1-MLC`,model_id:`Llama-3-8B-Instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3-8B-Instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:5001,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-3-70B-Instruct-q3f16_1-MLC`,model_id:`Llama-3-70B-Instruct-q3f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-3-70B-Instruct-q3f16_1_cs1k-webgpu.wasm`,vram_required_MB:31153.13,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Phi-3-mini-4k-instruct-q4f16_1-MLC`,model_id:`Phi-3-mini-4k-instruct-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Phi-3-mini-4k-instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:3672.07,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Phi-3-mini-4k-instruct-q4f32_1-MLC`,model_id:`Phi-3-mini-4k-instruct-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Phi-3-mini-4k-instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:5483.12,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Phi-3-mini-4k-instruct-q4f16_1-MLC`,model_id:`Phi-3-mini-4k-instruct-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Phi-3-mini-4k-instruct-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2520.07,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/Phi-3-mini-4k-instruct-q4f32_1-MLC`,model_id:`Phi-3-mini-4k-instruct-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Phi-3-mini-4k-instruct-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:3179.12,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/Llama-2-7b-chat-hf-q4f32_1-MLC`,model_id:`Llama-2-7b-chat-hf-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-2-7b-chat-hf-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:5284.01,low_resource_required:!1,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/Llama-2-7b-chat-hf-q4f16_1-MLC`,model_id:`Llama-2-7b-chat-hf-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-2-7b-chat-hf-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:4618.52,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/Llama-2-7b-chat-hf-q4f32_1-MLC`,model_id:`Llama-2-7b-chat-hf-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-2-7b-chat-hf-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:9109.03,low_resource_required:!1,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-2-7b-chat-hf-q4f16_1-MLC`,model_id:`Llama-2-7b-chat-hf-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-2-7b-chat-hf-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:6749.02,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/Llama-2-13b-chat-hf-q4f16_1-MLC`,model_id:`Llama-2-13b-chat-hf-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/Llama-2-13b-chat-hf-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:11814.09,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/gemma-2b-it-q4f16_1-MLC`,model_id:`gemma-2b-it-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma-2b-it-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:1476.52,low_resource_required:!1,buffer_size_required_bytes:262144e3,required_features:[`shader-f16`],overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/gemma-2b-it-q4f32_1-MLC`,model_id:`gemma-2b-it-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma-2b-it-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:1750.66,low_resource_required:!1,buffer_size_required_bytes:262144e3,overrides:{context_window_size:4096}},{model:`https://huggingface.co/mlc-ai/gemma-2b-it-q4f16_1-MLC`,model_id:`gemma-2b-it-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma-2b-it-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:1476.52,low_resource_required:!0,buffer_size_required_bytes:262144e3,required_features:[`shader-f16`],overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/gemma-2b-it-q4f32_1-MLC`,model_id:`gemma-2b-it-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/gemma-2b-it-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:1750.66,low_resource_required:!0,buffer_size_required_bytes:262144e3,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/phi-2-q4f16_1-MLC`,model_id:`phi-2-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/phi-2-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:3053.97,low_resource_required:!1,required_features:[`shader-f16`],overrides:{context_window_size:2048}},{model:`https://huggingface.co/mlc-ai/phi-2-q4f32_1-MLC`,model_id:`phi-2-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/phi-2-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:4032.48,low_resource_required:!1,overrides:{context_window_size:2048}},{model:`https://huggingface.co/mlc-ai/phi-2-q4f16_1-MLC`,model_id:`phi-2-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/phi-2-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:2131.97,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/phi-2-q4f32_1-MLC`,model_id:`phi-2-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/phi-2-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:2740.48,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/phi-1_5-q4f16_1-MLC`,model_id:`phi-1_5-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/phi-1_5-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:1210.09,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:2048}},{model:`https://huggingface.co/mlc-ai/phi-1_5-q4f32_1-MLC`,model_id:`phi-1_5-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/phi-1_5-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:1682.09,low_resource_required:!0,overrides:{context_window_size:2048}},{model:`https://huggingface.co/mlc-ai/phi-1_5-q4f16_1-MLC`,model_id:`phi-1_5-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/phi-1_5-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:1210.09,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/phi-1_5-q4f32_1-MLC`,model_id:`phi-1_5-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/phi-1_5-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:1682.09,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/TinyLlama-1.1B-Chat-v0.4-q4f16_1-MLC`,model_id:`TinyLlama-1.1B-Chat-v0.4-q4f16_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/TinyLlama-1.1B-Chat-v0.4-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:697.24,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:2048}},{model:`https://huggingface.co/mlc-ai/TinyLlama-1.1B-Chat-v0.4-q4f32_1-MLC`,model_id:`TinyLlama-1.1B-Chat-v0.4-q4f32_1-MLC`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/TinyLlama-1.1B-Chat-v0.4-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:839.98,low_resource_required:!0,overrides:{context_window_size:2048}},{model:`https://huggingface.co/mlc-ai/TinyLlama-1.1B-Chat-v0.4-q4f16_1-MLC`,model_id:`TinyLlama-1.1B-Chat-v0.4-q4f16_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/TinyLlama-1.1B-Chat-v0.4-q4f16_1_cs1k-webgpu.wasm`,vram_required_MB:675.24,low_resource_required:!0,required_features:[`shader-f16`],overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/TinyLlama-1.1B-Chat-v0.4-q4f32_1-MLC`,model_id:`TinyLlama-1.1B-Chat-v0.4-q4f32_1-MLC-1k`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/TinyLlama-1.1B-Chat-v0.4-q4f32_1_cs1k-webgpu.wasm`,vram_required_MB:795.98,low_resource_required:!0,overrides:{context_window_size:1024}},{model:`https://huggingface.co/mlc-ai/snowflake-arctic-embed-m-q0f32-MLC`,model_id:`snowflake-arctic-embed-m-q0f32-MLC-b32`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/snowflake-arctic-embed-m-q0f32-ctx512_cs512_batch32-webgpu.wasm`,vram_required_MB:1407.51,model_type:M.embedding},{model:`https://huggingface.co/mlc-ai/snowflake-arctic-embed-m-q0f32-MLC`,model_id:`snowflake-arctic-embed-m-q0f32-MLC-b4`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/snowflake-arctic-embed-m-q0f32-ctx512_cs512_batch4-webgpu.wasm`,vram_required_MB:539.4,model_type:M.embedding},{model:`https://huggingface.co/mlc-ai/snowflake-arctic-embed-s-q0f32-MLC`,model_id:`snowflake-arctic-embed-s-q0f32-MLC-b32`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/snowflake-arctic-embed-s-q0f32-ctx512_cs512_batch32-webgpu.wasm`,vram_required_MB:1022.82,model_type:M.embedding},{model:`https://huggingface.co/mlc-ai/snowflake-arctic-embed-s-q0f32-MLC`,model_id:`snowflake-arctic-embed-s-q0f32-MLC-b4`,model_lib:`https://raw.githubusercontent.com/mlc-ai/binary-mlc-llm-libs/main/web-llm-models/v0_2_84/base/snowflake-arctic-embed-s-q0f32-ctx512_cs512_batch4-webgpu.wasm`,vram_required_MB:238.71,model_type:M.embedding}]};function N(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function He(e){return this instanceof He?(this.v=e,this):new He(e)}function P(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof He?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}const Ue=/^(sha256|sha384|sha512)-([A-Za-z0-9+/]+={0,2})$/,We={sha256:32,sha384:48,sha512:64},F={sha256:`SHA-256`,sha384:`SHA-384`,sha512:`SHA-512`};function Ge(e){let t=e.length,n=t%4;if(n===1)return null;let r=e.match(/=+$/),i=r?r[0].length:0;if(i>2||i>0&&n!==0)return null;let a=Math.floor(t/4)*3;return i>0?a-=i:n===2?a+=1:n===3&&(a+=2),a}function I(e){let t=e.match(Ue);if(!t)return null;let n=t[1],r=t[2];return Ge(r)===We[n]?{algo:n,hash:r}:null}function Ke(e,t,n){return N(this,arguments,void 0,function*(e,t,n,r=`error`){let i=I(t);if(!i)throw Error(`Invalid SRI hash format: "${t}". Expected format: "sha256-BASE64", "sha384-BASE64", or "sha512-BASE64".`);let{algo:a,hash:o}=i,s=yield crypto.subtle.digest(F[a],e),c=new Uint8Array(s),l=``;for(let e=0;e<c.length;e++)l+=String.fromCharCode(c[e]);let d=btoa(l);if(d!==o){let e=`${a}-${d}`;if(r===`warn`){u.warn(`Integrity check failed for ${n}. Expected: ${t}, Got: ${e}`);return}throw new Fe(n,t,e)}})}var qe={exports:{}},Je=a(Object.freeze({__proto__:null,default:{}})),Ye=qe.exports,Xe;function L(){return Xe?qe.exports:(Xe=1,(function(e,t){(function(e,n){n(t)})(Ye,(function(t){function i(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function a(e){return e!==void 0&&(typeof e==`object`||typeof e==`function`)&&typeof e.then==`function`}function o(e){let t=new TextEncoder().encode(e),n=new Uint8Array(t.length+1);for(let e=0;e<t.length;++e)n[e]=t[e];return n[t.length]=0,n}function s(e){let t=[];for(let n of e)t.push(String.fromCharCode(n));return t.join(``)}function c(e,t){if(!e)throw Error(`AssertError:`+(t||``))}function l(){return __dirname+`/wasm`}class u{constructor(){this.modulus=2147483647,this.multiplier=48271,this.increment=0,this.setSeed(Date.now())}setSeed(e){if(!Number.isInteger(e))throw Error(`Seed should be an integer.`);this.rand_state=e%this.modulus,this.rand_state==0&&(this.rand_state=1),this.checkRandState()}nextInt(){let e=this.multiplier*this.rand_state+this.increment;return this.rand_state=e%this.modulus,this.checkRandState(),this.rand_state}randomFloat(){return this.nextInt()/this.modulus}checkRandState(){if(this.rand_state<=0)throw Error(`Random state is unexpectedly not strictly positive.`);if(!Number.isInteger(this.rand_state))throw Error(`Random state is unexpectedly not an integer.`)}}class d{constructor(e){this.wasm32=!0,this.memory=e,this.buffer=this.memory.buffer,this.viewU8=new Uint8Array(this.buffer),this.viewU16=new Uint16Array(this.buffer),this.viewI32=new Int32Array(this.buffer),this.viewU32=new Uint32Array(this.buffer),this.viewF32=new Float32Array(this.buffer),this.viewF64=new Float64Array(this.buffer)}loadU8(e){return this.buffer!=this.memory.buffer&&this.updateViews(),this.viewU8[e>>0]}loadU16(e){return this.buffer!=this.memory.buffer&&this.updateViews(),this.viewU16[e>>1]}loadU32(e){return this.buffer!=this.memory.buffer&&this.updateViews(),this.viewU32[e>>2]}loadI32(e){return this.buffer!=this.memory.buffer&&this.updateViews(),this.viewI32[e>>2]}loadI64(e){this.buffer!=this.memory.buffer&&this.updateViews();let t=e>>2;return this.viewI32[t]}loadF32(e){return this.buffer!=this.memory.buffer&&this.updateViews(),this.viewF32[e>>2]}loadF64(e){return this.buffer!=this.memory.buffer&&this.updateViews(),this.viewF64[e>>3]}loadPointer(e){return this.buffer!=this.memory.buffer&&this.updateViews(),this.wasm32?this.loadU32(e):this.loadI64(e)}loadUSize(e){return this.buffer!=this.memory.buffer&&this.updateViews(),this.wasm32?this.loadU32(e):this.loadI64(e)}sizeofPtr(){return this.wasm32?4:8}loadRawBytes(e,t){this.buffer!=this.memory.buffer&&this.updateViews();let n=new Uint8Array(t);return n.set(this.viewU8.slice(e,e+t)),n}loadCString(e){this.buffer!=this.memory.buffer&&this.updateViews();let t=[],n=1;for(;n!=0;)n=this.viewU8[e],n!=0&&t.push(String.fromCharCode(n)),++e;return t.join(``)}storeRawBytes(e,t){this.buffer!=this.memory.buffer&&this.updateViews(),this.viewU8.set(t,e)}loadObjectTypeIndex(e){return this.loadI32(e+8)}loadTypeInfoTypeKey(e){let t=e+8;return this.loadByteArrayAsString(t)}loadSmallStr(e){this.buffer!=this.memory.buffer&&this.updateViews();let t=e+4,n=this.loadU32(t),r=e+4+4,i=[];for(let e=0;e<n;e++)i.push(String.fromCharCode(this.viewU8[r+e]));return i.join(``)}loadSmallBytes(e){this.buffer!=this.memory.buffer&&this.updateViews();let t=e+4,n=this.loadU32(t),r=e+4+4,i=new Uint8Array(n);return i.set(this.viewU8.slice(r,r+n)),i}loadByteArrayAsString(e){this.buffer!=this.memory.buffer&&this.updateViews();let t=this.loadPointer(e),n=this.loadUSize(e+this.sizeofPtr()),r=[];for(let e=0;e<n;e++)r.push(String.fromCharCode(this.viewU8[t+e]));return r.join(``)}loadByteArrayAsBytes(e){this.buffer!=this.memory.buffer&&this.updateViews();let t=this.loadPointer(e),n=this.loadUSize(e+this.sizeofPtr()),r=new Uint8Array(n);return r.set(this.viewU8.slice(t,t+n)),r}updateViews(){this.buffer=this.memory.buffer,this.viewU8=new Uint8Array(this.buffer),this.viewU16=new Uint16Array(this.buffer),this.viewI32=new Int32Array(this.buffer),this.viewU32=new Uint32Array(this.buffer),this.viewF32=new Float32Array(this.buffer),this.viewF64=new Float64Array(this.buffer)}}class f{constructor(e,t,n){this.tempArgs=[],this.stackTop=0,this.basePtr=0,this.addressToSetTargetValue=[],this.memory=e,this.cAllocSpace=t,this.cFreeSpace=n,this.buffer=new ArrayBuffer(128),this.basePtr=this.cAllocSpace(128),this.viewU8=new Uint8Array(this.buffer),this.viewI32=new Int32Array(this.buffer),this.viewU32=new Uint32Array(this.buffer),this.viewF64=new Float64Array(this.buffer),this.updateViews()}dispose(){this.basePtr!=0&&(this.cFreeSpace(this.basePtr),this.basePtr=0)}reset(){for(this.stackTop=0,c(this.addressToSetTargetValue.length===0);this.tempArgs.length!=0;)this.tempArgs.pop().dispose()}commitToWasmMemory(e=this.stackTop){for(;this.addressToSetTargetValue.length!=0;){let[e,t]=this.addressToSetTargetValue.pop();this.storePtr(e,this.ptrFromOffset(t))}this.memory.storeRawBytes(this.basePtr,this.viewU8.slice(0,e))}allocRawBytes(e){if(e=e+7>>3<<3,this.stackTop+e>this.buffer.byteLength){let t=Math.max(this.buffer.byteLength*2,this.stackTop+e),n=this.viewU8;this.buffer=new ArrayBuffer(t),this.updateViews(),this.viewU8.set(n),this.basePtr!=0&&this.cFreeSpace(this.basePtr),this.basePtr=this.cAllocSpace(t)}let t=this.stackTop;return this.stackTop+=e,t}allocPtrArray(e){return this.allocRawBytes(this.memory.sizeofPtr()*e)}ptrFromOffset(e){return this.basePtr+e}storePtr(e,t){this.memory.wasm32?this.storeU32(e,t):this.storeI64(e,t)}storeUSize(e,t){this.memory.wasm32?this.storeU32(e,t):this.storeI64(e,t)}storeI32(e,t){this.viewI32[e>>2]=t}storeU32(e,t){this.viewU32[e>>2]=t}storeI64(e,t){let n=t&4294967295,r=e>>2;this.viewI32[r]=n,this.viewI32[r+1]=t<0?-1:0}storeF64(e,t){this.viewF64[e>>3]=t}storeRawBytes(e,t){this.viewU8.set(t,e)}allocByteArrayForString(e){let t=o(e),n=this.allocRawBytes(this.memory.sizeofPtr()*2),r=this.allocRawBytes(t.length);return this.storeUSize(n+this.memory.sizeofPtr(),e.length),this.storeRawBytes(r,t),this.addressToSetTargetValue.push([n,r]),n}allocThenSetArgString(e,t){let n=o(t),r=this.allocRawBytes(n.length);this.storeRawBytes(r,n),this.addressToSetTargetValue.push([e,r])}allocThenSetArgBytes(e,t){let n=this.allocRawBytes(this.memory.sizeofPtr()*2),r=this.allocRawBytes(t.length);this.storeRawBytes(r,t),this.storeUSize(n+this.memory.sizeofPtr(),t.length),this.addressToSetTargetValue.push([e,n]),this.addressToSetTargetValue.push([n,r])}updateViews(){this.viewU8=new Uint8Array(this.buffer),this.viewI32=new Int32Array(this.buffer),this.viewU32=new Uint32Array(this.buffer),this.viewF64=new Float64Array(this.buffer)}}function p(e){if(e.wasmLibraryProvider&&e.wasmLibraryProvider.start&&e.wasmLibraryProvider.imports!==void 0){let t=e;return{imports:t.wasmLibraryProvider.imports,start:e=>{t.wasmLibraryProvider.start(e)}}}else if(e.imports&&e.start!==void 0)return e;else if(e.wasiImport&&e.start!==void 0)return{imports:{wasi_snapshot_preview1:e.wasiImport},start:t=>{e.start(t)}};else return}class m{constructor(e={},t=console.log){this.packedCFuncTable=[void 0],this.packedCFuncTableFreeId=[],this.logger=t,this.libProvider=p(e),this.libProvider===void 0?this.imports=e:this.imports=this.libProvider.imports,this.imports.env=this.environment(this.imports.env)}start(e){this.libProvider!==void 0&&this.libProvider.start(e)}environment(e){return Object.assign({__cxa_thread_atexit:()=>{},emscripten_notify_memory_growth:e=>{}},e,{TVMFFIWasmSafeCall:(e,t,n,r)=>{let i=this.packedCFuncTable[e];return c(i!==void 0),i(e,t,n,r)},TVMFFIWasmFunctionDeleter:e=>{this.packedCFuncTable[e]=void 0,this.packedCFuncTableFreeId.push(e)},__console_log:e=>{this.logger(e)}})}}class h{constructor(e,t){this.state=0,this.storedPromiseBeforeUnwind=null,this.storedValueBeforeRewind=null,this.storedExceptionBeforeRewind=null,this.exports=e,this.initMemory(t)}enabled(){return this.exports.asyncify_stop_rewind!==void 0}isNormalStackState(){return this.state==0}getState(){return this.state}wrapImport(e){return(...t)=>{if(this.getState()==2)if(this.stopRewind(),this.storedValueBeforeRewind!==null){c(this.storedExceptionBeforeRewind===null);let e=this.storedValueBeforeRewind;return this.storedValueBeforeRewind=null,e}else{c(this.storedValueBeforeRewind===null);let e=this.storedExceptionBeforeRewind;throw this.storedExceptionBeforeRewind=null,e}c(this.getState()==0);let n=e(...t);if(a(n)){this.startUnwind(),c(this.storedPromiseBeforeUnwind==null),this.storedPromiseBeforeUnwind=n;return}else return n}}wrapExport(e){return(...t)=>i(this,void 0,void 0,function*(){c(this.getState()==0);let n=e(...t);for(;this.getState()==1;){this.stopUnwind();let r=this.storedPromiseBeforeUnwind;this.storedPromiseBeforeUnwind=null,c(this.storedExceptionBeforeRewind===null),c(this.storedValueBeforeRewind==null);try{this.storedValueBeforeRewind=yield r}catch(e){this.storedExceptionBeforeRewind=e}c(!a(this.storedValueBeforeRewind)),c(this.getState()==0),this.startRewind(),n=e(...t)}return n})}startRewind(){if(this.exports.asyncify_start_rewind===void 0)throw Error(`Asynctify is not enabled, please compile with -s ASYNCIFY=1 in emcc`);this.exports.asyncify_start_rewind(16),this.state=2}stopRewind(){if(this.exports.asyncify_stop_rewind===void 0)throw Error(`Asynctify is not enabled, please compile with -s ASYNCIFY=1 in emcc`);this.exports.asyncify_stop_rewind(),this.state=0}startUnwind(){if(this.exports.asyncify_start_unwind===void 0)throw Error(`Asynctify is not enabled, please compile with -s ASYNCIFY=1 in emcc`);this.exports.asyncify_start_unwind(16),this.state=1}stopUnwind(){if(this.exports.asyncify_stop_unwind===void 0)throw Error(`Asynctify is not enabled, please compile with -s ASYNCIFY=1 in emcc`);this.exports.asyncify_stop_unwind(),this.state=0}initMemory(e){new Int32Array(e.buffer,16,2).set([24,1024])}}function g(){return i(this,arguments,void 0,function*(e=`high-performance`){if(typeof navigator<`u`&&navigator.gpu!==void 0){let t=yield navigator.gpu.requestAdapter({powerPreference:e});if(t==null)throw Error(`Unable to find a compatible GPU. This issue might be because your computer doesn't have a GPU, or your system settings are not configured properly. Please check if your device has a GPU properly set up and if your your browser supports WebGPU. You can also consult your browser's compatibility chart to see if it supports WebGPU. For more information about WebGPU support in your browser, visit https://webgpureport.org/`);let n=e=>Math.ceil(e/(1<<20))+`MB`,r=1<<30;if(r>t.limits.maxBufferSize){let e=1<<28;if(console.log(`Requested maxBufferSize exceeds limit. \nrequested=${n(r)}, \nlimit=${n(t.limits.maxBufferSize)}. \nWARNING: Falling back to ${n(e)}...`),r=e,e>t.limits.maxBufferSize)throw Error(`Cannot initialize runtime because of requested maxBufferSize exceeds limit. requested=${n(e)}, limit=${n(t.limits.maxBufferSize)}. Consider upgrading your browser.`)}let i=1<<30;if(i>t.limits.maxStorageBufferBindingSize){let e=1<<27;if(console.log(`Requested maxStorageBufferBindingSize exceeds limit. \nrequested=${n(i)}, \nlimit=${n(t.limits.maxStorageBufferBindingSize)}. \nWARNING: Falling back to ${n(e)}...`),i=e,e>t.limits.maxStorageBufferBindingSize)throw Error(`Cannot initialize runtime because of requested maxStorageBufferBindingSize exceeds limit. requested=${n(e)}, limit=${n(t.limits.maxStorageBufferBindingSize)}. `)}let a=32768;if(a>t.limits.maxComputeWorkgroupStorageSize)throw Error(`Cannot initialize runtime because of requested maxComputeWorkgroupStorageSize exceeds limit. requested=${a}, limit=${t.limits.maxComputeWorkgroupStorageSize}. `);if(10>t.limits.maxStorageBuffersPerShaderStage)throw Error(`Cannot initialize runtime because of requested maxStorageBuffersPerShaderStage exceeds limit. requested=10, limit=${t.limits.maxStorageBuffersPerShaderStage}. `);let o=[1024,512,256],s=t.limits.maxComputeInvocationsPerWorkgroup,c=o.find(e=>e<=s)||void 0;c===void 0?console.log(`No candidate fits device limit=${s}; will rely on defaults`):c!==1024&&console.log(`Falling back to maxComputeInvocationsPerWorkgroup=${c} due to device limit=${s}`);let l=[];return t.features.has(`shader-f16`)&&l.push(`shader-f16`),t.features.has(`subgroups`)&&l.push(`subgroups`),{adapter:t,adapterInfo:t.info||(yield t.requestAdapterInfo()),device:yield t.requestDevice({requiredLimits:{maxBufferSize:r,maxStorageBufferBindingSize:i,maxComputeWorkgroupStorageSize:a,maxStorageBuffersPerShaderStage:10,maxComputeInvocationsPerWorkgroup:c},requiredFeatures:l})}}else return})}function _(e,t){e.pushErrorScope(`out-of-memory`),e.pushErrorScope(`validation`),e.pushErrorScope(`internal`);let n=e.createBuffer(t);return e.popErrorScope().then(t=>{t&&(e.destroy(),console.error(t))}),e.popErrorScope().then(t=>{t&&(e.destroy(),console.error(t))}),e.popErrorScope().then(t=>{t&&(e.destroy(),console.error(t))}),n}let v=`
3
3
  @group(0) @binding(0) var my_sampler : sampler;
4
4
  @group(0) @binding(1) var my_texture : texture_2d<f32>;
@@ -0,0 +1,5 @@
1
+ import{t as e}from"./chunk-DjKQO7aV.js";let t=null,n=null;const r=new Promise(e=>{n=e});function i(){return t?Promise.resolve(t):r}function a(e){if(!e)throw Error(`Database not initialized`);t=e,n&&=(n(e),null)}function o(){t=null}function s(e,t){return{get(n){let r;if(t===`config`)r=e.prepare(`SELECT key, value FROM config WHERE key = ?`).get(n)??void 0;else if(t===`tasks`){let t=e.prepare(`SELECT * FROM tasks WHERE id = ?`).get(n);t&&(r={...t,enabled:!!t.enabled,tools:t.tools?JSON.parse(t.tools):void 0})}else r=t===`messages`?e.prepare(`SELECT * FROM messages WHERE id = ?`).get(n)??void 0:e.prepare(`SELECT * FROM ${t} WHERE id = ?`).get(n)??void 0;return{result:r,onsuccess:null,onerror:null}},getAll(){let n;return n=t===`config`?e.prepare(`SELECT key, value FROM config ORDER BY key`).all()??[]:t===`tasks`?(e.prepare(`SELECT * FROM tasks ORDER BY createdAt DESC`).all()??[]).map(e=>({...e,enabled:!!e.enabled,tools:e.tools?JSON.parse(e.tools):void 0})):e.prepare(`SELECT * FROM ${t}`).all()??[],{result:n,onsuccess:null,onerror:null}},put(n){if(t===`config`)e.prepare(`INSERT OR REPLACE INTO config (key, value) VALUES (?, ?)`).run(n.key,typeof n.value==`string`?n.value:JSON.stringify(n.value));else if(t===`tasks`)e.prepare(`INSERT OR REPLACE INTO tasks
2
+ (id, groupId, enabled, schedule, prompt, tools, lastRun, createdAt, type, freshContext, subagent, name, task_order)
3
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(n.id,n.groupId,+!!n.enabled,n.schedule??null,n.prompt??``,n.tools?JSON.stringify(n.tools):null,n.lastRun??null,n.createdAt,n.type??null,n.freshContext?1:null,n.subagent?1:null,n.name??null,n.order??null);else if(t===`messages`)e.prepare(`INSERT OR REPLACE INTO messages
4
+ (id, groupId, timestamp, content, sender, channel, isFromMe, isTrigger, attachments, a2uiAction, a2uiEnvelopes, freshContext, subagent)
5
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(n.id,n.groupId,n.timestamp,n.content,n.sender,n.channel??`chat`,+!!n.isFromMe,+!!n.isTrigger,n.attachments?JSON.stringify(n.attachments):null,n.a2uiAction?JSON.stringify(n.a2uiAction):null,n.a2uiEnvelopes?JSON.stringify(n.a2uiEnvelopes):null,n.freshContext?1:null,n.subagent?1:null);else{let r=Object.keys(n),i=r.map(()=>`?`).join(`, `),a=r.map(e=>{let t=n[e];return typeof t==`object`&&t?JSON.stringify(t):t});e.prepare(`INSERT OR REPLACE INTO ${t} (${r.join(`, `)}) VALUES (${i})`).run(...a)}return{result:void 0,onsuccess:null,onerror:null}},delete(n){return t===`config`?e.prepare(`DELETE FROM config WHERE key = ?`).run(n):t===`tasks`?e.prepare(`DELETE FROM tasks WHERE id = ?`).run(n):e.prepare(`DELETE FROM ${t} WHERE id = ?`).run(n),{result:void 0,onsuccess:null,onerror:null}}}}function c(e,t,n,r){return new Promise((n,i)=>{try{let i=r(s(e.db,t)),a=i.onsuccess;typeof a==`function`&&a(),n(i.result)}catch(e){i(e)}})}function l(t,n,r,i){return t?e(t)?c(t,n,r,i):new Promise((e,a)=>{try{let o=t.transaction(n,r);if(!o)return a(Error(`failed to get transaction`));let s=i(o.objectStore(n));s.onsuccess=()=>e(s.result),s.onerror=()=>a(s.error)}catch(e){a(e)}}):Promise.reject(Error(`failed to get database, cannot update task.`))}export{a as i,i as n,o as r,l as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./chunk-Cx8_qww-2.js";export{e as fetchDiscoveryManifest};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./chunk-qTCLBos1.js";import{t}from"./chunk-DorZAfZa.js";var n={"as-is|as-is|as-is":`You are a **Distinguished Senior Editor and Linguistic Specialist**. Your objective is to rewrite the user's 'TEXT' into a version that represents the pinnacle of clarity, flow, and stylistic appropriateness in the target language. You must strictly adhere to the following constraints.
1
+ import{t as e}from"./chunk-DKw-oTLT.js";import{t}from"./chunk-DorZAfZa.js";var n={"as-is|as-is|as-is":`You are a **Distinguished Senior Editor and Linguistic Specialist**. Your objective is to rewrite the user's 'TEXT' into a version that represents the pinnacle of clarity, flow, and stylistic appropriateness in the target language. You must strictly adhere to the following constraints.
2
2
 
3
3
  # UNIVERSAL LAWS (NON-NEGOTIABLE)
4
4
  1. **SEMANTIC & FACTUAL FIDELITY**: You must preserve the core meaning, facts, numbers, and logic of the original text.
@@ -0,0 +1 @@
1
+ import{s as e,t}from"./chunk-g3j2rSPJ.js";export{t as resolveAgentProvider,e as runAgentRun};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-nsFY_QXf.js";const t=`.well-known/agent-skills/index.json`;function n(e){let n=e.trim();if(!n)throw Error(`URL cannot be empty`);let r=n;if(!r.startsWith(`http://`)&&!r.startsWith(`https://`)&&(r=`https://${r}`),r=r.replace(/\/+$/,``),r.endsWith(t)){let e=r.slice(0,-35).replace(/\/+$/,``);return{baseUrl:e,siteUrl:e,manifestUrl:r}}return{baseUrl:r,siteUrl:r,manifestUrl:`${r}/${t}`}}function r(e,t){if(!e)return``;try{return new URL(e,t).href}catch{return e}}function i(e,t){let n=JSON.parse(JSON.stringify(e));return Array.isArray(n.tools)&&(n.tools=n.tools.map(e=>({...e,url:r(e.url,t)}))),Array.isArray(n.scripts)&&(n.scripts=n.scripts.map(e=>({...e,url:r(e.url,t)}))),Array.isArray(n.skills)&&(n.skills=n.skills.map(e=>({...e,url:r(e.url,t),tools:Array.isArray(e.tools)?e.tools.map(e=>({...e,url:e.url?r(e.url,t):void 0})):void 0,scripts:Array.isArray(e.scripts)?e.scripts.map(e=>({...e,url:e.url?r(e.url,t):void 0})):void 0}))),n}async function a(t,n){if(!n||!n.startsWith(`sha256:`))return!0;let r=n.slice(7).trim().toLowerCase();return!r||(await e(typeof t==`string`?new TextEncoder().encode(t):t)).toLowerCase()===r}async function o(e,t=globalThis.fetch){let{baseUrl:r,manifestUrl:a}=n(e),o=await t(a,{headers:{Accept:`application/json`}});if(!o.ok)throw Error(`Failed to fetch discovery manifest: HTTP ${o.status} ${o.statusText}`.trim());let s=await o.json();if(!s||typeof s!=`object`)throw Error(`Invalid discovery manifest: expected a JSON object`);return{manifest:i(s,a),siteUrl:r,manifestUrl:a}}export{a,i,n,r,o as t};
1
+ import{n as e}from"./chunk-Do2xLVwC.js";const t=`.well-known/agent-skills/index.json`;function n(e){let n=e.trim();if(!n)throw Error(`URL cannot be empty`);let r=n;if(!r.startsWith(`http://`)&&!r.startsWith(`https://`)&&(r=`https://${r}`),r=r.replace(/\/+$/,``),r.endsWith(t)){let e=r.slice(0,-35).replace(/\/+$/,``);return{baseUrl:e,siteUrl:e,manifestUrl:r}}return{baseUrl:r,siteUrl:r,manifestUrl:`${r}/${t}`}}function r(e,t){if(!e)return``;try{return new URL(e,t).href}catch{return e}}function i(e,t){let n=JSON.parse(JSON.stringify(e));return Array.isArray(n.tools)&&(n.tools=n.tools.map(e=>({...e,url:r(e.url,t)}))),Array.isArray(n.scripts)&&(n.scripts=n.scripts.map(e=>({...e,url:r(e.url,t)}))),Array.isArray(n.skills)&&(n.skills=n.skills.map(e=>({...e,url:r(e.url,t),tools:Array.isArray(e.tools)?e.tools.map(e=>({...e,url:e.url?r(e.url,t):void 0})):void 0,scripts:Array.isArray(e.scripts)?e.scripts.map(e=>({...e,url:e.url?r(e.url,t):void 0})):void 0}))),n}async function a(t,n){if(!n||!n.startsWith(`sha256:`))return!0;let r=n.slice(7).trim().toLowerCase();return!r||(await e(typeof t==`string`?new TextEncoder().encode(t):t)).toLowerCase()===r}async function o(e,t=globalThis.fetch){let{baseUrl:r,manifestUrl:a}=n(e),o=await t(a,{headers:{Accept:`application/json`}});if(!o.ok)throw Error(`Failed to fetch discovery manifest: HTTP ${o.status} ${o.statusText}`.trim());let s=await o.json();if(!s||typeof s!=`object`)throw Error(`Invalid discovery manifest: expected a JSON object`);return{manifest:i(s,a),siteUrl:r,manifestUrl:a}}export{a,i,n,r,o as t};
@@ -1 +1 @@
1
- var e=class{#e;#t;#n=!1;#r=new Set;#i=new AbortController;#a=null;constructor(e,t){this.#e=e,this.#t=t}static _validateLanguageTag(e){try{return Intl.getCanonicalLocales(e)[0]}catch{throw RangeError(`Invalid language tag: ${e}`)}}static _checkContext(){let e=this.__window||(typeof globalThis<`u`?globalThis:null),t=!1;try{(!e||e.closed||e.document&&e.document.defaultView!==e)&&(t=!0)}catch{t=!0}if(t){let t;try{t=e?.DOMException||globalThis.DOMException||Error}catch{t=globalThis.DOMException||Error}throw new t(`The execution context is not valid.`,`InvalidStateError`)}}_checkContext(){this.constructor._checkContext()}static baseAvailability(e={}){try{this._checkContext()}catch(e){let t=Promise.reject(e);return t.catch(()=>{}),t}let t=(async()=>{await this.ensureLanguageModel();let t={expectedInputs:[{type:`text`,languages:e.expectedInputLanguages||[`en`]}],expectedOutputs:[{type:`text`,languages:e.outputLanguage?[e.outputLanguage]:[`en`]}]};return await(this.__window||globalThis).LanguageModel.availability(t)})();return t.catch(()=>{}),t}static async ensureLanguageModel(){let e=this.__window||globalThis;e!==void 0&&!e.LanguageModel&&await import(`./chunk-D3NWfUvq2.js`)}static availability(e={}){let t=(async()=>{this._checkContext(),await this.ensureLanguageModel();let t={expectedInputs:[{type:`text`,languages:e.expectedInputLanguages||[`en`]}],expectedOutputs:[{type:`text`,languages:e.outputLanguage?[e.outputLanguage]:[`en`]}]};return await globalThis.LanguageModel.availability(t)})();return t.catch(()=>{}),t}_isNonTranslatable(e){return typeof e==`string`&&/^[\s\x00-\x1f]*$/.test(e)}_runTask(e,t={}){if(this._isNonTranslatable(e)){let t=Promise.resolve(e);return t.catch(()=>{}),t}let n=this._runTaskInternal(e,t);return n.catch(()=>{}),n}async _runTaskInternal(e,t={}){if(this._checkContext(),this.#n){let e=Promise.reject(this.#a||new DOMException(`The summarizer has been destroyed.`,`AbortError`));return e.catch(()=>{}),e}let{userPrompt:n}=this.#t.buildPrompt(e,t),r=AbortSignal.any([this.#i.signal,t.signal].filter(Boolean));if(r.aborted){let e=Promise.reject(r.reason||new DOMException(`Aborted`,`AbortError`));return e.catch(()=>{}),e}let i={...t,signal:r},a=await this.#e.clone(i);this.#r.add(a);try{return await new Promise((e,t)=>{let o=()=>{t(r.reason||new DOMException(`Aborted`,`AbortError`))};if(r.aborted){o();return}r.addEventListener(`abort`,o,{once:!0}),a.prompt(n,i).then(e).catch(t).finally(()=>{r.removeEventListener(`abort`,o)})})}finally{a.destroy(),this.#r.delete(a)}}_runTaskStreaming(e,t={}){if(this._checkContext(),this._isNonTranslatable(e))return new ReadableStream({start(t){t.enqueue(e),t.close()}});let{userPrompt:n}=this.#t.buildPrompt(e,t),r=this.#e,i=t.signal;if(i?.aborted)throw i.reason||new DOMException(`Aborted`,`AbortError`);let a=this,o=AbortSignal.any([this.#i.signal,t.signal].filter(Boolean));if(o.aborted)throw o.reason||new DOMException(`Aborted`,`AbortError`);return new ReadableStream({async start(e){if(a.#n){e.error(a.#a||new DOMException(`The summarizer has been destroyed.`,`AbortError`));return}let i,s,c=()=>{s&&=(s.cancel().catch(()=>{}),null),i&&=(i.destroy(),a.#r.delete(i),null)},l=()=>{i&&c();try{e.error(o.reason||new DOMException(`Aborted`,`AbortError`))}catch{}};o.addEventListener(`abort`,l,{once:!0});try{let c={...t,signal:o};if(i=await r.clone(c),a.#r.add(i),o.aborted){l();return}for(s=i.promptStreaming(n,c).getReader();;){let{done:t,value:n}=await s.read();if(t)break;e.enqueue(n)}e.close()}catch(t){e.error(t)}finally{o.removeEventListener(`abort`,l),c()}}})}measureInputUsage(e,t={}){if(this._checkContext(),this.#n){let e=Promise.reject(this.#a||new DOMException(`The summarizer has been destroyed.`,`AbortError`));return e.catch(()=>{}),e}let n=AbortSignal.any([this.#i.signal,t.signal].filter(Boolean));if(n.aborted){let e=Promise.reject(n.reason||new DOMException(`Aborted`,`AbortError`));return e.catch(()=>{}),e}let r=new Promise((t,r)=>{let i=()=>r(n.reason||new DOMException(`Aborted`,`AbortError`));n.addEventListener(`abort`,i,{once:!0}),this.#e.measureInputUsage(e).then(t).catch(r).finally(()=>{n.removeEventListener(`abort`,i)})});return r.catch(()=>{}),r}get inputQuota(){return this.#e.inputQuota}destroy(e){if(!this.#n){this.#n=!0,this.#a=e||new DOMException(`The summarizer has been destroyed.`,`AbortError`),this.#i.abort(this.#a);for(let e of this.#r)e.destroy();this.#r.clear(),this.#e.destroy()}}static exposeAPIGlobally(e,t,n){if(typeof globalThis>`u`||!globalThis.document)return;let r=!!globalThis[n],i=n=>{try{if(!n||n[e]&&n[e].__isPolyfill)return;if(!(e in n)||r){let r={[e]:class extends t{}}[e];r.prototype[Symbol.toStringTag]=e,r.__window=n,r.__isPolyfill=!0,typeof r.create==`function`&&(r.create=r.create.bind(r)),typeof r.availability==`function`&&(r.availability=r.availability.bind(r)),Object.defineProperty(n,e,{value:r,writable:!0,configurable:!0,enumerable:!1}),n.DOMException&&(n.QuotaExceededError=n.DOMException)}}catch{}};if(i(globalThis),typeof HTMLIFrameElement<`u`)try{let e=Object.getOwnPropertyDescriptor(HTMLIFrameElement.prototype,`contentWindow`);e&&e.get&&Object.defineProperty(HTMLIFrameElement.prototype,"contentWindow",{get(){let t=e.get.call(this);return t&&i(t),t},configurable:!0})}catch{}let a=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e.tagName===`IFRAME`&&(i(e.contentWindow),e.addEventListener(`load`,()=>i(e.contentWindow),{once:!1}))});globalThis.document?.documentElement&&(a.observe(globalThis.document.documentElement,{childList:!0,subtree:!0}),globalThis.document.querySelectorAll(`iframe`).forEach(e=>{i(e.contentWindow),e.addEventListener(`load`,()=>i(e.contentWindow),{once:!1})})),globalThis[e]&&globalThis[e].__isPolyfill&&console.log(`Polyfill: window.${e} is now backed by the ${e} API polyfill.`)}};export{e as t};
1
+ var e=class{#e;#t;#n=!1;#r=new Set;#i=new AbortController;#a=null;constructor(e,t){this.#e=e,this.#t=t}static _validateLanguageTag(e){try{return Intl.getCanonicalLocales(e)[0]}catch{throw RangeError(`Invalid language tag: ${e}`)}}static _checkContext(){let e=this.__window||(typeof globalThis<`u`?globalThis:null),t=!1;try{(!e||e.closed||e.document&&e.document.defaultView!==e)&&(t=!0)}catch{t=!0}if(t){let t;try{t=e?.DOMException||globalThis.DOMException||Error}catch{t=globalThis.DOMException||Error}throw new t(`The execution context is not valid.`,`InvalidStateError`)}}_checkContext(){this.constructor._checkContext()}static baseAvailability(e={}){try{this._checkContext()}catch(e){let t=Promise.reject(e);return t.catch(()=>{}),t}let t=(async()=>{await this.ensureLanguageModel();let t={expectedInputs:[{type:`text`,languages:e.expectedInputLanguages||[`en`]}],expectedOutputs:[{type:`text`,languages:e.outputLanguage?[e.outputLanguage]:[`en`]}]};return await(this.__window||globalThis).LanguageModel.availability(t)})();return t.catch(()=>{}),t}static async ensureLanguageModel(){let e=this.__window||globalThis;e!==void 0&&!e.LanguageModel&&await import(`./chunk-CJpZQ6NS2.js`)}static availability(e={}){let t=(async()=>{this._checkContext(),await this.ensureLanguageModel();let t={expectedInputs:[{type:`text`,languages:e.expectedInputLanguages||[`en`]}],expectedOutputs:[{type:`text`,languages:e.outputLanguage?[e.outputLanguage]:[`en`]}]};return await globalThis.LanguageModel.availability(t)})();return t.catch(()=>{}),t}_isNonTranslatable(e){return typeof e==`string`&&/^[\s\x00-\x1f]*$/.test(e)}_runTask(e,t={}){if(this._isNonTranslatable(e)){let t=Promise.resolve(e);return t.catch(()=>{}),t}let n=this._runTaskInternal(e,t);return n.catch(()=>{}),n}async _runTaskInternal(e,t={}){if(this._checkContext(),this.#n){let e=Promise.reject(this.#a||new DOMException(`The summarizer has been destroyed.`,`AbortError`));return e.catch(()=>{}),e}let{userPrompt:n}=this.#t.buildPrompt(e,t),r=AbortSignal.any([this.#i.signal,t.signal].filter(Boolean));if(r.aborted){let e=Promise.reject(r.reason||new DOMException(`Aborted`,`AbortError`));return e.catch(()=>{}),e}let i={...t,signal:r},a=await this.#e.clone(i);this.#r.add(a);try{return await new Promise((e,t)=>{let o=()=>{t(r.reason||new DOMException(`Aborted`,`AbortError`))};if(r.aborted){o();return}r.addEventListener(`abort`,o,{once:!0}),a.prompt(n,i).then(e).catch(t).finally(()=>{r.removeEventListener(`abort`,o)})})}finally{a.destroy(),this.#r.delete(a)}}_runTaskStreaming(e,t={}){if(this._checkContext(),this._isNonTranslatable(e))return new ReadableStream({start(t){t.enqueue(e),t.close()}});let{userPrompt:n}=this.#t.buildPrompt(e,t),r=this.#e,i=t.signal;if(i?.aborted)throw i.reason||new DOMException(`Aborted`,`AbortError`);let a=this,o=AbortSignal.any([this.#i.signal,t.signal].filter(Boolean));if(o.aborted)throw o.reason||new DOMException(`Aborted`,`AbortError`);return new ReadableStream({async start(e){if(a.#n){e.error(a.#a||new DOMException(`The summarizer has been destroyed.`,`AbortError`));return}let i,s,c=()=>{s&&=(s.cancel().catch(()=>{}),null),i&&=(i.destroy(),a.#r.delete(i),null)},l=()=>{i&&c();try{e.error(o.reason||new DOMException(`Aborted`,`AbortError`))}catch{}};o.addEventListener(`abort`,l,{once:!0});try{let c={...t,signal:o};if(i=await r.clone(c),a.#r.add(i),o.aborted){l();return}for(s=i.promptStreaming(n,c).getReader();;){let{done:t,value:n}=await s.read();if(t)break;e.enqueue(n)}e.close()}catch(t){e.error(t)}finally{o.removeEventListener(`abort`,l),c()}}})}measureInputUsage(e,t={}){if(this._checkContext(),this.#n){let e=Promise.reject(this.#a||new DOMException(`The summarizer has been destroyed.`,`AbortError`));return e.catch(()=>{}),e}let n=AbortSignal.any([this.#i.signal,t.signal].filter(Boolean));if(n.aborted){let e=Promise.reject(n.reason||new DOMException(`Aborted`,`AbortError`));return e.catch(()=>{}),e}let r=new Promise((t,r)=>{let i=()=>r(n.reason||new DOMException(`Aborted`,`AbortError`));n.addEventListener(`abort`,i,{once:!0}),this.#e.measureInputUsage(e).then(t).catch(r).finally(()=>{n.removeEventListener(`abort`,i)})});return r.catch(()=>{}),r}get inputQuota(){return this.#e.inputQuota}destroy(e){if(!this.#n){this.#n=!0,this.#a=e||new DOMException(`The summarizer has been destroyed.`,`AbortError`),this.#i.abort(this.#a);for(let e of this.#r)e.destroy();this.#r.clear(),this.#e.destroy()}}static exposeAPIGlobally(e,t,n){if(typeof globalThis>`u`||!globalThis.document)return;let r=!!globalThis[n],i=n=>{try{if(!n||n[e]&&n[e].__isPolyfill)return;if(!(e in n)||r){let r={[e]:class extends t{}}[e];r.prototype[Symbol.toStringTag]=e,r.__window=n,r.__isPolyfill=!0,typeof r.create==`function`&&(r.create=r.create.bind(r)),typeof r.availability==`function`&&(r.availability=r.availability.bind(r)),Object.defineProperty(n,e,{value:r,writable:!0,configurable:!0,enumerable:!1}),n.DOMException&&(n.QuotaExceededError=n.DOMException)}}catch{}};if(i(globalThis),typeof HTMLIFrameElement<`u`)try{let e=Object.getOwnPropertyDescriptor(HTMLIFrameElement.prototype,`contentWindow`);e&&e.get&&Object.defineProperty(HTMLIFrameElement.prototype,"contentWindow",{get(){let t=e.get.call(this);return t&&i(t),t},configurable:!0})}catch{}let a=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e.tagName===`IFRAME`&&(i(e.contentWindow),e.addEventListener(`load`,()=>i(e.contentWindow),{once:!1}))});globalThis.document?.documentElement&&(a.observe(globalThis.document.documentElement,{childList:!0,subtree:!0}),globalThis.document.querySelectorAll(`iframe`).forEach(e=>{i(e.contentWindow),e.addEventListener(`load`,()=>i(e.contentWindow),{once:!1})})),globalThis[e]&&globalThis[e].__isPolyfill&&console.log(`Polyfill: window.${e} is now backed by the ${e} API polyfill.`)}};export{e as t};
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-8V8biNmG.js";import{t}from"./chunk-BoFC86Qh.js";import{a as n,c as r,i,l as a,n as o,r as s,s as c,t as l}from"./chunk-CWs_KY8q.js";import{o as u,r as d}from"./chunk-Jiq-cxA5.js";import{t as f}from"./chunk-DFLqhyP_.js";import{t as p}from"./chunk-Dhh0lHO6.js";import{t as m}from"./chunk-FEL5dv0w2.js";import{a as h}from"./chunk-DcYfXgpg2.js";function g(e,t,n){return f(e,`config`,`readwrite`,e=>e.put({key:t,value:n})).then(()=>void 0)}async function _(e,t,n){let r=await i(e,t),{dirs:a,filename:o}=s(n),c=r;for(let e of a)c=await c.getDirectoryHandle(e);let l=await c.getFileHandle(o);try{let e=await l.createSyncAccessHandle(),t=e.getSize(),n=new Uint8Array(t);return e.read(n,{at:0}),e.close(),new TextDecoder(`utf-8`).decode(n)}catch{return(await l.getFile()).text()}}const v=/^[a-z][a-z0-9_]{0,63}$/;function y(e,t){if(!t||typeof t!=`object`)throw Error(`Tool at ${e} must be a JSON object`);let n=t,r=typeof n.name==`string`?n.name.trim():``,i=typeof n.description==`string`?n.description.trim():``,a=n.input_schema??n.parameters,o=n.execution??n.evaluation;if(!v.test(r))throw Error(`Tool name is invalid: ${r||`(missing)`}`);if(!i)throw Error(`Tool ${r} requires a description`);if(!a||typeof a!=`object`)throw Error(`Tool ${r} requires input_schema`);if(!o||typeof o!=`object`)throw Error(`Tool ${r} requires execution`);let s=o,c=s.type;if(c!==`bash`&&c!==`javascript`&&c!==`tool`)throw Error(`Tool ${r} execution type must be bash, javascript, or tool`);if(c===`tool`){if(typeof s.name!=`string`||!v.test(s.name))throw Error(`Tool ${r} execution requires a valid tool name`);return{name:r,description:i,input_schema:a,execution:{type:c,name:s.name,...s.input&&typeof s.input==`object`?{input:s.input}:{}},path:e}}let l=c===`bash`?`command`:`code`,u=s[l]??s.expression;if(typeof u!=`string`||u.trim()===``)throw Error(`Tool ${r} execution requires ${l}`);return{name:r,description:i,input_schema:a,execution:{type:c,[l]:u},path:e}}async function b(e,t=u){let n=[],r=[],a=t===`br:main`?[u]:[t,u];for(let t of a)try{let a=await i(e,t),o=[];async function s(e,t){for await(let[n,r]of e.entries()){let e=`${t}/${n}`;r.kind===`directory`?await s(r,e):n.endsWith(`.json`)&&e.startsWith(`.agents/tools/`)&&o.push(e)}}try{await s(await(await a.getDirectoryHandle(`.agents`)).getDirectoryHandle(`tools`),`.agents/tools`)}catch{continue}for(let i of o.sort())try{let r=y(i,JSON.parse(await _(e,t,i)));n.some(e=>e.name===r.name)||n.push(r)}catch(e){r.push(e instanceof Error?e.message:String(e))}}catch{}return{tools:n,diagnostics:r}}async function x(e,t=u,n){try{let{tools:r}=await b(e,t),i=r.find(e=>e.name===n)||null;if(!i)return null;let a=await p(e,d.DECLARATIVE_TOOLS_ENABLED);return Array.isArray(a)&&!a.includes(n)?null:i}catch{return null}}async function S(e,t,u,d){let{dirs:f,filename:p}=s(u);for(let s=0;s<2;s++)try{let r=await i(e,t);for(let e of f)r=await r.getDirectoryHandle(e,{create:!0});let a=await r.getFileHandle(p,{create:!0});try{await l(a,d);return}catch(t){if(!((t instanceof Error?t.message:String(t)).includes(`Writable file streams are not supported`)&&(await c(e)).type===`opfs`))throw t}let s=t.replace(/:/g,`-`);await o([n(),`groups`,s,...f,p],d);return}catch(e){if(s===0&&a(e)){r();continue}throw e}}async function C(e,t,n){try{return await _(e,t,n),!0}catch{return!1}}var w=e(t(),1);const T=/^[a-z0-9](?:[a-z0-9]|-(?!-))*[a-z0-9]$|^[a-z0-9]$/;function E(e){try{let t=(0,w.default)(e);return{data:t.data&&typeof t.data==`object`?t.data:{},content:t.content||``}}catch{let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(t){let e=t[1],n=t[2]||``,r=e.split(/\r?\n/).map(e=>{let t=e.match(/^([a-zA-Z0-9_-]+):\s*(.+)$/);if(t){let[,e,n]=t,r=n.trim();if(r&&r!==`true`&&r!==`false`&&r!==`null`&&!r.startsWith(`"`)&&!r.startsWith(`'`)&&!r.startsWith(`[`)&&!r.startsWith(`{`)&&r!==`>`&&r!==`|`&&r!==`>-`&&r!==`|-`&&!/^-?\d+(?:\.\d+)?$/.test(r))return`${e}: ${JSON.stringify(r)}`}return e});try{let e=(0,w.default)(`---\n${r.join(`
1
+ import{a as e}from"./chunk-8V8biNmG.js";import{t}from"./chunk-BoFC86Qh.js";import{a as n,c as r,i,l as a,n as o,r as s,s as c,t as l}from"./chunk-DSleWP3c.js";import{o as u,r as d}from"./chunk-Jiq-cxA5.js";import{t as f}from"./chunk-D0jQVYRk.js";import{t as p}from"./chunk-CKksk-lA.js";import{t as m}from"./chunk-FEL5dv0w2.js";import{a as h}from"./chunk-Cx8_qww-2.js";function g(e,t,n){return f(e,`config`,`readwrite`,e=>e.put({key:t,value:n})).then(()=>void 0)}async function _(e,t,n){let r=await i(e,t),{dirs:a,filename:o}=s(n),c=r;for(let e of a)c=await c.getDirectoryHandle(e);let l=await c.getFileHandle(o);try{let e=await l.createSyncAccessHandle(),t=e.getSize(),n=new Uint8Array(t);return e.read(n,{at:0}),e.close(),new TextDecoder(`utf-8`).decode(n)}catch{return(await l.getFile()).text()}}const v=/^[a-z][a-z0-9_]{0,63}$/;function y(e,t){if(!t||typeof t!=`object`)throw Error(`Tool at ${e} must be a JSON object`);let n=t,r=typeof n.name==`string`?n.name.trim():``,i=typeof n.description==`string`?n.description.trim():``,a=n.input_schema??n.parameters,o=n.execution??n.evaluation;if(!v.test(r))throw Error(`Tool name is invalid: ${r||`(missing)`}`);if(!i)throw Error(`Tool ${r} requires a description`);if(!a||typeof a!=`object`)throw Error(`Tool ${r} requires input_schema`);if(!o||typeof o!=`object`)throw Error(`Tool ${r} requires execution`);let s=o,c=s.type;if(c!==`bash`&&c!==`javascript`&&c!==`tool`)throw Error(`Tool ${r} execution type must be bash, javascript, or tool`);if(c===`tool`){if(typeof s.name!=`string`||!v.test(s.name))throw Error(`Tool ${r} execution requires a valid tool name`);return{name:r,description:i,input_schema:a,execution:{type:c,name:s.name,...s.input&&typeof s.input==`object`?{input:s.input}:{}},path:e}}let l=c===`bash`?`command`:`code`,u=s[l]??s.expression;if(typeof u!=`string`||u.trim()===``)throw Error(`Tool ${r} execution requires ${l}`);return{name:r,description:i,input_schema:a,execution:{type:c,[l]:u},path:e}}async function b(e,t=u){let n=[],r=[],a=t===`br:main`?[u]:[t,u];for(let t of a)try{let a=await i(e,t),o=[];async function s(e,t){for await(let[n,r]of e.entries()){let e=`${t}/${n}`;r.kind===`directory`?await s(r,e):n.endsWith(`.json`)&&e.startsWith(`.agents/tools/`)&&o.push(e)}}try{await s(await(await a.getDirectoryHandle(`.agents`)).getDirectoryHandle(`tools`),`.agents/tools`)}catch{continue}for(let i of o.sort())try{let r=y(i,JSON.parse(await _(e,t,i)));n.some(e=>e.name===r.name)||n.push(r)}catch(e){r.push(e instanceof Error?e.message:String(e))}}catch{}return{tools:n,diagnostics:r}}async function x(e,t=u,n){try{let{tools:r}=await b(e,t),i=r.find(e=>e.name===n)||null;if(!i)return null;let a=await p(e,d.DECLARATIVE_TOOLS_ENABLED);return Array.isArray(a)&&!a.includes(n)?null:i}catch{return null}}async function S(e,t,u,d){let{dirs:f,filename:p}=s(u);for(let s=0;s<2;s++)try{let r=await i(e,t);for(let e of f)r=await r.getDirectoryHandle(e,{create:!0});let a=await r.getFileHandle(p,{create:!0});try{await l(a,d);return}catch(t){if(!((t instanceof Error?t.message:String(t)).includes(`Writable file streams are not supported`)&&(await c(e)).type===`opfs`))throw t}let s=t.replace(/:/g,`-`);await o([n(),`groups`,s,...f,p],d);return}catch(e){if(s===0&&a(e)){r();continue}throw e}}async function C(e,t,n){try{return await _(e,t,n),!0}catch{return!1}}var w=e(t(),1);const T=/^[a-z0-9](?:[a-z0-9]|-(?!-))*[a-z0-9]$|^[a-z0-9]$/;function E(e){try{let t=(0,w.default)(e);return{data:t.data&&typeof t.data==`object`?t.data:{},content:t.content||``}}catch{let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(t){let e=t[1],n=t[2]||``,r=e.split(/\r?\n/).map(e=>{let t=e.match(/^([a-zA-Z0-9_-]+):\s*(.+)$/);if(t){let[,e,n]=t,r=n.trim();if(r&&r!==`true`&&r!==`false`&&r!==`null`&&!r.startsWith(`"`)&&!r.startsWith(`'`)&&!r.startsWith(`[`)&&!r.startsWith(`{`)&&r!==`>`&&r!==`|`&&r!==`>-`&&r!==`|-`&&!/^-?\d+(?:\.\d+)?$/.test(r))return`${e}: ${JSON.stringify(r)}`}return e});try{let e=(0,w.default)(`---\n${r.join(`
2
2
  `)}\n---\n${n}`);return{data:e.data&&typeof e.data==`object`?e.data:{},content:e.content||``}}catch{}let i={},a=e.match(/^name:\s*["']?([^"'\r\n]+)["']?/m);a&&(i.name=a[1].trim());let o=e.match(/^description:\s*(.+)$/m);if(o){let e=o[1].trim();(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))&&(e=e.slice(1,-1)),i.description=e}let s=e.match(/^user-invocable:\s*(true|false)/im);s&&(i[`user-invocable`]=s[1].toLowerCase()===`true`);let c=e.match(/^disable-model-invocation:\s*(true|false)/im);c&&(i[`disable-model-invocation`]=c[1].toLowerCase()===`true`);let l=e.match(/^allowed-tools:\s*["']?([^"'\r\n]+)["']?/m);l&&(i[`allowed-tools`]=l[1].trim());let u=e.match(/allowed-tools:\s*\n((?:\s*-\s*[^\r\n]+\r?\n?)+)/m);if(u){let e=u[1].split(/\r?\n/).map(e=>e.replace(/^\s*-\s*/,``).trim()).filter(Boolean);e.length>0&&(i[`allowed-tools`]=e)}return{data:i,content:n}}return{data:{},content:e}}}function D(e){if(typeof e==`string`){let t=e.trim();return t.length>0?t:void 0}if(Array.isArray(e)){let t=e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(e=>e.length>0);return t.length>0?t.join(` `):void 0}}function O(e,t){let n=E(t),r=n.data,i=typeof r.name==`string`?r.name.trim():``,a=typeof r.description==`string`?r.description.trim():``;if(!i)throw Error(`Skill at ${e} requires a name`);if(!a)throw Error(`Skill ${i} requires a description`);if(i.length>64||!T.test(i))throw Error(`Skill name must be 1-64 lowercase characters and hyphens: ${i}`);if(a.length>1024)throw Error(`Skill ${i} description must be 1024 characters or fewer`);let o=e.replace(/\/SKILL\.md$/u,``),s=r.metadata&&typeof r.metadata==`object`?r.metadata:void 0,c=D(s?.[`allowed-tools`])||D(s?.allowedTools)||D(r[`allowed-tools`])||D(r.allowedTools),l=[];if(s){for(let[e,t]of Object.entries(s))if(!(e===`execution`||t==null)){if(e===`allowed-tools`||e===`allowedTools`)c&&l.push([e,c]);else if(typeof t==`string`||typeof t==`number`||typeof t==`boolean`)l.push([e,String(t)]);else if(Array.isArray(t)){let n=t.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(Boolean);n.length>0&&l.push([e,n.join(` `)])}}}let u=l.length>0?Object.fromEntries(l):void 0,d=s?.execution,f;if(d!==void 0){if(!d||typeof d!=`object`||d.type!==`tools`||!Array.isArray(d.tools))throw Error(`Skill ${i} has invalid tools execution`);let e=d,t=typeof e.suppressToast==`boolean`?e.suppressToast:void 0,n=typeof e.suppressOutput==`boolean`?e.suppressOutput:void 0,r=e.tools.map(e=>({...e,...t!==void 0&&e.suppressToast===void 0?{suppressToast:t}:{},...n!==void 0&&e.suppressOutput===void 0?{suppressOutput:n}:{}}));f={type:`tools`,...t===void 0?{}:{suppressToast:t},...n===void 0?{}:{suppressOutput:n},tools:r}}return{name:i,description:a,...typeof r.license==`string`?{license:r.license}:{},...typeof r.compatibility==`string`?{compatibility:r.compatibility}:{},...u?{metadata:u}:{},...typeof c==`string`?{allowedTools:c}:{},...typeof r[`user-invocable`]==`boolean`?{userInvocable:r[`user-invocable`]}:typeof r[`user-invocable`]==`string`&&(r[`user-invocable`].toLowerCase()===`true`||r[`user-invocable`].toLowerCase()===`false`)?{userInvocable:r[`user-invocable`].toLowerCase()===`true`}:{},...typeof r[`disable-model-invocation`]==`boolean`?{disableModelInvocation:r[`disable-model-invocation`]}:typeof r[`disable-model-invocation`]==`string`&&(r[`disable-model-invocation`].toLowerCase()===`true`||r[`disable-model-invocation`].toLowerCase()===`false`)?{disableModelInvocation:r[`disable-model-invocation`].toLowerCase()===`true`}:{},...f?{execution:f}:{},body:n.content.trim(),path:e,basePath:o}}const k=new Set(m.map(e=>e.name)),A=/^[a-z][a-z0-9_]{0,63}$/;function j(e){return e?.targetSubdir?e.targetSubdir:e?.siteSlug?`imported/${e.siteSlug}`:`main`}async function M(e,t=u,n,r){let i=(n.name||``).trim();if(k.has(i))return{name:i,path:``,status:`failed`,error:`Cannot shadow built-in tool: ${i}`};if(!A.test(i))return{name:i,path:``,status:`failed`,error:`Invalid tool name: ${i}`};let a=`.agents/tools/${j(r)}/${i}.json`;try{if(await C(e,t,a)&&!r?.overwrite)return{name:i,path:a,status:`skipped`};let o=await(r?.fetchFn||globalThis.fetch)(n.url);if(!o.ok)return{name:i,path:a,status:`failed`,error:`HTTP ${o.status} ${o.statusText}`};let s=await o.text();if(n.digest&&!await h(s,n.digest))return{name:i,path:a,status:`failed`,error:`Integrity verification failed for tool definition`};let c;try{c=JSON.parse(s)}catch{return{name:i,path:a,status:`failed`,error:`Downloaded tool definition is not valid JSON`}}if(y(a,c),await S(e,t,a,JSON.stringify(c,null,2)),r?.autoEnable){let t=await p(e,d.DECLARATIVE_TOOLS_ENABLED),n=new Set(Array.isArray(t)?t:[]);n.add(i),await g(e,d.DECLARATIVE_TOOLS_ENABLED,Array.from(n))}return{name:i,path:a,status:`imported`}}catch(e){return{name:i,path:a,status:`failed`,error:e instanceof Error?e.message:String(e)}}}async function N(e,t=u,n,r){let i=(n.name||``).trim(),a=`.agents/scripts/${j(r)}/${i.endsWith(`.js`)||i.endsWith(`.mjs`)?i:`${i}.js`}`;try{if(await C(e,t,a)&&!r?.overwrite)return{name:i,path:a,status:`skipped`};let o=await(r?.fetchFn||globalThis.fetch)(n.url);if(!o.ok)return{name:i,path:a,status:`failed`,error:`HTTP ${o.status} ${o.statusText}`};let s=await o.text();return n.digest&&!await h(s,n.digest)?{name:i,path:a,status:`failed`,error:`Integrity verification failed for script`}:(await S(e,t,a,s),{name:i,path:a,status:`imported`})}catch(e){return{name:i,path:a,status:`failed`,error:e instanceof Error?e.message:String(e)}}}async function P(e,t=u,n,r){let i=(n.name||``).trim(),a=`.agents/skills/${j(r)}/${i}/SKILL.md`;try{if(await C(e,t,a)&&!r?.overwrite)return{name:i,path:a,status:`skipped`};let o=await(r?.fetchFn||globalThis.fetch)(n.url);if(!o.ok)return{name:i,path:a,status:`failed`,error:`HTTP ${o.status} ${o.statusText}`};let s=await o.text();return n.digest&&!await h(s,n.digest)?{name:i,path:a,status:`failed`,error:`Integrity verification failed for skill`}:(O(a,s),await S(e,t,a,s),{name:i,path:a,status:`imported`})}catch(e){return{name:i,path:a,status:`failed`,error:e instanceof Error?e.message:String(e)}}}async function F(e,t=u,n,r,i){let a={tools:[],skills:[],scripts:[],diagnostics:[]},o=new Set(r.toolNames||[]),s=new Set(r.skillNames||[]),c=new Set(r.scriptNames||[]),l=n.tools||[],d=n.skills||[],f=n.scripts||[];for(let e of d)if(s.has(e.name)){if(Array.isArray(e.tools))for(let t of e.tools)o.add(t.name);if(Array.isArray(e.scripts))for(let t of e.scripts)c.add(t.name)}for(let n of f)if(c.has(n.name)){let r=await N(e,t,n,i);a.scripts.push(r),r.status===`failed`&&r.error&&a.diagnostics.push(`Script ${n.name}: ${r.error}`)}for(let n of l)if(o.has(n.name)){let r=await M(e,t,n,i);a.tools.push(r),r.status===`failed`&&r.error&&a.diagnostics.push(`Tool ${n.name}: ${r.error}`)}for(let n of d)if(s.has(n.name)){let r=await P(e,t,n,i);a.skills.push(r),r.status===`failed`&&r.error&&a.diagnostics.push(`Skill ${n.name}: ${r.error}`)}return a}export{O as a,x as c,g as d,M as i,b as l,N as n,C as o,P as r,S as s,F as t,_ as u};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./chunk-qTCLBos1.js";import{t}from"./chunk-DorZAfZa.js";var n={"formal|plain-text|short":`You are a direct-instruction text generation AI. Your SOLE PURPOSE is to generate text that precisely fulfills the user's 'INSTRUCTIONS' and adheres to all specified parameters. Your task is to PERFORM the request to CREATE text, not to talk about it, summarize it, or repeat it. You must synthesize the information provided to create a new, original response.
1
+ import{t as e}from"./chunk-DKw-oTLT.js";import{t}from"./chunk-DorZAfZa.js";var n={"formal|plain-text|short":`You are a direct-instruction text generation AI. Your SOLE PURPOSE is to generate text that precisely fulfills the user's 'INSTRUCTIONS' and adheres to all specified parameters. Your task is to PERFORM the request to CREATE text, not to talk about it, summarize it, or repeat it. You must synthesize the information provided to create a new, original response.
2
2
 
3
3
  ---
4
4
  **CRITICAL RULES (NON-NEGOTIABLE - YOU MUST FOLLOW THESE PERFECTLY):**
@@ -1,2 +1,2 @@
1
- import{r as e}from"./chunk-BQCWtrzh.js";import{T as t,h as n,r}from"./chunk-Jiq-cxA5.js";import"./chunk-DFLqhyP_.js";import{t as i}from"./chunk-Dhh0lHO6.js";import{a}from"./chunk-BK1G-2UN.js";import{t as o}from"./chunk-nsFY_QXf.js";async function s(e,...t){let n=e;for(let e of t){let t=await n.getDirectoryHandle(e,{create:!0});if(typeof n.isSameEntry==`function`&&await n.isSameEntry(t))throw Error(`Directory navigation failed: "${e}" resolved to the same directory as its parent. The stored directory handle may be stale — try re-selecting the storage folder.`);n=t}return n}let c=null;async function l(e,t){try{return await e.entries().next(),`granted`}catch{return t}}function u(){let e=t();return e?`${n}-${e}`:n}async function d(){try{if(typeof navigator<`u`&&navigator.storage&&typeof navigator.storage.getDirectory==`function`){let e=await navigator.storage.getDirectory(),t=u();return await e.getDirectoryHandle(t,{create:!0})}}catch(e){console.warn(`OPFS is unavailable (e.g. Firefox Private Browsing). Using in-memory storage fallback:`,e)}return a()}function f(e){if(!e||typeof e!=`object`)return!1;let t=globalThis.FileSystemDirectoryHandle;return t!==void 0&&e instanceof t||typeof e.getDirectoryHandle==`function`&&typeof e.getFileHandle==`function`}async function p(e){if(c)return c;try{let t=await i(e,r.STORAGE_HANDLE);if(f(t)){let e=t;if(typeof e.queryPermission==`function`&&await e.queryPermission({mode:`readwrite`})!==`granted`&&typeof e.requestPermission==`function`)try{await e.requestPermission({mode:`readwrite`})}catch{}return e}}catch(e){console.warn(`Failed to retrieve local storage handle from DB:`,e)}return d()}function m(e){c=e}function h(){c=null}function g(e){return e instanceof DOMException&&e.name===`InvalidStateError`}async function _(e){if(c)try{let e=await c.queryPermission({mode:`readwrite`});return{type:`local`,permission:e===`granted`?`granted`:await l(c,e),name:c.name}}catch{console.warn(`Getting storage status failed for explicit storage root.`)}try{let t=await i(e,r.STORAGE_HANDLE);if(f(t)){let e=t,n=await e.queryPermission({mode:`readwrite`});return{type:`local`,permission:n===`granted`?`granted`:await l(e,n),name:e.name}}}catch(e){console.warn(`Failed to check storage status:`,e)}return{type:`opfs`,permission:`granted`,name:`OPFS`}}async function v(t,n){let r=await p(t);return e()?r:s(r,`groups`,n.replace(/:/g,`-`))}function y(e){let t=e.replace(/\\/g,`/`).replace(/^\/home\/user\//,`/`).replace(/^\/+/,``).split(`/`).filter(Boolean);if(t.length===0)throw Error(`Empty file path`);let n=t.pop();if(t.some(e=>e===`..`||e===`.`)||n===`..`||n===`.`){let t=Error(`SecurityError: Path traversal is not allowed: "${e}"`);throw t.name=`SecurityError`,t}return{dirs:t,filename:n||``}}async function b(e,t){let n=e?.createWritable,r=Reflect.get(e,`createWriteable`),i=typeof n==`function`?n.bind(e):typeof r==`function`?r.bind(e):null;if(i){let e=await i();await e.write(S(t)),await e.close();return}if(typeof e.createSyncAccessHandle==`function`){let n=await e.createSyncAccessHandle();try{let e=await C(t);n.truncate(0),n.write(e,{at:0}),typeof n.flush==`function`&&n.flush()}finally{n.close()}return}throw Error(`Writable file streams are not supported by this browser/storage backend.`)}async function x(e,t){if(typeof globalThis.Worker!=`function`)throw Error(`Writable file streams are not supported by this browser/storage backend.`);let n=await C(t);return new Promise((t,r)=>{let i=``,a=null;try{let e=[`self.onmessage = async (e) => {`,` try {`,` const { pathSegments, bytes } = e.data;`,` let dir = await navigator.storage.getDirectory();`,` for (let i = 0; i < pathSegments.length - 1; i++) {`,` dir = await dir.getDirectoryHandle(pathSegments[i], { create: true });`,` }`,` const filename = pathSegments[pathSegments.length - 1];`,` const fh = await dir.getFileHandle(filename, { create: true });`,` const h = await fh.createSyncAccessHandle();`,` try {`,` h.truncate(0);`,` h.write(bytes, { at: 0 });`,` if (typeof h.flush === 'function') h.flush();`,` } finally { h.close(); }`,` self.postMessage({ ok: true });`,` } catch (err) {`,` self.postMessage({ error: err.message || String(err) });`,` }`,`};`].join(`
1
+ import{r as e}from"./chunk-BQCWtrzh.js";import{T as t,h as n,r}from"./chunk-Jiq-cxA5.js";import"./chunk-D0jQVYRk.js";import{t as i}from"./chunk-CKksk-lA.js";import{a}from"./chunk-BK1G-2UN.js";import{t as o}from"./chunk-2IASlfOI.js";async function s(e,...t){let n=e;for(let e of t){let t=await n.getDirectoryHandle(e,{create:!0});if(typeof n.isSameEntry==`function`&&await n.isSameEntry(t))throw Error(`Directory navigation failed: "${e}" resolved to the same directory as its parent. The stored directory handle may be stale — try re-selecting the storage folder.`);n=t}return n}let c=null;async function l(e,t){try{return await e.entries().next(),`granted`}catch{return t}}function u(){let e=t();return e?`${n}-${e}`:n}async function d(){try{if(typeof navigator<`u`&&navigator.storage&&typeof navigator.storage.getDirectory==`function`){let e=await navigator.storage.getDirectory(),t=u();return await e.getDirectoryHandle(t,{create:!0})}}catch(e){console.warn(`OPFS is unavailable (e.g. Firefox Private Browsing). Using in-memory storage fallback:`,e)}return a()}function f(e){if(!e||typeof e!=`object`)return!1;let t=globalThis.FileSystemDirectoryHandle;return t!==void 0&&e instanceof t||typeof e.getDirectoryHandle==`function`&&typeof e.getFileHandle==`function`}async function p(e){if(c)return c;try{let t=await i(e,r.STORAGE_HANDLE);if(f(t)){let e=t;if(typeof e.queryPermission==`function`&&await e.queryPermission({mode:`readwrite`})!==`granted`&&typeof e.requestPermission==`function`)try{await e.requestPermission({mode:`readwrite`})}catch{}return e}}catch(e){console.warn(`Failed to retrieve local storage handle from DB:`,e)}return d()}function m(e){c=e}function h(){c=null}function g(e){return e instanceof DOMException&&e.name===`InvalidStateError`}async function _(e){if(c)try{let e=await c.queryPermission({mode:`readwrite`});return{type:`local`,permission:e===`granted`?`granted`:await l(c,e),name:c.name}}catch{console.warn(`Getting storage status failed for explicit storage root.`)}try{let t=await i(e,r.STORAGE_HANDLE);if(f(t)){let e=t,n=await e.queryPermission({mode:`readwrite`});return{type:`local`,permission:n===`granted`?`granted`:await l(e,n),name:e.name}}}catch(e){console.warn(`Failed to check storage status:`,e)}return{type:`opfs`,permission:`granted`,name:`OPFS`}}async function v(t,n){let r=await p(t);return e()?r:s(r,`groups`,n.replace(/:/g,`-`))}function y(e){let t=e.replace(/\\/g,`/`).replace(/^\/home\/user\//,`/`).replace(/^\/+/,``).split(`/`).filter(Boolean);if(t.length===0)throw Error(`Empty file path`);let n=t.pop();if(t.some(e=>e===`..`||e===`.`)||n===`..`||n===`.`){let t=Error(`SecurityError: Path traversal is not allowed: "${e}"`);throw t.name=`SecurityError`,t}return{dirs:t,filename:n||``}}async function b(e,t){let n=e?.createWritable,r=Reflect.get(e,`createWriteable`),i=typeof n==`function`?n.bind(e):typeof r==`function`?r.bind(e):null;if(i){let e=await i();await e.write(S(t)),await e.close();return}if(typeof e.createSyncAccessHandle==`function`){let n=await e.createSyncAccessHandle();try{let e=await C(t);n.truncate(0),n.write(e,{at:0}),typeof n.flush==`function`&&n.flush()}finally{n.close()}return}throw Error(`Writable file streams are not supported by this browser/storage backend.`)}async function x(e,t){if(typeof globalThis.Worker!=`function`)throw Error(`Writable file streams are not supported by this browser/storage backend.`);let n=await C(t);return new Promise((t,r)=>{let i=``,a=null;try{let e=[`self.onmessage = async (e) => {`,` try {`,` const { pathSegments, bytes } = e.data;`,` let dir = await navigator.storage.getDirectory();`,` for (let i = 0; i < pathSegments.length - 1; i++) {`,` dir = await dir.getDirectoryHandle(pathSegments[i], { create: true });`,` }`,` const filename = pathSegments[pathSegments.length - 1];`,` const fh = await dir.getFileHandle(filename, { create: true });`,` const h = await fh.createSyncAccessHandle();`,` try {`,` h.truncate(0);`,` h.write(bytes, { at: 0 });`,` if (typeof h.flush === 'function') h.flush();`,` } finally { h.close(); }`,` self.postMessage({ ok: true });`,` } catch (err) {`,` self.postMessage({ error: err.message || String(err) });`,` }`,`};`].join(`
2
2
  `);i=URL.createObjectURL(new Blob([e],{type:`text/javascript`})),a=new Worker(o(i))}catch{i&&URL.revokeObjectURL(i),r(Error(`Writable file streams are not supported by this browser/storage backend.`));return}let s=()=>{a&&a.terminate(),URL.revokeObjectURL(i)};a.onmessage=e=>{s(),e.data?.error?r(Error(e.data.error)):t()},a.onerror=e=>{s(),r(Error(e.message||`Worker file write failed`))},a.postMessage({pathSegments:e,bytes:n},[n.buffer])})}function S(e){if(typeof e==`string`||e instanceof Blob)return e;if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),new Blob([t])}return new Blob([e])}async function C(e){return e instanceof Uint8Array?e:typeof e==`string`?new TextEncoder().encode(e):e instanceof Blob?new Uint8Array(await e.arrayBuffer()):e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array}export{u as a,h as c,v as i,g as l,x as n,p as o,y as r,_ as s,b as t,m as u};
@@ -0,0 +1 @@
1
+ function e(e){return typeof e==`object`&&!!e&&e.__brand===`ShadowClawSqliteDatabase`}function t(e){return{__brand:`ShadowClawSqliteDatabase`,db:e}}export{t as n,e as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./chunk-DxIsgrAF.js";import{t}from"./chunk-DFh_pp_7.js";import{a as n,i as r,n as i,r as a,t as o}from"./chunk-BQCWtrzh.js";import{c as s,o as c,u as l}from"./chunk-CWs_KY8q.js";import{_ as u,b as d,g as f,l as p,r as m,s as h,y as g}from"./chunk-Jiq-cxA5.js";import{a as _,i as v,n as y,o as b,r as x}from"./chunk-DFLqhyP_.js";import{t as S}from"./chunk-Dhh0lHO6.js";import{t as C}from"./chunk-CbhVal4Q.js";import{A as w,B as T,C as ee,D as E,E as te,F as D,H as O,I as k,L as ne,M as A,N as j,O as re,P as M,R as N,S as ie,T as ae,U as oe,V as se,W as ce,_ as le,a as ue,b as P,c as de,d as fe,f as pe,g as F,h as I,i as me,j as he,k as ge,l as _e,m as ve,o as ye,p as be,s as xe,u as Se,v as Ce,w as we,x as Te,y as Ee,z as De}from"./chunk-CeFei3f_2.js";import{d as Oe,i as ke,l as Ae,n as je,r as Me,t as Ne}from"./chunk-BHnjkiBp2.js";import{t as Pe}from"./chunk-FEL5dv0w2.js";import{n as Fe,t as Ie}from"./chunk-DcYfXgpg2.js";import{createRequire as Le}from"node:module";import Re,{constants as ze,existsSync as Be}from"node:fs";import L from"node:path";import{fileURLToPath as Ve}from"node:url";import{env as He}from"node:process";import{exec as Ue,spawn as We}from"node:child_process";import{access as Ge,mkdir as Ke,readFile as qe,readdir as Je,rename as Ye,rm as Xe,rmdir as Ze,stat as R,unlink as z,writeFile as B}from"node:fs/promises";import V from"process";import{Buffer as H}from"buffer";import{EventEmitter as Qe}from"node:events";import{isIP as $e}from"node:net";import{runInNewContext as et}from"node:vm";import{DatabaseSync as tt}from"node:sqlite";var nt=class{kind=`file`;name;_path;constructor(e){this._path=e,this.name=L.basename(e)}async isSameEntry(e){return!e||typeof e!=`object`?!1:e.kind===this.kind&&e._path===this._path}async getFile(){let e=await qe(this._path);return{size:e.length,type:`application/octet-stream`,async text(){return e.toString(`utf8`)},async arrayBuffer(){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}}}async createWritable(){let e=[],t=this._path,n=async t=>{if(typeof t==`string`)e.push(H.from(t,`utf8`));else if(t instanceof Uint8Array)e.push(H.from(t));else if(t instanceof ArrayBuffer)e.push(H.from(t));else if(t instanceof Blob){if(typeof t.arrayBuffer==`function`){let n=await t.arrayBuffer();e.push(H.from(n))}else if(typeof t.bytes==`function`){let n=await t.bytes();e.push(H.from(n))}else if(typeof t.text==`function`){let n=await t.text();e.push(H.from(n,`utf8`))}else if(t._buffer)e.push(H.from(t._buffer));else if(typeof FileReader<`u`){let n=await new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(r.result),r.onerror=n,r.readAsArrayBuffer(t)});e.push(H.from(n))}}else t&&typeof t==`object`&&`data`in t?await n(t.data):e.push(H.from(new Uint8Array(t)))};return{write:n,async close(){let n=H.concat(e);await B(t,n)}}}},rt=class e{kind=`directory`;name;_path;_rootPath;constructor(e,t){this._path=L.resolve(e),this._rootPath=t?L.resolve(t):this._path,this.name=L.basename(this._path)||this._path}_resolveChild(e){if(!e||e===`.`||e.includes(`\0`)){let t=Error(`Invalid path name: "${e}"`);throw t.name=`TypeError`,t}let t=L.resolve(this._path,e),n=L.relative(this._path,t),r=L.relative(this._rootPath,t);if(n.startsWith(`..`)||L.isAbsolute(n)||r.startsWith(`..`)||L.isAbsolute(r)){let t=Error(`SecurityError: Path traversal outside workspace root is not allowed: "${e}"`);throw t.name=`SecurityError`,t}return t}async getDirectoryHandle(t,n){let r=this._resolveChild(t);if(n?.create)await Ke(r,{recursive:!0});else if(!Be(r)){let e=Error(`NotFoundError: ${r} does not exist`);throw e.name=`NotFoundError`,e}if(!(await R(r)).isDirectory()){let e=Error(`TypeMismatchError: "${t}" is a file, not a directory`);throw e.name=`TypeMismatchError`,e}return new e(r,this._rootPath)}async getFileHandle(e,t){let n=this._resolveChild(e);if(t?.create)Be(n)||await B(n,``);else if(!Be(n)){let e=Error(`NotFoundError: ${n} does not exist`);throw e.name=`NotFoundError`,e}if((await R(n)).isDirectory()){let t=Error(`TypeMismatchError: "${e}" is a directory, not a file`);throw t.name=`TypeMismatchError`,t}return new nt(n)}async*entries(){let t;try{t=await Je(this._path)}catch{return}for(let n of t){let t=L.join(this._path,n);try{(await R(t)).isDirectory()?yield[n,new e(t,this._rootPath)]:yield[n,new nt(t)]}catch{}}}async isSameEntry(e){return!e||typeof e!=`object`?!1:e.kind===this.kind&&e._path===this._path}async removeEntry(e,t){let n=this._resolveChild(e);if(!Be(n)){let e=Error(`NotFoundError: ${n} does not exist`);throw e.name=`NotFoundError`,e}if((await R(n)).isDirectory())if(t?.recursive)await Xe(n,{recursive:!0});else try{await Ze(n)}catch(t){if(t.code===`ENOTEMPTY`){let t=Error(`InvalidModificationError: directory is not empty: "${e}"`);throw t.name=`InvalidModificationError`,t}throw t}else await z(n)}};let it=null;function at(){return it}function ot(e){it=L.resolve(e),l(new rt(e))}globalThis.__setStorageRootFromPath=ot,globalThis.__getStorageRootPath=at;const st=({command:e,stdin:t,timeoutSec:n})=>new Promise(r=>{let i=at?.()??globalThis.__getStorageRootPath?.()??V.cwd(),a=Ue(e,{timeout:n*1e3,maxBuffer:10*1024*1024,cwd:i},(e,t,n)=>{let i=t||``;n&&(i+=(i?`
1
+ import{t as e}from"./chunk-DxIsgrAF.js";import{t}from"./chunk-DFh_pp_7.js";import{a as n,i as r,n as i,r as a,t as o}from"./chunk-BQCWtrzh.js";import{c as s,o as c,u as l}from"./chunk-DSleWP3c.js";import{_ as u,b as d,g as f,l as p,r as m,s as h,y as g}from"./chunk-Jiq-cxA5.js";import{i as _,n as v,r as y}from"./chunk-D0jQVYRk.js";import{n as b,t as x}from"./chunk-DjKQO7aV.js";import{t as S}from"./chunk-CKksk-lA.js";import{t as C}from"./chunk-2IASlfOI.js";import{A as w,B as T,C as ee,D as E,E as te,F as D,H as O,I as k,L as ne,M as A,N as j,O as re,P as M,R as N,S as ie,T as ae,U as oe,V as se,W as ce,_ as le,a as ue,b as P,c as de,d as fe,f as pe,g as F,h as I,i as me,j as he,k as ge,l as _e,m as ve,o as ye,p as be,s as xe,u as Se,v as Ce,w as we,x as Te,y as Ee,z as De}from"./chunk-TO5qzf3J2.js";import{d as Oe,i as ke,l as Ae,n as je,r as Me,t as Ne}from"./chunk-DOkl85Te2.js";import{t as Pe}from"./chunk-FEL5dv0w2.js";import{n as Fe,t as Ie}from"./chunk-Cx8_qww-2.js";import{createRequire as Le}from"node:module";import Re,{constants as ze,existsSync as Be}from"node:fs";import L from"node:path";import{fileURLToPath as Ve}from"node:url";import{env as He}from"node:process";import{exec as Ue,spawn as We}from"node:child_process";import{access as Ge,mkdir as Ke,readFile as qe,readdir as Je,rename as Ye,rm as Xe,rmdir as Ze,stat as R,unlink as z,writeFile as B}from"node:fs/promises";import V from"process";import{Buffer as H}from"buffer";import{EventEmitter as Qe}from"node:events";import{isIP as $e}from"node:net";import{runInNewContext as et}from"node:vm";import{DatabaseSync as tt}from"node:sqlite";var nt=class{kind=`file`;name;_path;constructor(e){this._path=e,this.name=L.basename(e)}async isSameEntry(e){return!e||typeof e!=`object`?!1:e.kind===this.kind&&e._path===this._path}async getFile(){let e=await qe(this._path);return{size:e.length,type:`application/octet-stream`,async text(){return e.toString(`utf8`)},async arrayBuffer(){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}}}async createWritable(){let e=[],t=this._path,n=async t=>{if(typeof t==`string`)e.push(H.from(t,`utf8`));else if(t instanceof Uint8Array)e.push(H.from(t));else if(t instanceof ArrayBuffer)e.push(H.from(t));else if(t instanceof Blob){if(typeof t.arrayBuffer==`function`){let n=await t.arrayBuffer();e.push(H.from(n))}else if(typeof t.bytes==`function`){let n=await t.bytes();e.push(H.from(n))}else if(typeof t.text==`function`){let n=await t.text();e.push(H.from(n,`utf8`))}else if(t._buffer)e.push(H.from(t._buffer));else if(typeof FileReader<`u`){let n=await new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(r.result),r.onerror=n,r.readAsArrayBuffer(t)});e.push(H.from(n))}}else t&&typeof t==`object`&&`data`in t?await n(t.data):e.push(H.from(new Uint8Array(t)))};return{write:n,async close(){let n=H.concat(e);await B(t,n)}}}},rt=class e{kind=`directory`;name;_path;_rootPath;constructor(e,t){this._path=L.resolve(e),this._rootPath=t?L.resolve(t):this._path,this.name=L.basename(this._path)||this._path}_resolveChild(e){if(!e||e===`.`||e.includes(`\0`)){let t=Error(`Invalid path name: "${e}"`);throw t.name=`TypeError`,t}let t=L.resolve(this._path,e),n=L.relative(this._path,t),r=L.relative(this._rootPath,t);if(n.startsWith(`..`)||L.isAbsolute(n)||r.startsWith(`..`)||L.isAbsolute(r)){let t=Error(`SecurityError: Path traversal outside workspace root is not allowed: "${e}"`);throw t.name=`SecurityError`,t}return t}async getDirectoryHandle(t,n){let r=this._resolveChild(t);if(n?.create)await Ke(r,{recursive:!0});else if(!Be(r)){let e=Error(`NotFoundError: ${r} does not exist`);throw e.name=`NotFoundError`,e}if(!(await R(r)).isDirectory()){let e=Error(`TypeMismatchError: "${t}" is a file, not a directory`);throw e.name=`TypeMismatchError`,e}return new e(r,this._rootPath)}async getFileHandle(e,t){let n=this._resolveChild(e);if(t?.create)Be(n)||await B(n,``);else if(!Be(n)){let e=Error(`NotFoundError: ${n} does not exist`);throw e.name=`NotFoundError`,e}if((await R(n)).isDirectory()){let t=Error(`TypeMismatchError: "${e}" is a directory, not a file`);throw t.name=`TypeMismatchError`,t}return new nt(n)}async*entries(){let t;try{t=await Je(this._path)}catch{return}for(let n of t){let t=L.join(this._path,n);try{(await R(t)).isDirectory()?yield[n,new e(t,this._rootPath)]:yield[n,new nt(t)]}catch{}}}async isSameEntry(e){return!e||typeof e!=`object`?!1:e.kind===this.kind&&e._path===this._path}async removeEntry(e,t){let n=this._resolveChild(e);if(!Be(n)){let e=Error(`NotFoundError: ${n} does not exist`);throw e.name=`NotFoundError`,e}if((await R(n)).isDirectory())if(t?.recursive)await Xe(n,{recursive:!0});else try{await Ze(n)}catch(t){if(t.code===`ENOTEMPTY`){let t=Error(`InvalidModificationError: directory is not empty: "${e}"`);throw t.name=`InvalidModificationError`,t}throw t}else await z(n)}};let it=null;function at(){return it}function ot(e){it=L.resolve(e),l(new rt(e))}globalThis.__setStorageRootFromPath=ot,globalThis.__getStorageRootPath=at;const st=({command:e,stdin:t,timeoutSec:n})=>new Promise(r=>{let i=at?.()??globalThis.__getStorageRootPath?.()??V.cwd(),a=Ue(e,{timeout:n*1e3,maxBuffer:10*1024*1024,cwd:i},(e,t,n)=>{let i=t||``;n&&(i+=(i?`
2
2
  `:``)+n),e&&!i&&(i=e.message),r(i)});t&&a.stdin&&(a.stdin.write(t),a.stdin.end())});j(st),globalThis.__headlessBashExecutor=st;function ct(e,t,n){let r=t.input_tokens||0,i=t.output_tokens||0,a=t.cache_read_input_tokens||0,o=t.cache_creation_input_tokens||0;return{type:`token-usage`,payload:{groupId:e,inputTokens:r,outputTokens:i,cacheReadTokens:a,cacheCreationTokens:o,totalTokens:r+i+a+o,contextLimit:n}}}function U(e,t,n,r){M(De(e,t,n,r))}async function*lt(e,t){let n=e.getReader(),r=new TextDecoder,i=``;try{for(;!t?.aborted;){let{done:e,value:t}=await n.read();if(e)break;i+=r.decode(t,{stream:!0});let a=i.split(`
3
3
 
4
4
  `);i=a.pop()||``;for(let e of a){let t=e.split(`
@@ -27,7 +27,7 @@ import{t as e}from"./chunk-DxIsgrAF.js";import{t}from"./chunk-DFh_pp_7.js";impor
27
27
  "use strict";
28
28
  ${e}
29
29
  })()`;return{ok:!0,value:await Promise.race([et(a,i,{timeout:t}),new Promise((e,n)=>setTimeout(()=>n(Error(`Execution timed out after ${t/1e3}s`)),t))])}}catch(e){return{ok:!1,error:e&&e.message?e.message:String(e)}}};ge(Jn),globalThis.__headlessEvalExecutor=Jn;const Yn=()=>new t({transport:`webrtc`});A(Yn),globalThis.__peerClientFactory=Yn;async function Xn(e,t,n,r={}){let i=[],a=[];for(let o of n)try{r.onStep?.(o);let s=Zn(o.input||{},a,n),c=await Se(e,o.name,s,t,{isScheduledTask:!r.isManual,isTaskExecution:r.isTaskExecution});a.push(c),o.suppressOutput||i.push(`**Tool \`${o.name}\`**: ${c}`)}catch(e){let t=e.message||String(e);a.push(t),o.suppressOutput||i.push(`**Tool \`${o.name}\` failed**: ${t}`)}return{rawOutputs:a,results:i}}function Zn(e,t,n){if(e&&typeof e==`object`){if(Array.isArray(e))return e.map(e=>Zn(e,t,n));if(`$pipe`in e){let r=e.$pipe,i=``;if(r===`prev`)i=t[t.length-1]??``;else if(typeof r==`number`)i=t[r]??``;else if(typeof r==`string`){for(let e=t.length-1;e>=0;e--)if(n[e]?.name===r){i=t[e];break}}return Qn(i)}let r={};for(let[i,a]of Object.entries(e))r[i]=Zn(a,t,n);return r}return e}function Qn(e){return typeof e==`string`?e:Array.isArray(e)?e.map(e=>e&&typeof e==`object`?`text`in e?String(e.text):`data`in e?String(e.data):JSON.stringify(e):String(e??``)).join(`
30
- `):e&&typeof e==`object`?e:e??``}let Q=null;const $=(e,t,n,r)=>{try{e.exec(`ALTER TABLE ${t} ADD COLUMN ${n} ${r}`)}catch{}};function $n(e=`database/agent.db`){if(Q)return Q;let t=new tt(e);return t.exec(`
30
+ `):e&&typeof e==`object`?e:e??``}let Q=null,$n=null;const $=(e,t,n,r)=>{try{e.exec(`ALTER TABLE ${t} ADD COLUMN ${n} ${r}`)}catch{}};function er(e=`database/agent.db`){let t=e===`:memory:`?e:L.resolve(e);if(Q&&$n===t)return Q;tr();let n=new tt(e);return n.exec(`
31
31
  CREATE TABLE IF NOT EXISTS messages (
32
32
  id TEXT PRIMARY KEY,
33
33
  groupId TEXT NOT NULL,
@@ -43,19 +43,19 @@ import{t as e}from"./chunk-DxIsgrAF.js";import{t}from"./chunk-DFh_pp_7.js";impor
43
43
  freshContext INTEGER,
44
44
  subagent INTEGER
45
45
  )
46
- `),t.exec(`
46
+ `),n.exec(`
47
47
  CREATE INDEX IF NOT EXISTS messages_by_group_time
48
48
  ON messages (groupId, timestamp)
49
- `),t.exec(`
49
+ `),n.exec(`
50
50
  CREATE INDEX IF NOT EXISTS messages_by_group
51
51
  ON messages (groupId)
52
- `),t.exec(`
52
+ `),n.exec(`
53
53
  CREATE TABLE IF NOT EXISTS sessions (
54
54
  groupId TEXT PRIMARY KEY,
55
55
  messages TEXT NOT NULL DEFAULT '[]',
56
56
  updatedAt INTEGER NOT NULL DEFAULT 0
57
57
  )
58
- `),t.exec(`
58
+ `),n.exec(`
59
59
  CREATE TABLE IF NOT EXISTS tasks (
60
60
  id TEXT PRIMARY KEY,
61
61
  groupId TEXT NOT NULL,
@@ -71,21 +71,21 @@ import{t as e}from"./chunk-DxIsgrAF.js";import{t}from"./chunk-DFh_pp_7.js";impor
71
71
  name TEXT,
72
72
  task_order INTEGER
73
73
  )
74
- `),t.exec(`
74
+ `),n.exec(`
75
75
  CREATE INDEX IF NOT EXISTS tasks_by_group
76
76
  ON tasks (groupId)
77
- `),t.exec(`
77
+ `),n.exec(`
78
78
  CREATE INDEX IF NOT EXISTS tasks_by_enabled
79
79
  ON tasks (enabled)
80
- `),t.exec(`
80
+ `),n.exec(`
81
81
  CREATE TABLE IF NOT EXISTS config (
82
82
  key TEXT PRIMARY KEY,
83
83
  value TEXT NOT NULL
84
84
  )
85
- `),t.exec(`
85
+ `),n.exec(`
86
86
  CREATE TABLE IF NOT EXISTS pendingShares (
87
87
  id TEXT PRIMARY KEY,
88
88
  createdAt INTEGER NOT NULL,
89
89
  data TEXT
90
90
  )
91
- `),$(t,`tasks`,`type`,`TEXT`),$(t,`tasks`,`freshContext`,`INTEGER`),$(t,`tasks`,`subagent`,`INTEGER`),$(t,`tasks`,`name`,`TEXT`),$(t,`tasks`,`task_order`,`INTEGER`),$(t,`messages`,`freshContext`,`INTEGER`),$(t,`messages`,`subagent`,`INTEGER`),Q=x(t),Q}function er(){Q&&=(Q.db.close(),null)}j(st),qt(bn),Yt(qn),ge(Jn),A(Yn);export{o as BROWSER_ONLY_TOOLS,m as CONFIG_KEYS,se as DEFAULT_BUILTIN_PROFILE,h as DEFAULT_MAX_TOKENS,p as DEFAULT_SERVER_GROUP_ID,rt as NodeFsDirectoryHandle,nt as NodeFsFileHandle,Pe as TOOL_DEFINITIONS,Z as cleanupAllLlamafileProcesses,er as closeSqliteDatabase,pn as createTransformersRuntimeService,E as discoverSkills,be as executeDetectLanguage,ve as executeEmbedText,Te as executeNativeAiTask,bn as executeNodeTransformersCompletion,I as executeProofreadText,F as executeRewriteText,le as executeSummarizeText,Se as executeTool,Xn as executeToolChain,Ce as executeTranslateText,Ee as executeWriteText,Ie as fetchDiscoveryManifest,i as filterHeadlessTools,f as getAvailableProviders,S as getConfig,we as getContextLimit,v as getDb,u as getDefaultProvider,g as getModelMaxTokens,d as getProvider,O as getRecentMessages,c as getStorageRoot,Xt as handleInvoke,Ne as importRemoteArtifacts,je as importRemoteScript,Me as importRemoteSkill,ke as importRemoteTool,s as invalidateStorageRoot,a as isHeadlessMode,y as isSqliteDatabase,r as isToolHeadlessSafe,Ae as loadDeclarativeTools,re as loadSkill,st as nativeBashExecutor,Jn as nativeEvalExecutor,Yn as nativePeerClientFactory,$n as openSqliteDatabase,M as post,_ as resetDB,Fe as resolveDiscoveryUrl,me as saveMessage,Oe as setConfig,b as setDB,j as setHeadlessBashExecutor,ge as setHeadlessEvalExecutor,n as setHeadlessMode,P as setNativeAiTaskHandler,A as setPeerClientFactory,k as setPostHandler,l as setStorageRoot,ot as setStorageRootFromPath,x as wrapSqliteDatabase};
91
+ `),$(n,`tasks`,`type`,`TEXT`),$(n,`tasks`,`freshContext`,`INTEGER`),$(n,`tasks`,`subagent`,`INTEGER`),$(n,`tasks`,`name`,`TEXT`),$(n,`tasks`,`task_order`,`INTEGER`),$(n,`messages`,`freshContext`,`INTEGER`),$(n,`messages`,`subagent`,`INTEGER`),Q=b(n),$n=t,Q}function tr(){Q&&=(Q.db.close(),null),$n=null}j(st),qt(bn),Yt(qn),ge(Jn),A(Yn);export{o as BROWSER_ONLY_TOOLS,m as CONFIG_KEYS,se as DEFAULT_BUILTIN_PROFILE,h as DEFAULT_MAX_TOKENS,p as DEFAULT_SERVER_GROUP_ID,rt as NodeFsDirectoryHandle,nt as NodeFsFileHandle,Pe as TOOL_DEFINITIONS,Z as cleanupAllLlamafileProcesses,tr as closeSqliteDatabase,pn as createTransformersRuntimeService,E as discoverSkills,be as executeDetectLanguage,ve as executeEmbedText,Te as executeNativeAiTask,bn as executeNodeTransformersCompletion,I as executeProofreadText,F as executeRewriteText,le as executeSummarizeText,Se as executeTool,Xn as executeToolChain,Ce as executeTranslateText,Ee as executeWriteText,Ie as fetchDiscoveryManifest,i as filterHeadlessTools,f as getAvailableProviders,S as getConfig,we as getContextLimit,v as getDb,u as getDefaultProvider,g as getModelMaxTokens,d as getProvider,O as getRecentMessages,c as getStorageRoot,Xt as handleInvoke,Ne as importRemoteArtifacts,je as importRemoteScript,Me as importRemoteSkill,ke as importRemoteTool,s as invalidateStorageRoot,a as isHeadlessMode,x as isSqliteDatabase,r as isToolHeadlessSafe,Ae as loadDeclarativeTools,re as loadSkill,st as nativeBashExecutor,Jn as nativeEvalExecutor,Yn as nativePeerClientFactory,er as openSqliteDatabase,M as post,y as resetDB,Fe as resolveDiscoveryUrl,me as saveMessage,Oe as setConfig,_ as setDB,j as setHeadlessBashExecutor,ge as setHeadlessEvalExecutor,n as setHeadlessMode,P as setNativeAiTaskHandler,A as setPeerClientFactory,k as setPostHandler,l as setStorageRoot,ot as setStorageRootFromPath,b as wrapSqliteDatabase};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-Jiq-cxA5.js";import{i as t}from"./chunk-DFLqhyP_.js";import{t as n}from"./chunk-Dhh0lHO6.js";import"dompurify";let r=[`youtube.com`,`youtube-nocookie.com`,`youtu.be`,`xt-ml.github.io`,`kherrick.github.io`];function i(e){e.map(e=>a(e)).filter(Boolean)}i(r);function a(e){let t=e.trim();if(!t)return()=>!1;if(t.startsWith(`/`)&&(t.endsWith(`/`)||/\/[gimuy]*$/.test(t)))try{let e=t.lastIndexOf(`/`),n=t.slice(1,e),r=t.slice(e+1),i=new RegExp(n,r||`i`);return e=>i.test(e)}catch{}if(t.includes(`^`)||t.includes(`$`)||t.includes(`(`)&&t.includes(`)`))try{let e=new RegExp(t,`i`);return t=>e.test(t)}catch{}if(t.startsWith(`*.`)){let e=t.slice(2).toLowerCase();return t=>{let n=t.toLowerCase();return n===e||n.endsWith(`.`+e)}}let n=t.toLowerCase();return e=>{let t=e.toLowerCase();return t===n||t.endsWith(`.`+n)}}const o=[],s=[];let c=new Set(o.map(e=>e.toLowerCase().trim())),l=[...s],u=[];function d(e){u=e.map(e=>a(e)).filter(Boolean)}d(l);function f(e){return Array.isArray(e)?e.map(e=>typeof e==`string`?e.toLowerCase().trim():``).filter(Boolean):typeof e==`string`?e.split(/[\n,]+/).map(e=>e.toLowerCase().trim()).filter(Boolean):[]}function p(e){return Array.isArray(e)?e.map(e=>typeof e==`string`?e.trim():``).filter(Boolean):typeof e==`string`?e.split(/[\n,]+/).map(e=>e.trim()).filter(Boolean):[]}function m(e){let t=f(e);c=new Set(t)}function h(e){let t=p(e);l=t,d(t)}function g(e){if(!e||typeof e!=`string`)return!1;let t=e.trim().toLowerCase();return!t.includes(`-`)||t===`shadow-claw`||t.startsWith(`shadow-claw-`)?!0:c.has(t)}function _(e){if(!e||typeof e!=`string`)return!1;let t=e.trim();if(!t||/^(?:javascript|data|vbscript):/i.test(t))return!1;if(/^blob:/i.test(t)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`))return!0;try{let e=typeof globalThis<`u`&&globalThis.location?.origin&&globalThis.location.origin!==`null`?globalThis.location.origin:`http://localhost`,n=new URL(t,e);if(n.protocol!==`http:`&&n.protocol!==`https:`)return!1;if(typeof globalThis<`u`&&globalThis.location?.origin&&globalThis.location.origin!==`null`&&n.origin===globalThis.location.origin)return!0;let r=n.hostname.toLowerCase();return u.some(e=>e(r))}catch{return!1}}const v=`allow-modals allow-scripts allow-popups allow-popups-to-escape-sandbox`,y=[`'self'`,`blob:`,`data:`],b=[`'self'`,`blob:`,`data:`],x=[`'self'`,`'unsafe-inline'`,`https:`,`http:`],S=[`'self'`,`blob:`,`data:`,`https:`,`http:`];let C=v;[...y],[...b],[...x],[...S];function w(e){C=Array.isArray(e)?e.map(e=>typeof e==`string`?e.trim():``).filter(Boolean).join(` `):typeof e==`string`&&e.trim()?e.trim():v}function T(e){if(!e||typeof e!=`object`)return;let t=e.allowedCustomElements||(typeof e.customElements==`object`&&!Array.isArray(e.customElements)?e.customElements?.allowedElements:void 0);t!==void 0&&m(t);let n=e.allowedCustomElementDomains||(typeof e.customElements==`object`&&!Array.isArray(e.customElements)?e.customElements?.allowedDomains:void 0);n!==void 0&&h(n);let r=typeof e.customElements==`object`&&!Array.isArray(e.customElements)?e.customElements?.scripts:void 0;r!==void 0&&D(r),e.security?.iframeSandbox===void 0?(e.security?.allowSameOrigin===!0||e.security?.allowIframeSameOrigin===!0)&&(C.includes(`allow-same-origin`)||(C=`${C} allow-same-origin`.trim())):w(e.security.iframeSandbox),e.security?.workerSrc!==void 0&&p(e.security.workerSrc),e.security?.connectSrc!==void 0&&p(e.security.connectSrc),e.security?.scriptSrc!==void 0&&p(e.security.scriptSrc),e.security?.styleSrc!==void 0&&p(e.security.styleSrc),e.security?.imgSrc!==void 0&&p(e.security.imgSrc)}function E(){if(typeof document>`u`)return;let e=document.getElementById(`shadow-claw-site-config`);if(e&&e.textContent)try{T(JSON.parse(e.textContent))}catch{}}function D(e){Array.isArray(e)&&e.map(e=>({src:typeof e==`string`?e:e?.src,hasInit:typeof e==`object`&&e?!!e.hasInit:!1})).filter(e=>typeof e.src==`string`&&_(e.src))}async function O(r){try{let i=r??await t();if(!i)return;let[a,o]=await Promise.all([n(i,e.ALLOWED_CUSTOM_ELEMENTS),n(i,e.ALLOWED_CUSTOM_ELEMENT_HOST_PATTERNS)]);if(typeof a==`string`&&a.trim())try{m(JSON.parse(a))}catch{m(a)}if(typeof o==`string`&&o.trim())try{h(JSON.parse(o))}catch{h(o)}}catch(e){console.warn(`Failed to load custom element security from db:`,e)}}let k=null,A=!1;function j(){E(),!(A||typeof customElements>`u`||typeof customElements.define!=`function`)&&(k=customElements.define.bind(customElements),customElements.define=function(e,t,n){if(!g((e||``).toLowerCase().trim())){let t=`[Security] Registration blocked: <${e}> is not an approved custom element.`;throw console.error(t),Error(t)}return k(e,t,n)},A=!0)}function M(e=typeof document<`u`?document.documentElement:null){if(typeof MutationObserver>`u`||!e)return null;if(typeof e.querySelectorAll==`function`)try{e.querySelectorAll(`*`).forEach(e=>{let t=e.tagName?e.tagName.toLowerCase():``;t.includes(`-`)&&!g(t)&&(console.warn(`[Security] Removing existing unapproved custom element: <${t}>`),e.remove())})}catch{}let t=new MutationObserver(e=>{for(let t of e)t.addedNodes.forEach(e=>{if(e.nodeType===1){let t=e,n=t.tagName?t.tagName.toLowerCase():``;n.includes(`-`)&&!g(n)&&(console.warn(`[Security] Removing unapproved custom element: <${n}>`),t.remove())}})});return t.observe(e,{childList:!0,subtree:!0}),t}function N(e){if(e instanceof Blob)return e.arrayBuffer();if(e instanceof ArrayBuffer)return Promise.resolve(e.slice(0));let{buffer:t,byteOffset:n,byteLength:r}=e;return Promise.resolve(t.slice(n,n+r))}function P(e){return Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}async function F(e){let t=await N(e),n=globalThis.crypto?.subtle??globalThis.window?.crypto?.subtle??(typeof process<`u`?(await import(`node:crypto`)).webcrypto?.subtle:void 0);if(!n)throw Error(`crypto.subtle is not available in current environment`);return P(await n.digest(`SHA-256`,t))}const I=`shadowclaw`;let L;function R(){let e=globalThis.trustedTypes;return!e||typeof e.createPolicy!=`function`?null:e}function z(){if(L!==void 0)return L;let e=R();if(!e)return L=null,L;if(typeof e.getPolicy==`function`){let t=e.getPolicy(I);if(t)return L=t,L}try{L=e.createPolicy(I,{createHTML:e=>e,createScriptURL:e=>e})}catch{L=typeof e.getPolicy==`function`?e.getPolicy(I)??null:null}return L}function B(e){let t=z();return!t||typeof t.createScriptURL!=`function`?e:t.createScriptURL(e)}export{j as a,M as i,F as n,O as o,T as r,B as t};
1
+ import{r as e}from"./chunk-Jiq-cxA5.js";import{n as t}from"./chunk-D0jQVYRk.js";import{t as n}from"./chunk-CKksk-lA.js";import"dompurify";let r=[`youtube.com`,`youtube-nocookie.com`,`youtu.be`,`xt-ml.github.io`,`kherrick.github.io`];function i(e){e.map(e=>a(e)).filter(Boolean)}i(r);function a(e){let t=e.trim();if(!t)return()=>!1;if(t.startsWith(`/`)&&(t.endsWith(`/`)||/\/[gimuy]*$/.test(t)))try{let e=t.lastIndexOf(`/`),n=t.slice(1,e),r=t.slice(e+1),i=new RegExp(n,r||`i`);return e=>i.test(e)}catch{}if(t.includes(`^`)||t.includes(`$`)||t.includes(`(`)&&t.includes(`)`))try{let e=new RegExp(t,`i`);return t=>e.test(t)}catch{}if(t.startsWith(`*.`)){let e=t.slice(2).toLowerCase();return t=>{let n=t.toLowerCase();return n===e||n.endsWith(`.`+e)}}let n=t.toLowerCase();return e=>{let t=e.toLowerCase();return t===n||t.endsWith(`.`+n)}}const o=[],s=[];let c=new Set(o.map(e=>e.toLowerCase().trim())),l=[...s],u=[];function d(e){u=e.map(e=>a(e)).filter(Boolean)}d(l);function f(e){return Array.isArray(e)?e.map(e=>typeof e==`string`?e.toLowerCase().trim():``).filter(Boolean):typeof e==`string`?e.split(/[\n,]+/).map(e=>e.toLowerCase().trim()).filter(Boolean):[]}function p(e){return Array.isArray(e)?e.map(e=>typeof e==`string`?e.trim():``).filter(Boolean):typeof e==`string`?e.split(/[\n,]+/).map(e=>e.trim()).filter(Boolean):[]}function m(e){let t=f(e);c=new Set(t)}function h(e){let t=p(e);l=t,d(t)}function g(e){if(!e||typeof e!=`string`)return!1;let t=e.trim().toLowerCase();return!t.includes(`-`)||t===`shadow-claw`||t.startsWith(`shadow-claw-`)?!0:c.has(t)}function _(e){if(!e||typeof e!=`string`)return!1;let t=e.trim();if(!t||/^(?:javascript|data|vbscript):/i.test(t))return!1;if(/^blob:/i.test(t)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`))return!0;try{let e=typeof globalThis<`u`&&globalThis.location?.origin&&globalThis.location.origin!==`null`?globalThis.location.origin:`http://localhost`,n=new URL(t,e);if(n.protocol!==`http:`&&n.protocol!==`https:`)return!1;if(typeof globalThis<`u`&&globalThis.location?.origin&&globalThis.location.origin!==`null`&&n.origin===globalThis.location.origin)return!0;let r=n.hostname.toLowerCase();return u.some(e=>e(r))}catch{return!1}}const v=`allow-modals allow-scripts allow-popups allow-popups-to-escape-sandbox`,y=[`'self'`,`blob:`,`data:`],b=[`'self'`,`blob:`,`data:`],x=[`'self'`,`'unsafe-inline'`,`https:`,`http:`],S=[`'self'`,`blob:`,`data:`,`https:`,`http:`];let C=v;[...y],[...b],[...x],[...S];function w(e){C=Array.isArray(e)?e.map(e=>typeof e==`string`?e.trim():``).filter(Boolean).join(` `):typeof e==`string`&&e.trim()?e.trim():v}function T(e){if(!e||typeof e!=`object`)return;let t=e.allowedCustomElements||(typeof e.customElements==`object`&&!Array.isArray(e.customElements)?e.customElements?.allowedElements:void 0);t!==void 0&&m(t);let n=e.allowedCustomElementDomains||(typeof e.customElements==`object`&&!Array.isArray(e.customElements)?e.customElements?.allowedDomains:void 0);n!==void 0&&h(n);let r=typeof e.customElements==`object`&&!Array.isArray(e.customElements)?e.customElements?.scripts:void 0;r!==void 0&&D(r),e.security?.iframeSandbox===void 0?(e.security?.allowSameOrigin===!0||e.security?.allowIframeSameOrigin===!0)&&(C.includes(`allow-same-origin`)||(C=`${C} allow-same-origin`.trim())):w(e.security.iframeSandbox),e.security?.workerSrc!==void 0&&p(e.security.workerSrc),e.security?.connectSrc!==void 0&&p(e.security.connectSrc),e.security?.scriptSrc!==void 0&&p(e.security.scriptSrc),e.security?.styleSrc!==void 0&&p(e.security.styleSrc),e.security?.imgSrc!==void 0&&p(e.security.imgSrc)}function E(){if(typeof document>`u`)return;let e=document.getElementById(`shadow-claw-site-config`);if(e&&e.textContent)try{T(JSON.parse(e.textContent))}catch{}}function D(e){Array.isArray(e)&&e.map(e=>({src:typeof e==`string`?e:e?.src,hasInit:typeof e==`object`&&e?!!e.hasInit:!1})).filter(e=>typeof e.src==`string`&&_(e.src))}async function O(r){try{let i=r??await t();if(!i)return;let[a,o]=await Promise.all([n(i,e.ALLOWED_CUSTOM_ELEMENTS),n(i,e.ALLOWED_CUSTOM_ELEMENT_HOST_PATTERNS)]);if(typeof a==`string`&&a.trim())try{m(JSON.parse(a))}catch{m(a)}if(typeof o==`string`&&o.trim())try{h(JSON.parse(o))}catch{h(o)}}catch(e){console.warn(`Failed to load custom element security from db:`,e)}}let k=null,A=!1;function j(){E(),!(A||typeof customElements>`u`||typeof customElements.define!=`function`)&&(k=customElements.define.bind(customElements),customElements.define=function(e,t,n){if(!g((e||``).toLowerCase().trim())){let t=`[Security] Registration blocked: <${e}> is not an approved custom element.`;throw console.error(t),Error(t)}return k(e,t,n)},A=!0)}function M(e=typeof document<`u`?document.documentElement:null){if(typeof MutationObserver>`u`||!e)return null;if(typeof e.querySelectorAll==`function`)try{e.querySelectorAll(`*`).forEach(e=>{let t=e.tagName?e.tagName.toLowerCase():``;t.includes(`-`)&&!g(t)&&(console.warn(`[Security] Removing existing unapproved custom element: <${t}>`),e.remove())})}catch{}let t=new MutationObserver(e=>{for(let t of e)t.addedNodes.forEach(e=>{if(e.nodeType===1){let t=e,n=t.tagName?t.tagName.toLowerCase():``;n.includes(`-`)&&!g(n)&&(console.warn(`[Security] Removing unapproved custom element: <${n}>`),t.remove())}})});return t.observe(e,{childList:!0,subtree:!0}),t}function N(e){if(e instanceof Blob)return e.arrayBuffer();if(e instanceof ArrayBuffer)return Promise.resolve(e.slice(0));let{buffer:t,byteOffset:n,byteLength:r}=e;return Promise.resolve(t.slice(n,n+r))}function P(e){return Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}async function F(e){let t=await N(e),n=globalThis.crypto?.subtle??globalThis.window?.crypto?.subtle??(typeof process<`u`?(await import(`node:crypto`)).webcrypto?.subtle:void 0);if(!n)throw Error(`crypto.subtle is not available in current environment`);return P(await n.digest(`SHA-256`,t))}const I=`shadowclaw`;let L;function R(){let e=globalThis.trustedTypes;return!e||typeof e.createPolicy!=`function`?null:e}function z(){if(L!==void 0)return L;let e=R();if(!e)return L=null,L;if(typeof e.getPolicy==`function`){let t=e.getPolicy(I);if(t)return L=t,L}try{L=e.createPolicy(I,{createHTML:e=>e,createScriptURL:e=>e})}catch{L=typeof e.getPolicy==`function`?e.getPolicy(I)??null:null}return L}function B(e){let t=z();return!t||typeof t.createScriptURL!=`function`?e:t.createScriptURL(e)}export{j as a,M as i,F as n,O as o,T as r,B as t};
@@ -1 +1 @@
1
- import{a as e,c as t,i as n,l as r,n as i,r as a,s as o,t as s}from"./chunk-CWs_KY8q.js";async function c(c,l,u,d){let{dirs:f,filename:p}=a(u);for(let a=0;a<2;a++)try{let t=await n(c,l);for(let e of f)t=await t.getDirectoryHandle(e,{create:!0});let r=await t.getFileHandle(p,{create:!0});try{await s(r,d);return}catch(e){if(!((e instanceof Error?e.message:String(e)).includes(`Writable file streams are not supported`)&&(await o(c)).type===`opfs`))throw e}let a=l.replace(/:/g,`-`);await i([e(),`groups`,a,...f,p],d);return}catch(e){if(a===0&&r(e)){t();continue}throw e}}function l(e,t=`attachment.bin`){if(!e)return t;let n=e.replace(/\\/g,`/`).split(`/`).filter(Boolean);return n[n.length-1]||t}function u(e,t={}){let n=t.replacement??`_`,r=t.fallback??`attachment.bin`,i=e.trim();t.stripControlChars&&(i=i.replace(/[\u0000-\u001f\u007f]+/g,``)),t.stripLeadingDots&&(i=i.replace(/^\.+/,``));let a=t.stripControlChars?/[\\/:*?"<>|]/g:/[\\/:*?"<>|\x00-\x1f\u007f]/g;if(t.collapseReplacement&&n){let e=n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);i=i.replace(t.stripControlChars?/[\\/:*?"<>|]+/g:/[\\/:*?"<>|\x00-\x1f\u007f]+/g,n),i=i.replace(RegExp(`${e}+`,`g`),n)}else i=i.replace(a,n);return i=i.trim(),t.stripLeadingDots&&(i=i.replace(/^\.+/,``).trim()),i||r}const d={apng:`image/apng`,avif:`image/avif`,bmp:`image/bmp`,gif:`image/gif`,heic:`image/heic`,heif:`image/heif`,ico:`image/x-icon`,jpeg:`image/jpeg`,jpg:`image/jpeg`,png:`image/png`,svg:`image/svg+xml`,tif:`image/tiff`,tiff:`image/tiff`,webp:`image/webp`},f={...d,"3gp":`video/3gpp`,aac:`audio/aac`,avi:`video/x-msvideo`,bin:`application/octet-stream`,css:`text/css`,csv:`text/csv`,db:`application/vnd.sqlite3`,dll:`application/octet-stream`,dmg:`application/octet-stream`,dylib:`application/octet-stream`,exe:`application/vnd.microsoft.portable-executable`,flac:`audio/flac`,flv:`video/x-flv`,gz:`application/gzip`,htm:`text/html`,html:`text/html`,iso:`application/octet-stream`,js:`text/javascript`,json:`application/json`,m4a:`audio/mp4`,m4v:`video/mp4`,markdown:`text/markdown`,md:`text/markdown`,mjs:`text/javascript`,mkv:`video/x-matroska`,mov:`video/mp4`,mp3:`audio/mpeg`,mp4:`video/mp4`,oga:`audio/ogg`,ogg:`audio/ogg`,ogv:`video/ogg`,pdf:`application/pdf`,rar:`application/vnd.rar`,so:`application/octet-stream`,sqlite:`application/vnd.sqlite3`,sqlite3:`application/vnd.sqlite3`,tar:`application/x-tar`,ts:`text/typescript`,tsx:`text/typescript`,txt:`text/plain`,wasm:`application/wasm`,wav:`audio/wav`,weba:`audio/webm`,webm:`video/webm`,wmv:`video/x-ms-wmv`,xml:`application/xml`,yaml:`text/yaml`,yml:`text/yaml`,zip:`application/zip`};function p(e){return e&&(e.split(/[?#]/,1)[0].replace(/\\/g,`/`).split(`/`).pop()||``).toLowerCase().split(`.`).pop()||``}function m(e,t){let n=p(e);return f[n]??t}function h(e){let t=p(e);return d[t]||null}function g(e){return h(e)!==null}function _(e){let t=p(e);if(t===`md`||t===`markdown`||t===`txt`)return`text/plain`;if(t===`pdf`)return`application/pdf`;if(d[t])return d[t]}function v(e,t=``){return t||m(e,`application/octet-stream`)}export{g as a,c,v as i,m as n,l as o,_ as r,u as s,h as t};
1
+ import{a as e,c as t,i as n,l as r,n as i,r as a,s as o,t as s}from"./chunk-Xz02ooJU.js";async function c(c,l,u,d){let{dirs:f,filename:p}=a(u);for(let a=0;a<2;a++)try{let t=await n(c,l);for(let e of f)t=await t.getDirectoryHandle(e,{create:!0});let r=await t.getFileHandle(p,{create:!0});try{await s(r,d);return}catch(e){if(!((e instanceof Error?e.message:String(e)).includes(`Writable file streams are not supported`)&&(await o(c)).type===`opfs`))throw e}let a=l.replace(/:/g,`-`);await i([e(),`groups`,a,...f,p],d);return}catch(e){if(a===0&&r(e)){t();continue}throw e}}function l(e,t=`attachment.bin`){if(!e)return t;let n=e.replace(/\\/g,`/`).split(`/`).filter(Boolean);return n[n.length-1]||t}function u(e,t={}){let n=t.replacement??`_`,r=t.fallback??`attachment.bin`,i=e.trim();t.stripControlChars&&(i=i.replace(/[\u0000-\u001f\u007f]+/g,``)),t.stripLeadingDots&&(i=i.replace(/^\.+/,``));let a=t.stripControlChars?/[\\/:*?"<>|]/g:/[\\/:*?"<>|\x00-\x1f\u007f]/g;if(t.collapseReplacement&&n){let e=n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);i=i.replace(t.stripControlChars?/[\\/:*?"<>|]+/g:/[\\/:*?"<>|\x00-\x1f\u007f]+/g,n),i=i.replace(RegExp(`${e}+`,`g`),n)}else i=i.replace(a,n);return i=i.trim(),t.stripLeadingDots&&(i=i.replace(/^\.+/,``).trim()),i||r}const d={apng:`image/apng`,avif:`image/avif`,bmp:`image/bmp`,gif:`image/gif`,heic:`image/heic`,heif:`image/heif`,ico:`image/x-icon`,jpeg:`image/jpeg`,jpg:`image/jpeg`,png:`image/png`,svg:`image/svg+xml`,tif:`image/tiff`,tiff:`image/tiff`,webp:`image/webp`},f={...d,"3gp":`video/3gpp`,aac:`audio/aac`,avi:`video/x-msvideo`,bin:`application/octet-stream`,css:`text/css`,csv:`text/csv`,db:`application/vnd.sqlite3`,dll:`application/octet-stream`,dmg:`application/octet-stream`,dylib:`application/octet-stream`,exe:`application/vnd.microsoft.portable-executable`,flac:`audio/flac`,flv:`video/x-flv`,gz:`application/gzip`,htm:`text/html`,html:`text/html`,iso:`application/octet-stream`,js:`text/javascript`,json:`application/json`,m4a:`audio/mp4`,m4v:`video/mp4`,markdown:`text/markdown`,md:`text/markdown`,mjs:`text/javascript`,mkv:`video/x-matroska`,mov:`video/mp4`,mp3:`audio/mpeg`,mp4:`video/mp4`,oga:`audio/ogg`,ogg:`audio/ogg`,ogv:`video/ogg`,pdf:`application/pdf`,rar:`application/vnd.rar`,so:`application/octet-stream`,sqlite:`application/vnd.sqlite3`,sqlite3:`application/vnd.sqlite3`,tar:`application/x-tar`,ts:`text/typescript`,tsx:`text/typescript`,txt:`text/plain`,wasm:`application/wasm`,wav:`audio/wav`,weba:`audio/webm`,webm:`video/webm`,wmv:`video/x-ms-wmv`,xml:`application/xml`,yaml:`text/yaml`,yml:`text/yaml`,zip:`application/zip`};function p(e){return e&&(e.split(/[?#]/,1)[0].replace(/\\/g,`/`).split(`/`).pop()||``).toLowerCase().split(`.`).pop()||``}function m(e,t){let n=p(e);return f[n]??t}function h(e){let t=p(e);return d[t]||null}function g(e){return h(e)!==null}function _(e){let t=p(e);if(t===`md`||t===`markdown`||t===`txt`)return`text/plain`;if(t===`pdf`)return`application/pdf`;if(d[t])return d[t]}function v(e,t=``){return t||m(e,`application/octet-stream`)}export{g as a,c,v as i,m as n,l as o,_ as r,u as s,h as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-DxZ6DcRo2.js";export{e as orchestratorStore};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-TO5qzf3J2.js";export{e as orchestratorStore};