capacitor-mobile-claw 1.9.5 → 1.9.7
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.
|
@@ -66,7 +66,7 @@ export class CronDbAccess {
|
|
|
66
66
|
await this.ensureReady();
|
|
67
67
|
await this._run(`INSERT OR IGNORE INTO heartbeat_config
|
|
68
68
|
(id, enabled, every_ms, updated_at)
|
|
69
|
-
VALUES (1,
|
|
69
|
+
VALUES (1, 1, 1800000, ?)`, [Date.now()]);
|
|
70
70
|
const row = await this._queryOne('SELECT * FROM heartbeat_config WHERE id = 1');
|
|
71
71
|
return {
|
|
72
72
|
enabled: _toBool(row?.enabled),
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* SessionStore — Direct SQLite session persistence from the WebView.
|
|
3
3
|
*
|
|
4
4
|
* Uses @capacitor-community/sqlite for all session save/load operations.
|
|
5
|
+
* Connection resilience: force-close on init, automatic retry on stale
|
|
6
|
+
* connection errors (matches the pattern in orchestrator-backend db.js).
|
|
5
7
|
*/
|
|
6
8
|
export declare class SessionStore {
|
|
7
9
|
private sqlite;
|
|
@@ -12,6 +14,9 @@ export declare class SessionStore {
|
|
|
12
14
|
*/
|
|
13
15
|
ensureReady(): Promise<void>;
|
|
14
16
|
private _init;
|
|
17
|
+
private _isStaleConnectionError;
|
|
18
|
+
reconnect(): Promise<void>;
|
|
19
|
+
private _withRetry;
|
|
15
20
|
saveSession(params: {
|
|
16
21
|
sessionKey: string;
|
|
17
22
|
agentId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-store.d.ts","sourceRoot":"","sources":["../../../src/agent/session-store.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"session-store.d.ts","sourceRoot":"","sources":["../../../src/agent/session-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAgC;IAC9C,OAAO,CAAC,EAAE,CAAY;IACtB,OAAO,CAAC,WAAW,CAA6B;IAEhD;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;YAUpB,KAAK;IAqEnB,OAAO,CAAC,uBAAuB;IAKzB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;YAOlB,UAAU;IAelB,WAAW,CAAC,MAAM,EAAE;QACxB,UAAU,EAAE,MAAM,CAAA;QAClB,OAAO,EAAE,MAAM,CAAA;QACf,QAAQ,EAAE,GAAG,EAAE,CAAA;QACf,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,SAAS,EAAE,MAAM,CAAA;KAClB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoEX,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAiBhD,YAAY,CAAC,OAAO,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAiB9C,gBAAgB,CAAC,OAAO,SAAS,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC;CAkB9D"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* SessionStore — Direct SQLite session persistence from the WebView.
|
|
3
3
|
*
|
|
4
4
|
* Uses @capacitor-community/sqlite for all session save/load operations.
|
|
5
|
+
* Connection resilience: force-close on init, automatic retry on stale
|
|
6
|
+
* connection errors (matches the pattern in orchestrator-backend db.js).
|
|
5
7
|
*/
|
|
6
8
|
import { Capacitor } from '@capacitor/core';
|
|
7
9
|
import { CapacitorSQLite, SQLiteConnection } from '@capacitor-community/sqlite';
|
|
@@ -34,17 +36,24 @@ export class SessionStore {
|
|
|
34
36
|
await customElements.whenDefined('jeep-sqlite');
|
|
35
37
|
await this.sqlite.initWebStore();
|
|
36
38
|
}
|
|
39
|
+
// Check connections consistency (cleans up stale connections from prior sessions).
|
|
40
|
+
// After consistency check, always close any existing connection before creating a
|
|
41
|
+
// fresh one — checkConnectionsConsistency() can invalidate the native handle while
|
|
42
|
+
// the JS wrapper still reports isConnection=true, leading to
|
|
43
|
+
// "No available connection for database mobile-claw" errors.
|
|
37
44
|
await this.sqlite.checkConnectionsConsistency();
|
|
38
45
|
const isConn = await this.sqlite.isConnection(DB_NAME, false);
|
|
39
46
|
if (isConn.result) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
try {
|
|
48
|
+
await this.sqlite.closeConnection(DB_NAME, false);
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
/* already closed */
|
|
52
|
+
}
|
|
45
53
|
}
|
|
54
|
+
this.db = await this.sqlite.createConnection(DB_NAME, false, 'no-encryption', 2, false);
|
|
46
55
|
await this.db.open();
|
|
47
|
-
// Ensure schema exists
|
|
56
|
+
// Ensure schema exists
|
|
48
57
|
await this.db.execute(`
|
|
49
58
|
CREATE TABLE IF NOT EXISTS sessions (
|
|
50
59
|
session_key TEXT PRIMARY KEY,
|
|
@@ -75,102 +84,130 @@ export class SessionStore {
|
|
|
75
84
|
CREATE INDEX IF NOT EXISTS idx_messages_session ON messages(session_key);
|
|
76
85
|
`, false);
|
|
77
86
|
}
|
|
78
|
-
// ──
|
|
79
|
-
|
|
87
|
+
// ── Connection resilience ─────────────────────────────────────────────────
|
|
88
|
+
_isStaleConnectionError(err) {
|
|
89
|
+
const msg = String(err?.message || err || '');
|
|
90
|
+
return msg.includes('No available connection') || msg.includes('database is closed');
|
|
91
|
+
}
|
|
92
|
+
async reconnect() {
|
|
93
|
+
console.warn('[SessionStore] Reconnecting...');
|
|
94
|
+
this.db = null;
|
|
95
|
+
this.initPromise = null;
|
|
80
96
|
await this.ensureReady();
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (msg.role === 'assistant' && msg.usage) {
|
|
87
|
-
inputTokens += msg.usage.input || 0;
|
|
88
|
-
outputTokens += msg.usage.output || 0;
|
|
89
|
-
}
|
|
97
|
+
}
|
|
98
|
+
async _withRetry(fn) {
|
|
99
|
+
await this.ensureReady();
|
|
100
|
+
try {
|
|
101
|
+
return await fn();
|
|
90
102
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
model = excluded.model,
|
|
98
|
-
total_tokens = excluded.total_tokens,
|
|
99
|
-
input_tokens = excluded.input_tokens,
|
|
100
|
-
output_tokens = excluded.output_tokens`, [
|
|
101
|
-
params.sessionKey,
|
|
102
|
-
params.agentId,
|
|
103
|
-
params.startTime,
|
|
104
|
-
now,
|
|
105
|
-
params.model || null,
|
|
106
|
-
totalTokens,
|
|
107
|
-
inputTokens,
|
|
108
|
-
outputTokens,
|
|
109
|
-
], true);
|
|
110
|
-
// Insert messages (skip already-persisted ones)
|
|
111
|
-
const existingResult = await this.db.query('SELECT COUNT(*) as cnt FROM messages WHERE session_key = ?', [
|
|
112
|
-
params.sessionKey,
|
|
113
|
-
]);
|
|
114
|
-
const existingCount = existingResult.values?.[0]?.cnt || 0;
|
|
115
|
-
const newMessages = params.messages.slice(existingCount);
|
|
116
|
-
if (newMessages.length > 0) {
|
|
117
|
-
const stmts = newMessages.map((msg, i) => ({
|
|
118
|
-
statement: `INSERT OR IGNORE INTO messages (session_key, sequence, role, content, timestamp, model, tool_call_id, usage_input, usage_output)
|
|
119
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
120
|
-
values: [
|
|
121
|
-
params.sessionKey,
|
|
122
|
-
existingCount + i,
|
|
123
|
-
msg.role,
|
|
124
|
-
typeof msg.content === 'string' ? msg.content : JSON.stringify(msg.content),
|
|
125
|
-
msg.timestamp || now,
|
|
126
|
-
msg.model || params.model || null,
|
|
127
|
-
msg.toolCallId || null,
|
|
128
|
-
msg.usage?.input || null,
|
|
129
|
-
msg.usage?.output || null,
|
|
130
|
-
],
|
|
131
|
-
}));
|
|
132
|
-
await this.db.executeSet(stmts, true);
|
|
103
|
+
catch (err) {
|
|
104
|
+
if (this._isStaleConnectionError(err)) {
|
|
105
|
+
await this.reconnect();
|
|
106
|
+
return await fn();
|
|
107
|
+
}
|
|
108
|
+
throw err;
|
|
133
109
|
}
|
|
134
110
|
}
|
|
111
|
+
// ── Save ─────────────────────────────────────────────────────────────────
|
|
112
|
+
async saveSession(params) {
|
|
113
|
+
return this._withRetry(async () => {
|
|
114
|
+
const now = Date.now();
|
|
115
|
+
// Compute usage totals
|
|
116
|
+
let inputTokens = 0;
|
|
117
|
+
let outputTokens = 0;
|
|
118
|
+
for (const msg of params.messages) {
|
|
119
|
+
if (msg.role === 'assistant' && msg.usage) {
|
|
120
|
+
inputTokens += msg.usage.input || 0;
|
|
121
|
+
outputTokens += msg.usage.output || 0;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const totalTokens = inputTokens + outputTokens;
|
|
125
|
+
// Upsert session row
|
|
126
|
+
await this.db.run(`INSERT INTO sessions (session_key, agent_id, created_at, updated_at, model, total_tokens, input_tokens, output_tokens)
|
|
127
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
128
|
+
ON CONFLICT(session_key) DO UPDATE SET
|
|
129
|
+
updated_at = excluded.updated_at,
|
|
130
|
+
model = excluded.model,
|
|
131
|
+
total_tokens = excluded.total_tokens,
|
|
132
|
+
input_tokens = excluded.input_tokens,
|
|
133
|
+
output_tokens = excluded.output_tokens`, [
|
|
134
|
+
params.sessionKey,
|
|
135
|
+
params.agentId,
|
|
136
|
+
params.startTime,
|
|
137
|
+
now,
|
|
138
|
+
params.model || null,
|
|
139
|
+
totalTokens,
|
|
140
|
+
inputTokens,
|
|
141
|
+
outputTokens,
|
|
142
|
+
], true);
|
|
143
|
+
// Insert messages (skip already-persisted ones)
|
|
144
|
+
const existingResult = await this.db.query('SELECT COUNT(*) as cnt FROM messages WHERE session_key = ?', [
|
|
145
|
+
params.sessionKey,
|
|
146
|
+
]);
|
|
147
|
+
const existingCount = existingResult.values?.[0]?.cnt || 0;
|
|
148
|
+
const newMessages = params.messages.slice(existingCount);
|
|
149
|
+
if (newMessages.length > 0) {
|
|
150
|
+
const stmts = newMessages.map((msg, i) => ({
|
|
151
|
+
statement: `INSERT OR IGNORE INTO messages (session_key, sequence, role, content, timestamp, model, tool_call_id, usage_input, usage_output)
|
|
152
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
153
|
+
values: [
|
|
154
|
+
params.sessionKey,
|
|
155
|
+
existingCount + i,
|
|
156
|
+
msg.role,
|
|
157
|
+
typeof msg.content === 'string' ? msg.content : JSON.stringify(msg.content),
|
|
158
|
+
msg.timestamp || now,
|
|
159
|
+
msg.model || params.model || null,
|
|
160
|
+
msg.toolCallId || null,
|
|
161
|
+
msg.usage?.input || null,
|
|
162
|
+
msg.usage?.output || null,
|
|
163
|
+
],
|
|
164
|
+
}));
|
|
165
|
+
await this.db.executeSet(stmts, true);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
135
169
|
// ── Load ─────────────────────────────────────────────────────────────────
|
|
136
170
|
async loadMessages(sessionKey) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
171
|
+
return this._withRetry(async () => {
|
|
172
|
+
const result = await this.db.query('SELECT role, content, timestamp, model, tool_call_id, usage_input, usage_output FROM messages WHERE session_key = ? ORDER BY sequence', [sessionKey]);
|
|
173
|
+
return (result.values || []).map((r) => ({
|
|
174
|
+
role: r.role,
|
|
175
|
+
content: _parseJsonSafe(r.content),
|
|
176
|
+
timestamp: r.timestamp,
|
|
177
|
+
model: r.model,
|
|
178
|
+
toolCallId: r.tool_call_id,
|
|
179
|
+
usage: r.usage_input || r.usage_output ? { input: r.usage_input, output: r.usage_output } : undefined,
|
|
180
|
+
}));
|
|
181
|
+
});
|
|
147
182
|
}
|
|
148
183
|
async listSessions(agentId = 'main') {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
184
|
+
return this._withRetry(async () => {
|
|
185
|
+
const result = await this.db.query('SELECT session_key, created_at, updated_at, model, total_tokens FROM sessions WHERE agent_id = ? ORDER BY updated_at DESC', [agentId]);
|
|
186
|
+
return (result.values || []).map((r) => ({
|
|
187
|
+
sessionKey: r.session_key,
|
|
188
|
+
sessionId: r.session_key,
|
|
189
|
+
createdAt: r.created_at,
|
|
190
|
+
updatedAt: r.updated_at,
|
|
191
|
+
model: r.model,
|
|
192
|
+
totalTokens: r.total_tokens,
|
|
193
|
+
}));
|
|
194
|
+
});
|
|
159
195
|
}
|
|
160
196
|
async getLatestSession(agentId = 'main') {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
197
|
+
return this._withRetry(async () => {
|
|
198
|
+
const result = await this.db.query('SELECT session_key, created_at, updated_at, model, total_tokens FROM sessions WHERE agent_id = ? ORDER BY updated_at DESC LIMIT 1', [agentId]);
|
|
199
|
+
const row = result.values?.[0];
|
|
200
|
+
if (!row)
|
|
201
|
+
return null;
|
|
202
|
+
return {
|
|
203
|
+
sessionKey: row.session_key,
|
|
204
|
+
sessionId: row.session_key,
|
|
205
|
+
createdAt: row.created_at,
|
|
206
|
+
updatedAt: row.updated_at,
|
|
207
|
+
model: row.model,
|
|
208
|
+
totalTokens: row.total_tokens,
|
|
209
|
+
};
|
|
210
|
+
});
|
|
174
211
|
}
|
|
175
212
|
}
|
|
176
213
|
function _parseJsonSafe(s) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-store.js","sourceRoot":"","sources":["../../../src/agent/session-store.ts"],"names":[],"mappings":"AAAA
|
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AgB,CAAC,OAAO,GAAG,MAAM;QACrC,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,IAAI,EAAE;YAChC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,CAChC,mIAAmI,EACnI,CAAC,OAAO,CAAC,CACV,CAAA;YACD,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAA;YAC9B,IAAI,CAAC,GAAG;gBAAE,OAAO,IAAI,CAAA;YACrB,OAAO;gBACL,UAAU,EAAE,GAAG,CAAC,WAAW;gBAC3B,SAAS,EAAE,GAAG,CAAC,WAAW;gBAC1B,SAAS,EAAE,GAAG,CAAC,UAAU;gBACzB,SAAS,EAAE,GAAG,CAAC,UAAU;gBACzB,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,WAAW,EAAE,GAAG,CAAC,YAAY;aAC9B,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AAED,SAAS,cAAc,CAAC,CAAS;IAC/B,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,CAAC,CAAA;IACnC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACtB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,CAAA;IACV,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "capacitor-mobile-claw",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.7",
|
|
4
4
|
"description": "On-device AI agent engine for Capacitor apps — native WebView LLM agent with file tools, code execution, git, and extensible MCP server",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/esm/index.d.ts",
|