@cursor/july 0.1.49 → 0.1.51
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 -3
- package/README.md +7 -14
- package/dist/bin/agent-serve.js +22 -8
- package/dist/channels/slack/init.d.ts +2 -3
- package/dist/channels/slack/init.d.ts.map +1 -1
- package/dist/channels/slack/init.js +8 -43
- package/dist/channels/slack/manifest.d.ts +3 -3
- package/dist/channels/slack/manifest.js +3 -3
- package/dist/channels/slack/setup.d.ts +2 -11
- package/dist/channels/slack/setup.d.ts.map +1 -1
- package/dist/channels/slack/setup.js +26 -94
- package/dist/channels/slack/types.d.ts +3 -4
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +3 -3
- package/dist/docs/assets/{app.BpWAgjaR.js → app.C51TX1Bw.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.D2DpXdZN.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CnAktZtG.js → VPLocalSearchBox.BB9HCJPq.js} +1 -1
- package/dist/docs/assets/chunks/{theme.B5IvUxOB.js → theme.Dp-0SZcu.js} +2 -2
- package/dist/docs/assets/{deployment.md.Cdp4rTE4.js → deployment.md.B8kW-h7P.js} +1 -1
- package/dist/docs/assets/{example-agents_benny.md.l7JTmm8X.js → example-agents_benny.md.B-LIDGja.js} +1 -1
- package/dist/docs/assets/{example-agents_oncall.md.ZE0n6ZFN.js → example-agents_oncall.md.CBmyuAKc.js} +2 -2
- package/dist/docs/assets/{guides_human-in-the-loop.md.BWvT7UqY.js → guides_human-in-the-loop.md.Cf8kIIqC.js} +2 -2
- package/dist/docs/assets/{guides_human-in-the-loop.md.BWvT7UqY.lean.js → guides_human-in-the-loop.md.Cf8kIIqC.lean.js} +1 -1
- package/dist/docs/assets/{guides_slack.md.zriQpU_9.js → guides_slack.md.D2nTRu9M.js} +7 -12
- package/dist/docs/assets/guides_slack.md.D2nTRu9M.lean.js +1 -0
- package/dist/docs/assets/{reference_cli.md.BDmjPPAm.js → reference_cli.md.CGKfz_Yj.js} +3 -7
- package/dist/docs/assets/{reference_cli.md.BDmjPPAm.lean.js → reference_cli.md.CGKfz_Yj.lean.js} +1 -1
- package/dist/docs/assets/{troubleshooting.md.CkgwmVI0.js → troubleshooting.md.C6n3wCr6.js} +1 -1
- package/dist/docs/building-with-agents.html +3 -3
- package/dist/docs/concepts.html +3 -3
- package/dist/docs/deployment.html +5 -5
- package/dist/docs/evals.html +3 -3
- package/dist/docs/example-agents/approval-buddy.html +3 -3
- package/dist/docs/example-agents/benny.html +5 -5
- package/dist/docs/example-agents/bugbot.html +3 -3
- package/dist/docs/example-agents/codebase-wiki.html +3 -3
- package/dist/docs/example-agents/codeowners-review.html +3 -3
- package/dist/docs/example-agents/concierge.html +3 -3
- package/dist/docs/example-agents/fsd.html +3 -3
- package/dist/docs/example-agents/index.html +3 -3
- package/dist/docs/example-agents/knowledge-base.html +3 -3
- package/dist/docs/example-agents/oncall.html +6 -6
- package/dist/docs/example-agents/security-reviewer.html +3 -3
- package/dist/docs/example-agents/slack-agent.html +3 -3
- package/dist/docs/example-agents/weather-agent.html +3 -3
- package/dist/docs/guides/agent-to-agent.html +3 -3
- package/dist/docs/guides/cloud-runtime.html +3 -3
- package/dist/docs/guides/github.html +3 -3
- package/dist/docs/guides/human-in-the-loop.html +5 -5
- package/dist/docs/guides/mcp-oauth.html +3 -3
- package/dist/docs/guides/opentelemetry.html +3 -3
- package/dist/docs/guides/slack.html +11 -16
- package/dist/docs/guides/webhooks.html +3 -3
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +3 -3
- package/dist/docs/index.html +3 -3
- package/dist/docs/quickstart.html +3 -3
- package/dist/docs/reference/agent-config.html +3 -3
- package/dist/docs/reference/artifacts.html +3 -3
- package/dist/docs/reference/channels.html +3 -3
- package/dist/docs/reference/cli.html +6 -10
- package/dist/docs/reference/connections.html +3 -3
- package/dist/docs/reference/hooks.html +3 -3
- package/dist/docs/reference/http-api.html +3 -3
- package/dist/docs/reference/instructions.html +3 -3
- package/dist/docs/reference/playground.html +3 -3
- package/dist/docs/reference/project-layout.html +3 -3
- package/dist/docs/reference/prompt.html +3 -3
- package/dist/docs/reference/schedules.html +3 -3
- package/dist/docs/reference/sessions.html +3 -3
- package/dist/docs/reference/skills.html +3 -3
- package/dist/docs/reference/subagents.html +3 -3
- package/dist/docs/reference/tools.html +3 -3
- package/dist/docs/scaffolding-agents.html +3 -3
- package/dist/docs/storage.html +3 -3
- package/dist/docs/templates/triage.html +3 -3
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/internal/cli-ax.js +3 -3
- package/dist/internal/cli-cursor.d.ts +18 -0
- package/dist/internal/cli-cursor.d.ts.map +1 -1
- package/dist/internal/cli-cursor.js +25 -0
- package/dist/internal/cli-slack.d.ts +3 -4
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +126 -322
- package/dist/internal/convert-automation/convert-workflow.js +2 -2
- package/dist/internal/slack-provision-client.d.ts +37 -2
- package/dist/internal/slack-provision-client.d.ts.map +1 -1
- package/dist/internal/slack-provision-client.js +46 -0
- package/dist/playground/assets/{index-Dq_HqyU-.js → index-BKMz70wx.js} +39 -39
- package/dist/playground/assets/index-BmMrulSc.css +1 -0
- package/dist/playground/index.html +2 -2
- package/docs/deployment.md +1 -1
- package/docs/example-agents/benny.md +2 -3
- package/docs/example-agents/oncall.md +4 -5
- package/docs/guides/human-in-the-loop.md +1 -1
- package/docs/guides/slack.md +51 -112
- package/docs/reference/cli.md +14 -37
- package/docs/troubleshooting.md +2 -2
- package/package.json +1 -1
- package/skills/create-agent/SKILL.md +4 -5
- package/skills/setup-slack/SKILL.md +73 -131
- package/src/bin/agent-serve.ts +26 -9
- package/src/channels/slack/init.ts +10 -71
- package/src/channels/slack/manifest.ts +3 -3
- package/src/channels/slack/setup.ts +25 -103
- package/src/channels/slack/types.ts +3 -4
- package/src/internal/cli-ax.ts +3 -3
- package/src/internal/cli-cursor.ts +34 -0
- package/src/internal/cli-slack.ts +136 -389
- package/src/internal/convert-automation/convert-workflow.ts +2 -2
- package/src/internal/slack-provision-client.ts +83 -2
- package/dist/docs/assets/chunks/@localSearchIndexroot.D00d772K.js +0 -1
- package/dist/docs/assets/guides_slack.md.zriQpU_9.lean.js +0 -1
- package/dist/playground/assets/index-Dox74yWJ.css +0 -1
- /package/dist/docs/assets/{deployment.md.Cdp4rTE4.lean.js → deployment.md.B8kW-h7P.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_benny.md.l7JTmm8X.lean.js → example-agents_benny.md.B-LIDGja.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_oncall.md.ZE0n6ZFN.lean.js → example-agents_oncall.md.CBmyuAKc.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.CkgwmVI0.lean.js → troubleshooting.md.C6n3wCr6.lean.js} +0 -0
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
/>
|
|
9
9
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
10
10
|
<title>agent-serve playground</title>
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-BKMz70wx.js"></script>
|
|
12
|
+
<link rel="stylesheet" crossorigin href="./assets/index-BmMrulSc.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="root"></div>
|
package/docs/deployment.md
CHANGED
|
@@ -262,7 +262,7 @@ Slack** connects the workspace with a one-time authorization, and
|
|
|
262
262
|
**Create Slack app** creates and installs the app, then stores its
|
|
263
263
|
tokens as deployment secrets automatically. Redeploy when prompted so
|
|
264
264
|
the running agent picks them up. See
|
|
265
|
-
[Provision from the dashboard](./guides/slack.md#provision-from-the-dashboard
|
|
265
|
+
[Provision from the dashboard](./guides/slack.md#provision-from-the-dashboard)
|
|
266
266
|
for the walkthrough, including workspace-admin approval.
|
|
267
267
|
|
|
268
268
|
If you created the Slack app by hand instead, set its tokens as
|
|
@@ -101,9 +101,8 @@ For the watched-channel path, configure a dedicated Socket Mode app with:
|
|
|
101
101
|
- have an App-Level Token with `connections:write`, and
|
|
102
102
|
- be a member of the watched channel.
|
|
103
103
|
|
|
104
|
-
Run `agent-sdk slack
|
|
105
|
-
|
|
106
|
-
configured channel prefix with `agent-sdk slack doctor`.
|
|
104
|
+
Run `agent-sdk slack create --dir examples/benny --channel-posts` for a
|
|
105
|
+
dedicated Socket Mode app, then `agent-sdk slack doctor`.
|
|
107
106
|
|
|
108
107
|
Missing dedicated-app tokens leave that channel idle. They don't stop the
|
|
109
108
|
account-linked channel.
|
|
@@ -139,14 +139,13 @@ Channel watching is Socket Mode only, so this example uses a dedicated
|
|
|
139
139
|
app:
|
|
140
140
|
|
|
141
141
|
```bash
|
|
142
|
-
agent-sdk slack
|
|
142
|
+
agent-sdk slack create --dir examples/oncall --name "Oncall" --channel-posts
|
|
143
143
|
agent-sdk slack doctor --prefix ONCALL
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
`message.groups`
|
|
148
|
-
|
|
149
|
-
`ONCALL_SLACK_APP_TOKEN`, and invite the bot to each watched channel.
|
|
146
|
+
`--channel-posts` prefills channel-watch events (`message.channels` /
|
|
147
|
+
`message.groups`). Invite the bot to each watched channel after the
|
|
148
|
+
wizard finishes.
|
|
150
149
|
|
|
151
150
|
`ONCALL_ALERTS_CHANNELS` sets the watch list as comma-separated ids or
|
|
152
151
|
`#names`. It defaults to `#alerts`.
|
|
@@ -92,7 +92,7 @@ export default slackChannel({
|
|
|
92
92
|
});
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
Approval cards need interactivity on the Slack app. Cards show redacted,
|
|
96
96
|
truncated arguments because of Block Kit size limits. Execution still
|
|
97
97
|
uses the full validated input, so review sensitive tools in the
|
|
98
98
|
playground when the arguments may exceed the card. Details in the
|
package/docs/guides/slack.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Slack"
|
|
3
|
-
description: "Put the agent in Slack
|
|
3
|
+
description: "Put the agent in Slack: Cursor-hosted connection or a dedicated Socket Mode app via the dashboard wizard, plus doctor, engagement rules, access policy, and approval buttons."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Slack agents
|
|
7
7
|
|
|
8
|
-
The Slack channel puts your agent in Slack
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
The Slack channel puts your agent in Slack. Two products: the Cursor-hosted
|
|
9
|
+
connection (`cursorAccount: true`), or a dedicated Socket Mode app created
|
|
10
|
+
in the dashboard wizard (`agent-sdk slack create`). Socket Mode has no
|
|
11
|
+
public Request URL. Replies stream in threads, with tool "thinking" steps,
|
|
12
|
+
suggested prompts, and opt-in approval buttons.
|
|
13
13
|
|
|
14
14
|
The companion skill is
|
|
15
15
|
[`skills/setup-slack/SKILL.md`](../../skills/setup-slack/SKILL.md).
|
|
@@ -99,17 +99,17 @@ export default slackChannel({
|
|
|
99
99
|
|
|
100
100
|
## Set it up
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
reports the feature is not enabled for your account.
|
|
102
|
+
For a dedicated Socket Mode bot, run `agent-sdk slack create`. The CLI
|
|
103
|
+
opens the signed-in Cursor dashboard wizard. Slack consent, bot name,
|
|
104
|
+
and admin-approval wait happen there. Tokens are stored as deployment
|
|
105
|
+
secrets and written to `.env.local`. They are never shown. Do not paste
|
|
106
|
+
a manifest at [api.slack.com](https://api.slack.com/apps). `slack init`
|
|
107
|
+
is removed.
|
|
109
108
|
|
|
110
|
-
|
|
109
|
+
Bots that already have tokens in `.env.local` keep working. Skip the
|
|
110
|
+
wizard unless you want a Cursor-managed app.
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
### Provision with the CLI
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
115
|
agent-sdk slack create --dir . # dev app (default)
|
|
@@ -118,97 +118,47 @@ agent-sdk slack create --dir . --prod # prod app
|
|
|
118
118
|
|
|
119
119
|
`slack create` needs a signed-in host (`agent-sdk login` or
|
|
120
120
|
`CURSOR_API_KEY`). It scaffolds `agent/channels/slack.ts` when the file
|
|
121
|
-
is missing,
|
|
122
|
-
|
|
123
|
-
workspace), creates and installs the agent's dedicated Socket Mode app,
|
|
121
|
+
is missing, opens the dashboard wizard, and waits. Finish **Add Slack
|
|
122
|
+
to this agent** in the browser as the same Cursor account. The CLI
|
|
124
123
|
writes `<PREFIX>_SLACK_BOT_TOKEN` and `<PREFIX>_SLACK_APP_TOKEN` into
|
|
125
|
-
`<dir>/.env.local`,
|
|
126
|
-
|
|
127
|
-
already in place.
|
|
128
|
-
|
|
129
|
-
If the workspace requires admin approval for new apps, `create` prints
|
|
130
|
-
the Slack approval page for a workspace admin. Re-run
|
|
131
|
-
`agent-sdk slack create` after the approval to finish the install and
|
|
132
|
-
mint the tokens.
|
|
133
|
-
|
|
134
|
-
Useful companions: `--slack-team T0123ABCD` picks a workspace when
|
|
135
|
-
several are connected, `--icon <https-url-or-file>` sets the app icon,
|
|
136
|
-
`agent-sdk slack destroy` deletes the provisioned app, and
|
|
137
|
-
`agent-sdk slack icon <source>` updates the icon later. A re-run of
|
|
138
|
-
`create` refuses to overwrite manifest edits made by hand in Slack;
|
|
139
|
-
pass `--force` to overwrite them.
|
|
140
|
-
|
|
141
|
-
### Provision from the dashboard (hosted deployments)
|
|
142
|
-
|
|
143
|
-
For a [Cursor-hosted deployment](../deployment.md#cursor-managed-hosting),
|
|
144
|
-
provision from
|
|
145
|
-
[cursor.com/dashboard](https://cursor.com/dashboard): open **Deployed
|
|
146
|
-
Agents**, select the deployment, switch to the **Details** view, and
|
|
147
|
-
expand the **Slack** row under **Integrations**.
|
|
148
|
-
|
|
149
|
-
1. Click **Add to Slack** and approve the authorization in the tab that
|
|
150
|
-
opens. This is a one-time consent per user and workspace.
|
|
151
|
-
2. Pick the bot name (and the workspace, when several are connected)
|
|
152
|
-
and click **Create Slack app**. Cursor creates and installs the app,
|
|
153
|
-
then stores its tokens as deployment secrets; the values are never
|
|
154
|
-
shown. The **Advanced** disclosure sets the env-var prefix, so the
|
|
155
|
-
secret names match what your `slackChannel({ envPrefix })` reads.
|
|
156
|
-
3. If the workspace requires admin approval, the row shows **Waiting
|
|
157
|
-
for admin approval** with an **Approve in Slack** button that opens
|
|
158
|
-
Slack's pending-request page. After an admin approves, pick
|
|
159
|
-
**Retry** from the row's menu.
|
|
160
|
-
4. Click **Redeploy** when the banner appears. The running agent keeps
|
|
161
|
-
its old environment until the next deploy.
|
|
162
|
-
|
|
163
|
-
The row's menu also covers later care: rename the app, set its icon,
|
|
164
|
-
rotate its tokens, remove it from Slack, or disconnect the workspace.
|
|
165
|
-
|
|
166
|
-
### Manual setup (fallback)
|
|
167
|
-
|
|
168
|
-
When Add to Slack is not enabled for your account, create the apps by
|
|
169
|
-
hand. Generate the channel file, the app manifests, and the env
|
|
170
|
-
template:
|
|
124
|
+
`<dir>/.env.local`, then runs `doctor`. Serve and smoke it as described
|
|
125
|
+
[below](#wire-the-env-and-verify).
|
|
171
126
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
127
|
+
If Slack needs a workspace admin to approve the app, keep the CLI
|
|
128
|
+
running. Managed install does not file the request — open Slack's
|
|
129
|
+
**Request approval** page (the CLI prints the link; the same URL is
|
|
130
|
+
**Send a reminder** after you submit). After an admin approves, click
|
|
131
|
+
**Retry** in the wizard.
|
|
175
132
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
`
|
|
181
|
-
|
|
133
|
+
Useful companions: `--name` / `--icon` / `--channel-posts` prefill the
|
|
134
|
+
wizard. `--slack-team T0123ABCD` picks a workspace when several are
|
|
135
|
+
connected. A second `slack create` for the same agent and env overwrites
|
|
136
|
+
that Slack app. It keeps the Slack app id and replaces the manifest and
|
|
137
|
+
tokens. `agent-sdk slack destroy` deletes the provisioned app.
|
|
138
|
+
`agent-sdk slack icon <source>` updates the icon later.
|
|
182
139
|
|
|
183
|
-
|
|
140
|
+
### Provision from the dashboard
|
|
184
141
|
|
|
185
|
-
|
|
142
|
+
The same wizard is on [Deployed Agents](https://cursor.com/dashboard).
|
|
143
|
+
Open **Integrations** on an agent and click **Add Slack to this agent**,
|
|
144
|
+
or follow the URL `slack create` printed.
|
|
186
145
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
3. Repeat with `manifest.prod.json`. Dev and prod are separate Slack
|
|
191
|
-
apps with separate tokens.
|
|
146
|
+
A first-run agent that has no hosted engine yet shows **Not deployed
|
|
147
|
+
yet**. Local `agent-sdk serve` works from `.env.local`. The next
|
|
148
|
+
**Deploy** injects the stored secrets; there is no Slack-only Redeploy.
|
|
192
149
|
|
|
193
|
-
|
|
150
|
+
If Slack needs admin approval, the wizard waits. Click **Request
|
|
151
|
+
approval** to file the request in Slack (that same page later sends a
|
|
152
|
+
reminder). After an admin approves, click **Retry**.
|
|
194
153
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
token with scope `connections:write` and copy it (`xapp-…`).
|
|
154
|
+
The app row's menu covers later care: rename, set an icon, rotate
|
|
155
|
+
tokens, remove the app, or disconnect the workspace.
|
|
198
156
|
|
|
199
157
|
### Wire the env and verify
|
|
200
158
|
|
|
201
159
|
`agent-sdk slack create` already wrote the tokens to `.env.local`, so
|
|
202
|
-
after provisioning skip straight to `doctor`.
|
|
203
|
-
|
|
204
|
-
`env.example`, or put them in the agent directory's `.env.local` —
|
|
205
|
-
`serve`/`dev`/`slack doctor` load that file (real environment variables
|
|
206
|
-
always win over it):
|
|
207
|
-
|
|
208
|
-
```bash
|
|
209
|
-
export MY_AGENT_SLACK_BOT_TOKEN=xoxb-…
|
|
210
|
-
export MY_AGENT_SLACK_APP_TOKEN=xapp-…
|
|
211
|
-
```
|
|
160
|
+
after provisioning skip straight to `doctor`. `serve` / `dev` /
|
|
161
|
+
`slack doctor` load that file (real environment variables always win).
|
|
212
162
|
|
|
213
163
|
```bash
|
|
214
164
|
agent-sdk slack doctor --prefix MY_AGENT
|
|
@@ -252,15 +202,9 @@ export default slackChannel({
|
|
|
252
202
|
```
|
|
253
203
|
|
|
254
204
|
Channel watching needs the `message.channels` / `message.groups` events
|
|
255
|
-
on the Slack app (Socket Mode only
|
|
256
|
-
`cursorAccount: true`).
|
|
257
|
-
|
|
258
|
-
watched channel. Posts that mention the bot stay on the `app_mention`
|
|
259
|
-
path, bot-authored posts never dispatch by default, and deleting a post
|
|
260
|
-
inside the debounce window cancels its dispatch. Watched posts reuse the
|
|
261
|
-
thread-scoped principal, so a later @mention continues the same session.
|
|
262
|
-
Set `engagement.mentions` or `engagement.directMessages` to `false` to
|
|
263
|
-
turn those surfaces off.
|
|
205
|
+
on the Slack app (Socket Mode only; not available with
|
|
206
|
+
`cursorAccount: true`). Pass `--channel-posts` on `slack create`. The
|
|
207
|
+
bot must also be a member of each watched channel.
|
|
264
208
|
|
|
265
209
|
Set `includeBotPosts: true` when the posts worth watching come from bots:
|
|
266
210
|
alert feeds, webhook integrations, or other agents posting notes. The
|
|
@@ -289,9 +233,8 @@ export default slackChannel({
|
|
|
289
233
|
});
|
|
290
234
|
```
|
|
291
235
|
|
|
292
|
-
|
|
293
|
-
`
|
|
294
|
-
your app predates it. Composing events by hand instead: spread
|
|
236
|
+
Approval cards need interactivity on the Slack app. Recreate with
|
|
237
|
+
`slack create` if clicks do nothing. Composing events by hand: spread
|
|
295
238
|
`buildToolApprovalEvents({ credentials })` into `events` and set
|
|
296
239
|
`interactivity: true` on the channel so Socket Mode routes the clicks.
|
|
297
240
|
|
|
@@ -331,15 +274,11 @@ Two habits matter most.
|
|
|
331
274
|
The `slack` subcommands cover setup end to end.
|
|
332
275
|
|
|
333
276
|
```bash
|
|
334
|
-
agent-sdk slack setup #
|
|
335
|
-
agent-sdk slack create --dir . #
|
|
277
|
+
agent-sdk slack setup # two-product chooser
|
|
278
|
+
agent-sdk slack create --dir . # dashboard wizard (dev app)
|
|
336
279
|
agent-sdk slack create --dir . --prod # prod app
|
|
337
280
|
agent-sdk slack destroy --dir . # delete the provisioned app
|
|
338
281
|
agent-sdk slack icon ./icon.png --dir . # set the provisioned app's icon
|
|
339
|
-
agent-sdk slack init --dir . --name "My Agent"
|
|
340
|
-
agent-sdk slack init --dir . --no-prefix # shared SLACK_* vars
|
|
341
|
-
agent-sdk slack init --dir . --channel-posts
|
|
342
|
-
agent-sdk slack manifest --env both # regenerate manifests
|
|
343
282
|
agent-sdk slack doctor --prefix MY_AGENT # token / connectivity checks
|
|
344
283
|
```
|
|
345
284
|
|
package/docs/reference/cli.md
CHANGED
|
@@ -771,35 +771,27 @@ setup.
|
|
|
771
771
|
agent-sdk slack setup
|
|
772
772
|
agent-sdk slack create [--dir <path>] [--name <name>] [--prod]
|
|
773
773
|
[--slack-team <T…>] [--team <id>]
|
|
774
|
-
[--icon <https-url-or-file>]
|
|
774
|
+
[--icon <https-url-or-file>]
|
|
775
775
|
[--prefix <prefix> | --no-prefix] [--json]
|
|
776
776
|
agent-sdk slack destroy [--dir <path>] [--prod] [--slack-team <T…>]
|
|
777
777
|
[--team <id>] [--json]
|
|
778
778
|
agent-sdk slack icon <https-url-or-file> [--dir <path>] [--prod]
|
|
779
779
|
[--slack-team <T…>] [--team <id>] [--json]
|
|
780
|
-
agent-sdk slack init [--dir <path>] [--name <name>]
|
|
781
|
-
[--prefix <prefix> | --no-prefix] [--channel-posts]
|
|
782
|
-
agent-sdk slack manifest [--dir <path>] [--name <name>]
|
|
783
|
-
[--env dev|prod|both] [--channel-posts] [--print]
|
|
784
780
|
agent-sdk slack doctor [--dir <path>] [--prefix <prefix> | --no-prefix] [--json]
|
|
785
781
|
```
|
|
786
782
|
|
|
787
|
-
`slack setup` prints
|
|
783
|
+
`slack setup` prints the two-product chooser and doesn't change files.
|
|
788
784
|
|
|
789
|
-
`slack create`
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
exits non-zero; re-run it after the approval to finish and mint the
|
|
800
|
-
tokens. A re-run rebuilds the manifest from the command's flags and
|
|
801
|
-
refuses to overwrite edits made by hand in Slack unless you pass
|
|
802
|
-
`--force`.
|
|
785
|
+
`slack create` opens the signed-in Cursor dashboard wizard. Finish Slack
|
|
786
|
+
consent and the bot name there. The CLI writes the token pair into
|
|
787
|
+
`<dir>/.env.local` and runs `doctor`. It requires a signed-in host
|
|
788
|
+
(`agent-sdk login` or `CURSOR_API_KEY`). `--prod` provisions the
|
|
789
|
+
production app; the default is the development app. `--name` / `--icon`
|
|
790
|
+
/ `--channel-posts` prefill the wizard. A second create for the same
|
|
791
|
+
slug and env overwrites the live Slack app. If Slack needs a workspace
|
|
792
|
+
admin's approval, the wizard waits; keep the CLI running, open Slack's
|
|
793
|
+
**Request approval** page (the CLI prints the link), and click **Retry**
|
|
794
|
+
after the admin approves. Token values never print.
|
|
803
795
|
|
|
804
796
|
`slack destroy` deletes the provisioned app for the selected
|
|
805
797
|
environment. Tokens already written to `.env.local` stay in place and
|
|
@@ -808,23 +800,8 @@ stop working.
|
|
|
808
800
|
`slack icon` sets the provisioned app's icon from an https image URL or
|
|
809
801
|
a local png, jpg, or gif file of at most 512KB.
|
|
810
802
|
|
|
811
|
-
`slack init`
|
|
812
|
-
|
|
813
|
-
to overwrite a target file. If a collision occurs, it exits non-zero;
|
|
814
|
-
files created earlier in the run remain. The token prefix defaults to
|
|
815
|
-
the directory basename normalized to uppercase snake case. Explicit
|
|
816
|
-
`--prefix` values use the same normalization when the Agent SDK builds token
|
|
817
|
-
variable names. For example, `pr-approver` becomes
|
|
818
|
-
`PR_APPROVER_SLACK_BOT_TOKEN`. `--no-prefix` uses shared
|
|
819
|
-
`SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN`. `--channel-posts` subscribes
|
|
820
|
-
the manifests to channel-post events. The command always prints a JSON
|
|
821
|
-
summary.
|
|
822
|
-
|
|
823
|
-
`slack manifest` regenerates selected manifest files. `--env` defaults
|
|
824
|
-
to `both`, and `--name` defaults to the directory name. `--print` writes
|
|
825
|
-
the manifest JSON to stdout instead of changing files. With the default
|
|
826
|
-
`--env both`, it prints development JSON, a `--- prod ---` separator,
|
|
827
|
-
then production JSON.
|
|
803
|
+
`slack init` is removed. It exits non-zero and writes no files. Use
|
|
804
|
+
`slack create`.
|
|
828
805
|
|
|
829
806
|
`slack doctor` checks both tokens, Socket Mode connectivity, and
|
|
830
807
|
Slack's `auth.test`. It exits non-zero when any check fails.
|
package/docs/troubleshooting.md
CHANGED
|
@@ -60,9 +60,9 @@ Match your symptom below. Keep the commands as `agent-sdk`; see
|
|
|
60
60
|
| What you see | What to do |
|
|
61
61
|
| --- | --- |
|
|
62
62
|
| Logs show `channel idle … missing credentials` | Expected when tokens are missing. Run `agent-sdk slack create --dir <agent>` to provision the app and write the tokens, or set `<PREFIX>_SLACK_BOT_TOKEN` and `<PREFIX>_SLACK_APP_TOKEN` per agent yourself, then run `agent-sdk slack doctor --prefix <PREFIX>`. |
|
|
63
|
-
| `slack create` reports the app needs admin approval |
|
|
63
|
+
| `slack create` reports the app needs admin approval | Open Slack's **Request approval** page (the CLI prints the link; the same URL is **Send a reminder** after you submit). Managed install does not file the request. Keep the CLI running, then click **Retry** in the dashboard after an admin approves. |
|
|
64
64
|
| The bot ignores ordinary channel posts | Default engagement is mentions and DMs only. Enable `engagement.channelPosts` with an allowlist, and subscribe the app to `message.channels` / `message.groups`. |
|
|
65
|
-
| Approve / Deny buttons do nothing |
|
|
65
|
+
| Approve / Deny buttons do nothing | Channels that post approval cards need `toolApprovals: true`. Recreate the app with `slack create` if interactivity is off. |
|
|
66
66
|
|
|
67
67
|
## What if host MCP OAuth fails?
|
|
68
68
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cursor/july",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.51",
|
|
4
4
|
"description": "(early alpha) Filesystem-first framework for defining Cursor agents as markdown and TypeScript and serving them over channels with the Cursor SDK.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"repository": {
|
|
@@ -97,7 +97,7 @@ Defaults that make first cuts good:
|
|
|
97
97
|
`prompt\`…\`` / `prompt.lines\`…\`` from `@cursor/july` (dedents indented
|
|
98
98
|
multi-line strings).
|
|
99
99
|
- **Env prefix** for Slack tokens = upper-snake slug (`my-agent` →
|
|
100
|
-
`MY_AGENT_SLACK_*`); `agent-sdk slack
|
|
100
|
+
`MY_AGENT_SLACK_*`); `agent-sdk slack create` derives it for you.
|
|
101
101
|
Dedicated-app path only — the Cursor-hosted connection has no tokens.
|
|
102
102
|
- **Host prep beats model wandering — for evidence, not judgment.** When the
|
|
103
103
|
purpose has a deterministic setup step (fetch a PR, seed files), do it in
|
|
@@ -159,10 +159,9 @@ plan:
|
|
|
159
159
|
short hand-written `agent/channels/slack.ts`
|
|
160
160
|
(`slackChannel({ cursorAccount: true, agentName: "<Name>" })` — no
|
|
161
161
|
tokens, no manifests); for a dedicated Socket Mode app do not hand-write
|
|
162
|
-
the channel — `agent-sdk slack
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
afterwards.
|
|
162
|
+
the channel — `agent-sdk slack create --dir ./<slug> --name "<Name>"`
|
|
163
|
+
opens the dashboard wizard (env prefix from the directory name);
|
|
164
|
+
customize `agent/channels/slack.ts` afterwards (e.g. `suggestedPrompts`).
|
|
166
165
|
5. `evals/evals.config.ts` — `defineEvalConfig({ maxConcurrency: 20 })`
|
|
167
166
|
(playground runs are memory-only unless you add `persistRuns`)
|
|
168
167
|
(`maxConcurrency` is required; hard-capped at 200 due to model provider
|