fix: clarify daemon status probe target

This commit is contained in:
Peter Steinberger committed 2026-01-08 08:50:09 +01:00
1 parent 742850adae
commit 44441dd5d8
4 files changed
+17 -8

No files matched your search

+10 -5
View File
@@ -25,6 +25,11 @@ export type CallGatewayOptions = {
instanceId?: string;
minProtocol?: number;
maxProtocol?: number;
/**
* Overrides the config path shown in connection error details.
* Does not affect config loading; callers still control auth via opts.token/password/env/config.
*/
configPath?: string;
};
export type GatewayConnectionDetails = {
@@ -36,13 +41,12 @@ export type GatewayConnectionDetails = {
};
export function buildGatewayConnectionDetails(
options: { config?: ClawdbotConfig; url?: string } = {},
options: { config?: ClawdbotConfig; url?: string; configPath?: string } = {},
): GatewayConnectionDetails {
const config = options.config ?? loadConfig();
const configPath = resolveConfigPath(
process.env,
resolveStateDir(process.env),
);
const configPath =
options.configPath ??
resolveConfigPath(process.env, resolveStateDir(process.env));
const isRemoteMode = config.gateway?.mode === "remote";
const remote = isRemoteMode ? config.gateway?.remote : undefined;
const localPort = resolveGatewayPort(config);
@@ -107,6 +111,7 @@ export async function callGateway<T = unknown>(
const connectionDetails = buildGatewayConnectionDetails({
config,
url: opts.url,
...(opts.configPath ? { configPath: opts.configPath } : {}),
});
const url = connectionDetails.url;
const token =