tabby-ai-tools 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -6
- package/README.zh-CN.md +20 -7
- package/VALIDATION.md +12 -0
- package/dist/index.js +1 -1
- package/dist/mcp/electron-host.cjs +69 -21
- package/dist/mcp/utility.cjs +7 -3
- package/docs/assets/overview.png +0 -0
- package/docs/assets/overview.svg +52 -53
- package/docs/claude-code.md +9 -3
- package/docs/codex-installation-recovery.md +8 -0
- package/docs/development.md +17 -4
- package/docs/guide.md +29 -16
- package/docs/instructions-sessions.md +5 -5
- package/docs/mcp.md +100 -30
- package/docs/releases/unreleased.md +18 -1
- package/package.json +1 -1
- package/skills/tabby/SKILL.md +9 -2
- package/skills/tabby/references/operations.md +3 -3
- package/skills/tabby-mcp/SKILL.md +11 -1
- package/skills/tabby-mcp/references/connection.md +40 -7
package/docs/development.md
CHANGED
|
@@ -4,12 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
粘贴、图片预览与附件传输回归直接运行 `npm run test:attachments`,无需切换 Node。`npm test` 自动包含这些用例;真正启动 Pi 的测试会检查当前 Node,低于 22.19 时显示明确的跳过原因。API 压缩测试使用独立的 API 夹具,不启动 Pi,也不因 Pi 的版本要求跳过。完整 Pi 集成验证仍由 Node 22.19+ 的开发环境/CI 执行;脚本不下载或切换运行时。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
设置页已本地实现四分类导航、全宽连接编辑与低频分组折叠,尚未发布;跨 Provider 自动任务分配、统一保存和定时任务表单编辑仍待实现。界面沿用宿主主题与单一页面滚动,不引入远程字体或运行依赖。 AI Tools 宿主元素使用专属类,父级宽度覆盖仅匹配包含该元素的 `settings-tab-body`:从宿主默认的 600px 扩展至最多 1080px;其他设置页保持原限制。界面验证须覆盖深浅主题、窄宽窗口、键盘展开与导航、API/指令/会话空间草稿保留;MCP 使用原有独立组件。规划和研究资料仅保留在本地,不随插件分发。功能与发布状态以实际代码和发布说明为准。
|
|
8
8
|
|
|
9
9
|
v0.4.1 已优先加入 `provider: custom`:可选 `apiFormat: chat-completions | responses`,缺省为 Chat Completions。`apiPath` / `usesResponsesApi` 统一推理路径与工具结果格式;模型发现仍用 `/models`。`keySource: none` 仅限自定义连接,密钥服务返回空值且请求省略认证头。自定义协议加入历史指纹,既有供应商指纹不变;切换协议通过已有通用上下文导入路径处理。设置中变更协议、端点或密钥会取消并清除旧连接测试和模型列表,旧异步结果不能覆盖新状态。自定义接口不推断厂商 Thinking 参数,不硬编码模型能力。
|
|
10
10
|
|
|
11
11
|
`test/api-agent.test.js` 覆盖自定义 Chat Completions 的现有 Agent 回归、Responses 连续工具往返与恢复、协议切换、无密钥模型发现与流式回复、配置失效及原供应商指纹兼容。全部使用本地 HTTP/SSE 夹具;真实第三方服务和桌面端需另行验证。协议参考:[OpenAI Chat Completions](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create)、[Responses 迁移与原生历史](https://developers.openai.com/api/docs/guides/migrate-to-responses)。
|
|
12
12
|
|
|
13
|
+
## Claude 独立空间认证(未发布)
|
|
14
|
+
|
|
15
|
+
Claude 的 connect、设置检查、模型探针和认证恢复不再读取或复制系统 OAuth 缓存。过期后通过官方 `auth login` 在同一 `CLAUDE_CONFIG_DIR` 重新登录;认证提示提供可复制命令及检查重连。恢复禁止打断运行中回合,不删除 native session、不重放推理或工具。`test/session-space.test.js`、`test/claude-code.test.js`、`test/task-memory-panel.test.js` 覆盖系统缓存不导入、失败保留会话、原 selector 更新、活动任务保护和切换失败目标的命令/草稿恢复。真实账号、keychain、桌面、多平台及 SSH 仍需实测;离线夹具不代表这些通过。
|
|
16
|
+
|
|
13
17
|
## 本地开发
|
|
14
18
|
|
|
15
19
|
### Markdown 输出
|
|
@@ -225,21 +229,30 @@ See [installation recovery and SSH process identity](codex-installation-recovery
|
|
|
225
229
|
|
|
226
230
|
## MCP 终端预览开发增量(v1.0.0)
|
|
227
231
|
|
|
228
|
-
`runtime/mcp` 独立于 Angular TS 4.9,使用 `typescript-pi` 对应的 TS 5.9 做类型检查。`scripts/build-mcp.mjs` 将官方 SDK server/core、Node adapter 和 schema 依赖打入 `dist/mcp/utility.cjs`,main 协调器为 `electron-host.cjs`,附上 `THIRD_PARTY_NOTICES.txt`;生产包不安装 SDK,也没有新增安装脚本。`mcp:build` 纳入 build/pretest;MCP 运行在 Electron utilityProcess
|
|
232
|
+
`runtime/mcp` 独立于 Angular TS 4.9,使用 `typescript-pi` 对应的 TS 5.9 做类型检查。`scripts/build-mcp.mjs` 将官方 SDK server/core、Node adapter 和 schema 依赖打入 `dist/mcp/utility.cjs`,main 协调器为 `electron-host.cjs`,附上 `THIRD_PARTY_NOTICES.txt`;生产包不安装 SDK,也没有新增安装脚本。`mcp:build` 纳入 build/pretest;MCP 运行在 Electron utilityProcess,保留宿主 OS 环境(包括 Windows SystemRoot/TEMP),大小写变体的 PATH、NODE_OPTIONS、NODE_PATH、ELECTRON_RUN_AS_NODE 均清空,没有系统 Node 回退。窗口桥接初始化失败不会永久缓存成功状态,后续显式刷新可重新注册;不重放设置变更或终端操作。对应回归见 `test/mcp-electron.test.js` 和 `test/mcp-renderer.test.js`。
|
|
233
|
+
|
|
234
|
+
未发布源码的 MCP 默认本机免令牌。policy 的 local 虚拟身份不持久化凭据,默认 auto 并动态纳入全部终端 Tab;headerless 请求使用共享 local 身份,绝不合并旧 bearer 客户端权限。所有免令牌本机程序共享权限、游标、限流和租约;显式无效 Authorization 不回退。旧 bearer 客户端独立保留,轮换/撤销不作用于 local;local 关闭服务撤权,设置页不再提供 local 模式/Tab 选择。新增/重连会话自动获得新 opaque target;删除旧 target 即撤销旧会话,不增加 local revision,避免打断其他 Tab 的观察/租约。停服/崩溃仍推进 revision、清理观察和租约,重启后当前终端自动纳入,绝不重放输入。Host/Origin 检查、loopback bind、有界 HTTP 和工具观察、目标窗口批准及 IPC 最终授权均保留。UI 默认直接复制 URL 配置,可选令牌入口折叠;发现记录标记 local_no_token。
|
|
235
|
+
|
|
236
|
+
MCP utility 在 parentPort 控制监听安装后发送 `ready`;main 为冷进程创建/bundle 加载保留独立 20 秒上限,收到握手后才发送一次 `start`,HTTP 启动回复另限 20 秒。普通控制回复和退出清理仍保留各自 5 秒上限。超时分别标明未 spawn、未 ready 或 HTTP 未回复;保留有界停止和未观察退出时的进程槽,不启动重叠实例,不重放请求。启动期 stderr 仅保留末尾 4096 字符供内部分类,UI 只显示退出码与白名单错误代码/类型,不暴露原始日志、路径或凭据。
|
|
229
237
|
|
|
230
238
|
main 从 Tabby 主进程的 `TABBY_CONFIG_DIRECTORY`(缺省 userData)取 canonical 配置空间,不接受 renderer/HTTP 传入路径或窗口路由。实际 Electron IPC sender、顶层 frame 与 Tabby document URL 校验后注册 renderer。main 管理持久 token 摘要、空初始范围、不透明目标与授权代际,utility 只持有最小认证快照,renderer 在读取前后再验证实际 session/stream 与范围。snapshot/delta cursor 绑定客户端、revision、target、stream,客户端不能指定内部 owner/log scope。范围变更、取消、异常和退出不重放请求;只读适配器不调用输入工具。`mcp-execution.ts` 延迟获取共享 `TabbyTabToolsService`,仅映射四个输入/控制工具;context.beforeInput 在最终发送边界复核,allowTakeover=false 禁止自动中断,onInput 区分尚未发送与未知结果。
|
|
231
239
|
|
|
232
|
-
`src/mcp.service.ts` 从模块启动,设置关闭时不监听网络;`mcp-terminals.ts` 按授权引用计数 watch/unwatch 并取消等待。`mcp-settings.*` 是现有 Settings 内的可折叠分组;`mcp-client-config.ts` 仅生成复制预览,不写客户端文件。新增 MCP
|
|
240
|
+
`src/mcp.service.ts` 从模块启动,设置关闭时不监听网络;`mcp-terminals.ts` 按授权引用计数 watch/unwatch 并取消等待。`mcp-settings.*` 是现有 Settings 内的可折叠分组;`mcp-client-config.ts` 仅生成复制预览,不写客户端文件。新增 MCP 界面文案在简体中文以外可使用英文回退,既有语言选择与翻译不变。独立令牌客户端凭据摘要与端口写入私有文件,其终端范围不跨重启恢复;local 始终自动覆盖当前终端,不持久化终端 ID。
|
|
233
241
|
|
|
234
242
|
`test/mcp.test.js` 覆盖官方 SDK 实际 HTTP 和真实输出服务,`mcp-electron.test.js` 覆盖可信路由/双窗口/崩溃/端口与撤销竞态;它们不能替代真实桌面。Linux Tabby/Codex 无模型真实终端闭环已取得;真实 Cursor/Claude、Windows/macOS、SSH 和旧宿主待补。更新后的 overview 是示意图,明确标注版本与示例,不能冒充运行截图。
|
|
235
243
|
|
|
236
|
-
main
|
|
244
|
+
main 的独立令牌客户端 confirm/auto 权限绑定所选目标;其重启回到 read_only。本机连接默认 auto/全部终端,重启自动覆盖当前会话。输入预约和 lease 在 main 同步创建,批准等待不占用 IPC 串行控制队列。目标窗口可批准/拒绝具体参数,25 秒超时;120 秒输入空闲 lease 自动释放。取消、撤销、范围/模式/会话变化、停止或崩溃清观察和 lease,通过独立 release 消息还原 renderer 控制,不发 Ctrl+C、不重放。客户端不能提供 owner、内部 tabId、sudo、foreground takeover 或日志 scope。33 秒总观察预算含批准等待,晚批准可能得到 unknown_outcome;不得将“已发送”当作命令完成。
|
|
237
245
|
renderer 同时持有独立 lease 截止计时器:即使 main 无法再投递 release/state,输入控制也会在本地截止时解除;续期只使用 main 签发的 expiresAt。
|
|
238
246
|
|
|
239
247
|
输出遮蔽先作用于完整快照;若正文被替换,则省略 interaction 元数据,不能对高亮片段分别调用有状态的 sanitizeView。utility 对已转发的四类写操作在总截止、取消或父通道断开时返回 unknown_outcome;HTTP 边界也将写入 observation_timeout/cancelled 保守映射为未知,只有明确的 main 拒绝保留具体原因。回归覆盖附件重复快照/其他读取者先识别 footer,以及两代真实 HTTP 协议经过 main 的晚批准、丢失 renderer 回复、清理租约和不重放;合成终端与宿主 fixture 不代表实机验证。
|
|
240
248
|
|
|
241
249
|
`runtime/mcp/discovery.cts` 管理独立标准 Agent Skill 的首次发现安装及无凭据位置记录。以 main 的真实 home/config-space 为准,绝不接受 HTTP 传入用户目录;同名已有技能只比较不覆盖。复制支持文件后最后写 SKILL.md,独占创建冲突不覆盖用户文件。每配置空间独立 hash 记录,内容白名单不含客户端摘要/凭据或目标范围;状态未变不写盘。发现写入失败与 MCP 生命周期分开,不修改授权,不注册客户端。设置页提供重试/检查,自定义技能路径仍手动导入。
|
|
242
250
|
|
|
251
|
+
已有 skill 冲突时,设置页说明旧说明可能仍要求 token,显示包内当前 skill 来源,允许复制固定的 `references/connection.md` 供备份后协调;不接受 renderer 指定读取路径,不改已有 skill/客户端配置,也不调用 policy.save 或重启 utility。Codex 接入说明分开描述目标主机/CODEX_HOME 注册、客户端重载、握手/工具与授权目标读取;auto 与勾选范围独立。`mcp-discovery`、`mcp-renderer` 和 `mcp-electron` 回归覆盖自定义旧文档保留、当前说明可用、auto 单目标不扩权及无重启。
|
|
252
|
+
|
|
243
253
|
### v1.0.0 review fixes
|
|
244
254
|
|
|
245
255
|
Codex browser sign-in retains completion notifications received before the login-start await resumes, including a reply and notification in one stdout chunk. Cancellation still prevents accepting a completed login. MCP HTTP body iteration retains the socket on early body-limit exit and drains unread bytes after the adapter responds, so oversized requests can receive HTTP 413 rather than a connection reset. Regressions cover real fixture subprocess output and known-length/chunked HTTP requests; these do not establish real account or desktop acceptance.
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
Header actions share `.codex-header-action`: 32px border-box targets, 16px inline SVGs, theme colors, stable hover/pressed/focus states and reduced-motion progress. The optional Codex account disclosure retains outside/focus dismissal and Escape return-focus; Arrow Down opens it and focuses the first enabled action. Reconnect retains existing busy/request guards. Collapse keeps the running session. Validate actual button rectangles and menu actions in both themes, narrow panes and RTL; stub authentication and reconnection in UI checks to avoid account changes or paid model requests.
|
package/docs/guide.md
CHANGED
|
@@ -15,8 +15,8 @@ v0.9.1 修复流程库空闲时普通终端工具被误拦截的问题。普通
|
|
|
15
15
|
v0.5.1 起,Pi SDK 及其所需 JavaScript 已打包。通过 Tabby 安装/升级插件不需要系统中存在 `node` 命令,也不会执行 `protobufjs` 等 Pi 依赖的安装脚本;Pi 默认通过 Electron 独立进程复用 Tabby 自带 Node;兼容版本的 Tabby 无需额外安装 Node。旧版宿主应优先升级 Tabby,也可显式选择可选的 Node 22.19+ 兼容路径。v0.5.0 的安装兼容性问题请通过升级 v0.5.1 修复,无需全局关闭安装脚本。
|
|
16
16
|
|
|
17
17
|
- 本机安装 [Tabby](https://github.com/Eugeny/tabby),并能访问所选 AI 服务。操作内网服务器时,本机还需能通过 Tabby 连接目标服务器。
|
|
18
|
-
- **ChatGPT 订阅/Codex 登录模式**:本机安装 Codex CLI,选择 **Codex
|
|
19
|
-
- **Claude 订阅/Claude Code 本机模式**:本机安装官方 Claude Code,选择 **Claude Code
|
|
18
|
+
- **ChatGPT 订阅/Codex 登录模式**:本机安装 Codex CLI,选择 **Codex(本机登录)**,在“CLI 会话存储”展开后生成选定空间的登录命令。使用具备 Codex 权限的 ChatGPT 账号完成官方登录,再检查该空间认证,无需填写 API Key。普通 `codex login`/`codex login status` 针对终端当前配置的空间;未使用过的插件连接默认使用 Tabby 独立空间。可用模型、用量和工作区权限以账号实际权益为准。见 [OpenAI 官方认证说明](https://learn.chatgpt.com/docs/auth)。CLI 需支持 `thread/goal/*`;已测试版本见[验证记录](../VALIDATION.md)。
|
|
19
|
+
- **Claude 订阅/Claude Code 本机模式**:本机安装官方 Claude Code,选择 **Claude Code(本机登录)**,在“CLI 会话存储”展开后生成并执行选定空间的 `auth login` 命令,再检查该空间认证。普通 `claude auth login`/`auth status` 可能针对另一份系统配置。独立空间通过官方命令登录,不再复制本机 OAuth 缓存(未发布修复);账号权益及系统兼容模式的 API/云计费以官方 CLI 状态为准。完整方案、权限、恢复机制与验证限制见 [Claude Code 接入](claude-code.md)。
|
|
20
20
|
- **API 模式**:准备 OpenAI、DeepSeek、GLM、Kimi、百炼 Coding Plan 或 Claude 对应的 Key,无需安装 Codex CLI。订阅登录与 API 连接是两种独立配置方式。
|
|
21
21
|
|
|
22
22
|
### 安装插件
|
|
@@ -49,7 +49,7 @@ npm run install:tabby -- "<Tabby 插件目录路径>"
|
|
|
49
49
|
3. 输入“读取当前终端的报错,先分析原因,再提出修复方案”,按 **Ctrl+Enter / Cmd+Enter** 发送。普通 Enter 换行。
|
|
50
50
|
4. 在侧栏查看回复、工具结果、提问与审批,在终端核对实际输出。执行中可追加要求,也可点击 **停止**;点击 **释放** 可取回终端输入权。
|
|
51
51
|
|
|
52
|
-
侧栏顶部的连接(Provider)与模型(Model
|
|
52
|
+
侧栏顶部的连接(Provider)与模型(Model)并排显示;长名称可悬停查看。状态详情等面板只滚动内容区,标题栏与关闭按钮始终保留在顶部。顶部不再重复显示 Detail 按钮,点击状态、上下文或控制摘要仍可打开详情。登录/退出下拉菜单在点击外部或键盘焦点移出后收起;Esc 收起并返回账号按钮。
|
|
53
53
|
|
|
54
54
|
## Markdown 输出
|
|
55
55
|
|
|
@@ -63,7 +63,11 @@ HTTP、HTTPS 和邮件链接经宿主交给外部应用打开;相对文件路
|
|
|
63
63
|
|
|
64
64
|
## 基础配置
|
|
65
65
|
|
|
66
|
-
打开 **Settings → AI Tools
|
|
66
|
+
打开 **Settings → AI Tools**,使用“连接与模型/任务与流程/外部 AI 连接(MCP)/通用设置”四个分类(本次布局尚未发布)。连接页通过“选择连接”切换 Codex、Claude Code 或 API,详情占完整宽度,窄窗口自动改为单列;不再嵌套连接侧栏。模型与权限优先展示,CLI 路径与工作目录、自定义指令和 CLI 会话存储默认折叠。API 的运行时及高级参数也按需展开,当前协议所需字段仍可直接填写。
|
|
67
|
+
|
|
68
|
+
默认连接和界面语言位于“通用设置”;“启动与日志”内的开关默认折叠。“任务与流程”中先显示流程列表,再按需展开操作偏好和交互辅助模型;编辑流程时的条件策略默认折叠。`/remember` 只用于开始录制,普通任务不自动归档。
|
|
69
|
+
|
|
70
|
+
API 连接使用草稿,切换连接或分类保留编辑,需“保存连接”提交;自定义指令和会话空间各自有保存/放弃按钮,其他设置自动保存。保存后在侧栏空闲时重新连接应用,新指令通过 `/new` 开始新会话;不会重放任务。默认连接和正在编辑的连接分别选择,编辑连接不会自动把它设为默认。
|
|
67
71
|
|
|
68
72
|
| 配置 | 设置方法与作用 |
|
|
69
73
|
| --- | --- |
|
|
@@ -116,13 +120,13 @@ AI 会发现并核对各连接与终端,将每一步的实际输出作为下
|
|
|
116
120
|
|
|
117
121
|
## 界面语言
|
|
118
122
|
|
|
119
|
-
在 **Settings → AI Tools → 界面语言** 选择跟随 Tabby,或独立指定语言。支持英语、简体中文、繁体中文、西班牙语、法语、德语、葡萄牙语、俄语、日语、韩语、阿拉伯语和印地语;区域语言代码会匹配对应语言,不支持的语言和缺少的翻译回退到英语。阿拉伯语界面采用从右向左排版。
|
|
123
|
+
在 **Settings → AI Tools → 通用设置 → 界面语言** 选择跟随 Tabby,或独立指定语言。支持英语、简体中文、繁体中文、西班牙语、法语、德语、葡萄牙语、俄语、日语、韩语、阿拉伯语和印地语;区域语言代码会匹配对应语言,不支持的语言和缺少的翻译回退到英语。阿拉伯语界面采用从右向左排版。
|
|
120
124
|
|
|
121
125
|
语言文件随插件分发,使用期间无需联网翻译。仅翻译插件的界面和提示;用户消息、模型回复、终端输出、连接名称和保存的任务内容保留原文。部分语言由机器翻译提供初稿,欢迎提交校对。默认 README 为[英文](../README.md),另提供[简体中文](../README.zh-CN.md)。
|
|
122
126
|
|
|
123
127
|
## API 密钥与切换模型
|
|
124
128
|
|
|
125
|
-
1. 打开 **Settings → AI Tools → 添加 API 连接**,选择供应商并为连接命名。
|
|
129
|
+
1. 打开 **Settings → AI Tools → 连接与模型 → + 添加 API 连接**,选择供应商并为连接命名。
|
|
126
130
|
2. 确认 Base URL,填写基础地址,不附加 `/responses`、`/messages` 或 `/chat/completions`。可使用对应协议的代理地址;GLM 按平台和套餐选择端点。
|
|
127
131
|
3. 直接填写 API Key,或指定 Tabby 进程可读取的密钥环境变量。
|
|
128
132
|
4. 获取模型列表并选择模型,或手动输入完整模型 ID,然后点击 **测试连接**。
|
|
@@ -143,9 +147,9 @@ Kimi API、Kimi Coding Plan 和阿里云百炼 Coding Plan 提供 **中国内地
|
|
|
143
147
|
|
|
144
148
|
修改环境变量后需要完全退出并重启 Tabby。API 模式当前不自动压缩上下文,长任务可用 `/new` 新建会话;用量显示请求和本地累计 tokens,不显示 Codex 订阅额度。协议和存储设计见[多模型 Agent 说明](multi-provider-agent.md)。
|
|
145
149
|
|
|
146
|
-
在 **Settings → AI Tools → 添加 API 连接** 配置供应商、Base URL 和模型 ID。密钥来源默认选择“直接输入”,填写 API Key 即可,该方式将密钥保存在本地 Tabby 插件配置中。也可选择环境变量;自定义接口还支持“无需密钥”。插件不访问 Vault,旧 Vault 连接需重新选择密钥来源。
|
|
150
|
+
在 **Settings → AI Tools → 连接与模型 → + 添加 API 连接** 配置供应商、Base URL 和模型 ID。密钥来源默认选择“直接输入”,填写 API Key 即可,该方式将密钥保存在本地 Tabby 插件配置中。也可选择环境变量;自定义接口还支持“无需密钥”。插件不访问 Vault,旧 Vault 连接需重新选择密钥来源。
|
|
147
151
|
|
|
148
|
-
|
|
152
|
+
设置页通过“连接与模型 → 选择连接”切换编辑对象,一次只显示一个连接的配置。连接选择器显示名称和供应商,编辑区显示模型与默认标记。详情使用宿主可用宽度(最多 1080px),随页面整体滚动,窄窗口改为单列表单。新增连接自动进入编辑,删除当前连接后切换到相邻连接;Codex、Claude Code 本机引擎也从选择器切换。编辑不会改变默认连接;在“通用设置”选择默认连接,或在编辑区点击“设为默认”。API 运行时与兼容选项在“Agent 运行时”中展开,思考模式、推理强度、上下文和工具轮数上限在“高级参数”中展开。
|
|
149
153
|
|
|
150
154
|
点击当前连接编辑区下方的 **测试连接** 会发送一条简短请求,实际验证密钥、模型和流式响应,并产生少量 API 用量。进度与结果显示在按钮下方,测试中可以取消,60 秒超时;HTTP 错误、错误模型或不支持 SSE 的代理会显示相应提示。
|
|
151
155
|
|
|
@@ -186,7 +190,7 @@ API 工具循环检测始终启用,无需等到轮数上限。近期同一段
|
|
|
186
190
|
|
|
187
191
|
在对话中提出“每天北京时间 9 点检查服务,异常时分析日志并修复,最多三次,最后验证恢复”等要求。AI 会保存独立定时任务,触发后根据每次输出继续判断和操作,留下逐次执行记录。支持单次、固定分钟间隔和指定时区的每日任务。
|
|
188
192
|
|
|
189
|
-
点击 **定时任务** 或输入 `/schedules` 查看计划、暂停/恢复、立即运行、停止本次运行、展开执行记录。设置 → AI Tools → 定时任务显示所有目录的计划,支持暂停、恢复、停止和删除任务及记录。定时会话不等待用户,遇到问题先查找并自主选择最优答案,保留原沙箱范围。任务在重启后自动加载,仅在 Tabby 打开时执行;关闭期间错过的触发合并一次,异常中断不自动重放。详情见[定时任务说明](scheduled-tasks.md)。
|
|
193
|
+
点击 **定时任务** 或输入 `/schedules` 查看计划、暂停/恢复、立即运行、停止本次运行、展开执行记录。设置 → AI Tools → 任务与流程 → 定时任务显示所有目录的计划,支持暂停、恢复、停止和删除任务及记录。定时会话不等待用户,遇到问题先查找并自主选择最优答案,保留原沙箱范围。任务在重启后自动加载,仅在 Tabby 打开时执行;关闭期间错过的触发合并一次,异常中断不自动重放。详情见[定时任务说明](scheduled-tasks.md)。
|
|
190
194
|
|
|
191
195
|
也可让外层 AI 控制另一个终端 Agent:读取提问,发送 Shift+方向键、回车等按键,按原始目标回答,再检查反馈。支持接管已检测到的现有进程;具体边界见[交互式 Agent 说明](scheduled-tasks.md#控制另一个交互式-agent)。
|
|
192
196
|
|
|
@@ -196,7 +200,7 @@ API 工具循环检测始终启用,无需等到轮数上限。近期同一段
|
|
|
196
200
|
|
|
197
201
|
## 后台连接与生命周期
|
|
198
202
|
|
|
199
|
-
AI Tools 默认在启动 Tabby 时自动展开侧栏,使用默认连接,无需先进入设置启用。未保存过此选项的已有配置也会默认打开;已明确关闭的配置保持关闭。如需关闭,在 **Settings → AI Tools
|
|
203
|
+
AI Tools 默认在启动 Tabby 时自动展开侧栏,使用默认连接,无需先进入设置启用。未保存过此选项的已有配置也会默认打开;已明确关闭的配置保持关闭。如需关闭,在 **Settings → AI Tools → 通用设置 → 启动与日志** 取消勾选 **启动 Tabby 时自动打开 AI Tools**,下次启动生效。工作目录沿用工具栏打开侧栏时的规则:优先使用固定目录,否则尝试读取当前本地终端目录,无法读取时使用用户主目录。手动收起后,本次运行不会再次自动展开。
|
|
200
204
|
|
|
201
205
|
使用 Codex 系统会话空间且未选择其他默认连接时,插件加载并读取配置后会启动常驻的 `codex app-server --listen stdio://`,每个 Tabby 窗口共用一个进程。打开、收起或切换侧栏均复用该服务,通过 JSONL 通知逐段显示流式应答。进程异常退出后自动重连,重试间隔从 1 秒逐步增加到最多 30 秒;服务启动失败会提示检查 CLI 路径。修改并保存 CLI 路径后自动更换进程,其他设置保存不会重启服务。窗口退出或插件销毁时关闭进程并清理重连定时器。
|
|
202
206
|
|
|
@@ -300,6 +304,8 @@ Goal 通过证据检查和持续执行降低过早结束的概率,但无法数
|
|
|
300
304
|
|
|
301
305
|
## CLI 自动发现与启动排查
|
|
302
306
|
|
|
307
|
+
若重启后出现 `会话恢复失败:thread … already has an active writer`,表示该会话的写入占用尚未释放。当前源码补丁会在窗口退出时回收各独立 Codex 客户端,同空间重连复用原连接,并对明确的 writer 拒绝最多短暂重试三次(共等待 2.5 秒);原会话、历史、草稿和权限保留,不重发任务。持续占用仍会报错:关闭其他 Codex 窗口中占用该会话的连接后,再点击重连。不要删除锁文件或把此错误当作未登录;此修复尚未发布,用户端 Windows 重启仍待实机验收。
|
|
308
|
+
|
|
303
309
|
v0.9.4 起,保存 Codex/Claude Code CLI 路径后,空闲侧栏会自动重新检查并恢复原会话;清空路径使用自动发现,无需发送消息刷新。启动中或执行中修改时等待空闲边界,正在等待审批/回答时先处理当前请求。恢复成功立即清除旧连接告警;实际启动失败仍显示诊断,不重发任务或工具调用。
|
|
304
310
|
|
|
305
311
|
`codexAgent.executable` 留空或保持默认 `codex` 时,**Windows 会收集并比较已发现安装的实际 CLI 版本**:Tabby 进程 PATH 的所有匹配项、`CODEX_INSTALL_DIR`、`%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe`、`CODEX_HOME` 下的 standalone 入口、`%LOCALAPPDATA%\OpenAI\Codex\bin\<目录>\codex.exe`、用户 `.local\bin` 及 npm 常见目录和全局 prefix。不会命中第一个 PATH 旧版就停止。多个候选使用不消耗模型额度的 `--version` 查询,按语义版本选择较新者;稳定版优先于同版本预发布版,版本相同时保留发现顺序。哈希名及文件修改时间不作为版本新旧依据。单项查询限时 1.5 秒、输出最多 16 KiB,最多四项并发;失败或无法解析的候选不压过有有效版本号的候选。所有版本均未知时保留原发现顺序(桌面子目录内部以程序修改时间排序),此时不能保证最新。每次新连接重新扫描,不缓存版本结果;已有连接复用当前进程。Linux/macOS 仍先检查 PATH,再检查 `CODEX_INSTALL_DIR` 和下文的补充来源。
|
|
@@ -340,7 +346,7 @@ C:\Users\用户名\AppData\Local\OpenAI\Codex\bin
|
|
|
340
346
|
|
|
341
347
|
显式配置的绝对路径、相对路径或 `~/` 路径优先(可带一对外层引号),会验证真实文件存在;v0.9.4 起,入口文件缺失、断链或文件类型无效时,自动清空保存的配置并查找一次;权限访问拒绝保留配置并报告错误。自定义命令名(如 `my-codex`、`codex.cmd`)仅按 PATH / Windows PATHEXT 查找,保留命令名配置兼容性;未找到时清空保存的命令并自动查找。Windows 支持原生 exe/com 和 cmd/bat 启动器,含空格、中文路径可用。原生程序使用绝对路径、参数数组和 `shell:false`;cmd/bat 由 cross-spawn 负责 cmd.exe 转义,stdin/stdout JSONL 及 stderr 均保留为管道。只填写文件路径或命令名,不附加参数。
|
|
342
348
|
|
|
343
|
-
子进程环境会移除所有大小写形式的 `CODEX_INTERNAL_ORIGINATOR_OVERRIDE`,初始化始终使用插件自己的 `clientInfo.name = tabby_codex_agent`,父进程环境不变。定位失败会给出 PATH 检查情况、Windows 安装扫描路径或 LOCALAPPDATA 缺失、Linux/macOS 的 Shell 探测结果及补充安装目录、候选拒绝原因,以及 **Settings → AI Tools → Codex CLI 可执行文件(`codexAgent.executable`)** 设置入口。
|
|
349
|
+
子进程环境会移除所有大小写形式的 `CODEX_INTERNAL_ORIGINATOR_OVERRIDE`,初始化始终使用插件自己的 `clientInfo.name = tabby_codex_agent`,父进程环境不变。定位失败会给出 PATH 检查情况、Windows 安装扫描路径或 LOCALAPPDATA 缺失、Linux/macOS 的 Shell 探测结果及补充安装目录、候选拒绝原因,以及 **Settings → AI Tools → 连接与模型 → Codex → CLI 路径与工作目录 → Codex CLI 可执行文件(`codexAgent.executable`)** 设置入口。
|
|
344
350
|
|
|
345
351
|
出现 `Codex app-server exited (1)` 时,侧栏会同时显示实际启动路径和 CLI 的错误输出。可在终端运行 `codex app-server --listen stdio://` 查看相同安装的启动错误;命令启动后等待输入是正常现象,按 Ctrl+C 退出。路径、Codex 配置和安装问题应以错误输出为准。
|
|
346
352
|
|
|
@@ -363,9 +369,9 @@ Pi 的使用、存储、预算和验证限制见 [Pi runtime](pi.md)。开发与
|
|
|
363
369
|
|
|
364
370
|
### 自定义 AGENTS.md 与独立 CLI 会话
|
|
365
371
|
|
|
366
|
-
|
|
372
|
+
每个连接下方默认折叠的 **自定义指令** 支持 AI Tools 全局默认与连接级覆盖。可编辑正文、绑定本地 AGENTS.md 文件、继承默认或关闭自定义层;保存和放弃均显式操作。文件要求绝对路径、UTF-8、最多 32 KiB,可预览内容、来源、摘要和修改时间,不会覆盖源文件。新会话保存指令快照;原文件修改或丢失不影响已有会话恢复。使用 `/new` 应用新指令,文件不可读则阻止依赖它的新会话。内置工具说明与宿主权限检查仍生效,Pi 不因此启用自动发现;Codex/Claude 的原生项目规则另由引擎管理。
|
|
367
373
|
|
|
368
|
-
未使用过的 Codex/Claude Code 默认采用 **Tabby 独立空间**,已有 CLI 会话引用保留 **系统空间(旧版兼容)**。独立空间隔离磁盘历史及索引,而不仅过滤列表;任务 cwd 保持不变。选择目标空间后生成登录命令,在本地终端完成官方登录,再检查该空间认证并保存。系统 CLI
|
|
374
|
+
未使用过的 Codex/Claude Code 默认采用 **Tabby 独立空间**,已有 CLI 会话引用保留 **系统空间(旧版兼容)**。独立空间隔离磁盘历史及索引,而不仅过滤列表;任务 cwd 保持不变。选择目标空间后生成登录命令,在本地终端完成官方登录,再检查该空间认证并保存。系统 CLI 已登录不代表目标空间已登录,Codex 私有登录文件缺失时可初始化有效的本机 ChatGPT 缓存;Claude 不再复制系统 OAuth 缓存,认证提示可生成独立空间的官方登录命令,完成后检查并重连(未发布修复)。已有私有登录保持不变;系统历史和配置不随之复制。OS keychain-only 登录仍需在目标空间完成官方认证。Codex 确认认证失败后,可用同一用户、同一工作区的较新系统凭据恢复已导入的登录,最多自动尝试一次。源登录也失效时,从侧栏右上角账号菜单登录。退出独立空间后会停用自动导入。恢复时保留会话和草稿。Windows 命令使用 PowerShell,Linux/macOS 使用 POSIX shell。
|
|
369
375
|
|
|
370
376
|
空闲时点击侧栏重连以切换空间并交接当前对话,或用 `/new` 开始新对话。旧记录保留原处,失败时仍保留原侧栏会话;不会搬走全部系统历史。定时任务后续运行使用连接当前选定空间和新指令快照,活动任务保留启动时的配置。详细路径、认证边界与验证范围见 [指令与会话说明](instructions-sessions.md)。
|
|
371
377
|
|
|
@@ -401,9 +407,9 @@ Pi 的使用、存储、预算和验证限制见 [Pi runtime](pi.md)。开发与
|
|
|
401
407
|
|
|
402
408
|
异常处理复审:自动启动失败不会中断当前窗口的终端注册;解决端口冲突后可停用/重新启用恢复。IPC 失败会结算或取消相关观察,失联窗口的范围被移除,不重放读取或终端输入。utility 的 error 或 kill 返回值不作为退出证据,收到真实 exit 前保留进程槽位;超过有界退出期限会显示错误,不能确认退出时不启动重叠进程。设置操作失败会回读实际状态并恢复勾选,不把失败的取消授权显示为成功;写入权限文件失败会停用当前服务,但该变更未保存,解决存储问题并重启后须复核旧客户端记录(终端范围不会自动恢复)。
|
|
403
409
|
|
|
404
|
-
「设置 → AI Tools → 外部 AI 连接(MCP
|
|
410
|
+
「设置 → AI Tools → 外部 AI 连接(MCP)」提供独立于侧栏模型的终端入口。当前源码默认本机免令牌:启用服务后直接复制地址配置,手动合并到 Codex CLI/Cursor/Claude Code 的个人配置,无需添加客户端或签发令牌。本机程序共享一组终端范围、操作权限、游标和输入租约,不能凭客户端名称区分身份。默认自动读写所有终端 Tab,无需选择权限或逐个勾选;新开、重连和重启后的当前终端自动纳入,关闭服务撤销所有访问。旧令牌客户端作为可选项保留独立范围;切换旧配置到免令牌时需移除 Authorization/令牌环境变量,显式无效令牌仍返回401。最近请求不代表持续在线或工具成功。本机免令牌改动尚未发布。
|
|
405
411
|
|
|
406
|
-
|
|
412
|
+
独立令牌客户端默认只读,可用 `get_capabilities`、`read_skill`、`list_tabs`、`read_tab`。快照最多 300 行/20,000 字符,客户端绑定的 cursor 支持增量及最多 30 秒等待;独立令牌客户端不能共用游标;免令牌本机程序属于同一共享身份。MCP 有自己的输出订阅,不依赖侧栏是否打开,只读时不开始任务日志或争用输入。独立令牌客户端在关闭/重连/替换终端会话、停用服务、进程异常或重启后需要重新选择终端;本机连接自动覆盖当前会话,旧会话的观察与租约失效,不重放操作。窗口与 profile 主机/账号标签仅帮助识别,不自动证明 nested SSH/容器身份。独立令牌客户端另选「每次操作确认」或「允许自动操作」可开放 `send_input`、`send_keys`、`attach_process`、`release_tab`。确认请求在目标窗口本设置页展示,25 秒内批准;main 签发客户端/终端绑定租约,120 秒无输入操作到期。输入与侧栏/调度共用所有权,不自动 Ctrl+C;新命令要求可验证空闲,普通 SSH 的未知进程枚举会阻止新命令。接管既有进程需独立身份核验。撤销/取消/释放仅解锁,不终止进程;发送后观察丢失可能已执行,必须读取核验,不得自动重发。独立令牌客户端重启恢复只读且清具体范围;本机连接保持自动读写所有当前终端。日志导出及自动改写客户端配置仍未开放。
|
|
407
413
|
|
|
408
414
|
运行时复用 Tabby/Electron 的 Node,不要求用户额外安装 Node。首次启动保存空闲 loopback 端口,之后重用;占用时停止并报告,停用服务后可明确修改端口,不会杀其他进程或静默换 URL。权限摘要与端口在真实 Tabby 配置目录的私有 `ai-tools-mcp/state.json`,不复用模型 API key。只适用于同一台机器、同一网络命名空间的 `127.0.0.1`,不包含 LAN/公网、OAuth 服务端、云连接器或 WSL/容器隧道。
|
|
409
415
|
|
|
@@ -413,4 +419,11 @@ Linux 官方 Tabby 1.0.238(Electron 43.7.0 / Node 24.21.0)与 Codex CLI 0.16
|
|
|
413
419
|
|
|
414
420
|
支持的 Tabby 宿主首次启动后,将独立 `tabby-mcp` Skill 安装到用户 `.agents/skills`,并兼容用户已存在的 `.claude` 技能目录(Codex/Cursor 使用共享目录);不覆盖同名已有修改。MCP 设置页可「安装/检查 Agent Skill」,其他客户端/自定义技能目录可导入包内 `skills/tabby-mcp`。这不是所有 Agent 通用的自动扫描目录。
|
|
415
421
|
|
|
416
|
-
|
|
422
|
+
提示已有 skill 冲突时,旧版说明可能仍要求 token。设置页提供当前来源路径和「复制当前连接说明」;先备份已有 skill,对照当前 `SKILL.md` 与 `references/connection.md` 更新并保留自定义内容,再重新加载客户端。复制说明不改已有文件。免令牌模式无需新增命名客户端;独立令牌客户端仍保留自己的凭据和范围。
|
|
423
|
+
|
|
424
|
+
生成/复制配置不等于已注册。Codex 应在目标 CLI 所在主机、实际 `CODEX_HOME`(未设置时 `~/.codex`)合并配置,或用设置页显示的免令牌 `codex mcp add` 命令注册;保留其他条目及同名冲突。保存后用 `codex mcp list --json` 回读,并重载 MCP 客户端或在当前任务结束后新建 Codex 会话,接着验证握手、工具发现和已授权终端读取。无需重启 Tabby。本机连接默认 `auto` 且覆盖所有终端 Tab;独立令牌客户端的 `auto` 仅适用于已勾选范围。两者均不绕过进程接管检查。
|
|
425
|
+
|
|
426
|
+
例如告诉 Codex「通过 MCP 连接 Tabby」时,它可根据 skill 描述选择该技能,再读取本机 `~/.agents/tabby/mcp/` 无凭据发现记录,取得状态和 loopback 地址。发现记录若标记 local_no_token,首次直接注册地址并在 Tabby 授权终端,无需令牌;旧版仍可能要求独立令牌配置。重连客户端后进行 MCP 握手/工具发现,并读取获准终端验证。发现 skill、找到端点、完成握手和终端权限是不同状态。skill 不保存 token,不从其他客户端提取凭据,也不扫描端口;多配置空间记录独立,崩溃后的记录可能陈旧。
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
侧栏右上角的重连、Codex 账号菜单(可用时)和收起使用统一 32px 点击区域与线性图标。重连按钮显示连接中反馈,任务或提问处理中仍禁用;账号菜单显示登录状态,按 ↓ 聚焦操作,Esc 关闭并回到账号按钮,点击外部或移出焦点也会关闭。收起只隐藏侧栏。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Custom instructions and CLI session spaces
|
|
2
2
|
|
|
3
|
-
In Settings → AI Tools, select a connection and
|
|
3
|
+
In Settings → AI Tools → Connections & models, select a connection and expand **Custom instructions** or **CLI session storage** (unreleased layout). These settings have explicit Save / Discard actions. Saving does not run a model or interrupt an active task.
|
|
4
4
|
|
|
5
5
|
## Choose instructions
|
|
6
6
|
|
|
@@ -29,15 +29,15 @@ Codex receives an explicit `CODEX_HOME`, SQLite and log location after executabl
|
|
|
29
29
|
|
|
30
30
|
Before starting a private Codex app-server, Tabby initializes an absent `native/auth.json` from the local CLI's ChatGPT login cache. It uses the `CODEX_HOME` found during CLI discovery, including the login-shell environment, or `~/.codex` by default. Only the login cache is copied; system configuration and history stay separate. Tabby publishes the imported file atomically with owner-only permissions on POSIX and records the imported login owner, or a fingerprint of the refresh token on older CLI versions. This lets Tabby distinguish a copied login from an independently signed-in space. Codex manages refreshes inside that space.
|
|
31
31
|
|
|
32
|
-
Claude Code
|
|
32
|
+
Claude Code owns authentication in its selected `CLAUDE_CONFIG_DIR`. Tabby no longer reads, imports or replaces its OAuth credential file: copying a rotating grant can leave the system and private logins competing for the same refresh token. Existing private credential files and history are retained. For a new or expired private login, generate and run the official selected-space `claude auth login` command, including when the CLI uses an OS credential store. This is an unreleased fix after v1.0.0.
|
|
33
33
|
|
|
34
34
|
Tabby only lists/resumes private native sessions whose local metadata belongs to the selected space. A raw native ID cannot cross this boundary. Spaces and thread references are stable across restarts; sessions are not made ephemeral to hide them. Concurrent writers are rejected rather than sharing one native conversation silently.
|
|
35
35
|
|
|
36
36
|
## Log in and migrate
|
|
37
37
|
|
|
38
38
|
1. Select the target space and use **Check selected-space login**. For Codex, this automatically initializes a missing private login cache from the local ChatGPT login when available, including for previously created empty spaces. For a private Codex space, the check reads account information and queries the Codex account service without running a model. A successful check does not establish model entitlement or available quota.
|
|
39
|
-
2. If the check reports no login, sign in with the sidebar
|
|
40
|
-
3. Existing private logins are preserved, including a login for a different account.
|
|
39
|
+
2. If the check reports no login, sign in with the sidebar account menu for the saved private Codex space, or use **Generate login command** and run the command in a local terminal. The generated command uses POSIX shell syntax on Linux/macOS and PowerShell syntax on Windows, quotes paths, and targets the selected space. Complete the official account login there, then check again. This fallback is needed when no ChatGPT file cache is available, when the local login exists only in an OS credential store, or when the cached login has expired. API-key-only caches are not imported.
|
|
40
|
+
3. Existing private logins are preserved, including a login for a different account. Codex initialization is a one-time copy when the cache is absent. Claude Code requires official login in the selected space; its system OAuth cache is not copied.
|
|
41
41
|
4. **Save session space**, then click the sidebar's reconnect control when idle. When switching spaces, the current conversation can be transferred through Tabby's portable context handoff into a new native session. Existing source records stay in their original location. Use `/new` to start fresh instead.
|
|
42
42
|
|
|
43
43
|
Changing the space does not move or erase old shared sessions from your ordinary CLI list. Failed reconnection retains the current sidebar conversation; check login for the target or restore the previous space setting before trying again. Scheduled tasks use the connection's selected space for subsequent runs; active runs keep the backend they started with.
|
|
@@ -48,7 +48,7 @@ The sidebar opens an authentication warning dialog when Codex or Claude Code rep
|
|
|
48
48
|
|
|
49
49
|
When Codex reports an authentication failure and the turn has ended, the sidebar can try one automatic recovery for a known imported login. The source must contain a newer, non-expired login for the same ChatGPT user and workspace. For older spaces without an import record, Tabby can recognize matching local and private grants, or you can explicitly choose **Copy login again and reconnect**. Both recovery paths check the account service before restoring the existing conversation and keep the draft without replaying the turn.
|
|
50
50
|
|
|
51
|
-
If the system login is also unavailable, choose **Sign in** next to the connection button or in the warning dialog. Complete the official browser login to reconnect the private space. **Sign out** removes the local login for that space and disables future automatic imports there. An explicit browser login also disables imports so that it stays independent. Claude Code
|
|
51
|
+
If the system login is also unavailable, choose **Sign in** next to the connection button or in the warning dialog. Complete the official browser login to reconnect the private space. **Sign out** removes the local login for that space and disables future automatic imports there. An explicit browser login also disables imports so that it stays independent. For Claude Code, use **Generate login command** in the authentication warning, copy and run it in a local terminal, then choose **Check login and reconnect**. This checks the selected space through the official CLI without copying credentials or sending inference. Recovery is unavailable while a turn or approval is active. System space uses the local official CLI login.
|
|
52
52
|
|
|
53
53
|
System mode deliberately retains existing CLI authentication/environment behavior. Private history does not imply account isolation: platform credential stores and managed policies may still affect an account, particularly with Claude Code. A separate login may be required. This feature is not an operating-system sandbox.
|
|
54
54
|
|
package/docs/mcp.md
CHANGED
|
@@ -1,29 +1,68 @@
|
|
|
1
1
|
# External AI connections: MCP terminal preview
|
|
2
2
|
|
|
3
3
|
This feature ships in **v1.0.0**, with controlled terminal input in preview. The older 0.9.4
|
|
4
|
-
package does not include it.
|
|
5
|
-
|
|
4
|
+
package does not include it. Current source exposes all running Tabby terminal tabs with automatic read/write
|
|
5
|
+
access to token-free local MCP clients; optional bearer clients use selected terminals. A sidebar model or API key is not required.
|
|
6
6
|
The service runs on Tabby's built-in Electron Node runtime; there is no separate
|
|
7
7
|
Node installation or proxy process for the user to manage.
|
|
8
8
|
|
|
9
9
|
## Connect a client
|
|
10
10
|
|
|
11
|
+
The unreleased source adds **local connections without a token**. Published
|
|
12
|
+
v1.0.0 packages use the optional named-client credential flow described below.
|
|
13
|
+
|
|
11
14
|
1. Open **Settings → AI Tools → External AI connections (MCP)**. The service is
|
|
12
15
|
disabled by default. Enable it and wait for **Service running** and an endpoint.
|
|
13
|
-
2.
|
|
14
|
-
|
|
15
|
-
3. Choose a configuration format and copy the generated snippet. Merge it into
|
|
16
|
+
2. The default **Local connection (no token)** needs no client creation or token.
|
|
17
|
+
Choose a configuration format and copy the generated URL-only snippet. Merge it into
|
|
16
18
|
your client's personal configuration, preserving existing entries. The entry
|
|
17
19
|
name is `tabby`; choose another name if you already use it. The plugin never
|
|
18
20
|
edits these files. Reconnect the client after saving.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
3. Local connections automatically have read/write access to **all terminal tabs**,
|
|
22
|
+
including new/reconnected sessions. No permission mode or tab selection is needed.
|
|
23
|
+
The client can use `list_tabs`, `read_tab` and the input tools. **Last request** changes when
|
|
24
|
+
the service receives a request; it is not a persistent online
|
|
22
25
|
indicator and does not by itself prove a tool succeeded.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
4. Disable MCP to revoke all local access. Optional bearer clients retain their
|
|
27
|
+
own selected scopes and modes; uncheck a bearer target to revoke that scope.
|
|
28
|
+
Pending observations are cancelled and later reads are denied.
|
|
29
|
+
|
|
30
|
+
For Codex, register the shown endpoint with
|
|
31
|
+
`codex mcp add tabby --url http://127.0.0.1:PORT/mcp` (replace `PORT`), or merge:
|
|
32
|
+
|
|
33
|
+
```toml
|
|
34
|
+
[mcp_servers.tabby]
|
|
35
|
+
url = "http://127.0.0.1:PORT/mcp"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Generating or copying this configuration does not register the server. Use the
|
|
39
|
+
intended CLI host and its actual `CODEX_HOME` (default `~/.codex`); a configuration
|
|
40
|
+
on another host or in another Codex space does not apply. Confirm registration
|
|
41
|
+
with `codex mcp list --json`, then reload the MCP client or open a new Codex
|
|
42
|
+
session after the active task finishes. Local access automatically covers current terminal sessions after restart;
|
|
43
|
+
bearer clients need fresh terminal grants after restart. Verify the MCP handshake/tool discovery, `get_capabilities`,
|
|
44
|
+
`read_skill`, `list_tabs` and an authorized terminal read. HTTP responses and
|
|
45
|
+
last-request timestamps alone are insufficient.
|
|
46
|
+
|
|
47
|
+
No `Authorization` header or token environment variable is needed. Remove these
|
|
48
|
+
fields from an older entry when switching to the local connection. An invalid
|
|
49
|
+
explicit token still receives 401; it never silently uses local permissions.
|
|
50
|
+
|
|
51
|
+
**All programs connecting locally without a token share one permission set**, its
|
|
52
|
+
cursors, request limits and input leases. Client-reported names do not provide
|
|
53
|
+
separate identities. The local mode is `auto` and includes every live terminal tab automatically.
|
|
54
|
+
New/reconnected sessions receive fresh opaque targets without manual selection.
|
|
55
|
+
This does not bypass foreground-process checks or input ownership.
|
|
56
|
+
|
|
57
|
+
### Optional separate token clients
|
|
58
|
+
|
|
59
|
+
Existing bearer configurations continue to work with their separate grants.
|
|
60
|
+
Under **Separate token clients (optional)**, add a named client, select it, then
|
|
61
|
+
copy its credential configuration and select its terminals. This does not
|
|
62
|
+
restrict the shared local connection, which covers all terminal tabs. Disable
|
|
63
|
+
MCP to revoke local access.
|
|
64
|
+
**Revoke client** removes only that bearer client. **Rotate credential and
|
|
65
|
+
generate config** immediately invalidates its old token.
|
|
27
66
|
|
|
28
67
|
Credentials are shown temporarily in this settings view and are not recoverable
|
|
29
68
|
from the saved digest. Hide the credential after copying. To copy again, rotate
|
|
@@ -33,7 +72,25 @@ If an operation fails, the settings view reads back the current service state
|
|
|
33
72
|
instead of repeating the operation or leaving a failed uncheck looking like a
|
|
34
73
|
successful revoke. A permissions-file write failure disables the current service;
|
|
35
74
|
the change was not saved, so inspect saved clients after resolving the storage
|
|
36
|
-
problem and restarting.
|
|
75
|
+
problem and restarting. Bearer terminal grants still do not survive a restart; local connections
|
|
76
|
+
automatically cover current terminal sessions.
|
|
77
|
+
|
|
78
|
+
If the window's MCP bridge temporarily fails to initialize, **Refresh** retries
|
|
79
|
+
its registration and restores the terminal feed once the bridge is available.
|
|
80
|
+
It does not repeat a failed client change or terminal operation. The utility
|
|
81
|
+
retains the host's operating-system environment, including Windows system and
|
|
82
|
+
temporary directories, while disabling system Node discovery and Node loader
|
|
83
|
+
overrides; no separate Node installation is needed.
|
|
84
|
+
|
|
85
|
+
Startup waits for a runtime-ready handshake before sending its single service
|
|
86
|
+
start request. Cold process creation and bundle loading have a 20-second budget;
|
|
87
|
+
after readiness, the HTTP listener has a separate 20-second reply deadline.
|
|
88
|
+
Ordinary control replies and the bounded process-exit cleanup retain their
|
|
89
|
+
5-second limits; this longer wait applies only to HTTP startup.
|
|
90
|
+
Failures identify process creation, runtime loading or HTTP startup separately.
|
|
91
|
+
An early exit includes its exit code and a recognized error class when available;
|
|
92
|
+
raw dependency diagnostics and credentials are not displayed. Failed or late
|
|
93
|
+
startup replies do not trigger another start request.
|
|
37
94
|
|
|
38
95
|
The first successful start chooses an available port and saves it. Later starts
|
|
39
96
|
reuse it. If that port is occupied, the service reports the conflict and stops;
|
|
@@ -51,9 +108,9 @@ Use the actual configuration space for the client you intend to connect:
|
|
|
51
108
|
|
|
52
109
|
| Client | Copy format and personal configuration |
|
|
53
110
|
| --- | --- |
|
|
54
|
-
| Codex CLI | TOML `mcp_servers.tabby
|
|
55
|
-
| Cursor | JSON `mcpServers.tabby` with `url
|
|
56
|
-
| Claude Code | JSON `mcpServers.tabby` with `type: "http"
|
|
111
|
+
| Codex CLI | TOML `mcp_servers.tabby` with `url`; optional bearer connections also use `http_headers`. Normally `~/.codex/config.toml`, or the selected custom `CODEX_HOME/config.toml`. [Official configuration](https://learn.chatgpt.com/docs/extend/mcp?surface=cli). |
|
|
112
|
+
| Cursor | JSON `mcpServers.tabby` with `url`; optional bearer connections also use `headers`. Normally `~/.cursor/mcp.json`. [Official configuration](https://cursor.com/docs/mcp). |
|
|
113
|
+
| Claude Code | JSON `mcpServers.tabby` with `type: "http"` and `url`; optional bearer connections also use `headers`. Merge into user-scope configuration in `~/.claude.json`, respecting the client's configured location. [Official scopes and configuration](https://code.claude.com/docs/en/mcp). |
|
|
57
114
|
|
|
58
115
|
Do not replace an existing configuration file with a snippet or commit a credential
|
|
59
116
|
into project configuration. Automatic merge, backups and recovery helpers are
|
|
@@ -90,9 +147,12 @@ reveal a masked payload.
|
|
|
90
147
|
|
|
91
148
|
The MCP reader subscribes independently of the sidebar and does not start task
|
|
92
149
|
log capture or acquire input ownership. Closing or reconnecting a terminal,
|
|
93
|
-
replacing its session
|
|
94
|
-
|
|
95
|
-
|
|
150
|
+
replacing its session invalidates that target, its observations and its lease.
|
|
151
|
+
Local connections automatically include the new session while preserving access
|
|
152
|
+
and active leases on other tabs. Disabling the service or a crash cancels all
|
|
153
|
+
observations/leases without replay; local access resumes for current sessions
|
|
154
|
+
when explicitly re-enabled. Saved bearer names and credential digests survive
|
|
155
|
+
restart, but bearer clients must **select the new session again**.
|
|
96
156
|
Permissions and the port are stored privately under the actual Tabby config
|
|
97
157
|
directory's `ai-tools-mcp/state.json`, separately from model credentials.
|
|
98
158
|
|
|
@@ -100,10 +160,11 @@ The endpoint is `http://127.0.0.1:PORT/mcp` in the same local network namespace.
|
|
|
100
160
|
It rejects browser Origins and mismatched Hosts. It is not a LAN/public service,
|
|
101
161
|
OAuth server, cloud connector, stdio bridge or automatic WSL/container tunnel.
|
|
102
162
|
Limits include a 1 MiB request body, four concurrent tool observations per client,
|
|
103
|
-
sixteen globally, and 240
|
|
163
|
+
sixteen globally, and 240 requests per client identity per minute. Headerless local
|
|
164
|
+
connections all count as one identity. HTTP slots
|
|
104
165
|
are separately bounded at eight per client / thirty-two globally so initialization
|
|
105
166
|
and cancellation can still reach the service while observations are saturated.
|
|
106
|
-
Legacy cancellation notifications are matched to the
|
|
167
|
+
Legacy cancellation notifications are matched to the client identity and
|
|
107
168
|
grant revision; newer HTTP cancellation follows the request's abort signal.
|
|
108
169
|
|
|
109
170
|
## Verification and current limits
|
|
@@ -130,13 +191,15 @@ retain their separate behavior.
|
|
|
130
191
|
|
|
131
192
|
## Enable command execution and interaction
|
|
132
193
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
194
|
+
Token-free local connections automatically allow read/write operations on all
|
|
195
|
+
terminal tabs. Their settings do not require a mode or terminal selection.
|
|
196
|
+
For an optional bearer client, select its concrete terminals and choose
|
|
197
|
+
**Terminal operation permission**: **Read only** (default), **Confirm each
|
|
198
|
+
operation**, or **Allow automatic operations**. Bearer permission covers only that client's checked terminals.
|
|
136
199
|
Commands use the terminal account's permissions. A mode/scope change invalidates
|
|
137
|
-
pending approvals, in-flight input and leases.
|
|
138
|
-
|
|
139
|
-
|
|
200
|
+
pending approvals, in-flight input and leases. For bearer clients, restart resets input permission to read-only and clears
|
|
201
|
+
concrete targets; disable/reconnect requires fresh terminal grants. Local
|
|
202
|
+
connections automatically cover current sessions with auto input permission. Never infer input permission from readable output.
|
|
140
203
|
|
|
141
204
|
In confirmation mode, each command, attachment, stdin or key request appears in
|
|
142
205
|
**Settings → AI Tools → External AI connections (MCP)** with its client, target and
|
|
@@ -200,7 +263,14 @@ same content in the existing `~/.claude` skill directory (Codex and Cursor use t
|
|
|
200
263
|
It does not create absent client-specific homes. Existing matching skills are
|
|
201
264
|
reported as present; modified, older or unrecognized folders are preserved as a
|
|
202
265
|
conflict, never overwritten. Check/retry with **Install / check Agent Skill** in
|
|
203
|
-
MCP settings.
|
|
266
|
+
MCP settings. Conflicts now show an explicit warning that preserved instructions
|
|
267
|
+
may still request a token, the bundled source path, and **Copy current connection
|
|
268
|
+
instructions**. Back up the preserved folder and reconcile `SKILL.md` and
|
|
269
|
+
`references/connection.md` with that source, retaining custom content, then reload
|
|
270
|
+
the client. Copying the current guide does not replace the installed skill or
|
|
271
|
+
register a client. Use the live service's authentication mode; local token-free
|
|
272
|
+
access needs no token, while separate bearer clients retain their credentials.
|
|
273
|
+
For custom skill roots, another user/host, or other agents, import
|
|
204
274
|
the bundled folder using that client's installation mechanism. There is no
|
|
205
275
|
universal directory that every agent reads, and no npm install-time script or
|
|
206
276
|
system Node requirement. The skill becomes available after Tabby has started;
|
|
@@ -226,8 +296,8 @@ For example, in Codex:
|
|
|
226
296
|
installed in the intended client's personal configuration and reloaded as
|
|
227
297
|
needed, the client performs the MCP handshake and tool discovery.
|
|
228
298
|
4. `get_capabilities`, `read_skill`, `list_tabs`, and a granted terminal read verify
|
|
229
|
-
the actual connection.
|
|
230
|
-
successful skill or server discovery.
|
|
299
|
+
the actual connection. Local access includes all terminal tabs with auto input; bearer scope and
|
|
300
|
+
mode remain independent of successful skill or server discovery.
|
|
231
301
|
|
|
232
302
|
The same workflow applies to other MCP-capable agents that load Agent Skills.
|
|
233
303
|
An agent without skill support can follow this guide manually. Remote/cloud
|
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
# Unreleased
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
- Redesign the sidebar header as consistent 32px reconnect, account and collapse controls with matching SVG icons, clear hover/focus/disabled states, reduced-motion connection progress, and an account disclosure showing sign-in state with keyboard entry and Escape return-focus.
|
|
4
|
+
- Remove the redundant header Details button; the status, context and control summaries still open the same details panel.
|
|
5
|
+
|
|
6
|
+
- Close the sidebar login/logout dropdown when clicking or moving keyboard focus outside it, including terminal widgets that stop event propagation. Escape returns focus to the toggle; menu actions and authentication behavior remain unchanged.
|
|
7
|
+
|
|
8
|
+
- Clarify preserved Agent Skill conflicts: warn that older instructions may still request a token, show the bundled source and provide current connection instructions for manual reconciliation without overwriting custom files. Separate Codex registration in the intended CODEX_HOME, client reload, MCP handshake/tool checks and terminal grants; copying configuration is not registration, and bearer auto mode covers only checked terminals; local connections automatically cover all terminal tabs. Preserve live grants and the running utility.
|
|
9
|
+
|
|
10
|
+
- Add token-free loopback MCP connections: enable the service and copy a URL-only Codex/Cursor/Claude configuration. Local programs automatically share read/write access to all terminal tabs, including new/reconnected sessions, without mode or tab selection. Disabling the service revokes local access; leases, foreground checks, Host/Origin checks and request limits remain enforced. Closing or reconnecting another tab preserves unrelated local observations and leases. Optional existing bearer clients keep separate scopes. Update all twelve UI catalogs, bilingual READMEs, setup/skill instructions, discovery records and the SVG/PNG illustration.
|
|
11
|
+
- Fix Codex session recovery after restart: all owned app-servers begin cleanup on window unload, and reconnecting the same session space reuses its current client instead of competing with its writer. A confirmed active-writer rejection gets up to three brief retries on the same server; history, drafts and permissions are preserved, with no model or terminal operation replay. A persistent external writer remains an explicit recovery error.
|
|
12
|
+
- Allow 20 seconds for the MCP HTTP listener to start after runtime readiness, independently of the 20-second process/bundle-loading budget. Ordinary controls and process-exit cleanup keep their 5-second limits; late replies do not replay startup or terminal operations.
|
|
13
|
+
|
|
14
|
+
- Redesign Settings with four categories, a compact connection picker and a full-width editor (up to 1080px within Tabby; other settings pages keep their own width). Prioritize models, permissions and recorded workflows; collapse CLI paths, custom instructions, session storage, startup/log switches, workflow preferences and helper models by default. Preserve existing draft/save behavior and update all twelve UI catalogs, both READMEs and the SVG/PNG illustration.
|
|
15
|
+
|
|
16
|
+
- Fix MCP startup environment handling: retain host OS variables, including Windows system and temporary directories, while clearing PATH and Node loader overrides regardless of key casing. A transient window-bridge initialization failure can recover on Refresh without replaying settings changes or terminal operations.
|
|
17
|
+
- Fix MCP cold-start timeouts: wait for the runtime-ready handshake before sending one start request, separate process/bundle loading from the HTTP reply deadline, and report startup stages and recognized early-exit errors without raw diagnostics.
|
|
18
|
+
- Fix Claude Code private-space authentication: use the official selected-space login command instead of copying rotating system OAuth caches. The authentication warning exposes command generation/copy and a login check with reconnect.
|
|
19
|
+
- Preserve conversation history, native sessions and drafts; block recovery during active work and never replay inference or terminal tools. CLI paths are resolved from the configured selector again.
|
|
20
|
+
- Update both READMEs, the authentication guide, bundled skill and interface illustration. Offline regression and browser evidence are recorded locally; real account/keychain, desktop, Windows/macOS and SSH validation remain pending.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tabby-ai-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A persistent AI agent sidebar for Tabby with Codex, Claude Code, OpenAI-compatible providers, DeepSeek, GLM, Kimi, and Alibaba Cloud Coding Plan support",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
package/skills/tabby/SKILL.md
CHANGED
|
@@ -7,12 +7,19 @@ description: Use Tabby AI Tools for terminal work, local and remote server coord
|
|
|
7
7
|
|
|
8
8
|
You are operating the user's running Tabby window through the `tabby_tabs` tools. This skill is bundled with Tabby AI Tools and applies to Codex, local Claude Code, and all supported API providers.
|
|
9
9
|
|
|
10
|
-
External MCP is a separate source preview. A separate portable `tabby-mcp` skill is installed for external agents; it describes connection discovery without granting access or copying credentials.
|
|
10
|
+
External MCP is a separate source preview. A separate portable `tabby-mcp` skill is installed for external agents; it describes connection discovery without granting access or copying credentials. Token-free local clients automatically have read/write access to every terminal tab; optional bearer clients start read-only and require explicit confirm/auto input for selected terminals. It exposes `get_capabilities`, static `read_skill`, `list_tabs`, `read_tab`, `send_input`, `send_keys`, `attach_process` and `release_tab`, with server-issued client/target leases and shared input ownership. No automatic foreground interruption; unknown process inspection blocks new commands. Approval is in the target window Settings, and cancellation/release does not stop a process. Never retry unknown input outcomes; read to verify. Internal workflow/attachment/config tools are not exported. Guide users to Settings → AI Tools → External AI connections (MCP); never grant the model its own access. See the external MCP route in the operation reference.
|
|
11
11
|
|
|
12
12
|
Conditional recordings can preserve interactive decisions as rules or helper-model nodes. Prefer scripted fixed steps with recorded independent machine checks. Full commands and multiline scripts up to 10,000 characters are retained. Set `policy.decision` on steps needing main-AI judgment before execution; handle `needs_model` at that step and resume without replaying predecessors. For alias execution use `workflow_run` / `workflow_interact` after live identity binding; configure observed steps with `workflow_configure`. Consult the conditional-workflow protocol in the operation reference before using these tools.
|
|
13
13
|
|
|
14
14
|
## Feature entry points
|
|
15
15
|
|
|
16
|
+
Unreleased external MCP supports token-free loopback connections. Settings owns
|
|
17
|
+
one shared local grant: enable the service, copy its URL-only configuration and
|
|
18
|
+
connect with automatic read/write access to all terminal tabs. Local programs
|
|
19
|
+
share permissions and leases; names do not isolate them. New/reconnected tabs
|
|
20
|
+
are included automatically, including after restart. Optional bearer clients
|
|
21
|
+
retain separate selected scopes and start read-only after restart. Never grant terminals or input modes on the model's own initiative.
|
|
22
|
+
|
|
16
23
|
This is the internal model-facing skill for the plugin; the external `tabby-mcp` skill covers only MCP discovery and its live tool subset. Its operation reference retains all feature routes, including features accessed through the user's panel rather than callable tools. The build embeds both documents; Codex receives them on thread creation/resume and API models receive them in each request. Do not require a separate skill install or an Agent on every server.
|
|
17
24
|
|
|
18
25
|
| User's task | Entry point |
|
|
@@ -28,7 +35,7 @@ This is the internal model-facing skill for the plugin; the external `tabby-mcp`
|
|
|
28
35
|
|
|
29
36
|
For files or clipboard screenshots, prefer `attachment_list` then `attachment_upload` / `attachment_download` on an explicit connected native SSH tab. The plugin streams and verifies the whole file without model chunk relay. Never move files by repeatedly reading or writing base64 through `read_tab` / `send_input`. Keep requestId stable for one operation; use `attachment_status` for its result. Unknown is not permission to repeat. Upload remotePath is an existing parent directory, downloads land in the private attachment cache. Read-only mode forbids transfers. Paths belong to the outer SSH host/account; confirm visibility in containers/nested SSH and the intended Agent. A verified receipt does not prove Codex saw an image. The composer accepts screenshots and files via Ctrl+V / Cmd+V or drag-and-drop, showing inline attachments and image thumbnails without an attachment button or popup; it does not send image content to the sidebar model. Consult the attachment route in the operation reference.
|
|
30
37
|
|
|
31
|
-
Custom user instructions can be configured globally or per connection in Settings → AI Tools → Instructions and sessions, as inline text or a local AGENTS.md reference. New conversations save a snapshot; use `/new` to apply later instruction edits. Codex/Claude Code can use Tabby private session storage. Codex
|
|
38
|
+
Custom user instructions can be configured globally or per connection in Settings → AI Tools → Instructions and sessions, as inline text or a local AGENTS.md reference. New conversations save a snapshot; use `/new` to apply later instruction edits. Codex/Claude Code can use Tabby private session storage. Codex initializes absent private ChatGPT caches from its local CLI file cache. Claude Code uses official login in its selected space and no longer imports or replaces system OAuth caches (unreleased fix); existing private state is retained. Unavailable/keyring-only caches still require official login. Use the selected-space login check before requesting another login. On Codex authentication failure, Tabby can retry an imported login once using a newer system credential for the same user and workspace. The sidebar account menu and warning offer official browser sign-in for the private space. Sign-out or direct browser sign-in disables imports there. For Claude Code, the authentication warning generates a copyable selected-space official login command. The user completes it in a local terminal, then checks login and reconnects when idle; never read or copy its subscription tokens. Authentication recovery preserves history and input without replaying a task. Existing system histories are retained in compatibility mode until explicitly switched. Never expose credentials in chat or replay historical tool calls during context handoff. These are Settings routes, not permission-changing model tools.
|
|
32
39
|
|
|
33
40
|
For a new kind of Tabby task, call `get_capabilities`. Discover the live profiles, commands and tabs rather than guessing IDs, installed plugins or protocol support. Read [references/operations.md](references/operations.md) (or `read_skill` with `section=operations`) for the appropriate route. Use `read_skill` with `section=upstream` to list versioned official source paths and the last snapshot check; add `source` with a returned path to read its API notes. The reference may describe features newer than the installed host; live discovery and tool results take precedence.
|
|
34
41
|
|