@staff0rd/assist 0.475.0 → 0.475.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/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.475.0",
9
+ version: "0.475.2",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -27632,7 +27632,7 @@ function requestDrain(socket, lines) {
27632
27632
  }
27633
27633
 
27634
27634
  // src/commands/sessions/daemon/runDaemon.ts
27635
- import { mkdirSync as mkdirSync27 } from "fs";
27635
+ import { mkdirSync as mkdirSync28 } from "fs";
27636
27636
 
27637
27637
  // src/commands/sessions/daemon/createAutoExit.ts
27638
27638
  var DEFAULT_GRACE_MS = 6e4;
@@ -28792,7 +28792,7 @@ function reportSilentFailure(session, clients) {
28792
28792
  }
28793
28793
 
28794
28794
  // src/commands/sessions/daemon/watchTranscript.ts
28795
- import { existsSync as existsSync67, watch as watch3 } from "fs";
28795
+ import { watch as watch3 } from "fs";
28796
28796
 
28797
28797
  // src/commands/sessions/shared/findTranscriptPathSync.ts
28798
28798
  import * as fs36 from "fs";
@@ -28840,6 +28840,20 @@ function headContainsSessionId(filePath, claudeSessionId) {
28840
28840
  }
28841
28841
  }
28842
28842
 
28843
+ // src/commands/sessions/daemon/ensureProjectDirExists.ts
28844
+ import { mkdirSync as mkdirSync27 } from "fs";
28845
+ function ensureProjectDirExists(dir, sessionId) {
28846
+ try {
28847
+ mkdirSync27(dir, { recursive: true });
28848
+ return true;
28849
+ } catch (error) {
28850
+ daemonLog(
28851
+ `session ${sessionId} transcript dir unavailable: ${error instanceof Error ? error.message : String(error)}`
28852
+ );
28853
+ return false;
28854
+ }
28855
+ }
28856
+
28843
28857
  // src/commands/sessions/shared/normalizeUser.ts
28844
28858
  var INTERRUPT_PREFIX = "[Request interrupted";
28845
28859
  function normalizeUser(entry) {
@@ -29064,7 +29078,7 @@ function watchTranscript(session, notify2, onStatusChange) {
29064
29078
  if (!session.cwd || !session.claudeSessionId) return;
29065
29079
  if (session.watchedTranscriptId === session.claudeSessionId) return;
29066
29080
  const dir = projectDirForCwd(session.cwd);
29067
- if (!existsSync67(dir)) return;
29081
+ if (!ensureProjectDirExists(dir, session.id)) return;
29068
29082
  if (session.transcriptWatcher) {
29069
29083
  session.transcriptWatcher.close();
29070
29084
  session.transcriptWatcher = void 0;
@@ -29782,7 +29796,7 @@ function rearmStoppedSessions(sessions, notify2) {
29782
29796
  }
29783
29797
 
29784
29798
  // src/commands/sessions/daemon/worktree/reconcileWorktreesOnRestore.ts
29785
- import { existsSync as existsSync69 } from "fs";
29799
+ import { existsSync as existsSync68 } from "fs";
29786
29800
  import { basename as basename18 } from "path";
29787
29801
 
29788
29802
  // src/commands/sessions/daemon/worktree/accountedTrees.ts
@@ -29872,9 +29886,9 @@ function capped(lines) {
29872
29886
  }
29873
29887
 
29874
29888
  // src/commands/sessions/daemon/worktree/reclaimVanishedWorktrees.ts
29875
- import { existsSync as existsSync68 } from "fs";
29889
+ import { existsSync as existsSync67 } from "fs";
29876
29890
  async function reclaimVanishedWorktrees(clone, paths) {
29877
- if (!existsSync68(clone)) {
29891
+ if (!existsSync67(clone)) {
29878
29892
  for (const { path: path71 } of paths) forgetWorktree(path71);
29879
29893
  daemonLog(
29880
29894
  `clone ${clone} is gone; forgot ${paths.length} worktree record(s) it owned`
@@ -29967,7 +29981,7 @@ async function recoverOrphanedWorktrees(sessions, spawnWith, notify2) {
29967
29981
  const vanished = /* @__PURE__ */ new Map();
29968
29982
  for (const { path: path71, clone } of readWorktreeRegistry()) {
29969
29983
  if (accounted.has(path71)) continue;
29970
- if (!existsSync69(path71)) {
29984
+ if (!existsSync68(path71)) {
29971
29985
  vanished.set(clone, [
29972
29986
  ...vanished.get(clone) ?? [],
29973
29987
  { path: path71, branch: basename18(path71) }
@@ -30329,13 +30343,13 @@ async function defaultConnect() {
30329
30343
  }
30330
30344
 
30331
30345
  // src/commands/sessions/daemon/hasPersistedWindowsSessions.ts
30332
- import { existsSync as existsSync70, readFileSync as readFileSync50 } from "fs";
30346
+ import { existsSync as existsSync69, readFileSync as readFileSync50 } from "fs";
30333
30347
  import { posix } from "path";
30334
30348
  function hasPersistedWindowsSessions() {
30335
30349
  const sessionsFile = windowsSessionsFileFromWsl();
30336
30350
  if (!sessionsFile) return false;
30337
30351
  try {
30338
- if (!existsSync70(sessionsFile)) return false;
30352
+ if (!existsSync69(sessionsFile)) return false;
30339
30353
  const data = JSON.parse(readFileSync50(sessionsFile, "utf8"));
30340
30354
  return Array.isArray(data) && data.length > 0;
30341
30355
  } catch (error) {
@@ -31632,7 +31646,7 @@ async function recoverFromAddrInUse(server, manager, checkAutoExit) {
31632
31646
 
31633
31647
  // src/commands/sessions/daemon/runDaemon.ts
31634
31648
  async function runDaemon() {
31635
- mkdirSync27(daemonPaths.dir, { recursive: true });
31649
+ mkdirSync28(daemonPaths.dir, { recursive: true });
31636
31650
  daemonLog(
31637
31651
  `starting (reason: ${process.env.ASSIST_DAEMON_SPAWN_REASON ?? "manual"})`
31638
31652
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.475.0",
3
+ "version": "0.475.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {