agentix-cli 0.34.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 (88) 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 +6 -1
  4. package/apps/mac-voice/Sources/AgentXVoice/main.swift +3 -0
  5. package/dist/{App-QHPZXA42.js → App-K5J52F7O.js} +2 -2
  6. package/dist/{ChatApp-EAHHH365.js → ChatApp-LRRAPZH7.js} +2 -2
  7. package/dist/{agent-KBBO7OZS.js → agent-XEXAYH5J.js} +2 -2
  8. package/dist/{board-dashboard-74OLMLAD.js → board-dashboard-CBOESBMD.js} +4 -4
  9. package/dist/{chunk-X6HLI6XB.js → chunk-3PL3WLIR.js} +2 -2
  10. package/dist/{chunk-JDC35PWM.js → chunk-3TNK7VGH.js} +2 -2
  11. package/dist/{chunk-ZMFUBIEQ.js → chunk-4QNZI4WE.js} +5 -5
  12. package/dist/{chunk-33G4TIZT.js → chunk-DXXWYYZI.js} +204 -187
  13. package/dist/chunk-DXXWYYZI.js.map +1 -0
  14. package/dist/{chunk-5H5L75RN.js → chunk-FLNN3KSX.js} +2 -2
  15. package/dist/{chunk-PG7BAZIZ.js → chunk-GYBYKREN.js} +2 -2
  16. package/dist/{chunk-6WGTLDME.js → chunk-HPY6OOFO.js} +137 -146
  17. package/dist/chunk-HPY6OOFO.js.map +1 -0
  18. package/dist/{chunk-IUNCX6BG.js → chunk-JSZRGMSA.js} +2 -2
  19. package/dist/chunk-LA6AKS4N.js +13 -0
  20. package/dist/chunk-LA6AKS4N.js.map +1 -0
  21. package/dist/{chunk-UJF5JUFJ.js → chunk-LLKILWWO.js} +2 -2
  22. package/dist/{chunk-QXAUKNMW.js → chunk-LQFEH3SA.js} +2 -2
  23. package/dist/{chunk-MJYE5ADH.js → chunk-PBVEYPZB.js} +2 -2
  24. package/dist/{chunk-U5P7XGCB.js → chunk-SYJUZ3F2.js} +2 -2
  25. package/dist/{chunk-QKNAGTJK.js → chunk-WEN2P4RS.js} +2 -2
  26. package/dist/{chunk-CY24RXE4.js → chunk-WRBW4A2U.js} +2 -2
  27. package/dist/{chunk-IVAGDL5M.js → chunk-ZSNTLADV.js} +2 -2
  28. package/dist/cli.js +1 -1
  29. package/dist/client-APAWETTA.js +2 -0
  30. package/dist/config-S3VHHVYW.js +2 -0
  31. package/dist/config-mutator-5B2YWZMK.js +2 -0
  32. package/dist/doctor-SCECRUJ7.js +2 -0
  33. package/dist/index.d.ts +84 -0
  34. package/dist/index.js +1 -1
  35. package/dist/program-XJEQAWN3.js +2 -0
  36. package/dist/query-EDW72Q4O.js +2 -0
  37. package/dist/{registry-3RN7I6YW.js → registry-GWN34G4J.js} +2 -2
  38. package/dist/{request-planner-JX7M3PTD.js → request-planner-V7T6BQU7.js} +2 -2
  39. package/dist/{review-candidates-UTS4RX4U.js → review-candidates-7QKNMRGU.js} +2 -2
  40. package/dist/{routing-D7APOAP6.js → routing-BHQXFUSH.js} +2 -2
  41. package/dist/scheduler-LY4RBPB6.js +2 -0
  42. package/dist/{seat-UA2ROH3V.js → seat-U57NWHKC.js} +2 -2
  43. package/dist/{select-WQXHYEPD.js → select-JL3JJJP4.js} +2 -2
  44. package/dist/wiki-AQ4K3F7V.js +2 -0
  45. package/package.json +1 -1
  46. package/dist/chunk-33G4TIZT.js.map +0 -1
  47. package/dist/chunk-6WGTLDME.js.map +0 -1
  48. package/dist/chunk-SPJWXIAV.js +0 -13
  49. package/dist/chunk-SPJWXIAV.js.map +0 -1
  50. package/dist/client-CAGQYJML.js +0 -2
  51. package/dist/config-NPLE42XY.js +0 -2
  52. package/dist/config-mutator-FFTODESU.js +0 -2
  53. package/dist/doctor-X4KHQFRF.js +0 -2
  54. package/dist/program-ISXECD4J.js +0 -2
  55. package/dist/query-XLJ6I34S.js +0 -2
  56. package/dist/scheduler-EGR5AJAQ.js +0 -2
  57. package/dist/wiki-RNANPNUX.js +0 -2
  58. /package/dist/{App-QHPZXA42.js.map → App-K5J52F7O.js.map} +0 -0
  59. /package/dist/{ChatApp-EAHHH365.js.map → ChatApp-LRRAPZH7.js.map} +0 -0
  60. /package/dist/{agent-KBBO7OZS.js.map → agent-XEXAYH5J.js.map} +0 -0
  61. /package/dist/{board-dashboard-74OLMLAD.js.map → board-dashboard-CBOESBMD.js.map} +0 -0
  62. /package/dist/{chunk-X6HLI6XB.js.map → chunk-3PL3WLIR.js.map} +0 -0
  63. /package/dist/{chunk-JDC35PWM.js.map → chunk-3TNK7VGH.js.map} +0 -0
  64. /package/dist/{chunk-ZMFUBIEQ.js.map → chunk-4QNZI4WE.js.map} +0 -0
  65. /package/dist/{chunk-5H5L75RN.js.map → chunk-FLNN3KSX.js.map} +0 -0
  66. /package/dist/{chunk-PG7BAZIZ.js.map → chunk-GYBYKREN.js.map} +0 -0
  67. /package/dist/{chunk-IUNCX6BG.js.map → chunk-JSZRGMSA.js.map} +0 -0
  68. /package/dist/{chunk-UJF5JUFJ.js.map → chunk-LLKILWWO.js.map} +0 -0
  69. /package/dist/{chunk-QXAUKNMW.js.map → chunk-LQFEH3SA.js.map} +0 -0
  70. /package/dist/{chunk-MJYE5ADH.js.map → chunk-PBVEYPZB.js.map} +0 -0
  71. /package/dist/{chunk-U5P7XGCB.js.map → chunk-SYJUZ3F2.js.map} +0 -0
  72. /package/dist/{chunk-QKNAGTJK.js.map → chunk-WEN2P4RS.js.map} +0 -0
  73. /package/dist/{chunk-CY24RXE4.js.map → chunk-WRBW4A2U.js.map} +0 -0
  74. /package/dist/{chunk-IVAGDL5M.js.map → chunk-ZSNTLADV.js.map} +0 -0
  75. /package/dist/{client-CAGQYJML.js.map → client-APAWETTA.js.map} +0 -0
  76. /package/dist/{config-NPLE42XY.js.map → config-S3VHHVYW.js.map} +0 -0
  77. /package/dist/{config-mutator-FFTODESU.js.map → config-mutator-5B2YWZMK.js.map} +0 -0
  78. /package/dist/{doctor-X4KHQFRF.js.map → doctor-SCECRUJ7.js.map} +0 -0
  79. /package/dist/{program-ISXECD4J.js.map → program-XJEQAWN3.js.map} +0 -0
  80. /package/dist/{query-XLJ6I34S.js.map → query-EDW72Q4O.js.map} +0 -0
  81. /package/dist/{registry-3RN7I6YW.js.map → registry-GWN34G4J.js.map} +0 -0
  82. /package/dist/{request-planner-JX7M3PTD.js.map → request-planner-V7T6BQU7.js.map} +0 -0
  83. /package/dist/{review-candidates-UTS4RX4U.js.map → review-candidates-7QKNMRGU.js.map} +0 -0
  84. /package/dist/{routing-D7APOAP6.js.map → routing-BHQXFUSH.js.map} +0 -0
  85. /package/dist/{scheduler-EGR5AJAQ.js.map → scheduler-LY4RBPB6.js.map} +0 -0
  86. /package/dist/{seat-UA2ROH3V.js.map → seat-U57NWHKC.js.map} +0 -0
  87. /package/dist/{select-WQXHYEPD.js.map → select-JL3JJJP4.js.map} +0 -0
  88. /package/dist/{wiki-RNANPNUX.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-6WGTLDME.js";import"./chunk-IVAGDL5M.js";import"./chunk-CY24RXE4.js";import"./chunk-U5P7XGCB.js";import"./chunk-2TJ5L7CB.js";import"./chunk-7CVJ4JOE.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-33G4TIZT.js";import"./chunk-F6CNF7V3.js";import"./chunk-X6HLI6XB.js";import"./chunk-V7FYSZSV.js";import"./chunk-ZVP6GB4G.js";import"./chunk-ZMFUBIEQ.js";import"./chunk-5H5L75RN.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import"./chunk-UJF5JUFJ.js";import"./chunk-JDC35PWM.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-MJYE5ADH.js";import"./chunk-QKNAGTJK.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import"./chunk-PG7BAZIZ.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-IUNCX6BG.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import"./chunk-QXAUKNMW.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-SPJWXIAV.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
@@ -1733,6 +1733,30 @@ declare const agentConfigSchema: z.ZodObject<{
1733
1733
  intro?: string | undefined;
1734
1734
  narrate?: "all" | "on" | "off" | undefined;
1735
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
+ }>>;
1736
1760
  }, "strip", z.ZodTypeAny, {
1737
1761
  name: string;
1738
1762
  workspace: string;
@@ -1795,6 +1819,12 @@ declare const agentConfigSchema: z.ZodObject<{
1795
1819
  intro?: string | undefined;
1796
1820
  narrate?: "all" | "on" | "off" | undefined;
1797
1821
  } | undefined;
1822
+ presence?: {
1823
+ initial?: string | undefined;
1824
+ label?: string | undefined;
1825
+ color?: string | undefined;
1826
+ allowActions?: boolean | undefined;
1827
+ } | undefined;
1798
1828
  }, {
1799
1829
  name: string;
1800
1830
  workspace: string;
@@ -1857,6 +1887,12 @@ declare const agentConfigSchema: z.ZodObject<{
1857
1887
  intro?: string | undefined;
1858
1888
  narrate?: "all" | "on" | "off" | undefined;
1859
1889
  } | undefined;
1890
+ presence?: {
1891
+ initial?: string | undefined;
1892
+ label?: string | undefined;
1893
+ color?: string | undefined;
1894
+ allowActions?: boolean | undefined;
1895
+ } | undefined;
1860
1896
  }>;
1861
1897
  declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
1862
1898
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -2281,6 +2317,30 @@ declare const daemonConfigSchema: z.ZodObject<{
2281
2317
  intro?: string | undefined;
2282
2318
  narrate?: "all" | "on" | "off" | undefined;
2283
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
+ }>>;
2284
2344
  }, "strip", z.ZodTypeAny, {
2285
2345
  name: string;
2286
2346
  workspace: string;
@@ -2343,6 +2403,12 @@ declare const daemonConfigSchema: z.ZodObject<{
2343
2403
  intro?: string | undefined;
2344
2404
  narrate?: "all" | "on" | "off" | undefined;
2345
2405
  } | undefined;
2406
+ presence?: {
2407
+ initial?: string | undefined;
2408
+ label?: string | undefined;
2409
+ color?: string | undefined;
2410
+ allowActions?: boolean | undefined;
2411
+ } | undefined;
2346
2412
  }, {
2347
2413
  name: string;
2348
2414
  workspace: string;
@@ -2405,6 +2471,12 @@ declare const daemonConfigSchema: z.ZodObject<{
2405
2471
  intro?: string | undefined;
2406
2472
  narrate?: "all" | "on" | "off" | undefined;
2407
2473
  } | undefined;
2474
+ presence?: {
2475
+ initial?: string | undefined;
2476
+ label?: string | undefined;
2477
+ color?: string | undefined;
2478
+ allowActions?: boolean | undefined;
2479
+ } | undefined;
2408
2480
  }>>>;
2409
2481
  channels: z.ZodDefault<z.ZodObject<{
2410
2482
  telegram: z.ZodDefault<z.ZodObject<{
@@ -4866,6 +4938,12 @@ declare const daemonConfigSchema: z.ZodObject<{
4866
4938
  intro?: string | undefined;
4867
4939
  narrate?: "all" | "on" | "off" | undefined;
4868
4940
  } | undefined;
4941
+ presence?: {
4942
+ initial?: string | undefined;
4943
+ label?: string | undefined;
4944
+ color?: string | undefined;
4945
+ allowActions?: boolean | undefined;
4946
+ } | undefined;
4869
4947
  }>;
4870
4948
  mesh: {
4871
4949
  enabled: boolean;
@@ -5380,6 +5458,12 @@ declare const daemonConfigSchema: z.ZodObject<{
5380
5458
  intro?: string | undefined;
5381
5459
  narrate?: "all" | "on" | "off" | undefined;
5382
5460
  } | undefined;
5461
+ presence?: {
5462
+ initial?: string | undefined;
5463
+ label?: string | undefined;
5464
+ color?: string | undefined;
5465
+ allowActions?: boolean | undefined;
5466
+ } | undefined;
5383
5467
  }> | undefined;
5384
5468
  mesh?: {
5385
5469
  enabled?: boolean | undefined;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{a as L}from"./chunk-W5C2GDNC.js";import{I as bt,J as Tt,K 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-33G4TIZT.js";import"./chunk-F6CNF7V3.js";import"./chunk-X6HLI6XB.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-ZMFUBIEQ.js";import"./chunk-5H5L75RN.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import{h as ut}from"./chunk-UJF5JUFJ.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-JDC35PWM.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-MJYE5ADH.js";import"./chunk-QKNAGTJK.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-PG7BAZIZ.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-IUNCX6BG.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-QXAUKNMW.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-SPJWXIAV.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-ZMFUBIEQ.js";import"./chunk-5H5L75RN.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import"./chunk-UJF5JUFJ.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-MJYE5ADH.js";import"./chunk-QKNAGTJK.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import"./chunk-PG7BAZIZ.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-IUNCX6BG.js";import"./chunk-AJ5RMU7X.js";import"./chunk-2GIDVZ4H.js";import"./chunk-QXAUKNMW.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-SPJWXIAV.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-3RN7I6YW.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-QXAUKNMW.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-SPJWXIAV.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-JX7M3PTD.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-X6HLI6XB.js";import"./chunk-VMDA2SX2.js";import"./chunk-2GIDVZ4H.js";import"./chunk-QXAUKNMW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-SPJWXIAV.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-UTS4RX4U.js.map
4
+ //# sourceMappingURL=review-candidates-7QKNMRGU.js.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"./chunk-QKNAGTJK.js";import"./chunk-QXAUKNMW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-SPJWXIAV.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{a as cheapModelForEngine,b as routeTaskModel};
2
- //# sourceMappingURL=routing-D7APOAP6.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-QXAUKNMW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-SPJWXIAV.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-UA2ROH3V.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-QXAUKNMW.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-SPJWXIAV.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-WQXHYEPD.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.34.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": {