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,4 +1,4 @@
|
|
|
1
|
-
import{a as g,b as y}from"./chunk-GTJIKXDB.js";import{c as F,h as G}from"./chunk-
|
|
1
|
+
import{a as g,b as y}from"./chunk-GTJIKXDB.js";import{c as F,h as G}from"./chunk-KEUW6YLL.js";import"./chunk-QIJLFPWE.js";import{existsSync as E,readFileSync as P}from"fs";import{resolve as M}from"path";var I=[["216","Tunisia"],["966","Saudi Arabia"],["971","UAE"],["974","Qatar"],["965","Kuwait"],["973","Bahrain"],["968","Oman"],["962","Jordan"],["961","Lebanon"],["212","Morocco"],["213","Algeria"],["218","Libya"],["249","Sudan"],["20","Egypt"],["90","Turkey"],["33","France"],["49","Germany"],["39","Italy"],["34","Spain"],["44","United Kingdom"],["31","Netherlands"],["32","Belgium"],["41","Switzerland"],["1","US/Canada"]];function p(n){let t=n.replace(/\D/g,""),o,e=0;for(let[r,a]of I)t.startsWith(r)&&r.length>e&&(o=a,e=r.length);return o}function A(n){let t=[];for(let o of n.split(`
|
|
2
2
|
`)){let e=o.trim();if(!e||e.startsWith("ALIAS"))continue;let r=e.split(/\s{2,}/).filter(Boolean);if(r.length<2)continue;let a=r[r.length-1];if(!a.includes("@"))continue;let i=r[r.length-2],s=r.length>=3?r[r.length-3]:"";if(!s||!/\d/.test(i))continue;let l=p(i);t.push({name:s,source:"wacli",fields:{phone:`+${i.replace(/\D/g,"")}`,whatsapp:a,...l?{country:l}:{}}})}return t}function w(){return{name:"wacli",provides:["contact value","country"],async available(){if(!await y("wacli"))return{kind:"not-installed",hint:"brew install wacli \u2014 see https://wacli.sh"};let{stdout:n,stderr:t,code:o}=await g("wacli",["contacts","search","__agentx_probe__"],{timeoutMs:1e4});return o!==0&&/auth|not logged in|no session|login/i.test(n+t)?{kind:"not-configured",hint:"wacli auth \u2014 scan the QR to link the account"}:null},async lookup(n,t){let o=[],e=new Set;for(let r of n)for(let a of T(r.name)){let{stdout:i,code:s}=await g("wacli",["contacts","search",a],{signal:t,timeoutMs:15e3});if(s!==0)continue;let l=A(i).filter(u=>C(u.name,r.name));if(l.length!==0){for(let u of l){let c=u.fields.whatsapp;e.has(c)||(e.add(c),o.push({...u,fuzzy:!j(u.name,r.name)}))}break}}return o}}}var h=n=>n.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/[^a-z0-9 ]/g,"").trim(),j=(n,t)=>h(n)===h(t);function T(n){let t=h(n).split(/\s+/).filter(o=>o.length>2);return t.length>1?[n,t[t.length-1]]:[n]}function C(n,t){let o=h(n).split(/\s+/).filter(Boolean),e=h(t).split(/\s+/).filter(Boolean);if(o.length===0||e.length===0)return!1;let[r,a]=o.length<=e.length?[o,e]:[e,o];return r.every(i=>a.includes(i))}var D={whatsapp:"whatsapp",telegram:"telegram",gitlab:"gitlab",github:"github",email:"email",phone:"phone",slack:"slack",discord:"discord"};function z(n=".agentx"){return M(process.cwd(),n,"contacts.json")}function S(n){if(!E(n))return[];try{let t=JSON.parse(P(n,"utf-8"));return Array.isArray(t?.contacts)?t.contacts:[]}catch{return[]}}var b=n=>n.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/[^a-z0-9 ]/g,"").trim();function _(n){return[n.name,n.id,...n.aliases??[]].filter(t=>!!(t&&t.trim())).map(b)}function L(n){let t={};for(let[o,e]of Object.entries(n.channels??{})){let r=String(e??"").trim();if(!r)continue;let a=D[o.toLowerCase()]??o.toLowerCase();if(a==="whatsapp"){let i=r.split("@")[0].replace(/\D/g,"");if(t.whatsapp=r.includes("@")?r:`${i}@s.whatsapp.net`,i){t.phone??=`+${i}`;let s=p(i);s&&(t.country??=s)}continue}if(a==="phone"){let i=r.replace(/\D/g,"");t.phone=r.startsWith("+")?r:`+${i}`;let s=p(i);s&&(t.country??=s);continue}if(a==="telegram"&&/^\d+$/.test(r)){t.telegramId=r;continue}t[a]=a==="gitlab"||a==="github"?r.startsWith("@")?r:`@${r}`:r}return t}function k(n={}){let t=n.path??z();return{name:"contacts",provides:["contact value","handles","country"],async available(){return E(t)?S(t).length>0?null:{kind:"not-configured",hint:`${t} has no contacts`}:{kind:"not-configured",hint:`no ${t} \u2014 add {"contacts":[{"name":"\u2026","aliases":[],"channels":{"whatsapp":"\u2026"}}]}`}},async lookup(o){let e=S(t);if(e.length===0)return[];let r=new Map;for(let s of e)for(let l of _(s))l&&r.set(l,s);let a=[],i=new Set;for(let s of o){let l=r.get(b(s.name));if(!l||i.has(l))continue;i.add(l);let u=L(l);Object.keys(u).length!==0&&a.push({name:l.name??s.name,source:"contacts",fields:u,fuzzy:b(l.name??"")!==b(s.name)})}return a}}}function v(n={}){let t=(n.baseUrl??process.env.GITLAB_URL??"").replace(/\/+$/,""),o=n.token??process.env.GITLAB_ADMIN_TOKEN??process.env.GITLAB_TOKEN;return{name:"gitlab",provides:["email","handle","profile URL"],async available(){if(!t)return{kind:"not-configured",hint:"export GITLAB_URL=https://<your-gitlab-host>"};if(!o)return{kind:"not-configured",hint:"export GITLAB_ADMIN_TOKEN=<PAT> (read_api scope is enough)"};try{let e=await fetch(`${t}/api/v4/user`,{headers:{"PRIVATE-TOKEN":o}});if(e.status===401||e.status===403)return{kind:"not-configured",hint:`GitLab rejected the token (${e.status}) \u2014 set a valid GITLAB_ADMIN_TOKEN`};if(!e.ok)return{kind:"failed",hint:`GitLab returned ${e.status} for the auth probe`}}catch(e){return{kind:"failed",hint:`cannot reach ${t}: ${String(e?.message??e)}`}}return null},async lookup(e,r){if(!o||!t)return[];let a=[],i=new Set;for(let s of e){let l=`${t}/api/v4/users?search=${encodeURIComponent(s.name)}&per_page=5`,u;try{let c=await fetch(l,{headers:{"PRIVATE-TOKEN":o},signal:r});if(!c.ok)continue;u=await c.json()}catch{continue}if(Array.isArray(u))for(let c of u){let d=c.username??c.web_url??"";if(!d||i.has(d))continue;i.add(d);let f={},m=c.email||c.public_email;m&&(f.email=m),c.username&&(f.gitlab=`@${c.username}`),c.web_url&&(f.profile=c.web_url),c.organization&&(f.organisation=c.organization),c.job_title&&(f.role=c.job_title),c.state&&c.state!=="active"&&(f.accountState=c.state),Object.keys(f).length!==0&&a.push({name:c.name??s.name,source:"gitlab",fields:f,fuzzy:(c.name??"").toLowerCase()!==s.name.toLowerCase()})}}return a}}}function x(){return{name:"gog",provides:["contact value","email","organisation","role","country"],async available(){if(!await y("gog"))return{kind:"not-installed",hint:"brew install gog \u2014 Google CLI"};let{stdout:n,stderr:t}=await g("gog",["contacts","list","-j"],{timeoutMs:2e4}),o=n+t;return/unknown flag|Run with --help/i.test(o)?{kind:"failed",hint:`gog rejected the probe: ${o.split(`
|
|
3
3
|
`)[0]}`}:/accessNotConfigured|has not been used in project/i.test(o)?{kind:"not-configured",hint:"enable the People API on the gog OAuth project, then retry (console.developers.google.com \u2192 APIs \u2192 People API)"}:/invalid_grant|PERMISSION_DENIED|unauthenticated/i.test(o)?{kind:"not-configured",hint:"gog auth login \u2014 the stored token is expired or lacks contacts scope"}:null},async lookup(n,t){let o=[];for(let e of n){let{stdout:r,code:a}=await g("gog",["contacts","search",e.name,"-j","--results-only"],{signal:t,timeoutMs:2e4});if(a!==0)continue;let i;try{i=JSON.parse(r)}catch{continue}let s=Array.isArray(i)?i:i?.results??i?.people??[];for(let l of s){let u={},c=l.phoneNumbers?.[0]?.value,d=l.emailAddresses?.[0]?.value,f=l.organizations?.[0];c&&(u.phone=c),d&&(u.email=d),f?.name&&(u.organisation=f.name),f?.title&&(u.role=f.title);let m=l.addresses?.[0]?.country;m&&(u.country=m),Object.keys(u).length!==0&&o.push({name:l.names?.[0]?.displayName??e.name,source:"gog",fields:u})}}return o}}}G();var R=n=>typeof n=="string"&&n.trim()?n.trim():void 0;function $(n){return String(n??"").split("@")[0].split(":")[0].toLowerCase()}function U(n){let t=new Map;for(let o of n){let e=R(o.meta?.sender);if(!e||F(e))continue;let r=R(o.meta?.senderId),a=R(o.meta?.senderUsername),i=$(o.source),s={};if(r&&/@s\.whatsapp\.net$/.test(r)){let c=r.split("@")[0].replace(/\D/g,"");if(c){s.phone=`+${c}`,s.whatsapp=r;let d=p(c);d&&(s.country=d)}}else if(i==="whatsapp"&&r&&/^\d{6,}$/.test(r)){s.phone=`+${r}`,s.whatsapp=`${r}@s.whatsapp.net`;let c=p(r);c&&(s.country=c)}if(a){let c=a.startsWith("@")?a:`@${a}`;i==="gitlab"?s.gitlab=c:i==="github"?s.github=c:i==="telegram"?s.telegram=c:s.handle=c}if(r&&!s.phone&&!a&&(s[`${i||"platform"}Id`]=r),Object.keys(s).length===0)continue;let l=e.toLowerCase(),u=t.get(l);if(!u){t.set(l,{name:e,source:"entries",fields:s});continue}for(let[c,d]of Object.entries(s))u.fields[c]??=d}return Array.from(t.values())}function H(n){let t;return{...n,available:()=>t??=n.available(),lookup:(o,e)=>n.lookup(o,e)}}function N(){return[k(),w(),v(),x()].map(H)}function ct(n,t={}){let o=t.max??25,e=new Map;for(let a of n){let i=(a.sender??"").trim();i&&O(i)&&e.set(i.toLowerCase(),{name:i,origin:"sender",type:"person"})}for(let a of n){let i=(a.context??"").trim();if(!O(i))continue;let s=i.toLowerCase();e.has(s)||e.set(s,{name:i,origin:"context"})}let r=(t.known??[]).filter(a=>a.trim().length>2);if(r.length>0){let a=n.map(i=>i.content??"").join(`
|
|
4
4
|
`).toLowerCase();for(let i of r){let s=i.toLowerCase().trim();e.has(s)||a.includes(s)&&e.set(s,{name:i,origin:"body",type:"person"})}}return Array.from(e.values()).slice(0,o)}var B=new Set(["me","user","system","cron","unknown","anonymous","bot","agent","self","test","admin","none","null","n/a"]),W=new Set(["group","team","chat","channel","squad","crew","room","family","project","board","committee","club","staff","office","dept","department","support","sales","ops","admins","everyone","all"]);function O(n){let t=n.trim();if(!t||t.length>48||B.has(t.toLowerCase())||/[\d@/\\#:|_]/.test(t))return!1;let o=t.split(/\s+/);return o.length<2||o.length>4||o.some(e=>W.has(e.toLowerCase()))?!1:o.every(e=>/^[\p{Lu}][\p{L}'’.-]*$/u.test(e))}async function lt(n,t={}){let o=t.sources??N(),e=n.slice(0,t.maxEntities??25);if(e.length===0)return{records:[],results:[]};let r=new AbortController,a=setTimeout(()=>r.abort(),t.timeoutMs??12e4);try{let i=await Promise.all(o.map(async s=>{let l=Date.now();try{let u=await s.available();if(u)return{source:s.name,records:[],unavailable:u,ms:Date.now()-l};let c=await s.lookup(e,r.signal);return{source:s.name,records:c,ms:Date.now()-l}}catch(u){return{source:s.name,records:[],unavailable:{kind:"failed",hint:String(u?.message??u)},ms:Date.now()-l}}}));for(let s of i)t.onResult?.(s);return{records:i.flatMap(s=>s.records),results:i}}finally{clearTimeout(a)}}function ut(n,t=N()){let o=new Map(t.map(e=>[e.name,e.provides]));return n.filter(e=>e.unavailable&&e.unavailable.kind!=="failed").map(e=>({source:e.source,kind:e.unavailable.kind,hint:e.unavailable.hint,provides:o.get(e.source)??[]}))}function ft(n){let t=new Map;for(let o of n){let e=o.name.toLowerCase().trim(),r=t.get(e);r||(r={name:o.name,fields:{}},t.set(e,r));for(let[a,i]of Object.entries(o.fields)){if(!i?.trim())continue;let s=r.fields[a];if(!s){r.fields[a]={value:i,source:o.source};continue}s.value!==i&&(r.fields[`${a} (${o.source})`]??={value:i,source:o.source})}}return Array.from(t.values())}function dt(n){if(n.length===0)return"";let t=n.filter(o=>Object.keys(o.fields).length>0).map(o=>{let e=Object.entries(o.fields).map(([r,a])=>` - ${r}: \`${a.value}\` _(${a.source})_`).join(`
|
|
@@ -19,4 +19,4 @@ contradicts the entries, this wins and the entry is stale.
|
|
|
19
19
|
${t.join(`
|
|
20
20
|
`)}
|
|
21
21
|
`}export{p as countryFromPhone,k as createContactsSource,v as createGitlabSource,x as createGogSource,w as createWacliSource,N as defaultSources,ct as extractHints,L as factsFrom,ut as installPrompts,O as isPersonName,S as loadContacts,H as memoizeAvailability,ft as mergeRecords,_ as namesOf,A as parseContactsTable,$ as platformOf,C as plausible,U as recordsFromEntries,dt as renderFactsBlock,lt as resolveFacts};
|
|
22
|
-
//# sourceMappingURL=facts-
|
|
22
|
+
//# sourceMappingURL=facts-XGZWX6CR.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{b as h}from"./chunk-
|
|
1
|
+
import{b as h}from"./chunk-KXMC7Z5X.js";import"./chunk-RKPAVWXF.js";import"./chunk-E2MW5OCE.js";import{b as I}from"./chunk-IFUAP7UD.js";import"./chunk-KP7KDLZ2.js";import"./chunk-XTIPWYW5.js";import"./chunk-VALKXSXZ.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-CARVBJB7.js";import"./chunk-KEUW6YLL.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-YSCT6DPR.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-3P2YCRBL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=grants-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"./chunk-GJOKXP5D.js";import"./chunk-XL7UWG36.js";import"./chunk-MNG2AMKZ.js";import"./chunk-7I7IEX4S.js";import"./chunk-VQRY4IDI.js";import"./chunk-QIJLFPWE.js";export{c as DEFAULT_GRANT_DAYS,a as GUEST_SCOPE_PREFIX,b as JOIN_CARD_BY,h as JOIN_FAILED,d as MAX_GRANT_DAYS,j as NO_GRANT,l as PAUSED,k as WAITING_HOST,s as endGrant,o as grantBrief,u as grantForGuest,e as grantIdOf,n as guestAccess,p as guestTask,g as inviteGuest,i as joinGuest,f as newGrantId,q as pauseGrant,r as resumeGrant,m as settleGrant,t as updateGrant};
|
|
2
|
+
//# sourceMappingURL=grants-TWDH3Z4K.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-WTCMJZW3.js";import"./chunk-WI7J22NL.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-FXA2WIIP.js";import"./chunk-WPNRDEHW.js";import"./chunk-RPL2P7EP.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-AHWWJ7AF.js";import"./chunk-DCIYOPJF.js";import"./chunk-7I7IEX4S.js";import"./chunk-CARVBJB7.js";import"./chunk-KEUW6YLL.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-YSCT6DPR.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{a as WikiHub};
|
|
2
|
+
//# sourceMappingURL=hub-GVTRKPAU.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -616,6 +616,8 @@ interface McpStdioSpec {
|
|
|
616
616
|
env?: Record<string, string>;
|
|
617
617
|
/** Only these tools are listed and callable (see mcp-policy.ts). */
|
|
618
618
|
allowTools?: string[];
|
|
619
|
+
/** Listed tools that skip the write card (see mcp-policy.ts). */
|
|
620
|
+
readTools?: string[];
|
|
619
621
|
}
|
|
620
622
|
/** HTTP MCP server (Streamable HTTP transport) — POST JSON-RPC bodies to
|
|
621
623
|
* `url`, server may answer as `application/json` or stream as
|
|
@@ -630,9 +632,20 @@ interface McpHttpSpec {
|
|
|
630
632
|
headersEnv?: Record<string, string>;
|
|
631
633
|
/** Only these tools are listed and callable (see mcp-policy.ts). */
|
|
632
634
|
allowTools?: string[];
|
|
635
|
+
/** Listed tools that skip the write card (see mcp-policy.ts). */
|
|
636
|
+
readTools?: string[];
|
|
633
637
|
}
|
|
634
638
|
type McpServerSpec = McpStdioSpec | McpHttpSpec;
|
|
635
639
|
type McpServerMap = Record<string, McpServerSpec>;
|
|
640
|
+
/** Boot each declared server, list its tools, and return a pool that
|
|
641
|
+
* the orchestrator can drop into runAgenticLoop. A server that fails
|
|
642
|
+
* to initialize is dropped from the catalog (with a debug log) so one
|
|
643
|
+
* broken entry can't disable the whole tier. */
|
|
644
|
+
interface McpPoolOptions {
|
|
645
|
+
/** Asked before every call; a string refuses the call with that reason.
|
|
646
|
+
* The orchestrator tier passes the write-tool card here (#1736). */
|
|
647
|
+
beforeCall?: (name: string, input: Record<string, unknown>) => Promise<string | null>;
|
|
648
|
+
}
|
|
636
649
|
|
|
637
650
|
interface AgentContext {
|
|
638
651
|
techStack: TechStack;
|
|
@@ -693,6 +706,9 @@ interface GenerateOptions {
|
|
|
693
706
|
* src/agents/runtime.ts — CLI-backed tiers (claude-code, codex-cli)
|
|
694
707
|
* load their own `.mcp.json` natively and ignore this. */
|
|
695
708
|
mcpServers?: McpServerMap;
|
|
709
|
+
/** Asked before each MCP tool call; a string refuses it with that
|
|
710
|
+
* reason. The runtime wires the write-tool card here (#1736). */
|
|
711
|
+
beforeMcpCall?: McpPoolOptions["beforeCall"];
|
|
696
712
|
}
|
|
697
713
|
interface GenerateResult {
|
|
698
714
|
files: WriteResult;
|
|
@@ -1542,16 +1558,21 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1542
1558
|
* `${NAME}` placeholder, never as the secret. */
|
|
1543
1559
|
headersEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1544
1560
|
allowTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1561
|
+
/** Listed tools that only read though their names do not say so; they
|
|
1562
|
+
* skip the write confirmation card (#1736). */
|
|
1563
|
+
readTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1545
1564
|
}, "strip", z.ZodTypeAny, {
|
|
1546
1565
|
type: "http";
|
|
1547
1566
|
url: string;
|
|
1548
1567
|
allowTools?: string[] | undefined;
|
|
1568
|
+
readTools?: string[] | undefined;
|
|
1549
1569
|
headers?: Record<string, string> | undefined;
|
|
1550
1570
|
headersEnv?: Record<string, string> | undefined;
|
|
1551
1571
|
}, {
|
|
1552
1572
|
type: "http";
|
|
1553
1573
|
url: string;
|
|
1554
1574
|
allowTools?: string[] | undefined;
|
|
1575
|
+
readTools?: string[] | undefined;
|
|
1555
1576
|
headers?: Record<string, string> | undefined;
|
|
1556
1577
|
headersEnv?: Record<string, string> | undefined;
|
|
1557
1578
|
}>, z.ZodObject<{
|
|
@@ -1560,28 +1581,35 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1560
1581
|
args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1561
1582
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1562
1583
|
allowTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1584
|
+
/** Listed tools that only read though their names do not say so; they
|
|
1585
|
+
* skip the write confirmation card (#1736). */
|
|
1586
|
+
readTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1563
1587
|
}, "strip", z.ZodTypeAny, {
|
|
1564
1588
|
command: string;
|
|
1565
1589
|
args: string[];
|
|
1566
1590
|
type?: "stdio" | undefined;
|
|
1567
1591
|
env?: Record<string, string> | undefined;
|
|
1568
1592
|
allowTools?: string[] | undefined;
|
|
1593
|
+
readTools?: string[] | undefined;
|
|
1569
1594
|
}, {
|
|
1570
1595
|
command: string;
|
|
1571
1596
|
type?: "stdio" | undefined;
|
|
1572
1597
|
env?: Record<string, string> | undefined;
|
|
1573
1598
|
args?: string[] | undefined;
|
|
1574
1599
|
allowTools?: string[] | undefined;
|
|
1600
|
+
readTools?: string[] | undefined;
|
|
1575
1601
|
}>]>>>, Record<string, {
|
|
1576
1602
|
command: string;
|
|
1577
1603
|
args: string[];
|
|
1578
1604
|
type?: "stdio" | undefined;
|
|
1579
1605
|
env?: Record<string, string> | undefined;
|
|
1580
1606
|
allowTools?: string[] | undefined;
|
|
1607
|
+
readTools?: string[] | undefined;
|
|
1581
1608
|
} | {
|
|
1582
1609
|
type: "http";
|
|
1583
1610
|
url: string;
|
|
1584
1611
|
allowTools?: string[] | undefined;
|
|
1612
|
+
readTools?: string[] | undefined;
|
|
1585
1613
|
headers?: Record<string, string> | undefined;
|
|
1586
1614
|
headersEnv?: Record<string, string> | undefined;
|
|
1587
1615
|
}> | undefined, Record<string, {
|
|
@@ -1590,10 +1618,12 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1590
1618
|
env?: Record<string, string> | undefined;
|
|
1591
1619
|
args?: string[] | undefined;
|
|
1592
1620
|
allowTools?: string[] | undefined;
|
|
1621
|
+
readTools?: string[] | undefined;
|
|
1593
1622
|
} | {
|
|
1594
1623
|
type: "http";
|
|
1595
1624
|
url: string;
|
|
1596
1625
|
allowTools?: string[] | undefined;
|
|
1626
|
+
readTools?: string[] | undefined;
|
|
1597
1627
|
headers?: Record<string, string> | undefined;
|
|
1598
1628
|
headersEnv?: Record<string, string> | undefined;
|
|
1599
1629
|
}> | undefined>;
|
|
@@ -2150,10 +2180,12 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
2150
2180
|
type?: "stdio" | undefined;
|
|
2151
2181
|
env?: Record<string, string> | undefined;
|
|
2152
2182
|
allowTools?: string[] | undefined;
|
|
2183
|
+
readTools?: string[] | undefined;
|
|
2153
2184
|
} | {
|
|
2154
2185
|
type: "http";
|
|
2155
2186
|
url: string;
|
|
2156
2187
|
allowTools?: string[] | undefined;
|
|
2188
|
+
readTools?: string[] | undefined;
|
|
2157
2189
|
headers?: Record<string, string> | undefined;
|
|
2158
2190
|
headersEnv?: Record<string, string> | undefined;
|
|
2159
2191
|
}> | undefined;
|
|
@@ -2212,10 +2244,12 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
2212
2244
|
env?: Record<string, string> | undefined;
|
|
2213
2245
|
args?: string[] | undefined;
|
|
2214
2246
|
allowTools?: string[] | undefined;
|
|
2247
|
+
readTools?: string[] | undefined;
|
|
2215
2248
|
} | {
|
|
2216
2249
|
type: "http";
|
|
2217
2250
|
url: string;
|
|
2218
2251
|
allowTools?: string[] | undefined;
|
|
2252
|
+
readTools?: string[] | undefined;
|
|
2219
2253
|
headers?: Record<string, string> | undefined;
|
|
2220
2254
|
headersEnv?: Record<string, string> | undefined;
|
|
2221
2255
|
}> | undefined;
|
|
@@ -2781,16 +2815,21 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2781
2815
|
* `${NAME}` placeholder, never as the secret. */
|
|
2782
2816
|
headersEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2783
2817
|
allowTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2818
|
+
/** Listed tools that only read though their names do not say so; they
|
|
2819
|
+
* skip the write confirmation card (#1736). */
|
|
2820
|
+
readTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2784
2821
|
}, "strip", z.ZodTypeAny, {
|
|
2785
2822
|
type: "http";
|
|
2786
2823
|
url: string;
|
|
2787
2824
|
allowTools?: string[] | undefined;
|
|
2825
|
+
readTools?: string[] | undefined;
|
|
2788
2826
|
headers?: Record<string, string> | undefined;
|
|
2789
2827
|
headersEnv?: Record<string, string> | undefined;
|
|
2790
2828
|
}, {
|
|
2791
2829
|
type: "http";
|
|
2792
2830
|
url: string;
|
|
2793
2831
|
allowTools?: string[] | undefined;
|
|
2832
|
+
readTools?: string[] | undefined;
|
|
2794
2833
|
headers?: Record<string, string> | undefined;
|
|
2795
2834
|
headersEnv?: Record<string, string> | undefined;
|
|
2796
2835
|
}>, z.ZodObject<{
|
|
@@ -2799,28 +2838,35 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2799
2838
|
args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
2800
2839
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2801
2840
|
allowTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2841
|
+
/** Listed tools that only read though their names do not say so; they
|
|
2842
|
+
* skip the write confirmation card (#1736). */
|
|
2843
|
+
readTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2802
2844
|
}, "strip", z.ZodTypeAny, {
|
|
2803
2845
|
command: string;
|
|
2804
2846
|
args: string[];
|
|
2805
2847
|
type?: "stdio" | undefined;
|
|
2806
2848
|
env?: Record<string, string> | undefined;
|
|
2807
2849
|
allowTools?: string[] | undefined;
|
|
2850
|
+
readTools?: string[] | undefined;
|
|
2808
2851
|
}, {
|
|
2809
2852
|
command: string;
|
|
2810
2853
|
type?: "stdio" | undefined;
|
|
2811
2854
|
env?: Record<string, string> | undefined;
|
|
2812
2855
|
args?: string[] | undefined;
|
|
2813
2856
|
allowTools?: string[] | undefined;
|
|
2857
|
+
readTools?: string[] | undefined;
|
|
2814
2858
|
}>]>>>, Record<string, {
|
|
2815
2859
|
command: string;
|
|
2816
2860
|
args: string[];
|
|
2817
2861
|
type?: "stdio" | undefined;
|
|
2818
2862
|
env?: Record<string, string> | undefined;
|
|
2819
2863
|
allowTools?: string[] | undefined;
|
|
2864
|
+
readTools?: string[] | undefined;
|
|
2820
2865
|
} | {
|
|
2821
2866
|
type: "http";
|
|
2822
2867
|
url: string;
|
|
2823
2868
|
allowTools?: string[] | undefined;
|
|
2869
|
+
readTools?: string[] | undefined;
|
|
2824
2870
|
headers?: Record<string, string> | undefined;
|
|
2825
2871
|
headersEnv?: Record<string, string> | undefined;
|
|
2826
2872
|
}> | undefined, Record<string, {
|
|
@@ -2829,10 +2875,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2829
2875
|
env?: Record<string, string> | undefined;
|
|
2830
2876
|
args?: string[] | undefined;
|
|
2831
2877
|
allowTools?: string[] | undefined;
|
|
2878
|
+
readTools?: string[] | undefined;
|
|
2832
2879
|
} | {
|
|
2833
2880
|
type: "http";
|
|
2834
2881
|
url: string;
|
|
2835
2882
|
allowTools?: string[] | undefined;
|
|
2883
|
+
readTools?: string[] | undefined;
|
|
2836
2884
|
headers?: Record<string, string> | undefined;
|
|
2837
2885
|
headersEnv?: Record<string, string> | undefined;
|
|
2838
2886
|
}> | undefined>;
|
|
@@ -3389,10 +3437,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3389
3437
|
type?: "stdio" | undefined;
|
|
3390
3438
|
env?: Record<string, string> | undefined;
|
|
3391
3439
|
allowTools?: string[] | undefined;
|
|
3440
|
+
readTools?: string[] | undefined;
|
|
3392
3441
|
} | {
|
|
3393
3442
|
type: "http";
|
|
3394
3443
|
url: string;
|
|
3395
3444
|
allowTools?: string[] | undefined;
|
|
3445
|
+
readTools?: string[] | undefined;
|
|
3396
3446
|
headers?: Record<string, string> | undefined;
|
|
3397
3447
|
headersEnv?: Record<string, string> | undefined;
|
|
3398
3448
|
}> | undefined;
|
|
@@ -3451,10 +3501,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3451
3501
|
env?: Record<string, string> | undefined;
|
|
3452
3502
|
args?: string[] | undefined;
|
|
3453
3503
|
allowTools?: string[] | undefined;
|
|
3504
|
+
readTools?: string[] | undefined;
|
|
3454
3505
|
} | {
|
|
3455
3506
|
type: "http";
|
|
3456
3507
|
url: string;
|
|
3457
3508
|
allowTools?: string[] | undefined;
|
|
3509
|
+
readTools?: string[] | undefined;
|
|
3458
3510
|
headers?: Record<string, string> | undefined;
|
|
3459
3511
|
headersEnv?: Record<string, string> | undefined;
|
|
3460
3512
|
}> | undefined;
|
|
@@ -6604,6 +6656,16 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
6604
6656
|
composeTimeoutSeconds?: number | undefined;
|
|
6605
6657
|
}>>;
|
|
6606
6658
|
}, "strip", z.ZodTypeAny, {
|
|
6659
|
+
popup: {
|
|
6660
|
+
enabled: boolean;
|
|
6661
|
+
style: "card" | "dialog";
|
|
6662
|
+
sound: string;
|
|
6663
|
+
timeoutSeconds: number;
|
|
6664
|
+
volume: number;
|
|
6665
|
+
theme: "system" | "light" | "dark";
|
|
6666
|
+
speak: boolean;
|
|
6667
|
+
voice?: string | undefined;
|
|
6668
|
+
};
|
|
6607
6669
|
digest: {
|
|
6608
6670
|
enabled: boolean;
|
|
6609
6671
|
time: string;
|
|
@@ -6618,16 +6680,6 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
6618
6680
|
maxExpiryDays: number;
|
|
6619
6681
|
laterHours: number;
|
|
6620
6682
|
notifyAgent: boolean;
|
|
6621
|
-
popup: {
|
|
6622
|
-
enabled: boolean;
|
|
6623
|
-
style: "card" | "dialog";
|
|
6624
|
-
sound: string;
|
|
6625
|
-
timeoutSeconds: number;
|
|
6626
|
-
volume: number;
|
|
6627
|
-
theme: "system" | "light" | "dark";
|
|
6628
|
-
speak: boolean;
|
|
6629
|
-
voice?: string | undefined;
|
|
6630
|
-
};
|
|
6631
6683
|
checkin: {
|
|
6632
6684
|
enabled: boolean;
|
|
6633
6685
|
times: string[];
|
|
@@ -6641,6 +6693,16 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
6641
6693
|
};
|
|
6642
6694
|
forwardTo?: string | undefined;
|
|
6643
6695
|
}, {
|
|
6696
|
+
popup?: {
|
|
6697
|
+
enabled?: boolean | undefined;
|
|
6698
|
+
style?: "card" | "dialog" | undefined;
|
|
6699
|
+
voice?: string | undefined;
|
|
6700
|
+
sound?: string | undefined;
|
|
6701
|
+
timeoutSeconds?: number | undefined;
|
|
6702
|
+
volume?: number | undefined;
|
|
6703
|
+
theme?: "system" | "light" | "dark" | undefined;
|
|
6704
|
+
speak?: boolean | undefined;
|
|
6705
|
+
} | undefined;
|
|
6644
6706
|
digest?: {
|
|
6645
6707
|
enabled?: boolean | undefined;
|
|
6646
6708
|
timezone?: string | undefined;
|
|
@@ -6656,16 +6718,6 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
6656
6718
|
laterHours?: number | undefined;
|
|
6657
6719
|
notifyAgent?: boolean | undefined;
|
|
6658
6720
|
forwardTo?: string | undefined;
|
|
6659
|
-
popup?: {
|
|
6660
|
-
enabled?: boolean | undefined;
|
|
6661
|
-
style?: "card" | "dialog" | undefined;
|
|
6662
|
-
voice?: string | undefined;
|
|
6663
|
-
sound?: string | undefined;
|
|
6664
|
-
timeoutSeconds?: number | undefined;
|
|
6665
|
-
volume?: number | undefined;
|
|
6666
|
-
theme?: "system" | "light" | "dark" | undefined;
|
|
6667
|
-
speak?: boolean | undefined;
|
|
6668
|
-
} | undefined;
|
|
6669
6721
|
checkin?: {
|
|
6670
6722
|
enabled?: boolean | undefined;
|
|
6671
6723
|
agent?: string | undefined;
|
|
@@ -8759,16 +8811,23 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
8759
8811
|
* agent's own chat, and a message the callee writes back to it lands
|
|
8760
8812
|
* there too. Off: such a send is queued and its answer only logged. */
|
|
8761
8813
|
callbackSends: z.ZodDefault<z.ZodBoolean>;
|
|
8814
|
+
/** How long a finished delegation's answer waits for the other ones
|
|
8815
|
+
* still running from the same chat, so the asking agent gets them in
|
|
8816
|
+
* one turn instead of one turn each (#1749). 0: only answers that
|
|
8817
|
+
* are already in are joined. */
|
|
8818
|
+
coalesceSeconds: z.ZodDefault<z.ZodNumber>;
|
|
8762
8819
|
}, "strip", z.ZodTypeAny, {
|
|
8763
8820
|
asyncWhenHuman: boolean;
|
|
8764
8821
|
timeoutMinutes: number;
|
|
8765
8822
|
requeueRelayOnRestart: boolean;
|
|
8766
8823
|
callbackSends: boolean;
|
|
8824
|
+
coalesceSeconds: number;
|
|
8767
8825
|
}, {
|
|
8768
8826
|
asyncWhenHuman?: boolean | undefined;
|
|
8769
8827
|
timeoutMinutes?: number | undefined;
|
|
8770
8828
|
requeueRelayOnRestart?: boolean | undefined;
|
|
8771
8829
|
callbackSends?: boolean | undefined;
|
|
8830
|
+
coalesceSeconds?: number | undefined;
|
|
8772
8831
|
}>>;
|
|
8773
8832
|
}, "strip", z.ZodTypeAny, {
|
|
8774
8833
|
enabled: boolean;
|
|
@@ -8777,6 +8836,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
8777
8836
|
timeoutMinutes: number;
|
|
8778
8837
|
requeueRelayOnRestart: boolean;
|
|
8779
8838
|
callbackSends: boolean;
|
|
8839
|
+
coalesceSeconds: number;
|
|
8780
8840
|
};
|
|
8781
8841
|
peers: {
|
|
8782
8842
|
name: string;
|
|
@@ -8804,6 +8864,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
8804
8864
|
timeoutMinutes?: number | undefined;
|
|
8805
8865
|
requeueRelayOnRestart?: boolean | undefined;
|
|
8806
8866
|
callbackSends?: boolean | undefined;
|
|
8867
|
+
coalesceSeconds?: number | undefined;
|
|
8807
8868
|
} | undefined;
|
|
8808
8869
|
peers?: {
|
|
8809
8870
|
name: string;
|
|
@@ -9864,11 +9925,6 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
9864
9925
|
draftAgent: z.ZodOptional<z.ZodString>;
|
|
9865
9926
|
wall: z.ZodDefault<z.ZodObject<{
|
|
9866
9927
|
rhythmHours: z.ZodOptional<z.ZodNumber>;
|
|
9867
|
-
/**
|
|
9868
|
-
* Canonical kind list — for autocomplete + doctor validation. Open string
|
|
9869
|
-
* schema so new services drop in without a bump; doctor warns when a kind
|
|
9870
|
-
* is outside this list.
|
|
9871
|
-
*/
|
|
9872
9928
|
projects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
9873
9929
|
name: z.ZodString;
|
|
9874
9930
|
repos: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -11330,10 +11386,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
11330
11386
|
type?: "stdio" | undefined;
|
|
11331
11387
|
env?: Record<string, string> | undefined;
|
|
11332
11388
|
allowTools?: string[] | undefined;
|
|
11389
|
+
readTools?: string[] | undefined;
|
|
11333
11390
|
} | {
|
|
11334
11391
|
type: "http";
|
|
11335
11392
|
url: string;
|
|
11336
11393
|
allowTools?: string[] | undefined;
|
|
11394
|
+
readTools?: string[] | undefined;
|
|
11337
11395
|
headers?: Record<string, string> | undefined;
|
|
11338
11396
|
headersEnv?: Record<string, string> | undefined;
|
|
11339
11397
|
}> | undefined;
|
|
@@ -11372,6 +11430,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
11372
11430
|
timeoutMinutes: number;
|
|
11373
11431
|
requeueRelayOnRestart: boolean;
|
|
11374
11432
|
callbackSends: boolean;
|
|
11433
|
+
coalesceSeconds: number;
|
|
11375
11434
|
};
|
|
11376
11435
|
peers: {
|
|
11377
11436
|
name: string;
|
|
@@ -11737,6 +11796,16 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
11737
11796
|
};
|
|
11738
11797
|
};
|
|
11739
11798
|
approvals: {
|
|
11799
|
+
popup: {
|
|
11800
|
+
enabled: boolean;
|
|
11801
|
+
style: "card" | "dialog";
|
|
11802
|
+
sound: string;
|
|
11803
|
+
timeoutSeconds: number;
|
|
11804
|
+
volume: number;
|
|
11805
|
+
theme: "system" | "light" | "dark";
|
|
11806
|
+
speak: boolean;
|
|
11807
|
+
voice?: string | undefined;
|
|
11808
|
+
};
|
|
11740
11809
|
digest: {
|
|
11741
11810
|
enabled: boolean;
|
|
11742
11811
|
time: string;
|
|
@@ -11751,16 +11820,6 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
11751
11820
|
maxExpiryDays: number;
|
|
11752
11821
|
laterHours: number;
|
|
11753
11822
|
notifyAgent: boolean;
|
|
11754
|
-
popup: {
|
|
11755
|
-
enabled: boolean;
|
|
11756
|
-
style: "card" | "dialog";
|
|
11757
|
-
sound: string;
|
|
11758
|
-
timeoutSeconds: number;
|
|
11759
|
-
volume: number;
|
|
11760
|
-
theme: "system" | "light" | "dark";
|
|
11761
|
-
speak: boolean;
|
|
11762
|
-
voice?: string | undefined;
|
|
11763
|
-
};
|
|
11764
11823
|
checkin: {
|
|
11765
11824
|
enabled: boolean;
|
|
11766
11825
|
times: string[];
|
|
@@ -12668,10 +12727,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
12668
12727
|
env?: Record<string, string> | undefined;
|
|
12669
12728
|
args?: string[] | undefined;
|
|
12670
12729
|
allowTools?: string[] | undefined;
|
|
12730
|
+
readTools?: string[] | undefined;
|
|
12671
12731
|
} | {
|
|
12672
12732
|
type: "http";
|
|
12673
12733
|
url: string;
|
|
12674
12734
|
allowTools?: string[] | undefined;
|
|
12735
|
+
readTools?: string[] | undefined;
|
|
12675
12736
|
headers?: Record<string, string> | undefined;
|
|
12676
12737
|
headersEnv?: Record<string, string> | undefined;
|
|
12677
12738
|
}> | undefined;
|
|
@@ -12769,6 +12830,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
12769
12830
|
timeoutMinutes?: number | undefined;
|
|
12770
12831
|
requeueRelayOnRestart?: boolean | undefined;
|
|
12771
12832
|
callbackSends?: boolean | undefined;
|
|
12833
|
+
coalesceSeconds?: number | undefined;
|
|
12772
12834
|
} | undefined;
|
|
12773
12835
|
peers?: {
|
|
12774
12836
|
name: string;
|
|
@@ -13216,6 +13278,16 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
13216
13278
|
} | undefined;
|
|
13217
13279
|
} | undefined;
|
|
13218
13280
|
approvals?: {
|
|
13281
|
+
popup?: {
|
|
13282
|
+
enabled?: boolean | undefined;
|
|
13283
|
+
style?: "card" | "dialog" | undefined;
|
|
13284
|
+
voice?: string | undefined;
|
|
13285
|
+
sound?: string | undefined;
|
|
13286
|
+
timeoutSeconds?: number | undefined;
|
|
13287
|
+
volume?: number | undefined;
|
|
13288
|
+
theme?: "system" | "light" | "dark" | undefined;
|
|
13289
|
+
speak?: boolean | undefined;
|
|
13290
|
+
} | undefined;
|
|
13219
13291
|
digest?: {
|
|
13220
13292
|
enabled?: boolean | undefined;
|
|
13221
13293
|
timezone?: string | undefined;
|
|
@@ -13231,16 +13303,6 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
13231
13303
|
laterHours?: number | undefined;
|
|
13232
13304
|
notifyAgent?: boolean | undefined;
|
|
13233
13305
|
forwardTo?: string | undefined;
|
|
13234
|
-
popup?: {
|
|
13235
|
-
enabled?: boolean | undefined;
|
|
13236
|
-
style?: "card" | "dialog" | undefined;
|
|
13237
|
-
voice?: string | undefined;
|
|
13238
|
-
sound?: string | undefined;
|
|
13239
|
-
timeoutSeconds?: number | undefined;
|
|
13240
|
-
volume?: number | undefined;
|
|
13241
|
-
theme?: "system" | "light" | "dark" | undefined;
|
|
13242
|
-
speak?: boolean | undefined;
|
|
13243
|
-
} | undefined;
|
|
13244
13306
|
checkin?: {
|
|
13245
13307
|
enabled?: boolean | undefined;
|
|
13246
13308
|
agent?: string | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Oa as Tt,Pa 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{Oa as Tt,Pa 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-TLRTJV2U.js";import"./chunk-7JHB3X5N.js";import"./chunk-GTJIKXDB.js";import"./chunk-UN7D7HWU.js";import"./chunk-ZVP6GB4G.js";import"./chunk-6ZVVAGTR.js";import"./chunk-IMLAPB7G.js";import"./chunk-EKJG63EJ.js";import"./chunk-6U34GZ7U.js";import"./chunk-JSCVOB4G.js";import"./chunk-JLBRNYKY.js";import"./chunk-BYEL7KKR.js";import"./chunk-7GD5GTWC.js";import"./chunk-MRIVENBY.js";import"./chunk-GJOKXP5D.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-UKUH662W.js";import"./chunk-3Q6MRG3P.js";import"./chunk-2VDO2HEK.js";import"./chunk-JWDJMFU6.js";import"./chunk-2P5NP4H6.js";import"./chunk-B4KQC3DG.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-Q3A5P373.js";import"./chunk-R6XJWFMC.js";import"./chunk-QPABR72X.js";import"./chunk-A5GYG56I.js";import"./chunk-ZOK6VMEP.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-6TTGRTDO.js";import"./chunk-RX5O5637.js";import"./chunk-E2MW5OCE.js";import"./chunk-5ELIX7BQ.js";import"./chunk-X7UQY7CH.js";import"./chunk-IFUAP7UD.js";import"./chunk-KP7KDLZ2.js";import"./chunk-XVV7ZZ77.js";import{Ca as yt,m as lt,n as ct,o as dt,p as mt,q as pt}from"./chunk-M37WJANA.js";import"./chunk-U3OJO7B7.js";import"./chunk-MEFPXHQJ.js";import"./chunk-7AB3QUGH.js";import{a as L}from"./chunk-BAXGL6TY.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-I4753XPP.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-GV7S5BAX.js";import"./chunk-SZDACK6O.js";import"./chunk-VE3SSOQX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-VJVXEVZ7.js";import{u as ut}from"./chunk-XTIPWYW5.js";import"./chunk-VALKXSXZ.js";import"./chunk-3UOTLMXD.js";import"./chunk-VWTBHLMX.js";import"./chunk-BE64IJWM.js";import"./chunk-5ONH4ITT.js";import"./chunk-JRAG37V5.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GSX4NK2N.js";import"./chunk-HPRLRD4P.js";import"./chunk-WTCMJZW3.js";import{a as ht}from"./chunk-WI7J22NL.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-A2K6C6W3.js";import"./chunk-JTFCU5LH.js";import{f as gt,g as ft}from"./chunk-FXA2WIIP.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-RRLQTU3X.js";import{j as it,k as rt,l as at}from"./chunk-RPL2P7EP.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-QUFIUXMQ.js";import"./chunk-3AHYZLGE.js";import"./chunk-XL7UWG36.js";import"./chunk-MNG2AMKZ.js";import"./chunk-LY4G7PCW.js";import"./chunk-2HBEZV7L.js";import"./chunk-A7JSRDJL.js";import"./chunk-BERWTVG2.js";import"./chunk-AHWWJ7AF.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-DCIYOPJF.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{Fb as tt,Hb as st,Kb as ot,Rb as nt}from"./chunk-CARVBJB7.js";import"./chunk-KEUW6YLL.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-YSCT6DPR.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).
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=org-tool-
|
|
1
|
+
import{b as d}from"./chunk-KXMC7Z5X.js";import"./chunk-RKPAVWXF.js";import"./chunk-E2MW5OCE.js";import{b as c}from"./chunk-IFUAP7UD.js";import"./chunk-KP7KDLZ2.js";import"./chunk-XTIPWYW5.js";import"./chunk-VALKXSXZ.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-CARVBJB7.js";import"./chunk-KEUW6YLL.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-YSCT6DPR.js";import"./chunk-QIJLFPWE.js";var u=new Set(["cron","heartbeat","api","a2a","mesh","approvals","requests"]);function p(n){return typeof n=="string"?n.trim():""}async function y(n,o){let i=o.fetch??fetch,h=o.daemonUrl.replace(/\/$/,""),a=o.env??process.env,s=(p(n.action)||"show").toLowerCase();if(s==="show")try{let e=await i(`${h}/api/org`,{headers:c(a),signal:AbortSignal.timeout(1e4)}),r=await e.json().catch(()=>({}));return e.ok?String(r.text??""):`Error: ${r?.error||`HTTP ${e.status}`}`}catch(e){return`Error: couldn't reach the daemon (${e?.message??e}).`}if(s!=="propose")return`Error: unknown action "${s}". Use show or propose.`;let t=d(n,a);if(!t)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=t.channel&&t.chatId&&!u.has(t.channel)?{channel:t.channel,chatId:t.chatId,...t.accountId?{accountId:t.accountId}:{}}:void 0;try{let e=await i(`${h}/api/org/proposals`,{method:"POST",headers:{"Content-Type":"application/json",...c(a)},body:JSON.stringify({changes:n.changes,newAgent:n.newAgent,why:n.why,raised_by:t.agentId,...l?{reply:l}:{}}),signal:AbortSignal.timeout(1e4)}),r=await e.json().catch(()=>({}));return e.ok?[`Card ${r.card.id} is in the owner's Approvals inbox: "${r.text}"`,"Nothing is changed yet. On the owner's yes the daemon applies it and you get a message with the result; do not edit the org chart yourself.","Tell the owner it is waiting for their yes."].join(" "):`Not proposed: ${r?.error||`HTTP ${e.status}`}`}catch(e){return`Error: couldn't reach the daemon (${e?.message??e}).`}}export{y as runOrgTool};
|
|
2
|
+
//# sourceMappingURL=org-tool-EKO7GCPL.js.map
|