@cursor/july 0.1.95 → 0.1.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +3 -4
- package/README.md +3 -2
- package/dist/bin/agent-serve.js +14 -3
- package/dist/channels/deployments/types.d.ts +1 -1
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/deployments/types.js +1 -0
- package/dist/channels/origin/api.d.ts +72 -15
- package/dist/channels/origin/api.d.ts.map +1 -1
- package/dist/channels/origin/api.js +185 -28
- package/dist/channels/origin/binding.d.ts +13 -2
- package/dist/channels/origin/binding.d.ts.map +1 -1
- package/dist/channels/origin/binding.js +41 -25
- package/dist/channels/origin/checks.d.ts +6 -6
- package/dist/channels/origin/checks.js +6 -6
- package/dist/channels/origin/cursor-account.d.ts +5 -3
- package/dist/channels/origin/cursor-account.d.ts.map +1 -1
- package/dist/channels/origin/cursor-account.js +5 -3
- package/dist/channels/origin/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.map +1 -1
- package/dist/channels/origin/origin-channel.js +3 -0
- 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/api.d.ts +9 -0
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +36 -5
- package/dist/channels/slack/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 +110 -81
- package/dist/channels/slack/dispatch.d.ts +7 -1
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +47 -23
- package/dist/channels/slack/inbound.d.ts +8 -0
- package/dist/channels/slack/inbound.d.ts.map +1 -1
- package/dist/channels/slack/inbound.js +32 -0
- package/dist/channels/slack/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 +26 -29
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +172 -73
- package/dist/channels/slack/manifest.d.ts +1 -1
- package/dist/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +6 -2
- package/dist/channels/slack/nudge-carrier.d.ts +2 -0
- package/dist/channels/slack/nudge-carrier.d.ts.map +1 -1
- package/dist/channels/slack/nudge-carrier.js +48 -1
- package/dist/channels/slack/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 +3 -2
- package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
- package/dist/channels/slack/tool-approval-events.js +91 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.BBj0klBO.js → app.B3rWNYE1.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.BU9nHdnQ.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CUEXpL78.js → VPLocalSearchBox.C1lhqJJR.js} +1 -1
- package/dist/docs/assets/chunks/{theme.DabmQnia.js → theme.B40_SXuv.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/{index.md.BoHaMdeZ.lean.js → index.md.CVeRUOeZ.lean.js} +1 -1
- 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.BsMOxDvh.js → reference_cli.md.RyZf5OTE.js} +10 -6
- package/dist/docs/assets/{reference_cli.md.BsMOxDvh.lean.js → reference_cli.md.RyZf5OTE.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.5zOAbV86.js} +1 -1
- package/dist/docs/assets/reference_sessions.md.NxFP_CAC.js +1 -0
- package/dist/docs/assets/{reference_tools.md.BHeXn2id.js → reference_tools.md.B84gw9Ii.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/templates_code-wiki.md.CDYZIBFN.js +2 -0
- package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +1 -0
- package/dist/docs/assets/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/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 +7 -3
- package/dist/docs/llms-full.txt +398 -653
- 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 +14 -10
- package/dist/docs/reference/cli.md +39 -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 +6 -6
- package/dist/docs/reference/http-api.md +2 -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 +6 -6
- package/dist/docs/reference/tools.md +9 -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 +28 -0
- package/dist/docs/templates/code-wiki.md +91 -0
- package/dist/docs/templates/demo.html +5 -5
- 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 +26 -4
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +32 -4
- package/dist/internal/advertise-tools.d.ts +2 -0
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +30 -10
- 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/bounded.d.ts +7 -0
- package/dist/internal/bounded.d.ts.map +1 -0
- package/dist/internal/bounded.js +32 -0
- package/dist/internal/chat-client.js +10 -0
- package/dist/internal/cli-deploy.d.ts +5 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +57 -18
- 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/conversation-mirror.d.ts +11 -8
- package/dist/internal/conversation-mirror.d.ts.map +1 -1
- package/dist/internal/conversation-mirror.js +116 -55
- 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/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +22 -48
- package/dist/internal/cursor/session-token.d.ts +45 -0
- package/dist/internal/cursor/session-token.d.ts.map +1 -0
- package/dist/internal/cursor/session-token.js +99 -0
- package/dist/internal/cursor-agent-template.d.ts +1 -1
- package/dist/internal/cursor-agent-template.d.ts.map +1 -1
- package/dist/internal/cursor-agent-template.js +2 -0
- 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 +61 -0
- package/dist/internal/framework-file-storage.d.ts.map +1 -0
- package/dist/internal/framework-file-storage.js +210 -0
- package/dist/internal/framework-storage-selection.d.ts +11 -5
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +38 -11
- package/dist/internal/hosted-delivery-protocol.d.ts +7 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +7 -0
- package/dist/internal/hosted-delivery.d.ts +13 -0
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +64 -19
- package/dist/internal/hosted-execution-diag.d.ts +48 -0
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -0
- package/dist/internal/hosted-execution-diag.js +150 -0
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +81 -1
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +4 -0
- package/dist/internal/install-cursor-skills.d.ts.map +1 -1
- package/dist/internal/install-cursor-skills.js +1 -3
- 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/managed-delivery.d.ts +80 -0
- package/dist/internal/managed-delivery.d.ts.map +1 -0
- package/dist/internal/managed-delivery.js +86 -0
- package/dist/internal/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/otel/collector.d.ts.map +1 -1
- package/dist/internal/otel/collector.js +22 -9
- package/dist/internal/runtime-dispatch-runner.d.ts +5 -1
- package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
- package/dist/internal/runtime-dispatch-runner.js +7 -0
- package/dist/internal/sdk-runner.d.ts +11 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +39 -8
- package/dist/internal/server.d.ts +3 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +49 -21
- package/dist/internal/session-engine.d.ts +101 -3
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +577 -46
- 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/steering.d.ts +15 -0
- package/dist/internal/steering.d.ts.map +1 -0
- package/dist/internal/steering.js +18 -0
- package/dist/internal/storage-coordinator.d.ts +7 -0
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +28 -5
- 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 +9 -1
- package/dist/internal/tool-policy.d.ts.map +1 -1
- package/dist/internal/tool-policy.js +13 -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-CZA1uEWA.js → index-DrkI6y5O.js} +51 -51
- package/dist/playground/assets/index-DzNGwm7q.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/storage-backends/cursor-hosted.d.ts +9 -6
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +16 -3
- package/dist/storage.d.ts +8 -0
- package/dist/storage.d.ts.map +1 -1
- package/dist/types.d.ts +65 -8
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +7 -3
- package/docs/deployment.md +5 -4
- 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 +39 -16
- package/docs/reference/connections.md +6 -3
- package/docs/reference/http-api.md +2 -1
- package/docs/reference/sessions.md +4 -2
- package/docs/reference/tools.md +9 -2
- package/docs/templates/agents-md.md +110 -0
- package/docs/templates/code-wiki.md +96 -0
- package/docs/troubleshooting.md +2 -2
- package/package.json +2 -2
- package/skills/ab/SKILL.md +13 -97
- package/skills/create-agent/SKILL.md +124 -223
- package/skills/debug/SKILL.md +34 -68
- package/skills/evals/SKILL.md +55 -180
- package/skills/framework-map/SKILL.md +83 -145
- package/skills/github/SKILL.md +53 -111
- package/skills/hillclimb/SKILL.md +40 -163
- package/skills/mcp-auth/SKILL.md +51 -107
- package/skills/otel/SKILL.md +22 -68
- package/skills/setup-slack/SKILL.md +91 -212
- package/src/bin/agent-serve.ts +13 -1
- package/src/channels/deployments/types.ts +1 -0
- package/src/channels/origin/api.ts +264 -33
- package/src/channels/origin/binding.ts +57 -28
- package/src/channels/origin/checks.ts +6 -6
- package/src/channels/origin/cursor-account.ts +5 -3
- package/src/channels/origin/index.ts +1 -0
- package/src/channels/origin/origin-channel.ts +4 -0
- package/src/channels/origin/reactions.ts +82 -0
- package/src/channels/origin/types.ts +11 -0
- package/src/channels/slack/api.ts +41 -5
- package/src/channels/slack/approvals.ts +105 -0
- package/src/channels/slack/cli-project.ts +267 -0
- package/src/channels/slack/defaults.ts +122 -93
- package/src/channels/slack/dispatch.ts +56 -22
- package/src/channels/slack/inbound.ts +43 -0
- package/src/channels/slack/init.ts +10 -5
- package/src/channels/slack/interactive.ts +35 -9
- package/src/channels/slack/live-delivery.ts +235 -114
- package/src/channels/slack/manifest.ts +6 -2
- package/src/channels/slack/nudge-carrier.ts +48 -1
- package/src/channels/slack/setup.ts +10 -6
- package/src/channels/slack/slack-channel.ts +3 -0
- package/src/channels/slack/tool-approval-events.ts +93 -0
- package/src/evals/run-facts.ts +32 -0
- package/src/files-backends/cursor-hosted.ts +40 -7
- package/src/internal/advertise-tools.ts +49 -12
- package/src/internal/approval-gate.ts +20 -29
- package/src/internal/bounded.ts +28 -0
- package/src/internal/chat-client.ts +19 -0
- package/src/internal/cli-deploy.ts +91 -9
- 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/conversation-mirror.ts +145 -69
- package/src/internal/cursor/account-mcp.ts +21 -0
- package/src/internal/cursor/backend-client.ts +34 -58
- package/src/internal/cursor/session-token.ts +115 -0
- package/src/internal/cursor-agent-template.ts +2 -0
- package/src/internal/deploy-client.ts +43 -0
- package/src/internal/env-file.ts +84 -0
- package/src/internal/framework-file-storage.ts +228 -0
- package/src/internal/framework-storage-selection.ts +51 -11
- package/src/internal/hosted-delivery-protocol.ts +7 -0
- package/src/internal/hosted-delivery.ts +107 -24
- package/src/internal/hosted-execution-diag.ts +207 -0
- package/src/internal/http-channel.ts +99 -0
- package/src/internal/init-project.ts +4 -0
- package/src/internal/install-cursor-skills.ts +1 -4
- package/src/internal/logs-client.ts +5 -0
- package/src/internal/managed-delivery.ts +125 -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/otel/collector.ts +30 -0
- package/src/internal/runtime-dispatch-runner.ts +10 -0
- package/src/internal/sdk-runner.ts +56 -8
- package/src/internal/server.ts +61 -9
- package/src/internal/session-engine.ts +723 -60
- package/src/internal/sessions-client.ts +17 -8
- package/src/internal/steering.ts +17 -0
- package/src/internal/storage-coordinator.ts +38 -8
- package/src/internal/storage-roles.ts +7 -0
- package/src/internal/stream-progress.ts +19 -0
- package/src/internal/tool-policy.ts +18 -0
- package/src/internal/trajectory.ts +10 -0
- package/src/internal/turn-outbox.ts +85 -0
- package/src/storage-backends/cursor-hosted.ts +22 -8
- package/src/storage.ts +12 -0
- package/src/types.ts +70 -9
- 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/templates/code-wiki/README.md +34 -0
- package/templates/code-wiki/agent/agent.ts +8 -0
- package/templates/code-wiki/agent/channels/github.ts +144 -0
- package/templates/code-wiki/agent/instructions.md +39 -0
- package/templates/code-wiki/agent/lib/repos.ts +5 -0
- package/templates/code-wiki/agent/lib/wiki.ts +22 -0
- package/templates/code-wiki/agent/tools/apply_wiki.ts +219 -0
- package/templates/code-wiki/evals/evals.config.ts +5 -0
- package/templates/code-wiki/evals/wiki.eval.ts +132 -0
- package/templates/code-wiki/init.json +25 -0
- package/templates/code-wiki/package.json +18 -0
- package/templates/code-wiki/tsconfig.json +12 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.oqPawjiD.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.BoHaMdeZ.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/internal/deployment-scm-event-stream.d.ts +0 -116
- package/dist/internal/deployment-scm-event-stream.d.ts.map +0 -1
- package/dist/internal/deployment-scm-event-stream.js +0 -474
- package/dist/playground/assets/index-CF7hUDnQ.css +0 -1
- package/docs/design/agsh.md +0 -406
- package/src/internal/deployment-scm-event-stream.ts +0 -593
- /package/dist/docs/assets/{deployment.md.D9msOFOW.lean.js → deployment.md.MFPKqsqI.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.5zOAbV86.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/{reference_tools.md.BHeXn2id.lean.js → reference_tools.md.B84gw9Ii.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.Ctv3T8C2.lean.js → troubleshooting.md.DCiPBhYs.lean.js} +0 -0
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).
|
|
@@ -414,6 +415,8 @@ non-zero when the reconstructed trajectory failed.
|
|
|
414
415
|
```bash
|
|
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
|
|
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
|
|
417
420
|
agent-sdk init ./my-reviewer --template security-reviewer # review PRs for security bugs
|
|
418
421
|
agent-sdk init ./security-help --template security-help # answer security questions in Slack
|
|
419
422
|
agent-sdk init ./my-triage --template triage-linear # comment on Linear issues
|
|
@@ -431,8 +434,9 @@ agent-sdk init # no directory: print the setup guide
|
|
|
431
434
|
`@cursor/july` resolves for `dev` and `run`.
|
|
432
435
|
|
|
433
436
|
Templates may ship `init.json`. On a TTY, `init` asks those questions
|
|
434
|
-
before writing files. `pr-autofixer
|
|
435
|
-
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
|
|
436
440
|
`--var id=value` to answer without a prompt.
|
|
437
441
|
`--json` and non-TTY hosts skip the interview unless `--var` is set.
|
|
438
442
|
|
|
@@ -590,7 +594,8 @@ commands with an explicit `--json` flag skip this automatic check.
|
|
|
590
594
|
agent-sdk deploy [--dir <path>] [--slug <slug> | --all] [--team <id>]
|
|
591
595
|
[--repo <https-url>] [--ref <git-ref>] [--path <agent-path>]
|
|
592
596
|
[--cursor-events-repo owner/name]...
|
|
593
|
-
[--allow-domain <domain>]... [--
|
|
597
|
+
[--allow-domain <domain>]... [--multi-tenant]
|
|
598
|
+
[--no-wait] [--json]
|
|
594
599
|
```
|
|
595
600
|
|
|
596
601
|
Managed hosting requires team-admin permission and the team's
|
|
@@ -617,6 +622,12 @@ be a lowercase hostname with at least two labels and an alphabetic
|
|
|
617
622
|
top-level domain. One leading `*.` wildcard is allowed. A deployment
|
|
618
623
|
can declare at most 20 domains.
|
|
619
624
|
|
|
625
|
+
`--multi-tenant` adds a release to an existing Cursor-managed
|
|
626
|
+
(multi-tenant) product such as `security-reviewer`. It is valid only
|
|
627
|
+
for `architecture: "v2"` and cannot create a new multi-tenant
|
|
628
|
+
application — those stay on the operator seed path. Without the flag,
|
|
629
|
+
HTTP deploy stays single-tenant and a managed slug 409s.
|
|
630
|
+
|
|
620
631
|
By default, the command polls every three seconds for up to ten minutes
|
|
621
632
|
and succeeds only when the deployment reaches `running`. `--no-wait`
|
|
622
633
|
returns after the deployment request is accepted. Multi-agent deploys
|
|
@@ -743,6 +754,8 @@ URL connections run a browser PKCE flow. Tokens are written to
|
|
|
743
754
|
`mcp-auth.json` under the CLI config directory (override with
|
|
744
755
|
`AGENT_SERVE_CONFIG_DIR`). Pass `--store` to upsert matching
|
|
745
756
|
`MCP_OAUTH_<CONNECTION>_*` secrets on the hosted deployment.
|
|
757
|
+
`--store` is the path for the next deploy. Hosted Connect lets the
|
|
758
|
+
current process retry.
|
|
746
759
|
|
|
747
760
|
Cursor-account connections authorize the hosted deployment's service
|
|
748
761
|
account through the Cursor backend's connector consent flow. Those
|
|
@@ -821,6 +834,7 @@ agent-sdk slack icon <https-url-or-file> [--dir <path>] [--prod]
|
|
|
821
834
|
[--slack-team <T…>] [--team <id>] [--json]
|
|
822
835
|
agent-sdk slack init --manual [--dir <path>] [--name <name>]
|
|
823
836
|
[--prefix <prefix> | --no-prefix] [--channel-posts]
|
|
837
|
+
[--install | --no-install] [--slack-team <T…>] [--prod]
|
|
824
838
|
agent-sdk slack manifest [--dir <path>] [--name <name>]
|
|
825
839
|
[--env dev|prod|both] [--channel-posts] [--print]
|
|
826
840
|
agent-sdk slack doctor [--dir <path>] [--prefix <prefix> | --no-prefix] [--json]
|
|
@@ -849,17 +863,26 @@ a local png, jpg, or gif file of at most 512KB.
|
|
|
849
863
|
|
|
850
864
|
`slack init` without `--manual` exits non-zero and writes no files. Use
|
|
851
865
|
`slack create` for the dashboard wizard. `slack init --manual` writes
|
|
852
|
-
the channel file, development and production manifests,
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
the
|
|
862
|
-
|
|
866
|
+
the channel file, development and production manifests, a Slack CLI
|
|
867
|
+
`.slack/` project (hook + manifests, committed with the repo). When
|
|
868
|
+
Slack CLI is logged in, it installs the app. Otherwise `next` asks
|
|
869
|
+
you to install it. `--install` requires that install. `--no-install`
|
|
870
|
+
skips it. `--prod` selects the deployed app.
|
|
871
|
+
`--slack-team` picks the workspace. Slack CLI keeps install tokens in
|
|
872
|
+
that process; copy `xoxb` and mint `xapp` (`connections:write`) into
|
|
873
|
+
`.env.local`. Tokens that appear in `.env` during that install are
|
|
874
|
+
copied onto the prefixed names. Paste `.slack/manifest.dev.json` at
|
|
875
|
+
api.slack.com when the Slack CLI is missing. Do not run
|
|
876
|
+
`slack deploy`. The command refuses to overwrite the channel file.
|
|
877
|
+
It updates the Slack CLI hook and manifests when `.slack/` already
|
|
878
|
+
exists. If a collision occurs, it exits non-zero; files created
|
|
879
|
+
earlier in the run remain. The token prefix defaults to the directory
|
|
880
|
+
basename normalized to uppercase snake case.
|
|
881
|
+
Explicit `--prefix` values use the same normalization. For example,
|
|
882
|
+
`pr-approver` becomes `PR_APPROVER_SLACK_BOT_TOKEN`. `--no-prefix`
|
|
883
|
+
uses shared `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN`.
|
|
884
|
+
`--channel-posts` subscribes the manifests to channel-post events.
|
|
885
|
+
The command always prints a JSON summary.
|
|
863
886
|
|
|
864
887
|
`slack manifest` regenerates selected manifest files. `--env` defaults
|
|
865
888
|
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
|
|
@@ -134,7 +134,8 @@ curl -X POST http://127.0.0.1:3000/<slug>/v1/tools/inspect_pr \
|
|
|
134
134
|
It runs an authored server tool in-process: schema-validated, no model
|
|
135
135
|
turn. An optional `"sessionId"` in the body runs it inside an existing
|
|
136
136
|
session and records it on that session's stream (`409 session_busy`
|
|
137
|
-
while a turn runs
|
|
137
|
+
for a write-effect call while a turn runs; reads run alongside the
|
|
138
|
+
turn). Agent-execution tools are rejected with `400`, and
|
|
138
139
|
unknown tools with `404` and the list of available names. For the
|
|
139
140
|
semantics, see [Tools](./tools.md#call-a-tool-without-a-model-turn).
|
|
140
141
|
|
|
@@ -67,8 +67,10 @@ message. Interrupted turns record `turn.failed` with
|
|
|
67
67
|
Slack `stop` / `@agent stop` does the same for that thread and clears
|
|
68
68
|
pending coalesced nudges.
|
|
69
69
|
|
|
70
|
-
Session-bound deterministic tool calls share the
|
|
71
|
-
|
|
70
|
+
Session-bound deterministic tool calls share the lock only for writes: a
|
|
71
|
+
write-effect call returns `409 session_busy` while a model turn is
|
|
72
|
+
running, a read-effect call runs alongside the turn (see
|
|
73
|
+
[Tools](./tools.md#call-a-tool-without-a-model-turn)).
|
|
72
74
|
|
|
73
75
|
## Which events can I stream?
|
|
74
76
|
|
package/docs/reference/tools.md
CHANGED
|
@@ -263,7 +263,14 @@ when the call returns. Pass a `sessionId` (a body field over
|
|
|
263
263
|
HTTP, `--session` on the CLI, `options.sessionId` programmatically) to
|
|
264
264
|
run inside an existing session instead: the tool sees that session's
|
|
265
265
|
workspace, and the call is recorded on the session's event stream.
|
|
266
|
-
|
|
266
|
+
While a model turn is running, a session-bound call is admitted by its
|
|
267
|
+
effect: a read-effect call (a declared `effect: "read"`, or an advertised
|
|
268
|
+
MCP tool whose server annotates it read-only) runs alongside the turn,
|
|
269
|
+
reading the workspace as the turn has left it, and is recorded under its
|
|
270
|
+
own per-call `turnId` so trajectories keep it apart from the turn's own
|
|
271
|
+
calls; a write-effect call — including an undeclared tool, which counts
|
|
272
|
+
as a write — returns `409 session_busy` until the turn finishes, because
|
|
273
|
+
a running turn owns the workspace. When the
|
|
267
274
|
session's harness cwd cannot be materialized, a read-effect call runs
|
|
268
275
|
in a scratch workspace instead and the outcome carries
|
|
269
276
|
`scratchWorkspace: true`; a write-effect call fails with
|
|
@@ -273,7 +280,7 @@ A session can also be addressed by its continuation token: an optional
|
|
|
273
280
|
`continuationToken` (`<channelId>:<key>`, as `/v1/sessions` lists it;
|
|
274
281
|
mutually exclusive with `sessionId`). A token that maps to a live
|
|
275
282
|
session behaves exactly like passing that session's id — same ownership
|
|
276
|
-
check, same
|
|
283
|
+
check, same busy semantics, same event recording. A token with no
|
|
277
284
|
session behind it runs the call scratch-bound with the token's channel
|
|
278
285
|
id and continuation key as the call's session identity, so a deployment
|
|
279
286
|
whose tools resolve state from the continuation key can serve it with
|