Skip to content

Commit 051225c

Browse files
committed
feat(installer): add Windows ocs policy Quick Fix and OS-aware next steps with Exa guidance
1 parent 47780fc commit 051225c

File tree

4 files changed

+101
-31
lines changed

4 files changed

+101
-31
lines changed

CHANGELOG.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# Changelog
22

3-
## 2.1.9 - 2026-03-14
4-
5-
- Synchronized installer feat release line to `2.1.9` for buyer branch `feat/buyer-setup-smoke` publication.
6-
- Updated feat-branch README install pin examples from `2.1.4` to `2.1.9`.
7-
- Aligned profile naming references to `gpt-5.4-*` so installer docs match buyer profile catalog naming.
8-
- Kept installer and buyer release cadence synchronized before any beta promotion.
9-
103
## 2.1.8 - 2026-03-14
114

125
- Synced installer release line with buyer bundle hotfix `beta-v2.1.8` for GLM Coding Plan auth-header compatibility.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ curl -fsSL https://raw.githubusercontent.com/andyvandaric/opencode-suites-instal
2525
Install specific version:
2626

2727
```bash
28-
curl -fsSL https://raw.githubusercontent.com/andyvandaric/opencode-suites-installer/feat/buyer-setup-smoke/install.sh | bash -s -- --version 2.1.9
28+
curl -fsSL https://raw.githubusercontent.com/andyvandaric/opencode-suites-installer/feat/buyer-setup-smoke/install.sh | bash -s -- --version 2.1.4
2929
```
3030

3131
WSL note: run the command inside WSL terminal (`bash`/`zsh`), not from Windows PowerShell.
@@ -39,7 +39,7 @@ pwsh -NoProfile -ExecutionPolicy Bypass -Command "irm https://raw.githubusercont
3939
Install specific version:
4040

4141
```powershell
42-
pwsh -NoProfile -ExecutionPolicy Bypass -Command '$env:OCS_VERSION = "2.1.9"; irm https://raw.githubusercontent.com/andyvandaric/opencode-suites-installer/feat/buyer-setup-smoke/install.ps1 | iex'
42+
pwsh -NoProfile -ExecutionPolicy Bypass -Command '$env:OCS_VERSION = "2.1.4"; irm https://raw.githubusercontent.com/andyvandaric/opencode-suites-installer/feat/buyer-setup-smoke/install.ps1 | iex'
4343
```
4444

4545
Windows note: run via `pwsh` (PowerShell 7), not `powershell.exe` (Windows PowerShell 5.1), to avoid parser errors like `Unexpected token '??'`.
@@ -67,13 +67,13 @@ If you want deterministic behavior while this branch is still collecting edge-ca
6767
### macOS / Linux / WSL
6868

6969
```bash
70-
curl -fsSL https://raw.githubusercontent.com/andyvandaric/opencode-suites-installer/feat/buyer-setup-smoke/install.sh | bash -s -- --version 2.1.9 --branch feat/buyer-setup-smoke
70+
curl -fsSL https://raw.githubusercontent.com/andyvandaric/opencode-suites-installer/feat/buyer-setup-smoke/install.sh | bash -s -- --version 2.1.4 --branch feat/buyer-setup-smoke
7171
```
7272

7373
### Windows (PowerShell 7)
7474

7575
```powershell
76-
pwsh -NoProfile -ExecutionPolicy Bypass -Command '$env:OCS_VERSION = "2.1.9"; $env:OCS_RELEASE_BRANCH = "feat/buyer-setup-smoke"; irm https://raw.githubusercontent.com/andyvandaric/opencode-suites-installer/feat/buyer-setup-smoke/install.ps1 | iex'
76+
pwsh -NoProfile -ExecutionPolicy Bypass -Command '$env:OCS_VERSION = "2.1.4"; $env:OCS_RELEASE_BRANCH = "feat/buyer-setup-smoke"; irm https://raw.githubusercontent.com/andyvandaric/opencode-suites-installer/feat/buyer-setup-smoke/install.ps1 | iex'
7777
```
7878

7979
Post-install smoke checks:
@@ -92,11 +92,11 @@ ocs setup:profile --help
9292
- Token-efficient worker lane: `openai/gpt-5.1-codex-mini`
9393
- Recommended default for most users: strongest balance for planning -> execution flow, efficient token usage, and stable precision once your workflow is already tidy.
9494
- Best for: daily coding sessions where you want high throughput without sacrificing decision quality.
95-
- `gpt-5.4-best-perform`
95+
- `codex-5.4-best-perform`
9696
- Primary model: `openai/gpt-5.4`
9797
- Fast lane: `openai/gpt-5.3-codex`
9898
- Best for: maximum-depth architecture reviews and the toughest debugging cases.
99-
- `gpt-5.4-token-saver`
99+
- `codex-5.4-token-saver`
100100
- Primary model: `openai/gpt-5.4`
101101
- Token-efficient worker lane: `openai/gpt-5.1-codex-mini`
102102
- Best for: teams that want GPT-5.4 orchestration with tighter token control.
@@ -185,7 +185,7 @@ ls -la ~/.config/opencode/plugins/opencode-multi-auth/dist/src/plugin.js ~/.conf
185185
Kalau folder plugin belum ada sama sekali, rerun installer:
186186

187187
```bash
188-
curl -fsSL https://raw.githubusercontent.com/andyvandaric/opencode-suites-installer/feat/buyer-setup-smoke/install.sh | bash -s -- --version 2.1.9
188+
curl -fsSL https://raw.githubusercontent.com/andyvandaric/opencode-suites-installer/feat/buyer-setup-smoke/install.sh | bash -s -- --version 2.1.4
189189
```
190190

191191
3) Paksa login via provider Antigravity dengan PATH prioritas:

install.ps1

Lines changed: 68 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,41 @@ function Test-OcsWorks {
930930
return $true
931931
}
932932

933+
function Test-OcsPowerShellPolicyBlocked {
934+
param([ref]$Diagnostic)
935+
936+
$Diagnostic.Value = ""
937+
938+
if ($env:OS -ne "Windows_NT") {
939+
return $false
940+
}
941+
942+
$ps1Path = Join-Path $env:USERPROFILE ".bun\bin\ocs.ps1"
943+
if (-not (Test-Path $ps1Path)) {
944+
return $false
945+
}
946+
947+
$escapedPath = $ps1Path.Replace("'", "''")
948+
949+
try {
950+
$probeOutput = (& powershell -NoProfile -Command "& '$escapedPath' --help" 2>&1 | Out-String).Trim()
951+
$probeExit = $LASTEXITCODE
952+
953+
if ($probeExit -ne 0 -and $probeOutput -match "running scripts is disabled|PSSecurityException|cannot be loaded because running scripts is disabled") {
954+
$Diagnostic.Value = $probeOutput
955+
return $true
956+
}
957+
} catch {
958+
$message = $_.Exception.Message
959+
if ($message -match "running scripts is disabled|PSSecurityException|cannot be loaded because running scripts is disabled") {
960+
$Diagnostic.Value = $message
961+
return $true
962+
}
963+
}
964+
965+
return $false
966+
}
967+
933968
function Test-OpencodeWorks {
934969
param([int]$TimeoutSeconds = 8)
935970

@@ -1892,6 +1927,27 @@ if (-not (Ensure-OcsCommand -PluginPath $PLUGIN_DIR -BasePath $rootDir -IsLocalS
18921927
Write-Warning "Manual fallback: clone private suite repo, then run bun install -g <repo-path>."
18931928
Write-Warning "If needed, add to PATH: $bunBin (and open a new terminal)"
18941929
}
1930+
$policyProbe = ""
1931+
if (Test-OcsPowerShellPolicyBlocked -Diagnostic ([ref]$policyProbe)) {
1932+
Write-Warning "PowerShell execution policy is blocking ocs.ps1 in regular shells."
1933+
Write-Output ""
1934+
Write-Output " QUICK FIX (no policy change):"
1935+
Write-Output " - Use cmd shim commands:"
1936+
Write-Output " ocs.cmd setup:profile"
1937+
Write-Output " ocs.cmd prefs"
1938+
Write-Output ""
1939+
Write-Output " Optional persistent fix (CurrentUser):"
1940+
Write-Output " Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force"
1941+
Write-Output ""
1942+
Write-Output " Session-only alternative:"
1943+
Write-Output " powershell -NoProfile -ExecutionPolicy Bypass -Command \"ocs setup:profile\""
1944+
Write-Output ""
1945+
if ($policyProbe) {
1946+
Write-Output " Detected error snippet:"
1947+
Write-Output " $policyProbe"
1948+
Write-Output ""
1949+
}
1950+
}
18951951
Write-Output ""
18961952
Ensure-OpencodePathEntries
18971953
Write-Output "Checking opencode command..."
@@ -1913,15 +1969,19 @@ if (Test-OpencodeWorks) {
19131969
Write-Output ""
19141970
Write-Output " Next steps:"
19151971
Write-Output " 1. Configure profile globally: ocs setup:profile"
1916-
Write-Output " 2. Setup Exa MCP via ocs command:"
1917-
Write-Output " - Create Exa account: https://dashboard.exa.ai"
1918-
Write-Output " - Create API key: https://dashboard.exa.ai/api-keys"
1919-
Write-Output " - Run: ocs exa setup --api-key <YOUR_EXA_API_KEY>"
1920-
Write-Output " - Verify: ocs exa check"
1921-
Write-Output " 3. Add account via: opencode auth login"
1922-
Write-Output " 4. Running Opencode via web UI:"
1972+
Write-Output " If Windows PowerShell blocks ocs.ps1, use fallback: ocs.cmd setup:profile"
1973+
Write-Output " 2. Optional PowerShell policy fix (CurrentUser):"
1974+
Write-Output " Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force"
1975+
Write-Output " Session-only alternative: powershell -NoProfile -ExecutionPolicy Bypass -Command \"ocs setup:profile\""
1976+
Write-Output " 3. Setup Exa MCP: ocs exa setup --api-key <YOUR_EXA_API_KEY>"
1977+
Write-Output " If blocked, use fallback: ocs.cmd exa setup --api-key <YOUR_EXA_API_KEY>"
1978+
Write-Output " 4. Verify Exa MCP: ocs exa check"
1979+
Write-Output " If blocked, use fallback: ocs.cmd exa check"
1980+
Write-Output " 5. Configure preferences: ocs prefs (optional, advanced users)"
1981+
Write-Output " If still blocked, use fallback: ocs.cmd prefs"
1982+
Write-Output " 6. Add account via: opencode auth login"
1983+
Write-Output " 7. Running Opencode via web UI:"
19231984
Write-Output " opencode web --port 8089"
1924-
Write-Output " 5. (Optional advanced) Configure preferences: ocs prefs"
19251985
Write-Output ""
19261986

19271987
if (Test-Path $TMP_DIR) {

install.sh

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,15 +1417,32 @@ ensure_antigravity_oauth_integrity "${setup_script}"
14171417

14181418
echo ""
14191419
echo " Next steps:"
1420-
echo " 1. Configure profile: ocs setup:profile"
1421-
echo " 2. Setup Exa MCP via ocs command:"
1422-
echo " - Create Exa account: https://dashboard.exa.ai"
1423-
echo " - Create API key: https://dashboard.exa.ai/api-keys"
1424-
echo " - Run: ocs exa setup --api-key <YOUR_EXA_API_KEY>"
1425-
echo " - Verify: ocs exa check"
1426-
echo " 3. Verify runtime: opencode auth login"
1427-
echo " 4. Run Opencode web UI: opencode web --port 8089"
1428-
echo " 5. (Optional advanced) Configure preferences: ocs prefs"
1420+
if [[ -f /proc/version ]] && grep -qiE 'microsoft|wsl' /proc/version; then
1421+
echo " 1. Configure profile: ocs setup:profile"
1422+
echo " If you run from Windows PowerShell and see ocs.ps1 blocked, use: ocs.cmd setup:profile"
1423+
echo " 2. Setup Exa MCP: ocs exa setup --api-key <YOUR_EXA_API_KEY>"
1424+
echo " If blocked in PowerShell, use: ocs.cmd exa setup --api-key <YOUR_EXA_API_KEY>"
1425+
echo " 3. Verify Exa MCP: ocs exa check"
1426+
echo " If blocked in PowerShell, use: ocs.cmd exa check"
1427+
echo " 4. Configure preferences: ocs prefs"
1428+
echo " If still blocked in PowerShell, use: ocs.cmd prefs"
1429+
echo " 5. Verify runtime: opencode auth login"
1430+
echo " 6. Start coding from this same shell session."
1431+
elif [[ "$(uname -s 2>/dev/null || true)" == "Darwin" ]]; then
1432+
echo " 1. Configure profile: ocs setup:profile"
1433+
echo " 2. Setup Exa MCP: ocs exa setup --api-key <YOUR_EXA_API_KEY>"
1434+
echo " 3. Verify Exa MCP: ocs exa check"
1435+
echo " 4. Configure preferences: ocs prefs"
1436+
echo " 5. Verify runtime: opencode auth login"
1437+
echo " 6. Run browser UI: opencode web --port 8089"
1438+
else
1439+
echo " 1. Configure profile: ocs setup:profile"
1440+
echo " 2. Setup Exa MCP: ocs exa setup --api-key <YOUR_EXA_API_KEY>"
1441+
echo " 3. Verify Exa MCP: ocs exa check"
1442+
echo " 4. Configure preferences: ocs prefs"
1443+
echo " 5. Verify runtime: opencode auth login"
1444+
echo " 6. Start coding!"
1445+
fi
14291446
echo ""
14301447
}
14311448

0 commit comments

Comments
 (0)