@raycast/api 2.5.3 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/bundle/index.js +1 -1
- package/dist/commands/develop/index.js +1 -1
- package/dist/commands/publish/index.js +2 -2
- package/dist/commands/version/index.js +1 -1
- package/dist/utils/publish/publish-to-store.js +1 -1
- package/dist/utils/raycast-app-communication.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +54 -33
|
@@ -888,7 +888,7 @@ ${d.join(`
|
|
|
888
888
|
`}),d+="}",d}function njt(f){let d="{";return(f||[]).forEach((v,T)=>{switch(T===0&&(d+=`
|
|
889
889
|
`),d+=` /** ${v.placeholder} */
|
|
890
890
|
"${v.name}": `,v.type){case"text":case"password":d+="string";break;case"dropdown":d+=v.data?.map(P=>`"${P.value}"`).join(" | ")||"unknown";break;default:d+="unknown"}T<(f||[]).length-1&&(d+=","),d+=`
|
|
891
|
-
`}),d+="}",d}var TO=require("node:child_process"),_T=So(require("node:fs")),fU=So(require("node:path")),Uet=So(Bet());var jet=require("node:child_process");function Jet(f){try{return(0,jet.execFileSync)("/usr/bin/lsappinfo",["find",`bundleid=${f}`],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}async function Wet(f,d){let v=!1,T=vjt();switch(f){case"start":{hjt(),mjt(),gjt();break}case"stop":{try{_T.unlinkSync(zet("log"))}catch{}try{_T.unlinkSync(zet("pid"))}catch{}break}default:v=!0}let P;try{P=eO()}catch{return}
|
|
891
|
+
`}),d+="}",d}var TO=require("node:child_process"),_T=So(require("node:fs")),fU=So(require("node:path")),Uet=So(Bet());var jet=require("node:child_process");function Jet(f){try{return(0,jet.execFileSync)("/usr/bin/lsappinfo",["find",`bundleid=${f}`],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}async function Wet(f,d){let v=!1,T=vjt();switch(f){case"start":{hjt(),mjt(),gjt();break}case"stop":{try{_T.unlinkSync(zet("log"))}catch{}try{_T.unlinkSync(zet("pid"))}catch{}break}default:v=!0}let P;try{P=eO()}catch{return}let j=process.platform==="darwin"?Jet(T.bundleID):process.platform==="win32"&&bjt();f==="build-refresh"&&!j||(j||Rp("warn","Raycast is not running"),v?yjt(P.name,f,d,T):await TDe(P.name,f,d,T))}function zet(f){return fU.join(l8(),f==="log"?"dev.log":"cli.pid")}function mjt(){let f=l8();try{_T.mkdirSync(f,{recursive:!0})}catch(v){throw new Error(`cannot create output directory (${v.message})`)}let d=process.pid.toString();try{_T.writeFileSync(fU.join(f,"cli.pid"),d,{mode:420})}catch(v){throw new Error(`cannot write pid file (${v.message})`)}}function gjt(){let f=l8();try{_T.mkdirSync(f,{recursive:!0})}catch(d){throw new Error(`cannot create output directory (${d.message})`)}try{_T.writeFileSync(fU.join(f,"dev.log"),"")}catch(d){throw new Error(`cannot write log file (${d.message})`)}}function hjt(){let f=fU.join(l8(),"cli.pid");try{let v=_T.readFileSync(f,"utf8").trim();process.platform==="win32"?(0,TO.execSync)(`taskkill /F /PID ${v}`):(0,TO.execSync)(`kill -9 ${v}`,{shell:"/bin/sh"})}catch{}}var _U=null;function yjt(f,d,v,T){_U?(clearTimeout(_U),_U=setTimeout(()=>{TDe(f,d,v,T)},300)):(TDe(f,d,v,T),_U=setTimeout(()=>{_U=null},300))}async function TDe(f,d,v,T){let P=process.cwd(),j=`${T.scheme}://cli/${f}/${d}?cwd=${encodeURIComponent(P)}&info=${encodeURIComponent(v||"")}`;try{if(process.platform==="darwin"){(0,TO.execFileSync)("/usr/bin/open",["-g","-b",T.bundleID,j],{stdio:"ignore"});return}await(0,Uet.default)(j,{background:!0})}catch(Z){Rp("error",`cannot notify Raycast (${Z.message})`)}}function vjt(){return{bundleID:BQe(),scheme:jQe()}}function bjt(){try{return(0,TO.execSync)('tasklist /FI "IMAGENAME eq Raycast.exe" /FO CSV /NH',{encoding:"utf8"}).toLowerCase().includes("raycast.exe")}catch{return!1}}var qet=require("node:crypto"),sm=So(require("node:fs")),pU=So(require("node:path")),Vet=So(MCe()),Sjt="SKILL.md",$et=64,Get=1024;function Het(f,d,v){if(xDe(f,v),!sm.existsSync(f)){sm.rmSync(d,{recursive:!0,force:!0});return}let T=`${d}.${(0,qet.randomUUID)()}.staging`;sm.rmSync(T,{recursive:!0,force:!0});try{sm.cpSync(f,T,{recursive:!0,filter:P=>pU.basename(P)!==".DS_Store"}),sm.rmSync(d,{recursive:!0,force:!0}),sm.renameSync(T,d)}catch(P){throw sm.rmSync(T,{recursive:!0,force:!0}),P}}function xDe(f,d){let v=d??[];if(!sm.existsSync(f)){if(v.length>0)throw new Error(`build failed: AI configuration declares skills but "${f}" does not exist`);return[]}let T=Tjt(f),P=new Map;for(let j of v){if(typeof j.title!="string"||j.title.trim().length===0)throw new Error(`build failed: AI configuration skill "${j.name}" must have a non-empty string title`);if(P.has(j.name))throw new Error(`build failed: AI configuration declares skill "${j.name}" more than once`);P.set(j.name,j)}for(let j of T.keys())if(!P.has(j))throw new Error(`build failed: skill "${j}" must be declared in package.json ai.skills or an AI configuration file`);return v.map(j=>{let Z=T.get(j.name);if(Z===void 0)throw new Error(`build failed: declared skill "${j.name}" is missing from "${f}"`);return{...j,description:Z}})}function Tjt(f){if(!sm.statSync(f).isDirectory())throw new Error(`build failed: skills path "${f}" must be a directory`);let v=new Map;for(let T of sm.readdirSync(f,{withFileTypes:!0})){if(T.name===".DS_Store")continue;let P=pU.join(f,T.name);if(!T.isDirectory())throw new Error(`build failed: skills must use the "skills/<skill-name>/SKILL.md" format; found "${P}"`);v.set(T.name,xjt(P,T.name))}return v}function xjt(f,d){let v=pU.join(f,Sjt);if(!sm.existsSync(v)||!sm.statSync(v).isFile())throw new Error(`build failed: skill "${d}" must contain "${v}"`);let T=Cjt(sm.readFileSync(v,"utf8"),v),P=T.name,j=T.description;if(typeof P!="string"||!Djt(P))throw new Error(`build failed: skill "${d}" has an invalid frontmatter name; expected 1-${$et} lowercase letters, numbers, or single hyphens`);if(d!==P)throw new Error(`build failed: skill directory "${d}" must match its frontmatter name "${P}"`);if(typeof j!="string"||!kjt(j))throw new Error(`build failed: skill "${d}" has an invalid frontmatter description; expected 1-${Get} characters`);return j}function Cjt(f,d){let v=/^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n|$)/.exec(f);if(!v?.[1])throw new Error(`build failed: skill file "${d}" must start with YAML frontmatter`);let T;try{T=Vet.default.parse(v[1])}catch(P){throw new Error(`build failed: skill file "${d}" has malformed YAML frontmatter (${String(P)})`)}if(!T||typeof T!="object"||Array.isArray(T))throw new Error(`build failed: skill file "${d}" must have YAML object frontmatter`);return T}function Djt(f){return f.length>=1&&f.length<=$et&&/^[a-z0-9-]+$/.test(f)&&!f.startsWith("-")&&!f.endsWith("-")&&!f.includes("--")}function kjt(f){return f.trim().length>0&&f.length<=Get}var Ane=class f extends fre{static description="Build the extension to the output directory";static flags={environment:x8.Flags.option({char:"e",default:"dev",description:"Environment to build for",options:["dev","dist"]})(),output:x8.Flags.directory({char:"o",description:"Output path"}),"skip-types":x8.Flags.boolean({description:"Indicates whether to skip types generation "+qTe,default:!1,hidden:!0}),"print-tool-schemas":x8.Flags.boolean({description:"Indicates whether to print the schema tools "+qTe,default:!1,hidden:!0})};async run(){let{flags:d}=await this.parse(f),v=d.output||l8();await ett({environment:d.environment,outputDir:v,skipTypeDeclarations:d["skip-types"],printExtractedSchemas:d["print-tool-schemas"]},()=>{}),d.output||await Wet("build-refresh")}};async function ett(f,d){let v=eO();v.ai=DZe(v.ai);let{manifest:T,duplicates:P}=NQe(v);P.length>0&&Rp("warn",IQe(P)),xDe("skills",T.ai?.skills);let j=!1,Z=(T.commands??[]).map(Or=>{let fi=Qet(vf.join("src",Or.name),["ts","tsx","js","jsx"]);if(fi)return fi.hasTypeScript&&(j=!0),fi.filePath;throw new Error(`build failed: could not find an entry point for the command "${Or.name}"
|
|
892
892
|
Make sure the command name in the package.json corresponds to a file in the src directory`)}),ye=[],Je=T.ai?.modelProvider;if(typeof Je=="string"){let Or=Qet(vf.join("src",Je),["ts","tsx","js","jsx"]);if(!Or)throw new Error(`build failed: could not find an entry point for the model provider "${Je}"
|
|
893
893
|
Make sure ai.modelProvider in the package.json corresponds to a file in the src directory`);Or.hasTypeScript&&(j=!0),ye.push(Or.filePath)}let rt=T.tools?.map(Or=>{for(let fi of["ts","tsx"]){let Xi=vf.join("src","tools",Or.name+"."+fi);if(mp.existsSync(Xi))return(fi==="ts"||fi==="tsx")&&(j=!0),Xi}for(let fi in["ts","tsx"]){let Xi=vf.join("src",Or.name+"."+fi);if(mp.existsSync(Xi))throw new Error(`build failed: the entry point tool "${Or.name}" is not the right folder
|
|
894
894
|
Move the file "${Xi}" in the src/tools directory`)}throw new Error(`build failed: could not find an entry point for the tool "${Or.name}"
|
|
@@ -897,7 +897,7 @@ ${s.join(`
|
|
|
897
897
|
`}),s+="}",s}function L2r(a){let s="{";return(a||[]).forEach((u,m)=>{switch(m===0&&(s+=`
|
|
898
898
|
`),s+=` /** ${u.placeholder} */
|
|
899
899
|
"${u.name}": `,u.type){case"text":case"password":s+="string";break;case"dropdown":s+=u.data?.map(b=>`"${b.value}"`).join(" | ")||"unknown";break;default:s+="unknown"}m<(a||[]).length-1&&(s+=","),s+=`
|
|
900
|
-
`}),s+="}",s}var ZR=require("node:child_process"),cD=ho(require("node:fs")),sH=ho(require("node:path")),Kbt=ho(Hbt());var Ybt=require("node:child_process");function Qbt(a){try{return(0,Ybt.execFileSync)("/usr/bin/lsappinfo",["find",`bundleid=${a}`],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}async function Zbt(a,s){let u=!1,m=X2r();switch(a){case"start":{Y2r(),G2r(),H2r();break}case"stop":{try{cD.unlinkSync(Xbt("log"))}catch{}try{cD.unlinkSync(Xbt("pid"))}catch{}break}default:u=!0}let b;try{b=PP()}catch{return}
|
|
900
|
+
`}),s+="}",s}var ZR=require("node:child_process"),cD=ho(require("node:fs")),sH=ho(require("node:path")),Kbt=ho(Hbt());var Ybt=require("node:child_process");function Qbt(a){try{return(0,Ybt.execFileSync)("/usr/bin/lsappinfo",["find",`bundleid=${a}`],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}async function Zbt(a,s){let u=!1,m=X2r();switch(a){case"start":{Y2r(),G2r(),H2r();break}case"stop":{try{cD.unlinkSync(Xbt("log"))}catch{}try{cD.unlinkSync(Xbt("pid"))}catch{}break}default:u=!0}let b;try{b=PP()}catch{return}let C=process.platform==="darwin"?Qbt(m.bundleID):process.platform==="win32"&&K2r();a==="build-refresh"&&!C||(C||Bp("warn","Raycast is not running"),u?Q2r(b.name,a,s,m):await D8e(b.name,a,s,m))}function Xbt(a){return sH.join(lF(),a==="log"?"dev.log":"cli.pid")}function G2r(){let a=lF();try{cD.mkdirSync(a,{recursive:!0})}catch(u){throw new Error(`cannot create output directory (${u.message})`)}let s=process.pid.toString();try{cD.writeFileSync(sH.join(a,"cli.pid"),s,{mode:420})}catch(u){throw new Error(`cannot write pid file (${u.message})`)}}function H2r(){let a=lF();try{cD.mkdirSync(a,{recursive:!0})}catch(s){throw new Error(`cannot create output directory (${s.message})`)}try{cD.writeFileSync(sH.join(a,"dev.log"),"")}catch(s){throw new Error(`cannot write log file (${s.message})`)}}function Y2r(){let a=sH.join(lF(),"cli.pid");try{let u=cD.readFileSync(a,"utf8").trim();process.platform==="win32"?(0,ZR.execSync)(`taskkill /F /PID ${u}`):(0,ZR.execSync)(`kill -9 ${u}`,{shell:"/bin/sh"})}catch{}}var iH=null;function Q2r(a,s,u,m){iH?(clearTimeout(iH),iH=setTimeout(()=>{D8e(a,s,u,m)},300)):(D8e(a,s,u,m),iH=setTimeout(()=>{iH=null},300))}async function D8e(a,s,u,m){let b=process.cwd(),C=`${m.scheme}://cli/${a}/${s}?cwd=${encodeURIComponent(b)}&info=${encodeURIComponent(u||"")}`;try{if(process.platform==="darwin"){(0,ZR.execFileSync)("/usr/bin/open",["-g","-b",m.bundleID,C],{stdio:"ignore"});return}await(0,Kbt.default)(C,{background:!0})}catch(O){Bp("error",`cannot notify Raycast (${O.message})`)}}function X2r(){return{bundleID:Ctt(),scheme:Ett()}}function K2r(){try{return(0,ZR.execSync)('tasklist /FI "IMAGENAME eq Raycast.exe" /FO CSV /NH',{encoding:"utf8"}).toLowerCase().includes("raycast.exe")}catch{return!1}}var eSt=require("node:crypto"),ih=ho(require("node:fs")),aH=ho(require("node:path")),tSt=ho(BIe()),Z2r="SKILL.md",rSt=64,nSt=1024;function iSt(a,s,u){if(C8e(a,u),!ih.existsSync(a)){ih.rmSync(s,{recursive:!0,force:!0});return}let m=`${s}.${(0,eSt.randomUUID)()}.staging`;ih.rmSync(m,{recursive:!0,force:!0});try{ih.cpSync(a,m,{recursive:!0,filter:b=>aH.basename(b)!==".DS_Store"}),ih.rmSync(s,{recursive:!0,force:!0}),ih.renameSync(m,s)}catch(b){throw ih.rmSync(m,{recursive:!0,force:!0}),b}}function C8e(a,s){let u=s??[];if(!ih.existsSync(a)){if(u.length>0)throw new Error(`build failed: AI configuration declares skills but "${a}" does not exist`);return[]}let m=eTr(a),b=new Map;for(let C of u){if(typeof C.title!="string"||C.title.trim().length===0)throw new Error(`build failed: AI configuration skill "${C.name}" must have a non-empty string title`);if(b.has(C.name))throw new Error(`build failed: AI configuration declares skill "${C.name}" more than once`);b.set(C.name,C)}for(let C of m.keys())if(!b.has(C))throw new Error(`build failed: skill "${C}" must be declared in package.json ai.skills or an AI configuration file`);return u.map(C=>{let O=m.get(C.name);if(O===void 0)throw new Error(`build failed: declared skill "${C.name}" is missing from "${a}"`);return{...C,description:O}})}function eTr(a){if(!ih.statSync(a).isDirectory())throw new Error(`build failed: skills path "${a}" must be a directory`);let u=new Map;for(let m of ih.readdirSync(a,{withFileTypes:!0})){if(m.name===".DS_Store")continue;let b=aH.join(a,m.name);if(!m.isDirectory())throw new Error(`build failed: skills must use the "skills/<skill-name>/SKILL.md" format; found "${b}"`);u.set(m.name,tTr(b,m.name))}return u}function tTr(a,s){let u=aH.join(a,Z2r);if(!ih.existsSync(u)||!ih.statSync(u).isFile())throw new Error(`build failed: skill "${s}" must contain "${u}"`);let m=rTr(ih.readFileSync(u,"utf8"),u),b=m.name,C=m.description;if(typeof b!="string"||!nTr(b))throw new Error(`build failed: skill "${s}" has an invalid frontmatter name; expected 1-${rSt} lowercase letters, numbers, or single hyphens`);if(s!==b)throw new Error(`build failed: skill directory "${s}" must match its frontmatter name "${b}"`);if(typeof C!="string"||!iTr(C))throw new Error(`build failed: skill "${s}" has an invalid frontmatter description; expected 1-${nSt} characters`);return C}function rTr(a,s){let u=/^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n|$)/.exec(a);if(!u?.[1])throw new Error(`build failed: skill file "${s}" must start with YAML frontmatter`);let m;try{m=tSt.default.parse(u[1])}catch(b){throw new Error(`build failed: skill file "${s}" has malformed YAML frontmatter (${String(b)})`)}if(!m||typeof m!="object"||Array.isArray(m))throw new Error(`build failed: skill file "${s}" must have YAML object frontmatter`);return m}function nTr(a){return a.length>=1&&a.length<=rSt&&/^[a-z0-9-]+$/.test(a)&&!a.startsWith("-")&&!a.endsWith("-")&&!a.includes("--")}function iTr(a){return a.trim().length>0&&a.length<=nSt}var E8e=class a extends CM{static description="Build the extension to the output directory";static flags={environment:e7.Flags.option({char:"e",default:"dev",description:"Environment to build for",options:["dev","dist"]})(),output:e7.Flags.directory({char:"o",description:"Output path"}),"skip-types":e7.Flags.boolean({description:"Indicates whether to skip types generation "+Dwe,default:!1,hidden:!0}),"print-tool-schemas":e7.Flags.boolean({description:"Indicates whether to print the schema tools "+Dwe,default:!1,hidden:!0})};async run(){let{flags:s}=await this.parse(a),u=s.output||lF();await k8e({environment:s.environment,outputDir:u,skipTypeDeclarations:s["skip-types"],printExtractedSchemas:s["print-tool-schemas"]},()=>{}),s.output||await Zbt("build-refresh")}};async function k8e(a,s){let u=PP();u.ai=Rvt(u.ai);let{manifest:m,duplicates:b}=Uet(u);b.length>0&&Bp("warn",zet(b)),C8e("skills",m.ai?.skills);let C=!1,O=(m.commands??[]).map(gt=>{let br=sSt(cp.join("src",gt.name),["ts","tsx","js","jsx"]);if(br)return br.hasTypeScript&&(C=!0),br.filePath;throw new Error(`build failed: could not find an entry point for the command "${gt.name}"
|
|
901
901
|
Make sure the command name in the package.json corresponds to a file in the src directory`)}),V=[],ie=m.ai?.modelProvider;if(typeof ie=="string"){let gt=sSt(cp.join("src",ie),["ts","tsx","js","jsx"]);if(!gt)throw new Error(`build failed: could not find an entry point for the model provider "${ie}"
|
|
902
902
|
Make sure ai.modelProvider in the package.json corresponds to a file in the src directory`);gt.hasTypeScript&&(C=!0),V.push(gt.filePath)}let _e=m.tools?.map(gt=>{for(let br of["ts","tsx"]){let tn=cp.join("src","tools",gt.name+"."+br);if(ld.existsSync(tn))return(br==="ts"||br==="tsx")&&(C=!0),tn}for(let br in["ts","tsx"]){let tn=cp.join("src",gt.name+"."+br);if(ld.existsSync(tn))throw new Error(`build failed: the entry point tool "${gt.name}" is not the right folder
|
|
903
903
|
Move the file "${tn}" in the src/tools directory`)}throw new Error(`build failed: could not find an entry point for the tool "${gt.name}"
|
|
@@ -591,7 +591,7 @@ Additional information: BADCLIENT: Bad error code, ${k} not found in range ${c}.
|
|
|
591
591
|
${f}`,U8t=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),q8t=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),V8t=(_,f,h)=>{let T=h===""?"":`with ${h.trim()}() `,w=W8t.bind(null,T,f.toString());Object.defineProperty(w,"name",q8t);let{writable:L,enumerable:V,configurable:ue}=U8t;Object.defineProperty(_,"toString",{value:w,writable:L,enumerable:V,configurable:ue})};function MSe(_,f,{ignoreNonConfigurable:h=!1}={}){let{name:T}=_;for(let w of Reflect.ownKeys(f))j8t(_,f,w,h);return z8t(_,f),V8t(_,f,T),_}var xte=new WeakMap,OVe=(_,f={})=>{if(typeof _!="function")throw new TypeError("Expected a function");let h,T=0,w=_.displayName||_.name||"<anonymous>",L=function(...V){if(xte.set(L,++T),T===1)h=_.apply(this,V),_=void 0;else if(f.throw===!0)throw new Error(`Function \`${w}\` can only be called once`);return h};return MSe(L,_),xte.set(L,T),L};OVe.callCount=_=>{if(!xte.has(_))throw new Error(`The given function \`${_.name}\` is not wrapped by the \`onetime\` package`);return xte.get(_)};var LVe=OVe;var vN=[];vN.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&vN.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&vN.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Dte=_=>!!_&&typeof _=="object"&&typeof _.removeListener=="function"&&typeof _.emit=="function"&&typeof _.reallyExit=="function"&&typeof _.listeners=="function"&&typeof _.kill=="function"&&typeof _.pid=="number"&&typeof _.on=="function",RSe=Symbol.for("signal-exit emitter"),BSe=globalThis,$8t=Object.defineProperty.bind(Object),jSe=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(BSe[RSe])return BSe[RSe];$8t(BSe,RSe,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(f,h){this.listeners[f].push(h)}removeListener(f,h){let T=this.listeners[f],w=T.indexOf(h);w!==-1&&(w===0&&T.length===1?T.length=0:T.splice(w,1))}emit(f,h,T){if(this.emitted[f])return!1;this.emitted[f]=!0;let w=!1;for(let L of this.listeners[f])w=L(h,T)===!0||w;return f==="exit"&&(w=this.emit("afterExit",h,T)||w),w}},Cte=class{},G8t=_=>({onExit(f,h){return _.onExit(f,h)},load(){return _.load()},unload(){return _.unload()}}),JSe=class extends Cte{onExit(){return()=>{}}load(){}unload(){}},zSe=class extends Cte{#r=WSe.platform==="win32"?"SIGINT":"SIGHUP";#i=new jSe;#e;#n;#o;#t={};#a=!1;constructor(f){super(),this.#e=f,this.#t={};for(let h of vN)this.#t[h]=()=>{let T=this.#e.listeners(h),{count:w}=this.#i,L=f;if(typeof L.__signal_exit_emitter__=="object"&&typeof L.__signal_exit_emitter__.count=="number"&&(w+=L.__signal_exit_emitter__.count),T.length===w){this.unload();let V=this.#i.emit("exit",null,h),ue=h==="SIGHUP"?this.#r:h;V||f.kill(f.pid,ue)}};this.#o=f.reallyExit,this.#n=f.emit}onExit(f,h){if(!Dte(this.#e))return()=>{};this.#a===!1&&this.load();let T=h?.alwaysLast?"afterExit":"exit";return this.#i.on(T,f),()=>{this.#i.removeListener(T,f),this.#i.listeners.exit.length===0&&this.#i.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#a){this.#a=!0,this.#i.count+=1;for(let f of vN)try{let h=this.#t[f];h&&this.#e.on(f,h)}catch{}this.#e.emit=(f,...h)=>this.#p(f,...h),this.#e.reallyExit=f=>this.#s(f)}}unload(){this.#a&&(this.#a=!1,vN.forEach(f=>{let h=this.#t[f];if(!h)throw new Error("Listener not defined for signal: "+f);try{this.#e.removeListener(f,h)}catch{}}),this.#e.emit=this.#n,this.#e.reallyExit=this.#o,this.#i.count-=1)}#s(f){return Dte(this.#e)?(this.#e.exitCode=f||0,this.#i.emit("exit",this.#e.exitCode,null),this.#o.call(this.#e,this.#e.exitCode)):0}#p(f,...h){let T=this.#n;if(f==="exit"&&Dte(this.#e)){typeof h[0]=="number"&&(this.#e.exitCode=h[0]);let w=T.call(this.#e,f,...h);return this.#i.emit("exit",this.#e.exitCode,null),w}else return T.call(this.#e,f,...h)}},WSe=globalThis.process,{onExit:kte,load:oWt,unload:cWt}=G8t(Dte(WSe)?new zSe(WSe):new JSe);var MVe=xz.default.stderr.isTTY?xz.default.stderr:xz.default.stdout.isTTY?xz.default.stdout:void 0,H8t=MVe?LVe(()=>{kte(()=>{MVe.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},RVe=H8t;var Ete=!1,n5={};n5.show=(_=USe.default.stderr)=>{_.isTTY&&(Ete=!1,_.write("\x1B[?25h"))};n5.hide=(_=USe.default.stderr)=>{_.isTTY&&(RVe(),Ete=!0,_.write("\x1B[?25l"))};n5.toggle=(_,f)=>{_!==void 0&&(Ete=_),Ete?n5.show(f):n5.hide(f)};var qSe=n5;var Az=to(VSe(),1);var T2=to(require("node:process"),1);function $Se(){return T2.default.platform!=="win32"?T2.default.env.TERM!=="linux":!!T2.default.env.CI||!!T2.default.env.WT_SESSION||!!T2.default.env.TERMINUS_SUBLIME||T2.default.env.ConEmuTask==="{cmd::Cmder}"||T2.default.env.TERM_PROGRAM==="Terminus-Sublime"||T2.default.env.TERM_PROGRAM==="vscode"||T2.default.env.TERM==="xterm-256color"||T2.default.env.TERM==="alacritty"||T2.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Q8t={info:lT.blue("\u2139"),success:lT.green("\u2714"),warning:lT.yellow("\u26A0"),error:lT.red("\u2716")},X8t={info:lT.blue("i"),success:lT.green("\u221A"),warning:lT.yellow("\u203C"),error:lT.red("\xD7")},K8t=$Se()?Q8t:X8t,Dz=K8t;function GSe({onlyFirst:_=!1}={}){let w="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(w,_?void 0:"g")}var Z8t=GSe();function Cz(_){if(typeof _!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof _}\``);return!_.includes("\x1B")&&!_.includes("\x9B")?_:_.replace(Z8t,"")}var Ate=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],Pte=[12288,12288,65281,65376,65504,65510],HSe=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],YSe=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],kz=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var Nte=(_,f)=>{let h=0,T=Math.floor(_.length/2)-1;for(;h<=T;){let w=Math.floor((h+T)/2),L=w*2;if(f<_[L])T=w-1;else if(f>_[L+1])h=w+1;else return!0}return!1};var eIt=Ate[0],tIt=Ate.at(-1),rIt=Pte[0],nIt=Pte.at(-1),wWt=HSe[0],AWt=HSe.at(-1),PWt=YSe[0],NWt=YSe.at(-1),iIt=kz[0],sIt=kz.at(-1),zVe=19968,[aIt,oIt]=cIt(kz);function cIt(_){let f=_[0],h=_[1];for(let T=0;T<_.length;T+=2){let w=_[T],L=_[T+1];if(zVe>=w&&zVe<=L)return[w,L];L-w>h-f&&(f=w,h=L)}return[f,h]}var WVe=_=>_<eIt||_>tIt?!1:Nte(Ate,_),UVe=_=>_<rIt||_>nIt?!1:Nte(Pte,_);var qVe=_=>_>=aIt&&_<=oIt?!0:_<iIt||_>sIt?!1:Nte(kz,_);function lIt(_){if(!Number.isSafeInteger(_))throw new TypeError(`Expected a code point, got \`${typeof _}\`.`)}function VVe(_,{ambiguousAsWide:f=!1}={}){return lIt(_),UVe(_)||qVe(_)||f&&WVe(_)?2:1}var HVe=to(GVe(),1),uIt=new Intl.Segmenter,_It=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function QSe(_,f={}){if(typeof _!="string"||_.length===0)return 0;let{ambiguousIsNarrow:h=!0,countAnsiEscapeCodes:T=!1}=f;if(T||(_=Cz(_)),_.length===0)return 0;let w=0,L={ambiguousAsWide:!h};for(let{segment:V}of uIt.segment(_)){let ue=V.codePointAt(0);if(!(ue<=31||ue>=127&&ue<=159)&&!(ue>=8203&&ue<=8207||ue===65279)&&!(ue>=768&&ue<=879||ue>=6832&&ue<=6911||ue>=7616&&ue<=7679||ue>=8400&&ue<=8447||ue>=65056&&ue<=65071)&&!(ue>=55296&&ue<=57343)&&!(ue>=65024&&ue<=65039)&&!_It.test(V)){if((0,HVe.default)().test(V)){w+=2;continue}w+=VVe(ue,L)}}return w}function XSe({stream:_=process.stdout}={}){return!!(_&&_.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var KSe=to(require("node:process"),1);function Ez(){let{env:_}=KSe.default,{TERM:f,TERM_PROGRAM:h}=_;return KSe.default.platform!=="win32"?f!=="linux":!!_.WT_SESSION||!!_.TERMINUS_SUBLIME||_.ConEmuTask==="{cmd::Cmder}"||h==="Terminus-Sublime"||h==="vscode"||f==="xterm-256color"||f==="alacritty"||f==="rxvt-unicode"||f==="rxvt-unicode-256color"||_.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var uT=to(require("node:process"),1),fIt=3,ZSe=class{#r=0;start(){this.#r++,this.#r===1&&this.#i()}stop(){if(this.#r<=0)throw new Error("`stop` called more times than `start`");this.#r--,this.#r===0&&this.#e()}#i(){uT.default.platform==="win32"||!uT.default.stdin.isTTY||(uT.default.stdin.setRawMode(!0),uT.default.stdin.on("data",this.#n),uT.default.stdin.resume())}#e(){uT.default.stdin.isTTY&&(uT.default.stdin.off("data",this.#n),uT.default.stdin.pause(),uT.default.stdin.setRawMode(!1))}#n(f){f[0]===fIt&&uT.default.emit("SIGINT")}},pIt=new ZSe,eTe=pIt;var dIt=to(VSe(),1),tTe=class{#r=0;#i=!1;#e=0;#n=-1;#o=0;#t;#a;#s;#p;#m;#u;#_;#f;#g;#c;#l;color;constructor(f){typeof f=="string"&&(f={text:f}),this.#t={color:"cyan",stream:wz.default.stderr,discardStdin:!0,hideCursor:!0,...f},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#m=this.#t.interval,this.#s=this.#t.stream,this.#u=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:XSe({stream:this.#s}),this.#_=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,wz.default.env.NODE_ENV==="test"&&(this._stream=this.#s,this._isEnabled=this.#u,Object.defineProperty(this,"_linesToClear",{get(){return this.#r},set(h){this.#r=h}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#n}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#f}set indent(f=0){if(!(f>=0&&Number.isInteger(f)))throw new Error("The `indent` option must be an integer from 0 and up");this.#f=f,this.#d()}get interval(){return this.#m??this.#a.interval??100}get spinner(){return this.#a}set spinner(f){if(this.#n=-1,this.#m=void 0,typeof f=="object"){if(f.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#a=f}else if(!Ez())this.#a=Az.default.line;else if(f===void 0)this.#a=Az.default.dots;else if(f!=="default"&&Az.default[f])this.#a=Az.default[f];else throw new Error(`There is no built-in spinner named '${f}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(f=""){this.#g=f,this.#d()}get prefixText(){return this.#c}set prefixText(f=""){this.#c=f,this.#d()}get suffixText(){return this.#l}set suffixText(f=""){this.#l=f,this.#d()}get isSpinning(){return this.#p!==void 0}#h(f=this.#c,h=" "){return typeof f=="string"&&f!==""?f+h:typeof f=="function"?f()+h:""}#y(f=this.#l,h=" "){return typeof f=="string"&&f!==""?h+f:typeof f=="function"?h+f():""}#d(){let f=this.#s.columns??80,h=this.#h(this.#c,"-"),T=this.#y(this.#l,"-"),w=" ".repeat(this.#f)+h+"--"+this.#g+"--"+T;this.#e=0;for(let L of Cz(w).split(`
|
|
592
592
|
`))this.#e+=Math.max(1,Math.ceil(QSe(L,{countAnsiEscapeCodes:!0})/f))}get isEnabled(){return this.#u&&!this.#_}set isEnabled(f){if(typeof f!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#u=f}get isSilent(){return this.#_}set isSilent(f){if(typeof f!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#_=f}frame(){let f=Date.now();(this.#n===-1||f-this.#o>=this.interval)&&(this.#n=++this.#n%this.#a.frames.length,this.#o=f);let{frames:h}=this.#a,T=h[this.#n];this.color&&(T=lT[this.color](T));let w=typeof this.#c=="string"&&this.#c!==""?this.#c+" ":"",L=typeof this.text=="string"?" "+this.text:"",V=typeof this.#l=="string"&&this.#l!==""?" "+this.#l:"";return w+T+L+V}clear(){if(!this.#u||!this.#s.isTTY)return this;this.#s.cursorTo(0);for(let f=0;f<this.#r;f++)f>0&&this.#s.moveCursor(0,-1),this.#s.clearLine(1);return(this.#f||this.lastIndent!==this.#f)&&this.#s.cursorTo(this.#f),this.lastIndent=this.#f,this.#r=0,this}render(){return this.#_?this:(this.clear(),this.#s.write(this.frame()),this.#r=this.#e,this)}start(f){return f&&(this.text=f),this.#_?this:this.#u?this.isSpinning?this:(this.#t.hideCursor&&qSe.hide(this.#s),this.#t.discardStdin&&wz.default.stdin.isTTY&&(this.#i=!0,eTe.start()),this.render(),this.#p=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#s.write(`- ${this.text}
|
|
593
593
|
`),this)}stop(){return this.#u?(clearInterval(this.#p),this.#p=void 0,this.#n=0,this.clear(),this.#t.hideCursor&&qSe.show(this.#s),this.#t.discardStdin&&wz.default.stdin.isTTY&&this.#i&&(eTe.stop(),this.#i=!1),this):this}succeed(f){return this.stopAndPersist({symbol:Dz.success,text:f})}fail(f){return this.stopAndPersist({symbol:Dz.error,text:f})}warn(f){return this.stopAndPersist({symbol:Dz.warning,text:f})}info(f){return this.stopAndPersist({symbol:Dz.info,text:f})}stopAndPersist(f={}){if(this.#_)return this;let h=f.prefixText??this.#c,T=this.#h(h," "),w=f.symbol??" ",L=f.text??this.text,ue=typeof L=="string"?(w?" ":"")+L:"",ke=f.suffixText??this.#l,He=this.#y(ke," "),ut=T+w+ue+He+`
|
|
594
|
-
`;return this.stop(),this.#s.write(ut),this}};function rTe(_){return new tTe(_)}var Zf=to(hte()),fE={wait:`\u{1F550}${(0,Zf.blue)("wait")} - `,info:`${process.env.GITHUB_ACTIONS==="true"?"\u2139\uFE0F":"\u2139\uFE0F "}${(0,Zf.cyan)("info")} - `,success:`\u2705${(0,Zf.green)("ready")} - `,warn:`${process.env.GITHUB_ACTIONS==="true"?"\u26A0\uFE0F":"\u26A0\uFE0F "}${(0,Zf.yellow)("warn")} - `,error:`\u{1F4A5}${(0,Zf.red)("error")} - `,event:`\u26A1\uFE0F${(0,Zf.magenta)("event")} - `,paymentPrompt:`\u{1F4B0}${(0,Zf.yellowBright)("plan")} - `},YVe=!0,bN=(0,Zf.blue)((0,Zf.dim)("internal only"));function C_(_,f,h){console.log(fE[_]+f),typeof h?.exit<"u"&&process.exit(h.exit)}async function Ite(_,f,h){if(!YVe){C_("wait",_);try{let w=await f();w&&console.log(w),C_("success",_);return}catch(w){return C_("error",_),h?.printError!==!1&&console.log((0,Zf.red)(w.message)),w}}let T=rTe({spinner:"simpleDots",prefixText:fE.wait+_}).start();try{let w=await f();T.stop(),C_("success",_),w&&console.log(w)}catch(w){return T.stop(),C_("error",_),h?.printError!==!1&&console.error(w.message),w}}function QVe(_,f){_||(fE.wait=`${(0,Zf.blue)("wait")} - `,fE.info=`${(0,Zf.cyan)("info")} - `,fE.success=`${(0,Zf.green)("ready")} - `,fE.warn=`${(0,Zf.yellow)("warn")} - `,fE.error=`${(0,Zf.red)("error")} - `,fE.event=`${(0,Zf.magenta)("event")} - `,fE.paymentPrompt=`${(0,Zf.yellowBright)("plan")} - `),f&&(YVe=!1)}var i5=class extends lA.Command{static baseFlags={"exit-on-error":lA.Flags.boolean({default:!0,helpGroup:"GLOBAL",aliases:["exitOnError"],deprecateAliases:!0,summary:"Always exit with non-zero code on error",allowNo:!0}),emoji:lA.Flags.boolean({default:!1,helpGroup:"GLOBAL",summary:"Prefix output with emojis \u{1F308}"}),help:lA.Flags.boolean({default:!1,helpGroup:"GLOBAL",summary:"Show the help message for the command"}),"non-interactive":lA.Flags.boolean({char:"I",default:!1,helpGroup:"GLOBAL",summary:"Disable interactive outputs, useful for CI"}),target:lA.Flags.option({char:"t",description:"Raycast app target",helpGroup:"GLOBAL",multiple:!1,options:[...pVe],hidden:!0})()};flags;args;async init(){await super.init(),process.on("SIGINT",()=>process.exit(1));let{args:f,flags:h}=await this.parse({flags:this.ctor.flags,baseFlags:super.ctor.baseFlags,enableJsonFlag:this.ctor.enableJsonFlag,args:this.ctor.args,strict:this.ctor.strict});this.flags=h,this.args=f,bVe(this.flags.target),QVe(this.flags.emoji,this.flags["non-interactive"])}error(f,h){return h?.message&&f instanceof Error&&(f.message=`${h.message} (${f.message})`,delete h.message),super.error(f,h)}async catch(f){return super.catch(f)}async finally(f){return super.finally(f)}};var Pz=class extends Error{diagnostic;constructor(f,h){super(f),this.name="ExtensionBuildError",this.diagnostic=h}};function nTe(_){let f=_ instanceof Pz?_.diagnostic:{message:_ instanceof Error?_.message:String(_)};return JSON.stringify(f)}function XVe({build:_,onBuildStart:f,onBuildSuccess:h,onBuildFailure:T}){let w=!1,L,V=async()=>{f();let ke;do{w=!1;try{await _(),ke={status:"succeeded"}}catch(He){ke={status:"failed",error:He}}}while(w);ke.status==="succeeded"?h():T(ke.error)},ue=()=>(w=!0,L||(L=V().finally(()=>{L=void 0,w&&ue()})),L);return{requestBuild:ue}}var a5=require("node:child_process"),_T=to(require("node:fs")),Iz=to(require("node:path")),d$e=to(_$e());var f$e=require("node:child_process");function p$e(_){try{return(0,f$e.execFileSync)("/usr/bin/lsappinfo",["find",`bundleid=${_}`],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}async function pE(_,f){let h=!1,T=AIt();switch(_){case"start":{EIt(),fTe(),kIt();break}case"stop":{try{_T.unlinkSync(Rte("log"))}catch{}try{_T.unlinkSync(Rte("pid"))}catch{}break}default:h=!0}let w;try{w=cA()}catch{return}
|
|
594
|
+
`;return this.stop(),this.#s.write(ut),this}};function rTe(_){return new tTe(_)}var Zf=to(hte()),fE={wait:`\u{1F550}${(0,Zf.blue)("wait")} - `,info:`${process.env.GITHUB_ACTIONS==="true"?"\u2139\uFE0F":"\u2139\uFE0F "}${(0,Zf.cyan)("info")} - `,success:`\u2705${(0,Zf.green)("ready")} - `,warn:`${process.env.GITHUB_ACTIONS==="true"?"\u26A0\uFE0F":"\u26A0\uFE0F "}${(0,Zf.yellow)("warn")} - `,error:`\u{1F4A5}${(0,Zf.red)("error")} - `,event:`\u26A1\uFE0F${(0,Zf.magenta)("event")} - `,paymentPrompt:`\u{1F4B0}${(0,Zf.yellowBright)("plan")} - `},YVe=!0,bN=(0,Zf.blue)((0,Zf.dim)("internal only"));function C_(_,f,h){console.log(fE[_]+f),typeof h?.exit<"u"&&process.exit(h.exit)}async function Ite(_,f,h){if(!YVe){C_("wait",_);try{let w=await f();w&&console.log(w),C_("success",_);return}catch(w){return C_("error",_),h?.printError!==!1&&console.log((0,Zf.red)(w.message)),w}}let T=rTe({spinner:"simpleDots",prefixText:fE.wait+_}).start();try{let w=await f();T.stop(),C_("success",_),w&&console.log(w)}catch(w){return T.stop(),C_("error",_),h?.printError!==!1&&console.error(w.message),w}}function QVe(_,f){_||(fE.wait=`${(0,Zf.blue)("wait")} - `,fE.info=`${(0,Zf.cyan)("info")} - `,fE.success=`${(0,Zf.green)("ready")} - `,fE.warn=`${(0,Zf.yellow)("warn")} - `,fE.error=`${(0,Zf.red)("error")} - `,fE.event=`${(0,Zf.magenta)("event")} - `,fE.paymentPrompt=`${(0,Zf.yellowBright)("plan")} - `),f&&(YVe=!1)}var i5=class extends lA.Command{static baseFlags={"exit-on-error":lA.Flags.boolean({default:!0,helpGroup:"GLOBAL",aliases:["exitOnError"],deprecateAliases:!0,summary:"Always exit with non-zero code on error",allowNo:!0}),emoji:lA.Flags.boolean({default:!1,helpGroup:"GLOBAL",summary:"Prefix output with emojis \u{1F308}"}),help:lA.Flags.boolean({default:!1,helpGroup:"GLOBAL",summary:"Show the help message for the command"}),"non-interactive":lA.Flags.boolean({char:"I",default:!1,helpGroup:"GLOBAL",summary:"Disable interactive outputs, useful for CI"}),target:lA.Flags.option({char:"t",description:"Raycast app target",helpGroup:"GLOBAL",multiple:!1,options:[...pVe],hidden:!0})()};flags;args;async init(){await super.init(),process.on("SIGINT",()=>process.exit(1));let{args:f,flags:h}=await this.parse({flags:this.ctor.flags,baseFlags:super.ctor.baseFlags,enableJsonFlag:this.ctor.enableJsonFlag,args:this.ctor.args,strict:this.ctor.strict});this.flags=h,this.args=f,bVe(this.flags.target),QVe(this.flags.emoji,this.flags["non-interactive"])}error(f,h){return h?.message&&f instanceof Error&&(f.message=`${h.message} (${f.message})`,delete h.message),super.error(f,h)}async catch(f){return super.catch(f)}async finally(f){return super.finally(f)}};var Pz=class extends Error{diagnostic;constructor(f,h){super(f),this.name="ExtensionBuildError",this.diagnostic=h}};function nTe(_){let f=_ instanceof Pz?_.diagnostic:{message:_ instanceof Error?_.message:String(_)};return JSON.stringify(f)}function XVe({build:_,onBuildStart:f,onBuildSuccess:h,onBuildFailure:T}){let w=!1,L,V=async()=>{f();let ke;do{w=!1;try{await _(),ke={status:"succeeded"}}catch(He){ke={status:"failed",error:He}}}while(w);ke.status==="succeeded"?h():T(ke.error)},ue=()=>(w=!0,L||(L=V().finally(()=>{L=void 0,w&&ue()})),L);return{requestBuild:ue}}var a5=require("node:child_process"),_T=to(require("node:fs")),Iz=to(require("node:path")),d$e=to(_$e());var f$e=require("node:child_process");function p$e(_){try{return(0,f$e.execFileSync)("/usr/bin/lsappinfo",["find",`bundleid=${_}`],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}async function pE(_,f){let h=!1,T=AIt();switch(_){case"start":{EIt(),fTe(),kIt();break}case"stop":{try{_T.unlinkSync(Rte("log"))}catch{}try{_T.unlinkSync(Rte("pid"))}catch{}break}default:h=!0}let w;try{w=cA()}catch{return}let L=process.platform==="darwin"?p$e(T.bundleID):process.platform==="win32"&&PIt();_==="build-refresh"&&!L||(L||C_("warn","Raycast is not running"),h?wIt(w.name,_,f,T):await _Te(w.name,_,f,T))}function Rte(_){return Iz.join(xD(),_==="log"?"dev.log":"cli.pid")}function fTe(){let _=xD();try{_T.mkdirSync(_,{recursive:!0})}catch(h){throw new Error(`cannot create output directory (${h.message})`)}let f=process.pid.toString();try{_T.writeFileSync(Iz.join(_,"cli.pid"),f,{mode:420})}catch(h){throw new Error(`cannot write pid file (${h.message})`)}}function kIt(){let _=xD();try{_T.mkdirSync(_,{recursive:!0})}catch(f){throw new Error(`cannot create output directory (${f.message})`)}try{_T.writeFileSync(Iz.join(_,"dev.log"),"")}catch(f){throw new Error(`cannot write log file (${f.message})`)}}function EIt(){let _=Iz.join(xD(),"cli.pid");try{let h=_T.readFileSync(_,"utf8").trim();process.platform==="win32"?(0,a5.execSync)(`taskkill /F /PID ${h}`):(0,a5.execSync)(`kill -9 ${h}`,{shell:"/bin/sh"})}catch{}}var Nz=null;function wIt(_,f,h,T){Nz?(clearTimeout(Nz),Nz=setTimeout(()=>{_Te(_,f,h,T)},300)):(_Te(_,f,h,T),Nz=setTimeout(()=>{Nz=null},300))}async function _Te(_,f,h,T){let w=process.cwd(),L=`${T.scheme}://cli/${_}/${f}?cwd=${encodeURIComponent(w)}&info=${encodeURIComponent(h||"")}`;try{if(process.platform==="darwin"){(0,a5.execFileSync)("/usr/bin/open",["-g","-b",T.bundleID,L],{stdio:"ignore"});return}await(0,d$e.default)(L,{background:!0})}catch(V){C_("error",`cannot notify Raycast (${V.message})`)}}function AIt(){return{bundleID:yVe(),scheme:vVe()}}function PIt(){try{return(0,a5.execSync)('tasklist /FI "IMAGENAME eq Raycast.exe" /FO CSV /NH',{encoding:"utf8"}).toLowerCase().includes("raycast.exe")}catch{return!1}}var yp=to(require("node:fs")),Sf=to(require("node:path")),jN=require("@oclif/core"),grt=to(require("esbuild"));function Rd(_){if(typeof _!="object"||_===null)return!1;let f=Object.getPrototypeOf(_);return(f===null||f===Object.prototype||Object.getPrototypeOf(f)===null)&&!(Symbol.toStringTag in _)&&!(Symbol.iterator in _)}var m$e=require("node:url"),o5=(_,f)=>{let h=dTe(NIt(_));if(typeof h!="string")throw new TypeError(`${f} must be a string or a file URL: ${h}.`);return h},NIt=_=>pTe(_)?_.toString():_,pTe=_=>typeof _!="string"&&_&&Object.getPrototypeOf(_)===String.prototype,dTe=_=>_ instanceof URL?(0,m$e.fileURLToPath)(_):_;var Bte=(_,f=[],h={})=>{let T=o5(_,"First argument"),[w,L]=Rd(f)?[[],f]:[f,h];if(!Array.isArray(w))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${w}`);if(w.some(ke=>typeof ke=="object"&&ke!==null))throw new TypeError(`Second argument must be an array of strings: ${w}`);let V=w.map(String),ue=V.find(ke=>ke.includes("\0"));if(ue!==void 0)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${ue}`);if(!Rd(L))throw new TypeError(`Last argument must be an options object: ${L}`);return[T,V,L]};var D$e=require("node:child_process");var g$e=require("node:string_decoder"),{toString:h$e}=Object.prototype,y$e=_=>h$e.call(_)==="[object ArrayBuffer]",Wm=_=>h$e.call(_)==="[object Uint8Array]",dE=_=>new Uint8Array(_.buffer,_.byteOffset,_.byteLength),IIt=new TextEncoder,v$e=_=>IIt.encode(_),FIt=new TextDecoder,jte=_=>FIt.decode(_),b$e=(_,f)=>OIt(_,f).join(""),OIt=(_,f)=>{if(f==="utf8"&&_.every(L=>typeof L=="string"))return _;let h=new g$e.StringDecoder(f),T=_.map(L=>typeof L=="string"?v$e(L):L).map(L=>h.write(L)),w=h.end();return w===""?T:[...T,w]},Fz=_=>_.length===1&&Wm(_[0])?_[0]:mTe(LIt(_)),LIt=_=>_.map(f=>typeof f=="string"?v$e(f):f),mTe=_=>{let f=new Uint8Array(MIt(_)),h=0;for(let T of _)f.set(T,h),h+=T.length;return f},MIt=_=>{let f=0;for(let h of _)f+=h.length;return f};var C$e=_=>Array.isArray(_)&&Array.isArray(_.raw),k$e=(_,f)=>{let h=[];for(let[L,V]of _.entries())h=RIt({templates:_,expressions:f,tokens:h,index:L,template:V});if(h.length===0)throw new TypeError("Template script must not be empty");let[T,...w]=h;return[T,w,{}]},RIt=({templates:_,expressions:f,tokens:h,index:T,template:w})=>{if(w===void 0)throw new TypeError(`Invalid backslash sequence: ${_.raw[T]}`);let{nextTokens:L,leadingWhitespaces:V,trailingWhitespaces:ue}=BIt(w,_.raw[T]),ke=T$e(h,L,V);if(T===f.length)return ke;let He=f[T],ut=Array.isArray(He)?He.map(Mt=>x$e(Mt)):[x$e(He)];return T$e(ke,ut,ue)},BIt=(_,f)=>{if(f.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let h=[],T=0,w=S$e.has(f[0]);for(let V=0,ue=0;V<_.length;V+=1,ue+=1){let ke=f[ue];if(S$e.has(ke))T!==V&&h.push(_.slice(T,V)),T=V+1;else if(ke==="\\"){let He=f[ue+1];He===`
|
|
595
595
|
`?(V-=1,ue+=1):He==="u"&&f[ue+2]==="{"?ue=f.indexOf("}",ue+3):ue+=jIt[He]??1}}let L=T===_.length;return L||h.push(_.slice(T)),{nextTokens:h,leadingWhitespaces:w,trailingWhitespaces:L}},S$e=new Set([" "," ","\r",`
|
|
596
596
|
`]),jIt={x:3,u:5},T$e=(_,f,h)=>h||_.length===0||f.length===0?[..._,...f]:[..._.slice(0,-1),`${_.at(-1)}${f[0]}`,...f.slice(1)],x$e=_=>{let f=typeof _;if(f==="string")return _;if(f==="number")return String(_);if(Rd(_)&&("stdout"in _||"isMaxBuffer"in _))return JIt(_);throw _ instanceof D$e.ChildProcess||Object.prototype.toString.call(_)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${f}" in template expression`)},JIt=({stdout:_})=>{if(typeof _=="string")return _;if(Wm(_))return jte(_);throw _===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof _}" stdout in template expression`)};var MQe=require("node:child_process");var w$e=require("node:util");var Jte=to(require("node:process"),1),fT=_=>zte.includes(_),zte=[Jte.default.stdin,Jte.default.stdout,Jte.default.stderr],x2=["stdin","stdout","stderr"],Wte=_=>x2[_]??`stdio[${_}]`;var A$e=_=>{let f={..._};for(let h of yTe)f[h]=gTe(_,h);return f},gTe=(_,f)=>{let h=Array.from({length:zIt(_)+1}),T=WIt(_[f],h,f);return GIt(T,f)},zIt=({stdio:_})=>Array.isArray(_)?Math.max(_.length,x2.length):x2.length,WIt=(_,f,h)=>Rd(_)?UIt(_,f,h):f.fill(_),UIt=(_,f,h)=>{for(let T of Object.keys(_).sort(qIt))for(let w of VIt(T,h,f))f[w]=_[T];return f},qIt=(_,f)=>E$e(_)<E$e(f)?1:-1,E$e=_=>_==="stdout"||_==="stderr"?0:_==="all"?2:1,VIt=(_,f,h)=>{if(_==="ipc")return[h.length-1];let T=hTe(_);if(T===void 0||T===0)throw new TypeError(`"${f}.${_}" is invalid.
|
|
597
597
|
It must be "${f}.stdout", "${f}.stderr", "${f}.all", "${f}.ipc", or "${f}.fd3", "${f}.fd4" (and so on).`);if(T>=h.length)throw new TypeError(`"${f}.${_}" is invalid: that file descriptor does not exist.
|
|
@@ -970,7 +970,7 @@ ${s.join(`
|
|
|
970
970
|
`}),s+="}",s}function Ovr(i){let s="{";return(i||[]).forEach((c,f)=>{switch(f===0&&(s+=`
|
|
971
971
|
`),s+=` /** ${c.placeholder} */
|
|
972
972
|
"${c.name}": `,c.type){case"text":case"password":s+="string";break;case"dropdown":s+=c.data?.map(g=>`"${g.value}"`).join(" | ")||"unknown";break;default:s+="unknown"}f<(i||[]).length-1&&(s+=","),s+=`
|
|
973
|
-
`}),s+="}",s}var Xq=require("node:child_process"),bD=ia(require("node:fs")),vK=ia(require("node:path")),cbt=ia(HNe());var sbt=require("node:child_process");function abt(i){try{return(0,sbt.execFileSync)("/usr/bin/lsappinfo",["find",`bundleid=${i}`],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}async function Ade(i,s){let c=!1,f=Bvr();switch(i){case"start":{Mvr(),Rvr(),Lvr();break}case"stop":{try{bD.unlinkSync(obt("log"))}catch{}try{bD.unlinkSync(obt("pid"))}catch{}break}default:c=!0}let g;try{g=$k()}catch{return}
|
|
973
|
+
`}),s+="}",s}var Xq=require("node:child_process"),bD=ia(require("node:fs")),vK=ia(require("node:path")),cbt=ia(HNe());var sbt=require("node:child_process");function abt(i){try{return(0,sbt.execFileSync)("/usr/bin/lsappinfo",["find",`bundleid=${i}`],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}async function Ade(i,s){let c=!1,f=Bvr();switch(i){case"start":{Mvr(),Rvr(),Lvr();break}case"stop":{try{bD.unlinkSync(obt("log"))}catch{}try{bD.unlinkSync(obt("pid"))}catch{}break}default:c=!0}let g;try{g=$k()}catch{return}let S=process.platform==="darwin"?abt(f.bundleID):process.platform==="win32"&&qvr();i==="build-refresh"&&!S||(S||Zl("warn","Raycast is not running"),c?jvr(g.name,i,s,f):await ROe(g.name,i,s,f))}function obt(i){return vK.join(x5(),i==="log"?"dev.log":"cli.pid")}function Rvr(){let i=x5();try{bD.mkdirSync(i,{recursive:!0})}catch(c){throw new Error(`cannot create output directory (${c.message})`)}let s=process.pid.toString();try{bD.writeFileSync(vK.join(i,"cli.pid"),s,{mode:420})}catch(c){throw new Error(`cannot write pid file (${c.message})`)}}function Lvr(){let i=x5();try{bD.mkdirSync(i,{recursive:!0})}catch(s){throw new Error(`cannot create output directory (${s.message})`)}try{bD.writeFileSync(vK.join(i,"dev.log"),"")}catch(s){throw new Error(`cannot write log file (${s.message})`)}}function Mvr(){let i=vK.join(x5(),"cli.pid");try{let c=bD.readFileSync(i,"utf8").trim();process.platform==="win32"?(0,Xq.execSync)(`taskkill /F /PID ${c}`):(0,Xq.execSync)(`kill -9 ${c}`,{shell:"/bin/sh"})}catch{}}var yK=null;function jvr(i,s,c,f){yK?(clearTimeout(yK),yK=setTimeout(()=>{ROe(i,s,c,f)},300)):(ROe(i,s,c,f),yK=setTimeout(()=>{yK=null},300))}async function ROe(i,s,c,f){let g=process.cwd(),S=`${f.scheme}://cli/${i}/${s}?cwd=${encodeURIComponent(g)}&info=${encodeURIComponent(c||"")}`;try{if(process.platform==="darwin"){(0,Xq.execFileSync)("/usr/bin/open",["-g","-b",f.bundleID,S],{stdio:"ignore"});return}await(0,cbt.default)(S,{background:!0})}catch(D){Zl("error",`cannot notify Raycast (${D.message})`)}}function Bvr(){return{bundleID:Lft(),scheme:Mft()}}function qvr(){try{return(0,Xq.execSync)('tasklist /FI "IMAGENAME eq Raycast.exe" /FO CSV /NH',{encoding:"utf8"}).toLowerCase().includes("raycast.exe")}catch{return!1}}var lbt=require("node:crypto"),Zh=ia(require("node:fs")),bK=ia(require("node:path")),ubt=ia(rOe()),Jvr="SKILL.md",fbt=64,_bt=1024;function pbt(i,s,c){if(z5(i,c),!Zh.existsSync(i)){Zh.rmSync(s,{recursive:!0,force:!0});return}let f=`${s}.${(0,lbt.randomUUID)()}.staging`;Zh.rmSync(f,{recursive:!0,force:!0});try{Zh.cpSync(i,f,{recursive:!0,filter:g=>bK.basename(g)!==".DS_Store"}),Zh.rmSync(s,{recursive:!0,force:!0}),Zh.renameSync(f,s)}catch(g){throw Zh.rmSync(f,{recursive:!0,force:!0}),g}}function z5(i,s){let c=s??[];if(!Zh.existsSync(i)){if(c.length>0)throw new Error(`build failed: AI configuration declares skills but "${i}" does not exist`);return[]}let f=Wvr(i),g=new Map;for(let S of c){if(typeof S.title!="string"||S.title.trim().length===0)throw new Error(`build failed: AI configuration skill "${S.name}" must have a non-empty string title`);if(g.has(S.name))throw new Error(`build failed: AI configuration declares skill "${S.name}" more than once`);g.set(S.name,S)}for(let S of f.keys())if(!g.has(S))throw new Error(`build failed: skill "${S}" must be declared in package.json ai.skills or an AI configuration file`);return c.map(S=>{let D=f.get(S.name);if(D===void 0)throw new Error(`build failed: declared skill "${S.name}" is missing from "${i}"`);return{...S,description:D}})}function Wvr(i){if(!Zh.statSync(i).isDirectory())throw new Error(`build failed: skills path "${i}" must be a directory`);let c=new Map;for(let f of Zh.readdirSync(i,{withFileTypes:!0})){if(f.name===".DS_Store")continue;let g=bK.join(i,f.name);if(!f.isDirectory())throw new Error(`build failed: skills must use the "skills/<skill-name>/SKILL.md" format; found "${g}"`);c.set(f.name,zvr(g,f.name))}return c}function zvr(i,s){let c=bK.join(i,Jvr);if(!Zh.existsSync(c)||!Zh.statSync(c).isFile())throw new Error(`build failed: skill "${s}" must contain "${c}"`);let f=$vr(Zh.readFileSync(c,"utf8"),c),g=f.name,S=f.description;if(typeof g!="string"||!Uvr(g))throw new Error(`build failed: skill "${s}" has an invalid frontmatter name; expected 1-${fbt} lowercase letters, numbers, or single hyphens`);if(s!==g)throw new Error(`build failed: skill directory "${s}" must match its frontmatter name "${g}"`);if(typeof S!="string"||!Vvr(S))throw new Error(`build failed: skill "${s}" has an invalid frontmatter description; expected 1-${_bt} characters`);return S}function $vr(i,s){let c=/^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n|$)/.exec(i);if(!c?.[1])throw new Error(`build failed: skill file "${s}" must start with YAML frontmatter`);let f;try{f=ubt.default.parse(c[1])}catch(g){throw new Error(`build failed: skill file "${s}" has malformed YAML frontmatter (${String(g)})`)}if(!f||typeof f!="object"||Array.isArray(f))throw new Error(`build failed: skill file "${s}" must have YAML object frontmatter`);return f}function Uvr(i){return i.length>=1&&i.length<=fbt&&/^[a-z0-9-]+$/.test(i)&&!i.startsWith("-")&&!i.endsWith("-")&&!i.includes("--")}function Vvr(i){return i.trim().length>0&&i.length<=_bt}var LOe=class i extends qI{static description="Build the extension to the output directory";static flags={environment:$5.Flags.option({char:"e",default:"dev",description:"Environment to build for",options:["dev","dist"]})(),output:$5.Flags.directory({char:"o",description:"Output path"}),"skip-types":$5.Flags.boolean({description:"Indicates whether to skip types generation "+jI,default:!1,hidden:!0}),"print-tool-schemas":$5.Flags.boolean({description:"Indicates whether to print the schema tools "+jI,default:!1,hidden:!0})};async run(){let{flags:s}=await this.parse(i),c=s.output||x5();await MOe({environment:s.environment,outputDir:c,skipTypeDeclarations:s["skip-types"],printExtractedSchemas:s["print-tool-schemas"]},()=>{}),s.output||await Ade("build-refresh")}};async function MOe(i,s){let c=$k();c.ai=Uq(c.ai);let{manifest:f,duplicates:g}=Aft(c);g.length>0&&Zl("warn",Pft(g)),z5("skills",f.ai?.skills);let S=!1,D=(f.commands??[]).map(Ye=>{let Wt=dbt(Gp.join("src",Ye.name),["ts","tsx","js","jsx"]);if(Wt)return Wt.hasTypeScript&&(S=!0),Wt.filePath;throw new Error(`build failed: could not find an entry point for the command "${Ye.name}"
|
|
974
974
|
Make sure the command name in the package.json corresponds to a file in the src directory`)}),R=[],z=f.ai?.modelProvider;if(typeof z=="string"){let Ye=dbt(Gp.join("src",z),["ts","tsx","js","jsx"]);if(!Ye)throw new Error(`build failed: could not find an entry point for the model provider "${z}"
|
|
975
975
|
Make sure ai.modelProvider in the package.json corresponds to a file in the src directory`);Ye.hasTypeScript&&(S=!0),R.push(Ye.filePath)}let K=f.tools?.map(Ye=>{for(let Wt of["ts","tsx"]){let wr=Gp.join("src","tools",Ye.name+"."+Wt);if(Kd.existsSync(wr))return(Wt==="ts"||Wt==="tsx")&&(S=!0),wr}for(let Wt in["ts","tsx"]){let wr=Gp.join("src",Ye.name+"."+Wt);if(Kd.existsSync(wr))throw new Error(`build failed: the entry point tool "${Ye.name}" is not the right folder
|
|
976
976
|
Move the file "${wr}" in the src/tools directory`)}throw new Error(`build failed: could not find an entry point for the tool "${Ye.name}"
|
|
@@ -996,7 +996,7 @@ ${(0,ybt.red)(wr.join(`
|
|
|
996
996
|
`))}})===void 0}function J4(i){if(i.every(S=>!S.pointer))return i.map(S=>` ${S.level} ${S.message}`).join(`
|
|
997
997
|
`);let s=CNt.default.parse(dC.readFileSync("package.json","utf8")).pointers,c=0,f=0;i.forEach(S=>{if(!S.pointer||!s[S.pointer])return;let D=s[S.pointer].value;(D.line+1).toString().length>c&&(c=(D.line+1).toString().length),D.column.toString().length>f&&(f=D.column.toString().length)});let g=[];return i.forEach(S=>{let D="";if(!S.pointer||!s[S.pointer])D=`${"".padStart(c+f+1)} ${S.level} ${S.message}`;else{let R=s[S.pointer].value;D=`${(R.line+1).toString().padStart(c)}:${R.column.toString().padStart(f)} ${S.level} ${S.message}`}S.level==="warning"?g.push((0,yge.yellow)(D)):g.push(D)}),g.join(`
|
|
998
998
|
`)}function aW(i){return!i.includes("RayCast")&&!i.includes("raycast")}var vge=class i extends qI{static summary="Publish the extension";static description=`Publish the extension on the Raycast Store.
|
|
999
|
-
Private extension are a team feature. Sign up for it here: `+T5(`${G2.url}/pricing`,`${G2.url}/pricing`);static flags={clipboard:lZ.Flags.boolean({char:"C",description:"Copy the extension link to the clipboard upon publishing",default:!1}),verbose:lZ.Flags.boolean({description:"Print more details during the publishing process",default:!1}),"skip-validation":lZ.Flags.boolean({char:"s",description:"Skip validation and always publish "+jI,default:!1,hidden:!0}),"skip-notify-raycast":lZ.Flags.boolean({description:"Skip notifying Raycast after publishing "+jI,default:!1,hidden:!0})};async run(){let{flags:s}=await this.parse(i),c=$k();if(s["skip-validation"]||await SMe({skipOwner:!0,fix:!1,relaxed:!1,skipLockFiles:!1,schema:`${G2.url}/schemas/extension.json`})||this.error("failed validating extension"),Nft(c)){y_t();let f=await D3e();f.publishing_bot&&this.error("publishing bot cannot publish private extensions");let g=c.owner;g||this.error("missing owner in manifest");let S=(await v_t()).data;S.length===0&&this.error(`logged in user '${f.username}' is not part of any organization`),S.find(D=>D.handle===g)||this.error(`owner '${g}' in package.json doesn't match any organizations of the logged in user '${f.username}'`);try{let D=await E9e(c,{verbose:s.verbose});s.clipboard&&(DNt.default.writeSync(D.store_url),Zl("event","copied extension link to clipboard")),Zl("success",`published extension to your private organization ${g} store: ${D.store_url}`)
|
|
999
|
+
Private extension are a team feature. Sign up for it here: `+T5(`${G2.url}/pricing`,`${G2.url}/pricing`);static flags={clipboard:lZ.Flags.boolean({char:"C",description:"Copy the extension link to the clipboard upon publishing",default:!1}),verbose:lZ.Flags.boolean({description:"Print more details during the publishing process",default:!1}),"skip-validation":lZ.Flags.boolean({char:"s",description:"Skip validation and always publish "+jI,default:!1,hidden:!0}),"skip-notify-raycast":lZ.Flags.boolean({description:"Skip notifying Raycast after publishing "+jI,default:!1,hidden:!0})};async run(){let{flags:s}=await this.parse(i),c=$k();if(s["skip-validation"]||await SMe({skipOwner:!0,fix:!1,relaxed:!1,skipLockFiles:!1,schema:`${G2.url}/schemas/extension.json`})||this.error("failed validating extension"),Nft(c)){y_t();let f=await D3e();f.publishing_bot&&this.error("publishing bot cannot publish private extensions");let g=c.owner;g||this.error("missing owner in manifest");let S=(await v_t()).data;S.length===0&&this.error(`logged in user '${f.username}' is not part of any organization`),S.find(D=>D.handle===g)||this.error(`owner '${g}' in package.json doesn't match any organizations of the logged in user '${f.username}'`);try{let D=await E9e(c,{verbose:s.verbose});s.clipboard&&(DNt.default.writeSync(D.store_url),Zl("event","copied extension link to clipboard")),Zl("success",`published extension to your private organization ${g} store: ${D.store_url}`),!s["skip-notify-raycast"]&&process.env.CI?.toLowerCase()!=="true"&&Ade("publish",c.owner)}catch(D){if(D instanceof Error&&D.message.includes("the limit of free commands has been reached")){let R=await x_t(c.owner),z=R?`${G2.url}/upgrade/${c.owner}/${R}`:`${G2.url}/upgrade/${c.owner}`;console.log((0,ENt.yellowBright)(`
|
|
1000
1000
|
You reached the limit of commands of the free plan for your organization. Upgrade your plan here:
|
|
1001
1001
|
${z}`)),process.exit(1)}this.error(D,{message:"publishing failed"})}}else{let f=!1;try{f=(await D3e()).publishing_bot}catch{}if(f)try{let g=await E9e(c,{verbose:s.verbose});Zl("success",`published extension to ${g.store_url}`)}catch(g){this.error(g,{message:"publishing failed"})}else s["non-interactive"]?this.error("Cannot publish the public extension to the store in non-interactive mode. If you wish to publish the extension to your organisation instead, add the `owner` field to your package.json and ensure that there are no `access` field."):await rpt(c,{verbose:s.verbose})}}};
|
|
1002
1002
|
/*! Bundled license information:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var O=Object.create;var y=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var v=(t,n)=>()=>{try{return n||t((n={exports:{}}).exports,n),n.exports}catch(o){throw n=0,o}},_=(t,n)=>{for(var o in n)y(t,o,{get:n[o],enumerable:!0})},k=(t,n,o,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of L(n))!U.call(t,a)&&a!==o&&y(t,a,{get:()=>n[a],enumerable:!(i=M(n,a))||i.enumerable});return t};var h=(t,n,o)=>(o=t!=null?O(S(t)):{},k(n||!t||!t.__esModule?y(o,"default",{value:t,enumerable:!0}):o,t)),Y=t=>k(y({},"__esModule",{value:!0}),t);var A=v((ne,I)=>{var J=require("node:tty"),K=J?.WriteStream?.prototype?.hasColors?.()??!1,r=(t,n)=>{if(!K)return a=>a;let o=`\x1B[${t}m`,i=`\x1B[${n}m`;return a=>{let u=a+"",d=u.indexOf(i);if(d===-1)return o+u+i;let T=o,m=0,G=(n===22?i:"")+o;for(;d!==-1;)T+=u.slice(m,d)+G,m=d+i.length,d=u.indexOf(i,m);return T+=u.slice(m)+i,T}},e={};e.reset=r(0,0);e.bold=r(1,22);e.dim=r(2,22);e.italic=r(3,23);e.underline=r(4,24);e.overline=r(53,55);e.inverse=r(7,27);e.hidden=r(8,28);e.strikethrough=r(9,29);e.black=r(30,39);e.red=r(31,39);e.green=r(32,39);e.yellow=r(33,39);e.blue=r(34,39);e.magenta=r(35,39);e.cyan=r(36,39);e.white=r(37,39);e.gray=r(90,39);e.bgBlack=r(40,49);e.bgRed=r(41,49);e.bgGreen=r(42,49);e.bgYellow=r(43,49);e.bgBlue=r(44,49);e.bgMagenta=r(45,49);e.bgCyan=r(46,49);e.bgWhite=r(47,49);e.bgGray=r(100,49);e.redBright=r(91,39);e.greenBright=r(92,39);e.yellowBright=r(93,39);e.blueBright=r(94,39);e.magentaBright=r(95,39);e.cyanBright=r(96,39);e.whiteBright=r(97,39);e.bgRedBright=r(101,49);e.bgGreenBright=r(102,49);e.bgYellowBright=r(103,49);e.bgBlueBright=r(104,49);e.bgMagentaBright=r(105,49);e.bgCyanBright=r(106,49);e.bgWhiteBright=r(107,49);I.exports=e});var F=v((xe,Q)=>{Q.exports={name:"ray",version:"2.
|
|
1
|
+
"use strict";var O=Object.create;var y=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var v=(t,n)=>()=>{try{return n||t((n={exports:{}}).exports,n),n.exports}catch(o){throw n=0,o}},_=(t,n)=>{for(var o in n)y(t,o,{get:n[o],enumerable:!0})},k=(t,n,o,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of L(n))!U.call(t,a)&&a!==o&&y(t,a,{get:()=>n[a],enumerable:!(i=M(n,a))||i.enumerable});return t};var h=(t,n,o)=>(o=t!=null?O(S(t)):{},k(n||!t||!t.__esModule?y(o,"default",{value:t,enumerable:!0}):o,t)),Y=t=>k(y({},"__esModule",{value:!0}),t);var A=v((ne,I)=>{var J=require("node:tty"),K=J?.WriteStream?.prototype?.hasColors?.()??!1,r=(t,n)=>{if(!K)return a=>a;let o=`\x1B[${t}m`,i=`\x1B[${n}m`;return a=>{let u=a+"",d=u.indexOf(i);if(d===-1)return o+u+i;let T=o,m=0,G=(n===22?i:"")+o;for(;d!==-1;)T+=u.slice(m,d)+G,m=d+i.length,d=u.indexOf(i,m);return T+=u.slice(m)+i,T}},e={};e.reset=r(0,0);e.bold=r(1,22);e.dim=r(2,22);e.italic=r(3,23);e.underline=r(4,24);e.overline=r(53,55);e.inverse=r(7,27);e.hidden=r(8,28);e.strikethrough=r(9,29);e.black=r(30,39);e.red=r(31,39);e.green=r(32,39);e.yellow=r(33,39);e.blue=r(34,39);e.magenta=r(35,39);e.cyan=r(36,39);e.white=r(37,39);e.gray=r(90,39);e.bgBlack=r(40,49);e.bgRed=r(41,49);e.bgGreen=r(42,49);e.bgYellow=r(43,49);e.bgBlue=r(44,49);e.bgMagenta=r(45,49);e.bgCyan=r(46,49);e.bgWhite=r(47,49);e.bgGray=r(100,49);e.redBright=r(91,39);e.greenBright=r(92,39);e.yellowBright=r(93,39);e.blueBright=r(94,39);e.magentaBright=r(95,39);e.cyanBright=r(96,39);e.whiteBright=r(97,39);e.bgRedBright=r(101,49);e.bgGreenBright=r(102,49);e.bgYellowBright=r(103,49);e.bgBlueBright=r(104,49);e.bgMagentaBright=r(105,49);e.bgCyanBright=r(106,49);e.bgWhiteBright=r(107,49);I.exports=e});var F=v((xe,Q)=>{Q.exports={name:"ray",version:"2.6.1",private:!0,description:"Build extensions for Raycast with React and Node.js.",license:"MIT",author:"mathieudutour",bin:{ray:"./bin/run.js"},files:["/bin","/dist","/oclif.manifest.json"],main:"dist/index.js",types:"dist/index.d.ts",scripts:{"json-schema-to-ts":"json2ts ../../schema.json -y > src/types/manifest-schema.d.ts","build-scripts":"tsc --outDir ./scripts/dist --project ./tsconfig.scripts.json",prebuild:"pnpm json-schema-to-ts && pnpm run build-scripts",build:"node ./scripts/dist/build-command.js",predev:"pnpm run json-schema-to-ts && pnpm run build-scripts",dev:"node ./scripts/dist/dev-command.js",lint:"eslint . --ext .ts",test:"node --experimental-strip-types --test"},dependencies:{"@oclif/core":"^4.11.4","@oclif/plugin-autocomplete":"^3.2.50","@oclif/plugin-help":"^6.2.50","@oclif/plugin-not-found":"^3.2.87","@raycast/eslint-plugin":"^2.1.1",ajv:"catalog:",archiver:"catalog:",camelcase:"^8.0.0",chalk:"^5.6.2",chokidar:"catalog:","cli-progress":"^3.12.0",clipboardy:"^2.3.0",execa:"^9.6.1","json-source-map":"^0.6.1",json5:"^2.2.3","node-fetch-cjs":"^3.3.2",open:"^8.4.2",ora:"^8.2.0",tail:"^2.2.6","terminal-link":"^3.0.0",yaml:"catalog:","yoctocolors-cjs":"^2.1.3"},devDependencies:{"@types/archiver":"catalog:","@types/cli-progress":"^3.11.6","@types/node":"catalog:","@types/tail":"^2.2.3",esbuild:"^0.28.0",eslint:"catalog:","eslint-config":"workspace:*","eslint-formatter-unix":"catalog:","eslint-plugin-n":"catalog:","eslint-plugin-no-process-platform":"workspace:*",globals:"catalog:","json-schema-to-typescript":"^15.0.4",oclif:"^4.23.10","@raycast/tsc-native":"workspace:*"},oclif:{bin:"ray",commands:"./dist/commands",dirname:"ray",plugins:["@oclif/plugin-autocomplete","@oclif/plugin-help","@oclif/plugin-not-found"]}}});var ee={};_(ee,{default:()=>x});module.exports=Y(ee);var l=require("@oclif/core");var s=h(A()),p={wait:`\u{1F550}${(0,s.blue)("wait")} - `,info:`${process.env.GITHUB_ACTIONS==="true"?"\u2139\uFE0F":"\u2139\uFE0F "}${(0,s.cyan)("info")} - `,success:`\u2705${(0,s.green)("ready")} - `,warn:`${process.env.GITHUB_ACTIONS==="true"?"\u26A0\uFE0F":"\u26A0\uFE0F "}${(0,s.yellow)("warn")} - `,error:`\u{1F4A5}${(0,s.red)("error")} - `,event:`\u26A1\uFE0F${(0,s.magenta)("event")} - `,paymentPrompt:`\u{1F4B0}${(0,s.yellowBright)("plan")} - `},q=!0,se=(0,s.blue)((0,s.dim)("internal only"));function N(t,n){t||(p.wait=`${(0,s.blue)("wait")} - `,p.info=`${(0,s.cyan)("info")} - `,p.success=`${(0,s.green)("ready")} - `,p.warn=`${(0,s.yellow)("warn")} - `,p.error=`${(0,s.red)("error")} - `,p.event=`${(0,s.magenta)("event")} - `,p.paymentPrompt=`${(0,s.yellowBright)("plan")} - `),n&&(q=!1)}var f={development:"development",internal:"internal",release:"release"},P=Object.values(f),H={debug:"development",x:"","x-development":"development","x-internal":"internal"};function R(t){return H[t]??t}function C(t){return t===f.release?"":t}var g=h(require("node:fs")),$=h(require("node:os")),w=h(require("node:path"));var D={production:{url:"https://www.raycast.com",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},staging:{url:"https://www.rayca.st",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},development:{url:"http://localhost:3000",clientID:"rOCD_LhnXFObSLu9v7788qOGu25FZDqEzGjet4Q45ZY"}}[process.env.API_ENV||"production"],V="e69bae0ec90f5e838555",c={},j;function B(t){j=t;try{c=JSON.parse(g.readFileSync(w.join(Z(),"config.json"),"utf8"))}catch(n){if(!(n instanceof Error)||n.code!=="ENOENT")throw new Error(`Failed to read config file: ${n}`)}}function z(t){switch(t){case"raycastApiURL":return process.env.RAY_APIURL||c.APIURL||D.url;case"raycastAccessToken":return process.env.RAY_TOKEN||c.Token||c.AccessToken||"";case"raycastClientId":return process.env.RAY_CLIENT_ID||c.ClientID||D.clientID;case"githubClientId":return process.env.RAY_GithubClientID||c.GithubClientID||V;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||c.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target?process.env.RAY_Target:typeof c.Target<"u"?c.Target:E(f.release)}}function E(t){return typeof t<"u"?C(t):R(z("flavorName"))}function W(t){return t==""?"raycast":`raycast-${t}`}function X(t){let n=w.join($.default.homedir(),".config",W(t));return g.mkdirSync(n,{recursive:!0}),n}function Z(){return X(E(j))}var b=class extends l.Command{static baseFlags={"exit-on-error":l.Flags.boolean({default:!0,helpGroup:"GLOBAL",aliases:["exitOnError"],deprecateAliases:!0,summary:"Always exit with non-zero code on error",allowNo:!0}),emoji:l.Flags.boolean({default:!1,helpGroup:"GLOBAL",summary:"Prefix output with emojis \u{1F308}"}),help:l.Flags.boolean({default:!1,helpGroup:"GLOBAL",summary:"Show the help message for the command"}),"non-interactive":l.Flags.boolean({char:"I",default:!1,helpGroup:"GLOBAL",summary:"Disable interactive outputs, useful for CI"}),target:l.Flags.option({char:"t",description:"Raycast app target",helpGroup:"GLOBAL",multiple:!1,options:[...P],hidden:!0})()};flags;args;async init(){await super.init(),process.on("SIGINT",()=>process.exit(1));let{args:n,flags:o}=await this.parse({flags:this.ctor.flags,baseFlags:super.ctor.baseFlags,enableJsonFlag:this.ctor.enableJsonFlag,args:this.ctor.args,strict:this.ctor.strict});this.flags=o,this.args=n,B(this.flags.target),N(this.flags.emoji,this.flags["non-interactive"])}error(n,o){return o?.message&&n instanceof Error&&(n.message=`${o.message} (${n.message})`,delete o.message),super.error(n,o)}async catch(n){return super.catch(n)}async finally(n){return super.finally(n)}};var x=class t extends b{static description="Print the version number";async run(){await this.parse(t),this.log(`${F().version}`)}};
|
|
@@ -912,7 +912,7 @@ ${a.join(`
|
|
|
912
912
|
`}),a+="}",a}function zlr(s){let a="{";return(s||[]).forEach((u,d)=>{switch(d===0&&(a+=`
|
|
913
913
|
`),a+=` /** ${u.placeholder} */
|
|
914
914
|
"${u.name}": `,u.type){case"text":case"password":a+="string";break;case"dropdown":a+=u.data?.map(y=>`"${y.value}"`).join(" | ")||"unknown";break;default:a+="unknown"}d<(s||[]).length-1&&(a+=","),a+=`
|
|
915
|
-
`}),a+="}",a}var _j=require("node:child_process"),ED=ro(require("node:fs")),cY=ro(require("node:path")),Vpt=ro(i6e());var Wpt=require("node:child_process");function zpt(s){try{return(0,Wpt.execFileSync)("/usr/bin/lsappinfo",["find",`bundleid=${s}`],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}async function $pt(s,a){let u=!1,d=Hlr();switch(s){case"start":{$lr(),Ulr(),Vlr();break}case"stop":{try{ED.unlinkSync(Upt("log"))}catch{}try{ED.unlinkSync(Upt("pid"))}catch{}break}default:u=!0}let y;try{y=AB()}catch{return}
|
|
915
|
+
`}),a+="}",a}var _j=require("node:child_process"),ED=ro(require("node:fs")),cY=ro(require("node:path")),Vpt=ro(i6e());var Wpt=require("node:child_process");function zpt(s){try{return(0,Wpt.execFileSync)("/usr/bin/lsappinfo",["find",`bundleid=${s}`],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}async function $pt(s,a){let u=!1,d=Hlr();switch(s){case"start":{$lr(),Ulr(),Vlr();break}case"stop":{try{ED.unlinkSync(Upt("log"))}catch{}try{ED.unlinkSync(Upt("pid"))}catch{}break}default:u=!0}let y;try{y=AB()}catch{return}let D=process.platform==="darwin"?zpt(d.bundleID):process.platform==="win32"&&Ylr();s==="build-refresh"&&!D||(D||Yf("warn","Raycast is not running"),u?Glr(y.name,s,a,d):await pNe(y.name,s,a,d))}function Upt(s){return cY.join(rO(),s==="log"?"dev.log":"cli.pid")}function Ulr(){let s=rO();try{ED.mkdirSync(s,{recursive:!0})}catch(u){throw new Error(`cannot create output directory (${u.message})`)}let a=process.pid.toString();try{ED.writeFileSync(cY.join(s,"cli.pid"),a,{mode:420})}catch(u){throw new Error(`cannot write pid file (${u.message})`)}}function Vlr(){let s=rO();try{ED.mkdirSync(s,{recursive:!0})}catch(a){throw new Error(`cannot create output directory (${a.message})`)}try{ED.writeFileSync(cY.join(s,"dev.log"),"")}catch(a){throw new Error(`cannot write log file (${a.message})`)}}function $lr(){let s=cY.join(rO(),"cli.pid");try{let u=ED.readFileSync(s,"utf8").trim();process.platform==="win32"?(0,_j.execSync)(`taskkill /F /PID ${u}`):(0,_j.execSync)(`kill -9 ${u}`,{shell:"/bin/sh"})}catch{}}var oY=null;function Glr(s,a,u,d){oY?(clearTimeout(oY),oY=setTimeout(()=>{pNe(s,a,u,d)},300)):(pNe(s,a,u,d),oY=setTimeout(()=>{oY=null},300))}async function pNe(s,a,u,d){let y=process.cwd(),D=`${d.scheme}://cli/${s}/${a}?cwd=${encodeURIComponent(y)}&info=${encodeURIComponent(u||"")}`;try{if(process.platform==="darwin"){(0,_j.execFileSync)("/usr/bin/open",["-g","-b",d.bundleID,D],{stdio:"ignore"});return}await(0,Vpt.default)(D,{background:!0})}catch(I){Yf("error",`cannot notify Raycast (${I.message})`)}}function Hlr(){return{bundleID:znt(),scheme:Unt()}}function Ylr(){try{return(0,_j.execSync)('tasklist /FI "IMAGENAME eq Raycast.exe" /FO CSV /NH',{encoding:"utf8"}).toLowerCase().includes("raycast.exe")}catch{return!1}}var Gpt=require("node:crypto"),Ih=ro(require("node:fs")),lY=ro(require("node:path")),Hpt=ro(O3e()),Qlr="SKILL.md",Ypt=64,Qpt=1024;function Xpt(s,a,u){if(uY(s,u),!Ih.existsSync(s)){Ih.rmSync(a,{recursive:!0,force:!0});return}let d=`${a}.${(0,Gpt.randomUUID)()}.staging`;Ih.rmSync(d,{recursive:!0,force:!0});try{Ih.cpSync(s,d,{recursive:!0,filter:y=>lY.basename(y)!==".DS_Store"}),Ih.rmSync(a,{recursive:!0,force:!0}),Ih.renameSync(d,a)}catch(y){throw Ih.rmSync(d,{recursive:!0,force:!0}),y}}function uY(s,a){let u=a??[];if(!Ih.existsSync(s)){if(u.length>0)throw new Error(`build failed: AI configuration declares skills but "${s}" does not exist`);return[]}let d=Xlr(s),y=new Map;for(let D of u){if(typeof D.title!="string"||D.title.trim().length===0)throw new Error(`build failed: AI configuration skill "${D.name}" must have a non-empty string title`);if(y.has(D.name))throw new Error(`build failed: AI configuration declares skill "${D.name}" more than once`);y.set(D.name,D)}for(let D of d.keys())if(!y.has(D))throw new Error(`build failed: skill "${D}" must be declared in package.json ai.skills or an AI configuration file`);return u.map(D=>{let I=d.get(D.name);if(I===void 0)throw new Error(`build failed: declared skill "${D.name}" is missing from "${s}"`);return{...D,description:I}})}function Xlr(s){if(!Ih.statSync(s).isDirectory())throw new Error(`build failed: skills path "${s}" must be a directory`);let u=new Map;for(let d of Ih.readdirSync(s,{withFileTypes:!0})){if(d.name===".DS_Store")continue;let y=lY.join(s,d.name);if(!d.isDirectory())throw new Error(`build failed: skills must use the "skills/<skill-name>/SKILL.md" format; found "${y}"`);u.set(d.name,Klr(y,d.name))}return u}function Klr(s,a){let u=lY.join(s,Qlr);if(!Ih.existsSync(u)||!Ih.statSync(u).isFile())throw new Error(`build failed: skill "${a}" must contain "${u}"`);let d=Zlr(Ih.readFileSync(u,"utf8"),u),y=d.name,D=d.description;if(typeof y!="string"||!eur(y))throw new Error(`build failed: skill "${a}" has an invalid frontmatter name; expected 1-${Ypt} lowercase letters, numbers, or single hyphens`);if(a!==y)throw new Error(`build failed: skill directory "${a}" must match its frontmatter name "${y}"`);if(typeof D!="string"||!tur(D))throw new Error(`build failed: skill "${a}" has an invalid frontmatter description; expected 1-${Qpt} characters`);return D}function Zlr(s,a){let u=/^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n|$)/.exec(s);if(!u?.[1])throw new Error(`build failed: skill file "${a}" must start with YAML frontmatter`);let d;try{d=Hpt.default.parse(u[1])}catch(y){throw new Error(`build failed: skill file "${a}" has malformed YAML frontmatter (${String(y)})`)}if(!d||typeof d!="object"||Array.isArray(d))throw new Error(`build failed: skill file "${a}" must have YAML object frontmatter`);return d}function eur(s){return s.length>=1&&s.length<=Ypt&&/^[a-z0-9-]+$/.test(s)&&!s.startsWith("-")&&!s.endsWith("-")&&!s.includes("--")}function tur(s){return s.trim().length>0&&s.length<=Qpt}var dNe=class s extends rue{static description="Build the extension to the output directory";static flags={environment:SO.Flags.option({char:"e",default:"dev",description:"Environment to build for",options:["dev","dist"]})(),output:SO.Flags.directory({char:"o",description:"Output path"}),"skip-types":SO.Flags.boolean({description:"Indicates whether to skip types generation "+IAe,default:!1,hidden:!0}),"print-tool-schemas":SO.Flags.boolean({description:"Indicates whether to print the schema tools "+IAe,default:!1,hidden:!0})};async run(){let{flags:a}=await this.parse(s),u=a.output||rO();await mNe({environment:a.environment,outputDir:u,skipTypeDeclarations:a["skip-types"],printExtractedSchemas:a["print-tool-schemas"]},()=>{}),a.output||await $pt("build-refresh")}};async function mNe(s,a){let u=AB();u.ai=afe(u.ai);let{manifest:d,duplicates:y}=Mnt(u);y.length>0&&Yf("warn",Bnt(y)),uY("skills",d.ai?.skills);let D=!1,I=(d.commands??[]).map(ut=>{let dr=Kpt(Ip.join("src",ut.name),["ts","tsx","js","jsx"]);if(dr)return dr.hasTypeScript&&(D=!0),dr.filePath;throw new Error(`build failed: could not find an entry point for the command "${ut.name}"
|
|
916
916
|
Make sure the command name in the package.json corresponds to a file in the src directory`)}),W=[],re=d.ai?.modelProvider;if(typeof re=="string"){let ut=Kpt(Ip.join("src",re),["ts","tsx","js","jsx"]);if(!ut)throw new Error(`build failed: could not find an entry point for the model provider "${re}"
|
|
917
917
|
Make sure ai.modelProvider in the package.json corresponds to a file in the src directory`);ut.hasTypeScript&&(D=!0),W.push(ut.filePath)}let ue=d.tools?.map(ut=>{for(let dr of["ts","tsx"]){let Kr=Ip.join("src","tools",ut.name+"."+dr);if(Fd.existsSync(Kr))return(dr==="ts"||dr==="tsx")&&(D=!0),Kr}for(let dr in["ts","tsx"]){let Kr=Ip.join("src",ut.name+"."+dr);if(Fd.existsSync(Kr))throw new Error(`build failed: the entry point tool "${ut.name}" is not the right folder
|
|
918
918
|
Move the file "${Kr}" in the src/tools directory`)}throw new Error(`build failed: could not find an entry point for the tool "${ut.name}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Ee=Object.create;var R=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var Ae=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Pe=(e,t)=>{for(var r in t)R(e,r,{get:t[r],enumerable:!0})},q=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Re(t))!Te.call(e,i)&&i!==r&&R(e,i,{get:()=>t[i],enumerable:!(s=ke(t,i))||s.enumerable});return e};var d=(e,t,r)=>(r=e!=null?Ee(Ae(e)):{},q(t||!e||!e.__esModule?R(r,"default",{value:e,enumerable:!0}):r,e)),De=e=>q(R({},"__esModule",{value:!0}),e);var N=w((rt,Y)=>{"use strict";var W=require("fs"),C;function Ie(){try{return W.statSync("/.dockerenv"),!0}catch{return!1}}function $e(){try{return W.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Y.exports=()=>(C===void 0&&(C=Ie()||$e()),C)});var V=w((nt,S)=>{"use strict";var ve=require("os"),Ce=require("fs"),K=N(),z=()=>{if(process.platform!=="linux")return!1;if(ve.release().toLowerCase().includes("microsoft"))return!K();try{return Ce.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!K():!1}catch{return!1}};process.env.__IS_WSL_TEST__?S.exports=z:S.exports=z()});var H=w((ot,X)=>{"use strict";X.exports=(e,t,r)=>{let s=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let i=r();return s(i),i},set(i){s(i)}}),e}});var ne=w((it,re)=>{var Ne=require("path"),Se=require("child_process"),{promises:T,constants:te}=require("fs"),A=V(),Fe=N(),M=H(),J=Ne.join(__dirname,"xdg-open"),{platform:y,arch:Z}=process,Me=()=>{try{return T.statSync("/run/.containerenv"),!0}catch{return!1}},F;function Be(){return F===void 0&&(F=Me()||Fe()),F}var Oe=(()=>{let e="/mnt/",t;return async function(){if(t)return t;let r="/etc/wsl.conf",s=!1;try{await T.access(r,te.F_OK),s=!0}catch{}if(!s)return e;let i=await T.readFile(r,{encoding:"utf8"}),a=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return a?(t=a.groups.mountPoint.trim(),t=t.endsWith("/")?t:`${t}/`,t):e}})(),Q=async(e,t)=>{let r;for(let s of e)try{return await t(s)}catch(i){r=i}throw r},P=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return Q(e.app,f=>P({...e,app:f}));let{name:t,arguments:r=[]}=e.app||{};if(r=[...r],Array.isArray(t))return Q(t,f=>P({...e,app:{name:f,arguments:r}}));let s,i=[],a={};if(y==="darwin")s="open",e.wait&&i.push("--wait-apps"),e.background&&i.push("--background"),e.newInstance&&i.push("--new"),t&&i.push("-a",t);else if(y==="win32"||A&&!Be()&&!t){let f=await Oe();s=A?`${f}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,i.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),A||(a.windowsVerbatimArguments=!0);let u=["Start"];e.wait&&u.push("-Wait"),t?(u.push(`"\`"${t}\`""`,"-ArgumentList"),e.target&&r.unshift(e.target)):e.target&&u.push(`"${e.target}"`),r.length>0&&(r=r.map(m=>`"\`"${m}\`""`),u.push(r.join(","))),e.target=Buffer.from(u.join(" "),"utf16le").toString("base64")}else{if(t)s=t;else{let f=!__dirname||__dirname==="/",u=!1;try{await T.access(J,te.X_OK),u=!0}catch{}s=process.versions.electron||y==="android"||f||!u?"xdg-open":J}r.length>0&&i.push(...r),e.wait||(a.stdio="ignore",a.detached=!0)}e.target&&i.push(e.target),y==="darwin"&&r.length>0&&i.push("--args",...r);let l=Se.spawn(s,i,a);return e.wait?new Promise((f,u)=>{l.once("error",u),l.once("close",m=>{if(!e.allowNonzeroExitCode&&m>0){u(new Error(`Exited with code ${m}`));return}f(l)})}):(l.unref(),l)},B=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return P({...t,target:e})},_e=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a `name`");let{arguments:r=[]}=t||{};if(r!=null&&!Array.isArray(r))throw new TypeError("Expected `appArguments` as Array type");return P({...t,app:{name:e,arguments:r}})};function ee(e){if(typeof e=="string"||Array.isArray(e))return e;let{[Z]:t}=e;if(!t)throw new Error(`${Z} is not supported`);return t}function O({[y]:e},{wsl:t}){if(t&&A)return ee(t);if(!e)throw new Error(`${y} is not supported`);return ee(e)}var D={};M(D,"chrome",()=>O({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));M(D,"firefox",()=>O({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));M(D,"edge",()=>O({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));B.apps=D;B.openApp=_e;re.exports=B});var ae=w((at,se)=>{var Ge=require("node:tty"),Le=Ge?.WriteStream?.prototype?.hasColors?.()??!1,o=(e,t)=>{if(!Le)return i=>i;let r=`\x1B[${e}m`,s=`\x1B[${t}m`;return i=>{let a=i+"",l=a.indexOf(s);if(l===-1)return r+a+s;let f=r,u=0,be=(t===22?s:"")+r;for(;l!==-1;)f+=a.slice(u,l)+be,u=l+s.length,l=a.indexOf(s,u);return f+=a.slice(u)+s,f}},n={};n.reset=o(0,0);n.bold=o(1,22);n.dim=o(2,22);n.italic=o(3,23);n.underline=o(4,24);n.overline=o(53,55);n.inverse=o(7,27);n.hidden=o(8,28);n.strikethrough=o(9,29);n.black=o(30,39);n.red=o(31,39);n.green=o(32,39);n.yellow=o(33,39);n.blue=o(34,39);n.magenta=o(35,39);n.cyan=o(36,39);n.white=o(37,39);n.gray=o(90,39);n.bgBlack=o(40,49);n.bgRed=o(41,49);n.bgGreen=o(42,49);n.bgYellow=o(43,49);n.bgBlue=o(44,49);n.bgMagenta=o(45,49);n.bgCyan=o(46,49);n.bgWhite=o(47,49);n.bgGray=o(100,49);n.redBright=o(91,39);n.greenBright=o(92,39);n.yellowBright=o(93,39);n.blueBright=o(94,39);n.magentaBright=o(95,39);n.cyanBright=o(96,39);n.whiteBright=o(97,39);n.bgRedBright=o(101,49);n.bgGreenBright=o(102,49);n.bgYellowBright=o(103,49);n.bgBlueBright=o(104,49);n.bgMagentaBright=o(105,49);n.bgCyanBright=o(106,49);n.bgWhiteBright=o(107,49);se.exports=n});var et={};Pe(et,{commFilePath:()=>j,notifyRaycast:()=>Ve,updatePid:()=>xe});module.exports=De(et);var h=require("node:child_process"),p=d(require("node:fs")),k=d(require("node:path")),we=d(ne());var oe=require("node:child_process");function ie(e){try{return(0,oe.execFileSync)("/usr/bin/lsappinfo",["find",`bundleid=${e}`],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}var c=d(ae()),je={wait:`\u{1F550}${(0,c.blue)("wait")} - `,info:`${process.env.GITHUB_ACTIONS==="true"?"\u2139\uFE0F":"\u2139\uFE0F "}${(0,c.cyan)("info")} - `,success:`\u2705${(0,c.green)("ready")} - `,warn:`${process.env.GITHUB_ACTIONS==="true"?"\u26A0\uFE0F":"\u26A0\uFE0F "}${(0,c.yellow)("warn")} - `,error:`\u{1F4A5}${(0,c.red)("error")} - `,event:`\u26A1\uFE0F${(0,c.magenta)("event")} - `,paymentPrompt:`\u{1F4B0}${(0,c.yellowBright)("plan")} - `};var ct=(0,c.blue)((0,c.dim)("internal only"));function _(e,t,r){console.log(je[e]+t),typeof r?.exit<"u"&&process.exit(r.exit)}var v=d(require("node:fs")),de=d(require("node:os")),L=d(require("node:path"));var ce=d(require("node:fs")),ue=d(require("node:path"));function I(){let e;try{e=ue.resolve("package.json")}catch(r){throw new Error(`cannot resolve package manifest path: ${r}`)}let t;try{t=JSON.parse(ce.readFileSync(e,"utf8"))}catch(r){throw new Error(`cannot read package manifest: ${r}`)}return t.name=t.name.replace(/^@workaround/g,""),t}var x={development:"development",internal:"internal",release:"release"},ft=Object.values(x),Ue={debug:"development",x:"","x-development":"development","x-internal":"internal"};function G(e){return Ue[e]??e}function le(e){let t=G(e);return t?{bundleID:`com.raycast.macos.${t}`,scheme:`raycast-${t}`}:{bundleID:"com.raycast.macos",scheme:"raycast"}}function fe(e){return e===x.release?"":e}var pe={production:{url:"https://www.raycast.com",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},staging:{url:"https://www.rayca.st",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},development:{url:"http://localhost:3000",clientID:"rOCD_LhnXFObSLu9v7788qOGu25FZDqEzGjet4Q45ZY"}}[process.env.API_ENV||"production"],qe="e69bae0ec90f5e838555",g={},ge;function b(){let e=I();if(!e.name)throw new Error("extension name in manifest cannot be empty");return L.join(ze(),"extensions",e.name)}function me(){return he().bundleID}function ye(){return he().scheme}function We(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||g.APIURL||pe.url;case"raycastAccessToken":return process.env.RAY_TOKEN||g.Token||g.AccessToken||"";case"raycastClientId":return process.env.RAY_CLIENT_ID||g.ClientID||pe.clientID;case"githubClientId":return process.env.RAY_GithubClientID||g.GithubClientID||qe;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||g.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target?process.env.RAY_Target:typeof g.Target<"u"?g.Target:$(x.release)}}function $(e){return typeof e<"u"?fe(e):G(We("flavorName"))}function he(){return le($(ge))}function Ye(e){return e==""?"raycast":`raycast-${e}`}function Ke(e){let t=L.join(de.default.homedir(),".config",Ye(e));return v.mkdirSync(t,{recursive:!0}),t}function ze(){return Ke($(ge))}async function Ve(e,t){let r=!1,s=Ze();switch(e){case"start":{He(),xe(),Xe();break}case"stop":{try{p.unlinkSync(j("log"))}catch{}try{p.unlinkSync(j("pid"))}catch{}break}default:r=!0}let i;try{i=I()}catch{return}(process.platform==="darwin"?ie(s.bundleID):process.platform==="win32"&&Qe())||_("warn","Raycast is not running"),r?Je(i.name,e,t,s):await U(i.name,e,t,s)}function j(e){return k.join(b(),e==="log"?"dev.log":"cli.pid")}function xe(){let e=b();try{p.mkdirSync(e,{recursive:!0})}catch(r){throw new Error(`cannot create output directory (${r.message})`)}let t=process.pid.toString();try{p.writeFileSync(k.join(e,"cli.pid"),t,{mode:420})}catch(r){throw new Error(`cannot write pid file (${r.message})`)}}function Xe(){let e=b();try{p.mkdirSync(e,{recursive:!0})}catch(t){throw new Error(`cannot create output directory (${t.message})`)}try{p.writeFileSync(k.join(e,"dev.log"),"")}catch(t){throw new Error(`cannot write log file (${t.message})`)}}function He(){let e=k.join(b(),"cli.pid");try{let r=p.readFileSync(e,"utf8").trim();process.platform==="win32"?(0,h.execSync)(`taskkill /F /PID ${r}`):(0,h.execSync)(`kill -9 ${r}`,{shell:"/bin/sh"})}catch{}}var E=null;function Je(e,t,r,s){E?(clearTimeout(E),E=setTimeout(()=>{U(e,t,r,s)},300)):(U(e,t,r,s),E=setTimeout(()=>{E=null},300))}async function U(e,t,r,s){let i=process.cwd(),a=`${s.scheme}://cli/${e}/${t}?cwd=${encodeURIComponent(i)}&info=${encodeURIComponent(r||"")}`;try{if(process.platform==="darwin"){(0,h.execFileSync)("/usr/bin/open",["-g","-b",s.bundleID,a],{stdio:"ignore"});return}await(0,we.default)(a,{background:!0})}catch(l){_("error",`cannot notify Raycast (${l.message})`)}}function Ze(){return{bundleID:me(),scheme:ye()}}function Qe(){try{return(0,h.execSync)('tasklist /FI "IMAGENAME eq Raycast.exe" /FO CSV /NH',{encoding:"utf8"}).toLowerCase().includes("raycast.exe")}catch{return!1}}0&&(module.exports={commFilePath,notifyRaycast,updatePid});
|
|
1
|
+
"use strict";var Ee=Object.create;var R=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var Ae=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Pe=(e,t)=>{for(var r in t)R(e,r,{get:t[r],enumerable:!0})},q=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Re(t))!Te.call(e,i)&&i!==r&&R(e,i,{get:()=>t[i],enumerable:!(s=ke(t,i))||s.enumerable});return e};var d=(e,t,r)=>(r=e!=null?Ee(Ae(e)):{},q(t||!e||!e.__esModule?R(r,"default",{value:e,enumerable:!0}):r,e)),De=e=>q(R({},"__esModule",{value:!0}),e);var N=w((rt,Y)=>{"use strict";var W=require("fs"),C;function Ie(){try{return W.statSync("/.dockerenv"),!0}catch{return!1}}function $e(){try{return W.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Y.exports=()=>(C===void 0&&(C=Ie()||$e()),C)});var V=w((nt,S)=>{"use strict";var ve=require("os"),Ce=require("fs"),K=N(),z=()=>{if(process.platform!=="linux")return!1;if(ve.release().toLowerCase().includes("microsoft"))return!K();try{return Ce.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!K():!1}catch{return!1}};process.env.__IS_WSL_TEST__?S.exports=z:S.exports=z()});var H=w((ot,X)=>{"use strict";X.exports=(e,t,r)=>{let s=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let i=r();return s(i),i},set(i){s(i)}}),e}});var ne=w((it,re)=>{var Ne=require("path"),Se=require("child_process"),{promises:T,constants:te}=require("fs"),A=V(),Fe=N(),M=H(),J=Ne.join(__dirname,"xdg-open"),{platform:y,arch:Z}=process,Me=()=>{try{return T.statSync("/run/.containerenv"),!0}catch{return!1}},F;function Be(){return F===void 0&&(F=Me()||Fe()),F}var Oe=(()=>{let e="/mnt/",t;return async function(){if(t)return t;let r="/etc/wsl.conf",s=!1;try{await T.access(r,te.F_OK),s=!0}catch{}if(!s)return e;let i=await T.readFile(r,{encoding:"utf8"}),a=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return a?(t=a.groups.mountPoint.trim(),t=t.endsWith("/")?t:`${t}/`,t):e}})(),Q=async(e,t)=>{let r;for(let s of e)try{return await t(s)}catch(i){r=i}throw r},P=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return Q(e.app,f=>P({...e,app:f}));let{name:t,arguments:r=[]}=e.app||{};if(r=[...r],Array.isArray(t))return Q(t,f=>P({...e,app:{name:f,arguments:r}}));let s,i=[],a={};if(y==="darwin")s="open",e.wait&&i.push("--wait-apps"),e.background&&i.push("--background"),e.newInstance&&i.push("--new"),t&&i.push("-a",t);else if(y==="win32"||A&&!Be()&&!t){let f=await Oe();s=A?`${f}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,i.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),A||(a.windowsVerbatimArguments=!0);let u=["Start"];e.wait&&u.push("-Wait"),t?(u.push(`"\`"${t}\`""`,"-ArgumentList"),e.target&&r.unshift(e.target)):e.target&&u.push(`"${e.target}"`),r.length>0&&(r=r.map(m=>`"\`"${m}\`""`),u.push(r.join(","))),e.target=Buffer.from(u.join(" "),"utf16le").toString("base64")}else{if(t)s=t;else{let f=!__dirname||__dirname==="/",u=!1;try{await T.access(J,te.X_OK),u=!0}catch{}s=process.versions.electron||y==="android"||f||!u?"xdg-open":J}r.length>0&&i.push(...r),e.wait||(a.stdio="ignore",a.detached=!0)}e.target&&i.push(e.target),y==="darwin"&&r.length>0&&i.push("--args",...r);let l=Se.spawn(s,i,a);return e.wait?new Promise((f,u)=>{l.once("error",u),l.once("close",m=>{if(!e.allowNonzeroExitCode&&m>0){u(new Error(`Exited with code ${m}`));return}f(l)})}):(l.unref(),l)},B=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return P({...t,target:e})},_e=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a `name`");let{arguments:r=[]}=t||{};if(r!=null&&!Array.isArray(r))throw new TypeError("Expected `appArguments` as Array type");return P({...t,app:{name:e,arguments:r}})};function ee(e){if(typeof e=="string"||Array.isArray(e))return e;let{[Z]:t}=e;if(!t)throw new Error(`${Z} is not supported`);return t}function O({[y]:e},{wsl:t}){if(t&&A)return ee(t);if(!e)throw new Error(`${y} is not supported`);return ee(e)}var D={};M(D,"chrome",()=>O({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));M(D,"firefox",()=>O({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));M(D,"edge",()=>O({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));B.apps=D;B.openApp=_e;re.exports=B});var ae=w((at,se)=>{var Ge=require("node:tty"),Le=Ge?.WriteStream?.prototype?.hasColors?.()??!1,o=(e,t)=>{if(!Le)return i=>i;let r=`\x1B[${e}m`,s=`\x1B[${t}m`;return i=>{let a=i+"",l=a.indexOf(s);if(l===-1)return r+a+s;let f=r,u=0,be=(t===22?s:"")+r;for(;l!==-1;)f+=a.slice(u,l)+be,u=l+s.length,l=a.indexOf(s,u);return f+=a.slice(u)+s,f}},n={};n.reset=o(0,0);n.bold=o(1,22);n.dim=o(2,22);n.italic=o(3,23);n.underline=o(4,24);n.overline=o(53,55);n.inverse=o(7,27);n.hidden=o(8,28);n.strikethrough=o(9,29);n.black=o(30,39);n.red=o(31,39);n.green=o(32,39);n.yellow=o(33,39);n.blue=o(34,39);n.magenta=o(35,39);n.cyan=o(36,39);n.white=o(37,39);n.gray=o(90,39);n.bgBlack=o(40,49);n.bgRed=o(41,49);n.bgGreen=o(42,49);n.bgYellow=o(43,49);n.bgBlue=o(44,49);n.bgMagenta=o(45,49);n.bgCyan=o(46,49);n.bgWhite=o(47,49);n.bgGray=o(100,49);n.redBright=o(91,39);n.greenBright=o(92,39);n.yellowBright=o(93,39);n.blueBright=o(94,39);n.magentaBright=o(95,39);n.cyanBright=o(96,39);n.whiteBright=o(97,39);n.bgRedBright=o(101,49);n.bgGreenBright=o(102,49);n.bgYellowBright=o(103,49);n.bgBlueBright=o(104,49);n.bgMagentaBright=o(105,49);n.bgCyanBright=o(106,49);n.bgWhiteBright=o(107,49);se.exports=n});var et={};Pe(et,{commFilePath:()=>j,notifyRaycast:()=>Ve,updatePid:()=>xe});module.exports=De(et);var h=require("node:child_process"),p=d(require("node:fs")),k=d(require("node:path")),we=d(ne());var oe=require("node:child_process");function ie(e){try{return(0,oe.execFileSync)("/usr/bin/lsappinfo",["find",`bundleid=${e}`],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().length>0}catch{return!1}}var c=d(ae()),je={wait:`\u{1F550}${(0,c.blue)("wait")} - `,info:`${process.env.GITHUB_ACTIONS==="true"?"\u2139\uFE0F":"\u2139\uFE0F "}${(0,c.cyan)("info")} - `,success:`\u2705${(0,c.green)("ready")} - `,warn:`${process.env.GITHUB_ACTIONS==="true"?"\u26A0\uFE0F":"\u26A0\uFE0F "}${(0,c.yellow)("warn")} - `,error:`\u{1F4A5}${(0,c.red)("error")} - `,event:`\u26A1\uFE0F${(0,c.magenta)("event")} - `,paymentPrompt:`\u{1F4B0}${(0,c.yellowBright)("plan")} - `};var ct=(0,c.blue)((0,c.dim)("internal only"));function _(e,t,r){console.log(je[e]+t),typeof r?.exit<"u"&&process.exit(r.exit)}var v=d(require("node:fs")),de=d(require("node:os")),L=d(require("node:path"));var ce=d(require("node:fs")),ue=d(require("node:path"));function I(){let e;try{e=ue.resolve("package.json")}catch(r){throw new Error(`cannot resolve package manifest path: ${r}`)}let t;try{t=JSON.parse(ce.readFileSync(e,"utf8"))}catch(r){throw new Error(`cannot read package manifest: ${r}`)}return t.name=t.name.replace(/^@workaround/g,""),t}var x={development:"development",internal:"internal",release:"release"},ft=Object.values(x),Ue={debug:"development",x:"","x-development":"development","x-internal":"internal"};function G(e){return Ue[e]??e}function le(e){let t=G(e);return t?{bundleID:`com.raycast.macos.${t}`,scheme:`raycast-${t}`}:{bundleID:"com.raycast.macos",scheme:"raycast"}}function fe(e){return e===x.release?"":e}var pe={production:{url:"https://www.raycast.com",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},staging:{url:"https://www.rayca.st",clientID:"KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I"},development:{url:"http://localhost:3000",clientID:"rOCD_LhnXFObSLu9v7788qOGu25FZDqEzGjet4Q45ZY"}}[process.env.API_ENV||"production"],qe="e69bae0ec90f5e838555",g={},ge;function b(){let e=I();if(!e.name)throw new Error("extension name in manifest cannot be empty");return L.join(ze(),"extensions",e.name)}function me(){return he().bundleID}function ye(){return he().scheme}function We(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||g.APIURL||pe.url;case"raycastAccessToken":return process.env.RAY_TOKEN||g.Token||g.AccessToken||"";case"raycastClientId":return process.env.RAY_CLIENT_ID||g.ClientID||pe.clientID;case"githubClientId":return process.env.RAY_GithubClientID||g.GithubClientID||qe;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||g.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target?process.env.RAY_Target:typeof g.Target<"u"?g.Target:$(x.release)}}function $(e){return typeof e<"u"?fe(e):G(We("flavorName"))}function he(){return le($(ge))}function Ye(e){return e==""?"raycast":`raycast-${e}`}function Ke(e){let t=L.join(de.default.homedir(),".config",Ye(e));return v.mkdirSync(t,{recursive:!0}),t}function ze(){return Ke($(ge))}async function Ve(e,t){let r=!1,s=Ze();switch(e){case"start":{He(),xe(),Xe();break}case"stop":{try{p.unlinkSync(j("log"))}catch{}try{p.unlinkSync(j("pid"))}catch{}break}default:r=!0}let i;try{i=I()}catch{return}let a=process.platform==="darwin"?ie(s.bundleID):process.platform==="win32"&&Qe();e==="build-refresh"&&!a||(a||_("warn","Raycast is not running"),r?Je(i.name,e,t,s):await U(i.name,e,t,s))}function j(e){return k.join(b(),e==="log"?"dev.log":"cli.pid")}function xe(){let e=b();try{p.mkdirSync(e,{recursive:!0})}catch(r){throw new Error(`cannot create output directory (${r.message})`)}let t=process.pid.toString();try{p.writeFileSync(k.join(e,"cli.pid"),t,{mode:420})}catch(r){throw new Error(`cannot write pid file (${r.message})`)}}function Xe(){let e=b();try{p.mkdirSync(e,{recursive:!0})}catch(t){throw new Error(`cannot create output directory (${t.message})`)}try{p.writeFileSync(k.join(e,"dev.log"),"")}catch(t){throw new Error(`cannot write log file (${t.message})`)}}function He(){let e=k.join(b(),"cli.pid");try{let r=p.readFileSync(e,"utf8").trim();process.platform==="win32"?(0,h.execSync)(`taskkill /F /PID ${r}`):(0,h.execSync)(`kill -9 ${r}`,{shell:"/bin/sh"})}catch{}}var E=null;function Je(e,t,r,s){E?(clearTimeout(E),E=setTimeout(()=>{U(e,t,r,s)},300)):(U(e,t,r,s),E=setTimeout(()=>{E=null},300))}async function U(e,t,r,s){let i=process.cwd(),a=`${s.scheme}://cli/${e}/${t}?cwd=${encodeURIComponent(i)}&info=${encodeURIComponent(r||"")}`;try{if(process.platform==="darwin"){(0,h.execFileSync)("/usr/bin/open",["-g","-b",s.bundleID,a],{stdio:"ignore"});return}await(0,we.default)(a,{background:!0})}catch(l){_("error",`cannot notify Raycast (${l.message})`)}}function Ze(){return{bundleID:me(),scheme:ye()}}function Qe(){try{return(0,h.execSync)('tasklist /FI "IMAGENAME eq Raycast.exe" /FO CSV /NH',{encoding:"utf8"}).toLowerCase().includes("raycast.exe")}catch{return!1}}0&&(module.exports={commFilePath,notifyRaycast,updatePid});
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -540,20 +540,9 @@ export declare namespace AI {
|
|
|
540
540
|
};
|
|
541
541
|
/**
|
|
542
542
|
* The AI model to use to answer to the prompt.
|
|
543
|
-
* @defaultValue `AI.Model["OpenAI_GPT-
|
|
543
|
+
* @defaultValue `AI.Model["OpenAI_GPT-6_Luna"]`
|
|
544
544
|
*/
|
|
545
545
|
export enum Model {
|
|
546
|
-
"OpenAI_GPT-5_mini" = "openai-gpt-5-mini",
|
|
547
|
-
"OpenAI_GPT-5_nano" = "openai-gpt-5-nano",
|
|
548
|
-
"OpenAI_GPT-4.1" = "openai-gpt-4.1",
|
|
549
|
-
"OpenAI_GPT-4.1_mini" = "openai-gpt-4.1-mini",
|
|
550
|
-
"OpenAI_GPT-4.1_nano" = "openai-gpt-4.1-nano",
|
|
551
|
-
"OpenAI_GPT-4" = "openai-gpt-4",
|
|
552
|
-
"OpenAI_GPT-4o" = "openai-gpt-4o",
|
|
553
|
-
"OpenAI_GPT-4o_mini" = "openai-gpt-4o-mini",
|
|
554
|
-
"OpenAI_GPT-5.1" = "openai-gpt-5.1",
|
|
555
|
-
"OpenAI_GPT-5.2" = "openai-gpt-5.2",
|
|
556
|
-
"OpenAI_GPT-5.3_Instant" = "openai-gpt-5.3-instant",
|
|
557
546
|
"OpenAI_GPT-5.3_Codex" = "openai-gpt-5.3-codex",
|
|
558
547
|
"OpenAI_GPT-5.4" = "openai-gpt-5.4",
|
|
559
548
|
"OpenAI_GPT-5.4_mini" = "openai-gpt-5.4-mini",
|
|
@@ -566,13 +555,12 @@ export declare namespace AI {
|
|
|
566
555
|
"OpenAI_GPT-6_Astra" = "openai-gpt-6-astra",
|
|
567
556
|
"OpenAI_GPT-6_Sol" = "openai-gpt-6-sol",
|
|
568
557
|
"OpenAI_GPT-6_Luna" = "openai-gpt-6-luna",
|
|
569
|
-
"OpenAI_o4-mini" = "openai_o1-o4-mini",
|
|
570
|
-
"OpenAI_o3-mini" = "openai_o1-o3-mini",
|
|
571
558
|
"Groq_GPT-OSS_20b" = "groq-openai/gpt-oss-20b",
|
|
572
559
|
"Groq_GPT-OSS_120b" = "groq-openai/gpt-oss-120b",
|
|
573
560
|
"Anthropic_Claude_Haiku_4.5" = "anthropic-claude-4-5-haiku",
|
|
574
561
|
"Anthropic_Claude_Sonnet_4.6" = "anthropic-claude-sonnet-4-6",
|
|
575
562
|
"Anthropic_Claude_Sonnet_5" = "anthropic-claude-sonnet-5",
|
|
563
|
+
"Anthropic_Claude_Sonnet_5.5" = "anthropic-claude-sonnet-5-5",
|
|
576
564
|
"Anthropic_Claude_Opus_4.7" = "anthropic-claude-opus-4-7",
|
|
577
565
|
"Anthropic_Claude_Opus_4.8" = "anthropic-claude-opus-4-8",
|
|
578
566
|
"Anthropic_Claude_Opus_5" = "anthropic-claude-opus-5",
|
|
@@ -593,9 +581,6 @@ export declare namespace AI {
|
|
|
593
581
|
"Google_Gemini_3.1_Flash_Lite" = "google-gemini-3.1-flash-lite",
|
|
594
582
|
"Google_Gemini_3_Flash" = "google-gemini-3-flash",
|
|
595
583
|
"Google_Gemini_3.1_Pro" = "google-gemini-3.1-pro",
|
|
596
|
-
"Google_Gemini_2.5_Pro" = "google-gemini-2.5-pro",
|
|
597
|
-
"Google_Gemini_2.5_Flash" = "google-gemini-2.5-flash",
|
|
598
|
-
"Google_Gemini_2.5_Flash_Lite" = "google-gemini-2.5-flash-lite",
|
|
599
584
|
"xAI_Grok-4.7" = "xai-grok-4.7",
|
|
600
585
|
"xAI_Grok-4.6" = "xai-grok-4.6",
|
|
601
586
|
"xAI_Grok-4.5" = "xai-grok-4.5",
|
|
@@ -612,6 +597,38 @@ export declare namespace AI {
|
|
|
612
597
|
"Vercel_DeepSeek_V4.1_Flash" = "gateway-deepseek/deepseek-v4.1-flash",
|
|
613
598
|
"Vercel_DeepSeek_V4_Pro" = "gateway-deepseek/deepseek-v4-pro-0813",
|
|
614
599
|
"Vercel_Qwen3.8_Max" = "gateway-alibaba/qwen3.8-max",
|
|
600
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-5.4_mini"]` instead */
|
|
601
|
+
"OpenAI_GPT-5_mini" = "openai-gpt-5-mini",
|
|
602
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-5.4_nano"]` instead */
|
|
603
|
+
"OpenAI_GPT-5_nano" = "openai-gpt-5-nano",
|
|
604
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Sol"]` instead */
|
|
605
|
+
"OpenAI_GPT-4.1" = "openai-gpt-4.1",
|
|
606
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Luna"]` instead */
|
|
607
|
+
"OpenAI_GPT-4.1_mini" = "openai-gpt-4.1-mini",
|
|
608
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Luna"]` instead */
|
|
609
|
+
"OpenAI_GPT-4.1_nano" = "openai-gpt-4.1-nano",
|
|
610
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Sol"]` instead */
|
|
611
|
+
"OpenAI_GPT-4" = "openai-gpt-4",
|
|
612
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Sol"]` instead */
|
|
613
|
+
"OpenAI_GPT-4o" = "openai-gpt-4o",
|
|
614
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Luna"]` instead */
|
|
615
|
+
"OpenAI_GPT-4o_mini" = "openai-gpt-4o-mini",
|
|
616
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Sol"]` instead */
|
|
617
|
+
"OpenAI_GPT-5.1" = "openai-gpt-5.1",
|
|
618
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Sol"]` instead */
|
|
619
|
+
"OpenAI_GPT-5.2" = "openai-gpt-5.2",
|
|
620
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Sol"]` instead */
|
|
621
|
+
"OpenAI_GPT-5.3_Instant" = "openai-gpt-5.3-instant",
|
|
622
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Luna"]` instead */
|
|
623
|
+
"OpenAI_o4-mini" = "openai_o1-o4-mini",
|
|
624
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Luna"]` instead */
|
|
625
|
+
"OpenAI_o3-mini" = "openai_o1-o3-mini",
|
|
626
|
+
/** @deprecated Use `AI.Model["Google_Gemini_3.1_Pro"]` instead */
|
|
627
|
+
"Google_Gemini_2.5_Pro" = "google-gemini-2.5-pro",
|
|
628
|
+
/** @deprecated Use `AI.Model["Google_Gemini_3.8_Flash"]` instead */
|
|
629
|
+
"Google_Gemini_2.5_Flash" = "google-gemini-2.5-flash",
|
|
630
|
+
/** @deprecated Use `AI.Model["Google_Gemini_3.5_Flash_Lite"]` instead */
|
|
631
|
+
"Google_Gemini_2.5_Flash_Lite" = "google-gemini-2.5-flash-lite",
|
|
615
632
|
/** @deprecated Use `AI.Model["OpenAI_GPT-5.6_Terra"]` instead */
|
|
616
633
|
"OpenAI_GPT-5" = "openai-gpt-5.6-terra",
|
|
617
634
|
/** @deprecated Use `AI.Model["OpenAI_GPT-5.6_Terra"]` instead */
|
|
@@ -698,11 +715,11 @@ export declare namespace AI {
|
|
|
698
715
|
"xAI_Grok-2" = "xai-grok-4.3",
|
|
699
716
|
/** @deprecated Use `AI.Model["Anthropic_Claude_Sonnet_5"]` instead */
|
|
700
717
|
"Anthropic_Claude_3.7_Sonnet" = "anthropic-claude-sonnet-5",
|
|
701
|
-
/** @deprecated Use `AI.Model["OpenAI_GPT-
|
|
718
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Luna"]` instead */
|
|
702
719
|
"OpenAI_GPT3.5-turbo-instruct" = "openai-gpt-4o-mini",
|
|
703
720
|
/** @deprecated Use `AI.Model["Anthropic_Claude_Opus_4.8"]` instead */
|
|
704
721
|
"Anthropic_Claude_Opus" = "anthropic-claude-opus-4-8",
|
|
705
|
-
/** @deprecated Use `AI.Model["
|
|
722
|
+
/** @deprecated Use `AI.Model["Google_Gemini_3.8_Flash"]` instead */
|
|
706
723
|
"Google_Gemini_2.0_Flash_Thinking" = "google-gemini-2.5-flash",
|
|
707
724
|
/** @deprecated Use `AI.Model["Groq_GPT-OSS_120b"]` instead */
|
|
708
725
|
"Llama2_70B" = "groq-openai/gpt-oss-120b",
|
|
@@ -716,7 +733,7 @@ export declare namespace AI {
|
|
|
716
733
|
"Perplexity_Llama3_Sonar_Large" = "perplexity-sonar",
|
|
717
734
|
/** @deprecated Use `AI.Model["Perplexity_Sonar"]` instead */
|
|
718
735
|
"Perplexity_Llama3_Sonar_Small" = "perplexity-sonar",
|
|
719
|
-
/** @deprecated Use `AI.Model["OpenAI_GPT-
|
|
736
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Luna"]` instead */
|
|
720
737
|
"OpenAI_GPT3.5-turbo" = "openai-gpt-4o-mini",
|
|
721
738
|
/** @deprecated Use `AI.Model["Groq_GPT-OSS_120b"]` instead */
|
|
722
739
|
"Llama3.1_70B" = "groq-openai/gpt-oss-120b",
|
|
@@ -734,17 +751,17 @@ export declare namespace AI {
|
|
|
734
751
|
"Together_DeepSeek_R1" = "openai-gpt-5.4-mini",
|
|
735
752
|
/** @deprecated Use `AI.Model["Mistral_Nemo"]` instead */
|
|
736
753
|
"MixtraL_8x7B" = "mistral-open-mistral-nemo",
|
|
737
|
-
/** @deprecated Use `AI.Model["
|
|
754
|
+
/** @deprecated Use `AI.Model["Google_Gemini_3.8_Flash"]` instead */
|
|
738
755
|
"Google_Gemini_1.5_Flash" = "google-gemini-2.5-flash",
|
|
739
|
-
/** @deprecated Use `AI.Model["
|
|
756
|
+
/** @deprecated Use `AI.Model["Google_Gemini_3.8_Flash"]` instead */
|
|
740
757
|
"Google_Gemini_1.5_Pro" = "google-gemini-2.5-flash",
|
|
741
758
|
/** @deprecated Use `AI.Model["Mistral_Nemo"]` instead */
|
|
742
759
|
"Mixtral_8x7B" = "mistral-open-mistral-nemo",
|
|
743
|
-
/** @deprecated Use `AI.Model["OpenAI_GPT-
|
|
760
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Luna"]` instead */
|
|
744
761
|
"Qwen_2.5_32B" = "openai-gpt-4o-mini",
|
|
745
762
|
/** @deprecated Use `AI.Model["OpenAI_GPT-5.6_Terra"]` instead */
|
|
746
763
|
"OpenAI_o1-preview" = "openai-gpt-5.6-terra",
|
|
747
|
-
/** @deprecated Use `AI.Model["
|
|
764
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Luna"]` instead */
|
|
748
765
|
"OpenAI_o1-mini" = "openai_o1-o4-mini",
|
|
749
766
|
/** @deprecated Use `AI.Model["Groq_GPT-OSS_120b"]` instead */
|
|
750
767
|
"Llama3_70B" = "groq-openai/gpt-oss-120b",
|
|
@@ -764,19 +781,19 @@ export declare namespace AI {
|
|
|
764
781
|
"OpenAI_GPT5-mini" = "openai-gpt-5-mini",
|
|
765
782
|
/** @deprecated Use `AI.Model["OpenAI_GPT-5.4_nano"]` instead */
|
|
766
783
|
"OpenAI_GPT5-nano" = "openai-gpt-5-nano",
|
|
767
|
-
/** @deprecated Use `AI.Model["OpenAI_GPT-
|
|
784
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Sol"]` instead */
|
|
768
785
|
"OpenAI_GPT4" = "openai-gpt-4",
|
|
769
786
|
/** @deprecated Use `AI.Model["OpenAI_GPT-5.6_Terra"]` instead */
|
|
770
787
|
"OpenAI_GPT4-turbo" = "openai-gpt-5.6-terra",
|
|
771
|
-
/** @deprecated Use `AI.Model["OpenAI_GPT-
|
|
788
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Sol"]` instead */
|
|
772
789
|
"OpenAI_GPT4.1" = "openai-gpt-4.1",
|
|
773
|
-
/** @deprecated Use `AI.Model["OpenAI_GPT-
|
|
790
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Luna"]` instead */
|
|
774
791
|
"OpenAI_GPT4.1-nano" = "openai-gpt-4.1-nano",
|
|
775
|
-
/** @deprecated Use `AI.Model["OpenAI_GPT-
|
|
792
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Luna"]` instead */
|
|
776
793
|
"OpenAI_GPT4.1-mini" = "openai-gpt-4.1-mini",
|
|
777
|
-
/** @deprecated Use `AI.Model["OpenAI_GPT-
|
|
794
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Sol"]` instead */
|
|
778
795
|
"OpenAI_GPT4o" = "openai-gpt-4o",
|
|
779
|
-
/** @deprecated Use `AI.Model["OpenAI_GPT-
|
|
796
|
+
/** @deprecated Use `AI.Model["OpenAI_GPT-6_Luna"]` instead */
|
|
780
797
|
"OpenAI_GPT4o-mini" = "openai-gpt-4o-mini",
|
|
781
798
|
/** @deprecated Use `AI.Model["Anthropic_Claude_Haiku_4.5"]` instead */
|
|
782
799
|
"Anthropic_Claude_Haiku" = "anthropic-claude-4-5-haiku",
|
|
@@ -2978,9 +2995,13 @@ declare type ExtensionModelMessage = {
|
|
|
2978
2995
|
|
|
2979
2996
|
declare type ExtensionModelProviderOptions = Record<string, Record<string, unknown>> & {
|
|
2980
2997
|
raycast: Record<string, unknown> & {
|
|
2981
|
-
locale
|
|
2982
|
-
currentDate
|
|
2998
|
+
locale: string;
|
|
2999
|
+
currentDate: string;
|
|
2983
3000
|
reasoningEffort?: string;
|
|
3001
|
+
/**
|
|
3002
|
+
* The chat/session ID, stable across turns in the same conversation.
|
|
3003
|
+
*/
|
|
3004
|
+
sessionId: string;
|
|
2984
3005
|
};
|
|
2985
3006
|
};
|
|
2986
3007
|
|
|
@@ -2990,7 +3011,7 @@ declare type ExtensionModelRequest = {
|
|
|
2990
3011
|
temperature?: number;
|
|
2991
3012
|
tools?: ExtensionModelToolSet;
|
|
2992
3013
|
toolChoice?: "auto" | "required";
|
|
2993
|
-
providerOptions
|
|
3014
|
+
providerOptions: ExtensionModelProviderOptions;
|
|
2994
3015
|
};
|
|
2995
3016
|
|
|
2996
3017
|
declare type ExtensionModelStream = ExtensionModelFullStream | ExtensionModelTextStream | {
|