agentix-cli 0.170.0 → 0.171.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-BT67QQ5H.js → App-56QIEQGH.js} +2 -2
- package/dist/{ChatApp-64WRBUKX.js → ChatApp-JNWIXMDN.js} +2 -2
- package/dist/{absorb-eval-IHNCDJTM.js → absorb-eval-BYYFZJCC.js} +2 -2
- package/dist/{adapter-URLHEV3F.js → adapter-YQ37MDPV.js} +2 -2
- package/dist/{agent-Q73VAOJR.js → agent-2SQYGIUD.js} +2 -2
- package/dist/{board-dashboard-VZYUXVP6.js → board-dashboard-QFCOFP7F.js} +461 -346
- package/dist/board-dashboard-QFCOFP7F.js.map +1 -0
- package/dist/{chunk-7TEJJM24.js → chunk-2BJ7NIGG.js} +2 -2
- package/dist/{chunk-JXGREJDJ.js → chunk-35I76HQS.js} +2 -2
- package/dist/{chunk-E7VJU7FI.js → chunk-35R7Y7BT.js} +2 -2
- package/dist/{chunk-GKE7IP3T.js → chunk-5KVTIFRY.js} +2 -2
- package/dist/{chunk-XGREDHJY.js → chunk-74RXD676.js} +2 -2
- package/dist/{chunk-OJ2XT27M.js → chunk-AQGQLVCD.js} +2 -2
- package/dist/{chunk-FWT23FGY.js → chunk-BAAKV4HK.js} +69 -69
- package/dist/chunk-BAAKV4HK.js.map +1 -0
- package/dist/{chunk-AU3VT7BD.js → chunk-DMCMV4UJ.js} +2 -2
- package/dist/{chunk-6JKFJM2D.js → chunk-DOBTHQ32.js} +2 -2
- package/dist/{chunk-EYC5DJR2.js → chunk-ES236GV6.js} +2 -2
- package/dist/{chunk-RE5XFWBY.js → chunk-FBNU7MMW.js} +94 -94
- package/dist/chunk-FBNU7MMW.js.map +1 -0
- package/dist/{chunk-CLH4QJAO.js → chunk-FOTAGQEL.js} +2 -2
- package/dist/{chunk-I4VNUTLL.js → chunk-GALI5ANI.js} +3 -3
- package/dist/{chunk-FAU6WDVT.js → chunk-HZXLZIB4.js} +2 -2
- package/dist/{chunk-3Y6QTM4Z.js → chunk-IPHFWU2F.js} +2 -2
- package/dist/{chunk-SEQXJWSD.js → chunk-KE3KLMMK.js} +2 -2
- package/dist/{chunk-OV77U4GH.js → chunk-LB55Q3K4.js} +2 -2
- package/dist/{chunk-AKL5ZKJO.js → chunk-LXRLD4VQ.js} +2 -2
- package/dist/{chunk-AKL5ZKJO.js.map → chunk-LXRLD4VQ.js.map} +1 -1
- package/dist/{chunk-CX6HUPUZ.js → chunk-MY7C6E4Y.js} +2 -2
- package/dist/{chunk-VUEQ4SL5.js → chunk-N6VBEITO.js} +2 -2
- package/dist/chunk-N6VBEITO.js.map +1 -0
- package/dist/{chunk-U5P7VICU.js → chunk-NGGEGY5K.js} +2 -2
- package/dist/chunk-NGGEGY5K.js.map +1 -0
- package/dist/{chunk-5P5TRMTT.js → chunk-NR5IZJYS.js} +2 -2
- package/dist/{chunk-OMD44DQ6.js → chunk-P3GQPEMU.js} +36 -35
- package/dist/chunk-P3GQPEMU.js.map +1 -0
- package/dist/{chunk-FP4DT6D5.js → chunk-TAUXWIYB.js} +2 -2
- package/dist/{chunk-WWH3SKMB.js → chunk-TB3ZEMTC.js} +2 -2
- package/dist/{chunk-CQBWWH2B.js → chunk-WO4XKOMM.js} +2 -2
- package/dist/{chunk-K4HQYC5M.js → chunk-WVPFWUR2.js} +2 -2
- package/dist/{chunk-IZDFUFAQ.js → chunk-XCYGF4RB.js} +2 -2
- package/dist/{chunk-7JX766OQ.js → chunk-XUT4RBU6.js} +2 -2
- package/dist/{chunk-4BVISFOC.js → chunk-YE3MGLJF.js} +8 -8
- package/dist/{chunk-4BVISFOC.js.map → chunk-YE3MGLJF.js.map} +1 -1
- package/dist/{chunk-CWYCCQ57.js → chunk-YLQZFV6Y.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{client-WPOAEQSW.js → client-LP4PURY2.js} +2 -2
- package/dist/{config-7MCC4L7E.js → config-IBOY7BGF.js} +2 -2
- package/dist/{config-mutate-GLF2MEW4.js → config-mutate-PETOQADF.js} +2 -2
- package/dist/config-mutator-2NLZ37LL.js +2 -0
- package/dist/{contributions-A3JV2JW6.js → contributions-NQ3OQ4O4.js} +2 -2
- package/dist/{doctor-XWGGS3MM.js → doctor-AMX2GRRN.js} +2 -2
- package/dist/{follow-up-tool-TPR3BCCK.js → follow-up-tool-3XSPNZKM.js} +2 -2
- package/dist/{hub-RBVAC7NA.js → hub-DRCMPJMQ.js} +2 -2
- package/dist/index.d.ts +314 -42
- package/dist/index.js +1 -1
- package/dist/processes-EWARF6ZW.js +2 -0
- package/dist/{program-OBTSSEUB.js → program-O3BJYC47.js} +249 -249
- package/dist/program-O3BJYC47.js.map +1 -0
- package/dist/{promote-KMDLBVCS.js → promote-4F2H3WEB.js} +2 -2
- package/dist/{query-PC2V2M2H.js → query-25FU55U6.js} +2 -2
- package/dist/{query-settings-FK5QR7MM.js → query-settings-5BLTPQQQ.js} +2 -2
- package/dist/{registry-TDZCAQAS.js → registry-MXZBIPE5.js} +2 -2
- package/dist/{request-planner-OYY36H2K.js → request-planner-7JLFVL6Y.js} +2 -2
- package/dist/{review-candidates-STVUGCVM.js → review-candidates-MHIKLDT7.js} +2 -2
- package/dist/{routing-SHHD6M67.js → routing-ZSGWR6ID.js} +2 -2
- package/dist/schedule-tool-2VI5IWZD.js +2 -0
- package/dist/{scheduler-CIOGE7UG.js → scheduler-J6BGTTMH.js} +2 -2
- package/dist/{seat-LWJS5BKD.js → seat-WUEQNCSG.js} +2 -2
- package/dist/{select-VYBDUP4R.js → select-ASFYQYDU.js} +2 -2
- package/dist/{set-enabled-KBLEBANS.js → set-enabled-6NIDVEZF.js} +2 -2
- package/dist/{sprint-tool-TCASE2O7.js → sprint-tool-APMWCQF3.js} +2 -2
- package/dist/{tool-LSDMU5OX.js → tool-2CKQKDU5.js} +2 -2
- package/dist/{tool-YMWIUVOK.js → tool-JPSOIPZZ.js} +2 -2
- package/dist/{tool-RQX6IEY7.js → tool-MKUGBNSW.js} +2 -2
- package/dist/{wiki-IIAPP6RU.js → wiki-JR6U5PSV.js} +2 -2
- package/dist/wiki-enrich-KFVPA2JG.js +2 -0
- package/package.json +1 -1
- package/dist/board-dashboard-VZYUXVP6.js.map +0 -1
- package/dist/chunk-FWT23FGY.js.map +0 -1
- package/dist/chunk-OMD44DQ6.js.map +0 -1
- package/dist/chunk-RE5XFWBY.js.map +0 -1
- package/dist/chunk-U5P7VICU.js.map +0 -1
- package/dist/chunk-VUEQ4SL5.js.map +0 -1
- package/dist/config-mutator-KWUDF36N.js +0 -2
- package/dist/processes-QZWODHBX.js +0 -2
- package/dist/program-OBTSSEUB.js.map +0 -1
- package/dist/schedule-tool-O6OIDKNV.js +0 -2
- package/dist/wiki-enrich-HNC76QED.js +0 -2
- /package/dist/{App-BT67QQ5H.js.map → App-56QIEQGH.js.map} +0 -0
- /package/dist/{ChatApp-64WRBUKX.js.map → ChatApp-JNWIXMDN.js.map} +0 -0
- /package/dist/{absorb-eval-IHNCDJTM.js.map → absorb-eval-BYYFZJCC.js.map} +0 -0
- /package/dist/{adapter-URLHEV3F.js.map → adapter-YQ37MDPV.js.map} +0 -0
- /package/dist/{agent-Q73VAOJR.js.map → agent-2SQYGIUD.js.map} +0 -0
- /package/dist/{chunk-7TEJJM24.js.map → chunk-2BJ7NIGG.js.map} +0 -0
- /package/dist/{chunk-JXGREJDJ.js.map → chunk-35I76HQS.js.map} +0 -0
- /package/dist/{chunk-E7VJU7FI.js.map → chunk-35R7Y7BT.js.map} +0 -0
- /package/dist/{chunk-GKE7IP3T.js.map → chunk-5KVTIFRY.js.map} +0 -0
- /package/dist/{chunk-XGREDHJY.js.map → chunk-74RXD676.js.map} +0 -0
- /package/dist/{chunk-OJ2XT27M.js.map → chunk-AQGQLVCD.js.map} +0 -0
- /package/dist/{chunk-AU3VT7BD.js.map → chunk-DMCMV4UJ.js.map} +0 -0
- /package/dist/{chunk-6JKFJM2D.js.map → chunk-DOBTHQ32.js.map} +0 -0
- /package/dist/{chunk-EYC5DJR2.js.map → chunk-ES236GV6.js.map} +0 -0
- /package/dist/{chunk-CLH4QJAO.js.map → chunk-FOTAGQEL.js.map} +0 -0
- /package/dist/{chunk-I4VNUTLL.js.map → chunk-GALI5ANI.js.map} +0 -0
- /package/dist/{chunk-FAU6WDVT.js.map → chunk-HZXLZIB4.js.map} +0 -0
- /package/dist/{chunk-3Y6QTM4Z.js.map → chunk-IPHFWU2F.js.map} +0 -0
- /package/dist/{chunk-SEQXJWSD.js.map → chunk-KE3KLMMK.js.map} +0 -0
- /package/dist/{chunk-OV77U4GH.js.map → chunk-LB55Q3K4.js.map} +0 -0
- /package/dist/{chunk-CX6HUPUZ.js.map → chunk-MY7C6E4Y.js.map} +0 -0
- /package/dist/{chunk-5P5TRMTT.js.map → chunk-NR5IZJYS.js.map} +0 -0
- /package/dist/{chunk-FP4DT6D5.js.map → chunk-TAUXWIYB.js.map} +0 -0
- /package/dist/{chunk-WWH3SKMB.js.map → chunk-TB3ZEMTC.js.map} +0 -0
- /package/dist/{chunk-CQBWWH2B.js.map → chunk-WO4XKOMM.js.map} +0 -0
- /package/dist/{chunk-K4HQYC5M.js.map → chunk-WVPFWUR2.js.map} +0 -0
- /package/dist/{chunk-IZDFUFAQ.js.map → chunk-XCYGF4RB.js.map} +0 -0
- /package/dist/{chunk-7JX766OQ.js.map → chunk-XUT4RBU6.js.map} +0 -0
- /package/dist/{chunk-CWYCCQ57.js.map → chunk-YLQZFV6Y.js.map} +0 -0
- /package/dist/{client-WPOAEQSW.js.map → client-LP4PURY2.js.map} +0 -0
- /package/dist/{config-7MCC4L7E.js.map → config-IBOY7BGF.js.map} +0 -0
- /package/dist/{config-mutate-GLF2MEW4.js.map → config-mutate-PETOQADF.js.map} +0 -0
- /package/dist/{config-mutator-KWUDF36N.js.map → config-mutator-2NLZ37LL.js.map} +0 -0
- /package/dist/{contributions-A3JV2JW6.js.map → contributions-NQ3OQ4O4.js.map} +0 -0
- /package/dist/{doctor-XWGGS3MM.js.map → doctor-AMX2GRRN.js.map} +0 -0
- /package/dist/{follow-up-tool-TPR3BCCK.js.map → follow-up-tool-3XSPNZKM.js.map} +0 -0
- /package/dist/{hub-RBVAC7NA.js.map → hub-DRCMPJMQ.js.map} +0 -0
- /package/dist/{processes-QZWODHBX.js.map → processes-EWARF6ZW.js.map} +0 -0
- /package/dist/{promote-KMDLBVCS.js.map → promote-4F2H3WEB.js.map} +0 -0
- /package/dist/{query-PC2V2M2H.js.map → query-25FU55U6.js.map} +0 -0
- /package/dist/{query-settings-FK5QR7MM.js.map → query-settings-5BLTPQQQ.js.map} +0 -0
- /package/dist/{registry-TDZCAQAS.js.map → registry-MXZBIPE5.js.map} +0 -0
- /package/dist/{request-planner-OYY36H2K.js.map → request-planner-7JLFVL6Y.js.map} +0 -0
- /package/dist/{review-candidates-STVUGCVM.js.map → review-candidates-MHIKLDT7.js.map} +0 -0
- /package/dist/{routing-SHHD6M67.js.map → routing-ZSGWR6ID.js.map} +0 -0
- /package/dist/{schedule-tool-O6OIDKNV.js.map → schedule-tool-2VI5IWZD.js.map} +0 -0
- /package/dist/{scheduler-CIOGE7UG.js.map → scheduler-J6BGTTMH.js.map} +0 -0
- /package/dist/{seat-LWJS5BKD.js.map → seat-WUEQNCSG.js.map} +0 -0
- /package/dist/{select-VYBDUP4R.js.map → select-ASFYQYDU.js.map} +0 -0
- /package/dist/{set-enabled-KBLEBANS.js.map → set-enabled-6NIDVEZF.js.map} +0 -0
- /package/dist/{sprint-tool-TCASE2O7.js.map → sprint-tool-APMWCQF3.js.map} +0 -0
- /package/dist/{tool-LSDMU5OX.js.map → tool-2CKQKDU5.js.map} +0 -0
- /package/dist/{tool-YMWIUVOK.js.map → tool-JPSOIPZZ.js.map} +0 -0
- /package/dist/{tool-RQX6IEY7.js.map → tool-MKUGBNSW.js.map} +0 -0
- /package/dist/{wiki-IIAPP6RU.js.map → wiki-JR6U5PSV.js.map} +0 -0
- /package/dist/{wiki-enrich-HNC76QED.js.map → wiki-enrich-KFVPA2JG.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{d as h}from"./chunk-
|
|
1
|
+
import{d as h}from"./chunk-35I76HQS.js";var d=["main contact","primary contact","point of contact","billing contact","technical contact","decision maker"],f=/[\w.+-]+@[\w-]+(?:\.[\w-]+)+/g,w=/\b(role|title|position|job)\s*\**\s*[::]\s*\**\s*([^\n;|]+)/gi;function L(t,c,e=[]){let l=[c,...e].join(`
|
|
2
2
|
`),a=l.toLowerCase(),i=h(t,l);for(let s of p(t.match(f)??[]))a.includes(s.toLowerCase())||i.push(`email ${s}`);let m=t.toLowerCase();for(let s of d)m.includes(s)&&!a.includes(s)&&i.push(`marker "${s}"`);for(let s of t.matchAll(w)){let n=s[2].replace(/\*+/g,"").trim();n&&!a.includes(n.toLowerCase())&&i.push(`${s[1].toLowerCase()} "${n}"`)}return p(i)}function p(t){return[...new Set(t)]}var $=.9,g=/^\s*(?:wait\b|here(?:'s| is) the (?:updated|modified|patched|revised)|i (?:must|need to|will|should) (?:output|return|write)|(?:okay|ok|sure)[,.!]\s|let me\b|as requested\b)/im;function k(t,c){let e=[],l=t.split(`
|
|
3
3
|
`).filter(o=>o.trim()).length,a=c.split(`
|
|
4
4
|
`).filter(o=>o.trim()).length;l>=5&&a<Math.floor(l*$)&&e.push(`the article shrinks from ${l} to ${a} lines`);let i=c.match(g);i&&!t.match(g)&&e.push(`it contains the model's own commentary ("${i[0].trim().slice(0,40)}")`);let m=o=>{let r=new Map;for(let u of o.split(`
|
|
5
5
|
`))/^#{1,6} /.test(u)&&r.set(u.trim(),(r.get(u.trim())??0)+1);return r},s=m(t);for(let[o,r]of m(c))r>1&&r>(s.get(o)??0)&&e.push(`the heading "${o}" appears ${r} times`);let n=L(t,c);return n.length&&e.push(`it drops ${n.length} fact(s): ${n.slice(0,6).join(", ")}${n.length>6?", \u2026":""}`),e}export{L as a,k as b};
|
|
6
|
-
//# sourceMappingURL=chunk-
|
|
6
|
+
//# sourceMappingURL=chunk-2BJ7NIGG.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as g}from"./chunk-
|
|
1
|
+
import{e as g}from"./chunk-GALI5ANI.js";async function $(e,i,r,n,o={}){let a=o.retrieve??g,c=o.perEntry??2,s=o.maxArticles??8,f=o.queryChars??1500,h=new Map;for(let t of e){let l=[];try{l=await a(t.content.slice(0,f),i,r,{pool:n,maxCandidates:c,maxHops:1,maxArticles:c*2,stage:"absorb-covering"})}catch{}for(let u of l){let p=h.get(u.path);p?(p.hop=Math.min(p.hop,u.hop),p.entries.includes(t.id)||p.entries.push(t.id)):h.set(u.path,{...u,entries:[t.id]})}}return[...h.values()].sort((t,l)=>t.hop-l.hop||l.entries.length-t.entries.length||t.path.localeCompare(l.path)).slice(0,s)}function x(e){if(e.length===0)return"";let i=e.map(r=>{let n=`### ${r.meta.title} \u2014 ${r.meta.type||"untyped"} (${r.path})`,o=`Found for entries: ${r.entries.join(", ")}${r.hop>0?" (linked from a match)":""}`,a=r.meta.related?.length?`Related: ${r.meta.related.join(", ")}`:"";return[n,o,a,"",r.content].filter(c=>c!=="").join(`
|
|
2
2
|
`)}).join(`
|
|
3
3
|
|
|
4
4
|
---
|
|
@@ -14,4 +14,4 @@ These ${e.length} articles were found by searching the wiki for each entry below
|
|
|
14
14
|
|
|
15
15
|
${i}
|
|
16
16
|
`}var d=/\bhttps?:\/\/[^\s<>"'`)\]]+/gi,y=/\[\[([^\]|]+)(?:\|[^\]]*)?\]\]/g,w=/(?<![\w-])(?=[0-9a-f]*[0-9])(?=[0-9a-f]*[a-f])[0-9a-f]{7,40}(?![\w-])/gi,k=/(?<![\w.,:/-])\d+(?:[.,:\-/]\d+)*(?![\w])/g,C=/^\s*\d+[.)]\s/gm;function A(e){let i=[...e.matchAll(d)].map(s=>s[0].replace(/[.,;:!?'"]+$/,"")),r=[...e.matchAll(y)].map(s=>s[1].trim()),n=e.replace(d," ").replace(y," ").replace(C," "),o=[...n.matchAll(w)].map(s=>s[0].toLowerCase()),c=[...n.replace(w," ").matchAll(k)].map(s=>v(s[0]));return{commits:m(o),urls:m(i),wikilinks:m(r),numbers:m(c)}}function R(e,i){let r=A(e),n=A(i),o=i.toLowerCase(),a=[];for(let t of r.commits)!o.includes(t)&&!n.commits.some(l=>l.startsWith(t)||t.startsWith(l))&&a.push(`commit ${t}`);let c=t=>t.toLowerCase().replace(/\/+$/,""),s=new Set(n.urls.map(c));for(let t of r.urls)s.has(c(t))||a.push(`link ${t}`);let f=new Set(n.wikilinks.map(t=>t.toLowerCase()));for(let t of r.wikilinks)f.has(t.toLowerCase())||a.push(`link [[${t}]]`);let h=new Set(n.numbers);for(let t of r.numbers)h.has(t)||a.push(`number ${t}`);return a}function v(e){return/^\d{1,3}(,\d{3})+$/.test(e)?e.replace(/,/g,""):e}function m(e){return[...new Set(e)]}function L(e,i){if(i.some(n=>n.path===e.path))return e.path;let r=b(e.title);return r?i.find(n=>b(n.title)===r)?.path??e.path:e.path}function b(e){return(e||"").toLowerCase().replace(/[^\p{L}\p{N}]+/gu," ").trim()}export{$ as a,x as b,A as c,R as d,L as e};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-35I76HQS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{r as p}from"./chunk-LB55Q3K4.js";import{b as i,c as u,d as l,e as c}from"./chunk-TB3ZEMTC.js";import d from"cronstrue";var f=Intl.DateTimeFormat().resolvedOptions().timeZone,g=600,E='Try: "every morning at 9", "weekdays at 6pm", "every 15 minutes", "every monday at 10am", "1st of every month at noon", "daily at 9:30am", "every hour"',m=/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;function x(e){return m.test(e)}function w(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return!1}}function S(e){return e?e.split(",").map(r=>r.trim().toLowerCase()).filter(r=>r==="log"||r==="notify"||r==="disable"):["log"]}function $(e){let r=[...e.onError??["log"]];e.notify&&!r.includes("notify")&&r.push("notify");let t={enabled:e.enabled??!0,schedule:e.parsed.cron,timezone:e.timezone||f,agent:e.agent,prompt:e.prompt,timeout:e.timeout??g,onError:r};return e.model&&(t.model=e.model),e.notify&&(t.notify=e.notify),e.notify&&e.deliverResult===!1&&(t.deliverResult=!1),e.report==="exceptions"&&(t.report="exceptions"),e.createdBy&&(t.createdBy=e.createdBy),e.approval&&(t.approval=e.approval),t}function P(e){return e.deliverResult===!1?"(failures only)":e.report==="exceptions"?"(exceptions and failures)":"(results and failures)"}function T(e){try{return d.toString(e,{use24HourTimeFormat:!1})}catch{return e}}function A(e,r,t=new Date){try{return p(e,t,r)}catch{return null}}function D(e,r){if(!e)return"unknown (no match within a year)";try{return`${new Intl.DateTimeFormat("en-GB",{timeZone:r,weekday:"short",day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(e)} (${r})`}catch{return e.toISOString()}}function y(e){return e?.approval?.action==="create"}async function R(e,r={}){let t="",o=await i(n=>{let a=l(n,`crons.${e}`);if(!a)throw new Error(`cron "${e}" not found`);let s=a.approval;if(!s)throw new Error(`cron "${e}" has no pending request`);s.action==="create"?(delete a.approval,a.enabled=!0,t=`${e} approved and enabled (requested by ${s.requestedBy})`):(c(n,`crons.${e}`),t=`${e} deletion approved; job removed (requested by ${s.requestedBy})`)},{configPath:r.configPath,reload:r.reload});return o.success?{success:!0,message:t,result:o}:{success:!1,message:o.error||"failed",result:o}}async function I(e,r={}){let t="",o=await i(n=>{let a=l(n,`crons.${e}`);if(!a)throw new Error(`cron "${e}" not found`);let s=a.approval;if(!s)throw new Error(`cron "${e}" has no pending request`);s.action==="create"?(c(n,`crons.${e}`),t=`${e} rejected; pending job removed`):(delete a.approval,t=`${e} deletion rejected; job kept`)},{configPath:r.configPath,reload:r.reload});return o.success?{success:!0,message:t,result:o}:{success:!1,message:o.error||"failed",result:o}}async function O(e,r,t={}){return i(o=>{let n=l(o,`crons.${e}`);if(!n)throw new Error(`cron "${e}" not found`);if(r&&y(n))throw new Error(`cron "${e}" is awaiting approval; run \`agentx schedule approve ${e}\``);u(o,`crons.${e}.enabled`,r)},{configPath:t.configPath,reload:t.reload})}export{f as a,E as b,x as c,w as d,S as e,$ as f,P as g,T as h,A as i,D as j,y as k,R as l,I as m,O as n};
|
|
2
|
+
//# sourceMappingURL=chunk-35R7Y7BT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{y as l,z as T}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{y as l,z as T}from"./chunk-ES236GV6.js";import{a,f as w}from"./chunk-72SZI2UW.js";T();w();var d="task-tier";function u(e){return{task:b(e.message,2e3),agent:e.agent,channel:e.channel??null,continuesExistingSession:e.isFollowUp??!1,...e.toolsAvailable?{toolsAvailable:e.toolsAvailable}:{}}}var c={needsFlagship:a("This task needs the strongest available model to be done correctly.",{true:"Doing it well takes real reasoning: writing or reviewing code, diagnosing a failure, planning work across several steps, weighing a judgement, handling money, touching production or anything irreversible, following a long or ambiguous instruction, or work where being subtly wrong would not be noticed. Anything where a weaker model would produce something that LOOKS right belongs here.",false:"It is mechanical and its result is obvious on sight: acknowledging or confirming a message, restating or formatting something already written, a greeting, a status echo, reading one file and reporting what it says, a lookup with one right answer, a scheduled heartbeat with nothing to decide."})};function g(e){return e.needsFlagship.noul}function b(e,n){return e.length>n?`${e.slice(0,n)}\u2026`:e}var h=.2;function p(e){return e==="voice"||e==="desktop"||e==="opencode"}var f=60*60*1e3;function M(e,n){if(e==="claude-code"){let t=n?.cheapModels?.[e]??n?.cheapModel;return t&&/^(claude-|haiku$|sonnet$|opus$)/.test(t)?t:void 0}if(e==="codex-cli"){let t=n?.cheapModels?.[e];return t&&/^(gpt-|o\d)/.test(t)?t:void 0}}async function v(e){let n=(s,r=null)=>({downgraded:!1,needsFlagship:r,reason:s});if(p(e.channel))return n(`${e.channel} requests retain the configured model`);if(!e.cheapModel)return n("no cheaper model configured");if(e.isFollowUp){let s=e.sessionIdleMs??0,r=e.cacheTtlMs??f;if(s<r)return n(`follow-up on a warm cache (idle ${Math.round(s/1e3)}s) \u2014 swapping would cost more than it saves`)}let t;try{t=await l(d,u(e),c,{incumbent:{needsFlagship:1},features:{agent:e.agent,channel:e.channel??"unknown"},timeoutMs:1500})}catch{return n("routing seat threw \u2014 keeping the flagship")}if(!t)return n("routing seat unavailable \u2014 keeping the flagship");let o=g(t.answers);if(t.mode!=="active")return n(`shadow \u2014 would ${o<(e.threshold??h)?"downgrade":"keep"} (${o.toFixed(2)})`,o);let i=e.threshold??h;return o>=i?n(`needs the flagship (${o.toFixed(2)})`,o):{model:e.cheapModel,downgraded:!0,needsFlagship:o,reason:`mechanical task (${o.toFixed(2)} below ${i}) \u2192 ${e.cheapModel}`}}var A=["labeled","unlabeled","closed"];function y(e){let n=r=>({downgraded:!1,needsFlagship:null,reason:r});if(p(e.channel))return n(`${e.channel} requests retain the configured model`);let t=e.eventActions??[];if(!t.length)return n("not started by a platform event");let o=e.triage?.actions??A,i=t.find(r=>!o.includes(r));if(i)return n(`"${i}" is not a triage action`);let s=M(e.tier,{cheapModels:e.triage?.models});if(!s)return n(`no triage model set for ${e.tier}`);if(e.isFollowUp){let r=e.sessionIdleMs??0,m=e.cacheTtlMs??f;if(r<m)return n(`follow-up on a warm cache (idle ${Math.round(r/1e3)}s) \u2014 keeping the session's model`)}return{model:s,downgraded:!0,needsFlagship:null,reason:`triage event (${t.join(", ")}) \u2192 ${s}`}}export{h as a,p as b,M as c,v as d,A as e,y as f};
|
|
2
|
+
//# sourceMappingURL=chunk-5KVTIFRY.js.map
|
|
@@ -48,7 +48,7 @@ The "modified" field is optional and can contain updated values to pass forward.
|
|
|
48
48
|
... (output truncated)`:i;return s.exitCode!==0?{tool_use_id:e.id,content:`Command exited with code ${s.exitCode}:
|
|
49
49
|
${c}`,is_error:!0}:{tool_use_id:e.id,content:c||"(no output)"}}async editFile(e){let t=String(e.input.path||""),o=e.input.edits,n=ge.resolve(this.cwd,t);if(!o||o.length===0)return{tool_use_id:e.id,content:"No edits provided.",is_error:!0};let s=await W.checkFileWrite(t);if(s==="deny")return{tool_use_id:e.id,content:`File write blocked by permissions: ${t}`,is_error:!0};if(s==="skip")return{tool_use_id:e.id,content:`File write skipped (plan mode): ${t}`};if(f.has("pre:file-write")){let a=await f.execute("pre:file-write",{event:"pre:file-write",file:n,cwd:this.cwd});if(a.blocked)return{tool_use_id:e.id,content:a.message||`File edit blocked by pre:file-write hook: ${t}`,is_error:!0}}let i=await re.readFile(n,"utf8"),c=[];for(let a of o)i.includes(a.old_text)?(i=i.replace(a.old_text,a.new_text),c.push(`Replaced: "${a.old_text.slice(0,40)}..."`)):c.push(`Not found: "${a.old_text.slice(0,40)}..."`);return this.options.dryRun||await re.writeFile(n,i,"utf8"),f.has("post:file-write")&&await f.execute("post:file-write",{event:"post:file-write",file:n,fileContent:i,cwd:this.cwd}),{tool_use_id:e.id,content:`Edited ${t}:
|
|
50
50
|
${c.join(`
|
|
51
|
-
`)}`}}async createFiles(e){let t=e.input,o=t.files||[];return{tool_use_id:e.id,content:t.summary||`Queued ${o.length} file(s) for creation.`,files:o}}async spawnAgent(e){let t=String(e.input.agent_id||""),o=String(e.input.prompt||""),n=Number(e.input.timeout_seconds)||300;if(!t||!o)return{tool_use_id:e.id,content:"agent_id and prompt are required.",is_error:!0};try{let{SubAgentManager:s}=await import("./subagent-XY5N7TUU.js"),{getGlobalRegistry:i}=await import("./registry-
|
|
51
|
+
`)}`}}async createFiles(e){let t=e.input,o=t.files||[];return{tool_use_id:e.id,content:t.summary||`Queued ${o.length} file(s) for creation.`,files:o}}async spawnAgent(e){let t=String(e.input.agent_id||""),o=String(e.input.prompt||""),n=Number(e.input.timeout_seconds)||300;if(!t||!o)return{tool_use_id:e.id,content:"agent_id and prompt are required.",is_error:!0};try{let{SubAgentManager:s}=await import("./subagent-XY5N7TUU.js"),{getGlobalRegistry:i}=await import("./registry-MXZBIPE5.js"),c=i();if(!c)return{tool_use_id:e.id,content:"Sub-agent spawning requires the daemon to be running.",is_error:!0};let p=await new s(c).spawn({targetAgentId:t,prompt:o,parentAgentId:"orchestrator",timeout:n*1e3});return p.success?{tool_use_id:e.id,content:`Sub-agent "${t}" completed (${Math.round(p.duration/1e3)}s):
|
|
52
52
|
|
|
53
53
|
${p.content}`}:{tool_use_id:e.id,content:`Sub-agent "${t}" failed: ${p.error}`,is_error:!0}}catch(s){return{tool_use_id:e.id,content:`Failed to spawn sub-agent: ${s.message}`,is_error:!0}}}async askUser(e){let t=String(e.input.question||""),o=e.input.options,n=t;return o?.length&&(n+=`
|
|
54
54
|
Options: ${o.join(", ")}`),{tool_use_id:e.id,content:"Question sent to user.",followUp:n}}};async function Ae(r){let{provider:e,systemPrompt:t,messages:o,providerOptions:n,cwd:s,maxIterations:i=20,enabledTools:c,interactive:a=!0,overwrite:p=!1,dryRun:l=!1,onProgress:d,abortSignal:u}=r,m=u?{...n,abortSignal:u}:n;if(!e.generateRaw)return dt(r);let I=new se(s,{interactive:a,overwrite:p,dryRun:l,acmeContext:r.acmeContext,abortSignal:u}),D=be(c);if(r.acmeContext)for(let g of at)D.push({name:g.name,description:g.description,input_schema:g.input_schema});let E=new Set;if(r.mcpTools?.length)for(let g of r.mcpTools)D.push({name:g.name,description:g.description,input_schema:g.input_schema}),E.add(g.name);let C=o.filter(g=>g.role!=="system").map(g=>({role:g.role,content:g.content})),B=[],G=0,F=0,A=0,O="",j,_=0;for(;_<i;){if(_++,u?.aborted)throw new Error("cancelled");d?.({type:"iteration_start",iteration:_}),b.step(_,`Agentic loop iteration (${D.length} tools available)`);let g,M=!!e.generateRawStream&&!!d;try{if(M){let T=null,U=null,v="";for await(let x of e.generateRawStream(C,t,D,m))x.type==="text_delta"?(v+=x.text,d?.({type:"text_delta",text:x.text})):x.type==="thinking_delta"?d?.({type:"thinking_delta",text:x.text}):x.type==="raw_result"?T=x.result:x.type==="error"&&(U=x.error);if(U&&!T)throw new Error(U);if(!T)throw new Error("generateRawStream returned no raw_result event");g=T,g._streamedText=v}else g=await e.generateRaw(C,t,D,m)}catch(T){if(T.message?.includes("not available"))return dt(r);throw T}G+=g.usage.input_tokens+g.usage.output_tokens,F+=g.usage.input_tokens,A+=g.usage.output_tokens;let P=g._streamedText;for(let T of g.content)T.type==="text"&&(O+=T.text,P===void 0&&d?.({type:"text_delta",text:T.text}));if(P!==void 0&&delete g._streamedText,g.stop_reason==="end_turn"||g.stop_reason==="max_tokens")break;if(g.stop_reason==="tool_use"){let T=g.content.filter(v=>v.type==="tool_use");if(T.length===0)break;C.push({role:"assistant",content:g.content});let U=[];for(let v of T){d?.({type:"tool_call",name:v.name,id:v.id,input:v.input}),b.step(_,`Tool call: ${v.name}`);let x;if(E.has(v.name)&&r.mcpDispatch){let h=await r.mcpDispatch(v.name,v.input);x={tool_use_id:v.id,content:h.content,is_error:h.isError}}else x=await I.execute({name:v.name,id:v.id,input:v.input});d?.({type:"tool_result",name:v.name,id:v.id,content:x.content.slice(0,200),is_error:x.is_error}),x.files?.length&&(B.push(...x.files),d?.({type:"files_created",files:x.files})),x.followUp&&(j=x.followUp),U.push({type:"tool_result",tool_use_id:x.tool_use_id,content:x.content,is_error:x.is_error})}if(C.push({role:"user",content:U}),j)break;continue}break}return d?.({type:"complete",iterations:_,totalTokens:G}),{files:B,content:O,followUp:j,tokensUsed:G,inputTokens:F||void 0,outputTokens:A||void 0,iterations:_}}async function dt(r){let{provider:e,systemPrompt:t,messages:o,providerOptions:n,maxIterations:s=5}=r,c=[{role:"system",content:t+`
|
|
@@ -123,4 +123,4 @@ ${r.projectInstructions}`),r.memoryContext&&o.push(r.memoryContext),o.push(`# Ou
|
|
|
123
123
|
Generate output appropriate for: ${e}. Use the \`create_files\` tool to output all files.`),o.join(`
|
|
124
124
|
|
|
125
125
|
`)}export{qe as a,Vt as b,Yt as c,We as d,ze as e,Ve as f,Ye as g,Pe as h,ee as i,Re as j,le as k,te as l,Tt as m,oe as n,Mt as o,f as p,et as q,tt as r,Me as s,de as t,W as u,ne as v,it as w,Ee as x,$e as y,se as z,mt as A,Zn as B,er as C};
|
|
126
|
-
//# sourceMappingURL=chunk-
|
|
126
|
+
//# sourceMappingURL=chunk-74RXD676.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Wa as y,vb as $}from"./chunk-
|
|
1
|
+
import{Wa as y,vb as $}from"./chunk-NGGEGY5K.js";import{randomBytes as x}from"crypto";import{existsSync as b,mkdirSync as k,readdirSync as M,readFileSync as j,renameSync as E,unlinkSync as S,writeFileSync as C}from"fs";import{resolve as u}from"path";function f(t){return u(t,".agentx","email")}function d(t,e){k(u(t,".."),{recursive:!0});let r=`${t}.${process.pid}.tmp`;C(r,JSON.stringify(e,null,2)+`
|
|
2
2
|
`,{mode:384}),E(r,t)}function g(t){try{return JSON.parse(j(t,"utf-8"))}catch{return null}}var D=t=>u(f(t),"threads.json");function w(t){return g(D(t))??{}}function F(t,e){return w(t)[e.toLowerCase()]}function I(t,e){let r=w(t);r[e.to.toLowerCase()]=e,d(D(t),r)}var h=(t,e)=>u(f(t),"cursors",`${e}.json`);function L(t,e){return g(h(t,e))}function z(t,e,r){d(h(t,e),r)}var T=2e4,_=t=>u(f(t),"drafts"),N=t=>/^[a-z0-9-]{8,64}$/.test(t),c=(t,e)=>u(_(t),`${e}.json`);function B(t,e,r=Date.now()){let n=e.text.trim().slice(0,T);if(!n)throw new Error("empty reply");let s={...e,text:n,id:`${r.toString(36)}-${x(4).toString("hex")}`,status:"pending",created_at:new Date(r).toISOString()};return d(c(t,s.id),s),s}function v(t,e){return N(e)?g(c(t,e)):null}function U(t,e){let r=_(t);return b(r)?M(r).filter(n=>n.endsWith(".json")).map(n=>v(t,n.slice(0,-5))).filter(n=>!!n&&(!e||n.status===e)).sort((n,s)=>n.created_at.localeCompare(s.created_at)):[]}async function V(t,e,r,n){let s=v(t,e);if(!s||s.status!=="pending")return{ok:!1,error:`no email reply "${e}" is waiting`};let i=`${c(t,e)}.${process.pid}.${x(3).toString("hex")}.claim`;try{E(c(t,e),i)}catch{return{ok:!1,error:`email reply "${e}" is already being decided`}}let a=n.text!==void 0&&n.text.trim()!==""&&n.text.trim()!==s.text,o={...s,...a?{text:n.text.trim().slice(0,T),edited:!0}:{},decided_by:n.by??"operator",decided_at:new Date(n.now??Date.now()).toISOString()};if(r==="no")o.status="rejected";else{let m=await n.send(o).catch(p=>({ok:!1,error:String(p?.message??p)}));if(!m.ok){d(c(t,e),{...s,error:m.error});try{S(i)}catch{}return{ok:!1,error:`not sent: ${m.error}`}}o.status="sent",delete o.error}d(c(t,e),o);try{S(i)}catch{}return{ok:!0,draft:o}}$();function l(t,e){return(t??"").replace(/\$\{(\w+)\}/g,(r,n)=>e[n]??"")}function P(t,e=process.env){let r={host:t.imap.host,port:t.imap.port,secure:t.imap.secure,user:l(t.imap.user,e)||t.address,password:l(t.imap.password,e)},n={host:t.smtp.host,port:t.smtp.port,secure:t.smtp.secure,user:l(t.smtp.user,e)||r.user,password:l(t.smtp.password,e)||r.password};return{imap:r,smtp:n}}async function J(t,e,r,n=process.env){let{smtp:s}=P(t,n);if(!s.password)throw new Error(`no SMTP password for ${t.address}: set it in .env`);let{default:i}=await import("nodemailer"),a=i.createTransport({host:s.host,port:s.port,secure:s.secure,auth:{user:s.user,pass:s.password},connectionTimeout:2e4,greetingTimeout:2e4,socketTimeout:6e4});try{return(await a.sendMail({from:{name:e,address:t.address},to:r.toName?{name:r.toName,address:r.to}:r.to,subject:r.subject,text:r.text,...r.inReplyTo?{inReplyTo:r.inReplyTo}:{},...r.references?{references:r.references}:{},headers:{"Auto-Submitted":"auto-replied"}})).messageId}finally{a.close()}}function q(t,e){return async r=>{let n=t?.channels?.email?.accounts?.[r.account];if(!n)return{ok:!1,error:`no email account "${r.account}" in agentx.json`};let s=y.safeParse(n);if(!s.success)return{ok:!1,error:`email account "${r.account}": ${s.error.issues[0]?.message}`};let i=s.data,a=i.name||t?.agents?.[r.agent]?.name||r.agent;return await J(i,a,{to:r.to,toName:r.to_name,subject:r.subject,inReplyTo:r.in_reply_to,references:r.references,text:r.text},e),{ok:!0}}}export{F as a,I as b,L as c,z as d,B as e,v as f,U as g,V as h,P as i,J as j,q as k};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-AQGQLVCD.js.map
|