Repository navigation
Partner v0.1.2
Partner v0.1.2
Each model endpoint can now speak either the OpenAI or the Anthropic wire format. Voice gained spoken approval: a request that needs your sign-off is read aloud, and with speech input on you can answer "批准执行" or "拒绝执行" out loud without saying the wake word first. The runtime changed substantially underneath — .NET 10, an incremental session projection, daily memory.db backups, and a sidecar that restarts itself after a crash and keeps a log. Several fixes land here for problems that could wedge a whole conversation or record a half-written answer as complete.
New
Pick OpenAI or Anthropic per model endpoint
Settings → Model, and each sub-agent's own model settings, gained a "protocol" choice. anthropic sends POST /messages (the Claude Messages API); openai is the previous behaviour.
- System prompts,
tool_use/tool_resultblocks, image attachments, SSE deltas, stop reasons and cached token usage all map onto the internal neutral model, so tool calls, the multi-step loop, the context budget and usage reporting are one implementation for both protocols. - "List models" and "test connection" follow the selected protocol instead of asking an Anthropic endpoint on an OpenAI path.
claudeis accepted as an alias foranthropic; casing and stray spaces are ignored.
Spoken approval
With speech output on, a request that needs your approval is read aloud. With speech input on as well, you can answer it by voice.
- The prompt reads the tool name and its source only — never the raw arguments, so paths and clipboard contents in them never reach the speaker.
- While an approval is pending and the speaker is idle, the microphone keeps listening without the wake word, and you do not have to wait for the prompt to finish. "批准执行" approves, "拒绝执行" refuses.
- With a wake word enabled, the wake-free listening is limited to those two commands: other speech during the wait does not enter the message queue. Without a wake word, other speech is treated as an ordinary message, as before.
- When several requests are pending, only the oldest is answered — the same one the screen lists first — and the confirmation says how many remain.
- An approval still expires after 120 seconds, and an unanswered request is still refused.
Short fragments are no longer read on their own
A new "minimum sentence length" setting (default 10 characters) joins a fragment shorter than that to what follows, measured from the previous ending: "嗯。好。……" is read as one sentence instead of three. English and Chinese punctuation follow the same rule, and a mixed sentence is not split by language.
Over the "break without punctuation after N characters" cap, the cut now prefers the last sentence ending, then a soft break, and only then the character count.
No polling while the window is in the tray
Hiding the window to the tray pauses the UI's polling (session, jobs, schedules, settings) and restores it the moment the window comes back.
Improvements
- Appending to the session log no longer rebuilds the whole projection. Every append used to read the entire log back and re-deserialise it; now only the line just written is parsed and added to the cache. At 40,000 events, a cache hit drops from roughly 280 ms to under a millisecond.
- Migrated to .NET 10. .NET 8 reaches end of support on 2026-11-10, and this app ships self-contained — a runtime patch only reaches you through a new release — so the move happens here. It also switches to Workstation GC: a 25,000-event session under the same load drops from about 2.4 GB of working set to about 250 MB.
memory.dbis backed up daily. Backups go to abackups/directory beside the database and the newest 7 are kept. A startup catch-up runs when the last backup is more than a day old, and the maintenance pass backs up before it physically removes soft-deleted rows.- The API sidecar restarts itself after a crash. Its output now goes to
<local app data>/Partner/partner-api.log, capped at 10 MB with onepartner-api.1.logrotation. An abnormal exit restarts it with exponential backoff from 500 ms up to 30 s; an intentional stop does not. - Sub-agent job logs keep only the newest 30. A job that is still running is never pruned.
- The sentence-length settings moved to Voice output → Read-aloud. Both only decide how a reply is cut for reading, yet they sat in the input card next to settings that govern recognition.
Fixes
- Tool-call arguments in the history were truncated into invalid JSON, failing every later turn of that session. The raw arguments string was cut at 400 characters to save room, which could leave an unterminated quote; strict OpenAI-compatible servers (llama.cpp, for one) parse tool-call arguments when replaying the history and rejected the whole request with HTTP 500 — and kept rejecting every turn after it. String values inside the JSON are shortened instead, and already-stored broken arguments are replaced with
{}so the conversation can recover. - A connection that closed before the finish frame recorded a half answer as complete. Dropping between two SSE frames left the text received so far syntactically valid, so the loop exited normally and half a sentence was stored as a
stop. A losttool_callsframe did the same: the turn ended after the preamble with no call made. Afinish_reasonor[DONE]is now required, and atool_callsfinish with no complete call is rejected. - The local model sometimes announces an action and then stops without calling a tool. It says "我先查一下:" and ends with
finish_reason=stop;max_tokensis not the cause, because the server reportsstop, notlength. Replaying the session reproduces it, and the same request withtool_choice=requiredyields the call. That short colon-terminated preamble is now recognised and retried once with the tool choice forced. - Saving settings failed outright on a machine with no sound card or no microphone. When an audio device opened but failed to start (no playback or no capture endpoint), the exception escaped
PUT /api/settingsas a 500 and nothing in the settings page could be saved — the whole document failed with it. A half that will not start now reports the reason instead ("启动输出设备失败:…", "启动输入设备失败:…") and the other half keeps running. A device that will not open was already handled this way; this release covers the start failure too.
Upgrading
- The settings file migrates itself.
input.maxSplitCharsandinput.minSentenceCharsin an old file move underoutputwith their stored values; when the new location already has a value, that value wins. - This build is self-contained .NET 10 — no separate runtime to install.
- The voice engines are still not in the installer. Download them from Settings → Local engines after installing; the URLs and SHA-256 are pinned to the
engines-v1release.
Engineering
The release pipeline used to mark the unit tests continue-on-error, so a red test still shipped: v0.1.0 and v0.1.1 both went out with 5 failing API tests. Releases now run the same gate as CI on master — docs and CSS contracts, build, unit tests, the capability-baseline smoke run, frontend typecheck and contract tests, production build — and nothing publishes while any of it is red. The capability manifest holds 70 entries; a downgrade in any one of them blocks the release.
The voice engines are downloaded from the engines-v1 release on first use; their URLs and SHA-256 are pinned in this build. The app code is MIT licensed; the engine runtimes and model weights keep their own licences, see THIRD-PARTY-NOTICES.md in the release assets.