@rubytech/taskmaster 1.0.9 → 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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.9",
3
- "commit": "bb9f9dfd5f3570a9463a2a6f560e591d0eb1ecef",
4
- "builtAt": "2026-02-15T09:07:11.586Z"
2
+ "version": "1.0.10",
3
+ "commit": "ea3f9738ae14b41c3edb34d5acc713e741b3f0db",
4
+ "builtAt": "2026-02-15T09:22:34.386Z"
5
5
  }
@@ -55,7 +55,7 @@ async function runProvision(opts) {
55
55
  }
56
56
  else if (isLinux) {
57
57
  await installAvahi();
58
- await setHostname();
58
+ await setHostname(port);
59
59
  await restartAvahi();
60
60
  }
61
61
  else {
@@ -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://taskmaster.local:${port}/setup`);
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
- console.log("[5/7] Setting hostname to 'taskmaster'...");
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", "taskmaster"], {
175
+ await runCommandWithTimeout(["sudo", "hostnamectl", "set-hostname", hostname], {
174
176
  timeoutMs: 10_000,
175
177
  });
176
178
  console.log(" hostname set");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/taskmaster",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "AI-powered business assistant for small businesses",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -135,19 +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
- hostnamectl set-hostname taskmaster 2>/dev/null \
140
- && echo " hostname set to 'taskmaster'" \
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 "taskmaster" /etc/hosts 2>/dev/null; then
145
- echo "127.0.0.1 taskmaster" >> /etc/hosts
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
 
153
+ # Remove stale avahi service file from previous installs (conflicts with gateway Bonjour)
154
+ rm -f /etc/avahi/services/taskmaster.service
155
+
148
156
  # Restart avahi so it picks up the new hostname
149
157
  systemctl restart avahi-daemon 2>/dev/null || true
150
- echo " mDNS ready (gateway handles service advertisement)"
158
+ echo " mDNS: ${TM_HOSTNAME}.local ready"
151
159
 
152
160
  # Enable user services so systemctl --user works after logout
153
161
  REAL_UID=$(id -u "$REAL_USER")