@yemi33/minions 0.1.1937 → 0.1.1938
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 +0 -2
- package/dashboard/js/settings.js +1 -36
- package/dashboard.js +1 -131
- package/docs/README.md +1 -3
- package/docs/deprecated.json +24 -0
- package/docs/rfc-completion-json.md +4 -4
- package/engine/ado.js +0 -17
- package/engine/cli.js +0 -14
- package/engine/github.js +0 -17
- package/engine/lifecycle.js +0 -29
- package/engine/preflight.js +0 -19
- package/engine/shared.js +0 -13
- package/package.json +1 -4
- package/docs/teams-production.md +0 -370
- package/docs/teams-setup.md +0 -352
- package/engine/teams-cards.js +0 -137
- package/engine/teams.js +0 -647
package/docs/teams-production.md
DELETED
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
# Teams Production Endpoint Migration
|
|
2
|
-
|
|
3
|
-
> Last verified: 2026-05-12. `botbuilder` dependency confirmed in `package.json` (4.23.3); `/api/bot` route confirmed in `dashboard.js` (`handleTeamsBot`).
|
|
4
|
-
|
|
5
|
-
Guide for migrating the Minions Teams bot from a Dev Tunnel to a stable public HTTPS endpoint for production use. Choose one of the three deployment options below based on your infrastructure.
|
|
6
|
-
|
|
7
|
-
**Key fact:** The Azure Bot messaging endpoint URL can be changed at any time in the Azure Portal — it takes effect immediately. No bot reinstallation is needed in Teams. This means you can switch between Dev Tunnel and production endpoints freely.
|
|
8
|
-
|
|
9
|
-
**Prerequisites:**
|
|
10
|
-
|
|
11
|
-
- A working Teams integration via Dev Tunnel (see [docs/teams-setup.md](teams-setup.md))
|
|
12
|
-
- Azure CLI installed (`az --version`) for Options 1 and 2
|
|
13
|
-
- A public-facing server or VM for Option 3
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Option 1: Azure App Service
|
|
18
|
-
|
|
19
|
-
Deploy the Minions dashboard as an Azure App Service with a stable FQDN.
|
|
20
|
-
|
|
21
|
-
### Steps
|
|
22
|
-
|
|
23
|
-
1. **Create an App Service Plan** (skip if you have one):
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
az appservice plan create \
|
|
27
|
-
--name minions-plan \
|
|
28
|
-
--resource-group rg-minions \
|
|
29
|
-
--sku B1 \
|
|
30
|
-
--is-linux
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
2. **Create the Web App:**
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
az webapp create \
|
|
37
|
-
--name minions-dashboard \
|
|
38
|
-
--resource-group rg-minions \
|
|
39
|
-
--plan minions-plan \
|
|
40
|
-
--runtime "NODE:20-lts"
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
This creates a publicly accessible URL: `https://minions-dashboard.azurewebsites.net`
|
|
44
|
-
|
|
45
|
-
3. **Configure environment variables:**
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
az webapp config appsettings set \
|
|
49
|
-
--name minions-dashboard \
|
|
50
|
-
--resource-group rg-minions \
|
|
51
|
-
--settings \
|
|
52
|
-
PORT=8080 \
|
|
53
|
-
NODE_ENV=production
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
> Azure App Service routes external port 443 (HTTPS) to your app's internal port (default 8080). Set `PORT=8080` so the dashboard listens on the expected port.
|
|
57
|
-
|
|
58
|
-
4. **Deploy the code:**
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
# From the minions repository root
|
|
62
|
-
az webapp deploy \
|
|
63
|
-
--name minions-dashboard \
|
|
64
|
-
--resource-group rg-minions \
|
|
65
|
-
--src-path . \
|
|
66
|
-
--type zip
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Alternatively, configure continuous deployment from your Git repository:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
az webapp deployment source config \
|
|
73
|
-
--name minions-dashboard \
|
|
74
|
-
--resource-group rg-minions \
|
|
75
|
-
--repo-url https://github.com/your-org/minions \
|
|
76
|
-
--branch master \
|
|
77
|
-
--manual-integration
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
5. **Copy `config.json` to the App Service.** The simplest approach is to use the Kudu console or App Service Editor to upload your `config.json` to the application root. Alternatively, mount an Azure File Share containing your config.
|
|
81
|
-
|
|
82
|
-
6. **Update the Azure Bot messaging endpoint:**
|
|
83
|
-
|
|
84
|
-
- Open the [Azure Portal](https://portal.azure.com) > your Azure Bot resource > **Configuration**.
|
|
85
|
-
- Change the **Messaging endpoint** to:
|
|
86
|
-
```
|
|
87
|
-
https://minions-dashboard.azurewebsites.net/api/bot
|
|
88
|
-
```
|
|
89
|
-
- Click **Apply**. The change takes effect immediately.
|
|
90
|
-
|
|
91
|
-
### Verify
|
|
92
|
-
|
|
93
|
-
1. Open `https://minions-dashboard.azurewebsites.net/api/routes` in a browser — you should see the API route list.
|
|
94
|
-
2. In the Azure Bot resource, click **Test in Web Chat** and send a message.
|
|
95
|
-
3. Send a message in Teams to the bot — confirm it receives and responds.
|
|
96
|
-
|
|
97
|
-
### Rollback
|
|
98
|
-
|
|
99
|
-
To revert to Dev Tunnel:
|
|
100
|
-
|
|
101
|
-
1. Start your local Dev Tunnel: `devtunnel host -p 7331 --allow-anonymous`
|
|
102
|
-
2. Update the Azure Bot messaging endpoint back to your tunnel URL: `https://<tunnel>.devtunnels.ms/api/bot`
|
|
103
|
-
3. Click **Apply**. Traffic returns to your local machine immediately.
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Option 2: Azure Container App
|
|
108
|
-
|
|
109
|
-
Containerize the dashboard and deploy to Azure Container Apps with a stable FQDN.
|
|
110
|
-
|
|
111
|
-
### Steps
|
|
112
|
-
|
|
113
|
-
1. **Create a Dockerfile** in the repository root:
|
|
114
|
-
|
|
115
|
-
```dockerfile
|
|
116
|
-
FROM node:20-slim
|
|
117
|
-
WORKDIR /app
|
|
118
|
-
COPY package*.json ./
|
|
119
|
-
RUN npm ci --omit=dev 2>/dev/null || true
|
|
120
|
-
COPY . .
|
|
121
|
-
EXPOSE 7331
|
|
122
|
-
CMD ["node", "dashboard.js"]
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
> Minions ships with `botbuilder` as its only runtime dependency (declared in `package.json`); other operations rely on Node.js built-ins, so `npm ci` is a fast install.
|
|
126
|
-
|
|
127
|
-
2. **Build and push to Azure Container Registry:**
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
# Create a container registry (skip if you have one)
|
|
131
|
-
az acr create \
|
|
132
|
-
--name minionsacr \
|
|
133
|
-
--resource-group rg-minions \
|
|
134
|
-
--sku Basic
|
|
135
|
-
|
|
136
|
-
# Build and push
|
|
137
|
-
az acr build \
|
|
138
|
-
--registry minionsacr \
|
|
139
|
-
--image minions-dashboard:latest .
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
3. **Create a Container Apps environment** (skip if you have one):
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
az containerapp env create \
|
|
146
|
-
--name minions-env \
|
|
147
|
-
--resource-group rg-minions \
|
|
148
|
-
--location eastus
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
4. **Deploy the container:**
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
az containerapp create \
|
|
155
|
-
--name minions-dashboard \
|
|
156
|
-
--resource-group rg-minions \
|
|
157
|
-
--environment minions-env \
|
|
158
|
-
--image minionsacr.azurecr.io/minions-dashboard:latest \
|
|
159
|
-
--registry-server minionsacr.azurecr.io \
|
|
160
|
-
--target-port 7331 \
|
|
161
|
-
--ingress external \
|
|
162
|
-
--min-replicas 1 \
|
|
163
|
-
--max-replicas 1 \
|
|
164
|
-
--env-vars NODE_ENV=production
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
> Use `--min-replicas 1 --max-replicas 1` because the Minions engine uses file-based state that doesn't support multiple replicas.
|
|
168
|
-
|
|
169
|
-
5. **Get the FQDN:**
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
az containerapp show \
|
|
173
|
-
--name minions-dashboard \
|
|
174
|
-
--resource-group rg-minions \
|
|
175
|
-
--query "properties.configuration.ingress.fqdn" \
|
|
176
|
-
--output tsv
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
This returns something like: `minions-dashboard.happyfield-abc123.eastus.azurecontainerapps.io`
|
|
180
|
-
|
|
181
|
-
6. **Update the Azure Bot messaging endpoint:**
|
|
182
|
-
|
|
183
|
-
- Open the [Azure Portal](https://portal.azure.com) > your Azure Bot resource > **Configuration**.
|
|
184
|
-
- Change the **Messaging endpoint** to:
|
|
185
|
-
```
|
|
186
|
-
https://minions-dashboard.happyfield-abc123.eastus.azurecontainerapps.io/api/bot
|
|
187
|
-
```
|
|
188
|
-
- Click **Apply**. The change takes effect immediately.
|
|
189
|
-
|
|
190
|
-
### Verify
|
|
191
|
-
|
|
192
|
-
1. Open `https://<your-fqdn>/api/routes` in a browser.
|
|
193
|
-
2. Test via Azure Bot **Test in Web Chat**.
|
|
194
|
-
3. Send a message in Teams — confirm end-to-end flow works.
|
|
195
|
-
|
|
196
|
-
### Rollback
|
|
197
|
-
|
|
198
|
-
To revert to Dev Tunnel:
|
|
199
|
-
|
|
200
|
-
1. Start your local Dev Tunnel: `devtunnel host -p 7331 --allow-anonymous`
|
|
201
|
-
2. Update the Azure Bot messaging endpoint back to your tunnel URL.
|
|
202
|
-
3. Click **Apply**. Immediate switchover.
|
|
203
|
-
|
|
204
|
-
Optionally stop the container to save costs:
|
|
205
|
-
|
|
206
|
-
```bash
|
|
207
|
-
az containerapp update \
|
|
208
|
-
--name minions-dashboard \
|
|
209
|
-
--resource-group rg-minions \
|
|
210
|
-
--min-replicas 0 --max-replicas 0
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## Option 3: Reverse Proxy (nginx / Caddy)
|
|
216
|
-
|
|
217
|
-
For servers with a public IP address or an existing reverse proxy setup.
|
|
218
|
-
|
|
219
|
-
### Steps (Caddy — recommended for simplicity)
|
|
220
|
-
|
|
221
|
-
Caddy automatically provisions and renews TLS certificates via Let's Encrypt.
|
|
222
|
-
|
|
223
|
-
1. **Install Caddy:**
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
# Debian/Ubuntu
|
|
227
|
-
sudo apt install -y caddy
|
|
228
|
-
|
|
229
|
-
# macOS
|
|
230
|
-
brew install caddy
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
2. **Configure Caddy.** Create or edit `/etc/caddy/Caddyfile`:
|
|
234
|
-
|
|
235
|
-
```
|
|
236
|
-
minions.yourdomain.com {
|
|
237
|
-
reverse_proxy localhost:7331
|
|
238
|
-
}
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
> Replace `minions.yourdomain.com` with your actual domain. Ensure a DNS A record points this domain to your server's public IP.
|
|
242
|
-
|
|
243
|
-
3. **Start Caddy:**
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
sudo systemctl enable --now caddy
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
Caddy automatically obtains a Let's Encrypt TLS certificate for your domain.
|
|
250
|
-
|
|
251
|
-
4. **Start the Minions dashboard:**
|
|
252
|
-
|
|
253
|
-
```bash
|
|
254
|
-
minions dash
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
Or run it as a systemd service for persistence:
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
# /etc/systemd/system/minions-dashboard.service
|
|
261
|
-
[Unit]
|
|
262
|
-
Description=Minions Dashboard
|
|
263
|
-
After=network.target
|
|
264
|
-
|
|
265
|
-
[Service]
|
|
266
|
-
Type=simple
|
|
267
|
-
User=your-user
|
|
268
|
-
WorkingDirectory=/path/to/minions
|
|
269
|
-
ExecStart=/usr/bin/node dashboard.js
|
|
270
|
-
Restart=on-failure
|
|
271
|
-
|
|
272
|
-
[Install]
|
|
273
|
-
WantedBy=multi-user.target
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
```bash
|
|
277
|
-
sudo systemctl enable --now minions-dashboard
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
5. **Update the Azure Bot messaging endpoint:**
|
|
281
|
-
|
|
282
|
-
- Open the Azure Portal > your Azure Bot resource > **Configuration**.
|
|
283
|
-
- Change the **Messaging endpoint** to:
|
|
284
|
-
```
|
|
285
|
-
https://minions.yourdomain.com/api/bot
|
|
286
|
-
```
|
|
287
|
-
- Click **Apply**. The change takes effect immediately.
|
|
288
|
-
|
|
289
|
-
### Steps (nginx)
|
|
290
|
-
|
|
291
|
-
1. **Install nginx and certbot:**
|
|
292
|
-
|
|
293
|
-
```bash
|
|
294
|
-
sudo apt install -y nginx certbot python3-certbot-nginx
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
2. **Configure nginx.** Create `/etc/nginx/sites-available/minions`:
|
|
298
|
-
|
|
299
|
-
```nginx
|
|
300
|
-
server {
|
|
301
|
-
listen 80;
|
|
302
|
-
server_name minions.yourdomain.com;
|
|
303
|
-
|
|
304
|
-
location / {
|
|
305
|
-
proxy_pass http://localhost:7331;
|
|
306
|
-
proxy_http_version 1.1;
|
|
307
|
-
proxy_set_header Upgrade $http_upgrade;
|
|
308
|
-
proxy_set_header Connection 'upgrade';
|
|
309
|
-
proxy_set_header Host $host;
|
|
310
|
-
proxy_set_header X-Real-IP $remote_addr;
|
|
311
|
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
312
|
-
proxy_set_header X-Forwarded-Proto $scheme;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
```bash
|
|
318
|
-
sudo ln -s /etc/nginx/sites-available/minions /etc/nginx/sites-enabled/
|
|
319
|
-
sudo nginx -t && sudo systemctl reload nginx
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
3. **Obtain a TLS certificate:**
|
|
323
|
-
|
|
324
|
-
```bash
|
|
325
|
-
sudo certbot --nginx -d minions.yourdomain.com
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
Certbot modifies the nginx config to add TLS and sets up auto-renewal.
|
|
329
|
-
|
|
330
|
-
4. **Start the Minions dashboard** (same as Caddy option above).
|
|
331
|
-
|
|
332
|
-
5. **Update the Azure Bot messaging endpoint** (same as Caddy option above).
|
|
333
|
-
|
|
334
|
-
### Verify
|
|
335
|
-
|
|
336
|
-
1. Open `https://minions.yourdomain.com/api/routes` in a browser — confirm the route list loads over HTTPS.
|
|
337
|
-
2. Check the TLS certificate: `curl -vI https://minions.yourdomain.com 2>&1 | grep "SSL certificate"`.
|
|
338
|
-
3. Test via Azure Bot **Test in Web Chat**.
|
|
339
|
-
4. Send a message in Teams — confirm the bot responds.
|
|
340
|
-
|
|
341
|
-
### Rollback
|
|
342
|
-
|
|
343
|
-
To revert to Dev Tunnel:
|
|
344
|
-
|
|
345
|
-
1. Start your local Dev Tunnel: `devtunnel host -p 7331 --allow-anonymous`
|
|
346
|
-
2. Update the Azure Bot messaging endpoint back to your tunnel URL.
|
|
347
|
-
3. Click **Apply**. Immediate switchover.
|
|
348
|
-
|
|
349
|
-
The reverse proxy can remain running — it just won't receive Bot Framework traffic until the endpoint is pointed back.
|
|
350
|
-
|
|
351
|
-
---
|
|
352
|
-
|
|
353
|
-
## Choosing an Option
|
|
354
|
-
|
|
355
|
-
| Criteria | App Service | Container App | Reverse Proxy |
|
|
356
|
-
|----------|-------------|---------------|---------------|
|
|
357
|
-
| Setup complexity | Medium | Medium | Low (Caddy) / Medium (nginx) |
|
|
358
|
-
| TLS management | Automatic | Automatic | Automatic (Caddy/certbot) |
|
|
359
|
-
| Cost | ~$13/mo (B1) | Pay-per-use | Free (your server + Let's Encrypt) |
|
|
360
|
-
| Custom domain | Supported | Supported | Required |
|
|
361
|
-
| Scaling | Supported but not needed | Supported but not needed | Manual |
|
|
362
|
-
| Best for | Azure-native teams | Container workflows | Existing servers |
|
|
363
|
-
|
|
364
|
-
> **Note on replicas:** Minions uses file-based state (`engine/*.json`). Do not run multiple replicas — use exactly 1 instance. All three options above default to single-instance deployment.
|
|
365
|
-
|
|
366
|
-
## Common Notes
|
|
367
|
-
|
|
368
|
-
- **Endpoint changes are immediate.** When you update the messaging endpoint in the Azure Bot Configuration, it takes effect right away. No bot reinstallation, no downtime, no user-visible change in Teams.
|
|
369
|
-
- **No deprecated webhooks.** This guide uses Azure Bot Framework exclusively. Do not use deprecated O365 Connector webhooks or Power Automate flows — they are being removed by Microsoft.
|
|
370
|
-
- **Config portability.** The same `config.json` works across all environments. Just ensure the `teams.appId` and `teams.appPassword` are correct for the bot registration that points to your production URL.
|