agentix-cli 0.127.0 → 0.128.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 (132) hide show
  1. package/dist/{App-FF66N2KH.js → App-BOLQUKCN.js} +2 -2
  2. package/dist/{ChatApp-HMHQZVVD.js → ChatApp-72HXQV24.js} +2 -2
  3. package/dist/absorb-eval-O3HA6XA5.js +2 -0
  4. package/dist/{agent-UAWDO3I2.js → agent-S2DXXALS.js} +2 -2
  5. package/dist/{board-dashboard-Y2OECKDG.js → board-dashboard-ZKXXK5CG.js} +4 -4
  6. package/dist/{chunk-COWAAE54.js → chunk-2SV4RKRW.js} +2 -2
  7. package/dist/{chunk-YV22EOGL.js → chunk-4V7SWL2S.js} +2 -2
  8. package/dist/chunk-5DAEJF5S.js +36 -0
  9. package/dist/chunk-5DAEJF5S.js.map +1 -0
  10. package/dist/{chunk-VBJTGTF5.js → chunk-6GGGXCOY.js} +2 -2
  11. package/dist/{chunk-4WZGZ2Z6.js → chunk-6KIUVVKX.js} +2 -2
  12. package/dist/{chunk-NUSROFTJ.js → chunk-C5MTLW7O.js} +2 -2
  13. package/dist/{chunk-73WQ42PO.js → chunk-D2WX3BET.js} +2 -2
  14. package/dist/chunk-DN3RLR5Z.js +17 -0
  15. package/dist/chunk-DN3RLR5Z.js.map +1 -0
  16. package/dist/{chunk-EJT3F6QM.js → chunk-DQ2LNQ2D.js} +2 -2
  17. package/dist/{chunk-HYRBBH6T.js → chunk-EJT4MA3J.js} +9 -9
  18. package/dist/chunk-EJT4MA3J.js.map +1 -0
  19. package/dist/chunk-FSW4FUMW.js +55 -0
  20. package/dist/chunk-FSW4FUMW.js.map +1 -0
  21. package/dist/chunk-FXBMFGOV.js +6 -0
  22. package/dist/chunk-FXBMFGOV.js.map +1 -0
  23. package/dist/{chunk-PH43FUU7.js → chunk-HKW56YZK.js} +2 -2
  24. package/dist/{chunk-LTH3AYXC.js → chunk-LDS4SZBU.js} +2 -2
  25. package/dist/chunk-MRYA4J5F.js +54 -0
  26. package/dist/chunk-MRYA4J5F.js.map +1 -0
  27. package/dist/{chunk-HNBW5Q47.js → chunk-O2BS6N3T.js} +2 -2
  28. package/dist/{chunk-EHLTZ6IB.js → chunk-P4XGM7ZM.js} +2 -2
  29. package/dist/{chunk-QWQOI4G4.js → chunk-QACEFESP.js} +6 -6
  30. package/dist/{chunk-CKYPQMUD.js → chunk-QFZU5CEO.js} +2 -2
  31. package/dist/{chunk-XX5QKBX4.js → chunk-QQFURUMS.js} +2 -2
  32. package/dist/{chunk-I4DGMFQG.js → chunk-TG6CT54D.js} +2 -2
  33. package/dist/{chunk-O6FP3LPC.js → chunk-TPNTFCSQ.js} +2 -2
  34. package/dist/{chunk-56KNKUFF.js → chunk-VD7IO653.js} +3 -3
  35. package/dist/{chunk-56KNKUFF.js.map → chunk-VD7IO653.js.map} +1 -1
  36. package/dist/{chunk-3KYZOC7N.js → chunk-YWKLUQDC.js} +2 -2
  37. package/dist/chunk-Z3W7D5RR.js +4 -0
  38. package/dist/chunk-Z3W7D5RR.js.map +1 -0
  39. package/dist/{chunk-XYT6XY7G.js → chunk-ZLC4TSXF.js} +2 -2
  40. package/dist/cli.js +1 -1
  41. package/dist/{client-2VVRJ3UF.js → client-VBV7Q43P.js} +2 -2
  42. package/dist/config-52C3DJD2.js +2 -0
  43. package/dist/{config-mutate-47WZDZBO.js → config-mutate-DKQESY6F.js} +2 -2
  44. package/dist/config-mutator-BF4D4QGN.js +2 -0
  45. package/dist/contributions-5OEZWYXI.js +57 -0
  46. package/dist/contributions-5OEZWYXI.js.map +1 -0
  47. package/dist/{doctor-Q3QNZVLC.js → doctor-VLRC4HW2.js} +2 -2
  48. package/dist/{follow-up-tool-GKZVG4L2.js → follow-up-tool-235LDEMP.js} +2 -2
  49. package/dist/{hub-DNPINTIF.js → hub-5QK7KYTZ.js} +2 -2
  50. package/dist/index.d.ts +224 -0
  51. package/dist/index.js +1 -1
  52. package/dist/{program-4QWUOJE3.js → program-MVD57PKP.js} +226 -222
  53. package/dist/program-MVD57PKP.js.map +1 -0
  54. package/dist/{promote-PETKX7KR.js → promote-UPPQ4BQE.js} +2 -2
  55. package/dist/query-XQS5JN6E.js +2 -0
  56. package/dist/{registry-2XDO53AJ.js → registry-MOMTLJ6R.js} +2 -2
  57. package/dist/{request-planner-A3WJNPXO.js → request-planner-QGZJEAKY.js} +2 -2
  58. package/dist/{review-candidates-A6ID2RDX.js → review-candidates-PAKF2JQF.js} +2 -2
  59. package/dist/{rotation-memo-6UW6DTBQ.js → rotation-memo-7VLREGS6.js} +2 -2
  60. package/dist/{routing-NPP3MEUW.js → routing-JG3EV4O4.js} +2 -2
  61. package/dist/schedule-tool-O7ZZ2A7X.js +2 -0
  62. package/dist/{scheduler-T6VLBM3U.js → scheduler-LMPBAA34.js} +2 -2
  63. package/dist/score-KDNIUTNV.js +3 -0
  64. package/dist/score-KDNIUTNV.js.map +1 -0
  65. package/dist/{seat-D3DBYTSC.js → seat-JN3IVZ3G.js} +2 -2
  66. package/dist/{select-RFY64RY7.js → select-ZMMRFMNO.js} +2 -2
  67. package/dist/{set-enabled-AU66DR5C.js → set-enabled-7Y3TW6Z4.js} +2 -2
  68. package/dist/{tool-F3YA2ZZQ.js → tool-OCYXCDOK.js} +2 -2
  69. package/dist/{tool-PCHIVR27.js → tool-S7QI6HRA.js} +2 -2
  70. package/dist/wiki-OCLFFZG6.js +2 -0
  71. package/package.json +1 -1
  72. package/dist/absorb-eval-ERKVVTGG.js +0 -2
  73. package/dist/chunk-HYRBBH6T.js.map +0 -1
  74. package/dist/chunk-PLIT25TH.js +0 -51
  75. package/dist/chunk-PLIT25TH.js.map +0 -1
  76. package/dist/chunk-TJ4P4WW2.js +0 -4
  77. package/dist/chunk-TJ4P4WW2.js.map +0 -1
  78. package/dist/chunk-UJXS4MS3.js +0 -49
  79. package/dist/chunk-UJXS4MS3.js.map +0 -1
  80. package/dist/chunk-Y27RUOD2.js +0 -54
  81. package/dist/chunk-Y27RUOD2.js.map +0 -1
  82. package/dist/config-YSKHOV44.js +0 -2
  83. package/dist/config-mutator-7DIEQUB5.js +0 -2
  84. package/dist/program-4QWUOJE3.js.map +0 -1
  85. package/dist/query-D44BUTH3.js +0 -2
  86. package/dist/schedule-tool-ZECUQMQK.js +0 -2
  87. package/dist/wiki-NI3ZPUZS.js +0 -2
  88. /package/dist/{App-FF66N2KH.js.map → App-BOLQUKCN.js.map} +0 -0
  89. /package/dist/{ChatApp-HMHQZVVD.js.map → ChatApp-72HXQV24.js.map} +0 -0
  90. /package/dist/{absorb-eval-ERKVVTGG.js.map → absorb-eval-O3HA6XA5.js.map} +0 -0
  91. /package/dist/{agent-UAWDO3I2.js.map → agent-S2DXXALS.js.map} +0 -0
  92. /package/dist/{board-dashboard-Y2OECKDG.js.map → board-dashboard-ZKXXK5CG.js.map} +0 -0
  93. /package/dist/{chunk-COWAAE54.js.map → chunk-2SV4RKRW.js.map} +0 -0
  94. /package/dist/{chunk-YV22EOGL.js.map → chunk-4V7SWL2S.js.map} +0 -0
  95. /package/dist/{chunk-VBJTGTF5.js.map → chunk-6GGGXCOY.js.map} +0 -0
  96. /package/dist/{chunk-4WZGZ2Z6.js.map → chunk-6KIUVVKX.js.map} +0 -0
  97. /package/dist/{chunk-NUSROFTJ.js.map → chunk-C5MTLW7O.js.map} +0 -0
  98. /package/dist/{chunk-73WQ42PO.js.map → chunk-D2WX3BET.js.map} +0 -0
  99. /package/dist/{chunk-EJT3F6QM.js.map → chunk-DQ2LNQ2D.js.map} +0 -0
  100. /package/dist/{chunk-PH43FUU7.js.map → chunk-HKW56YZK.js.map} +0 -0
  101. /package/dist/{chunk-LTH3AYXC.js.map → chunk-LDS4SZBU.js.map} +0 -0
  102. /package/dist/{chunk-HNBW5Q47.js.map → chunk-O2BS6N3T.js.map} +0 -0
  103. /package/dist/{chunk-EHLTZ6IB.js.map → chunk-P4XGM7ZM.js.map} +0 -0
  104. /package/dist/{chunk-QWQOI4G4.js.map → chunk-QACEFESP.js.map} +0 -0
  105. /package/dist/{chunk-CKYPQMUD.js.map → chunk-QFZU5CEO.js.map} +0 -0
  106. /package/dist/{chunk-XX5QKBX4.js.map → chunk-QQFURUMS.js.map} +0 -0
  107. /package/dist/{chunk-I4DGMFQG.js.map → chunk-TG6CT54D.js.map} +0 -0
  108. /package/dist/{chunk-O6FP3LPC.js.map → chunk-TPNTFCSQ.js.map} +0 -0
  109. /package/dist/{chunk-3KYZOC7N.js.map → chunk-YWKLUQDC.js.map} +0 -0
  110. /package/dist/{chunk-XYT6XY7G.js.map → chunk-ZLC4TSXF.js.map} +0 -0
  111. /package/dist/{client-2VVRJ3UF.js.map → client-VBV7Q43P.js.map} +0 -0
  112. /package/dist/{config-YSKHOV44.js.map → config-52C3DJD2.js.map} +0 -0
  113. /package/dist/{config-mutate-47WZDZBO.js.map → config-mutate-DKQESY6F.js.map} +0 -0
  114. /package/dist/{config-mutator-7DIEQUB5.js.map → config-mutator-BF4D4QGN.js.map} +0 -0
  115. /package/dist/{doctor-Q3QNZVLC.js.map → doctor-VLRC4HW2.js.map} +0 -0
  116. /package/dist/{follow-up-tool-GKZVG4L2.js.map → follow-up-tool-235LDEMP.js.map} +0 -0
  117. /package/dist/{hub-DNPINTIF.js.map → hub-5QK7KYTZ.js.map} +0 -0
  118. /package/dist/{promote-PETKX7KR.js.map → promote-UPPQ4BQE.js.map} +0 -0
  119. /package/dist/{query-D44BUTH3.js.map → query-XQS5JN6E.js.map} +0 -0
  120. /package/dist/{registry-2XDO53AJ.js.map → registry-MOMTLJ6R.js.map} +0 -0
  121. /package/dist/{request-planner-A3WJNPXO.js.map → request-planner-QGZJEAKY.js.map} +0 -0
  122. /package/dist/{review-candidates-A6ID2RDX.js.map → review-candidates-PAKF2JQF.js.map} +0 -0
  123. /package/dist/{rotation-memo-6UW6DTBQ.js.map → rotation-memo-7VLREGS6.js.map} +0 -0
  124. /package/dist/{routing-NPP3MEUW.js.map → routing-JG3EV4O4.js.map} +0 -0
  125. /package/dist/{schedule-tool-ZECUQMQK.js.map → schedule-tool-O7ZZ2A7X.js.map} +0 -0
  126. /package/dist/{scheduler-T6VLBM3U.js.map → scheduler-LMPBAA34.js.map} +0 -0
  127. /package/dist/{seat-D3DBYTSC.js.map → seat-JN3IVZ3G.js.map} +0 -0
  128. /package/dist/{select-RFY64RY7.js.map → select-ZMMRFMNO.js.map} +0 -0
  129. /package/dist/{set-enabled-AU66DR5C.js.map → set-enabled-7Y3TW6Z4.js.map} +0 -0
  130. /package/dist/{tool-F3YA2ZZQ.js.map → tool-OCYXCDOK.js.map} +0 -0
  131. /package/dist/{tool-PCHIVR27.js.map → tool-S7QI6HRA.js.map} +0 -0
  132. /package/dist/{wiki-NI3ZPUZS.js.map → wiki-OCLFFZG6.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-VBJTGTF5.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-6W74CHNW.js";import"./chunk-EHLTZ6IB.js";import"./chunk-3PGPN323.js";import"./chunk-LTH3AYXC.js";import"./chunk-WPNRDEHW.js";import"./chunk-3KYZOC7N.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QOYAX2FT.js";import"./chunk-4VVHGR7H.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-Y27RUOD2.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-PETKX7KR.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-6GGGXCOY.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-6W74CHNW.js";import"./chunk-P4XGM7ZM.js";import"./chunk-3PGPN323.js";import"./chunk-LDS4SZBU.js";import"./chunk-WPNRDEHW.js";import"./chunk-YWKLUQDC.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QOYAX2FT.js";import"./chunk-4VVHGR7H.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-UPPQ4BQE.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b,c,d,e,f,g}from"./chunk-FSW4FUMW.js";import"./chunk-VD7IO653.js";import"./chunk-LDS4SZBU.js";import"./chunk-WPNRDEHW.js";import"./chunk-YWKLUQDC.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QOYAX2FT.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{e as DEFAULT_GRAPH_WEIGHT,d as SHARED_CATALOG_LINES,a as agenticQuery,c as catalogPool,f as rankCatalogPool,b as retrieveArticles,g as sharedQueryEnabled};
2
+ //# sourceMappingURL=query-XQS5JN6E.js.map
@@ -1,2 +1,2 @@
1
- import{$ as j,S as a,T as b,U as c,V as d,W as e,X as f,Y as g,Z as h,_ as i,aa as k,ba as l,ca as m,da as n}from"./chunk-QWQOI4G4.js";import"./chunk-HNBW5Q47.js";import"./chunk-GLQLCBJS.js";import"./chunk-6W74CHNW.js";import"./chunk-COWAAE54.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-PH43FUU7.js";import"./chunk-52SIHG45.js";import"./chunk-VWTBHLMX.js";import"./chunk-TJ4P4WW2.js";import"./chunk-EHLTZ6IB.js";import"./chunk-3PGPN323.js";import"./chunk-UJXS4MS3.js";import"./chunk-56KNKUFF.js";import"./chunk-LTH3AYXC.js";import"./chunk-WPNRDEHW.js";import"./chunk-36AXN6ZB.js";import"./chunk-KA2UIZXG.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-XX5QKBX4.js";import"./chunk-3KYZOC7N.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-AV7T3SYT.js";import"./chunk-Y5MFVVTM.js";import"./chunk-QD6IICK7.js";import"./chunk-QOYAX2FT.js";import"./chunk-4VVHGR7H.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-DSYKYZMT.js";import"./chunk-Y27RUOD2.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{m as AgentRegistry,a as EDIT_TOOL_INSTRUCTION,h as TRACE_STEP_SUMMARY_BYTES,e as buildEntryMeta,f as buildEventDigest,g as buildWikiContext,i as clipForTrace,b as codingInstructions,l as emitTraceStepsFromStreamEvent,k as firstMissingRequiredTool,d as getGlobalRegistry,n as richReplyPrompt,c as setGlobalRegistry,j as tallyToolUses};
2
- //# sourceMappingURL=registry-2XDO53AJ.js.map
1
+ import{$ as j,S as a,T as b,U as c,V as d,W as e,X as f,Y as g,Z as h,_ as i,aa as k,ba as l,ca as m,da as n}from"./chunk-QACEFESP.js";import"./chunk-O2BS6N3T.js";import"./chunk-GLQLCBJS.js";import"./chunk-6W74CHNW.js";import"./chunk-2SV4RKRW.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-HKW56YZK.js";import"./chunk-52SIHG45.js";import"./chunk-VWTBHLMX.js";import"./chunk-Z3W7D5RR.js";import"./chunk-P4XGM7ZM.js";import"./chunk-3PGPN323.js";import"./chunk-FSW4FUMW.js";import"./chunk-VD7IO653.js";import"./chunk-LDS4SZBU.js";import"./chunk-WPNRDEHW.js";import"./chunk-36AXN6ZB.js";import"./chunk-KA2UIZXG.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-QQFURUMS.js";import"./chunk-YWKLUQDC.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-AV7T3SYT.js";import"./chunk-Y5MFVVTM.js";import"./chunk-QD6IICK7.js";import"./chunk-QOYAX2FT.js";import"./chunk-4VVHGR7H.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-DSYKYZMT.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{m as AgentRegistry,a as EDIT_TOOL_INSTRUCTION,h as TRACE_STEP_SUMMARY_BYTES,e as buildEntryMeta,f as buildEventDigest,g as buildWikiContext,i as clipForTrace,b as codingInstructions,l as emitTraceStepsFromStreamEvent,k as firstMissingRequiredTool,d as getGlobalRegistry,n as richReplyPrompt,c as setGlobalRegistry,j as tallyToolUses};
2
+ //# sourceMappingURL=registry-MOMTLJ6R.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-3KYZOC7N.js";import{a as p,f as w}from"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-Y27RUOD2.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-YWKLUQDC.js";import{a as p,f as w}from"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-A3WJNPXO.js.map
6
+ //# sourceMappingURL=request-planner-QGZJEAKY.js.map
@@ -1,4 +1,4 @@
1
- import{b as I}from"./chunk-4WZGZ2Z6.js";import"./chunk-GLQLCBJS.js";import"./chunk-56KNKUFF.js";import"./chunk-3KYZOC7N.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-Y27RUOD2.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-6KIUVVKX.js";import"./chunk-GLQLCBJS.js";import"./chunk-VD7IO653.js";import"./chunk-YWKLUQDC.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-A6ID2RDX.js.map
4
+ //# sourceMappingURL=review-candidates-PAKF2JQF.js.map
@@ -1,4 +1,4 @@
1
- import{a as u,d as c}from"./chunk-56KNKUFF.js";import"./chunk-QIJLFPWE.js";import{execFile as f}from"child_process";var g=3e4,w="haiku",y=`You are about to lose this working session due to context-size rotation. Before that happens, write a compact memo of what you should carry forward to your next session on the same conversation.
1
+ import{a as u,d as c}from"./chunk-VD7IO653.js";import"./chunk-QIJLFPWE.js";import{execFile as f}from"child_process";var g=3e4,w="haiku",y=`You are about to lose this working session due to context-size rotation. Before that happens, write a compact memo of what you should carry forward to your next session on the same conversation.
2
2
 
3
3
  Include only durable facts a future turn would otherwise have to rediscover:
4
4
  - Names, handles, agent ids, telegram/whatsapp/gitlab usernames
@@ -12,4 +12,4 @@ Do not restate the state of an outside system (billing, account, plan, outage, d
12
12
  Format: 3-12 short bullet points. Each \u2264120 chars. No prose, no preamble, no header. If the session was uninformative or just casual chat, reply with exactly the literal text "(no memo)".
13
13
 
14
14
  Begin the memo now.`;async function E(n,r){let m=Date.now();if(!r)return{memo:null,reason:"no-resume",durationMs:0};let i=["-p",y,"--output-format","json","--resume",r,"--model",w];n.permissionMode==="bypassPermissions"&&i.push("--dangerously-skip-permissions");let d=c(u(n.workspace),n.billing);return new Promise(p=>{let a=!1,e=(t,s)=>{a||(a=!0,p({memo:t,reason:s,durationMs:Date.now()-m}))};f("claude",i,{cwd:n.workspace,env:d,timeout:g,maxBuffer:1024*1024},(t,s,b)=>{if(t)return t.killed?e(null,"timeout"):e(null,`error:${t.message.slice(0,80)}`);try{let l=JSON.parse(s||"{}"),o=typeof l.result=="string"?l.result.trim():"";if(!o||o==="(no memo)")return e(null,"empty");let h=o.length>4096?o.slice(0,4096)+"\u2026":o;return e(h,"ok")}catch{return e(null,"parse-error")}}).on("error",()=>e(null,"spawn-error"))})}export{E as extractRotationMemo};
15
- //# sourceMappingURL=rotation-memo-6UW6DTBQ.js.map
15
+ //# sourceMappingURL=rotation-memo-7VLREGS6.js.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f}from"./chunk-XX5QKBX4.js";import"./chunk-3KYZOC7N.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-Y27RUOD2.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-NPP3MEUW.js.map
1
+ import{a,b,c,d,e,f}from"./chunk-QQFURUMS.js";import"./chunk-YWKLUQDC.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-JG3EV4O4.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b}from"./chunk-TG6CT54D.js";import"./chunk-RKPAVWXF.js";import"./chunk-ZLC4TSXF.js";import"./chunk-2SV4RKRW.js";import"./chunk-HKW56YZK.js";import"./chunk-52SIHG45.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{b as resolveScheduleCaller,a as runScheduleTool};
2
+ //# sourceMappingURL=schedule-tool-O7ZZ2A7X.js.map
@@ -1,2 +1,2 @@
1
- import{n as a,o as b,p as c,q as d,r as e,s as f}from"./chunk-COWAAE54.js";import"./chunk-PH43FUU7.js";import"./chunk-52SIHG45.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-Y27RUOD2.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-T6VLBM3U.js.map
1
+ import{n as a,o as b,p as c,q as d,r as e,s as f}from"./chunk-2SV4RKRW.js";import"./chunk-HKW56YZK.js";import"./chunk-52SIHG45.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-LMPBAA34.js.map
@@ -0,0 +1,3 @@
1
+ import"./chunk-QIJLFPWE.js";function l(n){let i=n.trim();return(i.startsWith("[")?JSON.parse(i):i.split(`
2
+ `).filter(s=>s.trim()).map(s=>JSON.parse(s))).map((s,t)=>{let e=s??{},r=typeof e.question=="string"?e.question.trim():"",u=Array.isArray(e.expect)?e.expect.filter(c=>typeof c=="string"&&!!c.trim()):[];if(!r||u.length===0)throw new Error(`question ${t+1} needs a "question" and a non-empty "expect" list`);return{id:typeof e.id=="string"&&e.id?e.id:`q${t+1}`,question:r,expect:u}})}var a=n=>n.toLowerCase().replace(/[\s ]+/g," ").trim(),p=n=>n.replace(/\D+/g,"");function d(n,i){let o=a(n),s=p(n),t=[],e=[];for(let r of i)(r.split("|").some(c=>{let g=p(c);return!!c.trim()&&o.includes(a(c))||g.length>=5&&s.includes(g)})?t:e).push(r);return{found:t,missing:e}}function f(n,i){let o=i.map(({q:t,answer:e,status:r,citations:u})=>{let{found:c,missing:g}=d(e,t.expect);return{id:t.id,question:t.question,expect:t.expect,found:c,missing:g,score:c.length/t.expect.length,status:r,answer:e,citations:u}}),s=o.length?o.reduce((t,e)=>t+e.score,0)/o.length:0;return{at:n.at??new Date().toISOString(),questions:n.questions,agent:n.agent,shared:n.shared,score:s,full:o.filter(t=>t.missing.length===0).length,results:o}}function m(n,i){let o=new Map(n.results.map(t=>[t.id,t])),s=i.results.map(t=>{let e=o.get(t.id);return{id:t.id,question:t.question,before:e?.score??0,after:t.score,gained:t.found.filter(r=>!e?.found.includes(r)),lost:(e?.found??[]).filter(r=>!t.found.includes(r))}});return{before:n.score,after:i.score,deltas:s}}export{f as buildReport,m as compareReports,d as matchFacts,l as parseQuestionSet};
3
+ //# sourceMappingURL=score-KDNIUTNV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/wiki/score.ts"],"sourcesContent":["// --- Score the wiki against a question set (#824) ---\n//\n// The fleet test behind #824 scored the wiki by hand: each agent took 10\n// to 12 real questions from its own past work and checked whether the\n// wiki answered them (47% and 75%). This makes that repeatable, so the\n// same set can be run before and after a week of daily contributions.\n//\n// A question set is JSON (an array) or JSON lines, one question each:\n//\n// {\"id\": \"q1\", \"question\": \"What is the vendor's billing contact's phone?\", \"expect\": [\"+1 555 0100\"]}\n//\n// An answer scores the share of its expected facts it contains. Matching\n// ignores case and spacing; a fact with five or more digits (a phone,\n// an invoice number) also matches on its digits alone. \"a|b\" accepts\n// either spelling (a date or an amount written two ways). Question sets\n// hold real facts, so they belong outside the repository.\n\nexport interface ScoreQuestion {\n id: string\n question: string\n /** Facts a correct answer contains, copied as they should appear. */\n expect: string[]\n}\n\nexport interface ScoreResult {\n id: string\n question: string\n expect: string[]\n found: string[]\n missing: string[]\n /** found / expected, 0–1. */\n score: number\n status: string\n answer: string\n citations: string[]\n}\n\nexport interface ScoreReport {\n at: string\n questions: string\n agent: string\n /** Whether the shared wiki was searched too. */\n shared: boolean\n /** Mean of the question scores, 0–1. */\n score: number\n /** Questions every expected fact was found for. */\n full: number\n results: ScoreResult[]\n}\n\nexport function parseQuestionSet(text: string): ScoreQuestion[] {\n const trimmed = text.trim()\n const raw: unknown[] = trimmed.startsWith(\"[\")\n ? JSON.parse(trimmed)\n : trimmed.split(\"\\n\").filter((l) => l.trim()).map((l) => JSON.parse(l))\n return raw.map((x, i) => {\n const r = (x ?? {}) as Record<string, unknown>\n const question = typeof r.question === \"string\" ? r.question.trim() : \"\"\n const expect = Array.isArray(r.expect) ? r.expect.filter((e): e is string => typeof e === \"string\" && !!e.trim()) : []\n if (!question || expect.length === 0) throw new Error(`question ${i + 1} needs a \"question\" and a non-empty \"expect\" list`)\n return { id: typeof r.id === \"string\" && r.id ? r.id : `q${i + 1}`, question, expect }\n })\n}\n\nconst norm = (s: string) => s.toLowerCase().replace(/[\\s ]+/g, \" \").trim()\nconst digits = (s: string) => s.replace(/\\D+/g, \"\")\n\n/** Which expected facts the answer contains. */\nexport function matchFacts(answer: string, expect: string[]): { found: string[]; missing: string[] } {\n const text = norm(answer)\n const textDigits = digits(answer)\n const found: string[] = []\n const missing: string[] = []\n for (const fact of expect) {\n // \"2027-03-31|31/03/2027\": any one spelling counts.\n const hit = fact.split(\"|\").some((alt) => {\n const d = digits(alt)\n return (!!alt.trim() && text.includes(norm(alt))) || (d.length >= 5 && textDigits.includes(d))\n })\n ;(hit ? found : missing).push(fact)\n }\n return { found, missing }\n}\n\nexport function buildReport(\n meta: { questions: string; agent: string; shared: boolean; at?: string },\n answers: Array<{ q: ScoreQuestion; answer: string; status: string; citations: string[] }>,\n): ScoreReport {\n const results = answers.map(({ q, answer, status, citations }) => {\n const { found, missing } = matchFacts(answer, q.expect)\n return { id: q.id, question: q.question, expect: q.expect, found, missing, score: found.length / q.expect.length, status, answer, citations }\n })\n const score = results.length ? results.reduce((s, r) => s + r.score, 0) / results.length : 0\n return {\n at: meta.at ?? new Date().toISOString(),\n questions: meta.questions, agent: meta.agent, shared: meta.shared,\n score, full: results.filter((r) => r.missing.length === 0).length, results,\n }\n}\n\nexport interface ScoreDelta {\n id: string\n question: string\n before: number\n after: number\n /** Facts the later run found that the earlier one missed. */\n gained: string[]\n lost: string[]\n}\n\n/** Per-question change between two reports on the same set. */\nexport function compareReports(before: ScoreReport, after: ScoreReport): { before: number; after: number; deltas: ScoreDelta[] } {\n const prior = new Map(before.results.map((r) => [r.id, r]))\n const deltas = after.results.map((r) => {\n const b = prior.get(r.id)\n return {\n id: r.id, question: r.question,\n before: b?.score ?? 0, after: r.score,\n gained: r.found.filter((f) => !b?.found.includes(f)),\n lost: (b?.found ?? []).filter((f) => !r.found.includes(f)),\n }\n })\n return { before: before.score, after: after.score, deltas }\n}\n"],"mappings":"4BAkDO,SAASA,EAAiBC,EAA+B,CAC9D,IAAMC,EAAUD,EAAK,KAAK,EAI1B,OAHuBC,EAAQ,WAAW,GAAG,EACzC,KAAK,MAAMA,CAAO,EAClBA,EAAQ,MAAM;AAAA,CAAI,EAAE,OAAQC,GAAMA,EAAE,KAAK,CAAC,EAAE,IAAKA,GAAM,KAAK,MAAMA,CAAC,CAAC,GAC7D,IAAI,CAACC,EAAGC,IAAM,CACvB,IAAMC,EAAKF,GAAK,CAAC,EACXG,EAAW,OAAOD,EAAE,UAAa,SAAWA,EAAE,SAAS,KAAK,EAAI,GAChEE,EAAS,MAAM,QAAQF,EAAE,MAAM,EAAIA,EAAE,OAAO,OAAQG,GAAmB,OAAOA,GAAM,UAAY,CAAC,CAACA,EAAE,KAAK,CAAC,EAAI,CAAC,EACrH,GAAI,CAACF,GAAYC,EAAO,SAAW,EAAG,MAAM,IAAI,MAAM,YAAYH,EAAI,oDAAoD,EAC1H,MAAO,CAAE,GAAI,OAAOC,EAAE,IAAO,UAAYA,EAAE,GAAKA,EAAE,GAAK,IAAID,EAAI,IAAK,SAAAE,EAAU,OAAAC,CAAO,CACvF,CAAC,CACH,CAEA,IAAME,EAAQC,GAAcA,EAAE,YAAY,EAAE,QAAQ,UAAW,GAAG,EAAE,KAAK,EACnEC,EAAUD,GAAcA,EAAE,QAAQ,OAAQ,EAAE,EAG3C,SAASE,EAAWC,EAAgBN,EAA0D,CACnG,IAAMP,EAAOS,EAAKI,CAAM,EAClBC,EAAaH,EAAOE,CAAM,EAC1BE,EAAkB,CAAC,EACnBC,EAAoB,CAAC,EAC3B,QAAWC,KAAQV,GAELU,EAAK,MAAM,GAAG,EAAE,KAAMC,GAAQ,CACxC,IAAMC,EAAIR,EAAOO,CAAG,EACpB,MAAQ,CAAC,CAACA,EAAI,KAAK,GAAKlB,EAAK,SAASS,EAAKS,CAAG,CAAC,GAAOC,EAAE,QAAU,GAAKL,EAAW,SAASK,CAAC,CAC9F,CAAC,EACOJ,EAAQC,GAAS,KAAKC,CAAI,EAEpC,MAAO,CAAE,MAAAF,EAAO,QAAAC,CAAQ,CAC1B,CAEO,SAASI,EACdC,EACAC,EACa,CACb,IAAMC,EAAUD,EAAQ,IAAI,CAAC,CAAE,EAAAE,EAAG,OAAAX,EAAQ,OAAAY,EAAQ,UAAAC,CAAU,IAAM,CAChE,GAAM,CAAE,MAAAX,EAAO,QAAAC,CAAQ,EAAIJ,EAAWC,EAAQW,EAAE,MAAM,EACtD,MAAO,CAAE,GAAIA,EAAE,GAAI,SAAUA,EAAE,SAAU,OAAQA,EAAE,OAAQ,MAAAT,EAAO,QAAAC,EAAS,MAAOD,EAAM,OAASS,EAAE,OAAO,OAAQ,OAAAC,EAAQ,OAAAZ,EAAQ,UAAAa,CAAU,CAC9I,CAAC,EACKC,EAAQJ,EAAQ,OAASA,EAAQ,OAAO,CAACb,EAAGL,IAAMK,EAAIL,EAAE,MAAO,CAAC,EAAIkB,EAAQ,OAAS,EAC3F,MAAO,CACL,GAAIF,EAAK,IAAM,IAAI,KAAK,EAAE,YAAY,EACtC,UAAWA,EAAK,UAAW,MAAOA,EAAK,MAAO,OAAQA,EAAK,OAC3D,MAAAM,EAAO,KAAMJ,EAAQ,OAAQlB,GAAMA,EAAE,QAAQ,SAAW,CAAC,EAAE,OAAQ,QAAAkB,CACrE,CACF,CAaO,SAASK,EAAeC,EAAqBC,EAA6E,CAC/H,IAAMC,EAAQ,IAAI,IAAIF,EAAO,QAAQ,IAAKxB,GAAM,CAACA,EAAE,GAAIA,CAAC,CAAC,CAAC,EACpD2B,EAASF,EAAM,QAAQ,IAAKzB,GAAM,CACtC,IAAM4B,EAAIF,EAAM,IAAI1B,EAAE,EAAE,EACxB,MAAO,CACL,GAAIA,EAAE,GAAI,SAAUA,EAAE,SACtB,OAAQ4B,GAAG,OAAS,EAAG,MAAO5B,EAAE,MAChC,OAAQA,EAAE,MAAM,OAAQ6B,GAAM,CAACD,GAAG,MAAM,SAASC,CAAC,CAAC,EACnD,MAAOD,GAAG,OAAS,CAAC,GAAG,OAAQC,GAAM,CAAC7B,EAAE,MAAM,SAAS6B,CAAC,CAAC,CAC3D,CACF,CAAC,EACD,MAAO,CAAE,OAAQL,EAAO,MAAO,MAAOC,EAAM,MAAO,OAAAE,CAAO,CAC5D","names":["parseQuestionSet","text","trimmed","l","x","i","r","question","expect","e","norm","s","digits","matchFacts","answer","textDigits","found","missing","fact","alt","d","buildReport","meta","answers","results","q","status","citations","score","compareReports","before","after","prior","deltas","b","f"]}
@@ -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-3KYZOC7N.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-Y27RUOD2.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-D3DBYTSC.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-YWKLUQDC.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-JN3IVZ3G.js.map
@@ -1,2 +1,2 @@
1
- import{y as S,z as w}from"./chunk-3KYZOC7N.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-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import{e as f}from"./chunk-JHCI6XCJ.js";import"./chunk-Y27RUOD2.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-RFY64RY7.js.map
1
+ import{y as S,z as w}from"./chunk-YWKLUQDC.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-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import{e as f}from"./chunk-JHCI6XCJ.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-ZMMRFMNO.js.map
@@ -1,2 +1,2 @@
1
- import{b as a}from"./chunk-PH43FUU7.js";import"./chunk-Y27RUOD2.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-AU66DR5C.js.map
1
+ import{b as a}from"./chunk-HKW56YZK.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.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-7Y3TW6Z4.js.map
@@ -1,6 +1,6 @@
1
- import{b as h}from"./chunk-I4DGMFQG.js";import"./chunk-RKPAVWXF.js";import{b as l}from"./chunk-LLNPKE7H.js";import"./chunk-SHEUCITK.js";import"./chunk-XYT6XY7G.js";import"./chunk-COWAAE54.js";import"./chunk-PH43FUU7.js";import"./chunk-52SIHG45.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-Y27RUOD2.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";var g=t=>typeof t=="string"?t.trim():"",w={in_progress:"in progress",waiting_owner:"waiting on the owner",waiting_other:"waiting on another agent",needs_attention:"needs attention"};function f(t){return t.length?t.map(e=>{let a=new Date(e.createdAt).toISOString().slice(0,16).replace("T"," "),c=e.state==="waiting_owner"&&e.question?` Question: ${e.question}`:e.state==="needs_attention"&&e.attentionReason?` ${e.attentionReason}`:"",n=String(e.text).replace(/\s+/g," ").trim();return`- ${e.id} [${w[e.state]??e.state}] ${a} UTC, ${e.channel}, ${e.agentId}: ${n.length>160?`${n.slice(0,159)}\u2026`:n}.${c}`}).join(`
1
+ import{b as h}from"./chunk-TG6CT54D.js";import"./chunk-RKPAVWXF.js";import{b as l}from"./chunk-LLNPKE7H.js";import"./chunk-SHEUCITK.js";import"./chunk-ZLC4TSXF.js";import"./chunk-2SV4RKRW.js";import"./chunk-HKW56YZK.js";import"./chunk-52SIHG45.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";var g=t=>typeof t=="string"?t.trim():"",w={in_progress:"in progress",waiting_owner:"waiting on the owner",waiting_other:"waiting on another agent",needs_attention:"needs attention"};function f(t){return t.length?t.map(e=>{let a=new Date(e.createdAt).toISOString().slice(0,16).replace("T"," "),c=e.state==="waiting_owner"&&e.question?` Question: ${e.question}`:e.state==="needs_attention"&&e.attentionReason?` ${e.attentionReason}`:"",n=String(e.text).replace(/\s+/g," ").trim();return`- ${e.id} [${w[e.state]??e.state}] ${a} UTC, ${e.channel}, ${e.agentId}: ${n.length>160?`${n.slice(0,159)}\u2026`:n}.${c}`}).join(`
2
2
  `):"No open requests."}function $(t){return(t??[]).map(e=>`${e.idx}. ${e.name} (${e.agentId}, ${e.kind}) [${e.state}]${e.needsApproval?` approval: ${e.approval}`:""}`)}async function y(t,e){let a=e.fetch??fetch,c=e.daemonUrl.replace(/\/$/,""),n=(g(t.action)||"list").toLowerCase();try{if(n==="list"){let u=await a(`${c}/requests`,{signal:AbortSignal.timeout(1e4)}),r=await u.json().catch(()=>({}));return u.ok?r.enabled?`${r.count} open request${r.count===1?"":"s"}, oldest first.
3
3
  ${f(r.items??[])}`:"Requests are turned off on this node (requests.enabled), so nothing is recorded.":`Error: ${r?.error||`HTTP ${u.status}`}`}let i=e.env??process.env,p=h(t,i);if(!p)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let d=await a(`${c}/requests`,{method:"POST",headers:{"Content-Type":"application/json",...l(i)},body:JSON.stringify({action:n,agentId:p.agentId,id:t.id,question:t.question,evidence:t.evidence,reason:t.reason,steps:t.steps,step:t.step,status:t.status,note:t.note}),signal:AbortSignal.timeout(1e4)}),s=await d.json().catch(()=>({}));if(!d.ok)return`Error: ${s?.error||`HTTP ${d.status}`}`;let o=s.request;return n==="accept"&&s.plan?[`Request ${o.id} is open with a plan of ${s.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.`,...$(s.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:"${o.id}", step:<n>, status:"progress"|"done"|"blocked"}.`].join(`
4
4
  `):n==="step"?[`Step reported. Plan of ${o.id}:`,...$(s.steps)].join(`
5
5
  `):n==="accept"?`Request ${o.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.`:n==="wait"?`Request ${o.id} is waiting on the owner with your question. Ask them the question now, once.`:n==="done"?`Request ${o.id} is closed as done. Evidence: ${o.evidence}`:`Request ${o.id} is closed as declined. Reason: ${o.closeReason}`}catch(i){return`Error: couldn't reach the daemon (${i?.message??i}).`}}export{f as describeOpen,$ as describeSteps,y as runRequestTool};
6
- //# sourceMappingURL=tool-F3YA2ZZQ.js.map
6
+ //# sourceMappingURL=tool-OCYXCDOK.js.map
@@ -1,4 +1,4 @@
1
- import{b as h}from"./chunk-I4DGMFQG.js";import"./chunk-RKPAVWXF.js";import{f}from"./chunk-Y4CYQV7G.js";import{b as u}from"./chunk-LLNPKE7H.js";import"./chunk-SHEUCITK.js";import"./chunk-XYT6XY7G.js";import"./chunk-COWAAE54.js";import"./chunk-PH43FUU7.js";import"./chunk-52SIHG45.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-Y27RUOD2.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";var m=new Set(["cron","heartbeat","api","a2a","mesh","approvals","requests"]);function y(e){return typeof e=="string"?e.trim():""}async function A(e,i){let c=i.fetch??fetch,d=i.daemonUrl.replace(/\/$/,""),s=(y(e.action)||"create").toLowerCase(),r=h(e,i.env??process.env);if(s==="status"){let o=y(e.id);if(!o)return"Error: `id` is required for status (the card id you got when you raised it).";try{let n=await c(`${d}/approvals/${encodeURIComponent(o)}`,{signal:AbortSignal.timeout(1e4)}),a=await n.json().catch(()=>({}));if(!n.ok)return`Error: ${a?.error||`HTTP ${n.status}`}`;let t=a.card;if(r&&t.raised_by!==r.agentId)return`Error: card "${o}" was raised by another agent.`;if(t.status==="pending")return`Card ${t.id} is still waiting for the operator. It expires ${t.expires}; then "${t.if_silent}" applies.`;if(t.status==="decided"){let p=t.verdict==="yes"?f(t).join(`
1
+ import{b as h}from"./chunk-TG6CT54D.js";import"./chunk-RKPAVWXF.js";import{f}from"./chunk-Y4CYQV7G.js";import{b as u}from"./chunk-LLNPKE7H.js";import"./chunk-SHEUCITK.js";import"./chunk-ZLC4TSXF.js";import"./chunk-2SV4RKRW.js";import"./chunk-HKW56YZK.js";import"./chunk-52SIHG45.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";var m=new Set(["cron","heartbeat","api","a2a","mesh","approvals","requests"]);function y(e){return typeof e=="string"?e.trim():""}async function A(e,i){let c=i.fetch??fetch,d=i.daemonUrl.replace(/\/$/,""),s=(y(e.action)||"create").toLowerCase(),r=h(e,i.env??process.env);if(s==="status"){let o=y(e.id);if(!o)return"Error: `id` is required for status (the card id you got when you raised it).";try{let n=await c(`${d}/approvals/${encodeURIComponent(o)}`,{signal:AbortSignal.timeout(1e4)}),a=await n.json().catch(()=>({}));if(!n.ok)return`Error: ${a?.error||`HTTP ${n.status}`}`;let t=a.card;if(r&&t.raised_by!==r.agentId)return`Error: card "${o}" was raised by another agent.`;if(t.status==="pending")return`Card ${t.id} is still waiting for the operator. It expires ${t.expires}; then "${t.if_silent}" applies.`;if(t.status==="decided"){let p=t.verdict==="yes"?f(t).join(`
2
2
  `):"";return`Card ${t.id}: the operator said ${String(t.verdict).toUpperCase()}.${t.note?` Note: ${t.note}`:""}${p?`
3
3
  ${p}`:""}`}return`Card ${t.id} expired unanswered; the default applied: ${t.outcome??t.if_silent}.`}catch(n){return`Error: couldn't reach the daemon (${n?.message??n}).`}}if(s!=="create")return`Error: unknown action "${s}". Use create or status.`;if(!r)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=r.channel&&r.chatId&&!m.has(r.channel)?{channel:r.channel,chatId:r.chatId,...r.accountId?{accountId:r.accountId}:{}}:void 0,$={title:e.title,ask:e.ask,recommend:e.recommend,if_silent:e.if_silent,expires:e.expires,source:e.source,choices:e.choices,draft:e.draft,say:e.say,context:e.context,raised_by:r.agentId,...l?{reply:l}:{}};try{let o=await c(`${d}/approvals`,{method:"POST",headers:{"Content-Type":"application/json",...u(i.env??process.env)},body:JSON.stringify($),signal:AbortSignal.timeout(1e4)}),n=await o.json().catch(()=>({}));if(!o.ok)return`Error: ${n?.error||`HTTP ${o.status}`}`;let a=n.card;return[`Decision card ${a.id} is in the operator's Approvals inbox.`,`If nobody answers by ${a.expires}, "${a.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."].join(" ")}catch(o){return`Error: couldn't reach the daemon (${o?.message??o}).`}}export{A as runApprovalTool};
4
- //# sourceMappingURL=tool-PCHIVR27.js.map
4
+ //# sourceMappingURL=tool-S7QI6HRA.js.map
@@ -0,0 +1,2 @@
1
+ import"./chunk-VWTBHLMX.js";import{a as b}from"./chunk-Z3W7D5RR.js";import{a}from"./chunk-P4XGM7ZM.js";import"./chunk-3PGPN323.js";import{a as c}from"./chunk-FSW4FUMW.js";import"./chunk-VD7IO653.js";import"./chunk-LDS4SZBU.js";import"./chunk-WPNRDEHW.js";import"./chunk-YWKLUQDC.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QOYAX2FT.js";import"./chunk-4VVHGR7H.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-MRYA4J5F.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as WikiHub,a as WikiStore,c as agenticQuery};
2
+ //# sourceMappingURL=wiki-OCLFFZG6.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentix-cli",
3
- "version": "0.127.0",
3
+ "version": "0.128.0",
4
4
  "description": "AI operations layer for small and medium businesses. Routes Telegram, WhatsApp, GitLab, GitHub, crons, webhooks, and mesh tasks to AI agents. Web wizard for operators, CLI for engineers. Self-hosted.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -1,2 +0,0 @@
1
- import{e as a,f as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i,n as j,o as k,p as l,q as m,r as n,s as o}from"./chunk-PLIT25TH.js";import"./chunk-UJXS4MS3.js";import"./chunk-56KNKUFF.js";import"./chunk-LTH3AYXC.js";import"./chunk-WPNRDEHW.js";import"./chunk-3KYZOC7N.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QOYAX2FT.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import"./chunk-Y27RUOD2.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{i as JUDGE_ENTRY_CHARS,e as WEAK_CITATION,j as buildJudgePrompt,l as buildScorecard,f as checkArticle,n as envelopeUsage,h as findDuplicates,k as parseJudgeReply,b as pickSample,m as renderScorecard,a as seededRandom,o as summariseRuns,d as termOverlap,c as terms,g as uncitedWithFacts};
2
- //# sourceMappingURL=absorb-eval-ERKVVTGG.js.map