Mohamed Boudra 193c723714 refactor(cli): simplify agent mode command control flow
Context from recent agent work
- Prior commits focused on voice/background model gating, speech resolver typing, and timeline cursor loading.
- This change targets a separate CLI command path to avoid overlap.

What changed
- Normalized the optional mode argument once (`mode?.trim()`) and reused it.
- Removed duplicated `client.close()` calls and centralized cleanup in a `finally` block.
- Typed the daemon client variable explicitly (`Awaited<ReturnType<typeof connectToDaemon>> | undefined`).
- Kept user-facing behavior and error codes stable, including DAEMON_NOT_RUNNING and MODE_OPERATION_FAILED.

Reasoning
- The previous implementation duplicated lifecycle handling and relied on non-null assertions for mode values.
- Centralized resource cleanup lowers leak risk and makes control flow easier to audit.
- This is a behavior-preserving refactor aligned with the refactor skill contract.

Verification
- `npm run typecheck`
- `npx tsx packages/cli/tests/10-agent-mode.test.ts`

Accomplishments for next agent
- `runModeCommand` now has a single cleanup path and clearer branching for list vs set mode.
- Mode argument handling is explicit and trimmed before use.

Challenges / follow-up
- CLI output typing still requires `AnyCommandResult<any>` for mixed-shape commands due the current `withOutput` generic design.
- If desired, a future refactor can redesign output typing to support per-branch result schemas without `any`.
2026-02-14 01:23:01 +07:00
2026-01-26 18:03:51 +07:00
2026-02-13 09:09:39 +00:00
2026-02-05 14:27:26 +07:00
2026-02-08 21:12:40 +07:00
2026-02-05 15:08:41 +07:00

Paseo logo

Paseo

Manage coding agents from your phone and desktop.

Paseo app screenshot


Warning

Early development — Features may break or change without notice. Use at your own risk.

Paseo is a self-hosted daemon for Claude Code, Codex, and OpenCode. Agents run on your machine with your full dev environment. Connect from phone, desktop, or web.

Features

  • Self-hosted: The daemon runs on your laptop, home server, or VPS
  • Multi-provider: Works with Claude Code, Codex, and OpenCode from one interface
  • Multi-host: Connect to multiple daemons and see all your agents in one place
  • Voice input: Dictate prompts when you're away from your keyboard
  • Optional relay: Use the hosted end-to-end encrypted relay, or connect directly
  • Cross-device: iOS, Android, desktop, web, and CLI
  • Git integration: Manage agents in isolated worktrees, review diffs, ship from the app
  • Open source: Free and open source under MIT license

Quick Start

npm install -g @getpaseo/cli && paseo

Then open the app and connect to your daemon.

Local speech (STT/TTS)

Paseo can run dictation + voice mode STT/TTS fully locally via sherpa-onnx.

When the daemon starts with a local speech provider selected, it will download any missing model files automatically (unless PASEO_SHERPA_ONNX_AUTO_DOWNLOAD=0).

npm run speech:download --workspace=@getpaseo/server

Optional configuration:

  • PASEO_SHERPA_ONNX_MODELS_DIR (defaults to ~/.paseo/models/sherpa-onnx)
  • PASEO_SHERPA_ONNX_AUTO_DOWNLOAD (1 by default; set 0 to disable automatic downloads on daemon start)
  • PASEO_SHERPA_STT_PRESET (zipformer, paraformer, or parakeet for NVIDIA Parakeet TDT v3)
  • PASEO_SHERPA_TTS_PRESET (pocket-tts (Kyutai Pocket TTS), kitten, or kokoro)
  • PASEO_DICTATION_STT_PROVIDER, PASEO_VOICE_STT_PROVIDER, PASEO_VOICE_TTS_PROVIDER (sherpa or openai)

To see all supported local model IDs:

npm run speech:models --workspace=@getpaseo/server

Optional: run an end-to-end test that downloads real models and exercises streaming STT + streaming TTS:

PASEO_SPEECH_E2E_DOWNLOAD=1 PASEO_SPEECH_E2E_MODEL_SET=parakeet-pocket \
  npx vitest run --workspace=@getpaseo/server src/server/speech/sherpa/speech-download.e2e.test.ts

Documentation

See paseo.sh/docs for full documentation.

Desktop releases

Desktop app binaries are built and attached to a GitHub Release when you push a version tag (for example v0.1.0 or desktop-v0.1.0).

npm run version:all:patch
npm run release:push

For the full package release flow, use:

npm run release:patch

This triggers the Desktop Release workflow (.github/workflows/desktop-release.yml).

License

MIT

S
Description
No description provided
Readme AGPL-3.0
111 MiB
Languages
TypeScript 98%
JavaScript 1.4%
Shell 0.1%