Skip to content

feat(onboard): streamline setup with agent-assisted configuration#93265

Draft
fuller-stack-dev wants to merge 230 commits into
openclaw:mainfrom
fuller-stack-dev:codex/agent-assisted-onboarding-latest
Draft

feat(onboard): streamline setup with agent-assisted configuration#93265
fuller-stack-dev wants to merge 230 commits into
openclaw:mainfrom
fuller-stack-dev:codex/agent-assisted-onboarding-latest

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Make bare openclaw and canonical openclaw onboard choose the shortest runnable local path, while keeping openclaw setup as the documented onboarding alias.
  • Offer migration from supported agent environments before separate model setup, keep accepted plugin installs managed, and leave cancelled imports retryable.
  • Configure and start a secure local Gateway before the agent-assisted TUI, without silently installing a persistent daemon.
  • Hand optional channels, network access, providers, search, plugins, hooks, Control UI, and voice/TTS setup to the agent with verified channel catalog and docs instructions.
  • Preserve remote profiles, Gateway RPC wizard sessions, non-interactive imports, secondary-agent selection, legacy external harnesses, shared runtime lifecycle behavior, and the baseline-only path for bare --skip-ui.

Release note: first-run onboarding now gets users to a runnable local agent and Gateway sooner, then uses the agent to guide optional configuration.

Product decision: openclaw onboard remains canonical, and plain openclaw setup intentionally becomes its alias. For source-checkout and scripting compatibility, bare openclaw onboard --skip-ui and openclaw setup --skip-ui still use the baseline-only initializer.

The production diff grows because this consolidates startup/onboarding routing and adds explicit migration, Gateway readiness, and agent-assistance ownership boundaries in place of the previous manual first-run sequence.

Verification

  • node scripts/run-vitest.mjs src/commands/setup.test.ts src/cli/program/register.setup.test.ts src/cli/program/register.onboard.test.ts (23 tests)
  • node scripts/run-vitest.mjs src/commands/setup.test.ts src/cli/program/register.setup.test.ts src/cli/program/register.onboard.test.ts src/wizard/setup.test.ts src/wizard/setup.assisted.test.ts src/wizard/setup.gateway-config.test.ts src/commands/onboard-non-interactive.gateway.test.ts src/cli/run-main.exit.test.ts src/cli/run-main.test.ts (255 tests)
  • node scripts/run-vitest.mjs src/cli/run-main.exit.test.ts src/wizard/setup.assisted.test.ts (128 tests)
  • Focused oxlint on repaired setup/onboard sources and tests
  • oxfmt --check on all repaired sources, tests, and docs
  • Final-head Azure Crabbox check:changed, full build, docs:check-mdx, and docs:check-links: run_8268c7ee7470
  • Trusted autoreview findings addressed: missing TTY flags no longer trigger local readiness probes, and external harnesses without checkReadiness require proven provider auth
  • Earlier changed-surface run: 501 tests across 9 Vitest shards
  • node scripts/run-tsgo.mjs -p tsconfig.plugin-sdk.dts.json --declaration true
  • pnpm plugin-sdk:api:check
  • Fresh assisted-onboarding Azure Linux Crabbox Docker E2E: run_ac8f1cd2c67c

Real behavior proof

Behavior addressed: Fresh OpenClaw users reach a runnable local agent and Gateway through migration-first or minimal model setup, then continue optional setup with the agent.

Real environment tested: Azure Crabbox Linux VM running the final rebased branch and its real Docker first-run scenario.

Exact steps or command run after this patch: pnpm crabbox:run -- --provider azure --target linux --slug onboarding-pr-final --timing-json --stop-after always --shell -- "pnpm test:docker:crestodian-first-run"

Evidence after fix: Crabbox run and logs

Observed result after fix: The image built, the empty-home first-run diagnostic completed, Crestodian first-run Docker E2E reported passed, and the run exited 0.

Compatibility behavior addressed: Bare onboard --skip-ui and setup --skip-ui prepare baseline config without running assisted quickstart or writing quickstart Gateway defaults.

Exact compatibility commands run after this patch: With isolated HOME, OPENCLAW_STATE_DIR, and OPENCLAW_CONFIG_PATH, run node scripts/run-node.mjs onboard --skip-ui and node scripts/run-node.mjs setup --skip-ui.

Observed compatibility result after fix: Both source CLI commands exited 0 and wrote only agents.defaults.workspace plus gateway.mode=local; no Gateway auth, port, bind, Tailscale, or Control UI defaults were present.

What was not tested: Live third-party channel/provider credentials and persistent daemon installation on every supported operating system.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling extensions: codex extensions: copilot size: XL proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 15, 2026
@clawsweeper

clawsweeper Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 15, 2026, 10:25 PM ET / July 16, 2026, 02:25 UTC.

Summary
Adds label and validated official docsPath fields to channels list --json, extracts installed-plugin record matching for channel and manifest reuse, and tightens official-install provenance checks.

PR surface: Source +104, Tests +508, Docs +2. Total +614 across 12 files.

Reproducibility: not applicable. the remaining patch adds a new CLI metadata contract and changes trusted metadata consumption rather than fixing a reported failing current-main behavior.

Review metrics: 3 noteworthy metrics.

  • CLI JSON contract: 2 fields added. Automation may begin depending on stable label and conditional verified docsPath output.
  • Trust consumers: 1 existing, 1 added. Manifest loading already consumes official-install trust; this PR adds channel catalog metadata as a second consumer.
  • Path trust rule: 1 route tightened. Official trust no longer accepts reverse containment through a path outside the current install output.

Stored data model
Persistent data-model change detected: vector/embedding metadata: docs/cli/channels.md, vector/embedding metadata: src/channels/plugins/catalog.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • [P1] Tightening current-main install-path acceptance could stop unusual installations that relied on reverse parent-path containment from being classified as trusted official installs.
  • [P1] Channel catalog metadata becomes an additional permanent consumer of the official-plugin trust boundary, allowing verified installed channels to inherit repository-owned labels and documentation paths.
  • [P1] The branch is behind current main, so existing green checks do not prove that the eventual refreshed three-way merge preserves the reviewed trust invariant.

Maintainer options:

  1. Approve and refresh shared trust (recommended)
    Confirm the provenance contract, rebase onto current main, and review the exact merged predicate before landing.
  2. Limit installed metadata inheritance
    Remove installed-plugin catalog relinking while retaining labels and documentation paths for repository-owned rows.
  3. Split or pause the residual work
    Separate the JSON contract from trust-policy changes, or close the draft if owners do not want the additional trust consumer.

Next step before merge

  • [P2] The next action is owner approval of the permanent trust-policy change and review of the refreshed exact merge result; no mechanical repair is identified.

Maintainer decision needed

  • Question: Should the installed official-plugin trust predicate be tightened and shared with the channel catalog so verified installed channels inherit repository-owned labels and documentation paths?
  • Rationale: The implementation is fail-closed, but changing accepted path relationships and adding another trusted metadata consumer are permanent security and compatibility policy choices that code review alone cannot authorize.
  • Likely owner: vincentkoc — The current-main trust implementation originates in their recent merged work, making them the strongest code-boundary owner for confirming semantic compatibility.
  • Options:
    • Approve strict shared trust (recommended): Keep the tighter current-install-path predicate and authorize channel metadata only after all identity, ledger, source, and path checks pass.
    • Keep manifest-only trust: Expose metadata only for bundled and catalog-only entries without relinking installed plugins to official catalog rows.
    • Split the policy changes: Separate the public JSON contract from provenance tightening and the new trusted consumer for independent review.

Security
Cleared: The patch tightens current-install path binding and exposes only repository-owned metadata after package, plugin-ID, ledger, source, and path checks; no concrete security defect was found.

Review details

Best possible solution:

Rebase the focused remainder, preserve the stricter current-install-path rule and negative trust tests, then land only after plugin and channel owners approve repository metadata inheritance for verified installed official channels.

Do we have a high-confidence way to reproduce the issue?

Not applicable: the remaining patch adds a new CLI metadata contract and changes trusted metadata consumption rather than fixing a reported failing current-main behavior.

Is this the best way to solve the issue?

Yes, subject to owner approval: one stricter shared predicate consuming repository-owned metadata is safer and more maintainable than plugin-supplied URLs or duplicated provenance logic.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 08ecf63bb608.

Label changes

Label justifications:

  • P2: This is a bounded public CLI and plugin-trust improvement with meaningful but limited compatibility and security-policy impact.
  • merge-risk: 🚨 compatibility: The PR adds public JSON fields and tightens installed-plugin path classification used by existing plugin flows.
  • merge-risk: 🚨 security-boundary: The PR changes official-install path trust and authorizes channel metadata as an additional trusted consumer.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the linked Crabbox build, Docker first-run, and isolated CLI runs remain strong supplemental proof.
Evidence reviewed

PR surface:

Source +104, Tests +508, Docs +2. Total +614 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 5 230 126 +104
Tests 6 535 27 +508
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 767 153 +614

What I checked:

  • Residual branch scope: The live 12-file remainder is focused on channel JSON metadata, official channel catalog resolution, installed-plugin provenance, and regression coverage; the historical onboarding implementation is no longer the substantive diff. (github.com) (src/commands/channels/list.ts:294, 8cd200e49fd3)
  • Fail-closed provenance predicate: Official trust requires a global or config candidate, current install-record path containment, matching official package and plugin identity, and an npm or explicitly official ClawHub source. (src/plugins/installed-plugin-record-match.ts:70, 8cd200e49fd3)
  • Repository-owned documentation metadata: The JSON output resolves verified installed official channels back to repository catalog metadata and validates a root-relative path under the official documentation origin rather than emitting plugin-supplied URLs. (src/commands/channels/list.ts:149, 8cd200e49fd3)
  • Current-main history: Current main's inline installed-record and official-package trust logic dates to commit 80d44bf; this PR extracts that behavior and tightens its path rule. (github.com) (src/plugins/manifest-registry.ts:771, 80d44bf000be)
  • Negative and positive trust coverage: Tests cover trusted npm and official ClawHub records, config-origin installs, mismatched paths, packages and plugin IDs, community installs, invalid documentation paths, and plugin-controlled metadata omission. (src/plugins/channel-catalog-registry.test.ts:226, 8cd200e49fd3)
  • Real-environment proof: The PR body provides final-head Azure Crabbox checks and build output, a fresh Docker first-run run that exited successfully, and isolated compatibility runs for both onboard --skip-ui and setup --skip-ui. (github.com) (8cd200e49fd3)

Likely related people:

  • vincentkoc: Current-main history attributes the installed-plugin trust predicate that this PR extracts and tightens to commit 80d44bf. (role: introduced behavior; confidence: high; commits: 80d44bf000be; files: src/plugins/manifest-registry.ts)
  • fuller-stack-dev: Their merged Streamline OpenClaw onboarding #98218 established substantial current-main setup and onboarding routing, in addition to the residual branch work. (role: recent onboarding contributor; confidence: high; commits: 786abe78df53; files: src/cli/run-main.ts, src/wizard/setup.ts, src/cli/program/register.setup.ts)
  • steipete: The merged Crestodian work established the current conversational onboarding direction and security-sensitive setup ownership relevant to this PR's remaining surface. (role: product direction owner; confidence: medium; commits: 07bf384a8b3f; files: src/commands/onboard.ts, src/crestodian/agent-turn.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (27 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-05T17:37:00.490Z sha 454fa01 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-05T20:26:34.916Z sha f588c5a :: needs maintainer review before merge. :: none
  • reviewed 2026-07-06T09:14:51.749Z sha 9fa5b41 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-08T11:35:37.509Z sha 391209e :: needs maintainer review before merge. :: none
  • reviewed 2026-07-08T11:43:50.416Z sha 391209e :: needs maintainer review before merge. :: none
  • reviewed 2026-07-08T12:08:13.077Z sha 391209e :: needs maintainer review before merge. :: none
  • reviewed 2026-07-10T18:03:23.545Z sha ced5aed :: needs maintainer review before merge. :: none
  • reviewed 2026-07-11T02:33:16.568Z sha 8cd200e :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Jun 15, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 15, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 15, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 15, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 15, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 15, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 15, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 15, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 15, 2026
…nance-d9e94e9b

# Conflicts:
#	docs/.generated/plugin-sdk-api-baseline.sha256
#	scripts/plugin-sdk-surface-report.mjs
#	src/tui/tui-command-handlers.ts
#	src/wizard/setup.migration-import.test.ts
…nance-d9e94e9b

# Conflicts:
#	docs/.generated/plugin-sdk-api-baseline.sha256
#	scripts/plugin-sdk-surface-report.mjs
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@subweave-bot

subweave-bot commented Jul 5, 2026

Copy link
Copy Markdown

Went ahead and mapped this PR out for you 😌
Explore here →

Subweave map of openclaw/openclaw#93265

Maintainer? Turn off weaves from non-maintainers →
Carefully crafted by Subweave · 🧶 used ~253k LLM tokens

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: feat(onboard): streamline setup with agent-assisted configuration This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants