@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.
- package/dist/bin/agent-serve.js +30 -23
- package/dist/channels/github/github-channel.d.ts +12 -0
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +67 -15
- package/dist/channels/github/types.d.ts +27 -1
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/origin/cursor-account.d.ts +22 -0
- package/dist/channels/origin/cursor-account.d.ts.map +1 -0
- package/dist/channels/origin/cursor-account.js +35 -0
- package/dist/channels/origin/events.d.ts +10 -0
- package/dist/channels/origin/events.d.ts.map +1 -0
- package/dist/channels/origin/events.js +27 -0
- package/dist/channels/origin/index.d.ts +29 -0
- package/dist/channels/origin/index.d.ts.map +1 -0
- package/dist/channels/origin/index.js +28 -0
- package/dist/channels/origin/origin-channel.d.ts +68 -0
- package/dist/channels/origin/origin-channel.d.ts.map +1 -0
- package/dist/channels/origin/origin-channel.js +567 -0
- package/dist/channels/origin/origin-webhook.d.ts +38 -0
- package/dist/channels/origin/origin-webhook.d.ts.map +1 -0
- package/dist/channels/origin/origin-webhook.js +151 -0
- package/dist/channels/origin/types.d.ts +152 -0
- package/dist/channels/origin/types.d.ts.map +1 -0
- package/dist/channels/origin/types.js +1 -0
- package/dist/channels/slack/doctor.d.ts +17 -1
- package/dist/channels/slack/doctor.d.ts.map +1 -1
- package/dist/channels/slack/doctor.js +186 -10
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.DAKcDclS.js → app.CW3KJh72.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.BuymfBAo.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.BNIaCSfG.js → VPLocalSearchBox.Bk6EWpPj.js} +1 -1
- package/dist/docs/assets/chunks/{theme.B47GzJjc.js → theme.Bz9AodBA.js} +2 -2
- package/dist/docs/assets/{example-agents_fsd.md.DPz9ezO4.js → example-agents_fsd.md.ZeGEpAw_.js} +2 -2
- package/dist/docs/assets/{example-agents_fsd.md.DPz9ezO4.lean.js → example-agents_fsd.md.ZeGEpAw_.lean.js} +1 -1
- package/dist/docs/assets/{example-agents_security-reviewer.md.Dkf1gyo6.js → example-agents_security-reviewer.md.DBL1TwtP.js} +2 -2
- package/dist/docs/assets/{example-agents_security-reviewer.md.Dkf1gyo6.lean.js → example-agents_security-reviewer.md.DBL1TwtP.lean.js} +1 -1
- package/dist/docs/assets/guides_convert-automation.md.BhMzTkE5.js +12 -0
- package/dist/docs/assets/guides_convert-automation.md.BhMzTkE5.lean.js +1 -0
- package/dist/docs/assets/{guides_github.md.B8QKtIpw.js → guides_github.md.CLLQJKRB.js} +4 -4
- package/dist/docs/assets/{guides_github.md.B8QKtIpw.lean.js → guides_github.md.CLLQJKRB.lean.js} +1 -1
- package/dist/docs/assets/index.md.DhRHS_-L.js +5 -0
- package/dist/docs/assets/{index.md.COeoSkcF.lean.js → index.md.DhRHS_-L.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.-V6J7Cl8.js → reference_cli.md.Cl14Jfo3.js} +10 -2
- package/dist/docs/assets/{reference_cli.md.-V6J7Cl8.lean.js → reference_cli.md.Cl14Jfo3.lean.js} +1 -1
- package/dist/docs/assets/scaffolding-agents.md.CrWSA0Ko.js +1 -0
- package/dist/docs/assets/{scaffolding-agents.md.mkc3B_ZW.lean.js → scaffolding-agents.md.CrWSA0Ko.lean.js} +1 -1
- package/dist/docs/assets/templates_agentic-owners.md.BkTLORaU.js +14 -0
- package/dist/docs/assets/templates_agentic-owners.md.BkTLORaU.lean.js +1 -0
- package/dist/docs/assets/templates_demo.md.Bgd6MBaZ.js +4 -0
- package/dist/docs/assets/templates_demo.md.Bgd6MBaZ.lean.js +1 -0
- package/dist/docs/assets/templates_pr-autofixer.md.DcmoeUNZ.js +8 -0
- package/dist/docs/assets/templates_pr-autofixer.md.DcmoeUNZ.lean.js +1 -0
- package/dist/docs/assets/templates_security-reviewer.md.C0yIUaYs.js +2 -0
- package/dist/docs/assets/templates_security-reviewer.md.C0yIUaYs.lean.js +1 -0
- package/dist/docs/assets/templates_triage.md.DWuQ1bZz.js +9 -0
- package/dist/docs/assets/templates_triage.md.DWuQ1bZz.lean.js +1 -0
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/deployment.html +4 -4
- package/dist/docs/evals.html +4 -4
- package/dist/docs/example-agents/approval-buddy.html +4 -4
- package/dist/docs/example-agents/benny.html +4 -4
- package/dist/docs/example-agents/bugbot.html +4 -4
- package/dist/docs/example-agents/codebase-wiki.html +4 -4
- package/dist/docs/example-agents/codeowners-review.html +4 -4
- package/dist/docs/example-agents/concierge.html +4 -4
- package/dist/docs/example-agents/fsd.html +5 -5
- package/dist/docs/example-agents/index.html +4 -4
- package/dist/docs/example-agents/knowledge-base.html +4 -4
- package/dist/docs/example-agents/oncall.html +4 -4
- package/dist/docs/example-agents/security-reviewer.html +5 -5
- package/dist/docs/example-agents/slack-agent.html +4 -4
- package/dist/docs/example-agents/weather-agent.html +4 -4
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/cloud-runtime.html +4 -4
- package/dist/docs/guides/convert-automation.html +36 -0
- package/dist/docs/guides/github.html +7 -7
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/mcp-oauth.html +4 -4
- package/dist/docs/guides/opentelemetry.html +4 -4
- package/dist/docs/guides/slack.html +4 -4
- package/dist/docs/guides/webhooks.html +4 -4
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +4 -4
- package/dist/docs/index.html +6 -6
- package/dist/docs/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +4 -4
- package/dist/docs/reference/artifacts.html +4 -4
- package/dist/docs/reference/channels.html +4 -4
- package/dist/docs/reference/cli.html +14 -6
- package/dist/docs/reference/connections.html +4 -4
- package/dist/docs/reference/hooks.html +4 -4
- package/dist/docs/reference/http-api.html +4 -4
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +4 -4
- package/dist/docs/reference/project-layout.html +4 -4
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +4 -4
- package/dist/docs/reference/skills.html +4 -4
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +4 -4
- package/dist/docs/scaffolding-agents.html +5 -5
- package/dist/docs/storage.html +4 -4
- package/dist/docs/templates/agentic-owners.html +38 -0
- package/dist/docs/templates/demo.html +28 -0
- package/dist/docs/templates/pr-autofixer.html +32 -0
- package/dist/docs/templates/security-reviewer.html +26 -0
- package/dist/docs/templates/triage.html +14 -16
- package/dist/docs/troubleshooting.html +4 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/internal/cli-ax.d.ts +2 -0
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +30 -1
- package/dist/internal/cli-deploy.js +1 -1
- package/dist/internal/cli-slack.d.ts +4 -0
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +46 -20
- package/dist/internal/cursor-event-relay.d.ts +59 -11
- package/dist/internal/cursor-event-relay.d.ts.map +1 -1
- package/dist/internal/cursor-event-relay.js +133 -26
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +11 -2
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +1 -0
- package/dist/internal/handleAgentServeTrigger.d.ts +33 -6
- package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -1
- package/dist/internal/handleAgentServeTrigger.js +97 -19
- package/dist/internal/init-interview.d.ts +67 -0
- package/dist/internal/init-interview.d.ts.map +1 -0
- package/dist/internal/init-interview.js +300 -0
- package/dist/internal/init-project.d.ts +7 -0
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +99 -43
- package/dist/internal/mcp-endpoint.d.ts +7 -0
- package/dist/internal/mcp-endpoint.d.ts.map +1 -1
- package/dist/internal/mcp-endpoint.js +7 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +159 -57
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +20 -21
- package/dist/internal/session-links.d.ts +14 -0
- package/dist/internal/session-links.d.ts.map +1 -0
- package/dist/internal/session-links.js +69 -0
- package/dist/internal/sessions-client.d.ts.map +1 -1
- package/dist/internal/sessions-client.js +1 -0
- package/dist/internal/slack-provision-client.js +1 -1
- package/dist/playground/assets/index-ClbuaLpm.css +1 -0
- package/dist/playground/assets/index-SqkR13k_.js +85 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +19 -12
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +15 -0
- package/docs/example-agents/fsd.md +3 -0
- package/docs/example-agents/security-reviewer.md +3 -0
- package/docs/guides/convert-automation.md +176 -0
- package/docs/guides/github.md +6 -2
- package/docs/reference/cli.md +36 -10
- package/docs/scaffolding-agents.md +3 -0
- package/docs/templates/agentic-owners.md +97 -0
- package/docs/templates/demo.md +84 -0
- package/docs/templates/pr-autofixer.md +136 -0
- package/docs/templates/security-reviewer.md +89 -0
- package/docs/templates/triage.md +59 -101
- package/package.json +9 -1
- package/skills/github/SKILL.md +4 -5
- package/src/bin/agent-serve.ts +13 -6
- package/src/channels/github/github-channel.ts +95 -18
- package/src/channels/github/types.ts +31 -0
- package/src/channels/origin/cursor-account.ts +64 -0
- package/src/channels/origin/events.ts +41 -0
- package/src/channels/origin/index.ts +29 -0
- package/src/channels/origin/origin-channel.ts +784 -0
- package/src/channels/origin/origin-webhook.ts +202 -0
- package/src/channels/origin/types.ts +186 -0
- package/src/channels/slack/doctor.ts +218 -5
- package/src/index.ts +3 -1
- package/src/internal/cli-ax.ts +33 -1
- package/src/internal/cli-deploy.ts +2 -2
- package/src/internal/cli-slack.ts +68 -19
- package/src/internal/cursor-event-relay.ts +193 -31
- package/src/internal/discovery.ts +15 -5
- package/src/internal/distribution.ts +1 -0
- package/src/internal/handleAgentServeTrigger.ts +129 -19
- package/src/internal/init-interview.ts +384 -0
- package/src/internal/init-project.ts +146 -46
- package/src/internal/mcp-endpoint.ts +7 -0
- package/src/internal/server.ts +188 -58
- package/src/internal/session-engine.ts +5 -21
- package/src/internal/session-links.ts +88 -0
- package/src/internal/sessions-client.ts +1 -0
- package/src/internal/slack-provision-client.ts +1 -1
- package/src/types.ts +19 -12
- package/templates/agentic-owners/README.md +73 -0
- package/templates/agentic-owners/agent/agent.ts +15 -0
- package/templates/agentic-owners/agent/channels/github.ts +85 -0
- package/templates/agentic-owners/agent/instructions.md +34 -0
- package/templates/agentic-owners/agent/lib/config.ts +13 -0
- package/templates/agentic-owners/agent/lib/github.ts +241 -0
- package/templates/agentic-owners/agent/lib/owners/README.md +50 -0
- package/templates/agentic-owners/agent/lib/owners/constants.ts +22 -0
- package/templates/agentic-owners/agent/lib/owners/decision.ts +485 -0
- package/templates/agentic-owners/agent/lib/owners/handles.ts +54 -0
- package/templates/agentic-owners/agent/lib/owners/match.ts +177 -0
- package/templates/agentic-owners/agent/lib/owners/matching.ts +95 -0
- package/templates/agentic-owners/agent/lib/owners/parse.ts +589 -0
- package/templates/agentic-owners/agent/lib/owners/policyMode.ts +65 -0
- package/templates/agentic-owners/agent/lib/owners/prompt.ts +66 -0
- package/templates/agentic-owners/agent/lib/owners/prompts/base-review.md +105 -0
- package/templates/agentic-owners/agent/lib/owners/types.ts +45 -0
- package/templates/agentic-owners/agent/lib/review.ts +777 -0
- package/templates/agentic-owners/agent/tools/record_review.ts +69 -0
- package/templates/agentic-owners/evals/evals.config.ts +5 -0
- package/templates/agentic-owners/evals/owners.eval.ts +116 -0
- package/templates/agentic-owners/package.json +20 -0
- package/templates/agentic-owners/tsconfig.json +12 -0
- package/templates/demo/README.md +33 -0
- package/templates/demo/agent/agent.ts +15 -0
- package/templates/demo/agent/channels/github.ts +50 -0
- package/templates/demo/agent/channels/queue.ts +30 -0
- package/templates/demo/agent/instructions.md +8 -0
- package/templates/demo/agent/lib/collect.ts +78 -0
- package/templates/demo/agent/tools/record_demo.ts +40 -0
- package/templates/demo/evals/demo.eval.ts +33 -0
- package/templates/demo/evals/evals.config.ts +5 -0
- package/templates/demo/package.json +18 -0
- package/templates/demo/tsconfig.json +12 -0
- package/templates/pr-autofixer/README.md +44 -0
- package/templates/pr-autofixer/agent/agent.ts +22 -0
- package/templates/pr-autofixer/agent/channels/drive.ts +40 -0
- package/templates/pr-autofixer/agent/channels/github.ts +167 -0
- package/templates/pr-autofixer/agent/channels/slack.ts +17 -0
- package/templates/pr-autofixer/agent/hooks/bind-agent.ts +19 -0
- package/templates/pr-autofixer/agent/instructions.md +83 -0
- package/templates/pr-autofixer/agent/lib/affinity.ts +33 -0
- package/templates/pr-autofixer/agent/lib/drive-schemas.ts +15 -0
- package/templates/pr-autofixer/agent/lib/drive.ts +79 -0
- package/templates/pr-autofixer/agent/lib/merge-watch.ts +123 -0
- package/templates/pr-autofixer/agent/lib/pr-state.ts +54 -0
- package/templates/pr-autofixer/agent/lib/repos.ts +19 -0
- package/templates/pr-autofixer/agent/lib/start-drive.ts +122 -0
- package/templates/pr-autofixer/agent/lib/webhook-buffer.ts +225 -0
- package/templates/pr-autofixer/agent/lib/webhook-routing.ts +231 -0
- package/templates/pr-autofixer/agent/storage.ts +7 -0
- package/templates/pr-autofixer/agent/tools/drive_pr.ts +22 -0
- package/templates/pr-autofixer/evals/coordinator.eval.ts +16 -0
- package/templates/pr-autofixer/evals/evals.config.ts +5 -0
- package/templates/pr-autofixer/init.json +25 -0
- package/templates/pr-autofixer/package.json +18 -0
- package/templates/pr-autofixer/tsconfig.json +12 -0
- package/templates/security-reviewer/README.md +31 -0
- package/templates/security-reviewer/agent/agent.ts +15 -0
- package/templates/security-reviewer/agent/channels/github.ts +46 -0
- package/templates/security-reviewer/agent/instructions.md +22 -0
- package/templates/security-reviewer/agent/lib/repos.ts +5 -0
- package/templates/security-reviewer/agent/tools/post_findings.ts +72 -0
- package/templates/security-reviewer/evals/evals.config.ts +5 -0
- package/templates/security-reviewer/evals/review.eval.ts +53 -0
- package/templates/security-reviewer/init.json +25 -0
- package/templates/security-reviewer/package.json +18 -0
- package/templates/security-reviewer/tsconfig.json +12 -0
- package/templates/triage/README.md +27 -29
- package/templates/triage/agent/agent.ts +1 -0
- package/templates/triage/agent/channels/queue.ts +47 -0
- package/templates/triage/agent/channels/webhook.ts +50 -0
- package/templates/triage/agent/instructions.md +24 -13
- package/templates/triage/agent/lib/actuate.ts +759 -0
- package/templates/triage/agent/lib/parse-queue-event.ts +168 -0
- package/templates/triage/agent/lib/tracker.ts +5 -0
- package/templates/triage/agent/lib/types.ts +52 -0
- package/templates/triage/agent/lib/verify-webhook.ts +81 -0
- package/templates/triage/agent/skills/triage-rubric.md +6 -5
- package/templates/triage/agent/tools/record_triage.ts +24 -5
- package/templates/triage/evals/triage.eval.ts +25 -3
- package/templates/triage/overlays/jira/README.md +21 -0
- package/templates/triage/overlays/jira/agent/lib/tracker.ts +8 -0
- package/templates/triage/overlays/jira/agent/mcp-connections/tracker.ts +7 -0
- package/templates/triage/overlays/linear/README.md +21 -0
- package/templates/triage/overlays/linear/agent/lib/tracker.ts +8 -0
- package/templates/triage/overlays/linear/agent/mcp-connections/tracker.ts +7 -0
- package/templates/triage/package.json +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.C4uxzYEU.js +0 -1
- package/dist/docs/assets/index.md.COeoSkcF.js +0 -5
- package/dist/docs/assets/scaffolding-agents.md.mkc3B_ZW.js +0 -1
- package/dist/docs/assets/templates_triage.md.CConZt1z.js +0 -11
- package/dist/docs/assets/templates_triage.md.CConZt1z.lean.js +0 -1
- package/dist/playground/assets/index-BHAPd9KT.js +0 -85
- package/dist/playground/assets/index-DpKH0HcT.css +0 -1
- package/templates/triage/agent/channels/intake.ts +0 -20
- 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.
|
package/docs/templates/triage.md
CHANGED
|
@@ -1,147 +1,105 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
3
|
-
description: "Scaffold the
|
|
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
|
-
#
|
|
6
|
+
# Triage Linear or Jira issues in place
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
15
|
-
|
|
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
|
|
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
|
-
|
|
25
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
```
|
|
25
|
+
`init` writes the project, installs dependencies, and puts `agent-sdk`
|
|
26
|
+
on PATH.
|
|
32
27
|
|
|
33
|
-
|
|
28
|
+
## Log in
|
|
34
29
|
|
|
35
|
-
|
|
30
|
+
Model turns and Cursor MCP use your Cursor account.
|
|
36
31
|
|
|
37
32
|
```bash
|
|
38
33
|
cd triage-agent
|
|
39
|
-
agent-sdk
|
|
34
|
+
agent-sdk login
|
|
40
35
|
```
|
|
41
36
|
|
|
42
|
-
|
|
37
|
+
The command opens a browser if you have no stored credential.
|
|
38
|
+
|
|
39
|
+
## Connect the tracker
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
> Retrying does not help.
|
|
41
|
+
In the Cursor dashboard, open MCP and connect Linear or Jira.
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
53
|
-
channel accepts reports over HTTP:
|
|
46
|
+
## First verdict
|
|
54
47
|
|
|
55
48
|
```bash
|
|
56
|
-
|
|
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
|
-
|
|
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
|
-
|
|
71
|
-
|
|
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
|
-
|
|
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
|
-
|
|
84
|
-
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
-
|
|
105
|
-
|
|
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
|
-
##
|
|
79
|
+
## Rubric
|
|
108
80
|
|
|
109
|
-
|
|
110
|
-
|
|
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
|
-
|
|
113
|
-
|
|
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
|
-
|
|
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
|
-
|
|
89
|
+
Three smoke cases, one per kind. Run them after you change the rubric.
|
|
122
90
|
|
|
123
91
|
```bash
|
|
124
|
-
agent-sdk
|
|
92
|
+
agent-sdk eval
|
|
125
93
|
```
|
|
126
94
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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.
|
|
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
|
}
|
package/skills/github/SKILL.md
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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.
|