@cursor/july 0.1.111 → 0.1.113

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 (441) hide show
  1. package/README.md +4 -0
  2. package/dist/bin/agent-serve.js +20 -4
  3. package/dist/channels/checks.d.ts +10 -0
  4. package/dist/channels/checks.d.ts.map +1 -1
  5. package/dist/channels/github/github-channel.d.ts +29 -19
  6. package/dist/channels/github/github-channel.d.ts.map +1 -1
  7. package/dist/channels/github/github-channel.js +29 -19
  8. package/dist/channels/origin/checks.d.ts +1 -1
  9. package/dist/channels/origin/checks.d.ts.map +1 -1
  10. package/dist/channels/slack/agentic-delivery.d.ts.map +1 -1
  11. package/dist/channels/slack/agentic-delivery.js +2 -0
  12. package/dist/channels/slack/dispatch.d.ts +11 -1
  13. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  14. package/dist/channels/slack/dispatch.js +146 -39
  15. package/dist/channels/slack/placeholder.d.ts +26 -0
  16. package/dist/channels/slack/placeholder.d.ts.map +1 -1
  17. package/dist/channels/slack/placeholder.js +28 -0
  18. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  19. package/dist/channels/slack/slack-channel.js +9 -16
  20. package/dist/docs/404.html +2 -2
  21. package/dist/docs/assets/{app.Drol6mi6.js → app.CAeK13eM.js} +4 -4
  22. package/dist/docs/assets/building-with-agents.md.BBCx0AUo.js +9 -0
  23. package/dist/docs/assets/building-with-agents.md.BBCx0AUo.lean.js +1 -0
  24. package/dist/docs/assets/chunks/@localSearchIndexroot.Ck9E52Ls.js +1 -0
  25. package/dist/docs/assets/chunks/{VPLocalSearchBox.CdqoBZJX.js → VPLocalSearchBox.C9LbPHod.js} +1 -1
  26. package/dist/docs/assets/chunks/{arc.BVX3ycTn.js → arc.CmMq2zmS.js} +1 -1
  27. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CcChnMxX.js → architectureDiagram-Q4EWVU46.CCXB8Uj5.js} +1 -1
  28. package/dist/docs/assets/chunks/{baseUniq.xwtXO-yt.js → baseUniq.CyQo6eLe.js} +1 -1
  29. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.CijZ_taK.js → blockDiagram-DXYQGD6D.JYq6w91N.js} +1 -1
  30. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.0FBvwBvK.js → c4Diagram-AHTNJAMY.BRV8GPJJ.js} +1 -1
  31. package/dist/docs/assets/chunks/channel.BHiYmnZ4.js +1 -0
  32. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.CELMmMDA.js → chunk-4BX2VUAB.Bv4ooYQR.js} +1 -1
  33. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.C4bhFtSm.js → chunk-4TB4RGXK.t4JtKPcj.js} +1 -1
  34. package/dist/docs/assets/chunks/{chunk-55IACEB6.ZnQ9gRRQ.js → chunk-55IACEB6.34lCHj9Y.js} +1 -1
  35. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.DPlmglG-.js → chunk-EDXVE4YY.BSwrPNrt.js} +1 -1
  36. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.BrUk8pff.js → chunk-FMBD7UC4.Beeun-R-.js} +1 -1
  37. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CcmWIncu.js → chunk-OYMX7WX6.BUUFUcJc.js} +1 -1
  38. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.D65-cs8I.js → chunk-QZHKN3VN.B2XjHzN_.js} +1 -1
  39. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.qoXZpG9F.js → chunk-YZCP3GAM.CLYG8znk.js} +1 -1
  40. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.Degh8l90.js +1 -0
  41. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.Degh8l90.js +1 -0
  42. package/dist/docs/assets/chunks/clone.BIywbczV.js +1 -0
  43. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.8rYtqudO.js → cose-bilkent-S5V4N54A.DVEa6fZp.js} +1 -1
  44. package/dist/docs/assets/chunks/{dagre-KV5264BT.DrRP1fOh.js → dagre-KV5264BT.C9PZQK-S.js} +1 -1
  45. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DHj_xA2_.js → diagram-5BDNPKRD.DoN0uv3Y.js} +1 -1
  46. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Bz_6nAKj.js → diagram-G4DWMVQ6.Czv3duqx.js} +1 -1
  47. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.BWA0xSW9.js → diagram-MMDJMWI5.BinJ5kWb.js} +1 -1
  48. package/dist/docs/assets/chunks/{diagram-TYMM5635.CpTJLNJI.js → diagram-TYMM5635.DW326M4K.js} +1 -1
  49. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.-7AWWSrP.js → erDiagram-SMLLAGMA.U2pR_OA7.js} +1 -1
  50. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.BTnQ742_.js → flowDiagram-DWJPFMVM.ByWJXeYK.js} +1 -1
  51. package/dist/docs/assets/chunks/framework.BNw1pucY.js +19 -0
  52. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.B5_HiiQ5.js → ganttDiagram-T4ZO3ILL.OquF0Rtg.js} +1 -1
  53. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CZcNTFZd.js → gitGraphDiagram-UUTBAWPF.Bpn01P7X.js} +1 -1
  54. package/dist/docs/assets/chunks/{graph.V2GLaab4.js → graph.CNRB6ETL.js} +1 -1
  55. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.7pZOkCCU.js → infoDiagram-42DDH7IO.CqhknMWi.js} +1 -1
  56. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.DSMo3Qa3.js → ishikawaDiagram-UXIWVN3A.C6xpR2af.js} +1 -1
  57. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BNEgWN1S.js → journeyDiagram-VCZTEJTY.Cg5f7oB3.js} +1 -1
  58. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.B-4d4tC7.js → kanban-definition-6JOO6SKY.Cx9YTwlU.js} +1 -1
  59. package/dist/docs/assets/chunks/{layout.Dvbn9nSb.js → layout.ljS-wFtK.js} +1 -1
  60. package/dist/docs/assets/chunks/{linear.D2GM4p4b.js → linear.jSxNrsFC.js} +1 -1
  61. package/dist/docs/assets/chunks/{min.DVBtLK-B.js → min.Cum8AlQw.js} +1 -1
  62. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.CnJRI55x.js → mindmap-definition-QFDTVHPH.BLiysLpe.js} +1 -1
  63. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.CtoaTFlA.js → pieDiagram-DEJITSTG.BoIDyuKF.js} +1 -1
  64. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DtT24_vN.js → quadrantDiagram-34T5L4WZ.DLkpDytR.js} +1 -1
  65. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.CjSO4o8f.js → requirementDiagram-MS252O5E.DqTVqSu2.js} +1 -1
  66. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.-wWiIVWa.js → sankeyDiagram-XADWPNL6.CG_6FF7j.js} +1 -1
  67. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.DSk8s4gX.js → sequenceDiagram-FGHM5R23.BIp9602K.js} +1 -1
  68. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.BFKAsdkN.js → stateDiagram-FHFEXIEX.COSXsD9I.js} +1 -1
  69. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.qrxrbFsX.js +1 -0
  70. package/dist/docs/assets/chunks/{theme.C0MctGaz.js → theme.CXJ7PNwy.js} +2 -2
  71. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.TUNJbAFe.js → timeline-definition-GMOUNBTQ.CXdVqkLq.js} +1 -1
  72. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.C-RGNnk4.js → vennDiagram-DHZGUBPP.CZxGuc4r.js} +1 -1
  73. package/dist/docs/assets/chunks/{wardley-RL74JXVD.g5efOWmT.js → wardley-RL74JXVD.3oVgfqQk.js} +1 -1
  74. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.DH4zt73Y.js → wardleyDiagram-NUSXRM2D.6_irCgGJ.js} +1 -1
  75. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.B-3k6bF6.js → xychartDiagram-5P7HB3ND.TRPe92m3.js} +1 -1
  76. package/dist/docs/assets/deployment.md.D2jQZuFx.js +32 -0
  77. package/dist/docs/assets/deployment.md.D2jQZuFx.lean.js +1 -0
  78. package/dist/docs/assets/evals.md.D3Y3Aixt.js +72 -0
  79. package/dist/docs/assets/evals.md.D3Y3Aixt.lean.js +1 -0
  80. package/dist/docs/assets/guides_agent-to-agent.md.CD4T5FIl.js +41 -0
  81. package/dist/docs/assets/guides_agent-to-agent.md.CD4T5FIl.lean.js +1 -0
  82. package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.js +145 -0
  83. package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.lean.js +1 -0
  84. package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.js +15 -0
  85. package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.lean.js +1 -0
  86. package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.js +43 -0
  87. package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.lean.js +1 -0
  88. package/dist/docs/assets/guides_github.md.BwpBp3ed.js +156 -0
  89. package/dist/docs/assets/guides_github.md.BwpBp3ed.lean.js +1 -0
  90. package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.js +153 -0
  91. package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.lean.js +1 -0
  92. package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.js +16 -0
  93. package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.lean.js +1 -0
  94. package/dist/docs/assets/guides_improve.md.Bnp4F99w.js +22 -0
  95. package/dist/docs/assets/guides_improve.md.Bnp4F99w.lean.js +1 -0
  96. package/dist/docs/assets/guides_jev.md.F5fAkkfN.js +189 -0
  97. package/dist/docs/assets/guides_jev.md.F5fAkkfN.lean.js +1 -0
  98. package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.js +50 -0
  99. package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.lean.js +1 -0
  100. package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.js +35 -0
  101. package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.lean.js +1 -0
  102. package/dist/docs/assets/guides_slack.md.Bo96y42E.js +70 -0
  103. package/dist/docs/assets/guides_slack.md.Bo96y42E.lean.js +1 -0
  104. package/dist/docs/assets/guides_webhooks.md.1A72_VEE.js +92 -0
  105. package/dist/docs/assets/guides_webhooks.md.1A72_VEE.lean.js +1 -0
  106. package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.js +7 -0
  107. package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.lean.js +1 -0
  108. package/dist/docs/assets/{index.md.BFVyY2KT.js → index.md.C-t81M5J.js} +2 -2
  109. package/dist/docs/assets/{index.md.BFVyY2KT.lean.js → index.md.C-t81M5J.lean.js} +1 -1
  110. package/dist/docs/assets/{quickstart.md.D3MjSZN-.js → quickstart.md.DAvVhuuU.js} +1 -1
  111. package/dist/docs/assets/{quickstart.md.D3MjSZN-.lean.js → quickstart.md.DAvVhuuU.lean.js} +1 -1
  112. package/dist/docs/assets/{reference_agent-config.md.CfVA-LZJ.js → reference_agent-config.md.DGPyw7ms.js} +1 -1
  113. package/dist/docs/assets/{reference_agent-config.md.CfVA-LZJ.lean.js → reference_agent-config.md.DGPyw7ms.lean.js} +1 -1
  114. package/dist/docs/assets/{reference_artifacts.md.Vf7qyIZ-.js → reference_artifacts.md.Bu_4HmsD.js} +1 -1
  115. package/dist/docs/assets/{reference_artifacts.md.Vf7qyIZ-.lean.js → reference_artifacts.md.Bu_4HmsD.lean.js} +1 -1
  116. package/dist/docs/assets/{reference_channels.md.icqLKcTc.js → reference_channels.md.nFWbzAic.js} +1 -1
  117. package/dist/docs/assets/{reference_channels.md.icqLKcTc.lean.js → reference_channels.md.nFWbzAic.lean.js} +1 -1
  118. package/dist/docs/assets/{reference_cli.md.B2dBL6L8.js → reference_cli.md.DLWDz9ij.js} +3 -1
  119. package/dist/docs/assets/{reference_cli.md.B2dBL6L8.lean.js → reference_cli.md.DLWDz9ij.lean.js} +1 -1
  120. package/dist/docs/assets/{reference_connections.md.Cb3U_c8n.js → reference_connections.md.Je9dMsdd.js} +2 -2
  121. package/dist/docs/assets/{reference_connections.md.Cb3U_c8n.lean.js → reference_connections.md.Je9dMsdd.lean.js} +1 -1
  122. package/dist/docs/assets/reference_evals.md.DNJzM_yf.js +57 -0
  123. package/dist/docs/assets/reference_evals.md.DNJzM_yf.lean.js +1 -0
  124. package/dist/docs/assets/reference_extensions.md.Cv5aLCz_.js +58 -0
  125. package/dist/docs/assets/reference_extensions.md.Cv5aLCz_.lean.js +1 -0
  126. package/dist/docs/assets/{reference_hooks.md.CZuynAxj.js → reference_hooks.md.B7uzNENk.js} +2 -2
  127. package/dist/docs/assets/{reference_hooks.md.CZuynAxj.lean.js → reference_hooks.md.B7uzNENk.lean.js} +1 -1
  128. package/dist/docs/assets/{reference_http-api.md.DTKcYE6L.js → reference_http-api.md.CduHavZ2.js} +1 -1
  129. package/dist/docs/assets/{reference_http-api.md.DTKcYE6L.lean.js → reference_http-api.md.CduHavZ2.lean.js} +1 -1
  130. package/dist/docs/assets/{reference_instructions.md.D7gkckK-.js → reference_instructions.md.CU1My5My.js} +1 -1
  131. package/dist/docs/assets/{reference_instructions.md.D7gkckK-.lean.js → reference_instructions.md.CU1My5My.lean.js} +1 -1
  132. package/dist/docs/assets/{reference_playground.md.D2YExv5K.js → reference_playground.md.Ch2d0Iqi.js} +1 -1
  133. package/dist/docs/assets/{reference_playground.md.D2YExv5K.lean.js → reference_playground.md.Ch2d0Iqi.lean.js} +1 -1
  134. package/dist/docs/assets/{reference_project-layout.md.DPxbUJyt.js → reference_project-layout.md.BGhgpy9V.js} +1 -1
  135. package/dist/docs/assets/{reference_project-layout.md.DPxbUJyt.lean.js → reference_project-layout.md.BGhgpy9V.lean.js} +1 -1
  136. package/dist/docs/assets/{reference_prompt.md.BQ5uAv1F.js → reference_prompt.md.Ccp0R53H.js} +1 -1
  137. package/dist/docs/assets/{reference_prompt.md.BQ5uAv1F.lean.js → reference_prompt.md.Ccp0R53H.lean.js} +1 -1
  138. package/dist/docs/assets/{reference_schedules.md.BasfZWO-.js → reference_schedules.md.B2Nm6FaD.js} +1 -1
  139. package/dist/docs/assets/{reference_schedules.md.BasfZWO-.lean.js → reference_schedules.md.B2Nm6FaD.lean.js} +1 -1
  140. package/dist/docs/assets/{reference_sessions.md.YKvIsWAx.js → reference_sessions.md.1_6Vyv7x.js} +1 -1
  141. package/dist/docs/assets/{reference_sessions.md.YKvIsWAx.lean.js → reference_sessions.md.1_6Vyv7x.lean.js} +1 -1
  142. package/dist/docs/assets/{reference_skills.md.rNgpsGd0.js → reference_skills.md.DjQkRefx.js} +1 -1
  143. package/dist/docs/assets/{reference_skills.md.rNgpsGd0.lean.js → reference_skills.md.DjQkRefx.lean.js} +1 -1
  144. package/dist/docs/assets/{reference_subagents.md.e5qitjJt.js → reference_subagents.md.Dl16gcBj.js} +2 -2
  145. package/dist/docs/assets/{reference_subagents.md.e5qitjJt.lean.js → reference_subagents.md.Dl16gcBj.lean.js} +1 -1
  146. package/dist/docs/assets/{reference_tools.md.BdCO2aHZ.js → reference_tools.md.B1dH1lpa.js} +3 -3
  147. package/dist/docs/assets/{reference_tools.md.BdCO2aHZ.lean.js → reference_tools.md.B1dH1lpa.lean.js} +1 -1
  148. package/dist/docs/assets/{templates_agentic-owners.md.Da_AGDlH.js → templates_agentic-owners.md.9M575F5C.js} +1 -1
  149. package/dist/docs/assets/{templates_agentic-owners.md.Da_AGDlH.lean.js → templates_agentic-owners.md.9M575F5C.lean.js} +1 -1
  150. package/dist/docs/assets/{templates_pr-autofixer.md.DqxocIGh.js → templates_pr-autofixer.md.ws0DDXDy.js} +1 -1
  151. package/dist/docs/assets/{templates_pr-autofixer.md.DqxocIGh.lean.js → templates_pr-autofixer.md.ws0DDXDy.lean.js} +1 -1
  152. package/dist/docs/assets/{templates_security-reviewer.md.Bhnvd8VE.js → templates_security-reviewer.md.KEFYXzfK.js} +1 -1
  153. package/dist/docs/assets/{templates_security-reviewer.md.Bhnvd8VE.lean.js → templates_security-reviewer.md.KEFYXzfK.lean.js} +1 -1
  154. package/dist/docs/assets/templates_thermo-quality-review.md.VNJ_mohX.js +3 -0
  155. package/dist/docs/assets/templates_thermo-quality-review.md.VNJ_mohX.lean.js +1 -0
  156. package/dist/docs/assets/templates_thermo-review.md.Hi3zWOkP.js +3 -0
  157. package/dist/docs/assets/templates_thermo-review.md.Hi3zWOkP.lean.js +1 -0
  158. package/dist/docs/assets/{templates_triage.md.BdBWO9Ic.js → templates_triage.md.CVGe_FG6.js} +1 -1
  159. package/dist/docs/assets/{templates_triage.md.BdBWO9Ic.lean.js → templates_triage.md.CVGe_FG6.lean.js} +1 -1
  160. package/dist/docs/assets/troubleshooting.md.mnfFG2Em.js +1 -0
  161. package/dist/docs/assets/troubleshooting.md.mnfFG2Em.lean.js +1 -0
  162. package/dist/docs/building-with-agents.html +44 -48
  163. package/dist/docs/building-with-agents.md +94 -82
  164. package/dist/docs/deployment.html +59 -78
  165. package/dist/docs/deployment.md +117 -363
  166. package/dist/docs/evals.html +85 -224
  167. package/dist/docs/evals.md +149 -673
  168. package/dist/docs/guides/agent-to-agent.html +74 -47
  169. package/dist/docs/guides/agent-to-agent.md +128 -46
  170. package/dist/docs/guides/bitbucket.html +179 -44
  171. package/dist/docs/guides/bitbucket.md +249 -48
  172. package/dist/docs/guides/cloud-agents.html +46 -40
  173. package/dist/docs/guides/cloud-agents.md +119 -66
  174. package/dist/docs/guides/convert-automation.html +80 -49
  175. package/dist/docs/guides/convert-automation.md +156 -147
  176. package/dist/docs/guides/github.html +184 -92
  177. package/dist/docs/guides/github.md +260 -245
  178. package/dist/docs/guides/gitlab.html +184 -45
  179. package/dist/docs/guides/gitlab.md +249 -50
  180. package/dist/docs/guides/grokbot-agents.html +48 -41
  181. package/dist/docs/guides/grokbot-agents.md +99 -53
  182. package/dist/docs/guides/improve.html +48 -40
  183. package/dist/docs/guides/improve.md +111 -58
  184. package/dist/docs/guides/jev.html +248 -0
  185. package/dist/docs/guides/jev.md +348 -0
  186. package/dist/docs/guides/mcp-oauth.html +74 -52
  187. package/dist/docs/guides/mcp-oauth.md +111 -121
  188. package/dist/docs/guides/opentelemetry.html +63 -54
  189. package/dist/docs/guides/opentelemetry.md +96 -165
  190. package/dist/docs/guides/slack.html +83 -59
  191. package/dist/docs/guides/slack.md +157 -227
  192. package/dist/docs/guides/webhooks.html +97 -230
  193. package/dist/docs/guides/webhooks.md +154 -385
  194. package/dist/docs/hashmap.json +1 -1
  195. package/dist/docs/hillclimbing.html +44 -38
  196. package/dist/docs/hillclimbing.md +101 -55
  197. package/dist/docs/index.html +38 -38
  198. package/dist/docs/index.md +2 -0
  199. package/dist/docs/llms-full.txt +3490 -3146
  200. package/dist/docs/llms.txt +22 -18
  201. package/dist/docs/quickstart.html +37 -37
  202. package/dist/docs/reference/agent-config.html +37 -37
  203. package/dist/docs/reference/artifacts.html +38 -38
  204. package/dist/docs/reference/channels.html +37 -37
  205. package/dist/docs/reference/cli.html +39 -37
  206. package/dist/docs/reference/cli.md +2 -0
  207. package/dist/docs/reference/connections.html +38 -38
  208. package/dist/docs/reference/connections.md +1 -1
  209. package/dist/docs/reference/evals.html +116 -0
  210. package/dist/docs/reference/evals.md +293 -0
  211. package/dist/docs/reference/extensions.html +80 -84
  212. package/dist/docs/reference/extensions.md +131 -202
  213. package/dist/docs/reference/hooks.html +39 -39
  214. package/dist/docs/reference/hooks.md +34 -34
  215. package/dist/docs/reference/http-api.html +37 -37
  216. package/dist/docs/reference/instructions.html +37 -37
  217. package/dist/docs/reference/playground.html +37 -37
  218. package/dist/docs/reference/project-layout.html +37 -37
  219. package/dist/docs/reference/prompt.html +37 -37
  220. package/dist/docs/reference/schedules.html +37 -37
  221. package/dist/docs/reference/sessions.html +37 -37
  222. package/dist/docs/reference/skills.html +37 -37
  223. package/dist/docs/reference/subagents.html +38 -38
  224. package/dist/docs/reference/subagents.md +1 -1
  225. package/dist/docs/reference/tools.html +38 -38
  226. package/dist/docs/reference/tools.md +4 -0
  227. package/dist/docs/templates/agentic-owners.html +38 -38
  228. package/dist/docs/templates/pr-autofixer.html +37 -37
  229. package/dist/docs/templates/security-reviewer.html +38 -38
  230. package/dist/docs/templates/thermo-quality-review.html +62 -0
  231. package/dist/docs/templates/thermo-quality-review.md +75 -0
  232. package/dist/docs/templates/thermo-review.html +62 -0
  233. package/dist/docs/templates/thermo-review.md +74 -0
  234. package/dist/docs/templates/triage.html +37 -37
  235. package/dist/docs/troubleshooting.html +38 -38
  236. package/dist/docs/troubleshooting.md +97 -66
  237. package/dist/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
  238. package/dist/extensions/improve/extension.d.ts +3 -1
  239. package/dist/extensions/improve/extension.d.ts.map +1 -1
  240. package/dist/extensions/improve/extension.js +4 -2
  241. package/dist/extensions/improve/skills/yourself.js +1 -1
  242. package/dist/extensions/jev/extension.d.ts +43 -0
  243. package/dist/extensions/jev/extension.d.ts.map +1 -0
  244. package/dist/extensions/jev/extension.js +47 -0
  245. package/dist/extensions/jev/lib/evaluate.d.ts +101 -0
  246. package/dist/extensions/jev/lib/evaluate.d.ts.map +1 -0
  247. package/dist/extensions/jev/lib/evaluate.js +167 -0
  248. package/dist/extensions/jev/skills/gated-write.md +25 -0
  249. package/dist/extensions/jev/skills/questions.md +33 -0
  250. package/dist/extensions/jev/tools/evaluate.d.ts +4 -0
  251. package/dist/extensions/jev/tools/evaluate.d.ts.map +1 -0
  252. package/dist/extensions/jev/tools/evaluate.js +88 -0
  253. package/dist/extensions.d.ts +1 -1
  254. package/dist/extensions.d.ts.map +1 -1
  255. package/dist/extensions.js +2 -0
  256. package/dist/filesystem.d.ts +46 -2
  257. package/dist/filesystem.d.ts.map +1 -1
  258. package/dist/filesystem.js +149 -102
  259. package/dist/index.d.ts +2 -2
  260. package/dist/index.d.ts.map +1 -1
  261. package/dist/index.js +1 -1
  262. package/dist/internal/advertise-tools.d.ts.map +1 -1
  263. package/dist/internal/advertise-tools.js +6 -0
  264. package/dist/internal/cli-ax.d.ts +6 -0
  265. package/dist/internal/cli-ax.d.ts.map +1 -1
  266. package/dist/internal/cli-ax.js +72 -14
  267. package/dist/internal/continuation-identity.d.ts.map +1 -1
  268. package/dist/internal/continuation-identity.js +1 -0
  269. package/dist/internal/cursor-agent-template.d.ts +1 -1
  270. package/dist/internal/cursor-agent-template.d.ts.map +1 -1
  271. package/dist/internal/cursor-agent-template.js +2 -0
  272. package/dist/internal/discovery/connections.d.ts.map +1 -1
  273. package/dist/internal/discovery/connections.js +18 -0
  274. package/dist/internal/discovery/extensions.d.ts.map +1 -1
  275. package/dist/internal/discovery/extensions.js +8 -4
  276. package/dist/internal/discovery/info.d.ts.map +1 -1
  277. package/dist/internal/discovery/info.js +1 -0
  278. package/dist/internal/filesystem/tools.d.ts.map +1 -1
  279. package/dist/internal/filesystem/tools.js +2 -2
  280. package/dist/internal/filesystem/walk.d.ts +7 -4
  281. package/dist/internal/filesystem/walk.d.ts.map +1 -1
  282. package/dist/internal/filesystem/walk.js +34 -11
  283. package/dist/internal/hosted-admission-adapter.d.ts +3 -0
  284. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
  285. package/dist/internal/hosted-delivery-protocol.d.ts +20 -0
  286. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  287. package/dist/internal/hosted-delivery-protocol.js +51 -1
  288. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  289. package/dist/internal/hosted-delivery.js +23 -25
  290. package/dist/internal/hosted-execution-diag.d.ts +12 -4
  291. package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
  292. package/dist/internal/hosted-execution-diag.js +26 -4
  293. package/dist/internal/hosted-execution-flush.d.ts +1 -0
  294. package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
  295. package/dist/internal/hosted-execution-flush.js +4 -2
  296. package/dist/internal/init-project.d.ts.map +1 -1
  297. package/dist/internal/init-project.js +4 -0
  298. package/dist/internal/server.d.ts.map +1 -1
  299. package/dist/internal/server.js +111 -48
  300. package/dist/internal/session-engine.d.ts +4 -1
  301. package/dist/internal/session-engine.d.ts.map +1 -1
  302. package/dist/internal/session-engine.js +39 -9
  303. package/dist/internal/skill-catalog.d.ts +28 -0
  304. package/dist/internal/skill-catalog.d.ts.map +1 -0
  305. package/dist/internal/skill-catalog.js +44 -0
  306. package/dist/playground/assets/index-DSMAewbx.css +1 -0
  307. package/dist/playground/assets/index-De_lpFxE.js +67 -0
  308. package/dist/playground/index.html +2 -2
  309. package/dist/types.d.ts +32 -3
  310. package/dist/types.d.ts.map +1 -1
  311. package/docs/README.md +2 -0
  312. package/docs/building-with-agents.md +96 -84
  313. package/docs/deployment.md +118 -364
  314. package/docs/evals.md +149 -673
  315. package/docs/guides/agent-to-agent.md +130 -48
  316. package/docs/guides/bitbucket.md +250 -49
  317. package/docs/guides/cloud-agents.md +119 -67
  318. package/docs/guides/convert-automation.md +157 -148
  319. package/docs/guides/github.md +261 -246
  320. package/docs/guides/gitlab.md +250 -51
  321. package/docs/guides/grokbot-agents.md +100 -55
  322. package/docs/guides/improve.md +112 -59
  323. package/docs/guides/jev.md +353 -0
  324. package/docs/guides/mcp-oauth.md +112 -122
  325. package/docs/guides/opentelemetry.md +97 -166
  326. package/docs/guides/slack.md +158 -228
  327. package/docs/guides/webhooks.md +155 -386
  328. package/docs/hillclimbing.md +102 -56
  329. package/docs/reference/cli.md +2 -0
  330. package/docs/reference/connections.md +1 -1
  331. package/docs/reference/evals.md +298 -0
  332. package/docs/reference/extensions.md +132 -203
  333. package/docs/reference/hooks.md +34 -34
  334. package/docs/reference/subagents.md +1 -1
  335. package/docs/reference/tools.md +4 -0
  336. package/docs/templates/thermo-quality-review.md +80 -0
  337. package/docs/templates/thermo-review.md +79 -0
  338. package/docs/troubleshooting.md +98 -67
  339. package/package.json +8 -1
  340. package/skills/github/SKILL.md +21 -13
  341. package/src/bin/agent-serve.ts +24 -3
  342. package/src/channels/checks.ts +8 -0
  343. package/src/channels/github/github-channel.ts +29 -19
  344. package/src/channels/origin/checks.ts +3 -1
  345. package/src/channels/slack/agentic-delivery.ts +2 -0
  346. package/src/channels/slack/dispatch.ts +131 -4
  347. package/src/channels/slack/placeholder.ts +51 -0
  348. package/src/channels/slack/slack-channel.ts +9 -2
  349. package/src/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
  350. package/src/extensions/improve/extension.ts +4 -2
  351. package/src/extensions/improve/skills/yourself.ts +1 -1
  352. package/src/extensions/jev/extension.ts +95 -0
  353. package/src/extensions/jev/lib/evaluate.ts +289 -0
  354. package/src/extensions/jev/skills/gated-write.md +25 -0
  355. package/src/extensions/jev/skills/questions.md +33 -0
  356. package/src/extensions/jev/tools/evaluate.ts +90 -0
  357. package/src/extensions.ts +2 -0
  358. package/src/filesystem.ts +168 -65
  359. package/src/index.ts +3 -0
  360. package/src/internal/advertise-tools.ts +6 -0
  361. package/src/internal/cli-ax.ts +88 -15
  362. package/src/internal/continuation-identity.ts +1 -0
  363. package/src/internal/cursor-agent-template.ts +2 -0
  364. package/src/internal/discovery/connections.ts +21 -0
  365. package/src/internal/discovery/extensions.ts +12 -4
  366. package/src/internal/discovery/info.ts +1 -0
  367. package/src/internal/filesystem/tools.ts +2 -0
  368. package/src/internal/filesystem/walk.ts +60 -15
  369. package/src/internal/hosted-admission-adapter.ts +3 -0
  370. package/src/internal/hosted-delivery-protocol.ts +82 -1
  371. package/src/internal/hosted-delivery.ts +23 -0
  372. package/src/internal/hosted-execution-diag.ts +33 -4
  373. package/src/internal/hosted-execution-flush.ts +4 -0
  374. package/src/internal/init-project.ts +4 -0
  375. package/src/internal/server.ts +130 -53
  376. package/src/internal/session-engine.ts +46 -8
  377. package/src/internal/skill-catalog.ts +69 -0
  378. package/src/types.ts +33 -3
  379. package/templates/thermo-quality-review/README.md +35 -0
  380. package/templates/thermo-quality-review/agent/agent.ts +8 -0
  381. package/templates/thermo-quality-review/agent/channels/github.ts +42 -0
  382. package/templates/thermo-quality-review/agent/instructions.md +43 -0
  383. package/templates/thermo-quality-review/agent/tools/post_findings.ts +70 -0
  384. package/templates/thermo-quality-review/evals/evals.config.ts +5 -0
  385. package/templates/thermo-quality-review/evals/review.eval.ts +62 -0
  386. package/templates/thermo-quality-review/package.json +18 -0
  387. package/templates/thermo-quality-review/tsconfig.json +12 -0
  388. package/templates/thermo-review/README.md +35 -0
  389. package/templates/thermo-review/agent/agent.ts +8 -0
  390. package/templates/thermo-review/agent/channels/github.ts +42 -0
  391. package/templates/thermo-review/agent/instructions.md +40 -0
  392. package/templates/thermo-review/agent/tools/post_findings.ts +70 -0
  393. package/templates/thermo-review/evals/evals.config.ts +5 -0
  394. package/templates/thermo-review/evals/review.eval.ts +53 -0
  395. package/templates/thermo-review/package.json +18 -0
  396. package/templates/thermo-review/tsconfig.json +12 -0
  397. package/dist/docs/assets/building-with-agents.md.CEGVXkmO.js +0 -13
  398. package/dist/docs/assets/building-with-agents.md.CEGVXkmO.lean.js +0 -1
  399. package/dist/docs/assets/chunks/@localSearchIndexroot.DtXk1hy-.js +0 -1
  400. package/dist/docs/assets/chunks/channel.Bkv1N-gK.js +0 -1
  401. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CZDco1o8.js +0 -1
  402. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CZDco1o8.js +0 -1
  403. package/dist/docs/assets/chunks/clone.YSt_40_s.js +0 -1
  404. package/dist/docs/assets/chunks/framework.dypDpWZ3.js +0 -19
  405. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.C4CLm481.js +0 -1
  406. package/dist/docs/assets/deployment.md.Dm4Qo3hp.js +0 -51
  407. package/dist/docs/assets/deployment.md.Dm4Qo3hp.lean.js +0 -1
  408. package/dist/docs/assets/evals.md.BLDRt5LH.js +0 -211
  409. package/dist/docs/assets/evals.md.BLDRt5LH.lean.js +0 -1
  410. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.js +0 -14
  411. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.lean.js +0 -1
  412. package/dist/docs/assets/guides_bitbucket.md.CTpCl__f.js +0 -10
  413. package/dist/docs/assets/guides_bitbucket.md.CTpCl__f.lean.js +0 -1
  414. package/dist/docs/assets/guides_cloud-agents.md.lSE_l7lH.js +0 -9
  415. package/dist/docs/assets/guides_cloud-agents.md.lSE_l7lH.lean.js +0 -1
  416. package/dist/docs/assets/guides_convert-automation.md.Ck6Cr68A.js +0 -12
  417. package/dist/docs/assets/guides_convert-automation.md.Ck6Cr68A.lean.js +0 -1
  418. package/dist/docs/assets/guides_github.md.D6ER29dG.js +0 -64
  419. package/dist/docs/assets/guides_github.md.D6ER29dG.lean.js +0 -1
  420. package/dist/docs/assets/guides_gitlab.md.P-TjBnS5.js +0 -14
  421. package/dist/docs/assets/guides_gitlab.md.P-TjBnS5.lean.js +0 -1
  422. package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.js +0 -9
  423. package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.lean.js +0 -1
  424. package/dist/docs/assets/guides_improve.md.BKaDuKKK.js +0 -14
  425. package/dist/docs/assets/guides_improve.md.BKaDuKKK.lean.js +0 -1
  426. package/dist/docs/assets/guides_mcp-oauth.md.DMNMpXtO.js +0 -28
  427. package/dist/docs/assets/guides_mcp-oauth.md.DMNMpXtO.lean.js +0 -1
  428. package/dist/docs/assets/guides_opentelemetry.md._CRfDyzH.js +0 -26
  429. package/dist/docs/assets/guides_opentelemetry.md._CRfDyzH.lean.js +0 -1
  430. package/dist/docs/assets/guides_slack.md.DdT8rmsj.js +0 -46
  431. package/dist/docs/assets/guides_slack.md.DdT8rmsj.lean.js +0 -1
  432. package/dist/docs/assets/guides_webhooks.md.aQW10HRe.js +0 -225
  433. package/dist/docs/assets/guides_webhooks.md.aQW10HRe.lean.js +0 -1
  434. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.js +0 -1
  435. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.lean.js +0 -1
  436. package/dist/docs/assets/reference_extensions.md.wlFD3cUR.js +0 -62
  437. package/dist/docs/assets/reference_extensions.md.wlFD3cUR.lean.js +0 -1
  438. package/dist/docs/assets/troubleshooting.md.BcgNoYtJ.js +0 -1
  439. package/dist/docs/assets/troubleshooting.md.BcgNoYtJ.lean.js +0 -1
  440. package/dist/playground/assets/index-BLlKgZtI.css +0 -1
  441. package/dist/playground/assets/index-CDS5p9sR.js +0 -67
@@ -1,110 +1,141 @@
1
1
  # Fix common agent problems
2
2
 
3
- Start with four checks, in order:
3
+ Start with three checks:
4
4
 
5
- 1. Project discovery: `agent-sdk validate --dir .`
6
- 2. Whether the serve process is running
7
- 3. What the playground or HTTP API shows
8
- 4. The session event stream (trace)
5
+ 1. Run `agent-sdk validate --dir .`.
6
+ 2. Confirm the expected agent and connections in
7
+ `agent-sdk info --dir . --json`.
8
+ 3. Reproduce once, then inspect the serve log or session trace.
9
9
 
10
- Match your symptom below. Keep the commands as `agent-sdk`. If it is
11
- not on `PATH`, use `npx @cursor/july`.
10
+ Match the visible symptom below. If `agent-sdk` is not on `PATH`, use
11
+ `npx @cursor/july`.
12
12
 
13
- ## What if serve or the playground looks wrong?
13
+ ## Serve or the playground will not work
14
14
 
15
15
  | What you see | What to do |
16
16
  | --- | --- |
17
- | `serve` won't start | Run `agent-sdk validate --dir .` and fix the reported errors. |
18
- | Playground is blank or says there are no agents | The UI needs a running `serve` process. Building the playground assets alone is not enough. |
19
- | The playground UI looks stale | `serve --dev` prints a playground URL. Open that URL. Agent-file edits still need a restart (press Enter on the TTY). |
20
- | Sessions exist but the playground list is empty | The list shows sessions for the authenticated caller. In `--dev` on loopback the list is wider. Otherwise open `/<slug>/playground?sessionId=ses_…`. |
21
- | Port 3000 is already in use | For the default serve port, the CLI tries the next free port and prints a notice. Pass `--port` to pick one, or `--port 0` for any free port. Stop leftover playground or webhook-forwarder processes if you need the original port. |
17
+ | `serve` exits before listening | Fix the errors from `agent-sdk validate --dir .`, then start it again. |
18
+ | Playground is blank or says there are no agents | Start `agent-sdk serve`; built playground assets have no agent data without the server. |
19
+ | Agent-file edits do not appear | Open the URL printed by `serve --dev`, then press Enter in its TTY to reload after file changes. |
20
+ | Sessions exist but the list is empty | The list is scoped to the authenticated principal. Use the same identity that created the session; a `?sessionId=` deep link does not bypass authorization. |
21
+ | The preferred port is busy | Use the next port printed by the CLI, pass `--port <number>`, or pass `--port 0` for any free port. |
22
22
 
23
- ## What if a model turn goes wrong?
23
+ ## A model turn fails
24
24
 
25
25
  | What you see | What to do |
26
26
  | --- | --- |
27
- | Built-in file reads and greps fail; the turn retries for a long time | Run under Node 22.13+ (or `tsx`), never Bun. Look for `NGHTTP2_FRAME_SIZE_ERROR` in logs. |
28
- | The turn fails immediately with an API-key error | Sign in with `agent-sdk login`, or set `CURSOR_API_KEY` or `CURSOR_SERVICE_ACCOUNT_KEY`. Discovery, `info`, `call`, and serve bring-up work without a key; model turns need one. |
29
- | Replies quote rules or `AGENTS.md` from outside your agent project | The session workspace inherited parent-folder config. Nested git checkouts default `local.cwd` to a per-project cache directory under `~/.cache`. Point `defineAgent({ local: { cwd } })` at a checkout only when the agent should inherit that tree, or set `--state-root` to a clean directory (for example under `/tmp`). |
30
- | Yellow box shows Datadog/Linear tools, but the model lists `GetDynamicTools` / IDE `cursor` tools and never calls them | Attached MCP sits behind harness meta-tools, or the harness cwd is still inside another checkout. Set `advertiseTools: true` for named tools on local turns. Check `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
31
- | Server tools, skills, or workspace seed files never appear | Server tools and sandbox seeds apply on the local runtime (cloud server tools need `--public-url` / `--cloud-tools-url`). Skills reach cloud through the Agent Store when hosting or a personal `CURSOR_API_KEY` is available; otherwise only skills already in the cloud repo. `validate` warns when this combination is present. |
32
- | `validate` and `run` succeed, but typecheck fails in CI | The CLI runs TypeScript with type-stripping only. Keep tool `execute` return types as object literals or `type` aliases, not `interface` types. |
33
- | Login works, but turns are rejected when using custom API hosts | Point login and model traffic at the same host (`CURSOR_API_BASE_URL` and `CURSOR_BACKEND_URL`). A key from one host is rejected by the other. |
27
+ | File reads and greps fail repeatedly with `NGHTTP2_FRAME_SIZE_ERROR` | Run the agent under Node 22.13 or newer, never Bun. |
28
+ | The turn immediately reports a missing API key | Set `CURSOR_API_KEY`, `CURSOR_API_KEY_FILE`, or `CURSOR_SERVICE_ACCOUNT_KEY`, or run `agent-sdk login`. |
29
+ | Login succeeds but the model host rejects the key | Point login and model traffic at the same API host; check `CURSOR_API_BASE_URL` and `CURSOR_BACKEND_URL`. |
30
+ | Cloud turns cannot reach local tools or skills | Give the cloud runtime a reachable `--public-url` and protected tool bridge, or move the required capability into the cloud checkout. See [agent runtime](/docs/reference/agent-config.md#choose-a-runtime). |
34
31
 
35
- ## What if the HTTP API returns an error?
32
+ ## A turn behaves unexpectedly
36
33
 
37
34
  | What you see | What to do |
38
35
  | --- | --- |
39
- | `409` on a follow-up message | Refresh the `continuationToken` or confirm the session is a chat session. Task sessions do not accept follow-ups. |
40
- | `409 session_busy` on `call --session` | The tool is a write (or declares no effect) and a model turn is running. Wait for the turn to finish, omit `--session` for a one-off call, or declare `effect: "read"` on a tool that only reads so it runs alongside turns. |
41
- | `403` on stream or follow-up | Use the same auth identity that created the session. Off localhost, pass `--bearer-token` and send it on every request. |
42
- | Works on localhost; blocked through a tunnel or LAN | Default auth allows only direct loopback callers. Share the host with `--bearer-token <secret>` (or authored `bearerAuth`). Use `--allow-anonymous` only on a trusted private network. |
43
- | A channel route fails to compile with a schema type error | `GET` routes need a Zod `querySchema`. `POST` / `PUT` / `PATCH` need a Zod `bodySchema`. Use `z.object({})` or `z.unknown()` for open shapes. |
36
+ | Replies quote an ancestor `AGENTS.md` or unrelated repository rules | Inspect `local.cwd` in `/v1/info`. Set `defineAgent({ local: { cwd } })` or the session workspace explicitly instead of inheriting the parent checkout. |
37
+ | The model lists IDE meta-tools but never calls named MCP tools | Set `advertiseTools: true` on the local model-visible connection and confirm it under `connections` in `/v1/info`. |
38
+ | Server tools, skills, or seed files are absent | Check the selected local/cloud runtime and discovered project in `/v1/info`; follow the capability warning from `validate`. |
39
+ | `validate` and `run` pass but CI type-checking fails | Run the project type check. Tool results must be JSON-shaped; prefer object literals or `type` aliases over `interface` return types. |
44
40
 
45
- ## What if GitHub webhooks misbehave?
41
+ ## HTTP returns 401, 403, or 409
46
42
 
47
43
  | What you see | What to do |
48
44
  | --- | --- |
49
- | `github forward` returns 401 on every delivery, but the hook was created | Clear `GITHUB_TOKEN` and `GH_TOKEN` for that command. The forwarder uses your `gh` CLI login: `GITHUB_TOKEN= GH_TOKEN= agent-sdk github forward …` |
50
- | `Hook already exists` when starting a forwarder | GitHub allows one forwarder per repo. Run a single `github forward --dir <parent>` and stop stale forwarders. |
51
- | Deliveries rejected outside `--dev` | Set `GITHUB_WEBHOOK_SECRET` on the server and on the signer. Without a secret, the channel stays loopback-only. |
52
- | You lack repo admin and can't forward | Use `agent-sdk github replay <pr-url>`. It needs pull access only and posts signed test payloads. |
45
+ | `401` outside localhost | Send the configured bearer token, alias token, or channel credential. Default custom routes admit direct loopback only. |
46
+ | `403` on a stream or follow-up | Use the same authenticated principal that created the session. |
47
+ | A localhost route fails through a tunnel or LAN | Protect the shared host with `--bearer-token` or authored channel auth. Use `--allow-anonymous` only behind a proxy that authenticates every caller. |
48
+ | `409` on a follow-up | Refresh the rotating `continuationToken` and confirm the target is a chat session; task sessions do not accept follow-ups. |
49
+ | `409 session_busy` from `call --session` | Wait for the turn, omit `--session`, or mark a read-only tool with `effect: "read"` so it can run concurrently. |
50
+ | A custom route fails schema type-checking | Add the required Zod `querySchema` for `GET`, or `bodySchema` for `POST`, `PUT`, and `PATCH`. See [Channels](/docs/reference/channels.md). |
53
51
 
54
- ## What if Slack stays quiet?
52
+ ## A hosted deployment fails or looks stale
55
53
 
56
54
  | What you see | What to do |
57
55
  | --- | --- |
58
- | Logs show `channel idle missing credentials` | Expected when tokens are missing. Run `agent-sdk slack create --dir <agent>` to provision the app and write the tokens, or `agent-sdk slack init --manual --dir <agent>` and paste the manifests at api.slack.com. Then set `<PREFIX>_SLACK_BOT_TOKEN` and `<PREFIX>_SLACK_APP_TOKEN` per agent and run `agent-sdk slack doctor --prefix <PREFIX>`. |
59
- | `slack create` reports the app needs admin approval | Open Slack's **Request approval** page (the CLI prints the link; the same URL is **Send a reminder** after you submit). Managed install does not file the request. Keep the CLI running, then click **Retry** in the dashboard after an admin approves. |
60
- | The bot ignores ordinary channel posts | Default engagement is mentions and DMs only. Enable `engagement.channelPosts` with an allowlist, and subscribe the app to `message.channels` / `message.groups`. |
61
- | Approve / Deny buttons do nothing | Channels that post approval cards need `toolApprovals: true`. Recreate the app with `slack create` if interactivity is off. |
56
+ | Local changes do not appear after deploy | `deploy` reads a pushed Git ref, not the working tree. Commit and push the intended ref, then deploy it again. |
57
+ | The deployment never becomes running | Run `agent-sdk deployment <slug>` and `agent-sdk logs --prod --slug <slug>`, then act on the reported build or startup error. |
58
+ | A secret or egress change has no effect | Confirm the name with `secrets list`, verify the `hosting` block exists on the pushed ref, and follow the CLI or dashboard prompt to redeploy. |
59
+ | Cursor events stopped after redeploy | Redeploy replaces CLI-supplied event repositories. Pass every `--cursor-events-repo` value again. |
60
+ | External HTTP rejects the alias token | Update the caller with the current token. If the token is lost or exposed, run `agent-sdk rotate-token <slug>` and replace it everywhere. |
62
61
 
63
- ## What if host MCP OAuth fails?
62
+ See [Deployment](/docs/deployment.md) for source, credential, and
63
+ redeployment boundaries.
64
+
65
+ ## GitHub deliveries fail
66
+
67
+ | What you see | What to do |
68
+ | --- | --- |
69
+ | `github forward` returns 401 on every delivery after creating the hook | Clear `GITHUB_TOKEN` and `GH_TOKEN` for that command so the forwarder uses the `gh` CLI login: `GITHUB_TOKEN= GH_TOKEN= agent-sdk github forward ...`. |
70
+ | `Hook already exists` | Run one forwarder for the repository and stop the stale process. |
71
+ | Direct webhook deliveries are rejected outside `--dev` | Configure the same `GITHUB_WEBHOOK_SECRET` on the signer and server. Cursor event pull needs no public webhook or webhook secret. |
72
+ | You cannot create a forwarder | Use `agent-sdk github replay <pr-url>`; it needs pull access instead of repository administration. |
73
+
74
+ The [GitHub guide](/docs/guides/github.md) covers event pull, replay, and
75
+ direct webhooks.
76
+
77
+ ## Slack does not respond
64
78
 
65
79
  | What you see | What to do |
66
80
  | --- | --- |
67
- | `must be defineConnection({ url, oauth: true })` | The connection file needs `oauth: true`, or you passed the wrong connection name to `agent-sdk mcp oauth`. |
68
- | Local auth works; hosted calls unauthorized | Finish Connect on the hosted engine, or run `agent-sdk mcp oauth <name> --store`. Confirm names with `agent-sdk secrets list <slug>`, then redeploy. |
69
- | Model asks for `mcp_auth` or IDE MCP for a connector it already has | Attached MCP is behind meta-tools. Set `advertiseTools: true` for named tools on local turns, or call it from a host tool via `ctx.host.mcp`. |
81
+ | Logs say `channel idle ... missing credentials` | Run `agent-sdk slack create --dir <agent>`, then check the generated prefix with `agent-sdk slack doctor`. Use `slack init --manual` only for an app you own. |
82
+ | `slack create` is waiting for workspace approval | Open the approval link printed by the CLI, keep the command running, and retry after an admin approves. |
83
+ | The bot ignores ordinary channel posts | Configure `engagement.channelPosts`, create the app with `--channel-posts`, and invite it to every allowed channel. |
84
+ | Approval buttons do nothing | Set `toolApprovals: true`, then recreate the app if its interactivity is not enabled. |
70
85
 
71
- See [Host MCP OAuth](/docs/guides/mcp-oauth.md) and
72
- [`skills/mcp-auth/SKILL.md`](https://github.com/cursor/cursor/blob/main/packages/agent-serve/skills/mcp-auth/SKILL.md).
86
+ See the [Slack guide](/docs/guides/slack.md) for app setup and engagement
87
+ choices.
73
88
 
74
- ## What if a secret showed up in a terminal transcript?
89
+ ## MCP authorization fails
75
90
 
76
91
  | What you see | What to do |
77
92
  | --- | --- |
78
- | `secrets set NAME=VALUE` in an agent-captured terminal or shell history | Rotate the secret at the provider. Set it again with names only: `agent-sdk secrets set <slug> NAME` (hidden prompt) or pipe/redirect the value. `NAME=VALUE` requires `--from-argv` and still leaks into argv. |
79
- | Alias token printed during first deploy or `rotate-token` | Treat it as exposed if the transcript left your machine. Run `agent-sdk rotate-token <slug>`, store the new token outside agent transcripts, and update callers. |
80
- | Someone verified a secret with `echo` / `printenv` | Rotate it. Confirm presence with `agent-sdk secrets list <slug>` (names only), then redeploy and test the feature. |
93
+ | `must be defineConnection({ url, oauth: true })` | Add `oauth: true` to the named URL connection or correct the connection filename passed to `mcp oauth`. |
94
+ | Local auth works but hosted calls return unauthorized | Complete Connect for the running process, or run `mcp oauth <name> --store` and redeploy for future replacements. |
95
+ | The model invents `mcp_auth` instead of calling the server | Set `advertiseTools: true` for named local tools, or expose a host-side wrapper through `ctx.host.mcp`. |
81
96
 
82
- ## What if schedules, reminders, or approvals stall?
97
+ See [Host MCP OAuth](/docs/guides/mcp-oauth.md) for the credential lifecycle.
98
+
99
+ ## Schedules, reminders, or approvals stall
100
+
101
+ | What you see | What to do |
102
+ | --- | --- |
103
+ | A schedule or reminder never fires under `--dev` | Trigger it through the matching `/v1/dev/schedules/<id>` or `/v1/dev/reminders/<id>` route; development mode does not auto-fire. |
104
+ | A pending approval disappears after restart | Parked approvals do not survive restart. Run the turn again. |
105
+ | A reminder is disarmed with `handler_lost_on_restart` | Recreate handler-form reminders after restart, or use a prompt-form reminder. |
106
+ | The same schedule fires on several self-hosted processes | Enable schedules on one serving process per project and pass `--no-schedules` to the others. |
107
+
108
+ ## A credential was exposed
83
109
 
84
110
  | What you see | What to do |
85
111
  | --- | --- |
86
- | A schedule or reminder never fires under `--dev` | Dev mode does not auto-fire. Trigger with `POST /<slug>/v1/dev/schedules/<id>` or `POST /<slug>/v1/dev/reminders/<id>` (list reminders at `GET /v1/dev/reminders`). |
87
- | A pending tool approval disappeared after restart | Parked approvals do not survive host restart. They resolve as interrupted. Run the turn again. |
88
- | A reminder is disarmed after restart (`handler_lost_on_restart`) | Handler-form reminders live in memory. Re-arm them from the code that created them, or use prompt-form reminders. |
112
+ | A secret value appears in a command, transcript, or shell history | Rotate it at the provider, set it again through hidden input or stdin, and test the feature. |
113
+ | An alias token appears outside its secure destination | Run `agent-sdk rotate-token <slug>`, store the new value outside transcripts, and update every caller. |
114
+ | Someone printed a secret to verify it | Rotate it. Confirm only the name with `agent-sdk secrets list <slug>`, then redeploy and exercise the feature. |
115
+
116
+ ## Read the session trace
89
117
 
90
- ## How do I read a session trace?
118
+ Start with `actions.requested` and `action.result`. Count calls by tool
119
+ name, pair every request with its result, and separate host preparation
120
+ from tools chosen by the model.
91
121
 
92
- Look at `actions.requested` / `action.result` pairs for the tool
93
- trajectory. Count calls by tool name before blaming latency. Separate
94
- host-side work (channel `callTool`, preparation) from tools the model
95
- chose.
122
+ `turn.failed` with `turn interrupted` usually means a follow-up or stop
123
+ ended the turn deliberately. Other failures should have an error event
124
+ near the tool or model boundary that produced them.
96
125
 
97
- `turn.failed` with `"turn interrupted"` means a follow-up or stop ended
98
- the turn on purpose.
126
+ Use the trace path printed by `agent-sdk run`:
99
127
 
100
- If the model reads outside the session workspace, the prepared files
101
- don't match what the instructions expect. Fix the layout. See
102
- [Hillclimbing](/docs/hillclimbing.md).
128
+ ```bash
129
+ agent-sdk trajectory --events <trace-path>
130
+ ```
103
131
 
104
- `agent-sdk trajectory --events <file>` summarizes any saved NDJSON
105
- stream. The playground **Open trace** control does the same visually.
132
+ The playground's **Open trace** control renders the same trajectory.
133
+ When the agent runs but makes poor decisions, move from diagnosis to a
134
+ measured [hillclimb](/docs/hillclimbing.md).
106
135
 
107
- ## What's next
136
+ ## Related
108
137
 
109
- - [Hillclimbing](/docs/hillclimbing.md): when the agent runs but underperforms
110
- - [Deployment](/docs/deployment.md): auth and state on shared hosts
138
+ - [Deployment](/docs/deployment.md): hosted and self-hosted boundaries
139
+ - [Sessions](/docs/reference/sessions.md): session ownership and event
140
+ vocabulary
141
+ - [CLI reference](/docs/reference/cli.md): command flags and exit behavior
@@ -16,17 +16,13 @@ The result carries `agentId` (`bc-...`) and a `url`. Report both in full. Never
16
16
 
17
17
  ## Look an agent up by id
18
18
 
19
- Call `get` with the `agent_id`. It returns the agent's `status` (`creating`, `running`, `finished`, `error`, or `expired`), its `branch` and pull request `prUrl` once pushed, the `changes` it made so far (files and lines), a `summary` when one exists, and an `error` when it failed. A run takes minutes: check when asked or when you need the result, not in a tight loop. The final report itself comes from `dump`.
19
+ Call `get` with the `agent_id`. It returns the agent's `status` (`creating`, `running`, `finished`, `error`, `expired`, or `unknown`), its `branch` and pull request `prUrl` once pushed, change counts, a `summary` when one exists, and an `error` when it failed. A run takes minutes: check when asked or when you need the result, not in a tight loop. The final report itself comes from `dump`.
20
20
 
21
21
  ## Read what it did
22
22
 
23
- To read the report or understand what was done, call `dump` with the `agent_id`. It writes the agent's whole conversation, every run, to `cloud-agent-transcripts/<agent_id>.jsonl` in your workspace and returns the absolute `path` plus the `finalMessage`. Each line is one JSON message with `role` (`user` or `assistant`) and, for assistant lines, `text`, `thinking`, and `toolCalls` (tool `name`, `args`, `content`, `error`). Read it with your file and shell tools, using the returned path:
23
+ To read the report or understand what was done, call `dump` with the `agent_id`. Once a transcript exists, it writes the agent's whole conversation to `cloud-agent-transcripts/<agent_id>.jsonl` in your workspace and returns the absolute `path` plus `finalMessage`. Before any transcript exists, either value may be absent; wait for output instead of inventing a report.
24
24
 
25
- - `tail -n 1 <path>` gives the final report.
26
- - `grep '"toolCalls"' <path>` shows the commands and edits it made.
27
- - `grep '"role":"user"' <path>` shows every prompt it received, including replies.
28
-
29
- Use `dump` before summarizing an agent's work for a person, and to understand a failure before replying with a fix.
25
+ Use `finalMessage` as the agent's report. Read the returned transcript path when you need its prompts, reasoning, or tool calls, then inspect the resulting branch or pull request before claiming exact code changes. The transcript is evidence of what the agent did, not a canonical diff.
30
26
 
31
27
  ## Reply
32
28
 
@@ -3,7 +3,9 @@
3
3
  * repository, so changing how it behaves is a change to that source: a
4
4
  * one-off Cursor cloud agent does the coding on a branch and opens a pull
5
5
  * request, the agent that mounted this writes the brief and reports the
6
- * pull request, and the tree it runs from is never edited.
6
+ * pull request. Durable behavior changes only after review, merge, and
7
+ * deployment. A cloud-runtime turn may edit its ephemeral checkout while
8
+ * preparing the pull request.
7
9
  *
8
10
  * ```ts
9
11
  * // agent/extensions/improve.ts
@@ -1 +1 @@
1
- {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../../src/extensions/improve/extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC7B,+FAA+F;IAC/F,IAAI,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,uGAAuG;IACvG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gGAAgG;IAChG,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,yGAAyG;IACzG,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,oDAAoD;AACpD,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAID,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,aAAa,EAAE,cAAc,CAgBpD,CAAC;eAEY,OAAO"}
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../../src/extensions/improve/extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC7B,+FAA+F;IAC/F,IAAI,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,uGAAuG;IACvG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gGAAgG;IAChG,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,yGAAyG;IACzG,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,oDAAoD;AACpD,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAID,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,aAAa,EAAE,cAAc,CAgBpD,CAAC;eAEY,OAAO"}
@@ -3,7 +3,9 @@
3
3
  * repository, so changing how it behaves is a change to that source: a
4
4
  * one-off Cursor cloud agent does the coding on a branch and opens a pull
5
5
  * request, the agent that mounted this writes the brief and reports the
6
- * pull request, and the tree it runs from is never edited.
6
+ * pull request. Durable behavior changes only after review, merge, and
7
+ * deployment. A cloud-runtime turn may edit its ephemeral checkout while
8
+ * preparing the pull request.
7
9
  *
8
10
  * ```ts
9
11
  * // agent/extensions/improve.ts
@@ -27,7 +29,7 @@ import { defineExtension } from "../../extensions.js";
27
29
  const line = z.string().trim().min(1);
28
30
  const improve = defineExtension({
29
31
  root: import.meta.dirname,
30
- description: "Change your own source through a one-off cloud agent and a pull request, never the running tree.",
32
+ description: "Propose changes to your own source through a branch and pull request; durable behavior changes after review and deployment.",
31
33
  config: z.object({
32
34
  repo: z.string().url(),
33
35
  path: z
@@ -23,7 +23,7 @@ Under \`${path}/agent/\`:
23
23
  ${treeNotes}
24
24
  ## The change is made on a clean checkout
25
25
 
26
- Never edit the tree you run from: it is a deployed copy of \`${path}\`, and nothing changed there lasts. The change is made on a clean checkout of ${repo} at \`${ref}\`. When your own turn runs on a cloud VM with that repository checked out, that VM is the checkout: branch there. Otherwise hand the coding to a one-off Cursor cloud agent through the cloud agents extension, with \`launch\` under its mount namespace, \`repo\` set to ${repo}, and \`starting_ref\` to \`${ref}\`. One agent per change; steer it with \`reply\` rather than launching another.
26
+ Durable source changes happen on a branch from a clean checkout of ${repo} at \`${ref}\`, never by mutating a deployed local-runtime copy. When your own turn runs on a cloud VM with that repository checked out, its ephemeral tree is the checkout: branch there. Otherwise hand the coding to a one-off Cursor cloud agent through the cloud agents extension, with \`launch\` under its mount namespace, \`repo\` set to ${repo}, and \`starting_ref\` to \`${ref}\`. One agent per change; steer it with \`reply\` instead of launching another.
27
27
 
28
28
  ## The brief
29
29
 
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Jev decisions as an extension. Mount it and the agent can ask Jev for
3
+ * typed boolean, choice, and score answers, then call `decide` from your
4
+ * own channel hooks and tools before they start a turn or write.
5
+ *
6
+ * ```ts
7
+ * // agent/extensions/jev.ts
8
+ * import jev from "@cursor/july/extensions/jev";
9
+ *
10
+ * export default jev();
11
+ * ```
12
+ *
13
+ * Contributes `<namespace>__evaluate` plus the `questions` and
14
+ * `gated-write` skills (the namespace is the mount filename). Auth is
15
+ * `TYPESAFE_API_KEY`. The default model is `jev-latest`. Custom tools
16
+ * import `decide`, `above`, and `needsHuman` from this same module. Set
17
+ * `harnessTools` or `skills` to false when the agent should not see those
18
+ * contributions.
19
+ */
20
+ import type { Extension } from "../../types.js";
21
+ /** Mount options; every field is optional. */
22
+ export interface JevOptions {
23
+ /** TypeSafe API key. Defaults to `TYPESAFE_API_KEY`. */
24
+ apiKey?: string;
25
+ /** TypeSafe model id. Defaults to `jev-latest`. */
26
+ model?: string;
27
+ /** Mount the namespaced `evaluate` harness tool. Defaults to true. */
28
+ harnessTools?: boolean;
29
+ /** Mount the `questions` and `gated-write` skills. Defaults to true. */
30
+ skills?: boolean;
31
+ }
32
+ /** {@link JevOptions} with defaults applied. */
33
+ export interface JevConfig {
34
+ apiKey?: string;
35
+ model: string;
36
+ harnessTools: boolean;
37
+ skills: boolean;
38
+ }
39
+ declare const jev: Extension<JevConfig, JevOptions | undefined>;
40
+ export type { AnswersFor, BooleanAnswer, BooleanQuestion, ChoiceAnswer, ChoiceQuestion, EvaluateArgs, EvaluateResult, EvaluationAnswer, EvaluationQuestion, EvaluationState, QuestionMap, ScoreAnswer, ScoreQuestion, } from "./lib/evaluate.js";
41
+ export { above, DEFAULT_EVALUATION_MODEL, DEFAULT_HUMAN_THRESHOLD, decide, evaluate, needsHuman, } from "./lib/evaluate.js";
42
+ export default jev;
43
+ //# sourceMappingURL=extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../../src/extensions/jev/extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,8CAA8C;AAC9C,MAAM,WAAW,UAAU;IACzB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wEAAwE;IACxE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,gDAAgD;AAChD,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;CACjB;AAiBD,QAAA,MAAM,GAAG,EAAE,SAAS,CAAC,SAAS,EAAE,UAAU,GAAG,SAAS,CAQpD,CAAC;AAEH,YAAY,EACV,UAAU,EACV,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,EACL,wBAAwB,EACxB,uBAAuB,EACvB,MAAM,EACN,QAAQ,EACR,UAAU,GACX,MAAM,mBAAmB,CAAC;eAEZ,GAAG"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Jev decisions as an extension. Mount it and the agent can ask Jev for
3
+ * typed boolean, choice, and score answers, then call `decide` from your
4
+ * own channel hooks and tools before they start a turn or write.
5
+ *
6
+ * ```ts
7
+ * // agent/extensions/jev.ts
8
+ * import jev from "@cursor/july/extensions/jev";
9
+ *
10
+ * export default jev();
11
+ * ```
12
+ *
13
+ * Contributes `<namespace>__evaluate` plus the `questions` and
14
+ * `gated-write` skills (the namespace is the mount filename). Auth is
15
+ * `TYPESAFE_API_KEY`. The default model is `jev-latest`. Custom tools
16
+ * import `decide`, `above`, and `needsHuman` from this same module. Set
17
+ * `harnessTools` or `skills` to false when the agent should not see those
18
+ * contributions.
19
+ */
20
+ import { z } from "zod";
21
+ import { defineExtension } from "../../extensions.js";
22
+ import { DEFAULT_EVALUATION_MODEL } from "./lib/evaluate.js";
23
+ const config = z
24
+ .object({
25
+ apiKey: z.string().min(1).optional(),
26
+ model: z.string().min(1).optional(),
27
+ harnessTools: z.boolean().default(true),
28
+ skills: z.boolean().default(true),
29
+ })
30
+ .default({})
31
+ .transform(options => { var _a; return ({
32
+ apiKey: options.apiKey,
33
+ model: (_a = options.model) !== null && _a !== void 0 ? _a : DEFAULT_EVALUATION_MODEL,
34
+ harnessTools: options.harnessTools,
35
+ skills: options.skills,
36
+ }); });
37
+ const jev = defineExtension({
38
+ root: import.meta.dirname,
39
+ description: "Ask Jev for typed choice, score, and boolean answers.",
40
+ config,
41
+ contributions: options => ({
42
+ tools: options.harnessTools,
43
+ skills: options.skills,
44
+ }),
45
+ });
46
+ export { above, DEFAULT_EVALUATION_MODEL, DEFAULT_HUMAN_THRESHOLD, decide, evaluate, needsHuman, } from "./lib/evaluate.js";
47
+ export default jev;
@@ -0,0 +1,101 @@
1
+ /**
2
+ * System One decisions for Agent SDK host code.
3
+ *
4
+ * Chat models write. {@link evaluate} asks Jev for typed choice / score /
5
+ * boolean answers over shared state. Call it from a project tool, a
6
+ * router, or other host code after mounting `@cursor/july/extensions/jev`.
7
+ * Do not set Jev as the `defineAgent` turn model.
8
+ *
9
+ * ```ts
10
+ * import { evaluate, decide, above, needsHuman } from "@cursor/july/extensions/jev";
11
+ *
12
+ * const { answers } = await evaluate({
13
+ * state: draft,
14
+ * questions: {
15
+ * route: {
16
+ * type: "choice",
17
+ * instructions: "Which queue should handle this?",
18
+ * criteria: {
19
+ * billing: "charges, invoices, refunds",
20
+ * shipping: "delivery",
21
+ * technical: "bugs and outages",
22
+ * },
23
+ * },
24
+ * post: {
25
+ * type: "boolean",
26
+ * instructions: "Is this safe to post publicly?",
27
+ * },
28
+ * },
29
+ * });
30
+ *
31
+ * if (needsHuman(answers.route) || !above(answers.post, 0.85)) {
32
+ * return { action: "review" };
33
+ * }
34
+ * ```
35
+ *
36
+ * Auth is `TYPESAFE_API_KEY`. `model` is a TypeSafe id (`jev-latest` by
37
+ * default).
38
+ */
39
+ /** TypeSafe model used when {@link EvaluateArgs.model} is omitted. */
40
+ export declare const DEFAULT_EVALUATION_MODEL = "jev-latest";
41
+ /** Default bar for {@link needsHuman} when the caller does not pass one. */
42
+ export declare const DEFAULT_HUMAN_THRESHOLD = 0.7;
43
+ export type EvaluationState = string | Record<string, unknown> | readonly unknown[];
44
+ export type BooleanQuestion = {
45
+ type: "boolean";
46
+ instructions: string;
47
+ };
48
+ export type ChoiceCriterion = string | readonly string[] | {
49
+ includes: readonly string[];
50
+ } | null;
51
+ export type ChoiceQuestion<C extends Record<string, ChoiceCriterion> = Record<string, ChoiceCriterion>> = {
52
+ type: "choice";
53
+ instructions: string;
54
+ criteria: C;
55
+ };
56
+ export type ScoreQuestion = {
57
+ type: "score";
58
+ instructions: string;
59
+ criteria: readonly string[];
60
+ };
61
+ export type EvaluationQuestion = BooleanQuestion | ChoiceQuestion | ScoreQuestion;
62
+ export type QuestionMap = Record<string, EvaluationQuestion>;
63
+ export type BooleanAnswer = {
64
+ type: "boolean";
65
+ probability: number;
66
+ };
67
+ export type ChoiceAnswer<C extends Record<string, unknown> = Record<string, unknown>> = {
68
+ type: "choice";
69
+ choice: keyof C & string;
70
+ probabilities: {
71
+ [K in keyof C]: number;
72
+ };
73
+ };
74
+ export type ScoreAnswer = {
75
+ type: "score";
76
+ score: number;
77
+ probabilities: Record<string, number>;
78
+ };
79
+ export type EvaluationAnswer = BooleanAnswer | ChoiceAnswer | ScoreAnswer;
80
+ export type AnswerFor<Q> = Q extends BooleanQuestion ? BooleanAnswer : Q extends ChoiceQuestion<infer C> ? ChoiceAnswer<C> : Q extends ScoreQuestion ? ScoreAnswer : never;
81
+ export type AnswersFor<Q extends QuestionMap> = {
82
+ [K in keyof Q]: AnswerFor<Q[K]>;
83
+ };
84
+ export type EvaluateResult<Q extends QuestionMap = QuestionMap> = {
85
+ answers: AnswersFor<Q>;
86
+ };
87
+ export type EvaluateArgs<Q extends QuestionMap = QuestionMap> = {
88
+ model?: string;
89
+ state: EvaluationState;
90
+ questions: Q;
91
+ apiKey?: string;
92
+ baseUrl?: string;
93
+ fetch?: typeof globalThis.fetch;
94
+ };
95
+ /** Ask Jev for typed answers over one state. */
96
+ export declare function evaluate<const Q extends QuestionMap>(args: EvaluateArgs<Q>): Promise<EvaluateResult<Q>>;
97
+ /** Same as {@link evaluate}, returning only `answers`. */
98
+ export declare function decide<const Q extends QuestionMap>(args: EvaluateArgs<Q>): Promise<AnswersFor<Q>>;
99
+ export declare function above(answer: BooleanAnswer | ScoreAnswer, threshold: number): boolean;
100
+ export declare function needsHuman(answer: BooleanAnswer | ChoiceAnswer, threshold?: number): boolean;
101
+ //# sourceMappingURL=evaluate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../../src/extensions/jev/lib/evaluate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,sEAAsE;AACtE,eAAO,MAAM,wBAAwB,eAAe,CAAC;AAErD,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAI3C,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,SAAS,OAAO,EAAE,CAAC;AAEvB,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,SAAS,MAAM,EAAE,GACjB;IAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC/B,IAAI,CAAC;AAET,MAAM,MAAM,cAAc,CACxB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,IACzE;IACF,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC1B,eAAe,GACf,cAAc,GACd,aAAa,CAAC;AAElB,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AAE7D,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,YAAY,CACtB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACzD;IACF,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;IACzB,aAAa,EAAE;SAAG,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM;KAAE,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,CAAC;AAE1E,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,eAAe,GAChD,aAAa,GACb,CAAC,SAAS,cAAc,CAAC,MAAM,CAAC,CAAC,GAC/B,YAAY,CAAC,CAAC,CAAC,GACf,CAAC,SAAS,aAAa,GACrB,WAAW,GACX,KAAK,CAAC;AAEd,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,WAAW,IAAI;KAC7C,CAAC,IAAI,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI;IAChE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,EAAE,CAAC,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC,CAAC;AA0GF,gDAAgD;AAChD,wBAAsB,QAAQ,CAAC,KAAK,CAAC,CAAC,SAAS,WAAW,EACxD,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,GACpB,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAuB5B;AAED,0DAA0D;AAC1D,wBAAsB,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,WAAW,EACtD,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,GACpB,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAGxB;AAED,wBAAgB,KAAK,CACnB,MAAM,EAAE,aAAa,GAAG,WAAW,EACnC,SAAS,EAAE,MAAM,GAChB,OAAO,CAKT;AAED,wBAAgB,UAAU,CACxB,MAAM,EAAE,aAAa,GAAG,YAAY,EACpC,SAAS,GAAE,MAAgC,GAC1C,OAAO,CAKT"}