agentix-cli 0.33.0 → 0.35.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 (92) hide show
  1. package/apps/mac-helper/Sources/AgentXHelper/Presence.swift +266 -0
  2. package/apps/mac-helper/Sources/AgentXHelper/main.swift +7 -1
  3. package/apps/mac-voice/Sources/AgentXVoice/AgentClient.swift +48 -2
  4. package/apps/mac-voice/Sources/AgentXVoice/Config.swift +6 -1
  5. package/apps/mac-voice/Sources/AgentXVoice/Progress.swift +5 -3
  6. package/apps/mac-voice/Sources/AgentXVoice/Speech.swift +5 -4
  7. package/apps/mac-voice/Sources/AgentXVoice/main.swift +30 -5
  8. package/dist/{App-2LAWZNMG.js → App-K5J52F7O.js} +2 -2
  9. package/dist/{ChatApp-2KRDHMTV.js → ChatApp-LRRAPZH7.js} +2 -2
  10. package/dist/{agent-ZRRIMLTX.js → agent-XEXAYH5J.js} +2 -2
  11. package/dist/{board-dashboard-XYB7M5BH.js → board-dashboard-CBOESBMD.js} +4 -4
  12. package/dist/{chunk-GWQIMAJ7.js → chunk-3PL3WLIR.js} +2 -2
  13. package/dist/{chunk-K6E7WJ7O.js → chunk-3TNK7VGH.js} +2 -2
  14. package/dist/{chunk-6VQKHMEQ.js → chunk-4QNZI4WE.js} +5 -5
  15. package/dist/{chunk-UEP7IRBD.js → chunk-DXXWYYZI.js} +218 -194
  16. package/dist/chunk-DXXWYYZI.js.map +1 -0
  17. package/dist/{chunk-5FEQI22L.js → chunk-FLNN3KSX.js} +2 -2
  18. package/dist/{chunk-MFVI5FOM.js → chunk-GYBYKREN.js} +2 -2
  19. package/dist/chunk-HPY6OOFO.js +542 -0
  20. package/dist/chunk-HPY6OOFO.js.map +1 -0
  21. package/dist/{chunk-JGJE5Y2J.js → chunk-JSZRGMSA.js} +2 -2
  22. package/dist/chunk-LA6AKS4N.js +13 -0
  23. package/dist/chunk-LA6AKS4N.js.map +1 -0
  24. package/dist/{chunk-A4YR3PQY.js → chunk-LLKILWWO.js} +2 -2
  25. package/dist/{chunk-2DBGOCCW.js → chunk-LQFEH3SA.js} +2 -2
  26. package/dist/{chunk-JWKIFAXA.js → chunk-PBVEYPZB.js} +2 -2
  27. package/dist/{chunk-B2XTYYXV.js → chunk-SYJUZ3F2.js} +2 -2
  28. package/dist/{chunk-W3YGESNK.js → chunk-WEN2P4RS.js} +2 -2
  29. package/dist/{chunk-G5MFPNGJ.js → chunk-WRBW4A2U.js} +2 -2
  30. package/dist/{chunk-4CR463C6.js → chunk-ZSNTLADV.js} +2 -2
  31. package/dist/cli.js +1 -1
  32. package/dist/client-APAWETTA.js +2 -0
  33. package/dist/config-S3VHHVYW.js +2 -0
  34. package/dist/config-mutator-5B2YWZMK.js +2 -0
  35. package/dist/doctor-SCECRUJ7.js +2 -0
  36. package/dist/index.d.ts +194 -0
  37. package/dist/index.js +1 -1
  38. package/dist/program-XJEQAWN3.js +2 -0
  39. package/dist/query-EDW72Q4O.js +2 -0
  40. package/dist/{registry-OB6S66XX.js → registry-GWN34G4J.js} +2 -2
  41. package/dist/{request-planner-F5NVL2G7.js → request-planner-V7T6BQU7.js} +2 -2
  42. package/dist/{review-candidates-IRPKFWL2.js → review-candidates-7QKNMRGU.js} +2 -2
  43. package/dist/{routing-OSPRKRAY.js → routing-BHQXFUSH.js} +2 -2
  44. package/dist/scheduler-LY4RBPB6.js +2 -0
  45. package/dist/{seat-2MHKVMW2.js → seat-U57NWHKC.js} +2 -2
  46. package/dist/{select-7LCHJVPK.js → select-JL3JJJP4.js} +2 -2
  47. package/dist/wiki-AQ4K3F7V.js +2 -0
  48. package/package.json +1 -1
  49. package/dist/chunk-2DMVKLLE.js +0 -13
  50. package/dist/chunk-2DMVKLLE.js.map +0 -1
  51. package/dist/chunk-UEP7IRBD.js.map +0 -1
  52. package/dist/chunk-WZD3OS7T.js +0 -550
  53. package/dist/chunk-WZD3OS7T.js.map +0 -1
  54. package/dist/client-IP643GRO.js +0 -2
  55. package/dist/config-IVDP46ZG.js +0 -2
  56. package/dist/config-mutator-UCGAV3SP.js +0 -2
  57. package/dist/doctor-MMT4SREV.js +0 -2
  58. package/dist/program-PK5R7GIC.js +0 -2
  59. package/dist/query-RHVR6QUZ.js +0 -2
  60. package/dist/scheduler-JL6K5HHI.js +0 -2
  61. package/dist/wiki-MY32MON3.js +0 -2
  62. /package/dist/{App-2LAWZNMG.js.map → App-K5J52F7O.js.map} +0 -0
  63. /package/dist/{ChatApp-2KRDHMTV.js.map → ChatApp-LRRAPZH7.js.map} +0 -0
  64. /package/dist/{agent-ZRRIMLTX.js.map → agent-XEXAYH5J.js.map} +0 -0
  65. /package/dist/{board-dashboard-XYB7M5BH.js.map → board-dashboard-CBOESBMD.js.map} +0 -0
  66. /package/dist/{chunk-GWQIMAJ7.js.map → chunk-3PL3WLIR.js.map} +0 -0
  67. /package/dist/{chunk-K6E7WJ7O.js.map → chunk-3TNK7VGH.js.map} +0 -0
  68. /package/dist/{chunk-6VQKHMEQ.js.map → chunk-4QNZI4WE.js.map} +0 -0
  69. /package/dist/{chunk-5FEQI22L.js.map → chunk-FLNN3KSX.js.map} +0 -0
  70. /package/dist/{chunk-MFVI5FOM.js.map → chunk-GYBYKREN.js.map} +0 -0
  71. /package/dist/{chunk-JGJE5Y2J.js.map → chunk-JSZRGMSA.js.map} +0 -0
  72. /package/dist/{chunk-A4YR3PQY.js.map → chunk-LLKILWWO.js.map} +0 -0
  73. /package/dist/{chunk-2DBGOCCW.js.map → chunk-LQFEH3SA.js.map} +0 -0
  74. /package/dist/{chunk-JWKIFAXA.js.map → chunk-PBVEYPZB.js.map} +0 -0
  75. /package/dist/{chunk-B2XTYYXV.js.map → chunk-SYJUZ3F2.js.map} +0 -0
  76. /package/dist/{chunk-W3YGESNK.js.map → chunk-WEN2P4RS.js.map} +0 -0
  77. /package/dist/{chunk-G5MFPNGJ.js.map → chunk-WRBW4A2U.js.map} +0 -0
  78. /package/dist/{chunk-4CR463C6.js.map → chunk-ZSNTLADV.js.map} +0 -0
  79. /package/dist/{client-IP643GRO.js.map → client-APAWETTA.js.map} +0 -0
  80. /package/dist/{config-IVDP46ZG.js.map → config-S3VHHVYW.js.map} +0 -0
  81. /package/dist/{config-mutator-UCGAV3SP.js.map → config-mutator-5B2YWZMK.js.map} +0 -0
  82. /package/dist/{doctor-MMT4SREV.js.map → doctor-SCECRUJ7.js.map} +0 -0
  83. /package/dist/{program-PK5R7GIC.js.map → program-XJEQAWN3.js.map} +0 -0
  84. /package/dist/{query-RHVR6QUZ.js.map → query-EDW72Q4O.js.map} +0 -0
  85. /package/dist/{registry-OB6S66XX.js.map → registry-GWN34G4J.js.map} +0 -0
  86. /package/dist/{request-planner-F5NVL2G7.js.map → request-planner-V7T6BQU7.js.map} +0 -0
  87. /package/dist/{review-candidates-IRPKFWL2.js.map → review-candidates-7QKNMRGU.js.map} +0 -0
  88. /package/dist/{routing-OSPRKRAY.js.map → routing-BHQXFUSH.js.map} +0 -0
  89. /package/dist/{scheduler-JL6K5HHI.js.map → scheduler-LY4RBPB6.js.map} +0 -0
  90. /package/dist/{seat-2MHKVMW2.js.map → seat-U57NWHKC.js.map} +0 -0
  91. /package/dist/{select-7LCHJVPK.js.map → select-JL3JJJP4.js.map} +0 -0
  92. /package/dist/{wiki-MY32MON3.js.map → wiki-AQ4K3F7V.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{a as s}from"./chunk-WZD3OS7T.js";import"./chunk-4CR463C6.js";import"./chunk-G5MFPNGJ.js";import"./chunk-B2XTYYXV.js";import"./chunk-2TJ5L7CB.js";import"./chunk-7CVJ4JOE.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-UEP7IRBD.js";import"./chunk-F6CNF7V3.js";import"./chunk-GWQIMAJ7.js";import"./chunk-V7FYSZSV.js";import"./chunk-ZVP6GB4G.js";import"./chunk-6VQKHMEQ.js";import"./chunk-5FEQI22L.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import"./chunk-A4YR3PQY.js";import"./chunk-K6E7WJ7O.js";import"./chunk-SFQUP3BP.js";import"./chunk-3SCPRYJB.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-JWKIFAXA.js";import"./chunk-W3YGESNK.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import"./chunk-MFVI5FOM.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-JGJE5Y2J.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import"./chunk-2DBGOCCW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-VDMYBPYB.js";import"./chunk-DSYKYZMT.js";import"./chunk-2DMVKLLE.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));async function o(){let r=await s();if(process.argv.slice(2).length===0){r.outputHelp();return}r.parse()}o();
2
+ import{a as s}from"./chunk-HPY6OOFO.js";import"./chunk-ZSNTLADV.js";import"./chunk-WRBW4A2U.js";import"./chunk-SYJUZ3F2.js";import"./chunk-2TJ5L7CB.js";import"./chunk-7CVJ4JOE.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-DXXWYYZI.js";import"./chunk-F6CNF7V3.js";import"./chunk-3PL3WLIR.js";import"./chunk-V7FYSZSV.js";import"./chunk-ZVP6GB4G.js";import"./chunk-4QNZI4WE.js";import"./chunk-FLNN3KSX.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import"./chunk-LLKILWWO.js";import"./chunk-3TNK7VGH.js";import"./chunk-SFQUP3BP.js";import"./chunk-3SCPRYJB.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-PBVEYPZB.js";import"./chunk-WEN2P4RS.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import"./chunk-GYBYKREN.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-JSZRGMSA.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import"./chunk-LQFEH3SA.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-VDMYBPYB.js";import"./chunk-DSYKYZMT.js";import"./chunk-LA6AKS4N.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));async function o(){let r=await s();if(process.argv.slice(2).length===0){r.outputHelp();return}r.parse()}o();
3
3
  //# sourceMappingURL=cli.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b,c,d,e,f,g}from"./chunk-ZSNTLADV.js";import"./chunk-LA6AKS4N.js";import"./chunk-FIOB3MEX.js";export{b as fetchAgents,d as fetchCrons,c as fetchProcesses,e as killProcess,a as resolveConn,f as sendTask,g as streamTask};
2
+ //# sourceMappingURL=client-APAWETTA.js.map
@@ -0,0 +1,2 @@
1
+ import{d as a,e as b,f as c,g as d,h as e,j as f}from"./chunk-LA6AKS4N.js";import"./chunk-FIOB3MEX.js";f();export{a as INTEGRATION_KINDS,b as daemonConfigSchema,c as expandEnvVars,d as loadDaemonConfig,e as validateWorkspaces};
2
+ //# sourceMappingURL=config-S3VHHVYW.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b,c,d}from"./chunk-PBVEYPZB.js";import"./chunk-LA6AKS4N.js";import"./chunk-FIOB3MEX.js";export{a as applyConfigMutation,c as getAtPath,b as setAtPath,d as unsetAtPath};
2
+ //# sourceMappingURL=config-mutator-5B2YWZMK.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b}from"./chunk-WRBW4A2U.js";import"./chunk-LA6AKS4N.js";import"./chunk-FIOB3MEX.js";export{b as doctor,a as runDoctorChecks};
2
+ //# sourceMappingURL=doctor-SCECRUJ7.js.map
package/dist/index.d.ts CHANGED
@@ -1706,6 +1706,57 @@ declare const agentConfigSchema: z.ZodObject<{
1706
1706
  } | undefined;
1707
1707
  metadata?: Record<string, string | number | boolean> | undefined;
1708
1708
  }>, "many">>;
1709
+ /** How this agent sounds when it speaks (voice widget, `agentx teach`).
1710
+ * Every field is optional: no voice id falls back to the global
1711
+ * AGENTX_VOICE_ID, no intro is derived from the system prompt. See
1712
+ * src/voice/agent-voice.ts. */
1713
+ voice: z.ZodOptional<z.ZodObject<{
1714
+ elevenlabsVoiceId: z.ZodOptional<z.ZodString>;
1715
+ gender: z.ZodOptional<z.ZodEnum<["female", "male", "neutral"]>>;
1716
+ /** A few words on manner, e.g. "warm, upbeat, a little playful". */
1717
+ style: z.ZodOptional<z.ZodString>;
1718
+ /** The one-line self-introduction used on first contact. */
1719
+ intro: z.ZodOptional<z.ZodString>;
1720
+ /** Speak short updates from this agent's real tool steps while it
1721
+ * works: "on" for everything but cron, "all" to include cron. */
1722
+ narrate: z.ZodOptional<z.ZodEnum<["off", "on", "all"]>>;
1723
+ }, "strip", z.ZodTypeAny, {
1724
+ style?: string | undefined;
1725
+ elevenlabsVoiceId?: string | undefined;
1726
+ gender?: "neutral" | "female" | "male" | undefined;
1727
+ intro?: string | undefined;
1728
+ narrate?: "all" | "on" | "off" | undefined;
1729
+ }, {
1730
+ style?: string | undefined;
1731
+ elevenlabsVoiceId?: string | undefined;
1732
+ gender?: "neutral" | "female" | "male" | undefined;
1733
+ intro?: string | undefined;
1734
+ narrate?: "all" | "on" | "off" | undefined;
1735
+ }>>;
1736
+ /** How this agent appears on screen: its own cursor, drawn by the Mac
1737
+ * helper and click-through, never Anis's real mouse. See
1738
+ * src/voice/presence.ts. */
1739
+ presence: z.ZodOptional<z.ZodObject<{
1740
+ /** Cursor colour, as #RRGGBB. Default: derived from the agent id. */
1741
+ color: z.ZodOptional<z.ZodString>;
1742
+ /** One or two letters on the cursor. Default: from the name. */
1743
+ initial: z.ZodOptional<z.ZodString>;
1744
+ /** Name shown under the cursor. Default: the agent's name. */
1745
+ label: z.ZodOptional<z.ZodString>;
1746
+ /** May this agent click and type for Anis (presence mode "act")?
1747
+ * Off by default: without it, "act" becomes "teach". */
1748
+ allowActions: z.ZodOptional<z.ZodBoolean>;
1749
+ }, "strip", z.ZodTypeAny, {
1750
+ initial?: string | undefined;
1751
+ label?: string | undefined;
1752
+ color?: string | undefined;
1753
+ allowActions?: boolean | undefined;
1754
+ }, {
1755
+ initial?: string | undefined;
1756
+ label?: string | undefined;
1757
+ color?: string | undefined;
1758
+ allowActions?: boolean | undefined;
1759
+ }>>;
1709
1760
  }, "strip", z.ZodTypeAny, {
1710
1761
  name: string;
1711
1762
  workspace: string;
@@ -1761,6 +1812,19 @@ declare const agentConfigSchema: z.ZodObject<{
1761
1812
  }> | undefined;
1762
1813
  contextStrategy?: "layered" | "planner" | undefined;
1763
1814
  gitlabAutoReply?: boolean | undefined;
1815
+ voice?: {
1816
+ style?: string | undefined;
1817
+ elevenlabsVoiceId?: string | undefined;
1818
+ gender?: "neutral" | "female" | "male" | undefined;
1819
+ intro?: string | undefined;
1820
+ narrate?: "all" | "on" | "off" | undefined;
1821
+ } | undefined;
1822
+ presence?: {
1823
+ initial?: string | undefined;
1824
+ label?: string | undefined;
1825
+ color?: string | undefined;
1826
+ allowActions?: boolean | undefined;
1827
+ } | undefined;
1764
1828
  }, {
1765
1829
  name: string;
1766
1830
  workspace: string;
@@ -1816,6 +1880,19 @@ declare const agentConfigSchema: z.ZodObject<{
1816
1880
  } | undefined;
1817
1881
  metadata?: Record<string, string | number | boolean> | undefined;
1818
1882
  }[] | undefined;
1883
+ voice?: {
1884
+ style?: string | undefined;
1885
+ elevenlabsVoiceId?: string | undefined;
1886
+ gender?: "neutral" | "female" | "male" | undefined;
1887
+ intro?: string | undefined;
1888
+ narrate?: "all" | "on" | "off" | undefined;
1889
+ } | undefined;
1890
+ presence?: {
1891
+ initial?: string | undefined;
1892
+ label?: string | undefined;
1893
+ color?: string | undefined;
1894
+ allowActions?: boolean | undefined;
1895
+ } | undefined;
1819
1896
  }>;
1820
1897
  declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
1821
1898
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -2213,6 +2290,57 @@ declare const daemonConfigSchema: z.ZodObject<{
2213
2290
  } | undefined;
2214
2291
  metadata?: Record<string, string | number | boolean> | undefined;
2215
2292
  }>, "many">>;
2293
+ /** How this agent sounds when it speaks (voice widget, `agentx teach`).
2294
+ * Every field is optional: no voice id falls back to the global
2295
+ * AGENTX_VOICE_ID, no intro is derived from the system prompt. See
2296
+ * src/voice/agent-voice.ts. */
2297
+ voice: z.ZodOptional<z.ZodObject<{
2298
+ elevenlabsVoiceId: z.ZodOptional<z.ZodString>;
2299
+ gender: z.ZodOptional<z.ZodEnum<["female", "male", "neutral"]>>;
2300
+ /** A few words on manner, e.g. "warm, upbeat, a little playful". */
2301
+ style: z.ZodOptional<z.ZodString>;
2302
+ /** The one-line self-introduction used on first contact. */
2303
+ intro: z.ZodOptional<z.ZodString>;
2304
+ /** Speak short updates from this agent's real tool steps while it
2305
+ * works: "on" for everything but cron, "all" to include cron. */
2306
+ narrate: z.ZodOptional<z.ZodEnum<["off", "on", "all"]>>;
2307
+ }, "strip", z.ZodTypeAny, {
2308
+ style?: string | undefined;
2309
+ elevenlabsVoiceId?: string | undefined;
2310
+ gender?: "neutral" | "female" | "male" | undefined;
2311
+ intro?: string | undefined;
2312
+ narrate?: "all" | "on" | "off" | undefined;
2313
+ }, {
2314
+ style?: string | undefined;
2315
+ elevenlabsVoiceId?: string | undefined;
2316
+ gender?: "neutral" | "female" | "male" | undefined;
2317
+ intro?: string | undefined;
2318
+ narrate?: "all" | "on" | "off" | undefined;
2319
+ }>>;
2320
+ /** How this agent appears on screen: its own cursor, drawn by the Mac
2321
+ * helper and click-through, never Anis's real mouse. See
2322
+ * src/voice/presence.ts. */
2323
+ presence: z.ZodOptional<z.ZodObject<{
2324
+ /** Cursor colour, as #RRGGBB. Default: derived from the agent id. */
2325
+ color: z.ZodOptional<z.ZodString>;
2326
+ /** One or two letters on the cursor. Default: from the name. */
2327
+ initial: z.ZodOptional<z.ZodString>;
2328
+ /** Name shown under the cursor. Default: the agent's name. */
2329
+ label: z.ZodOptional<z.ZodString>;
2330
+ /** May this agent click and type for Anis (presence mode "act")?
2331
+ * Off by default: without it, "act" becomes "teach". */
2332
+ allowActions: z.ZodOptional<z.ZodBoolean>;
2333
+ }, "strip", z.ZodTypeAny, {
2334
+ initial?: string | undefined;
2335
+ label?: string | undefined;
2336
+ color?: string | undefined;
2337
+ allowActions?: boolean | undefined;
2338
+ }, {
2339
+ initial?: string | undefined;
2340
+ label?: string | undefined;
2341
+ color?: string | undefined;
2342
+ allowActions?: boolean | undefined;
2343
+ }>>;
2216
2344
  }, "strip", z.ZodTypeAny, {
2217
2345
  name: string;
2218
2346
  workspace: string;
@@ -2268,6 +2396,19 @@ declare const daemonConfigSchema: z.ZodObject<{
2268
2396
  }> | undefined;
2269
2397
  contextStrategy?: "layered" | "planner" | undefined;
2270
2398
  gitlabAutoReply?: boolean | undefined;
2399
+ voice?: {
2400
+ style?: string | undefined;
2401
+ elevenlabsVoiceId?: string | undefined;
2402
+ gender?: "neutral" | "female" | "male" | undefined;
2403
+ intro?: string | undefined;
2404
+ narrate?: "all" | "on" | "off" | undefined;
2405
+ } | undefined;
2406
+ presence?: {
2407
+ initial?: string | undefined;
2408
+ label?: string | undefined;
2409
+ color?: string | undefined;
2410
+ allowActions?: boolean | undefined;
2411
+ } | undefined;
2271
2412
  }, {
2272
2413
  name: string;
2273
2414
  workspace: string;
@@ -2323,6 +2464,19 @@ declare const daemonConfigSchema: z.ZodObject<{
2323
2464
  } | undefined;
2324
2465
  metadata?: Record<string, string | number | boolean> | undefined;
2325
2466
  }[] | undefined;
2467
+ voice?: {
2468
+ style?: string | undefined;
2469
+ elevenlabsVoiceId?: string | undefined;
2470
+ gender?: "neutral" | "female" | "male" | undefined;
2471
+ intro?: string | undefined;
2472
+ narrate?: "all" | "on" | "off" | undefined;
2473
+ } | undefined;
2474
+ presence?: {
2475
+ initial?: string | undefined;
2476
+ label?: string | undefined;
2477
+ color?: string | undefined;
2478
+ allowActions?: boolean | undefined;
2479
+ } | undefined;
2326
2480
  }>>>;
2327
2481
  channels: z.ZodDefault<z.ZodObject<{
2328
2482
  telegram: z.ZodDefault<z.ZodObject<{
@@ -4777,6 +4931,19 @@ declare const daemonConfigSchema: z.ZodObject<{
4777
4931
  }> | undefined;
4778
4932
  contextStrategy?: "layered" | "planner" | undefined;
4779
4933
  gitlabAutoReply?: boolean | undefined;
4934
+ voice?: {
4935
+ style?: string | undefined;
4936
+ elevenlabsVoiceId?: string | undefined;
4937
+ gender?: "neutral" | "female" | "male" | undefined;
4938
+ intro?: string | undefined;
4939
+ narrate?: "all" | "on" | "off" | undefined;
4940
+ } | undefined;
4941
+ presence?: {
4942
+ initial?: string | undefined;
4943
+ label?: string | undefined;
4944
+ color?: string | undefined;
4945
+ allowActions?: boolean | undefined;
4946
+ } | undefined;
4780
4947
  }>;
4781
4948
  mesh: {
4782
4949
  enabled: boolean;
@@ -5284,6 +5451,19 @@ declare const daemonConfigSchema: z.ZodObject<{
5284
5451
  } | undefined;
5285
5452
  metadata?: Record<string, string | number | boolean> | undefined;
5286
5453
  }[] | undefined;
5454
+ voice?: {
5455
+ style?: string | undefined;
5456
+ elevenlabsVoiceId?: string | undefined;
5457
+ gender?: "neutral" | "female" | "male" | undefined;
5458
+ intro?: string | undefined;
5459
+ narrate?: "all" | "on" | "off" | undefined;
5460
+ } | undefined;
5461
+ presence?: {
5462
+ initial?: string | undefined;
5463
+ label?: string | undefined;
5464
+ color?: string | undefined;
5465
+ allowActions?: boolean | undefined;
5466
+ } | undefined;
5287
5467
  }> | undefined;
5288
5468
  mesh?: {
5289
5469
  enabled?: boolean | undefined;
@@ -6058,6 +6238,10 @@ declare class AgentXDaemon {
6058
6238
  private loadedPlugins;
6059
6239
  private readonly agentMemory;
6060
6240
  private contacts;
6241
+ /** Who has already introduced themselves in which voice session. */
6242
+ private voiceIntros;
6243
+ /** Talk mode and task narration: see src/daemon/voice-talk-api.ts. */
6244
+ private voiceTalk;
6061
6245
  /** Persistent-claude process registry. Null when no agent has
6062
6246
  * persistentProcess: true (legacy spawn-per-task path). */
6063
6247
  private sessionMonitor?;
@@ -9627,6 +9811,16 @@ declare class MessageRouter {
9627
9811
  * Used when the channel adapter resolved the agent but it's not local.
9628
9812
  */
9629
9813
  private handleViaMeshByAgentId;
9814
+ /**
9815
+ * Close the intent-ledger decision for a message this node forwarded to a
9816
+ * mesh peer. Local tasks get their resolution from registry.execute; a
9817
+ * mesh forward never reaches it, so without this the adapter's decision
9818
+ * (e.g. gitlab:merge_request:target-default-route) stays "dispatched"
9819
+ * forever — the activity graph shows it as running and active-task
9820
+ * safety treats the (project, subject) slot as busy (#27).
9821
+ */
9822
+ private resolveIntent;
9823
+ private meshErrorStatus;
9630
9824
  /**
9631
9825
  * Hold a message addressed to an agent on an unreachable peer.
9632
9826
  *
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{a as L}from"./chunk-W5C2GDNC.js";import{B as bt,C as Tt,D as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt}from"./chunk-UEP7IRBD.js";import"./chunk-F6CNF7V3.js";import"./chunk-GWQIMAJ7.js";import"./chunk-V7FYSZSV.js";import"./chunk-ZVP6GB4G.js";import{J as yt,h as lt,i as ct,j as dt,k as mt,l as pt}from"./chunk-6VQKHMEQ.js";import"./chunk-5FEQI22L.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import{h as ut}from"./chunk-A4YR3PQY.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-K6E7WJ7O.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-3SCPRYJB.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-JWKIFAXA.js";import"./chunk-W3YGESNK.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import{a as gt,b as ft,e as ht}from"./chunk-MFVI5FOM.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-JGJE5Y2J.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-2DBGOCCW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.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-LCIREYTD.js";import{a as m,b as G}from"./chunk-L2WSPY6S.js";import{a as Fe,b as Le,c as A,d as De}from"./chunk-VDMYBPYB.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{e as tt,g as st,h as ot,j as nt}from"./chunk-2DMVKLLE.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.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-W5C2GDNC.js";import{Y as bt,Z as Tt,_ as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt}from"./chunk-DXXWYYZI.js";import"./chunk-F6CNF7V3.js";import"./chunk-3PL3WLIR.js";import"./chunk-V7FYSZSV.js";import"./chunk-ZVP6GB4G.js";import{J as yt,h as lt,i as ct,j as dt,k as mt,l as pt}from"./chunk-4QNZI4WE.js";import"./chunk-FLNN3KSX.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import{h as ut}from"./chunk-LLKILWWO.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-3TNK7VGH.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-3SCPRYJB.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-PBVEYPZB.js";import"./chunk-WEN2P4RS.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import{a as gt,b as ft,e as ht}from"./chunk-GYBYKREN.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-JSZRGMSA.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-LQFEH3SA.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.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-LCIREYTD.js";import{a as m,b as G}from"./chunk-L2WSPY6S.js";import{a as Fe,b as Le,c as A,d as De}from"./chunk-VDMYBPYB.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{e as tt,g as st,h as ot,j as nt}from"./chunk-LA6AKS4N.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.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-BOKE5M5S.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-HPY6OOFO.js";import"./chunk-ZSNTLADV.js";import"./chunk-WRBW4A2U.js";import"./chunk-SYJUZ3F2.js";import"./chunk-2TJ5L7CB.js";import"./chunk-7CVJ4JOE.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-DXXWYYZI.js";import"./chunk-F6CNF7V3.js";import"./chunk-3PL3WLIR.js";import"./chunk-V7FYSZSV.js";import"./chunk-ZVP6GB4G.js";import"./chunk-4QNZI4WE.js";import"./chunk-FLNN3KSX.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import"./chunk-LLKILWWO.js";import"./chunk-3TNK7VGH.js";import"./chunk-SFQUP3BP.js";import"./chunk-3SCPRYJB.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-PBVEYPZB.js";import"./chunk-WEN2P4RS.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import"./chunk-GYBYKREN.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-JSZRGMSA.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import"./chunk-LQFEH3SA.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-VDMYBPYB.js";import"./chunk-DSYKYZMT.js";import"./chunk-LA6AKS4N.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{a as buildProgram};
2
+ //# sourceMappingURL=program-XJEQAWN3.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-JSZRGMSA.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import"./chunk-LQFEH3SA.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-LA6AKS4N.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{a as agenticQuery};
2
+ //# sourceMappingURL=query-EDW72Q4O.js.map
@@ -1,2 +1,2 @@
1
- import{A as a,B as b,C as c,D as d,E as e,F as f,G as g,H as h,I as i,J as j}from"./chunk-6VQKHMEQ.js";import"./chunk-5FEQI22L.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import"./chunk-A4YR3PQY.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-JWKIFAXA.js";import"./chunk-W3YGESNK.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import"./chunk-MFVI5FOM.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-JGJE5Y2J.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import"./chunk-2DBGOCCW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-DSYKYZMT.js";import"./chunk-2DMVKLLE.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{j as AgentRegistry,e as TRACE_STEP_SUMMARY_BYTES,c as buildEntryMeta,d as buildWikiContext,f as clipForTrace,i as emitTraceStepsFromStreamEvent,h as firstMissingRequiredTool,b as getGlobalRegistry,a as setGlobalRegistry,g as tallyToolUses};
2
- //# sourceMappingURL=registry-OB6S66XX.js.map
1
+ import{A as a,B as b,C as c,D as d,E as e,F as f,G as g,H as h,I as i,J as j}from"./chunk-4QNZI4WE.js";import"./chunk-FLNN3KSX.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import"./chunk-LLKILWWO.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-PBVEYPZB.js";import"./chunk-WEN2P4RS.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import"./chunk-GYBYKREN.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-JSZRGMSA.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import"./chunk-LQFEH3SA.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-DSYKYZMT.js";import"./chunk-LA6AKS4N.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{j as AgentRegistry,e as TRACE_STEP_SUMMARY_BYTES,c as buildEntryMeta,d as buildWikiContext,f as clipForTrace,i as emitTraceStepsFromStreamEvent,h as firstMissingRequiredTool,b as getGlobalRegistry,a as setGlobalRegistry,g as tallyToolUses};
2
+ //# sourceMappingURL=registry-GWN34G4J.js.map
@@ -1,2 +1,2 @@
1
- import{q as m,t as p,v as d,w as x}from"./chunk-2DBGOCCW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import{a as u,f}from"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-2DMVKLLE.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.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-F5NVL2G7.js.map
1
+ import{q as m,t as p,v as d,w as x}from"./chunk-LQFEH3SA.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import{a as u,f}from"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-LA6AKS4N.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.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-V7T6BQU7.js.map
@@ -1,4 +1,4 @@
1
- import{b}from"./chunk-GWQIMAJ7.js";import"./chunk-VMDA2SX2.js";import"./chunk-2GIDVZ4H.js";import"./chunk-2DBGOCCW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-2DMVKLLE.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";import{createHash as A}from"crypto";var v="review:",I={decisions:"project",warnings:"feedback",friction:"feedback",context:"reference"};function E(t,n,r){let s=A("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";function L(t,n){return`${t}|${b(n)}`}function K(t,n={}){let r=n.kinds??Object.keys(I),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=I[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=E(e.id,c,a),O=g.slice(g.lastIndexOf("@")),w=`${c}${O}`,y=L(c,a),k=f.get(y)??new Set;if(k.add(e.session_id??e.id),f.set(y,k),d.has(w))continue;let _=String($?.evidence??"").trim(),S={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:_,agent:e.agent,source:e.source}),d.set(w,S),u.set(w,y),h.push(S)}}}for(let[e,i]of d){i.occurrences=f.get(u.get(e)??"")?.size??1;let o=x.get(i.stamp);i.memory.body=T(o,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 T(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}from"./chunk-3PL3WLIR.js";import"./chunk-VMDA2SX2.js";import"./chunk-2GIDVZ4H.js";import"./chunk-LQFEH3SA.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-LA6AKS4N.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";import{createHash as A}from"crypto";var v="review:",I={decisions:"project",warnings:"feedback",friction:"feedback",context:"reference"};function E(t,n,r){let s=A("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";function L(t,n){return`${t}|${b(n)}`}function K(t,n={}){let r=n.kinds??Object.keys(I),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=I[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=E(e.id,c,a),O=g.slice(g.lastIndexOf("@")),w=`${c}${O}`,y=L(c,a),k=f.get(y)??new Set;if(k.add(e.session_id??e.id),f.set(y,k),d.has(w))continue;let _=String($?.evidence??"").trim(),S={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:_,agent:e.agent,source:e.source}),d.set(w,S),u.set(w,y),h.push(S)}}}for(let[e,i]of d){i.occurrences=f.get(u.get(e)??"")?.size??1;let o=x.get(i.stamp);i.memory.body=T(o,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 T(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{I as PROMOTABLE_KINDS,v as REVIEW_STAMP_PREFIX,F as parseReviewStamp,E as reviewStamp,K as reviewsToCandidates};
4
- //# sourceMappingURL=review-candidates-IRPKFWL2.js.map
4
+ //# sourceMappingURL=review-candidates-7QKNMRGU.js.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"./chunk-W3YGESNK.js";import"./chunk-2DBGOCCW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-2DMVKLLE.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{a as cheapModelForEngine,b as routeTaskModel};
2
- //# sourceMappingURL=routing-OSPRKRAY.js.map
1
+ import{a,b}from"./chunk-WEN2P4RS.js";import"./chunk-LQFEH3SA.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-LA6AKS4N.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{a as cheapModelForEngine,b as routeTaskModel};
2
+ //# sourceMappingURL=routing-BHQXFUSH.js.map
@@ -0,0 +1,2 @@
1
+ import{g as a,h as b}from"./chunk-LLKILWWO.js";import"./chunk-PBVEYPZB.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-L2WSPY6S.js";import"./chunk-LA6AKS4N.js";import"./chunk-FIOB3MEX.js";export{b as CronScheduler,a as getNextCronDate};
2
+ //# sourceMappingURL=scheduler-LY4RBPB6.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-2DBGOCCW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-2DMVKLLE.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.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-2MHKVMW2.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-LQFEH3SA.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-LA6AKS4N.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.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-U57NWHKC.js.map
@@ -1,2 +1,2 @@
1
- import{v as S,w}from"./chunk-2DBGOCCW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import{a as g,b as h,f as R}from"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import{d as f}from"./chunk-VDMYBPYB.js";import"./chunk-2DMVKLLE.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.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-7LCHJVPK.js.map
1
+ import{v as S,w}from"./chunk-LQFEH3SA.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import{a as g,b as h,f as R}from"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import{d as f}from"./chunk-VDMYBPYB.js";import"./chunk-LA6AKS4N.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.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-JL3JJJP4.js.map
@@ -0,0 +1,2 @@
1
+ import"./chunk-VWTBHLMX.js";import{e as a,f as b}from"./chunk-GYBYKREN.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import{a as c}from"./chunk-JSZRGMSA.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import"./chunk-LQFEH3SA.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-LA6AKS4N.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{b as WikiHub,a as WikiStore,c as agenticQuery};
2
+ //# sourceMappingURL=wiki-AQ4K3F7V.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentix-cli",
3
- "version": "0.33.0",
3
+ "version": "0.35.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": {
@@ -1,13 +0,0 @@
1
- import{b as m,c as C}from"./chunk-FIOB3MEX.js";import{z as t}from"zod";var T,A,$,I,P,D,L,_,z,h,y=m(()=>{"use strict";T=t.enum(["mon","tue","wed","thu","fri","sat","sun"]),A=t.object({days:t.array(T).default(["mon","tue","wed","thu","fri"]),start:t.string().regex(/^\d{2}:\d{2}$/),end:t.string().regex(/^\d{2}:\d{2}$/),lunch:t.object({start:t.string().regex(/^\d{2}:\d{2}$/),end:t.string().regex(/^\d{2}:\d{2}$/)}).optional()}),$=t.object({title:t.string(),responsibilities:t.array(t.string()).default([]),sopPath:t.string().optional(),kpis:t.array(t.string()).default([])}),I=t.object({role:t.string(),reportsTo:t.string().optional(),schedule:A,utilizationTarget:t.number().min(0).max(1).default(.8)}),P=t.object({channel:t.string(),chatId:t.string(),accountId:t.string().optional()}),D=t.discriminatedUnion("type",[t.object({type:t.literal("backlog"),path:t.string().default(".agentx/backlog.md")}),t.object({type:t.literal("gitlab"),projects:t.array(t.string()).default([])}),t.object({type:t.literal("wiki"),path:t.string(),glob:t.string().default("**/*.md")})]),L=t.object({id:t.string(),pm:t.string().optional(),client:t.string().optional()}),_=t.object({channel:t.string().optional(),chatId:t.string().optional(),username:t.string().optional(),senderId:t.string().optional(),client:t.string(),project:t.string().optional(),displayName:t.string().optional()}),z=t.object({name:t.string().optional(),kind:t.enum(["client","internal","own"]).optional(),respondWithin:t.string().optional(),standing:t.array(t.string()).default([])}),h=t.object({enabled:t.boolean().default(!1),timezone:t.string().default("UTC"),mainChannel:P,workSource:D,roles:t.record(t.string(),$).default({}),orgChart:t.record(t.string(),I).default({}),projects:t.array(L).default([]),contactMap:t.array(_).default([]),clients:t.record(t.string(),z).default({}),workTickMinutes:t.number().int().min(1).max(60).default(15),idleQueueThreshold:t.number().int().min(0).default(0),standup:t.object({enabled:t.boolean().default(!0),plansDir:t.string().default(".agentx/plans"),maxAgentsPerDay:t.number().int().min(1).max(100).default(20),dryRun:t.boolean().default(!1)}).default({})})});import{z as n}from"zod";function be(a,i){let s=new Set(a.labels||[]);if(a.state==="closed"){let r=i.find(l=>l.kind==="closed");if(r)return r.id}for(let r of i)if(r.kind==="scoped-label"&&r.scopedLabel&&s.has(r.scopedLabel))return r.id;for(let r of i)if(r.kind==="label"&&r.mapsToLabel&&s.has(r.mapsToLabel))return r.id;let o=i.find(r=>r.kind==="open-backlog");if(o){let r=o.scopedPrefix+"::";return[...s].some(u=>u.startsWith(r))?null:o.id}return i[0]?.id??null}function he(a,i){let s=[],o=[],r=!1,l=!1;return i.kind==="scoped-label"&&i.scopedLabel?s.push(i.scopedLabel):i.kind==="label"&&i.mapsToLabel?s.push(i.mapsToLabel):i.kind==="closed"&&(r=!0),a&&(a.kind==="scoped-label"&&a.scopedLabel?o.push(a.scopedLabel):a.kind==="label"&&a.mapsToLabel?o.push(a.mapsToLabel):a.kind==="closed"&&i.kind!=="closed"&&(l=!0)),{addLabels:s.length?s:void 0,removeLabels:o.length?o:void 0,closeIssue:r||void 0,reopen:l||void 0}}var E,B,M,R,O,U,x,K,S,k=m(()=>{"use strict";E=n.object({name:n.string(),color:n.string().regex(/^#[0-9a-f]{6}$/i).default("#6366f1"),description:n.string().optional()}),B=n.object({id:n.string().regex(/^[a-z0-9_-]+$/,"column id must be lowercase slug"),title:n.string(),kind:n.enum(["open-backlog","scoped-label","closed","label"]).default("label"),mapsToLabel:n.string().optional(),scopedLabel:n.string().optional(),scopedPrefix:n.string().default("Status"),accent:n.string().optional()}),M=n.object({enabled:n.boolean().default(!0),staleDoingMinutes:n.number().int().min(1).default(45),respectLunchBreak:n.boolean().default(!0),respectSchedule:n.boolean().default(!0),action:n.enum(["badge","notify"]).default("badge")}),R=n.discriminatedUnion("type",[n.object({type:n.literal("gitlab"),projects:n.array(n.string()).min(1)})]),O=[{id:"open",title:"Open",kind:"open-backlog",scopedPrefix:"Status",accent:"#6b7280"},{id:"todo",title:"To Do",kind:"scoped-label",scopedLabel:"Status::To Do",scopedPrefix:"Status",accent:"#fb7a35"},{id:"doing",title:"Doing",kind:"scoped-label",scopedLabel:"Status::Doing",scopedPrefix:"Status",accent:"#22c55e"},{id:"onhold",title:"On Hold",kind:"scoped-label",scopedLabel:"Status::On Hold",scopedPrefix:"Status",accent:"#f59e0b"},{id:"review",title:"Review",kind:"scoped-label",scopedLabel:"Status::Review",scopedPrefix:"Status",accent:"#3b82f6"},{id:"closed",title:"Closed",kind:"closed",scopedPrefix:"Status",accent:"#6b7280"}],U=n.object({id:n.string().regex(/^[a-z0-9_-]+$/,"board id must be lowercase slug"),name:n.string(),source:R,primaryToolLabel:n.string().optional(),labels:n.array(E).default([]),columns:n.array(B).min(1).default(O),timeRangeDays:n.number().int().min(1).max(365).default(30),closedWindowDays:n.number().int().min(1).max(365).default(30),reconciliation:M.default({})}),x=n.array(U).default([]),K=n.object({name:n.string(),url:n.string(),dashboardUrl:n.string().optional(),token:n.string().optional(),dashboardToken:n.string().optional()}),S=n.object({enabled:n.boolean().default(!1),port:n.number().int().default(4202),bind:n.string().default("127.0.0.1"),token:n.string().optional(),daemonUrl:n.string().default("http://localhost:18800"),daemons:n.array(K).default([]),draftAgent:n.string().optional()}).default({})});var ce={};C(ce,{INTEGRATION_KINDS:()=>G,daemonConfigSchema:()=>w,expandEnvVars:()=>g,loadDaemonConfig:()=>de,validateWorkspaces:()=>ue});import{z as e}from"zod";import{readFileSync as j,existsSync as f}from"fs";import{resolve as p}from"path";function N(a){let i=p(a,".env");if(!f(i))return;let s=j(i,"utf-8");for(let o of s.split(`
2
- `)){let r=o.trim();if(!r||r.startsWith("#"))continue;let l=r.indexOf("=");if(l===-1)continue;let u=r.slice(0,l).trim(),d=r.slice(l+1).trim();process.env[u]||(process.env[u]=d)}}function g(a){if(typeof a=="string")return a.replace(/\$\{(\w+)\}/g,(i,s)=>process.env[s]||"");if(Array.isArray(a))return a.map(g);if(a!==null&&typeof a=="object"){let i={};for(let[s,o]of Object.entries(a))i[s]=g(o);return i}return a}function le(a,i){let s=[],o=new Set;for(let r of a){let l=r.path.join("."),u=/^channels\.telegram\.accounts\.([^.]+)\.token$/.exec(l);if(u&&r.message.toLowerCase().includes("required")){let d=u[1],c=`tg:${d}`;if(o.has(c))continue;o.add(c),s.push(`Hint: Telegram account "${d}" is enabled but has no bot token.
3
- Either:
4
- A) Open ${i} and set channels.telegram.accounts.${d}.token to your bot token (or "\${TG_${d.toUpperCase()}_BOT_TOKEN}" + the matching .env entry).
5
- B) If you don't need Telegram on this instance, remove the entire "telegram" block under "channels" (or set channels.telegram.enabled to false AND drop accounts.${d}).`)}}return s}function de(a){let i=a?[a]:[p(process.cwd(),"agentx.json"),p(process.cwd(),".agentx/config.json")];N(process.cwd());let s,o;for(let d of i)if(f(d)){s=j(d,"utf-8"),o=d;break}if(!s||!o)throw new Error(`No config found. Create agentx.json or .agentx/config.json
6
- Searched: ${i.join(", ")}`);let r;try{r=JSON.parse(s)}catch(d){throw new Error(`Invalid JSON in ${o}: ${d.message}`)}let l=g(r),u=w.safeParse(l);if(!u.success){let d=u.error.issues.map(b=>` ${b.path.join(".")}: ${b.message}`).join(`
7
- `),c=le(u.error.issues,o),v=c.length?`
8
-
9
- ${c.join(`
10
-
11
- `)}`:"";throw new Error(`Config validation failed (${o}):
12
- ${d}${v}`)}return u.data}function ue(a){let i=[];for(let[s,o]of Object.entries(a.agents)){if(!f(o.workspace)){i.push(`Agent "${s}": workspace not found at ${o.workspace}`);continue}if(o.tier==="claude-code"){let u=p(o.workspace,".claude");f(u)||i.push(`Agent "${s}": no .claude/ directory in workspace ${o.workspace}. Claude Code native features (hooks, MCP, skills) won't be available.`)}let r=o.provider||"claude",l=a.providers[r];!["claude-code","codex-cli","opencode"].includes(o.tier)&&(!l||!l.apiKey)&&i.push(`Agent "${s}": provider "${r}" has no API key configured. Set providers.${r}.apiKey in config or use a CLI-backed tier ("claude-code", "codex-cli", or "opencode").`)}for(let[s,o]of Object.entries(a.crons))a.agents[o.agent]||i.push(`Cron "${s}": references unknown agent "${o.agent}"`);if(a.channels.telegram.enabled)for(let[s,o]of Object.entries(a.channels.telegram.accounts))a.agents[o.agentBinding]||i.push(`Telegram account "${s}": references unknown agent "${o.agentBinding}"`);return i}var Z,F,W,q,H,J,G,Y,Q,V,X,ee,te,ne,ae,oe,re,ie,se,w,fe=m(()=>{y();k();Z=e.object({apiKey:e.string().optional(),defaultModel:e.string().optional(),baseUrl:e.string().optional(),thinking:e.boolean().optional()}),F=e.object({type:e.literal("stdio").optional(),command:e.string(),args:e.array(e.string()).default([]),env:e.record(e.string(),e.string()).optional()}),W=e.object({type:e.literal("http"),url:e.string().url(),headers:e.record(e.string(),e.string()).optional()}),q=e.union([W,F]),H=e.object({tokenEnv:e.string().regex(/^[A-Z][A-Z0-9_]*$/).optional(),privateAppTokenEnv:e.string().regex(/^[A-Z][A-Z0-9_]*$/).optional(),apiKeyEnv:e.string().regex(/^[A-Z][A-Z0-9_]*$/).optional(),refreshTokenEnv:e.string().regex(/^[A-Z][A-Z0-9_]*$/).optional(),clientIdEnv:e.string().regex(/^[A-Z][A-Z0-9_]*$/).optional(),clientSecretEnv:e.string().regex(/^[A-Z][A-Z0-9_]*$/).optional(),auth:e.literal("keyring").optional(),sessionDir:e.string().optional()}).strict(),J=e.object({kind:e.string().min(1),label:e.string().min(1),credentials:H.default({}),metadata:e.record(e.string(),e.union([e.string(),e.number(),e.boolean()])).default({}),enabled:e.boolean().default(!0)}),G=["telegram-bot","whatsapp","gitlab-user","github-user","gmail","hotmail","smtp","hubspot","salesforce","pipedrive","odoo","trello","linear","asana","jira","notion","stripe","sentry","vercel","twilio","custom"],Y=e.object({name:e.string(),workspace:e.string(),tier:e.enum(["claude-code","codex-cli","opencode","sdk","orchestrator"]).default("claude-code"),provider:e.string().optional(),model:e.string().optional(),systemPrompt:e.string().optional(),mentions:e.array(e.string()).default([]),intents:e.array(e.string()).default([]),maxDelegationDepth:e.number().int().min(0).max(50).default(5),mcp:e.record(e.string(),q).optional(),codegraph:e.boolean().default(!1),contextStrategy:e.enum(["layered","planner"]).optional(),contextReferences:e.boolean().default(!1),richMessages:e.boolean().default(!0),maxConcurrent:e.number().default(1),maxExecutionMinutes:e.number().int().min(1).max(240).default(20),permissionMode:e.string().default("default"),billing:e.enum(["subscription","api"]).default("subscription"),toolUseRequired:e.array(e.string()).default([]),gitlabAutoReply:e.boolean().optional(),persistentProcess:e.boolean().default(!1),queueMode:e.enum(["collect","followup","drop"]).default("collect"),heartbeat:e.object({enabled:e.boolean().default(!1),intervalMinutes:e.number().default(30),prompt:e.string().default("Check inbox, pending tasks, and system health. Report anything that needs attention."),channel:e.string().default("heartbeat")}).default({}),access:e.enum(["private","public"]).default("private"),integrations:e.array(J).default([])}),Q=e.object({token:e.string(),agentBinding:e.string(),allowFrom:e.array(e.string()).optional(),pollInbound:e.boolean().default(!0)}),V=e.object({telegram:e.object({enabled:e.boolean().default(!1),accounts:e.record(e.string(),Q).default({}),policy:e.object({dm:e.enum(["pair","block"]).default("pair"),group:e.enum(["mention-required","all"]).default("mention-required"),allowFrom:e.array(e.string()).optional()}).default({})}).default({}),whatsapp:e.object({enabled:e.boolean().default(!1),sessionDir:e.string().default(".agentx/whatsapp-sessions"),defaultAgent:e.string().optional(),allowFrom:e.array(e.string()).optional(),routes:e.array(e.object({contact:e.string().optional(),group:e.string().optional(),agent:e.string()})).default([]),ingest:e.object({enabled:e.boolean().default(!1),mode:e.enum(["metadata-only","messages"]).default("metadata-only"),allowContacts:e.array(e.string()).default([]),allowGroups:e.array(e.string()).default([]),denyContacts:e.array(e.string()).default([]),denyGroups:e.array(e.string()).default([]),messageCap:e.number().int().min(1).max(500).default(50),historyDays:e.number().int().min(1).max(365).default(30),contactRefreshDays:e.number().int().min(1).max(90).default(7),throttle:e.object({minMsBetweenCalls:e.number().int().min(100).default(1500),maxCallsPerMinute:e.number().int().min(1).default(20),maxChatsPerSweep:e.number().int().min(1).default(25)}).default({}),retentionDays:e.number().int().min(0).default(0)}).default({})}).default({}),gitlab:e.object({enabled:e.boolean().default(!1),webhookPort:e.number().default(18810),webhookSecret:e.string().optional(),host:e.string().default("https://gitlab.com"),token:e.string().optional(),autoReplyLegacy:e.boolean().default(!0),routes:e.array(e.object({project:e.string(),agent:e.string()})).default([]),agentMappings:e.array(e.object({agentId:e.string(),gitlabUsernames:e.array(e.string()).default([]),keywords:e.array(e.string()).default([]),token:e.string().optional(),node:e.string().optional()})).default([])}).default({}),github:e.object({enabled:e.boolean().default(!1),autoReplyLegacy:e.boolean().default(!0),token:e.string().optional(),tokenFile:e.string().optional(),appId:e.number().optional(),clientId:e.string().optional(),privateKeyFile:e.string().optional(),webhookSecret:e.string().optional(),routes:e.array(e.object({repo:e.string(),agent:e.string()})).default([]),agentMappings:e.array(e.object({agentId:e.string(),githubUsernames:e.array(e.string()).default([]),token:e.string().optional(),tokenFile:e.string().optional(),node:e.string().optional()})).default([])}).default({}),ntfy:e.object({enabled:e.boolean().default(!1),server:e.string().default("https://ntfy.sh"),topic:e.string().optional(),token:e.string().optional(),defaultPriority:e.number().int().min(1).max(5).default(3),defaultTitle:e.string().optional()}).default({}),webrtc:e.object({enabled:e.boolean().default(!1),stunServers:e.array(e.string()).default(["stun:stun.l.google.com:19302"]),turnServers:e.array(e.object({urls:e.string(),username:e.string().optional(),credential:e.string().optional()})).default([]),allowedCallers:e.array(e.string()).default([]),ringNotify:e.array(e.object({channel:e.string(),chatId:e.string(),accountId:e.string().optional()})).default([]),callUrlBase:e.string().optional(),bot:e.object({enabled:e.boolean().default(!1),defaultAgentId:e.string().optional(),whisperBackend:e.enum(["auto","mlx","openai"]).default("auto"),whisperModel:e.string().optional(),whisperLanguage:e.string().default("auto"),mlxBinary:e.string().optional(),transcriptChannel:e.object({channel:e.string(),chatId:e.string(),accountId:e.string().optional()}).optional(),maxCallMinutes:e.number().int().min(1).max(240).default(30)}).default({})}).default({})}),X=e.object({enabled:e.boolean().default(!0),schedule:e.string(),timezone:e.string().default("UTC"),agent:e.string(),prompt:e.string().default(""),command:e.string().optional(),timeout:e.number().default(600),model:e.string().optional(),maxOutputTokens:e.number().int().min(50).max(8e3).optional(),onError:e.union([e.enum(["log","notify","disable"]),e.array(e.enum(["log","notify","disable"]))]).default("log").transform(a=>Array.isArray(a)?a:[a]),notify:e.object({channel:e.string(),chatId:e.string(),accountId:e.string().optional()}).optional()}).refine(a=>!!(a.command?.trim()||a.prompt?.trim()),{message:"a cron needs either a prompt (dispatch an agent) or a command (run it directly)"}),ee=e.object({name:e.string(),triggers:e.array(e.object({pattern:e.string(),channel:e.string().optional()})),allowedContacts:e.array(e.string()).optional(),agent:e.string(),prompt:e.string(),schedule:e.string().optional(),timezone:e.string().default("UTC"),notify:e.object({channel:e.string(),chatId:e.string(),accountId:e.string().optional()}).optional()}),te=e.object({url:e.string(),name:e.string(),token:e.string().optional()}),ne=e.object({name:e.string(),agent:e.string(),enabled:e.boolean().default(!0)}),ae=e.object({enabled:e.boolean().default(!1),peers:e.array(te).default([]),inboxes:e.array(ne).default([]),discovery:e.enum(["static","mdns"]).default("static"),healthCheck:e.object({interval:e.number().default(60),timeout:e.number().default(10)}).default({})}),oe=e.object({enabled:e.boolean().default(!1),baseDir:e.string().default(".agentx/graph"),draftAgent:e.string().optional(),reviewAgent:e.string().optional(),autoApproveStructure:e.enum(["strict","extend-leaves","any"]).default("extend-leaves"),autoApproveConfidence:e.number().min(0).max(1).default(1),classifierModel:e.string().default("claude-haiku-4-5-20251001"),retrievalWeights:e.object({graph:e.number().min(0).default(.6),bm25:e.number().min(0).default(.4)}).default({})}).default({}),re=e.object({mode:e.enum(["off","shadow","active"]).default("off"),backend:e.string().optional(),model:e.string().optional(),timeoutMs:e.number().int().min(100).default(1e4),temperature:e.number().min(.01).default(1),explore:e.number().min(0).max(1).default(.15),holdout:e.number().min(0).max(1).optional()}).default({}),ie=e.object({enabled:e.boolean().default(!1),dbPath:e.string().default(".agentx/decisions/decisions.sqlite"),redactState:e.boolean().default(!1),keepStateRows:e.number().int().min(0).default(2e3),defaultBackend:e.string().default("local"),backends:e.object({local:e.object({provider:e.string().default("claude-code"),model:e.string().default("claude-haiku-4-5-20251001"),structureMode:e.enum(["auto","tool","text"]).default("auto"),normalizeProbabilities:e.boolean().default(!0),nRetryMalformedStructure:e.number().int().min(0).max(3).default(1),maxStateChars:e.number().int().min(500).default(24e3)}).default({}),simpleJev:e.object({baseUrl:e.string().default("http://127.0.0.1:8000/v1"),model:e.string().optional(),apiKeyEnv:e.string().optional(),timeoutMs:e.number().int().min(100).default(3e4),maxStateChars:e.number().int().min(500).default(6e3),maxChoiceOptions:e.number().int().min(2).max(255).default(50)}).default({}),jev:e.object({baseUrl:e.string().default("https://openrouter.ai/api/alpha"),path:e.string().default("/decisions"),model:e.string().default("jev-latest"),apiKeyEnv:e.string().default("OPENROUTER_API_KEY"),timeoutMs:e.number().int().min(100).default(3e4),maxStateChars:e.number().int().min(500).default(9e4),maxChoiceOptions:e.number().int().min(2).max(255).default(255)}).default({}),typesafe:e.object({baseUrl:e.string().default("https://api.typesafe.ai/v1"),path:e.string().default("/systemone"),model:e.string().default("jev-latest"),apiKeyEnv:e.string().default("TYPESAFE_API_KEY"),timeoutMs:e.number().int().min(100).default(3e4),maxStateChars:e.number().int().min(500).default(9e4),maxChoiceOptions:e.number().int().min(2).max(255).default(255)}).default({})}).default({}),seats:e.record(e.string(),re).default({}),routing:e.object({cheapModel:e.string().optional(),cheapModels:e.object({"claude-code":e.string().optional(),"codex-cli":e.string().optional()}).optional()}).default({})}).default({}),se=e.object({longTaskThreshold:e.number().default(30),destination:e.object({channel:e.string(),chatId:e.string(),accountId:e.string().optional()}).optional(),on:e.object({taskComplete:e.boolean().default(!0),taskError:e.boolean().default(!0),taskQueued:e.boolean().default(!1)}).default({})}).default({}),w=e.object({node:e.object({id:e.string(),name:e.string(),bind:e.string().default("127.0.0.1:18800"),defaultAgent:e.string().optional()}),providers:e.record(e.string(),Z).default({}),agents:e.record(e.string(),Y).default({}),channels:V.default({}),crons:e.record(e.string(),X).default({}),services:e.record(e.string(),ee).default({}),notifications:se,mesh:ae.default({}),business:h.optional(),boards:x,dashboard:S,graph:oe,decisions:ie,workflows:e.object({enabled:e.boolean().default(!1),dir:e.string().default(".agentx/workflows"),n8n:e.object({baseUrl:e.string().default(""),apiKey:e.string().default("")}).default({baseUrl:"",apiKey:""}),matching:e.object({enabled:e.boolean().default(!1),mode:e.enum(["suggest","auto"]).default("suggest"),autoRunThreshold:e.number().min(0).max(1).default(.85),suggestThreshold:e.number().min(0).max(1).default(.65)}).default({}),editor:e.enum(["disabled","readonly","edit"]).default("edit")}).default({}),procedures:e.object({enabled:e.boolean().default(!0),dir:e.string().default(".agentx/procedures"),extraction:e.object({enabled:e.boolean().default(!1),onTaskCompletion:e.boolean().default(!1),minOccurrences:e.number().int().min(2).default(3),sinceDays:e.number().int().min(1).default(7),maxClusters:e.number().int().min(1).default(5),via:e.string().optional()}).default({}),injection:e.object({enabled:e.boolean().default(!0),maxProcedures:e.number().int().min(1).default(2),minScore:e.number().min(0).max(1).default(.5)}).default({})}).default({}),webhooks:e.array(e.object({id:e.string().regex(/^[a-z0-9][a-z0-9_-]*$/,"webhook id must be lowercase slug"),source:e.string().min(1),agentId:e.string(),secretEnv:e.string().optional(),description:e.string().optional(),enabled:e.boolean().default(!0),node:e.string().optional(),triggers:e.record(e.string(),e.string()).optional(),defaultWorkflow:e.string().optional()})).default([]),session:e.object({staleMinutes:e.number().int().min(1).max(1440).default(720),maxTurnsPerSession:e.number().int().min(2).max(200).default(40),tierTwoThresholdTokens:e.number().int().min(5e4).max(2e5).default(18e4),contextStrategy:e.enum(["layered","planner"]).default("layered"),maxClaudeCodeDispatchesPerHour:e.number().int().min(1).max(1e4).default(80),maxClaudeCodeDispatchesPer5h:e.number().int().min(1).max(5e4).default(180),continuityStateTurns:e.number().int().min(0).max(5).default(0)}).default({}),plugins:e.array(e.string()).default([]),processPool:e.object({maxIdleSeconds:e.number().int().min(5).max(86400).default(30),maxAgeSeconds:e.number().int().min(60).max(86400).default(2700),sweepIntervalSeconds:e.number().int().min(1).max(300).default(5)}).default({})})});export{be as a,he as b,k as c,G as d,w as e,g as f,de as g,ue as h,ce as i,fe as j};
13
- //# sourceMappingURL=chunk-2DMVKLLE.js.map