agentix-cli 0.102.2 → 0.103.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.
Files changed (114) hide show
  1. package/apps/mac-voice/Sources/AgentXVoice/Character.swift +33 -8
  2. package/apps/mac-voice/Sources/AgentXVoice/CharacterMath.swift +13 -0
  3. package/apps/mac-voice/Sources/AgentXVoice/CharacterSim.swift +14 -16
  4. package/apps/mac-voice/Sources/AgentXVoice/CharacterSimFrame.swift +15 -0
  5. package/apps/mac-voice/Sources/AgentXVoice/Guide.swift +14 -6
  6. package/apps/mac-voice/Sources/AgentXVoice/GuideMath.swift +14 -2
  7. package/apps/mac-voice/Sources/AgentXVoice/IdlePlay.swift +113 -0
  8. package/apps/mac-voice/Sources/AgentXVoice/PlayActs.swift +67 -14
  9. package/apps/mac-voice/Sources/AgentXVoice/PlayMath.swift +13 -17
  10. package/apps/mac-voice/Sources/AgentXVoice/PlayRead.swift +10 -3
  11. package/apps/mac-voice/Sources/AgentXVoice/PlayStage.swift +6 -3
  12. package/apps/mac-voice/Sources/AgentXVoice/SettingsLook.swift +11 -0
  13. package/apps/mac-voice/Sources/AgentXVoice/SettingsWindow.swift +4 -1
  14. package/apps/mac-voice/Sources/AgentXVoice/VoiceSettings.swift +8 -2
  15. package/apps/mac-voice/Sources/AgentXVoice/main.swift +23 -11
  16. package/dist/{App-EYUDDF6K.js → App-A7WZMOGA.js} +2 -2
  17. package/dist/{ChatApp-F5LZLBI3.js → ChatApp-EWNT36ZE.js} +2 -2
  18. package/dist/{agent-XF3BWMOB.js → agent-MUGC4RZP.js} +2 -2
  19. package/dist/{board-dashboard-TVSOWW32.js → board-dashboard-IRMCGCU5.js} +4 -4
  20. package/dist/{chunk-ZJXDBVBT.js → chunk-25RQQ55U.js} +2 -2
  21. package/dist/{chunk-YOCQ2MWL.js → chunk-32BPHJ4I.js} +2 -2
  22. package/dist/{chunk-AYNZAOJN.js → chunk-76KJXOEV.js} +2 -2
  23. package/dist/{chunk-V6W3FFW7.js → chunk-BEFKOHRC.js} +2 -2
  24. package/dist/{chunk-QRD3ZG27.js → chunk-BUAVQUHR.js} +2 -2
  25. package/dist/{chunk-PYCTWI2I.js → chunk-CUS7WGZT.js} +2 -2
  26. package/dist/{chunk-CDM4G3CW.js → chunk-CW667M47.js} +185 -185
  27. package/dist/{chunk-CDM4G3CW.js.map → chunk-CW667M47.js.map} +1 -1
  28. package/dist/{chunk-EXPIKLUN.js → chunk-FZ7VHFL5.js} +2 -2
  29. package/dist/{chunk-RWSCQMLD.js → chunk-HE4PDESB.js} +2 -2
  30. package/dist/{chunk-HMDM5MCR.js → chunk-HVPRCHRG.js} +2 -2
  31. package/dist/{chunk-ECM2QEXF.js → chunk-IA3BC7M3.js} +10 -10
  32. package/dist/chunk-IA3BC7M3.js.map +1 -0
  33. package/dist/{chunk-S337S2M7.js → chunk-IOPAWHKW.js} +2 -2
  34. package/dist/{chunk-Y6POV2X5.js → chunk-MVLNVMWI.js} +2 -2
  35. package/dist/{chunk-HQJW3BC5.js → chunk-N4IWNCH3.js} +2 -2
  36. package/dist/{chunk-MWLX3QCD.js → chunk-NWNVHL57.js} +2 -2
  37. package/dist/{chunk-5UO6BBDG.js → chunk-OLUAEBHJ.js} +2 -2
  38. package/dist/{chunk-XO55WKCX.js → chunk-Q57GZPDA.js} +2 -2
  39. package/dist/{chunk-TXFIMVVF.js → chunk-UXTAK5WD.js} +5 -5
  40. package/dist/{chunk-GSFB46YC.js → chunk-WTFNEPJ7.js} +2 -2
  41. package/dist/{chunk-EEZI2K7S.js → chunk-XHUOWYNY.js} +2 -2
  42. package/dist/{chunk-N57ES35J.js → chunk-ZBKKOUNJ.js} +2 -2
  43. package/dist/cli.js +1 -1
  44. package/dist/{client-526OCGWD.js → client-ZX7AY7H3.js} +2 -2
  45. package/dist/config-BXOS2PLC.js +2 -0
  46. package/dist/config-mutator-KRAUD3CA.js +2 -0
  47. package/dist/{doctor-AC5ONEO2.js → doctor-P3QQP33C.js} +2 -2
  48. package/dist/index.d.ts +11 -0
  49. package/dist/index.js +1 -1
  50. package/dist/{program-M5LDV6UQ.js → program-DELG6KQQ.js} +169 -169
  51. package/dist/program-DELG6KQQ.js.map +1 -0
  52. package/dist/{promote-CNKIINYK.js → promote-FHX4Q62Z.js} +2 -2
  53. package/dist/{query-A2N2LIR7.js → query-WBK3YEPV.js} +2 -2
  54. package/dist/{registry-REKWHOHS.js → registry-NQHC7ZAV.js} +2 -2
  55. package/dist/{request-planner-MS5BS6HY.js → request-planner-3LA5RAKG.js} +2 -2
  56. package/dist/{review-candidates-2F4QK6QQ.js → review-candidates-QV66TOCL.js} +2 -2
  57. package/dist/{routing-SU5Q4IPM.js → routing-HF4XVD4Y.js} +2 -2
  58. package/dist/schedule-tool-V66FX5XL.js +2 -0
  59. package/dist/scheduler-XVMWASQR.js +2 -0
  60. package/dist/{seat-PZBFMYQL.js → seat-NQTZUIKH.js} +2 -2
  61. package/dist/{select-D3XOFXA5.js → select-3GVC5RDA.js} +2 -2
  62. package/dist/{set-enabled-DNDRQ3CZ.js → set-enabled-SXCE2MZX.js} +2 -2
  63. package/dist/{tool-FB6SPVIS.js → tool-23GOQNUW.js} +2 -2
  64. package/dist/{tool-RRGOHJW6.js → tool-E6JBENAN.js} +2 -2
  65. package/dist/wiki-VM2RTHVF.js +2 -0
  66. package/package.json +1 -1
  67. package/dist/chunk-ECM2QEXF.js.map +0 -1
  68. package/dist/config-HCJ5NZW5.js +0 -2
  69. package/dist/config-mutator-PGR2OGWC.js +0 -2
  70. package/dist/program-M5LDV6UQ.js.map +0 -1
  71. package/dist/schedule-tool-24KHZY2Z.js +0 -2
  72. package/dist/scheduler-ALDZOUKJ.js +0 -2
  73. package/dist/wiki-3DH2QYTX.js +0 -2
  74. /package/dist/{App-EYUDDF6K.js.map → App-A7WZMOGA.js.map} +0 -0
  75. /package/dist/{ChatApp-F5LZLBI3.js.map → ChatApp-EWNT36ZE.js.map} +0 -0
  76. /package/dist/{agent-XF3BWMOB.js.map → agent-MUGC4RZP.js.map} +0 -0
  77. /package/dist/{board-dashboard-TVSOWW32.js.map → board-dashboard-IRMCGCU5.js.map} +0 -0
  78. /package/dist/{chunk-ZJXDBVBT.js.map → chunk-25RQQ55U.js.map} +0 -0
  79. /package/dist/{chunk-YOCQ2MWL.js.map → chunk-32BPHJ4I.js.map} +0 -0
  80. /package/dist/{chunk-AYNZAOJN.js.map → chunk-76KJXOEV.js.map} +0 -0
  81. /package/dist/{chunk-V6W3FFW7.js.map → chunk-BEFKOHRC.js.map} +0 -0
  82. /package/dist/{chunk-QRD3ZG27.js.map → chunk-BUAVQUHR.js.map} +0 -0
  83. /package/dist/{chunk-PYCTWI2I.js.map → chunk-CUS7WGZT.js.map} +0 -0
  84. /package/dist/{chunk-EXPIKLUN.js.map → chunk-FZ7VHFL5.js.map} +0 -0
  85. /package/dist/{chunk-RWSCQMLD.js.map → chunk-HE4PDESB.js.map} +0 -0
  86. /package/dist/{chunk-HMDM5MCR.js.map → chunk-HVPRCHRG.js.map} +0 -0
  87. /package/dist/{chunk-S337S2M7.js.map → chunk-IOPAWHKW.js.map} +0 -0
  88. /package/dist/{chunk-Y6POV2X5.js.map → chunk-MVLNVMWI.js.map} +0 -0
  89. /package/dist/{chunk-HQJW3BC5.js.map → chunk-N4IWNCH3.js.map} +0 -0
  90. /package/dist/{chunk-MWLX3QCD.js.map → chunk-NWNVHL57.js.map} +0 -0
  91. /package/dist/{chunk-5UO6BBDG.js.map → chunk-OLUAEBHJ.js.map} +0 -0
  92. /package/dist/{chunk-XO55WKCX.js.map → chunk-Q57GZPDA.js.map} +0 -0
  93. /package/dist/{chunk-TXFIMVVF.js.map → chunk-UXTAK5WD.js.map} +0 -0
  94. /package/dist/{chunk-GSFB46YC.js.map → chunk-WTFNEPJ7.js.map} +0 -0
  95. /package/dist/{chunk-EEZI2K7S.js.map → chunk-XHUOWYNY.js.map} +0 -0
  96. /package/dist/{chunk-N57ES35J.js.map → chunk-ZBKKOUNJ.js.map} +0 -0
  97. /package/dist/{client-526OCGWD.js.map → client-ZX7AY7H3.js.map} +0 -0
  98. /package/dist/{config-HCJ5NZW5.js.map → config-BXOS2PLC.js.map} +0 -0
  99. /package/dist/{config-mutator-PGR2OGWC.js.map → config-mutator-KRAUD3CA.js.map} +0 -0
  100. /package/dist/{doctor-AC5ONEO2.js.map → doctor-P3QQP33C.js.map} +0 -0
  101. /package/dist/{promote-CNKIINYK.js.map → promote-FHX4Q62Z.js.map} +0 -0
  102. /package/dist/{query-A2N2LIR7.js.map → query-WBK3YEPV.js.map} +0 -0
  103. /package/dist/{registry-REKWHOHS.js.map → registry-NQHC7ZAV.js.map} +0 -0
  104. /package/dist/{request-planner-MS5BS6HY.js.map → request-planner-3LA5RAKG.js.map} +0 -0
  105. /package/dist/{review-candidates-2F4QK6QQ.js.map → review-candidates-QV66TOCL.js.map} +0 -0
  106. /package/dist/{routing-SU5Q4IPM.js.map → routing-HF4XVD4Y.js.map} +0 -0
  107. /package/dist/{schedule-tool-24KHZY2Z.js.map → schedule-tool-V66FX5XL.js.map} +0 -0
  108. /package/dist/{scheduler-ALDZOUKJ.js.map → scheduler-XVMWASQR.js.map} +0 -0
  109. /package/dist/{seat-PZBFMYQL.js.map → seat-NQTZUIKH.js.map} +0 -0
  110. /package/dist/{select-D3XOFXA5.js.map → select-3GVC5RDA.js.map} +0 -0
  111. /package/dist/{set-enabled-DNDRQ3CZ.js.map → set-enabled-SXCE2MZX.js.map} +0 -0
  112. /package/dist/{tool-FB6SPVIS.js.map → tool-23GOQNUW.js.map} +0 -0
  113. /package/dist/{tool-RRGOHJW6.js.map → tool-E6JBENAN.js.map} +0 -0
  114. /package/dist/{wiki-3DH2QYTX.js.map → wiki-VM2RTHVF.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{c as le,d as K,e as E,f as Y,g as D}from"./chunk-N7HKIMMR.js";import{a as se,b as de}from"./chunk-DG5I6PPM.js";import{e as j,g as oe,n as ie,p as J}from"./chunk-E5OV6RTG.js";import{a as ae,b as re}from"./chunk-5UO6BBDG.js";import{a as ne}from"./chunk-EEZI2K7S.js";import{L as ee,S as _e,aa as q,ca as te,da as U,ga as F,s as L,t as Z,w as Pe}from"./chunk-ECM2QEXF.js";import{existsSync as M,readFileSync as he,writeFileSync as ve,appendFileSync as Ue,mkdirSync as We}from"fs";import{dirname as Oe,resolve as P}from"path";import{fileURLToPath as Be}from"url";import{hostname as He}from"os";import{spawn as Le}from"child_process";F();import{existsSync as pe,readFileSync as ce,writeFileSync as G,copyFileSync as ze}from"fs";import{resolve as ge}from"path";function W(e,t={}){let n=t.configPath||ge(process.cwd(),"agentx.json");if(!pe(n))throw new Error(`agentx.json not found at ${n}`);let a=JSON.parse(ce(n,"utf-8")),r=e(a),o=typeof r=="string"?{summary:r}:r,s=JSON.stringify(a,null,2)+`
1
+ import{c as le,d as K,e as E,f as Y,g as D}from"./chunk-N7HKIMMR.js";import{a as se,b as de}from"./chunk-DG5I6PPM.js";import{e as j,g as oe,n as ie,p as J}from"./chunk-E5OV6RTG.js";import{a as ae,b as re}from"./chunk-OLUAEBHJ.js";import{a as ne}from"./chunk-XHUOWYNY.js";import{M as ee,T as _e,ba as q,da as te,ea as U,ha as F,t as L,u as Z,x as Pe}from"./chunk-IA3BC7M3.js";import{existsSync as M,readFileSync as he,writeFileSync as ve,appendFileSync as Ue,mkdirSync as We}from"fs";import{dirname as Oe,resolve as P}from"path";import{fileURLToPath as Be}from"url";import{hostname as He}from"os";import{spawn as Le}from"child_process";F();import{existsSync as pe,readFileSync as ce,writeFileSync as G,copyFileSync as ze}from"fs";import{resolve as ge}from"path";function W(e,t={}){let n=t.configPath||ge(process.cwd(),"agentx.json");if(!pe(n))throw new Error(`agentx.json not found at ${n}`);let a=JSON.parse(ce(n,"utf-8")),r=e(a),o=typeof r=="string"?{summary:r}:r,s=JSON.stringify(a,null,2)+`
2
2
  `,l=n+".tmp";G(l,s,"utf-8");try{JSON.parse(ce(l,"utf-8"))}catch(p){throw new Error(`config did not round-trip cleanly: ${p.message}`)}let i;return t.skipBackup||(i=`${n}.bak.${Date.now()}`,ze(n,i)),G(n,s,"utf-8"),t.skipReload||De().catch(()=>{}),{summary:o.summary,payload:o.payload,backupPath:i}}function me(e,t={}){let n=t.configPath||ge(process.cwd(),"agentx.json");if(pe(n)&&!t.overwrite)throw new Error(`agentx.json already exists at ${n}. Pass overwrite=true to replace it.`);return G(n,JSON.stringify(e,null,2)+`
3
3
  `,"utf-8"),{file:n}}async function De(){try{let t=U().dashboard.daemonUrl?.replace(/\/+$/,"")||"http://127.0.0.1:18800";await fetch(`${t}/reload`,{method:"POST"}).catch(()=>null)}catch{}}function ue(e,t){let n=e.configExists?e.agentCount===0?"Add your first agent":"Add another agent":"Set up your team",a=`<header class="ax-topbar">
4
4
  <div class="ax-topbar__left">
@@ -741,4 +741,4 @@ tr:hover td { background: var(--bg-hover); }
741
741
  ORDER BY started_at DESC, rowid DESC LIMIT ?`).all(t,Math.max(1,Math.min(n,500))).map(r=>({taskId:r.task_id,agentId:r.agent_id,channel:r.channel,chatId:r.chat_id,status:r.status,startedAt:r.started_at,finishedAt:r.finished_at??null,messagePreview:r.message_preview}))}function lt(e){return e.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'requests'").get()?e.prepare("PRAGMA table_info(requests)").all().some(a=>a.name==="person"):!1}function $e(e,t,n,a,...r){return lt(e)?e.prepare(`SELECT id, state, channel, agent_id, text, created_at FROM requests
742
742
  WHERE person = ? AND state IN (${n.map(()=>"?").join(",")})
743
743
  ${a}`).all(t,...n,...r).map(s=>({id:s.id,state:s.state,channel:s.channel,agentId:s.agent_id,text:s.text,createdAt:s.created_at})):[]}function sn(e,t){return $e(e,t,L,"ORDER BY created_at")}function dn(e,t,n=50){return $e(e,t,[...L,...Z],"ORDER BY created_at DESC, rowid DESC LIMIT ?",Math.max(1,Math.min(n,500)))}_e();var Q="member:",ct=90,pt="members",gt="tailscale-user-login",mt=400,ut=60*60*1e3;function ft(e){let t=e.scopes.find(n=>n.startsWith(Q));return t?t.slice(Q.length):null}function Ae(e,t){if(!e)return null;let n=t.verify(e),a=n?ft(n):null;return n&&a?{rec:n,personId:a}:null}function un(e,t){let n=e.people().find(l=>l.id===t);if(!n)return{ok:!1,error:`No person "${t}". Add them first: agentx people add ${t} --name "\u2026"`};let{token:a,record:r}=e.tokens.create({name:`${n.name} (machine not paired yet)`,scopes:[`${Q}${n.id}`],expiresInDays:ct}),{code:o,expiresAt:s}=e.codes.create({token:a,tokenId:r.id,name:n.id});return e.members.log({person:n.id,device:r.id,event:"invited"}),{ok:!0,code:o,expiresAt:s,tokenId:r.id,person:n}}var ht="The private network says someone else is connecting from this machine. Ask the owner for a new code.",vt="Too many machines are waiting for the owner's answer. Try again later.",Se=(e,t)=>{let n=e.headers[t];return(Array.isArray(n)?n[0]:n||"").trim()};function Ie(e){let t=e.socket?.remoteAddress||"";return t==="127.0.0.1"||t==="::1"||t==="::ffff:127.0.0.1"}function bt(e){if(!Ie(e))return null;let t=Se(e,gt).toLowerCase();return t?t.slice(0,80):null}function xt(e){let t=e.socket?.remoteAddress||"unknown";if(!Ie(e))return t;let n=Se(e,"x-forwarded-for").split(",").pop().trim();return/^[0-9a-fA-F:.]{2,45}$/.test(n)?n:t}function yt(e){return typeof e=="string"?e.replace(/[^\p{L}\p{N} ._'()-]/gu," ").replace(/\s+/g," ").trim().slice(0,60):""}function kt(e){return e.identities.map(ee).filter(t=>!!t&&t.channel==="tailscale").map(t=>t.value)}async function fn(e,t){let n=Date.now(),a=t.now??Date.now,r=t.log??(m=>console.log(m)),o=xt(e),s=t.limiter.retryAfter(o);if(s>0)return r(`[member] pair-code refused from ${o}: locked out for ${s}s more`),{status:429,body:{error:"too many attempts",retryAfter:s},retryAfter:s};let l=null,i="";try{let m=await ie(e,2048);l=m.code,i=yt(m.machine)}catch{}let p=t.codes.redeem(l),g=p?Ae(p.token,t.tokens):null;if(await $t(n,t.minMs??mt),!p||!g)return t.limiter.fail(o),r(`[member] pair-code failed from ${o}`),{status:401,body:{error:J}};t.limiter.succeed(o);let{rec:f,personId:d}=g,h=t.people().find(m=>m.id===d);if(!h)return t.tokens.revoke(f.id),t.members.log({person:d,device:f.id,event:"refused",address:o,detail:"person no longer listed"}),r(`[member] pair-code for ${d} refused from ${o}: person no longer listed`),{status:403,body:{error:J}};let u=bt(e),A=kt(h);if(A.length&&(!u||!A.includes(u)))return t.tokens.revoke(f.id),t.members.log({person:d,device:f.id,event:"refused",address:o,detail:`network login ${u??"missing"}; expected ${A.join(" or ")}`}),r(`[member] ${d}: pairing from ${o} refused: the network says "${u??"nobody"}", expected ${A.join(" or ")}`),{status:403,body:{error:ht}};let x=i||"Unnamed machine",y=h.name.slice(0,40),v=oe(t.root,{title:`New machine for ${y}`,ask:`From ${o}, ${u?`network login ${u}`:"no network login reported"}. Machine name, as typed there: "${x}". 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:pt},{now:a()});return v.ok?(t.members.add({tokenId:f.id,personId:d,name:x,state:"pending",cardId:v.card.id,address:o,...u?{network:u}:{},createdAt:new Date(a()).toISOString()}),t.members.log({person:d,device:f.id,event:"paired",address:o,detail:x}),r(`[member] ${d} paired "${x}" from ${o}; waiting for the owner (card ${v.card.id})`),{status:200,body:{person:d,name:x,state:"pending"},token:p.token}):(t.tokens.revoke(f.id),t.members.log({person:d,device:f.id,event:"refused",address:o,detail:v.error}),r(`[member] ${d}: pairing from ${o} refused: ${v.error}`),{status:503,body:{error:vt}})}var H="this machine is not paired",wt="waiting for the owner to approve this machine";function Ee(e){return e?e.status==="decided"?e.verdict??null:e.status==="expired"?"no":null:null}function hn(e,t){return t.state==="pending"&&t.cardId?Ee(j(e,t.cardId)):null}function vn(e,t,n){let a=t.now??Date.now,r=t.log??(g=>console.log(g)),o=Ae(e,t.tokens);if(!o)return{ok:!1,status:401,error:H};let{rec:s,personId:l}=o,i=t.members.byToken(s.id);if(!i||i.state==="removed"||i.personId!==l)return{ok:!1,status:401,error:H};if(t.people&&!t.people().some(g=>g.id===l))return Ce(t,s.id,"person no longer listed"),r(`[member] ${l}: "${i.name}" ended: person no longer listed`),{ok:!1,status:401,error:H};if(i.state==="pending"){let g=i.cardId?j(t.root,i.cardId):null,f=Ee(g);if(f==="yes")i=t.members.update(s.id,{state:"active",approvedAt:new Date(a()).toISOString()})??i,t.members.log({person:l,device:s.id,event:"approved",detail:g?.decided_by}),r(`[member] ${l}: "${i.name}" approved`);else if(f==="no"){let d=g?.status==="expired"?"the owner did not answer in time":"the owner said no";return t.tokens.revoke(s.id),t.members.update(s.id,{state:"removed",removedAt:new Date(a()).toISOString(),removedReason:d}),t.members.log({person:l,device:s.id,event:"refused",detail:d}),r(`[member] ${l}: "${i.name}" refused: ${d}`),{ok:!1,status:401,error:H}}else return{ok:!1,status:403,error:wt,waiting:!0}}let p=i.lastSeenAt?Date.parse(i.lastSeenAt):0;return n&&(a()-p>=ut||i.lastAddress!==n)&&(i=t.members.update(s.id,{lastSeenAt:new Date(a()).toISOString(),lastAddress:n})??i,t.members.log({person:l,device:s.id,event:"signed-in",address:n})),{ok:!0,device:i,personId:l,rec:s}}function Ce(e,t,n="removed by the owner"){let a=e.members.byToken(t);if(!a)return null;e.tokens.revoke(t);let r=e.members.update(t,{state:"removed",removedAt:new Date((e.now??Date.now)()).toISOString(),removedReason:n});return e.members.log({person:a.personId,device:t,event:"removed",detail:n}),r}function bn(e,t){return e.members.devices(t).filter(n=>n.state!=="removed").map(n=>Ce(e,n.tokenId,"person removed by the owner")).filter(n=>!!n)}async function $t(e,t){let n=e+t-Date.now();n>0&&await new Promise(a=>setTimeout(a,n))}var Te=["gitlab","github"];function At(e,t,n){let a=String(t||"").trim().toLowerCase();if(!Te.includes(a))throw new Error(`Request status works on ${Te.join(" and ")}, not on "${t}".`);e.requestStatus=e.requestStatus&&typeof e.requestStatus=="object"?e.requestStatus:{};let r=Array.isArray(e.requestStatus.channels)?e.requestStatus.channels.map(o=>String(o).toLowerCase()):[];return e.requestStatus.channels=n?[...new Set([...r,a])]:r.filter(o=>o!==a),`request status on ${a} is ${n?"on":"off"}`}function kn(e){return Array.isArray(e?.requestStatus?.channels)?e.requestStatus.channels.map(t=>String(t).toLowerCase()):[]}function wn(e){let{summary:t}=W(n=>At(n,e?.channel,!!e?.enabled));return{summary:t}}var St="https://ntfy.sh";function An(e){return{enabled:!!e?.enabled,server:e?.server||St,topicSet:!!e?.topic,tokenSet:!!e?.token}}function Sn(e,t){let n={...e??{}};if("enabled"in t&&(n.enabled=!!t.enabled),"server"in t){let a=String(t.server).trim().replace(/\/+$/,"");if(!/^https?:\/\/\S+$/.test(a))throw new Error("ntfy server must be an http(s) URL");n.server=a}if("topic"in t){let a=String(t.topic).trim();if(!a)throw new Error("ntfy topic cannot be empty");n.topic=a}if("token"in t){let a=String(t.token??"").trim();a?n.token=a:delete n.token}if(n.enabled&&!n.topic)throw new Error("set a topic before enabling ntfy");return n}export{W as a,be as b,Bt as c,Ht as d,Lt as e,Kt as f,Yt as g,Gt as h,on as i,sn as j,dn as k,ct as l,un as m,xt as n,fn as o,hn as p,vn as q,Ce as r,bn as s,Te as t,At as u,kn as v,wn as w,An as x,Sn as y,st as z,nn as A};
744
- //# sourceMappingURL=chunk-N57ES35J.js.map
744
+ //# sourceMappingURL=chunk-ZBKKOUNJ.js.map
package/dist/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{b as o}from"./chunk-JXF54PT7.js";import"./chunk-QIJLFPWE.js";var s=o(process.versions.node);s&&(console.error(s),process.exit(1));var{buildProgram:r}=await import("./program-M5LDV6UQ.js"),{installCliSignalExit:i}=await import("./signal-exit-WL7G3EEZ.js");i();var e=await r();process.argv.slice(2).length===0?e.outputHelp():e.parse();
2
+ import{b as o}from"./chunk-JXF54PT7.js";import"./chunk-QIJLFPWE.js";var s=o(process.versions.node);s&&(console.error(s),process.exit(1));var{buildProgram:r}=await import("./program-DELG6KQQ.js"),{installCliSignalExit:i}=await import("./signal-exit-WL7G3EEZ.js");i();var e=await r();process.argv.slice(2).length===0?e.outputHelp():e.parse();
3
3
  //# sourceMappingURL=cli.js.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g}from"./chunk-PYCTWI2I.js";import"./chunk-ECM2QEXF.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{b as fetchAgents,d as fetchCrons,c as fetchProcesses,e as killProcess,a as resolveConn,f as sendTask,g as streamTask};
2
- //# sourceMappingURL=client-526OCGWD.js.map
1
+ import{a,b,c,d,e,f,g}from"./chunk-CUS7WGZT.js";import"./chunk-IA3BC7M3.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{b as fetchAgents,d as fetchCrons,c as fetchProcesses,e as killProcess,a as resolveConn,f as sendTask,g as streamTask};
2
+ //# sourceMappingURL=client-ZX7AY7H3.js.map
@@ -0,0 +1,2 @@
1
+ import{$ as h,U as a,V as b,W as c,X as d,Y as e,Z as f,_ as g,aa as i,ba as j,ca as k,da as l,ea as m,fa as n,ha as o}from"./chunk-IA3BC7M3.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";o();export{a as INTEGRATION_KINDS,j as approvalsConfigSchema,d as callsSchema,c as cameraBotSchema,k as daemonConfigSchema,b as eventSubscriptionSchema,l as expandEnvVars,m as loadDaemonConfig,h as membersConfigSchema,g as peopleConfigSchema,f as personSchema,i as requestStatusConfigSchema,e as requestsConfigSchema,n as validateWorkspaces};
2
+ //# sourceMappingURL=config-BXOS2PLC.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b,c,d,e}from"./chunk-OLUAEBHJ.js";import"./chunk-IA3BC7M3.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{b as applyConfigMutation,a as findConfigPath,d as getAtPath,c as setAtPath,e as unsetAtPath};
2
+ //# sourceMappingURL=config-mutator-KRAUD3CA.js.map
@@ -1,2 +1,2 @@
1
- import{b as a,c as b,d as c,e as d,f as e}from"./chunk-HQJW3BC5.js";import"./chunk-S2GAEH2F.js";import"./chunk-JXF54PT7.js";import"./chunk-ECM2QEXF.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{e as daemonVoiceCheck,b as doctor,a as runDoctorChecks,c as runNotificationChecks,d as runReminderChecks};
2
- //# sourceMappingURL=doctor-AC5ONEO2.js.map
1
+ import{b as a,c as b,d as c,e as d,f as e}from"./chunk-N4IWNCH3.js";import"./chunk-S2GAEH2F.js";import"./chunk-JXF54PT7.js";import"./chunk-IA3BC7M3.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{e as daemonVoiceCheck,b as doctor,a as runDoctorChecks,c as runNotificationChecks,d as runReminderChecks};
2
+ //# sourceMappingURL=doctor-P3QQP33C.js.map
package/dist/index.d.ts CHANGED
@@ -4261,6 +4261,9 @@ declare const daemonConfigSchema: z.ZodObject<{
4261
4261
  rules: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
4262
4262
  id: z.ZodString;
4263
4263
  enabled: z.ZodDefault<z.ZodBoolean>;
4264
+ /**
4265
+ * Load .env file into process.env (simple, no dependency).
4266
+ */
4264
4267
  chats: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4265
4268
  senders: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4266
4269
  agent: z.ZodString;
@@ -5169,6 +5172,10 @@ declare const daemonConfigSchema: z.ZodObject<{
5169
5172
  /** The character takes a slow stroll beside where it rests when it
5170
5173
  * has nothing to do. Off: it moves only out of the pointer's way. */
5171
5174
  stroll: z.ZodDefault<z.ZodBoolean>;
5175
+ /** How often the character plays a small animation by itself when
5176
+ * it has nothing to do: a look around, a hop, a sway, and a yawn
5177
+ * before it dozes. "off": none. */
5178
+ animations: z.ZodDefault<z.ZodEnum<["off", "rarely", "sometimes", "often"]>>;
5172
5179
  /** The orb and character palette of an agent that set neither
5173
5180
  * presence.palette nor presence.color. */
5174
5181
  palette: z.ZodDefault<z.ZodEnum<[string, ...string[]]>>;
@@ -5209,6 +5216,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5209
5216
  look: "orb" | "character";
5210
5217
  startReduced: boolean;
5211
5218
  stroll: boolean;
5219
+ animations: "off" | "rarely" | "sometimes" | "often";
5212
5220
  system?: string | Record<string, string> | undefined;
5213
5221
  listener?: string | undefined;
5214
5222
  }, {
@@ -5236,6 +5244,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5236
5244
  look?: "orb" | "character" | undefined;
5237
5245
  startReduced?: boolean | undefined;
5238
5246
  stroll?: boolean | undefined;
5247
+ animations?: "off" | "rarely" | "sometimes" | "often" | undefined;
5239
5248
  }>>;
5240
5249
  business: z.ZodOptional<z.ZodObject<{
5241
5250
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -6655,6 +6664,7 @@ declare const daemonConfigSchema: z.ZodObject<{
6655
6664
  look: "orb" | "character";
6656
6665
  startReduced: boolean;
6657
6666
  stroll: boolean;
6667
+ animations: "off" | "rarely" | "sometimes" | "often";
6658
6668
  system?: string | Record<string, string> | undefined;
6659
6669
  listener?: string | undefined;
6660
6670
  };
@@ -7426,6 +7436,7 @@ declare const daemonConfigSchema: z.ZodObject<{
7426
7436
  look?: "orb" | "character" | undefined;
7427
7437
  startReduced?: boolean | undefined;
7428
7438
  stroll?: boolean | undefined;
7439
+ animations?: "off" | "rarely" | "sometimes" | "often" | undefined;
7429
7440
  } | undefined;
7430
7441
  dashboard?: {
7431
7442
  enabled?: boolean | undefined;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,ga as Tt,h as bt,ha as Mt}from"./chunk-CDM4G3CW.js";import"./chunk-MWLX3QCD.js";import"./chunk-GTJIKXDB.js";import"./chunk-ZJXDBVBT.js";import"./chunk-DG5I6PPM.js";import"./chunk-ZVP6GB4G.js";import"./chunk-S2GAEH2F.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-S337S2M7.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-ACFQBLPX.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-3Z5P2CWS.js";import"./chunk-E5OV6RTG.js";import"./chunk-PPUN7YHA.js";import{Z as yt,m as lt,n as ct,o as dt,p as mt,q as pt}from"./chunk-TXFIMVVF.js";import"./chunk-EXPIKLUN.js";import"./chunk-GLQLCBJS.js";import"./chunk-DP7RTNDM.js";import{a as L}from"./chunk-C245D4BZ.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-HMDM5MCR.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-Y4CYQV7G.js";import"./chunk-LLNPKE7H.js";import"./chunk-SHEUCITK.js";import"./chunk-V6W3FFW7.js";import"./chunk-SZDACK6O.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-Y6POV2X5.js";import"./chunk-5UO6BBDG.js";import"./chunk-VWTBHLMX.js";import"./chunk-EEZI2K7S.js";import{a as ht}from"./chunk-AYNZAOJN.js";import"./chunk-KA2UIZXG.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-GSFB46YC.js";import"./chunk-MYVHVJWZ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-YOCQ2MWL.js";import{f as gt,g as ft}from"./chunk-XO55WKCX.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-RWSCQMLD.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-5MUJZODV.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{ba as tt,da as st,ea as ot,ga as nt}from"./chunk-ECM2QEXF.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
1
+ import{a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt,ha as Tt,ia as Mt}from"./chunk-CW667M47.js";import"./chunk-NWNVHL57.js";import"./chunk-GTJIKXDB.js";import"./chunk-25RQQ55U.js";import"./chunk-DG5I6PPM.js";import"./chunk-ZVP6GB4G.js";import"./chunk-S2GAEH2F.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-IOPAWHKW.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-ACFQBLPX.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-3Z5P2CWS.js";import"./chunk-E5OV6RTG.js";import"./chunk-PPUN7YHA.js";import{Z as yt,m as lt,n as ct,o as dt,p as mt,q as pt}from"./chunk-UXTAK5WD.js";import"./chunk-FZ7VHFL5.js";import"./chunk-GLQLCBJS.js";import"./chunk-DP7RTNDM.js";import{a as L}from"./chunk-C245D4BZ.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-HVPRCHRG.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-Y4CYQV7G.js";import"./chunk-LLNPKE7H.js";import"./chunk-SHEUCITK.js";import"./chunk-BEFKOHRC.js";import"./chunk-SZDACK6O.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-MVLNVMWI.js";import"./chunk-OLUAEBHJ.js";import"./chunk-VWTBHLMX.js";import"./chunk-XHUOWYNY.js";import{a as ht}from"./chunk-76KJXOEV.js";import"./chunk-KA2UIZXG.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-WTFNEPJ7.js";import"./chunk-MYVHVJWZ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-32BPHJ4I.js";import{f as gt,g as ft}from"./chunk-Q57GZPDA.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-HE4PDESB.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-5MUJZODV.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{ca as tt,ea as st,fa as ot,ha as nt}from"./chunk-IA3BC7M3.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
2
2
  `)}
3
3
 
4
4
  ${t}`}async function It(o){let{loadLocalSkills:e}=await import("./loader-YFVSSYSL.js");return e(o)}async function Ot(o,e,t,s,i){let a=[{role:"system",content:`You are a skill author for the Agent Skills ecosystem (skills.sh).