agentix-cli 0.151.0 → 0.153.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 (161) hide show
  1. package/dist/{App-WAWZFD66.js → App-2SWSYFED.js} +2 -2
  2. package/dist/{ChatApp-TRJIS3O4.js → ChatApp-NYTNFLIB.js} +2 -2
  3. package/dist/{absorb-eval-CFWLHUTB.js → absorb-eval-SYX5QN4H.js} +2 -2
  4. package/dist/agent-UCYQELAQ.js +2 -0
  5. package/dist/{board-dashboard-5V6RHW3E.js → board-dashboard-OZJSS6EM.js} +405 -241
  6. package/dist/board-dashboard-OZJSS6EM.js.map +1 -0
  7. package/dist/{chunk-X6C6U4GL.js → chunk-24QMHUU2.js} +5 -5
  8. package/dist/{chunk-X6C6U4GL.js.map → chunk-24QMHUU2.js.map} +1 -1
  9. package/dist/{chunk-4GXJMHSA.js → chunk-2J2OES2S.js} +2 -2
  10. package/dist/{chunk-LVS5ESTS.js → chunk-3LU2ZQZJ.js} +2 -2
  11. package/dist/{chunk-IMITYHBT.js → chunk-3OPW64OM.js} +2 -2
  12. package/dist/{chunk-O7SYQXKS.js → chunk-5DPN2HIR.js} +8 -8
  13. package/dist/{chunk-L6IW6HWE.js → chunk-5VPU5FHB.js} +24 -21
  14. package/dist/chunk-5VPU5FHB.js.map +1 -0
  15. package/dist/{chunk-ETBDN5WX.js → chunk-BFONYVOM.js} +2 -2
  16. package/dist/{chunk-X3T2GCSI.js → chunk-CFPRIE6F.js} +2 -2
  17. package/dist/{chunk-PUSBK2OQ.js → chunk-D6U37WO3.js} +47 -47
  18. package/dist/chunk-D6U37WO3.js.map +1 -0
  19. package/dist/{chunk-FGJNSYHM.js → chunk-DPSHY7GN.js} +3 -3
  20. package/dist/{chunk-EJTKLVIW.js → chunk-FVRREIVV.js} +2 -2
  21. package/dist/{chunk-ALE354ZC.js → chunk-GDLO7FC7.js} +2 -2
  22. package/dist/{chunk-Q5NLNLD5.js → chunk-HVNWI63Z.js} +2 -2
  23. package/dist/{chunk-C5UTFHPB.js → chunk-I45WFYGM.js} +2 -2
  24. package/dist/{chunk-6LFOX6Q5.js → chunk-IJQ2UUMZ.js} +289 -272
  25. package/dist/chunk-IJQ2UUMZ.js.map +1 -0
  26. package/dist/{chunk-UG2OF2EI.js → chunk-IVBCCSDR.js} +2 -2
  27. package/dist/{chunk-2PJKGZWP.js → chunk-JNG3P5V2.js} +2 -2
  28. package/dist/chunk-JNG3P5V2.js.map +1 -0
  29. package/dist/{chunk-DWXCZRBJ.js → chunk-JPZBWHNZ.js} +2 -2
  30. package/dist/{chunk-XVJXXELY.js → chunk-LH3GOBZP.js} +2 -2
  31. package/dist/{chunk-UALK4F3W.js → chunk-MM3ABEOW.js} +2 -2
  32. package/dist/chunk-MOCDP7Q3.js +36 -0
  33. package/dist/chunk-MOCDP7Q3.js.map +1 -0
  34. package/dist/{chunk-TZZBGWLX.js → chunk-MWYPW5XP.js} +6 -6
  35. package/dist/{chunk-V3VWYIJ3.js → chunk-P24P43ZB.js} +2 -2
  36. package/dist/{chunk-DFGANY25.js → chunk-R4R7EYY3.js} +2 -2
  37. package/dist/{chunk-DJQIJF4R.js → chunk-RJCHFDF3.js} +2 -2
  38. package/dist/{chunk-XD7HTMOP.js → chunk-RUQMUDSX.js} +2 -2
  39. package/dist/{chunk-YGDJV4ZZ.js → chunk-S5FRIHWM.js} +2 -2
  40. package/dist/chunk-SW6HCRLU.js +862 -0
  41. package/dist/chunk-SW6HCRLU.js.map +1 -0
  42. package/dist/{chunk-Y5MFVVTM.js → chunk-U23LVMMZ.js} +2 -2
  43. package/dist/{chunk-RGJZV5RY.js → chunk-UUVJX6WD.js} +2 -2
  44. package/dist/{chunk-2GJQDJBF.js → chunk-Z2KGUEB6.js} +2 -2
  45. package/dist/{chunk-CTQ25CUL.js → chunk-ZQONMM3B.js} +2 -2
  46. package/dist/cli.js +1 -1
  47. package/dist/{client-VT7GT3SK.js → client-PBIUMGDL.js} +2 -2
  48. package/dist/{compaction-FS6XNRLM.js → compaction-PFXWL4H7.js} +3 -3
  49. package/dist/{config-NZS2UTHI.js → config-VLH5DJTH.js} +2 -2
  50. package/dist/{config-mutate-LINLC354.js → config-mutate-G7HW2R6H.js} +2 -2
  51. package/dist/config-mutator-XWWW3PSV.js +2 -0
  52. package/dist/{context-planner-3JDA7FNR.js → context-planner-DJB6CKY6.js} +2 -2
  53. package/dist/{contributions-67B3BYLV.js → contributions-GZVKJXSJ.js} +2 -2
  54. package/dist/{doctor-FOKX4K2G.js → doctor-UT32WKCP.js} +2 -2
  55. package/dist/{follow-up-tool-JOIOYOON.js → follow-up-tool-PTKDMFA7.js} +2 -2
  56. package/dist/{grants-QXF7N6SS.js → grants-HSLB62EG.js} +2 -2
  57. package/dist/heal-RGM7X2ZG.js +2 -0
  58. package/dist/hub-BHCBRQZP.js +2 -0
  59. package/dist/index.d.ts +341 -7
  60. package/dist/index.js +1 -1
  61. package/dist/memory-extract-GHLBXV4H.js +2 -0
  62. package/dist/{program-XFZBG3EI.js → program-NU6QIXJJ.js} +239 -233
  63. package/dist/program-NU6QIXJJ.js.map +1 -0
  64. package/dist/{promote-WNYNTGKC.js → promote-73ZGTRDV.js} +2 -2
  65. package/dist/{providers-55NC2SFN.js → providers-BDJXGHEY.js} +2 -2
  66. package/dist/{query-ZU2DDCEH.js → query-KHW4AERR.js} +2 -2
  67. package/dist/{query-settings-BXRIJWWO.js → query-settings-P6RUUEFO.js} +2 -2
  68. package/dist/{registry-7BITIEQ2.js → registry-RQBXAPUZ.js} +2 -2
  69. package/dist/{request-planner-DLQP2NV6.js → request-planner-EUIMJ7R3.js} +2 -2
  70. package/dist/{review-candidates-3BMHLIBW.js → review-candidates-KKGDAZIB.js} +2 -2
  71. package/dist/routing-FQNGOTMV.js +2 -0
  72. package/dist/schedule-tool-2OWGAK4H.js +2 -0
  73. package/dist/{scheduler-SYI5MZ3H.js → scheduler-JXZBVPOS.js} +2 -2
  74. package/dist/{seat-6JF7BYM7.js → seat-DZB3NSZ7.js} +2 -2
  75. package/dist/{select-JT4I3JOH.js → select-YD4CA7FP.js} +2 -2
  76. package/dist/{set-enabled-JRGFKA3S.js → set-enabled-UK4SE5MZ.js} +2 -2
  77. package/dist/tool-2PA2USUG.js +6 -0
  78. package/dist/tool-2PA2USUG.js.map +1 -0
  79. package/dist/{tool-P6GVYNDO.js → tool-DIJN4XBY.js} +2 -2
  80. package/dist/wiki-CQBXLZ2Y.js +2 -0
  81. package/dist/wiki-enrich-PA6JS2YN.js +2 -0
  82. package/package.json +1 -1
  83. package/dist/agent-6KCTPI7E.js +0 -2
  84. package/dist/board-dashboard-5V6RHW3E.js.map +0 -1
  85. package/dist/chunk-2PJKGZWP.js.map +0 -1
  86. package/dist/chunk-5I7NJMK6.js +0 -35
  87. package/dist/chunk-5I7NJMK6.js.map +0 -1
  88. package/dist/chunk-6LFOX6Q5.js.map +0 -1
  89. package/dist/chunk-CBML7UCP.js +0 -861
  90. package/dist/chunk-CBML7UCP.js.map +0 -1
  91. package/dist/chunk-L6IW6HWE.js.map +0 -1
  92. package/dist/chunk-PUSBK2OQ.js.map +0 -1
  93. package/dist/config-mutator-FUMSW5HD.js +0 -2
  94. package/dist/heal-U67X6NIN.js +0 -2
  95. package/dist/hub-QETWDYPD.js +0 -2
  96. package/dist/memory-extract-ATD6YLRK.js +0 -2
  97. package/dist/program-XFZBG3EI.js.map +0 -1
  98. package/dist/routing-FVZCQJ6T.js +0 -2
  99. package/dist/schedule-tool-TDVJHRQX.js +0 -2
  100. package/dist/tool-UDOUNWQT.js +0 -6
  101. package/dist/tool-UDOUNWQT.js.map +0 -1
  102. package/dist/wiki-MTZHDFHK.js +0 -2
  103. package/dist/wiki-enrich-CHR4RCRE.js +0 -2
  104. /package/dist/{App-WAWZFD66.js.map → App-2SWSYFED.js.map} +0 -0
  105. /package/dist/{ChatApp-TRJIS3O4.js.map → ChatApp-NYTNFLIB.js.map} +0 -0
  106. /package/dist/{absorb-eval-CFWLHUTB.js.map → absorb-eval-SYX5QN4H.js.map} +0 -0
  107. /package/dist/{agent-6KCTPI7E.js.map → agent-UCYQELAQ.js.map} +0 -0
  108. /package/dist/{chunk-4GXJMHSA.js.map → chunk-2J2OES2S.js.map} +0 -0
  109. /package/dist/{chunk-LVS5ESTS.js.map → chunk-3LU2ZQZJ.js.map} +0 -0
  110. /package/dist/{chunk-IMITYHBT.js.map → chunk-3OPW64OM.js.map} +0 -0
  111. /package/dist/{chunk-O7SYQXKS.js.map → chunk-5DPN2HIR.js.map} +0 -0
  112. /package/dist/{chunk-ETBDN5WX.js.map → chunk-BFONYVOM.js.map} +0 -0
  113. /package/dist/{chunk-X3T2GCSI.js.map → chunk-CFPRIE6F.js.map} +0 -0
  114. /package/dist/{chunk-FGJNSYHM.js.map → chunk-DPSHY7GN.js.map} +0 -0
  115. /package/dist/{chunk-EJTKLVIW.js.map → chunk-FVRREIVV.js.map} +0 -0
  116. /package/dist/{chunk-ALE354ZC.js.map → chunk-GDLO7FC7.js.map} +0 -0
  117. /package/dist/{chunk-Q5NLNLD5.js.map → chunk-HVNWI63Z.js.map} +0 -0
  118. /package/dist/{chunk-C5UTFHPB.js.map → chunk-I45WFYGM.js.map} +0 -0
  119. /package/dist/{chunk-UG2OF2EI.js.map → chunk-IVBCCSDR.js.map} +0 -0
  120. /package/dist/{chunk-DWXCZRBJ.js.map → chunk-JPZBWHNZ.js.map} +0 -0
  121. /package/dist/{chunk-XVJXXELY.js.map → chunk-LH3GOBZP.js.map} +0 -0
  122. /package/dist/{chunk-UALK4F3W.js.map → chunk-MM3ABEOW.js.map} +0 -0
  123. /package/dist/{chunk-TZZBGWLX.js.map → chunk-MWYPW5XP.js.map} +0 -0
  124. /package/dist/{chunk-V3VWYIJ3.js.map → chunk-P24P43ZB.js.map} +0 -0
  125. /package/dist/{chunk-DFGANY25.js.map → chunk-R4R7EYY3.js.map} +0 -0
  126. /package/dist/{chunk-DJQIJF4R.js.map → chunk-RJCHFDF3.js.map} +0 -0
  127. /package/dist/{chunk-XD7HTMOP.js.map → chunk-RUQMUDSX.js.map} +0 -0
  128. /package/dist/{chunk-YGDJV4ZZ.js.map → chunk-S5FRIHWM.js.map} +0 -0
  129. /package/dist/{chunk-Y5MFVVTM.js.map → chunk-U23LVMMZ.js.map} +0 -0
  130. /package/dist/{chunk-RGJZV5RY.js.map → chunk-UUVJX6WD.js.map} +0 -0
  131. /package/dist/{chunk-2GJQDJBF.js.map → chunk-Z2KGUEB6.js.map} +0 -0
  132. /package/dist/{chunk-CTQ25CUL.js.map → chunk-ZQONMM3B.js.map} +0 -0
  133. /package/dist/{client-VT7GT3SK.js.map → client-PBIUMGDL.js.map} +0 -0
  134. /package/dist/{compaction-FS6XNRLM.js.map → compaction-PFXWL4H7.js.map} +0 -0
  135. /package/dist/{config-NZS2UTHI.js.map → config-VLH5DJTH.js.map} +0 -0
  136. /package/dist/{config-mutate-LINLC354.js.map → config-mutate-G7HW2R6H.js.map} +0 -0
  137. /package/dist/{config-mutator-FUMSW5HD.js.map → config-mutator-XWWW3PSV.js.map} +0 -0
  138. /package/dist/{context-planner-3JDA7FNR.js.map → context-planner-DJB6CKY6.js.map} +0 -0
  139. /package/dist/{contributions-67B3BYLV.js.map → contributions-GZVKJXSJ.js.map} +0 -0
  140. /package/dist/{doctor-FOKX4K2G.js.map → doctor-UT32WKCP.js.map} +0 -0
  141. /package/dist/{follow-up-tool-JOIOYOON.js.map → follow-up-tool-PTKDMFA7.js.map} +0 -0
  142. /package/dist/{grants-QXF7N6SS.js.map → grants-HSLB62EG.js.map} +0 -0
  143. /package/dist/{heal-U67X6NIN.js.map → heal-RGM7X2ZG.js.map} +0 -0
  144. /package/dist/{hub-QETWDYPD.js.map → hub-BHCBRQZP.js.map} +0 -0
  145. /package/dist/{memory-extract-ATD6YLRK.js.map → memory-extract-GHLBXV4H.js.map} +0 -0
  146. /package/dist/{promote-WNYNTGKC.js.map → promote-73ZGTRDV.js.map} +0 -0
  147. /package/dist/{providers-55NC2SFN.js.map → providers-BDJXGHEY.js.map} +0 -0
  148. /package/dist/{query-ZU2DDCEH.js.map → query-KHW4AERR.js.map} +0 -0
  149. /package/dist/{query-settings-BXRIJWWO.js.map → query-settings-P6RUUEFO.js.map} +0 -0
  150. /package/dist/{registry-7BITIEQ2.js.map → registry-RQBXAPUZ.js.map} +0 -0
  151. /package/dist/{request-planner-DLQP2NV6.js.map → request-planner-EUIMJ7R3.js.map} +0 -0
  152. /package/dist/{review-candidates-3BMHLIBW.js.map → review-candidates-KKGDAZIB.js.map} +0 -0
  153. /package/dist/{routing-FVZCQJ6T.js.map → routing-FQNGOTMV.js.map} +0 -0
  154. /package/dist/{schedule-tool-TDVJHRQX.js.map → schedule-tool-2OWGAK4H.js.map} +0 -0
  155. /package/dist/{scheduler-SYI5MZ3H.js.map → scheduler-JXZBVPOS.js.map} +0 -0
  156. /package/dist/{seat-6JF7BYM7.js.map → seat-DZB3NSZ7.js.map} +0 -0
  157. /package/dist/{select-JT4I3JOH.js.map → select-YD4CA7FP.js.map} +0 -0
  158. /package/dist/{set-enabled-JRGFKA3S.js.map → set-enabled-UK4SE5MZ.js.map} +0 -0
  159. /package/dist/{tool-P6GVYNDO.js.map → tool-DIJN4XBY.js.map} +0 -0
  160. /package/dist/{wiki-MTZHDFHK.js.map → wiki-CQBXLZ2Y.js.map} +0 -0
  161. /package/dist/{wiki-enrich-CHR4RCRE.js.map → wiki-enrich-PA6JS2YN.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { IncomingMessage as IncomingMessage$1, ServerResponse } from 'http';
3
+ import Database from 'better-sqlite3';
3
4
  import { PackageJson } from 'type-fest';
4
5
 
5
6
  interface GenerationMessage {
@@ -5118,11 +5119,16 @@ declare const daemonConfigSchema: z.ZodObject<{
5118
5119
  /** Image for the AgentX Helper icon on banners (.png, .jpg, .icns).
5119
5120
  * Unset: the AgentX logo. Applied by `agentx desktop install`. */
5120
5121
  icon: z.ZodOptional<z.ZodString>;
5122
+ /** Seconds the sound waits while something else speaks on this
5123
+ * machine (#1126); still speaking after that, the banner shows
5124
+ * without it. 0: never wait. */
5125
+ quietWaitSeconds: z.ZodDefault<z.ZodNumber>;
5121
5126
  }, "strip", z.ZodTypeAny, {
5122
5127
  sound: boolean;
5123
5128
  banner: boolean;
5124
5129
  soundName: string;
5125
5130
  volume: number;
5131
+ quietWaitSeconds: number;
5126
5132
  icon?: string | undefined;
5127
5133
  }, {
5128
5134
  sound?: boolean | undefined;
@@ -5130,6 +5136,34 @@ declare const daemonConfigSchema: z.ZodObject<{
5130
5136
  soundName?: string | undefined;
5131
5137
  volume?: number | undefined;
5132
5138
  icon?: string | undefined;
5139
+ quietWaitSeconds?: number | undefined;
5140
+ }>>;
5141
+ /** The told-the-owner record (src/notify/told.ts, #1126): everything sent
5142
+ * to the owner's own addresses is recorded once, an item already told
5143
+ * on any of them is not told again, and system nags wait for the
5144
+ * daily digest (approvals.digest) instead of a push each. */
5145
+ told: z.ZodDefault<z.ZodObject<{
5146
+ enabled: z.ZodDefault<z.ZodBoolean>;
5147
+ /** An item told within this many hours is not told again, on any channel. */
5148
+ repeatWindowHours: z.ZodDefault<z.ZodNumber>;
5149
+ /** Channels that only ever reach the owner: everything on them passes the gate. */
5150
+ channels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5151
+ /** Other owner addresses, as "channel:chatId" (a private Telegram chat). */
5152
+ addresses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5153
+ /** Nags wait for the daily digest. Off: each is sent like any notice. */
5154
+ digestNags: z.ZodDefault<z.ZodBoolean>;
5155
+ }, "strip", z.ZodTypeAny, {
5156
+ enabled: boolean;
5157
+ channels: string[];
5158
+ repeatWindowHours: number;
5159
+ addresses: string[];
5160
+ digestNags: boolean;
5161
+ }, {
5162
+ enabled?: boolean | undefined;
5163
+ channels?: string[] | undefined;
5164
+ repeatWindowHours?: number | undefined;
5165
+ addresses?: string[] | undefined;
5166
+ digestNags?: boolean | undefined;
5133
5167
  }>>;
5134
5168
  }, "strip", z.ZodTypeAny, {
5135
5169
  local: {
@@ -5137,6 +5171,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5137
5171
  banner: boolean;
5138
5172
  soundName: string;
5139
5173
  volume: number;
5174
+ quietWaitSeconds: number;
5140
5175
  icon?: string | undefined;
5141
5176
  };
5142
5177
  on: {
@@ -5145,6 +5180,13 @@ declare const daemonConfigSchema: z.ZodObject<{
5145
5180
  taskQueued: boolean;
5146
5181
  };
5147
5182
  longTaskThreshold: number;
5183
+ told: {
5184
+ enabled: boolean;
5185
+ channels: string[];
5186
+ repeatWindowHours: number;
5187
+ addresses: string[];
5188
+ digestNags: boolean;
5189
+ };
5148
5190
  channel?: string | undefined;
5149
5191
  destination?: {
5150
5192
  channel: string;
@@ -5158,6 +5200,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5158
5200
  soundName?: string | undefined;
5159
5201
  volume?: number | undefined;
5160
5202
  icon?: string | undefined;
5203
+ quietWaitSeconds?: number | undefined;
5161
5204
  } | undefined;
5162
5205
  channel?: string | undefined;
5163
5206
  on?: {
@@ -5171,6 +5214,13 @@ declare const daemonConfigSchema: z.ZodObject<{
5171
5214
  chatId: string;
5172
5215
  accountId?: string | undefined;
5173
5216
  } | undefined;
5217
+ told?: {
5218
+ enabled?: boolean | undefined;
5219
+ channels?: string[] | undefined;
5220
+ repeatWindowHours?: number | undefined;
5221
+ addresses?: string[] | undefined;
5222
+ digestNags?: boolean | undefined;
5223
+ } | undefined;
5174
5224
  }>>;
5175
5225
  calls: z.ZodDefault<z.ZodObject<{
5176
5226
  /** Agents allowed to call: ids, or "*" for every agent on this node.
@@ -6101,6 +6151,28 @@ declare const daemonConfigSchema: z.ZodObject<{
6101
6151
  repos?: Record<string, string> | undefined;
6102
6152
  checkEveryMinutes?: number | undefined;
6103
6153
  }>>;
6154
+ /** Headlines (src/requests/headline.ts, #1126): a request the agent did
6155
+ * not describe gets a few words saying what it is, written once by one
6156
+ * small model call, so its card, push and Desk line are not titled with
6157
+ * the owner's raw transcript. Off: the start of the owner's words. */
6158
+ headlines: z.ZodDefault<z.ZodObject<{
6159
+ enabled: z.ZodDefault<z.ZodBoolean>;
6160
+ /** Provider for the call. "claude-code" uses the auth the operator set
6161
+ * up (subscription or API key); no new paid path is opened. */
6162
+ provider: z.ZodDefault<z.ZodString>;
6163
+ model: z.ZodDefault<z.ZodString>;
6164
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
6165
+ }, "strip", z.ZodTypeAny, {
6166
+ provider: string;
6167
+ model: string;
6168
+ enabled: boolean;
6169
+ timeoutSeconds: number;
6170
+ }, {
6171
+ provider?: string | undefined;
6172
+ model?: string | undefined;
6173
+ enabled?: boolean | undefined;
6174
+ timeoutSeconds?: number | undefined;
6175
+ }>>;
6104
6176
  }, "strip", z.ZodTypeAny, {
6105
6177
  enabled: boolean;
6106
6178
  from: string[];
@@ -6129,6 +6201,12 @@ declare const daemonConfigSchema: z.ZodObject<{
6129
6201
  token?: string | undefined;
6130
6202
  } | undefined;
6131
6203
  };
6204
+ headlines: {
6205
+ provider: string;
6206
+ model: string;
6207
+ enabled: boolean;
6208
+ timeoutSeconds: number;
6209
+ };
6132
6210
  }, {
6133
6211
  enabled?: boolean | undefined;
6134
6212
  from?: string[] | undefined;
@@ -6157,6 +6235,12 @@ declare const daemonConfigSchema: z.ZodObject<{
6157
6235
  repos?: Record<string, string> | undefined;
6158
6236
  checkEveryMinutes?: number | undefined;
6159
6237
  } | undefined;
6238
+ headlines?: {
6239
+ provider?: string | undefined;
6240
+ model?: string | undefined;
6241
+ enabled?: boolean | undefined;
6242
+ timeoutSeconds?: number | undefined;
6243
+ } | undefined;
6160
6244
  }>>;
6161
6245
  /** Task watchers (src/watchers, #1030): every task start decides whether
6162
6246
  * the task needs a watcher and attaches one. Off by default. */
@@ -6424,8 +6508,8 @@ declare const daemonConfigSchema: z.ZodObject<{
6424
6508
  enabled: boolean;
6425
6509
  command: string[];
6426
6510
  time: string;
6427
- baseline: string;
6428
6511
  timeoutSeconds: number;
6512
+ baseline: string;
6429
6513
  gates: {
6430
6514
  id: string;
6431
6515
  since: string;
@@ -6442,8 +6526,8 @@ declare const daemonConfigSchema: z.ZodObject<{
6442
6526
  timezone?: string | undefined;
6443
6527
  time?: string | undefined;
6444
6528
  issue?: number | undefined;
6445
- baseline?: string | undefined;
6446
6529
  timeoutSeconds?: number | undefined;
6530
+ baseline?: string | undefined;
6447
6531
  gates?: {
6448
6532
  id: string;
6449
6533
  since: string;
@@ -6454,8 +6538,8 @@ declare const daemonConfigSchema: z.ZodObject<{
6454
6538
  enabled: boolean;
6455
6539
  command: string[];
6456
6540
  time: string;
6457
- baseline: string;
6458
6541
  timeoutSeconds: number;
6542
+ baseline: string;
6459
6543
  gates: {
6460
6544
  id: string;
6461
6545
  since: string;
@@ -6472,8 +6556,8 @@ declare const daemonConfigSchema: z.ZodObject<{
6472
6556
  timezone?: string | undefined;
6473
6557
  time?: string | undefined;
6474
6558
  issue?: number | undefined;
6475
- baseline?: string | undefined;
6476
6559
  timeoutSeconds?: number | undefined;
6560
+ baseline?: string | undefined;
6477
6561
  gates?: {
6478
6562
  id: string;
6479
6563
  since: string;
@@ -6647,6 +6731,56 @@ declare const daemonConfigSchema: z.ZodObject<{
6647
6731
  maxEventAgeMinutes?: number | undefined;
6648
6732
  syncMinutes?: number | undefined;
6649
6733
  }>>;
6734
+ /** Pinned pages: https pages the owner opens from a button in the
6735
+ * phone app (#1120). Added, renamed and removed from the app or with
6736
+ * `agentx app pin`. */
6737
+ pins: z.ZodDefault<z.ZodEffects<z.ZodObject<{
6738
+ /** Where the list is kept. Relative paths resolve from the folder
6739
+ * the daemon runs in (the one holding agentx.json). */
6740
+ file: z.ZodDefault<z.ZodString>;
6741
+ max: z.ZodDefault<z.ZodNumber>;
6742
+ /** Buttons for every paired phone, set here rather than in the app
6743
+ * (#1121). Read only from the phone and `agentx app`; they count
6744
+ * toward `max`. https only, with no user name or password. */
6745
+ pages: z.ZodDefault<z.ZodArray<z.ZodObject<{
6746
+ label: z.ZodString;
6747
+ url: z.ZodEffects<z.ZodString, string, string>;
6748
+ }, "strict", z.ZodTypeAny, {
6749
+ label: string;
6750
+ url: string;
6751
+ }, {
6752
+ label: string;
6753
+ url: string;
6754
+ }>, "many">>;
6755
+ }, "strip", z.ZodTypeAny, {
6756
+ max: number;
6757
+ file: string;
6758
+ pages: {
6759
+ label: string;
6760
+ url: string;
6761
+ }[];
6762
+ }, {
6763
+ max?: number | undefined;
6764
+ file?: string | undefined;
6765
+ pages?: {
6766
+ label: string;
6767
+ url: string;
6768
+ }[] | undefined;
6769
+ }>, {
6770
+ max: number;
6771
+ file: string;
6772
+ pages: {
6773
+ label: string;
6774
+ url: string;
6775
+ }[];
6776
+ }, {
6777
+ max?: number | undefined;
6778
+ file?: string | undefined;
6779
+ pages?: {
6780
+ label: string;
6781
+ url: string;
6782
+ }[] | undefined;
6783
+ }>>;
6650
6784
  }, "strip", z.ZodTypeAny, {
6651
6785
  android: {
6652
6786
  packageName: string;
@@ -6664,6 +6798,14 @@ declare const daemonConfigSchema: z.ZodObject<{
6664
6798
  maxEventAgeMinutes: number;
6665
6799
  syncMinutes: number;
6666
6800
  };
6801
+ pins: {
6802
+ max: number;
6803
+ file: string;
6804
+ pages: {
6805
+ label: string;
6806
+ url: string;
6807
+ }[];
6808
+ };
6667
6809
  }, {
6668
6810
  android?: {
6669
6811
  packageName?: string | undefined;
@@ -6681,6 +6823,14 @@ declare const daemonConfigSchema: z.ZodObject<{
6681
6823
  maxEventAgeMinutes?: number | undefined;
6682
6824
  syncMinutes?: number | undefined;
6683
6825
  } | undefined;
6826
+ pins?: {
6827
+ max?: number | undefined;
6828
+ file?: string | undefined;
6829
+ pages?: {
6830
+ label: string;
6831
+ url: string;
6832
+ }[] | undefined;
6833
+ } | undefined;
6684
6834
  }>>;
6685
6835
  /** `agentx demo`, read from the agentx.json in the folder it runs from. */
6686
6836
  demo: z.ZodDefault<z.ZodObject<{
@@ -9048,6 +9198,14 @@ declare const daemonConfigSchema: z.ZodObject<{
9048
9198
  maxEventAgeMinutes: number;
9049
9199
  syncMinutes: number;
9050
9200
  };
9201
+ pins: {
9202
+ max: number;
9203
+ file: string;
9204
+ pages: {
9205
+ label: string;
9206
+ url: string;
9207
+ }[];
9208
+ };
9051
9209
  };
9052
9210
  voice: {
9053
9211
  provider: "system" | "elevenlabs";
@@ -9136,6 +9294,12 @@ declare const daemonConfigSchema: z.ZodObject<{
9136
9294
  token?: string | undefined;
9137
9295
  } | undefined;
9138
9296
  };
9297
+ headlines: {
9298
+ provider: string;
9299
+ model: string;
9300
+ enabled: boolean;
9301
+ timeoutSeconds: number;
9302
+ };
9139
9303
  };
9140
9304
  channels: {
9141
9305
  push: {
@@ -9438,6 +9602,7 @@ declare const daemonConfigSchema: z.ZodObject<{
9438
9602
  banner: boolean;
9439
9603
  soundName: string;
9440
9604
  volume: number;
9605
+ quietWaitSeconds: number;
9441
9606
  icon?: string | undefined;
9442
9607
  };
9443
9608
  on: {
@@ -9446,6 +9611,13 @@ declare const daemonConfigSchema: z.ZodObject<{
9446
9611
  taskQueued: boolean;
9447
9612
  };
9448
9613
  longTaskThreshold: number;
9614
+ told: {
9615
+ enabled: boolean;
9616
+ channels: string[];
9617
+ repeatWindowHours: number;
9618
+ addresses: string[];
9619
+ digestNags: boolean;
9620
+ };
9449
9621
  channel?: string | undefined;
9450
9622
  destination?: {
9451
9623
  channel: string;
@@ -9588,8 +9760,8 @@ declare const daemonConfigSchema: z.ZodObject<{
9588
9760
  enabled: boolean;
9589
9761
  command: string[];
9590
9762
  time: string;
9591
- baseline: string;
9592
9763
  timeoutSeconds: number;
9764
+ baseline: string;
9593
9765
  gates: {
9594
9766
  id: string;
9595
9767
  since: string;
@@ -10139,6 +10311,14 @@ declare const daemonConfigSchema: z.ZodObject<{
10139
10311
  maxEventAgeMinutes?: number | undefined;
10140
10312
  syncMinutes?: number | undefined;
10141
10313
  } | undefined;
10314
+ pins?: {
10315
+ max?: number | undefined;
10316
+ file?: string | undefined;
10317
+ pages?: {
10318
+ label: string;
10319
+ url: string;
10320
+ }[] | undefined;
10321
+ } | undefined;
10142
10322
  } | undefined;
10143
10323
  voice?: {
10144
10324
  system?: string | Record<string, string> | undefined;
@@ -10295,6 +10475,12 @@ declare const daemonConfigSchema: z.ZodObject<{
10295
10475
  repos?: Record<string, string> | undefined;
10296
10476
  checkEveryMinutes?: number | undefined;
10297
10477
  } | undefined;
10478
+ headlines?: {
10479
+ provider?: string | undefined;
10480
+ model?: string | undefined;
10481
+ enabled?: boolean | undefined;
10482
+ timeoutSeconds?: number | undefined;
10483
+ } | undefined;
10298
10484
  } | undefined;
10299
10485
  channels?: {
10300
10486
  push?: {
@@ -10591,6 +10777,7 @@ declare const daemonConfigSchema: z.ZodObject<{
10591
10777
  soundName?: string | undefined;
10592
10778
  volume?: number | undefined;
10593
10779
  icon?: string | undefined;
10780
+ quietWaitSeconds?: number | undefined;
10594
10781
  } | undefined;
10595
10782
  channel?: string | undefined;
10596
10783
  on?: {
@@ -10604,6 +10791,13 @@ declare const daemonConfigSchema: z.ZodObject<{
10604
10791
  chatId: string;
10605
10792
  accountId?: string | undefined;
10606
10793
  } | undefined;
10794
+ told?: {
10795
+ enabled?: boolean | undefined;
10796
+ channels?: string[] | undefined;
10797
+ repeatWindowHours?: number | undefined;
10798
+ addresses?: string[] | undefined;
10799
+ digestNags?: boolean | undefined;
10800
+ } | undefined;
10607
10801
  } | undefined;
10608
10802
  calls?: {
10609
10803
  summary?: boolean | undefined;
@@ -10743,8 +10937,8 @@ declare const daemonConfigSchema: z.ZodObject<{
10743
10937
  timezone?: string | undefined;
10744
10938
  time?: string | undefined;
10745
10939
  issue?: number | undefined;
10746
- baseline?: string | undefined;
10747
10940
  timeoutSeconds?: number | undefined;
10941
+ baseline?: string | undefined;
10748
10942
  gates?: {
10749
10943
  id: string;
10750
10944
  since: string;
@@ -11835,6 +12029,9 @@ declare class AgentXDaemon {
11835
12029
  }>;
11836
12030
  /** Open requests (src/requests); null when the database is unavailable. */
11837
12031
  private requests;
12032
+ /** The told-the-owner gate (#1126). Null without a database. */
12033
+ private ownerGate;
12034
+ private toldPrunedAt;
11838
12035
  /** Guest meshes (#380): the grants this node opened, and the join limiter. */
11839
12036
  private guestStore;
11840
12037
  private guestJoinLimiter;
@@ -11891,7 +12088,9 @@ declare class AgentXDaemon {
11891
12088
  /** GET /screen: every source read on its own, so one that fails is
11892
12089
  * named and the rest still show. */
11893
12090
  private screenView;
11894
- /** Tell the owner about a request: a push, and the Mac banner. */
12091
+ /** Tell the owner about a request: a push, and the Mac banner. `kind`
12092
+ * nag (a request that stopped) waits for the daily digest; its card is
12093
+ * on the Desk meanwhile (#1126). */
11895
12094
  private notifyRequestOwner;
11896
12095
  private plansSweeping;
11897
12096
  private plansKick?;
@@ -11907,6 +12106,11 @@ declare class AgentXDaemon {
11907
12106
  * and this node's own record of inbound turns. Built per check, so a
11908
12107
  * settings change applies without a restart. */
11909
12108
  private requestCheckContext;
12109
+ private headlines?;
12110
+ /** Writes the headline of a request its agent did not describe (#1126):
12111
+ * one small call through the provider the operator set up, built on
12112
+ * first use and read from the settings at each call. */
12113
+ private headlineWriter;
11910
12114
  /** Requests that went quiet come back, each is raised once, and old
11911
12115
  * closed ones are deleted (src/requests/sweep.ts). Plans first: a
11912
12116
  * blocked step marks its request told, so the owner hears once. */
@@ -11919,6 +12123,16 @@ declare class AgentXDaemon {
11919
12123
  /** Tell the owner through the notify path: a push to the default
11920
12124
  * channel, the Mac banner where there is one (#788). */
11921
12125
  private notifyOwner;
12126
+ /** The one way the daemon tells the owner something (#1126). The gate
12127
+ * decides first: an item already told is not told again, and a nag
12128
+ * waits for the daily digest. Otherwise notify() sends it, held in
12129
+ * Focus or a call, with the Mac banner. Rejects only when nothing at all
12130
+ * reached the owner (the send failed and there is no banner), unless
12131
+ * `soft`: then the failure is only logged. */
12132
+ private tellOwner;
12133
+ /** The banner and sound for one notice on this machine. The sound waits
12134
+ * while something else speaks here (#1126). */
12135
+ private ownerAlert;
11922
12136
  /** A card raised for a workflow (#788): a step's answer resumes its
11923
12137
  * run; a proposed workflow is kept (switched on) on a yes. */
11924
12138
  private workflowCardResult;
@@ -12464,6 +12678,17 @@ interface OutgoingMessage {
12464
12678
  label: string;
12465
12679
  url: string;
12466
12680
  }>;
12681
+ /** For a message to the owner (#1126): what it is about, for the
12682
+ * told-the-owner gate (notify/told.ts). `passed`: the caller already
12683
+ * went through the gate, so the router does not decide again. */
12684
+ told?: {
12685
+ key?: string;
12686
+ requestId?: string;
12687
+ kind?: "notice" | "nag";
12688
+ urgent?: boolean;
12689
+ from?: string;
12690
+ passed?: boolean;
12691
+ };
12467
12692
  }
12468
12693
  interface ChannelAdapter {
12469
12694
  readonly name: string;
@@ -17312,6 +17537,110 @@ declare class BusinessLayer {
17312
17537
  summary(): string;
17313
17538
  }
17314
17539
 
17540
+ type TellKind = "notice" | "nag";
17541
+ type TellOutcome = "sent" | "held" | "digest" | "repeat" | "failed";
17542
+ /** What a caller says about a message to the owner. All optional: a bare
17543
+ * message on an owner channel is a notice keyed by its text. */
17544
+ interface TellMeta {
17545
+ /** The item it is about. Same key, same item, whatever the channel. */
17546
+ key?: string;
17547
+ /** The open request it belongs to (requests, #356). */
17548
+ requestId?: string;
17549
+ kind?: TellKind;
17550
+ /** Goes now: no repeat check, no digest. */
17551
+ urgent?: boolean;
17552
+ /** Who is telling: an agent id, or a daemon part (requests, watchers). */
17553
+ from?: string;
17554
+ /** Without a key, the text is the key: only for notices (the daemon's
17555
+ * own, `agentx notify`), never for an agent's answer, which may well
17556
+ * say the same thing twice on purpose. */
17557
+ textKey?: boolean;
17558
+ }
17559
+ interface ToldRow {
17560
+ id: number;
17561
+ at: number;
17562
+ key: string;
17563
+ requestId: string | null;
17564
+ kind: TellKind;
17565
+ channel: string;
17566
+ chatId: string;
17567
+ from: string | null;
17568
+ title: string;
17569
+ text: string;
17570
+ outcome: TellOutcome;
17571
+ digestedAt: number | null;
17572
+ }
17573
+ interface TellSettings {
17574
+ enabled: boolean;
17575
+ repeatWindowHours: number;
17576
+ channels: string[];
17577
+ addresses: string[];
17578
+ digestNags: boolean;
17579
+ /** A daily digest can go out (on, with a destination). False: a nag is
17580
+ * sent at once, or it would never reach anyone. Unset: true. */
17581
+ digestAvailable?: boolean;
17582
+ }
17583
+ declare class ToldLedger {
17584
+ private db;
17585
+ constructor(db: Database.Database);
17586
+ add(row: Omit<ToldRow, "id" | "digestedAt">): number;
17587
+ setOutcome(id: number, outcome: TellOutcome): void;
17588
+ /** The last time this item reached the owner, or was put in the digest
17589
+ * (unless `digest` is false: no digest will carry it), since `since`.
17590
+ * A failed send does not count: it never arrived. */
17591
+ lastTold(key: string, since: number, digest?: boolean): ToldRow | null;
17592
+ /** Nags waiting for the digest, oldest first. */
17593
+ waitingForDigest(limit?: number): ToldRow[];
17594
+ waitingCount(): number;
17595
+ markDigested(ids: number[], at: number): void;
17596
+ /** Rows since `since`, newest first. */
17597
+ since(since: number, limit?: number): ToldRow[];
17598
+ /** How many of each outcome since `since`: the before/after figure. */
17599
+ counts(since: number): Record<TellOutcome, number>;
17600
+ /** Delete rows older than `before`. */
17601
+ prune(before: number): number;
17602
+ }
17603
+ interface TellDecision {
17604
+ verdict: "send" | "repeat" | "digest";
17605
+ key: string | null;
17606
+ /** The row written for it; for send, update it with the outcome. */
17607
+ rowId: number;
17608
+ }
17609
+ /** The one gate. Synchronous, no I/O beyond the ledger. */
17610
+ declare class OwnerGate {
17611
+ private ledger;
17612
+ private settings;
17613
+ private now;
17614
+ constructor(ledger: ToldLedger, settings: () => TellSettings, now?: () => number);
17615
+ /** Is this address the owner's own? */
17616
+ isOwnerAddress(channel: string, chatId: string): boolean;
17617
+ /** Decide, and record the decision. A send is recorded as sent at once
17618
+ * and corrected with `outcome` once known. */
17619
+ decide(msg: {
17620
+ channel: string;
17621
+ chatId: string;
17622
+ title: string;
17623
+ text: string;
17624
+ }, meta?: TellMeta): TellDecision;
17625
+ outcome(rowId: number, outcome: TellOutcome): void;
17626
+ /** The digest line for every nag waiting, and how to clear them once
17627
+ * the digest went out. Null when none waits. */
17628
+ digestLine(): {
17629
+ line: string;
17630
+ ids: number[];
17631
+ } | null;
17632
+ markDigested(ids: number[]): void;
17633
+ /** What the owner was told since `since`: counts by outcome, and the
17634
+ * newest rows. */
17635
+ report(since: number, limit?: number): {
17636
+ counts: Record<TellOutcome, number>;
17637
+ waitingForDigest: number;
17638
+ items: ToldRow[];
17639
+ };
17640
+ /** Drop rows older than `days`. */
17641
+ prune(days: number): number;
17642
+ }
17643
+
17315
17644
  /** A run that was still going when the previous daemon stopped. */
17316
17645
  interface InterruptedRun {
17317
17646
  taskId: string;
@@ -17348,6 +17677,11 @@ declare class MessageRouter {
17348
17677
  private registry;
17349
17678
  private config;
17350
17679
  private channels;
17680
+ /** The told-the-owner gate (#1126). Unset: nothing is gated. */
17681
+ private ownerGate;
17682
+ /** Attach the told-the-owner gate: every send to the owner's own
17683
+ * addresses is recorded, repeats and nags are kept back. */
17684
+ setOwnerGate(gate: OwnerGate | null): void;
17351
17685
  private hooks?;
17352
17686
  private mesh?;
17353
17687
  private serviceMatcher?;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{Ba as Tt,Ca as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt}from"./chunk-6LFOX6Q5.js";import"./chunk-PUSBK2OQ.js";import"./chunk-GTJIKXDB.js";import"./chunk-ALE354ZC.js";import"./chunk-5I7NJMK6.js";import"./chunk-7LN4VKDU.js";import"./chunk-IMLAPB7G.js";import"./chunk-ZVP6GB4G.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-MRIVENBY.js";import"./chunk-DFGANY25.js";import"./chunk-X6C6U4GL.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-LVS5ESTS.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-EMGB23H5.js";import"./chunk-JAML6222.js";import"./chunk-YMX3QCV7.js";import"./chunk-JWDJMFU6.js";import"./chunk-5HLD66CW.js";import"./chunk-IS2IWRP7.js";import"./chunk-MNG2AMKZ.js";import"./chunk-X7UQY7CH.js";import"./chunk-CTQ25CUL.js";import"./chunk-PYHR4HXO.js";import"./chunk-KP7KDLZ2.js";import"./chunk-A5GYG56I.js";import{m as lt,n as ct,o as dt,p as mt,q as pt,ra as yt}from"./chunk-O7SYQXKS.js";import"./chunk-YGDJV4ZZ.js";import"./chunk-MEFPXHQJ.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-TZZBGWLX.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-6TTGRTDO.js";import"./chunk-SZDACK6O.js";import"./chunk-VE3SSOQX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-5TTHN7DP.js";import{s as ut}from"./chunk-XVJXXELY.js";import"./chunk-ETBDN5WX.js";import"./chunk-3UOTLMXD.js";import"./chunk-36AXN6ZB.js";import"./chunk-PE5V2LI7.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-VWTBHLMX.js";import"./chunk-XD7HTMOP.js";import{a as ht}from"./chunk-DWXCZRBJ.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-FGJNSYHM.js";import"./chunk-SKSYII3K.js";import{f as gt,g as ft}from"./chunk-DJQIJF4R.js";import"./chunk-WPNRDEHW.js";import"./chunk-MWNCS57L.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-2GJQDJBF.js";import{j as it,k as rt,l as at}from"./chunk-Q5NLNLD5.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-6TURWSMN.js";import"./chunk-AV7T3SYT.js";import"./chunk-Y5MFVVTM.js";import"./chunk-QD6IICK7.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{Ja as tt,La as st,Na as ot,Ua as nt}from"./chunk-L6IW6HWE.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{Ba as Tt,Ca as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt}from"./chunk-IJQ2UUMZ.js";import"./chunk-D6U37WO3.js";import"./chunk-GTJIKXDB.js";import"./chunk-GDLO7FC7.js";import"./chunk-MOCDP7Q3.js";import"./chunk-7LN4VKDU.js";import"./chunk-IMLAPB7G.js";import"./chunk-ZVP6GB4G.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-MRIVENBY.js";import"./chunk-R4R7EYY3.js";import"./chunk-24QMHUU2.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-3LU2ZQZJ.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-EMGB23H5.js";import"./chunk-JAML6222.js";import"./chunk-YMX3QCV7.js";import"./chunk-JWDJMFU6.js";import"./chunk-5HLD66CW.js";import"./chunk-IS2IWRP7.js";import"./chunk-MNG2AMKZ.js";import"./chunk-X7UQY7CH.js";import"./chunk-ZQONMM3B.js";import"./chunk-PYHR4HXO.js";import"./chunk-KP7KDLZ2.js";import"./chunk-A5GYG56I.js";import{m as lt,n as ct,o as dt,p as mt,q as pt,ra as yt}from"./chunk-5DPN2HIR.js";import"./chunk-S5FRIHWM.js";import"./chunk-MEFPXHQJ.js";import{a as L}from"./chunk-IVBCCSDR.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-MWYPW5XP.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-6TTGRTDO.js";import"./chunk-SZDACK6O.js";import"./chunk-VE3SSOQX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-5TTHN7DP.js";import{s as ut}from"./chunk-LH3GOBZP.js";import"./chunk-BFONYVOM.js";import"./chunk-3UOTLMXD.js";import"./chunk-36AXN6ZB.js";import"./chunk-PE5V2LI7.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-VWTBHLMX.js";import"./chunk-RUQMUDSX.js";import{a as ht}from"./chunk-JPZBWHNZ.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-DPSHY7GN.js";import"./chunk-SKSYII3K.js";import{f as gt,g as ft}from"./chunk-RJCHFDF3.js";import"./chunk-WPNRDEHW.js";import"./chunk-MWNCS57L.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-Z2KGUEB6.js";import{j as it,k as rt,l as at}from"./chunk-HVNWI63Z.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-6TURWSMN.js";import"./chunk-AV7T3SYT.js";import"./chunk-U23LVMMZ.js";import"./chunk-QD6IICK7.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-JNG3P5V2.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{Ja as tt,La as st,Na as ot,Ua as nt}from"./chunk-5VPU5FHB.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).
@@ -0,0 +1,2 @@
1
+ import{b as a}from"./chunk-U23LVMMZ.js";import"./chunk-QD6IICK7.js";import"./chunk-QIJLFPWE.js";export{a as extractMemories};
2
+ //# sourceMappingURL=memory-extract-GHLBXV4H.js.map