agentix-cli 0.191.0 → 0.193.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{App-Z4OZ4VAI.js → App-6TNGC3UR.js} +2 -2
- package/dist/{ChatApp-7VLNOH2N.js → ChatApp-FUDLZ6HZ.js} +2 -2
- package/dist/{absorb-eval-QR3EEHDE.js → absorb-eval-YSWPPGQF.js} +2 -2
- package/dist/{adapter-VWMQAALK.js → adapter-EEBNOFDS.js} +2 -2
- package/dist/{agent-RS4W545P.js → agent-QX2POUEM.js} +2 -2
- package/dist/{board-dashboard-RXOSENTD.js → board-dashboard-VVFHNABJ.js} +880 -429
- package/dist/board-dashboard-VVFHNABJ.js.map +1 -0
- package/dist/{chunk-MW75GECE.js → chunk-22WO5X4L.js} +103 -102
- package/dist/chunk-22WO5X4L.js.map +1 -0
- package/dist/{chunk-XJUBFPOM.js → chunk-2O72AHK5.js} +2 -2
- package/dist/{chunk-ZJ74H5SV.js → chunk-2VQ3VKBR.js} +2 -2
- package/dist/{chunk-WXSS7VIW.js → chunk-462FRP7L.js} +294 -292
- package/dist/chunk-462FRP7L.js.map +1 -0
- package/dist/{chunk-54J6PXBG.js → chunk-52NME3AU.js} +2 -2
- package/dist/{chunk-T2NPSEPJ.js → chunk-6FUWODBV.js} +2 -2
- package/dist/chunk-6ZAQ3IT5.js +116 -0
- package/dist/chunk-6ZAQ3IT5.js.map +1 -0
- package/dist/{chunk-34O2GH4J.js → chunk-AAL5WIXB.js} +2 -2
- package/dist/{chunk-XJEBJZLX.js → chunk-BKTKJNCR.js} +2 -2
- package/dist/{chunk-YFJVQOWI.js → chunk-DACZSUCN.js} +2 -2
- package/dist/{chunk-IGLJXEXX.js → chunk-DS2ZIVIH.js} +2 -2
- package/dist/{chunk-RRGC6Y4L.js → chunk-EH7Y2W77.js} +2 -2
- package/dist/{chunk-6MU3OEII.js → chunk-EI3TZ52P.js} +2 -2
- package/dist/{chunk-S3XUIVC2.js → chunk-FEXG2PKQ.js} +2 -2
- package/dist/{chunk-RQKLUGMS.js → chunk-GLYBXXO7.js} +3 -3
- package/dist/{chunk-OTCMYGQR.js → chunk-H5XBQWAI.js} +2 -2
- package/dist/{chunk-BWBTNBPS.js → chunk-HNA4BW47.js} +2 -2
- package/dist/chunk-HPRLRD4P.js +6 -0
- package/dist/chunk-HPRLRD4P.js.map +1 -0
- package/dist/chunk-JGZ6CA5L.js +143 -0
- package/dist/chunk-JGZ6CA5L.js.map +1 -0
- package/dist/{chunk-3NMBTBNW.js → chunk-KHKG7H6Q.js} +2 -2
- package/dist/chunk-MQRAQJSS.js +2 -0
- package/dist/chunk-MQRAQJSS.js.map +1 -0
- package/dist/{chunk-FRTU3ICQ.js → chunk-MQV3IU6F.js} +2 -2
- package/dist/{chunk-CKHLBNMN.js → chunk-N56EHPTR.js} +2 -2
- package/dist/{chunk-AS4NDKUJ.js → chunk-OYXB6KZX.js} +2 -2
- package/dist/{chunk-YMDGKFIG.js → chunk-PSP3NAFU.js} +56 -56
- package/dist/{chunk-YMDGKFIG.js.map → chunk-PSP3NAFU.js.map} +1 -1
- package/dist/{chunk-YOMLHG33.js → chunk-Q7ZPW55P.js} +2 -2
- package/dist/chunk-QTBFMRJ2.js +2 -0
- package/dist/chunk-QTBFMRJ2.js.map +1 -0
- package/dist/{chunk-RA4WCDGV.js → chunk-RDENYWNG.js} +88 -78
- package/dist/chunk-RDENYWNG.js.map +1 -0
- package/dist/{chunk-KTGTKOLV.js → chunk-TDZDIDFG.js} +2 -2
- package/dist/chunk-UOYIC7XN.js +3 -0
- package/dist/chunk-UOYIC7XN.js.map +1 -0
- package/dist/{chunk-ZU6W3CXO.js → chunk-VK2TW3RL.js} +36 -36
- package/dist/chunk-VK2TW3RL.js.map +1 -0
- package/dist/{chunk-L3CWRXKQ.js → chunk-Z2NYUCTE.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{client-N5YTG2K6.js → client-5USANRIL.js} +2 -2
- package/dist/{config-WUB5SJPH.js → config-N7DHUZMH.js} +2 -2
- package/dist/{config-mutate-ZLPUEIVN.js → config-mutate-OVUXNS5X.js} +2 -2
- package/dist/config-mutator-OK7CDCHW.js +2 -0
- package/dist/{contributions-C4DKQJY6.js → contributions-LTDE6UOQ.js} +2 -2
- package/dist/{doctor-ND3OS575.js → doctor-C3DTKR7C.js} +2 -2
- package/dist/{follow-up-tool-TWOEAWOL.js → follow-up-tool-NCFOTJ5Y.js} +2 -2
- package/dist/{hub-FUM7UY5S.js → hub-F3X7NL4B.js} +2 -2
- package/dist/index.d.ts +157 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{program-JLUZINRR.js → program-6HWZZ2D3.js} +261 -259
- package/dist/program-6HWZZ2D3.js.map +1 -0
- package/dist/{promote-M5AJSWHZ.js → promote-FSOPSHJ4.js} +2 -2
- package/dist/{query-NPDKXBTN.js → query-UDRKDTSB.js} +2 -2
- package/dist/query-runs-AENEZOM6.js +2 -0
- package/dist/{query-settings-HXKZYIEV.js → query-settings-DJGEGG62.js} +2 -2
- package/dist/registry-AVGT5KPR.js +2 -0
- package/dist/{request-planner-ANGZP4JL.js → request-planner-SAQX26AR.js} +2 -2
- package/dist/{review-candidates-B7T2QA3R.js → review-candidates-67MPNU42.js} +2 -2
- package/dist/{routing-2KWP5TAT.js → routing-7DUO5PI7.js} +2 -2
- package/dist/schedule-tool-LZOW5SVQ.js +2 -0
- package/dist/{scheduler-VN7WDAKE.js → scheduler-3IADVHIN.js} +2 -2
- package/dist/{seat-MAC3QGGD.js → seat-YWSYQBCW.js} +2 -2
- package/dist/{select-UYKEN4N4.js → select-PA7AHZ3W.js} +2 -2
- package/dist/self-KACQLLDA.js +2 -0
- package/dist/{set-enabled-JEUIINT3.js → set-enabled-DD6L2ZQ6.js} +2 -2
- package/dist/{sprint-tool-MB2MPR4K.js → sprint-tool-PKJA6LYF.js} +2 -2
- package/dist/{tool-L4CQCPRF.js → tool-KOGZBOCR.js} +2 -2
- package/dist/tool-PJSLWK45.js +8 -0
- package/dist/tool-PJSLWK45.js.map +1 -0
- package/dist/{tool-SZ6C6EBP.js → tool-WJ72TBMV.js} +2 -2
- package/dist/{wiki-ZAHFGDKE.js → wiki-HQBMWH23.js} +2 -2
- package/dist/wiki-enrich-7RPM5DQF.js +2 -0
- package/dist/wiki-enrich-7RPM5DQF.js.map +1 -0
- package/package.json +1 -1
- package/dist/board-dashboard-RXOSENTD.js.map +0 -1
- package/dist/chunk-CZMVJP7O.js +0 -2
- package/dist/chunk-CZMVJP7O.js.map +0 -1
- package/dist/chunk-MW75GECE.js.map +0 -1
- package/dist/chunk-RA4WCDGV.js.map +0 -1
- package/dist/chunk-U5B275AU.js +0 -143
- package/dist/chunk-U5B275AU.js.map +0 -1
- package/dist/chunk-WXSS7VIW.js.map +0 -1
- package/dist/chunk-ZCBTTYQN.js +0 -112
- package/dist/chunk-ZCBTTYQN.js.map +0 -1
- package/dist/chunk-ZU6W3CXO.js.map +0 -1
- package/dist/config-mutator-S5X4DOJK.js +0 -2
- package/dist/program-JLUZINRR.js.map +0 -1
- package/dist/query-runs-VXS572PQ.js +0 -6
- package/dist/query-runs-VXS572PQ.js.map +0 -1
- package/dist/registry-A2FFL4EA.js +0 -2
- package/dist/schedule-tool-2UNMXEBQ.js +0 -2
- package/dist/self-SO6GCVYD.js +0 -2
- package/dist/tool-TLXKW55S.js +0 -8
- package/dist/tool-TLXKW55S.js.map +0 -1
- package/dist/wiki-enrich-QLCQHV6B.js +0 -2
- /package/dist/{App-Z4OZ4VAI.js.map → App-6TNGC3UR.js.map} +0 -0
- /package/dist/{ChatApp-7VLNOH2N.js.map → ChatApp-FUDLZ6HZ.js.map} +0 -0
- /package/dist/{absorb-eval-QR3EEHDE.js.map → absorb-eval-YSWPPGQF.js.map} +0 -0
- /package/dist/{adapter-VWMQAALK.js.map → adapter-EEBNOFDS.js.map} +0 -0
- /package/dist/{agent-RS4W545P.js.map → agent-QX2POUEM.js.map} +0 -0
- /package/dist/{chunk-XJUBFPOM.js.map → chunk-2O72AHK5.js.map} +0 -0
- /package/dist/{chunk-ZJ74H5SV.js.map → chunk-2VQ3VKBR.js.map} +0 -0
- /package/dist/{chunk-54J6PXBG.js.map → chunk-52NME3AU.js.map} +0 -0
- /package/dist/{chunk-T2NPSEPJ.js.map → chunk-6FUWODBV.js.map} +0 -0
- /package/dist/{chunk-34O2GH4J.js.map → chunk-AAL5WIXB.js.map} +0 -0
- /package/dist/{chunk-XJEBJZLX.js.map → chunk-BKTKJNCR.js.map} +0 -0
- /package/dist/{chunk-YFJVQOWI.js.map → chunk-DACZSUCN.js.map} +0 -0
- /package/dist/{chunk-IGLJXEXX.js.map → chunk-DS2ZIVIH.js.map} +0 -0
- /package/dist/{chunk-RRGC6Y4L.js.map → chunk-EH7Y2W77.js.map} +0 -0
- /package/dist/{chunk-6MU3OEII.js.map → chunk-EI3TZ52P.js.map} +0 -0
- /package/dist/{chunk-S3XUIVC2.js.map → chunk-FEXG2PKQ.js.map} +0 -0
- /package/dist/{chunk-RQKLUGMS.js.map → chunk-GLYBXXO7.js.map} +0 -0
- /package/dist/{chunk-OTCMYGQR.js.map → chunk-H5XBQWAI.js.map} +0 -0
- /package/dist/{chunk-BWBTNBPS.js.map → chunk-HNA4BW47.js.map} +0 -0
- /package/dist/{chunk-3NMBTBNW.js.map → chunk-KHKG7H6Q.js.map} +0 -0
- /package/dist/{chunk-FRTU3ICQ.js.map → chunk-MQV3IU6F.js.map} +0 -0
- /package/dist/{chunk-CKHLBNMN.js.map → chunk-N56EHPTR.js.map} +0 -0
- /package/dist/{chunk-AS4NDKUJ.js.map → chunk-OYXB6KZX.js.map} +0 -0
- /package/dist/{chunk-YOMLHG33.js.map → chunk-Q7ZPW55P.js.map} +0 -0
- /package/dist/{chunk-KTGTKOLV.js.map → chunk-TDZDIDFG.js.map} +0 -0
- /package/dist/{chunk-L3CWRXKQ.js.map → chunk-Z2NYUCTE.js.map} +0 -0
- /package/dist/{client-N5YTG2K6.js.map → client-5USANRIL.js.map} +0 -0
- /package/dist/{config-WUB5SJPH.js.map → config-N7DHUZMH.js.map} +0 -0
- /package/dist/{config-mutate-ZLPUEIVN.js.map → config-mutate-OVUXNS5X.js.map} +0 -0
- /package/dist/{config-mutator-S5X4DOJK.js.map → config-mutator-OK7CDCHW.js.map} +0 -0
- /package/dist/{contributions-C4DKQJY6.js.map → contributions-LTDE6UOQ.js.map} +0 -0
- /package/dist/{doctor-ND3OS575.js.map → doctor-C3DTKR7C.js.map} +0 -0
- /package/dist/{follow-up-tool-TWOEAWOL.js.map → follow-up-tool-NCFOTJ5Y.js.map} +0 -0
- /package/dist/{hub-FUM7UY5S.js.map → hub-F3X7NL4B.js.map} +0 -0
- /package/dist/{promote-M5AJSWHZ.js.map → promote-FSOPSHJ4.js.map} +0 -0
- /package/dist/{query-NPDKXBTN.js.map → query-UDRKDTSB.js.map} +0 -0
- /package/dist/{registry-A2FFL4EA.js.map → query-runs-AENEZOM6.js.map} +0 -0
- /package/dist/{query-settings-HXKZYIEV.js.map → query-settings-DJGEGG62.js.map} +0 -0
- /package/dist/{routing-2KWP5TAT.js.map → registry-AVGT5KPR.js.map} +0 -0
- /package/dist/{request-planner-ANGZP4JL.js.map → request-planner-SAQX26AR.js.map} +0 -0
- /package/dist/{review-candidates-B7T2QA3R.js.map → review-candidates-67MPNU42.js.map} +0 -0
- /package/dist/{schedule-tool-2UNMXEBQ.js.map → routing-7DUO5PI7.js.map} +0 -0
- /package/dist/{scheduler-VN7WDAKE.js.map → schedule-tool-LZOW5SVQ.js.map} +0 -0
- /package/dist/{seat-MAC3QGGD.js.map → scheduler-3IADVHIN.js.map} +0 -0
- /package/dist/{self-SO6GCVYD.js.map → seat-YWSYQBCW.js.map} +0 -0
- /package/dist/{select-UYKEN4N4.js.map → select-PA7AHZ3W.js.map} +0 -0
- /package/dist/{wiki-ZAHFGDKE.js.map → self-KACQLLDA.js.map} +0 -0
- /package/dist/{set-enabled-JEUIINT3.js.map → set-enabled-DD6L2ZQ6.js.map} +0 -0
- /package/dist/{sprint-tool-MB2MPR4K.js.map → sprint-tool-PKJA6LYF.js.map} +0 -0
- /package/dist/{tool-L4CQCPRF.js.map → tool-KOGZBOCR.js.map} +0 -0
- /package/dist/{tool-SZ6C6EBP.js.map → tool-WJ72TBMV.js.map} +0 -0
- /package/dist/{wiki-enrich-QLCQHV6B.js.map → wiki-HQBMWH23.js.map} +0 -0
|
@@ -1,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-
|
|
2
|
-
//# sourceMappingURL=promote-
|
|
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-52NME3AU.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-MEFPXHQJ.js";import"./chunk-MQV3IU6F.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-HNA4BW47.js";import"./chunk-WPNRDEHW.js";import"./chunk-KHKG7H6Q.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-AHWWJ7AF.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{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-FSOPSHJ4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=query-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j}from"./chunk-GLYBXXO7.js";import"./chunk-JTFCU5LH.js";import"./chunk-HNA4BW47.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-KHKG7H6Q.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QUFIUXMQ.js";import"./chunk-BERWTVG2.js";import"./chunk-AHWWJ7AF.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{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-UDRKDTSB.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g}from"./chunk-HPRLRD4P.js";import"./chunk-QIJLFPWE.js";export{a as QUERY_RUNS_FILE,b as QUERY_RUNS_MAX_BYTES,d as appendCappedLine,c as queryFailed,e as recordQueryRun,g as summariseQueryRuns,f as timedQuery};
|
|
2
|
+
//# sourceMappingURL=query-runs-AENEZOM6.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-
|
|
3
|
-
//# sourceMappingURL=query-settings-
|
|
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-N7DHUZMH.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-DJGEGG62.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Aa as m,Ba as n,Ca as o,Da as p,oa as a,pa as b,qa as c,ra as d,sa as e,ta as f,ua as g,va as h,wa as i,xa as j,ya as k,za as l}from"./chunk-22WO5X4L.js";import"./chunk-VK2TW3RL.js";import"./chunk-MEFPXHQJ.js";import"./chunk-MQRAQJSS.js";import"./chunk-GV7S5BAX.js";import"./chunk-SZDACK6O.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-VJVXEVZ7.js";import"./chunk-JGZ6CA5L.js";import"./chunk-DACZSUCN.js";import"./chunk-3UOTLMXD.js";import"./chunk-VWTBHLMX.js";import"./chunk-BE64IJWM.js";import"./chunk-5ONH4ITT.js";import"./chunk-JRAG37V5.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GSX4NK2N.js";import"./chunk-HPRLRD4P.js";import"./chunk-EI3TZ52P.js";import"./chunk-MQV3IU6F.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-GLYBXXO7.js";import"./chunk-JTFCU5LH.js";import"./chunk-HNA4BW47.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-AAL5WIXB.js";import"./chunk-KHKG7H6Q.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-QUFIUXMQ.js";import"./chunk-AV7T3SYT.js";import"./chunk-2HBEZV7L.js";import"./chunk-A7JSRDJL.js";import"./chunk-BERWTVG2.js";import"./chunk-AHWWJ7AF.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-DSYKYZMT.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{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-AVGT5KPR.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-
|
|
1
|
+
import{p as f,s as h,v as g,y as m,z as E}from"./chunk-KHKG7H6Q.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-6ZAQ3IT5.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-
|
|
6
|
+
//# sourceMappingURL=request-planner-SAQX26AR.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as I}from"./chunk-
|
|
1
|
+
import{b as I}from"./chunk-FEXG2PKQ.js";import"./chunk-VJVXEVZ7.js";import"./chunk-KHKG7H6Q.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-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";import{createHash as 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-
|
|
4
|
+
//# sourceMappingURL=review-candidates-67MPNU42.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=routing-
|
|
1
|
+
import{a,b,c,d,e,f}from"./chunk-AAL5WIXB.js";import"./chunk-KHKG7H6Q.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{e as DEFAULT_TRIAGE_ACTIONS,a as DOWNGRADE_BELOW,b as channelKeepsConfiguredModel,c as cheapModelForEngine,d as routeTaskModel,f as triageModelFor};
|
|
2
|
+
//# sourceMappingURL=routing-7DUO5PI7.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b}from"./chunk-Q7ZPW55P.js";import"./chunk-RKPAVWXF.js";import"./chunk-H5XBQWAI.js";import"./chunk-JGZ6CA5L.js";import"./chunk-DACZSUCN.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";export{b as resolveScheduleCaller,a as runScheduleTool};
|
|
2
|
+
//# sourceMappingURL=schedule-tool-LZOW5SVQ.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-
|
|
2
|
-
//# sourceMappingURL=scheduler-
|
|
1
|
+
import{o as a,p as b,q as c,r as d,s as e,t as f}from"./chunk-JGZ6CA5L.js";import"./chunk-DACZSUCN.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";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-3IADVHIN.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-
|
|
2
|
-
//# sourceMappingURL=seat-
|
|
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-KHKG7H6Q.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";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-YWSYQBCW.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{y as S,z as w}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=select-
|
|
1
|
+
import{y as S,z as w}from"./chunk-KHKG7H6Q.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-6ZAQ3IT5.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-PA7AHZ3W.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=set-enabled-
|
|
1
|
+
import{b as a}from"./chunk-DACZSUCN.js";import"./chunk-6ZAQ3IT5.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-DD6L2ZQ6.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{b as $}from"./chunk-
|
|
1
|
+
import{b as $}from"./chunk-Q7ZPW55P.js";import"./chunk-RKPAVWXF.js";import"./chunk-H5XBQWAI.js";import{b as p}from"./chunk-AJ5HMDRW.js";import"./chunk-KP7KDLZ2.js";import"./chunk-JGZ6CA5L.js";import"./chunk-DACZSUCN.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var 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-
|
|
7
|
+
//# sourceMappingURL=sprint-tool-PKJA6LYF.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as $}from"./chunk-
|
|
1
|
+
import{b as $}from"./chunk-Q7ZPW55P.js";import"./chunk-RKPAVWXF.js";import{h as m}from"./chunk-RX5O5637.js";import"./chunk-H5XBQWAI.js";import"./chunk-JGZ6CA5L.js";import"./chunk-DACZSUCN.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var 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-
|
|
4
|
+
//# sourceMappingURL=tool-KOGZBOCR.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{b as m}from"./chunk-Q7ZPW55P.js";import"./chunk-RKPAVWXF.js";import{f as g}from"./chunk-UOYIC7XN.js";import{d as f,e as p}from"./chunk-QPABR72X.js";import"./chunk-H5XBQWAI.js";import{b as w}from"./chunk-AJ5HMDRW.js";import"./chunk-KP7KDLZ2.js";import"./chunk-JGZ6CA5L.js";import"./chunk-DACZSUCN.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var q=45e3,T=t=>typeof t=="string"?t.trim():"",v={in_progress:"in progress",waiting_owner:"waiting on the owner",waiting_other:"waiting on another agent",needs_attention:"needs attention"};function k(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}`:""}.`:"",f(e)?" Awaiting QA.":e.qa?` QA: ${p(e.qa)}.`:"",e.goal?` Goal: ${e.goal.title} (${e.goal.id}).`:""].join("");return`- ${e.id} [${v[e.state]??e.state}] ${a} UTC, ${e.channel}, ${e.agentId}: ${o.length>160?`${o.slice(0,159)}\u2026`:o}.${d}${c}`}).join(`
|
|
2
|
+
`):"No open requests."}function S(t){return`$${t>0&&t<.01?t.toFixed(3):t.toFixed(2)}`}function b(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 ${S(e.costUsd)}${d}.`}).join(`
|
|
3
|
+
`):"No request names a goal."}function y(t){return(t??[]).map(e=>`${e.idx}. ${e.name} (${e.agentId}, ${e.kind}) [${e.state}]${e.needsApproval?` approval: ${e.approval}`:""}`)}async function _(t,e){let a=e.fetch??fetch,d=e.daemonUrl.replace(/\/$/,""),o=(T(t.action)||"list").toLowerCase();try{if(o==="goals"){let i=await a(`${d}/requests/goals`,{signal:AbortSignal.timeout(1e4)}),s=await i.json().catch(()=>({}));return i.ok?`${s.count} goal${s.count===1?"":"s"}, most recently active first.
|
|
4
|
+
${b(s.goals??[])}`:`Error: ${s?.error||`HTTP ${i.status}`}`}if(o==="flow"){let i=typeof t.days=="number"?`?days=${Math.floor(t.days)}`:"",s=await a(`${d}/requests/flow${i}`,{signal:AbortSignal.timeout(1e4)}),u=await s.json().catch(()=>({}));return s.ok?u.enabled?g(u):"Requests are turned off on this node (requests.enabled), so nothing is recorded.":`Error: ${u?.error||`HTTP ${s.status}`}`}if(o==="list"){let i=await a(`${d}/requests`,{signal:AbortSignal.timeout(1e4)}),s=await i.json().catch(()=>({}));return i.ok?s.enabled?`${s.count} open request${s.count===1?"":"s"}, oldest first.
|
|
5
|
+
${k(s.items??[])}`:"Requests are turned off on this node (requests.enabled), so nothing is recorded.":`Error: ${s?.error||`HTTP ${i.status}`}`}let c=e.env??process.env,$=m(t,c);if(!$)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=await a(`${d}/requests`,{method:"POST",headers:{"Content-Type":"application/json",...w(c)},body:JSON.stringify({action:o,agentId:$.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"?q:1e4)}),r=await l.json().catch(()=>({}));if(!l.ok)return`Error: ${r?.error||`HTTP ${l.status}`}`;let n=r.request,h=n.goal?` It serves the goal "${n.goal.title}" (${n.goal.id}).`:"";if(o==="accept"&&r.plan)return[`Request ${n.id} is open with a plan of ${r.steps.length} steps.${h} 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.`,...y(r.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
|
+
`);if(o==="step")return[`Step reported. Plan of ${n.id}:`,...y(r.steps)].join(`
|
|
7
|
+
`);if(o==="qa")return`Verdict recorded on ${n.id}: ${p(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.${h} 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"&&r.verify==="unverified")return`Request ${n.id} stays open: its check could not say whether it is finished (${r.detail}). It is marked unverified; the daemon checks again, and the owner can close it by hand.`;if(o==="done"){let i=n.factId?` It left fact ${n.factId} in the wiki (agentx wiki facts show ${n.factId}).`:"";return`Request ${n.id} is closed as done${r.verified?" (its check was met)":""}. Evidence: ${n.evidence}${i}`}return`Request ${n.id} is closed as declined. Reason: ${n.closeReason}`}catch(c){return`Error: couldn't reach the daemon (${c?.message??c}).`}}export{q as DONE_TIMEOUT_MS,b as describeGoals,k as describeOpen,y as describeSteps,_ as runRequestTool,S as usd};
|
|
8
|
+
//# sourceMappingURL=tool-PJSLWK45.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/requests/tool.ts"],"sourcesContent":["import { resolveScheduleCaller } from \"@/crons/schedule-tool\"\nimport { callerHeaders } from \"@/calls/service\"\nimport { awaitingQa, describeQa } from \"./qa\"\nimport type { GoalSummary } from \"./goals\"\nimport { describeFlow } from \"./flow\"\n\n// --- Agent-facing `agentx_request` tool (#356) ---\n//\n// Lets an agent say what it is doing with the owner's request, so the\n// request stays visible until it is closed:\n// accept I am taking this on; keep it open after this turn. With\n// `steps` (two or more): a tracked plan the daemon follows (#788).\n// `work` and `estimateMinutes` say what it is: code work or a\n// long estimate is refused without steps (#1048). `goal`\n// names the goal it serves (#1168)\n// step report on one step of a plan: progress, done, blocked\n// wait the next step is the owner's answer to this question\n// done finished, with a link to the evidence, or a typed proof\n// (link, test, output, check; #1138 D). On a loop with a\n// closeWhen the daemon runs its check first (#1039). A promise\n// closed with a proof leaves a dated wiki fact\n// decline I will not do it, with the reason\n// promise I owe someone something (owedTo, text, due, closeWhen):\n// an open loop of its own, listed with the open requests\n// describe what it is (headline) and what is needed from the owner\n// (need), for every card, push and Desk line (#1126). accept,\n// wait and promise take the two as well\n// qa a QA verdict on a request (#1188): block, risk or pass, with\n// a note. accept, wait, promise and describe take needsQa to\n// ask for one\n// list what is still open\n// goals every goal requests name: progress and cost (#1168)\n// flow the daily flow rate: today's, then one line per day (#1542)\n// It talks to the daemon's /requests endpoints. Dropping a request is the\n// owner's alone; there is no action for it here.\n\nexport interface RequestToolDeps {\n daemonUrl: string\n fetch?: typeof fetch\n env?: NodeJS.ProcessEnv\n}\n\n/** A done on a loop with a check waits for it: the slowest is an issue\n * check, three forge calls of up to 10 s each. */\nexport const DONE_TIMEOUT_MS = 45_000\n\nconst str = (v: unknown) => (typeof v === \"string\" ? v.trim() : \"\")\n\nconst STATE_WORDS: Record<string, string> = {\n in_progress: \"in progress\",\n waiting_owner: \"waiting on the owner\",\n waiting_other: \"waiting on another agent\",\n needs_attention: \"needs attention\",\n}\n\n/** One line per open request, oldest first. */\nexport function describeOpen(items: any[]): string {\n if (!items.length) return \"No open requests.\"\n return items.map((r) => {\n const when = new Date(r.createdAt).toISOString().slice(0, 16).replace(\"T\", \" \")\n const extra = r.state === \"waiting_owner\" && r.question ? ` Question: ${r.question}`\n : r.state === \"needs_attention\" && r.attentionReason ? ` ${r.attentionReason}` : \"\"\n const words = String(r.text).replace(/\\s+/g, \" \").trim()\n const loop = [\n r.promise && r.owedTo ? ` Promised to ${r.owedTo}.` : \"\",\n r.dueAt ? ` Due ${new Date(r.dueAt).toISOString().slice(0, 16).replace(\"T\", \" \")} UTC.` : \"\",\n r.closeWhen ? ` Closes on its check (${r.closeWhen.kind})${r.verifyState ? `: ${r.verifyState}` : \"\"}.` : \"\",\n awaitingQa(r) ? \" Awaiting QA.\" : r.qa ? ` QA: ${describeQa(r.qa)}.` : \"\",\n r.goal ? ` Goal: ${r.goal.title} (${r.goal.id}).` : \"\",\n ].join(\"\")\n return `- ${r.id} [${STATE_WORDS[r.state] ?? r.state}] ${when} UTC, ${r.channel}, ${r.agentId}: ${words.length > 160 ? `${words.slice(0, 159)}…` : words}.${extra}${loop}`\n }).join(\"\\n\")\n}\n\n/** Dollars, to the cent; under a cent, to the tenth of one. */\nexport function usd(n: number): string {\n return `$${n > 0 && n < 0.01 ? n.toFixed(3) : n.toFixed(2)}`\n}\n\n/** One line per goal, most recently active first (#1168). */\nexport function describeGoals(goals: GoalSummary[]): string {\n if (!goals.length) return \"No request names a goal.\"\n return goals.map((g) => {\n const far = g.progress === null ? \"nothing open or done\" : `${Math.round(g.progress * 100)}% done`\n const unpriced = g.unpriced ? `, ${g.unpriced} of ${g.runs} runs without a cost` : \"\"\n return `- ${g.id} \"${g.title}\": ${g.open} open, ${g.done} done${g.dropped ? `, ${g.dropped} declined or dropped` : \"\"} (${far}). Cost ${usd(g.costUsd)}${unpriced}.`\n }).join(\"\\n\")\n}\n\n/** One line per plan step. */\nexport function describeSteps(steps: any[]): string[] {\n return (steps ?? []).map((s) => `${s.idx}. ${s.name} (${s.agentId}, ${s.kind}) [${s.state}]${s.needsApproval ? ` approval: ${s.approval}` : \"\"}`)\n}\n\n/** Returns the text the agent sees. Every refusal is text, never a throw. */\nexport async function runRequestTool(args: Record<string, unknown>, deps: RequestToolDeps): Promise<string> {\n const doFetch = deps.fetch ?? fetch\n const base = deps.daemonUrl.replace(/\\/$/, \"\")\n const action = (str(args.action) || \"list\").toLowerCase()\n\n try {\n if (action === \"goals\") {\n const res = await doFetch(`${base}/requests/goals`, { signal: AbortSignal.timeout(10_000) })\n const data = await res.json().catch(() => ({})) as any\n if (!res.ok) return `Error: ${data?.error || `HTTP ${res.status}`}`\n return `${data.count} goal${data.count === 1 ? \"\" : \"s\"}, most recently active first.\\n${describeGoals(data.goals ?? [])}`\n }\n\n if (action === \"flow\") {\n const days = typeof args.days === \"number\" ? `?days=${Math.floor(args.days)}` : \"\"\n const res = await doFetch(`${base}/requests/flow${days}`, { signal: AbortSignal.timeout(10_000) })\n const data = await res.json().catch(() => ({})) as any\n if (!res.ok) return `Error: ${data?.error || `HTTP ${res.status}`}`\n if (!data.enabled) return \"Requests are turned off on this node (requests.enabled), so nothing is recorded.\"\n return describeFlow(data)\n }\n\n if (action === \"list\") {\n const res = await doFetch(`${base}/requests`, { signal: AbortSignal.timeout(10_000) })\n const data = await res.json().catch(() => ({})) as any\n if (!res.ok) return `Error: ${data?.error || `HTTP ${res.status}`}`\n if (!data.enabled) return \"Requests are turned off on this node (requests.enabled), so nothing is recorded.\"\n return `${data.count} open request${data.count === 1 ? \"\" : \"s\"}, oldest first.\\n${describeOpen(data.items ?? [])}`\n }\n\n const env = deps.env ?? process.env\n const caller = resolveScheduleCaller(args, env)\n if (!caller) return \"Error: couldn't tell which agent you are. Pass callerAgentId.\"\n const res = await doFetch(`${base}/requests`, {\n method: \"POST\",\n // The headers name this run: the daemon refuses a write that does\n // not come from a running turn of the agent.\n headers: { \"Content-Type\": \"application/json\", ...callerHeaders(env) },\n body: JSON.stringify({\n action, agentId: caller.agentId,\n id: args.id, question: args.question, evidence: args.evidence, proof: args.proof, reason: args.reason,\n steps: args.steps, work: args.work, estimateMinutes: args.estimateMinutes, step: args.step, status: args.status, note: args.note, home: args.home,\n owedTo: args.owedTo, text: args.text, due: args.due, closeWhen: args.closeWhen,\n headline: args.headline, need: args.need, needsQa: args.needsQa, verdict: args.verdict, goal: args.goal,\n }),\n signal: AbortSignal.timeout(action === \"done\" ? DONE_TIMEOUT_MS : 10_000),\n })\n const data = await res.json().catch(() => ({})) as any\n if (!res.ok) return `Error: ${data?.error || `HTTP ${res.status}`}`\n const r = data.request\n const serves = r.goal ? ` It serves the goal \"${r.goal.title}\" (${r.goal.id}).` : \"\"\n if (action === \"accept\" && data.plan) {\n return [\n `Request ${r.id} is open with a plan of ${data.steps.length} steps.${serves} 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.`,\n ...describeSteps(data.steps),\n `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:\"${r.id}\", step:<n>, status:\"progress\"|\"done\"|\"blocked\"}.`,\n ].join(\"\\n\")\n }\n if (action === \"step\") return [`Step reported. Plan of ${r.id}:`, ...describeSteps(data.steps)].join(\"\\n\")\n if (action === \"qa\") return `Verdict recorded on ${r.id}: ${describeQa(r.qa)}. It shows on the request's card; nobody is told.`\n if (action === \"describe\") return `Request ${r.id} now reads \"${r.headline ?? \"(no headline)\"}\" on the owner's cards. Needed from them: ${r.need ?? \"what follows from where it stands\"}.`\n if (action === \"accept\") return `Request ${r.id} is open and in progress.${serves} 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 if (action === \"wait\") return `Request ${r.id} is waiting on the owner with your question. Ask them the question now, once.`\n if (action === \"promise\") {\n return `Promise ${r.id} is open, owed to ${r.owedTo}${r.dueAt ? `, due ${new Date(r.dueAt).toISOString().slice(0, 16).replace(\"T\", \" \")} UTC` : \"\"}. ` +\n (r.closeWhen ? \"The daemon checks its evidence and closes it once the check is met.\" : `Close it with {action:\"done\", id:\"${r.id}\", evidence:\"<link>\"} when it is kept.`)\n }\n if (action === \"done\" && data.verify === \"unverified\") {\n return `Request ${r.id} stays open: its check could not say whether it is finished (${data.detail}). It is marked unverified; the daemon checks again, and the owner can close it by hand.`\n }\n if (action === \"done\") {\n const fact = r.factId ? ` It left fact ${r.factId} in the wiki (agentx wiki facts show ${r.factId}).` : \"\"\n return `Request ${r.id} is closed as done${data.verified ? \" (its check was met)\" : \"\"}. Evidence: ${r.evidence}${fact}`\n }\n return `Request ${r.id} is closed as declined. Reason: ${r.closeReason}`\n } catch (e: any) {\n return `Error: couldn't reach the daemon (${e?.message ?? e}).`\n }\n}\n"],"mappings":"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","names":["DONE_TIMEOUT_MS","str","v","STATE_WORDS","describeOpen","items","r","when","extra","words","loop","awaitingQa","describeQa","usd","n","describeGoals","goals","g","far","unpriced","describeSteps","steps","s","runRequestTool","args","deps","doFetch","base","action","res","data","days","describeFlow","env","caller","resolveScheduleCaller","callerHeaders","serves","fact","e"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as f}from"./chunk-
|
|
1
|
+
import{b as f}from"./chunk-Q7ZPW55P.js";import"./chunk-RKPAVWXF.js";import{g as y}from"./chunk-MNG2AMKZ.js";import"./chunk-H5XBQWAI.js";import{b as u}from"./chunk-AJ5HMDRW.js";import"./chunk-KP7KDLZ2.js";import"./chunk-JGZ6CA5L.js";import"./chunk-DACZSUCN.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";var 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-
|
|
4
|
+
//# sourceMappingURL=tool-WJ72TBMV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-VWTBHLMX.js";import{a as b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=wiki-
|
|
1
|
+
import"./chunk-VWTBHLMX.js";import{a as b}from"./chunk-EI3TZ52P.js";import{a}from"./chunk-MQV3IU6F.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import{d as c}from"./chunk-GLYBXXO7.js";import"./chunk-JTFCU5LH.js";import"./chunk-HNA4BW47.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-KHKG7H6Q.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QUFIUXMQ.js";import"./chunk-BERWTVG2.js";import"./chunk-AHWWJ7AF.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-6ZAQ3IT5.js";import"./chunk-VJ5HC63R.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as WikiHub,a as WikiStore,c as agenticQuery};
|
|
2
|
+
//# sourceMappingURL=wiki-HQBMWH23.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentix-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.193.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": {
|