@sentry/junior 0.1.0 → 0.1.1
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/README.md +111 -2
- package/dist/bot-6KXJ366H.js +16 -0
- package/dist/{chunk-7E56WM6K.js → chunk-5LLCJPTH.js} +856 -49
- package/dist/{bot-DLML4Z7F.js → chunk-CJFEZLEN.js} +59 -31
- package/dist/{chunk-OD6TOSY4.js → chunk-OVG2HBNM.js} +1 -1
- package/dist/handlers/queue-callback.js +6 -8
- package/dist/handlers/router.js +2 -2
- package/dist/handlers/webhooks.js +1 -1
- package/dist/{route-XLYK6CKP.js → route-DMVINKJW.js} +4 -9
- package/package.json +3 -3
- package/dist/channel-HJO33DGJ.js +0 -18
- package/dist/chunk-GDNDYMGX.js +0 -333
- package/dist/chunk-MM3YNA4F.js +0 -203
- package/dist/chunk-ZA2IDPVG.js +0 -39
- package/dist/chunk-ZBFSIN6G.js +0 -323
- package/dist/client-3GAEMIQ3.js +0 -10
package/README.md
CHANGED
|
@@ -71,9 +71,44 @@ pnpm install
|
|
|
71
71
|
pnpm dev
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
##
|
|
74
|
+
## Deploy on Vercel
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
Use this flow for a production-ready setup.
|
|
77
|
+
|
|
78
|
+
### 1) Create and link a Vercel project
|
|
79
|
+
|
|
80
|
+
Dashboard: `Vercel -> Add New... -> Project`, then import your repo.
|
|
81
|
+
|
|
82
|
+
CLI:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
pnpm dlx vercel@latest login
|
|
86
|
+
pnpm dlx vercel@latest link
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 2) Configure required app routes in your Next.js app
|
|
90
|
+
|
|
91
|
+
Ensure you have these files:
|
|
92
|
+
|
|
93
|
+
`app/api/[...path]/route.js`:
|
|
94
|
+
|
|
95
|
+
```js
|
|
96
|
+
export { GET, POST } from "@sentry/junior/handler";
|
|
97
|
+
export const runtime = "nodejs";
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`app/api/queue/callback/route.js`:
|
|
101
|
+
|
|
102
|
+
```js
|
|
103
|
+
export { POST } from "@sentry/junior/handlers/queue-callback";
|
|
104
|
+
export const runtime = "nodejs";
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 3) Configure Vercel Queue
|
|
108
|
+
|
|
109
|
+
Dashboard: `Project -> Settings -> Functions` (verify queue trigger after deploy).
|
|
110
|
+
|
|
111
|
+
Add this `vercel.json` trigger:
|
|
77
112
|
|
|
78
113
|
```json
|
|
79
114
|
{
|
|
@@ -89,3 +124,77 @@ Add this `vercel.json` function trigger:
|
|
|
89
124
|
}
|
|
90
125
|
}
|
|
91
126
|
```
|
|
127
|
+
|
|
128
|
+
### 4) Configure Redis (`REDIS_URL`)
|
|
129
|
+
|
|
130
|
+
Dashboard options:
|
|
131
|
+
|
|
132
|
+
- Add a Redis integration from `Project -> Storage` (for example Upstash Redis), or
|
|
133
|
+
- Use any external Redis provider and copy its connection URL.
|
|
134
|
+
|
|
135
|
+
Then set `REDIS_URL` in Vercel env vars.
|
|
136
|
+
|
|
137
|
+
### 5) Configure environment variables
|
|
138
|
+
|
|
139
|
+
Set production env vars first, then repeat for `preview` and `development` as needed.
|
|
140
|
+
|
|
141
|
+
#### Required
|
|
142
|
+
|
|
143
|
+
- `SLACK_SIGNING_SECRET`
|
|
144
|
+
- `SLACK_BOT_TOKEN` (or `SLACK_BOT_USER_TOKEN`)
|
|
145
|
+
- `REDIS_URL`
|
|
146
|
+
|
|
147
|
+
CLI:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
vercel env add SLACK_SIGNING_SECRET production --sensitive
|
|
151
|
+
vercel env add SLACK_BOT_TOKEN production --sensitive
|
|
152
|
+
vercel env add REDIS_URL production --sensitive
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### Recommended
|
|
156
|
+
|
|
157
|
+
- `JUNIOR_BOT_NAME` (defaults to `junior`)
|
|
158
|
+
- `AI_MODEL` (defaults to `anthropic/claude-sonnet-4.6`)
|
|
159
|
+
- `AI_FAST_MODEL` (defaults to `anthropic/claude-haiku-4.5`)
|
|
160
|
+
|
|
161
|
+
CLI:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
vercel env add JUNIOR_BOT_NAME production
|
|
165
|
+
vercel env add AI_MODEL production
|
|
166
|
+
vercel env add AI_FAST_MODEL production
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
#### Optional
|
|
170
|
+
|
|
171
|
+
- `JUNIOR_BASE_URL` (set if your canonical external URL differs from Vercel auto-resolved URLs; used for OAuth callback links)
|
|
172
|
+
- `AI_GATEWAY_API_KEY` (optional override; in Vercel runtime, ambient `VERCEL_OIDC_TOKEN` is used automatically for AI gateway auth)
|
|
173
|
+
|
|
174
|
+
After env changes, redeploy so the new deployment picks up updated values.
|
|
175
|
+
|
|
176
|
+
### 6) Configure Slack app (external prerequisite)
|
|
177
|
+
|
|
178
|
+
In Slack app settings:
|
|
179
|
+
|
|
180
|
+
1. Set request URL(s) to `https://<your-domain>/api/webhooks/slack` for Events and Interactivity.
|
|
181
|
+
2. Install the app to your workspace.
|
|
182
|
+
3. Copy credentials into Vercel env vars:
|
|
183
|
+
- Bot token -> `SLACK_BOT_TOKEN`
|
|
184
|
+
- Signing secret -> `SLACK_SIGNING_SECRET`
|
|
185
|
+
|
|
186
|
+
### 7) Deploy and verify
|
|
187
|
+
|
|
188
|
+
1. Deploy the app to Vercel.
|
|
189
|
+
2. Confirm health endpoint responds:
|
|
190
|
+
- `GET https://<your-domain>/api/health`
|
|
191
|
+
3. Mention the bot in Slack and confirm a threaded response arrives.
|
|
192
|
+
4. Confirm queue processing is active in logs (enqueue + callback processing).
|
|
193
|
+
5. Confirm there are no `REDIS_URL is required` runtime errors.
|
|
194
|
+
|
|
195
|
+
## Plugin Setup
|
|
196
|
+
|
|
197
|
+
Core setup above is shared. Plugin-specific requirements are documented in each plugin README:
|
|
198
|
+
|
|
199
|
+
- GitHub: `@sentry/junior-github` -> `packages/junior-github/skills/github/README.md`
|
|
200
|
+
- Sentry: `@sentry/junior-sentry` -> `packages/junior-sentry/README.md`
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
appSlackRuntime,
|
|
3
|
+
bot,
|
|
4
|
+
createNormalizingStream,
|
|
5
|
+
resetBotDepsForTests,
|
|
6
|
+
setBotDepsForTests
|
|
7
|
+
} from "./chunk-CJFEZLEN.js";
|
|
8
|
+
import "./chunk-5LLCJPTH.js";
|
|
9
|
+
import "./chunk-BBOVH5RF.js";
|
|
10
|
+
export {
|
|
11
|
+
appSlackRuntime,
|
|
12
|
+
bot,
|
|
13
|
+
createNormalizingStream,
|
|
14
|
+
resetBotDepsForTests,
|
|
15
|
+
setBotDepsForTests
|
|
16
|
+
};
|