agenr 2.0.0 → 2.0.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/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [2.0.1] - 2026-04-13
6
+
7
+ OpenClaw startup-failure handling patch release.
8
+
9
+ ### Fixed
10
+
11
+ - **OpenClaw plugin startup no longer crashes on agenr service initialization failures.** Startup-time database schema mismatches and similar initialization errors are now logged and surfaced as stable runtime/status failures instead of escaping as an unhandled promise rejection.
12
+
13
+ ### Validation
14
+
15
+ Changes since last push to `origin/master`:
16
+
17
+ - Handle OpenClaw startup schema mismatch failures gracefully
18
+
5
19
  ## [2.0.0] - 2026-04-13
6
20
 
7
21
  Procedural memory foundation, sync and recall pipelines, and unified routing major release.
@@ -1175,7 +1175,7 @@ function registerAgenrOpenClawTools(api, servicesPromise, logger) {
1175
1175
  var openclaw_plugin_default = {
1176
1176
  id: "agenr",
1177
1177
  name: "agenr",
1178
- version: "2.0.0",
1178
+ version: "2.0.1",
1179
1179
  description: "agenr memory plugin for OpenClaw",
1180
1180
  kind: "memory",
1181
1181
  contracts: {
@@ -3236,59 +3236,69 @@ function buildAgenrMemoryFlushPlan(_params, logger) {
3236
3236
  function createAgenrMemoryRuntime(servicesPromise) {
3237
3237
  return {
3238
3238
  async getMemorySearchManager() {
3239
- const services = await servicesPromise;
3240
- const snapshot = await services.memory.getMemoryStatusSnapshot();
3241
- const vectorAvailable = await services.memory.probeVectorAvailability();
3242
- const status = {
3243
- backend: "builtin",
3244
- provider: "agenr",
3245
- model: services.embeddingStatus.model,
3246
- dbPath: services.dbPath,
3247
- files: snapshot.sourceFiles,
3248
- chunks: snapshot.activeEntries,
3249
- vector: {
3250
- enabled: true,
3251
- available: vectorAvailable,
3252
- dims: EMBEDDING_DIMENSIONS
3253
- },
3254
- custom: {
3255
- activeEntries: snapshot.activeEntries,
3256
- coreEntries: snapshot.coreEntries,
3257
- sourceFiles: snapshot.sourceFiles
3258
- }
3259
- };
3260
- return {
3261
- manager: {
3262
- async search() {
3263
- return [];
3264
- },
3265
- async readFile({ relPath }) {
3266
- throw new Error(`[agenr] memory file reads are not supported for "${relPath}"`);
3267
- },
3268
- status() {
3269
- return status;
3270
- },
3271
- async probeEmbeddingAvailability() {
3272
- return {
3273
- ok: services.embeddingStatus.available,
3274
- ...services.embeddingStatus.error ? { error: services.embeddingStatus.error } : {}
3275
- };
3276
- },
3277
- async probeVectorAvailability() {
3278
- return vectorAvailable;
3239
+ try {
3240
+ const services = await servicesPromise;
3241
+ const snapshot = await services.memory.getMemoryStatusSnapshot();
3242
+ const vectorAvailable = await services.memory.probeVectorAvailability();
3243
+ const status = {
3244
+ backend: "builtin",
3245
+ provider: "agenr",
3246
+ model: services.embeddingStatus.model,
3247
+ dbPath: services.dbPath,
3248
+ files: snapshot.sourceFiles,
3249
+ chunks: snapshot.activeEntries,
3250
+ vector: {
3251
+ enabled: true,
3252
+ available: vectorAvailable,
3253
+ dims: EMBEDDING_DIMENSIONS
3279
3254
  },
3280
- async sync() {
3281
- return;
3255
+ custom: {
3256
+ activeEntries: snapshot.activeEntries,
3257
+ coreEntries: snapshot.coreEntries,
3258
+ sourceFiles: snapshot.sourceFiles
3282
3259
  }
3283
- }
3284
- };
3260
+ };
3261
+ return {
3262
+ manager: {
3263
+ async search() {
3264
+ return [];
3265
+ },
3266
+ async readFile({ relPath }) {
3267
+ throw new Error(`[agenr] memory file reads are not supported for "${relPath}"`);
3268
+ },
3269
+ status() {
3270
+ return status;
3271
+ },
3272
+ async probeEmbeddingAvailability() {
3273
+ return {
3274
+ ok: services.embeddingStatus.available,
3275
+ ...services.embeddingStatus.error ? { error: services.embeddingStatus.error } : {}
3276
+ };
3277
+ },
3278
+ async probeVectorAvailability() {
3279
+ return vectorAvailable;
3280
+ },
3281
+ async sync() {
3282
+ return;
3283
+ }
3284
+ }
3285
+ };
3286
+ } catch (error) {
3287
+ return {
3288
+ manager: null,
3289
+ error: `[agenr] memory runtime unavailable: ${formatErrorMessage2(error)}`
3290
+ };
3291
+ }
3285
3292
  },
3286
3293
  resolveMemoryBackendConfig() {
3287
3294
  return { backend: "builtin" };
3288
3295
  },
3289
3296
  async closeAllMemorySearchManagers() {
3290
- const services = await servicesPromise;
3291
- await services.close();
3297
+ try {
3298
+ const services = await servicesPromise;
3299
+ await services.close();
3300
+ } catch {
3301
+ }
3292
3302
  }
3293
3303
  };
3294
3304
  }
@@ -3453,6 +3463,9 @@ var openclaw_default = definePluginEntry({
3453
3463
  },
3454
3464
  resolvePath: api.resolvePath
3455
3465
  });
3466
+ void servicesPromise.catch((error) => {
3467
+ api.logger.error(`[agenr] startup failed: ${formatErrorMessage2(error)}`);
3468
+ });
3456
3469
  api.registerMemoryCapability({
3457
3470
  promptBuilder: buildAgenrMemoryPromptSection,
3458
3471
  flushPlanResolver: (params) => buildAgenrMemoryFlushPlan(params, api.logger),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agenr",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Agent memory - local-first knowledge infrastructure for AI agents",
5
5
  "type": "module",
6
6
  "bin": {