@cursor/july 0.1.54 → 0.1.61

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 (293) hide show
  1. package/dist/bin/agent-serve.js +30 -23
  2. package/dist/channels/github/github-channel.d.ts +12 -0
  3. package/dist/channels/github/github-channel.d.ts.map +1 -1
  4. package/dist/channels/github/github-channel.js +67 -15
  5. package/dist/channels/github/types.d.ts +27 -1
  6. package/dist/channels/github/types.d.ts.map +1 -1
  7. package/dist/channels/origin/cursor-account.d.ts +22 -0
  8. package/dist/channels/origin/cursor-account.d.ts.map +1 -0
  9. package/dist/channels/origin/cursor-account.js +35 -0
  10. package/dist/channels/origin/events.d.ts +10 -0
  11. package/dist/channels/origin/events.d.ts.map +1 -0
  12. package/dist/channels/origin/events.js +27 -0
  13. package/dist/channels/origin/index.d.ts +29 -0
  14. package/dist/channels/origin/index.d.ts.map +1 -0
  15. package/dist/channels/origin/index.js +28 -0
  16. package/dist/channels/origin/origin-channel.d.ts +68 -0
  17. package/dist/channels/origin/origin-channel.d.ts.map +1 -0
  18. package/dist/channels/origin/origin-channel.js +567 -0
  19. package/dist/channels/origin/origin-webhook.d.ts +38 -0
  20. package/dist/channels/origin/origin-webhook.d.ts.map +1 -0
  21. package/dist/channels/origin/origin-webhook.js +151 -0
  22. package/dist/channels/origin/types.d.ts +152 -0
  23. package/dist/channels/origin/types.d.ts.map +1 -0
  24. package/dist/channels/origin/types.js +1 -0
  25. package/dist/channels/slack/doctor.d.ts +17 -1
  26. package/dist/channels/slack/doctor.d.ts.map +1 -1
  27. package/dist/channels/slack/doctor.js +186 -10
  28. package/dist/docs/404.html +2 -2
  29. package/dist/docs/ab.html +4 -4
  30. package/dist/docs/assets/{app.DAKcDclS.js → app.CW3KJh72.js} +1 -1
  31. package/dist/docs/assets/chunks/@localSearchIndexroot.BuymfBAo.js +1 -0
  32. package/dist/docs/assets/chunks/{VPLocalSearchBox.BNIaCSfG.js → VPLocalSearchBox.Bk6EWpPj.js} +1 -1
  33. package/dist/docs/assets/chunks/{theme.B47GzJjc.js → theme.Bz9AodBA.js} +2 -2
  34. package/dist/docs/assets/{example-agents_fsd.md.DPz9ezO4.js → example-agents_fsd.md.ZeGEpAw_.js} +2 -2
  35. package/dist/docs/assets/{example-agents_fsd.md.DPz9ezO4.lean.js → example-agents_fsd.md.ZeGEpAw_.lean.js} +1 -1
  36. package/dist/docs/assets/{example-agents_security-reviewer.md.Dkf1gyo6.js → example-agents_security-reviewer.md.DBL1TwtP.js} +2 -2
  37. package/dist/docs/assets/{example-agents_security-reviewer.md.Dkf1gyo6.lean.js → example-agents_security-reviewer.md.DBL1TwtP.lean.js} +1 -1
  38. package/dist/docs/assets/guides_convert-automation.md.BhMzTkE5.js +12 -0
  39. package/dist/docs/assets/guides_convert-automation.md.BhMzTkE5.lean.js +1 -0
  40. package/dist/docs/assets/{guides_github.md.B8QKtIpw.js → guides_github.md.CLLQJKRB.js} +4 -4
  41. package/dist/docs/assets/{guides_github.md.B8QKtIpw.lean.js → guides_github.md.CLLQJKRB.lean.js} +1 -1
  42. package/dist/docs/assets/index.md.DhRHS_-L.js +5 -0
  43. package/dist/docs/assets/{index.md.COeoSkcF.lean.js → index.md.DhRHS_-L.lean.js} +1 -1
  44. package/dist/docs/assets/{reference_cli.md.-V6J7Cl8.js → reference_cli.md.Cl14Jfo3.js} +10 -2
  45. package/dist/docs/assets/{reference_cli.md.-V6J7Cl8.lean.js → reference_cli.md.Cl14Jfo3.lean.js} +1 -1
  46. package/dist/docs/assets/scaffolding-agents.md.CrWSA0Ko.js +1 -0
  47. package/dist/docs/assets/{scaffolding-agents.md.mkc3B_ZW.lean.js → scaffolding-agents.md.CrWSA0Ko.lean.js} +1 -1
  48. package/dist/docs/assets/templates_agentic-owners.md.BkTLORaU.js +14 -0
  49. package/dist/docs/assets/templates_agentic-owners.md.BkTLORaU.lean.js +1 -0
  50. package/dist/docs/assets/templates_demo.md.Bgd6MBaZ.js +4 -0
  51. package/dist/docs/assets/templates_demo.md.Bgd6MBaZ.lean.js +1 -0
  52. package/dist/docs/assets/templates_pr-autofixer.md.DcmoeUNZ.js +8 -0
  53. package/dist/docs/assets/templates_pr-autofixer.md.DcmoeUNZ.lean.js +1 -0
  54. package/dist/docs/assets/templates_security-reviewer.md.C0yIUaYs.js +2 -0
  55. package/dist/docs/assets/templates_security-reviewer.md.C0yIUaYs.lean.js +1 -0
  56. package/dist/docs/assets/templates_triage.md.DWuQ1bZz.js +9 -0
  57. package/dist/docs/assets/templates_triage.md.DWuQ1bZz.lean.js +1 -0
  58. package/dist/docs/building-with-agents.html +4 -4
  59. package/dist/docs/concepts.html +5 -5
  60. package/dist/docs/deployment.html +4 -4
  61. package/dist/docs/evals.html +4 -4
  62. package/dist/docs/example-agents/approval-buddy.html +4 -4
  63. package/dist/docs/example-agents/benny.html +4 -4
  64. package/dist/docs/example-agents/bugbot.html +4 -4
  65. package/dist/docs/example-agents/codebase-wiki.html +4 -4
  66. package/dist/docs/example-agents/codeowners-review.html +4 -4
  67. package/dist/docs/example-agents/concierge.html +4 -4
  68. package/dist/docs/example-agents/fsd.html +5 -5
  69. package/dist/docs/example-agents/index.html +4 -4
  70. package/dist/docs/example-agents/knowledge-base.html +4 -4
  71. package/dist/docs/example-agents/oncall.html +4 -4
  72. package/dist/docs/example-agents/security-reviewer.html +5 -5
  73. package/dist/docs/example-agents/slack-agent.html +4 -4
  74. package/dist/docs/example-agents/weather-agent.html +4 -4
  75. package/dist/docs/guides/agent-to-agent.html +4 -4
  76. package/dist/docs/guides/cloud-runtime.html +4 -4
  77. package/dist/docs/guides/convert-automation.html +36 -0
  78. package/dist/docs/guides/github.html +7 -7
  79. package/dist/docs/guides/human-in-the-loop.html +4 -4
  80. package/dist/docs/guides/mcp-oauth.html +4 -4
  81. package/dist/docs/guides/opentelemetry.html +4 -4
  82. package/dist/docs/guides/slack.html +4 -4
  83. package/dist/docs/guides/webhooks.html +4 -4
  84. package/dist/docs/hashmap.json +1 -1
  85. package/dist/docs/hillclimbing.html +4 -4
  86. package/dist/docs/index.html +6 -6
  87. package/dist/docs/quickstart.html +4 -4
  88. package/dist/docs/reference/agent-config.html +4 -4
  89. package/dist/docs/reference/artifacts.html +4 -4
  90. package/dist/docs/reference/channels.html +4 -4
  91. package/dist/docs/reference/cli.html +14 -6
  92. package/dist/docs/reference/connections.html +4 -4
  93. package/dist/docs/reference/hooks.html +4 -4
  94. package/dist/docs/reference/http-api.html +4 -4
  95. package/dist/docs/reference/instructions.html +4 -4
  96. package/dist/docs/reference/playground.html +4 -4
  97. package/dist/docs/reference/project-layout.html +4 -4
  98. package/dist/docs/reference/prompt.html +4 -4
  99. package/dist/docs/reference/schedules.html +4 -4
  100. package/dist/docs/reference/sessions.html +4 -4
  101. package/dist/docs/reference/skills.html +4 -4
  102. package/dist/docs/reference/subagents.html +4 -4
  103. package/dist/docs/reference/tools.html +4 -4
  104. package/dist/docs/scaffolding-agents.html +5 -5
  105. package/dist/docs/storage.html +4 -4
  106. package/dist/docs/templates/agentic-owners.html +38 -0
  107. package/dist/docs/templates/demo.html +28 -0
  108. package/dist/docs/templates/pr-autofixer.html +32 -0
  109. package/dist/docs/templates/security-reviewer.html +26 -0
  110. package/dist/docs/templates/triage.html +14 -16
  111. package/dist/docs/troubleshooting.html +4 -4
  112. package/dist/index.d.ts +3 -3
  113. package/dist/index.d.ts.map +1 -1
  114. package/dist/index.js +2 -2
  115. package/dist/internal/cli-ax.d.ts +2 -0
  116. package/dist/internal/cli-ax.d.ts.map +1 -1
  117. package/dist/internal/cli-ax.js +30 -1
  118. package/dist/internal/cli-deploy.js +1 -1
  119. package/dist/internal/cli-slack.d.ts +4 -0
  120. package/dist/internal/cli-slack.d.ts.map +1 -1
  121. package/dist/internal/cli-slack.js +46 -20
  122. package/dist/internal/cursor-event-relay.d.ts +59 -11
  123. package/dist/internal/cursor-event-relay.d.ts.map +1 -1
  124. package/dist/internal/cursor-event-relay.js +133 -26
  125. package/dist/internal/discovery.d.ts.map +1 -1
  126. package/dist/internal/discovery.js +11 -2
  127. package/dist/internal/distribution.d.ts.map +1 -1
  128. package/dist/internal/distribution.js +1 -0
  129. package/dist/internal/handleAgentServeTrigger.d.ts +33 -6
  130. package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -1
  131. package/dist/internal/handleAgentServeTrigger.js +97 -19
  132. package/dist/internal/init-interview.d.ts +67 -0
  133. package/dist/internal/init-interview.d.ts.map +1 -0
  134. package/dist/internal/init-interview.js +300 -0
  135. package/dist/internal/init-project.d.ts +7 -0
  136. package/dist/internal/init-project.d.ts.map +1 -1
  137. package/dist/internal/init-project.js +99 -43
  138. package/dist/internal/mcp-endpoint.d.ts +7 -0
  139. package/dist/internal/mcp-endpoint.d.ts.map +1 -1
  140. package/dist/internal/mcp-endpoint.js +7 -0
  141. package/dist/internal/server.d.ts.map +1 -1
  142. package/dist/internal/server.js +159 -57
  143. package/dist/internal/session-engine.d.ts.map +1 -1
  144. package/dist/internal/session-engine.js +20 -21
  145. package/dist/internal/session-links.d.ts +14 -0
  146. package/dist/internal/session-links.d.ts.map +1 -0
  147. package/dist/internal/session-links.js +69 -0
  148. package/dist/internal/sessions-client.d.ts.map +1 -1
  149. package/dist/internal/sessions-client.js +1 -0
  150. package/dist/internal/slack-provision-client.js +1 -1
  151. package/dist/playground/assets/index-ClbuaLpm.css +1 -0
  152. package/dist/playground/assets/index-SqkR13k_.js +85 -0
  153. package/dist/playground/index.html +2 -2
  154. package/dist/types.d.ts +19 -12
  155. package/dist/types.d.ts.map +1 -1
  156. package/docs/README.md +15 -0
  157. package/docs/example-agents/fsd.md +3 -0
  158. package/docs/example-agents/security-reviewer.md +3 -0
  159. package/docs/guides/convert-automation.md +176 -0
  160. package/docs/guides/github.md +6 -2
  161. package/docs/reference/cli.md +36 -10
  162. package/docs/scaffolding-agents.md +3 -0
  163. package/docs/templates/agentic-owners.md +97 -0
  164. package/docs/templates/demo.md +84 -0
  165. package/docs/templates/pr-autofixer.md +136 -0
  166. package/docs/templates/security-reviewer.md +89 -0
  167. package/docs/templates/triage.md +59 -101
  168. package/package.json +9 -1
  169. package/skills/github/SKILL.md +4 -5
  170. package/src/bin/agent-serve.ts +13 -6
  171. package/src/channels/github/github-channel.ts +95 -18
  172. package/src/channels/github/types.ts +31 -0
  173. package/src/channels/origin/cursor-account.ts +64 -0
  174. package/src/channels/origin/events.ts +41 -0
  175. package/src/channels/origin/index.ts +29 -0
  176. package/src/channels/origin/origin-channel.ts +784 -0
  177. package/src/channels/origin/origin-webhook.ts +202 -0
  178. package/src/channels/origin/types.ts +186 -0
  179. package/src/channels/slack/doctor.ts +218 -5
  180. package/src/index.ts +3 -1
  181. package/src/internal/cli-ax.ts +33 -1
  182. package/src/internal/cli-deploy.ts +2 -2
  183. package/src/internal/cli-slack.ts +68 -19
  184. package/src/internal/cursor-event-relay.ts +193 -31
  185. package/src/internal/discovery.ts +15 -5
  186. package/src/internal/distribution.ts +1 -0
  187. package/src/internal/handleAgentServeTrigger.ts +129 -19
  188. package/src/internal/init-interview.ts +384 -0
  189. package/src/internal/init-project.ts +146 -46
  190. package/src/internal/mcp-endpoint.ts +7 -0
  191. package/src/internal/server.ts +188 -58
  192. package/src/internal/session-engine.ts +5 -21
  193. package/src/internal/session-links.ts +88 -0
  194. package/src/internal/sessions-client.ts +1 -0
  195. package/src/internal/slack-provision-client.ts +1 -1
  196. package/src/types.ts +19 -12
  197. package/templates/agentic-owners/README.md +73 -0
  198. package/templates/agentic-owners/agent/agent.ts +15 -0
  199. package/templates/agentic-owners/agent/channels/github.ts +85 -0
  200. package/templates/agentic-owners/agent/instructions.md +34 -0
  201. package/templates/agentic-owners/agent/lib/config.ts +13 -0
  202. package/templates/agentic-owners/agent/lib/github.ts +241 -0
  203. package/templates/agentic-owners/agent/lib/owners/README.md +50 -0
  204. package/templates/agentic-owners/agent/lib/owners/constants.ts +22 -0
  205. package/templates/agentic-owners/agent/lib/owners/decision.ts +485 -0
  206. package/templates/agentic-owners/agent/lib/owners/handles.ts +54 -0
  207. package/templates/agentic-owners/agent/lib/owners/match.ts +177 -0
  208. package/templates/agentic-owners/agent/lib/owners/matching.ts +95 -0
  209. package/templates/agentic-owners/agent/lib/owners/parse.ts +589 -0
  210. package/templates/agentic-owners/agent/lib/owners/policyMode.ts +65 -0
  211. package/templates/agentic-owners/agent/lib/owners/prompt.ts +66 -0
  212. package/templates/agentic-owners/agent/lib/owners/prompts/base-review.md +105 -0
  213. package/templates/agentic-owners/agent/lib/owners/types.ts +45 -0
  214. package/templates/agentic-owners/agent/lib/review.ts +777 -0
  215. package/templates/agentic-owners/agent/tools/record_review.ts +69 -0
  216. package/templates/agentic-owners/evals/evals.config.ts +5 -0
  217. package/templates/agentic-owners/evals/owners.eval.ts +116 -0
  218. package/templates/agentic-owners/package.json +20 -0
  219. package/templates/agentic-owners/tsconfig.json +12 -0
  220. package/templates/demo/README.md +33 -0
  221. package/templates/demo/agent/agent.ts +15 -0
  222. package/templates/demo/agent/channels/github.ts +50 -0
  223. package/templates/demo/agent/channels/queue.ts +30 -0
  224. package/templates/demo/agent/instructions.md +8 -0
  225. package/templates/demo/agent/lib/collect.ts +78 -0
  226. package/templates/demo/agent/tools/record_demo.ts +40 -0
  227. package/templates/demo/evals/demo.eval.ts +33 -0
  228. package/templates/demo/evals/evals.config.ts +5 -0
  229. package/templates/demo/package.json +18 -0
  230. package/templates/demo/tsconfig.json +12 -0
  231. package/templates/pr-autofixer/README.md +44 -0
  232. package/templates/pr-autofixer/agent/agent.ts +22 -0
  233. package/templates/pr-autofixer/agent/channels/drive.ts +40 -0
  234. package/templates/pr-autofixer/agent/channels/github.ts +167 -0
  235. package/templates/pr-autofixer/agent/channels/slack.ts +17 -0
  236. package/templates/pr-autofixer/agent/hooks/bind-agent.ts +19 -0
  237. package/templates/pr-autofixer/agent/instructions.md +83 -0
  238. package/templates/pr-autofixer/agent/lib/affinity.ts +33 -0
  239. package/templates/pr-autofixer/agent/lib/drive-schemas.ts +15 -0
  240. package/templates/pr-autofixer/agent/lib/drive.ts +79 -0
  241. package/templates/pr-autofixer/agent/lib/merge-watch.ts +123 -0
  242. package/templates/pr-autofixer/agent/lib/pr-state.ts +54 -0
  243. package/templates/pr-autofixer/agent/lib/repos.ts +19 -0
  244. package/templates/pr-autofixer/agent/lib/start-drive.ts +122 -0
  245. package/templates/pr-autofixer/agent/lib/webhook-buffer.ts +225 -0
  246. package/templates/pr-autofixer/agent/lib/webhook-routing.ts +231 -0
  247. package/templates/pr-autofixer/agent/storage.ts +7 -0
  248. package/templates/pr-autofixer/agent/tools/drive_pr.ts +22 -0
  249. package/templates/pr-autofixer/evals/coordinator.eval.ts +16 -0
  250. package/templates/pr-autofixer/evals/evals.config.ts +5 -0
  251. package/templates/pr-autofixer/init.json +25 -0
  252. package/templates/pr-autofixer/package.json +18 -0
  253. package/templates/pr-autofixer/tsconfig.json +12 -0
  254. package/templates/security-reviewer/README.md +31 -0
  255. package/templates/security-reviewer/agent/agent.ts +15 -0
  256. package/templates/security-reviewer/agent/channels/github.ts +46 -0
  257. package/templates/security-reviewer/agent/instructions.md +22 -0
  258. package/templates/security-reviewer/agent/lib/repos.ts +5 -0
  259. package/templates/security-reviewer/agent/tools/post_findings.ts +72 -0
  260. package/templates/security-reviewer/evals/evals.config.ts +5 -0
  261. package/templates/security-reviewer/evals/review.eval.ts +53 -0
  262. package/templates/security-reviewer/init.json +25 -0
  263. package/templates/security-reviewer/package.json +18 -0
  264. package/templates/security-reviewer/tsconfig.json +12 -0
  265. package/templates/triage/README.md +27 -29
  266. package/templates/triage/agent/agent.ts +1 -0
  267. package/templates/triage/agent/channels/queue.ts +47 -0
  268. package/templates/triage/agent/channels/webhook.ts +50 -0
  269. package/templates/triage/agent/instructions.md +24 -13
  270. package/templates/triage/agent/lib/actuate.ts +759 -0
  271. package/templates/triage/agent/lib/parse-queue-event.ts +168 -0
  272. package/templates/triage/agent/lib/tracker.ts +5 -0
  273. package/templates/triage/agent/lib/types.ts +52 -0
  274. package/templates/triage/agent/lib/verify-webhook.ts +81 -0
  275. package/templates/triage/agent/skills/triage-rubric.md +6 -5
  276. package/templates/triage/agent/tools/record_triage.ts +24 -5
  277. package/templates/triage/evals/triage.eval.ts +25 -3
  278. package/templates/triage/overlays/jira/README.md +21 -0
  279. package/templates/triage/overlays/jira/agent/lib/tracker.ts +8 -0
  280. package/templates/triage/overlays/jira/agent/mcp-connections/tracker.ts +7 -0
  281. package/templates/triage/overlays/linear/README.md +21 -0
  282. package/templates/triage/overlays/linear/agent/lib/tracker.ts +8 -0
  283. package/templates/triage/overlays/linear/agent/mcp-connections/tracker.ts +7 -0
  284. package/templates/triage/package.json +1 -1
  285. package/dist/docs/assets/chunks/@localSearchIndexroot.C4uxzYEU.js +0 -1
  286. package/dist/docs/assets/index.md.COeoSkcF.js +0 -5
  287. package/dist/docs/assets/scaffolding-agents.md.mkc3B_ZW.js +0 -1
  288. package/dist/docs/assets/templates_triage.md.CConZt1z.js +0 -11
  289. package/dist/docs/assets/templates_triage.md.CConZt1z.lean.js +0 -1
  290. package/dist/playground/assets/index-BHAPd9KT.js +0 -85
  291. package/dist/playground/assets/index-DpKH0HcT.css +0 -1
  292. package/templates/triage/agent/channels/intake.ts +0 -20
  293. package/templates/triage/agent/channels/slack.ts +0 -3
@@ -0,0 +1,97 @@
1
+ ---
2
+ title: "Review pull requests with owners policies"
3
+ description: "Scaffold the agent, commit .agentic-owners policies, and let it risk-tier PRs, request the owners, and approve what the policy allows."
4
+ ---
5
+
6
+ # Review pull requests with owners policies
7
+
8
+ This agent reviews every pull request in your repository. It risk-tiers
9
+ the diff, requests the owning team or user as reviewers, and approves
10
+ what your policy allows. Ownership rules live in
11
+ `.agentic-owners/policy.yml` files committed at any depth of the repo;
12
+ the closest policy to a changed file wins, and policies are always read
13
+ from the PR's base ref so a PR cannot exempt itself.
14
+
15
+ ## Scaffold
16
+
17
+ ```bash
18
+ npx @cursor/july init ./owners-agent --template agentic-owners
19
+ ```
20
+
21
+ `init` writes the project, installs dependencies, and puts `agent-sdk`
22
+ on PATH.
23
+
24
+ ## Log in and run
25
+
26
+ Set your repositories in `agent/lib/config.ts` (`repos: ["you/your-repo"]`),
27
+ then:
28
+
29
+ ```bash
30
+ cd owners-agent
31
+ agent-sdk login
32
+ agent-sdk dev
33
+ ```
34
+
35
+ PR events stream through your Cursor account — no webhook or GitHub App
36
+ setup. Open a PR, or replay a real one deterministically (this also works
37
+ with `repos` empty):
38
+
39
+ ```bash
40
+ agent-sdk github replay https://github.com/you/your-repo/pull/123 --dir .
41
+ ```
42
+
43
+ Deploy with `agent-sdk deploy`.
44
+
45
+ ## Policies
46
+
47
+ With no policy files, every PR gets a default risk review: very-low and
48
+ low risk approve, medium and above hold with a comment. Route reviews by
49
+ committing policies:
50
+
51
+ ```yaml
52
+ # .agentic-owners/policy.yml — anywhere in the repo; closest wins.
53
+ # paths are repo-root-relative globs, wherever the policy file lives.
54
+ version: 1
55
+ policies:
56
+ - paths: ["docs/**"]
57
+ always_approve: true
58
+ - paths: ["src/api/**"]
59
+ team: acme/platform # or user: alice
60
+ prompt: api-review.md # optional extra rubric, same directory
61
+ - paths: ["src/billing/**"]
62
+ user: alice
63
+ human_review_required: true # the agent never approves; a person must
64
+ ```
65
+
66
+ `self_review: true` lets a listed owner's own PRs clear their rule.
67
+ `global_exclusions` in the root policy opts paths out entirely.
68
+
69
+ ## What one review does
70
+
71
+ One model turn per PR head assesses the host-fetched diff against the
72
+ base rubric plus any matched rule prompts, then records a verdict with
73
+ `record_review`. The host recomputes the policy from trusted state and
74
+ applies the deterministic decision:
75
+
76
+ - **Approve** when the tier is low and no matched rule demands a human,
77
+ bound to the head SHA.
78
+ - **Request reviewers** otherwise — the policy owners (max 2, never the
79
+ author), plus one status comment the agent keeps updated in place.
80
+
81
+ The model never writes to GitHub. A broken policy file fails closed with
82
+ a comment listing the validation issues.
83
+
84
+ ## Rubric
85
+
86
+ Edit `agent/lib/owners/prompts/base-review.md` for the risk tiers and
87
+ their boundaries. Per-area guidance belongs in policy `prompt:` files
88
+ next to the policy that names them. The next review reads both.
89
+
90
+ ## Evals
91
+
92
+ ```bash
93
+ agent-sdk eval
94
+ ```
95
+
96
+ Three smoke reviews (docs-only, auth deletion, prompt injection). Eval
97
+ sessions skip GitHub writes.
@@ -0,0 +1,84 @@
1
+ ---
2
+ title: "Record a walkthrough from a collected PR"
3
+ description: "Scaffold the agent, seed the PR on the host, record a walkthrough, and comment the result."
4
+ ---
5
+
6
+ # Record a walkthrough from a collected PR
7
+
8
+ This agent records a walkthrough for a pull request you already opened.
9
+ The host fetches title, body, and files, writes `pr.md` and `files.md`,
10
+ then starts the turn. The model reads those files. It does not fetch
11
+ the PR.
12
+
13
+ ## Scaffold
14
+
15
+ ```bash
16
+ npx @cursor/july init ./demo-agent --template demo
17
+ ```
18
+
19
+ `init` writes the project, installs dependencies, and puts `agent-sdk`
20
+ on PATH.
21
+
22
+ ## Log in
23
+
24
+ Model turns use your Cursor account.
25
+
26
+ ```bash
27
+ cd demo-agent
28
+ agent-sdk login
29
+ ```
30
+
31
+ The command opens a browser if you have no stored credential.
32
+
33
+ ## Collect the PR
34
+
35
+ The host needs GitHub credentials so it can read the PR and comment:
36
+ `GITHUB_TOKEN`, `GH_TOKEN`, or `gh auth`.
37
+
38
+ In the playground, run `/queue/pr` and paste a PR URL or `owner/repo#N`.
39
+
40
+ ```bash
41
+ curl -X POST http://127.0.0.1:3000/demo-agent/v1/channels/queue/pr \
42
+ -H 'content-type: application/json' \
43
+ -d '{ "pr": "acme/shop#42" }'
44
+ ```
45
+
46
+ The host fetches title, body, and files, writes `pr.md` and `files.md`,
47
+ and starts the turn. Retries coalesce on `pr:owner/repo#N`.
48
+
49
+ GitHub label `demo` or comment `/demo` when you terminate webhooks
50
+ yourself: self-host and set `GITHUB_WEBHOOK_SECRET`. Hosted Cursor
51
+ aliases require `X-Agent-Alias-Token`, which GitHub cannot send.
52
+
53
+ `record_demo` comments on that key. Eval sessions skip the comment.
54
+
55
+ ## First walkthrough
56
+
57
+ ```bash
58
+ agent-sdk dev
59
+ ```
60
+
61
+ Open the playground. Run `/queue/pr` with a PR. The model reads the
62
+ seeded files and calls `record_demo` once. Turns are sandboxed with
63
+ `read` and `grep` only: PR title and body are untrusted.
64
+
65
+ ## Evals
66
+
67
+ One smoke case. The host seeds `pr.md` and `files.md`. No GitHub call.
68
+
69
+ ```bash
70
+ agent-sdk eval
71
+ ```
72
+
73
+ ## Deploy
74
+
75
+ ```bash
76
+ agent-sdk deploy
77
+ ```
78
+
79
+ Run it from the agent's git checkout. It infers repository, ref, path,
80
+ and slug, builds on Cursor-managed hosting, and prints the URL.
81
+ `agent-sdk deployments` shows status.
82
+
83
+ Playground and `/queue/pr` need the alias token. GitHub label and
84
+ `/demo` stay on a self-hosted agent with a webhook secret.
@@ -0,0 +1,136 @@
1
+ ---
2
+ title: "Fix pull requests on a Cursor cloud VM"
3
+ description: "Scaffold the agent, point it at your repos, and opt in to auto-fix a PR."
4
+ ---
5
+
6
+ # Fix pull requests on a Cursor cloud VM
7
+
8
+ This agent coordinates from chat and Slack, then hands each opted-in
9
+ pull request to a Cursor cloud VM with a real checkout. The same cloud
10
+ conversation resumes when you drive the PR again, GitHub reports a
11
+ change on that PR, or a merge-conflict reminder fires.
12
+
13
+ Chat never has the target checkout. `gh` and `git` run on the VM.
14
+ Opening a pull request does not start a session. Drive a PR from the
15
+ playground, Slack, or HTTP to opt in. After that, the agent auto-fixes:
16
+ it pushes verified fixes to the PR head and performs workflow actions.
17
+ It never merges, enables auto-merge, or force-pushes.
18
+
19
+ ## Scaffold
20
+
21
+ On a TTY, `init` asks which GitHub repos to watch. Scripts pass the
22
+ same answer with `--var`:
23
+
24
+ ```bash
25
+ npx @cursor/july init ./pr-autofixer --template pr-autofixer
26
+ npx @cursor/july init ./pr-autofixer --template pr-autofixer \
27
+ --var repos=acme/widgets,acme/api --json
28
+ ```
29
+
30
+ `init` writes the project, installs dependencies, and puts `agent-sdk`
31
+ on PATH. You can still edit `agent/lib/repos.ts` later, or override the
32
+ list with `PR_AUTOFIXER_REPOS`.
33
+
34
+ ## Log in
35
+
36
+ Model turns and cloud agents use your Cursor account.
37
+
38
+ ```bash
39
+ cd pr-autofixer
40
+ agent-sdk login
41
+ ```
42
+
43
+ The command opens a browser if you have no stored credential. Cloud
44
+ turns spend cloud-agent budget under that account.
45
+
46
+ ## Point it at a repo
47
+
48
+ `init` writes the repo list into `agent/lib/repos.ts`. One owner. Up to
49
+ 20 repos. The GitHub channel requests `contents-write` so the agent can
50
+ push to the PR head.
51
+
52
+ ## First drive
53
+
54
+ ```bash
55
+ agent-sdk dev
56
+ ```
57
+
58
+ Open the playground. Paste a PR URL or `owner/repo#N`. The local
59
+ agent calls `drive_pr`, which attaches the PR to a cloud session and
60
+ returns when that session exists. Autofix continues in the background.
61
+ `bcId` / `agentUrl` are included when already bound.
62
+
63
+ You can also POST:
64
+
65
+ ```bash
66
+ curl -X POST http://127.0.0.1:3000/pr-autofixer/v1/channels/drive \
67
+ -H 'content-type: application/json' \
68
+ -d '{
69
+ "pr": "https://github.com/acme/widgets/pull/1"
70
+ }'
71
+ ```
72
+
73
+ HTTP and `drive_pr` both return when the session exists, not when
74
+ triage finishes. `bcId` / `agentUrl` are included when already bound.
75
+
76
+ A merged or closed PR returns `status: "finished"` and does not start
77
+ a session.
78
+
79
+ The VM starts from the PR base. The agent creates `autofix/pr-<N>` off
80
+ the PR head the first time it needs code, then pushes verified fixes
81
+ with `git push origin HEAD:<headRef>`. Workflow actions run through
82
+ `gh`. `autoCreatePR` is off, so the agent never opens a new PR.
83
+
84
+ ## GitHub wakes
85
+
86
+ Mounted at `/v1/channels/github`. Cursor relays pull request, comment,
87
+ review, check, and failing status events for the repos you listed. A
88
+ wake only starts or resumes a cloud conversation after that PR has been
89
+ driven. `pull_request.opened` is ignored. A PR comment or review on an
90
+ opted-in PR wakes the agent. A comment on a plain GitHub issue does
91
+ not. The channel buffers about 3 seconds per PR. Payload details are
92
+ dropped on purpose. The follow-up says something changed.
93
+
94
+ Pending wakes snapshot to `host.kv` (`webhook-buffer`) before the
95
+ webhook is ACKed, and restore on restart. Affinity is
96
+ `affinity/{owner/repo#N}` → `bc-…` in the same store, written from
97
+ `agent.bound`. `agent/storage.ts` uses `cursorHostedStorage`, so both
98
+ survive host replace. Local serve without that plug-in falls back to
99
+ `--state-root/kv`.
100
+
101
+ Closing a PR cancels its merge-conflict reminder and drops buffered
102
+ wakes.
103
+
104
+ See [GitHub](../guides/github.md) for `cursorAccount` login and
105
+ fixture replay.
106
+
107
+ ## Slack
108
+
109
+ `agent/channels/slack.ts` uses your signed-in Cursor account. Mention
110
+ the agent or DM it with a PR URL. Same `drive_pr` path as the
111
+ playground. See [Slack](../guides/slack.md).
112
+
113
+ ## Evals
114
+
115
+ One smoke case. Chat without a PR must not call `drive_pr`, so a
116
+ routine eval cannot spawn a cloud agent.
117
+
118
+ ```bash
119
+ agent-sdk eval
120
+ ```
121
+
122
+ Do not add cases that pass a PR URL unless you intend to spend cloud
123
+ budget.
124
+
125
+ ## Deploy
126
+
127
+ ```bash
128
+ agent-sdk deploy
129
+ ```
130
+
131
+ Run it from the agent's git checkout. It infers repository, ref, path,
132
+ and slug, builds on Cursor-managed hosting, and prints the URL.
133
+ `agent-sdk deployments` shows status.
134
+
135
+ See [Cloud runtime](../guides/cloud-runtime.md) for what changes on
136
+ the VM.
@@ -0,0 +1,89 @@
1
+ ---
2
+ title: "Review pull requests for exploitable bugs"
3
+ description: "Scaffold the agent, pick repos, replay a PR, and deploy."
4
+ ---
5
+
6
+ # Review pull requests for exploitable bugs
7
+
8
+ This agent reads a pull request diff and posts one review comment. It
9
+ reports exploitable bugs: injection, authz bypass, secret leaks, SSRF,
10
+ RCE. Style nits stay out.
11
+
12
+ The factory [Security Reviewer](../example-agents/security-reviewer.md)
13
+ runs a staged pipeline with parallel workers. This template is one
14
+ model turn.
15
+
16
+ ## Scaffold
17
+
18
+ ```bash
19
+ npx @cursor/july init ./security-reviewer --template security-reviewer
20
+ ```
21
+
22
+ `init` asks which GitHub repos to watch. Every repo must share one
23
+ owner. Pass `--var repos=acme/api,acme/web` to skip the prompt.
24
+
25
+ The list lands in `agent/lib/repos.ts`. The GitHub channel reads it for
26
+ `cursorAccount` and for the wake filter. Edit that file when the set
27
+ changes.
28
+
29
+ ## Connect GitHub through Cursor
30
+
31
+ Connect GitHub in Cursor for those repositories (Settings or
32
+ [cursor.com/dashboard](https://cursor.com/dashboard)). Sign the host in:
33
+
34
+ ```bash
35
+ cd security-reviewer
36
+ agent-sdk login
37
+ ```
38
+
39
+ `cursorAccount` pulls SCM events from Cursor and mints a short-lived,
40
+ repo-scoped credential. `ctx.host.github` and child `gh` commands share
41
+ it. See the [GitHub guide](../guides/github.md).
42
+
43
+ ## First review
44
+
45
+ ```bash
46
+ agent-sdk dev
47
+ ```
48
+
49
+ `dev` starts the Cursor event relay for the watched repos. To drive a
50
+ known PR without waiting on a live push:
51
+
52
+ ```bash
53
+ agent-sdk github replay https://github.com/acme/api/pull/12 --dir .
54
+ ```
55
+
56
+ `replay` needs pull access. Draft PRs and repos outside
57
+ `agent/lib/repos.ts` are ignored. The channel writes `pr/diff.patch`
58
+ after the wake is acknowledged, then starts a model turn. The model
59
+ calls `post_findings` once.
60
+
61
+ Chat replies stay in the playground. `post_findings` writes the GitHub
62
+ comment.
63
+
64
+ ## What to edit
65
+
66
+ - `agent/lib/repos.ts`: watched repos
67
+ - `agent/instructions.md`: what counts as a finding and the comment
68
+ shape
69
+ - `evals/review.eval.ts`: smoke cases
70
+
71
+ ## Evals
72
+
73
+ Two smoke cases: one XSS fixture and one docs-only change.
74
+
75
+ ```bash
76
+ agent-sdk eval
77
+ ```
78
+
79
+ Eval sessions skip the GitHub write.
80
+
81
+ ## Deploy
82
+
83
+ ```bash
84
+ agent-sdk deploy
85
+ ```
86
+
87
+ Run it from the agent's git checkout. The command infers repository,
88
+ ref, path, and slug. The deployment uses the team's Cursor GitHub
89
+ connection for the same watched repos.
@@ -1,147 +1,105 @@
1
1
  ---
2
- title: "Ship a triage agent from the template"
3
- description: "Scaffold the triage template, make its rubric yours, prove it with evals, and deploy it to Cursor-managed hosting."
2
+ title: "Triage Linear or Jira issues in place"
3
+ description: "Scaffold the agent, point it at an existing ticket, tune the rubric, run evals, and deploy."
4
4
  ---
5
5
 
6
- # Ship a triage agent from the template
6
+ # Triage Linear or Jira issues in place
7
7
 
8
- The triage template is a working agent you own from the first command.
9
- It reads a report, classifies it as a bug, a question, or feedback,
10
- judges severity against a rubric, records a structured verdict, and
11
- replies with the next step. This page walks the whole arc: scaffold,
12
- first verdict, customize, prove, wire Slack, deploy.
8
+ This agent comments on tickets you already filed. It classifies the
9
+ issue, writes a `Triage:` comment, sets bug priority, and links a
10
+ duplicate when titles match.
13
11
 
14
- Every file the template ships is yours to edit. The only dependency is
15
- `@cursor/july` itself, pinned to the version the template was tested
16
- against. Nothing phones home to a template registry.
12
+ File the ticket however you already do. This template starts after the
13
+ ticket exists.
17
14
 
18
- ## Scaffold it
15
+ ## Scaffold
19
16
 
20
17
  ```bash
21
- npx @cursor/july init ./triage-agent --template triage
18
+ npx @cursor/july init ./triage-agent --template triage-linear
19
+ npx @cursor/july init ./triage-agent --template triage-jira
22
20
  ```
23
21
 
24
- One command with no prior install. It writes twelve files, runs
25
- `npm install`, puts `agent-sdk` on your PATH, and offers a browser
26
- sign-in when the machine has no Cursor credential. Model turns need
27
- that credential, so sign in now rather than mid-flow:
22
+ Pick the tracker you use. The agent is the same. The overlay is the
23
+ connection.
28
24
 
29
- ```bash
30
- agent-sdk login
31
- ```
25
+ `init` writes the project, installs dependencies, and puts `agent-sdk`
26
+ on PATH.
32
27
 
33
- The scaffold is a plain directory. Commit it to your own repo.
28
+ ## Log in
34
29
 
35
- ## Get the first verdict
30
+ Model turns and Cursor MCP use your Cursor account.
36
31
 
37
32
  ```bash
38
33
  cd triage-agent
39
- agent-sdk dev
34
+ agent-sdk login
40
35
  ```
41
36
 
42
- Open the playground URL it prints and type a real report:
37
+ The command opens a browser if you have no stored credential.
38
+
39
+ ## Connect the tracker
43
40
 
44
- > Export to CSV has returned 500s since this morning. Request id 41ac.
45
- > Retrying does not help.
41
+ In the Cursor dashboard, open MCP and connect Linear or Jira.
46
42
 
47
- Watch the turn. The agent reads the `triage-rubric` skill, calls
48
- `record_triage` with a structured verdict, and replies in six lines or
49
- fewer. The tool call renders inline, so you see the exact kind,
50
- severity, and next step it recorded.
43
+ The connection stays on the host. The model calls `record_triage`.
44
+ Linear and Jira tools stay off the model's tool list.
51
45
 
52
- Integrations use the same door your playground does. The `intake`
53
- channel accepts reports over HTTP:
46
+ ## First verdict
54
47
 
55
48
  ```bash
56
- curl -X POST http://127.0.0.1:3000/triage-agent/v1/channels/intake/report \
57
- -H 'content-type: application/json' \
58
- -d '{"message":"How do I rotate staging API keys?","reporter":"dana"}'
49
+ agent-sdk dev
59
50
  ```
60
51
 
61
- The composer also autocompletes `/report`, which drives this route.
62
-
63
- ## Make the rubric yours
64
-
65
- `agent/skills/triage-rubric.md` holds the judgment: what counts as a
66
- bug, the tie-breakers, and the severity ladder. Edit it first. Your
67
- team's definition of `urgent` belongs there, in plain markdown, and the
68
- next turn uses it without a restart step.
52
+ Open the playground. Run `/queue/issue` and paste an existing issue.
69
53
 
70
- `agent/instructions.md` owns the flow around the rubric: when to ask a
71
- clarifying question, the one-call `record_triage` rule, and the reply
72
- shape.
73
-
74
- ## Prove it with evals
75
-
76
- The template ships three smoke cases, one per kind. Run them after
77
- every rubric edit:
54
+ Local multi-agent mode mounts this project as `triage-agent`. You can
55
+ also POST:
78
56
 
79
57
  ```bash
80
- agent-sdk eval
58
+ curl -X POST http://127.0.0.1:3000/triage-agent/v1/channels/queue/issue \
59
+ -H 'content-type: application/json' \
60
+ -d '{
61
+ "identifier": "ENG-142",
62
+ "title": "CSV export returns 500",
63
+ "description": "Export has returned 500 since this morning."
64
+ }'
81
65
  ```
82
66
 
83
- Each case sends a realistic report and asserts a verdict was recorded
84
- with the expected kind. When you tighten the rubric, add a case for the
85
- report style you tightened it for. The eval suite is the regression
86
- net for prompt changes, so grow it with the rubric.
87
-
88
- ## File verdicts into your tracker
89
-
90
- `agent/tools/record_triage.ts` defines the verdict shape with a zod
91
- schema and returns it. Point its `execute` at Linear, GitHub Issues, or
92
- a webhook to file real tickets. Test the tool without a model turn:
67
+ `POST /v1/channels/queue/issue` accepts
68
+ `{ identifier, title?, description? }` from the playground.
93
69
 
94
- ```bash
95
- agent-sdk call record_triage --dir . --input '{
96
- "kind": "bug",
97
- "severity": "high",
98
- "title": "CSV export 500s",
99
- "summary": "Export returns 500 since this morning.",
100
- "nextStep": "Check export service logs."
101
- }'
102
- ```
70
+ Hosted Cursor aliases require `X-Agent-Alias-Token`, which Linear and
71
+ Jira cannot send. For create webhooks, self-host, set
72
+ `LINEAR_WEBHOOK_SECRET` or `JIRA_WEBHOOK_SECRET`, and POST the signed
73
+ body to `/v1/channels/webhook`. The channel ACKs immediately and
74
+ coalesces retries onto the same issue.
103
75
 
104
- The call validates against the schema and runs your `execute` body
105
- in-process, so tracker wiring gets a fast loop.
76
+ `record_triage` comments on the issue in the continuation key, not
77
+ whatever identifier the model copies out of the ticket body.
106
78
 
107
- ## Wire it to Slack
79
+ ## Rubric
108
80
 
109
- The `slack` channel idles until its tokens exist, so local work never
110
- blocks on Slack. When you want it live:
81
+ Edit `agent/skills/triage-rubric.md` for kinds, tie-breakers, and what
82
+ `urgent` means on your team. The next turn reads the file.
111
83
 
112
- ```bash
113
- agent-sdk slack setup
114
- ```
84
+ `agent/instructions.md` is the procedure around the rubric: missing
85
+ details, when to call `record_triage`, how to reply.
115
86
 
116
- The guided flow creates the Slack app and writes the token pair to
117
- `.env.local`. Restart `agent-sdk dev`, invite the bot to a channel, and
118
- @mention it with a report. The [Slack guide](../guides/slack.md) covers
119
- channel watching and approvals when you outgrow mentions.
87
+ ## Evals
120
88
 
121
- ## Deploy it
89
+ Three smoke cases, one per kind. Run them after you change the rubric.
122
90
 
123
91
  ```bash
124
- agent-sdk deploy
92
+ agent-sdk eval
125
93
  ```
126
94
 
127
- From your git checkout, `deploy` infers the repo, ref, and slug, builds
128
- the ref on Cursor-managed hosting, and prints the hosted URL plus a
129
- one-time alias token. Store the token. Production Slack tokens go in as
130
- deployment secrets:
95
+ Eval sessions skip tracker writes.
96
+
97
+ ## Deploy
131
98
 
132
99
  ```bash
133
- agent-sdk secrets set SLACK_BOT_TOKEN SLACK_APP_TOKEN --slug triage-agent
134
100
  agent-sdk deploy
135
101
  ```
136
102
 
137
- Check on it with `agent-sdk deployments`. The
138
- [deployment guide](../deployment.md) covers self-hosting, storage, and
139
- auth when you need them.
140
-
141
- ## Where to go next
142
-
143
- - Add a GitHub intake with the [GitHub guide](../guides/github.md), so
144
- issue comments triage themselves.
145
- - Persist verdicts across restarts with [storage](../storage.md).
146
- - Measure rubric changes on live traffic with
147
- [A/B metrics](../ab.md).
103
+ Run it from the agent's git checkout. It infers repository, ref, path,
104
+ and slug, builds on Cursor-managed hosting, and prints the URL.
105
+ `agent-sdk deployments` shows status.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cursor/july",
3
- "version": "0.1.54",
3
+ "version": "0.1.61",
4
4
  "description": "(early alpha) Filesystem-first framework for defining Cursor agents as markdown and TypeScript and serving them over channels with the Cursor SDK.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {
@@ -70,6 +70,12 @@
70
70
  "import": "./dist/channels/github/index.js",
71
71
  "default": "./dist/channels/github/index.js"
72
72
  },
73
+ "./channels/origin": {
74
+ "anysphere-source": "./src/channels/origin/index.ts",
75
+ "types": "./dist/channels/origin/index.d.ts",
76
+ "import": "./dist/channels/origin/index.js",
77
+ "default": "./dist/channels/origin/index.js"
78
+ },
73
79
  "./skills": {
74
80
  "anysphere-source": "./src/skills.ts",
75
81
  "types": "./dist/skills.d.ts",
@@ -261,6 +267,7 @@
261
267
  "@types/react-dom": "^19.0.0",
262
268
  "@typescript/native-preview": "7.0.0-dev.20260701.1",
263
269
  "@vitejs/plugin-react": "^5.1.2",
270
+ "minimatch": "^10.2.5",
264
271
  "pg": "^8.18.0",
265
272
  "pretty-ms": "^9.2.0",
266
273
  "react": "^19.2.1",
@@ -272,6 +279,7 @@
272
279
  "vite": "^7.3.0",
273
280
  "vitepress": "1.6.4",
274
281
  "vitest": "^4.0.18",
282
+ "yaml": "^2.4.2",
275
283
  "zustand": "^5.0.9"
276
284
  }
277
285
  }
@@ -142,12 +142,11 @@ first real delivery.
142
142
 
143
143
  - **Debounce per PR** (~3s, latest event wins) and re-buffer while CI
144
144
  settles; skip a flush when a turn for that PR is already in flight.
145
- - **Persist the buffer before ACKing** the webhook
146
- (e.g. `.agent-serve/<slug>/webhook-buffer.json`) and restore it on channel
147
- start — a restart must not drop buffered wakes.
145
+ - **Persist the buffer before ACKing** the webhook in `host.kv`, then
146
+ restore it on channel start. A restart must not drop buffered wakes.
148
147
  - **Stable continuation key** `pr:owner/repo#N` so every wake resumes the
149
- PR's session; cross-channel resume needs an affinity store mapping PR →
150
- SDK agent id (write it from an `agent.bound` hook).
148
+ PR's session. Cross-channel resume needs an affinity store mapping PR →
149
+ SDK agent id (write it from an `agent.bound` hook with `ctx.host.kv`).
151
150
  - **Discard payload details in wake prompts** — send a generic "re-check
152
151
  the PR" refresh; the agent re-reads ground truth instead of trusting a
153
152
  stale payload.