@signetai/signet-memory-openclaw 0.150.5 → 0.152.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 +97 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10134,6 +10134,79 @@ function up87(db) {
|
|
|
10134
10134
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
10135
10135
|
`);
|
|
10136
10136
|
}
|
|
10137
|
+
function up88(db) {
|
|
10138
|
+
db.exec(`
|
|
10139
|
+
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
10140
|
+
agent_id TEXT NOT NULL,
|
|
10141
|
+
source_path TEXT NOT NULL,
|
|
10142
|
+
harness TEXT NOT NULL,
|
|
10143
|
+
size_bytes INTEGER NOT NULL,
|
|
10144
|
+
mtime_ms INTEGER NOT NULL,
|
|
10145
|
+
content_sha256 TEXT NOT NULL,
|
|
10146
|
+
session_id TEXT NOT NULL,
|
|
10147
|
+
last_scanned_at TEXT NOT NULL,
|
|
10148
|
+
PRIMARY KEY (agent_id, source_path)
|
|
10149
|
+
);
|
|
10150
|
+
|
|
10151
|
+
CREATE INDEX IF NOT EXISTS idx_transcript_capture_jobs_agent_session_id
|
|
10152
|
+
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
10153
|
+
`);
|
|
10154
|
+
}
|
|
10155
|
+
function up89(db) {
|
|
10156
|
+
db.exec(`
|
|
10157
|
+
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
10158
|
+
id TEXT PRIMARY KEY,
|
|
10159
|
+
source_table TEXT NOT NULL,
|
|
10160
|
+
source_id TEXT NOT NULL,
|
|
10161
|
+
status_before TEXT NOT NULL,
|
|
10162
|
+
payload_json TEXT NOT NULL,
|
|
10163
|
+
reason TEXT,
|
|
10164
|
+
actor TEXT NOT NULL,
|
|
10165
|
+
actor_type TEXT NOT NULL,
|
|
10166
|
+
request_id TEXT,
|
|
10167
|
+
created_at TEXT NOT NULL
|
|
10168
|
+
)
|
|
10169
|
+
`);
|
|
10170
|
+
if (!indexExists(db, "job_cancellations", "idx_job_cancellations_source")) {
|
|
10171
|
+
db.exec(`CREATE INDEX IF NOT EXISTS idx_job_cancellations_source
|
|
10172
|
+
ON job_cancellations(source_table, source_id)`);
|
|
10173
|
+
}
|
|
10174
|
+
if (!indexExists(db, "job_cancellations", "idx_job_cancellations_created_at")) {
|
|
10175
|
+
db.exec(`CREATE INDEX IF NOT EXISTS idx_job_cancellations_created_at
|
|
10176
|
+
ON job_cancellations(created_at)`);
|
|
10177
|
+
}
|
|
10178
|
+
}
|
|
10179
|
+
function indexExists(db, table, indexName) {
|
|
10180
|
+
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
10181
|
+
return rows.some((row) => row.name === indexName);
|
|
10182
|
+
}
|
|
10183
|
+
function up90(db) {
|
|
10184
|
+
db.exec(`
|
|
10185
|
+
CREATE TABLE IF NOT EXISTS job_archive (
|
|
10186
|
+
id TEXT PRIMARY KEY,
|
|
10187
|
+
source_table TEXT NOT NULL,
|
|
10188
|
+
source_id TEXT NOT NULL,
|
|
10189
|
+
status TEXT NOT NULL,
|
|
10190
|
+
payload_json TEXT NOT NULL,
|
|
10191
|
+
archived_at TEXT NOT NULL,
|
|
10192
|
+
archived_by TEXT NOT NULL,
|
|
10193
|
+
reason TEXT,
|
|
10194
|
+
created_at TEXT NOT NULL
|
|
10195
|
+
)
|
|
10196
|
+
`);
|
|
10197
|
+
if (!indexExists2(db, "job_archive", "idx_job_archive_source")) {
|
|
10198
|
+
db.exec(`CREATE INDEX IF NOT EXISTS idx_job_archive_source
|
|
10199
|
+
ON job_archive(source_table, source_id)`);
|
|
10200
|
+
}
|
|
10201
|
+
if (!indexExists2(db, "job_archive", "idx_job_archive_archived_at")) {
|
|
10202
|
+
db.exec(`CREATE INDEX IF NOT EXISTS idx_job_archive_archived_at
|
|
10203
|
+
ON job_archive(archived_at)`);
|
|
10204
|
+
}
|
|
10205
|
+
}
|
|
10206
|
+
function indexExists2(db, table, indexName) {
|
|
10207
|
+
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
10208
|
+
return rows.some((row) => row.name === indexName);
|
|
10209
|
+
}
|
|
10137
10210
|
var MIGRATIONS = [
|
|
10138
10211
|
{
|
|
10139
10212
|
version: 1,
|
|
@@ -10845,6 +10918,30 @@ var MIGRATIONS = [
|
|
|
10845
10918
|
artifacts: {
|
|
10846
10919
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
10847
10920
|
}
|
|
10921
|
+
},
|
|
10922
|
+
{
|
|
10923
|
+
version: 88,
|
|
10924
|
+
name: "transcript-recovery-files",
|
|
10925
|
+
up: up88,
|
|
10926
|
+
artifacts: {
|
|
10927
|
+
tables: ["transcript_recovery_files"]
|
|
10928
|
+
}
|
|
10929
|
+
},
|
|
10930
|
+
{
|
|
10931
|
+
version: 89,
|
|
10932
|
+
name: "job-cancellations",
|
|
10933
|
+
up: up89,
|
|
10934
|
+
artifacts: {
|
|
10935
|
+
tables: ["job_cancellations"]
|
|
10936
|
+
}
|
|
10937
|
+
},
|
|
10938
|
+
{
|
|
10939
|
+
version: 90,
|
|
10940
|
+
name: "job-archive",
|
|
10941
|
+
up: up90,
|
|
10942
|
+
artifacts: {
|
|
10943
|
+
tables: ["job_archive"]
|
|
10944
|
+
}
|
|
10848
10945
|
}
|
|
10849
10946
|
];
|
|
10850
10947
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|