tabby-ai-tools 0.4.1 → 0.5.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 +6 -2
- package/README.zh-CN.md +6 -2
- package/VALIDATION.md +34 -0
- package/dist/index.js +1 -1
- package/dist/pi/provider.mjs +47 -0
- package/dist/pi/sidecar.mjs +215 -0
- package/docs/assets/overview.png +0 -0
- package/docs/assets/overview.svg +29 -29
- package/docs/development.md +21 -3
- package/docs/guide.md +15 -6
- package/docs/pi.md +41 -0
- package/docs/releases/0.5.0.md +19 -0
- package/docs/releases/pi-runtime.md +11 -0
- package/docs/releases/unreleased.md +1 -1
- package/docs/task-workflows.md +19 -1
- package/package.json +9 -4
- package/skills/tabby/SKILL.md +12 -2
- package/skills/tabby/references/operations.md +10 -0
- package/docs/provider-roadmap.md +0 -162
|
@@ -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,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
|
|
3
|
+
Changes through workflow aliases, Pi runtime and context compaction are included in [v0.5.0](0.5.0.md). No additional unreleased changes are recorded.
|
package/docs/task-workflows.md
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "0.5.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",
|
|
@@ -33,13 +33,15 @@
|
|
|
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 node_modules/typescript-pi/bin/tsc -p runtime/pi/tsconfig.json",
|
|
44
|
+
"pretest": "npm run pi:build"
|
|
43
45
|
},
|
|
44
46
|
"files": [
|
|
45
47
|
"dist",
|
|
@@ -64,10 +66,13 @@
|
|
|
64
66
|
"tabby-terminal": "^1.0.231-nightly.0",
|
|
65
67
|
"ts-loader": "^9.5.4",
|
|
66
68
|
"typescript": "^4.9.5",
|
|
69
|
+
"typescript-pi": "npm:typescript@5.9.3",
|
|
67
70
|
"webpack": "^5.102.1",
|
|
68
71
|
"webpack-cli": "^5.1.4"
|
|
69
72
|
},
|
|
70
73
|
"dependencies": {
|
|
74
|
+
"@earendil-works/pi-ai": "1.4.0",
|
|
75
|
+
"@earendil-works/pi-coding-agent": "1.4.0",
|
|
71
76
|
"cross-spawn": "^7.0.6"
|
|
72
77
|
}
|
|
73
78
|
}
|
package/skills/tabby/SKILL.md
CHANGED
|
@@ -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
|
|
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. 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. 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.
|
package/docs/provider-roadmap.md
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
# Provider 配置改版与每周接入计划
|
|
2
|
-
|
|
3
|
-
制定日期:2026-10-25。状态:待实施的产品与开发计划。
|
|
4
|
-
|
|
5
|
-
优先级调整(2026-10-25):先实现用户自定义的 OpenAI 兼容入口。v0.4.1 已增加 Chat Completions/Responses 显式选择、手动 Base URL/模型、直接密钥/环境变量/无需密钥、模型发现、工具循环与历史兼容;实际验证结果见 [v0.4.1 发布说明](releases/0.4.1.md)。其余向导改版、Provider 定义集中化和新增厂商仍按下文作为待实施计划,不因本次兼容入口而视为完成。
|
|
6
|
-
|
|
7
|
-
[开发文档](development.md) · [现有 API 配置](guide.md#api-密钥与切换模型) · [Kimi 与百炼套餐配置](coding-plans.md)
|
|
8
|
-
|
|
9
|
-
## 决策与目标
|
|
10
|
-
|
|
11
|
-
调整设置页的信息组织,保留现有“连接列表+连接详情”布局。新增连接改成“选择厂商 → 选择接入方式 → 选择区域 → 配置密钥和模型 → 验证并保存”。让普通用户无需理解接口协议和端点路径,也让使用代理、环境变量和自定义模型的用户可以继续配置。
|
|
12
|
-
|
|
13
|
-
目标节奏为**每周接入一家 Provider**。这里按厂商或服务平台计数,同一家厂商的模型、国内/国际区域、普通 API 和编程套餐不分别凑数。每周明确支持范围,并区分本地协议测试、真实账号验证和正式发布。
|
|
14
|
-
|
|
15
|
-
本文件记录计划,不表示设置页已改版,也不建立自动开发、提醒、定时调用模型或自动发布任务。首周暂定从下一个周一 **2026-10-26** 开始;日期为目标排期,按每周实际验收更新。
|
|
16
|
-
|
|
17
|
-
## 现状与需要解决的问题
|
|
18
|
-
|
|
19
|
-
依据当前 `src/settings.pug`、`src/settings.ts`、`src/agent-types.ts`、`src/api-provider.ts`、`src/api-models.ts` 和 `src/agent-store.ts`:
|
|
20
|
-
|
|
21
|
-
| 现状 | 对用户或后续开发的影响 | 调整方向 |
|
|
22
|
-
| --- | --- | --- |
|
|
23
|
-
| 已有 7 个 API 供应商选项,另有 Codex、Claude Code 本机入口 | 同一列表同时出现厂商和套餐,后续选项会持续增长 | 厂商作为第一层,API/套餐/本机登录作为第二层 |
|
|
24
|
-
| “添加 API 连接”立即创建空白 OpenAI 配置 | 新用户先面对与目标厂商无关的表单,取消后可能留下空连接 | 先在草稿中选择厂商,保存后再创建连接 |
|
|
25
|
-
| Kimi、百炼已有区域选择,其他连接主要靠填写 Base URL | 用户需要自行辨认地区、产品、Key 和接口路径 | 用厂商自己的产品和区域预设,按需开放自定义地址 |
|
|
26
|
-
| 当前设置会逐项自动保存,应用配置还需连接操作 | “已保存”和“当前运行中”容易混淆 | 明确区分草稿、已保存和当前生效的连接 |
|
|
27
|
-
| 模型发现、连接测试和运行能力属于不同检查 | 获取到模型不代表工具调用、账号准入或套餐扣费已经通过 | 分别显示检查结果、范围与时间 |
|
|
28
|
-
| URL、环境变量、展示名称、模型等级和协议分支分布在多个文件 | 每周增加一家容易遗漏配置项,或误用其他厂商的参数 | 建立统一 Provider 定义,共用界面与协议测试契约 |
|
|
29
|
-
|
|
30
|
-
已有 Kimi API、Kimi Coding Plan 和百炼 Coding Plan 属于开发版适配:本地测试、构建和打包已验证,真实账号准入及额度扣减仍待验证。GLM Coding Plan 尚缺专项验证;阿里普通按量 API 尚无独立预设。这些状态需要在路线图中保留,不能统一标成“全面支持”。
|
|
31
|
-
|
|
32
|
-
## 设置页方案
|
|
33
|
-
|
|
34
|
-
### 页面分区
|
|
35
|
-
|
|
36
|
-
| 区域 | 主要内容 | 交互要求 |
|
|
37
|
-
| --- | --- | --- |
|
|
38
|
-
| 顶部 | 默认连接、添加连接 | 添加按钮改为“添加连接”,同时容纳 API 与本机方式;切换默认连接是独立操作 |
|
|
39
|
-
| 左侧 | 已保存连接、搜索、厂商分组 | 显示连接名、厂商、接入方式、区域、模型和默认标记;同一家允许多套配置 |
|
|
40
|
-
| 右侧 | 当前连接详情或添加向导 | 默认只显示完成配置所需字段;协议、输出上限和工具限制折叠 |
|
|
41
|
-
| 通用设置 | 启动行为、语言、权限与预算 | 与具体模型配置分开,避免用户误以为它们只对一家生效 |
|
|
42
|
-
| 独立管理入口 | 任务流程与偏好、定时任务 | 保留现有功能,不再作为模型厂商的同级选项呈现 |
|
|
43
|
-
|
|
44
|
-
第一阶段只调整连接配置的信息层级和导航;不重写任务管理、审批或会话运行器。沿用 Tabby 主题、现有字号和组件,不引入独立字体、营销页面或新的 UI 框架。
|
|
45
|
-
|
|
46
|
-
### 添加连接的流程
|
|
47
|
-
|
|
48
|
-
```mermaid
|
|
49
|
-
flowchart LR
|
|
50
|
-
A[选择厂商] --> B[选择接入方式]
|
|
51
|
-
B --> C[选择区域]
|
|
52
|
-
C --> D[填写密钥与模型]
|
|
53
|
-
D --> E[验证并保存]
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
1. **选择厂商**:可搜索 Google、MiniMax、Kimi 等名称,展示当前版本已经实现的条目。计划中的厂商在路线图中查看,不进入可用列表。
|
|
57
|
-
2. **选择接入方式**:按厂商实际提供的方式展示“普通 API”“编程套餐”或“本机登录”。厂商的 Coding Plan、Token Plan、M Plan 保留官方名称,旁边解释用途与计费来源。没有的方式不提供入口。
|
|
58
|
-
3. **选择区域**:使用各厂商自己的地区名称和端点;只有一个可用地区时无需强制多走一步。国内/国际并非所有厂商的统一二选一模板。自定义地址作为可选项保留,不按 IP 或语言擅自切换区域。
|
|
59
|
-
4. **填写密钥和模型**:默认显示直接输入 Key、模型选择及可读的连接摘要。环境变量、自定义 Base URL、手动模型 ID 均可使用。本机登录显示 CLI 路径与登录状态,不要求 API Key。
|
|
60
|
-
5. **验证并保存**:摘要显示厂商、接入方式、区域、模型和计费来源。可以直接保存为“未验证”,也可以主动执行测试后保存。测试前明确提示会产生模型用量;不把测试当成保存的前置条件。
|
|
61
|
-
|
|
62
|
-
新连接向导中的每一步保留草稿,返回上一步不会丢失密钥或模型。取消添加不创建连接;已有连接在编辑期间显示未保存状态,切换或关闭时可以保存、放弃或返回。不会因为切换编辑对象就修改默认连接。
|
|
63
|
-
|
|
64
|
-
更换厂商通过新建连接处理;同一连接的区域、模型和端点可以编辑。修改区域或产品后清除旧检查状态,提示重新核对 Key,不静默尝试其他区域、厂商或计费方式。
|
|
65
|
-
|
|
66
|
-
### 连接详情与检查结果
|
|
67
|
-
|
|
68
|
-
详情按“基本配置、身份验证、模型、验证结果、高级参数”排列。明确标记“已保存”“有未保存修改”“当前已应用”;任务运行期间不自动重连,待任务结束后由用户应用新配置。
|
|
69
|
-
|
|
70
|
-
| 操作/状态 | 实际证明什么 | 不应作出的推断 |
|
|
71
|
-
| --- | --- | --- |
|
|
72
|
-
| 本地格式检查 | 必填项、端点协议和路径等配置有效 | 不代表 Key 有效或账号有权限 |
|
|
73
|
-
| 获取模型 | 当前接口返回模型列表;不支持列表时允许手动填写 | 不代表该模型能完成工具调用 |
|
|
74
|
-
| 测试连接 | 真实简短请求完成、流式返回有效 | 不代表连续工具调用或套餐扣费已验证 |
|
|
75
|
-
| 测试工具能力 | 隔离的无害工具往返验证通过 | 不代表真实终端/SSH 的端到端验证通过 |
|
|
76
|
-
|
|
77
|
-
结果附带被测试的连接配置、时间和失败原因;密钥、模型、产品、区域或端点变化后使相关结果失效。认证失败、无权限、配额不足、模型不支持、超时分别给出对应处理建议。套餐余额只有存在经过适配的官方查询接口时才展示;模型 token 使用量不能冒充套餐剩余额度。
|
|
78
|
-
|
|
79
|
-
表单必须保留可见标签、帮助文本、键盘操作和错误后的恢复入口。窄窗口转为单列,长厂商名、长模型 ID 和翻译文本可换行;状态同时使用文字,不能只靠颜色。
|
|
80
|
-
|
|
81
|
-
## 可持续扩展的实现结构
|
|
82
|
-
|
|
83
|
-
新增统一 Provider 定义文件,集中维护以下信息:
|
|
84
|
-
|
|
85
|
-
| 定义 | 用途 |
|
|
86
|
-
| --- | --- |
|
|
87
|
-
| 厂商 ID、显示名称、官方帮助链接 | 厂商选择、分组与文档入口 |
|
|
88
|
-
| 接入方式及套餐名称 | 区分普通 API、订阅套餐和本机登录 |
|
|
89
|
-
| 产品下的区域和默认地址 | 匹配正确端点,保留代理和手动覆盖 |
|
|
90
|
-
| 密钥来源与环境变量建议 | 同一产品的表单默认值和说明 |
|
|
91
|
-
| 默认模型示例和能力发现方式 | 模型列表、手动输入及已知能力提示 |
|
|
92
|
-
| 协议适配器及参数转换 | Responses、Chat Completions、Messages 或厂商原生协议 |
|
|
93
|
-
| 模型级限制和验证能力 | Thinking、reasoning、工具调用、usage、历史签名等差异 |
|
|
94
|
-
|
|
95
|
-
厂商、产品、区域和传输协议在概念上独立:百炼托管的 Kimi 模型仍使用百炼参数;不能仅凭模型名、URL 或“OpenAI 兼容”就套用另一家的适配器。界面使用定义生成表单,复杂的流式和工具协议保留明确的适配逻辑。
|
|
96
|
-
|
|
97
|
-
先为现有配置增加读取映射,第一阶段继续兼容 `provider=kimi-coding`、`bailian-coding` 等已有值。既有连接 ID、默认连接、密钥来源、自定义地址与模型不重置。当前历史指纹包含 provider、端点和模型,因此不能只为统一命名就改写这些字段;后续如需持久化结构迁移,必须版本化并验证迁移前后的历史恢复和回退。
|
|
98
|
-
|
|
99
|
-
“通用兼容接口”作为专家入口,明确选择 Chat Completions/Responses/Messages;只声明经过实现和验证的协议能力,不自动承诺未知供应商的完整支持。首周优先完成 Provider 定义和已有协议复用,复杂自定义 Header、动态插件系统及模型市场不列入第一阶段。
|
|
100
|
-
|
|
101
|
-
## 每周接入排期
|
|
102
|
-
|
|
103
|
-
排序根据终端编程场景、现有用户套餐需求、覆盖面和现有适配器复用程度制定,是本项目的实施优先级,不是模型质量排名。
|
|
104
|
-
|
|
105
|
-
| 周次 | 目标日期 | Provider | 本周交付范围与主要关注点 |
|
|
106
|
-
| --- | --- | --- | --- |
|
|
107
|
-
| 第 1 周 | 10-26 ~ 11-01 | **MiniMax** | 普通 API 与当前编程订阅入口;核对国内/国际产品、鉴权和 Thinking。同步落地 Provider 定义、添加连接草稿、产品和区域选择;迁移现有连接展示 |
|
|
108
|
-
| 第 2 周 | 11-02 ~ 11-08 | **字节跳动/火山方舟** | 豆包按量 API 与 Coding Plan;核对产品对应端点、模型标识与工具调用。海外产品独立核对,不把国内 Key 或模型直接套入海外 |
|
|
109
|
-
| 第 3 周 | 11-09 ~ 11-15 | **Google Gemini** | 首批限定 Gemini Developer API;验证模型发现、流式、工具往返和思考签名保存。单独评估兼容层能否完整承载状态;Vertex AI 与账号订阅登录另排范围 |
|
|
110
|
-
| 第 4 周 | 11-16 ~ 11-22 | **腾讯** | 混元相关 API 与 TokenHub Token Plan;核对官方当前平台、套餐与区域端点,以及聚合模型的参数差异 |
|
|
111
|
-
| 第 5 周 | 11-23 ~ 11-29 | **xAI/Grok** | Grok API;按当周官方文档选择协议并验证 Responses、工具历史及错误处理,不把聊天订阅当 API 凭据 |
|
|
112
|
-
| 第 6 周 | 11-30 ~ 12-06 | **Mistral AI** | Mistral API,包含账号可用的编程模型;核对模型列表、流式工具调用和推理能力,不默认承诺其客户端订阅可转为 API 使用 |
|
|
113
|
-
| 第 7 周 | 12-07 ~ 12-13 | **百度千帆** | 按量 API 与当期 Token Plan;分别核对当前产品、专用 Key、端点和模型范围,旧 Coding Plan 只按官方兼容规则处理 |
|
|
114
|
-
|
|
115
|
-
同一家在该周包含多个接入方式,但每个方式分别记录验证结果。官方不提供的区域或套餐无需补齐;实际无法完成的范围要明确顺延,不能因为添加了下拉选项就算完成。
|
|
116
|
-
|
|
117
|
-
现有厂商维护持续进行:优先修复现有回归;补做 Kimi/百炼真实验证、GLM Coding Plan 专项适配,并评估阿里普通 API/Token Plan。上述工作不算新增厂商周的数量。每周开工前复核容量;如果基础改造或严重回归超出容量,应调整排期并记录原因,不能削减工具调用与历史兼容验收。
|
|
118
|
-
|
|
119
|
-
### 每周工作节奏
|
|
120
|
-
|
|
121
|
-
| 时间 | 工作 | 可检查的结果 |
|
|
122
|
-
| --- | --- | --- |
|
|
123
|
-
| 周一 | 官方文档、区域/套餐/Key/协议确认,锁定本周范围 | 更新接入矩阵、风险和所需测试账号;未具备账号也明确记录 |
|
|
124
|
-
| 周二 | Provider 定义、预设和表单,完成最小文本流式链路 | 可配置的开发版连接和基础协议夹具 |
|
|
125
|
-
| 周三 | 思考参数、连续工具调用、usage、取消与恢复 | 有实际 HTTP/SSE 往返的协议测试 |
|
|
126
|
-
| 周四 | 历史兼容、连接切换、错误恢复、翻译与跨平台检查 | 回归结果、中英文文档和同步的 SVG/PNG 效果图 |
|
|
127
|
-
| 周五 | 审查、账号验证与交付记录;满足条件时进入发布流程 | 明确完成范围、未验证项、产物及后续事项 |
|
|
128
|
-
| 周末 | 留作厂商限制或回归问题的缓冲 | 不预先安排第二家,避免打断单家验收 |
|
|
129
|
-
|
|
130
|
-
## 每家 Provider 的完成条件
|
|
131
|
-
|
|
132
|
-
1. 官方来源已核对,明确普通 API/套餐、本机登录、区域、密钥来源、支持模型与使用范围;不伪装客户端身份,不静默改变计费端点。
|
|
133
|
-
2. 新建、编辑、取消、保存、应用、默认连接和自定义地址均可使用。已有用户配置不丢失;只展示该接入方式支持的参数。
|
|
134
|
-
3. 协议夹具覆盖模型列表或手动回退、流式正文、至少两个连续工具轮次、必要的思考/签名回传、usage、取消、超时、401/403/429、历史恢复和跨连接上下文交接。
|
|
135
|
-
4. 完成技能打包一致性、类型检查、全量测试、生产构建和 `git diff --check`;确认 Linux/macOS/Windows CI 结果,真实桌面验证另记平台和证据。
|
|
136
|
-
5. 同步两份 README、使用与开发说明、发布说明、模型可用技能及生成的知识文件;更新并预览 SVG/PNG 效果图,保留机器人 GIF 与静态回退;检查实际 npm 包内容。
|
|
137
|
-
6. 若具备测试账号及相应额度授权,完成最小真实推理和无害工具往返。密钥在设置或环境中输入,不发到聊天;缺少授权或账号时不擅自调用,并标记“本地适配通过,真实账号未验证”。只有实际观察到套餐用量,才标记额度扣减已确认。
|
|
138
|
-
7. 正式发布另按工作区发布约定执行:版本、提交、跨平台 CI、不可移动的 tag、GitHub Release、已验证 npm 包及 Registry 回读均有记录。每周开发计划本身不替代发布授权;没有完成远端回读不能标记“已发布”。
|
|
139
|
-
|
|
140
|
-
每家状态至少区分“计划中 → 开发中 → 本地验证通过 → 真实账号验证通过 → 已发布”。真实账号验证结果和发布状态分别记录;如发布带有已披露的验证限制,保留限制,不因发布而自动升级验证等级。
|
|
141
|
-
|
|
142
|
-
## 首周可执行清单
|
|
143
|
-
|
|
144
|
-
- [ ] 把现有 Provider 的名称、产品、区域、默认模型和密钥提示整理为统一定义,并为旧配置增加读取映射。
|
|
145
|
-
- [ ] 实现厂商选择与添加草稿;取消不留空连接,原有默认连接和历史保持可恢复。
|
|
146
|
-
- [ ] 完成产品/区域配置和通用详情表单,明确保存与应用状态;保留直接 Key、环境变量和代理设置。
|
|
147
|
-
- [ ] 接入 MiniMax 的本周确认范围,并完成流式与连续工具调用测试。
|
|
148
|
-
- [ ] 验证新页面能配置现有 OpenAI、DeepSeek、GLM、Kimi、百炼、Claude,以及 Codex/Claude Code 本机连接。
|
|
149
|
-
- [ ] 更新文档、12 种语言和效果图;补充新增向导、编辑草稿、失效检查状态及旧配置恢复的回归。
|
|
150
|
-
- [ ] 周五记录 MiniMax 的实际验证范围、遗留事项和第 2 周是否按期开工。
|
|
151
|
-
|
|
152
|
-
## 官方资料与复核原则
|
|
153
|
-
|
|
154
|
-
以下资料用于确认排期可行性;模型名称、产品名称、区域和套餐政策在各周开工时重新核对,不将本计划中的名称当成永久接口契约。
|
|
155
|
-
|
|
156
|
-
- MiniMax:[模型调用](https://platform.minimax.io/docs/guides/text-generation)、[M Plan](https://platform.minimax.io/docs/m-plan/intro)。
|
|
157
|
-
- 火山方舟:[Coding Plan 常见问题](https://docs.volcengine.com/docs/ark/coding-plan-personal-faq?lang=zh)。
|
|
158
|
-
- Google:[OpenAI 兼容接口](https://ai.google.dev/gemini-api/docs/openai/)、[思考与签名](https://ai.google.dev/gemini-api/docs/thinking)。Gemini 的思考状态需要独立验证,不能只改 Base URL。
|
|
159
|
-
- 腾讯:[Token Plan 套餐概览](https://cloud.tencent.com/document/product/1823/130060/)、[语言模型调用概览](https://cloud.tencent.com/document/product/1823/130079)。
|
|
160
|
-
- xAI:[API 文档](https://docs.x.ai/overview)、[与 Chat Completions 的比较](https://docs.x.ai/developers/model-capabilities/text/comparison)。
|
|
161
|
-
- Mistral:[官方文档](https://docs.mistral.ai/)。
|
|
162
|
-
- 百度:[Token Plan 产品](https://cloud.baidu.com/product/codingplan)、[旧 Coding Plan 升级公告](https://cloud.baidu.com/news/notice_e839687d-1cf7-4a5b-afbd-ea2f7bcd325d)。
|