New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@syncrona/sn-transport

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncrona/sn-transport

Shared ServiceNow transport policy for SyncroNow AI (scoped API prefix resolution and retryable status policy) used by the core CLI client and the MCP server client.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

@syncrona/sn-transport

npmnodelicenseCITypeScript

Shared ServiceNow transport policy for SyncroNow AI. This package is the single source of truth for the transport-level rules that both ServiceNow HTTP clients must agree on:

The two clients remain separate implementations on purpose (a one-shot CLI vs. a long-lived MCP runtime with different retry/rate-limit needs), but the policies below were previously copy-pasted in both and were the most likely to silently drift apart.

What lives here

Scoped API prefix resolution

ServiceNow scoped APIs live under api/<prefix>/…. SyncroNow AI tries a known set of prefixes in order and remembers the one that worked.

  • DEFAULT_SCOPED_API_PREFIXES — defaults (x_nuvo_sinc, x_nuvo_sync).
  • SCOPED_API_PREFIXES_ENV — the SYNCRONA_SCOPED_API_PREFIXES override var.
  • sanitizeScopedPrefix(value) — strip unsafe characters from one prefix.
  • parseConfiguredScopedApiPrefixes(rawEnvValue) — parse the override (comma separated), falling back to the defaults; de-duplicated, order preserved.
  • orderScopedApiPrefixes(configured, preferred?) — preferred/last-successful prefixes first, then configured, de-duplicated.

Retryable HTTP status policy

  • RETRYABLE_HTTP_STATUSES — canonical retryable status codes (408, 425, 429, 500, 502, 503, 504).
  • shouldRetryStatus(status) — predicate over that set.

Design notes

This module is intentionally pure: no I/O and no node globals. Callers read and clean the environment value themselves and pass the raw string in, and each client keeps its own runtime cache of the last successful prefix (transport state is per-process, not shared).

FAQs

Package last updated on 25 Aug 2026

Related posts