@alfe.ai/openclaw-database 0.0.25 → 0.0.27
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/plugin2.cjs +6 -6
- package/dist/plugin2.js +6 -6
- package/package.json +3 -3
package/dist/plugin2.cjs
CHANGED
|
@@ -471,11 +471,6 @@ const plugin = {
|
|
|
471
471
|
version: pkg.version,
|
|
472
472
|
activate(api) {
|
|
473
473
|
const log = api.logger;
|
|
474
|
-
if (g[ACTIVATED_KEY] === true) {
|
|
475
|
-
log.debug("Database plugin already activated — skipping duplicate");
|
|
476
|
-
return;
|
|
477
|
-
}
|
|
478
|
-
g[ACTIVATED_KEY] = true;
|
|
479
474
|
log.info("Database plugin activating...");
|
|
480
475
|
let client;
|
|
481
476
|
try {
|
|
@@ -485,7 +480,6 @@ const plugin = {
|
|
|
485
480
|
apiUrl: config.apiUrl
|
|
486
481
|
});
|
|
487
482
|
} catch (err) {
|
|
488
|
-
g[ACTIVATED_KEY] = false;
|
|
489
483
|
log.error(`Database plugin: failed to resolve config — ${err instanceof Error ? err.message : String(err)}`);
|
|
490
484
|
return;
|
|
491
485
|
}
|
|
@@ -493,6 +487,11 @@ const plugin = {
|
|
|
493
487
|
client.reportDatabaseAudit(entry);
|
|
494
488
|
}, () => ensureInitialized(client));
|
|
495
489
|
const startDatabaseService = () => {
|
|
490
|
+
if (g[ACTIVATED_KEY] === true) {
|
|
491
|
+
log.debug("Database plugin service already started — skipping duplicate");
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
g[ACTIVATED_KEY] = true;
|
|
496
495
|
ensureInitialized(client).then(({ databases }) => {
|
|
497
496
|
log.info(`Database plugin connected — ${String(databases.length)} databases available`);
|
|
498
497
|
}).catch((err) => {
|
|
@@ -500,6 +499,7 @@ const plugin = {
|
|
|
500
499
|
});
|
|
501
500
|
};
|
|
502
501
|
const stopDatabaseService = async () => {
|
|
502
|
+
g[ACTIVATED_KEY] = false;
|
|
503
503
|
if (mongoClient) {
|
|
504
504
|
await mongoClient.close();
|
|
505
505
|
mongoClient = null;
|
package/dist/plugin2.js
CHANGED
|
@@ -471,11 +471,6 @@ const plugin = {
|
|
|
471
471
|
version: pkg.version,
|
|
472
472
|
activate(api) {
|
|
473
473
|
const log = api.logger;
|
|
474
|
-
if (g[ACTIVATED_KEY] === true) {
|
|
475
|
-
log.debug("Database plugin already activated — skipping duplicate");
|
|
476
|
-
return;
|
|
477
|
-
}
|
|
478
|
-
g[ACTIVATED_KEY] = true;
|
|
479
474
|
log.info("Database plugin activating...");
|
|
480
475
|
let client;
|
|
481
476
|
try {
|
|
@@ -485,7 +480,6 @@ const plugin = {
|
|
|
485
480
|
apiUrl: config.apiUrl
|
|
486
481
|
});
|
|
487
482
|
} catch (err) {
|
|
488
|
-
g[ACTIVATED_KEY] = false;
|
|
489
483
|
log.error(`Database plugin: failed to resolve config — ${err instanceof Error ? err.message : String(err)}`);
|
|
490
484
|
return;
|
|
491
485
|
}
|
|
@@ -493,6 +487,11 @@ const plugin = {
|
|
|
493
487
|
client.reportDatabaseAudit(entry);
|
|
494
488
|
}, () => ensureInitialized(client));
|
|
495
489
|
const startDatabaseService = () => {
|
|
490
|
+
if (g[ACTIVATED_KEY] === true) {
|
|
491
|
+
log.debug("Database plugin service already started — skipping duplicate");
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
g[ACTIVATED_KEY] = true;
|
|
496
495
|
ensureInitialized(client).then(({ databases }) => {
|
|
497
496
|
log.info(`Database plugin connected — ${String(databases.length)} databases available`);
|
|
498
497
|
}).catch((err) => {
|
|
@@ -500,6 +499,7 @@ const plugin = {
|
|
|
500
499
|
});
|
|
501
500
|
};
|
|
502
501
|
const stopDatabaseService = async () => {
|
|
502
|
+
g[ACTIVATED_KEY] = false;
|
|
503
503
|
if (mongoClient) {
|
|
504
504
|
await mongoClient.close();
|
|
505
505
|
mongoClient = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/openclaw-database",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"description": "OpenClaw database plugin — MongoDB access for agents via MCP tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/plugin.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"mongodb": "^6.12.0",
|
|
31
|
-
"@alfe.ai/agent-api-client": "0.
|
|
32
|
-
"@alfe.ai/config": "0.0
|
|
31
|
+
"@alfe.ai/agent-api-client": "0.3.0",
|
|
32
|
+
"@alfe.ai/config": "0.1.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"openclaw": ">=2026.3.0"
|