AlphaClaw macOS Compatibility, building on pr-4-macos#63
Open
diazMelgarejo wants to merge 154 commits intochrysb:pr-4-macosfrom
Open
AlphaClaw macOS Compatibility, building on pr-4-macos#63diazMelgarejo wants to merge 154 commits intochrysb:pr-4-macosfrom
diazMelgarejo wants to merge 154 commits intochrysb:pr-4-macosfrom
Conversation
…ns and richer tool guidance. This adds URL-sticky tools tab behavior, robust tools config persistence/reset handling, and contextual tooltips so advanced capabilities are easier to understand.
…silient history loading so chat works reliably in local and containerized setups. Polish chat UX with markdown rendering, better spacing, per-session drafts, stop-generation control, and streaming behavior improvements.
Show tool activity as minimal per-call rows with expandable payload/result details, preserve richer history metadata, and keep chat styling isolated from agents styles for easier maintenance.
Resolve gateway event targets more reliably across payload shapes and attach streamed tool results to the correct inline tool rows so users see tool activity in real time.
Add API-layer stale-while-revalidate caching, unmount inactive panes, pause polling when hidden, and stream status/watchdog/doctor updates over SSE to cut redundant first-load and background requests while keeping tab switching fast.
This introduces OAuth callback middleware and webhook route/database updates while decomposing the webhooks UI into folder-based components with co-located hooks, so webhook flows are easier to maintain and safer to extend.
This aligns the frontend API test with the new createWebhook request body that always includes the oauthCallback flag.
This hydrates webhook detail and agents from cache first, then shows an explicit loading state so OAuth callback routes do not render a transient non-OAuth auth mode block.
ensureGatewayProxyConfig was called before the onboarding marker file was written, so its isOnboarded() guard bailed out silently. Move the call after the marker write so the gateway host origin is persisted to openclaw.json on first onboard.
Use OAuth-specific callback test URLs, refresh request history immediately after webhook test responses, and prepopulate OAuth webhook transforms with fallback message content so callback payloads without message fields still map successfully.
…ities. This updates webhook routing management with destination editing in detail view, adds robust session parsing for agent session lists, and introduces OAuth/webhook route destination update coverage across server and frontend tests.
This sorts direct/group session keys ahead of non-destination sessions so routing-related picks stay visible first while preserving all other session options.
This reuses one shared config-normalization path so both startup and onboarding enforce usage-tracker allow/load/entry fields consistently.
This prevents the modal from collapsing from 5 steps to 3 after enabling watch and showing an undefined step title.
This keeps destination selectors stable while sessions load and surfaces clearer GitHub API error context during repo setup.
This adds dismiss support that clears the underlying restart-required status and prevents stale env cache payloads from reverting saved values.
This writes renamed agents to identity.name, keeps backward compatibility for legacy name fields, and normalizes session labels when an agent has no explicit name.
…ding. Repos initialized with just a README and .gitignore now pass the empty-repo check so "Start fresh" onboarding can reuse them instead of rejecting them as non-empty.
Delay fallback status polling on first load, stop background browser re-check loops after failed attaches, bootstrap persisted attach state once, and increase browser invoke/check timeouts for slower Chrome attach flows.
# Conflicts: # package-lock.json # package.json
Fix git auth shim handling for global git options
…-dir Make managed OpenClaw plugin installs durable
Regenerate patch for server.impl-CsRRyd9F.js (clearUnboundScopes + sharedAuthOk).
…arding conflicts Constraint: preserve read-only onboarding behavior while accepting all mainline server/runtime refactors, route changes, and watchdog structure. Resolution strategy per file: - bin/alphaclaw.js: keep both git-sync + git-runtime imports; remove duplicate buildSecretReplacements (already declared lower in file) - lib/server/onboarding/index.js: * add OPENCLAW_STATE_DIR env var (upstream durable state fix) * ensureManagedExecDefaults runs outside read-only guard (all modes) * ensureGatewayProxyConfig moved outside if-block (upstream refactor) * git-sync stays guarded: if (!validatedReadOnlyMode && githubToken) * gog/cron/authProfiles remain inside if (!validatedReadOnlyMode) - lib/server/routes/system.js: * keep cron + readOnboardingMarker imports (HEAD) * accept watchdog/doctorService params (upstream) * keep safeRealpath/isSymlink + getRawSession* helpers (both) * buildStatusPayload() refactor accepted; diagnostics.readOnlyMode kept * /api/events/status SSE endpoint added (upstream) - lib/public/js/components/onboarding/welcome-pre-step.js: * use bundler imports (upstream) but keep kGithubFlowReadOnly (HEAD) - lib/public/js/components/onboarding/welcome-config.js: * upstream validate(); kGithubFlowReadOnly export preserved - package-lock.json, gateway.js, general/index.js, welcome-form-step.js: take upstream/main
On macOS, SIP makes /usr/local/bin root-only. Extract the existing isWritableDirectory() inline fallback into a tested getBinPath() utility that explicitly routes darwin to ~/.local/bin (XDG user-space, no sudo) and Linux to /usr/local/bin (writable) or managedBinDir (fallback). Shims installed to ~/.local/bin are visible to all user processes, not just alphaclaw child processes.
…law.js wiring - use top-level fs require in platform.js (not inline require()) - homedir default: arrow function () => os.homedir() for type consistency - import kSystemBinDir from lib/platform.js; remove local duplicate - prependPathEntry(installBinDir) runs on all platforms; mkdirSync only on darwin where ~/.local/bin may not yet exist
The OpenClaw gateway JSON-schema validator requires every provider entry to have a `models` key (even if empty). When alphaclaw generates config for self-hosted providers (ollama, lmstudio) the key is absent, causing a silent schema-validation crash that produces a 30-second startup timeout. Add sanitizeOpenclawConfig() to lib/server/openclaw-config.js and call it at config-read time in bin/alphaclaw.js so every provider always has `models: provider.models || []` before the gateway process is spawned.
- revert const cfg → let cfg: variable is mutated downstream; const was misleading - guard against array-typed providers (typeof [] === object passes incorrectly) - null-safe map: skip sanitization for null/non-object provider entries - add tests: null provider value, array-typed providers
- routes/system.js: call readSystemCronConfig() (local closure wrapper) instead of bare getSystemCronStatus() which requires explicit deps arg - onboarding/index.js: guard ensureManagedExecDefaults behind !validatedReadOnlyMode — upstream added it unconditionally but read-only mode must not rewrite openclaw.json - onboarding/index.js: remove duplicate ensureGatewayProxyConfig call outside the !validatedReadOnlyMode guard (merge left two calls; only the guarded one at line 561 should remain) - tests/frontend/api.test.js: update runOnboard body expectation to include readOnlyMode: false added by this PR
…idation Blocker 1 (chrysb review): fresh macOS onboarding installs the cron config and script but never starts the in-process managed scheduler, so hourly sync would not run until the next service restart. Fix: call startManagedScheduler() in installHourlyGitSyncCron() after a successful install. startManagedScheduler() is a no-op on Linux (normalizeCronPlatform guard), so the linux/docker path is unchanged. Blocker 2 (chrysb review): isValidCronSchedule() accepted any 5-token expression including named weekday/month tokens (MON, SUN, JAN, etc.). The managed scheduler parser uses Number.parseInt() which returns NaN for named tokens, causing cronMatchesDate() to always return false — sync silently never runs. Fix: tighten validation to numeric tokens only (digits, *, -, /, comma). Named tokens are now rejected at save time rather than silently failing at runtime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Open
Author
|
Addressed 2 blockers reviewed here: #4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getBinPath()intolib/platform.js— darwin routes to~/.local/bin(user-writable, no sudo), Linux keeps/usr/local/binwith managed fallback.readOnlyModeflow attaches AlphaClaw to an existing local OpenClaw setup without modifying any config files, writing git state, or touching the gateway proxy config.sanitizeOpenclawConfig: Ensures every provider inopenclaw.jsonhasmodels: [], preventing the OpenClaw gateway JSON-schema crash that causes a 30s startup timeout./api/events/status,buildStatusPayload()refactor, and bundler-style frontend imports while keeping the read-only onboarding invariants.getSystemCronStatusmissing deps arg, duplicateensureGatewayProxyConfigoutside read-only guard,ensureManagedExecDefaultsmodifying config in read-only mode, andapi.test.jsbody expectation missingreadOnlyMode.Test plan
npx vitest rungetBinPath()unit tests: 4 passingsanitizeOpenclawConfig()unit tests: 7 passingopenclaw.jsonalphaclaw startinstalls binary to~/.local/binwithout sudo{ readOnlyMode: true }to/api/onboardcompletes without rewriting existing configBranch
pr-4-macos(pushed fromdiazMelgarejo/AlphaClaw)Full suite: 535 passed, 3 failures (after merging main to pr-4-macos)
Fixed: post main -> pr-4-macos
All 3 failures were merge conflict residue — the fixes preserve the correct invariant that read-only onboarding must not write to
openclaw.jsonor callensureGatewayProxyConfig.