@rubytech/taskmaster 1.13.3 → 1.14.2
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/agents/workspace-migrations.js +128 -0
- package/dist/build-info.json +3 -3
- package/dist/cli/gateway-cli/run.js +36 -16
- package/dist/control-ui/assets/{index-BWqMMgRV.js → index-B3nkSwMP.js} +23 -21
- package/dist/control-ui/assets/index-B3nkSwMP.js.map +1 -0
- package/dist/control-ui/assets/{index-B8I8lMfz.css → index-l54GcTyj.css} +1 -1
- package/dist/control-ui/index.html +2 -2
- package/dist/daemon/service-port.js +109 -0
- package/dist/gateway/server-methods/config.js +44 -0
- package/dist/infra/update-global.js +4 -1
- package/dist/infra/update-runner.js +8 -4
- package/dist/macos/gateway-daemon.js +26 -8
- package/dist/memory/manager.js +14 -3
- package/package.json +1 -1
- package/skills/sales-closer/SKILL.md +29 -0
- package/skills/sales-closer/references/close-tracking.md +86 -0
- package/skills/sales-closer/references/closing-framework.md +112 -0
- package/skills/sales-closer/references/objection-handling.md +101 -0
- package/taskmaster-docs/USER-GUIDE.md +2 -1
- package/templates/beagle-taxi/memory/public/knowledge-base.md +11 -11
- package/templates/beagle-taxi/skills/beagle-taxi/SKILL.md +1 -1
- package/templates/beagle-zanzibar/agents/admin/AGENTS.md +116 -0
- package/templates/beagle-zanzibar/agents/admin/BOOTSTRAP.md +145 -0
- package/templates/{zanzi-taxi → beagle-zanzibar}/agents/admin/HEARTBEAT.md +1 -0
- package/templates/{zanzi-taxi → beagle-zanzibar}/agents/public/AGENTS.md +15 -2
- package/templates/{zanzi-taxi → beagle-zanzibar}/memory/public/knowledge-base.md +13 -0
- package/templates/beagle-zanzibar/memory/public/terms.md +81 -0
- package/templates/{zanzi-taxi/skills/zanzi-taxi → beagle-zanzibar/skills/beagle-zanzibar}/SKILL.md +7 -3
- package/templates/beagle-zanzibar/skills/beagle-zanzibar/references/pin-qr.md +52 -0
- package/templates/{zanzi-taxi/skills/zanzi-taxi → beagle-zanzibar/skills/beagle-zanzibar}/references/post-ride.md +13 -0
- package/templates/{zanzi-taxi/skills/zanzi-taxi → beagle-zanzibar/skills/beagle-zanzibar}/references/ride-matching.md +25 -17
- package/templates/beagle-zanzibar/skills/beagle-zanzibar/references/route-learning.md +61 -0
- package/templates/beagle-zanzibar/skills/stripe/SKILL.md +28 -0
- package/templates/beagle-zanzibar/skills/stripe/references/payment-links.md +71 -0
- package/dist/control-ui/assets/index-BWqMMgRV.js.map +0 -1
- package/templates/zanzi-taxi/agents/admin/AGENTS.md +0 -60
- /package/templates/{zanzi-taxi → beagle-zanzibar}/agents/admin/IDENTITY.md +0 -0
- /package/templates/{zanzi-taxi → beagle-zanzibar}/agents/admin/SOUL.md +0 -0
- /package/templates/{zanzi-taxi → beagle-zanzibar}/agents/public/IDENTITY.md +0 -0
- /package/templates/{zanzi-taxi → beagle-zanzibar}/agents/public/SOUL.md +0 -0
- /package/templates/{zanzi-taxi/skills/zanzi-taxi → beagle-zanzibar/skills/beagle-zanzibar}/references/local-knowledge.md +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# PIN and QR Code — Pickup Verification
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Each confirmed booking gets a unique 4-digit pickup PIN. The tourist holds the PIN. The driver receives a QR code image that encodes it. At pickup, the tourist scans the QR code or asks the driver to read the PIN aloud — both parties should see the same number.
|
|
6
|
+
|
|
7
|
+
## Generating the PIN
|
|
8
|
+
|
|
9
|
+
Pick a random 4-digit integer between 1000 and 9999. No uniqueness check against other bookings is required.
|
|
10
|
+
|
|
11
|
+
Store the PIN in the booking record immediately at `bookings/{job-id}.md`:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
pin: 4827
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Generating the QR Code Image
|
|
18
|
+
|
|
19
|
+
Construct the QR image URL from the PIN:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
https://api.qrserver.com/v1/create-qr-code/?size=300x300&data={pin}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Example — PIN 4827:
|
|
26
|
+
`https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=4827`
|
|
27
|
+
|
|
28
|
+
This URL returns a PNG image of the QR code. No separate API call is needed to generate it.
|
|
29
|
+
|
|
30
|
+
## Sending to the Driver
|
|
31
|
+
|
|
32
|
+
Use the `message` tool to send the QR code as an inline WhatsApp image:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
action: send
|
|
36
|
+
channel: whatsapp
|
|
37
|
+
target: {driver_phone_number}
|
|
38
|
+
media: https://api.qrserver.com/v1/create-qr-code/?size=300x300&data={pin}
|
|
39
|
+
caption: [BGL-XXXX] Your passenger's verification code. Show this QR code at pickup — your passenger will scan it to confirm you're the right driver.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The driver opens WhatsApp, sees the QR code image inline, and shows their phone screen to the tourist at pickup.
|
|
43
|
+
|
|
44
|
+
## Sending to the Tourist
|
|
45
|
+
|
|
46
|
+
Send the PIN with an explanation alongside the other driver details (in the main conversation):
|
|
47
|
+
|
|
48
|
+
> "Your driver verification PIN is **{pin}**. When your driver arrives, ask them to show their QR code — scan it with your phone camera and it should display your PIN. Or ask the driver to read the number aloud. If it matches, you've got the right driver. Works offline — no internet needed."
|
|
49
|
+
|
|
50
|
+
## Timing
|
|
51
|
+
|
|
52
|
+
Generate the PIN immediately after payment is confirmed (Phase 4). Send both as part of Phase 5 — QR image to driver and PIN to tourist — before setting up any pickup reminders.
|
|
@@ -37,6 +37,19 @@ If the tourist reports a serious issue (safety concern, fare dispute, driver mis
|
|
|
37
37
|
- Don't promise specific outcomes ("we'll remove the driver") — explain that the operator reviews all feedback
|
|
38
38
|
- Offer to help with their next ride if they need one
|
|
39
39
|
|
|
40
|
+
## Substitution Check
|
|
41
|
+
|
|
42
|
+
When checking in with the tourist, naturally ask whether the booked driver completed the ride: "Was it [driver name] who picked you up?" Keep it casual — this is a service quality question, not an accusation.
|
|
43
|
+
|
|
44
|
+
**If yes:** proceed with ratings as normal.
|
|
45
|
+
|
|
46
|
+
**If no, or if the tourist names a different person:**
|
|
47
|
+
- Do not alarm the tourist or make promises about consequences
|
|
48
|
+
- Record a substitution flag in the booking record at `bookings/{job-id}.md`
|
|
49
|
+
- Add an entry to the driver's memory profile (`drivers/{name}.md`) under `Substitution Record`:
|
|
50
|
+
`[date]: Substitute reported for [job-id] — tourist named [substitute name if given]`
|
|
51
|
+
- The admin agent handles follow-up with the booked driver operationally
|
|
52
|
+
|
|
40
53
|
## Timing
|
|
41
54
|
|
|
42
55
|
Don't follow up too quickly (they might still be at their destination) or too late (they've moved on). A reasonable window is 30–60 minutes after estimated arrival.
|
|
@@ -8,6 +8,8 @@ When a tourist messages about a ride, gather:
|
|
|
8
8
|
2. **Destination** — where they're going
|
|
9
9
|
3. **Date and time** — when they need the ride
|
|
10
10
|
4. **Passengers** — how many people
|
|
11
|
+
5. **Luggage** - how many pieces, anythinbg oversized
|
|
12
|
+
6. **Special Requests*** - e.g. wheelchair access
|
|
11
13
|
|
|
12
14
|
Ask naturally, not as a form. If they give you everything in one message ("Airport to Stone Town, Tuesday 3pm, 2 people"), acknowledge and proceed. If anything is missing, ask for it conversationally.
|
|
13
15
|
|
|
@@ -16,9 +18,11 @@ Check the knowledge base to confirm you know the route. If the route isn't cover
|
|
|
16
18
|
## Phase 2: Driver Negotiation
|
|
17
19
|
|
|
18
20
|
Before contacting drivers:
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
+
- Use `contact_lookup` with `driver: true` to get the full driver roster
|
|
22
|
+
- Check `drivers/{name}.md` in memory for each driver's current `status` — only contact drivers marked as `idle`
|
|
23
|
+
- Prefer drivers whose route history shows strong performance on this specific route — see `references/route-learning.md`
|
|
21
24
|
- Prepend every message with the job ID: `[BGL-XXXX]`
|
|
25
|
+
- Set each contacted driver's status to `awaiting_response` in their memory profile before sending
|
|
22
26
|
|
|
23
27
|
Negotiate in Swahili. The driver quotes their fare for the route. Collect responses and compare.
|
|
24
28
|
|
|
@@ -44,24 +48,28 @@ If only one driver responded, present it honestly: "One driver available for thi
|
|
|
44
48
|
|
|
45
49
|
When the tourist chooses an offer:
|
|
46
50
|
1. Confirm the details: route, time, fare, vehicle
|
|
47
|
-
2. Explain the booking fee: "A small booking fee of [amount] confirms your ride. You pay [
|
|
48
|
-
3.
|
|
49
|
-
4.
|
|
51
|
+
2. Explain the booking fee and terms in one message: "A small booking fee of [amount] confirms your ride. You pay $[fare] directly to your driver at the end. Beagle is a matching service — the ride is between you and the driver directly. By paying, you accept our terms: beagle.cab/terms"
|
|
52
|
+
3. Load the `stripe` skill — follow `stripe/references/payment-links.md` to calculate the fee and generate a Checkout Session link
|
|
53
|
+
4. Send the payment link to the tourist
|
|
54
|
+
5. When the tourist says they've paid, verify the session status via the Stripe API — do not proceed to Phase 5 until payment is confirmed
|
|
50
55
|
|
|
51
56
|
## Phase 5: Post-Payment
|
|
52
57
|
|
|
53
|
-
Once payment clears
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
-
|
|
58
|
+
Once payment clears:
|
|
59
|
+
|
|
60
|
+
1. **Generate the pickup PIN and QR code** — load `references/pin-qr.md` and follow the instructions there to generate the PIN and construct the driver's QR code URL.
|
|
61
|
+
|
|
62
|
+
2. **Send the tourist:**
|
|
63
|
+
- Driver name
|
|
64
|
+
- Driver phone number
|
|
65
|
+
- Vehicle description and plate number
|
|
66
|
+
- Pickup PIN with verification explanation (see `references/pin-qr.md`)
|
|
67
|
+
|
|
68
|
+
3. **Send the driver:**
|
|
69
|
+
- Passenger name
|
|
70
|
+
- Pickup time and location
|
|
71
|
+
- Fare confirmed
|
|
72
|
+
- QR code URL (encodes the tourist's PIN — see `references/pin-qr.md`)
|
|
65
73
|
|
|
66
74
|
## Phase 6: Driver Pickup Reminders
|
|
67
75
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Route Learning — Building Driver Route Affinity
|
|
2
|
+
|
|
3
|
+
## What This Is
|
|
4
|
+
|
|
5
|
+
Route affinity is the service's accumulated understanding of which drivers tend to perform best on which routes. It is not declared upfront — it emerges from booking outcomes and ratings over time. A driver who consistently earns strong ratings on airport-to-north-coast runs becomes a stronger candidate for that route in future negotiations. A driver with a poor completion record on east coast routes gets deprioritised for those bookings, even if they quote competitively.
|
|
6
|
+
|
|
7
|
+
## Where the Data Lives
|
|
8
|
+
|
|
9
|
+
Booking records in memory (`bookings/{job-id}.md`) contain the raw data:
|
|
10
|
+
- The route (pickup → destination)
|
|
11
|
+
- Which driver completed the ride
|
|
12
|
+
- The rating received
|
|
13
|
+
- Whether the booking completed or was cancelled/no-show
|
|
14
|
+
|
|
15
|
+
Driver memory profiles (`drivers/{name}.md`) contain the aggregated view. The Route History section builds as bookings complete:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
## Route History
|
|
19
|
+
- 2026-02-14: Airport → Nungwi | BGL-0018 | Rating: 4.6
|
|
20
|
+
- 2026-02-28: Airport → Stone Town | BGL-0031 | Rating: 4.1
|
|
21
|
+
- 2026-03-01: Stone Town → Paje | BGL-0037 | Rating: 4.8
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## How Affinity is Used During Driver Selection (Phase 2)
|
|
25
|
+
|
|
26
|
+
When selecting ~3 drivers to contact for a negotiation, prefer drivers whose history shows:
|
|
27
|
+
- Completed rides on this specific route (or similar routes in the same area)
|
|
28
|
+
- Consistent ratings above 4.0 on those runs
|
|
29
|
+
|
|
30
|
+
New drivers (no history) are treated neutrally — they need the opportunity to build a record. Never exclude a driver solely for lacking route history.
|
|
31
|
+
|
|
32
|
+
Do not apply affinity rigidly. A great driver with no history on a route is still a viable choice. Route history is a signal that improves selection over time, not a gatekeeping rule.
|
|
33
|
+
|
|
34
|
+
## How the Public Agent Maintains Route History
|
|
35
|
+
|
|
36
|
+
After each completed booking, the public agent adds a route entry to the driver's memory profile:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
- [date]: [Pickup] → [Destination] | [job-id] | Rating: [score]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If the ride was cancelled, a no-show, or ended in a complaint, note it:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
- [date]: Airport → Nungwi | BGL-0052 | No-show
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
These entries are the raw material the admin agent uses to identify patterns.
|
|
49
|
+
|
|
50
|
+
## Admin Agent: Periodic Route Analysis
|
|
51
|
+
|
|
52
|
+
The admin agent should periodically review route history across the driver roster and surface meaningful patterns to the operator:
|
|
53
|
+
|
|
54
|
+
- Drivers consistently rated above 4.5 on a specific route — flag as strong matches worth prioritising
|
|
55
|
+
- Drivers consistently rated below 3.5 on a specific route — recommend exclusion from that route
|
|
56
|
+
- Routes where no driver achieves strong ratings — flag as a coverage or quality gap worth investigating
|
|
57
|
+
- Drivers whose ratings vary sharply by route — worth noting (excellent on airport runs, poor on east coast, for example)
|
|
58
|
+
|
|
59
|
+
## Limits
|
|
60
|
+
|
|
61
|
+
Patterns need volume to be meaningful. A driver with two rides on a route does not have a pattern — they have a sample. Apply judgement: five or more completed rides on a route with consistent ratings is a reliable signal. Fewer than that warrants patience rather than conclusions.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stripe
|
|
3
|
+
description: "Generates Stripe Checkout Session payment links for Beagle booking fees, and verifies payment status before releasing driver details."
|
|
4
|
+
metadata: {"taskmaster":{"always":false,"emoji":"💳","skillKey":"stripe"}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Stripe — Payment Links
|
|
8
|
+
|
|
9
|
+
## Your Role
|
|
10
|
+
|
|
11
|
+
Generate a Stripe Checkout Session link for each confirmed booking and verify payment before releasing driver details to the tourist.
|
|
12
|
+
|
|
13
|
+
## When to Activate
|
|
14
|
+
|
|
15
|
+
Load this skill when the tourist has chosen an offer and the booking is ready to confirm (Phase 4 of the ride-matching flow).
|
|
16
|
+
|
|
17
|
+
## Reference Table
|
|
18
|
+
|
|
19
|
+
| Task | When | Reference |
|
|
20
|
+
|------|------|-----------|
|
|
21
|
+
| Create payment link | Tourist confirms offer, booking fee needs collecting | `references/payment-links.md` |
|
|
22
|
+
|
|
23
|
+
## Key Rules
|
|
24
|
+
|
|
25
|
+
- **Never release driver details before payment is confirmed.** Always verify the Stripe session status before proceeding to Phase 5.
|
|
26
|
+
- **Minimum fee is $2, maximum is $5.** Calculate as 5% of the agreed fare, clamped to this range.
|
|
27
|
+
- **Each booking gets its own Checkout Session.** Never reuse a payment link between bookings.
|
|
28
|
+
- **Test mode is fine to start.** Use `sk_test_...` keys during setup. Switch to live keys when real bookings begin.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Stripe Payment Links — Checkout Session Creation
|
|
2
|
+
|
|
3
|
+
## Booking Fee Calculation
|
|
4
|
+
|
|
5
|
+
The tourist pays a booking fee to confirm their ride:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
fee = max($2, min($5, fare × 0.05))
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
In cents (Stripe uses the smallest currency unit):
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
fee_cents = max(200, min(500, round(fare_usd × 5)))
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Examples: $20 fare → $2.00 fee | $50 fare → $2.50 fee | $100 fare → $5.00 fee
|
|
18
|
+
|
|
19
|
+
## Creating a Checkout Session
|
|
20
|
+
|
|
21
|
+
Call the Stripe Checkout Sessions API:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
POST https://api.stripe.com/v1/checkout/sessions
|
|
25
|
+
Authorization: Bearer {stripe_secret_key}
|
|
26
|
+
Content-Type: application/x-www-form-urlencoded
|
|
27
|
+
|
|
28
|
+
mode=payment
|
|
29
|
+
payment_method_types[]=card
|
|
30
|
+
line_items[0][price_data][currency]=usd
|
|
31
|
+
line_items[0][price_data][unit_amount]={fee_cents}
|
|
32
|
+
line_items[0][price_data][product_data][name]=Beagle booking fee — {job_id}
|
|
33
|
+
line_items[0][price_data][product_data][description]={route} on {date}
|
|
34
|
+
line_items[0][quantity]=1
|
|
35
|
+
metadata[booking_id]={job_id}
|
|
36
|
+
metadata[tourist_phone]={tourist_phone}
|
|
37
|
+
metadata[negotiated_fare]={fare_usd}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The Stripe secret key is the `stripe` key stored in your API key config (`sk_test_...` for test mode, `sk_live_...` for production).
|
|
41
|
+
|
|
42
|
+
The response includes a `url` field — this is the hosted checkout page to send the tourist.
|
|
43
|
+
|
|
44
|
+
## Sending the Link
|
|
45
|
+
|
|
46
|
+
Send the tourist the checkout URL with context:
|
|
47
|
+
|
|
48
|
+
> "To confirm your booking, pay the $[fee] booking fee here: [url]
|
|
49
|
+
> This locks in your ride. You pay $[fare] directly to your driver at the end of the journey."
|
|
50
|
+
|
|
51
|
+
## Verifying Payment
|
|
52
|
+
|
|
53
|
+
Before releasing driver details (Phase 5), verify the session is paid:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
GET https://api.stripe.com/v1/checkout/sessions/{session_id}
|
|
57
|
+
Authorization: Bearer {stripe_secret_key}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Check `payment_status == "paid"`. If not yet paid, wait for the tourist to say they've paid — then verify. Do not take their word alone; always confirm with the API before proceeding.
|
|
61
|
+
|
|
62
|
+
## What to Store in the Booking Record
|
|
63
|
+
|
|
64
|
+
Add these fields to `bookings/{job-id}.md` when the session is created and confirmed:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
stripe_session_id: cs_...
|
|
68
|
+
booking_fee_usd: 2.50
|
|
69
|
+
payment_status: pending → paid (update when confirmed)
|
|
70
|
+
paid_at: [timestamp from session]
|
|
71
|
+
```
|