feat: add one-paste node onboarding (#122499)

* feat(pairing): add short join onboarding

* fix(gateway): isolate device join routing tests
This commit is contained in:
Peter Steinberger
2026-08-12 06:17:39 -07:00
committed by GitHub
parent fb9a62e995
commit ade3456dd4
54 changed files with 1014 additions and 25 deletions
+24
View File
@@ -942,6 +942,30 @@ export async function runDevicesListCommand(opts: DevicesRpcOpts): Promise<void>
}
}
export async function runDevicesJoinCodeCommand(opts: DevicesRpcOpts): Promise<void> {
const result = await callGatewayCli(
"device.pair.setupCode",
opts,
{
bootstrapProfile: "node",
includeQr: false,
joinUrl: true,
},
{ scopes: [ADMIN_SCOPE] },
);
const joinUrl = normalizeOptionalString((result as { joinUrl?: unknown }).joinUrl);
if (!joinUrl) {
throw new Error("Gateway did not return a device join URL.");
}
const command = `npx openclaw connect ${quoteCliArg(joinUrl)}`;
if (opts.json) {
defaultRuntime.writeJson({ joinUrl, command });
return;
}
defaultRuntime.log(joinUrl);
defaultRuntime.log(command);
}
export async function runDevicesRemoveCommand(
deviceId: string,
opts: DevicesRpcOpts,