Skip to content

Commit bf7f95d

Browse files
committed
refactor: consolidate manifest.json and manifest_oauth.json into single file
Merge both manifests into a single manifest.json per directory. The superset manifest includes user scopes and placeholder URLs using ngrok-free.app, which validates against Slack's schema. For HTTP/OAuth mode, developers just set socket_mode_enabled to false and replace ngrok-free.app with their ngrok domain.
1 parent 413fc75 commit bf7f95d

9 files changed

Lines changed: 99 additions & 283 deletions

File tree

claude-agent-sdk/README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,9 @@ ngrok http 3000
158158

159159
#### Slack CLI
160160

161-
3. Swap the manifest files and update the request URL placeholders:
162-
163-
```sh
164-
mv manifest.json manifest_socket_mode.json
165-
mv manifest_oauth.json manifest.json
166-
```
167-
168-
Replace all instances of `https://YOUR_NGROK_SUBDOMAIN.ngrok-free.app` in `manifest.json` with your ngrok URL.
161+
3. Update `manifest.json` for HTTP mode:
162+
- Set `socket_mode_enabled` to `false`
163+
- Replace `ngrok-free.app` with your ngrok domain (e.g. `YOUR_NGROK_SUBDOMAIN.ngrok-free.app`)
169164

170165
4. Create a new local dev app:
171166

@@ -181,7 +176,7 @@ slack install -E local
181176
6. Update your `.env` OAuth environment variables:
182177
- Run `slack app settings` to open App Settings
183178
- Copy **Client ID**, **Client Secret**, and **Signing Secret**
184-
- Update the **Slack Redirect URI** with your ngrok URL
179+
- Update `SLACK_REDIRECT_URI` in `.env` with your ngrok domain
185180

186181
```sh
187182
SLACK_CLIENT_ID=YOUR_CLIENT_ID
@@ -204,7 +199,7 @@ slack run app_oauth.py
204199

205200
#### Terminal
206201

207-
3. Create your Slack app at [api.slack.com/apps/new](https://api.slack.com/apps/new) using [`manifest_oauth.json`](./manifest_oauth.json). Before pasting the manifest, replace all instances of `https://YOUR_NGROK_SUBDOMAIN.ngrok-free.app` with your ngrok URL.
202+
3. Create your Slack app at [api.slack.com/apps/new](https://api.slack.com/apps/new) using [`manifest.json`](./manifest.json). Before pasting the manifest, set `socket_mode_enabled` to `false` and replace `ngrok-free.app` with your ngrok domain.
208203

209204
4. Install the app to your workspace and copy the following values into your `.env`:
210205
- **Signing Secret** — from _Basic Information_
@@ -219,7 +214,7 @@ SLACK_CLIENT_SECRET=YOUR_CLIENT_SECRET
219214
SLACK_REDIRECT_URI=https://YOUR_NGROK_SUBDOMAIN.ngrok-free.app/slack/oauth_redirect
220215
```
221216

222-
Replace `YOUR_NGROK_SUBDOMAIN` in `SLACK_REDIRECT_URI` with your ngrok subdomain.
217+
Replace `your-subdomain` in `SLACK_REDIRECT_URI` with your ngrok subdomain.
223218

224219
5. Enable MCP for your app:
225220
- Open your app at [api.slack.com/apps](https://api.slack.com/apps)
@@ -236,7 +231,7 @@ python3 app_oauth.py
236231

237232
</details>
238233

239-
> **Note:** Each time ngrok restarts, it generates a new URL. You'll need to update the Request URL in your app's [Event Subscriptions](https://api.slack.com/apps) and [Interactivity](https://api.slack.com/apps) settings, or repeat the manifest setup steps above.
234+
> **Note:** Each time ngrok restarts, it generates a new URL. You'll need to update the ngrok domain in `manifest.json`, `SLACK_REDIRECT_URI` in your `.env`, and re-install the app.
240235
241236
</details>
242237

claude-agent-sdk/manifest.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,30 @@
1818
}
1919
},
2020
"oauth_config": {
21+
"redirect_urls": [
22+
"https://ngrok-free.app/slack/oauth_redirect"
23+
],
2124
"scopes": {
25+
"user": [
26+
"search:read",
27+
"channels:history",
28+
"channels:read",
29+
"groups:history",
30+
"groups:read",
31+
"im:history",
32+
"mpim:history",
33+
"users:read",
34+
"search:read.public",
35+
"search:read.private",
36+
"search:read.mpim",
37+
"search:read.im",
38+
"search:read.files",
39+
"search:read.users",
40+
"chat:write",
41+
"canvases:read",
42+
"canvases:write",
43+
"users:read.email"
44+
],
2245
"bot": [
2346
"app_mentions:read",
2447
"channels:history",
@@ -36,6 +59,7 @@
3659
},
3760
"settings": {
3861
"event_subscriptions": {
62+
"request_url": "https://ngrok-free.app/slack/events",
3963
"bot_events": [
4064
"app_home_opened",
4165
"app_mention",
@@ -46,7 +70,8 @@
4670
]
4771
},
4872
"interactivity": {
49-
"is_enabled": true
73+
"is_enabled": true,
74+
"request_url": "https://ngrok-free.app/slack/events"
5075
},
5176
"org_deploy_enabled": true,
5277
"socket_mode_enabled": true,

claude-agent-sdk/manifest_oauth.json

Lines changed: 0 additions & 80 deletions
This file was deleted.

openai-agents-sdk/README.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,9 @@ ngrok http 3000
158158

159159
#### Slack CLI
160160

161-
3. Swap the manifest files and update the request URL placeholders:
162-
163-
```sh
164-
mv manifest.json manifest_socket_mode.json
165-
mv manifest_oauth.json manifest.json
166-
```
167-
168-
Replace all instances of `https://YOUR_NGROK_SUBDOMAIN.ngrok-free.app` in `manifest.json` with your ngrok URL.
161+
3. Update `manifest.json` for HTTP mode:
162+
- Set `socket_mode_enabled` to `false`
163+
- Replace `ngrok-free.app` with your ngrok domain (e.g. `YOUR_NGROK_SUBDOMAIN.ngrok-free.app`)
169164

170165
4. Create a new local dev app:
171166

@@ -181,7 +176,7 @@ slack install -E local
181176
6. Update your `.env` OAuth environment variables:
182177
- Run `slack app settings` to open App Settings
183178
- Copy **Client ID**, **Client Secret**, and **Signing Secret**
184-
- Update the **Slack Redirect URI** with your ngrok URL
179+
- Update `SLACK_REDIRECT_URI` in `.env` with your ngrok domain
185180

186181
```sh
187182
SLACK_CLIENT_ID=YOUR_CLIENT_ID
@@ -204,7 +199,7 @@ slack run app_oauth.py
204199

205200
#### Terminal
206201

207-
3. Create your Slack app at [api.slack.com/apps/new](https://api.slack.com/apps/new) using [`manifest_oauth.json`](./manifest_oauth.json). Before pasting the manifest, replace all instances of `https://YOUR_NGROK_SUBDOMAIN.ngrok-free.app` with your ngrok URL.
202+
3. Create your Slack app at [api.slack.com/apps/new](https://api.slack.com/apps/new) using [`manifest.json`](./manifest.json). Before pasting the manifest, set `socket_mode_enabled` to `false` and replace `ngrok-free.app` with your ngrok domain.
208203

209204
4. Install the app to your workspace and copy the following values into your `.env`:
210205
- **Signing Secret** — from _Basic Information_
@@ -219,7 +214,7 @@ SLACK_CLIENT_SECRET=YOUR_CLIENT_SECRET
219214
SLACK_REDIRECT_URI=https://YOUR_NGROK_SUBDOMAIN.ngrok-free.app/slack/oauth_redirect
220215
```
221216

222-
Replace `YOUR_NGROK_SUBDOMAIN` in `SLACK_REDIRECT_URI` with your ngrok subdomain.
217+
Replace `your-subdomain` in `SLACK_REDIRECT_URI` with your ngrok subdomain.
223218

224219
5. Enable MCP for your app:
225220
- Open your app at [api.slack.com/apps](https://api.slack.com/apps)
@@ -236,7 +231,7 @@ python3 app_oauth.py
236231

237232
</details>
238233

239-
> **Note:** Each time ngrok restarts, it generates a new URL. You'll need to update the Request URL in your app's [Event Subscriptions](https://api.slack.com/apps) and [Interactivity](https://api.slack.com/apps) settings, or repeat the manifest setup steps above.
234+
> **Note:** Each time ngrok restarts, it generates a new URL. You'll need to update the ngrok domain in `manifest.json`, `SLACK_REDIRECT_URI` in your `.env`, and re-install the app.
240235
241236
</details>
242237

@@ -276,10 +271,6 @@ ruff format
276271

277272
`app_oauth.py` is an alternative entry point that runs the app in HTTP mode instead of Socket Mode. This is intended for deployments that use OAuth for app distribution. See the HTTP Mode section under Development for setup instructions.
278273

279-
### `manifest_oauth.json`
280-
281-
`manifest_oauth.json` is the app manifest configured for HTTP mode (Socket Mode disabled, with request URLs for event subscriptions and interactivity). Use this when setting up the app for HTTP mode instead of `manifest.json`.
282-
283274
### `/listeners`
284275

285276
Every incoming request is routed to a "listener". This directory groups each listener based on the Slack Platform feature used.

openai-agents-sdk/manifest.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,30 @@
1818
}
1919
},
2020
"oauth_config": {
21+
"redirect_urls": [
22+
"https://ngrok-free.app/slack/oauth_redirect"
23+
],
2124
"scopes": {
25+
"user": [
26+
"search:read",
27+
"channels:history",
28+
"channels:read",
29+
"groups:history",
30+
"groups:read",
31+
"im:history",
32+
"mpim:history",
33+
"users:read",
34+
"search:read.public",
35+
"search:read.private",
36+
"search:read.mpim",
37+
"search:read.im",
38+
"search:read.files",
39+
"search:read.users",
40+
"chat:write",
41+
"canvases:read",
42+
"canvases:write",
43+
"users:read.email"
44+
],
2245
"bot": [
2346
"app_mentions:read",
2447
"channels:history",
@@ -36,6 +59,7 @@
3659
},
3760
"settings": {
3861
"event_subscriptions": {
62+
"request_url": "https://ngrok-free.app/slack/events",
3963
"bot_events": [
4064
"app_home_opened",
4165
"app_mention",
@@ -46,7 +70,8 @@
4670
]
4771
},
4872
"interactivity": {
49-
"is_enabled": true
73+
"is_enabled": true,
74+
"request_url": "https://ngrok-free.app/slack/events"
5075
},
5176
"org_deploy_enabled": true,
5277
"socket_mode_enabled": true,

openai-agents-sdk/manifest_oauth.json

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)