@cursor/july 0.1.94 → 0.1.96
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/AGENTS.md +3 -4
- package/dist/channels/deployments/types.d.ts +1 -1
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/deployments/types.js +1 -0
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +14 -2
- package/dist/channels/github/types.d.ts +18 -3
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/origin/api.d.ts +59 -13
- package/dist/channels/origin/api.d.ts.map +1 -1
- package/dist/channels/origin/api.js +168 -27
- package/dist/channels/origin/binding.d.ts +2 -2
- package/dist/channels/origin/checks.d.ts +6 -6
- package/dist/channels/origin/checks.js +6 -6
- package/dist/channels/origin/cursor-account.d.ts +5 -3
- package/dist/channels/origin/cursor-account.d.ts.map +1 -1
- package/dist/channels/origin/cursor-account.js +5 -3
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +11 -3
- package/dist/channels/origin/origin-webhook.d.ts +11 -1
- package/dist/channels/origin/origin-webhook.d.ts.map +1 -1
- package/dist/channels/origin/origin-webhook.js +23 -3
- package/dist/channels/origin/types.d.ts +8 -0
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/api.d.ts +9 -0
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +36 -5
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +17 -46
- package/dist/channels/slack/dispatch.d.ts +7 -1
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +47 -23
- package/dist/channels/slack/inbound.d.ts +8 -0
- package/dist/channels/slack/inbound.d.ts.map +1 -1
- package/dist/channels/slack/inbound.js +32 -0
- package/dist/channels/slack/live-delivery.d.ts +26 -29
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +172 -73
- package/dist/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +5 -1
- package/dist/channels/slack/nudge-carrier.d.ts +2 -0
- package/dist/channels/slack/nudge-carrier.d.ts.map +1 -1
- package/dist/channels/slack/nudge-carrier.js +48 -1
- package/dist/channels/slack/pr-ref.d.ts +7 -1
- package/dist/channels/slack/pr-ref.d.ts.map +1 -1
- package/dist/channels/slack/pr-ref.js +42 -23
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +2 -2
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.CFDEas4I.js → app.jXleCmOc.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DFoGuETX.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.B1IIYpYS.js → VPLocalSearchBox.8LhyglIT.js} +1 -1
- package/dist/docs/assets/chunks/{theme.Ct4NSiLm.js → theme.9ged-pr2.js} +2 -2
- package/dist/docs/assets/index.md.CI93Ltlb.js +5 -0
- package/dist/docs/assets/{index.md.DRakGHFe.lean.js → index.md.CI93Ltlb.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.Cw6_ICYG.js → reference_cli.md.CCnG-nJx.js} +4 -2
- package/dist/docs/assets/{reference_cli.md.Cw6_ICYG.lean.js → reference_cli.md.CCnG-nJx.lean.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.8son6Hjm.js → reference_skills.md.BFW9retM.js} +3 -3
- package/dist/docs/assets/{templates_agentic-owners.md.DqtPdm6f.js → templates_agentic-owners.md.BZSH4N9z.js} +1 -1
- package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +2 -0
- package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +1 -0
- package/dist/docs/assets/{templates_demo.md.DhFcWN6j.js → templates_demo.md.BeQX9V3H.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.DU7dQpor.js → templates_pr-autofixer.md.x5zl6-GT.js} +2 -2
- package/dist/docs/assets/{templates_pr-autofixer.md.DU7dQpor.lean.js → templates_pr-autofixer.md.x5zl6-GT.lean.js} +1 -1
- package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.js +4 -0
- package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.lean.js +1 -0
- package/dist/docs/assets/{templates_security-reviewer.md.CTa7u_l1.js → templates_security-reviewer.md.lshxbCLK.js} +2 -2
- package/dist/docs/assets/{templates_security-reviewer.md.CTa7u_l1.lean.js → templates_security-reviewer.md.lshxbCLK.lean.js} +1 -1
- package/dist/docs/assets/{templates_triage.md.CVlpctKS.js → templates_triage.md.Co4UNzkZ.js} +3 -3
- package/dist/docs/assets/{templates_triage.md.CVlpctKS.lean.js → templates_triage.md.Co4UNzkZ.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +4 -4
- package/dist/docs/deployment.html +4 -4
- package/dist/docs/evals.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 +4 -4
- package/dist/docs/guides/github.html +4 -4
- 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/index.md +5 -1
- package/dist/docs/llms-full.txt +189 -26
- package/dist/docs/llms.txt +2 -0
- 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 +8 -6
- package/dist/docs/reference/cli.md +4 -1
- 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 +7 -7
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +4 -4
- package/dist/docs/scaffolding-agents.html +4 -4
- package/dist/docs/storage.html +4 -4
- package/dist/docs/templates/agentic-owners.html +7 -7
- package/dist/docs/templates/agentic-owners.md +1 -1
- package/dist/docs/templates/code-wiki.html +28 -0
- package/dist/docs/templates/code-wiki.md +91 -0
- package/dist/docs/templates/demo.html +6 -6
- package/dist/docs/templates/demo.md +3 -2
- package/dist/docs/templates/pr-autofixer.html +6 -6
- package/dist/docs/templates/pr-autofixer.md +7 -13
- package/dist/docs/templates/security-help.html +30 -0
- package/dist/docs/templates/security-help.md +65 -0
- package/dist/docs/templates/security-reviewer.html +6 -6
- package/dist/docs/templates/security-reviewer.md +1 -2
- package/dist/docs/templates/triage.html +7 -7
- package/dist/docs/templates/triage.md +2 -6
- package/dist/docs/troubleshooting.html +4 -4
- package/dist/files-backends/cursor-hosted.d.ts +26 -0
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +32 -4
- package/dist/files.d.ts +2 -0
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +5 -0
- package/dist/internal/advertise-tools.d.ts +2 -0
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +15 -1
- package/dist/internal/bounded.d.ts +7 -0
- package/dist/internal/bounded.d.ts.map +1 -0
- package/dist/internal/bounded.js +32 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +142 -7
- package/dist/internal/conversation-mirror.d.ts +85 -0
- package/dist/internal/conversation-mirror.d.ts.map +1 -0
- package/dist/internal/conversation-mirror.js +312 -0
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +22 -48
- package/dist/internal/cursor/session-token.d.ts +45 -0
- package/dist/internal/cursor/session-token.d.ts.map +1 -0
- package/dist/internal/cursor/session-token.js +99 -0
- package/dist/internal/cursor-agent-template.d.ts +1 -1
- package/dist/internal/cursor-agent-template.d.ts.map +1 -1
- package/dist/internal/cursor-agent-template.js +1 -0
- package/dist/internal/deferred-channel-session.d.ts +20 -0
- package/dist/internal/deferred-channel-session.d.ts.map +1 -0
- package/dist/internal/deferred-channel-session.js +62 -0
- package/dist/internal/deploy-client.d.ts +13 -1
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +11 -1
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +11 -5
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +22 -2
- package/dist/internal/framework-file-storage.d.ts +61 -0
- package/dist/internal/framework-file-storage.d.ts.map +1 -0
- package/dist/internal/framework-file-storage.js +204 -0
- package/dist/internal/framework-storage-selection.d.ts +38 -16
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +78 -17
- package/dist/internal/hosted-admission-context.d.ts +20 -0
- package/dist/internal/hosted-admission-context.d.ts.map +1 -0
- package/dist/internal/hosted-admission-context.js +31 -0
- package/dist/internal/hosted-delivery-protocol.d.ts +5 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +33 -1
- package/dist/internal/hosted-delivery.d.ts +11 -2
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +79 -35
- package/dist/internal/hosted-managed-automation.d.ts +30 -0
- package/dist/internal/hosted-managed-automation.d.ts.map +1 -0
- package/dist/internal/hosted-managed-automation.js +58 -0
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +2 -0
- package/dist/internal/install-cursor-skills.d.ts.map +1 -1
- package/dist/internal/install-cursor-skills.js +1 -3
- package/dist/internal/managed-delivery.d.ts +80 -0
- package/dist/internal/managed-delivery.d.ts.map +1 -0
- package/dist/internal/managed-delivery.js +86 -0
- package/dist/internal/review-comments.d.ts.map +1 -1
- package/dist/internal/review-comments.js +10 -98
- package/dist/internal/runtime-dispatch-runner.d.ts +5 -1
- package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
- package/dist/internal/runtime-dispatch-runner.js +7 -0
- package/dist/internal/scm/pr-url.d.ts +14 -0
- package/dist/internal/scm/pr-url.d.ts.map +1 -0
- package/dist/internal/scm/pr-url.js +65 -0
- package/dist/internal/sdk-runner.d.ts +25 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +70 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +11 -2
- package/dist/internal/session-engine.d.ts +13 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +71 -3
- package/dist/internal/steering.d.ts +15 -0
- package/dist/internal/steering.d.ts.map +1 -0
- package/dist/internal/steering.js +18 -0
- package/dist/playground/assets/index-B1DDvBeC.css +1 -0
- package/dist/playground/assets/{index-B3JCyigB.js → index-Cx9CclK_.js} +47 -47
- package/dist/playground/index.html +2 -2
- package/dist/storage-backends/cursor-hosted.d.ts +8 -0
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +4 -3
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +5 -1
- package/docs/reference/cli.md +4 -1
- package/docs/templates/agentic-owners.md +1 -1
- package/docs/templates/code-wiki.md +96 -0
- package/docs/templates/demo.md +3 -2
- package/docs/templates/pr-autofixer.md +7 -13
- package/docs/templates/security-help.md +70 -0
- package/docs/templates/security-reviewer.md +1 -2
- package/docs/templates/triage.md +2 -6
- package/package.json +2 -2
- package/skills/ab/SKILL.md +13 -97
- package/skills/create-agent/SKILL.md +123 -223
- package/skills/debug/SKILL.md +34 -68
- package/skills/evals/SKILL.md +55 -180
- package/skills/framework-map/SKILL.md +83 -145
- package/skills/github/SKILL.md +53 -111
- package/skills/hillclimb/SKILL.md +40 -163
- package/skills/mcp-auth/SKILL.md +48 -107
- package/skills/otel/SKILL.md +22 -68
- package/skills/setup-slack/SKILL.md +77 -208
- package/src/channels/deployments/types.ts +1 -0
- package/src/channels/github/github-channel.ts +23 -8
- package/src/channels/github/types.ts +19 -2
- package/src/channels/origin/api.ts +242 -30
- package/src/channels/origin/binding.ts +2 -2
- package/src/channels/origin/checks.ts +6 -6
- package/src/channels/origin/cursor-account.ts +5 -3
- package/src/channels/origin/origin-channel.ts +13 -1
- package/src/channels/origin/origin-webhook.ts +27 -3
- package/src/channels/origin/types.ts +8 -0
- package/src/channels/slack/api.ts +41 -5
- package/src/channels/slack/defaults.ts +15 -49
- package/src/channels/slack/dispatch.ts +56 -22
- package/src/channels/slack/inbound.ts +43 -0
- package/src/channels/slack/live-delivery.ts +235 -114
- package/src/channels/slack/manifest.ts +5 -1
- package/src/channels/slack/nudge-carrier.ts +48 -1
- package/src/channels/slack/pr-ref.ts +56 -25
- package/src/channels/slack/slack-channel.ts +2 -0
- package/src/files-backends/cursor-hosted.ts +41 -2
- package/src/files.ts +11 -0
- package/src/internal/advertise-tools.ts +18 -2
- package/src/internal/bounded.ts +28 -0
- package/src/internal/cli-deploy.ts +183 -7
- package/src/internal/conversation-mirror.ts +406 -0
- package/src/internal/cursor/backend-client.ts +34 -58
- package/src/internal/cursor/session-token.ts +115 -0
- package/src/internal/cursor-agent-template.ts +1 -0
- package/src/internal/deferred-channel-session.ts +61 -0
- package/src/internal/deploy-client.ts +24 -1
- package/src/internal/deploy-manifest.ts +10 -5
- package/src/internal/discovery.ts +25 -2
- package/src/internal/framework-file-storage.ts +222 -0
- package/src/internal/framework-storage-selection.ts +101 -19
- package/src/internal/hosted-admission-context.ts +37 -0
- package/src/internal/hosted-delivery-protocol.ts +44 -1
- package/src/internal/hosted-delivery.ts +105 -40
- package/src/internal/hosted-managed-automation.ts +72 -0
- package/src/internal/init-project.ts +2 -0
- package/src/internal/install-cursor-skills.ts +1 -4
- package/src/internal/managed-delivery.ts +125 -0
- package/src/internal/review-comments.ts +10 -113
- package/src/internal/runtime-dispatch-runner.ts +10 -0
- package/src/internal/scm/pr-url.ts +95 -0
- package/src/internal/sdk-runner.ts +103 -0
- package/src/internal/server.ts +12 -0
- package/src/internal/session-engine.ts +76 -4
- package/src/internal/steering.ts +17 -0
- package/src/storage-backends/cursor-hosted.ts +10 -1
- package/src/types.ts +2 -1
- package/templates/agentic-owners/README.md +1 -1
- package/templates/agentic-owners/agent/agent.ts +0 -10
- package/templates/agentic-owners/agent/channels/github.ts +5 -14
- package/templates/agentic-owners/agent/lib/config.ts +0 -8
- package/templates/agentic-owners/agent/lib/review.ts +2 -15
- package/templates/agentic-owners/agent/tools/record_review.ts +2 -4
- package/templates/code-wiki/README.md +34 -0
- package/templates/code-wiki/agent/agent.ts +8 -0
- package/templates/code-wiki/agent/channels/github.ts +144 -0
- package/templates/code-wiki/agent/instructions.md +39 -0
- package/templates/code-wiki/agent/lib/repos.ts +5 -0
- package/templates/code-wiki/agent/lib/wiki.ts +22 -0
- package/templates/code-wiki/agent/tools/apply_wiki.ts +219 -0
- package/templates/code-wiki/evals/evals.config.ts +5 -0
- package/templates/code-wiki/evals/wiki.eval.ts +132 -0
- package/templates/code-wiki/init.json +25 -0
- package/templates/code-wiki/package.json +18 -0
- package/templates/code-wiki/tsconfig.json +12 -0
- package/templates/demo/agent/agent.ts +0 -10
- package/templates/pr-autofixer/README.md +0 -2
- package/templates/pr-autofixer/agent/agent.ts +0 -11
- package/templates/pr-autofixer/agent/channels/slack.ts +0 -7
- package/templates/pr-autofixer/agent/lib/pr-state.ts +5 -17
- package/templates/pr-autofixer/agent/lib/repos.ts +0 -1
- package/templates/security-help/README.md +2 -2
- package/templates/security-help/agent/agent.ts +1 -2
- package/templates/security-help/agent/channels/slack.ts +0 -3
- package/templates/security-help/agent/instructions.md +9 -10
- package/templates/security-help/agent/skills/access-request.md +1 -1
- package/templates/security-help/agent/skills/faq.md +31 -0
- package/templates/security-help/agent/skills/security-playbooks.md +1 -1
- package/templates/security-help/package.json +1 -2
- package/templates/security-reviewer/agent/agent.ts +0 -10
- package/templates/triage/agent/agent.ts +0 -10
- package/templates/triage/agent/channels/queue.ts +1 -1
- package/templates/triage/agent/channels/webhook.ts +1 -3
- package/dist/docs/assets/chunks/@localSearchIndexroot.DU3U2Ij2.js +0 -1
- package/dist/docs/assets/index.md.DRakGHFe.js +0 -5
- package/dist/internal/deployment-scm-event-stream.d.ts +0 -116
- package/dist/internal/deployment-scm-event-stream.d.ts.map +0 -1
- package/dist/internal/deployment-scm-event-stream.js +0 -474
- package/dist/playground/assets/index-D9N7-q97.css +0 -1
- package/src/internal/deployment-scm-event-stream.ts +0 -593
- package/templates/security-help/agent/knowledge/faq/approvals.md +0 -5
- package/templates/security-help/agent/knowledge/faq/channels.md +0 -6
- package/templates/security-help/agent/knowledge/faq/phishing.md +0 -10
- package/templates/security-help/agent/skills/security-first-pass.md +0 -15
- /package/dist/docs/assets/{reference_skills.md.8son6Hjm.lean.js → reference_skills.md.BFW9retM.lean.js} +0 -0
- /package/dist/docs/assets/{templates_agentic-owners.md.DqtPdm6f.lean.js → templates_agentic-owners.md.BZSH4N9z.lean.js} +0 -0
- /package/dist/docs/assets/{templates_demo.md.DhFcWN6j.lean.js → templates_demo.md.BeQX9V3H.lean.js} +0 -0
|
@@ -1,165 +1,103 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentsdk-framework-map
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Agent SDK projects with agent/agent.ts and agent/instructions.md.
|
|
4
|
+
Orient on Agent SDK layout, local vs cloud runtime, sessions, and
|
|
5
|
+
invariants (Node not Bun, root evals/, typecheck after tsx). Use
|
|
6
|
+
when creating, editing, or running a project with agent/agent.ts.
|
|
8
7
|
---
|
|
9
8
|
|
|
10
9
|
# Agent SDK framework map
|
|
11
10
|
|
|
12
|
-
`@cursor/july`
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
read/grep the model makes fails and turns degrade into 8-minute retry
|
|
35
|
-
loops. All package mise tasks already use tsx.
|
|
36
|
-
2. **Evals live at the project root `evals/`**, never `agent/evals/` (that
|
|
37
|
-
path is silently ignored).
|
|
38
|
-
3. **tsx strips types without checking them.** `validate`/`run` passing
|
|
39
|
-
does not mean the code typechecks — run the repo's TypeScript check
|
|
40
|
-
(in everysphere: `dev check typecheck packages/agent-serve/... --timeout 120`)
|
|
41
|
-
before shipping. Classic miss: a tool `execute` return that fails
|
|
42
|
-
`ToolExecuteResult` — returns must be JSON-shaped, so use object
|
|
43
|
-
literals or `type` aliases, not `interface` types.
|
|
44
|
-
4. **Harness cwd in a nested git repo.** Discovery defaults `local.cwd` to
|
|
45
|
-
`~/.cache/agent-serve/<dir>` so ancestor `AGENTS.md` / `.cursor` / IDE
|
|
46
|
-
MCP do not leak into playground turns. Set cwd at a checkout only when
|
|
47
|
-
the agent must inherit that tree. Attached MCP is invisible by name
|
|
48
|
-
until `advertiseTools: true`.
|
|
49
|
-
5. **A model turn needs `CURSOR_API_KEY`.** Everything structural
|
|
50
|
-
(`validate`, `info`, `call`, `serve` bring-up) works without one.
|
|
11
|
+
`@cursor/july` discovers files under `agent/` and serves the agent
|
|
12
|
+
over HTTP, Slack, and GitHub. Markdown is prose. TypeScript is typed
|
|
13
|
+
behavior. Ground truth: package `README.md` and `AGENTS.md`.
|
|
14
|
+
|
|
15
|
+
CLI is `agent-sdk` (Node, never Bun).
|
|
16
|
+
|
|
17
|
+
Public docs: `node_modules/@cursor/july/dist/docs/llms.txt` or
|
|
18
|
+
`/docs/llms.txt` on a running host.
|
|
19
|
+
|
|
20
|
+
## Invariants
|
|
21
|
+
|
|
22
|
+
1. **Node 22.13+, never Bun.** Bun corrupts harness tool-result
|
|
23
|
+
streams (`NGHTTP2_FRAME_SIZE_ERROR`).
|
|
24
|
+
2. **Evals live at project-root `evals/`.** `agent/evals/` is ignored.
|
|
25
|
+
3. **tsx does not typecheck.** Tool `execute` must return JSON-shaped
|
|
26
|
+
values: object literals or `type` aliases, not `interface` types.
|
|
27
|
+
4. **Nested git checkouts.** Discovery sets `local.cwd` to a
|
|
28
|
+
per-project cache directory under `~/.cache`. Point cwd at a
|
|
29
|
+
checkout only when the agent must inherit that tree.
|
|
30
|
+
5. **Attached MCP is nameless** until `advertiseTools: true`.
|
|
31
|
+
6. **Model turns need `CURSOR_API_KEY`.** `validate`, `info`, `call`,
|
|
32
|
+
and `serve` bring-up do not.
|
|
51
33
|
|
|
52
34
|
## Folder structure
|
|
53
35
|
|
|
54
|
-
|
|
55
|
-
path live under README "Folder structure".
|
|
36
|
+
Path is identity. Full list: README "Folder structure".
|
|
56
37
|
|
|
57
|
-
| Path |
|
|
38
|
+
| Path | Role |
|
|
58
39
|
| --- | --- |
|
|
59
|
-
| `agent/agent.ts` | `defineAgent({ model?, runtime?, cloud?, local? })
|
|
60
|
-
| `agent/instructions.md` | Always-on system prompt (required
|
|
61
|
-
| `agent/tools/<name>.ts` | One
|
|
62
|
-
| `agent/skills/*` |
|
|
63
|
-
| `agent/mcp-connections/<name>.ts` | MCP
|
|
64
|
-
| `agent/host-connections/<name>.ts` | Privileged MCP for `ctx.host.mcp`
|
|
65
|
-
| `agent/subagents/<id>/` | Child agent
|
|
66
|
-
| `agent/channels/*.ts` |
|
|
67
|
-
| `agent/hooks/*.ts` | Observe-only
|
|
68
|
-
| `agent/ab.ts` or `agent/ab/*.ts` | Live A/B
|
|
69
|
-
| `agent/
|
|
70
|
-
| `agent/
|
|
71
|
-
| `agent/
|
|
72
|
-
| `agent/
|
|
73
|
-
| `
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
`runtime: "
|
|
79
|
-
the serve host; `runtime: "cloud"` runs them on Cursor cloud agents
|
|
80
|
-
(`bc-...` ids, needs `cloud: { repos: [...] }`).
|
|
40
|
+
| `agent/agent.ts` | `defineAgent({ model?, runtime?, cloud?, local? })` |
|
|
41
|
+
| `agent/instructions.md` | Always-on system prompt (required) |
|
|
42
|
+
| `agent/tools/<name>.ts` | One tool. `execution: "server"` or `"agent"` |
|
|
43
|
+
| `agent/skills/*` | On-demand procedures |
|
|
44
|
+
| `agent/mcp-connections/<name>.ts` | MCP. Never name an account file `cursor.ts`. `advertiseTools: true` for named local tools |
|
|
45
|
+
| `agent/host-connections/<name>.ts` | Privileged MCP for `ctx.host.mcp` / `mcp oauth` |
|
|
46
|
+
| `agent/subagents/<id>/` | Child agent (`description` required) |
|
|
47
|
+
| `agent/channels/*.ts` | Slack / GitHub / custom HTTP |
|
|
48
|
+
| `agent/hooks/*.ts` | Observe-only |
|
|
49
|
+
| `agent/ab.ts` or `agent/ab/*.ts` | Live A/B (`defineAB`) |
|
|
50
|
+
| `agent/otel.ts` | OpenTelemetry (`defineOtel`) |
|
|
51
|
+
| `agent/schedules/*` | Cron. Never auto-fire under `--dev` |
|
|
52
|
+
| `agent/sandbox/workspace/` | Session seed files (local only) |
|
|
53
|
+
| `agent/lib/` | Import-only. Never discovered |
|
|
54
|
+
| `evals/**/*.eval.ts` | Case id is the path under `evals/` |
|
|
55
|
+
|
|
56
|
+
## Local vs cloud
|
|
57
|
+
|
|
58
|
+
`runtime: "local"` (default) runs on the serve host.
|
|
59
|
+
`runtime: "cloud"` needs `cloud: { repos: [...] }`.
|
|
81
60
|
|
|
82
61
|
| Capability | local | cloud |
|
|
83
62
|
| --- | --- | --- |
|
|
84
|
-
| Server tools
|
|
63
|
+
| Server tools | yes | yes on managed hosting; self-hosted needs `--public-url` |
|
|
85
64
|
| Tool approvals | yes | no |
|
|
86
|
-
| Agent tools
|
|
87
|
-
| Skills | yes | yes |
|
|
65
|
+
| Agent tools / skills | yes | yes |
|
|
88
66
|
| sandbox seeds | yes | no |
|
|
89
|
-
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
A follow-up to a busy HTTP/MCP session **interrupts the in-flight turn**
|
|
107
|
-
and waits for it to settle before the new turn sends. Slack uses
|
|
108
|
-
**coalesce** instead (enqueue + boundary drain; see
|
|
109
|
-
`docs/reference/sessions.md`). `POST /v1/session/:id/stop` interrupts
|
|
110
|
-
without sending. Session-bound deterministic tool calls are rejected with
|
|
111
|
-
`409 session_busy` while a turn runs.
|
|
112
|
-
|
|
113
|
-
Key built-in routes (each agent, under `/<slug>` in multi-agent mode):
|
|
114
|
-
`POST /v1/session`, `POST /v1/session/:id`, `GET /v1/session/:id/stream`,
|
|
115
|
-
`GET /v1/sessions`, `POST /v1/tools/:toolName` (deterministic call),
|
|
116
|
-
`GET/POST /v1/session/:id/approvals[/:callId]`, `GET /v1/info`,
|
|
117
|
-
`GET /v1/health`, and in dev `POST /v1/dev/schedules/:id`,
|
|
118
|
-
`POST /v1/dev/reminders/:id`.
|
|
119
|
-
|
|
120
|
-
## State layout
|
|
121
|
-
|
|
122
|
-
```
|
|
123
|
-
<project>/.agent-serve/ # or <stateRoot>/<slug>/ under serve
|
|
124
|
-
sessions/<id>/session.json # metadata
|
|
125
|
-
sessions/<id>/events.ndjson # durable stream (replayable)
|
|
126
|
-
sessions/<id>/workspace/ # the harness cwd for that session
|
|
127
|
-
traces/<sessionId>.ndjson # written by `run`
|
|
128
|
-
runner/ # SDK conversation store
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Delete a session directory to forget a conversation.
|
|
67
|
+
| Checkout | you arrange it | the VM carries it |
|
|
68
|
+
|
|
69
|
+
Use cloud when the job needs a checkout at scale. `validate` warns
|
|
70
|
+
when cloud is combined with local-only capabilities.
|
|
71
|
+
|
|
72
|
+
## Sessions
|
|
73
|
+
|
|
74
|
+
- **continuationToken** continues a conversation. HTTP follow-ups
|
|
75
|
+
rotate it. Stale tokens return `409`.
|
|
76
|
+
- **sessionId** is the inspect handle
|
|
77
|
+
(`GET /v1/session/:id/stream?startIndex=N`).
|
|
78
|
+
|
|
79
|
+
A follow-up to a busy HTTP/MCP session interrupts the in-flight
|
|
80
|
+
turn. Slack coalesces. Routes: `docs/reference/http-api.md`.
|
|
81
|
+
Session files live under the project state directory
|
|
82
|
+
(`--state-root`).
|
|
132
83
|
|
|
133
84
|
## Where logic belongs
|
|
134
85
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
## Where to go next
|
|
155
|
-
|
|
156
|
-
- Scaffolding → `packages/agent-serve/skills/create-agent/SKILL.md`
|
|
157
|
-
- Evals → `packages/agent-serve/skills/evals/SKILL.md`
|
|
158
|
-
- Live A/B metrics → `packages/agent-serve/skills/ab/SKILL.md`
|
|
159
|
-
- OpenTelemetry → `packages/agent-serve/skills/otel/SKILL.md`
|
|
160
|
-
- GitHub webhooks → `packages/agent-serve/skills/github/SKILL.md`
|
|
161
|
-
- Slack → `packages/agent-serve/skills/setup-slack/SKILL.md`
|
|
162
|
-
- Host MCP OAuth → `packages/agent-serve/skills/mcp-auth/SKILL.md`
|
|
163
|
-
- Local triage → `packages/agent-serve/skills/debug/SKILL.md`
|
|
164
|
-
- Measured improvement → `packages/agent-serve/skills/hillclimb/SKILL.md`
|
|
165
|
-
- Dogfood / deploy → `packages/agent-serve/skills/operate/SKILL.md`
|
|
86
|
+
Code: side-effect gates, write dedupe, auth, evidence seeding, hard
|
|
87
|
+
API caps. Model: formatting, summarizing, classification, replies.
|
|
88
|
+
Budget: `skills/create-agent/SKILL.md`.
|
|
89
|
+
|
|
90
|
+
Loop: `validate` / `info` / `call` / `run` / `eval` / `serve`. Serve
|
|
91
|
+
only this agent's directory.
|
|
92
|
+
|
|
93
|
+
| Task | Skill |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| Scaffold | `skills/create-agent/SKILL.md` |
|
|
96
|
+
| Evals | `skills/evals/SKILL.md` |
|
|
97
|
+
| Live A/B | `skills/ab/SKILL.md` |
|
|
98
|
+
| OpenTelemetry | `skills/otel/SKILL.md` |
|
|
99
|
+
| GitHub | `skills/github/SKILL.md` |
|
|
100
|
+
| Slack | `skills/setup-slack/SKILL.md` |
|
|
101
|
+
| Host MCP OAuth | `skills/mcp-auth/SKILL.md` |
|
|
102
|
+
| Local triage | `skills/debug/SKILL.md` |
|
|
103
|
+
| Measured improvement | `skills/hillclimb/SKILL.md` |
|
package/skills/github/SKILL.md
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentsdk-github
|
|
3
3
|
description: >-
|
|
4
|
-
Build and test GitHub-
|
|
5
|
-
|
|
6
|
-
(fixtures,
|
|
7
|
-
|
|
4
|
+
Build and test GitHub-driven Agent SDK agents: githubChannel hooks
|
|
5
|
+
(auth turn vs host task), cursorAccount / --cursor-events, and
|
|
6
|
+
local test tiers (fixtures, replay, forward). Use when wiring
|
|
7
|
+
GitHub events or debugging delivery.
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# GitHub channels in the Agent SDK
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
Author `agent/channels/github.ts`. Production wakes:
|
|
13
|
+
`cursorAccount` + `serve --cursor-events`. No public webhook URL.
|
|
14
|
+
Use the HTTP route for fixtures, replay, and hosts that already
|
|
15
|
+
terminate GitHub webhooks.
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
`@cursor/july/channels/github`. It mounts
|
|
17
|
-
`POST /<slug>/v1/channels/github` and publishes the events it dispatches on
|
|
18
|
-
(derived from declared hooks, or pinned via `webhookEvents`) so the CLI can
|
|
19
|
-
auto-derive forwarding.
|
|
17
|
+
Guide: `docs/guides/github.md`.
|
|
20
18
|
|
|
21
19
|
```ts
|
|
22
20
|
import { defaultGitHubAuth, githubChannel } from "@cursor/july/channels/github";
|
|
23
21
|
|
|
24
22
|
export default githubChannel({
|
|
25
|
-
botName: "my-agent",
|
|
23
|
+
botName: "my-agent",
|
|
26
24
|
cursorAccount: { repos: ["owner/repo"] }, // permissions?: "read" | "pr-write" | "contents-write"
|
|
27
25
|
|
|
28
26
|
onPullRequest: (ctx, pr) =>
|
|
@@ -33,39 +31,44 @@ export default githubChannel({
|
|
|
33
31
|
```
|
|
34
32
|
|
|
35
33
|
Hooks: `onPullRequest`, `onComment`, `onIssue`, `onCheckSuite`,
|
|
36
|
-
`onCheckRun`, `onWorkflowRun`, `onStatus`, plus
|
|
37
|
-
|
|
34
|
+
`onCheckRun`, `onWorkflowRun`, `onStatus`, plus `onEvent` and
|
|
35
|
+
`onStart`/`onStop`.
|
|
38
36
|
|
|
39
37
|
| Return | Meaning |
|
|
40
38
|
| --- | --- |
|
|
41
|
-
| `{ auth }` |
|
|
42
|
-
| `{ task }` |
|
|
43
|
-
| `null` | Skip
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
##
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
39
|
+
| `{ auth }` | Model turn. Session shows in the playground. `workspaceFiles` can be a function. |
|
|
40
|
+
| `{ task }` | Host work. No chat session. Use when the work can outlive a webhook timeout. |
|
|
41
|
+
| `null` | Skip |
|
|
42
|
+
|
|
43
|
+
To keep repo scope in deploy config, use `cursorAccount: true`
|
|
44
|
+
and pass `--repo owner/name` at serve / `--cursor-events-repo`
|
|
45
|
+
at deploy. Repos must share one GitHub owner.
|
|
46
|
+
|
|
47
|
+
## Event sources
|
|
48
|
+
|
|
49
|
+
| Source | When |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `cursorAccount` + `serve --cursor-events` | Preferred. Signed-in host (`agent-sdk login` / `CURSOR_API_KEY`). Repos from the channel and from repeatable `--repo owner/name`. Cap 20, one GitHub owner |
|
|
52
|
+
| HTTP `POST /<slug>/v1/channels/github` with a webhook secret | `allowAll()` + `X-Hub-Signature-256` |
|
|
53
|
+
| HTTP, no secret | Loopback only. `serve --dev` also admits unsigned loopback (fixtures / forward) |
|
|
54
|
+
|
|
55
|
+
`permissions`: `"read"` inspect; `"pr-write"` (default) comments /
|
|
56
|
+
PR writes; `"contents-write"` push or merge-box checks.
|
|
57
|
+
`progress.commitStatus` needs check-write; see the GitHub guide.
|
|
58
|
+
Set `checks: true` when channel code posts its own Checks API
|
|
59
|
+
runs through `ctx.github.createCheck`. The flag grants access.
|
|
60
|
+
It does not post a check.
|
|
61
|
+
|
|
62
|
+
Without `cursorAccount`, outbound calls prefer App installation
|
|
63
|
+
tokens (`GITHUB_APP_ID` + `GITHUB_APP_PRIVATE_KEY`). Local tests
|
|
64
|
+
can use `GITHUB_TOKEN` / `gh auth login`.
|
|
65
|
+
|
|
66
|
+
The Cursor stream is metadata, not full webhook bodies. Re-read
|
|
67
|
+
the PR from GitHub.
|
|
68
|
+
|
|
69
|
+
## Test locally
|
|
70
|
+
|
|
71
|
+
1. **Fixtures** (offline, `--dev`, no signature):
|
|
69
72
|
|
|
70
73
|
```bash
|
|
71
74
|
curl -s -X POST http://127.0.0.1:3000/<slug>/v1/channels/github \
|
|
@@ -74,87 +77,26 @@ curl -s -X POST http://127.0.0.1:3000/<slug>/v1/channels/github \
|
|
|
74
77
|
-d @fixtures/github/pull_request.synchronize.json
|
|
75
78
|
```
|
|
76
79
|
|
|
77
|
-
|
|
78
|
-
`--dry-run --out` (below) instead of hand-writing payloads.
|
|
79
|
-
|
|
80
|
-
### 2. `github replay` — deterministic, read-only (the hillclimbing tier)
|
|
81
|
-
|
|
82
|
-
Reads a real PR via `gh api` (**pull access is enough** — `GITHUB_TOKEN`
|
|
83
|
-
is fine here), synthesizes GitHub-shaped payloads, signs them when a secret
|
|
84
|
-
is configured, and POSTs them at the channel. Fully deterministic.
|
|
80
|
+
2. **Replay** (hillclimb tier; pull access is enough):
|
|
85
81
|
|
|
86
82
|
```bash
|
|
87
|
-
agent-sdk github replay
|
|
88
|
-
agent-sdk github replay owner/repo#123 --dir <project> --events '*' --conclusion failure
|
|
83
|
+
agent-sdk github replay owner/repo#123 --dir <project>
|
|
89
84
|
agent-sdk github replay owner/repo#123 --dir <project> --events '*' --dry-run --out fixtures/github
|
|
90
85
|
```
|
|
91
86
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
event; `--secret` or `GITHUB_WEBHOOK_SECRET` signs.
|
|
95
|
-
|
|
96
|
-
### 3. `github forward` — live deliveries (needs repo admin)
|
|
97
|
-
|
|
98
|
-
Wraps `gh webhook forward`: registers a real webhook and relays deliveries
|
|
99
|
-
to loopback. URL + events auto-derived; repo inferred from the git remote.
|
|
87
|
+
3. **Forward** (live; repo admin). One forwarder per repo. Blank
|
|
88
|
+
`GITHUB_TOKEN`/`GH_TOKEN` or every delivery 401s:
|
|
100
89
|
|
|
101
90
|
```bash
|
|
102
|
-
agent-sdk github doctor --install
|
|
103
|
-
agent-sdk github events --dir <parent> --json # what would be forwarded
|
|
91
|
+
agent-sdk github doctor --install
|
|
104
92
|
GITHUB_TOKEN= GH_TOKEN= agent-sdk github forward --dir <project>
|
|
105
93
|
```
|
|
106
94
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
1. **`GITHUB_TOKEN`/`GH_TOKEN` in the env → every delivery 401s** while
|
|
110
|
-
hook creation still succeeds. The relay authenticates with the gh CLI
|
|
111
|
-
login and rejects env tokens. Blank them for the command. `doctor` and
|
|
112
|
-
`forward` warn about this.
|
|
113
|
-
2. **One forwarder per repo** (GitHub limit). Point one
|
|
114
|
-
`forward --dir <parent>` at a folder of agents and it fans out each raw,
|
|
115
|
-
still-signed delivery to every channel whose event set matches; N
|
|
116
|
-
separate forwarders collide with `Hook already exists`.
|
|
117
|
-
3. Requires **admin** on the repo (org owner for `--org`) — if you lack
|
|
118
|
-
it, use replay.
|
|
119
|
-
4. Best-effort dev relay: deliveries while the process is down are lost.
|
|
120
|
-
|
|
121
|
-
`--repo owner/repo` / `--org ORG` override the target, `--events` narrows,
|
|
122
|
-
`--url` points at a tunnel, `--slug` / `--channel` target one agent.
|
|
123
|
-
|
|
124
|
-
### 4. `serve --cursor-events` — pull from Cursor (`/v0/scm-events`)
|
|
95
|
+
4. **Cursor pull** (same as production):
|
|
125
96
|
|
|
126
97
|
```bash
|
|
127
98
|
agent-sdk serve --dir <project> --cursor-events --repo owner/repo
|
|
128
99
|
```
|
|
129
100
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
out instead of running a relay that can never receive events. No public URL
|
|
133
|
-
or repo admin. Registers before consuming; offset + consumer id under
|
|
134
|
-
`<state-root>/cursor-events/`. `CURSOR_API_BASE_URL` for a non-default
|
|
135
|
-
backend. Each event includes the verified webhook payload when the API
|
|
136
|
-
stored it.
|
|
137
|
-
|
|
138
|
-
## Production-shaped channel patterns
|
|
139
|
-
|
|
140
|
-
Steal these when an agent must survive real webhook volume — each one
|
|
141
|
-
against its measured load signal, not as a starter kit. Debounce needs
|
|
142
|
-
event bursts you have seen; persisted buffers need wakes you cannot afford
|
|
143
|
-
to drop; affinity stores need cross-channel resume you actually do.
|
|
144
|
-
Preinstalling all of them is how a channel file hits 400 lines before the
|
|
145
|
-
first real delivery.
|
|
146
|
-
|
|
147
|
-
- **Debounce per PR** (~3s, latest event wins) and re-buffer while CI
|
|
148
|
-
settles; skip a flush when a turn for that PR is already in flight.
|
|
149
|
-
- **Persist the buffer before ACKing** the webhook in `host.kv`, then
|
|
150
|
-
restore it on channel start. A restart must not drop buffered wakes.
|
|
151
|
-
- **Stable continuation key** `pr:owner/repo#N` so every wake resumes the
|
|
152
|
-
PR's session. Cross-channel resume needs an affinity store mapping PR →
|
|
153
|
-
SDK agent id (write it from an `agent.bound` hook with `ctx.host.kv`).
|
|
154
|
-
- **Discard payload details in wake prompts** — send a generic "re-check
|
|
155
|
-
the PR" refresh; the agent re-reads ground truth instead of trusting a
|
|
156
|
-
stale payload.
|
|
157
|
-
- **Cancel PR-scoped reminders on `pull_request.closed`.**
|
|
158
|
-
- No repo allowlist means the channel wakes for whatever deliveries
|
|
159
|
-
reach it — decide explicitly what repos an agent may act on, and
|
|
160
|
-
remember each wake spends real model budget.
|
|
101
|
+
Volume, debounce, and `progress.commitStatus` / `progress.banner`
|
|
102
|
+
live in `docs/guides/github.md`. Do not preinstall them.
|