@cursor/july 0.1.109 → 0.1.111

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 (1076) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +0 -15
  3. package/dist/bin/agent-serve.js +81 -66
  4. package/dist/channels/bitbucket/api.js +8 -8
  5. package/dist/channels/bitbucket/binding.js +4 -4
  6. package/dist/channels/bitbucket/bitbucket-channel.js +1 -1
  7. package/dist/channels/bitbucket/bitbucket-webhook.js +1 -1
  8. package/dist/channels/bitbucket/checks.d.ts.map +1 -1
  9. package/dist/channels/bitbucket/checks.js +1 -1
  10. package/dist/channels/bitbucket/cursor-account.js +1 -1
  11. package/dist/channels/bitbucket/events.js +1 -1
  12. package/dist/channels/change-monitors/change-monitors-channel.js +1 -1
  13. package/dist/channels/checks.d.ts.map +1 -1
  14. package/dist/channels/checks.js +2 -2
  15. package/dist/channels/deployments/deployments-channel.js +1 -1
  16. package/dist/channels/github/cursor-account.js +3 -3
  17. package/dist/channels/github/defaults.d.ts.map +1 -1
  18. package/dist/channels/github/defaults.js +5 -3
  19. package/dist/channels/github/events.js +1 -1
  20. package/dist/channels/github/forward.js +8 -8
  21. package/dist/channels/github/github-channel.d.ts.map +1 -1
  22. package/dist/channels/github/github-channel.js +17 -13
  23. package/dist/channels/github/progress.d.ts.map +1 -1
  24. package/dist/channels/github/progress.js +7 -2
  25. package/dist/channels/github/state.d.ts +6 -0
  26. package/dist/channels/github/state.d.ts.map +1 -1
  27. package/dist/channels/github/types.d.ts +6 -0
  28. package/dist/channels/github/types.d.ts.map +1 -1
  29. package/dist/channels/gitlab/binding.js +4 -4
  30. package/dist/channels/gitlab/checks.d.ts.map +1 -1
  31. package/dist/channels/gitlab/checks.js +1 -1
  32. package/dist/channels/gitlab/cursor-account.js +1 -1
  33. package/dist/channels/gitlab/events.js +1 -1
  34. package/dist/channels/gitlab/gitlab-channel.js +1 -1
  35. package/dist/channels/gitlab/gitlab-webhook.js +1 -1
  36. package/dist/channels/gitlab/replay.js +2 -2
  37. package/dist/channels/origin/binding.d.ts +2 -0
  38. package/dist/channels/origin/binding.d.ts.map +1 -1
  39. package/dist/channels/origin/binding.js +3 -3
  40. package/dist/channels/origin/checks.d.ts +19 -7
  41. package/dist/channels/origin/checks.d.ts.map +1 -1
  42. package/dist/channels/origin/checks.js +13 -9
  43. package/dist/channels/origin/cursor-account.js +1 -1
  44. package/dist/channels/origin/defaults.d.ts.map +1 -1
  45. package/dist/channels/origin/defaults.js +3 -1
  46. package/dist/channels/origin/events.js +1 -1
  47. package/dist/channels/origin/origin-channel.d.ts.map +1 -1
  48. package/dist/channels/origin/origin-channel.js +2 -1
  49. package/dist/channels/origin/origin-webhook.js +2 -2
  50. package/dist/channels/slack/agentic-delivery.d.ts +23 -0
  51. package/dist/channels/slack/agentic-delivery.d.ts.map +1 -0
  52. package/dist/channels/slack/agentic-delivery.js +558 -0
  53. package/dist/channels/slack/agentic-posted.d.ts +30 -0
  54. package/dist/channels/slack/agentic-posted.d.ts.map +1 -0
  55. package/dist/channels/slack/agentic-posted.js +102 -0
  56. package/dist/channels/slack/agentic-signals.d.ts +48 -0
  57. package/dist/channels/slack/agentic-signals.d.ts.map +1 -0
  58. package/dist/channels/slack/agentic-signals.js +204 -0
  59. package/dist/channels/slack/api.d.ts +20 -1
  60. package/dist/channels/slack/api.d.ts.map +1 -1
  61. package/dist/channels/slack/api.js +43 -11
  62. package/dist/channels/slack/approvals.js +1 -1
  63. package/dist/channels/slack/auth.d.ts.map +1 -1
  64. package/dist/channels/slack/auth.js +3 -1
  65. package/dist/channels/slack/blocks.js +3 -3
  66. package/dist/channels/slack/bot-mentions.d.ts.map +1 -1
  67. package/dist/channels/slack/bot-mentions.js +5 -5
  68. package/dist/channels/slack/channel-watch.js +1 -1
  69. package/dist/channels/slack/cli-project.js +3 -3
  70. package/dist/channels/slack/defaults.d.ts +3 -0
  71. package/dist/channels/slack/defaults.d.ts.map +1 -1
  72. package/dist/channels/slack/defaults.js +90 -29
  73. package/dist/channels/slack/dispatch.d.ts +34 -1
  74. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  75. package/dist/channels/slack/dispatch.js +219 -106
  76. package/dist/channels/slack/doctor.js +1 -1
  77. package/dist/channels/slack/eval-directive.js +1 -1
  78. package/dist/channels/slack/external-policy.d.ts +2 -1
  79. package/dist/channels/slack/external-policy.d.ts.map +1 -1
  80. package/dist/channels/slack/external-policy.js +13 -2
  81. package/dist/channels/slack/footer.d.ts +30 -0
  82. package/dist/channels/slack/footer.d.ts.map +1 -0
  83. package/dist/channels/slack/footer.js +88 -0
  84. package/dist/channels/slack/index.d.ts +2 -0
  85. package/dist/channels/slack/index.d.ts.map +1 -1
  86. package/dist/channels/slack/index.js +2 -0
  87. package/dist/channels/slack/interactive.d.ts.map +1 -1
  88. package/dist/channels/slack/interactive.js +5 -3
  89. package/dist/channels/slack/live-delivery.d.ts +1 -1
  90. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  91. package/dist/channels/slack/live-delivery.js +20 -6
  92. package/dist/channels/slack/log.d.ts.map +1 -1
  93. package/dist/channels/slack/log.js +1 -1
  94. package/dist/channels/slack/manifest.js +1 -1
  95. package/dist/channels/slack/nudge-carrier.js +1 -1
  96. package/dist/channels/slack/nudge-store.js +2 -2
  97. package/dist/channels/slack/paint-start.d.ts +22 -0
  98. package/dist/channels/slack/paint-start.d.ts.map +1 -0
  99. package/dist/channels/slack/paint-start.js +91 -0
  100. package/dist/channels/slack/placeholder.d.ts +36 -0
  101. package/dist/channels/slack/placeholder.d.ts.map +1 -0
  102. package/dist/channels/slack/placeholder.js +240 -0
  103. package/dist/channels/slack/progress-delivery.d.ts.map +1 -1
  104. package/dist/channels/slack/progress-delivery.js +13 -4
  105. package/dist/channels/slack/reasoning-chip.d.ts +8 -0
  106. package/dist/channels/slack/reasoning-chip.d.ts.map +1 -0
  107. package/dist/channels/slack/reasoning-chip.js +30 -0
  108. package/dist/channels/slack/recording-sink.d.ts +29 -0
  109. package/dist/channels/slack/recording-sink.d.ts.map +1 -0
  110. package/dist/channels/slack/recording-sink.js +142 -0
  111. package/dist/channels/slack/reply-options.d.ts +8 -1
  112. package/dist/channels/slack/reply-options.d.ts.map +1 -1
  113. package/dist/channels/slack/reply-options.js +59 -14
  114. package/dist/channels/slack/setup.js +1 -1
  115. package/dist/channels/slack/slack-channel.d.ts +2 -2
  116. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  117. package/dist/channels/slack/slack-channel.js +55 -20
  118. package/dist/channels/slack/socket-mode.js +2 -2
  119. package/dist/channels/slack/thread-context.js +5 -5
  120. package/dist/channels/slack/tool-approval-events.d.ts +5 -0
  121. package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
  122. package/dist/channels/slack/tool-approval-events.js +50 -38
  123. package/dist/channels/slack/tool-cards.js +1 -1
  124. package/dist/channels/slack/tool-chip.d.ts +9 -0
  125. package/dist/channels/slack/tool-chip.d.ts.map +1 -0
  126. package/dist/channels/slack/tool-chip.js +25 -0
  127. package/dist/channels/slack/types.d.ts +49 -7
  128. package/dist/channels/slack/types.d.ts.map +1 -1
  129. package/dist/channels/slack/upload.d.ts +13 -0
  130. package/dist/channels/slack/upload.d.ts.map +1 -0
  131. package/dist/channels/slack/upload.js +135 -0
  132. package/dist/channels.d.ts +10 -14
  133. package/dist/channels.d.ts.map +1 -1
  134. package/dist/channels.js +9 -21
  135. package/dist/dashboard-session-url.d.ts +15 -0
  136. package/dist/dashboard-session-url.d.ts.map +1 -0
  137. package/dist/dashboard-session-url.js +25 -0
  138. package/dist/docs/404.html +3 -3
  139. package/dist/docs/architecture.svg +59 -0
  140. package/dist/docs/assets/app.Drol6mi6.js +309 -0
  141. package/dist/docs/assets/{building-with-agents.md.D0KbSkJn.js → building-with-agents.md.CEGVXkmO.js} +2 -2
  142. package/dist/docs/assets/{building-with-agents.md.D0KbSkJn.lean.js → building-with-agents.md.CEGVXkmO.lean.js} +1 -1
  143. package/dist/docs/assets/chunks/@localSearchIndexroot.DtXk1hy-.js +1 -0
  144. package/dist/docs/assets/chunks/{VPLocalSearchBox.CVQERt56.js → VPLocalSearchBox.CdqoBZJX.js} +2 -2
  145. package/dist/docs/assets/chunks/arc.BVX3ycTn.js +1 -0
  146. package/dist/docs/assets/chunks/architectureDiagram-Q4EWVU46.CcChnMxX.js +36 -0
  147. package/dist/docs/assets/chunks/baseUniq.xwtXO-yt.js +1 -0
  148. package/dist/docs/assets/chunks/blockDiagram-DXYQGD6D.CijZ_taK.js +132 -0
  149. package/dist/docs/assets/chunks/c4Diagram-AHTNJAMY.0FBvwBvK.js +10 -0
  150. package/dist/docs/assets/chunks/channel.Bkv1N-gK.js +1 -0
  151. package/dist/docs/assets/chunks/chunk-4BX2VUAB.CELMmMDA.js +1 -0
  152. package/dist/docs/assets/chunks/chunk-4TB4RGXK.C4bhFtSm.js +206 -0
  153. package/dist/docs/assets/chunks/chunk-55IACEB6.ZnQ9gRRQ.js +1 -0
  154. package/dist/docs/assets/chunks/chunk-EDXVE4YY.DPlmglG-.js +1 -0
  155. package/dist/docs/assets/chunks/chunk-FMBD7UC4.BrUk8pff.js +15 -0
  156. package/dist/docs/assets/chunks/chunk-OYMX7WX6.CcmWIncu.js +231 -0
  157. package/dist/docs/assets/chunks/chunk-QZHKN3VN.D65-cs8I.js +1 -0
  158. package/dist/docs/assets/chunks/chunk-YZCP3GAM.qoXZpG9F.js +1 -0
  159. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CZDco1o8.js +1 -0
  160. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CZDco1o8.js +1 -0
  161. package/dist/docs/assets/chunks/clone.YSt_40_s.js +1 -0
  162. package/dist/docs/assets/chunks/cose-bilkent-S5V4N54A.8rYtqudO.js +1 -0
  163. package/dist/docs/assets/chunks/cytoscape.esm.BQk4lpUV.js +331 -0
  164. package/dist/docs/assets/chunks/dagre-KV5264BT.DrRP1fOh.js +4 -0
  165. package/dist/docs/assets/chunks/defaultLocale.C4B-KCzX.js +1 -0
  166. package/dist/docs/assets/chunks/diagram-5BDNPKRD.DHj_xA2_.js +10 -0
  167. package/dist/docs/assets/chunks/diagram-G4DWMVQ6.Bz_6nAKj.js +24 -0
  168. package/dist/docs/assets/chunks/diagram-MMDJMWI5.BWA0xSW9.js +43 -0
  169. package/dist/docs/assets/chunks/diagram-TYMM5635.CpTJLNJI.js +24 -0
  170. package/dist/docs/assets/chunks/erDiagram-SMLLAGMA.-7AWWSrP.js +85 -0
  171. package/dist/docs/assets/chunks/flowDiagram-DWJPFMVM.BTnQ742_.js +162 -0
  172. package/dist/docs/assets/chunks/framework.dypDpWZ3.js +19 -0
  173. package/dist/docs/assets/chunks/ganttDiagram-T4ZO3ILL.B5_HiiQ5.js +292 -0
  174. package/dist/docs/assets/chunks/gitGraphDiagram-UUTBAWPF.CZcNTFZd.js +106 -0
  175. package/dist/docs/assets/chunks/graph.V2GLaab4.js +1 -0
  176. package/dist/docs/assets/chunks/infoDiagram-42DDH7IO.7pZOkCCU.js +2 -0
  177. package/dist/docs/assets/chunks/init.Gi6I4Gst.js +1 -0
  178. package/dist/docs/assets/chunks/ishikawaDiagram-UXIWVN3A.DSMo3Qa3.js +70 -0
  179. package/dist/docs/assets/chunks/journeyDiagram-VCZTEJTY.BNEgWN1S.js +139 -0
  180. package/dist/docs/assets/chunks/kanban-definition-6JOO6SKY.B-4d4tC7.js +89 -0
  181. package/dist/docs/assets/chunks/katex.DkKDou_j.js +257 -0
  182. package/dist/docs/assets/chunks/layout.Dvbn9nSb.js +1 -0
  183. package/dist/docs/assets/chunks/linear.D2GM4p4b.js +1 -0
  184. package/dist/docs/assets/chunks/min.DVBtLK-B.js +1 -0
  185. package/dist/docs/assets/chunks/mindmap-definition-QFDTVHPH.CnJRI55x.js +96 -0
  186. package/dist/docs/assets/chunks/ordinal.DBvzRdQf.js +1 -0
  187. package/dist/docs/assets/chunks/pieDiagram-DEJITSTG.CtoaTFlA.js +30 -0
  188. package/dist/docs/assets/chunks/quadrantDiagram-34T5L4WZ.DtT24_vN.js +7 -0
  189. package/dist/docs/assets/chunks/requirementDiagram-MS252O5E.CjSO4o8f.js +84 -0
  190. package/dist/docs/assets/chunks/sankeyDiagram-XADWPNL6.-wWiIVWa.js +10 -0
  191. package/dist/docs/assets/chunks/sequenceDiagram-FGHM5R23.DSk8s4gX.js +157 -0
  192. package/dist/docs/assets/chunks/stateDiagram-FHFEXIEX.BFKAsdkN.js +1 -0
  193. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.C4CLm481.js +1 -0
  194. package/dist/docs/assets/chunks/{theme.Dnsd3XOn.js → theme.C0MctGaz.js} +2 -2
  195. package/dist/docs/assets/chunks/timeline-definition-GMOUNBTQ.TUNJbAFe.js +120 -0
  196. package/dist/docs/assets/chunks/vennDiagram-DHZGUBPP.C-RGNnk4.js +34 -0
  197. package/dist/docs/assets/chunks/virtual_mermaid-config.DDnGl6nM.js +1 -0
  198. package/dist/docs/assets/chunks/wardley-RL74JXVD.g5efOWmT.js +162 -0
  199. package/dist/docs/assets/chunks/wardleyDiagram-NUSXRM2D.DH4zt73Y.js +20 -0
  200. package/dist/docs/assets/chunks/xychartDiagram-5P7HB3ND.B-3k6bF6.js +7 -0
  201. package/dist/docs/assets/{deployment.md.JenwuCCB.js → deployment.md.Dm4Qo3hp.js} +5 -5
  202. package/dist/docs/assets/{deployment.md.JenwuCCB.lean.js → deployment.md.Dm4Qo3hp.lean.js} +1 -1
  203. package/dist/docs/assets/{evals.md.C7JLjoEP.js → evals.md.BLDRt5LH.js} +4 -4
  204. package/dist/docs/assets/{evals.md.C7JLjoEP.lean.js → evals.md.BLDRt5LH.lean.js} +1 -1
  205. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.js +14 -0
  206. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.lean.js +1 -0
  207. package/dist/docs/assets/{guides_bitbucket.md.DZPzmUjU.js → guides_bitbucket.md.CTpCl__f.js} +1 -1
  208. package/dist/docs/assets/{guides_bitbucket.md.DZPzmUjU.lean.js → guides_bitbucket.md.CTpCl__f.lean.js} +1 -1
  209. package/dist/docs/assets/{guides_cloud-agents.md.BsloyHdY.js → guides_cloud-agents.md.lSE_l7lH.js} +2 -2
  210. package/dist/docs/assets/{guides_cloud-agents.md.BsloyHdY.lean.js → guides_cloud-agents.md.lSE_l7lH.lean.js} +1 -1
  211. package/dist/docs/assets/{guides_convert-automation.md.B4sjlodG.js → guides_convert-automation.md.Ck6Cr68A.js} +1 -1
  212. package/dist/docs/assets/{guides_convert-automation.md.B4sjlodG.lean.js → guides_convert-automation.md.Ck6Cr68A.lean.js} +1 -1
  213. package/dist/docs/assets/{guides_github.md.TZaTZlfz.js → guides_github.md.D6ER29dG.js} +1 -1
  214. package/dist/docs/assets/{guides_github.md.TZaTZlfz.lean.js → guides_github.md.D6ER29dG.lean.js} +1 -1
  215. package/dist/docs/assets/{guides_gitlab.md.BmqwQfdG.js → guides_gitlab.md.P-TjBnS5.js} +1 -1
  216. package/dist/docs/assets/{guides_gitlab.md.BmqwQfdG.lean.js → guides_gitlab.md.P-TjBnS5.lean.js} +1 -1
  217. package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.js +9 -0
  218. package/dist/docs/assets/{guides_grokbot-agents.md.DyV-WArv.lean.js → guides_grokbot-agents.md.WBZIOvkz.lean.js} +1 -1
  219. package/dist/docs/assets/{guides_improve.md.BGVk32bK.js → guides_improve.md.BKaDuKKK.js} +1 -1
  220. package/dist/docs/assets/{guides_improve.md.BGVk32bK.lean.js → guides_improve.md.BKaDuKKK.lean.js} +1 -1
  221. package/dist/docs/assets/{guides_mcp-oauth.md.Dp6cDP7f.js → guides_mcp-oauth.md.DMNMpXtO.js} +1 -1
  222. package/dist/docs/assets/{guides_mcp-oauth.md.Dp6cDP7f.lean.js → guides_mcp-oauth.md.DMNMpXtO.lean.js} +1 -1
  223. package/dist/docs/assets/{guides_opentelemetry.md.SCRMskno.js → guides_opentelemetry.md._CRfDyzH.js} +14 -14
  224. package/dist/docs/assets/{guides_opentelemetry.md.SCRMskno.lean.js → guides_opentelemetry.md._CRfDyzH.lean.js} +1 -1
  225. package/dist/docs/assets/{guides_slack.md.D4RVMM4G.js → guides_slack.md.DdT8rmsj.js} +12 -4
  226. package/dist/docs/assets/{guides_slack.md.D4RVMM4G.lean.js → guides_slack.md.DdT8rmsj.lean.js} +1 -1
  227. package/dist/docs/assets/{guides_webhooks.md.CJK484ex.js → guides_webhooks.md.aQW10HRe.js} +2 -2
  228. package/dist/docs/assets/{guides_webhooks.md.CJK484ex.lean.js → guides_webhooks.md.aQW10HRe.lean.js} +1 -1
  229. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.js +1 -0
  230. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.lean.js +1 -0
  231. package/dist/docs/assets/index.md.BFVyY2KT.js +17 -0
  232. package/dist/docs/assets/index.md.BFVyY2KT.lean.js +1 -0
  233. package/dist/docs/assets/{quickstart.md.DdQOF7Y8.js → quickstart.md.D3MjSZN-.js} +30 -38
  234. package/dist/docs/assets/quickstart.md.D3MjSZN-.lean.js +1 -0
  235. package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.js → reference_agent-config.md.CfVA-LZJ.js} +1 -1
  236. package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.lean.js → reference_agent-config.md.CfVA-LZJ.lean.js} +1 -1
  237. package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.js → reference_artifacts.md.Vf7qyIZ-.js} +1 -1
  238. package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.lean.js → reference_artifacts.md.Vf7qyIZ-.lean.js} +1 -1
  239. package/dist/docs/assets/{reference_channels.md.CAo-iK4j.js → reference_channels.md.icqLKcTc.js} +2 -12
  240. package/dist/docs/assets/{reference_channels.md.CAo-iK4j.lean.js → reference_channels.md.icqLKcTc.lean.js} +1 -1
  241. package/dist/docs/assets/{reference_cli.md.Deg7849l.js → reference_cli.md.B2dBL6L8.js} +3 -3
  242. package/dist/docs/assets/{reference_cli.md.Deg7849l.lean.js → reference_cli.md.B2dBL6L8.lean.js} +1 -1
  243. package/dist/docs/assets/{reference_connections.md.BojkC6c5.js → reference_connections.md.Cb3U_c8n.js} +4 -4
  244. package/dist/docs/assets/{reference_connections.md.BojkC6c5.lean.js → reference_connections.md.Cb3U_c8n.lean.js} +1 -1
  245. package/dist/docs/assets/{reference_extensions.md.ZAVUyuEX.js → reference_extensions.md.wlFD3cUR.js} +2 -2
  246. package/dist/docs/assets/{reference_extensions.md.ZAVUyuEX.lean.js → reference_extensions.md.wlFD3cUR.lean.js} +1 -1
  247. package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.js → reference_hooks.md.CZuynAxj.js} +3 -3
  248. package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.lean.js → reference_hooks.md.CZuynAxj.lean.js} +1 -1
  249. package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.js → reference_http-api.md.DTKcYE6L.js} +3 -3
  250. package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.lean.js → reference_http-api.md.DTKcYE6L.lean.js} +1 -1
  251. package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.js → reference_instructions.md.D7gkckK-.js} +1 -1
  252. package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.lean.js → reference_instructions.md.D7gkckK-.lean.js} +1 -1
  253. package/dist/docs/assets/{reference_playground.md.DLnoaczX.js → reference_playground.md.D2YExv5K.js} +1 -1
  254. package/dist/docs/assets/{reference_playground.md.DLnoaczX.lean.js → reference_playground.md.D2YExv5K.lean.js} +1 -1
  255. package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.js → reference_project-layout.md.DPxbUJyt.js} +3 -3
  256. package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.lean.js → reference_project-layout.md.DPxbUJyt.lean.js} +1 -1
  257. package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.js → reference_prompt.md.BQ5uAv1F.js} +1 -1
  258. package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.lean.js → reference_prompt.md.BQ5uAv1F.lean.js} +1 -1
  259. package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.js → reference_schedules.md.BasfZWO-.js} +1 -1
  260. package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.lean.js → reference_schedules.md.BasfZWO-.lean.js} +1 -1
  261. package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.js → reference_sessions.md.YKvIsWAx.js} +1 -1
  262. package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.lean.js → reference_sessions.md.YKvIsWAx.lean.js} +1 -1
  263. package/dist/docs/assets/{reference_skills.md.l2ezAcaN.js → reference_skills.md.rNgpsGd0.js} +1 -1
  264. package/dist/docs/assets/{reference_skills.md.l2ezAcaN.lean.js → reference_skills.md.rNgpsGd0.lean.js} +1 -1
  265. package/dist/docs/assets/{reference_subagents.md.CfsIloPm.js → reference_subagents.md.e5qitjJt.js} +2 -2
  266. package/dist/docs/assets/{reference_subagents.md.CfsIloPm.lean.js → reference_subagents.md.e5qitjJt.lean.js} +1 -1
  267. package/dist/docs/assets/{reference_tools.md.aGrn99hP.js → reference_tools.md.BdCO2aHZ.js} +4 -4
  268. package/dist/docs/assets/{reference_tools.md.aGrn99hP.lean.js → reference_tools.md.BdCO2aHZ.lean.js} +1 -1
  269. package/dist/docs/assets/{style.DCD_zyg3.css → style.Cfo2vbik.css} +1 -1
  270. package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.js → templates_agentic-owners.md.Da_AGDlH.js} +1 -1
  271. package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.lean.js → templates_agentic-owners.md.Da_AGDlH.lean.js} +1 -1
  272. package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.js → templates_pr-autofixer.md.DqxocIGh.js} +1 -1
  273. package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.lean.js → templates_pr-autofixer.md.DqxocIGh.lean.js} +1 -1
  274. package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.js → templates_security-reviewer.md.Bhnvd8VE.js} +1 -1
  275. package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.lean.js → templates_security-reviewer.md.Bhnvd8VE.lean.js} +1 -1
  276. package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.js → templates_triage.md.BdBWO9Ic.js} +1 -1
  277. package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.lean.js → templates_triage.md.BdBWO9Ic.lean.js} +1 -1
  278. package/dist/docs/assets/{troubleshooting.md.CYEAO9bM.js → troubleshooting.md.BcgNoYtJ.js} +1 -1
  279. package/dist/docs/assets/{troubleshooting.md.CYEAO9bM.lean.js → troubleshooting.md.BcgNoYtJ.lean.js} +1 -1
  280. package/dist/docs/building-with-agents.html +41 -8
  281. package/dist/docs/building-with-agents.md +13 -15
  282. package/dist/docs/deployment.html +44 -11
  283. package/dist/docs/deployment.md +6 -7
  284. package/dist/docs/evals.html +44 -11
  285. package/dist/docs/evals.md +5 -5
  286. package/dist/docs/guides/agent-to-agent.html +48 -11
  287. package/dist/docs/guides/agent-to-agent.md +40 -83
  288. package/dist/docs/guides/bitbucket.html +41 -8
  289. package/dist/docs/guides/cloud-agents.html +41 -8
  290. package/dist/docs/guides/cloud-agents.md +24 -20
  291. package/dist/docs/guides/convert-automation.html +41 -8
  292. package/dist/docs/guides/github.html +41 -8
  293. package/dist/docs/guides/github.md +1 -1
  294. package/dist/docs/guides/gitlab.html +41 -8
  295. package/dist/docs/guides/grokbot-agents.html +41 -8
  296. package/dist/docs/guides/grokbot-agents.md +26 -19
  297. package/dist/docs/guides/improve.html +41 -8
  298. package/dist/docs/guides/mcp-oauth.html +41 -8
  299. package/dist/docs/guides/mcp-oauth.md +1 -1
  300. package/dist/docs/guides/opentelemetry.html +53 -20
  301. package/dist/docs/guides/opentelemetry.md +28 -41
  302. package/dist/docs/guides/slack.html +51 -10
  303. package/dist/docs/guides/slack.md +53 -4
  304. package/dist/docs/guides/webhooks.html +42 -9
  305. package/dist/docs/guides/webhooks.md +3 -4
  306. package/dist/docs/hashmap.json +1 -1
  307. package/dist/docs/hillclimbing.html +40 -10
  308. package/dist/docs/hillclimbing.md +5 -5
  309. package/dist/docs/index.html +57 -12
  310. package/dist/docs/index.md +81 -150
  311. package/dist/docs/llms-full.txt +5779 -10297
  312. package/dist/docs/llms.txt +3 -29
  313. package/dist/docs/quickstart.html +70 -45
  314. package/dist/docs/quickstart.md +44 -105
  315. package/dist/docs/reference/agent-config.html +41 -8
  316. package/dist/docs/reference/artifacts.html +41 -8
  317. package/dist/docs/reference/channels.html +41 -18
  318. package/dist/docs/reference/channels.md +0 -16
  319. package/dist/docs/reference/cli.html +42 -9
  320. package/dist/docs/reference/cli.md +0 -16
  321. package/dist/docs/reference/connections.html +43 -10
  322. package/dist/docs/reference/connections.md +3 -5
  323. package/dist/docs/reference/extensions.html +42 -9
  324. package/dist/docs/reference/extensions.md +2 -2
  325. package/dist/docs/reference/hooks.html +42 -9
  326. package/dist/docs/reference/hooks.md +2 -4
  327. package/dist/docs/reference/http-api.html +42 -9
  328. package/dist/docs/reference/http-api.md +5 -5
  329. package/dist/docs/reference/instructions.html +41 -8
  330. package/dist/docs/reference/playground.html +40 -7
  331. package/dist/docs/reference/playground.md +2 -2
  332. package/dist/docs/reference/project-layout.html +42 -9
  333. package/dist/docs/reference/project-layout.md +3 -4
  334. package/dist/docs/reference/prompt.html +41 -8
  335. package/dist/docs/reference/schedules.html +41 -8
  336. package/dist/docs/reference/sessions.html +40 -7
  337. package/dist/docs/reference/sessions.md +5 -4
  338. package/dist/docs/reference/skills.html +41 -8
  339. package/dist/docs/reference/subagents.html +41 -8
  340. package/dist/docs/reference/subagents.md +2 -4
  341. package/dist/docs/reference/tools.html +43 -10
  342. package/dist/docs/reference/tools.md +2 -5
  343. package/dist/docs/templates/agentic-owners.html +41 -8
  344. package/dist/docs/templates/pr-autofixer.html +41 -8
  345. package/dist/docs/templates/security-reviewer.html +41 -8
  346. package/dist/docs/templates/triage.html +41 -8
  347. package/dist/docs/troubleshooting.html +40 -7
  348. package/dist/docs/troubleshooting.md +1 -2
  349. package/dist/evals/assertions.js +19 -19
  350. package/dist/evals/expect.js +1 -1
  351. package/dist/evals/judge.js +1 -1
  352. package/dist/evals/reporters.d.ts.map +1 -1
  353. package/dist/evals/reporters.js +8 -8
  354. package/dist/evals/run-facts.js +2 -2
  355. package/dist/evals.d.ts +1 -1
  356. package/dist/evals.d.ts.map +1 -1
  357. package/dist/evals.js +7 -7
  358. package/dist/extensions/cursor-cloud-agents/extension.js +1 -1
  359. package/dist/extensions/cursor-cloud-agents/lib/backend.js +3 -3
  360. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
  361. package/dist/extensions/cursor-cloud-agents/lib/repos.js +6 -6
  362. package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -1
  363. package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -2
  364. package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
  365. package/dist/extensions/improve/skills/yourself.js +1 -1
  366. package/dist/extensions/slack-communication/extension.d.ts +28 -0
  367. package/dist/extensions/slack-communication/extension.d.ts.map +1 -0
  368. package/dist/extensions/slack-communication/extension.js +32 -0
  369. package/dist/extensions/slack-communication/skills/slack-voice.d.ts +5 -0
  370. package/dist/extensions/slack-communication/skills/slack-voice.d.ts.map +1 -0
  371. package/dist/extensions/slack-communication/skills/slack-voice.js +54 -0
  372. package/dist/extensions/slack-communication/tools/delete-message.d.ts +4 -0
  373. package/dist/extensions/slack-communication/tools/delete-message.d.ts.map +1 -0
  374. package/dist/extensions/slack-communication/tools/delete-message.js +29 -0
  375. package/dist/extensions/slack-communication/tools/edit-message.d.ts +4 -0
  376. package/dist/extensions/slack-communication/tools/edit-message.d.ts.map +1 -0
  377. package/dist/extensions/slack-communication/tools/edit-message.js +37 -0
  378. package/dist/extensions/slack-communication/tools/post-card.d.ts +4 -0
  379. package/dist/extensions/slack-communication/tools/post-card.d.ts.map +1 -0
  380. package/dist/extensions/slack-communication/tools/post-card.js +25 -0
  381. package/dist/extensions/slack-communication/tools/post-file.d.ts +4 -0
  382. package/dist/extensions/slack-communication/tools/post-file.d.ts.map +1 -0
  383. package/dist/extensions/slack-communication/tools/post-file.js +76 -0
  384. package/dist/extensions/slack-communication/tools/post-update.d.ts +4 -0
  385. package/dist/extensions/slack-communication/tools/post-update.d.ts.map +1 -0
  386. package/dist/extensions/slack-communication/tools/post-update.js +36 -0
  387. package/dist/extensions/slack-communication/tools/react.d.ts +4 -0
  388. package/dist/extensions/slack-communication/tools/react.d.ts.map +1 -0
  389. package/dist/extensions/slack-communication/tools/react.js +27 -0
  390. package/dist/extensions/slack-communication/tools/set-status.d.ts +4 -0
  391. package/dist/extensions/slack-communication/tools/set-status.d.ts.map +1 -0
  392. package/dist/extensions/slack-communication/tools/set-status.js +18 -0
  393. package/dist/files-backends/cursor-hosted.d.ts +18 -6
  394. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  395. package/dist/files-backends/cursor-hosted.js +357 -74
  396. package/dist/files-backends/local-fs.js +1 -1
  397. package/dist/files.d.ts +15 -0
  398. package/dist/files.d.ts.map +1 -1
  399. package/dist/filesystem.d.ts.map +1 -1
  400. package/dist/filesystem.js +15 -15
  401. package/dist/index.d.ts +5 -8
  402. package/dist/index.d.ts.map +1 -1
  403. package/dist/index.js +4 -6
  404. package/dist/internal/advertise-tools.js +6 -6
  405. package/dist/internal/approval-gate.js +1 -1
  406. package/dist/internal/artifacts-store.js +3 -3
  407. package/dist/internal/as-of.js +2 -2
  408. package/dist/internal/authored-alias-hooks.js +1 -1
  409. package/dist/internal/builtin-tools/reminders.js +2 -2
  410. package/dist/internal/chat-client.js +5 -5
  411. package/dist/internal/cli-ax.d.ts +1 -0
  412. package/dist/internal/cli-ax.d.ts.map +1 -1
  413. package/dist/internal/cli-ax.js +68 -13
  414. package/dist/internal/cli-bitbucket.js +10 -10
  415. package/dist/internal/cli-convert-automation.js +2 -2
  416. package/dist/internal/cli-cursor.d.ts +3 -11
  417. package/dist/internal/cli-cursor.d.ts.map +1 -1
  418. package/dist/internal/cli-cursor.js +5 -10
  419. package/dist/internal/cli-deploy.d.ts +12 -2
  420. package/dist/internal/cli-deploy.d.ts.map +1 -1
  421. package/dist/internal/cli-deploy.js +328 -96
  422. package/dist/internal/cli-docs.js +5 -5
  423. package/dist/internal/cli-github.js +15 -16
  424. package/dist/internal/cli-gitlab.js +10 -10
  425. package/dist/internal/cli-manifest.js +1 -1
  426. package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
  427. package/dist/internal/cli-mcp-oauth.js +5 -5
  428. package/dist/internal/cli-mcp.js +3 -3
  429. package/dist/internal/cli-skills.js +2 -2
  430. package/dist/internal/cli-slack.js +5 -5
  431. package/dist/internal/cloud-turn-cost.js +1 -1
  432. package/dist/internal/continuation-identity.d.ts.map +1 -1
  433. package/dist/internal/continuation-identity.js +14 -9
  434. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  435. package/dist/internal/conversation-mirror.js +33 -2
  436. package/dist/internal/convert-automation/convert-workflow.js +25 -24
  437. package/dist/internal/convert-automation/types.d.ts +8 -0
  438. package/dist/internal/convert-automation/types.d.ts.map +1 -1
  439. package/dist/internal/cursor/account-mcp.d.ts +2 -2
  440. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  441. package/dist/internal/cursor/account-mcp.js +32 -27
  442. package/dist/internal/cursor/backend-client.d.ts +15 -10
  443. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  444. package/dist/internal/cursor/backend-client.js +17 -11
  445. package/dist/internal/cursor/credentials.js +1 -1
  446. package/dist/internal/cursor/hosted-store-secrets.d.ts +16 -0
  447. package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
  448. package/dist/internal/cursor/hosted-store-secrets.js +25 -0
  449. package/dist/internal/cursor-account-mcp-auth.js +9 -9
  450. package/dist/internal/cursor-deployment-relay.js +9 -9
  451. package/dist/internal/cursor-event-relay.js +10 -10
  452. package/dist/internal/cursor-relay-core.js +2 -2
  453. package/dist/internal/deploy-client.d.ts +106 -9
  454. package/dist/internal/deploy-client.d.ts.map +1 -1
  455. package/dist/internal/deploy-client.js +171 -23
  456. package/dist/internal/deploy-manifest.d.ts +13 -0
  457. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  458. package/dist/internal/deploy-manifest.js +32 -16
  459. package/dist/internal/discovery/agent-config.d.ts +5 -0
  460. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  461. package/dist/internal/discovery/agent-config.js +27 -0
  462. package/dist/internal/discovery/agent.d.ts.map +1 -1
  463. package/dist/internal/discovery/agent.js +10 -8
  464. package/dist/internal/discovery/channels.js +4 -4
  465. package/dist/internal/discovery/connections.js +4 -4
  466. package/dist/internal/discovery/cursor-plugin.js +12 -12
  467. package/dist/internal/discovery/extension-overlay.js +3 -3
  468. package/dist/internal/discovery/extensions.js +6 -6
  469. package/dist/internal/discovery/info.js +9 -9
  470. package/dist/internal/discovery/instructions.js +1 -1
  471. package/dist/internal/discovery/project.d.ts.map +1 -1
  472. package/dist/internal/discovery/project.js +4 -4
  473. package/dist/internal/discovery/services.js +1 -1
  474. package/dist/internal/discovery/tools.js +1 -1
  475. package/dist/internal/docs-site.js +2 -2
  476. package/dist/internal/env-file.js +1 -1
  477. package/dist/internal/eval-run-store.d.ts.map +1 -1
  478. package/dist/internal/eval-run-store.js +7 -7
  479. package/dist/internal/eval-runner.js +14 -14
  480. package/dist/internal/evals-client.js +4 -4
  481. package/dist/internal/event-log.js +8 -8
  482. package/dist/internal/event-mapper.d.ts +18 -0
  483. package/dist/internal/event-mapper.d.ts.map +1 -1
  484. package/dist/internal/event-mapper.js +34 -2
  485. package/dist/internal/filesystem/format.d.ts.map +1 -1
  486. package/dist/internal/filesystem/format.js +6 -3
  487. package/dist/internal/filesystem/scratch.js +3 -3
  488. package/dist/internal/filesystem/tools.d.ts.map +1 -1
  489. package/dist/internal/filesystem/tools.js +6 -6
  490. package/dist/internal/filesystem/walk.js +1 -1
  491. package/dist/internal/framework-file-storage.d.ts +6 -2
  492. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  493. package/dist/internal/framework-file-storage.js +91 -2
  494. package/dist/internal/framework-storage-selection.d.ts +0 -6
  495. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  496. package/dist/internal/framework-storage-selection.js +2 -11
  497. package/dist/internal/github-fanout.js +3 -3
  498. package/dist/internal/guest-network.js +4 -4
  499. package/dist/internal/host-files.js +1 -1
  500. package/dist/internal/host-kv.js +2 -2
  501. package/dist/internal/hosted-admission-adapter.d.ts +2 -0
  502. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
  503. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
  504. package/dist/internal/hosted-catch-protocol.js +2 -4
  505. package/dist/internal/hosted-catch.js +1 -1
  506. package/dist/internal/hosted-delivery-protocol.d.ts +29 -0
  507. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  508. package/dist/internal/hosted-delivery-protocol.js +76 -8
  509. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  510. package/dist/internal/hosted-delivery.js +201 -64
  511. package/dist/internal/hosted-execution-diag.js +3 -3
  512. package/dist/internal/hosted-execution-latency.d.ts +80 -0
  513. package/dist/internal/hosted-execution-latency.d.ts.map +1 -0
  514. package/dist/internal/hosted-execution-latency.js +220 -0
  515. package/dist/internal/hosting.d.ts +5 -5
  516. package/dist/internal/hosting.d.ts.map +1 -1
  517. package/dist/internal/hosting.js +5 -6
  518. package/dist/internal/http-channel-define.d.ts +11 -0
  519. package/dist/internal/http-channel-define.d.ts.map +1 -0
  520. package/dist/internal/http-channel-define.js +18 -0
  521. package/dist/internal/http-channel.d.ts +2 -3
  522. package/dist/internal/http-channel.d.ts.map +1 -1
  523. package/dist/internal/http-channel.js +3 -4
  524. package/dist/internal/http-control-plane-session.d.ts +7 -3
  525. package/dist/internal/http-control-plane-session.d.ts.map +1 -1
  526. package/dist/internal/http-control-plane-session.js +22 -10
  527. package/dist/internal/incoming-headers-to-fetch.d.ts +10 -0
  528. package/dist/internal/incoming-headers-to-fetch.d.ts.map +1 -0
  529. package/dist/internal/incoming-headers-to-fetch.js +41 -0
  530. package/dist/internal/init-interview.js +7 -7
  531. package/dist/internal/init-project.d.ts.map +1 -1
  532. package/dist/internal/init-project.js +14 -14
  533. package/dist/internal/init-scaffold.js +1 -1
  534. package/dist/internal/inline-stdio-mcp.js +2 -2
  535. package/dist/internal/install-cursor-skills.js +10 -10
  536. package/dist/internal/json-schema.js +1 -1
  537. package/dist/internal/local-control-plane.d.ts.map +1 -1
  538. package/dist/internal/local-control-plane.js +3 -3
  539. package/dist/internal/local-env.js +3 -3
  540. package/dist/internal/log-ring.js +1 -1
  541. package/dist/internal/logs-client.js +1 -1
  542. package/dist/internal/mcp-endpoint.js +8 -8
  543. package/dist/internal/mcp-host.js +4 -4
  544. package/dist/internal/mcp-oauth-on-demand.js +3 -3
  545. package/dist/internal/mcp-oauth.js +5 -5
  546. package/dist/internal/net.js +2 -2
  547. package/dist/internal/otel/config.js +3 -3
  548. package/dist/internal/otel/runtime.js +13 -13
  549. package/dist/internal/peer-connections.js +2 -2
  550. package/dist/internal/platform-schedule-sync.js +1 -1
  551. package/dist/internal/platform-timers.js +1 -1
  552. package/dist/internal/playground/static.js +2 -2
  553. package/dist/internal/playground/toolchain.js +2 -2
  554. package/dist/internal/playground-proxy.js +3 -3
  555. package/dist/internal/process-memory-telemetry.js +1 -1
  556. package/dist/internal/reminder-runner.d.ts.map +1 -1
  557. package/dist/internal/reminder-runner.js +7 -7
  558. package/dist/internal/reminder-store.js +1 -1
  559. package/dist/internal/request-error-status.d.ts.map +1 -1
  560. package/dist/internal/request-error-status.js +9 -0
  561. package/dist/internal/resolved-connections.js +8 -8
  562. package/dist/internal/result-output.d.ts +14 -2
  563. package/dist/internal/result-output.d.ts.map +1 -1
  564. package/dist/internal/result-output.js +45 -2
  565. package/dist/internal/router.js +4 -4
  566. package/dist/internal/run-client.js +2 -2
  567. package/dist/internal/schedule-runner.js +6 -6
  568. package/dist/internal/scm/pr-url.d.ts +3 -1
  569. package/dist/internal/scm/pr-url.d.ts.map +1 -1
  570. package/dist/internal/scm/pr-url.js +10 -2
  571. package/dist/internal/sdk-runner.d.ts.map +1 -1
  572. package/dist/internal/sdk-runner.js +14 -15
  573. package/dist/internal/serve-restart.js +1 -1
  574. package/dist/internal/server.d.ts.map +1 -1
  575. package/dist/internal/server.js +81 -87
  576. package/dist/internal/session-cost.js +3 -3
  577. package/dist/internal/session-engine.d.ts +34 -0
  578. package/dist/internal/session-engine.d.ts.map +1 -1
  579. package/dist/internal/session-engine.js +380 -184
  580. package/dist/internal/session-run-log.d.ts.map +1 -1
  581. package/dist/internal/session-run-log.js +4 -4
  582. package/dist/internal/session-store.d.ts +47 -3
  583. package/dist/internal/session-store.d.ts.map +1 -1
  584. package/dist/internal/session-store.js +198 -33
  585. package/dist/internal/sessions-client.js +3 -3
  586. package/dist/internal/slack-thread-key.d.ts +7 -0
  587. package/dist/internal/slack-thread-key.d.ts.map +1 -0
  588. package/dist/internal/slack-thread-key.js +10 -0
  589. package/dist/internal/sleep.js +1 -1
  590. package/dist/internal/storage-coordinator.d.ts +17 -0
  591. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  592. package/dist/internal/storage-coordinator.js +111 -11
  593. package/dist/internal/storage.d.ts +2 -0
  594. package/dist/internal/storage.d.ts.map +1 -0
  595. package/dist/internal/storage.js +1 -0
  596. package/dist/internal/store-mirror.js +4 -4
  597. package/dist/internal/terminal-style.js +2 -2
  598. package/dist/internal/tool-result.js +3 -3
  599. package/dist/internal/trajectory.js +7 -7
  600. package/dist/internal/turn-governor.js +2 -2
  601. package/dist/internal/turn-outbox.js +1 -1
  602. package/dist/internal/update-check.js +2 -2
  603. package/dist/internal/v2-hosting.d.ts +9 -0
  604. package/dist/internal/v2-hosting.d.ts.map +1 -1
  605. package/dist/internal/v2-hosting.js +10 -0
  606. package/dist/internal/workspace.d.ts +13 -10
  607. package/dist/internal/workspace.d.ts.map +1 -1
  608. package/dist/internal/workspace.js +17 -16
  609. package/dist/kv/memory-kv.d.ts +6 -4
  610. package/dist/kv/memory-kv.d.ts.map +1 -1
  611. package/dist/kv/memory-kv.js +9 -7
  612. package/dist/kv.d.ts +4 -7
  613. package/dist/kv.d.ts.map +1 -1
  614. package/dist/kv.js +4 -7
  615. package/dist/otel-public.d.ts +7 -0
  616. package/dist/otel-public.d.ts.map +1 -0
  617. package/dist/otel-public.js +5 -0
  618. package/dist/otel.d.ts +7 -2
  619. package/dist/otel.d.ts.map +1 -1
  620. package/dist/otel.js +7 -2
  621. package/dist/playground/assets/index-BLlKgZtI.css +1 -0
  622. package/dist/playground/assets/index-CDS5p9sR.js +67 -0
  623. package/dist/playground/index.html +2 -2
  624. package/dist/prompt.js +1 -1
  625. package/dist/result.d.ts +10 -4
  626. package/dist/result.d.ts.map +1 -1
  627. package/dist/result.js +9 -3
  628. package/dist/storage-backends/cursor-hosted-v2.js +2 -2
  629. package/dist/storage-backends/cursor-hosted.d.ts +5 -17
  630. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  631. package/dist/storage-backends/cursor-hosted.js +6 -20
  632. package/dist/storage-backends/file-kv.js +7 -7
  633. package/dist/storage.d.ts +20 -2
  634. package/dist/storage.d.ts.map +1 -1
  635. package/dist/storage.js +7 -6
  636. package/dist/types.d.ts +67 -11
  637. package/dist/types.d.ts.map +1 -1
  638. package/dist/types.js +12 -4
  639. package/docs/README.md +83 -152
  640. package/docs/building-with-agents.md +13 -15
  641. package/docs/deployment.md +6 -7
  642. package/docs/evals.md +5 -5
  643. package/docs/guides/agent-to-agent.md +41 -84
  644. package/docs/guides/cloud-agents.md +25 -20
  645. package/docs/guides/github.md +1 -1
  646. package/docs/guides/grokbot-agents.md +27 -19
  647. package/docs/guides/mcp-oauth.md +1 -1
  648. package/docs/guides/opentelemetry.md +28 -41
  649. package/docs/guides/slack.md +53 -4
  650. package/docs/guides/webhooks.md +3 -4
  651. package/docs/hillclimbing.md +5 -5
  652. package/docs/quickstart.md +45 -106
  653. package/docs/reference/channels.md +0 -16
  654. package/docs/reference/cli.md +0 -16
  655. package/docs/reference/connections.md +3 -5
  656. package/docs/reference/extensions.md +2 -2
  657. package/docs/reference/hooks.md +2 -4
  658. package/docs/reference/http-api.md +5 -5
  659. package/docs/reference/playground.md +2 -2
  660. package/docs/reference/project-layout.md +3 -4
  661. package/docs/reference/sessions.md +5 -4
  662. package/docs/reference/subagents.md +2 -4
  663. package/docs/reference/tools.md +2 -5
  664. package/docs/troubleshooting.md +1 -2
  665. package/package.json +55 -37
  666. package/skills/framework-map/SKILL.md +2 -2
  667. package/skills/otel/SKILL.md +8 -18
  668. package/src/bin/agent-serve.ts +93 -72
  669. package/src/channels/bitbucket/api.ts +8 -8
  670. package/src/channels/bitbucket/binding.ts +4 -4
  671. package/src/channels/bitbucket/bitbucket-channel.ts +1 -1
  672. package/src/channels/bitbucket/bitbucket-webhook.ts +1 -1
  673. package/src/channels/bitbucket/checks.ts +3 -4
  674. package/src/channels/bitbucket/cursor-account.ts +1 -1
  675. package/src/channels/bitbucket/events.ts +1 -1
  676. package/src/channels/change-monitors/change-monitors-channel.ts +2 -2
  677. package/src/channels/checks.ts +5 -4
  678. package/src/channels/deployments/deployments-channel.ts +1 -1
  679. package/src/channels/github/api.ts +1 -1
  680. package/src/channels/github/checks.ts +1 -1
  681. package/src/channels/github/cursor-account.ts +3 -3
  682. package/src/channels/github/defaults.ts +8 -4
  683. package/src/channels/github/events.ts +1 -1
  684. package/src/channels/github/forward.ts +8 -8
  685. package/src/channels/github/github-channel.ts +19 -2
  686. package/src/channels/github/progress.ts +7 -2
  687. package/src/channels/github/state.ts +6 -0
  688. package/src/channels/github/types.ts +6 -0
  689. package/src/channels/gitlab/binding.ts +4 -4
  690. package/src/channels/gitlab/checks.ts +3 -4
  691. package/src/channels/gitlab/cursor-account.ts +1 -1
  692. package/src/channels/gitlab/events.ts +1 -1
  693. package/src/channels/gitlab/gitlab-channel.ts +1 -1
  694. package/src/channels/gitlab/gitlab-webhook.ts +1 -1
  695. package/src/channels/gitlab/replay.ts +2 -2
  696. package/src/channels/origin/binding.ts +6 -3
  697. package/src/channels/origin/checks.ts +27 -17
  698. package/src/channels/origin/cursor-account.ts +1 -1
  699. package/src/channels/origin/defaults.ts +5 -1
  700. package/src/channels/origin/events.ts +1 -1
  701. package/src/channels/origin/origin-channel.ts +2 -1
  702. package/src/channels/origin/origin-webhook.ts +2 -2
  703. package/src/channels/slack/agentic-delivery.ts +659 -0
  704. package/src/channels/slack/agentic-posted.ts +148 -0
  705. package/src/channels/slack/agentic-signals.ts +248 -0
  706. package/src/channels/slack/api.ts +51 -11
  707. package/src/channels/slack/approvals.ts +1 -1
  708. package/src/channels/slack/attachments.ts +1 -1
  709. package/src/channels/slack/auth.ts +3 -1
  710. package/src/channels/slack/blocks.ts +3 -3
  711. package/src/channels/slack/bot-mentions.ts +5 -7
  712. package/src/channels/slack/channel-watch.ts +1 -1
  713. package/src/channels/slack/cli-project.ts +3 -3
  714. package/src/channels/slack/defaults.ts +109 -37
  715. package/src/channels/slack/dispatch.ts +299 -170
  716. package/src/channels/slack/doctor.ts +1 -1
  717. package/src/channels/slack/eval-directive.ts +1 -1
  718. package/src/channels/slack/external-policy.ts +15 -2
  719. package/src/channels/slack/footer.ts +108 -0
  720. package/src/channels/slack/index.ts +2 -0
  721. package/src/channels/slack/interactive.ts +4 -2
  722. package/src/channels/slack/live-delivery.ts +23 -7
  723. package/src/channels/slack/log.ts +1 -1
  724. package/src/channels/slack/manifest.ts +1 -1
  725. package/src/channels/slack/nudge-carrier.ts +1 -1
  726. package/src/channels/slack/nudge-store.ts +2 -2
  727. package/src/channels/slack/paint-start.ts +93 -0
  728. package/src/channels/slack/placeholder.ts +315 -0
  729. package/src/channels/slack/progress-delivery.ts +14 -1
  730. package/src/channels/slack/reasoning-chip.ts +48 -0
  731. package/src/channels/slack/recording-sink.ts +176 -0
  732. package/src/channels/slack/reply-options.ts +71 -15
  733. package/src/channels/slack/setup.ts +1 -1
  734. package/src/channels/slack/slack-channel.ts +73 -13
  735. package/src/channels/slack/socket-mode.ts +2 -2
  736. package/src/channels/slack/thread-context.ts +5 -5
  737. package/src/channels/slack/tool-approval-events.ts +54 -38
  738. package/src/channels/slack/tool-cards.ts +1 -1
  739. package/src/channels/slack/tool-chip.ts +36 -0
  740. package/src/channels/slack/types.ts +47 -7
  741. package/src/channels/slack/upload.ts +142 -0
  742. package/src/channels.ts +12 -30
  743. package/src/dashboard-session-url.ts +32 -0
  744. package/src/evals/assertions.ts +19 -19
  745. package/src/evals/expect.ts +1 -1
  746. package/src/evals/judge.ts +1 -1
  747. package/src/evals/reporters.ts +8 -9
  748. package/src/evals/run-facts.ts +2 -2
  749. package/src/evals.ts +7 -10
  750. package/src/extensions/cursor-cloud-agents/extension.ts +1 -1
  751. package/src/extensions/cursor-cloud-agents/lib/backend.ts +3 -3
  752. package/src/extensions/cursor-cloud-agents/lib/fleet.ts +1 -1
  753. package/src/extensions/cursor-cloud-agents/lib/repos.ts +3 -3
  754. package/src/extensions/cursor-cloud-agents/lib/transcript.ts +3 -4
  755. package/src/extensions/cursor-cloud-agents/tools/list.ts +1 -1
  756. package/src/extensions/improve/skills/yourself.ts +1 -1
  757. package/src/extensions/slack-communication/evals/harness.ts +728 -0
  758. package/src/extensions/slack-communication/evals/slack-communication.eval.ts +953 -0
  759. package/src/extensions/slack-communication/evals/slack-placeholder.eval.ts +194 -0
  760. package/src/extensions/slack-communication/extension.ts +45 -0
  761. package/src/extensions/slack-communication/skills/slack-voice.ts +59 -0
  762. package/src/extensions/slack-communication/tools/delete-message.ts +34 -0
  763. package/src/extensions/slack-communication/tools/edit-message.ts +42 -0
  764. package/src/extensions/slack-communication/tools/post-card.ts +28 -0
  765. package/src/extensions/slack-communication/tools/post-file.ts +85 -0
  766. package/src/extensions/slack-communication/tools/post-update.ts +41 -0
  767. package/src/extensions/slack-communication/tools/react.ts +33 -0
  768. package/src/extensions/slack-communication/tools/set-status.ts +21 -0
  769. package/src/files-backends/cursor-hosted.ts +502 -98
  770. package/src/files-backends/local-fs.ts +1 -1
  771. package/src/files.ts +15 -0
  772. package/src/filesystem.ts +16 -18
  773. package/src/index.ts +4 -36
  774. package/src/internal/advertise-tools.ts +6 -6
  775. package/src/internal/approval-gate.ts +1 -1
  776. package/src/internal/artifacts-store.ts +3 -3
  777. package/src/internal/as-of.ts +2 -2
  778. package/src/internal/authored-alias-hooks.ts +1 -1
  779. package/src/internal/authored-loaders.ts +2 -3
  780. package/src/internal/builtin-tools/reminders.ts +2 -2
  781. package/src/internal/chat-client.ts +5 -5
  782. package/src/internal/cli-ax.ts +84 -14
  783. package/src/internal/cli-bitbucket.ts +11 -11
  784. package/src/internal/cli-convert-automation.ts +2 -2
  785. package/src/internal/cli-cursor.ts +5 -16
  786. package/src/internal/cli-deploy.ts +389 -104
  787. package/src/internal/cli-docs.ts +5 -5
  788. package/src/internal/cli-github.ts +16 -19
  789. package/src/internal/cli-gitlab.ts +11 -11
  790. package/src/internal/cli-manifest.ts +1 -1
  791. package/src/internal/cli-mcp-oauth.ts +5 -7
  792. package/src/internal/cli-mcp.ts +3 -3
  793. package/src/internal/cli-skills.ts +2 -2
  794. package/src/internal/cli-slack.ts +5 -5
  795. package/src/internal/cloud-turn-cost.ts +1 -1
  796. package/src/internal/continuation-identity.ts +13 -9
  797. package/src/internal/conversation-mirror.ts +36 -3
  798. package/src/internal/convert-automation/convert-workflow.ts +27 -27
  799. package/src/internal/convert-automation/types.ts +9 -0
  800. package/src/internal/cursor/account-mcp.ts +48 -31
  801. package/src/internal/cursor/backend-client.ts +28 -17
  802. package/src/internal/cursor/credentials.ts +1 -1
  803. package/src/internal/cursor/hosted-store-secrets.ts +34 -0
  804. package/src/internal/cursor-account-mcp-auth.ts +9 -9
  805. package/src/internal/cursor-deployment-relay.ts +10 -10
  806. package/src/internal/cursor-event-relay.ts +10 -10
  807. package/src/internal/cursor-relay-core.ts +2 -2
  808. package/src/internal/deploy-client.ts +266 -24
  809. package/src/internal/deploy-manifest.ts +46 -8
  810. package/src/internal/discovery/agent-config.ts +34 -0
  811. package/src/internal/discovery/agent.ts +14 -6
  812. package/src/internal/discovery/channels.ts +4 -4
  813. package/src/internal/discovery/connections.ts +4 -4
  814. package/src/internal/discovery/cursor-plugin.ts +12 -12
  815. package/src/internal/discovery/extension-overlay.ts +3 -3
  816. package/src/internal/discovery/extensions.ts +6 -6
  817. package/src/internal/discovery/info.ts +9 -9
  818. package/src/internal/discovery/instructions.ts +1 -1
  819. package/src/internal/discovery/project.ts +4 -4
  820. package/src/internal/discovery/services.ts +1 -1
  821. package/src/internal/discovery/tools.ts +1 -1
  822. package/src/internal/docs-site.ts +2 -2
  823. package/src/internal/env-file.ts +2 -2
  824. package/src/internal/eval-run-store.ts +7 -9
  825. package/src/internal/eval-runner.ts +20 -20
  826. package/src/internal/evals-client.ts +6 -6
  827. package/src/internal/event-log.ts +10 -10
  828. package/src/internal/event-mapper.ts +37 -2
  829. package/src/internal/filesystem/format.ts +11 -12
  830. package/src/internal/filesystem/scratch.ts +3 -3
  831. package/src/internal/filesystem/tools.ts +6 -8
  832. package/src/internal/filesystem/walk.ts +1 -1
  833. package/src/internal/framework-file-storage.ts +104 -4
  834. package/src/internal/framework-storage-selection.ts +2 -12
  835. package/src/internal/github-fanout.ts +4 -4
  836. package/src/internal/guest-network.ts +4 -4
  837. package/src/internal/host-files.ts +1 -1
  838. package/src/internal/host-kv.ts +2 -2
  839. package/src/internal/hosted-admission-adapter.ts +2 -0
  840. package/src/internal/hosted-catch-protocol.ts +3 -5
  841. package/src/internal/hosted-catch.ts +1 -1
  842. package/src/internal/hosted-delivery-protocol.ts +111 -13
  843. package/src/internal/hosted-delivery.ts +286 -81
  844. package/src/internal/hosted-execution-diag.ts +3 -3
  845. package/src/internal/hosted-execution-latency.ts +334 -0
  846. package/src/internal/hosting.ts +5 -6
  847. package/src/internal/http-channel-define.ts +27 -0
  848. package/src/internal/http-channel.ts +3 -4
  849. package/src/internal/http-control-plane-session.ts +24 -11
  850. package/src/internal/incoming-headers-to-fetch.ts +54 -0
  851. package/src/internal/init-interview.ts +7 -7
  852. package/src/internal/init-project.ts +14 -16
  853. package/src/internal/init-scaffold.ts +1 -1
  854. package/src/internal/inline-stdio-mcp.ts +2 -2
  855. package/src/internal/install-cursor-skills.ts +11 -11
  856. package/src/internal/json-schema.ts +1 -1
  857. package/src/internal/local-control-plane.ts +4 -5
  858. package/src/internal/local-env.ts +3 -3
  859. package/src/internal/log-ring.ts +1 -1
  860. package/src/internal/logs-client.ts +1 -1
  861. package/src/internal/mcp-endpoint.ts +10 -10
  862. package/src/internal/mcp-host.ts +9 -9
  863. package/src/internal/mcp-oauth-on-demand.ts +3 -3
  864. package/src/internal/mcp-oauth.ts +5 -5
  865. package/src/internal/net.ts +2 -2
  866. package/src/internal/otel/config.ts +3 -3
  867. package/src/internal/otel/runtime.ts +14 -14
  868. package/src/internal/peer-connections.ts +2 -2
  869. package/src/internal/platform-schedule-sync.ts +1 -1
  870. package/src/internal/platform-timers.ts +1 -1
  871. package/src/internal/playground/static.ts +2 -2
  872. package/src/internal/playground/toolchain.ts +2 -2
  873. package/src/internal/playground-proxy.ts +3 -3
  874. package/src/internal/process-memory-telemetry.ts +1 -1
  875. package/src/internal/reminder-runner.ts +8 -10
  876. package/src/internal/reminder-store.ts +1 -1
  877. package/src/internal/request-error-status.ts +9 -0
  878. package/src/internal/resolved-connections.ts +8 -8
  879. package/src/internal/result-output.ts +62 -5
  880. package/src/internal/router.ts +4 -4
  881. package/src/internal/run-client.ts +2 -2
  882. package/src/internal/schedule-runner.ts +6 -6
  883. package/src/internal/scm/pr-url.ts +11 -2
  884. package/src/internal/sdk-runner.ts +14 -28
  885. package/src/internal/serve-restart.ts +1 -1
  886. package/src/internal/server.ts +97 -99
  887. package/src/internal/session-cost.ts +3 -3
  888. package/src/internal/session-engine.ts +504 -244
  889. package/src/internal/session-run-log.ts +4 -6
  890. package/src/internal/session-store.ts +213 -39
  891. package/src/internal/sessions-client.ts +3 -3
  892. package/src/internal/slack-thread-key.ts +11 -0
  893. package/src/internal/sleep.ts +1 -1
  894. package/src/internal/storage-coordinator.ts +118 -21
  895. package/src/internal/storage.ts +1 -0
  896. package/src/internal/store-mirror.ts +4 -4
  897. package/src/internal/terminal-style.ts +2 -2
  898. package/src/internal/tool-result.ts +3 -3
  899. package/src/internal/trajectory.ts +7 -7
  900. package/src/internal/turn-governor.ts +2 -2
  901. package/src/internal/turn-outbox.ts +1 -1
  902. package/src/internal/update-check.ts +2 -2
  903. package/src/internal/v2-hosting.ts +14 -0
  904. package/src/internal/workspace.ts +17 -17
  905. package/src/kv/memory-kv.ts +9 -7
  906. package/src/kv.ts +4 -7
  907. package/src/otel-public.ts +24 -0
  908. package/src/otel.ts +7 -2
  909. package/src/prompt.ts +1 -1
  910. package/src/result.ts +10 -8
  911. package/src/storage-backends/cursor-hosted-v2.ts +2 -2
  912. package/src/storage-backends/cursor-hosted.ts +6 -23
  913. package/src/storage-backends/file-kv.ts +7 -7
  914. package/src/storage.ts +22 -7
  915. package/src/types.ts +82 -17
  916. package/templates/agentic-owners/agent/channels/github.ts +3 -6
  917. package/templates/agentic-owners/agent/lib/github.ts +5 -5
  918. package/templates/agentic-owners/agent/lib/owners/decision.ts +13 -10
  919. package/templates/agentic-owners/agent/lib/owners/handles.ts +2 -2
  920. package/templates/agentic-owners/agent/lib/owners/match.ts +3 -3
  921. package/templates/agentic-owners/agent/lib/owners/matching.ts +1 -1
  922. package/templates/agentic-owners/agent/lib/owners/parse.ts +4 -9
  923. package/templates/agentic-owners/agent/lib/owners/prompt.ts +1 -1
  924. package/templates/agentic-owners/agent/lib/review.ts +37 -30
  925. package/templates/agentic-owners/evals/owners.eval.ts +2 -2
  926. package/templates/agentic-owners/package.json +1 -1
  927. package/templates/agents-md/agent/lib/collect.ts +16 -10
  928. package/templates/agents-md/agent/lib/config.ts +1 -1
  929. package/templates/agents-md/agent/tools/apply_agents.ts +10 -8
  930. package/templates/agents-md/package.json +1 -1
  931. package/templates/code-wiki/agent/channels/github.ts +4 -7
  932. package/templates/code-wiki/agent/lib/repos.ts +1 -1
  933. package/templates/code-wiki/agent/tools/apply_wiki.ts +3 -4
  934. package/templates/code-wiki/package.json +1 -1
  935. package/templates/demo/agent/lib/collect.ts +6 -2
  936. package/templates/demo/agent/lib/repos.ts +1 -1
  937. package/templates/demo/agent/tools/record_demo.ts +1 -1
  938. package/templates/demo/evals/demo.eval.ts +1 -5
  939. package/templates/demo/package.json +1 -1
  940. package/templates/grokbot-agents/package.json +1 -1
  941. package/templates/pr-autofixer/agent/channels/github.ts +16 -13
  942. package/templates/pr-autofixer/agent/lib/merge-watch.ts +2 -4
  943. package/templates/pr-autofixer/agent/lib/repos.ts +2 -2
  944. package/templates/pr-autofixer/agent/lib/webhook-routing.ts +1 -1
  945. package/templates/pr-autofixer/package.json +1 -1
  946. package/templates/security-help/agent/lib/repos.ts +1 -1
  947. package/templates/security-help/package.json +1 -1
  948. package/templates/security-reviewer/agent/lib/repos.ts +1 -1
  949. package/templates/security-reviewer/agent/tools/post_findings.ts +1 -3
  950. package/templates/security-reviewer/package.json +1 -1
  951. package/templates/triage/agent/lib/actuate.ts +26 -41
  952. package/templates/triage/agent/lib/parse-queue-event.ts +2 -1
  953. package/templates/triage/agent/lib/verify-webhook.ts +10 -5
  954. package/templates/triage/agent/tools/record_triage.ts +1 -4
  955. package/templates/triage/package.json +1 -1
  956. package/dist/client.d.ts +0 -14
  957. package/dist/client.d.ts.map +0 -1
  958. package/dist/client.js +0 -12
  959. package/dist/docs/assets/app.Cr-wVbnB.js +0 -1
  960. package/dist/docs/assets/chunks/@localSearchIndexroot.CFVQ4S17.js +0 -1
  961. package/dist/docs/assets/chunks/framework.BCISBCiQ.js +0 -19
  962. package/dist/docs/assets/concepts.md.B4o63Gul.js +0 -1
  963. package/dist/docs/assets/concepts.md.B4o63Gul.lean.js +0 -1
  964. package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.js +0 -10
  965. package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.lean.js +0 -1
  966. package/dist/docs/assets/guides_grokbot-agents.md.DyV-WArv.js +0 -9
  967. package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.js +0 -28
  968. package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.lean.js +0 -1
  969. package/dist/docs/assets/hillclimbing.md.BOiVo1tf.js +0 -4
  970. package/dist/docs/assets/hillclimbing.md.BOiVo1tf.lean.js +0 -1
  971. package/dist/docs/assets/index.md.DD9Q2XuJ.js +0 -5
  972. package/dist/docs/assets/index.md.DD9Q2XuJ.lean.js +0 -1
  973. package/dist/docs/assets/quickstart.md.DdQOF7Y8.lean.js +0 -1
  974. package/dist/docs/assets/reference_result.md.BK5SxDrf.js +0 -19
  975. package/dist/docs/assets/reference_result.md.BK5SxDrf.lean.js +0 -1
  976. package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.js +0 -1
  977. package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.lean.js +0 -1
  978. package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.js +0 -8
  979. package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.lean.js +0 -1
  980. package/dist/docs/assets/skills_debug.md.CVjCXMFF.js +0 -1
  981. package/dist/docs/assets/skills_debug.md.CVjCXMFF.lean.js +0 -1
  982. package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.js +0 -35
  983. package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.lean.js +0 -1
  984. package/dist/docs/assets/skills_evals.md.DFxYPErF.js +0 -25
  985. package/dist/docs/assets/skills_evals.md.DFxYPErF.lean.js +0 -1
  986. package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.js +0 -1
  987. package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.lean.js +0 -1
  988. package/dist/docs/assets/skills_github.md.hgFX_oKY.js +0 -16
  989. package/dist/docs/assets/skills_github.md.hgFX_oKY.lean.js +0 -1
  990. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.js +0 -7
  991. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.lean.js +0 -1
  992. package/dist/docs/assets/skills_index.md.DL7EHaQ-.js +0 -1
  993. package/dist/docs/assets/skills_index.md.DL7EHaQ-.lean.js +0 -1
  994. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.js +0 -18
  995. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.lean.js +0 -1
  996. package/dist/docs/assets/skills_otel.md.B5Ddv1xH.js +0 -8
  997. package/dist/docs/assets/skills_otel.md.B5Ddv1xH.lean.js +0 -1
  998. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.js +0 -20
  999. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.lean.js +0 -1
  1000. package/dist/docs/assets/storage.md.BUrhJ-Zz.js +0 -30
  1001. package/dist/docs/assets/storage.md.BUrhJ-Zz.lean.js +0 -1
  1002. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.js +0 -2
  1003. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.lean.js +0 -1
  1004. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +0 -2
  1005. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +0 -1
  1006. package/dist/docs/assets/templates_demo.md.BeQX9V3H.js +0 -4
  1007. package/dist/docs/assets/templates_demo.md.BeQX9V3H.lean.js +0 -1
  1008. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.js +0 -3
  1009. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.lean.js +0 -1
  1010. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.js +0 -4
  1011. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.lean.js +0 -1
  1012. package/dist/docs/concepts.html +0 -27
  1013. package/dist/docs/concepts.md +0 -166
  1014. package/dist/docs/design/filesystem.md +0 -376
  1015. package/dist/docs/design/runtime-abstraction.md +0 -1756
  1016. package/dist/docs/guides/human-in-the-loop.html +0 -54
  1017. package/dist/docs/guides/human-in-the-loop.md +0 -126
  1018. package/dist/docs/reference/result.html +0 -45
  1019. package/dist/docs/reference/result.md +0 -89
  1020. package/dist/docs/scaffolding-agents.html +0 -27
  1021. package/dist/docs/scaffolding-agents.md +0 -130
  1022. package/dist/docs/skills/create-agent.html +0 -34
  1023. package/dist/docs/skills/create-agent.md +0 -160
  1024. package/dist/docs/skills/debug.html +0 -27
  1025. package/dist/docs/skills/debug.md +0 -36
  1026. package/dist/docs/skills/deploy.html +0 -61
  1027. package/dist/docs/skills/deploy.md +0 -161
  1028. package/dist/docs/skills/evals.html +0 -51
  1029. package/dist/docs/skills/evals.md +0 -137
  1030. package/dist/docs/skills/framework-map.html +0 -27
  1031. package/dist/docs/skills/framework-map.md +0 -99
  1032. package/dist/docs/skills/github.html +0 -42
  1033. package/dist/docs/skills/github.md +0 -93
  1034. package/dist/docs/skills/hillclimb.html +0 -33
  1035. package/dist/docs/skills/hillclimb.md +0 -55
  1036. package/dist/docs/skills/index.html +0 -27
  1037. package/dist/docs/skills/index.md +0 -21
  1038. package/dist/docs/skills/mcp-auth.html +0 -44
  1039. package/dist/docs/skills/mcp-auth.md +0 -76
  1040. package/dist/docs/skills/otel.html +0 -34
  1041. package/dist/docs/skills/otel.md +0 -53
  1042. package/dist/docs/skills/setup-slack.html +0 -46
  1043. package/dist/docs/skills/setup-slack.md +0 -141
  1044. package/dist/docs/storage.html +0 -56
  1045. package/dist/docs/storage.md +0 -167
  1046. package/dist/docs/templates/agents-md.html +0 -28
  1047. package/dist/docs/templates/agents-md.md +0 -105
  1048. package/dist/docs/templates/code-wiki.html +0 -28
  1049. package/dist/docs/templates/code-wiki.md +0 -91
  1050. package/dist/docs/templates/demo.html +0 -30
  1051. package/dist/docs/templates/demo.md +0 -80
  1052. package/dist/docs/templates/grokbot-agents.html +0 -29
  1053. package/dist/docs/templates/grokbot-agents.md +0 -48
  1054. package/dist/docs/templates/security-help.html +0 -30
  1055. package/dist/docs/templates/security-help.md +0 -65
  1056. package/dist/internal/tenant-slack/relay.d.ts +0 -75
  1057. package/dist/internal/tenant-slack/relay.d.ts.map +0 -1
  1058. package/dist/internal/tenant-slack/relay.js +0 -148
  1059. package/dist/playground/assets/index-Bhxzrcf6.css +0 -1
  1060. package/dist/playground/assets/index-CqLX5uF3.js +0 -67
  1061. package/docs/concepts.md +0 -171
  1062. package/docs/design/filesystem.md +0 -376
  1063. package/docs/design/runtime-abstraction.md +0 -1756
  1064. package/docs/guides/human-in-the-loop.md +0 -131
  1065. package/docs/reference/result.md +0 -94
  1066. package/docs/scaffolding-agents.md +0 -135
  1067. package/docs/skills/index.md +0 -26
  1068. package/docs/storage.md +0 -172
  1069. package/docs/templates/agents-md.md +0 -110
  1070. package/docs/templates/code-wiki.md +0 -96
  1071. package/docs/templates/demo.md +0 -85
  1072. package/docs/templates/grokbot-agents.md +0 -53
  1073. package/docs/templates/security-help.md +0 -70
  1074. package/src/client.ts +0 -23
  1075. package/src/internal/tenant-slack/relay.ts +0 -203
  1076. package/templates/pr-autofixer/agent/storage.ts +0 -7
@@ -0,0 +1,20 @@
1
+ import{_ as y,s as Nt,g as zt,t as At,q as Xt,a as Ct,b as Et,l as et,L as Tt,e as Yt,A as Bt,c as H,i as Rt}from"../app.Drol6mi6.js";import{p as Ft}from"./chunk-4BX2VUAB.CELMmMDA.js";import{p as Ot}from"./wardley-RL74JXVD.g5efOWmT.js";import"./framework.dypDpWZ3.js";import"./theme.C0MctGaz.js";import"./min.DVBtLK-B.js";import"./baseUniq.xwtXO-yt.js";var q=y((a,r)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),Y=y((a,r,e)=>({x:q(r,`${e} evolution`),y:q(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),It=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const r=/^\+'([^']*)'/.exec(a),e=r==null?void 0:r[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=y((a,r)=>{if(Ft(a,r),a.size&&r.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(o=>o.secondName?`${o.name.trim()} / ${o.secondName.trim()}`:o.name.trim()),h=a.evolution.stages.filter(o=>o.boundary!==void 0).map(o=>o.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(a.anchors.forEach(e=>{const h=Y(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),a.components.forEach(e=>{var v;const h=Y(e.visibility,e.evolution,`Component "${e.name}"`),o=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",o,d,e.inertia,m)}),a.notes.forEach(e=>{const h=Y(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),a.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const o=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,X=q(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,X,o,"pipeline-component",v,g),r.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let o=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=It(e.arrow);!o&&d&&(o=d);const v=e.linkLabel,g=m??v;r.addLink(e.from,e.to,h,g,o)}),a.evolves.forEach(e=>{const h=r.getNode(e.component);if((h==null?void 0:h.y)!==void 0){const o=q(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,o,h.y)}}),a.annotations.length>0){const e=a.annotations[0],h=Y(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}a.annotation.forEach(e=>{const h=Y(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),a.accelerators.forEach(e=>{const h=Y(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),a.deaccelerators.forEach(e=>{const h=Y(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var h;const r=await Ot("wardley",a);et.debug(r);const e=(h=at.parser)==null?void 0:h.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},R,Dt=(R=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const o=this.nodes.get(e);o&&(o.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(R,"WardleyBuilder"),R),P=new Dt;function L(a){const r=H();return Rt(a.trim(),r)}y(L,"textSanitizer");function rt(){return H()["wardley-beta"]}y(rt,"getConfig");function ot(a,r,e,h,o,d,m,v,g){P.addNode({id:a,label:L(r),x:e,y:h,className:o,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,r,e=!1,h,o){P.addLink({source:a,target:r,dashed:e,label:h,flow:o})}y(st,"addLink");function nt(a,r,e){P.addTrend({nodeId:a,targetX:r,targetY:e})}y(nt,"addTrend");function it(a,r,e){P.addAnnotation({number:a,coordinates:r,text:e?L(e):void 0})}y(it,"addAnnotation");function dt(a,r,e){P.addNote({text:L(a),x:r,y:e})}y(dt,"addNote");function lt(a,r,e){P.addAccelerator({name:L(a),x:r,y:e})}y(lt,"addAccelerator");function ct(a,r,e){P.addDeaccelerator({name:L(a),x:r,y:e})}y(ct,"addDeaccelerator");function pt(a,r){P.setAnnotationsBox(a,r)}y(pt,"setAnnotationsBox");function ht(a,r){P.setSize(a,r)}y(ht,"setSize");function xt(a){P.startPipeline(a)}y(xt,"startPipeline");function ft(a,r){P.addPipelineComponent(a,r)}y(ft,"addPipelineComponent");function gt(a){const r={};a.xLabel&&(r.xLabel=L(a.xLabel)),a.yLabel&&(r.yLabel=L(a.yLabel)),a.stages&&(r.stages=a.stages.map(e=>L(e))),a.stageBoundaries&&(r.stageBoundaries=a.stageBoundaries),P.setAxes(r)}y(gt,"updateAxes");function ut(a){return P.getNode(a)}y(ut,"getNode");function yt(){return P.build()}y(yt,"getWardleyData");function mt(){P.clear(),Bt()}y(mt,"clear");var Gt={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,getWardleyData:yt,clear:mt,setAccTitle:Et,getAccTitle:Ct,setDiagramTitle:Xt,getDiagramTitle:At,getAccDescription:zt,setAccDescription:Nt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=y(()=>{var r,e,h,o,d,m,v,g,X,M,b,N;const{themeVariables:a}=H();return{backgroundColor:((r=a.wardley)==null?void 0:r.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((h=a.wardley)==null?void 0:h.axisTextColor)??a.primaryTextColor??"#222",gridColor:((o=a.wardley)==null?void 0:o.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((X=a.wardley)==null?void 0:X.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((b=a.wardley)==null?void 0:b.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((N=a.wardley)==null?void 0:N.annotationFill)??a.background??"#fff"}},"getTheme"),jt=y(()=>{const a=H()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),_t=y((a,r,e,h)=>{var K,Q;et.debug(`Rendering Wardley map
2
+ `+a);const o=jt(),d=Ht(),m=o.nodeRadius*1.6,v=h.db,g=v.getWardleyData(),X=v.getDiagramTitle(),M=((K=g.size)==null?void 0:K.width)??o.width,b=((Q=g.size)==null?void 0:Q.height)??o.height,N=Tt(r);N.selectAll("*").remove(),Yt(N,b,M,o.useMaxWidth),N.attr("viewBox",`0 0 ${M} ${b}`);const S=N.append("g").attr("class","wardley-map"),j=N.append("defs");j.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),j.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),j.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),S.append("rect").attr("class","wardley-background").attr("width",M).attr("height",b).attr("fill",d.backgroundColor);const F=M-o.padding*2,O=b-o.padding*2;X&&S.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",o.padding/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(X);const C=y(t=>o.padding+t/100*F,"projectX"),E=y(t=>b-o.padding-t/100*O,"projectY"),W=S.append("g").attr("class","wardley-axes");W.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1),W.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";W.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+F/2).attr("y",b-o.padding/4).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),W.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+O/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+O/2})`).text(bt);const I=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(I.length>0){const t=S.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===I.length){let i=0;n.forEach(p=>{s.push({start:i,end:p}),i=p})}else{const i=1/I.length;I.forEach((p,l)=>{s.push({start:l*i,end:(l+1)*i})})}I.forEach((i,p)=>{const l=s[p],x=o.padding+l.start*F,f=o.padding+l.end*F,u=(x+f)/2;p>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",b-o.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(o.showGrid){const t=S.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=o.padding+F*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding-O*s).attr("y2",b-o.padding-O*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:C(t.x),y:E(t.y),node:t})}),g.pipelines.length>0){const t=S.append("g").attr("class","wardley-pipelines"),n=S.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(p=Math.min(p,u.x),l=Math.max(l,u.x),x=u.y)}),p!==1/0&&l!==-1/0){const u=o.nodeRadius*4,w=x-u/2,$=c.get(s.nodeId);if($){const A=(p+l)/2;$.x=A,$.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",w).attr("width",l-p+15*2).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const Z=S.append("g").attr("class","wardley-links"),U=new Map;g.pipelines.forEach(t=>{U.set(t.nodeId,new Set(t.componentIds))});const J=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=U.get(t.target);return!(n!=null&&n.has(t.source))});Z.selectAll("line").data(J).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*p}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*p}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*p}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),Z.selectAll("text").data(J.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+p*p),f=8,u=p/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,p=s.x-n.x,l=s.y-n.y,x=Math.sqrt(p*p+l*l),f=8,u=-p/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,$=-l/f,A=i+w*u,D=p+$*u;let B=Math.atan2(x,l)*180/Math.PI;return(B>90||B<-90)&&(B+=180),`rotate(${B} ${A} ${D})`}).text(t=>t.label);const kt=S.append("g").attr("class","wardley-trends"),Pt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=C(t.targetX),i=E(t.targetY),p=s-n.x,l=i-n.y,x=Math.sqrt(p*p+l*l),f=o.nodeRadius+2,u=x>f?s-p/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);kt.selectAll("line").data(Pt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const z=S.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));z.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=z.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const _=o.nodeRadius*.7,k=o.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-k).attr("x2",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-k).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-k).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),z.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),z.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",o.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=S.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:C(i.x),y:E(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=C(g.annotationsBox.x),s=E(g.annotationsBox.y);const i=10,p=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,$)=>w.number-$.number),u=[];if(f.forEach((w,$)=>{const A=x.append("text").attr("x",n+i).attr("y",s+i+($+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(A)}),u.length>0){let w=0,$=0;u.forEach(V=>{const G=V.node(),Mt=G.getComputedTextLength();w=Math.max(w,Mt);const Lt=G.getBBox();$=Math.max($,Lt.height)});const A=w+i*2+105,D=f.length*p+i*2+$/2,B=o.padding,vt=M-o.padding-A,St=o.padding,$t=b-o.padding-D;n=Math.max(B,Math.min(n,vt)),s=Math.max(St,Math.min(s,$t)),u.forEach((V,G)=>{V.attr("x",n+i).attr("y",s+i+(G+1)*p)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",A).attr("height",D).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=S.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=C(n.x),i=E(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=S.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=C(n.x),i=E(n.y),p=60,l=30,x=20,f=`
3
+ M ${s} ${i-l/2}
4
+ L ${s+p-x} ${i-l/2}
5
+ L ${s+p-x} ${i-l/2-8}
6
+ L ${s+p} ${i}
7
+ L ${s+p-x} ${i+l/2+8}
8
+ L ${s+p-x} ${i+l/2}
9
+ L ${s} ${i+l/2}
10
+ Z
11
+ `;t.append("path").attr("d",f).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+p/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.name)})}if(g.deaccelerators.length>0){const t=S.append("g").attr("class","wardley-deaccelerators");g.deaccelerators.forEach(n=>{const s=C(n.x),i=E(n.y),p=60,l=30,x=20,f=`
12
+ M ${s+p} ${i-l/2}
13
+ L ${s+x} ${i-l/2}
14
+ L ${s+x} ${i-l/2-8}
15
+ L ${s} ${i}
16
+ L ${s+x} ${i+l/2+8}
17
+ L ${s+x} ${i+l/2}
18
+ L ${s+p} ${i+l/2}
19
+ Z
20
+ `;t.append("path").attr("d",f).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+p/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.name)})}},"draw"),Vt={draw:_t},re={parser:at,db:Gt,renderer:Vt,styles:y(()=>"","styles")};export{re as diagram};
@@ -0,0 +1,7 @@
1
+ import{_ as a,s as gi,g as xi,t as Xt,q as di,a as fi,b as pi,l as Yt,L as mi,e as yi,A as bi,F as _t,H as Nt,I as Ai,a1 as wi,i as Ci,aC as Si,a9 as Wt}from"../app.Drol6mi6.js";import{i as _i}from"./init.Gi6I4Gst.js";import{o as ki}from"./ordinal.DBvzRdQf.js";import{l as zt}from"./linear.D2GM4p4b.js";import"./framework.dypDpWZ3.js";import"./theme.C0MctGaz.js";import"./defaultLocale.C4B-KCzX.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var I=Ri(y).map(function(m){return v+o*m});return i(E?I.reverse():I)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],I=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&&gt.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
2
+ `+D.showPosition()+`
3
+ Expecting `+gt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:pt,expected:gt})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+M);switch(z[0]){case 1:g.push(M),C.push(D.yytext),r.push(D.yylloc),g.push(z[1]),M=null,It=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[z[1]][1],G.$=C[C.length-N],G._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},ci&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(G,[d,It,ct,$.yy,z[1],C,r].concat(li)),typeof mt<"u")return mt;N&&(g=g.slice(0,-1*N*2),C=C.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[z[1]][0]),C.push(G.$),r.push(G._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},k=function(){var F={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
5
+ `+c+"^"},"showPosition"),test_match:a(function(h,c){var g,x,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),x=h[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],g=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var r in C)this[r]=C[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,c,g,x;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),r=0;r<C.length;r++)if(g=this._input.match(this.rules[C[r]]),g&&(!c||g[0].length>c[0].length)){if(c=g,x=r,this.options.backtrack_lexer){if(h=this.test_match(g,C[r]),h!==!1)return h;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(h=this.test_match(c,C[x]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var c=this.next();return c||this.lex()},"lex"),begin:a(function(c){this.conditionStack.push(c)},"begin"),popState:a(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:a(function(c){this.begin(c)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(c,g,x,C){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return F}();V.lexer=k;function H(){this.yy={}}return a(H,"Parser"),H.prototype=V,V.Parser=H,new H}();At.parser=At;var Ti=At;function wt(e){return e.type==="bar"}a(wt,"isBarPlot");function kt(e){return e.type==="band"}a(kt,"isBandAxisData");function j(e){return e.type==="linear"}a(j,"isLinearAxisData");var Q,Ht=(Q=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,u)=>Math.max(u.length,o),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const u=Si(n,1,o),p=u?u.width:o.length*i,f=u?u.height:i;s.width=Math.max(s.width,p),s.height=Math.max(s.height,f)}return n.remove(),s}},a(Q,"TextDimensionCalculatorWithFont"),Q),Ot=.7,Ft=.2,K,Ut=(K=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ot*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ot*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=Ft*t.width;this.outerPadding=Math.min(s.width/2,n);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=Ft*t.height;this.outerPadding=Math.min(s.height/2,n);const o=s.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(K,"BaseAxis"),K),Z,Di=(Z=class extends Ut{constructor(t,i,s,n,o){super(t,n,o,i),this.categories=s,this.scale=bt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=bt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Yt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},a(Z,"BandAxis"),Z),J,vi=(J=class extends Ut{constructor(t,i,s,n,o){super(t,n,o,i),this.domain=s,this.scale=zt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=zt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(J,"LinearAxis"),J);function Ct(e,t,i,s){const n=new Ht(s);return kt(e)?new Di(t,i,e.categories,e.title,n):new vi(t,i,[e.min,e.max],e.title,n)}a(Ct,"getAxis");var tt,Pi=(tt=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(tt,"ChartTitle"),tt);function $t(e,t,i,s){const n=new Ht(s);return new Pi(n,e,t,i)}a($t,"getChartTitleComponent");var it,Li=(it=class{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let i;return this.orientation==="horizontal"?i=Wt().y(s=>s[0]).x(s=>s[1])(t):i=Wt().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},a(it,"LinePlot"),it),et,Ei=(et=class{constructor(t,i,s,n,o,u){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=u}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(et,"BarPlot"),et),st,Ii=(st=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new Li(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new Ei(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}},a(st,"BasePlot"),st);function qt(e,t,i){return new Ii(e,t,i)}a(qt,"getPlotComponent");var nt,Mi=(nt=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:$t(t,i,s,n),plot:qt(t,i,s),xAxis:Ct(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Ct(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:o,height:u});t-=p.width,i-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=p.height,i-=p.height,this.componentStore.xAxis.setAxisPosition("bottom"),p=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=p.height,this.componentStore.yAxis.setAxisPosition("left"),p=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=p.width,t-=p.width,t>0&&(o+=t,t=0),i>0&&(u+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+u}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(f=>wt(f))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,u=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:u,height:p});t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=f.height,o=s+f.height,t>0&&(u+=t,t=0),i>0&&(p+=i,i=0),this.componentStore.plot.calculateSpace({width:u,height:p}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+p]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(T=>wt(T))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(nt,"Orchestrator"),nt),at,Vi=(at=class{static build(t,i,s,n){return new Mi(t,i,s,n).getDrawableElement()}},a(at,"XYChartBuilder"),at),ot=0,Gt,ht=Dt(),lt=Tt(),A=vt(),St=lt.plotColorPalette.split(",").map(e=>e.trim()),xt=!1,Rt=!1;function Tt(){const e=wi(),t=_t();return Nt(e.xyChart,t.themeVariables.xyChart)}a(Tt,"getChartDefaultThemeConfig");function Dt(){const e=_t();return Nt(Ai.xyChart,e.xyChart)}a(Dt,"getChartDefaultConfig");function vt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(vt,"getChartDefaultData");function dt(e){const t=_t();return Ci(e.trim(),t)}a(dt,"textSanitizer");function jt(e){Gt=e}a(jt,"setTmpSVGG");function Qt(e){e==="horizontal"?ht.chartOrientation="horizontal":ht.chartOrientation="vertical"}a(Qt,"setOrientation");function Kt(e){A.xAxis.title=dt(e.text)}a(Kt,"setXAxisTitle");function Pt(e,t){A.xAxis={type:"linear",title:A.xAxis.title,min:e,max:t},xt=!0}a(Pt,"setXAxisRangeData");function Zt(e){A.xAxis={type:"band",title:A.xAxis.title,categories:e.map(t=>dt(t.text))},xt=!0}a(Zt,"setXAxisBand");function Jt(e){A.yAxis.title=dt(e.text)}a(Jt,"setYAxisTitle");function ti(e,t){A.yAxis={type:"linear",title:A.yAxis.title,min:e,max:t},Rt=!0}a(ti,"setYAxisRangeData");function ii(e){const t=Math.min(...e),i=Math.max(...e),s=j(A.yAxis)?A.yAxis.min:1/0,n=j(A.yAxis)?A.yAxis.max:-1/0;A.yAxis={type:"linear",title:A.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}a(ii,"setYAxisRangeFromPlotData");function Lt(e){let t=[];if(e.length===0)return t;if(!xt){const i=j(A.xAxis)?A.xAxis.min:1/0,s=j(A.xAxis)?A.xAxis.max:-1/0;Pt(Math.min(i,1),Math.max(s,e.length))}if(Rt||ii(e),kt(A.xAxis)&&(t=A.xAxis.categories.map((i,s)=>[i,e[s]])),j(A.xAxis)){const i=A.xAxis.min,s=A.xAxis.max,n=(s-i)/(e.length-1),o=[];for(let u=i;u<=s;u+=n)o.push(`${u}`);t=o.map((u,p)=>[u,e[p]])}return t}a(Lt,"transformDataWithoutCategory");function Et(e){return St[e===0?0:e%St.length]}a(Et,"getPlotColorFromPalette");function ei(e,t){const i=Lt(t);A.plots.push({type:"line",strokeFill:Et(ot),strokeWidth:2,data:i}),ot++}a(ei,"setLineData");function si(e,t){const i=Lt(t);A.plots.push({type:"bar",fill:Et(ot),data:i}),ot++}a(si,"setBarData");function ni(){if(A.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return A.title=Xt(),Vi.build(ht,A,lt,Gt)}a(ni,"getDrawableElem");function ai(){return lt}a(ai,"getChartThemeConfig");function ri(){return ht}a(ri,"getChartConfig");function oi(){return A}a(oi,"getXYChartData");var Bi=a(function(){bi(),ot=0,ht=Dt(),A=vt(),lt=Tt(),St=lt.plotColorPalette.split(",").map(e=>e.trim()),xt=!1,Rt=!1},"clear"),Wi={getDrawableElem:ni,clear:Bi,setAccTitle:pi,getAccTitle:fi,setDiagramTitle:di,getDiagramTitle:Xt,getAccDescription:xi,setAccDescription:gi,setOrientation:Qt,setXAxisTitle:Kt,setXAxisRangeData:Pt,setXAxisBand:Zt,setYAxisTitle:Jt,setYAxisRangeData:ti,setLineData:ei,setBarData:si,setTmpSVGG:jt,getChartThemeConfig:ai,getChartConfig:ri,getXYChartData:oi},zi=a((e,t,i,s)=>{const n=s.db,o=n.getChartThemeConfig(),u=n.getChartConfig(),p=n.getXYChartData().plots[0].data.map(m=>m[1]);function f(m){return m==="top"?"text-before-edge":"middle"}a(f,"getDominantBaseLine");function T(m){return m==="left"?"start":m==="right"?"end":"middle"}a(T,"getTextAnchor");function P(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}a(P,"getTextTransformation"),Yt.debug(`Rendering xychart chart
7
+ `+e);const _=mi(t),y=_.append("g").attr("class","main"),E=y.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");yi(_,u.height,u.width,!0),_.attr("viewBox",`0 0 ${u.width} ${u.height}`),E.attr("fill",o.backgroundColor),n.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));const v=n.getDrawableElem(),L={};function I(m){let R=y,l="";for(const[W]of m.entries()){let O=y;W>0&&L[l]&&(O=L[l]),l+=m[W],R=L[l],R||(R=L[l]=O.append("g").attr("class",m[W]))}return R}a(I,"getGroup");for(const m of v){if(m.data.length===0)continue;const R=I(m.groupTexts);switch(m.type){case"rect":if(R.selectAll("rect").data(m.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth),u.showDataLabel){const l=u.showDataLabelOutsideBar;if(u.chartOrientation==="horizontal"){let W=function(w,V){const{data:k,label:H}=w;return V*H.length*O<=k.width-X};a(W,"fitsHorizontally");const O=.7,X=10,Y=m.data.map((w,V)=>({data:w,label:p[V].toString()})).filter(w=>w.data.width>0&&w.data.height>0),S=Y.map(w=>{const{data:V}=w;let k=V.height*.7;for(;!W(w,k)&&k>0;)k-=1;return k}),U=Math.floor(Math.min(...S)),b=a(w=>l?w.data.x+w.data.width+X:w.data.x+w.data.width-X,"determineLabelXPosition");R.selectAll("text").data(Y).enter().append("text").attr("x",b).attr("y",w=>w.data.y+w.data.height/2).attr("text-anchor",l?"start":"end").attr("dominant-baseline","middle").attr("fill",o.dataLabelColor).attr("font-size",`${U}px`).text(w=>w.label)}else{let W=function(b,w,V){const{data:k,label:H}=b,h=w*H.length*.7,c=k.x+k.width/2,g=c-h/2,x=c+h/2,C=g>=k.x&&x<=k.x+k.width,r=k.y+V+w<=k.y+k.height;return C&&r};a(W,"fitsInBar");const O=10,X=m.data.map((b,w)=>({data:b,label:p[w].toString()})).filter(b=>b.data.width>0&&b.data.height>0),Y=X.map(b=>{const{data:w,label:V}=b;let k=w.width/(V.length*.7);for(;!W(b,k,O)&&k>0;)k-=1;return k}),S=Math.floor(Math.min(...Y)),U=a(b=>l?b.data.y-O:b.data.y+O,"determineLabelYPosition");R.selectAll("text").data(X).enter().append("text").attr("x",b=>b.data.x+b.data.width/2).attr("y",U).attr("text-anchor","middle").attr("dominant-baseline",l?"auto":"hanging").attr("fill",o.dataLabelColor).attr("font-size",`${S}px`).text(b=>b.label)}}break;case"text":R.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>f(l.verticalPos)).attr("text-anchor",l=>T(l.horizontalPos)).attr("transform",l=>P(l)).text(l=>l.text);break;case"path":R.selectAll("path").data(m.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Oi={draw:zi},qi={parser:Ti,db:Wi,renderer:Oi};export{qi as diagram};
@@ -1,4 +1,4 @@
1
- import{_ as s,c as a,o as t,ag as i}from"./chunks/framework.BCISBCiQ.js";const c=JSON.parse('{"title":"Deployment","description":"Deploy the Agent SDK with Cursor-managed hosting or on infrastructure you control.","frontmatter":{"title":"Deployment","description":"Deploy the Agent SDK with Cursor-managed hosting or on infrastructure you control."},"headers":[],"relativePath":"deployment.md","filePath":"deployment.md"}'),n={name:"deployment.md"};function o(h,e,l,r,d,p){return t(),a("div",null,[...e[0]||(e[0]=[i(`<h1 id="deploy-the-agent-sdk" tabindex="-1">Deploy the Agent SDK <a class="header-anchor" href="#deploy-the-agent-sdk" aria-label="Permalink to &quot;Deploy the Agent SDK&quot;">​</a></h1><p>Both options run the same agent project and HTTP API. Channel delivery paths differ. Cursor-managed hosting is preferred for most agents.</p><table tabindex="0"><thead><tr><th>Option</th><th>Use it when</th><th>You manage</th></tr></thead><tbody><tr><td>Cursor-managed hosting (preferred)</td><td>You want the shortest path from a Git repo to a running agent</td><td>Agent code, external storage, declared egress, and deployment secrets</td></tr><tr><td>Self-hosting</td><td>You need your own network, proxy, persistent filesystem, or process controls</td><td>Agent code, Node process, TLS, auth, secrets, durable state, monitoring, and upgrades</td></tr></tbody></table><h2 id="cursor-managed-hosting" tabindex="-1">Cursor-managed hosting <a class="header-anchor" href="#cursor-managed-hosting" aria-label="Permalink to &quot;Cursor-managed hosting&quot;">​</a></h2><p>Cursor builds the selected Git ref into a deployment. The deployment exposes a stable URL while Cursor manages its runtime lifecycle.</p><h3 id="before-you-deploy" tabindex="-1">Before you deploy <a class="header-anchor" href="#before-you-deploy" aria-label="Permalink to &quot;Before you deploy&quot;">​</a></h3><ul><li>Confirm managed hosting is enabled for the account and team.</li><li>Sign in as a team member, or use a team service-account API key with agent access.</li><li>Add <code>@cursor/july</code> to the agent project.</li></ul><p>For a GitHub source, install the Cursor GitHub App on the repository owner and grant it access to the repository. Cursor builds through its repository integration, not your local Git credentials. Commit and push the Git ref before deploying it.</p><h3 id="declare-hosting-needs" tabindex="-1">Declare hosting needs <a class="header-anchor" href="#declare-hosting-needs" aria-label="Permalink to &quot;Declare hosting needs&quot;">​</a></h3><p>If the agent needs extra egress or deployment secrets, add a <code>hosting</code> block to <code>agent/agent.ts</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:#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;@cursor/july&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
1
+ import{_ as s,c as a,o as t,a3 as i}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse('{"title":"Deployment","description":"Deploy the Agent SDK with Cursor-managed hosting or on infrastructure you control.","frontmatter":{"title":"Deployment","description":"Deploy the Agent SDK with Cursor-managed hosting or on infrastructure you control."},"headers":[],"relativePath":"deployment.md","filePath":"deployment.md"}'),n={name:"deployment.md"};function o(h,e,l,r,d,p){return t(),a("div",null,[...e[0]||(e[0]=[i(`<h1 id="deploy-the-agent-sdk" tabindex="-1">Deploy the Agent SDK <a class="header-anchor" href="#deploy-the-agent-sdk" aria-label="Permalink to &quot;Deploy the Agent SDK&quot;">​</a></h1><p>Both options run the same agent project and HTTP API. Channel delivery paths differ. Cursor-managed hosting is preferred for most agents.</p><table tabindex="0"><thead><tr><th>Option</th><th>Use it when</th><th>You manage</th></tr></thead><tbody><tr><td>Cursor-managed hosting (preferred)</td><td>You want the shortest path from a Git repo to a running agent</td><td>Agent code, external storage, declared egress, and deployment secrets</td></tr><tr><td>Self-hosting</td><td>You need your own network, proxy, persistent filesystem, or process controls</td><td>Agent code, Node process, TLS, auth, secrets, durable state, monitoring, and upgrades</td></tr></tbody></table><h2 id="cursor-managed-hosting" tabindex="-1">Cursor-managed hosting <a class="header-anchor" href="#cursor-managed-hosting" aria-label="Permalink to &quot;Cursor-managed hosting&quot;">​</a></h2><p>Cursor builds the selected Git ref into a deployment. The deployment exposes a stable URL while Cursor manages its runtime lifecycle.</p><h3 id="before-you-deploy" tabindex="-1">Before you deploy <a class="header-anchor" href="#before-you-deploy" aria-label="Permalink to &quot;Before you deploy&quot;">​</a></h3><ul><li>Confirm managed hosting is enabled for the account and team.</li><li>Sign in as a team member, or use a team service-account API key with agent access.</li><li>Add <code>@cursor/july</code> to the agent project.</li></ul><p>For a GitHub source, install the Cursor GitHub App on the repository owner and grant it access to the repository. Cursor builds through its repository integration, not your local Git credentials. Commit and push the Git ref before deploying it.</p><h3 id="declare-hosting-needs" tabindex="-1">Declare hosting needs <a class="header-anchor" href="#declare-hosting-needs" aria-label="Permalink to &quot;Declare hosting needs&quot;">​</a></h3><p>If the agent needs extra egress or deployment secrets, add a <code>hosting</code> block to <code>agent/agent.ts</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:#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;@cursor/july&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
2
2
  <span class="line"></span>
3
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
4
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> hosting: {</span></span>
@@ -13,11 +13,11 @@ import{_ as s,c as a,o as t,ag as i}from"./chunks/framework.BCISBCiQ.js";const c
13
13
  <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --repo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/acme/agents</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
14
14
  <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --ref</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
15
15
  <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --path</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> agents/weather</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
16
- <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span></code></pre></div><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p><code>--slug</code> doesn&#39;t retain source or Cursor-event settings. Run every repo-backed deploy from the pushed checkout, or pass <code>--repo</code>, <code>--ref</code>, <code>--path</code>, and any <code>--cursor-events-repo</code> flags again.</p></div><p>Deploy reads the agent from Git; it doesn&#39;t upload local files. Keep the local <code>hosting</code> block in sync with the selected ref. A nested <code>--path</code> must contain <code>package.json</code> and be installable from its own directory.</p><p>For a directory containing several agent projects, choose one from the TTY prompt, pass <code>--slug &lt;name&gt;</code>, or deploy each child with <code>--all</code>. Pass <code>--team &lt;id&gt;</code> when the signed-in account has no default team or you want another team.</p><p><code>--all</code> creates a separate deployment for each child. Self-host when the agents must share one multi-agent process.</p><p>The command waits up to ten minutes for a running engine. Use <code>--no-wait</code> to return after Cursor accepts the deployment, then inspect it separately:</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;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> deployments</span></span>
16
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span></code></pre></div><div class="important custom-block github-alert"><p class="custom-block-title">IMPORTANT</p><p><code>--slug</code> doesn&#39;t retain source or Cursor-event settings. Run every repo-backed deploy from the pushed checkout, or pass <code>--repo</code>, <code>--ref</code>, <code>--path</code>, and any <code>--cursor-events-repo</code> flags again.</p></div><p>Deploy reads the agent from Git; it doesn&#39;t upload local files. Keep the local <code>hosting</code> block in sync with the selected ref. A nested <code>--path</code> must contain <code>package.json</code> and be installable from its own directory.</p><p>For a directory containing several agent projects, choose one from the TTY prompt, pass <code>--slug &lt;name&gt;</code>, or deploy each child with <code>--all</code>. Pass <code>--team &lt;id&gt;</code> when the signed-in account has no default team or you want another team.</p><p><code>--all</code> creates a separate deployment for each child. Self-host when the agents must share one multi-agent process. Cloud-runtime peers on that host need <code>--public-url</code> and <code>--bearer-token</code>. Walkthrough: <a href="./guides/agent-to-agent.html#how-do-i-wire-two-agents">Agent-to-agent</a>.</p><p>The command waits up to ten minutes for a running engine. Use <code>--no-wait</code> to return after Cursor accepts the deployment, then inspect it separately:</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;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> deployments</span></span>
17
17
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> deployment</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span>
18
18
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> logs</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span></code></pre></div><h3 id="set-deployment-secrets" tabindex="-1">Set deployment secrets <a class="header-anchor" href="#set-deployment-secrets" aria-label="Permalink to &quot;Set deployment secrets&quot;">​</a></h3><p>A deployment must exist before you can set its secrets. Pass names only. Enter values at the hidden prompt, or pipe one line per name:</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;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> secrets</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> set</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> WEATHER_API_KEY</span></span>
19
19
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> secrets</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> list</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span>
20
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> deploy</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;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span></code></pre></div><p><code>secrets list</code> returns names and creation times, never values. The engine reads secret changes on its next deploy.</p><p>Do not pass <code>NAME=VALUE</code> on the command line. That form lands in shell history and in agent-captured terminals. The CLI refuses it unless you add <code>--from-argv</code>. For non-interactive input without argv, redirect a file or pipe stdin.</p><h3 id="credential-output-in-terminals" tabindex="-1">Credential output in terminals <a class="header-anchor" href="#credential-output-in-terminals" aria-label="Permalink to &quot;Credential output in terminals&quot;">​</a></h3><p>Treat any command that prints a secret as a credential event. Keep it out of agent-captured terminals when you can.</p><table tabindex="0"><thead><tr><th>Command</th><th>What prints</th></tr></thead><tbody><tr><td><code>secrets set</code> / <code>secrets list</code></td><td>Names only. Values never print.</td></tr><tr><td><code>rotate-pod-credential</code></td><td>Masked key only.</td></tr><tr><td>First <code>deploy</code> / <code>rotate-token</code></td><td>Full alias token once. Save it outside the agent transcript; it cannot be retrieved later.</td></tr><tr><td><code>deployment --json</code></td><td>May include short-lived <code>engineAccess.headers</code>. Treat JSON as a credential.</td></tr></tbody></table><p>Do not verify secrets with <code>echo &quot;$SECRET&quot;</code>, <code>printenv</code>, or by pasting values into chat. Use <code>secrets list</code> for names, then redeploy and exercise the feature that needs the secret.</p><h3 id="choose-durable-storage" tabindex="-1">Choose durable storage <a class="header-anchor" href="#choose-durable-storage" aria-label="Permalink to &quot;Choose durable storage&quot;">​</a></h3><p>Hosted filesystem state can reset during a deploy or runtime replacement. Prefer <a href="./storage.html"><code>cursorHostedStorage</code></a> so records survive replace. Do not put platform storage or deployment-identity names in <code>hosting.secretNames</code>. Self-host with your own <code>defineStorage</code> backend or a persistent <code>--state-root</code> when the complete filesystem must survive.</p><h3 id="use-the-hosted-agent" tabindex="-1">Use the hosted agent <a class="header-anchor" href="#use-the-hosted-agent" aria-label="Permalink to &quot;Use the hosted agent&quot;">​</a></h3><p>The CLI handles authentication for <code>--prod</code> commands. External HTTP clients that hit the stable alias URL must send <code>X-Agent-Alias-Token</code> on every request. Authored channel auth still runs after that gate.</p><p>Use <code>publicEndpoint()</code> on a custom channel that verifies its own provider signature. Cursor then serves that channel path without the alias token. The built-in session API still requires the token.</p><p>Use a relay or self-host when the channel cannot authenticate requests itself.</p><p>Use <code>--prod</code> with the normal client commands:</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;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> playground</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span>
20
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> deploy</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;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span></code></pre></div><p><code>secrets list</code> returns names and creation times, never values. The engine reads secret changes on its next deploy.</p><p>Do not pass <code>NAME=VALUE</code> on the command line. That form lands in shell history and in agent-captured terminals. The CLI refuses it unless you add <code>--from-argv</code>. For non-interactive input without argv, redirect a file or pipe stdin.</p><h3 id="credential-output-in-terminals" tabindex="-1">Credential output in terminals <a class="header-anchor" href="#credential-output-in-terminals" aria-label="Permalink to &quot;Credential output in terminals&quot;">​</a></h3><p>Treat any command that prints a secret as a credential event. Keep it out of agent-captured terminals when you can.</p><table tabindex="0"><thead><tr><th>Command</th><th>What prints</th></tr></thead><tbody><tr><td><code>secrets set</code> / <code>secrets list</code></td><td>Names only. Values never print.</td></tr><tr><td>First <code>deploy</code> / <code>rotate-token</code></td><td>Full alias token once. Save it outside the agent transcript; it cannot be retrieved later.</td></tr><tr><td><code>deployment --json</code></td><td>May include short-lived <code>engineAccess.headers</code>. Treat JSON as a credential.</td></tr></tbody></table><p>Do not verify secrets with <code>echo &quot;$SECRET&quot;</code>, <code>printenv</code>, or by pasting values into chat. Use <code>secrets list</code> for names, then redeploy and exercise the feature that needs the secret.</p><h3 id="choose-durable-storage" tabindex="-1">Choose durable storage <a class="header-anchor" href="#choose-durable-storage" aria-label="Permalink to &quot;Choose durable storage&quot;">​</a></h3><p>Hosted filesystem state can reset during a deploy or runtime replacement. Prefer <code>cursorHostedStorage</code> so records survive replace. Do not put platform storage or deployment-identity names in <code>hosting.secretNames</code>. Self-host with your own <code>defineStorage</code> backend or a persistent <code>--state-root</code> when the complete filesystem must survive.</p><h3 id="use-the-hosted-agent" tabindex="-1">Use the hosted agent <a class="header-anchor" href="#use-the-hosted-agent" aria-label="Permalink to &quot;Use the hosted agent&quot;">​</a></h3><p>The CLI handles authentication for <code>--prod</code> commands. External HTTP clients that hit the stable alias URL must send <code>X-Agent-Alias-Token</code> on every request. Authored channel auth still runs after that gate.</p><p>Use <code>publicEndpoint()</code> on a custom channel that verifies its own provider signature. Cursor then serves that channel path without the alias token. The built-in session API still requires the token.</p><p>Use a relay or self-host when the channel cannot authenticate requests itself.</p><p>Use <code>--prod</code> with the normal client commands:</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;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> playground</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span>
21
21
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> chat</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span>
22
22
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --message</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Forecast for Paris&quot;</span></span>
23
23
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> sessions</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span>
@@ -32,7 +32,7 @@ import{_ as s,c as a,o as t,ag as i}from"./chunks/framework.BCISBCiQ.js";const c
32
32
  <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> PR_APPROVER_SLACK_APP_TOKEN</span></span>
33
33
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> deploy</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;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> pr-approver</span></span></code></pre></div><p>Without <code>envPrefix</code>, a dedicated app reads <code>SLACK_BOT_TOKEN</code> and <code>SLACK_APP_TOKEN</code>. Socket Mode needs no inbound URL. See the <a href="./guides/slack.html">Slack guide</a>.</p><h3 id="update-stop-or-delete-a-deployment" tabindex="-1">Update, stop, or delete a deployment <a class="header-anchor" href="#update-stop-or-delete-a-deployment" aria-label="Permalink to &quot;Update, stop, or delete a deployment&quot;">​</a></h3><p>Redeploy the same slug after pushing a new Git ref. The stable alias continues to point at the latest deploy. Follow the same source rules from <a href="#deploy-from-git">Deploy from Git</a>.</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;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> deploy</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/my-agent</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --slug</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span>
34
34
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> stop</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span>
35
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> delete</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span></code></pre></div><p><code>stop</code> waits for the deployment to stop unless you pass <code>--no-wait</code>. <code>delete</code> removes the deployment and waits until it is gone. See the <a href="./reference/cli.html#deploy">CLI reference</a> for the full command reference.</p><h2 id="self-host-the-agent-sdk" tabindex="-1">Self-host the Agent SDK <a class="header-anchor" href="#self-host-the-agent-sdk" aria-label="Permalink to &quot;Self-host the Agent SDK&quot;">​</a></h2><p>The Agent SDK runs as a Node HTTP server on Node 22.13 or newer. You can host it on a VM or container platform.</p><h3 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></h3><p><code>serve</code> binds to loopback and admits direct local callers by default. Choose one of these options before exposing it:</p><ol><li>Pass <code>--bearer-token &lt;secret&gt;</code> for a shared host.</li><li>Define channel-specific auth for routes with their own credentials or signatures.</li><li>Use <code>--allow-anonymous</code> only behind an authenticating proxy.</li></ol><p>A static bearer token maps every holder to one principal. Use authored auth when callers need separate identities. See <a href="./reference/channels.html#auth-policies">Channels</a> for policy details.</p><h3 id="credentials" tabindex="-1">Credentials <a class="header-anchor" href="#credentials" aria-label="Permalink to &quot;Credentials&quot;">​</a></h3><p>A self-hosted server can read these 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>agent-sdk login</code> (stores a revocable key), <code>CURSOR_API_KEY</code>, <code>CURSOR_SERVICE_ACCOUNT_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>env vars your <code>mcp-connections/*.ts</code> read, or host OAuth secrets from hosted Connect / <code>agent-sdk mcp oauth &lt;name&gt; --store</code> (<code>MCP_OAUTH_*</code>; see <a href="./guides/mcp-oauth.html">Host MCP OAuth</a>)</td></tr></tbody></table><p>Use a dedicated Cursor key per host. <code>agent-sdk whoami</code> shows the active credential. <code>logout</code> removes the stored key from the host; revoke the key in the Cursor dashboard to invalidate it. See <a href="./reference/cli.html#login-logout-whoami">CLI authentication</a> for credential resolution.</p><h3 id="state" tabindex="-1">State <a class="header-anchor" href="#state" aria-label="Permalink to &quot;State&quot;">​</a></h3><p>Place <code>--state-root</code> on a persistent volume outside the agent repository, and back it up. Sessions survive restarts only when their state does. See <a href="./storage.html">Storage</a> and <a href="./reference/sessions.html">Sessions</a> for persistence and layout details.</p><h3 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></h3><p>A single-host deployment needs one supervised <code>serve</code> process on a private network. Export the Cursor key and a generated bearer token in the supervisor environment:</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:#D73A49;--shiki-dark:#F97583;">export</span><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;">&quot;&lt;cursor-api-key&gt;&quot;</span></span>
35
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> delete</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> weather-agent</span></span></code></pre></div><p><code>stop</code> waits for the deployment to stop unless you pass <code>--no-wait</code>. <code>delete</code> removes the deployment and waits until it is gone. See the <a href="./reference/cli.html#deploy">CLI reference</a> for the full command reference.</p><h2 id="self-host-the-agent-sdk" tabindex="-1">Self-host the Agent SDK <a class="header-anchor" href="#self-host-the-agent-sdk" aria-label="Permalink to &quot;Self-host the Agent SDK&quot;">​</a></h2><p>The Agent SDK runs as a Node HTTP server on Node 22.13 or newer. You can host it on a VM or container platform.</p><h3 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></h3><p><code>serve</code> binds to loopback and admits direct local callers by default. Choose one of these options before exposing it:</p><ol><li>Pass <code>--bearer-token &lt;secret&gt;</code> for a shared host.</li><li>Define channel-specific auth for routes with their own credentials or signatures.</li><li>Use <code>--allow-anonymous</code> only behind an authenticating proxy.</li></ol><p>A static bearer token maps every holder to one principal. Use authored auth when callers need separate identities. See <a href="./reference/channels.html#auth-policies">Channels</a> for policy details.</p><h3 id="credentials" tabindex="-1">Credentials <a class="header-anchor" href="#credentials" aria-label="Permalink to &quot;Credentials&quot;">​</a></h3><p>A self-hosted server can read these 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>agent-sdk login</code> (stores a revocable key), <code>CURSOR_API_KEY</code>, <code>CURSOR_SERVICE_ACCOUNT_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>env vars your <code>mcp-connections/*.ts</code> read, or host OAuth secrets from hosted Connect / <code>agent-sdk mcp oauth &lt;name&gt; --store</code> (<code>MCP_OAUTH_*</code>; see <a href="./guides/mcp-oauth.html">Host MCP OAuth</a>)</td></tr></tbody></table><p>Use a dedicated Cursor key per host. <code>agent-sdk whoami</code> shows the active credential. <code>logout</code> removes the stored key from the host; revoke the key in the Cursor dashboard to invalidate it. See <a href="./reference/cli.html#login-logout-whoami">CLI authentication</a> for credential resolution.</p><h3 id="state" tabindex="-1">State <a class="header-anchor" href="#state" aria-label="Permalink to &quot;State&quot;">​</a></h3><p>Place <code>--state-root</code> on a persistent volume outside the agent repository, and back it up. Sessions survive restarts only when their state does. See <a href="./reference/sessions.html">Sessions</a> for persistence and layout details.</p><h3 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></h3><p>A single-host deployment needs one supervised <code>serve</code> process on a private network. Export the Cursor key and a generated bearer token in the supervisor environment:</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:#D73A49;--shiki-dark:#F97583;">export</span><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;">&quot;&lt;cursor-api-key&gt;&quot;</span></span>
36
36
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AGENT_SDK_BEARER_TOKEN</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">openssl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> rand </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">-hex</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 32</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)&quot;</span></span>
37
37
  <span class="line"></span>
38
38
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># the server: all agents under one port</span></span>
@@ -48,4 +48,4 @@ import{_ as s,c as a,o as t,ag as i}from"./chunks/framework.BCISBCiQ.js";const c
48
48
  <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --host</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0.0.0.0</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;"> \\</span></span>
49
49
  <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --state-root</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /var/lib/agent-sdk</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
50
50
  <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_SDK_BEARER_TOKEN</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span></span></code></pre></div><p>Mount the state root as a persistent volume and inject secrets at startup. Install <code>git</code> and <code>gh</code> when channels need host-side GitHub work. Don&#39;t put secrets in the image.</p><h3 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></h3><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;">agent-sdk</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>
51
- <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>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 the agent is the whole host. See the <a href="./reference/http-api.html">HTTP API</a> for route layout and the <a href="./guides/slack.html">Slack guide</a> for multi-agent token setup.</p><h3 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></h3><p>Use these settings in production:</p><table tabindex="0"><thead><tr><th>Flag</th><th>In production</th></tr></thead><tbody><tr><td><code>--dev</code></td><td>Leave 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>Set on shared hosts unless an authenticating proxy is the trust boundary and you use <code>--allow-anonymous</code> instead.</td></tr><tr><td><code>--allow-anonymous</code></td><td>Use only behind an authenticating network boundary. It also widens playground session access so Slack and webhook sessions appear.</td></tr><tr><td><code>--state-root</code></td><td>Place on 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>Set when no human needs the UI.</td></tr><tr><td><code>--no-docs</code></td><td>Set to remove the documentation site at <code>/docs</code>.</td></tr><tr><td><code>--no-schedules</code></td><td>Set 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><h3 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></h3><p>Restarts preserve sessions, event streams, and SDK conversation state under the state root. Parked approvals and in-memory reminders don&#39;t survive a restart; re-run or recreate them afterward.</p><h3 id="observability" tabindex="-1">Observability <a class="header-anchor" href="#observability" aria-label="Permalink to &quot;Observability&quot;">​</a></h3><p>Use <a href="./reference/cli.html#logs"><code>agent-sdk logs</code></a> for runtime output, <a href="./guides/opentelemetry.html">OpenTelemetry</a> for OTLP traces and metrics, <a href="./reference/hooks.html">hooks</a> for in-process subscribers, and <a href="./reference/sessions.html#how-do-i-inspect-a-saved-event-stream">session traces</a> for incident review.</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/cli.html#deploy">CLI reference</a>: deploy, inspect, stop, and rotate hosted agents</li><li><a href="./storage.html">Storage</a>: preserve supported records across engine replacements</li><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 without a public URL</li><li><a href="./troubleshooting.html">Troubleshooting</a>: the symptom table for when a deploy misbehaves</li></ul>`,105)])])}const g=s(n,[["render",o]]);export{c as __pageData,g as default};
51
+ <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>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 the agent is the whole host. See the <a href="./reference/http-api.html">HTTP API</a> for route layout and the <a href="./guides/slack.html">Slack guide</a> for multi-agent token setup.</p><h3 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></h3><p>Use these settings in production:</p><table tabindex="0"><thead><tr><th>Flag</th><th>In production</th></tr></thead><tbody><tr><td><code>--dev</code></td><td>Leave 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>Set on shared hosts unless an authenticating proxy is the trust boundary and you use <code>--allow-anonymous</code> instead.</td></tr><tr><td><code>--allow-anonymous</code></td><td>Use only behind an authenticating network boundary. It also widens playground session access so Slack and webhook sessions appear.</td></tr><tr><td><code>--state-root</code></td><td>Place on 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>Set when no human needs the UI.</td></tr><tr><td><code>--no-docs</code></td><td>Set to remove the documentation site at <code>/docs</code>.</td></tr><tr><td><code>--no-schedules</code></td><td>Set 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><h3 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></h3><p>Restarts preserve sessions, event streams, and SDK conversation state under the state root. Parked approvals and in-memory reminders don&#39;t survive a restart; re-run or recreate them afterward.</p><h3 id="observability" tabindex="-1">Observability <a class="header-anchor" href="#observability" aria-label="Permalink to &quot;Observability&quot;">​</a></h3><p>Use <a href="./reference/cli.html#logs"><code>agent-sdk logs</code></a> for runtime output, <a href="./guides/opentelemetry.html">OpenTelemetry</a> for OTLP traces and metrics, <a href="./reference/hooks.html">hooks</a> for in-process subscribers, and <a href="./reference/sessions.html#how-do-i-inspect-a-saved-event-stream">session traces</a> for incident review.</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/cli.html#deploy">CLI reference</a>: deploy, inspect, stop, and rotate hosted agents</li><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 without a public URL</li><li><a href="./troubleshooting.html">Troubleshooting</a>: the symptom table for when a deploy misbehaves</li></ul>`,105)])])}const g=s(n,[["render",o]]);export{c as __pageData,g as default};
@@ -1 +1 @@
1
- import{_ as s,c as a,o as t,ag as i}from"./chunks/framework.BCISBCiQ.js";const c=JSON.parse('{"title":"Deployment","description":"Deploy the Agent SDK with Cursor-managed hosting or on infrastructure you control.","frontmatter":{"title":"Deployment","description":"Deploy the Agent SDK with Cursor-managed hosting or on infrastructure you control."},"headers":[],"relativePath":"deployment.md","filePath":"deployment.md"}'),n={name:"deployment.md"};function o(h,e,l,r,d,p){return t(),a("div",null,[...e[0]||(e[0]=[i("",105)])])}const g=s(n,[["render",o]]);export{c as __pageData,g as default};
1
+ import{_ as s,c as a,o as t,a3 as i}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse('{"title":"Deployment","description":"Deploy the Agent SDK with Cursor-managed hosting or on infrastructure you control.","frontmatter":{"title":"Deployment","description":"Deploy the Agent SDK with Cursor-managed hosting or on infrastructure you control."},"headers":[],"relativePath":"deployment.md","filePath":"deployment.md"}'),n={name:"deployment.md"};function o(h,e,l,r,d,p){return t(),a("div",null,[...e[0]||(e[0]=[i("",105)])])}const g=s(n,[["render",o]]);export{c as __pageData,g as default};
@@ -1,4 +1,4 @@
1
- import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.BCISBCiQ.js";const c=JSON.parse(`{"title":"Evals","description":"Write defineEval cases that gate an agent's trajectory, run them with agent-sdk eval locally and in CI, and lock every kept improvement with a regression check.","frontmatter":{"title":"Evals","description":"Write defineEval cases that gate an agent's trajectory, run them with agent-sdk eval locally and in CI, and lock every kept improvement with a regression check."},"headers":[],"relativePath":"evals.md","filePath":"evals.md"}`),n={name:"evals.md"};function h(l,s,p,d,k,r){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 sends a fixed message to your agent and asserts over the trajectory it records: the turn completed, the right tool ran with the right input, 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 still holds.</p><p>Nothing is mocked. The runner starts (or targets) a real agent server, drives sessions over the public API, and grades the events it gets back. The model runs and server tools execute, so <a href="#keep-side-effects-out-of-eval-sessions">keep side effects out of eval sessions</a> before you point an eval at an agent that posts anywhere.</p><h2 id="evals-hooks-or-hillclimbing" tabindex="-1">Evals, hooks, or hillclimbing? <a class="header-anchor" href="#evals-hooks-or-hillclimbing" aria-label="Permalink to &quot;Evals, hooks, or hillclimbing?&quot;">​</a></h2><p>All three read the same session event stream. Pick by the question you are asking.</p><table tabindex="0"><thead><tr><th>You want to</th><th>Use</th></tr></thead><tbody><tr><td>Gate one fixed input&#39;s behavior, locally and in CI</td><td>Evals (this page)</td></tr><tr><td>Observe every live session: metrics, audit, alerts</td><td><a href="./reference/hooks.html">Hooks</a></td></tr><tr><td>Improve an agent one measured round at a time</td><td><a href="./hillclimbing.html">Hillclimbing</a>; each kept win lands an eval</td></tr></tbody></table><p><a href="./reference/hooks.html#hooks-channel-events-or-evals">Hooks, channel events, or evals?</a> has the side-by-side table.</p><h3 id="when-not-to-write-an-eval" tabindex="-1">When not to write an eval <a class="header-anchor" href="#when-not-to-write-an-eval" aria-label="Permalink to &quot;When not to write an eval&quot;">​</a></h3><ul><li>Test a server tool&#39;s own logic with <code>agent-sdk call &lt;tool&gt; --dir . --input &#39;{...}&#39;</code> or a unit test. No model turn, no credential.</li><li>Explore a prompt with <code>agent-sdk run --dir . --message &quot;...&quot;</code> and read the trajectory. Write the eval once you know which decision to gate.</li><li>Stop a bad turn while it runs with <a href="./reference/tools.html#gate-a-tool-on-human-approval"><code>needsApproval</code></a> on the tool or <a href="./reference/result.html"><code>defineResult</code></a>. Evals grade after the fact.</li></ul><h2 id="write-your-first-eval" tabindex="-1">Write your first eval <a class="header-anchor" href="#write-your-first-eval" aria-label="Permalink to &quot;Write your first eval&quot;">​</a></h2><p>Evals live under the project-root <code>evals/</code> directory, a sibling of <code>agent/</code>. <code>agent/evals/</code> is silently ignored. Discovery loads every <code>.eval.ts</code> (or <code>.eval.js</code>) file under <code>evals/</code>, plus one config file.</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>my-agent/</span></span>
1
+ import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse(`{"title":"Evals","description":"Write defineEval cases that gate an agent's trajectory, run them with agent-sdk eval locally and in CI, and lock every kept improvement with a regression check.","frontmatter":{"title":"Evals","description":"Write defineEval cases that gate an agent's trajectory, run them with agent-sdk eval locally and in CI, and lock every kept improvement with a regression check."},"headers":[],"relativePath":"evals.md","filePath":"evals.md"}`),n={name:"evals.md"};function h(l,s,p,d,k,r){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 sends a fixed message to your agent and asserts over the trajectory it records: the turn completed, the right tool ran with the right input, 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 still holds.</p><p>Nothing is mocked. The runner starts (or targets) a real agent server, drives sessions over the public API, and grades the events it gets back. The model runs and server tools execute, so <a href="#keep-side-effects-out-of-eval-sessions">keep side effects out of eval sessions</a> before you point an eval at an agent that posts anywhere.</p><h2 id="evals-hooks-or-hillclimbing" tabindex="-1">Evals, hooks, or hillclimbing? <a class="header-anchor" href="#evals-hooks-or-hillclimbing" aria-label="Permalink to &quot;Evals, hooks, or hillclimbing?&quot;">​</a></h2><p>All three read the same session event stream. Pick by the question you are asking.</p><table tabindex="0"><thead><tr><th>You want to</th><th>Use</th></tr></thead><tbody><tr><td>Gate one fixed input&#39;s behavior, locally and in CI</td><td>Evals (this page)</td></tr><tr><td>Observe every live session: metrics, audit, alerts</td><td><a href="./reference/hooks.html">Hooks</a></td></tr><tr><td>Improve an agent one measured round at a time</td><td><a href="./hillclimbing.html">Hillclimbing</a>; each kept win lands an eval</td></tr></tbody></table><p><a href="./reference/hooks.html#hooks-channel-events-or-evals">Hooks, channel events, or evals?</a> has the side-by-side table.</p><h3 id="when-not-to-write-an-eval" tabindex="-1">When not to write an eval <a class="header-anchor" href="#when-not-to-write-an-eval" aria-label="Permalink to &quot;When not to write an eval&quot;">​</a></h3><ul><li>Test a server tool&#39;s own logic with <code>agent-sdk call &lt;tool&gt; --dir . --input &#39;{...}&#39;</code> or a unit test. No model turn, no credential.</li><li>Explore a prompt with <code>agent-sdk run --dir . --message &quot;...&quot;</code> and read the trajectory. Write the eval once you know which decision to gate.</li><li>Stop a bad turn while it runs with <a href="./reference/tools.html#gate-a-tool-on-human-approval"><code>needsApproval</code></a> on the tool or <code>defineResult</code>. Evals grade after the fact.</li></ul><h2 id="write-your-first-eval" tabindex="-1">Write your first eval <a class="header-anchor" href="#write-your-first-eval" aria-label="Permalink to &quot;Write your first eval&quot;">​</a></h2><p>Evals live under the project-root <code>evals/</code> directory, a sibling of <code>agent/</code>. <code>agent/evals/</code> is silently ignored. Discovery loads every <code>.eval.ts</code> (or <code>.eval.js</code>) file under <code>evals/</code>, plus one config file.</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>my-agent/</span></span>
2
2
  <span class="line"><span> agent/</span></span>
3
3
  <span class="line"><span> agent.ts</span></span>
4
4
  <span class="line"><span> tools/inspect_pr.ts</span></span>
@@ -58,7 +58,7 @@ import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.BCISBCiQ.js";const c
58
58
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
59
59
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
60
60
  <span class="line"><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>Case ids are single path segments, unique within the file. A case can set its own <code>description</code>, <code>tags</code>, <code>timeoutMs</code>, <code>iterations</code>, <code>judge</code>, <code>reporters</code>, and <code>metadata</code>. A case-level value replaces the file-level one for that datapoint, except <code>metadata</code>, which merges with case keys winning, and <code>reporters</code>, which adds to the file&#39;s list. <code>metadata</code> is free-form data carried onto the result and every reporter.</p><p>A file may instead export an array of <code>defineEval</code> calls to fan out over a dataset. Ids are then the file id plus a zero-padded index (<code>sql/0000</code>, <code>sql/0001</code>, ...); see <a href="#load-a-dataset">Load a dataset</a>. Prefer <code>cases</code> when datapoints are hand-written and deserve stable names.</p><h3 id="iterations" tabindex="-1">Iterations <a class="header-anchor" href="#iterations" aria-label="Permalink to &quot;Iterations&quot;">​</a></h3><p><code>iterations</code> (file or case, default <code>1</code>, cap <code>100</code>) runs a datapoint repeatedly. Discovery expands <code>iterations: 3</code> on case <code>nyc</code> to runnable ids <code>weather/nyc/1</code>, <code>weather/nyc/2</code>, and <code>weather/nyc/3</code>. The filter <code>weather/nyc</code> still selects all three. Each expanded case exposes <code>t.iteration</code> and <code>t.iterations</code>.</p><p><code>maxConcurrency</code> counts authored datapoints, not expanded iterations. Iterations of one datapoint share a concurrency slot and run in sequence, so a suite of 11 cases with 3 iterations each and <code>maxConcurrency: 20</code> has at most 11 cases in flight.</p><h2 id="drive-the-agent-with-t-send" tabindex="-1">Drive the agent with <code>t.send</code> <a class="header-anchor" href="#drive-the-agent-with-t-send" aria-label="Permalink to &quot;Drive the agent with \`t.send\`&quot;">​</a></h2><p><code>t.send(message, options?)</code> runs one turn and waits for it to settle: complete, park on an approval request, or fail. Several sends in one case share the session, which is how you write multi-turn evals.</p><p>Each send resolves to a turn result: <code>message</code> (the assistant text), <code>sessionId</code>, <code>events</code>, <code>toolCalls</code> (tool names in order), <code>ok</code>, and <code>index</code>. The turn carries the same assertion vocabulary as <code>t</code>, scoped to that turn, so you can grade an intermediate turn before the next send overwrites <code>t.reply</code>. <code>turn.expectOk()</code> throws when the turn failed, for later steps that depend on it.</p><p>Read the whole case with <code>t.reply</code> (last assistant text), <code>t.events</code> (every event so far), <code>t.turns</code> (settled turns, oldest first), and <code>t.sessionId</code>. <code>t.signal</code> aborts when the case hits its timeout; pass it to your own async work.</p><p>Three options apply on the first send only, because they shape session creation:</p><table tabindex="0"><thead><tr><th>Option</th><th>Effect</th></tr></thead><tbody><tr><td><code>workspaceFiles</code></td><td><code>{ path: contents }</code> seeded into the local session workspace. Prefer this over machine-local paths</td></tr><tr><td><code>workspaceDir</code></td><td>Absolute harness cwd for the local runtime</td></tr><tr><td><code>cloud</code></td><td>Per-session cloud options merged over the agent&#39;s static <code>cloud</code> config. Pin a fixture repo here for cloud evals instead of on the agent&#39;s default <code>cloud.repos</code>. On the cloud runtime, seeded files reach the agent as described under <a href="./concepts.html#where-does-a-turn-run">Where does a turn run?</a></td></tr></tbody></table><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;">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 style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Review pr/diff.patch and post findings.&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>Case ids are single path segments, unique within the file. A case can set its own <code>description</code>, <code>tags</code>, <code>timeoutMs</code>, <code>iterations</code>, <code>judge</code>, <code>reporters</code>, and <code>metadata</code>. A case-level value replaces the file-level one for that datapoint, except <code>metadata</code>, which merges with case keys winning, and <code>reporters</code>, which adds to the file&#39;s list. <code>metadata</code> is free-form data carried onto the result and every reporter.</p><p>A file may instead export an array of <code>defineEval</code> calls to fan out over a dataset. Ids are then the file id plus a zero-padded index (<code>sql/0000</code>, <code>sql/0001</code>, ...); see <a href="#load-a-dataset">Load a dataset</a>. Prefer <code>cases</code> when datapoints are hand-written and deserve stable names.</p><h3 id="iterations" tabindex="-1">Iterations <a class="header-anchor" href="#iterations" aria-label="Permalink to &quot;Iterations&quot;">​</a></h3><p><code>iterations</code> (file or case, default <code>1</code>, cap <code>100</code>) runs a datapoint repeatedly. Discovery expands <code>iterations: 3</code> on case <code>nyc</code> to runnable ids <code>weather/nyc/1</code>, <code>weather/nyc/2</code>, and <code>weather/nyc/3</code>. The filter <code>weather/nyc</code> still selects all three. Each expanded case exposes <code>t.iteration</code> and <code>t.iterations</code>.</p><p><code>maxConcurrency</code> counts authored datapoints, not expanded iterations. Iterations of one datapoint share a concurrency slot and run in sequence, so a suite of 11 cases with 3 iterations each and <code>maxConcurrency: 20</code> has at most 11 cases in flight.</p><h2 id="drive-the-agent-with-t-send" tabindex="-1">Drive the agent with <code>t.send</code> <a class="header-anchor" href="#drive-the-agent-with-t-send" aria-label="Permalink to &quot;Drive the agent with \`t.send\`&quot;">​</a></h2><p><code>t.send(message, options?)</code> runs one turn and waits for it to settle: complete, park on an approval request, or fail. Several sends in one case share the session, which is how you write multi-turn evals.</p><p>Each send resolves to a turn result: <code>message</code> (the assistant text), <code>sessionId</code>, <code>events</code>, <code>toolCalls</code> (tool names in order), <code>ok</code>, and <code>index</code>. The turn carries the same assertion vocabulary as <code>t</code>, scoped to that turn, so you can grade an intermediate turn before the next send overwrites <code>t.reply</code>. <code>turn.expectOk()</code> throws when the turn failed, for later steps that depend on it.</p><p>Read the whole case with <code>t.reply</code> (last assistant text), <code>t.events</code> (every event so far), <code>t.turns</code> (settled turns, oldest first), and <code>t.sessionId</code>. <code>t.signal</code> aborts when the case hits its timeout; pass it to your own async work.</p><p>Three options apply on the first send only, because they shape session creation:</p><table tabindex="0"><thead><tr><th>Option</th><th>Effect</th></tr></thead><tbody><tr><td><code>workspaceFiles</code></td><td><code>{ path: contents }</code> seeded into the local session workspace. Prefer this over machine-local paths</td></tr><tr><td><code>workspaceDir</code></td><td>Absolute harness cwd for the local runtime</td></tr><tr><td><code>cloud</code></td><td>Per-session cloud options merged over the agent&#39;s static <code>cloud</code> config. Pin a fixture repo here for cloud evals instead of on the agent&#39;s default <code>cloud.repos</code>. On the cloud runtime, seeded files reach the agent as described under <a href="./reference/agent-config.html#choose-a-runtime">Choose a runtime</a></td></tr></tbody></table><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;">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 style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Review pr/diff.patch and post findings.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
62
62
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> workspaceFiles: {</span></span>
63
63
  <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;pr/diff.patch&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
64
64
  <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;diff --git a/app/routes/search.ts b/app/routes/search.ts&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@@ -108,7 +108,7 @@ import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.BCISBCiQ.js";const c
108
108
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { posted: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, reason: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;eval&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, count: findings.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">length</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> };</span></span>
109
109
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
110
110
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // post the review</span></span>
111
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>Return a shaped result instead of throwing, so the eval can still assert <code>t.calledTool(&quot;post_findings&quot;, { input: ... })</code> on the decision. The same check belongs in <a href="./reference/hooks.html">hooks</a> that meter or page and in <a href="./reference/result.html"><code>defineResult</code></a> commits.</p><h2 id="worked-examples" tabindex="-1">Worked examples <a class="header-anchor" href="#worked-examples" aria-label="Permalink to &quot;Worked examples&quot;">​</a></h2><h3 id="multi-turn-grade-each-turn" tabindex="-1">Multi-turn: grade each turn <a class="header-anchor" href="#multi-turn-grade-each-turn" aria-label="Permalink to &quot;Multi-turn: grade each turn&quot;">​</a></h3><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/intro.eval.ts</span></span>
111
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>Return a shaped result instead of throwing, so the eval can still assert <code>t.calledTool(&quot;post_findings&quot;, { input: ... })</code> on the decision. The same check belongs in <a href="./reference/hooks.html">hooks</a> that meter or page and in <code>defineResult</code> commits.</p><h2 id="worked-examples" tabindex="-1">Worked examples <a class="header-anchor" href="#worked-examples" aria-label="Permalink to &quot;Worked examples&quot;">​</a></h2><h3 id="multi-turn-grade-each-turn" tabindex="-1">Multi-turn: grade each turn <a class="header-anchor" href="#multi-turn-grade-each-turn" aria-label="Permalink to &quot;Multi-turn: grade each turn&quot;">​</a></h3><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/intro.eval.ts</span></span>
112
112
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineEval, includes, satisfies } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/evals&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
113
113
  <span class="line"></span>
114
114
  <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>
@@ -168,7 +168,7 @@ import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.BCISBCiQ.js";const c
168
168
  <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>
169
169
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> timeoutMs: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">180_000</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
170
170
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> judge: { model: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;gpt-5.4-mini&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
171
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Option</th><th>Default</th><th>Meaning</th></tr></thead><tbody><tr><td><code>maxConcurrency</code></td><td>required</td><td>Datapoints in flight at once, 1-200</td></tr><tr><td><code>timeoutMs</code></td><td><code>180_000</code></td><td>Per-case timeout. Precedence: case or file <code>timeoutMs</code>, then <code>--timeout-ms</code>, then this value</td></tr><tr><td><code>judge</code></td><td>unset</td><td>Default judge model for <code>t.judge.*</code></td></tr><tr><td><code>reporters</code></td><td>unset</td><td>Destinations that observe every case; <code>--skip-report</code> suppresses them</td></tr><tr><td><code>maxPlaygroundRuns</code></td><td><code>20</code></td><td>Batches kept in playground history (cap 500). Counts <code>--prod</code> and <code>--url</code> batches, not the default local run</td></tr></tbody></table><p>Reporters ship results somewhere; the runner still does the grading. <code>JUnit({ filePath, suiteName? })</code> writes JUnit XML and <code>Artifacts({ dir })</code> writes per-case files, both from <code>@cursor/july/evals/reporters</code>. A custom reporter is an object with any of <code>onRunStart</code>, <code>onEvalComplete</code>, and <code>onRunComplete</code>. A reporter that throws is logged and never fails the run. CI usually attaches the built-in two with <code>--junit</code> and <code>--artifacts</code> instead of <code>reporters</code>, so output paths stay with the pipeline, not the eval author.</p><p>Playground batches survive restarts when the project has <a href="./storage.html#eval-table">storage</a>. Otherwise they live in process memory until <code>serve</code> exits.</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><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;">agent-sdk</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>
171
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Option</th><th>Default</th><th>Meaning</th></tr></thead><tbody><tr><td><code>maxConcurrency</code></td><td>required</td><td>Datapoints in flight at once, 1-200</td></tr><tr><td><code>timeoutMs</code></td><td><code>180_000</code></td><td>Per-case timeout. Precedence: case or file <code>timeoutMs</code>, then <code>--timeout-ms</code>, then this value</td></tr><tr><td><code>judge</code></td><td>unset</td><td>Default judge model for <code>t.judge.*</code></td></tr><tr><td><code>reporters</code></td><td>unset</td><td>Destinations that observe every case; <code>--skip-report</code> suppresses them</td></tr><tr><td><code>maxPlaygroundRuns</code></td><td><code>20</code></td><td>Batches kept in playground history (cap 500). Counts <code>--prod</code> and <code>--url</code> batches, not the default local run</td></tr></tbody></table><p>Reporters ship results somewhere; the runner still does the grading. <code>JUnit({ filePath, suiteName? })</code> writes JUnit XML and <code>Artifacts({ dir })</code> writes per-case files, both from <code>@cursor/july/evals/reporters</code>. A custom reporter is an object with any of <code>onRunStart</code>, <code>onEvalComplete</code>, and <code>onRunComplete</code>. A reporter that throws is logged and never fails the run. CI usually attaches the built-in two with <code>--junit</code> and <code>--artifacts</code> instead of <code>reporters</code>, so output paths stay with the pipeline, not the eval author.</p><p>Playground batches survive restarts when the project configures durable storage. Otherwise they live in process memory until <code>serve</code> exits.</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><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;">agent-sdk</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>
172
172
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</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>
173
173
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</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>
174
174
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</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>
@@ -1 +1 @@
1
- import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.BCISBCiQ.js";const c=JSON.parse(`{"title":"Evals","description":"Write defineEval cases that gate an agent's trajectory, run them with agent-sdk eval locally and in CI, and lock every kept improvement with a regression check.","frontmatter":{"title":"Evals","description":"Write defineEval cases that gate an agent's trajectory, run them with agent-sdk eval locally and in CI, and lock every kept improvement with a regression check."},"headers":[],"relativePath":"evals.md","filePath":"evals.md"}`),n={name:"evals.md"};function h(l,s,p,d,k,r){return e(),a("div",null,[...s[0]||(s[0]=[t("",131)])])}const E=i(n,[["render",h]]);export{c as __pageData,E as default};
1
+ import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse(`{"title":"Evals","description":"Write defineEval cases that gate an agent's trajectory, run them with agent-sdk eval locally and in CI, and lock every kept improvement with a regression check.","frontmatter":{"title":"Evals","description":"Write defineEval cases that gate an agent's trajectory, run them with agent-sdk eval locally and in CI, and lock every kept improvement with a regression check."},"headers":[],"relativePath":"evals.md","filePath":"evals.md"}`),n={name:"evals.md"};function h(l,s,p,d,k,r){return e(),a("div",null,[...s[0]||(s[0]=[t("",131)])])}const E=i(n,[["render",h]]);export{c as __pageData,E as default};
@@ -0,0 +1,14 @@
1
+ import{_ as s,c as t,o as a,a3 as n}from"./chunks/framework.dypDpWZ3.js";const g=JSON.parse('{"title":"Agent-to-agent","description":"Wire two Agent SDK agents on one host so one can ask the other.","frontmatter":{"title":"Agent-to-agent","description":"Wire two Agent SDK agents on one host so one can ask the other."},"headers":[],"relativePath":"guides/agent-to-agent.md","filePath":"guides/agent-to-agent.md"}'),i={name:"guides/agent-to-agent.md"};function o(h,e,p,l,r,d){return a(),t("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>Point one agent at another on the same host. The peer keeps its own session, instructions, and tools.</p><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>Use a <a href="./../reference/subagents.html">subagent</a> to split one job into roles inside a single agent. Use a peer when the specialist is a full agent you would run on its own.</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>a child of this agent</td><td>an agent on the same host</td></tr><tr><td>Tools, MCP connections, sessions</td><td>the parent&#39;s</td><td>its own</td></tr><tr><td>Who can reach it</td><td>only the parent</td><td>other agents, MCP clients, its playground</td></tr></tbody></table><h2 id="how-do-i-wire-two-agents" tabindex="-1">How do I wire two agents? <a class="header-anchor" href="#how-do-i-wire-two-agents" aria-label="Permalink to &quot;How do I wire two agents?&quot;">​</a></h2><p>Put both projects in one directory:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>agents/</span></span>
2
+ <span class="line"><span> concierge/</span></span>
3
+ <span class="line"><span> agent/instructions.md</span></span>
4
+ <span class="line"><span> agent/mcp-connections/weather.ts</span></span>
5
+ <span class="line"><span> weather-agent/</span></span>
6
+ <span class="line"><span> agent/instructions.md</span></span></code></pre></div><p><code>weather-agent</code> is a normal Agent SDK project. On the concierge, add a connection. Set <code>agent</code> to the peer&#39;s slug, which is its directory name:</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>
7
+ <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;@cursor/july/connections&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
8
+ <span class="line"></span>
9
+ <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>
10
+ <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>
11
+ <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>
12
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>The filename is the MCP server name. The concierge model sees the peer under <code>weather</code>. See <a href="./../reference/http-api.html#mcp-endpoint">HTTP API</a> for the MCP tools.</p><p>In the concierge <code>instructions.md</code>, say when to ask: &quot;When a request needs weather, ask the <code>weather</code> peer.&quot; Scope the line to the work the peer should handle. If two agents can ask each other, they will loop.</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;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dev</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./agents</span></span>
13
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</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>
14
+ <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></code></pre></div><p>Cursor-managed hosting deploys one agent per slug. Keep peers on one self-hosted process. Cloud-runtime turns need <code>--public-url</code> and <code>--bearer-token</code>. See <a href="./../deployment.html">Deployment</a>.</p><p>Unknown slugs and self-references fail <code>serve</code> at startup. Peers need the default multi-agent layout.</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><ul><li><a href="./../reference/connections.html#peer-mcp-connection">MCP connections</a>: <code>{ agent }</code></li><li><a href="./../reference/subagents.html">Subagents</a>: specialists inside one agent</li><li><a href="./../reference/http-api.html#mcp-endpoint">HTTP API</a>: <code>/v1/mcp</code></li></ul>`,17)])])}const k=s(i,[["render",o]]);export{g as __pageData,k as default};
@@ -0,0 +1 @@
1
+ import{_ as s,c as t,o as a,a3 as n}from"./chunks/framework.dypDpWZ3.js";const g=JSON.parse('{"title":"Agent-to-agent","description":"Wire two Agent SDK agents on one host so one can ask the other.","frontmatter":{"title":"Agent-to-agent","description":"Wire two Agent SDK agents on one host so one can ask the other."},"headers":[],"relativePath":"guides/agent-to-agent.md","filePath":"guides/agent-to-agent.md"}'),i={name:"guides/agent-to-agent.md"};function o(h,e,p,l,r,d){return a(),t("div",null,[...e[0]||(e[0]=[n("",17)])])}const k=s(i,[["render",o]]);export{g as __pageData,k as default};
@@ -1,4 +1,4 @@
1
- import{_ as s,c as t,o as a,ag as i}from"./chunks/framework.BCISBCiQ.js";const k=JSON.parse('{"title":"Bitbucket","description":"Wake your agent from pull requests, comments, and pushes on Bitbucket Cloud or Bitbucket Data Center.","frontmatter":{"title":"Bitbucket","description":"Wake your agent from pull requests, comments, and pushes on Bitbucket Cloud or Bitbucket Data Center."},"headers":[],"relativePath":"guides/bitbucket.md","filePath":"guides/bitbucket.md"}'),n={name:"guides/bitbucket.md"};function l(h,e,p,o,r,d){return a(),t("div",null,[...e[0]||(e[0]=[i(`<h1 id="bitbucket-agents" tabindex="-1">Bitbucket agents <a class="header-anchor" href="#bitbucket-agents" aria-label="Permalink to &quot;Bitbucket agents&quot;">​</a></h1><p>Use <code>bitbucketChannel()</code> for Bitbucket Cloud and Bitbucket Data Center. The channel detects the source from each signed payload and normalizes Data Center events to the Bitbucket Cloud event vocabulary.</p><h2 id="define-the-channel" tabindex="-1">Define the channel <a class="header-anchor" href="#define-the-channel" aria-label="Permalink to &quot;Define the channel&quot;">​</a></h2><p>Author <code>agent/channels/bitbucket.ts</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:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { bitbucketChannel } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/channels/bitbucket&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
1
+ import{_ as s,c as t,o as a,a3 as i}from"./chunks/framework.dypDpWZ3.js";const k=JSON.parse('{"title":"Bitbucket","description":"Wake your agent from pull requests, comments, and pushes on Bitbucket Cloud or Bitbucket Data Center.","frontmatter":{"title":"Bitbucket","description":"Wake your agent from pull requests, comments, and pushes on Bitbucket Cloud or Bitbucket Data Center."},"headers":[],"relativePath":"guides/bitbucket.md","filePath":"guides/bitbucket.md"}'),n={name:"guides/bitbucket.md"};function l(h,e,p,o,r,d){return a(),t("div",null,[...e[0]||(e[0]=[i(`<h1 id="bitbucket-agents" tabindex="-1">Bitbucket agents <a class="header-anchor" href="#bitbucket-agents" aria-label="Permalink to &quot;Bitbucket agents&quot;">​</a></h1><p>Use <code>bitbucketChannel()</code> for Bitbucket Cloud and Bitbucket Data Center. The channel detects the source from each signed payload and normalizes Data Center events to the Bitbucket Cloud event vocabulary.</p><h2 id="define-the-channel" tabindex="-1">Define the channel <a class="header-anchor" href="#define-the-channel" aria-label="Permalink to &quot;Define the channel&quot;">​</a></h2><p>Author <code>agent/channels/bitbucket.ts</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:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { bitbucketChannel } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/channels/bitbucket&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
2
2
  <span class="line"></span>
3
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;"> bitbucketChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({});</span></span></code></pre></div><p>Without <code>onPullRequest</code>, new pull requests start turns. Data Center updates also start turns when the source branch has new commits. Comments and pushes are opt-in through <code>onPullRequestComment</code> and <code>onPush</code>. Use <code>onEvent</code> for other event types. Set <code>webhookEvents</code> when managed event delivery must subscribe to an event that only <code>onEvent</code> handles.</p><p>Filter comment hooks by author before starting a turn. This prevents comments posted by the agent from triggering another turn.</p><p><code>ctx.bitbucket.api</code> can read pull requests, post comments, and create build statuses. See the <a href="./../reference/channels.html">Channels reference</a> for hook return values and session behavior.</p><h2 id="connect-bitbucket" tabindex="-1">Connect Bitbucket <a class="header-anchor" href="#connect-bitbucket" aria-label="Permalink to &quot;Connect Bitbucket&quot;">​</a></h2><p>Set a repository hook secret and API token:</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:#24292E;--shiki-dark:#E1E4E8;">BITBUCKET_WEBHOOK_SECRET</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">...</span></span>
4
4
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">BITBUCKET_TOKEN</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">...</span></span></code></pre></div><p>Add a repository webhook for <code>https://&lt;your-host&gt;/&lt;slug&gt;/v1/channels/bitbucket</code>. Use the same secret on both sides. The channel verifies the <code>X-Hub-Signature</code> HMAC before it parses the payload.</p><p>Bitbucket Cloud uses its 2.0 API by default. Data Center also needs its REST API base:</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;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> bitbucketChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>