tabby-ai-tools 0.9.1 → 0.9.3
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 +8 -2
- package/README.zh-CN.md +8 -2
- package/VALIDATION.md +59 -0
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +2 -0
- package/dist/pi/sidecar.mjs +386 -386
- package/docs/assets/overview.png +0 -0
- package/docs/assets/overview.svg +53 -40
- package/docs/claude-code.md +11 -0
- package/docs/codex-installation-recovery.md +40 -0
- package/docs/development.md +19 -0
- package/docs/guide.md +22 -3
- package/docs/markdown-third-party-notices.md +221 -0
- package/docs/releases/0.9.2.md +15 -0
- package/docs/releases/unreleased.md +15 -1
- package/docs/scheduled-tasks.md +1 -1
- package/docs/task-workflows.md +21 -1
- package/package.json +3 -1
- package/skills/tabby/SKILL.md +4 -1
- package/skills/tabby/references/operations.md +11 -2
package/docs/scheduled-tasks.md
CHANGED
|
@@ -61,7 +61,7 @@ AI 需通过 `scheduled_task_finish` 提交有验证依据的完成结论或需
|
|
|
61
61
|
|
|
62
62
|
用户只需要给出任务目标。每次触发后,外层 AI 先读取被控 Agent 的最新输出、当前问题和选择状态,结合目标决定这一步该按什么键、回答什么或继续等待;每次操作后再读一次并重新判断。Agent 改变提示时,后续操作随之改变;流程中不预设按键或回答顺序。`read_tab` 除文字外,还返回光标、当前缓冲区和高亮片段,避免选项状态在纯文本里丢失。`send_keys(tabId,key="Left",shift=true)` 表示 Shift+左方向;另支持方向键、回车、Tab、Shift+Tab、Escape、Ctrl+字母等明确支持的组合。文本回答使用 `send_input(mode=stdin,text=...,submit=true)`。
|
|
63
63
|
|
|
64
|
-
已经运行的 Agent 可通过 `attach_process(tabId,expectedProcess="codex",purpose=...)` 获取输入控制,不发送 Ctrl+C,也不重启进程。进程名称必须与当前检测结果匹配;每次向接管的 Agent 输入前再次检查进程、会话和所有权。Agent 退出后不继续向 Shell
|
|
64
|
+
已经运行的 Agent 可通过 `attach_process(tabId,expectedProcess="codex",purpose=...)` 获取输入控制,不发送 Ctrl+C,也不重启进程。进程名称必须与当前检测结果匹配;每次向接管的 Agent 输入前再次检查进程、会话和所有权。Agent 退出后不继续向 Shell 发送回答。原生 Linux SSH 可通过独立 exec 查询同一账户的前台原生进程,使用 PID、启动时间、前台组及随机 PTY 输出标记确认目标窗口;每次输入前重新验证。探针不向 Agent 输入、不发送 Ctrl+C、不重启它。缺少独立 exec、`/proc`、PTY 写权限,或嵌套 SSH/tmux 等无法建立直接对应时保留 Agent 并说明限制,不凭进程名或屏幕文字放行。按键遵循 [xterm 键盘协议](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html),终端模式使用 [xterm.js 公开接口](https://xtermjs.org/docs/api/terminal/classes/terminal/)。不同 Agent 的具体快捷键仍以实际界面反馈为准。
|
|
65
65
|
|
|
66
66
|
终端里被控制 Agent 的常规提问可以按用户任务自动回答;这是终端操作的一部分。外层 AI 后端通过 `requestUserInput` 请求决策时,插件会用本次实际模型开启独立的只读决策会话,结合任务目标、最近记录与选项选择最优答案;信息不足时先查询终端、配置、连接或文档。不机械选择第一个选项。答案与依据写入执行记录后回传原会话,继续本次执行,不弹提问。每次决策最多 3 回合、20 次只读查询、60 秒,每次运行最多自动回答 8 次;用量计入本次预算。需要秘密信息、额外授权、查询后仍无法判断或达到限制时停止留档。决策会话不能操作终端或修改配置,定时执行也不扩大原沙箱范围。执行记录包含每次按键的名称、修饰键、回答文本、读屏结果和最终结论。
|
|
67
67
|
|
package/docs/task-workflows.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
用户要求“设置别名为 pm1”时,助手先核对状态中的目标确实是用户所指流程,再调用 `workflow_set_alias(alias="pm1",workflowId=返回的流程ID)`。成功响应必须包含 `saved=true` 和回读的 `workflow.alias="pm1"`。同目录重名、内置命令名、错误流程 ID、其他会话/目录或未完成录制会被拒绝;只读模式不能修改别名。不会修改另一条旧流程来冒充完成。
|
|
19
19
|
|
|
20
|
-
checkpoint 成功只证明目标绑定或步骤验收成功,不保证录制可归档。stdin
|
|
20
|
+
checkpoint 成功只证明目标绑定或步骤验收成功,不保证录制可归档。stdin、按键和进程接管现在保存为步骤内的交互意图与处理策略,不再因为存在交互就拒绝固化。普通命令和独立验证命令均可完整保存最多 10000 字符,与终端单次输入上限一致;多行安装脚本不会因超过 1200 字符而被丢弃。超限输入在发送与写入动作记录前拒绝,避免生成截断的恢复命令。敏感命令、无法原样保存的控制字符、超过 24 步或单步超过 12 条验证命令等情况仍会标记录制不完整,状态查询与完成提示会给出原因。普通任务不能事后补存,也不要为补存重跑已完成操作;后续新任务可用 `/remember` 开始录制。
|
|
21
21
|
|
|
22
22
|
临时写盘失败会保留完整的已验收录制,`workflow_set_alias` 可直接重试归档并保存别名(尚无 ID 时省略 `workflowId`),不会重新执行终端命令。新目标发送前等待尚在完成的归档,避免丢失上一任务记录。最近完成录制的别名重试缓冲仍只在当前进程/会话中保留;执行中的流程另存最小续接记录,恢复时必须重新绑定目标并读取现场。已落盘流程在重启后仍可通过设置页管理。
|
|
23
23
|
|
|
@@ -47,6 +47,26 @@ checkpoint 成功只证明目标绑定或步骤验收成功,不保证录制可
|
|
|
47
47
|
|
|
48
48
|
工具门禁检查调用顺序、身份字段和新观察,业务验收默认由模型判断;配置机器验收时使用显式条件,不是通用的 Shell 退出码审计。验证命令和身份探测的用途也依赖模型遵守协议;不能把依赖步骤隐藏在一个长脚本、stdin 或标记为检查的命令中。旧流程可以读取,但缺少的身份和验收条件需现场补充,建议用 `/remember` 重新录制以持久保存。修改服务器、路径、逻辑步骤或验收条件时应重新录制;仅编辑自由文字不会重写结构化步骤。
|
|
49
49
|
|
|
50
|
+
## 脚本执行与 AI 决策穿插
|
|
51
|
+
|
|
52
|
+
录制时优先把固定操作写成可复用的命令或多行脚本,并实际执行独立验证命令,再用 `workflow_configure(step, policy)` 保存 `verify.command` 与正向 `expect` 条件。执行别名时,`workflow_run` 在本地推进这些命令与验收,明确规则命中时无需辅助推理。脚本仍只表示一个逻辑步骤;跨服务器、依赖验收或必要判断的位置必须拆开。
|
|
53
|
+
|
|
54
|
+
对需要按现场版本、配置差异或输出判断的步骤,设置 `policy.decision`,例如:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"decision": "核对当前配置与目标版本,决定保留配置还是执行迁移;仅处理用户授权的升级",
|
|
59
|
+
"verify": {
|
|
60
|
+
"command": "appctl health",
|
|
61
|
+
"expect": [{ "source": "screen", "op": "contains", "value": "HEALTHY" }]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
这里的 `appctl` 和输出仅为示例;验证命令必须在录制时真实执行。到达该步骤且 `when` 条件成立时,运行器在发送操作前返回 `needs_model`、步骤号、决策意图及当前观察。主模型读取现场,作出判断,用 `send_input` 提交当前逻辑步骤,再调用 `workflow_run` 验收并推进后续固定步骤。决策本身不视为验收;不要重跑前序步骤。`decision` 是执行前主模型判断;步骤内交互仍使用规则/辅助模型,秘密信息或额外授权仍需用户实际处理。
|
|
67
|
+
|
|
68
|
+
`automation=automatic` 表示步骤具备机器验收且没有必需的 AI/人工节点;缺少机器验收或含 `decision` 时返回 `model_assisted`,人工节点返回 `manual_required`。这描述已保存的执行方式,不保证每次运行的环境和输出都符合自动化条件。
|
|
69
|
+
|
|
50
70
|
## 条件与交互流程
|
|
51
71
|
|
|
52
72
|
`/remember` 可以记录 Shell 命令、进程接管、stdin、按键和侧栏结构化提问。模板保存目标意图和回答策略,不保存原始输入历史、密码、临时 tab ID 或完整终端输出。普通任务仍不录制,也不能事后从聊天总结生成可执行流程。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tabby-ai-tools",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
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",
|
|
@@ -66,6 +66,8 @@
|
|
|
66
66
|
"@types/node": "^18.19.0",
|
|
67
67
|
"apply-loader": "^2.0.0",
|
|
68
68
|
"esbuild": "0.28.2",
|
|
69
|
+
"highlight.js": "11.12.0",
|
|
70
|
+
"markdown-it": "15.0.3",
|
|
69
71
|
"pug": "^2.0.4",
|
|
70
72
|
"pug-loader": "^2.4.0",
|
|
71
73
|
"rxjs": "^7.8.2",
|
package/skills/tabby/SKILL.md
CHANGED
|
@@ -7,7 +7,7 @@ description: Use Tabby AI Tools for terminal work, local and remote server coord
|
|
|
7
7
|
|
|
8
8
|
You are operating the user's running Tabby window through the `tabby_tabs` tools. This skill is bundled with Tabby AI Tools and applies to Codex, local Claude Code, and all supported API providers.
|
|
9
9
|
|
|
10
|
-
Conditional recordings can preserve interactive decisions as rules or helper-model nodes. For alias execution use `workflow_run` / `workflow_interact` after live identity binding; configure observed steps with `workflow_configure`. Consult the conditional-workflow protocol in the operation reference before using these tools.
|
|
10
|
+
Conditional recordings can preserve interactive decisions as rules or helper-model nodes. Prefer scripted fixed steps with recorded independent machine checks. Full commands and multiline scripts up to 10,000 characters are retained. Set `policy.decision` on steps needing main-AI judgment before execution; handle `needs_model` at that step and resume without replaying predecessors. For alias execution use `workflow_run` / `workflow_interact` after live identity binding; configure observed steps with `workflow_configure`. Consult the conditional-workflow protocol in the operation reference before using these tools.
|
|
11
11
|
|
|
12
12
|
## Feature entry points
|
|
13
13
|
|
|
@@ -77,3 +77,6 @@ On Windows, leave the Codex CLI executable blank or set it to codex for automati
|
|
|
77
77
|
Attachment transfer actions are not reusable workflow steps. Perform the transfer before /remember or a saved alias, and verify its resulting path as an explicit workflow prerequisite.
|
|
78
78
|
|
|
79
79
|
Use `read_tab(mode=delta)` with its unchanged nextCursor for new stream text, or waitFor=output/completion/either for bounded waiting. Drain hasMore pages before waiting. Delta is not a screen: take a fresh snapshot before interactive input. On cursor_expired, inspect the screen and saved logs; never replay a command to recover output. `list_logs`, `read_log` and `search_log` expose only this session scope. Follow pagination and partial search cursors. Logs can be incomplete, sensitive, expired or unavailable; saving and command success are independent.
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
For existing native agents in Linux SSH panes, `attach_process` can verify the foreground PID and PTY using independent exec and an output-only random proof. Read again after attachment and each input; never restart a waiting agent to bypass an identity failure. Consult the operation reference for unsupported topologies and Codex installation recovery boundaries.
|
|
@@ -41,6 +41,10 @@ When the saved procedure contains sudo, identify each actual terminal/host and a
|
|
|
41
41
|
|
|
42
42
|
stdin, keys, process attachment and structured sidebar questions are recordable. Keep intent and bounded response policies, never raw input history or secrets. Use `workflow_configure(step,policy)` on an actually recorded step: `when` is an AND list of {source:prompt|screen|commandState,op:equals|contains|not_contains,value}; false skips that step. `verify` is {command,expect}, using an already recorded verification command and positive fresh-output evidence. `interactions` contain {id,intent,mode:model|manual,rules:[{when,response}],observed}; answer responses use {kind:answer,text}, key responses {kind:key,key,...modifiers}. Host recording determines observed coverage; never claim unvisited branches were tested. Do not derive universal yes/Enter rules from one response.
|
|
43
43
|
|
|
44
|
+
Prefer scripted fixed operations with independent recorded verification and positive `expect` conditions. Commands and verification scripts are retained intact up to the terminal input cap of 10,000 characters, including multiline content; never truncate an executable command or split it just to evade the recorder. Keep server, dependency-verification and necessary-decision boundaries as separate logical steps.
|
|
45
|
+
|
|
46
|
+
Use `workflow_configure(step,policy)` with `decision="specific required judgment"` to require the main AI before that step's operation. The runner returns `needs_model` with the live observation and intent before sending. Observe the target, decide within authorization, submit this logical step using `send_input`, then resume `workflow_run` for verification and successors. Never restart the workflow or resend predecessors to pass a decision. `when=false` skips the step before requesting judgment. Step-internal questions still use interaction rules/helpers. Missing machine verification also yields model-assisted status; manual/secret nodes still require actual user handling.
|
|
47
|
+
|
|
44
48
|
On aliases, bind the live server/path, then prefer `workflow_run(tabId)`. It interprets fixed conditions/operations and independent checks locally. `workflow_interact(tabId,interactionId?)` handles one pending interaction. Rules run first; otherwise an isolated tool-free helper on the current profile returns a bounded decision. It never changes the main session model or connection, and usage counts toward the same Goal. Configure helper IDs in workflow settings; blank means the current model, not an inferred cheap model. New unsupported interactions return to the main model. Manual/secret nodes require actual human input without storing it.
|
|
45
49
|
|
|
46
50
|
Handle returned waiting/needs_model/awaiting_verification from the pending node; do not replay its command. Rebind on bind_target, and verify the final objective even when runner status is complete. Read again after each answer; a changed/ended process invalidates old decisions. Unknown action results require a fresh read and `workflow_checkpoint(action=resolve_action,tabId,outcome=sent|not_sent,evidence)`, not an automatic retry. Restored runs retain minimal sanitized checkpoints, not live tab IDs or old output. Machine checks require a reliable shell end and fresh independent output; otherwise retain normal model checkpoints. Bounds: 24 steps per call, 32 helper calls per run, at most 2 per node/observation; timeout defaults to 15 seconds. Ordinary tasks are still never recorded retroactively.
|
|
@@ -89,11 +93,11 @@ The terminal/application tool namespace remains `tabby_tabs` for compatibility.
|
|
|
89
93
|
|
|
90
94
|
For controls, always use IDs returned by a fresh `read_tab`. Do not assume a hidden, disabled or modal control is actionable. OS-native dialogs outside the application DOM require the user's interaction. A failure or unavailable provider should lead to fresh discovery or a clear explanation, not repeated identical calls.
|
|
91
95
|
|
|
92
|
-
Terminal takeover does not ask for user confirmation, including SSH/unknown process enumeration. Inspect the screen before sending commands; keep needed foreground tasks, mark unrelated detected tasks with `foregroundTaskNeeded=false` for automatic interruption. Unknown enumeration alone does not trigger Ctrl+C. Existing process attachment still requires verified process identity; ownership, stop and read-only checks remain enforced.
|
|
96
|
+
Terminal takeover does not ask for user confirmation, including SSH/unknown process enumeration. Inspect the screen before sending commands; keep needed foreground tasks, mark unrelated detected tasks with `foregroundTaskNeeded=false` for automatic interruption. Unknown enumeration alone does not trigger Ctrl+C. Existing process attachment still requires verified process identity; ownership, stop and read-only checks remain enforced. Native Linux SSH agents can be verified through independent exec plus PID/start-time/foreground-group and a random output-only PTY proof. This never sends agent input or restarts it. Unsupported exec/procfs, nested terminals and unverifiable identities remain blocked; do not repeatedly retry identical checks or tell the user to restart an idle agent.
|
|
93
97
|
|
|
94
98
|
## Local Claude Code engine
|
|
95
99
|
|
|
96
|
-
The built-in `claude-code` connection runs the user's official, unmodified Claude Code CLI. Users install and log in with `claude auth login` outside chat, and check `claude auth status` for the intended account and billing method. Never read, copy, request or forward subscription tokens. API/cloud authentication may use separate billing. CLI capability and login checks do not perform inference;
|
|
100
|
+
The built-in `claude-code` connection runs the user's official, unmodified Claude Code CLI. Users install and log in with `claude auth login` outside chat, and check `claude auth status` for the intended account and billing method. Never read, copy, request or forward subscription tokens. API/cloud authentication may use separate billing. CLI capability and selected-space login checks do not perform inference and run again before each native invocation using the original configured selector. Launcher/spawn failures or invalid auth-status output indicate CLI/protocol problems, not proven logout. Preflight failure retains the last successful native session; submitted inference is never retried. Model aliases are candidates, not entitlement or quality rankings.
|
|
97
101
|
|
|
98
102
|
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.
|
|
99
103
|
|
|
@@ -126,3 +130,8 @@ Attachment transfer actions are not reusable workflow steps. Perform the transfe
|
|
|
126
130
|
### Incremental reads and saved logs
|
|
127
131
|
|
|
128
132
|
Start with read_tab(mode=delta,tabId) to obtain nextCursor. Pass it unchanged with waitFor=output/completion/either and waitMs up to 30000. hasMore means immediately read the next page. snapshot is required for interaction controls and fresh workflow evidence. Cursors expire on reconnect, restart or buffer eviction. list_logs discovers task-scoped local logs; read_log pages text, search_log performs literal search and returns partial with a continuation when scanning is incomplete. Hit cursors can be read with read_log; followCursor starts a new bounded read of later appended text. Log tools never execute commands or establish successful workflow completion.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
### Codex installation faults
|
|
136
|
+
|
|
137
|
+
Distinguish CLI discovery/startup, selected-space authentication, model access and tool-helper startup. Version/login success does not prove helper availability. Native Windows code-mode tool connections validate known companion layouts; older/unknown versions and npm/batch wrappers are not rejected by this native layout rule. Clear auxiliary-process spawn errors can trigger one rescan at a known idle boundary, retaining the configured CLI selector, space, cwd, model and permission constraints. Recovery rebuilds only the connection: it does not replay tools/terminal commands, resume inference or activate a goal. On the next explicit message, resume the original history and inspect real terminal state before modifying anything. An observation timeout means execution may already have occurred. If recovery stops, report the actual missing program/install and attempted scan; use a complete same-distribution installation. Do not suggest re-login, PATH/permission changes or copying helpers between versions as the default fix.
|