agentix-cli 0.225.0 → 0.226.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-WOQYUQUF.js → App-PRA4ELTK.js} +2 -2
- package/dist/{ChatApp-VW5HOOTA.js → ChatApp-ZFYU5GL5.js} +2 -2
- package/dist/{absorb-eval-2LHNO4GF.js → absorb-eval-TRJJVOJZ.js} +2 -2
- package/dist/{adapter-JWGD6DVX.js → adapter-R3ZRSWOT.js} +2 -2
- package/dist/{agent-J3UMOPII.js → agent-HSCGRWXM.js} +2 -2
- package/dist/{board-dashboard-ZXXRQS64.js → board-dashboard-ZHF34H4B.js} +4 -4
- package/dist/{chunk-PFTS5N6F.js → chunk-2CFEXC67.js} +2 -2
- package/dist/{chunk-MZKJNM2B.js → chunk-3G3XXCHY.js} +2 -2
- package/dist/{chunk-F3MDKK4R.js → chunk-3QJZ5TXT.js} +2 -2
- package/dist/{chunk-IWEIHEYQ.js → chunk-4GUFZT5S.js} +84 -84
- package/dist/{chunk-IWEIHEYQ.js.map → chunk-4GUFZT5S.js.map} +1 -1
- package/dist/{chunk-6SJXK4YI.js → chunk-5DEGAL4M.js} +2 -2
- package/dist/{chunk-SK7MIYPL.js → chunk-AU6ABL2P.js} +2 -2
- package/dist/{chunk-AN4RDGDN.js → chunk-BEH3UJGT.js} +2 -2
- package/dist/{chunk-PS2D57LK.js → chunk-CUNUXJSF.js} +18 -18
- package/dist/chunk-CUNUXJSF.js.map +1 -0
- package/dist/{chunk-G5USBVZT.js → chunk-DDYGJEH4.js} +2 -2
- package/dist/{chunk-ASDEZXRC.js → chunk-DQNMJXEM.js} +2 -2
- package/dist/{chunk-BY4N4HGH.js → chunk-FAZMGEPF.js} +2 -2
- package/dist/{chunk-UJEJSMUY.js → chunk-FWJHLDAX.js} +2 -2
- package/dist/{chunk-ROJ6BZEK.js → chunk-IKSCPOUA.js} +195 -195
- package/dist/chunk-IKSCPOUA.js.map +1 -0
- package/dist/{chunk-6VYSGHAV.js → chunk-J3PUOD3I.js} +3 -3
- package/dist/{chunk-7FIGBBUO.js → chunk-KLWQ4KLG.js} +2 -2
- package/dist/{chunk-AQ3N5LWH.js → chunk-L5LKL2N7.js} +2 -2
- package/dist/{chunk-VYMLXUWH.js → chunk-LMH4Z5QE.js} +2 -2
- package/dist/{chunk-DLOWQJFW.js → chunk-LZBOQ3SA.js} +2 -2
- package/dist/{chunk-5N2GPVLB.js → chunk-MRSJOAWK.js} +34 -34
- package/dist/{chunk-5N2GPVLB.js.map → chunk-MRSJOAWK.js.map} +1 -1
- package/dist/{chunk-TRI4WHEG.js → chunk-N4XPOJMC.js} +2 -2
- package/dist/{chunk-T236NZTE.js → chunk-NCADCW3E.js} +2 -2
- package/dist/{chunk-OR5OZETS.js → chunk-PVNAUVBQ.js} +2 -2
- package/dist/{chunk-A2EXL7MB.js → chunk-S656M5R5.js} +2 -2
- package/dist/{chunk-VSDWUHCW.js → chunk-TU6D4I4T.js} +2 -2
- package/dist/{chunk-Q4LITWNN.js → chunk-W7XVPLDN.js} +2 -2
- package/dist/{chunk-LAQJLHXA.js → chunk-Y7ASJTMM.js} +2 -2
- package/dist/{chunk-SGR7G6YB.js → chunk-YCXODM2J.js} +2 -2
- package/dist/{chunk-77QBR5QP.js → chunk-YEX3NOLR.js} +2 -2
- package/dist/{chunk-HNLPHLER.js → chunk-YGGPPZTW.js} +2 -2
- package/dist/{chunk-6HWAJGKK.js → chunk-YM5JAK3F.js} +2 -2
- package/dist/{chunk-2XMOQWPV.js → chunk-ZN5SZLO4.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{client-WBAN7SIQ.js → client-CUI3YEXS.js} +2 -2
- package/dist/{config-TY2QKNR6.js → config-WZ5O3SCZ.js} +2 -2
- package/dist/{config-mutate-VB6NCK6M.js → config-mutate-BX4WUTRK.js} +2 -2
- package/dist/{config-mutator-HRNIMXSB.js → config-mutator-2SK2P355.js} +2 -2
- package/dist/{contributions-67KUV6CB.js → contributions-AOVWT4GQ.js} +2 -2
- package/dist/{doctor-5WZTRVM3.js → doctor-KMKVMWIH.js} +2 -2
- package/dist/{follow-up-tool-NU3KH33N.js → follow-up-tool-GOVILMAF.js} +2 -2
- package/dist/{hub-4WJAAUKG.js → hub-JLASJLAR.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{org-tool-DJL6XFQG.js → org-tool-TZOPMOVD.js} +2 -2
- package/dist/{program-2KSXAPE5.js → program-ERNKLXGC.js} +24 -24
- package/dist/{promote-ORYKGBHJ.js → promote-JL6T7KS7.js} +2 -2
- package/dist/{query-RXUOG4EE.js → query-ZSGNVHAX.js} +2 -2
- package/dist/{query-settings-BGWU2AWP.js → query-settings-PPJICZ26.js} +2 -2
- package/dist/{registry-DCBPVW67.js → registry-EZBD7QJ3.js} +2 -2
- package/dist/{request-planner-QQ7QRGUO.js → request-planner-HF7ZY7HX.js} +2 -2
- package/dist/{review-candidates-6GBZP6ND.js → review-candidates-XCEOBHCM.js} +2 -2
- package/dist/{routing-4YTBWI2S.js → routing-CVVEL76N.js} +2 -2
- package/dist/{schedule-tool-NEDTJ2F3.js → schedule-tool-UMSHKANT.js} +2 -2
- package/dist/{scheduler-UNFXNWE7.js → scheduler-L6KEZI43.js} +2 -2
- package/dist/{seat-QLNJ4XWT.js → seat-KEBD5OUK.js} +2 -2
- package/dist/{select-7COYHI64.js → select-FSKHWU4T.js} +2 -2
- package/dist/{set-enabled-J2ETDYZM.js → set-enabled-N2EESOLU.js} +2 -2
- package/dist/{sprint-tool-SHJGD4VA.js → sprint-tool-K4EDAGGZ.js} +2 -2
- package/dist/{tool-ACXYKM37.js → tool-HZRDVPDJ.js} +2 -2
- package/dist/{tool-Z55ODG2D.js → tool-ISMGGPUZ.js} +2 -2
- package/dist/{tool-KRAQJFPP.js → tool-MN65SRXS.js} +2 -2
- package/dist/tool-T6RJUVPW.js +2 -0
- package/dist/{tool-7UHWZYXC.js → tool-V7ZNX6RY.js} +2 -2
- package/dist/{wiki-P6LO7NSS.js → wiki-FVOQWOT5.js} +2 -2
- package/dist/wiki-enrich-RKTYIZOM.js +2 -0
- package/package.json +1 -1
- package/dist/chunk-PS2D57LK.js.map +0 -1
- package/dist/chunk-ROJ6BZEK.js.map +0 -1
- package/dist/tool-D4M7NOMX.js +0 -2
- package/dist/wiki-enrich-AHG5LWVU.js +0 -2
- /package/dist/{App-WOQYUQUF.js.map → App-PRA4ELTK.js.map} +0 -0
- /package/dist/{ChatApp-VW5HOOTA.js.map → ChatApp-ZFYU5GL5.js.map} +0 -0
- /package/dist/{absorb-eval-2LHNO4GF.js.map → absorb-eval-TRJJVOJZ.js.map} +0 -0
- /package/dist/{adapter-JWGD6DVX.js.map → adapter-R3ZRSWOT.js.map} +0 -0
- /package/dist/{agent-J3UMOPII.js.map → agent-HSCGRWXM.js.map} +0 -0
- /package/dist/{board-dashboard-ZXXRQS64.js.map → board-dashboard-ZHF34H4B.js.map} +0 -0
- /package/dist/{chunk-PFTS5N6F.js.map → chunk-2CFEXC67.js.map} +0 -0
- /package/dist/{chunk-MZKJNM2B.js.map → chunk-3G3XXCHY.js.map} +0 -0
- /package/dist/{chunk-F3MDKK4R.js.map → chunk-3QJZ5TXT.js.map} +0 -0
- /package/dist/{chunk-6SJXK4YI.js.map → chunk-5DEGAL4M.js.map} +0 -0
- /package/dist/{chunk-SK7MIYPL.js.map → chunk-AU6ABL2P.js.map} +0 -0
- /package/dist/{chunk-AN4RDGDN.js.map → chunk-BEH3UJGT.js.map} +0 -0
- /package/dist/{chunk-G5USBVZT.js.map → chunk-DDYGJEH4.js.map} +0 -0
- /package/dist/{chunk-ASDEZXRC.js.map → chunk-DQNMJXEM.js.map} +0 -0
- /package/dist/{chunk-BY4N4HGH.js.map → chunk-FAZMGEPF.js.map} +0 -0
- /package/dist/{chunk-UJEJSMUY.js.map → chunk-FWJHLDAX.js.map} +0 -0
- /package/dist/{chunk-6VYSGHAV.js.map → chunk-J3PUOD3I.js.map} +0 -0
- /package/dist/{chunk-7FIGBBUO.js.map → chunk-KLWQ4KLG.js.map} +0 -0
- /package/dist/{chunk-AQ3N5LWH.js.map → chunk-L5LKL2N7.js.map} +0 -0
- /package/dist/{chunk-VYMLXUWH.js.map → chunk-LMH4Z5QE.js.map} +0 -0
- /package/dist/{chunk-DLOWQJFW.js.map → chunk-LZBOQ3SA.js.map} +0 -0
- /package/dist/{chunk-TRI4WHEG.js.map → chunk-N4XPOJMC.js.map} +0 -0
- /package/dist/{chunk-T236NZTE.js.map → chunk-NCADCW3E.js.map} +0 -0
- /package/dist/{chunk-OR5OZETS.js.map → chunk-PVNAUVBQ.js.map} +0 -0
- /package/dist/{chunk-A2EXL7MB.js.map → chunk-S656M5R5.js.map} +0 -0
- /package/dist/{chunk-VSDWUHCW.js.map → chunk-TU6D4I4T.js.map} +0 -0
- /package/dist/{chunk-Q4LITWNN.js.map → chunk-W7XVPLDN.js.map} +0 -0
- /package/dist/{chunk-LAQJLHXA.js.map → chunk-Y7ASJTMM.js.map} +0 -0
- /package/dist/{chunk-SGR7G6YB.js.map → chunk-YCXODM2J.js.map} +0 -0
- /package/dist/{chunk-77QBR5QP.js.map → chunk-YEX3NOLR.js.map} +0 -0
- /package/dist/{chunk-HNLPHLER.js.map → chunk-YGGPPZTW.js.map} +0 -0
- /package/dist/{chunk-6HWAJGKK.js.map → chunk-YM5JAK3F.js.map} +0 -0
- /package/dist/{chunk-2XMOQWPV.js.map → chunk-ZN5SZLO4.js.map} +0 -0
- /package/dist/{client-WBAN7SIQ.js.map → client-CUI3YEXS.js.map} +0 -0
- /package/dist/{config-TY2QKNR6.js.map → config-WZ5O3SCZ.js.map} +0 -0
- /package/dist/{config-mutate-VB6NCK6M.js.map → config-mutate-BX4WUTRK.js.map} +0 -0
- /package/dist/{config-mutator-HRNIMXSB.js.map → config-mutator-2SK2P355.js.map} +0 -0
- /package/dist/{contributions-67KUV6CB.js.map → contributions-AOVWT4GQ.js.map} +0 -0
- /package/dist/{doctor-5WZTRVM3.js.map → doctor-KMKVMWIH.js.map} +0 -0
- /package/dist/{follow-up-tool-NU3KH33N.js.map → follow-up-tool-GOVILMAF.js.map} +0 -0
- /package/dist/{hub-4WJAAUKG.js.map → hub-JLASJLAR.js.map} +0 -0
- /package/dist/{org-tool-DJL6XFQG.js.map → org-tool-TZOPMOVD.js.map} +0 -0
- /package/dist/{program-2KSXAPE5.js.map → program-ERNKLXGC.js.map} +0 -0
- /package/dist/{promote-ORYKGBHJ.js.map → promote-JL6T7KS7.js.map} +0 -0
- /package/dist/{query-RXUOG4EE.js.map → query-ZSGNVHAX.js.map} +0 -0
- /package/dist/{query-settings-BGWU2AWP.js.map → query-settings-PPJICZ26.js.map} +0 -0
- /package/dist/{registry-DCBPVW67.js.map → registry-EZBD7QJ3.js.map} +0 -0
- /package/dist/{request-planner-QQ7QRGUO.js.map → request-planner-HF7ZY7HX.js.map} +0 -0
- /package/dist/{review-candidates-6GBZP6ND.js.map → review-candidates-XCEOBHCM.js.map} +0 -0
- /package/dist/{routing-4YTBWI2S.js.map → routing-CVVEL76N.js.map} +0 -0
- /package/dist/{schedule-tool-NEDTJ2F3.js.map → schedule-tool-UMSHKANT.js.map} +0 -0
- /package/dist/{scheduler-UNFXNWE7.js.map → scheduler-L6KEZI43.js.map} +0 -0
- /package/dist/{seat-QLNJ4XWT.js.map → seat-KEBD5OUK.js.map} +0 -0
- /package/dist/{select-7COYHI64.js.map → select-FSKHWU4T.js.map} +0 -0
- /package/dist/{set-enabled-J2ETDYZM.js.map → set-enabled-N2EESOLU.js.map} +0 -0
- /package/dist/{sprint-tool-SHJGD4VA.js.map → sprint-tool-K4EDAGGZ.js.map} +0 -0
- /package/dist/{tool-ACXYKM37.js.map → tool-HZRDVPDJ.js.map} +0 -0
- /package/dist/{tool-Z55ODG2D.js.map → tool-ISMGGPUZ.js.map} +0 -0
- /package/dist/{tool-KRAQJFPP.js.map → tool-MN65SRXS.js.map} +0 -0
- /package/dist/{tool-D4M7NOMX.js.map → tool-T6RJUVPW.js.map} +0 -0
- /package/dist/{tool-7UHWZYXC.js.map → tool-V7ZNX6RY.js.map} +0 -0
- /package/dist/{wiki-P6LO7NSS.js.map → wiki-FVOQWOT5.js.map} +0 -0
- /package/dist/{wiki-enrich-AHG5LWVU.js.map → wiki-enrich-RKTYIZOM.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as g}from"./chunk-
|
|
1
|
+
import{e as g}from"./chunk-J3PUOD3I.js";async function $(e,i,r,n,o={}){let a=o.retrieve??g,c=o.perEntry??2,s=o.maxArticles??8,f=o.queryChars??1500,h=new Map;for(let t of e){let l=[];try{l=await a(t.content.slice(0,f),i,r,{pool:n,maxCandidates:c,maxHops:1,maxArticles:c*2,stage:"absorb-covering"})}catch{}for(let u of l){let p=h.get(u.path);p?(p.hop=Math.min(p.hop,u.hop),p.entries.includes(t.id)||p.entries.push(t.id)):h.set(u.path,{...u,entries:[t.id]})}}return[...h.values()].sort((t,l)=>t.hop-l.hop||l.entries.length-t.entries.length||t.path.localeCompare(l.path)).slice(0,s)}function x(e){if(e.length===0)return"";let i=e.map(r=>{let n=`### ${r.meta.title} \u2014 ${r.meta.type||"untyped"} (${r.path})`,o=`Found for entries: ${r.entries.join(", ")}${r.hop>0?" (linked from a match)":""}`,a=r.meta.related?.length?`Related: ${r.meta.related.join(", ")}`:"";return[n,o,a,"",r.content].filter(c=>c!=="").join(`
|
|
2
2
|
`)}).join(`
|
|
3
3
|
|
|
4
4
|
---
|
|
@@ -14,4 +14,4 @@ These ${e.length} articles were found by searching the wiki for each entry below
|
|
|
14
14
|
|
|
15
15
|
${i}
|
|
16
16
|
`}var d=/\bhttps?:\/\/[^\s<>"'`)\]]+/gi,y=/\[\[([^\]|]+)(?:\|[^\]]*)?\]\]/g,w=/(?<![\w-])(?=[0-9a-f]*[0-9])(?=[0-9a-f]*[a-f])[0-9a-f]{7,40}(?![\w-])/gi,k=/(?<![\w.,:/-])\d+(?:[.,:\-/]\d+)*(?![\w])/g,C=/^\s*\d+[.)]\s/gm;function A(e){let i=[...e.matchAll(d)].map(s=>s[0].replace(/[.,;:!?'"]+$/,"")),r=[...e.matchAll(y)].map(s=>s[1].trim()),n=e.replace(d," ").replace(y," ").replace(C," "),o=[...n.matchAll(w)].map(s=>s[0].toLowerCase()),c=[...n.replace(w," ").matchAll(k)].map(s=>v(s[0]));return{commits:m(o),urls:m(i),wikilinks:m(r),numbers:m(c)}}function R(e,i){let r=A(e),n=A(i),o=i.toLowerCase(),a=[];for(let t of r.commits)!o.includes(t)&&!n.commits.some(l=>l.startsWith(t)||t.startsWith(l))&&a.push(`commit ${t}`);let c=t=>t.toLowerCase().replace(/\/+$/,""),s=new Set(n.urls.map(c));for(let t of r.urls)s.has(c(t))||a.push(`link ${t}`);let f=new Set(n.wikilinks.map(t=>t.toLowerCase()));for(let t of r.wikilinks)f.has(t.toLowerCase())||a.push(`link [[${t}]]`);let h=new Set(n.numbers);for(let t of r.numbers)h.has(t)||a.push(`number ${t}`);return a}function v(e){return/^\d{1,3}(,\d{3})+$/.test(e)?e.replace(/,/g,""):e}function m(e){return[...new Set(e)]}function L(e,i){if(i.some(n=>n.path===e.path))return e.path;let r=b(e.title);return r?i.find(n=>b(n.title)===r)?.path??e.path:e.path}function b(e){return(e||"").toLowerCase().replace(/[^\p{L}\p{N}]+/gu," ").trim()}export{$ as a,x as b,A as c,R as d,L as e};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-DDYGJEH4.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as xt}from"./chunk-GTJIKXDB.js";import{P as Wr,W as Xr,s as J}from"./chunk-
|
|
1
|
+
import{a as xt}from"./chunk-GTJIKXDB.js";import{P as Wr,W as Xr,s as J}from"./chunk-N4XPOJMC.js";import{f as Br,g as Hr,h as Vr,l as qr}from"./chunk-AU6ABL2P.js";import{b as jr}from"./chunk-2VDO2HEK.js";import{t as Fr,u as Ur}from"./chunk-2CFEXC67.js";import{d as Pr,e as Mr}from"./chunk-AQASR6KR.js";import{h as he,j as Er,l as $r,m as Ar,n as _r}from"./chunk-RX5O5637.js";import{a as Rr,c as Tr,e as Ir,f as ht,h as Dr,j as Cr,k as Nr,l as bt,m as yt,n as wt}from"./chunk-5ELIX7BQ.js";import{c as Or,d as Lr}from"./chunk-NCADCW3E.js";import{h as wr,i as xr,j as kr,l as vr,m as Sr}from"./chunk-TU6D4I4T.js";import{a as br,c as yr}from"./chunk-KP7KDLZ2.js";import{c as Le,d as fr,e as hr}from"./chunk-XVV7ZZ77.js";import{Ea as Oe,Fa as mr,Ga as W,Ha as fe,Ja as ft,b as pt,f as cr,s as gt,u as mt}from"./chunk-MRSJOAWK.js";import{a as Ce,b as me,e as dr}from"./chunk-7AB3QUGH.js";import{v as gr}from"./chunk-KLWQ4KLG.js";import{a as ur,b as Ne,e as pr}from"./chunk-3G3XXCHY.js";import{b as ne}from"./chunk-5ONH4ITT.js";import{a as lr,c as ut}from"./chunk-ILEC3IAV.js";import{a as er,j as sr,m as ir,o as ct,p as dt,s as ge,t as te,v as ar}from"./chunk-3323WFVK.js";import{a as tr,b as nr,d as rr,e as or}from"./chunk-4NZ4T3TQ.js";import{a as Zn}from"./chunk-7IW25T4K.js";import{a as Qn}from"./chunk-QUFIUXMQ.js";import{Dc as Yn,Fa as De,Ha as qn,I as ot,J as C,L as Te,M as $,N as pe,O as jn,R as Bn,S as st,Xa as Xn,b as In,c as Dn,d as Cn,e as Nn,eb as zn,f as On,fa as Ie,g as Ln,ga as Hn,gb as Kn,h as G,ha as Vn,hb as Xi,hc as lt,i as Pn,ia as Hi,j as Mn,k as Fn,l as rt,s as Un,sc as Gn,tc as Jn,w as ji,x as Wn,y as Bi}from"./chunk-CUNUXJSF.js";import{a as it,h as Vi}from"./chunk-KEUW6YLL.js";import{j as at,r as qi}from"./chunk-N47Y5ADQ.js";import{existsSync as zi,readdirSync as Ki,readFileSync as Gi,statSync as Ji}from"fs";import{resolve as Yi}from"path";function zr(t,e,n=Date.now(),r=7){let o=r*864e5,s=new Map;for(let i of e){let a=s.get(i.workflowId);a?a.push(i):s.set(i.workflowId,[i])}return t.map(i=>{let a=s.get(i.id)??[],d=a.filter(m=>n-m.at<=o),l=a.filter(m=>n-m.at>o&&n-m.at<=o*2),c=d.filter(m=>m.status==="failed").length,p=a.filter(m=>m.status==="paused").length,u=a.length?Math.max(...a.map(m=>m.at)):null,g=a.length?l.length>0&&d.length===0?"dormant":d.length>0&&c*2>=d.length?"failing":d.length>0?"active":"quiet":"never";return{id:i.id,name:i.name||i.id,state:g,lastRunAt:u,recent:d.length,prior:l.length,failed:c,paused:p}}).sort((i,a)=>{let d={dormant:0,failing:1,active:2,quiet:3,never:4};return d[i.state]-d[a.state]||(a.lastRunAt??0)-(i.lastRunAt??0)})}var Pe=new Map;function rp(t,e=1e3){if(!zi(t))return[];let n=Ki(t).filter(s=>s.endsWith(".jsonl")).map(s=>{let i=Yi(t,s);return{path:i,mtime:Ji(i).mtimeMs}}).sort((s,i)=>i.mtime-s.mtime).slice(0,e),r=new Set(n.map(s=>s.path));for(let s of Pe.keys())r.has(s)||Pe.delete(s);let o=[];for(let{path:s,mtime:i}of n){let a=Pe.get(s);if(a&&a.mtime===i){a.summary&&o.push(a.summary);continue}let d=Qi(s,i);Pe.set(s,{mtime:i,summary:d}),d&&o.push(d)}return o}function Qi(t,e){try{let n=Gi(t,"utf-8").split(`
|
|
2
2
|
`).filter(Boolean);if(!n.length)return null;let r=JSON.parse(n[0]),o=r.run?.workflowId;if(!o)return null;let s=r.run?.status??"unknown";for(let i=n.length-1;i>=0;i--){let a=JSON.parse(n[i]),d=a.status??a.run?.status;if(d){s=d;break}}return{workflowId:o,status:s,at:e}}catch{return null}}var Kr=7,Zi={failStreak:3,disabledDays:30,missedFires:2,graceMs:15*6e4},T={routines:200,summary:160,filters:6,filterValue:60,text:120},ea=(t,e,n)=>{try{return gr(t,e,n)}catch{return null}},Gr=864e5;function ap(t){let e=t.now??Date.now(),n={...Zi,...t.thresholds},r=t.nextFire??ea,o=[];for(let a of t.crons){let d=t.cronRuns.get(a.id)??[],l=a.timezone||"UTC",c=d.map(g=>({at:Date.parse(g.startedAt),status:g.status})),p=d[0],u={id:`cron:${a.id}`,source:"cron",kind:"schedule",name:F(a.id,T.text),trigger:{schedule:F(a.schedule,T.text),timezone:l},agent:a.agent||null,enabled:a.enabled,state:a.enabled?"enabled":"disabled",nextRunAt:a.enabled?kt(a.nextRun)??kt(r(a.schedule,new Date(e),l)):null,lastRun:p?{at:p.startedAt,status:p.status,summary:ia(p.status==="success"?void 0:p.errorSummary,T.summary)}:null,lastSuccessAt:d.find(g=>g.status==="success")?.startedAt??null,consecutiveFailures:Jr(c),sampledRuns:d.length,flags:[],attention:null,recent:d.slice(0,Kr).map(g=>({at:g.startedAt,status:g.status}))};u.flags=Yr(u,c,a.schedule,l,null,e,n,r),o.push(Qr(u))}let s=new Map(zr(t.workflows.map(a=>({id:a.id,name:a.title})),t.workflowRuns,e).map(a=>[a.id,a])),i=new Map;for(let a of t.workflowRuns){let d=i.get(a.workflowId);d?d.push(a):i.set(a.workflowId,[a])}for(let a of t.workflows){let d=a.nodes.find(k=>k.type.startsWith("trigger."));if(!d||d.type!=="trigger.cron"&&d.type!=="trigger.hook")continue;let l=d.config??{},c=a.state||"active",p=c==="active",u=(i.get(a.id)??[]).slice().sort((k,S)=>S.at-k.at),g=u.map(k=>({at:k.at,status:ra(k.status)})),m=g[0],f=d.type==="trigger.cron",w=typeof l.spec=="string"?l.spec:"",x=typeof l.timezone=="string"?l.timezone:"UTC",b={id:`workflow:${a.id}`,source:"workflow",kind:f?"schedule":"event",name:F(a.title||a.id,T.text),trigger:f?{schedule:F(w,T.text),timezone:x}:{event:F(typeof l.event=="string"?l.event:"",T.text),filters:sa(l.filter,a)},agent:oa(a),enabled:p,state:c,nextRunAt:f&&p&&w?kt(r(w,new Date(e),x)):null,lastRun:m?{at:new Date(m.at).toISOString(),status:m.status}:null,lastSuccessAt:(()=>{let k=g.find(S=>S.status==="success");return k?new Date(k.at).toISOString():null})(),consecutiveFailures:Jr(g),sampledRuns:u.length,flags:[],attention:null,recent:g.slice(0,Kr).map(k=>({at:new Date(k.at).toISOString(),status:k.status}))},y=Date.parse(a.updated||a.created||"");b.flags=f?Yr(b,g,w,x,Number.isFinite(y)?y:null,e,n,r):ta(b,s.get(a.id)?.state==="dormant",Number.isFinite(y)?y:null,e,n),o.push(Qr(b))}return o.sort(na).slice(0,T.routines)}function Jr(t){let e=0;for(let n of t)if(!(n.status==="running"||n.status==="paused"||n.status==="unknown"))if(n.status==="failed"||n.status==="timeout")e++;else break;return e}function Yr(t,e,n,r,o,s,i,a){let d=[],l=e.length?e[0].at:null;if(!t.enabled){let u=eo(l,o,s,i);return u&&d.push(u),d}if(t.consecutiveFailures>=i.failStreak&&d.push({reason:"failing",detail:`${t.consecutiveFailures} failed attempts in a row`}),l===null)return d.push({reason:"never-ran",detail:"No persisted attempt"}),d;let c=new Date(l),p=null;for(let u=0;u<i.missedFires&&(p=a(n,c,r),!!p);u++)c=p;return p&&s>p.getTime()+i.graceMs&&d.push({reason:"overdue",detail:`No attempt since ${new Date(l).toISOString()}; ${i.missedFires} scheduled fires missed`}),d}function ta(t,e,n,r,o){let s=[],i=t.lastRun?Date.parse(t.lastRun.at):null;if(!t.enabled){let a=eo(i,n,r,o);return a&&s.push(a),s}return t.consecutiveFailures>=o.failStreak&&s.push({reason:"failing",detail:`${t.consecutiveFailures} failed runs in a row`}),i===null?s.push({reason:"never-ran",detail:"No run recorded for this trigger"}):e&&s.push({reason:"dormant",detail:"Fired in the prior week, silent in the last one"}),s}function eo(t,e,n,r){let o=Math.max(t??0,e??0);return o&&n-o<r.disabledDays*Gr?null:{reason:"disabled-long",detail:o?`Disabled; no activity for ${Math.floor((n-o)/Gr)} days`:"Disabled and never ran"}}function Qr(t){let e=new Set(t.flags.map(n=>n.reason));return t.attention=e.has("failing")?"critical":e.has("overdue")||e.has("dormant")||e.has("never-ran")?"warning":e.has("disabled-long")?"info":null,t}var Zr={critical:0,warning:1,info:2};function na(t,e){let n=t.attention?Zr[t.attention]:3,r=e.attention?Zr[e.attention]:3;return n-r||Number(e.enabled)-Number(t.enabled)||t.name.localeCompare(e.name)}function ra(t){switch(t){case"completed":case"ok":return"success";case"failed":return"failed";case"timeout":return"timeout";case"canceled":return"canceled";case"running":return"running";case"paused":return"paused";default:return"unknown"}}function oa(t){if(t.ownerAgent)return F(t.ownerAgent,T.text);let e=t.nodes.find(n=>n.type==="agent"&&typeof n.config?.agentId=="string"&&n.config.agentId);return e?F(String(e.config.agentId),T.text):null}function sa(t,e){let n=[],r=e?.project;if(r&&n.push(F(`project=${r}`,T.filterValue)),t&&typeof t=="object"&&!Array.isArray(t))for(let[o,s]of Object.entries(t)){let i=Array.isArray(s)?s.map(String):s==null?[]:[String(s)];i.length&&n.push(F(`${o}=${i.join(",")}`,T.filterValue))}return n.slice(0,T.filters)}function kt(t){if(!t)return null;let e=t instanceof Date?t:new Date(t);return Number.isFinite(e.getTime())?e.toISOString():null}function F(t,e){return t.length<=e?t:t.slice(0,e-3)+"..."}function ia(t,e){return t===void 0?void 0:F(t,e)}import{mkdirSync as aa,readFileSync as la,renameSync as ca,writeFileSync as da}from"fs";import{resolve as ua}from"path";function to(t){return ua(dt(t),"_state.json")}function N(t){try{let e=JSON.parse(la(to(t),"utf-8"));return{snoozed:e&&typeof e.snoozed=="object"&&e.snoozed?e.snoozed:{},...typeof e?.lastDigest=="string"?{lastDigest:e.lastDigest}:{},...e?.popped&&typeof e.popped=="object"?{popped:e.popped}:{},...typeof e?.passAt=="string"?{passAt:e.passAt}:{},...Array.isArray(e?.wanted)?{wanted:e.wanted.filter(n=>typeof n=="string")}:{}}}catch{return{snoozed:{}}}}function be(t,e){aa(dt(t),{recursive:!0});let n=to(t),r=`${n}.${process.pid}.tmp`;da(r,JSON.stringify(e,null,2)+`
|
|
3
3
|
`),ca(r,n)}function no(t,e,n,r=Date.now()){let o=N(t),s={};for(let[i,a]of Object.entries(o.snoozed))Date.parse(a)>r&&(s[i]=a);s[e]=n.toISOString(),be(t,{...o,snoozed:s})}function pp(t,e){be(t,{...N(t),lastDigest:e})}function vt(t,e,n,r=Date.now()){let o=N(t),s=new Set(n),i={};for(let[d,l]of Object.entries(o.popped??{}))s.has(d)&&(i[d]=l);i[e]=new Date(r).toISOString();let a=(o.wanted??[]).filter(d=>d!==e&&s.has(d));be(t,{...o,popped:i,wanted:a})}function ro(t,e){let n=N(t);be(t,{...n,wanted:[...(n.wanted??[]).filter(r=>r!==e),e]})}function gp(t,e=Date.now()){be(t,{...N(t),popped:{},passAt:new Date(e).toISOString()})}import{existsSync as pa,readFileSync as ga}from"fs";Yn();Vi();function oo(t){let e=ur(t),n={};if(pa(e))try{n=Gn(JSON.parse(ga(e,"utf-8")))}catch{n={}}let r=lt.safeParse(n?.requests);return r.success?r.data:lt.parse(void 0)}async function wp(t,e={}){let n=(t.channels??[]).filter(r=>!it.has(r.toLowerCase().split("@")[0]));return n.length?{success:!1,error:`unknown channel ${n.map(r=>`"${r}"`).join(", ")}: use ${[...it].join(", ")}`}:Ne(r=>{let o=r.requests??={};for(let s of["enabled","channels","from","staleAfterHours","retentionDays","settleHandedBack","homeCloses","releaseOnOwnerTurn"])t[s]!==void 0&&(o[s]=t[s]);if(t.plans){let s=o.plans??={};for(let i of["enabled","stallMinutes","maxNudges","approveKinds","disabledAgents","requireForWork","requireOverMinutes"])t.plans[i]!==void 0&&(s[i]=t.plans[i])}if(t.headlines?.enabled!==void 0&&((o.headlines??={}).enabled=t.headlines.enabled),t.catchPromises){let s=o.catchPromises??={};for(let i of["enabled","dailyCap"])t.catchPromises[i]!==void 0&&(s[i]=t.catchPromises[i])}if(t.autoResend){let s=o.autoResend??={};for(let i of["enabled","afterMinutes","holdMaxHours"])t.autoResend[i]!==void 0&&(s[i]=t.autoResend[i])}if(t.flow){let s=o.flow??={};for(let i of["timeZone","days"])t.flow[i]!==void 0&&(s[i]=t.flow[i])}if(t.checkers){let s=o.checkers??={};for(let i of["enabled","checkEveryMinutes"])t.checkers[i]!==void 0&&(s[i]=t.checkers[i])}},{configPath:e.configPath,reload:e.reload})}import{existsSync as V,readdirSync as Da,readFileSync as $t,statSync as Ca}from"fs";import{dirname as So,resolve as R}from"path";import{randomBytes as ao}from"crypto";import{existsSync as fa,mkdirSync as ha,readdirSync as ba,readFileSync as ya,renameSync as lo,unlinkSync as wa,writeFileSync as xa}from"fs";import{resolve as co}from"path";function so(t){return[...t.account?["--account",t.account]:[],...t.store?["--store",t.store]:[]]}var ma=t=>t.trim().split(`
|
|
4
4
|
`).pop()?.slice(0,300)||"no output";async function io(t,e,n,r=xt){let o=await r(t.bin,[...so(t),"send","text","--to",e,"--message",n,"--no-preview"],{timeoutMs:6e4});return o.code===0?{ok:!0}:{ok:!1,error:`wacli send failed: ${ma(o.stderr||o.stdout)}`}}async function vp(t,e,n,r,o=xt){return(await o(t.bin,[...so(t),"--read-only","media","download","--chat",e,"--id",n,"--output",r],{timeoutMs:12e4})).code===0}var ka=2e3,va=t=>io(t.wacli,t.to,t.text);function St(t){return co(t,".agentx","whatsapp-triage","drafts")}var Sa=t=>/^[a-z0-9-]{8,64}$/.test(t),Me=(t,e)=>co(St(t),`${e}.json`);function uo(t,e){ha(St(t),{recursive:!0});let n=Me(t,e.id),r=`${n}.${process.pid}.tmp`;xa(r,JSON.stringify(e,null,2)+`
|
|
@@ -960,4 +960,4 @@ Document the arguments, commands, or files the skill expects. Example:
|
|
|
960
960
|
claude-code ${Tn(t)} --arg value
|
|
961
961
|
\`\`\`
|
|
962
962
|
`}Yn();var Mi={maxPixels:12e5,timeoutMs:5e3,intervalMs:100,changeThreshold:.015,stableMs:400,regions:{},buffer:{enabled:!1,seconds:10,fps:2,region:"screen",maxPixels:3e5}};function Fi(t){return{...Mi,...t??{},regions:{...t?.regions??{}},buffer:{...Mi.buffer,...t?.buffer??{}}}}function Eb(t){try{return Fi(Jn(t).screen)}catch{return Fi(void 0)}}var ep=/^[a-z][\w-]*$/,Ui=["window","screen","menubar","notifications"];function Ae(t,e,n,r){let o=Number(t);if(t===""||t===null||!Number.isFinite(o)||!n(o))throw new Error(`${e} must be ${r}`);return o}var tt=(t,e)=>Ae(t,e,n=>Number.isInteger(n)&&n>0,"a whole number above 0");function Wi(t){let e=typeof t=="string"?t.split(",").map(Number):[t?.x,t?.y,t?.width,t?.height].map(Number);if(e.length!==4||!e.every(Number.isFinite)||e[2]<=0||e[3]<=0)throw new Error("a region is x,y,width,height in screen points, with width and height above 0");return{x:e[0],y:e[1],width:e[2],height:e[3]}}function $b(t,e){let n={...t??{}};if("maxPixels"in e&&(n.maxPixels=tt(e.maxPixels,"maxPixels")),"timeoutMs"in e&&(n.timeoutMs=tt(e.timeoutMs,"timeoutMs")),"intervalMs"in e&&(n.intervalMs=tt(e.intervalMs,"intervalMs")),"stableMs"in e&&(n.stableMs=Ae(e.stableMs,"stableMs",o=>Number.isInteger(o)&&o>=0,"a whole number, 0 or more")),"changeThreshold"in e&&(n.changeThreshold=Ae(e.changeThreshold,"changeThreshold",o=>o>=0&&o<=1,"between 0 and 1")),e.regions&&typeof e.regions=="object"){let o={...n.regions??{}};for(let[s,i]of Object.entries(e.regions)){if(!ep.test(s))throw new Error(`region name "${s}" must be lowercase letters, digits, - or _`);i===null?delete o[s]:o[s]=Wi(i)}n.regions=o}if(e.buffer&&typeof e.buffer=="object"){let o=e.buffer,s={...n.buffer??{}};"enabled"in o&&(s.enabled=!!o.enabled),"seconds"in o&&(s.seconds=Ae(o.seconds,"buffer.seconds",i=>i>0&&i<=120,"above 0 and at most 120")),"fps"in o&&(s.fps=Ae(o.fps,"buffer.fps",i=>i>0&&i<=10,"above 0 and at most 10")),"maxPixels"in o&&(s.maxPixels=tt(o.maxPixels,"buffer.maxPixels")),"region"in o&&(s.region=String(o.region).trim()),n.buffer=s}let r=n.buffer?.region;if(r!==void 0&&!Ui.includes(r)&&!n.regions?.[r])try{Wi(r)}catch{throw new Error(`buffer.region "${r}" is not a region \u2014 use ${[...Ui,...Object.keys(n.regions??{})].join(", ")}, or x,y,w,h`)}return n}export{zr as a,rp as b,en as c,$c as d,Ac as e,Om as f,Lm as g,Pm as h,Um as i,Wm as j,jm as k,vs as l,Ss as m,Bm as n,Vm as o,X as p,Es as q,T as r,ap as s,_s as t,Jm as u,Zm as v,Ts as w,ef as x,Is as y,tf as z,xe as A,Jc as B,nf as C,rf as D,Cs as E,vp as F,va as G,Rp as H,go as I,N as J,pp as K,gp as L,oo as M,wp as N,Y as O,ag as P,To as Q,Co as R,ed as S,sf as T,td as U,af as V,lf as W,nn as X,Os as Y,uf as Z,on as _,od as $,sd as aa,ff as ba,nl as ca,rl as da,dg as ea,ug as fa,dl as ga,fg as ha,Vs as ia,Xs as ja,kf as ka,ce as la,Af as ma,zs as na,Tf as oa,Df as pa,yg as qa,wg as ra,ys as sa,qt as ta,yc as ua,I as va,ii as wa,ch as xa,dh as ya,Yd as za,mh as Aa,pi as Ba,fh as Ca,hh as Da,vh as Ea,iu as Fa,lu as Ga,Sh as Ha,kg as Ia,vg as Ja,Sg as Ka,Eg as La,$g as Ma,Ag as Na,_g as Oa,Rg as Pa,Ig as Qa,Dg as Ra,Og as Sa,Lg as Ta,Pg as Ua,Ug as Va,Wg as Wa,jg as Xa,Bg as Ya,Hg as Za,Vg as _a,qg as $a,em as ab,Lt as bb,tm as cb,nm as db,ye as eb,we as fb,mu as gb,Ch as hb,Nh as ib,Oh as jb,Lh as kb,bn as lb,Ph as mb,Ft as nb,Ut as ob,ze as pb,Wl as qb,Bl as rb,am as sb,jt as tb,Bt as ub,Hl as vb,Vl as wb,rs as xb,as as yb,lm as zb,zl as Ab,cm as Bb,tc as Cb,oc as Db,Ht as Eb,ic as Fb,ls as Gb,z as Hb,Si as Ib,Ei as Jb,$i as Kb,wn as Lb,Bh as Mb,Su as Nb,_i as Ob,Ri as Pb,Zh as Qb,eb as Rb,Uu as Sb,tb as Tb,Ii as Ub,ps as Vb,ib as Wb,qu as Xb,lb as Yb,cb as Zb,Ke as _b,Em as $b,Qt as ac,Dm as bc,gb as cc,mb as dc,fb as ec,hb as fc,bb as gc,yb as hc,wb as ic,xb as jc,kb as kc,Mi as lc,Fi as mc,Eb as nc,Ui as oc,$b as pc};
|
|
963
|
-
//# sourceMappingURL=chunk-
|
|
963
|
+
//# sourceMappingURL=chunk-DQNMJXEM.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import t from"chalk";import{spawn as S}from"child_process";import{resolve as j}from"path";var E=l=>l||j(process.cwd(),".agentx/wiki");function N(l){return async d=>{let{claudeCliEnv:e}=await import("./workspace-env-UOK5MMKD.js"),h=["-p","-","--output-format","json","--max-turns","1","--model",l,"--tools","","--strict-mcp-config","--mcp-config",'{"mcpServers":{}}',"--settings",'{"disableAllHooks":true}',"--setting-sources","","--no-session-persistence"],y=await new Promise(($,a)=>{let s=S("claude",h,{env:e(),stdio:["pipe","pipe","pipe"]}),p="",g="",i=setTimeout(()=>s.kill("SIGTERM"),24e4);s.stdout.on("data",r=>{p+=r}),s.stderr.on("data",r=>{g+=r}),s.on("error",r=>{clearTimeout(i),a(r)}),s.on("close",r=>{clearTimeout(i),r===0?$(p):a(new Error(`claude exited ${r}: ${g.trim().slice(0,200)}`))}),s.stdin.end(d)}),c=JSON.parse(y);if(c.is_error)throw new Error(`model error: ${String(c.result).slice(0,200)}`);return{text:String(c.result??""),costUsd:Number(c.total_cost_usd)||0}}}function I(l){l.command("enrich [entities...]").description("write a full overview, sourced typed facts and linked history on entity pages (person, organization, project, place, assets)").option("--dir <path>","wiki directory (default .agentx/wiki)").option("--types <list>","comma-separated entity types","person,organization,project,place,device,server,app,domain,account").option("--max <n>","most entities per run","10").option("--max-cost <usd>","stop before the next call once the run spent this much","1").option("--model <m>","model","sonnet").option("--force","redo entities whose sources did not change").option("--dry-run","show what would be written, write nothing").option("--create <title>","first create a page for a thing other pages only name, then enrich it (needs --as and --owner)").option("--as <type>","type of the page --create makes, e.g. organization").option("--owner <agent>","agent whose wiki gets the page --create makes").option("--json","print the run as JSON").action(async(d,e)=>{let{WikiHub:h}=await import("./hub-
|
|
1
|
+
import t from"chalk";import{spawn as S}from"child_process";import{resolve as j}from"path";var E=l=>l||j(process.cwd(),".agentx/wiki");function N(l){return async d=>{let{claudeCliEnv:e}=await import("./workspace-env-UOK5MMKD.js"),h=["-p","-","--output-format","json","--max-turns","1","--model",l,"--tools","","--strict-mcp-config","--mcp-config",'{"mcpServers":{}}',"--settings",'{"disableAllHooks":true}',"--setting-sources","","--no-session-persistence"],y=await new Promise(($,a)=>{let s=S("claude",h,{env:e(),stdio:["pipe","pipe","pipe"]}),p="",g="",i=setTimeout(()=>s.kill("SIGTERM"),24e4);s.stdout.on("data",r=>{p+=r}),s.stderr.on("data",r=>{g+=r}),s.on("error",r=>{clearTimeout(i),a(r)}),s.on("close",r=>{clearTimeout(i),r===0?$(p):a(new Error(`claude exited ${r}: ${g.trim().slice(0,200)}`))}),s.stdin.end(d)}),c=JSON.parse(y);if(c.is_error)throw new Error(`model error: ${String(c.result).slice(0,200)}`);return{text:String(c.result??""),costUsd:Number(c.total_cost_usd)||0}}}function I(l){l.command("enrich [entities...]").description("write a full overview, sourced typed facts and linked history on entity pages (person, organization, project, place, assets)").option("--dir <path>","wiki directory (default .agentx/wiki)").option("--types <list>","comma-separated entity types","person,organization,project,place,device,server,app,domain,account").option("--max <n>","most entities per run","10").option("--max-cost <usd>","stop before the next call once the run spent this much","1").option("--model <m>","model","sonnet").option("--force","redo entities whose sources did not change").option("--dry-run","show what would be written, write nothing").option("--create <title>","first create a page for a thing other pages only name, then enrich it (needs --as and --owner)").option("--as <type>","type of the page --create makes, e.g. organization").option("--owner <agent>","agent whose wiki gets the page --create makes").option("--json","print the run as JSON").action(async(d,e)=>{let{WikiHub:h}=await import("./hub-JLASJLAR.js"),{GraphCache:y}=await import("./graph-ZVKV3JBD.js"),{loadOntology:c}=await import("./load-Q3HCFXDT.js"),{loadRoster:$}=await import("./roster-BZGKG2ZA.js"),{ENRICH_TYPES:a,loadEnrichState:s,runEnrich:p,saveEnrichState:g}=await import("./enrich-MZMIQ3SV.js"),i=E(e.dir),r=e.types.split(",").map(o=>o.trim()).filter(Boolean),b=r.filter(o=>!a.includes(o));if(b.length){console.error(t.red(` not an entity type this job handles: ${b.join(", ")} (use ${a.join(", ")})`)),process.exitCode=1;return}let x=Number(e.max);if(!Number.isInteger(x)||x<1){console.error(t.red(" --max must be a whole number of entities, 1 or more")),process.exitCode=1;return}let w=Number(e.maxCost);if(!Number.isFinite(w)||w<=0){console.error(t.red(" --max-cost must be a positive number of dollars")),process.exitCode=1;return}let m=new h(i,()=>{});if(e.create){let{createEntityPage:o}=await import("./enrich-MZMIQ3SV.js");if(!e.as||!a.includes(e.as)||!e.owner){console.error(t.red(` --create needs --as <${a.join("|")}> and --owner <agent>`)),process.exitCode=1;return}if(m.syncedFrom(e.owner)){console.error(t.red(` ${e.owner}'s pages are copied from another node; pick an agent that runs here`)),process.exitCode=1;return}if(e.dryRun)console.log(t.dim(` --dry-run: would create "${e.create}" (${e.as}) in ${e.owner}'s wiki`));else{let f=o(m,e.create,e.as,e.owner,new Date().toISOString().slice(0,10));console.log(f?t.green(` created ${e.owner}/${f}`):t.dim(` ${e.owner} already has a page titled "${e.create}"`))}d=[...d,e.create],r.includes(e.as)||r.push(e.as)}let{ontology:v}=c(i),k=new y().get(m,v,$(i,m.listAgents([]),v.agent_names)),C=s(i),u=await p(m,k,N(e.model),{types:r,only:d,max:x,maxCostUsd:w,dryRun:!!e.dryRun,force:!!e.force,today:new Date().toISOString().slice(0,10),save:o=>g(i,o)},C);if(e.json){console.log(JSON.stringify(u,null,2));return}for(let o of u.outcomes){let f=o.status==="written"?t.green("\u2713"):o.status==="dry-run"?t.cyan("~"):t.yellow("\xB7");console.log(` ${f} ${o.title} ${t.dim(`${o.status} \xB7 ${o.page??"no page"} \xB7 overview ${o.overview?"yes":"no"} \xB7 ${o.statements} facts \xB7 ${o.links} links \xB7 $${o.costUsd.toFixed(3)}`)}`);for(let n of o.facts??[])console.log(t.dim(` fact: ${n.property} \u2192 ${n.value}${n.role?` (${n.role})`:""} \xB7 source ${n.source}`));for(let n of o.dropped.slice(0,6))console.log(t.dim(` dropped: ${n}`));o.preview&&console.log(t.dim(o.preview.split(`
|
|
2
2
|
`).slice(0,12).map(n=>` | ${n}`).join(`
|
|
3
3
|
`)))}u.outcomes.length===0&&console.log(t.dim(" nothing to do: no entity of these types changed since the last run (--force redoes them)")),console.log(t.dim(` spent $${u.costUsd.toFixed(3)} of $${w}${u.capped?" \xB7 stopped at the cap":""}`))})}export{N as a,I as b};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-FAZMGEPF.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Dc as m,tc as l}from"./chunk-
|
|
1
|
+
import{Dc as m,tc as l}from"./chunk-CUNUXJSF.js";m();import{existsSync as g,readFileSync as u,writeFileSync as a,copyFileSync as y}from"fs";import{resolve as p}from"path";function P(e,n={}){let t=n.configPath||p(process.cwd(),"agentx.json");if(!g(t))throw new Error(`agentx.json not found at ${t}`);let i=JSON.parse(u(t,"utf-8")),o=e(i),s=typeof o=="string"?{summary:o}:o,c=JSON.stringify(i,null,2)+`
|
|
2
2
|
`,f=t+".tmp";a(f,c,"utf-8");try{JSON.parse(u(f,"utf-8"))}catch(d){throw new Error(`config did not round-trip cleanly: ${d.message}`)}let r;return n.skipBackup||(r=`${t}.bak.${Date.now()}`,y(t,r)),a(t,c,"utf-8"),n.skipReload||h().catch(()=>{}),{summary:s.summary,payload:s.payload,backupPath:r}}function S(e,n={}){let t=n.configPath||p(process.cwd(),"agentx.json");if(g(t)&&!n.overwrite)throw new Error(`agentx.json already exists at ${t}. Pass overwrite=true to replace it.`);return a(t,JSON.stringify(e,null,2)+`
|
|
3
3
|
`,"utf-8"),{file:t}}async function h(){try{let n=l().dashboard.daemonUrl?.replace(/\/+$/,"")||"http://127.0.0.1:18800";await fetch(`${n}/reload`,{method:"POST"}).catch(()=>null)}catch{}}export{P as a,S as b};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-FWJHLDAX.js.map
|