You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: require explicit third-party software acceptance before onboarding (#1290)
## Summary
- show a third-party software notice before `install.sh` launches
onboarding and before direct `nemoclaw onboard`
- require explicit `yes` in interactive flows and fail immediately on
any other answer
- require explicit non-interactive acceptance via
`--yes-i-accept-third-party-software` or
`NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE=1`
- link users to the official OpenClaw security guidance before
continuing
- render the security URL as a clickable terminal hyperlink where OSC 8
is supported, while still printing the raw URL
- implement the new notice capability in TypeScript under `src/lib`
## Details
This is aimed at issue #1213, but the acceptance behavior is stricter
than the original issue text.
The notice is specifically about third-party software liability and
OpenClaw usage, not NemoClaw terms. The acceptance flag and env var are
named accordingly.
The current notice is intentionally formatted for standard terminal
width and uses the approved wording in short, non-wrapping lines.
Reference shown to users:
- https://docs.openclaw.ai/gateway/security
Credit:
- builds on prior overlapping notice work in #1222 by @13ernkastel, but
extends it to the current acceptance model, non-interactive enforcement,
and the shared `install.sh` + `nemoclaw onboard` flow
## Validation
- `npm run build:cli`
- `npx vitest run test/usage-notice.test.js test/cli.test.js
test/install-preflight.test.js`
- `npx eslint bin/lib/usage-notice.js test/usage-notice.test.js`
- `npx tsc -p jsconfig.json --noEmit`
## Note
The full local git hook suite is currently blocked in this environment
by an unrelated `src/lib/preflight.test.ts` localhost listen failure
(`EPERM` on `127.0.0.1`). I did not change that area in this branch.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Onboarding and installer now require explicit acceptance of
third‑party software terms before proceeding; onboarding exits early if
consent is not given.
* Interactive mode displays a bundled usage notice and prompts users to
type "yes"; acceptance is persisted per user.
* Non‑interactive installs allow scripted acceptance via a new explicit
acceptance mechanism.
* **Documentation**
* CLI help, installer messages, and docs updated to document the new
non‑interactive acceptance option and TTY guidance.
* **Tests**
* Added and updated tests and e2e scripts to cover acceptance flows and
enforcement.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
printf" --non-interactive Skip prompts (uses env vars / defaults)\n"
220
+
printf" --yes-i-accept-third-party-software Accept the third-party software notice in non-interactive mode\n"
220
221
printf" --version, -v Print installer version and exit\n"
221
222
printf" --help, -h Show this help message and exit\n\n"
222
223
printf"${C_DIM}Environment:${C_RESET}\n"
223
224
printf" NVIDIA_API_KEY API key (skips credential prompt)\n"
225
+
printf" NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE=1 Same as --yes-i-accept-third-party-software\n"
224
226
printf" NEMOCLAW_NON_INTERACTIVE=1 Same as --non-interactive\n"
225
227
printf" NEMOCLAW_SANDBOX_NAME Sandbox name to create/use\n"
226
228
printf" NEMOCLAW_RECREATE_SANDBOX=1 Recreate an existing sandbox\n"
@@ -237,6 +239,27 @@ usage() {
237
239
printf"\n"
238
240
}
239
241
242
+
show_usage_notice() {
243
+
local -a notice_cmd=(node "${SCRIPT_DIR}/bin/lib/usage-notice.js")
244
+
if [ "${NON_INTERACTIVE:-}"="1" ];then
245
+
notice_cmd+=(--non-interactive)
246
+
if [ "${ACCEPT_THIRD_PARTY_SOFTWARE:-}"="1" ];then
247
+
notice_cmd+=(--yes-i-accept-third-party-software)
248
+
fi
249
+
"${notice_cmd[@]}"
250
+
elif [ -t 0 ];then
251
+
"${notice_cmd[@]}"
252
+
elifexec3</dev/tty;then
253
+
info "Installer stdin is piped; attaching the usage notice to /dev/tty…"
254
+
local status=0
255
+
"${notice_cmd[@]}"<&3 || status=$?
256
+
exec3<&-
257
+
return"$status"
258
+
else
259
+
error "Interactive third-party software acceptance requires a TTY. Re-run in a terminal or set NEMOCLAW_NON_INTERACTIVE=1 with --yes-i-accept-third-party-software."
260
+
fi
261
+
}
262
+
240
263
# spin "label" cmd [args...]
241
264
# Runs a command in the background, showing a braille spinner until it exits.
242
265
# Stdout/stderr are captured; dumped only on failure.
0 commit comments