Skip to content

feat(system-agent): guide gateway configuration in Ask OpenClaw - #115363

Merged
steipete merged 6 commits into
mainfrom
steipete/custodian-gateway-guided-setup
Jul 28, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/custodian-gateway-guided-setup

Conversation

@steipete

@steipete steipete commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Gateway settings (port, bind, auth, Tailscale exposure) were reachable from Ask OpenClaw only as raw approval-gated config set gateway.* writes — no guided flow, no safety rails — while onboarding has a full wizard for exactly this.

Why This Change Was Made

Adds configure gateway as a hosted in-chat wizard reusing the REAL onboarding step (configureGatewayForSetup) through the shared hosted-wizard seam (#115130 pattern): steps mirror to option cards, credentials are masked on the web surface, the inference-authority guard runs before the write, completion audits as gateway.setup and re-validates config. Safety semantics are explicit: the write carries afterWrite: { mode: "none" } so the config watcher never hot-applies a change that could sever the very connection the chat runs through — the wizard saves config only and tells the user to restart (restart gateway in chat; openclaw gateway restart after the terminal handoff). On the web surface the wizard warns up front that a new port/bind/credential may disconnect the app and require signing in again — and the warning is skipped when the wizard refuses (e.g. remote mode). CLI chats refuse visible secrets and hand off to the masked terminal wizard via open gateway wizard (new open-setup target gateway). Remote gateway mode stays guidance-only by design: the agent explains local-vs-remote and points at openclaw onboard / openclaw configure; the hosted wizard manages the local gateway only. Daemon install, Tailscale serve/funnel execution, and trusted-proxy auth (clack-bound, listed as follow-up) remain out of scope.

User Impact

"Configure the gateway" is now a conversation in Settings > Ask OpenClaw (or its dock): guided port/bind/auth/Tailscale steps with masked credentials, honest restart guidance, and no self-lockout surprises. Terminal setup flows unchanged.

Evidence

  • Focused tests: 92 chat-engine unit (hosted flow commit + audit + advisory restart, gateway-surface warning incl. refusal-skip, credential redaction, write-boundary authority recheck, remote-mode refusal), tui-backend 9 (terminal handoff writes behind the guard, prints openclaw gateway restart), tool 15, setup.shared 10 (additive afterWrite default preserved).
  • Autoreview (Codex gpt-5.6-sol, high): clean — "patch is correct (0.87)" after fixing its one finding (terminal handoff previously printed the chat-only restart gateway command).
  • Post-rebase proof at 268de7ae43b6b19a5c07f614d049b19a61f5616b: node scripts/run-vitest.mjs src/system-agent/chat-engine.test.ts src/system-agent/operations-setup-flows.test.ts src/system-agent/tui-backend.test.ts src/agents/tools/system-agent-tool.test.ts src/system-agent/assistant.test.ts src/wizard/setup.shared.test.ts passed 4 Vitest shards / 6 files / 126 tests in 651.44s; git diff --check passed. Exact-head CI run 30387962601 is green at a13d4b93e3533080109cc2e6821b53829d0afdca, including openclaw/ci-gate; OPENCLAW_TESTBOX=1 scripts/pr prepare-run 115363 accepted the hosted exact-head gates. No ClawSweeper review comment or Rank-up moves were present at landing review time.

@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Jul 28, 2026
@steipete
steipete marked this pull request as ready for review July 28, 2026 18:17
@openclaw-barnacle openclaw-barnacle Bot added size: L maintainer Maintainer-authored PR labels Jul 28, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for a13d4b93e3533080109cc2e6821b53829d0afdca:

  • Focused post-rebase proof: node scripts/run-vitest.mjs src/system-agent/chat-engine.test.ts src/system-agent/operations-setup-flows.test.ts src/system-agent/tui-backend.test.ts src/agents/tools/system-agent-tool.test.ts src/system-agent/assistant.test.ts src/wizard/setup.shared.test.ts — 126 tests passed across four shards (92 unit, 9 TUI, 15 tool, 10 shared); git diff --check passed.
  • Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/30387962601 — green, including openclaw/ci-gate.
  • Autoreview: clean after the accepted terminal restart-command correction.
  • ClawSweeper: no review comment or Rank-up moves: list was present when the landing review was completed, so there were no moves to apply or skip.
  • Review artifacts: READY FOR /prepare-pr, zero findings, issueValidation.status=valid; guard and artifact validation passed.
  • Prepare: OPENCLAW_TESTBOX=1 scripts/pr prepare-run 115363 passed using gates_mode=hosted_exact_or_recent_parent; prep head and PR head are identical. No separate Testbox lease/run ID was created.

Known proof gap: no separate live browser walkthrough was run; hosted option-card, credential-redaction, refusal, guarded-write, completion-audit, and restart-guidance behavior are covered by focused tests and exact-head CI.

@steipete
steipete merged commit 792f276 into main Jul 28, 2026
126 checks passed
@steipete
steipete deleted the steipete/custodian-gateway-guided-setup branch July 28, 2026 19:02
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to christian-lallo/openclaw that referenced this pull request Jul 28, 2026
* origin/main: (61 commits)
  perf(ui): debounce event-driven session list refreshes and right-size child paging (openclaw#115374)
  feat(talk): support GPT-Live realtime voice over ChatGPT OAuth (openclaw#115226)
  feat(system-agent): guide gateway configuration in Ask OpenClaw (openclaw#115363)
  fix(agents): make overflow recovery append-only via branch-and-reappend (openclaw#115271) (openclaw#115310)
  fix(macos): bound websocket ping so a dropped pong cannot orphan its continuation (openclaw#115362)
  fix(codex): isolate native hook relay startup (openclaw#115078)
  fix(ci): stop reviving superseded pull request workflows (openclaw#115378)
  feat(openshell): add workspace selection (openclaw#114952)
  fix(skills): persist workshop apply reason; correct Skill Workshop docs (openclaw#114471)
  fix: agent stops replying when a session transcript has no header row (openclaw#115080)
  perf(usage): stale-while-revalidate caches for usage.status and sessions.usage (openclaw#115369)
  fix(discord): reject invalid UTF-8 probe responses (openclaw#111734)
  feat(gateway): add memory.search operator method (openclaw#115346)
  fix(android): keep welcome action reachable with large text (openclaw#111747)
  fix(gateway): validate doctor memory agent ids (openclaw#115365)
  refactor: harden shell completion and shard Control UI E2E (openclaw#115332)
  fix(ui): anchor the thread branches menu to its trigger button (openclaw#115352)
  perf(sessions): incremental snapshot revalidation and shallow list projections (openclaw#115359)
  refactor(sessions): consolidate entry state (openclaw#115299)
  feat(ui): swap three plain Lobsterdex palettes for balloon, ascii, and portal (openclaw#115308)
  ...
vincentkoc added a commit that referenced this pull request Jul 28, 2026
…etwork-none

* origin/main: (74 commits)
  fix(ui): make Control UI ownership and permissions reliable (#115364)
  feat(system-agent): host memory import in Ask OpenClaw (#115376)
  fix(chat): preserve literal Markdown image examples (#113904)
  refactor(chat): keep web and terminal sessions synchronized (#115377)
  fix(ui): order model picker by provider strength (#115380)
  feat(ui): make Memory settings a destination page with live overview and dreams (#115383)
  docs(security): fix warning line wrap (#115388)
  fix(memory-core): avoid cubic MMR similarity rescans (#113359)
  fix(discord): preserve code-leading reasoning chunks (#103166)
  fix(slack): protect outbound hooks from previews
  fix(ui): keep explicit navigation ahead of chat canonicalization (#115366)
  fix(exec): safely cancel pending node approvals (#115373)
  fix: make Code Mode reliable across gateway and provider lifecycles (#115379)
  perf(ui): debounce event-driven session list refreshes and right-size child paging (#115374)
  feat(talk): support GPT-Live realtime voice over ChatGPT OAuth (#115226)
  feat(system-agent): guide gateway configuration in Ask OpenClaw (#115363)
  fix(agents): make overflow recovery append-only via branch-and-reappend (#115271) (#115310)
  fix(macos): bound websocket ping so a dropped pong cannot orphan its continuation (#115362)
  fix(codex): isolate native hook relay startup (#115078)
  fix(ci): stop reviving superseded pull request workflows (#115378)
  ...

# Conflicts:
#	CHANGELOG.md
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 29, 2026
…claw#115363)

* feat(system-agent): add guided gateway configuration

* test(system-agent): cover guided gateway setup

* fix(system-agent): skip lockout warning when the gateway wizard refuses

* fix(system-agent): print the shell restart command after terminal gateway handoff

* test(system-agent): satisfy prefer-const on the pinned base config

* style(system-agent): reformat tui-backend handoff messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant