Skip to content

v1.1.60

Choose a tag to compare

@zhenruyan zhenruyan released this 07 Jul 10:27
· 434 commits to main since this release

Changelog

v1.1.60

✨ Features

  • Unified Serve Mode with Web UI

    • Added mothx serve CLI command to start a unified server exposing OpenAI-compatible APIs, a Web UI management panel, and messaging channels (WeChat/Feishu) simultaneously.
    • Added internal/serve/ package to unify Gateway, Hermes channel, and Web UI configuration and runtime management.
    • Configuration via serve.json (global ~/.mothx/serve.json, project .mothx/serve.json), supporting Gateway, channels, Web UI, Cron, Memory, Security, Hooks, and Agent settings.
    • Built-in Svelte Web UI panel with Dark theme, health check, channel status, config editor, settings editor, and chat interface with SSE streaming.
    • Web UI now includes full management APIs: /api/status, /api/sessions, /api/cron, /api/memory, and /ws/logs for real-time log streaming.
    • WebSocket gateway mounted at /ws, reusing Hermes event protocol for real-time communication.
    • Cron API supports CRUD operations with scheduler integration.
    • Gateway SessionPool now has List/Delete management interfaces.
    • Added --web-ui-dir CLI flag to override the Web UI static assets directory.
    • Added Lobster mode (--lobster) that auto-enables yolo mode, disables sandbox, and turns on sub-agents.
    • Gateway now supports an ExtraRoutes hook for Serve mode to inject custom API routes (/api/serve/config, /api/settings, /api/channels).
  • New Vendor Support

    • Added Huawei Cloud vendor (huawei, huawei-plan) with 13 models total, including standard and Plan reasoning modes.
    • Added Moore Threads vendor (mthreads-plan) with GLM-4.7 model (1M context).
    • Added Tianyi Cloud vendor (ctyun-plan) with 3 models including GLM-5-Turbo.
    • Added JD Cloud vendor (jd-plan) with 10 models including JoyAI-LLM-Flash.
    • Added Kimi-K2.5 and MiMo-V2.5-Pro to Gitee/Moark providers; fixed JD Plan config with missing models.

🐛 Bug Fixes

  • TUI Split Paste Event Coalescing

    • Some terminals split pasted text into separate key events. Added idle detection to wait for a quiet period before flushing the input queue.
    • Split paste events are now coalesced into a single paste when Enter appears within the stream followed by more text.
    • Extracted handleInputSubmit() for cleaner Enter key handling.
  • Legacy VIBECODING_DIR Handling

    • ConfigDir() now falls back to the default .mothx/ path when VIBECODING_DIR is set to the legacy default ~/.vibecoding, avoiding an unintended override of the new config directory.
    • ConfigDirOverridden() no longer reports a custom override when VIBECODING_DIR equals the default legacy path.
    • The stats CLI now reads sessionDir from config.LoadSettings() instead of calling platform.SessionDir() directly, ensuring it respects the configured session directory.

🧪 Tests

  • Added TestConfigDirIgnoresLegacyDefaultEnvDir and TestConfigDirHonorsCustomLegacyEnvDir to verify ConfigDir correctly ignores or honors VIBECODING_DIR based on whether it matches the legacy default.
  • Added TestLoadSettingsWithLegacyDefaultEnvCreatesMothXConfig to verify settings migration creates .mothx/ config when VIBECODING_DIR points to the legacy default.
  • Added TestOpenStatsDBUsesConfiguredSessionDir to verify the stats command resolves the session database path from settings.

v1.1.59

✨ Features

  • Tool Selection Rules in System Prompt

    • Added a "Tool Selection Rules" section to the agent system prompt, instructing the model to prefer dedicated tools (read, ls, grep, find) over bash for file inspection and discovery.
    • Explicitly discourages running cat, sed, awk, grep, find, ls, pwd via bash when equivalent dedicated tools exist.
  • Directory Migration to .mothx/

    • Install scripts (install.sh, install.ps1) now default to ~/.mothx/ (was ~/.vibecoding/).
    • Added MOTHX_INSTALL_DIR env var; VIBECODING_INSTALL_DIR remains as a legacy fallback.
    • Uninstall checks both old (~/.vibecoding/, ./.vibe) and new (~/.mothx/, ./.mothx) directories for backward compatibility.
    • npm postinstall scripts and README updated to reference ~/.mothx/settings.json.

🔧 Improvements

  • Bash Non-Interactive Subprocess & Process Group Kill

    • Bash tool subprocesses now run in non-interactive mode: stdin is set to empty (read sees EOF instead of blocking), and non-interactive env defaults are injected (GIT_TERMINAL_PROMPT=0, GIT_ASKPASS=true, SSH_ASKPASS=true, SSH_ASKPASS_REQUIRE=never, SUDO_ASKPASS=true) unless the user has explicitly set them.
    • On Unix, Setsid gives the shell its own session; cancellation kills the entire process group via kill(-pid) so auth helpers and grandchildren do not linger.
    • Added killCommandProcess helper shared by BashTool and JobManager for unified process termination.
  • TUI Auth Dialog Refactor

    • Auth input fields (API key, provider ID, model name, etc.) now use SetMaxLines(1) instead of SetMaxLines(3), enforcing single-line input for credential and identifier fields.
    • Introduced newAuthInput() helper to centralize editor creation, reducing duplication across auth_dialog.go, auth_model.go, auth_provider.go, and auth_settings_top.go.
    • Removed redundant editor imports from files that now use the helper.
  • Tests

    • Added TestAuthAPIKeyInputStaysSingleLine to verify auth input does not wrap into multiple lines.
    • Added TestLoadSettingsCreatesMothXConfigDir to verify settings creation uses .mothx/ and does not create .vibecoding/.

Full Changelog: v1.1.59...v1.1.60