@rubytech/taskmaster 1.28.1 → 1.29.1

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.28.1",
3
- "commit": "f29f36f75d6b52cef0f78164a3abebe93fc81ffe",
4
- "builtAt": "2026-03-08T05:59:27.798Z"
2
+ "version": "1.29.1",
3
+ "commit": "ae88034d2419b4e2a6cb0e359e8f685f19995455",
4
+ "builtAt": "2026-03-08T06:35:45.085Z"
5
5
  }
@@ -189,7 +189,14 @@ async function runInstall(packFile, opts) {
189
189
  process.exit(1);
190
190
  }
191
191
  const { payload } = result;
192
- const workspaceDir = opts.workspace ?? path.join(os.homedir(), "taskmaster");
192
+ const rawWorkspace = opts.workspace ?? path.join(os.homedir(), "taskmaster");
193
+ // Expand leading ~ — tilde is not shell-expanded when the workspace is passed
194
+ // as a CLI arg via SSH (double-quoted args suppress tilde expansion in bash).
195
+ const workspaceDir = rawWorkspace.startsWith("~/")
196
+ ? path.join(os.homedir(), rawWorkspace.slice(2))
197
+ : rawWorkspace === "~"
198
+ ? os.homedir()
199
+ : rawWorkspace;
193
200
  console.log(theme.heading(`Installing white glove pack: ${payload.pack.name}`));
194
201
  console.log(theme.muted(` Workspace: ${workspaceDir}`));
195
202
  console.log("");
@@ -6,9 +6,14 @@ import { Logger as TsLogger } from "tslog";
6
6
  import { levelToMinLevel, normalizeLogLevel } from "./levels.js";
7
7
  import { readLoggingConfig } from "./config.js";
8
8
  import { loggingState } from "./state.js";
9
- // Pin to /tmp so mac Debug UI and docs match; os.tmpdir() can be a per-user
10
- // randomized path on macOS which made the “Open log” button a no-op.
11
- export const DEFAULT_LOG_DIR = "/tmp/taskmaster";
9
+ // macOS: use /tmp so the Debug UI "Open log" button points to a stable path.
10
+ // os.tmpdir() on macOS can be a per-user randomized path which made that button a no-op.
11
+ // Linux (Pi): use ~/.taskmaster/logs — /tmp uses the sticky bit so directories created
12
+ // there by a root process (e.g. an earlier daemon run) cannot be chmod'd by the user,
13
+ // making /tmp/taskmaster permanently unwritable after any accidental root creation.
14
+ export const DEFAULT_LOG_DIR = process.platform === "darwin"
15
+ ? "/tmp/taskmaster"
16
+ : path.join(os.homedir(), ".taskmaster", "logs");
12
17
  export const DEFAULT_LOG_FILE = path.join(DEFAULT_LOG_DIR, "taskmaster.log"); // legacy single-file path
13
18
  const LOG_PREFIX = "taskmaster";
14
19
  const LOG_SUFFIX = ".log";
@@ -123,15 +128,16 @@ function buildLogger(settings) {
123
128
  for (const transport of externalTransports) {
124
129
  attachExternalTransport(logger, transport);
125
130
  }
126
- return logger;
131
+ return { logger, resolved: settings };
127
132
  }
128
133
  export function getLogger() {
129
134
  const settings = resolveSettings();
130
135
  const cachedLogger = loggingState.cachedLogger;
131
136
  const cachedSettings = loggingState.cachedSettings;
132
137
  if (!cachedLogger || settingsChanged(cachedSettings, settings)) {
133
- loggingState.cachedLogger = buildLogger(settings);
134
- loggingState.cachedSettings = settings;
138
+ const { logger, resolved } = buildLogger(settings);
139
+ loggingState.cachedLogger = logger;
140
+ loggingState.cachedSettings = resolved;
135
141
  }
136
142
  return loggingState.cachedLogger;
137
143
  }
@@ -162,7 +168,10 @@ export function toPinoLikeLogger(logger, level) {
162
168
  };
163
169
  }
164
170
  export function getResolvedLoggerSettings() {
165
- return resolveSettings();
171
+ // Return cached settings when available — they reflect the actual write location,
172
+ // which may differ from resolveSettings() if ensureWritableLogDir fell back to a
173
+ // different directory (e.g. when /tmp/taskmaster is owned by root).
174
+ return loggingState.cachedSettings ?? resolveSettings();
166
175
  }
167
176
  // Test helpers
168
177
  export function setLoggerOverride(settings) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/taskmaster",
3
- "version": "1.28.1",
3
+ "version": "1.29.1",
4
4
  "description": "AI-powered business assistant for small businesses",
5
5
  "publishConfig": {
6
6
  "access": "public"