@dudousxd/nestjs-agent-core 0.15.3 → 0.15.4

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/index.cjs CHANGED
@@ -1518,7 +1518,7 @@ async function offerMemories({ config, ctx, query }) {
1518
1518
  const scopes = await (config.scopes ?? defaultScopeResolver).resolve(ctx);
1519
1519
  const maxMemories = config.maxMemories ?? DEFAULT_MAX_MEMORIES;
1520
1520
  const trimmed = query?.trim() ?? "";
1521
- const search = trimmed.length > 0 ? config.provider.search : void 0;
1521
+ const search = trimmed.length > 0 ? config.provider.search?.bind(config.provider) : void 0;
1522
1522
  const records = search !== void 0 ? await search({
1523
1523
  scopes,
1524
1524
  query: trimmed,
@@ -1699,7 +1699,7 @@ function memoryForgetVerdict({ record, actor }) {
1699
1699
  }
1700
1700
  __name(memoryForgetVerdict, "memoryForgetVerdict");
1701
1701
  async function writeMemory({ config, digest, call, ctx, runId }) {
1702
- const write = config.provider.write;
1702
+ const write = config.provider.write?.bind(config.provider);
1703
1703
  if (write === void 0) {
1704
1704
  return {
1705
1705
  ok: false,