agentix-cli 0.222.0 → 0.224.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-GTHE3AEN.js → App-T2X4V3KJ.js} +2 -2
- package/dist/{ChatApp-XQ535KGJ.js → ChatApp-77LV3KDC.js} +2 -2
- package/dist/{absorb-eval-VBW5ZT4O.js → absorb-eval-C4TMU2YP.js} +2 -2
- package/dist/{adapter-BWCC3TCU.js → adapter-7MPJTYU4.js} +2 -2
- package/dist/{agent-2JGSQ4NM.js → agent-P4SO73JE.js} +2 -2
- package/dist/{board-dashboard-GP44R4TJ.js → board-dashboard-PVNVQ6OM.js} +4 -4
- package/dist/{chunk-GR6BSPIQ.js → chunk-33E7GHUP.js} +2 -2
- package/dist/{chunk-OVLLJMI7.js → chunk-3WU27HEL.js} +2 -2
- package/dist/{chunk-EUNCDWTP.js → chunk-42HQ3SYA.js} +2 -2
- package/dist/{chunk-E7GOYIL7.js → chunk-4DLQ34A4.js} +2 -2
- package/dist/{chunk-PGKN3RJV.js → chunk-4ORSOSGF.js} +2 -2
- package/dist/{chunk-CA7ZDUGT.js → chunk-54WLFAEM.js} +2 -2
- package/dist/{chunk-AVJ4RR2R.js → chunk-5ISTRQ5V.js} +17 -17
- package/dist/{chunk-AVJ4RR2R.js.map → chunk-5ISTRQ5V.js.map} +1 -1
- package/dist/{chunk-5NU3CFIM.js → chunk-5JGA4IO2.js} +2 -2
- package/dist/{chunk-GZEWEPH5.js → chunk-ADX5IFBO.js} +3 -3
- package/dist/{chunk-5QAOPW5J.js → chunk-AGXT2EIB.js} +331 -331
- package/dist/chunk-AGXT2EIB.js.map +1 -0
- package/dist/{chunk-VZ5F3CXQ.js → chunk-D25JPBL3.js} +2 -2
- package/dist/{chunk-AICFBHJQ.js → chunk-EONMQXBQ.js} +2 -2
- package/dist/{chunk-X6TKWUY2.js → chunk-G2OWUMA2.js} +2 -2
- package/dist/{chunk-WNQSR6RI.js → chunk-HWPRTPAD.js} +2 -2
- package/dist/{chunk-JT6BGINS.js → chunk-KHKQ4KD2.js} +2 -2
- package/dist/{chunk-66GIGOWE.js → chunk-KWW5LFWA.js} +2 -2
- package/dist/{chunk-AYZYEYI7.js → chunk-LRBHGRCQ.js} +2 -2
- package/dist/{chunk-QQLXTDS2.js → chunk-LTLOG2BU.js} +2 -2
- package/dist/{chunk-P5ZGTHJO.js → chunk-MRJAPYWI.js} +2 -2
- package/dist/{chunk-NHIMHP6L.js → chunk-MSIIN4XL.js} +2 -2
- package/dist/{chunk-CJ3FDM2O.js → chunk-QC6URPDP.js} +109 -108
- package/dist/chunk-QC6URPDP.js.map +1 -0
- package/dist/{chunk-KLLI3MBQ.js → chunk-R3JYY4KP.js} +2 -2
- package/dist/{chunk-NXXYXNS3.js → chunk-SR272D4M.js} +2 -2
- package/dist/{chunk-IVMV2YSK.js → chunk-SUOGHFWT.js} +2 -2
- package/dist/{chunk-BPTWALJN.js → chunk-T3KKQ3Q7.js} +2 -2
- package/dist/{chunk-HSWRKXCK.js → chunk-UXZLBT4S.js} +2 -2
- package/dist/{chunk-HGKDI24R.js → chunk-VH5FZTOS.js} +2 -2
- package/dist/{chunk-TFXDHVHP.js → chunk-XDIGL3QD.js} +2 -2
- package/dist/{chunk-7Z6AKGWN.js → chunk-XMRXPBSW.js} +2 -2
- package/dist/{chunk-HQAWGHFI.js → chunk-Z4DSJSK5.js} +2 -2
- package/dist/{chunk-BRUKO65H.js → chunk-ZDTYUCZM.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{client-HA6ZO6AE.js → client-33LZO62O.js} +2 -2
- package/dist/{config-YNYDIHQF.js → config-DNCHX2M5.js} +2 -2
- package/dist/{config-mutate-6FOGY2HR.js → config-mutate-Q5424C7H.js} +2 -2
- package/dist/{config-mutator-PL26XUXG.js → config-mutator-OIXCURJR.js} +2 -2
- package/dist/{contributions-FHSZECVP.js → contributions-P4EPZJS2.js} +2 -2
- package/dist/{doctor-TVOOFWSO.js → doctor-PHNL2TKP.js} +2 -2
- package/dist/{follow-up-tool-EU2267VV.js → follow-up-tool-JXB4KIXM.js} +2 -2
- package/dist/{hub-KOWKXWDL.js → hub-MS2ABH2B.js} +2 -2
- package/dist/index.d.ts +76 -0
- package/dist/index.js +1 -1
- package/dist/{org-tool-2QQTKDCQ.js → org-tool-XXIH7GXM.js} +2 -2
- package/dist/{program-7U7DSO7T.js → program-VODTEBZO.js} +24 -24
- package/dist/{promote-PCK4AROK.js → promote-V4YRQBBY.js} +2 -2
- package/dist/{query-H2VPF42I.js → query-4PF4EN5C.js} +2 -2
- package/dist/{query-settings-G2N46YLB.js → query-settings-K6RIFAEC.js} +2 -2
- package/dist/{registry-PGYJ4FRA.js → registry-5XMD5T26.js} +2 -2
- package/dist/{request-planner-XPPRK5G3.js → request-planner-5W76FRQP.js} +2 -2
- package/dist/{review-candidates-I47EBNJT.js → review-candidates-H76ZPZV5.js} +2 -2
- package/dist/{routing-AIHGJNO7.js → routing-JSNB4TNV.js} +2 -2
- package/dist/{schedule-tool-CX6YSAQY.js → schedule-tool-DNK5PMV2.js} +2 -2
- package/dist/{scheduler-LEVZX5IH.js → scheduler-ZSXPT3QT.js} +2 -2
- package/dist/{seat-DEV2UTKV.js → seat-C7MZFKK4.js} +2 -2
- package/dist/{select-ULJSZMQD.js → select-FRQEWUQT.js} +2 -2
- package/dist/{set-enabled-KR5BSI4O.js → set-enabled-OKCRK3VA.js} +2 -2
- package/dist/{sprint-tool-KW3ZMBKF.js → sprint-tool-MI7SVZ7R.js} +2 -2
- package/dist/{tool-FEJMTLSC.js → tool-4UTLSFI4.js} +2 -2
- package/dist/{tool-5AGFJGDR.js → tool-64B66HG4.js} +2 -2
- package/dist/{tool-WIP576PN.js → tool-D6Z7QMXN.js} +2 -2
- package/dist/tool-JPOKRXTJ.js +2 -0
- package/dist/{tool-GI7NVYWM.js → tool-R5ZWS4ZA.js} +2 -2
- package/dist/{wiki-ZAJCINRT.js → wiki-NTZHPFQO.js} +2 -2
- package/dist/wiki-enrich-KZLO6PMV.js +2 -0
- package/package.json +1 -1
- package/dist/chunk-5QAOPW5J.js.map +0 -1
- package/dist/chunk-CJ3FDM2O.js.map +0 -1
- package/dist/tool-LE26EHHZ.js +0 -2
- package/dist/wiki-enrich-EE4STC4Q.js +0 -2
- /package/dist/{App-GTHE3AEN.js.map → App-T2X4V3KJ.js.map} +0 -0
- /package/dist/{ChatApp-XQ535KGJ.js.map → ChatApp-77LV3KDC.js.map} +0 -0
- /package/dist/{absorb-eval-VBW5ZT4O.js.map → absorb-eval-C4TMU2YP.js.map} +0 -0
- /package/dist/{adapter-BWCC3TCU.js.map → adapter-7MPJTYU4.js.map} +0 -0
- /package/dist/{agent-2JGSQ4NM.js.map → agent-P4SO73JE.js.map} +0 -0
- /package/dist/{board-dashboard-GP44R4TJ.js.map → board-dashboard-PVNVQ6OM.js.map} +0 -0
- /package/dist/{chunk-GR6BSPIQ.js.map → chunk-33E7GHUP.js.map} +0 -0
- /package/dist/{chunk-OVLLJMI7.js.map → chunk-3WU27HEL.js.map} +0 -0
- /package/dist/{chunk-EUNCDWTP.js.map → chunk-42HQ3SYA.js.map} +0 -0
- /package/dist/{chunk-E7GOYIL7.js.map → chunk-4DLQ34A4.js.map} +0 -0
- /package/dist/{chunk-PGKN3RJV.js.map → chunk-4ORSOSGF.js.map} +0 -0
- /package/dist/{chunk-CA7ZDUGT.js.map → chunk-54WLFAEM.js.map} +0 -0
- /package/dist/{chunk-5NU3CFIM.js.map → chunk-5JGA4IO2.js.map} +0 -0
- /package/dist/{chunk-GZEWEPH5.js.map → chunk-ADX5IFBO.js.map} +0 -0
- /package/dist/{chunk-VZ5F3CXQ.js.map → chunk-D25JPBL3.js.map} +0 -0
- /package/dist/{chunk-AICFBHJQ.js.map → chunk-EONMQXBQ.js.map} +0 -0
- /package/dist/{chunk-X6TKWUY2.js.map → chunk-G2OWUMA2.js.map} +0 -0
- /package/dist/{chunk-WNQSR6RI.js.map → chunk-HWPRTPAD.js.map} +0 -0
- /package/dist/{chunk-JT6BGINS.js.map → chunk-KHKQ4KD2.js.map} +0 -0
- /package/dist/{chunk-66GIGOWE.js.map → chunk-KWW5LFWA.js.map} +0 -0
- /package/dist/{chunk-AYZYEYI7.js.map → chunk-LRBHGRCQ.js.map} +0 -0
- /package/dist/{chunk-QQLXTDS2.js.map → chunk-LTLOG2BU.js.map} +0 -0
- /package/dist/{chunk-P5ZGTHJO.js.map → chunk-MRJAPYWI.js.map} +0 -0
- /package/dist/{chunk-NHIMHP6L.js.map → chunk-MSIIN4XL.js.map} +0 -0
- /package/dist/{chunk-KLLI3MBQ.js.map → chunk-R3JYY4KP.js.map} +0 -0
- /package/dist/{chunk-NXXYXNS3.js.map → chunk-SR272D4M.js.map} +0 -0
- /package/dist/{chunk-IVMV2YSK.js.map → chunk-SUOGHFWT.js.map} +0 -0
- /package/dist/{chunk-BPTWALJN.js.map → chunk-T3KKQ3Q7.js.map} +0 -0
- /package/dist/{chunk-HSWRKXCK.js.map → chunk-UXZLBT4S.js.map} +0 -0
- /package/dist/{chunk-HGKDI24R.js.map → chunk-VH5FZTOS.js.map} +0 -0
- /package/dist/{chunk-TFXDHVHP.js.map → chunk-XDIGL3QD.js.map} +0 -0
- /package/dist/{chunk-7Z6AKGWN.js.map → chunk-XMRXPBSW.js.map} +0 -0
- /package/dist/{chunk-HQAWGHFI.js.map → chunk-Z4DSJSK5.js.map} +0 -0
- /package/dist/{chunk-BRUKO65H.js.map → chunk-ZDTYUCZM.js.map} +0 -0
- /package/dist/{client-HA6ZO6AE.js.map → client-33LZO62O.js.map} +0 -0
- /package/dist/{config-YNYDIHQF.js.map → config-DNCHX2M5.js.map} +0 -0
- /package/dist/{config-mutate-6FOGY2HR.js.map → config-mutate-Q5424C7H.js.map} +0 -0
- /package/dist/{config-mutator-PL26XUXG.js.map → config-mutator-OIXCURJR.js.map} +0 -0
- /package/dist/{contributions-FHSZECVP.js.map → contributions-P4EPZJS2.js.map} +0 -0
- /package/dist/{doctor-TVOOFWSO.js.map → doctor-PHNL2TKP.js.map} +0 -0
- /package/dist/{follow-up-tool-EU2267VV.js.map → follow-up-tool-JXB4KIXM.js.map} +0 -0
- /package/dist/{hub-KOWKXWDL.js.map → hub-MS2ABH2B.js.map} +0 -0
- /package/dist/{org-tool-2QQTKDCQ.js.map → org-tool-XXIH7GXM.js.map} +0 -0
- /package/dist/{program-7U7DSO7T.js.map → program-VODTEBZO.js.map} +0 -0
- /package/dist/{promote-PCK4AROK.js.map → promote-V4YRQBBY.js.map} +0 -0
- /package/dist/{query-H2VPF42I.js.map → query-4PF4EN5C.js.map} +0 -0
- /package/dist/{query-settings-G2N46YLB.js.map → query-settings-K6RIFAEC.js.map} +0 -0
- /package/dist/{registry-PGYJ4FRA.js.map → registry-5XMD5T26.js.map} +0 -0
- /package/dist/{request-planner-XPPRK5G3.js.map → request-planner-5W76FRQP.js.map} +0 -0
- /package/dist/{review-candidates-I47EBNJT.js.map → review-candidates-H76ZPZV5.js.map} +0 -0
- /package/dist/{routing-AIHGJNO7.js.map → routing-JSNB4TNV.js.map} +0 -0
- /package/dist/{schedule-tool-CX6YSAQY.js.map → schedule-tool-DNK5PMV2.js.map} +0 -0
- /package/dist/{scheduler-LEVZX5IH.js.map → scheduler-ZSXPT3QT.js.map} +0 -0
- /package/dist/{seat-DEV2UTKV.js.map → seat-C7MZFKK4.js.map} +0 -0
- /package/dist/{select-ULJSZMQD.js.map → select-FRQEWUQT.js.map} +0 -0
- /package/dist/{set-enabled-KR5BSI4O.js.map → set-enabled-OKCRK3VA.js.map} +0 -0
- /package/dist/{sprint-tool-KW3ZMBKF.js.map → sprint-tool-MI7SVZ7R.js.map} +0 -0
- /package/dist/{tool-FEJMTLSC.js.map → tool-4UTLSFI4.js.map} +0 -0
- /package/dist/{tool-5AGFJGDR.js.map → tool-64B66HG4.js.map} +0 -0
- /package/dist/{tool-WIP576PN.js.map → tool-D6Z7QMXN.js.map} +0 -0
- /package/dist/{tool-LE26EHHZ.js.map → tool-JPOKRXTJ.js.map} +0 -0
- /package/dist/{tool-GI7NVYWM.js.map → tool-R5ZWS4ZA.js.map} +0 -0
- /package/dist/{wiki-ZAJCINRT.js.map → wiki-NTZHPFQO.js.map} +0 -0
- /package/dist/{wiki-enrich-EE4STC4Q.js.map → wiki-enrich-KZLO6PMV.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as g}from"./chunk-
|
|
1
|
+
import{e as g}from"./chunk-ADX5IFBO.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-5JGA4IO2.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as _,b as F,c as K,d as z,e as J}from"./chunk-JTFCU5LH.js";import{a as H}from"./chunk-LUOW2YHY.js";import{a as j,b as I,c as Y,d as V,e as B,j as G}from"./chunk-
|
|
1
|
+
import{a as _,b as F,c as K,d as z,e as J}from"./chunk-JTFCU5LH.js";import{a as H}from"./chunk-LUOW2YHY.js";import{a as j,b as I,c as Y,d as V,e as B,j as G}from"./chunk-XDIGL3QD.js";import{b as E,c as L}from"./chunk-AHWWJ7AF.js";import{y as N,z as ot}from"./chunk-4DLQ34A4.js";import{h as Q}from"./chunk-QUFIUXMQ.js";import{readFileSync as lt,existsSync as X}from"fs";ot();import{resolve as R}from"path";import{execSync as ct}from"child_process";var ht="haiku",dt="sonnet",pt=.8;function mt(e,r,o,t){if(t.size===0)return 0;let c=e.listArticles(r||"").map(l=>l.path).filter(l=>!l.includes("/_versions/"));return c.length===0&&(c=o.sharedPool.map(l=>l.path)),c.length===0?0:c.filter(l=>t.has(l)).length/c.length}async function _t(e,r,o,t={}){let c=t.selectorModel??ht,l=t.synthModel??dt,m=t.maxCandidates??3,g=t.maxHops??2,d=t.maxArticles??8,i=t.timeoutMs??6e4,s=t.log??console.error.bind(console,"[wiki-query]"),h=t.messagePath?.length?t.messagePath:void 0,n=t.graphWeight??W,a=R(r.baseDir,"_index.md"),p=tt(r,o,t.shared),b=t.method??"catalog";if(b!=="catalog"){let u=z(r,t.shared);if(b==="summaries"||mt(r,o,p,u)>=pt){let f=t.summaries??K,P=t.notes&&o&&t.notes.owner===o?F(t.notes):void 0,y=await J(e,P?gt(p,P):p,P?new Map([...u,...P.summaries]):u,{...f,navigatorModel:t.selectorModel??f.navigatorModel,answerModel:t.synthModel??f.answerModel},{call:t.call??H,fetch:t.fetch,timeoutMs:i,log:s}),$=y.picked.map(w=>({title:w.meta.title,path:w.path,type:_(w.path)?"note":w.meta.type,hop:w.hop}));return{answer:y.answer,citations:y.status==="ok"?$.map(({hop:w,...v})=>v):[],candidates:$.filter(w=>w.hop===0).map(({title:w,path:v})=>({title:w,path:v})),walked:$,status:y.status,method:"summaries",basis:y.basis,live:y.live,liveAsked:y.liveAsked,trace:y.trace,...y.error?{error:y.error}:{}}}}if(!X(a)&&p.sharedPool.length===0)return M("no-catalog",e,"No _index.md found \u2014 run `agentx wiki status` to rebuild.");let it=(X(a)?lt(a,"utf-8"):"")+yt(e,p.sharedPool,h,n),T=Date.now(),A=[],S="";try{let u=await nt(e,p.pool,o,m,h,n);u?(A=u,S=`[wiki-rerank seat] ${u.map(f=>f.title).join(" | ")}`):(S=await Z(wt(e,it,m,h),c,i),A=bt(S))}catch(u){return s("selector failed:",u?.message),{...M("error",e,`Selector: ${u?.message||"unknown"}`),trace:{selectorMs:Date.now()-T,synthesisMs:0,selectorOutput:S}}}let x=Date.now()-T;if(A.length===0)return{...M("no-candidates",e,"Selector returned no candidates."),trace:{selectorMs:x,synthesisMs:0,selectorOutput:S}};let C=rt(A,p,g,d);if(C.length===0)return{...M("no-candidates",e,"Candidates did not resolve to readable articles."),candidates:A,trace:{selectorMs:x,synthesisMs:0,selectorOutput:S}};let D=Date.now(),U="";try{U=await Z(kt(e,C),l,i*2)}catch(u){return s("synthesis failed:",u?.message),{...M("error",e,`Synthesis: ${u?.message||"unknown"}`),candidates:A,walked:C.map(f=>({title:f.meta.title,path:f.path,type:f.meta.type,hop:f.hop??0})),trace:{selectorMs:x,synthesisMs:Date.now()-D,selectorOutput:S}}}let st=Date.now()-D;return{answer:U.trim(),citations:C.map(u=>({title:u.meta.title,path:u.path,type:u.meta.type})),candidates:A,walked:C.map(u=>({title:u.meta.title,path:u.path,type:u.meta.type,hop:u.hop??0})),status:"ok",trace:{selectorMs:x,synthesisMs:st,selectorOutput:S}}}async function Rt(e,r,o,t={}){let c=t.maxCandidates??3,l=t.graphWeight??W,m=t.messagePath?.length?t.messagePath:void 0,g=t.pool??q(r);if(g.length===0||!e.trim())return[];let d=await nt(e,g,o,c,m,l,t.stage??"retrieve");if(!d){let i=new Set(L(e,E(g.map(at))).map(s=>s.docIndex));d=O(e,g,m,l).filter(s=>i.has(s)).slice(0,c).map(s=>({title:g[s].title,path:g[s].path}))}return d.length===0?[]:rt(d,tt(r,o),t.maxHops??1,t.maxArticles??6)}function q(e){try{return(e.rebuildIndex().articles??[]).filter(r=>r.path&&!r.path.includes("/_versions/"))}catch{return[]}}function M(e,r,o){return{answer:"",citations:[],candidates:[],walked:[],status:e,error:o}}function tt(e,r,o=[]){let t=new Map,c=[];for(let i of e.listArticles(r||""))t.set(i.meta.title.toLowerCase(),i.path),c.push({path:i.path,related:i.meta.related??[],lastUpdated:i.meta.lastUpdated??""});let l=[],m=new Map;for(let i of o)if(i.store.baseDir!==e.baseDir){m.set(i.id,i);for(let s of i.store.listArticles(r||"")){if(s.path.includes("/_versions/")||i.skip?.(s.path))continue;let h=`@${i.id}/${s.path}`;l.push(ut(s,h)),c.push({path:h,related:s.meta.related??[],lastUpdated:s.meta.lastUpdated??""});let n=s.meta.title.toLowerCase();t.has(n)||t.set(n,h)}}let g=new Map;if(m.size>0)for(let i of[...c].sort((s,h)=>h.lastUpdated.localeCompare(s.lastUpdated)))for(let s of i.related){let h=s.toLowerCase(),n=g.get(h)??[];n.includes(i.path)||n.push(i.path),g.set(h,n)}let d;return{backlinks:g,readable:new Set(c.map(i=>i.path)),get pool(){return d??=[...q(e),...l]},sharedPool:l,titleIndex:t,read(i){let s=i.match(/^@([^/]+)\/(.+)$/),h=s?m.get(s[1]):void 0;if(s&&!h)return null;let n=h?.store??e,a=s?s[2]:i,p=r?n.readArticleAs(a,r):n.readArticle(a);return p?{...p,path:i}:null},links(i){let s=(i.meta.related??[]).map(a=>t.get(a.toLowerCase())).filter(a=>!!a),h=[i.meta.title,...i.meta.aliases??[]].map(a=>a.toLowerCase()),n=[...new Set(h.flatMap(a=>g.get(a)??[]))].filter(a=>a!==i.path).slice(0,et);return[...new Set([...s,...n])].filter(a=>a!==i.path)}}}function gt(e,r){return{...e,pool:[...e.pool,...r.pool],readable:new Set([...e.readable,...r.pool.map(o=>o.path)]),read:o=>_(o)?r.read(o):e.read(o)}}function ut(e,r){return{path:r,title:e.meta.title,type:e.meta.type,related:e.meta.related,tags:e.meta.tags||[],owner:e.meta.owner,access:e.meta.access,sharedWith:e.meta.sharedWith,aliases:[e.meta.title.toLowerCase(),...(e.meta.aliases??[]).map(o=>o.toLowerCase())],backlinks:0,sources:e.meta.sources,lastUpdated:e.meta.lastUpdated,graphPath:e.meta.graphPath}}var ft=150;function yt(e,r,o,t){return r.length===0?"":`
|
|
2
2
|
|
|
3
3
|
## Shared wiki (other agents' articles)
|
|
4
4
|
|
|
@@ -51,5 +51,5 @@ ${o}
|
|
|
51
51
|
|
|
52
52
|
Answer the question in 2\u20136 sentences. Cite articles by their title in square brackets like [Article Title]. When two articles disagree, prefer the one updated more recently, and say which agent's page and date the answer comes from. If the articles do not answer the question, say so plainly (do not invent). Prefer concrete facts over hedging.
|
|
53
53
|
|
|
54
|
-
Output ONLY the answer \u2014 no preamble, no "here is my answer:", no markdown fencing.`}function bt(e){let r=e.match(/\[[\s\S]*?\]/);if(!r)return[];try{let o=JSON.parse(r[0]);return Array.isArray(o)?o.filter(t=>t&&typeof t.title=="string"&&typeof t.path=="string").map(t=>({title:t.title,path:t.path})):[]}catch{return[]}}async function Z(e,r,o){let{writeFileSync:t,mkdirSync:c,rmSync:l}=await import("fs"),{tmpdir:m}=await import("os"),g=R(m(),`agentx-wiki-query-${process.pid}`);c(g,{recursive:!0});let d=R(g,`prompt-${Date.now()}.txt`);t(d,e);try{let i=`cat '${d}' | claude -p - --output-format json --max-turns 1 --model ${r} --disallowedTools "Bash Read Write Edit Glob Grep Agent WebSearch WebFetch NotebookEdit"`,s=ct(i,{env:Q(),encoding:"utf-8",timeout:o,maxBuffer:4*1024*1024});try{let h=JSON.parse(s);return String(h.result||h.content||"")}catch{return s}}finally{try{l(d,{force:!0})}catch{}}}async function Ot(e){try{let{loadDaemonConfig:r}=await import("./config-
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
Output ONLY the answer \u2014 no preamble, no "here is my answer:", no markdown fencing.`}function bt(e){let r=e.match(/\[[\s\S]*?\]/);if(!r)return[];try{let o=JSON.parse(r[0]);return Array.isArray(o)?o.filter(t=>t&&typeof t.title=="string"&&typeof t.path=="string").map(t=>({title:t.title,path:t.path})):[]}catch{return[]}}async function Z(e,r,o){let{writeFileSync:t,mkdirSync:c,rmSync:l}=await import("fs"),{tmpdir:m}=await import("os"),g=R(m(),`agentx-wiki-query-${process.pid}`);c(g,{recursive:!0});let d=R(g,`prompt-${Date.now()}.txt`);t(d,e);try{let i=`cat '${d}' | claude -p - --output-format json --max-turns 1 --model ${r} --disallowedTools "Bash Read Write Edit Glob Grep Agent WebSearch WebFetch NotebookEdit"`,s=ct(i,{env:Q(),encoding:"utf-8",timeout:o,maxBuffer:4*1024*1024});try{let h=JSON.parse(s);return String(h.result||h.content||"")}catch{return s}}finally{try{l(d,{force:!0})}catch{}}}async function Ot(e){try{let{loadDaemonConfig:r}=await import("./config-DNCHX2M5.js");return r(e).wiki.query.shared}catch{return!0}}export{ht as a,dt as b,pt as c,_t as d,Rt as e,q as f,ft as g,W as h,O as i,Ot as j};
|
|
55
|
+
//# sourceMappingURL=chunk-ADX5IFBO.js.map
|