supipowers 0.7.7 → 0.7.8

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.
@@ -10,10 +10,9 @@
10
10
  // rules since that's what OMP actually loads as system prompt.
11
11
 
12
12
  import { resolve, join, dirname } from "node:path";
13
- import { readFileSync, writeFileSync, existsSync, mkdirSync, readdirSync, statSync, copyFileSync } from "node:fs";
13
+ import { readFileSync, writeFileSync, existsSync, mkdirSync } from "node:fs";
14
14
  import { fileURLToPath } from "node:url";
15
15
  import { homedir } from "node:os";
16
- import os from "node:os";
17
16
 
18
17
  const __wrapperDir = dirname(fileURLToPath(import.meta.url));
19
18
 
@@ -21,38 +20,10 @@ const __wrapperDir = dirname(fileURLToPath(import.meta.url));
21
20
  const projectDir = resolve(process.cwd());
22
21
  process.env.CLAUDE_PROJECT_DIR = projectDir;
23
22
 
24
- // Redirect context-mode's FTS5 database to a project-scoped directory.
25
- // ContentStore uses `join(tmpdir(), "context-mode-<pid>.db")`.
26
- // By patching os.tmpdir, the DB lives in .omp/context-mode/ instead of /tmp/.
27
- // We also copy the previous session's DB to the new PID filename so indexed
28
- // content persists across sessions (context-mode creates per-PID filenames).
29
- const ctxDbDir = join(projectDir, ".omp", "context-mode");
30
- if (!existsSync(ctxDbDir)) mkdirSync(ctxDbDir, { recursive: true });
31
-
32
- // Find the most recent existing DB and copy it for the new session
33
- const currentDbName = `context-mode-${process.pid}.db`;
34
- try {
35
- const existing = readdirSync(ctxDbDir)
36
- .filter(f => f.match(/^context-mode-\d+\.db$/) && f !== currentDbName);
37
- if (existing.length > 0) {
38
- // Pick the newest by mtime
39
- const newest = existing
40
- .map(f => ({ name: f, mtime: statSync(join(ctxDbDir, f)).mtimeMs }))
41
- .sort((a, b) => b.mtime - a.mtime)[0];
42
- if (newest) {
43
- copyFileSync(join(ctxDbDir, newest.name), join(ctxDbDir, currentDbName));
44
- // Also copy WAL/SHM if they exist
45
- for (const suffix of ["-wal", "-shm"]) {
46
- const src = join(ctxDbDir, newest.name + suffix);
47
- if (existsSync(src)) {
48
- copyFileSync(src, join(ctxDbDir, currentDbName + suffix));
49
- }
50
- }
51
- }
52
- }
53
- } catch { /* best effort */ }
54
-
55
- os.tmpdir = () => ctxDbDir;
23
+ // Note: context-mode uses per-PID ephemeral FTS5 databases that are cleaned
24
+ // up on process exit. Within a session, indexed content persists and ctx_search
25
+ // can query it. Across sessions, content must be re-indexed.
26
+ // The SKILL.md routing rules emphasize using ctx_search for follow-ups.
56
27
 
57
28
  // Resolve start.mjs path from the first CLI argument
58
29
  const startMjs = process.argv[2];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supipowers",
3
- "version": "0.7.7",
3
+ "version": "0.7.8",
4
4
  "description": "OMP-native workflow extension inspired by supipowers.",
5
5
  "type": "module",
6
6
  "scripts": {