agentix-cli 0.205.0 → 0.206.1
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-JDW5V4HT.js → App-IEUOKINQ.js} +2 -2
- package/dist/{ChatApp-SNM2PORO.js → ChatApp-CCDBG6YZ.js} +2 -2
- package/dist/{absorb-eval-WDAV4AI2.js → absorb-eval-IIF7CY3Q.js} +2 -2
- package/dist/{adapter-C47BTKT6.js → adapter-LTHULD3D.js} +2 -2
- package/dist/{agent-EVMKJXJO.js → agent-TZ3GGNS5.js} +2 -2
- package/dist/{board-dashboard-VSDTP4Y7.js → board-dashboard-JS6OJDH6.js} +365 -351
- package/dist/board-dashboard-JS6OJDH6.js.map +1 -0
- package/dist/{chunk-AK46ORUI.js → chunk-37EABHYL.js} +2 -2
- package/dist/chunk-3AHYZLGE.js +115 -0
- package/dist/chunk-3AHYZLGE.js.map +1 -0
- package/dist/{chunk-PQUK6XEW.js → chunk-6U34GZ7U.js} +2 -2
- package/dist/{chunk-GWBFEVLO.js → chunk-6ZVVAGTR.js} +2 -2
- package/dist/{chunk-IU63JGY3.js → chunk-7GD5GTWC.js} +2 -2
- package/dist/{chunk-X6SXZDTY.js → chunk-7JHB3X5N.js} +16 -16
- package/dist/chunk-7JHB3X5N.js.map +1 -0
- package/dist/{chunk-SKCOIP5R.js → chunk-A2K6C6W3.js} +3 -3
- package/dist/{chunk-OLKYIKAZ.js → chunk-B35GIWMR.js} +2 -2
- package/dist/{chunk-DUCYRNCT.js → chunk-CARVBJB7.js} +20 -20
- package/dist/chunk-CARVBJB7.js.map +1 -0
- package/dist/{chunk-KRHVM26D.js → chunk-E2MW5OCE.js} +2 -2
- package/dist/{chunk-WJMYBRM5.js → chunk-FXA2WIIP.js} +2 -2
- package/dist/{chunk-KWZ6NMXZ.js → chunk-GCBFLU64.js} +10 -10
- package/dist/{chunk-S6YN3IBM.js → chunk-GJOKXP5D.js} +2 -2
- package/dist/{chunk-PQX2VJUA.js → chunk-I4753XPP.js} +45 -45
- package/dist/chunk-I4753XPP.js.map +1 -0
- package/dist/{chunk-2VSK6FAR.js → chunk-I74PTSUQ.js} +2 -2
- package/dist/{chunk-ERVJLPS4.js → chunk-JDU4CXGC.js} +2 -2
- package/dist/{chunk-DV42WUMD.js → chunk-K435U2FC.js} +2 -2
- package/dist/chunk-KEUW6YLL.js +2 -0
- package/dist/{chunk-VJ5HC63R.js.map → chunk-KEUW6YLL.js.map} +1 -1
- package/dist/{chunk-DOO4MUTS.js → chunk-KXMC7Z5X.js} +2 -2
- package/dist/chunk-LY4G7PCW.js +2 -0
- package/dist/chunk-LY4G7PCW.js.map +1 -0
- package/dist/{chunk-5STGF4MI.js → chunk-M37WJANA.js} +88 -88
- package/dist/chunk-M37WJANA.js.map +1 -0
- package/dist/{chunk-CXFVIDJV.js → chunk-R6XJWFMC.js} +2 -2
- package/dist/{chunk-245IOYDJ.js → chunk-RPL2P7EP.js} +2 -2
- package/dist/{chunk-UGRMFQAG.js → chunk-RRLQTU3X.js} +2 -2
- package/dist/{chunk-ZUHUCSGT.js → chunk-TLRTJV2U.js} +311 -303
- package/dist/chunk-TLRTJV2U.js.map +1 -0
- package/dist/{chunk-JT5PIBCM.js → chunk-U3OJO7B7.js} +2 -2
- package/dist/{chunk-RXX4MYFL.js → chunk-UN7D7HWU.js} +2 -2
- package/dist/{chunk-2P3SHT5I.js → chunk-VALKXSXZ.js} +2 -2
- package/dist/{chunk-CZVCT5ZV.js → chunk-WI7J22NL.js} +2 -2
- package/dist/{chunk-PTZNM2JU.js → chunk-WTCMJZW3.js} +2 -2
- package/dist/chunk-XL7UWG36.js +12 -0
- package/dist/chunk-XL7UWG36.js.map +1 -0
- package/dist/{chunk-IDGEDPRJ.js → chunk-XTIPWYW5.js} +2 -2
- package/dist/{chunk-QASIUKZJ.js → chunk-Z6J3RTYJ.js} +2 -2
- package/dist/{chunk-PW3WG6JT.js → chunk-ZOK6VMEP.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{client-WN7YI7DE.js → client-NPC2JAWL.js} +2 -2
- package/dist/{config-QUXKGIZX.js → config-TIMTRSFH.js} +2 -2
- package/dist/config-mutate-V3DRUCK4.js +2 -0
- package/dist/{config-mutator-OLLQR3ZD.js → config-mutator-HOYYIPNW.js} +2 -2
- package/dist/{contributions-LL7B4BP3.js → contributions-TYVRQG7F.js} +2 -2
- package/dist/doctor-TNQ4Q2OS.js +2 -0
- package/dist/{facts-ALJBF7IA.js → facts-XGZWX6CR.js} +2 -2
- package/dist/{follow-up-tool-I2HTKMP4.js → follow-up-tool-3P2YCRBL.js} +2 -2
- package/dist/{grants-5GIY7347.js → grants-TWDH3Z4K.js} +2 -2
- package/dist/hub-GVTRKPAU.js +2 -0
- package/dist/index.d.ts +107 -45
- package/dist/index.js +1 -1
- package/dist/{org-tool-JCGGJJU6.js → org-tool-EKO7GCPL.js} +2 -2
- package/dist/{program-7VNYZPRO.js → program-Y55FFHIJ.js} +86 -86
- package/dist/{promote-NSPUPPHB.js → promote-JYYV44FK.js} +2 -2
- package/dist/{query-VW63IHDI.js → query-PUWWCFET.js} +2 -2
- package/dist/{query-settings-RS7DJI4H.js → query-settings-IJPG3N6D.js} +2 -2
- package/dist/registry-QJGTPSK2.js +2 -0
- package/dist/{request-planner-HZWQIRZO.js → request-planner-HHJXCWCG.js} +2 -2
- package/dist/{review-candidates-2TXOUASP.js → review-candidates-XZUQELL5.js} +2 -2
- package/dist/rotation-memo-store-ZH6254YR.js +2 -0
- package/dist/rotation-memo-store-ZH6254YR.js.map +1 -0
- package/dist/{routing-ZV4VSZDV.js → routing-HWZHJ4LZ.js} +2 -2
- package/dist/schedule-tool-7W5CRUN4.js +2 -0
- package/dist/{scheduler-SAID6RKQ.js → scheduler-WG3KXJIH.js} +2 -2
- package/dist/{seat-XHBWBSTS.js → seat-5BOBWKBX.js} +2 -2
- package/dist/{select-QUCTTAH3.js → select-FIHHBFNR.js} +2 -2
- package/dist/{set-enabled-CGMXLFC6.js → set-enabled-K7OM7PSO.js} +2 -2
- package/dist/{sprint-tool-SWRYSX3Q.js → sprint-tool-O6TTSWJN.js} +2 -2
- package/dist/{tool-DA25L4ND.js → tool-4KVS2JWC.js} +2 -2
- package/dist/{tool-ELGOVIM5.js → tool-BYU6EZKM.js} +2 -2
- package/dist/{tool-MMH2JNP7.js → tool-HTUSCV22.js} +2 -2
- package/dist/{tool-6G63ZQW4.js → tool-HVCLZGYE.js} +2 -2
- package/dist/{wiki-4ZL4QXA7.js → wiki-ZMEMGR7R.js} +2 -2
- package/dist/wiki-enrich-QZHQV7VZ.js +2 -0
- package/dist/workspace-setup-GTSXWYU4.js +2 -0
- package/package.json +1 -1
- package/dist/board-dashboard-VSDTP4Y7.js.map +0 -1
- package/dist/chunk-36X7D4JA.js +0 -2
- package/dist/chunk-36X7D4JA.js.map +0 -1
- package/dist/chunk-5STGF4MI.js.map +0 -1
- package/dist/chunk-DUCYRNCT.js.map +0 -1
- package/dist/chunk-IFNXMUEG.js +0 -115
- package/dist/chunk-IFNXMUEG.js.map +0 -1
- package/dist/chunk-PQX2VJUA.js.map +0 -1
- package/dist/chunk-VJ5HC63R.js +0 -2
- package/dist/chunk-WDGATQV3.js +0 -12
- package/dist/chunk-WDGATQV3.js.map +0 -1
- package/dist/chunk-X6SXZDTY.js.map +0 -1
- package/dist/chunk-ZUHUCSGT.js.map +0 -1
- package/dist/config-mutate-HJH24ITC.js +0 -2
- package/dist/doctor-WJ5H7QQW.js +0 -2
- package/dist/hub-7ASBN76I.js +0 -2
- package/dist/registry-6KREAROB.js +0 -2
- package/dist/rotation-memo-store-WMDI7NND.js +0 -2
- package/dist/rotation-memo-store-WMDI7NND.js.map +0 -1
- package/dist/schedule-tool-D357NLXS.js +0 -2
- package/dist/wiki-enrich-N5MUKDVW.js +0 -2
- package/dist/workspace-setup-QXFJRNSK.js +0 -2
- /package/dist/{App-JDW5V4HT.js.map → App-IEUOKINQ.js.map} +0 -0
- /package/dist/{ChatApp-SNM2PORO.js.map → ChatApp-CCDBG6YZ.js.map} +0 -0
- /package/dist/{absorb-eval-WDAV4AI2.js.map → absorb-eval-IIF7CY3Q.js.map} +0 -0
- /package/dist/{adapter-C47BTKT6.js.map → adapter-LTHULD3D.js.map} +0 -0
- /package/dist/{agent-EVMKJXJO.js.map → agent-TZ3GGNS5.js.map} +0 -0
- /package/dist/{chunk-AK46ORUI.js.map → chunk-37EABHYL.js.map} +0 -0
- /package/dist/{chunk-PQUK6XEW.js.map → chunk-6U34GZ7U.js.map} +0 -0
- /package/dist/{chunk-GWBFEVLO.js.map → chunk-6ZVVAGTR.js.map} +0 -0
- /package/dist/{chunk-IU63JGY3.js.map → chunk-7GD5GTWC.js.map} +0 -0
- /package/dist/{chunk-SKCOIP5R.js.map → chunk-A2K6C6W3.js.map} +0 -0
- /package/dist/{chunk-OLKYIKAZ.js.map → chunk-B35GIWMR.js.map} +0 -0
- /package/dist/{chunk-KRHVM26D.js.map → chunk-E2MW5OCE.js.map} +0 -0
- /package/dist/{chunk-WJMYBRM5.js.map → chunk-FXA2WIIP.js.map} +0 -0
- /package/dist/{chunk-KWZ6NMXZ.js.map → chunk-GCBFLU64.js.map} +0 -0
- /package/dist/{chunk-S6YN3IBM.js.map → chunk-GJOKXP5D.js.map} +0 -0
- /package/dist/{chunk-2VSK6FAR.js.map → chunk-I74PTSUQ.js.map} +0 -0
- /package/dist/{chunk-ERVJLPS4.js.map → chunk-JDU4CXGC.js.map} +0 -0
- /package/dist/{chunk-DV42WUMD.js.map → chunk-K435U2FC.js.map} +0 -0
- /package/dist/{chunk-DOO4MUTS.js.map → chunk-KXMC7Z5X.js.map} +0 -0
- /package/dist/{chunk-CXFVIDJV.js.map → chunk-R6XJWFMC.js.map} +0 -0
- /package/dist/{chunk-245IOYDJ.js.map → chunk-RPL2P7EP.js.map} +0 -0
- /package/dist/{chunk-UGRMFQAG.js.map → chunk-RRLQTU3X.js.map} +0 -0
- /package/dist/{chunk-JT5PIBCM.js.map → chunk-U3OJO7B7.js.map} +0 -0
- /package/dist/{chunk-RXX4MYFL.js.map → chunk-UN7D7HWU.js.map} +0 -0
- /package/dist/{chunk-2P3SHT5I.js.map → chunk-VALKXSXZ.js.map} +0 -0
- /package/dist/{chunk-CZVCT5ZV.js.map → chunk-WI7J22NL.js.map} +0 -0
- /package/dist/{chunk-PTZNM2JU.js.map → chunk-WTCMJZW3.js.map} +0 -0
- /package/dist/{chunk-IDGEDPRJ.js.map → chunk-XTIPWYW5.js.map} +0 -0
- /package/dist/{chunk-QASIUKZJ.js.map → chunk-Z6J3RTYJ.js.map} +0 -0
- /package/dist/{chunk-PW3WG6JT.js.map → chunk-ZOK6VMEP.js.map} +0 -0
- /package/dist/{client-WN7YI7DE.js.map → client-NPC2JAWL.js.map} +0 -0
- /package/dist/{config-QUXKGIZX.js.map → config-TIMTRSFH.js.map} +0 -0
- /package/dist/{config-mutate-HJH24ITC.js.map → config-mutate-V3DRUCK4.js.map} +0 -0
- /package/dist/{config-mutator-OLLQR3ZD.js.map → config-mutator-HOYYIPNW.js.map} +0 -0
- /package/dist/{contributions-LL7B4BP3.js.map → contributions-TYVRQG7F.js.map} +0 -0
- /package/dist/{doctor-WJ5H7QQW.js.map → doctor-TNQ4Q2OS.js.map} +0 -0
- /package/dist/{facts-ALJBF7IA.js.map → facts-XGZWX6CR.js.map} +0 -0
- /package/dist/{follow-up-tool-I2HTKMP4.js.map → follow-up-tool-3P2YCRBL.js.map} +0 -0
- /package/dist/{grants-5GIY7347.js.map → grants-TWDH3Z4K.js.map} +0 -0
- /package/dist/{hub-7ASBN76I.js.map → hub-GVTRKPAU.js.map} +0 -0
- /package/dist/{org-tool-JCGGJJU6.js.map → org-tool-EKO7GCPL.js.map} +0 -0
- /package/dist/{program-7VNYZPRO.js.map → program-Y55FFHIJ.js.map} +0 -0
- /package/dist/{promote-NSPUPPHB.js.map → promote-JYYV44FK.js.map} +0 -0
- /package/dist/{query-VW63IHDI.js.map → query-PUWWCFET.js.map} +0 -0
- /package/dist/{query-settings-RS7DJI4H.js.map → query-settings-IJPG3N6D.js.map} +0 -0
- /package/dist/{registry-6KREAROB.js.map → registry-QJGTPSK2.js.map} +0 -0
- /package/dist/{request-planner-HZWQIRZO.js.map → request-planner-HHJXCWCG.js.map} +0 -0
- /package/dist/{review-candidates-2TXOUASP.js.map → review-candidates-XZUQELL5.js.map} +0 -0
- /package/dist/{routing-ZV4VSZDV.js.map → routing-HWZHJ4LZ.js.map} +0 -0
- /package/dist/{schedule-tool-D357NLXS.js.map → schedule-tool-7W5CRUN4.js.map} +0 -0
- /package/dist/{scheduler-SAID6RKQ.js.map → scheduler-WG3KXJIH.js.map} +0 -0
- /package/dist/{seat-XHBWBSTS.js.map → seat-5BOBWKBX.js.map} +0 -0
- /package/dist/{select-QUCTTAH3.js.map → select-FIHHBFNR.js.map} +0 -0
- /package/dist/{set-enabled-CGMXLFC6.js.map → set-enabled-K7OM7PSO.js.map} +0 -0
- /package/dist/{sprint-tool-SWRYSX3Q.js.map → sprint-tool-O6TTSWJN.js.map} +0 -0
- /package/dist/{tool-DA25L4ND.js.map → tool-4KVS2JWC.js.map} +0 -0
- /package/dist/{tool-ELGOVIM5.js.map → tool-BYU6EZKM.js.map} +0 -0
- /package/dist/{tool-MMH2JNP7.js.map → tool-HTUSCV22.js.map} +0 -0
- /package/dist/{tool-6G63ZQW4.js.map → tool-HVCLZGYE.js.map} +0 -0
- /package/dist/{wiki-4ZL4QXA7.js.map → wiki-ZMEMGR7R.js.map} +0 -0
- /package/dist/{wiki-enrich-N5MUKDVW.js.map → wiki-enrich-QZHQV7VZ.js.map} +0 -0
- /package/dist/{workspace-setup-QXFJRNSK.js.map → workspace-setup-GTSXWYU4.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{d as h}from"./chunk-
|
|
1
|
+
import{d as h}from"./chunk-Z6J3RTYJ.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-JDU4CXGC.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import t from"chalk";import{spawn as S}from"child_process";import{resolve as j}from"path";var E=l=>l||j(process.cwd(),".agentx/wiki");function N(l){return async d=>{let{claudeCliEnv:e}=await import("./workspace-env-UOK5MMKD.js"),h=["-p","-","--output-format","json","--max-turns","1","--model",l,"--tools","","--strict-mcp-config","--mcp-config",'{"mcpServers":{}}',"--settings",'{"disableAllHooks":true}',"--setting-sources","","--no-session-persistence"],y=await new Promise(($,a)=>{let s=S("claude",h,{env:e(),stdio:["pipe","pipe","pipe"]}),p="",g="",i=setTimeout(()=>s.kill("SIGTERM"),24e4);s.stdout.on("data",r=>{p+=r}),s.stderr.on("data",r=>{g+=r}),s.on("error",r=>{clearTimeout(i),a(r)}),s.on("close",r=>{clearTimeout(i),r===0?$(p):a(new Error(`claude exited ${r}: ${g.trim().slice(0,200)}`))}),s.stdin.end(d)}),c=JSON.parse(y);if(c.is_error)throw new Error(`model error: ${String(c.result).slice(0,200)}`);return{text:String(c.result??""),costUsd:Number(c.total_cost_usd)||0}}}function I(l){l.command("enrich [entities...]").description("write a full overview, sourced typed facts and linked history on entity pages (person, organization, project, place, assets)").option("--dir <path>","wiki directory (default .agentx/wiki)").option("--types <list>","comma-separated entity types","person,organization,project,place,device,server,app,domain,account").option("--max <n>","most entities per run","10").option("--max-cost <usd>","stop before the next call once the run spent this much","1").option("--model <m>","model","sonnet").option("--force","redo entities whose sources did not change").option("--dry-run","show what would be written, write nothing").option("--create <title>","first create a page for a thing other pages only name, then enrich it (needs --as and --owner)").option("--as <type>","type of the page --create makes, e.g. organization").option("--owner <agent>","agent whose wiki gets the page --create makes").option("--json","print the run as JSON").action(async(d,e)=>{let{WikiHub:h}=await import("./hub-
|
|
1
|
+
import t from"chalk";import{spawn as S}from"child_process";import{resolve as j}from"path";var E=l=>l||j(process.cwd(),".agentx/wiki");function N(l){return async d=>{let{claudeCliEnv:e}=await import("./workspace-env-UOK5MMKD.js"),h=["-p","-","--output-format","json","--max-turns","1","--model",l,"--tools","","--strict-mcp-config","--mcp-config",'{"mcpServers":{}}',"--settings",'{"disableAllHooks":true}',"--setting-sources","","--no-session-persistence"],y=await new Promise(($,a)=>{let s=S("claude",h,{env:e(),stdio:["pipe","pipe","pipe"]}),p="",g="",i=setTimeout(()=>s.kill("SIGTERM"),24e4);s.stdout.on("data",r=>{p+=r}),s.stderr.on("data",r=>{g+=r}),s.on("error",r=>{clearTimeout(i),a(r)}),s.on("close",r=>{clearTimeout(i),r===0?$(p):a(new Error(`claude exited ${r}: ${g.trim().slice(0,200)}`))}),s.stdin.end(d)}),c=JSON.parse(y);if(c.is_error)throw new Error(`model error: ${String(c.result).slice(0,200)}`);return{text:String(c.result??""),costUsd:Number(c.total_cost_usd)||0}}}function I(l){l.command("enrich [entities...]").description("write a full overview, sourced typed facts and linked history on entity pages (person, organization, project, place, assets)").option("--dir <path>","wiki directory (default .agentx/wiki)").option("--types <list>","comma-separated entity types","person,organization,project,place,device,server,app,domain,account").option("--max <n>","most entities per run","10").option("--max-cost <usd>","stop before the next call once the run spent this much","1").option("--model <m>","model","sonnet").option("--force","redo entities whose sources did not change").option("--dry-run","show what would be written, write nothing").option("--create <title>","first create a page for a thing other pages only name, then enrich it (needs --as and --owner)").option("--as <type>","type of the page --create makes, e.g. organization").option("--owner <agent>","agent whose wiki gets the page --create makes").option("--json","print the run as JSON").action(async(d,e)=>{let{WikiHub:h}=await import("./hub-GVTRKPAU.js"),{GraphCache:y}=await import("./graph-ZVKV3JBD.js"),{loadOntology:c}=await import("./load-Q3HCFXDT.js"),{loadRoster:$}=await import("./roster-BZGKG2ZA.js"),{ENRICH_TYPES:a,loadEnrichState:s,runEnrich:p,saveEnrichState:g}=await import("./enrich-MZMIQ3SV.js"),i=E(e.dir),r=e.types.split(",").map(o=>o.trim()).filter(Boolean),b=r.filter(o=>!a.includes(o));if(b.length){console.error(t.red(` not an entity type this job handles: ${b.join(", ")} (use ${a.join(", ")})`)),process.exitCode=1;return}let x=Number(e.max);if(!Number.isInteger(x)||x<1){console.error(t.red(" --max must be a whole number of entities, 1 or more")),process.exitCode=1;return}let w=Number(e.maxCost);if(!Number.isFinite(w)||w<=0){console.error(t.red(" --max-cost must be a positive number of dollars")),process.exitCode=1;return}let m=new h(i,()=>{});if(e.create){let{createEntityPage:o}=await import("./enrich-MZMIQ3SV.js");if(!e.as||!a.includes(e.as)||!e.owner){console.error(t.red(` --create needs --as <${a.join("|")}> and --owner <agent>`)),process.exitCode=1;return}if(m.syncedFrom(e.owner)){console.error(t.red(` ${e.owner}'s pages are copied from another node; pick an agent that runs here`)),process.exitCode=1;return}if(e.dryRun)console.log(t.dim(` --dry-run: would create "${e.create}" (${e.as}) in ${e.owner}'s wiki`));else{let f=o(m,e.create,e.as,e.owner,new Date().toISOString().slice(0,10));console.log(f?t.green(` created ${e.owner}/${f}`):t.dim(` ${e.owner} already has a page titled "${e.create}"`))}d=[...d,e.create],r.includes(e.as)||r.push(e.as)}let{ontology:v}=c(i),k=new y().get(m,v,$(i,m.listAgents([]),v.agent_names)),C=s(i),u=await p(m,k,N(e.model),{types:r,only:d,max:x,maxCostUsd:w,dryRun:!!e.dryRun,force:!!e.force,today:new Date().toISOString().slice(0,10),save:o=>g(i,o)},C);if(e.json){console.log(JSON.stringify(u,null,2));return}for(let o of u.outcomes){let f=o.status==="written"?t.green("\u2713"):o.status==="dry-run"?t.cyan("~"):t.yellow("\xB7");console.log(` ${f} ${o.title} ${t.dim(`${o.status} \xB7 ${o.page??"no page"} \xB7 overview ${o.overview?"yes":"no"} \xB7 ${o.statements} facts \xB7 ${o.links} links \xB7 $${o.costUsd.toFixed(3)}`)}`);for(let n of o.facts??[])console.log(t.dim(` fact: ${n.property} \u2192 ${n.value}${n.role?` (${n.role})`:""} \xB7 source ${n.source}`));for(let n of o.dropped.slice(0,6))console.log(t.dim(` dropped: ${n}`));o.preview&&console.log(t.dim(o.preview.split(`
|
|
2
2
|
`).slice(0,12).map(n=>` | ${n}`).join(`
|
|
3
3
|
`)))}u.outcomes.length===0&&console.log(t.dim(" nothing to do: no entity of these types changed since the last run (--force redoes them)")),console.log(t.dim(` spent $${u.costUsd.toFixed(3)} of $${w}${u.capped?" \xB7 stopped at the cap":""}`))})}export{N as a,I as b};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-K435U2FC.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as s}from"./chunk-QIJLFPWE.js";function o(n){if(!n||typeof n!="object")return null;let t=n;if(t.kind!=="human"&&t.kind!=="agent"||typeof t.channel!="string"||!t.channel)return null;let e={kind:t.kind,channel:t.channel.slice(0,40)};return typeof t.chatId=="string"&&(e.chatId=t.chatId.slice(0,200)),typeof t.sender=="string"&&(e.sender=t.sender.slice(0,120)),typeof t.agentId=="string"&&(e.agentId=t.agentId.slice(0,80)),typeof t.person=="string"&&t.person&&(e.person=t.person.slice(0,40)),e}function c(n){return o(n?.initiator)}function f(n){if(typeof n!="string")return!1;let t=n.trim().toLowerCase();return t==="agent"||d.some(e=>t.startsWith(e))}function a(n){let t=o(n?.initiator);if(t)return t.kind;let e=(n?.channel||"api").toLowerCase();return l.has(e)||f(n?.sender)?"agent":u.has(e)?"human":"agent"}function h(n,t){let e=o(n?.initiator);if(e)return e;let r=o(n?.delegation?.root);if(r)return r;let i={kind:a(n),channel:n?.channel||"api"};return n?.chatId&&(i.chatId=String(n.chatId)),n?.sender&&(i.sender=String(n.sender)),t&&(i.agentId=t),typeof n?.person=="string"&&n.person&&(i.person=n.person),i}function g(n){return n?o(n.initiator)!==null||!!n.delegation:!1}function I(n){return!n||g(n)?!1:a(n)==="human"}var u,l,d,p=s(()=>{"use strict";u=new Set(["telegram","whatsapp","slack","discord","email","gitlab","github","app","voice","dashboard","webrtc"]),l=new Set(["a2a","mcp","mesh","api","cron","workflow","events","reminder","heartbeat","system","internal","business","guest"]),d=["agent:","cron:","workflow:","mesh:","system:","internal:"]});export{u as a,c as b,f as c,a as d,h as e,g as f,I as g,p as h};
|
|
2
|
+
//# sourceMappingURL=chunk-KEUW6YLL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/a2a/initiator.ts"],"sourcesContent":["// --- Who started this work: a person or an agent ---\n//\n// One place answers \"is the root of this chain a human?\" so every caller\n// (A2A delegation today, the activity graph and ledger next) agrees. Keep\n// all human-vs-agent detection here; do not re-derive it from\n// `senderAgentId` at call sites, because relays such as the phone app set\n// fields that look agent-shaped for a turn a person started.\n//\n// The rules, in order:\n// 1. A propagated root (`context.initiator`) wins. It is stamped on the\n// first hop of a delegation and travels with the context, including\n// across mesh peers (sendTask forwards the context verbatim).\n// 2. Machine channels (cron, workflow, a2a, mcp, mesh, api, ...) are agent.\n// 3. A machine-shaped sender (\"agent:x\", \"cron:y\", ...) is agent. This is\n// how router bot-to-bot chains and callback turns are marked, and how\n// the GitHub/GitLab adapters mark an agent's comment posted with a\n// person's account (forgeSender in channels/outbound-marker.ts).\n// 4. Channels a person types or speaks on are human.\n// 5. Anything else is agent: unknown traffic keeps today's behaviour.\n\nexport type InitiatorKind = \"human\" | \"agent\"\n\n/** The root of a chain, carried in `context.initiator` on every hop after\n * the first. Only small identifying fields: it crosses the mesh. */\nexport interface RootInitiator {\n kind: InitiatorKind\n /** Channel the root turn arrived on (telegram, app, cron, ...). */\n channel: string\n chatId?: string\n sender?: string\n /** The agent that was talking to the person when the chain started. */\n agentId?: string\n /** The known person behind the root turn (people, #384). */\n person?: string\n}\n\n/** The subset of AgentTask.context this module reads. */\nexport interface InitiatorContext {\n channel?: string\n chatId?: string\n sender?: string\n initiator?: unknown\n delegation?: unknown\n person?: unknown\n [k: string]: unknown\n}\n\n/** Channels a person writes or speaks on. */\nexport const HUMAN_CHANNELS: ReadonlySet<string> = new Set([\n \"telegram\", \"whatsapp\", \"slack\", \"discord\", \"email\",\n \"gitlab\", \"github\",\n \"app\", \"voice\", \"dashboard\", \"webrtc\",\n])\n\n/** Channels only software writes on. `api` is here on purpose: a bare API\n * call has no conversation to come back to. */\nexport const AGENT_CHANNELS: ReadonlySet<string> = new Set([\n \"a2a\", \"mcp\", \"mesh\", \"api\",\n \"cron\", \"workflow\", \"events\", \"reminder\", \"heartbeat\",\n \"system\", \"internal\", \"business\",\n // A guest mesh's turn (#380): another organisation asks, this node's\n // agent acts. Not a person of this node.\n \"guest\",\n])\n\nconst AGENT_SENDER_PREFIXES = [\"agent:\", \"cron:\", \"workflow:\", \"mesh:\", \"system:\", \"internal:\"]\n\nfunction validRoot(v: unknown): RootInitiator | null {\n if (!v || typeof v !== \"object\") return null\n const o = v as Record<string, unknown>\n if (o.kind !== \"human\" && o.kind !== \"agent\") return null\n if (typeof o.channel !== \"string\" || !o.channel) return null\n const root: RootInitiator = { kind: o.kind, channel: o.channel.slice(0, 40) }\n if (typeof o.chatId === \"string\") root.chatId = o.chatId.slice(0, 200)\n if (typeof o.sender === \"string\") root.sender = o.sender.slice(0, 120)\n if (typeof o.agentId === \"string\") root.agentId = o.agentId.slice(0, 80)\n if (typeof o.person === \"string\" && o.person) root.person = o.person.slice(0, 40)\n return root\n}\n\n/** The root a delegated hop carries in `context.initiator`, or null on a\n * turn that is itself a root (read-only views such as the activity map). */\nexport function propagatedRootOf(ctx: InitiatorContext | undefined | null): RootInitiator | null {\n return validRoot(ctx?.initiator)\n}\n\n/** True for senders that name software rather than a person. */\nexport function isAgentSender(sender: unknown): boolean {\n if (typeof sender !== \"string\") return false\n const s = sender.trim().toLowerCase()\n return s === \"agent\" || AGENT_SENDER_PREFIXES.some((p) => s.startsWith(p))\n}\n\n/** Human or agent, for the chain this turn belongs to. */\nexport function classifyInitiator(ctx: InitiatorContext | undefined | null): InitiatorKind {\n const root = validRoot(ctx?.initiator)\n if (root) return root.kind\n const channel = (ctx?.channel || \"api\").toLowerCase()\n if (AGENT_CHANNELS.has(channel)) return \"agent\"\n if (isAgentSender(ctx?.sender)) return \"agent\"\n if (HUMAN_CHANNELS.has(channel)) return \"human\"\n return \"agent\"\n}\n\n/** The root to stamp on the next hop. An existing root is passed on\n * unchanged; otherwise this turn is the root. */\nexport function rootInitiatorOf(ctx: InitiatorContext | undefined | null, agentId?: string): RootInitiator {\n const existing = validRoot(ctx?.initiator)\n if (existing) return existing\n const root: RootInitiator = { kind: classifyInitiator(ctx), channel: ctx?.channel || \"api\" }\n if (ctx?.chatId) root.chatId = String(ctx.chatId)\n if (ctx?.sender) root.sender = String(ctx.sender)\n if (agentId) root.agentId = agentId\n if (typeof ctx?.person === \"string\" && ctx.person) root.person = ctx.person\n return root\n}\n\n/** True for a delegated hop (it carries a valid root) or a callback turn\n * (it carries `delegation`). Neither may hand work off asynchronously:\n * a hop has a caller waiting on its answer, and a callback must not fan\n * out into another callback. */\nexport function isInsideDelegation(ctx: InitiatorContext | undefined | null): boolean {\n if (!ctx) return false\n return validRoot(ctx.initiator) !== null || !!ctx.delegation\n}\n\n/** Is this turn the one talking to the person? Only that turn may hand\n * work off and end: a delegated turn (it carries a root) has a caller\n * waiting on its answer, and a callback turn (it carries `delegation`)\n * must not fan out again. */\nexport function isHumanFacingTurn(ctx: InitiatorContext | undefined | null): boolean {\n if (!ctx || isInsideDelegation(ctx)) return false\n return classifyInitiator(ctx) === \"human\"\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/a2a/initiator.ts"],"sourcesContent":["// --- Who started this work: a person or an agent ---\n//\n// One place answers \"is the root of this chain a human?\" so every caller\n// (A2A delegation today, the activity graph and ledger next) agrees. Keep\n// all human-vs-agent detection here; do not re-derive it from\n// `senderAgentId` at call sites, because relays such as the phone app set\n// fields that look agent-shaped for a turn a person started.\n//\n// The rules, in order:\n// 1. A propagated root (`context.initiator`) wins. It is stamped on the\n// first hop of a delegation and travels with the context, including\n// across mesh peers (sendTask forwards the context verbatim).\n// 2. Machine channels (cron, workflow, a2a, mcp, mesh, api, ...) are agent.\n// 3. A machine-shaped sender (\"agent:x\", \"cron:y\", ...) is agent. This is\n// how router bot-to-bot chains and callback turns are marked, and how\n// the GitHub/GitLab adapters mark an agent's comment posted with a\n// person's account (forgeSender in channels/outbound-marker.ts).\n// 4. Channels a person types or speaks on are human.\n// 5. Anything else is agent: unknown traffic keeps today's behaviour.\n\nexport type InitiatorKind = \"human\" | \"agent\"\n\n/** The root of a chain, carried in `context.initiator` on every hop after\n * the first. Only small identifying fields: it crosses the mesh. */\nexport interface RootInitiator {\n kind: InitiatorKind\n /** Channel the root turn arrived on (telegram, app, cron, ...). */\n channel: string\n chatId?: string\n sender?: string\n /** The agent that was talking to the person when the chain started. */\n agentId?: string\n /** The known person behind the root turn (people, #384). */\n person?: string\n}\n\n/** The subset of AgentTask.context this module reads. */\nexport interface InitiatorContext {\n channel?: string\n chatId?: string\n sender?: string\n initiator?: unknown\n delegation?: unknown\n person?: unknown\n [k: string]: unknown\n}\n\n/** Channels a person writes or speaks on. */\nexport const HUMAN_CHANNELS: ReadonlySet<string> = new Set([\n \"telegram\", \"whatsapp\", \"slack\", \"discord\", \"email\",\n \"gitlab\", \"github\",\n \"app\", \"voice\", \"dashboard\", \"webrtc\",\n])\n\n/** Channels only software writes on. `api` is here on purpose: a bare API\n * call has no conversation to come back to. */\nexport const AGENT_CHANNELS: ReadonlySet<string> = new Set([\n \"a2a\", \"mcp\", \"mesh\", \"api\",\n \"cron\", \"workflow\", \"events\", \"reminder\", \"heartbeat\",\n \"system\", \"internal\", \"business\",\n // A guest mesh's turn (#380): another organisation asks, this node's\n // agent acts. Not a person of this node.\n \"guest\",\n])\n\nconst AGENT_SENDER_PREFIXES = [\"agent:\", \"cron:\", \"workflow:\", \"mesh:\", \"system:\", \"internal:\"]\n\nfunction validRoot(v: unknown): RootInitiator | null {\n if (!v || typeof v !== \"object\") return null\n const o = v as Record<string, unknown>\n if (o.kind !== \"human\" && o.kind !== \"agent\") return null\n if (typeof o.channel !== \"string\" || !o.channel) return null\n const root: RootInitiator = { kind: o.kind, channel: o.channel.slice(0, 40) }\n if (typeof o.chatId === \"string\") root.chatId = o.chatId.slice(0, 200)\n if (typeof o.sender === \"string\") root.sender = o.sender.slice(0, 120)\n if (typeof o.agentId === \"string\") root.agentId = o.agentId.slice(0, 80)\n if (typeof o.person === \"string\" && o.person) root.person = o.person.slice(0, 40)\n return root\n}\n\n/** The root a delegated hop carries in `context.initiator`, or null on a\n * turn that is itself a root (read-only views such as the activity map). */\nexport function propagatedRootOf(ctx: InitiatorContext | undefined | null): RootInitiator | null {\n return validRoot(ctx?.initiator)\n}\n\n/** True for senders that name software rather than a person. */\nexport function isAgentSender(sender: unknown): boolean {\n if (typeof sender !== \"string\") return false\n const s = sender.trim().toLowerCase()\n return s === \"agent\" || AGENT_SENDER_PREFIXES.some((p) => s.startsWith(p))\n}\n\n/** Human or agent, for the chain this turn belongs to. */\nexport function classifyInitiator(ctx: InitiatorContext | undefined | null): InitiatorKind {\n const root = validRoot(ctx?.initiator)\n if (root) return root.kind\n const channel = (ctx?.channel || \"api\").toLowerCase()\n if (AGENT_CHANNELS.has(channel)) return \"agent\"\n if (isAgentSender(ctx?.sender)) return \"agent\"\n if (HUMAN_CHANNELS.has(channel)) return \"human\"\n return \"agent\"\n}\n\n/** The root to stamp on the next hop. An existing root is passed on\n * unchanged; otherwise this turn is the root. */\nexport function rootInitiatorOf(ctx: InitiatorContext | undefined | null, agentId?: string): RootInitiator {\n const existing = validRoot(ctx?.initiator)\n if (existing) return existing\n // A callback turn carries the root of the delegation it answers (#1749):\n // work it hands on belongs to that chain, not to a new one it starts.\n const answered = validRoot((ctx?.delegation as { root?: unknown } | undefined)?.root)\n if (answered) return answered\n const root: RootInitiator = { kind: classifyInitiator(ctx), channel: ctx?.channel || \"api\" }\n if (ctx?.chatId) root.chatId = String(ctx.chatId)\n if (ctx?.sender) root.sender = String(ctx.sender)\n if (agentId) root.agentId = agentId\n if (typeof ctx?.person === \"string\" && ctx.person) root.person = ctx.person\n return root\n}\n\n/** True for a delegated hop (it carries a valid root) or a callback turn\n * (it carries `delegation`). Neither may hand work off asynchronously:\n * a hop has a caller waiting on its answer, and a callback must not fan\n * out into another callback. */\nexport function isInsideDelegation(ctx: InitiatorContext | undefined | null): boolean {\n if (!ctx) return false\n return validRoot(ctx.initiator) !== null || !!ctx.delegation\n}\n\n/** Is this turn the one talking to the person? Only that turn may hand\n * work off and end: a delegated turn (it carries a root) has a caller\n * waiting on its answer, and a callback turn (it carries `delegation`)\n * must not fan out again. */\nexport function isHumanFacingTurn(ctx: InitiatorContext | undefined | null): boolean {\n if (!ctx || isInsideDelegation(ctx)) return false\n return classifyInitiator(ctx) === \"human\"\n}\n"],"mappings":"wCAmEA,SAASA,EAAUC,EAAkC,CACnD,GAAI,CAACA,GAAK,OAAOA,GAAM,SAAU,OAAO,KACxC,IAAMC,EAAID,EAEV,GADIC,EAAE,OAAS,SAAWA,EAAE,OAAS,SACjC,OAAOA,EAAE,SAAY,UAAY,CAACA,EAAE,QAAS,OAAO,KACxD,IAAMC,EAAsB,CAAE,KAAMD,EAAE,KAAM,QAASA,EAAE,QAAQ,MAAM,EAAG,EAAE,CAAE,EAC5E,OAAI,OAAOA,EAAE,QAAW,WAAUC,EAAK,OAASD,EAAE,OAAO,MAAM,EAAG,GAAG,GACjE,OAAOA,EAAE,QAAW,WAAUC,EAAK,OAASD,EAAE,OAAO,MAAM,EAAG,GAAG,GACjE,OAAOA,EAAE,SAAY,WAAUC,EAAK,QAAUD,EAAE,QAAQ,MAAM,EAAG,EAAE,GACnE,OAAOA,EAAE,QAAW,UAAYA,EAAE,SAAQC,EAAK,OAASD,EAAE,OAAO,MAAM,EAAG,EAAE,GACzEC,CACT,CAIO,SAASC,EAAiBC,EAAgE,CAC/F,OAAOL,EAAUK,GAAK,SAAS,CACjC,CAGO,SAASC,EAAcC,EAA0B,CACtD,GAAI,OAAOA,GAAW,SAAU,MAAO,GACvC,IAAMC,EAAID,EAAO,KAAK,EAAE,YAAY,EACpC,OAAOC,IAAM,SAAWC,EAAsB,KAAMC,GAAMF,EAAE,WAAWE,CAAC,CAAC,CAC3E,CAGO,SAASC,EAAkBN,EAAyD,CACzF,IAAMF,EAAOH,EAAUK,GAAK,SAAS,EACrC,GAAIF,EAAM,OAAOA,EAAK,KACtB,IAAMS,GAAWP,GAAK,SAAW,OAAO,YAAY,EAEpD,OADIQ,EAAe,IAAID,CAAO,GAC1BN,EAAcD,GAAK,MAAM,EAAU,QACnCS,EAAe,IAAIF,CAAO,EAAU,QACjC,OACT,CAIO,SAASG,EAAgBV,EAA0CW,EAAiC,CACzG,IAAMC,EAAWjB,EAAUK,GAAK,SAAS,EACzC,GAAIY,EAAU,OAAOA,EAGrB,IAAMC,EAAWlB,EAAWK,GAAK,YAA+C,IAAI,EACpF,GAAIa,EAAU,OAAOA,EACrB,IAAMf,EAAsB,CAAE,KAAMQ,EAAkBN,CAAG,EAAG,QAASA,GAAK,SAAW,KAAM,EAC3F,OAAIA,GAAK,SAAQF,EAAK,OAAS,OAAOE,EAAI,MAAM,GAC5CA,GAAK,SAAQF,EAAK,OAAS,OAAOE,EAAI,MAAM,GAC5CW,IAASb,EAAK,QAAUa,GACxB,OAAOX,GAAK,QAAW,UAAYA,EAAI,SAAQF,EAAK,OAASE,EAAI,QAC9DF,CACT,CAMO,SAASgB,EAAmBd,EAAmD,CACpF,OAAKA,EACEL,EAAUK,EAAI,SAAS,IAAM,MAAQ,CAAC,CAACA,EAAI,WADjC,EAEnB,CAMO,SAASe,EAAkBf,EAAmD,CACnF,MAAI,CAACA,GAAOc,EAAmBd,CAAG,EAAU,GACrCM,EAAkBN,CAAG,IAAM,OACpC,CAzIA,IAgDaS,EAQAD,EASPJ,EAjENY,EAAAC,EAAA,kBAgDaR,EAAsC,IAAI,IAAI,CACzD,WAAY,WAAY,QAAS,UAAW,QAC5C,SAAU,SACV,MAAO,QAAS,YAAa,QAC/B,CAAC,EAIYD,EAAsC,IAAI,IAAI,CACzD,MAAO,MAAO,OAAQ,MACtB,OAAQ,WAAY,SAAU,WAAY,YAC1C,SAAU,WAAY,WAGtB,OACF,CAAC,EAEKJ,EAAwB,CAAC,SAAU,QAAS,YAAa,QAAS,UAAW,WAAW","names":["validRoot","v","o","root","propagatedRootOf","ctx","isAgentSender","sender","s","AGENT_SENDER_PREFIXES","p","classifyInitiator","channel","AGENT_CHANNELS","HUMAN_CHANNELS","rootInitiatorOf","agentId","existing","answered","isInsideDelegation","isHumanFacingTurn","init_initiator","__esmMin"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as _,b as q}from"./chunk-RKPAVWXF.js";import{a as R,b as O,c as B,d as b,f as k,g as z,h as v,i as w,j as S,k as m}from"./chunk-
|
|
1
|
+
import{a as _,b as q}from"./chunk-RKPAVWXF.js";import{a as R,b as O,c as B,d as b,f as k,g as z,h as v,i as w,j as S,k as m}from"./chunk-E2MW5OCE.js";import{a as x,b as C,c as E,d as P,e as D}from"./chunk-VALKXSXZ.js";import{existsSync as J,readFileSync as M}from"fs";var V=new Set(["cron","heartbeat","api","a2a","mesh"]),W=160;function s(n){return typeof n=="string"&&n.trim()?n.trim():void 0}function A(n,e=W){let t=n.replace(/\s+/g," ").trim();return t.length>e?`${t.slice(0,e-1)}\u2026`:t}function Y(n){let e=x(n);if(!J(e))throw new Error(`config not found at ${e}`);return JSON.parse(M(e,"utf-8"))}function Z(n,e){return n?.agents?.[e]?.admin===!0}function K(n,e,t){return Z(n,t.agentId)||e?.createdBy===t.agentId}function Q(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 j(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&&!V.has(e.channel))return{channel:e.channel,chatId:e.chatId,...e.accountId?{accountId:e.accountId}:{}}}}function ee(n,e,t){let r=e.timezone||"UTC",d=e.enabled&&!m(e)?S(w(e.schedule,r,t),r):"\u2014",p=e.approval?`pending ${e.approval.action} approval`:e.enabled?"active":"paused",h=[`- ${n} [${p}] ${e.schedule} \u2014 ${v(e.schedule)} (${r})`,` agent: ${e.agent}; created by: ${e.createdBy||"operator"}; next: ${d}`];return e.notify&&h.push(` notify: ${e.notify.channel} ${e.notify.chatId} ${z(e)}`),e.command?h.push(` command: ${A(String(e.command))}`):e.prompt&&h.push(` prompt: ${A(String(e.prompt))}`),h.join(`
|
|
2
2
|
`)}async function L(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(d){return`Could not notify the operator (${d?.message??d}); the request is still recorded.`}}async function ae(n,e,t={}){let r=(s(n.action)||"list").toLowerCase(),d=t.now?t.now():new Date,p;try{p=Y(t.configPath)}catch(a){return`Error: ${a.message}`}let h=p.crons||{};if(r==="list"){let a=n.mine===!0,l=Object.entries(h).filter(([,i])=>!a||e&&i?.createdBy===e.agentId);return l.length?l.map(([i,f])=>ee(i,f,d)).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(!p.agents?.[e.agentId])return`Error: caller "${e.agentId}" is not an agent on this node.`;let o=s(n.id),I=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=_(a);if(!i)return`Error: couldn't parse "${a}". ${O}.`;let f=s(n.agent)||e.agentId;if(!p.agents?.[f])return`Error: agent "${f}" not found on this node.`;let g=s(n.timezone)||R;if(!b(g))return`Error: unknown timezone "${g}".`;let u=o||q(i.matched,f);if(!B(u))return`Error: invalid id "${u}" (letters, digits, "-" and "_" only).`;if(h[u])return`Error: a schedule "${u}" already exists. Pick another \`id\`.`;let $=j(n,e);if($==="invalid")return'Error: `notify` must be "here", "none", or "channel:chatId".';let y=s(n.report);if(y&&y!=="always"&&y!=="exceptions")return'Error: `report` must be "always" or "exceptions".';let G={action:"create",requestedBy:e.agentId,requestedAt:d.toISOString()},H=k({parsed:i,agent:f,prompt:l,timezone:g,notify:$,report:y,enabled:!1,createdBy:e.agentId,approval:G}),N=await I(F=>E(F,`crons.${u}`,H));if(!N.success)return`Error: ${N.error}`;let T=S(w(i.cron,g,d),g),U=[`Schedule approval requested by ${e.agentId}`,`Create: ${u}`,`When: ${i.human} \u2014 cron \`${i.cron}\` (${g})`,`Next fire: ${T}`,`Agent: ${f}`,$?`${y==="exceptions"?"Exceptions":"Results"} and failures go to: ${$.channel} ${$.chatId}${$.channel==="voice"?" (as a push notification)":""}`:"Results go to: run log only (no chat)",`Prompt: ${A(l,400)}`,"",`Approve: agentx schedule approve ${u}`,`Reject: agentx schedule reject ${u}`].join(`
|
|
4
4
|
`),X=await L(p,t,U);return[`Requested schedule "${u}": ${i.human} (cron ${i.cron}, ${g}); next fire would be ${T}.`,"It is saved DISABLED and will not run until the operator approves it.",X].join(`
|
|
5
5
|
`)}if(!o)return`Error: ${r} needs \`id\`.`;let c=h[o];if(!c)return`Error: schedule "${o}" not found.`;if(!K(p,c,e))return Q(o,c);if(r==="pause"||r==="resume"){let a=r==="resume";if(a&&m(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 I(i=>E(i,`crons.${o}.enabled`,a));return l.success?`"${o}" ${a?"resumed":"paused"}.`:`Error: ${l.error}`}if(r==="delete"){if(m(c)&&c.approval.requestedBy===e.agentId){let u=await I($=>D($,`crons.${o}`));return u.success?`Withdrew the pending request "${o}".`:`Error: ${u.error}`}if(m(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:d.toISOString()},l=await I(u=>{if(!P(u,`crons.${o}`))throw new Error(`schedule "${o}" not found`);E(u,`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: ${v(c.schedule)} \u2014 cron \`${c.schedule}\` (${i})`,`Next fire: ${c.enabled?S(w(c.schedule,i,d),i):"\u2014 (paused)"}`,`Agent: ${c.agent}`,"",`Approve: agentx schedule approve ${o}`,`Reject: agentx schedule reject ${o}`].join(`
|
|
6
6
|
`),g=await L(p,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 ie(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)),d=s(r?e.AGENTX_CHANNEL:n.channel),p=s(r?e.AGENTX_CHAT_ID:n.chatId),h=s(n.accountId);return{agentId:t,channel:d,chatId:p,...h?{accountId:h}:{}}}export{ae as a,ie as b};
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-KXMC7Z5X.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function f(e,n=process.env){let t={...e.headers??{}};for(let[r,s]of Object.entries(e.headersEnv??{})){let o=n[s]?.trim();o&&(t[r]=o)}return t}function h(e){let n={...e.headers??{}};for(let[t,r]of Object.entries(e.headersEnv??{}))n[t]=`\${${r}}`;return Object.keys(n).length>0?n:void 0}function m(e){return[...new Set(Object.values(e.headersEnv??{}))]}function u(e){let n=e.split("*").map(t=>t.replace(/[.+?^${}()|[\]\\]/g,"\\$&")).join(".*");return new RegExp(`^${n}$`)}function l(e,n){return e?e.some(t=>t.includes("*")?u(t).test(n):t===n):!0}function b(e,n){if(!n||!e.startsWith("mcp__"))return null;let t=Object.keys(n).sort((r,s)=>s.length-r.length);for(let r of t){let s=`mcp__${r}__`;if(!e.startsWith(s))continue;let o=n[r]?.allowTools;if(!o)return null;let i=e.slice(s.length);return l(o,i)?null:`[agentx-mcp] "${i}" is not on the allowTools list of MCP server "${r}". Allowed: ${o.join(", ")||"(none)"}.`}return null}function _(e){let n=Object.entries(e??{}).filter(([,t])=>Array.isArray(t?.allowTools)).map(([t])=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return n.length===0?null:`mcp__(${n.join("|")})__.*`}var c=new Set(["get","list","read","search","query","fetch","find","describe","count","view","show","lookup","retrieve","browse","check","inspect","preview"]),a=new Set(["create","add","insert","update","edit","modify","patch","upsert","put","set","delete","remove","destroy","erase","purge","archive","unarchive","trash","send","publish","upload","invite","submit","write","save","move","rename","merge","revoke","grant","assign","transfer","pay","charge","refund","approve","reject","cancel","enable","disable","execute","trigger","deploy","install","uninstall","kill","reset","clear","mark","ban","unban","mute","unmute","follow","unfollow","subscribe","unsubscribe","import","restore"]),d=new Set(["post","comment","reply","like","unlike","share","schedule","message","copy","star","pin","block","react","run","start","stop","open","close","book"]);function p(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)}function g(e){let n=p(e),t=n.find(r=>c.has(r)||a.has(r)||d.has(r));return!t||!c.has(t)?!1:!n.some(r=>a.has(r))}function w(e,n){if(!n||!e.startsWith("mcp__"))return null;let t=Object.keys(n).sort((r,s)=>s.length-r.length);for(let r of t){let s=`mcp__${r}__`;if(!e.startsWith(s))continue;let o=n[r];if(!o?.allowTools)return null;let i=e.slice(s.length);return!l(o.allowTools,i)||o.readTools&&l(o.readTools,i)||g(i)?null:{server:r,tool:i}}return null}export{f as a,h as b,m as c,l as d,b as e,_ as f,w as g};
|
|
2
|
+
//# sourceMappingURL=chunk-LY4G7PCW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/agent/mcp-policy.ts"],"sourcesContent":["// --- MCP server policy: secret headers and tool allow lists (#1698) ---\n//\n// Two per-server settings that make a hosted MCP endpoint (a connector\n// service, for instance) safe to declare in agentx.json:\n//\n// headersEnv header name -> NAME of an environment variable. The value\n// is read by the daemon when it connects (orchestrator tier),\n// and written to .mcp.json only as a `${NAME}` placeholder\n// that Claude Code expands at spawn. The secret itself never\n// lands in agentx.json or in a synced file. (`${VAR}` inside\n// plain `headers` is expanded when agentx.json loads, so it\n// would end up in .mcp.json in clear text.)\n//\n// allowTools the only tools of that server an agent may use. Exact\n// names, `*` as a wildcard. The orchestrator tier never lists\n// the others; the claude-code tier's guard hook refuses them.\n// A tool on the list that writes waits for one Approvals\n// card first (#1736, below); `readTools` names reads the\n// tool names do not give away.\n//\n// Pure helpers only: no I/O, so mcp-client, agent-mcp, the runtime and the\n// daemon's /guard/check can all share them.\n\n/** An environment variable name as agentx accepts it elsewhere (`tokenEnv`). */\nexport const ENV_NAME_RE = /^[A-Z_][A-Z0-9_]*$/\n\nexport interface McpPolicyFields {\n headers?: Record<string, string>\n headersEnv?: Record<string, string>\n allowTools?: string[]\n /** Tools of that list that only read, though their names do not say so:\n * they run without a card (#1736). Same patterns as `allowTools`. */\n readTools?: string[]\n}\n\n/** Headers to send on every request: the literal `headers`, then each\n * `headersEnv` entry read from `env`. An unset or empty variable is left\n * out, so the server answers 401 instead of receiving an empty key. */\nexport function resolveHttpHeaders(\n spec: McpPolicyFields,\n env: Record<string, string | undefined> = process.env,\n): Record<string, string> {\n const out: Record<string, string> = { ...(spec.headers ?? {}) }\n for (const [header, name] of Object.entries(spec.headersEnv ?? {})) {\n const value = env[name]?.trim()\n if (value) out[header] = value\n }\n return out\n}\n\n/** Headers as written into a file another program reads (.mcp.json):\n * `headersEnv` entries become `${NAME}` placeholders that program expands\n * from its own environment. The secret value is never looked up here. */\nexport function placeholderHeaders(spec: McpPolicyFields): Record<string, string> | undefined {\n const out: Record<string, string> = { ...(spec.headers ?? {}) }\n for (const [header, name] of Object.entries(spec.headersEnv ?? {})) out[header] = `\\${${name}}`\n return Object.keys(out).length > 0 ? out : undefined\n}\n\n/** Environment variable names a server's `headersEnv` needs. */\nexport function headerEnvNames(spec: McpPolicyFields): string[] {\n return [...new Set(Object.values(spec.headersEnv ?? {}))]\n}\n\nfunction wildcardToRegExp(pattern: string): RegExp {\n const body = pattern.split(\"*\").map((s) => s.replace(/[.+?^${}()|[\\]\\\\]/g, \"\\\\$&\")).join(\".*\")\n return new RegExp(`^${body}$`)\n}\n\n/** Is `tool` (the server's own tool name, without `mcp__<server>__`) on\n * the list? No list means every tool is allowed; an empty list allows none. */\nexport function toolAllowed(allowTools: string[] | undefined, tool: string): boolean {\n if (!allowTools) return true\n return allowTools.some((p) => (p.includes(\"*\") ? wildcardToRegExp(p).test(tool) : p === tool))\n}\n\n/** Reason to refuse a namespaced `mcp__<server>__<tool>` call, or null.\n * Only servers with an `allowTools` list are checked; a call to any other\n * server, or to a tool that is not an MCP tool, is not this check's call. */\nexport function mcpAllowListDenial(\n toolName: string,\n servers: Record<string, McpPolicyFields> | undefined,\n): string | null {\n if (!servers || !toolName.startsWith(\"mcp__\")) return null\n // Longest server name first, so `a__b` wins over `a` for `mcp__a__b__x`.\n const names = Object.keys(servers).sort((a, b) => b.length - a.length)\n for (const server of names) {\n const prefix = `mcp__${server}__`\n if (!toolName.startsWith(prefix)) continue\n const list = servers[server]?.allowTools\n if (!list) return null\n const tool = toolName.slice(prefix.length)\n if (toolAllowed(list, tool)) return null\n return `[agentx-mcp] \"${tool}\" is not on the allowTools list of MCP server \"${server}\". Allowed: ${list.join(\", \") || \"(none)\"}.`\n }\n return null\n}\n\n/** Hook matcher (a regular expression over tool names) covering every\n * server that has an `allowTools` list, or null when none does. */\nexport function allowListHookMatcher(servers: Record<string, McpPolicyFields> | undefined): string | null {\n const names = Object.entries(servers ?? {})\n .filter(([, s]) => Array.isArray(s?.allowTools))\n .map(([n]) => n.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"))\n if (names.length === 0) return null\n return `mcp__(${names.join(\"|\")})__.*`\n}\n\n// --- Write tools ask first (#1736) ---\n//\n// A tool on a server's `allowTools` list that can write (post, upload,\n// delete, send...) waits for one Approvals card before it runs. Reads run\n// as before. The split is by the tool's NAME, deterministically, because\n// the guard hook sees only the name: a server's own \"read only\" hint is\n// not trusted, since a server that lies would skip the card.\n//\n// Over-inclusive on purpose: a name with no verb we know is a write. One\n// extra card is the right side to err on. A read tool the names get wrong\n// goes on the server's `readTools` list.\n\nconst READ_VERBS = new Set([\n \"get\", \"list\", \"read\", \"search\", \"query\", \"fetch\", \"find\", \"describe\", \"count\",\n \"view\", \"show\", \"lookup\", \"retrieve\", \"browse\", \"check\", \"inspect\", \"preview\",\n])\n\n/** Write anywhere in the name, even after a read verb (SEARCH_AND_DELETE). */\nconst WRITE_VERBS = new Set([\n \"create\", \"add\", \"insert\", \"update\", \"edit\", \"modify\", \"patch\", \"upsert\", \"put\", \"set\",\n \"delete\", \"remove\", \"destroy\", \"erase\", \"purge\", \"archive\", \"unarchive\", \"trash\",\n \"send\", \"publish\", \"upload\", \"invite\", \"submit\", \"write\", \"save\", \"move\", \"rename\",\n \"merge\", \"revoke\", \"grant\", \"assign\", \"transfer\", \"pay\", \"charge\", \"refund\",\n \"approve\", \"reject\", \"cancel\", \"enable\", \"disable\", \"execute\", \"trigger\", \"deploy\",\n \"install\", \"uninstall\", \"kill\", \"reset\", \"clear\", \"mark\", \"ban\", \"unban\", \"mute\",\n \"unmute\", \"follow\", \"unfollow\", \"subscribe\", \"unsubscribe\", \"import\", \"restore\",\n])\n\n/** Also nouns (a post, a comment, a run): a write only as the first verb,\n * so GET_POST reads and POST_PHOTO writes. */\nconst NOUN_VERBS = new Set([\n \"post\", \"comment\", \"reply\", \"like\", \"unlike\", \"share\", \"schedule\", \"message\", \"copy\",\n \"star\", \"pin\", \"block\", \"react\", \"run\", \"start\", \"stop\", \"open\", \"close\", \"book\",\n])\n\n/** A tool name in lower-case words: `FACEBOOK_GET_PAGE_INSIGHTS` and\n * `getPageInsights` both give get, page, insights. */\nfunction nameWords(tool: string): string[] {\n return tool\n .replace(/([a-z0-9])([A-Z])/g, \"$1 $2\")\n .replace(/([A-Z]+)([A-Z][a-z])/g, \"$1 $2\")\n .toLowerCase()\n .split(/[^a-z0-9]+/)\n .filter(Boolean)\n}\n\n/** Does the tool's name say it only reads? The first verb must be a read\n * verb, and no write verb may follow. No known verb at all: not a read. */\nexport function isReadToolName(tool: string): boolean {\n const words = nameWords(tool)\n const first = words.find((w) => READ_VERBS.has(w) || WRITE_VERBS.has(w) || NOUN_VERBS.has(w))\n if (!first || !READ_VERBS.has(first)) return false\n return !words.some((w) => WRITE_VERBS.has(w))\n}\n\n/** The server and tool of a namespaced `mcp__<server>__<tool>` call that\n * must wait for a card, or null. Only servers with an `allowTools` list\n * are gated, only tools that list allows (the rest are refused before\n * this), and never a tool on `readTools` or one whose name reads. */\nexport function mcpWriteNeedingConfirm(\n toolName: string,\n servers: Record<string, McpPolicyFields> | undefined,\n): { server: string; tool: string } | null {\n if (!servers || !toolName.startsWith(\"mcp__\")) return null\n const names = Object.keys(servers).sort((a, b) => b.length - a.length)\n for (const server of names) {\n const prefix = `mcp__${server}__`\n if (!toolName.startsWith(prefix)) continue\n const spec = servers[server]\n if (!spec?.allowTools) return null\n const tool = toolName.slice(prefix.length)\n if (!toolAllowed(spec.allowTools, tool)) return null\n if (spec.readTools && toolAllowed(spec.readTools, tool)) return null\n return isReadToolName(tool) ? null : { server, tool }\n }\n return null\n}\n"],"mappings":"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","names":["resolveHttpHeaders","spec","env","out","header","name","value","placeholderHeaders","headerEnvNames","wildcardToRegExp","pattern","body","s","toolAllowed","allowTools","tool","p","mcpAllowListDenial","toolName","servers","names","a","b","server","prefix","list","allowListHookMatcher","n","READ_VERBS","WRITE_VERBS","NOUN_VERBS","nameWords","isReadToolName","words","first","w","mcpWriteNeedingConfirm"]}
|