specmem-hardwicksoftware 3.7.14 → 3.7.15
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.
|
@@ -174,8 +174,8 @@ export class PromptCommands {
|
|
|
174
174
|
category VARCHAR(100) DEFAULT 'general',
|
|
175
175
|
tags TEXT[] DEFAULT '{}',
|
|
176
176
|
variables TEXT[] DEFAULT '{}',
|
|
177
|
-
--
|
|
178
|
-
embedding vector,
|
|
177
|
+
-- Dimension must be specified for ivfflat index
|
|
178
|
+
embedding vector(384),
|
|
179
179
|
usage_count INTEGER DEFAULT 0,
|
|
180
180
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
181
181
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
@@ -1661,6 +1661,20 @@ export class EmbeddingServerManager extends EventEmitter {
|
|
|
1661
1661
|
}, '[EmbeddingServerManager] SAFETY CHECK: Process command line does not match this project - skipping kill');
|
|
1662
1662
|
continue;
|
|
1663
1663
|
}
|
|
1664
|
+
// CRITICAL FIX: Never kill --service mode processes based on age
|
|
1665
|
+
// Service mode is meant to run indefinitely
|
|
1666
|
+
const isServiceMode = commandLine.includes('--service');
|
|
1667
|
+
if (isServiceMode) {
|
|
1668
|
+
logger.info({
|
|
1669
|
+
pid,
|
|
1670
|
+
ageHours: ageHours?.toFixed(2) || 'unknown',
|
|
1671
|
+
socketPath: this.socketPath,
|
|
1672
|
+
}, '[EmbeddingServerManager] Orphaned --service process found - KEEPING (service mode runs indefinitely)');
|
|
1673
|
+
// Adopt it instead of killing
|
|
1674
|
+
this.isRunning = true;
|
|
1675
|
+
this.process = { pid };
|
|
1676
|
+
continue;
|
|
1677
|
+
}
|
|
1664
1678
|
// Only kill if older than max age
|
|
1665
1679
|
if (ageHours !== null && ageHours <= this.config.maxProcessAgeHours) {
|
|
1666
1680
|
logger.info({
|
|
@@ -1819,6 +1833,12 @@ export class EmbeddingServerManager extends EventEmitter {
|
|
|
1819
1833
|
statusMessage: healthInfo.statusMessage,
|
|
1820
1834
|
}, '[EmbeddingServerManager] Checked PID file process');
|
|
1821
1835
|
if (healthInfo.processExists) {
|
|
1836
|
+
// Respect recommended action — don't kill healthy/service processes
|
|
1837
|
+
if (healthInfo.recommendedAction === 'keep') {
|
|
1838
|
+
logger.info({ pid: healthInfo.pid, status: healthInfo.statusMessage },
|
|
1839
|
+
'[EmbeddingServerManager] killByPidFile: Process is healthy/service - keeping');
|
|
1840
|
+
return;
|
|
1841
|
+
}
|
|
1822
1842
|
await this.killProcessWithHealthInfo(healthInfo);
|
|
1823
1843
|
}
|
|
1824
1844
|
else {
|
|
@@ -119,7 +119,10 @@ export function checkProcessHealth(config) {
|
|
|
119
119
|
// Step 4: Determine if stale
|
|
120
120
|
// Use actual process age if available, otherwise fall back to PID file age
|
|
121
121
|
const effectiveAgeHours = processAgeHours !== null ? processAgeHours : pidFileAgeHours;
|
|
122
|
-
|
|
122
|
+
// CRITICAL FIX: --service mode processes are meant to run indefinitely
|
|
123
|
+
// They should NEVER be considered stale based on age alone
|
|
124
|
+
const isServiceMode = commandLine && commandLine.includes('--service');
|
|
125
|
+
const isStale = isServiceMode ? false : effectiveAgeHours > maxAgeHours;
|
|
123
126
|
// Step 5: Determine recommended action
|
|
124
127
|
let recommendedAction = 'keep';
|
|
125
128
|
let statusMessage = '';
|
|
@@ -137,7 +140,9 @@ export function checkProcessHealth(config) {
|
|
|
137
140
|
}
|
|
138
141
|
else {
|
|
139
142
|
recommendedAction = 'keep';
|
|
140
|
-
statusMessage =
|
|
143
|
+
statusMessage = isServiceMode
|
|
144
|
+
? `Process ${pid} is healthy service-mode (${effectiveAgeHours.toFixed(2)}h old, age check bypassed)`
|
|
145
|
+
: `Process ${pid} is healthy (${effectiveAgeHours.toFixed(2)}h old)`;
|
|
141
146
|
}
|
|
142
147
|
logger.info({
|
|
143
148
|
pid,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specmem-hardwicksoftware",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Persistent memory system for coding sessions - semantic search with pgvector, token compression, team coordination, file watching. Needs root: installs system-wide hooks, manages docker/PostgreSQL, writes global configs, handles screen sessions. justcalljon.pro",
|
|
6
6
|
"main": "dist/index.js",
|