MCPcopy
hub / github.com/GetBindu/Bindu / SpawnedGateway

Interface SpawnedGateway

inbox/server/index.ts:927–935  ·  view source on GitHub ↗

* Spawn a gateway from the local monorepo as a child process. * * Used when the operator picks 2+ agents in Compose and has no * gateway in Contacts yet — instead of asking them to `cd gateway && * npm start` in another terminal, comms launches it directly. * * Flow: * 1. Locate `gateway/`

Source from the content-addressed store, hash-verified

925 * persist these across restarts; that's a phase-3 concern.
926 */
927interface SpawnedGateway {
928 child: ChildProcess;
929 /** True iff this gateway was started with BINDU_GATEWAY_TLS_* in its
930 * env (Phase C). False means it serves plain HTTP and presents no
931 * client cert on outbound A2A. We track this so that when the personal
932 * agent comes up AFTER a gateway was already spawned, recycleStaleGateways
933 * can SIGTERM the HTTP one so the next /api/plan respawns it with TLS. */
934 hasTls: boolean;
935}
936const spawnedGateways = new Map<string, SpawnedGateway>();
937
938type GatewayHandle =

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected