agenr 3.0.0 → 3.2.0

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/cli.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  openClawTranscriptParser,
10
10
  parseTuiSessionKey,
11
11
  readOpenClawSessionsStore
12
- } from "./chunk-TBFAARM5.js";
12
+ } from "./chunk-ZAX3YSTU.js";
13
13
  import {
14
14
  applyClaimExtractionResultToEntry,
15
15
  backfillEpisodeEmbeddings,
@@ -33,7 +33,7 @@ import {
33
33
  tokenizeGroundingText,
34
34
  validateEntriesWithIndexes,
35
35
  validateSupersessionRules
36
- } from "./chunk-LAXNNWHM.js";
36
+ } from "./chunk-TMDNFBBC.js";
37
37
  import {
38
38
  DEFAULT_CLAIM_EXTRACTION_CONCURRENCY,
39
39
  DEFAULT_SURGEON_CONTEXT_LIMIT,
@@ -93,6 +93,7 @@ import {
93
93
  resolveEmbeddingModel,
94
94
  resolveLlmApiKey,
95
95
  resolveLlmCredentials,
96
+ resolveLocalFilesystemPath,
96
97
  resolveModel,
97
98
  retireEntry,
98
99
  supersedeEntry,
@@ -100,7 +101,7 @@ import {
100
101
  updateEntry,
101
102
  validateTemporalValidityRange,
102
103
  writeConfig
103
- } from "./chunk-ELR2HSVC.js";
104
+ } from "./chunk-FMQTRTWE.js";
104
105
  import {
105
106
  compactClaimKey,
106
107
  describeClaimKeyNormalizationFailure,
@@ -168,7 +169,6 @@ function formatLabel(label, value) {
168
169
  // src/cli/commands/db.ts
169
170
  import fs from "fs/promises";
170
171
  import path from "path";
171
- import { fileURLToPath } from "url";
172
172
  import * as clack from "@clack/prompts";
173
173
  function registerDbCommand(program2) {
174
174
  const dbCommand = program2.command("db").description("Database utilities");
@@ -199,25 +199,11 @@ function registerDbCommand(program2) {
199
199
  });
200
200
  }
201
201
  function resolveResetPath(dbPath) {
202
- if (dbPath === ":memory:") {
202
+ const trimmedPath = dbPath.trim();
203
+ if (trimmedPath === ":memory:") {
203
204
  return { displayPath: dbPath };
204
205
  }
205
- if (dbPath.startsWith("file:")) {
206
- try {
207
- const filePath = fileURLToPath(dbPath);
208
- return {
209
- deletePath: filePath,
210
- displayPath: filePath
211
- };
212
- } catch {
213
- const resolvedPath2 = path.resolve(dbPath.slice("file:".length));
214
- return {
215
- deletePath: resolvedPath2,
216
- displayPath: resolvedPath2
217
- };
218
- }
219
- }
220
- const resolvedPath = path.resolve(dbPath);
206
+ const resolvedPath = resolveLocalFilesystemPath(trimmedPath) ?? path.resolve(trimmedPath);
221
207
  return {
222
208
  deletePath: resolvedPath,
223
209
  displayPath: resolvedPath
@@ -5135,7 +5121,11 @@ import path11 from "path";
5135
5121
  var OPENCLAW_PLUGIN_PACKAGE = "@agenr/agenr-plugin";
5136
5122
  function execAsync(command, args, options) {
5137
5123
  return new Promise((resolve, reject) => {
5138
- execFile(command, args, options, (error, stdout, stderr) => {
5124
+ const execOptions = {
5125
+ ...options,
5126
+ ...shouldUseShellForCommand(command) ? { shell: true } : {}
5127
+ };
5128
+ execFile(command, args, execOptions, (error, stdout, stderr) => {
5139
5129
  if (error) {
5140
5130
  const message = [String(stderr ?? "").trim(), error.message].filter((value) => value.length > 0).join("\n");
5141
5131
  reject(new Error(message || error.message));
@@ -5148,11 +5138,18 @@ function execAsync(command, args, options) {
5148
5138
  });
5149
5139
  });
5150
5140
  }
5141
+ function shouldUseShellForCommand(command, platform = process.platform) {
5142
+ if (platform !== "win32") {
5143
+ return false;
5144
+ }
5145
+ const extension = path11.extname(command).toLowerCase();
5146
+ return extension === ".cmd" || extension === ".bat";
5147
+ }
5151
5148
  function findBinaryPath(name) {
5152
5149
  try {
5153
5150
  const lookupCommand = process.platform === "win32" ? "where" : "which";
5154
5151
  const output = execFileSync(lookupCommand, [name], { encoding: "utf8" }).trim();
5155
- const firstLine = output.split("\n")[0]?.trim();
5152
+ const firstLine = output.split(/\r?\n/u)[0]?.trim();
5156
5153
  return firstLine && firstLine.length > 0 ? firstLine : null;
5157
5154
  } catch {
5158
5155
  return null;
@@ -14212,10 +14209,10 @@ function readRequiredTrue(value, label, filePath) {
14212
14209
  // src/app/scenarios/claim-keys/validation/scenario-root.ts
14213
14210
  import { existsSync } from "fs";
14214
14211
  import path16 from "path";
14215
- import { fileURLToPath as fileURLToPath2 } from "url";
14212
+ import { fileURLToPath } from "url";
14216
14213
  var SCENARIO_ROOT_SEGMENTS = ["tests", "scenarios", "claim-keys"];
14217
14214
  function getDefaultClaimKeyScenarioRoot(options = {}) {
14218
- const moduleDirectory = path16.dirname(fileURLToPath2(options.moduleUrl ?? import.meta.url));
14215
+ const moduleDirectory = path16.dirname(fileURLToPath(options.moduleUrl ?? import.meta.url));
14219
14216
  const startDirectories = Array.from(/* @__PURE__ */ new Set([path16.resolve(options.cwd ?? process.cwd()), moduleDirectory]));
14220
14217
  for (const startDirectory of startDirectories) {
14221
14218
  const discovered = findScenarioRootFrom(startDirectory);
@@ -15653,7 +15650,7 @@ import { InvalidArgumentError as InvalidArgumentError6, Option as Option5 } from
15653
15650
  // src/app/surgeon/runtime.ts
15654
15651
  import { copyFile, mkdir as mkdir3 } from "fs/promises";
15655
15652
  import path21 from "path";
15656
- import { fileURLToPath as fileURLToPath3 } from "url";
15653
+ import { fileURLToPath as fileURLToPath2 } from "url";
15657
15654
  import { getModel as getModel2 } from "@earendil-works/pi-ai";
15658
15655
  var DEFAULT_SURGEON_PROVIDER = "openai";
15659
15656
  var DEFAULT_SURGEON_MODEL = "gpt-5.4-mini";
@@ -15918,7 +15915,7 @@ function resolveFilesystemPath(value) {
15918
15915
  return path21.resolve(value);
15919
15916
  }
15920
15917
  try {
15921
- return fileURLToPath3(value);
15918
+ return fileURLToPath2(value);
15922
15919
  } catch {
15923
15920
  return path21.resolve(value.slice("file:".length));
15924
15921
  }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-P5SB75FK.js";
2
+ import "./chunk-6HY5F5FE.js";
3
3
  import "./chunk-ZYADFKX3.js";
4
4
  import "./chunk-GELCEVFA.js";
5
- import "./chunk-575MUIW5.js";
6
- import "./chunk-ELR2HSVC.js";
5
+ import "./chunk-UEGURBBW.js";
6
+ import "./chunk-FMQTRTWE.js";
7
7
  import "./chunk-5LADPJ4C.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-P5SB75FK.js";
2
+ import "./chunk-6HY5F5FE.js";
3
3
  import "./chunk-ZYADFKX3.js";
4
4
  import "./chunk-GELCEVFA.js";
5
- import "./chunk-575MUIW5.js";
6
- import "./chunk-ELR2HSVC.js";
5
+ import "./chunk-UEGURBBW.js";
6
+ import "./chunk-FMQTRTWE.js";
7
7
  import "./chunk-5LADPJ4C.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agenr",
3
- "version": "3.0.0",
3
+ "version": "3.2.0",
4
4
  "description": "Agent memory - local-first knowledge infrastructure for AI agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,7 +26,6 @@
26
26
  "devDependencies": {
27
27
  "@eslint/js": "^10.0.1",
28
28
  "@types/node": "^25.5.0",
29
- "skeln": "file:../skeln",
30
29
  "typebox": "^1.1.38",
31
30
  "eslint": "^10.1.0",
32
31
  "eslint-plugin-jsdoc": "^62.8.1",
@@ -40,7 +39,7 @@
40
39
  "engines": {
41
40
  "node": ">=24"
42
41
  },
43
- "license": "AGPL-3.0",
42
+ "license": "MIT",
44
43
  "scripts": {
45
44
  "build": "pnpm run build:root && pnpm run build:plugin",
46
45
  "build:root": "tsup",
@@ -57,7 +56,11 @@
57
56
  "lint": "eslint .",
58
57
  "format": "prettier --write .",
59
58
  "format:check": "prettier --check .",
59
+ "smoke:packages": "node scripts/package-smoke.mjs",
60
60
  "test": "vitest run",
61
+ "test:win-sim": "node scripts/test-win-sim.mjs",
62
+ "test:docker": "node scripts/test-docker.mjs",
63
+ "test:docker:check": "node scripts/test-docker.mjs check",
61
64
  "test:watch": "vitest"
62
65
  }
63
66
  }