/** * dep-watcher-bridge — Bridges the file-watcher plugin's custom events * to the dependency watcher → mailbox pipeline. * * The file-watcher plugin emits `file-watcher:changed` custom events * when files change. This module subscribes to those events, filters * for dependency manifests (package.json, go.mod, etc.), and posts * assign messages to the inter-agent mailbox for tech-stack audit. * * Returns a dispose function that unsubscribes from the event bus. * * @module dep-watcher-bridge */ import type { EventBus } from '../kernel/events.js'; import type { Mailbox } from './mailbox-types.js'; export interface DepWatcherBridgeOptions { /** The event bus to subscribe to (same bus the file-watcher plugin emits on). */ events: EventBus; /** The mailbox instance where dep-change notifications will be posted. */ mailbox: Mailbox; /** Absolute project root — used to build watch paths and match file patterns. */ projectRoot: string; /** Agent id the tech-stack audit tasks should target. Default: 'tech-stack'. */ targetAgent?: string | undefined; /** Agent id of the watcher/sender. Default: 'dep-watcher'. */ watcherAgentId?: string | undefined; /** Debounce window in ms. Default: 3000 (3 seconds). */ debounceMs?: number | undefined; } /** * Wire the file-watcher's `file-watcher:changed` events into the * dependency watcher → mailbox pipeline. * * Returns a dispose function. Call it to unsubscribe when the * session ends or the watcher is no longer needed. * * Usage: * const dispose = attachDepWatcherBridge({ * events: ctx.events, * mailbox: new DefaultMailbox(sessionDir), * projectRoot: ctx.projectRoot, * }); * // ... session runs ... * dispose(); // clean up on exit */ export declare function attachDepWatcherBridge(opts: DepWatcherBridgeOptions): () => void; //# sourceMappingURL=dep-watcher-bridge.d.ts.map