feat: add interactive setup wizard#55
feat: add interactive setup wizard#55UltraInstinct0x wants to merge 10 commits intoopenclaw:mainfrom
Conversation
- Add src/infra/prerequisites.ts with unified prerequisite checking - Add src/commands/doctor.ts for system health diagnostics - Register doctor command in CLI with --json and --verbose flags - Add comprehensive tests for both modules - Checks: Node.js, pnpm, Git, config, workspace, credentials, API keys, network
- Add fixId to prerequisite results for fixable issues - Implement auto-fix for: config, workspace, WhatsApp login, API key - Prompt user before applying each fix - Re-run checks after fixes to show updated status - Suggest --fix when issues are detected
- One-liner installation: curl ... | bash - Platform detection (macOS, Linux) - Auto-install Node.js via nvm/fnm/brew - Auto-install pnpm via corepack or npm - Clone/update repository - Build and create clawdis symlink - Run initial setup - Supports --unattended flag for CI
- Multi-stage Dockerfile for minimal image size - ARM64 support for Oracle Cloud Ampere - Non-root user for security - Health check endpoint - docker-compose.yml with volume mounts for persistence - docker-compose.override.yml.example with Tailscale sidecar - .dockerignore for efficient builds
…erequisites feat: add prerequisites module and doctor command
…staller feat: add universal installer script
…cker feat: add Docker support
|
On my list to review soon, ty! |
|
Huh, what does this do with Docker? I smell mechants of complexity! |
| /** | ||
| * Check if pnpm is installed. | ||
| */ | ||
| export async function checkPnpm(): Promise<PrerequisiteCheckResult> { |
There was a problem hiding this comment.
pnpm is not something we should enforce. That's a user choice.
| /** | ||
| * Check if Git is installed. | ||
| */ | ||
| export async function checkGit(): Promise<PrerequisiteCheckResult> { |
There was a problem hiding this comment.
There shouldn't be need for git.
| /** | ||
| * Check if ffmpeg is installed (required for media processing). | ||
| */ | ||
| export async function checkFfmpeg(): Promise<PrerequisiteCheckResult> { |
|
Not certain this goes towards my vision. It's a valid choice and quite opinionated; my vision is more a single nom or homebrew cast you just start and i'll work. Defo do not want to require Docker, other tools are progressively used if use wants to. Thanks for the effort tho! I keep this open a abit to think more about it, maybe I can bring some ideas back into the first run experience. |
|
Yeah, I figured but forgot to close this, sorry. |
After a gateway restart, Chrome's SingletonLock/SingletonSocket/SingletonCookie files persist on the Docker volume while their /tmp targets are gone. This causes Chrome to hang or timeout on subsequent launches. Remove these files in launchOpenClawChrome() before spawning, which is safe because ensurePortAvailable() already confirmed no Chrome is running on that port. Closes openclaw#55 Co-authored-by: Claude Opus 4.5 <[email protected]>
After a gateway restart, Chrome's SingletonLock/SingletonSocket/SingletonCookie files persist on the Docker volume while their /tmp targets are gone. This causes Chrome to hang or timeout on subsequent launches. Remove these files in launchOpenClawChrome() before spawning, which is safe because ensurePortAvailable() already confirmed no Chrome is running on that port. Closes openclaw#55 Co-Authored-By: Claude Opus 4.5 <[email protected]>
After a gateway restart, Chrome's SingletonLock/SingletonSocket/SingletonCookie files persist on the Docker volume while their /tmp targets are gone. This causes Chrome to hang or timeout on subsequent launches. Remove these files in launchOpenClawChrome() before spawning, which is safe because ensurePortAvailable() already confirmed no Chrome is running on that port. Closes openclaw#55 Co-authored-by: Claude Opus 4.5 <[email protected]>
After a gateway restart, Chrome's SingletonLock/SingletonSocket/SingletonCookie files persist on the Docker volume while their /tmp targets are gone. This causes Chrome to hang or timeout on subsequent launches. Remove these files in launchOpenClawChrome() before spawning, which is safe because ensurePortAvailable() already confirmed no Chrome is running on that port. Closes openclaw#55 Co-authored-by: Claude Opus 4.5 <[email protected]>
…ction - Replace non-existent generateText with completeSimple from pi-ai - Use explicit Sonnet model (claude-sonnet-4-20250514) for extraction - Add condenseMessagesForExtraction: compact text repr instead of raw JSON - Add buildContextTransfer: safe defaults for all schema fields - Add parseJsonFromResponse: robust JSON extraction from LLM output - Export helper functions via __testing for unit tests - Add 16 unit tests covering all extraction helpers - All 43 tests pass, build clean
After a gateway restart, Chrome's SingletonLock/SingletonSocket/SingletonCookie files persist on the Docker volume while their /tmp targets are gone. This causes Chrome to hang or timeout on subsequent launches. Remove these files in launchOpenClawChrome() before spawning, which is safe because ensurePortAvailable() already confirmed no Chrome is running on that port. Closes openclaw#55 Co-authored-by: Claude Opus 4.5 <[email protected]>
focal55
left a comment
There was a problem hiding this comment.
The overall schema structure is well-designed, and the tables are normalized correctly. The use of pgvector and the corresponding HNSW index is also set up properly.
However, there is a critical security issue: Row Level Security (RLS) is enabled on all tables, but the required CREATE POLICY statements are missing from the migration script. Enabling RLS without defining policies will block all non-superuser access to the tables.
Please add the specific RLS policies to the 001_initial_schema.sql migration file to ensure that users can only access their own data. For example:
-- For profiles
create policy "Users can view their own profile" on public.profiles
for select using (auth.uid() = id);
create policy "Users can update their own profile" on public.profiles
for update using (auth.uid() = id);
-- Similar policies should be created for all other user-specific tables
-- (user_progress, study_sessions, user_achievements, daily_activity)
-- to check that auth.uid() = user_id.
-- For doc_chunks, a public read-only policy is needed
create policy "All users can read doc_chunks" on public.doc_chunks
for select using (true);This will make the database schema secure and reproducible from the migration script alone.
…aw#55)\n\nBreaks the infinite approval loop on LINE OA stateless runtime by:\n- Adding LineExecApprovalHandler (confirm template with Approve/Deny buttons)\n- Intercepting exec_approval= postbacks in handlePostbackEvent before processMessage\n- Extracting shared shouldSkipRichChannelForwarding utility\n- Wiring handler into LINE monitor lifecycle (start/stop)\n\nNew files:\n- src/infra/exec-approval-utils.ts (shared approval target resolution)\n- src/line/exec-approvals.ts (LINE exec approval handler)\n- src/line/exec-approvals.test.ts (unit + integration tests)\n\nModified:\n- src/line/bot-handlers.ts (postback interception)\n- src/line/bot.ts (pass handler through LineBotOptions)\n- src/line/monitor.ts (instantiate + lifecycle)\n- src/infra/exec-approval-forwarder.ts (use shared skip function)"
…andler.start() async initialization was being fire-and-forget.\nThis caused a race condition where the gateway client might not be ready\nwhen postbacks are processed. Now properly awaits initialization before\nmessage processing starts, with graceful degradation if startup fails."
* fix(sre:PLA-813): harden consumer approval bug triage * test(sre:PLA-813): allowlist fake linear secret fixture * fix(sre:PLA-813): address PR review findings * fix(sre:PLA-813): address follow-up review findings
Ronan's findings from code traceThe tool construction gates both look correct:
The tool is created in ...(options?.config?.agents?.defaults?.continuation?.enabled === true &&
options?.drainsContinuationDelegateQueue === true
? [createContinueDelegateTool({ agentSessionKey: options?.agentSessionKey })]
: []),Both gates should be open. Yet no prince sees Possible root causes:
The regression is likely in the tool serialization layer or provider adapter, not in tool construction. Worth adding a debug log at the point where tools are serialized to the provider to confirm the tool is present pre-serialization. Build: |
MiniMax M2 models (including M2.7) are trained heavily on Chinese data and occasionally leak CJK (Chinese/Japanese/Korean) ideographs and punctuation into non-CJK language outputs (German, English, etc.). This is a known model-level bug: - GitHub MiniMax-M2 Issue openclaw#100 (Korean → Chinese leakage) - OpenClaw Issue openclaw#17121 (Japanese → Chinese/Russian leakage) - MiniMax-M2 Issue openclaw#55 (CJK/Latin punctuation confusion) System prompt instructions alone cannot reliably prevent this because the leakage originates at the token probability level, not from the model ignoring instructions. Changes: - Add stripLeakedCjkChars() post-processing filter that detects when text is predominantly non-CJK (<20% CJK ideographs by character count) and strips stray CJK characters + replaces CJK punctuation with Latin equivalents - Wire into all three text sanitization paths: 1. extractAssistantText (pi-embedded-utils.ts) -- final message 2. sanitizeTextContent (sessions-helpers.ts) -- subagent/session text 3. emitBlockChunk (pi-embedded-subscribe.ts) -- streaming chunks - Safety: text with >20% CJK content is left untouched (intentional CJK language use) - 17 tests covering German, English, mixed content, intentional CJK preservation, edge cases Fixes openclaw#17121
Summary
src/cli/wizard.tswith reusable prompt utilities (promptSelect,promptMultiSelect,promptInput,promptConfirm,runWizard)src/infra/prerequisites.tsfor system prerequisite checking (Node.js, pnpm, Git, ffmpeg, Tailscale, permissions)src/commands/setup-wizard.tsimplementing a 5-step interactive wizard:src/commands/setup.tsto add--wizardand--quickflags with TTY-aware defaultssrc/cli/program.tsto register the new options with help examplesTest plan
clawdis setup --wizardin a TTY terminal and verify the interactive wizard appearsclawdis setup --quickand verify non-interactive setup completesclawdis setupin a non-TTY environment (piped) and verify quick mode is usedclawdis setup --helpshows the new options and examplespnpm buildpnpm lint🤖 Generated with Claude Code