chore: import upstream snapshot with attribution
CI / test (20, macos-latest) (push) Has been cancelled
CI / test (20, ubuntu-latest) (push) Has been cancelled
CI / test (22, macos-latest) (push) Has been cancelled
CI / test (22, ubuntu-latest) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:01:18 +08:00
commit 979fb22d7c
613 changed files with 113494 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env node
import { FilesystemWatcher, configFromEnv } from "./watcher.mjs";
const cliArgs = process.argv.slice(2);
const envCfg = configFromEnv(process.env);
const roots = cliArgs.length > 0 ? cliArgs : envCfg.roots;
if (!roots || roots.length === 0) {
process.stderr.write(
"agentmemory-fs-watcher: no directories to watch.\n" +
"Usage: agentmemory-fs-watcher <dir> [<dir>...]\n" +
"Or set AGENTMEMORY_FS_WATCH_DIRS=path1,path2\n",
);
process.exit(2);
}
const watcher = new FilesystemWatcher({ ...envCfg, roots });
watcher.start();
process.stderr.write(
`[fs-watcher] emitting to ${envCfg.baseUrl || "http://localhost:3111"}\n`,
);
const shutdown = () => {
watcher.stop();
process.exit(0);
};
process.on("SIGINT", shutdown);
process.on("SIGTERM", shutdown);