agentix-cli 0.226.4 → 0.227.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-KOHZIHFD.js → App-5BQT2BO7.js} +2 -2
- package/dist/{ChatApp-24AJYZEC.js → ChatApp-HCL4GMU3.js} +2 -2
- package/dist/{absorb-eval-VCDJPF6M.js → absorb-eval-3VT5V6ML.js} +2 -2
- package/dist/{adapter-JGB45SCW.js → adapter-YV5LJLTM.js} +2 -2
- package/dist/{agent-F2VJKD7X.js → agent-5XKFUTVC.js} +2 -2
- package/dist/{board-dashboard-B6QSOGCC.js → board-dashboard-DBKG3KIB.js} +4 -4
- package/dist/{chunk-XV3QPZWH.js → chunk-3NICPEZX.js} +2 -2
- package/dist/{chunk-FGHJDZDB.js → chunk-4FQ2QXMN.js} +2 -2
- package/dist/{chunk-LTOSEP7C.js → chunk-6O6WRTCA.js} +2 -2
- package/dist/{chunk-LGYIHB73.js → chunk-6UDWKHHV.js} +3 -3
- package/dist/{chunk-7K7ZQU3C.js → chunk-A65IUW6P.js} +2 -2
- package/dist/{chunk-TA437DWX.js → chunk-AT3B343G.js} +34 -33
- package/dist/{chunk-TA437DWX.js.map → chunk-AT3B343G.js.map} +1 -1
- package/dist/{chunk-Q6TGKWZE.js → chunk-BFJIIB6S.js} +2 -2
- package/dist/{chunk-2XQMUSGM.js → chunk-DTCE4QPZ.js} +2 -2
- package/dist/{chunk-UBONPGNT.js → chunk-EDWENU5W.js} +2 -2
- package/dist/{chunk-QZ24XACR.js → chunk-FNYFWMMO.js} +2 -2
- package/dist/{chunk-2TVJTWFC.js → chunk-IVNIUTWB.js} +2 -2
- package/dist/{chunk-GMAORBGM.js → chunk-OKBBJO6W.js} +2 -2
- package/dist/{chunk-LLVVT5OB.js → chunk-OKNXOXE5.js} +2 -2
- package/dist/{chunk-VNXYQH45.js → chunk-OY6EJSSN.js} +2 -2
- package/dist/{chunk-DG56PTYL.js → chunk-OYILGRLT.js} +2 -2
- package/dist/{chunk-ZUZYJQJ4.js → chunk-P7KDA2SK.js} +2 -2
- package/dist/{chunk-MM7U4PWY.js → chunk-QKFRCFOG.js} +2 -2
- package/dist/{chunk-BTLADRMY.js → chunk-QM4QZXWM.js} +2 -2
- package/dist/{chunk-LACHXOBO.js → chunk-SLTLOM43.js} +2 -2
- package/dist/{chunk-QU7ICYFR.js → chunk-T2QYHIEZ.js} +2 -2
- package/dist/{chunk-D6LX27PO.js → chunk-U2KZLLST.js} +2 -2
- package/dist/{chunk-EYVPRIO3.js → chunk-UAFB6PN5.js} +2 -2
- package/dist/{chunk-FWNP27H4.js → chunk-UBL2MUQQ.js} +2 -2
- package/dist/{chunk-FWNP27H4.js.map → chunk-UBL2MUQQ.js.map} +1 -1
- package/dist/{chunk-I32TCCAK.js → chunk-UJN3VYLI.js} +2 -2
- package/dist/{chunk-6ECXITK2.js → chunk-USDTPG3G.js} +2 -2
- package/dist/{chunk-A24QXLEG.js → chunk-WRIIGKIX.js} +2 -2
- package/dist/{chunk-ZFMUF3NU.js → chunk-X5YMUOUR.js} +240 -240
- package/dist/chunk-X5YMUOUR.js.map +1 -0
- package/dist/{chunk-BDHWTWD7.js → chunk-XL5PGUPL.js} +2 -2
- package/dist/{chunk-ATZRBMUZ.js → chunk-YYKQCDYX.js} +2 -2
- package/dist/{chunk-CF2R6BOX.js → chunk-ZHIRQFYT.js} +2 -2
- package/dist/{chunk-4H5B42VW.js → chunk-ZL7IMUYR.js} +109 -111
- package/dist/chunk-ZL7IMUYR.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/{client-D3HDGKKI.js → client-RLT2WHZ2.js} +2 -2
- package/dist/{config-OBH67S4V.js → config-DYYASLHG.js} +2 -2
- package/dist/{config-mutate-KSTFRHFL.js → config-mutate-ETY72JKN.js} +2 -2
- package/dist/{config-mutator-XXZPHMS5.js → config-mutator-7LOJSFQU.js} +2 -2
- package/dist/{contributions-ROZVACRZ.js → contributions-2CQCUX7Y.js} +2 -2
- package/dist/{doctor-UCH5FAYV.js → doctor-FUNKG5AZ.js} +2 -2
- package/dist/{follow-up-tool-IPVPMERA.js → follow-up-tool-NBHOKW2L.js} +2 -2
- package/dist/{hub-UY6IPKJU.js → hub-IU55ZDYD.js} +2 -2
- package/dist/index.d.ts +8 -16
- package/dist/index.js +1 -1
- package/dist/{org-tool-YOLOEYRA.js → org-tool-T7KRHAQJ.js} +2 -2
- package/dist/{program-W6CGC2EO.js → program-DAIHS5PT.js} +24 -24
- package/dist/{promote-LKKZS7DD.js → promote-QGWRSL7W.js} +2 -2
- package/dist/{query-UGQY7TE7.js → query-FXICXYYH.js} +2 -2
- package/dist/{query-settings-HS2YNSLM.js → query-settings-Q54OZRY4.js} +2 -2
- package/dist/{registry-PA45HSJ4.js → registry-MTL5BPCA.js} +2 -2
- package/dist/{request-planner-3MKTH2B6.js → request-planner-DNCIVMCW.js} +2 -2
- package/dist/{review-candidates-ODCGXSYY.js → review-candidates-TBX6KVLI.js} +2 -2
- package/dist/{routing-K3O27TBW.js → routing-4NZ6IE6J.js} +2 -2
- package/dist/{schedule-tool-5ZIJOA7R.js → schedule-tool-CXGHTSNO.js} +2 -2
- package/dist/{scheduler-Y2COW5JL.js → scheduler-LJBJUV2G.js} +2 -2
- package/dist/{seat-YMSIXFTN.js → seat-U7VEGSF7.js} +2 -2
- package/dist/{select-F6DEPWZH.js → select-LCDXSKY4.js} +2 -2
- package/dist/{set-enabled-UEYUQHF3.js → set-enabled-O2ZRHN4D.js} +2 -2
- package/dist/{sprint-tool-WPVO3XBV.js → sprint-tool-BMW4MGPA.js} +2 -2
- package/dist/{tool-QVQZRRSO.js → tool-6GB72KYS.js} +2 -2
- package/dist/{tool-7TXMGK5Q.js → tool-G2THDJ6B.js} +2 -2
- package/dist/{tool-F5GN7WSE.js → tool-GM4SND6P.js} +2 -2
- package/dist/tool-RLUTRCUO.js +2 -0
- package/dist/{tool-FZPOQXSQ.js → tool-UGH2ZSCI.js} +2 -2
- package/dist/{wiki-ZI3GXGNW.js → wiki-A7BSVC7D.js} +2 -2
- package/dist/wiki-enrich-JFMYQK3N.js +2 -0
- package/package.json +1 -1
- package/dist/chunk-4H5B42VW.js.map +0 -1
- package/dist/chunk-ZFMUF3NU.js.map +0 -1
- package/dist/tool-HHMSHXUP.js +0 -2
- package/dist/wiki-enrich-JK46USSG.js +0 -2
- /package/dist/{App-KOHZIHFD.js.map → App-5BQT2BO7.js.map} +0 -0
- /package/dist/{ChatApp-24AJYZEC.js.map → ChatApp-HCL4GMU3.js.map} +0 -0
- /package/dist/{absorb-eval-VCDJPF6M.js.map → absorb-eval-3VT5V6ML.js.map} +0 -0
- /package/dist/{adapter-JGB45SCW.js.map → adapter-YV5LJLTM.js.map} +0 -0
- /package/dist/{agent-F2VJKD7X.js.map → agent-5XKFUTVC.js.map} +0 -0
- /package/dist/{board-dashboard-B6QSOGCC.js.map → board-dashboard-DBKG3KIB.js.map} +0 -0
- /package/dist/{chunk-XV3QPZWH.js.map → chunk-3NICPEZX.js.map} +0 -0
- /package/dist/{chunk-FGHJDZDB.js.map → chunk-4FQ2QXMN.js.map} +0 -0
- /package/dist/{chunk-LTOSEP7C.js.map → chunk-6O6WRTCA.js.map} +0 -0
- /package/dist/{chunk-LGYIHB73.js.map → chunk-6UDWKHHV.js.map} +0 -0
- /package/dist/{chunk-7K7ZQU3C.js.map → chunk-A65IUW6P.js.map} +0 -0
- /package/dist/{chunk-Q6TGKWZE.js.map → chunk-BFJIIB6S.js.map} +0 -0
- /package/dist/{chunk-2XQMUSGM.js.map → chunk-DTCE4QPZ.js.map} +0 -0
- /package/dist/{chunk-UBONPGNT.js.map → chunk-EDWENU5W.js.map} +0 -0
- /package/dist/{chunk-QZ24XACR.js.map → chunk-FNYFWMMO.js.map} +0 -0
- /package/dist/{chunk-2TVJTWFC.js.map → chunk-IVNIUTWB.js.map} +0 -0
- /package/dist/{chunk-GMAORBGM.js.map → chunk-OKBBJO6W.js.map} +0 -0
- /package/dist/{chunk-LLVVT5OB.js.map → chunk-OKNXOXE5.js.map} +0 -0
- /package/dist/{chunk-VNXYQH45.js.map → chunk-OY6EJSSN.js.map} +0 -0
- /package/dist/{chunk-DG56PTYL.js.map → chunk-OYILGRLT.js.map} +0 -0
- /package/dist/{chunk-ZUZYJQJ4.js.map → chunk-P7KDA2SK.js.map} +0 -0
- /package/dist/{chunk-MM7U4PWY.js.map → chunk-QKFRCFOG.js.map} +0 -0
- /package/dist/{chunk-BTLADRMY.js.map → chunk-QM4QZXWM.js.map} +0 -0
- /package/dist/{chunk-LACHXOBO.js.map → chunk-SLTLOM43.js.map} +0 -0
- /package/dist/{chunk-QU7ICYFR.js.map → chunk-T2QYHIEZ.js.map} +0 -0
- /package/dist/{chunk-D6LX27PO.js.map → chunk-U2KZLLST.js.map} +0 -0
- /package/dist/{chunk-EYVPRIO3.js.map → chunk-UAFB6PN5.js.map} +0 -0
- /package/dist/{chunk-I32TCCAK.js.map → chunk-UJN3VYLI.js.map} +0 -0
- /package/dist/{chunk-6ECXITK2.js.map → chunk-USDTPG3G.js.map} +0 -0
- /package/dist/{chunk-A24QXLEG.js.map → chunk-WRIIGKIX.js.map} +0 -0
- /package/dist/{chunk-BDHWTWD7.js.map → chunk-XL5PGUPL.js.map} +0 -0
- /package/dist/{chunk-ATZRBMUZ.js.map → chunk-YYKQCDYX.js.map} +0 -0
- /package/dist/{chunk-CF2R6BOX.js.map → chunk-ZHIRQFYT.js.map} +0 -0
- /package/dist/{client-D3HDGKKI.js.map → client-RLT2WHZ2.js.map} +0 -0
- /package/dist/{config-OBH67S4V.js.map → config-DYYASLHG.js.map} +0 -0
- /package/dist/{config-mutate-KSTFRHFL.js.map → config-mutate-ETY72JKN.js.map} +0 -0
- /package/dist/{config-mutator-XXZPHMS5.js.map → config-mutator-7LOJSFQU.js.map} +0 -0
- /package/dist/{contributions-ROZVACRZ.js.map → contributions-2CQCUX7Y.js.map} +0 -0
- /package/dist/{doctor-UCH5FAYV.js.map → doctor-FUNKG5AZ.js.map} +0 -0
- /package/dist/{follow-up-tool-IPVPMERA.js.map → follow-up-tool-NBHOKW2L.js.map} +0 -0
- /package/dist/{hub-UY6IPKJU.js.map → hub-IU55ZDYD.js.map} +0 -0
- /package/dist/{org-tool-YOLOEYRA.js.map → org-tool-T7KRHAQJ.js.map} +0 -0
- /package/dist/{program-W6CGC2EO.js.map → program-DAIHS5PT.js.map} +0 -0
- /package/dist/{promote-LKKZS7DD.js.map → promote-QGWRSL7W.js.map} +0 -0
- /package/dist/{query-UGQY7TE7.js.map → query-FXICXYYH.js.map} +0 -0
- /package/dist/{query-settings-HS2YNSLM.js.map → query-settings-Q54OZRY4.js.map} +0 -0
- /package/dist/{registry-PA45HSJ4.js.map → registry-MTL5BPCA.js.map} +0 -0
- /package/dist/{request-planner-3MKTH2B6.js.map → request-planner-DNCIVMCW.js.map} +0 -0
- /package/dist/{review-candidates-ODCGXSYY.js.map → review-candidates-TBX6KVLI.js.map} +0 -0
- /package/dist/{routing-K3O27TBW.js.map → routing-4NZ6IE6J.js.map} +0 -0
- /package/dist/{schedule-tool-5ZIJOA7R.js.map → schedule-tool-CXGHTSNO.js.map} +0 -0
- /package/dist/{scheduler-Y2COW5JL.js.map → scheduler-LJBJUV2G.js.map} +0 -0
- /package/dist/{seat-YMSIXFTN.js.map → seat-U7VEGSF7.js.map} +0 -0
- /package/dist/{select-F6DEPWZH.js.map → select-LCDXSKY4.js.map} +0 -0
- /package/dist/{set-enabled-UEYUQHF3.js.map → set-enabled-O2ZRHN4D.js.map} +0 -0
- /package/dist/{sprint-tool-WPVO3XBV.js.map → sprint-tool-BMW4MGPA.js.map} +0 -0
- /package/dist/{tool-QVQZRRSO.js.map → tool-6GB72KYS.js.map} +0 -0
- /package/dist/{tool-7TXMGK5Q.js.map → tool-G2THDJ6B.js.map} +0 -0
- /package/dist/{tool-F5GN7WSE.js.map → tool-GM4SND6P.js.map} +0 -0
- /package/dist/{tool-HHMSHXUP.js.map → tool-RLUTRCUO.js.map} +0 -0
- /package/dist/{tool-FZPOQXSQ.js.map → tool-UGH2ZSCI.js.map} +0 -0
- /package/dist/{wiki-ZI3GXGNW.js.map → wiki-A7BSVC7D.js.map} +0 -0
- /package/dist/{wiki-enrich-JK46USSG.js.map → wiki-enrich-JFMYQK3N.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as I}from"./chunk-IMLAPB7G.js";import{d as le}from"./chunk-QPABR72X.js";import{b as ue}from"./chunk-KP7KDLZ2.js";import{o as k}from"./chunk-3323WFVK.js";import{Ra as oe,Sa as se,Ua as ie,Va as ae,ab as $,hb as ot,o as B,r as rt}from"./chunk-
|
|
1
|
+
import{a as I}from"./chunk-IMLAPB7G.js";import{d as le}from"./chunk-QPABR72X.js";import{b as ue}from"./chunk-KP7KDLZ2.js";import{o as k}from"./chunk-3323WFVK.js";import{Ra as oe,Sa as se,Ua as ie,Va as ae,ab as $,hb as ot,o as B,r as rt}from"./chunk-UBL2MUQQ.js";import{accessSync as lt,closeSync as ut,constants as ct,existsSync as fe,openSync as pt,readFileSync as dt,readSync as ft,statSync as mt}from"node:fs";import{dirname as O,join as L}from"node:path";import{fileURLToPath as gt}from"node:url";import{homedir as ht}from"node:os";import{join as ce,win32 as j}from"path";function E(e){return e==="darwin"?"macos":e==="win32"?"windows":null}var U="agentx-helper.exe";function st(e){return j.join(e,"Programs","AgentX",U)}var pe="AgentX Helper.app";function X(e){return ce(e,"Applications",pe,"Contents/MacOS/agentx-mac-helper")}function it(e,t){let n=t.AGENTX_DESKTOP_HELPER?.trim();if(n)return n;let r=t.AGENTX_MAC_HELPER?.trim();return r&&E(e)==="macos"?r:void 0}function de(e){let t=it(e.platform,e.env);if(t)return t;let n=E(e.platform);if(n==="macos"){let r=X(e.home);return e.exists(r)||!e.root?r:ce(e.root,"apps/mac-helper/build",pe,"Contents/MacOS/agentx-mac-helper")}if(n==="windows"){let r=e.env.LOCALAPPDATA||j.join(e.home,"AppData","Local"),o=st(r);return e.exists(o)||!e.root?o:j.join(e.root,"apps","win-helper","build",U)}return null}function at(e){let t=E(e);return t==="macos"?"Run agentx desktop install (or build it with apps/mac-helper/build.sh).":t==="windows"?`Put ${U} in %LOCALAPPDATA%\\Programs\\AgentX, or set AGENTX_DESKTOP_HELPER to its path.`:"AgentX has no desktop helper for this system yet."}function fn(e){let t=E(e);if(t==="macos")return"helper not built \u2014 run apps/mac-helper/build.sh (or agentx desktop install)";if(t==="windows"){let n=at(e);return`Windows helper not found \u2014 ${n[0].toLowerCase()}${n.slice(1,-1)}`}return`computer use (point, teach, act) is not available on ${e} yet \u2014 macOS now, Windows in progress (#1594)`}var J="tn.acme.agentx.voice",bn="AgentX Desktop.app",kn="AgentX Helper.app";function xn(e,t,n){return e!=="darwin"||t!=="arm64"||Number(n.split(".")[0])<23?"AgentX Desktop currently requires Apple Silicon and macOS 14 or newer.":null}function vn(e,t){if(t&&!Object.hasOwn(e,t))throw new Error(`Unknown agent: ${t}. Run agentx agent list.`);let n=t||Object.keys(e)[0];if(!n)throw new Error("No agents configured. Run agentx setup first.");return n}function G(e){return`'${e.replace(/'/g,"'\\''")}'`}var me="/usr/bin:/bin:/usr/sbin:/sbin";function An(e,t){return t||[...new Set([...e?[O(e)]:[],...me.split(":")])].join(":")}function T(e){let t={amp:"&",lt:"<",gt:">",quot:'"',apos:"'"};return e.replace(/&(amp|lt|gt|quot|apos);/g,(n,r)=>t[r])}function Nn(e){let t=e.match(/<key>PATH<\/key>\s*<string>([^<]*)<\/string>/);return t?T(t[1]):me}var Pn=e=>/agentx\.voice.*\.plist$/.test(e);function Rn(e,t){let n=null,r=[];for(let{file:o,plist:s}of[...t].sort((i,a)=>i.file<a.file?-1:1)){let i=s.match(/<key>Label<\/key>\s*<string>([^<]*)<\/string>/)?.[1],a=s.match(/<key>ProgramArguments<\/key>\s*<array>\s*<string>([^<]*)<\/string>/)?.[1];!i||!a||!T(a).endsWith("/Contents/MacOS/AgentXVoice")||(n?r.push({file:o,label:T(i)}):n={file:o,label:T(i)})}return{keep:n??{file:L(e,`${J}.plist`),label:J},remove:r}}function ge(e,t,n){for(let r of t.split(":"))if(r&&n(L(r,e)))return L(r,e);return null}function Cn(e){try{if(lt(e,ct.X_OK),!mt(e).isFile())return!1;let t=pt(e,"r"),n=Buffer.alloc(2);try{ft(t,n,0,2,0)}finally{ut(t)}return n.toString("latin1")!=="#!"}catch{return!1}}function $n(e){let t=r=>r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),n={PATH:e.path,...e.agent?{AGENTX_VOICE_AGENT:e.agent}:{},AGENTX_DAEMON_URL:e.url,AGENTX_MAC_HELPER:e.helper,AGENTX_PASTE_COMMAND:`cd ${G(e.cwd)} && ${G(e.node)} ${G(e.cli)} paste`};return`<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
3
|
<plist version="1.0"><dict>
|
|
4
4
|
<key>Label</key><string>${t(e.label??J)}</string>
|
|
@@ -36,4 +36,4 @@ function run(argv) {
|
|
|
36
36
|
`),on(r,n)}var un=5*6e4;function fo(e,t,n=Date.now()){let r=ne(e),o=r.checkedAt?Date.parse(r.checkedAt):NaN;return!r.cards||!(n-o<=un)?!1:r.items[`card:${t}`]?.state!=="failed"}var re=24*36e5;function et(e,t,n){let r=e+t.dueAfterMinutes*6e4;return new Date(n!==void 0&&Number.isFinite(n)?Math.max(e,Math.min(r,n)):r)}function cn(e,t,n,r){let o=Date.parse(e.expires),s=[w(e.ask,k.ask)];return e.choices?.length&&s.push(...e.choices.map((i,a)=>`${a+1}. ${i}`)),e.recommend&&s.push(`Recommended: ${w(e.recommend,k.recommend)}`),s.push(`Answer: ${n}`,`agentx: card=${e.id}`),{key:`card:${e.id}`,title:w(e.title,k.title),notes:s.join(`
|
|
37
37
|
`),due:et(r,t,o),priority:Number.isFinite(o)&&o-r<=re?"high":"none"}}function pn(e,t,n,r){let o=[w(e.question||e.text,k.ask),`Asked of ${e.agentId}.`,`Answer: ${n}`,`agentx: request=${e.id}`],s=e.dueAt??void 0;return{key:`request:${e.id}`,title:ee(e,k.title).headline,notes:o.join(`
|
|
38
38
|
`),due:et(r,t,s),priority:s!==void 0&&s-r<=re?"high":"none"}}async function mo(e){let{root:t,settings:n,tasks:r,log:o}=e,s=e.now??Date.now(),i=new Date(s).toISOString(),a={created:0,completed:0,dismissed:0,failed:0},l=ne(t);delete l.lastError;let c=u=>{l.lastError={at:i,message:u}},f=new Map;try{if(n.include.includes("card"))for(let u of e.cards())u.status==="pending"&&Date.parse(u.expires)>s&&f.set(`card:${u.id}`,cn(u,n,e.answerUrl,s));if(n.include.includes("request"))for(let u of e.requests())u.state==="waiting_owner"&&f.set(`request:${u.id}`,pn(u,n,e.answerUrl,s))}catch(u){return o(`[mirror] could not read what is waiting: ${u?.message??u}`),c(String(u?.message??u)),Qe(t,l),a}let h=!0,S=new Map,tt=async u=>{if(!S.has(u))try{S.set(u,new Set((await r.listOpen(u)).map(p=>p.id)))}catch(p){o(`[mirror] could not read list "${u}": ${p?.message??p}`),c(String(p?.message??p)),S.set(u,null),h=!1}return S.get(u)};for(let[u,p]of Object.entries(l.items)){if(p.state!=="open"||!p.id)continue;let d=await tt(p.list);if(d)if(f.has(u))d.has(p.id)||(l.items[u]={...p,state:"dismissed",at:i},a.dismissed++,o(`[mirror] ${u}: its task was ticked off or deleted; it stays on the Desk and is not mirrored again`));else{if(d.has(p.id))try{await r.complete(p.id)}catch(b){o(`[mirror] ${u}: could not complete its task: ${b?.message??b}`),c(String(b?.message??b));continue}l.items[u]={...p,state:"completed",at:i},a.completed++}}let R=null,W="",F=0,N=[];for(let[u,p]of f){let d=l.items[u];if(d&&(d.state==="open"||d.state==="dismissed")||d?.state==="failed"&&d.failures>=te)continue;if(R===null)try{await r.ensureList(n.list),R=!0}catch(g){o(`[mirror] could not make list "${n.list}": ${g?.message??g}`),W=String(g?.message??g),c(W),R=!1}let b=d?.state==="failed"?d.failures:0;try{if(R===!1)throw new Error(W);let{id:g}=await r.add({list:n.list,title:p.title,notes:p.notes,due:p.due,priority:p.priority});l.items[u]={id:g,list:n.list,state:"open",at:i,createdAt:i,failures:0},a.created++}catch(g){let C=String(g?.message??g);u.startsWith("card:")&&F++;let H=b+1;l.items[u]={list:n.list,state:"failed",at:i,failures:H,lastError:C},c(C),a.failed++,o(`[mirror] ${u}: could not add to Reminders (${H}/${te}): ${C}`),H===te&&N.push({title:p.title,message:C})}}F&&o(`[mirror] ${F} card(s) could not be added to Reminders; the Mac popup shows them instead`);let nt=l.failureToldAt?Date.parse(l.failureToldAt):NaN;if(N.length&&!(s-nt<re)){let u=N[0],p=N.length>1?` (and ${N.length-1} more)`:"";try{await e.notify("Could not add to Reminders",`${u.title}${p}: ${w(u.message,200)}. Still on the Desk.`),l.failureToldAt=i}catch(d){o(`[mirror] could not tell the owner: ${d?.message??d}`)}}h&&(l.checkedAt=i,l.cards=n.include.includes("card"));for(let[u,p]of Object.entries(l.items))p.state!=="open"&&!f.has(u)&&s-Date.parse(p.at)>ln&&delete l.items[u];return Qe(t,l),a}var Ye=5*6e4;function go(e,t,n,r,o=Date.now()){let s=ne(e),i=l=>{let c=l?Date.parse(l):NaN;return c>=n&&c<r},a={from:new Date(n).toISOString(),to:new Date(r).toISOString(),raised:0,created:{cards:0,requests:0},missed:[],closedFast:0,tooNew:0};for(let[l,c]of Object.entries(s.items))!c.id||!i(c.createdAt)||(l.startsWith("card:")?a.created.cards++:a.created.requests++);for(let l of t){if(!i(l.created_at))continue;a.raised++;let c=s.items[`card:${l.id}`];if(c?.id)continue;let f=Date.parse(l.created_at);if((l.status==="pending"?NaN:Date.parse(l.decided_at??""))-f<=Ye){a.closedFast++;continue}if(l.status==="pending"&&o-f<=Ye){a.tooNew++;continue}let S=c?.state==="failed"?`could not be added (${c.failures}x): ${c.lastError??"unknown error"}`:"no pass reached it";a.missed.push({id:l.id,title:l.title,reason:S})}return a}function ho(e){let t=[e.closedFast?`closed within 5 min: ${e.closedFast}`:"",e.tooNew?`raised in the last 5 min: ${e.tooNew}`:""].filter(Boolean);return`cards raised ${e.raised} / Reminders created ${e.created.cards+e.created.requests} (${e.created.cards} cards, ${e.created.requests} requests) / missed ${e.missed.length}${t.length?` \xB7 ${t.join(" \xB7 ")}`:""}`}export{Hr as a,Br as b,jt as c,jr as d,Be as e,Jt as f,Ue as g,Ur as h,zr as i,Xe as j,Y as k,Z as l,Vr as m,Qr as n,Yt as o,Yr as p,Zr as q,eo as r,ee as s,w as t,en as u,io as v,E as w,de as x,at as y,fn as z,bn as A,kn as B,xn as C,vn as D,An as E,Nn as F,Pn as G,Rn as H,ge as I,Cn as J,$n as K,In as L,En as M,yt as N,P as O,ke as P,Q,Me as R,Dr as S,Mr as T,_r as U,ne as V,fo as W,mo as X,go as Y,ho as Z};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-XL5PGUPL.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ze,b as k,c as D,d as ea,e as fe,f as he,g as H,h as be,i as L,j as N,n as aa,o as ta,p as ra,q as na}from"./chunk-EFGAPAYZ.js";import{e as Ve,i as Qe}from"./chunk-QAWKN2N4.js";import{b as me}from"./chunk-DODL5POT.js";import{$a as Xe,Aa as qe,Lb as Ge,Xa as Ke,Ya as Ye,Za as Je,c as Le,va as _}from"./chunk-
|
|
1
|
+
import{a as Ze,b as k,c as D,d as ea,e as fe,f as he,g as H,h as be,i as L,j as N,n as aa,o as ta,p as ra,q as na}from"./chunk-EFGAPAYZ.js";import{e as Ve,i as Qe}from"./chunk-QAWKN2N4.js";import{b as me}from"./chunk-DODL5POT.js";import{$a as Xe,Aa as qe,Lb as Ge,Xa as Ke,Ya as Ye,Za as Je,c as Le,va as _}from"./chunk-OKNXOXE5.js";import{a as V}from"./chunk-IMLAPB7G.js";import{b as Fe}from"./chunk-MRIVENBY.js";import{k as Be}from"./chunk-EDWENU5W.js";import{b as Q}from"./chunk-2VDO2HEK.js";import{c as Ne,e as We}from"./chunk-LQE73AZR.js";import{a as Z,b as Ue}from"./chunk-WRIIGKIX.js";import{ia as G}from"./chunk-AT3B343G.js";import{b as ue}from"./chunk-7AB3QUGH.js";import{a as K,b as X}from"./chunk-BFJIIB6S.js";import{s as ge,u as Oe}from"./chunk-3323WFVK.js";import{b as He}from"./chunk-QKFRCFOG.js";import{c as De,d as Me}from"./chunk-OWNQ2FD4.js";import{a as je}from"./chunk-ROLSSYXE.js";import{Dc as xe,J as le,M as F,Mb as Ee,S as Za,Tb as at,Va as ce,Wa as Pe,hb as et,oc as pe,sc as q,tc as Re}from"./chunk-UBL2MUQQ.js";import{existsSync as Y,readFileSync as xa,writeFileSync as ga,appendFileSync as lt,mkdirSync as ct}from"fs";import{dirname as pt,resolve as M}from"path";import{fileURLToPath as xt}from"url";import{hostname as gt}from"os";import{spawn as ut}from"child_process";var ve=`:root {
|
|
2
2
|
/* --- Brand (agentina) --------------------------------------------- */
|
|
3
3
|
--ax-blue: #2979FF;
|
|
4
4
|
--ax-blue-d: #1B5FD9;
|
|
@@ -2903,4 +2903,4 @@ tr:hover td { background: var(--bg-hover); }
|
|
|
2903
2903
|
${r}`).all(a,...t,...n).map(i=>({id:i.id,state:i.state,channel:i.channel,agentId:i.agent_id,text:i.text,createdAt:i.created_at})):[]}function Qo(e,a){return Ua(e,a,ce,"ORDER BY created_at")}function Zo(e,a,t=50){return Ua(e,a,[...ce,...Pe],"ORDER BY created_at DESC, rowid DESC LIMIT ?",Math.max(1,Math.min(t,500)))}at();var ze="member:",pr=90,xr="members",gr="tailscale-user-login",ur=400,mr=60*60*1e3;function fr(e){let a=e.scopes.find(t=>t.startsWith(ze));return a?a.slice(ze.length):null}function qa(e,a){if(!e)return null;let t=a.verify(e),r=t?fr(t):null;return t&&r?{rec:t,personId:r}:null}function ii(e,a){let t=e.people().find(s=>s.id===a);if(!t)return{ok:!1,error:`No person "${a}". Add them first: agentx people add ${a} --name "\u2026"`};let{token:r,record:n}=e.tokens.create({name:`${t.name} (machine not paired yet)`,scopes:[`${ze}${t.id}`],expiresInDays:pr}),{code:o,expiresAt:i}=e.codes.create({token:r,tokenId:n.id,name:t.id});return e.members.log({person:t.id,device:n.id,event:"invited"}),{ok:!0,code:o,expiresAt:i,tokenId:n.id,person:t}}var hr=Math.round(Ne/6e4);function br(e){return e==="client"?"Your project":"My work"}function si(e){let a=br(e.person.role),t=e.person.role==="client"?`I use AgentX to keep track of the work I do for you. It has a page for you, "${a}": 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, "${a}": what you asked the agents for, and where each request stands.`;return[`Hi ${e.person.name},`,"",t,"","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: ${We(e.code)}`,` The code works once, for ${hr} 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(`
|
|
2904
2904
|
`)}var vr="The private network says someone else is connecting from this machine. Ask the person who invited you for a new code.",wr="Too many machines are waiting for the owner's answer. Try again later.",Fa="That code didn't work. Check it, or ask the person who invited you for a new one.",Ka=(e,a)=>{let t=e.headers[a];return(Array.isArray(t)?t[0]:t||"").trim()};function Ya(e){let a=e.socket?.remoteAddress||"";return a==="127.0.0.1"||a==="::1"||a==="::ffff:127.0.0.1"}function yr(e){if(!Ya(e))return null;let a=Ka(e,gr).toLowerCase();return a?a.slice(0,80):null}function kr(e){let a=e.socket?.remoteAddress||"unknown";if(!Ya(e))return a;let t=Ka(e,"x-forwarded-for").split(",").pop().trim();return/^[0-9a-fA-F:.]{2,45}$/.test(t)?t:a}function $r(e){return typeof e=="string"?e.replace(/[^\p{L}\p{N} ._'()-]/gu," ").replace(/\s+/g," ").trim().slice(0,60):""}function _r(e){return e.identities.map(Ee).filter(a=>!!a&&a.channel==="tailscale").map(a=>a.value)}async function di(e,a){let t=Date.now(),r=a.now??Date.now,n=a.log??(b=>console.log(b)),o=kr(e),i=a.limiter.retryAfter(o);if(i>0)return n(`[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,d="";try{let b=await Q(e,2048);s=b.code,d=$r(b.machine)}catch{}let l=a.codes.redeem(s),c=l?qa(l.token,a.tokens):null;if(await Cr(t,a.minMs??ur),!l||!c)return a.limiter.fail(o),n(`[member] pair-code failed from ${o}`),{status:401,body:{error:Fa}};a.limiter.succeed(o);let{rec:m,personId:g}=c,u=a.people().find(b=>b.id===g);if(!u)return a.tokens.revoke(m.id),a.members.log({person:g,device:m.id,event:"refused",address:o,detail:"person no longer listed"}),n(`[member] pair-code for ${g} refused from ${o}: person no longer listed`),{status:403,body:{error:Fa}};let x=yr(e),f=_r(u);if(f.length&&(!x||!f.includes(x)))return a.tokens.revoke(m.id),a.members.log({person:g,device:m.id,event:"refused",address:o,detail:`network login ${x??"missing"}; expected ${f.join(" or ")}`}),n(`[member] ${g}: pairing from ${o} refused: the network says "${x??"nobody"}", expected ${f.join(" or ")}`),{status:403,body:{error:vr}};let A=d||"Unnamed machine",y=u.name.slice(0,40),v=Oe(a.root,{title:`New machine for ${y}`,ask:`From ${o}, ${x?`network login ${x}`:"no network login reported"}. Machine name, as typed there: "${A}". Let it see their 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:xr},{now:r()});return v.ok?(a.members.add({tokenId:m.id,personId:g,name:A,state:"pending",cardId:v.card.id,address:o,...x?{network:x}:{},createdAt:new Date(r()).toISOString()}),a.members.log({person:g,device:m.id,event:"paired",address:o,detail:A}),n(`[member] ${g} paired "${A}" from ${o}; waiting for the owner (card ${v.card.id})`),{status:200,body:{person:g,name:A,state:"pending"},token:l.token}):(a.tokens.revoke(m.id),a.members.log({person:g,device:m.id,event:"refused",address:o,detail:v.error}),n(`[member] ${g}: pairing from ${o} refused: ${v.error}`),{status:503,body:{error:wr}})}var de="this machine is not paired",Sr="waiting for the owner to approve this machine";function Ja(e){return e?e.status==="decided"?e.verdict??null:e.status==="expired"?"no":null:null}function li(e,a){return a.state==="pending"&&a.cardId?Ja(ge(e,a.cardId)):null}function ci(e,a,t){let r=a.now??Date.now,n=a.log??(c=>console.log(c)),o=qa(e,a.tokens);if(!o)return{ok:!1,status:401,error:de};let{rec:i,personId:s}=o,d=a.members.byToken(i.id);if(!d||d.state==="removed"||d.personId!==s)return{ok:!1,status:401,error:de};if(a.people&&!a.people().some(c=>c.id===s))return Xa(a,i.id,"person no longer listed"),n(`[member] ${s}: "${d.name}" ended: person no longer listed`),{ok:!1,status:401,error:de};if(d.state==="pending"){let c=d.cardId?ge(a.root,d.cardId):null,m=Ja(c);if(m==="yes")d=a.members.update(i.id,{state:"active",approvedAt:new Date(r()).toISOString()})??d,a.members.log({person:s,device:i.id,event:"approved",detail:c?.decided_by}),n(`[member] ${s}: "${d.name}" approved`);else if(m==="no"){let g=c?.status==="expired"?"the owner did not answer in time":"the owner said no";return a.tokens.revoke(i.id),a.members.update(i.id,{state:"removed",removedAt:new Date(r()).toISOString(),removedReason:g}),a.members.log({person:s,device:i.id,event:"refused",detail:g}),n(`[member] ${s}: "${d.name}" refused: ${g}`),{ok:!1,status:401,error:de}}else return{ok:!1,status:403,error:Sr,waiting:!0}}let l=d.lastSeenAt?Date.parse(d.lastSeenAt):0;return t&&(r()-l>=mr||d.lastAddress!==t)&&(d=a.members.update(i.id,{lastSeenAt:new Date(r()).toISOString(),lastAddress:t})??d,a.members.log({person:s,device:i.id,event:"signed-in",address:t})),{ok:!0,device:d,personId:s,rec:i}}function Xa(e,a,t="removed by the owner"){let r=e.members.byToken(a);if(!r)return null;e.tokens.revoke(a);let n=e.members.update(a,{state:"removed",removedAt:new Date((e.now??Date.now)()).toISOString(),removedReason:t});return e.members.log({person:r.personId,device:a,event:"removed",detail:t}),n}function pi(e,a){return e.members.devices(a).filter(t=>t.state!=="removed").map(t=>Xa(e,t.tokenId,"person removed by the owner")).filter(t=>!!t)}async function Cr(e,a){let t=e+a-Date.now();t>0&&await new Promise(r=>setTimeout(r,t))}var Ga=["gitlab","github"];function Ar(e,a,t){let r=String(a||"").trim().toLowerCase();if(!Ga.includes(r))throw new Error(`Request status works on ${Ga.join(" and ")}, not on "${a}".`);e.requestStatus=e.requestStatus&&typeof e.requestStatus=="object"?e.requestStatus:{};let n=Array.isArray(e.requestStatus.channels)?e.requestStatus.channels.map(o=>String(o).toLowerCase()):[];return e.requestStatus.channels=t?[...new Set([...n,r])]:n.filter(o=>o!==r),`request status on ${r} is ${t?"on":"off"}`}function ui(e){return Array.isArray(e?.requestStatus?.channels)?e.requestStatus.channels.map(a=>String(a).toLowerCase()):[]}function mi(e){let{summary:a}=Z(t=>Ar(t,e?.channel,!!e?.enabled));return{summary:a}}var hi="https://myaccount.google.com/apppasswords";function bi(e){let a=e.split("@")[1]?.toLowerCase()??"";if(a==="gmail.com"||a==="googlemail.com")return{imapHost:"imap.gmail.com",imapPort:993,smtpHost:"smtp.gmail.com",smtpPort:465}}function vi(e){let a=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,...a,password:`\${${e.passwordEnv}}`},smtp:{host:e.smtpHost,port:e.smtpPort,secure:e.smtpPort===465},allowFrom:e.allowFrom,send:e.send}}function wi(e){return`EMAIL_${e.toUpperCase().replace(/[^A-Z0-9]/g,"_")}_PASSWORD`}function $i(e){return`${e.name} <${e.from}> via ${e.host}:${e.port}`}async function _i(e,a){return Be({host:e.host,port:e.port,secure:e.secure,user:e.user,password:e.password},{name:e.name,address:e.from},a,{"Auto-Submitted":"auto-generated"})}function Si(e,a){return{to:e,subject:`${a.name}: test mail`,text:[`This is a test mail from ${a.name}.`,"","If it reached you, AgentX can send mail through this sender.","You can ignore it."].join(`
|
|
2905
2905
|
`)}}function Ai(e){return new Set(Object.entries(e).filter(([,a])=>a?.wiki?.absorb?.enabled===!1).map(([a])=>a))}function Ti(e,a){return a.only?{agents:[a.only],skipped:[]}:{agents:e.filter(t=>!a.off.has(t)),skipped:e.filter(t=>a.off.has(t))}}function Ii(e,a){return`absorb is off for this agent (agents.${e}.wiki.absorb.enabled); skipped.${e===a?" It reads the wiki notes inbox, so the inbox was not read.":""} Use --agent ${e} to run it anyway.`}function zi(e,a){if(a){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 Tr="https://ntfy.sh";function Ei(e){return{enabled:!!e?.enabled,server:e?.server||Tr,topicSet:!!e?.topic,tokenSet:!!e?.token}}function Ri(e,a){let t={...e??{}};if("enabled"in a&&(t.enabled=!!a.enabled),"server"in a){let r=String(a.server).trim().replace(/\/+$/,"");if(!/^https?:\/\/\S+$/.test(r))throw new Error("ntfy server must be an http(s) URL");t.server=r}if("topic"in a){let r=String(a.topic).trim();if(!r)throw new Error("ntfy topic cannot be empty");t.topic=r}if("token"in a){let r=String(a.token??"").trim();r?t.token=r:delete t.token}if(t.enabled&&!t.topic)throw new Error("set a topic before enabling ntfy");return t}Za();function Va(e){return/^(agent|person):/.test(e)?F(e):`person:${e}`}function ji(e){let a=(e?.projects??[]).filter(t=>t?.id);return a.map(t=>({id:t.id,name:t.name?.trim()||t.id,client:Le(t.id,a),...t.pm?{pm:F(t.pm)}:{},...t.lead?{lead:Va(t.lead)}:{},team:[...new Set((t.team??[]).filter(Boolean).map(F))]})).sort((t,r)=>t.client.localeCompare(r.client)||t.name.localeCompare(r.name)||t.id.localeCompare(r.id))}function Hi(e,a,t){if(!t.lead&&!t.team?.length)return;let r=new Set(Object.keys(e.business?.orgChart||{})),n=new Set((e.people||[]).map(i=>String(i.id))),o={id:a,name:a,client:"",...t.lead?{lead:Va(t.lead)}:{},team:(t.team??[]).map(F)};return Ir([o],r,n)}function Ir(e,a,t){let r=n=>{let o=le(n);return o.kind==="agent"?a.has(o.id)?void 0:`"${o.id}", which is not an agent in business.orgChart`:t.has(o.id)?void 0:`"${o.id}", which is not a person in people`};for(let n of e){if(n.lead){if(le(n.lead).kind!=="person")return`Project ${n.name} is led by "${n.lead}"; a lead is a person (person:<id>), the PM is the agent`;let o=r(n.lead);if(o)return`Project ${n.name} is led by ${o}`}for(let o of n.team){let i=r(o);if(i)return`Project ${n.name} has ${i} in its team`}}}export{ve as a,da as b,ye as c,nt as d,ot as e,it as f,ua as g,mt as h,_n as i,Sn as j,Cn as k,ko as l,Co as m,Ba as n,Yo as o,Jo as p,Rn as q,On as r,It as s,Et as t,ke as u,Dn as v,Mn as w,Rt as x,Bn as y,Un as z,Fn as A,Vo as B,Qo as C,Zo as D,pr as E,xr as F,ii as G,hr as H,br as I,si as J,vr as K,wr as L,yr as M,kr as N,$r as O,_r as P,di as Q,Ja as R,li as S,ci as T,Xa as U,pi as V,Ga as W,Ar as X,ui as Y,mi as Z,hi as _,bi as $,vi as aa,wi as ba,$i as ca,_i as da,Si as ea,Ai as fa,Ti as ga,Ii as ha,zi as ia,Ei as ja,Ri as ka,Va as la,ji as ma,Hi as na,Ir as oa,Qt as pa,go as qa,vo as ra,wo as sa};
|
|
2906
|
-
//# sourceMappingURL=chunk-
|
|
2906
|
+
//# sourceMappingURL=chunk-YYKQCDYX.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as W,c as K}from"./chunk-
|
|
1
|
+
import{b as W,c as K}from"./chunk-BFJIIB6S.js";import{h as z,j as Z}from"./chunk-3UOTLMXD.js";import{a as I,b as V}from"./chunk-FCPTN6NF.js";import{a as H,b as De}from"./chunk-7I7IEX4S.js";import{d as Y}from"./chunk-QIJLFPWE.js";import{execFile as tt}from"child_process";import{writeFileSync as Ee,mkdirSync as P,existsSync as D,readFileSync as nt}from"fs";import{resolve as _}from"path";var Ne=["off","shadow","authoritative"],xe={telegram:"INTENT_LEDGER_MODE_TELEGRAM",slack:"INTENT_LEDGER_MODE_SLACK",whatsapp:"INTENT_LEDGER_MODE_WHATSAPP",discord:"INTENT_LEDGER_MODE_DISCORD",gitlab:"INTENT_LEDGER_MODE_GITLAB",github:"INTENT_LEDGER_MODE_GITHUB",workflow:"INTENT_LEDGER_MODE_WORKFLOW",cron:"INTENT_LEDGER_MODE_CRON",mesh:"INTENT_LEDGER_MODE_MESH"},Se="INTENT_LEDGER_MODE";function q(n,e=process.env){let t=Q(e[xe[n]]);if(t)return t;let r=Q(e[Se]);return r||"off"}function Q(n){if(typeof n!="string")return null;let e=n.trim().toLowerCase();return Ne.includes(e)?e:null}V();import we from"better-sqlite3";import{existsSync as ut,mkdirSync as $e}from"fs";import{dirname as Oe,resolve as Le}from"path";var T=class{db;path;constructor(e={}){this.path=Le(process.cwd(),e.path??".agentx/intent/ledger.sqlite"),$e(Oe(this.path),{recursive:!0}),this.db=new we(this.path),this.db.pragma("journal_mode = WAL"),this.db.pragma("synchronous = NORMAL"),this.db.pragma("foreign_keys = ON"),Ce(this.db)}close(){this.db.close()}schemaVersion(){return this.db.prepare("SELECT MAX(v) AS v FROM schema_version").get().v??0}recordEvent(e){if(e.sourceEventId!==null){let r=this.findEventBySourceId(e.source,e.sourceEventId);if(r)return r}let t={id:e.id??I(e.ts),ts:e.ts,source:e.source,sourceEventId:e.sourceEventId,project:e.project,subject:e.subject,intent:e.intent,rawJson:e.rawJson};return this.db.prepare(`INSERT INTO intent_events (id, ts, source, source_event_id, project, subject, intent, raw_json)
|
|
2
2
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`).run(t.id,t.ts,t.source,t.sourceEventId,t.project,t.subject,t.intent,t.rawJson),t}findEventBySourceId(e,t){let r=this.db.prepare(`SELECT id, ts, source, source_event_id, project, subject, intent, raw_json
|
|
3
3
|
FROM intent_events WHERE source = ? AND source_event_id = ?`).get(e,t);return r?j(r):null}getEventById(e){let t=this.db.prepare(`SELECT id, ts, source, source_event_id, project, subject, intent, raw_json
|
|
4
4
|
FROM intent_events WHERE id = ?`).get(e);return t?j(t):null}recordDecision(e){this.db.prepare(`INSERT INTO intent_decisions (event_id, decided_at, decided_by, agent_id, outcome, reason)
|
|
@@ -142,4 +142,4 @@ ${k(O(ye(c.block,F(o.brief,i.prompt)),i.report),i.expectExitZero)}`,i.maxOutputT
|
|
|
142
142
|
`);return t.length<=e?t.join(`
|
|
143
143
|
`):t.slice(-e).join(`
|
|
144
144
|
`)}function st(n,e,t){return new Promise((r,i)=>{tt("/bin/sh",["-c",n],{timeout:e,maxBuffer:8*1024*1024,...t?{env:t}:{}},(o,s,a)=>{if(o&&o.killed){i(new Error(`command timed out after ${Math.round(e/1e3)}s`));return}r({stdout:String(s??""),stderr:String(a??""),code:o?typeof o.code=="number"?o.code:1:0})})})}export{ge as a,Ke as b,A as c,T as d,te as e,St as f,wt as g,Ye as h,$t as i,Ot as j,w as k,de as l,q as m,pt as n,re as o,se as p,At as q,et as r,it as s,Ie as t,Te as u,Re as v,B as w,U as x};
|
|
145
|
-
//# sourceMappingURL=chunk-
|
|
145
|
+
//# sourceMappingURL=chunk-ZHIRQFYT.js.map
|