Lines 1-21javascript
2import{createRequire as ___cr}from'module';import{fileURLToPath as ___fu}from'url';import{dirname as ___dn}from'path';const require=___cr(import.meta.url);const __filename=___fu(import.meta.url);const __dirname=___dn(__filename);
3var Yu=Object.create;var gs=Object.defineProperty;var Vu=Object.getOwnPropertyDescriptor;var Ku=Object.getOwnPropertyNames;var zu=Object.getPrototypeOf,Xu=Object.prototype.hasOwnProperty;var Z=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(
4`),1;let o=process.env.MIO_AGENT_PROXY_TOKEN_FILE;if(!o)return r.write(JSON.stringify({ok:!1,code:"MISSING_PROXY_TOKEN",message:"MIO_AGENT_PROXY_TOKEN_FILE is not set"})+`
CriticalCredential Exfiltration
Source appears to send environment or credential material to an external endpoint.
dist/cli/index.jsView on unpkg · L1 CriticalTrigger Reachable Dangerous Capability
A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.
dist/cli/index.jsView on unpkg · L1 MediumInstall Persistence
Source writes installer persistence such as shell profile or service configuration.
dist/cli/index.jsView on unpkg · L1 5`),1;let a;try{a=ao(o,"utf8").trim()}catch(u){let h=u instanceof Error?u.message:String(u);return r.write(JSON.stringify({ok:!1,code:"MISSING_PROXY_TOKEN",message:`Cannot read proxy token file: ${h}`})+`
6`),1}if(!a)return r.write(JSON.stringify({ok:!1,code:"MISSING_PROXY_TOKEN",message:"Proxy token file is empty"})+`
7`),1;let[c,l,...d]=n;return c==="message"?rf(l,d,i,a,s,t,r):c==="task"?lf(l,d,i,a,t,r):c==="reminder"?yf(l,d,i,a,t,r):c==="action"?Rf(l,d,i,a,t,r):c==="attachment"?Nf(l,d,i,a,t,r):c==="profile"?$f(l,d,i,a,t,r):(r.write(JSON.stringify({ok:!1,code:"UNKNOWN_COMMAND",message:`Unknown command: ${n.join(" ")}`})+`
8`),1)}async function rf(n,e,t,r,s,i,o){switch(n){case"check":return sf(e,t,r,i,o);case"send":return of(e,t,r,s,i,o);case"read":return af(e,t,r,i,o);case"react":return cf(e,t,r,i,o);case"reply":return df(e,t,r,s,i,o);default:return o.write(JSON.stringify({ok:!1,code:"UNKNOWN_COMMAND",message:`Unknown message subcommand: ${n??"(none)"}. Try --help.`})+`
9`),1}}async function sf(n,e,t,r,s){let i=U(n,"--channel");if(!i)return s.write(JSON.stringify({ok:!1,code:"MISSING_ARG",message:"--channel <#name> is required for message check"})+`
10`),1;let o=await ce(e,t,"check",{channel:i});return o.ok?(fo(o.data,r),0):(s.write(JSON.stringify(o.error)+`
11`),1)}async function of(n,e,t,r,s,i){let o=U(n,"--target");if(!o)return i.write(JSON.stringify({ok:!1,code:"MISSING_ARG",message:"--target <#name> is required for message send"})+`
12`),1;if(r.isTTY)return i.write(JSON.stringify({ok:!1,code:"NO_STDIN",message:'message body must be piped on stdin, e.g. mio message send --target "#x" <<EOF'})+`
13`),1;let a=await ho(r);if(a.trim()==="")return i.write(JSON.stringify({ok:!1,code:"EMPTY_MESSAGE",message:"message body is empty \u2014 nothing to send"})+`
14`),1;let c=co(),l=tr(n,"--attachment");for(let w of tr(n,"--attach-file")){let k=await ys(w,o,e,t);if(!k.ok)return i.write(JSON.stringify(k.error)+`
15`),1;l.push(k.id)}let d={target:o,content:a,clientIdempotencyKey:c};l.length>0&&(d.attachment_ids=l);let u=await ce(e,t,"send",d);if(!u.ok)return i.write(JSON.stringify(u.error)+`
16`),1;let h=u.data,f=String(h.id??""),g=String(h.short_id??h.shortId??"").slice(0,8),m=h.seq!==void 0?`seq=${h.seq} `:"",y=typeof h.routed_to=="string"?h.routed_to:"",T=typeof h.task_number=="number"?h.task_number:null,v="";return y==="thread"&&T!==null&&(v=` (auto-routed to thread of task #${T} \u2014 you have an active task in this channel, so this send went into its thread, NOT the main channel. Tell users your message is in the task thread, not main.)`),s.write(`sent: id=${f} ${g?`short=${g} `:""}${m}target=${o}${v}
17`),0}async function af(n,e,t,r,s){let i=U(n,"--channel");if(!i)return s.write(JSON.stringify({ok:!1,code:"MISSING_ARG",message:"--channel <#name> is required for message read"})+`
18`),1;let o={channel:i},a=U(n,"--after"),c=U(n,"--around"),l=U(n,"--before"),d=U(n,"--limit");if([a,c,l].filter(f=>f!==void 0).length>1)return s.write(JSON.stringify({ok:!1,code:"CONFLICTING_ANCHORS",message:"only one of --after, --around, --before may be provided"})+`
19`),1;if(a&&(o.after_seq=a),c&&(o.around=c),l&&(o.around=l),d!==void 0){let f=Number(d);if(!Number.isInteger(f)||f<=0)return s.write(JSON.stringify({ok:!1,code:"INVALID_LIMIT",message:`--limit must be a positive integer, got: ${d}`})+`
20`),1;o.limit=f}let h=await ce(e,t,"history",o);return h.ok?(fo(h.data,r),0):(s.write(JSON.stringify(h.error)+`
21`),1)}async function cf(n,e,t,r,s){let i=at(n);if(!i)return s.write(JSON.stringify({ok:!1,code:"MISSING_ARG",message:"a message id is required for message react"})+`
Long lines were clipped for display.