@cursor/july 0.1.93 → 0.1.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +8 -20
- package/README.md +4 -26
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +14 -2
- package/dist/channels/github/types.d.ts +18 -3
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +11 -3
- package/dist/channels/origin/origin-webhook.d.ts +11 -1
- package/dist/channels/origin/origin-webhook.d.ts.map +1 -1
- package/dist/channels/origin/origin-webhook.js +23 -3
- package/dist/channels/origin/types.d.ts +8 -0
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/attachments.js +2 -2
- package/dist/channels/slack/dispatch.d.ts +0 -7
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +4 -7
- package/dist/channels/slack/eval-directive.d.ts +5 -12
- package/dist/channels/slack/eval-directive.d.ts.map +1 -1
- package/dist/channels/slack/eval-directive.js +8 -19
- package/dist/channels/slack/index.d.ts +0 -6
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +0 -6
- package/dist/channels/slack/pr-ref.d.ts +7 -1
- package/dist/channels/slack/pr-ref.d.ts.map +1 -1
- package/dist/channels/slack/pr-ref.js +42 -23
- package/dist/channels/slack/setup.d.ts +4 -4
- package/dist/channels/slack/setup.d.ts.map +1 -1
- package/dist/channels/slack/setup.js +8 -15
- package/dist/channels/slack/slack-channel.d.ts +6 -13
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +15 -101
- package/dist/channels/slack/types.d.ts +12 -79
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/channels/slack/types.js +1 -15
- package/dist/client.d.ts +14 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +12 -0
- package/dist/connections.d.ts +18 -9
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +17 -8
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.CjWU-x0z.js → app.BBj0klBO.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.oqPawjiD.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.Cxy8ySFQ.js → VPLocalSearchBox.CUEXpL78.js} +1 -1
- package/dist/docs/assets/chunks/{theme.Dvq1Bktu.js → theme.DabmQnia.js} +2 -2
- package/dist/docs/assets/concepts.md.lwAgBIMI.js +1 -0
- package/dist/docs/assets/{deployment.md.DoLFAzfm.js → deployment.md.D9msOFOW.js} +3 -8
- package/dist/docs/assets/{deployment.md.DoLFAzfm.lean.js → deployment.md.D9msOFOW.lean.js} +1 -1
- package/dist/docs/assets/{guides_agent-to-agent.md.B3JIaAqz.js → guides_agent-to-agent.md.BDb0t1QV.js} +1 -1
- package/dist/docs/assets/guides_cloud-runtime.md.CkYbjnAX.js +9 -0
- package/dist/docs/assets/guides_cloud-runtime.md.CkYbjnAX.lean.js +1 -0
- package/dist/docs/assets/{guides_convert-automation.md.Bboisykk.js → guides_convert-automation.md.B4sjlodG.js} +1 -1
- package/dist/docs/assets/{guides_github.md.DqJhuaN1.js → guides_github.md.Cnh2mL4a.js} +1 -1
- package/dist/docs/assets/{guides_mcp-oauth.md.CJvrXtkN.js → guides_mcp-oauth.md.DPYmBCbV.js} +7 -9
- package/dist/docs/assets/{guides_mcp-oauth.md.CJvrXtkN.lean.js → guides_mcp-oauth.md.DPYmBCbV.lean.js} +1 -1
- package/dist/docs/assets/{guides_slack.md.mqeNKs84.js → guides_slack.md.C32HsdKk.js} +5 -11
- package/dist/docs/assets/guides_slack.md.C32HsdKk.lean.js +1 -0
- package/dist/docs/assets/index.md.BoHaMdeZ.js +5 -0
- package/dist/docs/assets/{index.md.B-lVR4wT.lean.js → index.md.BoHaMdeZ.lean.js} +1 -1
- package/dist/docs/assets/{quickstart.md.BrmfrrIr.js → quickstart.md.Nj_LjW_a.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.D9KESDsD.js → reference_cli.md.BsMOxDvh.js} +4 -3
- package/dist/docs/assets/{reference_cli.md.D9KESDsD.lean.js → reference_cli.md.BsMOxDvh.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.DB6SsN6U.js → reference_connections.md.BH8Oc0D0.js} +5 -5
- package/dist/docs/assets/{reference_connections.md.DB6SsN6U.lean.js → reference_connections.md.BH8Oc0D0.lean.js} +1 -1
- package/dist/docs/assets/{reference_hooks.md.BxN87gCw.js → reference_hooks.md.a8BJxMR5.js} +1 -1
- package/dist/docs/assets/reference_http-api.md.D89k1mdm.js +11 -0
- package/dist/docs/assets/reference_http-api.md.D89k1mdm.lean.js +1 -0
- package/dist/docs/assets/reference_project-layout.md.Bv4KOtlB.js +19 -0
- package/dist/docs/assets/{reference_subagents.md.Xoav0AII.js → reference_subagents.md.CfsIloPm.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.DuKvkYWG.js → reference_tools.md.BHeXn2id.js} +3 -3
- package/dist/docs/assets/{reference_tools.md.DuKvkYWG.lean.js → reference_tools.md.BHeXn2id.lean.js} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.DqtPdm6f.js → templates_agentic-owners.md.BZSH4N9z.js} +1 -1
- package/dist/docs/assets/{templates_demo.md.DhFcWN6j.js → templates_demo.md.BeQX9V3H.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.R4K_qytS.js → templates_pr-autofixer.md.x5zl6-GT.js} +2 -2
- package/dist/docs/assets/{templates_pr-autofixer.md.R4K_qytS.lean.js → templates_pr-autofixer.md.x5zl6-GT.lean.js} +1 -1
- package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.js +4 -0
- package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.lean.js +1 -0
- package/dist/docs/assets/{templates_security-reviewer.md.ByFyRta2.js → templates_security-reviewer.md.lshxbCLK.js} +2 -2
- package/dist/docs/assets/{templates_security-reviewer.md.ByFyRta2.lean.js → templates_security-reviewer.md.lshxbCLK.lean.js} +1 -1
- package/dist/docs/assets/{templates_triage.md.CVlpctKS.js → templates_triage.md.Co4UNzkZ.js} +3 -3
- package/dist/docs/assets/{templates_triage.md.CVlpctKS.lean.js → templates_triage.md.Co4UNzkZ.lean.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.Ctv3T8C2.js +1 -0
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/concepts.md +1 -0
- package/dist/docs/deployment.html +7 -12
- package/dist/docs/deployment.md +1 -20
- package/dist/docs/design/agsh.md +406 -0
- package/dist/docs/evals.html +4 -4
- package/dist/docs/guides/agent-to-agent.html +6 -6
- package/dist/docs/guides/agent-to-agent.md +2 -2
- package/dist/docs/guides/cloud-runtime.html +6 -6
- package/dist/docs/guides/cloud-runtime.md +1 -0
- package/dist/docs/guides/convert-automation.html +6 -6
- package/dist/docs/guides/convert-automation.md +1 -1
- package/dist/docs/guides/github.html +6 -6
- package/dist/docs/guides/github.md +4 -4
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/mcp-oauth.html +11 -13
- package/dist/docs/guides/mcp-oauth.md +10 -18
- package/dist/docs/guides/opentelemetry.html +5 -5
- package/dist/docs/guides/slack.html +9 -15
- package/dist/docs/guides/slack.md +9 -46
- 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 +3 -29
- package/dist/docs/llms-full.txt +756 -2810
- package/dist/docs/llms.txt +3 -16
- package/dist/docs/quickstart.html +6 -6
- package/dist/docs/quickstart.md +2 -3
- package/dist/docs/reference/agent-config.html +4 -4
- package/dist/docs/reference/artifacts.html +4 -4
- package/dist/docs/reference/channels.html +4 -4
- package/dist/docs/reference/cli.html +8 -7
- package/dist/docs/reference/cli.md +5 -2
- package/dist/docs/reference/connections.html +9 -9
- package/dist/docs/reference/connections.md +15 -11
- package/dist/docs/reference/hooks.html +6 -6
- package/dist/docs/reference/hooks.md +2 -3
- package/dist/docs/reference/http-api.html +6 -6
- package/dist/docs/reference/http-api.md +8 -0
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +4 -4
- package/dist/docs/reference/project-layout.html +8 -6
- package/dist/docs/reference/project-layout.md +5 -1
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +4 -4
- package/dist/docs/reference/skills.html +4 -4
- package/dist/docs/reference/subagents.html +6 -6
- package/dist/docs/reference/subagents.md +2 -2
- package/dist/docs/reference/tools.html +7 -7
- package/dist/docs/reference/tools.md +19 -3
- package/dist/docs/scaffolding-agents.html +4 -4
- package/dist/docs/storage.html +4 -4
- package/dist/docs/templates/agentic-owners.html +7 -7
- package/dist/docs/templates/agentic-owners.md +1 -1
- package/dist/docs/templates/demo.html +6 -6
- package/dist/docs/templates/demo.md +3 -2
- package/dist/docs/templates/pr-autofixer.html +6 -6
- package/dist/docs/templates/pr-autofixer.md +8 -13
- package/dist/docs/templates/security-help.html +30 -0
- package/dist/docs/templates/security-help.md +65 -0
- package/dist/docs/templates/security-reviewer.html +6 -6
- package/dist/docs/templates/security-reviewer.md +1 -3
- package/dist/docs/templates/triage.html +7 -7
- package/dist/docs/templates/triage.md +2 -6
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/docs/troubleshooting.md +2 -2
- package/dist/files-backends/cursor-hosted.d.ts +6 -2
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +2 -2
- package/dist/files.d.ts +2 -0
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +5 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/advertise-tools.d.ts +11 -0
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +47 -9
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +135 -6
- package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
- package/dist/internal/cli-mcp-oauth.js +7 -4
- package/dist/internal/conversation-mirror.d.ts +82 -0
- package/dist/internal/conversation-mirror.d.ts.map +1 -0
- package/dist/internal/conversation-mirror.js +251 -0
- package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -1
- package/dist/internal/convert-automation/convert-workflow.js +26 -15
- package/dist/internal/convert-automation/slug.d.ts +0 -2
- package/dist/internal/convert-automation/slug.d.ts.map +1 -1
- package/dist/internal/convert-automation/slug.js +0 -8
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +5 -1
- package/dist/internal/deferred-channel-session.d.ts +20 -0
- package/dist/internal/deferred-channel-session.d.ts.map +1 -0
- package/dist/internal/deferred-channel-session.js +62 -0
- package/dist/internal/deploy-client.d.ts +13 -1
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +11 -1
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +11 -5
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +110 -15
- package/dist/internal/framework-storage-selection.d.ts +32 -16
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +51 -17
- package/dist/internal/hosted-admission-context.d.ts +20 -0
- package/dist/internal/hosted-admission-context.d.ts.map +1 -0
- package/dist/internal/hosted-admission-context.js +31 -0
- package/dist/internal/hosted-delivery-protocol.d.ts +5 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +33 -1
- package/dist/internal/hosted-delivery.d.ts +4 -2
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +97 -44
- package/dist/internal/hosted-managed-automation.d.ts +30 -0
- package/dist/internal/hosted-managed-automation.d.ts.map +1 -0
- package/dist/internal/hosted-managed-automation.js +58 -0
- package/dist/internal/mcp-endpoint.js +3 -3
- package/dist/internal/mcp-host.d.ts +8 -7
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +8 -7
- package/dist/internal/peer-connections.d.ts.map +1 -1
- package/dist/internal/peer-connections.js +5 -1
- package/dist/internal/playground/static.d.ts +0 -3
- package/dist/internal/playground/static.d.ts.map +1 -1
- package/dist/internal/resolved-connections.d.ts.map +1 -1
- package/dist/internal/resolved-connections.js +5 -7
- package/dist/internal/review-comments.d.ts.map +1 -1
- package/dist/internal/review-comments.js +10 -98
- package/dist/internal/scm/pr-url.d.ts +14 -0
- package/dist/internal/scm/pr-url.d.ts.map +1 -0
- package/dist/internal/scm/pr-url.js +65 -0
- package/dist/internal/sdk-runner.d.ts +14 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +41 -2
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +123 -174
- package/dist/internal/session-engine.d.ts +45 -10
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +217 -65
- package/dist/internal/tool-catalog.d.ts +31 -0
- package/dist/internal/tool-catalog.d.ts.map +1 -0
- package/dist/internal/tool-catalog.js +67 -0
- package/dist/playground/assets/index-CF7hUDnQ.css +1 -0
- package/dist/playground/assets/{index-D9MFzhNE.js → index-CZA1uEWA.js} +48 -48
- package/dist/playground/index.html +2 -2
- package/dist/storage-backends/cursor-hosted.d.ts +7 -2
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +2 -2
- package/dist/types.d.ts +72 -23
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +19 -0
- package/docs/README.md +3 -29
- package/docs/concepts.md +1 -0
- package/docs/deployment.md +1 -20
- package/docs/design/agsh.md +406 -0
- package/docs/guides/agent-to-agent.md +2 -2
- package/docs/guides/cloud-runtime.md +1 -0
- package/docs/guides/convert-automation.md +1 -1
- package/docs/guides/github.md +4 -4
- package/docs/guides/mcp-oauth.md +10 -18
- package/docs/guides/slack.md +10 -47
- package/docs/quickstart.md +2 -3
- package/docs/reference/cli.md +5 -2
- package/docs/reference/connections.md +15 -11
- package/docs/reference/hooks.md +2 -3
- package/docs/reference/http-api.md +8 -0
- package/docs/reference/project-layout.md +5 -1
- package/docs/reference/subagents.md +2 -2
- package/docs/reference/tools.md +19 -3
- package/docs/templates/agentic-owners.md +1 -1
- package/docs/templates/demo.md +3 -2
- package/docs/templates/pr-autofixer.md +8 -13
- package/docs/templates/security-help.md +70 -0
- package/docs/templates/security-reviewer.md +1 -3
- package/docs/templates/triage.md +2 -6
- package/docs/troubleshooting.md +2 -2
- package/package.json +9 -2
- package/skills/create-agent/SKILL.md +6 -13
- package/skills/debug/SKILL.md +2 -4
- package/skills/evals/SKILL.md +1 -1
- package/skills/framework-map/SKILL.md +3 -2
- package/skills/mcp-auth/SKILL.md +10 -13
- package/skills/setup-slack/SKILL.md +21 -137
- package/src/channels/github/github-channel.ts +23 -8
- package/src/channels/github/types.ts +19 -2
- package/src/channels/origin/origin-channel.ts +13 -1
- package/src/channels/origin/origin-webhook.ts +27 -3
- package/src/channels/origin/types.ts +8 -0
- package/src/channels/slack/attachments.ts +2 -2
- package/src/channels/slack/dispatch.ts +2 -16
- package/src/channels/slack/eval-directive.ts +8 -27
- package/src/channels/slack/index.ts +0 -6
- package/src/channels/slack/pr-ref.ts +56 -25
- package/src/channels/slack/setup.ts +8 -15
- package/src/channels/slack/slack-channel.ts +14 -125
- package/src/channels/slack/types.ts +12 -96
- package/src/client.ts +23 -0
- package/src/connections.ts +20 -7
- package/src/files-backends/cursor-hosted.ts +9 -3
- package/src/files.ts +11 -0
- package/src/index.ts +2 -0
- package/src/internal/advertise-tools.ts +45 -7
- package/src/internal/cli-deploy.ts +171 -7
- package/src/internal/cli-mcp-oauth.ts +6 -4
- package/src/internal/conversation-mirror.ts +330 -0
- package/src/internal/convert-automation/convert-workflow.ts +29 -17
- package/src/internal/convert-automation/slug.ts +0 -9
- package/src/internal/cursor/account-mcp.ts +4 -1
- package/src/internal/deferred-channel-session.ts +61 -0
- package/src/internal/deploy-client.ts +24 -1
- package/src/internal/deploy-manifest.ts +10 -5
- package/src/internal/discovery.ts +129 -15
- package/src/internal/fixtures/units-server.ts +52 -0
- package/src/internal/framework-storage-selection.ts +61 -19
- package/src/internal/hosted-admission-context.ts +37 -0
- package/src/internal/hosted-delivery-protocol.ts +44 -1
- package/src/internal/hosted-delivery.ts +155 -68
- package/src/internal/hosted-managed-automation.ts +72 -0
- package/src/internal/mcp-endpoint.ts +3 -3
- package/src/internal/mcp-host.ts +8 -7
- package/src/internal/peer-connections.ts +4 -1
- package/src/internal/playground/static.ts +1 -3
- package/src/internal/resolved-connections.ts +8 -10
- package/src/internal/review-comments.ts +10 -113
- package/src/internal/scm/pr-url.ts +95 -0
- package/src/internal/sdk-runner.ts +57 -2
- package/src/internal/server.ts +161 -251
- package/src/internal/session-engine.ts +266 -69
- package/src/internal/tool-catalog.ts +106 -0
- package/src/storage-backends/cursor-hosted.ts +10 -3
- package/src/types.ts +90 -23
- package/templates/agentic-owners/README.md +1 -1
- package/templates/agentic-owners/agent/agent.ts +0 -10
- package/templates/agentic-owners/agent/channels/github.ts +5 -14
- package/templates/agentic-owners/agent/lib/config.ts +0 -8
- package/templates/agentic-owners/agent/lib/review.ts +2 -15
- package/templates/agentic-owners/agent/tools/record_review.ts +2 -4
- package/templates/demo/agent/agent.ts +0 -10
- package/templates/pr-autofixer/README.md +0 -2
- package/templates/pr-autofixer/agent/agent.ts +0 -11
- package/templates/pr-autofixer/agent/channels/slack.ts +1 -2
- package/templates/pr-autofixer/agent/lib/pr-state.ts +5 -17
- package/templates/pr-autofixer/agent/lib/repos.ts +0 -1
- package/templates/security-help/README.md +2 -2
- package/templates/security-help/agent/agent.ts +1 -2
- package/templates/security-help/agent/channels/slack.ts +0 -3
- package/templates/security-help/agent/instructions.md +9 -10
- package/templates/security-help/agent/skills/access-request.md +1 -1
- package/templates/security-help/agent/skills/faq.md +31 -0
- package/templates/security-help/agent/skills/security-playbooks.md +1 -1
- package/templates/security-help/package.json +1 -2
- package/templates/security-reviewer/agent/agent.ts +0 -10
- package/templates/triage/README.md +2 -1
- package/templates/triage/agent/agent.ts +0 -10
- package/templates/triage/agent/channels/queue.ts +1 -1
- package/templates/triage/agent/channels/webhook.ts +1 -3
- package/templates/triage/overlays/jira/agent/mcp-connections/tracker.ts +0 -1
- package/templates/triage/overlays/linear/agent/mcp-connections/tracker.ts +0 -1
- package/dist/channels/slack/cursor-account.d.ts +0 -87
- package/dist/channels/slack/cursor-account.d.ts.map +0 -1
- package/dist/channels/slack/cursor-account.js +0 -100
- package/dist/docs/assets/chunks/@localSearchIndexroot.ChpIC3Zy.js +0 -1
- package/dist/docs/assets/concepts.md.F6AiPorA.js +0 -1
- package/dist/docs/assets/example-agents_approval-buddy.md.DmezILPg.js +0 -10
- package/dist/docs/assets/example-agents_approval-buddy.md.DmezILPg.lean.js +0 -1
- package/dist/docs/assets/example-agents_benny.md.B0kwY7D_.js +0 -5
- package/dist/docs/assets/example-agents_benny.md.B0kwY7D_.lean.js +0 -1
- package/dist/docs/assets/example-agents_bugbot.md.BRGMi9O2.js +0 -11
- package/dist/docs/assets/example-agents_bugbot.md.BRGMi9O2.lean.js +0 -1
- package/dist/docs/assets/example-agents_codebase-wiki.md.BBNw9Ekr.js +0 -8
- package/dist/docs/assets/example-agents_codebase-wiki.md.BBNw9Ekr.lean.js +0 -1
- package/dist/docs/assets/example-agents_codeowners-review.md.Bfta-lBU.js +0 -8
- package/dist/docs/assets/example-agents_codeowners-review.md.Bfta-lBU.lean.js +0 -1
- package/dist/docs/assets/example-agents_concierge.md.BzB2b20R.js +0 -22
- package/dist/docs/assets/example-agents_concierge.md.BzB2b20R.lean.js +0 -1
- package/dist/docs/assets/example-agents_index.md.ChBp0AX6.js +0 -2
- package/dist/docs/assets/example-agents_index.md.ChBp0AX6.lean.js +0 -1
- package/dist/docs/assets/example-agents_knowledge-base.md.CrA85ig-.js +0 -11
- package/dist/docs/assets/example-agents_knowledge-base.md.CrA85ig-.lean.js +0 -1
- package/dist/docs/assets/example-agents_oncall.md.DK4XkYTd.js +0 -10
- package/dist/docs/assets/example-agents_oncall.md.DK4XkYTd.lean.js +0 -1
- package/dist/docs/assets/example-agents_security-reviewer.md.74pPpWYj.js +0 -19
- package/dist/docs/assets/example-agents_security-reviewer.md.74pPpWYj.lean.js +0 -1
- package/dist/docs/assets/example-agents_slack-agent.md.D7Kdj5BV.js +0 -5
- package/dist/docs/assets/example-agents_slack-agent.md.D7Kdj5BV.lean.js +0 -1
- package/dist/docs/assets/example-agents_weather-agent.md.CaGpmw3Y.js +0 -25
- package/dist/docs/assets/example-agents_weather-agent.md.CaGpmw3Y.lean.js +0 -1
- package/dist/docs/assets/guides_cloud-runtime.md.BnvjPiia.js +0 -9
- package/dist/docs/assets/guides_cloud-runtime.md.BnvjPiia.lean.js +0 -1
- package/dist/docs/assets/guides_slack.md.mqeNKs84.lean.js +0 -1
- package/dist/docs/assets/index.md.B-lVR4wT.js +0 -5
- package/dist/docs/assets/reference_http-api.md.C68BERYr.js +0 -11
- package/dist/docs/assets/reference_http-api.md.C68BERYr.lean.js +0 -1
- package/dist/docs/assets/reference_project-layout.md.WN9nwJht.js +0 -17
- package/dist/docs/assets/troubleshooting.md.vCWwvqcJ.js +0 -1
- package/dist/docs/example-agents/approval-buddy.html +0 -36
- package/dist/docs/example-agents/approval-buddy.md +0 -266
- package/dist/docs/example-agents/benny.html +0 -31
- package/dist/docs/example-agents/benny.md +0 -173
- package/dist/docs/example-agents/bugbot.html +0 -37
- package/dist/docs/example-agents/bugbot.md +0 -229
- package/dist/docs/example-agents/codebase-wiki.html +0 -34
- package/dist/docs/example-agents/codebase-wiki.md +0 -167
- package/dist/docs/example-agents/codeowners-review.html +0 -34
- package/dist/docs/example-agents/codeowners-review.md +0 -192
- package/dist/docs/example-agents/concierge.html +0 -48
- package/dist/docs/example-agents/concierge.md +0 -200
- package/dist/docs/example-agents/index.html +0 -28
- package/dist/docs/example-agents/index.md +0 -99
- package/dist/docs/example-agents/knowledge-base.html +0 -37
- package/dist/docs/example-agents/knowledge-base.md +0 -168
- package/dist/docs/example-agents/oncall.html +0 -36
- package/dist/docs/example-agents/oncall.md +0 -212
- package/dist/docs/example-agents/security-reviewer.html +0 -45
- package/dist/docs/example-agents/security-reviewer.md +0 -265
- package/dist/docs/example-agents/slack-agent.html +0 -31
- package/dist/docs/example-agents/slack-agent.md +0 -142
- package/dist/docs/example-agents/weather-agent.html +0 -51
- package/dist/docs/example-agents/weather-agent.md +0 -297
- package/dist/internal/cursor-slack-relay.d.ts +0 -96
- package/dist/internal/cursor-slack-relay.d.ts.map +0 -1
- package/dist/internal/cursor-slack-relay.js +0 -176
- package/dist/playground/assets/index-D9N7-q97.css +0 -1
- package/docs/example-agents/approval-buddy.md +0 -271
- package/docs/example-agents/benny.md +0 -178
- package/docs/example-agents/bugbot.md +0 -234
- package/docs/example-agents/codebase-wiki.md +0 -172
- package/docs/example-agents/codeowners-review.md +0 -197
- package/docs/example-agents/concierge.md +0 -205
- package/docs/example-agents/index.md +0 -104
- package/docs/example-agents/knowledge-base.md +0 -173
- package/docs/example-agents/oncall.md +0 -217
- package/docs/example-agents/security-reviewer.md +0 -270
- package/docs/example-agents/slack-agent.md +0 -147
- package/docs/example-agents/weather-agent.md +0 -302
- package/src/channels/slack/cursor-account.ts +0 -202
- package/src/internal/cursor-slack-relay.ts +0 -249
- package/templates/security-help/agent/knowledge/faq/approvals.md +0 -5
- package/templates/security-help/agent/knowledge/faq/channels.md +0 -6
- package/templates/security-help/agent/knowledge/faq/phishing.md +0 -10
- package/templates/security-help/agent/skills/security-first-pass.md +0 -15
- /package/dist/docs/assets/{concepts.md.F6AiPorA.lean.js → concepts.md.lwAgBIMI.lean.js} +0 -0
- /package/dist/docs/assets/{guides_agent-to-agent.md.B3JIaAqz.lean.js → guides_agent-to-agent.md.BDb0t1QV.lean.js} +0 -0
- /package/dist/docs/assets/{guides_convert-automation.md.Bboisykk.lean.js → guides_convert-automation.md.B4sjlodG.lean.js} +0 -0
- /package/dist/docs/assets/{guides_github.md.DqJhuaN1.lean.js → guides_github.md.Cnh2mL4a.lean.js} +0 -0
- /package/dist/docs/assets/{quickstart.md.BrmfrrIr.lean.js → quickstart.md.Nj_LjW_a.lean.js} +0 -0
- /package/dist/docs/assets/{reference_hooks.md.BxN87gCw.lean.js → reference_hooks.md.a8BJxMR5.lean.js} +0 -0
- /package/dist/docs/assets/{reference_project-layout.md.WN9nwJht.lean.js → reference_project-layout.md.Bv4KOtlB.lean.js} +0 -0
- /package/dist/docs/assets/{reference_subagents.md.Xoav0AII.lean.js → reference_subagents.md.CfsIloPm.lean.js} +0 -0
- /package/dist/docs/assets/{templates_agentic-owners.md.DqtPdm6f.lean.js → templates_agentic-owners.md.BZSH4N9z.lean.js} +0 -0
- /package/dist/docs/assets/{templates_demo.md.DhFcWN6j.lean.js → templates_demo.md.BeQX9V3H.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.vCWwvqcJ.lean.js → troubleshooting.md.Ctv3T8C2.lean.js} +0 -0
|
@@ -10,11 +10,6 @@
|
|
|
10
10
|
* // Multi-agent serve: one Slack app per agent
|
|
11
11
|
* export default slackChannel({ envPrefix: "MY_AGENT" });
|
|
12
12
|
* // → MY_AGENT_SLACK_BOT_TOKEN + MY_AGENT_SLACK_APP_TOKEN
|
|
13
|
-
*
|
|
14
|
-
* // No Slack app at all: ride the signed-in Cursor account's Slack
|
|
15
|
-
* // connection (`@Cursor <agent name> …` routes here; replies post as
|
|
16
|
-
* // this agent through the Cursor Slack app)
|
|
17
|
-
* export default slackChannel({ cursorAccount: true });
|
|
18
13
|
* ```
|
|
19
14
|
*/
|
|
20
15
|
export * from "./api.js";
|
|
@@ -27,7 +22,6 @@ export * from "./bot-mentions.js";
|
|
|
27
22
|
export * from "./channel-watch.js";
|
|
28
23
|
export * from "./constants.js";
|
|
29
24
|
export * from "./credentials.js";
|
|
30
|
-
export * from "./cursor-account.js";
|
|
31
25
|
export * from "./defaults.js";
|
|
32
26
|
export * from "./dispatch.js";
|
|
33
27
|
export * from "./doctor.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC"}
|
|
@@ -10,11 +10,6 @@
|
|
|
10
10
|
* // Multi-agent serve: one Slack app per agent
|
|
11
11
|
* export default slackChannel({ envPrefix: "MY_AGENT" });
|
|
12
12
|
* // → MY_AGENT_SLACK_BOT_TOKEN + MY_AGENT_SLACK_APP_TOKEN
|
|
13
|
-
*
|
|
14
|
-
* // No Slack app at all: ride the signed-in Cursor account's Slack
|
|
15
|
-
* // connection (`@Cursor <agent name> …` routes here; replies post as
|
|
16
|
-
* // this agent through the Cursor Slack app)
|
|
17
|
-
* export default slackChannel({ cursorAccount: true });
|
|
18
13
|
* ```
|
|
19
14
|
*/
|
|
20
15
|
export * from "./api.js";
|
|
@@ -27,7 +22,6 @@ export * from "./bot-mentions.js";
|
|
|
27
22
|
export * from "./channel-watch.js";
|
|
28
23
|
export * from "./constants.js";
|
|
29
24
|
export * from "./credentials.js";
|
|
30
|
-
export * from "./cursor-account.js";
|
|
31
25
|
export * from "./defaults.js";
|
|
32
26
|
export * from "./dispatch.js";
|
|
33
27
|
export * from "./doctor.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Best-effort
|
|
2
|
+
* Best-effort PR references from free-form chat (Slack, etc.).
|
|
3
3
|
*/
|
|
4
4
|
export interface GithubPrRef {
|
|
5
5
|
/** Normalized URL `https://github.com/owner/repo/pull/N`. */
|
|
@@ -10,6 +10,12 @@ export interface GithubPrRef {
|
|
|
10
10
|
repo: string;
|
|
11
11
|
number: number;
|
|
12
12
|
}
|
|
13
|
+
export type OriginPrRef = GithubPrRef;
|
|
14
|
+
/**
|
|
15
|
+
* Find the first Origin PR URL in `text`.
|
|
16
|
+
* Does not treat bare `owner/repo#N` as Origin.
|
|
17
|
+
*/
|
|
18
|
+
export declare function extractOriginPrRef(text: string): OriginPrRef | undefined;
|
|
13
19
|
/**
|
|
14
20
|
* Find the first GitHub PR URL or `owner/repo#N` in `text`.
|
|
15
21
|
* Returns `undefined` when none is present.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-ref.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/pr-ref.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"pr-ref.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/pr-ref.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,WAAW;IAC1B,6DAA6D;IAC7D,GAAG,EAAE,MAAM,CAAC;IACZ,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC;AAqCtC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAExE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAexE"}
|
|
@@ -1,36 +1,55 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Best-effort
|
|
2
|
+
* Best-effort PR references from free-form chat (Slack, etc.).
|
|
3
3
|
*/
|
|
4
|
+
import { parsePrUrl } from "../../internal/scm/pr-url.js";
|
|
5
|
+
const URL_IN_TEXT = /https?:\/\/[^\s>|]+/gi;
|
|
6
|
+
function githubRef(owner, repo, number) {
|
|
7
|
+
return {
|
|
8
|
+
owner,
|
|
9
|
+
repo,
|
|
10
|
+
number,
|
|
11
|
+
url: `https://github.com/${owner}/${repo}/pull/${number}`,
|
|
12
|
+
label: `${owner}/${repo}#${number}`,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function firstUrlRef(text, provider) {
|
|
16
|
+
const matches = text.match(URL_IN_TEXT);
|
|
17
|
+
if (matches === null) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
for (const raw of matches) {
|
|
21
|
+
const parsed = parsePrUrl(raw);
|
|
22
|
+
if ((parsed === null || parsed === void 0 ? void 0 : parsed.provider) === provider) {
|
|
23
|
+
return {
|
|
24
|
+
owner: parsed.owner,
|
|
25
|
+
repo: parsed.repo,
|
|
26
|
+
number: parsed.number,
|
|
27
|
+
url: parsed.url,
|
|
28
|
+
label: `${parsed.owner}/${parsed.repo}#${parsed.number}`,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Find the first Origin PR URL in `text`.
|
|
36
|
+
* Does not treat bare `owner/repo#N` as Origin.
|
|
37
|
+
*/
|
|
38
|
+
export function extractOriginPrRef(text) {
|
|
39
|
+
return firstUrlRef(text, "origin");
|
|
40
|
+
}
|
|
4
41
|
/**
|
|
5
42
|
* Find the first GitHub PR URL or `owner/repo#N` in `text`.
|
|
6
43
|
* Returns `undefined` when none is present.
|
|
7
44
|
*/
|
|
8
45
|
export function extractGithubPrRef(text) {
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
|
|
12
|
-
const repo = urlMatch[2];
|
|
13
|
-
const number = Number(urlMatch[3]);
|
|
14
|
-
return {
|
|
15
|
-
owner,
|
|
16
|
-
repo,
|
|
17
|
-
number,
|
|
18
|
-
url: `https://github.com/${owner}/${repo}/pull/${number}`,
|
|
19
|
-
label: `${owner}/${repo}#${number}`,
|
|
20
|
-
};
|
|
46
|
+
const fromUrl = firstUrlRef(text, "github");
|
|
47
|
+
if (fromUrl !== undefined) {
|
|
48
|
+
return fromUrl;
|
|
21
49
|
}
|
|
22
50
|
const hashMatch = text.match(/\b([\w.-]+)\/([\w.-]+)#(\d+)\b/);
|
|
23
51
|
if (hashMatch === null) {
|
|
24
52
|
return undefined;
|
|
25
53
|
}
|
|
26
|
-
|
|
27
|
-
const repo = hashMatch[2];
|
|
28
|
-
const number = Number(hashMatch[3]);
|
|
29
|
-
return {
|
|
30
|
-
owner,
|
|
31
|
-
repo,
|
|
32
|
-
number,
|
|
33
|
-
url: `https://github.com/${owner}/${repo}/pull/${number}`,
|
|
34
|
-
label: `${owner}/${repo}#${number}`,
|
|
35
|
-
};
|
|
54
|
+
return githubRef(hashMatch[1], hashMatch[2], Number(hashMatch[3]));
|
|
36
55
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Slack setup guide printed by `agent-serve slack setup`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* is
|
|
7
|
-
*
|
|
4
|
+
* Dedicated Socket Mode app via `slack create` (dashboard wizard).
|
|
5
|
+
* `slack init --manual` is the unmanaged paste-at-api.slack.com path.
|
|
6
|
+
* {@link SLACK_SETUP_PHASES} is that checklist; its ids key
|
|
7
|
+
* `.agent-serve/slack/setup-status.json`.
|
|
8
8
|
*/
|
|
9
9
|
export interface SlackSetupPhase {
|
|
10
10
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,EA4D/C,CAAC;AAEF,+EAA+E;AAC/E,wBAAgB,uBAAuB,CAAC,OAAO,EAAE;IAC/C,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CACvC,GAAG;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC,CAUA;AAED,wBAAgB,qBAAqB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,EA4D/C,CAAC;AAEF,+EAA+E;AAC/E,wBAAgB,uBAAuB,CAAC,OAAO,EAAE;IAC/C,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CACvC,GAAG;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC,CAUA;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CA2B9C"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Slack setup guide printed by `agent-serve slack setup`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* is
|
|
7
|
-
*
|
|
4
|
+
* Dedicated Socket Mode app via `slack create` (dashboard wizard).
|
|
5
|
+
* `slack init --manual` is the unmanaged paste-at-api.slack.com path.
|
|
6
|
+
* {@link SLACK_SETUP_PHASES} is that checklist; its ids key
|
|
7
|
+
* `.agent-serve/slack/setup-status.json`.
|
|
8
8
|
*/
|
|
9
9
|
export const SLACK_SETUP_PHASES = [
|
|
10
10
|
{
|
|
@@ -83,17 +83,10 @@ export function formatSlackSetupGuide() {
|
|
|
83
83
|
const lines = [
|
|
84
84
|
"agent-serve — Slack setup",
|
|
85
85
|
"",
|
|
86
|
-
"
|
|
87
|
-
"",
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
" Sign in (agent-serve login / CURSOR_API_KEY), serve, then mention",
|
|
91
|
-
' "@Cursor MyAgent ..." in the linked workspace. No app, no tokens.',
|
|
92
|
-
" B) Dedicated Slack app (Socket Mode) via the dashboard wizard:",
|
|
93
|
-
" agent-serve slack create --dir .",
|
|
94
|
-
" Finish Slack consent and the bot name there. The CLI writes",
|
|
95
|
-
" tokens into .env.local. Use this when you need your own bot",
|
|
96
|
-
" user, channel watching, or approval buttons.",
|
|
86
|
+
"Dedicated Slack app (Socket Mode) via the dashboard wizard:",
|
|
87
|
+
" agent-serve slack create --dir .",
|
|
88
|
+
" Finish Slack consent and the bot name there. The CLI writes",
|
|
89
|
+
" tokens into .env.local.",
|
|
97
90
|
"",
|
|
98
91
|
"Manual Slack app: `slack init --manual`. Phases below.",
|
|
99
92
|
"Goal: importable dev + prod Slack apps over Socket Mode (no public URL).",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* envelopes.
|
|
8
8
|
*/
|
|
9
9
|
import type { ChannelDefinition } from "../../types.js";
|
|
10
|
-
import {
|
|
10
|
+
import type { SlackChannelOptions, SlackChannelState, SlackCredentials } from "./types.js";
|
|
11
11
|
/**
|
|
12
12
|
* Recover the {@link SlackChannelOptions} used to build a channel definition,
|
|
13
13
|
* if it was created via {@link slackChannel}.
|
|
@@ -19,8 +19,7 @@ export interface SlackChannelHostBinding {
|
|
|
19
19
|
envPrefix?: string;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* First
|
|
23
|
-
* `cursorAccount` channels — those have no local bot token for
|
|
22
|
+
* First Slack channel on a project. Used for
|
|
24
23
|
* {@link HostContext.slack.getClient}.
|
|
25
24
|
*/
|
|
26
25
|
export declare function resolveDedicatedSlackHostBinding(channels: ReadonlyArray<{
|
|
@@ -29,15 +28,9 @@ export declare function resolveDedicatedSlackHostBinding(channels: ReadonlyArray
|
|
|
29
28
|
/**
|
|
30
29
|
* Create a Slack channel. Author as `agent/channels/slack.ts` default export.
|
|
31
30
|
*
|
|
32
|
-
* Missing credentials are not an error: without a token pair
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* When `cursorAccount` is on, `agentName` must be a single token (no
|
|
37
|
-
* whitespace) — string literals with spaces fail at the type level;
|
|
38
|
-
* runtime values are still checked by {@link assertSlackCursorAgentName}.
|
|
31
|
+
* Missing credentials are not an error: without a token pair the channel
|
|
32
|
+
* mounts idle and logs `channel idle`, so serving an agent never blocks
|
|
33
|
+
* on Slack setup.
|
|
39
34
|
*/
|
|
40
|
-
export declare function slackChannel
|
|
41
|
-
agentName?: SlackCursorAgentName<Name>;
|
|
42
|
-
}): ChannelDefinition<SlackChannelState>;
|
|
35
|
+
export declare function slackChannel(authored?: SlackChannelOptions): ChannelDefinition<SlackChannelState>;
|
|
43
36
|
//# sourceMappingURL=slack-channel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slack-channel.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/slack-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAEV,iBAAiB,EAMlB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"slack-channel.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/slack-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAEV,iBAAiB,EAMlB,MAAM,gBAAgB,CAAC;AA2CxB,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAQpB;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,GACjB,mBAAmB,GAAG,SAAS,CAEjC;AAED,0EAA0E;AAC1E,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,aAAa,CAAC;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,GAC9C,uBAAuB,GAAG,SAAS,CAYrC;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,GAAE,mBAAwB,GACjC,iBAAiB,CAAC,iBAAiB,CAAC,CAyatC"}
|
|
@@ -21,7 +21,6 @@ import { slackContinuationKey } from "./api.js";
|
|
|
21
21
|
import { normalizeBotMentionAllowlist, SLACK_BOT_MENTION_DEFAULTS, SlackBotMentionGate, } from "./bot-mentions.js";
|
|
22
22
|
import { createChannelPostWatcher, resolveChannelNames, SlackChannelAllowlist, } from "./channel-watch.js";
|
|
23
23
|
import { credentialsFromEnv, slackEnvKeys, tryResolveAppToken, tryResolveBotToken, } from "./credentials.js";
|
|
24
|
-
import { createPendingSlackApiTransport, registerSlackCursorAccountRuntime, } from "./cursor-account.js";
|
|
25
24
|
import { buildDefaultEvents, createDefaultOnChannelPost, createDefaultOnInbound, resolveSlackBlockExternals, } from "./defaults.js";
|
|
26
25
|
import { dispatchInboundFromEventBody, dispatchInboundMessage, emptySlackChannelState, } from "./dispatch.js";
|
|
27
26
|
import { createEventIdDedupe } from "./event-id-dedupe.js";
|
|
@@ -29,7 +28,6 @@ import { dispatchBlockAction, dispatchInteractiveFromPayload, } from "./interact
|
|
|
29
28
|
import { createSlackLogger } from "./log.js";
|
|
30
29
|
import { startSlackSocketMode, } from "./socket-mode.js";
|
|
31
30
|
import { buildToolApprovalEvents } from "./tool-approval-events.js";
|
|
32
|
-
import { assertSlackCursorAgentName, } from "./types.js";
|
|
33
31
|
/** Options used to construct a slack channel — for host-level credential binding. */
|
|
34
32
|
const slackChannelOptionsByDefinition = new WeakMap();
|
|
35
33
|
/**
|
|
@@ -40,15 +38,14 @@ export function getSlackChannelOptions(definition) {
|
|
|
40
38
|
return slackChannelOptionsByDefinition.get(definition);
|
|
41
39
|
}
|
|
42
40
|
/**
|
|
43
|
-
* First
|
|
44
|
-
* `cursorAccount` channels — those have no local bot token for
|
|
41
|
+
* First Slack channel on a project. Used for
|
|
45
42
|
* {@link HostContext.slack.getClient}.
|
|
46
43
|
*/
|
|
47
44
|
export function resolveDedicatedSlackHostBinding(channels) {
|
|
48
45
|
var _a;
|
|
49
46
|
for (const channel of channels) {
|
|
50
47
|
const options = slackChannelOptionsByDefinition.get(channel.definition);
|
|
51
|
-
if (options === undefined
|
|
48
|
+
if (options === undefined) {
|
|
52
49
|
continue;
|
|
53
50
|
}
|
|
54
51
|
return {
|
|
@@ -61,86 +58,27 @@ export function resolveDedicatedSlackHostBinding(channels) {
|
|
|
61
58
|
/**
|
|
62
59
|
* Create a Slack channel. Author as `agent/channels/slack.ts` default export.
|
|
63
60
|
*
|
|
64
|
-
* Missing credentials are not an error: without a token pair
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* When `cursorAccount` is on, `agentName` must be a single token (no
|
|
69
|
-
* whitespace) — string literals with spaces fail at the type level;
|
|
70
|
-
* runtime values are still checked by {@link assertSlackCursorAgentName}.
|
|
61
|
+
* Missing credentials are not an error: without a token pair the channel
|
|
62
|
+
* mounts idle and logs `channel idle`, so serving an agent never blocks
|
|
63
|
+
* on Slack setup.
|
|
71
64
|
*/
|
|
72
65
|
export function slackChannel(authored = {}) {
|
|
73
|
-
var _a, _b, _c, _d;
|
|
74
|
-
var _e, _f, _g, _h, _j;
|
|
66
|
+
var _a, _b, _c, _d, _e;
|
|
75
67
|
const options = Object.assign({}, authored);
|
|
76
68
|
if (options.continuation !== undefined) {
|
|
77
69
|
options.continuation = normalizeIdentity(options.continuation, "slack");
|
|
78
70
|
}
|
|
79
|
-
const
|
|
80
|
-
if (cursorAccount) {
|
|
81
|
-
// Token pair and the Cursor connection are different Slack apps —
|
|
82
|
-
// they can't be mixed on one channel definition.
|
|
83
|
-
if (options.credentials !== undefined || options.envPrefix !== undefined) {
|
|
84
|
-
throw new Error("slackChannel({ cursorAccount: true }) uses the Cursor account's Slack connection — do not also set credentials/envPrefix. Author a second slack channel file for a dedicated Slack app.");
|
|
85
|
-
}
|
|
86
|
-
if (options.agentName !== undefined) {
|
|
87
|
-
assertSlackCursorAgentName(options.agentName);
|
|
88
|
-
}
|
|
89
|
-
// Channel watching is Socket Mode only — cursorAccount agents must be
|
|
90
|
-
// explicitly addressed (@mention, DM, or claimed-thread reply).
|
|
91
|
-
if (((_a = options.engagement) === null || _a === void 0 ? void 0 : _a.channelPosts) !== undefined) {
|
|
92
|
-
throw new Error("slackChannel({ cursorAccount: true }) does not support engagement.channelPosts — agents must be explicitly addressed (@mention, DM, or claimed-thread reply). Channel watching is Socket Mode only.");
|
|
93
|
-
}
|
|
94
|
-
// Bot-mention wake needs the app's own bot identity (auth.test) and
|
|
95
|
-
// Socket Mode event delivery; the Cursor relay drops bot-authored
|
|
96
|
-
// mentions before they reach the agent.
|
|
97
|
-
if (((_b = options.engagement) === null || _b === void 0 ? void 0 : _b.botMentions) !== undefined) {
|
|
98
|
-
throw new Error("slackChannel({ cursorAccount: true }) does not support engagement.botMentions — bot-to-bot mention wake is Socket Mode only (author a dedicated Slack app channel).");
|
|
99
|
-
}
|
|
100
|
-
// Mentions/DMs are always routed by the backend. Disabling them
|
|
101
|
-
// client-side would black-hole events the webhook already stole from
|
|
102
|
-
// native Cursor handling — reject at construction instead.
|
|
103
|
-
if (((_c = options.engagement) === null || _c === void 0 ? void 0 : _c.mentions) === false) {
|
|
104
|
-
throw new Error("slackChannel({ cursorAccount: true }) cannot set engagement.mentions to false — the Cursor Slack relay always delivers mention and claimed-thread traffic.");
|
|
105
|
-
}
|
|
106
|
-
if (((_d = options.engagement) === null || _d === void 0 ? void 0 : _d.directMessages) === false) {
|
|
107
|
-
throw new Error("slackChannel({ cursorAccount: true }) cannot set engagement.directMessages to false — DM continuity is part of the Cursor Slack connection.");
|
|
108
|
-
}
|
|
109
|
-
// Tool approvals / interactivity ride Slack Socket Mode `interactive`
|
|
110
|
-
// envelopes; the Cursor connection does not relay Block Kit clicks, so
|
|
111
|
-
// there is no backend tap to route Approve/Deny over cursorAccount.
|
|
112
|
-
// Reject at construction (same posture as channelPosts) instead of
|
|
113
|
-
// silently dropping clicks. Approvals stay available on a dedicated
|
|
114
|
-
// Socket Mode Slack app channel.
|
|
115
|
-
if (options.toolApprovals === true) {
|
|
116
|
-
throw new Error("slackChannel({ cursorAccount: true }) does not support toolApprovals — Approve/Deny clicks are not relayed over the Cursor Slack connection. Tool approvals are Socket Mode only (author a dedicated Slack app channel for them).");
|
|
117
|
-
}
|
|
118
|
-
if (options.interactivity === true) {
|
|
119
|
-
throw new Error("slackChannel({ cursorAccount: true }) does not support interactivity — interactive Block Kit clicks are not relayed over the Cursor Slack connection. Interactivity is Socket Mode only.");
|
|
120
|
-
}
|
|
121
|
-
if (options.onBlockAction !== undefined) {
|
|
122
|
-
throw new Error("slackChannel({ cursorAccount: true }) does not support onBlockAction — interactive Block Kit clicks are not relayed over the Cursor Slack connection. Block actions are Socket Mode only.");
|
|
123
|
-
}
|
|
124
|
-
if (options.onReactionAdded !== undefined) {
|
|
125
|
-
throw new Error("slackChannel({ cursorAccount: true }) does not support onReactionAdded because the Cursor Slack relay does not forward reaction events. Reaction handling is Socket Mode only.");
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
const accountTransport = cursorAccount
|
|
129
|
-
? createPendingSlackApiTransport()
|
|
130
|
-
: undefined;
|
|
131
|
-
const credentials = accountTransport !== undefined
|
|
132
|
-
? { botToken: accountTransport }
|
|
133
|
-
: ((_e = options.credentials) !== null && _e !== void 0 ? _e : credentialsFromEnv(options.envPrefix));
|
|
71
|
+
const credentials = (_a = options.credentials) !== null && _a !== void 0 ? _a : credentialsFromEnv(options.envPrefix);
|
|
134
72
|
const envKeys = slackEnvKeys(options.envPrefix);
|
|
135
73
|
const loadingMessages = options.loadingMessages;
|
|
136
74
|
const policy = options.policy;
|
|
137
75
|
const blockExternals = resolveSlackBlockExternals(policy);
|
|
138
76
|
const defaultInbound = createDefaultOnInbound(loadingMessages, policy);
|
|
139
|
-
const onAppMention = (
|
|
140
|
-
const onDirectMessage = (
|
|
77
|
+
const onAppMention = (_b = options.onAppMention) !== null && _b !== void 0 ? _b : defaultInbound;
|
|
78
|
+
const onDirectMessage = (_c = options.onDirectMessage) !== null && _c !== void 0 ? _c : defaultInbound;
|
|
141
79
|
const onReactionAdded = options.onReactionAdded;
|
|
142
|
-
const onChannelPost = (
|
|
143
|
-
const engagement = (
|
|
80
|
+
const onChannelPost = (_d = options.onChannelPost) !== null && _d !== void 0 ? _d : createDefaultOnChannelPost(loadingMessages, policy);
|
|
81
|
+
const engagement = (_e = options.engagement) !== null && _e !== void 0 ? _e : {};
|
|
144
82
|
const mentionsEnabled = engagement.mentions !== false;
|
|
145
83
|
const directMessagesEnabled = engagement.directMessages !== false;
|
|
146
84
|
const evalCommandsEnabled = options.evalCommands !== false;
|
|
@@ -169,9 +107,7 @@ export function slackChannel(authored = {}) {
|
|
|
169
107
|
if (options.deliverDefaults !== false) {
|
|
170
108
|
Object.assign(events, buildDefaultEvents({
|
|
171
109
|
credentials,
|
|
172
|
-
|
|
173
|
-
// final postMessage for the reply (proxy pins agent username/icon).
|
|
174
|
-
streaming: cursorAccount ? false : options.streaming,
|
|
110
|
+
streaming: options.streaming,
|
|
175
111
|
thinkingSteps: options.thinkingSteps,
|
|
176
112
|
suggestedPrompts: options.suggestedPrompts,
|
|
177
113
|
suggestedPromptsTitle: options.suggestedPromptsTitle,
|
|
@@ -192,9 +128,8 @@ export function slackChannel(authored = {}) {
|
|
|
192
128
|
eventIds, host: args.host, artifacts: args.artifacts, log: getLog(), mentionsEnabled,
|
|
193
129
|
directMessagesEnabled,
|
|
194
130
|
evalCommandsEnabled,
|
|
195
|
-
followUpStatus,
|
|
196
|
-
|
|
197
|
-
blockExternals: cursorAccount ? false : blockExternals }), (args.hasContinuationSession === undefined
|
|
131
|
+
followUpStatus,
|
|
132
|
+
blockExternals }), (args.hasContinuationSession === undefined
|
|
198
133
|
? {}
|
|
199
134
|
: { hasContinuationSession: args.hasContinuationSession })), (args.isContinuationBusy === undefined
|
|
200
135
|
? {}
|
|
@@ -210,7 +145,7 @@ export function slackChannel(authored = {}) {
|
|
|
210
145
|
auth: [allowAll()],
|
|
211
146
|
state: emptySlackChannelState(),
|
|
212
147
|
routes: [],
|
|
213
|
-
meta: Object.assign(
|
|
148
|
+
meta: Object.assign({ kind: "slack" }, (channelPosts === undefined
|
|
214
149
|
? {}
|
|
215
150
|
: { slackChannelPosts: [...channelPosts.allow] })),
|
|
216
151
|
receive(input_1, _a) {
|
|
@@ -253,13 +188,6 @@ export function slackChannel(authored = {}) {
|
|
|
253
188
|
return __awaiter(this, void 0, void 0, function* () {
|
|
254
189
|
var _a, _b, _c, _d, _e, _f;
|
|
255
190
|
runtime.log = createSlackLogger((_a = args.logger) !== null && _a !== void 0 ? _a : options.logger);
|
|
256
|
-
if (cursorAccount) {
|
|
257
|
-
// Inbound arrives through the serve host's Cursor Slack relay
|
|
258
|
-
// (`/v0/slack-events`), not Socket Mode; outbound goes through the
|
|
259
|
-
// bound API transport. Nothing to start here.
|
|
260
|
-
getLog().info("channel start", { transport: "cursor-account" });
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
191
|
getLog().info("channel start", { transport: "socket" });
|
|
264
192
|
const appToken = yield tryResolveAppToken(credentials);
|
|
265
193
|
const botToken = yield tryResolveBotToken(credentials);
|
|
@@ -446,19 +374,5 @@ export function slackChannel(authored = {}) {
|
|
|
446
374
|
}),
|
|
447
375
|
});
|
|
448
376
|
slackChannelOptionsByDefinition.set(definition, options);
|
|
449
|
-
if (accountTransport !== undefined) {
|
|
450
|
-
// Serve-time seam: the host discovers cursor-account channels through
|
|
451
|
-
// this registry, binds the outbound transport, and dispatches relayed
|
|
452
|
-
// inbound envelopes through the pack's normal path.
|
|
453
|
-
registerSlackCursorAccountRuntime(definition, {
|
|
454
|
-
options,
|
|
455
|
-
credentials,
|
|
456
|
-
transport: accountTransport,
|
|
457
|
-
eventIds,
|
|
458
|
-
onAppMention,
|
|
459
|
-
onDirectMessage,
|
|
460
|
-
getLog,
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
377
|
return definition;
|
|
464
378
|
}
|
|
@@ -5,14 +5,13 @@ import type { ContinuationIdentity } from "../../continuation.js";
|
|
|
5
5
|
import type { AgentCloudOptions, ArtifactsApi, AuthContext, ChannelEventHandlers, HostContext } from "../../types.js";
|
|
6
6
|
/**
|
|
7
7
|
* Pluggable Slack Web API caller. Instead of holding a raw `xoxb-…` token,
|
|
8
|
-
* calls are executed by `call
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* platform errors) and only throw on programmer error.
|
|
8
|
+
* calls are executed by `call`. Implementations return the Slack response
|
|
9
|
+
* body (including `ok: false` platform errors) and only throw on
|
|
10
|
+
* programmer error.
|
|
12
11
|
*/
|
|
13
12
|
export interface SlackApiTransport {
|
|
14
13
|
kind: "api-transport";
|
|
15
|
-
/** Human-readable transport label for logs
|
|
14
|
+
/** Human-readable transport label for logs. */
|
|
16
15
|
label: string;
|
|
17
16
|
call(method: string, args: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
18
17
|
}
|
|
@@ -101,8 +100,8 @@ export interface SlackMessageFile {
|
|
|
101
100
|
mode?: string;
|
|
102
101
|
size?: number;
|
|
103
102
|
/**
|
|
104
|
-
* When set
|
|
105
|
-
*
|
|
103
|
+
* When set, bytes were already downloaded by the caller. Skip a second
|
|
104
|
+
* `files.info` / private URL fetch.
|
|
106
105
|
*/
|
|
107
106
|
dataBase64?: string;
|
|
108
107
|
}
|
|
@@ -291,8 +290,7 @@ export interface SlackChannelPostsOptions {
|
|
|
291
290
|
* channel the bot is in. Must be non-empty (empty is a definition error).
|
|
292
291
|
* `#names` are resolved to ids via `conversations.list` when the channel
|
|
293
292
|
* starts; the bot must be a member of each watched channel to receive its
|
|
294
|
-
* messages.
|
|
295
|
-
* `engagement.channelPosts`.
|
|
293
|
+
* messages.
|
|
296
294
|
*
|
|
297
295
|
* `"*"` suits agents whose handler decides per message (a thread the agent
|
|
298
296
|
* is already in, say) rather than per channel. Every delivered message then
|
|
@@ -341,11 +339,8 @@ export interface SlackBotMentionsOptions {
|
|
|
341
339
|
* - `"U…"` — a bot *user* id.
|
|
342
340
|
* - `"<botId>:<username>"` — compound: the posting app's `bot_id` AND its
|
|
343
341
|
* message `username` must both match (case-insensitive username). Use
|
|
344
|
-
* this
|
|
345
|
-
*
|
|
346
|
-
* agent's `username` server-side — `"B0CURSOR…:Lasso"` trusts only the
|
|
347
|
-
* Cursor app posting as Lasso, not every Cursor-connected agent.
|
|
348
|
-
* Fails closed when the event carries no username.
|
|
342
|
+
* this when several agents post through one app under different
|
|
343
|
+
* usernames. Fails closed when the event carries no username.
|
|
349
344
|
*
|
|
350
345
|
* Must be non-empty (empty is a definition error).
|
|
351
346
|
*/
|
|
@@ -388,29 +383,9 @@ export interface SlackEngagementOptions {
|
|
|
388
383
|
channelPosts?: SlackChannelPostsOptions;
|
|
389
384
|
/**
|
|
390
385
|
* Opt-in bot-to-bot mention wake (see {@link SlackBotMentionsOptions}).
|
|
391
|
-
* Socket Mode only — rejected on `cursorAccount: true`.
|
|
392
386
|
*/
|
|
393
387
|
botMentions?: SlackBotMentionsOptions;
|
|
394
388
|
}
|
|
395
|
-
/**
|
|
396
|
-
* Whitespace forbidden in {@link SlackChannelOptions.agentName}. The Cursor
|
|
397
|
-
* Slack router matches on leading words; multi-word names collide with Named
|
|
398
|
-
* Agent shortened-prefix matching (`Approval …` stealing `ApprovalBuddy`).
|
|
399
|
-
*/
|
|
400
|
-
type SlackAgentNameWhitespace = " " | "\t" | "\n" | "\r" | "\f" | "\v";
|
|
401
|
-
/**
|
|
402
|
-
* Single-token Cursor Slack handle for `cursorAccount` routing
|
|
403
|
-
* (`@Cursor <name> …`). String literals that contain whitespace become
|
|
404
|
-
* `never` (type error at the call site); plain `string` stays `string` and
|
|
405
|
-
* is still rejected at runtime by {@link assertSlackCursorAgentName}.
|
|
406
|
-
*/
|
|
407
|
-
export type SlackCursorAgentName<S extends string = string> = string extends S ? string : S extends `${string}${SlackAgentNameWhitespace}${string}` ? never : S;
|
|
408
|
-
/**
|
|
409
|
-
* Runtime guard for {@link SlackChannelOptions.agentName}. Call from
|
|
410
|
-
* `slackChannel({ cursorAccount: true })` construction and serve-time
|
|
411
|
-
* name resolution so derived defaults cannot sneak spaces in.
|
|
412
|
-
*/
|
|
413
|
-
export declare function assertSlackCursorAgentName(name: string): void;
|
|
414
389
|
/** `"thread"` = anyone in the thread (default); `"author"` = session starter only. */
|
|
415
390
|
export type SlackRespondTo = "thread" | "author";
|
|
416
391
|
export interface SlackAccessPolicy {
|
|
@@ -436,41 +411,6 @@ export interface SlackChannelOptions {
|
|
|
436
411
|
* Ignored when `credentials` is set explicitly.
|
|
437
412
|
*/
|
|
438
413
|
envPrefix?: string;
|
|
439
|
-
/**
|
|
440
|
-
* Use the signed-in Cursor account's Slack connection instead of a
|
|
441
|
-
* dedicated Slack app: no bot/app tokens, no extra install. Inbound
|
|
442
|
-
* traffic (`@Cursor <agent name> …` mentions, replies in threads the
|
|
443
|
-
* agent owns, and DMs) is relayed from the Cursor backend
|
|
444
|
-
* (`/v0/slack-events`), and outbound Web API calls are proxied through it
|
|
445
|
-
* — the agent posts as the Cursor Slack app with this agent's name and
|
|
446
|
-
* icon.
|
|
447
|
-
*
|
|
448
|
-
* Both paths stay first-class: omit this (default) for the classic
|
|
449
|
-
* Socket-Mode channel with your own Slack app and tokens. Requires a
|
|
450
|
-
* signed-in host (`agent-serve login` / `CURSOR_API_KEY`) and a Slack
|
|
451
|
-
* account linked to the Cursor account. Mutually exclusive with
|
|
452
|
-
* `credentials` / `envPrefix`. `engagement.mentions: false` and
|
|
453
|
-
* `engagement.directMessages: false` are rejected (the relay always
|
|
454
|
-
* carries that traffic). Channel watching (`engagement.channelPosts`) and
|
|
455
|
-
* tool approvals / interactivity (`toolApprovals` / `interactivity`) are
|
|
456
|
-
* Socket Mode only — not supported on cursorAccount; agents must be
|
|
457
|
-
* explicitly addressed, and Approve/Deny buttons need a dedicated Slack
|
|
458
|
-
* app.
|
|
459
|
-
*/
|
|
460
|
-
cursorAccount?: boolean;
|
|
461
|
-
/**
|
|
462
|
-
* Single-token display name registered with the Cursor backend when
|
|
463
|
-
* {@link cursorAccount} is on: `@Cursor <agentName> …` routes here, and
|
|
464
|
-
* replies post under this username. **No whitespace** — prefer PascalCase
|
|
465
|
-
* (`ApprovalBuddy`). Defaults to a PascalCase name derived from the
|
|
466
|
-
* agent's mount slug (or project name).
|
|
467
|
-
*/
|
|
468
|
-
agentName?: SlackCursorAgentName;
|
|
469
|
-
/** Avatar for posts when {@link cursorAccount} is on. */
|
|
470
|
-
agentIcon?: {
|
|
471
|
-
url?: string;
|
|
472
|
-
emoji?: string;
|
|
473
|
-
};
|
|
474
414
|
/**
|
|
475
415
|
* Optional log sink. When omitted, uses `console.log` until the server
|
|
476
416
|
* mounts the channel and rebinds to {@link ServeOptions.logger}.
|
|
@@ -508,9 +448,7 @@ export interface SlackChannelOptions {
|
|
|
508
448
|
deliverDefaults?: boolean;
|
|
509
449
|
/**
|
|
510
450
|
* Stream assistant text while the turn runs via `chat.startStream` /
|
|
511
|
-
* `appendStream` / `stopStream` (defaults to `true`
|
|
512
|
-
* Ignored when {@link cursorAccount} is on — that path never edits posts
|
|
513
|
-
* (`setStatus` + one final `chat.postMessage` only).
|
|
451
|
+
* `appendStream` / `stopStream` (defaults to `true`).
|
|
514
452
|
*/
|
|
515
453
|
streaming?: boolean;
|
|
516
454
|
/**
|
|
@@ -533,9 +471,7 @@ export interface SlackChannelOptions {
|
|
|
533
471
|
*
|
|
534
472
|
* Framework park/resume is enabled by `needsApproval` on server tools.
|
|
535
473
|
* Set this to `true` to also post Block Kit Approve/Deny cards and route
|
|
536
|
-
* the Socket Mode `interactive` clicks to `resolveApproval`.
|
|
537
|
-
* only — rejected on `cursorAccount: true` (the Cursor Slack connection
|
|
538
|
-
* does not relay Block Kit clicks).
|
|
474
|
+
* the Socket Mode `interactive` clicks to `resolveApproval`.
|
|
539
475
|
*
|
|
540
476
|
* Defaults to `false`. For custom composition, spread
|
|
541
477
|
* `buildToolApprovalEvents({ credentials })` into `events`.
|
|
@@ -544,8 +480,7 @@ export interface SlackChannelOptions {
|
|
|
544
480
|
/**
|
|
545
481
|
* Route interactive payloads to approval resolution without opting into
|
|
546
482
|
* the full {@link buildToolApprovalEvents} handler pack. Use when
|
|
547
|
-
* composing `buildToolApprovalEvents` into `events` manually.
|
|
548
|
-
* only — rejected on `cursorAccount: true`.
|
|
483
|
+
* composing `buildToolApprovalEvents` into `events` manually.
|
|
549
484
|
*/
|
|
550
485
|
interactivity?: boolean;
|
|
551
486
|
/**
|
|
@@ -557,7 +492,6 @@ export interface SlackChannelOptions {
|
|
|
557
492
|
* thread, or `null` to ignore the click. Setting this implies
|
|
558
493
|
* interactive routing; the Slack app manifest still needs
|
|
559
494
|
* `interactivity` enabled (`buildSlackManifest({ interactivity: true })`).
|
|
560
|
-
* Socket Mode only — rejected on `cursorAccount: true`.
|
|
561
495
|
*/
|
|
562
496
|
onBlockAction?: SlackBlockActionHandler;
|
|
563
497
|
/**
|
|
@@ -622,5 +556,4 @@ export type SoftSlackResult<T extends Record<string, unknown> = Record<string, u
|
|
|
622
556
|
error: string;
|
|
623
557
|
unsupported?: boolean;
|
|
624
558
|
};
|
|
625
|
-
export {};
|
|
626
559
|
//# sourceMappingURL=types.d.ts.map
|