Commit graph

85 commits

Author SHA1 Message Date
yiliang114
bae933332e fix(installer): address standalone review feedback 2026-05-15 15:14:34 +08:00
yiliang114
40ac124927 fix(installer): harden standalone release fallback 2026-05-15 01:54:27 +08:00
yiliang114
8fb2bc1254 fix(installer): resolve Aliyun latest via version pointer 2026-05-14 22:49:07 +08:00
yiliang114
db0a44d620 fix(installer): update download commands to use progress indicators for curl and wget 2026-05-14 20:22:27 +08:00
yiliang114
d2ebed9ac1 fix(uninstall): match shell-quoted paths when removing the wrapper
The installer's write_unix_wrapper shell-quotes the binary path, so
paths containing single quotes (or other shell metacharacters) appear
as shell-quoted strings in the generated wrapper file. The uninstall
script's literal grep -qF missed these, leaving the wrapper orphaned.

Add shell_quote to the uninstall script and match against both the raw
and shell-quoted forms before removing the wrapper.
2026-05-14 17:44:17 +08:00
yiliang114
75e5b58806 feat(installer): add standalone uninstall scripts 2026-05-14 17:31:44 +08:00
yiliang114
74130fc79e fix(installer): make Windows standalone shim available in cmd 2026-05-14 17:00:03 +08:00
yiliang114
ccbdd34f39 fix(installer): auto-backup non-qwen directories and simplify output
- ensure_managed_install_dir / :EnsureManagedInstallDir now back up
  non-qwen directories instead of refusing to install, so users
  upgrading from npm or old installers don't hit a hard error
- Simplify header/footer output: remove banner bars, verbose INFO
  lines, and redundant "Installation completed!" message
- Match bun.sh / code-server style: minimal, to the point
2026-05-14 15:23:18 +08:00
yiliang114
046d200293 fix(installer): suppress progress bars for small downloads and Expand-Archive
- .ps1: replace curl.exe -# with silent mode, suppress Invoke-WebRequest
  progress bar; save/restore $global:ProgressPreference
- .bat: add $ProgressPreference = 'SilentlyContinue' before Expand-Archive
  to prevent full-screen extraction progress UI
- .sh: remove --progress-bar / --show-progress from download_file, always
  use silent curl/wget
2026-05-14 15:09:45 +08:00
yiliang114
01e9767421 fix(installer): use curl.exe -# progress bar in Windows downloads
Prefer curl.exe with -# (hash-mark progress bar) for archive and installer
downloads on Windows 10+. Falls back to Invoke-WebRequest (which shows its
own progress bar) when curl.exe is unavailable. Matches the approach used
by code-server (curl -#fL) and bun.sh (curl.exe -#SfLo).
2026-05-14 13:47:04 +08:00
yiliang114
4b950aba7c fix(installer): suppress PowerShell progress bar in bat installer downloads
Add $ProgressPreference = 'SilentlyContinue' to DownloadFile so the
full-screen progress UI does not appear during archive downloads in
interactive PowerShell sessions, consistent with the .ps1 shim.
2026-05-14 13:34:08 +08:00
yiliang114
4095171f64 fix(installer): suppress PowerShell progress bar in hosted entrypoint shim
Add $ProgressPreference = 'SilentlyContinue' to the .ps1 wrapper so
Invoke-WebRequest downloads don't render a progress bar when invoked
via the irm | iex one-liner.
2026-05-14 13:29:01 +08:00
yiliang114
540bcb8c28 fix(installer): harden hosted release script checks 2026-05-14 10:34:46 +08:00
yiliang114
c6005a74bb feat(installer): refactor argument parsing and utility functions for release scripts 2026-05-14 01:11:19 +08:00
yiliang114
0c8022d491 fix(installer): address hosted installer review gaps 2026-05-13 23:54:05 +08:00
yiliang114
645edb8ec2 chore(installer): remove temporary OSS smoke workflow 2026-05-13 23:35:44 +08:00
yiliang114
48977aeef9 fix(installer): make OSS release assets public-readable
Some checks failed
OSS Smoke Test / Verify Aliyun OSS Credentials (push) Has been cancelled
2026-05-13 23:19:30 +08:00
yiliang114
b0ae7f89f9 ci(installer): add temporary OSS smoke test 2026-05-13 23:12:40 +08:00
yiliang114
7d328be114 feat(installer): wire Aliyun OSS sync, address review followups
- Add Aliyun OSS sync steps to release workflow: package hosted assets,
  install pinned ossutil, configure credentials, upload versioned and
  latest paths, and verify upload via verify:installation-release plus
  curl probes against the hosted installer endpoint.
- Document required production-release environment secrets and bucket
  variables in INSTALLATION_GUIDE.md.
- Restructure hosted endpoint guidance to lead with the pre-sync
  warning, splitting "Run today" (local checkout) from "After the OSS
  sync" (hosted one-liners) so users no longer copy a one-liner that
  silently installs latest.
- Distinguish mirror auto-selection timeout from successful selection
  in install-qwen-standalone.sh and install-qwen-standalone.bat: emit
  a "timed out; defaulting to github" log instead of pretending the
  HEAD probe picked github.
- Support QWEN_INSTALLER_BAT_URL override (https only) in the
  PowerShell shim so staging mirrors can be exercised without forking
  the file.
- Strip a leading UTF-8 BOM in verify-installation-release.js
  parseSha256Sums so BOM-prefixed SHA256SUMS reports a useful
  "Missing checksum entry" error instead of "Malformed SHA256SUMS
  line 1".
- Add tests for verifier HEAD→Range fallback, partial-failure
  formatting, all-failure wording, and BOM tolerance.
2026-05-13 21:22:39 +08:00
yiliang114
72a5efe744 fix(installer): make Windows option validation readable 2026-05-13 20:43:30 +08:00
yiliang114
90935774a2 fix(installer): stabilize Windows installer tests 2026-05-13 19:58:07 +08:00
yiliang114
984b1a9a0e fix(installer): address hosted installer review followups 2026-05-13 19:29:49 +08:00
yiliang114
5f649c9523 chore(installer): stage standalone hosted entrypoints 2026-05-13 19:09:20 +08:00
yiliang114
af64da874f feat(installer): restore hosted PowerShell entrypoint 2026-05-13 18:53:45 +08:00
yiliang114
fedcbae1c9 chore(installer): narrow hosted release diff 2026-05-13 17:26:05 +08:00
yiliang114
b8e54900f2 chore(installer): trim hosted release diff scope 2026-05-13 16:58:20 +08:00
yiliang114
eeabd1b8dd fix(installer): stage direct hosted install scripts 2026-05-13 16:47:33 +08:00
yiliang114
68f05db518 feat(installer): add hosted install-qwen.ps1 shim for irm|iex one-liner
The previous Windows quick-install one-liner used `Invoke-WebRequest -OutFile
(Join-Path $env:TEMP 'install-qwen.bat'); & (Join-Path …)`. When pasted into a
narrow terminal, line wrap could land on `-OutFile`, orphaning the parameter
from its value and producing the "missing argument for OutFile" failure
followed by a "file not found" when the second `&` ran. PowerShell's line
continuation rules cannot resolve this for parameter-name-at-EOL.

Add `install-qwen.ps1` as a thin hosted entrypoint that downloads
`install-qwen.bat` into TEMP, runs it, and cleans up. Documented one-liner
becomes the standard pattern used by bun, uv, scoop, deno, pnpm:

    powershell -ExecutionPolicy Bypass -c "irm <url>/install-qwen.ps1 | iex"

The `.bat` remains the source of truth for installer behavior; `.ps1` is just
the modern hosted entrypoint. Version pinning via `$env:QWEN_INSTALL_VERSION`
flows through unchanged. Stored with `*.ps1 -text` so CRLF survives both
GitHub raw and OSS uploads, matching the existing `.bat` handling.
2026-05-13 14:27:50 +08:00
yiliang114
926c10a604 feat(installer): add standalone archive installer with multi-platform release workflow
- Add standalone archive installer (bat/sh) that downloads platform binaries
  from GitHub/Aliyun without requiring Node.js or npm on the target machine
- Add fork-friendly release-test workflow for manual GitHub Release creation
  covering all 5 platforms (darwin-arm64/x64, linux-arm64/x64, win-x64)
- Add OSS upload/mirror tools for staging and release distribution
- Update .gitignore to exclude generated build artifacts (release-staging/,
  hosted-staging/)
- Fix Windows PowerShell test command in copy-release-to-latest tool
2026-05-13 00:29:22 +08:00
yiliang114
d0bd8c6639 fix(scripts): address release verifier review feedback 2026-05-12 00:27:23 +08:00
yiliang114
d2acf7f86f fix(installer): remove stale node 20 installer references 2026-05-11 21:22:09 +08:00
yiliang114
bb8b81043f test(installer): allow Windows archive validation more time 2026-05-11 20:59:17 +08:00
yiliang114
728b35fd41 fix(installer): align npm fallback node gate with engines 2026-05-11 20:43:33 +08:00
yiliang114
a244a2e602 fix(test): escape release asset regex 2026-05-11 19:29:56 +08:00
yiliang114
f6696e8d73 feat(installer): fold hosted release checks into installer flow 2026-05-11 18:58:16 +08:00
yiliang114
7d4fc1301c test(installer): relax Windows installer timeout 2026-05-11 16:36:53 +08:00
yiliang114
1f1f5cd5f5 fix(installer): stabilize Windows managed install checks 2026-05-11 16:18:15 +08:00
yiliang114
fddbfdc53f fix(release): tighten standalone asset checks 2026-05-11 15:58:07 +08:00
yiliang114
1502f72852 fix(installer): repair Windows installer tests 2026-05-11 15:55:57 +08:00
yiliang114
1917316b12 fix(installer): address standalone review follow-ups 2026-05-11 13:50:33 +08:00
yiliang114
4eb3108f0c chore(installer): merge main after standalone installer landed
# Conflicts:
#	scripts/build-standalone-release.js
#	scripts/create-standalone-package.js
#	scripts/installation/INSTALLATION_GUIDE.md
#	scripts/installation/install-qwen-with-source.bat
#	scripts/installation/install-qwen-with-source.sh
#	scripts/tests/install-script.test.js
2026-05-11 13:36:02 +08:00
易良
cb7059f54d
feat(installer): add standalone archive installation (#3776)
* feat(installer): add standalone archive installation

* fix(installer): harden standalone archive installs

* fix(installer): address standalone review findings

* chore(installer): clarify review followups

* fix(installer): stabilize standalone script checks

* chore(installer): remove internal planning docs

* chore(installer): simplify standalone release review fixes

* test(installer): add Windows batch install smoke

* test(installer): fix Windows batch smoke quoting

* test(installer): preserve Windows cmd quotes

* fix(installer): use robust Windows checksum hashing

* ci: narrow installer debug matrix

* fix(installer): address standalone review hardening

* fix(installer): avoid Windows validation parse errors

* fix(installer): simplify Windows option validation

* fix(installer): harden standalone review fixes
2026-05-11 13:25:48 +08:00
Yan Shen
9bd5a0180b
feat(cli): core built-in i18n coverage (#3871)
* feat(i18n): expand built-in locale coverage

* feat(cli): add dynamic slash command translation

* test(cli): stabilize session picker assertions

* fix(core): close jsonl readers before cleanup

* fix: address i18n review regressions

* fix(cli): address dynamic i18n review findings

* fix(cli): address i18n review follow-ups

* fix(cli): address i18n review feedback

* test(cli): align i18n parity coverage with strict locales

* fix(cli): address i18n review findings
2026-05-10 22:35:03 +08:00
yiliang114
362bf588f8 fix(installer): tighten verifier base-url + clarify test helper
Three small refinements from the second review pass:

- normalizeHttpsBaseUrl rejects everything except https, since real release
  URLs are always HTTPS. Accepting http previously would let an operator
  silently target a stale or attacker-controlled mirror.
- Drop EXPECTED_RELEASE_ASSET_NAMES from the public exports; it was only
  used internally for the verification log line.
- Rename the test helper standaloneChecksumContent to
  placeholderChecksumContent and document that the hashes in its output are
  placeholders — the remote verifier does not download archives or compare
  hashes, it only validates that SHA256SUMS lists the expected names and
  that each archive URL is reachable.

The non-https rejection test now also covers `http://` in addition to the
existing `file://` case.
2026-05-07 21:08:48 +08:00
yiliang114
4100b8e239 feat(installer): verify installation release assets
Adds `npm run verify:installation-release` and wires it into the release
workflow after `Build Standalone Archives`, so a broken release directory
fails CI before publishing.

Local mode (`--dir PATH`) checks:
- All five `qwen-code-{platform}.{ext}` standalone archives exist.
- `SHA256SUMS` covers exactly those five — missing or unexpected entries fail.
- Each archive's actual SHA256 matches its `SHA256SUMS` entry.

Remote mode (`--base-url URL`) checks:
- `SHA256SUMS` is downloadable, parseable, and contains exactly the expected
  archive entries.
- Each archive URL is reachable via HEAD, with a 1-byte ranged GET fallback
  for hosts that disable HEAD.

Hosted installer scripts (`install-qwen.sh` / `install-qwen.bat`) are
intentionally out of scope here — they are served from the hosted endpoint
prepared by `package:hosted-installation` (PR #3853), not from the GitHub
Release surface this verifier targets.
2026-05-07 20:09:30 +08:00
yiliang114
2e4086aa4a fix(installer): tighten hosted default-version check, flag legacy URL
- Replace the loose `latest` fragment check with per-format regex patterns
  in HOSTED_INSTALLER_DEFAULT_VERSION_PATTERNS so an unrelated occurrence
  of `latest` (comment, help text) cannot satisfy the staging guard. The
  patterns still tolerate whitespace variation, only the default-version
  assignment itself must be intact.
- Add a "Hosted endpoint status" callout in INSTALLATION_GUIDE.md before
  the curl examples. The documented `--version` flow does not work against
  the OSS URL today because it currently serves the legacy NVM-based
  installer; the callout points users at a local checkout until the next
  release sync.
- Tests: drop `latest` from the fragments equality assertion, add positive
  and negative regex coverage, add a failure-path case for sources whose
  default version is not `latest`, and pin the new guide markers so the
  callout cannot silently disappear.
2026-05-07 19:03:22 +08:00
yiliang114
51778f9fb8 fix(installer): refine hosted asset staging 2026-05-07 17:47:53 +08:00
yiliang114
27a1bbee1a fix(installer): reject stale hosted assets 2026-05-07 17:15:57 +08:00
yiliang114
587dc1f2c6 feat(installer): stage hosted installation assets 2026-05-07 16:54:43 +08:00
yiliang114
f9d9a3b6be fix(installer): keep installer entrypoint hosted 2026-05-07 16:33:32 +08:00