@cursor/july 0.1.96 → 0.1.99
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 +1 -1
- package/README.md +3 -2
- package/dist/bin/agent-serve.js +13 -3
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +16 -0
- package/dist/channels/origin/api.d.ts +15 -4
- package/dist/channels/origin/api.d.ts.map +1 -1
- package/dist/channels/origin/api.js +19 -3
- package/dist/channels/origin/binding.d.ts +11 -0
- package/dist/channels/origin/binding.d.ts.map +1 -1
- package/dist/channels/origin/binding.js +41 -25
- package/dist/channels/origin/index.d.ts +1 -0
- package/dist/channels/origin/index.d.ts.map +1 -1
- package/dist/channels/origin/index.js +1 -0
- package/dist/channels/origin/origin-channel.d.ts +2 -0
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +40 -4
- package/dist/channels/origin/reactions.d.ts +56 -0
- package/dist/channels/origin/reactions.d.ts.map +1 -0
- package/dist/channels/origin/reactions.js +67 -0
- package/dist/channels/origin/types.d.ts +11 -0
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/approvals.d.ts +16 -0
- package/dist/channels/slack/approvals.d.ts.map +1 -1
- package/dist/channels/slack/approvals.js +86 -0
- package/dist/channels/slack/cli-project.d.ts +19 -0
- package/dist/channels/slack/cli-project.d.ts.map +1 -0
- package/dist/channels/slack/cli-project.js +234 -0
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +142 -63
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +1 -1
- package/dist/channels/slack/init.d.ts +3 -2
- package/dist/channels/slack/init.d.ts.map +1 -1
- package/dist/channels/slack/init.js +5 -5
- package/dist/channels/slack/interactive.d.ts +2 -1
- package/dist/channels/slack/interactive.d.ts.map +1 -1
- package/dist/channels/slack/interactive.js +15 -4
- package/dist/channels/slack/live-delivery.d.ts +1 -1
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +4 -2
- package/dist/channels/slack/manifest.d.ts +1 -1
- package/dist/channels/slack/manifest.js +1 -1
- package/dist/channels/slack/progress-delivery.d.ts +28 -0
- package/dist/channels/slack/progress-delivery.d.ts.map +1 -0
- package/dist/channels/slack/progress-delivery.js +115 -0
- package/dist/channels/slack/setup.d.ts +1 -1
- package/dist/channels/slack/setup.d.ts.map +1 -1
- package/dist/channels/slack/setup.js +10 -6
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +1 -0
- package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
- package/dist/channels/slack/tool-approval-events.js +91 -1
- package/dist/channels/slack/types.d.ts +9 -1
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.jXleCmOc.js → app.BplEAZ3S.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DpuI4i7Z.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.8LhyglIT.js → VPLocalSearchBox.CHXyv4wP.js} +1 -1
- package/dist/docs/assets/chunks/{theme.9ged-pr2.js → theme.BTcsZmjQ.js} +2 -2
- package/dist/docs/assets/{deployment.md.D9msOFOW.js → deployment.md.MFPKqsqI.js} +2 -2
- package/dist/docs/assets/{guides_mcp-oauth.md.DPYmBCbV.js → guides_mcp-oauth.md.CN-6YmTJ.js} +4 -4
- package/dist/docs/assets/{guides_mcp-oauth.md.DPYmBCbV.lean.js → guides_mcp-oauth.md.CN-6YmTJ.lean.js} +1 -1
- package/dist/docs/assets/guides_slack.md.VDXQV3ja.js +22 -0
- package/dist/docs/assets/guides_slack.md.VDXQV3ja.lean.js +1 -0
- package/dist/docs/assets/index.md.CVeRUOeZ.js +5 -0
- package/dist/docs/assets/{reference_agent-config.md.Cp_x38Nl.js → reference_agent-config.md.BHeYMgme.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.CCnG-nJx.js → reference_cli.md.DfoeyvL0.js} +9 -6
- package/dist/docs/assets/{reference_cli.md.CCnG-nJx.lean.js → reference_cli.md.DfoeyvL0.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.BH8Oc0D0.js → reference_connections.md.DxldvyIB.js} +4 -3
- package/dist/docs/assets/{reference_http-api.md.D89k1mdm.js → reference_http-api.md.BEJx9XVj.js} +2 -2
- package/dist/docs/assets/reference_sessions.md.NxFP_CAC.js +1 -0
- package/dist/docs/assets/{reference_tools.md.BHeXn2id.js → reference_tools.md.CvAHsdSp.js} +10 -2
- package/dist/docs/assets/{reference_tools.md.BHeXn2id.lean.js → reference_tools.md.CvAHsdSp.lean.js} +1 -1
- package/dist/docs/assets/templates_agents-md.md.CXSMZljE.js +2 -0
- package/dist/docs/assets/templates_agents-md.md.CXSMZljE.lean.js +1 -0
- package/dist/docs/assets/troubleshooting.md.DCiPBhYs.js +1 -0
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +4 -4
- package/dist/docs/deployment.html +7 -7
- package/dist/docs/deployment.md +5 -4
- package/dist/docs/design/runtime-abstraction.md +1757 -0
- package/dist/docs/evals.html +4 -4
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/cloud-runtime.html +4 -4
- package/dist/docs/guides/convert-automation.html +4 -4
- package/dist/docs/guides/github.html +4 -4
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/mcp-oauth.html +8 -8
- package/dist/docs/guides/mcp-oauth.md +26 -8
- package/dist/docs/guides/opentelemetry.html +4 -4
- package/dist/docs/guides/slack.html +17 -33
- package/dist/docs/guides/slack.md +92 -201
- package/dist/docs/guides/webhooks.html +4 -4
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +4 -4
- package/dist/docs/index.html +6 -6
- package/dist/docs/index.md +5 -3
- package/dist/docs/llms-full.txt +2065 -637
- package/dist/docs/llms.txt +3 -2
- package/dist/docs/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +6 -6
- package/dist/docs/reference/agent-config.md +2 -2
- package/dist/docs/reference/artifacts.html +4 -4
- package/dist/docs/reference/channels.html +4 -4
- package/dist/docs/reference/cli.html +13 -10
- package/dist/docs/reference/cli.md +32 -16
- package/dist/docs/reference/connections.html +9 -8
- package/dist/docs/reference/connections.md +6 -3
- package/dist/docs/reference/hooks.html +4 -4
- package/dist/docs/reference/http-api.html +7 -7
- package/dist/docs/reference/http-api.md +3 -1
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +4 -4
- package/dist/docs/reference/project-layout.html +4 -4
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +5 -5
- package/dist/docs/reference/sessions.md +4 -2
- package/dist/docs/reference/skills.html +4 -4
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +15 -7
- package/dist/docs/reference/tools.md +34 -2
- package/dist/docs/scaffolding-agents.html +4 -4
- package/dist/docs/storage.html +4 -4
- package/dist/docs/templates/agentic-owners.html +4 -4
- package/dist/docs/templates/agents-md.html +28 -0
- package/dist/docs/templates/agents-md.md +105 -0
- package/dist/docs/templates/code-wiki.html +5 -5
- package/dist/docs/templates/demo.html +4 -4
- package/dist/docs/templates/pr-autofixer.html +4 -4
- package/dist/docs/templates/security-help.html +4 -4
- package/dist/docs/templates/security-reviewer.html +5 -5
- package/dist/docs/templates/triage.html +4 -4
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/docs/troubleshooting.md +2 -2
- package/dist/evals/run-facts.d.ts.map +1 -1
- package/dist/evals/run-facts.js +27 -0
- package/dist/files-backends/cursor-hosted.d.ts +3 -2
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +3 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +15 -9
- package/dist/internal/approval-gate.d.ts +12 -13
- package/dist/internal/approval-gate.d.ts.map +1 -1
- package/dist/internal/approval-gate.js +16 -21
- package/dist/internal/as-of.d.ts +19 -0
- package/dist/internal/as-of.d.ts.map +1 -0
- package/dist/internal/as-of.js +82 -0
- package/dist/internal/chat-client.js +10 -0
- package/dist/internal/cli-deploy.d.ts +6 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +149 -21
- package/dist/internal/cli-mcp-oauth.js +8 -18
- package/dist/internal/cli-slack-manual.d.ts +24 -2
- package/dist/internal/cli-slack-manual.d.ts.map +1 -1
- package/dist/internal/cli-slack-manual.js +251 -20
- package/dist/internal/cli-slack.d.ts +9 -2
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +29 -82
- package/dist/internal/cursor/account-mcp.d.ts +1 -0
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +17 -0
- package/dist/internal/cursor-agent-template.d.ts +1 -1
- package/dist/internal/cursor-agent-template.d.ts.map +1 -1
- package/dist/internal/cursor-agent-template.js +1 -0
- package/dist/internal/cursor-event-relay.d.ts.map +1 -1
- package/dist/internal/cursor-event-relay.js +5 -6
- package/dist/internal/deploy-client.d.ts +17 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +31 -10
- package/dist/internal/env-file.d.ts +19 -0
- package/dist/internal/env-file.d.ts.map +1 -0
- package/dist/internal/env-file.js +90 -0
- package/dist/internal/framework-file-storage.d.ts +11 -17
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +17 -40
- package/dist/internal/framework-storage-selection.d.ts +13 -11
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +37 -26
- package/dist/internal/hosted-admission-adapter.d.ts +28 -0
- package/dist/internal/hosted-admission-adapter.d.ts.map +1 -0
- package/dist/internal/hosted-admission-adapter.js +7 -0
- package/dist/internal/hosted-delivery-protocol.d.ts +13 -1
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +8 -1
- package/dist/internal/hosted-delivery.d.ts +21 -1
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +101 -34
- package/dist/internal/hosted-execution-diag.d.ts +59 -0
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -0
- package/dist/internal/hosted-execution-diag.js +187 -0
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +85 -2
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +2 -0
- package/dist/internal/logs-client.d.ts +5 -0
- package/dist/internal/logs-client.d.ts.map +1 -1
- package/dist/internal/logs-client.js +5 -0
- package/dist/internal/mcp-endpoint.js +2 -3
- package/dist/internal/mcp-host.d.ts +10 -0
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +57 -8
- package/dist/internal/mcp-oauth-on-demand.d.ts +68 -0
- package/dist/internal/mcp-oauth-on-demand.d.ts.map +1 -0
- package/dist/internal/mcp-oauth-on-demand.js +287 -0
- package/dist/internal/mcp-oauth-persist.d.ts +42 -0
- package/dist/internal/mcp-oauth-persist.d.ts.map +1 -0
- package/dist/internal/mcp-oauth-persist.js +92 -0
- package/dist/internal/mcp-oauth.d.ts +1 -0
- package/dist/internal/mcp-oauth.d.ts.map +1 -1
- package/dist/internal/mcp-oauth.js +10 -2
- package/dist/internal/null-kv-storage.d.ts +48 -0
- package/dist/internal/null-kv-storage.d.ts.map +1 -0
- package/dist/internal/null-kv-storage.js +58 -0
- package/dist/internal/otel/collector.d.ts.map +1 -1
- package/dist/internal/otel/collector.js +22 -9
- package/dist/internal/server.d.ts +6 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +123 -33
- package/dist/internal/session-engine.d.ts +88 -3
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +538 -46
- package/dist/internal/session-run-log.d.ts +120 -0
- package/dist/internal/session-run-log.d.ts.map +1 -0
- package/dist/internal/session-run-log.js +359 -0
- package/dist/internal/sessions-client.d.ts +9 -7
- package/dist/internal/sessions-client.d.ts.map +1 -1
- package/dist/internal/sessions-client.js +3 -1
- package/dist/internal/storage-coordinator.d.ts +13 -0
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +37 -6
- package/dist/internal/storage-roles.d.ts +5 -0
- package/dist/internal/storage-roles.d.ts.map +1 -1
- package/dist/internal/stream-progress.d.ts.map +1 -1
- package/dist/internal/stream-progress.js +10 -0
- package/dist/internal/tool-policy.d.ts +29 -9
- package/dist/internal/tool-policy.d.ts.map +1 -1
- package/dist/internal/tool-policy.js +24 -0
- package/dist/internal/trajectory.d.ts.map +1 -1
- package/dist/internal/trajectory.js +10 -0
- package/dist/internal/turn-outbox.d.ts +24 -0
- package/dist/internal/turn-outbox.d.ts.map +1 -0
- package/dist/internal/turn-outbox.js +80 -0
- package/dist/playground/assets/index-D7rGZNjy.css +1 -0
- package/dist/playground/assets/index-jzNbJENa.js +69 -0
- package/dist/playground/index.html +2 -2
- package/dist/storage-backends/cursor-hosted.d.ts +1 -1
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +12 -0
- package/dist/storage-protocol.d.ts +8 -0
- package/dist/storage-protocol.d.ts.map +1 -1
- package/dist/storage-protocol.js +8 -0
- package/dist/storage.d.ts +8 -0
- package/dist/storage.d.ts.map +1 -1
- package/dist/tools.d.ts +12 -2
- package/dist/tools.d.ts.map +1 -1
- package/dist/types.d.ts +88 -7
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +5 -3
- package/docs/deployment.md +5 -4
- package/docs/design/runtime-abstraction.md +1757 -0
- package/docs/guides/mcp-oauth.md +26 -8
- package/docs/guides/slack.md +93 -202
- package/docs/reference/agent-config.md +2 -2
- package/docs/reference/cli.md +32 -16
- package/docs/reference/connections.md +6 -3
- package/docs/reference/http-api.md +3 -1
- package/docs/reference/sessions.md +4 -2
- package/docs/reference/tools.md +34 -2
- package/docs/templates/agents-md.md +110 -0
- package/docs/troubleshooting.md +2 -2
- package/package.json +1 -1
- package/skills/create-agent/SKILL.md +2 -1
- package/skills/mcp-auth/SKILL.md +6 -3
- package/skills/setup-slack/SKILL.md +23 -13
- package/src/bin/agent-serve.ts +12 -1
- package/src/channels/github/github-channel.ts +17 -0
- package/src/channels/origin/api.ts +24 -5
- package/src/channels/origin/binding.ts +55 -26
- package/src/channels/origin/index.ts +1 -0
- package/src/channels/origin/origin-channel.ts +78 -10
- package/src/channels/origin/reactions.ts +82 -0
- package/src/channels/origin/types.ts +11 -0
- package/src/channels/slack/approvals.ts +105 -0
- package/src/channels/slack/cli-project.ts +267 -0
- package/src/channels/slack/defaults.ts +165 -74
- package/src/channels/slack/dispatch.ts +2 -0
- package/src/channels/slack/init.ts +10 -5
- package/src/channels/slack/interactive.ts +35 -9
- package/src/channels/slack/live-delivery.ts +5 -3
- package/src/channels/slack/manifest.ts +1 -1
- package/src/channels/slack/progress-delivery.ts +133 -0
- package/src/channels/slack/setup.ts +10 -6
- package/src/channels/slack/slack-channel.ts +1 -0
- package/src/channels/slack/tool-approval-events.ts +93 -0
- package/src/channels/slack/types.ts +9 -1
- package/src/evals/run-facts.ts +32 -0
- package/src/files-backends/cursor-hosted.ts +3 -2
- package/src/index.ts +4 -0
- package/src/internal/advertise-tools.ts +31 -10
- package/src/internal/approval-gate.ts +20 -29
- package/src/internal/as-of.ts +107 -0
- package/src/internal/chat-client.ts +19 -0
- package/src/internal/cli-deploy.ts +203 -13
- package/src/internal/cli-mcp-oauth.ts +7 -21
- package/src/internal/cli-slack-manual.ts +350 -18
- package/src/internal/cli-slack.ts +40 -84
- package/src/internal/cursor/account-mcp.ts +21 -0
- package/src/internal/cursor-agent-template.ts +1 -0
- package/src/internal/cursor-event-relay.ts +5 -6
- package/src/internal/deploy-client.ts +43 -0
- package/src/internal/env-file.ts +84 -0
- package/src/internal/framework-file-storage.ts +18 -46
- package/src/internal/framework-storage-selection.ts +41 -25
- package/src/internal/hosted-admission-adapter.ts +42 -0
- package/src/internal/hosted-delivery-protocol.ts +14 -2
- package/src/internal/hosted-delivery.ts +169 -44
- package/src/internal/hosted-execution-diag.ts +252 -0
- package/src/internal/http-channel.ts +107 -0
- package/src/internal/init-project.ts +2 -0
- package/src/internal/logs-client.ts +5 -0
- package/src/internal/mcp-endpoint.ts +13 -4
- package/src/internal/mcp-host.ts +77 -11
- package/src/internal/mcp-oauth-on-demand.ts +352 -0
- package/src/internal/mcp-oauth-persist.ts +127 -0
- package/src/internal/mcp-oauth.ts +17 -1
- package/src/internal/null-kv-storage.ts +74 -0
- package/src/internal/otel/collector.ts +30 -0
- package/src/internal/server.ts +159 -11
- package/src/internal/session-engine.ts +691 -57
- package/src/internal/session-run-log.ts +584 -0
- package/src/internal/sessions-client.ts +17 -8
- package/src/internal/storage-coordinator.ts +49 -9
- package/src/internal/storage-roles.ts +7 -0
- package/src/internal/stream-progress.ts +19 -0
- package/src/internal/tool-policy.ts +49 -9
- package/src/internal/trajectory.ts +10 -0
- package/src/internal/turn-outbox.ts +85 -0
- package/src/storage-backends/cursor-hosted.ts +13 -1
- package/src/storage-protocol.ts +10 -0
- package/src/storage.ts +12 -0
- package/src/tools.ts +12 -2
- package/src/types.ts +93 -8
- package/templates/agents-md/README.md +39 -0
- package/templates/agents-md/agent/agent.ts +8 -0
- package/templates/agents-md/agent/channels/github.ts +10 -0
- package/templates/agents-md/agent/channels/queue.ts +28 -0
- package/templates/agents-md/agent/channels/slack.ts +9 -0
- package/templates/agents-md/agent/instructions.md +39 -0
- package/templates/agents-md/agent/lib/collect.ts +439 -0
- package/templates/agents-md/agent/lib/config.ts +8 -0
- package/templates/agents-md/agent/lib/paths.ts +51 -0
- package/templates/agents-md/agent/schedules/weekly.ts +17 -0
- package/templates/agents-md/agent/tools/apply_agents.ts +226 -0
- package/templates/agents-md/evals/agents.eval.ts +135 -0
- package/templates/agents-md/evals/evals.config.ts +5 -0
- package/templates/agents-md/init.json +38 -0
- package/templates/agents-md/package.json +18 -0
- package/templates/agents-md/tsconfig.json +12 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.DFoGuETX.js +0 -1
- package/dist/docs/assets/guides_slack.md.C32HsdKk.js +0 -38
- package/dist/docs/assets/guides_slack.md.C32HsdKk.lean.js +0 -1
- package/dist/docs/assets/index.md.CI93Ltlb.js +0 -5
- package/dist/docs/assets/reference_sessions.md.D0mIh4KK.js +0 -1
- package/dist/docs/assets/troubleshooting.md.Ctv3T8C2.js +0 -1
- package/dist/docs/design/agsh.md +0 -406
- package/dist/playground/assets/index-B1DDvBeC.css +0 -1
- package/dist/playground/assets/index-Cx9CclK_.js +0 -88
- package/docs/design/agsh.md +0 -406
- /package/dist/docs/assets/{deployment.md.D9msOFOW.lean.js → deployment.md.MFPKqsqI.lean.js} +0 -0
- /package/dist/docs/assets/{index.md.CI93Ltlb.lean.js → index.md.CVeRUOeZ.lean.js} +0 -0
- /package/dist/docs/assets/{reference_agent-config.md.Cp_x38Nl.lean.js → reference_agent-config.md.BHeYMgme.lean.js} +0 -0
- /package/dist/docs/assets/{reference_connections.md.BH8Oc0D0.lean.js → reference_connections.md.DxldvyIB.lean.js} +0 -0
- /package/dist/docs/assets/{reference_http-api.md.D89k1mdm.lean.js → reference_http-api.md.BEJx9XVj.lean.js} +0 -0
- /package/dist/docs/assets/{reference_sessions.md.D0mIh4KK.lean.js → reference_sessions.md.NxFP_CAC.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.Ctv3T8C2.lean.js → troubleshooting.md.DCiPBhYs.lean.js} +0 -0
package/docs/guides/mcp-oauth.md
CHANGED
|
@@ -8,8 +8,9 @@ description: "Authorize defineConnection({ url, oauth: true }) with agent-sdk mc
|
|
|
8
8
|
Use host MCP OAuth when your agent talks to a remote MCP server that
|
|
9
9
|
speaks OAuth, and you want credentials on the serve host (or the hosted
|
|
10
10
|
engine) instead of a Cursor account connector. Local login writes tokens
|
|
11
|
-
next to your Cursor credentials. `--store` copies
|
|
12
|
-
deployment as secrets so prod can reconnect after a redeploy.
|
|
11
|
+
next to your Cursor credentials. `--store` copies those tokens onto the
|
|
12
|
+
deployment as secrets so prod can reconnect after a redeploy. Hosted
|
|
13
|
+
Connect lets the current process retry.
|
|
13
14
|
|
|
14
15
|
The companion skill is
|
|
15
16
|
[`skills/mcp-auth/SKILL.md`](../../skills/mcp-auth/SKILL.md).
|
|
@@ -20,8 +21,8 @@ The companion skill is
|
|
|
20
21
|
flow (`agent-sdk mcp oauth <connection>`)
|
|
21
22
|
- Keep tokens in `mcp-auth.json` under the CLI config directory, bound
|
|
22
23
|
to that connection's resource URL
|
|
23
|
-
- Upsert deployment secrets with `--store` so
|
|
24
|
-
same tokens from env
|
|
24
|
+
- Upsert deployment secrets with `--store` so the next deploy seeds the
|
|
25
|
+
same tokens from env. Hosted Connect lets the current process retry.
|
|
25
26
|
- Use `advertiseTools: true` when local turns should call the server by
|
|
26
27
|
name. Host tools can still call it through `ctx.host.mcp`.
|
|
27
28
|
|
|
@@ -101,7 +102,16 @@ connection URL (tokens are bound to the resource URL).
|
|
|
101
102
|
|
|
102
103
|
## How do I store credentials on a hosted deployment?
|
|
103
104
|
|
|
104
|
-
Authorize once
|
|
105
|
+
Authorize once. Then get the tokens onto the deployment.
|
|
106
|
+
|
|
107
|
+
On a hosted engine, finishing Connect lets the current process retry.
|
|
108
|
+
Self-hosted serve writes tokens locally only.
|
|
109
|
+
|
|
110
|
+
`--store` from a signed-in laptop is the reliable way to put
|
|
111
|
+
`MCP_OAUTH_*` on the next deploy. If `agent-sdk secrets list` is
|
|
112
|
+
empty, run `--store` and redeploy.
|
|
113
|
+
|
|
114
|
+
From a laptop, push secrets with the CLI:
|
|
105
115
|
|
|
106
116
|
```bash
|
|
107
117
|
agent-sdk mcp oauth inventory --store
|
|
@@ -119,13 +129,21 @@ agent-sdk mcp oauth inventory --store
|
|
|
119
129
|
| `MCP_OAUTH_<NAME>_CLIENT_ID` | dynamic client id when registration returned one |
|
|
120
130
|
|
|
121
131
|
You must be signed in (`agent-sdk login`) with permission to set secrets
|
|
122
|
-
on that slug. Secrets apply on the **next** deploy
|
|
123
|
-
`agent-sdk deploy`
|
|
132
|
+
on that slug. Secrets apply on the **next** deploy. Run
|
|
133
|
+
`agent-sdk deploy` after `--store`. A fresh pod sees `MCP_OAUTH_*`
|
|
134
|
+
only after that deploy.
|
|
124
135
|
|
|
125
136
|
On the engine, when `mcp-auth.json` is empty, serve seeds the OAuth
|
|
126
137
|
provider from those env vars so host MCP calls work without a browser
|
|
127
138
|
on the pod.
|
|
128
139
|
|
|
140
|
+
These secrets are deployment-wide. Anyone who can list or set secrets
|
|
141
|
+
on that slug, and the hosted engine's runtime env, can use them. That
|
|
142
|
+
is the same blast radius as `--store`. They are not scoped to the
|
|
143
|
+
caller who clicked Connect. `cursorAccount: true` tokens stay on the
|
|
144
|
+
Cursor backend for the deployment service account and do not use
|
|
145
|
+
`MCP_OAUTH_*`.
|
|
146
|
+
|
|
129
147
|
## How do host tools call the server?
|
|
130
148
|
|
|
131
149
|
```ts
|
|
@@ -145,7 +163,7 @@ an allowlist or other deterministic gate.
|
|
|
145
163
|
| --- | --- |
|
|
146
164
|
| `must be defineConnection({ url, oauth: true })` | Add `oauth: true` on that connection, or pick the right connection name |
|
|
147
165
|
| Callback never completes | Keep port `8787` free; finish the browser login on this machine |
|
|
148
|
-
| Hosted calls unauthorized after `--store` | Confirm secrets with `agent-sdk secrets list <slug>`, then redeploy |
|
|
166
|
+
| Hosted calls unauthorized after Connect or `--store` | Confirm secrets with `agent-sdk secrets list <slug>`, then redeploy |
|
|
149
167
|
| Tokens ignored after URL change | Expected: resource URL binding drops stale entries. Re-run `mcp oauth` |
|
|
150
168
|
|
|
151
169
|
## What's next
|
package/docs/guides/slack.md
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Slack"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Run a Socket Mode Slack bot from the dashboard wizard, or import an app you own."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Slack agents
|
|
7
7
|
|
|
8
|
-
The Slack channel
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`agent-sdk slack init --manual` and paste the manifests at
|
|
12
|
-
[api.slack.com](https://api.slack.com/apps). Socket Mode has no
|
|
13
|
-
public Request URL. Replies stream in threads, with tool "thinking" steps,
|
|
14
|
-
suggested prompts, and opt-in approval buttons.
|
|
8
|
+
The Slack channel is a Socket Mode bot. The app connects out, so you
|
|
9
|
+
don't need a public Request URL. Mentions and DMs start a thread.
|
|
10
|
+
Replies stream there, with thinking steps and suggested prompts.
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
Use `agent-sdk slack create` when Cursor should own the Slack app. Use
|
|
13
|
+
`agent-sdk slack init --manual` when you own it. Commands and flags live
|
|
14
|
+
in the [CLI reference](../reference/cli.md#slack). Coding agents should
|
|
15
|
+
follow [`skills/setup-slack/SKILL.md`](../../skills/setup-slack/SKILL.md).
|
|
18
16
|
|
|
19
17
|
## Define the channel
|
|
20
18
|
|
|
@@ -24,35 +22,23 @@ Author `agent/channels/slack.ts` with `slackChannel()` from
|
|
|
24
22
|
```ts
|
|
25
23
|
import { slackChannel } from "@cursor/july/channels/slack";
|
|
26
24
|
|
|
27
|
-
// Single agent: reads SLACK_BOT_TOKEN + SLACK_APP_TOKEN
|
|
28
25
|
export default slackChannel();
|
|
29
|
-
|
|
30
|
-
// Multi-agent serve: one Slack app (and token pair) per agent
|
|
31
|
-
export default slackChannel({ envPrefix: "WEATHER_AGENT" });
|
|
32
|
-
// → WEATHER_AGENT_SLACK_BOT_TOKEN + WEATHER_AGENT_SLACK_APP_TOKEN
|
|
33
26
|
```
|
|
34
27
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
`
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
one
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
`missing_scope`), the pack degrades to `postMessage` instead of failing.
|
|
45
|
-
|
|
46
|
-
Missing tokens leave the channel idle (`channel idle … missing
|
|
47
|
-
credentials`) rather than failing `serve`. That's useful when you mount
|
|
48
|
-
many agents and only some have Slack apps.
|
|
28
|
+
`slackChannel()` reads `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN`. Pass
|
|
29
|
+
`envPrefix: "WEATHER_AGENT"` to read `WEATHER_AGENT_SLACK_BOT_TOKEN`
|
|
30
|
+
and `WEATHER_AGENT_SLACK_APP_TOKEN` instead. Use a prefix when one
|
|
31
|
+
host serves several Slack bots.
|
|
32
|
+
|
|
33
|
+
A thread is one conversation. The bot answers mentions and DMs. It
|
|
34
|
+
refuses Slack Connect users, guests, and people from other workspaces.
|
|
35
|
+
Missing tokens leave this channel idle. The rest of `serve` still
|
|
36
|
+
starts.
|
|
49
37
|
|
|
50
38
|
## Control who can message the agent
|
|
51
39
|
|
|
52
|
-
External senders are blocked
|
|
53
|
-
people
|
|
54
|
-
handler. Set `blockExternals: false` only when the agent should serve
|
|
55
|
-
people outside your org:
|
|
40
|
+
External senders are blocked. Set `blockExternals: false` only when
|
|
41
|
+
people outside your org should reach the agent:
|
|
56
42
|
|
|
57
43
|
```ts
|
|
58
44
|
export default slackChannel({
|
|
@@ -60,9 +46,8 @@ export default slackChannel({
|
|
|
60
46
|
});
|
|
61
47
|
```
|
|
62
48
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
`respondTo: "author"`:
|
|
49
|
+
Anyone in the thread can continue it. Restrict follow-ups to the person
|
|
50
|
+
who started the session with `respondTo: "author"`:
|
|
66
51
|
|
|
67
52
|
```ts
|
|
68
53
|
export default slackChannel({
|
|
@@ -72,234 +57,140 @@ export default slackChannel({
|
|
|
72
57
|
|
|
73
58
|
## Set it up
|
|
74
59
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
a manifest at [api.slack.com](https://api.slack.com/apps) unless you
|
|
80
|
-
are on the [manual setup](#manual-setup) path.
|
|
81
|
-
|
|
82
|
-
Bots that already have tokens in `.env.local` keep working. Skip the
|
|
83
|
-
wizard unless you want a Cursor-managed app.
|
|
60
|
+
`slack create` opens the Cursor dashboard wizard. Finish Slack consent
|
|
61
|
+
and the bot name there. The CLI writes tokens to `.env.local` and never
|
|
62
|
+
prints them. Skip the wizard if those tokens are already set, unless
|
|
63
|
+
you want a Cursor-managed app.
|
|
84
64
|
|
|
85
65
|
### Provision with the CLI
|
|
86
66
|
|
|
87
67
|
```bash
|
|
88
|
-
agent-sdk slack create --dir .
|
|
89
|
-
agent-sdk slack create --dir . --prod
|
|
68
|
+
agent-sdk slack create --dir .
|
|
69
|
+
agent-sdk slack create --dir . --prod
|
|
90
70
|
```
|
|
91
71
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
72
|
+
Sign in first (`agent-sdk login` or `CURSOR_API_KEY`). Finish **Add
|
|
73
|
+
Slack to this agent** as the same Cursor account. Then run
|
|
74
|
+
`agent-sdk slack doctor --prefix MY_AGENT` and serve:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
agent-sdk serve --dir . --dev
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Invite the bot and mention it, or DM it. Expect a Thinking status,
|
|
81
|
+
then a threaded streaming reply.
|
|
82
|
+
|
|
83
|
+
If Slack needs a workspace admin, keep the CLI running. Open the
|
|
84
|
+
**Request approval** link it prints. After an admin approves, click
|
|
104
85
|
**Retry** in the wizard.
|
|
105
86
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
that Slack app. It keeps the Slack app id and replaces the manifest and
|
|
110
|
-
tokens. `agent-sdk slack destroy` deletes the provisioned app.
|
|
111
|
-
`agent-sdk slack icon <source>` updates the icon later.
|
|
87
|
+
`slack destroy` deletes the Cursor-managed app. `slack icon` updates
|
|
88
|
+
its icon. A second `slack create` for the same agent and environment
|
|
89
|
+
replaces that app's manifest and tokens.
|
|
112
90
|
|
|
113
91
|
### Provision from the dashboard
|
|
114
92
|
|
|
115
93
|
The same wizard is on [Deployed Agents](https://cursor.com/dashboard).
|
|
116
|
-
Open **Integrations**
|
|
117
|
-
or follow the URL `slack create` printed.
|
|
94
|
+
Open **Integrations** and click **Add Slack to this agent**.
|
|
118
95
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
**Deploy** injects the stored secrets; there is no Slack-only Redeploy.
|
|
96
|
+
Local `agent-sdk serve` reads `.env.local`. The next deploy injects the
|
|
97
|
+
stored secrets.
|
|
122
98
|
|
|
123
|
-
If Slack needs admin approval,
|
|
124
|
-
|
|
125
|
-
reminder). After an admin approves, click **Retry**.
|
|
99
|
+
If Slack needs admin approval, click **Request approval**, then
|
|
100
|
+
**Retry** after an admin approves.
|
|
126
101
|
|
|
127
|
-
The app row's menu covers
|
|
128
|
-
|
|
102
|
+
The app row's menu covers rename, icon, token rotation, removal, and
|
|
103
|
+
workspace disconnect.
|
|
129
104
|
|
|
130
|
-
###
|
|
105
|
+
### Create your own Slack app
|
|
131
106
|
|
|
132
|
-
`
|
|
133
|
-
|
|
134
|
-
|
|
107
|
+
`slack init --manual` is for an app you own. It writes the channel file
|
|
108
|
+
and Slack manifests. When Slack CLI (`~/.slack/bin/slack`) is logged
|
|
109
|
+
in, it installs the app. When it isn't, install the app yourself.
|
|
135
110
|
|
|
136
111
|
```bash
|
|
137
|
-
agent-sdk slack
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Proceed when `app_token`, `connections_open`, `bot_token`, and
|
|
141
|
-
`auth_test` are all green. Then serve and smoke it:
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
agent-sdk serve --dir . --dev
|
|
145
|
-
# expect: [agent-sdk/slack] Socket Mode connected
|
|
112
|
+
agent-sdk slack init --manual --dir . --name "My Agent"
|
|
146
113
|
```
|
|
147
114
|
|
|
148
|
-
|
|
149
|
-
Thinking… status, then a threaded streaming reply, with correlated
|
|
150
|
-
server logs (`inbound kind=app_mention`, `session start`,
|
|
151
|
-
`reply delivered via stream|postMessage`).
|
|
152
|
-
|
|
153
|
-
### Manual setup
|
|
154
|
-
|
|
155
|
-
`slack init --manual` is for a Slack app you own at api.slack.com. You
|
|
156
|
-
paste the generated manifests and mint tokens yourself. Use this when
|
|
157
|
-
you want an unmanaged app, or when the dashboard wizard is not an
|
|
158
|
-
option.
|
|
115
|
+
Install Slack CLI if you need it:
|
|
159
116
|
|
|
160
117
|
```bash
|
|
161
|
-
|
|
118
|
+
curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash
|
|
162
119
|
```
|
|
163
120
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
events.
|
|
121
|
+
Log in with `slack login --no-prompt`. In Slack, send
|
|
122
|
+
`/slackauthticket <ticket>`, then
|
|
123
|
+
`slack login --ticket <ticket> --challenge <code>`. Install the
|
|
124
|
+
workspace app with `slack app install`. Create a separate production
|
|
125
|
+
app the same way.
|
|
170
126
|
|
|
171
|
-
|
|
172
|
-
|
|
127
|
+
Or paste `.slack/manifest.dev.json` at
|
|
128
|
+
[api.slack.com/apps](https://api.slack.com/apps) (**Create New App** →
|
|
129
|
+
**From a manifest**). Repeat with `.slack/manifest.prod.json`. Dev and
|
|
130
|
+
prod are separate Slack apps.
|
|
173
131
|
|
|
174
|
-
|
|
132
|
+
Then put a bot token (`xoxb-...`) and an app-level token with
|
|
133
|
+
`connections:write` (`xapp-...`) in `.env.local`. Use the names
|
|
134
|
+
`slack init --manual` printed. Run `slack doctor` and serve as above.
|
|
175
135
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
1. Open [api.slack.com/apps](https://api.slack.com/apps) → **Create New
|
|
179
|
-
App** → **From a manifest**.
|
|
180
|
-
2. Paste `manifest.dev.json` and create the dev app.
|
|
181
|
-
3. Repeat with `manifest.prod.json`. Dev and prod are separate Slack
|
|
182
|
-
apps with separate tokens.
|
|
183
|
-
|
|
184
|
-
#### Install and mint tokens
|
|
185
|
-
|
|
186
|
-
For each app: **Install to Workspace** and copy the Bot User OAuth Token
|
|
187
|
-
(`xoxb-…`). Then under **Basic Information → App-Level Tokens** create a
|
|
188
|
-
token with scope `connections:write` and copy it (`xapp-…`).
|
|
189
|
-
|
|
190
|
-
Put the pair in `.env.local` using the names from `env.example`, then
|
|
191
|
-
run `slack doctor` and serve as [above](#wire-the-env-and-verify).
|
|
136
|
+
Serve this app with Agent SDK. Do not run `slack deploy`.
|
|
192
137
|
|
|
193
138
|
## Choose when the agent engages
|
|
194
139
|
|
|
195
|
-
Mentions and DMs are on
|
|
196
|
-
|
|
140
|
+
Mentions and DMs are on. Watching channel posts without a mention is
|
|
141
|
+
opt-in:
|
|
197
142
|
|
|
198
143
|
```ts
|
|
199
144
|
export default slackChannel({
|
|
200
145
|
envPrefix: "TRIAGE",
|
|
201
146
|
engagement: {
|
|
202
|
-
// mentions / directMessages default to true
|
|
203
147
|
channelPosts: {
|
|
204
|
-
allow: ["#triage-alerts"],
|
|
205
|
-
posts: "top-level",
|
|
206
|
-
debounceMs: 15_000,
|
|
207
|
-
includeBotPosts: false, // default: bot-authored posts never dispatch
|
|
148
|
+
allow: ["#triage-alerts"],
|
|
149
|
+
posts: "top-level",
|
|
150
|
+
debounceMs: 15_000,
|
|
208
151
|
},
|
|
209
152
|
},
|
|
210
|
-
onChannelPost: async (
|
|
211
|
-
// same contract as onAppMention: return null to skip
|
|
153
|
+
onChannelPost: async (_ctx, message) => {
|
|
212
154
|
return message.markdown.length > 20 ? {} : null;
|
|
213
155
|
},
|
|
214
156
|
});
|
|
215
157
|
```
|
|
216
158
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
`
|
|
220
|
-
channel.
|
|
221
|
-
|
|
222
|
-
Set `allow: ["*"]` to watch every channel the bot has joined.
|
|
159
|
+
Pass `--channel-posts` on `slack create` or `slack init --manual` so
|
|
160
|
+
the Slack app receives those events. The bot must be in each watched
|
|
161
|
+
channel. `allow: ["*"]` watches every joined channel.
|
|
223
162
|
|
|
224
|
-
Set `includeBotPosts: true`
|
|
225
|
-
|
|
226
|
-
watching app's own posts stay dropped either way, matched by the `bot_id`
|
|
227
|
-
and bot user id from `auth.test`, so an agent can never dispatch on its
|
|
228
|
-
own replies. Use this for a bot-fed alerts channel.
|
|
163
|
+
Set `includeBotPosts: true` for alert feeds and other bots. This app
|
|
164
|
+
never wakes on its own posts.
|
|
229
165
|
|
|
230
166
|
## Prepare work on the host
|
|
231
167
|
|
|
232
168
|
Mention and DM handlers may return a prepared `message`,
|
|
233
|
-
`workspaceFiles`, or `cloud` block.
|
|
169
|
+
`workspaceFiles`, or `cloud` block. Use the same host-prep pattern as
|
|
234
170
|
[custom channels](./webhooks.md#prepare-on-the-host-then-hand-off).
|
|
235
|
-
PR agents use it: extract a PR URL from the mention text and run the
|
|
236
|
-
same host path as the HTTP channel.
|
|
237
171
|
|
|
238
|
-
Slack file uploads
|
|
172
|
+
Slack file uploads attach automatically. Images become vision input.
|
|
239
173
|
Supported documents become workspace files for the turn.
|
|
240
174
|
|
|
241
175
|
## Add approval buttons
|
|
242
176
|
|
|
243
|
-
Tools with `needsApproval` park until a person decides.
|
|
244
|
-
|
|
177
|
+
Tools with `needsApproval` park until a person decides. Post those
|
|
178
|
+
decisions in Slack with one flag:
|
|
245
179
|
|
|
246
180
|
```ts
|
|
247
181
|
export default slackChannel({
|
|
248
|
-
toolApprovals: true,
|
|
182
|
+
toolApprovals: true,
|
|
249
183
|
});
|
|
250
184
|
```
|
|
251
185
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
Cards show redacted, truncated arguments (Block Kit size limits);
|
|
258
|
-
execution still uses the full validated input, so review sensitive tools
|
|
259
|
-
in the playground when the arguments may exceed the card. Approvals
|
|
260
|
-
exist for `execution: "server"` tools on the local runtime only, and
|
|
261
|
-
parked calls do not survive a host restart. The full lifecycle is in
|
|
186
|
+
The Slack app needs interactivity. Recreate it with `slack create` if
|
|
187
|
+
clicks do nothing. Cards show redacted, truncated arguments. Execution
|
|
188
|
+
still uses the full input, so review sensitive tools in the playground
|
|
189
|
+
when the card may hide fields. The lifecycle is in
|
|
262
190
|
[Human-in-the-loop](./human-in-the-loop.md).
|
|
263
191
|
|
|
264
192
|
## Run several agents on one host
|
|
265
193
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
with their Slack channel idle while everything else serves normally.
|
|
270
|
-
|
|
271
|
-
## Keep the channel healthy
|
|
272
|
-
|
|
273
|
-
Two habits matter most.
|
|
274
|
-
|
|
275
|
-
- Don't `await` long work inside Slack dispatch handlers. The pack
|
|
276
|
-
dispatches through `waitUntil` and streams as the turn progresses.
|
|
277
|
-
- In `--dev` (loopback) or `--allow-anonymous` (trusted shared host), the
|
|
278
|
-
playground can list and stream Slack sessions and resolve their parked
|
|
279
|
-
approvals (the audit trail records the HTTP caller). Bearer-auth hosts
|
|
280
|
-
stay strict: Slack approvals must come from Slack interactivity or a
|
|
281
|
-
matching principal.
|
|
282
|
-
|
|
283
|
-
## CLI reference
|
|
284
|
-
|
|
285
|
-
The `slack` subcommands cover setup end to end.
|
|
286
|
-
|
|
287
|
-
```bash
|
|
288
|
-
agent-sdk slack setup # printed setup guide
|
|
289
|
-
agent-sdk slack create --dir . # dashboard wizard (dev app)
|
|
290
|
-
agent-sdk slack create --dir . --prod # prod app
|
|
291
|
-
agent-sdk slack destroy --dir . # delete the provisioned app
|
|
292
|
-
agent-sdk slack icon ./icon.png --dir . # set the provisioned app's icon
|
|
293
|
-
agent-sdk slack init --manual --dir . # manifests to paste at api.slack.com
|
|
294
|
-
agent-sdk slack manifest --env both # regenerate those JSON files
|
|
295
|
-
agent-sdk slack doctor --prefix MY_AGENT # token / connectivity checks
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
## What's next
|
|
299
|
-
|
|
300
|
-
Continue with these pages:
|
|
301
|
-
|
|
302
|
-
- [Human-in-the-loop](./human-in-the-loop.md): the approval lifecycle
|
|
303
|
-
behind `toolApprovals`
|
|
304
|
-
- [Webhooks and custom channels](./webhooks.md): the mechanism this
|
|
305
|
-
pack is built on
|
|
194
|
+
Give each agent its own Slack app and token pair. Set `envPrefix` so
|
|
195
|
+
the names don't collide (`WEATHER_AGENT_SLACK_*`, `TRIAGE_SLACK_*`).
|
|
196
|
+
Agents without tokens stay idle. The others still serve.
|
|
@@ -184,8 +184,8 @@ When every slot is busy, newly admitted turns queue FIFO instead of
|
|
|
184
184
|
failing: the stream records a durable `turn.queued` event with the
|
|
185
185
|
queue position, `GET /v1/sessions` reports `queued: true`, and each
|
|
186
186
|
queued turn starts as soon as a slot frees. A queued turn still counts
|
|
187
|
-
as running for busy semantics: follow-ups preempt it, and direct
|
|
188
|
-
calls get `409 session_busy`. Omit for unlimited.
|
|
187
|
+
as running for busy semantics: follow-ups preempt it, and direct
|
|
188
|
+
write-effect tool calls get `409 session_busy`. Omit for unlimited.
|
|
189
189
|
|
|
190
190
|
```ts
|
|
191
191
|
export default defineAgent({
|
package/docs/reference/cli.md
CHANGED
|
@@ -342,8 +342,9 @@ the value before execution. A local call needs no inference credential.
|
|
|
342
342
|
A hosted call still needs Cursor credentials to reach the deployment.
|
|
343
343
|
|
|
344
344
|
`--session` runs the tool inside an existing session and records it on
|
|
345
|
-
the event stream. If a model turn is active or pending,
|
|
346
|
-
|
|
345
|
+
the event stream. If a model turn is active or pending, a read-effect
|
|
346
|
+
tool runs alongside it and a write-effect tool gets `session_busy`;
|
|
347
|
+
retry after the turn finishes. The command
|
|
347
348
|
prints the server's JSON response and exits non-zero unless the HTTP
|
|
348
349
|
response succeeds with `ok: true`. See
|
|
349
350
|
[Tools](./tools.md#call-a-tool-without-a-model-turn).
|
|
@@ -415,6 +416,7 @@ non-zero when the reconstructed trajectory failed.
|
|
|
415
416
|
agent-sdk init ./my-agent # scaffold package.json, tsconfig.json, agent/ + a demo tool
|
|
416
417
|
agent-sdk init ./my-demo --template demo # record a PR walkthrough
|
|
417
418
|
agent-sdk init ./code-wiki --template code-wiki # keep wiki pages current after merge
|
|
419
|
+
agent-sdk init ./agents-md --template agents-md # keep AGENTS.md current from last week's PRs and Slack
|
|
418
420
|
agent-sdk init ./my-reviewer --template security-reviewer # review PRs for security bugs
|
|
419
421
|
agent-sdk init ./security-help --template security-help # answer security questions in Slack
|
|
420
422
|
agent-sdk init ./my-triage --template triage-linear # comment on Linear issues
|
|
@@ -432,8 +434,9 @@ agent-sdk init # no directory: print the setup guide
|
|
|
432
434
|
`@cursor/july` resolves for `dev` and `run`.
|
|
433
435
|
|
|
434
436
|
Templates may ship `init.json`. On a TTY, `init` asks those questions
|
|
435
|
-
before writing files. `code-wiki`, `pr-autofixer`,
|
|
436
|
-
ask for GitHub repos.
|
|
437
|
+
before writing files. `code-wiki`, `pr-autofixer`, `security-help`, and
|
|
438
|
+
`agents-md` ask for GitHub repos. `agents-md` also asks for Slack
|
|
439
|
+
channels. Repeat
|
|
437
440
|
`--var id=value` to answer without a prompt.
|
|
438
441
|
`--json` and non-TTY hosts skip the interview unless `--var` is set.
|
|
439
442
|
|
|
@@ -591,7 +594,8 @@ commands with an explicit `--json` flag skip this automatic check.
|
|
|
591
594
|
agent-sdk deploy [--dir <path>] [--slug <slug> | --all] [--team <id>]
|
|
592
595
|
[--repo <https-url>] [--ref <git-ref>] [--path <agent-path>]
|
|
593
596
|
[--cursor-events-repo owner/name]...
|
|
594
|
-
[--allow-domain <domain>]...
|
|
597
|
+
[--allow-domain <domain>]...
|
|
598
|
+
[--no-wait] [--json]
|
|
595
599
|
```
|
|
596
600
|
|
|
597
601
|
Managed hosting requires team-admin permission and the team's
|
|
@@ -744,6 +748,8 @@ URL connections run a browser PKCE flow. Tokens are written to
|
|
|
744
748
|
`mcp-auth.json` under the CLI config directory (override with
|
|
745
749
|
`AGENT_SERVE_CONFIG_DIR`). Pass `--store` to upsert matching
|
|
746
750
|
`MCP_OAUTH_<CONNECTION>_*` secrets on the hosted deployment.
|
|
751
|
+
`--store` is the path for the next deploy. Hosted Connect lets the
|
|
752
|
+
current process retry.
|
|
747
753
|
|
|
748
754
|
Cursor-account connections authorize the hosted deployment's service
|
|
749
755
|
account through the Cursor backend's connector consent flow. Those
|
|
@@ -822,6 +828,7 @@ agent-sdk slack icon <https-url-or-file> [--dir <path>] [--prod]
|
|
|
822
828
|
[--slack-team <T…>] [--team <id>] [--json]
|
|
823
829
|
agent-sdk slack init --manual [--dir <path>] [--name <name>]
|
|
824
830
|
[--prefix <prefix> | --no-prefix] [--channel-posts]
|
|
831
|
+
[--install | --no-install] [--slack-team <T…>] [--prod]
|
|
825
832
|
agent-sdk slack manifest [--dir <path>] [--name <name>]
|
|
826
833
|
[--env dev|prod|both] [--channel-posts] [--print]
|
|
827
834
|
agent-sdk slack doctor [--dir <path>] [--prefix <prefix> | --no-prefix] [--json]
|
|
@@ -850,17 +857,26 @@ a local png, jpg, or gif file of at most 512KB.
|
|
|
850
857
|
|
|
851
858
|
`slack init` without `--manual` exits non-zero and writes no files. Use
|
|
852
859
|
`slack create` for the dashboard wizard. `slack init --manual` writes
|
|
853
|
-
the channel file, development and production manifests,
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
the
|
|
863
|
-
|
|
860
|
+
the channel file, development and production manifests, a Slack CLI
|
|
861
|
+
`.slack/` project (hook + manifests, committed with the repo). When
|
|
862
|
+
Slack CLI is logged in, it installs the app. Otherwise `next` asks
|
|
863
|
+
you to install it. `--install` requires that install. `--no-install`
|
|
864
|
+
skips it. `--prod` selects the deployed app.
|
|
865
|
+
`--slack-team` picks the workspace. Slack CLI keeps install tokens in
|
|
866
|
+
that process; copy `xoxb` and mint `xapp` (`connections:write`) into
|
|
867
|
+
`.env.local`. Tokens that appear in `.env` during that install are
|
|
868
|
+
copied onto the prefixed names. Paste `.slack/manifest.dev.json` at
|
|
869
|
+
api.slack.com when the Slack CLI is missing. Do not run
|
|
870
|
+
`slack deploy`. The command refuses to overwrite the channel file.
|
|
871
|
+
It updates the Slack CLI hook and manifests when `.slack/` already
|
|
872
|
+
exists. If a collision occurs, it exits non-zero; files created
|
|
873
|
+
earlier in the run remain. The token prefix defaults to the directory
|
|
874
|
+
basename normalized to uppercase snake case.
|
|
875
|
+
Explicit `--prefix` values use the same normalization. For example,
|
|
876
|
+
`pr-approver` becomes `PR_APPROVER_SLACK_BOT_TOKEN`. `--no-prefix`
|
|
877
|
+
uses shared `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN`.
|
|
878
|
+
`--channel-posts` subscribes the manifests to channel-post events.
|
|
879
|
+
The command always prints a JSON summary.
|
|
864
880
|
|
|
865
881
|
`slack manifest` regenerates selected manifest files. `--env` defaults
|
|
866
882
|
to `both`, and `--name` defaults to the directory name. `--print` writes
|
|
@@ -35,8 +35,10 @@ Tokens come from env vars. Never hardcode them in the file.
|
|
|
35
35
|
## Host MCP OAuth
|
|
36
36
|
|
|
37
37
|
For servers that speak OAuth, set `oauth: true` and authorize with the
|
|
38
|
-
CLI. Tokens live in `mcp-auth.json` under the CLI
|
|
39
|
-
copies them onto the
|
|
38
|
+
CLI or mid-run Connect. Tokens live in `mcp-auth.json` under the CLI
|
|
39
|
+
config directory. `--store` copies them onto the deployment as
|
|
40
|
+
`MCP_OAUTH_<NAME>_*` secrets. Hosted Connect lets the current
|
|
41
|
+
process retry.
|
|
40
42
|
|
|
41
43
|
```ts
|
|
42
44
|
export default defineConnection({
|
|
@@ -48,6 +50,7 @@ export default defineConnection({
|
|
|
48
50
|
```bash
|
|
49
51
|
agent-sdk mcp oauth inventory # browser PKCE → local mcp-auth.json
|
|
50
52
|
agent-sdk mcp oauth inventory --store # also upsert deployment secrets
|
|
53
|
+
# Hosted Connect retries this process. Self-hosted stays file-only.
|
|
51
54
|
```
|
|
52
55
|
|
|
53
56
|
Full walkthrough: [Host MCP OAuth](../guides/mcp-oauth.md). Companion
|
|
@@ -266,7 +269,7 @@ lazily on first use.
|
|
|
266
269
|
|
|
267
270
|
Continue with these pages:
|
|
268
271
|
|
|
269
|
-
- [Host MCP OAuth](../guides/mcp-oauth.md): `mcp oauth`, `--store`
|
|
272
|
+
- [Host MCP OAuth](../guides/mcp-oauth.md): `mcp oauth`, Connect, `--store`
|
|
270
273
|
- [Agent-to-agent](../guides/agent-to-agent.md): peers in depth
|
|
271
274
|
- [Tools](./tools.md): authored tools that wrap MCP connections
|
|
272
275
|
- [Webhooks](../guides/webhooks.md): calling MCP connections from handlers
|
|
@@ -53,6 +53,7 @@ and `playgroundUrl` deep-links the session in the playground.
|
|
|
53
53
|
| `message` | Required user message |
|
|
54
54
|
| `title` | Session title |
|
|
55
55
|
| `dryRun` | Run read tools and stub write tools |
|
|
56
|
+
| `asOf` | ISO-8601 instant with a timezone, frozen at create; the prompt states it, `ctx.now()` returns it, and tools declaring `timeArgs` refuse calls not bounded at or before it. `400` when unusable |
|
|
56
57
|
| `workspaceFiles` | UTF-8 files written into the session workspace |
|
|
57
58
|
| `cloud` | Per-session cloud options merged over the agent defaults |
|
|
58
59
|
|
|
@@ -134,7 +135,8 @@ curl -X POST http://127.0.0.1:3000/<slug>/v1/tools/inspect_pr \
|
|
|
134
135
|
It runs an authored server tool in-process: schema-validated, no model
|
|
135
136
|
turn. An optional `"sessionId"` in the body runs it inside an existing
|
|
136
137
|
session and records it on that session's stream (`409 session_busy`
|
|
137
|
-
while a turn runs
|
|
138
|
+
for a write-effect call while a turn runs; reads run alongside the
|
|
139
|
+
turn). Agent-execution tools are rejected with `400`, and
|
|
138
140
|
unknown tools with `404` and the list of available names. For the
|
|
139
141
|
semantics, see [Tools](./tools.md#call-a-tool-without-a-model-turn).
|
|
140
142
|
|