Commit Graph

88 Commits

Author SHA1 Message Date
0e6f71a84e fix(macos): source litellm salt key + DB password from shared token
litellm_salt_key and litellm_database_password default to /root password-file
lookups, which are empty on macOS, so the 'Materialize persisted LiteLLM
secrets' assert fails. In the Darwin block, pass both from UNIFIED_AUTH_TOKEN
(same shared-secret approach as postgresql_admin_password). Linux unchanged.
2026-06-19 03:10:44 +00:00
87c9a18f61 fix(macos): litellm brew install via command (clone-path patch) + TC-MAC-019 2026-06-19 03:00:27 +00:00
515f2a35e5 chore(macos): remove vault bootstrap diagnostic (bootstrap now green)
init_vault_admin.sh entity-alias fix is confirmed working (rc=0). Restore the
bootstrap task to no_log: true and drop the temporary file-dump diagnostic.
2026-06-19 02:45:48 +00:00
c1a5b07647 fix(macos): robust vault init patch + restore bootstrap diagnostic
The init_vault_admin.sh patch deleted the 'vault token revoke $bootstrap_token'
line, but on the cloned (remote) revision that line is wrapped in if/fi, so
removing it left an empty then-block -> 'syntax error near fi'. Stop deleting
it; instead set bootstrap_token="" so it stays a harmless no-op under set -u.
Verified against both standalone and if-wrapped revisions. Re-add the file-dump
bootstrap diagnostic to surface any further errors.
2026-06-19 02:27:48 +00:00
Haitao Pan
15a0e30a81 fix: refresh offline repositories on fresh hosts 2026-06-19 10:26:37 +08:00
5c9b5d2ed0 fix(macos): postgres brew install via command (clone-path patch) + docs
Add patch_playbook_postgres_macos() to rewrite the postgres macos.yml install
from the community.general.homebrew module (which can select a crashing stale
Intel Homebrew) to a brew command using the PATH brew, matching the playbooks
repo fix. Documents TC-MAC-018.
2026-06-18 12:55:51 +00:00
87bf91d655 fix(macos): use native PostgreSQL mode on Darwin (Linux keeps compose)
postgresql_deploy_mode defaults to compose (Docker) and the admin password is
generated via a /root password-file lookup, both of which fail on a native
macOS deploy (no Docker, /root not writable). The role already ships a native
path (macos.yml, Homebrew postgresql@16). In the script's Darwin block, set
postgresql_deploy_mode=native and pass postgresql_admin_password directly
(highest-precedence extra-var, bypassing the /root lookup). Linux unchanged.
Documents TC-MAC-017.
2026-06-18 12:47:41 +00:00
1492d13889 fix(macos): make vault admin bootstrap idempotent; drop diagnostic
Root cause of the repeated 'Bootstrap Vault admin userpass auth' failure was
not macOS-specific: init_vault_admin.sh derived entity_id by logging in as the
user, but the login MFA enforcement it creates makes that login MFA-gated on
re-runs (dev Vault persists across deploys), yielding 'missing entityID'.

patch_playbook_vault_macos() now rewrites init_vault_admin.sh to resolve
entity_id via the userpass entity-alias (creating entity+alias on first run),
matching the same fix landed in the playbooks repo. Removes the temporary
no_log/file-dump diagnostic. Documents TC-MAC-016.
2026-06-18 12:39:42 +00:00
b6d830d7d0 chore(macos): write vault bootstrap error to a readable file (diagnostic)
Disable no_log on the bootstrap and dump rc/stdout/stderr to
cloud-neutral-toolkit/vault-bootstrap-debug.log so the real init_vault_admin.sh
error can be inspected directly instead of relying on console copy/paste.
2026-06-18 12:32:02 +00:00
c5c4ecf58a chore(macos): surface vault admin bootstrap error (temporary diagnostic)
The bootstrap runs under no_log, hiding the real failure. Capture the script
result (keeping no_log so the password in the args stays censored), print only
stdout/stderr (no secrets), then assert. Lets the actual init_vault_admin.sh
error surface for diagnosis; to be removed once the root cause is fixed.
2026-06-18 12:17:27 +00:00
5750d3d2ae fix(macos): provide jq and Homebrew PATH for vault admin bootstrap
vault : Bootstrap Vault admin userpass auth runs init_vault_admin.sh, which
require_cmd's vault/jq/curl/base64. macOS has no jq by default (the apt deps
task is Darwin-skipped) and ansible.builtin.script uses a minimal PATH without
/opt/homebrew/bin. Extend patch_playbook_vault_macos() to brew install jq and
add environment PATH to the bootstrap task. Idempotent; verified. TC-MAC-015.
2026-06-18 11:55:17 +00:00
6607d32920 fix(macos): skip common role Linux baseline on Darwin
The common role's 'Base | *' tasks (timedatectl timezone, /etc/hostname,
hostname, /etc/hosts, ssh hardening, fail2ban, file limits, firewall) all run
with become: true against Linux-only tooling/paths and fail on macOS — the
reported timedatectl failure is just the first. Add patch_playbook_common_macos()
(post-clone, Darwin-only) that appends an ansible_os_family != 'Darwin' guard to
the whole Base block. Idempotent; verified against the real role; Linux
unchanged. Documents TC-MAC-014.
2026-06-18 11:46:29 +00:00
11701c6037 fix(macos): patch vault role post-clone for macOS-standard dirs
The vault role's 'Ensure standalone Vault directories exist' task creates
/etc/vault.d and /opt/vault/data with owner: root and lacks the Darwin guard
its sibling tasks have, so it fails under macOS become=false. Unlike the
bridge dir (owned by the service user, fixable via -e), this owner: root is
hardcoded and not overridable, so the role logic must change.

Since the role lives in a separate playbooks repo, reuse the existing
post-clone patch mechanism (cf. patch_playbook_user_systemd): add
patch_playbook_vault_macos() that, on Darwin only, guards the directory task,
makes vault dirs/binary OS-conditional (macOS -> ~/Library/Application
Support/vault[/data], /opt/homebrew/bin/vault; Linux unchanged), and creates
the user-owned data dir in macos.yml. Idempotent; verified against the real
role. Documents TC-MAC-013.
2026-06-18 11:33:42 +00:00
470e5163f5 fix(macos): use Apple-standard app-data dir for xworkmate-bridge base
Switch the macOS bridge base dir to the Apple-standard per-user location
$HOME/Library/Application Support/cloud-neutral/xworkmate-bridge, while Linux
keeps /opt/cloud-neutral/xworkmate-bridge. Applied both as the Darwin -e
override in setup-ai-workspace-all-in-one.sh (the lever that reaches the
curl|bash path) and as an OS-conditional role default. Updates TC-MAC-012 and
the progress report with the not-pushed root cause of the 19:09 re-failure.
2026-06-18 11:14:18 +00:00
cf97344708 fix: relocate xworkmate-bridge base dir under $HOME on macOS
macOS deploys run with ansible_become=false, so the bridge role default
xworkmate_bridge_base_dir=/opt/cloud-neutral failed with EACCES creating
/opt/cloud-neutral. Inject a Darwin -e override pointing the base dir at
$HOME/.local/state/cloud-neutral/xworkmate-bridge, matching existing macOS
overrides for gateway_openclaw/agent_skills/xworkspace_console. Documents the
failure and fix as TC-MAC-012.
2026-06-18 10:59:10 +00:00
Haitao Pan
e950eb18b8 fix: support Debian 13 offline bootstrap 2026-06-18 18:08:16 +08:00
Haitao Pan
a49cfcffe6 fix: support native macOS deployment 2026-06-18 17:44:02 +08:00
Haitao Pan
dbf4cb3091 fix: validate pinned chrome apt version 2026-06-18 17:17:01 +08:00
Haitao Pan
6cd95f55bb fix: tolerate unavailable chrome package 2026-06-18 16:57:04 +08:00
Haitao Pan
2ca0958058 feat: full macOS (Darwin) compatibility fixes for setup scripts 2026-06-18 16:26:44 +08:00
Haitao Pan
8b558fab39 refactor: unify macos setup through ansible 2026-06-18 14:48:03 +08:00
Haitao Pan
9351fdcc11 feat(setup): add dynamic LLM API key ingestion for LiteLLM auto-registration 2026-06-18 14:24:53 +08:00
Haitao Pan
6d47d33e30 fix(setup): move uninstall function definition to top-level to prevent command not found 2026-06-18 13:26:46 +08:00
Haitao Pan
20cd2bf34e fix(setup): replace unbound SCRIPT_DIR to support piping via curl 2026-06-18 13:18:36 +08:00
Haitao Pan
49bf559c86 fix: install multi-session openclaw plugin 2026-06-18 10:01:19 +08:00
Haitao Pan
b7fecd3b0c fix(setup): move subcommand routing before playbook cloning 2026-06-17 20:08:34 +08:00
Haitao Pan
c54bf37113 fix(setup): prevent offline bootstrap from intercepting sync/backup/restore subcommands
The try_bootstrap_from_offline_package call at line 2138 ran before subcommand
routing (sync/backup/restore/migrate/uninstall) at line 2357+, causing those
subcommands to be silently consumed by the offline bootstrap early-exit path.

Added a case guard to skip the offline bootstrap when a recognized subcommand
is provided as $1.
2026-06-17 19:59:49 +08:00
Haitao Pan
e2b9c91672 feat: decouple offline package extraction into distinct GitHub releases 2026-06-17 16:34:47 +08:00
Haitao Pan
e525cba3cc feat: add 'sync' subcommand to separate offline package download/extraction from deployment 2026-06-17 16:13:58 +08:00
Haitao Pan
700cdf0379 fix(qmd): update launch agent for local LiteLLM embeddings 2026-06-17 14:43:40 +08:00
Haitao Pan
115f9098a0 feat(setup): add encrypted backup and restore commands parsing 2026-06-17 14:05:18 +08:00
Haitao Pan
01486ff41a feat(setup): add support for migrate command parameter parsing 2026-06-17 13:59:57 +08:00
Haitao Pan
8fc7c48bba feat(setup): add support for uninstall and uninstall --purge commands 2026-06-17 13:43:01 +08:00
Haitao Pan
d49e0f784e fix(openclaw): initialize gateway.mode to local in setup config injection 2026-06-17 09:38:23 +08:00
Haitao Pan
6922e18115 fix(macOS): add sleep before launchctl bootstrap to prevent race condition 2026-06-17 09:20:09 +08:00
Haitao Pan
6b55830c60 feat(ai): parameterize LiteLLM URL and models, cascade auth token rotation to openclaw.json 2026-06-17 06:45:13 +08:00
Haitao Pan
0ffb9a31e9 fix(macOS): automatically configure OpenClaw to use unified LiteLLM at :4000 2026-06-17 06:19:52 +08:00
Haitao Pan
9fed1c1cf9 fix: use bash param expansion default for API keys to avoid unbound variable error 2026-06-16 23:11:29 +08:00
Haitao Pan
67fe5b5f58 fix: revert DEEPSEEK_API_KEY fallback to auth-token 2026-06-16 23:10:44 +08:00
Haitao Pan
d085762c2e fix: pass DEEPSEEK_API_KEY and OPENAI_API_KEY to litellm to fix ui playground auth failure 2026-06-16 23:01:14 +08:00
Haitao Pan
7c3c852211 fix: support local editable install for LiteLLM from workspaces/ai-workspace-service/litellm in setup script 2026-06-16 18:36:07 +08:00
Haitao Pan
b63b36e282 fix: remove hardcoded acp-bridge.onwalk.net domain and adjust macOS credentials label to mention KeyStore and ~/.ai_workspace_auth_token 2026-06-16 17:09:26 +08:00
Haitao Pan
2fc55046a8 fix: completely mute git outputs in resolve_console_dir to prevent stdout pollution 2026-06-16 16:56:15 +08:00
Haitao Pan
ff355ee511 fix: redirect git outputs to stderr in resolve_console_dir to fix cd failure and adjust macOS PG config 2026-06-16 16:52:06 +08:00
Haitao Pan
4632b7f005 fix(bootstrap): preflight public edge firewall ports 2026-06-16 14:51:07 +08:00
Haitao Pan
a0ff5eb3c9 fix: trust offline package git checkouts 2026-06-16 14:19:13 +08:00
Haitao Pan
b3426ce122 feat: fix wait_for_url 400 support, add logout button to dashboard 2026-06-16 10:31:17 +08:00
Haitao Pan
a0a9641aff Harden offline workspace bootstrap 2026-06-16 09:25:58 +08:00
Haitao Pan
389acb30ee Fix offline installer release lookup 2026-06-16 09:16:25 +08:00
Haitao Pan
c37de36c0d Fix offline package apt dependency resolution 2026-06-16 06:20:12 +08:00