agentix-cli 0.121.0 → 0.122.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 (114) hide show
  1. package/dist/{App-AMIGKAXO.js → App-2D5W26LY.js} +2 -2
  2. package/dist/{ChatApp-WMI4HQSY.js → ChatApp-FZFZD2XY.js} +2 -2
  3. package/dist/{agent-TQQOAVMU.js → agent-PCRE3TRK.js} +2 -2
  4. package/dist/{board-dashboard-FNMZAP7A.js → board-dashboard-ZDJ4UDW4.js} +264 -230
  5. package/dist/board-dashboard-ZDJ4UDW4.js.map +1 -0
  6. package/dist/{chunk-MORRCYJE.js → chunk-2UDSIG5K.js} +2 -2
  7. package/dist/{chunk-6FVFD5WU.js → chunk-54XX2LSW.js} +4 -4
  8. package/dist/{chunk-6FVFD5WU.js.map → chunk-54XX2LSW.js.map} +1 -1
  9. package/dist/{chunk-RMA7KKR7.js → chunk-5SLTRG66.js} +2 -2
  10. package/dist/chunk-7ZGTRXWS.js +4 -0
  11. package/dist/chunk-7ZGTRXWS.js.map +1 -0
  12. package/dist/{chunk-EI7D5V2L.js → chunk-BRVQZC6P.js} +2 -2
  13. package/dist/{chunk-6TUQHOO3.js → chunk-C52IPIKJ.js} +2 -2
  14. package/dist/chunk-DMPTCBX6.js +532 -0
  15. package/dist/chunk-DMPTCBX6.js.map +1 -0
  16. package/dist/{chunk-4GDLXWCH.js → chunk-EHKI2RKD.js} +2 -2
  17. package/dist/{chunk-CAS2IWSM.js → chunk-NFS2VR3L.js} +2 -2
  18. package/dist/{chunk-43CLFC4B.js → chunk-NYAMY7EA.js} +2 -2
  19. package/dist/{chunk-7ZABMMSW.js → chunk-QCPSGOSK.js} +2 -2
  20. package/dist/{chunk-BLEW5WQL.js → chunk-SB7WMFJV.js} +2 -2
  21. package/dist/{chunk-7KY7EEEI.js → chunk-TLCURHW3.js} +2 -2
  22. package/dist/{chunk-H5Z42X7W.js → chunk-TYFGL2YS.js} +2 -2
  23. package/dist/{chunk-I4IDZSGF.js → chunk-UVV6GUOG.js} +232 -228
  24. package/dist/chunk-UVV6GUOG.js.map +1 -0
  25. package/dist/{chunk-ELUEF4NC.js → chunk-WJDFR3WE.js} +2 -2
  26. package/dist/{chunk-IKBWV7YJ.js → chunk-XBRVV4ZT.js} +2 -2
  27. package/dist/{chunk-2NGXOYTS.js → chunk-XLCUHG3N.js} +69 -69
  28. package/dist/chunk-XLCUHG3N.js.map +1 -0
  29. package/dist/{chunk-2IMK3NGJ.js → chunk-XX6MLDTL.js} +2 -2
  30. package/dist/{chunk-PAWCJIPZ.js → chunk-YCMO3KZ4.js} +2 -2
  31. package/dist/{chunk-Y4PR5LR3.js → chunk-YUNMSLZN.js} +2 -2
  32. package/dist/{chunk-OPNZWQ6Y.js → chunk-ZLUROC2Y.js} +5 -5
  33. package/dist/chunk-ZLUROC2Y.js.map +1 -0
  34. package/dist/{chunk-25XR6QK2.js → chunk-ZWZADDXV.js} +2 -2
  35. package/dist/cli.js +1 -1
  36. package/dist/{client-ICDRAZBU.js → client-TFZEASIJ.js} +2 -2
  37. package/dist/config-IXCOAOPZ.js +2 -0
  38. package/dist/config-mutator-EPYIZVSG.js +2 -0
  39. package/dist/{doctor-LRTOOCM6.js → doctor-G5TM5GVF.js} +2 -2
  40. package/dist/{grants-ZMHSJMYE.js → grants-NGBKFONG.js} +2 -2
  41. package/dist/index.d.ts +161 -79
  42. package/dist/index.js +1 -1
  43. package/dist/{program-OKPC77BN.js → program-CGPPGRMR.js} +201 -199
  44. package/dist/program-CGPPGRMR.js.map +1 -0
  45. package/dist/{promote-4LW53AMH.js → promote-VTVIPRTC.js} +2 -2
  46. package/dist/{query-4OPS5PET.js → query-3CVDT2GZ.js} +2 -2
  47. package/dist/{registry-YHSHGJ4K.js → registry-NOJMMWE3.js} +2 -2
  48. package/dist/{request-planner-GDXSBNN4.js → request-planner-E2Q5O66N.js} +2 -2
  49. package/dist/{review-candidates-TUVDG2LR.js → review-candidates-I36HEYKX.js} +2 -2
  50. package/dist/{routing-OKDZ4VYH.js → routing-KBUZON5R.js} +2 -2
  51. package/dist/schedule-tool-GUHHYYTO.js +2 -0
  52. package/dist/scheduler-PGUELFMB.js +2 -0
  53. package/dist/{seat-K6FNHYMY.js → seat-NGY2BMP6.js} +2 -2
  54. package/dist/{select-QMJXHNUP.js → select-X7VBGZ6X.js} +2 -2
  55. package/dist/{set-enabled-I77LPL6Q.js → set-enabled-6NP63KCU.js} +2 -2
  56. package/dist/{tool-QTGNWXUA.js → tool-EZIILXYL.js} +2 -2
  57. package/dist/tool-WKIF52OH.js +6 -0
  58. package/dist/tool-WKIF52OH.js.map +1 -0
  59. package/dist/wiki-7BFVMMNR.js +2 -0
  60. package/package.json +1 -1
  61. package/dist/board-dashboard-FNMZAP7A.js.map +0 -1
  62. package/dist/chunk-2NGXOYTS.js.map +0 -1
  63. package/dist/chunk-BWHHZJNJ.js +0 -482
  64. package/dist/chunk-BWHHZJNJ.js.map +0 -1
  65. package/dist/chunk-DJQMG6TH.js +0 -4
  66. package/dist/chunk-DJQMG6TH.js.map +0 -1
  67. package/dist/chunk-I4IDZSGF.js.map +0 -1
  68. package/dist/chunk-OPNZWQ6Y.js.map +0 -1
  69. package/dist/config-K4UYPR7W.js +0 -2
  70. package/dist/config-mutator-IGA6D4S5.js +0 -2
  71. package/dist/program-OKPC77BN.js.map +0 -1
  72. package/dist/schedule-tool-MJLXMXN5.js +0 -2
  73. package/dist/scheduler-E5SASFAH.js +0 -2
  74. package/dist/tool-BQUKONSF.js +0 -4
  75. package/dist/tool-BQUKONSF.js.map +0 -1
  76. package/dist/wiki-F6EZBBUH.js +0 -2
  77. /package/dist/{App-AMIGKAXO.js.map → App-2D5W26LY.js.map} +0 -0
  78. /package/dist/{ChatApp-WMI4HQSY.js.map → ChatApp-FZFZD2XY.js.map} +0 -0
  79. /package/dist/{agent-TQQOAVMU.js.map → agent-PCRE3TRK.js.map} +0 -0
  80. /package/dist/{chunk-MORRCYJE.js.map → chunk-2UDSIG5K.js.map} +0 -0
  81. /package/dist/{chunk-RMA7KKR7.js.map → chunk-5SLTRG66.js.map} +0 -0
  82. /package/dist/{chunk-EI7D5V2L.js.map → chunk-BRVQZC6P.js.map} +0 -0
  83. /package/dist/{chunk-6TUQHOO3.js.map → chunk-C52IPIKJ.js.map} +0 -0
  84. /package/dist/{chunk-4GDLXWCH.js.map → chunk-EHKI2RKD.js.map} +0 -0
  85. /package/dist/{chunk-CAS2IWSM.js.map → chunk-NFS2VR3L.js.map} +0 -0
  86. /package/dist/{chunk-43CLFC4B.js.map → chunk-NYAMY7EA.js.map} +0 -0
  87. /package/dist/{chunk-7ZABMMSW.js.map → chunk-QCPSGOSK.js.map} +0 -0
  88. /package/dist/{chunk-BLEW5WQL.js.map → chunk-SB7WMFJV.js.map} +0 -0
  89. /package/dist/{chunk-7KY7EEEI.js.map → chunk-TLCURHW3.js.map} +0 -0
  90. /package/dist/{chunk-H5Z42X7W.js.map → chunk-TYFGL2YS.js.map} +0 -0
  91. /package/dist/{chunk-ELUEF4NC.js.map → chunk-WJDFR3WE.js.map} +0 -0
  92. /package/dist/{chunk-IKBWV7YJ.js.map → chunk-XBRVV4ZT.js.map} +0 -0
  93. /package/dist/{chunk-2IMK3NGJ.js.map → chunk-XX6MLDTL.js.map} +0 -0
  94. /package/dist/{chunk-PAWCJIPZ.js.map → chunk-YCMO3KZ4.js.map} +0 -0
  95. /package/dist/{chunk-Y4PR5LR3.js.map → chunk-YUNMSLZN.js.map} +0 -0
  96. /package/dist/{chunk-25XR6QK2.js.map → chunk-ZWZADDXV.js.map} +0 -0
  97. /package/dist/{client-ICDRAZBU.js.map → client-TFZEASIJ.js.map} +0 -0
  98. /package/dist/{config-K4UYPR7W.js.map → config-IXCOAOPZ.js.map} +0 -0
  99. /package/dist/{config-mutator-IGA6D4S5.js.map → config-mutator-EPYIZVSG.js.map} +0 -0
  100. /package/dist/{doctor-LRTOOCM6.js.map → doctor-G5TM5GVF.js.map} +0 -0
  101. /package/dist/{grants-ZMHSJMYE.js.map → grants-NGBKFONG.js.map} +0 -0
  102. /package/dist/{promote-4LW53AMH.js.map → promote-VTVIPRTC.js.map} +0 -0
  103. /package/dist/{query-4OPS5PET.js.map → query-3CVDT2GZ.js.map} +0 -0
  104. /package/dist/{registry-YHSHGJ4K.js.map → registry-NOJMMWE3.js.map} +0 -0
  105. /package/dist/{request-planner-GDXSBNN4.js.map → request-planner-E2Q5O66N.js.map} +0 -0
  106. /package/dist/{review-candidates-TUVDG2LR.js.map → review-candidates-I36HEYKX.js.map} +0 -0
  107. /package/dist/{routing-OKDZ4VYH.js.map → routing-KBUZON5R.js.map} +0 -0
  108. /package/dist/{schedule-tool-MJLXMXN5.js.map → schedule-tool-GUHHYYTO.js.map} +0 -0
  109. /package/dist/{scheduler-E5SASFAH.js.map → scheduler-PGUELFMB.js.map} +0 -0
  110. /package/dist/{seat-K6FNHYMY.js.map → seat-NGY2BMP6.js.map} +0 -0
  111. /package/dist/{select-QMJXHNUP.js.map → select-X7VBGZ6X.js.map} +0 -0
  112. /package/dist/{set-enabled-I77LPL6Q.js.map → set-enabled-6NP63KCU.js.map} +0 -0
  113. /package/dist/{tool-QTGNWXUA.js.map → tool-EZIILXYL.js.map} +0 -0
  114. /package/dist/{wiki-F6EZBBUH.js.map → wiki-7BFVMMNR.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{b as S,c as O}from"./chunk-2IMK3NGJ.js";import{a as I,b as X}from"./chunk-FCPTN6NF.js";import{a as F,b as ae}from"./chunk-7I7IEX4S.js";import{d as M}from"./chunk-QIJLFPWE.js";import{execFile as $e}from"child_process";import{writeFileSync as ee,mkdirSync as A,existsSync as b,readFileSync as we}from"fs";import{resolve as v}from"path";var ce=["off","shadow","authoritative"],de={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"},ue="INTENT_LEDGER_MODE";function B(n,e=process.env){let t=P(e[de[n]]);if(t)return t;let i=P(e[ue]);return i||"off"}function P(n){if(typeof n!="string")return null;let e=n.trim().toLowerCase();return ce.includes(e)?e:null}X();import le from"better-sqlite3";import{existsSync as Pe,mkdirSync as ge}from"fs";import{dirname as me,resolve as he}from"path";var T=class{db;path;constructor(e={}){this.path=he(process.cwd(),e.path??".agentx/intent/ledger.sqlite"),ge(me(this.path),{recursive:!0}),this.db=new le(this.path),this.db.pragma("journal_mode = WAL"),this.db.pragma("synchronous = NORMAL"),this.db.pragma("foreign_keys = ON"),Ee(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 i=this.findEventBySourceId(e.source,e.sourceEventId);if(i)return i}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)
1
+ import{b as S,c as O}from"./chunk-XX6MLDTL.js";import{a as I,b as X}from"./chunk-FCPTN6NF.js";import{a as F,b as ae}from"./chunk-7I7IEX4S.js";import{d as M}from"./chunk-QIJLFPWE.js";import{execFile as $e}from"child_process";import{writeFileSync as ee,mkdirSync as A,existsSync as b,readFileSync as we}from"fs";import{resolve as v}from"path";var ce=["off","shadow","authoritative"],de={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"},ue="INTENT_LEDGER_MODE";function B(n,e=process.env){let t=P(e[de[n]]);if(t)return t;let i=P(e[ue]);return i||"off"}function P(n){if(typeof n!="string")return null;let e=n.trim().toLowerCase();return ce.includes(e)?e:null}X();import le from"better-sqlite3";import{existsSync as Pe,mkdirSync as ge}from"fs";import{dirname as me,resolve as he}from"path";var T=class{db;path;constructor(e={}){this.path=he(process.cwd(),e.path??".agentx/intent/ledger.sqlite"),ge(me(this.path),{recursive:!0}),this.db=new le(this.path),this.db.pragma("journal_mode = WAL"),this.db.pragma("synchronous = NORMAL"),this.db.pragma("foreign_keys = ON"),Ee(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 i=this.findEventBySourceId(e.source,e.sourceEventId);if(i)return i}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 i=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 i?U(i):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?U(t):null}recordDecision(e){this.db.prepare(`INSERT INTO intent_decisions (event_id, decided_at, decided_by, agent_id, outcome, reason)
@@ -123,4 +123,4 @@ ${r.prompt}`,r.maxOutputTokens),agentId:r.agent,autonomy:r.autonomy,timeoutMinut
123
123
  `);return t.length<=e?t.join(`
124
124
  `):t.slice(-e).join(`
125
125
  `)}function Ce(n,e,t){return new Promise((i,r)=>{$e("/bin/sh",["-c",n],{timeout:e,maxBuffer:8*1024*1024,...t?{env:t}:{}},(s,a,o)=>{if(s&&s.killed){r(new Error(`command timed out after ${Math.round(e/1e3)}s`));return}i({stdout:String(a??""),stderr:String(o??""),code:s?typeof s.code=="number"?s.code:1:0})})})}export{T as a,G as b,it as c,Ne as d,rt as e,st as f,$ as g,Q as h,B as i,Ve as j,H as k,K as l,ct as m,Ae as n,ne as o,ie as p,re as q,se as r,C as s};
126
- //# sourceMappingURL=chunk-25XR6QK2.js.map
126
+ //# sourceMappingURL=chunk-ZWZADDXV.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-OKPC77BN.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-CGPPGRMR.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-EI7D5V2L.js";import"./chunk-OPNZWQ6Y.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.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-ICDRAZBU.js.map
1
+ import{a,b,c,d,e,f,g}from"./chunk-BRVQZC6P.js";import"./chunk-ZLUROC2Y.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.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-TFZEASIJ.js.map
@@ -0,0 +1,2 @@
1
+ import{$ as b,_ as a,aa as c,ba as d,ca as e,da as f,ea as g,fa as h,ga as i,ha as j,ia as k,ja as l,ka as m,la as n,na as o}from"./chunk-ZLUROC2Y.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.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-IXCOAOPZ.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b,c,d,e}from"./chunk-XX6MLDTL.js";import"./chunk-ZLUROC2Y.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.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-EPYIZVSG.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-43CLFC4B.js";import"./chunk-S2GAEH2F.js";import"./chunk-JXF54PT7.js";import"./chunk-OPNZWQ6Y.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.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-LRTOOCM6.js.map
1
+ import{b as a,c as b,d as c,e as d,f as e}from"./chunk-NYAMY7EA.js";import"./chunk-S2GAEH2F.js";import"./chunk-JXF54PT7.js";import"./chunk-ZLUROC2Y.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.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-G5TM5GVF.js.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"./chunk-7ZABMMSW.js";import"./chunk-6FVFD5WU.js";import"./chunk-Y4CYQV7G.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{c as DEFAULT_GRANT_DAYS,a as GUEST_SCOPE_PREFIX,b as JOIN_CARD_BY,h as JOIN_FAILED,d as MAX_GRANT_DAYS,j as NO_GRANT,l as PAUSED,k as WAITING_HOST,s as endGrant,o as grantBrief,u as grantForGuest,e as grantIdOf,n as guestAccess,p as guestTask,g as inviteGuest,i as joinGuest,f as newGrantId,q as pauseGrant,r as resumeGrant,m as settleGrant,t as updateGrant};
2
- //# sourceMappingURL=grants-ZMHSJMYE.js.map
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"./chunk-QCPSGOSK.js";import"./chunk-54XX2LSW.js";import"./chunk-Y4CYQV7G.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{c as DEFAULT_GRANT_DAYS,a as GUEST_SCOPE_PREFIX,b as JOIN_CARD_BY,h as JOIN_FAILED,d as MAX_GRANT_DAYS,j as NO_GRANT,l as PAUSED,k as WAITING_HOST,s as endGrant,o as grantBrief,u as grantForGuest,e as grantIdOf,n as guestAccess,p as guestTask,g as inviteGuest,i as joinGuest,f as newGrantId,q as pauseGrant,r as resumeGrant,m as settleGrant,t as updateGrant};
2
+ //# sourceMappingURL=grants-NGBKFONG.js.map
package/dist/index.d.ts CHANGED
@@ -2152,16 +2152,16 @@ declare const cronJobSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
2152
2152
  chatId: string;
2153
2153
  accountId?: string | undefined;
2154
2154
  } | undefined;
2155
- maxOutputTokens?: number | undefined;
2156
- autonomy?: "report" | "propose" | "act" | undefined;
2157
- deliverResult?: boolean | undefined;
2158
- fireToken?: string | undefined;
2159
- createdBy?: string | undefined;
2160
2155
  approval?: {
2161
2156
  action: "delete" | "create";
2162
2157
  requestedBy: string;
2163
2158
  requestedAt: string;
2164
2159
  } | undefined;
2160
+ maxOutputTokens?: number | undefined;
2161
+ autonomy?: "report" | "propose" | "act" | undefined;
2162
+ deliverResult?: boolean | undefined;
2163
+ fireToken?: string | undefined;
2164
+ createdBy?: string | undefined;
2165
2165
  }, {
2166
2166
  agent: string;
2167
2167
  schedule: string;
@@ -2176,17 +2176,17 @@ declare const cronJobSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
2176
2176
  chatId: string;
2177
2177
  accountId?: string | undefined;
2178
2178
  } | undefined;
2179
+ approval?: {
2180
+ action: "delete" | "create";
2181
+ requestedBy: string;
2182
+ requestedAt: string;
2183
+ } | undefined;
2179
2184
  maxOutputTokens?: number | undefined;
2180
2185
  autonomy?: "report" | "propose" | "act" | undefined;
2181
2186
  onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
2182
2187
  deliverResult?: boolean | undefined;
2183
2188
  fireToken?: string | undefined;
2184
2189
  createdBy?: string | undefined;
2185
- approval?: {
2186
- action: "delete" | "create";
2187
- requestedBy: string;
2188
- requestedAt: string;
2189
- } | undefined;
2190
2190
  }>, {
2191
2191
  enabled: boolean;
2192
2192
  agent: string;
@@ -2202,16 +2202,16 @@ declare const cronJobSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
2202
2202
  chatId: string;
2203
2203
  accountId?: string | undefined;
2204
2204
  } | undefined;
2205
- maxOutputTokens?: number | undefined;
2206
- autonomy?: "report" | "propose" | "act" | undefined;
2207
- deliverResult?: boolean | undefined;
2208
- fireToken?: string | undefined;
2209
- createdBy?: string | undefined;
2210
2205
  approval?: {
2211
2206
  action: "delete" | "create";
2212
2207
  requestedBy: string;
2213
2208
  requestedAt: string;
2214
2209
  } | undefined;
2210
+ maxOutputTokens?: number | undefined;
2211
+ autonomy?: "report" | "propose" | "act" | undefined;
2212
+ deliverResult?: boolean | undefined;
2213
+ fireToken?: string | undefined;
2214
+ createdBy?: string | undefined;
2215
2215
  }, {
2216
2216
  agent: string;
2217
2217
  schedule: string;
@@ -2226,17 +2226,17 @@ declare const cronJobSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
2226
2226
  chatId: string;
2227
2227
  accountId?: string | undefined;
2228
2228
  } | undefined;
2229
+ approval?: {
2230
+ action: "delete" | "create";
2231
+ requestedBy: string;
2232
+ requestedAt: string;
2233
+ } | undefined;
2229
2234
  maxOutputTokens?: number | undefined;
2230
2235
  autonomy?: "report" | "propose" | "act" | undefined;
2231
2236
  onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
2232
2237
  deliverResult?: boolean | undefined;
2233
2238
  fireToken?: string | undefined;
2234
2239
  createdBy?: string | undefined;
2235
- approval?: {
2236
- action: "delete" | "create";
2237
- requestedBy: string;
2238
- requestedAt: string;
2239
- } | undefined;
2240
2240
  }>, {
2241
2241
  enabled: boolean;
2242
2242
  agent: string;
@@ -2252,16 +2252,16 @@ declare const cronJobSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
2252
2252
  chatId: string;
2253
2253
  accountId?: string | undefined;
2254
2254
  } | undefined;
2255
- maxOutputTokens?: number | undefined;
2256
- autonomy?: "report" | "propose" | "act" | undefined;
2257
- deliverResult?: boolean | undefined;
2258
- fireToken?: string | undefined;
2259
- createdBy?: string | undefined;
2260
2255
  approval?: {
2261
2256
  action: "delete" | "create";
2262
2257
  requestedBy: string;
2263
2258
  requestedAt: string;
2264
2259
  } | undefined;
2260
+ maxOutputTokens?: number | undefined;
2261
+ autonomy?: "report" | "propose" | "act" | undefined;
2262
+ deliverResult?: boolean | undefined;
2263
+ fireToken?: string | undefined;
2264
+ createdBy?: string | undefined;
2265
2265
  }, {
2266
2266
  agent: string;
2267
2267
  schedule: string;
@@ -2276,17 +2276,17 @@ declare const cronJobSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
2276
2276
  chatId: string;
2277
2277
  accountId?: string | undefined;
2278
2278
  } | undefined;
2279
+ approval?: {
2280
+ action: "delete" | "create";
2281
+ requestedBy: string;
2282
+ requestedAt: string;
2283
+ } | undefined;
2279
2284
  maxOutputTokens?: number | undefined;
2280
2285
  autonomy?: "report" | "propose" | "act" | undefined;
2281
2286
  onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
2282
2287
  deliverResult?: boolean | undefined;
2283
2288
  fireToken?: string | undefined;
2284
2289
  createdBy?: string | undefined;
2285
- approval?: {
2286
- action: "delete" | "create";
2287
- requestedBy: string;
2288
- requestedAt: string;
2289
- } | undefined;
2290
2290
  }>;
2291
2291
  declare const meshPeerSchema: z.ZodObject<{
2292
2292
  url: z.ZodString;
@@ -4091,16 +4091,16 @@ declare const daemonConfigSchema: z.ZodObject<{
4091
4091
  chatId: string;
4092
4092
  accountId?: string | undefined;
4093
4093
  } | undefined;
4094
- maxOutputTokens?: number | undefined;
4095
- autonomy?: "report" | "propose" | "act" | undefined;
4096
- deliverResult?: boolean | undefined;
4097
- fireToken?: string | undefined;
4098
- createdBy?: string | undefined;
4099
4094
  approval?: {
4100
4095
  action: "delete" | "create";
4101
4096
  requestedBy: string;
4102
4097
  requestedAt: string;
4103
4098
  } | undefined;
4099
+ maxOutputTokens?: number | undefined;
4100
+ autonomy?: "report" | "propose" | "act" | undefined;
4101
+ deliverResult?: boolean | undefined;
4102
+ fireToken?: string | undefined;
4103
+ createdBy?: string | undefined;
4104
4104
  }, {
4105
4105
  agent: string;
4106
4106
  schedule: string;
@@ -4115,17 +4115,17 @@ declare const daemonConfigSchema: z.ZodObject<{
4115
4115
  chatId: string;
4116
4116
  accountId?: string | undefined;
4117
4117
  } | undefined;
4118
+ approval?: {
4119
+ action: "delete" | "create";
4120
+ requestedBy: string;
4121
+ requestedAt: string;
4122
+ } | undefined;
4118
4123
  maxOutputTokens?: number | undefined;
4119
4124
  autonomy?: "report" | "propose" | "act" | undefined;
4120
4125
  onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
4121
4126
  deliverResult?: boolean | undefined;
4122
4127
  fireToken?: string | undefined;
4123
4128
  createdBy?: string | undefined;
4124
- approval?: {
4125
- action: "delete" | "create";
4126
- requestedBy: string;
4127
- requestedAt: string;
4128
- } | undefined;
4129
4129
  }>, {
4130
4130
  enabled: boolean;
4131
4131
  agent: string;
@@ -4141,16 +4141,16 @@ declare const daemonConfigSchema: z.ZodObject<{
4141
4141
  chatId: string;
4142
4142
  accountId?: string | undefined;
4143
4143
  } | undefined;
4144
- maxOutputTokens?: number | undefined;
4145
- autonomy?: "report" | "propose" | "act" | undefined;
4146
- deliverResult?: boolean | undefined;
4147
- fireToken?: string | undefined;
4148
- createdBy?: string | undefined;
4149
4144
  approval?: {
4150
4145
  action: "delete" | "create";
4151
4146
  requestedBy: string;
4152
4147
  requestedAt: string;
4153
4148
  } | undefined;
4149
+ maxOutputTokens?: number | undefined;
4150
+ autonomy?: "report" | "propose" | "act" | undefined;
4151
+ deliverResult?: boolean | undefined;
4152
+ fireToken?: string | undefined;
4153
+ createdBy?: string | undefined;
4154
4154
  }, {
4155
4155
  agent: string;
4156
4156
  schedule: string;
@@ -4165,17 +4165,17 @@ declare const daemonConfigSchema: z.ZodObject<{
4165
4165
  chatId: string;
4166
4166
  accountId?: string | undefined;
4167
4167
  } | undefined;
4168
+ approval?: {
4169
+ action: "delete" | "create";
4170
+ requestedBy: string;
4171
+ requestedAt: string;
4172
+ } | undefined;
4168
4173
  maxOutputTokens?: number | undefined;
4169
4174
  autonomy?: "report" | "propose" | "act" | undefined;
4170
4175
  onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
4171
4176
  deliverResult?: boolean | undefined;
4172
4177
  fireToken?: string | undefined;
4173
4178
  createdBy?: string | undefined;
4174
- approval?: {
4175
- action: "delete" | "create";
4176
- requestedBy: string;
4177
- requestedAt: string;
4178
- } | undefined;
4179
4179
  }>, {
4180
4180
  enabled: boolean;
4181
4181
  agent: string;
@@ -4191,16 +4191,16 @@ declare const daemonConfigSchema: z.ZodObject<{
4191
4191
  chatId: string;
4192
4192
  accountId?: string | undefined;
4193
4193
  } | undefined;
4194
- maxOutputTokens?: number | undefined;
4195
- autonomy?: "report" | "propose" | "act" | undefined;
4196
- deliverResult?: boolean | undefined;
4197
- fireToken?: string | undefined;
4198
- createdBy?: string | undefined;
4199
4194
  approval?: {
4200
4195
  action: "delete" | "create";
4201
4196
  requestedBy: string;
4202
4197
  requestedAt: string;
4203
4198
  } | undefined;
4199
+ maxOutputTokens?: number | undefined;
4200
+ autonomy?: "report" | "propose" | "act" | undefined;
4201
+ deliverResult?: boolean | undefined;
4202
+ fireToken?: string | undefined;
4203
+ createdBy?: string | undefined;
4204
4204
  }, {
4205
4205
  agent: string;
4206
4206
  schedule: string;
@@ -4215,17 +4215,17 @@ declare const daemonConfigSchema: z.ZodObject<{
4215
4215
  chatId: string;
4216
4216
  accountId?: string | undefined;
4217
4217
  } | undefined;
4218
+ approval?: {
4219
+ action: "delete" | "create";
4220
+ requestedBy: string;
4221
+ requestedAt: string;
4222
+ } | undefined;
4218
4223
  maxOutputTokens?: number | undefined;
4219
4224
  autonomy?: "report" | "propose" | "act" | undefined;
4220
4225
  onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
4221
4226
  deliverResult?: boolean | undefined;
4222
4227
  fireToken?: string | undefined;
4223
4228
  createdBy?: string | undefined;
4224
- approval?: {
4225
- action: "delete" | "create";
4226
- requestedBy: string;
4227
- requestedAt: string;
4228
- } | undefined;
4229
4229
  }>>>;
4230
4230
  services: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4231
4231
  name: z.ZodString;
@@ -4889,18 +4889,59 @@ declare const daemonConfigSchema: z.ZodObject<{
4889
4889
  staleAfterHours: z.ZodDefault<z.ZodNumber>;
4890
4890
  /** Closed requests are deleted after this many days. Open ones never are. */
4891
4891
  retentionDays: z.ZodDefault<z.ZodNumber>;
4892
+ /** Tracked plans (src/requests/plans.ts, #788): a request with two or
4893
+ * more steps, each with an owner agent, followed until every step is
4894
+ * done. Needs `enabled` above. */
4895
+ plans: z.ZodDefault<z.ZodObject<{
4896
+ enabled: z.ZodDefault<z.ZodBoolean>;
4897
+ /** A step with no progress for this long gets a nudge. */
4898
+ stallMinutes: z.ZodDefault<z.ZodNumber>;
4899
+ /** Nudges per step before it counts as blocked and the owner is told. */
4900
+ maxNudges: z.ZodDefault<z.ZodNumber>;
4901
+ /** Step kinds the owner approves once, when the plan is made. A
4902
+ * "message" step is then sent without asking again. */
4903
+ approveKinds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4904
+ /** Agents that may not open a plan. */
4905
+ disabledAgents: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4906
+ }, "strip", z.ZodTypeAny, {
4907
+ enabled: boolean;
4908
+ stallMinutes: number;
4909
+ maxNudges: number;
4910
+ approveKinds: string[];
4911
+ disabledAgents: string[];
4912
+ }, {
4913
+ enabled?: boolean | undefined;
4914
+ stallMinutes?: number | undefined;
4915
+ maxNudges?: number | undefined;
4916
+ approveKinds?: string[] | undefined;
4917
+ disabledAgents?: string[] | undefined;
4918
+ }>>;
4892
4919
  }, "strip", z.ZodTypeAny, {
4893
4920
  enabled: boolean;
4894
4921
  from: string[];
4895
4922
  channels: string[];
4896
4923
  staleAfterHours: number;
4897
4924
  retentionDays: number;
4925
+ plans: {
4926
+ enabled: boolean;
4927
+ stallMinutes: number;
4928
+ maxNudges: number;
4929
+ approveKinds: string[];
4930
+ disabledAgents: string[];
4931
+ };
4898
4932
  }, {
4899
4933
  enabled?: boolean | undefined;
4900
4934
  from?: string[] | undefined;
4901
4935
  channels?: string[] | undefined;
4902
4936
  staleAfterHours?: number | undefined;
4903
4937
  retentionDays?: number | undefined;
4938
+ plans?: {
4939
+ enabled?: boolean | undefined;
4940
+ stallMinutes?: number | undefined;
4941
+ maxNudges?: number | undefined;
4942
+ approveKinds?: string[] | undefined;
4943
+ disabledAgents?: string[] | undefined;
4944
+ } | undefined;
4904
4945
  }>>;
4905
4946
  people: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
4906
4947
  id: z.ZodString;
@@ -7341,6 +7382,13 @@ declare const daemonConfigSchema: z.ZodObject<{
7341
7382
  channels: string[];
7342
7383
  staleAfterHours: number;
7343
7384
  retentionDays: number;
7385
+ plans: {
7386
+ enabled: boolean;
7387
+ stallMinutes: number;
7388
+ maxNudges: number;
7389
+ approveKinds: string[];
7390
+ disabledAgents: string[];
7391
+ };
7344
7392
  };
7345
7393
  channels: {
7346
7394
  push: {
@@ -7555,16 +7603,16 @@ declare const daemonConfigSchema: z.ZodObject<{
7555
7603
  chatId: string;
7556
7604
  accountId?: string | undefined;
7557
7605
  } | undefined;
7558
- maxOutputTokens?: number | undefined;
7559
- autonomy?: "report" | "propose" | "act" | undefined;
7560
- deliverResult?: boolean | undefined;
7561
- fireToken?: string | undefined;
7562
- createdBy?: string | undefined;
7563
7606
  approval?: {
7564
7607
  action: "delete" | "create";
7565
7608
  requestedBy: string;
7566
7609
  requestedAt: string;
7567
7610
  } | undefined;
7611
+ maxOutputTokens?: number | undefined;
7612
+ autonomy?: "report" | "propose" | "act" | undefined;
7613
+ deliverResult?: boolean | undefined;
7614
+ fireToken?: string | undefined;
7615
+ createdBy?: string | undefined;
7568
7616
  }>;
7569
7617
  services: Record<string, {
7570
7618
  agent: string;
@@ -8258,6 +8306,13 @@ declare const daemonConfigSchema: z.ZodObject<{
8258
8306
  channels?: string[] | undefined;
8259
8307
  staleAfterHours?: number | undefined;
8260
8308
  retentionDays?: number | undefined;
8309
+ plans?: {
8310
+ enabled?: boolean | undefined;
8311
+ stallMinutes?: number | undefined;
8312
+ maxNudges?: number | undefined;
8313
+ approveKinds?: string[] | undefined;
8314
+ disabledAgents?: string[] | undefined;
8315
+ } | undefined;
8261
8316
  } | undefined;
8262
8317
  channels?: {
8263
8318
  push?: {
@@ -8465,17 +8520,17 @@ declare const daemonConfigSchema: z.ZodObject<{
8465
8520
  chatId: string;
8466
8521
  accountId?: string | undefined;
8467
8522
  } | undefined;
8523
+ approval?: {
8524
+ action: "delete" | "create";
8525
+ requestedBy: string;
8526
+ requestedAt: string;
8527
+ } | undefined;
8468
8528
  maxOutputTokens?: number | undefined;
8469
8529
  autonomy?: "report" | "propose" | "act" | undefined;
8470
8530
  onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
8471
8531
  deliverResult?: boolean | undefined;
8472
8532
  fireToken?: string | undefined;
8473
8533
  createdBy?: string | undefined;
8474
- approval?: {
8475
- action: "delete" | "create";
8476
- requestedBy: string;
8477
- requestedAt: string;
8478
- } | undefined;
8479
8534
  }> | undefined;
8480
8535
  services?: Record<string, {
8481
8536
  agent: string;
@@ -9652,8 +9707,20 @@ declare class AgentXDaemon {
9652
9707
  * checkMeshAuth, loopback is not enough: agents on this node reach
9653
9708
  * loopback themselves, and a card result must come from a peer. */
9654
9709
  private carriesMeshToken;
9710
+ /** Tell the owner about a request: a push, and the Mac banner. */
9711
+ private notifyRequestOwner;
9712
+ private plansSweeping;
9713
+ private plansKick?;
9714
+ /** A plan was made or a step moved: follow it in a second rather than
9715
+ * at the next minute's check. */
9716
+ private kickPlans;
9717
+ /** Tracked plans move on: steps handed over, quiet ones nudged,
9718
+ * approved messages sent, the owner told at the end or on a block
9719
+ * (src/requests/plan-sweep.ts, #788). One check at a time. */
9720
+ private sweepPlans;
9655
9721
  /** Requests that went quiet come back, each is raised once, and old
9656
- * closed ones are deleted (src/requests/sweep.ts). */
9722
+ * closed ones are deleted (src/requests/sweep.ts). Plans first: a
9723
+ * blocked step marks its request told, so the owner hears once. */
9657
9724
  private sweepRequests;
9658
9725
  /** A check-in pass when one is due, or `force` now. macOS only. */
9659
9726
  runCheckin(force?: PassKind): Promise<PassResult | null>;
@@ -10896,7 +10963,13 @@ declare class SessionStore {
10896
10963
  * null when there is no native session to resume.
10897
10964
  */
10898
10965
  sessionIdleMs(agentId: string, channel: string, chatId: string): number | null;
10899
- isSessionStale(agentId: string, channel: string, chatId: string): boolean;
10966
+ /**
10967
+ * Whether the session has been idle longer than staleMinutes. Pass the
10968
+ * idle time read before this turn touched the session: recording the
10969
+ * inbound message bumps updatedAt, so reading it afterwards always sees
10970
+ * an idle time of about zero.
10971
+ */
10972
+ isSessionStale(agentId: string, channel: string, chatId: string, idleMs?: number | null): boolean;
10900
10973
  /**
10901
10974
  * Build a summary of recent messages from OTHER sessions for the same agent today.
10902
10975
  * This bridges the cross-chat amnesia gap — if someone shared info in a DM,
@@ -10976,6 +11049,9 @@ declare class SessionStore {
10976
11049
  /** The rotation metric shouldRotateByTierTwo actually used: per-request
10977
11050
  * context size when available, else the cumulative fallback. */
10978
11051
  getLastTurnContextTokens(agentId: string, channel: string, chatId: string): number;
11052
+ /** The per-request context reading alone, with no cumulative fallback.
11053
+ * Null when the last turn left none (a non-streaming turn). */
11054
+ getRawLastTurnContextTokens(agentId: string, channel: string, chatId: string): number | null;
10979
11055
  getMaxTurnsPerSession(): number;
10980
11056
  getTierTwoThresholdTokens(channel?: string): number;
10981
11057
  /**
@@ -11281,7 +11357,7 @@ declare class WikiHub {
11281
11357
  /** The wiki root: shared sidecars (_facts.json, _questions.json) live here. */
11282
11358
  getBaseDir(): string;
11283
11359
  getSharedStore(): WikiStore;
11284
- listAgents(): string[];
11360
+ listAgents(entries?: WikiEntry[]): string[];
11285
11361
  getAgentEntries(agentId: string): WikiEntry[];
11286
11362
  /**
11287
11363
  * Entries absorb has not dealt with yet: no article cites them and no
@@ -11296,6 +11372,12 @@ declare class WikiHub {
11296
11372
  * entries are offered again.
11297
11373
  */
11298
11374
  markProcessed(agentId: string, entryIds: string[], citedIds: Iterable<string>): void;
11375
+ /**
11376
+ * Counts and articles per agent, for `GET /wiki/agents` and the mesh.
11377
+ * The raw entries are read once and grouped here: reading them again
11378
+ * per agent made the endpoint take 25 to 75 s on a fleet with 30
11379
+ * agents and 10k entries, past the mesh client's 5 s timeout (#603).
11380
+ */
11299
11381
  summary(): AgentWikiSummary[];
11300
11382
  /** Split an agent's entries into cited by an article, read but not cited, and pending. */
11301
11383
  private classifyEntries;
@@ -11716,16 +11798,16 @@ declare const fingerprintEntrySchema: z.ZodObject<{
11716
11798
  updatedAt: z.ZodString;
11717
11799
  }, "strip", z.ZodTypeAny, {
11718
11800
  path: string[];
11801
+ updatedAt: string;
11719
11802
  fingerprint: string;
11720
11803
  leaf: {
11721
11804
  output?: string | undefined;
11722
11805
  input?: string | undefined;
11723
11806
  };
11724
- updatedAt: string;
11725
11807
  }, {
11726
11808
  path: string[];
11727
- fingerprint: string;
11728
11809
  updatedAt: string;
11810
+ fingerprint: string;
11729
11811
  leaf?: {
11730
11812
  output?: string | undefined;
11731
11813
  input?: string | undefined;
@@ -11803,16 +11885,16 @@ declare const indexFileSchema: z.ZodObject<{
11803
11885
  updatedAt: z.ZodString;
11804
11886
  }, "strip", z.ZodTypeAny, {
11805
11887
  path: string[];
11888
+ updatedAt: string;
11806
11889
  fingerprint: string;
11807
11890
  leaf: {
11808
11891
  output?: string | undefined;
11809
11892
  input?: string | undefined;
11810
11893
  };
11811
- updatedAt: string;
11812
11894
  }, {
11813
11895
  path: string[];
11814
- fingerprint: string;
11815
11896
  updatedAt: string;
11897
+ fingerprint: string;
11816
11898
  leaf?: {
11817
11899
  output?: string | undefined;
11818
11900
  input?: string | undefined;
@@ -11821,19 +11903,19 @@ declare const indexFileSchema: z.ZodObject<{
11821
11903
  }, "strip", z.ZodTypeAny, {
11822
11904
  entries: Record<string, {
11823
11905
  path: string[];
11906
+ updatedAt: string;
11824
11907
  fingerprint: string;
11825
11908
  leaf: {
11826
11909
  output?: string | undefined;
11827
11910
  input?: string | undefined;
11828
11911
  };
11829
- updatedAt: string;
11830
11912
  }>;
11831
11913
  version: number;
11832
11914
  }, {
11833
11915
  entries?: Record<string, {
11834
11916
  path: string[];
11835
- fingerprint: string;
11836
11917
  updatedAt: string;
11918
+ fingerprint: string;
11837
11919
  leaf?: {
11838
11920
  output?: string | undefined;
11839
11921
  input?: string | 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,h as bt,ja as Tt,ka as Mt}from"./chunk-I4IDZSGF.js";import"./chunk-BWHHZJNJ.js";import"./chunk-GTJIKXDB.js";import"./chunk-CAS2IWSM.js";import"./chunk-S2GAEH2F.js";import"./chunk-BGG3ZSMW.js";import"./chunk-ZVP6GB4G.js";import"./chunk-XGOBZCYC.js";import"./chunk-WCXXXAHV.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-7ZABMMSW.js";import"./chunk-6FVFD5WU.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-H5Z42X7W.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-EMGB23H5.js";import"./chunk-JWDJMFU6.js";import"./chunk-GRMCAO3Q.js";import"./chunk-KZKDVIOE.js";import{ca as yt,m as lt,n as ct,o as dt,p as mt,q as pt}from"./chunk-2NGXOYTS.js";import"./chunk-7KY7EEEI.js";import"./chunk-GLQLCBJS.js";import"./chunk-6W74CHNW.js";import{a as L}from"./chunk-UG2OF2EI.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-RMA7KKR7.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-BLEW5WQL.js";import"./chunk-GV7S5BAX.js";import"./chunk-SZDACK6O.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-25XR6QK2.js";import"./chunk-2IMK3NGJ.js";import"./chunk-VWTBHLMX.js";import"./chunk-DJQMG6TH.js";import{a as ht}from"./chunk-IKBWV7YJ.js";import"./chunk-36AXN6ZB.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-GSX4NK2N.js";import"./chunk-6TUQHOO3.js";import"./chunk-MYVHVJWZ.js";import"./chunk-AV7T3SYT.js";import"./chunk-Y5MFVVTM.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-Y4PR5LR3.js";import{f as gt,g as ft}from"./chunk-ELUEF4NC.js";import"./chunk-WPNRDEHW.js";import"./chunk-56KNKUFF.js";import{j as it,k as rt,l as at}from"./chunk-4GDLXWCH.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-2PJKGZWP.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{ha as tt,ja as st,ka as ot,ma as nt}from"./chunk-OPNZWQ6Y.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.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,la as Tt,ma as Mt}from"./chunk-UVV6GUOG.js";import"./chunk-DMPTCBX6.js";import"./chunk-GTJIKXDB.js";import"./chunk-NFS2VR3L.js";import"./chunk-S2GAEH2F.js";import"./chunk-BGG3ZSMW.js";import"./chunk-ZVP6GB4G.js";import"./chunk-XGOBZCYC.js";import"./chunk-WCXXXAHV.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-QCPSGOSK.js";import"./chunk-54XX2LSW.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-TYFGL2YS.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-EMGB23H5.js";import"./chunk-JWDJMFU6.js";import"./chunk-GRMCAO3Q.js";import"./chunk-KZKDVIOE.js";import{ca as yt,m as lt,n as ct,o as dt,p as mt,q as pt}from"./chunk-XLCUHG3N.js";import"./chunk-TLCURHW3.js";import"./chunk-GLQLCBJS.js";import"./chunk-6W74CHNW.js";import{a as L}from"./chunk-UG2OF2EI.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-5SLTRG66.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-SB7WMFJV.js";import"./chunk-GV7S5BAX.js";import"./chunk-SZDACK6O.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-ZWZADDXV.js";import"./chunk-XX6MLDTL.js";import"./chunk-VWTBHLMX.js";import"./chunk-7ZGTRXWS.js";import{a as ht}from"./chunk-XBRVV4ZT.js";import"./chunk-36AXN6ZB.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-GSX4NK2N.js";import"./chunk-C52IPIKJ.js";import"./chunk-MYVHVJWZ.js";import"./chunk-AV7T3SYT.js";import"./chunk-Y5MFVVTM.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-YUNMSLZN.js";import{f as gt,g as ft}from"./chunk-WJDFR3WE.js";import"./chunk-WPNRDEHW.js";import"./chunk-56KNKUFF.js";import{j as it,k as rt,l as at}from"./chunk-EHKI2RKD.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-2PJKGZWP.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{ia as tt,ka as st,la as ot,na as nt}from"./chunk-ZLUROC2Y.js";import"./chunk-BRK6M6LA.js";import"./chunk-UIBUZ2N3.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).