agentix-cli 0.152.0 → 0.153.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-NCB3Y5DS.js → App-2SWSYFED.js} +2 -2
- package/dist/{ChatApp-HOWN5H7Y.js → ChatApp-NYTNFLIB.js} +2 -2
- package/dist/{absorb-eval-JXRNSZII.js → absorb-eval-SYX5QN4H.js} +2 -2
- package/dist/{agent-DMXUUMEU.js → agent-UCYQELAQ.js} +2 -2
- package/dist/{board-dashboard-POWARL34.js → board-dashboard-OZJSS6EM.js} +8 -5
- package/dist/{board-dashboard-POWARL34.js.map → board-dashboard-OZJSS6EM.js.map} +1 -1
- package/dist/{chunk-QSNKF5VD.js → chunk-2J2OES2S.js} +2 -2
- package/dist/{chunk-HS7ATV4Z.js → chunk-3LU2ZQZJ.js} +2 -2
- package/dist/{chunk-CZEBLLZQ.js → chunk-3OPW64OM.js} +2 -2
- package/dist/{chunk-MTBY46CL.js → chunk-5DPN2HIR.js} +5 -5
- package/dist/{chunk-SQUTRMKH.js → chunk-5VPU5FHB.js} +7 -7
- package/dist/{chunk-SQUTRMKH.js.map → chunk-5VPU5FHB.js.map} +1 -1
- package/dist/{chunk-XE3CGJV4.js → chunk-BFONYVOM.js} +2 -2
- package/dist/{chunk-PC24JMEH.js → chunk-CFPRIE6F.js} +2 -2
- package/dist/{chunk-JHAQE46R.js → chunk-D6U37WO3.js} +18 -18
- package/dist/chunk-D6U37WO3.js.map +1 -0
- package/dist/{chunk-P25TJ4XN.js → chunk-DPSHY7GN.js} +3 -3
- package/dist/{chunk-PGLTBNGZ.js → chunk-FVRREIVV.js} +2 -2
- package/dist/{chunk-7UH3DXAG.js → chunk-GDLO7FC7.js} +2 -2
- package/dist/{chunk-RNAKP7WY.js → chunk-HVNWI63Z.js} +2 -2
- package/dist/{chunk-TNZBQAUR.js → chunk-I45WFYGM.js} +2 -2
- package/dist/{chunk-P4EZJIQ4.js → chunk-IJQ2UUMZ.js} +282 -266
- package/dist/chunk-IJQ2UUMZ.js.map +1 -0
- package/dist/{chunk-YJZQRFET.js → chunk-JPZBWHNZ.js} +2 -2
- package/dist/{chunk-GI5CY27P.js → chunk-LH3GOBZP.js} +2 -2
- package/dist/{chunk-YBUCVI45.js → chunk-MM3ABEOW.js} +2 -2
- package/dist/chunk-MOCDP7Q3.js +36 -0
- package/dist/chunk-MOCDP7Q3.js.map +1 -0
- package/dist/{chunk-E4V5EADX.js → chunk-MWYPW5XP.js} +2 -2
- package/dist/{chunk-JDX7AYIB.js → chunk-P24P43ZB.js} +2 -2
- package/dist/{chunk-LOTCKF22.js → chunk-RJCHFDF3.js} +2 -2
- package/dist/{chunk-DZUJP6L7.js → chunk-RUQMUDSX.js} +2 -2
- package/dist/{chunk-UFYKUC4E.js → chunk-S5FRIHWM.js} +2 -2
- package/dist/{chunk-ADG6NBZY.js → chunk-SW6HCRLU.js} +4 -4
- package/dist/chunk-SW6HCRLU.js.map +1 -0
- package/dist/{chunk-ILZRO6SN.js → chunk-UUVJX6WD.js} +2 -2
- package/dist/{chunk-LDLRDBAD.js → chunk-Z2KGUEB6.js} +2 -2
- package/dist/{chunk-VIZVF6KH.js → chunk-ZQONMM3B.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{client-6IOWB5AT.js → client-PBIUMGDL.js} +2 -2
- package/dist/{config-SHIT5WJE.js → config-VLH5DJTH.js} +2 -2
- package/dist/{config-mutate-6ACI5COM.js → config-mutate-G7HW2R6H.js} +2 -2
- package/dist/config-mutator-XWWW3PSV.js +2 -0
- package/dist/{contributions-N7K6LNL7.js → contributions-GZVKJXSJ.js} +2 -2
- package/dist/{doctor-T7QAQRCJ.js → doctor-UT32WKCP.js} +2 -2
- package/dist/{follow-up-tool-HQ2GWF4K.js → follow-up-tool-PTKDMFA7.js} +2 -2
- package/dist/{hub-53IMEYGX.js → hub-BHCBRQZP.js} +2 -2
- package/dist/index.d.ts +217 -2
- package/dist/index.js +1 -1
- package/dist/{program-LSXONKPW.js → program-NU6QIXJJ.js} +192 -192
- package/dist/program-NU6QIXJJ.js.map +1 -0
- package/dist/{promote-626PE5VM.js → promote-73ZGTRDV.js} +2 -2
- package/dist/{query-GR3SOD6A.js → query-KHW4AERR.js} +2 -2
- package/dist/{query-settings-6XZHNFXE.js → query-settings-P6RUUEFO.js} +2 -2
- package/dist/{registry-SAY7ROZV.js → registry-RQBXAPUZ.js} +2 -2
- package/dist/{request-planner-DWYXUVF4.js → request-planner-EUIMJ7R3.js} +2 -2
- package/dist/{review-candidates-GXWMKZKA.js → review-candidates-KKGDAZIB.js} +2 -2
- package/dist/{routing-TB6BBRH4.js → routing-FQNGOTMV.js} +2 -2
- package/dist/schedule-tool-2OWGAK4H.js +2 -0
- package/dist/{scheduler-VOZIMG5F.js → scheduler-JXZBVPOS.js} +2 -2
- package/dist/{seat-H6F6H55Y.js → seat-DZB3NSZ7.js} +2 -2
- package/dist/{select-OUBL6EMZ.js → select-YD4CA7FP.js} +2 -2
- package/dist/{set-enabled-NYJHFXHY.js → set-enabled-UK4SE5MZ.js} +2 -2
- package/dist/{tool-FWATXW5Q.js → tool-2PA2USUG.js} +2 -2
- package/dist/{tool-HXFGNBLS.js → tool-DIJN4XBY.js} +2 -2
- package/dist/{wiki-PG5ZBOMH.js → wiki-CQBXLZ2Y.js} +2 -2
- package/dist/wiki-enrich-PA6JS2YN.js +2 -0
- package/package.json +1 -1
- package/dist/chunk-ADG6NBZY.js.map +0 -1
- package/dist/chunk-JHAQE46R.js.map +0 -1
- package/dist/chunk-JJOLZPUY.js +0 -35
- package/dist/chunk-JJOLZPUY.js.map +0 -1
- package/dist/chunk-P4EZJIQ4.js.map +0 -1
- package/dist/config-mutator-LAEX6HOH.js +0 -2
- package/dist/program-LSXONKPW.js.map +0 -1
- package/dist/schedule-tool-EI2SRMZM.js +0 -2
- package/dist/wiki-enrich-BIQZWJRB.js +0 -2
- /package/dist/{App-NCB3Y5DS.js.map → App-2SWSYFED.js.map} +0 -0
- /package/dist/{ChatApp-HOWN5H7Y.js.map → ChatApp-NYTNFLIB.js.map} +0 -0
- /package/dist/{absorb-eval-JXRNSZII.js.map → absorb-eval-SYX5QN4H.js.map} +0 -0
- /package/dist/{agent-DMXUUMEU.js.map → agent-UCYQELAQ.js.map} +0 -0
- /package/dist/{chunk-QSNKF5VD.js.map → chunk-2J2OES2S.js.map} +0 -0
- /package/dist/{chunk-HS7ATV4Z.js.map → chunk-3LU2ZQZJ.js.map} +0 -0
- /package/dist/{chunk-CZEBLLZQ.js.map → chunk-3OPW64OM.js.map} +0 -0
- /package/dist/{chunk-MTBY46CL.js.map → chunk-5DPN2HIR.js.map} +0 -0
- /package/dist/{chunk-XE3CGJV4.js.map → chunk-BFONYVOM.js.map} +0 -0
- /package/dist/{chunk-PC24JMEH.js.map → chunk-CFPRIE6F.js.map} +0 -0
- /package/dist/{chunk-P25TJ4XN.js.map → chunk-DPSHY7GN.js.map} +0 -0
- /package/dist/{chunk-PGLTBNGZ.js.map → chunk-FVRREIVV.js.map} +0 -0
- /package/dist/{chunk-7UH3DXAG.js.map → chunk-GDLO7FC7.js.map} +0 -0
- /package/dist/{chunk-RNAKP7WY.js.map → chunk-HVNWI63Z.js.map} +0 -0
- /package/dist/{chunk-TNZBQAUR.js.map → chunk-I45WFYGM.js.map} +0 -0
- /package/dist/{chunk-YJZQRFET.js.map → chunk-JPZBWHNZ.js.map} +0 -0
- /package/dist/{chunk-GI5CY27P.js.map → chunk-LH3GOBZP.js.map} +0 -0
- /package/dist/{chunk-YBUCVI45.js.map → chunk-MM3ABEOW.js.map} +0 -0
- /package/dist/{chunk-E4V5EADX.js.map → chunk-MWYPW5XP.js.map} +0 -0
- /package/dist/{chunk-JDX7AYIB.js.map → chunk-P24P43ZB.js.map} +0 -0
- /package/dist/{chunk-LOTCKF22.js.map → chunk-RJCHFDF3.js.map} +0 -0
- /package/dist/{chunk-DZUJP6L7.js.map → chunk-RUQMUDSX.js.map} +0 -0
- /package/dist/{chunk-UFYKUC4E.js.map → chunk-S5FRIHWM.js.map} +0 -0
- /package/dist/{chunk-ILZRO6SN.js.map → chunk-UUVJX6WD.js.map} +0 -0
- /package/dist/{chunk-LDLRDBAD.js.map → chunk-Z2KGUEB6.js.map} +0 -0
- /package/dist/{chunk-VIZVF6KH.js.map → chunk-ZQONMM3B.js.map} +0 -0
- /package/dist/{client-6IOWB5AT.js.map → client-PBIUMGDL.js.map} +0 -0
- /package/dist/{config-SHIT5WJE.js.map → config-VLH5DJTH.js.map} +0 -0
- /package/dist/{config-mutate-6ACI5COM.js.map → config-mutate-G7HW2R6H.js.map} +0 -0
- /package/dist/{config-mutator-LAEX6HOH.js.map → config-mutator-XWWW3PSV.js.map} +0 -0
- /package/dist/{contributions-N7K6LNL7.js.map → contributions-GZVKJXSJ.js.map} +0 -0
- /package/dist/{doctor-T7QAQRCJ.js.map → doctor-UT32WKCP.js.map} +0 -0
- /package/dist/{follow-up-tool-HQ2GWF4K.js.map → follow-up-tool-PTKDMFA7.js.map} +0 -0
- /package/dist/{hub-53IMEYGX.js.map → hub-BHCBRQZP.js.map} +0 -0
- /package/dist/{promote-626PE5VM.js.map → promote-73ZGTRDV.js.map} +0 -0
- /package/dist/{query-GR3SOD6A.js.map → query-KHW4AERR.js.map} +0 -0
- /package/dist/{query-settings-6XZHNFXE.js.map → query-settings-P6RUUEFO.js.map} +0 -0
- /package/dist/{registry-SAY7ROZV.js.map → registry-RQBXAPUZ.js.map} +0 -0
- /package/dist/{request-planner-DWYXUVF4.js.map → request-planner-EUIMJ7R3.js.map} +0 -0
- /package/dist/{review-candidates-GXWMKZKA.js.map → review-candidates-KKGDAZIB.js.map} +0 -0
- /package/dist/{routing-TB6BBRH4.js.map → routing-FQNGOTMV.js.map} +0 -0
- /package/dist/{schedule-tool-EI2SRMZM.js.map → schedule-tool-2OWGAK4H.js.map} +0 -0
- /package/dist/{scheduler-VOZIMG5F.js.map → scheduler-JXZBVPOS.js.map} +0 -0
- /package/dist/{seat-H6F6H55Y.js.map → seat-DZB3NSZ7.js.map} +0 -0
- /package/dist/{select-OUBL6EMZ.js.map → select-YD4CA7FP.js.map} +0 -0
- /package/dist/{set-enabled-NYJHFXHY.js.map → set-enabled-UK4SE5MZ.js.map} +0 -0
- /package/dist/{tool-FWATXW5Q.js.map → tool-2PA2USUG.js.map} +0 -0
- /package/dist/{tool-HXFGNBLS.js.map → tool-DIJN4XBY.js.map} +0 -0
- /package/dist/{wiki-PG5ZBOMH.js.map → wiki-CQBXLZ2Y.js.map} +0 -0
- /package/dist/{wiki-enrich-BIQZWJRB.js.map → wiki-enrich-PA6JS2YN.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{d as h}from"./chunk-
|
|
1
|
+
import{d as h}from"./chunk-FVRREIVV.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-UUVJX6WD.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-HVNWI63Z.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-Z2KGUEB6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as d}from"./chunk-LH3GOBZP.js";import{b as i,c as u,d as l,e as c}from"./chunk-BFONYVOM.js";import f from"cronstrue";var p=Intl.DateTimeFormat().resolvedOptions().timeZone,m=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"',g=/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;function w(e){return g.test(e)}function x(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return!1}}function $(e){return e?e.split(",").map(r=>r.trim().toLowerCase()).filter(r=>r==="log"||r==="notify"||r==="disable"):["log"]}function S(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||p,agent:e.agent,prompt:e.prompt,timeout:e.timeout??m,onError:r};return e.model&&(t.model=e.model),e.notify&&(t.notify=e.notify),e.notify&&e.deliverResult===!1&&(t.deliverResult=!1),e.createdBy&&(t.createdBy=e.createdBy),e.approval&&(t.approval=e.approval),t}function P(e){try{return f.toString(e,{use24HourTimeFormat:!1})}catch{return e}}function T(e,r,t=new Date){try{return d(e,t,r)}catch{return null}}function A(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 h(e){return e?.approval?.action==="create"}async function D(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&&h(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{p as a,E as b,w as c,x as d,$ as e,S as f,P as g,T as h,A as i,h as j,D as k,I as l,O as m};
|
|
2
|
+
//# sourceMappingURL=chunk-ZQONMM3B.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{b as o}from"./chunk-OSH2PEBH.js";import"./chunk-QIJLFPWE.js";var e=o(process.versions.node);e&&(console.error(e),process.exit(1));var{buildProgram:s}=await import("./program-
|
|
2
|
+
import{b as o}from"./chunk-OSH2PEBH.js";import"./chunk-QIJLFPWE.js";var e=o(process.versions.node);e&&(console.error(e),process.exit(1));var{buildProgram:s}=await import("./program-NU6QIXJJ.js"),{installCliSignalExit:r}=await import("./signal-exit-WL7G3EEZ.js"),{applyConnectAttemptTimeout:i,configPathFromArgv:a,readConnectAttemptTimeout:n}=await import("./net-family-X2P3OVDP.js");r();i(n(process.cwd(),a(process.argv.slice(2))));var t=await s();process.argv.slice(2).length===0?t.outputHelp():t.parse();
|
|
3
3
|
//# sourceMappingURL=cli.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=client-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"./chunk-3OPW64OM.js";import"./chunk-5VPU5FHB.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{b as fetchAgents,d as fetchCrons,c as fetchProcesses,e as killProcess,a as resolveConn,f as sendTask,g as streamTask};
|
|
2
|
+
//# sourceMappingURL=client-PBIUMGDL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Aa as g,Ba as h,Ca as i,Da as j,Ea as k,Fa as l,Ga as m,Ha as n,Ia as o,Ja as p,Ka as q,La as r,Ma as s,Na as t,Oa as u,Pa as v,Qa as w,Ra as x,Sa as y,Ua as z,ua as a,va as b,wa as c,xa as d,ya as e,za as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=config-
|
|
1
|
+
import{Aa as g,Ba as h,Ca as i,Da as j,Ea as k,Fa as l,Ga as m,Ha as n,Ia as o,Ja as p,Ka as q,La as r,Ma as s,Na as t,Oa as u,Pa as v,Qa as w,Ra as x,Sa as y,Ua as z,ua as a,va as b,wa as c,xa as d,ya as e,za as f}from"./chunk-5VPU5FHB.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";z();export{a as INTEGRATION_KINDS,u as WIKI_CONTRIBUTE_JOB,v as WIKI_CONTRIBUTE_MERGE_JOB,x as WIKI_SUMMARIZE_JOB,o as approvalsConfigSchema,e as callsSchema,c as cameraBotSchema,s as crossFieldProblems,p as daemonConfigSchema,b as eventSubscriptionSchema,q as expandEnvVars,d as isCronExpression,r as loadDaemonConfig,l as membersConfigSchema,g as mergePolicyConfigSchema,k as peopleConfigSchema,j as personSchema,n as qualityReportConfigSchema,m as requestStatusConfigSchema,i as requestsConfigSchema,f as reviewGateConfigSchema,t as validateWorkspaces,h as watchersConfigSchema,w as withContributionJobs,y as withSummariesJob};
|
|
2
|
+
//# sourceMappingURL=config-VLH5DJTH.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=config-mutate-
|
|
1
|
+
import{a,b}from"./chunk-CFPRIE6F.js";import"./chunk-5VPU5FHB.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{a as mutateAgentxConfig,b as writeAgentxConfig};
|
|
2
|
+
//# sourceMappingURL=config-mutate-G7HW2R6H.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-BFONYVOM.js";import"./chunk-5VPU5FHB.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{b as applyConfigMutation,a as findConfigPath,d as getAtPath,c as setAtPath,e as unsetAtPath};
|
|
2
|
+
//# sourceMappingURL=config-mutator-XWWW3PSV.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ee}from"./chunk-
|
|
1
|
+
import{a as ee}from"./chunk-UUVJX6WD.js";import"./chunk-FVRREIVV.js";import{f as Q,k as V}from"./chunk-5TTHN7DP.js";import{b as O}from"./chunk-PE5V2LI7.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-OWNQ2FD4.js";import{b as X}from"./chunk-KEXBEUSU.js";import"./chunk-DPSHY7GN.js";import"./chunk-SKSYII3K.js";import"./chunk-RJCHFDF3.js";import"./chunk-WPNRDEHW.js";import"./chunk-MWNCS57L.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-HVNWI63Z.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-6TURWSMN.js";import"./chunk-QD6IICK7.js";import{b as N,c as H}from"./chunk-QOYAX2FT.js";import"./chunk-JNG3P5V2.js";import"./chunk-7I7IEX4S.js";import"./chunk-5VPU5FHB.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";import{createHash as le}from"crypto";import{existsSync as z,mkdirSync as ne,readdirSync as re,readFileSync as ge,renameSync as se,writeFileSync as pe}from"fs";import{resolve as w}from"path";var _={maxPatches:30,maxCostUsd:.5,maxItems:60},he=12,fe=2e3,me=1500,M=8,U=300,be=12,B="## Checked facts";function S(n){return w(n,"_contributions")}function E(n,r){if(!z(n))return r;try{return JSON.parse(ge(n,"utf-8"))}catch(t){throw new Error(`${n} is not valid JSON: ${t.message}`)}}function L(n,r){ne(w(n,".."),{recursive:!0});let t=`${n}.${process.pid}.tmp`;pe(t,`${JSON.stringify(r,null,2)}
|
|
2
2
|
`),se(t,n)}function ie(n){return{agents:E(w(S(n),"state.json"),{agents:{}}).agents??{}}}function ye(n){let r=w(S(n),"pending");return z(r)?re(r).filter(t=>t.endsWith(".json")).sort().map(t=>E(w(r,t),null)).filter(t=>!!t):[]}function G(n){return w(S(n),"held.json")}function K(n,r={}){let t=E(G(n),[]);return r.all?t:t.filter(a=>a.status==="held")}function _e(n){let r=w(S(n),"reports");if(!z(r))return null;let t=re(r).filter(a=>a.endsWith(".json")).sort().pop();return t?E(w(r,t),null):null}function ke(n,r,t,a={}){let o=ie(r).agents[t],c=a.now??Date.now(),e=a.since??o?.lastRunAt??new Date(c-864e5).toISOString(),d=e.slice(0,10),u=new Set(o?.processed??[]),s=[];for(let g of n.getAgentEntries(t))g.date<d||u.has(g.id)||s.push({id:g.id,at:g.date,kind:"chat",title:[g.source,g.sourceContext].filter(Boolean).join(" \xB7 "),text:g.content});if(a.db){let g=Date.parse(e);for(let l of V(a.db,{agentId:t,since:Number.isFinite(g)?g:void 0,limit:500})){if(l.status==="in-flight"||u.has(l.taskId))continue;let k=(Q(a.db,l.taskId)?.steps??[]).filter(b=>b.name==="tool_use"||b.action).slice(0,be).map(b=>`- ${b.action??b.name}${b.inputSummary?` ${x(b.inputSummary,160)}`:""}${b.outputSummary?` \u2192 ${x(b.outputSummary,240)}`:""}${b.error?` \u2717 ${x(b.error,120)}`:""}`),y=[`Request: ${x(l.originalMessage??l.messagePreview??"",600)}`,k.length?`Tool calls:
|
|
3
3
|
${k.join(`
|
|
4
4
|
`)}`:"",l.finalResponse?`Reply: ${x(l.finalResponse,800)}`:""].filter(Boolean).join(`
|
|
@@ -54,4 +54,4 @@ _Sources: ${t.sources.join("; ")}._`,a);return n.writeArticle(r,{title:t.title,.
|
|
|
54
54
|
`).replace(/\n{3,}/g,`
|
|
55
55
|
|
|
56
56
|
`).trim(),superseded:d}}function Ce(n){let r=n.previous?` (previously: ${n.previous})`:"";return`- **${n.attribute}:** ${n.value} \u2014 ${n.source}; checked ${n.checkedAt.slice(0,10)} by ${n.by}${r}`}function Re(n){let r=n.match(/^- \*\*.+?:\*\* (.*?) — .*?; checked (\S+) by \S+(?: \(previously: (.*)\))?$/);return r?{value:r[1],checkedAt:r[2],...r[3]?{previous:r[3]}:{}}:void 0}function J(n,r){return`contribution:${n}@${r.slice(0,10)}`}var Te={person:"people",project:"projects",place:"places",concept:"concepts",event:"events",decision:"decisions",pattern:"patterns"};function de(n,r,t){let a=r.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,60)||"page",o=t?Te[t]:"contributions",c=`${o}/${a}.md`;for(let e=2;n.readArticle(c);e++)c=`${o}/${a}-${e}.md`;return c}export{_ as DEFAULT_CONTRIBUTION_LIMITS,B as FACTS_HEADING,ue as applyFactLines,De as approveHeld,xe as buildContributionPrompt,S as contributionsDir,_e as latestReport,K as listHeld,ye as listPendingBatches,Be as mergeContributions,W as pageKey,Ae as parseContributionPatches,ke as pendingWork,Se as possibleDuplicate,Fe as rejectHeld,ce as replaceOnce,Me as runContribution};
|
|
57
|
-
//# sourceMappingURL=contributions-
|
|
57
|
+
//# sourceMappingURL=contributions-GZVKJXSJ.js.map
|
|
@@ -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}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=doctor-
|
|
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}from"./chunk-P24P43ZB.js";import"./chunk-MOCDP7Q3.js";import"./chunk-IMLAPB7G.js";import"./chunk-24QMHUU2.js";import"./chunk-MNG2AMKZ.js";import"./chunk-KP7KDLZ2.js";import"./chunk-OSH2PEBH.js";import"./chunk-5VPU5FHB.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{i as daemonVoiceCheck,b as doctor,g as meshPeerTokenChecks,h as meshTokenChecksFromConfig,a as runDoctorChecks,e as runMirrorChecks,d as runNativeChecks,c as runNotificationChecks,f as runReminderChecks};
|
|
2
|
+
//# sourceMappingURL=doctor-UT32WKCP.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{b as h}from"./chunk-
|
|
1
|
+
import{b as h}from"./chunk-I45WFYGM.js";import"./chunk-RKPAVWXF.js";import"./chunk-ZQONMM3B.js";import{b as I}from"./chunk-PYHR4HXO.js";import"./chunk-KP7KDLZ2.js";import"./chunk-LH3GOBZP.js";import"./chunk-BFONYVOM.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-5VPU5FHB.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";var p=t=>typeof t=="string"?t.trim():"";function $(t){return[`Run ${t.runId} "${t.title}" [${t.status}] on step ${t.step}: waiting on ${t.waitingOn}.`,t.tags?.length?`Tags: ${t.tags.join(", ")}`:"",...(t.steps??[]).slice(-8).map(s=>`- ${String(s.at).slice(0,16).replace("T"," ")} ${s.step} ${s.status}${s.note?`: ${s.note}`:""}`)].filter(Boolean).join(`
|
|
2
2
|
`)}async function T(t,c){let s=c.fetch??fetch,m=c.daemonUrl.replace(/\/$/,""),r=(p(t.action)||"list").toLowerCase(),f=c.env??process.env,w=async i=>{let l=await s(`${m}${i}`,{signal:AbortSignal.timeout(1e4)}),n=await l.json().catch(()=>({}));return{ok:l.ok,status:l.status,data:n}};try{if(r==="list"){let e=await w("/follow-up");if(!e.ok)return`Error: ${e.data?.error||`HTTP ${e.status}`}`;let o=e.data.groups??[];return o.length?o.map(d=>[`${d.tag}:`,...d.rows.map(a=>`- ${a.runId} "${a.title}" on ${a.step}: waiting on ${a.waitingOn} (since ${String(a.since).slice(0,16).replace("T"," ")} UTC)`)].join(`
|
|
3
3
|
`)).join(`
|
|
4
4
|
`):"No follow-up workflows are running."}if(r==="match"){let e=p(t.request)||p(t.title);if(!e)return"Error: match needs `request`: the owner's request in their words.";let o=h(t,f),d=await w(`/follow-up/match?q=${encodeURIComponent(e)}${o?`&agentId=${encodeURIComponent(o.agentId)}`:""}`);if(!d.ok)return`Error: ${d.data?.error||`HTTP ${d.status}`}`;let a=d.data.matches??[];return a.length?["Saved workflows, best fit first (confidence 0-1):",...a.map(u=>`- ${u.workflowId} "${u.title}" (${u.confidence}${u.autoStart?", starts without asking":""}): ${u.steps.map(k=>k.id).join(" \u2192 ")}`),'Start one with {action:"start", workflowId:"<id>", title:"\u2026", tags:["client:<name>"]}. Run its steps through the workflow, not by hand.'].join(`
|
|
5
5
|
`):"No saved workflow fits. If the request has several steps, build one: start with title and steps."}if(r==="status"){let e=p(t.runId);if(!e)return"Error: status needs runId.";let o=await w(`/follow-up/${encodeURIComponent(e)}`);return o.ok?$(o.data.run):`Error: ${o.data?.error||`HTTP ${o.status}`}`}let i=h(t,f);if(!i)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=await s(`${m}/follow-up`,{method:"POST",headers:{"Content-Type":"application/json",...I(f)},body:JSON.stringify({action:r,agentId:i.agentId,workflowId:t.workflowId,title:t.title,description:t.description,tags:t.tags,inputs:t.inputs,steps:t.steps,edges:t.edges,approval:t.approval,autoStart:t.autoStart,requestId:t.requestId,runId:t.runId,step:t.step,evidence:t.evidence,note:t.note,reason:t.reason,fromRun:t.fromRun,status:t.status}),signal:AbortSignal.timeout(2e4)}),n=await l.json().catch(()=>({}));if(!l.ok)return`Error: ${n?.error||`HTTP ${l.status}`}`;if(r==="start"){let e=n.run;return[`Started run ${e.runId} "${e.title}"${n.built?" (built from the steps you gave; propose it with fromRun to keep it)":""}.`,n.awaitingApproval?"It waits for the owner's approval before the first step.":`It is on step ${e.step}: ${e.waitingOn}.`,"AgentX follows it from here: it starts each step, reminds whoever is slow, and tells the owner when it ends. Do not run its steps by hand.",...n.warning?[`Note: ${n.warning}`]:[]].join(" ")}return r==="plan"?[`Plan recorded on run ${n.run?.runId??t.runId}:`,...(n.plan??[]).map(e=>`- ${e.id} ${e.title}`),'Report each step with {action:"step", runId, step:"<id>", status:"started"|"done"|"failed"}.'].join(`
|
|
6
6
|
`):r==="step"?`Step recorded. ${n.run?$(n.run):""}`.trim():r==="done"?`Step recorded as done. ${n.run?$(n.run):""}`.trim():r==="blocked"?"The step is marked blocked and the owner is told. Nothing more happens on it until it is sorted.":`Saved ${n.workflowId} switched off, and asked the owner (card ${n.cardId}) whether to keep it as a reusable workflow.`}catch(i){return`Error: couldn't reach the daemon (${i?.message??i}).`}}export{T as runWorkflowTool};
|
|
7
|
-
//# sourceMappingURL=follow-up-tool-
|
|
7
|
+
//# sourceMappingURL=follow-up-tool-PTKDMFA7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=hub-
|
|
1
|
+
import{a}from"./chunk-RUQMUDSX.js";import"./chunk-JPZBWHNZ.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-RJCHFDF3.js";import"./chunk-WPNRDEHW.js";import"./chunk-HVNWI63Z.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-QOYAX2FT.js";import"./chunk-JNG3P5V2.js";import"./chunk-7I7IEX4S.js";import"./chunk-5VPU5FHB.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{a as WikiHub};
|
|
2
|
+
//# sourceMappingURL=hub-BHCBRQZP.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { IncomingMessage as IncomingMessage$1, ServerResponse } from 'http';
|
|
3
|
+
import Database from 'better-sqlite3';
|
|
3
4
|
import { PackageJson } from 'type-fest';
|
|
4
5
|
|
|
5
6
|
interface GenerationMessage {
|
|
@@ -5118,11 +5119,16 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
5118
5119
|
/** Image for the AgentX Helper icon on banners (.png, .jpg, .icns).
|
|
5119
5120
|
* Unset: the AgentX logo. Applied by `agentx desktop install`. */
|
|
5120
5121
|
icon: z.ZodOptional<z.ZodString>;
|
|
5122
|
+
/** Seconds the sound waits while something else speaks on this
|
|
5123
|
+
* machine (#1126); still speaking after that, the banner shows
|
|
5124
|
+
* without it. 0: never wait. */
|
|
5125
|
+
quietWaitSeconds: z.ZodDefault<z.ZodNumber>;
|
|
5121
5126
|
}, "strip", z.ZodTypeAny, {
|
|
5122
5127
|
sound: boolean;
|
|
5123
5128
|
banner: boolean;
|
|
5124
5129
|
soundName: string;
|
|
5125
5130
|
volume: number;
|
|
5131
|
+
quietWaitSeconds: number;
|
|
5126
5132
|
icon?: string | undefined;
|
|
5127
5133
|
}, {
|
|
5128
5134
|
sound?: boolean | undefined;
|
|
@@ -5130,6 +5136,34 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
5130
5136
|
soundName?: string | undefined;
|
|
5131
5137
|
volume?: number | undefined;
|
|
5132
5138
|
icon?: string | undefined;
|
|
5139
|
+
quietWaitSeconds?: number | undefined;
|
|
5140
|
+
}>>;
|
|
5141
|
+
/** The told-the-owner record (src/notify/told.ts, #1126): everything sent
|
|
5142
|
+
* to the owner's own addresses is recorded once, an item already told
|
|
5143
|
+
* on any of them is not told again, and system nags wait for the
|
|
5144
|
+
* daily digest (approvals.digest) instead of a push each. */
|
|
5145
|
+
told: z.ZodDefault<z.ZodObject<{
|
|
5146
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
5147
|
+
/** An item told within this many hours is not told again, on any channel. */
|
|
5148
|
+
repeatWindowHours: z.ZodDefault<z.ZodNumber>;
|
|
5149
|
+
/** Channels that only ever reach the owner: everything on them passes the gate. */
|
|
5150
|
+
channels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
5151
|
+
/** Other owner addresses, as "channel:chatId" (a private Telegram chat). */
|
|
5152
|
+
addresses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
5153
|
+
/** Nags wait for the daily digest. Off: each is sent like any notice. */
|
|
5154
|
+
digestNags: z.ZodDefault<z.ZodBoolean>;
|
|
5155
|
+
}, "strip", z.ZodTypeAny, {
|
|
5156
|
+
enabled: boolean;
|
|
5157
|
+
channels: string[];
|
|
5158
|
+
repeatWindowHours: number;
|
|
5159
|
+
addresses: string[];
|
|
5160
|
+
digestNags: boolean;
|
|
5161
|
+
}, {
|
|
5162
|
+
enabled?: boolean | undefined;
|
|
5163
|
+
channels?: string[] | undefined;
|
|
5164
|
+
repeatWindowHours?: number | undefined;
|
|
5165
|
+
addresses?: string[] | undefined;
|
|
5166
|
+
digestNags?: boolean | undefined;
|
|
5133
5167
|
}>>;
|
|
5134
5168
|
}, "strip", z.ZodTypeAny, {
|
|
5135
5169
|
local: {
|
|
@@ -5137,6 +5171,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
5137
5171
|
banner: boolean;
|
|
5138
5172
|
soundName: string;
|
|
5139
5173
|
volume: number;
|
|
5174
|
+
quietWaitSeconds: number;
|
|
5140
5175
|
icon?: string | undefined;
|
|
5141
5176
|
};
|
|
5142
5177
|
on: {
|
|
@@ -5145,6 +5180,13 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
5145
5180
|
taskQueued: boolean;
|
|
5146
5181
|
};
|
|
5147
5182
|
longTaskThreshold: number;
|
|
5183
|
+
told: {
|
|
5184
|
+
enabled: boolean;
|
|
5185
|
+
channels: string[];
|
|
5186
|
+
repeatWindowHours: number;
|
|
5187
|
+
addresses: string[];
|
|
5188
|
+
digestNags: boolean;
|
|
5189
|
+
};
|
|
5148
5190
|
channel?: string | undefined;
|
|
5149
5191
|
destination?: {
|
|
5150
5192
|
channel: string;
|
|
@@ -5158,6 +5200,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
5158
5200
|
soundName?: string | undefined;
|
|
5159
5201
|
volume?: number | undefined;
|
|
5160
5202
|
icon?: string | undefined;
|
|
5203
|
+
quietWaitSeconds?: number | undefined;
|
|
5161
5204
|
} | undefined;
|
|
5162
5205
|
channel?: string | undefined;
|
|
5163
5206
|
on?: {
|
|
@@ -5171,6 +5214,13 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
5171
5214
|
chatId: string;
|
|
5172
5215
|
accountId?: string | undefined;
|
|
5173
5216
|
} | undefined;
|
|
5217
|
+
told?: {
|
|
5218
|
+
enabled?: boolean | undefined;
|
|
5219
|
+
channels?: string[] | undefined;
|
|
5220
|
+
repeatWindowHours?: number | undefined;
|
|
5221
|
+
addresses?: string[] | undefined;
|
|
5222
|
+
digestNags?: boolean | undefined;
|
|
5223
|
+
} | undefined;
|
|
5174
5224
|
}>>;
|
|
5175
5225
|
calls: z.ZodDefault<z.ZodObject<{
|
|
5176
5226
|
/** Agents allowed to call: ids, or "*" for every agent on this node.
|
|
@@ -6684,7 +6734,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
6684
6734
|
/** Pinned pages: https pages the owner opens from a button in the
|
|
6685
6735
|
* phone app (#1120). Added, renamed and removed from the app or with
|
|
6686
6736
|
* `agentx app pin`. */
|
|
6687
|
-
pins: z.ZodDefault<z.ZodObject<{
|
|
6737
|
+
pins: z.ZodDefault<z.ZodEffects<z.ZodObject<{
|
|
6688
6738
|
/** Where the list is kept. Relative paths resolve from the folder
|
|
6689
6739
|
* the daemon runs in (the one holding agentx.json). */
|
|
6690
6740
|
file: z.ZodDefault<z.ZodString>;
|
|
@@ -6716,6 +6766,20 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
6716
6766
|
label: string;
|
|
6717
6767
|
url: string;
|
|
6718
6768
|
}[] | undefined;
|
|
6769
|
+
}>, {
|
|
6770
|
+
max: number;
|
|
6771
|
+
file: string;
|
|
6772
|
+
pages: {
|
|
6773
|
+
label: string;
|
|
6774
|
+
url: string;
|
|
6775
|
+
}[];
|
|
6776
|
+
}, {
|
|
6777
|
+
max?: number | undefined;
|
|
6778
|
+
file?: string | undefined;
|
|
6779
|
+
pages?: {
|
|
6780
|
+
label: string;
|
|
6781
|
+
url: string;
|
|
6782
|
+
}[] | undefined;
|
|
6719
6783
|
}>>;
|
|
6720
6784
|
}, "strip", z.ZodTypeAny, {
|
|
6721
6785
|
android: {
|
|
@@ -9538,6 +9602,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
9538
9602
|
banner: boolean;
|
|
9539
9603
|
soundName: string;
|
|
9540
9604
|
volume: number;
|
|
9605
|
+
quietWaitSeconds: number;
|
|
9541
9606
|
icon?: string | undefined;
|
|
9542
9607
|
};
|
|
9543
9608
|
on: {
|
|
@@ -9546,6 +9611,13 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
9546
9611
|
taskQueued: boolean;
|
|
9547
9612
|
};
|
|
9548
9613
|
longTaskThreshold: number;
|
|
9614
|
+
told: {
|
|
9615
|
+
enabled: boolean;
|
|
9616
|
+
channels: string[];
|
|
9617
|
+
repeatWindowHours: number;
|
|
9618
|
+
addresses: string[];
|
|
9619
|
+
digestNags: boolean;
|
|
9620
|
+
};
|
|
9549
9621
|
channel?: string | undefined;
|
|
9550
9622
|
destination?: {
|
|
9551
9623
|
channel: string;
|
|
@@ -10705,6 +10777,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
10705
10777
|
soundName?: string | undefined;
|
|
10706
10778
|
volume?: number | undefined;
|
|
10707
10779
|
icon?: string | undefined;
|
|
10780
|
+
quietWaitSeconds?: number | undefined;
|
|
10708
10781
|
} | undefined;
|
|
10709
10782
|
channel?: string | undefined;
|
|
10710
10783
|
on?: {
|
|
@@ -10718,6 +10791,13 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
10718
10791
|
chatId: string;
|
|
10719
10792
|
accountId?: string | undefined;
|
|
10720
10793
|
} | undefined;
|
|
10794
|
+
told?: {
|
|
10795
|
+
enabled?: boolean | undefined;
|
|
10796
|
+
channels?: string[] | undefined;
|
|
10797
|
+
repeatWindowHours?: number | undefined;
|
|
10798
|
+
addresses?: string[] | undefined;
|
|
10799
|
+
digestNags?: boolean | undefined;
|
|
10800
|
+
} | undefined;
|
|
10721
10801
|
} | undefined;
|
|
10722
10802
|
calls?: {
|
|
10723
10803
|
summary?: boolean | undefined;
|
|
@@ -11949,6 +12029,9 @@ declare class AgentXDaemon {
|
|
|
11949
12029
|
}>;
|
|
11950
12030
|
/** Open requests (src/requests); null when the database is unavailable. */
|
|
11951
12031
|
private requests;
|
|
12032
|
+
/** The told-the-owner gate (#1126). Null without a database. */
|
|
12033
|
+
private ownerGate;
|
|
12034
|
+
private toldPrunedAt;
|
|
11952
12035
|
/** Guest meshes (#380): the grants this node opened, and the join limiter. */
|
|
11953
12036
|
private guestStore;
|
|
11954
12037
|
private guestJoinLimiter;
|
|
@@ -12005,7 +12088,9 @@ declare class AgentXDaemon {
|
|
|
12005
12088
|
/** GET /screen: every source read on its own, so one that fails is
|
|
12006
12089
|
* named and the rest still show. */
|
|
12007
12090
|
private screenView;
|
|
12008
|
-
/** Tell the owner about a request: a push, and the Mac banner.
|
|
12091
|
+
/** Tell the owner about a request: a push, and the Mac banner. `kind`
|
|
12092
|
+
* nag (a request that stopped) waits for the daily digest; its card is
|
|
12093
|
+
* on the Desk meanwhile (#1126). */
|
|
12009
12094
|
private notifyRequestOwner;
|
|
12010
12095
|
private plansSweeping;
|
|
12011
12096
|
private plansKick?;
|
|
@@ -12038,6 +12123,16 @@ declare class AgentXDaemon {
|
|
|
12038
12123
|
/** Tell the owner through the notify path: a push to the default
|
|
12039
12124
|
* channel, the Mac banner where there is one (#788). */
|
|
12040
12125
|
private notifyOwner;
|
|
12126
|
+
/** The one way the daemon tells the owner something (#1126). The gate
|
|
12127
|
+
* decides first: an item already told is not told again, and a nag
|
|
12128
|
+
* waits for the daily digest. Otherwise notify() sends it, held in
|
|
12129
|
+
* Focus or a call, with the Mac banner. Rejects only when nothing at all
|
|
12130
|
+
* reached the owner (the send failed and there is no banner), unless
|
|
12131
|
+
* `soft`: then the failure is only logged. */
|
|
12132
|
+
private tellOwner;
|
|
12133
|
+
/** The banner and sound for one notice on this machine. The sound waits
|
|
12134
|
+
* while something else speaks here (#1126). */
|
|
12135
|
+
private ownerAlert;
|
|
12041
12136
|
/** A card raised for a workflow (#788): a step's answer resumes its
|
|
12042
12137
|
* run; a proposed workflow is kept (switched on) on a yes. */
|
|
12043
12138
|
private workflowCardResult;
|
|
@@ -12583,6 +12678,17 @@ interface OutgoingMessage {
|
|
|
12583
12678
|
label: string;
|
|
12584
12679
|
url: string;
|
|
12585
12680
|
}>;
|
|
12681
|
+
/** For a message to the owner (#1126): what it is about, for the
|
|
12682
|
+
* told-the-owner gate (notify/told.ts). `passed`: the caller already
|
|
12683
|
+
* went through the gate, so the router does not decide again. */
|
|
12684
|
+
told?: {
|
|
12685
|
+
key?: string;
|
|
12686
|
+
requestId?: string;
|
|
12687
|
+
kind?: "notice" | "nag";
|
|
12688
|
+
urgent?: boolean;
|
|
12689
|
+
from?: string;
|
|
12690
|
+
passed?: boolean;
|
|
12691
|
+
};
|
|
12586
12692
|
}
|
|
12587
12693
|
interface ChannelAdapter {
|
|
12588
12694
|
readonly name: string;
|
|
@@ -17431,6 +17537,110 @@ declare class BusinessLayer {
|
|
|
17431
17537
|
summary(): string;
|
|
17432
17538
|
}
|
|
17433
17539
|
|
|
17540
|
+
type TellKind = "notice" | "nag";
|
|
17541
|
+
type TellOutcome = "sent" | "held" | "digest" | "repeat" | "failed";
|
|
17542
|
+
/** What a caller says about a message to the owner. All optional: a bare
|
|
17543
|
+
* message on an owner channel is a notice keyed by its text. */
|
|
17544
|
+
interface TellMeta {
|
|
17545
|
+
/** The item it is about. Same key, same item, whatever the channel. */
|
|
17546
|
+
key?: string;
|
|
17547
|
+
/** The open request it belongs to (requests, #356). */
|
|
17548
|
+
requestId?: string;
|
|
17549
|
+
kind?: TellKind;
|
|
17550
|
+
/** Goes now: no repeat check, no digest. */
|
|
17551
|
+
urgent?: boolean;
|
|
17552
|
+
/** Who is telling: an agent id, or a daemon part (requests, watchers). */
|
|
17553
|
+
from?: string;
|
|
17554
|
+
/** Without a key, the text is the key: only for notices (the daemon's
|
|
17555
|
+
* own, `agentx notify`), never for an agent's answer, which may well
|
|
17556
|
+
* say the same thing twice on purpose. */
|
|
17557
|
+
textKey?: boolean;
|
|
17558
|
+
}
|
|
17559
|
+
interface ToldRow {
|
|
17560
|
+
id: number;
|
|
17561
|
+
at: number;
|
|
17562
|
+
key: string;
|
|
17563
|
+
requestId: string | null;
|
|
17564
|
+
kind: TellKind;
|
|
17565
|
+
channel: string;
|
|
17566
|
+
chatId: string;
|
|
17567
|
+
from: string | null;
|
|
17568
|
+
title: string;
|
|
17569
|
+
text: string;
|
|
17570
|
+
outcome: TellOutcome;
|
|
17571
|
+
digestedAt: number | null;
|
|
17572
|
+
}
|
|
17573
|
+
interface TellSettings {
|
|
17574
|
+
enabled: boolean;
|
|
17575
|
+
repeatWindowHours: number;
|
|
17576
|
+
channels: string[];
|
|
17577
|
+
addresses: string[];
|
|
17578
|
+
digestNags: boolean;
|
|
17579
|
+
/** A daily digest can go out (on, with a destination). False: a nag is
|
|
17580
|
+
* sent at once, or it would never reach anyone. Unset: true. */
|
|
17581
|
+
digestAvailable?: boolean;
|
|
17582
|
+
}
|
|
17583
|
+
declare class ToldLedger {
|
|
17584
|
+
private db;
|
|
17585
|
+
constructor(db: Database.Database);
|
|
17586
|
+
add(row: Omit<ToldRow, "id" | "digestedAt">): number;
|
|
17587
|
+
setOutcome(id: number, outcome: TellOutcome): void;
|
|
17588
|
+
/** The last time this item reached the owner, or was put in the digest
|
|
17589
|
+
* (unless `digest` is false: no digest will carry it), since `since`.
|
|
17590
|
+
* A failed send does not count: it never arrived. */
|
|
17591
|
+
lastTold(key: string, since: number, digest?: boolean): ToldRow | null;
|
|
17592
|
+
/** Nags waiting for the digest, oldest first. */
|
|
17593
|
+
waitingForDigest(limit?: number): ToldRow[];
|
|
17594
|
+
waitingCount(): number;
|
|
17595
|
+
markDigested(ids: number[], at: number): void;
|
|
17596
|
+
/** Rows since `since`, newest first. */
|
|
17597
|
+
since(since: number, limit?: number): ToldRow[];
|
|
17598
|
+
/** How many of each outcome since `since`: the before/after figure. */
|
|
17599
|
+
counts(since: number): Record<TellOutcome, number>;
|
|
17600
|
+
/** Delete rows older than `before`. */
|
|
17601
|
+
prune(before: number): number;
|
|
17602
|
+
}
|
|
17603
|
+
interface TellDecision {
|
|
17604
|
+
verdict: "send" | "repeat" | "digest";
|
|
17605
|
+
key: string | null;
|
|
17606
|
+
/** The row written for it; for send, update it with the outcome. */
|
|
17607
|
+
rowId: number;
|
|
17608
|
+
}
|
|
17609
|
+
/** The one gate. Synchronous, no I/O beyond the ledger. */
|
|
17610
|
+
declare class OwnerGate {
|
|
17611
|
+
private ledger;
|
|
17612
|
+
private settings;
|
|
17613
|
+
private now;
|
|
17614
|
+
constructor(ledger: ToldLedger, settings: () => TellSettings, now?: () => number);
|
|
17615
|
+
/** Is this address the owner's own? */
|
|
17616
|
+
isOwnerAddress(channel: string, chatId: string): boolean;
|
|
17617
|
+
/** Decide, and record the decision. A send is recorded as sent at once
|
|
17618
|
+
* and corrected with `outcome` once known. */
|
|
17619
|
+
decide(msg: {
|
|
17620
|
+
channel: string;
|
|
17621
|
+
chatId: string;
|
|
17622
|
+
title: string;
|
|
17623
|
+
text: string;
|
|
17624
|
+
}, meta?: TellMeta): TellDecision;
|
|
17625
|
+
outcome(rowId: number, outcome: TellOutcome): void;
|
|
17626
|
+
/** The digest line for every nag waiting, and how to clear them once
|
|
17627
|
+
* the digest went out. Null when none waits. */
|
|
17628
|
+
digestLine(): {
|
|
17629
|
+
line: string;
|
|
17630
|
+
ids: number[];
|
|
17631
|
+
} | null;
|
|
17632
|
+
markDigested(ids: number[]): void;
|
|
17633
|
+
/** What the owner was told since `since`: counts by outcome, and the
|
|
17634
|
+
* newest rows. */
|
|
17635
|
+
report(since: number, limit?: number): {
|
|
17636
|
+
counts: Record<TellOutcome, number>;
|
|
17637
|
+
waitingForDigest: number;
|
|
17638
|
+
items: ToldRow[];
|
|
17639
|
+
};
|
|
17640
|
+
/** Drop rows older than `days`. */
|
|
17641
|
+
prune(days: number): number;
|
|
17642
|
+
}
|
|
17643
|
+
|
|
17434
17644
|
/** A run that was still going when the previous daemon stopped. */
|
|
17435
17645
|
interface InterruptedRun {
|
|
17436
17646
|
taskId: string;
|
|
@@ -17467,6 +17677,11 @@ declare class MessageRouter {
|
|
|
17467
17677
|
private registry;
|
|
17468
17678
|
private config;
|
|
17469
17679
|
private channels;
|
|
17680
|
+
/** The told-the-owner gate (#1126). Unset: nothing is gated. */
|
|
17681
|
+
private ownerGate;
|
|
17682
|
+
/** Attach the told-the-owner gate: every send to the owner's own
|
|
17683
|
+
* addresses is recorded, repeats and nags are kept back. */
|
|
17684
|
+
setOwnerGate(gate: OwnerGate | null): void;
|
|
17470
17685
|
private hooks?;
|
|
17471
17686
|
private mesh?;
|
|
17472
17687
|
private serviceMatcher?;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ba as Tt,Ca as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt}from"./chunk-
|
|
1
|
+
import{Ba as Tt,Ca as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt}from"./chunk-IJQ2UUMZ.js";import"./chunk-D6U37WO3.js";import"./chunk-GTJIKXDB.js";import"./chunk-GDLO7FC7.js";import"./chunk-MOCDP7Q3.js";import"./chunk-7LN4VKDU.js";import"./chunk-IMLAPB7G.js";import"./chunk-ZVP6GB4G.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-MRIVENBY.js";import"./chunk-R4R7EYY3.js";import"./chunk-24QMHUU2.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-3LU2ZQZJ.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-EMGB23H5.js";import"./chunk-JAML6222.js";import"./chunk-YMX3QCV7.js";import"./chunk-JWDJMFU6.js";import"./chunk-5HLD66CW.js";import"./chunk-IS2IWRP7.js";import"./chunk-MNG2AMKZ.js";import"./chunk-X7UQY7CH.js";import"./chunk-ZQONMM3B.js";import"./chunk-PYHR4HXO.js";import"./chunk-KP7KDLZ2.js";import"./chunk-A5GYG56I.js";import{m as lt,n as ct,o as dt,p as mt,q as pt,ra as yt}from"./chunk-5DPN2HIR.js";import"./chunk-S5FRIHWM.js";import"./chunk-MEFPXHQJ.js";import{a as L}from"./chunk-IVBCCSDR.js";import{A as D,B as z,C as V,a as ye,b as we,c as Se,d as Ae,e as Ie,f as Oe,g as Ne,h as He,i as je,j as Ue,k as _e,l as I,m as q,n as Be,o as qe,p as Ye,q as O,r as ze,s as Ve,t as Xe,u as x,v as Y,w as Qe,x as Ze,y as et,z as wt}from"./chunk-MWYPW5XP.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-6TTGRTDO.js";import"./chunk-SZDACK6O.js";import"./chunk-VE3SSOQX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-5TTHN7DP.js";import{s as ut}from"./chunk-LH3GOBZP.js";import"./chunk-BFONYVOM.js";import"./chunk-3UOTLMXD.js";import"./chunk-36AXN6ZB.js";import"./chunk-PE5V2LI7.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-VWTBHLMX.js";import"./chunk-RUQMUDSX.js";import{a as ht}from"./chunk-JPZBWHNZ.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-DPSHY7GN.js";import"./chunk-SKSYII3K.js";import{f as gt,g as ft}from"./chunk-RJCHFDF3.js";import"./chunk-WPNRDEHW.js";import"./chunk-MWNCS57L.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-Z2KGUEB6.js";import{j as it,k as rt,l as at}from"./chunk-HVNWI63Z.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-6TURWSMN.js";import"./chunk-AV7T3SYT.js";import"./chunk-U23LVMMZ.js";import"./chunk-QD6IICK7.js";import"./chunk-QOYAX2FT.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-JNG3P5V2.js";import{a as m,b as G}from"./chunk-7I7IEX4S.js";import{b as Fe,c as Le,d as A,e as De}from"./chunk-JHCI6XCJ.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{Ja as tt,La as st,Na as ot,Ua as nt}from"./chunk-5VPU5FHB.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
|
|
2
2
|
`)}
|
|
3
3
|
|
|
4
4
|
${t}`}async function It(o){let{loadLocalSkills:e}=await import("./loader-YFVSSYSL.js");return e(o)}async function Ot(o,e,t,s,i){let a=[{role:"system",content:`You are a skill author for the Agent Skills ecosystem (skills.sh).
|