@memories.sh/cli 0.2.2 → 0.3.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.
@@ -143,6 +143,28 @@ async function runMigrations(db) {
143
143
  await db.execute(`CREATE INDEX IF NOT EXISTS idx_memories_scope_project ON memories(scope, project_id)`);
144
144
  } catch {
145
145
  }
146
+ await db.execute(
147
+ `CREATE TABLE IF NOT EXISTS files (
148
+ id TEXT PRIMARY KEY,
149
+ path TEXT NOT NULL,
150
+ content TEXT NOT NULL,
151
+ hash TEXT NOT NULL,
152
+ scope TEXT NOT NULL DEFAULT 'global',
153
+ source TEXT,
154
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
155
+ updated_at TEXT NOT NULL DEFAULT (datetime('now')),
156
+ deleted_at TEXT,
157
+ UNIQUE(path, scope)
158
+ )`
159
+ );
160
+ try {
161
+ await db.execute(`CREATE INDEX IF NOT EXISTS idx_files_scope ON files(scope)`);
162
+ } catch {
163
+ }
164
+ try {
165
+ await db.execute(`CREATE INDEX IF NOT EXISTS idx_files_path ON files(path)`);
166
+ } catch {
167
+ }
146
168
  }
147
169
 
148
170
  export {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getDb
4
- } from "./chunk-BDPB4ABQ.js";
4
+ } from "./chunk-GCWB2OVN.js";
5
5
 
6
6
  // src/lib/memory.ts
7
7
  import { nanoid } from "nanoid";
@@ -99,7 +99,7 @@ async function addMemory(content, opts) {
99
99
  }
100
100
  async function generateEmbeddingAsync(memoryId, content) {
101
101
  try {
102
- const { getEmbedding, storeEmbedding, ensureEmbeddingsSchema } = await import("./embeddings-GH4HB6X7.js");
102
+ const { getEmbedding, storeEmbedding, ensureEmbeddingsSchema } = await import("./embeddings-6N2NZPRX.js");
103
103
  await ensureEmbeddingsSchema();
104
104
  const embedding = await getEmbedding(content);
105
105
  await storeEmbedding(memoryId, embedding);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getDb
4
- } from "./chunk-BDPB4ABQ.js";
4
+ } from "./chunk-GCWB2OVN.js";
5
5
 
6
6
  // src/lib/embeddings.ts
7
7
  import { pipeline } from "@xenova/transformers";
@@ -10,8 +10,8 @@ import {
10
10
  isModelAvailable,
11
11
  semanticSearch,
12
12
  storeEmbedding
13
- } from "./chunk-4GNYCHD4.js";
14
- import "./chunk-BDPB4ABQ.js";
13
+ } from "./chunk-ZSP6BMAR.js";
14
+ import "./chunk-GCWB2OVN.js";
15
15
  export {
16
16
  bufferToEmbedding,
17
17
  cosineSimilarity,