deepccc 0.2.17 → 0.2.18

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.
@@ -25,8 +25,14 @@ const SEARCH_TIMEOUT_MS = 15_000;
25
25
  const MAX_COMMAND_OUTPUT_BYTES = 256 * 1024;
26
26
  const DEFAULT_COMMAND_TIMEOUT_MS = 120_000;
27
27
  const MAX_COMMAND_TIMEOUT_MS = 900_000;
28
- /** 让位注入的轮询间隔:run_command 执行期以此频率检查是否有待注入的用户消息 */
29
- const YIELD_POLL_INTERVAL_MS = 250;
28
+ /**
29
+ * 让位注入的轮询间隔:run_command 执行期以此频率检查是否有待注入的用户消息。
30
+ * 取 1s 而非更小值:轮询本身不花 token(只读内存队列,无模型调用),但更密的
31
+ * 定时器唤醒有可测的 CPU 开销(实测 250ms 档约 0.27ms/s,1s 档低于计时精度)。
32
+ * 让位延迟从 250ms 放宽到 1s 对用户无感,却把长任务期间的定时器唤醒降低到
33
+ * 约 1/4,因此取 1s 作为响应速度与空转成本的平衡点。
34
+ */
35
+ const YIELD_POLL_INTERVAL_MS = 1000;
30
36
  /** command_output 单次等待上限,避免代理用等待把 step 又堵死 */
31
37
  const MAX_COMMAND_OUTPUT_WAIT_MS = 30_000;
32
38
  /** 后台命令句柄上限;超出时优先回收已结束的句柄 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepccc",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "description": "A lightweight coding agent with OpenAI-compatible and Anthropic Messages API support.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [