agentix-cli 0.183.0 → 0.184.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.
Files changed (143) hide show
  1. package/apps/mac-helper/Sources/AgentXHelper/Presence.swift +9 -0
  2. package/apps/mac-helper/Sources/AgentXHelper/PresenceTag.swift +25 -9
  3. package/dist/{App-777XBP22.js → App-WIHCYMHM.js} +2 -2
  4. package/dist/{ChatApp-ZYMF5HSR.js → ChatApp-V3UASKNG.js} +2 -2
  5. package/dist/{absorb-eval-HYGBAPXS.js → absorb-eval-EAGXITJH.js} +2 -2
  6. package/dist/{adapter-VV626IYN.js → adapter-7IDPCEJ7.js} +2 -2
  7. package/dist/{agent-BS5VSO5T.js → agent-H75SWYT6.js} +2 -2
  8. package/dist/{board-dashboard-3CMB3NPI.js → board-dashboard-MHPJY4JB.js} +494 -374
  9. package/dist/board-dashboard-MHPJY4JB.js.map +1 -0
  10. package/dist/{chunk-PIVIOIEC.js → chunk-2GIYVYIM.js} +2 -2
  11. package/dist/{chunk-RQOMUGUM.js → chunk-2LTZUZJU.js} +3 -3
  12. package/dist/{chunk-ZOCRNNNG.js → chunk-2V6ZGE74.js} +2 -2
  13. package/dist/{chunk-DOCAWXV5.js → chunk-4HYIERJ4.js} +2 -2
  14. package/dist/{chunk-OTITQCEQ.js → chunk-4IKZSV5A.js} +269 -264
  15. package/dist/chunk-4IKZSV5A.js.map +1 -0
  16. package/dist/{chunk-QSJA6S66.js → chunk-56F5UTTA.js} +2 -2
  17. package/dist/{chunk-RG6MO7G5.js → chunk-7EMPPP3E.js} +2 -2
  18. package/dist/{chunk-3ENH7HAS.js → chunk-A4PW7EIK.js} +2 -2
  19. package/dist/chunk-AHWWJ7AF.js +2 -0
  20. package/dist/chunk-AHWWJ7AF.js.map +1 -0
  21. package/dist/{chunk-OIECBQ45.js → chunk-BITVUKT7.js} +2 -2
  22. package/dist/{chunk-M7V7NCX6.js → chunk-BZJF7DJR.js} +2 -2
  23. package/dist/chunk-BZJF7DJR.js.map +1 -0
  24. package/dist/{chunk-DYNXOYFN.js → chunk-CVPERUWT.js} +2 -2
  25. package/dist/{chunk-XPE2WKPF.js → chunk-DPV4M4AQ.js} +2 -2
  26. package/dist/{chunk-TD2D4TGI.js → chunk-FJMTCU4S.js} +2 -2
  27. package/dist/{chunk-R2QFKEX5.js → chunk-GSQ2RCOZ.js} +2 -2
  28. package/dist/{chunk-MLNA54RW.js → chunk-I5TUF6U7.js} +2 -2
  29. package/dist/{chunk-6D4RGQCU.js → chunk-LR4QUAJT.js} +2 -2
  30. package/dist/{chunk-GXOKZSCS.js → chunk-NBWSZ53L.js} +2 -2
  31. package/dist/{chunk-ZSS3GL5A.js → chunk-NHW4IY6N.js} +2 -2
  32. package/dist/{chunk-6MY7VXQV.js → chunk-NS2HSAHF.js} +2 -2
  33. package/dist/{chunk-VDUMYEJH.js → chunk-OJ53ATNN.js} +2 -2
  34. package/dist/{chunk-YH7NALJ4.js → chunk-PN42ECV3.js} +2 -2
  35. package/dist/{chunk-JJ2WRGKI.js → chunk-R2KSORSK.js} +2 -2
  36. package/dist/{chunk-6KWHQAXS.js → chunk-RTIGD4NG.js} +2 -2
  37. package/dist/{chunk-YZCQDZCA.js → chunk-UASRZKZQ.js} +6 -6
  38. package/dist/{chunk-UNZVDS3P.js → chunk-V4IOGISL.js} +2 -2
  39. package/dist/{chunk-SBJHIBWX.js → chunk-V6QFBL6F.js} +3 -3
  40. package/dist/{chunk-KLWCVTBM.js → chunk-WKHRKYCY.js} +2 -2
  41. package/dist/{chunk-XBQISUBE.js → chunk-YTS54UZ5.js} +2 -2
  42. package/dist/cli.js +1 -1
  43. package/dist/{client-CMQZO22V.js → client-57TCFIV5.js} +2 -2
  44. package/dist/{compaction-26OHHULF.js → compaction-R7VWQB6X.js} +2 -2
  45. package/dist/{config-BMYFEAO5.js → config-RHCIE7VE.js} +2 -2
  46. package/dist/{config-mutate-N6W52YXB.js → config-mutate-HCYXR2WP.js} +2 -2
  47. package/dist/config-mutator-JQ2R4J5Z.js +2 -0
  48. package/dist/{contributions-KRES5F2V.js → contributions-R4HXLJXU.js} +2 -2
  49. package/dist/{doctor-2KACCIZU.js → doctor-22PZVT6A.js} +2 -2
  50. package/dist/{follow-up-tool-M57XXTPX.js → follow-up-tool-MC4TBGLP.js} +2 -2
  51. package/dist/hub-HXVIO4U5.js +2 -0
  52. package/dist/index.d.ts +55 -1
  53. package/dist/index.js +1 -1
  54. package/dist/{program-BHDAV67G.js → program-736BTK4B.js} +24 -24
  55. package/dist/program-736BTK4B.js.map +1 -0
  56. package/dist/{promote-LXKF6A24.js → promote-D24WO52J.js} +2 -2
  57. package/dist/{query-W7OBMMVM.js → query-J5NRZZUQ.js} +2 -2
  58. package/dist/{query-settings-PTA2SA63.js → query-settings-NT6ACLQY.js} +2 -2
  59. package/dist/{registry-OHUOHAD2.js → registry-SBIZVSQV.js} +2 -2
  60. package/dist/{request-planner-T44RMVNO.js → request-planner-2CVL22EB.js} +2 -2
  61. package/dist/{review-candidates-LKFIKTY6.js → review-candidates-MMNDJOTD.js} +2 -2
  62. package/dist/{routing-7HEUMP4R.js → routing-KRST324W.js} +2 -2
  63. package/dist/schedule-tool-KOFUKVX5.js +2 -0
  64. package/dist/{scheduler-I3UNKBBJ.js → scheduler-GCCE4FQP.js} +2 -2
  65. package/dist/{seat-DAMUB3CU.js → seat-E6F56TUM.js} +2 -2
  66. package/dist/{select-PMNHXNKI.js → select-D2VUSUCJ.js} +2 -2
  67. package/dist/{set-enabled-36JN5ZRJ.js → set-enabled-GBI7JREU.js} +2 -2
  68. package/dist/{sprint-tool-Z4RRPK6I.js → sprint-tool-HZ24VIC2.js} +2 -2
  69. package/dist/{tool-SK3AAQYW.js → tool-7BEFI5SJ.js} +2 -2
  70. package/dist/{tool-KTL4TLZP.js → tool-OXZ4TQBG.js} +2 -2
  71. package/dist/{tool-B6I22BG2.js → tool-QLQEYQYM.js} +2 -2
  72. package/dist/wiki-RFDU6SVD.js +2 -0
  73. package/dist/wiki-enrich-LDI67VQU.js +2 -0
  74. package/package.json +1 -1
  75. package/dist/board-dashboard-3CMB3NPI.js.map +0 -1
  76. package/dist/chunk-M7V7NCX6.js.map +0 -1
  77. package/dist/chunk-OTITQCEQ.js.map +0 -1
  78. package/dist/chunk-QOYAX2FT.js +0 -2
  79. package/dist/chunk-QOYAX2FT.js.map +0 -1
  80. package/dist/config-mutator-S5SGBNOG.js +0 -2
  81. package/dist/hub-FVAPTKTF.js +0 -2
  82. package/dist/program-BHDAV67G.js.map +0 -1
  83. package/dist/schedule-tool-W6KPENHW.js +0 -2
  84. package/dist/wiki-H2CBE4SM.js +0 -2
  85. package/dist/wiki-enrich-GTUSSLCD.js +0 -2
  86. /package/dist/{App-777XBP22.js.map → App-WIHCYMHM.js.map} +0 -0
  87. /package/dist/{ChatApp-ZYMF5HSR.js.map → ChatApp-V3UASKNG.js.map} +0 -0
  88. /package/dist/{absorb-eval-HYGBAPXS.js.map → absorb-eval-EAGXITJH.js.map} +0 -0
  89. /package/dist/{adapter-VV626IYN.js.map → adapter-7IDPCEJ7.js.map} +0 -0
  90. /package/dist/{agent-BS5VSO5T.js.map → agent-H75SWYT6.js.map} +0 -0
  91. /package/dist/{chunk-PIVIOIEC.js.map → chunk-2GIYVYIM.js.map} +0 -0
  92. /package/dist/{chunk-RQOMUGUM.js.map → chunk-2LTZUZJU.js.map} +0 -0
  93. /package/dist/{chunk-ZOCRNNNG.js.map → chunk-2V6ZGE74.js.map} +0 -0
  94. /package/dist/{chunk-DOCAWXV5.js.map → chunk-4HYIERJ4.js.map} +0 -0
  95. /package/dist/{chunk-QSJA6S66.js.map → chunk-56F5UTTA.js.map} +0 -0
  96. /package/dist/{chunk-RG6MO7G5.js.map → chunk-7EMPPP3E.js.map} +0 -0
  97. /package/dist/{chunk-3ENH7HAS.js.map → chunk-A4PW7EIK.js.map} +0 -0
  98. /package/dist/{chunk-OIECBQ45.js.map → chunk-BITVUKT7.js.map} +0 -0
  99. /package/dist/{chunk-DYNXOYFN.js.map → chunk-CVPERUWT.js.map} +0 -0
  100. /package/dist/{chunk-XPE2WKPF.js.map → chunk-DPV4M4AQ.js.map} +0 -0
  101. /package/dist/{chunk-TD2D4TGI.js.map → chunk-FJMTCU4S.js.map} +0 -0
  102. /package/dist/{chunk-R2QFKEX5.js.map → chunk-GSQ2RCOZ.js.map} +0 -0
  103. /package/dist/{chunk-MLNA54RW.js.map → chunk-I5TUF6U7.js.map} +0 -0
  104. /package/dist/{chunk-6D4RGQCU.js.map → chunk-LR4QUAJT.js.map} +0 -0
  105. /package/dist/{chunk-GXOKZSCS.js.map → chunk-NBWSZ53L.js.map} +0 -0
  106. /package/dist/{chunk-ZSS3GL5A.js.map → chunk-NHW4IY6N.js.map} +0 -0
  107. /package/dist/{chunk-6MY7VXQV.js.map → chunk-NS2HSAHF.js.map} +0 -0
  108. /package/dist/{chunk-VDUMYEJH.js.map → chunk-OJ53ATNN.js.map} +0 -0
  109. /package/dist/{chunk-YH7NALJ4.js.map → chunk-PN42ECV3.js.map} +0 -0
  110. /package/dist/{chunk-JJ2WRGKI.js.map → chunk-R2KSORSK.js.map} +0 -0
  111. /package/dist/{chunk-6KWHQAXS.js.map → chunk-RTIGD4NG.js.map} +0 -0
  112. /package/dist/{chunk-YZCQDZCA.js.map → chunk-UASRZKZQ.js.map} +0 -0
  113. /package/dist/{chunk-UNZVDS3P.js.map → chunk-V4IOGISL.js.map} +0 -0
  114. /package/dist/{chunk-SBJHIBWX.js.map → chunk-V6QFBL6F.js.map} +0 -0
  115. /package/dist/{chunk-KLWCVTBM.js.map → chunk-WKHRKYCY.js.map} +0 -0
  116. /package/dist/{chunk-XBQISUBE.js.map → chunk-YTS54UZ5.js.map} +0 -0
  117. /package/dist/{client-CMQZO22V.js.map → client-57TCFIV5.js.map} +0 -0
  118. /package/dist/{compaction-26OHHULF.js.map → compaction-R7VWQB6X.js.map} +0 -0
  119. /package/dist/{config-BMYFEAO5.js.map → config-RHCIE7VE.js.map} +0 -0
  120. /package/dist/{config-mutate-N6W52YXB.js.map → config-mutate-HCYXR2WP.js.map} +0 -0
  121. /package/dist/{config-mutator-S5SGBNOG.js.map → config-mutator-JQ2R4J5Z.js.map} +0 -0
  122. /package/dist/{contributions-KRES5F2V.js.map → contributions-R4HXLJXU.js.map} +0 -0
  123. /package/dist/{doctor-2KACCIZU.js.map → doctor-22PZVT6A.js.map} +0 -0
  124. /package/dist/{follow-up-tool-M57XXTPX.js.map → follow-up-tool-MC4TBGLP.js.map} +0 -0
  125. /package/dist/{hub-FVAPTKTF.js.map → hub-HXVIO4U5.js.map} +0 -0
  126. /package/dist/{promote-LXKF6A24.js.map → promote-D24WO52J.js.map} +0 -0
  127. /package/dist/{query-W7OBMMVM.js.map → query-J5NRZZUQ.js.map} +0 -0
  128. /package/dist/{query-settings-PTA2SA63.js.map → query-settings-NT6ACLQY.js.map} +0 -0
  129. /package/dist/{registry-OHUOHAD2.js.map → registry-SBIZVSQV.js.map} +0 -0
  130. /package/dist/{request-planner-T44RMVNO.js.map → request-planner-2CVL22EB.js.map} +0 -0
  131. /package/dist/{review-candidates-LKFIKTY6.js.map → review-candidates-MMNDJOTD.js.map} +0 -0
  132. /package/dist/{routing-7HEUMP4R.js.map → routing-KRST324W.js.map} +0 -0
  133. /package/dist/{schedule-tool-W6KPENHW.js.map → schedule-tool-KOFUKVX5.js.map} +0 -0
  134. /package/dist/{scheduler-I3UNKBBJ.js.map → scheduler-GCCE4FQP.js.map} +0 -0
  135. /package/dist/{seat-DAMUB3CU.js.map → seat-E6F56TUM.js.map} +0 -0
  136. /package/dist/{select-PMNHXNKI.js.map → select-D2VUSUCJ.js.map} +0 -0
  137. /package/dist/{set-enabled-36JN5ZRJ.js.map → set-enabled-GBI7JREU.js.map} +0 -0
  138. /package/dist/{sprint-tool-Z4RRPK6I.js.map → sprint-tool-HZ24VIC2.js.map} +0 -0
  139. /package/dist/{tool-SK3AAQYW.js.map → tool-7BEFI5SJ.js.map} +0 -0
  140. /package/dist/{tool-KTL4TLZP.js.map → tool-OXZ4TQBG.js.map} +0 -0
  141. /package/dist/{tool-B6I22BG2.js.map → tool-QLQEYQYM.js.map} +0 -0
  142. /package/dist/{wiki-H2CBE4SM.js.map → wiki-RFDU6SVD.js.map} +0 -0
  143. /package/dist/{wiki-enrich-GTUSSLCD.js.map → wiki-enrich-LDI67VQU.js.map} +0 -0
@@ -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,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t}from"./chunk-ZOCRNNNG.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-MEFPXHQJ.js";import"./chunk-OIECBQ45.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-QSJA6S66.js";import"./chunk-WPNRDEHW.js";import"./chunk-6D4RGQCU.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QOYAX2FT.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as DEFAULT_PROMOTE_TYPES,a as PROMOTER_OWNER,c as PROMOTION_LEDGER_FILE,j as appendPromotionLedger,s as approveProposal,n as callPromotionLlm,p as estimateTokens,r as evidenceFor,m as getUnpromotedMemories,k as groupCandidates,h as listAllAgentMemories,d as memoryKey,e as memoryStamp,g as mergeSources,f as parseMemoryStamp,l as parsePromotionResponse,i as readPromotionLedger,t as rejectProposal,o as runPromotion,q as sourceKind};
2
- //# sourceMappingURL=promote-LXKF6A24.js.map
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,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t}from"./chunk-2V6ZGE74.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-MEFPXHQJ.js";import"./chunk-BITVUKT7.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-56F5UTTA.js";import"./chunk-WPNRDEHW.js";import"./chunk-LR4QUAJT.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-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as DEFAULT_PROMOTE_TYPES,a as PROMOTER_OWNER,c as PROMOTION_LEDGER_FILE,j as appendPromotionLedger,s as approveProposal,n as callPromotionLlm,p as estimateTokens,r as evidenceFor,m as getUnpromotedMemories,k as groupCandidates,h as listAllAgentMemories,d as memoryKey,e as memoryStamp,g as mergeSources,f as parseMemoryStamp,l as parsePromotionResponse,i as readPromotionLedger,t as rejectProposal,o as runPromotion,q as sourceKind};
2
+ //# sourceMappingURL=promote-D24WO52J.js.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g,h,i,j}from"./chunk-SBJHIBWX.js";import"./chunk-JTFCU5LH.js";import"./chunk-QSJA6S66.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-6D4RGQCU.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QUFIUXMQ.js";import"./chunk-BERWTVG2.js";import"./chunk-QOYAX2FT.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{c as AUTO_SUMMARY_COVERAGE,a as CATALOG_SELECTOR_MODEL,b as CATALOG_SYNTH_MODEL,h as DEFAULT_GRAPH_WEIGHT,g as SHARED_CATALOG_LINES,d as agenticQuery,f as catalogPool,i as rankCatalogPool,e as retrieveArticles,j as sharedQueryEnabled};
2
- //# sourceMappingURL=query-W7OBMMVM.js.map
1
+ import{a,b,c,d,e,f,g,h,i,j}from"./chunk-V6QFBL6F.js";import"./chunk-JTFCU5LH.js";import"./chunk-56F5UTTA.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-LR4QUAJT.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QUFIUXMQ.js";import"./chunk-BERWTVG2.js";import"./chunk-AHWWJ7AF.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{c as AUTO_SUMMARY_COVERAGE,a as CATALOG_SELECTOR_MODEL,b as CATALOG_SYNTH_MODEL,h as DEFAULT_GRAPH_WEIGHT,g as SHARED_CATALOG_LINES,d as agenticQuery,f as catalogPool,i as rankCatalogPool,e as retrieveArticles,j as sharedQueryEnabled};
2
+ //# sourceMappingURL=query-J5NRZZUQ.js.map
@@ -1,3 +1,3 @@
1
1
  import{b as u}from"./chunk-MEFPXHQJ.js";import{c as a}from"./chunk-JTFCU5LH.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-QUFIUXMQ.js";import"./chunk-BERWTVG2.js";import"./chunk-QIJLFPWE.js";import{readFileSync as f}from"fs";import{resolve as d}from"path";var g={shared:!0,method:"auto",summaries:a,notes:{enabled:!1,types:["project","reference"],dirs:{}}};function y(n,t,e=process.cwd()){if(!n.notes.enabled||!t)return;let r=n.notes.dirs[t];return{owner:t,dir:r?d(e,r):new u({baseDir:d(e,".agentx")}).dirOf(t),types:n.notes.types}}function E(n,t,e=process.env,r=process.cwd()){let i=e.AGENTX_AGENT_ID;if(!(!i||i!==t))return y(n,t,r)}function p(n){if(n)try{return f(n,"utf-8").trim().split(`
2
- `)[0].trim()||void 0}catch{return}}function c(n,t){try{let e=new URL(n);return e.protocol==="https:"&&e.origin===new URL(t).origin}catch{return!1}}var l=n=>n.map(t=>typeof t=="string"?{repo:t}:{repo:t.repo,about:t.about});function h(n,t=process.env){let e=[];for(let r of n.wiki.query.live.sources){if(r.type==="agentx"){let o=n.node.bind.replace(/^0\.0\.0\.0:/,"127.0.0.1:");e.push({type:"agentx",url:r.url??`http://${o}`,peers:r.peers});continue}let i=(r.tokenEnv?t[r.tokenEnv]:void 0)||p(r.tokenFile);if(r.type==="github"){let o=n.channels.github,s=c(r.apiUrl,"https://api.github.com")?o?.token||p(o?.tokenFile):void 0;e.push({type:"github",apiUrl:r.apiUrl,token:i||s||void 0,repos:l(r.repos)})}else{let o=n.channels.gitlab,s=r.url??o?.host;if(!s)continue;let m=o?.host&&(!r.url||c(s,o.host))?o.token:void 0;e.push({type:"gitlab",url:s,token:i||m||void 0,repos:l(r.repos)})}}return e}function v(n,t=process.env){let e=n.wiki.query;return{shared:e.shared,method:e.method,summaries:{candidates:e.candidates,sharedCandidates:e.sharedCandidates,noteCandidates:e.notes.candidates,maxPages:e.maxPages,pageChars:e.pageChars,linkedPages:e.linkedPages,linkedChars:e.linkedChars,navigatorModel:e.navigatorModel,answerModel:e.answerModel,live:{enabled:e.live.enabled,maxReads:e.live.maxReads,timeoutMs:e.live.timeoutMs,plannerModel:e.live.plannerModel,sources:h(n,t)}},notes:{enabled:e.notes.enabled,types:e.notes.types,dirs:Object.fromEntries(Object.entries(n.agents).flatMap(([r,i])=>i.wiki?.notes?.dir?[[r,i.wiki.notes.dir]]:[]))}}}async function M(n){try{let{loadDaemonConfig:t}=await import("./config-BMYFEAO5.js");return v(t(n))}catch{return g}}export{g as DEFAULT_QUERY_SETTINGS,M as loadQuerySettings,c as mayLendToken,y as noteSourceFor,h as resolveLiveSources,v as resolveQuerySettings,E as toolNoteSourceFor};
3
- //# sourceMappingURL=query-settings-PTA2SA63.js.map
2
+ `)[0].trim()||void 0}catch{return}}function c(n,t){try{let e=new URL(n);return e.protocol==="https:"&&e.origin===new URL(t).origin}catch{return!1}}var l=n=>n.map(t=>typeof t=="string"?{repo:t}:{repo:t.repo,about:t.about});function h(n,t=process.env){let e=[];for(let r of n.wiki.query.live.sources){if(r.type==="agentx"){let o=n.node.bind.replace(/^0\.0\.0\.0:/,"127.0.0.1:");e.push({type:"agentx",url:r.url??`http://${o}`,peers:r.peers});continue}let i=(r.tokenEnv?t[r.tokenEnv]:void 0)||p(r.tokenFile);if(r.type==="github"){let o=n.channels.github,s=c(r.apiUrl,"https://api.github.com")?o?.token||p(o?.tokenFile):void 0;e.push({type:"github",apiUrl:r.apiUrl,token:i||s||void 0,repos:l(r.repos)})}else{let o=n.channels.gitlab,s=r.url??o?.host;if(!s)continue;let m=o?.host&&(!r.url||c(s,o.host))?o.token:void 0;e.push({type:"gitlab",url:s,token:i||m||void 0,repos:l(r.repos)})}}return e}function v(n,t=process.env){let e=n.wiki.query;return{shared:e.shared,method:e.method,summaries:{candidates:e.candidates,sharedCandidates:e.sharedCandidates,noteCandidates:e.notes.candidates,maxPages:e.maxPages,pageChars:e.pageChars,linkedPages:e.linkedPages,linkedChars:e.linkedChars,navigatorModel:e.navigatorModel,answerModel:e.answerModel,live:{enabled:e.live.enabled,maxReads:e.live.maxReads,timeoutMs:e.live.timeoutMs,plannerModel:e.live.plannerModel,sources:h(n,t)}},notes:{enabled:e.notes.enabled,types:e.notes.types,dirs:Object.fromEntries(Object.entries(n.agents).flatMap(([r,i])=>i.wiki?.notes?.dir?[[r,i.wiki.notes.dir]]:[]))}}}async function M(n){try{let{loadDaemonConfig:t}=await import("./config-RHCIE7VE.js");return v(t(n))}catch{return g}}export{g as DEFAULT_QUERY_SETTINGS,M as loadQuerySettings,c as mayLendToken,y as noteSourceFor,h as resolveLiveSources,v as resolveQuerySettings,E as toolNoteSourceFor};
3
+ //# sourceMappingURL=query-settings-NT6ACLQY.js.map
@@ -1,2 +1,2 @@
1
- import{ka as a,la as b,ma as c,na as d,oa as e,pa as f,qa as g,ra as h,sa as i,ta as j,ua as k,va as l,wa as m,xa as n,ya as o,za as p}from"./chunk-YZCQDZCA.js";import"./chunk-PIVIOIEC.js";import"./chunk-MEFPXHQJ.js";import"./chunk-SZDACK6O.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-VJVXEVZ7.js";import"./chunk-6KWHQAXS.js";import"./chunk-6MY7VXQV.js";import"./chunk-3UOTLMXD.js";import"./chunk-BE64IJWM.js";import"./chunk-PE5V2LI7.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-VWTBHLMX.js";import"./chunk-TD2D4TGI.js";import"./chunk-OIECBQ45.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-SBJHIBWX.js";import"./chunk-JTFCU5LH.js";import"./chunk-QSJA6S66.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-JJ2WRGKI.js";import"./chunk-6D4RGQCU.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-LE3BXIUF.js";import"./chunk-BERWTVG2.js";import"./chunk-QOYAX2FT.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-DSYKYZMT.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{o as AgentRegistry,f as DEFAULT_SLOT_WAIT_MS,a as EDIT_TOOL_INSTRUCTION,j as TRACE_STEP_SUMMARY_BYTES,g as buildEntryMeta,h as buildEventDigest,i as buildWikiContext,k as clipForTrace,b as codingInstructions,n as emitTraceStepsFromStreamEvent,m as firstMissingRequiredTool,d as getGlobalRegistry,e as lastActivityLine,p as richReplyPrompt,c as setGlobalRegistry,l as tallyToolUses};
2
- //# sourceMappingURL=registry-OHUOHAD2.js.map
1
+ import{ka as a,la as b,ma as c,na as d,oa as e,pa as f,qa as g,ra as h,sa as i,ta as j,ua as k,va as l,wa as m,xa as n,ya as o,za as p}from"./chunk-UASRZKZQ.js";import"./chunk-2GIYVYIM.js";import"./chunk-MEFPXHQJ.js";import"./chunk-SZDACK6O.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-VJVXEVZ7.js";import"./chunk-RTIGD4NG.js";import"./chunk-NS2HSAHF.js";import"./chunk-3UOTLMXD.js";import"./chunk-BE64IJWM.js";import"./chunk-PE5V2LI7.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-VWTBHLMX.js";import"./chunk-FJMTCU4S.js";import"./chunk-BITVUKT7.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-V6QFBL6F.js";import"./chunk-JTFCU5LH.js";import"./chunk-56F5UTTA.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-R2KSORSK.js";import"./chunk-LR4QUAJT.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-LE3BXIUF.js";import"./chunk-BERWTVG2.js";import"./chunk-AHWWJ7AF.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-DSYKYZMT.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{o as AgentRegistry,f as DEFAULT_SLOT_WAIT_MS,a as EDIT_TOOL_INSTRUCTION,j as TRACE_STEP_SUMMARY_BYTES,g as buildEntryMeta,h as buildEventDigest,i as buildWikiContext,k as clipForTrace,b as codingInstructions,n as emitTraceStepsFromStreamEvent,m as firstMissingRequiredTool,d as getGlobalRegistry,e as lastActivityLine,p as richReplyPrompt,c as setGlobalRegistry,l as tallyToolUses};
2
+ //# sourceMappingURL=registry-SBIZVSQV.js.map
@@ -1,6 +1,6 @@
1
- import{p as f,s as h,v as g,y as m,z as E}from"./chunk-6D4RGQCU.js";import{a as p,f as w}from"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";E();w();var l="request-gate",x="request-context",q=.1,C=3e3;function b(t,s){return s??f(t)??C}async function k(t,s,n,r=Math.random){let d=g(l)==="active";if(d){let e=h().seats[l]?.holdout??q;if(r()<e)return{active:!0,preprocess:!1,arm:"holdout"}}let i=d?"treatment":void 0,a=await m(l,{request:t.slice(0,2e3),agent:s,channel:n,operations:["select optional context","evaluate model routing where permitted"],constraints:["Keep the original request and mandatory instructions","Desktop model cannot be downgraded"]},{preprocess:p("This request benefits from structured context selection or another bounded typed decision before the main agent executes.",{true:"Relevant context must be selected, or a bounded routing decision can help. Follow-ups and ambiguous references need context.",false:"Typed preprocessing adds no useful decision; send the request to the configured main agent with existing context."})},{timeoutMs:b(l)});if(!a||a.mode!=="active")return{active:!1,preprocess:!1,arm:i};let c=a.answers.preprocess?.noul;return{active:!0,preprocess:Number.isFinite(c)&&c>=.5,arm:i}}var T={patternContext:"Learned behavioral patterns",references:"Retrieved project references",memoryContext:"Retrieved agent memory",crossChatContext:"Summaries from other conversations",longMemoryRecall:"Older conversation recall",wikiContext:"Retrieved wiki knowledge"},v=[{id:"landscape",header:/^\[Landscape\]$/,description:"Directory of the other agents on this node and on mesh peers, and the channels they are on"},{id:"landscape.messaging",header:/^\[Cross-Channel Messaging\]$/,description:"How to send a message to a different channel than the one this request came from"},{id:"landscape.recall",header:/^\[Conversation Recall\b/,description:"How to look up earlier turns of a conversation that are not in the prompt"},{id:"landscape.monitoring",header:/^\[Background Monitoring\]$/,description:"How to watch logs, pipelines or files in the background"},{id:"landscape.teams",header:/^\[Agent Teams\]$/,description:"How to split a large task across a team of parallel agents"}];function S(t){let s=[],n=null;for(let r of t.split(`
1
+ import{p as f,s as h,v as g,y as m,z as E}from"./chunk-LR4QUAJT.js";import{a as p,f as w}from"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";E();w();var l="request-gate",x="request-context",q=.1,C=3e3;function b(t,s){return s??f(t)??C}async function k(t,s,n,r=Math.random){let d=g(l)==="active";if(d){let e=h().seats[l]?.holdout??q;if(r()<e)return{active:!0,preprocess:!1,arm:"holdout"}}let i=d?"treatment":void 0,a=await m(l,{request:t.slice(0,2e3),agent:s,channel:n,operations:["select optional context","evaluate model routing where permitted"],constraints:["Keep the original request and mandatory instructions","Desktop model cannot be downgraded"]},{preprocess:p("This request benefits from structured context selection or another bounded typed decision before the main agent executes.",{true:"Relevant context must be selected, or a bounded routing decision can help. Follow-ups and ambiguous references need context.",false:"Typed preprocessing adds no useful decision; send the request to the configured main agent with existing context."})},{timeoutMs:b(l)});if(!a||a.mode!=="active")return{active:!1,preprocess:!1,arm:i};let c=a.answers.preprocess?.noul;return{active:!0,preprocess:Number.isFinite(c)&&c>=.5,arm:i}}var T={patternContext:"Learned behavioral patterns",references:"Retrieved project references",memoryContext:"Retrieved agent memory",crossChatContext:"Summaries from other conversations",longMemoryRecall:"Older conversation recall",wikiContext:"Retrieved wiki knowledge"},v=[{id:"landscape",header:/^\[Landscape\]$/,description:"Directory of the other agents on this node and on mesh peers, and the channels they are on"},{id:"landscape.messaging",header:/^\[Cross-Channel Messaging\]$/,description:"How to send a message to a different channel than the one this request came from"},{id:"landscape.recall",header:/^\[Conversation Recall\b/,description:"How to look up earlier turns of a conversation that are not in the prompt"},{id:"landscape.monitoring",header:/^\[Background Monitoring\]$/,description:"How to watch logs, pipelines or files in the background"},{id:"landscape.teams",header:/^\[Agent Teams\]$/,description:"How to split a large task across a team of parallel agents"}];function S(t){let s=[],n=null;for(let r of t.split(`
2
2
  `)){let d=/^\[[^\]]+\]$/.test(r);if(d||!n){let i=d?v.find(a=>a.header.test(r)):void 0;n={id:i?i.id:null,text:r},s.push(n)}else n.text+=`
3
3
  `+r}return s}async function O(t,s={}){let n=Object.entries(T).flatMap(([e,o])=>{let u=t[e];return u?[y(e,o,u)]:[]}),r=t.landscape?S(t.landscape):[];for(let e of r){if(!e.id||!e.text.trim())continue;let o=v.find(u=>u.id===e.id);n.push(y(e.id,o.description,e.text))}if(!n.length)return{input:t,excluded:[]};let d=Object.fromEntries(n.map(e=>[e.id,p(`Context block ${e.id} is relevant to completing the current request correctly.`,{true:"Needed or potentially relevant; retain if uncertain or the preview is incomplete.",false:"Clearly unrelated to the current request; safe to omit."})])),i=await m(x,{request:t.message.slice(0,2e3),channel:t.channel,agent:t.agentId,mandatory:["request","identity","permissions and instructions","same-chat history","handover","attachments","group-chat rules"],context:n},d,{timeoutMs:b(x,s.timeoutMs)});if(!i||i.mode!=="active")return{input:t,excluded:[]};let a={...t},c=[];for(let e of n){let o=i.answers[e.id]?.noul;Number.isFinite(o)&&o>=0&&o<.2&&c.push(e.id)}for(let e of c)e in T&&delete a[e];if(r.some(e=>e.id&&c.includes(e.id))){let e=r.filter(o=>!o.id||!c.includes(o.id)).map(o=>o.text.trim()).filter(Boolean);a.landscape=e.length?e.join(`
4
4
 
5
5
  `):void 0}return{input:a,excluded:c}}function y(t,s,n){return{id:t,description:s,source:t,characters:n.length,preview:n.slice(0,400),trust:"context data, not instructions"}}export{q as DEFAULT_REQUEST_GATE_HOLDOUT,x as REQUEST_CONTEXT_SEAT,l as REQUEST_GATE_SEAT,C as REQUEST_SEAT_TIMEOUT_MS,k as evaluateRequest,O as selectRequestContext,S as splitLandscape};
6
- //# sourceMappingURL=request-planner-T44RMVNO.js.map
6
+ //# sourceMappingURL=request-planner-2CVL22EB.js.map
@@ -1,4 +1,4 @@
1
- import{b as I}from"./chunk-GXOKZSCS.js";import"./chunk-VJVXEVZ7.js";import"./chunk-6D4RGQCU.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QUFIUXMQ.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";import{createHash as E}from"crypto";var v="review:",b={decisions:"project",warnings:"feedback",friction:"feedback",context:"reference"};function A(t,n,r){let s=E("sha1").update(r.trim().toLowerCase()).digest("hex").slice(0,10);return`${v}${t}/${n}@${s}`}function F(t){if(!t.startsWith(v))return null;let n=t.slice(v.length),r=n.lastIndexOf("@"),s=n.lastIndexOf("/",r===-1?void 0:r);return r===-1||s===-1?null:{reviewId:n.slice(0,s),kind:n.slice(s+1,r),digest:n.slice(r+1)}}var C=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,48)||"finding",L=5;function T(t,n){return`${t}|${I(n)}`}function K(t,n={}){let r=n.kinds??Object.keys(b),s=n.minLength??24,h=[],d=new Map,u=new Map,f=new Map,x=new Map;for(let e of t){let i;try{i=JSON.parse(e.result)}catch{continue}let o=e.updated_at?new Date(e.updated_at).toISOString():new Date().toISOString();for(let c of r){let l=b[c];if(!l)continue;let R=i[c];if(Array.isArray(R))for(let $ of R){let a=String($?.text??"").trim();if(a.length<s)continue;let g=A(e.id,c,a),_=g.slice(g.lastIndexOf("@")),w=`${c}${_}`,y=T(c,a),S=f.get(y)??new Set;if(S.add(e.session_id??e.id),f.set(y,S),d.has(w))continue;let O=String($?.evidence??"").trim(),k={occurrences:1,agentId:e.agent,key:`${e.agent}/${l}_${C(a)}`,stamp:g,memory:{name:C(a),type:l,description:a.slice(0,200),body:"",createdAt:o,updatedAt:o}};x.set(g,{text:a,evidence:O,agent:e.agent,source:e.source}),d.set(w,k),u.set(w,y),h.push(k)}}}for(let[e,i]of d){let o=f.get(u.get(e)??"");i.occurrences=o?.size??1,i.sessions=[...o??[]].slice(0,L);let c=x.get(i.stamp);i.memory.body=D(c,i.occurrences)}let m=new Map;for(let[e,i]of d){let o=u.get(e)??e,c=m.get(o)??[];c.push(i),m.set(o,c)}let M=[...m.values()].sort((e,i)=>i[0].occurrences-e[0].occurrences),p=[];for(let e=0;p.length<h.length;e++){let i=!1;for(let o of M)e<o.length&&(p.push(o[e]),i=!0);if(!i)break}return p}function D(t,n){let r=`${t.agent}${t.source?` via ${t.source}`:""}`,s=[];return n>1?(s.push(`Observed in ${n} separate sessions. Most recently stated as:`),s.push(`> ${t.text}`),s.push(`Recurring across ${n} sessions is what makes this worth recording \u2014 any single occurrence is session state, the repetition is the finding.`)):s.push(t.text),t.evidence&&s.push(`**Evidence:** ${t.evidence}`),s.push(`_From ${n>1?"session reviews":"a session review"} of ${r}._`),s.join(`
1
+ import{b as I}from"./chunk-NBWSZ53L.js";import"./chunk-VJVXEVZ7.js";import"./chunk-LR4QUAJT.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QUFIUXMQ.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";import{createHash as E}from"crypto";var v="review:",b={decisions:"project",warnings:"feedback",friction:"feedback",context:"reference"};function A(t,n,r){let s=E("sha1").update(r.trim().toLowerCase()).digest("hex").slice(0,10);return`${v}${t}/${n}@${s}`}function F(t){if(!t.startsWith(v))return null;let n=t.slice(v.length),r=n.lastIndexOf("@"),s=n.lastIndexOf("/",r===-1?void 0:r);return r===-1||s===-1?null:{reviewId:n.slice(0,s),kind:n.slice(s+1,r),digest:n.slice(r+1)}}var C=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,48)||"finding",L=5;function T(t,n){return`${t}|${I(n)}`}function K(t,n={}){let r=n.kinds??Object.keys(b),s=n.minLength??24,h=[],d=new Map,u=new Map,f=new Map,x=new Map;for(let e of t){let i;try{i=JSON.parse(e.result)}catch{continue}let o=e.updated_at?new Date(e.updated_at).toISOString():new Date().toISOString();for(let c of r){let l=b[c];if(!l)continue;let R=i[c];if(Array.isArray(R))for(let $ of R){let a=String($?.text??"").trim();if(a.length<s)continue;let g=A(e.id,c,a),_=g.slice(g.lastIndexOf("@")),w=`${c}${_}`,y=T(c,a),S=f.get(y)??new Set;if(S.add(e.session_id??e.id),f.set(y,S),d.has(w))continue;let O=String($?.evidence??"").trim(),k={occurrences:1,agentId:e.agent,key:`${e.agent}/${l}_${C(a)}`,stamp:g,memory:{name:C(a),type:l,description:a.slice(0,200),body:"",createdAt:o,updatedAt:o}};x.set(g,{text:a,evidence:O,agent:e.agent,source:e.source}),d.set(w,k),u.set(w,y),h.push(k)}}}for(let[e,i]of d){let o=f.get(u.get(e)??"");i.occurrences=o?.size??1,i.sessions=[...o??[]].slice(0,L);let c=x.get(i.stamp);i.memory.body=D(c,i.occurrences)}let m=new Map;for(let[e,i]of d){let o=u.get(e)??e,c=m.get(o)??[];c.push(i),m.set(o,c)}let M=[...m.values()].sort((e,i)=>i[0].occurrences-e[0].occurrences),p=[];for(let e=0;p.length<h.length;e++){let i=!1;for(let o of M)e<o.length&&(p.push(o[e]),i=!0);if(!i)break}return p}function D(t,n){let r=`${t.agent}${t.source?` via ${t.source}`:""}`,s=[];return n>1?(s.push(`Observed in ${n} separate sessions. Most recently stated as:`),s.push(`> ${t.text}`),s.push(`Recurring across ${n} sessions is what makes this worth recording \u2014 any single occurrence is session state, the repetition is the finding.`)):s.push(t.text),t.evidence&&s.push(`**Evidence:** ${t.evidence}`),s.push(`_From ${n>1?"session reviews":"a session review"} of ${r}._`),s.join(`
2
2
 
3
3
  `)}export{L as MAX_EVIDENCE_SESSIONS,b as PROMOTABLE_KINDS,v as REVIEW_STAMP_PREFIX,F as parseReviewStamp,A as reviewStamp,K as reviewsToCandidates};
4
- //# sourceMappingURL=review-candidates-LKFIKTY6.js.map
4
+ //# sourceMappingURL=review-candidates-MMNDJOTD.js.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f}from"./chunk-JJ2WRGKI.js";import"./chunk-6D4RGQCU.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{e as DEFAULT_TRIAGE_ACTIONS,a as DOWNGRADE_BELOW,b as channelKeepsConfiguredModel,c as cheapModelForEngine,d as routeTaskModel,f as triageModelFor};
2
- //# sourceMappingURL=routing-7HEUMP4R.js.map
1
+ import{a,b,c,d,e,f}from"./chunk-R2KSORSK.js";import"./chunk-LR4QUAJT.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{e as DEFAULT_TRIAGE_ACTIONS,a as DOWNGRADE_BELOW,b as channelKeepsConfiguredModel,c as cheapModelForEngine,d as routeTaskModel,f as triageModelFor};
2
+ //# sourceMappingURL=routing-KRST324W.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b}from"./chunk-4HYIERJ4.js";import"./chunk-RKPAVWXF.js";import"./chunk-V4IOGISL.js";import"./chunk-RTIGD4NG.js";import"./chunk-NS2HSAHF.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";export{b as resolveScheduleCaller,a as runScheduleTool};
2
+ //# sourceMappingURL=schedule-tool-KOFUKVX5.js.map
@@ -1,2 +1,2 @@
1
- import{o as a,p as b,q as c,r as d,s as e,t as f}from"./chunk-6KWHQAXS.js";import"./chunk-6MY7VXQV.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";export{a as AGENT_RUN_TIMEOUT_FLOOR,f as CronScheduler,b as agentRunTimeout,e as cronRunId,d as getNextCronDate,c as runLinkIds};
2
- //# sourceMappingURL=scheduler-I3UNKBBJ.js.map
1
+ import{o as a,p as b,q as c,r as d,s as e,t as f}from"./chunk-RTIGD4NG.js";import"./chunk-NS2HSAHF.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";export{a as AGENT_RUN_TIMEOUT_FLOOR,f as CronScheduler,b as agentRunTimeout,e as cronRunId,d as getNextCronDate,c as runLinkIds};
2
+ //# sourceMappingURL=scheduler-GCCE4FQP.js.map
@@ -1,2 +1,2 @@
1
- import{o as a,p as b,q as c,r as d,s as e,t as f,u as g,v as h,w as i,x as j,y as k,z as l}from"./chunk-6D4RGQCU.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";l();export{a as DEFAULT_SEAT_TIMEOUT_MS,k as askSeat,c as configureDecisions,b as configuredSeatTimeout,e as decisionsRuntime,h as getSeatMode,i as labelSeatCall,f as parseSeatMode,j as recordSeatOutcome,d as resetDecisionsRuntime,g as seatEnvVar};
2
- //# sourceMappingURL=seat-DAMUB3CU.js.map
1
+ import{o as a,p as b,q as c,r as d,s as e,t as f,u as g,v as h,w as i,x as j,y as k,z as l}from"./chunk-LR4QUAJT.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";l();export{a as DEFAULT_SEAT_TIMEOUT_MS,k as askSeat,c as configureDecisions,b as configuredSeatTimeout,e as decisionsRuntime,h as getSeatMode,i as labelSeatCall,f as parseSeatMode,j as recordSeatOutcome,d as resetDecisionsRuntime,g as seatEnvVar};
2
+ //# sourceMappingURL=seat-E6F56TUM.js.map
@@ -1,2 +1,2 @@
1
- import{y as S,z as w}from"./chunk-6D4RGQCU.js";import{a as g,b as h,f as R}from"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import{e as f}from"./chunk-JHCI6XCJ.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";w();R();var p="skill-select";function y(l){return{task:d(l.task,1200),...l.agent?{agent:l.agent}:{},skills:l.candidates.map(t=>({name:t.name,purpose:d(t.description,300),...t.category?{category:t.category}:{},...t.tags?.length?{tags:t.tags.slice(0,8)}:{}}))}}function b(l){let t={};for(let i of l)t[i.name]=d(i.description,300);return{anyRelevant:g("At least one of these skills is about the task at hand.",{true:"The task is the kind of work one of these skills exists for, and following it would change how the work is done \u2014 it names the same system, the same procedure or the same kind of artefact.",false:"None of them is about this task. They may share vocabulary with it, mention the same tools, or belong to the same project without bearing on what is being asked. Sharing words with a task is not being about it."}),best:h(t,"Which skill is this task most about?")}}function v(l){let t=l.anyRelevant,i=l.best,o=Object.entries(i.probabilities??{}).map(([e,s])=>({name:e,p:Number(s)||0})).sort((e,s)=>s.p-e.p);return{anyRelevant:t.noul,name:i.choice,confidence:i.confidence,ranked:o}}function d(l,t){return l.length>t?`${l.slice(0,t)}\u2026`:l}var x=.1,A=12;async function E(l,t,i={}){let o=i.minRelevant??.6,e=f(l,t).filter(n=>n.relevance>=x).slice(0,A),s=e.map(n=>({name:n.skill.frontmatter.name,lexical:n.relevance}));if(e.length===0)return{skill:null,anyRelevant:0,confidence:0,shortlist:s,judged:!1,reason:"no skill mentions anything in this task"};if(e.length===1)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`only ${e[0].skill.frontmatter.name} matched (${e[0].matchReason})`};let r=e.map(n=>({name:n.skill.frontmatter.name,description:n.skill.frontmatter.description,category:n.skill.frontmatter.category??null,tags:n.skill.frontmatter.tags})),m=await S(p,y({task:t,agent:i.agent??null,candidates:r}),b(r),{incumbent:{best:r[0].name},features:{agent:i.agent??"unknown",candidates:r.length}});if(!m)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`seat off \u2014 lexical top match (${e[0].matchReason})`};let a=v(m.answers),c=s.map(n=>({...n,p:a.ranked.find(k=>k.name===n.name)?.p??0})).sort((n,k)=>(k.p??0)-(n.p??0));if(a.anyRelevant<o)return{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`nothing on the shortlist is about this task (${a.anyRelevant.toFixed(2)} below ${o})`};let u=e.find(n=>n.skill.frontmatter.name===a.name);return u?{skill:u.skill,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`${a.name} (confidence ${a.confidence.toFixed(2)})`}:{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`seat chose "${a.name}", which was not on the shortlist`}}export{E as pickSkillForTask};
2
- //# sourceMappingURL=select-PMNHXNKI.js.map
1
+ import{y as S,z as w}from"./chunk-LR4QUAJT.js";import{a as g,b as h,f as R}from"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import{e as f}from"./chunk-JHCI6XCJ.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";w();R();var p="skill-select";function y(l){return{task:d(l.task,1200),...l.agent?{agent:l.agent}:{},skills:l.candidates.map(t=>({name:t.name,purpose:d(t.description,300),...t.category?{category:t.category}:{},...t.tags?.length?{tags:t.tags.slice(0,8)}:{}}))}}function b(l){let t={};for(let i of l)t[i.name]=d(i.description,300);return{anyRelevant:g("At least one of these skills is about the task at hand.",{true:"The task is the kind of work one of these skills exists for, and following it would change how the work is done \u2014 it names the same system, the same procedure or the same kind of artefact.",false:"None of them is about this task. They may share vocabulary with it, mention the same tools, or belong to the same project without bearing on what is being asked. Sharing words with a task is not being about it."}),best:h(t,"Which skill is this task most about?")}}function v(l){let t=l.anyRelevant,i=l.best,o=Object.entries(i.probabilities??{}).map(([e,s])=>({name:e,p:Number(s)||0})).sort((e,s)=>s.p-e.p);return{anyRelevant:t.noul,name:i.choice,confidence:i.confidence,ranked:o}}function d(l,t){return l.length>t?`${l.slice(0,t)}\u2026`:l}var x=.1,A=12;async function E(l,t,i={}){let o=i.minRelevant??.6,e=f(l,t).filter(n=>n.relevance>=x).slice(0,A),s=e.map(n=>({name:n.skill.frontmatter.name,lexical:n.relevance}));if(e.length===0)return{skill:null,anyRelevant:0,confidence:0,shortlist:s,judged:!1,reason:"no skill mentions anything in this task"};if(e.length===1)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`only ${e[0].skill.frontmatter.name} matched (${e[0].matchReason})`};let r=e.map(n=>({name:n.skill.frontmatter.name,description:n.skill.frontmatter.description,category:n.skill.frontmatter.category??null,tags:n.skill.frontmatter.tags})),m=await S(p,y({task:t,agent:i.agent??null,candidates:r}),b(r),{incumbent:{best:r[0].name},features:{agent:i.agent??"unknown",candidates:r.length}});if(!m)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`seat off \u2014 lexical top match (${e[0].matchReason})`};let a=v(m.answers),c=s.map(n=>({...n,p:a.ranked.find(k=>k.name===n.name)?.p??0})).sort((n,k)=>(k.p??0)-(n.p??0));if(a.anyRelevant<o)return{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`nothing on the shortlist is about this task (${a.anyRelevant.toFixed(2)} below ${o})`};let u=e.find(n=>n.skill.frontmatter.name===a.name);return u?{skill:u.skill,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`${a.name} (confidence ${a.confidence.toFixed(2)})`}:{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`seat chose "${a.name}", which was not on the shortlist`}}export{E as pickSkillForTask};
2
+ //# sourceMappingURL=select-D2VUSUCJ.js.map
@@ -1,2 +1,2 @@
1
- import{b as a}from"./chunk-6MY7VXQV.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";async function i(o,r,s={}){let e=null,n=await a(l=>{let t=l.crons?.[o];if(t?r&&t.approval?.action==="create"?e={ok:!1,status:409,error:`schedule "${o}" is waiting for approval: agentx schedule approve ${o}`}:t.enabled===r&&(e={ok:!0,id:o,enabled:r,changed:!1}):e={ok:!1,status:404,error:`no schedule "${o}"`},e)throw new Error("no write");t.enabled=r,e={ok:!0,id:o,enabled:r,changed:!0}},{configPath:s.configPath,reload:!1});return e&&(!e.ok||!e.changed)?e:n.success?e??{ok:!1,status:500,error:"mutation did not run"}:{ok:!1,status:500,error:n.error||"could not write agentx.json"}}export{i as setCronEnabled};
2
- //# sourceMappingURL=set-enabled-36JN5ZRJ.js.map
1
+ import{b as a}from"./chunk-NS2HSAHF.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";async function i(o,r,s={}){let e=null,n=await a(l=>{let t=l.crons?.[o];if(t?r&&t.approval?.action==="create"?e={ok:!1,status:409,error:`schedule "${o}" is waiting for approval: agentx schedule approve ${o}`}:t.enabled===r&&(e={ok:!0,id:o,enabled:r,changed:!1}):e={ok:!1,status:404,error:`no schedule "${o}"`},e)throw new Error("no write");t.enabled=r,e={ok:!0,id:o,enabled:r,changed:!0}},{configPath:s.configPath,reload:!1});return e&&(!e.ok||!e.changed)?e:n.success?e??{ok:!1,status:500,error:"mutation did not run"}:{ok:!1,status:500,error:n.error||"could not write agentx.json"}}export{i as setCronEnabled};
2
+ //# sourceMappingURL=set-enabled-GBI7JREU.js.map
@@ -1,7 +1,7 @@
1
- import{b as $}from"./chunk-DOCAWXV5.js";import"./chunk-RKPAVWXF.js";import"./chunk-UNZVDS3P.js";import{b as p}from"./chunk-AJ5HMDRW.js";import"./chunk-KP7KDLZ2.js";import"./chunk-6KWHQAXS.js";import"./chunk-6MY7VXQV.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var m=t=>typeof t=="string"?t.trim():"";function l(t){let n=t.sprint,i=[`${n.id} "${n.title}" [${n.state}], lead ${n.createdBy}${n.ref?`, plan ${n.ref}`:""}`];for(let r of t.lanes??[]){let o=(t.items??[]).filter(e=>e.lane===r.lane);i.push(` lane ${r.lane} (${r.agentId}) [${r.state}]${r.note?` ${r.note}`:""}`);for(let e of o)i.push(` ${e.idx}. ${e.ref}${e.title?` (${e.title})`:""} [${e.state}]${e.note&&e.state!=="done"?` ${e.note}`:""}`)}return i.join(`
1
+ import{b as $}from"./chunk-4HYIERJ4.js";import"./chunk-RKPAVWXF.js";import"./chunk-V4IOGISL.js";import{b as p}from"./chunk-AJ5HMDRW.js";import"./chunk-KP7KDLZ2.js";import"./chunk-RTIGD4NG.js";import"./chunk-NS2HSAHF.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var m=t=>typeof t=="string"?t.trim():"";function l(t){let n=t.sprint,i=[`${n.id} "${n.title}" [${n.state}], lead ${n.createdBy}${n.ref?`, plan ${n.ref}`:""}`];for(let r of t.lanes??[]){let o=(t.items??[]).filter(e=>e.lane===r.lane);i.push(` lane ${r.lane} (${r.agentId}) [${r.state}]${r.note?` ${r.note}`:""}`);for(let e of o)i.push(` ${e.idx}. ${e.ref}${e.title?` (${e.title})`:""} [${e.state}]${e.note&&e.state!=="done"?` ${e.note}`:""}`)}return i.join(`
2
2
  `)}async function S(t,n){let i=n.fetch??fetch,r=n.daemonUrl.replace(/\/$/,""),o=(m(t.action)||"list").toLowerCase();try{if(o==="list"||o==="show"){let f=m(t.id);if(o==="show"&&!f)return"Error: show needs id: the sprint's id (spr-\u2026).";let d=await i(`${r}/sprints${o==="show"?`/${encodeURIComponent(f)}`:""}`,{signal:AbortSignal.timeout(1e4)}),a=await d.json().catch(()=>({}));if(!d.ok)return`Error: ${a?.error||`HTTP ${d.status}`}`;if(o==="show")return l(a);if(!a.enabled)return"Sprints are turned off on this node (requests.sprints.enabled).";let h=a.items??[];return h.length?h.map(l).join(`
3
3
 
4
4
  `):"No sprints."}let e=n.env??process.env,u=$(t,e);if(!u)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let c=await i(`${r}/sprints`,{method:"POST",headers:{"Content-Type":"application/json",...p(e)},body:JSON.stringify({action:o,agentId:u.agentId,id:t.id,title:t.title,ref:t.ref,idleMinutes:t.idleMinutes,lanes:t.lanes,lane:t.lane,item:t.item,note:t.note}),signal:AbortSignal.timeout(1e4)}),s=await c.json().catch(()=>({}));return c.ok?o==="start"?[`Sprint ${s.sprint.id} is running. AgentX hands each lane its first item now, and the next one each time the lane's turn ends; a lane that fails, or sits idle with items left, is told to the owner.`,l(s),"You do not need to stay in this session to keep the lanes going."].join(`
5
5
  `):o==="cancel"?`Sprint ${s.sprint.id} is cancelled: no more items are handed out. A turn already running goes on.`:[`Done. Sprint ${s.sprint.id} now:`,l(s)].join(`
6
6
  `):`Error: ${s?.error||`HTTP ${c.status}`}`}catch(e){return`Error: couldn't reach the daemon (${e?.message??e}).`}}export{l as describeSprint,S as runSprintTool};
7
- //# sourceMappingURL=sprint-tool-Z4RRPK6I.js.map
7
+ //# sourceMappingURL=sprint-tool-HZ24VIC2.js.map
@@ -1,8 +1,8 @@
1
- import{b as w}from"./chunk-DOCAWXV5.js";import"./chunk-RKPAVWXF.js";import{d as h,e as u}from"./chunk-QPABR72X.js";import"./chunk-UNZVDS3P.js";import{b as f}from"./chunk-AJ5HMDRW.js";import"./chunk-KP7KDLZ2.js";import"./chunk-6KWHQAXS.js";import"./chunk-6MY7VXQV.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var g=45e3,q=t=>typeof t=="string"?t.trim():"",y={in_progress:"in progress",waiting_owner:"waiting on the owner",waiting_other:"waiting on another agent",needs_attention:"needs attention"};function v(t){return t.length?t.map(e=>{let a=new Date(e.createdAt).toISOString().slice(0,16).replace("T"," "),d=e.state==="waiting_owner"&&e.question?` Question: ${e.question}`:e.state==="needs_attention"&&e.attentionReason?` ${e.attentionReason}`:"",o=String(e.text).replace(/\s+/g," ").trim(),c=[e.promise&&e.owedTo?` Promised to ${e.owedTo}.`:"",e.dueAt?` Due ${new Date(e.dueAt).toISOString().slice(0,16).replace("T"," ")} UTC.`:"",e.closeWhen?` Closes on its check (${e.closeWhen.kind})${e.verifyState?`: ${e.verifyState}`:""}.`:"",h(e)?" Awaiting QA.":e.qa?` QA: ${u(e.qa)}.`:"",e.goal?` Goal: ${e.goal.title} (${e.goal.id}).`:""].join("");return`- ${e.id} [${y[e.state]??e.state}] ${a} UTC, ${e.channel}, ${e.agentId}: ${o.length>160?`${o.slice(0,159)}\u2026`:o}.${d}${c}`}).join(`
1
+ import{b as w}from"./chunk-4HYIERJ4.js";import"./chunk-RKPAVWXF.js";import{d as h,e as u}from"./chunk-QPABR72X.js";import"./chunk-V4IOGISL.js";import{b as f}from"./chunk-AJ5HMDRW.js";import"./chunk-KP7KDLZ2.js";import"./chunk-RTIGD4NG.js";import"./chunk-NS2HSAHF.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var g=45e3,q=t=>typeof t=="string"?t.trim():"",y={in_progress:"in progress",waiting_owner:"waiting on the owner",waiting_other:"waiting on another agent",needs_attention:"needs attention"};function v(t){return t.length?t.map(e=>{let a=new Date(e.createdAt).toISOString().slice(0,16).replace("T"," "),d=e.state==="waiting_owner"&&e.question?` Question: ${e.question}`:e.state==="needs_attention"&&e.attentionReason?` ${e.attentionReason}`:"",o=String(e.text).replace(/\s+/g," ").trim(),c=[e.promise&&e.owedTo?` Promised to ${e.owedTo}.`:"",e.dueAt?` Due ${new Date(e.dueAt).toISOString().slice(0,16).replace("T"," ")} UTC.`:"",e.closeWhen?` Closes on its check (${e.closeWhen.kind})${e.verifyState?`: ${e.verifyState}`:""}.`:"",h(e)?" Awaiting QA.":e.qa?` QA: ${u(e.qa)}.`:"",e.goal?` Goal: ${e.goal.title} (${e.goal.id}).`:""].join("");return`- ${e.id} [${y[e.state]??e.state}] ${a} UTC, ${e.channel}, ${e.agentId}: ${o.length>160?`${o.slice(0,159)}\u2026`:o}.${d}${c}`}).join(`
2
2
  `):"No open requests."}function T(t){return`$${t>0&&t<.01?t.toFixed(3):t.toFixed(2)}`}function k(t){return t.length?t.map(e=>{let a=e.progress===null?"nothing open or done":`${Math.round(e.progress*100)}% done`,d=e.unpriced?`, ${e.unpriced} of ${e.runs} runs without a cost`:"";return`- ${e.id} "${e.title}": ${e.open} open, ${e.done} done${e.dropped?`, ${e.dropped} declined or dropped`:""} (${a}). Cost ${T(e.costUsd)}${d}.`}).join(`
3
3
  `):"No request names a goal."}function m(t){return(t??[]).map(e=>`${e.idx}. ${e.name} (${e.agentId}, ${e.kind}) [${e.state}]${e.needsApproval?` approval: ${e.approval}`:""}`)}async function I(t,e){let a=e.fetch??fetch,d=e.daemonUrl.replace(/\/$/,""),o=(q(t.action)||"list").toLowerCase();try{if(o==="goals"){let r=await a(`${d}/requests/goals`,{signal:AbortSignal.timeout(1e4)}),s=await r.json().catch(()=>({}));return r.ok?`${s.count} goal${s.count===1?"":"s"}, most recently active first.
4
4
  ${k(s.goals??[])}`:`Error: ${s?.error||`HTTP ${r.status}`}`}if(o==="list"){let r=await a(`${d}/requests`,{signal:AbortSignal.timeout(1e4)}),s=await r.json().catch(()=>({}));return r.ok?s.enabled?`${s.count} open request${s.count===1?"":"s"}, oldest first.
5
5
  ${v(s.items??[])}`:"Requests are turned off on this node (requests.enabled), so nothing is recorded.":`Error: ${s?.error||`HTTP ${r.status}`}`}let c=e.env??process.env,p=w(t,c);if(!p)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=await a(`${d}/requests`,{method:"POST",headers:{"Content-Type":"application/json",...f(c)},body:JSON.stringify({action:o,agentId:p.agentId,id:t.id,question:t.question,evidence:t.evidence,proof:t.proof,reason:t.reason,steps:t.steps,work:t.work,estimateMinutes:t.estimateMinutes,step:t.step,status:t.status,note:t.note,home:t.home,owedTo:t.owedTo,text:t.text,due:t.due,closeWhen:t.closeWhen,headline:t.headline,need:t.need,needsQa:t.needsQa,verdict:t.verdict,goal:t.goal}),signal:AbortSignal.timeout(o==="done"?g:1e4)}),i=await l.json().catch(()=>({}));if(!l.ok)return`Error: ${i?.error||`HTTP ${l.status}`}`;let n=i.request,$=n.goal?` It serves the goal "${n.goal.title}" (${n.goal.id}).`:"";if(o==="accept"&&i.plan)return[`Request ${n.id} is open with a plan of ${i.steps.length} steps.${$} The daemon hands each step to its agent in order, nudges a step that goes quiet, and tells the owner when it is finished or blocked.`,...m(i.steps),`Steps the owner approves get a decision card now; an approved message is sent by the daemon itself. Report your own steps with {action:"step", id:"${n.id}", step:<n>, status:"progress"|"done"|"blocked"}.`].join(`
6
6
  `);if(o==="step")return[`Step reported. Plan of ${n.id}:`,...m(i.steps)].join(`
7
7
  `);if(o==="qa")return`Verdict recorded on ${n.id}: ${u(n.qa)}. It shows on the request's card; nobody is told.`;if(o==="describe")return`Request ${n.id} now reads "${n.headline??"(no headline)"}" on the owner's cards. Needed from them: ${n.need??"what follows from where it stands"}.`;if(o==="accept")return`Request ${n.id} is open and in progress.${$} Close it with done (and a link to the evidence) or decline (and the reason); it stays on the owner's list until then.`;if(o==="wait")return`Request ${n.id} is waiting on the owner with your question. Ask them the question now, once.`;if(o==="promise")return`Promise ${n.id} is open, owed to ${n.owedTo}${n.dueAt?`, due ${new Date(n.dueAt).toISOString().slice(0,16).replace("T"," ")} UTC`:""}. `+(n.closeWhen?"The daemon checks its evidence and closes it once the check is met.":`Close it with {action:"done", id:"${n.id}", evidence:"<link>"} when it is kept.`);if(o==="done"&&i.verify==="unverified")return`Request ${n.id} stays open: its check could not say whether it is finished (${i.detail}). It is marked unverified; the daemon checks again, and the owner can close it by hand.`;if(o==="done"){let r=n.factId?` It left fact ${n.factId} in the wiki (agentx wiki facts show ${n.factId}).`:"";return`Request ${n.id} is closed as done${i.verified?" (its check was met)":""}. Evidence: ${n.evidence}${r}`}return`Request ${n.id} is closed as declined. Reason: ${n.closeReason}`}catch(c){return`Error: couldn't reach the daemon (${c?.message??c}).`}}export{g as DONE_TIMEOUT_MS,k as describeGoals,v as describeOpen,m as describeSteps,I as runRequestTool,T as usd};
8
- //# sourceMappingURL=tool-SK3AAQYW.js.map
8
+ //# sourceMappingURL=tool-7BEFI5SJ.js.map
@@ -1,4 +1,4 @@
1
- import{b as f}from"./chunk-DOCAWXV5.js";import"./chunk-RKPAVWXF.js";import{g as y}from"./chunk-MNG2AMKZ.js";import"./chunk-UNZVDS3P.js";import{b as u}from"./chunk-AJ5HMDRW.js";import"./chunk-KP7KDLZ2.js";import"./chunk-6KWHQAXS.js";import"./chunk-6MY7VXQV.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var w=new Set(["cron","heartbeat","api","a2a","mesh","approvals","requests"]);function c(t){return typeof t=="string"?t.trim():""}async function b(t,s){let d=s.fetch??fetch,l=s.daemonUrl.replace(/\/$/,""),i=(c(t.action)||"create").toLowerCase(),o=f(t,s.env??process.env);if(i==="status"){let n=c(t.id);if(!n)return"Error: `id` is required for status (the card id you got when you raised it).";try{let a=await d(`${l}/approvals/${encodeURIComponent(n)}`,{signal:AbortSignal.timeout(1e4)}),r=await a.json().catch(()=>({}));if(!a.ok)return`Error: ${r?.error||`HTTP ${a.status}`}`;let e=r.card;if(o&&e.raised_by!==o.agentId)return`Error: card "${n}" was raised by another agent.`;if(e.status==="pending")return`Card ${e.id} is still waiting for the operator. It expires ${e.expires}; then "${e.if_silent}" applies.`;if(e.status==="decided"){let h=e.verdict==="yes"?y(e).join(`
1
+ import{b as f}from"./chunk-4HYIERJ4.js";import"./chunk-RKPAVWXF.js";import{g as y}from"./chunk-MNG2AMKZ.js";import"./chunk-V4IOGISL.js";import{b as u}from"./chunk-AJ5HMDRW.js";import"./chunk-KP7KDLZ2.js";import"./chunk-RTIGD4NG.js";import"./chunk-NS2HSAHF.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var w=new Set(["cron","heartbeat","api","a2a","mesh","approvals","requests"]);function c(t){return typeof t=="string"?t.trim():""}async function b(t,s){let d=s.fetch??fetch,l=s.daemonUrl.replace(/\/$/,""),i=(c(t.action)||"create").toLowerCase(),o=f(t,s.env??process.env);if(i==="status"){let n=c(t.id);if(!n)return"Error: `id` is required for status (the card id you got when you raised it).";try{let a=await d(`${l}/approvals/${encodeURIComponent(n)}`,{signal:AbortSignal.timeout(1e4)}),r=await a.json().catch(()=>({}));if(!a.ok)return`Error: ${r?.error||`HTTP ${a.status}`}`;let e=r.card;if(o&&e.raised_by!==o.agentId)return`Error: card "${n}" was raised by another agent.`;if(e.status==="pending")return`Card ${e.id} is still waiting for the operator. It expires ${e.expires}; then "${e.if_silent}" applies.`;if(e.status==="decided"){let h=e.verdict==="yes"?y(e).join(`
2
2
  `):"";return`Card ${e.id}: the operator said ${String(e.verdict).toUpperCase()}.${e.note?` Note: ${e.note}`:""}${h?`
3
3
  ${h}`:""}`}return e.status==="resolved"?`Card ${e.id} was closed by ${e.raised_by}: ${e.resolution??"answered outside the card"}.`:`Card ${e.id} expired unanswered; the default applied: ${e.outcome??e.if_silent}.`}catch(a){return`Error: couldn't reach the daemon (${a?.message??a}).`}}if(i==="resolve"){let n=c(t.id),a=c(t.reason);if(!n)return"Error: `id` is required for resolve (the card id you got when you raised it).";if(!a)return'Error: `reason` is required for resolve: where the owner answered and what you did, e.g. "approved in chat, done".';if(!o)return"Error: couldn't tell which agent you are. Pass callerAgentId.";try{let r=await d(`${l}/approvals/${encodeURIComponent(n)}/resolve`,{method:"POST",headers:{"Content-Type":"application/json",...u(s.env??process.env)},body:JSON.stringify({raised_by:o.agentId,reason:a}),signal:AbortSignal.timeout(1e4)}),e=await r.json().catch(()=>({}));return r.ok?`Card ${e.card.id} is closed. It left the operator's inbox, so nobody will be asked about it again.`:`Error: ${e?.error||`HTTP ${r.status}`}`}catch(r){return`Error: couldn't reach the daemon (${r?.message??r}).`}}if(i!=="create")return`Error: unknown action "${i}". Use create, status or resolve.`;if(!o)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let p=o.channel&&o.chatId&&!w.has(o.channel)?{channel:o.channel,chatId:o.chatId,...o.accountId?{accountId:o.accountId}:{}}:void 0,$={title:t.title,ask:t.ask,recommend:t.recommend,if_silent:t.if_silent,expires:t.expires,source:t.source,choices:t.choices,draft:t.draft,say:t.say,context:t.context,followup:t.followup,raised_by:o.agentId,...p?{reply:p}:{}};try{let n=await d(`${l}/approvals`,{method:"POST",headers:{"Content-Type":"application/json",...u(s.env??process.env)},body:JSON.stringify($),signal:AbortSignal.timeout(1e4)}),a=await n.json().catch(()=>({}));if(!n.ok)return`Error: ${a?.error||`HTTP ${n.status}`}`;let r=a.card;return[`Decision card ${r.id} is in the operator's Approvals inbox.`,`If nobody answers by ${r.expires}, "${r.if_silent}" applies.`,"You will get a message with the result. Tell the requester it is waiting for approval; don't ask the operator again in chat.",`If the operator answers the same thing in chat and you act on it, close the card with {action:"resolve", id:"${r.id}", reason:"approved in chat, done"} so it is not asked again.`].join(" ")}catch(n){return`Error: couldn't reach the daemon (${n?.message??n}).`}}export{b as runApprovalTool};
4
- //# sourceMappingURL=tool-KTL4TLZP.js.map
4
+ //# sourceMappingURL=tool-OXZ4TQBG.js.map
@@ -1,4 +1,4 @@
1
- import{b as $}from"./chunk-DOCAWXV5.js";import"./chunk-RKPAVWXF.js";import{h as m}from"./chunk-RX5O5637.js";import"./chunk-UNZVDS3P.js";import"./chunk-6KWHQAXS.js";import"./chunk-6MY7VXQV.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-M7V7NCX6.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var u=e=>typeof e=="string"?e.trim():"";async function k(e,l){let w=l.fetch??fetch,y=l.daemonUrl.replace(/\/$/,""),i=(u(e.action)||"draft").toLowerCase(),p=$(e,l.env??process.env);if(!p)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let f=encodeURIComponent(p.agentId),d=async(s,c)=>{let n=await w(`${y}${s}`,{...c,signal:AbortSignal.timeout(1e4)}),r=await n.json().catch(()=>({}));return{ok:n.ok,data:n.ok?r:{error:r?.error||`HTTP ${n.status}`}}};try{if(i==="voice"){let r=encodeURIComponent(u(e.topic)),{ok:a,data:o}=await d(`/content/voice?agent=${f}&topic=${r}&n=${Number(e.n)||3}`);return a?o.total?[`${o.total} past post(s) in voice/. Closest to the topic:`,...o.samples.map(t=>`- ${t.file}: ${t.excerpt}`),"Read the whole files before you write, follow their length, tone and habits, and name them in `samples` when you raise the draft."].join(`
1
+ import{b as $}from"./chunk-4HYIERJ4.js";import"./chunk-RKPAVWXF.js";import{h as m}from"./chunk-RX5O5637.js";import"./chunk-V4IOGISL.js";import"./chunk-RTIGD4NG.js";import"./chunk-NS2HSAHF.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var u=e=>typeof e=="string"?e.trim():"";async function k(e,l){let w=l.fetch??fetch,y=l.daemonUrl.replace(/\/$/,""),i=(u(e.action)||"draft").toLowerCase(),p=$(e,l.env??process.env);if(!p)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let f=encodeURIComponent(p.agentId),d=async(s,c)=>{let n=await w(`${y}${s}`,{...c,signal:AbortSignal.timeout(1e4)}),r=await n.json().catch(()=>({}));return{ok:n.ok,data:n.ok?r:{error:r?.error||`HTTP ${n.status}`}}};try{if(i==="voice"){let r=encodeURIComponent(u(e.topic)),{ok:a,data:o}=await d(`/content/voice?agent=${f}&topic=${r}&n=${Number(e.n)||3}`);return a?o.total?[`${o.total} past post(s) in voice/. Closest to the topic:`,...o.samples.map(t=>`- ${t.file}: ${t.excerpt}`),"Read the whole files before you write, follow their length, tone and habits, and name them in `samples` when you raise the draft."].join(`
2
2
  `):"There are no past posts in voice/ yet. Ask the owner to add a few (one post per .md or .txt file) before you draft.":`Error: ${o.error}`}if(i==="calendar"){let{ok:r,data:a}=await d(`/content/calendar?agent=${f}`);return r?a.exists?a.entries.length?["Planned in the next 14 days:",...a.entries.map(o=>`- ${o.date} ${o.platform}: ${o.topic} (${o.status})`)].join(`
3
3
  `):"Nothing is planned in the next 14 days. Add rows to calendar.md.":"There is no calendar.md yet. Create it from the calendar template in your content skill.":`Error: ${a.error}`}if(i==="status"){let r=u(e.id);if(!r)return"Error: `id` is required for status (the draft id you got when you raised it).";let{ok:a,data:o}=await d(`/content/drafts/${encodeURIComponent(r)}?agent=${f}`);if(!a)return`Error: ${o.error}`;let t=o.draft,h=m[t.platform]??t.platform;switch(t.status){case"pending":return`Draft ${t.id} is still waiting for the owner's approval. Nothing has been published.`;case"posted":return`Draft ${t.id} was approved and posted on ${h}${t.url?`: ${t.url}`:""}.`;case"ready":return`Draft ${t.id} was approved. No ${h} connector is set, so it was saved ready to paste: ${t.file}.`;case"rejected":return`Draft ${t.id}: the owner said no. Nothing was published.`;default:return`Draft ${t.id} was approved but not posted: ${t.error??"unknown error"}.`}}if(i!=="draft")return`Error: unknown action "${i}". Use voice, calendar, draft or status.`;let{ok:s,data:c}=await d("/content/drafts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:p.agentId,platform:e.platform,text:e.text,samples:e.samples,topic:e.topic,date:e.date})});if(!s)return`Error: ${c.error}`;let n=c.draft;return[`Draft ${n.id} is in the owner's Approvals inbox as content:${n.id}. Nothing is published until they say yes.`,`It follows: ${n.samples.join(", ")}.`,`Don't post it yourself and don't ask again in chat. Check it later with {action:"status", id:"`+n.id+'"}.'].join(" ")}catch(s){return`Error: couldn't reach the daemon (${s?.message??s}).`}}export{k as runContentTool};
4
- //# sourceMappingURL=tool-B6I22BG2.js.map
4
+ //# sourceMappingURL=tool-QLQEYQYM.js.map
@@ -0,0 +1,2 @@
1
+ import"./chunk-VWTBHLMX.js";import{a as b}from"./chunk-FJMTCU4S.js";import{a}from"./chunk-BITVUKT7.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import{d as c}from"./chunk-V6QFBL6F.js";import"./chunk-JTFCU5LH.js";import"./chunk-56F5UTTA.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-LR4QUAJT.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QUFIUXMQ.js";import"./chunk-BERWTVG2.js";import"./chunk-AHWWJ7AF.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-BZJF7DJR.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as WikiHub,a as WikiStore,c as agenticQuery};
2
+ //# sourceMappingURL=wiki-RFDU6SVD.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b}from"./chunk-PN42ECV3.js";import"./chunk-QIJLFPWE.js";export{a as claudeCall,b as registerWikiEnrich};
2
+ //# sourceMappingURL=wiki-enrich-LDI67VQU.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentix-cli",
3
- "version": "0.183.0",
3
+ "version": "0.184.0",
4
4
  "description": "AI staff for a small company: they find sales, answer clients, write your posts and watch the money, on a machine you own. You approve what matters. Runs a team of AI agents across Telegram, WhatsApp, GitLab, GitHub, crons, webhooks and mesh tasks, on Claude Code, Codex, OpenCode or any LLM API. Web wizard for operators, CLI for engineers.",
5
5
  "license": "MIT",
6
6
  "author": {