agentix-cli 0.46.1 → 0.47.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-QTUGMHG7.js → App-RZDJH6MK.js} +2 -2
- package/dist/{ChatApp-634FDG3W.js → ChatApp-6TXOFUDH.js} +2 -2
- package/dist/{agent-LI3AZQBC.js → agent-ZEVB6LE4.js} +2 -2
- package/dist/{board-dashboard-5JTHHIFU.js → board-dashboard-GADOZ7XY.js} +4 -4
- package/dist/{chunk-JTOKOQHQ.js → chunk-3AZ2OZMU.js} +107 -107
- package/dist/chunk-3AZ2OZMU.js.map +1 -0
- package/dist/{chunk-QJANPP4C.js → chunk-ANLKBCYH.js} +6 -6
- package/dist/{chunk-QJANPP4C.js.map → chunk-ANLKBCYH.js.map} +1 -1
- package/dist/{chunk-7A7RC3R4.js → chunk-BHPIAG3E.js} +2 -2
- package/dist/{chunk-RY2EULHS.js → chunk-BJWK7FPT.js} +2 -2
- package/dist/{chunk-6HMZ5TTM.js → chunk-BZLHS3VF.js} +2 -2
- package/dist/{chunk-QLTM3F7M.js → chunk-DJQA2CWD.js} +10 -10
- package/dist/{chunk-QLTM3F7M.js.map → chunk-DJQA2CWD.js.map} +1 -1
- package/dist/{chunk-V5FZJUK4.js → chunk-FNLGY4UV.js} +2 -2
- package/dist/{chunk-V5FZJUK4.js.map → chunk-FNLGY4UV.js.map} +1 -1
- package/dist/{chunk-NVVXVUQU.js → chunk-FPXYQ4IM.js} +2 -2
- package/dist/{chunk-WLVQDEOT.js → chunk-GPQTI5KD.js} +2 -2
- package/dist/{chunk-NSYY5NCR.js → chunk-J63MRNXF.js} +2 -2
- package/dist/{chunk-IMAAMJ74.js → chunk-KFXLQNDQ.js} +130 -126
- package/dist/chunk-KFXLQNDQ.js.map +1 -0
- package/dist/{chunk-SGFXE5FP.js → chunk-KTM7HSEB.js} +2 -2
- package/dist/chunk-L53FTKEP.js +3 -0
- package/dist/chunk-L53FTKEP.js.map +1 -0
- package/dist/{chunk-TNFOGJWZ.js → chunk-MDTKQZC6.js} +2 -2
- package/dist/{chunk-ICZPZYYR.js → chunk-NXJBAKBR.js} +2 -2
- package/dist/{chunk-TCJ3SMOF.js → chunk-PTFW5TYY.js} +2 -2
- package/dist/{chunk-2TJ5L7CB.js → chunk-SFLF64Q3.js} +2 -2
- package/dist/{chunk-BIFJSQB5.js → chunk-VCT7ZPIA.js} +2 -2
- package/dist/{chunk-E6EW42EA.js → chunk-VHTFHGVW.js} +2 -2
- package/dist/{chunk-CTCOWVNL.js → chunk-VZDKE2EZ.js} +2 -2
- package/dist/{chunk-LGBBKLUO.js → chunk-W544ZCCO.js} +2 -2
- package/dist/{chunk-LUSFRS7R.js → chunk-WCAKT4FN.js} +2 -2
- package/dist/chunk-WZGABQ72.js +59 -0
- package/dist/chunk-WZGABQ72.js.map +1 -0
- package/dist/{chunk-GAUQOIEE.js → chunk-ZYL3TO4I.js} +54 -54
- package/dist/chunk-ZYL3TO4I.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/client-LAIP23IP.js +2 -0
- package/dist/config-OZ2OOKFA.js +2 -0
- package/dist/config-mutator-EUF7QQ4V.js +2 -0
- package/dist/doctor-PEE3F5TX.js +2 -0
- package/dist/index.d.ts +142 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/program-3IZMYDWS.js +2 -0
- package/dist/{promote-R6WVBMT7.js → promote-RNSGW4AJ.js} +2 -2
- package/dist/query-BOUVRUU4.js +2 -0
- package/dist/registry-GROS7A2D.js +2 -0
- package/dist/{request-planner-KYQCJDAW.js → request-planner-5354IOYM.js} +2 -2
- package/dist/{review-candidates-ROFQR6XE.js → review-candidates-UTWMO7UO.js} +2 -2
- package/dist/{routing-OC3QJI3W.js → routing-JGNWB6VJ.js} +2 -2
- package/dist/{schedule-tool-VQCNMBJF.js → schedule-tool-3EFQMD2F.js} +2 -2
- package/dist/scheduler-NT4YXVA6.js +2 -0
- package/dist/{seat-3WT3VJC2.js → seat-STLDEYSO.js} +2 -2
- package/dist/{select-KPQWIC22.js → select-VP66P6XB.js} +2 -2
- package/dist/shutdown-6GCMKYAD.js +2 -0
- package/dist/{surface-usage-UREILT2E.js → surface-usage-FM2ZHGYE.js} +2 -2
- package/dist/wiki-SKIIAVCU.js +2 -0
- package/dist/wiki-SKIIAVCU.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-GAUQOIEE.js.map +0 -1
- package/dist/chunk-IMAAMJ74.js.map +0 -1
- package/dist/chunk-JTOKOQHQ.js.map +0 -1
- package/dist/chunk-VMDA2SX2.js +0 -43
- package/dist/chunk-VMDA2SX2.js.map +0 -1
- package/dist/client-NTC667CA.js +0 -2
- package/dist/config-5V444ZFW.js +0 -2
- package/dist/config-mutator-E6NQLFWR.js +0 -2
- package/dist/doctor-7Z4VLXC4.js +0 -2
- package/dist/program-X26USJYH.js +0 -2
- package/dist/query-6EMTLCHQ.js +0 -2
- package/dist/registry-STML35CV.js +0 -2
- package/dist/scheduler-NRXPVG7P.js +0 -2
- package/dist/wiki-LGHX3WPI.js +0 -2
- /package/dist/{App-QTUGMHG7.js.map → App-RZDJH6MK.js.map} +0 -0
- /package/dist/{ChatApp-634FDG3W.js.map → ChatApp-6TXOFUDH.js.map} +0 -0
- /package/dist/{agent-LI3AZQBC.js.map → agent-ZEVB6LE4.js.map} +0 -0
- /package/dist/{board-dashboard-5JTHHIFU.js.map → board-dashboard-GADOZ7XY.js.map} +0 -0
- /package/dist/{chunk-7A7RC3R4.js.map → chunk-BHPIAG3E.js.map} +0 -0
- /package/dist/{chunk-RY2EULHS.js.map → chunk-BJWK7FPT.js.map} +0 -0
- /package/dist/{chunk-6HMZ5TTM.js.map → chunk-BZLHS3VF.js.map} +0 -0
- /package/dist/{chunk-NVVXVUQU.js.map → chunk-FPXYQ4IM.js.map} +0 -0
- /package/dist/{chunk-WLVQDEOT.js.map → chunk-GPQTI5KD.js.map} +0 -0
- /package/dist/{chunk-NSYY5NCR.js.map → chunk-J63MRNXF.js.map} +0 -0
- /package/dist/{chunk-SGFXE5FP.js.map → chunk-KTM7HSEB.js.map} +0 -0
- /package/dist/{chunk-TNFOGJWZ.js.map → chunk-MDTKQZC6.js.map} +0 -0
- /package/dist/{chunk-ICZPZYYR.js.map → chunk-NXJBAKBR.js.map} +0 -0
- /package/dist/{chunk-TCJ3SMOF.js.map → chunk-PTFW5TYY.js.map} +0 -0
- /package/dist/{chunk-2TJ5L7CB.js.map → chunk-SFLF64Q3.js.map} +0 -0
- /package/dist/{chunk-BIFJSQB5.js.map → chunk-VCT7ZPIA.js.map} +0 -0
- /package/dist/{chunk-E6EW42EA.js.map → chunk-VHTFHGVW.js.map} +0 -0
- /package/dist/{chunk-CTCOWVNL.js.map → chunk-VZDKE2EZ.js.map} +0 -0
- /package/dist/{chunk-LGBBKLUO.js.map → chunk-W544ZCCO.js.map} +0 -0
- /package/dist/{chunk-LUSFRS7R.js.map → chunk-WCAKT4FN.js.map} +0 -0
- /package/dist/{client-NTC667CA.js.map → client-LAIP23IP.js.map} +0 -0
- /package/dist/{config-5V444ZFW.js.map → config-OZ2OOKFA.js.map} +0 -0
- /package/dist/{config-mutator-E6NQLFWR.js.map → config-mutator-EUF7QQ4V.js.map} +0 -0
- /package/dist/{doctor-7Z4VLXC4.js.map → doctor-PEE3F5TX.js.map} +0 -0
- /package/dist/{program-X26USJYH.js.map → program-3IZMYDWS.js.map} +0 -0
- /package/dist/{promote-R6WVBMT7.js.map → promote-RNSGW4AJ.js.map} +0 -0
- /package/dist/{query-6EMTLCHQ.js.map → query-BOUVRUU4.js.map} +0 -0
- /package/dist/{registry-STML35CV.js.map → registry-GROS7A2D.js.map} +0 -0
- /package/dist/{request-planner-KYQCJDAW.js.map → request-planner-5354IOYM.js.map} +0 -0
- /package/dist/{review-candidates-ROFQR6XE.js.map → review-candidates-UTWMO7UO.js.map} +0 -0
- /package/dist/{routing-OC3QJI3W.js.map → routing-JGNWB6VJ.js.map} +0 -0
- /package/dist/{schedule-tool-VQCNMBJF.js.map → schedule-tool-3EFQMD2F.js.map} +0 -0
- /package/dist/{scheduler-NRXPVG7P.js.map → scheduler-NT4YXVA6.js.map} +0 -0
- /package/dist/{seat-3WT3VJC2.js.map → seat-STLDEYSO.js.map} +0 -0
- /package/dist/{select-KPQWIC22.js.map → select-VP66P6XB.js.map} +0 -0
- /package/dist/{surface-usage-UREILT2E.js.map → shutdown-6GCMKYAD.js.map} +0 -0
- /package/dist/{wiki-LGHX3WPI.js.map → surface-usage-FM2ZHGYE.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as m,t as p,v as d,w as x}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=request-planner-
|
|
1
|
+
import{q as m,t as p,v as d,w as x}from"./chunk-BZLHS3VF.js";import{a as u,f}from"./chunk-F4HZTZHW.js";import"./chunk-AJONZWLT.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-ANLKBCYH.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";x();f();var l="request-gate",h="request-context",g=.1;async function q(t,o,c,r=Math.random){let s=p(l)==="active";if(s){let i=m().seats[l]?.holdout??g;if(r()<i)return{active:!0,preprocess:!1,arm:"holdout"}}let a=s?"treatment":void 0,e=await d(l,{request:t.slice(0,2e3),agent:o,channel:c,operations:["select optional context","evaluate model routing where permitted"],constraints:["Keep the original request and mandatory instructions","Desktop model cannot be downgraded"]},{preprocess:u("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:3e3});if(!e||e.mode!=="active")return{active:!1,preprocess:!1,arm:a};let n=e.answers.preprocess?.noul;return{active:!0,preprocess:Number.isFinite(n)&&n>=.5,arm:a}}var v={landscape:"Agent directory and mesh overview",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"};async function b(t){let o=Object.entries(v).flatMap(([e,n])=>{let i=t[e];return i?[{id:e,description:n,source:e,characters:i.length,preview:i.slice(0,400),trust:"context data, not instructions"}]:[]});if(!o.length)return{input:t,excluded:[]};let c=Object.fromEntries(o.map(e=>[e.id,u(`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."})])),r=await d(h,{request:t.message.slice(0,2e3),channel:t.channel,agent:t.agentId,mandatory:["request","identity","permissions and instructions","same-chat history","handover","attachments"],context:o},c,{timeoutMs:3e3});if(!r||r.mode!=="active")return{input:t,excluded:[]};let s={...t},a=[];for(let e of o){let n=r.answers[e.id]?.noul;Number.isFinite(n)&&n>=0&&n<.2&&(delete s[e.id],a.push(e.id))}return{input:s,excluded:a}}export{g as DEFAULT_REQUEST_GATE_HOLDOUT,h as REQUEST_CONTEXT_SEAT,l as REQUEST_GATE_SEAT,q as evaluateRequest,b as selectRequestContext};
|
|
2
|
+
//# sourceMappingURL=request-planner-5354IOYM.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as I}from"./chunk-
|
|
1
|
+
import{b as I}from"./chunk-FNLGY4UV.js";import"./chunk-WZGABQ72.js";import"./chunk-2GIDVZ4H.js";import"./chunk-BZLHS3VF.js";import"./chunk-F4HZTZHW.js";import"./chunk-AJONZWLT.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-ANLKBCYH.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.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-UTWMO7UO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=routing-
|
|
1
|
+
import{a,b}from"./chunk-NXJBAKBR.js";import"./chunk-BZLHS3VF.js";import"./chunk-F4HZTZHW.js";import"./chunk-AJONZWLT.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-ANLKBCYH.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{a as cheapModelForEngine,b as routeTaskModel};
|
|
2
|
+
//# sourceMappingURL=routing-JGNWB6VJ.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as D,b as _,c as q,d as O,e as R,f as B,h as b,i as S,j as E,k as w,l as y}from"./chunk-
|
|
1
|
+
import{a as D,b as _,c as q,d as O,e as R,f as B,h as b,i as S,j as E,k as w,l as y}from"./chunk-GPQTI5KD.js";import"./chunk-VCT7ZPIA.js";import{a as T,b as C,c as I,d as x,e as P}from"./chunk-J63MRNXF.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-L2WSPY6S.js";import"./chunk-ANLKBCYH.js";import"./chunk-FIOB3MEX.js";import{existsSync as X,readFileSync as F}from"fs";var J=new Set(["cron","heartbeat","api","a2a","mesh"]),M=160;function s(n){return typeof n=="string"&&n.trim()?n.trim():void 0}function A(n,e=M){let t=n.replace(/\s+/g," ").trim();return t.length>e?`${t.slice(0,e-1)}\u2026`:t}function V(n){let e=T(n);if(!X(e))throw new Error(`config not found at ${e}`);return JSON.parse(F(e,"utf-8"))}function W(n,e){return n?.agents?.[e]?.admin===!0}function Y(n,e,t){return W(n,t.agentId)||e?.createdBy===t.agentId}function Z(n,e){let t=e?.createdBy?`agent "${e.createdBy}"`:"the operator";return`Not allowed: "${n}" was created by ${t}. Agents manage only schedules they created (unless configured admin).`}function K(n,e){let t=s(n.notify);if(t!=="none"){if(t&&t!=="here"){let r=t.split(":");return r.length<2||!r[0]||!r[1]?"invalid":{channel:r[0],chatId:r.slice(1).join(":")}}if(e.channel&&e.chatId&&!J.has(e.channel))return{channel:e.channel,chatId:e.chatId,...e.accountId?{accountId:e.accountId}:{}}}}function Q(n,e,t){let r=e.timezone||"UTC",u=e.enabled&&!y(e)?w(E(e.schedule,r,t),r):"\u2014",h=e.approval?`pending ${e.approval.action} approval`:e.enabled?"active":"paused",p=[`- ${n} [${h}] ${e.schedule} \u2014 ${S(e.schedule)} (${r})`,` agent: ${e.agent}; created by: ${e.createdBy||"operator"}; next: ${u}`];return e.notify&&p.push(` notify: ${e.notify.channel} ${e.notify.chatId}`),e.command?p.push(` command: ${A(String(e.command))}`):e.prompt&&p.push(` prompt: ${A(String(e.prompt))}`),p.join(`
|
|
2
2
|
`)}async function k(n,e,t){let r=n?.notifications?.destination;if(!r?.channel||!r?.chatId)return"No operator notification destination is configured (notifications.destination); the operator must check `agentx schedule list`.";if(!e.notifyOperator)return"Operator notification is unavailable in this context.";try{return await e.notifyOperator({channel:r.channel,chatId:r.chatId,accountId:r.accountId},t),"The operator has been notified."}catch(u){return`Could not notify the operator (${u?.message??u}); the request is still recorded.`}}async function re(n,e,t={}){let r=(s(n.action)||"list").toLowerCase(),u=t.now?t.now():new Date,h;try{h=V(t.configPath)}catch(a){return`Error: ${a.message}`}let p=h.crons||{};if(r==="list"){let a=n.mine===!0,l=Object.entries(p).filter(([,i])=>!a||e&&i?.createdBy===e.agentId);return l.length?l.map(([i,f])=>Q(i,f,u)).join(`
|
|
3
3
|
`):a?"You have no schedules.":"No schedules."}if(!e?.agentId)return"Error: caller agent is unknown (AGENTX_AGENT_ID not set). Pass callerAgentId.";if(!h.agents?.[e.agentId])return`Error: caller "${e.agentId}" is not an agent on this node.`;let o=s(n.id),m=a=>C(a,{configPath:t.configPath,reload:t.reload});if(r==="create"){let a=s(n.when),l=s(n.prompt);if(!a||!l)return"Error: create needs `when` (plain English) and `prompt`.";let i=D(a);if(!i)return`Error: couldn't parse "${a}". ${O}.`;let f=s(n.agent)||e.agentId;if(!h.agents?.[f])return`Error: agent "${f}" not found on this node.`;let g=s(n.timezone)||q;if(!B(g))return`Error: unknown timezone "${g}".`;let d=o||_(i.matched,f);if(!R(d))return`Error: invalid id "${d}" (letters, digits, "-" and "_" only).`;if(p[d])return`Error: a schedule "${d}" already exists. Pick another \`id\`.`;let $=K(n,e);if($==="invalid")return'Error: `notify` must be "here", "none", or "channel:chatId".';let z={action:"create",requestedBy:e.agentId,requestedAt:u.toISOString()},L=b({parsed:i,agent:f,prompt:l,timezone:g,notify:$,enabled:!1,createdBy:e.agentId,approval:z}),v=await m(U=>I(U,`crons.${d}`,L));if(!v.success)return`Error: ${v.error}`;let N=w(E(i.cron,g,u),g),G=[`Schedule approval requested by ${e.agentId}`,`Create: ${d}`,`When: ${i.human} \u2014 cron \`${i.cron}\` (${g})`,`Next fire: ${N}`,`Agent: ${f}`,$?`Notify: ${$.channel} ${$.chatId}`:"Notify: none",`Prompt: ${A(l,400)}`,"",`Approve: agentx schedule approve ${d}`,`Reject: agentx schedule reject ${d}`].join(`
|
|
4
4
|
`),H=await k(h,t,G);return[`Requested schedule "${d}": ${i.human} (cron ${i.cron}, ${g}); next fire would be ${N}.`,"It is saved DISABLED and will not run until the operator approves it.",H].join(`
|
|
5
5
|
`)}if(!o)return`Error: ${r} needs \`id\`.`;let c=p[o];if(!c)return`Error: schedule "${o}" not found.`;if(!Y(h,c,e))return Z(o,c);if(r==="pause"||r==="resume"){let a=r==="resume";if(a&&y(c))return`"${o}" is still awaiting operator approval; it can't be resumed until approved.`;if(c.enabled===a)return`"${o}" is already ${a?"active":"paused"}.`;let l=await m(i=>I(i,`crons.${o}.enabled`,a));return l.success?`"${o}" ${a?"resumed":"paused"}.`:`Error: ${l.error}`}if(r==="delete"){if(y(c)&&c.approval.requestedBy===e.agentId){let d=await m($=>P($,`crons.${o}`));return d.success?`Withdrew the pending request "${o}".`:`Error: ${d.error}`}if(y(c))return`"${o}" is a creation request still awaiting approval; only its requester or the operator (\`agentx schedule reject ${o}\`) can drop it.`;if(c.approval?.action==="delete")return`Deletion of "${o}" is already awaiting approval.`;let a={action:"delete",requestedBy:e.agentId,requestedAt:u.toISOString()},l=await m(d=>{if(!x(d,`crons.${o}`))throw new Error(`schedule "${o}" not found`);I(d,`crons.${o}.approval`,a)});if(!l.success)return`Error: ${l.error}`;let i=c.timezone||"UTC",f=[`Schedule approval requested by ${e.agentId}`,`Delete: ${o}`,`When: ${S(c.schedule)} \u2014 cron \`${c.schedule}\` (${i})`,`Next fire: ${c.enabled?w(E(c.schedule,i,u),i):"\u2014 (paused)"}`,`Agent: ${c.agent}`,"",`Approve: agentx schedule approve ${o}`,`Reject: agentx schedule reject ${o}`].join(`
|
|
6
6
|
`),g=await k(h,t,f);return[`Deletion of "${o}" requested. It keeps its current state until the operator approves.`,g].join(`
|
|
7
7
|
`)}return`Error: unknown action "${r}". Use list, create, pause, resume or delete.`}function oe(n,e=process.env){let t=s(e.AGENTX_AGENT_ID)||s(n.callerAgentId);if(!t)return null;let r=!!(s(e.AGENTX_CHANNEL)&&s(e.AGENTX_CHAT_ID)),u=s(r?e.AGENTX_CHANNEL:n.channel),h=s(r?e.AGENTX_CHAT_ID:n.chatId),p=s(n.accountId);return{agentId:t,channel:u,chatId:h,...p?{accountId:p}:{}}}export{oe as resolveScheduleCaller,re as runScheduleTool};
|
|
8
|
-
//# sourceMappingURL=schedule-tool-
|
|
8
|
+
//# sourceMappingURL=schedule-tool-3EFQMD2F.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h as a,i as b,j as c,k as d}from"./chunk-VCT7ZPIA.js";import"./chunk-J63MRNXF.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-L2WSPY6S.js";import"./chunk-ANLKBCYH.js";import"./chunk-FIOB3MEX.js";export{d as CronScheduler,c as cronRunId,b as getNextCronDate,a as runLinkIds};
|
|
2
|
+
//# sourceMappingURL=scheduler-NT4YXVA6.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}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}from"./chunk-BZLHS3VF.js";import"./chunk-F4HZTZHW.js";import"./chunk-AJONZWLT.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-ANLKBCYH.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";i();export{h as askSeat,a as configureDecisions,c as decisionsRuntime,f as getSeatMode,d as parseSeatMode,g as recordSeatOutcome,b as resetDecisionsRuntime,e as seatEnvVar};
|
|
2
|
+
//# sourceMappingURL=seat-STLDEYSO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{v as S,w}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=select-
|
|
1
|
+
import{v as S,w}from"./chunk-BZLHS3VF.js";import{a as g,b as h,f as R}from"./chunk-F4HZTZHW.js";import"./chunk-AJONZWLT.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import{d as f}from"./chunk-VDMYBPYB.js";import"./chunk-ANLKBCYH.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.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-VP66P6XB.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=surface-usage-
|
|
1
|
+
import{a,b,c,d}from"./chunk-SFLF64Q3.js";import"./chunk-DJQA2CWD.js";import"./chunk-FIOB3MEX.js";export{c as commandPath,b as listSurfaceUse,a as recordSurfaceUse,d as shouldRecordCommand};
|
|
2
|
+
//# sourceMappingURL=surface-usage-FM2ZHGYE.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./chunk-VWTBHLMX.js";import{a as b}from"./chunk-BJWK7FPT.js";import{e as a}from"./chunk-KTM7HSEB.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import{a as c}from"./chunk-MDTKQZC6.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import"./chunk-BZLHS3VF.js";import"./chunk-F4HZTZHW.js";import"./chunk-AJONZWLT.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-ANLKBCYH.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{b as WikiHub,a as WikiStore,c as agenticQuery};
|
|
2
|
+
//# sourceMappingURL=wiki-SKIIAVCU.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.47.0",
|
|
4
4
|
"description": "AI operations layer for small and medium businesses. Routes Telegram, WhatsApp, GitLab, GitHub, crons, webhooks, and mesh tasks to AI agents. Web wizard for operators, CLI for engineers. Self-hosted.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|