agentix-cli 0.72.0 → 0.74.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 (112) hide show
  1. package/dist/{App-244WEQJR.js → App-U2MOUDOM.js} +2 -2
  2. package/dist/{ChatApp-SFP6SHUU.js → ChatApp-YY4RGZSI.js} +2 -2
  3. package/dist/{agent-PMNBXRFW.js → agent-HEL3Y4NA.js} +2 -2
  4. package/dist/{board-dashboard-J34PSEJS.js → board-dashboard-GNMELVCM.js} +262 -179
  5. package/dist/board-dashboard-GNMELVCM.js.map +1 -0
  6. package/dist/{chunk-335JCO5R.js → chunk-22TKLH6A.js} +170 -170
  7. package/dist/chunk-22TKLH6A.js.map +1 -0
  8. package/dist/{chunk-OSHG52OO.js → chunk-2RGXCUE3.js} +26 -26
  9. package/dist/{chunk-OSHG52OO.js.map → chunk-2RGXCUE3.js.map} +1 -1
  10. package/dist/{chunk-PY54XYAG.js → chunk-3TQ2WONT.js} +2 -2
  11. package/dist/{chunk-OWRPCMGW.js → chunk-6PUNM3Y7.js} +233 -214
  12. package/dist/chunk-6PUNM3Y7.js.map +1 -0
  13. package/dist/chunk-7XB2CVC3.js +2 -0
  14. package/dist/chunk-7XB2CVC3.js.map +1 -0
  15. package/dist/{chunk-DMWFRKWR.js → chunk-BOY572B3.js} +2 -2
  16. package/dist/{chunk-QKV7FN67.js → chunk-CVEL3UBP.js} +2 -2
  17. package/dist/{chunk-YVLFX35J.js → chunk-DEYXG7OA.js} +2 -2
  18. package/dist/{chunk-55N4VTWX.js → chunk-E343ELHB.js} +2 -2
  19. package/dist/{chunk-576L7ZFD.js → chunk-HAUOH34T.js} +2 -2
  20. package/dist/{chunk-7XR5LGLD.js → chunk-HGEZBEBI.js} +2 -2
  21. package/dist/{chunk-PC5LKW3L.js → chunk-HX4AF2N4.js} +2 -2
  22. package/dist/{chunk-FMUOVVXX.js → chunk-IEEKRDVW.js} +2 -2
  23. package/dist/{chunk-VWMO4C72.js → chunk-JXBXIH23.js} +2 -2
  24. package/dist/{chunk-MESWF2ZM.js → chunk-MMTP7WWU.js} +2 -2
  25. package/dist/{chunk-UFPWMNUW.js → chunk-RDEDIOAH.js} +2 -2
  26. package/dist/{chunk-PHSYP22H.js → chunk-ROKRMNVL.js} +2 -2
  27. package/dist/{chunk-J6RZOP7Z.js → chunk-S4NYBA3M.js} +2 -2
  28. package/dist/{chunk-PBRI3MTE.js → chunk-TUPHLC77.js} +2 -2
  29. package/dist/chunk-U7LOXDIP.js +15 -0
  30. package/dist/chunk-U7LOXDIP.js.map +1 -0
  31. package/dist/{chunk-Z5TXWHDN.js → chunk-W7XQCUDK.js} +2 -2
  32. package/dist/{chunk-FWQVXZ5T.js → chunk-WIBDEAAB.js} +32 -30
  33. package/dist/chunk-WIBDEAAB.js.map +1 -0
  34. package/dist/{chunk-TT4T6CB3.js → chunk-X6MK5VK3.js} +2 -2
  35. package/dist/cli.js +1 -1
  36. package/dist/client-7SK3SEQV.js +2 -0
  37. package/dist/{config-X7BHZ75G.js → config-6UXC7MPC.js} +2 -2
  38. package/dist/config-mutator-QNTAKNI7.js +2 -0
  39. package/dist/doctor-FNM7ZKP3.js +2 -0
  40. package/dist/{facts-X44PF73W.js → facts-2K6UX5GD.js} +6 -6
  41. package/dist/facts-2K6UX5GD.js.map +1 -0
  42. package/dist/index.d.ts +251 -6
  43. package/dist/index.js +1 -1
  44. package/dist/program-3DYKSCIY.js +2 -0
  45. package/dist/{promote-36XF4LH7.js → promote-I5QCWYXG.js} +2 -2
  46. package/dist/{query-YFZ6GWHU.js → query-WNOCMO46.js} +2 -2
  47. package/dist/{registry-WJSGG62F.js → registry-KXNT3HID.js} +2 -2
  48. package/dist/{request-planner-OXRWVBXI.js → request-planner-VAHGNG7U.js} +2 -2
  49. package/dist/{review-candidates-5XZWP2BN.js → review-candidates-UQJ3IA2Z.js} +2 -2
  50. package/dist/{routing-XEPCPLVM.js → routing-AVMCSZXP.js} +2 -2
  51. package/dist/schedule-tool-O47FNQ3A.js +2 -0
  52. package/dist/scheduler-DBAQHLHQ.js +2 -0
  53. package/dist/{seat-FGFHW363.js → seat-2GOJBTII.js} +2 -2
  54. package/dist/{select-N6CIZF2S.js → select-GIDPNJAA.js} +2 -2
  55. package/dist/{set-enabled-L7Z6H7EG.js → set-enabled-QW33PWJV.js} +2 -2
  56. package/dist/{tool-OSH6GHIF.js → tool-RXQ4F6HI.js} +2 -2
  57. package/dist/wiki-T22CW4EY.js +2 -0
  58. package/package.json +1 -1
  59. package/dist/board-dashboard-J34PSEJS.js.map +0 -1
  60. package/dist/chunk-335JCO5R.js.map +0 -1
  61. package/dist/chunk-FWQVXZ5T.js.map +0 -1
  62. package/dist/chunk-NMFXY3QU.js +0 -2
  63. package/dist/chunk-NMFXY3QU.js.map +0 -1
  64. package/dist/chunk-OWRPCMGW.js.map +0 -1
  65. package/dist/chunk-RAYOK4GI.js +0 -15
  66. package/dist/chunk-RAYOK4GI.js.map +0 -1
  67. package/dist/client-L4JAPXTE.js +0 -2
  68. package/dist/config-mutator-R2KBGTZJ.js +0 -2
  69. package/dist/doctor-5VFQVAVC.js +0 -2
  70. package/dist/facts-X44PF73W.js.map +0 -1
  71. package/dist/program-6C3G65YA.js +0 -2
  72. package/dist/schedule-tool-WQCO2YUG.js +0 -2
  73. package/dist/scheduler-4NQ62XDK.js +0 -2
  74. package/dist/wiki-E46QDRS7.js +0 -2
  75. /package/dist/{App-244WEQJR.js.map → App-U2MOUDOM.js.map} +0 -0
  76. /package/dist/{ChatApp-SFP6SHUU.js.map → ChatApp-YY4RGZSI.js.map} +0 -0
  77. /package/dist/{agent-PMNBXRFW.js.map → agent-HEL3Y4NA.js.map} +0 -0
  78. /package/dist/{chunk-PY54XYAG.js.map → chunk-3TQ2WONT.js.map} +0 -0
  79. /package/dist/{chunk-DMWFRKWR.js.map → chunk-BOY572B3.js.map} +0 -0
  80. /package/dist/{chunk-QKV7FN67.js.map → chunk-CVEL3UBP.js.map} +0 -0
  81. /package/dist/{chunk-YVLFX35J.js.map → chunk-DEYXG7OA.js.map} +0 -0
  82. /package/dist/{chunk-55N4VTWX.js.map → chunk-E343ELHB.js.map} +0 -0
  83. /package/dist/{chunk-576L7ZFD.js.map → chunk-HAUOH34T.js.map} +0 -0
  84. /package/dist/{chunk-7XR5LGLD.js.map → chunk-HGEZBEBI.js.map} +0 -0
  85. /package/dist/{chunk-PC5LKW3L.js.map → chunk-HX4AF2N4.js.map} +0 -0
  86. /package/dist/{chunk-FMUOVVXX.js.map → chunk-IEEKRDVW.js.map} +0 -0
  87. /package/dist/{chunk-VWMO4C72.js.map → chunk-JXBXIH23.js.map} +0 -0
  88. /package/dist/{chunk-MESWF2ZM.js.map → chunk-MMTP7WWU.js.map} +0 -0
  89. /package/dist/{chunk-UFPWMNUW.js.map → chunk-RDEDIOAH.js.map} +0 -0
  90. /package/dist/{chunk-PHSYP22H.js.map → chunk-ROKRMNVL.js.map} +0 -0
  91. /package/dist/{chunk-J6RZOP7Z.js.map → chunk-S4NYBA3M.js.map} +0 -0
  92. /package/dist/{chunk-PBRI3MTE.js.map → chunk-TUPHLC77.js.map} +0 -0
  93. /package/dist/{chunk-Z5TXWHDN.js.map → chunk-W7XQCUDK.js.map} +0 -0
  94. /package/dist/{chunk-TT4T6CB3.js.map → chunk-X6MK5VK3.js.map} +0 -0
  95. /package/dist/{client-L4JAPXTE.js.map → client-7SK3SEQV.js.map} +0 -0
  96. /package/dist/{config-X7BHZ75G.js.map → config-6UXC7MPC.js.map} +0 -0
  97. /package/dist/{config-mutator-R2KBGTZJ.js.map → config-mutator-QNTAKNI7.js.map} +0 -0
  98. /package/dist/{doctor-5VFQVAVC.js.map → doctor-FNM7ZKP3.js.map} +0 -0
  99. /package/dist/{program-6C3G65YA.js.map → program-3DYKSCIY.js.map} +0 -0
  100. /package/dist/{promote-36XF4LH7.js.map → promote-I5QCWYXG.js.map} +0 -0
  101. /package/dist/{query-YFZ6GWHU.js.map → query-WNOCMO46.js.map} +0 -0
  102. /package/dist/{registry-WJSGG62F.js.map → registry-KXNT3HID.js.map} +0 -0
  103. /package/dist/{request-planner-OXRWVBXI.js.map → request-planner-VAHGNG7U.js.map} +0 -0
  104. /package/dist/{review-candidates-5XZWP2BN.js.map → review-candidates-UQJ3IA2Z.js.map} +0 -0
  105. /package/dist/{routing-XEPCPLVM.js.map → routing-AVMCSZXP.js.map} +0 -0
  106. /package/dist/{schedule-tool-WQCO2YUG.js.map → schedule-tool-O47FNQ3A.js.map} +0 -0
  107. /package/dist/{scheduler-4NQ62XDK.js.map → scheduler-DBAQHLHQ.js.map} +0 -0
  108. /package/dist/{seat-FGFHW363.js.map → seat-2GOJBTII.js.map} +0 -0
  109. /package/dist/{select-N6CIZF2S.js.map → select-GIDPNJAA.js.map} +0 -0
  110. /package/dist/{set-enabled-L7Z6H7EG.js.map → set-enabled-QW33PWJV.js.map} +0 -0
  111. /package/dist/{tool-OSH6GHIF.js.map → tool-RXQ4F6HI.js.map} +0 -0
  112. /package/dist/{wiki-E46QDRS7.js.map → wiki-T22CW4EY.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -4173,6 +4173,145 @@ declare const daemonConfigSchema: z.ZodObject<{
4173
4173
  ringSeconds?: number | undefined;
4174
4174
  ringSound?: string | undefined;
4175
4175
  }>>;
4176
+ /** Watched WhatsApp chats triaged by an agent (src/whatsapp-triage). */
4177
+ whatsappTriage: z.ZodDefault<z.ZodObject<{
4178
+ enabled: z.ZodDefault<z.ZodBoolean>;
4179
+ secretEnv: z.ZodDefault<z.ZodString>;
4180
+ batchSeconds: z.ZodDefault<z.ZodNumber>;
4181
+ timezone: z.ZodOptional<z.ZodString>;
4182
+ allowAutoAck: z.ZodDefault<z.ZodBoolean>;
4183
+ describeMedia: z.ZodDefault<z.ZodBoolean>;
4184
+ wacli: z.ZodDefault<z.ZodObject<{
4185
+ bin: z.ZodDefault<z.ZodString>;
4186
+ account: z.ZodOptional<z.ZodString>;
4187
+ store: z.ZodOptional<z.ZodString>;
4188
+ }, "strip", z.ZodTypeAny, {
4189
+ bin: string;
4190
+ store?: string | undefined;
4191
+ account?: string | undefined;
4192
+ }, {
4193
+ store?: string | undefined;
4194
+ bin?: string | undefined;
4195
+ account?: string | undefined;
4196
+ }>>;
4197
+ rules: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
4198
+ id: z.ZodString;
4199
+ enabled: z.ZodDefault<z.ZodBoolean>;
4200
+ chats: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4201
+ senders: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4202
+ agent: z.ZodString;
4203
+ prompt: z.ZodOptional<z.ZodString>;
4204
+ quietHours: z.ZodOptional<z.ZodObject<{
4205
+ start: z.ZodString;
4206
+ end: z.ZodString;
4207
+ }, "strip", z.ZodTypeAny, {
4208
+ end: string;
4209
+ start: string;
4210
+ }, {
4211
+ end: string;
4212
+ start: string;
4213
+ }>>;
4214
+ autoAck: z.ZodDefault<z.ZodBoolean>;
4215
+ }, "strip", z.ZodTypeAny, {
4216
+ enabled: boolean;
4217
+ agent: string;
4218
+ id: string;
4219
+ chats: string[];
4220
+ senders: string[];
4221
+ autoAck: boolean;
4222
+ prompt?: string | undefined;
4223
+ quietHours?: {
4224
+ end: string;
4225
+ start: string;
4226
+ } | undefined;
4227
+ }, {
4228
+ agent: string;
4229
+ id: string;
4230
+ enabled?: boolean | undefined;
4231
+ prompt?: string | undefined;
4232
+ chats?: string[] | undefined;
4233
+ senders?: string[] | undefined;
4234
+ quietHours?: {
4235
+ end: string;
4236
+ start: string;
4237
+ } | undefined;
4238
+ autoAck?: boolean | undefined;
4239
+ }>, {
4240
+ enabled: boolean;
4241
+ agent: string;
4242
+ id: string;
4243
+ chats: string[];
4244
+ senders: string[];
4245
+ autoAck: boolean;
4246
+ prompt?: string | undefined;
4247
+ quietHours?: {
4248
+ end: string;
4249
+ start: string;
4250
+ } | undefined;
4251
+ }, {
4252
+ agent: string;
4253
+ id: string;
4254
+ enabled?: boolean | undefined;
4255
+ prompt?: string | undefined;
4256
+ chats?: string[] | undefined;
4257
+ senders?: string[] | undefined;
4258
+ quietHours?: {
4259
+ end: string;
4260
+ start: string;
4261
+ } | undefined;
4262
+ autoAck?: boolean | undefined;
4263
+ }>, "many">>;
4264
+ }, "strip", z.ZodTypeAny, {
4265
+ enabled: boolean;
4266
+ secretEnv: string;
4267
+ batchSeconds: number;
4268
+ allowAutoAck: boolean;
4269
+ describeMedia: boolean;
4270
+ wacli: {
4271
+ bin: string;
4272
+ store?: string | undefined;
4273
+ account?: string | undefined;
4274
+ };
4275
+ rules: {
4276
+ enabled: boolean;
4277
+ agent: string;
4278
+ id: string;
4279
+ chats: string[];
4280
+ senders: string[];
4281
+ autoAck: boolean;
4282
+ prompt?: string | undefined;
4283
+ quietHours?: {
4284
+ end: string;
4285
+ start: string;
4286
+ } | undefined;
4287
+ }[];
4288
+ timezone?: string | undefined;
4289
+ }, {
4290
+ enabled?: boolean | undefined;
4291
+ timezone?: string | undefined;
4292
+ secretEnv?: string | undefined;
4293
+ batchSeconds?: number | undefined;
4294
+ allowAutoAck?: boolean | undefined;
4295
+ describeMedia?: boolean | undefined;
4296
+ wacli?: {
4297
+ store?: string | undefined;
4298
+ bin?: string | undefined;
4299
+ account?: string | undefined;
4300
+ } | undefined;
4301
+ rules?: {
4302
+ agent: string;
4303
+ id: string;
4304
+ enabled?: boolean | undefined;
4305
+ prompt?: string | undefined;
4306
+ chats?: string[] | undefined;
4307
+ senders?: string[] | undefined;
4308
+ quietHours?: {
4309
+ end: string;
4310
+ start: string;
4311
+ } | undefined;
4312
+ autoAck?: boolean | undefined;
4313
+ }[] | undefined;
4314
+ }>>;
4176
4315
  approvals: z.ZodDefault<z.ZodObject<{
4177
4316
  /** A card without an `expires` gets this many days. */
4178
4317
  defaultExpiryDays: z.ZodDefault<z.ZodNumber>;
@@ -4260,9 +4399,46 @@ declare const daemonConfigSchema: z.ZodObject<{
4260
4399
  * AGENTX_DRAIN_TIMEOUT_MS env var, else 300 s. Keep the service
4261
4400
  * manager's stop timeout above it, or it kills the daemon mid-wait. */
4262
4401
  drainTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
4402
+ /** Who may ask for "restart when idle", and what happens to the others.
4403
+ * Unset: any caller may, and onTimeout "restart" is honoured. */
4404
+ restart: z.ZodDefault<z.ZodObject<{
4405
+ /** Regular expression matched against the request's `by`. Requests
4406
+ * from anyone else are held until `window`, or refused when there
4407
+ * is no window. */
4408
+ allowBy: z.ZodOptional<z.ZodString>;
4409
+ /** Local time "HH:MM" at which held requests start an idle-only wait. */
4410
+ window: z.ZodOptional<z.ZodString>;
4411
+ /** How long that wait lasts before it gives up. */
4412
+ windowWaitMinutes: z.ZodDefault<z.ZodNumber>;
4413
+ /** Turn every request into an idle-only one: a wait that runs out
4414
+ * gives up instead of restarting over running work. */
4415
+ forbidOnTimeoutRestart: z.ZodDefault<z.ZodBoolean>;
4416
+ }, "strip", z.ZodTypeAny, {
4417
+ windowWaitMinutes: number;
4418
+ forbidOnTimeoutRestart: boolean;
4419
+ allowBy?: string | undefined;
4420
+ window?: string | undefined;
4421
+ }, {
4422
+ allowBy?: string | undefined;
4423
+ window?: string | undefined;
4424
+ windowWaitMinutes?: number | undefined;
4425
+ forbidOnTimeoutRestart?: boolean | undefined;
4426
+ }>>;
4263
4427
  }, "strip", z.ZodTypeAny, {
4428
+ restart: {
4429
+ windowWaitMinutes: number;
4430
+ forbidOnTimeoutRestart: boolean;
4431
+ allowBy?: string | undefined;
4432
+ window?: string | undefined;
4433
+ };
4264
4434
  drainTimeoutSeconds?: number | undefined;
4265
4435
  }, {
4436
+ restart?: {
4437
+ allowBy?: string | undefined;
4438
+ window?: string | undefined;
4439
+ windowWaitMinutes?: number | undefined;
4440
+ forbidOnTimeoutRestart?: boolean | undefined;
4441
+ } | undefined;
4266
4442
  drainTimeoutSeconds?: number | undefined;
4267
4443
  }>>;
4268
4444
  /** What happens to runs a restart cuts off (agents/resume). Chat messages
@@ -5217,8 +5393,6 @@ declare const daemonConfigSchema: z.ZodObject<{
5217
5393
  dashboardUrl?: string | undefined;
5218
5394
  dashboardToken?: string | undefined;
5219
5395
  }>, "many">>;
5220
- /** A keyboard shortcut for AgentX Voice, e.g. "opt+space" or
5221
- * "ctrl+opt+1". See src/voice/hotkey.ts. */
5222
5396
  draftAgent: z.ZodOptional<z.ZodString>;
5223
5397
  }, "strip", z.ZodTypeAny, {
5224
5398
  enabled: boolean;
@@ -5880,8 +6054,8 @@ declare const daemonConfigSchema: z.ZodObject<{
5880
6054
  agentId: string;
5881
6055
  description?: string | undefined;
5882
6056
  triggers?: Record<string, string> | undefined;
5883
- node?: string | undefined;
5884
6057
  secretEnv?: string | undefined;
6058
+ node?: string | undefined;
5885
6059
  defaultWorkflow?: string | undefined;
5886
6060
  }, {
5887
6061
  id: string;
@@ -5890,8 +6064,8 @@ declare const daemonConfigSchema: z.ZodObject<{
5890
6064
  enabled?: boolean | undefined;
5891
6065
  description?: string | undefined;
5892
6066
  triggers?: Record<string, string> | undefined;
5893
- node?: string | undefined;
5894
6067
  secretEnv?: string | undefined;
6068
+ node?: string | undefined;
5895
6069
  defaultWorkflow?: string | undefined;
5896
6070
  }>, "many">>;
5897
6071
  /** Session cache-reuse policy. Controls when we drop a Claude `--resume`
@@ -6396,6 +6570,32 @@ declare const daemonConfigSchema: z.ZodObject<{
6396
6570
  ringSeconds: number;
6397
6571
  ringSound: string;
6398
6572
  };
6573
+ whatsappTriage: {
6574
+ enabled: boolean;
6575
+ secretEnv: string;
6576
+ batchSeconds: number;
6577
+ allowAutoAck: boolean;
6578
+ describeMedia: boolean;
6579
+ wacli: {
6580
+ bin: string;
6581
+ store?: string | undefined;
6582
+ account?: string | undefined;
6583
+ };
6584
+ rules: {
6585
+ enabled: boolean;
6586
+ agent: string;
6587
+ id: string;
6588
+ chats: string[];
6589
+ senders: string[];
6590
+ autoAck: boolean;
6591
+ prompt?: string | undefined;
6592
+ quietHours?: {
6593
+ end: string;
6594
+ start: string;
6595
+ } | undefined;
6596
+ }[];
6597
+ timezone?: string | undefined;
6598
+ };
6399
6599
  approvals: {
6400
6600
  digest: {
6401
6601
  enabled: boolean;
@@ -6413,6 +6613,12 @@ declare const daemonConfigSchema: z.ZodObject<{
6413
6613
  notifyAgent: boolean;
6414
6614
  };
6415
6615
  shutdown: {
6616
+ restart: {
6617
+ windowWaitMinutes: number;
6618
+ forbidOnTimeoutRestart: boolean;
6619
+ allowBy?: string | undefined;
6620
+ window?: string | undefined;
6621
+ };
6416
6622
  drainTimeoutSeconds?: number | undefined;
6417
6623
  };
6418
6624
  reminders: {
@@ -6581,8 +6787,8 @@ declare const daemonConfigSchema: z.ZodObject<{
6581
6787
  agentId: string;
6582
6788
  description?: string | undefined;
6583
6789
  triggers?: Record<string, string> | undefined;
6584
- node?: string | undefined;
6585
6790
  secretEnv?: string | undefined;
6791
+ node?: string | undefined;
6586
6792
  defaultWorkflow?: string | undefined;
6587
6793
  }[];
6588
6794
  session: {
@@ -7070,6 +7276,32 @@ declare const daemonConfigSchema: z.ZodObject<{
7070
7276
  ringSeconds?: number | undefined;
7071
7277
  ringSound?: string | undefined;
7072
7278
  } | undefined;
7279
+ whatsappTriage?: {
7280
+ enabled?: boolean | undefined;
7281
+ timezone?: string | undefined;
7282
+ secretEnv?: string | undefined;
7283
+ batchSeconds?: number | undefined;
7284
+ allowAutoAck?: boolean | undefined;
7285
+ describeMedia?: boolean | undefined;
7286
+ wacli?: {
7287
+ store?: string | undefined;
7288
+ bin?: string | undefined;
7289
+ account?: string | undefined;
7290
+ } | undefined;
7291
+ rules?: {
7292
+ agent: string;
7293
+ id: string;
7294
+ enabled?: boolean | undefined;
7295
+ prompt?: string | undefined;
7296
+ chats?: string[] | undefined;
7297
+ senders?: string[] | undefined;
7298
+ quietHours?: {
7299
+ end: string;
7300
+ start: string;
7301
+ } | undefined;
7302
+ autoAck?: boolean | undefined;
7303
+ }[] | undefined;
7304
+ } | undefined;
7073
7305
  approvals?: {
7074
7306
  digest?: {
7075
7307
  enabled?: boolean | undefined;
@@ -7087,6 +7319,12 @@ declare const daemonConfigSchema: z.ZodObject<{
7087
7319
  notifyAgent?: boolean | undefined;
7088
7320
  } | undefined;
7089
7321
  shutdown?: {
7322
+ restart?: {
7323
+ allowBy?: string | undefined;
7324
+ window?: string | undefined;
7325
+ windowWaitMinutes?: number | undefined;
7326
+ forbidOnTimeoutRestart?: boolean | undefined;
7327
+ } | undefined;
7090
7328
  drainTimeoutSeconds?: number | undefined;
7091
7329
  } | undefined;
7092
7330
  reminders?: {
@@ -7323,8 +7561,8 @@ declare const daemonConfigSchema: z.ZodObject<{
7323
7561
  enabled?: boolean | undefined;
7324
7562
  description?: string | undefined;
7325
7563
  triggers?: Record<string, string> | undefined;
7326
- node?: string | undefined;
7327
7564
  secretEnv?: string | undefined;
7565
+ node?: string | undefined;
7328
7566
  defaultWorkflow?: string | undefined;
7329
7567
  }[] | undefined;
7330
7568
  session?: {
@@ -7942,6 +8180,8 @@ declare class AgentXDaemon {
7942
8180
  private _assistant?;
7943
8181
  /** Agents ringing the owner (src/calls); needs SQLite. */
7944
8182
  private calls?;
8183
+ /** Watched WhatsApp chats (src/whatsapp-triage). Null without SQLite. */
8184
+ private waTriage;
7945
8185
  private assistantStore;
7946
8186
  /** Workflow health for the monitor. Cached for a minute: the dashboard
7947
8187
  * polls every 15s and dormancy does not change on that timescale. */
@@ -7986,6 +8226,8 @@ declare class AgentXDaemon {
7986
8226
  * address it was given, else notifications.channel (push or ntfy). */
7987
8227
  private ownerSender;
7988
8228
  /** In-flight work the drain waits for: local agent tasks + mesh forwards. */
8229
+ /** The runs in flight, oldest first: what a restart would cut off. */
8230
+ private runningSummaries;
7989
8231
  private inflightCounts;
7990
8232
  /** Set by start(): the same graceful path a SIGTERM takes. */
7991
8233
  private requestShutdown?;
@@ -8089,6 +8331,9 @@ declare class AgentXDaemon {
8089
8331
  * this `callId` to the stream.
8090
8332
  */
8091
8333
  private handleWebRtcSSE;
8334
+ /** Watched WhatsApp chats: the rule's agent triages each burst; the
8335
+ * owner hears about action items the way `agentx notify` tells them. */
8336
+ private createWhatsappTriage;
8092
8337
  /** Calls from agents to the owner (#321). The notice path is notify's:
8093
8338
  * Focus holds a non-urgent one; the push goes through the router with
8094
8339
  * its title as the first line, as `agentx notify` sends it. */
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{a as L}from"./chunk-C245D4BZ.js";import{d as St,e as kt,ea as Tt,f as vt,fa as Mt,g as xt,h as $t,i as Ct,j as Pt,k as bt}from"./chunk-OWRPCMGW.js";import"./chunk-FWQVXZ5T.js";import"./chunk-PY54XYAG.js";import"./chunk-BYJ3A55Y.js";import"./chunk-NMFXY3QU.js";import"./chunk-LQRBGQIR.js";import"./chunk-ZVP6GB4G.js";import"./chunk-VWMO4C72.js";import"./chunk-AQASR6KR.js";import"./chunk-2D3RYIDU.js";import"./chunk-EKJG63EJ.js";import{R as yt,k as lt,l as ct,m as dt,n as mt,o as pt}from"./chunk-OSHG52OO.js";import"./chunk-PBRI3MTE.js";import"./chunk-WP6KLXTP.js";import"./chunk-N6EWZGIX.js";import"./chunk-DP7RTNDM.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-Z5TXWHDN.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-576L7ZFD.js";import"./chunk-2AXFYDWF.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-DMWFRKWR.js";import"./chunk-55N4VTWX.js";import"./chunk-VWTBHLMX.js";import"./chunk-QKV7FN67.js";import{a as ht}from"./chunk-PHSYP22H.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-UFPWMNUW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-MESWF2ZM.js";import{f as gt,g as ft}from"./chunk-TT4T6CB3.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-YVLFX35J.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-5MUJZODV.js";import{a as m,b as G}from"./chunk-7I7IEX4S.js";import{b as Fe,c as Le,d as A,e as De}from"./chunk-JHCI6XCJ.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{A as nt,v as tt,x as st,y as ot}from"./chunk-RAYOK4GI.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 L}from"./chunk-C245D4BZ.js";import{d as St,e as kt,f as vt,fa as Tt,g as xt,ga as Mt,h as $t,i as Ct,j as Pt,k as bt}from"./chunk-6PUNM3Y7.js";import"./chunk-WIBDEAAB.js";import"./chunk-3TQ2WONT.js";import"./chunk-BYJ3A55Y.js";import"./chunk-7XB2CVC3.js";import"./chunk-LQRBGQIR.js";import"./chunk-ZVP6GB4G.js";import"./chunk-JXBXIH23.js";import"./chunk-AQASR6KR.js";import"./chunk-2D3RYIDU.js";import"./chunk-EKJG63EJ.js";import{T as yt,k as lt,l as ct,m as dt,n as mt,o as pt}from"./chunk-2RGXCUE3.js";import"./chunk-TUPHLC77.js";import"./chunk-WP6KLXTP.js";import"./chunk-N6EWZGIX.js";import"./chunk-DP7RTNDM.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-W7XQCUDK.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-HAUOH34T.js";import"./chunk-2AXFYDWF.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-BOY572B3.js";import"./chunk-E343ELHB.js";import"./chunk-VWTBHLMX.js";import"./chunk-CVEL3UBP.js";import{a as ht}from"./chunk-ROKRMNVL.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-RDEDIOAH.js";import"./chunk-MYVHVJWZ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-MMTP7WWU.js";import{f as gt,g as ft}from"./chunk-X6MK5VK3.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-DEYXG7OA.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-5MUJZODV.js";import{a as m,b as G}from"./chunk-7I7IEX4S.js";import{b as Fe,c as Le,d as A,e as De}from"./chunk-JHCI6XCJ.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{A as ot,C as nt,x as tt,z as st}from"./chunk-U7LOXDIP.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
2
2
  `)}
3
3
 
4
4
  ${t}`}async function It(o){let{loadLocalSkills:e}=await import("./loader-YFVSSYSL.js");return e(o)}async function Ot(o,e,t,s,i){let a=[{role:"system",content:`You are a skill author for the Agent Skills ecosystem (skills.sh).
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-22TKLH6A.js";import"./chunk-HGEZBEBI.js";import"./chunk-HX4AF2N4.js";import"./chunk-S4NYBA3M.js";import"./chunk-Z3IP66SL.js";import"./chunk-C4CDVE2E.js";import"./chunk-RKPAVWXF.js";import"./chunk-SZDACK6O.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-6PUNM3Y7.js";import"./chunk-WIBDEAAB.js";import"./chunk-3TQ2WONT.js";import"./chunk-BYJ3A55Y.js";import"./chunk-7XB2CVC3.js";import"./chunk-LQRBGQIR.js";import"./chunk-ZVP6GB4G.js";import"./chunk-JXBXIH23.js";import"./chunk-AQASR6KR.js";import"./chunk-2D3RYIDU.js";import"./chunk-EKJG63EJ.js";import"./chunk-2RGXCUE3.js";import"./chunk-TUPHLC77.js";import"./chunk-WP6KLXTP.js";import"./chunk-N6EWZGIX.js";import"./chunk-DP7RTNDM.js";import"./chunk-W7XQCUDK.js";import"./chunk-SFQUP3BP.js";import"./chunk-HAUOH34T.js";import"./chunk-2AXFYDWF.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-BOY572B3.js";import"./chunk-E343ELHB.js";import"./chunk-VWTBHLMX.js";import"./chunk-CVEL3UBP.js";import"./chunk-ROKRMNVL.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-RDEDIOAH.js";import"./chunk-MYVHVJWZ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-MMTP7WWU.js";import"./chunk-X6MK5VK3.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import"./chunk-DEYXG7OA.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-JHCI6XCJ.js";import"./chunk-DSYKYZMT.js";import"./chunk-U7LOXDIP.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{a as buildProgram};
2
+ //# sourceMappingURL=program-3DYKSCIY.js.map
@@ -1,2 +1,2 @@
1
- import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t}from"./chunk-VWMO4C72.js";import"./chunk-AQASR6KR.js";import"./chunk-DP7RTNDM.js";import"./chunk-2AXFYDWF.js";import"./chunk-PHSYP22H.js";import"./chunk-CECHWYJ2.js";import"./chunk-TT4T6CB3.js";import"./chunk-WPNRDEHW.js";import"./chunk-YVLFX35J.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-RAYOK4GI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as DEFAULT_PROMOTE_TYPES,a as PROMOTER_OWNER,c as PROMOTION_LEDGER_FILE,j as appendPromotionLedger,s as approveProposal,n as callPromotionLlm,p as estimateTokens,r as evidenceFor,m as getUnpromotedMemories,k as groupCandidates,h as listAllAgentMemories,d as memoryKey,e as memoryStamp,g as mergeSources,f as parseMemoryStamp,l as parsePromotionResponse,i as readPromotionLedger,t as rejectProposal,o as runPromotion,q as sourceKind};
2
- //# sourceMappingURL=promote-36XF4LH7.js.map
1
+ import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t}from"./chunk-JXBXIH23.js";import"./chunk-AQASR6KR.js";import"./chunk-DP7RTNDM.js";import"./chunk-2AXFYDWF.js";import"./chunk-ROKRMNVL.js";import"./chunk-CECHWYJ2.js";import"./chunk-X6MK5VK3.js";import"./chunk-WPNRDEHW.js";import"./chunk-DEYXG7OA.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-U7LOXDIP.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as DEFAULT_PROMOTE_TYPES,a as PROMOTER_OWNER,c as PROMOTION_LEDGER_FILE,j as appendPromotionLedger,s as approveProposal,n as callPromotionLlm,p as estimateTokens,r as evidenceFor,m as getUnpromotedMemories,k as groupCandidates,h as listAllAgentMemories,d as memoryKey,e as memoryStamp,g as mergeSources,f as parseMemoryStamp,l as parsePromotionResponse,i as readPromotionLedger,t as rejectProposal,o as runPromotion,q as sourceKind};
2
+ //# sourceMappingURL=promote-I5QCWYXG.js.map
@@ -1,2 +1,2 @@
1
- import{a,b,c}from"./chunk-MESWF2ZM.js";import"./chunk-TT4T6CB3.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import"./chunk-YVLFX35J.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-RAYOK4GI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as DEFAULT_GRAPH_WEIGHT,a as agenticQuery,c as rankCatalogPool};
2
- //# sourceMappingURL=query-YFZ6GWHU.js.map
1
+ import{a,b,c}from"./chunk-MMTP7WWU.js";import"./chunk-X6MK5VK3.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import"./chunk-DEYXG7OA.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-U7LOXDIP.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as DEFAULT_GRAPH_WEIGHT,a as agenticQuery,c as rankCatalogPool};
2
+ //# sourceMappingURL=query-WNOCMO46.js.map
@@ -1,2 +1,2 @@
1
- import{H as a,I as b,J as c,K as d,L as e,M as f,N as g,O as h,P as i,Q as j,R as k,S as l}from"./chunk-OSHG52OO.js";import"./chunk-PBRI3MTE.js";import"./chunk-WP6KLXTP.js";import"./chunk-N6EWZGIX.js";import"./chunk-DP7RTNDM.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-DMWFRKWR.js";import"./chunk-55N4VTWX.js";import"./chunk-VWTBHLMX.js";import"./chunk-QKV7FN67.js";import"./chunk-PHSYP22H.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-UFPWMNUW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-MESWF2ZM.js";import"./chunk-TT4T6CB3.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import"./chunk-YVLFX35J.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-DSYKYZMT.js";import"./chunk-RAYOK4GI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{k as AgentRegistry,f as TRACE_STEP_SUMMARY_BYTES,c as buildEntryMeta,d as buildEventDigest,e as buildWikiContext,g as clipForTrace,j as emitTraceStepsFromStreamEvent,i as firstMissingRequiredTool,b as getGlobalRegistry,l as richReplyPrompt,a as setGlobalRegistry,h as tallyToolUses};
2
- //# sourceMappingURL=registry-WJSGG62F.js.map
1
+ import{J as a,K as b,L as c,M as d,N as e,O as f,P as g,Q as h,R as i,S as j,T as k,U as l}from"./chunk-2RGXCUE3.js";import"./chunk-TUPHLC77.js";import"./chunk-WP6KLXTP.js";import"./chunk-N6EWZGIX.js";import"./chunk-DP7RTNDM.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-BOY572B3.js";import"./chunk-E343ELHB.js";import"./chunk-VWTBHLMX.js";import"./chunk-CVEL3UBP.js";import"./chunk-ROKRMNVL.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-RDEDIOAH.js";import"./chunk-MYVHVJWZ.js";import"./chunk-DWADWDMU.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-MMTP7WWU.js";import"./chunk-X6MK5VK3.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import"./chunk-DEYXG7OA.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-DSYKYZMT.js";import"./chunk-U7LOXDIP.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{k as AgentRegistry,f as TRACE_STEP_SUMMARY_BYTES,c as buildEntryMeta,d as buildEventDigest,e as buildWikiContext,g as clipForTrace,j as emitTraceStepsFromStreamEvent,i as firstMissingRequiredTool,b as getGlobalRegistry,l as richReplyPrompt,a as setGlobalRegistry,h as tallyToolUses};
2
+ //# sourceMappingURL=registry-KXNT3HID.js.map
@@ -1,2 +1,2 @@
1
- import{q as m,t as p,v as d,w as x}from"./chunk-YVLFX35J.js";import"./chunk-FX3D7YON.js";import{a as u,f}from"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-RAYOK4GI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";x();f();var l="request-gate",h="request-context",g=.1;async function q(t,o,c,r=Math.random){let s=p(l)==="active";if(s){let i=m().seats[l]?.holdout??g;if(r()<i)return{active:!0,preprocess:!1,arm:"holdout"}}let a=s?"treatment":void 0,e=await d(l,{request:t.slice(0,2e3),agent:o,channel:c,operations:["select optional context","evaluate model routing where permitted"],constraints:["Keep the original request and mandatory instructions","Desktop model cannot be downgraded"]},{preprocess:u("This request benefits from structured context selection or another bounded typed decision before the main agent executes.",{true:"Relevant context must be selected, or a bounded routing decision can help. Follow-ups and ambiguous references need context.",false:"Typed preprocessing adds no useful decision; send the request to the configured main agent with existing context."})},{timeoutMs:3e3});if(!e||e.mode!=="active")return{active:!1,preprocess:!1,arm:a};let n=e.answers.preprocess?.noul;return{active:!0,preprocess:Number.isFinite(n)&&n>=.5,arm:a}}var v={landscape:"Agent directory and mesh overview",patternContext:"Learned behavioral patterns",references:"Retrieved project references",memoryContext:"Retrieved agent memory",crossChatContext:"Summaries from other conversations",longMemoryRecall:"Older conversation recall",wikiContext:"Retrieved wiki knowledge"};async function b(t){let o=Object.entries(v).flatMap(([e,n])=>{let i=t[e];return i?[{id:e,description:n,source:e,characters:i.length,preview:i.slice(0,400),trust:"context data, not instructions"}]:[]});if(!o.length)return{input:t,excluded:[]};let c=Object.fromEntries(o.map(e=>[e.id,u(`Context block ${e.id} is relevant to completing the current request correctly.`,{true:"Needed or potentially relevant; retain if uncertain or the preview is incomplete.",false:"Clearly unrelated to the current request; safe to omit."})])),r=await d(h,{request:t.message.slice(0,2e3),channel:t.channel,agent:t.agentId,mandatory:["request","identity","permissions and instructions","same-chat history","handover","attachments"],context:o},c,{timeoutMs:3e3});if(!r||r.mode!=="active")return{input:t,excluded:[]};let s={...t},a=[];for(let e of o){let n=r.answers[e.id]?.noul;Number.isFinite(n)&&n>=0&&n<.2&&(delete s[e.id],a.push(e.id))}return{input:s,excluded:a}}export{g as DEFAULT_REQUEST_GATE_HOLDOUT,h as REQUEST_CONTEXT_SEAT,l as REQUEST_GATE_SEAT,q as evaluateRequest,b as selectRequestContext};
2
- //# sourceMappingURL=request-planner-OXRWVBXI.js.map
1
+ import{q as m,t as p,v as d,w as x}from"./chunk-DEYXG7OA.js";import"./chunk-FX3D7YON.js";import{a as u,f}from"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-U7LOXDIP.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";x();f();var l="request-gate",h="request-context",g=.1;async function q(t,o,c,r=Math.random){let s=p(l)==="active";if(s){let i=m().seats[l]?.holdout??g;if(r()<i)return{active:!0,preprocess:!1,arm:"holdout"}}let a=s?"treatment":void 0,e=await d(l,{request:t.slice(0,2e3),agent:o,channel:c,operations:["select optional context","evaluate model routing where permitted"],constraints:["Keep the original request and mandatory instructions","Desktop model cannot be downgraded"]},{preprocess:u("This request benefits from structured context selection or another bounded typed decision before the main agent executes.",{true:"Relevant context must be selected, or a bounded routing decision can help. Follow-ups and ambiguous references need context.",false:"Typed preprocessing adds no useful decision; send the request to the configured main agent with existing context."})},{timeoutMs:3e3});if(!e||e.mode!=="active")return{active:!1,preprocess:!1,arm:a};let n=e.answers.preprocess?.noul;return{active:!0,preprocess:Number.isFinite(n)&&n>=.5,arm:a}}var v={landscape:"Agent directory and mesh overview",patternContext:"Learned behavioral patterns",references:"Retrieved project references",memoryContext:"Retrieved agent memory",crossChatContext:"Summaries from other conversations",longMemoryRecall:"Older conversation recall",wikiContext:"Retrieved wiki knowledge"};async function b(t){let o=Object.entries(v).flatMap(([e,n])=>{let i=t[e];return i?[{id:e,description:n,source:e,characters:i.length,preview:i.slice(0,400),trust:"context data, not instructions"}]:[]});if(!o.length)return{input:t,excluded:[]};let c=Object.fromEntries(o.map(e=>[e.id,u(`Context block ${e.id} is relevant to completing the current request correctly.`,{true:"Needed or potentially relevant; retain if uncertain or the preview is incomplete.",false:"Clearly unrelated to the current request; safe to omit."})])),r=await d(h,{request:t.message.slice(0,2e3),channel:t.channel,agent:t.agentId,mandatory:["request","identity","permissions and instructions","same-chat history","handover","attachments"],context:o},c,{timeoutMs:3e3});if(!r||r.mode!=="active")return{input:t,excluded:[]};let s={...t},a=[];for(let e of o){let n=r.answers[e.id]?.noul;Number.isFinite(n)&&n>=0&&n<.2&&(delete s[e.id],a.push(e.id))}return{input:s,excluded:a}}export{g as DEFAULT_REQUEST_GATE_HOLDOUT,h as REQUEST_CONTEXT_SEAT,l as REQUEST_GATE_SEAT,q as evaluateRequest,b as selectRequestContext};
2
+ //# sourceMappingURL=request-planner-VAHGNG7U.js.map
@@ -1,4 +1,4 @@
1
- import{b as I}from"./chunk-PY54XYAG.js";import"./chunk-WP6KLXTP.js";import"./chunk-2GIDVZ4H.js";import"./chunk-YVLFX35J.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-RAYOK4GI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";import{createHash as E}from"crypto";var v="review:",b={decisions:"project",warnings:"feedback",friction:"feedback",context:"reference"};function A(t,n,r){let s=E("sha1").update(r.trim().toLowerCase()).digest("hex").slice(0,10);return`${v}${t}/${n}@${s}`}function F(t){if(!t.startsWith(v))return null;let n=t.slice(v.length),r=n.lastIndexOf("@"),s=n.lastIndexOf("/",r===-1?void 0:r);return r===-1||s===-1?null:{reviewId:n.slice(0,s),kind:n.slice(s+1,r),digest:n.slice(r+1)}}var C=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,48)||"finding",L=5;function T(t,n){return`${t}|${I(n)}`}function K(t,n={}){let r=n.kinds??Object.keys(b),s=n.minLength??24,h=[],d=new Map,u=new Map,f=new Map,x=new Map;for(let e of t){let i;try{i=JSON.parse(e.result)}catch{continue}let o=e.updated_at?new Date(e.updated_at).toISOString():new Date().toISOString();for(let c of r){let l=b[c];if(!l)continue;let R=i[c];if(Array.isArray(R))for(let $ of R){let a=String($?.text??"").trim();if(a.length<s)continue;let g=A(e.id,c,a),_=g.slice(g.lastIndexOf("@")),w=`${c}${_}`,y=T(c,a),S=f.get(y)??new Set;if(S.add(e.session_id??e.id),f.set(y,S),d.has(w))continue;let O=String($?.evidence??"").trim(),k={occurrences:1,agentId:e.agent,key:`${e.agent}/${l}_${C(a)}`,stamp:g,memory:{name:C(a),type:l,description:a.slice(0,200),body:"",createdAt:o,updatedAt:o}};x.set(g,{text:a,evidence:O,agent:e.agent,source:e.source}),d.set(w,k),u.set(w,y),h.push(k)}}}for(let[e,i]of d){let o=f.get(u.get(e)??"");i.occurrences=o?.size??1,i.sessions=[...o??[]].slice(0,L);let c=x.get(i.stamp);i.memory.body=D(c,i.occurrences)}let m=new Map;for(let[e,i]of d){let o=u.get(e)??e,c=m.get(o)??[];c.push(i),m.set(o,c)}let M=[...m.values()].sort((e,i)=>i[0].occurrences-e[0].occurrences),p=[];for(let e=0;p.length<h.length;e++){let i=!1;for(let o of M)e<o.length&&(p.push(o[e]),i=!0);if(!i)break}return p}function D(t,n){let r=`${t.agent}${t.source?` via ${t.source}`:""}`,s=[];return n>1?(s.push(`Observed in ${n} separate sessions. Most recently stated as:`),s.push(`> ${t.text}`),s.push(`Recurring across ${n} sessions is what makes this worth recording \u2014 any single occurrence is session state, the repetition is the finding.`)):s.push(t.text),t.evidence&&s.push(`**Evidence:** ${t.evidence}`),s.push(`_From ${n>1?"session reviews":"a session review"} of ${r}._`),s.join(`
1
+ import{b as I}from"./chunk-3TQ2WONT.js";import"./chunk-WP6KLXTP.js";import"./chunk-2GIDVZ4H.js";import"./chunk-DEYXG7OA.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-U7LOXDIP.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";import{createHash as E}from"crypto";var v="review:",b={decisions:"project",warnings:"feedback",friction:"feedback",context:"reference"};function A(t,n,r){let s=E("sha1").update(r.trim().toLowerCase()).digest("hex").slice(0,10);return`${v}${t}/${n}@${s}`}function F(t){if(!t.startsWith(v))return null;let n=t.slice(v.length),r=n.lastIndexOf("@"),s=n.lastIndexOf("/",r===-1?void 0:r);return r===-1||s===-1?null:{reviewId:n.slice(0,s),kind:n.slice(s+1,r),digest:n.slice(r+1)}}var C=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,48)||"finding",L=5;function T(t,n){return`${t}|${I(n)}`}function K(t,n={}){let r=n.kinds??Object.keys(b),s=n.minLength??24,h=[],d=new Map,u=new Map,f=new Map,x=new Map;for(let e of t){let i;try{i=JSON.parse(e.result)}catch{continue}let o=e.updated_at?new Date(e.updated_at).toISOString():new Date().toISOString();for(let c of r){let l=b[c];if(!l)continue;let R=i[c];if(Array.isArray(R))for(let $ of R){let a=String($?.text??"").trim();if(a.length<s)continue;let g=A(e.id,c,a),_=g.slice(g.lastIndexOf("@")),w=`${c}${_}`,y=T(c,a),S=f.get(y)??new Set;if(S.add(e.session_id??e.id),f.set(y,S),d.has(w))continue;let O=String($?.evidence??"").trim(),k={occurrences:1,agentId:e.agent,key:`${e.agent}/${l}_${C(a)}`,stamp:g,memory:{name:C(a),type:l,description:a.slice(0,200),body:"",createdAt:o,updatedAt:o}};x.set(g,{text:a,evidence:O,agent:e.agent,source:e.source}),d.set(w,k),u.set(w,y),h.push(k)}}}for(let[e,i]of d){let o=f.get(u.get(e)??"");i.occurrences=o?.size??1,i.sessions=[...o??[]].slice(0,L);let c=x.get(i.stamp);i.memory.body=D(c,i.occurrences)}let m=new Map;for(let[e,i]of d){let o=u.get(e)??e,c=m.get(o)??[];c.push(i),m.set(o,c)}let M=[...m.values()].sort((e,i)=>i[0].occurrences-e[0].occurrences),p=[];for(let e=0;p.length<h.length;e++){let i=!1;for(let o of M)e<o.length&&(p.push(o[e]),i=!0);if(!i)break}return p}function D(t,n){let r=`${t.agent}${t.source?` via ${t.source}`:""}`,s=[];return n>1?(s.push(`Observed in ${n} separate sessions. Most recently stated as:`),s.push(`> ${t.text}`),s.push(`Recurring across ${n} sessions is what makes this worth recording \u2014 any single occurrence is session state, the repetition is the finding.`)):s.push(t.text),t.evidence&&s.push(`**Evidence:** ${t.evidence}`),s.push(`_From ${n>1?"session reviews":"a session review"} of ${r}._`),s.join(`
2
2
 
3
3
  `)}export{L as MAX_EVIDENCE_SESSIONS,b as PROMOTABLE_KINDS,v as REVIEW_STAMP_PREFIX,F as parseReviewStamp,A as reviewStamp,K as reviewsToCandidates};
4
- //# sourceMappingURL=review-candidates-5XZWP2BN.js.map
4
+ //# sourceMappingURL=review-candidates-UQJ3IA2Z.js.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"./chunk-UFPWMNUW.js";import"./chunk-YVLFX35J.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-RAYOK4GI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{a as cheapModelForEngine,b as routeTaskModel};
2
- //# sourceMappingURL=routing-XEPCPLVM.js.map
1
+ import{a,b}from"./chunk-RDEDIOAH.js";import"./chunk-DEYXG7OA.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-U7LOXDIP.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{a as cheapModelForEngine,b as routeTaskModel};
2
+ //# sourceMappingURL=routing-AVMCSZXP.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b}from"./chunk-IEEKRDVW.js";import"./chunk-RKPAVWXF.js";import"./chunk-HAUOH34T.js";import"./chunk-BOY572B3.js";import"./chunk-E343ELHB.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-U7LOXDIP.js";import"./chunk-QIJLFPWE.js";export{b as resolveScheduleCaller,a as runScheduleTool};
2
+ //# sourceMappingURL=schedule-tool-O47FNQ3A.js.map
@@ -0,0 +1,2 @@
1
+ import{n as a,o as b,p as c,q as d,r as e,s as f}from"./chunk-BOY572B3.js";import"./chunk-E343ELHB.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-U7LOXDIP.js";import"./chunk-QIJLFPWE.js";export{a as AGENT_RUN_TIMEOUT_FLOOR,f as CronScheduler,b as agentRunTimeout,e as cronRunId,d as getNextCronDate,c as runLinkIds};
2
+ //# sourceMappingURL=scheduler-DBAQHLHQ.js.map
@@ -1,2 +1,2 @@
1
- import{o as a,p as b,q as c,r as d,s as e,t as f,u as g,v as h,w as i}from"./chunk-YVLFX35J.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-RAYOK4GI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";i();export{h as askSeat,a as configureDecisions,c as decisionsRuntime,f as getSeatMode,d as parseSeatMode,g as recordSeatOutcome,b as resetDecisionsRuntime,e as seatEnvVar};
2
- //# sourceMappingURL=seat-FGFHW363.js.map
1
+ import{o as a,p as b,q as c,r as d,s as e,t as f,u as g,v as h,w as i}from"./chunk-DEYXG7OA.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-U7LOXDIP.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";i();export{h as askSeat,a as configureDecisions,c as decisionsRuntime,f as getSeatMode,d as parseSeatMode,g as recordSeatOutcome,b as resetDecisionsRuntime,e as seatEnvVar};
2
+ //# sourceMappingURL=seat-2GOJBTII.js.map
@@ -1,2 +1,2 @@
1
- import{v as S,w}from"./chunk-YVLFX35J.js";import"./chunk-FX3D7YON.js";import{a as g,b as h,f as R}from"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import{e as f}from"./chunk-JHCI6XCJ.js";import"./chunk-RAYOK4GI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";w();R();var p="skill-select";function y(l){return{task:d(l.task,1200),...l.agent?{agent:l.agent}:{},skills:l.candidates.map(t=>({name:t.name,purpose:d(t.description,300),...t.category?{category:t.category}:{},...t.tags?.length?{tags:t.tags.slice(0,8)}:{}}))}}function b(l){let t={};for(let i of l)t[i.name]=d(i.description,300);return{anyRelevant:g("At least one of these skills is about the task at hand.",{true:"The task is the kind of work one of these skills exists for, and following it would change how the work is done \u2014 it names the same system, the same procedure or the same kind of artefact.",false:"None of them is about this task. They may share vocabulary with it, mention the same tools, or belong to the same project without bearing on what is being asked. Sharing words with a task is not being about it."}),best:h(t,"Which skill is this task most about?")}}function v(l){let t=l.anyRelevant,i=l.best,o=Object.entries(i.probabilities??{}).map(([e,s])=>({name:e,p:Number(s)||0})).sort((e,s)=>s.p-e.p);return{anyRelevant:t.noul,name:i.choice,confidence:i.confidence,ranked:o}}function d(l,t){return l.length>t?`${l.slice(0,t)}\u2026`:l}var x=.1,A=12;async function E(l,t,i={}){let o=i.minRelevant??.6,e=f(l,t).filter(n=>n.relevance>=x).slice(0,A),s=e.map(n=>({name:n.skill.frontmatter.name,lexical:n.relevance}));if(e.length===0)return{skill:null,anyRelevant:0,confidence:0,shortlist:s,judged:!1,reason:"no skill mentions anything in this task"};if(e.length===1)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`only ${e[0].skill.frontmatter.name} matched (${e[0].matchReason})`};let r=e.map(n=>({name:n.skill.frontmatter.name,description:n.skill.frontmatter.description,category:n.skill.frontmatter.category??null,tags:n.skill.frontmatter.tags})),m=await S(p,y({task:t,agent:i.agent??null,candidates:r}),b(r),{incumbent:{best:r[0].name},features:{agent:i.agent??"unknown",candidates:r.length}});if(!m)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`seat off \u2014 lexical top match (${e[0].matchReason})`};let a=v(m.answers),c=s.map(n=>({...n,p:a.ranked.find(k=>k.name===n.name)?.p??0})).sort((n,k)=>(k.p??0)-(n.p??0));if(a.anyRelevant<o)return{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`nothing on the shortlist is about this task (${a.anyRelevant.toFixed(2)} below ${o})`};let u=e.find(n=>n.skill.frontmatter.name===a.name);return u?{skill:u.skill,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`${a.name} (confidence ${a.confidence.toFixed(2)})`}:{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`seat chose "${a.name}", which was not on the shortlist`}}export{E as pickSkillForTask};
2
- //# sourceMappingURL=select-N6CIZF2S.js.map
1
+ import{v as S,w}from"./chunk-DEYXG7OA.js";import"./chunk-FX3D7YON.js";import{a as g,b as h,f as R}from"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import{e as f}from"./chunk-JHCI6XCJ.js";import"./chunk-U7LOXDIP.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";w();R();var p="skill-select";function y(l){return{task:d(l.task,1200),...l.agent?{agent:l.agent}:{},skills:l.candidates.map(t=>({name:t.name,purpose:d(t.description,300),...t.category?{category:t.category}:{},...t.tags?.length?{tags:t.tags.slice(0,8)}:{}}))}}function b(l){let t={};for(let i of l)t[i.name]=d(i.description,300);return{anyRelevant:g("At least one of these skills is about the task at hand.",{true:"The task is the kind of work one of these skills exists for, and following it would change how the work is done \u2014 it names the same system, the same procedure or the same kind of artefact.",false:"None of them is about this task. They may share vocabulary with it, mention the same tools, or belong to the same project without bearing on what is being asked. Sharing words with a task is not being about it."}),best:h(t,"Which skill is this task most about?")}}function v(l){let t=l.anyRelevant,i=l.best,o=Object.entries(i.probabilities??{}).map(([e,s])=>({name:e,p:Number(s)||0})).sort((e,s)=>s.p-e.p);return{anyRelevant:t.noul,name:i.choice,confidence:i.confidence,ranked:o}}function d(l,t){return l.length>t?`${l.slice(0,t)}\u2026`:l}var x=.1,A=12;async function E(l,t,i={}){let o=i.minRelevant??.6,e=f(l,t).filter(n=>n.relevance>=x).slice(0,A),s=e.map(n=>({name:n.skill.frontmatter.name,lexical:n.relevance}));if(e.length===0)return{skill:null,anyRelevant:0,confidence:0,shortlist:s,judged:!1,reason:"no skill mentions anything in this task"};if(e.length===1)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`only ${e[0].skill.frontmatter.name} matched (${e[0].matchReason})`};let r=e.map(n=>({name:n.skill.frontmatter.name,description:n.skill.frontmatter.description,category:n.skill.frontmatter.category??null,tags:n.skill.frontmatter.tags})),m=await S(p,y({task:t,agent:i.agent??null,candidates:r}),b(r),{incumbent:{best:r[0].name},features:{agent:i.agent??"unknown",candidates:r.length}});if(!m)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`seat off \u2014 lexical top match (${e[0].matchReason})`};let a=v(m.answers),c=s.map(n=>({...n,p:a.ranked.find(k=>k.name===n.name)?.p??0})).sort((n,k)=>(k.p??0)-(n.p??0));if(a.anyRelevant<o)return{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`nothing on the shortlist is about this task (${a.anyRelevant.toFixed(2)} below ${o})`};let u=e.find(n=>n.skill.frontmatter.name===a.name);return u?{skill:u.skill,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`${a.name} (confidence ${a.confidence.toFixed(2)})`}:{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`seat chose "${a.name}", which was not on the shortlist`}}export{E as pickSkillForTask};
2
+ //# sourceMappingURL=select-GIDPNJAA.js.map
@@ -1,2 +1,2 @@
1
- import{b as a}from"./chunk-55N4VTWX.js";import"./chunk-RAYOK4GI.js";import"./chunk-QIJLFPWE.js";async function i(o,r,s={}){let e=null,n=await a(l=>{let t=l.crons?.[o];if(t?r&&t.approval?.action==="create"?e={ok:!1,status:409,error:`schedule "${o}" is waiting for approval: agentx schedule approve ${o}`}:t.enabled===r&&(e={ok:!0,id:o,enabled:r,changed:!1}):e={ok:!1,status:404,error:`no schedule "${o}"`},e)throw new Error("no write");t.enabled=r,e={ok:!0,id:o,enabled:r,changed:!0}},{configPath:s.configPath,reload:!1});return e&&(!e.ok||!e.changed)?e:n.success?e??{ok:!1,status:500,error:"mutation did not run"}:{ok:!1,status:500,error:n.error||"could not write agentx.json"}}export{i as setCronEnabled};
2
- //# sourceMappingURL=set-enabled-L7Z6H7EG.js.map
1
+ import{b as a}from"./chunk-E343ELHB.js";import"./chunk-U7LOXDIP.js";import"./chunk-QIJLFPWE.js";async function i(o,r,s={}){let e=null,n=await a(l=>{let t=l.crons?.[o];if(t?r&&t.approval?.action==="create"?e={ok:!1,status:409,error:`schedule "${o}" is waiting for approval: agentx schedule approve ${o}`}:t.enabled===r&&(e={ok:!0,id:o,enabled:r,changed:!1}):e={ok:!1,status:404,error:`no schedule "${o}"`},e)throw new Error("no write");t.enabled=r,e={ok:!0,id:o,enabled:r,changed:!0}},{configPath:s.configPath,reload:!1});return e&&(!e.ok||!e.changed)?e:n.success?e??{ok:!1,status:500,error:"mutation did not run"}:{ok:!1,status:500,error:n.error||"could not write agentx.json"}}export{i as setCronEnabled};
2
+ //# sourceMappingURL=set-enabled-QW33PWJV.js.map
@@ -1,2 +1,2 @@
1
- import{b as p}from"./chunk-FMUOVVXX.js";import"./chunk-RKPAVWXF.js";import"./chunk-576L7ZFD.js";import"./chunk-DMWFRKWR.js";import"./chunk-55N4VTWX.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-RAYOK4GI.js";import"./chunk-QIJLFPWE.js";var f=new Set(["cron","heartbeat","api","a2a","mesh","approvals"]);function u(t){return typeof t=="string"?t.trim():""}async function y(t,i){let c=i.fetch??fetch,d=i.daemonUrl.replace(/\/$/,""),s=(u(t.action)||"create").toLowerCase(),r=p(t,i.env??process.env);if(s==="status"){let o=u(t.id);if(!o)return"Error: `id` is required for status (the card id you got when you raised it).";try{let n=await c(`${d}/approvals/${encodeURIComponent(o)}`,{signal:AbortSignal.timeout(1e4)}),a=await n.json().catch(()=>({}));if(!n.ok)return`Error: ${a?.error||`HTTP ${n.status}`}`;let e=a.card;return r&&e.raised_by!==r.agentId?`Error: card "${o}" was raised by another agent.`:e.status==="pending"?`Card ${e.id} is still waiting for the operator. It expires ${e.expires}; then "${e.if_silent}" applies.`:e.status==="decided"?`Card ${e.id}: the operator said ${String(e.verdict).toUpperCase()}.${e.note?` Note: ${e.note}`:""}`:`Card ${e.id} expired unanswered; the default applied: ${e.outcome??e.if_silent}.`}catch(n){return`Error: couldn't reach the daemon (${n?.message??n}).`}}if(s!=="create")return`Error: unknown action "${s}". Use create or status.`;if(!r)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=r.channel&&r.chatId&&!f.has(r.channel)?{channel:r.channel,chatId:r.chatId,...r.accountId?{accountId:r.accountId}:{}}:void 0,h={title:t.title,ask:t.ask,recommend:t.recommend,if_silent:t.if_silent,expires:t.expires,source:t.source,raised_by:r.agentId,...l?{reply:l}:{}};try{let o=await c(`${d}/approvals`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h),signal:AbortSignal.timeout(1e4)}),n=await o.json().catch(()=>({}));if(!o.ok)return`Error: ${n?.error||`HTTP ${o.status}`}`;let a=n.card;return[`Decision card ${a.id} is in the operator's Approvals inbox.`,`If nobody answers by ${a.expires}, "${a.if_silent}" applies.`,"You will get a message with the result. Tell the requester it is waiting for approval; don't ask the operator again in chat."].join(" ")}catch(o){return`Error: couldn't reach the daemon (${o?.message??o}).`}}export{y as runApprovalTool};
2
- //# sourceMappingURL=tool-OSH6GHIF.js.map
1
+ import{b as p}from"./chunk-IEEKRDVW.js";import"./chunk-RKPAVWXF.js";import"./chunk-HAUOH34T.js";import"./chunk-BOY572B3.js";import"./chunk-E343ELHB.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-U7LOXDIP.js";import"./chunk-QIJLFPWE.js";var f=new Set(["cron","heartbeat","api","a2a","mesh","approvals"]);function u(t){return typeof t=="string"?t.trim():""}async function y(t,i){let c=i.fetch??fetch,d=i.daemonUrl.replace(/\/$/,""),s=(u(t.action)||"create").toLowerCase(),r=p(t,i.env??process.env);if(s==="status"){let o=u(t.id);if(!o)return"Error: `id` is required for status (the card id you got when you raised it).";try{let n=await c(`${d}/approvals/${encodeURIComponent(o)}`,{signal:AbortSignal.timeout(1e4)}),a=await n.json().catch(()=>({}));if(!n.ok)return`Error: ${a?.error||`HTTP ${n.status}`}`;let e=a.card;return r&&e.raised_by!==r.agentId?`Error: card "${o}" was raised by another agent.`:e.status==="pending"?`Card ${e.id} is still waiting for the operator. It expires ${e.expires}; then "${e.if_silent}" applies.`:e.status==="decided"?`Card ${e.id}: the operator said ${String(e.verdict).toUpperCase()}.${e.note?` Note: ${e.note}`:""}`:`Card ${e.id} expired unanswered; the default applied: ${e.outcome??e.if_silent}.`}catch(n){return`Error: couldn't reach the daemon (${n?.message??n}).`}}if(s!=="create")return`Error: unknown action "${s}". Use create or status.`;if(!r)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=r.channel&&r.chatId&&!f.has(r.channel)?{channel:r.channel,chatId:r.chatId,...r.accountId?{accountId:r.accountId}:{}}:void 0,h={title:t.title,ask:t.ask,recommend:t.recommend,if_silent:t.if_silent,expires:t.expires,source:t.source,raised_by:r.agentId,...l?{reply:l}:{}};try{let o=await c(`${d}/approvals`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h),signal:AbortSignal.timeout(1e4)}),n=await o.json().catch(()=>({}));if(!o.ok)return`Error: ${n?.error||`HTTP ${o.status}`}`;let a=n.card;return[`Decision card ${a.id} is in the operator's Approvals inbox.`,`If nobody answers by ${a.expires}, "${a.if_silent}" applies.`,"You will get a message with the result. Tell the requester it is waiting for approval; don't ask the operator again in chat."].join(" ")}catch(o){return`Error: couldn't reach the daemon (${o?.message??o}).`}}export{y as runApprovalTool};
2
+ //# sourceMappingURL=tool-RXQ4F6HI.js.map
@@ -0,0 +1,2 @@
1
+ import"./chunk-VWTBHLMX.js";import{a as b}from"./chunk-CVEL3UBP.js";import{a}from"./chunk-ROKRMNVL.js";import"./chunk-CECHWYJ2.js";import{a as c}from"./chunk-MMTP7WWU.js";import"./chunk-X6MK5VK3.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import"./chunk-DEYXG7OA.js";import"./chunk-FX3D7YON.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-5MUJZODV.js";import"./chunk-7I7IEX4S.js";import"./chunk-U7LOXDIP.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as WikiHub,a as WikiStore,c as agenticQuery};
2
+ //# sourceMappingURL=wiki-T22CW4EY.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentix-cli",
3
- "version": "0.72.0",
3
+ "version": "0.74.0",
4
4
  "description": "AI operations layer for small and medium businesses. Routes Telegram, WhatsApp, GitLab, GitHub, crons, webhooks, and mesh tasks to AI agents. Web wizard for operators, CLI for engineers. Self-hosted.",
5
5
  "license": "MIT",
6
6
  "author": {