agentix-cli 0.89.0 → 0.91.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.
Files changed (126) hide show
  1. package/apps/mac-voice/Sources/AgentXVoice/Character.swift +152 -0
  2. package/apps/mac-voice/Sources/AgentXVoice/CharacterDraw.swift +218 -0
  3. package/apps/mac-voice/Sources/AgentXVoice/CharacterMath.swift +145 -0
  4. package/apps/mac-voice/Sources/AgentXVoice/CharacterSim.swift +241 -0
  5. package/apps/mac-voice/Sources/AgentXVoice/Panel.swift +35 -3
  6. package/apps/mac-voice/Sources/AgentXVoice/SettingsLook.swift +19 -0
  7. package/apps/mac-voice/Sources/AgentXVoice/SettingsWindow.swift +4 -0
  8. package/apps/mac-voice/Sources/AgentXVoice/VoiceSettings.swift +7 -2
  9. package/apps/mac-voice/Sources/AgentXVoice/main.swift +11 -0
  10. package/dist/{App-BSGDYHRD.js → App-PBPYFVBE.js} +2 -2
  11. package/dist/{ChatApp-K57DBCDT.js → ChatApp-QC7QAQEW.js} +2 -2
  12. package/dist/{agent-6MTUM5DR.js → agent-BQEENICU.js} +2 -2
  13. package/dist/{board-dashboard-GL6GQ32D.js → board-dashboard-ZLDVYPZ4.js} +210 -210
  14. package/dist/{board-dashboard-GL6GQ32D.js.map → board-dashboard-ZLDVYPZ4.js.map} +1 -1
  15. package/dist/{chunk-54VYZE7A.js → chunk-24P6UR3L.js} +12 -12
  16. package/dist/chunk-24P6UR3L.js.map +1 -0
  17. package/dist/{chunk-DWZYVYZS.js → chunk-3SZ4CU6G.js} +57 -15
  18. package/dist/chunk-3SZ4CU6G.js.map +1 -0
  19. package/dist/{chunk-TNR7AI4H.js → chunk-4SHWIGTM.js} +67 -67
  20. package/dist/chunk-4SHWIGTM.js.map +1 -0
  21. package/dist/{chunk-N4HFUAPN.js → chunk-4TKGR3XF.js} +2 -2
  22. package/dist/{chunk-3CHAPGUX.js → chunk-7RDNVR5I.js} +195 -194
  23. package/dist/chunk-7RDNVR5I.js.map +1 -0
  24. package/dist/{chunk-7OEFPYQJ.js → chunk-AVA245WL.js} +2 -2
  25. package/dist/{chunk-BFY4D4RH.js → chunk-BTTQZWYB.js} +2 -2
  26. package/dist/{chunk-I6HCIQCQ.js → chunk-EBHHMJZX.js} +2 -2
  27. package/dist/{chunk-7QDAGGOD.js → chunk-EJPQPU5J.js} +2 -2
  28. package/dist/{chunk-EUXF2GJY.js → chunk-ES2NYGS2.js} +2 -2
  29. package/dist/{chunk-X2F3AVGR.js → chunk-HXM35HRM.js} +2 -2
  30. package/dist/{chunk-MZQ5PCLA.js → chunk-HY6ILQ4T.js} +2 -2
  31. package/dist/{chunk-BUELCBBV.js → chunk-L73YON3H.js} +8 -8
  32. package/dist/{chunk-BUELCBBV.js.map → chunk-L73YON3H.js.map} +1 -1
  33. package/dist/{chunk-XVDASTUX.js → chunk-NIQEKVWY.js} +2 -2
  34. package/dist/{chunk-7K5SJJUI.js → chunk-OKT5RCXP.js} +2 -2
  35. package/dist/{chunk-HOXHUFZB.js → chunk-OS34M3FV.js} +2 -2
  36. package/dist/{chunk-C3VCIEZS.js → chunk-PJZ4ZHQS.js} +2 -2
  37. package/dist/{chunk-PN6XHTG5.js → chunk-RJ7DASOU.js} +4 -4
  38. package/dist/{chunk-PN6XHTG5.js.map → chunk-RJ7DASOU.js.map} +1 -1
  39. package/dist/{chunk-BOENB3IK.js → chunk-RS6BNRVF.js} +2 -2
  40. package/dist/{chunk-HQWMWSSE.js → chunk-S4JD5FEE.js} +2 -2
  41. package/dist/{chunk-KIXDJEGA.js → chunk-SH5Y7N4W.js} +2 -2
  42. package/dist/{chunk-2FLVU2QW.js → chunk-SQOBKSP3.js} +2 -2
  43. package/dist/{chunk-OAA7TNB6.js → chunk-TGN7K7VG.js} +2 -2
  44. package/dist/{chunk-7ADEEHZQ.js → chunk-URVWZ5FM.js} +2 -2
  45. package/dist/{chunk-BYD5B3P3.js → chunk-UVMCAZL7.js} +2 -2
  46. package/dist/{chunk-ECCPLASB.js → chunk-ZVXKCXTP.js} +2 -2
  47. package/dist/cli.js +1 -1
  48. package/dist/{client-UKLOVDZB.js → client-WFEXHCNH.js} +2 -2
  49. package/dist/config-PPYPER75.js +2 -0
  50. package/dist/config-mutator-QQDBVKWM.js +2 -0
  51. package/dist/{doctor-COAIIKLV.js → doctor-NRKGBTVD.js} +2 -2
  52. package/dist/index.d.ts +31 -15
  53. package/dist/index.js +1 -1
  54. package/dist/processes-MMAVAZAC.js +2 -0
  55. package/dist/{program-QKXRASTV.js → program-7YKH5WTC.js} +181 -181
  56. package/dist/program-7YKH5WTC.js.map +1 -0
  57. package/dist/{promote-B7FGHUFA.js → promote-PY73YR6C.js} +2 -2
  58. package/dist/{query-ZSVAGGSM.js → query-F3R5KXA7.js} +2 -2
  59. package/dist/{registry-4DWWYWDR.js → registry-YBMYCRQH.js} +2 -2
  60. package/dist/{request-planner-DSXXT75B.js → request-planner-CVNEV6NJ.js} +2 -2
  61. package/dist/{review-candidates-34S6R3DJ.js → review-candidates-5QTF5JRG.js} +2 -2
  62. package/dist/{routing-HWGNYIF3.js → routing-BJLETKHZ.js} +2 -2
  63. package/dist/schedule-tool-E2PRGDLW.js +2 -0
  64. package/dist/scheduler-53POJWDI.js +2 -0
  65. package/dist/{seat-OQZY3CW7.js → seat-OORCKWER.js} +2 -2
  66. package/dist/{select-BBTWL7FN.js → select-OGMDS37Y.js} +2 -2
  67. package/dist/{set-enabled-OC3YT4D4.js → set-enabled-IKSHTUUF.js} +2 -2
  68. package/dist/{surface-usage-O5L4KLGS.js → surface-usage-CH3SHO77.js} +2 -2
  69. package/dist/{tool-P4AHNZ5O.js → tool-6FVBXUTV.js} +2 -2
  70. package/dist/{tool-R36FDI6E.js → tool-CKIO3NBX.js} +2 -2
  71. package/dist/wiki-4CPXUAPW.js +2 -0
  72. package/package.json +1 -1
  73. package/dist/chunk-3CHAPGUX.js.map +0 -1
  74. package/dist/chunk-54VYZE7A.js.map +0 -1
  75. package/dist/chunk-DWZYVYZS.js.map +0 -1
  76. package/dist/chunk-TNR7AI4H.js.map +0 -1
  77. package/dist/config-WUDWHRT6.js +0 -2
  78. package/dist/config-mutator-UPLM7KGO.js +0 -2
  79. package/dist/processes-TXEWMXXJ.js +0 -2
  80. package/dist/program-QKXRASTV.js.map +0 -1
  81. package/dist/schedule-tool-JLIS2GQU.js +0 -2
  82. package/dist/scheduler-F6NRVZ7W.js +0 -2
  83. package/dist/wiki-5E4AGLKY.js +0 -2
  84. /package/dist/{App-BSGDYHRD.js.map → App-PBPYFVBE.js.map} +0 -0
  85. /package/dist/{ChatApp-K57DBCDT.js.map → ChatApp-QC7QAQEW.js.map} +0 -0
  86. /package/dist/{agent-6MTUM5DR.js.map → agent-BQEENICU.js.map} +0 -0
  87. /package/dist/{chunk-N4HFUAPN.js.map → chunk-4TKGR3XF.js.map} +0 -0
  88. /package/dist/{chunk-7OEFPYQJ.js.map → chunk-AVA245WL.js.map} +0 -0
  89. /package/dist/{chunk-BFY4D4RH.js.map → chunk-BTTQZWYB.js.map} +0 -0
  90. /package/dist/{chunk-I6HCIQCQ.js.map → chunk-EBHHMJZX.js.map} +0 -0
  91. /package/dist/{chunk-7QDAGGOD.js.map → chunk-EJPQPU5J.js.map} +0 -0
  92. /package/dist/{chunk-EUXF2GJY.js.map → chunk-ES2NYGS2.js.map} +0 -0
  93. /package/dist/{chunk-X2F3AVGR.js.map → chunk-HXM35HRM.js.map} +0 -0
  94. /package/dist/{chunk-MZQ5PCLA.js.map → chunk-HY6ILQ4T.js.map} +0 -0
  95. /package/dist/{chunk-XVDASTUX.js.map → chunk-NIQEKVWY.js.map} +0 -0
  96. /package/dist/{chunk-7K5SJJUI.js.map → chunk-OKT5RCXP.js.map} +0 -0
  97. /package/dist/{chunk-HOXHUFZB.js.map → chunk-OS34M3FV.js.map} +0 -0
  98. /package/dist/{chunk-C3VCIEZS.js.map → chunk-PJZ4ZHQS.js.map} +0 -0
  99. /package/dist/{chunk-BOENB3IK.js.map → chunk-RS6BNRVF.js.map} +0 -0
  100. /package/dist/{chunk-HQWMWSSE.js.map → chunk-S4JD5FEE.js.map} +0 -0
  101. /package/dist/{chunk-KIXDJEGA.js.map → chunk-SH5Y7N4W.js.map} +0 -0
  102. /package/dist/{chunk-2FLVU2QW.js.map → chunk-SQOBKSP3.js.map} +0 -0
  103. /package/dist/{chunk-OAA7TNB6.js.map → chunk-TGN7K7VG.js.map} +0 -0
  104. /package/dist/{chunk-7ADEEHZQ.js.map → chunk-URVWZ5FM.js.map} +0 -0
  105. /package/dist/{chunk-BYD5B3P3.js.map → chunk-UVMCAZL7.js.map} +0 -0
  106. /package/dist/{chunk-ECCPLASB.js.map → chunk-ZVXKCXTP.js.map} +0 -0
  107. /package/dist/{client-UKLOVDZB.js.map → client-WFEXHCNH.js.map} +0 -0
  108. /package/dist/{config-WUDWHRT6.js.map → config-PPYPER75.js.map} +0 -0
  109. /package/dist/{config-mutator-UPLM7KGO.js.map → config-mutator-QQDBVKWM.js.map} +0 -0
  110. /package/dist/{doctor-COAIIKLV.js.map → doctor-NRKGBTVD.js.map} +0 -0
  111. /package/dist/{processes-TXEWMXXJ.js.map → processes-MMAVAZAC.js.map} +0 -0
  112. /package/dist/{promote-B7FGHUFA.js.map → promote-PY73YR6C.js.map} +0 -0
  113. /package/dist/{query-ZSVAGGSM.js.map → query-F3R5KXA7.js.map} +0 -0
  114. /package/dist/{registry-4DWWYWDR.js.map → registry-YBMYCRQH.js.map} +0 -0
  115. /package/dist/{request-planner-DSXXT75B.js.map → request-planner-CVNEV6NJ.js.map} +0 -0
  116. /package/dist/{review-candidates-34S6R3DJ.js.map → review-candidates-5QTF5JRG.js.map} +0 -0
  117. /package/dist/{routing-HWGNYIF3.js.map → routing-BJLETKHZ.js.map} +0 -0
  118. /package/dist/{schedule-tool-JLIS2GQU.js.map → schedule-tool-E2PRGDLW.js.map} +0 -0
  119. /package/dist/{scheduler-F6NRVZ7W.js.map → scheduler-53POJWDI.js.map} +0 -0
  120. /package/dist/{seat-OQZY3CW7.js.map → seat-OORCKWER.js.map} +0 -0
  121. /package/dist/{select-BBTWL7FN.js.map → select-OGMDS37Y.js.map} +0 -0
  122. /package/dist/{set-enabled-OC3YT4D4.js.map → set-enabled-IKSHTUUF.js.map} +0 -0
  123. /package/dist/{surface-usage-O5L4KLGS.js.map → surface-usage-CH3SHO77.js.map} +0 -0
  124. /package/dist/{tool-P4AHNZ5O.js.map → tool-6FVBXUTV.js.map} +0 -0
  125. /package/dist/{tool-R36FDI6E.js.map → tool-CKIO3NBX.js.map} +0 -0
  126. /package/dist/{wiki-5E4AGLKY.js.map → wiki-4CPXUAPW.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as tt,b as nt,c as rt,d as S,e as A,f as v}from"./chunk-72SZI2UW.js";import{a as Te,b as gt}from"./chunk-FX3D7YON.js";import{a as ne,b as We}from"./chunk-FCPTN6NF.js";import{o as we,p as He}from"./chunk-5MUJZODV.js";import{fa as Ze,ga as et}from"./chunk-54VYZE7A.js";import{a as ot,b as st,c as it,d as at,e as ct,f as ut,g as lt,h as dt,i as pt,j as mt,k as bt,l as ft}from"./chunk-RGDKHYY2.js";import{a as E,b as Ke,c as he}from"./chunk-QIJLFPWE.js";function R(e,t){$.set(e,t),X.delete(e)}function D(e){let t=X.get(e);if(t)return t;let r=$.get(e);if(!r){let o=Ee();throw new Error(`unknown decision backend "${e}"`+(o.length>0?` \u2014 registered: ${o.join(", ")}`:" \u2014 none registered"))}let n=r();return X.set(e,n),n}function Ee(){return[...$.keys()].sort()}function yt(){$.clear(),X.clear()}var $,X,C=E(()=>{"use strict";$=new Map,X=new Map});import ht from"better-sqlite3";import{createHash as wt}from"crypto";import{mkdirSync as Tt}from"fs";import{dirname as Et,resolve as kt}from"path";function Q(e){if(e.type==="noul"){let r=e.noul,n={yes:r,no:1-r},o=r>=.5?"yes":"no",s=Math.abs(r-.5)*2;return{predicted:o,confidence:s,probabilities:n,topLabel:o,topProb:Math.max(r,1-r),expectedScore:null,pMax:Math.max(r,1-r),negEntropy:s}}if(e.type==="choice")return{predicted:e.choice,confidence:e.confidence,probabilities:{...e.probabilities},topLabel:e.choice,topProb:e.probabilities[e.choice]??0,expectedScore:null,pMax:e.pMax,negEntropy:e.negEntropy};let t=String(Math.round(e.score));return{predicted:t,confidence:e.confidence,probabilities:{...e.probabilities},topLabel:t,topProb:e.probabilities[t]??0,expectedScore:e.score,pMax:e.pMax,negEntropy:e.negEntropy}}function xt(e){if(typeof e!="string"||e.length===0)return{};try{let t=JSON.parse(e);return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}catch{return{}}}function St(e){e.exec("CREATE TABLE IF NOT EXISTS schema_version (v INTEGER PRIMARY KEY);");let t=e.prepare("SELECT MAX(v) AS v FROM schema_version").get().v??0;t<1&&_t(e),t<2&&Rt(e),t<3&&At(e)}function At(e){e.exec(`
1
+ import{a as tt,b as nt,c as rt,d as S,e as A,f as v}from"./chunk-72SZI2UW.js";import{a as Te,b as gt}from"./chunk-FX3D7YON.js";import{a as ne,b as We}from"./chunk-FCPTN6NF.js";import{o as we,p as He}from"./chunk-5MUJZODV.js";import{ga as Ze,ha as et}from"./chunk-24P6UR3L.js";import{a as ot,b as st,c as it,d as at,e as ct,f as ut,g as lt,h as dt,i as pt,j as mt,k as bt,l as ft}from"./chunk-RGDKHYY2.js";import{a as E,b as Ke,c as he}from"./chunk-QIJLFPWE.js";function R(e,t){$.set(e,t),X.delete(e)}function D(e){let t=X.get(e);if(t)return t;let r=$.get(e);if(!r){let o=Ee();throw new Error(`unknown decision backend "${e}"`+(o.length>0?` \u2014 registered: ${o.join(", ")}`:" \u2014 none registered"))}let n=r();return X.set(e,n),n}function Ee(){return[...$.keys()].sort()}function yt(){$.clear(),X.clear()}var $,X,C=E(()=>{"use strict";$=new Map,X=new Map});import ht from"better-sqlite3";import{createHash as wt}from"crypto";import{mkdirSync as Tt}from"fs";import{dirname as Et,resolve as kt}from"path";function Q(e){if(e.type==="noul"){let r=e.noul,n={yes:r,no:1-r},o=r>=.5?"yes":"no",s=Math.abs(r-.5)*2;return{predicted:o,confidence:s,probabilities:n,topLabel:o,topProb:Math.max(r,1-r),expectedScore:null,pMax:Math.max(r,1-r),negEntropy:s}}if(e.type==="choice")return{predicted:e.choice,confidence:e.confidence,probabilities:{...e.probabilities},topLabel:e.choice,topProb:e.probabilities[e.choice]??0,expectedScore:null,pMax:e.pMax,negEntropy:e.negEntropy};let t=String(Math.round(e.score));return{predicted:t,confidence:e.confidence,probabilities:{...e.probabilities},topLabel:t,topProb:e.probabilities[t]??0,expectedScore:e.score,pMax:e.pMax,negEntropy:e.negEntropy}}function xt(e){if(typeof e!="string"||e.length===0)return{};try{let t=JSON.parse(e);return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}catch{return{}}}function St(e){e.exec("CREATE TABLE IF NOT EXISTS schema_version (v INTEGER PRIMARY KEY);");let t=e.prepare("SELECT MAX(v) AS v FROM schema_version").get().v??0;t<1&&_t(e),t<2&&Rt(e),t<3&&At(e)}function At(e){e.exec(`
2
2
  ALTER TABLE decision_calls ADD COLUMN features_json TEXT;
3
3
  INSERT INTO schema_version (v) VALUES (3);
4
4
  `)}function Rt(e){e.exec(`
@@ -111,4 +111,4 @@ import{a as tt,b as nt,c as rt,d as S,e as A,f as v}from"./chunk-72SZI2UW.js";im
111
111
  `)}if(!m)throw new Error(`local decision backend could not get a valid answer after ${f+1} attempt(s): ${h}`);let M={},L=!1;for(let[k,q]of Object.entries(s.questions)){let x=_(q,m[k],{normalize:e.normalizeProbabilities??!0});M[k]=x.answer,x.repaired&&(L=!0)}return{model:a,answers:M,usage:y,meta:{backend:"local",structureMode:c,answerMode:"probabilities",repaired:L,retries:f,stateTruncated:l.truncated,latencyMs:Date.now()-i}}}finally{b()}}}}async function Vt(e,t,r,n,o){if(!e.generateRaw)throw new Error(`provider "${e.name}" has no generateRaw(); use structureMode "text"`);let s=[{role:"user",content:r},...n?[{role:"user",content:n}]:[]],i=await e.generateRaw(s,J,[{name:U,description:"Report a probability distribution for every question.",input_schema:se(t)}],{...o,toolChoice:{type:"tool",name:U}}),a=i.content.find(c=>c.type==="tool_use"&&c.name===U),u=a&&a.type==="tool_use"?a.input:null;return{answers:Be(u),usage:{inputTokens:i.usage.input_tokens,outputTokens:i.usage.output_tokens}}}async function zt(e,t,r,n,o){let s=[r,ae(t)].join(`
112
112
  `),i=[{role:"system",content:J},{role:"user",content:s},...n?[{role:"user",content:n}]:[]],a=await e.generate(i,o);return{answers:Be(Te(a.content??"")),usage:{inputTokens:0,outputTokens:a.tokensUsed??0}}}function Be(e){if(e&&typeof e=="object"&&!Array.isArray(e)){let t=e;if(t.answers&&typeof t.answers=="object")return t.answers}return e}function Jt(e,t){return e!=="auto"?e:t.generateRaw&&me[t.name]?.structuredOutput?"tool":"text"}function Gt(e,t){let r=new AbortController,n=setTimeout(()=>r.abort(new Error(`decision timed out after ${t}ms`)),t),o=()=>r.abort(e?.reason);return e&&(e.aborted?o():e.addEventListener("abort",o,{once:!0})),{signal:r.signal,dispose:()=>{clearTimeout(n),e?.removeEventListener("abort",o)}}}var Bt,qt,Xt,Ue,$t,be=E(()=>{"use strict";He();Fe();gt();j();Y();v();z();Bt="claude-code",qt="claude-haiku-4-5-20251001",Xt=24e3,Ue=2e3,$t=3e4});import{readFileSync as Yt}from"fs";import{homedir as Kt}from"os";import{join as Ht}from"path";function N(e={}){let t=(e.baseUrl??Wt).replace(/\/+$/,""),r=e.path??"/classifier",n=e.name??"simple-jev",o=e.maxStateChars??en,s=e.maxChoiceOptions??tn,i={probabilitySource:e.probabilitySource??"logits",calibratedProbabilities:!1,maxChoiceOptions:s,maxStateChars:o,parallelQuestions:!0,images:!1};return{name:n,capabilities:i,async decide(a){A(a.questions),sn(a.questions,s);let u=Date.now(),c=a.model??e.model;if(!c)throw new Error("simple-jev backend needs a model id");let l=G(a.state,o),p=e.fetchImpl??fetch,{signal:g,dispose:d}=an(a.abortSignal,a.timeoutMs??e.timeoutMs??Zt);try{let b={"Content-Type":"application/json"},y=on(e.apiKeyEnv,e.apiKeyFile);y&&(b.Authorization=`Bearer ${y}`);let w=await qe(p(`${t}${r}`,{method:"POST",headers:b,body:JSON.stringify({model:c,state:l.text,questions:rn(a.questions)}),signal:g}),g);if(!w.ok){let k=await w.text().catch(()=>"");throw new Error(`${n} ${w.status}: ${k.slice(0,300)}`)}let f=await qe(w.json(),g),m=P(a.questions).safeParse(f.answers);if(!m.success)throw new Error(`${n} returned a response that does not match the requested questions (contract drift, not a model slip \u2014 retrying will not help):
113
113
  ${F(m.error)}`);let h=m.data,M={},L=!1;for(let[k,q]of Object.entries(a.questions)){let x=_(q,h[k]);M[k]=x.answer,x.repaired&&(L=!0)}return{model:f.model??c,answers:M,usage:{inputTokens:f.usage?.input_tokens??0,outputTokens:f.usage?.output_tokens??0},meta:{backend:n,structureMode:i.probabilitySource==="native"?"native":"logprobs",answerMode:"probabilities",repaired:L,retries:0,stateTruncated:l.truncated,latencyMs:Date.now()-u}}}finally{d()}}}}function rn(e){let t={};for(let[r,n]of Object.entries(e))t[r]=n.instructions?n:{...n,instructions:nn[n.type]};return t}function on(e,t){let r=e?process.env[e]:void 0;if(r)return r;if(!t)return;let n=t.startsWith("~/")?Ht(Kt(),t.slice(2)):t;if(!Z.has(n))try{let o=Yt(n,"utf-8").trim();Z.set(n,o.length>0?o:null)}catch{Z.set(n,null)}return Z.get(n)??void 0}function sn(e,t){for(let[r,n]of Object.entries(e))if(n.type==="choice"){let o=Object.keys(n.criteria).length;if(o>t)throw new Error(`question "${r}": accepts at most ${t} choice options, got ${o}`)}else if(n.type==="score"&&n.criteria.length>t)throw new Error(`question "${r}": accepts at most ${t} score levels, got ${n.criteria.length}`)}function qe(e,t){return t.aborted?Promise.reject(t.reason??new Error("aborted")):new Promise((r,n)=>{let o=()=>n(t.reason??new Error("aborted"));t.addEventListener("abort",o,{once:!0}),e.then(s=>{t.removeEventListener("abort",o),r(s)},s=>{t.removeEventListener("abort",o),n(s)})})}function an(e,t){let r=new AbortController,n=setTimeout(()=>r.abort(new Error(`decision timed out after ${t}ms`)),t),o=()=>r.abort(e?.reason);return e&&(e.aborted?o():e.addEventListener("abort",o,{once:!0})),{signal:r.signal,dispose:()=>{clearTimeout(n),e?.removeEventListener("abort",o)}}}var Wt,Zt,en,tn,nn,Z,fe=E(()=>{"use strict";j();v();z();Y();Wt="http://127.0.0.1:8000/v1",Zt=3e4,en=6e3,tn=50;nn={choice:"Which option best fits?",score:"Which level best fits?",noul:"Is this true of the state?"};Z=new Map});var Xe={};Ke(Xe,{DecisionStore:()=>I,MAX_CHOICE_OPTIONS:()=>MAX_CHOICE_OPTIONS,SYSTEM_PROMPT:()=>J,TOOL_NAME:()=>U,UNCERTAINTY_HIGH:()=>Ce,UNCERTAINTY_LOW:()=>De,_resetDecisionBackendsForTesting:()=>yt,agreement:()=>ot,answerView:()=>Q,applyRecalibrator:()=>ue,applyTemperature:()=>dt,askSeat:()=>mn,band:()=>Ie,bootstrapInterval:()=>mt,brier:()=>ct,buildDesign:()=>ve,calibrationReport:()=>bt,choice:()=>nt,compareCalibrators:()=>Dt,confidenceFor:()=>re,configureDecisions:()=>un,coverageCurve:()=>lt,createLocalDecisionBackend:()=>W,createMockDecisionBackend:()=>H,createSimpleJevBackend:()=>N,decisionsRuntime:()=>dn,describeIssues:()=>F,ece:()=>it,expectedScore:()=>Ae,finalizeAnswer:()=>_,fitLogistic:()=>Ne,fitRecalibrator:()=>B,fitTemperature:()=>pt,getDecisionBackend:()=>D,getSeatMode:()=>ze,labelsOf:()=>S,listDecisionBackends:()=>Ee,logLoss:()=>ut,logit:()=>le,mce:()=>at,measureConsistency:()=>jt,normalizeDistribution:()=>xe,normalizedNegEntropy:()=>oe,noul:()=>tt,pMax:()=>Se,parseSeatMode:()=>ge,rawAnswerSchema:()=>Re,rawAnswersSchema:()=>P,recordSeatOutcome:()=>pn,registerBuiltinDecisionBackends:()=>cn,registerDecisionBackend:()=>R,reliabilityBins:()=>st,renderQuestions:()=>_e,renderShapeInstructions:()=>ae,renderState:()=>G,renderUserPrompt:()=>ie,resetDecisionsRuntime:()=>ln,score:()=>rt,seatEnvVar:()=>Ve,sigmoid:()=>de,toolInputSchema:()=>se,validateQuestions:()=>A,withUid:()=>Qe});function cn(e={},t={},r={},n={}){R("mock",()=>H()),R("local",()=>W(e)),R("simple-jev",()=>N(t)),R("jev",()=>N({name:"jev",baseUrl:"https://openrouter.ai/api/alpha",path:"/decisions",model:"jev-latest",apiKeyEnv:"OPENROUTER_API_KEY",apiKeyFile:"~/.agentx/openrouter-key.txt",probabilitySource:"native",maxChoiceOptions:255,maxStateChars:9e4,...r})),R("typesafe",()=>N({name:"typesafe",baseUrl:"https://api.typesafe.ai/v1",path:"/systemone",model:"jev-latest",apiKeyEnv:"TYPESAFE_API_KEY",apiKeyFile:"~/.agentx/typesafe-key.txt",probabilitySource:"native",maxChoiceOptions:255,maxStateChars:9e4,...n}))}var $e=E(()=>{"use strict";ke();v();j();z();C();Y();V();ft();Me();je();Je();pe();be();fe();C();pe();be();fe()});function un(e){T={...ye,...T,...e},ee=!0}function ln(){T={...ye,seats:{}},ee=!1}function bn(){if(!ee){ee=!0;try{let{loadDaemonConfig:e}=(et(),he(Ze)),t=e()?.decisions;if(!t?.enabled)return;let{registerBuiltinDecisionBackends:r}=($e(),he(Xe)),n=t.backends??{};r(n.local,n.simpleJev,n.jev,n.typesafe);let o=null;try{o=new I({path:t.dbPath})}catch{}T={enabled:!0,defaultBackend:t.defaultBackend,store:o,seats:Object.fromEntries(Object.entries(t.seats??{}).map(([s,i])=>[s,{...i,redactState:t.redactState,keepStateRows:t.keepStateRows}]))}}catch{}}}function dn(){return T}function ge(e){if(typeof e!="string")return null;let t=e.trim().toLowerCase();return fn.includes(t)?t:null}function Ve(e){return`AGENTX_DECISION_SEAT_${e.toUpperCase().replace(/[^A-Z0-9]+/g,"_")}`}function ze(e,t=process.env){bn();let r=ge(t[Ve(e)]);return r||(T.enabled?ge(T.seats[e]?.mode)??"off":"off")}function pn(e,t,r=!1){if(!(!e||!T.store))try{T.store.recordOutcome(e,t,r)}catch{}}async function mn(e,t,r,n={}){let o=ze(e);if(o==="off")return null;let s=T.seats[e]??{mode:o},i=n.backend??s.backend??T.defaultBackend,a=Date.now();try{let c=await D(i).decide({state:t,questions:r,model:n.model??s.model,abortSignal:n.signal,timeoutMs:n.timeoutMs??s.timeoutMs}),l=gn(e,o,t,r,c,n,s);return{answers:c.answers,callId:l,mode:o}}catch(u){return yn(e,o,t,r,i,n,s,a,u),hn(e,i,u),null}}function gn(e,t,r,n,o,s,i){if(!T.store)return null;try{return T.store.recordCall({seat:e,mode:t,backend:o.meta.backend,model:o.model,meta:o.meta,state:r,questions:n,answers:o.answers,usage:o.usage,incumbent:Ye(s.incumbent),links:s.links,features:s.features,keepState:!i.redactState})}catch{return null}}function yn(e,t,r,n,o,s,i,a,u){if(T.store)try{T.store.recordCall({seat:e,mode:t,backend:o,model:s.model??i.model??"unknown",meta:{structureMode:"text",answerMode:"probabilities",retries:0,stateTruncated:!1,latencyMs:Date.now()-a},state:r,questions:n,answers:{},incumbent:Ye(s.incumbent),links:s.links,features:s.features,error:String(u?.message??u).slice(0,500),keepState:!i.redactState})}catch{}}function Ye(e){if(!e)return;let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]={value:n});return t}function hn(e,t,r){let n=Date.now();n-Ge<6e4||(Ge=n,console.warn(`[decisions] seat "${e}" on backend "${t}" failed: ${r?.message??r}`))}var ye,T,ee,fn,Ge,Je=E(()=>{C();V();ye={enabled:!1,defaultBackend:"local",seats:{},store:null},T={...ye},ee=!1;fn=["off","shadow","active"];Ge=0});export{D as a,Ee as b,C as c,I as d,V as e,Dt as f,Me as g,jt as h,je as i,me as j,Un as k,Fe as l,cn as m,$e as n,un as o,ln as p,dn as q,ge as r,Ve as s,ze as t,pn as u,mn as v,Je as w};
114
- //# sourceMappingURL=chunk-ECCPLASB.js.map
114
+ //# sourceMappingURL=chunk-ZVXKCXTP.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-QKXRASTV.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-7YKH5WTC.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-7K5SJJUI.js";import"./chunk-54VYZE7A.js";import"./chunk-PN6XHTG5.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-UKLOVDZB.js.map
1
+ import{a,b,c,d,e,f,g}from"./chunk-OKT5RCXP.js";import"./chunk-24P6UR3L.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-WFEXHCNH.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-24P6UR3L.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-PPYPER75.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b,c,d,e}from"./chunk-EBHHMJZX.js";import"./chunk-24P6UR3L.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-QQDBVKWM.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-EUXF2GJY.js";import"./chunk-S2GAEH2F.js";import"./chunk-JXF54PT7.js";import"./chunk-54VYZE7A.js";import"./chunk-PN6XHTG5.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-COAIIKLV.js.map
1
+ import{b as a,c as b,d as c,e as d,f as e}from"./chunk-ES2NYGS2.js";import"./chunk-S2GAEH2F.js";import"./chunk-JXF54PT7.js";import"./chunk-24P6UR3L.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-NRKGBTVD.js.map
package/dist/index.d.ts CHANGED
@@ -5156,6 +5156,10 @@ declare const daemonConfigSchema: z.ZodObject<{
5156
5156
  talk?: string | undefined;
5157
5157
  paste?: string | undefined;
5158
5158
  }>>;
5159
+ /** What shows the assistant's state in AgentX Voice: the "orb" at
5160
+ * the pill's head, or the "character", the orb grown into a small
5161
+ * creature that hovers above the bottom edge of the screen. */
5162
+ look: z.ZodDefault<z.ZodEnum<["orb", "character"]>>;
5159
5163
  /** The answer text AgentX Voice shows inside its pill. */
5160
5164
  card: z.ZodDefault<z.ZodObject<{
5161
5165
  /** Seconds the answer stays open once it has been spoken; 0 keeps
@@ -5188,6 +5192,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5188
5192
  talk: string;
5189
5193
  paste: string;
5190
5194
  };
5195
+ look: "orb" | "character";
5191
5196
  system?: string | Record<string, string> | undefined;
5192
5197
  listener?: string | undefined;
5193
5198
  }, {
@@ -5210,9 +5215,15 @@ declare const daemonConfigSchema: z.ZodObject<{
5210
5215
  talk?: string | undefined;
5211
5216
  paste?: string | undefined;
5212
5217
  } | undefined;
5218
+ look?: "orb" | "character" | undefined;
5213
5219
  }>>;
5214
5220
  business: z.ZodOptional<z.ZodObject<{
5215
5221
  enabled: z.ZodDefault<z.ZodBoolean>;
5222
+ /**
5223
+ * Canonical kind list — for autocomplete + doctor validation. Open string
5224
+ * schema so new services drop in without a bump; doctor warns when a kind
5225
+ * is outside this list.
5226
+ */
5216
5227
  timezone: z.ZodDefault<z.ZodString>;
5217
5228
  mainChannel: z.ZodObject<{
5218
5229
  channel: z.ZodString;
@@ -5279,7 +5290,9 @@ declare const daemonConfigSchema: z.ZodObject<{
5279
5290
  reportsTo: z.ZodOptional<z.ZodString>;
5280
5291
  schedule: z.ZodObject<{
5281
5292
  days: z.ZodDefault<z.ZodArray<z.ZodEnum<["mon", "tue", "wed", "thu", "fri", "sat", "sun"]>, "many">>;
5282
- start: z.ZodString;
5293
+ start: z.ZodString; /**
5294
+ * Load .env file into process.env (simple, no dependency).
5295
+ */
5283
5296
  end: z.ZodString;
5284
5297
  lunch: z.ZodOptional<z.ZodObject<{
5285
5298
  start: z.ZodString;
@@ -5569,7 +5582,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5569
5582
  name: string;
5570
5583
  description?: string | undefined;
5571
5584
  color?: string | undefined;
5572
- }>, "many">>;
5585
+ }>, "many">>; /** Service identifier — open string, well-known values in INTEGRATION_KINDS. */
5573
5586
  columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
5574
5587
  id: z.ZodString;
5575
5588
  title: z.ZodString;
@@ -6406,15 +6419,14 @@ declare const daemonConfigSchema: z.ZodObject<{
6406
6419
  * and cross-chat are replaced by planner-selected bundles. Per-task
6407
6420
  * overrides via AgentTask.contextStrategy for A/B benchmarking. */
6408
6421
  contextStrategy: z.ZodDefault<z.ZodEnum<["layered", "planner"]>>;
6409
- /** Soft dispatch budget for claude-code-tier agents (shared OAuth pools
6410
- * one counter across the fleet). Warms at 80% of the cap; short-circuits
6411
- * cold dispatches (no warm Claude session) when exceeded. Warm sessions
6412
- * are always allowed through. Defaults sized for Max 5×:
6413
- * - maxClaudeCodeDispatchesPerHour: 80 (headroom under typical hourly cap)
6414
- * - maxClaudeCodeDispatchesPer5h: 180 (headroom under ~225/5h tier)
6415
- * Raise for Max 20×, lower if your workload stays under the cap naturally. */
6416
- maxClaudeCodeDispatchesPerHour: z.ZodDefault<z.ZodNumber>;
6417
- maxClaudeCodeDispatchesPer5h: z.ZodDefault<z.ZodNumber>;
6422
+ /** Optional hard ceilings on new claude-code runs across the fleet (all
6423
+ * claude-code agents share one Claude subscription, so one counter).
6424
+ * The plan's own limit is read from Claude Code's rate_limit_event and
6425
+ * gates cold dispatches on its own; these caps sit on top for operators
6426
+ * who want a local ceiling. Unset or 0 = off. Warm sessions always go
6427
+ * through. Changing them applies on save, no restart. */
6428
+ maxClaudeCodeDispatchesPerHour: z.ZodOptional<z.ZodNumber>;
6429
+ maxClaudeCodeDispatchesPer5h: z.ZodOptional<z.ZodNumber>;
6418
6430
  /** How many requests BEFORE the immediate predecessor to show the
6419
6431
  * session-continuity seat. 0 keeps today's two-message state exactly.
6420
6432
  *
@@ -6431,9 +6443,9 @@ declare const daemonConfigSchema: z.ZodObject<{
6431
6443
  staleMinutes: number;
6432
6444
  maxTurnsPerSession: number;
6433
6445
  tierTwoThresholdTokens: number;
6434
- maxClaudeCodeDispatchesPerHour: number;
6435
- maxClaudeCodeDispatchesPer5h: number;
6436
6446
  continuityStateTurns: number;
6447
+ maxClaudeCodeDispatchesPerHour?: number | undefined;
6448
+ maxClaudeCodeDispatchesPer5h?: number | undefined;
6437
6449
  }, {
6438
6450
  contextStrategy?: "layered" | "planner" | undefined;
6439
6451
  staleMinutes?: number | undefined;
@@ -6625,6 +6637,7 @@ declare const daemonConfigSchema: z.ZodObject<{
6625
6637
  talk: string;
6626
6638
  paste: string;
6627
6639
  };
6640
+ look: "orb" | "character";
6628
6641
  system?: string | Record<string, string> | undefined;
6629
6642
  listener?: string | undefined;
6630
6643
  };
@@ -7159,9 +7172,9 @@ declare const daemonConfigSchema: z.ZodObject<{
7159
7172
  staleMinutes: number;
7160
7173
  maxTurnsPerSession: number;
7161
7174
  tierTwoThresholdTokens: number;
7162
- maxClaudeCodeDispatchesPerHour: number;
7163
- maxClaudeCodeDispatchesPer5h: number;
7164
7175
  continuityStateTurns: number;
7176
+ maxClaudeCodeDispatchesPerHour?: number | undefined;
7177
+ maxClaudeCodeDispatchesPer5h?: number | undefined;
7165
7178
  };
7166
7179
  plugins: string[];
7167
7180
  processPool: {
@@ -7391,6 +7404,7 @@ declare const daemonConfigSchema: z.ZodObject<{
7391
7404
  talk?: string | undefined;
7392
7405
  paste?: string | undefined;
7393
7406
  } | undefined;
7407
+ look?: "orb" | "character" | undefined;
7394
7408
  } | undefined;
7395
7409
  dashboard?: {
7396
7410
  enabled?: boolean | undefined;
@@ -8736,6 +8750,8 @@ declare class AgentXDaemon {
8736
8750
  /** Runs the previous daemon left in flight (agents/resume). */
8737
8751
  private interruptedRuns;
8738
8752
  private bootTimes;
8753
+ /** Every start on record with who stopped the one before (boot-record.ts). */
8754
+ private bootLog;
8739
8755
  /** Resume, report or skip each run the last restart cut off. Never throws. */
8740
8756
  private resumeInterruptedRuns;
8741
8757
  /**
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{a as St,b as kt,c as vt,ca as Tt,d as xt,da as Mt,e as $t,f as Ct,g as Pt,h as bt}from"./chunk-3CHAPGUX.js";import"./chunk-X2F3AVGR.js";import"./chunk-GTJIKXDB.js";import"./chunk-C3VCIEZS.js";import"./chunk-DWZYVYZS.js";import"./chunk-ZVP6GB4G.js";import"./chunk-S2GAEH2F.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-7QDAGGOD.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-ACFQBLPX.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-4L244AW4.js";import"./chunk-XIYWXCNU.js";import"./chunk-PPUN7YHA.js";import{V as yt,m as lt,n as ct,o as dt,p as mt,q as pt}from"./chunk-TNR7AI4H.js";import"./chunk-KIXDJEGA.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-XVDASTUX.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-BOENB3IK.js";import"./chunk-SZDACK6O.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-HQWMWSSE.js";import"./chunk-I6HCIQCQ.js";import"./chunk-VWTBHLMX.js";import"./chunk-N4HFUAPN.js";import{a as ht}from"./chunk-7OEFPYQJ.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-2FLVU2QW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-7ADEEHZQ.js";import{f as gt,g as ft}from"./chunk-HOXHUFZB.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-ECCPLASB.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-54VYZE7A.js";import"./chunk-PN6XHTG5.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,da as Tt,e as $t,ea as Mt,f as Ct,g as Pt,h as bt}from"./chunk-7RDNVR5I.js";import"./chunk-HXM35HRM.js";import"./chunk-GTJIKXDB.js";import"./chunk-PJZ4ZHQS.js";import"./chunk-3SZ4CU6G.js";import"./chunk-ZVP6GB4G.js";import"./chunk-S2GAEH2F.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-EJPQPU5J.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-ACFQBLPX.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-4L244AW4.js";import"./chunk-XIYWXCNU.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-4SHWIGTM.js";import"./chunk-SH5Y7N4W.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-NIQEKVWY.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-RS6BNRVF.js";import"./chunk-SZDACK6O.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-S4JD5FEE.js";import"./chunk-EBHHMJZX.js";import"./chunk-VWTBHLMX.js";import"./chunk-4TKGR3XF.js";import{a as ht}from"./chunk-AVA245WL.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-SQOBKSP3.js";import"./chunk-MYVHVJWZ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-URVWZ5FM.js";import{f as gt,g as ft}from"./chunk-OS34M3FV.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-ZVXKCXTP.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-24P6UR3L.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).
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-BTTQZWYB.js";import"./chunk-TGN7K7VG.js";import"./chunk-3SZ4CU6G.js";import"./chunk-QIJLFPWE.js";export{a as renderProcessesPage};
2
+ //# sourceMappingURL=processes-MMAVAZAC.js.map