@nullplatform/mcp 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/approvals.js +1 -0
- package/dist/tools/create-release.js +10 -4
- package/dist/tools/create-scope.js +20 -6
- package/dist/tools/deployments.js +16 -2
- package/dist/tools/logs.js +5 -0
- package/dist/tools/overview.js +3 -0
- package/dist/tools/playbook.js +1 -0
- package/dist/tools/services.js +4 -1
- package/dist/tools/set-params.js +9 -2
- package/dist/tools/status.js +15 -13
- package/dist/ui.js +4 -0
- package/package.json +2 -1
- package/widgets-dist/approvals.html +910 -0
- package/widgets-dist/builds.html +64 -20
- package/widgets-dist/create-app.html +53 -9
- package/widgets-dist/deployments.html +72 -28
- package/widgets-dist/find-apps.html +69 -25
- package/widgets-dist/logs.html +65 -21
- package/widgets-dist/manifest.json +13 -9
- package/widgets-dist/metrics.html +59 -15
- package/widgets-dist/np-panel.html +62 -18
- package/widgets-dist/overview.html +912 -0
- package/widgets-dist/params.html +55 -11
- package/widgets-dist/playbook.html +914 -0
- package/widgets-dist/releases.html +68 -24
- package/widgets-dist/services.html +910 -0
|
@@ -638,9 +638,7 @@ td {
|
|
|
638
638
|
border: 1px solid transparent;
|
|
639
639
|
cursor: pointer;
|
|
640
640
|
border-radius: 8px;
|
|
641
|
-
transition:
|
|
642
|
-
background 0.12s ease,
|
|
643
|
-
border-color 0.12s ease;
|
|
641
|
+
transition: background 0.12s ease;
|
|
644
642
|
}
|
|
645
643
|
/* Separator between rows: a straight, inset hairline drawn as a positioned child, so the
|
|
646
644
|
row's corner radius can't bend it into hooks the way a single-sided border did. */
|
|
@@ -654,10 +652,12 @@ td {
|
|
|
654
652
|
background: var(--line);
|
|
655
653
|
}
|
|
656
654
|
.list-row:hover {
|
|
657
|
-
background: rgba(127, 127, 127, 0.
|
|
658
|
-
border-color: var(--line);
|
|
655
|
+
background: rgba(127, 127, 127, 0.1);
|
|
659
656
|
}
|
|
660
|
-
|
|
657
|
+
/* A hovered row reads as one solid rounded block: drop its own bottom divider AND the one above
|
|
658
|
+
it (`:has` targets the row immediately before the hovered one) so no hairline cuts the corners. */
|
|
659
|
+
.list-row:hover::after,
|
|
660
|
+
.list-row:has(+ .list-row:hover)::after {
|
|
661
661
|
opacity: 0;
|
|
662
662
|
}
|
|
663
663
|
.list-row .app-name {
|
|
@@ -794,6 +794,50 @@ td {
|
|
|
794
794
|
[hidden] {
|
|
795
795
|
display: none;
|
|
796
796
|
}
|
|
797
|
+
|
|
798
|
+
/* playbook reader — the playbook widget's MiniMarkdown output */
|
|
799
|
+
.pb-body {
|
|
800
|
+
font-size: 13.5px;
|
|
801
|
+
line-height: 1.55;
|
|
802
|
+
}
|
|
803
|
+
.pb-body p {
|
|
804
|
+
margin: 8px 0;
|
|
805
|
+
}
|
|
806
|
+
.pb-h {
|
|
807
|
+
font-weight: 650;
|
|
808
|
+
margin: 16px 0 6px;
|
|
809
|
+
}
|
|
810
|
+
.pb-h1 {
|
|
811
|
+
font-size: 16px;
|
|
812
|
+
}
|
|
813
|
+
.pb-h2 {
|
|
814
|
+
font-size: 14.5px;
|
|
815
|
+
}
|
|
816
|
+
.pb-h3,
|
|
817
|
+
.pb-h4 {
|
|
818
|
+
font-size: 13.5px;
|
|
819
|
+
opacity: 0.85;
|
|
820
|
+
}
|
|
821
|
+
.pb-li {
|
|
822
|
+
margin: 4px 0 4px 6px;
|
|
823
|
+
padding-left: 14px;
|
|
824
|
+
position: relative;
|
|
825
|
+
}
|
|
826
|
+
.pb-li::before {
|
|
827
|
+
content: "•";
|
|
828
|
+
position: absolute;
|
|
829
|
+
left: 0;
|
|
830
|
+
opacity: 0.5;
|
|
831
|
+
}
|
|
832
|
+
.pb-code {
|
|
833
|
+
background: rgba(127, 127, 127, 0.1);
|
|
834
|
+
border-radius: 8px;
|
|
835
|
+
padding: 10px 12px;
|
|
836
|
+
margin: 8px 0;
|
|
837
|
+
overflow-x: auto;
|
|
838
|
+
font-size: 12.5px;
|
|
839
|
+
white-space: pre;
|
|
840
|
+
}
|
|
797
841
|
</style></head><body><div id="root"></div><script>"use strict";(()=>{var Hl=Object.defineProperty;var $f=(e,r,n)=>r in e?Hl(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var Ke=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,n)=>(typeof require<"u"?require:r)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var I=(e,r)=>()=>(e&&(r=e(e=0)),r);var Ze=(e,r)=>{for(var n in r)Hl(e,n,{get:r[n],enumerable:!0})};var M=(e,r,n)=>$f(e,typeof r!="symbol"?r+"":r,n);function d(e,r,n){function i(s,u){var p;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(p=s._zod).traits??(p.traits=new Set),s._zod.traits.add(e),r(s,u);for(let m in a.prototype)m in s||Object.defineProperty(s,m,{value:a.prototype[m].bind(s)});s._zod.constr=a,s._zod.def=u}let t=n?.Parent??Object;class o extends t{}Object.defineProperty(o,"name",{value:e});function a(s){var u;let p=n?.Parent?new o:this;i(p,s),(u=p._zod).deferred??(u.deferred=[]);for(let m of p._zod.deferred)m();return p}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}function X(e){return e&&Object.assign(nr,e),nr}var pn,dn,we,nr,dt=I(()=>{pn=Object.freeze({status:"aborted"});dn=Symbol("zod_brand"),we=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},nr={}});var S={};Ze(S,{BIGINT_FORMAT_RANGES:()=>Ai,Class:()=>ji,NUMBER_FORMAT_RANGES:()=>Di,aborted:()=>Ye,allowsEval:()=>Ri,assert:()=>Kf,assertEqual:()=>Vf,assertIs:()=>Bf,assertNever:()=>Jf,assertNotEqual:()=>Wf,assignProp:()=>Oi,cached:()=>ar,captureStackTrace:()=>mn,cleanEnum:()=>cg,cleanRegex:()=>sr,clone:()=>me,createTransparentProxy:()=>tg,defineLazy:()=>L,esc:()=>Qe,escapeRegex:()=>De,extend:()=>og,finalizeIssue:()=>he,floatSafeRemainder:()=>Ti,getElementAtPath:()=>Gf,getEnumValues:()=>ir,getLengthableOrigin:()=>ur,getParsedType:()=>eg,getSizableOrigin:()=>lr,isObject:()=>mt,isPlainObject:()=>ft,issue:()=>Ci,joinValues:()=>_,jsonStringifyReplacer:()=>Ni,merge:()=>ig,normalizeParams:()=>x,nullish:()=>Fe,numKeys:()=>Xf,omit:()=>ng,optionalKeys:()=>Ei,partial:()=>ag,pick:()=>rg,prefixIssues:()=>fe,primitiveTypes:()=>Ui,promiseAllObject:()=>Qf,propertyKeyTypes:()=>cr,randomString:()=>Yf,required:()=>sg,stringifyPrimitive:()=>z,unwrapMessage:()=>or});function Vf(e){return e}function Wf(e){return e}function Bf(e){}function Jf(e){throw new Error}function Kf(e){}function ir(e){let r=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,t])=>r.indexOf(+i)===-1).map(([i,t])=>t)}function _(e,r="|"){return e.map(n=>z(n)).join(r)}function Ni(e,r){return typeof r=="bigint"?r.toString():r}function ar(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Fe(e){return e==null}function sr(e){let r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function Ti(e,r){let n=(e.toString().split(".")[1]||"").length,i=(r.toString().split(".")[1]||"").length,t=n>i?n:i,o=Number.parseInt(e.toFixed(t).replace(".","")),a=Number.parseInt(r.toFixed(t).replace(".",""));return o%a/10**t}function L(e,r,n){Object.defineProperty(e,r,{get(){{let t=n();return e[r]=t,t}throw new Error("cached value already set")},set(t){Object.defineProperty(e,r,{value:t})},configurable:!0})}function Oi(e,r,n){Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Gf(e,r){return r?r.reduce((n,i)=>n?.[i],e):e}function Qf(e){let r=Object.keys(e),n=r.map(i=>e[i]);return Promise.all(n).then(i=>{let t={};for(let o=0;o<r.length;o++)t[r[o]]=i[o];return t})}function Yf(e=10){let r="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=r[Math.floor(Math.random()*r.length)];return n}function Qe(e){return JSON.stringify(e)}function mt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ft(e){if(mt(e)===!1)return!1;let r=e.constructor;if(r===void 0)return!0;let n=r.prototype;return!(mt(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Xf(e){let r=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&r++;return r}function De(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function me(e,r,n){let i=new e._zod.constr(r??e._zod.def);return(!r||n?.parent)&&(i._zod.parent=e),i}function x(e){let r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function tg(e){let r;return new Proxy({},{get(n,i,t){return r??(r=e()),Reflect.get(r,i,t)},set(n,i,t,o){return r??(r=e()),Reflect.set(r,i,t,o)},has(n,i){return r??(r=e()),Reflect.has(r,i)},deleteProperty(n,i){return r??(r=e()),Reflect.deleteProperty(r,i)},ownKeys(n){return r??(r=e()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(n,i){return r??(r=e()),Reflect.getOwnPropertyDescriptor(r,i)},defineProperty(n,i,t){return r??(r=e()),Reflect.defineProperty(r,i,t)}})}function z(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Ei(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}function rg(e,r){let n={},i=e._zod.def;for(let t in r){if(!(t in i.shape))throw new Error(`Unrecognized key: "${t}"`);r[t]&&(n[t]=i.shape[t])}return me(e,{...e._zod.def,shape:n,checks:[]})}function ng(e,r){let n={...e._zod.def.shape},i=e._zod.def;for(let t in r){if(!(t in i.shape))throw new Error(`Unrecognized key: "${t}"`);r[t]&&delete n[t]}return me(e,{...e._zod.def,shape:n,checks:[]})}function og(e,r){if(!ft(r))throw new Error("Invalid input to extend: expected a plain object");let n={...e._zod.def,get shape(){let i={...e._zod.def.shape,...r};return Oi(this,"shape",i),i},checks:[]};return me(e,n)}function ig(e,r){return me(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...r._zod.def.shape};return Oi(this,"shape",n),n},catchall:r._zod.def.catchall,checks:[]})}function ag(e,r,n){let i=r._zod.def.shape,t={...i};if(n)for(let o in n){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(t[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(let o in i)t[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return me(r,{...r._zod.def,shape:t,checks:[]})}function sg(e,r,n){let i=r._zod.def.shape,t={...i};if(n)for(let o in n){if(!(o in t))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(t[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(let o in i)t[o]=new e({type:"nonoptional",innerType:i[o]});return me(r,{...r._zod.def,shape:t,checks:[]})}function Ye(e,r=0){for(let n=r;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function fe(e,r){return r.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function or(e){return typeof e=="string"?e:e?.message}function he(e,r,n){let i={...e,path:e.path??[]};if(!e.message){let t=or(e.inst?._zod.def?.error?.(e))??or(r?.error?.(e))??or(n.customError?.(e))??or(n.localeError?.(e))??"Invalid input";i.message=t}return delete i.inst,delete i.continue,r?.reportInput||delete i.input,i}function lr(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function ur(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ci(...e){let[r,n,i]=e;return typeof r=="string"?{message:r,code:"custom",input:n,inst:i}:{...r}}function cg(e){return Object.entries(e).filter(([r,n])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}var mn,Ri,eg,cr,Ui,Di,Ai,ji,T=I(()=>{mn=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};Ri=ar(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});eg=e=>{let r=typeof e;switch(r){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 new Error(`Unknown data type: ${r}`)}},cr=new Set(["string","number","symbol"]),Ui=new Set(["string","number","bigint","boolean","symbol","undefined"]);Di={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ai={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};ji=class{constructor(...r){}}});function ht(e,r=n=>n.message){let n={},i=[];for(let t of e.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(r(t))):i.push(r(t));return{formErrors:i,fieldErrors:n}}function vt(e,r){let n=r||function(o){return o.message},i={_errors:[]},t=o=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>t({issues:s}));else if(a.code==="invalid_key")t({issues:a.issues});else if(a.code==="invalid_element")t({issues:a.issues});else if(a.path.length===0)i._errors.push(n(a));else{let s=i,u=0;for(;u<a.path.length;){let p=a.path[u];u===a.path.length-1?(s[p]=s[p]||{_errors:[]},s[p]._errors.push(n(a))):s[p]=s[p]||{_errors:[]},s=s[p],u++}}};return t(e),i}function fn(e,r){let n=r||function(o){return o.message},i={errors:[]},t=(o,a=[])=>{var s,u;for(let p of o.issues)if(p.code==="invalid_union"&&p.errors.length)p.errors.map(m=>t({issues:m},p.path));else if(p.code==="invalid_key")t({issues:p.issues},p.path);else if(p.code==="invalid_element")t({issues:p.issues},p.path);else{let m=[...a,...p.path];if(m.length===0){i.errors.push(n(p));continue}let l=i,b=0;for(;b<m.length;){let v=m[b],f=b===m.length-1;typeof v=="string"?(l.properties??(l.properties={}),(s=l.properties)[v]??(s[v]={errors:[]}),l=l.properties[v]):(l.items??(l.items=[]),(u=l.items)[v]??(u[v]={errors:[]}),l=l.items[v]),f&&l.errors.push(n(p)),b++}}};return t(e),i}function Uu(e){let r=[];for(let n of e)typeof n=="number"?r.push(`[${n}]`):typeof n=="symbol"?r.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?r.push(`[${JSON.stringify(n)}]`):(r.length&&r.push("."),r.push(n));return r.join("")}function gn(e){let r=[],n=[...e.issues].sort((i,t)=>i.path.length-t.path.length);for(let i of n)r.push(`\u2716 ${i.message}`),i.path?.length&&r.push(` \u2192 at ${Uu(i.path)}`);return r.join(`
|
|
798
842
|
`)}var Ru,pr,gt,Zi=I(()=>{dt();T();Ru=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(r,Ni,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},pr=d("$ZodError",Ru),gt=d("$ZodError",Ru,{Parent:Error})});var hn,dr,vn,mr,_n,_t,bn,fr,yn=I(()=>{dt();Zi();T();hn=e=>(r,n,i,t)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},a=r._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new we;if(a.issues.length){let s=new(t?.Err??e)(a.issues.map(u=>he(u,o,X())));throw mn(s,t?.callee),s}return a.value},dr=hn(gt),vn=e=>async(r,n,i,t)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},a=r._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(t?.Err??e)(a.issues.map(u=>he(u,o,X())));throw mn(s,t?.callee),s}return a.value},mr=vn(gt),_n=e=>(r,n,i)=>{let t=i?{...i,async:!1}:{async:!1},o=r._zod.run({value:n,issues:[]},t);if(o instanceof Promise)throw new we;return o.issues.length?{success:!1,error:new(e??pr)(o.issues.map(a=>he(a,t,X())))}:{success:!0,data:o.value}},_t=_n(gt),bn=e=>async(r,n,i)=>{let t=i?Object.assign(i,{async:!0}):{async:!0},o=r._zod.run({value:n,issues:[]},t);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>he(a,t,X())))}:{success:!0,data:o.value}},fr=bn(gt)});var qe={};Ze(qe,{_emoji:()=>Eu,base64:()=>ea,base64url:()=>xn,bigint:()=>sa,boolean:()=>ua,browserEmail:()=>vg,cidrv4:()=>Yi,cidrv6:()=>Xi,cuid:()=>Li,cuid2:()=>Mi,date:()=>na,datetime:()=>ia,domain:()=>_g,duration:()=>Wi,e164:()=>ra,email:()=>Ji,emoji:()=>Ki,extendedDuration:()=>ug,guid:()=>Bi,hostname:()=>ta,html5Email:()=>fg,integer:()=>ca,ipv4:()=>Gi,ipv6:()=>Qi,ksuid:()=>Hi,lowercase:()=>ma,nanoid:()=>Vi,null:()=>pa,number:()=>la,rfc5322Email:()=>gg,string:()=>aa,time:()=>oa,ulid:()=>Fi,undefined:()=>da,unicodeEmail:()=>hg,uppercase:()=>fa,uuid:()=>Xe,uuid4:()=>pg,uuid6:()=>dg,uuid7:()=>mg,xid:()=>qi});function Ki(){return new RegExp(Eu,"u")}function Au(e){let r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function oa(e){return new RegExp(`^${Au(e)}$`)}function ia(e){let r=Au({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-]\\d{2}:\\d{2})");let i=`${r}(?:${n.join("|")})`;return new RegExp(`^${Du}T(?:${i})$`)}var Li,Mi,Fi,qi,Hi,Vi,Wi,ug,Bi,Xe,pg,dg,mg,Ji,fg,gg,hg,vg,Eu,Gi,Qi,Yi,Xi,ea,xn,ta,_g,ra,Du,na,aa,sa,ca,la,ua,pa,da,ma,fa,$n=I(()=>{Li=/^[cC][^\s-]{8,}$/,Mi=/^[0-9a-z]+$/,Fi=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qi=/^[0-9a-vA-V]{20}$/,Hi=/^[A-Za-z0-9]{27}$/,Vi=/^[a-zA-Z0-9_-]{21}$/,Wi=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ug=/^[-+]?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)?)??$/,Bi=/^([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})$/,Xe=e=>e?new 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)$/,pg=Xe(4),dg=Xe(6),mg=Xe(7),Ji=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,fg=/^[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])?)*$/,gg=/^(([^<>()\[\]\\.,;:\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,}))$/,hg=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,vg=/^[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])?)*$/,Eu="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";Gi=/^(?:(?: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])$/,Qi=/^(([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})$/,Yi=/^((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])$/,Xi=/^(([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])$/,ea=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,xn=/^[A-Za-z0-9_-]*$/,ta=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,_g=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ra=/^\+(?:[0-9]){6,14}[0-9]$/,Du="(?:(?:\\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])))",na=new RegExp(`^${Du}$`);aa=e=>{let r=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},sa=/^\d+n?$/,ca=/^\d+$/,la=/^-?\d+(?:\.\d+)?/i,ua=/true|false/i,pa=/null/i,da=/undefined/i,ma=/^[^A-Z]*$/,fa=/^[^a-z]*$/});function Cu(e,r,n){e.issues.length&&r.issues.push(...fe(n,e.issues))}var G,Zu,kn,zn,ga,ha,va,_a,ba,ya,xa,$a,ka,bt,za,Sa,wa,Ia,Pa,ja,Na,Ta,Oa,Sn=I(()=>{dt();$n();T();G=d("$ZodCheck",(e,r)=>{var n;e._zod??(e._zod={}),e._zod.def=r,(n=e._zod).onattach??(n.onattach=[])}),Zu={number:"number",bigint:"bigint",object:"date"},kn=d("$ZodCheckLessThan",(e,r)=>{G.init(e,r);let n=Zu[typeof r.value];e._zod.onattach.push(i=>{let t=i._zod.bag,o=(r.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<o&&(r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value<=r.value:i.value<r.value)||i.issues.push({origin:n,code:"too_big",maximum:r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),zn=d("$ZodCheckGreaterThan",(e,r)=>{G.init(e,r);let n=Zu[typeof r.value];e._zod.onattach.push(i=>{let t=i._zod.bag,o=(r.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>o&&(r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value>=r.value:i.value>r.value)||i.issues.push({origin:n,code:"too_small",minimum:r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),ga=d("$ZodCheckMultipleOf",(e,r)=>{G.init(e,r),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=r.value)}),e._zod.check=n=>{if(typeof n.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%r.value===BigInt(0):Ti(n.value,r.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:e,continue:!r.abort})}}),ha=d("$ZodCheckNumberFormat",(e,r)=>{G.init(e,r),r.format=r.format||"float64";let n=r.format?.includes("int"),i=n?"int":"number",[t,o]=Di[r.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=r.format,s.minimum=t,s.maximum=o,n&&(s.pattern=ca)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:i,format:r.format,code:"invalid_type",input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!r.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!r.abort});return}}s<t&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inst:e})}}),va=d("$ZodCheckBigIntFormat",(e,r)=>{G.init(e,r);let[n,i]=Ai[r.format];e._zod.onattach.push(t=>{let o=t._zod.bag;o.format=r.format,o.minimum=n,o.maximum=i}),e._zod.check=t=>{let o=t.value;o<n&&t.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!r.abort}),o>i&&t.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:e})}}),_a=d("$ZodCheckMaxSize",(e,r)=>{var n;G.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!Fe(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<t&&(i._zod.bag.maximum=r.maximum)}),e._zod.check=i=>{let t=i.value;t.size<=r.maximum||i.issues.push({origin:lr(t),code:"too_big",maximum:r.maximum,input:t,inst:e,continue:!r.abort})}}),ba=d("$ZodCheckMinSize",(e,r)=>{var n;G.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!Fe(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(i._zod.bag.minimum=r.minimum)}),e._zod.check=i=>{let t=i.value;t.size>=r.minimum||i.issues.push({origin:lr(t),code:"too_small",minimum:r.minimum,input:t,inst:e,continue:!r.abort})}}),ya=d("$ZodCheckSizeEquals",(e,r)=>{var n;G.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!Fe(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag;t.minimum=r.size,t.maximum=r.size,t.size=r.size}),e._zod.check=i=>{let t=i.value,o=t.size;if(o===r.size)return;let a=o>r.size;i.issues.push({origin:lr(t),...a?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!r.abort})}}),xa=d("$ZodCheckMaxLength",(e,r)=>{var n;G.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!Fe(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<t&&(i._zod.bag.maximum=r.maximum)}),e._zod.check=i=>{let t=i.value;if(t.length<=r.maximum)return;let a=ur(t);i.issues.push({origin:a,code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),$a=d("$ZodCheckMinLength",(e,r)=>{var n;G.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!Fe(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(i._zod.bag.minimum=r.minimum)}),e._zod.check=i=>{let t=i.value;if(t.length>=r.minimum)return;let a=ur(t);i.issues.push({origin:a,code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),ka=d("$ZodCheckLengthEquals",(e,r)=>{var n;G.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!Fe(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag;t.minimum=r.length,t.maximum=r.length,t.length=r.length}),e._zod.check=i=>{let t=i.value,o=t.length;if(o===r.length)return;let a=ur(t),s=o>r.length;i.issues.push({origin:a,...s?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!r.abort})}}),bt=d("$ZodCheckStringFormat",(e,r)=>{var n,i;G.init(e,r),e._zod.onattach.push(t=>{let o=t._zod.bag;o.format=r.format,r.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(r.pattern))}),r.pattern?(n=e._zod).check??(n.check=t=>{r.pattern.lastIndex=0,!r.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:r.format,input:t.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(i=e._zod).check??(i.check=()=>{})}),za=d("$ZodCheckRegex",(e,r)=>{bt.init(e,r),e._zod.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),Sa=d("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=ma),bt.init(e,r)}),wa=d("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=fa),bt.init(e,r)}),Ia=d("$ZodCheckIncludes",(e,r)=>{G.init(e,r);let n=De(r.includes),i=new RegExp(typeof r.position=="number"?`^.{${r.position}}${n}`:n);r.pattern=i,e._zod.onattach.push(t=>{let o=t._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=t=>{t.value.includes(r.includes,r.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),Pa=d("$ZodCheckStartsWith",(e,r)=>{G.init(e,r);let n=new RegExp(`^${De(r.prefix)}.*`);r.pattern??(r.pattern=n),e._zod.onattach.push(i=>{let t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(r.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:i.value,inst:e,continue:!r.abort})}}),ja=d("$ZodCheckEndsWith",(e,r)=>{G.init(e,r);let n=new RegExp(`.*${De(r.suffix)}$`);r.pattern??(r.pattern=n),e._zod.onattach.push(i=>{let t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(r.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:i.value,inst:e,continue:!r.abort})}});Na=d("$ZodCheckProperty",(e,r)=>{G.init(e,r),e._zod.check=n=>{let i=r.schema._zod.run({value:n.value[r.property],issues:[]},{});if(i instanceof Promise)return i.then(t=>Cu(t,n,r.property));Cu(i,n,r.property)}}),Ta=d("$ZodCheckMimeType",(e,r)=>{G.init(e,r);let n=new Set(r.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=r.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:r.mime,input:i.value.type,inst:e})}}),Oa=d("$ZodCheckOverwrite",(e,r)=>{G.init(e,r),e._zod.check=n=>{n.value=r.tx(n.value)}})});var gr,Ra=I(()=>{gr=class{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let i=r.split(`
|
|
799
843
|
`).filter(a=>a),t=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(t)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let r=Function,n=this?.args,t=[...(this?.content??[""]).map(o=>` ${o}`)];return new r(...n,t.join(`
|
|
@@ -861,7 +905,7 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
861
905
|
- "model": Tool visible to and callable by the agent
|
|
862
906
|
- "app": Tool callable by the app from this server only`),csp:c.never().optional(),permissions:c.never().optional()}),qS=c.object({mimeTypes:c.array(c.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),HS=c.object({method:c.literal("ui/download-file"),params:c.object({contents:c.array(c.union([wl,Il])).describe("Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),VS=c.object({method:c.literal("ui/message"),params:c.object({role:c.literal("user").describe('Message role, currently only "user" is supported.'),content:c.array(Wt).describe("Message content blocks (text, image, etc.).")})}),WS=c.object({method:c.literal("ui/notifications/sandbox-resource-ready"),params:c.object({html:c.string().describe("HTML content to load into the inner iframe."),sandbox:c.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:Dl.optional().describe("CSP configuration from resource metadata."),permissions:Al.optional().describe("Sandbox permissions from resource metadata.")})}),Z_=c.object({method:c.literal("ui/notifications/tool-result"),params:Bt.describe("Standard MCP tool execution result.")}),rf=c.object({toolInfo:c.object({id:qt.optional().describe("JSON-RPC id of the tools/call request."),tool:ai.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:k_.optional().describe("Current color theme preference."),styles:R_.optional().describe("Style configuration for theming the app."),displayMode:Gr.optional().describe("How the UI is currently displayed."),availableDisplayModes:c.array(Gr).optional().describe("Display modes the host supports."),containerDimensions:c.union([c.object({height:c.number().describe("Fixed container height in pixels.")}),c.object({maxHeight:c.union([c.number(),c.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(c.union([c.object({width:c.number().describe("Fixed container width in pixels.")}),c.object({maxWidth:c.union([c.number(),c.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
863
907
|
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:c.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:c.string().optional().describe("User's timezone in IANA format."),userAgent:c.string().optional().describe("Host application identifier."),platform:c.union([c.literal("web"),c.literal("desktop"),c.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:c.object({touch:c.boolean().optional().describe("Whether the device supports touch input."),hover:c.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:c.object({top:c.number().describe("Top safe area inset in pixels."),right:c.number().describe("Right safe area inset in pixels."),bottom:c.number().describe("Bottom safe area inset in pixels."),left:c.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),L_=c.object({method:c.literal("ui/notifications/host-context-changed"),params:rf.describe("Partial context update containing only changed fields.")}),BS=c.object({method:c.literal("ui/update-model-context"),params:c.object({content:c.array(Wt).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:c.record(c.string(),c.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),JS=c.object({method:c.literal("ui/initialize"),params:c.object({appInfo:qr.describe("App identification (name and version)."),appCapabilities:D_.describe("Features and capabilities this app provides."),protocolVersion:c.string().describe("Protocol version this app supports.")})}),M_=c.object({protocolVersion:c.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:qr.describe("Host application identification and version."),hostCapabilities:E_.describe("Features and capabilities provided by the host."),hostContext:rf.describe("Rich context about the host environment.")}).passthrough(),F_={target:"draft-2020-12"};async function ef(e,r){let n=e["~standard"];if(n.jsonSchema)return n.jsonSchema[r](F_);if(n.vendor==="zod"){let{z:i}=await Promise.resolve().then(()=>(Zr(),ml));return i.toJSONSchema(e,{io:r})}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 tf(e,r,n=""){let i=await e["~standard"].validate(r);if(i.issues){let t=i.issues.map(o=>{let a=o.path?.map(s=>typeof s=="object"?s.key:s).join(".");return a?`${a}: ${o.message}`:o.message}).join("; ");throw Error(n+t)}return i.value}function nf(e,r=document.documentElement){for(let[n,i]of Object.entries(e))i!==void 0&&r.style.setProperty(n,i)}function of(e){if(document.getElementById("__mcp-host-fonts"))return;let r=document.createElement("style");r.id="__mcp-host-fonts",r.textContent=e,document.head.appendChild(r)}var li=class li extends Ul{constructor(n,i={},t={autoResize:!0}){super(t);M(this,"_appInfo");M(this,"_capabilities");M(this,"options");M(this,"_hostCapabilities");M(this,"_hostInfo");M(this,"_hostContext");M(this,"_registeredTools",{});M(this,"_initializedSent",!1);M(this,"eventSchemas",{toolinput:j_,toolinputpartial:N_,toolresult:Z_,toolcancelled:T_,hostcontextchanged:L_});M(this,"_everHadListener",new Set);M(this,"_toolHandlersInitialized",!1);M(this,"_onteardown");M(this,"_oncalltool");M(this,"_onlisttools");M(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=i,this.options=t,t.allowUnsafeEval||c.config({jitless:!0}),this.setRequestHandler(Ht,o=>(console.log("Received ping:",o.params),{})),this.setEventHandler("hostcontextchanged",void 0)}_assertInitialized(n){if(this._initializedSent)return;let i=`[ext-apps] App.${n}() 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(i);console.warn(`${i}. This will throw in a future release.`)}_assertHandlerTiming(n){if(!li.ONE_SHOT_EVENTS.has(n)||this._everHadListener.has(n)||(this._everHadListener.add(n),!this._initializedSent))return;let i=`[ext-apps] "${String(n)}" 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(i);console.warn(i)}setEventHandler(n,i){i&&this._assertHandlerTiming(n),super.setEventHandler(n,i)}addEventListener(n,i){this._assertHandlerTiming(n),super.addEventListener(n,i)}onEventDispatch(n,i){n==="hostcontextchanged"&&(this._hostContext={...this._hostContext,...i})}registerCapabilities(n){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._capabilities=Ym(this._capabilities,n)}registerTool(n,i,t){if(this._registeredTools[n])throw Error(`Tool ${n} is already registered`);let o=this,a=()=>{o._initializedSent&&o._capabilities.tools?.listChanged&&o.sendToolListChanged()},s=i.inputSchema!==void 0,u={title:i.title,description:i.description,inputSchema:i.inputSchema,outputSchema:i.outputSchema,annotations:i.annotations,_meta:i._meta,enabled:!0,enable(){this.enabled=!0,a()},disable(){this.enabled=!1,a()},update(p){Object.assign(this,p),a()},remove(){o._registeredTools[n]===u&&(delete o._registeredTools[n],a())},handler:async(p,m)=>{if(!u.enabled)throw Error(`Tool ${n} is disabled`);let l;if(s){let b=u.inputSchema,v=b?await tf(b,p??{},`Invalid input for tool ${n}: `):p??{};l=await t(v,m)}else l=await t(m);return u.outputSchema&&!l.isError&&(l.structuredContent=await tf(u.outputSchema,l.structuredContent,`Invalid output for tool ${n}: `)),l}};return this._registeredTools[n]=u,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),a(),u}ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(n,i)=>{let t=this._registeredTools[n.name];if(!t)throw Error(`Tool ${n.name} not found`);return t.handler(n.arguments,i)},this.onlisttools=async(n,i)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([t,o])=>o.enabled).map(async([t,o])=>{let a={name:t,title:o.title,description:o.description,inputSchema:o.inputSchema?await ef(o.inputSchema,"input"):{type:"object",properties:{}}};return o.outputSchema&&(a.outputSchema=await ef(o.outputSchema,"output")),o.annotations&&(a.annotations=o.annotations),o._meta&&(a._meta=o._meta),a}))}))}async sendToolListChanged(n={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:n})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(n){this.setEventHandler("toolinput",n)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(n){this.setEventHandler("toolinputpartial",n)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(n){this.setEventHandler("toolresult",n)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(n){this.setEventHandler("toolcancelled",n)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(n){this.setEventHandler("hostcontextchanged",n)}get onteardown(){return this._onteardown}set onteardown(n){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,n),this._onteardown=n,this.replaceRequestHandler(U_,(i,t)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(i.params,t)})}get oncalltool(){return this._oncalltool}set oncalltool(n){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,n),this._oncalltool=n,this.replaceRequestHandler(jl,(i,t)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(i.params,t)})}get onlisttools(){return this._onlisttools}set onlisttools(n){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,n),this._onlisttools=n,this.replaceRequestHandler(Pl,(i,t)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(i.params,t)})}assertCapabilityForMethod(n){switch(n){case"sampling/createMessage":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${n})`);break}}assertRequestHandlerCapability(n){switch(n){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${n})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${n} registered`)}}assertNotificationCapability(n){}assertTaskCapability(n){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(n){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(n,i){if(this._assertInitialized("callServerTool"),typeof n=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${n}"). Did you mean: callServerTool({ name: "${n}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:n},Bt,{onprogress:()=>{},resetTimeoutOnProgress:!0,...i})}async readServerResource(n,i){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:n},$l,i)}async listServerResources(n,i){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:n},yl,i)}async createSamplingMessage(n,i){this._assertInitialized("createSamplingMessage");let t=n.tools?Tl:Nl;return await this.request({method:"sampling/createMessage",params:n},t,i)}sendMessage(n,i){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:n},P_,i)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,i){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:n},Go,i)}openLink(n,i){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:n},w_,i)}downloadFile(n,i){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:n},I_,i)}requestTeardown(n={}){return this.notification({method:"ui/notifications/request-teardown",params:n})}requestDisplayMode(n,i){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:n},A_,i)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,i=0,t=0,o=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let s=document.documentElement,u=s.style.height;s.style.height="max-content";let p=Math.ceil(s.getBoundingClientRect().height);s.style.height=u;let m=Math.ceil(window.innerWidth);(m!==i||p!==t)&&(i=m,t=p,this.sendSizeChanged({width:m,height:p}))}))};o();let a=new ResizeObserver(o);return a.observe(document.documentElement),a.observe(document.body),()=>a.disconnect()}async connect(n=new El(window.parent,window.parent),i){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1,await super.connect(n);try{let t=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:x_}},M_,i);if(t===void 0)throw Error(`Server sent invalid initialize result: ${t}`);this._hostCapabilities=t.hostCapabilities,this._hostInfo=t.hostInfo,this._hostContext=t.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(t){throw this.close(),t}}};M(li,"ONE_SHOT_EVENTS",new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]));var ci=li;var sf=e=>(e?.content??[]).map(r=>r.text??"").join(`
|
|
864
|
-
`);function q_(e){if(!e)return;let r=e.trim().toLowerCase(),n,i,t,o=/^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(r)?.[1];if(o){let a=o.length===3?o.split("").map(s=>s+s).join(""):o;n=parseInt(a.slice(0,2),16),i=parseInt(a.slice(2,4),16),t=parseInt(a.slice(4,6),16)}else{let a=/^rgba?\(\s*([\d.]+)[ ,]+([\d.]+)[ ,]+([\d.]+)/.exec(r);a&&([n,i,t]=[Number(a[1]),Number(a[2]),Number(a[3])]);let s=/^hsla?\(\s*[\d.]+[ ,]+[\d.]+%?[ ,]+([\d.]+)%/.exec(r);if(s)return Number(s[1])/100}if(!(n===void 0||i===void 0||t===void 0))return(.2126*n+.7152*i+.0722*t)/255}function af(e){if(!e)return;let r=document.documentElement,n=e.theme==="dark"||e.theme==="light"?e.theme:void 0,i=e.styles?.variables;if(!n&&i){let t=q_(i["--color-background-primary"]??i["--color-background-secondary"]);t!==void 0&&(n=t<.5?"dark":"light")}n&&(r.classList.toggle("dark",n==="dark"),r.classList.toggle("light",n==="light"),r.style.colorScheme=n);try{i&&nf(i),e.styles?.css?.fonts&&of(e.styles.css.fonts)}catch{}console.debug("[np-widget] theme:",e.theme,"->",n??"os-fallback","| tokens:",!!i,"| fonts:",!!e.styles?.css?.fonts)}function cf(e){let[r,n]=re(null),[i,t]=re(!1),o=ln(null);pt(()=>{let p=new ci({name:e,version:"0.3.0"},{},{autoResize:!0});o.current=p,p.ontoolresult=m=>n(m),p.onhostcontextchanged=m=>af(m),p.connect().then(()=>{af(p.getHostContext()),t(!0)}).catch(()=>t(!1))},[e]);let a=Me(async(p,m)=>{if(!o.current)throw new Error("not connected");return await o.current.callServerTool({name:p,arguments:m})},[]),s=Me(p=>{o.current?.sendMessage({role:"user",content:[{type:"text",text:p}]}).catch(()=>{})},[]),u=Me(p=>{try{o.current?.updateModelContext({content:[{type:"text",text:p}]}).catch(()=>{})}catch{}},[]);return{result:r,call:a,send:s,brief:u,connected:i}}var H_={"confirm.yes":"Yes, do it","confirm.no":"Cancel","chooser.pick":"pick a scope:","term.empty":"no output yet\u2026","term.copyLine":"copy line",hint:"Next:","panel.scopes":"Scopes","panel.releases":"Releases","panel.latestBuild":"Latest build","panel.noScopes":"No scopes yet \u2014 create one to have somewhere to deploy.","panel.scopePlaceholder":"scope name, e.g. dev","panel.typePlaceholder":"type\u2026","panel.createScope":"Create scope","panel.ship":"ship","panel.live":"live","panel.openRollout":"Open rollout","panel.nothingDeployed":"nothing deployed","panel.noReleases":"none yet","panel.noBuild":"none \u2014 push a commit so CI builds","panel.deployLatest":"Deploy latest","panel.logs":"Logs","panel.metrics":"Metrics","panel.pickType":"Pick a scope type and create again.","panel.waitingData":"waiting for data\u2026","panel.backToList":"apps","rollout.deployingTo":"Deploying to {scope}","rollout.release":"release","rollout.backToApp":"app","rollout.trafficLabel":"Traffic on new version","rollout.live":"{pct}% live","rollout.movingTo":"moving to {pct}%","rollout.move":"Move traffic","rollout.finalize":"Finalize","rollout.rollback":"Rollback","rollout.confirmFinalize":"Finalize and retire the old version?","rollout.confirmRollback":"Return ALL traffic to the previous version?","rollout.log":"Deployment log","rollout.waiting":"waiting for activity\u2026","rollout.failed":"Failed: {message}","rollout.deployment":"Deployment #{id}","rollout.busyMove":"Moving traffic\u2026","rollout.busyFinalize":"Finalizing\u2026","rollout.busyRollback":"Rolling back\u2026","rollout.autoDone":"Done \u2014 the release is fully live.","rollout.autoRolledBack":"Rolled back \u2014 previous version is serving traffic.","rollout.autoFailed":"Deployment failed \u2014 previous version keeps serving.","rollout.autoWaiting":"Waiting for instances \u2014 controls unlock when the rollout is running.","rollout.autoFull":"All traffic on the new version \u2014 finalize to retire the old one.","rollout.autoLabel":"Auto-advance","rollout.autoOff":"off","rollout.trafficHelp":"Drag to move traffic now; auto-advance ramps it to 100%.","rollout.appLogs":"Application logs","rollout.appLogsEmpty":"no application logs yet\u2026","logs.title":"{app} \xB7 logs","logs.heading":"Logs","logs.filter":"filter\u2026","logs.live":"live","logs.refresh":"Refresh","logs.updated":"updated {time}","logs.wrap":"Wrap","logs.copyAll":"Copy all","logs.copied":"Copied","logs.rangeLive":"Live","logs.range15m":"Last 15m","logs.range1h":"Last 1h","logs.range6h":"Last 6h","logs.range24h":"Last 24h","logs.rangeCustom":"Custom\u2026","logs.apply":"Apply","logs.from":"From","logs.to":"To","logs.empty":"no log lines yet\u2026","logs.noMatch":"nothing matches the filter","logs.count":"{count} line(s){scope}","logs.scopeSuffix":" \xB7 scope {scope}","logs.refreshFailed":"refresh failed: {message}","metrics.title":"{app} \xB7 {scope} metrics","metrics.heading":"Metrics","metrics.live":"live","metrics.loading":"loading {window}\u2026","metrics.refreshFailed":"refresh failed: {message}","metrics.noData":"no datapoints in this window","metrics.avgMax":"avg {avg} \xB7 max {max}","params.title":"{app} \xB7 parameters","params.heading":"Parameters","params.name":"Name","params.value":"Value","params.secret":"Secret","params.add":"+ Add","params.save":"Save changes","params.applyNote":"Changed values apply on the next deploy.","params.unavailable":"Existing values can't be listed here \u2014 new ones can still be added below.","params.saving":"Saving {count} parameter(s)\u2026","params.saved":"Saved \u2014 values apply on the next deploy.","params.saveFailed":"Save failed: {message}","createApp.title":"Create application","createApp.name":"Name","createApp.namespace":"Namespace","createApp.repository":"Repository","createApp.newRepo":"New repository","createApp.importRepo":"Import existing","createApp.template":"Template","createApp.noTemplates":"No templates available","createApp.repoUrl":"Repository URL","createApp.editName":"Customize the repository name","createApp.lockName":"Reset to the generated name","createApp.importUrl":"Existing repository URL","createApp.monorepo":"This repository is a monorepo","createApp.appPath":"Application path inside the repository","createApp.submit":"Create application","createApp.needName":"Name is required.","createApp.needNamespace":"Pick a namespace.","createApp.needTemplate":"Pick a template for the new repository.","createApp.needImportUrl":"Enter the repository URL to import.","createApp.noBaseUrl":"This account has no git provider configured \u2014 use \u201CImport existing\u201D.","createApp.creating":"Creating {name}\u2026 (links the repo, wires CI \u2014 takes a few seconds)","createApp.failed":"Failed: {message}","createApp.created":`{name} created (#{id}, {status}).
|
|
865
|
-
Push a commit to trigger the first build, then deploy.`,"findApps.count":"{count} application(s)","findApps.filter":"filter\u2026","findApps.across":"across {ns} namespace(s)","findApps.noMatch":"Nothing matches the filter.","findApps.loadMore":"Load {more} more","findApps.hint":"Click an application to open its panel.","buildsW.title":"{app} \xB7 {count} build(s)","buildsW.none":"No builds yet \u2014 push a commit so CI produces one.","buildsW.buildTitle":"Build #{id}","buildsW.back":"Builds","buildsW.loadingAssets":"Loading assets\u2026","buildsW.noAssets":"No assets \u2014 the build may still be running.","buildsW.asset":"Asset","buildsW.assetType":"Type","buildsW.newRelease":"New release","buildsW.confirmRelease":"Cut a release from this build?","buildsW.creatingRelease":"Creating a release from build #{id}\u2026","buildsW.releaseDone":"Release {semver} created.","releasesW.title":"{app} \xB7 {count} release(s)","releasesW.none":"No releases yet.","releasesW.deploy":"Deploy","deploymentsW.title":"{app} \xB7 {count} deployment(s)","deploymentsW.none":"No deployments yet.","deploymentsW.group":"{count} scopes"},V_={"confirm.yes":"S\xED, hacelo","confirm.no":"Cancelar","chooser.pick":"eleg\xED un scope:","term.empty":"sin salida todav\xEDa\u2026","term.copyLine":"copiar l\xEDnea",hint:"Siguiente:","panel.scopes":"Scopes","panel.releases":"Releases","panel.latestBuild":"\xDAltimo build","panel.noScopes":"Sin scopes todav\xEDa \u2014 cre\xE1 uno para tener d\xF3nde deployar.","panel.scopePlaceholder":"nombre del scope, p. ej. dev","panel.typePlaceholder":"tipo\u2026","panel.createScope":"Crear scope","panel.ship":"publicar","panel.live":"en vivo","panel.openRollout":"Abrir rollout","panel.nothingDeployed":"nada deployado","panel.noReleases":"ninguna todav\xEDa","panel.noBuild":"ninguno \u2014 pushe\xE1 un commit para que CI compile","panel.deployLatest":"Deployar lo \xFAltimo","panel.logs":"Logs","panel.metrics":"M\xE9tricas","panel.pickType":"Eleg\xED un tipo de scope y cre\xE1 de nuevo.","panel.waitingData":"esperando datos\u2026","panel.backToList":"apps","rollout.deployingTo":"Deployando a {scope}","rollout.release":"release","rollout.backToApp":"app","rollout.trafficLabel":"Tr\xE1fico en la versi\xF3n nueva","rollout.live":"{pct}% en vivo","rollout.movingTo":"yendo a {pct}%","rollout.move":"Mover tr\xE1fico","rollout.finalize":"Finalizar","rollout.rollback":"Revertir","rollout.confirmFinalize":"\xBFFinalizar y retirar la versi\xF3n anterior?","rollout.confirmRollback":"\xBFDevolver TODO el tr\xE1fico a la versi\xF3n anterior?","rollout.log":"Log del deployment","rollout.waiting":"esperando actividad\u2026","rollout.failed":"Fall\xF3: {message}","rollout.deployment":"Deployment #{id}","rollout.busyMove":"Moviendo tr\xE1fico\u2026","rollout.busyFinalize":"Finalizando\u2026","rollout.busyRollback":"Revirtiendo\u2026","rollout.autoDone":"Listo \u2014 la release est\xE1 completamente en vivo.","rollout.autoRolledBack":"Revertido \u2014 la versi\xF3n anterior est\xE1 sirviendo tr\xE1fico.","rollout.autoFailed":"El deployment fall\xF3 \u2014 la versi\xF3n anterior sigue sirviendo.","rollout.autoWaiting":"Esperando instancias \u2014 los controles se habilitan cuando el rollout est\xE1 corriendo.","rollout.autoFull":"Todo el tr\xE1fico en la versi\xF3n nueva \u2014 finaliz\xE1 para retirar la anterior.","rollout.autoLabel":"Auto-avance","rollout.autoOff":"off","rollout.trafficHelp":"Arrastr\xE1 para mover el tr\xE1fico ahora; el auto-avance sube hasta 100%.","rollout.appLogs":"Logs de la aplicaci\xF3n","rollout.appLogsEmpty":"sin logs de la aplicaci\xF3n todav\xEDa\u2026","logs.title":"{app} \xB7 logs","logs.heading":"Logs","logs.filter":"filtrar\u2026","logs.live":"vivo","logs.refresh":"Refrescar","logs.updated":"actualizado {time}","logs.wrap":"Ajustar","logs.copyAll":"Copiar todo","logs.copied":"Copiado","logs.rangeLive":"En vivo","logs.range15m":"\xDAltimos 15m","logs.range1h":"\xDAltima 1h","logs.range6h":"\xDAltimas 6h","logs.range24h":"\xDAltimas 24h","logs.rangeCustom":"Personalizado\u2026","logs.apply":"Aplicar","logs.from":"Desde","logs.to":"Hasta","logs.empty":"sin l\xEDneas de log todav\xEDa\u2026","logs.noMatch":"nada coincide con el filtro","logs.count":"{count} l\xEDnea(s){scope}","logs.scopeSuffix":" \xB7 scope {scope}","logs.refreshFailed":"fall\xF3 el refresh: {message}","metrics.title":"{app} \xB7 m\xE9tricas de {scope}","metrics.heading":"M\xE9tricas","metrics.live":"vivo","metrics.loading":"cargando {window}\u2026","metrics.refreshFailed":"fall\xF3 el refresh: {message}","metrics.noData":"sin datapoints en esta ventana","metrics.avgMax":"prom {avg} \xB7 m\xE1x {max}","params.title":"{app} \xB7 par\xE1metros","params.heading":"Par\xE1metros","params.name":"Nombre","params.value":"Valor","params.secret":"Secreto","params.add":"+ Agregar","params.save":"Guardar cambios","params.applyNote":"Los valores cambiados aplican en el pr\xF3ximo deploy.","params.unavailable":"Los valores existentes no se pueden listar ac\xE1 \u2014 igual pod\xE9s agregar nuevos abajo.","params.saving":"Guardando {count} par\xE1metro(s)\u2026","params.saved":"Guardado \u2014 los valores aplican en el pr\xF3ximo deploy.","params.saveFailed":"Fall\xF3 el guardado: {message}","createApp.title":"Crear aplicaci\xF3n","createApp.name":"Nombre","createApp.namespace":"Namespace","createApp.repository":"Repositorio","createApp.newRepo":"Nuevo repositorio","createApp.importRepo":"Importar existente","createApp.template":"Template","createApp.noTemplates":"Sin templates disponibles","createApp.repoUrl":"URL del repositorio","createApp.editName":"Personalizar el nombre del repositorio","createApp.lockName":"Volver al nombre generado","createApp.importUrl":"URL del repositorio existente","createApp.monorepo":"Este repositorio es un monorepo","createApp.appPath":"Ruta de la aplicaci\xF3n dentro del repositorio","createApp.submit":"Crear aplicaci\xF3n","createApp.needName":"El nombre es obligatorio.","createApp.needNamespace":"Eleg\xED un namespace.","createApp.needTemplate":"Eleg\xED un template para el nuevo repositorio.","createApp.needImportUrl":"Ingres\xE1 la URL del repositorio a importar.","createApp.noBaseUrl":"Esta cuenta no tiene proveedor de git configurado \u2014 us\xE1 \u201CImportar existente\u201D.","createApp.creating":"Creando {name}\u2026 (vincula el repo, conecta CI \u2014 tarda unos segundos)","createApp.failed":"Fall\xF3: {message}","createApp.created":`{name} creada (#{id}, {status}).
|
|
866
|
-
Pushe\xE1 un commit para disparar el primer build y despu\xE9s deploy\xE1.`,"findApps.count":"{count} aplicaci\xF3n(es)","findApps.filter":"filtrar\u2026","findApps.across":"en {ns} namespace(s)","findApps.noMatch":"Nada coincide con el filtro.","findApps.loadMore":"Cargar {more} m\xE1s","findApps.hint":"Hac\xE9 clic en una aplicaci\xF3n para abrir su panel.","buildsW.title":"{app} \xB7 {count} build(s)","buildsW.none":"Todav\xEDa no hay builds \u2014 pushe\xE1 un commit para que CI genere uno.","buildsW.buildTitle":"Build #{id}","buildsW.back":"Builds","buildsW.loadingAssets":"Cargando assets\u2026","buildsW.noAssets":"Sin assets \u2014 el build puede estar compilando todav\xEDa.","buildsW.asset":"Asset","buildsW.assetType":"Tipo","buildsW.newRelease":"Nuevo release","buildsW.confirmRelease":"\xBFCortar un release desde este build?","buildsW.creatingRelease":"Creando un release desde el build #{id}\u2026","buildsW.releaseDone":"Release {semver} creado.","releasesW.title":"{app} \xB7 {count} release(s)","releasesW.none":"Todav\xEDa no hay releases.","releasesW.deploy":"Deployar","deploymentsW.title":"{app} \xB7 {count} deployment(s)","deploymentsW.none":"Todav\xEDa no hay deployments.","deploymentsW.group":"{count} scopes"},W_={en:H_,es:V_};function lf(e){return e?.structuredContent?._locale==="es"?"es":"en"}function uf(e){let r=W_[e];return(n,i)=>r[n].replace(/\{(\w+)\}/g,(t,o)=>i?.[o]!==void 0?String(i[o]):t)}var B_=sn(uf("en")),pf=B_.Provider;var df=e=>uf(e);function mf(e){return{render:function(r){ju(r,e)},unmount:function(){Tu(e)}}}function ff(e){let r=document.getElementById("root");r&&mf(r).render(e)}var J_=0;function h(e,r,n,i,t,o){r||(r={});var a,s,u=r;if("ref"in u)for(s in u={},r)s=="ref"?a=r[s]:u[s]=r[s];var p={type:e,props:u,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--J_,__i:-1,__u:0,__source:t,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)u[s]===void 0&&(u[s]=a[s]);return U.vnode&&U.vnode(p),p}var K_={clock:{body:h(V,{children:[h("circle",{cx:"12",cy:"12",r:"10"}),h("polyline",{points:"12 6 12 12 16 14"})]})},play:{fill:!0,body:h("polygon",{points:"6 3 20 12 6 21 6 3"})},pause:{fill:!0,body:h(V,{children:[h("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"}),h("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"})]})},refresh:{body:h(V,{children:[h("path",{d:"M21 12a9 9 0 1 1-2.64-6.36"}),h("polyline",{points:"21 3 21 8 16 8"})]})},rocket:{body:h(V,{children:[h("path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"}),h("path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"}),h("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),h("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"})]})},logs:{body:h(V,{children:[h("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h("polyline",{points:"14 2 14 8 20 8"}),h("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),h("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),h("line",{x1:"10",y1:"9",x2:"8",y2:"9"})]})},metrics:{body:h(V,{children:[h("polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17"}),h("polyline",{points:"16 7 22 7 22 13"})]})},lock:{body:h(V,{children:[h("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),h("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})},edit:{body:h("path",{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"})},copy:{body:h(V,{children:[h("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),h("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})},check:{body:h("polyline",{points:"20 6 9 17 4 12"})},chevronDown:{body:h("polyline",{points:"6 9 12 15 18 9"})},chevronLeft:{body:h("polyline",{points:"15 18 9 12 15 6"})},chevronRight:{body:h("polyline",{points:"9 18 15 12 9 6"})},arrowLeft:{body:h(V,{children:[h("line",{x1:"19",y1:"12",x2:"5",y2:"12"}),h("polyline",{points:"12 19 5 12 12 5"})]})}},Cl=({name:e,size:r=14,className:n})=>{let i=K_[e];return h("svg",{className:["icon",n].filter(Boolean).join(" "),width:r,height:r,viewBox:"0 0 24 24",fill:i.fill?"currentColor":"none",stroke:i.fill?"none":"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:i.body})};var Zl=({children:e})=>h("div",{className:"card",children:e}),G_=({children:e})=>h("div",{className:"row",children:e});var Ll=({tone:e,children:r})=>h("div",{className:`note${e?` ${e}`:""}`,children:r});var Qr=({variant:e,on:r,className:n,...i})=>h("button",{className:[e,r?"on":"",n].filter(Boolean).join(" "),...i}),Jt=({label:e,children:r})=>h("div",{className:"field",children:[h("div",{className:"label",children:e}),r]});var Q=({w:e="100%",h:r=12,r:n=6})=>h("div",{className:"skel",style:{width:e,height:r,borderRadius:n}}),gf=({variant:e})=>h(Zl,{children:[h(G_,{children:[h(Q,{w:170,h:16}),e!=="form"&&h(V,{children:[h("div",{className:"grow"}),h(Q,{w:110,h:28,r:8})]})]}),e==="list"&&h("div",{className:"skel-rows",children:[0,1,2,3,4,5].map(r=>h("div",{className:"skel-row",children:[h(Q,{w:8,h:8,r:999}),h(Q,{w:140,h:13}),h("div",{className:"grow"}),h(Q,{w:90,h:11})]},r))}),e==="panel"&&h(V,{children:[h("div",{className:"section",children:[h(Q,{w:64,h:10}),h("div",{style:{marginTop:10,display:"flex",flexDirection:"column",gap:10},children:[0,1].map(r=>h("div",{className:"skel-card",children:[h(Q,{w:r?"45%":"55%",h:14}),h("div",{style:{height:8}}),h(Q,{w:r?"70%":"85%",h:11})]},r))})]}),h("div",{className:"section",children:[h(Q,{w:64,h:10}),h("div",{style:{marginTop:10,display:"flex",gap:8},children:[0,1,2].map(r=>h(Q,{w:72,h:24,r:999},r))})]}),h("div",{className:"section",style:{display:"flex",gap:8},children:[h(Q,{w:132,h:34,r:9}),h(Q,{w:80,h:34,r:9})]})]}),e==="table"&&h("div",{className:"skel-rows",children:[0,1,2,3].map(r=>h("div",{className:"skel-row",children:[h(Q,{w:"30%",h:13}),h("div",{className:"grow"}),h(Q,{w:"42%",h:13}),h(Q,{w:18,h:13})]},r))}),e==="grid"&&h("div",{className:"skel-grid",children:[0,1,2,3].map(r=>h("div",{className:"skel-card",children:[h(Q,{w:"50%",h:10}),h("div",{style:{height:8}}),h(Q,{w:"35%",h:20}),h("div",{style:{height:8}}),h(Q,{w:"100%",h:40,r:8})]},r))}),e==="logs"&&h("div",{style:{marginTop:14},children:h(Q,{w:"100%",h:150,r:10})}),e==="form"&&h("div",{className:"skel-rows",children:[[0,1,2].map(r=>h("div",{children:[h(Q,{w:88,h:10}),h("div",{style:{height:7}}),h(Q,{w:"100%",h:32,r:8})]},r)),h(Q,{w:150,h:34,r:9})]})]});function Q_(){let{result:e,call:r,brief:n}=cf("np-create-app"),i=Ge(()=>df(lf(e)),[e]),[t,o]=re([]),[a,s]=re([]),[u,p]=re(""),[m,l]=re(null),[b,v]=re("new"),[f,$]=re(null),[k,j]=re(""),[y,P]=re(!0),[O,ue]=re(""),[$e,Oe]=re(!1),[Se,be]=re(""),[Re,Ml]=re(!1),[hf,vf]=re(!1),[Fl,Ue]=re({text:""}),Kt=Me(E=>{let de=E?.structuredContent;if(de?.mode==="form"){let Je=de.namespaces??[],di=de.templates??[];o(Je),s(di),de.prefill?.name&&p(lt=>lt||de.prefill?.name||""),l(lt=>lt??de.prefill?.namespace_id??Je[0]?.id??null),$(lt=>di.some(xf=>xf.id===lt)?lt:di[0]?.id??null);return}if(de?.application){let Je=de.application;vf(!0),Ue({tone:Je.status==="active"?"ok":void 0,text:i("createApp.created",{name:Je.name,id:Je.id,status:Je.status})});return}let ql=sf(E);ql&&Ue({text:ql.slice(0,300)})},[i]);pt(()=>Kt(e),[e,Kt]);let _f=Me(async E=>{try{Kt(await r(Ii.applicationCreate,{namespace_id:E}))}catch{}},[Kt,r]),Yr=Ge(()=>t.find(E=>E.id===m),[t,m]),ct=Yr?.base_url??null,ui=Ge(()=>Yr&&u.trim()?`${rr(Yr.name)}-${rr(u)}`:rr(u),[Yr,u]),pi=y?ui:k||ui,bf=ct&&pi?`${ct}/${pi}`:"",yf=async()=>{if(Re)return;if(!u.trim())return Ue({tone:"bad",text:i("createApp.needName")});if(!m)return Ue({tone:"bad",text:i("createApp.needNamespace")});let E={name:u.trim(),namespace_id:m};if(b==="new"){if(!ct)return Ue({tone:"bad",text:i("createApp.noBaseUrl")});if(!f)return Ue({tone:"bad",text:i("createApp.needTemplate")});E.repository_url=bf,E.template_id=f}else{if(!O.trim())return Ue({tone:"bad",text:i("createApp.needImportUrl")});E.repository_url=O.trim(),$e&&Se.trim()&&(E.repository_app_path=Se.trim().replace(/^\/+|\/+$/g,""))}Ml(!0),Ue({text:i("createApp.creating",{name:u.trim()})});try{Kt(await r(Ii.applicationCreate,E)),n(`[create-app] user created application "${u.trim()}" from the widget.`)}catch(de){Ue({tone:"bad",text:i("createApp.failed",{message:Ou(de)})})}Ml(!1)};return e?h(pf,{value:i,children:h(Zl,{children:[h("div",{className:"title",style:{marginBottom:12},children:i("createApp.title")}),!hf&&h(V,{children:[h(Jt,{label:i("createApp.name"),children:h("input",{type:"text",placeholder:"my-service",autoComplete:"off",value:u,onChange:E=>p(E.target.value)})}),h(Jt,{label:i("createApp.namespace"),children:h("select",{value:m??"",onChange:E=>{let de=Number(E.target.value)||null;l(de),de&&_f(de)},children:t.map(E=>h("option",{value:E.id,children:[E.name,E.account?` \u2014 ${E.account}`:""]},E.id))})}),h("div",{className:"field",children:[h("div",{className:"label",children:i("createApp.repository")}),h("div",{className:"segmented",children:[h(Qr,{variant:"small",on:b==="new",className:"seg",onClick:()=>v("new"),children:i("createApp.newRepo")}),h(Qr,{variant:"small",on:b==="import",className:"seg",onClick:()=>v("import"),children:i("createApp.importRepo")})]})]}),b==="new"?h(V,{children:[h(Jt,{label:i("createApp.template"),children:h("select",{value:f??"",onChange:E=>$(Number(E.target.value)||null),children:[a.length===0&&h("option",{value:"",children:i("createApp.noTemplates")}),a.map(E=>h("option",{value:E.id,children:[E.name,E.tags?.length?` \xB7 ${E.tags.slice(0,2).join(", ")}`:""]},E.id))]})}),h("div",{className:"field",children:[h("div",{className:"label",children:i("createApp.repoUrl")}),ct?h("div",{className:"repo-url",children:[h("span",{className:"repo-base",title:ct,children:[ct,"/"]}),h("input",{type:"text",className:"grow mono",value:pi,disabled:y,spellCheck:!1,onChange:E=>j(rr(E.target.value))}),h(Qr,{variant:"small",className:"hasicon",title:i(y?"createApp.editName":"createApp.lockName"),"aria-label":i(y?"createApp.editName":"createApp.lockName"),on:!y,onClick:()=>{P(E=>(E&&j(ui),!E))},children:h(Cl,{name:y?"edit":"lock"})})]}):h(Ll,{tone:"bad",children:i("createApp.noBaseUrl")})]})]}):h(V,{children:[h(Jt,{label:i("createApp.importUrl"),children:h("input",{type:"text",className:"mono",placeholder:"https://github.com/org/existing-repo",autoComplete:"off",spellCheck:!1,value:O,onChange:E=>ue(E.target.value)})}),h("label",{className:"check-row",children:[h("input",{type:"checkbox",checked:$e,onChange:E=>Oe(E.target.checked)}),h("span",{children:i("createApp.monorepo")})]}),$e&&h(Jt,{label:i("createApp.appPath"),children:h("input",{type:"text",className:"mono",placeholder:"services/my-app",autoComplete:"off",spellCheck:!1,value:Se,onChange:E=>be(E.target.value)})})]}),h(Qr,{variant:"primary",disabled:Re,onClick:()=>{yf()},style:{marginTop:4},children:i("createApp.submit")})]}),h(Ll,{tone:Fl.tone,children:Fl.text})]})}):h(gf,{variant:"form"})}ff(h(Q_,{}));})();
|
|
908
|
+
`);function q_(e){if(!e)return;let r=e.trim().toLowerCase(),n,i,t,o=/^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(r)?.[1];if(o){let a=o.length===3?o.split("").map(s=>s+s).join(""):o;n=parseInt(a.slice(0,2),16),i=parseInt(a.slice(2,4),16),t=parseInt(a.slice(4,6),16)}else{let a=/^rgba?\(\s*([\d.]+)[ ,]+([\d.]+)[ ,]+([\d.]+)/.exec(r);a&&([n,i,t]=[Number(a[1]),Number(a[2]),Number(a[3])]);let s=/^hsla?\(\s*[\d.]+[ ,]+[\d.]+%?[ ,]+([\d.]+)%/.exec(r);if(s)return Number(s[1])/100}if(!(n===void 0||i===void 0||t===void 0))return(.2126*n+.7152*i+.0722*t)/255}function af(e){if(!e)return;let r=document.documentElement,n=e.theme==="dark"||e.theme==="light"?e.theme:void 0,i=e.styles?.variables;if(!n&&i){let t=q_(i["--color-background-primary"]??i["--color-background-secondary"]);t!==void 0&&(n=t<.5?"dark":"light")}n&&(r.classList.toggle("dark",n==="dark"),r.classList.toggle("light",n==="light"),r.style.colorScheme=n);try{i&&nf(i),e.styles?.css?.fonts&&of(e.styles.css.fonts)}catch{}console.debug("[np-widget] theme:",e.theme,"->",n??"os-fallback","| tokens:",!!i,"| fonts:",!!e.styles?.css?.fonts)}function cf(e){let[r,n]=re(null),[i,t]=re(!1),o=ln(null);pt(()=>{let p=new ci({name:e,version:"0.3.0"},{},{autoResize:!0});o.current=p,p.ontoolresult=m=>n(m),p.onhostcontextchanged=m=>af(m),p.connect().then(()=>{af(p.getHostContext()),t(!0)}).catch(()=>t(!1))},[e]);let a=Me(async(p,m)=>{if(!o.current)throw new Error("not connected");return await o.current.callServerTool({name:p,arguments:m})},[]),s=Me(p=>{o.current?.sendMessage({role:"user",content:[{type:"text",text:p}]}).catch(()=>{})},[]),u=Me(p=>{try{o.current?.updateModelContext({content:[{type:"text",text:p}]}).catch(()=>{})}catch{}},[]);return{result:r,call:a,send:s,brief:u,connected:i}}var H_={"confirm.yes":"Yes, do it","confirm.no":"Cancel","chooser.pick":"pick a scope:","term.empty":"no output yet\u2026","term.copyLine":"copy line",hint:"Next:",loadMore:"Load more","panel.scopes":"Scopes","panel.releases":"Releases","panel.latestBuild":"Latest build","panel.noScopes":"No scopes yet \u2014 create one to have somewhere to deploy.","panel.scopePlaceholder":"scope name, e.g. dev","panel.typePlaceholder":"type\u2026","panel.createScope":"Create scope","panel.ship":"ship","panel.live":"live","panel.openRollout":"Open rollout","panel.nothingDeployed":"nothing deployed","panel.noReleases":"none yet","panel.noBuild":"none \u2014 push a commit so CI builds","panel.deployLatest":"Deploy latest","panel.logs":"Logs","panel.metrics":"Metrics","panel.pickType":"Pick a scope type and create again.","panel.waitingData":"waiting for data\u2026","panel.backToList":"apps","rollout.deployingTo":"Deploying to {scope}","rollout.release":"release","rollout.backToApp":"app","rollout.trafficLabel":"Traffic on new version","rollout.live":"{pct}% live","rollout.movingTo":"moving to {pct}%","rollout.move":"Move traffic","rollout.finalize":"Finalize","rollout.rollback":"Rollback","rollout.confirmFinalize":"Finalize and retire the old version?","rollout.confirmRollback":"Return ALL traffic to the previous version?","rollout.log":"Deployment log","rollout.waiting":"waiting for activity\u2026","rollout.failed":"Failed: {message}","rollout.deployment":"Deployment #{id}","rollout.busyMove":"Moving traffic\u2026","rollout.busyFinalize":"Finalizing\u2026","rollout.busyRollback":"Rolling back\u2026","rollout.autoDone":"Done \u2014 the release is fully live.","rollout.autoRolledBack":"Rolled back \u2014 previous version is serving traffic.","rollout.autoFailed":"Deployment failed \u2014 previous version keeps serving.","rollout.autoWaiting":"Waiting for instances \u2014 controls unlock when the rollout is running.","rollout.autoFull":"All traffic on the new version \u2014 finalize to retire the old one.","rollout.autoLabel":"Auto-advance","rollout.autoOff":"off","rollout.trafficHelp":"Drag to move traffic now; auto-advance ramps it to 100%.","rollout.appLogs":"Application logs","rollout.appLogsEmpty":"no application logs yet\u2026","logs.title":"{app} \xB7 logs","logs.heading":"Logs","logs.filter":"filter\u2026","logs.live":"live","logs.refresh":"Refresh","logs.updated":"updated {time}","logs.wrap":"Wrap","logs.copyAll":"Copy all","logs.copied":"Copied","logs.rangeLive":"Live","logs.range15m":"Last 15m","logs.range1h":"Last 1h","logs.range6h":"Last 6h","logs.range24h":"Last 24h","logs.rangeCustom":"Custom\u2026","logs.apply":"Apply","logs.from":"From","logs.to":"To","logs.empty":"no log lines yet\u2026","logs.noMatch":"nothing matches the filter","logs.count":"{count} line(s){scope}","logs.scopeSuffix":" \xB7 scope {scope}","logs.refreshFailed":"refresh failed: {message}","metrics.title":"{app} \xB7 {scope} metrics","metrics.heading":"Metrics","metrics.live":"live","metrics.loading":"loading {window}\u2026","metrics.refreshFailed":"refresh failed: {message}","metrics.noData":"no datapoints in this window","metrics.avgMax":"avg {avg} \xB7 max {max}","params.title":"{app} \xB7 parameters","params.heading":"Parameters","params.name":"Name","params.value":"Value","params.secret":"Secret","params.add":"+ Add","params.save":"Save changes","params.applyNote":"Changed values apply on the next deploy.","params.unavailable":"Existing values can't be listed here \u2014 new ones can still be added below.","params.saving":"Saving {count} parameter(s)\u2026","params.saved":"Saved \u2014 values apply on the next deploy.","params.saveFailed":"Save failed: {message}","createApp.title":"Create application","createApp.name":"Name","createApp.namespace":"Namespace","createApp.repository":"Repository","createApp.newRepo":"New repository","createApp.importRepo":"Import existing","createApp.template":"Template","createApp.noTemplates":"No templates available","createApp.repoUrl":"Repository URL","createApp.editName":"Customize the repository name","createApp.lockName":"Reset to the generated name","createApp.importUrl":"Existing repository URL","createApp.monorepo":"This repository is a monorepo","createApp.appPath":"Application path inside the repository","createApp.submit":"Create application","createApp.needName":"Name is required.","createApp.needNamespace":"Pick a namespace.","createApp.needTemplate":"Pick a template for the new repository.","createApp.needImportUrl":"Enter the repository URL to import.","createApp.noBaseUrl":"This account has no git provider configured \u2014 use \u201CImport existing\u201D.","createApp.creating":"Creating {name}\u2026 (links the repo, wires CI \u2014 takes a few seconds)","createApp.failed":"Failed: {message}","createApp.created":`{name} created (#{id}, {status}).
|
|
909
|
+
Push a commit to trigger the first build, then deploy.`,"findApps.count":"{count} application(s)","findApps.filter":"filter\u2026","findApps.across":"across {ns} namespace(s)","findApps.noMatch":"Nothing matches the filter.","findApps.loadMore":"Load {more} more","findApps.hint":"Click an application to open its panel.","buildsW.title":"{app} \xB7 {count} build(s)","buildsW.none":"No builds yet \u2014 push a commit so CI produces one.","buildsW.buildTitle":"Build #{id}","buildsW.back":"Builds","buildsW.loadingAssets":"Loading assets\u2026","buildsW.noAssets":"No assets \u2014 the build may still be running.","buildsW.asset":"Asset","buildsW.assetType":"Type","buildsW.newRelease":"New release","buildsW.confirmRelease":"Cut a release from this build?","buildsW.creatingRelease":"Creating a release from build #{id}\u2026","buildsW.releaseDone":"Release {semver} created.","releasesW.title":"{app} \xB7 {count} release(s)","releasesW.none":"No releases yet.","releasesW.deploy":"Deploy","deploymentsW.title":"{app} \xB7 {count} deployment(s)","deploymentsW.none":"No deployments yet.","deploymentsW.group":"{count} scopes","approvalsW.title":"{app} \xB7 {count} approval(s)","approvalsW.none":"No pending approvals.","approvalsW.approve":"Approve","approvalsW.cancel":"Cancel","approvalsW.confirmApprove":"Let this gated action proceed?","approvalsW.confirmCancel":"Cancel this approval request?","approvalsW.by":"by {who}","approvalsW.approved":"Approved {id}.","approvalsW.cancelled":"Cancelled {id}.","overviewW.title":"Org health \xB7 {count} app(s) scanned","overviewW.truncated":"showing the first apps \u2014 narrow with a query for the rest","overviewW.active":"Mid-rollout ({count})","overviewW.noActive":"Nothing deploying right now.","overviewW.trouble":"Needs attention ({count})","overviewW.noTrouble":"No failed or rolled-back scopes.","servicesW.title":"{app} \xB7 {count} dependency(ies)","servicesW.none":"No dependencies attached.","servicesW.catalog":"Available to provision","servicesW.dashboard":"Open in dashboard","servicesW.provisionHint":"Provisioning a dependency is a guided flow \u2014 open the dashboard to add one.","playbookW.title":"Operating playbooks","playbookW.catalogHint":"Pick a playbook to read.","playbookW.back":"Playbooks","playbookW.empty":"No playbooks available."},V_={"confirm.yes":"S\xED, hacelo","confirm.no":"Cancelar","chooser.pick":"eleg\xED un scope:","term.empty":"sin salida todav\xEDa\u2026","term.copyLine":"copiar l\xEDnea",hint:"Siguiente:",loadMore:"Cargar m\xE1s","panel.scopes":"Scopes","panel.releases":"Releases","panel.latestBuild":"\xDAltimo build","panel.noScopes":"Sin scopes todav\xEDa \u2014 cre\xE1 uno para tener d\xF3nde deployar.","panel.scopePlaceholder":"nombre del scope, p. ej. dev","panel.typePlaceholder":"tipo\u2026","panel.createScope":"Crear scope","panel.ship":"publicar","panel.live":"en vivo","panel.openRollout":"Abrir rollout","panel.nothingDeployed":"nada deployado","panel.noReleases":"ninguna todav\xEDa","panel.noBuild":"ninguno \u2014 pushe\xE1 un commit para que CI compile","panel.deployLatest":"Deployar lo \xFAltimo","panel.logs":"Logs","panel.metrics":"M\xE9tricas","panel.pickType":"Eleg\xED un tipo de scope y cre\xE1 de nuevo.","panel.waitingData":"esperando datos\u2026","panel.backToList":"apps","rollout.deployingTo":"Deployando a {scope}","rollout.release":"release","rollout.backToApp":"app","rollout.trafficLabel":"Tr\xE1fico en la versi\xF3n nueva","rollout.live":"{pct}% en vivo","rollout.movingTo":"yendo a {pct}%","rollout.move":"Mover tr\xE1fico","rollout.finalize":"Finalizar","rollout.rollback":"Revertir","rollout.confirmFinalize":"\xBFFinalizar y retirar la versi\xF3n anterior?","rollout.confirmRollback":"\xBFDevolver TODO el tr\xE1fico a la versi\xF3n anterior?","rollout.log":"Log del deployment","rollout.waiting":"esperando actividad\u2026","rollout.failed":"Fall\xF3: {message}","rollout.deployment":"Deployment #{id}","rollout.busyMove":"Moviendo tr\xE1fico\u2026","rollout.busyFinalize":"Finalizando\u2026","rollout.busyRollback":"Revirtiendo\u2026","rollout.autoDone":"Listo \u2014 la release est\xE1 completamente en vivo.","rollout.autoRolledBack":"Revertido \u2014 la versi\xF3n anterior est\xE1 sirviendo tr\xE1fico.","rollout.autoFailed":"El deployment fall\xF3 \u2014 la versi\xF3n anterior sigue sirviendo.","rollout.autoWaiting":"Esperando instancias \u2014 los controles se habilitan cuando el rollout est\xE1 corriendo.","rollout.autoFull":"Todo el tr\xE1fico en la versi\xF3n nueva \u2014 finaliz\xE1 para retirar la anterior.","rollout.autoLabel":"Auto-avance","rollout.autoOff":"off","rollout.trafficHelp":"Arrastr\xE1 para mover el tr\xE1fico ahora; el auto-avance sube hasta 100%.","rollout.appLogs":"Logs de la aplicaci\xF3n","rollout.appLogsEmpty":"sin logs de la aplicaci\xF3n todav\xEDa\u2026","logs.title":"{app} \xB7 logs","logs.heading":"Logs","logs.filter":"filtrar\u2026","logs.live":"vivo","logs.refresh":"Refrescar","logs.updated":"actualizado {time}","logs.wrap":"Ajustar","logs.copyAll":"Copiar todo","logs.copied":"Copiado","logs.rangeLive":"En vivo","logs.range15m":"\xDAltimos 15m","logs.range1h":"\xDAltima 1h","logs.range6h":"\xDAltimas 6h","logs.range24h":"\xDAltimas 24h","logs.rangeCustom":"Personalizado\u2026","logs.apply":"Aplicar","logs.from":"Desde","logs.to":"Hasta","logs.empty":"sin l\xEDneas de log todav\xEDa\u2026","logs.noMatch":"nada coincide con el filtro","logs.count":"{count} l\xEDnea(s){scope}","logs.scopeSuffix":" \xB7 scope {scope}","logs.refreshFailed":"fall\xF3 el refresh: {message}","metrics.title":"{app} \xB7 m\xE9tricas de {scope}","metrics.heading":"M\xE9tricas","metrics.live":"vivo","metrics.loading":"cargando {window}\u2026","metrics.refreshFailed":"fall\xF3 el refresh: {message}","metrics.noData":"sin datapoints en esta ventana","metrics.avgMax":"prom {avg} \xB7 m\xE1x {max}","params.title":"{app} \xB7 par\xE1metros","params.heading":"Par\xE1metros","params.name":"Nombre","params.value":"Valor","params.secret":"Secreto","params.add":"+ Agregar","params.save":"Guardar cambios","params.applyNote":"Los valores cambiados aplican en el pr\xF3ximo deploy.","params.unavailable":"Los valores existentes no se pueden listar ac\xE1 \u2014 igual pod\xE9s agregar nuevos abajo.","params.saving":"Guardando {count} par\xE1metro(s)\u2026","params.saved":"Guardado \u2014 los valores aplican en el pr\xF3ximo deploy.","params.saveFailed":"Fall\xF3 el guardado: {message}","createApp.title":"Crear aplicaci\xF3n","createApp.name":"Nombre","createApp.namespace":"Namespace","createApp.repository":"Repositorio","createApp.newRepo":"Nuevo repositorio","createApp.importRepo":"Importar existente","createApp.template":"Template","createApp.noTemplates":"Sin templates disponibles","createApp.repoUrl":"URL del repositorio","createApp.editName":"Personalizar el nombre del repositorio","createApp.lockName":"Volver al nombre generado","createApp.importUrl":"URL del repositorio existente","createApp.monorepo":"Este repositorio es un monorepo","createApp.appPath":"Ruta de la aplicaci\xF3n dentro del repositorio","createApp.submit":"Crear aplicaci\xF3n","createApp.needName":"El nombre es obligatorio.","createApp.needNamespace":"Eleg\xED un namespace.","createApp.needTemplate":"Eleg\xED un template para el nuevo repositorio.","createApp.needImportUrl":"Ingres\xE1 la URL del repositorio a importar.","createApp.noBaseUrl":"Esta cuenta no tiene proveedor de git configurado \u2014 us\xE1 \u201CImportar existente\u201D.","createApp.creating":"Creando {name}\u2026 (vincula el repo, conecta CI \u2014 tarda unos segundos)","createApp.failed":"Fall\xF3: {message}","createApp.created":`{name} creada (#{id}, {status}).
|
|
910
|
+
Pushe\xE1 un commit para disparar el primer build y despu\xE9s deploy\xE1.`,"findApps.count":"{count} aplicaci\xF3n(es)","findApps.filter":"filtrar\u2026","findApps.across":"en {ns} namespace(s)","findApps.noMatch":"Nada coincide con el filtro.","findApps.loadMore":"Cargar {more} m\xE1s","findApps.hint":"Hac\xE9 clic en una aplicaci\xF3n para abrir su panel.","buildsW.title":"{app} \xB7 {count} build(s)","buildsW.none":"Todav\xEDa no hay builds \u2014 pushe\xE1 un commit para que CI genere uno.","buildsW.buildTitle":"Build #{id}","buildsW.back":"Builds","buildsW.loadingAssets":"Cargando assets\u2026","buildsW.noAssets":"Sin assets \u2014 el build puede estar compilando todav\xEDa.","buildsW.asset":"Asset","buildsW.assetType":"Tipo","buildsW.newRelease":"Nuevo release","buildsW.confirmRelease":"\xBFCortar un release desde este build?","buildsW.creatingRelease":"Creando un release desde el build #{id}\u2026","buildsW.releaseDone":"Release {semver} creado.","releasesW.title":"{app} \xB7 {count} release(s)","releasesW.none":"Todav\xEDa no hay releases.","releasesW.deploy":"Deployar","deploymentsW.title":"{app} \xB7 {count} deployment(s)","deploymentsW.none":"Todav\xEDa no hay deployments.","deploymentsW.group":"{count} scopes","approvalsW.title":"{app} \xB7 {count} aprobaci\xF3n(es)","approvalsW.none":"No hay aprobaciones pendientes.","approvalsW.approve":"Aprobar","approvalsW.cancel":"Cancelar","approvalsW.confirmApprove":"\xBFDejar que la acci\xF3n bloqueada contin\xFAe?","approvalsW.confirmCancel":"\xBFCancelar esta solicitud de aprobaci\xF3n?","approvalsW.by":"por {who}","approvalsW.approved":"Aprobada {id}.","approvalsW.cancelled":"Cancelada {id}.","overviewW.title":"Salud del org \xB7 {count} app(s) escaneadas","overviewW.truncated":"mostrando las primeras apps \u2014 filtr\xE1 con una b\xFAsqueda para el resto","overviewW.active":"En despliegue ({count})","overviewW.noActive":"Nada despleg\xE1ndose ahora.","overviewW.trouble":"Requiere atenci\xF3n ({count})","overviewW.noTrouble":"Ning\xFAn scope fall\xF3 ni se revirti\xF3.","servicesW.title":"{app} \xB7 {count} dependencia(s)","servicesW.none":"No hay dependencias adjuntas.","servicesW.catalog":"Disponibles para aprovisionar","servicesW.dashboard":"Abrir en el dashboard","servicesW.provisionHint":"Aprovisionar una dependencia es un flujo guiado \u2014 abr\xED el dashboard para agregar una.","playbookW.title":"Playbooks operativos","playbookW.catalogHint":"Eleg\xED un playbook para leer.","playbookW.back":"Playbooks","playbookW.empty":"No hay playbooks disponibles."},W_={en:H_,es:V_};function lf(e){return e?.structuredContent?._locale==="es"?"es":"en"}function uf(e){let r=W_[e];return(n,i)=>r[n].replace(/\{(\w+)\}/g,(t,o)=>i?.[o]!==void 0?String(i[o]):t)}var B_=sn(uf("en")),pf=B_.Provider;var df=e=>uf(e);function mf(e){return{render:function(r){ju(r,e)},unmount:function(){Tu(e)}}}function ff(e){let r=document.getElementById("root");r&&mf(r).render(e)}var J_=0;function h(e,r,n,i,t,o){r||(r={});var a,s,u=r;if("ref"in u)for(s in u={},r)s=="ref"?a=r[s]:u[s]=r[s];var p={type:e,props:u,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--J_,__i:-1,__u:0,__source:t,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)u[s]===void 0&&(u[s]=a[s]);return U.vnode&&U.vnode(p),p}var K_={clock:{body:h(V,{children:[h("circle",{cx:"12",cy:"12",r:"10"}),h("polyline",{points:"12 6 12 12 16 14"})]})},play:{fill:!0,body:h("polygon",{points:"6 3 20 12 6 21 6 3"})},pause:{fill:!0,body:h(V,{children:[h("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"}),h("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"})]})},refresh:{body:h(V,{children:[h("path",{d:"M21 12a9 9 0 1 1-2.64-6.36"}),h("polyline",{points:"21 3 21 8 16 8"})]})},rocket:{body:h(V,{children:[h("path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"}),h("path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"}),h("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),h("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"})]})},logs:{body:h(V,{children:[h("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h("polyline",{points:"14 2 14 8 20 8"}),h("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),h("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),h("line",{x1:"10",y1:"9",x2:"8",y2:"9"})]})},metrics:{body:h(V,{children:[h("polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17"}),h("polyline",{points:"16 7 22 7 22 13"})]})},lock:{body:h(V,{children:[h("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),h("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})},edit:{body:h("path",{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"})},copy:{body:h(V,{children:[h("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),h("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})},check:{body:h("polyline",{points:"20 6 9 17 4 12"})},chevronDown:{body:h("polyline",{points:"6 9 12 15 18 9"})},chevronLeft:{body:h("polyline",{points:"15 18 9 12 15 6"})},chevronRight:{body:h("polyline",{points:"9 18 15 12 9 6"})},arrowLeft:{body:h(V,{children:[h("line",{x1:"19",y1:"12",x2:"5",y2:"12"}),h("polyline",{points:"12 19 5 12 12 5"})]})}},Cl=({name:e,size:r=14,className:n})=>{let i=K_[e];return h("svg",{className:["icon",n].filter(Boolean).join(" "),width:r,height:r,viewBox:"0 0 24 24",fill:i.fill?"currentColor":"none",stroke:i.fill?"none":"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:i.body})};var Zl=({children:e})=>h("div",{className:"card",children:e}),G_=({children:e})=>h("div",{className:"row",children:e});var Ll=({tone:e,children:r})=>h("div",{className:`note${e?` ${e}`:""}`,children:r});var Qr=({variant:e,on:r,className:n,...i})=>h("button",{className:[e,r?"on":"",n].filter(Boolean).join(" "),...i}),Jt=({label:e,children:r})=>h("div",{className:"field",children:[h("div",{className:"label",children:e}),r]});var Q=({w:e="100%",h:r=12,r:n=6})=>h("div",{className:"skel",style:{width:e,height:r,borderRadius:n}}),gf=({variant:e})=>h(Zl,{children:[h(G_,{children:[h(Q,{w:170,h:16}),e!=="form"&&h(V,{children:[h("div",{className:"grow"}),h(Q,{w:110,h:28,r:8})]})]}),e==="list"&&h("div",{className:"skel-rows",children:[0,1,2,3,4,5].map(r=>h("div",{className:"skel-row",children:[h(Q,{w:8,h:8,r:999}),h(Q,{w:140,h:13}),h("div",{className:"grow"}),h(Q,{w:90,h:11})]},r))}),e==="panel"&&h(V,{children:[h("div",{className:"section",children:[h(Q,{w:64,h:10}),h("div",{style:{marginTop:10,display:"flex",flexDirection:"column",gap:10},children:[0,1].map(r=>h("div",{className:"skel-card",children:[h(Q,{w:r?"45%":"55%",h:14}),h("div",{style:{height:8}}),h(Q,{w:r?"70%":"85%",h:11})]},r))})]}),h("div",{className:"section",children:[h(Q,{w:64,h:10}),h("div",{style:{marginTop:10,display:"flex",gap:8},children:[0,1,2].map(r=>h(Q,{w:72,h:24,r:999},r))})]}),h("div",{className:"section",style:{display:"flex",gap:8},children:[h(Q,{w:132,h:34,r:9}),h(Q,{w:80,h:34,r:9})]})]}),e==="table"&&h("div",{className:"skel-rows",children:[0,1,2,3].map(r=>h("div",{className:"skel-row",children:[h(Q,{w:"30%",h:13}),h("div",{className:"grow"}),h(Q,{w:"42%",h:13}),h(Q,{w:18,h:13})]},r))}),e==="grid"&&h("div",{className:"skel-grid",children:[0,1,2,3].map(r=>h("div",{className:"skel-card",children:[h(Q,{w:"50%",h:10}),h("div",{style:{height:8}}),h(Q,{w:"35%",h:20}),h("div",{style:{height:8}}),h(Q,{w:"100%",h:40,r:8})]},r))}),e==="logs"&&h("div",{style:{marginTop:14},children:h(Q,{w:"100%",h:150,r:10})}),e==="form"&&h("div",{className:"skel-rows",children:[[0,1,2].map(r=>h("div",{children:[h(Q,{w:88,h:10}),h("div",{style:{height:7}}),h(Q,{w:"100%",h:32,r:8})]},r)),h(Q,{w:150,h:34,r:9})]})]});function Q_(){let{result:e,call:r,brief:n}=cf("np-create-app"),i=Ge(()=>df(lf(e)),[e]),[t,o]=re([]),[a,s]=re([]),[u,p]=re(""),[m,l]=re(null),[b,v]=re("new"),[f,$]=re(null),[k,j]=re(""),[y,P]=re(!0),[O,ue]=re(""),[$e,Oe]=re(!1),[Se,be]=re(""),[Re,Ml]=re(!1),[hf,vf]=re(!1),[Fl,Ue]=re({text:""}),Kt=Me(E=>{let de=E?.structuredContent;if(de?.mode==="form"){let Je=de.namespaces??[],di=de.templates??[];o(Je),s(di),de.prefill?.name&&p(lt=>lt||de.prefill?.name||""),l(lt=>lt??de.prefill?.namespace_id??Je[0]?.id??null),$(lt=>di.some(xf=>xf.id===lt)?lt:di[0]?.id??null);return}if(de?.application){let Je=de.application;vf(!0),Ue({tone:Je.status==="active"?"ok":void 0,text:i("createApp.created",{name:Je.name,id:Je.id,status:Je.status})});return}let ql=sf(E);ql&&Ue({text:ql.slice(0,300)})},[i]);pt(()=>Kt(e),[e,Kt]);let _f=Me(async E=>{try{Kt(await r(Ii.applicationCreate,{namespace_id:E}))}catch{}},[Kt,r]),Yr=Ge(()=>t.find(E=>E.id===m),[t,m]),ct=Yr?.base_url??null,ui=Ge(()=>Yr&&u.trim()?`${rr(Yr.name)}-${rr(u)}`:rr(u),[Yr,u]),pi=y?ui:k||ui,bf=ct&&pi?`${ct}/${pi}`:"",yf=async()=>{if(Re)return;if(!u.trim())return Ue({tone:"bad",text:i("createApp.needName")});if(!m)return Ue({tone:"bad",text:i("createApp.needNamespace")});let E={name:u.trim(),namespace_id:m};if(b==="new"){if(!ct)return Ue({tone:"bad",text:i("createApp.noBaseUrl")});if(!f)return Ue({tone:"bad",text:i("createApp.needTemplate")});E.repository_url=bf,E.template_id=f}else{if(!O.trim())return Ue({tone:"bad",text:i("createApp.needImportUrl")});E.repository_url=O.trim(),$e&&Se.trim()&&(E.repository_app_path=Se.trim().replace(/^\/+|\/+$/g,""))}Ml(!0),Ue({text:i("createApp.creating",{name:u.trim()})});try{Kt(await r(Ii.applicationCreate,E)),n("[create-app] user created a new application from the widget.")}catch(de){Ue({tone:"bad",text:i("createApp.failed",{message:Ou(de)})})}Ml(!1)};return e?h(pf,{value:i,children:h(Zl,{children:[h("div",{className:"title",style:{marginBottom:12},children:i("createApp.title")}),!hf&&h(V,{children:[h(Jt,{label:i("createApp.name"),children:h("input",{type:"text",placeholder:"my-service",autoComplete:"off",value:u,onChange:E=>p(E.target.value)})}),h(Jt,{label:i("createApp.namespace"),children:h("select",{value:m??"",onChange:E=>{let de=Number(E.target.value)||null;l(de),de&&_f(de)},children:t.map(E=>h("option",{value:E.id,children:[E.name,E.account?` \u2014 ${E.account}`:""]},E.id))})}),h("div",{className:"field",children:[h("div",{className:"label",children:i("createApp.repository")}),h("div",{className:"segmented",children:[h(Qr,{variant:"small",on:b==="new",className:"seg",onClick:()=>v("new"),children:i("createApp.newRepo")}),h(Qr,{variant:"small",on:b==="import",className:"seg",onClick:()=>v("import"),children:i("createApp.importRepo")})]})]}),b==="new"?h(V,{children:[h(Jt,{label:i("createApp.template"),children:h("select",{value:f??"",onChange:E=>$(Number(E.target.value)||null),children:[a.length===0&&h("option",{value:"",children:i("createApp.noTemplates")}),a.map(E=>h("option",{value:E.id,children:[E.name,E.tags?.length?` \xB7 ${E.tags.slice(0,2).join(", ")}`:""]},E.id))]})}),h("div",{className:"field",children:[h("div",{className:"label",children:i("createApp.repoUrl")}),ct?h("div",{className:"repo-url",children:[h("span",{className:"repo-base",title:ct,children:[ct,"/"]}),h("input",{type:"text",className:"grow mono",value:pi,disabled:y,spellCheck:!1,onChange:E=>j(rr(E.target.value))}),h(Qr,{variant:"small",className:"hasicon",title:i(y?"createApp.editName":"createApp.lockName"),"aria-label":i(y?"createApp.editName":"createApp.lockName"),on:!y,onClick:()=>{P(E=>(E&&j(ui),!E))},children:h(Cl,{name:y?"edit":"lock"})})]}):h(Ll,{tone:"bad",children:i("createApp.noBaseUrl")})]})]}):h(V,{children:[h(Jt,{label:i("createApp.importUrl"),children:h("input",{type:"text",className:"mono",placeholder:"https://github.com/org/existing-repo",autoComplete:"off",spellCheck:!1,value:O,onChange:E=>ue(E.target.value)})}),h("label",{className:"check-row",children:[h("input",{type:"checkbox",checked:$e,onChange:E=>Oe(E.target.checked)}),h("span",{children:i("createApp.monorepo")})]}),$e&&h(Jt,{label:i("createApp.appPath"),children:h("input",{type:"text",className:"mono",placeholder:"services/my-app",autoComplete:"off",spellCheck:!1,value:Se,onChange:E=>be(E.target.value)})})]}),h(Qr,{variant:"primary",disabled:Re,onClick:()=>{yf()},style:{marginTop:4},children:i("createApp.submit")})]}),h(Ll,{tone:Fl.tone,children:Fl.text})]})}):h(gf,{variant:"form"})}ff(h(Q_,{}));})();
|
|
867
911
|
</script></body></html>
|