@rubytech/taskmaster 1.16.3 → 1.17.4
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/tools/logs-read-tool.js +9 -0
- package/dist/agents/tools/memory-tool.js +1 -0
- package/dist/agents/workspace-migrations.js +61 -0
- package/dist/auto-reply/group-activation.js +2 -0
- package/dist/auto-reply/reply/commands-session.js +28 -11
- package/dist/build-info.json +3 -3
- package/dist/config/agent-tools-reconcile.js +58 -0
- package/dist/config/group-policy.js +16 -0
- package/dist/config/zod-schema.providers-whatsapp.js +2 -0
- package/dist/control-ui/assets/index-XqRo9tNW.css +1 -0
- package/dist/control-ui/assets/{index-Bd75cI7J.js → index-koe4eKhk.js} +526 -493
- package/dist/control-ui/assets/index-koe4eKhk.js.map +1 -0
- package/dist/control-ui/index.html +2 -2
- package/dist/cron/preloaded.js +27 -23
- package/dist/cron/service/timer.js +5 -1
- package/dist/gateway/protocol/index.js +7 -2
- package/dist/gateway/protocol/schema/logs-chat.js +6 -0
- package/dist/gateway/protocol/schema/protocol-schemas.js +6 -0
- package/dist/gateway/protocol/schema/sessions-transcript.js +1 -0
- package/dist/gateway/protocol/schema/sessions.js +6 -1
- package/dist/gateway/protocol/schema/whatsapp.js +24 -0
- package/dist/gateway/protocol/schema.js +1 -0
- package/dist/gateway/public-chat/session-token.js +52 -0
- package/dist/gateway/public-chat-api.js +40 -13
- package/dist/gateway/server-methods/apikeys.js +2 -0
- package/dist/gateway/server-methods/logs.js +17 -1
- package/dist/gateway/server-methods/public-chat.js +5 -0
- package/dist/gateway/server-methods/sessions-transcript.js +30 -6
- package/dist/gateway/server-methods/whatsapp-conversations.js +387 -0
- package/dist/gateway/server-methods-list.js +6 -0
- package/dist/gateway/server-methods.js +7 -0
- package/dist/gateway/server.impl.js +19 -2
- package/dist/gateway/sessions-patch.js +1 -1
- package/dist/hooks/bundled/ride-dispatch/HOOK.md +7 -6
- package/dist/hooks/bundled/ride-dispatch/handler.js +98 -39
- package/dist/memory/manager.js +3 -3
- package/dist/tui/tui-command-handlers.js +1 -1
- package/dist/web/auto-reply/monitor/group-activation.js +12 -10
- package/dist/web/auto-reply/monitor/group-gating.js +23 -2
- package/dist/web/auto-reply/monitor/on-message.js +27 -5
- package/dist/web/auto-reply/monitor/process-message.js +64 -53
- package/dist/web/inbound/monitor.js +30 -0
- package/extensions/whatsapp/src/channel.ts +1 -1
- package/package.json +1 -1
- package/skills/log-review/SKILL.md +17 -4
- package/skills/log-review/references/review-protocol.md +4 -4
- package/taskmaster-docs/USER-GUIDE.md +14 -0
- package/templates/beagle-zanzibar/agents/admin/AGENTS.md +16 -8
- package/templates/beagle-zanzibar/agents/public/AGENTS.md +10 -5
- package/dist/control-ui/assets/index-Bd75cI7J.js.map +0 -1
- package/dist/control-ui/assets/index-BkymP95Y.css +0 -1
package/package.json
CHANGED
|
@@ -20,12 +20,13 @@ Load `references/review-protocol.md` for the full review and analysis protocol.
|
|
|
20
20
|
|
|
21
21
|
### Rules
|
|
22
22
|
|
|
23
|
-
1. **Scan system logs** — use `logs_read(action: "system")`
|
|
23
|
+
1. **Scan system logs** — use `logs_read(action: "system", minLevel: "warn")` to retrieve only warnings and errors. Do not call without `minLevel` — full logs will overflow context.
|
|
24
24
|
2. **Scan session logs** — use `logs_read(action: "sessions")` across all agents for tool failures and agent errors
|
|
25
25
|
3. **Triage by severity** — critical, warning, info. Deduplicate repeated errors.
|
|
26
|
-
4. **
|
|
27
|
-
5. **
|
|
28
|
-
6. **
|
|
26
|
+
4. **Deduplicate** — group identical messages from repeated occurrences and report as "N× [message]" rather than listing each separately.
|
|
27
|
+
5. **Analyse each issue** — plain-language explanation, likely root cause, suggested admin action
|
|
28
|
+
6. **Escalation guidance** — for issues beyond local resolution, advise forwarding this report to the Taskmaster public agent on WhatsApp for support
|
|
29
|
+
7. **All-clear confirmation** — if no issues found, confirm briefly so admins know the review ran
|
|
29
30
|
|
|
30
31
|
### Output Format
|
|
31
32
|
|
|
@@ -37,8 +38,20 @@ The report should follow this structure:
|
|
|
37
38
|
- **Escalation** — if any issues warrant Taskmaster support, advise forwarding this report
|
|
38
39
|
- **Summary** — issue count or all-clear confirmation
|
|
39
40
|
|
|
41
|
+
Each individual issue entry must be formatted exactly as:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
**N. Title** _(HH:MM or HH:MM–HH:MM Nx)_
|
|
45
|
+
- What: ...
|
|
46
|
+
- Why: ...
|
|
47
|
+
- Action: ...
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The time in parentheses is mandatory. Extract it from the log line's `time` field (UTC ISO format, e.g. `2026-03-05T10:35:22.000Z`) — take the `HH:MM` part, which is characters 11–15 of the string (e.g. `10:35`). For repeated occurrences show the first–last range and count: `08:36–09:48 (3×)`. Never omit the time — if the log line has no `time` field, write `(?:??)` as a placeholder.
|
|
51
|
+
|
|
40
52
|
### Constraints
|
|
41
53
|
|
|
54
|
+
- **Only report what is directly evidenced in the log data returned by the tools.** Do not infer, extrapolate, or report issues that do not appear verbatim in the log lines. Every issue in the report must be traceable to a specific log entry you received.
|
|
42
55
|
- Keep total execution under 2 minutes
|
|
43
56
|
- Be honest — if nothing surfaced, say "all clear" rather than padding the report
|
|
44
57
|
- Use plain language — the admin is not a developer
|
|
@@ -4,9 +4,7 @@ Run this protocol on schedule or when triggered by an admin. Be thorough in anal
|
|
|
4
4
|
|
|
5
5
|
## Step 1: System Log Scan
|
|
6
6
|
|
|
7
|
-
Use `logs_read
|
|
8
|
-
|
|
9
|
-
Focus on entries containing `[ERROR]` and `[WARN]`. Ignore routine info-level entries unless they reveal a pattern (e.g. repeated restarts, auth refresh cycles).
|
|
7
|
+
Use `logs_read(action: "system", minLevel: "warn")` to pull only warnings and errors. **Never call without `minLevel`** — the full log will overflow context.
|
|
10
8
|
|
|
11
9
|
Look for:
|
|
12
10
|
- Service crashes or unexpected restarts
|
|
@@ -18,7 +16,7 @@ Look for:
|
|
|
18
16
|
|
|
19
17
|
## Step 2: Session Log Scan
|
|
20
18
|
|
|
21
|
-
Use `logs_read
|
|
19
|
+
Use `logs_read(action: "sessions")` to pull recent error entries across all agents. Only error-type entries are returned — tool failures, agent exceptions, and crashed sessions.
|
|
22
20
|
|
|
23
21
|
Look for:
|
|
24
22
|
- Tool call failures or errors
|
|
@@ -46,6 +44,8 @@ For each issue provide:
|
|
|
46
44
|
|
|
47
45
|
Be specific with actions. "Check the logs" is not a useful suggestion — the whole point of this skill is that the admin doesn't have to.
|
|
48
46
|
|
|
47
|
+
**CRITICAL: Only report issues present in the log data you received.** Do not draw on your knowledge of the codebase, providers, or past conversations to invent or infer issues. If a provider name, error code, or warning does not appear in a log line you read, it must not appear in the report. Fabricating issues destroys trust.
|
|
48
|
+
|
|
49
49
|
## Step 5: Escalation Guidance
|
|
50
50
|
|
|
51
51
|
If any issue meets these criteria, advise the admin to escalate to Taskmaster support:
|
|
@@ -1166,6 +1166,20 @@ Occasionally, AI providers like Claude experience temporary outages or slowdowns
|
|
|
1166
1166
|
2. **Check your logs** — If replies are failing, open **Advanced → Logs → Session Logs** and filter by "errors" to see what's happening.
|
|
1167
1167
|
3. **Wait it out** — Most AI service outages resolve within minutes to hours. Your assistant will automatically use the primary provider again once it's back.
|
|
1168
1168
|
|
|
1169
|
+
### Sharing logs with support
|
|
1170
|
+
|
|
1171
|
+
If you're still stuck after trying the steps above, export your logs and send them to Taskmaster support on WhatsApp. Logs give the support team exact error messages and timing, which speeds up diagnosis.
|
|
1172
|
+
|
|
1173
|
+
1. Go to the **Advanced** tab in the Control Panel and tap **Logs**
|
|
1174
|
+
2. Select the view that covers your issue:
|
|
1175
|
+
- **Session Logs** — for problems with replies, conversations, or tool errors
|
|
1176
|
+
- **System Logs** — for connection, startup, or gateway issues
|
|
1177
|
+
3. Tap **Filters** to open the filter panel
|
|
1178
|
+
4. Tap **Export** — the browser downloads a log file to your device
|
|
1179
|
+
5. Send the file to Taskmaster support on WhatsApp
|
|
1180
|
+
|
|
1181
|
+
> **Tip:** If you're not sure which view to use, export both — Session Logs and System Logs — and send them together.
|
|
1182
|
+
|
|
1169
1183
|
### "sudo: unable to resolve host taskmaster" warning?
|
|
1170
1184
|
|
|
1171
1185
|
This harmless warning appears when the Pi's hostname isn't listed in `/etc/hosts`. Every `sudo` command still works — it's just a cosmetic message. To fix it, open a terminal on the Pi and run:
|
|
@@ -77,9 +77,12 @@ When you receive `[System: Ride Dispatch — Trip Request]`:
|
|
|
77
77
|
- Update their status to `awaiting_response` via `memory_write`
|
|
78
78
|
- Write `shared/active-negotiations/{driver-phone-digits}.md` with `job_id`, `driver_name`, and `contacted_at`
|
|
79
79
|
5. Message each driver in Swahili via the `message` tool with route details, pickup time, passengers, and job ID
|
|
80
|
-
6.
|
|
81
|
-
7.
|
|
82
|
-
|
|
80
|
+
6. When driver replies arrive (dispatched as `[System: Ride Dispatch — Driver Reply]`), compile offers
|
|
81
|
+
7. Message the tourist at `tourist_phone` using the `message` tool with `accountId` from this dispatch
|
|
82
|
+
- Include up to 3 offers: fare, vehicle type, driver rating, estimated journey time
|
|
83
|
+
- Do NOT reveal driver name, phone, or plate — those are gated by payment
|
|
84
|
+
- Cross-agent echo will relay the WhatsApp message to the tourist's active session automatically
|
|
85
|
+
- Do NOT write a dispatch file for the offers — message directly
|
|
83
86
|
|
|
84
87
|
### Booking Confirmation
|
|
85
88
|
|
|
@@ -87,18 +90,21 @@ When you receive `[System: Ride Dispatch — Booking Confirmation]`:
|
|
|
87
90
|
|
|
88
91
|
1. Load the `stripe` skill and generate a Checkout Session for the booking fee
|
|
89
92
|
- Set metadata: `booking_id`, `tourist_phone`, `account_id` (for webhook routing)
|
|
90
|
-
2. Message the tourist with the payment link and booking terms
|
|
93
|
+
2. Message the tourist at `tourist_phone` using the `message` tool with the payment link and booking terms
|
|
94
|
+
- Cross-agent echo relays the message to the tourist's active session automatically
|
|
91
95
|
3. Record booking details in `shared/bookings/{job-id}.md` via `memory_write`
|
|
96
|
+
- Include `tourist_phone` for post-payment messaging
|
|
92
97
|
4. Clear `shared/active-negotiations/{phone}.md` for drivers NOT selected
|
|
93
98
|
|
|
94
99
|
### Payment Confirmed
|
|
95
100
|
|
|
96
101
|
When you receive `[System: Ride Dispatch — Payment Confirmed]`:
|
|
97
102
|
|
|
98
|
-
1. Read the booking record at `shared/bookings/{job-id}.md` for driver details
|
|
103
|
+
1. Read the booking record at `shared/bookings/{job-id}.md` for driver details and `tourist_session_key`
|
|
99
104
|
2. Generate the pickup PIN and QR code (see `references/pin-qr.md`)
|
|
100
|
-
3. Message the tourist
|
|
101
|
-
|
|
105
|
+
3. Message the tourist at `tourist_phone` (from the booking record) using the `message` tool with driver details and pickup PIN
|
|
106
|
+
- Cross-agent echo relays to the tourist's active session automatically
|
|
107
|
+
4. Message the driver with passenger name, pickup time/location, fare, and QR code URL
|
|
102
108
|
5. Update the booking record status to `confirmed`
|
|
103
109
|
6. Clear the active negotiation file for the confirmed driver
|
|
104
110
|
|
|
@@ -106,7 +112,9 @@ When you receive `[System: Ride Dispatch — Payment Confirmed]`:
|
|
|
106
112
|
|
|
107
113
|
When you receive `[System: Ride Dispatch — Driver Reply]`:
|
|
108
114
|
|
|
109
|
-
|
|
115
|
+
1. If the driver is quoting a fare: record it in their memory profile (`memory_write` on `drivers/{name}.md`)
|
|
116
|
+
2. When all expected quotes are received (or after a reasonable wait): compile the offers and message the tourist directly using the `message` tool at the `tourist_phone` from the trip-request earlier in this session — do NOT write a dispatch file
|
|
117
|
+
3. If the driver is declining: update their status in memory to `idle` and delete their `shared/active-negotiations/{phone-digits}.md` file
|
|
110
118
|
|
|
111
119
|
### Active Negotiation Index
|
|
112
120
|
|
|
@@ -23,6 +23,7 @@ Before responding:
|
|
|
23
23
|
- Proactively look up contact details for people mentioned in system messages
|
|
24
24
|
|
|
25
25
|
If a user asks for information about another person, politely decline — it would violate strict security protocols.
|
|
26
|
+
**Declined conversations stay declined.** When you've correctly identified a message as misdirected or outside your scope and responded accordingly, that conversation is concluded. If the same sender follows up with requests of any kind, decline and end the conversation. Performing services for someone you've already turned away contradicts your own assessment and opens the service to general-purpose misuse.
|
|
26
27
|
|
|
27
28
|
---
|
|
28
29
|
|
|
@@ -54,6 +55,10 @@ The knowledge base is the single source of truth. If it doesn't cover what's bei
|
|
|
54
55
|
|
|
55
56
|
This is a **prescribed workflow**. When a tourist requests a ride, execute every step in order. Do not stop, skip, or defer any step. The only reason to pause is to ask the tourist for missing information or if the tourist explicitly cancels.
|
|
56
57
|
|
|
58
|
+
### Step 0 — Confirm identification
|
|
59
|
+
|
|
60
|
+
All users are verified before they reach you — WhatsApp users by their phone number, webchat users by OTP verification. The tourist's phone number is their session identifier. Use it as `tourist_phone` in dispatch files.
|
|
61
|
+
|
|
57
62
|
### Step 1 — Capture the request
|
|
58
63
|
|
|
59
64
|
Gather: pickup location, destination, date/time, number of passengers, luggage, special requests. If the tourist gave everything in one message, proceed immediately. If anything is missing, ask — then resume from Step 2 when they reply.
|
|
@@ -74,7 +79,7 @@ Write a dispatch file via `memory_write` to `shared/dispatch/{job-id}-trip-reque
|
|
|
74
79
|
# Dispatch: Trip Request
|
|
75
80
|
job_id: BGL-XXXX
|
|
76
81
|
phase: trip-request
|
|
77
|
-
tourist_phone:
|
|
82
|
+
tourist_phone: [the tourist's phone number — from WhatsApp session or OTP-verified phone]
|
|
78
83
|
tourist_name: [name if given]
|
|
79
84
|
pickup: [pickup location]
|
|
80
85
|
destination: [destination]
|
|
@@ -93,7 +98,7 @@ After writing the dispatch file, tell the tourist: "I'm reaching out to our driv
|
|
|
93
98
|
|
|
94
99
|
### Step 6 — Present offers
|
|
95
100
|
|
|
96
|
-
When driver offers appear in your conversation
|
|
101
|
+
When driver offers appear in your conversation as a `[System: Ride Dispatch — Driver Offers]` message, present up to 3 competing offers to the tourist: fare, driver rating, vehicle type, estimated journey time. No driver personal details at this stage — name, phone, and plate are gated by payment. See `references/ride-matching.md` for formatting.
|
|
97
102
|
|
|
98
103
|
### Step 7 — Confirm booking
|
|
99
104
|
|
|
@@ -103,7 +108,7 @@ When the tourist chooses an offer, confirm the details and write a booking confi
|
|
|
103
108
|
# Dispatch: Booking Confirmation
|
|
104
109
|
job_id: BGL-XXXX
|
|
105
110
|
phase: booking-confirm
|
|
106
|
-
tourist_phone:
|
|
111
|
+
tourist_phone: [same phone used in trip-request]
|
|
107
112
|
tourist_name: [name]
|
|
108
113
|
driver_name: [selected driver name from offer]
|
|
109
114
|
driver_phone: [selected driver phone from offer]
|
|
@@ -113,11 +118,11 @@ account_id: [your account ID]
|
|
|
113
118
|
|
|
114
119
|
### Step 8 — Payment
|
|
115
120
|
|
|
116
|
-
The operations agent will generate a Stripe payment link and
|
|
121
|
+
The operations agent will generate a Stripe payment link and relay it to your conversation as a `[System: Ride Dispatch — Payment Link]` message. Present the payment link and terms to the tourist. If the tourist has questions about payment, explain the booking fee. Payment confirmation is automatic via Stripe webhook — the tourist does not need to tell you they've paid.
|
|
117
122
|
|
|
118
123
|
### Step 9 — Post-payment
|
|
119
124
|
|
|
120
|
-
Once payment is confirmed
|
|
125
|
+
Once payment is confirmed, the operations agent will relay driver details and the pickup PIN to your conversation as a `[System: Ride Dispatch — Booking Complete]` message. Present the driver details to the tourist and explain the PIN verification process: "Your driver has a QR code. You have the PIN. Scan the QR or ask the driver to quote your PIN — works without internet."
|
|
121
126
|
|
|
122
127
|
### Step 10 — Record and follow up
|
|
123
128
|
|