windows-development-sandbox 1.13.0 → 1.13.2
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/app/features/accounts/accounts.def.d.ts +1 -0
- package/dist/app/features/accounts/accounts.def.js +12 -3
- package/dist/app/features/accounts/accounts.run.d.ts +1 -0
- package/dist/app/features/accounts/accounts.run.js +20 -11
- package/dist/app/features/defs.d.ts +1 -0
- package/dist/app/features/settings/settings-file.d.ts +7 -0
- package/dist/app/features/settings/settings-file.js +19 -2
- package/dist/app/features/settings/settings-rows.js +9 -1
- package/dist/bin/agent-sandbox.js +7 -1
- package/dist/bin/chunk-IL7BXJF2.js +7 -0
- package/dist/bin/chunk-K4SU3MHJ.js +10432 -0
- package/dist/bin/chunk-VENWSGX2.js +78437 -0
- package/dist/bin/claude-host.js +10 -4
- package/dist/bin/claude-sbx.js +8 -2
- package/dist/bin/codex-sbx.js +8 -2
- package/dist/bin/gemini-sbx.js +8 -2
- package/dist/bin/sandbox.js +7 -2
- package/dist/bin/sbx-hide.js +8 -2
- package/dist/bin/sbx-show.js +8 -2
- package/dist/cli/commands/launch/prepare.js +24 -7
- package/dist/cli/commands/launch/running.js +4 -0
- package/dist/cli/commands/storage/offer.js +1 -1
- package/dist/cli/menu/live.d.ts +29 -0
- package/dist/cli/menu/live.js +92 -21
- package/dist/cli/menu/menu.d.ts +2 -1
- package/dist/cli/menu/menu.js +16 -2
- package/dist/cli/menu/pages/list-page.d.ts +5 -0
- package/dist/cli/menu/pages/list-page.js +19 -0
- package/dist/cli/menu/shell.d.ts +2 -0
- package/dist/cli/menu/shell.js +1 -1
- package/dist/cli/services/accounts-service.d.ts +7 -0
- package/dist/cli/services/accounts-service.js +20 -0
- package/dist/cli/tui/app.d.ts +4 -0
- package/dist/cli/tui/app.js +5 -0
- package/dist/cli/tui/terminal.d.ts +6 -0
- package/dist/cli/tui/terminal.js +8 -1
- package/dist/cli/validate.js +8 -4
- package/dist/core/package-info.js +1 -1
- package/dist/host/sandbox/platform.d.ts +2 -0
- package/dist/host/sandbox/platform.js +19 -4
- package/dist/host/storage/contained/state.d.ts +3 -2
- package/dist/host/storage/contained/state.js +5 -2
- package/dist/selftest/layout.test.js +10 -1
- package/dist/selftest/menu-perf.test.js +198 -12
- package/dist/selftest/menu.test.js +4 -0
- package/dist/web/index.html +1 -1
- package/dist/web/{main-Z2WYAE2Z.js → main-NBQ3LF4E.js} +1 -1
- package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
- package/package.json +1 -1
|
@@ -119,7 +119,7 @@ ${l}
|
|
|
119
119
|
|
|
120
120
|
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let c=e.external.registry.get(a[0])?.id;if(t!==a[0]&&c){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}s.count>1&&e.reused==="ref"&&i(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function eq(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let n of t){if(!n||typeof n!="object")return;eq(n);let o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;let i=n.type;for(let a of Array.isArray(i)?i:[i]){if(typeof a!="string")return;r.includes(a)||r.push(a)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var tq=new Set(["type","properties","required","additionalProperties"]),YK=["oneOf","anyOf"];function JK(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function VA(e){let t=[];for(let i of e){if(typeof i!="object"||i.type!=="object")return null;for(let a in i)if(!tq.has(a))return null;t.push(i)}let r={},n=new Set;for(let i of t){for(let a in i.properties){if(Object.prototype.hasOwnProperty.call(r,a))continue;let s=[];for(let c of t){let d=c.properties?.[a]??JK(c);d!=null&&(s.some(u=>JSON.stringify(u)===JSON.stringify(d))||s.push(d))}let l=s.length===1?s[0]:VA(s)??{allOf:s};bo(r,a,l)}for(let a of i.required??[])n.add(a)}let o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{let i=[];for(let a of t){let s=JK(a);s&&!i.some(l=>JSON.stringify(l)===JSON.stringify(s))&&i.push(s)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function Jhe(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let o of tq)if(o in e)return;let r=t.filter(o=>YK.some(i=>Array.isArray(o[i]))),n=null;if(!r.length)n=VA(t);else{let o=r[0],i=YK.find(l=>Array.isArray(o[l]));if(Object.keys(o).length!==1)return;let a=t.filter(l=>l!==o),s=o[i].map(l=>VA([...a,l]));if(s.some(l=>!l))return;n={[i]:s}}n&&(delete e.allOf,Ex(e,n))}function jc(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=s=>{let l=e.seen.get(s);if(l.ref===null)return;let c=l.def??l.schema,d={...c},u=l.ref;if(l.ref=null,u){n(u);let m=e.seen.get(u),p=m.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):Ex(c,p),Ex(c,d),s._zod.parent===u)for(let b in c)b==="$ref"||b==="allOf"||b in d||delete c[b];if(p.$ref&&m.def)for(let b in c)b==="$ref"||b==="allOf"||b in m.def&&JSON.stringify(c[b])===JSON.stringify(m.def[b])&&delete c[b]}let f=s._zod.parent;if(f&&f!==u){n(f);let m=e.seen.get(f);if(m?.schema.$ref&&(c.$ref=m.schema.$ref,m.def))for(let p in c)p==="$ref"||p==="allOf"||p in m.def&&JSON.stringify(c[p])===JSON.stringify(m.def[p])&&delete c[p]}e.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let s of[...e.seen.entries()].reverse())n(s[0]);if(e.target!=="openapi-3.0")for(let s of e.seen.entries())eq(s[1].def??s[1].schema);for(let s of e.deferred)s();if(e.intersections.length){let s=new Map;for(let l of e.seen.values())for(let c of[l.schema,l.def]){let d=c?.allOf;if(!Array.isArray(d))continue;let u=s.get(d);u?u.push(c):s.set(d,[c])}for(let l of e.intersections)for(let c of s.get(l)??[])Jhe(c)}}let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Ex(o,r.defId?r.schema:r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,bo(a,l.defId,l.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{let s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Hp(t,"input",e.processors),output:Hp(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function sn(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return sn(n.element,r);if(n.type==="set")return sn(n.valueType,r);if(n.type==="lazy")return sn(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return sn(n.innerType,r);if(n.type==="intersection")return sn(n.left,r)||sn(n.right,r);if(n.type==="record"||n.type==="map")return sn(n.keyType,r)||sn(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:sn(n.in,r)||sn(n.out,r);if(n.type==="object"){for(let o in n.shape)if(sn(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(sn(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(sn(o,r))return!0;return!!(n.rest&&sn(n.rest,r))}return!1}var HA=(e,t={})=>r=>{let n=Mc({...r,processors:t});return St(e,n),Bc(n,e),jc(n,e)},Hp=(e,t,r={})=>n=>{let{libraryOptions:o,target:i}=n??{},a=Mc({...o??{},target:i,io:t,processors:r});return St(e,a),Bc(a,e),jc(a,e)};var Wp=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},Zp=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},rq=(e,t)=>{Wp(e,"minimum",t),Zp(e,"maximum",t)},aq=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},sq=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},lq=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},cq=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},oq=(e,t)=>Wp(e,"minimum",t.minimum),nq=(e,t)=>Zp(e,"maximum",t.maximum),iq=e=>(t,r)=>{cq(t,r.format);let[n,o]=e[r.format];Wp(t,"minimum",n),Zp(t,"maximum",o)},ege={greater_than:(e,t)=>Wp(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Zp(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>aq(e,t.value),number_format:iq(Yv),bigint_format:iq(Jv),min_length:oq,max_length:nq,length_equals:(e,t)=>rq(e,t.length),min_size:oq,max_size:nq,size_equals:(e,t)=>rq(e,t.size),string_format:(e,t)=>{cq(e,t.format),t.pattern&&sq(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>lq(e,t.mime)};function Mr(e){let t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let i of n)ege[i._zod.def.check]?.(t,i._zod.def);let o=e._zod.bag;o.minimum!==void 0&&Wp(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&Wp(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&Zp(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&Zp(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&aq(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&lq(t,o.mime);for(let i of o.patterns??[])sq(t,i);return t}var tge={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rge=new Map([[dS,YT],[gx,JT]]),dq=e=>rge.get(e)??e,GA=(e,t,r,n)=>{let o=r;o.type="string";let{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:c,laxFormat:d}=Mr(e);if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),s&&(o.format=tge[s]??s,o.format===""&&delete o.format,(s==="time"||d)&&delete o.format),c&&(o.contentEncoding=c),l&&l.size>0){let u=[...l].map(dq);u.length===1?o.pattern=u[0].source:u.length>1&&(o.allOf=[...u.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},KA=(e,t,r,n)=>{let o=r,{minimum:i,maximum:a,multipleOf:s,exclusiveMaximum:l,exclusiveMinimum:c,isInt:d}=Mr(e);o.type=d?"integer":"number";let u=typeof c=="number"&&c>=(i??Number.NEGATIVE_INFINITY),f=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),m=t.target==="draft-04"||t.target==="openapi-3.0";if(u?m?(o.minimum=c,o.exclusiveMinimum=!0):o.exclusiveMinimum=c:typeof i=="number"&&(o.minimum=i),f?m?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l:typeof a=="number"&&(o.maximum=a),s){let p=new Set;for(let v of s)Number.isFinite(v)&&v!==0?p.add(Math.abs(v)):Lr(e,t,o,n,`A multipleOf divisor of ${v} cannot be represented in JSON Schema`);let[g,...b]=p;g!==void 0&&(o.multipleOf=g),b.length&&(o.allOf=[...o.allOf??[],...b.map(v=>({multipleOf:v}))])}},qA=(e,t,r,n)=>{r.type="boolean"},XA=(e,t,r,n)=>{Lr(e,t,r,n,"BigInt cannot be represented in JSON Schema")},QA=(e,t,r,n)=>{Lr(e,t,r,n,"Symbols cannot be represented in JSON Schema")},YA=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},JA=(e,t,r,n)=>{Lr(e,t,r,n,"Undefined cannot be represented in JSON Schema")},e5=(e,t,r,n)=>{Lr(e,t,r,n,"Void cannot be represented in JSON Schema")},t5=(e,t,r,n)=>{r.not={}},r5=(e,t,r,n)=>{},o5=(e,t,r,n)=>{},n5=(e,t,r,n)=>{Lr(e,t,r,n,"Date cannot be represented in JSON Schema")},i5=(e,t,r,n)=>{let o=e._zod.def,i=gp(o.entries);if(i.length===0){r.not={};return}i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},a5=(e,t,r,n)=>{let o=e._zod.def;if(o.values.length===0){r.not={};return}let i=[];for(let a of o.values)if(a===void 0){if(Lr(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Lr(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},s5=(e,t,r,n)=>{Lr(e,t,r,n,"NaN cannot be represented in JSON Schema")},l5=(e,t,r,n)=>{let o=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},c5=(e,t,r,n)=>{let o=r;o.type="string",o.format="binary",o.contentEncoding="binary";let{minimum:i,maximum:a,mime:s}=Mr(e);i!==void 0&&(o.minLength=i),a!==void 0&&(o.maxLength=a),s&&(s.length===0?o.not={}:s.length===1?o.contentMediaType=s[0]:o.anyOf=s.map(l=>({contentMediaType:l})))},d5=(e,t,r,n)=>{r.type="boolean"},u5=(e,t,r,n)=>{Lr(e,t,r,n,"Custom types cannot be represented in JSON Schema")},f5=(e,t,r,n)=>{Lr(e,t,r,n,"Function types cannot be represented in JSON Schema")},m5=(e,t,r,n)=>{Lr(e,t,r,n,"Transforms cannot be represented in JSON Schema")},p5=(e,t,r,n)=>{Lr(e,t,r,n,"Map cannot be represented in JSON Schema")},h5=(e,t,r,n)=>{Lr(e,t,r,n,"Set cannot be represented in JSON Schema")},g5=(e,t,r,n)=>{let o=r,i=e._zod.def,{minimum:a,maximum:s}=Mr(e);typeof a=="number"&&(o.minItems=a),typeof s=="number"&&(o.maxItems=s),o.type="array",o.items=St(i.element,t,{...n,path:[...n.path,"items"]})};function $x(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?$x(t.out):t.type==="catch"?$x(t.innerType):e._zod.optin}var v5=(e,t,r,n)=>{let o=r,i=e._zod.def,a=i.shape;if(Object.getOwnPropertySymbols(a).length&&Lr(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let c in a)bo(o.properties,c,St(a[c],t,{...n,path:[...n.path,"properties",c]}));let l=[];for(let c of Object.keys(a)){let d=i.shape[c];(t.io==="input"?$x(d)===void 0:d._zod.optout===void 0)&&l.push(c)}l.length>0&&(o.required=l),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=St(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},s1=(e,t,r,n)=>{let o=e._zod.def,i=o.inclusive===!1,a=o.options.map((s,l)=>St(s,t,{...n,path:[...n.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=a:r.anyOf=a},x5=(e,t,r,n)=>{let o=e._zod.def,i=St(o.left,t,{...n,path:[...n.path,"allOf",0]}),a=St(o.right,t,{...n,path:[...n.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=l,t.intersections.push(l)},b5=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((g,b)=>St(g,t,{...n,path:[...n.path,a,b]})),c=i.rest?St(i.rest,t,{...n,path:[...n.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null,d=i.items.length;for(;d>0;){let g=i.items[d-1];if(!(t.io==="input"?$x(g)!==void 0:g._zod.optout==="optional"))break;d--}let u=i.items.length,f=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=l,f?o.items=!1:c&&(o.items=c),d>0&&(o.minItems=d),f&&(o.maxItems=u)):t.target==="openapi-3.0"?(o.items={anyOf:l},c&&o.items.anyOf.push(c),d>0&&(o.minItems=d),f&&(o.maxItems=u)):(o.items=l,f?o.additionalItems=!1:c&&(o.additionalItems=c),d>0&&(o.minItems=d),f&&(o.maxItems=u));let{minimum:m,maximum:p}=Mr(e);typeof m=="number"&&(o.minItems=m),typeof p=="number"&&(o.maxItems=p)};function WA(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let p=e.get(t)?.def;if(!p)return t;let g=WA(e,p,r);return g===p?t:g}for(let p of["anyOf","oneOf"]){let g=t[p];if(!Array.isArray(g))continue;let b=g.map(v=>WA(e,v,r));b.some((v,x)=>v!==g[x])&&(t={...t,[p]:b})}let n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(p=>p==="number"||p==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(p=>typeof p=="number"))return t;let{minimum:a,maximum:s,exclusiveMinimum:l,exclusiveMaximum:c,multipleOf:d,format:u,id:f,...m}=t;return m.enum?m.enum=m.enum.map(p=>typeof p=="number"?String(p):p):typeof m.const=="number"&&(m.const=String(m.const)),o&&(m.type="string",i||(m.pattern=(n.includes("number")?nl:cx).source)),m}var ZA=new WeakMap;function oge(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let r=new Map;for(let n of ZA.get(e)??[]){let o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;let a=WA(t,i,new Set);a!==i&&r.set(i,a)}if(r.size)for(let n of e.seen.values())for(let o of[n.schema,n.def]){let i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i)}}var y5=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object";let a=i.keyType,s=Mr(a).patterns;if(i.mode==="loose"&&s&&s.size>0){let d=St(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let u of s)bo(o.patternProperties,dq(u).source,d)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=St(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let d=ZA.get(t);d||(d=[],ZA.set(t,d),t.deferred.push(()=>oge(t))),d.push(e)}o.additionalProperties=St(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let l=a._zod.values,c=t.io==="input"&&$x(i.valueType)!==void 0;if(l&&!i.partial&&!c){let d=[...l].filter(u=>typeof u=="string"||typeof u=="number");d.length>0&&(o.required=d.map(String))}},_5=(e,t,r,n)=>{let o=e._zod.def,i=St(o.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},I5=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},w5=Symbol();function uq(e,t,r,n,o){let i=!1,a=JSON.stringify(e,(s,l)=>typeof l!="bigint"?l:(i=!0,null));return i?(Lr(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),w5):JSON.parse(a)}var S5=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a=uq(o.defaultValue,e,t,r,n);a!==w5&&(r.default=a)},k5=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;let a=uq(o.defaultValue,e,t,r,n);a!==w5&&(r._prefault=a)},C5=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{Lr(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=a},P5=(e,t,r,n)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?o.out:o.in:o.out;St(a,t,n);let s=t.seen.get(e);s.ref=a},D5=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},R5=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},l1=(e,t,r,n)=>{let o=e._zod.def;St(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},T5=(e,t,r,n)=>{let o=e._zod.innerType;St(o,t,n);let i=t.seen.get(e);i.ref=o},a1={string:GA,number:KA,boolean:qA,bigint:XA,symbol:QA,null:YA,undefined:JA,void:e5,never:t5,any:r5,unknown:o5,date:n5,enum:i5,literal:a5,nan:s5,template_literal:l5,file:c5,success:d5,custom:u5,function:f5,transform:m5,map:p5,set:h5,array:g5,object:v5,union:s1,intersection:x5,tuple:b5,record:y5,nullable:_5,nonoptional:I5,default:S5,prefault:k5,catch:C5,pipe:P5,readonly:D5,promise:R5,optional:l1,lazy:T5};function c1(e,t){if("_idmap"in e){let n=e,o=Mc({...t,processors:a1}),i={};for(let l of n._idmap.entries()){let[c,d]=l;St(d,o)}let a={},s={registry:n,uri:t?.uri,defs:i};o.external=s;for(let l of n._idmap.entries()){let[c,d]=l;Bc(o,d),bo(a,c,jc(o,d))}if(Object.keys(i).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:i}}return{schemas:a}}let r=Mc({...t,processors:a1});return St(e,r),Bc(r,e),jc(r,e)}var d1=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Mc({processors:a1,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return St(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Bc(this.ctx,t);let n=jc(this.ctx,t),{"~standard":o,...i}=n;return i}};var fq={};var eh={};ys(eh,{ZodAny:()=>Y5,ZodArray:()=>rO,ZodBase64:()=>R1,ZodBase64URL:()=>T1,ZodBigInt:()=>Yp,ZodBigIntFormat:()=>A1,ZodBoolean:()=>Qp,ZodCIDRv4:()=>P1,ZodCIDRv6:()=>D1,ZodCUID:()=>y1,ZodCUID2:()=>_1,ZodCatch:()=>wO,ZodCodec:()=>Ux,ZodCreditCard:()=>H5,ZodCustom:()=>Vx,ZodCustomStringFormat:()=>Vu,ZodDate:()=>Nx,ZodDefault:()=>vO,ZodDiscriminatedUnion:()=>nO,ZodE164:()=>E1,ZodEmail:()=>g1,ZodEmoji:()=>x1,ZodEnum:()=>Kp,ZodExactOptional:()=>F1,ZodFile:()=>mO,ZodFunction:()=>AO,ZodGUID:()=>v1,ZodIBAN:()=>W5,ZodIPv4:()=>k1,ZodIPv6:()=>C1,ZodISODate:()=>Vc,ZodISODateTime:()=>Uc,ZodISODuration:()=>Wc,ZodISOTime:()=>Hc,ZodInstanceOf:()=>NO,ZodIntersection:()=>iO,ZodJWT:()=>$1,ZodKSUID:()=>S1,ZodLazy:()=>TO,ZodLiteral:()=>fO,ZodMAC:()=>V5,ZodMap:()=>dO,ZodNaN:()=>kO,ZodNanoID:()=>b1,ZodNever:()=>eO,ZodNonOptional:()=>L1,ZodNull:()=>X5,ZodNullable:()=>gO,ZodNumber:()=>Xp,ZodNumberFormat:()=>Hu,ZodObject:()=>Lx,ZodOptional:()=>Bx,ZodPipe:()=>jx,ZodPrefault:()=>bO,ZodPreprocess:()=>CO,ZodPromise:()=>$O,ZodReadonly:()=>PO,ZodRecord:()=>Gp,ZodSet:()=>uO,ZodString:()=>qp,ZodStringFormat:()=>Dt,ZodSuccess:()=>IO,ZodSymbol:()=>K5,ZodTemplateLiteral:()=>RO,ZodTransform:()=>pO,ZodTuple:()=>sO,ZodType:()=>Ke,ZodULID:()=>I1,ZodURL:()=>zx,ZodUUID:()=>os,ZodUndefined:()=>q5,ZodUnion:()=>Mx,ZodUnknown:()=>J5,ZodVoid:()=>tO,ZodXID:()=>w1,ZodXor:()=>oO,_ZodString:()=>h1,_default:()=>xO,_function:()=>SX,any:()=>tX,array:()=>Fx,base64:()=>zq,base64url:()=>Nq,bigint:()=>Xq,boolean:()=>G5,catch:()=>SO,check:()=>kX,cidrv4:()=>Aq,cidrv6:()=>Oq,codec:()=>yX,creditCard:()=>Lq,cuid:()=>kq,cuid2:()=>Cq,currencyCode:()=>Hq,custom:()=>CX,date:()=>oX,describe:()=>PX,discriminatedUnion:()=>cX,e164:()=>Fq,email:()=>hq,emoji:()=>wq,enum:()=>z1,exactOptional:()=>hO,file:()=>gX,float32:()=>Zq,float64:()=>Gq,function:()=>SX,guid:()=>gq,hash:()=>Wq,hex:()=>Vq,hostname:()=>Uq,httpUrl:()=>Iq,iban:()=>Mq,instanceof:()=>RX,int:()=>m1,int32:()=>Kq,int64:()=>Qq,intersection:()=>aO,invertCodec:()=>_X,ipv4:()=>Tq,ipv6:()=>$q,json:()=>EX,jwt:()=>Bq,keyof:()=>nX,ksuid:()=>Rq,lazy:()=>EO,literal:()=>hX,looseObject:()=>sX,looseRecord:()=>uX,mac:()=>Eq,map:()=>fX,meta:()=>DX,nan:()=>bX,nanoid:()=>Sq,nativeEnum:()=>pX,never:()=>O1,nonoptional:()=>_O,null:()=>Q5,nullable:()=>Ox,nullish:()=>vX,number:()=>Z5,object:()=>iX,optional:()=>ju,partialRecord:()=>dX,pipe:()=>p1,prefault:()=>yO,preprocess:()=>$X,promise:()=>wX,readonly:()=>DO,record:()=>cO,refine:()=>OO,set:()=>mX,strictObject:()=>aX,string:()=>Ax,stringFormat:()=>jq,stringbool:()=>TX,success:()=>xX,superRefine:()=>zO,symbol:()=>Jq,templateLiteral:()=>IX,transform:()=>N1,tuple:()=>lO,uint32:()=>qq,uint64:()=>Yq,ulid:()=>Pq,undefined:()=>eX,union:()=>Jp,unknown:()=>Bu,url:()=>_q,uuid:()=>vq,uuidv4:()=>xq,uuidv6:()=>bq,uuidv7:()=>yq,void:()=>rX,xid:()=>Dq,xor:()=>lX});var u1={};ys(u1,{endsWith:()=>Np,gt:()=>ts,gte:()=>Xn,includes:()=>Op,length:()=>Lu,lowercase:()=>$p,lt:()=>es,lte:()=>qn,maxLength:()=>Fu,maxSize:()=>Lc,mime:()=>Lp,minLength:()=>il,minSize:()=>rs,multipleOf:()=>Fc,negative:()=>r1,nonnegative:()=>n1,nonpositive:()=>o1,normalize:()=>Mp,overwrite:()=>pa,positive:()=>t1,properties:()=>Fp,property:()=>i1,regex:()=>Ep,size:()=>Nu,slugify:()=>Vp,startsWith:()=>zp,toLowerCase:()=>jp,toUpperCase:()=>Up,trim:()=>Bp,uppercase:()=>Ap});var mq=new WeakSet([Object.prototype,Error.prototype]);function f1(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}var pq=(e,t)=>{ox.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);mq.has(r)||(mq.add(r),f1(r,"format",n=>o=>ix(n,o)),f1(r,"flatten",n=>o=>nx(n,o)),f1(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,vp,2)}),f1(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,vp,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},ige=j("ZodError",pq),$n=j("ZodError",pq,void 0,{Parent:Error});var E5=_p($n),$5=wp($n),A5=Sp($n),O5=kp($n),z5=jw($n),N5=Uw($n),F5=Vw($n),L5=Hw($n),M5=Ww($n),B5=Zw($n),j5=Gw($n),U5=Kw($n);function sge(){eo.localeError||vr(CS())}function Uu(){eo.memoizer||vr({memoizer:wx()})}var Ke=j("ZodType",(e,t)=>(sge(),je.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Y.mergeDefs(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return It(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(OO(e,t))},superRefine(e,t){return this.check(zO(e,t))},overwrite(e){return this.check(pa(e))},optional(){return ju(this)},exactOptional(){return hO(this)},nullable(){return Ox(this)},nullish(){return ju(Ox(this))},nonoptional(e){return _O(this,e)},array(){return Fx(this)},or(e){return Jp([this,e])},and(e){return aO(this,e)},transform(e){return p1(this,N1(e))},default(e){return xO(this,e)},prefault(e){return yO(this,e)},catch(e){return SO(this,e)},pipe(e){return p1(this,e)},readonly(){return DO(this)},describe(e){let t=this.clone();return yo.add(t,{description:e}),t},meta(...e){if(e.length===0)return yo.get(this);let t=this.clone();return yo.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Y.hide(this,"~standard",{...iS(this),jsonSchema:{input:Hp(this,"input"),output:Hp(this,"output")}})},set"~standard"(e){Y.own(this,"~standard",e)},parse:function e(t,r){return E5(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await $5(this,t,r,{callee:e})},safeParse(e,t){return A5(this,e,t)},async safeParseAsync(e,t){return O5(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Y.own(this,"spa",e)},validate(e,t){return ax(this,e,t)},validateAsync(e,t){return sx(this,e,t)},encode:function e(t,r){return z5(this,t,r,{callee:e})},decode:function e(t,r){return N5(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await F5(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await L5(this,t,r,{callee:e})},safeEncode(e,t){return M5(this,e,t)},safeDecode(e,t){return B5(this,e,t)},async safeEncodeAsync(e,t){return j5(this,e,t)},async safeDecodeAsync(e,t){return U5(this,e,t)},toJSONSchema(e){return HA(this,{})(e)},get description(){return yo.get(this)?.description},get _def(){return this._zod.def}}),h1=j("_ZodString",(e,t)=>{Eu.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>GA(e,r,n,o)},Y.derived({format:e=>Mr(e).format??null,minLength:e=>Mr(e).minimum??null,maxLength:e=>Mr(e).maximum??null},{regex(...e){return this.check(Ep(...e))},includes(...e){return this.check(Op(...e))},startsWith(...e){return this.check(zp(...e))},endsWith(...e){return this.check(Np(...e))},min(...e){return this.check(il(...e))},max(...e){return this.check(Fu(...e))},length(...e){return this.check(Lu(...e))},nonempty(...e){return this.check(il(1,...e))},lowercase(e){return this.check($p(e))},uppercase(e){return this.check(Ap(e))},trim(){return this.check(Bp())},normalize(...e){return this.check(Mp(...e))},toLowerCase(){return this.check(jp())},toUpperCase(){return this.check(Up())},slugify(){return this.check(Vp())}})),qp=j("ZodString",(e,t)=>{Eu.init(e,t),h1.init(e,t)},{email(e){return this.check(OS(g1,e))},url(e){return this.check(Cx(zx,e))},jwt(e){return this.check(e1($1,e))},emoji(e){return this.check(BS(x1,e))},guid(e){return this.check(zS(v1,e))},uuid(e){return this.check(NS(os,e))},uuidv4(e){return this.check(FS(os,e))},uuidv6(e){return this.check(LS(os,e))},uuidv7(e){return this.check(MS(os,e))},nanoid(e){return this.check(jS(b1,e))},cuid(e){return this.check(US(y1,e))},cuid2(e){return this.check(VS(_1,e))},ulid(e){return this.check(HS(I1,e))},base64(e){return this.check(QS(R1,e))},base64url(e){return this.check(YS(T1,e))},xid(e){return this.check(WS(w1,e))},ksuid(e){return this.check(ZS(S1,e))},ipv4(e){return this.check(GS(k1,e))},ipv6(e){return this.check(KS(C1,e))},cidrv4(e){return this.check(qS(P1,e))},cidrv6(e){return this.check(XS(D1,e))},e164(e){return this.check(JS(E1,e))},datetime(e){return this.check(Px(Uc,e))},date(e){return this.check(Dx(Vc,e))},time(e){return this.check(Rx(Hc,e))},duration(e){return this.check(Tx(Wc,e))}});function Ax(e){return aA(qp,e)}var Dt=j("ZodStringFormat",(e,t)=>{wt.init(e,t),h1.init(e,t)}),Uc=j("ZodISODateTime",(e,t)=>{YE.init(e,t),Dt.init(e,t)}),Vc=j("ZodISODate",(e,t)=>{JE.init(e,t),Dt.init(e,t)}),Hc=j("ZodISOTime",(e,t)=>{e$.init(e,t),Dt.init(e,t)}),Wc=j("ZodISODuration",(e,t)=>{t$.init(e,t),Dt.init(e,t)}),g1=j("ZodEmail",(e,t)=>{jE.init(e,t),Dt.init(e,t)});function hq(e){return OS(g1,e)}var v1=j("ZodGUID",(e,t)=>{ME.init(e,t),Dt.init(e,t)});function gq(e){return zS(v1,e)}var os=j("ZodUUID",(e,t)=>{BE.init(e,t),Dt.init(e,t)});function vq(e){return NS(os,e)}function xq(e){return FS(os,e)}function bq(e){return LS(os,e)}function yq(e){return MS(os,e)}var zx=j("ZodURL",(e,t)=>{HE.init(e,t),Dt.init(e,t)});function _q(e){return Cx(zx,e)}function Iq(e){return Cx(zx,{protocol:lx,hostname:tE,...Y.normalizeParams(e)})}var x1=j("ZodEmoji",(e,t)=>{WE.init(e,t),Dt.init(e,t)});function wq(e){return BS(x1,e)}var b1=j("ZodNanoID",(e,t)=>{ZE.init(e,t),Dt.init(e,t)});function Sq(e){return jS(b1,e)}var y1=j("ZodCUID",(e,t)=>{GE.init(e,t),Dt.init(e,t)});function kq(e){return US(y1,e)}var _1=j("ZodCUID2",(e,t)=>{KE.init(e,t),Dt.init(e,t)});function Cq(e){return VS(_1,e)}var I1=j("ZodULID",(e,t)=>{qE.init(e,t),Dt.init(e,t)});function Pq(e){return HS(I1,e)}var w1=j("ZodXID",(e,t)=>{XE.init(e,t),Dt.init(e,t)});function Dq(e){return WS(w1,e)}var S1=j("ZodKSUID",(e,t)=>{QE.init(e,t),Dt.init(e,t)});function Rq(e){return ZS(S1,e)}var k1=j("ZodIPv4",(e,t)=>{r$.init(e,t),Dt.init(e,t)});function Tq(e){return GS(k1,e)}var V5=j("ZodMAC",(e,t)=>{n$.init(e,t),Dt.init(e,t)});function Eq(e){return lA(V5,e)}var C1=j("ZodIPv6",(e,t)=>{o$.init(e,t),Dt.init(e,t)});function $q(e){return KS(C1,e)}var P1=j("ZodCIDRv4",(e,t)=>{i$.init(e,t),Dt.init(e,t)});function Aq(e){return qS(P1,e)}var D1=j("ZodCIDRv6",(e,t)=>{a$.init(e,t),Dt.init(e,t)});function Oq(e){return XS(D1,e)}var R1=j("ZodBase64",(e,t)=>{s$.init(e,t),Dt.init(e,t)});function zq(e){return QS(R1,e)}var T1=j("ZodBase64URL",(e,t)=>{l$.init(e,t),Dt.init(e,t)});function Nq(e){return YS(T1,e)}var E1=j("ZodE164",(e,t)=>{c$.init(e,t),Dt.init(e,t)});function Fq(e){return JS(E1,e)}var H5=j("ZodCreditCard",(e,t)=>{d$.init(e,t),Dt.init(e,t)});function Lq(e){return cA(H5,e)}var W5=j("ZodIBAN",(e,t)=>{u$.init(e,t),Dt.init(e,t)});function Mq(e){return dA(W5,e)}var $1=j("ZodJWT",(e,t)=>{f$.init(e,t),Dt.init(e,t)});function Bq(e){return e1($1,e)}var Vu=j("ZodCustomStringFormat",(e,t)=>{m$.init(e,t),Dt.init(e,t)});function jq(e,t,r={}){return Mu(Vu,e,t,r)}function Uq(e){return Mu(Vu,"hostname",eE,e)}function Vq(e){return Mu(Vu,"hex",hE,e)}function Hq(e){return Mu(Vu,"currency_code",oE,e)}function Wq(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,o=Ri[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return Mu(Vu,n,o,t)}var Xp=j("ZodNumber",(e,t)=>{hS.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>KA(e,r,n,o),e.isFinite=!0},Y.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=Mr(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=Mr(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:r}=Mr(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>Mr(e).format??null},{gt(e,t){return this.check(ts(e,t))},gte(e,t){return this.check(Xn(e,t))},min(e,t){return this.check(Xn(e,t))},lt(e,t){return this.check(es(e,t))},lte(e,t){return this.check(qn(e,t))},max(e,t){return this.check(qn(e,t))},int(e){return this.check(m1(e))},safe(e){return this.check(m1(e))},positive(e){return this.check(ts(0,e))},nonnegative(e){return this.check(Xn(0,e))},negative(e){return this.check(es(0,e))},nonpositive(e){return this.check(qn(0,e))},multipleOf(e,t){return this.check(Fc(e,t))},step(e,t){return this.check(Fc(e,t))},finite(){return this}}));function Z5(e){return fA(Xp,e)}var Hu=j("ZodNumberFormat",(e,t)=>{p$.init(e,t),Xp.init(e,t)});function m1(e){return pA(Hu,e)}function Zq(e){return hA(Hu,e)}function Gq(e){return gA(Hu,e)}function Kq(e){return vA(Hu,e)}function qq(e){return xA(Hu,e)}var Qp=j("ZodBoolean",(e,t)=>{vx.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qA(e,r,n,o)});function G5(e){return bA(Qp,e)}var Yp=j("ZodBigInt",(e,t)=>{gS.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>XA(e,r,n,o)},Y.derived({minValue:e=>Mr(e).minimum??null,maxValue:e=>Mr(e).maximum??null,format:e=>Mr(e).format??null},{gte(e,t){return this.check(Xn(e,t))},min(e,t){return this.check(Xn(e,t))},gt(e,t){return this.check(ts(e,t))},lt(e,t){return this.check(es(e,t))},lte(e,t){return this.check(qn(e,t))},max(e,t){return this.check(qn(e,t))},positive(e){return this.check(ts(BigInt(0),e))},negative(e){return this.check(es(BigInt(0),e))},nonpositive(e){return this.check(qn(BigInt(0),e))},nonnegative(e){return this.check(Xn(BigInt(0),e))},multipleOf(e,t){return this.check(Fc(e,t))}}));function Xq(e){return _A(Yp,e)}var A1=j("ZodBigIntFormat",(e,t)=>{h$.init(e,t),Yp.init(e,t)});function Qq(e){return wA(A1,e)}function Yq(e){return SA(A1,e)}var K5=j("ZodSymbol",(e,t)=>{g$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>QA(e,r,n,o)});function Jq(e){return kA(K5,e)}var q5=j("ZodUndefined",(e,t)=>{v$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>JA(e,r,n,o)});function eX(e){return CA(q5,e)}var X5=j("ZodNull",(e,t)=>{x$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>YA(e,r,n,o)});function Q5(e){return PA(X5,e)}var Y5=j("ZodAny",(e,t)=>{b$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>r5(e,r,n,o)});function tX(){return DA(Y5)}var J5=j("ZodUnknown",(e,t)=>{y$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>o5(e,r,n,o)});function Bu(){return RA(J5)}var eO=j("ZodNever",(e,t)=>{_$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>t5(e,r,n,o)});function O1(e){return TA(eO,e)}var tO=j("ZodVoid",(e,t)=>{I$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>e5(e,r,n,o)});function rX(e){return EA(tO,e)}var Nx=j("ZodDate",(e,t)=>{w$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>n5(e,r,n,o),e.min=(r,n)=>e.check(Xn(r,n)),e.max=(r,n)=>e.check(qn(r,n))},Y.derived({minDate:e=>{let{minimum:t}=Mr(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Mr(e);return t?new Date(t):null}},{}));function oX(e){return $A(Nx,e)}var rO=j("ZodArray",(e,t)=>{Uu(),S$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>g5(e,r,n,o),e.element=t.element},{min(e,t){return this.check(il(e,t))},nonempty(e){return this.check(il(1,e))},max(e,t){return this.check(Fu(e,t))},length(e,t){return this.check(Lu(e,t))},unwrap(){return this.element}});function Fx(e,t){return zA(rO,e,t)}function nX(e){let t=e._zod.def.shape;return z1(Object.keys(t))}var Lx=j("ZodObject",(e,t)=>{Uu(),k$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>v5(e,r,n,o),Y.installLazyProp(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return z1(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Y.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Y.mergeDefs(this._zod.def,{catchall:Bu()}))},loose(){return this.clone(Y.mergeDefs(this._zod.def,{catchall:Bu()}))},strict(){return this.clone(Y.mergeDefs(this._zod.def,{catchall:O1()}))},strip(){return this.clone(Y.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return Y.extend(this,e)},safeExtend(e){return Y.safeExtend(this,e)},merge(e){return Y.merge(this,e)},pick(e){return Y.pick(this,e)},omit(e){return Y.omit(this,e)},partial(...e){return Y.partial(Bx,this,e[0])},exactPartial(...e){return Y.partial(F1,this,e[0],"exactPartial")},required(...e){return Y.required(L1,this,e[0])}});function iX(e,t){let r={type:"object",shape:e??{},...Y.normalizeParams(t)};return new Lx(r)}function aX(e,t){return new Lx({type:"object",shape:e,catchall:O1(),...Y.normalizeParams(t)})}function sX(e,t){return new Lx({type:"object",shape:e,catchall:Bu(),...Y.normalizeParams(t)})}var Mx=j("ZodUnion",(e,t)=>{xx.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>s1(e,r,n,o),e.options=t.options});function Jp(e,t){return new Mx({type:"union",options:e,...Y.normalizeParams(t)})}var oO=j("ZodXor",(e,t)=>{Mx.init(e,t),C$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>s1(e,r,n,o),e.options=t.options});function lX(e,t){return new oO({type:"union",options:e,inclusive:!1,...Y.normalizeParams(t)})}var nO=j("ZodDiscriminatedUnion",(e,t)=>{Mx.init(e,t),D$.init(e,t)});function cX(e,t,r){return new nO({type:"union",options:t,discriminator:e,...Y.normalizeParams(r)})}var iO=j("ZodIntersection",(e,t)=>{R$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>x5(e,r,n,o)});function aO(e,t){return new iO({type:"intersection",left:e,right:t})}var sO=j("ZodTuple",(e,t)=>{Uu(),vS.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>b5(e,r,n,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Bx({type:"optional",innerType:t}))})}});function lO(e,t,r){let n=t instanceof je,o=n?r:t,i=n?t:null;return new sO({type:"tuple",items:e,rest:i,...Y.normalizeParams(o)})}var Gp=j("ZodRecord",(e,t)=>{Uu(),T$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>y5(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function cO(e,t,r){return!t||!t._zod?new Gp({type:"record",keyType:Ax(),valueType:e,...Y.normalizeParams(t)}):new Gp({type:"record",keyType:e,valueType:t,...Y.normalizeParams(r)})}function dX(e,t,r){return new Gp({type:"record",keyType:e,valueType:t,...Y.normalizeParams(r),partial:!0})}function uX(e,t,r){return new Gp({type:"record",keyType:e,valueType:t,mode:"loose",...Y.normalizeParams(r)})}var dO=j("ZodMap",(e,t)=>{Uu(),E$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>p5(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(rs(...r)),e.nonempty=r=>e.check(rs(1,r)),e.max=(...r)=>e.check(Lc(...r)),e.size=(...r)=>e.check(Nu(...r))});function fX(e,t,r){return new dO({type:"map",keyType:e,valueType:t,...Y.normalizeParams(r)})}var uO=j("ZodSet",(e,t)=>{Uu(),$$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>h5(e,r,n,o),e.min=(...r)=>e.check(rs(...r)),e.nonempty=r=>e.check(rs(1,r)),e.max=(...r)=>e.check(Lc(...r)),e.size=(...r)=>e.check(Nu(...r))});function mX(e,t){return new uO({type:"set",valueType:e,...Y.normalizeParams(t)})}var Kp=j("ZodEnum",(e,t)=>{A$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,o,i)=>i5(e,n,o,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let a of n)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Kp({...t,checks:[],...Y.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let a of n)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Kp({...t,checks:[],...Y.normalizeParams(o),entries:i})}});function z1(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Kp({type:"enum",entries:r,...Y.normalizeParams(t)})}function pX(e,t){return new Kp({type:"enum",entries:e,...Y.normalizeParams(t)})}var fO=j("ZodLiteral",(e,t)=>{O$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>a5(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function hX(e,t){return new fO({type:"literal",values:Array.isArray(e)?e:[e],...Y.normalizeParams(t)})}var mO=j("ZodFile",(e,t)=>{z$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>c5(e,r,n,o),e.min=(r,n)=>e.check(rs(r,n)),e.max=(r,n)=>e.check(Lc(r,n)),e.mime=(r,n)=>e.check(Lp(Array.isArray(r)?r:[r],n))});function gX(e){return NA(mO,e)}var pO=j("ZodTransform",(e,t)=>{Uu(),N$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>m5(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Nc(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Y.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Y.issue(a))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function N1(e){return new pO({type:"transform",transform:e})}var Bx=j("ZodOptional",(e,t)=>{xS.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>l1(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function ju(e){return new Bx({type:"optional",innerType:e})}var F1=j("ZodExactOptional",(e,t)=>{F$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>l1(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function hO(e){return new F1({type:"optional",innerType:e})}var gO=j("ZodNullable",(e,t)=>{L$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>_5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ox(e){return new gO({type:"nullable",innerType:e})}function vX(e){return ju(Ox(e))}var vO=j("ZodDefault",(e,t)=>{M$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>S5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function xO(e,t){return new vO({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Y.shallowClone(t)}})}var bO=j("ZodPrefault",(e,t)=>{B$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>k5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function yO(e,t){return new bO({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Y.shallowClone(t)}})}var L1=j("ZodNonOptional",(e,t)=>{j$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>I5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function _O(e,t){return new L1({type:"nonoptional",innerType:e,...Y.normalizeParams(t)})}var IO=j("ZodSuccess",(e,t)=>{U$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>d5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function xX(e){return new IO({type:"success",innerType:e})}var wO=j("ZodCatch",(e,t)=>{V$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>C5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function SO(e,t){return new wO({type:"catch",innerType:e,catchValue:typeof t=="function"?t:Y.constantCatch(t)})}var kO=j("ZodNaN",(e,t)=>{H$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>s5(e,r,n,o)});function bX(e){return OA(kO,e)}var jx=j("ZodPipe",(e,t)=>{bS.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>P5(e,r,n,o),e.in=t.in,e.out=t.out});function p1(e,t){return new jx({type:"pipe",in:e,out:t})}var Ux=j("ZodCodec",(e,t)=>{jx.init(e,t),bx.init(e,t)});function yX(e,t,r){return new Ux({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function _X(e){let t=e._zod.def;return new Ux({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var CO=j("ZodPreprocess",(e,t)=>{jx.init(e,t),W$.init(e,t)}),PO=j("ZodReadonly",(e,t)=>{Z$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>D5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function DO(e){return new PO({type:"readonly",innerType:e})}var RO=j("ZodTemplateLiteral",(e,t)=>{G$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>l5(e,r,n,o)});function IX(e,t){return new RO({type:"template_literal",parts:e,...Y.normalizeParams(t)})}var TO=j("ZodLazy",(e,t)=>{yx.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>T5(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function EO(e){return new TO({type:"lazy",getter:e})}var $O=j("ZodPromise",(e,t)=>{q$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>R5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function wX(e){return new $O({type:"promise",innerType:e})}var AO=j("ZodFunction",(e,t)=>{K$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>f5(e,r,n,o)});function SX(e){return new AO({type:"function",input:Array.isArray(e?.input)?lO(e?.input):e?.input??Fx(Bu()),output:e?.output??Bu()})}var Vx=j("ZodCustom",(e,t)=>{X$.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>u5(e,r,n,o)});function kX(e){let t=new Tt({check:"custom"});return t._zod.check=e,t}function CX(e,t){return FA(Vx,e??(()=>!0),t)}function OO(e,t={}){return LA(Vx,e,t)}function zO(e,t){return MA(e,t)}var PX=BA,DX=jA,NO=j("ZodInstanceOf",(e,t)=>{Vx.init(e,t)},{properties(e,t){return this.check(Fp(e,t))}});function RX(e,t={}){let r=new NO({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...Y.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var TX=(...e)=>UA({Codec:Ux,Boolean:Qp,String:qp},...e);function EX(e){let t=EO(()=>Jp([Ax(e),Z5(),G5(),Q5(),Fx(t),cO(Ax(),t)]));return t}function $X(e,t){return new CO({type:"pipe",in:N1(e),out:t})}var lge={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function cge(e){vr({customError:e})}function dge(){return vr().customError}var FO;FO||(FO={});var Hx={};ys(Hx,{ZodISODate:()=>Vc,ZodISODateTime:()=>Uc,ZodISODuration:()=>Wc,ZodISOTime:()=>Hc,date:()=>fge,datetime:()=>uge,duration:()=>pge,time:()=>mge});function uge(e){return Px(Uc,e)}function fge(e){return Dx(Vc,e)}function mge(e){return Rx(Hc,e)}function pge(e){return Tx(Wc,e)}var be={...eh,...u1,iso:Hx},hge=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function gge(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function AX(e,t){return e.map((r,n)=>n<t?r:r.optional())}function vge(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function xge(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let o=r[1]===void 0?void 0:vge(r[1]);if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function bge(e,t){return be.transform(n=>n).check(n=>{let o=n.value;if(typeof o!="object"||o===null||Array.isArray(o))return;let i=Object.getOwnPropertyNames(o);if(t.minProperties!==void 0&&i.length<t.minProperties&&n.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:o,inst:e,continue:!0}),t.maxProperties!==void 0&&i.length>t.maxProperties&&n.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:o,inst:e,continue:!0}),t.keySchema)for(let a of i){let s=t.keySchema.safeParse(a);s.success||n.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(e)}function LO(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let n=String(e);return`${r[0]}${n.length}:${n}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let i=[];for(let a of e){let s=LO(a,t);if(s===null)return null;i.push(s)}return`a${i.length}:[${i.join(",")}]`}let n=Object.keys(e).sort(),o=[];for(let i of n){let a=LO(e[i],t);if(a===null)return null;o.push(`${i.length}:${i}=${a}`)}return`o${o.length}:{${o.join(",")}}`}finally{t.delete(e)}}var yge=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),_ge=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function Wx(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(Wx):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,r])=>yge.has(t)?Wx(r):!_ge.has(t)||typeof r!="object"||r===null?!1:Object.values(r).some(Wx))}function OX(e){return e===1?"element":"elements"}function Ige(e,t){return be.transform(n=>n).check(n=>{let o=n.value;if(Array.isArray(o)){if(t.uniqueItems===!0){let i=new Map;for(let a=0;a<o.length;a++){let s=LO(o[a],new Set);if(s===null)continue;let l=i.get(s);if(l===void 0){i.set(s,a);continue}n.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${l}`,input:o,path:[a],continue:!0})}}if(t.containsSchema){let i=t.minContains??1,a=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let l of o)if(t.containsSchema.safeParse(l).success&&++s>=a)break;s<i&&n.issues.push({code:"custom",message:`Array must contain at least ${i} matching ${OX(i)}; found ${s}`,input:o,continue:!0}),t.maxContains!==void 0&&s>t.maxContains&&n.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${OX(t.maxContains)}`,input:o,continue:!0})}}}).pipe(e)}function zX(e,t){if(e!==!1)return e===void 0||e===!0?be.any():ln(e,t)}var wge=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function NX(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return be.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return be.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=xge(o,t),a=ln(i,t);return t.refs.set(o,a),t.processing.delete(o),a}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return be.null();if(o.length===0)return be.never();if(o.length===1)return be.literal(o[0]);if(o.every(a=>typeof a=="string"))return be.enum(o);let i=o.map(a=>be.literal(a));return i.length<2?i[0]:be.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return be.literal(e.const);let r=e.type;if(Array.isArray(r)){let o=r.map(i=>{let a={...e,type:i};return NX(a,t)});return o.length===0?be.never():o.length===1?o[0]:be.union(o)}if(!r)return be.any();let n;switch(r){case"string":{let o=be.string();if(e.format){let i=e.format;i==="email"?o=o.check(be.email()):i==="uri"||i==="uri-reference"?o=o.check(be.url()):i==="uuid"||i==="guid"?o=o.check(be.uuid()):i==="date-time"?o=o.check(be.iso.datetime({offset:!0})):i==="date"?o=o.check(be.iso.date()):i==="time"?o=o.check(be.regex(wge)):i==="duration"?o=o.check(be.iso.duration()):i==="hostname"?o=o.check(be.hostname()):i==="ipv4"?o=o.check(be.ipv4()):i==="ipv6"?o=o.check(be.ipv6()):i==="mac"?o=o.check(be.mac()):i==="cidr"?o=o.check(be.cidrv4()):i==="cidr-v6"?o=o.check(be.cidrv6()):i==="base64"?o=o.check(be.base64()):i==="base64url"?o=o.check(be.base64url()):i==="e164"?o=o.check(be.e164()):i==="credit_card"?o=o.check(be.creditCard()):i==="iban"?o=o.check(be.iban()):i==="jwt"?o=o.check(be.jwt()):i==="emoji"?o=o.check(be.emoji()):i==="nanoid"?o=o.check(be.nanoid()):i==="cuid"?o=o.check(be.cuid()):i==="cuid2"?o=o.check(be.cuid2()):i==="ulid"?o=o.check(be.ulid()):i==="xid"?o=o.check(be.xid()):i==="ksuid"&&(o=o.check(be.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),n=o;break}case"number":case"integer":{let o=r==="integer"?be.number().int():be.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),n=o;break}case"boolean":{n=be.boolean();break}case"null":{n=be.null();break}case"object":{let o={},i=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?ln(e.additionalProperties,t):void 0;for(let[u,f]of Object.entries(i)){let m=ln(f,t);bo(o,u,a.has(u)?m:m.optional())}if(e.patternProperties){let u=e.patternProperties,f=Object.keys(u),m=[];for(let g of f){let b=ln(u[g],t),v=be.string().regex(new RegExp(g));m.push(be.looseRecord(v,b))}let p=[];if(Object.keys(o).length>0&&p.push(be.object(o).passthrough()),p.push(...m),p.length===0)n=be.object({}).passthrough();else if(p.length===1)n=p[0];else{let g=be.intersection(p[0],p[1]);for(let b=2;b<p.length;b++)g=be.intersection(g,p[b]);n=g}if(e.additionalProperties===!1){let g=Object.keys(o),b=f.map(x=>new RegExp(x)),v=n;n=n.check(x=>{if(!Pi(x.value))return;let _=[];for(let I of Object.keys(x.value))g.includes(I)||b.some(S=>S.test(I))||_.push(I);_.length&&x.issues.push({code:"unrecognized_keys",keys:_,input:x.value,inst:v})})}}else{let u=be.object(o);e.additionalProperties===!1?n=u.strict():s?n=u.catchall(s):n=u.passthrough()}let l=e.propertyNames!==void 0&&e.propertyNames!==!0,c=typeof e.minProperties=="number"?e.minProperties:void 0,d=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(l||c!==void 0||d!==void 0){let u;if(l){let f=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;u=ln(f,t)}n=bge(n,{keySchema:u,minProperties:c,maxProperties:d})}break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let a=typeof e.minItems=="number"?e.minItems:0,s=o.map(u=>ln(u,t)),l=AX(s,a),c=Array.isArray(i)?void 0:zX(i,t),d=be.tuple(l);n=c?d.rest(c):d,typeof e.minItems=="number"&&(n=n.check(be.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(be.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=typeof e.minItems=="number"?e.minItems:0,s=i.map(u=>ln(u,t)),l=AX(s,a),c=zX(e.additionalItems,t),d=be.tuple(l);n=c?d.rest(c):d,typeof e.minItems=="number"&&(n=n.check(be.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(be.maxLength(e.maxItems)))}else if(i!==void 0){let a=ln(i,t),s=be.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),n=s}else n=be.array(be.any());(e.uniqueItems===!0||e.contains!==void 0)&&(n=Ige(n,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?ln(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${r}`)}return n}function ln(e,t){if(typeof e=="boolean")return e?be.any():be.never();let r=NX(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(c=>ln(c,t)),l=be.union(s);r=n?be.intersection(r,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>ln(c,t)),l=be.xor(s);r=n?be.intersection(r,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:be.any();else{let s=n?r:ln(e.allOf[0],t),l=n?0:1;for(let c=l;c<e.allOf.length;c++)s=be.intersection(s,ln(e.allOf[c],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=be.nullable(r)),e.readOnly===!0&&(r=be.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(o[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(o[s]=e[s]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!Wx(e.propertyNames)&&(o.propertyNames=e.propertyNames);for(let s of["minProperties","maxProperties"])e[s]!==void 0&&(o[s]=e[s])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!Wx(e.contains)&&(o.contains=e.contains);for(let s of["uniqueItems","minContains","maxContains"])e[s]!==void 0&&(o[s]=e[s])}for(let s of Object.keys(e))hge.has(s)||bo(o,s,e[s]);return Object.keys(o).length>0&&t.registry.add(r,o),e.description&&(r=r.describe(e.description)),r}function FX(e,t){if(typeof e=="boolean")return e?be.any():be.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=gge(r,t?.defaultTarget),o=r.$defs||r.definitions||{},i={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??yo};return ln(r,i)}var LX=Symbol("z.visit/resolving");function Zx(e,t){let r=typeof t=="function"?t:(a,s)=>{let l=t[a._zod.def.type];return l?l(a,s):a},n=new Map;function o(a){let s=n.get(a);if(s===LX)return new yx({type:"lazy",getter:()=>n.get(a)});if(s!==void 0)return s;n.set(a,LX);let l=i(a),c=r(l,l!==a);return n.set(a,c),c}function i(a){let s=a._zod.def,l=s.type;switch(l){case"object":{let c=s.shape,d=Object.keys(c),u=!1,f={};for(let p of d){let g=o(c[p]);g!==c[p]&&(u=!0),f[p]=g}let m=s.catchall;return s.catchall&&(m=o(s.catchall),m!==s.catchall&&(u=!0)),u?It(a,{...s,shape:f,catchall:m}):a}case"array":{let c=o(s.element);return c===s.element?a:It(a,{...s,element:c})}case"tuple":{let c=s.items,d=!1,u=[];for(let m of c){let p=o(m);p!==m&&(d=!0),u.push(p)}let f=s.rest;return s.rest&&(f=o(s.rest),f!==s.rest&&(d=!0)),d?It(a,{...s,items:u,rest:f}):a}case"record":case"map":{let c=o(s.keyType),d=o(s.valueType);return c===s.keyType&&d===s.valueType?a:It(a,{...s,keyType:c,valueType:d})}case"set":{let c=o(s.valueType);return c===s.valueType?a:It(a,{...s,valueType:c})}case"union":{let c=s.options,d=!1,u=[];for(let f of c){let m=o(f);m!==f&&(d=!0),u.push(m)}return d?It(a,{...s,options:u}):a}case"intersection":{let c=o(s.left),d=o(s.right);return c===s.left&&d===s.right?a:It(a,{...s,left:c,right:d})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let c=o(s.innerType);return c===s.innerType?a:It(a,{...s,innerType:c})}case"pipe":{let c=o(s.in),d=o(s.out);return c===s.in&&d===s.out?a:It(a,{...s,in:c,out:d})}case"function":{let c=o(s.input),d=o(s.output);return c===s.input&&d===s.output?a:It(a,{...s,input:c,output:d})}case"lazy":{let c=s.getter,{_cachedInner:d,...u}=s;return It(a,{...u,getter:()=>o(c())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return o(e)}function MX(e){return Zx(e,{object:t=>t.partial(),union:t=>{let r=t._zod.def;return r.discriminator===void 0?t:Jp(r.options)}})}function Sge(e,t){if(!t?.length)return e;let r=e._zod.def;return It(e,fa(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function BX(e){return Sge(e.out,e.checks)}function kge(e){return e.in._zod.traits.has("$ZodTransform")?BX(e):e.in}function jX(e){return Zx(e,{pipe:t=>kge(t._zod.def),default:(t,r)=>r?ju(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function UX(e){return Zx(e,{pipe:t=>BX(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var MO={};ys(MO,{bigint:()=>Rge,boolean:()=>Dge,date:()=>Tge,number:()=>Pge,string:()=>Cge});function Cge(e){return sA(qp,e)}function Pge(e){return mA(Xp,e)}function Dge(e){return yA(Qp,e)}function Rge(e){return IA(Yp,e)}function Tge(e){return AA(Nx,e)}var VX={view:0,control:1,owner:2};function Ege(e){return e.kind==="owner"?"owner":e.role}function BO(e,t){return VX[Ege(e)]>=VX[t]}function HX(e,t){let r=e.access;if(r===void 0)return e.kind==="query"?"view":"owner";if(typeof r=="string")return r;try{return r(t)}catch{return"owner"}}var Gx=class extends Error{constructor(r,n){super(r);$t(this,"fix",n);this.name="UserError"}},WX=(e,t)=>{throw new Gx(e,t)};var $ge=h.enum(["user","cancelled","invalid","bug"]),ZX=h.strictObject({kind:$ge,message:h.string().max(2e3),fix:h.string().max(2e3).optional()}),Kx=class extends Error{constructor(t="Nothing changed."){super(t),this.name="Cancelled"}};function jO(e){return e.kind==="cancelled"?new Kx(e.message):new Gx(e.message,e.fix)}function GX(e){return e.issues.map(t=>(t.path.length?t.path.join(".")+": ":"")+t.message).join("; ")}function _e(e){return{...e,cli:e.cli,kind:"operation"}}function Ge(e){return{...e,cli:e.cli,kind:"query"}}function lt(e){return{...e,kind:"view"}}function Age(e,t){let r=e.input.safeParse(t??{});return r.success||WX("That does not work for "+e.title.toLowerCase()+": "+GX(r.error)),r.data}function KX(e,t){let r=e.inputs?.(t)??{};return Object.fromEntries(Object.entries(e.queries).map(([n,o])=>[n,Age(o,r[n])]))}var Oge=new Set(["$schema"]),ha=class e{constructor(t){$t(this,"schema");this.schema=t}get inner(){let t=this.schema;for(;;){let r=t._zod.def;if(["optional","default","nullable","prefault","readonly"].includes(r.type)&&r.innerType)t=r.innerType;else if(r.type==="pipe"&&r.in)t=r.in;else return t}}get type(){return this.inner._zod.def.type}get isSection(){return this.type==="object"&&!!this.inner.shape}get description(){return this.schema.description??this.inner.description}get min(){return this.inner.minValue??void 0}get max(){return this.inner.maxValue??void 0}get integer(){return!!this.inner.isInt}get secret(){let t=r=>r.meta?.();return t(this.schema)?.secret===!0||t(this.inner)?.secret===!0}get optional(){return["optional","default"].includes(this.schema._zod.def.type)}rangeText(){let t=(this.inner._zod.def.checks??[]).map(l=>l._zod.def),r=t.find(l=>l.check==="greater_than"),n=t.find(l=>l.check==="less_than"),o=r?.value,i=n?.value;if(o!==void 0&&i!==void 0&&r?.inclusive!==!1&&n?.inclusive!==!1)return o+" to "+i;let a=o===void 0?"":(r?.inclusive===!1?"more than ":"at least ")+o,s=i===void 0?"":(n?.inclusive===!1?"less than ":"at most ")+i;return[a,s].filter(Boolean).join(" and ")}children(){return Object.entries(this.inner.shape??{}).filter(([t])=>!Oge.has(t)).map(([t,r])=>[t,new e(r)])}child(t){let r=this.inner.shape?.[t];return r?new e(r):void 0}leaves(t=[]){return this.children().flatMap(([r,n])=>n.isSection?n.leaves([...t,r]):[{key:[...t,r],node:n}])}get element(){let t=this.inner._zod.def;return t.type==="array"&&t.element?new e(t.element):t.type==="record"&&t.valueType?new e(t.valueType):void 0}get options(){return(this.inner._zod.def.options??[]).map(t=>new e(t))}get choices(){let t=this.inner._zod.def;return t.type==="enum"?Object.values(t.entries??{}):t.type==="literal"?t.values??[]:[]}get editor(){let t=this.type;if(t==="boolean")return"boolean";if(t==="enum"||t==="literal")return"choice";if(t==="union")return this.options.every(n=>["literal","enum","boolean"].includes(n.type))?"choice":"union";if(t==="number"||t==="string")return t;let r=this.element;return t==="array"&&r?r.type==="string"?"string-list":r.type==="enum"?"choice-list":r.type==="object"?"object-list":"json":t==="record"&&r?["string","number","boolean"].includes(r.type)?"string-map":r.type==="object"?"object-map":"json":t==="object"?"object":"json"}get choiceValues(){return this.type!=="union"?this.choices:this.options.flatMap(t=>t.type==="boolean"?[!0,!1]:t.choices)}get openOption(){return this.options.find(t=>!["literal","enum","boolean"].includes(t.type))}initial(){let t=this.schema._zod.def;if(t.type==="default")return structuredClone(t.defaultValue);switch(this.type){case"boolean":return!1;case"number":return this.min??0;case"string":return"";case"enum":case"literal":return this.choices[0];case"union":return this.options[0]?.initial();case"array":return[];case"record":return{};case"object":return Object.fromEntries(this.children().filter(([,r])=>!["optional","default"].includes(r.schema._zod.def.type)).map(([r,n])=>[r,n.initial()]));default:return null}}check(t){let r=this.schema.safeParse(t);return r.success?!0:r.error.issues.map(n=>(n.path.length?n.path.join(".")+": ":"")+n.message).join("; ")}};function _o(e,t=Date.now()){let r=Math.max(0,Math.round((t-new Date(e).getTime())/1e3));return Number.isNaN(r)?"":r<45?"just now":r<3600?Math.round(r/60)+" min ago":r<86400?Math.round(r/3600)+" h ago":Math.round(r/86400)+" d ago"}function Br(e,t,r=t+"s"){return e+" "+(e===1?t:r)}var zge=new Set(["mb","gb","cpu","gpu","jdk","sdk","id","url","ui","npm","msvc","uv","api","ssh","vm","io"]),Nge={harness:"agent",harnesses:"agents"};function Wu(e){let t=["B","KB","MB","GB","TB"],r=e<=0?0:Math.min(t.length-1,Math.floor(Math.log(e)/Math.log(1024))),n=e/1024**r;return(r===0?String(e):n.toFixed(n<10?1:0))+" "+t[r]}function qX(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").split(" ").filter(Boolean).map(r=>Nge[r.toLowerCase()]??r).map((r,n)=>{let o=r.toLowerCase();return zge.has(o)?r.toUpperCase():n===0?r[0].toUpperCase()+r.slice(1):o}).join(" ")}var Fge=["boolean","enum","number","text","secret","path","list","map","object","json"],Lge=h.union([h.string(),h.number(),h.boolean()]),Zc=h.lazy(()=>h.strictObject({name:h.string(),key:h.array(h.string()),kind:h.enum(Fge),label:h.string(),help:h.string().optional(),optional:h.boolean(),default:h.unknown().optional(),choices:h.array(h.strictObject({value:Lge,label:h.string()})).optional(),open:Zc.optional(),min:h.number().optional(),max:h.number().optional(),integer:h.boolean().optional(),range:h.string().optional(),pathKind:h.enum(["dir","file"]).optional(),literals:h.array(h.string()).optional(),element:Zc.optional(),fields:h.array(Zc).optional()})),XX={"storage.root":"dir","projects.roots":"dir","projects.exclude":"dir","projects.declinedRoots":"dir","claudeProfile.hostDir":"dir","claudeProfile.globalStateFile":"file",scripts:"file"};function Mge(e){let t=e.join("."),r=e[e.length-1]??"";if(XX[t])return XX[t];if(e[0]==="mappings"&&r==="host"||r==="hostDir"||/(Dir|Folder)$/.test(r))return"dir";if(/File$/.test(r))return"file"}function Bge(e){return/"auto"/.test(e.description??"")?["auto"]:[]}function jge(e){return e===!0?"On":e===!1?"Off":String(e)}function QX(e){return e!==void 0&&Number.isFinite(e)&&Math.abs(e)<Number.MAX_SAFE_INTEGER}function Uge(e){let t=e.schema._zod.def;return t.type==="default"?t.defaultValue:void 0}function ns(e,t=[],r){let n=e instanceof ha?e:new ha(e),o=t[t.length-1]??"",i={name:o,key:[...t],label:r??(o?qX(o):""),...n.description?{help:n.description}:{},optional:n.optional},a=Uge(n),s=l=>a===void 0?{}:{default:l?a===""?"":"***":a};switch(n.editor){case"boolean":return{...i,kind:"boolean",...s(!1)};case"choice":case"union":{let l=n.openOption;return{...i,kind:"enum",...s(!1),choices:n.choiceValues.filter(c=>["string","number","boolean"].includes(typeof c)).map(c=>({value:c,label:jge(c)})),...l?{open:ns(l,t,i.label)}:{}}}case"number":{let l=n.rangeText();return{...i,kind:"number",...s(!1),...QX(n.min)?{min:n.min}:{},...QX(n.max)?{max:n.max}:{},...n.integer?{integer:!0}:{},...l?{range:l}:{}}}case"string":{if(n.secret)return{...i,kind:"secret",...s(!0)};let l=Mge(t);return l?{...i,kind:"path",...s(!1),pathKind:l,literals:Bge(n)}:{...i,kind:"text",...s(!1)}}case"string-list":case"choice-list":case"object-list":return{...i,kind:"list",...s(!1),element:ns(n.element,t,"Entry")};case"string-map":case"object-map":return{...i,kind:"map",...s(n.element?.secret??!1),element:Vge(n,t)};case"object":return{...i,kind:"object",...s(!1),fields:M1(n,t)};default:return{...i,kind:"json",...s(!1)}}}function Vge(e,t){return ns(e.element,[...t,"*"],"Value")}function M1(e,t=[]){return(e instanceof ha?e:new ha(e)).children().map(([n,o])=>ns(o,[...t,n]))}function Hge(e){if(typeof e!="object"||e===null||Array.isArray(e))return String(e);let t=e;return typeof t.host=="string"&&typeof t.guest=="string"?t.host+" \u2192 "+t.guest+(t.readOnly?" (read-only)":""):Object.values(t).filter(n=>typeof n=="string"&&n!=="").slice(0,2).join(" \xB7 ")||"{ "+Object.keys(t).join(", ")+" }"}function UO(e,t){return e.length>t?e.slice(0,Math.max(0,t-1))+"\u2026":e}function B1(e,t,r=60){if(e===void 0)return{text:"not set",tone:"muted"};if(t?.kind==="secret")return e===""?{text:"(empty)",tone:"muted"}:{text:"***"};if(e===!0)return{text:"On",tone:"ok"};if(e===!1)return{text:"Off",tone:"muted"};if(e===null)return{text:"none",tone:"muted"};if(typeof e=="string")return e===""?{text:"(empty)",tone:"muted"}:{text:UO(e,r)};if(typeof e=="number")return{text:String(e)};if(Array.isArray(e))return e.length===0?{text:"none",tone:"muted"}:{text:UO(e.length+" \xB7 "+e.map(o=>typeof o=="object"?Hge(o):String(o)).join(", "),r)};let n=Object.keys(e);return n.length?{text:UO(n.length+" \xB7 "+n.join(", "),r)}:{text:"none",tone:"muted"}}function j1(e,t){if(t===void 0||t==="")return e.optional||e.kind==="text"?void 0:"Required.";if(e.kind==="number"){let r=typeof t=="number"?t:Number(t);if(!Number.isFinite(r))return"Enter a number.";if(e.integer&&!Number.isInteger(r))return"Enter a whole number.";if(e.min!==void 0&&r<e.min||e.max!==void 0&&r>e.max)return e.range?"Use "+e.range+".":"Out of range."}if(e.kind==="enum"&&!e.open&&!e.choices?.some(r=>r.value===t))return"Choose one."}var th=h.array(h.string()).optional(),YX=h.strictObject({value:h.string(),label:h.string(),description:h.string().optional()}),U1=h.strictObject({message:h.string(),fix:h.string()}),Wge=h.strictObject({kind:h.literal("confirm"),title:h.string(),lines:th,yes:h.string().optional(),danger:h.boolean().optional(),typed:h.string().optional(),implied:h.boolean().optional(),skipWithYes:h.boolean().optional(),noTerminal:h.strictObject({message:h.string(),fix:h.string()}).optional()}),Zge=h.strictObject({kind:h.literal("choose"),title:h.string(),lines:th,choices:h.array(YX).min(1),initial:h.string().optional(),noTerminal:U1.optional()}),Gge=h.strictObject({kind:h.literal("text"),title:h.string(),lines:th,initial:h.string().optional(),allowEmpty:h.boolean().optional(),problem:h.string().optional(),noTerminal:U1.optional()}),Kge=h.strictObject({kind:h.literal("secret"),title:h.string(),lines:th,problem:h.string().optional()}),qge=h.strictObject({kind:h.literal("path"),title:h.string(),lines:th,pathKind:h.enum(["dir","file"]),initial:h.string().optional(),literals:h.array(h.string()).optional(),problem:h.string().optional(),noTerminal:U1.optional()}),Xge=h.strictObject({kind:h.literal("checklist"),title:h.string(),lines:th,choices:h.array(YX),checked:h.array(h.string()).optional(),noTerminal:U1.optional()}),JX=h.discriminatedUnion("kind",[Wge,Zge,Gge,Kge,qge,Xge]),ipt={confirm:h.boolean(),choose:h.string().max(1e3).optional(),text:h.string().max(1e4).optional(),secret:h.string().max(1e4).optional(),path:h.string().max(2e3).optional(),checklist:h.array(h.string().max(1e3)).max(1e3).optional()};async function VO(e,t,r){for(let n=t;;){let o=await e(n);if(o===void 0||!r)return o;let i=r(o);if(i===!0)return o;n={...n,problem:i}}}function Qge(e,t){return{progress:r=>t.progress(r),log:(r,n)=>t.log(r,n),confirm:r=>e({...r,kind:"confirm"}),choose:r=>e({...r,kind:"choose"}),text:({validate:r,...n})=>VO(e,{...n,kind:"text"},r),secret:({validate:r,...n})=>VO(e,{...n,kind:"secret"},r),path:({validate:r,...n})=>VO(e,{...n,kind:"path"},r),checklist:r=>e({...r,kind:"checklist"})}}var apt=Qge(e=>Promise.reject(new Error("A query asked a question: "+e.title)),{progress:()=>{},log:()=>{}});var is=h.string().regex(/^[A-Za-z0-9_-]{1,64}$/),eQ=h.string().regex(/^[a-z][A-Za-z0-9]*(\.[a-z][A-Za-z0-9]*)+$/).max(80),Yge=h.enum(["ok","warn","danger","muted","accent"]),Jge=h.strictObject({t:h.literal("call"),id:is,op:eQ,input:h.unknown()}),eve=h.strictObject({t:h.literal("answer"),id:is,value:h.unknown()}),tve=h.strictObject({t:h.literal("subscribe"),id:is,query:eQ,input:h.unknown()}),rve=h.strictObject({t:h.literal("unsubscribe"),id:is}),upt=h.discriminatedUnion("t",[Jge,eve,tve,rve]),tQ=h.discriminatedUnion("t",[h.strictObject({t:h.literal("progress"),id:is,text:h.string()}),h.strictObject({t:h.literal("log"),id:is,text:h.string(),tone:Yge.optional()}),h.strictObject({t:h.literal("ask"),id:is,question:JX}),h.strictObject({t:h.literal("result"),id:is,output:h.unknown()}),h.strictObject({t:h.literal("error"),id:is,error:ZX}),h.strictObject({t:h.literal("data"),id:is,output:h.unknown()})]);function le(e,t,r={}){return{kind:"operation",op:e.id,input:t,label:e.title,...e.danger?{danger:!0}:{},...r}}function An(e,t,r={}){return{kind:"link",target:e,label:t,...r}}function rQ(e){return e.sections.some(t=>(t.facts?.length??0)>0||(t.items?.length??0)>0||(t.text?.length??0)>0)}var oQ=h.string().regex(/^[A-Za-z0-9_.-]{1,64}$/),ove=h.object({name:h.string().describe("The agent"),ready:h.boolean().describe("Installed in the sandbox already (starts without an install)"),isDefault:h.boolean().describe("The agent that starts by default"),removable:h.boolean().describe("You added it (built-in agents cannot be removed)")}),nve=h.object({folder:h.string().describe("The folder a start works on (the current folder)"),defaultAgent:h.string().describe("The default agent"),agents:h.array(ove).describe("Every agent in your settings, built in or added")}),HO=Ge({id:"agents.list",title:"Agents",summary:"the agents you can start, and which one is the default",input:h.object({}),output:nve,surfaces:{except:{cli:"sandbox config list shows the agents (harnesses) and the default (defaultHarness)"}}}),WO=_e({id:"agents.start",access:"control",title:"Start an agent",summary:"start an agent in a project of the running sandbox",input:h.object({agent:oQ.describe("The agent to start"),project:oQ.optional().describe("The project of the running sandbox (asked when there are several)")}),output:h.object({session:h.string().describe("The new session"),message:h.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox <agent> and sandbox launch start agents on the command line (they boot the sandbox and can attach the terminal)",menu:"the menu starts agents with launch, which can boot the sandbox and attach this terminal"}}}),V1=_e({id:"agents.add",title:"Add an agent\u2026",summary:"add an agent by its npm or Python package, or a program on this PC",input:h.object({}),output:h.object({name:h.string().describe("The new agent"),message:h.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox config set harnesses adds agents on the command line"}}}),H1=_e({id:"agents.makeDefault",title:"Make default",summary:"make an agent the one that starts by default",input:h.object({name:h.string().describe("The agent")}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox config set defaultHarness <name> does this on the command line"}}}),W1=_e({id:"agents.remove",title:"Remove",summary:"take an agent you added out of your settings",input:h.object({name:h.string().describe("The agent")}),output:h.object({message:h.string().describe("What happened")}),danger:!0,text:e=>e.message,surfaces:{except:{cli:"sandbox config set harnesses removes agents on the command line"}}});function ive(e){return e.split(/[\\/]/).pop()??e}function ave(e,t){let r=e.removable?e.isDefault?" You added it. Make another agent the default to remove it.":" You added it.":"";return"Starts "+e.name+" in "+t+"."+(e.isDefault?" It is the default agent.":"")+r}function sve(e){return e.removable&&!e.isDefault?"x removes it.":void 0}function lve(e,t){return{id:"agent:"+e.name,label:e.name,hint:e.ready?"ready":"installs on first start",tone:e.ready?"ok":"muted",icon:e.name,badges:e.isDefault?[{text:"default",tone:"accent"}]:[],description:ave(e,t),keys:sve(e),primary:An({kind:"start-agent",agent:e.name},"Start "+e.name,{verb:"start"}),actions:[...e.isDefault?[]:[le(H1,{name:e.name},{key:"d",verb:"make default",importance:1})],...e.removable&&!e.isDefault?[le(W1,{name:e.name},{key:"x",verb:"remove",importance:1})]:[]]}}function cve(e){let t=ive(e.folder),r=[...e.agents].sort((n,o)=>Number(o.isDefault)-Number(n.isDefault));return{title:"Agents",sections:[{id:"start",title:"Start in "+t,cards:!0,items:[...r.map(n=>lve(n,t)),{id:"add",label:"Add an agent\u2026",description:"Add another agent by its npm or Python package, or a program on this PC. It is saved in your settings and appears in this list.",primary:le(V1,{},{verb:"add"})}]}]}}var nQ=lt({id:"agents",title:"Agents",summary:"The agents you can start: start one, add one, choose the default.",queries:{agents:HO},operations:[WO,V1,H1,W1],build:({agents:e})=>cve(e)});var rh=h.string().default("claude").describe("whose login: an agent that keeps one (default: claude)"),Xx=h.string().optional().describe("account name"),dve=h.object({name:h.string().describe("The saved login"),email:h.string().nullable().describe("Its email, when the agent says"),isDefault:h.boolean().describe("New launches start with it"),isActive:h.boolean().describe("The sandbox uses it now"),savedAt:h.string().describe("When it was saved (ISO time)")}),uve=h.object({name:h.string().describe("The agent"),kept:h.boolean().describe("Its login can be saved and switched"),canSavePc:h.boolean().describe("This PC's login can be saved"),accounts:h.array(dve).describe("Its saved logins (empty when not kept)")}),fve=h.object({agent:h.string().describe("The agent asked for (the command line table shows only it)"),agents:h.array(uve).describe("Every agent, Claude first")}),ZO=h.object({message:h.string().describe("What happened")});function mve(e){let t=e.agents.find(i=>i.name===e.agent)?.accounts??[];if(!t.length)return e.agent==="claude"?"No saved accounts. Sign in inside the sandbox, then: sandbox account save <name> (or --from-host to save this PC's login)":"No saved "+e.agent+" accounts. Sign in inside the sandbox, then: sandbox account save <name> --agent "+e.agent;let r=[["","NAME","EMAIL","SAVED"],...t.map(i=>[(i.isActive?"*":" ")+(i.isDefault?"D":" "),i.name,i.email??"-",i.savedAt.slice(0,16).replace("T"," ")])],n=r[0].map((i,a)=>Math.max(...r.map(s=>s[a].length)));return[...r.map(i=>i.map((a,s)=>s===i.length-1?a:a.padEnd(n[s]+2)).join("")),"","* = active in the sandbox D = default for new launches"].join(`
|
|
121
121
|
`)}var GO=Ge({id:"accounts.list",title:"Accounts",summary:"Claude logins: list, save, use, set the default, remove",input:h.object({agent:rh}),output:fve,text:mve,cli:{name:"account",action:"list",json:!0,flags:{agent:{flag:"--agent",value:"name",choices:"harnesses",label:"Agent"}},shapeJson:e=>e.agents.find(t=>t.name===e.agent)?.accounts??[]}}),qx=_e({id:"accounts.save",title:"Save the sandbox's login",summary:"save the sandbox's (or this PC's) login under a name",input:h.object({agent:rh,name:Xx,fromHost:h.boolean().default(!1).describe("(save) save this PC's login instead of the sandbox's")}),output:h.object({name:h.string().describe("The saved login"),message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"account",action:"save",positional:["name"],flags:{agent:{flag:"--agent"},fromHost:{flag:"--from-host"}}}}),Z1=_e({id:"accounts.use",title:"Use this login",summary:"make the sandbox use a saved login (running sessions restart)",input:h.object({agent:rh,name:Xx,noRestart:h.boolean().default(!1).describe("(use) do not restart running sessions")}),output:h.object({lines:h.array(h.string()).describe("What happened, line by line")}),text:e=>e.lines.join(`
|
|
122
|
-
`),cli:{name:"account",action:"use",positional:["name"],flags:{agent:{flag:"--agent"},noRestart:{flag:"--no-restart"}}}}),G1=_e({id:"accounts.default",title:"Make default",summary:"the login
|
|
122
|
+
`),cli:{name:"account",action:"use",positional:["name"],flags:{agent:{flag:"--agent"},noRestart:{flag:"--no-restart"}}}}),G1=_e({id:"accounts.default",title:"Make default",summary:"the login every launch starts with; the sandbox switches to it now too",input:h.object({agent:rh,name:Xx,noRestart:h.boolean().default(!1).describe("(default) do not restart running sessions")}),output:ZO,text:e=>e.message,cli:{name:"account",action:"default",positional:["name"],flags:{agent:{flag:"--agent"},noRestart:{flag:"--no-restart"}}}}),K1=_e({id:"accounts.rename",title:"Rename\u2026",summary:"give a saved login another name (it keeps working)",input:h.object({agent:rh,name:Xx,to:h.string().optional().describe("(rename) the new name")}),output:ZO,text:e=>e.message,cli:{name:"account",action:"rename",positional:["name"],flags:{agent:{flag:"--agent"},to:{flag:"--to"}}}}),q1=_e({id:"accounts.remove",title:"Remove\u2026",summary:"delete a saved login (you would sign in again)",danger:!0,input:h.object({agent:rh,name:Xx}),output:ZO,text:e=>e.message,cli:{name:"account",action:"remove",positional:["name"],flags:{agent:{flag:"--agent"}},yes:"(remove) do not ask first"}});function pve(e){return[{id:"@save-sandbox",label:"+ Save the sandbox's login\u2026",group:"Save a login",description:"Saves the "+e.name+" login you signed in with inside the sandbox, under a name you choose.",primary:le(qx,{agent:e.name,fromHost:!1},{verb:"save",label:"Save the sandbox's login"})},...e.canSavePc?[{id:"@save-pc",label:"+ Save this PC's login\u2026",group:"Save a login",description:"Saves the "+e.name+" login of this PC, under a name you choose.",primary:le(qx,{agent:e.name,fromHost:!0},{verb:"save",label:"Save this PC's login"})}]:[]]}function hve(e,t){let r=[t.isActive?"in the sandbox":"",t.isDefault?"default":""].filter(Boolean).join(" \xB7 ");return{id:e.name+":"+t.name,label:t.name,group:"Saved logins",icon:e.name,hint:r,badges:[...t.isActive?[{text:"in the sandbox",tone:"ok"}]:[],...t.isDefault?[{text:"default",tone:"accent"}]:[]],description:"Choose it to make the sandbox use this login.",details:["Agent "+e.name,"Email "+(t.email??"-"),"Saved "+t.savedAt.slice(0,16).replace("T"," ")],primary:le(Z1,{agent:e.name,name:t.name},{verb:"use"}),actions:[le(G1,{agent:e.name,name:t.name},{key:"d",verb:"make default",importance:1}),le(K1,{agent:e.name,name:t.name},{key:"r",verb:"rename",importance:2}),le(q1,{agent:e.name,name:t.name},{key:"x",verb:"remove",importance:1})]}}function gve(e){return e.kept?{id:e.name,title:e.name,summary:e.accounts.length?Br(e.accounts.length,"saved login"):"no saved login yet",cards:!0,items:[...pve(e),...e.accounts.map(t=>hve(e,t))]}:{id:e.name,title:e.name,summary:"not kept between sandboxes",items:[{id:"info:"+e.name,label:"This agent's login is not kept between sandboxes",tone:"muted",description:"Sign in again in each new sandbox, or use an API key in the agent\u2019s environment."}]}}function vve(e){return{title:"Accounts",sections:e.agents.map(gve)}}var iQ=lt({id:"accounts",title:"Accounts",summary:"Logins saved on this PC, per agent. Use puts one into the sandbox; new launches start with the default.",queries:{accounts:GO},operations:[qx,Z1,G1,K1,q1],build:({accounts:e})=>vve(e)});var xve=h.object({name:h.string(),path:h.string(),kind:h.enum(["dir","file"])}),bve=h.object({path:h.string(),parent:h.string().nullable(),entries:h.array(xve),truncated:h.boolean(),places:h.array(h.object({label:h.string(),path:h.string()}))}),oh=Ge({id:"files.browse",access:"owner",title:"Browse folders",summary:"list what is in a folder of this PC, to pick a folder or a file",input:h.object({path:h.string().max(1024).optional().describe("The folder (none: only the places to start from)"),files:h.boolean().default(!1).describe("List files too, not only folders")}),output:bve,surfaces:{except:{cli:"a path is typed on the command line",menu:"the menu asks for a path as text and checks it"}}});var yve=h.object({bytes:h.number().describe("Bytes counted"),files:h.number().describe("Files counted"),partial:h.boolean().describe("The count stopped at its limit: there is at least this much")}),_ve=h.object({root:h.string().describe("The folder your saved data is in"),exists:h.boolean().describe("It exists"),holdsData:h.boolean().describe("Something is in it"),measured:yve.nullable().describe("Its size; null when not measured"),size:h.string().describe('Its size in words; "nothing in it yet" when empty; "not measured yet" when not counted'),defaultRoot:h.string().describe("The default folder"),defaultInUse:h.boolean().describe("The default folder is the one in use"),otherFoldersWithData:h.array(h.string()).describe("Other folders that hold data")}),KO=Ge({id:"storage.show",title:"Data folder",summary:"where your saved data lives",input:h.object({measure:h.boolean().default(!0).describe("add up its size (big folders take a moment)")}),output:_ve,text:e=>["Your saved data is in: "+e.root," "+e.size,"The default folder is: "+e.defaultRoot+(e.defaultInUse?" (in use)":""),...e.otherFoldersWithData.map(t=>"Another folder with data: "+t),"","Move it with: sandbox storage move <folder> (or switch without moving: sandbox storage use <folder>)","What takes the space: sandbox data"].join(`
|
|
123
123
|
`),cli:{name:"storage",action:"show",json:!0,shapeJson:e=>({root:e.root,exists:e.exists,...e.measured??{bytes:0,files:0,partial:!1},defaultRoot:e.defaultRoot,otherFoldersWithData:e.otherFoldersWithData})}}),Ive=h.object({from:h.string().describe("The old folder"),to:h.string().describe("The new folder"),copied:h.boolean().describe("It was copied (another drive)"),files:h.number().describe("Files moved"),bytes:h.number().describe("Bytes moved"),pinned:h.string().describe("What storage.root now says"),removedOld:h.boolean().describe("The old folder is gone"),notes:h.array(h.string()).describe("Extra notes"),message:h.string().describe("What happened")}),X1=_e({id:"storage.move",title:"Move the data\u2026",summary:"move your saved data to another folder",input:h.object({folder:h.string().optional().describe("the folder to move to"),keepOld:h.boolean().default(!1).describe("copy instead of moving: the old folder stays (needs room for both)")}),output:Ive,text:e=>e.message,cli:{name:"storage",action:"move",positional:["folder"],flags:{keepOld:{flag:"--keep-old"}},json:!0,shapeJson:({message:e,...t})=>t}}),Q1=_e({id:"storage.use",title:"Use another folder\u2026",summary:"use another folder for your saved data, without moving it",input:h.object({folder:h.string().optional().describe("the folder to use")}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"use",positional:["folder"]}}),nh=_e({id:"storage.change",title:"Data folder",summary:"pick another folder for your saved data, then move it there or switch to it",input:h.object({}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"the command line has storage move <folder> and storage use <folder>"}}}),wve=h.object({setting:h.enum(["off","vhdx"]).describe("storage.contained"),maxGb:h.number().describe("storage.containedMaxGb"),available:h.boolean().describe("This PC can use it"),reasons:h.array(h.string()).describe("Why not"),fixes:h.array(h.string()).describe("What would fix it"),image:h.string().describe("The disk image file"),imageExists:h.boolean().describe("It exists"),imageBytes:h.number().nullable().describe("Its size on disk"),mountFolder:h.string().describe("Where it is mounted"),recordedMounted:h.boolean().describe("The record says it is mounted"),holders:h.number().describe("Sandboxes using it"),mountedNow:h.boolean().nullable().describe("It is mounted now (null: not checked)")}),qO=Ge({id:"storage.containedStatus",title:"Contained storage (beta)",summary:"(beta) the disk image for tools, state and logs",input:h.object({}),output:wve,text:e=>["Contained storage (beta, untested on a real PC)"," setting: storage.contained = "+e.setting+" (limit "+e.maxGb+" GB)"," this PC: "+(e.available?"can use it":"cannot use it: "+e.reasons.join(" ")+" "+e.fixes.join(" "))," image: "+e.image+(e.imageExists?" ("+Wu(e.imageBytes??0)+" on disk)":" (not made yet)")," mount folder: "+e.mountFolder,...e.mountedNow===null?[]:[" mounted now: "+(e.mountedNow?"yes":"no")+(e.recordedMounted!==e.mountedNow?" (the record says "+(e.recordedMounted?"yes":"no")+"; sandbox doctor looks into it)":"")],"","Turn it on with: sandbox storage contained on Turn it off with: sandbox storage contained off"].join(`
|
|
124
124
|
`),cli:{name:"storage",action:"contained status",json:!0,shapeJson:({fixes:e,...t})=>t}}),Y1=_e({id:"storage.containedOn",title:"Turn contained storage on\u2026",summary:"(beta) keep tools, state and logs in a disk image",input:h.object({}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"contained on"}}),J1=_e({id:"storage.containedOff",title:"Turn contained storage off\u2026",summary:"(beta) move tools, state and logs back into plain folders",danger:!0,input:h.object({}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"contained off"}});function Sve(e,t){let r={id:"folder",title:"Data folder",description:"Where your tools, logins, history and logs are kept between sandboxes.",facts:[{id:"folder",label:"Folder",value:e.root},{id:"size",label:"Size",value:e.size},{id:"default",label:"Default folder",value:e.defaultRoot+(e.defaultInUse?" (in use)":"")},...e.otherFoldersWithData.map((o,i)=>({id:"other:"+i,label:"Other folder with data",value:o}))],actions:[le(X1,{}),le(Q1,{})]},n={id:"contained",title:"Contained storage (beta)",description:"Beta, and not yet tested on a real PC: keeps the sandbox tools, state and logs in one disk image file.",facts:[{id:"setting",label:"Turned on",value:t.setting==="vhdx"?"yes":"no",tone:t.setting==="vhdx"?"ok":"muted"},{id:"pc",label:"This PC",value:t.available?"can use it":"cannot use it",tone:t.available?"ok":"warn",...t.available?{}:{description:[...t.reasons,...t.fixes].join(" ")}},{id:"image",label:"Image",value:t.imageExists?Wu(t.imageBytes??0)+" on disk":"not made yet",description:t.image},{id:"mount",label:"Mount folder",value:t.mountFolder},{id:"mounted",label:"Mounted now",value:t.mountedNow===null?"not checked":t.mountedNow?"yes":"no"}],actions:t.setting==="off"?[le(Y1,{})]:[le(J1,{})]};return{title:"Storage",sections:[r,n]}}var aQ=lt({id:"storage",title:"Storage",summary:"Where your saved data lives: move it, switch folders, (beta) a disk image.",queries:{storage:KO,contained:qO},operations:[nh,X1,Q1,Y1,J1],pickers:[oh],inputs:()=>({storage:{measure:!0}}),build:({storage:e,contained:t})=>Sve(e,t)});var ek=h.enum(["user","project"]).describe("Your own settings (all projects) or this folder's .sandbox-config.json (this project)"),XO=h.string().regex(/^[A-Za-z0-9_$-]+(\.[A-Za-z0-9_$-]+)*$/).max(200).describe("The setting, e.g. sandbox.memoryMb"),kve=h.object({id:h.string().describe("The setting, e.g. sandbox.memoryMb"),key:h.array(h.string()),label:h.string(),category:h.string(),section:h.string().optional(),field:Zc,value:h.unknown(),set:h.boolean(),yours:h.unknown(),yoursSet:h.boolean(),inProject:h.unknown().optional(),default:h.unknown().optional(),locked:h.boolean()}),Cve=h.object({scope:ek,file:h.string().describe("The file this scope edits"),exists:h.boolean(),dataFolder:h.string().optional(),exportFile:h.string().optional().describe("Where an export goes by default (full path; your own settings only)"),categories:h.array(h.object({id:h.string(),label:h.string(),description:h.string()})),rows:h.array(kve)}),QO=Ge({id:"settings.list",title:"Settings",summary:"every setting with its value, by category",input:h.object({scope:ek.default("user")}),output:Cve,cli:{name:"config",action:"list",json:!0}}),lQ=Ge({id:"settings.get",title:"Get a setting",summary:"show one setting (secrets as ***)",input:h.object({key:XO}),output:h.object({key:h.string(),value:h.unknown()}),text:e=>typeof e.value=="string"?e.value:JSON.stringify(e.value,null,2),surfaces:{except:{menu:"Settings shows every value",web:"the Settings page shows every value"}},cli:{name:"config",action:"get",positional:["key"]}}),Pve=["attach.","resume."];function cQ(e){let t=e??{},r=typeof t.key=="string"?t.key:"";return(t.scope===void 0||t.scope==="user")&&Pve.some(o=>r.startsWith(o)&&r.length>o.length)?"control":"owner"}var Qn=_e({id:"settings.set",access:cQ,title:"Change a setting",summary:"change one setting (text is read like the command line: true/on, numbers, JSON)",input:h.object({scope:ek.default("user"),key:XO,value:h.unknown().describe("The new value")}),output:h.object({key:h.string(),changed:h.boolean(),message:h.string()}),text:e=>e.message,cli:{name:"config",action:"set",positional:["key","value"]}}),tk=_e({id:"settings.reset",access:cQ,title:"Reset a setting",summary:"put one setting back to its default (in a project file: remove it)",input:h.object({scope:ek.default("user"),key:XO}),output:h.object({key:h.string(),changed:h.boolean(),message:h.string()}),text:e=>e.message,cli:{name:"config",action:"reset",positional:["key"]}}),dQ=h.string().max(2e3).regex(/\.json$/i,"The file name should end in .json."),Qx=_e({id:"settings.export",title:"Export settings\u2026",summary:"write the settings you changed to a .json file to share (no secrets, no data folder, no paths of this PC)",input:h.object({settingsFile:dQ.optional().describe("(export, import) the .json file; default sandbox-settings.json in the current folder"),withPaths:h.boolean().default(!1).describe("(export) keep folders and files of this PC in the file")}),output:h.object({file:h.string().describe("The file written (full path)"),leftOut:h.array(h.string()).describe('What was left out, one "<key> (<why>)" each'),pathsLeftOut:h.boolean().describe("A folder or file of this PC was left out (and --with-paths was not given)")}),text:e=>["Wrote "+e.file+" (only what differs from the defaults).",...e.leftOut.length?["Left out:",...e.leftOut.map(t=>" "+t)]:[],...e.pathsLeftOut?["Keep this PC's folders and files in the file with --with-paths."]:[]].join(`
|
|
125
125
|
`),cli:{name:"config",action:"export",positional:["settingsFile"],flags:{withPaths:{flag:"--with-paths"}}}}),Yx=_e({id:"settings.import",title:"Import settings\u2026",summary:"read a shared settings file, show what it would change, and apply it after one yes",input:h.object({settingsFile:dQ.optional().describe("(export, import) the .json file")}),output:h.object({changed:h.number().describe("How many settings changed"),message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"config",action:"import",positional:["settingsFile"]}});function sQ(e,t){return{...ns(new ha(e.input).child("settingsFile"),["settingsFile"]),label:t,optional:!1}}function Dve(e,t){let r=n=>B1(n,e.field,40).text;return["Setting "+e.id,"All projects "+r(e.yours)+(e.yoursSet?" (your file)":" (built-in default)"),"This project "+(e.inProject===void 0?"not set":r(e.inProject)),...t==="user"?["Default "+r(e.default)]:[],...t==="project"&&e.locked?["A project can only make this stricter than your own setting."]:[]]}function Rve(e,t){let r=t==="project"&&!e.set?"all projects: "+B1(e.yours,e.field,40).text:B1(e.value,e.field).text,n=e.field.kind==="secret"?"":e.value;return{id:e.id,label:e.label,hint:r,...e.set?{tone:t==="project"?"accent":"ok",badges:[{text:"changed",tone:"accent"}]}:{},description:e.field.help,group:e.section,details:Dve(e,t),keywords:e.id,code:e.id,cells:{setting:e.id,value:r},primary:le(Qn,{scope:t,key:e.id},{label:"Change",verb:"edit",inline:!0,fields:[{...e.field,name:"value",label:e.label}],initial:{value:n}}),actions:e.set?[le(tk,{scope:t,key:e.id},{label:t==="project"?"Remove":"Reset to default",verb:"reset",key:"r"})]:[]}}function Tve(e){return{id:"@data-folder",label:"Data folder",hint:e,cells:{setting:"storage.root",value:e},description:"Where your tools, logins, history and logs are kept between sandboxes. Move it with sandbox storage move <folder>.",primary:le(nh,{},{label:"Data folder",verb:"change"})}}function Eve(e){let t=e.categories.map(r=>({id:r.id,title:r.label,description:r.description,columns:[{key:"setting",label:"SETTING"},{key:"value",label:"VALUE"}],columnsOn:"cli",items:[...e.rows.filter(n=>n.category===r.id).map(n=>Rve(n,e.scope)),...r.id==="general"&&e.dataFolder?[Tve(e.dataFolder)]:[]]}));return{title:"Settings",categories:!0,notice:{text:"Editing "+e.file+(e.exists?"":" (created when you save)")+(e.scope==="project"?": only what a project may set; needs your approval at the next launch":""),tone:e.scope==="project"?"accent":"muted"},sections:t,actions:e.scope==="user"?[le(Qx,{},{verb:"export",fields:[sQ(Qx,"Where to write the settings file")],initial:{settingsFile:e.exportFile},description:"Write the settings you changed to a .json file you can share with a team. Secrets, the data folder and folders or files of this PC are left out."}),le(Yx,{},{verb:"import",fields:[sQ(Yx,"Which settings file")],description:"Read a settings file someone shared, see what it would change, and apply it once you say yes. Secrets, the data folder and paths in it are never taken."})]:[]}}var uQ=lt({id:"settings",title:"Settings",summary:"Every setting, for all projects or just this project, with its value, default and description.",queries:{settings:QO},operations:[Qn,tk,Qx,Yx,nh],pickers:[oh],tabs:{param:"scope",choices:[{value:"user",label:"All projects"},{value:"project",label:"This project"}]},inputs:e=>({settings:{scope:e.scope}}),build:({settings:e})=>Eve(e)});var rk=h.enum(["user","project"]).describe("Your own settings (all projects) or this folder's .sandbox-config.json (this project)"),$ve=[{id:"agents",label:"Agent add-ons",description:"Plug-ins for the agents: rtk and Headroom save tokens, claude-mem gives Claude a memory, ccusage reports token use, Playwright, Context7 and REA add MCP servers. Only your own settings turn them on (except REA).",members:["agents"]},{id:"editors",label:"Editors & docs",description:"Code and text editors (VS Code is on by default), plus diagrams and document conversion.",members:["editors","diagrams"]},{id:"clients",label:"DB & API clients",description:"GUIs for the sandbox databases, tools to send HTTP, REST and GraphQL requests, and to inspect traffic.",members:["databases","api","network"]},{id:"tools",label:"Git & utilities",description:"Git GUIs and terminal UIs, archives, file search and comparing, process tools, and decompilers.",members:["git","utilities","reversing"]},{id:"cli",label:"Command-line & cloud",description:"Small developer tools (JSON, search, builds, media ...) and tools for clouds and Kubernetes.",members:["cli","cloud"]},{id:"play",label:"Browsers & games",description:"Browsers for testing web apps, and game engines and editors (they draw with OpenGL on the CPU).",members:["browsers","gamedev"]}];var Ave=h.object({id:h.string().describe("The app"),name:h.string().describe("Its name"),about:h.string().describe("What it is for"),group:h.string().describe("The group it is listed under (APP_GROUPS id)"),size:h.string().describe("Its download size"),cli:h.boolean().describe("A command-line tool (on PATH), not a desktop app"),mesa:h.boolean().describe("Needs OpenGL on the CPU (Mesa)"),fullGitOnly:h.boolean().describe("Only with full git access"),plugsInto:h.string().optional().describe("Which agents an add-on plugs into, and how"),service:h.boolean().optional().describe("Started by the sandbox or the agent (a proxy, an MCP server)"),setting:h.string().optional().describe("The setting it stands for (VS Code, Windows Terminal)"),settingField:Zc.optional(),settingValue:h.unknown().optional(),installed:h.boolean().describe("Downloaded already into the data folder"),on:h.boolean().describe("Installed in every sandbox of this scope")}),Ove=h.object({id:h.string().describe("Its key in apps.custom"),name:h.string().describe("Its name"),from:h.string().describe('"From the latest <repo> release." or "From <url>"'),cli:h.boolean().describe("A command-line tool")}),zve=h.object({scope:rk,file:h.string().describe("The file this scope edits"),exists:h.boolean().describe("The file exists already"),apps:h.array(Ave).describe("The catalogue entries this scope can change"),custom:h.array(Ove).describe("Your own programs (your own scope only)"),customValue:h.unknown().optional().describe("apps.custom as saved, to edit (your own scope only)"),customField:Zc.optional().describe("The Field of apps.custom (your own scope only)")}),YO=Ge({id:"apps.list",title:"Apps",summary:"the apps catalogue: what every sandbox installs",input:h.object({scope:rk.default("user")}),output:zve,surfaces:{except:{cli:"apps are settings: sandbox config set apps.install / apps.custom"}}}),ok=_e({id:"apps.toggle",title:"Install in every sandbox",summary:"turn an app of the catalogue on or off for this scope",input:h.object({scope:rk.default("user"),id:h.string().max(100).describe("The app"),on:h.boolean().describe("Install it (true) or not (false)")}),output:h.object({message:h.string().describe("What changed")}),text:e=>e.message,surfaces:{except:{cli:"apps are settings: sandbox config set apps.install / apps.custom"}}}),nk=_e({id:"apps.setCustom",title:"Your own programs",summary:"change your own programs (apps.custom)",input:h.object({scope:rk.default("user"),value:h.unknown().describe("Programs of your own: a GitHub release or a download link, and the program to start.")}),output:h.object({message:h.string().describe("What changed")}),text:e=>e.message,surfaces:{except:{cli:"apps are settings: sandbox config set apps.custom"}}}),ik=_e({id:"apps.request",access:"control",title:"Request an app\u2026",summary:"open a prefilled GitHub request for an app that is not in the list",input:h.object({}),output:h.object({url:h.string().describe("The request page")}),text:e=>"Opened the request form in your browser: "+e.url,surfaces:{except:{cli:"a request is filed on GitHub; the address is in docs"}}});function Nve(e){return[...e.size!==""?[{label:"Download",text:"~"+e.size+" once, kept in C:\\AgentData\\tools\\"+(e.setting?"":"apps\\")+e.id+(e.installed?" (downloaded already)":"")},{label:"Starts",text:e.service?"by the sandbox or the agent (no shortcut, not on PATH)":e.cli?"from a terminal (on PATH)":"from the desktop or Start > Sandbox apps"}]:[],...e.plugsInto?[{label:"Plugs in",text:e.plugsInto}]:[],...e.mesa?[{label:"Graphics",text:"OpenGL on the CPU (Mesa) is added for it"}]:[],...e.fullGitOnly?[{label:"",text:"Needs full git access (Settings > Projects & setup > Git): it pushes with its own git.",warn:!0}]:[],...e.setting?[{label:"Setting",text:e.setting}]:[]]}function Fve(e){return Nve(e).map(t=>(t.label?t.label.padEnd(10):"")+t.text)}function Lve(e){return{name:"on",key:["apps","install"],kind:"boolean",label:e.name,optional:!1}}function Mve(e,t){let r=e.setting&&e.settingField?le(Qn,{scope:"user",key:e.setting},{label:"Change",verb:"change",inline:!0,fields:[{...e.settingField,name:"value",label:e.name}],initial:{value:e.settingValue}}):le(ok,{scope:t,id:e.id},{label:e.on?"Turn off":"Turn on",verb:"tick",inline:!0,fields:[Lve(e)],initial:{on:e.on}});return{id:e.id,label:e.name,description:e.about,code:e.id,keywords:e.id,details:Fve(e),...e.on?{tone:"ok"}:{},primary:r}}function Bve(e){return{id:"custom-"+e.id,label:e.name,description:e.from,hint:e.cli?"command line":"desktop",disabled:"Your own programs are always installed; change or remove them with Your own programs."}}function jve(e){let t=$ve.map(n=>({id:n.id,title:n.label,description:n.description,items:e.apps.filter(o=>o.group===n.id).map(o=>Mve(o,e.scope))})).filter(n=>(n.items?.length??0)>0);e.scope==="user"&&t.push({id:"custom",title:"Your own programs",description:"Programs you added yourself, from a GitHub release or a download link.",items:e.custom.map(Bve)});let r=e.scope==="user";return{title:"Apps",categories:!0,notice:{text:"Editing "+e.file+(e.exists?"":" (created when you save)")+(e.scope==="project"?": only apps from the list; needs your approval at the next launch":""),tone:e.scope==="project"?"accent":"muted"},sections:t,actions:r?[...e.customField?[le(nk,{scope:"user"},{key:"c",verb:"your own programs",fields:[{...e.customField,name:"value",label:"Your own programs"}],initial:{value:e.customValue}})]:[],le(ik,{},{key:"r",verb:"request an app"})]:[]}}var fQ=lt({id:"apps",title:"Apps",summary:"Tick the apps every sandbox should have. Each downloads once and is kept.",queries:{apps:YO},operations:[ok,nk,ik,Qn],tabs:{param:"scope",choices:[{value:"user",label:"All projects"},{value:"project",label:"This project"}]},inputs:e=>({apps:{scope:e.scope}}),build:({apps:e})=>jve(e)});var Ti={desktop:"desktop window",gpu:"GPU",clipboard:"clipboard",audio:"audio",video:"camera",printers:"printers",liveFolderAdd:"add folders while running",attachedDisks:"attached disks",multipleInstances:"several at once",hvsocket:"Hyper-V sockets"},Uve=Object.keys(Ti),Vve="see docs/design/engines.md",mQ=h.enum(["windows-sandbox","hcs"]).describe("The engine"),Hve=h.object({desktop:h.boolean().describe(Ti.desktop),gpu:h.boolean().describe(Ti.gpu),clipboard:h.boolean().describe(Ti.clipboard),audio:h.boolean().describe(Ti.audio),video:h.boolean().describe(Ti.video),printers:h.boolean().describe(Ti.printers),liveFolderAdd:h.boolean().describe(Ti.liveFolderAdd),attachedDisks:h.boolean().describe(Ti.attachedDisks),multipleInstances:h.boolean().describe(Ti.multipleInstances),hvsocket:h.boolean().describe(Ti.hvsocket)}),Wve=h.object({available:h.boolean().describe("This PC can run it"),reasons:h.array(h.string()).describe("Why not, in plain words"),fixes:h.array(h.string()).describe("The command that fixes each reason (never run for you)")}).describe("Whether this PC can run it"),pQ=h.object({id:mQ,inUse:h.boolean().describe("The setting sandbox.engine names it"),capabilities:Hve.describe("What it can do"),check:Wve}),Zve=h.object({engine:mQ.describe("The engine in use (the setting sandbox.engine)"),engines:h.array(pQ).describe("Every engine")});function Gve(e){if(e.check.available){let r=[e.id+" can be used on this PC."];return e.id==="hcs"&&r.push("HCS is in alpha: starting it is not enabled yet (docs/design/engines.md)."),r.join(`
|
|
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
|
|
|
8
8
|
[assembly: AssemblyCompany("windows-development-sandbox (open source)")]
|
|
9
9
|
[assembly: AssemblyProduct("Windows Development Sandbox")]
|
|
10
10
|
[assembly: AssemblyCopyright("MIT License, windows-development-sandbox contributors")]
|
|
11
|
-
[assembly: AssemblyVersion("1.
|
|
12
|
-
[assembly: AssemblyFileVersion("1.
|
|
13
|
-
[assembly: AssemblyInformationalVersion("1.
|
|
11
|
+
[assembly: AssemblyVersion("1.13.2.0")]
|
|
12
|
+
[assembly: AssemblyFileVersion("1.13.2.0")]
|
|
13
|
+
[assembly: AssemblyInformationalVersion("1.13.2")]
|
|
14
14
|
[assembly: ComVisible(false)]
|
|
15
15
|
// computecore.dll and computestorage.dll are not KnownDLLs: load them from System32 only, never from the exe's folder.
|
|
16
16
|
[assembly: DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
|
|
@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
|
|
|
8
8
|
[assembly: AssemblyCompany("windows-development-sandbox (open source)")]
|
|
9
9
|
[assembly: AssemblyProduct("Windows Development Sandbox")]
|
|
10
10
|
[assembly: AssemblyCopyright("MIT License, windows-development-sandbox contributors")]
|
|
11
|
-
[assembly: AssemblyVersion("1.
|
|
12
|
-
[assembly: AssemblyFileVersion("1.
|
|
13
|
-
[assembly: AssemblyInformationalVersion("1.
|
|
11
|
+
[assembly: AssemblyVersion("1.13.2.0")]
|
|
12
|
+
[assembly: AssemblyFileVersion("1.13.2.0")]
|
|
13
|
+
[assembly: AssemblyInformationalVersion("1.13.2")]
|
|
14
14
|
[assembly: ComVisible(false)]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "windows-development-sandbox",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.2",
|
|
4
4
|
"description": "A disposable Windows Sandbox for development, with or without an AI agent (Claude Code, Codex, Gemini, opencode, ...): the folder you run it from is the workspace, toolchains and databases for your project install themselves, and nothing else on your PC is reachable.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|