@stackmemoryai/stackmemory 1.5.0 → 1.5.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.
@@ -4,8 +4,9 @@ const __filename = __fileURLToPath(import.meta.url);
4
4
  const __dirname = __pathDirname(__filename);
5
5
  import { spawn, execSync } from "child_process";
6
6
  import { existsSync, mkdirSync, rmSync } from "fs";
7
- import { join } from "path";
7
+ import { join, dirname } from "path";
8
8
  import { tmpdir } from "os";
9
+ import { fileURLToPath } from "url";
9
10
  import { logger } from "../../core/monitoring/logger.js";
10
11
  import {
11
12
  LinearClient
@@ -16,6 +17,15 @@ import {
16
17
  } from "../../core/worktree/preflight.js";
17
18
  import { ContextCapture } from "../../core/worktree/capture.js";
18
19
  import { extractKeywords } from "../../core/utils/text.js";
20
+ function findPackageRoot() {
21
+ const currentFile = fileURLToPath(import.meta.url);
22
+ let dir = dirname(currentFile);
23
+ for (let i = 0; i < 6; i++) {
24
+ if (existsSync(join(dir, "package.json"))) return dir;
25
+ dir = dirname(dir);
26
+ }
27
+ return dirname(currentFile);
28
+ }
19
29
  const DEFAULT_CONFIG = {
20
30
  activeStates: ["Todo"],
21
31
  terminalStates: ["Done", "Cancelled", "Canceled", "Closed"],
@@ -27,10 +37,7 @@ const DEFAULT_CONFIG = {
27
37
  repoRoot: process.cwd(),
28
38
  baseBranch: "main",
29
39
  appServerPath: join(
30
- __dirname,
31
- "..",
32
- "..",
33
- "..",
40
+ findPackageRoot(),
34
41
  "scripts",
35
42
  "conductor",
36
43
  "claude-app-server.cjs"
@@ -71,14 +78,23 @@ class Conductor {
71
78
  this.startedAt = Date.now();
72
79
  this.stopping = false;
73
80
  if (!existsSync(this.config.appServerPath)) {
74
- const altPath = join(
75
- this.config.repoRoot,
76
- "scripts",
77
- "symphony",
78
- "claude-app-server.cjs"
79
- );
80
- if (existsSync(altPath)) {
81
- this.config.appServerPath = altPath;
81
+ const candidates = [
82
+ join(
83
+ this.config.repoRoot,
84
+ "scripts",
85
+ "conductor",
86
+ "claude-app-server.cjs"
87
+ ),
88
+ join(
89
+ this.config.repoRoot,
90
+ "scripts",
91
+ "symphony",
92
+ "claude-app-server.cjs"
93
+ )
94
+ ];
95
+ const found = candidates.find((p) => existsSync(p));
96
+ if (found) {
97
+ this.config.appServerPath = found;
82
98
  } else {
83
99
  throw new Error(
84
100
  `claude-app-server.cjs not found at ${this.config.appServerPath}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackmemoryai/stackmemory",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Project-scoped memory for AI coding tools. Durable context across sessions with 56 MCP tools, FTS5 search, Claude/Codex/OpenCode wrappers, Linear sync, automatic hooks, and log analysis.",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",