agentix-cli 0.51.0 → 0.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/{App-QVNQ5BQK.js → App-X6FGYBLX.js} +2 -2
  2. package/dist/{ChatApp-CC57XC23.js → ChatApp-XMUOXQ2M.js} +2 -2
  3. package/dist/{agent-ILH6ANOM.js → agent-KKVMU3VB.js} +2 -2
  4. package/dist/{board-dashboard-XPPBRPQE.js → board-dashboard-KETIFTBD.js} +346 -137
  5. package/dist/board-dashboard-KETIFTBD.js.map +1 -0
  6. package/dist/{chunk-SRCXUZM2.js → chunk-3IUU4YFI.js} +2 -2
  7. package/dist/chunk-3IUU4YFI.js.map +1 -0
  8. package/dist/chunk-64UYAWAK.js +150 -0
  9. package/dist/chunk-64UYAWAK.js.map +1 -0
  10. package/dist/{chunk-CAA546XN.js → chunk-6BXKZY76.js} +2 -2
  11. package/dist/{chunk-6HAZ6YWI.js → chunk-76NNONUJ.js} +2 -2
  12. package/dist/{chunk-VMS3HVTT.js → chunk-7BQQWI4T.js} +2 -2
  13. package/dist/{chunk-XZTR5MBJ.js → chunk-7M7VJMGP.js} +2 -2
  14. package/dist/{chunk-H2TWRZC2.js → chunk-7NF45XCM.js} +2 -2
  15. package/dist/{chunk-UBRMOTBH.js → chunk-7PK32QT5.js} +148 -148
  16. package/dist/chunk-7PK32QT5.js.map +1 -0
  17. package/dist/{chunk-LBMZP7TG.js → chunk-AKAM4BNC.js} +156 -153
  18. package/dist/chunk-AKAM4BNC.js.map +1 -0
  19. package/dist/{chunk-U67EG5IF.js → chunk-AWRRBNWQ.js} +2 -2
  20. package/dist/{chunk-WDQ3BPFS.js → chunk-B5UA3X6E.js} +2 -2
  21. package/dist/{chunk-PSDCRZZM.js → chunk-E57WKMRR.js} +2 -2
  22. package/dist/{chunk-7WDJW37G.js → chunk-GUJB53QU.js} +2 -2
  23. package/dist/{chunk-2KQTE4XI.js → chunk-H7R3F2CO.js} +2 -2
  24. package/dist/{chunk-4BNQSUWV.js → chunk-KAFO5QZR.js} +2 -2
  25. package/dist/{chunk-JQR3NTHI.js → chunk-MHBUAU2B.js} +2 -2
  26. package/dist/{chunk-QP6XNTBB.js → chunk-NKSCUCVZ.js} +2 -2
  27. package/dist/{chunk-KFALP5NO.js → chunk-QDPLR3SB.js} +2 -2
  28. package/dist/{chunk-F7WY24UZ.js → chunk-QZ4M2KAC.js} +2 -2
  29. package/dist/{chunk-YE2BUU3Z.js → chunk-WCNKTV6G.js} +2 -2
  30. package/dist/{chunk-V7XZN3MQ.js → chunk-XOUIZBAQ.js} +2 -2
  31. package/dist/{chunk-ROCUOXCW.js → chunk-YPPTPBBV.js} +2 -2
  32. package/dist/{chunk-WCMQRSVU.js → chunk-YS3Z2Z64.js} +3 -3
  33. package/dist/chunk-YS3Z2Z64.js.map +1 -0
  34. package/dist/cli.js +1 -1
  35. package/dist/client-AVQSLPIZ.js +2 -0
  36. package/dist/{config-TVW7UCKG.js → config-FGCJVXYX.js} +2 -2
  37. package/dist/config-mutator-5JSG3CHW.js +2 -0
  38. package/dist/doctor-VITHTLEC.js +2 -0
  39. package/dist/index.d.ts +24 -1
  40. package/dist/index.js +1 -1
  41. package/dist/processes-NNXSRQSV.js +2 -0
  42. package/dist/program-MNFDOQGQ.js +2 -0
  43. package/dist/{promote-4T64VW5K.js → promote-NBFF7ZIW.js} +2 -2
  44. package/dist/query-XCXR57IV.js +2 -0
  45. package/dist/{registry-E4QUXHMQ.js → registry-5ZP3ZNSH.js} +2 -2
  46. package/dist/{request-planner-BRLDCYU5.js → request-planner-ZEXFARZE.js} +2 -2
  47. package/dist/{review-candidates-QWW5PDUU.js → review-candidates-F2HNH2TZ.js} +2 -2
  48. package/dist/{routing-DP6S7OJL.js → routing-XSRZ7V23.js} +2 -2
  49. package/dist/schedule-tool-AKCVLCWK.js +2 -0
  50. package/dist/scheduler-BEGZJWJU.js +2 -0
  51. package/dist/{seat-3KUNRM5Z.js → seat-IPDLEUI5.js} +2 -2
  52. package/dist/{select-ILXHYJGD.js → select-BYOX63CR.js} +2 -2
  53. package/dist/{tool-SF3BCY55.js → tool-WW4YCMSP.js} +2 -2
  54. package/dist/wiki-IVJJQUKB.js +2 -0
  55. package/package.json +1 -1
  56. package/dist/board-dashboard-XPPBRPQE.js.map +0 -1
  57. package/dist/chunk-LBMZP7TG.js.map +0 -1
  58. package/dist/chunk-SRCXUZM2.js.map +0 -1
  59. package/dist/chunk-UBRMOTBH.js.map +0 -1
  60. package/dist/chunk-WCMQRSVU.js.map +0 -1
  61. package/dist/chunk-YEV6W34S.js +0 -150
  62. package/dist/chunk-YEV6W34S.js.map +0 -1
  63. package/dist/client-I7GAAM3T.js +0 -2
  64. package/dist/config-mutator-JHM53P5A.js +0 -2
  65. package/dist/doctor-CXFMV6PT.js +0 -2
  66. package/dist/processes-CMTMB7LG.js +0 -2
  67. package/dist/program-ZCFMO4ZD.js +0 -2
  68. package/dist/query-6IKL52WT.js +0 -2
  69. package/dist/schedule-tool-TPJ6GR47.js +0 -2
  70. package/dist/scheduler-7QPG6OTY.js +0 -2
  71. package/dist/wiki-WETANN3W.js +0 -2
  72. /package/dist/{App-QVNQ5BQK.js.map → App-X6FGYBLX.js.map} +0 -0
  73. /package/dist/{ChatApp-CC57XC23.js.map → ChatApp-XMUOXQ2M.js.map} +0 -0
  74. /package/dist/{agent-ILH6ANOM.js.map → agent-KKVMU3VB.js.map} +0 -0
  75. /package/dist/{chunk-CAA546XN.js.map → chunk-6BXKZY76.js.map} +0 -0
  76. /package/dist/{chunk-6HAZ6YWI.js.map → chunk-76NNONUJ.js.map} +0 -0
  77. /package/dist/{chunk-VMS3HVTT.js.map → chunk-7BQQWI4T.js.map} +0 -0
  78. /package/dist/{chunk-XZTR5MBJ.js.map → chunk-7M7VJMGP.js.map} +0 -0
  79. /package/dist/{chunk-H2TWRZC2.js.map → chunk-7NF45XCM.js.map} +0 -0
  80. /package/dist/{chunk-U67EG5IF.js.map → chunk-AWRRBNWQ.js.map} +0 -0
  81. /package/dist/{chunk-WDQ3BPFS.js.map → chunk-B5UA3X6E.js.map} +0 -0
  82. /package/dist/{chunk-PSDCRZZM.js.map → chunk-E57WKMRR.js.map} +0 -0
  83. /package/dist/{chunk-7WDJW37G.js.map → chunk-GUJB53QU.js.map} +0 -0
  84. /package/dist/{chunk-2KQTE4XI.js.map → chunk-H7R3F2CO.js.map} +0 -0
  85. /package/dist/{chunk-4BNQSUWV.js.map → chunk-KAFO5QZR.js.map} +0 -0
  86. /package/dist/{chunk-JQR3NTHI.js.map → chunk-MHBUAU2B.js.map} +0 -0
  87. /package/dist/{chunk-QP6XNTBB.js.map → chunk-NKSCUCVZ.js.map} +0 -0
  88. /package/dist/{chunk-KFALP5NO.js.map → chunk-QDPLR3SB.js.map} +0 -0
  89. /package/dist/{chunk-F7WY24UZ.js.map → chunk-QZ4M2KAC.js.map} +0 -0
  90. /package/dist/{chunk-YE2BUU3Z.js.map → chunk-WCNKTV6G.js.map} +0 -0
  91. /package/dist/{chunk-V7XZN3MQ.js.map → chunk-XOUIZBAQ.js.map} +0 -0
  92. /package/dist/{chunk-ROCUOXCW.js.map → chunk-YPPTPBBV.js.map} +0 -0
  93. /package/dist/{client-I7GAAM3T.js.map → client-AVQSLPIZ.js.map} +0 -0
  94. /package/dist/{config-TVW7UCKG.js.map → config-FGCJVXYX.js.map} +0 -0
  95. /package/dist/{config-mutator-JHM53P5A.js.map → config-mutator-5JSG3CHW.js.map} +0 -0
  96. /package/dist/{doctor-CXFMV6PT.js.map → doctor-VITHTLEC.js.map} +0 -0
  97. /package/dist/{processes-CMTMB7LG.js.map → processes-NNXSRQSV.js.map} +0 -0
  98. /package/dist/{program-ZCFMO4ZD.js.map → program-MNFDOQGQ.js.map} +0 -0
  99. /package/dist/{promote-4T64VW5K.js.map → promote-NBFF7ZIW.js.map} +0 -0
  100. /package/dist/{query-6IKL52WT.js.map → query-XCXR57IV.js.map} +0 -0
  101. /package/dist/{registry-E4QUXHMQ.js.map → registry-5ZP3ZNSH.js.map} +0 -0
  102. /package/dist/{request-planner-BRLDCYU5.js.map → request-planner-ZEXFARZE.js.map} +0 -0
  103. /package/dist/{review-candidates-QWW5PDUU.js.map → review-candidates-F2HNH2TZ.js.map} +0 -0
  104. /package/dist/{routing-DP6S7OJL.js.map → routing-XSRZ7V23.js.map} +0 -0
  105. /package/dist/{schedule-tool-TPJ6GR47.js.map → schedule-tool-AKCVLCWK.js.map} +0 -0
  106. /package/dist/{scheduler-7QPG6OTY.js.map → scheduler-BEGZJWJU.js.map} +0 -0
  107. /package/dist/{seat-3KUNRM5Z.js.map → seat-IPDLEUI5.js.map} +0 -0
  108. /package/dist/{select-ILXHYJGD.js.map → select-BYOX63CR.js.map} +0 -0
  109. /package/dist/{tool-SF3BCY55.js.map → tool-WW4YCMSP.js.map} +0 -0
  110. /package/dist/{wiki-WETANN3W.js.map → wiki-IVJJQUKB.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1561,6 +1561,12 @@ declare const agentConfigSchema: z.ZodObject<{
1561
1561
  * cap sends SIGTERM (exit 143). Default 20 min — bump for devops/coder
1562
1562
  * agents that do long investigations or multi-file refactors. */
1563
1563
  maxExecutionMinutes: z.ZodDefault<z.ZodNumber>;
1564
+ /** Time a run may spend between taking a slot and starting its agent
1565
+ * process (request gate, classifier, compaction, context planning, model
1566
+ * routing, dispatch gates). Past it the run is aborted, its slot freed and
1567
+ * its record marked `timeout` with the step it was stuck in. Applies to
1568
+ * every run, whatever started it. */
1569
+ preSpawnTimeoutSec: z.ZodDefault<z.ZodNumber>;
1564
1570
  permissionMode: z.ZodDefault<z.ZodString>;
1565
1571
  /** How this agent's `claude` CLI is billed (claude-code tier). Default
1566
1572
  * "subscription": the shared OAuth login, ANTHROPIC_API_KEY stripped.
@@ -1783,6 +1789,7 @@ declare const agentConfigSchema: z.ZodObject<{
1783
1789
  richMessages: boolean;
1784
1790
  maxConcurrent: number;
1785
1791
  maxExecutionMinutes: number;
1792
+ preSpawnTimeoutSec: number;
1786
1793
  permissionMode: string;
1787
1794
  billing: "api" | "subscription";
1788
1795
  toolUseRequired: string[];
@@ -1868,6 +1875,7 @@ declare const agentConfigSchema: z.ZodObject<{
1868
1875
  richMessages?: boolean | undefined;
1869
1876
  maxConcurrent?: number | undefined;
1870
1877
  maxExecutionMinutes?: number | undefined;
1878
+ preSpawnTimeoutSec?: number | undefined;
1871
1879
  permissionMode?: string | undefined;
1872
1880
  billing?: "api" | "subscription" | undefined;
1873
1881
  toolUseRequired?: string[] | undefined;
@@ -2275,6 +2283,12 @@ declare const daemonConfigSchema: z.ZodObject<{
2275
2283
  * cap sends SIGTERM (exit 143). Default 20 min — bump for devops/coder
2276
2284
  * agents that do long investigations or multi-file refactors. */
2277
2285
  maxExecutionMinutes: z.ZodDefault<z.ZodNumber>;
2286
+ /** Time a run may spend between taking a slot and starting its agent
2287
+ * process (request gate, classifier, compaction, context planning, model
2288
+ * routing, dispatch gates). Past it the run is aborted, its slot freed and
2289
+ * its record marked `timeout` with the step it was stuck in. Applies to
2290
+ * every run, whatever started it. */
2291
+ preSpawnTimeoutSec: z.ZodDefault<z.ZodNumber>;
2278
2292
  permissionMode: z.ZodDefault<z.ZodString>;
2279
2293
  /** How this agent's `claude` CLI is billed (claude-code tier). Default
2280
2294
  * "subscription": the shared OAuth login, ANTHROPIC_API_KEY stripped.
@@ -2497,6 +2511,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2497
2511
  richMessages: boolean;
2498
2512
  maxConcurrent: number;
2499
2513
  maxExecutionMinutes: number;
2514
+ preSpawnTimeoutSec: number;
2500
2515
  permissionMode: string;
2501
2516
  billing: "api" | "subscription";
2502
2517
  toolUseRequired: string[];
@@ -2582,6 +2597,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2582
2597
  richMessages?: boolean | undefined;
2583
2598
  maxConcurrent?: number | undefined;
2584
2599
  maxExecutionMinutes?: number | undefined;
2600
+ preSpawnTimeoutSec?: number | undefined;
2585
2601
  permissionMode?: string | undefined;
2586
2602
  billing?: "api" | "subscription" | undefined;
2587
2603
  toolUseRequired?: string[] | undefined;
@@ -5488,6 +5504,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5488
5504
  richMessages: boolean;
5489
5505
  maxConcurrent: number;
5490
5506
  maxExecutionMinutes: number;
5507
+ preSpawnTimeoutSec: number;
5491
5508
  permissionMode: string;
5492
5509
  billing: "api" | "subscription";
5493
5510
  toolUseRequired: string[];
@@ -6108,6 +6125,7 @@ declare const daemonConfigSchema: z.ZodObject<{
6108
6125
  richMessages?: boolean | undefined;
6109
6126
  maxConcurrent?: number | undefined;
6110
6127
  maxExecutionMinutes?: number | undefined;
6128
+ preSpawnTimeoutSec?: number | undefined;
6111
6129
  permissionMode?: string | undefined;
6112
6130
  billing?: "api" | "subscription" | undefined;
6113
6131
  toolUseRequired?: string[] | undefined;
@@ -9589,6 +9607,9 @@ interface TaskRecord {
9589
9607
  durationMs: number;
9590
9608
  ok: boolean;
9591
9609
  error?: string;
9610
+ /** Set when a deadline ended the run: `timeout`, with the step it was in. */
9611
+ status?: "timeout";
9612
+ step?: string;
9592
9613
  /** Final agent text (one-shot, may be empty if streaming captured it). */
9593
9614
  responseText: string;
9594
9615
  /** Terminal-style transcript captured from stream-json events. */
@@ -9925,7 +9946,9 @@ declare class AgentRegistry {
9925
9946
  byAgent: Record<string, {
9926
9947
  tasks: number;
9927
9948
  input: number;
9928
- output: number;
9949
+ output: number; /** Mesh handle. When set, `execute` falls back to a peer that advertises
9950
+ * the requested agent before returning "Unknown agent". Duck-typed so
9951
+ * we don't create a circular import with src/a2a/mesh.ts. */
9929
9952
  cacheRead: number;
9930
9953
  cacheCreate: number;
9931
9954
  total: number;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{a as L}from"./chunk-Y57CULGE.js";import{a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,ia as bt,ja as Tt,ka as Mt}from"./chunk-UBRMOTBH.js";import"./chunk-YE2BUU3Z.js";import"./chunk-QP6XNTBB.js";import"./chunk-LQRBGQIR.js";import"./chunk-ZVP6GB4G.js";import"./chunk-S7CVSKOX.js";import"./chunk-WDQ3BPFS.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-L53FTKEP.js";import{O as yt,l as lt,m as ct,n as dt,o as mt,p as pt}from"./chunk-YEV6W34S.js";import"./chunk-U67EG5IF.js";import"./chunk-N6EWZGIX.js";import"./chunk-WP6KLXTP.js";import"./chunk-DP7RTNDM.js";import{A as D,B as z,C as V,a as ye,b as we,c as Se,d as Ae,e as Ie,f as Oe,g as Ne,h as He,i as je,j as Ue,k as _e,l as I,m as q,n as Be,o as qe,p as Ye,q as O,r as ze,s as Ve,t as Xe,u as x,v as Y,w as Qe,x as Ze,y as et,z as wt}from"./chunk-PSDCRZZM.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-F7WY24UZ.js";import{s as ut}from"./chunk-V7XZN3MQ.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-VMS3HVTT.js";import"./chunk-H2TWRZC2.js";import"./chunk-DWADWDMU.js";import"./chunk-WKTFP3SK.js";import"./chunk-HRBKSZ34.js";import"./chunk-VWTBHLMX.js";import"./chunk-XZTR5MBJ.js";import{a as gt,b as ft,e as ht}from"./chunk-ROCUOXCW.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-6HAZ6YWI.js";import"./chunk-TFVUOC2C.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-JQR3NTHI.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-SZJMS7K4.js";import{a as m,b as G}from"./chunk-7I7IEX4S.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{k as tt,m as st,n as ot,p as nt}from"./chunk-SRCXUZM2.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
1
+ import{a as L}from"./chunk-Y57CULGE.js";import{a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,ia as bt,ja as Tt,ka as Mt}from"./chunk-7PK32QT5.js";import"./chunk-WCNKTV6G.js";import"./chunk-NKSCUCVZ.js";import"./chunk-LQRBGQIR.js";import"./chunk-ZVP6GB4G.js";import"./chunk-S7CVSKOX.js";import"./chunk-B5UA3X6E.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-L53FTKEP.js";import{O as yt,l as lt,m as ct,n as dt,o as mt,p as pt}from"./chunk-64UYAWAK.js";import"./chunk-AWRRBNWQ.js";import"./chunk-N6EWZGIX.js";import"./chunk-WP6KLXTP.js";import"./chunk-DP7RTNDM.js";import{A as D,B as z,C as V,a as ye,b as we,c as Se,d as Ae,e as Ie,f as Oe,g as Ne,h as He,i as je,j as Ue,k as _e,l as I,m as q,n as Be,o as qe,p as Ye,q as O,r as ze,s as Ve,t as Xe,u as x,v as Y,w as Qe,x as Ze,y as et,z as wt}from"./chunk-E57WKMRR.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-QZ4M2KAC.js";import{s as ut}from"./chunk-XOUIZBAQ.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-7BQQWI4T.js";import"./chunk-7NF45XCM.js";import"./chunk-DWADWDMU.js";import"./chunk-WKTFP3SK.js";import"./chunk-HRBKSZ34.js";import"./chunk-VWTBHLMX.js";import"./chunk-7M7VJMGP.js";import{a as gt,b as ft,e as ht}from"./chunk-YPPTPBBV.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-76NNONUJ.js";import"./chunk-TFVUOC2C.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-MHBUAU2B.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-SZJMS7K4.js";import{a as m,b as G}from"./chunk-7I7IEX4S.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{k as tt,m as st,n as ot,p as nt}from"./chunk-3IUU4YFI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
2
2
  `)}
3
3
 
4
4
  ${t}`}async function It(o){let{loadLocalSkills:e}=await import("./loader-EVHZ2R73.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-GUJB53QU.js";import"./chunk-KAFO5QZR.js";import"./chunk-LQRBGQIR.js";import"./chunk-QIJLFPWE.js";export{a as renderProcessesPage};
2
+ //# sourceMappingURL=processes-NNXSRQSV.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-AKAM4BNC.js";import"./chunk-QDPLR3SB.js";import"./chunk-YS3Z2Z64.js";import"./chunk-Z3IP66SL.js";import"./chunk-KAFO5QZR.js";import"./chunk-6BXKZY76.js";import"./chunk-RKPAVWXF.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-7PK32QT5.js";import"./chunk-WCNKTV6G.js";import"./chunk-NKSCUCVZ.js";import"./chunk-LQRBGQIR.js";import"./chunk-ZVP6GB4G.js";import"./chunk-S7CVSKOX.js";import"./chunk-B5UA3X6E.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-L53FTKEP.js";import"./chunk-64UYAWAK.js";import"./chunk-AWRRBNWQ.js";import"./chunk-N6EWZGIX.js";import"./chunk-WP6KLXTP.js";import"./chunk-DP7RTNDM.js";import"./chunk-E57WKMRR.js";import"./chunk-SFQUP3BP.js";import"./chunk-QZ4M2KAC.js";import"./chunk-XOUIZBAQ.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-7BQQWI4T.js";import"./chunk-7NF45XCM.js";import"./chunk-DWADWDMU.js";import"./chunk-WKTFP3SK.js";import"./chunk-HRBKSZ34.js";import"./chunk-VWTBHLMX.js";import"./chunk-7M7VJMGP.js";import"./chunk-YPPTPBBV.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-76NNONUJ.js";import"./chunk-TFVUOC2C.js";import"./chunk-2GIDVZ4H.js";import"./chunk-MHBUAU2B.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-VDMYBPYB.js";import"./chunk-DSYKYZMT.js";import"./chunk-3IUU4YFI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{a as buildProgram};
2
+ //# sourceMappingURL=program-MNFDOQGQ.js.map
@@ -1,2 +1,2 @@
1
- import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t}from"./chunk-WDQ3BPFS.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-DP7RTNDM.js";import"./chunk-ROCUOXCW.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-TFVUOC2C.js";import"./chunk-JQR3NTHI.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-SRCXUZM2.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as DEFAULT_PROMOTE_TYPES,a as PROMOTER_OWNER,c as PROMOTION_LEDGER_FILE,j as appendPromotionLedger,s as approveProposal,n as callPromotionLlm,p as estimateTokens,r as evidenceFor,m as getUnpromotedMemories,k as groupCandidates,h as listAllAgentMemories,d as memoryKey,e as memoryStamp,g as mergeSources,f as parseMemoryStamp,l as parsePromotionResponse,i as readPromotionLedger,t as rejectProposal,o as runPromotion,q as sourceKind};
2
- //# sourceMappingURL=promote-4T64VW5K.js.map
1
+ import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t}from"./chunk-B5UA3X6E.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-DP7RTNDM.js";import"./chunk-YPPTPBBV.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-TFVUOC2C.js";import"./chunk-MHBUAU2B.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-3IUU4YFI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as DEFAULT_PROMOTE_TYPES,a as PROMOTER_OWNER,c as PROMOTION_LEDGER_FILE,j as appendPromotionLedger,s as approveProposal,n as callPromotionLlm,p as estimateTokens,r as evidenceFor,m as getUnpromotedMemories,k as groupCandidates,h as listAllAgentMemories,d as memoryKey,e as memoryStamp,g as mergeSources,f as parseMemoryStamp,l as parsePromotionResponse,i as readPromotionLedger,t as rejectProposal,o as runPromotion,q as sourceKind};
2
+ //# sourceMappingURL=promote-NBFF7ZIW.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-76NNONUJ.js";import"./chunk-TFVUOC2C.js";import"./chunk-2GIDVZ4H.js";import"./chunk-MHBUAU2B.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-3IUU4YFI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{a as agenticQuery};
2
+ //# sourceMappingURL=query-XCXR57IV.js.map
@@ -1,2 +1,2 @@
1
- import{F as a,G as b,H as c,I as d,J as e,K as f,L as g,M as h,N as i,O as j}from"./chunk-YEV6W34S.js";import"./chunk-U67EG5IF.js";import"./chunk-N6EWZGIX.js";import"./chunk-WP6KLXTP.js";import"./chunk-DP7RTNDM.js";import"./chunk-V7XZN3MQ.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-VMS3HVTT.js";import"./chunk-H2TWRZC2.js";import"./chunk-DWADWDMU.js";import"./chunk-WKTFP3SK.js";import"./chunk-HRBKSZ34.js";import"./chunk-VWTBHLMX.js";import"./chunk-XZTR5MBJ.js";import"./chunk-ROCUOXCW.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-6HAZ6YWI.js";import"./chunk-TFVUOC2C.js";import"./chunk-2GIDVZ4H.js";import"./chunk-JQR3NTHI.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-DSYKYZMT.js";import"./chunk-SRCXUZM2.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.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-E4QUXHMQ.js.map
1
+ import{F as a,G as b,H as c,I as d,J as e,K as f,L as g,M as h,N as i,O as j}from"./chunk-64UYAWAK.js";import"./chunk-AWRRBNWQ.js";import"./chunk-N6EWZGIX.js";import"./chunk-WP6KLXTP.js";import"./chunk-DP7RTNDM.js";import"./chunk-XOUIZBAQ.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-7BQQWI4T.js";import"./chunk-7NF45XCM.js";import"./chunk-DWADWDMU.js";import"./chunk-WKTFP3SK.js";import"./chunk-HRBKSZ34.js";import"./chunk-VWTBHLMX.js";import"./chunk-7M7VJMGP.js";import"./chunk-YPPTPBBV.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-76NNONUJ.js";import"./chunk-TFVUOC2C.js";import"./chunk-2GIDVZ4H.js";import"./chunk-MHBUAU2B.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-DSYKYZMT.js";import"./chunk-3IUU4YFI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.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-5ZP3ZNSH.js.map
@@ -1,2 +1,2 @@
1
- import{q as m,t as p,v as d,w as x}from"./chunk-JQR3NTHI.js";import{a as u,f}from"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-SRCXUZM2.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";x();f();var l="request-gate",h="request-context",g=.1;async function q(t,o,c,r=Math.random){let s=p(l)==="active";if(s){let i=m().seats[l]?.holdout??g;if(r()<i)return{active:!0,preprocess:!1,arm:"holdout"}}let a=s?"treatment":void 0,e=await d(l,{request:t.slice(0,2e3),agent:o,channel:c,operations:["select optional context","evaluate model routing where permitted"],constraints:["Keep the original request and mandatory instructions","Desktop model cannot be downgraded"]},{preprocess:u("This request benefits from structured context selection or another bounded typed decision before the main agent executes.",{true:"Relevant context must be selected, or a bounded routing decision can help. Follow-ups and ambiguous references need context.",false:"Typed preprocessing adds no useful decision; send the request to the configured main agent with existing context."})},{timeoutMs:3e3});if(!e||e.mode!=="active")return{active:!1,preprocess:!1,arm:a};let n=e.answers.preprocess?.noul;return{active:!0,preprocess:Number.isFinite(n)&&n>=.5,arm:a}}var v={landscape:"Agent directory and mesh overview",patternContext:"Learned behavioral patterns",references:"Retrieved project references",memoryContext:"Retrieved agent memory",crossChatContext:"Summaries from other conversations",longMemoryRecall:"Older conversation recall",wikiContext:"Retrieved wiki knowledge"};async function b(t){let o=Object.entries(v).flatMap(([e,n])=>{let i=t[e];return i?[{id:e,description:n,source:e,characters:i.length,preview:i.slice(0,400),trust:"context data, not instructions"}]:[]});if(!o.length)return{input:t,excluded:[]};let c=Object.fromEntries(o.map(e=>[e.id,u(`Context block ${e.id} is relevant to completing the current request correctly.`,{true:"Needed or potentially relevant; retain if uncertain or the preview is incomplete.",false:"Clearly unrelated to the current request; safe to omit."})])),r=await d(h,{request:t.message.slice(0,2e3),channel:t.channel,agent:t.agentId,mandatory:["request","identity","permissions and instructions","same-chat history","handover","attachments"],context:o},c,{timeoutMs:3e3});if(!r||r.mode!=="active")return{input:t,excluded:[]};let s={...t},a=[];for(let e of o){let n=r.answers[e.id]?.noul;Number.isFinite(n)&&n>=0&&n<.2&&(delete s[e.id],a.push(e.id))}return{input:s,excluded:a}}export{g as DEFAULT_REQUEST_GATE_HOLDOUT,h as REQUEST_CONTEXT_SEAT,l as REQUEST_GATE_SEAT,q as evaluateRequest,b as selectRequestContext};
2
- //# sourceMappingURL=request-planner-BRLDCYU5.js.map
1
+ import{q as m,t as p,v as d,w as x}from"./chunk-MHBUAU2B.js";import{a as u,f}from"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-3IUU4YFI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";x();f();var l="request-gate",h="request-context",g=.1;async function q(t,o,c,r=Math.random){let s=p(l)==="active";if(s){let i=m().seats[l]?.holdout??g;if(r()<i)return{active:!0,preprocess:!1,arm:"holdout"}}let a=s?"treatment":void 0,e=await d(l,{request:t.slice(0,2e3),agent:o,channel:c,operations:["select optional context","evaluate model routing where permitted"],constraints:["Keep the original request and mandatory instructions","Desktop model cannot be downgraded"]},{preprocess:u("This request benefits from structured context selection or another bounded typed decision before the main agent executes.",{true:"Relevant context must be selected, or a bounded routing decision can help. Follow-ups and ambiguous references need context.",false:"Typed preprocessing adds no useful decision; send the request to the configured main agent with existing context."})},{timeoutMs:3e3});if(!e||e.mode!=="active")return{active:!1,preprocess:!1,arm:a};let n=e.answers.preprocess?.noul;return{active:!0,preprocess:Number.isFinite(n)&&n>=.5,arm:a}}var v={landscape:"Agent directory and mesh overview",patternContext:"Learned behavioral patterns",references:"Retrieved project references",memoryContext:"Retrieved agent memory",crossChatContext:"Summaries from other conversations",longMemoryRecall:"Older conversation recall",wikiContext:"Retrieved wiki knowledge"};async function b(t){let o=Object.entries(v).flatMap(([e,n])=>{let i=t[e];return i?[{id:e,description:n,source:e,characters:i.length,preview:i.slice(0,400),trust:"context data, not instructions"}]:[]});if(!o.length)return{input:t,excluded:[]};let c=Object.fromEntries(o.map(e=>[e.id,u(`Context block ${e.id} is relevant to completing the current request correctly.`,{true:"Needed or potentially relevant; retain if uncertain or the preview is incomplete.",false:"Clearly unrelated to the current request; safe to omit."})])),r=await d(h,{request:t.message.slice(0,2e3),channel:t.channel,agent:t.agentId,mandatory:["request","identity","permissions and instructions","same-chat history","handover","attachments"],context:o},c,{timeoutMs:3e3});if(!r||r.mode!=="active")return{input:t,excluded:[]};let s={...t},a=[];for(let e of o){let n=r.answers[e.id]?.noul;Number.isFinite(n)&&n>=0&&n<.2&&(delete s[e.id],a.push(e.id))}return{input:s,excluded:a}}export{g as DEFAULT_REQUEST_GATE_HOLDOUT,h as REQUEST_CONTEXT_SEAT,l as REQUEST_GATE_SEAT,q as evaluateRequest,b as selectRequestContext};
2
+ //# sourceMappingURL=request-planner-ZEXFARZE.js.map
@@ -1,4 +1,4 @@
1
- import{b as I}from"./chunk-QP6XNTBB.js";import"./chunk-WP6KLXTP.js";import"./chunk-2GIDVZ4H.js";import"./chunk-JQR3NTHI.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-SRCXUZM2.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";import{createHash as E}from"crypto";var v="review:",b={decisions:"project",warnings:"feedback",friction:"feedback",context:"reference"};function A(t,n,r){let s=E("sha1").update(r.trim().toLowerCase()).digest("hex").slice(0,10);return`${v}${t}/${n}@${s}`}function F(t){if(!t.startsWith(v))return null;let n=t.slice(v.length),r=n.lastIndexOf("@"),s=n.lastIndexOf("/",r===-1?void 0:r);return r===-1||s===-1?null:{reviewId:n.slice(0,s),kind:n.slice(s+1,r),digest:n.slice(r+1)}}var C=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,48)||"finding",L=5;function T(t,n){return`${t}|${I(n)}`}function K(t,n={}){let r=n.kinds??Object.keys(b),s=n.minLength??24,h=[],d=new Map,u=new Map,f=new Map,x=new Map;for(let e of t){let i;try{i=JSON.parse(e.result)}catch{continue}let o=e.updated_at?new Date(e.updated_at).toISOString():new Date().toISOString();for(let c of r){let l=b[c];if(!l)continue;let R=i[c];if(Array.isArray(R))for(let $ of R){let a=String($?.text??"").trim();if(a.length<s)continue;let g=A(e.id,c,a),_=g.slice(g.lastIndexOf("@")),w=`${c}${_}`,y=T(c,a),S=f.get(y)??new Set;if(S.add(e.session_id??e.id),f.set(y,S),d.has(w))continue;let O=String($?.evidence??"").trim(),k={occurrences:1,agentId:e.agent,key:`${e.agent}/${l}_${C(a)}`,stamp:g,memory:{name:C(a),type:l,description:a.slice(0,200),body:"",createdAt:o,updatedAt:o}};x.set(g,{text:a,evidence:O,agent:e.agent,source:e.source}),d.set(w,k),u.set(w,y),h.push(k)}}}for(let[e,i]of d){let o=f.get(u.get(e)??"");i.occurrences=o?.size??1,i.sessions=[...o??[]].slice(0,L);let c=x.get(i.stamp);i.memory.body=D(c,i.occurrences)}let m=new Map;for(let[e,i]of d){let o=u.get(e)??e,c=m.get(o)??[];c.push(i),m.set(o,c)}let M=[...m.values()].sort((e,i)=>i[0].occurrences-e[0].occurrences),p=[];for(let e=0;p.length<h.length;e++){let i=!1;for(let o of M)e<o.length&&(p.push(o[e]),i=!0);if(!i)break}return p}function D(t,n){let r=`${t.agent}${t.source?` via ${t.source}`:""}`,s=[];return n>1?(s.push(`Observed in ${n} separate sessions. Most recently stated as:`),s.push(`> ${t.text}`),s.push(`Recurring across ${n} sessions is what makes this worth recording \u2014 any single occurrence is session state, the repetition is the finding.`)):s.push(t.text),t.evidence&&s.push(`**Evidence:** ${t.evidence}`),s.push(`_From ${n>1?"session reviews":"a session review"} of ${r}._`),s.join(`
1
+ import{b as I}from"./chunk-NKSCUCVZ.js";import"./chunk-WP6KLXTP.js";import"./chunk-2GIDVZ4H.js";import"./chunk-MHBUAU2B.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-3IUU4YFI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";import{createHash as E}from"crypto";var v="review:",b={decisions:"project",warnings:"feedback",friction:"feedback",context:"reference"};function A(t,n,r){let s=E("sha1").update(r.trim().toLowerCase()).digest("hex").slice(0,10);return`${v}${t}/${n}@${s}`}function F(t){if(!t.startsWith(v))return null;let n=t.slice(v.length),r=n.lastIndexOf("@"),s=n.lastIndexOf("/",r===-1?void 0:r);return r===-1||s===-1?null:{reviewId:n.slice(0,s),kind:n.slice(s+1,r),digest:n.slice(r+1)}}var C=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,48)||"finding",L=5;function T(t,n){return`${t}|${I(n)}`}function K(t,n={}){let r=n.kinds??Object.keys(b),s=n.minLength??24,h=[],d=new Map,u=new Map,f=new Map,x=new Map;for(let e of t){let i;try{i=JSON.parse(e.result)}catch{continue}let o=e.updated_at?new Date(e.updated_at).toISOString():new Date().toISOString();for(let c of r){let l=b[c];if(!l)continue;let R=i[c];if(Array.isArray(R))for(let $ of R){let a=String($?.text??"").trim();if(a.length<s)continue;let g=A(e.id,c,a),_=g.slice(g.lastIndexOf("@")),w=`${c}${_}`,y=T(c,a),S=f.get(y)??new Set;if(S.add(e.session_id??e.id),f.set(y,S),d.has(w))continue;let O=String($?.evidence??"").trim(),k={occurrences:1,agentId:e.agent,key:`${e.agent}/${l}_${C(a)}`,stamp:g,memory:{name:C(a),type:l,description:a.slice(0,200),body:"",createdAt:o,updatedAt:o}};x.set(g,{text:a,evidence:O,agent:e.agent,source:e.source}),d.set(w,k),u.set(w,y),h.push(k)}}}for(let[e,i]of d){let o=f.get(u.get(e)??"");i.occurrences=o?.size??1,i.sessions=[...o??[]].slice(0,L);let c=x.get(i.stamp);i.memory.body=D(c,i.occurrences)}let m=new Map;for(let[e,i]of d){let o=u.get(e)??e,c=m.get(o)??[];c.push(i),m.set(o,c)}let M=[...m.values()].sort((e,i)=>i[0].occurrences-e[0].occurrences),p=[];for(let e=0;p.length<h.length;e++){let i=!1;for(let o of M)e<o.length&&(p.push(o[e]),i=!0);if(!i)break}return p}function D(t,n){let r=`${t.agent}${t.source?` via ${t.source}`:""}`,s=[];return n>1?(s.push(`Observed in ${n} separate sessions. Most recently stated as:`),s.push(`> ${t.text}`),s.push(`Recurring across ${n} sessions is what makes this worth recording \u2014 any single occurrence is session state, the repetition is the finding.`)):s.push(t.text),t.evidence&&s.push(`**Evidence:** ${t.evidence}`),s.push(`_From ${n>1?"session reviews":"a session review"} of ${r}._`),s.join(`
2
2
 
3
3
  `)}export{L as MAX_EVIDENCE_SESSIONS,b as PROMOTABLE_KINDS,v as REVIEW_STAMP_PREFIX,F as parseReviewStamp,A as reviewStamp,K as reviewsToCandidates};
4
- //# sourceMappingURL=review-candidates-QWW5PDUU.js.map
4
+ //# sourceMappingURL=review-candidates-F2HNH2TZ.js.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"./chunk-H2TWRZC2.js";import"./chunk-JQR3NTHI.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-SRCXUZM2.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{a as cheapModelForEngine,b as routeTaskModel};
2
- //# sourceMappingURL=routing-DP6S7OJL.js.map
1
+ import{a,b}from"./chunk-7NF45XCM.js";import"./chunk-MHBUAU2B.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-3IUU4YFI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{a as cheapModelForEngine,b as routeTaskModel};
2
+ //# sourceMappingURL=routing-XSRZ7V23.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b}from"./chunk-H7R3F2CO.js";import"./chunk-RKPAVWXF.js";import"./chunk-QZ4M2KAC.js";import"./chunk-XOUIZBAQ.js";import"./chunk-7BQQWI4T.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-3IUU4YFI.js";import"./chunk-QIJLFPWE.js";export{b as resolveScheduleCaller,a as runScheduleTool};
2
+ //# sourceMappingURL=schedule-tool-AKCVLCWK.js.map
@@ -0,0 +1,2 @@
1
+ import{n as a,o as b,p as c,q as d,r as e,s as f}from"./chunk-XOUIZBAQ.js";import"./chunk-7BQQWI4T.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-3IUU4YFI.js";import"./chunk-QIJLFPWE.js";export{a as AGENT_RUN_TIMEOUT_FLOOR,f as CronScheduler,b as agentRunTimeout,e as cronRunId,d as getNextCronDate,c as runLinkIds};
2
+ //# sourceMappingURL=scheduler-BEGZJWJU.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-JQR3NTHI.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-SRCXUZM2.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";i();export{h as askSeat,a as configureDecisions,c as decisionsRuntime,f as getSeatMode,d as parseSeatMode,g as recordSeatOutcome,b as resetDecisionsRuntime,e as seatEnvVar};
2
- //# sourceMappingURL=seat-3KUNRM5Z.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-MHBUAU2B.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-3IUU4YFI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";i();export{h as askSeat,a as configureDecisions,c as decisionsRuntime,f as getSeatMode,d as parseSeatMode,g as recordSeatOutcome,b as resetDecisionsRuntime,e as seatEnvVar};
2
+ //# sourceMappingURL=seat-IPDLEUI5.js.map
@@ -1,2 +1,2 @@
1
- import{v as S,w}from"./chunk-JQR3NTHI.js";import{a as g,b as h,f as R}from"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import{d as f}from"./chunk-VDMYBPYB.js";import"./chunk-SRCXUZM2.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";w();R();var p="skill-select";function y(l){return{task:d(l.task,1200),...l.agent?{agent:l.agent}:{},skills:l.candidates.map(t=>({name:t.name,purpose:d(t.description,300),...t.category?{category:t.category}:{},...t.tags?.length?{tags:t.tags.slice(0,8)}:{}}))}}function b(l){let t={};for(let i of l)t[i.name]=d(i.description,300);return{anyRelevant:g("At least one of these skills is about the task at hand.",{true:"The task is the kind of work one of these skills exists for, and following it would change how the work is done \u2014 it names the same system, the same procedure or the same kind of artefact.",false:"None of them is about this task. They may share vocabulary with it, mention the same tools, or belong to the same project without bearing on what is being asked. Sharing words with a task is not being about it."}),best:h(t,"Which skill is this task most about?")}}function v(l){let t=l.anyRelevant,i=l.best,o=Object.entries(i.probabilities??{}).map(([e,s])=>({name:e,p:Number(s)||0})).sort((e,s)=>s.p-e.p);return{anyRelevant:t.noul,name:i.choice,confidence:i.confidence,ranked:o}}function d(l,t){return l.length>t?`${l.slice(0,t)}\u2026`:l}var x=.1,A=12;async function E(l,t,i={}){let o=i.minRelevant??.6,e=f(l,t).filter(n=>n.relevance>=x).slice(0,A),s=e.map(n=>({name:n.skill.frontmatter.name,lexical:n.relevance}));if(e.length===0)return{skill:null,anyRelevant:0,confidence:0,shortlist:s,judged:!1,reason:"no skill mentions anything in this task"};if(e.length===1)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`only ${e[0].skill.frontmatter.name} matched (${e[0].matchReason})`};let r=e.map(n=>({name:n.skill.frontmatter.name,description:n.skill.frontmatter.description,category:n.skill.frontmatter.category??null,tags:n.skill.frontmatter.tags})),m=await S(p,y({task:t,agent:i.agent??null,candidates:r}),b(r),{incumbent:{best:r[0].name},features:{agent:i.agent??"unknown",candidates:r.length}});if(!m)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`seat off \u2014 lexical top match (${e[0].matchReason})`};let a=v(m.answers),c=s.map(n=>({...n,p:a.ranked.find(k=>k.name===n.name)?.p??0})).sort((n,k)=>(k.p??0)-(n.p??0));if(a.anyRelevant<o)return{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`nothing on the shortlist is about this task (${a.anyRelevant.toFixed(2)} below ${o})`};let u=e.find(n=>n.skill.frontmatter.name===a.name);return u?{skill:u.skill,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`${a.name} (confidence ${a.confidence.toFixed(2)})`}:{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`seat chose "${a.name}", which was not on the shortlist`}}export{E as pickSkillForTask};
2
- //# sourceMappingURL=select-ILXHYJGD.js.map
1
+ import{v as S,w}from"./chunk-MHBUAU2B.js";import{a as g,b as h,f as R}from"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import{d as f}from"./chunk-VDMYBPYB.js";import"./chunk-3IUU4YFI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";w();R();var p="skill-select";function y(l){return{task:d(l.task,1200),...l.agent?{agent:l.agent}:{},skills:l.candidates.map(t=>({name:t.name,purpose:d(t.description,300),...t.category?{category:t.category}:{},...t.tags?.length?{tags:t.tags.slice(0,8)}:{}}))}}function b(l){let t={};for(let i of l)t[i.name]=d(i.description,300);return{anyRelevant:g("At least one of these skills is about the task at hand.",{true:"The task is the kind of work one of these skills exists for, and following it would change how the work is done \u2014 it names the same system, the same procedure or the same kind of artefact.",false:"None of them is about this task. They may share vocabulary with it, mention the same tools, or belong to the same project without bearing on what is being asked. Sharing words with a task is not being about it."}),best:h(t,"Which skill is this task most about?")}}function v(l){let t=l.anyRelevant,i=l.best,o=Object.entries(i.probabilities??{}).map(([e,s])=>({name:e,p:Number(s)||0})).sort((e,s)=>s.p-e.p);return{anyRelevant:t.noul,name:i.choice,confidence:i.confidence,ranked:o}}function d(l,t){return l.length>t?`${l.slice(0,t)}\u2026`:l}var x=.1,A=12;async function E(l,t,i={}){let o=i.minRelevant??.6,e=f(l,t).filter(n=>n.relevance>=x).slice(0,A),s=e.map(n=>({name:n.skill.frontmatter.name,lexical:n.relevance}));if(e.length===0)return{skill:null,anyRelevant:0,confidence:0,shortlist:s,judged:!1,reason:"no skill mentions anything in this task"};if(e.length===1)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`only ${e[0].skill.frontmatter.name} matched (${e[0].matchReason})`};let r=e.map(n=>({name:n.skill.frontmatter.name,description:n.skill.frontmatter.description,category:n.skill.frontmatter.category??null,tags:n.skill.frontmatter.tags})),m=await S(p,y({task:t,agent:i.agent??null,candidates:r}),b(r),{incumbent:{best:r[0].name},features:{agent:i.agent??"unknown",candidates:r.length}});if(!m)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`seat off \u2014 lexical top match (${e[0].matchReason})`};let a=v(m.answers),c=s.map(n=>({...n,p:a.ranked.find(k=>k.name===n.name)?.p??0})).sort((n,k)=>(k.p??0)-(n.p??0));if(a.anyRelevant<o)return{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`nothing on the shortlist is about this task (${a.anyRelevant.toFixed(2)} below ${o})`};let u=e.find(n=>n.skill.frontmatter.name===a.name);return u?{skill:u.skill,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`${a.name} (confidence ${a.confidence.toFixed(2)})`}:{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`seat chose "${a.name}", which was not on the shortlist`}}export{E as pickSkillForTask};
2
+ //# sourceMappingURL=select-BYOX63CR.js.map
@@ -1,2 +1,2 @@
1
- import{b as p}from"./chunk-2KQTE4XI.js";import"./chunk-RKPAVWXF.js";import"./chunk-F7WY24UZ.js";import"./chunk-V7XZN3MQ.js";import"./chunk-VMS3HVTT.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-SRCXUZM2.js";import"./chunk-QIJLFPWE.js";var f=new Set(["cron","heartbeat","api","a2a","mesh","approvals"]);function u(t){return typeof t=="string"?t.trim():""}async function y(t,i){let c=i.fetch??fetch,d=i.daemonUrl.replace(/\/$/,""),s=(u(t.action)||"create").toLowerCase(),r=p(t,i.env??process.env);if(s==="status"){let o=u(t.id);if(!o)return"Error: `id` is required for status (the card id you got when you raised it).";try{let n=await c(`${d}/approvals/${encodeURIComponent(o)}`,{signal:AbortSignal.timeout(1e4)}),a=await n.json().catch(()=>({}));if(!n.ok)return`Error: ${a?.error||`HTTP ${n.status}`}`;let e=a.card;return r&&e.raised_by!==r.agentId?`Error: card "${o}" was raised by another agent.`:e.status==="pending"?`Card ${e.id} is still waiting for the operator. It expires ${e.expires}; then "${e.if_silent}" applies.`:e.status==="decided"?`Card ${e.id}: the operator said ${String(e.verdict).toUpperCase()}.${e.note?` Note: ${e.note}`:""}`:`Card ${e.id} expired unanswered; the default applied: ${e.outcome??e.if_silent}.`}catch(n){return`Error: couldn't reach the daemon (${n?.message??n}).`}}if(s!=="create")return`Error: unknown action "${s}". Use create or status.`;if(!r)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=r.channel&&r.chatId&&!f.has(r.channel)?{channel:r.channel,chatId:r.chatId,...r.accountId?{accountId:r.accountId}:{}}:void 0,h={title:t.title,ask:t.ask,recommend:t.recommend,if_silent:t.if_silent,expires:t.expires,source:t.source,raised_by:r.agentId,...l?{reply:l}:{}};try{let o=await c(`${d}/approvals`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h),signal:AbortSignal.timeout(1e4)}),n=await o.json().catch(()=>({}));if(!o.ok)return`Error: ${n?.error||`HTTP ${o.status}`}`;let a=n.card;return[`Decision card ${a.id} is in the operator's Approvals inbox.`,`If nobody answers by ${a.expires}, "${a.if_silent}" applies.`,"You will get a message with the result. Tell the requester it is waiting for approval; don't ask the operator again in chat."].join(" ")}catch(o){return`Error: couldn't reach the daemon (${o?.message??o}).`}}export{y as runApprovalTool};
2
- //# sourceMappingURL=tool-SF3BCY55.js.map
1
+ import{b as p}from"./chunk-H7R3F2CO.js";import"./chunk-RKPAVWXF.js";import"./chunk-QZ4M2KAC.js";import"./chunk-XOUIZBAQ.js";import"./chunk-7BQQWI4T.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-3IUU4YFI.js";import"./chunk-QIJLFPWE.js";var f=new Set(["cron","heartbeat","api","a2a","mesh","approvals"]);function u(t){return typeof t=="string"?t.trim():""}async function y(t,i){let c=i.fetch??fetch,d=i.daemonUrl.replace(/\/$/,""),s=(u(t.action)||"create").toLowerCase(),r=p(t,i.env??process.env);if(s==="status"){let o=u(t.id);if(!o)return"Error: `id` is required for status (the card id you got when you raised it).";try{let n=await c(`${d}/approvals/${encodeURIComponent(o)}`,{signal:AbortSignal.timeout(1e4)}),a=await n.json().catch(()=>({}));if(!n.ok)return`Error: ${a?.error||`HTTP ${n.status}`}`;let e=a.card;return r&&e.raised_by!==r.agentId?`Error: card "${o}" was raised by another agent.`:e.status==="pending"?`Card ${e.id} is still waiting for the operator. It expires ${e.expires}; then "${e.if_silent}" applies.`:e.status==="decided"?`Card ${e.id}: the operator said ${String(e.verdict).toUpperCase()}.${e.note?` Note: ${e.note}`:""}`:`Card ${e.id} expired unanswered; the default applied: ${e.outcome??e.if_silent}.`}catch(n){return`Error: couldn't reach the daemon (${n?.message??n}).`}}if(s!=="create")return`Error: unknown action "${s}". Use create or status.`;if(!r)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=r.channel&&r.chatId&&!f.has(r.channel)?{channel:r.channel,chatId:r.chatId,...r.accountId?{accountId:r.accountId}:{}}:void 0,h={title:t.title,ask:t.ask,recommend:t.recommend,if_silent:t.if_silent,expires:t.expires,source:t.source,raised_by:r.agentId,...l?{reply:l}:{}};try{let o=await c(`${d}/approvals`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h),signal:AbortSignal.timeout(1e4)}),n=await o.json().catch(()=>({}));if(!o.ok)return`Error: ${n?.error||`HTTP ${o.status}`}`;let a=n.card;return[`Decision card ${a.id} is in the operator's Approvals inbox.`,`If nobody answers by ${a.expires}, "${a.if_silent}" applies.`,"You will get a message with the result. Tell the requester it is waiting for approval; don't ask the operator again in chat."].join(" ")}catch(o){return`Error: couldn't reach the daemon (${o?.message??o}).`}}export{y as runApprovalTool};
2
+ //# sourceMappingURL=tool-WW4YCMSP.js.map
@@ -0,0 +1,2 @@
1
+ import"./chunk-VWTBHLMX.js";import{a as b}from"./chunk-7M7VJMGP.js";import{e as a}from"./chunk-YPPTPBBV.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import{a as c}from"./chunk-76NNONUJ.js";import"./chunk-TFVUOC2C.js";import"./chunk-2GIDVZ4H.js";import"./chunk-MHBUAU2B.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-3IUU4YFI.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as WikiHub,a as WikiStore,c as agenticQuery};
2
+ //# sourceMappingURL=wiki-IVJJQUKB.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentix-cli",
3
- "version": "0.51.0",
3
+ "version": "0.52.1",
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": {