agentix-cli 0.191.0 → 0.193.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/README.md +2 -2
- package/dist/{App-Z4OZ4VAI.js → App-6TNGC3UR.js} +2 -2
- package/dist/{ChatApp-7VLNOH2N.js → ChatApp-FUDLZ6HZ.js} +2 -2
- package/dist/{absorb-eval-QR3EEHDE.js → absorb-eval-YSWPPGQF.js} +2 -2
- package/dist/{adapter-VWMQAALK.js → adapter-EEBNOFDS.js} +2 -2
- package/dist/{agent-RS4W545P.js → agent-QX2POUEM.js} +2 -2
- package/dist/{board-dashboard-RXOSENTD.js → board-dashboard-VVFHNABJ.js} +880 -429
- package/dist/board-dashboard-VVFHNABJ.js.map +1 -0
- package/dist/{chunk-MW75GECE.js → chunk-22WO5X4L.js} +103 -102
- package/dist/chunk-22WO5X4L.js.map +1 -0
- package/dist/{chunk-XJUBFPOM.js → chunk-2O72AHK5.js} +2 -2
- package/dist/{chunk-ZJ74H5SV.js → chunk-2VQ3VKBR.js} +2 -2
- package/dist/{chunk-WXSS7VIW.js → chunk-462FRP7L.js} +294 -292
- package/dist/chunk-462FRP7L.js.map +1 -0
- package/dist/{chunk-54J6PXBG.js → chunk-52NME3AU.js} +2 -2
- package/dist/{chunk-T2NPSEPJ.js → chunk-6FUWODBV.js} +2 -2
- package/dist/chunk-6ZAQ3IT5.js +116 -0
- package/dist/chunk-6ZAQ3IT5.js.map +1 -0
- package/dist/{chunk-34O2GH4J.js → chunk-AAL5WIXB.js} +2 -2
- package/dist/{chunk-XJEBJZLX.js → chunk-BKTKJNCR.js} +2 -2
- package/dist/{chunk-YFJVQOWI.js → chunk-DACZSUCN.js} +2 -2
- package/dist/{chunk-IGLJXEXX.js → chunk-DS2ZIVIH.js} +2 -2
- package/dist/{chunk-RRGC6Y4L.js → chunk-EH7Y2W77.js} +2 -2
- package/dist/{chunk-6MU3OEII.js → chunk-EI3TZ52P.js} +2 -2
- package/dist/{chunk-S3XUIVC2.js → chunk-FEXG2PKQ.js} +2 -2
- package/dist/{chunk-RQKLUGMS.js → chunk-GLYBXXO7.js} +3 -3
- package/dist/{chunk-OTCMYGQR.js → chunk-H5XBQWAI.js} +2 -2
- package/dist/{chunk-BWBTNBPS.js → chunk-HNA4BW47.js} +2 -2
- package/dist/chunk-HPRLRD4P.js +6 -0
- package/dist/chunk-HPRLRD4P.js.map +1 -0
- package/dist/chunk-JGZ6CA5L.js +143 -0
- package/dist/chunk-JGZ6CA5L.js.map +1 -0
- package/dist/{chunk-3NMBTBNW.js → chunk-KHKG7H6Q.js} +2 -2
- package/dist/chunk-MQRAQJSS.js +2 -0
- package/dist/chunk-MQRAQJSS.js.map +1 -0
- package/dist/{chunk-FRTU3ICQ.js → chunk-MQV3IU6F.js} +2 -2
- package/dist/{chunk-CKHLBNMN.js → chunk-N56EHPTR.js} +2 -2
- package/dist/{chunk-AS4NDKUJ.js → chunk-OYXB6KZX.js} +2 -2
- package/dist/{chunk-YMDGKFIG.js → chunk-PSP3NAFU.js} +56 -56
- package/dist/{chunk-YMDGKFIG.js.map → chunk-PSP3NAFU.js.map} +1 -1
- package/dist/{chunk-YOMLHG33.js → chunk-Q7ZPW55P.js} +2 -2
- package/dist/chunk-QTBFMRJ2.js +2 -0
- package/dist/chunk-QTBFMRJ2.js.map +1 -0
- package/dist/{chunk-RA4WCDGV.js → chunk-RDENYWNG.js} +88 -78
- package/dist/chunk-RDENYWNG.js.map +1 -0
- package/dist/{chunk-KTGTKOLV.js → chunk-TDZDIDFG.js} +2 -2
- package/dist/chunk-UOYIC7XN.js +3 -0
- package/dist/chunk-UOYIC7XN.js.map +1 -0
- package/dist/{chunk-ZU6W3CXO.js → chunk-VK2TW3RL.js} +36 -36
- package/dist/chunk-VK2TW3RL.js.map +1 -0
- package/dist/{chunk-L3CWRXKQ.js → chunk-Z2NYUCTE.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{client-N5YTG2K6.js → client-5USANRIL.js} +2 -2
- package/dist/{config-WUB5SJPH.js → config-N7DHUZMH.js} +2 -2
- package/dist/{config-mutate-ZLPUEIVN.js → config-mutate-OVUXNS5X.js} +2 -2
- package/dist/config-mutator-OK7CDCHW.js +2 -0
- package/dist/{contributions-C4DKQJY6.js → contributions-LTDE6UOQ.js} +2 -2
- package/dist/{doctor-ND3OS575.js → doctor-C3DTKR7C.js} +2 -2
- package/dist/{follow-up-tool-TWOEAWOL.js → follow-up-tool-NCFOTJ5Y.js} +2 -2
- package/dist/{hub-FUM7UY5S.js → hub-F3X7NL4B.js} +2 -2
- package/dist/index.d.ts +157 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{program-JLUZINRR.js → program-6HWZZ2D3.js} +261 -259
- package/dist/program-6HWZZ2D3.js.map +1 -0
- package/dist/{promote-M5AJSWHZ.js → promote-FSOPSHJ4.js} +2 -2
- package/dist/{query-NPDKXBTN.js → query-UDRKDTSB.js} +2 -2
- package/dist/query-runs-AENEZOM6.js +2 -0
- package/dist/{query-settings-HXKZYIEV.js → query-settings-DJGEGG62.js} +2 -2
- package/dist/registry-AVGT5KPR.js +2 -0
- package/dist/{request-planner-ANGZP4JL.js → request-planner-SAQX26AR.js} +2 -2
- package/dist/{review-candidates-B7T2QA3R.js → review-candidates-67MPNU42.js} +2 -2
- package/dist/{routing-2KWP5TAT.js → routing-7DUO5PI7.js} +2 -2
- package/dist/schedule-tool-LZOW5SVQ.js +2 -0
- package/dist/{scheduler-VN7WDAKE.js → scheduler-3IADVHIN.js} +2 -2
- package/dist/{seat-MAC3QGGD.js → seat-YWSYQBCW.js} +2 -2
- package/dist/{select-UYKEN4N4.js → select-PA7AHZ3W.js} +2 -2
- package/dist/self-KACQLLDA.js +2 -0
- package/dist/{set-enabled-JEUIINT3.js → set-enabled-DD6L2ZQ6.js} +2 -2
- package/dist/{sprint-tool-MB2MPR4K.js → sprint-tool-PKJA6LYF.js} +2 -2
- package/dist/{tool-L4CQCPRF.js → tool-KOGZBOCR.js} +2 -2
- package/dist/tool-PJSLWK45.js +8 -0
- package/dist/tool-PJSLWK45.js.map +1 -0
- package/dist/{tool-SZ6C6EBP.js → tool-WJ72TBMV.js} +2 -2
- package/dist/{wiki-ZAHFGDKE.js → wiki-HQBMWH23.js} +2 -2
- package/dist/wiki-enrich-7RPM5DQF.js +2 -0
- package/dist/wiki-enrich-7RPM5DQF.js.map +1 -0
- package/package.json +1 -1
- package/dist/board-dashboard-RXOSENTD.js.map +0 -1
- package/dist/chunk-CZMVJP7O.js +0 -2
- package/dist/chunk-CZMVJP7O.js.map +0 -1
- package/dist/chunk-MW75GECE.js.map +0 -1
- package/dist/chunk-RA4WCDGV.js.map +0 -1
- package/dist/chunk-U5B275AU.js +0 -143
- package/dist/chunk-U5B275AU.js.map +0 -1
- package/dist/chunk-WXSS7VIW.js.map +0 -1
- package/dist/chunk-ZCBTTYQN.js +0 -112
- package/dist/chunk-ZCBTTYQN.js.map +0 -1
- package/dist/chunk-ZU6W3CXO.js.map +0 -1
- package/dist/config-mutator-S5X4DOJK.js +0 -2
- package/dist/program-JLUZINRR.js.map +0 -1
- package/dist/query-runs-VXS572PQ.js +0 -6
- package/dist/query-runs-VXS572PQ.js.map +0 -1
- package/dist/registry-A2FFL4EA.js +0 -2
- package/dist/schedule-tool-2UNMXEBQ.js +0 -2
- package/dist/self-SO6GCVYD.js +0 -2
- package/dist/tool-TLXKW55S.js +0 -8
- package/dist/tool-TLXKW55S.js.map +0 -1
- package/dist/wiki-enrich-QLCQHV6B.js +0 -2
- /package/dist/{App-Z4OZ4VAI.js.map → App-6TNGC3UR.js.map} +0 -0
- /package/dist/{ChatApp-7VLNOH2N.js.map → ChatApp-FUDLZ6HZ.js.map} +0 -0
- /package/dist/{absorb-eval-QR3EEHDE.js.map → absorb-eval-YSWPPGQF.js.map} +0 -0
- /package/dist/{adapter-VWMQAALK.js.map → adapter-EEBNOFDS.js.map} +0 -0
- /package/dist/{agent-RS4W545P.js.map → agent-QX2POUEM.js.map} +0 -0
- /package/dist/{chunk-XJUBFPOM.js.map → chunk-2O72AHK5.js.map} +0 -0
- /package/dist/{chunk-ZJ74H5SV.js.map → chunk-2VQ3VKBR.js.map} +0 -0
- /package/dist/{chunk-54J6PXBG.js.map → chunk-52NME3AU.js.map} +0 -0
- /package/dist/{chunk-T2NPSEPJ.js.map → chunk-6FUWODBV.js.map} +0 -0
- /package/dist/{chunk-34O2GH4J.js.map → chunk-AAL5WIXB.js.map} +0 -0
- /package/dist/{chunk-XJEBJZLX.js.map → chunk-BKTKJNCR.js.map} +0 -0
- /package/dist/{chunk-YFJVQOWI.js.map → chunk-DACZSUCN.js.map} +0 -0
- /package/dist/{chunk-IGLJXEXX.js.map → chunk-DS2ZIVIH.js.map} +0 -0
- /package/dist/{chunk-RRGC6Y4L.js.map → chunk-EH7Y2W77.js.map} +0 -0
- /package/dist/{chunk-6MU3OEII.js.map → chunk-EI3TZ52P.js.map} +0 -0
- /package/dist/{chunk-S3XUIVC2.js.map → chunk-FEXG2PKQ.js.map} +0 -0
- /package/dist/{chunk-RQKLUGMS.js.map → chunk-GLYBXXO7.js.map} +0 -0
- /package/dist/{chunk-OTCMYGQR.js.map → chunk-H5XBQWAI.js.map} +0 -0
- /package/dist/{chunk-BWBTNBPS.js.map → chunk-HNA4BW47.js.map} +0 -0
- /package/dist/{chunk-3NMBTBNW.js.map → chunk-KHKG7H6Q.js.map} +0 -0
- /package/dist/{chunk-FRTU3ICQ.js.map → chunk-MQV3IU6F.js.map} +0 -0
- /package/dist/{chunk-CKHLBNMN.js.map → chunk-N56EHPTR.js.map} +0 -0
- /package/dist/{chunk-AS4NDKUJ.js.map → chunk-OYXB6KZX.js.map} +0 -0
- /package/dist/{chunk-YOMLHG33.js.map → chunk-Q7ZPW55P.js.map} +0 -0
- /package/dist/{chunk-KTGTKOLV.js.map → chunk-TDZDIDFG.js.map} +0 -0
- /package/dist/{chunk-L3CWRXKQ.js.map → chunk-Z2NYUCTE.js.map} +0 -0
- /package/dist/{client-N5YTG2K6.js.map → client-5USANRIL.js.map} +0 -0
- /package/dist/{config-WUB5SJPH.js.map → config-N7DHUZMH.js.map} +0 -0
- /package/dist/{config-mutate-ZLPUEIVN.js.map → config-mutate-OVUXNS5X.js.map} +0 -0
- /package/dist/{config-mutator-S5X4DOJK.js.map → config-mutator-OK7CDCHW.js.map} +0 -0
- /package/dist/{contributions-C4DKQJY6.js.map → contributions-LTDE6UOQ.js.map} +0 -0
- /package/dist/{doctor-ND3OS575.js.map → doctor-C3DTKR7C.js.map} +0 -0
- /package/dist/{follow-up-tool-TWOEAWOL.js.map → follow-up-tool-NCFOTJ5Y.js.map} +0 -0
- /package/dist/{hub-FUM7UY5S.js.map → hub-F3X7NL4B.js.map} +0 -0
- /package/dist/{promote-M5AJSWHZ.js.map → promote-FSOPSHJ4.js.map} +0 -0
- /package/dist/{query-NPDKXBTN.js.map → query-UDRKDTSB.js.map} +0 -0
- /package/dist/{registry-A2FFL4EA.js.map → query-runs-AENEZOM6.js.map} +0 -0
- /package/dist/{query-settings-HXKZYIEV.js.map → query-settings-DJGEGG62.js.map} +0 -0
- /package/dist/{routing-2KWP5TAT.js.map → registry-AVGT5KPR.js.map} +0 -0
- /package/dist/{request-planner-ANGZP4JL.js.map → request-planner-SAQX26AR.js.map} +0 -0
- /package/dist/{review-candidates-B7T2QA3R.js.map → review-candidates-67MPNU42.js.map} +0 -0
- /package/dist/{schedule-tool-2UNMXEBQ.js.map → routing-7DUO5PI7.js.map} +0 -0
- /package/dist/{scheduler-VN7WDAKE.js.map → schedule-tool-LZOW5SVQ.js.map} +0 -0
- /package/dist/{seat-MAC3QGGD.js.map → scheduler-3IADVHIN.js.map} +0 -0
- /package/dist/{self-SO6GCVYD.js.map → seat-YWSYQBCW.js.map} +0 -0
- /package/dist/{select-UYKEN4N4.js.map → select-PA7AHZ3W.js.map} +0 -0
- /package/dist/{wiki-ZAHFGDKE.js.map → self-KACQLLDA.js.map} +0 -0
- /package/dist/{set-enabled-JEUIINT3.js.map → set-enabled-DD6L2ZQ6.js.map} +0 -0
- /package/dist/{sprint-tool-MB2MPR4K.js.map → sprint-tool-PKJA6LYF.js.map} +0 -0
- /package/dist/{tool-L4CQCPRF.js.map → tool-KOGZBOCR.js.map} +0 -0
- /package/dist/{tool-SZ6C6EBP.js.map → tool-WJ72TBMV.js.map} +0 -0
- /package/dist/{wiki-enrich-QLCQHV6B.js.map → wiki-HQBMWH23.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as w}from"./chunk-
|
|
1
|
+
import{c as w}from"./chunk-OYXB6KZX.js";function T(t){let r=1779033703^t.length;for(let s=0;s<t.length;s++)r=Math.imul(r^t.charCodeAt(s),3432918353),r=r<<13|r>>>19;let o=r>>>0;return()=>{o=o+1831565813>>>0;let s=o;return s=Math.imul(s^s>>>15,s|1),s^=s+Math.imul(s^s>>>7,s|61),((s^s>>>14)>>>0)/4294967296}}function _(t,r,o){let s=T(o),i=[...t].sort((e,u)=>e.path.localeCompare(u.path));for(let e=i.length-1;e>0;e--){let u=Math.floor(s()*(e+1));[i[e],i[u]]=[i[u],i[e]]}return i.slice(0,Math.max(0,r)).sort((e,u)=>e.path.localeCompare(u.path))}var R=new Set("about after again also because been before being between could does doing during each from have having here into just more most only other over same should some such than that their them then there these they this those through under until very were what when where which while will with would your yours user assistant agent message entry please thanks".split(" "));function k(t){let r=new Set;for(let o of t.toLowerCase().matchAll(/[\p{L}\p{N}][\p{L}\p{N}_-]{3,}/gu))R.has(o[0])||r.add(o[0]);return r}function E(t,r){let o=k(t);if(o.size===0)return 1;let s=k(r),i=0;for(let e of o)s.has(e)&&i++;return i/o.size}var W=.15;function $(t){let r=w(t);return{commits:r.commits,urls:r.urls,numbers:r.numbers}}function j(t,r,o){return t.includes(r)||o.some(s=>s.startsWith(r)||r.startsWith(s))}var y=t=>t.toLowerCase().replace(/\/+$/,"");function N(t,r,o){let s=t.sources.map(a=>r.get(a)).filter(a=>!!a),i=t.sources.filter(a=>!r.has(a)),e=s.filter(a=>k(a.content).size>=5&&E(a.content,t.content)<W).map(a=>a.id),u=[...s.map(a=>`${a.date??""}
|
|
2
2
|
${a.content}`),t.previous??""].join(`
|
|
3
3
|
`),l=u.toLowerCase(),d=$(u),p=new Set(d.urls.map(y)),g=new Set(d.numbers),n=$(t.content),c=[];for(let a of n.commits)j(l,a,d.commits)||c.push(`commit ${a}`);for(let a of n.urls)!p.has(y(a))&&!l.includes(y(a))&&c.push(`link ${a}`);for(let a of n.numbers)/^\d{1,2}$/.test(a)||!g.has(a)&&!l.includes(a)&&c.push(`number ${a}`);let h=[];for(let a of s){let m=$(a.content);if(m.commits.length===0&&m.urls.length===0)continue;let v=o(a.id),S=(v.length>0?v:[t.content]).join(`
|
|
4
4
|
`).toLowerCase(),x=$(S);for(let b of m.commits)j(S,b,x.commits)||h.push({entry:a.id,fact:`commit ${b}`});for(let b of m.urls)S.includes(y(b))||h.push({entry:a.id,fact:`link ${b}`})}return{path:t.path,title:t.title,type:t.type,sources:t.sources.length,missingSources:i,weakSources:e,ungrounded:c,lost:h}}function U(t,r){let o=r.toLowerCase(),s=w(r).commits,i=[];for(let e of t){let u=w(e.content),l=[...u.commits.filter(d=>!j(o,d,s)).map(d=>`commit ${d}`),...u.urls.filter(d=>!o.includes(y(d))).map(d=>`link ${d}`)];l.length>0&&i.push({entry:e.id,facts:l})}return i}var P=new Set("the and for with from into of on in at to by an a".split(" "));function L(t){return new Set((t||"").toLowerCase().split(/[^\p{L}\p{N}]+/u).filter(r=>(r.length>1||/\d/.test(r))&&!P.has(r)&&!R.has(r)))}function M(t,r){if(t.size===0||r.size===0)return 0;let o=0;for(let s of t)r.has(s)&&o++;return o/(t.size+r.size-o)}function D(t,r,o={}){let s=o.titleMin??.75,i=o.sourcesMin??.5,e=t.map(l=>({...l,tt:L(l.title),ss:new Set(l.sources??[])})),u=[];for(let l=0;l<e.length;l++)for(let d=l+1;d<e.length;d++){let p=e[l],g=e[d];if(r&&!r.has(p.path)&&!r.has(g.path))continue;let n=(p.type??"")===(g.type??"")?M(p.tt,g.tt):0;if(n>=s){u.push({a:p.path,b:g.path,reason:"title",score:n});continue}if(p.ss.size>=2&&g.ss.size>=2){let c=M(p.ss,g.ss);c>=i&&u.push({a:p.path,b:g.path,reason:"sources",score:c})}}return u.sort((l,d)=>d.score-l.score||l.a.localeCompare(d.a))}var A=4e3;function J(t,r){let o=r.map(i=>{let e=i.content.length>A?`${i.content.slice(0,A)}
|
|
@@ -33,4 +33,4 @@ Reply with JSON only, no fencing:
|
|
|
33
33
|
{"claims": 0, "supported": 0, "unsupported": [], "contradicted": [], "off_subject": [], "missing": [], "verdict": "good"}`}function z(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let r=t,o=l=>Array.isArray(l)?l.map(d=>String(d)):[],s=l=>typeof l=="number"&&Number.isFinite(l)&&l>=0?Math.round(l):NaN,i=s(r.claims);if(Number.isNaN(i))return null;let e=Math.min(i,Number.isNaN(s(r.supported))?i-o(r.unsupported).length:s(r.supported)),u=r.verdict==="good"||r.verdict==="minor"||r.verdict==="major"?r.verdict:null;return u?{claims:i,supported:Math.max(0,e),unsupported:o(r.unsupported),contradicted:o(r.contradicted),offSubject:o(r.off_subject??r.offSubject),missing:o(r.missing),verdict:u}:null}function I(t,r,o,s=[],i=5,e){let u={};for(let n of t)u[n.type??"untyped"]=(u[n.type??"untyped"]??0)+1;let l=new Set,d=new Set;for(let n of t)for(let c of n.lost)l.add(c.entry),d.add(`${c.entry}|${c.fact}`);let p=new Set(r.flatMap(n=>[n.a,n.b]).filter(n=>t.some(c=>c.path===n))),g={sample:{articles:t.length,seed:o.seed,since:o.since,byType:u},citations:{withSources:t.filter(n=>n.sources>0).length,missingSources:t.reduce((n,c)=>n+c.missingSources.length,0),weakSources:t.reduce((n,c)=>n+c.weakSources.length,0),articlesWithWeak:t.filter(n=>n.weakSources.length>0).length},grounding:{articlesWithUngrounded:t.filter(n=>n.ungrounded.length>0).length,ungroundedFacts:t.reduce((n,c)=>n+c.ungrounded.length,0)},lost:{entriesWithLostFacts:l.size,lostFacts:d.size},duplicates:{pairs:r.length,articlesInPair:p.size},...e?{uncited:{entries:e.entries,withLostFacts:e.lost.length}}:{},examples:{ungrounded:t.filter(n=>n.ungrounded.length>0).slice(0,i).map(n=>({path:n.path,facts:n.ungrounded.slice(0,6)})),lost:t.flatMap(n=>n.lost.map(c=>({path:n.path,...c}))).slice(0,i),weak:t.filter(n=>n.weakSources.length>0).slice(0,i).map(n=>({path:n.path,entries:n.weakSources})),duplicates:r.slice(0,i),uncited:(e?.lost??[]).slice(0,i).map(n=>({entry:n.entry,facts:n.facts.slice(0,4)})),judged:s.filter(n=>n.verdict.verdict!=="good").slice(0,i).map(n=>({path:n.path,verdict:n.verdict.verdict,unsupported:n.verdict.unsupported.slice(0,4),contradicted:n.verdict.contradicted.slice(0,4),offSubject:n.verdict.offSubject,missing:n.verdict.missing.slice(0,4)}))}};if(s.length>0){let n=s.map(a=>a.verdict),c=n.reduce((a,m)=>a+m.claims,0),h=n.reduce((a,m)=>a+m.supported,0);g.judge={judged:n.length,claims:c,supported:h,supportRate:c>0?h/c:1,unsupported:n.reduce((a,m)=>a+m.unsupported.length,0),contradicted:n.reduce((a,m)=>a+m.contradicted.length,0),articlesWithWrongMerge:n.filter(a=>a.offSubject.length>0).length,missingFacts:n.reduce((a,m)=>a+m.missing.length,0),verdicts:{good:n.filter(a=>a.verdict==="good").length,minor:n.filter(a=>a.verdict==="minor").length,major:n.filter(a=>a.verdict==="major").length}}}return g}var f=(t,r)=>r>0?`${Math.round(t/r*100)}%`:"\u2013";function O(t){let r=t.sample.articles,o=["# Wiki absorb scorecard","",`Sample: ${r} articles (seed \`${t.sample.seed}\`${t.sample.since?`, changed since ${t.sample.since}`:""}). Types: ${Object.entries(t.sample.byType).map(([e,u])=>`${e} ${u}`).join(", ")||"\u2013"}.`,"","| Check | Result | Lower is better? |","|---|---|---|",`| Articles citing at least one entry | ${t.citations.withSources}/${r} (${f(t.citations.withSources,r)}) | no |`,`| Cited ids with no entry | ${t.citations.missingSources} | yes |`,`| Articles with a weak citation (entry shares <${Math.round(W*100)}% of its words) | ${t.citations.articlesWithWeak}/${r} (${f(t.citations.articlesWithWeak,r)}) | yes |`,`| Articles with an ungrounded commit, link or number | ${t.grounding.articlesWithUngrounded}/${r} (${f(t.grounding.articlesWithUngrounded,r)}) | yes |`,`| Ungrounded facts | ${t.grounding.ungroundedFacts} | yes |`,`| Commits or links lost from cited entries | ${t.lost.lostFacts} across ${t.lost.entriesWithLostFacts} entries | yes |`,`| Sampled articles in a likely duplicate pair | ${t.duplicates.articlesInPair}/${r} (${f(t.duplicates.articlesInPair,r)}) | yes |`];if(t.uncited&&o.push(`| Entries read in the window but cited by no article | ${t.uncited.entries} | \u2013 |`,`| \u2026of which carry a commit or link no article has | ${t.uncited.withLostFacts} | yes |`),t.judge){let e=t.judge;o.push(`| Judge: claims supported by the cited entries | ${e.supported}/${e.claims} (${f(e.supported,e.claims)}) | no |`,`| Judge: unsupported / contradicted claims | ${e.unsupported} / ${e.contradicted} | yes |`,`| Judge: articles with an off-subject source (wrong merge) | ${e.articlesWithWrongMerge}/${e.judged} (${f(e.articlesWithWrongMerge,e.judged)}) | yes |`,`| Judge: facts missing from the article | ${e.missingFacts} | yes |`,`| Judge verdicts good / minor / major | ${e.verdicts.good} / ${e.verdicts.minor} / ${e.verdicts.major} | \u2013 |`)}let s=t.examples,i=(e,u)=>{u.length!==0&&o.push("",`## ${e}`,"",...u)};return i("Examples: ungrounded facts",s.ungrounded.map(e=>`- \`${e.path}\`: ${e.facts.join("; ")}`)),i("Examples: lost facts",s.lost.map(e=>`- \`${e.path}\` \u2190 entry \`${e.entry}\`: ${e.fact}`)),i("Examples: weak citations",s.weak.map(e=>`- \`${e.path}\`: ${e.entries.map(u=>`\`${u}\``).join(", ")}`)),i("Examples: uncited entries with facts no article has",s.uncited.map(e=>`- \`${e.entry}\`: ${e.facts.join("; ")}`)),i("Examples: likely duplicates",s.duplicates.map(e=>`- \`${e.a}\` \u2194 \`${e.b}\` (${e.reason}, ${e.score.toFixed(2)})`)),i("Examples: judge findings",s.judged.map(e=>{let u=[e.unsupported.length?`unsupported: ${e.unsupported.join(" | ")}`:"",e.contradicted.length?`contradicted: ${e.contradicted.join(" | ")}`:"",e.offSubject.length?`off-subject: ${e.offSubject.join(", ")}`:"",e.missing.length?`missing: ${e.missing.join(" | ")}`:""].filter(Boolean);return`- \`${e.path}\` (${e.verdict}): ${u.join("; ")}`})),o.push("","## Method","","- The sample is drawn with a seeded shuffle from the articles changed in the window, so the same seed and window give the same articles.","- Ungrounded: a commit hash, link or number (three digits or more, or a date) in the article that no cited entry and no earlier version of the article contains.","- Lost: a commit hash or link in a cited entry that no article citing that entry contains.","- Uncited: entries the absorb ledger marks as read in the window that no article cites; those carrying a commit or link that no article on the node has are counted as lost, since absorb will not offer them again.","- Weak citation: a cited entry sharing fewer than 15% of its distinctive words with the article.","- Duplicate: two articles of the same type whose titles share at least 75% of their words, or which share at least half their sources.","- Judge (optional): one model call per article reads the article and its cited entries and lists unsupported, contradicted, off-subject and missing items."),o.join(`
|
|
34
34
|
`)+`
|
|
35
35
|
`}function V(t){if(!t||typeof t!="object")return{};let r=t,o=r.usage??{},s=i=>typeof i=="number"&&Number.isFinite(i)?i:void 0;return{costUsd:s(r.total_cost_usd)??s(r.cost_usd),apiMs:s(r.duration_api_ms),inputTokens:s(o.input_tokens),outputTokens:s(o.output_tokens),cacheReadTokens:s(o.cache_read_input_tokens),cacheWriteTokens:s(o.cache_creation_input_tokens)}}function C(t,r){return t.length===0?0:t[Math.min(t.length-1,Math.floor(r*t.length))]}function Y(t){let r=new Map,o=i=>{let e=i||"(none)",u=r.get(e);return u||r.set(e,u={calls:[],runs:[]}),u};for(let i of t)i.kind==="call"?o(i.label).calls.push(i):i.kind==="run"&&o(i.label).runs.push(i);let s=[];for(let[i,{calls:e,runs:u}]of r){if(e.length===0)continue;let l=e.map(n=>n.wallMs).sort((n,c)=>n-c),d;if(u.length>0)d=u.reduce((n,c)=>n+(Date.parse(c.endedAt)-Date.parse(c.startedAt)),0);else{let n=e.map(h=>Date.parse(h.at)-h.wallMs),c=e.map(h=>Date.parse(h.at));d=Math.max(...c)-Math.min(...n)}let p=e.reduce((n,c)=>n+c.entries,0),g=e.reduce((n,c)=>n+(c.costUsd??0),0);s.push({label:i,calls:e.length,failed:e.filter(n=>n.failed).length,entries:p,articles:e.reduce((n,c)=>n+c.articles,0),refused:e.reduce((n,c)=>n+c.refused,0),heldCited:e.reduce((n,c)=>n+(c.heldCited??0),0),wallMs:d,callMsP50:C(l,.5),callMsP95:C(l,.95),prepMs:e.reduce((n,c)=>n+(c.prepMs??0),0),costUsd:g,costPerEntry:p>0?g/p:0,entriesPerMinute:d>0?p/d*6e4:0,promptChars:e.reduce((n,c)=>n+c.promptChars,0)})}return s.sort((i,e)=>i.label.localeCompare(e.label))}export{T as a,_ as b,k as c,E as d,W as e,N as f,U as g,D as h,A as i,J as j,z as k,I as l,O as m,V as n,Y as o};
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-Z2NYUCTE.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{b as o}from"./chunk-OSH2PEBH.js";import"./chunk-QIJLFPWE.js";var e=o(process.versions.node);e&&(console.error(e),process.exit(1));var{buildProgram:s}=await import("./program-
|
|
2
|
+
import{b as o}from"./chunk-OSH2PEBH.js";import"./chunk-QIJLFPWE.js";var e=o(process.versions.node);e&&(console.error(e),process.exit(1));var{buildProgram:s}=await import("./program-6HWZZ2D3.js"),{installCliSignalExit:r}=await import("./signal-exit-C5EUGHKI.js"),{applyConnectAttemptTimeout:i,configPathFromArgv:a,readConnectAttemptTimeout:n}=await import("./net-family-X2P3OVDP.js");r();i(n(process.cwd(),a(process.argv.slice(2))));var t=await s();process.argv.slice(2).length===0?t.outputHelp():t.parse();
|
|
3
3
|
//# sourceMappingURL=cli.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=client-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"./chunk-2O72AHK5.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";export{b as fetchAgents,d as fetchCrons,c as fetchProcesses,e as killProcess,a as resolveConn,f as sendTask,g as streamTask};
|
|
2
|
+
//# sourceMappingURL=client-5USANRIL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ab as
|
|
2
|
-
//# sourceMappingURL=config-
|
|
1
|
+
import{Ab as w,Bb as x,Cb as y,Db as z,Eb as A,Fb as B,Hb as C,eb as a,fb as b,gb as c,hb as d,ib as e,jb as f,kb as g,lb as h,mb as i,nb as j,ob as k,pb as l,qb as m,rb as n,sb as o,tb as p,ub as q,vb as r,wb as s,xb as t,yb as u,zb as v}from"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";C();export{a as INTEGRATION_KINDS,x as WIKI_CONTRIBUTE_JOB,y as WIKI_CONTRIBUTE_MERGE_JOB,A as WIKI_SUMMARIZE_JOB,q as approvalsConfigSchema,f as callsSchema,d as cameraBotSchema,v as crossFieldProblems,s as daemonConfigSchema,c as emailAccountSchema,b as eventSubscriptionSchema,t as expandEnvVars,e as isCronExpression,u as loadDaemonConfig,n as membersConfigSchema,i as mergePolicyConfigSchema,m as peopleConfigSchema,l as personSchema,p as qualityReportConfigSchema,o as requestStatusConfigSchema,k as requestsConfigSchema,g as reviewGateConfigSchema,h as trackersConfigSchema,w as validateWorkspaces,r as wallConfigSchema,j as watchersConfigSchema,z as withContributionJobs,B as withSummariesJob};
|
|
2
|
+
//# sourceMappingURL=config-N7DHUZMH.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=config-mutate-
|
|
1
|
+
import{a,b}from"./chunk-N56EHPTR.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";export{a as mutateAgentxConfig,b as writeAgentxConfig};
|
|
2
|
+
//# sourceMappingURL=config-mutate-OVUXNS5X.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-DACZSUCN.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";export{b as applyConfigMutation,a as findConfigPath,d as getAtPath,c as setAtPath,e as unsetAtPath};
|
|
2
|
+
//# sourceMappingURL=config-mutator-OK7CDCHW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ee}from"./chunk-
|
|
1
|
+
import{a as ee}from"./chunk-2VQ3VKBR.js";import"./chunk-OYXB6KZX.js";import{f as Q,k as V}from"./chunk-VJVXEVZ7.js";import{b as O}from"./chunk-5ONH4ITT.js";import"./chunk-JRAG37V5.js";import"./chunk-ILEC3IAV.js";import"./chunk-OWNQ2FD4.js";import{b as X}from"./chunk-KEXBEUSU.js";import"./chunk-GLYBXXO7.js";import"./chunk-JTFCU5LH.js";import"./chunk-HNA4BW47.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-KHKG7H6Q.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QUFIUXMQ.js";import"./chunk-A7JSRDJL.js";import"./chunk-BERWTVG2.js";import{b as N,c as H}from"./chunk-AHWWJ7AF.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";import{createHash as le}from"crypto";import{existsSync as z,mkdirSync as ne,readdirSync as re,readFileSync as ge,renameSync as se,writeFileSync as pe}from"fs";import{resolve as w}from"path";var _={maxPatches:30,maxCostUsd:.5,maxItems:60},he=12,fe=2e3,me=1500,M=8,U=300,be=12,B="## Checked facts";function S(n){return w(n,"_contributions")}function E(n,r){if(!z(n))return r;try{return JSON.parse(ge(n,"utf-8"))}catch(t){throw new Error(`${n} is not valid JSON: ${t.message}`)}}function L(n,r){ne(w(n,".."),{recursive:!0});let t=`${n}.${process.pid}.tmp`;pe(t,`${JSON.stringify(r,null,2)}
|
|
2
2
|
`),se(t,n)}function ie(n){return{agents:E(w(S(n),"state.json"),{agents:{}}).agents??{}}}function ye(n){let r=w(S(n),"pending");return z(r)?re(r).filter(t=>t.endsWith(".json")).sort().map(t=>E(w(r,t),null)).filter(t=>!!t):[]}function G(n){return w(S(n),"held.json")}function K(n,r={}){let t=E(G(n),[]);return r.all?t:t.filter(a=>a.status==="held")}function _e(n){let r=w(S(n),"reports");if(!z(r))return null;let t=re(r).filter(a=>a.endsWith(".json")).sort().pop();return t?E(w(r,t),null):null}function ke(n,r,t,a={}){let o=ie(r).agents[t],c=a.now??Date.now(),e=a.since??o?.lastRunAt??new Date(c-864e5).toISOString(),d=e.slice(0,10),u=new Set(o?.processed??[]),s=[];for(let g of n.getAgentEntries(t))g.date<d||u.has(g.id)||s.push({id:g.id,at:g.date,kind:"chat",title:[g.source,g.sourceContext].filter(Boolean).join(" \xB7 "),text:g.content});if(a.db){let g=Date.parse(e);for(let l of V(a.db,{agentId:t,since:Number.isFinite(g)?g:void 0,limit:500})){if(l.status==="in-flight"||u.has(l.taskId))continue;let k=(Q(a.db,l.taskId)?.steps??[]).filter(b=>b.name==="tool_use"||b.action).slice(0,be).map(b=>`- ${b.action??b.name}${b.inputSummary?` ${x(b.inputSummary,160)}`:""}${b.outputSummary?` \u2192 ${x(b.outputSummary,240)}`:""}${b.error?` \u2717 ${x(b.error,120)}`:""}`),y=[`Request: ${x(l.originalMessage??l.messagePreview??"",600)}`,k.length?`Tool calls:
|
|
3
3
|
${k.join(`
|
|
4
4
|
`)}`:"",l.finalResponse?`Reply: ${x(l.finalResponse,800)}`:""].filter(Boolean).join(`
|
|
@@ -54,4 +54,4 @@ _Sources: ${t.sources.join("; ")}._`,a);return n.writeArticle(r,{title:t.title,.
|
|
|
54
54
|
`).replace(/\n{3,}/g,`
|
|
55
55
|
|
|
56
56
|
`).trim(),superseded:d}}function Ce(n){let r=n.previous?` (previously: ${n.previous})`:"";return`- **${n.attribute}:** ${n.value} \u2014 ${n.source}; checked ${n.checkedAt.slice(0,10)} by ${n.by}${r}`}function Re(n){let r=n.match(/^- \*\*.+?:\*\* (.*?) — .*?; checked (\S+) by \S+(?: \(previously: (.*)\))?$/);return r?{value:r[1],checkedAt:r[2],...r[3]?{previous:r[3]}:{}}:void 0}function J(n,r){return`contribution:${n}@${r.slice(0,10)}`}var Te={person:"people",project:"projects",place:"places",concept:"concepts",event:"events",decision:"decisions",pattern:"patterns"};function de(n,r,t){let a=r.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,60)||"page",o=t?Te[t]:"contributions",c=`${o}/${a}.md`;for(let e=2;n.readArticle(c);e++)c=`${o}/${a}-${e}.md`;return c}export{_ as DEFAULT_CONTRIBUTION_LIMITS,B as FACTS_HEADING,ue as applyFactLines,De as approveHeld,xe as buildContributionPrompt,S as contributionsDir,_e as latestReport,K as listHeld,ye as listPendingBatches,Be as mergeContributions,W as pageKey,Ae as parseContributionPatches,ke as pendingWork,Se as possibleDuplicate,Fe as rejectHeld,ce as replaceOnce,Me as runContribution};
|
|
57
|
-
//# sourceMappingURL=contributions-
|
|
57
|
+
//# sourceMappingURL=contributions-LTDE6UOQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=doctor-
|
|
1
|
+
import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i}from"./chunk-DS2ZIVIH.js";import"./chunk-BKTKJNCR.js";import"./chunk-IMLAPB7G.js";import"./chunk-XPZSEDE3.js";import"./chunk-MNG2AMKZ.js";import"./chunk-QPABR72X.js";import"./chunk-KP7KDLZ2.js";import"./chunk-OSH2PEBH.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";export{i as daemonVoiceCheck,b as doctor,g as meshPeerTokenChecks,h as meshTokenChecksFromConfig,a as runDoctorChecks,e as runMirrorChecks,d as runNativeChecks,c as runNotificationChecks,f as runReminderChecks};
|
|
2
|
+
//# sourceMappingURL=doctor-C3DTKR7C.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{b as h}from"./chunk-
|
|
1
|
+
import{b as h}from"./chunk-Q7ZPW55P.js";import"./chunk-RKPAVWXF.js";import"./chunk-H5XBQWAI.js";import{b as I}from"./chunk-AJ5HMDRW.js";import"./chunk-KP7KDLZ2.js";import"./chunk-JGZ6CA5L.js";import"./chunk-DACZSUCN.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var p=t=>typeof t=="string"?t.trim():"";function $(t){return[`Run ${t.runId} "${t.title}" [${t.status}] on step ${t.step}: waiting on ${t.waitingOn}.`,t.tags?.length?`Tags: ${t.tags.join(", ")}`:"",...(t.steps??[]).slice(-8).map(s=>`- ${String(s.at).slice(0,16).replace("T"," ")} ${s.step} ${s.status}${s.note?`: ${s.note}`:""}`)].filter(Boolean).join(`
|
|
2
2
|
`)}async function T(t,c){let s=c.fetch??fetch,m=c.daemonUrl.replace(/\/$/,""),r=(p(t.action)||"list").toLowerCase(),f=c.env??process.env,w=async i=>{let l=await s(`${m}${i}`,{signal:AbortSignal.timeout(1e4)}),n=await l.json().catch(()=>({}));return{ok:l.ok,status:l.status,data:n}};try{if(r==="list"){let e=await w("/follow-up");if(!e.ok)return`Error: ${e.data?.error||`HTTP ${e.status}`}`;let o=e.data.groups??[];return o.length?o.map(d=>[`${d.tag}:`,...d.rows.map(a=>`- ${a.runId} "${a.title}" on ${a.step}: waiting on ${a.waitingOn} (since ${String(a.since).slice(0,16).replace("T"," ")} UTC)`)].join(`
|
|
3
3
|
`)).join(`
|
|
4
4
|
`):"No follow-up workflows are running."}if(r==="match"){let e=p(t.request)||p(t.title);if(!e)return"Error: match needs `request`: the owner's request in their words.";let o=h(t,f),d=await w(`/follow-up/match?q=${encodeURIComponent(e)}${o?`&agentId=${encodeURIComponent(o.agentId)}`:""}`);if(!d.ok)return`Error: ${d.data?.error||`HTTP ${d.status}`}`;let a=d.data.matches??[];return a.length?["Saved workflows, best fit first (confidence 0-1):",...a.map(u=>`- ${u.workflowId} "${u.title}" (${u.confidence}${u.autoStart?", starts without asking":""}): ${u.steps.map(k=>k.id).join(" \u2192 ")}`),'Start one with {action:"start", workflowId:"<id>", title:"\u2026", tags:["client:<name>"]}. Run its steps through the workflow, not by hand.'].join(`
|
|
5
5
|
`):"No saved workflow fits. If the request has several steps, build one: start with title and steps."}if(r==="status"){let e=p(t.runId);if(!e)return"Error: status needs runId.";let o=await w(`/follow-up/${encodeURIComponent(e)}`);return o.ok?$(o.data.run):`Error: ${o.data?.error||`HTTP ${o.status}`}`}let i=h(t,f);if(!i)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=await s(`${m}/follow-up`,{method:"POST",headers:{"Content-Type":"application/json",...I(f)},body:JSON.stringify({action:r,agentId:i.agentId,workflowId:t.workflowId,title:t.title,description:t.description,tags:t.tags,inputs:t.inputs,steps:t.steps,edges:t.edges,approval:t.approval,autoStart:t.autoStart,requestId:t.requestId,runId:t.runId,step:t.step,evidence:t.evidence,note:t.note,reason:t.reason,fromRun:t.fromRun,status:t.status}),signal:AbortSignal.timeout(2e4)}),n=await l.json().catch(()=>({}));if(!l.ok)return`Error: ${n?.error||`HTTP ${l.status}`}`;if(r==="start"){let e=n.run;return[`Started run ${e.runId} "${e.title}"${n.built?" (built from the steps you gave; propose it with fromRun to keep it)":""}.`,n.awaitingApproval?"It waits for the owner's approval before the first step.":`It is on step ${e.step}: ${e.waitingOn}.`,"AgentX follows it from here: it starts each step, reminds whoever is slow, and tells the owner when it ends. Do not run its steps by hand.",...n.warning?[`Note: ${n.warning}`]:[]].join(" ")}return r==="plan"?[`Plan recorded on run ${n.run?.runId??t.runId}:`,...(n.plan??[]).map(e=>`- ${e.id} ${e.title}`),'Report each step with {action:"step", runId, step:"<id>", status:"started"|"done"|"failed"}.'].join(`
|
|
6
6
|
`):r==="step"?`Step recorded. ${n.run?$(n.run):""}`.trim():r==="done"?`Step recorded as done. ${n.run?$(n.run):""}`.trim():r==="blocked"?"The step is marked blocked and the owner is told. Nothing more happens on it until it is sorted.":`Saved ${n.workflowId} switched off, and asked the owner (card ${n.cardId}) whether to keep it as a reusable workflow.`}catch(i){return`Error: couldn't reach the daemon (${i?.message??i}).`}}export{T as runWorkflowTool};
|
|
7
|
-
//# sourceMappingURL=follow-up-tool-
|
|
7
|
+
//# sourceMappingURL=follow-up-tool-NCFOTJ5Y.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=hub-
|
|
1
|
+
import{a}from"./chunk-EI3TZ52P.js";import"./chunk-MQV3IU6F.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-HNA4BW47.js";import"./chunk-WPNRDEHW.js";import"./chunk-KHKG7H6Q.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-AHWWJ7AF.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{a as WikiHub};
|
|
2
|
+
//# sourceMappingURL=hub-F3X7NL4B.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -7193,6 +7193,9 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7193
7193
|
* or closed as completed (#1522). Requests waiting on the owner are
|
|
7194
7194
|
* left. Read as often as requests.checkers.checkEveryMinutes. */
|
|
7195
7195
|
homeCloses: z.ZodDefault<z.ZodBoolean>;
|
|
7196
|
+
/** The owner writing again in a chat sends that agent's requests waiting
|
|
7197
|
+
* on the owner there back to work, caught question or not (#1520). */
|
|
7198
|
+
releaseOnOwnerTurn: z.ZodDefault<z.ZodBoolean>;
|
|
7196
7199
|
/** One Promise (src/requests/promise.ts, #1138 D): what a closed promise
|
|
7197
7200
|
* leaves, and whether decision cards are promises too. */
|
|
7198
7201
|
promises: z.ZodDefault<z.ZodObject<{
|
|
@@ -7263,6 +7266,41 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7263
7266
|
}>>;
|
|
7264
7267
|
/** Closed requests are deleted after this many days. Open ones never are. */
|
|
7265
7268
|
retentionDays: z.ZodDefault<z.ZodNumber>;
|
|
7269
|
+
/** Resend once (src/requests/resend.ts, #1542): a request that needs
|
|
7270
|
+
* attention because a usage limit or a restart stopped it is sent back
|
|
7271
|
+
* to its agent one time, on its own. The owner is told only if that
|
|
7272
|
+
* resend stops too, or the wait runs past holdMaxHours. */
|
|
7273
|
+
autoResend: z.ZodDefault<z.ZodObject<{
|
|
7274
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
7275
|
+
/** Minutes after it stopped before it is resent. A limit also waits
|
|
7276
|
+
* until no usage-limit hold is active. */
|
|
7277
|
+
afterMinutes: z.ZodDefault<z.ZodNumber>;
|
|
7278
|
+
/** Hours the owner's notice waits for the resend. Past it, they are
|
|
7279
|
+
* told as before. */
|
|
7280
|
+
holdMaxHours: z.ZodDefault<z.ZodNumber>;
|
|
7281
|
+
}, "strip", z.ZodTypeAny, {
|
|
7282
|
+
enabled: boolean;
|
|
7283
|
+
afterMinutes: number;
|
|
7284
|
+
holdMaxHours: number;
|
|
7285
|
+
}, {
|
|
7286
|
+
enabled?: boolean | undefined;
|
|
7287
|
+
afterMinutes?: number | undefined;
|
|
7288
|
+
holdMaxHours?: number | undefined;
|
|
7289
|
+
}>>;
|
|
7290
|
+
/** The daily flow rate (src/requests/flow.ts, #1542): requests closed
|
|
7291
|
+
* (done, declined or dropped) out of those asked, per day. */
|
|
7292
|
+
flow: z.ZodDefault<z.ZodObject<{
|
|
7293
|
+
/** Whose day the count follows: an IANA time zone. */
|
|
7294
|
+
timeZone: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
7295
|
+
/** Days shown by default. */
|
|
7296
|
+
days: z.ZodDefault<z.ZodNumber>;
|
|
7297
|
+
}, "strip", z.ZodTypeAny, {
|
|
7298
|
+
days: number;
|
|
7299
|
+
timeZone: string;
|
|
7300
|
+
}, {
|
|
7301
|
+
days?: number | undefined;
|
|
7302
|
+
timeZone?: string | undefined;
|
|
7303
|
+
}>>;
|
|
7266
7304
|
/** Tracked plans (src/requests/plans.ts, #788): a request with two or
|
|
7267
7305
|
* more steps, each with an owner agent, followed until every step is
|
|
7268
7306
|
* done. Needs `enabled` above. */
|
|
@@ -7284,6 +7322,30 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7284
7322
|
/** An accept whose `estimateMinutes` is over this needs a plan too.
|
|
7285
7323
|
* 0: no estimate needs one. */
|
|
7286
7324
|
requireOverMinutes: z.ZodDefault<z.ZodNumber>;
|
|
7325
|
+
/** Keep a step moving (#1568): when a turn on a plan step ends and the
|
|
7326
|
+
* step moved (its count went down, or a new progress report), the
|
|
7327
|
+
* daemon starts the next turn on it at once. The nudge stays as the
|
|
7328
|
+
* safety net for a turn that never ends. Off by default. */
|
|
7329
|
+
continue: z.ZodDefault<z.ZodObject<{
|
|
7330
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
7331
|
+
/** Only the plans of these request ids or goal ids. Empty: every plan. */
|
|
7332
|
+
only: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
7333
|
+
/** Turns started this way, per goal (or request) per day. When they
|
|
7334
|
+
* run out, the owner is told once and the nudges take over. */
|
|
7335
|
+
maxTurnsPerDay: z.ZodDefault<z.ZodNumber>;
|
|
7336
|
+
/** What those turns may cost, per goal per day, in USD. */
|
|
7337
|
+
maxCostUsdPerDay: z.ZodDefault<z.ZodNumber>;
|
|
7338
|
+
}, "strip", z.ZodTypeAny, {
|
|
7339
|
+
enabled: boolean;
|
|
7340
|
+
only: string[];
|
|
7341
|
+
maxTurnsPerDay: number;
|
|
7342
|
+
maxCostUsdPerDay: number;
|
|
7343
|
+
}, {
|
|
7344
|
+
enabled?: boolean | undefined;
|
|
7345
|
+
only?: string[] | undefined;
|
|
7346
|
+
maxTurnsPerDay?: number | undefined;
|
|
7347
|
+
maxCostUsdPerDay?: number | undefined;
|
|
7348
|
+
}>>;
|
|
7287
7349
|
}, "strip", z.ZodTypeAny, {
|
|
7288
7350
|
enabled: boolean;
|
|
7289
7351
|
stallMinutes: number;
|
|
@@ -7292,6 +7354,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7292
7354
|
disabledAgents: string[];
|
|
7293
7355
|
requireForWork: string[];
|
|
7294
7356
|
requireOverMinutes: number;
|
|
7357
|
+
continue: {
|
|
7358
|
+
enabled: boolean;
|
|
7359
|
+
only: string[];
|
|
7360
|
+
maxTurnsPerDay: number;
|
|
7361
|
+
maxCostUsdPerDay: number;
|
|
7362
|
+
};
|
|
7295
7363
|
}, {
|
|
7296
7364
|
enabled?: boolean | undefined;
|
|
7297
7365
|
stallMinutes?: number | undefined;
|
|
@@ -7300,6 +7368,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7300
7368
|
disabledAgents?: string[] | undefined;
|
|
7301
7369
|
requireForWork?: string[] | undefined;
|
|
7302
7370
|
requireOverMinutes?: number | undefined;
|
|
7371
|
+
continue?: {
|
|
7372
|
+
enabled?: boolean | undefined;
|
|
7373
|
+
only?: string[] | undefined;
|
|
7374
|
+
maxTurnsPerDay?: number | undefined;
|
|
7375
|
+
maxCostUsdPerDay?: number | undefined;
|
|
7376
|
+
} | undefined;
|
|
7303
7377
|
}>>;
|
|
7304
7378
|
/** Sprint lanes (src/requests/sprints.ts, #1241): a lead agent hands the
|
|
7305
7379
|
* daemon lanes of items (agentx_sprint), and the daemon gives each lane
|
|
@@ -7511,6 +7585,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7511
7585
|
disabledAgents: string[];
|
|
7512
7586
|
requireForWork: string[];
|
|
7513
7587
|
requireOverMinutes: number;
|
|
7588
|
+
continue: {
|
|
7589
|
+
enabled: boolean;
|
|
7590
|
+
only: string[];
|
|
7591
|
+
maxTurnsPerDay: number;
|
|
7592
|
+
maxCostUsdPerDay: number;
|
|
7593
|
+
};
|
|
7514
7594
|
};
|
|
7515
7595
|
channels: string[];
|
|
7516
7596
|
staleAfterHours: number;
|
|
@@ -7536,6 +7616,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7536
7616
|
};
|
|
7537
7617
|
settleHandedBack: boolean;
|
|
7538
7618
|
homeCloses: boolean;
|
|
7619
|
+
releaseOnOwnerTurn: boolean;
|
|
7539
7620
|
statusDrift: {
|
|
7540
7621
|
enabled: boolean;
|
|
7541
7622
|
projects: {
|
|
@@ -7572,6 +7653,15 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7572
7653
|
waitingOwner: boolean;
|
|
7573
7654
|
timeoutSeconds: number;
|
|
7574
7655
|
};
|
|
7656
|
+
autoResend: {
|
|
7657
|
+
enabled: boolean;
|
|
7658
|
+
afterMinutes: number;
|
|
7659
|
+
holdMaxHours: number;
|
|
7660
|
+
};
|
|
7661
|
+
flow: {
|
|
7662
|
+
days: number;
|
|
7663
|
+
timeZone: string;
|
|
7664
|
+
};
|
|
7575
7665
|
sprints: {
|
|
7576
7666
|
enabled: boolean;
|
|
7577
7667
|
idleMinutes: number;
|
|
@@ -7587,6 +7677,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7587
7677
|
disabledAgents?: string[] | undefined;
|
|
7588
7678
|
requireForWork?: string[] | undefined;
|
|
7589
7679
|
requireOverMinutes?: number | undefined;
|
|
7680
|
+
continue?: {
|
|
7681
|
+
enabled?: boolean | undefined;
|
|
7682
|
+
only?: string[] | undefined;
|
|
7683
|
+
maxTurnsPerDay?: number | undefined;
|
|
7684
|
+
maxCostUsdPerDay?: number | undefined;
|
|
7685
|
+
} | undefined;
|
|
7590
7686
|
} | undefined;
|
|
7591
7687
|
channels?: string[] | undefined;
|
|
7592
7688
|
staleAfterHours?: number | undefined;
|
|
@@ -7612,6 +7708,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7612
7708
|
} | undefined;
|
|
7613
7709
|
settleHandedBack?: boolean | undefined;
|
|
7614
7710
|
homeCloses?: boolean | undefined;
|
|
7711
|
+
releaseOnOwnerTurn?: boolean | undefined;
|
|
7615
7712
|
statusDrift?: {
|
|
7616
7713
|
enabled?: boolean | undefined;
|
|
7617
7714
|
projects?: {
|
|
@@ -7648,6 +7745,15 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7648
7745
|
waitingOwner?: boolean | undefined;
|
|
7649
7746
|
timeoutSeconds?: number | undefined;
|
|
7650
7747
|
} | undefined;
|
|
7748
|
+
autoResend?: {
|
|
7749
|
+
enabled?: boolean | undefined;
|
|
7750
|
+
afterMinutes?: number | undefined;
|
|
7751
|
+
holdMaxHours?: number | undefined;
|
|
7752
|
+
} | undefined;
|
|
7753
|
+
flow?: {
|
|
7754
|
+
days?: number | undefined;
|
|
7755
|
+
timeZone?: string | undefined;
|
|
7756
|
+
} | undefined;
|
|
7651
7757
|
sprints?: {
|
|
7652
7758
|
enabled?: boolean | undefined;
|
|
7653
7759
|
idleMinutes?: number | undefined;
|
|
@@ -10706,7 +10812,9 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
10706
10812
|
*
|
|
10707
10813
|
* - `maxIdleSeconds`: a handle becomes eligible for cap-pressured
|
|
10708
10814
|
* eviction this many seconds after its last turn. Default 30s
|
|
10709
|
-
* (matches the registry's pre-config behavior).
|
|
10815
|
+
* (matches the registry's pre-config behavior). Counted from the
|
|
10816
|
+
* process's last output; a process with background tasks open or a
|
|
10817
|
+
* turn of its own running is never idle (#1560).
|
|
10710
10818
|
* - `maxAgeSeconds`: a handle is killed unconditionally on the next
|
|
10711
10819
|
* sweep once its total wall-clock idleness exceeds this. Default
|
|
10712
10820
|
* 2700s (45min) — matches the registry's pre-config staleTimeoutMs.
|
|
@@ -11116,6 +11224,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
11116
11224
|
disabledAgents: string[];
|
|
11117
11225
|
requireForWork: string[];
|
|
11118
11226
|
requireOverMinutes: number;
|
|
11227
|
+
continue: {
|
|
11228
|
+
enabled: boolean;
|
|
11229
|
+
only: string[];
|
|
11230
|
+
maxTurnsPerDay: number;
|
|
11231
|
+
maxCostUsdPerDay: number;
|
|
11232
|
+
};
|
|
11119
11233
|
};
|
|
11120
11234
|
channels: string[];
|
|
11121
11235
|
staleAfterHours: number;
|
|
@@ -11141,6 +11255,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
11141
11255
|
};
|
|
11142
11256
|
settleHandedBack: boolean;
|
|
11143
11257
|
homeCloses: boolean;
|
|
11258
|
+
releaseOnOwnerTurn: boolean;
|
|
11144
11259
|
statusDrift: {
|
|
11145
11260
|
enabled: boolean;
|
|
11146
11261
|
projects: {
|
|
@@ -11177,6 +11292,15 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
11177
11292
|
waitingOwner: boolean;
|
|
11178
11293
|
timeoutSeconds: number;
|
|
11179
11294
|
};
|
|
11295
|
+
autoResend: {
|
|
11296
|
+
enabled: boolean;
|
|
11297
|
+
afterMinutes: number;
|
|
11298
|
+
holdMaxHours: number;
|
|
11299
|
+
};
|
|
11300
|
+
flow: {
|
|
11301
|
+
days: number;
|
|
11302
|
+
timeZone: string;
|
|
11303
|
+
};
|
|
11180
11304
|
sprints: {
|
|
11181
11305
|
enabled: boolean;
|
|
11182
11306
|
idleMinutes: number;
|
|
@@ -12531,6 +12655,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
12531
12655
|
disabledAgents?: string[] | undefined;
|
|
12532
12656
|
requireForWork?: string[] | undefined;
|
|
12533
12657
|
requireOverMinutes?: number | undefined;
|
|
12658
|
+
continue?: {
|
|
12659
|
+
enabled?: boolean | undefined;
|
|
12660
|
+
only?: string[] | undefined;
|
|
12661
|
+
maxTurnsPerDay?: number | undefined;
|
|
12662
|
+
maxCostUsdPerDay?: number | undefined;
|
|
12663
|
+
} | undefined;
|
|
12534
12664
|
} | undefined;
|
|
12535
12665
|
channels?: string[] | undefined;
|
|
12536
12666
|
staleAfterHours?: number | undefined;
|
|
@@ -12556,6 +12686,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
12556
12686
|
} | undefined;
|
|
12557
12687
|
settleHandedBack?: boolean | undefined;
|
|
12558
12688
|
homeCloses?: boolean | undefined;
|
|
12689
|
+
releaseOnOwnerTurn?: boolean | undefined;
|
|
12559
12690
|
statusDrift?: {
|
|
12560
12691
|
enabled?: boolean | undefined;
|
|
12561
12692
|
projects?: {
|
|
@@ -12592,6 +12723,15 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
12592
12723
|
waitingOwner?: boolean | undefined;
|
|
12593
12724
|
timeoutSeconds?: number | undefined;
|
|
12594
12725
|
} | undefined;
|
|
12726
|
+
autoResend?: {
|
|
12727
|
+
enabled?: boolean | undefined;
|
|
12728
|
+
afterMinutes?: number | undefined;
|
|
12729
|
+
holdMaxHours?: number | undefined;
|
|
12730
|
+
} | undefined;
|
|
12731
|
+
flow?: {
|
|
12732
|
+
days?: number | undefined;
|
|
12733
|
+
timeZone?: string | undefined;
|
|
12734
|
+
} | undefined;
|
|
12595
12735
|
sprints?: {
|
|
12596
12736
|
enabled?: boolean | undefined;
|
|
12597
12737
|
idleMinutes?: number | undefined;
|
|
@@ -14369,6 +14509,16 @@ declare class AgentXDaemon {
|
|
|
14369
14509
|
/** A lane's turn ended: the item is settled and the lane gets its next
|
|
14370
14510
|
* one right away. */
|
|
14371
14511
|
private sprintItemEnded;
|
|
14512
|
+
/** A turn on a plan step, in the request's own chat. Fire and forget,
|
|
14513
|
+
* like a pick-up. A turn that could not start comes back as { error }:
|
|
14514
|
+
* the step is blocked and the owner told. */
|
|
14515
|
+
private planTurn;
|
|
14516
|
+
/** Requests whose last plan turn the daemon started on its own (#1568). */
|
|
14517
|
+
private planContinued;
|
|
14518
|
+
/** A turn on a plan step ended: when the step moved, the next turn
|
|
14519
|
+
* starts at once instead of after the 30-minute nudge
|
|
14520
|
+
* (src/requests/plan-continue.ts, #1568). */
|
|
14521
|
+
private attachPlanContinue;
|
|
14372
14522
|
/** A lane's turn this daemon did not start ended: one an earlier daemon
|
|
14373
14523
|
* started and this boot resumed. Its running item is settled. */
|
|
14374
14524
|
private attachSprintEnds;
|
|
@@ -15395,6 +15545,7 @@ type ThinkingCallback = (text: string) => void;
|
|
|
15395
15545
|
declare function executeOrchestrator(agent: AgentDef, task: AgentTask, apiKey?: string, historyContext?: string, onDelta?: StreamCallback, providerOpts?: {
|
|
15396
15546
|
thinking?: boolean;
|
|
15397
15547
|
}, onThinking?: ThinkingCallback, abortSignal?: AbortSignal, onEvent?: (event: any) => void): Promise<AgentResponse>;
|
|
15548
|
+
|
|
15398
15549
|
declare function executeTask(agent: AgentDef, task: AgentTask, providers: Record<string, {
|
|
15399
15550
|
apiKey?: string;
|
|
15400
15551
|
}>, onDelta?: StreamCallback, historyContext?: string, resumeSessionId?: string, onEvent?: (event: any) => void, abortSignal?: AbortSignal, onThinking?: ThinkingCallback): Promise<AgentResponse>;
|
|
@@ -21480,6 +21631,11 @@ declare class CronScheduler {
|
|
|
21480
21631
|
* Execute missed runs (catch-up). Runs sequentially to avoid overwhelming agents.
|
|
21481
21632
|
*/
|
|
21482
21633
|
private executeMissedRuns;
|
|
21634
|
+
/**
|
|
21635
|
+
* Count a failed run, send the failure notice, and turn the job off after
|
|
21636
|
+
* 3 failures in a row when its `onError` says `disable`.
|
|
21637
|
+
*/
|
|
21638
|
+
private recordFailure;
|
|
21483
21639
|
private deliverResult;
|
|
21484
21640
|
private notifyFailure;
|
|
21485
21641
|
private notifyDisabled;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{La as Tt,Ma as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt}from"./chunk-462FRP7L.js";import"./chunk-RDENYWNG.js";import"./chunk-GTJIKXDB.js";import"./chunk-FEXG2PKQ.js";import"./chunk-ZVP6GB4G.js";import"./chunk-BKTKJNCR.js";import"./chunk-IMLAPB7G.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-TDZDIDFG.js";import"./chunk-6V5JBHUN.js";import"./chunk-2VDO2HEK.js";import"./chunk-5HLD66CW.js";import"./chunk-IS2IWRP7.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-MRIVENBY.js";import"./chunk-BIYEGA7Q.js";import"./chunk-XPZSEDE3.js";import"./chunk-PPUN7YHA.js";import"./chunk-A5GYG56I.js";import"./chunk-52NME3AU.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-UKUH662W.js";import"./chunk-JWDJMFU6.js";import"./chunk-6TTGRTDO.js";import"./chunk-MNG2AMKZ.js";import"./chunk-RX5O5637.js";import"./chunk-5ELIX7BQ.js";import"./chunk-X7UQY7CH.js";import"./chunk-UOYIC7XN.js";import"./chunk-QPABR72X.js";import"./chunk-H5XBQWAI.js";import"./chunk-AJ5HMDRW.js";import"./chunk-KP7KDLZ2.js";import"./chunk-XVV7ZZ77.js";import{Ca as yt,m as lt,n as ct,o as dt,p as mt,q as pt}from"./chunk-22WO5X4L.js";import"./chunk-VK2TW3RL.js";import"./chunk-MEFPXHQJ.js";import"./chunk-MQRAQJSS.js";import{a as L}from"./chunk-BAXGL6TY.js";import{A as D,B as z,C as V,a as ye,b as we,c as Se,d as Ae,e as Ie,f as Oe,g as Ne,h as He,i as je,j as Ue,k as _e,l as I,m as q,n as Be,o as qe,p as Ye,q as O,r as ze,s as Ve,t as Xe,u as x,v as Y,w as Qe,x as Ze,y as et,z as wt}from"./chunk-6FUWODBV.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-GV7S5BAX.js";import"./chunk-SZDACK6O.js";import"./chunk-VE3SSOQX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-VJVXEVZ7.js";import{t as ut}from"./chunk-JGZ6CA5L.js";import"./chunk-DACZSUCN.js";import"./chunk-3UOTLMXD.js";import"./chunk-VWTBHLMX.js";import"./chunk-BE64IJWM.js";import"./chunk-5ONH4ITT.js";import"./chunk-JRAG37V5.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GSX4NK2N.js";import"./chunk-HPRLRD4P.js";import"./chunk-EI3TZ52P.js";import{a as ht}from"./chunk-MQV3IU6F.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-GLYBXXO7.js";import"./chunk-JTFCU5LH.js";import{f as gt,g as ft}from"./chunk-HNA4BW47.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-AAL5WIXB.js";import{j as it,k as rt,l as at}from"./chunk-KHKG7H6Q.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-QUFIUXMQ.js";import"./chunk-AV7T3SYT.js";import"./chunk-2HBEZV7L.js";import"./chunk-A7JSRDJL.js";import"./chunk-BERWTVG2.js";import"./chunk-AHWWJ7AF.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-DCIYOPJF.js";import{a as m,b as G}from"./chunk-7I7IEX4S.js";import{b as Fe,c as Le,d as A,e as De}from"./chunk-JHCI6XCJ.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{Ab as ot,Hb as nt,wb as tt,yb as st}from"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
|
|
2
2
|
`)}
|
|
3
3
|
|
|
4
4
|
${t}`}async function It(o){let{loadLocalSkills:e}=await import("./loader-YFVSSYSL.js");return e(o)}async function Ot(o,e,t,s,i){let a=[{role:"system",content:`You are a skill author for the Agent Skills ecosystem (skills.sh).
|