@signetai/signet-memory-openclaw 0.167.0 → 0.169.0
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/dist/index.js +52 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10600,6 +10600,36 @@ function up106(db) {
|
|
|
10600
10600
|
}
|
|
10601
10601
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_review_after ON memories(review_after);");
|
|
10602
10602
|
}
|
|
10603
|
+
function hasColumn18(db, table, column) {
|
|
10604
|
+
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
10605
|
+
}
|
|
10606
|
+
var TOKEN_COLUMNS = [
|
|
10607
|
+
["tokens_input", "INTEGER"],
|
|
10608
|
+
["tokens_output", "INTEGER"],
|
|
10609
|
+
["tokens_cache_read", "INTEGER"],
|
|
10610
|
+
["tokens_cache_write", "INTEGER"],
|
|
10611
|
+
["tokens_cost", "REAL"]
|
|
10612
|
+
];
|
|
10613
|
+
function up107(db) {
|
|
10614
|
+
for (const [column, type] of TOKEN_COLUMNS) {
|
|
10615
|
+
if (!hasColumn18(db, "dreaming_passes", column)) {
|
|
10616
|
+
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
10617
|
+
}
|
|
10618
|
+
}
|
|
10619
|
+
}
|
|
10620
|
+
function up108(db) {
|
|
10621
|
+
db.exec(`
|
|
10622
|
+
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
10623
|
+
day TEXT NOT NULL,
|
|
10624
|
+
agent_id TEXT NOT NULL DEFAULT '',
|
|
10625
|
+
source_kind TEXT NOT NULL,
|
|
10626
|
+
provider TEXT NOT NULL,
|
|
10627
|
+
requests INTEGER NOT NULL DEFAULT 0,
|
|
10628
|
+
tokens INTEGER NOT NULL DEFAULT 0,
|
|
10629
|
+
PRIMARY KEY (day, agent_id, source_kind, provider)
|
|
10630
|
+
);
|
|
10631
|
+
`);
|
|
10632
|
+
}
|
|
10603
10633
|
var MIGRATIONS = [
|
|
10604
10634
|
{
|
|
10605
10635
|
version: 1,
|
|
@@ -11440,6 +11470,28 @@ var MIGRATIONS = [
|
|
|
11440
11470
|
artifacts: {
|
|
11441
11471
|
columns: [{ table: "memories", column: "review_after" }]
|
|
11442
11472
|
}
|
|
11473
|
+
},
|
|
11474
|
+
{
|
|
11475
|
+
version: 107,
|
|
11476
|
+
name: "dreaming-pass-usage",
|
|
11477
|
+
up: up107,
|
|
11478
|
+
artifacts: {
|
|
11479
|
+
columns: [
|
|
11480
|
+
{ table: "dreaming_passes", column: "tokens_input" },
|
|
11481
|
+
{ table: "dreaming_passes", column: "tokens_output" },
|
|
11482
|
+
{ table: "dreaming_passes", column: "tokens_cache_read" },
|
|
11483
|
+
{ table: "dreaming_passes", column: "tokens_cache_write" },
|
|
11484
|
+
{ table: "dreaming_passes", column: "tokens_cost" }
|
|
11485
|
+
]
|
|
11486
|
+
}
|
|
11487
|
+
},
|
|
11488
|
+
{
|
|
11489
|
+
version: 108,
|
|
11490
|
+
name: "embedding-usage",
|
|
11491
|
+
up: up108,
|
|
11492
|
+
artifacts: {
|
|
11493
|
+
tables: ["embedding_usage"]
|
|
11494
|
+
}
|
|
11443
11495
|
}
|
|
11444
11496
|
];
|
|
11445
11497
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|