agentix-cli 0.126.1 → 0.127.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-BUYK4EGC.js → App-FF66N2KH.js} +2 -2
- package/dist/{ChatApp-ZS6EPDDK.js → ChatApp-HMHQZVVD.js} +2 -2
- package/dist/{absorb-eval-5Y5IZWW2.js → absorb-eval-ERKVVTGG.js} +2 -2
- package/dist/{agent-WJTYM5HR.js → agent-UAWDO3I2.js} +2 -2
- package/dist/{board-dashboard-DQR2OSV7.js → board-dashboard-Y2OECKDG.js} +303 -228
- package/dist/board-dashboard-Y2OECKDG.js.map +1 -0
- package/dist/{chunk-JUIL2EW3.js → chunk-3KYZOC7N.js} +2 -2
- package/dist/{chunk-JIXNSA67.js → chunk-4WZGZ2Z6.js} +2 -2
- package/dist/chunk-52SIHG45.js +4 -0
- package/dist/chunk-52SIHG45.js.map +1 -0
- package/dist/{chunk-FHBPKMCF.js → chunk-73WQ42PO.js} +2 -2
- package/dist/{chunk-6GLJIA25.js → chunk-CKYPQMUD.js} +2 -2
- package/dist/chunk-COWAAE54.js +128 -0
- package/dist/chunk-COWAAE54.js.map +1 -0
- package/dist/{chunk-ZQWWMAMJ.js → chunk-EHLTZ6IB.js} +2 -2
- package/dist/{chunk-Z7XXUYBB.js → chunk-EJT3F6QM.js} +33 -35
- package/dist/chunk-EJT3F6QM.js.map +1 -0
- package/dist/{chunk-LVV7JBHM.js → chunk-HNBW5Q47.js} +2 -2
- package/dist/{chunk-4VUGJB5S.js → chunk-HYRBBH6T.js} +98 -98
- package/dist/chunk-HYRBBH6T.js.map +1 -0
- package/dist/{chunk-CY6ABHF2.js → chunk-I4DGMFQG.js} +2 -2
- package/dist/{chunk-VXKNB4AW.js → chunk-LTH3AYXC.js} +2 -2
- package/dist/{chunk-O4XEQTEN.js → chunk-NUSROFTJ.js} +3 -3
- package/dist/chunk-NUSROFTJ.js.map +1 -0
- package/dist/chunk-O6FP3LPC.js +4 -0
- package/dist/chunk-O6FP3LPC.js.map +1 -0
- package/dist/{chunk-WMTGAVPW.js → chunk-PH43FUU7.js} +2 -2
- package/dist/{chunk-2W3X6H7Z.js → chunk-PLIT25TH.js} +2 -2
- package/dist/chunk-QUXMLLX5.js +2 -0
- package/dist/chunk-QUXMLLX5.js.map +1 -0
- package/dist/{chunk-D6SWAB5J.js → chunk-QWQOI4G4.js} +32 -32
- package/dist/chunk-QWQOI4G4.js.map +1 -0
- package/dist/{chunk-YNA5T43U.js → chunk-TJ4P4WW2.js} +2 -2
- package/dist/{chunk-2C3X6DVD.js → chunk-UJXS4MS3.js} +2 -2
- package/dist/{chunk-GUQDPA6R.js → chunk-VBJTGTF5.js} +2 -2
- package/dist/{chunk-FVG2BADS.js → chunk-XX5QKBX4.js} +2 -2
- package/dist/{chunk-QQYXYJOG.js → chunk-XYT6XY7G.js} +2 -2
- package/dist/{chunk-46JKX6CT.js → chunk-Y27RUOD2.js} +10 -10
- package/dist/chunk-Y27RUOD2.js.map +1 -0
- package/dist/{chunk-WUDVBPQV.js → chunk-YV22EOGL.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{client-PO5LDFS4.js → client-2VVRJ3UF.js} +2 -2
- package/dist/{config-L2RQ6EJX.js → config-YSKHOV44.js} +2 -2
- package/dist/config-mutate-47WZDZBO.js +2 -0
- package/dist/config-mutator-7DIEQUB5.js +2 -0
- package/dist/doctor-Q3QNZVLC.js +2 -0
- package/dist/{follow-up-tool-AIOLNUF7.js → follow-up-tool-GKZVG4L2.js} +2 -2
- package/dist/{follow-up-tool-AIOLNUF7.js.map → follow-up-tool-GKZVG4L2.js.map} +1 -1
- package/dist/hub-DNPINTIF.js +2 -0
- package/dist/index.d.ts +115 -50
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/notes-YLTNRMB5.js +2 -0
- package/dist/notes-settings-X63D5HPM.js +2 -0
- package/dist/{program-EYGICEXY.js → program-4QWUOJE3.js} +214 -214
- package/dist/program-4QWUOJE3.js.map +1 -0
- package/dist/{promote-MQYJMGGZ.js → promote-PETKX7KR.js} +2 -2
- package/dist/query-D44BUTH3.js +2 -0
- package/dist/registry-2XDO53AJ.js +2 -0
- package/dist/{request-planner-XYHM26CO.js → request-planner-A3WJNPXO.js} +2 -2
- package/dist/{review-candidates-XRBAMRBH.js → review-candidates-A6ID2RDX.js} +2 -2
- package/dist/routing-NPP3MEUW.js +2 -0
- package/dist/schedule-tool-ZECUQMQK.js +2 -0
- package/dist/scheduler-T6VLBM3U.js +2 -0
- package/dist/scheduler-T6VLBM3U.js.map +1 -0
- package/dist/{seat-LKBZ6SDS.js → seat-D3DBYTSC.js} +2 -2
- package/dist/seat-D3DBYTSC.js.map +1 -0
- package/dist/{select-BSC3TFMZ.js → select-RFY64RY7.js} +2 -2
- package/dist/{set-enabled-YWXWSKME.js → set-enabled-AU66DR5C.js} +2 -2
- package/dist/{tool-FZEC5FQX.js → tool-F3YA2ZZQ.js} +2 -2
- package/dist/{tool-FZEC5FQX.js.map → tool-F3YA2ZZQ.js.map} +1 -1
- package/dist/{tool-5JTCSRTW.js → tool-PCHIVR27.js} +2 -2
- package/dist/{tool-5JTCSRTW.js.map → tool-PCHIVR27.js.map} +1 -1
- package/dist/wiki-NI3ZPUZS.js +2 -0
- package/dist/wiki-NI3ZPUZS.js.map +1 -0
- package/package.json +1 -1
- package/dist/board-dashboard-DQR2OSV7.js.map +0 -1
- package/dist/chunk-46JKX6CT.js.map +0 -1
- package/dist/chunk-4VUGJB5S.js.map +0 -1
- package/dist/chunk-5DFUUYEA.js +0 -126
- package/dist/chunk-5DFUUYEA.js.map +0 -1
- package/dist/chunk-D6SWAB5J.js.map +0 -1
- package/dist/chunk-O4XEQTEN.js.map +0 -1
- package/dist/chunk-Z7XXUYBB.js.map +0 -1
- package/dist/config-mutator-44OAOZXM.js +0 -2
- package/dist/doctor-AU5TCOSG.js +0 -2
- package/dist/hub-53YQQCVA.js +0 -2
- package/dist/program-EYGICEXY.js.map +0 -1
- package/dist/query-DNJONEKC.js +0 -2
- package/dist/registry-5A3SLBVJ.js +0 -2
- package/dist/routing-OMIWZKNC.js +0 -2
- package/dist/schedule-tool-YRANRFHO.js +0 -2
- package/dist/scheduler-L4P4Z55R.js +0 -2
- package/dist/wiki-BT3H2WCD.js +0 -2
- /package/dist/{App-BUYK4EGC.js.map → App-FF66N2KH.js.map} +0 -0
- /package/dist/{ChatApp-ZS6EPDDK.js.map → ChatApp-HMHQZVVD.js.map} +0 -0
- /package/dist/{absorb-eval-5Y5IZWW2.js.map → absorb-eval-ERKVVTGG.js.map} +0 -0
- /package/dist/{agent-WJTYM5HR.js.map → agent-UAWDO3I2.js.map} +0 -0
- /package/dist/{chunk-JUIL2EW3.js.map → chunk-3KYZOC7N.js.map} +0 -0
- /package/dist/{chunk-JIXNSA67.js.map → chunk-4WZGZ2Z6.js.map} +0 -0
- /package/dist/{chunk-FHBPKMCF.js.map → chunk-73WQ42PO.js.map} +0 -0
- /package/dist/{chunk-6GLJIA25.js.map → chunk-CKYPQMUD.js.map} +0 -0
- /package/dist/{chunk-ZQWWMAMJ.js.map → chunk-EHLTZ6IB.js.map} +0 -0
- /package/dist/{chunk-LVV7JBHM.js.map → chunk-HNBW5Q47.js.map} +0 -0
- /package/dist/{chunk-CY6ABHF2.js.map → chunk-I4DGMFQG.js.map} +0 -0
- /package/dist/{chunk-VXKNB4AW.js.map → chunk-LTH3AYXC.js.map} +0 -0
- /package/dist/{chunk-WMTGAVPW.js.map → chunk-PH43FUU7.js.map} +0 -0
- /package/dist/{chunk-2W3X6H7Z.js.map → chunk-PLIT25TH.js.map} +0 -0
- /package/dist/{chunk-YNA5T43U.js.map → chunk-TJ4P4WW2.js.map} +0 -0
- /package/dist/{chunk-2C3X6DVD.js.map → chunk-UJXS4MS3.js.map} +0 -0
- /package/dist/{chunk-GUQDPA6R.js.map → chunk-VBJTGTF5.js.map} +0 -0
- /package/dist/{chunk-FVG2BADS.js.map → chunk-XX5QKBX4.js.map} +0 -0
- /package/dist/{chunk-QQYXYJOG.js.map → chunk-XYT6XY7G.js.map} +0 -0
- /package/dist/{chunk-WUDVBPQV.js.map → chunk-YV22EOGL.js.map} +0 -0
- /package/dist/{client-PO5LDFS4.js.map → client-2VVRJ3UF.js.map} +0 -0
- /package/dist/{config-L2RQ6EJX.js.map → config-YSKHOV44.js.map} +0 -0
- /package/dist/{config-mutator-44OAOZXM.js.map → config-mutate-47WZDZBO.js.map} +0 -0
- /package/dist/{doctor-AU5TCOSG.js.map → config-mutator-7DIEQUB5.js.map} +0 -0
- /package/dist/{hub-53YQQCVA.js.map → doctor-Q3QNZVLC.js.map} +0 -0
- /package/dist/{promote-MQYJMGGZ.js.map → hub-DNPINTIF.js.map} +0 -0
- /package/dist/{query-DNJONEKC.js.map → notes-YLTNRMB5.js.map} +0 -0
- /package/dist/{registry-5A3SLBVJ.js.map → notes-settings-X63D5HPM.js.map} +0 -0
- /package/dist/{routing-OMIWZKNC.js.map → promote-PETKX7KR.js.map} +0 -0
- /package/dist/{schedule-tool-YRANRFHO.js.map → query-D44BUTH3.js.map} +0 -0
- /package/dist/{scheduler-L4P4Z55R.js.map → registry-2XDO53AJ.js.map} +0 -0
- /package/dist/{request-planner-XYHM26CO.js.map → request-planner-A3WJNPXO.js.map} +0 -0
- /package/dist/{review-candidates-XRBAMRBH.js.map → review-candidates-A6ID2RDX.js.map} +0 -0
- /package/dist/{seat-LKBZ6SDS.js.map → routing-NPP3MEUW.js.map} +0 -0
- /package/dist/{wiki-BT3H2WCD.js.map → schedule-tool-ZECUQMQK.js.map} +0 -0
- /package/dist/{select-BSC3TFMZ.js.map → select-RFY64RY7.js.map} +0 -0
- /package/dist/{set-enabled-YWXWSKME.js.map → set-enabled-AU66DR5C.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as ft,c as gt}from"./chunk-GLQLCBJS.js";import{
|
|
1
|
+
import{b as ft,c as gt}from"./chunk-GLQLCBJS.js";import{b as it,e as st,f as at,i as ct,k as ut,l as pt,q as mt}from"./chunk-COWAAE54.js";import{a as dt}from"./chunk-GV7S5BAX.js";import{c as lt}from"./chunk-SZDACK6O.js";import{b as ye}from"./chunk-AFRHKA7B.js";import{c as nt,e as rt,f as ot}from"./chunk-KA2UIZXG.js";import{e as Qe,g as et,h as tt,i as we}from"./chunk-GQ76J72O.js";import{y as Ve,z as En}from"./chunk-3KYZOC7N.js";import{b as Ge,f as Dn}from"./chunk-72SZI2UW.js";import{a as Ze,b as ge,c as me,d as Xe,e as he}from"./chunk-QD6IICK7.js";import{c as Je,d as Ye}from"./chunk-QOYAX2FT.js";import{f as fe,n as On}from"./chunk-UIBUZ2N3.js";import{existsSync as Mn,mkdirSync as ht,readFileSync as Fn,writeFileSync as jn,renameSync as Cn}from"fs";import{resolve as wt,dirname as _n}from"path";var yt=class{filePath;log;constructor(e={}){let t=e.baseDir??wt(process.cwd(),".agentx");this.filePath=wt(t,"handover.json"),this.log=e.log??console.error.bind(console,"[handover]"),ht(t,{recursive:!0})}key(e,t,r){return`${e}::${t}::${r||"-"}`}load(){if(!Mn(this.filePath))return{version:1,overrides:{}};try{let e=Fn(this.filePath,"utf-8"),t=JSON.parse(e);return!t||typeof t!="object"?{version:1,overrides:{}}:(t.overrides||(t.overrides={}),t)}catch(e){return this.log(`load failed, starting empty: ${e?.message||e}`),{version:1,overrides:{}}}}save(e){ht(_n(this.filePath),{recursive:!0});let t=`${this.filePath}.tmp-${process.pid}`;jn(t,JSON.stringify(e,null,2)),Cn(t,this.filePath)}get(e,t,r){let i=this.load().overrides[this.key(e,t,r)];if(i&&!(i.expiresAt&&Date.parse(i.expiresAt)<Date.now()))return i}set(e){if(!e.channel||!e.chatId||!e.toAgent)throw new Error("channel, chatId and toAgent are required");let t=this.load(),r={...e,createdAt:e.createdAt??new Date().toISOString()};return t.overrides[this.key(r.channel,r.chatId,r.accountId)]=r,this.save(t),r}remove(e,t,r){let o=this.load(),i=this.key(e,t,r);return i in o.overrides?(delete o.overrides[i],this.save(o),!0):!1}consumeSummary(e,t,r){let o=this.load(),i=o.overrides[this.key(e,t,r)];if(!i||!i.summary||i.summaryConsumedAt)return;let a=i.summary;return i.summaryConsumedAt=new Date().toISOString(),this.save(o),a}listActive(){let e=this.load(),t=Date.now();return Object.values(e.overrides).filter(r=>!r.expiresAt||Date.parse(r.expiresAt)>=t)}listByAgent(e){let t=this.listActive();return{incoming:t.filter(r=>r.toAgent===e),outgoing:t.filter(r=>r.fromAgent===e)}}};import{readFileSync as $t,writeFileSync as ke,appendFileSync as Bn,mkdirSync as Kn,existsSync as St,statSync as zn}from"fs";import{resolve as J}from"path";var kt="[Agent Memory \u2014 persistent facts from past conversations]",Ln=2400;function bt(n,e){return n?`UNVERIFIED (${e===null?"age unknown":`${e}d old`}) `:""}function Un(n,e=Date.now()){let t=rt(n,e),r=n.undated?"UNVERIFIED (never checked) ":bt(t,Qe(n.verifiedAt,e));return{line:`- [wiki ${n.id}] ${r}${n.subject} \xB7 ${n.attribute}: ${n.value} (${n.source}, checked ${n.verifiedAt.slice(0,10)} by ${n.verifiedBy})`,unverified:t}}function Hn(n,e){let r=!n.source.chatId.startsWith("-")&&/^\d+$/.test(n.source.chatId)?"DM":n.source.chatId,o=tt(n,e);return{line:`- [${n.category}] ${bt(o,et(n,e))}${n.content} (${r}, ${n.source.date})`,unverified:o}}function vt(n,e=[],t=Date.now()){let r=[],o=new Set,i=kt.length,a=!1;for(let s of n){let d=e.length>0?ot(s.content,e):null,l,p,u=d&&Date.parse(s.createdAt)>Date.parse(d.verifiedAt)&&!s.content.toLowerCase().includes(d.value.toLowerCase());if(d&&!u){if(o.has(d.id))continue;o.add(d.id),l=Un(d,t),p=d.id}else l=Hn(s,t),d&&(l.line+=` [differs from wiki ${d.id}]`);let f=l.unverified&&!a?we.length:0;if(i+f+l.line.length>Ln)break;r.push({fact:s,...l,...p?{wikiRef:p}:{}}),i+=f+l.line.length,f&&(a=!0)}return r}function It(n){if(n.length===0)return"";let e=n.some(t=>t.unverified)?[we]:[];return[kt,...e,...n.map(t=>t.line),"[End Memory]"].join(`
|
|
2
2
|
`)}var At=200,qn=7,Rt=class{memoryDir;ledger;constructor(e=process.cwd()){this.memoryDir=J(e,".agentx/memory"),this.ledger=new nt(J(e,".agentx/wiki")),St(this.memoryDir)||Kn(this.memoryDir,{recursive:!0})}filePath(e){return J(this.memoryDir,`${e}.jsonl`)}addMemory(e,t){if(t.category==="secret"||ge(t.content))return!1;let r=t.source.trust??Ze(t.source.channel),o=t.review??Xe(r),i={...t,source:{...t.source,trust:r},...o?{review:o}:{},id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,createdAt:new Date().toISOString()};return Bn(this.filePath(e),JSON.stringify(i)+`
|
|
3
3
|
`),!0}parsedCache=new Map;getAll(e){let t=this.filePath(e);if(!St(t))return[];try{let{mtimeMs:r,size:o}=zn(t),i=this.parsedCache.get(t);if(i&&i.mtimeMs===r&&i.size===o)return i.facts.slice();let s=$t(t,"utf-8").split(`
|
|
4
4
|
`).filter(d=>d.trim()).map(d=>{try{return JSON.parse(d)}catch{return null}}).filter(d=>d!==null);return this.parsedCache.set(t,{mtimeMs:r,size:o,facts:s}),s.slice()}catch{return[]}}findRelevant(e,t,r=8){let o=this.getAll(t).filter(he);if(o.length===0)return[];let i=o.map(g=>`${g.keywords.join(" ")} ${g.content}`),a=J(this.memoryDir,`${t}_bm25_cache.json`),s=Ye(i,a),d=Je(e,s),l=new Map(d.map(g=>[g.docIndex,g.score])),u=o.map((g,h)=>{let y=l.get(h)??0;return g.category==="commitment"&&(y+=1),{memory:g,score:y}}).filter(g=>g.score>0);if(u.length===0)return o.slice(-r);let f=u.sort((g,h)=>h.score-g.score).slice(0,r).map(g=>g.memory);if(f.length>0)try{this.recordAccess(t,f.map(g=>g.id))}catch{}return f}buildContext(e){return It(this.contextLines(e))}contextFacts(e){return this.contextLines(e).map(t=>t.fact)}contextLines(e){let t=[];try{t=this.ledger.list()}catch{}return vt(e,t)}recordAccess(e,t){if(t.length===0)return;let r=this.getAll(e),o=new Set(t),i=!1;for(let a of r)if(o.has(a.id)){a.accessCount=(a.accessCount||0)+1,a.lastAccessed=new Date().toISOString();let s=a.intervalDays||1;a.intervalDays=Math.min(s*2,30),a.nextReview=new Date(Date.now()+a.intervalDays*864e5).toISOString(),i=!0}i&&ke(this.filePath(e),r.map(a=>JSON.stringify(a)).join(`
|
|
@@ -34,4 +34,4 @@ ${n.text}`}async function se(n,e){let t=n.channels[e.channel],r={channel:e.chann
|
|
|
34
34
|
`).filter(Boolean),o=[];for(let i=r.length-1;i>=0&&o.length<t;i--)try{let a=JSON.parse(r[i]);(!e||a.person===e)&&o.push(a)}catch{}return o}load(){if(He(this.file))try{let e=JSON.parse(Be(this.file,"utf-8"));if(e&&Array.isArray(e.devices))return e}catch{}return{devices:[]}}save(e){gn(wn(this.file),{recursive:!0});let t=`${this.file}.${process.pid}.${kn(4).toString("hex")}.tmp`;hn(t,JSON.stringify(e,null,2)+`
|
|
35
35
|
`,{encoding:"utf-8",mode:384}),mn(t,this.file)}};import{extname as Uo}from"path";var vn=/<agentx-artifact>([\s\S]*?)<\/agentx-artifact>/gi,In=/<agentx-artifact>[\s\S]*$/i;function Sa(n,e=1/0,t=!1){let r=[],o=String(n??"");if(!/<agentx-artifact>/i.test(o))return{text:o,artifacts:r};let i=o.replace(vn,(a,s)=>{try{let d=JSON.parse(s.trim());if(d&&typeof d.filename=="string"&&typeof d.mime=="string"&&r.length<e){let l=d.mime,p=l.startsWith("image/")?"image":l==="application/pdf"?"pdf":l.startsWith("text/")?"text":"file";r.push({type:p,filename:d.filename,mime:l})}}catch{}return""});return{text:(t?i.replace(In,""):i).trim(),artifacts:r}}function Aa(n,e=!1){let t=String(n??""),r=t;if(/<agentx-artifact>/i.test(t)){let o=t.replace(vn,(i,a)=>{try{let s=JSON.parse(a.trim());return s&&typeof s.filename=="string"?s.filename:""}catch{return""}});r=(e?o.replace(In,""):o).trim()}return r.replace(/```[\s\S]*?```|`[^`\n]*`|!\[([^\]\n]*)\]\(([^)\s]+)\)/g,(o,i,a)=>i===void 0||a===void 0?o:`[${i||a}](${a})`)}var Ho={".png":{mime:"image/png",kind:"image"},".jpg":{mime:"image/jpeg",kind:"image"},".jpeg":{mime:"image/jpeg",kind:"image"},".gif":{mime:"image/gif",kind:"image"},".webp":{mime:"image/webp",kind:"image"},".svg":{mime:"image/svg+xml",kind:"file"},".pdf":{mime:"application/pdf",kind:"file"},".txt":{mime:"text/plain; charset=utf-8",kind:"file"},".md":{mime:"text/markdown; charset=utf-8",kind:"file"},".csv":{mime:"text/csv; charset=utf-8",kind:"file"},".json":{mime:"application/json",kind:"file"},".mp3":{mime:"audio/mpeg",kind:"audio"},".m4a":{mime:"audio/mp4",kind:"audio"},".wav":{mime:"audio/wav",kind:"audio"},".mp4":{mime:"video/mp4",kind:"video"},".webm":{mime:"video/webm",kind:"video"}},Ra={bytes:20*1024*1024,perMessage:20,pathChars:512};function xa(n){return Ho[Uo(n).toLowerCase()]??null}var Bo=["[Phone app: showing files]","To show the owner a file you created (a chart, a screenshot, a PDF, a recording), save or copy it into .agentx/outbox/ in your workspace and end your reply with one line per file:",'<agentx-artifact>{"filename":".agentx/outbox/<name.ext>","mime":"<mime/type>"}</agentx-artifact>',"Files outside your workspace (/tmp, your home folder) are refused. Outbox files are removed after 7 days.","The line is removed from the text. Images show in the reply, audio and video get a player, other files an Open link. Allowed: png, jpg, gif, webp, svg, pdf, txt, md, csv, json, mp3, m4a, wav, mp4, webm; up to 20 MB and 20 files per reply.","A picture already on the web can go inline as ."].join(`
|
|
36
36
|
`);function Pa(n,e,t){return n==="app"&&e&&t!==!1?Bo:void 0}import{lstatSync as ze,mkdirSync as Ko,readdirSync as zo,realpathSync as Ke,unlinkSync as qo}from"fs";import{join as ue,resolve as $n}from"path";var Sn=".agentx/outbox",Jo=7*24*60*60*1e3;function Yo(n,e){try{let t=Ke($n(e,n)),r=ue(t,Sn);return Ke(r)===r&&ze(r).isDirectory()?r:null}catch{return null}}function Oa(n,e={}){let t=e.cwd??process.cwd();if(e.create!==!1)try{let o=Ke($n(t,n));ze(ue(o,".agentx"),{throwIfNoEntry:!1})?.isSymbolicLink()||Ko(ue(o,Sn),{recursive:!0})}catch{return 0}let r=Yo(n,t);return r?An(r,(e.now??Date.now())-(e.maxAgeMs??Jo)):0}function An(n,e){let t=0;for(let r of zo(n)){let o=ue(n,r);try{let i=ze(o);i.isDirectory()?t+=An(o,e):Math.max(i.mtimeMs,i.ctimeMs)<e&&(qo(o),t++)}catch{}}return t}export{yt as a,Rt as b,xt as c,ci as d,Gn as e,ui as f,R as g,U as h,I as i,G as j,dr as k,Se as l,Re as m,Pe as n,_e as o,mo as p,vo as q,Ue as r,Rr as s,Mo as t,la as u,ca as v,ua as w,pa as x,fa as y,Fo as z,jo as A,ga as B,ma as C,ha as D,wa as E,bn as F,Sa as G,Aa as H,Ra as I,xa as J,Pa as K,Sn as L,Oa as M};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-HNBW5Q47.js.map
|