agent-guardrails 0.3.8 → 0.3.9

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.
@@ -264,6 +264,10 @@ export async function run({ repoRoot, config, foreground = false, locale = null
264
264
 
265
265
  // Start file watcher
266
266
  watcher = await createWatcher(repoRoot, config, (filePath) => {
267
+ const absolutePath = path.resolve(filePath);
268
+ if (!absolutePath.startsWith(path.resolve(repoRoot) + path.sep) && absolutePath !== path.resolve(repoRoot)) {
269
+ return; // 跳过项目目录外的文件变更
270
+ }
267
271
  log(`File changed: ${filePath}`);
268
272
  info.incrementChecks();
269
273
  info.updateLastCheck();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-guardrails",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "mcpName": "io.github.logi-cmd/agent-guardrails",
5
5
  "description": "Production guardrails for AI coding agents",
6
6
  "type": "module",