@rubytech/taskmaster 1.17.4 → 1.17.5
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/dist/build-info.json
CHANGED
|
@@ -255,3 +255,37 @@ export function reconcileBeaglePublicTools(params) {
|
|
|
255
255
|
}
|
|
256
256
|
return { config, changes };
|
|
257
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* Add `skill_read` to admin agents whose explicit allow list lacks it.
|
|
260
|
+
*
|
|
261
|
+
* `skill_read` was added to ACCOUNT_ADMIN_TOOLS after some workspaces were
|
|
262
|
+
* created; those agents have an explicit allow list that predates the addition
|
|
263
|
+
* and therefore miss the tool. The trigger is the presence of `message` (present
|
|
264
|
+
* in every admin agent allow list) without `skill_read`.
|
|
265
|
+
*
|
|
266
|
+
* Runs unconditionally on gateway startup. Idempotent — skips agents that already
|
|
267
|
+
* have `skill_read` or `group:skills`.
|
|
268
|
+
*/
|
|
269
|
+
export function reconcileSkillReadTool(params) {
|
|
270
|
+
const config = structuredClone(params.config);
|
|
271
|
+
const changes = [];
|
|
272
|
+
const agents = config.agents?.list;
|
|
273
|
+
if (!Array.isArray(agents))
|
|
274
|
+
return { config, changes };
|
|
275
|
+
for (const agent of agents) {
|
|
276
|
+
if (!agent || !isAdminAgent(agent))
|
|
277
|
+
continue;
|
|
278
|
+
const allow = agent.tools?.allow;
|
|
279
|
+
if (!Array.isArray(allow))
|
|
280
|
+
continue;
|
|
281
|
+
// Already covered by group or individual entry
|
|
282
|
+
if (allow.includes("skill_read") || allow.includes("group:skills"))
|
|
283
|
+
continue;
|
|
284
|
+
// Only patch agents that look like full admin agents (have `message`)
|
|
285
|
+
if (!allow.includes("message"))
|
|
286
|
+
continue;
|
|
287
|
+
allow.unshift("skill_read");
|
|
288
|
+
changes.push(`Added skill_read to agent "${agent.id ?? "<unnamed>"}" tools.allow.`);
|
|
289
|
+
}
|
|
290
|
+
return { config, changes };
|
|
291
|
+
}
|
|
@@ -10,7 +10,7 @@ import { CONFIG_PATH_TASKMASTER, isNixMode, loadConfig, migrateLegacyConfig, rea
|
|
|
10
10
|
import { VERSION } from "../version.js";
|
|
11
11
|
import { isDiagnosticsEnabled } from "../infra/diagnostic-events.js";
|
|
12
12
|
import { logAcceptedEnvOption } from "../infra/env.js";
|
|
13
|
-
import { reconcileAgentContactTools, reconcileBeaglePublicTools, reconcileControlPanelTools, reconcileQrGenerateTool, reconcileStaleToolEntries, } from "../config/agent-tools-reconcile.js";
|
|
13
|
+
import { reconcileAgentContactTools, reconcileBeaglePublicTools, reconcileControlPanelTools, reconcileQrGenerateTool, reconcileSkillReadTool, reconcileStaleToolEntries, } from "../config/agent-tools-reconcile.js";
|
|
14
14
|
import { applyPluginAutoEnable } from "../config/plugin-auto-enable.js";
|
|
15
15
|
import { clearAgentRunContext, onAgentEvent } from "../infra/agent-events.js";
|
|
16
16
|
import { onHeartbeatEvent } from "../infra/heartbeat-events.js";
|
|
@@ -213,6 +213,20 @@ export async function startGatewayServer(port = 18789, opts = {}) {
|
|
|
213
213
|
log.warn(`gateway: failed to persist control-panel tools reconciliation: ${String(err)}`);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
+
// Add skill_read to admin agents that predate its addition to ACCOUNT_ADMIN_TOOLS.
|
|
217
|
+
const skillReadReconcile = reconcileSkillReadTool({ config: configSnapshot.config });
|
|
218
|
+
if (skillReadReconcile.changes.length > 0) {
|
|
219
|
+
try {
|
|
220
|
+
await writeConfigFile(skillReadReconcile.config);
|
|
221
|
+
configSnapshot = await readConfigFileSnapshot();
|
|
222
|
+
log.info(`gateway: reconciled skill_read tool:\n${skillReadReconcile.changes
|
|
223
|
+
.map((entry) => `- ${entry}`)
|
|
224
|
+
.join("\n")}`);
|
|
225
|
+
}
|
|
226
|
+
catch (err) {
|
|
227
|
+
log.warn(`gateway: failed to persist skill_read tool reconciliation: ${String(err)}`);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
216
230
|
// Stamp config with running version on startup so upgrades keep the stamp current.
|
|
217
231
|
const storedVersion = configSnapshot.config.meta?.lastTouchedVersion;
|
|
218
232
|
if (configSnapshot.exists && storedVersion !== VERSION) {
|
package/package.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stripe
|
|
3
|
+
description: Guide users through getting Stripe API credentials — the secret key for payment links and the webhook signing secret for automatic post-payment workflows.
|
|
4
|
+
metadata: {"taskmaster":{"emoji":"💳"}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Stripe Setup
|
|
8
|
+
|
|
9
|
+
Walks users through creating a Stripe account (or logging in to an existing one), obtaining their secret API key, setting up a webhook endpoint, and saving both credentials. One guided flow covers both keys — the secret key enables payment link creation; the webhook signing secret enables automatic post-payment workflow dispatch without any manual user step.
|
|
10
|
+
|
|
11
|
+
## When to activate
|
|
12
|
+
|
|
13
|
+
- User asks about Stripe setup or connecting Stripe to Taskmaster
|
|
14
|
+
- Control panel shows Stripe or Stripe Webhook Secret as unconfigured and payment features are in use
|
|
15
|
+
- BOOTSTRAP detects missing Stripe key when payment link generation is needed
|
|
16
|
+
- User asks why payments aren't working or why post-payment automation isn't firing
|
|
17
|
+
|
|
18
|
+
## What it unlocks
|
|
19
|
+
|
|
20
|
+
- **Payment link generation** — create Stripe Checkout Sessions for collecting booking fees or other payments
|
|
21
|
+
- **Automatic post-payment dispatch** — Taskmaster receives `checkout.session.completed` webhook events and triggers follow-up workflows without requiring the customer to manually confirm payment
|
|
22
|
+
|
|
23
|
+
## References
|
|
24
|
+
|
|
25
|
+
| Task | When to use | Reference |
|
|
26
|
+
|------|-------------|-----------|
|
|
27
|
+
| Guided setup | User wants help getting both credentials | `references/setup-guide.md` |
|
|
28
|
+
|
|
29
|
+
Load the reference and follow its instructions.
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Stripe — Guided Setup
|
|
2
|
+
|
|
3
|
+
Walk the user through getting both Stripe credentials: the secret API key (used to create payment links) and the webhook signing secret (used to verify incoming payment confirmation events). Guide with clear step-by-step instructions.
|
|
4
|
+
|
|
5
|
+
**Important:** Stripe's dashboard is dense and aimed at developers. The user only needs two things: their secret key and a webhook endpoint. Guide them directly to both — do not let them get lost in the product catalogue, reports, or analytics.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
- User has a Stripe account, or is ready to create one
|
|
12
|
+
- Taskmaster's public URL — the user needs to know their hostname to construct the webhook endpoint URL (e.g. `https://taskmaster-19000.local:19000` or their public domain)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Step 1: Explain
|
|
17
|
+
|
|
18
|
+
Tell the user what you are setting up and why both keys are needed:
|
|
19
|
+
|
|
20
|
+
> "To take payments, Taskmaster needs two things from your Stripe account:
|
|
21
|
+
>
|
|
22
|
+
> 1. **Secret key** — lets Taskmaster create payment links on your behalf
|
|
23
|
+
> 2. **Webhook signing secret** — tells Taskmaster when a customer has actually paid, so it can automatically trigger follow-up actions (like releasing booking details) without waiting for the customer to say anything
|
|
24
|
+
>
|
|
25
|
+
> This takes about 5 minutes. I'll walk you through both."
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Step 2: Log in to Stripe
|
|
30
|
+
|
|
31
|
+
> "Go to **dashboard.stripe.com** and sign in. If you don't have an account yet, click **Start now** and create one — it's free to set up.
|
|
32
|
+
>
|
|
33
|
+
> Let me know when you're in the dashboard."
|
|
34
|
+
|
|
35
|
+
Wait for the user to confirm.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Step 3: Get the secret key
|
|
40
|
+
|
|
41
|
+
**Navigation: Dashboard → Developers → API keys**
|
|
42
|
+
|
|
43
|
+
> "In the left sidebar, click **Developers** (near the bottom), then click **API keys**.
|
|
44
|
+
>
|
|
45
|
+
> You'll see two keys:
|
|
46
|
+
> - **Publishable key** — starts with `pk_` — we don't need this one
|
|
47
|
+
> - **Secret key** — starts with `sk_` — this is the one we need
|
|
48
|
+
>
|
|
49
|
+
> Click **Reveal live key** (or **Reveal test key** if you're still testing). Copy the full key — it starts with `sk_live_` or `sk_test_` and is quite long. Send it to me."
|
|
50
|
+
|
|
51
|
+
Wait for the user to send the key.
|
|
52
|
+
|
|
53
|
+
Verify format (`sk_test_` or `sk_live_` prefix, 30+ characters). If it looks wrong:
|
|
54
|
+
|
|
55
|
+
> "That doesn't look quite right — the secret key should start with `sk_test_` (for test mode) or `sk_live_` (for production) and be at least 30 characters long. Can you check you've copied the **Secret key**, not the Publishable key?"
|
|
56
|
+
|
|
57
|
+
Once you have a valid key, save it:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
api_keys({ action: "set", provider: "stripe", apiKey: "<the key>" })
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Confirm to the user:
|
|
64
|
+
|
|
65
|
+
> "Secret key saved. Now let's set up the webhook so Taskmaster gets notified automatically when a payment goes through."
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Step 4: Create the webhook endpoint
|
|
70
|
+
|
|
71
|
+
**Navigation: Dashboard → Developers → Webhooks → Add endpoint**
|
|
72
|
+
|
|
73
|
+
> "Still in the Developers section, click **Webhooks** in the left sidebar.
|
|
74
|
+
>
|
|
75
|
+
> Click **Add endpoint** (top-right of the page).
|
|
76
|
+
>
|
|
77
|
+
> In the **Endpoint URL** field, enter:
|
|
78
|
+
> `https://<your-taskmaster-host>/webhook/stripe`
|
|
79
|
+
>
|
|
80
|
+
> Replace `<your-taskmaster-host>` with your Taskmaster address — for example `taskmaster-19000.local:19000` if you're on your local network, or your public domain if Taskmaster is accessible from the internet.
|
|
81
|
+
>
|
|
82
|
+
> Under **Select events**, click **+ Select events**, search for `checkout.session.completed`, tick it, and click **Add events**.
|
|
83
|
+
>
|
|
84
|
+
> Then click **Add endpoint** to save.
|
|
85
|
+
>
|
|
86
|
+
> Let me know when you've done that."
|
|
87
|
+
|
|
88
|
+
If the user is unsure of their Taskmaster address:
|
|
89
|
+
|
|
90
|
+
> "Your Taskmaster address is the URL you use to access the control panel — just the host and port, without any path. For example, if your control panel is at `http://taskmaster-19000.local:19000`, your webhook URL would be `https://taskmaster-19000.local:19000/webhook/stripe`."
|
|
91
|
+
|
|
92
|
+
Wait for the user to confirm the endpoint is created.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Step 5: Get the webhook signing secret
|
|
97
|
+
|
|
98
|
+
> "After creating the endpoint, Stripe shows a **Signing secret** — it starts with `whsec_`. Click **Reveal** to show it, then copy it and send it to me.
|
|
99
|
+
>
|
|
100
|
+
> If you've already navigated away, click on the endpoint you just created in the Webhooks list — the signing secret is shown on that endpoint's detail page."
|
|
101
|
+
|
|
102
|
+
Wait for the user to send the signing secret.
|
|
103
|
+
|
|
104
|
+
Verify format (`whsec_` prefix). If it looks wrong:
|
|
105
|
+
|
|
106
|
+
> "The webhook signing secret should start with `whsec_` — that's different from the API key. Click on your webhook endpoint in the Webhooks list and look for the **Signing secret** section."
|
|
107
|
+
|
|
108
|
+
Once you have a valid signing secret, save it:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
api_keys({ action: "set", provider: "stripe_webhook_secret", apiKey: "<the whsec key>" })
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Step 6: Confirm
|
|
117
|
+
|
|
118
|
+
> "Both Stripe credentials are saved:
|
|
119
|
+
>
|
|
120
|
+
> - **Secret key** — payment links can now be created
|
|
121
|
+
> - **Webhook signing secret** — Taskmaster will receive and verify payment confirmations automatically
|
|
122
|
+
>
|
|
123
|
+
> You're all set. As soon as a customer completes a payment, Taskmaster will be notified and can trigger follow-up actions immediately — no manual step needed from the customer."
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## If the user already has a Stripe account
|
|
128
|
+
|
|
129
|
+
Skip Step 2 (they're already logged in). Proceed from Step 3.
|
|
130
|
+
|
|
131
|
+
If they already have a secret key saved somewhere, skip to Step 4.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Test mode vs live mode
|
|
136
|
+
|
|
137
|
+
| | Test mode | Live mode |
|
|
138
|
+
|---|---|---|
|
|
139
|
+
| Key prefix | `sk_test_` | `sk_live_` |
|
|
140
|
+
| Webhooks | Use test webhook endpoints | Use live webhook endpoints |
|
|
141
|
+
| Payments | No real money moves | Real payments |
|
|
142
|
+
|
|
143
|
+
Start with test mode (`sk_test_`) if the user is still building or testing their flow. Switch to live keys when ready for real payments. Both key types are stored the same way — just replace the value in the API Keys panel.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Troubleshooting
|
|
148
|
+
|
|
149
|
+
| Problem | Solution |
|
|
150
|
+
|---------|----------|
|
|
151
|
+
| Can't find Developers menu | It's in the left sidebar, near the bottom. If you're on the Stripe home page, you may need to scroll down or look for a collapsed sidebar — click the hamburger or expand icon. |
|
|
152
|
+
| Secret key is hidden / "Restricted key" shown | You may be looking at a restricted key. Click **API keys** in the Developers section — the secret key is under **Standard keys**. |
|
|
153
|
+
| Can't find signing secret after creating endpoint | Click on the endpoint row in the Webhooks list. The signing secret is on the endpoint's detail page under **Signing secret**. |
|
|
154
|
+
| Webhook URL not accepted (must be HTTPS) | Stripe requires HTTPS for webhook endpoints. If Taskmaster is only on HTTP locally, use a tunnel tool like ngrok during development, or configure a TLS certificate on your Taskmaster host. |
|
|
155
|
+
| Payments confirmed in Stripe but Taskmaster isn't notified | Check the webhook endpoint's delivery log in Stripe (Developers → Webhooks → click endpoint → Recent deliveries). If deliveries are failing, the URL may be unreachable from the internet. |
|
|
156
|
+
| "I already had a webhook set up" | You can use the existing endpoint if it already points to `/webhook/stripe` on your host. Just copy the signing secret from its detail page. |
|