Skip to main content

Nats

@retr0h/natsv2026.04.21.1· 3mo agoMODELS
01README

General-purpose NATS transport for swamp — exec, upload, wait for agent connection. Pairs with swamp-nats-agent (https://github.com/retr0h/swamp-nats-agent).

02Release Notes

@adam/cfgmgmt drop-in compat: exports match adam's _lib/ssh.ts byte-for-byte (exec, execSudo, writeFile, writeFileAs, scpFile, scpFileAs, shellEscape, closeAll). nats_host globalArgs mirror cfgmgmt's GlobalArgsSchema (nodeHost, nodeUser, nodePort, nodeIdentityFile, become, becomeUser, becomePassword). Sudo moves from method args to globalArgs.

03Models1
nats_host.tsv2026.04.21.1

Global Arguments

ArgumentTypeDescription
nodeUserstringAgent-side user (SSH-era field, advisory)
nodePortnumberSSH port (ignored by NATS transport)
nodeIdentityFile?stringSSH private key path (ignored by NATS transport)
becomeUserstringUser to become when sudo is true
becomePassword?stringPassword for sudo -S (piped via stdin)
natsSubjectPrefixstringSubject prefix for multi-tenant namespace isolation
timeoutMsnumberPer-request timeout (ms)
natsUser?stringNATS user/pass auth — username
natsPass?stringNATS user/pass auth — password
natsToken?stringNATS static token auth
natsCredsPath?stringPath to NATS creds file (user JWT + nkey, recommended)
natsNKeySeed?stringNATS nkey seed (alternative to creds file)
natsTlsCaFile?stringmTLS — CA certificate file
natsTlsCertFile?stringmTLS — client certificate file
natsTlsKeyFile?stringmTLS — client key file
fn exec()
Run a command on the remote host via swamp-nats-agent. Returns stdout/stderr/exitCode without throwing on non-zero exit.
fn upload()
Write file content to a remote path via swamp-nats-agent. Supports UTF-8 and base64 encoded content; atomic write under sudo via install(1).
fn waitForConnection()
Poll the swamp-nats-agent on the target host until it replies or timeout elapses.
04Previous Versions1
2026.04.20.1

Initial release — NATS (JetStream) transport for swamp, pairs with swamp-nats-agent

05Stats
Downloads
2
Archive size
85.6 KB

Not yet scored.

A score will be generated the next time this extension is published. The owner can also trigger scoring manually.

06Platforms
07Labels