Commit Graph

168 Commits

Author SHA1 Message Date
fa808eae80 fix(bootstrap): inventory_hostname from FQDN, not hardcoded 127.0.0.1
On-host ansible-playbook -c local now uses XWORKMATE_BRIDGE_DOMAIN (sourced from
CMDB service_domains via the pipeline) or the host FQDN as inventory_hostname,
falling back to 127.0.0.1 only when no valid FQDN exists. Keeps -c local.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 20:42:27 +08:00
fe479bc4b4 ci(deploy-iac): pass XWORKMATE_BRIDGE_DOMAIN (override or CMDB service_domains) to on-host bootstrap
New optional 'bridge_domain' input overrides; otherwise derive from each host's
cmdb.json host_vars.service_domains (first entry) and inject as
XWORKMATE_BRIDGE_DOMAIN so the host sets /etc/hostname + xworkmate-bridge.caddy
from it (on-host model has no inventory hostvars).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:56:45 +08:00
607c995a9a ci+docs(vault): read LLM keys from kv/openclaw, SSH/infra/cloudflare from kv/CICD
DEEPSEEK/NVIDIA/OLLAMA_API_KEY live in kv/data/openclaw (not CICD); vault-action
reads them from that path in the same step. Policy grants read on both
kv/data/CICD and kv/data/openclaw.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:35:25 +08:00
dba85dad04 docs(ci): fix header comment to kv/CICD + actual key names
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:31:30 +08:00
5d852e0285 ci+docs(vault): read shared kv/CICD with existing key names
- VAULT_KV -> kv/data/CICD (shared CICD secrets), map existing keys to outputs:
  CODEX_GITHUB_PERSONAL_ACCESS_TOKEN->INFRA_REPO_TOKEN,
  SSH_PRIVATE_DEPLOY_KEY[_B64]->ANSIBLE_SSH_KEY[_B64],
  CLOUDFLARE_DNS_API_TOKEN direct; VULTR_API_KEY/LLM keys same name.
- docs: policy reads kv/data/CICD; field table maps existing keys; note the
  three LLM keys still need to be added to kv/CICD, and SSH_PUBLIC_DEPLOY_KEY
  must match hosts.yaml.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:31:00 +08:00
04d349073e ci+docs(vault): SSH key B64-preferred pattern + xworkspace-console Vault setup
- deploy job: read ANSIBLE_SSH_KEY_B64 (preferred) + ANSIBLE_SSH_KEY (fallback)
  from Vault, decode/write ~/.ssh/id_deploy and ssh-keygen -y self-check —
  matches the org SSH-deploy runbook (avoids multiline-key libcrypto errors).
- docs/operations/vault-github-actions.md: full Vault role/policy/jwt/KV setup
  for github-actions-xworkspace-console, mirroring the existing org records.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:21:01 +08:00
75d3098d1c ci(deploy-iac): fetch secrets from Vault KV via GitHub OIDC
Replace GitHub Actions Secrets with HashiCorp Vault (https://vault.svc.plus):
- permissions: id-token: write; auth via hashicorp/vault-action@v2 (method=jwt,
  role=github-actions-xworkspace-console, audience=vault) — no static token.
- Each job loads only the keys it needs from kv/data/github-actions/xworkspace-console
  (VULTR_API_KEY, INFRA_REPO_TOKEN, ANSIBLE_SSH_KEY, CLOUDFLARE_API_TOKEN,
  DEEPSEEK/NVIDIA/OLLAMA_API_KEY, optional TF_STATE_*).
- Backend gating now keys off the Vault output (steps.vault.outputs.TF_STATE_BUCKET).
- Drop unused 'playbook' input (deploy is on-host bootstrap).

Pattern mirrors xworkmate-app/.github/workflows/build-and-release.yml.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:17:46 +08:00
e74f2334e3 docs(setup): complete optional-parameters manual for curl|bash bootstrap
Expand the all-in-one setup guide (zh+en) into a full reference of the
bootstrap script's supported options, grouped by purpose: subcommands
(uninstall/--purge), public-exposure & security, unified auth-token chain,
runtime modes, offline package, performance/locks, source/version overrides.
Fix the inaccurate TOKEN var -> AI_WORKSPACE_AUTH_TOKEN (the real precedence
chain). Sourced from scripts/setup-ai-workspace-all-in-one.sh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 11:26:01 +08:00
b2c8c5d875 ci+docs: on-host bootstrap deploy job + console serving/verification updates
- deploy-ai-workspace-iac.yaml: deploy job now ssh-es to each host and runs
  the official curl|bash bootstrap locally (host-side ansible -c local,
  offline-accelerated), instead of running all-in-one from the runner (which
  breaks on roles/agent_skills delegate_to: localhost). provision job kept as
  the batch-provision mode.
- docs/operations: record final console fix (local python static backend),
  caddy/public-access architecture, and debian13/ubuntu26.04/macOS verification.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 09:44:22 +08:00
e47b15a5f0 docs(operations): IaC + Ansible dynamic-inventory deploy verification & fixes
Records the IaC->inventory->deploy linkage, offline-package linkage
verification, the local-on-host execution finding, the 5 fixes applied to
playbooks, and the remaining console static-serve + pipeline TODOs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 03:02:59 +08:00
b039a36a69 ci: align deploy pipeline with shared scripts/templates layout
generate.py moved to vultr-vps/scripts/ and provider/variables/cloud-init to
templates/; run render/inventory from VPS_ROOT via scripts/generate.py, keep
terraform -chdir in the env workdir.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 21:23:48 +08:00
7c46dffde2 ci: add IaC + Ansible + Cloudflare matrix deploy pipeline
Matrix pipeline that provisions Vultr hosts via iac_modules vultr-vps
ai-workspace env (Terraform), derives the deploy matrix from the rendered
CMDB, deploys per-host with Ansible all-in-one, then syncs Cloudflare DNS.
Pipelining off + PYTHONWARNINGS=ignore for Python 3.13 targets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 21:02:32 +08:00
0f289383e2
Update README.md 2026-06-23 14:53:35 +08:00
2832716076
Revise model names in README for accuracy
Updated model names for clarity and consistency.
2026-06-23 14:52:35 +08:00
15aa1d2c25
Fix model names in registration instructions
Updated model registration instructions and corrected names.
2026-06-23 14:52:04 +08:00
2681ce5faf
Fix spacing in README.zh.md
Corrected spacing in the Chinese README file.
2026-06-23 14:49:17 +08:00
f61fb1ac02
Update README.zh.md 2026-06-23 14:49:03 +08:00
2a227deddc docs: restructure docs to support full en/zh bilingual versions with language toggles 2026-06-23 14:43:54 +08:00
fa49b2fda1 docs: add version compatibility matrix and reference in README 2026-06-23 14:20:50 +08:00
df282ae735 feat: support specifying local offline package path via AI_WORKSPACE_OFFLINE_PACKAGE 2026-06-23 14:05:08 +08:00
4a36b22bf0 fix(script): prevent ansible from splitting api exec string by spaces 2026-06-23 13:21:45 +08:00
61055887f8 docs: add official register_mainstream_models documentation with new routing design 2026-06-23 12:55:07 +08:00
3905f1ac6a docs: add openclaw litellm compat plan 2026-06-23 12:42:27 +08:00
d18897d6ad chore(setup): update setup script for ai workspace models 2026-06-23 11:04:38 +08:00
fd1fb5710c ci(console-runtime): publish moving latest-runtime release
The ai-workspace role's final-deployment step downloads the console runtime
from a stable latest-runtime release (matching the bridge/qmd/litellm
convention). Have the publish job refresh a moving `latest-runtime` release
alongside the immutable `runtime-<sha>` one, carrying the same cross-compiled
assets (darwin-arm64, linux-amd64, linux-arm64) + SHA256SUMS, so consumers get
a predictable URL:
  releases/download/latest-runtime/xworkspace-console-runtime-<os>-<arch>.tar.gz

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 17:05:20 +08:00
9b2b3953af feat(dashboard): enforce token authentication by default and always enable logout 2026-06-22 15:14:44 +08:00
e086403c2d fix(dashboard): fix logout button behavior by adding page reload and hiding button when auth is not required 2026-06-22 14:43:08 +08:00
54df83dc9e chore(macos-patch): resilient litellm install + idempotent OpenClaw guards
Inject pip --retries/--resume-retries into the cloned litellm install task,
tolerate empty version-probe stdout via default('{}', true), and guard the
OpenClaw download/extract patches so a second pass cannot append a duplicate
`when:` (invalid YAML). Ignore scripts/__pycache__.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 13:25:12 +08:00
7fd48bbf74 docs(macos): record TC-MAC-028..033 and refresh delivery plan
Document the six macOS issues found and fixed during end-to-end
verification of the all-in-one install: litellm dependency version-probe
SyntaxError (TC-028), prisma generator PATH (TC-029), QMD plist undefined
nodejs_version (TC-030), QMD better-sqlite3 Node ABI mismatch (TC-031),
XFCE/XRDP apt-on-macOS (TC-032), and litellm DATABASE_URL password
percent-encoding / P1013 (TC-033), each with its playbooks commit. Update
the fix-dimension summary and the runtime delivery plan status.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 13:25:12 +08:00
d0d5a79be8 feat(uninstall): print teardown plan and purge path status
`uninstall` / `uninstall --purge` previously removed services and (on
purge) `rm -rf`'d a hand-maintained list of paths with no output, so users
could not see what would be — or had been — deleted (TC-MAC-026).

Add a pre-flight `print_uninstall_summary` that lists the apps/services to
be removed (launchd agents on macOS; systemd units + docker containers on
Linux) and, when --purge is set, every target path with its current
[present]/[absent] status. Centralize the purge paths into a single
source-of-truth inventory and route deletions through a `purge_path`
helper that prints `removed:` / `absent (skipped):` per path. Document the
subcommands in the usage header. Behavior is otherwise unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 12:37:59 +08:00
51f2776840 fix(macos-patch): tolerate empty litellm version-probe stdout
Mirror the playbooks fix for the curl|bash clone path: rewrite
default('{}') | from_json to default('{}', true) | from_json so an empty
probe stdout no longer crashes the install-decision set_fact.
2026-06-22 03:18:59 +00:00
b1b22bc447 docs(macos): update delivery plan and macOS compatibility test cases 2026-06-22 02:43:54 +00:00
578e5e7604 refactor(bootstrap): drop unused local portal config writer
macOS deploys via the ansible path, so write_local_portal_config and the AI_WORKSPACE_DARWIN_MODE doc line are dead code. Ignore scripts/__pycache__.
2026-06-22 02:43:54 +00:00
42c769202b fix(macos-patch): idempotent OpenClaw guards + resilient litellm install
- OpenClaw download sub-patch re-applied on a 2nd pass produced a duplicate when: key (invalid YAML); guard against the already-patched form.
- OpenClaw extract_old drifted from upstream (missing creates:, notify now a list) so the Darwin guard silently never applied and the task tried to unarchive a tarball never downloaded on macOS; realign + idempotent guard.
- Inject pip --retries/--resume-retries + longer timeout into the LiteLLM dependency install for the curl|bash clone path.
2026-06-22 02:42:51 +00:00
Haitao Pan
d24a4dc0fe refactor(deploy): extract python playbook patches into an external script 2026-06-21 19:19:40 +08:00
Haitao Pan
bf1762a912 fix(macOS): update ansible setup patching logic to match the newly unified 'Restart openclaw' listen topic 2026-06-21 19:12:42 +08:00
Haitao Pan
3cf926c7eb fix(bootstrap): BASH_SOURCE unbound variable when script is piped via stdin 2026-06-21 18:27:30 +08:00
Haitao Pan
2a47f4397a chore: add gnu-tar dependency on macOS for unarchive support 2026-06-21 16:22:03 +08:00
Haitao Pan
198ca0c88a chore: rename workflow to offline-package prefix and implement openclaw plugin macOS patch 2026-06-21 16:17:30 +08:00
415794ff65 chore: gitignore offline package dir, dashboard build-commit, textClipping 2026-06-21 08:09:18 +00:00
04f653b0b3 ci: slim console runtime - universal dist + cross-compiled API, no macOS runner
Build the dashboard dist once (platform-independent) and cross-compile the Go
API (CGO disabled) for darwin-arm64, linux-amd64, linux-arm64 in a single
ubuntu job. Drops the macOS runners and per-arch docker. node_modules is
excluded from the runtime (nodejs role provides Node on target), so the
tarballs only carry the API binary + built dist + scripts + manifest. macOS is
arm64-only; Linux covers amd64/arm64 (Debian and Ubuntu share the binary).
2026-06-21 08:02:58 +00:00
da64de72bb ci: unify runtime + offline into one pipeline (single build matrix)
Merge offline-package workflow jobs into runtime-release.yaml:
build (one linux+darwin matrix) -> publish (outputs runtime_tag) ->
build-offline-package (matrix) -> test-offline-package (matrix) ->
publish-release. One-directional deps: publish-release needs
test-offline-package needs build-offline-package. Offline build uses the
in-pipeline runtime_tag, and publish-release folds in the console-runtime
download (from aaf6c47) plus the >2GiB split-upload. The standalone
offline-package-ai-workspace-installer.yaml is now redundant (dispatch-only;
safe to delete).
2026-06-21 07:50:34 +00:00
Haitao Pan
aaf6c47b69 ci: include console runtimes in offline release 2026-06-21 15:32:39 +08:00
77230a5fd4 ci: publish darwin runtime + split >2GiB offline packages
A) runtime-release.yaml: add a native build-darwin job (macos-14 arm64 /
   macos-13 amd64) that builds the dashboard + cross-correct Go API and
   publishes xworkspace-console-runtime-darwin-{arm64,amd64}.tar.gz, fixing the
   macOS deploy 404. publish now needs both build jobs and globs all runtimes.

B) offline-package workflow: GitHub caps release assets at 2 GiB. Split any
   package >= 2 GiB into 1900 MiB parts plus a <name>.parts manifest and upload
   the parts. The offline bootstrap (download_offline_split) falls back to the
   manifest and reassembles the parts when the single asset is absent. Verified
   the split/reassemble round-trips byte-for-byte.
2026-06-19 22:17:11 +00:00
a7c6e41f89 fix(macos): litellm DB provisioning patch (no escalation + psql PATH) 2026-06-19 03:37:40 +00:00
d2da139e8d fix(prefetch): keep prefetched commit on a branch (Linux)
prefetch_git_repository left the repo on a detached FETCH_HEAD. The dir is
consumed via 'git clone file://<dest>', and a detached/unreachable commit can be
pruned by git gc and is fragile to transfer, surfacing as 'unable to read tree
<sha>' during the downstream console checkout. Point a local branch
(ai-workspace-prefetched) at the fetched commit so it stays reachable and fully
clonable.
2026-06-19 03:28:58 +00:00
2bf9068d00 fix(macos): relocate litellm config dir + OS-conditional owner patch
Darwin block sets litellm_config_dir=$HOME/.config/litellm; patch_playbook_
litellm_macos now also rewrites the config-dir and env-file ownership to be
OS-conditional on the cloned copy.
2026-06-19 03:18:06 +00:00
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