Commit Graph
18 Commits
Author SHA1 Message Date
debpalash eaa28c9b37 Redact the normalized CLI key and keep a WebVTT cue that follows the header directly
Review fixes for #4558 and #4554.
2026-11-30 20:08:51 +05:30
felixpy 4b66ff93c7 test(cli): fail when a UTF-8 BOM stays on an API key 2026-11-30 02:22:05 +00:00
debpalash 5e4e90b299 Merge #4385: fix(cli): keep carriage returns inside a single TSV row 2026-11-23 13:02:30 +05:30
ShuaixinHuang b02ea5dc0a fix(cli): keep carriage returns inside a single TSV row 2026-11-23 14:28:38 +08:00
ShuaixinHuang 0bfb454402 fix(cli): complete global options before subcommands 2026-11-23 14:25:01 +08:00
debpalash 18e780d551 fix(cli): pass app switches given without a command to the app
The AppImage and .deb now start the voicestudio command, so the switches
Playwright launches Electron with (--inspect=0, --remote-debugging-port=0)
were a CLI usage error and v0.5.8-beta.4's Linux packaged smoke test could not
start the app. Any --switch the CLI does not define, with no command, now opens
the app with it, as Chromium flags given to the AppImage did before.

The packaged smoke test no longer dies on Playwright's stray launch rejections,
so its launch error now shows the process's stderr and exit code.
2026-11-11 00:52:43 +05:30
debpalash ad29939458 fix(windows): uninstaller offers to delete the downloaded runtime and models (#3911) 2026-11-10 05:15:23 +05:30
debpalash 6e2111eb7e fix(train7): follow CLI background tasks and accept every needed licence
- dub upload, dub ingest and dub generate answer a task id at once; the
  CLI now follows /tasks/stream/{task_id} to the end, printing progress to
  stderr, exits non-zero with the backend's error on a failed or cancelled
  task, cancels the task on Ctrl+C, and dub generate --output saves the
  rendered track instead of the task id JSON.
- models install/license accept list and accept every licence the model's
  engine needs (license_dependencies, e.g. OmniVoice's Higgs tokenizer),
  refuse an incomplete list, and record each displayed fingerprint.
2026-11-09 21:12:11 +05:30
debpalash dae6520a30 fix(train7): bare voicestudio opens the selected profile
Addresses review: launch_desktop ignored VOICESTUDIO_USER_DATA, which
background launches already pass, so the foreground app opened the
default profile. Both paths now share the profile argument, and an
explicit --user-data-dir still wins.
2026-11-09 18:06:39 +05:30
debpalash fa4ccd6124 fix(train7): make CLI output and prompts behave the same on Windows
- Write stdout/stderr as UTF-8 with LF line endings on every OS, so pipes
  and files get identical bytes instead of CRLF on Windows.
- Windows reports the NUL device as a TTY; a terminal is now also required
  to be a real console, so --yes is demanded (as elsewhere) instead of
  prompting with nobody to answer, and progress/binary checks agree.
- Register PowerShell completion for voicestudio.exe and .cmd shims too;
  the completion test uses a .cmd launcher on Windows.
2026-11-09 17:35:03 +05:30
debpalash cbf97daa24 fix(train7): compare CLI desktop paths against resolved temp roots
The CLI resolves executables, so on macOS (/private/var) and Windows
(8.3 short names such as RUNNER~1) the tests' unresolved temp paths
never matched. Resolve the fixture roots the same way.
2026-11-09 16:11:19 +05:30
debpalash f8340436a6 fix(train7): omit optional CLI bodies and check current startup rules
- The contract exporter now resolves Optional[Model] bodies (anyOf with
  null) and records whether a body is required. `voicestudio dub
  transcript clean` without fields sends no body, so the backend cleans
  the saved transcript instead of rejecting `{}` with a 422.
- The wheel smoke imported a POLICY table the CLI no longer defines; it
  now checks the OFFLINE/OBSERVE startup rules, and a unit test runs that
  check against the source tree so it cannot rot again.
- CLI tests and contract reads use explicit UTF-8.
- Explain the CLI's intentionally empty except clauses (CodeQL).
2026-11-09 15:39:16 +05:30
debpalash 15d9b3e71d fix(train7): keep voicestudio-electron link; GUI-safe launcher args
- The .deb's maintainer scripts are electron-builder's own plus a block
  that links the pre-rename /usr/bin/voicestudio-electron to the new
  command (replacing only a missing or dangling link) and removes it only
  when it is still this package's link. Sandbox tests run both blocks.
- Absolute paths and URLs passed by the desktop launcher (Exec ... %U)
  now open the app instead of being parsed as a command.
2026-11-09 14:37:01 +05:30
debpalash 5cce5de3ad fix(train7): address #3828 review findings
- Repair a profile whose VoiceStudio marker lost its PATH lines and an
  empty fish conf.d file instead of reporting the command as available.
- Configure ~/.zshrc for Linux zsh users who have none yet.
- Log only the error code when first-launch terminal setup fails, so the
  log carries no home path.
- Keep bash completion working on macOS's bash 3.2, which joined the
  sliced word list into one argument.
- Authorize the CLI contract test's backend client as loopback, matching
  main's consumer gate.
- Credit the contributor in the changelog fragment; drop unused imports.
2026-11-09 14:28:31 +05:30
mostafa-ismail-2004 0d6e3e2cbe fix(cli): keep profiles separate and finish interrupted terminal setup
- A chosen profile (--user-data-dir / VOICESTUDIO_USER_DATA) is reached
  only through its own backend.json; the CLI no longer falls back to the
  default port, which may belong to another profile, for commands or stop.
- An empty --user-data-dir= is a usage error instead of consuming the
  next argument.
- First-launch terminal setup rewrites profiles until every one carries
  the PATH block, so a run that failed halfway is finished on the next
  launch, and Settings only reports the command ready when it is.

Refs #3829
2026-11-05 20:16:01 +02:00
mostafa-ismail-2004 da7beca5cd fix(cli): read backend.json from the profile chosen with --user-data-dir
A launcher-supplied --user-data-dir now reaches the app it starts, so the
CLI must look for that app's backend.json in the same folder; otherwise a
custom profile's backend is never found and the command times out.
2026-11-05 19:48:57 +02:00
mostafa-ismail-2004 ff1aa131f6 fix(cli): address review findings on the terminal command
- Background launches keep the launcher's switches, so Snap's
  --no-sandbox reaches Electron and the app can start confined.
- A crashed backend fails fast instead of waiting out the startup budget.
- The AUR launcher runs the renamed executable, and package-managed
  installs (VOICESTUDIO_DISABLE_UPDATER=1) are told to update through
  their package manager instead of opening a disabled updater.
- Windows: PATH is edited in the registry as stored (unexpanded entries,
  same value type); the warning never blocks a silent install; an
  update keeps the PATH entry in case it rolls back.
- Relative command links are resolved against their own folder, and
  bash users with ~/.bash_profile get the PATH entry there.
- Settings shows a translated, actionable message when PATH setup fails.
- Tests: the network guard also blocks connect_ex and sendto; the lock
  tests synchronize on events instead of sleeps and kill the holder to
  test a real crash; a Windows path assertion is separator-agnostic.
2026-11-05 19:40:27 +02:00
mostafa-ismail-2004 4708ae9a51 feat(cli): add the voicestudio terminal command
Add a terminal command that drives the desktop app's local backend.

- The desktop app owns the backend. When no backend answers, the CLI
  starts the installed app in the background (no window); it publishes
  its address in backend.json and quits after 10 idle minutes. Opening
  the app later shows a window in the same process, so a terminal
  session and the GUI never run two backends.
- The backend reports activity (requests, jobs, downloads, installs,
  calls) at /system/activity so idle shutdown never interrupts work, and
  holds a kernel lock on its data directory so a second backend fails
  fast with an actionable message.
- `voicestudio stop` stops a background app; commands that only report
  state never start it, and `status` exits 3 when it is not running.
- Output is readable tables and fields chosen from each result's shape;
  `--json` prints the raw data and piped output is tab-separated.
- Tab completion for bash, zsh, fish and PowerShell
  (`voicestudio completion <shell>`), without building the command tree.
- `voicestudio update` opens the app's updater; the CLI itself makes no
  network requests.
- Settings → General shows the terminal command and can add it to PATH
  on request; shell profiles are only edited with that consent.
2026-11-05 18:18:58 +02:00