npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@remote-sql-agent/worker

v0.2.0

Published

Remote SQL Agent worker: mirrors a host's SQL Server Agent jobs to the control plane over an outbound-only connection, and applies approved changes.

Downloads

329

Readme

@remote-sql-agent/worker

The worker component of Remote SQL Agent.

Runs next to a SQL Server instance, mirrors its SQL Server Agent jobs to a central control plane over an outbound-only connection, and applies approved changes back. It opens no listening port, so no inbound firewall rule is needed on the SQL host.

SQL Agent remains the execution engine. The worker never runs a job itself — it reads msdb and calls the documented Agent stored procedures, the same ones SSMS calls. Stop the worker and every job keeps running.

On Windows, prefer the packaged installer from the releases page: it registers a service, locks down file permissions and handles enrolment. This npm package is aimed at SQL Server on Linux.

Install

npm install -g @remote-sql-agent/worker

Requires Node.js 24 or newer. The Windows package ships a pinned runtime, so this only applies if you run the bundle yourself.

For Azure managed identity authentication, also install the optional peer:

npm install -g @azure/identity

Use

Generate a single-use enrolment token in the dashboard (Administration → Workers), write a config, then enrol once:

rsagent enrol --token rsen_xxxxxxxxxxxx /etc/rsagent/worker.yaml
rsagent /etc/rsagent/worker.yaml

Minimal worker.yaml:

hostName: sqlprod01

controlPlane:
  address: rsagent.corp.example.com:8443
  auth:
    mode: token                       # token | mtls | entra
    keyFile: /var/lib/rsagent/worker.key
  tls:
    enabled: true
    caCertPath: /etc/rsagent/ca.pem   # if your CA is private

# The local ceiling. The control plane can grant less than this, never more.
maxCapability: readOnly               # readOnly | operate | schedule | full

instances:
  - name: MSSQLSERVER
    server: localhost
    user: rsagent_worker
    password: ${RSAGENT_SQL_PASSWORD}

Run it under systemd in production — a unit file ships in the release zip.

SQL Server permissions

Read-only mirroring needs one role:

USE [msdb];
CREATE USER [rsagent_worker] FOR LOGIN [rsagent_worker];
ALTER ROLE [SQLAgentReaderRole] ADD MEMBER [rsagent_worker];

Add SQLAgentOperatorRole only if the worker should make changes. Never grant sysadmin.

The capability ceiling

maxCapability is the security-critical setting. It is a ceiling the control plane cannot raise — the worker computes its effective capabilities from this file on every session and never trusts the server's arithmetic.

A worker pinned to readOnly cannot be made to write even if the control plane is fully compromised. Leave it there unless this host genuinely needs to accept changes.

Documentation

Licence

Apache 2.0