Skip to content

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 04 Sep 15:33
· 32 commits to main since this release

tf v0.7.0

本版由 GitHub Actions 构建,产物与校验和见下。

新增

  • 新增 Pi coding agent 支持(命令 tf pi,进程名 pi):
    • 接入协议覆盖 openai_responses(映射 openai-responses)、anthropic_messages(映射 anthropic-messages)与 openai_chat_completions(映射 openai-completions),通常优先 Responses,Claude 模型在允许时优先原生 Anthropic,Chat 作为兼容回退;绝不伪装 Claude Code,claude_code_only 分组仍不可用于 Pi。
    • 启动采用纯进程环境与扩展方案:通过 --extension 加载权限 0600 的临时 JavaScript Extension 动态注册随机名 provider,退出后自动删除;网关 API Key 仅保留在进程环境变量中,不进入 argv、临时文件或 ~/.pi/agent/auth.json~/.pi/agent/models.json 等持久配置,Pi 原有的 settings、扩展、技能与会话仍正常加载。
    • 模型槽定义仅需 default 主模型槽;网关 /v1/models 仅提供模型 ID 时采用保守自定义模型缺省(128K context、16K output、text-only);tf pi -e high 映射到 pi --thinking high,仅在传入独立 effort 时声明 reasoning。
    • harness 缺失时引导安装选项支持 npm install -g --ignore-scripts @earendil-works/pi-coding-agentpnpm add -g --ignore-scripts @earendil-works/pi-coding-agent
  • 新增可重复执行的卸载脚本 uninstall.sh,用于删除由 install.sh 安装在 TF_INSTALL_DIR(默认 ~/.local/bin)的 tf 二进制;默认保留当前生效的配置、凭据与缓存,支持通过 --purge 显式清理。

安装

npm(跨平台,需 Node.js 18+)

npm install -g @tokenflux/tf

升级请运行 npm install -g @tokenflux/tf@latesttf update 不会直接修改 npm 托管的文件)。

macOS / Linux(独立脚本,无 Node 依赖)

curl -fsSL https://raw.githubusercontent.com/tokenflux/tf-cli/main/install.sh | sh

默认安装到 ~/.local/bin/tf(可通过 TF_INSTALL_DIR 自定义)。升级直接运行 tf update

手动下载

系统 文件
macOS(Apple Silicon) tf_0.7.0_darwin_arm64.tar.gz
macOS(Intel) tf_0.7.0_darwin_amd64.tar.gz
Linux x86_64 tf_0.7.0_linux_amd64.tar.gz
Linux ARM64 tf_0.7.0_linux_arm64.tar.gz
Windows x64 tf_0.7.0_windows_amd64.zip

macOS 与 Linux 产物解压后将 tf 放入 PATH 即可。

Windows 产物解压后将 tf.exe 放入 PATH。当前仅支持非交互模式,请使用 --no-input 配合 -m-k 参数明确指定。

卸载

npm

npm uninstall -g @tokenflux/tf

独立脚本

仅删除 tf 二进制,保留配置、凭据与缓存:

curl -fsSL https://raw.githubusercontent.com/tokenflux/tf-cli/main/uninstall.sh | sh

同时清理配置、凭据与缓存目录:

curl -fsSL https://raw.githubusercontent.com/tokenflux/tf-cli/main/uninstall.sh | sh -s -- --purge

若安装时指定了 TF_INSTALL_DIR,可在管道右侧传入对应环境变量:curl -fsSL https://raw.githubusercontent.com/tokenflux/tf-cli/main/uninstall.sh | TF_INSTALL_DIR=/原安装目录 sh

校验

sha256sum -c SHA256SUMS --ignore-missing

引用版本:提交 768d9a5 / Go 1.27.0

Full Changelog: v0.6.0...v0.7.0