@waishnav/devspace 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +3 -9
- package/dist/config.js +16 -7
- package/dist/review-checkpoints.js +4 -4
- package/dist/server.js +15 -15
- package/dist/ui/.vite/manifest.json +280 -280
- package/dist/ui/assets/{angular-html-Di31D1W0.js → angular-html-B_77pPm_.js} +1 -1
- package/dist/ui/assets/{angular-ts-BKuSFrBS.js → angular-ts-tGBi7sOr.js} +1 -1
- package/dist/ui/assets/{apl-DgqYbYoh.js → apl-CtVPpGgP.js} +1 -1
- package/dist/ui/assets/{astro-B19gi6Os.js → astro-CALPYvnG.js} +1 -1
- package/dist/ui/assets/{blade-BKHjA4oS.js → blade-Bh4eBXdk.js} +1 -1
- package/dist/ui/assets/{c-FjyGimBn.js → c-BGkebjQE.js} +1 -1
- package/dist/ui/assets/{cobol-DlmtgjjX.js → cobol-f7rP2PjR.js} +1 -1
- package/dist/ui/assets/{coffee-BlTKLwcf.js → coffee-E4OhMc7W.js} +1 -1
- package/dist/ui/assets/{cpp-DtVUwoaa.js → cpp-Cr_J6lB2.js} +1 -1
- package/dist/ui/assets/{crystal-C0TLGTHr.js → crystal-B_TFXhon.js} +1 -1
- package/dist/ui/assets/{css-FssmIjiX.js → css-DDMxq-4J.js} +1 -1
- package/dist/ui/assets/{edge-_m-12TBz.js → edge-Bxqhgg5I.js} +1 -1
- package/dist/ui/assets/{elixir-RKJED3b7.js → elixir-WrSbgJJ1.js} +1 -1
- package/dist/ui/assets/{elm-CzMSD9Oq.js → elm-BXBWJ4Kz.js} +1 -1
- package/dist/ui/assets/{erb-Cqpp-3vK.js → erb-D0iMw9rO.js} +1 -1
- package/dist/ui/assets/{git-rebase-DLS2r2oj.js → git-rebase-BOrZ-_iR.js} +1 -1
- package/dist/ui/assets/{glimmer-js-B1t-JGK1.js → glimmer-js-PCWk96O8.js} +1 -1
- package/dist/ui/assets/{glimmer-ts-CazygCNf.js → glimmer-ts-4pYwX8pC.js} +1 -1
- package/dist/ui/assets/{glsl-gBg2vKZ-.js → glsl-CDyKZvZX.js} +1 -1
- package/dist/ui/assets/{graphql-C8u6MNtl.js → graphql-8sIw92YT.js} +1 -1
- package/dist/ui/assets/{hack-CgKuqejW.js → hack-Ci96Zcew.js} +1 -1
- package/dist/ui/assets/{haml-I5WU4_Rg.js → haml-4uzh6End.js} +1 -1
- package/dist/ui/assets/{handlebars-DGf6O3Q6.js → handlebars-B6Eq7QV8.js} +1 -1
- package/dist/ui/assets/{heavy-payload-Bp6srDbj.js → heavy-payload--bwRtRpo.js} +1 -1
- package/dist/ui/assets/{html-BrIuweS5.js → html-C29wL7bm.js} +1 -1
- package/dist/ui/assets/{html-derivative-CflP_1S6.js → html-derivative-Cmd90ilz.js} +1 -1
- package/dist/ui/assets/{http-qgGkv9Ds.js → http-Bdr_R0Kw.js} +1 -1
- package/dist/ui/assets/{hurl-CantyQ5z.js → hurl-CiTPn-zH.js} +1 -1
- package/dist/ui/assets/{java-DqStxnBY.js → java-C03kBuJH.js} +1 -1
- package/dist/ui/assets/{javascript-CJ1ZUMNM.js → javascript-135g9Wwx.js} +1 -1
- package/dist/ui/assets/{jinja-Ta-y-8tW.js → jinja-CPpiEHqV.js} +1 -1
- package/dist/ui/assets/{jison-DZStAtdf.js → jison-qabCQzwp.js} +1 -1
- package/dist/ui/assets/{json-Bfn_pgvS.js → json-CtRj9Trp.js} +1 -1
- package/dist/ui/assets/{jsx-CFi5D1JI.js → jsx-Ccuy5Wm3.js} +1 -1
- package/dist/ui/assets/{julia-CmuPb_FV.js → julia-Fwya-MwM.js} +1 -1
- package/dist/ui/assets/{just-xoDaYyy4.js → just-c9YEH7Gf.js} +1 -1
- package/dist/ui/assets/{latex-C7jbQT4s.js → latex-D9xoD6UX.js} +1 -1
- package/dist/ui/assets/{liquid-DyVckOju.js → liquid-BKZLZSHN.js} +1 -1
- package/dist/ui/assets/{lua-CQGEo-kr.js → lua-CBD2zNyC.js} +1 -1
- package/dist/ui/assets/{marko-CF3FIlcL.js → marko-Dkgf9bj3.js} +1 -1
- package/dist/ui/assets/{mdc-DJfBh8KU.js → mdc-BUgUKiX3.js} +1 -1
- package/dist/ui/assets/{nginx-CmN5T-d3.js → nginx-CAaav4Zh.js} +1 -1
- package/dist/ui/assets/{nim-a_705mqZ.js → nim-CTjWWztL.js} +1 -1
- package/dist/ui/assets/{perl-BFxFi55O.js → perl-DTM5zgH4.js} +1 -1
- package/dist/ui/assets/{php-C9Uf0Vo_.js → php-dqfFDbWm.js} +1 -1
- package/dist/ui/assets/{pug-DQIrtlYh.js → pug-4f_clTm2.js} +1 -1
- package/dist/ui/assets/{qml-CpI_Asuw.js → qml-BFeWjFRL.js} +1 -1
- package/dist/ui/assets/{r-hYZdyIMH.js → r-ei1iNvHm.js} +1 -1
- package/dist/ui/assets/{razor-CbXx350T.js → razor-jj95jncJ.js} +1 -1
- package/dist/ui/assets/{regexp-BdfO5R2u.js → regexp-0joUf3Cn.js} +1 -1
- package/dist/ui/assets/{review-payload-CC-3-Lb9.js → review-payload-DxI2fTnP.js} +1 -1
- package/dist/ui/assets/{rst-CP6mAm3Y.js → rst-BMbcN8--.js} +1 -1
- package/dist/ui/assets/{ruby-8tjXzrRr.js → ruby-BQx0xtOB.js} +1 -1
- package/dist/ui/assets/{sas-rqWHY37U.js → sas-C_Fl1EyP.js} +1 -1
- package/dist/ui/assets/{scss-aGYgGui9.js → scss-5vaLJPJl.js} +1 -1
- package/dist/ui/assets/{shellscript-CYr5JWBI.js → shellscript-p_y7YCYP.js} +1 -1
- package/dist/ui/assets/{shellsession-CO3ljRR7.js → shellsession-ChZkMp2K.js} +1 -1
- package/dist/ui/assets/{soy-C4_rLmHV.js → soy-im25cA8U.js} +1 -1
- package/dist/ui/assets/{sql-2jcbKHJ9.js → sql-BzvG6ssm.js} +1 -1
- package/dist/ui/assets/{stata-Dbr0lM_v.js → stata-CwSzNM20.js} +1 -1
- package/dist/ui/assets/{surrealql-Cp0eMxMo.js → surrealql-BWzKhI6S.js} +1 -1
- package/dist/ui/assets/{svelte-BfsT9lcS.js → svelte-NMlQHjaa.js} +1 -1
- package/dist/ui/assets/{templ-BBOwNqeW.js → templ-1W11KGSL.js} +1 -1
- package/dist/ui/assets/{tex-CPmn_RsX.js → tex-CTxN8q2c.js} +1 -1
- package/dist/ui/assets/{ts-tags-DMILlUz_.js → ts-tags-B6prphu-.js} +1 -1
- package/dist/ui/assets/{tsx-CUP2Lfiz.js → tsx-Daks24y9.js} +1 -1
- package/dist/ui/assets/{twig-DEZ_7SDX.js → twig-C0KeCxch.js} +1 -1
- package/dist/ui/assets/{typescript-DhaMQEhQ.js → typescript-37-dkCwp.js} +1 -1
- package/dist/ui/assets/{useFileDiffInstance-Bo6irrE6.js → useFileDiffInstance--R0_ywL_.js} +3 -3
- package/dist/ui/assets/{vue-CAaS6wtt.js → vue-Ba-v02vP.js} +1 -1
- package/dist/ui/assets/{vue-html-D3Etensv.js → vue-html-D2UmbuN7.js} +1 -1
- package/dist/ui/assets/{vue-vine-DNRKj0Lh.js → vue-vine-ZftUW_ID.js} +1 -1
- package/dist/ui/assets/{workspace-app-BLeU1qC_.js → workspace-app-CsMiGtz9.js} +4 -4
- package/dist/ui/assets/{xml-M-X6I2aP.js → xml-DrhRYxTS.js} +1 -1
- package/dist/ui/assets/{xsl-CR0ZlrL7.js → xsl-DvbIvBcQ.js} +1 -1
- package/dist/ui/assets/{yaml-pI4xDDgj.js → yaml-oktUYAzQ.js} +1 -1
- package/dist/ui/workspace-app.html +1 -1
- package/docs/chatgpt-coding-workflow.md +22 -22
- package/docs/configuration.md +13 -10
- package/docs/gotchas.md +5 -4
- package/package.json +2 -4
- package/scripts/dev-server.mjs +120 -0
- package/scripts/build-release.mjs +0 -89
- package/scripts/ensure-native-deps.mjs +0 -29
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./heavy-payload
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./heavy-payload--bwRtRpo.js","./useFileDiffInstance--R0_ywL_.js","./review-payload-DxI2fTnP.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var e=Object.defineProperty,t=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},r=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var i,a=Object.freeze({status:`aborted`});function o(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var s=Symbol(`zod_brand`),c=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},l=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(i=globalThis).__zod_globalConfig??(i.__zod_globalConfig={});var u=globalThis.__zod_globalConfig;function d(e){return e&&Object.assign(u,e),u}var f=n({BIGINT_FORMAT_RANGES:()=>Pe,Class:()=>nt,NUMBER_FORMAT_RANGES:()=>Ne,aborted:()=>He,allowsEval:()=>Ce,assert:()=>ie,assertEqual:()=>ee,assertIs:()=>ne,assertNever:()=>re,assertNotEqual:()=>te,assignProp:()=>pe,base64ToUint8Array:()=>Xe,base64urlToUint8Array:()=>Qe,cached:()=>se,captureStackTrace:()=>xe,cleanEnum:()=>Ye,cleanRegex:()=>le,clone:()=>h,cloneDef:()=>he,createTransparentProxy:()=>je,defineLazy:()=>m,esc:()=>ye,escapeRegex:()=>Ae,explicitlyAborted:()=>Ue,extend:()=>Le,finalizeIssue:()=>v,floatSafeRemainder:()=>ue,getElementAtPath:()=>ge,getEnumValues:()=>ae,getLengthableOrigin:()=>qe,getParsedType:()=>De,getSizableOrigin:()=>Ke,hexToUint8Array:()=>et,isObject:()=>Se,isPlainObject:()=>we,issue:()=>Je,joinValues:()=>p,jsonStringifyReplacer:()=>oe,merge:()=>ze,mergeDefs:()=>me,normalizeParams:()=>g,nullish:()=>ce,numKeys:()=>Ee,objectClone:()=>fe,omit:()=>Ie,optionalKeys:()=>Me,parsedType:()=>y,partial:()=>Be,pick:()=>Fe,prefixIssues:()=>We,primitiveTypes:()=>ke,promiseAllObject:()=>_e,propertyKeyTypes:()=>Oe,randomString:()=>ve,required:()=>Ve,safeExtend:()=>Re,shallowClone:()=>Te,slugify:()=>be,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>Ze,uint8ArrayToBase64url:()=>$e,uint8ArrayToHex:()=>tt,unwrapMessage:()=>Ge});function ee(e){return e}function te(e){return e}function ne(e){}function re(e){throw Error(`Unexpected value in exhaustive check`)}function ie(e){}function ae(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function p(e,t=`|`){return e.map(e=>_(e)).join(t)}function oe(e,t){return typeof t==`bigint`?t.toString():t}function se(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function ce(e){return e==null}function le(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ue(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var de=Symbol(`evaluating`);function m(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==de)return r===void 0&&(r=de,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function fe(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function pe(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function me(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function he(e){return me(e._zod.def)}function ge(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function _e(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function ve(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function ye(e){return JSON.stringify(e)}function be(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var xe=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Se(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Ce=se(()=>{if(u.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function we(e){if(Se(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Se(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Te(e){return we(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Ee(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var De=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},Oe=new Set([`string`,`number`,`symbol`]),ke=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function Ae(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function h(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function g(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function je(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function _(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Me(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var Ne={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Pe={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Fe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return h(e,me(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return pe(this,`shape`,e),e},checks:[]}))}function Ie(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return h(e,me(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return pe(this,`shape`,r),r},checks:[]}))}function Le(e,t){if(!we(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return h(e,me(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return pe(this,`shape`,n),n}}))}function Re(e,t){if(!we(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return h(e,me(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return pe(this,`shape`,n),n}}))}function ze(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return h(e,me(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return pe(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Be(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return h(t,me(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return pe(this,`shape`,i),i},checks:[]}))}function Ve(e,t,n){return h(t,me(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return pe(this,`shape`,i),i}}))}function He(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ue(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function We(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ge(e){return typeof e==`string`?e:e?.message}function v(e,t,n){let r=e.message?e.message:Ge(e.inst?._zod.def?.error?.(e))??Ge(t?.error?.(e))??Ge(n.customError?.(e))??Ge(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function Ke(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function qe(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function y(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Je(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ye(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Xe(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Ze(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Qe(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return Xe(t+`=`.repeat((4-t.length%4)%4))}function $e(e){return Ze(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function et(e){let t=e.replace(/^0x/,``);if(t.length%2!=0)throw Error(`Invalid hex string length`);let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function tt(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var nt=class{constructor(...e){}},rt=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,oe,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},it=o(`$ZodError`,rt),b=o(`$ZodError`,rt,{Parent:Error});function at(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ot(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}function st(e,t=e=>e.message){let n={errors:[]},r=(e,i=[])=>{var a,o;for(let s of e.issues)if(s.code===`invalid_union`&&s.errors.length)s.errors.map(e=>r({issues:e},[...i,...s.path]));else if(s.code===`invalid_key`)r({issues:s.issues},[...i,...s.path]);else if(s.code===`invalid_element`)r({issues:s.issues},[...i,...s.path]);else{let e=[...i,...s.path];if(e.length===0){n.errors.push(t(s));continue}let r=n,c=0;for(;c<e.length;){let n=e[c],i=c===e.length-1;typeof n==`string`?(r.properties??={},(a=r.properties)[n]??(a[n]={errors:[]}),r=r.properties[n]):(r.items??=[],(o=r.items)[n]??(o[n]={errors:[]}),r=r.items[n]),i&&r.errors.push(t(s)),c++}}};return r(e),n}function ct(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function lt(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${ct(e.path)}`);return t.join(`
|
|
3
3
|
`)}var ut=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new c;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>v(e,a,d())));throw xe(t,i?.callee),t}return o.value},dt=ut(b),ft=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>v(e,a,d())));throw xe(t,i?.callee),t}return o.value},pt=ft(b),mt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new c;return a.issues.length?{success:!1,error:new(e??it)(a.issues.map(e=>v(e,i,d())))}:{success:!0,data:a.value}},ht=mt(b),gt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>v(e,i,d())))}:{success:!0,data:a.value}},_t=gt(b),vt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ut(e)(t,n,i)},yt=vt(b),bt=e=>(t,n,r)=>ut(e)(t,n,r),xt=bt(b),St=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ft(e)(t,n,i)},Ct=St(b),wt=e=>async(t,n,r)=>ft(e)(t,n,r),Tt=wt(b),Et=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return mt(e)(t,n,i)},Dt=Et(b),Ot=e=>(t,n,r)=>mt(e)(t,n,r),kt=Ot(b),At=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return gt(e)(t,n,i)},jt=At(b),Mt=e=>async(t,n,r)=>gt(e)(t,n,r),Nt=Mt(b),Pt=n({base64:()=>cn,base64url:()=>ln,bigint:()=>bn,boolean:()=>Cn,browserEmail:()=>$t,cidrv4:()=>on,cidrv6:()=>sn,cuid:()=>Ft,cuid2:()=>It,date:()=>hn,datetime:()=>vn,domain:()=>dn,duration:()=>Vt,e164:()=>pn,email:()=>Jt,emoji:()=>tn,extendedDuration:()=>Ht,guid:()=>Ut,hex:()=>On,hostname:()=>un,html5Email:()=>Yt,httpProtocol:()=>fn,idnEmail:()=>Qt,integer:()=>xn,ipv4:()=>nn,ipv6:()=>rn,ksuid:()=>zt,lowercase:()=>En,mac:()=>an,md5_base64:()=>Mn,md5_base64url:()=>Nn,md5_hex:()=>jn,nanoid:()=>Bt,null:()=>wn,number:()=>Sn,rfc5322Email:()=>Xt,sha1_base64:()=>Fn,sha1_base64url:()=>In,sha1_hex:()=>Pn,sha256_base64:()=>Rn,sha256_base64url:()=>zn,sha256_hex:()=>Ln,sha384_base64:()=>Vn,sha384_base64url:()=>Hn,sha384_hex:()=>Bn,sha512_base64:()=>Wn,sha512_base64url:()=>Gn,sha512_hex:()=>Un,string:()=>yn,time:()=>_n,ulid:()=>Lt,undefined:()=>Tn,unicodeEmail:()=>Zt,uppercase:()=>Dn,uuid:()=>Wt,uuid4:()=>Gt,uuid6:()=>Kt,uuid7:()=>qt,xid:()=>Rt}),Ft=/^[cC][0-9a-z]{6,}$/,It=/^[0-9a-z]+$/,Lt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Rt=/^[0-9a-vA-V]{20}$/,zt=/^[A-Za-z0-9]{27}$/,Bt=/^[a-zA-Z0-9_-]{21}$/,Vt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ht=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ut=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Wt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Gt=Wt(4),Kt=Wt(6),qt=Wt(7),Jt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Yt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Xt=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Zt=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Qt=Zt,$t=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,en=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function tn(){return new RegExp(en,`u`)}var nn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,rn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,an=e=>{let t=Ae(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},on=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,sn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,cn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ln=/^[A-Za-z0-9_-]*$/,un=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,dn=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,fn=/^https?$/,pn=/^\+[1-9]\d{6,14}$/,mn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,hn=RegExp(`^${mn}$`);function gn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function _n(e){return RegExp(`^${gn(e)}$`)}function vn(e){let t=gn({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${mn}T(?:${r})$`)}var yn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},bn=/^-?\d+n?$/,xn=/^-?\d+$/,Sn=/^-?\d+(?:\.\d+)?$/,Cn=/^(?:true|false)$/i,wn=/^null$/i,Tn=/^undefined$/i,En=/^[^A-Z]*$/,Dn=/^[^a-z]*$/,On=/^[0-9a-fA-F]*$/;function kn(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function An(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var jn=/^[0-9a-fA-F]{32}$/,Mn=kn(22,`==`),Nn=An(22),Pn=/^[0-9a-fA-F]{40}$/,Fn=kn(27,`=`),In=An(27),Ln=/^[0-9a-fA-F]{64}$/,Rn=kn(43,`=`),zn=An(43),Bn=/^[0-9a-fA-F]{96}$/,Vn=kn(64,``),Hn=An(64),Un=/^[0-9a-fA-F]{128}$/,Wn=kn(86,`==`),Gn=An(86),x=o(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Kn={number:`number`,bigint:`bigint`,object:`date`},qn=o(`$ZodCheckLessThan`,(e,t)=>{x.init(e,t);let n=Kn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Jn=o(`$ZodCheckGreaterThan`,(e,t)=>{x.init(e,t);let n=Kn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Yn=o(`$ZodCheckMultipleOf`,(e,t)=>{x.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ue(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Xn=o(`$ZodCheckNumberFormat`,(e,t)=>{x.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ne[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=xn)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Zn=o(`$ZodCheckBigIntFormat`,(e,t)=>{x.init(e,t);let[n,r]=Pe[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Qn=o(`$ZodCheckMaxSize`,(e,t)=>{var n;x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ce(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:Ke(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$n=o(`$ZodCheckMinSize`,(e,t)=>{var n;x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ce(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:Ke(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),er=o(`$ZodCheckSizeEquals`,(e,t)=>{var n;x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ce(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:Ke(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),tr=o(`$ZodCheckMaxLength`,(e,t)=>{var n;x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ce(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=qe(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nr=o(`$ZodCheckMinLength`,(e,t)=>{var n;x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ce(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=qe(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),rr=o(`$ZodCheckLengthEquals`,(e,t)=>{var n;x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ce(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=qe(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ir=o(`$ZodCheckStringFormat`,(e,t)=>{var n,r;x.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ar=o(`$ZodCheckRegex`,(e,t)=>{ir.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),or=o(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=En,ir.init(e,t)}),sr=o(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Dn,ir.init(e,t)}),cr=o(`$ZodCheckIncludes`,(e,t)=>{x.init(e,t);let n=Ae(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),lr=o(`$ZodCheckStartsWith`,(e,t)=>{x.init(e,t);let n=RegExp(`^${Ae(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ur=o(`$ZodCheckEndsWith`,(e,t)=>{x.init(e,t);let n=RegExp(`.*${Ae(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function dr(e,t,n){e.issues.length&&t.issues.push(...We(n,e.issues))}var fr=o(`$ZodCheckProperty`,(e,t)=>{x.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>dr(n,e,t.property));dr(n,e,t.property)}}),pr=o(`$ZodCheckMimeType`,(e,t)=>{x.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),mr=o(`$ZodCheckOverwrite`,(e,t)=>{x.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),hr=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
4
4
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
@@ -109,10 +109,10 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
109
109
|
- omitted: host decides border`)}),I({method:V(`ui/request-display-mode`),params:I({mode:Hg.describe(`The display mode being requested.`)})});var i_=I({mode:Hg.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),a_=R([V(`model`),V(`app`)]).describe(`Tool visibility scope - who can access the tool.`);I({resourceUri:A().optional(),visibility:F(a_).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
110
110
|
- "model": Tool visible to and callable by the agent
|
|
111
111
|
- "app": Tool callable by the app from this server only`),csp:ff().optional(),permissions:ff().optional()}),I({mimeTypes:F(A()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),I({method:V(`ui/download-file`),params:I({contents:F(R([jh,Mh])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),I({method:V(`ui/message`),params:I({role:V(`user`).describe(`Message role, currently only "user" is supported.`),content:F(Nh).describe(`Message content blocks (text, image, etc.).`)})}),I({method:V(`ui/notifications/sandbox-resource-ready`),params:I({html:A().describe(`HTML content to load into the inner iframe.`),sandbox:A().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:qg.optional().describe(`CSP configuration from resource metadata.`),permissions:Jg.optional().describe(`Sandbox permissions from resource metadata.`)})});var o_=I({method:V(`ui/notifications/tool-result`),params:Hh.describe(`Standard MCP tool execution result.`)}),s_=I({toolInfo:I({id:cm.optional().describe(`JSON-RPC id of the tools/call request.`),tool:zh.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Vg.optional().describe(`Current color theme preference.`),styles:$g.optional().describe(`Style configuration for theming the app.`),displayMode:Hg.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:F(Hg).optional().describe(`Display modes the host supports.`),containerDimensions:R([I({height:M().describe(`Fixed container height in pixels.`)}),I({maxHeight:R([M(),af()]).optional().describe(`Maximum container height in pixels.`)})]).and(R([I({width:M().describe(`Fixed container width in pixels.`)}),I({maxWidth:R([M(),af()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
112
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:A().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:A().optional().describe(`User's timezone in IANA format.`),userAgent:A().optional().describe(`Host application identifier.`),platform:R([V(`web`),V(`desktop`),V(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:I({touch:N().optional().describe(`Whether the device supports touch input.`),hover:N().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:I({top:M().describe(`Top safe area inset in pixels.`),right:M().describe(`Right safe area inset in pixels.`),bottom:M().describe(`Bottom safe area inset in pixels.`),left:M().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),c_=I({method:V(`ui/notifications/host-context-changed`),params:s_.describe(`Partial context update containing only changed fields.`)});I({method:V(`ui/update-model-context`),params:I({content:F(Nh).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:z(A(),P().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),I({method:V(`ui/initialize`),params:I({appInfo:Cm.describe(`App identification (name and version).`),appCapabilities:r_.describe(`Features and capabilities this app provides.`),protocolVersion:A().describe(`Protocol version this app supports.`)})});var l_=I({protocolVersion:A().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:Cm.describe(`Host application identification and version.`),hostCapabilities:n_.describe(`Features and capabilities provided by the host.`),hostContext:s_.describe(`Rich context about the host environment.`)}).passthrough(),u_={target:`draft-2020-12`};async function d_(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](u_);if(n.vendor===`zod`){let{z:n}=await Lg(async()=>{let{z:e}=await Promise.resolve().then(()=>Zp);return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function f_(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function p_(e){let t=document.documentElement;t.setAttribute(`data-theme`,e),t.style.colorScheme=e}function m_(e,t=document.documentElement){for(let[n,r]of Object.entries(e))r!==void 0&&t.style.setProperty(n,r)}function h_(e){if(document.getElementById(`__mcp-host-fonts`))return;let t=document.createElement(`style`);t.id=`__mcp-host-fonts`,t.textContent=e,document.head.appendChild(t)}var g_=class e extends Rg{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Yg,toolinputpartial:Xg,toolresult:o_,toolcancelled:Zg,hostcontextchanged:c_};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||d({jitless:!0}),this.setRequestHandler(Nm,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=Ng(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await f_(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await f_(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await d_(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await d_(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(e_,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Wh,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(Bh,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},Hh,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},ph,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},sh,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?og:ag;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},Kg,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},vm,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Wg,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},Gg,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},i_,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new Bg(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:zg}},l_,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function __(e){return e===`open_workspace`||e===`read_file`||e===`write_file`||e===`edit_file`||e===`grep_files`||e===`find_files`||e===`list_directory`||e===`run_shell`||e===`review_changes`||e===`read`||e===`write`||e===`edit`||e===`grep`||e===`glob`||e===`ls`||e===`bash`}function v_(e){return e===`read_file`||e===`read`}function y_(e){return e===`write_file`||e===`write`}function b_(e){return e===`edit_file`||e===`edit`}function x_(e){return e===`grep_files`||e===`find_files`||e===`grep`||e===`glob`}function S_(e){return e===`run_shell`||e===`bash`}function C_(e){return e===`review_changes`}function w_(e){return!!(e&&typeof e==`object`)}function T_(e){return e?.content?.map(e=>e.type===`text`?e.text??``:`[${e.mimeType??`image`} image payload]`).filter(Boolean).join(`
|
|
112
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:A().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:A().optional().describe(`User's timezone in IANA format.`),userAgent:A().optional().describe(`Host application identifier.`),platform:R([V(`web`),V(`desktop`),V(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:I({touch:N().optional().describe(`Whether the device supports touch input.`),hover:N().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:I({top:M().describe(`Top safe area inset in pixels.`),right:M().describe(`Right safe area inset in pixels.`),bottom:M().describe(`Bottom safe area inset in pixels.`),left:M().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),c_=I({method:V(`ui/notifications/host-context-changed`),params:s_.describe(`Partial context update containing only changed fields.`)});I({method:V(`ui/update-model-context`),params:I({content:F(Nh).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:z(A(),P().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),I({method:V(`ui/initialize`),params:I({appInfo:Cm.describe(`App identification (name and version).`),appCapabilities:r_.describe(`Features and capabilities this app provides.`),protocolVersion:A().describe(`Protocol version this app supports.`)})});var l_=I({protocolVersion:A().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:Cm.describe(`Host application identification and version.`),hostCapabilities:n_.describe(`Features and capabilities provided by the host.`),hostContext:s_.describe(`Rich context about the host environment.`)}).passthrough(),u_={target:`draft-2020-12`};async function d_(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](u_);if(n.vendor===`zod`){let{z:n}=await Lg(async()=>{let{z:e}=await Promise.resolve().then(()=>Zp);return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function f_(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function p_(e){let t=document.documentElement;t.setAttribute(`data-theme`,e),t.style.colorScheme=e}function m_(e,t=document.documentElement){for(let[n,r]of Object.entries(e))r!==void 0&&t.style.setProperty(n,r)}function h_(e){if(document.getElementById(`__mcp-host-fonts`))return;let t=document.createElement(`style`);t.id=`__mcp-host-fonts`,t.textContent=e,document.head.appendChild(t)}var g_=class e extends Rg{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Yg,toolinputpartial:Xg,toolresult:o_,toolcancelled:Zg,hostcontextchanged:c_};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||d({jitless:!0}),this.setRequestHandler(Nm,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=Ng(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await f_(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await f_(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await d_(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await d_(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(e_,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Wh,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(Bh,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},Hh,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},ph,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},sh,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?og:ag;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},Kg,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},vm,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Wg,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},Gg,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},i_,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new Bg(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:zg}},l_,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function __(e){return e===`open_workspace`||e===`read_file`||e===`write_file`||e===`edit_file`||e===`grep_files`||e===`find_files`||e===`list_directory`||e===`run_shell`||e===`show_changes`||e===`read`||e===`write`||e===`edit`||e===`grep`||e===`glob`||e===`ls`||e===`bash`}function v_(e){return e===`read_file`||e===`read`}function y_(e){return e===`write_file`||e===`write`}function b_(e){return e===`edit_file`||e===`edit`}function x_(e){return e===`grep_files`||e===`find_files`||e===`grep`||e===`glob`}function S_(e){return e===`run_shell`||e===`bash`}function C_(e){return e===`show_changes`}function w_(e){return!!(e&&typeof e==`object`)}function T_(e){return e?.content?.map(e=>e.type===`text`?e.text??``:`[${e.mimeType??`image`} image payload]`).filter(Boolean).join(`
|
|
113
113
|
|
|
114
|
-
`)??``}function E_(e,t){let n=e?.[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function D_(e){return e.tool===`open_workspace`?Number(e.summary?.agentsFiles??0)>0||Number(e.summary?.skills??0)>0||Number(e.summary?.skillDiagnostics??0)>0||!!e.agentsFiles?.length||!!e.availableAgentsFiles?.length||!!e.skills?.length||!!e.skillDiagnostics?.length:C_(e.tool)?!!(e.files?.length||e.payload?.patch):!!e.payload}var O_=null,k_=!1,A_=null,Z,Q=null,j_=!1,M_=!1,N_=null,P_=null,F_=null,I_=document.querySelector(`#app`);if(!I_)throw Error(`Missing #app root element.`);var L_=I_;R_();async function R_(){B_(),O_=new g_({name:`devspace-tool-cards`,version:`0.4.0`},{}),O_.ontoolresult=e=>{let t=rv(e),n=nv(e),r=n?{...t,...n}:t,i=tv(e);if(!i||!w_(r)){Q=null,j_=!1,M_=!1,N_=`No result card is available for this tool result.`,B_();return}Q={...r,tool:i},j_=!1,M_=!1,N_=null,B_()},O_.onhostcontextchanged=e=>{Z={...Z,...e},z_(),H_()},O_.onteardown=async()=>(W_(),{});try{await O_.connect();let e=O_.getHostContext();e&&(Z=e),z_(),k_=!0}catch(e){A_=e instanceof Error?e.message:String(e)}B_()}function z_(){Z?.theme&&p_(Z.theme),Z?.styles?.variables&&m_(Z.styles.variables),Z?.styles?.css?.fonts&&h_(Z.styles.css.fonts);let e=Z?.safeAreaInsets;e&&(document.body.style.padding=`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`)}function B_(){if(W_(),A_){V_(A_,`error`);return}if(!k_){V_(`Connecting to host...`);return}if(!Q){V_(N_??`Waiting for a tool result.`,N_?`error`:`muted`);return}let e=$_(Q);if(C_(Q.tool)){Y_(Q,e);return}let t=D_(Q),n=$(`main`,{className:`shell`}),r=$(`section`,{className:`tool-card ${e.tone}`}),i=$(`button`,{className:`tool-header`,type:`button`,ariaExpanded:String(j_),disabled:!t});t&&i.addEventListener(`click`,()=>{j_=!j_,B_()});let a=$(`span`,{className:`tool-icon`,ariaHidden:`true`});a.innerHTML=e.icon;let o=$(`span`,{className:`tool-main`}),s=$(`span`,{className:`tool-title`,text:e.title}),c=$(`span`,{className:`tool-label`,text:e.label,title:e.label});if(o.append(s,c),i.append(a,o,J_(Q),X_(j_,t)),r.append(i),j_){let e=$(`div`,{className:`tool-body`});F_=e,r.append(e)}n.append(r),L_.replaceChildren(n),H_()}function V_(e,t=`muted`){let n=$(`main`,{className:`shell`});n.append($(`section`,{className:`empty ${t}`,text:e})),L_.replaceChildren(n)}async function H_(){if(!Q||!F_||!j_&&!C_(Q.tool))return;let e=F_;if(N_){K_(e,N_,`error`);return}if(Q.tool===`open_workspace`){q_(e,Z_(Q),`open_workspace`);return}if(U_(Q)){if(P_){P_.update({card:Q,hostContext:Z,errorMessage:N_});return}K_(e,`Loading details...`);let{mountHeavyPayload:t}=await Lg(async()=>{let{mountHeavyPayload:e}=await import(`./heavy-payload
|
|
114
|
+
`)??``}function E_(e,t){let n=e?.[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function D_(e){return e.tool===`open_workspace`?Number(e.summary?.agentsFiles??0)>0||Number(e.summary?.skills??0)>0||Number(e.summary?.skillDiagnostics??0)>0||!!e.agentsFiles?.length||!!e.availableAgentsFiles?.length||!!e.skills?.length||!!e.skillDiagnostics?.length:C_(e.tool)?!!(e.files?.length||e.payload?.patch):!!e.payload}var O_=null,k_=!1,A_=null,Z,Q=null,j_=!1,M_=!1,N_=null,P_=null,F_=null,I_=document.querySelector(`#app`);if(!I_)throw Error(`Missing #app root element.`);var L_=I_;R_();async function R_(){B_(),O_=new g_({name:`devspace-tool-cards`,version:`0.4.0`},{}),O_.ontoolresult=e=>{let t=rv(e),n=nv(e),r=n?{...t,...n}:t,i=tv(e);if(!i||!w_(r)){Q=null,j_=!1,M_=!1,N_=`No result card is available for this tool result.`,B_();return}Q={...r,tool:i},j_=!1,M_=!1,N_=null,B_()},O_.onhostcontextchanged=e=>{Z={...Z,...e},z_(),H_()},O_.onteardown=async()=>(W_(),{});try{await O_.connect();let e=O_.getHostContext();e&&(Z=e),z_(),k_=!0}catch(e){A_=e instanceof Error?e.message:String(e)}B_()}function z_(){Z?.theme&&p_(Z.theme),Z?.styles?.variables&&m_(Z.styles.variables),Z?.styles?.css?.fonts&&h_(Z.styles.css.fonts);let e=Z?.safeAreaInsets;e&&(document.body.style.padding=`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`)}function B_(){if(W_(),A_){V_(A_,`error`);return}if(!k_){V_(`Connecting to host...`);return}if(!Q){V_(N_??`Waiting for a tool result.`,N_?`error`:`muted`);return}let e=$_(Q);if(C_(Q.tool)){Y_(Q,e);return}let t=D_(Q),n=$(`main`,{className:`shell`}),r=$(`section`,{className:`tool-card ${e.tone}`}),i=$(`button`,{className:`tool-header`,type:`button`,ariaExpanded:String(j_),disabled:!t});t&&i.addEventListener(`click`,()=>{j_=!j_,B_()});let a=$(`span`,{className:`tool-icon`,ariaHidden:`true`});a.innerHTML=e.icon;let o=$(`span`,{className:`tool-main`}),s=$(`span`,{className:`tool-title`,text:e.title}),c=$(`span`,{className:`tool-label`,text:e.label,title:e.label});if(o.append(s,c),i.append(a,o,J_(Q),X_(j_,t)),r.append(i),j_){let e=$(`div`,{className:`tool-body`});F_=e,r.append(e)}n.append(r),L_.replaceChildren(n),H_()}function V_(e,t=`muted`){let n=$(`main`,{className:`shell`});n.append($(`section`,{className:`empty ${t}`,text:e})),L_.replaceChildren(n)}async function H_(){if(!Q||!F_||!j_&&!C_(Q.tool))return;let e=F_;if(N_){K_(e,N_,`error`);return}if(Q.tool===`open_workspace`){q_(e,Z_(Q),`open_workspace`);return}if(U_(Q)){if(P_){P_.update({card:Q,hostContext:Z,errorMessage:N_});return}K_(e,`Loading details...`);let{mountHeavyPayload:t}=await Lg(async()=>{let{mountHeavyPayload:e}=await import(`./heavy-payload--bwRtRpo.js`);return{mountHeavyPayload:e}},__vite__mapDeps([0,1]),import.meta.url);if(e!==F_||!j_||!Q)return;P_=t(e,{card:Q,hostContext:Z,errorMessage:N_});return}if(C_(Q.tool)){let t=M_?void 0:Math.max(3,(Q.files??[]).slice(0,3).length);if(P_){P_.update({card:Q,hostContext:Z,errorMessage:N_,visibleFileCount:t});return}K_(e,`Loading review...`);let{mountReviewPayload:n}=await Lg(async()=>{let{mountReviewPayload:e}=await import(`./review-payload-DxI2fTnP.js`);return{mountReviewPayload:e}},__vite__mapDeps([2,1]),import.meta.url);if(e!==F_||!Q)return;P_=n(e,{card:Q,hostContext:Z,errorMessage:N_,visibleFileCount:t});return}let t=T_(Q.payload);if(!t){K_(e,`No details available.`);return}q_(e,t,Q.tool)}function U_(e){return v_(e.tool)||b_(e.tool)||y_(e.tool)}function W_(){G_(),P_=null,F_=null}function G_(){P_?.unmount(),P_=null}function K_(e,t,n=`muted`){G_(),e.replaceChildren($(`div`,{className:`status ${n}`,text:t}))}function q_(e,t,n){G_(),e.replaceChildren($(`pre`,{className:`text-payload ${n}`,text:t}))}function J_(e){let t=e.summary??{};if(C_(e.tool)){let e=$(`span`,{className:`stats`});return e.setAttribute(`aria-label`,`Review diff statistics`),e.append($(`span`,{className:`add`,text:`+${String(t.additions??0)}`}),$(`span`,{className:`remove`,text:`-${String(t.removals??0)}`})),e}if(b_(e.tool)||y_(e.tool)){let e=$(`span`,{className:`stats`});return e.setAttribute(`aria-label`,`Diff statistics`),e.append($(`span`,{className:`add`,text:`+${String(t.additions??0)}`}),$(`span`,{className:`remove`,text:`-${String(t.removals??0)}`})),e}if(e.tool===`open_workspace`){let e=E_(t,`agentsFiles`)??0,n=E_(t,`skills`)??0,r=$(`span`,{className:`badge-group`});r.setAttribute(`aria-label`,`Workspace summary`);let i=$(`span`,{className:`badge ${e>0?`success`:`muted`}`,text:e>0?`AGENTS.md`:`No AGENTS.md`});return e>0&&i.insertAdjacentHTML(`afterbegin`,dv()),r.append(i,$(`span`,{className:`badge`,text:`${n} skills`})),r}return S_(e.tool)?$(`span`,{className:`badge`,text:`ran · ${String(t.lines??0)} lines`}):(e.tool,$(`span`,{className:`badge`,text:`${String(t.lines??0)} lines`}))}function Y_(e,t){W_();let n=e.files??[];e.summary;let r=M_?n:n.slice(0,3),i=Math.max(0,n.length-r.length),a=$(`main`,{className:`shell`}),o=$(`section`,{className:`tool-card review`}),s=$(`div`,{className:`review-header`}),c=$(`span`,{className:`tool-icon`,ariaHidden:`true`});c.innerHTML=t.icon;let l=$(`div`,{className:`review-title-group`});l.append($(`span`,{className:`tool-title`,text:t.title}),$(`span`,{className:`tool-label`,text:t.label,title:t.label})),s.append(c,l,J_(e));let u=$(`div`,{className:`review-summary`});F_=u;let d=$(`div`,{className:`review-actions`});if(i>0){let e=$(`button`,{className:`review-action`,type:`button`,text:`Show ${i} more ${i===1?`file`:`files`}`});e.addEventListener(`click`,()=>{M_=!0,B_()}),d.append(e)}o.append(s,u),d.childElementCount>0&&o.append(d),a.append(o),L_.replaceChildren(a),H_()}function X_(e,t){let n=$(`span`,{className:t?`chevron ${e?`expanded`:``}`:`chevron`,ariaHidden:`true`});return t&&(n.innerHTML=iv(`<path d="m6 9 6 6 6-6" />`)),n}function Z_(e){let t=e.agentsFiles??[],n=e.availableAgentsFiles??[],r=e.skills??[];return[e.workspaceId?`Workspace: ${e.workspaceId}`:void 0,e.root?`Root: ${e.root}`:void 0,r.length>0?`Skills: ${r.map(e=>e.name??e.path??`unnamed`).join(`, `)}`:`Skills: none`,n.length>0?`Nested instructions: ${n.map(e=>e.path??`unknown`).join(`, `)}`:void 0,t.length>0?`\n${Q_(t)}`:`
|
|
115
115
|
AGENTS.md: none loaded`].filter(e=>typeof e==`string`).join(`
|
|
116
116
|
`)}function Q_(e){return e.map(e=>{let t=e.path??`AGENTS.md`,n=e.content?.trim();return n?`${t}\n\n${n}`:`${t}\n\nNo content loaded.`}).join(`
|
|
117
117
|
|
|
118
|
-
`)}function $_(e){let t=ev(e);switch(e.tool){case`open_workspace`:return{icon:av(),title:`Workspace`,label:t,tone:`workspace`};case`read_file`:case`read`:return{icon:ov(),title:`Read File`,label:t,tone:`read`};case`write_file`:case`write`:return{icon:sv(),title:`Write File`,label:t,tone:`write`};case`edit_file`:case`edit`:return{icon:cv(),title:`Edit File`,label:t,tone:`edit`};case`grep_files`:case`grep`:return{icon:lv(),title:`Grep`,label:t,tone:`search`};case`find_files`:case`glob`:return{icon:uv(),title:`Glob`,label:t,tone:`search`};case`list_directory`:case`ls`:return{icon:fv(),title:`List Directory`,label:t,tone:`directory`};case`run_shell`:case`bash`:return{icon:pv(),title:`Bash`,label:t,tone:`shell`};case`
|
|
118
|
+
`)}function $_(e){let t=ev(e);switch(e.tool){case`open_workspace`:return{icon:av(),title:`Workspace`,label:t,tone:`workspace`};case`read_file`:case`read`:return{icon:ov(),title:`Read File`,label:t,tone:`read`};case`write_file`:case`write`:return{icon:sv(),title:`Write File`,label:t,tone:`write`};case`edit_file`:case`edit`:return{icon:cv(),title:`Edit File`,label:t,tone:`edit`};case`grep_files`:case`grep`:return{icon:lv(),title:`Grep`,label:t,tone:`search`};case`find_files`:case`glob`:return{icon:uv(),title:`Glob`,label:t,tone:`search`};case`list_directory`:case`ls`:return{icon:fv(),title:`List Directory`,label:t,tone:`directory`};case`run_shell`:case`bash`:return{icon:pv(),title:`Bash`,label:t,tone:`shell`};case`show_changes`:return{icon:mv(),title:`Show Changes`,label:t,tone:`review`}}}function ev(e){if(S_(e.tool))return String(e.summary?.command??e.path??e.tool);if(C_(e.tool)){let t=Number(e.summary?.files??e.files?.length??0);return t===0?`No changes since last review`:`${t} changed ${t===1?`file`:`files`}`}return e.path?e.path:e.root?e.root:x_(e.tool)?String(e.summary?.pattern??e.tool):e.tool}function tv(e){let t=e._meta?.tool;return __(t)?t:void 0}function nv(e){let t=e._meta?.card;return t&&typeof t==`object`?t:void 0}function rv(e){return e.structuredContent}function $(e,t={}){let n=document.createElement(e);return t.className&&(n.className=t.className),t.text!==void 0&&(n.textContent=t.text),t.type!==void 0&&`type`in n&&n.setAttribute(`type`,t.type),t.title!==void 0&&(n.title=t.title),t.ariaHidden!==void 0&&n.setAttribute(`aria-hidden`,t.ariaHidden),t.ariaExpanded!==void 0&&n.setAttribute(`aria-expanded`,t.ariaExpanded),t.disabled!==void 0&&`disabled`in n&&(n.disabled=t.disabled),n}function iv(e){return`<svg aria-hidden="true" class="icon-svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8">${e}</svg>`}function av(){return iv(`<path d="M3 7.5h6l2 2h10" /><path d="M3 7.5v10A2.5 2.5 0 0 0 5.5 20h13a2.5 2.5 0 0 0 2.5-2.5v-8H3" />`)}function ov(){return iv(`<path d="M14 3v5h5" /><path d="M6 3h8l5 5v13H6z" /><path d="M9 13h6" /><path d="M9 17h4" />`)}function sv(){return iv(`<path d="M14 3v5h5" /><path d="M6 3h8l5 5v13H6z" /><path d="M12 12v6" /><path d="M9 15h6" />`)}function cv(){return iv(`<path d="M4 20h4l11-11a2.8 2.8 0 0 0-4-4L4 16z" /><path d="m13.5 6.5 4 4" />`)}function lv(){return iv(`<circle cx="11" cy="11" r="6" /><path d="m16 16 4 4" />`)}function uv(){return iv(`<path d="M8 7V4h9l4 4v10h-3" /><path d="M12 4v5h5" /><path d="M4 7h9l4 4v10H4z" /><path d="M13 7v5h4" />`)}function dv(){return`<svg aria-hidden="true" class="badge-icon" fill="none" viewBox="0 0 16 16" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="8" cy="8" r="6" /><path d="m5.5 8 1.7 1.7 3.4-3.5" /></svg>`}function fv(){return iv(`<path d="M8 6h12" /><path d="M8 12h12" /><path d="M8 18h12" /><path d="M4 6h.01" /><path d="M4 12h.01" /><path d="M4 18h.01" />`)}function pv(){return iv(`<path d="m5 7 5 5-5 5" /><path d="M12 17h7" />`)}function mv(){return iv(`<path d="M5 4h14v16H5z" /><path d="M8 8h8" /><path d="M8 12h5" /><path d="M8 16h7" />`)}export{E_ as a,n as c,T_ as i,v_ as n,Lg as o,y_ as r,t as s,b_ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./workspace-app-
|
|
1
|
+
import{c as e}from"./workspace-app-CsMiGtz9.js";import{t}from"./java-C03kBuJH.js";var n=e({default:()=>i}),r=Object.freeze(JSON.parse(`{"displayName":"XML","name":"xml","patterns":[{"begin":"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml","patterns":[{"match":" ([-A-Za-z]+)","name":"entity.other.attribute-name.xml"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"begin":"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.doctype.xml"},"3":{"name":"variable.language.documentroot.xml"}},"end":"\\\\s*(>)","name":"meta.tag.sgml.doctype.xml","patterns":[{"include":"#internalSubset"}]},{"include":"#comments"},{"begin":"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"entity.name.tag.namespace.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml","patterns":[{"include":"#tagStuff"}]},{"begin":"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(/?>)","name":"meta.tag.xml","patterns":[{"include":"#tagStuff"}]},{"include":"#entity"},{"include":"#bare-ampersand"},{"begin":"<%@","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java-props.embedded.xml","patterns":[{"match":"page|include|taglib","name":"keyword.other.page-props.xml"}]},{"begin":"<%[!=]?(?!--)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"(?!--)%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java.embedded.xml","patterns":[{"include":"source.java"}]},{"begin":"<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.unquoted.cdata.xml"}],"repository":{"EntityDecl":{"begin":"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.entity.xml"},"3":{"name":"punctuation.definition.entity.xml"},"4":{"name":"variable.language.entity.xml"},"5":{"name":"keyword.other.entitytype.xml"}},"end":"(>)","patterns":[{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},"bare-ampersand":{"match":"&","name":"invalid.illegal.bad-ampersand.xml"},"comments":{"patterns":[{"begin":"<%--","captures":{"0":{"name":"punctuation.definition.comment.xml"},"end":"--%>","name":"comment.block.xml"}},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.xml"}},"end":"-->","name":"comment.block.xml","patterns":[{"begin":"--(?!>)","captures":{"0":{"name":"invalid.illegal.bad-comments-or-CDATA.xml"}}}]}]},"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"entity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.xml"},"internalSubset":{"begin":"(\\\\[)","captures":{"1":{"name":"punctuation.definition.constant.xml"}},"end":"(])","name":"meta.internalsubset.xml","patterns":[{"include":"#EntityDecl"},{"include":"#parameterEntity"},{"include":"#comments"}]},"parameterEntity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)","name":"constant.character.parameter-entity.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"tagStuff":{"patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*="},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]}},"scopeName":"text.xml","embeddedLangs":["java"]}`)),i=[...t,r];export{n,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./xml-
|
|
1
|
+
import{t as e}from"./xml-DrhRYxTS.js";var t=Object.freeze(JSON.parse(`{"displayName":"XSL","name":"xsl","patterns":[{"begin":"(<)(xsl)((:))(template)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)","name":"meta.tag.xml.template","patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":" (?:([-0-9A-Z_a-z]+)((:)))?([-A-Za-z]+)"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"include":"text.xml"}],"repository":{"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml"}},"scopeName":"text.xml.xsl","embeddedLangs":["xml"]}`)),n=[...e,t];export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./workspace-app-BLeU1qC_.js";var t=e({default:()=>n}),n=[Object.freeze(JSON.parse(`{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^( +)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[\\\\t ]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([ \\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))"}]},"flow-scalar-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"'(?!')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"''","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![],}])","end":"(?=[],}])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=[!\\\\&])","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?"},{"match":"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}`))];export{t as n,n as t};
|
|
1
|
+
import{c as e}from"./workspace-app-CsMiGtz9.js";var t=e({default:()=>n}),n=[Object.freeze(JSON.parse(`{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^( +)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[\\\\t ]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([ \\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))"}]},"flow-scalar-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"'(?!')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"''","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![],}])","end":"(?=[],}])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=[!\\\\&])","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?"},{"match":"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}`))];export{t as n,n as t};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>DevSpace Diff</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/workspace-app-
|
|
7
|
+
<script type="module" crossorigin src="./assets/workspace-app-CsMiGtz9.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="./assets/workspace-app-8--oTbCd.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -14,8 +14,8 @@ ChatGPT should call `open_workspace` once for a project folder:
|
|
|
14
14
|
}
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
The result includes a `workspaceId`. All later file, search, edit,
|
|
18
|
-
shell calls should reuse that same `workspaceId`.
|
|
17
|
+
The result includes a `workspaceId`. All later file, search, edit, show-changes,
|
|
18
|
+
and shell calls should reuse that same `workspaceId`.
|
|
19
19
|
|
|
20
20
|
Do not reopen the same folder unless:
|
|
21
21
|
|
|
@@ -97,37 +97,37 @@ Set `DEVSPACE_SKILLS=0` to hide skills from workspace output.
|
|
|
97
97
|
|
|
98
98
|
## Tool Names
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Short names are the default:
|
|
101
|
+
|
|
102
|
+
- `open_workspace`
|
|
103
|
+
- `read`
|
|
104
|
+
- `write`
|
|
105
|
+
- `edit`
|
|
106
|
+
- `bash`
|
|
107
|
+
|
|
108
|
+
By default, DevSpace also runs in `DEVSPACE_TOOL_MODE=minimal`, so dedicated
|
|
109
|
+
`grep`, `glob`, and `ls` tools are hidden. Use `bash` with command-line tools
|
|
110
|
+
such as `rg`, `find`, and `ls` for search and directory inspection.
|
|
111
|
+
|
|
112
|
+
Legacy names are available with `DEVSPACE_TOOL_NAMING=legacy`:
|
|
101
113
|
|
|
102
114
|
- `open_workspace`
|
|
103
115
|
- `read_file`
|
|
104
116
|
- `write_file`
|
|
105
117
|
- `edit_file`
|
|
106
|
-
- `grep_files`
|
|
107
|
-
- `find_files`
|
|
108
|
-
- `list_directory`
|
|
109
118
|
- `run_shell`
|
|
110
119
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
- `open_workspace`
|
|
114
|
-
- `read`
|
|
115
|
-
- `write`
|
|
116
|
-
- `edit`
|
|
117
|
-
- `grep`
|
|
118
|
-
- `glob`
|
|
119
|
-
- `ls`
|
|
120
|
-
- `bash`
|
|
120
|
+
Use `DEVSPACE_TOOL_MODE=full` to restore dedicated search and directory tools.
|
|
121
121
|
|
|
122
|
-
##
|
|
122
|
+
## Show Changes
|
|
123
123
|
|
|
124
|
-
By default, `DEVSPACE_WIDGETS=
|
|
124
|
+
By default, `DEVSPACE_WIDGETS=full`.
|
|
125
125
|
|
|
126
|
-
In that mode, DevSpace
|
|
127
|
-
|
|
126
|
+
In that mode, DevSpace attaches widget UI to the exposed workspace, file, edit,
|
|
127
|
+
and shell tools. The aggregate `show_changes` tool is not exposed by default.
|
|
128
128
|
|
|
129
|
-
Use `DEVSPACE_WIDGETS=off` to disable widget UI, or `DEVSPACE_WIDGETS=
|
|
130
|
-
|
|
129
|
+
Use `DEVSPACE_WIDGETS=off` to disable widget UI, or `DEVSPACE_WIDGETS=changes`
|
|
130
|
+
to expose the aggregate show-changes flow.
|
|
131
131
|
|
|
132
132
|
## Shell Use
|
|
133
133
|
|
package/docs/configuration.md
CHANGED
|
@@ -63,12 +63,15 @@ MCP clients discover metadata from:
|
|
|
63
63
|
|
|
64
64
|
| Value | Behavior |
|
|
65
65
|
| --- | --- |
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
66
|
+
| `short` | Default. Uses `read`, `edit`, `bash`, and related names. |
|
|
67
|
+
| `legacy` | Uses `read_file`, `edit_file`, `run_shell`, and related names. |
|
|
68
68
|
|
|
69
|
-
`DEVSPACE_TOOL_MODE
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
`DEVSPACE_TOOL_MODE` controls the tool surface.
|
|
70
|
+
|
|
71
|
+
| Value | Behavior |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| `minimal` | Default. Disables dedicated search and list tools. Clients use the shell tool with `rg`, `grep`, `find`, `ls`, or `tree` for inspection. |
|
|
74
|
+
| `full` | Enables dedicated `grep`, `glob`, and `ls` tools. |
|
|
72
75
|
|
|
73
76
|
## Widgets
|
|
74
77
|
|
|
@@ -76,8 +79,8 @@ minimal mode, clients use the shell tool with `rg`, `grep`, `find`, `ls`, or
|
|
|
76
79
|
|
|
77
80
|
| Value | Behavior |
|
|
78
81
|
| --- | --- |
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
82
|
+
| `full` | Default. Widget UI is attached to exposed workspace, file, edit, and shell tools. |
|
|
83
|
+
| `changes` | Enables the aggregate `show_changes` tool and attaches widget UI to `open_workspace` and `show_changes`. |
|
|
81
84
|
| `off` | Disables widget UI. |
|
|
82
85
|
|
|
83
86
|
## Skills
|
|
@@ -119,9 +122,9 @@ DEVSPACE_OAUTH_OWNER_TOKEN="$(openssl rand -base64 32)" \
|
|
|
119
122
|
DEVSPACE_ALLOWED_ROOTS="$HOME/personal,$HOME/work" \
|
|
120
123
|
DEVSPACE_PUBLIC_BASE_URL="https://devspace.example.com" \
|
|
121
124
|
DEVSPACE_WORKTREE_ROOT="$HOME/.devspace/worktrees" \
|
|
122
|
-
DEVSPACE_TOOL_MODE="
|
|
123
|
-
DEVSPACE_TOOL_NAMING="
|
|
124
|
-
DEVSPACE_WIDGETS="
|
|
125
|
+
DEVSPACE_TOOL_MODE="minimal" \
|
|
126
|
+
DEVSPACE_TOOL_NAMING="short" \
|
|
127
|
+
DEVSPACE_WIDGETS="full" \
|
|
125
128
|
npx @waishnav/devspace serve
|
|
126
129
|
```
|
|
127
130
|
|
package/docs/gotchas.md
CHANGED
|
@@ -204,11 +204,12 @@ If a skill appears in `open_workspace`, the model must read that skill's
|
|
|
204
204
|
|
|
205
205
|
## Review Card Does Not Appear
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
Per-tool widget cards are enabled by default with:
|
|
208
208
|
|
|
209
209
|
```bash
|
|
210
|
-
DEVSPACE_WIDGETS=
|
|
210
|
+
DEVSPACE_WIDGETS=full
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
The
|
|
214
|
-
clients may ignore ChatGPT Apps widget
|
|
213
|
+
The aggregate `show_changes` tool is only exposed with
|
|
214
|
+
`DEVSPACE_WIDGETS=changes`. Plain MCP clients may ignore ChatGPT Apps widget
|
|
215
|
+
metadata and only show text results.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waishnav/devspace",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Expose a secure local coding workspace through an MCP server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/server.js",
|
|
@@ -23,10 +23,8 @@
|
|
|
23
23
|
"clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
|
|
24
24
|
"build": "npm run clean && npm run build:app && tsc -p tsconfig.build.json",
|
|
25
25
|
"build:app": "vite build",
|
|
26
|
-
"dev": "
|
|
26
|
+
"dev": "node scripts/dev-server.mjs",
|
|
27
27
|
"start": "node dist/cli.js serve",
|
|
28
|
-
"release:build": "node scripts/build-release.mjs",
|
|
29
|
-
"release:start": "node scripts/ensure-native-deps.mjs && node releases/current/dist/cli.js serve",
|
|
30
28
|
"test": "tsx src/config.test.ts && tsx src/roots.test.ts && tsx src/skills.test.ts && tsx src/workspaces.test.ts && tsx src/review-checkpoints.test.ts",
|
|
31
29
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
32
30
|
},
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { readdirSync, statSync, watch } from "node:fs";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
const repoRoot = resolve(fileURLToPath(new URL("..", import.meta.url)));
|
|
7
|
+
const watchRoots = ["src"].map((entry) => join(repoRoot, entry));
|
|
8
|
+
const restartDelayMs = 750;
|
|
9
|
+
const crashDelayMs = 1500;
|
|
10
|
+
|
|
11
|
+
let child;
|
|
12
|
+
let restartTimer;
|
|
13
|
+
let stoppingForRestart = false;
|
|
14
|
+
let shuttingDown = false;
|
|
15
|
+
|
|
16
|
+
function log(message) {
|
|
17
|
+
console.error(`[devspace:dev] ${message}`);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function start() {
|
|
21
|
+
stoppingForRestart = false;
|
|
22
|
+
child = spawn("npx", ["tsx", "src/cli.ts", "serve"], {
|
|
23
|
+
cwd: repoRoot,
|
|
24
|
+
env: process.env,
|
|
25
|
+
stdio: "inherit",
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
child.on("exit", (code, signal) => {
|
|
29
|
+
child = undefined;
|
|
30
|
+
if (shuttingDown) return;
|
|
31
|
+
if (stoppingForRestart) return;
|
|
32
|
+
|
|
33
|
+
log(`server exited (${signal ?? code ?? "unknown"}); restarting in ${crashDelayMs}ms`);
|
|
34
|
+
scheduleRestart(crashDelayMs);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function scheduleRestart(delayMs = restartDelayMs) {
|
|
39
|
+
clearTimeout(restartTimer);
|
|
40
|
+
restartTimer = setTimeout(restart, delayMs);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function restart() {
|
|
44
|
+
if (shuttingDown) return;
|
|
45
|
+
clearTimeout(restartTimer);
|
|
46
|
+
|
|
47
|
+
if (!child) {
|
|
48
|
+
start();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
stoppingForRestart = true;
|
|
53
|
+
child.once("exit", () => {
|
|
54
|
+
if (!shuttingDown) start();
|
|
55
|
+
});
|
|
56
|
+
child.kill("SIGTERM");
|
|
57
|
+
|
|
58
|
+
setTimeout(() => {
|
|
59
|
+
if (child && stoppingForRestart) child.kill("SIGKILL");
|
|
60
|
+
}, 3000).unref();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function watchDirectory(root) {
|
|
64
|
+
const watchers = [];
|
|
65
|
+
const seen = new Set();
|
|
66
|
+
|
|
67
|
+
function addDirectory(dir) {
|
|
68
|
+
if (seen.has(dir)) return;
|
|
69
|
+
seen.add(dir);
|
|
70
|
+
|
|
71
|
+
const watcher = watch(dir, (event, filename) => {
|
|
72
|
+
if (!filename) {
|
|
73
|
+
scheduleRestart();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const path = join(dir, filename.toString());
|
|
78
|
+
if (event === "rename") maybeAddDirectory(path);
|
|
79
|
+
scheduleRestart();
|
|
80
|
+
});
|
|
81
|
+
watchers.push(watcher);
|
|
82
|
+
|
|
83
|
+
for (const entry of readdirSync(dir)) {
|
|
84
|
+
maybeAddDirectory(join(dir, entry));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function maybeAddDirectory(path) {
|
|
89
|
+
try {
|
|
90
|
+
const stats = statSync(path);
|
|
91
|
+
if (stats.isDirectory()) addDirectory(path);
|
|
92
|
+
} catch {
|
|
93
|
+
// The file may have been deleted between the watch event and stat call.
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
addDirectory(root);
|
|
98
|
+
return watchers;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function shutdown() {
|
|
102
|
+
shuttingDown = true;
|
|
103
|
+
clearTimeout(restartTimer);
|
|
104
|
+
if (!child) return process.exit(0);
|
|
105
|
+
|
|
106
|
+
child.once("exit", () => process.exit(0));
|
|
107
|
+
child.kill("SIGTERM");
|
|
108
|
+
setTimeout(() => process.exit(1), 3000).unref();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
for (const signal of ["SIGINT", "SIGTERM"]) {
|
|
112
|
+
process.on(signal, shutdown);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
for (const root of watchRoots) {
|
|
116
|
+
watchDirectory(root);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
log("watching src; server restarts on changes and after crashes");
|
|
120
|
+
start();
|