@emqo/claudebridge 0.9.0 → 0.9.1
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/core/store.js +2 -2
- package/package.json +1 -1
package/dist/core/store.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Database from "better-sqlite3";
|
|
2
2
|
import { mkdirSync } from "fs";
|
|
3
3
|
import { dirname, resolve } from "path";
|
|
4
|
+
import { randomUUID } from "crypto";
|
|
4
5
|
import { log as rootLog } from "./logger.js";
|
|
5
6
|
const log = rootLog.child("store");
|
|
6
7
|
const DEFAULT_DB_PATH = "./data/claudebridge.db";
|
|
@@ -115,9 +116,8 @@ export class Store {
|
|
|
115
116
|
const subCount = this.db.prepare("SELECT COUNT(*) as c FROM sub_sessions").get().c;
|
|
116
117
|
if (legacyCount > 0 && subCount === 0) {
|
|
117
118
|
const rows = this.db.prepare("SELECT user_id, session_id, platform, updated_at FROM sessions").all();
|
|
118
|
-
const crypto = require("crypto");
|
|
119
119
|
for (const row of rows) {
|
|
120
|
-
const id =
|
|
120
|
+
const id = randomUUID();
|
|
121
121
|
this.db.prepare("INSERT INTO sub_sessions (id, user_id, platform, chat_id, claude_session_id, label, status, created_at, last_active_at, message_count, total_cost) VALUES (?, ?, ?, '', ?, 'main', 'active', ?, ?, 1, 0)").run(id, row.user_id, row.platform, row.session_id, row.updated_at, row.updated_at);
|
|
122
122
|
}
|
|
123
123
|
log.info("migrated legacy sessions to sub_sessions", { count: rows.length });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emqo/claudebridge",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Bridge claude CLI to chat platforms (Telegram, Discord) with scheduled auto-tasks, autonomous project management, HITL approval, conditional branching, webhook triggers, parallel execution, and observability",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|