opencode-tbot 0.1.27 → 0.1.30

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 CHANGED
@@ -111,6 +111,7 @@ Legacy `openrouter` voice-transcription settings are ignored at runtime. When th
111
111
  - If `telegram.allowedChatIds` is left empty, the bot accepts messages from any chat. Restrict it in production.
112
112
  - Permission approvals and session notifications are handled through plugin hooks.
113
113
  - `/language` currently supports English, Simplified Chinese, and Japanese.
114
+ - Logs are emitted through `client.app.log({ body: ... })` when the OpenCode host exposes the root SDK client contract.
114
115
 
115
116
  ## Quick Start
116
117
 
@@ -161,6 +162,8 @@ pnpm test
161
162
 
162
163
  For local source-based loading in this repository, OpenCode can use [.opencode/plugins/opencode-tbot.ts](./.opencode/plugins/opencode-tbot.ts), which re-exports `src/plugin.ts`.
163
164
 
165
+ OpenCode may load both the local `.opencode/plugins/` bridge and an installed npm plugin such as `opencode-tbot@latest` in the same process. This repository now guards against duplicate Telegram runners, but local development is still clearer if you keep only one loading path enabled at a time.
166
+
164
167
  ## FAQ
165
168
 
166
169
  ### Do I need a running OpenCode instance?
package/README.zh-CN.md CHANGED
@@ -100,7 +100,7 @@ npm exec --package opencode-tbot@latest opencode-tbot -- update
100
100
  | `prompt.waitTimeoutMs` | 否 | `1800000` | 单次异步 prompt 生命周期的最大等待时间;超过后插件会停止等待 OpenCode 恢复结果。 |
101
101
  | `prompt.pollRequestTimeoutMs` | 否 | `15000` | 每次向 OpenCode 拉取恢复状态时的单次请求超时。 |
102
102
  | `prompt.recoveryInactivityTimeoutMs` | 否 | `120000` | 仅在 prompt 长时间没有任何新进展时生效的恢复超时。 |
103
- | `logLevel` | 否 | `info` | 插件日志级别。日志统一通过 `client.app.log()` 上报。 |
103
+ | `logLevel` | 否 | `info` | 插件日志级别。日志统一通过 `client.app.log({ body: ... })` 上报。 |
104
104
 
105
105
  ### 说明
106
106
 
@@ -159,6 +159,8 @@ pnpm test
159
159
 
160
160
  在本仓库中做源码调试时,OpenCode 可以通过 [.opencode/plugins/opencode-tbot.ts](./.opencode/plugins/opencode-tbot.ts) 直接加载 `src/plugin.ts`。
161
161
 
162
+ OpenCode 可能会在同一进程里同时加载本地 `.opencode/plugins/` bridge 和已安装的 `opencode-tbot@latest` npm 插件。当前实现已经避免重复启动 Telegram runner,但本地调试时仍建议只保留一种加载路径。
163
+
162
164
  ## 常见问题
163
165
 
164
166
  ### 我需要一个正在运行的 OpenCode 实例吗?