{"version":"2.1.195","anchor":"monitor-tool-websocket-support","canonical_anchor":"monitor-tool-websocket-support","heading":"Monitor Tool WebSocket Support","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.195\/e\/monitor-tool-websocket-support","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.195","markdown":"### Monitor Tool WebSocket Support\n\n**What**\n\nThe Monitor tool now accepts a `ws` source that opens a WebSocket and streams each incoming text frame as a notification event \u2014 no shell process, no polling needed.\n\n**Usage**\n\n`Monitor({ ws: { url: 'wss:\/\/events.example.com\/stream', protocols: ['v1'] }, description: 'deploy events', })` **Details** - Each text frame becomes one notification; multiline frames stay as one event. - Binary frames are reported as `[binary frame, N bytes]` rather than passed through. - Socket close ends the watch; close code and optional reason are surfaced. - WebSocket errors appear before close as `[WebSocket error: ...]`. - Same rate-limiting as bash monitor \u2014 a firehose is suppressed and eventually stopped. - Blocks connections to private\/link-local\/cloud-metadata IP ranges (SSRF protection) and respects `sandbox.network.deniedDomains` and `allowManagedDomainsOnly`. - Compliance taint disables arbitrary-URL WebSocket egress with a clear message: \"Monitor cannot open a WebSocket: arbitrary-URL egress is disabled by your organization's compliance policy.\" - Cannot be combined with `command`. **Evidence** New `MonitorWsTask` and `MonitorWsPreconditionError` types (search for `\"MonitorWsTask\"`, `\"MonitorWsPreconditionError\"`, `\"ws source\"`)"}