Skip to content

v1.7.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Nov 14:17

English

Added

  • The terminal can bring a session back after it restarts: when the terminal sets
    OSC7577_TOKEN, prux reports the exact command that reopens the current session (session file,
    --agent-dir when it was moved, and the restriction flags the session was started with) and
    removes the token from its own environment so child processes never see it. The command is
    re-reported when the session changes, cleared on a normal quit (a signal shutdown keeps it, which
    is when the terminal needs it), and printed as To resume this session: after exit.

  • --agent-dir <dir>: the command-line form of PRUX_AGENT_DIR. It is applied before anything
    reads the config directory (extension registration, bin on PATH, the crash hook) and resolved
    to an absolute path, so the resume command above works from any directory.

  • models.generateImages() accepts { aspectRatio?, size? }: the optional third argument is
    mapped to OpenRouter's image_config (aspect_ratio / image_size). Unknown keys and empty
    values are rejected instead of being silently ignored.

  • Extension dialogs can say what they are waiting for: ask_prompt_with_kind() (and the
    blocked_kind field on the dialog request) reports a dialog as permission, question or
    login instead of the host guessing from the panel type. The tool-permission and hook gates use
    permission.

  • A transcript notice when the provider withholds reasoning: when a request drops reasoning
    items (a signature that no longer matches, e.g. after compaction), the transcript says how many
    were dropped, gated by notices.reasoningDrops and only when the count grows past the previous
    response so a replayed history is not warned about twice.

Changed

  • Default models and the Qwen Token Plan endpoints moved: openai and azure default to
    gpt-6.2-sol, ant-ling to Ling-3.1-flash (its thinkingFormat is now accepted as an alias of
    deepseek), and the four Qwen Token Plan providers use token-plan.maas.qwencloudapi.com /
    token-plan.maas.qianwenaiapi.com. Each plan has its own key variable
    (QWEN_TOKEN_PLAN_TEAM_API_KEY, QWEN_TOKEN_PLAN_TEAM_CN_API_KEY,
    QWEN_TOKEN_PLAN_INDIVIDUAL_API_KEY, QWEN_TOKEN_PLAN_INDIVIDUAL_CN_API_KEY). The previous shared
    QWEN_TOKEN_PLAN_API_KEY / QWEN_TOKEN_PLAN_CN_API_KEY are no longer read, so an existing setup does
    need to rename its variable to the plan it uses.

Fixed

  • Key hints follow keybindings.json: the settings list, the extension settings panel, the
    /model and /thinking panels and the empty session list printed literal Enter / Esc /
    ctrl+n. They now read the configured binding (falling back to the old wording when an action is
    unbound), so a remapped key is named correctly.

  • An exported session shows hyperlinks as links: OSC 8 hyperlinks in tool output were escaped
    into the HTML as unreadable bytes. Colour and cursor escapes are still stripped the way the TUI
    does it, but the OSC 8 markers now render as clickable links (the URL still goes through the same
    scheme allow-list), so the link text stays and the escapes are gone. Output that goes through
    syntax highlighting is split into links as well.

  • The trust dialog reports that prux is waiting for you: the project trust / /trust panels were
    excluded from the blocked program status, so terminals that show it displayed a busy program.
    They now report kind=permission.

  • Suspending no longer leaves the terminal dirty: Ctrl+Z (or an external kill -TSTP) used to
    stop the process with mouse tracking, the Kitty keyboard protocol and the alternate screen still
    on, so the shell prompt after fg came back into a garbled screen. The terminal is restored
    before suspending, and fg re-enters raw mode / alternate screen and redraws the whole frame.

  • developer role is used for the official OpenAI endpoint again: the role was never sent
    because the catalog declared it for no model. It is now derived from the base URL (only
    api.openai.com), and compat.supportsDeveloperRole still overrides it.

  • Prefixed Gemini 3+ model IDs get tool-call ids: an ID such as vendor-gemini-4-argon was
    treated as an old Gemini, so its tool calls went out without the id the API requires. The version
    is now read from anywhere in the ID. A prompt blocked by the safety filter now reports the block
    reason and the safety ratings instead of "Google stream ended without a finish reason".

  • /reload keeps the tools that tool_search loaded: the activated deferred tools only lived in
    process memory, so reloading the tool list dropped them. They are now rebuilt from the session
    history, the same path a resumed session uses.

  • find matches path patterns inside the search directory: a pattern with a / in it was
    rewritten to **/<pattern> and matched against the full path, so src/**/*.ts searched with
    path: "src" returned files from every directory of that name, and pkg/src/a.ts matched
    src/*.ts. The pattern is now anchored at the search directory: src/*.ts finds src/a.ts and
    nothing above it, **/src/*.ts still matches at any depth, and ./ prefixes keep working.

  • read no longer stores "this model does not support images": the text ended up in the tool
    result that is replayed on later turns, so switching to a vision model still told the model that
    images were unsupported. The reason now goes to the result details (imageOmitted) instead of the
    model-facing text, and the image is still replaced per request for models without image input.

  • Truncated bash output says where the full log went, or why it could not be saved: when the
    output was truncated but the full log could not be written (a full /tmp, a quota, no
    permission) the tool said nothing. The details, the structured output and the RPC result now carry
    fullOutputError, and the text ends with Full output could not be saved: <reason>. An output
    that ends with a line over the limit followed by a blank line now reports the end of that line
    instead of Showing lines 3-2 of 2 or (no output).

  • More transient provider failures are retried: Cloudflare HTTP 525, gateway messages such as
    "the provider is temporarily unavailable" / "the connection to the provider was reset", throttling
    worded as "request rate increased too quickly", and socket errors reported only as
    ECONNRESET / EPIPE / ETIMEDOUT used to fail the turn; they now back off and retry.

  • An error code that merely contains request_too_large no longer triggers compaction: a body
    mentioning plugin_request_too_large was treated as context overflow, so an unrelated request
    error was compacted and retried. Only the error code itself counts now.

  • A broken models.json is reported instead of silently ignored: a typo such as
    "contextWindow": "32000" used to look like a missing model or a missing API key. Parsing now
    reports one warning with the file path and the parse error, and that warning reaches you in every
    mode — in the chat on startup and again after /new, /resume or /fork, on stderr for the RPC
    server. A model that fell back to the default and an enabledModels pattern that matched nothing
    travel the same channel, once per problem.

  • /copy and the RPC get_last_assistant_text skip an empty answer: pressing Esc during a tool
    call or hitting a provider error left the last assistant message without text, and /copy said
    "No agent messages to copy yet." — it now copies the previous answer.

  • A very long URL is no longer turned into a hyperlink: URLs over 8192 characters are rendered as
    plain text, so a bare URL inside a multi-megabyte line can no longer exhaust memory in terminals
    with OSC 8 hyperlinks.

  • A repeated prompt moves to the top of the history: submitting a prompt that is already in the
    history added a second copy, so Up-arrow walked the same text again and again. It is now moved to
    the most recent position instead.

  • Wayland copies are sent as text/plain: wl-copy guessed the MIME type from the text, so text
    starting with def became application/x-ruby and clipboard managers such as Klipper dropped it.

  • A Mermaid diagram that is too wide says how wide it needs to be: the code block fell back to
    its source without explanation. It now shows one line with the required and available columns.

  • Windows finds Git Bash before the WSL launcher: a Git for Windows installed outside Program
    Files was missed and commands ran through System32\bash.exe, which starts WSL. The shell path is
    now taken from git var GIT_SHELL_PATH (Git 2.47+) before scanning PATH.

  • Strict tools are only used where the schema allows it: a tool whose schema has a node without
    type (items: {}, a bare const) is rejected by OpenAI with a 400, so such tools now go out
    non-strict; tools with JSON-schema constrained sampling keep strict mode. Responses API tools now
    send strict explicitly, which stops GitHub Copilot from filling omitted optional arguments with
    empty strings or invented values, and Anthropic tools keep the root additionalProperties and
    $schema so the model is told that extra arguments are not allowed.

  • Image models report the full usage and fail when they should: reasoning tokens were dropped
    from image usage, image output tokens were priced at the text rate, and a response with no
    choices, a provider error or an unsuccessful finish reason was reported as success. Image calls
    now keep reasoning tokens, price image output at the model's cost.imageOutput rate, use the
    amount the provider billed when it reports one, and return an error otherwise.

  • Classifier results say which call produced them: responseId is returned when the provider
    reports it, and a billed amount replaces the catalog estimate instead of being ignored. This
    applies to both the System One and the OpenAI Decisions paths.

  • A credential command that fails no longer counts as configured: a models.json apiKey
    written as !command was always treated as configured, so the provider showed up as available and
    every request then failed with "No API key found". The command is now resolved (cached for 60
    seconds, so a fixed command recovers on its own), and /login shows
    not configured · stored key did not resolve for a command that returns nothing.

  • Notice switches are per category: the single showCacheMissNotices is replaced by
    notices.cacheMisses and notices.cacheWarming (the schema also carries
    notices.compactionCosts and notices.reasoningDrops), each with its own row in /settings and in
    the desktop settings panel. An existing showCacheMissNotices keeps working: it is the fallback for
    every category whose own key is not set, so an upgrade does not silently change what you are told.

  • Images come back after a full-screen redraw: clearing the terminal makes the terminal release
    the image data it was given, but each image only transmits itself once, so the redraw drew nothing
    where pictures used to be. The image cache is now dropped together with the screen, and the next
    frame transmits again.

  • An MCP server that describes itself is described in the system prompt: the mcp_servers
    section only knew the description from mcp.json. A server that explains itself in the
    instructions of its initialize reply now appears with that text when the config has no
    description of its own.

  • Gemini 3+ tools are sent with a strict schema: the Google request never asked for validated
    function calling, so a schema the model silently ignored produced invented arguments. Models that
    declare compat.supportsStrictMode — and Gemini 3 and later by default — now request
    toolConfig.functionCallingConfig.mode = "VALIDATED".

  • Coloured tool output no longer leaves escape parameters behind: stripping a colour sequence
    consumed only ESC [ and left the parameters and final byte in the text, so ESC[31mred was shown
    as 31mred. The whole sequence is dropped now.

  • Ctrl+Break and closing the console shut down cleanly on Windows: a console control event used
    to end the process without restoring the terminal or finishing the session file. Ctrl+Break, a
    closed console window, logoff and shutdown now request a normal shutdown; Ctrl+C still interrupts
    the current turn.

  • A session switch rebuilds the tools once: /fork, /clone and /resume handed the new
    session to the extensions twice — once with its path, and again when the session file was reported
    back — so plan-mode and goal each asked for a tool rebuild and extensions updated: tools rebuilt
    appeared twice. The session-file hand-over now re-dispatches only when the path actually changed.

中文

新增

  • 终端重启后能接回会话:终端设置 OSC7577_TOKEN 时,prux 上报重开当前会话的完整命令
    (会话文件、改过位置时的 --agent-dir,以及会话启动时的限制参数),并把这个 token 从自身环境里
    删除,子进程不会继承。会话切换时重新上报,正常退出时清除(信号退出保留,那正是终端要用它的
    时候),退出后打印 To resume this session:。

  • --agent-dir <dir>:PRUX_AGENT_DIR 的命令行形式。在任何读取配置目录的动作(扩展注册、
    bin 入 PATH、崩溃钩子)之前生效,并解析成绝对路径,上面那条 resume 命令因此在任何目录都能用。

  • models.generateImages() 接受 { aspectRatio?, size? }:可选第三参数映射到 OpenRouter 的
    image_config(aspect_ratio / image_size)。未知键与空值会被拒绝,不再静默忽略。

  • 扩展对话框能声明自己在等什么:ask_prompt_with_kind()(以及对话框请求上的 blocked_kind
    字段)可把对话框上报成 permission / question / login,不再由宿主按面板类型猜。工具权限与
    hook 门控用的是 permission。

  • provider 扣下推理时在转录里提示:请求丢弃 reasoning item(签名不再匹配,如压缩之后)时,
    转录里说明丢了多少条,由 notices.reasoningDrops 控制开关,且只在数量超过上一次响应时提示,
    回放同一条历史不会重复提醒。

变更

  • 默认模型与 Qwen Token Plan 端点更新:openai / azure 默认改指 gpt-6.2-sol,ant-ling 改指
    Ling-3.1-flash(其 thinkingFormat 现在按 deepseek 的别名接受),四个 Qwen Token Plan provider
    改用 token-plan.maas.qwencloudapi.com / token-plan.maas.qianwenaiapi.com。每个套餐有独立的环境
    变量(QWEN_TOKEN_PLAN_TEAM_API_KEY、QWEN_TOKEN_PLAN_TEAM_CN_API_KEY、
    QWEN_TOKEN_PLAN_INDIVIDUAL_API_KEY、QWEN_TOKEN_PLAN_INDIVIDUAL_CN_API_KEY)。原先共用的
    QWEN_TOKEN_PLAN_API_KEY / QWEN_TOKEN_PLAN_CN_API_KEY 不再读取,已有配置需要改成自己套餐的变量名。

修复

  • 键位提示跟 keybindings.json 走:设置列表、扩展设置面板、/model 与 /thinking 面板、空会话列表
    里写死了 Enter / Esc / ctrl+n。现在读取实际绑定的键(动作未绑定时回退原本文案),改过键位后提示
    显示的就是真实按键。

  • 导出的会话里超链接真的能点:工具输出里的 OSC 8 超链接曾被原样转义进 HTML,显示成不可读的字节。
    颜色与光标类转义仍按与 TUI 同一套规则剥掉,OSC 8 标记则渲染成可点击链接(URL 仍走同一份 scheme
    白名单):链接文字保留,转义序列消失。走了语法高亮的输出同样拆成链接。

  • 信任对话框会如实上报「在等你」:项目信任与 /trust 面板以前被排除在 blocked 程序状态之外,
    支持该状态的终端会显示程序在忙。现在上报 kind=permission。

  • 挂起不再弄脏终端:Ctrl+Z(或外部 kill -TSTP)以前在鼠标跟踪、Kitty 键盘协议与备用屏仍开着时
    就把进程停住,fg 回来后 shell 提示符落在花屏上。现在挂起前先还原终端,fg 后重新进入 raw mode /
    备用屏并整帧重绘。

  • 官方 OpenAI 端点重新使用 developer 角色:目录里没有任何模型声明该能力,导致这个角色从未发出。
    现在按 baseUrl 判定(只认 api.openai.com),compat.supportsDeveloperRole 仍可覆盖。

  • 带前缀的 Gemini 3+ 模型 ID 能拿到 tool-call id:vendor-gemini-4-argon 这类 ID 曾被当成旧版
    Gemini,工具调用不带 API 要求的 id。现在版本号从 ID 的任意位置读取。prompt 被安全策略拦下时也会报出
    拦截原因与 safety ratings,而不是「Google stream ended without a finish reason」。

  • /reload 保住 tool_search 加载过的工具:已激活的延迟工具只存在进程内存里,重载工具列表就丢了。
    现在改为从会话历史重建,与恢复会话走同一入口。

  • find 的路径 pattern 相对搜索目录匹配:带 / 的 pattern 曾被改写成 **/<pattern> 并按完整
    路径匹配,于是 path: "src" 下搜 src/**/*.ts 会返回任意同名子目录里的文件,src/*.ts 也会
    命中 pkg/src/a.ts。现在 pattern 锚定在搜索目录:src/*.ts 只找 src/a.ts,**/src/*.ts 仍按
    任意深度匹配,./ 前缀照常可用。

  • read 不再把「当前模型不支持图片」写进会话:这段文字会落在工具结果里被后续回合回放,切到
    视觉模型后仍在告诉模型图片不可用。原因改为只写进结果 details(imageOmitted),模型侧正文不带
    该提示;不支持图片的模型仍按请求把图片替换成占位符。

  • bash 输出被截断时说明完整日志在哪,或为什么没存下来:完整输出写盘失败(/tmp 满、超额、
    无权限)时以前什么都不说。现在 details、结构化输出与 RPC 结果都带 fullOutputError,正文结尾是
    Full output could not be saved: <原因>。另外,输出以「超限的长行 + 一个空行」结尾时不再显示
    Showing lines 3-2 of 2 或 (no output),而是报出该行的结尾。

  • 更多瞬时故障会自动重试:Cloudflare 的 HTTP 525、网关文案("the provider is temporarily
    unavailable"、"the connection to the provider was reset" 等)、以 "request rate increased too
    quickly" 表述的限流,以及只报 ECONNRESET / EPIPE / ETIMEDOUT 的 socket 错误,以前会让整个
    回合失败,现在退避后重试。

  • 只是「包含」request_too_large 的错误码不再触发压缩:请求体里出现 plugin_request_too_large
    曾被当成上下文溢出,把无关的请求错误送进压缩重试。现在只认独立的错误码本身。

  • 写坏的 models.json 会报出来:"contextWindow": "32000" 这类笔误以前看起来像是模型不存在或
    缺 API key。解析失败现在会报一条含文件路径与解析错误的告警,并且任何模式下都能收到——启动时进
    聊天区,/new、/resume、/fork 之后再报一次,RPC 服务端写 stderr。模型回退到默认模型、
    enabledModels 一个都没匹配上,也走同一条通道,同一问题只报一次。

  • /copy 与 RPC get_last_assistant_text 跳过空回复:工具调用中途按 Esc 或 provider 报错后,
    最后一条 assistant 消息没有正文,/copy 会说「No agent messages to copy yet.」;现在改为复制上一条
    回答。

  • 超长 URL 不再做成超链接:超过 8192 字符的 URL 按纯文本渲染,支持 OSC 8 超链接的终端里,数 MB
    长行里的裸 URL 不会再吃爆内存。

  • 重复的 prompt 挪到历史最新位置:提交已在历史里的 prompt 以前会再存一遍,↑ 会在同一段文字上
    反复打转;现在只把它移到最新位置。

  • Wayland 剪贴板按 text/plain 写入:wl-copy 以前会从文本猜 MIME,以 def 开头的文本被猜成
    application/x-ruby,Klipper 一类剪贴板管理器直接丢弃。

  • Mermaid 图超宽时说明需要多少列:以前代码块无解释地回退成源码,现在给出一行「需要 N 列、可用
    M 列」的提示。

  • Windows 先找 Git Bash,再退回 WSL 启动器:装在 Program Files 之外的 Git for Windows 会漏检,
    命令跑进 System32\bash.exe(WSL)。现在先取 git var GIT_SHELL_PATH(Git 2.47+),再扫描 PATH。

  • strict 工具只在 schema 允许时使用:schema 里有不带 type 的节点(items: {}、裸 const)会被
    OpenAI 以 400 拒绝,这类工具现在按非 strict 下发;带 JSON-schema 约束采样的工具仍用 strict。
    Responses API 的工具改为显式发 strict,避免 GitHub Copilot 把省略的可选参数填成空字符串或臆造
    值;Anthropic 工具保留根 additionalProperties 与 $schema,模型才知道禁止多余参数。

  • 图片模型报全用量,该失败时失败:图片用量里的推理 token 被丢弃、图片输出 token 按文本价计费,
    而没有 choices、provider 报错或结束原因不成功的响应都被报成成功。现在图片调用保留推理 token、
    按模型的 cost.imageOutput 给图片输出计价、provider 上报金额时采信上报值,其余情况返回错误。

  • 分类器结果说明是哪次调用:provider 上报时返回 responseId,实付金额替换目录估算而不再被忽略;
    System One 与 OpenAI Decisions 两条路径一致。

  • 取不出值的凭据命令不再算「已配置」:models.json 里写成 !command 的 apiKey 以前恒算已配置,
    provider 显示可用、每次请求却报「No API key found」。现在会真的解析一次(结果缓存 60 秒,修好命令
    后能自行恢复),命令取不到值时 /login 显示 not configured · stored key did not resolve。

  • 提示开关按类别拆开:单项 showCacheMissNotices 拆成 notices.cacheMisses 与
    notices.cacheWarming(schema 里还有 notices.compactionCosts 与 notices.reasoningDrops),
    /settings 与桌面设置面板里各有独立一行。原有的 showCacheMissNotices 继续有效:它作为所有
    未单独设置的类别的回退值,升级不会悄悄改变你收到的提示。

  • 全屏重绘后图片重新出现:清屏会让终端释放已收到的图像数据,而每张图只传输一次,重绘时那里
    就是空白。现在图片缓存随清屏一起丢弃,下一帧重新传输。

  • 会在握手时自我说明的 MCP 服务器进入系统提示:mcp_servers 段以前只认 mcp.json 里的
    description。配置里没写描述时,服务器在 initialize 应答里给的 instructions 现在会作为
    摘要显示。

  • Gemini 3+ 的工具按严格 schema 下发:Google 请求以前从不要求校验函数调用,模型会默默忽略
    schema 编造参数。声明 compat.supportsStrictMode 的模型(以及默认算支持的 Gemini 3 及以后)
    现在会下发 toolConfig.functionCallingConfig.mode = "VALIDATED"。

  • 带颜色的工具输出不再残留转义参数:剥离颜色序列时只吃掉了 ESC [,参数与终止字节留在正文里,
    ESC[31mred 于是显示成 31mred。现在整段序列一起剥掉。

  • Windows 上 Ctrl+Break 与关闭控制台窗口正常退出:控制台控制事件以前直接结束进程,既不还原
    终端也不收尾会话文件。现在 Ctrl+Break、关闭控制台窗口、注销、关机都会走正常退出流程;Ctrl+C 仍
    是中断当前回合。

  • 切换会话只重建一次工具:/fork、/clone、/resume 会把新会话交给扩展两次(一次带会话路径,
    一次在会话文件回执时),plan-mode 与 goal 于是各请求一次工具重建,聊天区出现两条
    extensions updated: tools rebuilt。现在只有会话路径确实变化时才重新分发。