wolbarg 0.5.2 → 0.5.3
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/CHANGELOG.md +11 -0
- package/README.md +1 -1
- package/dist/index.cjs +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1426,7 +1426,7 @@ declare class Wolbarg<HasLlm extends boolean = false> {
|
|
|
1426
1426
|
declare function wolbarg$1(options: WolbargOptions): Wolbarg;
|
|
1427
1427
|
|
|
1428
1428
|
/** Published SDK semver — keep in sync with package.json `version`. */
|
|
1429
|
-
declare const SDK_VERSION = "0.5.
|
|
1429
|
+
declare const SDK_VERSION = "0.5.3";
|
|
1430
1430
|
|
|
1431
1431
|
/**
|
|
1432
1432
|
* Operation-scoped errors with reason + suggestion for developer experience.
|
package/dist/index.d.ts
CHANGED
|
@@ -1426,7 +1426,7 @@ declare class Wolbarg<HasLlm extends boolean = false> {
|
|
|
1426
1426
|
declare function wolbarg$1(options: WolbargOptions): Wolbarg;
|
|
1427
1427
|
|
|
1428
1428
|
/** Published SDK semver — keep in sync with package.json `version`. */
|
|
1429
|
-
declare const SDK_VERSION = "0.5.
|
|
1429
|
+
declare const SDK_VERSION = "0.5.3";
|
|
1430
1430
|
|
|
1431
1431
|
/**
|
|
1432
1432
|
* Operation-scoped errors with reason + suggestion for developer experience.
|
package/dist/index.js
CHANGED
|
@@ -1607,7 +1607,7 @@ var SQL = {
|
|
|
1607
1607
|
AND k = ?
|
|
1608
1608
|
`,
|
|
1609
1609
|
insertEmbeddingBlob: `
|
|
1610
|
-
INSERT INTO memory_embeddings_blob (memory_rowid, embedding) VALUES (?, ?)
|
|
1610
|
+
INSERT OR REPLACE INTO memory_embeddings_blob (memory_rowid, embedding) VALUES (?, ?)
|
|
1611
1611
|
`,
|
|
1612
1612
|
deleteEmbeddingBlob: `
|
|
1613
1613
|
DELETE FROM memory_embeddings_blob WHERE memory_rowid = ?
|
|
@@ -2563,6 +2563,13 @@ var SqliteStorageProvider = class _SqliteStorageProvider {
|
|
|
2563
2563
|
this.deleteEmbeddingsForScope(organization);
|
|
2564
2564
|
this.deleteFtsForScope(organization);
|
|
2565
2565
|
const result = stmts.deleteMemoriesByOrg.run(organization);
|
|
2566
|
+
try {
|
|
2567
|
+
this.requireDb().exec(`
|
|
2568
|
+
DELETE FROM memory_embeddings_blob
|
|
2569
|
+
WHERE memory_rowid NOT IN (SELECT rowid FROM memories)
|
|
2570
|
+
`);
|
|
2571
|
+
} catch {
|
|
2572
|
+
}
|
|
2566
2573
|
return Number(result.changes);
|
|
2567
2574
|
});
|
|
2568
2575
|
}
|
|
@@ -3077,7 +3084,7 @@ var SqliteStorageProvider = class _SqliteStorageProvider {
|
|
|
3077
3084
|
if (!stmt) {
|
|
3078
3085
|
const values = Array.from({ length: n }, () => "(?, ?)").join(", ");
|
|
3079
3086
|
stmt = this.requireDb().prepare(
|
|
3080
|
-
`INSERT INTO memory_embeddings_blob (memory_rowid, embedding) VALUES ${values}`
|
|
3087
|
+
`INSERT OR REPLACE INTO memory_embeddings_blob (memory_rowid, embedding) VALUES ${values}`
|
|
3081
3088
|
);
|
|
3082
3089
|
this.batchBlobEmbStatements.set(n, stmt);
|
|
3083
3090
|
}
|
|
@@ -5144,7 +5151,7 @@ function createDatabaseProvider(config) {
|
|
|
5144
5151
|
}
|
|
5145
5152
|
|
|
5146
5153
|
// src/version.ts
|
|
5147
|
-
var SDK_VERSION = "0.5.
|
|
5154
|
+
var SDK_VERSION = "0.5.3";
|
|
5148
5155
|
|
|
5149
5156
|
// src/memory/transfer.ts
|
|
5150
5157
|
var SqliteMemoryTransferProvider = class {
|