@alfe.ai/openclaw-database 0.0.10 → 0.0.11

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 CHANGED
@@ -1,5 +1,6 @@
1
1
  let mongodb = require("mongodb");
2
2
  let _alfe_ai_config = require("@alfe.ai/config");
3
+ let node_module = require("node:module");
3
4
  //#region src/tools.ts
4
5
  const DEFAULT_DB = "org_default";
5
6
  function str(required = true) {
@@ -428,6 +429,7 @@ function registerTools(api, _client, _databases, audit, lazyInit) {
428
429
  }
429
430
  //#endregion
430
431
  //#region src/plugin.ts
432
+ const pkg = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href)("../package.json");
431
433
  let mongoClient = null;
432
434
  let initPromise = null;
433
435
  async function fetchCredentials(apiUrl, apiKey) {
@@ -485,7 +487,7 @@ function reportAudit(apiUrl, apiKey, entry) {
485
487
  const plugin = {
486
488
  id: "@alfe.ai/openclaw-database",
487
489
  name: "Alfe Database",
488
- version: "0.0.1",
490
+ version: pkg.version,
489
491
  activate(api) {
490
492
  const log = api.logger;
491
493
  log.info("Database plugin activating...");
package/dist/plugin2.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { createRequire } from "node:module";
1
2
  import { MongoClient } from "mongodb";
2
3
  import { resolveConfig } from "@alfe.ai/config";
3
4
  //#region src/tools.ts
@@ -428,6 +429,7 @@ function registerTools(api, _client, _databases, audit, lazyInit) {
428
429
  }
429
430
  //#endregion
430
431
  //#region src/plugin.ts
432
+ const pkg = createRequire(import.meta.url)("../package.json");
431
433
  let mongoClient = null;
432
434
  let initPromise = null;
433
435
  async function fetchCredentials(apiUrl, apiKey) {
@@ -485,7 +487,7 @@ function reportAudit(apiUrl, apiKey, entry) {
485
487
  const plugin = {
486
488
  id: "@alfe.ai/openclaw-database",
487
489
  name: "Alfe Database",
488
- version: "0.0.1",
490
+ version: pkg.version,
489
491
  activate(api) {
490
492
  const log = api.logger;
491
493
  log.info("Database plugin activating...");
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "id": "@alfe.ai/openclaw-database",
3
3
  "name": "Alfe Database",
4
- "version": "0.0.1",
5
4
  "description": "MongoDB database access for agents — query, insert, update, delete, and manage collections",
6
5
  "entry": "./dist/plugin.js",
7
6
  "configSchema": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/openclaw-database",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "OpenClaw database plugin — MongoDB access for agents via MCP tools",
5
5
  "type": "module",
6
6
  "main": "./dist/plugin.js",