@heretek-ai/openclaw 2026.3.30 → 2026.3.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.buildstamp +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/chunks/command-registry-BeAmVjny.mjs +214 -0
- package/dist/chunks/command-registry-BnmWhMEa.mjs +214 -0
- package/dist/chunks/command-registry-CCc0vZoH.mjs +14 -0
- package/dist/chunks/command-registry-CLOY087q.mjs +14 -0
- package/dist/chunks/command-registry-CjAG33h3.mjs +14 -0
- package/dist/chunks/command-registry-DPx6M6gw.mjs +214 -0
- package/dist/chunks/completion-cli-BDWbmV-o.mjs +448 -0
- package/dist/chunks/completion-cli-CBrKGQfJ.mjs +17 -0
- package/dist/chunks/completion-cli-CpJ8IzQO.mjs +448 -0
- package/dist/chunks/completion-cli-CwouPhbG.mjs +17 -0
- package/dist/chunks/completion-cli-DuMZk0lN.mjs +448 -0
- package/dist/chunks/completion-cli-DxUdlYt0.mjs +17 -0
- package/dist/chunks/doctor-completion-1UqU9aiy.mjs +92 -0
- package/dist/chunks/doctor-completion-B_LLsQm-.mjs +92 -0
- package/dist/chunks/doctor-completion-CCuL-Cen.mjs +92 -0
- package/dist/chunks/gateway-cli-Bc4J6-zj.mjs +43508 -0
- package/dist/chunks/gateway-cli-CqAlS2xh.mjs +43508 -0
- package/dist/chunks/gateway-cli-CxfnMGx8.mjs +43508 -0
- package/dist/chunks/onboard-CRZ2jxOE.mjs +601 -0
- package/dist/chunks/onboard-CyzbNCBF.mjs +601 -0
- package/dist/chunks/onboard-Y9qZW5yw.mjs +601 -0
- package/dist/chunks/program-B27s-BhZ.mjs +163 -0
- package/dist/chunks/program-B3JSAo3Q.mjs +163 -0
- package/dist/chunks/program-DVTI5ouc.mjs +163 -0
- package/dist/chunks/prompt-select-styled-AhC9B2Sr.mjs +5035 -0
- package/dist/chunks/prompt-select-styled-DWTJpQCH.mjs +5035 -0
- package/dist/chunks/prompt-select-styled-PxJbW1Dj.mjs +5035 -0
- package/dist/chunks/register.maintenance-DkQKQI29.mjs +685 -0
- package/dist/chunks/register.maintenance-DrxPWWzR.mjs +685 -0
- package/dist/chunks/register.maintenance-ofEvddjM.mjs +685 -0
- package/dist/chunks/register.onboard-3m3OGP7x.mjs +168 -0
- package/dist/chunks/register.onboard-BpL-OvP9.mjs +168 -0
- package/dist/chunks/register.onboard-CvtQ4Z6V.mjs +168 -0
- package/dist/chunks/register.setup-Dz3jKcQw.mjs +188 -0
- package/dist/chunks/register.setup-NRV53Eo_.mjs +188 -0
- package/dist/chunks/register.setup-xf9cH3sc.mjs +188 -0
- package/dist/chunks/register.subclis-B6xOze_R.mjs +319 -0
- package/dist/chunks/register.subclis-B_qUKZPW.mjs +13 -0
- package/dist/chunks/register.subclis-BvClctGE.mjs +319 -0
- package/dist/chunks/register.subclis-CXtcQnsP.mjs +13 -0
- package/dist/chunks/register.subclis-Dd7Q2x2W.mjs +13 -0
- package/dist/chunks/register.subclis-Dj9qGYdr.mjs +319 -0
- package/dist/chunks/run-main-BYaCWOd9.mjs +437 -0
- package/dist/chunks/run-main-CpZzBbaq.mjs +437 -0
- package/dist/chunks/run-main-nT8E6iSo.mjs +437 -0
- package/dist/chunks/setup-BufxzaUK.mjs +399 -0
- package/dist/chunks/setup-DHU6h2yc.mjs +399 -0
- package/dist/chunks/setup-Ddj3KzQ7.mjs +399 -0
- package/dist/chunks/setup.finalize-Cc2mg8-p.mjs +544 -0
- package/dist/chunks/setup.finalize-DVacBRaT.mjs +544 -0
- package/dist/chunks/setup.finalize-ZR-Hv0hQ.mjs +544 -0
- package/dist/chunks/update-cli-DK2TX2U4.mjs +1632 -0
- package/dist/chunks/update-cli-DWGkI141.mjs +1632 -0
- package/dist/chunks/update-cli-JcUKNsam.mjs +1632 -0
- package/dist/entry.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +134 -134
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import "./redact-CtGOTRBK.mjs";
|
|
2
|
+
import "./errors-CbvpN2RP.mjs";
|
|
3
|
+
import "./logger-vRSRu9wD.mjs";
|
|
4
|
+
import "./paths-CNST7z3O.mjs";
|
|
5
|
+
import "./tmp-openclaw-dir-BeWwpCKM.mjs";
|
|
6
|
+
import { r as theme } from "./theme-w86ra_7m.mjs";
|
|
7
|
+
import "./globals-DZFR3wyP.mjs";
|
|
8
|
+
import { m as defaultRuntime } from "./subsystem-yLe4Gjha.mjs";
|
|
9
|
+
import "./ansi-BJ9IOlIp.mjs";
|
|
10
|
+
import "./boolean-Bwxxidw8.mjs";
|
|
11
|
+
import "./env-9fhyzTaG.mjs";
|
|
12
|
+
import "./utils-Dc9DiBqf.mjs";
|
|
13
|
+
import { t as formatDocsLink } from "./links-BNNF54ea.mjs";
|
|
14
|
+
import "./agent-scope-CnAwGoC2.mjs";
|
|
15
|
+
import "./boundary-path-DnlNnNbU.mjs";
|
|
16
|
+
import "./boundary-file-read-BB4JbZzx.mjs";
|
|
17
|
+
import "./logger-DWOgrQoS.mjs";
|
|
18
|
+
import "./exec-DX0zVVG7.mjs";
|
|
19
|
+
import "./openclaw-root-CSfnLaqO.mjs";
|
|
20
|
+
import "./workspace-CoFl73GV.mjs";
|
|
21
|
+
import "./model-selection-BJk_hQeE.mjs";
|
|
22
|
+
import "./io-CDQGJKjg.mjs";
|
|
23
|
+
import "./shell-env-CP5vTYhw.mjs";
|
|
24
|
+
import "./safe-text-Bsdm3bQS.mjs";
|
|
25
|
+
import "./version-Ckv-IbvB.mjs";
|
|
26
|
+
import "./env-substitution-DGlYO8jV.mjs";
|
|
27
|
+
import "./scan-paths-ahOy4FCQ.mjs";
|
|
28
|
+
import "./includes-DcO1JxKG.mjs";
|
|
29
|
+
import "./zod-schema.providers-core-CjdAU1TY.mjs";
|
|
30
|
+
import "./legacy-web-search-B1O8hiGy.mjs";
|
|
31
|
+
import "./schema-validator-BOH34EXk.mjs";
|
|
32
|
+
import "./registry-DBJv0dvl.mjs";
|
|
33
|
+
import "./config-state-kmbzTT63.mjs";
|
|
34
|
+
import "./min-host-version-EA11e8I5.mjs";
|
|
35
|
+
import "./manifest-registry-dO1qi1iI.mjs";
|
|
36
|
+
import "./runtime-guard-CWHkkioa.mjs";
|
|
37
|
+
import "./avatar-policy-uRVtZ7lJ.mjs";
|
|
38
|
+
import "./ip-BtMd9ssR.mjs";
|
|
39
|
+
import "./zod-schema.agent-runtime-BtGT59eP.mjs";
|
|
40
|
+
import "./zod-schema.core-CMT7g7UX.mjs";
|
|
41
|
+
import "./zod-schema.channels-BAG3dUtC.mjs";
|
|
42
|
+
import "./zod-schema.providers-whatsapp-qnpQepaf.mjs";
|
|
43
|
+
import "./config-Bhjk4Vel.mjs";
|
|
44
|
+
import "./process-scoped-map-BmLEe6nP.mjs";
|
|
45
|
+
import "./audit-fs-kb-rv_ZT.mjs";
|
|
46
|
+
import "./shared-VxKfp8Uy.mjs";
|
|
47
|
+
import "./resolve-DI6cKS4v.mjs";
|
|
48
|
+
import "./cli-name-lEyorNIN.mjs";
|
|
49
|
+
import "./command-format-D1DrcTDP.mjs";
|
|
50
|
+
import "./tailnet-Bc7IPWjH.mjs";
|
|
51
|
+
import "./net-OJiOmwY1.mjs";
|
|
52
|
+
import "./credentials-DTsHVnAc.mjs";
|
|
53
|
+
import "./message-channel-DCt8BIP7.mjs";
|
|
54
|
+
import "./store-B0V1qm_-.mjs";
|
|
55
|
+
import "./runtime-a4e8n7tq.mjs";
|
|
56
|
+
import "./registry-9YpVWxKb.mjs";
|
|
57
|
+
import "./plugins-D8oapapr.mjs";
|
|
58
|
+
import "./sessions-CYgBPqrc.mjs";
|
|
59
|
+
import "./paths-CGxgQvpf.mjs";
|
|
60
|
+
import "./types-DoAKcnWC.mjs";
|
|
61
|
+
import "./session-write-lock-DE8KASyZ.mjs";
|
|
62
|
+
import "./json-files-BcpXnc9i.mjs";
|
|
63
|
+
import "./delivery-info-CGNfeMd6.mjs";
|
|
64
|
+
import "./method-scopes-hu-4urbi.mjs";
|
|
65
|
+
import "./call-CcXWxOVG.mjs";
|
|
66
|
+
import "./ws-Dv5Afaxu.mjs";
|
|
67
|
+
import "./control-ui-shared-Dhzx9It_.mjs";
|
|
68
|
+
import "./onboard-helpers-C5GCWoDO.mjs";
|
|
69
|
+
import "./wsl-BW8_A9_i.mjs";
|
|
70
|
+
import "./prompt-style-Dua6SIJh.mjs";
|
|
71
|
+
import "./progress-BxDdsPK3.mjs";
|
|
72
|
+
import "./registry-CFSnIRx_.mjs";
|
|
73
|
+
import "./internal-hooks-VOrTrqjW.mjs";
|
|
74
|
+
import "./providers.runtime-CtdkYDy2.mjs";
|
|
75
|
+
import "./accounts-DCMTPA3m.mjs";
|
|
76
|
+
import "./loader-CYgWRKc6.mjs";
|
|
77
|
+
import "./config-presence-DzY-U322.mjs";
|
|
78
|
+
import "./types-BaXbwBIP.mjs";
|
|
79
|
+
import "./hook-runner-global-z_Icpwvo.mjs";
|
|
80
|
+
import "./session-binding-service-Bmkk4TGJ.mjs";
|
|
81
|
+
import "./conversation-binding-elBCYjlA.mjs";
|
|
82
|
+
import "./sdk-alias-C5qDxQv2.mjs";
|
|
83
|
+
import "./bundle-lsp-DyU7-zol.mjs";
|
|
84
|
+
import "./logging-CcQ-gmqC.mjs";
|
|
85
|
+
import "./status-BWLPyL8Y.mjs";
|
|
86
|
+
import { n as runCommandWithRuntime } from "./cli-utils-DA6vWpDg.mjs";
|
|
87
|
+
import "./note-CaQ2HD-A.mjs";
|
|
88
|
+
import "./clack-prompter-C0PG2vbx.mjs";
|
|
89
|
+
import "./setup.secret-input-DPX4L6ht.mjs";
|
|
90
|
+
import "./setup-BufxzaUK.mjs";
|
|
91
|
+
import { i as resolveManifestProviderOnboardAuthFlags } from "./provider-auth-choices-DFywK1Pz.mjs";
|
|
92
|
+
import "./provider-wizard-BhAu9Eak.mjs";
|
|
93
|
+
import { n as formatAuthChoiceChoicesForCli } from "./auth-choice-options-wlxI7ZI3.mjs";
|
|
94
|
+
import { n as CORE_ONBOARD_AUTH_FLAGS, t as setupWizardCommand } from "./onboard-CyzbNCBF.mjs";
|
|
95
|
+
|
|
96
|
+
//#region src/cli/program/register.onboard.ts
|
|
97
|
+
function resolveInstallDaemonFlag(command, opts) {
|
|
98
|
+
if (!command || typeof command !== "object") return;
|
|
99
|
+
const getOptionValueSource = "getOptionValueSource" in command ? command.getOptionValueSource : void 0;
|
|
100
|
+
if (typeof getOptionValueSource !== "function") return;
|
|
101
|
+
if (getOptionValueSource.call(command, "skipDaemon") === "cli") return false;
|
|
102
|
+
if (getOptionValueSource.call(command, "installDaemon") === "cli") return Boolean(opts.installDaemon);
|
|
103
|
+
}
|
|
104
|
+
const AUTH_CHOICE_HELP = formatAuthChoiceChoicesForCli({
|
|
105
|
+
includeLegacyAliases: true,
|
|
106
|
+
includeSkip: true
|
|
107
|
+
});
|
|
108
|
+
const ONBOARD_AUTH_FLAGS = [...CORE_ONBOARD_AUTH_FLAGS, ...resolveManifestProviderOnboardAuthFlags()];
|
|
109
|
+
function pickOnboardProviderAuthOptionValues(opts) {
|
|
110
|
+
return Object.fromEntries(ONBOARD_AUTH_FLAGS.map((flag) => [flag.optionKey, opts[flag.optionKey]]));
|
|
111
|
+
}
|
|
112
|
+
function registerOnboardCommand(program) {
|
|
113
|
+
const command = program.command("onboard").description("Interactive onboarding for the gateway, workspace, and skills").addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/onboard", "docs.openclaw.ai/cli/onboard")}\n`).option("--workspace <dir>", "Agent workspace directory (default: ~/.openclaw/workspace)").option("--reset", "Reset config + credentials + sessions before running onboard (workspace only with --reset-scope full)").option("--reset-scope <scope>", "Reset scope: config|config+creds+sessions|full").option("--non-interactive", "Run without prompts", false).option("--accept-risk", "Acknowledge that agents are powerful and full system access is risky (required for --non-interactive)", false).option("--flow <flow>", "Onboard flow: quickstart|advanced|manual").option("--mode <mode>", "Onboard mode: local|remote").option("--auth-choice <choice>", `Auth: ${AUTH_CHOICE_HELP}`).option("--token-provider <id>", "Token provider id (non-interactive; used with --auth-choice token)").option("--token <token>", "Token value (non-interactive; used with --auth-choice token)").option("--token-profile-id <id>", "Auth profile id (non-interactive; default: <provider>:manual)").option("--token-expires-in <duration>", "Optional token expiry duration (e.g. 365d, 12h)").option("--secret-input-mode <mode>", "API key persistence mode: plaintext|ref (default: plaintext)").option("--cloudflare-ai-gateway-account-id <id>", "Cloudflare Account ID").option("--cloudflare-ai-gateway-gateway-id <id>", "Cloudflare AI Gateway ID");
|
|
114
|
+
for (const providerFlag of ONBOARD_AUTH_FLAGS) command.option(providerFlag.cliOption, providerFlag.description);
|
|
115
|
+
command.option("--custom-base-url <url>", "Custom provider base URL").option("--custom-api-key <key>", "Custom provider API key (optional)").option("--custom-model-id <id>", "Custom provider model ID").option("--custom-provider-id <id>", "Custom provider ID (optional; auto-derived by default)").option("--custom-compatibility <mode>", "Custom provider API compatibility: openai|anthropic (default: openai)").option("--gateway-port <port>", "Gateway port").option("--gateway-bind <mode>", "Gateway bind: loopback|tailnet|lan|auto|custom").option("--gateway-auth <mode>", "Gateway auth: token|password").option("--gateway-token <token>", "Gateway token (token auth)").option("--gateway-token-ref-env <name>", "Gateway token SecretRef env var name (token auth; e.g. OPENCLAW_GATEWAY_TOKEN)").option("--gateway-password <password>", "Gateway password (password auth)").option("--remote-url <url>", "Remote Gateway WebSocket URL").option("--remote-token <token>", "Remote Gateway token (optional)").option("--tailscale <mode>", "Tailscale: off|serve|funnel").option("--tailscale-reset-on-exit", "Reset tailscale serve/funnel on exit").option("--install-daemon", "Install gateway service").option("--no-install-daemon", "Skip gateway service install").option("--skip-daemon", "Skip gateway service install").option("--daemon-runtime <runtime>", "Daemon runtime: node|bun").option("--skip-channels", "Skip channel setup").option("--skip-skills", "Skip skills setup").option("--skip-search", "Skip search provider setup").option("--skip-health", "Skip health check").option("--skip-ui", "Skip Control UI/TUI prompts").option("--node-manager <name>", "Node manager for skills: npm|pnpm|bun").option("--json", "Output JSON summary", false);
|
|
116
|
+
command.action(async (opts, commandRuntime) => {
|
|
117
|
+
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
118
|
+
const installDaemon = resolveInstallDaemonFlag(commandRuntime, { installDaemon: Boolean(opts.installDaemon) });
|
|
119
|
+
const gatewayPort = typeof opts.gatewayPort === "string" ? Number.parseInt(opts.gatewayPort, 10) : void 0;
|
|
120
|
+
const providerAuthOptionValues = pickOnboardProviderAuthOptionValues(opts);
|
|
121
|
+
await setupWizardCommand({
|
|
122
|
+
workspace: opts.workspace,
|
|
123
|
+
nonInteractive: Boolean(opts.nonInteractive),
|
|
124
|
+
acceptRisk: Boolean(opts.acceptRisk),
|
|
125
|
+
flow: opts.flow,
|
|
126
|
+
mode: opts.mode,
|
|
127
|
+
authChoice: opts.authChoice,
|
|
128
|
+
tokenProvider: opts.tokenProvider,
|
|
129
|
+
token: opts.token,
|
|
130
|
+
tokenProfileId: opts.tokenProfileId,
|
|
131
|
+
tokenExpiresIn: opts.tokenExpiresIn,
|
|
132
|
+
secretInputMode: opts.secretInputMode,
|
|
133
|
+
...providerAuthOptionValues,
|
|
134
|
+
cloudflareAiGatewayAccountId: opts.cloudflareAiGatewayAccountId,
|
|
135
|
+
cloudflareAiGatewayGatewayId: opts.cloudflareAiGatewayGatewayId,
|
|
136
|
+
customBaseUrl: opts.customBaseUrl,
|
|
137
|
+
customApiKey: opts.customApiKey,
|
|
138
|
+
customModelId: opts.customModelId,
|
|
139
|
+
customProviderId: opts.customProviderId,
|
|
140
|
+
customCompatibility: opts.customCompatibility,
|
|
141
|
+
gatewayPort: typeof gatewayPort === "number" && Number.isFinite(gatewayPort) ? gatewayPort : void 0,
|
|
142
|
+
gatewayBind: opts.gatewayBind,
|
|
143
|
+
gatewayAuth: opts.gatewayAuth,
|
|
144
|
+
gatewayToken: opts.gatewayToken,
|
|
145
|
+
gatewayTokenRefEnv: opts.gatewayTokenRefEnv,
|
|
146
|
+
gatewayPassword: opts.gatewayPassword,
|
|
147
|
+
remoteUrl: opts.remoteUrl,
|
|
148
|
+
remoteToken: opts.remoteToken,
|
|
149
|
+
tailscale: opts.tailscale,
|
|
150
|
+
tailscaleResetOnExit: Boolean(opts.tailscaleResetOnExit),
|
|
151
|
+
reset: Boolean(opts.reset),
|
|
152
|
+
resetScope: opts.resetScope,
|
|
153
|
+
installDaemon,
|
|
154
|
+
daemonRuntime: opts.daemonRuntime,
|
|
155
|
+
skipChannels: Boolean(opts.skipChannels),
|
|
156
|
+
skipSkills: Boolean(opts.skipSkills),
|
|
157
|
+
skipSearch: Boolean(opts.skipSearch),
|
|
158
|
+
skipHealth: Boolean(opts.skipHealth),
|
|
159
|
+
skipUi: Boolean(opts.skipUi),
|
|
160
|
+
nodeManager: opts.nodeManager,
|
|
161
|
+
json: Boolean(opts.json)
|
|
162
|
+
}, defaultRuntime);
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
//#endregion
|
|
168
|
+
export { registerOnboardCommand };
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import "./redact-CtGOTRBK.mjs";
|
|
2
|
+
import "./errors-CbvpN2RP.mjs";
|
|
3
|
+
import "./logger-vRSRu9wD.mjs";
|
|
4
|
+
import "./paths-CNST7z3O.mjs";
|
|
5
|
+
import "./tmp-openclaw-dir-BeWwpCKM.mjs";
|
|
6
|
+
import { r as theme } from "./theme-w86ra_7m.mjs";
|
|
7
|
+
import "./globals-DZFR3wyP.mjs";
|
|
8
|
+
import { m as defaultRuntime } from "./subsystem-yLe4Gjha.mjs";
|
|
9
|
+
import "./ansi-BJ9IOlIp.mjs";
|
|
10
|
+
import "./boolean-Bwxxidw8.mjs";
|
|
11
|
+
import "./env-9fhyzTaG.mjs";
|
|
12
|
+
import "./utils-Dc9DiBqf.mjs";
|
|
13
|
+
import { t as formatDocsLink } from "./links-BNNF54ea.mjs";
|
|
14
|
+
import "./agent-scope-CnAwGoC2.mjs";
|
|
15
|
+
import "./boundary-path-DnlNnNbU.mjs";
|
|
16
|
+
import "./boundary-file-read-BB4JbZzx.mjs";
|
|
17
|
+
import "./logger-DWOgrQoS.mjs";
|
|
18
|
+
import "./exec-DX0zVVG7.mjs";
|
|
19
|
+
import "./openclaw-root-CSfnLaqO.mjs";
|
|
20
|
+
import "./workspace-CoFl73GV.mjs";
|
|
21
|
+
import "./model-selection-BJk_hQeE.mjs";
|
|
22
|
+
import "./io-CDQGJKjg.mjs";
|
|
23
|
+
import "./shell-env-CP5vTYhw.mjs";
|
|
24
|
+
import "./safe-text-Bsdm3bQS.mjs";
|
|
25
|
+
import "./version-Ckv-IbvB.mjs";
|
|
26
|
+
import "./env-substitution-DGlYO8jV.mjs";
|
|
27
|
+
import "./scan-paths-ahOy4FCQ.mjs";
|
|
28
|
+
import "./includes-DcO1JxKG.mjs";
|
|
29
|
+
import "./zod-schema.providers-core-CjdAU1TY.mjs";
|
|
30
|
+
import "./legacy-web-search-B1O8hiGy.mjs";
|
|
31
|
+
import "./schema-validator-BOH34EXk.mjs";
|
|
32
|
+
import "./registry-DBJv0dvl.mjs";
|
|
33
|
+
import "./config-state-kmbzTT63.mjs";
|
|
34
|
+
import "./min-host-version-EA11e8I5.mjs";
|
|
35
|
+
import "./manifest-registry-dO1qi1iI.mjs";
|
|
36
|
+
import "./runtime-guard-CWHkkioa.mjs";
|
|
37
|
+
import "./avatar-policy-uRVtZ7lJ.mjs";
|
|
38
|
+
import "./ip-BtMd9ssR.mjs";
|
|
39
|
+
import "./zod-schema.agent-runtime-BtGT59eP.mjs";
|
|
40
|
+
import "./zod-schema.core-CMT7g7UX.mjs";
|
|
41
|
+
import "./zod-schema.channels-BAG3dUtC.mjs";
|
|
42
|
+
import "./zod-schema.providers-whatsapp-qnpQepaf.mjs";
|
|
43
|
+
import "./config-Bhjk4Vel.mjs";
|
|
44
|
+
import "./process-scoped-map-BmLEe6nP.mjs";
|
|
45
|
+
import "./audit-fs-kb-rv_ZT.mjs";
|
|
46
|
+
import "./shared-VxKfp8Uy.mjs";
|
|
47
|
+
import "./resolve-DI6cKS4v.mjs";
|
|
48
|
+
import "./cli-name-lEyorNIN.mjs";
|
|
49
|
+
import "./command-format-D1DrcTDP.mjs";
|
|
50
|
+
import "./tailnet-Bc7IPWjH.mjs";
|
|
51
|
+
import "./net-OJiOmwY1.mjs";
|
|
52
|
+
import "./credentials-DTsHVnAc.mjs";
|
|
53
|
+
import "./message-channel-DCt8BIP7.mjs";
|
|
54
|
+
import "./store-B0V1qm_-.mjs";
|
|
55
|
+
import "./runtime-a4e8n7tq.mjs";
|
|
56
|
+
import "./registry-9YpVWxKb.mjs";
|
|
57
|
+
import "./plugins-D8oapapr.mjs";
|
|
58
|
+
import "./sessions-CYgBPqrc.mjs";
|
|
59
|
+
import "./paths-CGxgQvpf.mjs";
|
|
60
|
+
import "./types-DoAKcnWC.mjs";
|
|
61
|
+
import "./session-write-lock-DE8KASyZ.mjs";
|
|
62
|
+
import "./json-files-BcpXnc9i.mjs";
|
|
63
|
+
import "./delivery-info-CGNfeMd6.mjs";
|
|
64
|
+
import "./method-scopes-hu-4urbi.mjs";
|
|
65
|
+
import "./call-CcXWxOVG.mjs";
|
|
66
|
+
import "./ws-Dv5Afaxu.mjs";
|
|
67
|
+
import "./control-ui-shared-Dhzx9It_.mjs";
|
|
68
|
+
import "./onboard-helpers-C5GCWoDO.mjs";
|
|
69
|
+
import "./wsl-BW8_A9_i.mjs";
|
|
70
|
+
import "./prompt-style-Dua6SIJh.mjs";
|
|
71
|
+
import "./progress-BxDdsPK3.mjs";
|
|
72
|
+
import "./registry-CFSnIRx_.mjs";
|
|
73
|
+
import "./internal-hooks-VOrTrqjW.mjs";
|
|
74
|
+
import "./providers.runtime-CtdkYDy2.mjs";
|
|
75
|
+
import "./accounts-DCMTPA3m.mjs";
|
|
76
|
+
import "./loader-CYgWRKc6.mjs";
|
|
77
|
+
import "./config-presence-DzY-U322.mjs";
|
|
78
|
+
import "./types-BaXbwBIP.mjs";
|
|
79
|
+
import "./hook-runner-global-z_Icpwvo.mjs";
|
|
80
|
+
import "./session-binding-service-Bmkk4TGJ.mjs";
|
|
81
|
+
import "./conversation-binding-elBCYjlA.mjs";
|
|
82
|
+
import "./sdk-alias-C5qDxQv2.mjs";
|
|
83
|
+
import "./bundle-lsp-DyU7-zol.mjs";
|
|
84
|
+
import "./logging-CcQ-gmqC.mjs";
|
|
85
|
+
import "./status-BWLPyL8Y.mjs";
|
|
86
|
+
import { n as runCommandWithRuntime } from "./cli-utils-DA6vWpDg.mjs";
|
|
87
|
+
import "./note-CaQ2HD-A.mjs";
|
|
88
|
+
import "./clack-prompter-C0PG2vbx.mjs";
|
|
89
|
+
import "./setup.secret-input-DPX4L6ht.mjs";
|
|
90
|
+
import "./setup-DHU6h2yc.mjs";
|
|
91
|
+
import { i as resolveManifestProviderOnboardAuthFlags } from "./provider-auth-choices-DFywK1Pz.mjs";
|
|
92
|
+
import "./provider-wizard-BhAu9Eak.mjs";
|
|
93
|
+
import { n as formatAuthChoiceChoicesForCli } from "./auth-choice-options-wlxI7ZI3.mjs";
|
|
94
|
+
import { n as CORE_ONBOARD_AUTH_FLAGS, t as setupWizardCommand } from "./onboard-CRZ2jxOE.mjs";
|
|
95
|
+
|
|
96
|
+
//#region src/cli/program/register.onboard.ts
|
|
97
|
+
function resolveInstallDaemonFlag(command, opts) {
|
|
98
|
+
if (!command || typeof command !== "object") return;
|
|
99
|
+
const getOptionValueSource = "getOptionValueSource" in command ? command.getOptionValueSource : void 0;
|
|
100
|
+
if (typeof getOptionValueSource !== "function") return;
|
|
101
|
+
if (getOptionValueSource.call(command, "skipDaemon") === "cli") return false;
|
|
102
|
+
if (getOptionValueSource.call(command, "installDaemon") === "cli") return Boolean(opts.installDaemon);
|
|
103
|
+
}
|
|
104
|
+
const AUTH_CHOICE_HELP = formatAuthChoiceChoicesForCli({
|
|
105
|
+
includeLegacyAliases: true,
|
|
106
|
+
includeSkip: true
|
|
107
|
+
});
|
|
108
|
+
const ONBOARD_AUTH_FLAGS = [...CORE_ONBOARD_AUTH_FLAGS, ...resolveManifestProviderOnboardAuthFlags()];
|
|
109
|
+
function pickOnboardProviderAuthOptionValues(opts) {
|
|
110
|
+
return Object.fromEntries(ONBOARD_AUTH_FLAGS.map((flag) => [flag.optionKey, opts[flag.optionKey]]));
|
|
111
|
+
}
|
|
112
|
+
function registerOnboardCommand(program) {
|
|
113
|
+
const command = program.command("onboard").description("Interactive onboarding for the gateway, workspace, and skills").addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/onboard", "docs.openclaw.ai/cli/onboard")}\n`).option("--workspace <dir>", "Agent workspace directory (default: ~/.openclaw/workspace)").option("--reset", "Reset config + credentials + sessions before running onboard (workspace only with --reset-scope full)").option("--reset-scope <scope>", "Reset scope: config|config+creds+sessions|full").option("--non-interactive", "Run without prompts", false).option("--accept-risk", "Acknowledge that agents are powerful and full system access is risky (required for --non-interactive)", false).option("--flow <flow>", "Onboard flow: quickstart|advanced|manual").option("--mode <mode>", "Onboard mode: local|remote").option("--auth-choice <choice>", `Auth: ${AUTH_CHOICE_HELP}`).option("--token-provider <id>", "Token provider id (non-interactive; used with --auth-choice token)").option("--token <token>", "Token value (non-interactive; used with --auth-choice token)").option("--token-profile-id <id>", "Auth profile id (non-interactive; default: <provider>:manual)").option("--token-expires-in <duration>", "Optional token expiry duration (e.g. 365d, 12h)").option("--secret-input-mode <mode>", "API key persistence mode: plaintext|ref (default: plaintext)").option("--cloudflare-ai-gateway-account-id <id>", "Cloudflare Account ID").option("--cloudflare-ai-gateway-gateway-id <id>", "Cloudflare AI Gateway ID");
|
|
114
|
+
for (const providerFlag of ONBOARD_AUTH_FLAGS) command.option(providerFlag.cliOption, providerFlag.description);
|
|
115
|
+
command.option("--custom-base-url <url>", "Custom provider base URL").option("--custom-api-key <key>", "Custom provider API key (optional)").option("--custom-model-id <id>", "Custom provider model ID").option("--custom-provider-id <id>", "Custom provider ID (optional; auto-derived by default)").option("--custom-compatibility <mode>", "Custom provider API compatibility: openai|anthropic (default: openai)").option("--gateway-port <port>", "Gateway port").option("--gateway-bind <mode>", "Gateway bind: loopback|tailnet|lan|auto|custom").option("--gateway-auth <mode>", "Gateway auth: token|password").option("--gateway-token <token>", "Gateway token (token auth)").option("--gateway-token-ref-env <name>", "Gateway token SecretRef env var name (token auth; e.g. OPENCLAW_GATEWAY_TOKEN)").option("--gateway-password <password>", "Gateway password (password auth)").option("--remote-url <url>", "Remote Gateway WebSocket URL").option("--remote-token <token>", "Remote Gateway token (optional)").option("--tailscale <mode>", "Tailscale: off|serve|funnel").option("--tailscale-reset-on-exit", "Reset tailscale serve/funnel on exit").option("--install-daemon", "Install gateway service").option("--no-install-daemon", "Skip gateway service install").option("--skip-daemon", "Skip gateway service install").option("--daemon-runtime <runtime>", "Daemon runtime: node|bun").option("--skip-channels", "Skip channel setup").option("--skip-skills", "Skip skills setup").option("--skip-search", "Skip search provider setup").option("--skip-health", "Skip health check").option("--skip-ui", "Skip Control UI/TUI prompts").option("--node-manager <name>", "Node manager for skills: npm|pnpm|bun").option("--json", "Output JSON summary", false);
|
|
116
|
+
command.action(async (opts, commandRuntime) => {
|
|
117
|
+
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
118
|
+
const installDaemon = resolveInstallDaemonFlag(commandRuntime, { installDaemon: Boolean(opts.installDaemon) });
|
|
119
|
+
const gatewayPort = typeof opts.gatewayPort === "string" ? Number.parseInt(opts.gatewayPort, 10) : void 0;
|
|
120
|
+
const providerAuthOptionValues = pickOnboardProviderAuthOptionValues(opts);
|
|
121
|
+
await setupWizardCommand({
|
|
122
|
+
workspace: opts.workspace,
|
|
123
|
+
nonInteractive: Boolean(opts.nonInteractive),
|
|
124
|
+
acceptRisk: Boolean(opts.acceptRisk),
|
|
125
|
+
flow: opts.flow,
|
|
126
|
+
mode: opts.mode,
|
|
127
|
+
authChoice: opts.authChoice,
|
|
128
|
+
tokenProvider: opts.tokenProvider,
|
|
129
|
+
token: opts.token,
|
|
130
|
+
tokenProfileId: opts.tokenProfileId,
|
|
131
|
+
tokenExpiresIn: opts.tokenExpiresIn,
|
|
132
|
+
secretInputMode: opts.secretInputMode,
|
|
133
|
+
...providerAuthOptionValues,
|
|
134
|
+
cloudflareAiGatewayAccountId: opts.cloudflareAiGatewayAccountId,
|
|
135
|
+
cloudflareAiGatewayGatewayId: opts.cloudflareAiGatewayGatewayId,
|
|
136
|
+
customBaseUrl: opts.customBaseUrl,
|
|
137
|
+
customApiKey: opts.customApiKey,
|
|
138
|
+
customModelId: opts.customModelId,
|
|
139
|
+
customProviderId: opts.customProviderId,
|
|
140
|
+
customCompatibility: opts.customCompatibility,
|
|
141
|
+
gatewayPort: typeof gatewayPort === "number" && Number.isFinite(gatewayPort) ? gatewayPort : void 0,
|
|
142
|
+
gatewayBind: opts.gatewayBind,
|
|
143
|
+
gatewayAuth: opts.gatewayAuth,
|
|
144
|
+
gatewayToken: opts.gatewayToken,
|
|
145
|
+
gatewayTokenRefEnv: opts.gatewayTokenRefEnv,
|
|
146
|
+
gatewayPassword: opts.gatewayPassword,
|
|
147
|
+
remoteUrl: opts.remoteUrl,
|
|
148
|
+
remoteToken: opts.remoteToken,
|
|
149
|
+
tailscale: opts.tailscale,
|
|
150
|
+
tailscaleResetOnExit: Boolean(opts.tailscaleResetOnExit),
|
|
151
|
+
reset: Boolean(opts.reset),
|
|
152
|
+
resetScope: opts.resetScope,
|
|
153
|
+
installDaemon,
|
|
154
|
+
daemonRuntime: opts.daemonRuntime,
|
|
155
|
+
skipChannels: Boolean(opts.skipChannels),
|
|
156
|
+
skipSkills: Boolean(opts.skipSkills),
|
|
157
|
+
skipSearch: Boolean(opts.skipSearch),
|
|
158
|
+
skipHealth: Boolean(opts.skipHealth),
|
|
159
|
+
skipUi: Boolean(opts.skipUi),
|
|
160
|
+
nodeManager: opts.nodeManager,
|
|
161
|
+
json: Boolean(opts.json)
|
|
162
|
+
}, defaultRuntime);
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
//#endregion
|
|
168
|
+
export { registerOnboardCommand };
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import "./redact-CtGOTRBK.mjs";
|
|
2
|
+
import "./errors-CbvpN2RP.mjs";
|
|
3
|
+
import "./logger-vRSRu9wD.mjs";
|
|
4
|
+
import "./paths-CNST7z3O.mjs";
|
|
5
|
+
import "./tmp-openclaw-dir-BeWwpCKM.mjs";
|
|
6
|
+
import { r as theme } from "./theme-w86ra_7m.mjs";
|
|
7
|
+
import "./globals-DZFR3wyP.mjs";
|
|
8
|
+
import { m as defaultRuntime } from "./subsystem-yLe4Gjha.mjs";
|
|
9
|
+
import "./ansi-BJ9IOlIp.mjs";
|
|
10
|
+
import "./boolean-Bwxxidw8.mjs";
|
|
11
|
+
import "./env-9fhyzTaG.mjs";
|
|
12
|
+
import "./utils-Dc9DiBqf.mjs";
|
|
13
|
+
import { t as formatDocsLink } from "./links-BNNF54ea.mjs";
|
|
14
|
+
import "./agent-scope-CnAwGoC2.mjs";
|
|
15
|
+
import "./boundary-path-DnlNnNbU.mjs";
|
|
16
|
+
import "./boundary-file-read-BB4JbZzx.mjs";
|
|
17
|
+
import "./logger-DWOgrQoS.mjs";
|
|
18
|
+
import "./exec-DX0zVVG7.mjs";
|
|
19
|
+
import "./openclaw-root-CSfnLaqO.mjs";
|
|
20
|
+
import "./workspace-CoFl73GV.mjs";
|
|
21
|
+
import "./model-selection-BJk_hQeE.mjs";
|
|
22
|
+
import "./io-CDQGJKjg.mjs";
|
|
23
|
+
import "./shell-env-CP5vTYhw.mjs";
|
|
24
|
+
import "./safe-text-Bsdm3bQS.mjs";
|
|
25
|
+
import "./version-Ckv-IbvB.mjs";
|
|
26
|
+
import "./env-substitution-DGlYO8jV.mjs";
|
|
27
|
+
import "./scan-paths-ahOy4FCQ.mjs";
|
|
28
|
+
import "./includes-DcO1JxKG.mjs";
|
|
29
|
+
import "./zod-schema.providers-core-CjdAU1TY.mjs";
|
|
30
|
+
import "./legacy-web-search-B1O8hiGy.mjs";
|
|
31
|
+
import "./schema-validator-BOH34EXk.mjs";
|
|
32
|
+
import "./registry-DBJv0dvl.mjs";
|
|
33
|
+
import "./config-state-kmbzTT63.mjs";
|
|
34
|
+
import "./min-host-version-EA11e8I5.mjs";
|
|
35
|
+
import "./manifest-registry-dO1qi1iI.mjs";
|
|
36
|
+
import "./runtime-guard-CWHkkioa.mjs";
|
|
37
|
+
import "./avatar-policy-uRVtZ7lJ.mjs";
|
|
38
|
+
import "./ip-BtMd9ssR.mjs";
|
|
39
|
+
import "./zod-schema.agent-runtime-BtGT59eP.mjs";
|
|
40
|
+
import "./zod-schema.core-CMT7g7UX.mjs";
|
|
41
|
+
import "./zod-schema.channels-BAG3dUtC.mjs";
|
|
42
|
+
import "./zod-schema.providers-whatsapp-qnpQepaf.mjs";
|
|
43
|
+
import "./config-Bhjk4Vel.mjs";
|
|
44
|
+
import "./process-scoped-map-BmLEe6nP.mjs";
|
|
45
|
+
import "./audit-fs-kb-rv_ZT.mjs";
|
|
46
|
+
import "./shared-VxKfp8Uy.mjs";
|
|
47
|
+
import "./resolve-DI6cKS4v.mjs";
|
|
48
|
+
import "./cli-name-lEyorNIN.mjs";
|
|
49
|
+
import "./command-format-D1DrcTDP.mjs";
|
|
50
|
+
import "./tailnet-Bc7IPWjH.mjs";
|
|
51
|
+
import "./net-OJiOmwY1.mjs";
|
|
52
|
+
import "./credentials-DTsHVnAc.mjs";
|
|
53
|
+
import "./message-channel-DCt8BIP7.mjs";
|
|
54
|
+
import "./store-B0V1qm_-.mjs";
|
|
55
|
+
import "./runtime-a4e8n7tq.mjs";
|
|
56
|
+
import "./registry-9YpVWxKb.mjs";
|
|
57
|
+
import "./plugins-D8oapapr.mjs";
|
|
58
|
+
import "./sessions-CYgBPqrc.mjs";
|
|
59
|
+
import "./paths-CGxgQvpf.mjs";
|
|
60
|
+
import "./types-DoAKcnWC.mjs";
|
|
61
|
+
import "./session-write-lock-DE8KASyZ.mjs";
|
|
62
|
+
import "./json-files-BcpXnc9i.mjs";
|
|
63
|
+
import "./delivery-info-CGNfeMd6.mjs";
|
|
64
|
+
import "./method-scopes-hu-4urbi.mjs";
|
|
65
|
+
import "./call-CcXWxOVG.mjs";
|
|
66
|
+
import "./ws-Dv5Afaxu.mjs";
|
|
67
|
+
import "./control-ui-shared-Dhzx9It_.mjs";
|
|
68
|
+
import "./onboard-helpers-C5GCWoDO.mjs";
|
|
69
|
+
import "./wsl-BW8_A9_i.mjs";
|
|
70
|
+
import "./prompt-style-Dua6SIJh.mjs";
|
|
71
|
+
import "./progress-BxDdsPK3.mjs";
|
|
72
|
+
import "./registry-CFSnIRx_.mjs";
|
|
73
|
+
import "./internal-hooks-VOrTrqjW.mjs";
|
|
74
|
+
import "./providers.runtime-CtdkYDy2.mjs";
|
|
75
|
+
import "./accounts-DCMTPA3m.mjs";
|
|
76
|
+
import "./loader-CYgWRKc6.mjs";
|
|
77
|
+
import "./config-presence-DzY-U322.mjs";
|
|
78
|
+
import "./types-BaXbwBIP.mjs";
|
|
79
|
+
import "./hook-runner-global-z_Icpwvo.mjs";
|
|
80
|
+
import "./session-binding-service-Bmkk4TGJ.mjs";
|
|
81
|
+
import "./conversation-binding-elBCYjlA.mjs";
|
|
82
|
+
import "./sdk-alias-C5qDxQv2.mjs";
|
|
83
|
+
import "./bundle-lsp-DyU7-zol.mjs";
|
|
84
|
+
import "./logging-CcQ-gmqC.mjs";
|
|
85
|
+
import "./status-BWLPyL8Y.mjs";
|
|
86
|
+
import { n as runCommandWithRuntime } from "./cli-utils-DA6vWpDg.mjs";
|
|
87
|
+
import "./note-CaQ2HD-A.mjs";
|
|
88
|
+
import "./clack-prompter-C0PG2vbx.mjs";
|
|
89
|
+
import "./setup.secret-input-DPX4L6ht.mjs";
|
|
90
|
+
import "./setup-Ddj3KzQ7.mjs";
|
|
91
|
+
import { i as resolveManifestProviderOnboardAuthFlags } from "./provider-auth-choices-DFywK1Pz.mjs";
|
|
92
|
+
import "./provider-wizard-BhAu9Eak.mjs";
|
|
93
|
+
import { n as formatAuthChoiceChoicesForCli } from "./auth-choice-options-wlxI7ZI3.mjs";
|
|
94
|
+
import { n as CORE_ONBOARD_AUTH_FLAGS, t as setupWizardCommand } from "./onboard-Y9qZW5yw.mjs";
|
|
95
|
+
|
|
96
|
+
//#region src/cli/program/register.onboard.ts
|
|
97
|
+
function resolveInstallDaemonFlag(command, opts) {
|
|
98
|
+
if (!command || typeof command !== "object") return;
|
|
99
|
+
const getOptionValueSource = "getOptionValueSource" in command ? command.getOptionValueSource : void 0;
|
|
100
|
+
if (typeof getOptionValueSource !== "function") return;
|
|
101
|
+
if (getOptionValueSource.call(command, "skipDaemon") === "cli") return false;
|
|
102
|
+
if (getOptionValueSource.call(command, "installDaemon") === "cli") return Boolean(opts.installDaemon);
|
|
103
|
+
}
|
|
104
|
+
const AUTH_CHOICE_HELP = formatAuthChoiceChoicesForCli({
|
|
105
|
+
includeLegacyAliases: true,
|
|
106
|
+
includeSkip: true
|
|
107
|
+
});
|
|
108
|
+
const ONBOARD_AUTH_FLAGS = [...CORE_ONBOARD_AUTH_FLAGS, ...resolveManifestProviderOnboardAuthFlags()];
|
|
109
|
+
function pickOnboardProviderAuthOptionValues(opts) {
|
|
110
|
+
return Object.fromEntries(ONBOARD_AUTH_FLAGS.map((flag) => [flag.optionKey, opts[flag.optionKey]]));
|
|
111
|
+
}
|
|
112
|
+
function registerOnboardCommand(program) {
|
|
113
|
+
const command = program.command("onboard").description("Interactive onboarding for the gateway, workspace, and skills").addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/onboard", "docs.openclaw.ai/cli/onboard")}\n`).option("--workspace <dir>", "Agent workspace directory (default: ~/.openclaw/workspace)").option("--reset", "Reset config + credentials + sessions before running onboard (workspace only with --reset-scope full)").option("--reset-scope <scope>", "Reset scope: config|config+creds+sessions|full").option("--non-interactive", "Run without prompts", false).option("--accept-risk", "Acknowledge that agents are powerful and full system access is risky (required for --non-interactive)", false).option("--flow <flow>", "Onboard flow: quickstart|advanced|manual").option("--mode <mode>", "Onboard mode: local|remote").option("--auth-choice <choice>", `Auth: ${AUTH_CHOICE_HELP}`).option("--token-provider <id>", "Token provider id (non-interactive; used with --auth-choice token)").option("--token <token>", "Token value (non-interactive; used with --auth-choice token)").option("--token-profile-id <id>", "Auth profile id (non-interactive; default: <provider>:manual)").option("--token-expires-in <duration>", "Optional token expiry duration (e.g. 365d, 12h)").option("--secret-input-mode <mode>", "API key persistence mode: plaintext|ref (default: plaintext)").option("--cloudflare-ai-gateway-account-id <id>", "Cloudflare Account ID").option("--cloudflare-ai-gateway-gateway-id <id>", "Cloudflare AI Gateway ID");
|
|
114
|
+
for (const providerFlag of ONBOARD_AUTH_FLAGS) command.option(providerFlag.cliOption, providerFlag.description);
|
|
115
|
+
command.option("--custom-base-url <url>", "Custom provider base URL").option("--custom-api-key <key>", "Custom provider API key (optional)").option("--custom-model-id <id>", "Custom provider model ID").option("--custom-provider-id <id>", "Custom provider ID (optional; auto-derived by default)").option("--custom-compatibility <mode>", "Custom provider API compatibility: openai|anthropic (default: openai)").option("--gateway-port <port>", "Gateway port").option("--gateway-bind <mode>", "Gateway bind: loopback|tailnet|lan|auto|custom").option("--gateway-auth <mode>", "Gateway auth: token|password").option("--gateway-token <token>", "Gateway token (token auth)").option("--gateway-token-ref-env <name>", "Gateway token SecretRef env var name (token auth; e.g. OPENCLAW_GATEWAY_TOKEN)").option("--gateway-password <password>", "Gateway password (password auth)").option("--remote-url <url>", "Remote Gateway WebSocket URL").option("--remote-token <token>", "Remote Gateway token (optional)").option("--tailscale <mode>", "Tailscale: off|serve|funnel").option("--tailscale-reset-on-exit", "Reset tailscale serve/funnel on exit").option("--install-daemon", "Install gateway service").option("--no-install-daemon", "Skip gateway service install").option("--skip-daemon", "Skip gateway service install").option("--daemon-runtime <runtime>", "Daemon runtime: node|bun").option("--skip-channels", "Skip channel setup").option("--skip-skills", "Skip skills setup").option("--skip-search", "Skip search provider setup").option("--skip-health", "Skip health check").option("--skip-ui", "Skip Control UI/TUI prompts").option("--node-manager <name>", "Node manager for skills: npm|pnpm|bun").option("--json", "Output JSON summary", false);
|
|
116
|
+
command.action(async (opts, commandRuntime) => {
|
|
117
|
+
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
118
|
+
const installDaemon = resolveInstallDaemonFlag(commandRuntime, { installDaemon: Boolean(opts.installDaemon) });
|
|
119
|
+
const gatewayPort = typeof opts.gatewayPort === "string" ? Number.parseInt(opts.gatewayPort, 10) : void 0;
|
|
120
|
+
const providerAuthOptionValues = pickOnboardProviderAuthOptionValues(opts);
|
|
121
|
+
await setupWizardCommand({
|
|
122
|
+
workspace: opts.workspace,
|
|
123
|
+
nonInteractive: Boolean(opts.nonInteractive),
|
|
124
|
+
acceptRisk: Boolean(opts.acceptRisk),
|
|
125
|
+
flow: opts.flow,
|
|
126
|
+
mode: opts.mode,
|
|
127
|
+
authChoice: opts.authChoice,
|
|
128
|
+
tokenProvider: opts.tokenProvider,
|
|
129
|
+
token: opts.token,
|
|
130
|
+
tokenProfileId: opts.tokenProfileId,
|
|
131
|
+
tokenExpiresIn: opts.tokenExpiresIn,
|
|
132
|
+
secretInputMode: opts.secretInputMode,
|
|
133
|
+
...providerAuthOptionValues,
|
|
134
|
+
cloudflareAiGatewayAccountId: opts.cloudflareAiGatewayAccountId,
|
|
135
|
+
cloudflareAiGatewayGatewayId: opts.cloudflareAiGatewayGatewayId,
|
|
136
|
+
customBaseUrl: opts.customBaseUrl,
|
|
137
|
+
customApiKey: opts.customApiKey,
|
|
138
|
+
customModelId: opts.customModelId,
|
|
139
|
+
customProviderId: opts.customProviderId,
|
|
140
|
+
customCompatibility: opts.customCompatibility,
|
|
141
|
+
gatewayPort: typeof gatewayPort === "number" && Number.isFinite(gatewayPort) ? gatewayPort : void 0,
|
|
142
|
+
gatewayBind: opts.gatewayBind,
|
|
143
|
+
gatewayAuth: opts.gatewayAuth,
|
|
144
|
+
gatewayToken: opts.gatewayToken,
|
|
145
|
+
gatewayTokenRefEnv: opts.gatewayTokenRefEnv,
|
|
146
|
+
gatewayPassword: opts.gatewayPassword,
|
|
147
|
+
remoteUrl: opts.remoteUrl,
|
|
148
|
+
remoteToken: opts.remoteToken,
|
|
149
|
+
tailscale: opts.tailscale,
|
|
150
|
+
tailscaleResetOnExit: Boolean(opts.tailscaleResetOnExit),
|
|
151
|
+
reset: Boolean(opts.reset),
|
|
152
|
+
resetScope: opts.resetScope,
|
|
153
|
+
installDaemon,
|
|
154
|
+
daemonRuntime: opts.daemonRuntime,
|
|
155
|
+
skipChannels: Boolean(opts.skipChannels),
|
|
156
|
+
skipSkills: Boolean(opts.skipSkills),
|
|
157
|
+
skipSearch: Boolean(opts.skipSearch),
|
|
158
|
+
skipHealth: Boolean(opts.skipHealth),
|
|
159
|
+
skipUi: Boolean(opts.skipUi),
|
|
160
|
+
nodeManager: opts.nodeManager,
|
|
161
|
+
json: Boolean(opts.json)
|
|
162
|
+
}, defaultRuntime);
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
//#endregion
|
|
168
|
+
export { registerOnboardCommand };
|