@cursor/july 0.1.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 (623) hide show
  1. package/AGENTS.md +290 -0
  2. package/LICENSE.md +3 -0
  3. package/README.md +1233 -0
  4. package/dist/ab.d.ts +290 -0
  5. package/dist/ab.d.ts.map +1 -0
  6. package/dist/ab.js +386 -0
  7. package/dist/bin/agent-serve.d.ts +15 -0
  8. package/dist/bin/agent-serve.d.ts.map +1 -0
  9. package/dist/bin/agent-serve.js +754 -0
  10. package/dist/channels/github/api.d.ts +101 -0
  11. package/dist/channels/github/api.d.ts.map +1 -0
  12. package/dist/channels/github/api.js +229 -0
  13. package/dist/channels/github/auth.d.ts +67 -0
  14. package/dist/channels/github/auth.d.ts.map +1 -0
  15. package/dist/channels/github/auth.js +239 -0
  16. package/dist/channels/github/binding.d.ts +73 -0
  17. package/dist/channels/github/binding.d.ts.map +1 -0
  18. package/dist/channels/github/binding.js +114 -0
  19. package/dist/channels/github/defaults.d.ts +24 -0
  20. package/dist/channels/github/defaults.d.ts.map +1 -0
  21. package/dist/channels/github/defaults.js +100 -0
  22. package/dist/channels/github/events.d.ts +18 -0
  23. package/dist/channels/github/events.d.ts.map +1 -0
  24. package/dist/channels/github/events.js +59 -0
  25. package/dist/channels/github/forward.d.ts +137 -0
  26. package/dist/channels/github/forward.d.ts.map +1 -0
  27. package/dist/channels/github/forward.js +271 -0
  28. package/dist/channels/github/github-channel.d.ts +127 -0
  29. package/dist/channels/github/github-channel.d.ts.map +1 -0
  30. package/dist/channels/github/github-channel.js +1688 -0
  31. package/dist/channels/github/index.d.ts +52 -0
  32. package/dist/channels/github/index.d.ts.map +1 -0
  33. package/dist/channels/github/index.js +51 -0
  34. package/dist/channels/github/replay.d.ts +115 -0
  35. package/dist/channels/github/replay.d.ts.map +1 -0
  36. package/dist/channels/github/replay.js +282 -0
  37. package/dist/channels/github/state.d.ts +26 -0
  38. package/dist/channels/github/state.d.ts.map +1 -0
  39. package/dist/channels/github/state.js +50 -0
  40. package/dist/channels/github/types.d.ts +385 -0
  41. package/dist/channels/github/types.d.ts.map +1 -0
  42. package/dist/channels/github/types.js +1 -0
  43. package/dist/channels/slack/api.d.ts +117 -0
  44. package/dist/channels/slack/api.d.ts.map +1 -0
  45. package/dist/channels/slack/api.js +437 -0
  46. package/dist/channels/slack/approvals.d.ts +32 -0
  47. package/dist/channels/slack/approvals.d.ts.map +1 -0
  48. package/dist/channels/slack/approvals.js +157 -0
  49. package/dist/channels/slack/assistant.d.ts +23 -0
  50. package/dist/channels/slack/assistant.d.ts.map +1 -0
  51. package/dist/channels/slack/assistant.js +67 -0
  52. package/dist/channels/slack/auth.d.ts +40 -0
  53. package/dist/channels/slack/auth.d.ts.map +1 -0
  54. package/dist/channels/slack/auth.js +71 -0
  55. package/dist/channels/slack/channel-watch.d.ts +46 -0
  56. package/dist/channels/slack/channel-watch.d.ts.map +1 -0
  57. package/dist/channels/slack/channel-watch.js +180 -0
  58. package/dist/channels/slack/constants.d.ts +17 -0
  59. package/dist/channels/slack/constants.d.ts.map +1 -0
  60. package/dist/channels/slack/constants.js +27 -0
  61. package/dist/channels/slack/credentials.d.ts +35 -0
  62. package/dist/channels/slack/credentials.d.ts.map +1 -0
  63. package/dist/channels/slack/credentials.js +88 -0
  64. package/dist/channels/slack/cursor-account.d.ts +76 -0
  65. package/dist/channels/slack/cursor-account.d.ts.map +1 -0
  66. package/dist/channels/slack/cursor-account.js +88 -0
  67. package/dist/channels/slack/defaults.d.ts +32 -0
  68. package/dist/channels/slack/defaults.d.ts.map +1 -0
  69. package/dist/channels/slack/defaults.js +380 -0
  70. package/dist/channels/slack/dispatch.d.ts +43 -0
  71. package/dist/channels/slack/dispatch.d.ts.map +1 -0
  72. package/dist/channels/slack/dispatch.js +185 -0
  73. package/dist/channels/slack/doctor.d.ts +24 -0
  74. package/dist/channels/slack/doctor.d.ts.map +1 -0
  75. package/dist/channels/slack/doctor.js +115 -0
  76. package/dist/channels/slack/event-id-dedupe.d.ts +10 -0
  77. package/dist/channels/slack/event-id-dedupe.d.ts.map +1 -0
  78. package/dist/channels/slack/event-id-dedupe.js +23 -0
  79. package/dist/channels/slack/inbound.d.ts +41 -0
  80. package/dist/channels/slack/inbound.d.ts.map +1 -0
  81. package/dist/channels/slack/inbound.js +166 -0
  82. package/dist/channels/slack/index.d.ts +45 -0
  83. package/dist/channels/slack/index.d.ts.map +1 -0
  84. package/dist/channels/slack/index.js +44 -0
  85. package/dist/channels/slack/init.d.ts +32 -0
  86. package/dist/channels/slack/init.d.ts.map +1 -0
  87. package/dist/channels/slack/init.js +82 -0
  88. package/dist/channels/slack/interactive.d.ts +19 -0
  89. package/dist/channels/slack/interactive.d.ts.map +1 -0
  90. package/dist/channels/slack/interactive.js +142 -0
  91. package/dist/channels/slack/links.d.ts +10 -0
  92. package/dist/channels/slack/links.d.ts.map +1 -0
  93. package/dist/channels/slack/links.js +19 -0
  94. package/dist/channels/slack/live-delivery.d.ts +75 -0
  95. package/dist/channels/slack/live-delivery.d.ts.map +1 -0
  96. package/dist/channels/slack/live-delivery.js +143 -0
  97. package/dist/channels/slack/log.d.ts +25 -0
  98. package/dist/channels/slack/log.d.ts.map +1 -0
  99. package/dist/channels/slack/log.js +47 -0
  100. package/dist/channels/slack/manifest.d.ts +57 -0
  101. package/dist/channels/slack/manifest.d.ts.map +1 -0
  102. package/dist/channels/slack/manifest.js +110 -0
  103. package/dist/channels/slack/pr-ref.d.ts +18 -0
  104. package/dist/channels/slack/pr-ref.d.ts.map +1 -0
  105. package/dist/channels/slack/pr-ref.js +36 -0
  106. package/dist/channels/slack/setup.d.ts +14 -0
  107. package/dist/channels/slack/setup.d.ts.map +1 -0
  108. package/dist/channels/slack/setup.js +86 -0
  109. package/dist/channels/slack/slack-channel.d.ts +15 -0
  110. package/dist/channels/slack/slack-channel.d.ts.map +1 -0
  111. package/dist/channels/slack/slack-channel.js +281 -0
  112. package/dist/channels/slack/socket-mode.d.ts +26 -0
  113. package/dist/channels/slack/socket-mode.d.ts.map +1 -0
  114. package/dist/channels/slack/socket-mode.js +116 -0
  115. package/dist/channels/slack/stream.d.ts +26 -0
  116. package/dist/channels/slack/stream.d.ts.map +1 -0
  117. package/dist/channels/slack/stream.js +39 -0
  118. package/dist/channels/slack/tool-approval-events.d.ts +33 -0
  119. package/dist/channels/slack/tool-approval-events.d.ts.map +1 -0
  120. package/dist/channels/slack/tool-approval-events.js +129 -0
  121. package/dist/channels/slack/types.d.ts +326 -0
  122. package/dist/channels/slack/types.d.ts.map +1 -0
  123. package/dist/channels/slack/types.js +4 -0
  124. package/dist/channels.d.ts +116 -0
  125. package/dist/channels.d.ts.map +1 -0
  126. package/dist/channels.js +294 -0
  127. package/dist/connections.d.ts +75 -0
  128. package/dist/connections.d.ts.map +1 -0
  129. package/dist/connections.js +75 -0
  130. package/dist/docs/404.html +22 -0
  131. package/dist/docs/ab.html +87 -0
  132. package/dist/docs/assets/ab.md.COdXkces.js +63 -0
  133. package/dist/docs/assets/ab.md.COdXkces.lean.js +1 -0
  134. package/dist/docs/assets/app.DqfFEmJd.js +1 -0
  135. package/dist/docs/assets/building-with-agents.md.CJCtZCyi.js +13 -0
  136. package/dist/docs/assets/building-with-agents.md.CJCtZCyi.lean.js +1 -0
  137. package/dist/docs/assets/chunks/@localSearchIndexroot.CcVk1uKq.js +1 -0
  138. package/dist/docs/assets/chunks/VPLocalSearchBox.BaLEdS15.js +9 -0
  139. package/dist/docs/assets/chunks/framework.CAZyNGu9.js +19 -0
  140. package/dist/docs/assets/chunks/theme.CZRvu_0q.js +2 -0
  141. package/dist/docs/assets/concepts.md.Cfb9b-k1.js +4 -0
  142. package/dist/docs/assets/concepts.md.Cfb9b-k1.lean.js +1 -0
  143. package/dist/docs/assets/deployment.md.Dx1TYNk5.js +14 -0
  144. package/dist/docs/assets/deployment.md.Dx1TYNk5.lean.js +1 -0
  145. package/dist/docs/assets/evals.md.DPZ_MAnI.js +85 -0
  146. package/dist/docs/assets/evals.md.DPZ_MAnI.lean.js +1 -0
  147. package/dist/docs/assets/guides_agent-to-agent.md.CrtrsySy.js +10 -0
  148. package/dist/docs/assets/guides_agent-to-agent.md.CrtrsySy.lean.js +1 -0
  149. package/dist/docs/assets/guides_cloud-runtime.md.CYlNMTNp.js +9 -0
  150. package/dist/docs/assets/guides_cloud-runtime.md.CYlNMTNp.lean.js +1 -0
  151. package/dist/docs/assets/guides_github.md.DwbKhCeS.js +20 -0
  152. package/dist/docs/assets/guides_github.md.DwbKhCeS.lean.js +1 -0
  153. package/dist/docs/assets/guides_human-in-the-loop.md.Dvuctx7s.js +28 -0
  154. package/dist/docs/assets/guides_human-in-the-loop.md.Dvuctx7s.lean.js +1 -0
  155. package/dist/docs/assets/guides_slack.md.bv41fHfW.js +37 -0
  156. package/dist/docs/assets/guides_slack.md.bv41fHfW.lean.js +1 -0
  157. package/dist/docs/assets/guides_webhooks.md.hFTik3lf.js +50 -0
  158. package/dist/docs/assets/guides_webhooks.md.hFTik3lf.lean.js +1 -0
  159. package/dist/docs/assets/hillclimbing.md.DHNast08.js +4 -0
  160. package/dist/docs/assets/hillclimbing.md.DHNast08.lean.js +1 -0
  161. package/dist/docs/assets/index.md.BPKcj5AI.js +20 -0
  162. package/dist/docs/assets/index.md.BPKcj5AI.lean.js +1 -0
  163. package/dist/docs/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
  164. package/dist/docs/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
  165. package/dist/docs/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
  166. package/dist/docs/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
  167. package/dist/docs/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
  168. package/dist/docs/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
  169. package/dist/docs/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
  170. package/dist/docs/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
  171. package/dist/docs/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
  172. package/dist/docs/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
  173. package/dist/docs/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
  174. package/dist/docs/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
  175. package/dist/docs/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
  176. package/dist/docs/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
  177. package/dist/docs/assets/quickstart.md.tVPiGK_L.js +35 -0
  178. package/dist/docs/assets/quickstart.md.tVPiGK_L.lean.js +1 -0
  179. package/dist/docs/assets/reference_agent-config.md.Bpd7HQwf.js +34 -0
  180. package/dist/docs/assets/reference_agent-config.md.Bpd7HQwf.lean.js +1 -0
  181. package/dist/docs/assets/reference_channels.md.D7JTR03W.js +53 -0
  182. package/dist/docs/assets/reference_channels.md.D7JTR03W.lean.js +1 -0
  183. package/dist/docs/assets/reference_cli.md.DA730zCu.js +33 -0
  184. package/dist/docs/assets/reference_cli.md.DA730zCu.lean.js +1 -0
  185. package/dist/docs/assets/reference_connections.md.C3vNH_DE.js +26 -0
  186. package/dist/docs/assets/reference_connections.md.C3vNH_DE.lean.js +1 -0
  187. package/dist/docs/assets/reference_hooks.md.BCEc3MyM.js +12 -0
  188. package/dist/docs/assets/reference_hooks.md.BCEc3MyM.lean.js +1 -0
  189. package/dist/docs/assets/reference_http-api.md.DBAahtdz.js +11 -0
  190. package/dist/docs/assets/reference_http-api.md.DBAahtdz.lean.js +1 -0
  191. package/dist/docs/assets/reference_instructions.md.BC05LEQ8.js +12 -0
  192. package/dist/docs/assets/reference_instructions.md.BC05LEQ8.lean.js +1 -0
  193. package/dist/docs/assets/reference_playground.md.CPZhfYaO.js +1 -0
  194. package/dist/docs/assets/reference_playground.md.CPZhfYaO.lean.js +1 -0
  195. package/dist/docs/assets/reference_project-layout.md.Bd_CKtNS.js +31 -0
  196. package/dist/docs/assets/reference_project-layout.md.Bd_CKtNS.lean.js +1 -0
  197. package/dist/docs/assets/reference_schedules.md.D7qijxLk.js +82 -0
  198. package/dist/docs/assets/reference_schedules.md.D7qijxLk.lean.js +1 -0
  199. package/dist/docs/assets/reference_sessions.md.DdjWabnN.js +8 -0
  200. package/dist/docs/assets/reference_sessions.md.DdjWabnN.lean.js +1 -0
  201. package/dist/docs/assets/reference_skills.md.VQnlBT3Q.js +15 -0
  202. package/dist/docs/assets/reference_skills.md.VQnlBT3Q.lean.js +1 -0
  203. package/dist/docs/assets/reference_subagents.md.CIRAVcPK.js +10 -0
  204. package/dist/docs/assets/reference_subagents.md.CIRAVcPK.lean.js +1 -0
  205. package/dist/docs/assets/reference_tools.md.DF5kwlt0.js +46 -0
  206. package/dist/docs/assets/reference_tools.md.DF5kwlt0.lean.js +1 -0
  207. package/dist/docs/assets/scaffolding-agents.md.CyYfWGdc.js +1 -0
  208. package/dist/docs/assets/scaffolding-agents.md.CyYfWGdc.lean.js +1 -0
  209. package/dist/docs/assets/style.Bj-IXa5W.css +1 -0
  210. package/dist/docs/assets/troubleshooting.md.DkovjS7h.js +1 -0
  211. package/dist/docs/assets/troubleshooting.md.DkovjS7h.lean.js +1 -0
  212. package/dist/docs/building-with-agents.html +37 -0
  213. package/dist/docs/concepts.html +28 -0
  214. package/dist/docs/deployment.html +38 -0
  215. package/dist/docs/evals.html +109 -0
  216. package/dist/docs/guides/agent-to-agent.html +34 -0
  217. package/dist/docs/guides/cloud-runtime.html +33 -0
  218. package/dist/docs/guides/github.html +44 -0
  219. package/dist/docs/guides/human-in-the-loop.html +52 -0
  220. package/dist/docs/guides/slack.html +61 -0
  221. package/dist/docs/guides/webhooks.html +74 -0
  222. package/dist/docs/hashmap.json +1 -0
  223. package/dist/docs/hillclimbing.html +28 -0
  224. package/dist/docs/index.html +44 -0
  225. package/dist/docs/quickstart.html +59 -0
  226. package/dist/docs/reference/agent-config.html +58 -0
  227. package/dist/docs/reference/channels.html +77 -0
  228. package/dist/docs/reference/cli.html +57 -0
  229. package/dist/docs/reference/connections.html +50 -0
  230. package/dist/docs/reference/hooks.html +36 -0
  231. package/dist/docs/reference/http-api.html +35 -0
  232. package/dist/docs/reference/instructions.html +36 -0
  233. package/dist/docs/reference/playground.html +25 -0
  234. package/dist/docs/reference/project-layout.html +55 -0
  235. package/dist/docs/reference/schedules.html +106 -0
  236. package/dist/docs/reference/sessions.html +32 -0
  237. package/dist/docs/reference/skills.html +39 -0
  238. package/dist/docs/reference/subagents.html +34 -0
  239. package/dist/docs/reference/tools.html +70 -0
  240. package/dist/docs/scaffolding-agents.html +25 -0
  241. package/dist/docs/troubleshooting.html +25 -0
  242. package/dist/docs/vp-icons.css +0 -0
  243. package/dist/evals.d.ts +312 -0
  244. package/dist/evals.d.ts.map +1 -0
  245. package/dist/evals.js +254 -0
  246. package/dist/hooks.d.ts +23 -0
  247. package/dist/hooks.d.ts.map +1 -0
  248. package/dist/hooks.js +23 -0
  249. package/dist/index.d.ts +71 -0
  250. package/dist/index.d.ts.map +1 -0
  251. package/dist/index.js +101 -0
  252. package/dist/internal/ab-collector.d.ts +42 -0
  253. package/dist/internal/ab-collector.d.ts.map +1 -0
  254. package/dist/internal/ab-collector.js +153 -0
  255. package/dist/internal/ab-fold.d.ts +36 -0
  256. package/dist/internal/ab-fold.d.ts.map +1 -0
  257. package/dist/internal/ab-fold.js +171 -0
  258. package/dist/internal/ab-snapshot.d.ts +70 -0
  259. package/dist/internal/ab-snapshot.d.ts.map +1 -0
  260. package/dist/internal/ab-snapshot.js +208 -0
  261. package/dist/internal/approval-gate.d.ts +34 -0
  262. package/dist/internal/approval-gate.d.ts.map +1 -0
  263. package/dist/internal/approval-gate.js +85 -0
  264. package/dist/internal/auth.d.ts +8 -0
  265. package/dist/internal/auth.d.ts.map +1 -0
  266. package/dist/internal/auth.js +27 -0
  267. package/dist/internal/authored-alias-hooks.d.ts +31 -0
  268. package/dist/internal/authored-alias-hooks.d.ts.map +1 -0
  269. package/dist/internal/authored-alias-hooks.js +43 -0
  270. package/dist/internal/authored-loaders.d.ts +25 -0
  271. package/dist/internal/authored-loaders.d.ts.map +1 -0
  272. package/dist/internal/authored-loaders.js +129 -0
  273. package/dist/internal/bounded-int.d.ts +11 -0
  274. package/dist/internal/bounded-int.d.ts.map +1 -0
  275. package/dist/internal/bounded-int.js +13 -0
  276. package/dist/internal/brand.d.ts +6 -0
  277. package/dist/internal/brand.d.ts.map +1 -0
  278. package/dist/internal/brand.js +17 -0
  279. package/dist/internal/chat-client.d.ts +19 -0
  280. package/dist/internal/chat-client.d.ts.map +1 -0
  281. package/dist/internal/chat-client.js +327 -0
  282. package/dist/internal/cli-ax.d.ts +58 -0
  283. package/dist/internal/cli-ax.d.ts.map +1 -0
  284. package/dist/internal/cli-ax.js +345 -0
  285. package/dist/internal/cli-cursor.d.ts +20 -0
  286. package/dist/internal/cli-cursor.d.ts.map +1 -0
  287. package/dist/internal/cli-cursor.js +227 -0
  288. package/dist/internal/cli-github.d.ts +47 -0
  289. package/dist/internal/cli-github.d.ts.map +1 -0
  290. package/dist/internal/cli-github.js +644 -0
  291. package/dist/internal/cli-slack.d.ts +18 -0
  292. package/dist/internal/cli-slack.d.ts.map +1 -0
  293. package/dist/internal/cli-slack.js +144 -0
  294. package/dist/internal/cloud-merge.d.ts +23 -0
  295. package/dist/internal/cloud-merge.d.ts.map +1 -0
  296. package/dist/internal/cloud-merge.js +28 -0
  297. package/dist/internal/cron.d.ts +17 -0
  298. package/dist/internal/cron.d.ts.map +1 -0
  299. package/dist/internal/cron.js +60 -0
  300. package/dist/internal/cursor/account-mcp.d.ts +95 -0
  301. package/dist/internal/cursor/account-mcp.d.ts.map +1 -0
  302. package/dist/internal/cursor/account-mcp.js +342 -0
  303. package/dist/internal/cursor/backend-client.d.ts +118 -0
  304. package/dist/internal/cursor/backend-client.d.ts.map +1 -0
  305. package/dist/internal/cursor/backend-client.js +477 -0
  306. package/dist/internal/cursor/credentials.d.ts +112 -0
  307. package/dist/internal/cursor/credentials.d.ts.map +1 -0
  308. package/dist/internal/cursor/credentials.js +329 -0
  309. package/dist/internal/cursor-event-relay.d.ts +111 -0
  310. package/dist/internal/cursor-event-relay.d.ts.map +1 -0
  311. package/dist/internal/cursor-event-relay.js +181 -0
  312. package/dist/internal/cursor-relay-core.d.ts +113 -0
  313. package/dist/internal/cursor-relay-core.d.ts.map +1 -0
  314. package/dist/internal/cursor-relay-core.js +364 -0
  315. package/dist/internal/cursor-slack-relay.d.ts +94 -0
  316. package/dist/internal/cursor-slack-relay.d.ts.map +1 -0
  317. package/dist/internal/cursor-slack-relay.js +171 -0
  318. package/dist/internal/describe-error.d.ts +3 -0
  319. package/dist/internal/describe-error.d.ts.map +1 -0
  320. package/dist/internal/describe-error.js +4 -0
  321. package/dist/internal/dev-mode.d.ts +13 -0
  322. package/dist/internal/dev-mode.d.ts.map +1 -0
  323. package/dist/internal/dev-mode.js +17 -0
  324. package/dist/internal/discovery.d.ts +55 -0
  325. package/dist/internal/discovery.d.ts.map +1 -0
  326. package/dist/internal/discovery.js +1427 -0
  327. package/dist/internal/distribution.d.ts +47 -0
  328. package/dist/internal/distribution.d.ts.map +1 -0
  329. package/dist/internal/distribution.js +82 -0
  330. package/dist/internal/docs-site.d.ts +28 -0
  331. package/dist/internal/docs-site.d.ts.map +1 -0
  332. package/dist/internal/docs-site.js +169 -0
  333. package/dist/internal/duration.d.ts +8 -0
  334. package/dist/internal/duration.d.ts.map +1 -0
  335. package/dist/internal/duration.js +35 -0
  336. package/dist/internal/eval-run-store.d.ts +81 -0
  337. package/dist/internal/eval-run-store.d.ts.map +1 -0
  338. package/dist/internal/eval-run-store.js +396 -0
  339. package/dist/internal/eval-runner.d.ts +76 -0
  340. package/dist/internal/eval-runner.d.ts.map +1 -0
  341. package/dist/internal/eval-runner.js +336 -0
  342. package/dist/internal/event-log.d.ts +51 -0
  343. package/dist/internal/event-log.d.ts.map +1 -0
  344. package/dist/internal/event-log.js +167 -0
  345. package/dist/internal/event-mapper.d.ts +46 -0
  346. package/dist/internal/event-mapper.d.ts.map +1 -0
  347. package/dist/internal/event-mapper.js +226 -0
  348. package/dist/internal/frontmatter.d.ts +12 -0
  349. package/dist/internal/frontmatter.d.ts.map +1 -0
  350. package/dist/internal/frontmatter.js +61 -0
  351. package/dist/internal/github-fanout.d.ts +32 -0
  352. package/dist/internal/github-fanout.d.ts.map +1 -0
  353. package/dist/internal/github-fanout.js +122 -0
  354. package/dist/internal/handleAgentServeTrigger.d.ts +59 -0
  355. package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -0
  356. package/dist/internal/handleAgentServeTrigger.js +115 -0
  357. package/dist/internal/host-platforms.d.ts +40 -0
  358. package/dist/internal/host-platforms.d.ts.map +1 -0
  359. package/dist/internal/host-platforms.js +113 -0
  360. package/dist/internal/http-channel.d.ts +54 -0
  361. package/dist/internal/http-channel.d.ts.map +1 -0
  362. package/dist/internal/http-channel.js +382 -0
  363. package/dist/internal/ids.d.ts +19 -0
  364. package/dist/internal/ids.d.ts.map +1 -0
  365. package/dist/internal/ids.js +34 -0
  366. package/dist/internal/init-project.d.ts +22 -0
  367. package/dist/internal/init-project.d.ts.map +1 -0
  368. package/dist/internal/init-project.js +125 -0
  369. package/dist/internal/json-dir-store.d.ts +32 -0
  370. package/dist/internal/json-dir-store.d.ts.map +1 -0
  371. package/dist/internal/json-dir-store.js +100 -0
  372. package/dist/internal/json-schema.d.ts +18 -0
  373. package/dist/internal/json-schema.d.ts.map +1 -0
  374. package/dist/internal/json-schema.js +53 -0
  375. package/dist/internal/log-ring.d.ts +23 -0
  376. package/dist/internal/log-ring.d.ts.map +1 -0
  377. package/dist/internal/log-ring.js +42 -0
  378. package/dist/internal/map-pool.d.ts +6 -0
  379. package/dist/internal/map-pool.d.ts.map +1 -0
  380. package/dist/internal/map-pool.js +41 -0
  381. package/dist/internal/mcp-endpoint.d.ts +59 -0
  382. package/dist/internal/mcp-endpoint.d.ts.map +1 -0
  383. package/dist/internal/mcp-endpoint.js +355 -0
  384. package/dist/internal/mcp-host.d.ts +28 -0
  385. package/dist/internal/mcp-host.d.ts.map +1 -0
  386. package/dist/internal/mcp-host.js +162 -0
  387. package/dist/internal/net.d.ts +5 -0
  388. package/dist/internal/net.d.ts.map +1 -0
  389. package/dist/internal/net.js +30 -0
  390. package/dist/internal/peer-connections.d.ts +44 -0
  391. package/dist/internal/peer-connections.d.ts.map +1 -0
  392. package/dist/internal/peer-connections.js +67 -0
  393. package/dist/internal/playground/static.d.ts +35 -0
  394. package/dist/internal/playground/static.d.ts.map +1 -0
  395. package/dist/internal/playground/static.js +162 -0
  396. package/dist/internal/playground/toolchain.d.ts +57 -0
  397. package/dist/internal/playground/toolchain.d.ts.map +1 -0
  398. package/dist/internal/playground/toolchain.js +226 -0
  399. package/dist/internal/reminder-runner.d.ts +62 -0
  400. package/dist/internal/reminder-runner.d.ts.map +1 -0
  401. package/dist/internal/reminder-runner.js +582 -0
  402. package/dist/internal/reminder-schedule.d.ts +22 -0
  403. package/dist/internal/reminder-schedule.d.ts.map +1 -0
  404. package/dist/internal/reminder-schedule.js +82 -0
  405. package/dist/internal/reminder-store.d.ts +58 -0
  406. package/dist/internal/reminder-store.d.ts.map +1 -0
  407. package/dist/internal/reminder-store.js +106 -0
  408. package/dist/internal/resolved-connections.d.ts +41 -0
  409. package/dist/internal/resolved-connections.d.ts.map +1 -0
  410. package/dist/internal/resolved-connections.js +73 -0
  411. package/dist/internal/review-comments.d.ts +50 -0
  412. package/dist/internal/review-comments.d.ts.map +1 -0
  413. package/dist/internal/review-comments.js +194 -0
  414. package/dist/internal/router.d.ts +33 -0
  415. package/dist/internal/router.d.ts.map +1 -0
  416. package/dist/internal/router.js +93 -0
  417. package/dist/internal/run-client.d.ts +49 -0
  418. package/dist/internal/run-client.d.ts.map +1 -0
  419. package/dist/internal/run-client.js +208 -0
  420. package/dist/internal/schedule-runner.d.ts +31 -0
  421. package/dist/internal/schedule-runner.d.ts.map +1 -0
  422. package/dist/internal/schedule-runner.js +126 -0
  423. package/dist/internal/sdk-runner.d.ts +41 -0
  424. package/dist/internal/sdk-runner.d.ts.map +1 -0
  425. package/dist/internal/sdk-runner.js +221 -0
  426. package/dist/internal/server.d.ts +25 -0
  427. package/dist/internal/server.d.ts.map +1 -0
  428. package/dist/internal/server.js +1374 -0
  429. package/dist/internal/session-engine.d.ts +287 -0
  430. package/dist/internal/session-engine.d.ts.map +1 -0
  431. package/dist/internal/session-engine.js +1377 -0
  432. package/dist/internal/session-store.d.ts +29 -0
  433. package/dist/internal/session-store.d.ts.map +1 -0
  434. package/dist/internal/session-store.js +140 -0
  435. package/dist/internal/session-urls.d.ts +10 -0
  436. package/dist/internal/session-urls.d.ts.map +1 -0
  437. package/dist/internal/session-urls.js +25 -0
  438. package/dist/internal/stream-progress.d.ts +14 -0
  439. package/dist/internal/stream-progress.d.ts.map +1 -0
  440. package/dist/internal/stream-progress.js +195 -0
  441. package/dist/internal/tool-result.d.ts +20 -0
  442. package/dist/internal/tool-result.d.ts.map +1 -0
  443. package/dist/internal/tool-result.js +45 -0
  444. package/dist/internal/trajectory.d.ts +56 -0
  445. package/dist/internal/trajectory.d.ts.map +1 -0
  446. package/dist/internal/trajectory.js +248 -0
  447. package/dist/internal/workspace.d.ts +42 -0
  448. package/dist/internal/workspace.d.ts.map +1 -0
  449. package/dist/internal/workspace.js +199 -0
  450. package/dist/playground/assets/cursor-icons-outline-oY2V_mvK.woff2 +0 -0
  451. package/dist/playground/assets/index-1K-hG-7p.css +1 -0
  452. package/dist/playground/assets/index-FlWjhg3x.js +79 -0
  453. package/dist/playground/index.html +17 -0
  454. package/dist/reminders.d.ts +23 -0
  455. package/dist/reminders.d.ts.map +1 -0
  456. package/dist/reminders.js +22 -0
  457. package/dist/schedules.d.ts +23 -0
  458. package/dist/schedules.d.ts.map +1 -0
  459. package/dist/schedules.js +26 -0
  460. package/dist/skills.d.ts +22 -0
  461. package/dist/skills.d.ts.map +1 -0
  462. package/dist/skills.js +22 -0
  463. package/dist/tools.d.ts +92 -0
  464. package/dist/tools.d.ts.map +1 -0
  465. package/dist/tools.js +68 -0
  466. package/dist/types.d.ts +1609 -0
  467. package/dist/types.d.ts.map +1 -0
  468. package/dist/types.js +80 -0
  469. package/docs/README.md +174 -0
  470. package/docs/ab.md +355 -0
  471. package/docs/building-with-agents.md +129 -0
  472. package/docs/concepts.md +177 -0
  473. package/docs/deployment.md +218 -0
  474. package/docs/evals.md +383 -0
  475. package/docs/guides/agent-to-agent.md +118 -0
  476. package/docs/guides/cloud-runtime.md +122 -0
  477. package/docs/guides/github.md +172 -0
  478. package/docs/guides/human-in-the-loop.md +131 -0
  479. package/docs/guides/slack.md +245 -0
  480. package/docs/guides/webhooks.md +201 -0
  481. package/docs/hillclimbing.md +93 -0
  482. package/docs/quickstart.md +183 -0
  483. package/docs/reference/agent-config.md +154 -0
  484. package/docs/reference/channels.md +206 -0
  485. package/docs/reference/cli.md +257 -0
  486. package/docs/reference/connections.md +137 -0
  487. package/docs/reference/hooks.md +74 -0
  488. package/docs/reference/http-api.md +219 -0
  489. package/docs/reference/instructions.md +77 -0
  490. package/docs/reference/playground.md +67 -0
  491. package/docs/reference/project-layout.md +119 -0
  492. package/docs/reference/schedules.md +220 -0
  493. package/docs/reference/sessions.md +165 -0
  494. package/docs/reference/skills.md +79 -0
  495. package/docs/reference/subagents.md +74 -0
  496. package/docs/reference/tools.md +203 -0
  497. package/docs/scaffolding-agents.md +113 -0
  498. package/docs/troubleshooting.md +95 -0
  499. package/package.json +185 -0
  500. package/skills/ab/SKILL.md +139 -0
  501. package/skills/create-agent/SKILL.md +219 -0
  502. package/skills/debug/SKILL.md +71 -0
  503. package/skills/evals/SKILL.md +217 -0
  504. package/skills/framework-map/SKILL.md +142 -0
  505. package/skills/github/SKILL.md +144 -0
  506. package/skills/hillclimb/SKILL.md +162 -0
  507. package/skills/setup-slack/SKILL.md +180 -0
  508. package/src/ab.ts +675 -0
  509. package/src/bin/agent-serve.ts +949 -0
  510. package/src/channels/github/api.ts +374 -0
  511. package/src/channels/github/auth.ts +275 -0
  512. package/src/channels/github/binding.ts +223 -0
  513. package/src/channels/github/defaults.ts +111 -0
  514. package/src/channels/github/events.ts +72 -0
  515. package/src/channels/github/forward.ts +381 -0
  516. package/src/channels/github/github-channel.ts +2270 -0
  517. package/src/channels/github/index.ts +52 -0
  518. package/src/channels/github/replay.ts +387 -0
  519. package/src/channels/github/state.ts +95 -0
  520. package/src/channels/github/types.ts +490 -0
  521. package/src/channels/slack/api.ts +580 -0
  522. package/src/channels/slack/approvals.ts +198 -0
  523. package/src/channels/slack/assistant.ts +76 -0
  524. package/src/channels/slack/auth.ts +112 -0
  525. package/src/channels/slack/channel-watch.ts +219 -0
  526. package/src/channels/slack/constants.ts +30 -0
  527. package/src/channels/slack/credentials.ts +90 -0
  528. package/src/channels/slack/cursor-account.ts +166 -0
  529. package/src/channels/slack/defaults.ts +450 -0
  530. package/src/channels/slack/dispatch.ts +293 -0
  531. package/src/channels/slack/doctor.ts +135 -0
  532. package/src/channels/slack/event-id-dedupe.ts +30 -0
  533. package/src/channels/slack/inbound.ts +219 -0
  534. package/src/channels/slack/index.ts +45 -0
  535. package/src/channels/slack/init.ts +133 -0
  536. package/src/channels/slack/interactive.ts +194 -0
  537. package/src/channels/slack/links.ts +23 -0
  538. package/src/channels/slack/live-delivery.ts +201 -0
  539. package/src/channels/slack/log.ts +83 -0
  540. package/src/channels/slack/manifest.ts +179 -0
  541. package/src/channels/slack/pr-ref.ts +50 -0
  542. package/src/channels/slack/setup.ts +97 -0
  543. package/src/channels/slack/slack-channel.ts +374 -0
  544. package/src/channels/slack/socket-mode.ts +154 -0
  545. package/src/channels/slack/stream.ts +63 -0
  546. package/src/channels/slack/tool-approval-events.ts +136 -0
  547. package/src/channels/slack/types.ts +349 -0
  548. package/src/channels.ts +385 -0
  549. package/src/connections.ts +89 -0
  550. package/src/evals.ts +501 -0
  551. package/src/hooks.ts +33 -0
  552. package/src/index.ts +184 -0
  553. package/src/internal/ab-collector.ts +210 -0
  554. package/src/internal/ab-fold.ts +228 -0
  555. package/src/internal/ab-snapshot.ts +335 -0
  556. package/src/internal/approval-gate.ts +115 -0
  557. package/src/internal/auth.ts +39 -0
  558. package/src/internal/authored-alias-hooks.ts +69 -0
  559. package/src/internal/authored-loaders.ts +138 -0
  560. package/src/internal/bounded-int.ts +27 -0
  561. package/src/internal/brand.ts +29 -0
  562. package/src/internal/chat-client.ts +407 -0
  563. package/src/internal/cli-ax.ts +474 -0
  564. package/src/internal/cli-cursor.ts +275 -0
  565. package/src/internal/cli-github.ts +849 -0
  566. package/src/internal/cli-slack.ts +175 -0
  567. package/src/internal/cloud-merge.ts +41 -0
  568. package/src/internal/cron.ts +78 -0
  569. package/src/internal/cursor/account-mcp.ts +472 -0
  570. package/src/internal/cursor/backend-client.ts +614 -0
  571. package/src/internal/cursor/credentials.ts +401 -0
  572. package/src/internal/cursor-event-relay.ts +281 -0
  573. package/src/internal/cursor-relay-core.ts +444 -0
  574. package/src/internal/cursor-slack-relay.ts +242 -0
  575. package/src/internal/describe-error.ts +4 -0
  576. package/src/internal/dev-mode.ts +20 -0
  577. package/src/internal/discovery.ts +1709 -0
  578. package/src/internal/distribution.ts +97 -0
  579. package/src/internal/docs-site.ts +191 -0
  580. package/src/internal/duration.ts +39 -0
  581. package/src/internal/eval-run-store.ts +519 -0
  582. package/src/internal/eval-runner.ts +522 -0
  583. package/src/internal/event-log.ts +175 -0
  584. package/src/internal/event-mapper.ts +272 -0
  585. package/src/internal/frontmatter.ts +77 -0
  586. package/src/internal/github-fanout.ts +159 -0
  587. package/src/internal/handleAgentServeTrigger.ts +156 -0
  588. package/src/internal/host-platforms.ts +144 -0
  589. package/src/internal/http-channel.ts +546 -0
  590. package/src/internal/ids.ts +44 -0
  591. package/src/internal/init-project.ts +165 -0
  592. package/src/internal/json-dir-store.ts +109 -0
  593. package/src/internal/json-schema.ts +69 -0
  594. package/src/internal/log-ring.ts +59 -0
  595. package/src/internal/map-pool.ts +32 -0
  596. package/src/internal/mcp-endpoint.ts +518 -0
  597. package/src/internal/mcp-host.ts +211 -0
  598. package/src/internal/net.ts +31 -0
  599. package/src/internal/peer-connections.ts +100 -0
  600. package/src/internal/playground/static.ts +189 -0
  601. package/src/internal/playground/toolchain.ts +277 -0
  602. package/src/internal/reminder-runner.ts +756 -0
  603. package/src/internal/reminder-schedule.ts +106 -0
  604. package/src/internal/reminder-store.ts +145 -0
  605. package/src/internal/resolved-connections.ts +145 -0
  606. package/src/internal/review-comments.ts +268 -0
  607. package/src/internal/router.ts +145 -0
  608. package/src/internal/run-client.ts +320 -0
  609. package/src/internal/schedule-runner.ts +161 -0
  610. package/src/internal/sdk-runner.ts +315 -0
  611. package/src/internal/server.ts +1737 -0
  612. package/src/internal/session-engine.ts +1810 -0
  613. package/src/internal/session-store.ts +147 -0
  614. package/src/internal/session-urls.ts +40 -0
  615. package/src/internal/stream-progress.ts +254 -0
  616. package/src/internal/tool-result.ts +54 -0
  617. package/src/internal/trajectory.ts +306 -0
  618. package/src/internal/workspace.ts +223 -0
  619. package/src/reminders.ts +35 -0
  620. package/src/schedules.ts +37 -0
  621. package/src/skills.ts +27 -0
  622. package/src/tools.ts +127 -0
  623. package/src/types.ts +1848 -0
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/VPLocalSearchBox.BaLEdS15.js","assets/chunks/framework.CAZyNGu9.js"])))=>i.map(i=>d[i]);
2
+ import{d as p,c as u,r as c,n as N,o as s,a as j,t as M,b,w as h,T as ue,e as m,_ as g,u as Ce,i as He,f as Be,g as de,h as y,j as d,k as i,l as z,m as se,p as S,q as F,s as X,v as U,x as ve,y as fe,z as Ee,A as Fe,F as x,B as A,C as W,D as Y,E as $e,G as k,H as B,I as ye,J as Q,K as G,L as Z,M as De,N as Pe,O as ie,P as Le,Q as Ve,R as ee,S as Oe,U as Ge,V as Ue,W as Se,X as Te,Y as je,Z as ze,$ as We,a0 as Ke,a1 as qe}from"./framework.CAZyNGu9.js";const Re=p({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(e){return(t,n)=>(s(),u("span",{class:N(["VPBadge",e.type])},[c(t.$slots,"default",{},()=>[j(M(e.text),1)])],2))}}),Je={key:0,class:"VPBackdrop"},Xe=p({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(e){return(t,n)=>(s(),b(ue,{name:"fade"},{default:h(()=>[e.show?(s(),u("div",Je)):m("",!0)]),_:1}))}}),Ye=g(Xe,[["__scopeId","data-v-7e92f1ea"]]),L=Ce;function Qe(e,t){let n,a=!1;return()=>{n&&clearTimeout(n),a?n=setTimeout(e,t):(e(),(a=!0)&&setTimeout(()=>a=!1,t))}}function re(e){return e.startsWith("/")?e:`/${e}`}function he(e){const{pathname:t,search:n,hash:a,protocol:o}=new URL(e,"http://a.com");if(He(e)||e.startsWith("#")||!o.startsWith("http")||!Be(t))return e;const{site:r}=L(),l=t.endsWith("/")||t.endsWith(".html")?e:e.replace(/(?:(^\.+)\/)?.*$/,`$1${t.replace(/(\.md)?$/,r.value.cleanUrls?"":".html")}${n}${a}`);return de(l)}function q({correspondingLink:e=!1}={}){const{site:t,localeIndex:n,page:a,theme:o,hash:r}=L(),l=y(()=>{var f,$;return{label:(f=t.value.locales[n.value])==null?void 0:f.label,link:(($=t.value.locales[n.value])==null?void 0:$.link)||(n.value==="root"?"/":`/${n.value}/`)}});return{localeLinks:y(()=>Object.entries(t.value.locales).flatMap(([f,$])=>l.value.label===$.label?[]:{text:$.label,link:Ze($.link||(f==="root"?"/":`/${f}/`),o.value.i18nRouting!==!1&&e,a.value.relativePath.slice(l.value.link.length-1),!t.value.cleanUrls)+r.value})),currentLang:l}}function Ze(e,t,n,a){return t?e.replace(/\/$/,"")+re(n.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,a?".html":"")):e}const et={class:"NotFound"},tt={class:"code"},nt={class:"title"},at={class:"quote"},ot={class:"action"},st=["href","aria-label"],it=p({__name:"NotFound",setup(e){const{theme:t}=L(),{currentLang:n}=q();return(a,o)=>{var r,l,v,f,$;return s(),u("div",et,[d("p",tt,M(((r=i(t).notFound)==null?void 0:r.code)??"404"),1),d("h1",nt,M(((l=i(t).notFound)==null?void 0:l.title)??"PAGE NOT FOUND"),1),o[0]||(o[0]=d("div",{class:"divider"},null,-1)),d("blockquote",at,M(((v=i(t).notFound)==null?void 0:v.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),d("div",ot,[d("a",{class:"link",href:i(de)(i(n).link),"aria-label":((f=i(t).notFound)==null?void 0:f.linkLabel)??"go to home"},M((($=i(t).notFound)==null?void 0:$.linkText)??"Take me home"),9,st)])])}}}),rt=g(it,[["__scopeId","data-v-bf11c44c"]]);function Ne(e,t){if(Array.isArray(e))return R(e);if(e==null)return[];t=re(t);const n=Object.keys(e).sort((o,r)=>r.split("/").length-o.split("/").length).find(o=>t.startsWith(re(o))),a=n?e[n]:[];return Array.isArray(a)?R(a):R(a.items,a.base)}function lt(e){const t=[];let n=0;for(const a in e){const o=e[a];if(o.items){n=t.push(o);continue}t[n]||t.push({items:[]}),t[n].items.push(o)}return t}function ct(e){const t=[];function n(a){for(const o of a)o.text&&o.link&&t.push({text:o.text,link:o.link,docFooterText:o.docFooterText}),o.items&&n(o.items)}return n(e),t}function le(e,t){return Array.isArray(t)?t.some(n=>le(e,n)):z(e,t.link)?!0:t.items?le(e,t.items):!1}function R(e,t){return[...e].map(n=>{const a={...n},o=a.base||t;return o&&a.link&&(a.link=o+a.link),a.items&&(a.items=R(a.items,o)),a})}function D(){const{frontmatter:e,page:t,theme:n}=L(),a=se("(min-width: 960px)"),o=S(!1),r=y(()=>{const w=n.value.sidebar,C=t.value.relativePath;return w?Ne(w,C):[]}),l=S(r.value);F(r,(w,C)=>{JSON.stringify(w)!==JSON.stringify(C)&&(l.value=r.value)});const v=y(()=>e.value.sidebar!==!1&&l.value.length>0&&e.value.layout!=="home"),f=y(()=>$?e.value.aside==null?n.value.aside==="left":e.value.aside==="left":!1),$=y(()=>e.value.layout==="home"?!1:e.value.aside!=null?!!e.value.aside:n.value.aside!==!1),V=y(()=>v.value&&a.value),_=y(()=>v.value?lt(l.value):[]);function P(){o.value=!0}function T(){o.value=!1}function I(){o.value?T():P()}return{isOpen:o,sidebar:l,sidebarGroups:_,hasSidebar:v,hasAside:$,leftAside:f,isSidebarEnabled:V,open:P,close:T,toggle:I}}function ut(e,t){let n;X(()=>{n=e.value?document.activeElement:void 0}),U(()=>{window.addEventListener("keyup",a)}),ve(()=>{window.removeEventListener("keyup",a)});function a(o){o.key==="Escape"&&e.value&&(t(),n==null||n.focus())}}function dt(e){const{page:t,hash:n}=L(),a=S(!1),o=y(()=>e.value.collapsed!=null),r=y(()=>!!e.value.link),l=S(!1),v=()=>{l.value=z(t.value.relativePath,e.value.link)};F([t,e,n],v),U(v);const f=y(()=>l.value?!0:e.value.items?le(t.value.relativePath,e.value.items):!1),$=y(()=>!!(e.value.items&&e.value.items.length));X(()=>{a.value=!!(o.value&&e.value.collapsed)}),fe(()=>{(l.value||f.value)&&(a.value=!1)});function V(){o.value&&(a.value=!a.value)}return{collapsed:a,collapsible:o,isLink:r,isActiveLink:l,hasActiveLink:f,hasChildren:$,toggle:V}}function vt(){const{hasSidebar:e}=D(),t=se("(min-width: 960px)"),n=se("(min-width: 1280px)");return{isAsideEnabled:y(()=>!n.value&&!t.value?!1:e.value?n.value:t.value)}}const ft=/\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\b/,ce=[];function Me(e){return typeof e.outline=="object"&&!Array.isArray(e.outline)&&e.outline.label||e.outlineTitle||"On this page"}function me(e){const t=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(n=>n.id&&n.hasChildNodes()).map(n=>{const a=Number(n.tagName[1]);return{element:n,title:ht(n),link:"#"+n.id,level:a}});return mt(t,e)}function ht(e){let t="";for(const n of e.childNodes)if(n.nodeType===1){if(ft.test(n.className))continue;t+=n.textContent}else n.nodeType===3&&(t+=n.textContent);return t.trim()}function mt(e,t){if(t===!1)return[];const n=(typeof t=="object"&&!Array.isArray(t)?t.level:t)||2,[a,o]=typeof n=="number"?[n,n]:n==="deep"?[2,6]:n;return bt(e,a,o)}function pt(e,t){const{isAsideEnabled:n}=vt(),a=Qe(r,100);let o=null;U(()=>{requestAnimationFrame(r),window.addEventListener("scroll",a)}),Ee(()=>{l(location.hash)}),ve(()=>{window.removeEventListener("scroll",a)});function r(){if(!n.value)return;const v=window.scrollY,f=window.innerHeight,$=document.body.offsetHeight,V=Math.abs(v+f-$)<1,_=ce.map(({element:T,link:I})=>({link:I,top:kt(T)})).filter(({top:T})=>!Number.isNaN(T)).sort((T,I)=>T.top-I.top);if(!_.length){l(null);return}if(v<1){l(null);return}if(V){l(_[_.length-1].link);return}let P=null;for(const{link:T,top:I}of _){if(I>v+Fe()+4)break;P=T}l(P)}function l(v){o&&o.classList.remove("active"),v==null?o=null:o=e.value.querySelector(`a[href="${decodeURIComponent(v)}"]`);const f=o;f?(f.classList.add("active"),t.value.style.top=f.offsetTop+39+"px",t.value.style.opacity="1"):(t.value.style.top="33px",t.value.style.opacity="0")}}function kt(e){let t=0;for(;e!==document.body;){if(e===null)return NaN;t+=e.offsetTop,e=e.offsetParent}return t}function bt(e,t,n){ce.length=0;const a=[],o=[];return e.forEach(r=>{const l={...r,children:[]};let v=o[o.length-1];for(;v&&v.level>=l.level;)o.pop(),v=o[o.length-1];if(l.element.classList.contains("ignore-header")||v&&"shouldIgnore"in v){o.push({level:l.level,shouldIgnore:!0});return}l.level>n||l.level<t||(ce.push({element:l.element,link:l.link}),v?v.children.push(l):a.push(l),o.push(l))}),a}const _t=["href","title"],gt=p({__name:"VPDocOutlineItem",props:{headers:{},root:{type:Boolean}},setup(e){function t({target:n}){const a=n.href.split("#")[1],o=document.getElementById(decodeURIComponent(a));o==null||o.focus({preventScroll:!0})}return(n,a)=>{const o=W("VPDocOutlineItem",!0);return s(),u("ul",{class:N(["VPDocOutlineItem",e.root?"root":"nested"])},[(s(!0),u(x,null,A(e.headers,({children:r,link:l,title:v})=>(s(),u("li",null,[d("a",{class:"outline-link",href:l,onClick:t,title:v},M(v),9,_t),r!=null&&r.length?(s(),b(o,{key:0,headers:r},null,8,["headers"])):m("",!0)]))),256))],2)}}}),xe=g(gt,[["__scopeId","data-v-ae03bd52"]]),$t={class:"content"},yt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Pt=p({__name:"VPDocAsideOutline",setup(e){const{frontmatter:t,theme:n}=L(),a=$e([]);Y(()=>{a.value=me(t.value.outline??n.value.outline)});const o=S(),r=S();return pt(o,r),(l,v)=>(s(),u("nav",{"aria-labelledby":"doc-outline-aria-label",class:N(["VPDocAsideOutline",{"has-outline":a.value.length>0}]),ref_key:"container",ref:o},[d("div",$t,[d("div",{class:"outline-marker",ref_key:"marker",ref:r},null,512),d("div",yt,M(i(Me)(i(n))),1),k(xe,{headers:a.value,root:!0},null,8,["headers"])])],2))}}),Lt=g(Pt,[["__scopeId","data-v-b0b42374"]]),Vt={class:"VPDocAsideCarbonAds"},St=p({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(e){const t=()=>null;return(n,a)=>(s(),u("div",Vt,[k(i(t),{"carbon-ads":e.carbonAds},null,8,["carbon-ads"])]))}}),Tt={class:"VPDocAside"},Nt=p({__name:"VPDocAside",setup(e){const{theme:t}=L();return(n,a)=>(s(),u("div",Tt,[c(n.$slots,"aside-top",{},void 0,!0),c(n.$slots,"aside-outline-before",{},void 0,!0),k(Lt),c(n.$slots,"aside-outline-after",{},void 0,!0),a[0]||(a[0]=d("div",{class:"spacer"},null,-1)),c(n.$slots,"aside-ads-before",{},void 0,!0),i(t).carbonAds?(s(),b(St,{key:0,"carbon-ads":i(t).carbonAds},null,8,["carbon-ads"])):m("",!0),c(n.$slots,"aside-ads-after",{},void 0,!0),c(n.$slots,"aside-bottom",{},void 0,!0)]))}}),Mt=g(Nt,[["__scopeId","data-v-e448ecab"]]);function xt(){const{theme:e,page:t}=L();return y(()=>{const{text:n="Edit this page",pattern:a=""}=e.value.editLink||{};let o;return typeof a=="function"?o=a(t.value):o=a.replace(/:path/g,t.value.filePath),{url:o,text:n}})}function It(){const{page:e,theme:t,frontmatter:n}=L();return y(()=>{var $,V,_,P,T,I,w,C;const a=Ne(t.value.sidebar,e.value.relativePath),o=ct(a),r=wt(o,H=>H.link.replace(/[?#].*$/,"")),l=r.findIndex(H=>z(e.value.relativePath,H.link)),v=(($=t.value.docFooter)==null?void 0:$.prev)===!1&&!n.value.prev||n.value.prev===!1,f=((V=t.value.docFooter)==null?void 0:V.next)===!1&&!n.value.next||n.value.next===!1;return{prev:v?void 0:{text:(typeof n.value.prev=="string"?n.value.prev:typeof n.value.prev=="object"?n.value.prev.text:void 0)??((_=r[l-1])==null?void 0:_.docFooterText)??((P=r[l-1])==null?void 0:P.text),link:(typeof n.value.prev=="object"?n.value.prev.link:void 0)??((T=r[l-1])==null?void 0:T.link)},next:f?void 0:{text:(typeof n.value.next=="string"?n.value.next:typeof n.value.next=="object"?n.value.next.text:void 0)??((I=r[l+1])==null?void 0:I.docFooterText)??((w=r[l+1])==null?void 0:w.text),link:(typeof n.value.next=="object"?n.value.next.link:void 0)??((C=r[l+1])==null?void 0:C.link)}}})}function wt(e,t){const n=new Set;return e.filter(a=>{const o=t(a);return n.has(o)?!1:n.add(o)})}const E=p({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(e){const t=e,n=y(()=>t.tag??(t.href?"a":"span")),a=y(()=>t.href&&ye.test(t.href)||t.target==="_blank");return(o,r)=>(s(),b(B(n.value),{class:N(["VPLink",{link:e.href,"vp-external-link-icon":a.value,"no-icon":e.noIcon}]),href:e.href?i(he)(e.href):void 0,target:e.target??(a.value?"_blank":void 0),rel:e.rel??(a.value?"noreferrer":void 0)},{default:h(()=>[c(o.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),At={class:"VPLastUpdated"},Ct=["datetime"],Ht=p({__name:"VPDocFooterLastUpdated",setup(e){const{theme:t,page:n,lang:a}=L(),o=y(()=>new Date(n.value.lastUpdated)),r=y(()=>o.value.toISOString()),l=S("");return U(()=>{X(()=>{var v,f,$;l.value=new Intl.DateTimeFormat((f=(v=t.value.lastUpdated)==null?void 0:v.formatOptions)!=null&&f.forceLocale?a.value:void 0,(($=t.value.lastUpdated)==null?void 0:$.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(o.value)})}),(v,f)=>{var $;return s(),u("p",At,[j(M((($=i(t).lastUpdated)==null?void 0:$.text)||i(t).lastUpdatedText||"Last updated")+": ",1),d("time",{datetime:r.value},M(l.value),9,Ct)])}}}),Bt=g(Ht,[["__scopeId","data-v-e0ed8ba5"]]),Et={key:0,class:"VPDocFooter"},Ft={key:0,class:"edit-info"},Dt={key:0,class:"edit-link"},Ot={key:1,class:"last-updated"},Gt={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},Ut={class:"pager"},jt=["innerHTML"],zt=["innerHTML"],Wt={class:"pager"},Kt=["innerHTML"],qt=["innerHTML"],Rt=p({__name:"VPDocFooter",setup(e){const{theme:t,page:n,frontmatter:a}=L(),o=xt(),r=It(),l=y(()=>t.value.editLink&&a.value.editLink!==!1),v=y(()=>n.value.lastUpdated),f=y(()=>l.value||v.value||r.value.prev||r.value.next);return($,V)=>{var _,P,T,I;return f.value?(s(),u("footer",Et,[c($.$slots,"doc-footer-before",{},void 0,!0),l.value||v.value?(s(),u("div",Ft,[l.value?(s(),u("div",Dt,[k(E,{class:"edit-link-button",href:i(o).url,"no-icon":!0},{default:h(()=>[V[0]||(V[0]=d("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),j(" "+M(i(o).text),1)]),_:1},8,["href"])])):m("",!0),v.value?(s(),u("div",Ot,[k(Bt)])):m("",!0)])):m("",!0),(_=i(r).prev)!=null&&_.link||(P=i(r).next)!=null&&P.link?(s(),u("nav",Gt,[V[1]||(V[1]=d("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),d("div",Ut,[(T=i(r).prev)!=null&&T.link?(s(),b(E,{key:0,class:"pager-link prev",href:i(r).prev.link},{default:h(()=>{var w;return[d("span",{class:"desc",innerHTML:((w=i(t).docFooter)==null?void 0:w.prev)||"Previous page"},null,8,jt),d("span",{class:"title",innerHTML:i(r).prev.text},null,8,zt)]}),_:1},8,["href"])):m("",!0)]),d("div",Wt,[(I=i(r).next)!=null&&I.link?(s(),b(E,{key:0,class:"pager-link next",href:i(r).next.link},{default:h(()=>{var w;return[d("span",{class:"desc",innerHTML:((w=i(t).docFooter)==null?void 0:w.next)||"Next page"},null,8,Kt),d("span",{class:"title",innerHTML:i(r).next.text},null,8,qt)]}),_:1},8,["href"])):m("",!0)])])):m("",!0)])):m("",!0)}}}),Jt=g(Rt,[["__scopeId","data-v-3958cc3f"]]),Xt={class:"container"},Yt={class:"aside-container"},Qt={class:"aside-content"},Zt={class:"content"},en={class:"content-container"},tn={class:"main"},nn=p({__name:"VPDoc",setup(e){const{theme:t}=L(),n=Q(),{hasSidebar:a,hasAside:o,leftAside:r}=D(),l=y(()=>n.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(v,f)=>{const $=W("Content");return s(),u("div",{class:N(["VPDoc",{"has-sidebar":i(a),"has-aside":i(o)}])},[c(v.$slots,"doc-top",{},void 0,!0),d("div",Xt,[i(o)?(s(),u("div",{key:0,class:N(["aside",{"left-aside":i(r)}])},[f[0]||(f[0]=d("div",{class:"aside-curtain"},null,-1)),d("div",Yt,[d("div",Qt,[k(Mt,null,{"aside-top":h(()=>[c(v.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":h(()=>[c(v.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":h(()=>[c(v.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":h(()=>[c(v.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":h(()=>[c(v.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":h(()=>[c(v.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):m("",!0),d("div",Zt,[d("div",en,[c(v.$slots,"doc-before",{},void 0,!0),d("main",tn,[k($,{class:N(["vp-doc",[l.value,i(t).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),k(Jt,null,{"doc-footer-before":h(()=>[c(v.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),c(v.$slots,"doc-after",{},void 0,!0)])])]),c(v.$slots,"doc-bottom",{},void 0,!0)],2)}}}),an=g(nn,[["__scopeId","data-v-53b9fda6"]]),on=p({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(e){const t=e,n=y(()=>t.href&&ye.test(t.href)),a=y(()=>t.tag||(t.href?"a":"button"));return(o,r)=>(s(),b(B(a.value),{class:N(["VPButton",[e.size,e.theme]]),href:e.href?i(he)(e.href):void 0,target:t.target??(n.value?"_blank":void 0),rel:t.rel??(n.value?"noreferrer":void 0)},{default:h(()=>[j(M(e.text),1)]),_:1},8,["class","href","target","rel"]))}}),sn=g(on,[["__scopeId","data-v-930153c7"]]),rn=["src","alt"],ln=p({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(e){return(t,n)=>{const a=W("VPImage",!0);return e.image?(s(),u(x,{key:0},[typeof e.image=="string"||"src"in e.image?(s(),u("img",G({key:0,class:"VPImage"},typeof e.image=="string"?t.$attrs:{...e.image,...t.$attrs},{src:i(de)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,rn)):(s(),u(x,{key:1},[k(a,G({class:"dark",image:e.image.dark,alt:e.image.alt},t.$attrs),null,16,["image","alt"]),k(a,G({class:"light",image:e.image.light,alt:e.image.alt},t.$attrs),null,16,["image","alt"])],64))],64)):m("",!0)}}}),J=g(ln,[["__scopeId","data-v-449ed1b1"]]),cn={class:"container"},un={class:"main"},dn={class:"heading"},vn=["innerHTML"],fn=["innerHTML"],hn=["innerHTML"],mn={key:0,class:"actions"},pn={key:0,class:"image"},kn={class:"image-container"},bn=p({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(e){const t=Z("hero-image-slot-exists");return(n,a)=>(s(),u("div",{class:N(["VPHero",{"has-image":e.image||i(t)}])},[d("div",cn,[d("div",un,[c(n.$slots,"home-hero-info-before",{},void 0,!0),c(n.$slots,"home-hero-info",{},()=>[d("h1",dn,[e.name?(s(),u("span",{key:0,innerHTML:e.name,class:"name clip"},null,8,vn)):m("",!0),e.text?(s(),u("span",{key:1,innerHTML:e.text,class:"text"},null,8,fn)):m("",!0)]),e.tagline?(s(),u("p",{key:0,innerHTML:e.tagline,class:"tagline"},null,8,hn)):m("",!0)],!0),c(n.$slots,"home-hero-info-after",{},void 0,!0),e.actions?(s(),u("div",mn,[(s(!0),u(x,null,A(e.actions,o=>(s(),u("div",{key:o.link,class:"action"},[k(sn,{tag:"a",size:"medium",theme:o.theme,text:o.text,href:o.link,target:o.target,rel:o.rel},null,8,["theme","text","href","target","rel"])]))),128))])):m("",!0),c(n.$slots,"home-hero-actions-after",{},void 0,!0)]),e.image||i(t)?(s(),u("div",pn,[d("div",kn,[a[0]||(a[0]=d("div",{class:"image-bg"},null,-1)),c(n.$slots,"home-hero-image",{},()=>[e.image?(s(),b(J,{key:0,class:"image-src",image:e.image},null,8,["image"])):m("",!0)],!0)])])):m("",!0)])],2))}}),_n=g(bn,[["__scopeId","data-v-425386f6"]]),gn=p({__name:"VPHomeHero",setup(e){const{frontmatter:t}=L();return(n,a)=>i(t).hero?(s(),b(_n,{key:0,class:"VPHomeHero",name:i(t).hero.name,text:i(t).hero.text,tagline:i(t).hero.tagline,image:i(t).hero.image,actions:i(t).hero.actions},{"home-hero-info-before":h(()=>[c(n.$slots,"home-hero-info-before")]),"home-hero-info":h(()=>[c(n.$slots,"home-hero-info")]),"home-hero-info-after":h(()=>[c(n.$slots,"home-hero-info-after")]),"home-hero-actions-after":h(()=>[c(n.$slots,"home-hero-actions-after")]),"home-hero-image":h(()=>[c(n.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):m("",!0)}}),$n={class:"box"},yn={key:0,class:"icon"},Pn=["innerHTML"],Ln=["innerHTML"],Vn=["innerHTML"],Sn={key:4,class:"link-text"},Tn={class:"link-text-value"},Nn=p({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(e){return(t,n)=>(s(),b(E,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:h(()=>[d("article",$n,[typeof e.icon=="object"&&e.icon.wrap?(s(),u("div",yn,[k(J,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(s(),b(J,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(s(),u("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Pn)):m("",!0),d("h2",{class:"title",innerHTML:e.title},null,8,Ln),e.details?(s(),u("p",{key:3,class:"details",innerHTML:e.details},null,8,Vn)):m("",!0),e.linkText?(s(),u("div",Sn,[d("p",Tn,[j(M(e.linkText)+" ",1),n[0]||(n[0]=d("span",{class:"vpi-arrow-right link-text-icon"},null,-1))])])):m("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),Mn=g(Nn,[["__scopeId","data-v-3126523b"]]),xn={key:0,class:"VPFeatures"},In={class:"container"},wn={class:"items"},An=p({__name:"VPFeatures",props:{features:{}},setup(e){const t=e,n=y(()=>{const a=t.features.length;if(a){if(a===2)return"grid-2";if(a===3)return"grid-3";if(a%3===0)return"grid-6";if(a>3)return"grid-4"}else return});return(a,o)=>e.features?(s(),u("div",xn,[d("div",In,[d("div",wn,[(s(!0),u(x,null,A(e.features,r=>(s(),u("div",{key:r.title,class:N(["item",[n.value]])},[k(Mn,{icon:r.icon,title:r.title,details:r.details,link:r.link,"link-text":r.linkText,rel:r.rel,target:r.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):m("",!0)}}),Cn=g(An,[["__scopeId","data-v-841ae22f"]]),Hn=p({__name:"VPHomeFeatures",setup(e){const{frontmatter:t}=L();return(n,a)=>i(t).features?(s(),b(Cn,{key:0,class:"VPHomeFeatures",features:i(t).features},null,8,["features"])):m("",!0)}}),Bn=p({__name:"VPHomeContent",setup(e){const{width:t}=De({initialWidth:0,includeScrollbar:!1});return(n,a)=>(s(),u("div",{class:"vp-doc container",style:Pe(i(t)?{"--vp-offset":`calc(50% - ${i(t)/2}px)`}:{})},[c(n.$slots,"default",{},void 0,!0)],4))}}),En=g(Bn,[["__scopeId","data-v-e10e68d0"]]),Fn=p({__name:"VPHome",setup(e){const{frontmatter:t,theme:n}=L();return(a,o)=>{const r=W("Content");return s(),u("div",{class:N(["VPHome",{"external-link-icon-enabled":i(n).externalLinkIcon}])},[c(a.$slots,"home-hero-before",{},void 0,!0),k(gn,null,{"home-hero-info-before":h(()=>[c(a.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":h(()=>[c(a.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":h(()=>[c(a.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":h(()=>[c(a.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":h(()=>[c(a.$slots,"home-hero-image",{},void 0,!0)]),_:3}),c(a.$slots,"home-hero-after",{},void 0,!0),c(a.$slots,"home-features-before",{},void 0,!0),k(Hn),c(a.$slots,"home-features-after",{},void 0,!0),i(t).markdownStyles!==!1?(s(),b(En,{key:0},{default:h(()=>[k(r)]),_:1})):(s(),b(r,{key:1}))],2)}}}),Dn=g(Fn,[["__scopeId","data-v-5d3e64bb"]]),On={},Gn={class:"VPPage"};function Un(e,t){const n=W("Content");return s(),u("div",Gn,[c(e.$slots,"page-top"),k(n),c(e.$slots,"page-bottom")])}const jn=g(On,[["render",Un]]),zn=p({__name:"VPContent",setup(e){const{page:t,frontmatter:n}=L(),{hasSidebar:a}=D();return(o,r)=>(s(),u("div",{class:N(["VPContent",{"has-sidebar":i(a),"is-home":i(n).layout==="home"}]),id:"VPContent"},[i(t).isNotFound?c(o.$slots,"not-found",{key:0},()=>[k(rt)],!0):i(n).layout==="page"?(s(),b(jn,{key:1},{"page-top":h(()=>[c(o.$slots,"page-top",{},void 0,!0)]),"page-bottom":h(()=>[c(o.$slots,"page-bottom",{},void 0,!0)]),_:3})):i(n).layout==="home"?(s(),b(Dn,{key:2},{"home-hero-before":h(()=>[c(o.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":h(()=>[c(o.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":h(()=>[c(o.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":h(()=>[c(o.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":h(()=>[c(o.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":h(()=>[c(o.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":h(()=>[c(o.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":h(()=>[c(o.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":h(()=>[c(o.$slots,"home-features-after",{},void 0,!0)]),_:3})):i(n).layout&&i(n).layout!=="doc"?(s(),b(B(i(n).layout),{key:3})):(s(),b(an,{key:4},{"doc-top":h(()=>[c(o.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":h(()=>[c(o.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":h(()=>[c(o.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":h(()=>[c(o.$slots,"doc-before",{},void 0,!0)]),"doc-after":h(()=>[c(o.$slots,"doc-after",{},void 0,!0)]),"aside-top":h(()=>[c(o.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":h(()=>[c(o.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":h(()=>[c(o.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":h(()=>[c(o.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":h(()=>[c(o.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":h(()=>[c(o.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),Wn=g(zn,[["__scopeId","data-v-8eedf2ac"]]),Kn={class:"container"},qn=["innerHTML"],Rn=["innerHTML"],Jn=p({__name:"VPFooter",setup(e){const{theme:t,frontmatter:n}=L(),{hasSidebar:a}=D();return(o,r)=>i(t).footer&&i(n).footer!==!1?(s(),u("footer",{key:0,class:N(["VPFooter",{"has-sidebar":i(a)}])},[d("div",Kn,[i(t).footer.message?(s(),u("p",{key:0,class:"message",innerHTML:i(t).footer.message},null,8,qn)):m("",!0),i(t).footer.copyright?(s(),u("p",{key:1,class:"copyright",innerHTML:i(t).footer.copyright},null,8,Rn)):m("",!0)])],2)):m("",!0)}}),Xn=g(Jn,[["__scopeId","data-v-436fbec4"]]);function Yn(){const{theme:e,frontmatter:t}=L(),n=$e([]),a=y(()=>n.value.length>0);return Y(()=>{n.value=me(t.value.outline??e.value.outline)}),{headers:n,hasLocalNav:a}}const Qn={class:"menu-text"},Zn={class:"header"},ea={class:"outline"},ta=p({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(e){const t=e,{theme:n}=L(),a=S(!1),o=S(0),r=S(),l=S();function v(_){var P;(P=r.value)!=null&&P.contains(_.target)||(a.value=!1)}F(a,_=>{if(_){document.addEventListener("click",v);return}document.removeEventListener("click",v)}),ie("Escape",()=>{a.value=!1}),Y(()=>{a.value=!1});function f(){a.value=!a.value,o.value=window.innerHeight+Math.min(window.scrollY-t.navHeight,0)}function $(_){_.target.classList.contains("outline-link")&&(l.value&&(l.value.style.transition="none"),Le(()=>{a.value=!1}))}function V(){a.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(_,P)=>(s(),u("div",{class:"VPLocalNavOutlineDropdown",style:Pe({"--vp-vh":o.value+"px"}),ref_key:"main",ref:r},[e.headers.length>0?(s(),u("button",{key:0,onClick:f,class:N({open:a.value})},[d("span",Qn,M(i(Me)(i(n))),1),P[0]||(P[0]=d("span",{class:"vpi-chevron-right icon"},null,-1))],2)):(s(),u("button",{key:1,onClick:V},M(i(n).returnToTopLabel||"Return to top"),1)),k(ue,{name:"flyout"},{default:h(()=>[a.value?(s(),u("div",{key:0,ref_key:"items",ref:l,class:"items",onClick:$},[d("div",Zn,[d("a",{class:"top-link",href:"#",onClick:V},M(i(n).returnToTopLabel||"Return to top"),1)]),d("div",ea,[k(xe,{headers:e.headers},null,8,["headers"])])],512)):m("",!0)]),_:1})],4))}}),na=g(ta,[["__scopeId","data-v-01af9e73"]]),aa={class:"container"},oa=["aria-expanded"],sa={class:"menu-text"},ia=p({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(e){const{theme:t,frontmatter:n}=L(),{hasSidebar:a}=D(),{headers:o}=Yn(),{y:r}=Ve(),l=S(0);U(()=>{l.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),Y(()=>{o.value=me(n.value.outline??t.value.outline)});const v=y(()=>o.value.length===0),f=y(()=>v.value&&!a.value),$=y(()=>({VPLocalNav:!0,"has-sidebar":a.value,empty:v.value,fixed:f.value}));return(V,_)=>i(n).layout!=="home"&&(!f.value||i(r)>=l.value)?(s(),u("div",{key:0,class:N($.value)},[d("div",aa,[i(a)?(s(),u("button",{key:0,class:"menu","aria-expanded":e.open,"aria-controls":"VPSidebarNav",onClick:_[0]||(_[0]=P=>V.$emit("open-menu"))},[_[1]||(_[1]=d("span",{class:"vpi-align-left menu-icon"},null,-1)),d("span",sa,M(i(t).sidebarMenuLabel||"Menu"),1)],8,oa)):m("",!0),k(na,{headers:i(o),navHeight:l.value},null,8,["headers","navHeight"])])],2)):m("",!0)}}),ra=g(ia,[["__scopeId","data-v-826b8761"]]);function la(){const e=S(!1);function t(){e.value=!0,window.addEventListener("resize",o)}function n(){e.value=!1,window.removeEventListener("resize",o)}function a(){e.value?n():t()}function o(){window.outerWidth>=768&&n()}const r=Q();return F(()=>r.path,n),{isScreenOpen:e,openScreen:t,closeScreen:n,toggleScreen:a}}const ca={},ua={class:"VPSwitch",type:"button",role:"switch"},da={class:"check"},va={key:0,class:"icon"};function fa(e,t){return s(),u("button",ua,[d("span",da,[e.$slots.default?(s(),u("span",va,[c(e.$slots,"default",{},void 0,!0)])):m("",!0)])])}const ha=g(ca,[["render",fa],["__scopeId","data-v-2562b538"]]),ma=p({__name:"VPSwitchAppearance",setup(e){const{isDark:t,theme:n}=L(),a=Z("toggle-appearance",()=>{t.value=!t.value}),o=S("");return fe(()=>{o.value=t.value?n.value.lightModeSwitchTitle||"Switch to light theme":n.value.darkModeSwitchTitle||"Switch to dark theme"}),(r,l)=>(s(),b(ha,{title:o.value,class:"VPSwitchAppearance","aria-checked":i(t),onClick:i(a)},{default:h(()=>[...l[0]||(l[0]=[d("span",{class:"vpi-sun sun"},null,-1),d("span",{class:"vpi-moon moon"},null,-1)])]),_:1},8,["title","aria-checked","onClick"]))}}),pe=g(ma,[["__scopeId","data-v-182deabf"]]),pa={key:0,class:"VPNavBarAppearance"},ka=p({__name:"VPNavBarAppearance",setup(e){const{site:t}=L();return(n,a)=>i(t).appearance&&i(t).appearance!=="force-dark"&&i(t).appearance!=="force-auto"?(s(),u("div",pa,[k(pe)])):m("",!0)}}),ba=g(ka,[["__scopeId","data-v-2b2b395e"]]),ke=S();let Ie=!1,oe=0;function _a(e){const t=S(!1);if(ee){!Ie&&ga(),oe++;const n=F(ke,a=>{var o,r,l;a===e.el.value||(o=e.el.value)!=null&&o.contains(a)?(t.value=!0,(r=e.onFocus)==null||r.call(e)):(t.value=!1,(l=e.onBlur)==null||l.call(e))});ve(()=>{n(),oe--,oe||$a()})}return Oe(t)}function ga(){document.addEventListener("focusin",we),Ie=!0,ke.value=document.activeElement}function $a(){document.removeEventListener("focusin",we)}function we(){ke.value=document.activeElement}const ya={class:"VPMenuLink"},Pa=["innerHTML"],La=p({__name:"VPMenuLink",props:{item:{}},setup(e){const{page:t}=L();return(n,a)=>(s(),u("div",ya,[k(E,{class:N({active:i(z)(i(t).relativePath,e.item.activeMatch||e.item.link,!!e.item.activeMatch)}),href:e.item.link,target:e.item.target,rel:e.item.rel,"no-icon":e.item.noIcon},{default:h(()=>[d("span",{innerHTML:e.item.text},null,8,Pa)]),_:1},8,["class","href","target","rel","no-icon"])]))}}),te=g(La,[["__scopeId","data-v-bddbf5cb"]]),Va={class:"VPMenuGroup"},Sa={key:0,class:"title"},Ta=p({__name:"VPMenuGroup",props:{text:{},items:{}},setup(e){return(t,n)=>(s(),u("div",Va,[e.text?(s(),u("p",Sa,M(e.text),1)):m("",!0),(s(!0),u(x,null,A(e.items,a=>(s(),u(x,null,["link"in a?(s(),b(te,{key:0,item:a},null,8,["item"])):m("",!0)],64))),256))]))}}),Na=g(Ta,[["__scopeId","data-v-cb831453"]]),Ma={class:"VPMenu"},xa={key:0,class:"items"},Ia=p({__name:"VPMenu",props:{items:{}},setup(e){return(t,n)=>(s(),u("div",Ma,[e.items?(s(),u("div",xa,[(s(!0),u(x,null,A(e.items,a=>(s(),u(x,{key:JSON.stringify(a)},["link"in a?(s(),b(te,{key:0,item:a},null,8,["item"])):"component"in a?(s(),b(B(a.component),G({key:1,ref_for:!0},a.props),null,16)):(s(),b(Na,{key:2,text:a.text,items:a.items},null,8,["text","items"]))],64))),128))])):m("",!0),c(t.$slots,"default",{},void 0,!0)]))}}),wa=g(Ia,[["__scopeId","data-v-759c9e19"]]),Aa=["aria-expanded","aria-label"],Ca={key:0,class:"text"},Ha=["innerHTML"],Ba={key:1,class:"vpi-more-horizontal icon"},Ea={class:"menu"},Fa=p({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(e){const t=S(!1),n=S();_a({el:n,onBlur:a});function a(){t.value=!1}return(o,r)=>(s(),u("div",{class:"VPFlyout",ref_key:"el",ref:n,onMouseenter:r[1]||(r[1]=l=>t.value=!0),onMouseleave:r[2]||(r[2]=l=>t.value=!1)},[d("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":t.value,"aria-label":e.label,onClick:r[0]||(r[0]=l=>t.value=!t.value)},[e.button||e.icon?(s(),u("span",Ca,[e.icon?(s(),u("span",{key:0,class:N([e.icon,"option-icon"])},null,2)):m("",!0),e.button?(s(),u("span",{key:1,innerHTML:e.button},null,8,Ha)):m("",!0),r[3]||(r[3]=d("span",{class:"vpi-chevron-down text-icon"},null,-1))])):(s(),u("span",Ba))],8,Aa),d("div",Ea,[k(wa,{items:e.items},{default:h(()=>[c(o.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),be=g(Fa,[["__scopeId","data-v-82133de6"]]),Da=["href","aria-label","innerHTML"],Oa=p({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(e){const t=e,n=S();U(async()=>{var r;await Le();const o=(r=n.value)==null?void 0:r.children[0];o instanceof HTMLElement&&o.className.startsWith("vpi-social-")&&(getComputedStyle(o).maskImage||getComputedStyle(o).webkitMaskImage)==="none"&&o.style.setProperty("--icon",`url('https://api.iconify.design/simple-icons/${t.icon}.svg')`)});const a=y(()=>typeof t.icon=="object"?t.icon.svg:`<span class="vpi-social-${t.icon}"></span>`);return(o,r)=>(s(),u("a",{ref_key:"el",ref:n,class:"VPSocialLink no-icon",href:e.link,"aria-label":e.ariaLabel??(typeof e.icon=="string"?e.icon:""),target:"_blank",rel:"noopener",innerHTML:a.value},null,8,Da))}}),Ga=g(Oa,[["__scopeId","data-v-c6c13f02"]]),Ua={class:"VPSocialLinks"},ja=p({__name:"VPSocialLinks",props:{links:{}},setup(e){return(t,n)=>(s(),u("div",Ua,[(s(!0),u(x,null,A(e.links,({link:a,icon:o,ariaLabel:r})=>(s(),b(Ga,{key:a,icon:o,link:a,ariaLabel:r},null,8,["icon","link","ariaLabel"]))),128))]))}}),_e=g(ja,[["__scopeId","data-v-b3348b34"]]),za={key:0,class:"group translations"},Wa={class:"trans-title"},Ka={key:1,class:"group"},qa={class:"item appearance"},Ra={class:"label"},Ja={class:"appearance-action"},Xa={key:2,class:"group"},Ya={class:"item social-links"},Qa=p({__name:"VPNavBarExtra",setup(e){const{site:t,theme:n}=L(),{localeLinks:a,currentLang:o}=q({correspondingLink:!0}),r=y(()=>a.value.length&&o.value.label||t.value.appearance||n.value.socialLinks);return(l,v)=>r.value?(s(),b(be,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:h(()=>[i(a).length&&i(o).label?(s(),u("div",za,[d("p",Wa,M(i(o).label),1),(s(!0),u(x,null,A(i(a),f=>(s(),b(te,{key:f.link,item:f},null,8,["item"]))),128))])):m("",!0),i(t).appearance&&i(t).appearance!=="force-dark"&&i(t).appearance!=="force-auto"?(s(),u("div",Ka,[d("div",qa,[d("p",Ra,M(i(n).darkModeSwitchLabel||"Appearance"),1),d("div",Ja,[k(pe)])])])):m("",!0),i(n).socialLinks?(s(),u("div",Xa,[d("div",Ya,[k(_e,{class:"social-links-list",links:i(n).socialLinks},null,8,["links"])])])):m("",!0)]),_:1})):m("",!0)}}),Za=g(Qa,[["__scopeId","data-v-f3b584b7"]]),eo=["aria-expanded"],to=p({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>(s(),u("button",{type:"button",class:N(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:n[0]||(n[0]=a=>t.$emit("click"))},[...n[1]||(n[1]=[d("span",{class:"container"},[d("span",{class:"top"}),d("span",{class:"middle"}),d("span",{class:"bottom"})],-1)])],10,eo))}}),no=g(to,[["__scopeId","data-v-ab07e844"]]),ao=["innerHTML"],oo=p({__name:"VPNavBarMenuLink",props:{item:{}},setup(e){const{page:t}=L();return(n,a)=>(s(),b(E,{class:N({VPNavBarMenuLink:!0,active:i(z)(i(t).relativePath,e.item.activeMatch||e.item.link,!!e.item.activeMatch)}),href:e.item.link,target:e.item.target,rel:e.item.rel,"no-icon":e.item.noIcon,tabindex:"0"},{default:h(()=>[d("span",{innerHTML:e.item.text},null,8,ao)]),_:1},8,["class","href","target","rel","no-icon"]))}}),so=g(oo,[["__scopeId","data-v-65720067"]]),io=p({__name:"VPNavBarMenuGroup",props:{item:{}},setup(e){const t=e,{page:n}=L(),a=r=>"component"in r?!1:"link"in r?z(n.value.relativePath,r.link,!!t.item.activeMatch):r.items.some(a),o=y(()=>a(t.item));return(r,l)=>(s(),b(be,{class:N({VPNavBarMenuGroup:!0,active:i(z)(i(n).relativePath,e.item.activeMatch,!!e.item.activeMatch)||o.value}),button:e.item.text,items:e.item.items},null,8,["class","button","items"]))}}),ro={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},lo=p({__name:"VPNavBarMenu",setup(e){const{theme:t}=L();return(n,a)=>i(t).nav?(s(),u("nav",ro,[a[0]||(a[0]=d("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),(s(!0),u(x,null,A(i(t).nav,o=>(s(),u(x,{key:JSON.stringify(o)},["link"in o?(s(),b(so,{key:0,item:o},null,8,["item"])):"component"in o?(s(),b(B(o.component),G({key:1,ref_for:!0},o.props),null,16)):(s(),b(io,{key:2,item:o},null,8,["item"]))],64))),128))])):m("",!0)}}),co=g(lo,[["__scopeId","data-v-7ed6e5ac"]]);function uo(e){const{localeIndex:t,theme:n}=L();function a(o){var I,w,C;const r=o.split("."),l=(I=n.value.search)==null?void 0:I.options,v=l&&typeof l=="object",f=v&&((C=(w=l.locales)==null?void 0:w[t.value])==null?void 0:C.translations)||null,$=v&&l.translations||null;let V=f,_=$,P=e;const T=r.pop();for(const H of r){let O=null;const K=P==null?void 0:P[H];K&&(O=P=K);const ne=_==null?void 0:_[H];ne&&(O=_=ne);const ae=V==null?void 0:V[H];ae&&(O=V=ae),K||(P=O),ne||(_=O),ae||(V=O)}return(V==null?void 0:V[T])??(_==null?void 0:_[T])??(P==null?void 0:P[T])??""}return a}const vo=["aria-label"],fo={class:"DocSearch-Button-Container"},ho={class:"DocSearch-Button-Placeholder"},ge=p({__name:"VPNavBarSearchButton",setup(e){const n=uo({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(a,o)=>(s(),u("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":i(n)("button.buttonAriaLabel")},[d("span",fo,[o[0]||(o[0]=d("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1)),d("span",ho,M(i(n)("button.buttonText")),1)]),o[1]||(o[1]=d("span",{class:"DocSearch-Button-Keys"},[d("kbd",{class:"DocSearch-Button-Key"}),d("kbd",{class:"DocSearch-Button-Key"},"K")],-1))],8,vo))}}),mo={class:"VPNavBarSearch"},po={id:"local-search"},ko={key:1,id:"docsearch"},bo=p({__name:"VPNavBarSearch",setup(e){const t=Ge(()=>Ue(()=>import("./VPLocalSearchBox.BaLEdS15.js"),__vite__mapDeps([0,1]))),n=()=>null,{theme:a}=L(),o=S(!1),r=S(!1);U(()=>{});function l(){o.value||(o.value=!0,setTimeout(v,16))}function v(){const _=new Event("keydown");_.key="k",_.metaKey=!0,window.dispatchEvent(_),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||v()},16)}function f(_){const P=_.target,T=P.tagName;return P.isContentEditable||T==="INPUT"||T==="SELECT"||T==="TEXTAREA"}const $=S(!1);ie("k",_=>{(_.ctrlKey||_.metaKey)&&(_.preventDefault(),$.value=!0)}),ie("/",_=>{f(_)||(_.preventDefault(),$.value=!0)});const V="local";return(_,P)=>{var T;return s(),u("div",mo,[i(V)==="local"?(s(),u(x,{key:0},[$.value?(s(),b(i(t),{key:0,onClose:P[0]||(P[0]=I=>$.value=!1)})):m("",!0),d("div",po,[k(ge,{onClick:P[1]||(P[1]=I=>$.value=!0)})])],64)):i(V)==="algolia"?(s(),u(x,{key:1},[o.value?(s(),b(i(n),{key:0,algolia:((T=i(a).search)==null?void 0:T.options)??i(a).algolia,onVnodeBeforeMount:P[2]||(P[2]=I=>r.value=!0)},null,8,["algolia"])):m("",!0),r.value?m("",!0):(s(),u("div",ko,[k(ge,{onClick:l})]))],64)):m("",!0)])}}}),_o=p({__name:"VPNavBarSocialLinks",setup(e){const{theme:t}=L();return(n,a)=>i(t).socialLinks?(s(),b(_e,{key:0,class:"VPNavBarSocialLinks",links:i(t).socialLinks},null,8,["links"])):m("",!0)}}),go=g(_o,[["__scopeId","data-v-9709c1ad"]]),$o=["href","rel","target"],yo=["innerHTML"],Po={key:2},Lo=p({__name:"VPNavBarTitle",setup(e){const{site:t,theme:n}=L(),{hasSidebar:a}=D(),{currentLang:o}=q(),r=y(()=>{var f;return typeof n.value.logoLink=="string"?n.value.logoLink:(f=n.value.logoLink)==null?void 0:f.link}),l=y(()=>{var f;return typeof n.value.logoLink=="string"||(f=n.value.logoLink)==null?void 0:f.rel}),v=y(()=>{var f;return typeof n.value.logoLink=="string"||(f=n.value.logoLink)==null?void 0:f.target});return(f,$)=>(s(),u("div",{class:N(["VPNavBarTitle",{"has-sidebar":i(a)}])},[d("a",{class:"title",href:r.value??i(he)(i(o).link),rel:l.value,target:v.value},[c(f.$slots,"nav-bar-title-before",{},void 0,!0),i(n).logo?(s(),b(J,{key:0,class:"logo",image:i(n).logo},null,8,["image"])):m("",!0),i(n).siteTitle?(s(),u("span",{key:1,innerHTML:i(n).siteTitle},null,8,yo)):i(n).siteTitle===void 0?(s(),u("span",Po,M(i(t).title),1)):m("",!0),c(f.$slots,"nav-bar-title-after",{},void 0,!0)],8,$o)],2))}}),Vo=g(Lo,[["__scopeId","data-v-f9346b2b"]]),So={class:"items"},To={class:"title"},No=p({__name:"VPNavBarTranslations",setup(e){const{theme:t}=L(),{localeLinks:n,currentLang:a}=q({correspondingLink:!0});return(o,r)=>i(n).length&&i(a).label?(s(),b(be,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:i(t).langMenuLabel||"Change language"},{default:h(()=>[d("div",So,[d("p",To,M(i(a).label),1),(s(!0),u(x,null,A(i(n),l=>(s(),b(te,{key:l.link,item:l},null,8,["item"]))),128))])]),_:1},8,["label"])):m("",!0)}}),Mo=g(No,[["__scopeId","data-v-6e814971"]]),xo={class:"wrapper"},Io={class:"container"},wo={class:"title"},Ao={class:"content"},Co={class:"content-body"},Ho=p({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(e){const t=e,{y:n}=Ve(),{hasSidebar:a}=D(),{frontmatter:o}=L(),r=S({});return fe(()=>{r.value={"has-sidebar":a.value,home:o.value.layout==="home",top:n.value===0,"screen-open":t.isScreenOpen}}),(l,v)=>(s(),u("div",{class:N(["VPNavBar",r.value])},[d("div",xo,[d("div",Io,[d("div",wo,[k(Vo,null,{"nav-bar-title-before":h(()=>[c(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":h(()=>[c(l.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),d("div",Ao,[d("div",Co,[c(l.$slots,"nav-bar-content-before",{},void 0,!0),k(bo,{class:"search"}),k(co,{class:"menu"}),k(Mo,{class:"translations"}),k(ba,{class:"appearance"}),k(go,{class:"social-links"}),k(Za,{class:"extra"}),c(l.$slots,"nav-bar-content-after",{},void 0,!0),k(no,{class:"hamburger",active:e.isScreenOpen,onClick:v[0]||(v[0]=f=>l.$emit("toggle-screen"))},null,8,["active"])])])])]),v[1]||(v[1]=d("div",{class:"divider"},[d("div",{class:"divider-line"})],-1))],2))}}),Bo=g(Ho,[["__scopeId","data-v-dd8a1864"]]),Eo={key:0,class:"VPNavScreenAppearance"},Fo={class:"text"},Do=p({__name:"VPNavScreenAppearance",setup(e){const{site:t,theme:n}=L();return(a,o)=>i(t).appearance&&i(t).appearance!=="force-dark"&&i(t).appearance!=="force-auto"?(s(),u("div",Eo,[d("p",Fo,M(i(n).darkModeSwitchLabel||"Appearance"),1),k(pe)])):m("",!0)}}),Oo=g(Do,[["__scopeId","data-v-77a83054"]]),Go=["innerHTML"],Uo=p({__name:"VPNavScreenMenuLink",props:{item:{}},setup(e){const t=Z("close-screen");return(n,a)=>(s(),b(E,{class:"VPNavScreenMenuLink",href:e.item.link,target:e.item.target,rel:e.item.rel,"no-icon":e.item.noIcon,onClick:i(t)},{default:h(()=>[d("span",{innerHTML:e.item.text},null,8,Go)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),jo=g(Uo,[["__scopeId","data-v-270939ae"]]),zo=["innerHTML"],Wo=p({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(e){const t=Z("close-screen");return(n,a)=>(s(),b(E,{class:"VPNavScreenMenuGroupLink",href:e.item.link,target:e.item.target,rel:e.item.rel,"no-icon":e.item.noIcon,onClick:i(t)},{default:h(()=>[d("span",{innerHTML:e.item.text},null,8,zo)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),Ae=g(Wo,[["__scopeId","data-v-cc2372a2"]]),Ko={class:"VPNavScreenMenuGroupSection"},qo={key:0,class:"title"},Ro=p({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(e){return(t,n)=>(s(),u("div",Ko,[e.text?(s(),u("p",qo,M(e.text),1)):m("",!0),(s(!0),u(x,null,A(e.items,a=>(s(),b(Ae,{key:a.text,item:a},null,8,["item"]))),128))]))}}),Jo=g(Ro,[["__scopeId","data-v-ec206bbf"]]),Xo=["aria-controls","aria-expanded"],Yo=["innerHTML"],Qo=["id"],Zo={key:0,class:"item"},es={key:1,class:"item"},ts={key:2,class:"group"},ns=p({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(e){const t=e,n=S(!1),a=y(()=>`NavScreenGroup-${t.text.replace(" ","-").toLowerCase()}`);function o(){n.value=!n.value}return(r,l)=>(s(),u("div",{class:N(["VPNavScreenMenuGroup",{open:n.value}])},[d("button",{class:"button","aria-controls":a.value,"aria-expanded":n.value,onClick:o},[d("span",{class:"button-text",innerHTML:e.text},null,8,Yo),l[0]||(l[0]=d("span",{class:"vpi-plus button-icon"},null,-1))],8,Xo),d("div",{id:a.value,class:"items"},[(s(!0),u(x,null,A(e.items,v=>(s(),u(x,{key:JSON.stringify(v)},["link"in v?(s(),u("div",Zo,[k(Ae,{item:v},null,8,["item"])])):"component"in v?(s(),u("div",es,[(s(),b(B(v.component),G({ref_for:!0},v.props,{"screen-menu":""}),null,16))])):(s(),u("div",ts,[k(Jo,{text:v.text,items:v.items},null,8,["text","items"])]))],64))),128))],8,Qo)],2))}}),as=g(ns,[["__scopeId","data-v-1e1b1fd0"]]),os={key:0,class:"VPNavScreenMenu"},ss=p({__name:"VPNavScreenMenu",setup(e){const{theme:t}=L();return(n,a)=>i(t).nav?(s(),u("nav",os,[(s(!0),u(x,null,A(i(t).nav,o=>(s(),u(x,{key:JSON.stringify(o)},["link"in o?(s(),b(jo,{key:0,item:o},null,8,["item"])):"component"in o?(s(),b(B(o.component),G({key:1,ref_for:!0},o.props,{"screen-menu":""}),null,16)):(s(),b(as,{key:2,text:o.text||"",items:o.items},null,8,["text","items"]))],64))),128))])):m("",!0)}}),is=p({__name:"VPNavScreenSocialLinks",setup(e){const{theme:t}=L();return(n,a)=>i(t).socialLinks?(s(),b(_e,{key:0,class:"VPNavScreenSocialLinks",links:i(t).socialLinks},null,8,["links"])):m("",!0)}}),rs={class:"list"},ls=p({__name:"VPNavScreenTranslations",setup(e){const{localeLinks:t,currentLang:n}=q({correspondingLink:!0}),a=S(!1);function o(){a.value=!a.value}return(r,l)=>i(t).length&&i(n).label?(s(),u("div",{key:0,class:N(["VPNavScreenTranslations",{open:a.value}])},[d("button",{class:"title",onClick:o},[l[0]||(l[0]=d("span",{class:"vpi-languages icon lang"},null,-1)),j(" "+M(i(n).label)+" ",1),l[1]||(l[1]=d("span",{class:"vpi-chevron-down icon chevron"},null,-1))]),d("ul",rs,[(s(!0),u(x,null,A(i(t),v=>(s(),u("li",{key:v.link,class:"item"},[k(E,{class:"link",href:v.link},{default:h(()=>[j(M(v.text),1)]),_:2},1032,["href"])]))),128))])],2)):m("",!0)}}),cs=g(ls,[["__scopeId","data-v-773ae892"]]),us={class:"container"},ds=p({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(e){const t=S(null),n=Se(ee?document.body:null);return(a,o)=>(s(),b(ue,{name:"fade",onEnter:o[0]||(o[0]=r=>n.value=!0),onAfterLeave:o[1]||(o[1]=r=>n.value=!1)},{default:h(()=>[e.open?(s(),u("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:t,id:"VPNavScreen"},[d("div",us,[c(a.$slots,"nav-screen-content-before",{},void 0,!0),k(ss,{class:"menu"}),k(cs,{class:"translations"}),k(Oo,{class:"appearance"}),k(is,{class:"social-links"}),c(a.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):m("",!0)]),_:3}))}}),vs=g(ds,[["__scopeId","data-v-b798727b"]]),fs={key:0,class:"VPNav"},hs=p({__name:"VPNav",setup(e){const{isScreenOpen:t,closeScreen:n,toggleScreen:a}=la(),{frontmatter:o}=L(),r=y(()=>o.value.navbar!==!1);return Te("close-screen",n),X(()=>{ee&&document.documentElement.classList.toggle("hide-nav",!r.value)}),(l,v)=>r.value?(s(),u("header",fs,[k(Bo,{"is-screen-open":i(t),onToggleScreen:i(a)},{"nav-bar-title-before":h(()=>[c(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":h(()=>[c(l.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":h(()=>[c(l.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":h(()=>[c(l.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),k(vs,{open:i(t)},{"nav-screen-content-before":h(()=>[c(l.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":h(()=>[c(l.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):m("",!0)}}),ms=g(hs,[["__scopeId","data-v-cbe59881"]]),ps=["role","tabindex"],ks={key:1,class:"items"},bs=p({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(e){const t=e,{collapsed:n,collapsible:a,isLink:o,isActiveLink:r,hasActiveLink:l,hasChildren:v,toggle:f}=dt(y(()=>t.item)),$=y(()=>v.value?"section":"div"),V=y(()=>o.value?"a":"div"),_=y(()=>v.value?t.depth+2===7?"p":`h${t.depth+2}`:"p"),P=y(()=>o.value?void 0:"button"),T=y(()=>[[`level-${t.depth}`],{collapsible:a.value},{collapsed:n.value},{"is-link":o.value},{"is-active":r.value},{"has-active":l.value}]);function I(C){"key"in C&&C.key!=="Enter"||!t.item.link&&f()}function w(){t.item.link&&f()}return(C,H)=>{const O=W("VPSidebarItem",!0);return s(),b(B($.value),{class:N(["VPSidebarItem",T.value])},{default:h(()=>[e.item.text?(s(),u("div",G({key:0,class:"item",role:P.value},je(e.item.items?{click:I,keydown:I}:{},!0),{tabindex:e.item.items&&0}),[H[1]||(H[1]=d("div",{class:"indicator"},null,-1)),e.item.link?(s(),b(E,{key:0,tag:V.value,class:"link",href:e.item.link,rel:e.item.rel,target:e.item.target},{default:h(()=>[(s(),b(B(_.value),{class:"text",innerHTML:e.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(s(),b(B(_.value),{key:1,class:"text",innerHTML:e.item.text},null,8,["innerHTML"])),e.item.collapsed!=null&&e.item.items&&e.item.items.length?(s(),u("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:w,onKeydown:ze(w,["enter"]),tabindex:"0"},[...H[0]||(H[0]=[d("span",{class:"vpi-chevron-right caret-icon"},null,-1)])],32)):m("",!0)],16,ps)):m("",!0),e.item.items&&e.item.items.length?(s(),u("div",ks,[e.depth<5?(s(!0),u(x,{key:0},A(e.item.items,K=>(s(),b(O,{key:K.text,item:K,depth:e.depth+1},null,8,["item","depth"]))),128)):m("",!0)])):m("",!0)]),_:1},8,["class"])}}}),_s=g(bs,[["__scopeId","data-v-b6893b1b"]]),gs=p({__name:"VPSidebarGroup",props:{items:{}},setup(e){const t=S(!0);let n=null;return U(()=>{n=setTimeout(()=>{n=null,t.value=!1},300)}),We(()=>{n!=null&&(clearTimeout(n),n=null)}),(a,o)=>(s(!0),u(x,null,A(e.items,r=>(s(),u("div",{key:r.text,class:N(["group",{"no-transition":t.value}])},[k(_s,{item:r,depth:0},null,8,["item"])],2))),128))}}),$s=g(gs,[["__scopeId","data-v-6b69f472"]]),ys={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},Ps=p({__name:"VPSidebar",props:{open:{type:Boolean}},setup(e){const{sidebarGroups:t,hasSidebar:n}=D(),a=e,o=S(null),r=Se(ee?document.body:null);F([a,o],()=>{var v;a.open?(r.value=!0,(v=o.value)==null||v.focus()):r.value=!1},{immediate:!0,flush:"post"});const l=S(0);return F(t,()=>{l.value+=1},{deep:!0}),(v,f)=>i(n)?(s(),u("aside",{key:0,class:N(["VPSidebar",{open:e.open}]),ref_key:"navEl",ref:o,onClick:f[0]||(f[0]=Ke(()=>{},["stop"]))},[f[2]||(f[2]=d("div",{class:"curtain"},null,-1)),d("nav",ys,[f[1]||(f[1]=d("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),c(v.$slots,"sidebar-nav-before",{},void 0,!0),(s(),b($s,{items:i(t),key:l.value},null,8,["items"])),c(v.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):m("",!0)}}),Ls=g(Ps,[["__scopeId","data-v-5cd5b4d8"]]),Vs=p({__name:"VPSkipLink",setup(e){const{theme:t}=L(),n=Q(),a=S();F(()=>n.path,()=>a.value.focus());function o({target:r}){const l=document.getElementById(decodeURIComponent(r.hash).slice(1));if(l){const v=()=>{l.removeAttribute("tabindex"),l.removeEventListener("blur",v)};l.setAttribute("tabindex","-1"),l.addEventListener("blur",v),l.focus(),window.scrollTo(0,0)}}return(r,l)=>(s(),u(x,null,[d("span",{ref_key:"backToTop",ref:a,tabindex:"-1"},null,512),d("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:o},M(i(t).skipToContentLabel||"Skip to content"),1)],64))}}),Ss=g(Vs,[["__scopeId","data-v-30dc752a"]]),Ts=p({__name:"Layout",setup(e){const{isOpen:t,open:n,close:a}=D(),o=Q();F(()=>o.path,a),ut(t,a);const{frontmatter:r}=L(),l=qe(),v=y(()=>!!l["home-hero-image"]);return Te("hero-image-slot-exists",v),(f,$)=>{const V=W("Content");return i(r).layout!==!1?(s(),u("div",{key:0,class:N(["Layout",i(r).pageClass])},[c(f.$slots,"layout-top",{},void 0,!0),k(Ss),k(Ye,{class:"backdrop",show:i(t),onClick:i(a)},null,8,["show","onClick"]),k(ms,null,{"nav-bar-title-before":h(()=>[c(f.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":h(()=>[c(f.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":h(()=>[c(f.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":h(()=>[c(f.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":h(()=>[c(f.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":h(()=>[c(f.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),k(ra,{open:i(t),onOpenMenu:i(n)},null,8,["open","onOpenMenu"]),k(Ls,{open:i(t)},{"sidebar-nav-before":h(()=>[c(f.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":h(()=>[c(f.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),k(Wn,null,{"page-top":h(()=>[c(f.$slots,"page-top",{},void 0,!0)]),"page-bottom":h(()=>[c(f.$slots,"page-bottom",{},void 0,!0)]),"not-found":h(()=>[c(f.$slots,"not-found",{},void 0,!0)]),"home-hero-before":h(()=>[c(f.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":h(()=>[c(f.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":h(()=>[c(f.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":h(()=>[c(f.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":h(()=>[c(f.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":h(()=>[c(f.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":h(()=>[c(f.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":h(()=>[c(f.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":h(()=>[c(f.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":h(()=>[c(f.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":h(()=>[c(f.$slots,"doc-before",{},void 0,!0)]),"doc-after":h(()=>[c(f.$slots,"doc-after",{},void 0,!0)]),"doc-top":h(()=>[c(f.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":h(()=>[c(f.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":h(()=>[c(f.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":h(()=>[c(f.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":h(()=>[c(f.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":h(()=>[c(f.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":h(()=>[c(f.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":h(()=>[c(f.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),k(Xn),c(f.$slots,"layout-bottom",{},void 0,!0)],2)):(s(),b(V,{key:1}))}}}),Ns=g(Ts,[["__scopeId","data-v-05085060"]]),xs={Layout:Ns,enhanceApp:({app:e})=>{e.component("Badge",Re)}};export{uo as c,xs as t,L as u};
@@ -0,0 +1,4 @@
1
+ import{_ as t,c as a,o,ag as s}from"./chunks/framework.CAZyNGu9.js";const u=JSON.parse('{"title":"How agentkit works","description":"Understand projects, sessions, event streams, channels, and runtimes in plain language.","frontmatter":{"title":"How agentkit works","description":"Understand projects, sessions, event streams, channels, and runtimes in plain language."},"headers":[],"relativePath":"concepts.md","filePath":"concepts.md"}'),n={name:"concepts.md"};function r(i,e,l,d,c,h){return o(),a("div",null,[...e[0]||(e[0]=[s(`<h1 id="how-agentkit-works" tabindex="-1">How agentkit works <a class="header-anchor" href="#how-agentkit-works" aria-label="Permalink to &quot;How agentkit works&quot;">​</a></h1><p>An agent is a folder of instructions and capabilities. agentkit discovers those files, runs conversations, and records what happened.</p><h2 id="what-happens-when-someone-sends-a-message" tabindex="-1">What happens when someone sends a message? <a class="header-anchor" href="#what-happens-when-someone-sends-a-message" aria-label="Permalink to &quot;What happens when someone sends a message?&quot;">​</a></h2><p>Follow one message through the system:</p><ol><li>A channel receives the message from HTTP, Slack, GitHub, or another webhook.</li><li>The channel starts a session or continues an existing one.</li><li>The runtime gives the model its instructions, tools, and workspace.</li><li>The model replies and can call tools along the way.</li><li>agentkit appends every message and tool call to the session&#39;s event stream.</li></ol><p>The channel is the front door. The runtime does the work. The event stream is the record you inspect later.</p><h2 id="how-do-files-become-an-agent" tabindex="-1">How do files become an agent? <a class="header-anchor" href="#how-do-files-become-an-agent" aria-label="Permalink to &quot;How do files become an agent?&quot;">​</a></h2><p>Each capability has a home in the project. The path tells agentkit what to load. The filename becomes the capability&#39;s name. For example, <code>agent/tools/get_weather.ts</code> creates a tool named <code>get_weather</code>.</p><table tabindex="0"><thead><tr><th>Path</th><th>What it is</th></tr></thead><tbody><tr><td><code>agent/agent.ts</code></td><td>Model and runtime settings</td></tr><tr><td><code>agent/instructions.md</code></td><td>The always-on system prompt</td></tr><tr><td><code>agent/tools/&lt;name&gt;.ts</code></td><td>Typed actions the model can call</td></tr><tr><td><code>agent/skills/*</code></td><td>Procedures loaded when needed</td></tr><tr><td><code>agent/mcp-connections/&lt;name&gt;.ts</code></td><td>Tools from external MCP servers</td></tr><tr><td><code>agent/channels/*.ts</code></td><td>HTTP, Slack, and GitHub entry points</td></tr><tr><td><code>agent/ab.ts</code> or <code>agent/ab/*.ts</code></td><td>Sticky variants and live performance metrics</td></tr><tr><td><code>evals/**/*.eval.ts</code></td><td>Repeatable checks at the project root</td></tr></tbody></table><p>Other folders add subagents, hooks, schedules, and workspace files. You don&#39;t register them elsewhere. Run <code>agentkit validate</code> to catch invalid files before serving the project.</p><p>See <a href="./reference/project-layout.html">Project layout</a> for every supported path.</p><h2 id="how-does-agentkit-identify-a-conversation" tabindex="-1">How does agentkit identify a conversation? <a class="header-anchor" href="#how-does-agentkit-identify-a-conversation" aria-label="Permalink to &quot;How does agentkit identify a conversation?&quot;">​</a></h2><p>A session is one durable conversation. It has two identifiers:</p><ul><li><strong><code>continuationToken</code></strong> tells a channel which conversation to resume. A Slack channel can use its thread ID. A GitHub channel can use the pull request. The built-in HTTP API returns an opaque token and rotates it after each accepted follow-up.</li><li><strong><code>sessionId</code></strong> identifies the stored session. Use it to stream events, inspect the session, resolve approvals, or bind a tool call to the session.</li></ul><p>Use the continuation token to keep talking. Use the session ID to observe or manage the conversation.</p><h2 id="how-do-i-see-what-an-agent-did" tabindex="-1">How do I see what an agent did? <a class="header-anchor" href="#how-do-i-see-what-an-agent-did" aria-label="Permalink to &quot;How do I see what an agent did?&quot;">​</a></h2><p>Each session writes an append-only NDJSON file: <code>sessions/&lt;id&gt;/events.ndjson</code>. It includes:</p><ul><li>Messages and streamed text</li><li>Requested tool calls and their results</li><li>Approval requests and decisions</li><li>Turn completion and token usage</li></ul><p>Sessions and their event streams survive server restarts. The playground renders the stream. Evals assert against it. The <code>agentkit trajectory</code> command turns a saved stream into a short summary.</p><p>When a run surprises you, inspect its event stream first. See <a href="./reference/sessions.html">Sessions and streaming</a> for every event.</p><h2 id="what-does-a-channel-control" tabindex="-1">What does a channel control? <a class="header-anchor" href="#what-does-a-channel-control" aria-label="Permalink to &quot;What does a channel control?&quot;">​</a></h2><p>A channel connects the agent to a surface such as HTTP, Slack, GitHub, or a custom webhook. It controls:</p><ul><li>Routes and input schemas</li><li>Authentication</li><li>Conversation identity</li><li>How replies return to the user</li></ul><p>The built-in HTTP session API is always available. Custom routes accept loopback callers by default. Add an auth policy before sharing them over a network.</p><p>Channels should also prepare deterministic input for the model. For example, a GitHub channel can fetch the pull request, collect the diff, and seed the workspace before the turn starts. The model can then focus on the review instead of gathering files.</p><p>See <a href="./reference/channels.html">Channels</a> for route and authentication details.</p><h2 id="where-does-a-turn-run" tabindex="-1">Where does a turn run? <a class="header-anchor" href="#where-does-a-turn-run" aria-label="Permalink to &quot;Where does a turn run?&quot;">​</a></h2><p>Choose a runtime in <code>agent/agent.ts</code>:</p><table tabindex="0"><thead><tr><th></th><th>Local (default)</th><th>Cloud</th></tr></thead><tbody><tr><td>Turn runs on</td><td>The server host</td><td>A Cursor cloud agent</td></tr><tr><td>Server tools and approvals</td><td>Supported</td><td>Not supported</td></tr><tr><td>Agent tool scripts</td><td>Supported</td><td>Supported</td></tr><tr><td>Skills and seeded files</td><td>Added to the session workspace</td><td>Must exist in the cloud repository</td></tr><tr><td>Repository</td><td>You provide it</td><td>The cloud agent checks it out</td></tr></tbody></table><p>Use the local runtime when the host has the tools and files the agent needs. Use the cloud runtime when each turn needs an isolated repository checkout. <code>agentkit validate</code> warns when a cloud agent uses a local-only capability.</p><p>See <a href="./guides/cloud-runtime.html">Cloud runtime</a> for setup and trade-offs.</p><h2 id="what-files-can-a-local-session-access" tabindex="-1">What files can a local session access? <a class="header-anchor" href="#what-files-can-a-local-session-access" aria-label="Permalink to &quot;What files can a local session access?&quot;">​</a></h2><p>Each local session gets its own workspace. agentkit writes the instructions as <code>AGENTS.md</code>, installs authored skills, copies sandbox files, and adds agent tool scripts.</p><p>The workspace is a real Cursor project. It can inherit <code>AGENTS.md</code> and <code>.cursor</code> settings from parent directories. If your agent lives inside a large monorepo, set <code>defineAgent({ local: { cwd } })</code> to a clean directory or pass a separate <code>--state-root</code>. The <code>run</code> and <code>eval</code> commands already use temporary state.</p><p>Durable local state uses this shape:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>&lt;project&gt;/.agentkit/</span></span>
2
+ <span class="line"><span> sessions/&lt;id&gt;/events.ndjson</span></span>
3
+ <span class="line"><span> sessions/&lt;id&gt;/workspace/</span></span>
4
+ <span class="line"><span> traces/&lt;sessionId&gt;.ndjson</span></span></code></pre></div><h2 id="how-can-one-agent-call-another" tabindex="-1">How can one agent call another? <a class="header-anchor" href="#how-can-one-agent-call-another" aria-label="Permalink to &quot;How can one agent call another?&quot;">​</a></h2><p>Every mounted agent also serves MCP at <code>/&lt;slug&gt;/v1/mcp</code>. Another agent or MCP client can use <code>ask</code>, <code>check</code>, and <code>call_tool</code> to delegate work. A peer MCP connection such as <code>defineConnection({ agent: &quot;weather-agent&quot; })</code> adds those tools to the calling agent.</p><p>See <a href="./guides/agent-to-agent.html">Agent-to-agent</a> for a complete example.</p><h2 id="which-rules-prevent-common-setup-problems" tabindex="-1">Which rules prevent common setup problems? <a class="header-anchor" href="#which-rules-prevent-common-setup-problems" aria-label="Permalink to &quot;Which rules prevent common setup problems?&quot;">​</a></h2><ul><li>Use Node 22.13 or newer. Bun isn&#39;t supported.</li><li>Put evals under the project-root <code>evals/</code> directory, not <code>agent/evals/</code>.</li><li>Run a TypeScript check before shipping. <code>validate</code> and <code>run</code> execute TypeScript but don&#39;t type-check it.</li><li>Return JSON-shaped values from tool <code>execute</code> functions.</li><li>Keep local session workspaces away from parent rules you don&#39;t want the agent to inherit.</li><li>Sign in or set <code>CURSOR_API_KEY</code> before starting a model turn. Discovery, validation, direct tool calls, and server startup work without a credential.</li></ul><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./quickstart.html">Quickstart</a></li><li><a href="./reference/project-layout.html">Project layout</a></li><li><a href="./reference/sessions.html">Sessions and streaming</a></li><li><a href="./reference/channels.html">Channels</a></li><li><a href="./ab.html">Live A/B metrics</a></li><li><a href="./guides/cloud-runtime.html">Cloud runtime</a></li></ul>`,43)])])}const m=t(n,[["render",r]]);export{u as __pageData,m as default};
@@ -0,0 +1 @@
1
+ import{_ as t,c as a,o,ag as s}from"./chunks/framework.CAZyNGu9.js";const u=JSON.parse('{"title":"How agentkit works","description":"Understand projects, sessions, event streams, channels, and runtimes in plain language.","frontmatter":{"title":"How agentkit works","description":"Understand projects, sessions, event streams, channels, and runtimes in plain language."},"headers":[],"relativePath":"concepts.md","filePath":"concepts.md"}'),n={name:"concepts.md"};function r(i,e,l,d,c,h){return o(),a("div",null,[...e[0]||(e[0]=[s("",43)])])}const m=t(n,[["render",r]]);export{u as __pageData,m as default};
@@ -0,0 +1,14 @@
1
+ import{_ as t,c as s,o as a,ag as i}from"./chunks/framework.CAZyNGu9.js";const k=JSON.parse('{"title":"Deployment","description":"Run agentkit on a real host: the auth model, credentials, durable state, single-box and Docker setups, and the production flags.","frontmatter":{"title":"Deployment","description":"Run agentkit on a real host: the auth model, credentials, durable state, single-box and Docker setups, and the production flags."},"headers":[],"relativePath":"deployment.md","filePath":"deployment.md"}'),o={name:"deployment.md"};function n(r,e,d,l,h,c){return a(),s("div",null,[...e[0]||(e[0]=[i(`<h1 id="deployment" tabindex="-1">Deployment <a class="header-anchor" href="#deployment" aria-label="Permalink to &quot;Deployment&quot;">​</a></h1><p>agentkit is a plain Node HTTP server. It runs anywhere Node 22.13+ runs: a VM, a container platform, ECS. This page covers the parts that matter beyond local development: who can reach the server, where credentials and state live, and the flags that change meaning in production.</p><h2 id="the-security-model-in-one-minute" tabindex="-1">The security model in one minute <a class="header-anchor" href="#the-security-model-in-one-minute" aria-label="Permalink to &quot;The security model in one minute&quot;">​</a></h2><p>Everything defaults to loopback-only. Until you change something, no route is reachable from another machine. <code>serve</code> binds <code>127.0.0.1</code> unless you pass <code>--host</code>. Every route runs an auth-policy chain whose default, <code>localDevStrict()</code>, admits direct loopback callers only, rejects requests carrying proxy-forwarding headers (<code>X-Forwarded-For</code>, <code>X-Real-IP</code>, <code>Forwarded</code>, <code>X-Forwarded-Host</code>), and requires a loopback <code>Host</code> header. A same-host reverse proxy, a tunnel, or a DNS-rebinding page can&#39;t silently re-expose the API.</p><p>Three ways to open it up, in order of preference:</p><ol><li><strong><code>--bearer-token &lt;secret&gt;</code></strong> replaces the default with <code>bearerAuth(secret)</code> on every channel that doesn&#39;t author its own auth. Clients send <code>Authorization: Bearer &lt;secret&gt;</code>; the playground has a token field. Use this for anything shared.</li><li><strong>Authored auth.</strong> Channels declare their own <code>auth</code> chains: <code>bearerAuth</code>, signature verification, custom policies. Authored chains always win over serve-level flags. The GitHub channel is the model: <code>allowAll()</code> at the route plus HMAC verification in the channel.</li><li><strong><code>--allow-anonymous</code></strong> replaces the default with <code>allowAll()</code>, and every caller shares one <code>anonymous</code> principal. Only behind a trusted network boundary. The server refuses to start when <code>--allow-anonymous</code> is combined with Cursor account MCP connections, because any admitted caller could drive the signed-in account&#39;s connectors. Mutually exclusive with <code>--bearer-token</code>.</li></ol><p>Session routes also bind to the principal that created the session (other principals get <code>403</code>). A single static bearer token maps every holder to one shared principal. So it isolates the host, not the users on it. For per-user isolation, pass a verifier function to <code>bearerAuth</code> that returns a distinct principal per presented token.</p><h2 id="credentials" tabindex="-1">Credentials <a class="header-anchor" href="#credentials" aria-label="Permalink to &quot;Credentials&quot;">​</a></h2><p>A host reads at most five kinds of credentials.</p><table tabindex="0"><thead><tr><th>Credential</th><th>Used for</th><th>Provide it as</th></tr></thead><tbody><tr><td>Cursor API key</td><td>model turns, cloud runtime, Cursor account MCP connections</td><td><code>agentkit login</code> (stores a revocable key), <code>CURSOR_API_KEY</code>, or <code>--api-key</code> / <code>serve({ apiKey })</code></td></tr><tr><td>Slack tokens</td><td>Slack channels</td><td><code>&lt;PREFIX&gt;_SLACK_BOT_TOKEN</code> + <code>&lt;PREFIX&gt;_SLACK_APP_TOKEN</code> per agent</td></tr><tr><td>GitHub webhook secret</td><td>delivery signature verification</td><td><code>GITHUB_WEBHOOK_SECRET</code>, same value on server and signer</td></tr><tr><td>GitHub API</td><td>outbound API calls</td><td>a GitHub App (<code>GITHUB_APP_ID</code> + <code>GITHUB_APP_PRIVATE_KEY</code> + installation id) or <code>GITHUB_TOKEN</code> / <code>gh auth login</code></td></tr><tr><td>MCP connection tokens</td><td>authored MCP connections</td><td>whatever env vars your <code>mcp-connections/*.ts</code> read</td></tr></tbody></table><p>The Cursor credential resolves in one order everywhere: an explicit <code>apiKey</code> option or <code>--api-key</code>, then <code>CURSOR_API_KEY</code>, then the key stored by <code>agentkit login</code>. <code>agentkit whoami</code> shows which one is active and why. <code>logout</code> removes the stored key, and revoking it in the Cursor dashboard invalidates it immediately. Mint a dedicated key per host. <code>login</code> names it after the hostname, so you can revoke each one independently.</p><h2 id="state" tabindex="-1">State <a class="header-anchor" href="#state" aria-label="Permalink to &quot;State&quot;">​</a></h2><p>Durable state lives under <code>--state-root</code> (default <code>&lt;project&gt;/.agentkit</code>): sessions, event streams, session workspaces, the SDK conversation store, channel buffers, cursor-events offsets.</p><p>Put it on a persistent volume. Sessions survive restarts and streams replay only if the directory does. Put it outside any repository, to keep ambient <code>AGENTS.md</code> or <code>.cursor</code> rules out of session workspaces. <code>/var/lib/agentkit</code> is a good home. Back it up like the conversation history it is. Deleting a session directory removes that session from the server. The SDK conversation store under <code>runner/</code> keeps its own copy until you delete it too.</p><h2 id="a-single-box" tabindex="-1">A single box <a class="header-anchor" href="#a-single-box" aria-label="Permalink to &quot;A single box&quot;">​</a></h2><p>The minimum production host is two processes and a private network:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># the server: all agents under one port</span></span>
2
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">CURSOR_API_KEY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">…</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> GITHUB_WEBHOOK_SECRET</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">…</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> \\</span></span>
3
+ <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> serve</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /srv/agents</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --port</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 3000</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --host</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 127.0.0.1</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
4
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --state-root</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /var/lib/agentkit</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --bearer-token</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$CURSOR_AGENT_KIT_TOKEN</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span>
5
+ <span class="line"></span>
6
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># GitHub agents only: ONE forwarder relaying live deliveries to loopback</span></span>
7
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">GITHUB_TOKEN</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> GH_TOKEN</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> GITHUB_WEBHOOK_SECRET</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">…</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> \\</span></span>
8
+ <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> github</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> forward</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /srv/agents</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --repo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> owner/repo</span></span></code></pre></div><p>Run both under a supervisor. systemd is the durable choice. tmux survives SSH disconnects but not reboots. On a TTY, <code>serve</code> restarts on Enter (it reloads agent code). Under a supervisor, restart the process. Sessions and streams are durable either way.</p><p>Inbound network requirements are small. Slack needs none at all: Socket Mode dials out. Prefer GitHub via <code>--cursor-events</code> so the host pulls events with no inbound network (see <a href="./guides/github.html#pull-events-from-cursor">Pull events from Cursor</a>). A public HTTPS webhook endpoint with the secret on both ends, or the forwarder above, is the fallback when you terminate GitHub deliveries yourself. Humans reach the playground through your private network or a tunnel. Keep <code>--bearer-token</code> on, because tunneled requests arrive from loopback and IP-based policies can&#39;t tell them apart.</p><p>Health checks: <code>GET /v1/health</code> at the host level (made for ALB and ECS checks), and each agent also serves <code>/&lt;slug&gt;/v1/health</code>.</p><h2 id="docker" tabindex="-1">Docker <a class="header-anchor" href="#docker" aria-label="Permalink to &quot;Docker&quot;">​</a></h2><p>The repository includes a <a href="./../Dockerfile.html"><code>Dockerfile</code></a> used for an internal deployment. It builds the workspace deps and the playground bundle and runs multi-agent serve as a non-root user. But its <code>CMD</code> passes <code>--allow-anonymous</code>, because that deployment sits behind an authenticating proxy. Don&#39;t copy that flag without one. The corp image also enables <code>--cursor-events</code> for dogfood repos (GitHub pull path; see the <a href="./guides/github.html#pull-events-from-cursor">GitHub guide</a>).</p><p>Until the package rename ships, the real image paths are still <code>dist/bin/agent-serve.js</code> and <code>/var/lib/agent-serve</code> (see the <a href="./README.html#run-the-cli">rename table</a>). The baseline shape to copy, shown with post-rename names:</p><div class="language-dockerfile vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">dockerfile</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># build: pnpm install + pnpm --filter @anysphere/agentkit run build</span></span>
9
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># run (today: agent-serve.js and /var/lib/agent-serve):</span></span>
10
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">CMD</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;node&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;--import&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;tsx&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;dist/bin/agentkit.js&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;serve&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, \\</span></span>
11
+ <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;--dir&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;examples&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;--mode&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;multi&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, \\</span></span>
12
+ <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;--host&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;0.0.0.0&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;--port&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;3000&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, \\</span></span>
13
+ <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;--state-root&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;/var/lib/agentkit&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span></code></pre></div><p>Inside a container, <code>--host 0.0.0.0</code> is required. Pair it with real auth (<code>--bearer-token</code>, or authored auth per channel), or keep the container on a private network. Mount the state root as a volume, install <code>git</code> and <code>gh</code> in the image when channels do host-side GitHub work (the shipped Dockerfile does), and inject secrets as env vars at start. Nothing secret belongs in the image.</p><h2 id="serve-many-agents-from-one-process" tabindex="-1">Serve many agents from one process <a class="header-anchor" href="#serve-many-agents-from-one-process" aria-label="Permalink to &quot;Serve many agents from one process&quot;">​</a></h2><p>Point <code>serve</code> at a folder of agent projects and every child mounts under its directory name on one port. One process, one state root, one credential:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> serve</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /srv/agents</span></span>
14
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># index at /, each agent at /&lt;slug&gt;/v1/*, /&lt;slug&gt;/playground</span></span></code></pre></div><p><code>GET /</code> is a web index of every agent and <code>GET /v1/agents</code> is the JSON equivalent. Sessions are isolated per agent under <code>&lt;stateRoot&gt;/&lt;slug&gt;/</code>. Each agent needs its own Slack app and token pair. Agents without tokens mount with their Slack channel idle.</p><p>Only mount what you mean to run. Every mounted agent&#39;s channels are live, and webhook-driven agents spend model budget on every wake. <code>--mode single</code> serves exactly one agent at the unslugged <code>/v1/*</code> when that agent is the whole host.</p><h2 id="the-production-flags" tabindex="-1">The production flags <a class="header-anchor" href="#the-production-flags" aria-label="Permalink to &quot;The production flags&quot;">​</a></h2><p>These flags change meaning between a laptop and production.</p><table tabindex="0"><thead><tr><th>Flag</th><th>In production</th></tr></thead><tbody><tr><td><code>--dev</code></td><td>Off. Dev mode admits unsigned loopback GitHub deliveries, widens playground session listing on loopback, and never auto-fires schedules.</td></tr><tr><td><code>--bearer-token</code></td><td>On for anything shared. Rotate it like any secret.</td></tr><tr><td><code>--allow-anonymous</code></td><td>Only behind a trusted network boundary (e.g. corp Okta ALB). Also widens playground session listing/streaming so Slack and webhook sessions appear. Never with account-level connectors.</td></tr><tr><td><code>--state-root</code></td><td>A persistent volume, outside any repo.</td></tr><tr><td><code>--public-url</code></td><td>Set when cloud-runtime turns must call back into peers on this host.</td></tr><tr><td><code>--no-playground</code></td><td>Optional hardening when no human needs the UI. Also removes the <code>/</code> and <code>/v1/agents</code> index routes.</td></tr><tr><td><code>--no-docs</code></td><td>Removes the documentation site at <code>/docs</code>.</td></tr><tr><td><code>--no-schedules</code></td><td>Disable cron firing on secondary hosts so schedules run exactly once.</td></tr></tbody></table><p>Schedules fire on their cron cadence (UTC) in production mode. They have no cross-host coordination, so enable them on exactly one serving process per project.</p><h2 id="restarts-and-upgrades" tabindex="-1">Restarts and upgrades <a class="header-anchor" href="#restarts-and-upgrades" aria-label="Permalink to &quot;Restarts and upgrades&quot;">​</a></h2><p>Restarts are safe by design: sessions, event streams, and the SDK conversation store are durable under the state root. Two caveats. Parked tool approvals don&#39;t survive a restart. They resolve as interrupted, and you re-run the turn. And reminders created with in-memory <code>run</code> handlers are disarmed after a restart (<code>handler_lost_on_restart</code>). Re-arm them from the code path that created them, or use prompt-form reminders.</p><h2 id="observability" tabindex="-1">Observability <a class="header-anchor" href="#observability" aria-label="Permalink to &quot;Observability&quot;">​</a></h2><p><code>GET /v1/logs</code> (per agent) exposes recent server log lines: the same ring buffer the playground&#39;s Logs tab polls. For structured export, author a <a href="./reference/hooks.html">hook</a>. Subscribe to <code>turn.completed</code>, <code>turn.failed</code>, and <code>action.result</code>, then forward to your metrics system. Hook errors are logged, never fatal. For any incident, the session streams under the state root are the source of truth: <code>agentkit trajectory --events &lt;file&gt;</code> summarizes one, and the playground renders it.</p><h2 id="what-s-next" tabindex="-1">What&#39;s next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to &quot;What&#39;s next&quot;">​</a></h2><p>Continue with these pages:</p><ul><li><a href="./reference/channels.html#auth-policies">Channels</a>: the auth policies in detail</li><li><a href="./guides/github.html">GitHub guide</a>: delivery paths that don&#39;t need a public URL</li><li><a href="./troubleshooting.html">Troubleshooting</a>: the symptom table for when a deploy misbehaves</li></ul>`,41)])])}const u=t(o,[["render",n]]);export{k as __pageData,u as default};
@@ -0,0 +1 @@
1
+ import{_ as t,c as s,o as a,ag as i}from"./chunks/framework.CAZyNGu9.js";const k=JSON.parse('{"title":"Deployment","description":"Run agentkit on a real host: the auth model, credentials, durable state, single-box and Docker setups, and the production flags.","frontmatter":{"title":"Deployment","description":"Run agentkit on a real host: the auth model, credentials, durable state, single-box and Docker setups, and the production flags."},"headers":[],"relativePath":"deployment.md","filePath":"deployment.md"}'),o={name:"deployment.md"};function n(r,e,d,l,h,c){return a(),s("div",null,[...e[0]||(e[0]=[i("",41)])])}const u=t(o,[["render",n]]);export{k as __pageData,u as default};
@@ -0,0 +1,85 @@
1
+ import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.CAZyNGu9.js";const c=JSON.parse('{"title":"Evals","description":"Define repeatable checks with defineEval, run them with agentkit eval, and use them as regression checks.","frontmatter":{"title":"Evals","description":"Define repeatable checks with defineEval, run them with agentkit eval, and use them as regression checks."},"headers":[],"relativePath":"evals.md","filePath":"evals.md"}'),n={name:"evals.md"};function l(h,s,p,d,r,o){return e(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="evals" tabindex="-1">Evals <a class="header-anchor" href="#evals" aria-label="Permalink to &quot;Evals&quot;">​</a></h1><p>An eval is a repeatable check that runs your agent against a fixed input and gates the recorded trajectory: the run completed, the right tool ran, the reply has the right shape. Evals are how you know a prompt tweak helped, a refactor didn&#39;t regress the agent, and last month&#39;s fix is still holding.</p><p>Evals exercise the same surface your users hit. The runner starts (or targets) a real agent server, drives sessions over the public API, and grades what comes back. A passing eval means the agent started, accepted a message, and did what you asserted.</p><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p>Import paths here use <code>@anysphere/agentkit/evals</code>. On projects still using <code>@anysphere/agent-serve</code>, swap the import and run <code>agent-serve eval</code>. See <a href="./README.html#run-the-cli">Run the CLI</a> for the full rename table.</p></div><h2 id="define-evals-with-defineeval" tabindex="-1">Define evals with <code>defineEval</code> <a class="header-anchor" href="#define-evals-with-defineeval" aria-label="Permalink to &quot;Define evals with \`defineEval\`&quot;">​</a></h2><p>agentkit discovers evals under the project-root <code>evals/</code> directory, in <code>.eval.ts</code> or <code>.eval.js</code> files. That&#39;s a sibling of <code>agent/</code>, never inside it (<code>agent/evals/</code> is silently ignored). TypeScript is the normal authoring format.</p><p>The file path is the eval&#39;s identity, so you don&#39;t author an id. Directories group related evals: <code>evals/builds/api.eval.ts</code> becomes id <code>builds/api</code>. An <code>index</code> filename collapses to its directory, so <code>evals/builds/index.eval.ts</code> becomes <code>builds</code>.</p><p>An eval is a single <code>async test(t)</code>. You drive the agent with <code>t</code> and assert on the run with the same <code>t</code>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// evals/readiness.eval.ts</span></span>
2
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineEval, includes } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@anysphere/agentkit/evals&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
3
+ <span class="line"></span>
4
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineEval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
5
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Inspects a PR without approving it.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
6
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tags: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;smoke&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
7
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> timeoutMs: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">120_000</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
8
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> test</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
9
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
10
+ <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Is https://github.com/acme/checkout/pull/42 ready to approve?&quot;</span></span>
11
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> );</span></span>
12
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">succeeded</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
13
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">calledTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;inspect_pr&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
14
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">notCalledTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;approve_pr&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
15
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">check</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(t.reply, </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">includes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/</span><span style="--shiki-light:#032F62;--shiki-dark:#DBEDFF;">ready</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#032F62;--shiki-dark:#DBEDFF;">approve</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">));</span></span>
16
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
17
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>One file can also hold several datapoints through <code>cases</code> (provide either <code>test</code> or <code>cases</code>, not both). Each case id becomes <code>&lt;fileId&gt;/&lt;case.id&gt;</code>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// evals/prs.eval.ts → prs/checkout, prs/search</span></span>
18
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineEval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
19
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tags: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;smoke&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;prs&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
20
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cases: [</span></span>
21
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
22
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> id: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;checkout&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
23
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Checkout PR readiness.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
24
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> test</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
25
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
26
+ <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Is https://github.com/acme/checkout/pull/42 ready to approve?&quot;</span></span>
27
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> );</span></span>
28
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">succeeded</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
29
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">calledTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;inspect_pr&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
30
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
31
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
32
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
33
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> id: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;search&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
34
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> test</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
35
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
36
+ <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Check https://github.com/acme/search/pull/7 before approval.&quot;</span></span>
37
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> );</span></span>
38
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">succeeded</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
39
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">calledTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;inspect_pr&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
40
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
41
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
42
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
43
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Case ids must be single path segments, unique within the file. Each case can set its own <code>description</code>, <code>tags</code>, and <code>timeoutMs</code>. A case-level value replaces the file-level value for that datapoint.</p><h2 id="configure-eval-runs" tabindex="-1">Configure eval runs <a class="header-anchor" href="#configure-eval-runs" aria-label="Permalink to &quot;Configure eval runs&quot;">​</a></h2><p>Each project with evals needs <code>evals/evals.config.ts</code> or <code>evals/evals.config.js</code>, and it must set <code>maxConcurrency</code>. Each case issues real model-provider requests, so concurrency is capped hard at 200. Existing projects use 20. Discovery with <code>eval --list</code> works without this file, but running a case does not.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
44
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> defineEvalConfig,</span></span>
45
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> persistEvalRunsToDir,</span></span>
46
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">} </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@anysphere/agent-serve/evals&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
47
+ <span class="line"></span>
48
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineEvalConfig</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
49
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> maxConcurrency: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">20</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// required</span></span>
50
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // timeoutMs: 180_000,</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // optional project-wide default</span></span>
51
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // maxPlaygroundRuns: 50,</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // playground /v1/dev/evals history only (default 20)</span></span>
52
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> //</span></span>
53
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Playground batches default to **process memory only** — they disappear</span></span>
54
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // when \`serve\` exits. Opt into durable storage:</span></span>
55
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // persistRuns: persistEvalRunsToDir(&quot;.agent-serve/eval-runs&quot;),</span></span>
56
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Or implement { load, save, delete } yourself (S3, DB, …).</span></span>
57
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>The timeout order is case or file <code>timeoutMs</code>, CLI <code>--timeout-ms</code>, project config <code>timeoutMs</code>, then the 180-second runner default.</p><p>Playground batch retention is separate from case concurrency:</p><table tabindex="0"><thead><tr><th>Option</th><th>Default</th><th>Meaning</th></tr></thead><tbody><tr><td><code>maxPlaygroundRuns</code></td><td><code>20</code></td><td>Max batches in the playground / <code>/v1/dev/evals*</code> history (not CLI <code>eval</code>)</td></tr><tr><td><code>persistRuns</code></td><td>unset</td><td>Optional <code>{ load, save, delete }</code> so batches survive process restart (<code>delete</code> required for durable prune)</td></tr></tbody></table><p>Without <code>persistRuns</code>, navigating away and back still works while the same <code>serve</code> process is up; a restart clears history.</p><h2 id="drive-and-assert-with-t" tabindex="-1">Drive and assert with <code>t</code> <a class="header-anchor" href="#drive-and-assert-with-t" aria-label="Permalink to &quot;Drive and assert with \`t\`&quot;">​</a></h2><p><code>t</code> is both the driver and the assertion surface. You write ordinary control flow, sending turns and asserting inline.</p><p>Drive the agent with <code>t.send(message, options?)</code>. It runs one turn and waits for the session to park or fail. Multiple sends in one case share the session, which is how you write multi-turn evals. The return value contains the turn&#39;s <code>message</code>, <code>sessionId</code>, <code>events</code>, <code>toolCalls</code>, and <code>ok</code> state.</p><p>Read the full case state with <code>t.reply</code> (the last assistant text), <code>t.events</code> (every captured session event across turns), and <code>t.sessionId</code>.</p><p>Assert with the gates:</p><table tabindex="0"><thead><tr><th>Gate</th><th>Checks</th></tr></thead><tbody><tr><td><code>t.succeeded()</code></td><td>the captured trajectory has at least one turn and did not fail</td></tr><tr><td><code>t.calledTool(name)</code></td><td><code>name</code> appears in the captured tool calls</td></tr><tr><td><code>t.notCalledTool(name)</code></td><td><code>name</code> does not appear in the captured tool calls</td></tr><tr><td><code>t.messageIncludes(token)</code></td><td>the last assistant reply matches a string or <code>RegExp</code></td></tr><tr><td><code>t.check(value, expectation)</code></td><td>any value, against a builder</td></tr></tbody></table><p><code>calledTool</code> reads the recorded trajectory. A requested call counts even when its result has not arrived. To require a completed result, inspect <code>t.events</code> for an <code>action.result</code> event.</p><p>The expectation builders are <code>includes(string | RegExp)</code>, <code>equals(value)</code>, and <code>satisfies(predicate, label)</code>. <code>includes</code> stringifies its input, <code>equals</code> compares values deeply, and <code>satisfies</code> runs your predicate. <code>t.log(message)</code> records a debug line for the CLI and playground result.</p><p>Two <code>t.send</code> options make cases self-contained: <code>workspaceFiles</code> (<code>{ path: contents }</code>, seeded into the session workspace before the first turn) and <code>workspaceDir</code> (an absolute harness cwd). Prefer <code>workspaceFiles</code> over machine-local paths, so the case carries its own fixtures. Both options only apply to the first <code>t.send</code>, when the runner creates the session.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> toolResults</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.events.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">filter</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">((</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">e</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> e.type </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;action.result&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
58
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">check</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
59
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> toolResults.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">length</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
60
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> satisfies</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">((</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">n</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (n </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">as</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> number</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 4</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;at most 4 tool calls&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
61
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>A case with no explicit gates falls back to whether at least one turn completed successfully. Add <code>t.succeeded()</code> and behavior-specific gates anyway. They make the contract visible during review.</p><h2 id="run-evals-from-the-cli" tabindex="-1">Run evals from the CLI <a class="header-anchor" href="#run-evals-from-the-cli" aria-label="Permalink to &quot;Run evals from the CLI&quot;">​</a></h2><p>The <code>eval</code> command discovers, filters, and runs cases.</p><p>Run the CLI under Node 22.13 or newer. Do not use Bun. Its HTTP/2 client breaks tool-result streams and causes eval turns to fail.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --list</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # discover only</span></span>
62
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # run all</span></span>
63
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> builds/checkout</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # one datapoint</span></span>
64
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> builds</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> search</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # several ids or prefixes</span></span>
65
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --tag</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> smoke</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --tag</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> pull-request</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # any matching tag</span></span>
66
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --json</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-stream</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # machine-readable results</span></span>
67
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --verbose</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # logs + reply snippets</span></span></code></pre></div><p>Id filters use OR semantics. Each filter selects an exact id and its descendants. For example, <code>builds</code> selects <code>builds</code>, <code>builds/checkout</code>, and every other case below that path. Repeated tags also use OR semantics. When you provide both ids and tags, a case must match both groups.</p><p><code>eval</code> boots an ephemeral server on port 0 with a temp state root outside the project, so cases don&#39;t inherit ambient monorepo rules and don&#39;t pollute <code>.agentkit/</code>. Point <code>--url</code> at a running server to eval a live agent instead:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> eval</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
68
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --url</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> http://127.0.0.1:3000/weather-agent</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
69
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --bearer-token</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$AGENT_TOKEN</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span></code></pre></div><p>The eval definitions still come from <code>--dir</code>; <code>--url</code> only changes the agent that receives the turns. For a locally mounted multi-agent directory, <code>--slug weather-agent</code> chooses the target. Use <code>--state-root</code> to keep ephemeral session state at a chosen path, <code>--timeout-ms</code> to override the project timeout, and <code>--no-stream</code> to keep live progress off stderr. A TTY streams turn progress by default. <code>--verbose</code> still writes <code>t.log</code> lines to stderr and adds reply snippets to text results.</p><p>Model turns need a Cursor credential from <code>agentkit login</code> or <code>CURSOR_API_KEY</code>.</p><p>The exit code is <code>0</code> when every selected case passes, <code>1</code> when any case fails, and <code>2</code> when no case matches. <code>--list</code> exits <code>0</code>, including when it finds no cases.</p><p>For a compact command index, see <a href="./reference/cli.html#eval">CLI: eval</a>.</p><h3 id="json-results" tabindex="-1">JSON results <a class="header-anchor" href="#json-results" aria-label="Permalink to &quot;JSON results&quot;">​</a></h3><p>Use <code>--json --no-stream</code> in scripts and CI. The top-level result carries the totals and one result per case:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
70
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;ok&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
71
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;passed&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
72
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;failed&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
73
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;results&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
74
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
75
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;readiness&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
76
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;ok&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
77
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;assertions&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [{ </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;succeeded&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;passed&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }],</span></span>
78
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;sessionId&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;ses_123&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
79
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;inputs&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Is checkout pull request 42 ready to approve?&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
80
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;toolCalls&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [{ </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;toolName&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;inspect_pr&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;isError&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }],</span></span>
81
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;logs&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [],</span></span>
82
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;durationMs&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">12340</span></span>
83
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
84
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
85
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>Each case result can also include <code>description</code>, <code>finalText</code>, <code>tools</code>, <code>error</code>, and tool arguments or output. This shape lets CI report the failed assertion without parsing terminal text.</p><h2 id="run-evals-in-the-playground" tabindex="-1">Run evals in the playground <a class="header-anchor" href="#run-evals-in-the-playground" aria-label="Permalink to &quot;Run evals in the playground&quot;">​</a></h2><p>Start the server with <code>--dev</code>, open the playground, and choose <strong>Evals</strong>. You can run every case or one case, watch progress, and open the resulting session trace.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> serve</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dev</span></span></code></pre></div><p>Playground runs target the live server instead of an ephemeral one. Their sessions appear in the session list. One eval batch can run at a time. By default those batches are <strong>in-memory only</strong> (capped by <code>maxPlaygroundRuns</code>); set <code>persistRuns</code> in <code>evals.config.ts</code> if you need them after a serve restart — see <a href="#configure-eval-runs">Configure eval runs</a>.</p><p>The UI uses the playground eval routes (available without <code>--dev</code>): <code>GET /v1/dev/evals</code> lists datapoints and config (includes <code>maxPlaygroundRuns</code> / <code>durableRuns</code>), <code>GET /v1/dev/evals/runs</code> rehydrates recent batches after navigation, <code>POST /v1/dev/evals/runs</code> starts a batch, and <code>GET /v1/dev/evals/runs/:runId</code> polls it. See <a href="./reference/http-api.html#playground-eval-routes">Playground eval routes</a>. The start request returns <code>202</code> while cases run in the background. Poll until the snapshot status becomes <code>completed</code> or <code>failed</code>. Configuration errors appear on a failed snapshot.</p><h2 id="what-good-cases-assert" tabindex="-1">What good cases assert <a class="header-anchor" href="#what-good-cases-assert" aria-label="Permalink to &quot;What good cases assert&quot;">​</a></h2><p>Gate decisions and shape, not prose. Model wording varies run to run. Tool choice, tool avoidance, and output structure are the stable contract.</p><ol><li><code>t.succeeded()</code>: always, first.</li><li>The tool decision: <code>calledTool</code> for the intended path, <code>notCalledTool</code> for the likely wrong alternative. The pair is stronger than either alone.</li><li>Output shape: a regex for the contract (<code>/ready|blocked/i</code>, a JSON marker, a findings-block fence), never exact sentences.</li><li>For structured output, parse <code>t.reply</code> and check fields with <code>satisfies</code> instead of substring-matching JSON.</li></ol><p>The common failure modes: asserting exact phrasing, packing more than about five gates into one case (split it), and cases that depend on live external state that drifts (pin the input; see fixtures).</p><h2 id="pick-fixtures-by-agent-type" tabindex="-1">Pick fixtures by agent type <a class="header-anchor" href="#pick-fixtures-by-agent-type" aria-label="Permalink to &quot;Pick fixtures by agent type&quot;">​</a></h2><p>The right fixture depends on the surface under test.</p><table tabindex="0"><thead><tr><th>Agent surface</th><th>Fixture</th></tr></thead><tbody><tr><td>Chat / domain assistant</td><td>A canonical prompt string, chosen once and frozen</td></tr><tr><td>Tool-heavy</td><td>Run <code>agentkit call &lt;tool&gt;</code> first to pin what the tool returns, then freeze the prompt that triggers it</td></tr><tr><td>GitHub webhook</td><td><code>agentkit github replay &lt;pr&gt; --events &#39;*&#39; --dry-run --out fixtures/github</code> snapshots real payloads for offline replay (<a href="./guides/github.html">GitHub guide</a>)</td></tr><tr><td>PR reviewer with host preparation</td><td>Diff, metadata, and gold labels pinned to commit SHAs; keep any live PR matrix small</td></tr><tr><td>Workspace-dependent</td><td><code>workspaceFiles</code> in <code>t.send</code> options, never developer-machine paths</td></tr></tbody></table><p>Tag the fast, reliably passing core <code>smoke</code> and run <code>--tag smoke</code> in the inner loop. Leave slow or flaky-prone cases untagged for explicit runs.</p><h3 id="materialize-api-backed-fixtures" tabindex="-1">Materialize API-backed fixtures <a class="header-anchor" href="#materialize-api-backed-fixtures" aria-label="Permalink to &quot;Materialize API-backed fixtures&quot;">​</a></h3><p>An input that only points at external data, such as a pull request URL, snapshot id, or pair of commit SHAs, is not self-contained. Fetch it once and commit the rendered fixture before you expand the suite.</p><ol><li>Save the diff, metadata, and labels under <code>fixtures/</code> at pinned revisions.</li><li>Seed those files with <code>workspaceFiles</code>, or read them from the fixture directory.</li><li>Assert decisions and output shape against the saved evidence.</li><li>Keep a small <code>smoke</code> subset for any remaining live pipeline checks.</li></ol><p><code>maxConcurrency</code> limits parallel datapoints. It does not limit model or API fan-out inside one datapoint. Materialized fixtures prevent a large suite from exhausting provider and GitHub rate limits. The <a href="./../skills/evals/SKILL.html">evals skill</a> has the full fixture workflow.</p><h2 id="keep-improvements-with-regression-evals" tabindex="-1">Keep improvements with regression evals <a class="header-anchor" href="#keep-improvements-with-regression-evals" aria-label="Permalink to &quot;Keep improvements with regression evals&quot;">​</a></h2><p>Every <a href="./hillclimbing.html">hillclimb</a> round that keeps a change must land an eval that would have failed before the change. If you can&#39;t express the improvement as a gate (a <code>calledTool</code> shift, a bounded <code>action.result</code> count, an output-shape regex), the improvement is unverified, and it&#39;ll regress silently.</p><p>The rule cuts the other way too: never weaken an existing gate to make a round pass. That&#39;s the freeze line moving, and it turns your regression suite into a list of checks that no longer protect anything.</p><h2 id="compare-variants-on-live-traffic" tabindex="-1">Compare variants on live traffic <a class="header-anchor" href="#compare-variants-on-live-traffic" aria-label="Permalink to &quot;Compare variants on live traffic&quot;">​</a></h2><p>Use <code>defineAB</code> to compare variant metrics on live sessions. It is not a test runner and has no <code>agentkit ab</code> command. Keep <code>defineEval</code> as the regression ratchet. Eval sessions do not enroll or change live metrics. See <a href="./ab.html">Live A/B metrics</a> for assignment, behavior, collection, and inspection.</p><h2 id="what-s-next" tabindex="-1">What&#39;s next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to &quot;What&#39;s next&quot;">​</a></h2><p>Continue with these pages:</p><ul><li><a href="./ab.html">Live A/B metrics</a>: sticky variants and cumulative metrics on live sessions</li><li><a href="./hillclimbing.html">Hillclimbing</a>: the loop evals make trustworthy</li><li><a href="./building-with-agents.html">Building agents with agents</a>: have a coding agent write the first suite</li><li><a href="./guides/github.html">GitHub guide</a>: deterministic webhook fixtures with <code>github replay</code></li><li><a href="./reference/sessions.html">Sessions and streaming</a>: the events <code>t.events</code> contains</li></ul>`,70)])])}const E=i(n,[["render",l]]);export{c as __pageData,E as default};
@@ -0,0 +1 @@
1
+ import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.CAZyNGu9.js";const c=JSON.parse('{"title":"Evals","description":"Define repeatable checks with defineEval, run them with agentkit eval, and use them as regression checks.","frontmatter":{"title":"Evals","description":"Define repeatable checks with defineEval, run them with agentkit eval, and use them as regression checks."},"headers":[],"relativePath":"evals.md","filePath":"evals.md"}'),n={name:"evals.md"};function l(h,s,p,d,r,o){return e(),a("div",null,[...s[0]||(s[0]=[t("",70)])])}const E=i(n,[["render",l]]);export{c as __pageData,E as default};
@@ -0,0 +1,10 @@
1
+ import{_ as t,c as s,o as a,ag as n}from"./chunks/framework.CAZyNGu9.js";const g=JSON.parse('{"title":"Agent-to-agent","description":"Every agent is an MCP server. Peer MCP connections let one agent delegate to another that keeps its own tools, sessions, and context.","frontmatter":{"title":"Agent-to-agent","description":"Every agent is an MCP server. Peer MCP connections let one agent delegate to another that keeps its own tools, sessions, and context."},"headers":[],"relativePath":"guides/agent-to-agent.md","filePath":"guides/agent-to-agent.md"}'),o={name:"guides/agent-to-agent.md"};function i(r,e,h,l,d,c){return a(),s("div",null,[...e[0]||(e[0]=[n(`<h1 id="agent-to-agent" tabindex="-1">Agent-to-agent <a class="header-anchor" href="#agent-to-agent" aria-label="Permalink to &quot;Agent-to-agent&quot;">​</a></h1><p>Every mounted agent is also an MCP server. So agents can delegate to each other without extra infrastructure. One agent hands a question to another, and the peer answers in its own session with its own instructions, tools, and context. Any external MCP client can do the same. A peer MCP connection makes the wiring one line.</p><p>This guide wires a <code>concierge</code> agent that delegates weather questions to a <code>weather-agent</code> peer mounted on the same host.</p><h2 id="the-mcp-endpoint" tabindex="-1">The MCP endpoint <a class="header-anchor" href="#the-mcp-endpoint" aria-label="Permalink to &quot;The MCP endpoint&quot;">​</a></h2><p>Each agent serves the Model Context Protocol over streamable HTTP at <code>/&lt;slug&gt;/v1/mcp</code> (or <code>/v1/mcp</code> in single mode). The surface is stateless (session identity travels in tool arguments) and runs the same route auth chain as the session API. It exposes three tools:</p><table tabindex="0"><thead><tr><th>Tool</th><th>Behavior</th></tr></thead><tbody><tr><td><code>ask</code></td><td>Send a message. Runs a model turn in this agent&#39;s own session and returns <code>{ status, sessionId, reply }</code>. Omit <code>sessionId</code> for a fresh session; pass it back to follow up.</td></tr><tr><td><code>check</code></td><td>Wait for or poll a running session (<code>waitSeconds: 0</code> polls without blocking).</td></tr><tr><td><code>call_tool</code></td><td>Call one of the agent&#39;s server tools directly, no model turn. Registered only when the agent has server tools.</td></tr></tbody></table><p>Waits are bounded at roughly 50 seconds, below typical MCP client request timeouts: a long turn returns <code>status: &quot;running&quot;</code> and the caller keeps waiting with <code>check</code>. Sessions created this way live on the <code>mcp</code> channel, bind to the calling principal, and show up in the playground and <code>GET /v1/sessions</code> like any other session.</p><p>Any MCP client can attach to this endpoint. It isn&#39;t only for other agentkit agents.</p><h2 id="wire-a-peer-mcp-connection" tabindex="-1">Wire a peer MCP connection <a class="header-anchor" href="#wire-a-peer-mcp-connection" aria-label="Permalink to &quot;Wire a peer MCP connection&quot;">​</a></h2><p>A peer MCP connection points one agent at another mounted on the same serve host. Author an MCP connection whose transport is the peer&#39;s slug:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// agents/concierge/agent/mcp-connections/weather.ts</span></span>
2
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineConnection } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@anysphere/agentkit/connections&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
3
+ <span class="line"></span>
4
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
5
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> agent: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;weather-agent&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
6
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Delegate weather questions to the weather agent.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
7
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>The parent model now sees the peer&#39;s <code>ask</code> and <code>check</code> (and <code>call_tool</code>) tools under the <code>weather</code> server name. It reads like subagent delegation, except the peer is a full agent that keeps its own instructions, tools, MCP connections, and sessions.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> serve</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./agents</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dev</span></span>
8
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agentkit</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> chat</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --url</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> http://127.0.0.1:3000/concierge</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
9
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --message</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;What&#39;s the weather in Paris right now?&quot;</span></span>
10
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># concierge → weather.ask → weather-agent&#39;s own session/tools → reply</span></span></code></pre></div><h2 id="peer-or-subagent" tabindex="-1">Peer or subagent? <a class="header-anchor" href="#peer-or-subagent" aria-label="Permalink to &quot;Peer or subagent?&quot;">​</a></h2><p>The two delegation mechanisms solve different problems.</p><table tabindex="0"><thead><tr><th></th><th>Subagent (<code>agent/subagents/&lt;id&gt;/</code>)</th><th>Peer (<code>defineConnection({ agent })</code>)</th></tr></thead><tbody><tr><td>Runs as</td><td>an SDK custom subagent inside the parent&#39;s harness</td><td>an independent agent on the same host</td></tr><tr><td>Own tools, MCP connections, sessions</td><td>no, inherits the parent&#39;s surface</td><td>yes, everything is its own</td></tr><tr><td>Visible to others</td><td>only its parent</td><td>any MCP client, other agents, its own playground</td></tr><tr><td>Reach for it when</td><td>splitting one job into specialist roles</td><td>composing independently useful agents</td></tr></tbody></table><h2 id="how-peer-urls-resolve" tabindex="-1">How peer URLs resolve <a class="header-anchor" href="#how-peer-urls-resolve" aria-label="Permalink to &quot;How peer URLs resolve&quot;">​</a></h2><p>Peer URLs resolve when the server starts, so the ephemeral ports <code>run</code> and <code>eval</code> use work too. Local-runtime turns (and host-side <code>ctx.host.mcp</code> or channel-handler calls) reach the peer over loopback, which works under the default auth. Cloud-runtime turns execute on a VM that cannot reach this host&#39;s loopback address: pass <code>--public-url https://agentkit.example.com</code> (or <code>serve(dir, { publicUrl })</code>) so peers resolve to a reachable URL. Without one, peers are omitted from cloud turns and the server warns at startup. With <code>--bearer-token</code>, the token is attached to peer calls automatically so they pass the target agent&#39;s auth chain.</p><h2 id="guardrails" tabindex="-1">Guardrails <a class="header-anchor" href="#guardrails" aria-label="Permalink to &quot;Guardrails&quot;">​</a></h2><p>Unknown peer slugs and self-references fail <code>serve</code> at startup, so you find out immediately rather than at delegation time. Peers require the multi-agent layout (each agent mounted under its slug, the default).</p><p>The framework does not provide cross-host loop protection. If agent A&#39;s instructions delegate to B and B&#39;s delegate back to A, they can recurse. Scope each agent&#39;s delegation instructions narrowly. The concierge delegates <em>weather questions</em> to <code>weather-agent</code>, not everything.</p><h2 id="call-a-peer-from-host-code" tabindex="-1">Call a peer from host code <a class="header-anchor" href="#call-a-peer-from-host-code" aria-label="Permalink to &quot;Call a peer from host code&quot;">​</a></h2><p>Peer MCP connections are ordinary MCP connections, so deterministic host code can use them too. A channel handler or server tool can call <code>host.mcp.callTool(&quot;weather&quot;, &quot;ask&quot;, { message: &quot;…&quot; })</code> without any model turn deciding to. See <a href="./../reference/connections.html#every-mcp-connection-is-available-in-three-places">MCP connections</a> for the three places every MCP connection is available.</p><h2 id="what-s-next" tabindex="-1">What&#39;s next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to &quot;What&#39;s next&quot;">​</a></h2><p>Continue with these pages:</p><ul><li><a href="./../reference/connections.html">MCP connections</a>: all four MCP connection transports</li><li><a href="./../reference/subagents.html">Subagents</a>: the in-harness alternative</li><li><a href="./../reference/http-api.html#mcp-endpoint">HTTP API</a>: the endpoint contract</li></ul>`,26)])])}const u=t(o,[["render",i]]);export{g as __pageData,u as default};
@@ -0,0 +1 @@
1
+ import{_ as t,c as s,o as a,ag as n}from"./chunks/framework.CAZyNGu9.js";const g=JSON.parse('{"title":"Agent-to-agent","description":"Every agent is an MCP server. Peer MCP connections let one agent delegate to another that keeps its own tools, sessions, and context.","frontmatter":{"title":"Agent-to-agent","description":"Every agent is an MCP server. Peer MCP connections let one agent delegate to another that keeps its own tools, sessions, and context."},"headers":[],"relativePath":"guides/agent-to-agent.md","filePath":"guides/agent-to-agent.md"}'),o={name:"guides/agent-to-agent.md"};function i(r,e,h,l,d,c){return a(),s("div",null,[...e[0]||(e[0]=[n("",26)])])}const u=t(o,[["render",i]]);export{g as __pageData,u as default};
@@ -0,0 +1,9 @@
1
+ import{_ as t,c as s,o as a,ag as o}from"./chunks/framework.CAZyNGu9.js";const p=JSON.parse('{"title":"Cloud runtime","description":"Run turns on Cursor cloud agents instead of the local harness: when to switch, what changes, and the patterns that hold up.","frontmatter":{"title":"Cloud runtime","description":"Run turns on Cursor cloud agents instead of the local harness: when to switch, what changes, and the patterns that hold up."},"headers":[],"relativePath":"guides/cloud-runtime.md","filePath":"guides/cloud-runtime.md"}'),n={name:"guides/cloud-runtime.md"};function i(r,e,d,l,c,h){return a(),s("div",null,[...e[0]||(e[0]=[o(`<h1 id="cloud-runtime" tabindex="-1">Cloud runtime <a class="header-anchor" href="#cloud-runtime" aria-label="Permalink to &quot;Cloud runtime&quot;">​</a></h1><p>By default, turns execute on the Cursor SDK&#39;s local harness, on the same machine as the server. Set <code>runtime: &quot;cloud&quot;</code> and turns execute on Cursor cloud agents instead. They&#39;re ephemeral VMs that carry a repo checkout, run <code>gh</code>, <code>git</code>, and tests for real, and scale past what one host&#39;s disk and CPU can do. The serve host keeps handling routing, host preparation, sessions, and bookkeeping.</p><p>A canonical use is a PR driver whose triage runs on cloud VMs. The patterns in this guide come from running one against real PR traffic.</p><h2 id="when-to-switch" tabindex="-1">When to switch <a class="header-anchor" href="#when-to-switch" aria-label="Permalink to &quot;When to switch&quot;">​</a></h2><p>A guideline from running PR agents at scale: per-PR worktrees on the serve host don&#39;t scale to hundreds of engineers opening PRs. When the job needs a repo checkout at scale, use cloud. The signals:</p><ul><li>The agent must run repo commands (tests, builds, <code>git</code>) against many different refs concurrently.</li><li>Turns are long and heavy, and you don&#39;t want them competing with the server for resources.</li><li>The work product is a PR or branch the VM can push, not a local file.</li></ul><p>Stay local when the agent is conversational, tool-driven against APIs, or works over host-prepared evidence. Local turns are cheaper, start faster, and support the full authored surface.</p><h2 id="configure-it" tabindex="-1">Configure it <a class="header-anchor" href="#configure-it" aria-label="Permalink to &quot;Configure it&quot;">​</a></h2><p>Cloud runtime is two fields on the agent config.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineAgent } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@anysphere/agentkit&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
2
+ <span class="line"></span>
3
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineAgent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
4
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> runtime: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;cloud&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
5
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cloud: {</span></span>
6
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> repos: [{ url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://github.com/org/repo&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, startingRef: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;main&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }],</span></span>
7
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // env / envVars / … forwarded to the Cursor SDK</span></span>
8
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
9
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>The host must be signed in (<code>agentkit login</code> or <code>CURSOR_API_KEY</code>).</p><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p>Cloud agents run against the Cursor backend under the signed-in account, and every wake spends real cloud-agent budget. Decide explicitly what may trigger one.</p></div><h2 id="what-changes-on-cloud" tabindex="-1">What changes on cloud <a class="header-anchor" href="#what-changes-on-cloud" aria-label="Permalink to &quot;What changes on cloud&quot;">​</a></h2><p>Cloud turns run on a VM without your authored files, so the runtime mapping shifts:</p><table tabindex="0"><thead><tr><th>Folder or file</th><th>Local runtime</th><th>Cloud runtime</th></tr></thead><tbody><tr><td><code>instructions.*</code></td><td><code>AGENTS.md</code> in the session workspace</td><td>prepended to the first prompt</td></tr><tr><td>Server tools (<code>execution: &quot;server&quot;</code>)</td><td>in-process SDK custom tools</td><td>not available</td></tr><tr><td>Agent tools (<code>execution: &quot;agent&quot;</code>)</td><td>scripts in the session workspace</td><td>catalog + script bodies on the first prompt</td></tr><tr><td><code>skills/*</code></td><td><code>.cursor/skills/</code> in the workspace</td><td>only if present in the cloud repo</td></tr><tr><td><code>mcp-connections/*.ts</code></td><td>SDK <code>mcpServers</code></td><td>SDK <code>mcpServers</code> (peers need <code>--public-url</code>)</td></tr><tr><td><code>sandbox/workspace/**</code></td><td>seeded into the session workspace</td><td>ignored</td></tr><tr><td>Tool approvals (<code>needsApproval</code>)</td><td>supported</td><td>not supported</td></tr></tbody></table><p><code>agentkit validate</code> warns when <code>runtime: &quot;cloud&quot;</code> is combined with local-only capabilities. Those warnings match this table.</p><p>Two more behaviors are cloud-specific. Sessions persist a separate SDK agent id (<code>bc-…</code>), emitted on the stream as <code>agent.bound</code> with a URL to the cloud conversation. Cloud ids are minted during the first send. And peer MCP connections resolve to <code>--public-url</code> for cloud turns, because a VM cannot reach the host&#39;s loopback; without one, peers are omitted from cloud turns and the server warns at startup.</p><h2 id="hybrid-local-agent-cloud-sessions" tabindex="-1">Hybrid: local agent, cloud sessions <a class="header-anchor" href="#hybrid-local-agent-cloud-sessions" aria-label="Permalink to &quot;Hybrid: local agent, cloud sessions&quot;">​</a></h2><p>A local-runtime agent can still open cloud-attached sessions per send. Channel handlers may pass a <code>cloud</code> block (repos pinned to a PR ref, say) in <code>send</code> options, and Slack handlers may return <code>cloud</code> from a mention hook. A PR driver works this way: chat stays local, and the <code>drive</code> flow attaches the PR to a cloud VM. The agent-level <code>cloud</code> config is the base that per-session options merge over.</p><h2 id="patterns-that-hold-up" tabindex="-1">Patterns that hold up <a class="header-anchor" href="#patterns-that-hold-up" aria-label="Permalink to &quot;Patterns that hold up&quot;">​</a></h2><p>These come from running a PR driver against real PR traffic:</p><ul><li>One cloud agent per unit of work (per PR, say). Store the <code>bc-…</code> id keyed by the work unit (an affinity store written from an <code>agent.bound</code> hook) so webhook wakes resume the same conversation instead of booting a fresh VM per event.</li><li>Stable continuation keys (<code>pr:owner/repo#N</code>) so every wake lands on the same session within a channel.</li><li>Keep the host deterministic: fetch briefs and metadata on the host, send the VM a compact prompt, and let the VM re-read source of truth with its own <code>gh</code> and <code>git</code> instead of trusting payload snapshots.</li><li>Limit exposure: add repository allowlists on webhook channels, because every wake spends the account&#39;s budget.</li></ul><h2 id="verify-cloud-agents" tabindex="-1">Verify cloud agents <a class="header-anchor" href="#verify-cloud-agents" aria-label="Permalink to &quot;Verify cloud agents&quot;">​</a></h2><p><code>agentkit run</code> and <code>eval</code> work unchanged. The trajectory records the same event vocabulary plus <code>agent.bound</code> with the cloud URL, so you can open the cloud conversation for any session. Cloud turns take minutes. Pass generous <code>--timeout-ms</code> values, and keep curl timeouts long when driving channels directly.</p><h2 id="what-s-next" tabindex="-1">What&#39;s next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to &quot;What&#39;s next&quot;">​</a></h2><p>Continue with these pages:</p><ul><li><a href="./../reference/agent-config.html">Agent config</a>: the <code>runtime</code> and <code>cloud</code> fields precisely</li><li><a href="./github.html">GitHub guide</a>: the webhook patterns that pair with cloud triage</li></ul>`,27)])])}const g=t(n,[["render",i]]);export{p as __pageData,g as default};