Skip to content

Independent openXYOS provision process for Windows install - #34

Draft
XYAIStudio wants to merge 4 commits into
mainfrom
cursor/independent-openxyos-provision-373a
Draft

XYAIStudio wants to merge 4 commits into
mainfrom
cursor/independent-openxyos-provision-373a

Conversation

@XYAIStudio

@XYAIStudio XYAIStudio commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

Windows Setup no longer FileWrites extract-openxyos.cmd / start-sidecar.ps1 / wait-openxyos.ps1 or goto liveNodeOk. FreeOS shell copy finishes first (exe, shortcuts, uninstaller). Then NSIS copies the sealed openxyos-runtime.zip plus a checked-in provisioner and launches that independent unelevated process.

openxyos-provision.ps1 is the same shape as installing openXYOS alone:

  1. tar.exe extract into %LOCALAPPDATA%\FreeOS\openxyos (nested openxyos\dist handled; no Expand-Archive)
  2. Start Node at medium integrity via start-sidecar.ps1
  3. Wait for http://127.0.0.1:3780/api/health/livez
  4. Write .install-ready only when healthy
  5. Register HKCU Run + ONLOGON task FreeOS-openXYOS

Success requires runtime on disk and services up and livez. A livez miss is a provision failure (Setup Abort, error 67/68) — not “shell OK, org broken.” Installer strings point at provision.log stages (extract / start / livez) instead of blaming port 3780 first.

Organization still auto-embeds when .install-ready exists; no primary 「启动边车」 CTA after a successful provision.

Target branch

Type of change

  • Refactor / chore
  • Bug fix

Test plan

  • uv run pytest tests/unit/desktop/test_nsis_uninstall.py tests/unit/desktop/test_openxyos_provisioner.py tests/unit/desktop/test_stage_openxyos_runtime.py -q
  • make all — 3430 passed, 15 skipped
  • FreeOS Desktop Package windows-amd64 / windows-arm64 (first run failed: makensis Invalid command: ${TrimNewLines}; fixed by stripping CR/LF in NSIS instead)

Windows amd64 silent / elevated verify

FreeOS-desktop-windows-amd64-<version>.exe /S
echo %ERRORLEVEL%
dir "%LOCALAPPDATA%\FreeOS\openxyos\node\node.exe"
type "%LOCALAPPDATA%\FreeOS\openxyos\.install-ready"
curl http://127.0.0.1:3780/api/health/livez
reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v FreeOS-openXYOS

Retry only openXYOS with the same process Setup launched:

powershell -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\FreeOS\openxyos-provision.ps1"

Do not run the provisioner itself as Administrator.

Checklist

  • Updated CHANGELOG.md
  • desktop/README.md documents the independent provisioner and verify steps
Open in Web Open in Cursor 

NSIS now copies the sealed zip plus openxyos-provision.ps1 and waits for
that unelevated process. Extract, start, livez, .install-ready, and
autostart live in one script instead of FileWrite cmd/goto glue.
makensis on windows-amd64/arm64 rejected ${TrimNewLines} as an unknown
command. Wait for the sentinel with a small CR/LF strip instead, and
write the exit marker without a trailing newline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants