fix: start tailscale exposure before sidecars

This commit is contained in:
Ayaan Zaidi
2026-04-09 17:21:56 +05:30
parent 7f714609f7
commit b8af4d6739
2 changed files with 17 additions and 18 deletions

View File

@@ -1343,9 +1343,7 @@ export async function startGatewayServer(
const canvasHostServerPort = (canvasHostServer as CanvasHostServer | null)?.port;
const unavailableGatewayMethods = new Set<string>(
minimalTestGateway ? [] : ["chat.history"],
);
const unavailableGatewayMethods = new Set<string>(minimalTestGateway ? [] : ["chat.history"]);
const gatewayRequestContext: import("./server-methods/types.js").GatewayRequestContext = {
deps,
cron,
@@ -1489,21 +1487,6 @@ export async function startGatewayServer(
broadcast,
context: gatewayRequestContext,
});
if (!minimalTestGateway) {
log.info("starting channels and sidecars...");
({ pluginServices } = await startGatewaySidecars({
cfg: gatewayPluginConfigAtStart,
pluginRegistry,
defaultWorkspaceDir,
deps,
startChannels,
log,
logHooks,
logChannels,
}));
unavailableGatewayMethods.delete("chat.history");
}
logGatewayStartup({
cfg: cfgAtStart,
bindHost,
@@ -1536,6 +1519,21 @@ export async function startGatewayServer(
logTailscale,
});
if (!minimalTestGateway) {
log.info("starting channels and sidecars...");
({ pluginServices } = await startGatewaySidecars({
cfg: gatewayPluginConfigAtStart,
pluginRegistry,
defaultWorkspaceDir,
deps,
startChannels,
log,
logHooks,
logChannels,
}));
unavailableGatewayMethods.delete("chat.history");
}
// Run gateway_start plugin hook (fire-and-forget)
if (!minimalTestGateway) {
const hookRunner = getGlobalHookRunner();