Skip to content

[upstream PR 319] f<!-- -->ix(fs-watcher): load agentmemory env file #738

@wbugitlab1

Description

@wbugitlab1

Source: Source pull request number: 319 in rohitg00/agentmemory (URL omitted to avoid GitHub cross-reference)
Title: fix(fs-watcher): load agentmemory env file
Author: Zavianx
State: open
Draft: no
Merged: no
Head: Zavianx/agentmemory:fix/fs-watcher-env-file @ 1a1f409
Base: main @ 1c8713f
Labels: (none)
Changed files: 0
Commits: 0
Created: 2026-05-13T03:08:11Z
Updated: 2026-05-17T09:42:42Z
Closed: (not closed)
Merged at: (not merged)

Original PR body:

Summary

  • load ~/.agentmemory/.env and $XDG_CONFIG_HOME/agentmemory/.env in @agentmemory/fs-watcher
  • keep explicit process environment values higher priority than file values
  • document the fallback and add tests for file loading and env override behavior

This addresses the filesystem watcher part of #298, where a watcher running under a process manager/container could fall back to localhost even though the shared server URL lives in agentmemory's documented env file.

Conflict check

  • Current open PRs do not touch integrations/filesystem-watcher/* or test/fs-watcher.test.ts.

Tests

  • npm test -- test/fs-watcher.test.ts
  • node --check integrations/filesystem-watcher/watcher.mjs
  • git diff --check
  • npm run build
  • npm test

Summary by CodeRabbit

  • Documentation

    • Clarified how configuration is loaded from .env files for the filesystem watcher.
  • New Features

    • Filesystem watcher can load configuration from .env files in user config locations, with explicit process environment variables taking precedence.
  • Tests

    • Added tests covering .env parsing, quoting/comments handling, XDG_HOME support, and environment-variable precedence.

Review Change Stack

Local branch:
Fork PR:
Fork decision:
Verification:
Notes:

Metadata

Metadata

Assignees

No one assigned

    Labels

    decision-candidateFork decision has not been madeupstream-openUpstream pull request is openupstream-prTracks an upstream pull request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions