@cursor/july 0.1.105 → 0.1.108
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/README.md +10 -5
- package/dist/bin/agent-serve.js +31 -16
- package/dist/channels/bitbucket/types.d.ts +2 -4
- package/dist/channels/bitbucket/types.d.ts.map +1 -1
- package/dist/channels/deployments/types.d.ts +5 -8
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +8 -5
- package/dist/channels/github/types.d.ts +7 -5
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/gitlab/types.d.ts +2 -5
- package/dist/channels/gitlab/types.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +27 -13
- package/dist/channels/origin/types.d.ts +7 -4
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +3 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +1 -1
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +48 -11
- package/dist/channels/slack/types.d.ts +4 -3
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/channels.d.ts +45 -0
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +106 -7
- package/dist/connections.d.ts +2 -1
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +2 -1
- package/dist/docs/404.html +3 -3
- package/dist/docs/ab.html +6 -6
- package/dist/docs/assets/{app.BVwaffdK.js → app.BASKM3M4.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.BHZYsNVi.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.WuWTZ1x8.js → VPLocalSearchBox.BOKxlYGP.js} +2 -2
- package/dist/docs/assets/chunks/{theme.BYdI_6sF.js → theme.DbDZW-zb.js} +2 -2
- package/dist/docs/assets/{deployment.md.MFPKqsqI.js → deployment.md.JenwuCCB.js} +4 -4
- package/dist/docs/assets/{deployment.md.MFPKqsqI.lean.js → deployment.md.JenwuCCB.lean.js} +1 -1
- package/dist/docs/assets/{evals.md.CbMoebP1.js → evals.md.C1ekS3k2.js} +1 -1
- package/dist/docs/assets/guides_cloud-agents.md.BsloyHdY.js +9 -0
- package/dist/docs/assets/{guides_cloud-agents.md.DS8RIjwx.lean.js → guides_cloud-agents.md.BsloyHdY.lean.js} +1 -1
- package/dist/docs/assets/{guides_github.md.c0gdGJ-D.js → guides_github.md.BH33UEBJ.js} +1 -1
- package/dist/docs/assets/{guides_grokbot-agents.md.DVqdhBKb.js → guides_grokbot-agents.md.DyV-WArv.js} +1 -1
- package/dist/docs/assets/guides_improve.md.BGVk32bK.js +14 -0
- package/dist/docs/assets/guides_improve.md.BGVk32bK.lean.js +1 -0
- package/dist/docs/assets/{guides_opentelemetry.md.COh9jFVg.js → guides_opentelemetry.md.SCRMskno.js} +3 -3
- package/dist/docs/assets/{guides_opentelemetry.md.COh9jFVg.lean.js → guides_opentelemetry.md.SCRMskno.lean.js} +1 -1
- package/dist/docs/assets/{guides_slack.md.9oHPye9o.js → guides_slack.md.D4RVMM4G.js} +3 -3
- package/dist/docs/assets/{guides_slack.md.9oHPye9o.lean.js → guides_slack.md.D4RVMM4G.lean.js} +1 -1
- package/dist/docs/assets/index.md.BjH1w2ZW.js +5 -0
- package/dist/docs/assets/{reference_agent-config.md.CHNpiyp4.js → reference_agent-config.md.CvoL6pof.js} +1 -1
- package/dist/docs/assets/{reference_channels.md.DBGcaB7m.js → reference_channels.md.D-qTqwcq.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.DBGcaB7m.lean.js → reference_channels.md.D-qTqwcq.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.C6Lo8SEd.js → reference_cli.md.Ca26u0Es.js} +6 -6
- package/dist/docs/assets/{reference_cli.md.C6Lo8SEd.lean.js → reference_cli.md.Ca26u0Es.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.Di6jJAXF.js → reference_connections.md.BojkC6c5.js} +1 -1
- package/dist/docs/assets/{reference_extensions.md.CGmMLblt.js → reference_extensions.md.CPWt00ds.js} +1 -1
- package/dist/docs/assets/{scaffolding-agents.md.em43xlY1.js → scaffolding-agents.md.Kctn3OVb.js} +1 -1
- package/dist/docs/assets/{skills_create-agent.md.BVoWPcan.js → skills_create-agent.md.Q3h6Je-e.js} +1 -1
- package/dist/docs/assets/{skills_debug.md.CDbPhHfg.js → skills_debug.md.CVjCXMFF.js} +1 -1
- package/dist/docs/assets/{skills_debug.md.CDbPhHfg.lean.js → skills_debug.md.CVjCXMFF.lean.js} +1 -1
- package/dist/docs/assets/{skills_evals.md.723kpUmA.js → skills_evals.md.BhovOvrl.js} +1 -1
- package/dist/docs/assets/skills_framework-map.md.D-tFZhFS.js +1 -0
- package/dist/docs/assets/{skills_framework-map.md.haibFyoB.lean.js → skills_framework-map.md.D-tFZhFS.lean.js} +1 -1
- package/dist/docs/assets/{skills_github.md.D0JahM8c.js → skills_github.md.hgFX_oKY.js} +1 -1
- package/dist/docs/assets/{skills_otel.md.CqhobH3B.js → skills_otel.md.B5Ddv1xH.js} +1 -1
- package/dist/docs/assets/{style.BRuM8477.css → style.DCD_zyg3.css} +1 -1
- package/dist/docs/assets/troubleshooting.md.CYEAO9bM.js +1 -0
- package/dist/docs/building-with-agents.html +6 -6
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/deployment.html +9 -9
- package/dist/docs/deployment.md +7 -2
- package/dist/docs/evals.html +8 -8
- package/dist/docs/evals.md +3 -2
- package/dist/docs/guides/agent-to-agent.html +6 -6
- package/dist/docs/guides/cloud-agents.html +7 -7
- package/dist/docs/guides/cloud-agents.md +4 -3
- package/dist/docs/guides/convert-automation.html +6 -6
- package/dist/docs/guides/github.html +7 -7
- package/dist/docs/guides/github.md +2 -1
- package/dist/docs/guides/grokbot-agents.html +7 -7
- package/dist/docs/guides/grokbot-agents.md +2 -2
- package/dist/docs/guides/human-in-the-loop.html +6 -6
- package/dist/docs/guides/improve.html +40 -0
- package/dist/docs/guides/improve.md +91 -0
- package/dist/docs/guides/mcp-oauth.html +6 -6
- package/dist/docs/guides/opentelemetry.html +8 -8
- package/dist/docs/guides/opentelemetry.md +3 -4
- package/dist/docs/guides/slack.html +8 -8
- package/dist/docs/guides/slack.md +2 -1
- package/dist/docs/guides/webhooks.html +6 -6
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +6 -6
- package/dist/docs/index.html +8 -8
- package/dist/docs/index.md +4 -0
- package/dist/docs/llms-full.txt +180 -61
- package/dist/docs/llms.txt +1 -0
- package/dist/docs/quickstart.html +6 -6
- package/dist/docs/reference/agent-config.html +7 -7
- package/dist/docs/reference/agent-config.md +5 -2
- package/dist/docs/reference/artifacts.html +6 -6
- package/dist/docs/reference/channels.html +7 -7
- package/dist/docs/reference/channels.md +11 -19
- package/dist/docs/reference/cli.html +11 -11
- package/dist/docs/reference/cli.md +23 -13
- package/dist/docs/reference/connections.html +8 -8
- package/dist/docs/reference/connections.md +2 -1
- package/dist/docs/reference/extensions.html +7 -7
- package/dist/docs/reference/extensions.md +2 -0
- package/dist/docs/reference/hooks.html +6 -6
- package/dist/docs/reference/http-api.html +6 -6
- package/dist/docs/reference/instructions.html +6 -6
- package/dist/docs/reference/playground.html +5 -5
- package/dist/docs/reference/project-layout.html +6 -6
- package/dist/docs/reference/prompt.html +6 -6
- package/dist/docs/reference/result.html +6 -6
- package/dist/docs/reference/schedules.html +6 -6
- package/dist/docs/reference/sessions.html +5 -5
- package/dist/docs/reference/skills.html +6 -6
- package/dist/docs/reference/subagents.html +6 -6
- package/dist/docs/reference/tools.html +6 -6
- package/dist/docs/scaffolding-agents.html +6 -6
- package/dist/docs/scaffolding-agents.md +2 -1
- package/dist/docs/skills/ab.html +6 -6
- package/dist/docs/skills/create-agent.html +8 -8
- package/dist/docs/skills/create-agent.md +1 -1
- package/dist/docs/skills/debug.html +6 -6
- package/dist/docs/skills/debug.md +1 -1
- package/dist/docs/skills/evals.html +8 -8
- package/dist/docs/skills/evals.md +1 -1
- package/dist/docs/skills/framework-map.html +6 -6
- package/dist/docs/skills/framework-map.md +4 -2
- package/dist/docs/skills/github.html +8 -8
- package/dist/docs/skills/github.md +1 -1
- package/dist/docs/skills/hillclimb.html +6 -6
- package/dist/docs/skills/index.html +5 -5
- package/dist/docs/skills/mcp-auth.html +6 -6
- package/dist/docs/skills/otel.html +8 -8
- package/dist/docs/skills/otel.md +3 -3
- package/dist/docs/skills/setup-slack.html +6 -6
- package/dist/docs/storage.html +6 -6
- package/dist/docs/templates/agentic-owners.html +6 -6
- package/dist/docs/templates/agents-md.html +6 -6
- package/dist/docs/templates/code-wiki.html +6 -6
- package/dist/docs/templates/demo.html +6 -6
- package/dist/docs/templates/grokbot-agents.html +6 -6
- package/dist/docs/templates/pr-autofixer.html +6 -6
- package/dist/docs/templates/security-help.html +6 -6
- package/dist/docs/templates/security-reviewer.html +6 -6
- package/dist/docs/templates/triage.html +6 -6
- package/dist/docs/troubleshooting.html +6 -6
- package/dist/docs/troubleshooting.md +1 -1
- package/dist/extensions/improve/extension.d.ts +46 -0
- package/dist/extensions/improve/extension.d.ts.map +1 -0
- package/dist/extensions/improve/extension.js +41 -0
- package/dist/extensions/improve/skills/yourself.d.ts +4 -0
- package/dist/extensions/improve/skills/yourself.d.ts.map +1 -0
- package/dist/extensions/improve/skills/yourself.js +43 -0
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/internal/builtin-tools/artifacts.d.ts.map +1 -1
- package/dist/internal/builtin-tools/artifacts.js +2 -3
- package/dist/internal/channel-route-dispatch.d.ts +13 -0
- package/dist/internal/channel-route-dispatch.d.ts.map +1 -0
- package/dist/internal/channel-route-dispatch.js +62 -0
- package/dist/internal/channel-state.d.ts +17 -0
- package/dist/internal/channel-state.d.ts.map +1 -0
- package/dist/internal/channel-state.js +78 -0
- package/dist/internal/cli-ax.d.ts +7 -0
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +99 -1
- package/dist/internal/cli-cursor.d.ts.map +1 -1
- package/dist/internal/cli-cursor.js +2 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +61 -25
- package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
- package/dist/internal/cli-mcp-oauth.js +15 -0
- package/dist/internal/cli-mcp.d.ts.map +1 -1
- package/dist/internal/cli-mcp.js +12 -0
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +8 -2
- package/dist/internal/cursor/backend-client.d.ts +25 -0
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +57 -2
- package/dist/internal/cursor/credentials.d.ts +8 -2
- package/dist/internal/cursor/credentials.d.ts.map +1 -1
- package/dist/internal/cursor/credentials.js +27 -5
- package/dist/internal/deploy-client.d.ts +35 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +46 -0
- package/dist/internal/deploy-manifest.d.ts +26 -0
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +99 -13
- package/dist/internal/describe-error.d.ts +1 -0
- package/dist/internal/describe-error.d.ts.map +1 -1
- package/dist/internal/describe-error.js +25 -0
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +1 -0
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +7 -3
- package/dist/internal/discovery/modules.d.ts +1 -1
- package/dist/internal/discovery/modules.d.ts.map +1 -1
- package/dist/internal/discovery/modules.js +1 -0
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +3 -0
- package/dist/internal/discovery/reminders.d.ts +7 -0
- package/dist/internal/discovery/reminders.d.ts.map +1 -0
- package/dist/internal/discovery/reminders.js +65 -0
- package/dist/internal/discovery/subagent.js +1 -0
- package/dist/internal/distribution.d.ts +5 -0
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +17 -0
- package/dist/internal/framework-storage-selection.d.ts +14 -3
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +36 -6
- package/dist/internal/guest-network.d.ts +4 -10
- package/dist/internal/guest-network.d.ts.map +1 -1
- package/dist/internal/guest-network.js +44 -26
- package/dist/internal/hosted-admission-adapter.d.ts +2 -0
- package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
- package/dist/internal/hosted-catch-protocol.d.ts +51 -0
- package/dist/internal/hosted-catch-protocol.d.ts.map +1 -0
- package/dist/internal/hosted-catch-protocol.js +103 -0
- package/dist/internal/hosted-catch.d.ts +40 -0
- package/dist/internal/hosted-catch.d.ts.map +1 -0
- package/dist/internal/hosted-catch.js +149 -0
- package/dist/internal/hosted-delivery-protocol.d.ts +89 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +309 -0
- package/dist/internal/hosted-delivery.d.ts +20 -1
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +179 -36
- package/dist/internal/hosted-execution-diag.d.ts +4 -1
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
- package/dist/internal/hosted-execution-diag.js +13 -4
- package/dist/internal/hosted-execution-flush.d.ts +3 -0
- package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
- package/dist/internal/hosted-execution-flush.js +2 -4
- package/dist/internal/http-control-plane-session.d.ts +30 -0
- package/dist/internal/http-control-plane-session.d.ts.map +1 -0
- package/dist/internal/http-control-plane-session.js +83 -0
- package/dist/internal/legacy-command-guard.d.ts +22 -0
- package/dist/internal/legacy-command-guard.d.ts.map +1 -0
- package/dist/internal/legacy-command-guard.js +51 -0
- package/dist/internal/local-control-plane.d.ts +18 -2
- package/dist/internal/local-control-plane.d.ts.map +1 -1
- package/dist/internal/local-control-plane.js +199 -17
- package/dist/internal/platform-timers.d.ts +7 -0
- package/dist/internal/platform-timers.d.ts.map +1 -1
- package/dist/internal/platform-timers.js +139 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts +189 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -0
- package/dist/internal/reminder-control-plane-protocol.js +251 -0
- package/dist/internal/reminder-runner.d.ts +56 -6
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +372 -57
- package/dist/internal/reminder-schedule.d.ts +5 -2
- package/dist/internal/reminder-schedule.d.ts.map +1 -1
- package/dist/internal/reminder-schedule.js +8 -6
- package/dist/internal/reminder-store.d.ts +24 -7
- package/dist/internal/reminder-store.d.ts.map +1 -1
- package/dist/internal/reminder-store.js +6 -5
- package/dist/internal/request-error-status.d.ts +2 -0
- package/dist/internal/request-error-status.d.ts.map +1 -1
- package/dist/internal/request-error-status.js +22 -3
- package/dist/internal/resolve-prod-target.d.ts +2 -0
- package/dist/internal/resolve-prod-target.d.ts.map +1 -1
- package/dist/internal/resolve-prod-target.js +13 -0
- package/dist/internal/scm/pr-url.d.ts +40 -0
- package/dist/internal/scm/pr-url.d.ts.map +1 -1
- package/dist/internal/scm/pr-url.js +93 -14
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +4 -3
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +118 -77
- package/dist/internal/session-engine.d.ts +6 -6
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +100 -67
- package/dist/playground/assets/{index-BaQzjaNK.js → index-BMDqAeXu.js} +34 -34
- package/dist/playground/assets/index-LUgJoWdL.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/reminders.d.ts +24 -5
- package/dist/reminders.d.ts.map +1 -1
- package/dist/reminders.js +28 -5
- package/dist/storage-backends/cursor-hosted.d.ts +6 -0
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +29 -1
- package/dist/types.d.ts +122 -25
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +4 -0
- package/docs/deployment.md +7 -2
- package/docs/evals.md +3 -2
- package/docs/guides/cloud-agents.md +4 -3
- package/docs/guides/github.md +2 -1
- package/docs/guides/grokbot-agents.md +2 -2
- package/docs/guides/improve.md +96 -0
- package/docs/guides/opentelemetry.md +3 -4
- package/docs/guides/slack.md +2 -1
- package/docs/reference/agent-config.md +5 -2
- package/docs/reference/channels.md +11 -19
- package/docs/reference/cli.md +23 -13
- package/docs/reference/connections.md +2 -1
- package/docs/reference/extensions.md +2 -0
- package/docs/scaffolding-agents.md +2 -1
- package/docs/troubleshooting.md +1 -1
- package/package.json +10 -3
- package/skills/create-agent/SKILL.md +1 -1
- package/skills/debug/SKILL.md +1 -1
- package/skills/evals/SKILL.md +1 -1
- package/skills/framework-map/SKILL.md +4 -2
- package/skills/github/SKILL.md +1 -1
- package/skills/otel/SKILL.md +3 -3
- package/src/bin/agent-serve.ts +28 -11
- package/src/channels/bitbucket/types.ts +2 -4
- package/src/channels/deployments/types.ts +5 -8
- package/src/channels/github/github-channel.ts +8 -8
- package/src/channels/github/types.ts +7 -4
- package/src/channels/gitlab/types.ts +2 -5
- package/src/channels/origin/origin-channel.ts +29 -13
- package/src/channels/origin/types.ts +7 -3
- package/src/channels/slack/defaults.ts +3 -0
- package/src/channels/slack/dispatch.ts +1 -0
- package/src/channels/slack/live-delivery.ts +53 -12
- package/src/channels/slack/types.ts +4 -3
- package/src/channels.ts +157 -10
- package/src/connections.ts +2 -1
- package/src/extensions/improve/extension.ts +70 -0
- package/src/extensions/improve/skills/yourself.ts +50 -0
- package/src/index.ts +6 -3
- package/src/internal/builtin-tools/artifacts.ts +2 -3
- package/src/internal/channel-route-dispatch.ts +66 -0
- package/src/internal/channel-state.ts +96 -0
- package/src/internal/cli-ax.ts +110 -1
- package/src/internal/cli-cursor.ts +4 -1
- package/src/internal/cli-deploy.ts +80 -22
- package/src/internal/cli-mcp-oauth.ts +18 -0
- package/src/internal/cli-mcp.ts +11 -0
- package/src/internal/cli-slack.ts +15 -2
- package/src/internal/cursor/backend-client.ts +90 -2
- package/src/internal/cursor/credentials.ts +35 -7
- package/src/internal/deploy-client.ts +70 -0
- package/src/internal/deploy-manifest.ts +131 -12
- package/src/internal/describe-error.ts +28 -0
- package/src/internal/discovery/agent.ts +1 -0
- package/src/internal/discovery/info.ts +6 -0
- package/src/internal/discovery/modules.ts +2 -4
- package/src/internal/discovery/project.ts +3 -0
- package/src/internal/discovery/reminders.ts +65 -0
- package/src/internal/discovery/subagent.ts +1 -0
- package/src/internal/distribution.ts +20 -0
- package/src/internal/framework-storage-selection.ts +43 -6
- package/src/internal/guest-network.ts +46 -29
- package/src/internal/hosted-admission-adapter.ts +2 -0
- package/src/internal/hosted-catch-protocol.ts +130 -0
- package/src/internal/hosted-catch.ts +192 -0
- package/src/internal/hosted-delivery-protocol.ts +483 -0
- package/src/internal/hosted-delivery.ts +303 -43
- package/src/internal/hosted-execution-diag.ts +21 -3
- package/src/internal/hosted-execution-flush.ts +6 -3
- package/src/internal/http-control-plane-session.ts +104 -0
- package/src/internal/legacy-command-guard.ts +59 -0
- package/src/internal/local-control-plane.ts +281 -22
- package/src/internal/platform-timers.ts +191 -0
- package/src/internal/reminder-control-plane-protocol.ts +512 -0
- package/src/internal/reminder-runner.ts +481 -57
- package/src/internal/reminder-schedule.ts +11 -6
- package/src/internal/reminder-store.ts +27 -7
- package/src/internal/request-error-status.ts +27 -3
- package/src/internal/resolve-prod-target.ts +15 -0
- package/src/internal/scm/pr-url.ts +167 -20
- package/src/internal/sdk-runner.ts +2 -1
- package/src/internal/server.ts +151 -88
- package/src/internal/session-engine.ts +146 -83
- package/src/reminders.ts +35 -4
- package/src/storage-backends/cursor-hosted.ts +40 -1
- package/src/types.ts +134 -26
- package/dist/docs/assets/chunks/@localSearchIndexroot.CJxMklAy.js +0 -1
- package/dist/docs/assets/guides_cloud-agents.md.DS8RIjwx.js +0 -9
- package/dist/docs/assets/index.md.BW_6tOgR.js +0 -5
- package/dist/docs/assets/skills_framework-map.md.haibFyoB.js +0 -1
- package/dist/docs/assets/troubleshooting.md.Cus_YZga.js +0 -1
- package/dist/playground/assets/index-CceqnLTX.css +0 -1
- /package/dist/docs/assets/{evals.md.CbMoebP1.lean.js → evals.md.C1ekS3k2.lean.js} +0 -0
- /package/dist/docs/assets/{guides_github.md.c0gdGJ-D.lean.js → guides_github.md.BH33UEBJ.lean.js} +0 -0
- /package/dist/docs/assets/{guides_grokbot-agents.md.DVqdhBKb.lean.js → guides_grokbot-agents.md.DyV-WArv.lean.js} +0 -0
- /package/dist/docs/assets/{index.md.BW_6tOgR.lean.js → index.md.BjH1w2ZW.lean.js} +0 -0
- /package/dist/docs/assets/{reference_agent-config.md.CHNpiyp4.lean.js → reference_agent-config.md.CvoL6pof.lean.js} +0 -0
- /package/dist/docs/assets/{reference_connections.md.Di6jJAXF.lean.js → reference_connections.md.BojkC6c5.lean.js} +0 -0
- /package/dist/docs/assets/{reference_extensions.md.CGmMLblt.lean.js → reference_extensions.md.CPWt00ds.lean.js} +0 -0
- /package/dist/docs/assets/{scaffolding-agents.md.em43xlY1.lean.js → scaffolding-agents.md.Kctn3OVb.lean.js} +0 -0
- /package/dist/docs/assets/{skills_create-agent.md.BVoWPcan.lean.js → skills_create-agent.md.Q3h6Je-e.lean.js} +0 -0
- /package/dist/docs/assets/{skills_evals.md.723kpUmA.lean.js → skills_evals.md.BhovOvrl.lean.js} +0 -0
- /package/dist/docs/assets/{skills_github.md.D0JahM8c.lean.js → skills_github.md.hgFX_oKY.lean.js} +0 -0
- /package/dist/docs/assets/{skills_otel.md.CqhobH3B.lean.js → skills_otel.md.B5Ddv1xH.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.Cus_YZga.lean.js → troubleshooting.md.CYEAO9bM.lean.js} +0 -0
|
@@ -224,7 +224,8 @@ Name the file `account.ts`. `cursor.ts` collides with the IDE `cursor`
|
|
|
224
224
|
MCP namespace. `advertiseTools: true` puts connector tools on local
|
|
225
225
|
turns by name. Without it they sit behind harness meta-tools.
|
|
226
226
|
|
|
227
|
-
The host must be signed in (`agent-sdk login` or
|
|
227
|
+
The host must be signed in (`agent-sdk login`, `CURSOR_API_KEY`, or
|
|
228
|
+
`CURSOR_SERVICE_ACCOUNT_KEY`).
|
|
228
229
|
`serve` fails fast at startup otherwise, and logs each connector's live
|
|
229
230
|
status (`connected`, `needsAuth`, `error`) as it starts.
|
|
230
231
|
|
|
@@ -265,6 +265,8 @@ Continue with these pages:
|
|
|
265
265
|
lets an agent launch and steer cloud agents
|
|
266
266
|
- [Cursor Grok Bot agents](../guides/grokbot-agents.md): the extension
|
|
267
267
|
that lets an agent talk to Grok Bot agents
|
|
268
|
+
- [Self-improvement](../guides/improve.md): the extension that lets an
|
|
269
|
+
agent change its own source through a cloud agent and a pull request
|
|
268
270
|
- [Tools](./tools.md): the tool contract extensions contribute to
|
|
269
271
|
- [Skills](./skills.md): the skill forms an extension can carry
|
|
270
272
|
- [Project layout](./project-layout.md): where `agent/extensions/` sits
|
|
@@ -113,7 +113,8 @@ Cursor checks the project in this order:
|
|
|
113
113
|
|
|
114
114
|
Validation, discovery, direct server-tool calls, and server startup work
|
|
115
115
|
without a Cursor credential. Model turns and evals need
|
|
116
|
-
`CURSOR_API_KEY`
|
|
116
|
+
`CURSOR_API_KEY`, then `CURSOR_API_KEY_FILE` (hosted default `/run/cursor/secrets/CURSOR_API_KEY`), then `CURSOR_SERVICE_ACCOUNT_KEY`, then a saved
|
|
117
|
+
`agent-sdk login`.
|
|
117
118
|
|
|
118
119
|
## What happens after the first agent works?
|
|
119
120
|
|
package/docs/troubleshooting.md
CHANGED
|
@@ -30,7 +30,7 @@ not on `PATH`, use `npx @cursor/july`.
|
|
|
30
30
|
| What you see | What to do |
|
|
31
31
|
| --- | --- |
|
|
32
32
|
| Built-in file reads and greps fail; the turn retries for a long time | Run under Node 22.13+ (or `tsx`), never Bun. Look for `NGHTTP2_FRAME_SIZE_ERROR` in logs. |
|
|
33
|
-
| The turn fails immediately with an API-key error | Sign in with `agent-sdk login`, or set `CURSOR_API_KEY`. Discovery, `info`, `call`, and serve bring-up work without a key; model turns need one. |
|
|
33
|
+
| The turn fails immediately with an API-key error | Sign in with `agent-sdk login`, or set `CURSOR_API_KEY` or `CURSOR_SERVICE_ACCOUNT_KEY`. Discovery, `info`, `call`, and serve bring-up work without a key; model turns need one. |
|
|
34
34
|
| Replies quote rules or `AGENTS.md` from outside your agent project | The session workspace inherited parent-folder config. Nested git checkouts default `local.cwd` to a per-project cache directory under `~/.cache`. Point `defineAgent({ local: { cwd } })` at a checkout only when the agent should inherit that tree, or set `--state-root` to a clean directory (for example under `/tmp`). |
|
|
35
35
|
| Yellow box shows Datadog/Linear tools, but the model lists `GetDynamicTools` / IDE `cursor` tools and never calls them | Attached MCP sits behind harness meta-tools, or the harness cwd is still inside another checkout. Set `advertiseTools: true` for named tools on local turns. Check `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
|
|
36
36
|
| Server tools, skills, or workspace seed files never appear | Server tools and sandbox seeds apply on the local runtime (cloud server tools need `--public-url` / `--cloud-tools-url`). Skills reach cloud through the Agent Store when hosting or a personal `CURSOR_API_KEY` is available; otherwise only skills already in the cloud repo. `validate` warns when this combination is present. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cursor/july",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.108",
|
|
4
4
|
"description": "(early alpha) Filesystem-first framework for defining Cursor agents as markdown and TypeScript and serving them over channels with the Cursor SDK.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"!dist/internal/tenant-mcp/**",
|
|
25
25
|
"!dist/internal/grokbot/**",
|
|
26
26
|
"!dist/extensions/cursor-grokbot-agents/**",
|
|
27
|
-
"!dist/internal/review-comments
|
|
27
|
+
"!dist/internal/review-comments*",
|
|
28
28
|
"!dist/internal/shallow-clone.*",
|
|
29
29
|
"!dist/internal/managed-delivery.*",
|
|
30
30
|
"src/**/*",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"!src/internal/tenant-mcp/**",
|
|
33
33
|
"!src/internal/grokbot/**",
|
|
34
34
|
"!src/extensions/cursor-grokbot-agents/**",
|
|
35
|
-
"!src/internal/review-comments
|
|
35
|
+
"!src/internal/review-comments*",
|
|
36
36
|
"!src/internal/shallow-clone.ts",
|
|
37
37
|
"!src/internal/managed-delivery.ts",
|
|
38
38
|
"skills/**/*",
|
|
@@ -146,6 +146,13 @@
|
|
|
146
146
|
"import": "./dist/extensions/cursor-grokbot-agents/extension.js",
|
|
147
147
|
"default": "./dist/extensions/cursor-grokbot-agents/extension.js"
|
|
148
148
|
},
|
|
149
|
+
"./extensions/improve": {
|
|
150
|
+
"anysphere-source": "./src/extensions/improve/extension.ts",
|
|
151
|
+
"bun": "./dist/extensions/improve/extension.js",
|
|
152
|
+
"types": "./dist/extensions/improve/extension.d.ts",
|
|
153
|
+
"import": "./dist/extensions/improve/extension.js",
|
|
154
|
+
"default": "./dist/extensions/improve/extension.js"
|
|
155
|
+
},
|
|
149
156
|
"./schedules": {
|
|
150
157
|
"anysphere-source": "./src/schedules.ts",
|
|
151
158
|
"types": "./dist/schedules.d.ts",
|
|
@@ -133,7 +133,7 @@ npx tsc --noEmit -p ./<slug>
|
|
|
133
133
|
tsx does not typecheck. Tool `execute` must return JSON-shaped
|
|
134
134
|
values: object literals or `type` aliases, not `interface` types.
|
|
135
135
|
|
|
136
|
-
Model turns need `CURSOR_API_KEY
|
|
136
|
+
Model turns need a Cursor credential (`CURSOR_API_KEY`, then `CURSOR_API_KEY_FILE`, then `CURSOR_SERVICE_ACCOUNT_KEY`, then `agent-sdk login`). Without one, finish the
|
|
137
137
|
key-free checks, confirm `run` fails with only the API-key error,
|
|
138
138
|
and hand these over:
|
|
139
139
|
|
package/skills/debug/SKILL.md
CHANGED
|
@@ -34,7 +34,7 @@ Local `agent-sdk serve`. Hosted start or health failures:
|
|
|
34
34
|
| `403` on stream | Wrong principal. Same auth as create; beyond loopback send `--bearer-token`. |
|
|
35
35
|
| Works on loopback, blocked via tunnel | `localDevStrict()` rejects forwarded headers. Use `--bearer-token`. Never `--allow-anonymous` with account MCP. |
|
|
36
36
|
| Slack `channel idle … missing credentials` | Expected. `slack doctor --prefix <PREFIX>`. |
|
|
37
|
-
| Immediate API-key error | Model turns need `CURSOR_API_KEY
|
|
37
|
+
| Immediate API-key error | Model turns need a Cursor credential (`CURSOR_API_KEY`, then `CURSOR_API_KEY_FILE`, then `CURSOR_SERVICE_ACCOUNT_KEY`, then `agent-sdk login`). |
|
|
38
38
|
| Approvals or sandbox seeds missing | `runtime: "cloud"`. Those are local only. `validate` warns. |
|
|
39
39
|
| `validate` clean, CI typecheck fails | tsx skipped types. JSON-shaped returns; `type` not `interface`. |
|
|
40
40
|
|
package/skills/evals/SKILL.md
CHANGED
|
@@ -29,7 +29,7 @@ agent-sdk eval --dir . --tag smoke
|
|
|
29
29
|
| `evals/weather.eval.ts` + `{ id: "nyc" }` | `weather/nyc` |
|
|
30
30
|
|
|
31
31
|
`eval` boots an ephemeral server and a temp state root. `--url`
|
|
32
|
-
points at a running agent. Model turns need `CURSOR_API_KEY
|
|
32
|
+
points at a running agent. Model turns need a Cursor credential (`CURSOR_API_KEY`, then `CURSOR_API_KEY_FILE`, then `CURSOR_SERVICE_ACCOUNT_KEY`, then `agent-sdk login`).
|
|
33
33
|
|
|
34
34
|
## Seeding
|
|
35
35
|
|
|
@@ -28,8 +28,10 @@ Public docs: `node_modules/@cursor/july/dist/docs/llms.txt` or
|
|
|
28
28
|
per-project cache directory under `~/.cache`. Point cwd at a
|
|
29
29
|
checkout only when the agent must inherit that tree.
|
|
30
30
|
5. **Attached MCP is nameless** until `advertiseTools: true`.
|
|
31
|
-
6. **Model turns need
|
|
32
|
-
|
|
31
|
+
6. **Model turns need a Cursor credential** (`CURSOR_API_KEY`, then
|
|
32
|
+
`CURSOR_API_KEY_FILE`, then `CURSOR_SERVICE_ACCOUNT_KEY`, then
|
|
33
|
+
`agent-sdk login`). `validate`,
|
|
34
|
+
`info`, `call`, and `serve` bring-up do not.
|
|
33
35
|
|
|
34
36
|
## Folder structure
|
|
35
37
|
|
package/skills/github/SKILL.md
CHANGED
|
@@ -48,7 +48,7 @@ at deploy. Repos must share one GitHub owner.
|
|
|
48
48
|
|
|
49
49
|
| Source | When |
|
|
50
50
|
| --- | --- |
|
|
51
|
-
| `cursorAccount` + `serve --cursor-events` | Preferred. Signed-in host (`agent-sdk login`
|
|
51
|
+
| `cursorAccount` + `serve --cursor-events` | Preferred. Signed-in host (`agent-sdk login`, `CURSOR_API_KEY`, or `CURSOR_SERVICE_ACCOUNT_KEY`). Repos from the channel and from repeatable `--repo owner/name`. Cap 20, one GitHub owner |
|
|
52
52
|
| HTTP `POST /<slug>/v1/channels/github` with a webhook secret | `allowAll()` + `X-Hub-Signature-256` |
|
|
53
53
|
| HTTP, no secret | Loopback only. `serve --dev` also admits unsigned loopback (fixtures / forward) |
|
|
54
54
|
|
package/skills/otel/SKILL.md
CHANGED
|
@@ -33,9 +33,9 @@ export default defineOtel({
|
|
|
33
33
|
3. `serve(dir, { otel: { … } })`. `otel: false` disables env and
|
|
34
34
|
authored config.
|
|
35
35
|
|
|
36
|
-
Hosted
|
|
37
|
-
re-resolves exporters. Authored `agent/otel.ts` records from
|
|
38
|
-
start even when the factory returns no exporters yet.
|
|
36
|
+
Hosted secrets can arrive after startup. Use `defineOtel(() => …)` so
|
|
37
|
+
flush re-resolves exporters. Authored `agent/otel.ts` records from
|
|
38
|
+
process start even when the factory returns no exporters yet.
|
|
39
39
|
|
|
40
40
|
| Signal | Default |
|
|
41
41
|
| --- | --- |
|
package/src/bin/agent-serve.ts
CHANGED
|
@@ -99,6 +99,7 @@ Usage:
|
|
|
99
99
|
${CLI} session <sessionId> [--url <baseUrl> | --prod]
|
|
100
100
|
[--json | --text | --events] [--out <file.ndjson>]
|
|
101
101
|
[--slug <slug>] [--team <id>] [--dir <path>]
|
|
102
|
+
or: --prod [<sessionId>] --slug <slug> --message "…" [--dry-run] [--as-of <instant>]
|
|
102
103
|
${CLI} cost [sessionId] [--url <baseUrl> | --prod] [--json]
|
|
103
104
|
[--slug <slug>] [--team <id>] [--dir <path>]
|
|
104
105
|
${CLI} playground [--url <baseUrl> | --prod] [--session <id>] [--print]
|
|
@@ -108,6 +109,7 @@ Usage:
|
|
|
108
109
|
[--session <id>] [--continuation-token <t>]
|
|
109
110
|
[--events <file.ndjson>] [--no-events] [--text]
|
|
110
111
|
[--timeout-ms <n>] [--no-stream] [--slug <slug>] [--team <id>]
|
|
112
|
+
[--dry-run] [--as-of <instant>]
|
|
111
113
|
${CLI} trajectory --events <file.ndjson> [--text]
|
|
112
114
|
${CLI} call <tool> [--input <json>] [--dir <path> | --url <baseUrl> | --prod]
|
|
113
115
|
[--session <id>] [--slug <slug>] [--team <id>]
|
|
@@ -197,6 +199,10 @@ Commands:
|
|
|
197
199
|
Writes a single events.ndjson trace (summarize with trajectory).
|
|
198
200
|
Streams tool calls and reply text to stderr when stderr is a TTY.
|
|
199
201
|
Pass --prod to hit the hosted deployment instead of a local server.
|
|
202
|
+
On an AgentSDK v2 slug, --prod starts a hosted session through
|
|
203
|
+
the control plane (Temporal, no resident engine); --session
|
|
204
|
+
ses_… resumes that exact session. A 404 falls back to the v1
|
|
205
|
+
engine alias.
|
|
200
206
|
trajectory Summarize an events.ndjson file into a trajectory.
|
|
201
207
|
call Call an authored server tool deterministically (no model turn)
|
|
202
208
|
via POST /v1/tools/:toolName. --session runs it inside an
|
|
@@ -311,8 +317,11 @@ Options:
|
|
|
311
317
|
ALB/ECS checks; use single when one agent is the whole host.
|
|
312
318
|
--dev Dev mode: mounts POST /v1/dev/schedules/:scheduleId and
|
|
313
319
|
disables the cron runner (dispatch schedules by hand).
|
|
314
|
-
--api-key Cursor API key (defaults to CURSOR_API_KEY, then
|
|
315
|
-
|
|
320
|
+
--api-key Cursor API key (defaults to CURSOR_API_KEY, then
|
|
321
|
+
CURSOR_API_KEY_FILE — hosted default
|
|
322
|
+
/run/cursor/secrets/CURSOR_API_KEY when unset —
|
|
323
|
+
then CURSOR_SERVICE_ACCOUNT_KEY, then the stored
|
|
324
|
+
\`${CLI} login\` credential).
|
|
316
325
|
--key-name login: label for the minted API key (defaults to
|
|
317
326
|
"${CLI} (<hostname>)").
|
|
318
327
|
--state-root Durable state directory (default <dir>/.agent-serve). Put it
|
|
@@ -341,9 +350,6 @@ Options:
|
|
|
341
350
|
the Cursor backend's per-forge forwarder instead of
|
|
342
351
|
minting raw tokens into this process
|
|
343
352
|
(AGENT_SERVE_<FORGE>_PROXY_URL overrides a base URL).
|
|
344
|
-
--cursor-github-proxy
|
|
345
|
-
serve: deprecated alias for --cursor-scm-proxy; removed
|
|
346
|
-
one release after --cursor-scm-proxy ships.
|
|
347
353
|
--public-url serve: base URL where this host is reachable from outside
|
|
348
354
|
(e.g. https://agent-serve.example.com). Required for peer
|
|
349
355
|
connections (defineConnection({ agent })) on cloud-runtime
|
|
@@ -364,6 +370,9 @@ Options:
|
|
|
364
370
|
--dir basename. Mutually exclusive with --url. Requires
|
|
365
371
|
\`${CLI} login\`. For eval, this is how you opt into the
|
|
366
372
|
persisted server-side batch (default is local).
|
|
373
|
+
--dry-run run/session --prod: mark the hosted v2 turn non-mutating.
|
|
374
|
+
--as-of run/session --prod: freeze the session clock at this
|
|
375
|
+
timezone-bearing ISO-8601 instant.
|
|
367
376
|
--once logs: print current progress / log buffer once and exit
|
|
368
377
|
(default is to follow).
|
|
369
378
|
--print playground/docs: print the URL only; do not open a
|
|
@@ -519,7 +528,6 @@ async function main(argv: string[]): Promise<number> {
|
|
|
519
528
|
"allow-anonymous-cursor-account-mcp": { type: "boolean", default: false },
|
|
520
529
|
"allow-anonymous-grokbot": { type: "boolean", default: false },
|
|
521
530
|
"cursor-scm-proxy": { type: "boolean", default: false },
|
|
522
|
-
"cursor-github-proxy": { type: "boolean", default: false },
|
|
523
531
|
"no-schedules": { type: "boolean", default: false },
|
|
524
532
|
"no-control-plane": { type: "boolean", default: false },
|
|
525
533
|
"no-playground": { type: "boolean", default: false },
|
|
@@ -575,6 +583,7 @@ async function main(argv: string[]): Promise<number> {
|
|
|
575
583
|
context: { type: "string" },
|
|
576
584
|
comment: { type: "string" },
|
|
577
585
|
"dry-run": { type: "boolean", default: false },
|
|
586
|
+
"as-of": { type: "string" },
|
|
578
587
|
out: { type: "string" },
|
|
579
588
|
team: { type: "string" },
|
|
580
589
|
"no-wait": { type: "boolean", default: false },
|
|
@@ -918,6 +927,8 @@ async function main(argv: string[]): Promise<number> {
|
|
|
918
927
|
stateRoot: values["state-root"],
|
|
919
928
|
timeoutMs: parseTimeoutMs(values["timeout-ms"]),
|
|
920
929
|
stream: values["no-stream"] ? false : undefined,
|
|
930
|
+
dryRun: values["dry-run"],
|
|
931
|
+
asOf: values["as-of"],
|
|
921
932
|
})
|
|
922
933
|
);
|
|
923
934
|
}
|
|
@@ -1098,6 +1109,10 @@ async function main(argv: string[]): Promise<number> {
|
|
|
1098
1109
|
}
|
|
1099
1110
|
|
|
1100
1111
|
case "session": {
|
|
1112
|
+
const messages = await loadMessages(
|
|
1113
|
+
values.message,
|
|
1114
|
+
values["messages-file"]
|
|
1115
|
+
);
|
|
1101
1116
|
return cmdSession(
|
|
1102
1117
|
positionals[0],
|
|
1103
1118
|
axFromOptions({
|
|
@@ -1112,6 +1127,10 @@ async function main(argv: string[]): Promise<number> {
|
|
|
1112
1127
|
text: values.text,
|
|
1113
1128
|
rawEvents: values["raw-events"],
|
|
1114
1129
|
out: values.out,
|
|
1130
|
+
messages,
|
|
1131
|
+
sessionId: values["session-id"] ?? values.session,
|
|
1132
|
+
dryRun: values["dry-run"],
|
|
1133
|
+
asOf: values["as-of"],
|
|
1115
1134
|
})
|
|
1116
1135
|
);
|
|
1117
1136
|
}
|
|
@@ -1353,11 +1372,7 @@ async function main(argv: string[]): Promise<number> {
|
|
|
1353
1372
|
: undefined,
|
|
1354
1373
|
allowAnonymousGrokbot:
|
|
1355
1374
|
values["allow-anonymous-grokbot"] === true ? true : undefined,
|
|
1356
|
-
cursorScmProxy:
|
|
1357
|
-
values["cursor-scm-proxy"] === true ||
|
|
1358
|
-
values["cursor-github-proxy"] === true
|
|
1359
|
-
? true
|
|
1360
|
-
: undefined,
|
|
1375
|
+
cursorScmProxy: values["cursor-scm-proxy"] === true ? true : undefined,
|
|
1361
1376
|
schedules: values["no-schedules"] === true ? false : undefined,
|
|
1362
1377
|
noControlPlane: values["no-control-plane"] === true ? true : undefined,
|
|
1363
1378
|
playground: values["no-playground"] === true ? false : undefined,
|
|
@@ -1496,6 +1511,8 @@ function axFromOptions(
|
|
|
1496
1511
|
sessionId: partial.sessionId,
|
|
1497
1512
|
resume: partial.resume,
|
|
1498
1513
|
continuationToken: partial.continuationToken,
|
|
1514
|
+
dryRun: partial.dryRun,
|
|
1515
|
+
asOf: partial.asOf,
|
|
1499
1516
|
timeoutMs: partial.timeoutMs,
|
|
1500
1517
|
events: partial.events,
|
|
1501
1518
|
text: partial.text,
|
|
@@ -229,10 +229,8 @@ export interface BitbucketChannelOptions {
|
|
|
229
229
|
*/
|
|
230
230
|
webhookEvents?: readonly string[];
|
|
231
231
|
/**
|
|
232
|
-
* Continuation selector.
|
|
233
|
-
*
|
|
234
|
-
* `architecture: "v2"` (then `bitbucket.pr/v2`, or `bitbucket.none/v2`
|
|
235
|
-
* when a non-PR event is declared).
|
|
232
|
+
* Continuation selector. Omit this to inherit the agent architecture's
|
|
233
|
+
* default. Set it explicitly only when migrating persisted identities.
|
|
236
234
|
*/
|
|
237
235
|
continuation?: ContinuationIdentity;
|
|
238
236
|
/**
|
|
@@ -56,10 +56,9 @@ export interface DeploymentsChannelOptions {
|
|
|
56
56
|
* and then receives nothing. A bare string takes the default environment and
|
|
57
57
|
* event filters.
|
|
58
58
|
*
|
|
59
|
-
* Omit on
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* sources for a tenant it has never seen.
|
|
59
|
+
* Omit on Cursor-managed hosting. The control plane binds sources from the
|
|
60
|
+
* deployment's watched repositories, and the channel admits only what it
|
|
61
|
+
* receives. An agent cannot enumerate sources for an unseen tenant.
|
|
63
62
|
*
|
|
64
63
|
* Name sources to narrow below that scope, or to drive the self-hosted
|
|
65
64
|
* relay, which has no deploy scope to inherit. On that wire `[]` means
|
|
@@ -89,10 +88,8 @@ export interface DeploymentsChannelOptions {
|
|
|
89
88
|
onStart?: ChannelDefinition["onStart"];
|
|
90
89
|
onStop?: ChannelDefinition["onStop"];
|
|
91
90
|
/**
|
|
92
|
-
* Continuation selector.
|
|
93
|
-
*
|
|
94
|
-
* `"deployments.deployment/v2"`). Override with `"deployments.none/v2"`
|
|
95
|
-
* for one-shot events.
|
|
91
|
+
* Continuation selector. Omit this to inherit the agent architecture's
|
|
92
|
+
* default. Set it explicitly only when migrating persisted identities.
|
|
96
93
|
*/
|
|
97
94
|
continuation?: ContinuationIdentity;
|
|
98
95
|
}
|
|
@@ -831,11 +831,9 @@ async function handlePullRequest(input: {
|
|
|
831
831
|
dispatch.message ?? defaultGitHubPullRequestMessage(ctx, pullRequest),
|
|
832
832
|
...(dispatch.context ?? []),
|
|
833
833
|
].join("\n");
|
|
834
|
-
const cloud =
|
|
835
|
-
|
|
836
|
-
ctx,
|
|
837
|
-
pullRequest
|
|
838
|
-
);
|
|
834
|
+
const cloud =
|
|
835
|
+
dispatch.cloud ??
|
|
836
|
+
(await resolveCloudOptions(input.options.cloud, ctx, pullRequest));
|
|
839
837
|
return startTurn({
|
|
840
838
|
options: input.options,
|
|
841
839
|
args: input.args,
|
|
@@ -1558,6 +1556,8 @@ async function startTurn(input: {
|
|
|
1558
1556
|
}): Promise<Response> {
|
|
1559
1557
|
const files = input.dispatch.workspaceFiles;
|
|
1560
1558
|
const lazy = typeof files === "function";
|
|
1559
|
+
const cloud = input.dispatch.cloud ?? input.cloud;
|
|
1560
|
+
const state = { ...input.dispatch.state, ...input.state };
|
|
1561
1561
|
|
|
1562
1562
|
const sendTurn = async () => {
|
|
1563
1563
|
const workspaceFiles = lazy ? await files() : files;
|
|
@@ -1568,11 +1568,11 @@ async function startTurn(input: {
|
|
|
1568
1568
|
? { continuationToken: githubContinuationKey(input.ctx) }
|
|
1569
1569
|
: {}),
|
|
1570
1570
|
title: input.dispatch.title ?? defaultGitHubTitle(input.ctx),
|
|
1571
|
-
|
|
1571
|
+
cloud,
|
|
1572
1572
|
...(workspaceFiles === undefined ? {} : { workspaceFiles }),
|
|
1573
|
-
state:
|
|
1573
|
+
state: state as unknown as JsonValue,
|
|
1574
1574
|
// Resume must refresh headSha / refs without wiping sticky banner id.
|
|
1575
|
-
refreshState:
|
|
1575
|
+
refreshState: state as unknown as JsonValue,
|
|
1576
1576
|
});
|
|
1577
1577
|
};
|
|
1578
1578
|
|
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
ChannelEventHandlers,
|
|
8
8
|
ChannelStartArgs,
|
|
9
9
|
HostContext,
|
|
10
|
+
JsonObject,
|
|
10
11
|
SendMessageFn,
|
|
11
12
|
SendMessageOptions,
|
|
12
13
|
} from "../../types.js";
|
|
@@ -355,6 +356,10 @@ export interface GitHubTurnDispatch {
|
|
|
355
356
|
message?: string;
|
|
356
357
|
/** Optional session title override. */
|
|
357
358
|
title?: string;
|
|
359
|
+
/** Per-turn cloud options. Overrides the channel-level `cloud` resolver. */
|
|
360
|
+
cloud?: AgentCloudOptions;
|
|
361
|
+
/** Extra durable channel state. Provider-owned fields take precedence. */
|
|
362
|
+
state?: JsonObject;
|
|
358
363
|
/**
|
|
359
364
|
* Seeded into the session workspace before the turn (`send`'s
|
|
360
365
|
* `workspaceFiles`). A function runs after the webhook is
|
|
@@ -480,10 +485,8 @@ export interface GitHubChannelOptions {
|
|
|
480
485
|
*/
|
|
481
486
|
botName?: string;
|
|
482
487
|
/**
|
|
483
|
-
* Continuation selector.
|
|
484
|
-
*
|
|
485
|
-
* `"github.pr/v2"`). Override type with `"github.issue/v2"` or
|
|
486
|
-
* `"github.none/v2"` for events outside PR membership.
|
|
488
|
+
* Continuation selector. Omit this to inherit the agent architecture's
|
|
489
|
+
* default. Set it explicitly only when migrating persisted identities.
|
|
487
490
|
*/
|
|
488
491
|
continuation?: ContinuationIdentity;
|
|
489
492
|
/**
|
|
@@ -219,11 +219,8 @@ export interface GitLabChannelOptions {
|
|
|
219
219
|
*/
|
|
220
220
|
webhookEvents?: readonly string[];
|
|
221
221
|
/**
|
|
222
|
-
* Continuation selector.
|
|
223
|
-
*
|
|
224
|
-
* `architecture: "v2"` (then `gitlab.mr/v2`, or `gitlab.none/v2` when a
|
|
225
|
-
* non-MR event is declared). Override with `"gitlab.none/v2"` for one-shot
|
|
226
|
-
* events.
|
|
222
|
+
* Continuation selector. Omit this to inherit the agent architecture's
|
|
223
|
+
* default. Set it explicitly only when migrating persisted identities.
|
|
227
224
|
*/
|
|
228
225
|
continuation?: ContinuationIdentity;
|
|
229
226
|
/**
|
|
@@ -99,13 +99,20 @@ function asBoolean(value: unknown): boolean | undefined {
|
|
|
99
99
|
function originActor(value: unknown): OriginActor | undefined {
|
|
100
100
|
const record = asRecord(value);
|
|
101
101
|
if (record === undefined) return undefined;
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
|
|
103
|
+
const nestedActors = [
|
|
104
|
+
["user", asRecord(record.user)],
|
|
105
|
+
["app", asRecord(record.app)],
|
|
106
|
+
["service_account", asRecord(record.serviceAccount)],
|
|
107
|
+
] as const;
|
|
108
|
+
for (const [kind, actor] of nestedActors) {
|
|
109
|
+
const id = asNonEmptyString(actor?.id);
|
|
110
|
+
if (id !== undefined) {
|
|
111
|
+
return { id, kind };
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const id = asNonEmptyString(record.id);
|
|
109
116
|
if (id === undefined) return undefined;
|
|
110
117
|
const kind = asNonEmptyString(record.kind);
|
|
111
118
|
return kind === undefined ? { id } : { id, kind };
|
|
@@ -361,16 +368,20 @@ export function defaultOriginAuth(
|
|
|
361
368
|
ctx: Omit<OriginEventContext, "host" | "artifacts" | "origin">
|
|
362
369
|
): AuthContext {
|
|
363
370
|
const senderId = ctx.sender?.id;
|
|
371
|
+
const senderKind = ctx.sender?.kind;
|
|
364
372
|
return {
|
|
365
373
|
authenticator: "origin-webhook",
|
|
366
374
|
principalId: senderId ?? "origin",
|
|
367
|
-
principalType:
|
|
375
|
+
principalType:
|
|
376
|
+
senderKind === "app" || senderKind === "service_account"
|
|
377
|
+
? "service"
|
|
378
|
+
: "user",
|
|
368
379
|
attributes: {
|
|
369
380
|
conversation_kind: "pull_request",
|
|
370
381
|
repository: ctx.repository.fullName,
|
|
371
382
|
...(ctx.deliveryId === undefined ? {} : { delivery_id: ctx.deliveryId }),
|
|
372
383
|
...(senderId === undefined ? {} : { subject: senderId }),
|
|
373
|
-
...(
|
|
384
|
+
...(senderKind === undefined ? {} : { user_type: senderKind }),
|
|
374
385
|
issuer: `origin:${ctx.repository.owner}`,
|
|
375
386
|
},
|
|
376
387
|
};
|
|
@@ -461,17 +472,19 @@ async function startTurn(input: {
|
|
|
461
472
|
state: OriginChannelState;
|
|
462
473
|
}): Promise<Response> {
|
|
463
474
|
const source = continuationSource(input.options.continuation, "origin");
|
|
475
|
+
const cloud = input.dispatch.cloud ?? input.cloud;
|
|
476
|
+
const state = { ...input.dispatch.state, ...input.state };
|
|
464
477
|
const session = await input.args.send(input.message, {
|
|
465
478
|
auth: input.dispatch.auth,
|
|
466
479
|
...(source === "engine"
|
|
467
480
|
? { continuationToken: originContinuationKey(input.ctx) }
|
|
468
481
|
: {}),
|
|
469
482
|
title: input.dispatch.title ?? defaultOriginTitle(input.ctx),
|
|
470
|
-
|
|
471
|
-
state:
|
|
483
|
+
cloud,
|
|
484
|
+
state: state as unknown as JsonValue,
|
|
472
485
|
// Resume must refresh the triggering comment / delivery identifiers so
|
|
473
486
|
// reply delivery targets the latest wake, not the session's first.
|
|
474
|
-
refreshState:
|
|
487
|
+
refreshState: state as unknown as JsonValue,
|
|
475
488
|
});
|
|
476
489
|
return turnStarted(session);
|
|
477
490
|
}
|
|
@@ -605,7 +618,10 @@ export async function dispatchOriginWebhook(input: {
|
|
|
605
618
|
ctx,
|
|
606
619
|
dispatch,
|
|
607
620
|
extra: { event: eventType },
|
|
608
|
-
message:
|
|
621
|
+
message:
|
|
622
|
+
commentBody.trim() === ""
|
|
623
|
+
? `Origin comment on ${ctx.repository.fullName}#${ctx.pullRequestNumber}`
|
|
624
|
+
: commentBody.trim(),
|
|
609
625
|
triggeringCommentId: commentId,
|
|
610
626
|
});
|
|
611
627
|
}
|
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
ChannelEventHandlers,
|
|
8
8
|
ChannelStartArgs,
|
|
9
9
|
HostContext,
|
|
10
|
+
JsonObject,
|
|
10
11
|
SendMessageFn,
|
|
11
12
|
} from "../../types.js";
|
|
12
13
|
import type { OriginTokenProvider } from "./api.js";
|
|
@@ -95,6 +96,10 @@ export type OriginTurnDispatch = {
|
|
|
95
96
|
message?: string;
|
|
96
97
|
title?: string;
|
|
97
98
|
context?: readonly string[];
|
|
99
|
+
/** Per-turn cloud options. Overrides the channel-level `cloud` resolver. */
|
|
100
|
+
cloud?: AgentCloudOptions;
|
|
101
|
+
/** Extra durable channel state. Provider-owned fields take precedence. */
|
|
102
|
+
state?: JsonObject;
|
|
98
103
|
};
|
|
99
104
|
|
|
100
105
|
/** Bound per-delivery helpers passed to an {@link OriginTaskDispatch.task}. */
|
|
@@ -246,9 +251,8 @@ export interface OriginChannelOptions {
|
|
|
246
251
|
*/
|
|
247
252
|
webhookEvents?: readonly string[];
|
|
248
253
|
/**
|
|
249
|
-
* Continuation selector.
|
|
250
|
-
*
|
|
251
|
-
* `"origin.pr/v2"`). Override with `"origin.none/v2"` for one-shot events.
|
|
254
|
+
* Continuation selector. Omit this to inherit the agent architecture's
|
|
255
|
+
* default. Set it explicitly only when migrating persisted identities.
|
|
252
256
|
*/
|
|
253
257
|
continuation?: ContinuationIdentity;
|
|
254
258
|
/**
|
|
@@ -362,6 +362,9 @@ export function buildDefaultEvents(
|
|
|
362
362
|
channel.state.streamTs = null;
|
|
363
363
|
channel.state.streamChannelId = null;
|
|
364
364
|
channel.state.streamFull = false;
|
|
365
|
+
// A stream failure downgrades the rest of its own turn, not the thread.
|
|
366
|
+
channel.state.streamingUnavailable = false;
|
|
367
|
+
channel.state.streamAppendedChunks = 0;
|
|
365
368
|
channel.state.lastPostedText = null;
|
|
366
369
|
channel.state.streamBlockText = null;
|
|
367
370
|
channel.state.reasoningCard = undefined;
|