// @bun
var __defProp = Object.defineProperty;
var __returnValue = (v) => v;
function __exportSetter(name, newValue) {
  this[name] = __returnValue.bind(null, newValue);
}
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, {
      get: all[name],
      enumerable: true,
      configurable: true,
      set: __exportSetter.bind(all, name)
    });
};
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
var __require = import.meta.require;

// src/tools/agent-memory-store.ts
function validateMemoryPath(path) {
  const normalized = path.replace(/\\/g, "/").replace(/\/+/g, "/");
  if (!normalized.startsWith("/memories") || normalized.includes("..") || normalized === "/memories/.." || normalized.startsWith("/memories/../")) {
    throw new Error(`Invalid memory path: ${path}. Path must be under /memories and cannot contain traversal sequences.`);
  }
}
export {
  validateMemoryPath
};
