@cursor/july 0.1.92 → 0.1.94
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 +8 -20
- package/README.md +115 -182
- package/dist/channels/deployments/deployments-channel.d.ts +7 -0
- package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
- package/dist/channels/deployments/deployments-channel.js +26 -2
- package/dist/channels/deployments/types.d.ts +8 -0
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/github/github-channel.d.ts +3 -0
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +28 -56
- package/dist/channels/slack/attachments.js +2 -2
- package/dist/channels/slack/dispatch.d.ts +0 -7
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +4 -7
- package/dist/channels/slack/eval-directive.d.ts +5 -12
- package/dist/channels/slack/eval-directive.d.ts.map +1 -1
- package/dist/channels/slack/eval-directive.js +8 -19
- package/dist/channels/slack/index.d.ts +0 -6
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +0 -6
- package/dist/channels/slack/setup.d.ts +4 -4
- package/dist/channels/slack/setup.d.ts.map +1 -1
- package/dist/channels/slack/setup.js +8 -15
- package/dist/channels/slack/slack-channel.d.ts +6 -13
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +15 -101
- package/dist/channels/slack/types.d.ts +12 -79
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/channels/slack/types.js +1 -15
- package/dist/client.d.ts +14 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +12 -0
- package/dist/connections.d.ts +18 -9
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +17 -8
- package/dist/continuation.d.ts +1 -1
- package/dist/continuation.js +1 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +8 -8
- package/dist/docs/ab.md +7 -13
- package/dist/docs/assets/{ab.md.CVzWxLoB.js → ab.md.DJo5r4R-.js} +4 -4
- package/dist/docs/assets/{ab.md.CVzWxLoB.lean.js → ab.md.DJo5r4R-.lean.js} +1 -1
- package/dist/docs/assets/{app.Bci6CM9E.js → app.CFDEas4I.js} +1 -1
- package/dist/docs/assets/building-with-agents.md.DI4mEzlt.js +13 -0
- package/dist/docs/assets/{building-with-agents.md.DH8A_cHA.lean.js → building-with-agents.md.DI4mEzlt.lean.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DU3U2Ij2.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.BCPT6xA-.js → VPLocalSearchBox.B1IIYpYS.js} +1 -1
- package/dist/docs/assets/chunks/{theme.BEA8BF3c.js → theme.Ct4NSiLm.js} +2 -2
- package/dist/docs/assets/concepts.md.lwAgBIMI.js +1 -0
- package/dist/docs/assets/{concepts.md.CRfU3bVg.lean.js → concepts.md.lwAgBIMI.lean.js} +1 -1
- package/dist/docs/assets/{deployment.md.DX_hc3ze.js → deployment.md.D9msOFOW.js} +9 -14
- package/dist/docs/assets/{deployment.md.DX_hc3ze.lean.js → deployment.md.D9msOFOW.lean.js} +1 -1
- package/dist/docs/assets/{evals.md.a0SMN6r9.js → evals.md.lfJoEVc8.js} +6 -6
- package/dist/docs/assets/{evals.md.a0SMN6r9.lean.js → evals.md.lfJoEVc8.lean.js} +1 -1
- package/dist/docs/assets/{guides_agent-to-agent.md.BCeVdJRJ.js → guides_agent-to-agent.md.BDb0t1QV.js} +2 -2
- package/dist/docs/assets/guides_cloud-runtime.md.CkYbjnAX.js +9 -0
- package/dist/docs/assets/guides_cloud-runtime.md.CkYbjnAX.lean.js +1 -0
- package/dist/docs/assets/{guides_convert-automation.md.D06eIzea.js → guides_convert-automation.md.B4sjlodG.js} +2 -2
- package/dist/docs/assets/{guides_github.md.Cdt1s2QC.js → guides_github.md.Cnh2mL4a.js} +5 -5
- package/dist/docs/assets/{guides_github.md.Cdt1s2QC.lean.js → guides_github.md.Cnh2mL4a.lean.js} +1 -1
- package/dist/docs/assets/{guides_mcp-oauth.md.Du0f7pGU.js → guides_mcp-oauth.md.DPYmBCbV.js} +7 -9
- package/dist/docs/assets/{guides_mcp-oauth.md.Du0f7pGU.lean.js → guides_mcp-oauth.md.DPYmBCbV.lean.js} +1 -1
- package/dist/docs/assets/{guides_slack.md.DiUmk_Oi.js → guides_slack.md.C32HsdKk.js} +7 -13
- package/dist/docs/assets/guides_slack.md.C32HsdKk.lean.js +1 -0
- package/dist/docs/assets/{guides_webhooks.md.BpnIdO0i.js → guides_webhooks.md.DKdA43Qm.js} +2 -2
- package/dist/docs/assets/{hillclimbing.md.ywF3yDAd.js → hillclimbing.md.DhESf3OO.js} +1 -1
- package/dist/docs/assets/index.md.DRakGHFe.js +5 -0
- package/dist/docs/assets/{index.md.BAaMXLFd.lean.js → index.md.DRakGHFe.lean.js} +1 -1
- package/dist/docs/assets/{quickstart.md.DsrarzEg.js → quickstart.md.Nj_LjW_a.js} +2 -2
- package/dist/docs/assets/{reference_agent-config.md.Bqylgw50.js → reference_agent-config.md.Cp_x38Nl.js} +3 -3
- package/dist/docs/assets/{reference_channels.md.DQZjCnyh.js → reference_channels.md.Cd2f2iyV.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.DQZjCnyh.lean.js → reference_channels.md.Cd2f2iyV.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.B7GkAJRC.js → reference_cli.md.Cw6_ICYG.js} +10 -11
- package/dist/docs/assets/{reference_cli.md.B7GkAJRC.lean.js → reference_cli.md.Cw6_ICYG.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.DYidrb-j.js → reference_connections.md.BH8Oc0D0.js} +7 -7
- package/dist/docs/assets/{reference_connections.md.DYidrb-j.lean.js → reference_connections.md.BH8Oc0D0.lean.js} +1 -1
- package/dist/docs/assets/reference_hooks.md.a8BJxMR5.js +14 -0
- package/dist/docs/assets/{reference_hooks.md.B9FSgdDe.lean.js → reference_hooks.md.a8BJxMR5.lean.js} +1 -1
- package/dist/docs/assets/reference_http-api.md.D89k1mdm.js +11 -0
- package/dist/docs/assets/reference_http-api.md.D89k1mdm.lean.js +1 -0
- package/dist/docs/assets/{reference_instructions.md.DhNCOl7r.js → reference_instructions.md.CR7XSsGk.js} +3 -3
- package/dist/docs/assets/{reference_instructions.md.DhNCOl7r.lean.js → reference_instructions.md.CR7XSsGk.lean.js} +1 -1
- package/dist/docs/assets/reference_playground.md.DnX5nL-B.js +1 -0
- package/dist/docs/assets/reference_playground.md.DnX5nL-B.lean.js +1 -0
- package/dist/docs/assets/reference_project-layout.md.Bv4KOtlB.js +19 -0
- package/dist/docs/assets/{reference_prompt.md.DZUMtLPD.js → reference_prompt.md.DnaD5dNK.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.DNipebiG.js → reference_schedules.md.DI_JrHgq.js} +1 -1
- package/dist/docs/assets/reference_sessions.md.D0mIh4KK.js +1 -0
- package/dist/docs/assets/{reference_sessions.md.tUFzz98S.lean.js → reference_sessions.md.D0mIh4KK.lean.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.B5ZEuHfG.js → reference_skills.md.8son6Hjm.js} +4 -4
- package/dist/docs/assets/{reference_subagents.md.Xoav0AII.js → reference_subagents.md.CfsIloPm.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.wpaJtHn6.js → reference_tools.md.BHeXn2id.js} +3 -3
- package/dist/docs/assets/{reference_tools.md.wpaJtHn6.lean.js → reference_tools.md.BHeXn2id.lean.js} +1 -1
- package/dist/docs/assets/scaffolding-agents.md.D7UUkWw0.js +1 -0
- package/dist/docs/assets/{scaffolding-agents.md.CRDDUtYJ.lean.js → scaffolding-agents.md.D7UUkWw0.lean.js} +1 -1
- package/dist/docs/assets/{storage.md.JbjlHWZ6.js → storage.md.BOHeqk2M.js} +5 -5
- package/dist/docs/assets/{storage.md.JbjlHWZ6.lean.js → storage.md.BOHeqk2M.lean.js} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.DSJSIpWU.js → templates_agentic-owners.md.DqtPdm6f.js} +2 -2
- package/dist/docs/assets/{templates_pr-autofixer.md.1HAR3RXE.js → templates_pr-autofixer.md.DU7dQpor.js} +2 -2
- package/dist/docs/assets/{templates_pr-autofixer.md.1HAR3RXE.lean.js → templates_pr-autofixer.md.DU7dQpor.lean.js} +1 -1
- package/dist/docs/assets/{templates_security-reviewer.md.ByFyRta2.js → templates_security-reviewer.md.CTa7u_l1.js} +2 -2
- package/dist/docs/assets/{templates_security-reviewer.md.ByFyRta2.lean.js → templates_security-reviewer.md.CTa7u_l1.lean.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.Ctv3T8C2.js +1 -0
- package/dist/docs/assets/{troubleshooting.md.DYECCZiJ.lean.js → troubleshooting.md.Ctv3T8C2.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +7 -7
- package/dist/docs/building-with-agents.md +5 -11
- package/dist/docs/concepts.html +5 -8
- package/dist/docs/concepts.md +13 -17
- package/dist/docs/deployment.html +13 -18
- package/dist/docs/deployment.md +9 -30
- package/dist/docs/design/agsh.md +406 -0
- package/dist/docs/evals.html +10 -10
- package/dist/docs/evals.md +16 -37
- package/dist/docs/guides/agent-to-agent.html +6 -6
- package/dist/docs/guides/agent-to-agent.md +3 -3
- package/dist/docs/guides/cloud-runtime.html +6 -6
- package/dist/docs/guides/cloud-runtime.md +9 -25
- package/dist/docs/guides/convert-automation.html +7 -7
- package/dist/docs/guides/convert-automation.md +4 -4
- package/dist/docs/guides/github.html +9 -9
- package/dist/docs/guides/github.md +16 -28
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/mcp-oauth.html +11 -13
- package/dist/docs/guides/mcp-oauth.md +14 -22
- package/dist/docs/guides/opentelemetry.html +5 -5
- package/dist/docs/guides/slack.html +11 -17
- package/dist/docs/guides/slack.md +13 -50
- package/dist/docs/guides/webhooks.html +6 -6
- package/dist/docs/guides/webhooks.md +3 -3
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +6 -6
- package/dist/docs/hillclimbing.md +1 -1
- package/dist/docs/index.html +6 -6
- package/dist/docs/index.md +0 -36
- package/dist/docs/llms-full.txt +965 -3633
- package/dist/docs/llms.txt +3 -18
- package/dist/docs/quickstart.html +6 -6
- package/dist/docs/quickstart.md +3 -4
- package/dist/docs/reference/agent-config.html +8 -8
- package/dist/docs/reference/agent-config.md +10 -15
- package/dist/docs/reference/artifacts.html +4 -4
- package/dist/docs/reference/channels.html +6 -6
- package/dist/docs/reference/channels.md +20 -31
- package/dist/docs/reference/cli.html +14 -15
- package/dist/docs/reference/cli.md +29 -38
- package/dist/docs/reference/connections.html +11 -11
- package/dist/docs/reference/connections.md +24 -25
- package/dist/docs/reference/hooks.html +6 -6
- package/dist/docs/reference/hooks.md +12 -17
- package/dist/docs/reference/http-api.html +7 -7
- package/dist/docs/reference/http-api.md +25 -37
- package/dist/docs/reference/instructions.html +6 -6
- package/dist/docs/reference/instructions.md +1 -1
- package/dist/docs/reference/playground.html +5 -5
- package/dist/docs/reference/playground.md +14 -19
- package/dist/docs/reference/project-layout.html +9 -7
- package/dist/docs/reference/project-layout.md +7 -3
- package/dist/docs/reference/prompt.html +6 -6
- package/dist/docs/reference/prompt.md +1 -1
- package/dist/docs/reference/schedules.html +6 -6
- package/dist/docs/reference/schedules.md +1 -2
- package/dist/docs/reference/sessions.html +5 -12
- package/dist/docs/reference/sessions.md +8 -19
- package/dist/docs/reference/skills.html +8 -8
- package/dist/docs/reference/skills.md +3 -3
- package/dist/docs/reference/subagents.html +6 -6
- package/dist/docs/reference/subagents.md +2 -2
- package/dist/docs/reference/tools.html +8 -8
- package/dist/docs/reference/tools.md +30 -19
- package/dist/docs/scaffolding-agents.html +5 -5
- package/dist/docs/scaffolding-agents.md +4 -5
- package/dist/docs/storage.html +9 -9
- package/dist/docs/storage.md +37 -80
- package/dist/docs/templates/agentic-owners.html +7 -7
- package/dist/docs/templates/agentic-owners.md +2 -2
- package/dist/docs/templates/demo.html +4 -4
- package/dist/docs/templates/pr-autofixer.html +6 -6
- package/dist/docs/templates/pr-autofixer.md +7 -9
- package/dist/docs/templates/security-reviewer.html +5 -5
- package/dist/docs/templates/security-reviewer.md +2 -3
- package/dist/docs/templates/triage.html +4 -4
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/docs/troubleshooting.md +8 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/advertise-tools.d.ts +11 -0
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +47 -9
- package/dist/internal/authored-alias-hooks.d.ts +14 -11
- package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
- package/dist/internal/authored-alias-hooks.js +14 -11
- package/dist/internal/authored-loaders.d.ts +7 -6
- package/dist/internal/authored-loaders.d.ts.map +1 -1
- package/dist/internal/authored-loaders.js +14 -10
- package/dist/internal/cli-deploy.d.ts +1 -1
- package/dist/internal/cli-deploy.js +5 -5
- package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
- package/dist/internal/cli-mcp-oauth.js +7 -4
- package/dist/internal/continuation-channel.d.ts +6 -3
- package/dist/internal/continuation-channel.d.ts.map +1 -1
- package/dist/internal/continuation-channel.js +44 -40
- package/dist/internal/continuation-identity.d.ts +17 -16
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +109 -36
- package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -1
- package/dist/internal/convert-automation/convert-workflow.js +26 -15
- package/dist/internal/convert-automation/slug.d.ts +0 -2
- package/dist/internal/convert-automation/slug.d.ts.map +1 -1
- package/dist/internal/convert-automation/slug.js +0 -8
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +5 -1
- package/dist/internal/deploy-manifest.d.ts +2 -2
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +4 -9
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +91 -13
- package/dist/internal/distribution.d.ts +4 -3
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +4 -3
- package/dist/internal/hosted-delivery-protocol.d.ts +38 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -0
- package/dist/internal/hosted-delivery-protocol.js +70 -0
- package/dist/internal/hosted-delivery.d.ts +35 -0
- package/dist/internal/hosted-delivery.d.ts.map +1 -0
- package/dist/internal/hosted-delivery.js +239 -0
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +1 -1
- package/dist/internal/mcp-endpoint.js +3 -3
- package/dist/internal/mcp-host.d.ts +8 -7
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +8 -7
- package/dist/internal/peer-connections.d.ts.map +1 -1
- package/dist/internal/peer-connections.js +5 -1
- package/dist/internal/playground/static.d.ts +0 -3
- package/dist/internal/playground/static.d.ts.map +1 -1
- package/dist/internal/resolved-connections.d.ts.map +1 -1
- package/dist/internal/resolved-connections.js +5 -7
- package/dist/internal/review-comments.d.ts +186 -63
- package/dist/internal/review-comments.d.ts.map +1 -1
- package/dist/internal/review-comments.js +350 -168
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +134 -175
- package/dist/internal/session-engine.d.ts +50 -10
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +221 -68
- package/dist/internal/shallow-clone.d.ts +8 -2
- package/dist/internal/shallow-clone.d.ts.map +1 -1
- package/dist/internal/shallow-clone.js +17 -10
- package/dist/internal/tool-catalog.d.ts +31 -0
- package/dist/internal/tool-catalog.d.ts.map +1 -0
- package/dist/internal/tool-catalog.js +67 -0
- package/dist/playground/assets/{index-DDvyC2z6.js → index-B3JCyigB.js} +2 -2
- package/dist/playground/index.html +1 -1
- package/dist/types.d.ts +81 -40
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +19 -0
- package/docs/README.md +0 -36
- package/docs/ab.md +7 -13
- package/docs/building-with-agents.md +5 -11
- package/docs/concepts.md +13 -17
- package/docs/deployment.md +9 -30
- package/docs/design/agsh.md +406 -0
- package/docs/evals.md +16 -37
- package/docs/guides/agent-to-agent.md +3 -3
- package/docs/guides/cloud-runtime.md +9 -25
- package/docs/guides/convert-automation.md +4 -4
- package/docs/guides/github.md +16 -28
- package/docs/guides/mcp-oauth.md +14 -22
- package/docs/guides/slack.md +14 -51
- package/docs/guides/webhooks.md +3 -3
- package/docs/hillclimbing.md +1 -1
- package/docs/quickstart.md +3 -4
- package/docs/reference/agent-config.md +10 -15
- package/docs/reference/channels.md +20 -31
- package/docs/reference/cli.md +29 -38
- package/docs/reference/connections.md +24 -25
- package/docs/reference/hooks.md +12 -17
- package/docs/reference/http-api.md +26 -38
- package/docs/reference/instructions.md +1 -1
- package/docs/reference/playground.md +14 -19
- package/docs/reference/project-layout.md +7 -3
- package/docs/reference/prompt.md +1 -1
- package/docs/reference/schedules.md +1 -2
- package/docs/reference/sessions.md +8 -19
- package/docs/reference/skills.md +3 -3
- package/docs/reference/subagents.md +2 -2
- package/docs/reference/tools.md +30 -19
- package/docs/scaffolding-agents.md +4 -5
- package/docs/storage.md +37 -80
- package/docs/templates/agentic-owners.md +2 -2
- package/docs/templates/pr-autofixer.md +7 -9
- package/docs/templates/security-reviewer.md +2 -3
- package/docs/troubleshooting.md +8 -8
- package/package.json +16 -2
- package/skills/create-agent/SKILL.md +6 -13
- package/skills/debug/SKILL.md +2 -4
- package/skills/evals/SKILL.md +1 -1
- package/skills/framework-map/SKILL.md +3 -2
- package/skills/mcp-auth/SKILL.md +10 -13
- package/skills/setup-slack/SKILL.md +21 -137
- package/src/channels/deployments/deployments-channel.ts +32 -2
- package/src/channels/deployments/types.ts +8 -0
- package/src/channels/github/github-channel.ts +71 -21
- package/src/channels/slack/attachments.ts +2 -2
- package/src/channels/slack/dispatch.ts +2 -16
- package/src/channels/slack/eval-directive.ts +8 -27
- package/src/channels/slack/index.ts +0 -6
- package/src/channels/slack/setup.ts +8 -15
- package/src/channels/slack/slack-channel.ts +14 -125
- package/src/channels/slack/types.ts +12 -96
- package/src/client.ts +23 -0
- package/src/connections.ts +20 -7
- package/src/continuation.ts +1 -1
- package/src/index.ts +2 -0
- package/src/internal/advertise-tools.ts +45 -7
- package/src/internal/authored-alias-hooks.ts +14 -11
- package/src/internal/authored-loaders.ts +14 -10
- package/src/internal/cli-deploy.ts +5 -5
- package/src/internal/cli-mcp-oauth.ts +6 -4
- package/src/internal/continuation-channel.ts +62 -45
- package/src/internal/continuation-identity.ts +123 -38
- package/src/internal/convert-automation/convert-workflow.ts +29 -17
- package/src/internal/convert-automation/slug.ts +0 -9
- package/src/internal/cursor/account-mcp.ts +4 -1
- package/src/internal/deploy-manifest.ts +5 -9
- package/src/internal/discovery.ts +107 -13
- package/src/internal/distribution.ts +4 -3
- package/src/internal/fixtures/units-server.ts +52 -0
- package/src/internal/hosted-delivery-protocol.ts +114 -0
- package/src/internal/hosted-delivery.ts +359 -0
- package/src/internal/http-channel.ts +0 -2
- package/src/internal/mcp-endpoint.ts +3 -3
- package/src/internal/mcp-host.ts +8 -7
- package/src/internal/peer-connections.ts +4 -1
- package/src/internal/playground/static.ts +1 -3
- package/src/internal/resolved-connections.ts +8 -10
- package/src/internal/review-comments.ts +542 -229
- package/src/internal/server.ts +180 -253
- package/src/internal/session-engine.ts +279 -70
- package/src/internal/shallow-clone.ts +30 -16
- package/src/internal/tool-catalog.ts +106 -0
- package/src/types.ts +99 -40
- package/templates/pr-autofixer/agent/channels/slack.ts +8 -2
- package/templates/triage/README.md +2 -1
- package/templates/triage/overlays/jira/agent/mcp-connections/tracker.ts +0 -1
- package/templates/triage/overlays/linear/agent/mcp-connections/tracker.ts +0 -1
- package/dist/channels/slack/cursor-account.d.ts +0 -87
- package/dist/channels/slack/cursor-account.d.ts.map +0 -1
- package/dist/channels/slack/cursor-account.js +0 -100
- package/dist/docs/assets/building-with-agents.md.DH8A_cHA.js +0 -13
- package/dist/docs/assets/chunks/@localSearchIndexroot.Dv-Q0XtU.js +0 -1
- package/dist/docs/assets/concepts.md.CRfU3bVg.js +0 -4
- package/dist/docs/assets/example-agents_approval-buddy.md.DNL83puR.js +0 -10
- package/dist/docs/assets/example-agents_approval-buddy.md.DNL83puR.lean.js +0 -1
- package/dist/docs/assets/example-agents_benny.md.C40vHRLc.js +0 -7
- package/dist/docs/assets/example-agents_benny.md.C40vHRLc.lean.js +0 -1
- package/dist/docs/assets/example-agents_bugbot.md.BRGMi9O2.js +0 -11
- package/dist/docs/assets/example-agents_bugbot.md.BRGMi9O2.lean.js +0 -1
- package/dist/docs/assets/example-agents_codebase-wiki.md.Dftj_tPp.js +0 -8
- package/dist/docs/assets/example-agents_codebase-wiki.md.Dftj_tPp.lean.js +0 -1
- package/dist/docs/assets/example-agents_codeowners-review.md.Bfta-lBU.js +0 -8
- package/dist/docs/assets/example-agents_codeowners-review.md.Bfta-lBU.lean.js +0 -1
- package/dist/docs/assets/example-agents_concierge.md.MrKpQndp.js +0 -23
- package/dist/docs/assets/example-agents_concierge.md.MrKpQndp.lean.js +0 -1
- package/dist/docs/assets/example-agents_fsd.md.ZWHWWZPE.js +0 -15
- package/dist/docs/assets/example-agents_fsd.md.ZWHWWZPE.lean.js +0 -1
- package/dist/docs/assets/example-agents_index.md.QZ8mhr6n.js +0 -2
- package/dist/docs/assets/example-agents_index.md.QZ8mhr6n.lean.js +0 -1
- package/dist/docs/assets/example-agents_knowledge-base.md.DqKqHQ9u.js +0 -11
- package/dist/docs/assets/example-agents_knowledge-base.md.DqKqHQ9u.lean.js +0 -1
- package/dist/docs/assets/example-agents_oncall.md.DK4XkYTd.js +0 -10
- package/dist/docs/assets/example-agents_oncall.md.DK4XkYTd.lean.js +0 -1
- package/dist/docs/assets/example-agents_security-reviewer.md.Bai6D0Ee.js +0 -19
- package/dist/docs/assets/example-agents_security-reviewer.md.Bai6D0Ee.lean.js +0 -1
- package/dist/docs/assets/example-agents_slack-agent.md.D7Kdj5BV.js +0 -5
- package/dist/docs/assets/example-agents_slack-agent.md.D7Kdj5BV.lean.js +0 -1
- package/dist/docs/assets/example-agents_weather-agent.md.lVEAbWFf.js +0 -25
- package/dist/docs/assets/example-agents_weather-agent.md.lVEAbWFf.lean.js +0 -1
- package/dist/docs/assets/guides_cloud-runtime.md.BSMLIBHr.js +0 -9
- package/dist/docs/assets/guides_cloud-runtime.md.BSMLIBHr.lean.js +0 -1
- package/dist/docs/assets/guides_slack.md.DiUmk_Oi.lean.js +0 -1
- package/dist/docs/assets/index.md.BAaMXLFd.js +0 -5
- package/dist/docs/assets/reference_hooks.md.B9FSgdDe.js +0 -14
- package/dist/docs/assets/reference_http-api.md.CSHVobzG.js +0 -11
- package/dist/docs/assets/reference_http-api.md.CSHVobzG.lean.js +0 -1
- package/dist/docs/assets/reference_playground.md.Dfb92yQf.js +0 -1
- package/dist/docs/assets/reference_playground.md.Dfb92yQf.lean.js +0 -1
- package/dist/docs/assets/reference_project-layout.md.CwkSbEWT.js +0 -17
- package/dist/docs/assets/reference_sessions.md.tUFzz98S.js +0 -8
- package/dist/docs/assets/scaffolding-agents.md.CRDDUtYJ.js +0 -1
- package/dist/docs/assets/troubleshooting.md.DYECCZiJ.js +0 -1
- package/dist/docs/example-agents/approval-buddy.html +0 -36
- package/dist/docs/example-agents/approval-buddy.md +0 -266
- package/dist/docs/example-agents/benny.html +0 -33
- package/dist/docs/example-agents/benny.md +0 -182
- package/dist/docs/example-agents/bugbot.html +0 -37
- package/dist/docs/example-agents/bugbot.md +0 -229
- package/dist/docs/example-agents/codebase-wiki.html +0 -34
- package/dist/docs/example-agents/codebase-wiki.md +0 -170
- package/dist/docs/example-agents/codeowners-review.html +0 -34
- package/dist/docs/example-agents/codeowners-review.md +0 -192
- package/dist/docs/example-agents/concierge.html +0 -49
- package/dist/docs/example-agents/concierge.md +0 -201
- package/dist/docs/example-agents/fsd.html +0 -41
- package/dist/docs/example-agents/fsd.md +0 -329
- package/dist/docs/example-agents/index.html +0 -28
- package/dist/docs/example-agents/index.md +0 -102
- package/dist/docs/example-agents/knowledge-base.html +0 -37
- package/dist/docs/example-agents/knowledge-base.md +0 -168
- package/dist/docs/example-agents/oncall.html +0 -36
- package/dist/docs/example-agents/oncall.md +0 -212
- package/dist/docs/example-agents/security-reviewer.html +0 -45
- package/dist/docs/example-agents/security-reviewer.md +0 -265
- package/dist/docs/example-agents/slack-agent.html +0 -31
- package/dist/docs/example-agents/slack-agent.md +0 -142
- package/dist/docs/example-agents/weather-agent.html +0 -51
- package/dist/docs/example-agents/weather-agent.md +0 -296
- package/dist/internal/cursor-slack-relay.d.ts +0 -96
- package/dist/internal/cursor-slack-relay.d.ts.map +0 -1
- package/dist/internal/cursor-slack-relay.js +0 -176
- package/docs/example-agents/approval-buddy.md +0 -271
- package/docs/example-agents/benny.md +0 -187
- package/docs/example-agents/bugbot.md +0 -234
- package/docs/example-agents/codebase-wiki.md +0 -175
- package/docs/example-agents/codeowners-review.md +0 -197
- package/docs/example-agents/concierge.md +0 -206
- package/docs/example-agents/fsd.md +0 -334
- package/docs/example-agents/index.md +0 -107
- package/docs/example-agents/knowledge-base.md +0 -173
- package/docs/example-agents/oncall.md +0 -217
- package/docs/example-agents/security-reviewer.md +0 -270
- package/docs/example-agents/slack-agent.md +0 -147
- package/docs/example-agents/weather-agent.md +0 -301
- package/src/channels/slack/cursor-account.ts +0 -202
- package/src/internal/cursor-slack-relay.ts +0 -249
- /package/dist/docs/assets/{guides_agent-to-agent.md.BCeVdJRJ.lean.js → guides_agent-to-agent.md.BDb0t1QV.lean.js} +0 -0
- /package/dist/docs/assets/{guides_convert-automation.md.D06eIzea.lean.js → guides_convert-automation.md.B4sjlodG.lean.js} +0 -0
- /package/dist/docs/assets/{guides_webhooks.md.BpnIdO0i.lean.js → guides_webhooks.md.DKdA43Qm.lean.js} +0 -0
- /package/dist/docs/assets/{hillclimbing.md.ywF3yDAd.lean.js → hillclimbing.md.DhESf3OO.lean.js} +0 -0
- /package/dist/docs/assets/{quickstart.md.DsrarzEg.lean.js → quickstart.md.Nj_LjW_a.lean.js} +0 -0
- /package/dist/docs/assets/{reference_agent-config.md.Bqylgw50.lean.js → reference_agent-config.md.Cp_x38Nl.lean.js} +0 -0
- /package/dist/docs/assets/{reference_project-layout.md.CwkSbEWT.lean.js → reference_project-layout.md.Bv4KOtlB.lean.js} +0 -0
- /package/dist/docs/assets/{reference_prompt.md.DZUMtLPD.lean.js → reference_prompt.md.DnaD5dNK.lean.js} +0 -0
- /package/dist/docs/assets/{reference_schedules.md.DNipebiG.lean.js → reference_schedules.md.DI_JrHgq.lean.js} +0 -0
- /package/dist/docs/assets/{reference_skills.md.B5ZEuHfG.lean.js → reference_skills.md.8son6Hjm.lean.js} +0 -0
- /package/dist/docs/assets/{reference_subagents.md.Xoav0AII.lean.js → reference_subagents.md.CfsIloPm.lean.js} +0 -0
- /package/dist/docs/assets/{templates_agentic-owners.md.DSJSIpWU.lean.js → templates_agentic-owners.md.DqtPdm6f.lean.js} +0 -0
package/README.md
CHANGED
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
> release, and 0.x versions may ship breaking changes without notice.
|
|
8
8
|
|
|
9
9
|
A filesystem-first framework for building and serving Cursor agents.
|
|
10
|
-
Customers define an agent as ordinary files
|
|
11
|
-
TypeScript for typed behavior
|
|
10
|
+
Customers define an agent as ordinary files: markdown for prose,
|
|
11
|
+
TypeScript for typed behavior, under an `agent/` directory. The framework
|
|
12
12
|
discovers those files, compiles them into a manifest, and serves the agent
|
|
13
13
|
over channels, using the Cursor SDK (`@cursor/sdk`) and the Cursor harness
|
|
14
14
|
as the execution engine.
|
|
15
15
|
|
|
16
|
-
**User-facing documentation lives in [`docs/`](./docs/README.md)
|
|
17
|
-
|
|
16
|
+
**User-facing documentation lives in [`docs/`](./docs/README.md)**.
|
|
17
|
+
Open it with `npx @cursor/july docs`, or at `/docs` on every running
|
|
18
18
|
`agent-sdk serve` host. It covers getting started, concepts, guides (Slack,
|
|
19
19
|
GitHub webhooks, approvals, agent-to-agent, cloud runtime), evals, live
|
|
20
20
|
A/B metrics, hillclimbing, deployment, troubleshooting, and reference
|
|
@@ -68,15 +68,13 @@ Serve one project with `agent-sdk serve --dir ./my-agent --dev`, or point
|
|
|
68
68
|
`serve` at a folder of agent projects to mount every child under its
|
|
69
69
|
directory name.
|
|
70
70
|
|
|
71
|
-
## Node only
|
|
71
|
+
## Node only: do not run under Bun
|
|
72
72
|
|
|
73
|
-
Run the Agent SDK with **Node 22.13
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
loops (we measured an 8-minute review that takes ~1 minute under Node).
|
|
79
|
-
The `mise` tasks in this package already use tsx.
|
|
73
|
+
Run the Agent SDK with **Node 22.13+**. Use `agent-sdk` or
|
|
74
|
+
`npx @cursor/july`. Do not run it under Bun: Bun's HTTP/2 client
|
|
75
|
+
corrupts the Cursor SDK's local harness tool-result streams
|
|
76
|
+
(`NGHTTP2_FRAME_SIZE_ERROR`), so every built-in read/grep the model
|
|
77
|
+
makes fails and turns degrade into failed-read retry loops.
|
|
80
78
|
|
|
81
79
|
## Serving many agents at once
|
|
82
80
|
|
|
@@ -86,7 +84,7 @@ one port, each under its own slug (its directory name):
|
|
|
86
84
|
```bash
|
|
87
85
|
agent-sdk serve --dir ./agents --dev
|
|
88
86
|
# 2 agents listening
|
|
89
|
-
# playground
|
|
87
|
+
# playground <printed URL>
|
|
90
88
|
```
|
|
91
89
|
|
|
92
90
|
`serve` always uses multi-agent layout by default: agents are mounted under
|
|
@@ -116,7 +114,7 @@ segments.
|
|
|
116
114
|
|
|
117
115
|
Every mounted agent also serves the **Model Context Protocol** over
|
|
118
116
|
streamable HTTP at `/<slug>/v1/mcp` (or `/v1/mcp` in single mode), so other
|
|
119
|
-
agents
|
|
117
|
+
agents, and any MCP client, can delegate work to it. The surface is
|
|
120
118
|
stateless (session identity travels in tool arguments) and runs the same
|
|
121
119
|
route auth chain as the session API. Tools:
|
|
122
120
|
|
|
@@ -146,15 +144,15 @@ export default defineConnection({
|
|
|
146
144
|
```
|
|
147
145
|
|
|
148
146
|
The parent model then sees the peer's `ask` / `check` (/ `call_tool`) tools
|
|
149
|
-
under the `weather` server name
|
|
147
|
+
under the `weather` server name: subagent-style delegation where the peer
|
|
150
148
|
keeps its **own** instructions, tools, MCP connections, and sessions. Peer URLs
|
|
151
149
|
resolve when the server starts (so `run` / `eval` ephemeral ports work):
|
|
152
150
|
|
|
153
151
|
- **Local-runtime turns** (and host-side `ctx.host.mcp` / channel handlers)
|
|
154
|
-
call the peer over loopback
|
|
152
|
+
call the peer over loopback. That works under the default
|
|
155
153
|
`localDevStrict()` auth.
|
|
156
154
|
- **Cloud-runtime turns** execute on a cloud VM that cannot reach this
|
|
157
|
-
host's loopback address. Pass `--public-url https://
|
|
155
|
+
host's loopback address. Pass `--public-url https://agents.example.com`
|
|
158
156
|
(or `serve(dir, { publicUrl })`) so peers resolve to a reachable URL;
|
|
159
157
|
without it, peers are omitted from cloud turns (the server warns at
|
|
160
158
|
startup). With `--bearer-token`, the token is attached to peer calls
|
|
@@ -163,7 +161,7 @@ resolve when the server starts (so `run` / `eval` ephemeral ports work):
|
|
|
163
161
|
Unknown peer slugs and self-references fail at serve startup. Peers require
|
|
164
162
|
the multi-agent layout (each agent mounted under its slug). There is no
|
|
165
163
|
cross-host loop protection yet: if agent A's instructions delegate to B and
|
|
166
|
-
B's delegate back to A, they can recurse
|
|
164
|
+
B's delegate back to A, they can recurse. Scope each agent's delegation
|
|
167
165
|
instructions narrowly (the concierge above delegates *weather questions* to
|
|
168
166
|
`weather-agent`, not everything).
|
|
169
167
|
|
|
@@ -190,8 +188,8 @@ You are a concise assistant. Use tools when they are available.
|
|
|
190
188
|
import { defineAgent } from "@cursor/july";
|
|
191
189
|
|
|
192
190
|
export default defineAgent({
|
|
193
|
-
// optional
|
|
194
|
-
// runtime: "local", // default
|
|
191
|
+
// optional: defaults to grok-4.5 with effort=high and fast=true
|
|
192
|
+
// runtime: "local", // default: Cursor SDK local harness
|
|
195
193
|
// runtime: "cloud",
|
|
196
194
|
// cloud: {
|
|
197
195
|
// repos: [{ url: "https://github.com/org/repo", startingRef: "main" }],
|
|
@@ -200,7 +198,7 @@ export default defineAgent({
|
|
|
200
198
|
```
|
|
201
199
|
|
|
202
200
|
Serve it (turns run on the Cursor harness, so the host needs a Cursor
|
|
203
|
-
credential
|
|
201
|
+
credential: sign in once, or export an API key):
|
|
204
202
|
|
|
205
203
|
```bash
|
|
206
204
|
agent-sdk login # browser sign-in; mints + stores a revocable API key
|
|
@@ -245,7 +243,7 @@ agent-sdk validate --dir . # exit non-zero on error diagnostics
|
|
|
245
243
|
## Terminal client
|
|
246
244
|
|
|
247
245
|
`agent-sdk chat` talks to a running server over the same public API and
|
|
248
|
-
renders the reply live
|
|
246
|
+
renders the reply live: streamed text, tool calls, and a per-turn usage
|
|
249
247
|
footer. Pass `--json` for a compact trajectory (same shape as `run`).
|
|
250
248
|
|
|
251
249
|
```bash
|
|
@@ -326,7 +324,7 @@ import { defineEvalConfig } from "@cursor/july/evals";
|
|
|
326
324
|
|
|
327
325
|
export default defineEvalConfig({
|
|
328
326
|
maxConcurrency: 20,
|
|
329
|
-
// Optional
|
|
327
|
+
// Optional: playground /v1/dev/evals history window (default 20):
|
|
330
328
|
// maxPlaygroundRuns: 50,
|
|
331
329
|
});
|
|
332
330
|
```
|
|
@@ -349,61 +347,32 @@ evals, hillclimb, GitHub webhooks, Slack setup, debugging).
|
|
|
349
347
|
|
|
350
348
|
Every served agent ships with a built-in playground. The default multi-agent
|
|
351
349
|
mode serves it at `http://127.0.0.1:3000/<slug>/playground`.
|
|
352
|
-
`--mode single` uses `http://127.0.0.1:3000/playground`. The
|
|
353
|
-
|
|
350
|
+
`--mode single` uses `http://127.0.0.1:3000/playground`. The playground
|
|
351
|
+
uses the same public HTTP API for manual testing and demo recordings:
|
|
354
352
|
|
|
355
353
|
- chat with the agent and watch text/reasoning stream live, rendered as
|
|
356
354
|
markdown (headings, lists, tables, blockquotes, links) with syntax
|
|
357
355
|
highlighting for fenced code blocks (C-like languages, Python, shell,
|
|
358
356
|
and diffs),
|
|
359
357
|
- invoke custom channels as **slash commands** in the composer (e.g. a
|
|
360
|
-
`/drive https://github.com/org/repo/pull/1` channel route)
|
|
358
|
+
`/drive https://github.com/org/repo/pull/1` channel route). Routes from `GET /v1/info`,
|
|
361
359
|
with `/help` and autocomplete; same HTTP as the Agent surface **Try**
|
|
362
360
|
buttons,
|
|
363
361
|
- see tool calls inline (args, output, error state) as `actions.requested`
|
|
364
362
|
/ `action.result` events arrive,
|
|
365
|
-
- browse
|
|
366
|
-
and replay their
|
|
363
|
+
- browse the sessions you own (chat, custom-channel, and schedule
|
|
364
|
+
task sessions) and replay their event streams. In `--dev` on loopback,
|
|
365
|
+
or with `--allow-anonymous`, the list includes every principal,
|
|
367
366
|
- dispatch schedules by hand in dev mode,
|
|
368
367
|
- inspect the discovered agent surface (tools, skills, subagents, MCP
|
|
369
368
|
connections, channels, hooks),
|
|
370
369
|
- flip on the raw NDJSON pane to see the exact wire events.
|
|
371
370
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
`serve(dir, { playground: false })`. When serving many agents, each has its
|
|
378
|
-
own playground at `/<slug>/playground` and `/` is an index of them all (see
|
|
379
|
-
"Serving many agents at once").
|
|
380
|
-
|
|
381
|
-
### Developing the playground
|
|
382
|
-
|
|
383
|
-
`serve --dev` / `dev` also starts Vite HMR (default `:5273`) and prints that
|
|
384
|
-
URL as `playground`. Single-agent proxies `/v1` to the serve URL; multi-agent
|
|
385
|
-
serves the agents index at `/` and each SPA at `/<slug>/playground`:
|
|
386
|
-
|
|
387
|
-
```bash
|
|
388
|
-
# single agent — auto-build + HMR in one process
|
|
389
|
-
pnpm exec tsx src/bin/agent-serve.ts serve --dir ./my-agent --dev
|
|
390
|
-
|
|
391
|
-
# monorepo dev: multi-agent HMR
|
|
392
|
-
mise //packages/agent-serve:start
|
|
393
|
-
# → backend :3000, playground HMR :5273 (open /, then /<slug>/playground)
|
|
394
|
-
|
|
395
|
-
# pin one slug at the HMR root, or UI-only against an already-running serve
|
|
396
|
-
AGENT_SERVE_BASE=/my-agent mise //packages/agent-serve:start
|
|
397
|
-
AGENT_SERVE_MULTI=1 mise //packages/agent-serve:dev-playground
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
The Vite dev server proxies API calls to the backend (`AGENT_SERVE_TARGET`,
|
|
401
|
-
default `http://127.0.0.1:3000`). Multi-agent HMR proxies `/<slug>/v1/*` as-is
|
|
402
|
-
and serves each SPA at `/<slug>/playground`; a single-slug pin uses
|
|
403
|
-
`AGENT_SERVE_BASE=/<slug>` at the HMR root. Editing anything under
|
|
404
|
-
`playground/src` hot-reloads in the browser. The playground source lives in
|
|
405
|
-
`playground/` (entry `playground/src/main.tsx`); markdown rendering and the
|
|
406
|
-
trace model are plain modules under `playground/src/lib` with unit tests.
|
|
371
|
+
`agent-sdk serve` serves the playground bundle. Disable it with
|
|
372
|
+
`--no-playground` (CLI) or `serve(dir, { playground: false })`. When
|
|
373
|
+
serving many agents, each has its own playground at `/<slug>/playground`
|
|
374
|
+
and `/` is an index of them all (see "Serving many agents at once").
|
|
375
|
+
`serve --dev` prints a playground URL; open that URL if the UI looks stale.
|
|
407
376
|
|
|
408
377
|
To share the server beyond localhost (a tunnel, a LAN address, a phone),
|
|
409
378
|
pass `--bearer-token <secret>` (or `serve(dir, { authToken })`). That
|
|
@@ -418,32 +387,19 @@ token into the top-right field.
|
|
|
418
387
|
|
|
419
388
|
Session follow-up, stream, and list routes also bind to the principal that
|
|
420
389
|
created the session (`403` when a different admitted principal addresses
|
|
421
|
-
someone else's handle).
|
|
422
|
-
segment before they touch `<stateRoot>/sessions`.
|
|
390
|
+
someone else's handle).
|
|
423
391
|
|
|
424
392
|
## How it runs on the Cursor harness
|
|
425
393
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
the
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
| `tools/*.ts` (`execution: "server"`, default) | Local: in-process SDK custom tools. Cloud: authenticated HTTP MCP callbacks to the AgentSDK host. |
|
|
436
|
-
| `tools/*.ts` (`execution: "agent"`) | Local: scripts under `.agent-serve/tools/` + catalog in `AGENTS.md`. Cloud: catalog + script bodies on the first prompt. |
|
|
437
|
-
| `skills/*` | Local: `.cursor/skills/<name>/SKILL.md` in the workspace. Cloud: native discovery from the Agent Store (`skills/` when hosted; `agent-serve/<agent>/skills/` on the USER store for local serve/run). |
|
|
438
|
-
| `mcp-connections/*.ts` | Always three places: Cursor agent via SDK `mcpServers` (local + cloud), host-side `ctx.host.mcp` for in-process tools, and `args.host.mcp` on channel/schedule handlers. |
|
|
439
|
-
| `subagents/<id>/` | SDK custom subagents (the model delegates via the harness `task` tool) |
|
|
440
|
-
| `sandbox/workspace/**` | Local session workspace seed on first turn; ignored for cloud runtime. |
|
|
441
|
-
| `channels/`, `schedules/`, `hooks/` | Served by this framework around the harness |
|
|
442
|
-
|
|
443
|
-
Conversation state for local agents persists through the SDK's local store
|
|
444
|
-
under `.agent-serve/runner/`, and every session's event stream is recorded
|
|
445
|
-
to `.agent-serve/sessions/<id>/events.ndjson` — sessions survive server
|
|
446
|
-
restarts, and streams replay from any `startIndex`.
|
|
394
|
+
Each session is one Cursor SDK agent. Local turns run on this host.
|
|
395
|
+
Cloud turns run on a Cursor cloud agent. The session stream records
|
|
396
|
+
`agent.bound` with the cloud conversation URL.
|
|
397
|
+
|
|
398
|
+
Authored files reach the model as instructions, tools, skills, and
|
|
399
|
+
workspace seed files. The mapping differs by runtime; see
|
|
400
|
+
[Cloud runtime](./docs/guides/cloud-runtime.md). Sessions and their
|
|
401
|
+
event streams survive server restarts. Reconnect with `?startIndex=` to
|
|
402
|
+
replay.
|
|
447
403
|
|
|
448
404
|
## Folder structure
|
|
449
405
|
|
|
@@ -460,7 +416,7 @@ export default defineAgent({
|
|
|
460
416
|
{ id: "fast", value: "true" },
|
|
461
417
|
],
|
|
462
418
|
}, // optional; this is the default
|
|
463
|
-
runtime: "local", // default
|
|
419
|
+
runtime: "local", // default: or "cloud"
|
|
464
420
|
// cloud: {
|
|
465
421
|
// repos: [{ url: "https://github.com/org/repo", startingRef: "main" }],
|
|
466
422
|
// env: { type: "cloud" },
|
|
@@ -476,7 +432,7 @@ and `fast=true`.
|
|
|
476
432
|
|
|
477
433
|
| Value | Behavior |
|
|
478
434
|
| --------- | ------- |
|
|
479
|
-
| `"local"` | Cursor SDK local harness on this machine.
|
|
435
|
+
| `"local"` | Cursor SDK local harness on this machine. Authored tools, skills, and sandbox seeds apply. |
|
|
480
436
|
| `"cloud"` | Cursor cloud agents. Pass a `cloud` block with the repositories and environment the agent needs. Server tools work on managed hosting. Self-hosted cloud turns need `--public-url`. |
|
|
481
437
|
|
|
482
438
|
Discovery warns when cloud turns ignore a local-only capability. Authored
|
|
@@ -527,7 +483,7 @@ stream emits `action.approval_requested` / `action.approval_resolved`.
|
|
|
527
483
|
- Playground Approve / Deny buttons
|
|
528
484
|
- HTTP: `POST /v1/session/:sessionId/approvals/:callId` with
|
|
529
485
|
`{"decision":"approve"|"deny"}`
|
|
530
|
-
- **Slack** (opt-in channel surface)
|
|
486
|
+
- **Slack** (opt-in channel surface): set `toolApprovals: true` on
|
|
531
487
|
`slackChannel`, and enable `interactivity` in the Slack app
|
|
532
488
|
manifest:
|
|
533
489
|
|
|
@@ -567,7 +523,7 @@ does **not** open cross-owner approval for HTTP sessions. Production and
|
|
|
567
523
|
bearer-auth hosts stay strict: Slack resolve must come from Slack interactivity
|
|
568
524
|
(or a matching principal).
|
|
569
525
|
|
|
570
|
-
`--allow-anonymous` is for trusted-network demos only
|
|
526
|
+
`--allow-anonymous` is for trusted-network demos only. Every HTTP caller shares
|
|
571
527
|
the same `anonymous` principal. Prefer `--bearer-token` when the host is shared.
|
|
572
528
|
|
|
573
529
|
Slack cards show **redacted / truncated** args for Block Kit limits; execution
|
|
@@ -592,9 +548,9 @@ export default defineTool({
|
|
|
592
548
|
|
|
593
549
|
Approvals are only supported for `execution: "server"` tools on the
|
|
594
550
|
`local` runtime. Exact resume of a parked SDK tool call does **not**
|
|
595
|
-
survive host process restart
|
|
551
|
+
survive host process restart. Pending approvals left after a crash are
|
|
596
552
|
treated as interrupted.
|
|
597
|
-
Agent tool (runs where the Cursor agent runs
|
|
553
|
+
Agent tool (runs where the Cursor agent runs: local harness or cloud VM):
|
|
598
554
|
|
|
599
555
|
```ts
|
|
600
556
|
import { defineTool } from "@cursor/july/tools";
|
|
@@ -621,7 +577,7 @@ it explicitly next to `content` and `isError`. For server tools, `ctx` carries
|
|
|
621
577
|
|
|
622
578
|
#### Deterministic tool calls
|
|
623
579
|
|
|
624
|
-
Server tools can also be called **deterministically
|
|
580
|
+
Server tools can also be called **deterministically**. You pick the tool
|
|
625
581
|
and the input, no model turn decides anything. The input is validated
|
|
626
582
|
against the tool's schema and `execute` runs in-process; the result comes
|
|
627
583
|
back exactly as the model would receive it. No Cursor API key is needed.
|
|
@@ -646,7 +602,7 @@ agent-sdk call get_weather --url http://127.0.0.1:3000/<slug> --input '{"city":"
|
|
|
646
602
|
|
|
647
603
|
Programmatically, `callTool(toolName, input, options?)` is available on the
|
|
648
604
|
serve handle, on channel route handlers and `onStart` args, and on schedule
|
|
649
|
-
`run` handlers
|
|
605
|
+
`run` handlers, so a channel can mix deterministic tool calls with model
|
|
650
606
|
turns (e.g. fetch PR metadata deterministically, then `send()` the review
|
|
651
607
|
prompt):
|
|
652
608
|
|
|
@@ -655,17 +611,17 @@ const outcome = await handle.callTool("get_weather", { city: "NYC" });
|
|
|
655
611
|
// { toolName, callId, isError, result, durationMs }
|
|
656
612
|
```
|
|
657
613
|
|
|
658
|
-
By default the tool runs against an
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
614
|
+
By default the tool runs against an ephemeral scratch workspace,
|
|
615
|
+
materialized like a session workspace (AGENTS.md, skills, seed files)
|
|
616
|
+
and removed once the call returns. Pass `sessionId` (body field over
|
|
617
|
+
HTTP, `--session` on the CLI, `options.sessionId` programmatically) to
|
|
618
|
+
run it inside an existing session instead: the tool sees that session's
|
|
619
|
+
info and materialized workspace, and the call is recorded on the
|
|
620
|
+
session's event stream as `actions.requested` / `action.result` under a
|
|
621
|
+
per-call `turnId`. That call is visible in the playground, NDJSON
|
|
622
|
+
trace, and trajectories like any model-initiated call. Session-bound
|
|
623
|
+
calls are serialized with model turns: while a turn is running the call
|
|
624
|
+
is rejected with `409 session_busy`.
|
|
669
625
|
|
|
670
626
|
Unknown tools are rejected with the available tool names, `execution:
|
|
671
627
|
"agent"` tools cannot be called on the host (400), schema-invalid input is a
|
|
@@ -678,7 +634,7 @@ that throws is reported as `isError: true` with the same
|
|
|
678
634
|
|
|
679
635
|
Skills follow the `SKILL.md` convention: model-loadable procedures the
|
|
680
636
|
harness advertises by description and loads on demand. Author them as flat
|
|
681
|
-
markdown (`skills/forecast.md`, optional `description` frontmatter
|
|
637
|
+
markdown (`skills/forecast.md`, optional `description` frontmatter. The
|
|
682
638
|
first body line is the fallback), packaged directories
|
|
683
639
|
(`skills/research/SKILL.md` plus `references/…`, which require `description`
|
|
684
640
|
frontmatter), or TypeScript (`defineSkill` from
|
|
@@ -755,7 +711,7 @@ Every MCP connection is always available in three places:
|
|
|
755
711
|
|
|
756
712
|
1. the Cursor agent (local or cloud), via SDK `mcpServers`
|
|
757
713
|
2. the serve host, for in-process tools via `ctx.host.mcp`
|
|
758
|
-
3. channel / schedule handlers, via `args.host.mcp` (deterministic
|
|
714
|
+
3. channel / schedule handlers, via `args.host.mcp` (deterministic; no agent loop)
|
|
759
715
|
|
|
760
716
|
```ts
|
|
761
717
|
export default defineTool({
|
|
@@ -768,7 +724,7 @@ export default defineTool({
|
|
|
768
724
|
```
|
|
769
725
|
|
|
770
726
|
```ts
|
|
771
|
-
// agent/channels/webhook.ts
|
|
727
|
+
// agent/channels/webhook.ts: call MCP directly from a webhook
|
|
772
728
|
POST("/sync", {
|
|
773
729
|
bodySchema: z.object({}),
|
|
774
730
|
handler: async (_req, { host }) => {
|
|
@@ -784,8 +740,8 @@ POST("/sync", {
|
|
|
784
740
|
### Subagents (`agent/subagents/<id>/`)
|
|
785
741
|
|
|
786
742
|
A subagent is its own directory with the same `agent.ts` +
|
|
787
|
-
`instructions.md` shape. `description` is required
|
|
788
|
-
it to decide when to delegate
|
|
743
|
+
`instructions.md` shape. `description` is required. The parent model reads
|
|
744
|
+
it to decide when to delegate, and `model` is optional (`inherit` by
|
|
789
745
|
default). On the Cursor harness, subagents run as SDK custom subagents:
|
|
790
746
|
they inherit the parent's execution surface, so per-subagent `tools/`,
|
|
791
747
|
`skills/`, and `mcp-connections/` are reported as warnings and ignored for now.
|
|
@@ -795,22 +751,22 @@ they inherit the parent's execution surface, so per-subagent `tools/`,
|
|
|
795
751
|
The **built-in HTTP channel** is always mounted (under `/<slug>` in the
|
|
796
752
|
default multi-agent layout; at the server root with `mode: "single"`):
|
|
797
753
|
|
|
798
|
-
- `POST /v1/session
|
|
754
|
+
- `POST /v1/session`: start a session (`{"message": "..."}`; returns
|
|
799
755
|
`sessionId` + `continuationToken`)
|
|
800
|
-
- `POST /v1/session/:sessionId
|
|
756
|
+
- `POST /v1/session/:sessionId`: follow-up (`{"message", "continuationToken"}`;
|
|
801
757
|
rotates the token; works for any chat session including custom channels like
|
|
802
758
|
`drive`; `409` on stale tokens or task sessions;
|
|
803
759
|
`403` if the caller is not the session owner)
|
|
804
|
-
- `GET /v1/session/:sessionId/stream?startIndex=N
|
|
760
|
+
- `GET /v1/session/:sessionId/stream?startIndex=N`: replay + live NDJSON
|
|
805
761
|
(same owner check)
|
|
806
|
-
- `GET /v1/session/:sessionId/approvals
|
|
762
|
+
- `GET /v1/session/:sessionId/approvals`: pending human-in-the-loop
|
|
807
763
|
tool approvals for the session
|
|
808
|
-
- `POST /v1/session/:sessionId/approvals/:callId
|
|
764
|
+
- `POST /v1/session/:sessionId/approvals/:callId`: approve or deny
|
|
809
765
|
(`{"decision":"approve"|"deny"}`)
|
|
810
|
-
- `GET /v1/sessions
|
|
811
|
-
- `POST /v1/tools/:toolName
|
|
766
|
+
- `GET /v1/sessions`: sessions owned by the calling principal
|
|
767
|
+
- `POST /v1/tools/:toolName`: call a server tool deterministically
|
|
812
768
|
(`{"input": {...}, "sessionId"?}`; see "Deterministic tool calls")
|
|
813
|
-
- `GET /v1/health`, `GET /v1/info
|
|
769
|
+
- `GET /v1/health`, `GET /v1/info`: liveness and the manifest snapshot
|
|
814
770
|
Author `agent/channels/http.ts` only to override its defaults:
|
|
815
771
|
|
|
816
772
|
```ts
|
|
@@ -862,7 +818,7 @@ export default defineChannel({
|
|
|
862
818
|
```
|
|
863
819
|
|
|
864
820
|
`GET` requires a Zod `querySchema` and `POST` / `PUT` / `PATCH` require a
|
|
865
|
-
Zod `bodySchema` at compile time
|
|
821
|
+
Zod `bodySchema` at compile time. Plain JSON Schema objects will not
|
|
866
822
|
type-check. Use `z.object({})` or `z.unknown()` when the surface is
|
|
867
823
|
intentionally open. Schemas are validated by the host before the handler
|
|
868
824
|
runs (handlers get typed `args.body` / `args.query`) and projected on
|
|
@@ -871,15 +827,16 @@ so the composer can offer matching **slash commands** (e.g. `/drive`).
|
|
|
871
827
|
|
|
872
828
|
Route handlers receive a Fetch `Request` and helpers: `send`, `getSession`,
|
|
873
829
|
`receive` (cross-channel hand-off), `params`, `requestIp`, `auth`, `host`
|
|
874
|
-
(shared host services
|
|
830
|
+
(shared host services: MCP / GitHub / Slack; same as tool `ctx.host`), and
|
|
875
831
|
`waitUntil`. Channel `state` declares initial per-session adapter state,
|
|
876
832
|
persisted across events; handlers receive it on `channel.state`.
|
|
877
833
|
|
|
878
|
-
**Auth**:
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
834
|
+
**Auth**: channel routes and the session API run an auth-policy chain
|
|
835
|
+
(`auth` on the channel). The host index, docs, and health routes run no
|
|
836
|
+
auth. The default policy is `[localDevStrict()]`: direct loopback
|
|
837
|
+
callers only, with proxy-forwarding headers and non-loopback `Host`
|
|
838
|
+
rejected, so nothing is exposed publicly until you add real auth
|
|
839
|
+
(`bearerAuth(...)`, a custom policy, or the explicit `allowAll()`).
|
|
883
840
|
|
|
884
841
|
**Slack** (`@cursor/july/channels/slack`): a platform channel pack
|
|
885
842
|
that defaults to **Socket Mode**. Author `agent/channels/slack.ts` with
|
|
@@ -888,16 +845,12 @@ that defaults to **Socket Mode**. Author `agent/channels/slack.ts` with
|
|
|
888
845
|
```ts
|
|
889
846
|
import { slackChannel } from "@cursor/july/channels/slack";
|
|
890
847
|
|
|
891
|
-
// Single agent
|
|
848
|
+
// Single agent: SLACK_BOT_TOKEN + SLACK_APP_TOKEN
|
|
892
849
|
export default slackChannel();
|
|
893
850
|
|
|
894
|
-
// Multi-agent serve
|
|
851
|
+
// Multi-agent serve: one Slack app (and token pair) per agent
|
|
895
852
|
export default slackChannel({ envPrefix: "WEATHER_AGENT" });
|
|
896
853
|
// → WEATHER_AGENT_SLACK_BOT_TOKEN + WEATHER_AGENT_SLACK_APP_TOKEN
|
|
897
|
-
|
|
898
|
-
// Cursor account connection — no dedicated Slack app. `@Cursor Weatherbot …`
|
|
899
|
-
// routes here; replies post as "Weatherbot" through the Cursor Slack app.
|
|
900
|
-
export default slackChannel({ cursorAccount: true, agentName: "Weatherbot" });
|
|
901
854
|
```
|
|
902
855
|
|
|
903
856
|
Transport uses `@slack/socket-mode` + `@slack/web-api`. Socket Mode starts
|
|
@@ -912,7 +865,7 @@ return a prepared `message` / `workspaceFiles` / `cloud` to host-prepare PR
|
|
|
912
865
|
reviews or attach
|
|
913
866
|
cloud repos from an `@mention`.
|
|
914
867
|
|
|
915
|
-
**Engagement:** by default the agent is summoned, never proactive
|
|
868
|
+
**Engagement:** by default the agent is summoned, never proactive. It
|
|
916
869
|
dispatches only on `app_mention` and DMs. Channel watch is an explicit opt-in:
|
|
917
870
|
|
|
918
871
|
```ts
|
|
@@ -953,28 +906,10 @@ Approve/Deny cards and routes Socket Mode `interactive` clicks to
|
|
|
953
906
|
**separate Slack apps**. Requires `SLACK_BOT_TOKEN` + `SLACK_APP_TOKEN`
|
|
954
907
|
(App-Level Token with `connections:write`).
|
|
955
908
|
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
for chat. Agents that need channel watch or tool approvals keep a Socket
|
|
961
|
-
Mode app in a second channel file (e.g. `slack-app.ts`) with their own env
|
|
962
|
-
prefix (`<PREFIX>_SLACK_BOT_TOKEN` + `<PREFIX>_SLACK_APP_TOKEN`, derived
|
|
963
|
-
from the directory name by `slack create`).
|
|
964
|
-
|
|
965
|
-
| Agent | `@Cursor` name | Optional Socket Mode app |
|
|
966
|
-
| --- | --- | --- |
|
|
967
|
-
| `weather-agent` | Weather | `slack-app.ts` (`WEATHER_AGENT_SLACK_*`, tool approvals) |
|
|
968
|
-
| `slack-agent` | SlackAgent | — |
|
|
969
|
-
| `bugbot` | Bugbot | — |
|
|
970
|
-
| `fsd` | FSD | — |
|
|
971
|
-
| `benny` | Benny | `slack-app.ts` (`BENNY_SLACK_*`, channel watch) |
|
|
972
|
-
| `approval-buddy` | ApprovalBuddy | — |
|
|
973
|
-
|
|
974
|
-
PR-oriented demos (`bugbot`, `fsd`) extract a GitHub PR URL / `owner/repo#N`
|
|
975
|
-
from the mention and run the same host path as their HTTP channels.
|
|
976
|
-
`security-reviewer` is GitHub-task-only (no Slack channel); `concierge` is
|
|
977
|
-
agent-to-agent only (no Slack channel).
|
|
909
|
+
`agent-sdk slack create` mints one dedicated bot and writes
|
|
910
|
+
`<DIR>_SLACK_*` plus `envPrefix` from the directory name. Keep the
|
|
911
|
+
channel file as `slack-app.ts` when the same app should carry tool
|
|
912
|
+
approvals or channel watch.
|
|
978
913
|
|
|
979
914
|
For Socket Mode apps (channel watch / approvals), run
|
|
980
915
|
`agent-sdk slack create`. It opens the dashboard wizard, creates and
|
|
@@ -1014,7 +949,7 @@ export default githubChannel({
|
|
|
1014
949
|
|
|
1015
950
|
Mounts at `POST /<slug>/v1/channels/github`. When a webhook secret is set the
|
|
1016
951
|
channel verifies `X-Hub-Signature-256` before parsing (the HMAC becomes the
|
|
1017
|
-
request auth); without one it stays loopback-only (`localDevStrict()`)
|
|
952
|
+
request auth); without one it stays loopback-only (`localDevStrict()`), except
|
|
1018
953
|
under `serve --dev`, which admits unsigned loopback deliveries so
|
|
1019
954
|
`gh webhook forward` and fixtures work with zero config. Hooks return
|
|
1020
955
|
`{ auth }` to start a model turn as the actor, `{ task }` for host-side work
|
|
@@ -1032,7 +967,7 @@ auth prefers GitHub App installation tokens when `GITHUB_APP_ID` /
|
|
|
1032
967
|
`GITHUB_TOKEN` / `GH_TOKEN` or `gh auth login`. The channel publishes the
|
|
1033
968
|
webhook events it dispatches on (derived from the declared hooks, or pinned
|
|
1034
969
|
via `webhookEvents`), so `agent-sdk github …` can forward live
|
|
1035
|
-
deliveries with zero hand-listing
|
|
970
|
+
deliveries with zero hand-listing. It wraps [`gh webhook
|
|
1036
971
|
forward`](https://docs.github.com/en/webhooks/testing-and-troubleshooting-webhooks/using-the-github-cli-to-forward-webhooks-for-testing):
|
|
1037
972
|
|
|
1038
973
|
```bash
|
|
@@ -1057,12 +992,12 @@ agent-sdk github forward --dir ./agents
|
|
|
1057
992
|
When several channels match (e.g. a folder of agent projects with more than
|
|
1058
993
|
one github channel), one forwarder fans out to all of them: `gh webhook
|
|
1059
994
|
forward` runs against a local proxy that re-posts each raw (still-signed)
|
|
1060
|
-
delivery to the channels whose event set matches. This is required
|
|
995
|
+
delivery to the channels whose event set matches. This is required. GitHub
|
|
1061
996
|
allows only one forwarder per repo, and `gh webhook forward` targets a single
|
|
1062
997
|
URL, so N processes would collide with `Hook already exists`.
|
|
1063
998
|
|
|
1064
|
-
`gh webhook forward` needs **admin** on the repo (or org owner for `--org`)
|
|
1065
|
-
|
|
999
|
+
`gh webhook forward` needs **admin** on the repo (or org owner for `--org`).
|
|
1000
|
+
It registers a real webhook, and authenticates its relay with the GitHub CLI's
|
|
1066
1001
|
own login. If `GITHUB_TOKEN` / `GH_TOKEN` is set in your env, deliveries fail
|
|
1067
1002
|
with **HTTP 401** (the relay rejects env tokens); blank it for the command
|
|
1068
1003
|
(`GITHUB_TOKEN= GH_TOKEN= agent-sdk github forward …`) or `unset` it.
|
|
@@ -1074,12 +1009,12 @@ tunnel), and `--slug` / `--channel` to forward to just one of several agents.
|
|
|
1074
1009
|
Against a `--dev` server no secret is needed; set `GITHUB_WEBHOOK_SECRET` (or
|
|
1075
1010
|
`--secret`) to exercise signature verification (required for a non-dev target).
|
|
1076
1011
|
Only one forwarder per repo/org at a time (a GitHub limitation). Fixture replay
|
|
1077
|
-
still works too
|
|
1012
|
+
still works too: `POST` a saved payload with an `x-github-event` header (no
|
|
1078
1013
|
signature needed in `--dev`).
|
|
1079
1014
|
|
|
1080
1015
|
**No admin? Hillclimbing? Use `github replay`.** `gh webhook forward` needs repo
|
|
1081
1016
|
admin and a live event. `agent-sdk github replay <pr_url>` instead **reads**
|
|
1082
|
-
the PR (pull access is enough
|
|
1017
|
+
the PR (pull access is enough: no admin, no relay, and `GITHUB_TOKEN` is fine)
|
|
1083
1018
|
and synthesizes GitHub-shaped payloads it POSTs straight at the channel:
|
|
1084
1019
|
|
|
1085
1020
|
```bash
|
|
@@ -1097,7 +1032,7 @@ agent-sdk github replay owner/repo#123 --dir ./my-agent --events '*' --dry-run -
|
|
|
1097
1032
|
`--action` / `--conclusion` / `--comment` / `--context` tune each synthesized
|
|
1098
1033
|
event; `--secret` (or `GITHUB_WEBHOOK_SECRET`) signs them so a secret-configured
|
|
1099
1034
|
channel verifies. Because replay sends a clean, signed loopback request, it
|
|
1100
|
-
passes both the `localDevStrict()` and `allowAll()`+signature auth modes
|
|
1035
|
+
passes both the `localDevStrict()` and `allowAll()`+signature auth modes, and
|
|
1101
1036
|
it's fully deterministic, which is what hillclimbing wants.
|
|
1102
1037
|
|
|
1103
1038
|
**Production alternative: pull from Cursor (`--cursor-events`).** If the
|
|
@@ -1110,7 +1045,7 @@ Serve fails fast rather than starting with a relay that can never receive
|
|
|
1110
1045
|
events.
|
|
1111
1046
|
|
|
1112
1047
|
### Hooks (`agent/hooks/*.ts`)
|
|
1113
|
-
Observe-only subscribers that run after each event is recorded
|
|
1048
|
+
Observe-only subscribers that run after each event is recorded: audit
|
|
1114
1049
|
logs, metrics, mirroring transcripts into your own store. Keys are event
|
|
1115
1050
|
types (or `*`); handler errors are logged, never fatal.
|
|
1116
1051
|
|
|
@@ -1148,7 +1083,7 @@ export default defineSchedule({
|
|
|
1148
1083
|
|
|
1149
1084
|
Cron expressions are standard 5-field, evaluated in UTC with minute
|
|
1150
1085
|
granularity. In production mode (`agent-sdk serve`) schedules fire on
|
|
1151
|
-
cadence; in dev mode (`--dev`) they never fire automatically
|
|
1086
|
+
cadence; in dev mode (`--dev`) they never fire automatically. Dispatch one
|
|
1152
1087
|
by hand, exactly once, through the same path production uses:
|
|
1153
1088
|
|
|
1154
1089
|
```bash
|
|
@@ -1179,19 +1114,18 @@ await handle.createReminder({
|
|
|
1179
1114
|
```
|
|
1180
1115
|
|
|
1181
1116
|
Host/policy packs may pass `run` (return `stop` / `skip` / `delivered`)
|
|
1182
|
-
instead of prompts.
|
|
1183
|
-
`handle.dispatchReminder
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
re-arm from enroll/policy.
|
|
1117
|
+
instead of prompts. `--dev` does not auto-fire reminders. Dispatch one
|
|
1118
|
+
with `POST /v1/dev/reminders/:id` or `handle.dispatchReminder`. Run
|
|
1119
|
+
handlers are in-memory. After a restart those reminders are disarmed
|
|
1120
|
+
(`handler_lost_on_restart`); re-arm from enroll/policy.
|
|
1187
1121
|
|
|
1188
|
-
The NDJSON stream vocabulary
|
|
1122
|
+
The NDJSON stream vocabulary: one JSON object per line, each carrying
|
|
1189
1123
|
`{ type, index, sessionId, turnId?, at, data }`:
|
|
1190
1124
|
|
|
1191
1125
|
| Event | Meaning |
|
|
1192
1126
|
| --------------------- | -------------------------------------------------------------- |
|
|
1193
1127
|
| `session.started` | A durable session was created. |
|
|
1194
|
-
| `agent.bound` |
|
|
1128
|
+
| `agent.bound` | Cloud conversation URL. |
|
|
1195
1129
|
| `ab.assigned` | Sticky A/B enrollment (`experiment`, `variant` or `null` skip). |
|
|
1196
1130
|
| `message.received` | An inbound user message was accepted. |
|
|
1197
1131
|
| `turn.started` | A turn began. |
|
|
@@ -1219,7 +1153,7 @@ import { serve } from "@cursor/july";
|
|
|
1219
1153
|
|
|
1220
1154
|
const handle = await serve("./my-agent", {
|
|
1221
1155
|
port: 3000,
|
|
1222
|
-
apiKey: process.env.CURSOR_API_KEY, // optional
|
|
1156
|
+
apiKey: process.env.CURSOR_API_KEY, // optional: see credential order below
|
|
1223
1157
|
});
|
|
1224
1158
|
console.log(`listening on ${handle.url}`);
|
|
1225
1159
|
// handle.dispatchSchedule("heartbeat"), handle.project, await handle.close()
|
|
@@ -1233,22 +1167,21 @@ Cursor dashboard to kill it outright).
|
|
|
1233
1167
|
|
|
1234
1168
|
Local-dev note: login/account RPCs honor `CURSOR_API_BASE_URL` while the
|
|
1235
1169
|
Cursor SDK harness honors `CURSOR_BACKEND_URL`. When pointing at a
|
|
1236
|
-
non-production backend, set **both** to the same URL
|
|
1170
|
+
non-production backend, set **both** to the same URL. A key minted on one
|
|
1237
1171
|
backend is rejected by the other.
|
|
1238
1172
|
|
|
1239
1173
|
`serve` refuses to start when discovery produced error diagnostics; run
|
|
1240
1174
|
`agent-sdk validate` (or read `project.diagnostics`) to see why.
|
|
1241
1175
|
|
|
1242
|
-
State lives under
|
|
1243
|
-
`--state-root`)
|
|
1244
|
-
|
|
1245
|
-
to forget that conversation.
|
|
1176
|
+
State lives under the project state directory (override with
|
|
1177
|
+
`--state-root`). Forget a conversation by removing that session from
|
|
1178
|
+
state.
|
|
1246
1179
|
|
|
1247
|
-
Session workspaces are real Cursor project directories, so the harness
|
|
1248
|
-
loads ambient project config from ancestor directories
|
|
1249
|
-
`
|
|
1250
|
-
|
|
1251
|
-
|
|
1180
|
+
Session workspaces are real Cursor project directories, so the harness
|
|
1181
|
+
also loads ambient project config from ancestor directories. Nested git
|
|
1182
|
+
checkouts default `local.cwd` to a per-project cache directory under
|
|
1183
|
+
`~/.cache`. Point `cwd` at a checkout only when the agent should inherit
|
|
1184
|
+
that tree.
|
|
1252
1185
|
|
|
1253
1186
|
## Not supported (yet)
|
|
1254
1187
|
|