tabby-ai-tools 0.4.1 → 0.5.1

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.
Binary file
@@ -1,6 +1,6 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="1800" height="1440" viewBox="0 0 1800 1440" role="img" aria-labelledby="title desc">
2
- <title id="title">Tabby AI Tools v0.4.1 interface illustration — Claude Code local login, continuous goals, reasoning picker and custom OpenAI-compatible connections</title>
3
- <desc id="desc">Interface illustration, not a running screenshot. The assistant sidebar coordinates example staging database and application terminals. Connection and model controls share one compact row. Scheduled tasks, provider connections, startup opening enabled by default and twelve interface languages and the Claude Code local-login connection are shown below. Active goals continue automatically by default. A Kimi Coding Plan reasoning picker and China/international presets for Kimi and Alibaba Coding Plan are illustrated. Custom OpenAI-compatible settings show an example Base URL, model, protocol and authentication. This is a version 0.4.1 interface example.</desc>
2
+ <title id="title">Tabby AI Tools v0.5.1 interface illustration — verified workflow recording, conversational aliases, local login and API connections</title>
3
+ <desc id="desc">Interface illustration, not a running screenshot. The assistant sidebar coordinates example staging database and application terminals. Connection and model controls share one compact row. Scheduled tasks, provider connections, startup opening enabled by default and twelve interface languages and the Claude Code local-login connection are shown below. Active goals continue automatically by default. Terminal output is read on demand without automatic forwarding; a completed explicit recording and a saved workflow alias are shown. Archive status distinguishes successful checkpoints from successful persistence. Pi runtime settings show the built-in runtime and an optional Node override, host-only tools and opt-in automatic context compaction. The provider list includes Kimi and Alibaba Cloud Coding Plan connections. Custom OpenAI-compatible settings show an example Base URL, model, protocol and authentication. Version 0.5.1 example with optional Pi SDK runtime, built-in Node 22.19+, manual context compaction and structured retry waiting.</desc>
4
4
  <defs>
5
5
  <linearGradient id="background" x2="1" y2="1"><stop stop-color="#0c1622"/><stop offset="1" stop-color="#151729"/></linearGradient>
6
6
  <linearGradient id="outline"><stop stop-color="#375d5d"/><stop offset="1" stop-color="#3b3d5c"/></linearGradient>
@@ -15,9 +15,9 @@ text{font-family:"DejaVu Sans",sans-serif;fill:#e8eff9}
15
15
  <text x="56" y="65" font-size="23" font-weight="700" style="fill:#8ae6c2" class="mono">&gt;_</text>
16
16
  <text x="106" y="66" font-size="21" font-weight="700" style="fill:#a7b8cb">TABBY AI TOOLS</text>
17
17
  <rect x="1534" y="44" width="218" height="28" rx="6" fill="#22313f"/>
18
- <text x="1544" y="64" font-size="16" font-weight="600" style="fill:#8ae6c2">v0.4.1 / 12 languages</text>
18
+ <text x="1544" y="64" font-size="16" font-weight="600" style="fill:#8ae6c2">v0.5.1 / Pi optional</text>
19
19
  <text x="48" y="134" font-size="54" font-weight="700" style="fill:#f1f6ff">Your terminals. Working together.</text>
20
- <text x="50" y="176" font-size="23" font-weight="400" style="fill:#a7b8cb">Codex + Claude Code local login + APIs / Terminal tools / Scheduled AI tasks</text>
20
+ <text x="50" y="176" font-size="23" font-weight="400" style="fill:#a7b8cb">Codex + Claude Code + APIs + optional Pi SDK / Terminal tools / Scheduled AI tasks</text>
21
21
  <rect x="48" y="210" width="1704" height="632" rx="14" fill="#0d1520" stroke="url(#outline)"/>
22
22
  <rect x="49" y="211" width="1702" height="42" rx="13" fill="#1c2635"/>
23
23
  <rect x="49" y="235" width="1702" height="18" rx="0" fill="#1c2635"/>
@@ -28,7 +28,7 @@ text{font-family:"DejaVu Sans",sans-serif;fill:#e8eff9}
28
28
  <text x="1647" y="239" font-size="15" font-weight="400" style="fill:#a7b8cb">+ Settings</text>
29
29
  <rect x="49" y="253" width="499" height="588" rx="0" fill="#172130"/>
30
30
  <path d="M548 253L548 842" stroke="#3b4b60"/>
31
- <text x="72" y="285" font-size="23" font-weight="700" style="fill:#eef4ff">Claude Code</text>
31
+ <text x="72" y="285" font-size="23" font-weight="700" style="fill:#eef4ff">Pi example</text>
32
32
  <text x="248" y="284" font-size="16" font-weight="400" style="fill:#8ca0b8">workspace</text>
33
33
  <rect x="368" y="263" width="62" height="28" rx="6" fill="#1a4a3a"/>
34
34
  <text x="378" y="283" font-size="14" font-weight="600" style="fill:#8ae6c2">Linked</text>
@@ -36,26 +36,26 @@ text{font-family:"DejaVu Sans",sans-serif;fill:#e8eff9}
36
36
  <text x="448" y="283" font-size="14" font-weight="600" style="fill:#a7b8cb">Details</text>
37
37
  <text x="519" y="285" font-size="22" font-weight="400" style="fill:#8ca0b8">×</text>
38
38
  <rect x="72" y="302" width="196" height="33" rx="5" fill="#243247" stroke="#3a4c65"/>
39
- <text x="82" y="325" font-size="15" style="fill:#e8eff9">Claude Code (local)</text>
39
+ <text x="82" y="325" font-size="15" style="fill:#e8eff9">Pi SDK (example)</text>
40
40
  <text x="246" y="325" font-size="20" style="fill:#a7b8cb">⌄</text>
41
41
  <rect x="276" y="302" width="248" height="33" rx="5" fill="#202d40"/>
42
- <text x="284" y="325" font-size="14" style="fill:#e8eff9">sonnet</text>
42
+ <text x="284" y="325" font-size="14" style="fill:#e8eff9">default</text>
43
43
  <text x="390" y="325" font-size="14" style="fill:#a7b8cb">reasoning: high</text>
44
44
  <g transform="translate(0 -40)">
45
45
  <rect x="72" y="384" width="88" height="28" rx="6" fill="#344132"/>
46
- <text x="82" y="404" font-size="15" font-weight="600" style="fill:#d4e9a1">Running</text>
46
+ <text x="82" y="404" font-size="15" font-weight="600" style="fill:#d4e9a1">Done</text>
47
47
  <text x="174" y="405" font-size="15" font-weight="400" style="fill:#a7b8cb">Context —</text>
48
- <text x="290" y="405" font-size="15" font-weight="400" style="fill:#8ae6c2">Control 2</text>
49
- <text x="387" y="405" font-size="15" font-weight="600" style="fill:#8ae6c2">Release</text>
50
- <text x="461" y="405" font-size="14" font-weight="400" style="fill:#a7b8cb">Fwd on</text>
48
+ <text x="290" y="405" font-size="15" font-weight="400" style="fill:#8ae6c2">Control —</text>
49
+
50
+ <text x="461" y="405" font-size="14" font-weight="400" style="fill:#a7b8cb">Fwd off</text>
51
51
  <rect x="72" y="419" width="452" height="80" rx="8" fill="#21324b" stroke="#3b4f70"/>
52
52
  <text x="86" y="442" font-size="14" font-weight="600" style="fill:#b9d3f7">You</text>
53
- <text x="86" y="467" font-size="17" font-weight="400" style="fill:#e8eff9">Check staging-db first, then staging-app.</text>
54
- <text x="86" y="489" font-size="17" font-weight="400" style="fill:#e8eff9">Verify connectivity and the health check.</text>
53
+ <text x="86" y="467" font-size="17" font-weight="400" style="fill:#e8eff9">/remember Check staging services.</text>
54
+ <text x="86" y="489" font-size="17" font-weight="400" style="fill:#e8eff9">Verify database and application health.</text>
55
55
  <rect x="72" y="509" width="452" height="80" rx="8" fill="#1b2839" stroke="#344458"/>
56
56
  <text x="86" y="533" font-size="14" font-weight="600" style="fill:#8ae6c2">Assistant</text>
57
- <text x="86" y="557" font-size="17" font-weight="400" style="fill:#e8eff9">Database step verified. Application next.</text>
58
- <text x="86" y="578" font-size="17" font-weight="400" style="fill:#e8eff9">Goal active: continuing automatically.</text>
57
+ <text x="86" y="557" font-size="17" font-weight="400" style="fill:#e8eff9">Checks passed; recording archived.</text>
58
+ <text x="86" y="578" font-size="17" font-weight="400" style="fill:#e8eff9">Workflow alias saved: /pm1.</text>
59
59
  <text x="75" y="606" font-size="15" font-weight="600" style="fill:#a7b8cb">Workflows</text>
60
60
  <text x="205" y="606" font-size="15" font-weight="600" style="fill:#8ae6c2">Scheduled tasks</text>
61
61
  <rect x="72" y="619" width="452" height="92" rx="7" fill="#1a2938" stroke="#35534f"/>
@@ -64,8 +64,8 @@ text{font-family:"DejaVu Sans",sans-serif;fill:#e8eff9}
64
64
  <text x="85" y="692" font-size="15" font-weight="400" style="fill:#8ae6c2">Run now Pause Run history</text>
65
65
  </g>
66
66
  <rect x="72" y="683" width="452" height="93" rx="7" fill="#101a27" stroke="#42546d"/>
67
- <text x="85" y="707" font-size="16" font-weight="400" style="fill:#8ca0b8">/task1 — run the saved workflow</text>
68
- <text x="85" y="728" font-size="12" font-weight="400" style="fill:#8ca0b8">Ctrl / Cmd + Enter to send</text>
67
+ <text x="85" y="707" font-size="16" font-weight="400" style="fill:#8ca0b8">Workflow alias saved: /pm1</text>
68
+ <text x="85" y="728" font-size="12" font-weight="400" style="fill:#8ca0b8">/pm1 will verify the live targets again.</text>
69
69
  <text x="73" y="812" font-size="14" font-weight="400" style="fill:#a7b8cb">Tools</text>
70
70
  <rect x="115" y="792" width="159" height="28" rx="6" fill="#253348"/>
71
71
  <text x="125" y="812" font-size="14" font-weight="600" style="fill:#a7b8cb">Terminal tools</text>
@@ -107,7 +107,7 @@ text{font-family:"DejaVu Sans",sans-serif;fill:#e8eff9}
107
107
  <text x="1178" y="654" font-size="18" font-weight="400" style="fill:#8ca0b8" class="mono">}</text>
108
108
  <text x="1178" y="685" font-size="18" font-weight="400" style="fill:#c7b6f6" class="mono">deploy@staging-app:~$</text>
109
109
  <path d="M549 806H1751" stroke="#2b3a4d"/>
110
- <text x="574" y="830" font-size="16" font-weight="400" style="fill:#a7b8cb">2 SSH terminals · Input can be reclaimed from the sidebar at any time</text>
110
+ <text x="574" y="830" font-size="16" font-weight="400" style="fill:#a7b8cb">2 SSH terminals · Output read on demand · Automatic forwarding off</text>
111
111
  <rect x="48" y="878" width="1050" height="254" rx="12" fill="#172130" stroke="#35475c"/>
112
112
  <text x="72" y="915" font-size="24" font-weight="650" style="fill:#edf5ff">Settings / AI Tools</text>
113
113
  <text x="72" y="952" font-size="18" font-weight="400" style="fill:#a7b8cb">Default connection</text>
@@ -127,20 +127,20 @@ text{font-family:"DejaVu Sans",sans-serif;fill:#e8eff9}
127
127
  <text x="72" y="1086" font-size="16" font-weight="500" style="fill:#8ae6c2">Codex · Claude Code · OpenAI · DeepSeek · GLM · Kimi API / Plan · Alibaba Plan · Claude API</text>
128
128
  <text x="72" y="1115" font-size="14" style="fill:#a7b8cb">Goals continue automatically · Default tool-round limit: 0 (unlimited)</text>
129
129
  <rect x="1122" y="878" width="630" height="254" rx="12" fill="#172130" stroke="#35475c"/>
130
- <text x="1146" y="915" font-size="22" font-weight="650" style="fill:#edf5ff">Kimi Coding Plan / Step 2: reasoning</text>
131
- <text x="1146" y="946" font-size="16" style="fill:#a7b8cb">Region: China mainland / International / Custom</text>
130
+ <text x="1146" y="915" font-size="22" font-weight="650" style="fill:#edf5ff">Pi SDK / Example runtime settings</text>
131
+ <text x="1146" y="946" font-size="16" style="fill:#a7b8cb">SDK bundled · Tabby built-in Node by default</text>
132
132
  <rect x="1146" y="960" width="580" height="31" rx="5" fill="#233246"/>
133
- <text x="1160" y="981" font-size="16">kimi-for-coding · reasoning: max</text>
134
- <text x="1160" y="1015" font-size="16">low</text>
135
- <text x="1315" y="1015" font-size="16">high</text>
133
+ <text x="1160" y="981" font-size="16">Compatibility Node (optional): leave blank</text>
134
+ <text x="1160" y="1015" font-size="16">API Agent</text>
135
+ <text x="1315" y="1015" font-size="16">Pi SDK</text>
136
136
  <rect x="1475" y="997" width="251" height="28" rx="5" fill="#286a54"/>
137
- <text x="1490" y="1016" font-size="16" style="fill:#e8fff5">max ✓</text>
138
- <text x="1146" y="1052" font-size="15" style="fill:#a7b8cb">Custom effort (optional)</text>
137
+ <text x="1490" y="1016" font-size="16" style="fill:#e8fff5">Pi SDK selected</text>
138
+ <text x="1146" y="1052" font-size="15" style="fill:#a7b8cb">Automatic compaction (optional)</text>
139
139
  <rect x="1146" y="1063" width="461" height="28" rx="5" fill="#233246"/>
140
- <text x="1160" y="1083" font-size="14" style="fill:#a7b8cb">Provider default</text>
140
+ <text x="1160" y="1083" font-size="14" style="fill:#a7b8cb">Off by default; /compact manually</text>
141
141
  <rect x="1619" y="1063" width="107" height="28" rx="5" fill="#253348"/>
142
- <text x="1648" y="1083" font-size="14">Apply</text>
143
- <text x="1146" y="1116" font-size="15" style="fill:#8ae6c2">Alibaba Coding Plan also offers regional presets</text>
142
+ <text x="1648" y="1083" font-size="14">Saved</text>
143
+ <text x="1146" y="1116" font-size="15" style="fill:#8ae6c2">Host tools only · Existing approval and workflow policies</text>
144
144
  <rect x="48" y="1152" width="1704" height="204" rx="12" fill="#172130" stroke="#35475c"/>
145
145
  <text x="72" y="1189" font-size="22" font-weight="650" style="fill:#edf5ff">Custom (OpenAI compatible) / Example connection settings</text>
146
146
  <text x="72" y="1223" font-size="16" style="fill:#a7b8cb">API protocol</text>
@@ -155,7 +155,7 @@ text{font-family:"DejaVu Sans",sans-serif;fill:#e8eff9}
155
155
  <text x="890" y="1271" font-size="16" style="fill:#a7b8cb">Model ID</text>
156
156
  <rect x="1080" y="1249" width="646" height="33" rx="5" fill="#233246"/>
157
157
  <text x="1096" y="1272" font-size="16">your-model-id / Discover or enter manually</text>
158
- <text x="72" y="1326" font-size="16" style="fill:#8ae6c2">Streaming + function tools required · localhost HTTP supported · Connection test available</text>
158
+ <text x="72" y="1326" font-size="16" style="fill:#8ae6c2">/compact retains original history · Summaries use quota · Structured retry countdown · Stop cancels backoff</text>
159
159
  <text x="49" y="1393" font-size="16" font-weight="400" style="fill:#8ca0b8">INTERFACE ILLUSTRATION · Example connections and task output; not a running screenshot.</text>
160
160
  <text x="49" y="1418" font-size="14" font-weight="400" style="fill:#8ca0b8">Appearance varies with your Tabby theme, window size and configured connections.</text>
161
161
  </svg>
@@ -2,7 +2,7 @@
2
2
 
3
3
  [← 返回 README](../README.md) · [使用指南](guide.md)
4
4
 
5
- 后续设置页的信息组织、Provider 定义和每周接入排期见 [Provider 配置改版与路线图](provider-roadmap.md)。该文档是待实施计划,功能与发布状态按每周验收记录更新。
5
+ 后续供应商设置页改版尚未实现;规划和研究资料仅保留在本地,不随插件分发。功能与发布状态以实际代码和发布说明为准。
6
6
 
7
7
  v0.4.1 已优先加入 `provider: custom`:可选 `apiFormat: chat-completions | responses`,缺省为 Chat Completions。`apiPath` / `usesResponsesApi` 统一推理路径与工具结果格式;模型发现仍用 `/models`。`keySource: none` 仅限自定义连接,密钥服务返回空值且请求省略认证头。自定义协议加入历史指纹,既有供应商指纹不变;切换协议通过已有通用上下文导入路径处理。设置中变更协议、端点或密钥会取消并清除旧连接测试和模型列表,旧异步结果不能覆盖新状态。自定义接口不推断厂商 Thinking 参数,不硬编码模型能力。
8
8
 
@@ -17,7 +17,7 @@ npm test
17
17
  npm run build
18
18
  ```
19
19
 
20
- CI 使用 Node.js 20,在 Ubuntu、macOS 和 Windows 上运行类型检查、测试和构建。开发时可用 `TABBY_PLUGINS=/path/to/tabby-ai-tools tabby --debug` 加载插件。
20
+ CI 使用 Node.js 22.19.0,在 Ubuntu、macOS 和 Windows 上运行类型检查、测试和构建。开发时可用 `TABBY_PLUGINS=/path/to/tabby-ai-tools tabby --debug` 加载插件。
21
21
 
22
22
  ### 安装后的重启提示
23
23
 
@@ -94,7 +94,7 @@ npm run skill:check # 检查内嵌知识与 skill 文件是否一致
94
94
 
95
95
  任务流程仅由 `/remember TASK` 开始录制,结束后设置别名,`/task1` 执行。`src/sudo-workflow.ts` 构造终端内非交互预检与保活,`src/tab-tools.ts` 管理其任务生命周期;使用假 sudo 测试预检失败和跨命令保活,不能替代真实桌面/SSH 策略验证。
96
96
 
97
- 流程身份和验收采用结构化 `TaskStep.server/dependsOn/verification/verificationCommands`。`read_tab` 仅提取连接字段白名单和会话路径;`workflow_checkpoint` 由面板路由到 `TaskMemory`,使用同终端新观察和串行发送门禁。通用规则在 bundled skill,具体流程和约束由发送时隐藏提示注入。旧库字段可选保持兼容;新录制须有完整身份及逐步验收。不将单纯读取或发送回执作为成功证明,语义验收仍由模型判断。
97
+ 流程身份和验收采用结构化 `TaskStep.server/dependsOn/verification/verificationCommands`。`read_tab` 仅提取连接字段白名单和会话路径;`workflow_checkpoint` 由面板路由到 `TaskMemory`,使用同终端新观察和串行发送门禁。通用规则在 bundled skill,具体流程和约束由发送时隐藏提示注入。旧库字段可选保持兼容;新录制须有完整身份及逐步验收。不将单纯读取或发送回执作为成功证明,语义验收仍由模型判断。`workflow_status` 与 `workflow_set_alias` 同样由面板路由:前者区分录制、别名执行、归档中、拒绝归档和写盘失败,后者仅操作本会话/目录最近完成的显式录制,禁止只读模式修改。checkpoint 返回录制模式和归档资格;写盘失败保留已验收记录供别名工具重试,不重放终端命令。发送后续目标前等待完成中的归档,避免清理录制进度。最近录制及失败重试缓冲仅在当前进程保留,重启后已落盘流程仍通过设置管理。
98
98
 
99
99
  终端接管由 `send_input` 自动处理,不再生成 `local/terminalTakeover` 请求。检测未知(SSH、无枚举接口、枚举异常)时不因检测能力缺失暂停,不盲发 Ctrl+C;已检测的无关进程需要 `foregroundTaskNeeded=false`,发送 Ctrl+C 并验证停止。保留任务所需进程、会话/所有权检查、取消与只读限制。
100
100
 
@@ -111,3 +111,29 @@ API / Claude Code 的 active Goal 在普通文本响应结束后由 `ApiAgent`
111
111
  `model-reasoning.ts` 为缺少服务端能力元数据的已知模型提供保守等级,模型浮窗对 API / Claude Code 统一提供第二步、默认值与手动输入。离线 HTTP / CLI 测试覆盖选中后保存、下一次推理请求中的供应商原生参数、默认值清除及保存失败回滚。不以真实模型调用作为常规验证。
112
112
 
113
113
  Kimi/百炼 Coding Plan 的实现与验证边界见 [配置说明](coding-plans.md)。本地夹具还验证区域端点预设、保留自定义代理和密钥草稿、切换区域取消旧模型发现、两套 Kimi Key 配置、持久缓存标识、仅思考模型参数和百炼 `enable_thinking`。没有运行收费模型或证明真实套餐准入;区域的可用模型与额度须以各平台控制台为准。
114
+
115
+ ## 终端回显与重试回归
116
+
117
+ 面板不订阅 `terminalOutput.updates$`,移除了 700ms / 2,000 字符批次经 `turn/steer` 注入的路径。终端服务仍使用有界缓冲供 `read_tab` 和用户发送/继续时的一次摘要读取;重试等待只用每秒刷新的本地 UI 时钟展示已等待时长与可用的倒计时,不创建模型请求或新的后台重试循环;恢复、断线、换会话、取消和销毁面板时清理 UI 时钟。
118
+
119
+ `turn-retry.ts` 识别字符串错误类别与结构化 `httpStatusCode: 429`。本地 Codex app-server 生成的 `ErrorNotification` 仅包含 `error / willRetry / threadId / turnId`;`TurnError` 的 `message / additionalDetails` 可以包含重试时长,但没有独立截止时间字段。只解析明确的 `retry in/after N seconds/ms/minutes` 文本;缺失时显示未知。后台日志中未发给客户端的信息不会被推测或轮询数据库补齐。
120
+
121
+ `test/turn-retry.test.js` 使用真实终端缓冲和模拟后台事件,覆盖一万段高频回显、等待期合并、重试时间缺失与显式时长、重复错误合并、旧回合事件、停止失败/成功、断线与恢复、UI 时钟自动刷新与清理。`test/task-memory-panel.test.js` 覆盖第二步已发送后限流、中断、恢复读取验收并继续,不重复发送 stash 或解压。全部为本地夹具;未访问用户 Windows 现场日志、未恢复原任务,也没有真实模型压力测试或 Tabby 桌面端到端验证。
122
+
123
+ ## Optional Pi sidecar and context projections
124
+
125
+ Use Node 22.19+ (`.nvmrc` and both CI workflows pin 22.19.0). Angular 15/webpack retain TypeScript 4.9; `typescript-pi` aliases the pinned 5.9.3 compiler for `runtime/pi/tsconfig.json` in NodeNext mode. `npm run typecheck` checks both boundaries, `npm test` first builds the sidecar, and `npm run build` emits `dist/index.js` plus `dist/pi/sidecar.mjs`. Since 0.5.1, both pinned Pi SDKs are build-only devDependencies. `scripts/build-pi.mjs` uses pinned esbuild to bundle their JavaScript into the ESM sidecar, rejects external package imports, disables optional native WebSocket accelerators and emits third-party license/notice text. Keep the SDK outside the Angular bundle. Pi defaults to Electron `utilityProcess` using the host Node; a Node 22.19+ executable is only an explicit compatibility override.
126
+
127
+ `npm run test:package` packs the built files and installs the actual tarball with no `node` on PATH and lifecycle scripts explicitly enabled. It uses an independent empty cache and the public registry, avoiding assumptions about metadata cached by `npm ci`. A control package whose postinstall calls `node` must fail in the same environment, and the entire installed production dependency closure is checked for lifecycle hooks and leaked Pi/Google/protobuf packages. An optional tarball argument checks the saved release artifact directly. This check runs after the build in Linux/macOS/Windows CI. The isolated-sidecar regression copies only the bundle outside the repository and completes a real local HTTP/host-tool exchange without installed SDK packages. `install:tabby` copies built files without invoking npm and excludes local roadmap/research files. These checks do not replace a Windows Tabby desktop upgrade test.
128
+
129
+ `PiBackend` reuses the host's API thread/UI/tool-policy port, while `PiAdapter` delegates the complete native loop to the SDK. The pipe acknowledges persisted session setup and accepted input before inference. Host action intents/results are stored before/after execution; repeated IDs use the saved result or return unknown-state evidence. Process exit aborts pending host tool waits. No process auto-restart or whole-prompt retry is allowed. `agent/lifecycle` carries structured retry, compaction and settled events; the panel clock only displays the supplied delay.
130
+
131
+ `api-context.ts` owns immutable API request projections. Summaries record source hashes/ranges and retain whole batches from a user-turn boundary; private reasoning is not passed to the summarizer. Pi session JSONL is the authority for Pi model context, with the Tabby store used for UI, goals, journals and portable migrations. The existing structured workflow state and checkpoint enforcement stay in the host.
132
+
133
+ `test/pi-agent.test.js` uses actual local HTTP streaming fixtures, without credentials or real model calls. Validate persistence, retry-after-tool, cancellation, budget/quota, repeated compaction and raw entry retention. The isolated Linux desktop fixture additionally loaded the plugin in official Tabby 1.0.238 (Electron 43.7.0 / Node 24.21.0), rendered runtime settings and exercised the sidebar → Node 22.19 Pi → host list_tabs → verified Goal flow. It used Xvfb and no real model. Windows/macOS, SSH/PTY mutations and real-provider execution still require their actual environments. See [runtime details](pi.md) and the [unreleased change note](releases/pi-runtime.md).
134
+
135
+ ### Built-in Pi runtime lifecycle
136
+
137
+ `dist/pi/electron-host.cjs` runs in Electron main through Tabby’s existing remote bridge and Node `createRequire`. This avoids relying on the bundled app’s `process.mainModule.require`. It forks the fixed packaged sidecar with Electron `utilityProcess`, bounds the JSON/diagnostic channels, strips loader injection variables and owns termination on renderer/window destruction. SDK traffic uses `process.parentPort`; final done/fatal IPC is acknowledged before shutdown so the utility cannot remain alive after a completed turn. Explicit compatibility paths retain the existing Node subprocess transport. Empty paths do not search PATH for node. The selected runtime must provide Node 22.19+; older hosts should update Tabby first.
138
+
139
+ Tests cover default host selection without node on PATH, main-process bridge selection, output acknowledgment, cancellation waiting for exit and owner/crash cleanup. Actual isolated Linux Tabby 1.0.238 / Electron 43.7.0 / Node 24.21.0 exercised SDK streaming, a host-tool round trip, cancellation while waiting for a tool result and owner-window termination without system Node on PATH. It uses only local HTTP fixtures. Windows/macOS utility-process desktop behavior remains a separate validation scope.
package/docs/guide.md CHANGED
@@ -10,9 +10,11 @@
10
10
 
11
11
  ### 准备环境
12
12
 
13
+ 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 修复,无需全局关闭安装脚本。
14
+
13
15
  - 本机安装 [Tabby](https://github.com/Eugeny/tabby),并能访问所选 AI 服务。操作内网服务器时,本机还需能通过 Tabby 连接目标服务器。
14
16
  - **ChatGPT 订阅/Codex 登录模式**:本机安装 Codex CLI,在本地终端执行 `codex login`,使用具备 Codex 权限的 ChatGPT 账号登录,再执行 `codex login status` 确认认证状态,无需在插件中填写 API Key。插件默认连接选 **Codex(本机登录)**;可用模型、用量和工作区权限以账号实际权益为准。见 [OpenAI 官方认证说明](https://learn.chatgpt.com/docs/auth)。CLI 需支持 `thread/goal/*`;已测试版本见[验证记录](../VALIDATION.md)。
15
- - **Claude 订阅/Claude Code 本机模式(开发版)**:本机安装官方 Claude Code,运行 `claude auth login`,用 `claude auth status` 核对账号与认证方式。在侧栏或默认连接中选择 **Claude Code(本机登录)**;无需在插件里配置订阅凭据。API Key/云平台可能使用独立计费。完整方案、权限、恢复机制与验证限制见 [Claude Code 接入](claude-code.md)。
17
+ - **Claude 订阅/Claude Code 本机模式**:本机安装官方 Claude Code,运行 `claude auth login`,用 `claude auth status` 核对账号与认证方式。在侧栏或默认连接中选择 **Claude Code(本机登录)**;无需在插件里配置订阅凭据。API Key/云平台可能使用独立计费。完整方案、权限、恢复机制与验证限制见 [Claude Code 接入](claude-code.md)。
16
18
  - **API 模式**:准备 OpenAI、DeepSeek、GLM、Kimi、百炼 Coding Plan 或 Claude 对应的 Key,无需安装 Codex CLI。订阅登录与 API 连接是两种独立配置方式。
17
19
 
18
20
  ### 安装插件
@@ -162,7 +164,7 @@ API 工具循环检测始终启用,无需等到轮数上限。近期同一段
162
164
 
163
165
  ## 重复任务与操作习惯
164
166
 
165
- 用 `/remember 任务描述` 明确开始录制,插件执行任务并记录已核对的终端步骤;完成后提示是否设置别名,例如 `task1`。之后直接发送 `/task1` 执行流程。普通任务不再自动归档,也不再按相似描述自动匹配;输入框中的“不检索记忆”复选框已移除。点击 **任务流程** 或输入 `/workflows` 查看当前目录的流程,设置中可以给已有流程添加别名。
167
+ 用 `/remember 任务描述` 明确开始录制,插件执行任务并记录已核对的终端步骤;完成后提示是否设置别名,例如 `task1`。之后直接发送 `/task1` 执行流程。普通任务不再自动归档,也不再按相似描述自动匹配;输入框中的“不检索记忆”复选框已移除。点击 **任务流程** 或输入 `/workflows` 查看当前目录的流程,设置中可以给已有流程添加别名。也可以直接告诉助手“设置别名为 pm1”:助手先用 `workflow_status` 核对本会话最近录制的目标与归档状态,再用 `workflow_set_alias` 保存并回读 `/pm1`。checkpoint 成功仅表示步骤验收;录制不完整或含敏感内容时会说明无法归档的原因。普通任务不能事后保存为流程,不能为了补存而重跑已完成操作。
166
168
 
167
169
  含 sudo 的流程会提前提示在每个实际执行终端运行 `sudo -v` 或 `sudo ls`,完成认证后继续。其他终端的认证不保证共享。执行时用 `sudo -n -v` 预检,每 30 秒非交互刷新;认证失效时停止该命令并要求重新认证。详情和清理边界见[任务流程说明](task-workflows.md)。各步骤还保存服务器 IP、持久连接/服务器 ID、操作路径、前置依赖和验收证据。跨服务器也逐步执行:读取对应终端的新结果,并通过步骤确认工具验收后,才放行下一步;目标或路径不符时停止。操作偏好继续在设置页管理,`/remember` 专用于开始任务录制。
168
170
 
@@ -212,7 +214,7 @@ AI Tools 默认在启动 Tabby 时自动展开侧栏,使用默认连接,无
212
214
 
213
215
  | 入口 | 用途 |
214
216
  | --- | --- |
215
- | 工具栏机器人图标 | 打开/收起侧栏,从当前终端绑定自动转发;侧栏边缘可拖动调宽。 |
217
+ | 工具栏机器人图标 | 打开/收起侧栏,从当前终端绑定上下文摘要;侧栏边缘可拖动调宽。 |
216
218
  | 侧栏连接选择、连接图标 | 切换 Codex/API 连接、应用连接参数或重新连接。 |
217
219
  | 模型摘要、Thinking 控件、`/model` | 选择模型、推理强度和支持的思考模式。支持 `/model 模型ID`。 |
218
220
  | `/new` 或 `new` | 开始新会话,保留旧会话。 |
@@ -226,7 +228,7 @@ AI Tools 默认在启动 Tabby 时自动展开侧栏,使用默认连接,无
226
228
  | 侧栏提问选项与审批卡片 | 回答问题、补充自由文本、处理授权。 |
227
229
  | **停止**、**释放**、**临时释放** | 中断 AI 回合、取回全部或单个终端输入权;不会自动撤销已执行命令,已提交命令可能仍运行。 |
228
230
  | **继续当前目标** | 在目标仍未完成时继续推进。 |
229
- | **详情 → 自动转发** | 查看绑定源或停止新增输出自动转发;独立的按需读屏工具仍可使用。 |
231
+ | **详情 → 终端上下文** | 查看或解除摘要源绑定;运行中不自动转发输出,AI 用 `read_tab` 按需读取。 |
230
232
  | 消息复制、**回到最新消息** | 复制文本,恢复滚动跟随。 |
231
233
  | **Settings → AI Tools** | 配置连接、模型、权限、预算、启动、语言、流程偏好和定时任务。 |
232
234
  | 在对话中请求操作 Tabby | AI 可发现连接配置、标签、分屏、设置、快捷键与插件命令;SFTP、隧道等依赖已安装提供者的实际入口,原生弹窗可能需要人工操作。 |
@@ -238,7 +240,7 @@ AI Tools 默认在启动 Tabby 时自动展开侧栏,使用默认连接,无
238
240
 
239
241
  - 发送被拒绝或回合执行失败时,对话区和输入框上方会显示具体原因。用量/频率超限提示等待恢复,并在已收到额度信息时显示重置时间;上下文和预算超限给出相应处理提示。同步发送失败会恢复输入内容;自动重试期间保留执行状态,收到正常回答后清除输入框上方的错误提示。
240
242
 
241
- - **详情**(也可输入 `/status` 打开)完整显示路径、会话 ID、任务状态、查询时 Codex 上报的模型与运行状态、上下文 token 和会话累计、额度、普通用量是否可用、目标、权限、控制终端列表及自动转发说明,并保留 **刷新** 查询。各项独立读取,部分读取失败时仍显示其他信息。详情高度受限且可滚动,窄侧栏内完整信息自动换行;详情与 `/resume` 历史列表互斥。历史、输出等异常通知仍直接显示。还支持 `/new` 和 `/help`。
243
+ - **详情**(也可输入 `/status` 打开)完整显示路径、会话 ID、任务状态、查询时 Codex 上报的模型与运行状态、上下文 token 和会话累计、额度、普通用量是否可用、目标、权限、控制终端列表及终端上下文说明,并保留 **刷新** 查询。各项独立读取,部分读取失败时仍显示其他信息。详情高度受限且可滚动,窄侧栏内完整信息自动换行;详情与 `/resume` 历史列表互斥。历史、输出等异常通知仍直接显示。还支持 `/new` 和 `/help`。
242
244
 
243
245
  - 上下文摘要收到 Codex 的 token 用量通知后显示百分比;未上报时显示“上下文 —”。**详情** 显示最近一次模型请求的用量、上下文窗口大小和会话累计 token;切换会话时会清空旧会话数字,等待新通知。
244
246
 
@@ -258,7 +260,8 @@ AI Tools 默认在启动 Tabby 时自动展开侧栏,使用默认连接,无
258
260
 
259
261
  ## 终端输出与远程环境
260
262
 
261
- - 从终端点击工具栏图标会绑定该终端作为自动转发源;按游标只把新片段送给 Codex。同目录有多个终端时,恢复后的 AI 面板不会猜测自动转发源,需要从目标终端再次点击工具栏图标。AI 面板可随时在 **详情 → 自动转发** 中点击 **停止自动转发**;之后也可从终端重新绑定。独立的 `tabby_tabs` 工具会监控当前窗口的所有终端标签,以便 Codex 按需读取任意标签;停止自动转发不关闭工具读取能力。
263
+ - 从终端点击工具栏图标会绑定该终端作为上下文摘要源;仅在用户发送新回合或继续目标时附带最多 6,000 字符的新增输出。执行期间的回显保留在有界终端缓冲区,不会通过 `turn/steer` 自动追加或启动模型请求;AI 必须用 `read_tab` 主动读取结果。摘要不是流程验收证据。同目录有多个终端时,恢复后的 AI 面板不会猜测摘要源,需要从目标终端再次点击工具栏图标。可在 **详情 → 终端上下文** 中点击 **解除绑定**,独立的 `tabby_tabs` 按需读取不受影响。
264
+ - 收到后台 `willRetry` 错误事件后,侧栏保持回合执行中并显示限流/重试等待和实时已等待时长,暂时禁用追加发送。后台错误文本明确提供等待时长时显示下次重试时间及倒计时;倒计时结束但尚无返回时明确显示等待后台结果,否则显示“后台未提供下次重试时间”;账号额度重置时间不等同于下次重试时间。点击 **停止** 请求取消后台回合,收到中断结果后再继续。429 可能是请求频率或用量限制,不能仅据此认定长期额度耗尽;避免反复停止并立即新建任务。CLI 只写入本地日志、没有发送事件的信息无法在面板中展示。恢复流程先核对终端结果、产物、目录和 Git 状态,再验收待确认步骤,不重放已发送的 stash、restore、apply。
262
265
 
263
266
  - 新任务启动时最多附带 6,000 字,运行中每批最多 2,000 字、每回合最多 16,000 字,超出部分留给后续回合。缓存只保留已绑定终端最近 32,768 字;缓存溢出时会明确标记截断。`new` 会丢弃旧会话的未发送终端输出。
264
267
 
@@ -312,3 +315,11 @@ NVM 优先 current,其余按 Node 版本降序。IDE 同时支持 `.vscode-ins
312
315
 
313
316
  本地安装后请在 **已安装插件** 中查看;**可用插件** 列表来自 npm 搜索,未发布到 npm 的本地包不会出现在该列表。
314
317
 
318
+
319
+ ## Pi 与上下文压缩(v0.5.0)
320
+
321
+ 在 API 连接的“Agent 运行时”中选择 Pi SDK,将兼容 Node 路径留空,然后从侧栏重新连接。默认复用 Tabby 内置 Node 的 Electron 独立进程;外部 Node 22.19+ 路径仅作为显式兼容选项。供应商、模型、Base URL 和密钥来源沿用连接设置;Pi 不提供订阅认证。仅开放 Tabby 宿主工具,审批、只读、终端所有权、sudo 与流程 checkpoint 继续生效。
322
+
323
+ 空闲时输入 `/compact` 手动压缩。内置 API 保留原始历史,按完整工具批次投影请求;Pi 保留自己的 JSONL 原始条目和压缩边界。自动压缩默认关闭,摘要本身消耗额度并计入 Goal 预算。Pi 的重试倒计时使用 SDK 结构化事件,取消会结束独立进程,不重放整段任务。中断后先读取真实终端再继续,未知动作不会自动重放。
324
+
325
+ Pi 的使用、存储、预算和验证限制见 [Pi runtime](pi.md)。开发与 CI 使用 Node 22.19+;升级系统 Node 不会改变 Electron 内置 Node。当前已验证本地 HTTP 夹具,并在独立配置的 Linux Tabby 1.0.238(Electron 43.7.0 / Node 24.21.0)中跑通侧栏、Pi 子进程、宿主 list_tabs 与 Goal 完成;真实模型、SSH/PTY 修改操作和 macOS/Windows 桌面仍待实测。此功能从 v0.5.0 开始提供。
package/docs/pi.md ADDED
@@ -0,0 +1,47 @@
1
+ # Pi runtime
2
+
3
+ Version 0.5.0 offers **Pi SDK** as an optional runtime for API connections. It uses pinned `@earendil-works/pi-coding-agent` / `pi-ai` 1.4.0 in an isolated runtime process. Codex and Claude Code remain independent CLI connections.
4
+
5
+ Since **0.5.1**, the release includes a self-contained Pi JavaScript bundle and third-party notices. Tabby installs no Pi SDK dependency tree and runs no Pi dependency postinstall scripts. Installing the plugin does not require a system `node` command. Pi defaults to Tabby’s built-in Node through Electron `utilityProcess`, so a compatible Tabby needs no separate Node installation even for Pi. An external Node 22.19+ executable is an explicit compatibility option. Codex, Claude Code and the built-in API connections keep their existing requirements. Version 0.5.0 could fail installation when `protobufjs` tried to run its postinstall script without `node` on PATH; update to 0.5.1 rather than disabling install scripts globally.
6
+
7
+ ## Setup
8
+
9
+ 1. Install or update `tabby-ai-tools` to version 0.5.1 or newer in **Settings → Plugins**, then restart Tabby. For source installations, use Node 22.19+ to run `npm ci`, `npm run build` and `npm run install:tabby -- "<Plugins Directory>"`; the installer copies the built runtime without running npm in the plugin directory.
10
+ 2. In **Settings → AI Tools**, select an API connection and choose **Agent runtime → Pi SDK**. Leave **Compatibility Node executable** empty to use Tabby’s built-in runtime. No system `node` command is required.
11
+ 3. Pi needs Node 22.19+ in its selected runtime. If an older Tabby cannot provide it or lacks the utility-process bridge, update Tabby first. For an explicit compatibility override, enter a real external Node 22.19+ executable; do not enter Tabby’s executable or a shell command with flags.
12
+ 4. Keep the existing provider, Base URL, model ID and key source. OpenAI uses Responses, Claude API uses Anthropic Messages, and the other presets use Chat Completions; custom connections keep their selected protocol. Kimi Coding explicitly uses `system` messages and `max_tokens`, including international and proxy endpoints, rather than relying on SDK URL detection. API billing applies; choosing Pi does not provide a ChatGPT or Claude subscription login.
13
+ 5. Connect from the sidebar. The sidebar’s **Details** panel reports whether the built-in or compatibility runtime is selected and its Node/Electron versions. The explicit connection test uses the real Pi process and a harmless nonce tool; it consumes model quota when requested.
14
+
15
+ Only the Tabby tools advertised by the host are available. Pi's built-in shell, filesystem tools, extensions, project context files, external skills, MCP discovery, prompt templates and cache warming are disabled. The existing Tabby skill and task context are supplied by the host. Terminal tools run serially, with the same read-only rules, approvals, terminal ownership, sudo handling and workflow checkpoints as other connections. A command being sent is not evidence that it completed.
16
+
17
+ ## Context and history
18
+
19
+ `/compact` manually summarizes an idle API or Pi conversation. It consumes model quota. For the built-in API runtime, the original messages remain intact; an independently checked summary projection cuts only at a user-turn boundary so a complete tool batch stays together. Source ranges, a source hash, retained index and summary token usage are saved. Codex and Claude Code continue managing their own native context.
20
+
21
+ For Pi, the SDK's JSONL session is the sole native model context. Compaction appends a summary with its retained entry boundary; old entries remain readable. Tabby keeps a UI transcript, goal, action journal and portable handoff rather than replacing Pi's history. Changing runtime, model, provider or protocol creates a portable handoff into a separate session. Original native histories stay on disk. Manual compaction does not acknowledge host-only input: queued corrections and interruption recovery notices remain pending until a subsequent normal prompt imports them into Pi.
22
+
23
+ Automatic compaction is **off by default**. Enable it per connection after trying manual compaction. The API runtime uses a conservative character estimate at 75% of the configured context window (not an exact tokenizer). Pi uses its own threshold/overflow handling. Summaries preserve constraints and pending checkpoints in their instructions; the host's structured workflow checks remain authoritative regardless of summary text.
24
+
25
+ ## Retries, cancellation and budgets
26
+
27
+ Pi owns its session retries, with two retries and a maximum advertised wait of 60 seconds. Provider SDK retries are disabled, preventing nested retry multiplication. The sidebar consumes structured retry delays; no client timer resends the prompt. Replies truncated by the output token limit are reported as incomplete failures, retaining partial text and reported usage; truncation does not silently restart the Goal or report success. Completion waits for `agent_settled` and process completion. A low-level `agent_end` alone is insufficient.
28
+
29
+ All Pi model requests, retry attempts and summary requests share a **100-request safety cap per invocation**. Summary usage is counted, even when compaction needs more than one request. Reported tokens count toward the current goal budget; after exhaustion, another model request or host tool cannot proceed. An already-started response may exceed the remaining budget; these are reported usage limits, not a provider billing guarantee. Retry and request limits reset for a new invocation; goal token usage persists.
30
+
31
+ The sidecar continues active goals itself using the same native session. Tabby does not wrap Pi with the API persistent-goal loop. Existing host tool limits and repeated-tool detection still apply. Stop remains available during model streaming, tool approval, compaction and backoff and terminates the owned process tree. Appended sidebar input is queued for the next host invocation after the current Pi run settles; use Stop first when a correction must interrupt current work.
32
+
33
+ ## Recovery and storage
34
+
35
+ Sessions live under the Tabby configuration directory in `tabby-agent-sessions/pi/<session-id>/`. Host UI indexes and action journals remain in the existing session store. Use the sidebar history list to resume; reported cumulative usage and the last known model input are restored with the UI history. Do not edit a Pi JSONL file or its host index while a session is active. Missing or unreadable native history stops execution rather than silently creating an empty model context.
36
+
37
+ Each Pi tool call has a stable native action ID. Before execution, Tabby durably records the intent; afterward it records the result. A duplicate returns the recorded result. An intent without a known result never executes again automatically. The private stdin/stdout bridge has no HTTP transport retries and never automatically restarts a failed process. Accepted user-input cursors are recorded in Pi history and acknowledged by the host before inference. Following a crash or lost response, the next prompt instructs the agent to read the terminal and verify actual state before continuing. This does not make arbitrary shell operations transactional or safe to replay under a new action ID.
38
+
39
+ ## Validation boundary
40
+
41
+ Local HTTP fixtures exercise the actual SDK, provider streaming, host tools, retries, cancellation, quota errors, goal continuation, persistent restart, repeated compaction and summary budgets without calling a real model. The three-platform CI matrix uses Node 22.19.0. Running those checks locally on Linux does not establish macOS/Windows or desktop Tabby results. A downloaded official Linux Tabby 1.0.238 was also exercised under Xvfb with an isolated configuration: Electron 43.7.0 / host Node 24.21.0 loaded the plugin, the sidecar used Node 22.19.0, and the sidebar completed a local-provider task through the actual `list_tabs` host bridge and goal update. Runtime settings rendered in the actual app. This covers a local desktop fixture, not SSH/PTY mutation, real-provider/subscription access, macOS or Windows end-to-end behavior. Pi remains optional pending those checks.
42
+
43
+ Upstream API reference: [Pi SDK](https://github.com/earendil-works/pi/blob/f9daca3480732d0042b1df3a6e27221f597a620d/packages/coding-agent/docs/sdk.md).
44
+
45
+ ## Built-in runtime verification
46
+
47
+ In official Linux Tabby 1.0.238 (Electron 43.7.0, built-in Node 24.21.0), the packaged main-process bridge and actual SDK completed streaming and a host-tool round trip with no system Node on PATH. Separate runs verified cancellation while a host-tool result was pending and termination when the owner window was destroyed. All model traffic used a local HTTP fixture; no real model or terminal mutation was performed. Electron renderer Node worker threads are unsupported in that app, and `ELECTRON_RUN_AS_NODE` did not provide the required startup path, so the implementation uses the supported utility-process API. The main bridge owns window/crash cleanup and acknowledges final IPC before the utility exits. macOS/Windows desktop behavior remains unverified; CI covers bridge ownership, cancellation, protocol handling and package installation on those systems.
@@ -0,0 +1,19 @@
1
+ # v0.5.0 — Workflow aliases, Pi runtime and context compaction
2
+
3
+ Explicit workflow recordings now expose their recording, verification and archive status. Ask the assistant to save an alias such as `/pm1` after a completed `/remember` task; `workflow_status` and `workflow_set_alias` verify the intended recording and read back the saved alias. Checkpoint success is distinguished from archival. Rejected recordings show the reason, and failed archive writes can be retried from retained verified steps without replaying terminal commands. Follow-up goals wait for an in-progress archive. Ordinary tasks cannot be saved retroactively; retry buffers are session-local and do not survive restart.
4
+
5
+ ## Runtime and recovery
6
+
7
+ - API connections can select an isolated **Pi SDK** runtime with pinned SDK 1.4.0 and an external **Node 22.19+** process. Host-advertised Tabby tools retain the existing terminal ownership, approvals, read-only rules and workflow checkpoints.
8
+ - `/compact` supports manual API/Pi context compaction with durable history and portable handoffs. Automatic compaction is opt-in. Pending input and interruption recovery notices remain pending until a normal Pi prompt imports them; truncated replies cannot complete a goal.
9
+ - High-frequency terminal output stays in the bounded local buffer and is read explicitly. Backend retry waiting shows elapsed time and a countdown only when supplied by the backend. Stop cancels the turn; recovery checks live results before confirming pending workflow steps. The plugin adds no model retry loop.
10
+
11
+ ## Documentation and artwork
12
+
13
+ Both READMEs, the guide, workflow/runtime/development documentation, bundled skill and all twelve UI catalogs reflect the current behavior. The SVG and PNG overview show example connections, verified recording, a saved alias, scheduled tasks and Pi settings; the title robot GIF and reduced-motion image are preserved. Local roadmap and research documents are excluded from source tracking and package contents.
14
+
15
+ ## Validation and limits
16
+
17
+ Local Linux / Node 22.19.0 validation passed skill bundling/checking, type checks, the full offline test suite (760 tests: 754 passed, 6 Windows-only skips), production builds and whitespace checks. The npm tarball is inspected for runtime entry points, dependencies, bilingual documentation, artwork and bundled skill. Linux/macOS/Windows CI results and the verified tarball checksum are recorded in the GitHub Release.
18
+
19
+ Offline fixtures cover workflow alias follow-up, archive failure/retry, high-frequency output, backend waiting/cancellation and API/Pi context handling. The earlier isolated Linux Tabby fixture exercise is documented in `docs/pi.md`. No paid inference or original-task replay is performed for this release. Real provider/subscription access, SSH/PTY modification workflows and macOS/Windows desktop behavior remain outside this release's verification.
@@ -0,0 +1,13 @@
1
+ # v0.5.1 — Fix plugin installation without system Node
2
+
3
+ Version 0.5.0 added the optional Pi SDKs as ordinary runtime dependencies. Tabby therefore installed their full dependency tree even when Pi was unused. On systems without a `node` command on PATH, the `protobufjs` postinstall script could fail and block the entire plugin upgrade.
4
+
5
+ The pinned Pi SDKs are now build-only dependencies. A self-contained ESM bundle and third-party notices ship in `dist/pi`; the only ordinary runtime dependency is again `cross-spawn`. Installing or updating the plugin no longer installs the Pi/Google/protobuf dependency chain. Pi now defaults to an isolated Electron utility process using Tabby’s built-in Node, avoiding a separate Node installation on compatible hosts. The optional compatibility executable requires Node 22.19+; older hosts should update Tabby first. Codex, Claude Code and the built-in API runtime retain their existing requirements.
6
+
7
+ Source installation copies the prebuilt runtime without invoking npm. Both READMEs, the guide, Pi/development documentation, bundled model guidance, twelve UI catalogs and the SVG/PNG overview explain the built-in default and optional compatibility path. The robot GIF and reduced-motion image are preserved.
8
+
9
+ Local Linux / Node 22.19.0 validation passed the full offline suite (767 tests: 761 passed, 6 Windows-only skips), type checks, builds and bundle checks. Version 0.5.0 was reproduced failing at `protobufjs` postinstall with `node: not found`; 0.5.1 installs successfully under the same conditions. A new package check installs a real tarball with lifecycle scripts enabled, an explicitly available system shell and no `node` on PATH; a control postinstall must fail under the same conditions. It inspects the complete installed production dependency closure. Another regression copies only the Pi bundle outside the repository and completes local HTTP streaming and a host-tool round trip without installed SDK packages. All three operating systems run the package check in CI. GitHub Release records final results and the artifact checksum.
10
+
11
+ In actual isolated Linux Tabby 1.0.238 / Electron 43.7.0 / built-in Node 24.21.0, the main-process bridge and SDK completed local HTTP streaming and a host-tool round trip without system Node on PATH. Cancellation while awaiting a tool result and owner-window destruction both terminated the utility process. Final IPC is acknowledged before process exit.
12
+
13
+ No paid model request or user task replay is performed. The package-manager checks and local HTTP fixtures do not establish a full Windows/macOS Tabby desktop upgrade or real provider access. Existing 0.5.0 recordings and conversations require no migration.
@@ -0,0 +1,11 @@
1
+ # Unreleased: optional Pi runtime and context compaction
2
+
3
+ - Add an optional Pi SDK 1.4.0 backend using an external Node 22.19+ process and isolated resources. Existing Codex, Claude Code and API connections retain their authentication paths.
4
+ - Route host tools through a serial, journaled pipe bridge with approvals, read-only policies, cancellation, workflow verification, duplicate-result reuse and unknown-action recovery.
5
+ - Show structured retry/compaction states and wait for Pi settlement. Account model and summary usage against goal budgets; disable nested provider retries and cache warming.
6
+ - Add `/compact` and opt-in automatic compaction. Built-in API projections preserve raw history and entire tool batches; Pi keeps its native append-only session history.
7
+ - Add runtime/Node/compaction settings, translations, a development interface illustration and bilingual setup documentation.
8
+
9
+ Review fixes preserve unimported steering and recovery notices across manual compaction, report output-limit truncation as incomplete while keeping partial text/usage, and explicitly configure Kimi Coding compatibility for system messages and max_tokens across preset and proxy endpoints.
10
+
11
+ Validation uses local HTTP fixtures and existing regression/build checks; no real model requests are part of routine checks. An isolated Linux Tabby 1.0.238 / Electron 43.7.0 fixture additionally verified sidebar loading, runtime settings and the real host list_tabs bridge with a local simulated provider. Windows/macOS desktop, SSH/PTY mutations and real provider access remain unverified. See [Pi setup and validation boundaries](../pi.md). This note does not indicate an npm or GitHub release.
@@ -1,3 +1,3 @@
1
1
  # Unreleased
2
2
 
3
- Changes through the custom OpenAI-compatible provider implementation are included in [v0.4.1](0.4.1.md). Future provider/setup redesign remains a plan in [the provider roadmap](../provider-roadmap.md).
3
+ The plugin installation compatibility fix is included in [v0.5.1](0.5.1.md). No additional unreleased changes are recorded.
@@ -5,12 +5,22 @@
5
5
  ## 录制与使用
6
6
 
7
7
  1. 输入 `/remember 构建前端项目并核对产物`,明确开始一个新任务。
8
- 2. 成功完成后,在提示中输入 `task1` 并点击 **保存别名**;也可以暂不设置,在设置页补充。
8
+ 2. 成功完成后,在提示中输入 `task1` 并点击 **保存别名**;也可以直接告诉助手“设置别名为 pm1”,或暂不设置,在设置页补充。
9
9
  3. 下次直接发送 `/task1`,Codex 或 API 后端执行对应流程。已有流程可在 **设置 → AI Tools → 任务流程与偏好** 编辑别名、任务描述和步骤,或停用、删除。
10
10
  4. `/workflows` 查看当前工作目录的流程,**填入任务** 填入别名,发送后执行。无别名的旧流程会填入 `/remember 任务描述`,供重新录制。
11
11
 
12
12
  别名按工作目录隔离,不区分大小写,可输入开头的 `/`。以英文字母开头,支持字母、数字、下划线和短横线,最多 48 字符;同目录不能重复,不能覆盖 `/model`、`/remember` 等内置命令。不支持在别名后追加参数;需更改步骤或目标时先在设置页编辑。手动编辑的流程不会被后续录制覆盖。
13
13
 
14
+ ## 查询归档状态与保存别名
15
+
16
+ 助手可调用 `tabby_tabs.workflow_status()`,区分 `recording`(录制中)、`executing_alias`(执行已有流程)、`archiving`(写盘中)、`archived`(已归档)、`archive_failed`(写盘失败)、`unavailable`(录制无法归档)、`idle`(无录制记录)和 `disabled`(功能停用)。返回最近显式录制的目标、工作目录、已验收/待验收步骤、归档资格及原因;已归档时还返回流程 ID、别名和启用状态,不返回原始终端输出。
17
+
18
+ 用户要求“设置别名为 pm1”时,助手先核对状态中的目标确实是用户所指流程,再调用 `workflow_set_alias(alias="pm1",workflowId=返回的流程ID)`。成功响应必须包含 `saved=true` 和回读的 `workflow.alias="pm1"`。同目录重名、内置命令名、错误流程 ID、其他会话/目录或未完成录制会被拒绝;只读模式不能修改别名。不会修改另一条旧流程来冒充完成。
19
+
20
+ checkpoint 成功只证明目标绑定或步骤验收成功,不保证录制可归档。包含 stdin、敏感命令、超过 1200 字符的命令、超过 24 步或单步超过 12 条验证命令等情况会标记录制不完整,checkpoint、状态查询与完成提示会给出原因。普通任务不能事后补存,也不要为补存重跑已完成操作;后续新任务可用 `/remember` 开始录制。
21
+
22
+ 临时写盘失败会保留完整的已验收录制,`workflow_set_alias` 可直接重试归档并保存别名(尚无 ID 时省略 `workflowId`),不会重新执行终端命令。新目标发送前等待尚在完成的归档,避免丢失上一任务记录。最近录制状态和失败重试缓冲只在当前进程/会话中保留;新录制、执行另一个别名、停用功能或重启会清除它们。已落盘流程在重启后仍可通过设置页管理。
23
+
14
24
  ## 服务器身份、路径与步骤验收
15
25
 
16
26
  采用“结构化流程 + 内置 skill + 每次调用的隐藏提示 + 工具门禁”。具体服务器和路径保存在本地流程文件,不写进通用 skill;skill 说明如何核实身份、执行和验收,隐藏提示只携带当前调用的流程、顺序和约束。
@@ -54,3 +64,11 @@
54
64
  只保存脱敏后的任务、步骤、目标终端标题、服务器身份与操作路径、步骤依赖、脱敏验收摘要、简短结论和次数;不保存终端原始输出、临时 tab ID、密码或交互式 stdin。存在交互输入、敏感命令、过长或未核对的步骤时不归档;恢复任务的尾段不会拼成完整流程。录制和别名解析本身不调用模型;执行任务使用所选后端。
55
65
 
56
66
  调用流程后仍需重新读取当前终端、核对主机、目录、分支与参数,不能直接重放历史工具调用。流程成功记录不等于每条命令的退出码均已验证。自动化测试使用模拟后端、临时目录和假 sudo,不请求模型、不使用真实 sudo 凭据。
67
+
68
+ ## 限流、中断与恢复
69
+
70
+ 执行中不再自动转发终端回显,模型需用 `read_tab` 主动读取结果。用户发送/继续时的有界终端摘要不能替代同终端的新观察及 `workflow_checkpoint` 验收。
71
+
72
+ 后台返回 429 且 `willRetry=true` 时,面板保持等待,显示后台明确提供的下次重试时间;未提供时如实说明,不把账号额度重置时间当作重试时间。回显继续合并在本地有界缓冲区,不追加模型消息。可点击停止取消回合;这不代表终端命令已停止,模型没有继续也不代表命令仍在执行。
73
+
74
+ 继续当前目标时保留已确认步骤和 `pendingStep`。先重新读取待验收步骤的实际终端,核对服务器、目录、产物及当前 Git 状态;如果命令已经完成,按原验收条件提交 `confirm_step`,再进行后续依赖。不因模型限流或缺少 checkpoint 而重复运行 stash、restore、apply 或整段历史。插件重启或切换会话后,内存中的录制进度可能不存在;应依实际状态重新核对,不自动重建或重放。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabby-ai-tools",
3
- "version": "0.4.1",
3
+ "version": "0.5.1",
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",
@@ -33,13 +33,16 @@
33
33
  "skill:check": "node scripts/bundle-tabby-skill.mjs --check",
34
34
  "skill:update": "node scripts/update-tabby-knowledge.mjs",
35
35
  "prebuild": "npm run skill:bundle",
36
- "build": "webpack --mode production",
37
- "typecheck": "tsc --noEmit",
36
+ "build": "webpack --mode production && npm run pi:build",
37
+ "typecheck": "tsc --noEmit && node node_modules/typescript-pi/bin/tsc -p runtime/pi/tsconfig.json --noEmit",
38
38
  "test": "node scripts/run-tests.cjs",
39
39
  "smoke:codex": "node scripts/smoke-codex.cjs",
40
40
  "smoke:context": "node scripts/smoke-context.cjs",
41
41
  "prepack": "npm run build",
42
- "install:tabby": "node scripts/install-local.mjs"
42
+ "install:tabby": "node scripts/install-local.mjs",
43
+ "pi:build": "node scripts/build-pi.mjs",
44
+ "test:package": "node scripts/check-package-install.mjs",
45
+ "pretest": "npm run pi:build"
43
46
  },
44
47
  "files": [
45
48
  "dist",
@@ -53,9 +56,12 @@
53
56
  "@angular/common": "^15.2.10",
54
57
  "@angular/core": "^15.2.10",
55
58
  "@angular/forms": "^15.2.10",
59
+ "@earendil-works/pi-ai": "1.4.0",
60
+ "@earendil-works/pi-coding-agent": "1.4.0",
56
61
  "@types/cross-spawn": "^6.0.6",
57
62
  "@types/node": "^18.19.0",
58
63
  "apply-loader": "^2.0.0",
64
+ "esbuild": "0.28.2",
59
65
  "pug": "^2.0.4",
60
66
  "pug-loader": "^2.4.0",
61
67
  "rxjs": "^7.8.2",
@@ -64,6 +70,7 @@
64
70
  "tabby-terminal": "^1.0.231-nightly.0",
65
71
  "ts-loader": "^9.5.4",
66
72
  "typescript": "^4.9.5",
73
+ "typescript-pi": "npm:typescript@5.9.3",
67
74
  "webpack": "^5.102.1",
68
75
  "webpack-cli": "^5.1.4"
69
76
  },
@@ -17,7 +17,7 @@ This is the single model-facing skill for the plugin. Its operation reference re
17
17
  | Coordinate several servers or steps | Use terminal/profile tools to observe each target and advance according to dependencies, conditions, retry limits and verification criteria. See the orchestration route in the operation reference. |
18
18
  | Perform an operation requiring sudo | Let the user authenticate in the same target terminal with `sudo -v` or `sudo ls`, then continue within the server's sudo cache policy and existing authorization. Do not request a password in chat or assume the cache survives until a scheduled run. |
19
19
  | Schedule a workflow or inspect its records | `tabby_tasks`: create, list, pause/resume, inspect runs, select/test a task model, and finish a scheduled run. `/schedules` and Settings expose additional lifecycle controls. |
20
- | Record or execute a reusable workflow | `/remember TASK` starts explicit recording. On completion the user can assign an alias; `/task1` executes that workflow. `/workflows` and Settings manage saved workflows and aliases. Ordinary tasks are not recorded. |
20
+ | Record or execute a reusable workflow | `/remember TASK` starts explicit recording. Use `workflow_status` to inspect recording/archive state. On completion, `workflow_set_alias` saves an alias on request; `/task1` executes that workflow. `/workflows` and Settings manage saved workflows and aliases. Ordinary tasks are not recorded. |
21
21
  | Configure models, sessions, permissions, output forwarding or the UI | Use the panel/Settings routes in the operation reference. The sidebar opens at startup by default unless explicitly disabled. Native Codex and Claude Code use their official local CLI logins; API connections use configured credentials; custom OpenAI-compatible connections also support explicitly selecting no authentication. Custom connections select Chat Completions (default) or Responses explicitly, require a Base URL and model ID, and need streaming/function tools for terminal tasks. Kimi API, Kimi Coding Plan and Alibaba Cloud Coding Plan have separate China/international endpoint presets and keys; guide users to the matching platform. Membership plans are for personal interactive coding, so use an appropriate ordinary API for unattended schedules. In Claude Code mode use the exposed mcp__tabby__ tools; native shell/file tools are disabled. Do not collect credentials or change AI permissions to bypass a blocked action. |
22
22
 
23
23
  ## Discovery and execution
@@ -44,8 +44,18 @@ Remote process enumeration may be unavailable even when an adapter returns an em
44
44
 
45
45
  ## Recorded workflow protocol
46
46
 
47
+ Checkpoint success is step verification, not proof of archival. For “set alias to pm1”, query `workflow_status`, check the objective of the most recent explicit recording in this session/workspace, then call `workflow_set_alias(alias="pm1",workflowId=returnedId)` and verify `saved=true` plus the returned alias. If archival failed, the save tool can retry from retained verified steps without terminal replay. Ordinary tasks cannot be recorded retroactively; explain the limitation and `/remember` for future tasks, without repeatedly polling Settings or rerunning completed operations. Recording/retry buffers do not survive plugin restart; existing saved workflows remain manageable in Settings.
48
+
47
49
  Specific IPs, server IDs, directories, ordered dependencies and checks live in the local workflow document and are supplied with an alias invocation; do not bake user infrastructure into this general skill. For an active recording or alias run, use `tabby_tabs.workflow_checkpoint` to bind observed targets and confirm steps. `read_tab.server` exposes credential-free profile/server identity, configured host/IP and cwd; unknown fields stay empty. A profile ID is stable connection identity, not proof of the actual machine after nested SSH or container entry. Never persist temporary tab IDs as server IDs.
48
50
 
49
51
  Execute one logical step at a time. Preserve `orderedSteps` and `dependsOn` across servers. Read fresh output from the actual step terminal, verify its completion criteria and submit `workflow_checkpoint(action=confirm_step,step,tabId,criteria,evidence)` before the next operation. Use saved criteria verbatim when executing an alias; never substitute a weaker check. `send_input(verificationFor=N)` runs same-terminal checks for pending step N without advancing the sequence; read their results too. `verificationFor=0` is for identity/path discovery between steps only, followed by `workflow_checkpoint(action=bind_target,tabId,target,evidence)`. Do not smuggle downstream operations into checks, stdin, scripts or parallel calls. Perform all recorded workflow shell operations through `tabby_tabs.send_input`, not native local command execution. If evidence, identity or path is uncertain, stop dependent operations. Confirmation is evidence-based model verification; ask the user only for actual decisions, secrets entered outside chat, or additional authorization.
50
52
 
51
- For an active API or Claude Code goal, keep working and verifying without asking whether to continue. A progress report does not finish the goal. Use `agent_goal_update` with evidence: complete after verification, blocked when a real missing prerequisite prevents progress, or paused only at the user's explicit request. Respect stop requests, token budgets, configured tool limits and operation approvals.
53
+ For an active API, Pi or Claude Code goal, keep working and verifying without asking whether to continue. A progress report does not finish the goal. Use `agent_goal_update` with evidence: complete after verification, blocked when a real missing prerequisite prevents progress, or paused only at the user's explicit request. Respect stop requests, token budgets, configured tool limits and operation approvals.
54
+
55
+ Terminal output is not automatically forwarded into an active turn. Use `read_tab` to observe results. After rate limits, interruption or continuation, inspect the pending step's actual terminal, artifacts, directory and Git state before confirming it; do not replay already-sent stash, restore, apply or other commands merely because a checkpoint is missing. Backend retry waiting does not imply the terminal command is still running.
56
+
57
+ ### Optional Pi runtime and compaction
58
+
59
+ API connections may select an isolated Pi SDK runtime. Since plugin 0.5.1, its SDK is bundled: installing the plugin does not require a system node command or installing Pi packages. Pi defaults to Tabby’s built-in Node through an isolated Electron utility process; leave the compatibility Node path blank. Prefer updating an incompatible Tabby host. An external Node >=22.19 path is only an explicit compatibility option; do not present a separate Node installation as a normal prerequisite. Only registered Tabby tools are available; built-in local shell/file tools and resource discovery are disabled. Host approval, read-only, terminal ownership, sudo and workflow checkpoints always apply. Complete a goal only after actual verification, regardless of a successful tool send or a native agent_end event. Pi may retry or summarize before agent_settled.
60
+
61
+ The user can run /compact on an idle API/Pi session. Summaries cost tokens and retain raw history; automatic compaction is opt-in. Preserve current user constraints, active skills, observed outcomes and pending workflow checkpoints. Neither a summary nor previous tool success substitutes for current terminal evidence. After interruption or an unknown action result, read the actual terminal before continuing; never replay a modifying operation merely to recover a lost response. Goal token budgets and host tool limits still apply during retries and summaries.
@@ -24,11 +24,15 @@ When supervising another interactive Agent, use its live prompt, cursor and high
24
24
 
25
25
  Only `/remember TASK` starts recording a new task. Successful verified completion prompts the user to assign an alias such as `task1`; `/task1` explicitly executes that workflow in its saved workspace. Ordinary requests never record or match similar workflows. `/workflows` fills an alias draft. Settings manages aliases, steps, enablement, deletion and explicit global/workspace preferences. `/remember` no longer saves preferences; there is no per-request skip checkbox. Aliases cannot duplicate built-in commands or another alias in the same workspace.
26
26
 
27
+ For an alias request such as “save as pm1”, call `workflow_status` first: it reports recording vs alias execution, confirmed/pending steps, archive eligibility/rejection, write failure, and the most recent explicitly recorded objective and saved workflow ID in this session/workspace. Verify that objective matches the user's intended workflow. Then call `workflow_set_alias(alias="pm1",workflowId=returnedId)` (omit the ID only when retrying a failed archive without one); report success only after `saved=true` and `workflow.alias="pm1"` are returned. This tool cannot manufacture procedures from chat or save an ordinary task retroactively. A completed verified recording whose write failed can be retried from the in-memory buffer without shell replay. Disabled, unrecorded or ineligible states require a clear explanation and the supported `/remember` path for future work, not repeated Settings polling or re-executing the completed task. Checkpoint binding/confirmation success alone never proves archival. Read-only mode forbids alias writes. The status/retry buffer is session/process-local; after restart manage already saved workflows in Settings.
28
+
27
29
 
28
30
  Workflow execution has a host-side checkpoint gate in addition to skill rules and an invocation-specific hidden hint. Each recorded step retains `server` (`type`, `profileId`, `serverId`, `host`, `ip`, `port`, `username`, absolute `cwd`), sequential `dependsOn`, completion criteria/evidence/time and separate verification commands. Re-list temporary tabs and bind actual current targets; never reuse old tab IDs, assume a tab title identifies a host, or substitute the local workspace directory for a remote operation path. A configured hostname is not a confirmed IP, and nested SSH/container targets must be verified live.
29
31
 
30
32
  Use `workflow_checkpoint(action=bind_target,tabId,target,evidence)` after reading live identity/path observations. Identity discovery uses `send_input(verificationFor=0)` only between confirmed steps. Normal commands create ordered steps. After each, read the same terminal; additional checks use `send_input(verificationFor=currentStep)` and require another read. `workflow_checkpoint(action=confirm_step,step,tabId,criteria,evidence)` must succeed before the next operation, including on another server. Reuse saved criteria verbatim on alias runs. The gate blocks parallel in-flight sends, unrelated/stale reads, known-running commands, wrong target/path and unconfirmed predecessors. Never bypass it with native command execution, multi-server scripts, stdin or mislabeled verification commands. Unchecked/incomplete steps keep the panel goal unfinished and prevent new recordings from being archived. Business evidence is evaluated by the model, not an independent shell audit. Legacy workflows need live identity/check completion; re-record to persist the new structure. Re-record structural edits; free-text edits do not rewrite saved server/path/step constraints.
31
33
 
34
+ Terminal output is not automatically forwarded into an active turn. Use `read_tab` to observe results. After rate limits, interruption or continuation, inspect the pending step's actual terminal, artifacts, directory and Git state before confirming it; do not replay already-sent stash, restore, apply or other commands merely because a checkpoint is missing. Backend retry waiting does not imply the terminal command is still running.
35
+
32
36
  When the saved procedure contains sudo, identify each actual terminal/host and ask the user to run `sudo -v` or `sudo ls` there before execution, then wait for confirmation. Do not request or type passwords. Another TTY may not share authentication. The terminal executor gates commands with `sudo -n -v` and refreshes a same-terminal lease every 30 seconds. Failed authentication blocks the command. Cleanup is requested on turn end/stop/switch; if an occupied remote terminal has no shell integration, immediate cleanup may be unavailable (shell exit, auth failure or the 12-hour ceiling stops the refresher). POSIX shell and compatible sudo policy are required; no sudoers changes. Dynamic sudo hidden in scripts may require explicit procedure annotations.
33
37
 
34
38
  ## Scheduled AI workflows
@@ -83,3 +87,9 @@ The built-in `claude-code` connection runs the user's official, unmodified Claud
83
87
  Claude Code receives Tabby operations as `mcp__tabby__TOOL` through a temporary authenticated loopback MCP bridge, including scheduled tools and `agent_goal_update`. Built-in local shell/file tools are disabled. Terminal operations still require the existing read-only, approval, ownership and workflow checkpoint checks; no OS sandbox is provided. Administrator-managed CLI policies remain in effect. Use a flat tool name only when that is what the active provider exposes.
84
88
 
85
89
  Native successful sessions resume from an opaque CLI session ID. Provider/model switches import portable history without replaying tools. Failures and interruption require checking the actual terminal state before further work; there is no automatic inference retry. Messages submitted while the CLI is working wait until that invocation ends. Token counts are observed usage, not remaining subscription quota. The installed package's `docs/claude-code.md` documents discovery, limits and verification status.
90
+
91
+ ### Optional Pi runtime and compaction
92
+
93
+ API connections may select an isolated Pi SDK runtime. Since plugin 0.5.1, its SDK is bundled: installing the plugin does not require a system node command or installing Pi packages. Pi defaults to Tabby’s built-in Node through an isolated Electron utility process; leave the compatibility Node path blank. Prefer updating an incompatible Tabby host. An external Node >=22.19 path is only an explicit compatibility option; do not present a separate Node installation as a normal prerequisite. Only registered Tabby tools are available; built-in local shell/file tools and resource discovery are disabled. Host approval, read-only, terminal ownership, sudo and workflow checkpoints always apply. Complete a goal only after actual verification, regardless of a successful tool send or a native agent_end event. Pi may retry or summarize before agent_settled.
94
+
95
+ The user can run /compact on an idle API/Pi session. Summaries cost tokens and retain raw history; automatic compaction is opt-in. Preserve current user constraints, active skills, observed outcomes and pending workflow checkpoints. Neither a summary nor previous tool success substitutes for current terminal evidence. After interruption or an unknown action result, read the actual terminal before continuing; never replay a modifying operation merely to recover a lost response. Goal token budgets and host tool limits still apply during retries and summaries.