@ghub/gctl-bridge
v0.2.0
Published
The only GControl package an application links: JSON over a unix socket to the module host in its own container. MIT, zero dependencies, and nothing in it decides anything.
Readme
@ghub/gctl-bridge
The only GControl package an application links directly: JSON over a unix socket to the module host running in its own container.
MIT and zero dependencies, and both are load-bearing. Applications whose own licences oblige them to hand on what they link cannot take on an obligation of ours, so this is free of one, and it is kept dumb enough that there is nothing in it worth taking. Nothing here decides anything: it frames a request and reads a reply.
import { connect, BridgeUnavailable } from "@ghub/gctl-bridge";
const host = connect({ socketPath: process.env.GCTL_MODHOST_SOCKET });
try {
const answer = await host.call("sso", "authorize", payload);
} catch (error) {
// Rejects this way when the answer is no rather than when something broke:
// no licence for it, no host running, no module of that name. Handle it once.
if (error instanceof BridgeUnavailable) fallBackToLocalAuth();
}Part of GControl, a self-hosted broker for G-Apps. This package is published on its own because it is consumed outside that repository; it is not a general-purpose library and its releases follow GControl's.
Licence
MIT, and deliberately so rather than the Elastic License 2.0 the rest of GControl carries.
See the LICENSE file in this package.
Copyright (c) 2026 Gelhaus Solutions (Enno Gelhaus). Built and maintained by Gelhaus Solutions.
