agentix-cli 0.152.0 → 0.153.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/{App-NCB3Y5DS.js → App-2SWSYFED.js} +2 -2
  2. package/dist/{ChatApp-HOWN5H7Y.js → ChatApp-NYTNFLIB.js} +2 -2
  3. package/dist/{absorb-eval-JXRNSZII.js → absorb-eval-SYX5QN4H.js} +2 -2
  4. package/dist/{agent-DMXUUMEU.js → agent-UCYQELAQ.js} +2 -2
  5. package/dist/{board-dashboard-POWARL34.js → board-dashboard-UZF7MQZA.js} +8 -5
  6. package/dist/{board-dashboard-POWARL34.js.map → board-dashboard-UZF7MQZA.js.map} +1 -1
  7. package/dist/{chunk-QSNKF5VD.js → chunk-2J2OES2S.js} +2 -2
  8. package/dist/{chunk-HS7ATV4Z.js → chunk-3LU2ZQZJ.js} +2 -2
  9. package/dist/{chunk-CZEBLLZQ.js → chunk-3OPW64OM.js} +2 -2
  10. package/dist/{chunk-MTBY46CL.js → chunk-5DPN2HIR.js} +5 -5
  11. package/dist/{chunk-SQUTRMKH.js → chunk-5VPU5FHB.js} +7 -7
  12. package/dist/{chunk-SQUTRMKH.js.map → chunk-5VPU5FHB.js.map} +1 -1
  13. package/dist/{chunk-XE3CGJV4.js → chunk-BFONYVOM.js} +2 -2
  14. package/dist/{chunk-R4R7EYY3.js → chunk-BNOGNRAM.js} +2 -2
  15. package/dist/{chunk-PC24JMEH.js → chunk-CFPRIE6F.js} +2 -2
  16. package/dist/{chunk-P25TJ4XN.js → chunk-DPSHY7GN.js} +3 -3
  17. package/dist/{chunk-JDX7AYIB.js → chunk-DZRD6BE4.js} +2 -2
  18. package/dist/{chunk-PGLTBNGZ.js → chunk-FVRREIVV.js} +2 -2
  19. package/dist/{chunk-7UH3DXAG.js → chunk-GDLO7FC7.js} +2 -2
  20. package/dist/{chunk-RNAKP7WY.js → chunk-HVNWI63Z.js} +2 -2
  21. package/dist/{chunk-TNZBQAUR.js → chunk-I45WFYGM.js} +2 -2
  22. package/dist/{chunk-ADG6NBZY.js → chunk-IFOFBI3U.js} +4 -4
  23. package/dist/chunk-IFOFBI3U.js.map +1 -0
  24. package/dist/{chunk-YJZQRFET.js → chunk-JPZBWHNZ.js} +2 -2
  25. package/dist/{chunk-GI5CY27P.js → chunk-LH3GOBZP.js} +2 -2
  26. package/dist/chunk-LQS27HSV.js +6 -0
  27. package/dist/chunk-LQS27HSV.js.map +1 -0
  28. package/dist/{chunk-YBUCVI45.js → chunk-MM3ABEOW.js} +2 -2
  29. package/dist/{chunk-E4V5EADX.js → chunk-MWYPW5XP.js} +2 -2
  30. package/dist/{chunk-LOTCKF22.js → chunk-RJCHFDF3.js} +2 -2
  31. package/dist/{chunk-DZUJP6L7.js → chunk-RUQMUDSX.js} +2 -2
  32. package/dist/{chunk-UFYKUC4E.js → chunk-S5FRIHWM.js} +2 -2
  33. package/dist/{chunk-ILZRO6SN.js → chunk-UUVJX6WD.js} +2 -2
  34. package/dist/{chunk-JHAQE46R.js → chunk-VAK4LT62.js} +18 -18
  35. package/dist/chunk-VAK4LT62.js.map +1 -0
  36. package/dist/{chunk-P4EZJIQ4.js → chunk-XQ2VU6MM.js} +282 -266
  37. package/dist/chunk-XQ2VU6MM.js.map +1 -0
  38. package/dist/{chunk-LDLRDBAD.js → chunk-Z2KGUEB6.js} +2 -2
  39. package/dist/chunk-ZAH74SFX.js +36 -0
  40. package/dist/chunk-ZAH74SFX.js.map +1 -0
  41. package/dist/{chunk-VIZVF6KH.js → chunk-ZQONMM3B.js} +2 -2
  42. package/dist/cli.js +1 -1
  43. package/dist/{client-6IOWB5AT.js → client-PBIUMGDL.js} +2 -2
  44. package/dist/{config-SHIT5WJE.js → config-VLH5DJTH.js} +2 -2
  45. package/dist/{config-mutate-6ACI5COM.js → config-mutate-G7HW2R6H.js} +2 -2
  46. package/dist/config-mutator-XWWW3PSV.js +2 -0
  47. package/dist/{contributions-N7K6LNL7.js → contributions-GZVKJXSJ.js} +2 -2
  48. package/dist/{doctor-T7QAQRCJ.js → doctor-QWVUVWTF.js} +2 -2
  49. package/dist/{follow-up-tool-HQ2GWF4K.js → follow-up-tool-PTKDMFA7.js} +2 -2
  50. package/dist/{grants-HSLB62EG.js → grants-YGA654NI.js} +2 -2
  51. package/dist/{hub-53IMEYGX.js → hub-BHCBRQZP.js} +2 -2
  52. package/dist/index.d.ts +217 -2
  53. package/dist/index.js +1 -1
  54. package/dist/{program-LSXONKPW.js → program-2YK3YCBX.js} +192 -192
  55. package/dist/program-2YK3YCBX.js.map +1 -0
  56. package/dist/{promote-626PE5VM.js → promote-73ZGTRDV.js} +2 -2
  57. package/dist/{query-GR3SOD6A.js → query-KHW4AERR.js} +2 -2
  58. package/dist/{query-settings-6XZHNFXE.js → query-settings-P6RUUEFO.js} +2 -2
  59. package/dist/{registry-SAY7ROZV.js → registry-RQBXAPUZ.js} +2 -2
  60. package/dist/{request-planner-DWYXUVF4.js → request-planner-EUIMJ7R3.js} +2 -2
  61. package/dist/{review-candidates-GXWMKZKA.js → review-candidates-KKGDAZIB.js} +2 -2
  62. package/dist/{routing-TB6BBRH4.js → routing-FQNGOTMV.js} +2 -2
  63. package/dist/schedule-tool-2OWGAK4H.js +2 -0
  64. package/dist/{scheduler-VOZIMG5F.js → scheduler-JXZBVPOS.js} +2 -2
  65. package/dist/{seat-H6F6H55Y.js → seat-DZB3NSZ7.js} +2 -2
  66. package/dist/{select-OUBL6EMZ.js → select-YD4CA7FP.js} +2 -2
  67. package/dist/{set-enabled-NYJHFXHY.js → set-enabled-UK4SE5MZ.js} +2 -2
  68. package/dist/{tool-FWATXW5Q.js → tool-2PA2USUG.js} +2 -2
  69. package/dist/{tool-HXFGNBLS.js → tool-DIJN4XBY.js} +2 -2
  70. package/dist/{wiki-PG5ZBOMH.js → wiki-CQBXLZ2Y.js} +2 -2
  71. package/dist/wiki-enrich-PA6JS2YN.js +2 -0
  72. package/package.json +1 -1
  73. package/dist/chunk-24QMHUU2.js +0 -5
  74. package/dist/chunk-24QMHUU2.js.map +0 -1
  75. package/dist/chunk-ADG6NBZY.js.map +0 -1
  76. package/dist/chunk-JHAQE46R.js.map +0 -1
  77. package/dist/chunk-JJOLZPUY.js +0 -35
  78. package/dist/chunk-JJOLZPUY.js.map +0 -1
  79. package/dist/chunk-P4EZJIQ4.js.map +0 -1
  80. package/dist/config-mutator-LAEX6HOH.js +0 -2
  81. package/dist/program-LSXONKPW.js.map +0 -1
  82. package/dist/schedule-tool-EI2SRMZM.js +0 -2
  83. package/dist/wiki-enrich-BIQZWJRB.js +0 -2
  84. /package/dist/{App-NCB3Y5DS.js.map → App-2SWSYFED.js.map} +0 -0
  85. /package/dist/{ChatApp-HOWN5H7Y.js.map → ChatApp-NYTNFLIB.js.map} +0 -0
  86. /package/dist/{absorb-eval-JXRNSZII.js.map → absorb-eval-SYX5QN4H.js.map} +0 -0
  87. /package/dist/{agent-DMXUUMEU.js.map → agent-UCYQELAQ.js.map} +0 -0
  88. /package/dist/{chunk-QSNKF5VD.js.map → chunk-2J2OES2S.js.map} +0 -0
  89. /package/dist/{chunk-HS7ATV4Z.js.map → chunk-3LU2ZQZJ.js.map} +0 -0
  90. /package/dist/{chunk-CZEBLLZQ.js.map → chunk-3OPW64OM.js.map} +0 -0
  91. /package/dist/{chunk-MTBY46CL.js.map → chunk-5DPN2HIR.js.map} +0 -0
  92. /package/dist/{chunk-XE3CGJV4.js.map → chunk-BFONYVOM.js.map} +0 -0
  93. /package/dist/{chunk-R4R7EYY3.js.map → chunk-BNOGNRAM.js.map} +0 -0
  94. /package/dist/{chunk-PC24JMEH.js.map → chunk-CFPRIE6F.js.map} +0 -0
  95. /package/dist/{chunk-P25TJ4XN.js.map → chunk-DPSHY7GN.js.map} +0 -0
  96. /package/dist/{chunk-JDX7AYIB.js.map → chunk-DZRD6BE4.js.map} +0 -0
  97. /package/dist/{chunk-PGLTBNGZ.js.map → chunk-FVRREIVV.js.map} +0 -0
  98. /package/dist/{chunk-7UH3DXAG.js.map → chunk-GDLO7FC7.js.map} +0 -0
  99. /package/dist/{chunk-RNAKP7WY.js.map → chunk-HVNWI63Z.js.map} +0 -0
  100. /package/dist/{chunk-TNZBQAUR.js.map → chunk-I45WFYGM.js.map} +0 -0
  101. /package/dist/{chunk-YJZQRFET.js.map → chunk-JPZBWHNZ.js.map} +0 -0
  102. /package/dist/{chunk-GI5CY27P.js.map → chunk-LH3GOBZP.js.map} +0 -0
  103. /package/dist/{chunk-YBUCVI45.js.map → chunk-MM3ABEOW.js.map} +0 -0
  104. /package/dist/{chunk-E4V5EADX.js.map → chunk-MWYPW5XP.js.map} +0 -0
  105. /package/dist/{chunk-LOTCKF22.js.map → chunk-RJCHFDF3.js.map} +0 -0
  106. /package/dist/{chunk-DZUJP6L7.js.map → chunk-RUQMUDSX.js.map} +0 -0
  107. /package/dist/{chunk-UFYKUC4E.js.map → chunk-S5FRIHWM.js.map} +0 -0
  108. /package/dist/{chunk-ILZRO6SN.js.map → chunk-UUVJX6WD.js.map} +0 -0
  109. /package/dist/{chunk-LDLRDBAD.js.map → chunk-Z2KGUEB6.js.map} +0 -0
  110. /package/dist/{chunk-VIZVF6KH.js.map → chunk-ZQONMM3B.js.map} +0 -0
  111. /package/dist/{client-6IOWB5AT.js.map → client-PBIUMGDL.js.map} +0 -0
  112. /package/dist/{config-SHIT5WJE.js.map → config-VLH5DJTH.js.map} +0 -0
  113. /package/dist/{config-mutate-6ACI5COM.js.map → config-mutate-G7HW2R6H.js.map} +0 -0
  114. /package/dist/{config-mutator-LAEX6HOH.js.map → config-mutator-XWWW3PSV.js.map} +0 -0
  115. /package/dist/{contributions-N7K6LNL7.js.map → contributions-GZVKJXSJ.js.map} +0 -0
  116. /package/dist/{doctor-T7QAQRCJ.js.map → doctor-QWVUVWTF.js.map} +0 -0
  117. /package/dist/{follow-up-tool-HQ2GWF4K.js.map → follow-up-tool-PTKDMFA7.js.map} +0 -0
  118. /package/dist/{grants-HSLB62EG.js.map → grants-YGA654NI.js.map} +0 -0
  119. /package/dist/{hub-53IMEYGX.js.map → hub-BHCBRQZP.js.map} +0 -0
  120. /package/dist/{promote-626PE5VM.js.map → promote-73ZGTRDV.js.map} +0 -0
  121. /package/dist/{query-GR3SOD6A.js.map → query-KHW4AERR.js.map} +0 -0
  122. /package/dist/{query-settings-6XZHNFXE.js.map → query-settings-P6RUUEFO.js.map} +0 -0
  123. /package/dist/{registry-SAY7ROZV.js.map → registry-RQBXAPUZ.js.map} +0 -0
  124. /package/dist/{request-planner-DWYXUVF4.js.map → request-planner-EUIMJ7R3.js.map} +0 -0
  125. /package/dist/{review-candidates-GXWMKZKA.js.map → review-candidates-KKGDAZIB.js.map} +0 -0
  126. /package/dist/{routing-TB6BBRH4.js.map → routing-FQNGOTMV.js.map} +0 -0
  127. /package/dist/{schedule-tool-EI2SRMZM.js.map → schedule-tool-2OWGAK4H.js.map} +0 -0
  128. /package/dist/{scheduler-VOZIMG5F.js.map → scheduler-JXZBVPOS.js.map} +0 -0
  129. /package/dist/{seat-H6F6H55Y.js.map → seat-DZB3NSZ7.js.map} +0 -0
  130. /package/dist/{select-OUBL6EMZ.js.map → select-YD4CA7FP.js.map} +0 -0
  131. /package/dist/{set-enabled-NYJHFXHY.js.map → set-enabled-UK4SE5MZ.js.map} +0 -0
  132. /package/dist/{tool-FWATXW5Q.js.map → tool-2PA2USUG.js.map} +0 -0
  133. /package/dist/{tool-HXFGNBLS.js.map → tool-DIJN4XBY.js.map} +0 -0
  134. /package/dist/{wiki-PG5ZBOMH.js.map → wiki-CQBXLZ2Y.js.map} +0 -0
  135. /package/dist/{wiki-enrich-BIQZWJRB.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.
@@ -6684,7 +6734,7 @@ declare const daemonConfigSchema: z.ZodObject<{
6684
6734
  /** Pinned pages: https pages the owner opens from a button in the
6685
6735
  * phone app (#1120). Added, renamed and removed from the app or with
6686
6736
  * `agentx app pin`. */
6687
- pins: z.ZodDefault<z.ZodObject<{
6737
+ pins: z.ZodDefault<z.ZodEffects<z.ZodObject<{
6688
6738
  /** Where the list is kept. Relative paths resolve from the folder
6689
6739
  * the daemon runs in (the one holding agentx.json). */
6690
6740
  file: z.ZodDefault<z.ZodString>;
@@ -6716,6 +6766,20 @@ declare const daemonConfigSchema: z.ZodObject<{
6716
6766
  label: string;
6717
6767
  url: string;
6718
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;
6719
6783
  }>>;
6720
6784
  }, "strip", z.ZodTypeAny, {
6721
6785
  android: {
@@ -9538,6 +9602,7 @@ declare const daemonConfigSchema: z.ZodObject<{
9538
9602
  banner: boolean;
9539
9603
  soundName: string;
9540
9604
  volume: number;
9605
+ quietWaitSeconds: number;
9541
9606
  icon?: string | undefined;
9542
9607
  };
9543
9608
  on: {
@@ -9546,6 +9611,13 @@ declare const daemonConfigSchema: z.ZodObject<{
9546
9611
  taskQueued: boolean;
9547
9612
  };
9548
9613
  longTaskThreshold: number;
9614
+ told: {
9615
+ enabled: boolean;
9616
+ channels: string[];
9617
+ repeatWindowHours: number;
9618
+ addresses: string[];
9619
+ digestNags: boolean;
9620
+ };
9549
9621
  channel?: string | undefined;
9550
9622
  destination?: {
9551
9623
  channel: string;
@@ -10705,6 +10777,7 @@ declare const daemonConfigSchema: z.ZodObject<{
10705
10777
  soundName?: string | undefined;
10706
10778
  volume?: number | undefined;
10707
10779
  icon?: string | undefined;
10780
+ quietWaitSeconds?: number | undefined;
10708
10781
  } | undefined;
10709
10782
  channel?: string | undefined;
10710
10783
  on?: {
@@ -10718,6 +10791,13 @@ declare const daemonConfigSchema: z.ZodObject<{
10718
10791
  chatId: string;
10719
10792
  accountId?: string | undefined;
10720
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;
10721
10801
  } | undefined;
10722
10802
  calls?: {
10723
10803
  summary?: boolean | undefined;
@@ -11949,6 +12029,9 @@ declare class AgentXDaemon {
11949
12029
  }>;
11950
12030
  /** Open requests (src/requests); null when the database is unavailable. */
11951
12031
  private requests;
12032
+ /** The told-the-owner gate (#1126). Null without a database. */
12033
+ private ownerGate;
12034
+ private toldPrunedAt;
11952
12035
  /** Guest meshes (#380): the grants this node opened, and the join limiter. */
11953
12036
  private guestStore;
11954
12037
  private guestJoinLimiter;
@@ -12005,7 +12088,9 @@ declare class AgentXDaemon {
12005
12088
  /** GET /screen: every source read on its own, so one that fails is
12006
12089
  * named and the rest still show. */
12007
12090
  private screenView;
12008
- /** 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). */
12009
12094
  private notifyRequestOwner;
12010
12095
  private plansSweeping;
12011
12096
  private plansKick?;
@@ -12038,6 +12123,16 @@ declare class AgentXDaemon {
12038
12123
  /** Tell the owner through the notify path: a push to the default
12039
12124
  * channel, the Mac banner where there is one (#788). */
12040
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;
12041
12136
  /** A card raised for a workflow (#788): a step's answer resumes its
12042
12137
  * run; a proposed workflow is kept (switched on) on a yes. */
12043
12138
  private workflowCardResult;
@@ -12583,6 +12678,17 @@ interface OutgoingMessage {
12583
12678
  label: string;
12584
12679
  url: string;
12585
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
+ };
12586
12692
  }
12587
12693
  interface ChannelAdapter {
12588
12694
  readonly name: string;
@@ -17431,6 +17537,110 @@ declare class BusinessLayer {
17431
17537
  summary(): string;
17432
17538
  }
17433
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
+
17434
17644
  /** A run that was still going when the previous daemon stopped. */
17435
17645
  interface InterruptedRun {
17436
17646
  taskId: string;
@@ -17467,6 +17677,11 @@ declare class MessageRouter {
17467
17677
  private registry;
17468
17678
  private config;
17469
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;
17470
17685
  private hooks?;
17471
17686
  private mesh?;
17472
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-P4EZJIQ4.js";import"./chunk-JHAQE46R.js";import"./chunk-GTJIKXDB.js";import"./chunk-7UH3DXAG.js";import"./chunk-JJOLZPUY.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-HS7ATV4Z.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-VIZVF6KH.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-MTBY46CL.js";import"./chunk-UFYKUC4E.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-E4V5EADX.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-GI5CY27P.js";import"./chunk-XE3CGJV4.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-DZUJP6L7.js";import{a as ht}from"./chunk-YJZQRFET.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-P25TJ4XN.js";import"./chunk-SKSYII3K.js";import{f as gt,g as ft}from"./chunk-LOTCKF22.js";import"./chunk-WPNRDEHW.js";import"./chunk-MWNCS57L.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-LDLRDBAD.js";import{j as it,k as rt,l as at}from"./chunk-RNAKP7WY.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-SQUTRMKH.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-XQ2VU6MM.js";import"./chunk-VAK4LT62.js";import"./chunk-GTJIKXDB.js";import"./chunk-GDLO7FC7.js";import"./chunk-ZAH74SFX.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-BNOGNRAM.js";import"./chunk-LQS27HSV.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).