makecoder 4.1.28 → 4.1.30

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/coder.js CHANGED
@@ -21,7 +21,7 @@ entry=${o}
21
21
  apikey=${t||""}
22
22
  baseurl=${s||""}
23
23
  `;return Ae.writeFileSync(`${l}.conf`,d,{mode:384}),process.env.CODER_DEBUG&&(console.log(`[codex app] cdx-shim \u5DF2\u5B89\u88C5: ${l}`),console.log(`[codex app] exec=${r} entry=${o}`)),l}_injectDesktopEnv(t,s){if(process.platform!=="darwin")return null;let n;try{n=this._installShim({apikey:t,coderBaseUrl:s})}catch(i){return process.env.CODER_DEBUG&&console.log(`[codex app] \u5B89\u88C5 cdx-shim \u5931\u8D25\uFF0C\u8DF3\u8FC7 CODEX_CLI_PATH \u6CE8\u5165\uFF1B\u684C\u9762 App \u5C06\u4F7F\u7528\u81EA\u5E26 codex\uFF08\u4E0D\u8D70\u4EE3\u7406\uFF09: ${i.message}`),null}let r={CODEX_CLI_PATH:n};t&&(r.CODER_APIKEY=t);let o=[];for(let[i,a]of Object.entries(r))try{po("launchctl",["setenv",i,a],{stdio:"ignore"}),o.push(i)}catch(c){process.env.CODER_DEBUG&&console.log(`[codex app] launchctl setenv ${i} \u5931\u8D25: ${c.message}`)}return process.env.CODER_DEBUG&&o.length&&console.log(`[codex app] \u5DF2\u6CE8\u5165 launchd \u73AF\u5883\u53D8\u91CF: ${o.join(", ")} (shim: ${n})`),o.length?o:null}_removeDesktopEnv(t){for(let s of t)try{po("launchctl",["unsetenv",s],{stdio:"ignore"})}catch(n){process.env.CODER_DEBUG&&console.log(`[codex app] launchctl unsetenv ${s} \u5931\u8D25: ${n.message}`)}}};function uS(e,t){let s=jd(e),n=jd(t),r=Math.max(s.length,n.length);for(let o=0;o<r;o++){let i=s[o]||0,a=n[o]||0;if(i<a)return!0;if(i>a)return!1}return!1}function jd(e){return String(e).replace(/^v/i,"").split(".").map(t=>Number.parseInt(t,10)).map(t=>Number.isFinite(t)?t:0)}function pS(e){let t=String(e||"").split(/\r?\n/);for(let s of t){if(!s.includes("/Volumes/"))continue;let r=s.split(" ").find(i=>i.trim().startsWith("/Volumes/"));if(r)return r.trim();let o=s.match(/(\/Volumes\/.+)$/);if(o)return o[1].trim()}return null}Pd.exports=da});var go=S((rM,Bd)=>{var mS=Ad(),fS=vd(),hS=Dd(),gS=Rd(),yS=Md();function Fd(){let e=new mS;if(process.env.CODER_DEBUG)try{console.error(`[DEBUG] ClaudeBunLauncher selected, executable: ${e.findExecutablePath()}`)}catch(t){console.error(`[DEBUG] ClaudeBunLauncher executable not yet resolved: ${t.message}`)}return e}var ho={claude:{aliases:["claude"],description:"Claude Code \u667A\u80FD\u4F53\uFF08\u9ED8\u8BA4\uFF09",create:Fd,mapArgs:e=>e},"claude-app":{aliases:["claude-app"],description:"\u914D\u7F6E Claude Desktop\uFF08macOS\uFF09\u8D70 coder API\uFF1Asetup|restore|status",create:()=>new fS,mapArgs:e=>e},codex:{aliases:["codex"],description:"OpenAI Codex \u667A\u80FD\u4F53",create:()=>new gS,mapArgs:e=>e},"codex-app":{aliases:["codex-app"],description:"\u914D\u7F6E Codex Desktop\uFF08macOS\uFF09\u8D70 coder API",create:()=>new yS,mapArgs:e=>["app",...e]},gemini:{aliases:["gemini"],description:"Gemini \u667A\u80FD\u4F53",create:()=>new hS,mapArgs:e=>e}},qd=Object.keys(ho),_S=new Set(["claude","codex","gemini"]);function wS(e){return Object.prototype.hasOwnProperty.call(ho,e)}function Gd(e){return ho[e]||null}async function bS(e,t,s){let n=Gd(e);return n?await n.create().launch({remainingArgs:n.mapArgs(t),coderBaseUrl:s.getCoderBaseUrl(),apikey:s.getApiKey()}):(s.fail(`unknown agent: ${e}`,`available: ${qd.join(" | ")}`),1)}Bd.exports={AGENTS:ho,AGENT_NAMES:qd,SHORTCUTS:_S,isAgentName:wS,getAgent:Gd,launchAgent:bS,createClaudeLauncher:Fd}});var Xd=S((oM,zd)=>{var mr=require("fs"),Wd=require("path"),{spawn:Hd}=require("child_process"),ua=class{constructor(){this.extensionId="codev.codev-background";let t=require.main?Wd.dirname(require.main.filename):__dirname;this.extensionPath=Wd.resolve(t,"vendor/claude-code.vsix"),this._codeCommand=null}async resolveCodeCommand(){if(this._codeCommand)return this._codeCommand;if(process.env.IS_AISTUDIO==="True"){let t="/usr/lib/aistudio/lib/vscode/bin/remote-cli/aistudio";if(mr.existsSync(t))try{return mr.accessSync(t,mr.constants.F_OK|mr.constants.X_OK),this._codeCommand=t,process.env.CODER_DEBUG&&console.log(`Using AI Studio VSCode path: ${t}`),this._codeCommand}catch(s){process.env.CODER_DEBUG&&console.log(`AI Studio path exists but not executable: ${s.message}`)}else process.env.CODER_DEBUG&&console.log(`AI Studio path not found: ${t}`)}try{let{spawn:t}=require("child_process");return new Promise(s=>{let n=t("which",["code"],{stdio:["ignore","pipe","ignore"]}),r="";n.stdout.on("data",o=>{r+=o.toString().trim()}),n.on("close",o=>{o===0&&r?(this._codeCommand=r,process.env.CODER_DEBUG&&console.log(`Resolved code command path: ${r}`),s(this._codeCommand)):(this._codeCommand="code",s(this._codeCommand))}),n.on("error",()=>{this._codeCommand="code",s(this._codeCommand)}),setTimeout(()=>{n.kill(),this._codeCommand="code",s(this._codeCommand)},3e3)})}catch{return this._codeCommand="code",this._codeCommand}}async shouldInstallExtension(){try{return process.env.IS_AISTUDIO!=="True"?(process.env.CODER_DEBUG&&console.log("Not in AI Studio environment (IS_AISTUDIO!=True), skipping extension installation"),!1):await this.isVSCodeAvailable()?await this.isExtensionInstalled()?(process.env.CODER_DEBUG&&console.log(`Extension ${this.extensionId} already installed`),!1):!!mr.existsSync(this.extensionPath):(process.env.CODER_DEBUG&&console.log("VSCode not available, skipping extension installation"),!1)}catch(t){return process.env.CODER_DEBUG&&console.error(`Error checking extension installation status: ${t.message}`),!1}}async installExtension(){try{return console.log("Installing Codev VSCode extension..."),await this.executeVSCodeCommand(["--install-extension",this.extensionPath])?(console.log("\u2705 Codev VSCode extension installed successfully"),!0):(console.warn("\u274C Failed to install Codev VSCode extension"),!1)}catch(t){return console.warn(`Error installing VSCode extension: ${t.message}`),!1}}async isVSCodeAvailable(){try{let t=process.env.IS_AISTUDIO==="True"?["--help"]:["--version"],s=await this.executeVSCodeCommand(t,{timeout:1e4});if(process.env.CODER_DEBUG&&(console.log(`VSCode availability check (${t.join(" ")}): ${s?"available":"unavailable"}`),process.env.IS_AISTUDIO==="True")){let{spawn:n}=require("child_process");try{n("which",["code"],{stdio:["ignore","pipe","ignore"]}).stdout.on("data",o=>{console.log("which code:",o.toString().trim())})}catch(r){console.log("which command failed:",r.message)}}return s}catch(t){return process.env.CODER_DEBUG&&console.error("VSCode availability check error:",t.message),!1}}async isExtensionInstalled(){let t=await this.resolveCodeCommand();try{return new Promise(s=>{try{let n={stdio:["ignore","pipe","ignore"],shell:!1,env:{...process.env,PATH:process.env.PATH,HOME:process.env.HOME,USER:process.env.USER}};process.env.CODER_DEBUG&&console.log(`Spawning: ${t} --list-extensions`);let r=Hd(t,["--list-extensions"],n),o="";r.stdout.on("data",i=>{o+=i.toString()}),r.on("close",i=>{if(i===0){let a=o.split(`
24
- `).map(c=>c.trim());s(a.includes(this.extensionId))}else s(!1)}),r.on("error",i=>{process.env.CODER_DEBUG&&(console.error("VSCode list extensions error:",i.message),console.error("Error code:",i.code),console.error("Error errno:",i.errno),console.error("Error syscall:",i.syscall)),s(!1)}),setTimeout(()=>{try{r.kill()}catch{}s(!1)},1e4)}catch(n){process.env.CODER_DEBUG&&console.error("Failed to spawn VSCode list extensions:",n.message),s(!1)}})}catch{return!1}}async executeVSCodeCommand(t,s={}){let n=await this.resolveCodeCommand();return new Promise(r=>{try{let o={stdio:"ignore",shell:!1,env:{...process.env,PATH:process.env.PATH,HOME:process.env.HOME,USER:process.env.USER}};process.env.CODER_DEBUG&&console.log(`Spawning: ${n} ${t.join(" ")}`);let i=Hd(n,t,o);i.on("close",c=>{r(c===0)}),i.on("error",c=>{process.env.CODER_DEBUG&&(console.error("VSCode command error:",c.message),console.error("Error code:",c.code),console.error("Error errno:",c.errno),console.error("Error syscall:",c.syscall)),r(!1)});let a=s.timeout||3e4;setTimeout(()=>{try{i.kill()}catch{}r(!1)},a)}catch(o){process.env.CODER_DEBUG&&console.error("Failed to spawn VSCode command:",o.message),r(!1)}})}async ensureExtensionInstalled(){try{process.env.CODER_DEBUG&&console.log("VSCode Extension Service: Checking extension status..."),await this.shouldInstallExtension()&&await this.installExtension()}catch(t){process.env.CODER_DEBUG&&console.error("VSCode Extension Service Error:",t)}}};zd.exports=ua});var Tn=S((iM,SS)=>{SS.exports={name:"makecoder",version:"4.1.28",description:"MakeCoder Coder: AI Agent Runtime OS that runs and orchestrates Claude Code, Codex, Gemini and more across CLI, API, Web and chat",main:"./dist/coder.js",bin:{coder:"./dist/coder.js"},scripts:{test:"node --test test/*.test.js",start:"node ./src/coder.js",build:"node scripts/build.js","build:clean":"node scripts/build.js --clean","build:dev":"node scripts/build.js --no-minify --sourcemap",postinstall:"node scripts/postinstall.js"},keywords:["ai-agent-runtime","agent-os","ai","cli","claude","gemini","codex","agent","orchestration","llm"],author:"makecoder",license:"MIT",repository:{type:"git",url:"https://github.com/makecoderai/coder.git"},homepage:"https://github.com/makecoderai/coder",dependencies:{bun:">=1.3.12",commander:"^15.0.0","node-fetch":"^3.3.2",open:"^10.1.0",ws:"^8.21.0",zod:"^3.25.76"},engines:{node:">=20.0.0"},devDependencies:{chokidar:"^4.0.3"},files:["dist","scripts/postinstall.js"]}});var Vd=S((aM,Kd)=>{var pa=require("crypto"),{URL:ES}=require("url"),ma=class{static generateSignature(t,s,n,r){try{let o=new ES(t),i=Buffer.from(o.pathname),a=Buffer.from(i),c=s?typeof s=="string"?Buffer.from(s):Buffer.from(JSON.stringify(s)):Buffer.alloc(0),l=Buffer.concat([a,c,Buffer.from(r)]),d=pa.createHmac("sha256",n);return d.update(l),d.digest("hex")}catch(o){throw new Error(`Failed to generate signature: ${o.message}`)}}static validateSignature(t,s,n,r,o){return this.generateSignature(t,s,n,r)===o}static generateTimestamp(){return Date.now().toString()}static generateStrongPassword(t=16){let s="abcdefghijkmnpqrstuvwxyz",n="ABCDEFGHJKLMNPQRSTUVWXYZ",r="23456789",o="!@#$%^&*-_=+",i=s+n+r+o;t<8&&(t=8);let a=l=>l[pa.randomBytes(1)[0]%l.length],c=[a(s),a(n),a(r),a(o)];for(;c.length<t;)c.push(a(i));for(let l=c.length-1;l>0;l--){let d=pa.randomBytes(1)[0]%(l+1);[c[l],c[d]]=[c[d],c[l]]}return c.join("")}};Kd.exports=ma});var yo=S((cM,Yd)=>{var kS=require("https"),{URL:TS}=require("url"),Jd="https://makecoder.com/bigapis/auth/v1",IS="https://makecoder.com/bigapis/kbb2/v1",xS="https://makecoder.com/wiki/api",fa=class{constructor(t){this.token=t}request(t,s,n,r){return new Promise((o,i)=>{let a=r||Jd,c=new TS(`${a}${s}`),l={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`},d=null;n!=null&&(d=JSON.stringify(n),l["Content-Length"]=Buffer.byteLength(d));let u=kS.request({hostname:c.hostname,port:c.port||443,path:c.pathname+c.search,method:t,headers:l},m=>{let p="";m.on("data",f=>p+=f),m.on("end",()=>o({status:m.statusCode,body:p}))});u.on("error",i),d&&u.write(d),u.end()})}};function Zd(e){try{return JSON.parse(e)}catch{return null}}function AS(e){return e===401?2:e===403?5:e===404?4:e===409?6:1}function CS(e){let t=Zd(e);return t?.message?t.message:t?.error?t.error:(e||"").slice(0,200)||"\u8BF7\u6C42\u5931\u8D25"}Yd.exports={TeamHttp:fa,parseJson:Zd,exitCodeForStatus:AS,errorMessage:CS,API_BASE:Jd,BIGKBB_BASE:IS,WIKI_API_BASE:xS}});var eu=S((lM,Qd)=>{var ha=e=>String(e??"").replace(/\|/g,"\\|").replace(/\n/g," ");function LS(e,t,s={}){let{labels:n={},empty:r="\uFF08\u7A7A\uFF09"}=s;if(!t||!t.length){e.emit(r);return}if(e.isJson){e.emit(t);return}let o=Object.keys(t[0]),a=[`| ${o.map(c=>n[c]||c).map(ha).join(" | ")} |`,`| ${o.map(()=>"---").join(" | ")} |`,...t.map(c=>`| ${o.map(l=>ha(c[l])).join(" | ")} |`)];e.emit(a.join(`
24
+ `).map(c=>c.trim());s(a.includes(this.extensionId))}else s(!1)}),r.on("error",i=>{process.env.CODER_DEBUG&&(console.error("VSCode list extensions error:",i.message),console.error("Error code:",i.code),console.error("Error errno:",i.errno),console.error("Error syscall:",i.syscall)),s(!1)}),setTimeout(()=>{try{r.kill()}catch{}s(!1)},1e4)}catch(n){process.env.CODER_DEBUG&&console.error("Failed to spawn VSCode list extensions:",n.message),s(!1)}})}catch{return!1}}async executeVSCodeCommand(t,s={}){let n=await this.resolveCodeCommand();return new Promise(r=>{try{let o={stdio:"ignore",shell:!1,env:{...process.env,PATH:process.env.PATH,HOME:process.env.HOME,USER:process.env.USER}};process.env.CODER_DEBUG&&console.log(`Spawning: ${n} ${t.join(" ")}`);let i=Hd(n,t,o);i.on("close",c=>{r(c===0)}),i.on("error",c=>{process.env.CODER_DEBUG&&(console.error("VSCode command error:",c.message),console.error("Error code:",c.code),console.error("Error errno:",c.errno),console.error("Error syscall:",c.syscall)),r(!1)});let a=s.timeout||3e4;setTimeout(()=>{try{i.kill()}catch{}r(!1)},a)}catch(o){process.env.CODER_DEBUG&&console.error("Failed to spawn VSCode command:",o.message),r(!1)}})}async ensureExtensionInstalled(){try{process.env.CODER_DEBUG&&console.log("VSCode Extension Service: Checking extension status..."),await this.shouldInstallExtension()&&await this.installExtension()}catch(t){process.env.CODER_DEBUG&&console.error("VSCode Extension Service Error:",t)}}};zd.exports=ua});var Tn=S((iM,SS)=>{SS.exports={name:"makecoder",version:"4.1.30",description:"MakeCoder Coder: AI Agent Runtime OS that runs and orchestrates Claude Code, Codex, Gemini and more across CLI, API, Web and chat",main:"./dist/coder.js",bin:{coder:"./dist/coder.js"},scripts:{test:"node --test test/*.test.js",start:"node ./src/coder.js",build:"node scripts/build.js","build:clean":"node scripts/build.js --clean","build:dev":"node scripts/build.js --no-minify --sourcemap",postinstall:"node scripts/postinstall.js"},keywords:["ai-agent-runtime","agent-os","ai","cli","claude","gemini","codex","agent","orchestration","llm"],author:"makecoder",license:"MIT",repository:{type:"git",url:"https://github.com/makecoderai/coder.git"},homepage:"https://github.com/makecoderai/coder",dependencies:{bun:">=1.3.12",commander:"^15.0.0","node-fetch":"^3.3.2",open:"^10.1.0",ws:"^8.21.0",zod:"^3.25.76"},engines:{node:">=20.0.0"},devDependencies:{chokidar:"^4.0.3"},files:["dist","scripts/postinstall.js"]}});var Vd=S((aM,Kd)=>{var pa=require("crypto"),{URL:ES}=require("url"),ma=class{static generateSignature(t,s,n,r){try{let o=new ES(t),i=Buffer.from(o.pathname),a=Buffer.from(i),c=s?typeof s=="string"?Buffer.from(s):Buffer.from(JSON.stringify(s)):Buffer.alloc(0),l=Buffer.concat([a,c,Buffer.from(r)]),d=pa.createHmac("sha256",n);return d.update(l),d.digest("hex")}catch(o){throw new Error(`Failed to generate signature: ${o.message}`)}}static validateSignature(t,s,n,r,o){return this.generateSignature(t,s,n,r)===o}static generateTimestamp(){return Date.now().toString()}static generateStrongPassword(t=16){let s="abcdefghijkmnpqrstuvwxyz",n="ABCDEFGHJKLMNPQRSTUVWXYZ",r="23456789",o="!@#$%^&*-_=+",i=s+n+r+o;t<8&&(t=8);let a=l=>l[pa.randomBytes(1)[0]%l.length],c=[a(s),a(n),a(r),a(o)];for(;c.length<t;)c.push(a(i));for(let l=c.length-1;l>0;l--){let d=pa.randomBytes(1)[0]%(l+1);[c[l],c[d]]=[c[d],c[l]]}return c.join("")}};Kd.exports=ma});var yo=S((cM,Yd)=>{var kS=require("https"),{URL:TS}=require("url"),Jd="https://makecoder.com/bigapis/auth/v1",IS="https://makecoder.com/bigapis/kbb2/v1",xS="https://makecoder.com/wiki/api",fa=class{constructor(t){this.token=t}request(t,s,n,r){return new Promise((o,i)=>{let a=r||Jd,c=new TS(`${a}${s}`),l={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`},d=null;n!=null&&(d=JSON.stringify(n),l["Content-Length"]=Buffer.byteLength(d));let u=kS.request({hostname:c.hostname,port:c.port||443,path:c.pathname+c.search,method:t,headers:l},m=>{let p="";m.on("data",f=>p+=f),m.on("end",()=>o({status:m.statusCode,body:p}))});u.on("error",i),d&&u.write(d),u.end()})}};function Zd(e){try{return JSON.parse(e)}catch{return null}}function AS(e){return e===401?2:e===403?5:e===404?4:e===409?6:1}function CS(e){let t=Zd(e);return t?.message?t.message:t?.error?t.error:(e||"").slice(0,200)||"\u8BF7\u6C42\u5931\u8D25"}Yd.exports={TeamHttp:fa,parseJson:Zd,exitCodeForStatus:AS,errorMessage:CS,API_BASE:Jd,BIGKBB_BASE:IS,WIKI_API_BASE:xS}});var eu=S((lM,Qd)=>{var ha=e=>String(e??"").replace(/\|/g,"\\|").replace(/\n/g," ");function LS(e,t,s={}){let{labels:n={},empty:r="\uFF08\u7A7A\uFF09"}=s;if(!t||!t.length){e.emit(r);return}if(e.isJson){e.emit(t);return}let o=Object.keys(t[0]),a=[`| ${o.map(c=>n[c]||c).map(ha).join(" | ")} |`,`| ${o.map(()=>"---").join(" | ")} |`,...t.map(c=>`| ${o.map(l=>ha(c[l])).join(" | ")} |`)];e.emit(a.join(`
25
25
  `))}function vS(e,t,s=null){if(e.isJson){let n={};for(let[r,o]of t)n[r]=o;s&&typeof s=="object"&&Object.assign(n,s),e.emit(n);return}e.emit(t.map(([n,r,o])=>`${o||n}: ${r??""}`).join(`
26
26
  `))}Qd.exports={emitTable:LS,emitDetails:vS,escCell:ha}});var ru=S((uM,nu)=>{var{TeamHttp:dM,parseJson:US,exitCodeForStatus:DS,errorMessage:OS,BIGKBB_BASE:NS,WIKI_API_BASE:RS}=yo();function Rs(e,t,s,n=1){e.fail(t,s);let r=new Error("__handled__");throw r.handled=!0,r.code=n,r}function tu(e,t){Rs(e,OS(t.body),$S(t.status),DS(t.status))}function $S(e){if(e===401)return"\u5148\u767B\u5F55: coder auth login --apikey <apiKey>";if(e===403)return"\u6743\u9650\u4E0D\u8DB3\uFF0C\u9700\u56E2\u961F owner / manager\uFF1B\u786E\u8BA4\u5F53\u524D\u56E2\u961F: coder team current";if(e===404)return"\u786E\u8BA4 id \u6B63\u786E\uFF0C\u6216\u7528 coder team list / members \u67E5\u627E"}function su(e,t){if(t)return t;let s=e.ctx.getTeam?e.ctx.getTeam():null;return s&&s.id?s.id:null}function jS(e,t){let s=su(e,t);return s||Rs(e.ctx,"\u672A\u6307\u5B9A teamId \u4E14\u65E0\u9ED8\u8BA4\u56E2\u961F","\u8FD0\u884C coder team use <id> \u8BBE\u9ED8\u8BA4\u56E2\u961F\uFF0C\u6216\u52A0 --team <id> / \u4F4D\u7F6E\u53C2\u6570",3),s}async function PS(e,t){let s=encodeURIComponent(JSON.stringify({id__in:[t]})),n;try{n=await e.http.request("GET",`/team?constraints=${s}`)}catch(i){Rs(e.ctx,`\u7F51\u7EDC\u9519\u8BEF ${i.message}`,void 0,1)}n.status!==200&&tu(e.ctx,n);let r=US(n.body),o=r&&r.data&&r.data.items||[];return o.length||Rs(e.ctx,`\u56E2\u961F ${t} \u4E0D\u5B58\u5728`,"\u8FD0\u884C coder team list \u67E5\u770B\u53EF\u7528\u56E2\u961F",4),o[0]}function MS(e){return Array.isArray(e.members)?e.members:[]}function FS(e,t,s,n){let r=t.find(o=>o.user_id===s||o.id===s||o.username===s);return r||Rs(e.ctx,`\u6210\u5458 '${s}' \u4E0D\u5728\u56E2\u961F '${n||""}' \u4E2D`,"\u8FD0\u884C coder team members \u67E5\u770B\u6210\u5458\uFF0Cuser_id / username \u5747\u53EF",4),r}function qS(e,t){return t?e.filter(s=>s.user_type===t):e}function GS(e,t){t&&t!=="human"&&t!=="ai"&&Rs(e.ctx,`--type \u4EC5\u652F\u6301 human \u6216 ai\uFF0C\u6536\u5230 '${t}'`,void 0,3)}function BS(e,t){let s=e.config&&e.config.metadata&&e.config.metadata.created_by;if(!s)return"";let n=t.find(r=>r.user_id===s);return n?n.nickname?`${n.username}(${n.nickname})`:n.username:s}function WS(e){return e==="mentor"?"admin":"member"}async function HS(e,t,s){try{let n=await e.http.request("POST",`/${t}`,s,RS);(n.status<200||n.status>=300)&&process.stderr.write(`Warning: \u77E5\u8BC6\u5E93\u540C\u6B65\u5931\u8D25 (${t}): HTTP ${n.status}
27
27
  `)}catch(n){process.stderr.write(`Warning: \u77E5\u8BC6\u5E93\u540C\u6B65\u5931\u8D25 (${t}): ${n.message}
@@ -23,16 +23,44 @@ var Fd4=Object.create;var{getPrototypeOf:gd4,defineProperty:URH,getOwnPropertyNa
23
23
  Object.assign(A, {
24
24
  post(...args) {
25
25
  const [url, payload, ...remainArgs] = args;
26
- const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.28' + '&session_id=' + V_() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
26
+ const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.30' + '&session_id=' + V_() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
27
27
  if (process.env.CODER_APIKEY) {
28
28
  const headerValues = payload.headers.values;
29
29
  headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
30
30
  }
31
31
 
32
- payload.headers.values.set('X-Coder-Version', '4.1.28');
32
+ payload.headers.values.set('X-Coder-Version', '4.1.30');
33
33
  payload.headers.values.set('X-Coder-Platform', process.platform);
34
34
  payload.headers.values.set('X-Coder-Arch', process.arch);
35
35
 
36
+ try {
37
+ const __body = payload && payload.body;
38
+ if (__body && Array.isArray(__body.messages)) {
39
+ const __out = [];
40
+ for (const __m of __body.messages) {
41
+ if (!__m || typeof __m !== 'object' || !Array.isArray(__m.content)) { __out.push(__m); continue; }
42
+ const __pulled = [];
43
+ const __newContent = __m.content.map((__b) => {
44
+ if (__b && __b.type === 'tool_result' && Array.isArray(__b.content)) {
45
+ const __kept = [];
46
+ for (const __c of __b.content) {
47
+ if (__c && __c.type === 'image') __pulled.push(__c);
48
+ else __kept.push(__c);
49
+ }
50
+ if (__pulled.length > 0) {
51
+ if (__kept.length === 0) __kept.push({ type: 'text', text: '[image content provided in the following user message]' });
52
+ return Object.assign({}, __b, { content: __kept });
53
+ }
54
+ }
55
+ return __b;
56
+ });
57
+ __out.push(Object.assign({}, __m, { content: __newContent }));
58
+ if (__pulled.length > 0) __out.push({ role: 'user', content: __pulled });
59
+ }
60
+ __body.messages = __out;
61
+ }
62
+ } catch (__e) {}
63
+
36
64
  payload.timeout = 6000000;
37
65
  return A._X__post(patchedUrl, payload, ...remainArgs)
38
66
  },
@@ -1437,7 +1465,7 @@ Result format: each matched tool appears as one <function>{"description": "...",
1437
1465
  Query forms:
1438
1466
  - "select:Read,Edit,Grep" \u2014 fetch these exact tools by name
1439
1467
  - "notebook jupyter" \u2014 keyword search, up to max_results best matches
1440
- - "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;var zn=L(()=>{MEH();Mu();TY();YXH();C6O=(WS(),x8(HTH)).BRIEF_TOOL_NAME,b6O=x8(Kw6).SEND_USER_FILE_TOOL_NAME});function AX7(H){let _=Buffer.from(H,"base64"),q="";for(let K of _)q+=String.fromCharCode(K^u6O);return q.split(",")}function F6O(){let H=process.env.ANTHROPIC_BASE_URL;if(!H)return null;try{return new URL(H).hostname.toLowerCase()}catch{return null}}function g6O(){if(A3())return null;let H=F6O(),_=Kz_(),q=_==="Asia/Shanghai"||_==="Asia/Urumqi";if(!H)return{known:!1,labKw:!1,cnTZ:q,host:null};return{known:B6O().some((K)=>H===K||H.endsWith("."+K)),labKw:U6O().some((K)=>H.includes(K)),cnTZ:q,host:H}}function Q6O(H,_){if(!H&&!_)return"'";if(H&&!_)return"\u2019";if(!H&&_)return"\u02BC";return"\u02B9"}function YX7(H){let _=g6O(),q=Q6O(_?.known??!1,_?.labKw??!1),K=_?.cnTZ?H.replaceAll("-","/"):H;return`Today${q}s date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ODQ2dzU+LHUjIjgzOi86MnU4NDZ3NDU+djorMnU5Ny84InUvNCt3NDU+dTQ4NDQ3OjJ1ODQ2dzQ1PjorMnUrOjI1Lzk0L3UvNCt3NCs+NXUjMjo0MTI1PDoydTg0Nnc0Kz41ODc6Lj8+dTY+dzQrLih1PCsvLi51ODQ2dys0NzQ6MnUvNCt3KzQ3NDorMnUvNCt3KykyLTU0Pz51ODQ2dyspNCMiOjJ1ODQ2dyoyNSEzMjoydTg0NncpMjwzL3U4ND8+KHcpLjU6NSIvMjY+dTMjMnU2PncoKCg6Mjg0Pz51ODQ2dygvNCk+dSEhIi4odS80K3cvMjo1LzI6NToydSspNHcuMi4yOisydTg0NncuNTI6KzJ1OjJ3LTIrdS41PyIyNTw6KzJ1ODQ2dyw0Nz06MnUvNCt3LCEsdT8+bnU1Pi93LCEsdSsrdS46dyM6Mik0Li8+KXU4NDZ3IzoyIzorMnU4NDZ3IzI6NDMuOisydSgyLz53IzI6NDMuNjI1MnUoMi8+dyMidSs0NzQ6KzJ1ODQ2dyI6NSg/bW1tdTg0NnciOjUoP21tbXUvNCt3Ii41LC51OjJ3Ii41LC51IT46OS4pdTorK3chPjU2LiN1OjI=",p6O="Pz4+Kyg+PjB3NjQ0NSgzNC93NjI1MjY6I3cjOjYyNTI2dyEzMisudzkyPDY0Pz43dzk6MjgzLjo1dygvPis9LjV3a2o6Mnc/OigzKDg0Kz53LTQ3OD4o",B6O,U6O;var wX7=L(()=>{m7();pL();N7();B6O=V6(()=>AX7(m6O)),U6O=V6(()=>AX7(p6O))});function TS8(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function XX7(H){GEH=H}function Pf(H,_=""){let q=typeof H==="string"?H:H.source,K={replace:(O,T)=>{let z=typeof T==="string"?T:T.source;return z=z.replace(CI.caret,"$1"),q=q.replace(O,z),K},getRegex:()=>{return new RegExp(q,_)}};return K}function BqH(H,_){if(_){if(CI.escapeTest.test(H))return H.replace(CI.escapeReplace,fX7)}else if(CI.escapeTestNoEncode.test(H))return H.replace(CI.escapeReplaceNoEncode,fX7);return H}function JX7(H){try{H=encodeURI(H).replace(CI.percentDecode,"%")}catch{return null}return H}function DX7(H,_){let q=H.replace(CI.findPipe,(T,z,$)=>{let A=!1,Y=z;while(--Y>=0&&$[Y]==="\\")A=!A;if(A)return"|";else return" |"}),K=q.split(CI.splitPipe),O=0;if(!K[0].trim())K.shift();if(K.length>0&&!K.at(-1)?.trim())K.pop();if(_)if(K.length>_)K.splice(_);else while(K.length<_)K.push("");for(;O<K.length;O++)K[O]=K[O].trim().replace(CI.slashPipe,"|");return K}function _Z_(H,_,q){let K=H.length;if(K===0)return"";let O=0;while(O<K)if(H.charAt(K-O-1)===_)O++;else break;return H.slice(0,K-O)}function R8O(H,_){if(H.indexOf(_[1])===-1)return-1;let q=0;for(let K=0;K<H.length;K++)if(H[K]==="\\")K++;else if(H[K]===_[0])q++;else if(H[K]===_[1]){if(q--,q<0)return K}return-1}function MX7(H,_,q,K,O){let T=_.href,z=_.title||null,$=H[1].replace(O.other.outputLinkReplace,"$1");if(H[0].charAt(0)!=="!"){K.state.inLink=!0;let A={type:"link",raw:q,href:T,title:z,text:$,tokens:K.inlineTokens($)};return K.state.inLink=!1,A}return{type:"image",raw:q,href:T,title:z,text:$}}function L8O(H,_,q){let K=H.match(q.other.indentCodeCompensation);if(K===null)return _;let O=K[1];return _.split(`
1468
+ - "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;var zn=L(()=>{MEH();Mu();TY();YXH();C6O=(WS(),x8(HTH)).BRIEF_TOOL_NAME,b6O=x8(Kw6).SEND_USER_FILE_TOOL_NAME});function AX7(H){let _=Buffer.from(H,"base64"),q="";for(let K of _)q+=String.fromCharCode(K^u6O);return q.split(",")}function F6O(){let H=process.env.ANTHROPIC_BASE_URL;if(!H)return null;try{return new URL(H).hostname.toLowerCase()}catch{return null}}function g6O(){return null;if(A3())return null;let H=F6O(),_=Kz_(),q=_==="Asia/Shanghai"||_==="Asia/Urumqi";if(!H)return{known:!1,labKw:!1,cnTZ:q,host:null};return{known:B6O().some((K)=>H===K||H.endsWith("."+K)),labKw:U6O().some((K)=>H.includes(K)),cnTZ:q,host:H}}function Q6O(H,_){if(!H&&!_)return"'";if(H&&!_)return"\u2019";if(!H&&_)return"\u02BC";return"\u02B9"}function YX7(H){let _=g6O(),q=Q6O(_?.known??!1,_?.labKw??!1),K=_?.cnTZ?H.replaceAll("-","/"):H;return`Today${q}s date is ${K}.`}var u6O=91,m6O="ODV3KDo1MC46MnU4NDZ3NT4vPjooPnU4NDZ3am1odTg0Nnc5OjI/LnYyNS91ODQ2dzk6Mj8udTg0Nnc6NzI5Ojk6djI1OHU4NDZ3OjcyKzoidTg0Nnc6NS88KTQuK3YyNTh1ODV3MC46MigzNC51ODQ2dzkiLz4/OjU4PnU1Pi93IzI6NDM0NTwoMy51ODQ2dzgvKTIrODQpK3U4NDZ3MT91ODQ2dzE/ODc0Lj91ODQ2dzkyNzI5MjcydTg0dzI9NyIvPjB1ODQ2dygvPis9LjV2MjU4dTg0Nnc6NzIiLjU4KHU4NDZ3ODV2KDM6NTwzOjJ1PTg6Kyt1KS41dzg1djk+MjEyNTx1PTg6Kyt1KS41dyM6NjI1MjZ1ODQ2dzY0NDUoMzQvdToydzo1Iik0Li8+KXUvNCt3Kzo4MCI6KzJ1ODQ2dzoyODQ/PjYyKSk0KXU4NDZ3OjI8NDg0Pz51ODQ2dzM0NTwoMzo1dTg0NncyLDM6Nz44NzQuP3U4NDZ3PzM4ND8+KXU1Pi93Nz42NDU8Ky91LzQrdyEzMjMuMjorMnUvNCt3MjUvKDI8dTU+L3czMjwzdj0yLT52OjJ1IyIhdzg3NC4/KCw6InU1Pi93byg6KzJ1ODQ2d25pYmJtanU4NDZ3Y2NiYm11ODc0Lj93Y2M4ND8+dToyd2NjODQ/PnU0KTx3Ymo4ND8+dSspNHdiYmlpaG11IyIhdzoydTg0Pz4qO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{m7();pL();N7();B6O=V6(()=>AX7(m6O)),U6O=V6(()=>AX7(p6O))});function TS8(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function XX7(H){GEH=H}function Pf(H,_=""){let q=typeof H==="string"?H:H.source,K={replace:(O,T)=>{let z=typeof T==="string"?T:T.source;return z=z.replace(CI.caret,"$1"),q=q.replace(O,z),K},getRegex:()=>{return new RegExp(q,_)}};return K}function BqH(H,_){if(_){if(CI.escapeTest.test(H))return H.replace(CI.escapeReplace,fX7)}else if(CI.escapeTestNoEncode.test(H))return H.replace(CI.escapeReplaceNoEncode,fX7);return H}function JX7(H){try{H=encodeURI(H).replace(CI.percentDecode,"%")}catch{return null}return H}function DX7(H,_){let q=H.replace(CI.findPipe,(T,z,$)=>{let A=!1,Y=z;while(--Y>=0&&$[Y]==="\\")A=!A;if(A)return"|";else return" |"}),K=q.split(CI.splitPipe),O=0;if(!K[0].trim())K.shift();if(K.length>0&&!K.at(-1)?.trim())K.pop();if(_)if(K.length>_)K.splice(_);else while(K.length<_)K.push("");for(;O<K.length;O++)K[O]=K[O].trim().replace(CI.slashPipe,"|");return K}function _Z_(H,_,q){let K=H.length;if(K===0)return"";let O=0;while(O<K)if(H.charAt(K-O-1)===_)O++;else break;return H.slice(0,K-O)}function R8O(H,_){if(H.indexOf(_[1])===-1)return-1;let q=0;for(let K=0;K<H.length;K++)if(H[K]==="\\")K++;else if(H[K]===_[0])q++;else if(H[K]===_[1]){if(q--,q<0)return K}return-1}function MX7(H,_,q,K,O){let T=_.href,z=_.title||null,$=H[1].replace(O.other.outputLinkReplace,"$1");if(H[0].charAt(0)!=="!"){K.state.inLink=!0;let A={type:"link",raw:q,href:T,title:z,text:$,tokens:K.inlineTokens($)};return K.state.inLink=!1,A}return{type:"image",raw:q,href:T,title:z,text:$}}function L8O(H,_,q){let K=H.match(q.other.indentCodeCompensation);if(K===null)return _;let O=K[1];return _.split(`
1441
1469
  `).map((T)=>{let z=T.match(q.other.beginningSpace);if(z===null)return T;let[$]=z;if($.length>=O.length)return T.slice(O.length);return T}).join(`
1442
1470
  `)}class WEH{options;rules;lexer;constructor(H){this.options=H||GEH}space(H){let _=this.rules.block.newline.exec(H);if(_&&_[0].length>0)return{type:"space",raw:_[0]}}code(H){let _=this.rules.block.code.exec(H);if(_){let q=_[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:_[0],codeBlockStyle:"indented",text:!this.options.pedantic?_Z_(q,`
1443
1471
  `):q}}}fences(H){let _=this.rules.block.fences.exec(H);if(_){let q=_[0],K=L8O(q,_[3]||"",this.rules);return{type:"code",raw:q,lang:_[2]?_[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):_[2],text:K}}}heading(H){let _=this.rules.block.heading.exec(H);if(_){let q=_[2].trim();if(this.rules.other.endingHash.test(q)){let K=_Z_(q,"#");if(this.options.pedantic)q=K.trim();else if(!K||this.rules.other.endingSpaceChar.test(K))q=K.trim()}return{type:"heading",raw:_[0],depth:_[1].length,text:q,tokens:this.lexer.inline(q)}}}hr(H){let _=this.rules.block.hr.exec(H);if(_)return{type:"hr",raw:_Z_(_[0],`
@@ -23,16 +23,44 @@ var gcK=Object.create;var{getPrototypeOf:QcK,defineProperty:BEH,getOwnPropertyNa
23
23
  Object.assign(A, {
24
24
  post(...args) {
25
25
  const [url, payload, ...remainArgs] = args;
26
- const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.28' + '&session_id=' + I6() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
26
+ const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.30' + '&session_id=' + I6() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
27
27
  if (process.env.CODER_APIKEY) {
28
28
  const headerValues = payload.headers.values;
29
29
  headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
30
30
  }
31
31
 
32
- payload.headers.values.set('X-Coder-Version', '4.1.28');
32
+ payload.headers.values.set('X-Coder-Version', '4.1.30');
33
33
  payload.headers.values.set('X-Coder-Platform', process.platform);
34
34
  payload.headers.values.set('X-Coder-Arch', process.arch);
35
35
 
36
+ try {
37
+ const __body = payload && payload.body;
38
+ if (__body && Array.isArray(__body.messages)) {
39
+ const __out = [];
40
+ for (const __m of __body.messages) {
41
+ if (!__m || typeof __m !== 'object' || !Array.isArray(__m.content)) { __out.push(__m); continue; }
42
+ const __pulled = [];
43
+ const __newContent = __m.content.map((__b) => {
44
+ if (__b && __b.type === 'tool_result' && Array.isArray(__b.content)) {
45
+ const __kept = [];
46
+ for (const __c of __b.content) {
47
+ if (__c && __c.type === 'image') __pulled.push(__c);
48
+ else __kept.push(__c);
49
+ }
50
+ if (__pulled.length > 0) {
51
+ if (__kept.length === 0) __kept.push({ type: 'text', text: '[image content provided in the following user message]' });
52
+ return Object.assign({}, __b, { content: __kept });
53
+ }
54
+ }
55
+ return __b;
56
+ });
57
+ __out.push(Object.assign({}, __m, { content: __newContent }));
58
+ if (__pulled.length > 0) __out.push({ role: 'user', content: __pulled });
59
+ }
60
+ __body.messages = __out;
61
+ }
62
+ } catch (__e) {}
63
+
36
64
  payload.timeout = 6000000;
37
65
  return A._X__post(patchedUrl, payload, ...remainArgs)
38
66
  },
@@ -1437,7 +1465,7 @@ Result format: each matched tool appears as one <function>{"description": "...",
1437
1465
  Query forms:
1438
1466
  - "select:Read,Edit,Grep" \u2014 fetch these exact tools by name
1439
1467
  - "notebook jupyter" \u2014 keyword search, up to max_results best matches
1440
- - "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;var fn=Z(()=>{jhH();ju();fO();OXH();b87=(WS(),x_(H5H)).BRIEF_TOOL_NAME,x87=x_(Lz8).SEND_USER_FILE_TOOL_NAME});function $X9(H){let _=Buffer.from(H,"base64"),A="";for(let q of _)A+=String.fromCharCode(q^p87);return A.split(",")}function Q87(){let H=process.env.ANTHROPIC_BASE_URL;if(!H)return null;try{return new URL(H).hostname.toLowerCase()}catch{return null}}function d87(){if($f())return null;let H=Q87(),_=qM6(),A=_==="Asia/Shanghai"||_==="Asia/Urumqi";if(!H)return{known:!1,labKw:!1,cnTZ:A,host:null};return{known:F87().some((q)=>H===q||H.endsWith("."+q)),labKw:g87().some((q)=>H.includes(q)),cnTZ:A,host:H}}function c87(H,_){if(!H&&!_)return"'";if(H&&!_)return"\u2019";if(!H&&_)return"\u02BC";return"\u02B9"}function OX9(H){let _=d87(),A=c87(_?.known??!1,_?.labKw??!1),q=_?.cnTZ?H.replaceAll("-","/"):H;return`Today${A}s date is ${q}.`}var p87=91,U87="ODV3KDo1MC46MnU4NDZ3NT4vPjooPnU4NDZ3am1odTg0Nnc5OjI/LnYyNS91ODQ2dzk6Mj8udTg0Nnc6NzI5Ojk6djI1OHU4NDZ3OjcyKzoidTg0Nnc6NS88KTQuK3YyNTh1ODV3MC46MigzNC51ODQ2dzkiLz4/OjU4PnU1Pi93IzI6NDM0NTwoMy51ODQ2dzgvKTIrODQpK3U4NDZ3MT91ODQ2dzE/ODc0Lj91ODQ2dzkyNzI5MjcydTg0dzI9NyIvPjB1ODQ2dygvPis9LjV2MjU4dTg0Nnc6NzIiLjU4KHU4NDZ3ODV2KDM6NTwzOjJ1PTg6Kyt1KS41dzg1djk+MjEyNTx1PTg6Kyt1KS41dyM6NjI1MjZ1ODQ2dzY0NDUoMzQvdToydzo1Iik0Li8+KXUvNCt3Kzo4MCI6KzJ1ODQ2dzoyODQ/PjYyKSk0KXU4NDZ3OjI8NDg0Pz51ODQ2dzM0NTwoMzo1dTg0NncyLDM6Nz44NzQuP3U4NDZ3PzM4ND8+KXU1Pi93Nz42NDU8Ky91LzQrdyEzMjMuMjorMnUvNCt3MjUvKDI8dTU+L3czMjwzdj0yLT52OjJ1IyIhdzg3NC4/KCw6InU1Pi93byg6KzJ1ODQ2d25pYmJtanU4NDZ3Y2NiYm11ODc0Lj93Y2M4ND8+d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ygvPis9LjV3a2o6Mnc/OigzKDg0Kz53LTQ3OD4o",F87,g87;var zX9=Z(()=>{m9();pZ();N9();F87=I8(()=>$X9(U87)),g87=I8(()=>$X9(B87))});function LS_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function XX9(H){ThH=H}function WD(H,_=""){let A=typeof H==="string"?H:H.source,q={replace:(K,L)=>{let f=typeof L==="string"?L:L.source;return f=f.replace(Rb.caret,"$1"),A=A.replace(K,f),q},getRegex:()=>{return new RegExp(A,_)}};return q}function UAH(H,_){if(_){if(Rb.escapeTest.test(H))return H.replace(Rb.escapeReplace,DX9)}else if(Rb.escapeTestNoEncode.test(H))return H.replace(Rb.escapeReplaceNoEncode,DX9);return H}function wX9(H){try{H=encodeURI(H).replace(Rb.percentDecode,"%")}catch{return null}return H}function JX9(H,_){let A=H.replace(Rb.findPipe,(L,f,M)=>{let $=!1,O=f;while(--O>=0&&M[O]==="\\")$=!$;if($)return"|";else return" |"}),q=A.split(Rb.splitPipe),K=0;if(!q[0].trim())q.shift();if(q.length>0&&!q.at(-1)?.trim())q.pop();if(_)if(q.length>_)q.splice(_);else while(q.length<_)q.push("");for(;K<q.length;K++)q[K]=q[K].trim().replace(Rb.slashPipe,"|");return q}function _G6(H,_,A){let q=H.length;if(q===0)return"";let K=0;while(K<q)if(H.charAt(q-K-1)===_)K++;else break;return H.slice(0,q-K)}function V_7(H,_){if(H.indexOf(_[1])===-1)return-1;let A=0;for(let q=0;q<H.length;q++)if(H[q]==="\\")q++;else if(H[q]===_[0])A++;else if(H[q]===_[1]){if(A--,A<0)return q}return-1}function jX9(H,_,A,q,K){let L=_.href,f=_.title||null,M=H[1].replace(K.other.outputLinkReplace,"$1");if(H[0].charAt(0)!=="!"){q.state.inLink=!0;let $={type:"link",raw:A,href:L,title:f,text:M,tokens:q.inlineTokens(M)};return q.state.inLink=!1,$}return{type:"image",raw:A,href:L,title:f,text:M}}function v_7(H,_,A){let q=H.match(A.other.indentCodeCompensation);if(q===null)return _;let K=q[1];return _.split(`
1468
+ - "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;var fn=Z(()=>{jhH();ju();fO();OXH();b87=(WS(),x_(H5H)).BRIEF_TOOL_NAME,x87=x_(Lz8).SEND_USER_FILE_TOOL_NAME});function $X9(H){let _=Buffer.from(H,"base64"),A="";for(let q of _)A+=String.fromCharCode(q^p87);return A.split(",")}function Q87(){let H=process.env.ANTHROPIC_BASE_URL;if(!H)return null;try{return new URL(H).hostname.toLowerCase()}catch{return null}}function d87(){return null;if($f())return null;let H=Q87(),_=qM6(),A=_==="Asia/Shanghai"||_==="Asia/Urumqi";if(!H)return{known:!1,labKw:!1,cnTZ:A,host:null};return{known:F87().some((q)=>H===q||H.endsWith("."+q)),labKw:g87().some((q)=>H.includes(q)),cnTZ:A,host:H}}function c87(H,_){if(!H&&!_)return"'";if(H&&!_)return"\u2019";if(!H&&_)return"\u02BC";return"\u02B9"}function OX9(H){let _=d87(),A=c87(_?.known??!1,_?.labKw??!1),q=_?.cnTZ?H.replaceAll("-","/"):H;return`Today${A}s date is ${q}.`}var p87=91,U87="ODV3KDo1MC46MnU4NDZ3NT4vPjooPnU4NDZ3am1odTg0Nnc5OjI/LnYyNS91ODQ2dzk6Mj8udTg0Nnc6NzI5Ojk6djI1OHU4NDZ3OjcyKzoidTg0Nnc6NS88KTQuK3YyNTh1ODV3MC46MigzNC51ODQ2dzkiLz4/OjU4PnU1Pi93IzI6NDM0NTwoMy51ODQ2dzgvKTIrODQpK3U4NDZ3MT91ODQ2dzE/ODc0Lj91ODQ2dzkyNzI5MjcydTg0dzI9NyIvPjB1ODQ2dygvPis9LjV2MjU4dTg0Nnc6NzIiLjU4KHU4NDZ3ODV2KDM6NTwzOjJ1PTg6Kyt1KS41dzg1djk+MjEyNTx1PTg6Kyt1KS41dyM6NjI1MjZ1ODQ2dzY0NDUoMzQvdToydzo1Iik0Li8+KXUvNCt3Kzo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46dyM6Mik0Li8+KXU4NDZ3IzoyIzorMnU4NDZ3IzI6NDMuOisydSgyLz53IzI6NDMuNjI1MnUoMi8+dyMidSs0NzQ6KzJ1ODQ2dyI6NSg/bW1tdTg0NnciOjUoP21tbXUvNCt3Ii41LC51OjJ3Ii41LC51IT46OS4pdTorK3chPjU2LiN1OjI=",B87="Pz4+Kyg+PjB3NjQ0NSgzNC93NjI1MjY6I3cjOjYyNTI2dyEzMisudzkyPDY0Pz43dzk6MjgzLjo1dygvPis9LjV3a2o6Mnc/OigzKDg0Kz53LTQ3OD4o",F87,g87;var zX9=Z(()=>{m9();pZ();N9();F87=I8(()=>$X9(U87)),g87=I8(()=>$X9(B87))});function LS_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function XX9(H){ThH=H}function WD(H,_=""){let A=typeof H==="string"?H:H.source,q={replace:(K,L)=>{let f=typeof L==="string"?L:L.source;return f=f.replace(Rb.caret,"$1"),A=A.replace(K,f),q},getRegex:()=>{return new RegExp(A,_)}};return q}function UAH(H,_){if(_){if(Rb.escapeTest.test(H))return H.replace(Rb.escapeReplace,DX9)}else if(Rb.escapeTestNoEncode.test(H))return H.replace(Rb.escapeReplaceNoEncode,DX9);return H}function wX9(H){try{H=encodeURI(H).replace(Rb.percentDecode,"%")}catch{return null}return H}function JX9(H,_){let A=H.replace(Rb.findPipe,(L,f,M)=>{let $=!1,O=f;while(--O>=0&&M[O]==="\\")$=!$;if($)return"|";else return" |"}),q=A.split(Rb.splitPipe),K=0;if(!q[0].trim())q.shift();if(q.length>0&&!q.at(-1)?.trim())q.pop();if(_)if(q.length>_)q.splice(_);else while(q.length<_)q.push("");for(;K<q.length;K++)q[K]=q[K].trim().replace(Rb.slashPipe,"|");return q}function _G6(H,_,A){let q=H.length;if(q===0)return"";let K=0;while(K<q)if(H.charAt(q-K-1)===_)K++;else break;return H.slice(0,q-K)}function V_7(H,_){if(H.indexOf(_[1])===-1)return-1;let A=0;for(let q=0;q<H.length;q++)if(H[q]==="\\")q++;else if(H[q]===_[0])A++;else if(H[q]===_[1]){if(A--,A<0)return q}return-1}function jX9(H,_,A,q,K){let L=_.href,f=_.title||null,M=H[1].replace(K.other.outputLinkReplace,"$1");if(H[0].charAt(0)!=="!"){q.state.inLink=!0;let $={type:"link",raw:A,href:L,title:f,text:M,tokens:q.inlineTokens(M)};return q.state.inLink=!1,$}return{type:"image",raw:A,href:L,title:f,text:M}}function v_7(H,_,A){let q=H.match(A.other.indentCodeCompensation);if(q===null)return _;let K=q[1];return _.split(`
1441
1469
  `).map((L)=>{let f=L.match(A.other.beginningSpace);if(f===null)return L;let[M]=f;if(M.length>=K.length)return L.slice(K.length);return L}).join(`
1442
1470
  `)}class WhH{options;rules;lexer;constructor(H){this.options=H||ThH}space(H){let _=this.rules.block.newline.exec(H);if(_&&_[0].length>0)return{type:"space",raw:_[0]}}code(H){let _=this.rules.block.code.exec(H);if(_){let A=_[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:_[0],codeBlockStyle:"indented",text:!this.options.pedantic?_G6(A,`
1443
1471
  `):A}}}fences(H){let _=this.rules.block.fences.exec(H);if(_){let A=_[0],q=v_7(A,_[3]||"",this.rules);return{type:"code",raw:A,lang:_[2]?_[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):_[2],text:q}}}heading(H){let _=this.rules.block.heading.exec(H);if(_){let A=_[2].trim();if(this.rules.other.endingHash.test(A)){let q=_G6(A,"#");if(this.options.pedantic)A=q.trim();else if(!q||this.rules.other.endingSpaceChar.test(q))A=q.trim()}return{type:"heading",raw:_[0],depth:_[1].length,text:A,tokens:this.lexer.inline(A)}}}hr(H){let _=this.rules.block.hr.exec(H);if(_)return{type:"hr",raw:_G6(_[0],`
@@ -23,16 +23,44 @@ var bc5=Object.create;var{getPrototypeOf:xc5,defineProperty:Ukq,getOwnPropertyNa
23
23
  Object.assign(A, {
24
24
  post(...args) {
25
25
  const [url, payload, ...remainArgs] = args;
26
- const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.28' + '&session_id=' + y8() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
26
+ const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.30' + '&session_id=' + y8() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
27
27
  if (process.env.CODER_APIKEY) {
28
28
  const headerValues = payload.headers.values;
29
29
  headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
30
30
  }
31
31
 
32
- payload.headers.values.set('X-Coder-Version', '4.1.28');
32
+ payload.headers.values.set('X-Coder-Version', '4.1.30');
33
33
  payload.headers.values.set('X-Coder-Platform', process.platform);
34
34
  payload.headers.values.set('X-Coder-Arch', process.arch);
35
35
 
36
+ try {
37
+ const __body = payload && payload.body;
38
+ if (__body && Array.isArray(__body.messages)) {
39
+ const __out = [];
40
+ for (const __m of __body.messages) {
41
+ if (!__m || typeof __m !== 'object' || !Array.isArray(__m.content)) { __out.push(__m); continue; }
42
+ const __pulled = [];
43
+ const __newContent = __m.content.map((__b) => {
44
+ if (__b && __b.type === 'tool_result' && Array.isArray(__b.content)) {
45
+ const __kept = [];
46
+ for (const __c of __b.content) {
47
+ if (__c && __c.type === 'image') __pulled.push(__c);
48
+ else __kept.push(__c);
49
+ }
50
+ if (__pulled.length > 0) {
51
+ if (__kept.length === 0) __kept.push({ type: 'text', text: '[image content provided in the following user message]' });
52
+ return Object.assign({}, __b, { content: __kept });
53
+ }
54
+ }
55
+ return __b;
56
+ });
57
+ __out.push(Object.assign({}, __m, { content: __newContent }));
58
+ if (__pulled.length > 0) __out.push({ role: 'user', content: __pulled });
59
+ }
60
+ __body.messages = __out;
61
+ }
62
+ } catch (__e) {}
63
+
36
64
  payload.timeout = 6000000;
37
65
  return A._X__post(patchedUrl, payload, ...remainArgs)
38
66
  },
@@ -1441,7 +1469,7 @@ Result format: each matched tool appears as one <function>{"description": "...",
1441
1469
  Query forms:
1442
1470
  - "select:Read,Edit,Grep" \u2014 fetch these exact tools by name
1443
1471
  - "notebook jupyter" \u2014 keyword search, up to max_results best matches
1444
- - "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;var _n=V(()=>{WEq();Xu();YJ();wWq();D61=(PS(),IK(a3q)).BRIEF_TOOL_NAME,G61=IK(tJ6).SEND_USER_FILE_TOOL_NAME});function tM4(q){let K=Buffer.from(q,"base64"),_="";for(let O of K)_+=String.fromCharCode(O^V61);return _.split(",")}function h61(){let q=process.env.ANTHROPIC_BASE_URL;if(!q)return null;try{return new URL(q).hostname.toLowerCase()}catch{return null}}function L61(){if(j3())return null;let q=h61(),K=_H8(),_=K==="Asia/Shanghai"||K==="Asia/Urumqi";if(!q)return{known:!1,labKw:!1,cnTZ:_,host:null};return{known:R61().some((O)=>q===O||q.endsWith("."+O)),labKw:y61().some((O)=>q.includes(O)),cnTZ:_,host:q}}function E61(q,K){if(!q&&!K)return"'";if(q&&!K)return"\u2019";if(!q&&K)return"\u02BC";return"\u02B9"}function eM4(q){let K=L61(),_=E61(K?.known??!1,K?.labKw??!1),O=K?.cnTZ?q.replaceAll("-","/"):q;return`Today${_}s date is ${O}.`}var V61=91,N61="ODV3KDo1MC46MnU4NDZ3NT4vPjooPnU4NDZ3am1odTg0Nnc5OjI/LnYyNS91ODQ2dzk6Mj8udTg0Nnc6NzI5Ojk6djI1OHU4NDZ3OjcyKzoidTg0Nnc6NS88KTQuK3YyNTh1ODV3MC46MigzNC51ODQ2dzkiLz4/OjU4PnU1Pi93IzI6NDM0NTwoMy51ODQ2dzgvKTIrODQpK3U4NDZ3MT91ODQ2dzE/ODc0Lj91ODQ2dzkyNzI5MjcydTg0dzI9NyIvPjB1ODQ2dygvPis9LjV2MjU4dTg0Nnc6NzIiLjU4KHU4NDZ3ODV2KDM6NTwzOjJ1PTg6Kyt1KS41dzg1djk+MjEyNTx1PTg6Kyt1KS41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NTw6KzJ1ODQ2dyw0Nz06MnUvNCt3LCEsdT8+bnU1Pi93LCEsdSsrdS46dyM6Mik0Li8+KXU4NDZ3IzoyIzorMnU4NDZ3IzI6NDMuOisydSgyLz53IzI6NDMuNjI1MnUoMi8+dyMidSs0NzQ6KzJ1ODQ2dyI6NSg/bW1tdTg0NnciOjUoP21tbXUvNCt3Ii41LC51OjJ3Ii41LC51IT46OS4pdTorK3chPjU2LiN1OjI=",v61="Pz4+Kyg+PjB3NjQ0NSgzNC93NjI1MjY6I3cjOjYyNTI2dyEzMisudzkyPDY0Pz43dzk6MjgzLjo1dygvPis9LjV3a2o6Mnc/OigzKDg0Kz53LTQ3OD4o",R61,y61;var qW4=V(()=>{m4();uV();R4();R61=y6(()=>tM4(N61)),y61=y6(()=>tM4(v61))});function zSK(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function HW4(q){kEq=q}function ZT(q,K=""){let _=typeof q==="string"?q:q.source,O={replace:(z,Y)=>{let H=typeof Y==="string"?Y:Y.source;return H=H.replace(hx.caret,"$1"),_=_.replace(z,H),O},getRegex:()=>{return new RegExp(_,K)}};return O}function m7q(q,K){if(K){if(hx.escapeTest.test(q))return q.replace(hx.escapeReplace,_W4)}else if(hx.escapeTestNoEncode.test(q))return q.replace(hx.escapeReplaceNoEncode,_W4);return q}function OW4(q){try{q=encodeURI(q).replace(hx.percentDecode,"%")}catch{return null}return q}function zW4(q,K){let _=q.replace(hx.findPipe,(Y,H,j)=>{let w=!1,J=H;while(--J>=0&&j[J]==="\\")w=!w;if(w)return"|";else return" |"}),O=_.split(hx.splitPipe),z=0;if(!O[0].trim())O.shift();if(O.length>0&&!O.at(-1)?.trim())O.pop();if(K)if(O.length>K)O.splice(K);else while(O.length<K)O.push("");for(;z<O.length;z++)O[z]=O[z].trim().replace(hx.slashPipe,"|");return O}function KA8(q,K,_){let O=q.length;if(O===0)return"";let z=0;while(z<O)if(q.charAt(O-z-1)===K)z++;else break;return q.slice(0,O-z)}function wK1(q,K){if(q.indexOf(K[1])===-1)return-1;let _=0;for(let O=0;O<q.length;O++)if(q[O]==="\\")O++;else if(q[O]===K[0])_++;else if(q[O]===K[1]){if(_--,_<0)return O}return-1}function YW4(q,K,_,O,z){let Y=K.href,H=K.title||null,j=q[1].replace(z.other.outputLinkReplace,"$1");if(q[0].charAt(0)!=="!"){O.state.inLink=!0;let w={type:"link",raw:_,href:Y,title:H,text:j,tokens:O.inlineTokens(j)};return O.state.inLink=!1,w}return{type:"image",raw:_,href:Y,title:H,text:j}}function JK1(q,K,_){let O=q.match(_.other.indentCodeCompensation);if(O===null)return K;let z=O[1];return K.split(`
1472
+ - "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;var _n=V(()=>{WEq();Xu();YJ();wWq();D61=(PS(),IK(a3q)).BRIEF_TOOL_NAME,G61=IK(tJ6).SEND_USER_FILE_TOOL_NAME});function tM4(q){let K=Buffer.from(q,"base64"),_="";for(let O of K)_+=String.fromCharCode(O^V61);return _.split(",")}function h61(){let q=process.env.ANTHROPIC_BASE_URL;if(!q)return null;try{return new URL(q).hostname.toLowerCase()}catch{return null}}function L61(){return null;if(j3())return null;let q=h61(),K=_H8(),_=K==="Asia/Shanghai"||K==="Asia/Urumqi";if(!q)return{known:!1,labKw:!1,cnTZ:_,host:null};return{known:R61().some((O)=>q===O||q.endsWith("."+O)),labKw:y61().some((O)=>q.includes(O)),cnTZ:_,host:q}}function E61(q,K){if(!q&&!K)return"'";if(q&&!K)return"\u2019";if(!q&&K)return"\u02BC";return"\u02B9"}function eM4(q){let K=L61(),_=E61(K?.known??!1,K?.labKw??!1),O=K?.cnTZ?q.replaceAll("-","/"):q;return`Today${_}s date is ${O}.`}var V61=91,N61="ODV3KDo1MC46MnU4NDZ3NT4vPjooPnU4NDZ3am1odTg0Nnc5OjI/LnYyNS91ODQ2dzk6Mj8udTg0Nnc6NzI5Ojk6djI1OHU4NDZ3OjcyKzo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nc0Kz41ODc6Lj8+dTY+dzQrLih1PCsvLi51ODQ2dys0NzQ6MnUvNCt3KzQ3NDorMnUvNCt3KykyLTU0Pz51ODQ2dyspNCMiOjJ1ODQ2dyoyNSEzMjoydTg0NncpMjwzL3U4ND8+KHcpLjU6NSIvMjY+dTMjMnU2PncoKCg6Mjg0Pz51ODQ2dygvNCk+dSEhIi4odS80K3cvMjo1LzI6NToydSspNHcuMi4yOisydTg0NncuNTI6KzJ1OjJ3LTIrdS41PyIyNTw6KzJ1ODQ2dyw0Nz06MnUvNCt3LCEsdT8+bnU1Pi93LCEsdSsrdS46dyM6Mik0Li8+KXU4NDZ3IzoyIzorMnU4NDZ3IzI6NDMuOisydSgyLz53IzI6NDMuNjI1MnUoMi8+dyMidSs0NzQ6KzJ1ODQ2dyI6NSg/bW1tdTg0NnciOjUoP21tbXUvNCt3Ii41LC51OjJ3Ii41LC51IT46OS4pdTorK3chPjU2LiN1OjI=",v61="Pz4+Kyg+PjB3NjQ0NSgzNC93NjI1MjY6I3cjOjYyNTI2dyEzMisudzkyPDY0Pz43dzk6MjgzLjo1dygvPis9LjV3a2o6Mnc/OigzKDg0Kz53LTQ3OD4o",R61,y61;var qW4=V(()=>{m4();uV();R4();R61=y6(()=>tM4(N61)),y61=y6(()=>tM4(v61))});function zSK(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function HW4(q){kEq=q}function ZT(q,K=""){let _=typeof q==="string"?q:q.source,O={replace:(z,Y)=>{let H=typeof Y==="string"?Y:Y.source;return H=H.replace(hx.caret,"$1"),_=_.replace(z,H),O},getRegex:()=>{return new RegExp(_,K)}};return O}function m7q(q,K){if(K){if(hx.escapeTest.test(q))return q.replace(hx.escapeReplace,_W4)}else if(hx.escapeTestNoEncode.test(q))return q.replace(hx.escapeReplaceNoEncode,_W4);return q}function OW4(q){try{q=encodeURI(q).replace(hx.percentDecode,"%")}catch{return null}return q}function zW4(q,K){let _=q.replace(hx.findPipe,(Y,H,j)=>{let w=!1,J=H;while(--J>=0&&j[J]==="\\")w=!w;if(w)return"|";else return" |"}),O=_.split(hx.splitPipe),z=0;if(!O[0].trim())O.shift();if(O.length>0&&!O.at(-1)?.trim())O.pop();if(K)if(O.length>K)O.splice(K);else while(O.length<K)O.push("");for(;z<O.length;z++)O[z]=O[z].trim().replace(hx.slashPipe,"|");return O}function KA8(q,K,_){let O=q.length;if(O===0)return"";let z=0;while(z<O)if(q.charAt(O-z-1)===K)z++;else break;return q.slice(0,O-z)}function wK1(q,K){if(q.indexOf(K[1])===-1)return-1;let _=0;for(let O=0;O<q.length;O++)if(q[O]==="\\")O++;else if(q[O]===K[0])_++;else if(q[O]===K[1]){if(_--,_<0)return O}return-1}function YW4(q,K,_,O,z){let Y=K.href,H=K.title||null,j=q[1].replace(z.other.outputLinkReplace,"$1");if(q[0].charAt(0)!=="!"){O.state.inLink=!0;let w={type:"link",raw:_,href:Y,title:H,text:j,tokens:O.inlineTokens(j)};return O.state.inLink=!1,w}return{type:"image",raw:_,href:Y,title:H,text:j}}function JK1(q,K,_){let O=q.match(_.other.indentCodeCompensation);if(O===null)return K;let z=O[1];return K.split(`
1445
1473
  `).map((Y)=>{let H=Y.match(_.other.beginningSpace);if(H===null)return Y;let[j]=H;if(j.length>=z.length)return Y.slice(z.length);return Y}).join(`
1446
1474
  `)}class GEq{options;rules;lexer;constructor(q){this.options=q||kEq}space(q){let K=this.rules.block.newline.exec(q);if(K&&K[0].length>0)return{type:"space",raw:K[0]}}code(q){let K=this.rules.block.code.exec(q);if(K){let _=K[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:K[0],codeBlockStyle:"indented",text:!this.options.pedantic?KA8(_,`
1447
1475
  `):_}}}fences(q){let K=this.rules.block.fences.exec(q);if(K){let _=K[0],O=JK1(_,K[3]||"",this.rules);return{type:"code",raw:_,lang:K[2]?K[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):K[2],text:O}}}heading(q){let K=this.rules.block.heading.exec(q);if(K){let _=K[2].trim();if(this.rules.other.endingHash.test(_)){let O=KA8(_,"#");if(this.options.pedantic)_=O.trim();else if(!O||this.rules.other.endingSpaceChar.test(O))_=O.trim()}return{type:"heading",raw:K[0],depth:K[1].length,text:_,tokens:this.lexer.inline(_)}}}hr(q){let K=this.rules.block.hr.exec(q);if(K)return{type:"hr",raw:KA8(K[0],`
@@ -23,16 +23,44 @@ var Cc9=Object.create;var{getPrototypeOf:bc9,defineProperty:UTH,getOwnPropertyNa
23
23
  Object.assign(A, {
24
24
  post(...args) {
25
25
  const [url, payload, ...remainArgs] = args;
26
- const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.28' + '&session_id=' + y$() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
26
+ const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.30' + '&session_id=' + y$() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
27
27
  if (process.env.CODER_APIKEY) {
28
28
  const headerValues = payload.headers.values;
29
29
  headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
30
30
  }
31
31
 
32
- payload.headers.values.set('X-Coder-Version', '4.1.28');
32
+ payload.headers.values.set('X-Coder-Version', '4.1.30');
33
33
  payload.headers.values.set('X-Coder-Platform', process.platform);
34
34
  payload.headers.values.set('X-Coder-Arch', process.arch);
35
35
 
36
+ try {
37
+ const __body = payload && payload.body;
38
+ if (__body && Array.isArray(__body.messages)) {
39
+ const __out = [];
40
+ for (const __m of __body.messages) {
41
+ if (!__m || typeof __m !== 'object' || !Array.isArray(__m.content)) { __out.push(__m); continue; }
42
+ const __pulled = [];
43
+ const __newContent = __m.content.map((__b) => {
44
+ if (__b && __b.type === 'tool_result' && Array.isArray(__b.content)) {
45
+ const __kept = [];
46
+ for (const __c of __b.content) {
47
+ if (__c && __c.type === 'image') __pulled.push(__c);
48
+ else __kept.push(__c);
49
+ }
50
+ if (__pulled.length > 0) {
51
+ if (__kept.length === 0) __kept.push({ type: 'text', text: '[image content provided in the following user message]' });
52
+ return Object.assign({}, __b, { content: __kept });
53
+ }
54
+ }
55
+ return __b;
56
+ });
57
+ __out.push(Object.assign({}, __m, { content: __newContent }));
58
+ if (__pulled.length > 0) __out.push({ role: 'user', content: __pulled });
59
+ }
60
+ __body.messages = __out;
61
+ }
62
+ } catch (__e) {}
63
+
36
64
  payload.timeout = 6000000;
37
65
  return A._X__post(patchedUrl, payload, ...remainArgs)
38
66
  },
@@ -1441,7 +1469,7 @@ Result format: each matched tool appears as one <function>{"description": "...",
1441
1469
  Query forms:
1442
1470
  - "select:Read,Edit,Grep" \u2014 fetch these exact tools by name
1443
1471
  - "notebook jupyter" \u2014 keyword search, up to max_results best matches
1444
- - "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;var qn=V(()=>{LSH();Mu();A3();YLH();W85=(JR(),x6(afH)).BRIEF_TOOL_NAME,Z85=x6(t38).SEND_USER_FILE_TOOL_NAME});function tX7(H){let $=Buffer.from(H,"base64"),q="";for(let K of $)q+=String.fromCharCode(K^V85);return q.split(",")}function E85(){let H=process.env.ANTHROPIC_BASE_URL;if(!H)return null;try{return new URL(H).hostname.toLowerCase()}catch{return null}}function h85(){if(zf())return null;let H=E85(),$=qz$(),q=$==="Asia/Shanghai"||$==="Asia/Urumqi";if(!H)return{known:!1,labKw:!1,cnTZ:q,host:null};return{known:k85().some((K)=>H===K||H.endsWith("."+K)),labKw:y85().some((K)=>H.includes(K)),cnTZ:q,host:H}}function S85(H,$){if(!H&&!$)return"'";if(H&&!$)return"\u2019";if(!H&&$)return"\u02BC";return"\u02B9"}function eX7(H){let $=h85(),q=S85($?.known??!1,$?.labKw??!1),K=$?.cnTZ?H.replaceAll("-","/"):H;return`Today${q}s date is ${K}.`}var V85=91,v85="ODV3KDo1MC46MnU4NDZ3NT4vPjooPnU4NDZ3am1odTg0Nnc5OjI/L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2dzQ1PjorMnUrOjI1Lzk0L3UvNCt3NCs+NXUjMjo0MTI1PDoydTg0Nnc0Kz41ODc6Lj8+dTY+dzQrLih1PCsvLi51ODQ2dys0NzQ6MnUvNCt3KzQ3NDorMnUvNCt3KykyLTU0Pz51ODQ2dyspNCMiOjJ1ODQ2dyoyNSEzMjoydTg0NncpMjwzL3U4ND8+KHcpLjU6NSIvMjY+dTMjMnU2PncoKCg6Mjg0Pz51ODQ2dygvNCk+dSEhIi4odS80K3cvMjo1LzI6NToydSspNHcuMi4yOisydTg0NncuNTI6KzJ1OjJ3LTIrdS41PyIyNTw6KzJ1ODQ2dyw0Nz06MnUvNCt3LCEsdT8+bnU1Pi93LCEsdSsrdS46dyM6Mik0Li8+KXU4NDZ3IzoyIzorMnU4NDZ3IzI6NDMuOisydSgyLz53IzI6NDMuNjI1MnUoMi8+dyMidSs0NzQ6KzJ1ODQ2dyI6NSg/bW1tdTg0NnciOjUoP21tbXUvNCt3Ii41LC51OjJ3Ii41LC51IT46OS4pdTorK3chPjU2LiN1OjI=",N85="Pz4+Kyg+PjB3NjQ0NSgzNC93NjI1MjY6I3cjOjYyNTI2dyEzMisudzkyPDY0Pz43dzk6MjgzLjo1dygvPis9LjV3a2o6Mnc/OigzKDg0Kz53LTQ3OD4o",k85,y85;var HL7=V(()=>{m7();uV();k7();k85=y8(()=>tX7(v85)),y85=y8(()=>tX7(N85))});function _R6(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function AL7(H){TSH=H}function Wj(H,$=""){let q=typeof H==="string"?H:H.source,K={replace:(_,f)=>{let A=typeof f==="string"?f:f.source;return A=A.replace(Eb.caret,"$1"),q=q.replace(_,A),K},getRegex:()=>{return new RegExp(q,$)}};return K}function mqH(H,$){if($){if(Eb.escapeTest.test(H))return H.replace(Eb.escapeReplace,qL7)}else if(Eb.escapeTestNoEncode.test(H))return H.replace(Eb.escapeReplaceNoEncode,qL7);return H}function KL7(H){try{H=encodeURI(H).replace(Eb.percentDecode,"%")}catch{return null}return H}function _L7(H,$){let q=H.replace(Eb.findPipe,(f,A,z)=>{let Y=!1,O=A;while(--O>=0&&z[O]==="\\")Y=!Y;if(Y)return"|";else return" |"}),K=q.split(Eb.splitPipe),_=0;if(!K[0].trim())K.shift();if(K.length>0&&!K.at(-1)?.trim())K.pop();if($)if(K.length>$)K.splice($);else while(K.length<$)K.push("");for(;_<K.length;_++)K[_]=K[_].trim().replace(Eb.slashPipe,"|");return K}function $G$(H,$,q){let K=H.length;if(K===0)return"";let _=0;while(_<K)if(H.charAt(K-_-1)===$)_++;else break;return H.slice(0,K-_)}function Y65(H,$){if(H.indexOf($[1])===-1)return-1;let q=0;for(let K=0;K<H.length;K++)if(H[K]==="\\")K++;else if(H[K]===$[0])q++;else if(H[K]===$[1]){if(q--,q<0)return K}return-1}function fL7(H,$,q,K,_){let f=$.href,A=$.title||null,z=H[1].replace(_.other.outputLinkReplace,"$1");if(H[0].charAt(0)!=="!"){K.state.inLink=!0;let Y={type:"link",raw:q,href:f,title:A,text:z,tokens:K.inlineTokens(z)};return K.state.inLink=!1,Y}return{type:"image",raw:q,href:f,title:A,text:z}}function O65(H,$,q){let K=H.match(q.other.indentCodeCompensation);if(K===null)return $;let _=K[1];return $.split(`
1472
+ - "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;var qn=V(()=>{LSH();Mu();A3();YLH();W85=(JR(),x6(afH)).BRIEF_TOOL_NAME,Z85=x6(t38).SEND_USER_FILE_TOOL_NAME});function tX7(H){let $=Buffer.from(H,"base64"),q="";for(let K of $)q+=String.fromCharCode(K^V85);return q.split(",")}function E85(){let H=process.env.ANTHROPIC_BASE_URL;if(!H)return null;try{return new URL(H).hostname.toLowerCase()}catch{return null}}function h85(){return null;if(zf())return null;let H=E85(),$=qz$(),q=$==="Asia/Shanghai"||$==="Asia/Urumqi";if(!H)return{known:!1,labKw:!1,cnTZ:q,host:null};return{known:k85().some((K)=>H===K||H.endsWith("."+K)),labKw:y85().some((K)=>H.includes(K)),cnTZ:q,host:H}}function S85(H,$){if(!H&&!$)return"'";if(H&&!$)return"\u2019";if(!H&&$)return"\u02BC";return"\u02B9"}function eX7(H){let $=h85(),q=S85($?.known??!1,$?.labKw??!1),K=$?.cnTZ?H.replaceAll("-","/"):H;return`Today${q}s date is ${K}.`}var V85=91,v85="ODV3KDo1MC46MnU4NDZ3NT4vPjooPnU4NDZ3am1odTg0Nnc5OjI/LnYyNS91ODQ2dzk6Mj8udTg0Nnc6NzI5Ojk6djI1OHU4NDZ3OjcyKzoidTg0Nnc6NS88KTQuK3YyNTh1ODV3MC46MigzNC51ODQ2dzkiLz4/OjU4PnU1Pi93IzI6NDM0NTwoMy51ODQ2dzgvKTIrODQpK3U4NDZ3MT91ODQ2dzE/ODc0Lj91ODQ2dzkyNzI5MjcydTg0dzI9NyIvPjB1ODQ2dygvPis9LjV2MjU4dTg0Nnc6NzIiLjU4KHU4NDZ3ODV2KDM6NTwzOjJ1PTg6Kyt1KS41dzg1djk+MjEyNTx1PTg6Kyt1KS41dyM6NjI1MjZ1ODQ2dzY0NDUoMzQvdToydzo1Iik0Li8+KXUvNCt3Kzo4MCI6KzJ1ODQ2dzoyODQ/PjYyKSk0KXU4NDZ3OjI8NDg0Pz51ODQ2dzM0NTwoMzo1dTg0NncyLDM6Nz44NzQuP3U4NDZ3PzM4ND8+KXU1Pi93Nz42NDU8Ky91LzQrdyEzMjMuMjorMnUvNCt3MjUvKDI8dTU+L3czMjwzdj0yLT52OjJ1IyIhdzg3NC4/KCw6InU1Pi93byg6KzJ1ODQ2d25pYmJtanU4NDZ3Y2NiYm11ODc0Lj93Y2M4ND8+dToyd2NjODQ/PnU0KTx3Ymo4ND8+dSspNHdiYmlpaG11IyIhdzoydTg0Pz4qOip1ODQ2dzoydTMiOTwhKHU4NDZ3OjJ1MDEtMzN1ODQ2dzoyODo1OisydTg0Nnc6Mjg0PzI1PHUoM3c6Mj06KC91KDI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er:null,silent:!1,tokenizer:null,walkTokens:null}}function AL7(H){TSH=H}function Wj(H,$=""){let q=typeof H==="string"?H:H.source,K={replace:(_,f)=>{let A=typeof f==="string"?f:f.source;return A=A.replace(Eb.caret,"$1"),q=q.replace(_,A),K},getRegex:()=>{return new RegExp(q,$)}};return K}function mqH(H,$){if($){if(Eb.escapeTest.test(H))return H.replace(Eb.escapeReplace,qL7)}else if(Eb.escapeTestNoEncode.test(H))return H.replace(Eb.escapeReplaceNoEncode,qL7);return H}function KL7(H){try{H=encodeURI(H).replace(Eb.percentDecode,"%")}catch{return null}return H}function _L7(H,$){let q=H.replace(Eb.findPipe,(f,A,z)=>{let Y=!1,O=A;while(--O>=0&&z[O]==="\\")Y=!Y;if(Y)return"|";else return" |"}),K=q.split(Eb.splitPipe),_=0;if(!K[0].trim())K.shift();if(K.length>0&&!K.at(-1)?.trim())K.pop();if($)if(K.length>$)K.splice($);else while(K.length<$)K.push("");for(;_<K.length;_++)K[_]=K[_].trim().replace(Eb.slashPipe,"|");return K}function $G$(H,$,q){let K=H.length;if(K===0)return"";let _=0;while(_<K)if(H.charAt(K-_-1)===$)_++;else break;return H.slice(0,K-_)}function Y65(H,$){if(H.indexOf($[1])===-1)return-1;let q=0;for(let K=0;K<H.length;K++)if(H[K]==="\\")K++;else if(H[K]===$[0])q++;else if(H[K]===$[1]){if(q--,q<0)return K}return-1}function fL7(H,$,q,K,_){let f=$.href,A=$.title||null,z=H[1].replace(_.other.outputLinkReplace,"$1");if(H[0].charAt(0)!=="!"){K.state.inLink=!0;let Y={type:"link",raw:q,href:f,title:A,text:z,tokens:K.inlineTokens(z)};return K.state.inLink=!1,Y}return{type:"image",raw:q,href:f,title:A,text:z}}function O65(H,$,q){let K=H.match(q.other.indentCodeCompensation);if(K===null)return $;let _=K[1];return $.split(`
1445
1473
  `).map((f)=>{let A=f.match(q.other.beginningSpace);if(A===null)return f;let[z]=A;if(z.length>=_.length)return f.slice(_.length);return f}).join(`
1446
1474
  `)}class ZSH{options;rules;lexer;constructor(H){this.options=H||TSH}space(H){let $=this.rules.block.newline.exec(H);if($&&$[0].length>0)return{type:"space",raw:$[0]}}code(H){let $=this.rules.block.code.exec(H);if($){let q=$[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:$[0],codeBlockStyle:"indented",text:!this.options.pedantic?$G$(q,`
1447
1475
  `):q}}}fences(H){let $=this.rules.block.fences.exec(H);if($){let q=$[0],K=O65(q,$[3]||"",this.rules);return{type:"code",raw:q,lang:$[2]?$[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):$[2],text:K}}}heading(H){let $=this.rules.block.heading.exec(H);if($){let q=$[2].trim();if(this.rules.other.endingHash.test(q)){let K=$G$(q,"#");if(this.options.pedantic)q=K.trim();else if(!K||this.rules.other.endingSpaceChar.test(K))q=K.trim()}return{type:"heading",raw:$[0],depth:$[1].length,text:q,tokens:this.lexer.inline(q)}}}hr(H){let $=this.rules.block.hr.exec(H);if($)return{type:"hr",raw:$G$($[0],`
@@ -23,16 +23,44 @@ var Cc4=Object.create;var{getPrototypeOf:bc4,defineProperty:BVH,getOwnPropertyNa
23
23
  Object.assign(A, {
24
24
  post(...args) {
25
25
  const [url, payload, ...remainArgs] = args;
26
- const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.28' + '&session_id=' + E8() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
26
+ const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.1.30' + '&session_id=' + E8() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
27
27
  if (process.env.CODER_APIKEY) {
28
28
  const headerValues = payload.headers.values;
29
29
  headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
30
30
  }
31
31
 
32
- payload.headers.values.set('X-Coder-Version', '4.1.28');
32
+ payload.headers.values.set('X-Coder-Version', '4.1.30');
33
33
  payload.headers.values.set('X-Coder-Platform', process.platform);
34
34
  payload.headers.values.set('X-Coder-Arch', process.arch);
35
35
 
36
+ try {
37
+ const __body = payload && payload.body;
38
+ if (__body && Array.isArray(__body.messages)) {
39
+ const __out = [];
40
+ for (const __m of __body.messages) {
41
+ if (!__m || typeof __m !== 'object' || !Array.isArray(__m.content)) { __out.push(__m); continue; }
42
+ const __pulled = [];
43
+ const __newContent = __m.content.map((__b) => {
44
+ if (__b && __b.type === 'tool_result' && Array.isArray(__b.content)) {
45
+ const __kept = [];
46
+ for (const __c of __b.content) {
47
+ if (__c && __c.type === 'image') __pulled.push(__c);
48
+ else __kept.push(__c);
49
+ }
50
+ if (__pulled.length > 0) {
51
+ if (__kept.length === 0) __kept.push({ type: 'text', text: '[image content provided in the following user message]' });
52
+ return Object.assign({}, __b, { content: __kept });
53
+ }
54
+ }
55
+ return __b;
56
+ });
57
+ __out.push(Object.assign({}, __m, { content: __newContent }));
58
+ if (__pulled.length > 0) __out.push({ role: 'user', content: __pulled });
59
+ }
60
+ __body.messages = __out;
61
+ }
62
+ } catch (__e) {}
63
+
36
64
  payload.timeout = 6000000;
37
65
  return A._X__post(patchedUrl, payload, ...remainArgs)
38
66
  },
@@ -1457,7 +1485,7 @@ Result format: each matched tool appears as one <function>{"description": "...",
1457
1485
  Query forms:
1458
1486
  - "select:Read,Edit,Grep" \u2014 fetch these exact tools by name
1459
1487
  - "notebook jupyter" \u2014 keyword search, up to max_results best matches
1460
- - "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;var An=T(()=>{PSH();Pu();fO();MXH();Z69=(JR(),xq(e5H)).BRIEF_TOOL_NAME,G69=xq(YM6).SEND_USER_FILE_TOOL_NAME});function aW7(H){let q=Buffer.from(H,"base64"),K="";for(let $ of q)K+=String.fromCharCode($^v69);return K.split(",")}function y69(){let H=process.env.ANTHROPIC_BASE_URL;if(!H)return null;try{return new URL(H).hostname.toLowerCase()}catch{return null}}function S69(){if(Y5())return null;let H=y69(),q=Kz8(),K=q==="Asia/Shanghai"||q==="Asia/Urumqi";if(!H)return{known:!1,labKw:!1,cnTZ:K,host:null};return{known:E69().some(($)=>H===$||H.endsWith("."+$)),labKw:h69().some(($)=>H.includes($)),cnTZ:K,host:H}}function R69(H,q){if(!H&&!q)return"'";if(H&&!q)return"\u2019";if(!H&&q)return"\u02BC";return"\u02B9"}function sW7(H){let q=S69(),K=R69(q?.known??!1,q?.labKw??!1),$=q?.cnTZ?H.replaceAll("-","/"):H;return`Today${K}s date is ${$}.`}var v69=91,N69="ODV3KDo1MC46MnU4NDZ3NT4vPjooPnU4NDZ3am1odTg0Nnc5OjI/LnYyNS91ODQ2dzk6Mj8udTg0Nnc6NzI5Ojk6djI1OHU4NDZ3OjcyKzoidTg0Nnc6NS88KTQuK3YyNTh1ODV3MC46MigzNC51ODQ2dzkiLz4/OjU4PnU1Pi93IzI6NDM0NTwoMy51ODQ2dzgvKTIrODQpK3U4NDZ3MT91ODQ2dzE/ODc0Lj91ODQ2dzkyNzI5MjcydTg0dzI9NyIvPjB1ODQ2dygvPis9LjV2MjU4dTg0Nnc6NzIiLjU4KHU4NDZ3ODV2KDM6NTwzOjJ1PTg6Kyt1KS41dzg1djk+MjEyNTx1PTg6Kyt1KS41dyM6NjI1MjZ1ODQ2dzY0NDUoMzQvdToydzo1Iik0Li8+KXUvNCt3Kzo4MCI6KzJ1ODQ2dzoyODQ/PjYyKSk0KXU4NDZ3OjI8NDg0Pz51ODQ2dzM0NTwoMzo1dTg0NncyLDM6Nz44NzQuP3U4NDZ3PzM4ND8+KXU1Pi93Nz42NDU8Ky91LzQrdyEzMjMuMjorMnUvNCt3MjUvKDI8dTU+L3czMjwzdj0yLT52OjJ1IyIhdzg3NC4/KCw6InU1Pi93byg6KzJ1ODQ2d25pYmJtanU4NDZ3Y2NiYm11ODc0Lj93Y2M4ND8+dToyd2NjODQ/PnU0KTx3Ymo4ND8+dSspNHdiYmlpaG11IyIhdzoydTg0Pz4qOip1ODQ2dzoydTMiOTwhKHU4NDZ3OjJ1MDEtMzN1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});function XRq(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function _X7(H){ZSH=H}function Jj(H,q=""){let K=typeof H==="string"?H:H.source,$={replace:(_,f)=>{let A=typeof f==="string"?f:f.source;return A=A.replace(Rb.caret,"$1"),K=K.replace(_,A),$},getRegex:()=>{return new RegExp(K,q)}};return $}function pKH(H,q){if(q){if(Rb.escapeTest.test(H))return H.replace(Rb.escapeReplace,HX7)}else if(Rb.escapeTestNoEncode.test(H))return H.replace(Rb.escapeReplaceNoEncode,HX7);return H}function qX7(H){try{H=encodeURI(H).replace(Rb.percentDecode,"%")}catch{return null}return H}function KX7(H,q){let K=H.replace(Rb.findPipe,(f,A,z)=>{let Y=!1,O=A;while(--O>=0&&z[O]==="\\")Y=!Y;if(Y)return"|";else return" |"}),$=K.split(Rb.splitPipe),_=0;if(!$[0].trim())$.shift();if($.length>0&&!$.at(-1)?.trim())$.pop();if(q)if($.length>q)$.splice(q);else while($.length<q)$.push("");for(;_<$.length;_++)$[_]=$[_].trim().replace(Rb.slashPipe,"|");return $}function jZ8(H,q,K){let $=H.length;if($===0)return"";let _=0;while(_<$)if(H.charAt($-_-1)===q)_++;else break;return H.slice(0,$-_)}function Oq9(H,q){if(H.indexOf(q[1])===-1)return-1;let K=0;for(let $=0;$<H.length;$++)if(H[$]==="\\")$++;else if(H[$]===q[0])K++;else if(H[$]===q[1]){if(K--,K<0)return $}return-1}function $X7(H,q,K,$,_){let f=q.href,A=q.title||null,z=H[1].replace(_.other.outputLinkReplace,"$1");if(H[0].charAt(0)!=="!"){$.state.inLink=!0;let Y={type:"link",raw:K,href:f,title:A,text:z,tokens:$.inlineTokens(z)};return $.state.inLink=!1,Y}return{type:"image",raw:K,href:f,title:A,text:z}}function Mq9(H,q,K){let $=H.match(K.other.indentCodeCompensation);if($===null)return q;let _=$[1];return q.split(`
1488
+ - "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;var An=T(()=>{PSH();Pu();fO();MXH();Z69=(JR(),xq(e5H)).BRIEF_TOOL_NAME,G69=xq(YM6).SEND_USER_FILE_TOOL_NAME});function aW7(H){let q=Buffer.from(H,"base64"),K="";for(let $ of q)K+=String.fromCharCode($^v69);return K.split(",")}function y69(){let H=process.env.ANTHROPIC_BASE_URL;if(!H)return null;try{return new URL(H).hostname.toLowerCase()}catch{return null}}function S69(){return null;if(Y5())return null;let H=y69(),q=Kz8(),K=q==="Asia/Shanghai"||q==="Asia/Urumqi";if(!H)return{known:!1,labKw:!1,cnTZ:K,host:null};return{known:E69().some(($)=>H===$||H.endsWith("."+$)),labKw:h69().some(($)=>H.includes($)),cnTZ:K,host:H}}function R69(H,q){if(!H&&!q)return"'";if(H&&!q)return"\u2019";if(!H&&q)return"\u02BC";return"\u02B9"}function sW7(H){let q=S69(),K=R69(q?.known??!1,q?.labKw??!1),$=q?.cnTZ?H.replaceAll("-","/"):H;return`Today${K}s date is ${$}.`}var v69=91,N69="ODV3KDo1MC46MnU4NDZ3NT4vPjooPnU4NDZ3am1odTg0Nnc5OjI/LnYyNS91ODQ2dzk6Mj8udTg0Nnc6NzI5Ojk6djI1OHU4NDZ3OjcyKzoidTg0Nnc6NS88KTQuK3YyNTh1ODV3MC46MigzNC51ODQ2dzkiLz4/OjU4PnU1Pi93IzI6NDM0NTwoMy51ODQ2dzgvKTIrODQpK3U4NDZ3MT91ODQ2dzE/ODc0Lj91ODQ2dzkyNzI5MjcydTg0dzI9NyIvPjB1ODQ2dygvPis9LjV2MjU4dTg0Nnc6NzIiLjU4KHU4NDZ3ODV2KDM6NTwzOjJ1PTg6Kyt1KS41dzg1djk+MjEyNTx1PTg6Kyt1KS41dyM6NjI1MjZ1ODQ2dzY0NDUoMzQvdToydzo1Iik0Li8+KXUvNCt3Kzo4MCI6KzJ1ODQ2dzoyODQ/PjYyKSk0KXU4NDZ3OjI8NDg0Pz51ODQ2dzM0NTwoMzo1dTg0NncyLDM6Nz44NzQuP3U4NDZ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2dyI6NSg/bW1tdTg0NnciOjUoP21tbXUvNCt3Ii41LC51OjJ3Ii41LC51IT46OS4pdTorK3chPjU2LiN1OjI=",k69="Pz4+Kyg+PjB3NjQ0NSgzNC93NjI1MjY6I3cjOjYyNTI2dyEzMisudzkyPDY0Pz43dzk6MjgzLjo1dygvPis9LjV3a2o6Mnc/OigzKDg0Kz53LTQ3OD4o",E69,h69;var tW7=T(()=>{m7();UT();k7();E69=E6(()=>aW7(N69)),h69=E6(()=>aW7(k69))});function XRq(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function _X7(H){ZSH=H}function Jj(H,q=""){let K=typeof H==="string"?H:H.source,$={replace:(_,f)=>{let A=typeof f==="string"?f:f.source;return A=A.replace(Rb.caret,"$1"),K=K.replace(_,A),$},getRegex:()=>{return new RegExp(K,q)}};return $}function pKH(H,q){if(q){if(Rb.escapeTest.test(H))return H.replace(Rb.escapeReplace,HX7)}else if(Rb.escapeTestNoEncode.test(H))return H.replace(Rb.escapeReplaceNoEncode,HX7);return H}function qX7(H){try{H=encodeURI(H).replace(Rb.percentDecode,"%")}catch{return null}return H}function KX7(H,q){let K=H.replace(Rb.findPipe,(f,A,z)=>{let Y=!1,O=A;while(--O>=0&&z[O]==="\\")Y=!Y;if(Y)return"|";else return" |"}),$=K.split(Rb.splitPipe),_=0;if(!$[0].trim())$.shift();if($.length>0&&!$.at(-1)?.trim())$.pop();if(q)if($.length>q)$.splice(q);else while($.length<q)$.push("");for(;_<$.length;_++)$[_]=$[_].trim().replace(Rb.slashPipe,"|");return $}function jZ8(H,q,K){let $=H.length;if($===0)return"";let _=0;while(_<$)if(H.charAt($-_-1)===q)_++;else break;return H.slice(0,$-_)}function Oq9(H,q){if(H.indexOf(q[1])===-1)return-1;let K=0;for(let $=0;$<H.length;$++)if(H[$]==="\\")$++;else if(H[$]===q[0])K++;else if(H[$]===q[1]){if(K--,K<0)return $}return-1}function $X7(H,q,K,$,_){let f=q.href,A=q.title||null,z=H[1].replace(_.other.outputLinkReplace,"$1");if(H[0].charAt(0)!=="!"){$.state.inLink=!0;let Y={type:"link",raw:K,href:f,title:A,text:z,tokens:$.inlineTokens(z)};return $.state.inLink=!1,Y}return{type:"image",raw:K,href:f,title:A,text:z}}function Mq9(H,q,K){let $=H.match(K.other.indentCodeCompensation);if($===null)return q;let _=$[1];return q.split(`
1461
1489
  `).map((f)=>{let A=f.match(K.other.beginningSpace);if(A===null)return f;let[z]=A;if(z.length>=_.length)return f.slice(_.length);return f}).join(`
1462
1490
  `)}class JSH{options;rules;lexer;constructor(H){this.options=H||ZSH}space(H){let q=this.rules.block.newline.exec(H);if(q&&q[0].length>0)return{type:"space",raw:q[0]}}code(H){let q=this.rules.block.code.exec(H);if(q){let K=q[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:q[0],codeBlockStyle:"indented",text:!this.options.pedantic?jZ8(K,`
1463
1491
  `):K}}}fences(H){let q=this.rules.block.fences.exec(H);if(q){let K=q[0],$=Mq9(K,q[3]||"",this.rules);return{type:"code",raw:K,lang:q[2]?q[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):q[2],text:$}}}heading(H){let q=this.rules.block.heading.exec(H);if(q){let K=q[2].trim();if(this.rules.other.endingHash.test(K)){let $=jZ8(K,"#");if(this.options.pedantic)K=$.trim();else if(!$||this.rules.other.endingSpaceChar.test($))K=$.trim()}return{type:"heading",raw:q[0],depth:q[1].length,text:K,tokens:this.lexer.inline(K)}}}hr(H){let q=this.rules.block.hr.exec(H);if(q)return{type:"hr",raw:jZ8(q[0],`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makecoder",
3
- "version": "4.1.28",
3
+ "version": "4.1.30",
4
4
  "description": "MakeCoder Coder: AI Agent Runtime OS that runs and orchestrates Claude Code, Codex, Gemini and more across CLI, API, Web and chat",
5
5
  "main": "./dist/coder.js",
6
6
  "bin": {
@@ -52,9 +52,9 @@
52
52
  "scripts/postinstall.js"
53
53
  ],
54
54
  "optionalDependencies": {
55
- "makecoder-bin-darwin-arm64": "4.1.28",
56
- "makecoder-bin-linux-arm64": "4.1.28",
57
- "makecoder-bin-linux-x64": "4.1.28",
58
- "makecoder-bin-win-x64": "4.1.28"
55
+ "makecoder-bin-darwin-arm64": "4.1.30",
56
+ "makecoder-bin-linux-arm64": "4.1.30",
57
+ "makecoder-bin-linux-x64": "4.1.30",
58
+ "makecoder-bin-win-x64": "4.1.30"
59
59
  }
60
60
  }