specmem-hardwicksoftware 3.7.39 → 3.7.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specmem-hardwicksoftware",
3
- "version": "3.7.39",
3
+ "version": "3.7.40",
4
4
  "type": "module",
5
5
  "description": "Your Claude Code sessions don't have to start from scratch anymore — SpecMem gives your AI real memory. It won't forget your conversations, your code, or your architecture decisions between sessions. That's the whole point. Semantic code indexing that actually works: TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, C, C++, HTML and more. It doesn't just track functions — it gets classes, methods, fields, constants, enums, macros, imports, structs, the whole codebase graph. There's chat memory too, powered by pgvector embeddings. You've also got token compression, team coordination, multi-agent comms, and file watching built in. 74+ MCP tools. Runs on PostgreSQL + Docker. It's kind of a big deal. justcalljon.pro",
6
6
  "main": "dist/index.js",
@@ -9140,15 +9140,15 @@ function registerProjectInRegistry(projectPath, globalDir) {
9140
9140
  /**
9141
9141
  * Stage 1: MODEL DOWNLOAD
9142
9142
  * Checks for all required ML models. If any are missing, auto-downloads
9143
- * the combined models tarball from GitHub release no prompting.
9143
+ * the combined models tarball from a permanent GitHub release (tag: "models").
9144
+ * Version-independent — all npm versions pull from the same release.
9144
9145
  *
9145
- * Models bundled in npm (always present after install):
9146
- * - all-MiniLM-L6-v2 (embedding)
9147
- * - minisbd (sentence boundary)
9148
- *
9149
- * Models NOT in npm (LFS-only, downloaded via release tarball):
9150
- * - pythia-410m-onnx-quant (mini-COT)
9151
- * - argos-translate (translation en↔zh/zt)
9146
+ * All models (~662MB uncompressed):
9147
+ * - all-MiniLM-L6-v2 (23MB) — embedding model (ONNX)
9148
+ * - pythia-410m-onnx-quant (394MB) — mini-COT (ONNX int8)
9149
+ * - argos-translate (246MB) — translation (en↔zh/zt)
9150
+ * - minisbd (192KB) sentence boundary detection
9151
+ * - argos-translate-packages (4KB) — package registry
9152
9152
  */
9153
9153
  async function ensureModels(ui) {
9154
9154
  const specmemRoot = path.resolve(__dirname, '..');
@@ -9156,8 +9156,10 @@ async function ensureModels(ui) {
9156
9156
  const version = SPECMEM_VERSION;
9157
9157
 
9158
9158
  const sentinels = [
9159
+ { name: 'Embedding (MiniLM)', path: path.join(modelsDir, 'all-MiniLM-L6-v2', 'onnx', 'model_quint8_avx2.onnx') },
9159
9160
  { name: 'Mini-COT (Pythia)', path: path.join(modelsDir, 'pythia-410m-onnx-quant', 'model_quantized.onnx') },
9160
9161
  { name: 'Translation (Argos)', path: path.join(modelsDir, 'argos-translate', 'translate-en_zh-1_9', 'model', 'model.bin') },
9162
+ { name: 'SBD (minisbd)', path: path.join(modelsDir, 'minisbd', 'en.onnx') },
9161
9163
  ];
9162
9164
 
9163
9165
  const missing = sentinels.filter(s => !fs.existsSync(s.path));
@@ -9188,8 +9190,9 @@ async function ensureModels(ui) {
9188
9190
  return;
9189
9191
  }
9190
9192
 
9191
- const releaseUrl = `https://github.com/jonhardwick-spec/specmem/releases/download/v${version}/specmem-models-${version}.tar.gz`;
9192
- const tmpTarball = path.join(os.tmpdir(), `specmem-models-${version}.tar.gz`);
9193
+ // Permanent models release — version-independent, all npm versions pull from here
9194
+ const releaseUrl = 'https://github.com/jonhardwick-spec/specmem/releases/download/models/specmem-models.tar.gz';
9195
+ const tmpTarball = path.join(os.tmpdir(), 'specmem-models.tar.gz');
9193
9196
 
9194
9197
  initLog(`[MODELS] Downloading: ${releaseUrl}`);
9195
9198
 
@@ -9210,14 +9213,15 @@ async function ensureModels(ui) {
9210
9213
 
9211
9214
  try {
9212
9215
  const mkdirCmd = `mkdir -p "${modelsDir}"`;
9213
- const extractCmd = `tar xzf "${tmpTarball}" -C "${modelsDir}"`;
9216
+ // Tarball has models/ prefix strip it so contents land directly in modelsDir
9217
+ const extractCmd = `tar xzf "${tmpTarball}" -C "${modelsDir}" --strip-components=1`;
9214
9218
  if (needsSudo) {
9215
9219
  execSync(`sudo ${mkdirCmd}`, { stdio: 'pipe' });
9216
- execSync(`sudo ${extractCmd}`, { stdio: 'pipe', timeout: 180000 });
9220
+ execSync(`sudo ${extractCmd}`, { stdio: 'pipe', timeout: 300000 });
9217
9221
  execSync(`sudo chmod -R a+rX "${modelsDir}"`, { stdio: 'pipe' });
9218
9222
  } else {
9219
9223
  execSync(mkdirCmd, { stdio: 'pipe' });
9220
- execSync(extractCmd, { stdio: 'pipe', timeout: 180000 });
9224
+ execSync(extractCmd, { stdio: 'pipe', timeout: 300000 });
9221
9225
  }
9222
9226
  } catch (e) {
9223
9227
  initLog(`[MODELS] Extraction failed: ${e.message}`);