agentix-cli 0.181.1 → 0.182.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/apps/mac-voice/Sources/AgentXVoice/Config.swift +9 -0
- package/apps/mac-voice/Sources/AgentXVoice/MiniOrbs.swift +19 -6
- package/apps/mac-voice/Sources/AgentXVoice/OpenRequests.swift +260 -0
- package/apps/mac-voice/Sources/AgentXVoice/Panel.swift +72 -5
- package/apps/mac-voice/Sources/AgentXVoice/PillBusy.swift +22 -4
- package/apps/mac-voice/Sources/AgentXVoice/PillPlacement.swift +24 -0
- package/apps/mac-voice/Sources/AgentXVoice/RequestsWindow.swift +401 -0
- package/apps/mac-voice/Sources/AgentXVoice/SettingsWindow.swift +1 -0
- package/apps/mac-voice/Sources/AgentXVoice/StatusMenu.swift +22 -1
- package/apps/mac-voice/Sources/AgentXVoice/main.swift +263 -4
- package/dist/{App-UXX5TGFF.js → App-XWSSUYKF.js} +2 -2
- package/dist/{ChatApp-X635NOAE.js → ChatApp-UT2BRHYE.js} +2 -2
- package/dist/{absorb-eval-4ZPDWNBA.js → absorb-eval-SFGUURBD.js} +2 -2
- package/dist/{adapter-Z23K544D.js → adapter-UHR7FVM7.js} +2 -2
- package/dist/{agent-OBRH5BJZ.js → agent-5NTFSCEO.js} +2 -2
- package/dist/{board-dashboard-SFXVOICJ.js → board-dashboard-7HIME2W4.js} +2090 -2248
- package/dist/board-dashboard-7HIME2W4.js.map +1 -0
- package/dist/{chunk-SDINSYTN.js → chunk-343MPMLD.js} +2 -2
- package/dist/{chunk-WKU7YFDV.js → chunk-4KNHLHE3.js} +2 -2
- package/dist/{chunk-WZUY7VGL.js → chunk-4WSJKKSA.js} +2 -2
- package/dist/{chunk-ZSY6PFHD.js → chunk-5NGQQOVK.js} +2 -2
- package/dist/{chunk-FRVFRWFN.js → chunk-5YG2ZQQW.js} +2 -2
- package/dist/{chunk-N6VBEITO.js → chunk-7PQQZC6B.js} +2 -2
- package/dist/{chunk-N6VBEITO.js.map → chunk-7PQQZC6B.js.map} +1 -1
- package/dist/{chunk-7RVJWLIP.js → chunk-7WGJZLVJ.js} +2 -2
- package/dist/{chunk-CF7CPE7K.js → chunk-BY3AUZYM.js} +2 -2
- package/dist/{chunk-IRZYRLXQ.js → chunk-FDX4IGLK.js} +2 -2
- package/dist/{chunk-SD6UDSXV.js → chunk-FYFJ7IQJ.js} +2 -2
- package/dist/{chunk-HBQRVCLU.js → chunk-GEFZMDDX.js} +2 -2
- package/dist/{chunk-TZ7GB7FI.js → chunk-H2KOXGDX.js} +2 -2
- package/dist/{chunk-UFUQQ5J5.js → chunk-IFHVAHQM.js} +2 -2
- package/dist/{chunk-LZY6YN2J.js → chunk-IGBW4VVM.js} +2 -2
- package/dist/{chunk-OYCMFCME.js → chunk-JNWXHOJE.js} +2 -2
- package/dist/{chunk-KOY3EOPH.js → chunk-MD2HCGSC.js} +36 -36
- package/dist/chunk-MD2HCGSC.js.map +1 -0
- package/dist/{chunk-PCWXHXTM.js → chunk-NIPMVM3G.js} +2 -2
- package/dist/{chunk-DOBTHQ32.js → chunk-NRUUT5TL.js} +2 -2
- package/dist/{chunk-Z2UDWVZZ.js → chunk-OKADR5QO.js} +4 -4
- package/dist/chunk-OKADR5QO.js.map +1 -0
- package/dist/{chunk-IYITREE5.js → chunk-QB6UPODO.js} +2 -2
- package/dist/{chunk-VK3M3TVL.js → chunk-QGNV2HA4.js} +3 -3
- package/dist/chunk-QGNV2HA4.js.map +1 -0
- package/dist/{chunk-KVAWRQBA.js → chunk-R3CDFSNF.js} +67 -67
- package/dist/chunk-R3CDFSNF.js.map +1 -0
- package/dist/{chunk-HMEFQL5P.js → chunk-RDWDDPBI.js} +4 -3
- package/dist/chunk-RDWDDPBI.js.map +1 -0
- package/dist/{chunk-QJXGJMHM.js → chunk-XHJ5SVO5.js} +234 -234
- package/dist/chunk-XHJ5SVO5.js.map +1 -0
- package/dist/chunk-XI2HH5NR.js +36 -0
- package/dist/chunk-XI2HH5NR.js.map +1 -0
- package/dist/{chunk-J56YGKUO.js → chunk-Y4TVCWWF.js} +2 -2
- package/dist/{chunk-33DLG4I2.js → chunk-Y5TBOMHY.js} +5 -5
- package/dist/{chunk-UHTIZCKU.js → chunk-YSPBVLTZ.js} +2 -2
- package/dist/{chunk-NI2XD6P3.js → chunk-YX4R2VGD.js} +2 -2
- package/dist/{chunk-U5S6IP7Z.js → chunk-Z4XVPGPZ.js} +3 -3
- package/dist/{chunk-DMCMV4UJ.js → chunk-ZRALOFEG.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{client-ILPJFCTF.js → client-SQMU25PS.js} +2 -2
- package/dist/{config-JVWOL233.js → config-56NBA4SF.js} +2 -2
- package/dist/{config-mutate-WYCHP6VK.js → config-mutate-PD4O3HZ7.js} +2 -2
- package/dist/config-mutator-ITL64FBW.js +2 -0
- package/dist/{contributions-XD66HYWE.js → contributions-DKTJ623L.js} +2 -2
- package/dist/{doctor-DYTYJQYC.js → doctor-OI6GJZR5.js} +2 -2
- package/dist/{follow-up-tool-HPET6LZW.js → follow-up-tool-DYSLS6ZI.js} +2 -2
- package/dist/{hub-L5FFJPS3.js → hub-4HDMTSR7.js} +2 -2
- package/dist/index.d.ts +317 -216
- package/dist/index.js +1 -1
- package/dist/processes-M7YPWX7H.js +2 -0
- package/dist/{program-24C3VBSD.js → program-4GDIWCDM.js} +259 -259
- package/dist/program-4GDIWCDM.js.map +1 -0
- package/dist/{promote-XI6W27JK.js → promote-3272TZNI.js} +2 -2
- package/dist/{query-MGG5QKNC.js → query-7XM6V4QG.js} +2 -2
- package/dist/{query-settings-CALZYYWD.js → query-settings-HHVBIIVQ.js} +2 -2
- package/dist/{registry-XJWSLJ4O.js → registry-QL3AM3UH.js} +2 -2
- package/dist/{request-planner-JCRGGJUO.js → request-planner-WNEDEA7X.js} +2 -2
- package/dist/{review-candidates-OEBEEAEZ.js → review-candidates-TGPDJMWJ.js} +2 -2
- package/dist/{routing-CGH54RYG.js → routing-ALXY25NE.js} +2 -2
- package/dist/schedule-tool-22UBZXCG.js +2 -0
- package/dist/{scheduler-2K5YEV2U.js → scheduler-5PHNW243.js} +2 -2
- package/dist/{seat-DEL5YUOS.js → seat-ZYVVEILY.js} +2 -2
- package/dist/{select-MRTWSI7U.js → select-6QLEV6AC.js} +2 -2
- package/dist/{set-enabled-XTDCFCZY.js → set-enabled-SYYTKJPC.js} +2 -2
- package/dist/{sprint-tool-N7WPDX5J.js → sprint-tool-PYVHPHR2.js} +2 -2
- package/dist/{tool-BQEJOTF3.js → tool-GIYOYXXM.js} +2 -2
- package/dist/{tool-NZTJZDSB.js → tool-TDOUM3BJ.js} +2 -2
- package/dist/{tool-KZHWJ7BC.js → tool-ZKZ4KYJT.js} +2 -2
- package/dist/{wiki-YERCKD3E.js → wiki-ZRGLGMII.js} +2 -2
- package/dist/wiki-enrich-CTID7JQW.js +2 -0
- package/package.json +1 -1
- package/dist/board-dashboard-SFXVOICJ.js.map +0 -1
- package/dist/chunk-G6ZRPC6E.js +0 -36
- package/dist/chunk-G6ZRPC6E.js.map +0 -1
- package/dist/chunk-HMEFQL5P.js.map +0 -1
- package/dist/chunk-KOY3EOPH.js.map +0 -1
- package/dist/chunk-KVAWRQBA.js.map +0 -1
- package/dist/chunk-QJXGJMHM.js.map +0 -1
- package/dist/chunk-VK3M3TVL.js.map +0 -1
- package/dist/chunk-Z2UDWVZZ.js.map +0 -1
- package/dist/config-mutator-DKNHE6VP.js +0 -2
- package/dist/processes-EWARF6ZW.js +0 -2
- package/dist/program-24C3VBSD.js.map +0 -1
- package/dist/schedule-tool-UM3CAPDX.js +0 -2
- package/dist/wiki-enrich-K54LGNU3.js +0 -2
- /package/dist/{App-UXX5TGFF.js.map → App-XWSSUYKF.js.map} +0 -0
- /package/dist/{ChatApp-X635NOAE.js.map → ChatApp-UT2BRHYE.js.map} +0 -0
- /package/dist/{absorb-eval-4ZPDWNBA.js.map → absorb-eval-SFGUURBD.js.map} +0 -0
- /package/dist/{adapter-Z23K544D.js.map → adapter-UHR7FVM7.js.map} +0 -0
- /package/dist/{agent-OBRH5BJZ.js.map → agent-5NTFSCEO.js.map} +0 -0
- /package/dist/{chunk-SDINSYTN.js.map → chunk-343MPMLD.js.map} +0 -0
- /package/dist/{chunk-WKU7YFDV.js.map → chunk-4KNHLHE3.js.map} +0 -0
- /package/dist/{chunk-WZUY7VGL.js.map → chunk-4WSJKKSA.js.map} +0 -0
- /package/dist/{chunk-ZSY6PFHD.js.map → chunk-5NGQQOVK.js.map} +0 -0
- /package/dist/{chunk-FRVFRWFN.js.map → chunk-5YG2ZQQW.js.map} +0 -0
- /package/dist/{chunk-7RVJWLIP.js.map → chunk-7WGJZLVJ.js.map} +0 -0
- /package/dist/{chunk-CF7CPE7K.js.map → chunk-BY3AUZYM.js.map} +0 -0
- /package/dist/{chunk-IRZYRLXQ.js.map → chunk-FDX4IGLK.js.map} +0 -0
- /package/dist/{chunk-SD6UDSXV.js.map → chunk-FYFJ7IQJ.js.map} +0 -0
- /package/dist/{chunk-HBQRVCLU.js.map → chunk-GEFZMDDX.js.map} +0 -0
- /package/dist/{chunk-TZ7GB7FI.js.map → chunk-H2KOXGDX.js.map} +0 -0
- /package/dist/{chunk-UFUQQ5J5.js.map → chunk-IFHVAHQM.js.map} +0 -0
- /package/dist/{chunk-LZY6YN2J.js.map → chunk-IGBW4VVM.js.map} +0 -0
- /package/dist/{chunk-OYCMFCME.js.map → chunk-JNWXHOJE.js.map} +0 -0
- /package/dist/{chunk-PCWXHXTM.js.map → chunk-NIPMVM3G.js.map} +0 -0
- /package/dist/{chunk-DOBTHQ32.js.map → chunk-NRUUT5TL.js.map} +0 -0
- /package/dist/{chunk-IYITREE5.js.map → chunk-QB6UPODO.js.map} +0 -0
- /package/dist/{chunk-J56YGKUO.js.map → chunk-Y4TVCWWF.js.map} +0 -0
- /package/dist/{chunk-33DLG4I2.js.map → chunk-Y5TBOMHY.js.map} +0 -0
- /package/dist/{chunk-UHTIZCKU.js.map → chunk-YSPBVLTZ.js.map} +0 -0
- /package/dist/{chunk-NI2XD6P3.js.map → chunk-YX4R2VGD.js.map} +0 -0
- /package/dist/{chunk-U5S6IP7Z.js.map → chunk-Z4XVPGPZ.js.map} +0 -0
- /package/dist/{chunk-DMCMV4UJ.js.map → chunk-ZRALOFEG.js.map} +0 -0
- /package/dist/{client-ILPJFCTF.js.map → client-SQMU25PS.js.map} +0 -0
- /package/dist/{config-JVWOL233.js.map → config-56NBA4SF.js.map} +0 -0
- /package/dist/{config-mutate-WYCHP6VK.js.map → config-mutate-PD4O3HZ7.js.map} +0 -0
- /package/dist/{config-mutator-DKNHE6VP.js.map → config-mutator-ITL64FBW.js.map} +0 -0
- /package/dist/{contributions-XD66HYWE.js.map → contributions-DKTJ623L.js.map} +0 -0
- /package/dist/{doctor-DYTYJQYC.js.map → doctor-OI6GJZR5.js.map} +0 -0
- /package/dist/{follow-up-tool-HPET6LZW.js.map → follow-up-tool-DYSLS6ZI.js.map} +0 -0
- /package/dist/{hub-L5FFJPS3.js.map → hub-4HDMTSR7.js.map} +0 -0
- /package/dist/{processes-EWARF6ZW.js.map → processes-M7YPWX7H.js.map} +0 -0
- /package/dist/{promote-XI6W27JK.js.map → promote-3272TZNI.js.map} +0 -0
- /package/dist/{query-MGG5QKNC.js.map → query-7XM6V4QG.js.map} +0 -0
- /package/dist/{query-settings-CALZYYWD.js.map → query-settings-HHVBIIVQ.js.map} +0 -0
- /package/dist/{registry-XJWSLJ4O.js.map → registry-QL3AM3UH.js.map} +0 -0
- /package/dist/{request-planner-JCRGGJUO.js.map → request-planner-WNEDEA7X.js.map} +0 -0
- /package/dist/{review-candidates-OEBEEAEZ.js.map → review-candidates-TGPDJMWJ.js.map} +0 -0
- /package/dist/{routing-CGH54RYG.js.map → routing-ALXY25NE.js.map} +0 -0
- /package/dist/{schedule-tool-UM3CAPDX.js.map → schedule-tool-22UBZXCG.js.map} +0 -0
- /package/dist/{scheduler-2K5YEV2U.js.map → scheduler-5PHNW243.js.map} +0 -0
- /package/dist/{seat-DEL5YUOS.js.map → seat-ZYVVEILY.js.map} +0 -0
- /package/dist/{select-MRTWSI7U.js.map → select-6QLEV6AC.js.map} +0 -0
- /package/dist/{set-enabled-XTDCFCZY.js.map → set-enabled-SYYTKJPC.js.map} +0 -0
- /package/dist/{sprint-tool-N7WPDX5J.js.map → sprint-tool-PYVHPHR2.js.map} +0 -0
- /package/dist/{tool-BQEJOTF3.js.map → tool-GIYOYXXM.js.map} +0 -0
- /package/dist/{tool-NZTJZDSB.js.map → tool-TDOUM3BJ.js.map} +0 -0
- /package/dist/{tool-KZHWJ7BC.js.map → tool-ZKZ4KYJT.js.map} +0 -0
- /package/dist/{wiki-YERCKD3E.js.map → wiki-ZRGLGMII.js.map} +0 -0
- /package/dist/{wiki-enrich-K54LGNU3.js.map → wiki-enrich-CTID7JQW.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{d as h}from"./chunk-
|
|
1
|
+
import{d as h}from"./chunk-YSPBVLTZ.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-NIPMVM3G.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as e}from"./chunk-
|
|
1
|
+
import{c as e}from"./chunk-ZRALOFEG.js";function i(t={}){let r=`<div class="ax-proc__kpis" id="proc-kpis" hidden></div>
|
|
2
2
|
<div class="ax-proc__root">
|
|
3
3
|
<aside class="ax-proc__list">
|
|
4
4
|
<header>
|
|
@@ -253,4 +253,4 @@ import{c as e}from"./chunk-DMCMV4UJ.js";function i(t={}){let r=`<div class="ax-p
|
|
|
253
253
|
setInterval(refresh, 5000);
|
|
254
254
|
})();
|
|
255
255
|
`;export{i as a};
|
|
256
|
-
//# sourceMappingURL=chunk-
|
|
256
|
+
//# sourceMappingURL=chunk-NRUUT5TL.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as He,b as w,c as z,d as qe,e as pe,f as ue,g as N,h as ge,i as O,j as U,n as Fe,o as Ke,p as Ge,q as Je}from"./chunk-EFGAPAYZ.js";import{e as Be,i as je}from"./chunk-QAWKN2N4.js";import{b as ce}from"./chunk-DODL5POT.js";import{a as X,b as Le}from"./chunk-
|
|
1
|
+
import{a as He,b as w,c as z,d as qe,e as pe,f as ue,g as N,h as ge,i as O,j as U,n as Fe,o as Ke,p as Ge,q as Je}from"./chunk-EFGAPAYZ.js";import{e as Be,i as je}from"./chunk-QAWKN2N4.js";import{b as ce}from"./chunk-DODL5POT.js";import{a as X,b as Le}from"./chunk-IFHVAHQM.js";import{c as Ue,d as le,e as P,f as de,g as q}from"./chunk-ZRALOFEG.js";import{lb as Oe,na as Ne}from"./chunk-R3CDFSNF.js";import{a as We}from"./chunk-7PQQZC6B.js";import{a as Te}from"./chunk-IMLAPB7G.js";import{b as Y}from"./chunk-2VDO2HEK.js";import{c as De,e as _e}from"./chunk-LQE73AZR.js";import{b as Me}from"./chunk-MRIVENBY.js";import{n as se,p as ze}from"./chunk-CTNZVRPA.js";import{ga as J}from"./chunk-QGNV2HA4.js";import{a as H,b as G}from"./chunk-FDX4IGLK.js";import{a as Re}from"./chunk-GEFZMDDX.js";import{c as Ie,d as Ee}from"./chunk-OWNQ2FD4.js";import{a as Pe}from"./chunk-ROLSSYXE.js";import{a as Ce}from"./chunk-QUFIUXMQ.js";import{Gb as ie,Ta as Ae,_a as Lt,ea as ae,fa as $e,pa as Ut,tb as oe,wb as j,xb as Se}from"./chunk-MD2HCGSC.js";import{existsSync as F,readFileSync as Ve,writeFileSync as Qe,appendFileSync as Ht,mkdirSync as qt}from"fs";import{dirname as Ft,resolve as M}from"path";import{fileURLToPath as Kt}from"url";import{hostname as Gt}from"os";import{spawn as Jt}from"child_process";function Ye(e,t){let n=e.configExists?e.agentCount===0?"Add your first agent":"Add another agent":"Set up your team",r=`<header class="ax-topbar">
|
|
2
2
|
<div class="ax-topbar__left">
|
|
3
3
|
<div class="ax-brand">
|
|
4
4
|
<span class="ax-brand__mark">AX</span>
|
|
@@ -8,7 +8,7 @@ import{a as He,b as w,c as z,d as qe,e as pe,f as ue,g as N,h as ge,i as O,j as
|
|
|
8
8
|
</div>
|
|
9
9
|
<div class="ax-topbar__right">
|
|
10
10
|
<a href="/glossary" class="ax-skip">? Glossary</a>
|
|
11
|
-
<a href="/live" class="ax-skip">Skip \u2014 open dashboard</a>
|
|
11
|
+
<a href="/wall#page=live" class="ax-skip">Skip \u2014 open dashboard</a>
|
|
12
12
|
<div class="ax-theme-switch" role="tablist" aria-label="Theme">
|
|
13
13
|
<button data-theme-opt="dark">Dark</button>
|
|
14
14
|
<button data-theme-opt="light">Light</button>
|
|
@@ -38,7 +38,7 @@ import{a as He,b as w,c as z,d as qe,e as pe,f as ue,g as N,h as ge,i as O,j as
|
|
|
38
38
|
${s}
|
|
39
39
|
<footer class="ax-actions">
|
|
40
40
|
${le("Save and continue",{type:"submit",primary:!0,id:"submitBtn"})}
|
|
41
|
-
${le("Skip, I'll do it later",{onclick:"window.location.href='/live'"})}
|
|
41
|
+
${le("Skip, I'll do it later",{onclick:"window.location.href='/wall#page=live'"})}
|
|
42
42
|
</footer>
|
|
43
43
|
</form>
|
|
44
44
|
</div>`;return Ue({title:"AgentX \u2014 Setup",activeTab:"custom",subtitle:"Setup",customHeader:r,noMain:!0,body:d,css:Bt,scripts:jt})}var Bt=`
|
|
@@ -866,4 +866,4 @@ ${t}=${n}
|
|
|
866
866
|
WHERE person = ? AND state IN (${n.map(()=>"?").join(",")})
|
|
867
867
|
${r}`).all(t,...n,...a).map(i=>({id:i.id,state:i.state,channel:i.channel,agentId:i.agent_id,text:i.text,createdAt:i.created_at})):[]}function to(e,t){return Rt(e,t,ae,"ORDER BY created_at")}function no(e,t,n=50){return Rt(e,t,[...ae,...$e],"ORDER BY created_at DESC, rowid DESC LIMIT ?",Math.max(1,Math.min(n,500)))}Lt();var we="member:",Xn=90,Vn="members",Qn="tailscale-user-login",Zn=400,er=60*60*1e3;function tr(e){let t=e.scopes.find(n=>n.startsWith(we));return t?t.slice(we.length):null}function Dt(e,t){if(!e)return null;let n=t.verify(e),r=n?tr(n):null;return n&&r?{rec:n,personId:r}:null}function co(e,t){let n=e.people().find(s=>s.id===t);if(!n)return{ok:!1,error:`No person "${t}". Add them first: agentx people add ${t} --name "\u2026"`};let{token:r,record:a}=e.tokens.create({name:`${n.name} (machine not paired yet)`,scopes:[`${we}${n.id}`],expiresInDays:Xn}),{code:o,expiresAt:i}=e.codes.create({token:r,tokenId:a.id,name:n.id});return e.members.log({person:n.id,device:a.id,event:"invited"}),{ok:!0,code:o,expiresAt:i,tokenId:a.id,person:n}}var nr=Math.round(De/6e4);function rr(e){return e==="client"?"Your project":"My work"}function po(e){let t=rr(e.person.role),n=e.person.role==="client"?`I use AgentX to keep track of the work I do for you. It has a page for you, "${t}": what you asked us for, and where each request stands.`:`I use AgentX to give our AI agents their jobs. It has a page for you, "${t}": what you asked the agents for, and where each request stands.`;return[`Hi ${e.person.name},`,"",n,"","To open it:","1. Accept the Tailscale share I sent you. Tailscale is a small program that connects your computer to mine, privately.",`2. Open ${e.origin.replace(/\/+$/,"")}/member in Edge or Chrome, give your computer a name and type this code: ${_e(e.code)}`,` The code works once, for ${nr} minutes. If it has stopped working, tell me and I will send you a new one.`,"","I then approve your machine, and the page opens by itself."].join(`
|
|
868
868
|
`)}var ar="The private network says someone else is connecting from this machine. Ask the person who invited you for a new code.",or="Too many machines are waiting for the owner's answer. Try again later.",Tt="That code didn't work. Check it, or ask the person who invited you for a new one.",_t=(e,t)=>{let n=e.headers[t];return(Array.isArray(n)?n[0]:n||"").trim()};function zt(e){let t=e.socket?.remoteAddress||"";return t==="127.0.0.1"||t==="::1"||t==="::ffff:127.0.0.1"}function ir(e){if(!zt(e))return null;let t=_t(e,Qn).toLowerCase();return t?t.slice(0,80):null}function sr(e){let t=e.socket?.remoteAddress||"unknown";if(!zt(e))return t;let n=_t(e,"x-forwarded-for").split(",").pop().trim();return/^[0-9a-fA-F:.]{2,45}$/.test(n)?n:t}function lr(e){return typeof e=="string"?e.replace(/[^\p{L}\p{N} ._'()-]/gu," ").replace(/\s+/g," ").trim().slice(0,60):""}function dr(e){return e.identities.map(Ae).filter(t=>!!t&&t.channel==="tailscale").map(t=>t.value)}async function uo(e,t){let n=Date.now(),r=t.now??Date.now,a=t.log??(b=>console.log(b)),o=sr(e),i=t.limiter.retryAfter(o);if(i>0)return a(`[member] pair-code refused from ${o}: locked out for ${i}s more`),{status:429,body:{error:"too many attempts",retryAfter:i},retryAfter:i};let s=null,l="";try{let b=await Y(e,2048);s=b.code,l=lr(b.machine)}catch{}let d=t.codes.redeem(s),c=d?Dt(d.token,t.tokens):null;if(await pr(n,t.minMs??Zn),!d||!c)return t.limiter.fail(o),a(`[member] pair-code failed from ${o}`),{status:401,body:{error:Tt}};t.limiter.succeed(o);let{rec:f,personId:g}=c,m=t.people().find(b=>b.id===g);if(!m)return t.tokens.revoke(f.id),t.members.log({person:g,device:f.id,event:"refused",address:o,detail:"person no longer listed"}),a(`[member] pair-code for ${g} refused from ${o}: person no longer listed`),{status:403,body:{error:Tt}};let u=ir(e),h=dr(m);if(h.length&&(!u||!h.includes(u)))return t.tokens.revoke(f.id),t.members.log({person:g,device:f.id,event:"refused",address:o,detail:`network login ${u??"missing"}; expected ${h.join(" or ")}`}),a(`[member] ${g}: pairing from ${o} refused: the network says "${u??"nobody"}", expected ${h.join(" or ")}`),{status:403,body:{error:ar}};let C=l||"Unnamed machine",y=m.name.slice(0,40),x=ze(t.root,{title:`New machine for ${y}`,ask:`From ${o}, ${u?`network login ${u}`:"no network login reported"}. Machine name, as typed there: "${C}". Let it see ${y}'s own work?`,recommend:`Yes if ${y} told you they just paired this machine. No if you did not expect it.`,if_silent:"discard",raised_by:Vn},{now:r()});return x.ok?(t.members.add({tokenId:f.id,personId:g,name:C,state:"pending",cardId:x.card.id,address:o,...u?{network:u}:{},createdAt:new Date(r()).toISOString()}),t.members.log({person:g,device:f.id,event:"paired",address:o,detail:C}),a(`[member] ${g} paired "${C}" from ${o}; waiting for the owner (card ${x.card.id})`),{status:200,body:{person:g,name:C,state:"pending"},token:d.token}):(t.tokens.revoke(f.id),t.members.log({person:g,device:f.id,event:"refused",address:o,detail:x.error}),a(`[member] ${g}: pairing from ${o} refused: ${x.error}`),{status:503,body:{error:or}})}var re="this machine is not paired",cr="waiting for the owner to approve this machine";function Mt(e){return e?e.status==="decided"?e.verdict??null:e.status==="expired"?"no":null:null}function go(e,t){return t.state==="pending"&&t.cardId?Mt(se(e,t.cardId)):null}function mo(e,t,n){let r=t.now??Date.now,a=t.log??(c=>console.log(c)),o=Dt(e,t.tokens);if(!o)return{ok:!1,status:401,error:re};let{rec:i,personId:s}=o,l=t.members.byToken(i.id);if(!l||l.state==="removed"||l.personId!==s)return{ok:!1,status:401,error:re};if(t.people&&!t.people().some(c=>c.id===s))return Wt(t,i.id,"person no longer listed"),a(`[member] ${s}: "${l.name}" ended: person no longer listed`),{ok:!1,status:401,error:re};if(l.state==="pending"){let c=l.cardId?se(t.root,l.cardId):null,f=Mt(c);if(f==="yes")l=t.members.update(i.id,{state:"active",approvedAt:new Date(r()).toISOString()})??l,t.members.log({person:s,device:i.id,event:"approved",detail:c?.decided_by}),a(`[member] ${s}: "${l.name}" approved`);else if(f==="no"){let g=c?.status==="expired"?"the owner did not answer in time":"the owner said no";return t.tokens.revoke(i.id),t.members.update(i.id,{state:"removed",removedAt:new Date(r()).toISOString(),removedReason:g}),t.members.log({person:s,device:i.id,event:"refused",detail:g}),a(`[member] ${s}: "${l.name}" refused: ${g}`),{ok:!1,status:401,error:re}}else return{ok:!1,status:403,error:cr,waiting:!0}}let d=l.lastSeenAt?Date.parse(l.lastSeenAt):0;return n&&(r()-d>=er||l.lastAddress!==n)&&(l=t.members.update(i.id,{lastSeenAt:new Date(r()).toISOString(),lastAddress:n})??l,t.members.log({person:s,device:i.id,event:"signed-in",address:n})),{ok:!0,device:l,personId:s,rec:i}}function Wt(e,t,n="removed by the owner"){let r=e.members.byToken(t);if(!r)return null;e.tokens.revoke(t);let a=e.members.update(t,{state:"removed",removedAt:new Date((e.now??Date.now)()).toISOString(),removedReason:n});return e.members.log({person:r.personId,device:t,event:"removed",detail:n}),a}function fo(e,t){return e.members.devices(t).filter(n=>n.state!=="removed").map(n=>Wt(e,n.tokenId,"person removed by the owner")).filter(n=>!!n)}async function pr(e,t){let n=e+t-Date.now();n>0&&await new Promise(r=>setTimeout(r,n))}var Nt=["gitlab","github"];function ur(e,t,n){let r=String(t||"").trim().toLowerCase();if(!Nt.includes(r))throw new Error(`Request status works on ${Nt.join(" and ")}, not on "${t}".`);e.requestStatus=e.requestStatus&&typeof e.requestStatus=="object"?e.requestStatus:{};let a=Array.isArray(e.requestStatus.channels)?e.requestStatus.channels.map(o=>String(o).toLowerCase()):[];return e.requestStatus.channels=n?[...new Set([...a,r])]:a.filter(o=>o!==r),`request status on ${r} is ${n?"on":"off"}`}function bo(e){return Array.isArray(e?.requestStatus?.channels)?e.requestStatus.channels.map(t=>String(t).toLowerCase()):[]}function xo(e){let{summary:t}=X(n=>ur(n,e?.channel,!!e?.enabled));return{summary:t}}var ko="https://myaccount.google.com/apppasswords";function wo(e){let t=e.split("@")[1]?.toLowerCase()??"";if(t==="gmail.com"||t==="googlemail.com")return{imapHost:"imap.gmail.com",imapPort:993,smtpHost:"smtp.gmail.com",smtpPort:465}}function $o(e){let t=e.user&&e.user!==e.address?{user:e.user}:{};return{agent:e.agent,address:e.address,imap:{host:e.imapHost,port:e.imapPort,secure:e.imapPort===993,...t,password:`\${${e.passwordEnv}}`},smtp:{host:e.smtpHost,port:e.smtpPort,secure:e.smtpPort===465},allowFrom:e.allowFrom,send:e.send}}function Ao(e){return`EMAIL_${e.toUpperCase().replace(/[^A-Z0-9]/g,"_")}_PASSWORD`}function Co(e){return new Set(Object.entries(e).filter(([,t])=>t?.wiki?.absorb?.enabled===!1).map(([t])=>t))}function Io(e,t){return t.only?{agents:[t.only],skipped:[]}:{agents:e.filter(n=>!t.off.has(n)),skipped:e.filter(n=>t.off.has(n))}}function Eo(e,t){return`absorb is off for this agent (agents.${e}.wiki.absorb.enabled); skipped.${e===t?" It reads the wiki notes inbox, so the inbox was not read.":""} Use --agent ${e} to run it anyway.`}function Po(e,t){if(t){if(!e.wiki?.absorb)return;delete e.wiki.absorb.enabled,Object.keys(e.wiki.absorb).length===0&&delete e.wiki.absorb,Object.keys(e.wiki).length===0&&delete e.wiki;return}e.wiki??={},e.wiki.absorb??={},e.wiki.absorb.enabled=!1}var gr="https://ntfy.sh";function To(e){return{enabled:!!e?.enabled,server:e?.server||gr,topicSet:!!e?.topic,tokenSet:!!e?.token}}function Do(e,t){let n={...e??{}};if("enabled"in t&&(n.enabled=!!t.enabled),"server"in t){let r=String(t.server).trim().replace(/\/+$/,"");if(!/^https?:\/\/\S+$/.test(r))throw new Error("ntfy server must be an http(s) URL");n.server=r}if("topic"in t){let r=String(t.topic).trim();if(!r)throw new Error("ntfy topic cannot be empty");n.topic=r}if("token"in t){let r=String(t.token??"").trim();r?n.token=r:delete n.token}if(n.enabled&&!n.topic)throw new Error("set a topic before enabling ntfy");return n}export{Ze as a,Yt as b,Ar as c,Sr as d,Cr as e,ka as f,Hn as g,Sa as h,Pa as i,Pt as j,Xa as k,Va as l,_r as m,zr as n,cn as o,gn as p,me as q,Mr as r,Wr as s,mn as t,jr as u,Hr as v,qr as w,eo as x,to as y,no as z,Xn as A,co as B,nr as C,rr as D,po as E,sr as F,uo as G,go as H,mo as I,Wt as J,fo as K,Nt as L,ur as M,bo as N,xo as O,ko as P,wo as Q,$o as R,Ao as S,Co as T,Io as U,Eo as V,Po as W,To as X,Do as Y,_n as Z,ua as _,ba as $,xa as aa};
|
|
869
|
-
//# sourceMappingURL=chunk-
|
|
869
|
+
//# sourceMappingURL=chunk-OKADR5QO.js.map
|