@rubytech/taskmaster 1.0.8 → 1.0.10
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 +3 -3
- package/dist/cli/provision-cli.js +12 -30
- package/dist/daemon/service-env.js +3 -0
- package/package.json +1 -1
- package/scripts/install.sh +15 -20
- package/templates/beagle/skills/beagle/SKILL.md +2 -12
- package/templates/customer/skills/business-assistant/SKILL.md +5 -13
- package/templates/taskmaster/skills/business-assistant/SKILL.md +5 -13
- package/templates/taskmaster/skills/taskmaster/SKILL.md +5 -13
- package/templates/tradesupport/skills/business-assistant/SKILL.md +5 -13
package/dist/build-info.json
CHANGED
|
@@ -55,8 +55,8 @@ async function runProvision(opts) {
|
|
|
55
55
|
}
|
|
56
56
|
else if (isLinux) {
|
|
57
57
|
await installAvahi();
|
|
58
|
-
await setHostname();
|
|
59
|
-
await
|
|
58
|
+
await setHostname(port);
|
|
59
|
+
await restartAvahi();
|
|
60
60
|
}
|
|
61
61
|
else {
|
|
62
62
|
console.log("[4/7] mDNS: skipped (Bonjour built-in on macOS)");
|
|
@@ -66,13 +66,14 @@ async function runProvision(opts) {
|
|
|
66
66
|
// Step 7: Install daemon
|
|
67
67
|
console.log("[7/7] Installing gateway daemon...");
|
|
68
68
|
await runDaemonInstall({ port, force: true });
|
|
69
|
+
const hostname = port === DEFAULT_GATEWAY_PORT ? "taskmaster" : `taskmaster-${port}`;
|
|
69
70
|
console.log("");
|
|
70
71
|
console.log("Provision complete!");
|
|
71
72
|
console.log("");
|
|
72
73
|
console.log(` Config: ${resolveConfigPath()}`);
|
|
73
74
|
console.log(` Workspace: ${workspace}`);
|
|
74
75
|
console.log(` Port: ${port}`);
|
|
75
|
-
console.log(` URL: http
|
|
76
|
+
console.log(` URL: http://${hostname}.local:${port}/setup`);
|
|
76
77
|
console.log("");
|
|
77
78
|
console.log("Next: open the URL above in a browser to complete setup.");
|
|
78
79
|
console.log("");
|
|
@@ -167,10 +168,11 @@ async function installAvahi() {
|
|
|
167
168
|
// ---------------------------------------------------------------------------
|
|
168
169
|
// Step 5: Set hostname (Linux only)
|
|
169
170
|
// ---------------------------------------------------------------------------
|
|
170
|
-
async function setHostname() {
|
|
171
|
-
|
|
171
|
+
async function setHostname(port) {
|
|
172
|
+
const hostname = port === DEFAULT_GATEWAY_PORT ? "taskmaster" : `taskmaster-${port}`;
|
|
173
|
+
console.log(`[5/7] Setting hostname to '${hostname}'...`);
|
|
172
174
|
try {
|
|
173
|
-
await runCommandWithTimeout(["sudo", "hostnamectl", "set-hostname",
|
|
175
|
+
await runCommandWithTimeout(["sudo", "hostnamectl", "set-hostname", hostname], {
|
|
174
176
|
timeoutMs: 10_000,
|
|
175
177
|
});
|
|
176
178
|
console.log(" hostname set");
|
|
@@ -182,36 +184,16 @@ async function setHostname() {
|
|
|
182
184
|
// ---------------------------------------------------------------------------
|
|
183
185
|
// Step 6: Register mDNS service (Linux only)
|
|
184
186
|
// ---------------------------------------------------------------------------
|
|
185
|
-
async function
|
|
186
|
-
console.log("[6/7]
|
|
187
|
-
const serviceXml = `<?xml version="1.0" standalone='no'?>
|
|
188
|
-
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
|
189
|
-
<service-group>
|
|
190
|
-
<name replace-wildcards="yes">Taskmaster on %h</name>
|
|
191
|
-
<service>
|
|
192
|
-
<type>_http._tcp</type>
|
|
193
|
-
<port>${port}</port>
|
|
194
|
-
<txt-record>path=/</txt-record>
|
|
195
|
-
</service>
|
|
196
|
-
</service-group>
|
|
197
|
-
`;
|
|
198
|
-
const servicePath = "/etc/avahi/services/taskmaster.service";
|
|
187
|
+
async function restartAvahi() {
|
|
188
|
+
console.log("[6/7] Restarting avahi (mDNS hostname)...");
|
|
199
189
|
try {
|
|
200
|
-
// Write via sudo tee
|
|
201
|
-
const result = await runCommandWithTimeout(["sudo", "tee", servicePath], {
|
|
202
|
-
timeoutMs: 10_000,
|
|
203
|
-
input: serviceXml,
|
|
204
|
-
});
|
|
205
|
-
if (result.code !== 0)
|
|
206
|
-
throw new Error(result.stderr || "tee failed");
|
|
207
|
-
// Restart avahi to pick up changes
|
|
208
190
|
await runCommandWithTimeout(["sudo", "systemctl", "restart", "avahi-daemon"], {
|
|
209
191
|
timeoutMs: 15_000,
|
|
210
192
|
});
|
|
211
|
-
console.log(
|
|
193
|
+
console.log(" mDNS ready (gateway handles service advertisement)");
|
|
212
194
|
}
|
|
213
195
|
catch (err) {
|
|
214
|
-
console.error(`
|
|
196
|
+
console.error(` avahi restart failed: ${String(err)}`);
|
|
215
197
|
}
|
|
216
198
|
}
|
|
217
199
|
// ---------------------------------------------------------------------------
|
|
@@ -97,6 +97,9 @@ export function buildServiceEnvironment(params) {
|
|
|
97
97
|
return {
|
|
98
98
|
HOME: env.HOME,
|
|
99
99
|
PATH: buildMinimalServicePath({ env }),
|
|
100
|
+
// On Linux, avahi-daemon handles mDNS hostname resolution. Disable the
|
|
101
|
+
// gateway's built-in Bonjour (ciao) to avoid hostname probe conflicts.
|
|
102
|
+
...(process.platform === "linux" ? { TASKMASTER_DISABLE_BONJOUR: "1" } : {}),
|
|
100
103
|
TASKMASTER_PROFILE: profile,
|
|
101
104
|
TASKMASTER_STATE_DIR: env.TASKMASTER_STATE_DIR,
|
|
102
105
|
TASKMASTER_CONFIG_PATH: env.TASKMASTER_CONFIG_PATH,
|
package/package.json
CHANGED
package/scripts/install.sh
CHANGED
|
@@ -135,32 +135,27 @@ if [ "$(id -u)" = "0" ] && [ "$REAL_USER" != "root" ]; then
|
|
|
135
135
|
&& echo " avahi-daemon installed" \
|
|
136
136
|
|| echo " avahi-daemon install failed (continuing)"
|
|
137
137
|
|
|
138
|
-
# Hostname
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
# Hostname — include port to avoid conflicts with other instances on the network
|
|
139
|
+
if [ "$MDNS_PORT" = "18789" ]; then
|
|
140
|
+
TM_HOSTNAME="taskmaster"
|
|
141
|
+
else
|
|
142
|
+
TM_HOSTNAME="taskmaster-${MDNS_PORT}"
|
|
143
|
+
fi
|
|
144
|
+
hostnamectl set-hostname "$TM_HOSTNAME" 2>/dev/null \
|
|
145
|
+
&& echo " hostname set to '${TM_HOSTNAME}'" \
|
|
141
146
|
|| echo " hostname set failed (continuing)"
|
|
142
147
|
|
|
143
148
|
# Ensure /etc/hosts resolves the new hostname (sudo warns otherwise)
|
|
144
|
-
if ! grep -q "
|
|
145
|
-
echo "127.0.0.1
|
|
149
|
+
if ! grep -q "$TM_HOSTNAME" /etc/hosts 2>/dev/null; then
|
|
150
|
+
echo "127.0.0.1 $TM_HOSTNAME" >> /etc/hosts
|
|
146
151
|
fi
|
|
147
152
|
|
|
148
|
-
#
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
|
153
|
-
<service-group>
|
|
154
|
-
<name replace-wildcards="yes">Taskmaster on %h</name>
|
|
155
|
-
<service>
|
|
156
|
-
<type>_http._tcp</type>
|
|
157
|
-
<port>${MDNS_PORT}</port>
|
|
158
|
-
<txt-record>path=/</txt-record>
|
|
159
|
-
</service>
|
|
160
|
-
</service-group>
|
|
161
|
-
XMLEOF
|
|
153
|
+
# Remove stale avahi service file from previous installs (conflicts with gateway Bonjour)
|
|
154
|
+
rm -f /etc/avahi/services/taskmaster.service
|
|
155
|
+
|
|
156
|
+
# Restart avahi so it picks up the new hostname
|
|
162
157
|
systemctl restart avahi-daemon 2>/dev/null || true
|
|
163
|
-
echo " mDNS
|
|
158
|
+
echo " mDNS: ${TM_HOSTNAME}.local ready"
|
|
164
159
|
|
|
165
160
|
# Enable user services so systemctl --user works after logout
|
|
166
161
|
REAL_UID=$(id -u "$REAL_USER")
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: beagle
|
|
3
|
-
|
|
3
|
+
description: "Find local service providers, compare quotes, and book the best one for the customer. Full 8-step booking workflow from intake to fee collection."
|
|
4
|
+
metadata: {"taskmaster":{"always":true}}
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Beagle — AI Booking Agent
|
|
7
8
|
|
|
8
|
-
<description>
|
|
9
|
-
Find local service providers, compare quotes, and book the best one for the customer. Full 8-step booking workflow from intake to fee collection.
|
|
10
|
-
</description>
|
|
11
|
-
|
|
12
|
-
<triggers>
|
|
13
|
-
- Any inbound WhatsApp message (customer enquiry or provider response)
|
|
14
|
-
- Any cron-fired agentTurn (timeouts, follow-ups, fee reminders)
|
|
15
|
-
</triggers>
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
9
|
## Quick Reference — The 8 Steps
|
|
20
10
|
|
|
21
11
|
1. **Customer Intake** — Qualify the job (what, where, when, budget). Create booking group.
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
# Business Assistant Skill
|
|
2
|
-
|
|
3
|
-
<description>
|
|
4
|
-
Handle customer enquiries, scheduling, and day-to-day business communication for a small business.
|
|
5
|
-
</description>
|
|
6
|
-
|
|
7
|
-
<triggers>
|
|
8
|
-
- Customer enquiries about services, availability, pricing
|
|
9
|
-
- Scheduling and appointment requests
|
|
10
|
-
- Follow-ups on outstanding requests
|
|
11
|
-
- General business questions
|
|
12
|
-
</triggers>
|
|
13
|
-
|
|
14
1
|
---
|
|
2
|
+
name: business-assistant
|
|
3
|
+
description: "Handle customer enquiries, scheduling, and day-to-day business communication for a small business."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Business Assistant Skill
|
|
15
7
|
|
|
16
8
|
## Your Role
|
|
17
9
|
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
# Business Assistant Skill
|
|
2
|
-
|
|
3
|
-
<description>
|
|
4
|
-
Handle customer enquiries, scheduling, and day-to-day business communication for a small business.
|
|
5
|
-
</description>
|
|
6
|
-
|
|
7
|
-
<triggers>
|
|
8
|
-
- Customer enquiries about services, availability, pricing
|
|
9
|
-
- Scheduling and appointment requests
|
|
10
|
-
- Follow-ups on outstanding requests
|
|
11
|
-
- General business questions
|
|
12
|
-
</triggers>
|
|
13
|
-
|
|
14
1
|
---
|
|
2
|
+
name: business-assistant
|
|
3
|
+
description: "Handle customer enquiries, scheduling, and day-to-day business communication for a small business."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Business Assistant Skill
|
|
15
7
|
|
|
16
8
|
## Your Role
|
|
17
9
|
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
# Taskmaster Product Skill
|
|
2
|
-
|
|
3
|
-
<description>
|
|
4
|
-
Handle enquiries about Taskmaster — the AI business assistant for UK small businesses.
|
|
5
|
-
</description>
|
|
6
|
-
|
|
7
|
-
<triggers>
|
|
8
|
-
- Questions about Taskmaster, the product, pricing, or signup
|
|
9
|
-
- "What is Taskmaster?", "How does it work?", "How much does it cost?"
|
|
10
|
-
- Interest in AI assistant for business
|
|
11
|
-
- Requests for demo, trial, or signup
|
|
12
|
-
</triggers>
|
|
13
|
-
|
|
14
1
|
---
|
|
2
|
+
name: taskmaster
|
|
3
|
+
description: "Handle enquiries about Taskmaster — the AI business assistant for small businesses. Product info, pricing, signup, licensing, and support."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Taskmaster Product Skill
|
|
15
7
|
|
|
16
8
|
## Core Principle: Memory First
|
|
17
9
|
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
# Business Assistant Skill
|
|
2
|
-
|
|
3
|
-
<description>
|
|
4
|
-
Handle customer enquiries, bookings, and diary management for a small business.
|
|
5
|
-
</description>
|
|
6
|
-
|
|
7
|
-
<triggers>
|
|
8
|
-
- Customer enquiries about services, availability, pricing
|
|
9
|
-
- Booking requests and scheduling
|
|
10
|
-
- Quote follow-ups
|
|
11
|
-
- General business questions
|
|
12
|
-
</triggers>
|
|
13
|
-
|
|
14
1
|
---
|
|
2
|
+
name: business-assistant
|
|
3
|
+
description: "Handle customer enquiries, bookings, and diary management for a small business."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Business Assistant Skill
|
|
15
7
|
|
|
16
8
|
## Your Role
|
|
17
9
|
|