tabby-ai-tools 0.9.2 → 0.9.4

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.
@@ -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、按键和进程接管现在保存为步骤内的交互意图与处理策略,不再因为存在交互就拒绝固化。敏感命令、超过 1200 字符的命令、超过 24 步或单步超过 12 条验证命令等情况仍会标记录制不完整,状态查询与完成提示会给出原因。普通任务不能事后补存,也不要为补存重跑已完成操作;后续新任务可用 `/remember` 开始录制。
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.2",
3
+ "version": "0.9.4",
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",
@@ -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
 
@@ -80,3 +80,7 @@ Use `read_tab(mode=delta)` with its unchanged nextCursor for new stream text, or
80
80
 
81
81
 
82
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.
83
+
84
+ Codex CLI settings default to automatic discovery (blank or `codex`). Unavailable saved selectors recover by clearing the setting and searching again; this does not replay tasks. Treat CLI discovery failures separately from authentication and model errors.
85
+
86
+ Question navigation distinguishes ordinary interruption from user Stop and unfinished tasks. Keep goal state accurate: use blocked only for a specific external prerequisite; execution limits leave the task unfinished.
@@ -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.
@@ -131,3 +135,7 @@ Start with read_tab(mode=delta,tabId) to obtain nextCursor. Pass it unchanged wi
131
135
  ### Codex installation faults
132
136
 
133
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.
138
+
139
+ Unreleased Codex CLI recovery: an unavailable saved path or command is cleared and saved before automatic discovery; valid explicit entries keep priority. Blank and `codex` are equivalent. Authentication, helper/protocol and model errors do not clear the selector; recovery never replays submitted tasks or tools.
140
+
141
+ Unreleased question navigation uses 1px markers: completed tasks are green, ordinary interruptions pale green, running or external prerequisites blue, and confirmed user Stop, unfinished goals or execution limits red. Report external blockers with specific evidence using the goal protocol; an execution limit is not task completion. The navigation never invokes a model or replays tools.