feat: add remote gateway client config

This commit is contained in:
Peter Steinberger
2026-01-01 20:10:50 +01:00
parent a72fdf7c26
commit bd7cd33b02
18 changed files with 516 additions and 45 deletions

View File

@@ -35,19 +35,38 @@ export async function runNonInteractiveOnboarding(
const mode: OnboardMode = opts.mode ?? "local";
if (mode === "remote") {
const remoteUrl = opts.remoteUrl?.trim();
if (!remoteUrl) {
runtime.error("Missing --remote-url for remote mode.");
runtime.exit(1);
return;
}
let nextConfig: ClawdisConfig = {
...baseConfig,
gateway: {
...baseConfig.gateway,
mode: "remote",
remote: {
url: remoteUrl,
token: opts.remoteToken?.trim() || undefined,
},
},
};
nextConfig = applyWizardMetadata(nextConfig, { command: "onboard", mode });
await writeConfigFile(nextConfig);
runtime.log(`Updated ${CONFIG_PATH_CLAWDIS}`);
const payload = {
mode,
instructions: [
"clawdis setup",
"clawdis gateway-daemon --port 18789",
"OAuth creds: ~/.clawdis/credentials/oauth.json",
"Workspace: ~/clawd",
],
remoteUrl,
auth: opts.remoteToken ? "token" : "none",
};
if (opts.json) {
runtime.log(JSON.stringify(payload, null, 2));
} else {
runtime.log(payload.instructions.join("\n"));
runtime.log(`Remote gateway: ${remoteUrl}`);
runtime.log(`Auth: ${payload.auth}`);
}
return;
}