agentix-cli 0.149.0 → 0.151.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 +0 -1
- package/apps/mac-helper/Sources/AgentXHelper/AXTree.swift +14 -2
- package/dist/{App-2O2UUZGG.js → App-WAWZFD66.js} +2 -2
- package/dist/{ChatApp-YU4NF63L.js → ChatApp-TRJIS3O4.js} +2 -2
- package/dist/{absorb-eval-WHWOJYDX.js → absorb-eval-CFWLHUTB.js} +2 -2
- package/dist/{agent-NLCR6VBE.js → agent-6KCTPI7E.js} +2 -2
- package/dist/{board-dashboard-VPDXHHWC.js → board-dashboard-5V6RHW3E.js} +16 -16
- package/dist/{board-dashboard-VPDXHHWC.js.map → board-dashboard-5V6RHW3E.js.map} +1 -1
- package/dist/{chunk-GMMRBTLQ.js → chunk-2GJQDJBF.js} +2 -2
- package/dist/{chunk-AONY6U45.js → chunk-4GXJMHSA.js} +2 -2
- package/dist/{chunk-WGPMUWX7.js → chunk-5I7NJMK6.js} +3 -3
- package/dist/{chunk-XNS5OQ3U.js → chunk-6LFOX6Q5.js} +293 -283
- package/dist/chunk-6LFOX6Q5.js.map +1 -0
- package/dist/{chunk-ATCIRFH6.js → chunk-ALE354ZC.js} +2 -2
- package/dist/{chunk-GRI5HOPC.js → chunk-C5UTFHPB.js} +2 -2
- package/dist/{chunk-UZWF7PFH.js → chunk-CBML7UCP.js} +5 -5
- package/dist/{chunk-5QXRPYOY.js → chunk-CTQ25CUL.js} +2 -2
- package/dist/{chunk-JOHDOEZ4.js → chunk-DFGANY25.js} +2 -2
- package/dist/{chunk-EIY2HRAS.js → chunk-DJQIJF4R.js} +2 -2
- package/dist/{chunk-DWOERPBG.js → chunk-DWXCZRBJ.js} +2 -2
- package/dist/{chunk-5IHUZVPU.js → chunk-EJTKLVIW.js} +2 -2
- package/dist/{chunk-E7LPZAXP.js → chunk-ETBDN5WX.js} +2 -2
- package/dist/{chunk-6TJNWUMA.js → chunk-FGJNSYHM.js} +3 -3
- package/dist/{chunk-NW4N67TU.js → chunk-IMITYHBT.js} +2 -2
- package/dist/chunk-L6IW6HWE.js +64 -0
- package/dist/chunk-L6IW6HWE.js.map +1 -0
- package/dist/{chunk-IGA3T3ZT.js → chunk-LVS5ESTS.js} +2 -2
- package/dist/chunk-O7SYQXKS.js +181 -0
- package/dist/chunk-O7SYQXKS.js.map +1 -0
- package/dist/chunk-OSH2PEBH.js +2 -0
- package/dist/{chunk-JXF54PT7.js.map → chunk-OSH2PEBH.js.map} +1 -1
- package/dist/{chunk-QZ6VBDMX.js → chunk-PUSBK2OQ.js} +8 -8
- package/dist/chunk-PUSBK2OQ.js.map +1 -0
- package/dist/{chunk-OWMKQ4HZ.js → chunk-Q5NLNLD5.js} +2 -2
- package/dist/{chunk-S22IBRY6.js → chunk-RGJZV5RY.js} +2 -2
- package/dist/{chunk-NMYC5RW7.js → chunk-TZZBGWLX.js} +2 -2
- package/dist/{chunk-3HVRWULP.js → chunk-UALK4F3W.js} +2 -2
- package/dist/chunk-V3VWYIJ3.js +7 -0
- package/dist/chunk-V3VWYIJ3.js.map +1 -0
- package/dist/{chunk-6QFDFYI7.js → chunk-X3T2GCSI.js} +2 -2
- package/dist/chunk-X6C6U4GL.js +5 -0
- package/dist/chunk-X6C6U4GL.js.map +1 -0
- package/dist/{chunk-2MW32M2D.js → chunk-XD7HTMOP.js} +2 -2
- package/dist/{chunk-6YNRLI6I.js → chunk-XVJXXELY.js} +2 -2
- package/dist/{chunk-BZ6Y264Z.js → chunk-YGDJV4ZZ.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{client-A2N6ETK2.js → client-VT7GT3SK.js} +2 -2
- package/dist/{config-2QM2WTI2.js → config-NZS2UTHI.js} +2 -2
- package/dist/{config-mutate-UJS4F7BT.js → config-mutate-LINLC354.js} +2 -2
- package/dist/config-mutator-FUMSW5HD.js +2 -0
- package/dist/{contributions-43FWZOGF.js → contributions-67B3BYLV.js} +2 -2
- package/dist/doctor-FOKX4K2G.js +2 -0
- package/dist/{follow-up-tool-VB7K6HCL.js → follow-up-tool-JOIOYOON.js} +2 -2
- package/dist/{grants-2S33F2LV.js → grants-QXF7N6SS.js} +2 -2
- package/dist/{hub-JNNNUAZM.js → hub-QETWDYPD.js} +2 -2
- package/dist/index.d.ts +42 -0
- package/dist/index.js +1 -1
- package/dist/{program-OTENO5DS.js → program-XFZBG3EI.js} +209 -209
- package/dist/program-XFZBG3EI.js.map +1 -0
- package/dist/{promote-VFYVWVTL.js → promote-WNYNTGKC.js} +2 -2
- package/dist/{query-RB2MU2HV.js → query-ZU2DDCEH.js} +2 -2
- package/dist/{query-settings-5B54WHCS.js → query-settings-BXRIJWWO.js} +2 -2
- package/dist/{registry-6OX7U6FV.js → registry-7BITIEQ2.js} +2 -2
- package/dist/{request-planner-TUHVEYSF.js → request-planner-DLQP2NV6.js} +2 -2
- package/dist/{review-candidates-FDYTGG2N.js → review-candidates-3BMHLIBW.js} +2 -2
- package/dist/{routing-U35SFPEI.js → routing-FVZCQJ6T.js} +2 -2
- package/dist/schedule-tool-TDVJHRQX.js +2 -0
- package/dist/{scheduler-H2QHWNQ2.js → scheduler-SYI5MZ3H.js} +2 -2
- package/dist/{seat-EB3KJMIE.js → seat-6JF7BYM7.js} +2 -2
- package/dist/{select-IU4IOVSO.js → select-JT4I3JOH.js} +2 -2
- package/dist/{set-enabled-64BSJ7LR.js → set-enabled-JRGFKA3S.js} +2 -2
- package/dist/{tool-B23ACEHV.js → tool-P6GVYNDO.js} +2 -2
- package/dist/{tool-W3CIQZJ7.js → tool-UDOUNWQT.js} +2 -2
- package/dist/{wiki-4KMRUD5C.js → wiki-MTZHDFHK.js} +2 -2
- package/dist/wiki-enrich-CHR4RCRE.js +2 -0
- package/package.json +1 -1
- package/dist/chunk-A76PNG4E.js +0 -4
- package/dist/chunk-A76PNG4E.js.map +0 -1
- package/dist/chunk-JXF54PT7.js +0 -2
- package/dist/chunk-P34VSROA.js +0 -7
- package/dist/chunk-P34VSROA.js.map +0 -1
- package/dist/chunk-PXKIPU27.js +0 -64
- package/dist/chunk-PXKIPU27.js.map +0 -1
- package/dist/chunk-QZ6VBDMX.js.map +0 -1
- package/dist/chunk-XNS5OQ3U.js.map +0 -1
- package/dist/chunk-Z7GEW2SR.js +0 -174
- package/dist/chunk-Z7GEW2SR.js.map +0 -1
- package/dist/config-mutator-VWR3SMD3.js +0 -2
- package/dist/doctor-IN6MWP6I.js +0 -2
- package/dist/program-OTENO5DS.js.map +0 -1
- package/dist/schedule-tool-EPQKUYJX.js +0 -2
- package/dist/wiki-enrich-N4GLW2JX.js +0 -2
- /package/dist/{App-2O2UUZGG.js.map → App-WAWZFD66.js.map} +0 -0
- /package/dist/{ChatApp-YU4NF63L.js.map → ChatApp-TRJIS3O4.js.map} +0 -0
- /package/dist/{absorb-eval-WHWOJYDX.js.map → absorb-eval-CFWLHUTB.js.map} +0 -0
- /package/dist/{agent-NLCR6VBE.js.map → agent-6KCTPI7E.js.map} +0 -0
- /package/dist/{chunk-GMMRBTLQ.js.map → chunk-2GJQDJBF.js.map} +0 -0
- /package/dist/{chunk-AONY6U45.js.map → chunk-4GXJMHSA.js.map} +0 -0
- /package/dist/{chunk-WGPMUWX7.js.map → chunk-5I7NJMK6.js.map} +0 -0
- /package/dist/{chunk-ATCIRFH6.js.map → chunk-ALE354ZC.js.map} +0 -0
- /package/dist/{chunk-GRI5HOPC.js.map → chunk-C5UTFHPB.js.map} +0 -0
- /package/dist/{chunk-UZWF7PFH.js.map → chunk-CBML7UCP.js.map} +0 -0
- /package/dist/{chunk-5QXRPYOY.js.map → chunk-CTQ25CUL.js.map} +0 -0
- /package/dist/{chunk-JOHDOEZ4.js.map → chunk-DFGANY25.js.map} +0 -0
- /package/dist/{chunk-EIY2HRAS.js.map → chunk-DJQIJF4R.js.map} +0 -0
- /package/dist/{chunk-DWOERPBG.js.map → chunk-DWXCZRBJ.js.map} +0 -0
- /package/dist/{chunk-5IHUZVPU.js.map → chunk-EJTKLVIW.js.map} +0 -0
- /package/dist/{chunk-E7LPZAXP.js.map → chunk-ETBDN5WX.js.map} +0 -0
- /package/dist/{chunk-6TJNWUMA.js.map → chunk-FGJNSYHM.js.map} +0 -0
- /package/dist/{chunk-NW4N67TU.js.map → chunk-IMITYHBT.js.map} +0 -0
- /package/dist/{chunk-IGA3T3ZT.js.map → chunk-LVS5ESTS.js.map} +0 -0
- /package/dist/{chunk-OWMKQ4HZ.js.map → chunk-Q5NLNLD5.js.map} +0 -0
- /package/dist/{chunk-S22IBRY6.js.map → chunk-RGJZV5RY.js.map} +0 -0
- /package/dist/{chunk-NMYC5RW7.js.map → chunk-TZZBGWLX.js.map} +0 -0
- /package/dist/{chunk-3HVRWULP.js.map → chunk-UALK4F3W.js.map} +0 -0
- /package/dist/{chunk-6QFDFYI7.js.map → chunk-X3T2GCSI.js.map} +0 -0
- /package/dist/{chunk-2MW32M2D.js.map → chunk-XD7HTMOP.js.map} +0 -0
- /package/dist/{chunk-6YNRLI6I.js.map → chunk-XVJXXELY.js.map} +0 -0
- /package/dist/{chunk-BZ6Y264Z.js.map → chunk-YGDJV4ZZ.js.map} +0 -0
- /package/dist/{client-A2N6ETK2.js.map → client-VT7GT3SK.js.map} +0 -0
- /package/dist/{config-2QM2WTI2.js.map → config-NZS2UTHI.js.map} +0 -0
- /package/dist/{config-mutate-UJS4F7BT.js.map → config-mutate-LINLC354.js.map} +0 -0
- /package/dist/{config-mutator-VWR3SMD3.js.map → config-mutator-FUMSW5HD.js.map} +0 -0
- /package/dist/{contributions-43FWZOGF.js.map → contributions-67B3BYLV.js.map} +0 -0
- /package/dist/{doctor-IN6MWP6I.js.map → doctor-FOKX4K2G.js.map} +0 -0
- /package/dist/{follow-up-tool-VB7K6HCL.js.map → follow-up-tool-JOIOYOON.js.map} +0 -0
- /package/dist/{grants-2S33F2LV.js.map → grants-QXF7N6SS.js.map} +0 -0
- /package/dist/{hub-JNNNUAZM.js.map → hub-QETWDYPD.js.map} +0 -0
- /package/dist/{promote-VFYVWVTL.js.map → promote-WNYNTGKC.js.map} +0 -0
- /package/dist/{query-RB2MU2HV.js.map → query-ZU2DDCEH.js.map} +0 -0
- /package/dist/{query-settings-5B54WHCS.js.map → query-settings-BXRIJWWO.js.map} +0 -0
- /package/dist/{registry-6OX7U6FV.js.map → registry-7BITIEQ2.js.map} +0 -0
- /package/dist/{request-planner-TUHVEYSF.js.map → request-planner-DLQP2NV6.js.map} +0 -0
- /package/dist/{review-candidates-FDYTGG2N.js.map → review-candidates-3BMHLIBW.js.map} +0 -0
- /package/dist/{routing-U35SFPEI.js.map → routing-FVZCQJ6T.js.map} +0 -0
- /package/dist/{schedule-tool-EPQKUYJX.js.map → schedule-tool-TDVJHRQX.js.map} +0 -0
- /package/dist/{scheduler-H2QHWNQ2.js.map → scheduler-SYI5MZ3H.js.map} +0 -0
- /package/dist/{seat-EB3KJMIE.js.map → seat-6JF7BYM7.js.map} +0 -0
- /package/dist/{select-IU4IOVSO.js.map → select-JT4I3JOH.js.map} +0 -0
- /package/dist/{set-enabled-64BSJ7LR.js.map → set-enabled-JRGFKA3S.js.map} +0 -0
- /package/dist/{tool-B23ACEHV.js.map → tool-P6GVYNDO.js.map} +0 -0
- /package/dist/{tool-W3CIQZJ7.js.map → tool-UDOUNWQT.js.map} +0 -0
- /package/dist/{wiki-4KMRUD5C.js.map → wiki-MTZHDFHK.js.map} +0 -0
- /package/dist/{wiki-enrich-N4GLW2JX.js.map → wiki-enrich-CHR4RCRE.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as _,r as W}from"./chunk-2AXFYDWF.js";import{b as Y,c as I,d as O}from"./chunk-AQASR6KR.js";import{b as F}from"./chunk-MEFPXHQJ.js";import{a as E}from"./chunk-
|
|
1
|
+
import{q as _,r as W}from"./chunk-2AXFYDWF.js";import{b as Y,c as I,d as O}from"./chunk-AQASR6KR.js";import{b as F}from"./chunk-MEFPXHQJ.js";import{a as E}from"./chunk-DWXCZRBJ.js";import{b as L}from"./chunk-KEXBEUSU.js";import{createHash as ee}from"crypto";import{existsSync as H,readdirSync as te,readFileSync as re,writeFileSync as ne}from"fs";import{resolve as P}from"path";function be(n,r,s,t,o,i,c="",p="",m=""){return Z(r,s,t,o,i,c,p,m)}function Z(n,r,s,t,o,i="",c="",p=""){let m=r?`
|
|
2
2
|
## Worldview
|
|
3
3
|
|
|
4
4
|
${r}
|
|
@@ -249,4 +249,4 @@ ${u}`}var x="memory-promoter",oe=["project","reference","feedback"],K="_memory-p
|
|
|
249
249
|
Re-emit the FULL corrected JSON object \u2014 same structure, fixed issues, valid JSON only.`:n,y=await t(`${a}/task`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:r.viaAgent,message:h,freshSession:s===null,context:{channel:"api",chatId:r.chatId??"memory-promote"}}),signal:i.signal});if(!y.ok){let f=await y.text().catch(()=>"");throw new Error(`agent /task ${y.status}: ${f.slice(0,500)}`)}let w=await y.json();if(w.error)throw new Error(`agent reported error: ${w.error}`);let b=String(w.content??"").trim();if(!b)throw new Error("agent returned empty content");return b}if(!r.model)throw new Error("callPromotionLlm: viaAgent or model is required");let p=process.env.ANTHROPIC_API_KEY;if(!p)throw new Error("ANTHROPIC_API_KEY not set; use --via <agentId> instead");let m=[{role:"user",content:n}];s&&(m.push({role:"assistant",content:"(previous attempt; will retry with corrections)"}),m.push({role:"user",content:`Your previous response failed validation: ${s}
|
|
250
250
|
Re-emit the FULL corrected JSON object.`}));let u=await t(me,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":p,"anthropic-version":ge},body:JSON.stringify({model:r.model,max_tokens:8e3,messages:m}),signal:i.signal});if(!u.ok){let a=await u.text().catch(()=>"");throw new Error(`anthropic API ${u.status}: ${a.slice(0,500)}`)}let d=await u.json(),e=(Array.isArray(d.content)?d.content:[]).filter(a=>a?.type==="text").map(a=>a.text).join(`
|
|
251
251
|
`).trim();if(!e)throw new Error("anthropic API returned no text content");return e}finally{clearTimeout(c)}}async function Se(n={}){let r=n.wikiDir??P(process.cwd(),".agentx","wiki"),s=n.memoryRoot??P(process.cwd(),".agentx"),t=n.log??(()=>{}),o=n.now??Date.now(),i={candidates:[],clusters:[],proposed:[],skipped:[],gaps:[],warnings:[],errors:[],dryRun:!n.commit},c=new E(r,(...l)=>t(l.map(String).join(" "))),p=c.rebuildIndex(),m=z(r),u=[...ce(s),...n.extraCandidates??[]];if(i.candidates=de(u,p,m,{types:n.types,sinceMs:n.sinceMs,agentFilter:n.agentFilter,now:o,max:n.max}),i.candidates.length===0)return t("no unpromoted memories in window"),i;if(i.clusters=le(i.candidates),i.dryRun)return i;let d=p.articles.map(l=>({title:l.title,path:l.path,type:l.type})),g=c.getWorldview()??"",e=n.budgetTokens??ue,a=i.clusters,h=D(x,a,d,g);for(;R(h)>e&&a.length>1;)a=a.slice(0,-1),h=D(x,a,d,g);if(R(h)>e)return i.errors.push(`judge prompt (~${R(h)} tokens) exceeds the ${e}-token budget even with one cluster`),i;a.length<i.clusters.length&&i.warnings.push(`token budget: judged ${a.length} of ${i.clusters.length} clusters; the rest wait for the next run`);let y=a.flatMap(l=>l.candidates),w=new Set(y.map(l=>l.stamp)),b=n.chatId??`memory-promote-${new Date(o).toISOString().slice(0,10)}`,f=B(await G(h,{...n,chatId:b}),w);if("error"in f&&(t(`parse failed (${f.error}) \u2014 retrying with feedback`),f=B(await G(h,{...n,chatId:b},f.error),w)),"error"in f)return i.errors.push(`LLM response unusable after retry: ${f.error}`),i;i.warnings.push(...f.warnings),i.gaps=f.gaps;let v=new Date(o).toISOString(),k=[],T=new Map(y.map(l=>[l.stamp,l]));for(let l of f.articles){let A=c.readArticle(l.path);if(A&&!c.canWrite(A.meta,x)){i.errors.push(`write denied for "${l.path}" (owned by ${A.meta.owner??"?"})`);continue}let M=fe(l.promotedFrom,T),S={id:Y(o,l.path),createdAt:v,status:"pending",article:l,evidence:M,...A?{replaces:{lastUpdated:A.meta.lastUpdated,contentHash:V(A.content)}}:{}};I(r,S),i.proposed.push({id:S.id,path:l.path,title:l.title,type:l.type,stamps:l.promotedFrom,agents:M.agents,occurrences:M.occurrences});for(let X of l.promotedFrom)k.push({stamp:X,decision:"proposed",article:l.path,proposal:S.id,at:v})}for(let l of f.skipped)k.push({stamp:l.stamp,decision:"skipped",reason:l.reason,at:v}),i.skipped.push(l);return k.length&&C(r,k),i}var ue=6e4;function R(n){return Math.ceil(n.length/4)}function V(n){return ee("sha256").update(n).digest("hex").slice(0,16)}var he=600;function ye(n){return n.startsWith("review:")?"review":n.startsWith(j)?"failure":"memory"}function fe(n,r){let s=[];for(let t of n){let o=r.get(t);o&&s.push({stamp:t,kind:ye(t),agentId:o.agentId,type:o.memory.type,name:o.memory.name,description:o.memory.description,...o.occurrences?{occurrences:o.occurrences}:{},...o.sessions?.length?{sessions:o.sessions}:{},...o.tasks?.length?{tasks:o.tasks}:{},...o.failure?{failure:o.failure}:{},...o.memory.author?{author:o.memory.author}:{},...o.memory.taskId?{taskId:o.memory.taskId}:{},updatedAt:o.memory.updatedAt,excerpt:o.memory.body.slice(0,he)})}return{agents:[...new Set(s.map(t=>t.agentId))].sort(),occurrences:Math.max(1,...s.map(t=>t.occurrences??1)),sources:s}}function Ee(n,r,s={}){let t=O(n,r);if(!t)return{ok:!1,error:`no proposal "${r}"`};if(t.status!=="pending")return{ok:!1,error:`proposal "${r}" is already ${t.status}`};let o=s.log??(()=>{}),i=new E(n,(...a)=>o(a.map(String).join(" "))),{article:c}=t,p=i.readArticle(c.path);if(!s.force){if(p&&!t.replaces)return{ok:!1,error:`"${c.path}" was created after this proposal; review it, then approve with --force`};if(p&&t.replaces&&V(p.content)!==t.replaces.contentHash)return{ok:!1,error:`"${c.path}" changed since this proposal; review it, then approve with --force`}}let m=s.now??Date.now(),u=new Date(m).toISOString().slice(0,10);if(!i.writeArticle(c.path,{title:c.title,type:L(c.type)?c.type:void 0,related:c.related,tags:c.tags,owner:x,access:"public",created:p?.meta.created??u,lastUpdated:u,sources:ae(p?.meta.sources,c.promotedFrom)},c.content,x))return{ok:!1,error:`write denied for "${c.path}" (owned by ${p?.meta.owner??"?"})`};let g=new Date(m).toISOString();C(n,c.promotedFrom.map(a=>({stamp:a,decision:"promoted",article:c.path,proposal:r,at:g}))),i.rebuildIndex();let e={...t,status:"approved",decidedBy:s.by??"operator",decidedAt:g};return I(n,e),{ok:!0,proposal:e}}function Oe(n,r,s={}){let t=O(n,r);if(!t)return{ok:!1,error:`no proposal "${r}"`};if(t.status!=="pending")return{ok:!1,error:`proposal "${r}" is already ${t.status}`};let o=new Date(s.now??Date.now()).toISOString();C(n,t.article.promotedFrom.map(c=>({stamp:c,decision:"rejected",article:t.article.path,proposal:r,reason:s.reason,at:o})));let i={...t,status:"rejected",decidedBy:s.by??"operator",decidedAt:o,...s.reason?{reason:s.reason}:{}};return I(n,i),{ok:!0,proposal:i}}export{be as a,x as b,oe as c,K as d,q as e,ie as f,$ as g,ae as h,ce as i,z as j,C as k,le as l,B as m,de as n,G as o,Se as p,R as q,ye as r,fe as s,Ee as t,Oe as u};
|
|
252
|
-
//# sourceMappingURL=chunk-
|
|
252
|
+
//# sourceMappingURL=chunk-LVS5ESTS.js.map
|