@xiaohhhh1/canvas-agent 0.4.12 → 0.4.13

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.
@@ -1,3 +1,4 @@
1
1
  /** Flow C 脚本分段的唯一上限和自动降级顺序,MCP 与调度器必须共用。 */
2
2
  export declare const FLOW_C_SCRIPT_CHUNK_SIZES: readonly [30, 15, 10];
3
3
  export declare const FLOW_C_SCRIPT_CHUNK_MAX: 30;
4
+ export declare const FLOW_C_DOWNLOAD_POLL_MS = 3000;
@@ -1,3 +1,4 @@
1
1
  /** Flow C 脚本分段的唯一上限和自动降级顺序,MCP 与调度器必须共用。 */
2
2
  export const FLOW_C_SCRIPT_CHUNK_SIZES = [30, 15, 10];
3
3
  export const FLOW_C_SCRIPT_CHUNK_MAX = FLOW_C_SCRIPT_CHUNK_SIZES[0];
4
+ export const FLOW_C_DOWNLOAD_POLL_MS = 3_000;
@@ -9,9 +9,8 @@ import { runCodexTurn, startCodexThread } from "../agent/codex.js";
9
9
  import { CONFIG_DIR, ensureSiteWorkspace } from "../config.js";
10
10
  import { logger } from "../utils/logger.js";
11
11
  import { windowsPowerShellExecutable } from "../utils/windows.js";
12
- import { FLOW_C_SCRIPT_CHUNK_MAX, FLOW_C_SCRIPT_CHUNK_SIZES } from "./constants.js";
12
+ import { FLOW_C_DOWNLOAD_POLL_MS, FLOW_C_SCRIPT_CHUNK_MAX, FLOW_C_SCRIPT_CHUNK_SIZES } from "./constants.js";
13
13
  const STATE_FILE = path.join(CONFIG_DIR, "workflow-state.json");
14
- const DOWNLOAD_POLL_MS = 10_000;
15
14
  /** 本机持久化的 Flow C 控制器:脚本交给本机 Codex,视频直接落盘。 */
16
15
  export class WorkflowManager {
17
16
  config;
@@ -29,7 +28,7 @@ export class WorkflowManager {
29
28
  if (record.status === "queued" || record.status === "running")
30
29
  this.scheduleScript(record.id);
31
30
  }
32
- this.downloadTimer = setInterval(() => void this.syncDownloads(), DOWNLOAD_POLL_MS);
31
+ this.downloadTimer = setInterval(() => void this.syncDownloads(), FLOW_C_DOWNLOAD_POLL_MS);
33
32
  this.downloadTimer.unref?.();
34
33
  void this.syncDownloads();
35
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiaohhhh1/canvas-agent",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",